(()=>{var __webpack_modules__={94785:function(Q,F,v){"use strict";var y=this&&this.__awaiter||function(k,O,E,N){return new(E||(E=Promise))(function(M,x){function I(D){try{L(N.next(D))}catch(j){x(j)}}function S(D){try{L(N.throw(D))}catch(j){x(j)}}function L(D){D.done?M(D.value):new E(function(j){j(D.value)}).then(I,S)}L((N=N.apply(k,O||[])).next())})},f=this&&this.__generator||function(k,O){var N,M,x,I,E={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return I={next:S(0),throw:S(1),return:S(2)},"function"==typeof Symbol&&(I[Symbol.iterator]=function(){return this}),I;function S(D){return function(j){return function L(D){if(N)throw new TypeError("Generator is already executing.");for(;E;)try{if(N=1,M&&(x=2&D[0]?M.return:D[0]?M.throw||((x=M.return)&&x.call(M),0):M.next)&&!(x=x.call(M,D[1])).done)return x;switch(M=0,x&&(D=[2&D[0],x.value]),D[0]){case 0:case 1:x=D;break;case 4:return E.label++,{value:D[1],done:!1};case 5:E.label++,M=D[1],D=[0];continue;case 7:D=E.ops.pop(),E.trys.pop();continue;default:if(!(x=(x=E.trys).length>0&&x[x.length-1])&&(6===D[0]||2===D[0])){E=0;continue}if(3===D[0]&&(!x||D[1]>x[0]&&D[1]<x[3])){E.label=D[1];break}if(6===D[0]&&E.label<x[1]){E.label=x[1],x=D;break}if(x&&E.label<x[2]){E.label=x[2],E.ops.push(D);break}x[2]&&E.ops.pop(),E.trys.pop();continue}D=O.call(k,E)}catch(j){D=[6,j],M=0}finally{N=x=0}if(5&D[0])throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}([D,j])}}};Object.defineProperty(F,"__esModule",{value:!0});var A=v(90871),C=v(82016),P=function(){function k(){this.isPersistent=!1,this.timeoutMs=0,this._isPendingDestroy=!1,this.events=new C.EventEmitter,this.eventDefs={complete:"cmd.requestComplete",revert:"cmd.requestRevert"}}return Object.defineProperty(k.prototype,"stateName",{get:function(){return this.constructor.__stateName||this.constructor.name.charAt(0).toLowerCase()+this.constructor.name.slice(1)},enumerable:!0,configurable:!0}),Object.defineProperty(k,"stateName",{get:function(){return this.__stateName||this.name},set:function(O){this.__stateName=O},enumerable:!0,configurable:!0}),k.prototype.onEnter=function(){return y(this,void 0,void 0,function(){return f(this,function(O){return[2]})})},k.prototype.onExit=function(){return y(this,void 0,void 0,function(){return f(this,function(O){return[2]})})},k.prototype.onTimeout=function(){return y(this,void 0,void 0,function(){return f(this,function(O){throw new Error("onTimeout method not implemented!")})})},k.prototype.onError=function(O){return y(this,void 0,void 0,function(){return f(this,function(E){throw O})})},k.prototype.onRequestComplete=function(O){return new A.EventListener(this.events,this.eventDefs.complete,O)},k.prototype.onRequestRevert=function(O){return new A.EventListener(this.events,this.eventDefs.revert,O)},k.prototype.requestComplete=function(){this._isPendingDestroy=!0,this.events.emit(this.eventDefs.complete)},k.prototype.requestRevert=function(){this._isPendingDestroy=!0,this.events.emit(this.eventDefs.revert)},k.prototype.isPendingDestroy=function(){return this._isPendingDestroy},k}();F.AsyncState=P},12824:function(Q,F,v){"use strict";var N,y=this&&this.__extends||(N=function(M,x){return(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,S){I.__proto__=S}||function(I,S){for(var L in S)S.hasOwnProperty(L)&&(I[L]=S[L])})(M,x)},function(M,x){function I(){this.constructor=M}N(M,x),M.prototype=null===x?Object.create(x):(I.prototype=x.prototype,new I)}),f=this&&this.__awaiter||function(N,M,x,I){return new(x||(x=Promise))(function(S,L){function D(Z){try{z(I.next(Z))}catch(q){L(q)}}function j(Z){try{z(I.throw(Z))}catch(q){L(q)}}function z(Z){Z.done?S(Z.value):new x(function(q){q(Z.value)}).then(D,j)}z((I=I.apply(N,M||[])).next())})},A=this&&this.__generator||function(N,M){var I,S,L,D,x={label:0,sent:function(){if(1&L[0])throw L[1];return L[1]},trys:[],ops:[]};return D={next:j(0),throw:j(1),return:j(2)},"function"==typeof Symbol&&(D[Symbol.iterator]=function(){return this}),D;function j(Z){return function(q){return function z(Z){if(I)throw new TypeError("Generator is already executing.");for(;x;)try{if(I=1,S&&(L=2&Z[0]?S.return:Z[0]?S.throw||((L=S.return)&&L.call(S),0):S.next)&&!(L=L.call(S,Z[1])).done)return L;switch(S=0,L&&(Z=[2&Z[0],L.value]),Z[0]){case 0:case 1:L=Z;break;case 4:return x.label++,{value:Z[1],done:!1};case 5:x.label++,S=Z[1],Z=[0];continue;case 7:Z=x.ops.pop(),x.trys.pop();continue;default:if(!(L=(L=x.trys).length>0&&L[L.length-1])&&(6===Z[0]||2===Z[0])){x=0;continue}if(3===Z[0]&&(!L||Z[1]>L[0]&&Z[1]<L[3])){x.label=Z[1];break}if(6===Z[0]&&x.label<L[1]){x.label=L[1],L=Z;break}if(L&&x.label<L[2]){x.label=L[2],x.ops.push(Z);break}L[2]&&x.ops.pop(),x.trys.pop();continue}Z=M.call(N,x)}catch(q){Z=[6,q],S=0}finally{I=L=0}if(5&Z[0])throw Z[1];return{value:Z[0]?Z[1]:void 0,done:!0}}([Z,q])}}},C=this&&this.__values||function(N){var M="function"==typeof Symbol&&N[Symbol.iterator],x=0;return M?M.call(N):{next:function(){return N&&x>=N.length&&(N=void 0),{value:N&&N[x++],done:!N}}}};Object.defineProperty(F,"__esModule",{value:!0});var P=v(3616),k=v(90871),O=v(82016),E=function(){function N(){var M=this;this.logger=P.Logging.createLogger("stateMachine"),this.events=new O.EventEmitter,this.allowedTransitions=new P.List,this.allowedStates=new P.List,this.corrupted=!1,this.autoTransitionFwd=function(){M.logger.write(M.currentState.stateName+" completed... attempting auto-transition fwd");var x=M.allowedTransitions.where(function(S){return S.from===M.currentState.constructor});if(0!==x.length){if(x.length>1||!x.first().to)throw new Error("multiple exit states... unable to do auto-transition");var I=x.first();M.to(I.to)}else M.logger.write("no transition found...")},this.autoTransitionBack=function(){M.logger.write(M.currentState.stateName+" revert... attempting auto-transition back"),M.prevState&&M.to(M.prevState.constructor).catch(function(){})}}return Object.defineProperty(N.prototype,"current",{get:function(){return this.currentState},enumerable:!0,configurable:!0}),N.prototype.getCurrentState=function(){return this.currentState},N.prototype.is=function(M){return"string"==typeof M?this.current.stateName===M:this.current.constructor===M},N.prototype.start=function(){return f(this,void 0,void 0,function(){return A(this,function(M){if(!this.currentState)throw new Error(this.oid+" has no initial state!");return this.logger.write("starting in state "+this.currentState.stateName),this.currentStateOnCompleteListener=this.currentState.onRequestComplete(this.autoTransitionFwd),this.currentStateRevertListener=this.currentState.onRequestRevert(this.autoTransitionBack),[2,this.doCurrentStateOnEnterSubroutine()]})})},N.prototype.to=function(M){return f(this,void 0,void 0,function(){var I,S=this;return A(this,function(L){if(this.pendingDestroy)return[2];if(this.logger.write("transition request "+this.currentState.stateName+" => "+("string"==typeof M?M:M.stateName)),this.corrupted)throw new N.CorruptedError;if(this.pendingTransition)return this.pendingTransition=this.pendingTransition.then(function(){return S.to(M)}),[2,this.pendingTransition];if(!this.findConcreteTransition(this.currentState.constructor,M))throw new N.ForbiddenStateTransitionError(this.oid,this.currentState.constructor,M);if(!(I="string"==typeof M?this.allowedStates.where(function(D){return D.stateName===M}).first():this.allowedStates.where(function(D){return D===M}).first()))throw new N.TransitionFailedError("Missing or invalid state "+M);return this.pendingState=new I,this.pendingTransition=new Promise(function(D,j){return f(S,void 0,void 0,function(){var z,Z,q;return A(this,function(X){switch(X.label){case 0:this.logger.write(this.currentState.stateName+" exit routine..."),X.label=1;case 1:return X.trys.push([1,6,14,15]),this.context?[4,this.currentState.onExit.apply(this.context)]:[3,3];case 2:return X.sent(),[3,5];case 3:return[4,this.currentState.onExit()];case 4:X.sent(),X.label=5;case 5:return[3,15];case 6:z=X.sent(),X.label=7;case 7:return X.trys.push([7,12,,13]),this.context?[4,this.currentState.onError.apply(this.context,[z])]:[3,9];case 8:return X.sent(),[3,11];case 9:return[4,this.currentState.onError(z)];case 10:X.sent(),X.label=11;case 11:return[3,13];case 12:return Z=X.sent(),this.currentState&&this.events.emit("error."+this.current.stateName,Z),this.corrupted=!0,[3,13];case 13:return[3,15];case 14:return this.clearCurrentStateTimeout(),this.corrupted?[2,j(new N.TransitionFailedError)]:[7];case 15:this.currentStateOnCompleteListener.detach(),this.prevState=this.currentState,this.currentState=this.pendingState,this.pendingState=void 0,this.currentStateOnCompleteListener=this.currentState.onRequestComplete(this.autoTransitionFwd),this.logger.write(this.currentState.stateName+" enter routine..."),X.label=16;case 16:return X.trys.push([16,18,,19]),[4,this.doCurrentStateOnEnterSubroutine()];case 17:return X.sent(),[3,19];case 18:return q=X.sent(),[2,j(q)];case 19:return this.logger.write("transition to "+(M.stateName||M)+" complete... current state is "+this.currentState.stateName),D(),this.pendingTransition=void 0,this.events.emit("enter."+this.currentState.stateName,this.currentState,this.prevState),this.events.emit("exit."+this.prevState.stateName,this.prevState,this.currentState),this.events.emit(this.prevState.stateName+".to."+this.currentState.stateName,this.prevState,this.currentState),this.events.emit("transition",this.prevState,this.currentState),[2]}})})}),[2,this.pendingTransition]})})},N.prototype.onTransition=function(){for(var M=[],x=0;x<arguments.length;x++)M[x]=arguments[x];return"function"==typeof M[0]?new k.EventListener(this.events,"transition",M[0]):new k.EventListener(this.events,M[0]+".to."+M[1],M[2])},N.prototype.onEnter=function(M,x){return new k.EventListener(this.events,"enter."+M,x)},N.prototype.onExit=function(M,x){return new k.EventListener(this.events,"exit."+M,x)},N.prototype.onError=function(M,x){return new k.EventListener(this.events,"error."+M,x)},N.prototype.onTimeout=function(M,x){return new k.EventListener(this.events,"timeout."+M,x)},N.prototype.clearCurrentStateTimeout=function(){this.currentStateTimeout&&(this.logger.write(this.currentState.stateName+" timeout is "+this.currentState.timeoutMs),clearTimeout(this.currentStateTimeout),this.currentStateTimeout=void 0)},N.prototype.extendCurrentStateTimeout=function(M){if(!(M<=0)&&this.currentStateTimeout){this.clearCurrentStateTimeout();var x=Date.now();this.setCurrentStateTimeout((this.currentState.stateTimeoutTimestampMs?this.currentState.stateTimeoutTimestampMs-x:0)+M)}},N.prototype.destroy=function(){return f(this,void 0,void 0,function(){return A(this,function(x){switch(x.label){case 0:if(!this.pendingTransition)return[3,4];x.label=1;case 1:return x.trys.push([1,3,,4]),[4,this.pendingTransition];case 2:return x.sent(),[3,4];case 3:return x.sent(),this.logger.write("pending transition failed... ignore exception and continue destroy"),[3,4];case 4:return this.pendingDestroy=!0,this.clearCurrentStateTimeout(),this.currentStateOnCompleteListener&&(this.currentStateOnCompleteListener.detach(),this.currentStateOnCompleteListener=void 0),this.currentStateRevertListener&&(this.currentStateRevertListener.detach(),this.currentStateRevertListener=void 0),this.events.removeAllListeners(),[2]}})})},N.prototype.doCurrentStateOnEnterSubroutine=function(){return f(this,void 0,void 0,function(){var M,x;return A(this,function(I){switch(I.label){case 0:return I.trys.push([0,5,,13]),this.context?[4,this.currentState.onEnter.apply(this.context)]:[3,2];case 1:return I.sent(),[3,4];case 2:return[4,this.currentState.onEnter()];case 3:I.sent(),I.label=4;case 4:return this.setCurrentStateTimeout(this.currentState.timeoutMs),[2];case 5:M=I.sent(),I.label=6;case 6:return I.trys.push([6,11,,12]),this.context?[4,this.currentState.onError.apply(this.context,[M])]:[3,8];case 7:return I.sent(),[3,10];case 8:return[4,this.currentState.onError(M)];case 9:I.sent(),I.label=10;case 10:return[2];case 11:throw x=I.sent(),this.corrupted=!0,this.currentState&&this.events.emit("error."+this.current.stateName,x),x;case 12:return[3,13];case 13:return[2]}})})},N.prototype.setCurrentStateTimeout=function(M){var x=this;M<=0||(this.logger.write(this.currentState.stateName+" timeout is "+this.currentState.timeoutMs),this.currentState.stateTimeoutTimestampMs=Date.now()+M,this.currentStateTimeout=setTimeout(function(){return f(x,void 0,void 0,function(){var I,S;return A(this,function(L){switch(L.label){case 0:return L.trys.push([0,5,,13]),this.context?[4,this.currentState.onTimeout.apply(this.context)]:[3,2];case 1:return L.sent(),[3,4];case 2:return[4,this.currentState.onTimeout()];case 3:L.sent(),L.label=4;case 4:return this.events.emit("timeout."+this.current.stateName),[3,13];case 5:I=L.sent(),L.label=6;case 6:return L.trys.push([6,11,,12]),this.context?[4,this.currentState.onError.apply(this.context,[I])]:[3,8];case 7:return L.sent(),[3,10];case 8:return[4,this.currentState.onError(I)];case 9:L.sent(),L.label=10;case 10:return[3,12];case 11:return S=L.sent(),this.events.emit("error."+this.current.stateName,S),this.corrupted=!0,[3,12];case 12:return[3,13];case 13:return[2]}})})},M))},N.prototype.findConcreteTransition=function(M,x){return"string"==typeof x?this.allowedTransitions.where(function(I){return void 0===I.from||I.from===M}).where(function(I){return void 0===I.to||I.to.stateName===x}).first():this.allowedTransitions.where(function(I){return void 0===I.from||I.from===M}).where(function(I){return void 0===I.to||I.to===x}).first()},N.prototype.findTransition=function(M,x){return this.allowedTransitions.where(function(I){return void 0===I.from||I.from===M}).where(function(I){return void 0===I.to||I.to===x}).first()},N}();F.AsyncStateMachine=E,function(N){var M=function(){function D(){this.args={transitions:new P.List,allowedStates:new P.List,context:null,initialState:null,oid:null}}return D.prototype.setInitialState=function(j){return this.args.initialState=j,this},D.prototype.setOid=function(j){return this.args.oid=j,this},D.prototype.setStateContext=function(j){return this.args.context=j,this},D.prototype.setAllowedStates=function(){for(var j=[],z=0;z<arguments.length;z++)j[z]=arguments[z];var Z,q;try{for(var X=C(j),ae=X.next();!ae.done;ae=X.next())this.args.allowedStates.add(ae.value)}catch(Pe){Z={error:Pe}}finally{try{ae&&!ae.done&&(q=X.return)&&q.call(X)}finally{if(Z)throw Z.error}}return this},D.prototype.from=function(j){var z=this;return{to:function(){for(var Z=[],q=0;q<arguments.length;q++)Z[q]=arguments[q];var X,ae;try{for(var fe=C(Z),Pe=fe.next();!Pe.done;Pe=fe.next())z.args.transitions.add(new x(j,Pe.value))}catch(Ie){X={error:Ie}}finally{try{Pe&&!Pe.done&&(ae=fe.return)&&ae.call(fe)}finally{if(X)throw X.error}}return z},toAny:function(){return z.args.transitions.add(new x(j,void 0)),z}}},D.prototype.fromAny=function(){var j=this;return{to:function(){for(var z=[],Z=0;Z<arguments.length;Z++)z[Z]=arguments[Z];var q,X;try{for(var ae=C(z),fe=ae.next();!fe.done;fe=ae.next())j.args.transitions.add(new x(void 0,fe.value))}catch(Ae){q={error:Ae}}finally{try{fe&&!fe.done&&(X=ae.return)&&X.call(ae)}finally{if(q)throw q.error}}return j},toAny:function(){return j.args.transitions.add(new x(void 0,void 0)),j}}},D.prototype.build=function(){var j,z,Z,q,X=new N;this.args.oid&&(X.oid=this.args.oid),this.args.context&&(X.context=this.args.context),this.args.initialState&&(X.currentState=new this.args.initialState);try{for(var ae=C(this.args.transitions),fe=ae.next();!fe.done;fe=ae.next())X.allowedTransitions.add(fe.value)}catch(Te){j={error:Te}}finally{try{fe&&!fe.done&&(z=ae.return)&&z.call(ae)}finally{if(j)throw j.error}}try{for(var Ae=C(this.args.allowedStates),Ie=Ae.next();!Ie.done;Ie=Ae.next())X.allowedStates.add(Ie.value)}catch(Te){Z={error:Te}}finally{try{Ie&&!Ie.done&&(q=Ae.return)&&q.call(Ae)}finally{if(Z)throw Z.error}}return X},D}();N.Builder=M;var x=function D(j,z){this.from=j,this.to=z};N.Transition=x;var I=function(D){function j(z,Z,q){return D.call(this,"Forbidden transition in "+z+" ("+Z.stateName+" > "+("string"==typeof q?q:q.stateName)+")")||this}return y(j,D),j}(Error);N.ForbiddenStateTransitionError=I;var S=function(D){function j(){return D.call(this,"State machine errored!")||this}return y(j,D),j}(Error);N.CorruptedError=S;var L=function(D){function j(){return null!==D&&D.apply(this,arguments)||this}return y(j,D),j}(Error);N.TransitionFailedError=L}(E=F.AsyncStateMachine||(F.AsyncStateMachine={})),F.AsyncStateMachine=E},86455:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(12824)),y(v(94785))},32683:(Q,F)=>{"use strict";var y;Object.defineProperty(F,"__esModule",{value:!0}),(y=F.EGameClientBotChatIntent||(F.EGameClientBotChatIntent={})).Greeting="greeting",y.Positive="positive",y.Negative="negative"},77773:(Q,F)=>{"use strict";var y;Object.defineProperty(F,"__esModule",{value:!0}),(y=F.EGameClientChatMessage||(F.EGameClientChatMessage={})).Emoji="image",y.Phrase="text"},38800:(Q,F,v)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0}),function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}(v(98991))},98991:(Q,F)=>{"use strict";var y;Object.defineProperty(F,"__esModule",{value:!0}),(y=F.EMiniSlotSymbol||(F.EMiniSlotSymbol={})).EMPTY="empty",y.CHERRY="cherry",y.WILD="wild",y.BELL="bell",y.WATERMELON="watermelon",y.PLUM="plum",y.ORANGE="orange"},86854:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(77773)),y(v(32683)),y(v(38635)),y(v(38800))},38635:(Q,F)=>{"use strict";var A;Object.defineProperty(F,"__esModule",{value:!0}),(A=F.EInGameBuyCurrency||(F.EInGameBuyCurrency={})).Chips="chips",A.Gems="gems",function(A){A.Cancelled="cancelled",A.Error="error"}(F.EInGameBuyError||(F.EInGameBuyError={})),function(A){A.NotFound="eNotFound",A.UnsupportedOp="eOperation",A.InvalidArgument="eArg",A.InsufficientFunds="eFunds",A.GenericError="eGeneric",A.Timeout="eTimeout"}(F.EBettingClientError||(F.EBettingClientError={}))},55249:(Q,F,v)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0}),function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}(v(43024))},43024:(Q,F)=>{"use strict";var P;Object.defineProperty(F,"__esModule",{value:!0}),F.GameserverMessage="gs-message",(P=F.KickReason||(F.KickReason={})).InactivityTimeout="inactivityTimeout",P.Penalty="penalty",P.Forbidden="forbidden",P.WalletOpFail="walletOpFail",P.InsufficientFunds="insufficientFunds",function(P){P.GameMessage="gameMessage",P.ChatMessage="chatMessage",P.GiftSent="giftSent",P.ProfileUpdate="profileUpdate",P.SettingsChanged="settingsChanged",P.WalletUpdate="walletUpdate",P.JackpotUpdate="jackpotUpdate",P.Reconnect="reconnect",P.GameWinUpdate="gameWinUpdate",P.Config="config",P.ConfigError="configError",P.Bet="bet",P.BetError="betError"}(F.GameEvent||(F.GameEvent={})),function(P){P.SinglePlayer="singlePlayer",P.Matchmaking="matchmaking",P.Custom="custom",P.BlitzTournament="blitzTournament",P.PromoTournament="promoTournament",P.Casino="casino",P.KnockoutTournament="knockoutTournament",P.CasinoMTT="casinoMTT"}(F.RoomType||(F.RoomType={})),function(P){P.Normal="normal",P.Suspended="suspended"}(F.DestroyGameReason||(F.DestroyGameReason={})),function(P){P.Deck="deck",P.Frame="frame",P.Table="table",P.EmojiSet="emojiSet",P.PhraseSet="phraseSet",P.SheeshPawn="sheeshPawn",P.SmallSheeshPawn="smallSheeshPawn",P.LudoPawn="ludoPawn",P.SheeshBoard="sheeshBoard",P.SmallSheeshBoard="smallSheeshBoard",P.LudoBoard="ludoBoard",P.ShudoDice="shudoDice",P.BackgammonDice="backgammonDice",P.TrixDeck="trixDeck",P.NameColor="nameColor",P.SkatDeck="skatDeck",P.KlaverjasDeck="klaverjasDeck",P.DeDeck="deDeck",P.ItDeck="itDeck",P.ChDeck="chDeck",P.EsDeck="esDeck",P.TarotDeck="tarotDeck",P.PokerDeck="pokerDeck",P.PokerTable="pokerTable",P.SvaraTable="svaraTable",P.TeenpattiTablle="teenpattiTable",P.BlackjackTable="blackjackTable",P.MadaqeshTable="madaqeshTable",P.VoiceOver="voiceOver"}(F.PlayerItemType||(F.PlayerItemType={}))},52760:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(55249)),y(v(86854)),y(v(27963))},55851:function(Q,F,v){"use strict";var C,y=this&&this.__extends||(C=function(P,k){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,E){O.__proto__=E}||function(O,E){for(var N in E)E.hasOwnProperty(N)&&(O[N]=E[N])})(P,k)},function(P,k){function O(){this.constructor=P}C(P,k),P.prototype=null===k?Object.create(k):(O.prototype=k.prototype,new O)});Object.defineProperty(F,"__esModule",{value:!0});var A=function(C){function P(k,O,E){var N=C.call(this)||this;return N.playerWalletService=k,N.gameInfoService=O,N.roundSynchronizationService=E,N}return y(P,C),P.prototype._sendError=function(k,O){this.emit(function(E){E.onError(k,O)})},P.prototype._sendGameMessage=function(k,O){this.emit(function(E){E.onGameMessage(k,O)})},P.prototype._sendKickPlayer=function(k,O){this.emit(function(E){E.onPlayerKicked(k,O)})},P.prototype._sendAddPlayerXP=function(k,O){this.emit(function(E){E.onAddPlayerXP(k,O)})},P.prototype._sendGameEnded=function(k){this.emit(function(O){O.onGameEnded(k)})},P.prototype._sendAddPenalty=function(k){this.emit(function(O){O.onAddPenalty(k)})},P.prototype._sendDestroyRequest=function(k){this.emit(function(O){O.onDestroyRequest(k)})},P.prototype._onEventTrack=function(k,O){this.emit(function(E){E.onEventTrack(k,O)})},P.prototype._destroyCompleted=function(){this.emit(function(k){k.onDestroyed()})},P}(v(27963).Emitter);F.BaseGame=A},83485:(Q,F)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var v=function(){function y(){this._listeners=[]}return y.prototype.addListener=function(f){return this._listeners.push(f),this},y.prototype.removeListener=function(f){var A=this._listeners.indexOf(f);return-1!==A&&this._listeners.splice(A,1),this},y.prototype.emit=function(f){var A=this;setTimeout(function(){return A._listeners.forEach(f)},0)},y.prototype.removeAllListeners=function(){this._listeners=[]},y.prototype.dispose=function(){this.removeAllListeners(),this._listeners=[]},y}();F.Emitter=v},71119:(Q,F)=>{"use strict";var y;Object.defineProperty(F,"__esModule",{value:!0}),(y=F.EOperationFailReason||(F.EOperationFailReason={}))[y.Unknown=0]="Unknown",y[y.InvalidArgument=1]="InvalidArgument",y[y.NotFound=2]="NotFound",y[y.InsufficientBalance=3]="InsufficientBalance"},27963:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(83485)),y(v(55851)),y(v(71119))},76880:(Q,F)=>{"use strict";var A;Object.defineProperty(F,"__esModule",{value:!0}),(A=F.EPlayerState||(F.EPlayerState={})).Idle="idle",A.Ready="rdy",A.Inactive="inactive",A.Afk="afk",A.Waiting="waiting",function(A){A.Waiting="waiting",A.Ready="ready",A.Gameplay="gameplay",A.Ended="end"}(F.ETableState||(F.ETableState={})),function(A){A.Init="init",A.Waiting="waiting",A.Ready="ready",A.Finalize="fin",A.Rematch="rematch"}(F.ERoomState||(F.ERoomState={}))},36493:(Q,F)=>{"use strict";var y=function(){function f(){}return f.prototype.validate=function(A){var C=!0;for(var P in A)A[P]()||(C=!1);return C},f}();F.m=y},30973:function(Q,F,v){"use strict";var y=this&&this.__values||function(k){var O="function"==typeof Symbol&&k[Symbol.iterator],E=0;return O?O.call(k):{next:function(){return k&&E>=k.length&&(k=void 0),{value:k&&k[E++],done:!k}}}},f=this&&this.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(F,"__esModule",{value:!0});var A=v(63988),C=f(v(99391)),P=function(){function k(){this.validationResults=[],this.config=[],this.selectedOptions=[],this.isValid=!0}return k.prototype.validate=function(O,E){var N,M;this.config=O,this.selectedOptions=E,this.validationResults=[];var x=function(j){I.validationResults.push(I.validateField(j,I.config.find(function(z){return z.id===j.id})))},I=this;try{for(var S=y(E),L=S.next();!L.done;L=S.next())x(L.value)}catch(j){N={error:j}}finally{try{L&&!L.done&&(M=S.return)&&M.call(S)}finally{if(N)throw N.error}}return this.isValid},k.prototype.getValidationResults=function(){return this.validationResults},k.prototype.getOverrideSettings=function(O,E){var N,M,x=[];try{for(var I=y(E),S=I.next();!S.done;S=I.next()){var L=S.value;x.push({id:L.id,value:L.value}),this.fixLinkedPropertiesConflicts(O,x,L.id,L.value)}}catch(D){N={error:D}}finally{try{S&&!S.done&&(M=I.return)&&M.call(I)}finally{if(N)throw N.error}}return x},k.prototype.validateField=function(O,E){if(E){var N=this.checkValueFormat(O,E);return N.isValid&&(N=this.checkValue(O,E)),N}return this.isValid=!1,{isValid:!1,fieldId:O.id,error:{type:"NotInConfig",description:"Selected field is not in the config"}}},k.prototype.checkValue=function(O,E){var N={isValid:!1,fieldId:O.id,error:{type:"Value",description:"Selected value is not in the fields options list"}};return E.options&&E.options.length?(void 0!==E.options.find(E.format!==A.EFormat.Currency?function(x){return C.default(x.value,O.value)}:function(x){return x.value.amount===O.value.amount&&x.value.currency===O.value.currency})||E.format===A.EFormat.Custom)&&(N={isValid:!0,fieldId:O.id}):N={isValid:!0,fieldId:O.id},N.isValid?this.checkMasteFieldValue(O,E):(this.isValid=!1,N)},k.prototype.checkValueFormat=function(O,E){var N=this.getPrimitiveFieldFormat(E);return typeof O.value!==N&&null!==O.value?(this.isValid=!1,{isValid:!1,fieldId:O.id,error:{type:"ValueFormat",description:"Parsed option field "+O.id+" has a value with format "+typeof O.value+" but a "+this.getPrimitiveFieldFormat(E)+" is expected."}}):{isValid:!0,fieldId:O.id}},k.prototype.getPrimitiveFieldFormat=function(O){var E="";if(O.type===A.FieldType.Toggle)return"boolean";switch(O.format){case A.EFormat.Text:case A.EFormat.LocalizedText:E="string";break;case A.EFormat.Chips:case A.EFormat.Gems:case A.EFormat.Number:case A.EFormat.Seconds:case A.EFormat.ClubShards:E="number";break;case A.EFormat.Image:case A.EFormat.Custom:case A.EFormat.Currency:case A.EFormat.NumberRange:E="object";break;case A.EFormat.Boolean:E="boolean"}return E},k.prototype.getMasterField=function(O){return this.config.find(function(E){return E.id===O})},k.prototype.getMasterFieldValue=function(O){return this.selectedOptions.find(function(E){return E.id===O.id})},k.prototype.getValuesLinkedToData=function(O,E){return E.options.filter(function(N){return N.value===O.value&&N.linkedTo})},k.prototype.checkMasteFieldValue=function(O,E){var N,M;if(E.masterFieldId){var x=this.getMasterField(E.masterFieldId),I=this.getMasterFieldValue(x),S={isValid:!1,fieldId:O.id,error:{type:"MasterValue",description:"Selected value is not corresponding to the linked master fields value"}},L=this.getValuesLinkedToData(O,E),D=!1;try{for(var j=y(L),z=j.next();!z.done;z=j.next()){var Z=z.value;Z.linkedTo&&C.default(Z.linkedTo.value,I.value)&&(D=!0)}}catch(q){N={error:q}}finally{try{z&&!z.done&&(M=j.return)&&M.call(j)}finally{if(N)throw N.error}}return L.length&&I&&!D?this.isValid=!1:S={isValid:!0,fieldId:O.id},S}return{isValid:!0,fieldId:O.id}},k.prototype.fixLinkedPropertiesConflicts=function(O,E,N,M){var x,I;try{for(var S=y(O),L=S.next();!L.done;L=S.next()){var D=L.value;if(D.id!==N&&D.options){var j=D.options.find(function(z){return z.linkedTo&&z.linkedTo.id===N&&C.default(z.linkedTo.value,M)});j&&(E.push({id:D.id,value:j.value}),this.fixLinkedPropertiesConflicts(O,E,D.id,j.value))}}}catch(z){x={error:z}}finally{try{L&&!L.done&&(I=S.return)&&I.call(S)}finally{if(x)throw x.error}}},k}();F.FormValidator=P},89794:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(30973)),y(v(63988))},63988:(Q,F)=>{"use strict";var A;Object.defineProperty(F,"__esModule",{value:!0}),(A=F.FieldType||(F.FieldType={})).Picker="Picker",A.Toggle="Toggle",A.Info="Info",A.Dropdown="dropdown",A.Input="input",A.RadioButton="RadioButton",A.MultiPicker="MultiPicker",function(A){A.Input="input",A.TextArea="textarea"}(F.EInputType||(F.EInputType={})),function(A){A.Text="Text",A.LocalizedText="LocalizedText",A.Number="Number",A.Points="Points",A.ClubShards="ClubShards",A.Chips="Chips",A.NumberRange="NumberRange",A.Gems="Gems",A.Currency="Currency",A.Seconds="Seconds",A.Custom="Custom",A.Image="Image",A.Boolean="Boolean"}(F.EFormat||(F.EFormat={}))},34724:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(88537)),y(v(76880)),y(v(62048)),F.ActivePlayersSocketUpdateTimeMs=15e3,F.ActivePlayersServerUpdateTimeMs=7e3},71184:(Q,F)=>{"use strict";var C;(C=F.gU||(F.gU={})).MP3="mp3",C.OGG="ogg",C.M4A="m4a",function(C){C.ChipPack="chipPack",C.GemsPack="gemsPack",C.Vip="vip",C.Premium="premium",C.Gift="gift",C.Block="block",C.NameChanger="nameChanger",C.StatsReset="statsReset",C.Bundle="bundle",C.EmojiSet="emojiSet",C.PhraseSet="phraseSet",C.Booster="booster",C.MessageColor="messageColor",C.NameColor="nameColor",C.Xp="xp",C.XpPack="xpPack",C.Frame="frame",C.CashbackUnlocker="cashbackUnlocker",C.SlotFreeSpins="slotFreeSpins",C.ClubExtender="clubExtender",C.Deck="deck",C.Table="table",C.Dice="dice",C.Pawn="pawn",C.SkatDeck="skatDeck",C.KlaverjasDeck="klaverjasDeck",C.DeDeck="deDeck",C.ItDeck="itDeck",C.ChDeck="chDeck",C.EsDeck="esDeck",C.TarotDeck="tarotDeck",C.SheeshPawn="sheeshPawn",C.SmallSheeshPawn="smallSheeshPawn",C.LudoPawn="ludoPawn",C.SheeshBoard="sheeshBoard",C.SmallSheeshBoard="smallSheeshBoard",C.LudoBoard="ludoBoard",C.ShudoDice="shudoDice",C.BackgammonDice="backgammonDice",C.TrixDeck="trixDeck",C.PokerDeck="pokerDeck",C.PokerTable="pokerTable",C.SvaraTable="svaraTable",C.BlackjackTable="blackjackTable",C.TeenpattiTable="teenpattiTable",C.MadaqeshTable="madaqeshTable",C.ProfileBackground="profileBackground",C.VoiceOver="voiceOver"}(F.TG||(F.TG={})),function(C){C.Durable="durable",C.Consumable="consumable",C.Expireable="expireable",C.Subscription="subscription"}(F.XM||(F.XM={}))},88537:(Q,F)=>{"use strict";var P;Object.defineProperty(F,"__esModule",{value:!0}),(P=F.ECmdStatus||(F.ECmdStatus={})).Ok="ok",P.NotFound="eNotFound",P.Duplicated="eDuplicated",P.UnsupportedOp="eOperation",P.GenericError="eGeneric",P.StateMissmatch="eStateMissmatch",P.OperationLimitExceeded="eOperationLimit",function(P){var O;(O=P.Messages||(P.Messages={})).CreateMatchmakingRoom="rcrt.mm",O.CreateSinglePlayerRoom="rcrt.sp",O.CreateCustomRoom="rcrt.cus",O.CreateCustomBlitzRoom="rcrt.cus.bz",O.CreateMTTRoom="rcrt.mtt",O.MatchSuccess="rstart.mm",O.MatchFail="rfail.mm"}(F.CreateRoomProtocol||(F.CreateRoomProtocol={})),function(P){var E;(E=P.Messages||(P.Messages={})).RoomSearch="rsrch",E.SearchCancel="rcancel",E.GetCurrentState="getst",E.GetCustomRooms="getcus",E.GetRoomByCode="getbycode",E.DeclineInvitation="rinvdec",E.DeclineBlitzInvitation="rinvdec.bz",E.RoomFound="rfound",E.CurrentState="pstate",E.SessionTimeout="stimeout",E.StatsUpdate="supd",E.InviteReceived="rinvrec",E.ActivePlayersUpdate="pactiveupdate",E.ActivePlayersAll="pactiveall",E.SpectateGameNotification="game.spec.notif",E.KnockoutStateUpdate="kostateupd",function(E){E.HighStakes="highStakes",E.FriendPlaying="friendPlaying"}(P.ESpectateGameNotificationType||(P.ESpectateGameNotificationType={}))}(F.MatchmakingProtocol||(F.MatchmakingProtocol={})),function(P){var N;(N=P.Messages||(P.Messages={})).JoinRoom="rjoin",N.LeaveRoom="rleav",N.BanPlayer="rban",N.PlayerReady="rrdy",N.GameMessageIn="gmsg.in",N.ClientMessageIn="clmsg.in",N.InvitePlayer="rinv",N.InviteCancel="rcinv",N.Rematch="rematch",N.SpectatorJoin="spjoin",N.StartRoom="rstart",N.ConnectOk="rconn.ok",N.ConnectRejected="rconn.rej",N.GameMessageOut="gmsg.out",N.RoomUpdate="rupd",N.MyGameUpdate="mygupd",N.RoomDestroyed="rdst",N.ClientMessageOut="clmsg.out",N.CreatedRoom="rcrt",N.SpectatorsCountUpdate="spcupd",N.StatsUpdate="supd",N.PlayerMoved="pmvd",function(N){N.WaitingTimeout="wtimeout",N.Error="error"}(P.EDestroyReason||(P.EDestroyReason={})),function(N){N.HostBan="hban",N.MTTournamentEnd="mtt.end",N.Inactivity="inactivity",N.RoomDestroy="rdestroy"}(P.EPlayerDisconnectReason||(P.EPlayerDisconnectReason={}))}(F.ActiveRoomProtocol||(F.ActiveRoomProtocol={})),function(P){var O;(O=P.Messages||(P.Messages={})).SignUp="mtt.sup",O.SignOut="mtt.sout",O.GetAllTournaments="mtt.getts",O.GetTournamentData="mtt.gettd",O.Reward="mtt.rwd",O.CreateNewTournament="mtt.crt"}(F.MTTProtocol||(F.MTTProtocol={}))},62048:(Q,F)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var v=function(){function y(f,A,C,P){this.maxPlayers=f,this.playersPerTeam=A,this.playersPerGame=C,this.teamsPerGame=C/A,this.qualifyingSpots=P}return y.prototype.getInitialGameCount=function(){return this.maxPlayers/(this.playersPerTeam*this.teamsPerGame)},y.prototype.maxRounds=function(){return Math.log(this.getInitialGameCount())/Math.log(this.playersPerGame/this.qualifyingSpots)+1},y.prototype.getGameCountByRound=function(f){return this.getInitialGameCount()/Math.pow(this.playersPerGame/this.qualifyingSpots,f-1)},y.prototype.isLastRound=function(f){return f===this.maxRounds()},y}();F.TournamentRoundsCalculator=v},78650:function(Q,F,v){"use strict";var y=this&&this.__values||function(L){var D="function"==typeof Symbol&&L[Symbol.iterator],j=0;return D?D.call(L):{next:function(){return L&&j>=L.length&&(L=void 0),{value:L&&L[j++],done:!L}}}};Object.defineProperty(F,"__esModule",{value:!0});var f=v(97661),A=v(27991),C=v(31008),P=v(48265),k=v(73446),O=v(85727),E=v(22487),N=v(69338),M=v(47132),x=v(62871),I=v(99391),S=function(){function L(D){var j,z;if(void 0===D&&(D=[]),this.collection=[],D)try{for(var Z=y(D),q=Z.next();!q.done;q=Z.next())this.collection.push(q.value)}catch(ae){j={error:ae}}finally{try{q&&!q.done&&(z=Z.return)&&z.call(Z)}finally{if(j)throw j.error}}}return Object.defineProperty(L.prototype,"length",{get:function(){return this.collection.length},enumerable:!0,configurable:!0}),L.prototype.has=function(D){var j,z;try{for(var Z=y(this.collection),q=Z.next();!q.done;q=Z.next())if(I(D,q.value))return!0}catch(ae){j={error:ae}}finally{try{q&&!q.done&&(z=Z.return)&&z.call(Z)}finally{if(j)throw j.error}}return!1},L.prototype.add=function(){for(var D=[],j=0;j<arguments.length;j++)D[j]=arguments[j];var z,Z;try{for(var q=y(D),X=q.next();!X.done;X=q.next())this.collection.push(X.value)}catch(fe){z={error:fe}}finally{try{X&&!X.done&&(Z=q.return)&&Z.call(q)}finally{if(z)throw z.error}}},L.prototype.addFirst=function(D){this.collection.unshift(D)},L.prototype.get=function(D){if(D>=this.collection.length)throw new RangeError("requested index ("+D+") is out of bounds");return this.collection[D]},L.prototype.select=function(D){return this.collection[D]},L.prototype.remove=function(D){for(var j=0;j<this.collection.length;j++)if(Object.is(D,this.collection[j]))return A(this.collection,j),D},L.prototype.where=function(D){var j=new L;return j.collection=f(this.collection,D),j},L.prototype.orderBy=function(D){for(var j=[],z=1;z<arguments.length;z++)j[z-1]=arguments[z];return this.collection=C(this.collection,D,j),this},L.prototype.shuffle=function(){return this.collection=P(this.collection),this},L.prototype.first=function(){return this.collection[0]},L.prototype.last=function(){return this.collection[Math.max(this.length-1,0)]},L.prototype.binarySearchFirstIndex=function(D,j){return j?O(this.collection,D,j):k(this.collection,D)},L.prototype.binarySearchLastIndex=function(D,j){return j?E(this.collection,D,j):N(this.collection,D)},L.prototype.toArray=function(){return this.collection},L.prototype.removeAt=function(D){return this.collection.splice(D,1)[0]},L.prototype.insertAt=function(D,j){this.collection.splice(D,0,j)},L.prototype.concat=function(D){var j,z;try{for(var Z=y(D),q=Z.next();!q.done;q=Z.next())this.add(q.value)}catch(ae){j={error:ae}}finally{try{q&&!q.done&&(z=Z.return)&&z.call(Z)}finally{if(j)throw j.error}}return this},L.prototype.map=function(D){return new L(this.collection.map(D))},L.prototype.chunk=function(D){if(D<=0)throw new RangeError("Invalid value for chunk size");return x(this.collection,D)},L.prototype.sum=function(D){return this.collection.map(function(j){return D(j)}).reduce(function(j,z){return j+z},0)},L.prototype.avg=function(D){return this.sum(D)/this.toArray().length},L.prototype.groupBy=function(D){return M(this.collection,D)},L.prototype.forEach=function(D){return this.collection.forEach(D),this},L.prototype.find=function(D){return this.collection.find(D)},L.prototype[Symbol.iterator]=function(){var D=0,j=this.collection;return{next:function(){return D<j.length?{done:!1,value:j[D++]}:{done:!0,value:void 0}}}},L}();F.List=S},60339:function(Q,F,v){"use strict";var O,y=this&&this.__extends||(O=function(E,N){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,x){M.__proto__=x}||function(M,x){for(var I in x)x.hasOwnProperty(I)&&(M[I]=x[I])})(E,N)},function(E,N){function M(){this.constructor=E}O(E,N),E.prototype=null===N?Object.create(N):(M.prototype=N.prototype,new M)}),f=this&&this.__values||function(O){var E="function"==typeof Symbol&&O[Symbol.iterator],N=0;return E?E.call(O):{next:function(){return O&&N>=O.length&&(O=void 0),{value:O&&O[N++],done:!O}}}};Object.defineProperty(F,"__esModule",{value:!0});var A=v(78650),C=v(97661),P=v(38119),k=function(O){function E(N){var M,x;void 0===N&&(N=[]);var I=O.call(this)||this;if(N)try{for(var S=f(N),L=S.next();!L.done;L=S.next())I.add(L.value)}catch(j){M={error:j}}finally{try{L&&!L.done&&(x=S.return)&&x.call(S)}finally{if(M)throw M.error}}return I}return y(E,O),E.prototype.findById=function(N){var M,x;try{for(var I=f(this.collection),S=I.next();!S.done;S=I.next()){var L=S.value;if(L.id===N)return L}}catch(D){M={error:D}}finally{try{S&&!S.done&&(x=I.return)&&x.call(I)}finally{if(M)throw M.error}}},E.prototype.add=function(N){if(this.has(N))throw new E.DuplicationError('Duplicate item "'+N.id+'" added to collection');O.prototype.add.call(this,N)},E.prototype.tryAdd=function(N){this.has(N)||O.prototype.add.call(this,N)},E.prototype.where=function(N){return new E(C(this.collection,N))},E.prototype.addFirst=function(N){if(this.has(N))throw new E.DuplicationError('Duplicate item "'+N.id+'"');O.prototype.addFirst.call(this,N)},E.prototype.insertAt=function(N,M){if(this.has(M))throw new E.DuplicationError('Duplicate item "'+M.id+'"');O.prototype.insertAt.call(this,N,M)},E.prototype.has=function(N){var M,x;try{for(var I=f(this.collection),S=I.next();!S.done;S=I.next())if(S.value.id===N.id)return!0}catch(D){M={error:D}}finally{try{S&&!S.done&&(x=I.return)&&x.call(I)}finally{if(M)throw M.error}}return!1},E.prototype.remove=function(N){return P(this.collection,function(M){return M.id===N.id})[0]},E}(A.List);F.UniqueList=k,function(O){var E=function(N){function M(x){var I=N.call(this,x)||this;return I.name="DuplicationError",Object.setPrototypeOf(I,M.prototype),I}return y(M,N),M}(Error);O.DuplicationError=E}(k=F.UniqueList||(F.UniqueList={})),F.UniqueList=k},90693:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(78650)),y(v(60339))},9757:function(Q,F){"use strict";var k,v=this&&this.__extends||(k=function(O,E){return(k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,M){N.__proto__=M}||function(N,M){for(var x in M)M.hasOwnProperty(x)&&(N[x]=M[x])})(O,E)},function(O,E){function N(){this.constructor=O}k(O,E),O.prototype=null===E?Object.create(E):(N.prototype=E.prototype,new N)});Object.defineProperty(F,"__esModule",{value:!0});var y=function(k){function O(){var E=null!==k&&k.apply(this,arguments)||this;return E.name="MetadataError",E}return v(O,k),O}(Error);F.MetadataError=y;var f=function(k){function O(E){var N=k.call(this,E)||this;return N.name="InvalidArgumentsError",Object.setPrototypeOf(N,O.prototype),N}return v(O,k),O}(Error);F.InvalidArgumentsError=f;var A=function(k){function O(){var E=null!==k&&k.apply(this,arguments)||this;return E.name="ConnectionError",E}return v(O,k),O}(Error);F.ConnectionError=A;var C=function(k){function O(){var E=null!==k&&k.apply(this,arguments)||this;return E.name="ItemNotFoundError",E}return v(O,k),O}(Error);F.ItemNotFoundError=C;var P=function(k){function O(){return null!==k&&k.apply(this,arguments)||this}return v(O,k),O}(Error);F.TestError=P},3616:(Q,F,v)=>{"use strict";function y(A){for(var C in A)F.hasOwnProperty(C)||(F[C]=A[C])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(90693)),y(v(2724)),y(v(36564)),y(v(9757));var f=v(85269);F.Logging=f},73399:(Q,F)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var v=function(){function y(f){this.isEnabled=!1,this.namespace=f}return y.prototype.write=function(f){this.isEnabled&&console.log(new Date+" | "+this.namespace+" | "+f)},y}();F.DebugConsoleLogger=v},85269:(Q,F,v)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var y=v(73399);F.createLogger=function f(A){return new y.DebugConsoleLogger(A)}},39982:function(Q,F,v){"use strict";var M,y=this&&this.__extends||(M=function(x,I){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,L){S.__proto__=L}||function(S,L){for(var D in L)L.hasOwnProperty(D)&&(S[D]=L[D])})(x,I)},function(x,I){function S(){this.constructor=x}M(x,I),x.prototype=null===I?Object.create(I):(S.prototype=I.prototype,new S)}),f=this&&this.__awaiter||function(M,x,I,S){return new(I||(I=Promise))(function(L,D){function j(q){try{Z(S.next(q))}catch(X){D(X)}}function z(q){try{Z(S.throw(q))}catch(X){D(X)}}function Z(q){q.done?L(q.value):new I(function(X){X(q.value)}).then(j,z)}Z((S=S.apply(M,x||[])).next())})},A=this&&this.__generator||function(M,x){var S,L,D,j,I={label:0,sent:function(){if(1&D[0])throw D[1];return D[1]},trys:[],ops:[]};return j={next:z(0),throw:z(1),return:z(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function z(q){return function(X){return function Z(q){if(S)throw new TypeError("Generator is already executing.");for(;I;)try{if(S=1,L&&(D=2&q[0]?L.return:q[0]?L.throw||((D=L.return)&&D.call(L),0):L.next)&&!(D=D.call(L,q[1])).done)return D;switch(L=0,D&&(q=[2&q[0],D.value]),q[0]){case 0:case 1:D=q;break;case 4:return I.label++,{value:q[1],done:!1};case 5:I.label++,L=q[1],q=[0];continue;case 7:q=I.ops.pop(),I.trys.pop();continue;default:if(!(D=(D=I.trys).length>0&&D[D.length-1])&&(6===q[0]||2===q[0])){I=0;continue}if(3===q[0]&&(!D||q[1]>D[0]&&q[1]<D[3])){I.label=q[1];break}if(6===q[0]&&I.label<D[1]){I.label=D[1],D=q;break}if(D&&I.label<D[2]){I.label=D[2],I.ops.push(q);break}D[2]&&I.ops.pop(),I.trys.pop();continue}q=x.call(M,I)}catch(X){q=[6,X],L=0}finally{S=D=0}if(5&q[0])throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}([q,X])}}},C=this&&this.__values||function(M){var x="function"==typeof Symbol&&M[Symbol.iterator],I=0;return x?x.call(M):{next:function(){return M&&I>=M.length&&(M=void 0),{value:M&&M[I++],done:!M}}}};Object.defineProperty(F,"__esModule",{value:!0});var P=v(78650),k=v(63002),O=v(99391),E=function(M){function x(I){var S=M.call(this,I)||this;return S.name="StateException",S}return y(x,M),x}(Error);F.StateException=E;var N=function(){function M(x,I){this.identifier="StateMachine",this.transitions=new P.List,this.timeouts=new Map,this.timeoutCallbacks=new Map,this.beforeEnterCallbacks=new Map,this.beforeExitCallbacks=new Map,this.enterCallbacks=new Map,this.exitCallbacks=new Map,this.wildcardCallbacks=[],this.corrupted=!1,this.identifier=I||this.identifier,this.initialState=x,this.currentState=x}return M.prototype.from=function(x){return new k.Transition.Constructor(x,this)},M.prototype.fromAny=function(){return new k.Transition.Constructor(null,this)},M.prototype.transitionTo=function(x){return f(this,void 0,void 0,function(){var I,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge,Ue,st,It,xt,gt,At,ht,dt,kt=this;return A(this,function(St){switch(St.label){case 0:if(!this.canTransitionTo(x))return[2,this.throwForbiddenTransitionException(this.currentState,x)];St.label=1;case 1:St.trys.push([1,9,10,11]),X=C(this.beforeExitCallbacks.get(this.getCurrent())||[]),ae=X.next(),St.label=2;case 2:if(ae.done)return[3,8];At=ae.value,Ge=void 0,St.label=3;case 3:return St.trys.push([3,5,,6]),[4,At(this.getCurrent())];case 4:return Ge=St.sent(),[3,6];case 5:return fe=St.sent(),console.error("["+this.identifier+'] "'+this.getCurrent()+'" exit attempt interrupted!',fe),this.raiseTransitionError(this.getCurrent(),x,fe),[2,!1];case 6:if(Ge&&Ge instanceof Error)return console.error("["+this.identifier+'] "'+this.getCurrent()+'" exit attempt interrupted!',Ge.message),this.raiseTransitionError(this.getCurrent(),x,Ge),[2,!1];St.label=7;case 7:return ae=X.next(),[3,2];case 8:return[3,11];case 9:return Pe=St.sent(),I={error:Pe},[3,11];case 10:try{ae&&!ae.done&&(S=X.return)&&S.call(X)}finally{if(I)throw I.error}return[7];case 11:St.trys.push([11,16,17,18]),Ae=C(this.exitCallbacks.get(this.getCurrent())||[]),Ie=Ae.next(),St.label=12;case 12:return Ie.done?[3,15]:[4,(At=Ie.value)(this.getCurrent())];case 13:St.sent(),St.label=14;case 14:return Ie=Ae.next(),[3,12];case 15:return[3,18];case 16:return De=St.sent(),L={error:De},[3,18];case 17:try{Ie&&!Ie.done&&(D=Ae.return)&&D.call(Ae)}finally{if(L)throw L.error}return[7];case 18:St.trys.push([18,26,27,28]),Te=C(this.beforeEnterCallbacks.get(x)||[]),xe=Te.next(),St.label=19;case 19:if(xe.done)return[3,25];At=xe.value,Ge=void 0,St.label=20;case 20:return St.trys.push([20,22,,23]),[4,At(this.getCurrent())];case 21:return Ge=St.sent(),[3,23];case 22:return Ue=St.sent(),console.error("["+this.identifier+'] "'+x+'" enter attempt interrupted!',Ue),this.raiseTransitionError(this.getCurrent(),x,Ue),[2,!1];case 23:if(Ge&&Ge instanceof Error)return console.error("["+this.identifier+'] "'+x+'" enter attempt interrupted!',Ge.message),this.raiseTransitionError(this.getCurrent(),x,Ge),[2,!1];St.label=24;case 24:return xe=Te.next(),[3,19];case 25:return[3,28];case 26:return st=St.sent(),j={error:st},[3,28];case 27:try{xe&&!xe.done&&(z=Te.return)&&z.call(Te)}finally{if(j)throw j.error}return[7];case 28:this.clearTimeout(),It=this.currentState,this.currentState=x,St.label=29;case 29:St.trys.push([29,34,35,36]),xt=C(this.enterCallbacks.get(this.getCurrent())||[]),gt=xt.next(),St.label=30;case 30:return gt.done?[3,33]:[4,(At=gt.value)(this.getCurrent())];case 31:St.sent(),St.label=32;case 32:return gt=xt.next(),[3,30];case 33:return[3,36];case 34:return ht=St.sent(),Z={error:ht},[3,36];case 35:try{gt&&!gt.done&&(q=xt.return)&&q.call(xt)}finally{if(Z)throw Z.error}return[7];case 36:return(dt=this.getConcreteTransition(It,this.currentState))&&(dt.successCallbacks.forEach(function($i){return f(kt,void 0,void 0,function(){return A(this,function(Xr){switch(Xr.label){case 0:return[4,$i(It,this.currentState)];case 1:return[2,Xr.sent()]}})})}),this.wildcardCallbacks.forEach(function($i){return $i(It,kt.currentState)})),this.startCurrentStateTimeout(),[2,!0]}})})},M.prototype.getCurrent=function(){return this.currentState},M.prototype.is=function(x){return O(this.currentState,x)},M.prototype.canTransition=function(x,I){return!!this.getTransition(x,I)},M.prototype.canTransitionTo=function(x){return!!this.getTransition(this.currentState,x)},M.prototype.removeListener=function(x){throw new Error("Method not implemented.")},M.prototype.onBeforeEnter=function(x,I){return this.attachListener(x,I,this.beforeEnterCallbacks)},M.prototype.onBeforeExit=function(x,I){return this.attachListener(x,I,this.beforeExitCallbacks)},M.prototype.onEnter=function(x,I){return this.attachListener(x,I,this.enterCallbacks)},M.prototype.onExit=function(x,I){return this.attachListener(x,I,this.exitCallbacks)},M.prototype.onTimeout=function(x,I){return this.attachListener(x,I,this.timeoutCallbacks)},M.prototype.onTransitionBetween=function(x,I,S){if(!this.canTransition(x,I))return this.throwForbiddenTransitionException(x,I);var L=this.getConcreteTransition(x,I);return L||(L=new k.Transition(x,I),this.addTransition(L)),L.successCallbacks.push(S),new k.Transition.Listener(S,L.successCallbacks)},M.prototype.onTransitionError=function(x,I,S){var L=this.getConcreteTransition(x,I);return L?(L.errorCallbacks.push(S),new k.Transition.Listener(S,L.errorCallbacks)):this.throwForbiddenTransitionException(x,I)},M.prototype.reset=function(){this.clearTimeout(),this.currentState=this.initialState},M.prototype.addTransition=function(x){if(this.getConcreteTransition(x.from,x.to))return console.warn("["+this.identifier+"] Transition already exists");this.transitions.add(x)},M.prototype.addWildcardCallback=function(x){this.wildcardCallbacks.push(x)},M.prototype.setStateTimeout=function(x,I){return this.timeouts.set(x,1e3*I),this},M.prototype.removeStateTimeout=function(x,I){this.timeouts.delete(x)},M.prototype.clearTimeout=function(){clearTimeout(this.currentStateTimeout)},M.prototype.resetTimeout=function(){this.clearTimeout(),this.startCurrentStateTimeout()},M.prototype.forceState=function(x){this.currentState=x},M.prototype.raiseTransitionError=function(x,I,S){var L=this.getConcreteTransition(x,I);if(this.corrupted=!0,!L)return this.throwForbiddenTransitionException(x,I);L.errorCallbacks.forEach(function(D){return D(x,I,S)})},M.prototype.startCurrentStateTimeout=function(){var x=this,I=this.timeouts.get(this.currentState);if(I){var S=this.timeoutCallbacks.get(this.currentState)||[];S.length&&(this.currentStateTimeout=setTimeout(function(){S.forEach(function(L){return L(x.currentState)})},I))}},M.prototype.attachListener=function(x,I,S){var L=S.get(x)||[];return L.push(I),S.set(x,L),new k.Transition.Listener(I,L)},M.prototype.getConcreteTransition=function(x,I){return this.transitions.where(function(S){return S.from===x}).where(function(S){return S.to===I}).first()},M.prototype.getTransition=function(x,I){return this.transitions.where(function(S){return S.from===x||null===S.from}).where(function(S){return S.to===I||null===S.to}).first()},M.prototype.throwForbiddenTransitionException=function(x,I){throw new E("Forbidden transition ["+x+" > "+I+'] in "'+this.identifier+'"')},M}();F.StateMachine=N},63002:(Q,F,v)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var y=v(38119),f=function A(C,P){this.successCallbacks=[],this.errorCallbacks=[],this.from=C,this.to=P};F.Transition=f,function(A){var C=function(){function k(O,E){this.from=O,this.parent=E}return k.prototype.to=function(){for(var O=this,E=[],N=0;N<arguments.length;N++)E[N]=arguments[N];return E.forEach(function(M){return O.parent.addTransition(new A(O.from,M))}),this.parent},k.prototype.toAny=function(){return this.parent.addTransition(new A(this.from,null)),this.parent},k}();A.Constructor=C;var P=function(){function k(O,E){this.callbackRef=O,this.callbacks=E}return k.prototype.detach=function(){var O=this;y(this.callbacks,function(E){return E===O.callbackRef})},k}();A.Listener=P}(f=F.Transition||(F.Transition={})),F.Transition=f},2724:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(63002)),y(v(39982))},90871:(Q,F)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var v=function(){function y(f,A,C){this.emitter=f,this.eventName=A,this.callback=C,this.addListenerMethod(this.emitter,A,C)}return y.prototype.detach=function(){this.emitter&&(this.removeListenerMethod(this.emitter,this.eventName,this.callback),this.emitter=null),this.eventName&&(this.eventName=null),this.callback&&(this.callback=null),this.onDetachCb&&(this.onDetachCb(),this.onDetachCb=null)},y.prototype.onDetach=function(f){this.onDetachCb=f},y.prototype.addListenerMethod=function(f,A,C){(f.on||f.addListener||f.addEventListener).apply(f,[A,C])},y.prototype.removeListenerMethod=function(f,A,C){(f.off||f.removeListener||f.removeEventListener).apply(f,[A,C])},y}();F.EventListener=v},76478:function(Q,F,v){"use strict";var y=this&&this.__read||function(O,E){var N="function"==typeof Symbol&&O[Symbol.iterator];if(!N)return O;var x,S,M=N.call(O),I=[];try{for(;(void 0===E||E-- >0)&&!(x=M.next()).done;)I.push(x.value)}catch(L){S={error:L}}finally{try{x&&!x.done&&(N=M.return)&&N.call(M)}finally{if(S)throw S.error}}return I},f=this&&this.__spread||function(){for(var O=[],E=0;E<arguments.length;E++)O=O.concat(y(arguments[E]));return O};Object.defineProperty(F,"__esModule",{value:!0});var A=v(58427),C=v(82213),P=v(54451),k=function(){function O(){this.sources=[],this.propertySource={},this.destination={}}return O.prototype.addSource=function(E){return this.sources.push(E),this},O.prototype.setDestination=function(E,N){return void 0===N&&(N=!0),this.destination=N?P(E):E,this},O.prototype.getResult=function(E){return this.result||(this.result=E?A.apply(void 0,f([this.destination],this.sources,[E])):C.apply(void 0,f([this.destination],this.sources))),this.result},O}();F.Merge=k},67053:(Q,F,v)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var y=v(25475),f=function(){function A(){this._isActive=!1}return Object.defineProperty(A.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),Object.defineProperty(A.prototype,"timerEndTimestamp",{get:function(){return this._timerEndTimestamp},enumerable:!0,configurable:!0}),A.prototype.setTimeout=function(C,P){this._isActive&&this.clear(),this._timerEndTimestamp=y.now()+Math.round(P/1e3),this._isActive=!0,this.timer=setTimeout(C,P)},A.prototype.setInterval=function(C,P){var k=this;this._isActive&&this.clear(),this._timerEndTimestamp=y.now()+Math.round(P/1e3),this._isActive=!0,this.timer=setInterval(function(){k._timerEndTimestamp=y.now()+Math.round(P/1e3),C()},P)},A.prototype.clear=function(){this._isActive=!1,clearTimeout(this.timer),clearInterval(this.timer)},A}();F.Timer=f},25475:function(Q,F,v){"use strict";var y=this&&this.__values||function(ae){var fe="function"==typeof Symbol&&ae[Symbol.iterator],Pe=0;return fe?fe.call(ae):{next:function(){return ae&&Pe>=ae.length&&(ae=void 0),{value:ae&&ae[Pe++],done:!ae}}}};Object.defineProperty(F,"__esModule",{value:!0});var f=v(17939),A=v(8734),C=v(54451),P=v(41770),k=v(7326),O=v(9757);F.isAbsoluteLink=function E(ae){return/^(http|https|ftp|www)/.test(ae)},F.isPrimitive=function N(ae){var fe=typeof ae;return null==ae||"object"!==fe&&"function"!==fe},F.randomInt=function M(ae,fe){return P(ae,fe,!1)},F.randomFloat=function x(ae,fe){return P(ae,fe,!0)},F.uuidV4=function I(){return k()},F.stringToUuid=function S(ae){if(32!=ae.length)throw new O.InvalidArgumentsError;var fe=[];return fe.push(ae.slice(0,8)),fe.push(ae.slice(8,12)),fe.push(ae.slice(12,16)),fe.push(ae.slice(16,20)),fe.push(ae.slice(20,32)),fe.join("-")},F.deepFreeze=function L(ae){var fe,Pe,Ae=Object.getOwnPropertyNames(ae);try{for(var Ie=y(Ae),De=Ie.next();!De.done;De=Ie.next()){var Te=De.value,xe=ae[Te];ae[Te]=xe&&"object"==typeof xe?L(xe):xe}}catch(Ge){fe={error:Ge}}finally{try{De&&!De.done&&(Pe=Ie.return)&&Pe.call(Ie)}finally{if(fe)throw fe.error}}return Object.freeze(ae)},F.clone=function D(ae,fe){return void 0===fe&&(fe=!0),fe?C(ae):A(ae)},F.setProperty=function j(ae,fe,Pe){return f(ae,fe,Pe)},F.now=function z(){return Math.round(+new Date/1e3)},F.caller=function Z(ae){return ae.constructor.prototype.constructor.name},F.transliterate=function q(ae){return ae.split("").map(function(fe){return F.CyrillicDictionary[fe]||fe}).join("")},F.sortObjectKeys=function X(ae){var fe,Pe,Ae=Object.keys(ae).sort(),Ie={};try{for(var De=y(Ae),Te=De.next();!Te.done;Te=De.next()){var xe=Te.value;Ie[xe]=ae[xe]}}catch(Ge){fe={error:Ge}}finally{try{Te&&!Te.done&&(Pe=De.return)&&Pe.call(De)}finally{if(fe)throw fe.error}}return Ie},F.CyrillicDictionary={\u0410:"A",\u0411:"B",\u0412:"V",\u0413:"G",\u0414:"D",\u0415:"E",\u0416:"Zh",\u0417:"Z",\u0418:"I",\u0419:"Y",\u041a:"K",\u041b:"L",\u041c:"M",\u041d:"N",\u041e:"O",\u041f:"P",\u0420:"R",\u0421:"S",\u0422:"T",\u0423:"U",\u0424:"F",\u0425:"H",\u0426:"C",\u0427:"Ch",\u0428:"Sh",\u0429:"Sht",\u042a:"A",\u042c:"Y",\u042e:"Yu",\u042f:"Ya",\u0430:"a",\u0431:"b",\u0432:"v",\u0433:"g",\u0434:"d",\u0435:"e",\u0436:"zh",\u0437:"z",\u0438:"i",\u0439:"y",\u043a:"k",\u043b:"l",\u043c:"m",\u043d:"n",\u043e:"o",\u043f:"p",\u0440:"r",\u0441:"s",\u0442:"t",\u0443:"u",\u0444:"f",\u0445:"h",\u0446:"c",\u0447:"ch",\u0448:"sh",\u0449:"sht",\u044a:"a",\u044c:"y",\u044e:"yu",\u044f:"ya"}},36564:(Q,F,v)=>{"use strict";function y(f){for(var A in f)F.hasOwnProperty(A)||(F[A]=f[A])}Object.defineProperty(F,"__esModule",{value:!0}),y(v(76478)),y(v(12882)),y(v(90871)),y(v(67053)),y(v(58951)),y(v(25475))},58951:(Q,F)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var v=function(){function y(f){this.dictionary="ABCDEFGHJKLMNPQRUVWXYZ234689",this.setSettings(f)}return y.prototype.generate=function(f){void 0===f&&(f=1);var A=this.settings.dictionary||this.dictionary;this.settings.lowerCase&&(A=A.toLowerCase());for(var C=[],P=0;P<f;P++){for(var k="",O=0;O<this.settings.length;O++){var E=Math.floor(Math.random()*A.length);k+=A.substring(E,E+1)}C.push(""+this.settings.prefix+this.settings.delimiter+k.match(new RegExp(".{1,"+this.settings.groupLength+"}","g")).join(this.settings.delimiter))}return C},y.prototype.setSettings=function(f){this.settings={delimiter:f&&f.delimiter?f.delimiter:"",dictionary:f&&f.dictionary?f.dictionary:"",groupLength:f&&f.groupLength?f.groupLength:3,length:f&&f.length?f.length:6,prefix:f&&f.prefix?f.prefix:"",lowerCase:!(!f||void 0===f.lowerCase)&&f.lowerCase}},y}();F.RandomStringGenerator=v},12882:(Q,F)=>{"use strict";var y;Object.defineProperty(F,"__esModule",{value:!0}),(y=F.ESort||(F.ESort={})).Asc="asc",y.Desc="desc"},61425:(Q,F,v)=>{"use strict";v.d(F,{Gd:()=>x});var y=v(68907),f=v(50404),A=v(1826),C=v(14818);Q=v.hmd(Q);var P=3,E=function(){function j(z,Z,q){void 0===Z&&(Z=new C.s),void 0===q&&(q=P),this._version=q,this._stack=[],this._stack.push({client:z,scope:Z})}return j.prototype._invokeClient=function(z){for(var Z,q=[],X=1;X<arguments.length;X++)q[X-1]=arguments[X];var ae=this.getStackTop();ae&&ae.client&&ae.client[z]&&(Z=ae.client)[z].apply(Z,y.fl(q,[ae.scope]))},j.prototype.isOlderThan=function(z){return this._version<z},j.prototype.bindClient=function(z){this.getStackTop().client=z},j.prototype.pushScope=function(){var z=this.getStack(),q=C.s.clone(z.length>0?z[z.length-1].scope:void 0);return this.getStack().push({client:this.getClient(),scope:q}),q},j.prototype.popScope=function(){return void 0!==this.getStack().pop()},j.prototype.withScope=function(z){var Z=this.pushScope();try{z(Z)}finally{this.popScope()}},j.prototype.getClient=function(){return this.getStackTop().client},j.prototype.getScope=function(){return this.getStackTop().scope},j.prototype.getStack=function(){return this._stack},j.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},j.prototype.captureException=function(z,Z){var q=this._lastEventId=(0,f.DM)(),X=Z;if(!Z){var ae=void 0;try{throw new Error("Sentry syntheticException")}catch(fe){ae=fe}X={originalException:z,syntheticException:ae}}return this._invokeClient("captureException",z,y.pi({},X,{event_id:q})),q},j.prototype.captureMessage=function(z,Z,q){var X=this._lastEventId=(0,f.DM)(),ae=q;if(!q){var fe=void 0;try{throw new Error(z)}catch(Pe){fe=Pe}ae={originalException:z,syntheticException:fe}}return this._invokeClient("captureMessage",z,Z,y.pi({},ae,{event_id:X})),X},j.prototype.captureEvent=function(z,Z){var q=this._lastEventId=(0,f.DM)();return this._invokeClient("captureEvent",z,y.pi({},Z,{event_id:q})),q},j.prototype.lastEventId=function(){return this._lastEventId},j.prototype.addBreadcrumb=function(z,Z){var q=this.getStackTop();if(q.scope&&q.client){var X=q.client.getOptions&&q.client.getOptions()||{},ae=X.beforeBreadcrumb,fe=void 0===ae?null:ae,Pe=X.maxBreadcrumbs,Ae=void 0===Pe?30:Pe;if(!(Ae<=0)){var Ie=(new Date).getTime()/1e3,De=y.pi({timestamp:Ie},z),Te=fe?(0,f.Cf)(function(){return fe(De,Z)}):De;null!==Te&&q.scope.addBreadcrumb(Te,Math.min(Ae,100))}}},j.prototype.setUser=function(z){var Z=this.getStackTop();Z.scope&&Z.scope.setUser(z)},j.prototype.setTags=function(z){var Z=this.getStackTop();Z.scope&&Z.scope.setTags(z)},j.prototype.setExtras=function(z){var Z=this.getStackTop();Z.scope&&Z.scope.setExtras(z)},j.prototype.setTag=function(z,Z){var q=this.getStackTop();q.scope&&q.scope.setTag(z,Z)},j.prototype.setExtra=function(z,Z){var q=this.getStackTop();q.scope&&q.scope.setExtra(z,Z)},j.prototype.setContext=function(z,Z){var q=this.getStackTop();q.scope&&q.scope.setContext(z,Z)},j.prototype.configureScope=function(z){var Z=this.getStackTop();Z.scope&&Z.client&&z(Z.scope)},j.prototype.run=function(z){var Z=M(this);try{z(this)}finally{M(Z)}},j.prototype.getIntegration=function(z){var Z=this.getClient();if(!Z)return null;try{return Z.getIntegration(z)}catch(q){return A.k.warn("Cannot retrieve integration "+z.id+" from the current Hub"),null}},j.prototype.traceHeaders=function(){var z=this.getStackTop();if(z.scope&&z.client){var Z=z.scope.getSpan();if(Z)return{"sentry-trace":Z.toTraceparent()}}return{}},j}();function N(){var j=(0,f.Rf)();return j.__SENTRY__=j.__SENTRY__||{hub:void 0},j}function M(j){var z=N(),Z=L(z);return D(z,j),Z}function x(){var j=N();return(!S(j)||L(j).isOlderThan(P))&&D(j,new E),(0,f.KV)()?function I(j){try{var Z=(0,f.l$)(Q,"domain").active;if(!Z)return L(j);if(!S(Z)||L(Z).isOlderThan(P)){var q=L(j).getStackTop();D(Z,new E(q.client,C.s.clone(q.scope)))}return L(Z)}catch(X){return L(j)}}(j):L(j)}function S(j){return!!(j&&j.__SENTRY__&&j.__SENTRY__.hub)}function L(j){return j&&j.__SENTRY__&&j.__SENTRY__.hub||(j.__SENTRY__=j.__SENTRY__||{},j.__SENTRY__.hub=new E),j.__SENTRY__.hub}function D(j,z){return!!j&&(j.__SENTRY__=j.__SENTRY__||{},j.__SENTRY__.hub=z,!0)}},14818:(Q,F,v)=>{"use strict";v.d(F,{s:()=>E,c:()=>M});var y=v(68907),f=v(13100),A=v(23523),C=v(1611),P=v(50404),k=/^[ \t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \t]*$/,O=function(){function x(I,S,L,D){void 0===I&&(I=(0,P.DM)()),void 0===S&&(S=(0,P.DM)().substring(16)),this._traceId=I,this._spanId=S,this._sampled=L,this._parent=D}return x.prototype.setParent=function(I){return this._parent=I,this},x.prototype.setSampled=function(I){return this._sampled=I,this},x.fromTraceparent=function(I){var S=I.match(k);if(S){var L=void 0;"1"===S[3]?L=!0:"0"===S[3]&&(L=!1);var D=new x(S[1],S[2],L);return new x(S[1],void 0,L,D)}},x.prototype.toTraceparent=function(){var I="";return!0===this._sampled?I="-1":!1===this._sampled&&(I="-0"),this._traceId+"-"+this._spanId+I},x.prototype.toJSON=function(){return{parent:this._parent&&this._parent.toJSON()||void 0,sampled:this._sampled,span_id:this._spanId,trace_id:this._traceId}},x}(),E=function(){function x(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._context={}}return x.prototype.addScopeListener=function(I){this._scopeListeners.push(I)},x.prototype.addEventProcessor=function(I){return this._eventProcessors.push(I),this},x.prototype._notifyScopeListeners=function(){var I=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout(function(){I._scopeListeners.forEach(function(S){S(I)}),I._notifyingListeners=!1}))},x.prototype._notifyEventProcessors=function(I,S,L,D){var j=this;return void 0===D&&(D=0),new f.c(function(z,Z){var q=I[D];if(null===S||"function"!=typeof q)z(S);else{var X=q(y.pi({},S),L);(0,A.J8)(X)?X.then(function(ae){return j._notifyEventProcessors(I,ae,L,D+1).then(z)}).then(null,Z):j._notifyEventProcessors(I,X,L,D+1).then(z).then(null,Z)}})},x.prototype.setUser=function(I){return this._user=(0,C.Fv)(I),this._notifyScopeListeners(),this},x.prototype.setTags=function(I){return this._tags=y.pi({},this._tags,(0,C.Fv)(I)),this._notifyScopeListeners(),this},x.prototype.setTag=function(I,S){var L;return this._tags=y.pi({},this._tags,((L={})[I]=(0,C.Fv)(S),L)),this._notifyScopeListeners(),this},x.prototype.setExtras=function(I){return this._extra=y.pi({},this._extra,(0,C.Fv)(I)),this._notifyScopeListeners(),this},x.prototype.setExtra=function(I,S){var L;return this._extra=y.pi({},this._extra,((L={})[I]=(0,C.Fv)(S),L)),this._notifyScopeListeners(),this},x.prototype.setFingerprint=function(I){return this._fingerprint=(0,C.Fv)(I),this._notifyScopeListeners(),this},x.prototype.setLevel=function(I){return this._level=(0,C.Fv)(I),this._notifyScopeListeners(),this},x.prototype.setTransaction=function(I){return this._transaction=I,this._notifyScopeListeners(),this},x.prototype.setContext=function(I,S){return this._context[I]=S?(0,C.Fv)(S):void 0,this._notifyScopeListeners(),this},x.prototype.setSpan=function(I){return this._span=I,this._notifyScopeListeners(),this},x.prototype.startSpan=function(I){var S=new O;return S.setParent(I),this.setSpan(S),S},x.prototype.getSpan=function(){return this._span},x.clone=function(I){var S=new x;return I&&(S._breadcrumbs=y.fl(I._breadcrumbs),S._tags=y.pi({},I._tags),S._extra=y.pi({},I._extra),S._context=y.pi({},I._context),S._user=I._user,S._level=I._level,S._span=I._span,S._transaction=I._transaction,S._fingerprint=I._fingerprint,S._eventProcessors=y.fl(I._eventProcessors)),S},x.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._context={},this._level=void 0,this._transaction=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},x.prototype.addBreadcrumb=function(I,S){var L=(new Date).getTime()/1e3,D=y.pi({timestamp:L},I);return this._breadcrumbs=void 0!==S&&S>=0?y.fl(this._breadcrumbs,[(0,C.Fv)(D)]).slice(-S):y.fl(this._breadcrumbs,[(0,C.Fv)(D)]),this._notifyScopeListeners(),this},x.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},x.prototype._applyFingerprint=function(I){I.fingerprint=I.fingerprint?Array.isArray(I.fingerprint)?I.fingerprint:[I.fingerprint]:[],this._fingerprint&&(I.fingerprint=I.fingerprint.concat(this._fingerprint)),I.fingerprint&&!I.fingerprint.length&&delete I.fingerprint},x.prototype.applyToEvent=function(I,S){return this._extra&&Object.keys(this._extra).length&&(I.extra=y.pi({},this._extra,I.extra)),this._tags&&Object.keys(this._tags).length&&(I.tags=y.pi({},this._tags,I.tags)),this._user&&Object.keys(this._user).length&&(I.user=y.pi({},this._user,I.user)),this._context&&Object.keys(this._context).length&&(I.contexts=y.pi({},this._context,I.contexts)),this._level&&(I.level=this._level),this._transaction&&(I.transaction=this._transaction),this._span&&(I.contexts=I.contexts||{},I.contexts.trace=this._span),this._applyFingerprint(I),I.breadcrumbs=y.fl(I.breadcrumbs||[],this._breadcrumbs),I.breadcrumbs=I.breadcrumbs.length>0?I.breadcrumbs:void 0,this._notifyEventProcessors(y.fl(N(),this._eventProcessors),I,S)},x}();function N(){var x=(0,P.Rf)();return x.__SENTRY__=x.__SENTRY__||{},x.__SENTRY__.globalEventProcessors=x.__SENTRY__.globalEventProcessors||[],x.__SENTRY__.globalEventProcessors}function M(x){N().push(x)}},23523:(Q,F,v)=>{"use strict";function y(S){switch(Object.prototype.toString.call(S)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return S instanceof Error}}function f(S){return"[object ErrorEvent]"===Object.prototype.toString.call(S)}function A(S){return"[object DOMError]"===Object.prototype.toString.call(S)}function C(S){return"[object DOMException]"===Object.prototype.toString.call(S)}function P(S){return"[object String]"===Object.prototype.toString.call(S)}function k(S){return null===S||"object"!=typeof S&&"function"!=typeof S}function O(S){return"[object Object]"===Object.prototype.toString.call(S)}function E(S){return typeof Event<"u"&&S instanceof Event}function N(S){return typeof Element<"u"&&S instanceof Element}function M(S){return"[object RegExp]"===Object.prototype.toString.call(S)}function x(S){return!(!S||!S.then||"function"!=typeof S.then)}function I(S){return O(S)&&"nativeEvent"in S&&"preventDefault"in S&&"stopPropagation"in S}v.d(F,{Cy:()=>I,HD:()=>P,J8:()=>x,Kj:()=>M,PO:()=>O,TX:()=>A,VW:()=>f,VZ:()=>y,cO:()=>E,fm:()=>C,kK:()=>N,pt:()=>k})},1826:(Q,F,v)=>{"use strict";v.d(F,{k:()=>P});var y=v(50404),f=(0,y.Rf)(),A="Sentry Logger ",C=function(){function k(){this._enabled=!1}return k.prototype.disable=function(){this._enabled=!1},k.prototype.enable=function(){this._enabled=!0},k.prototype.log=function(){for(var O=[],E=0;E<arguments.length;E++)O[E]=arguments[E];this._enabled&&(0,y.Cf)(function(){f.console.log(A+"[Log]: "+O.join(" "))})},k.prototype.warn=function(){for(var O=[],E=0;E<arguments.length;E++)O[E]=arguments[E];this._enabled&&(0,y.Cf)(function(){f.console.warn(A+"[Warn]: "+O.join(" "))})},k.prototype.error=function(){for(var O=[],E=0;E<arguments.length;E++)O[E]=arguments[E];this._enabled&&(0,y.Cf)(function(){f.console.error(A+"[Error]: "+O.join(" "))})},k}();f.__SENTRY__=f.__SENTRY__||{};var P=f.__SENTRY__.logger||(f.__SENTRY__.logger=new C)},50404:(Q,F,v)=>{"use strict";v.d(F,{Cf:()=>N,DM:()=>k,Db:()=>M,EG:()=>x,KV:()=>A,Rf:()=>P,Rt:()=>S,en:()=>O,jH:()=>E,l$:()=>f,l4:()=>I});var y=v(23523);function f(D,j){return D.require(j)}function A(){return"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}var C={};function P(){return A()?v.g:typeof window<"u"?window:typeof self<"u"?self:C}function k(){var D=P(),j=D.crypto||D.msCrypto;if(void 0!==j&&j.getRandomValues){var z=new Uint16Array(8);j.getRandomValues(z),z[3]=4095&z[3]|16384,z[4]=16383&z[4]|32768;var Z=function(q){for(var X=q.toString(16);X.length<4;)X="0"+X;return X};return Z(z[0])+Z(z[1])+Z(z[2])+Z(z[3])+Z(z[4])+Z(z[5])+Z(z[6])+Z(z[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(q){var X=16*Math.random()|0;return("x"===q?X:3&X|8).toString(16)})}function O(D){if(!D)return{};var j=D.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return j?{host:j[4],path:j[5],protocol:j[2],relative:j[5]+(j[6]||"")+(j[8]||"")}:{}}function E(D){if(D.message)return D.message;if(D.exception&&D.exception.values&&D.exception.values[0]){var j=D.exception.values[0];return j.type&&j.value?j.type+": "+j.value:j.type||j.value||D.event_id||"<unknown>"}return D.event_id||"<unknown>"}function N(D){var j=P();if(!("console"in j))return D();var Z=j.console,q={};["debug","info","warn","error","log","assert"].forEach(function(ae){ae in j.console&&Z[ae].__sentry__&&(q[ae]=Z[ae].__sentry_wrapped__,Z[ae]=Z[ae].__sentry_original__)});var X=D();return Object.keys(q).forEach(function(ae){Z[ae]=q[ae]}),X}function M(D,j,z){D.exception=D.exception||{},D.exception.values=D.exception.values||[],D.exception.values[0]=D.exception.values[0]||{},D.exception.values[0].value=D.exception.values[0].value||j||"",D.exception.values[0].type=D.exception.values[0].type||z||"Error"}function x(D,j){void 0===j&&(j={});try{D.exception.values[0].mechanism=D.exception.values[0].mechanism||{},Object.keys(j).forEach(function(z){D.exception.values[0].mechanism[z]=j[z]})}catch(z){}}function I(){try{return document.location.href}catch(D){return""}}function S(D){try{for(var j=D,q=[],X=0,ae=0,Ae=void 0;j&&X++<5&&!("html"===(Ae=L(j))||X>1&&ae+3*q.length+Ae.length>=80);)q.push(Ae),ae+=Ae.length,j=j.parentNode;return q.reverse().join(" > ")}catch(Ie){return"<unknown>"}}function L(D){var z,Z,q,X,ae,j=[];if(!D||!D.tagName)return"";if(j.push(D.tagName.toLowerCase()),D.id&&j.push("#"+D.id),(z=D.className)&&(0,y.HD)(z))for(Z=z.split(/\s+/),ae=0;ae<Z.length;ae++)j.push("."+Z[ae]);var fe=["type","name","title","alt"];for(ae=0;ae<fe.length;ae++)(X=D.getAttribute(q=fe[ae]))&&j.push("["+q+'="'+X+'"]');return j.join("")}},1611:(Q,F,v)=>{"use strict";v.d(F,{zf:()=>D,hl:()=>P,Fv:()=>L,Qy:()=>M,_j:()=>k});var y=v(23523),f=function(){function j(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return j.prototype.memoize=function(z){if(this._hasWeakSet)return!!this._inner.has(z)||(this._inner.add(z),!1);for(var Z=0;Z<this._inner.length;Z++)if(this._inner[Z]===z)return!0;return this._inner.push(z),!1},j.prototype.unmemoize=function(z){if(this._hasWeakSet)this._inner.delete(z);else for(var Z=0;Z<this._inner.length;Z++)if(this._inner[Z]===z){this._inner.splice(Z,1);break}},j}(),A=v(50404),C=v(40313);function P(j,z,Z){if(z in j){var q=j[z],X=Z(q);if("function"==typeof X)try{X.prototype=X.prototype||{},Object.defineProperties(X,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:q},__sentry_wrapped__:{enumerable:!1,value:X}})}catch(ae){}j[z]=X}}function k(j){return Object.keys(j).map(function(z){return encodeURIComponent(z)+"="+encodeURIComponent(j[z])}).join("&")}function O(j){if((0,y.VZ)(j)){var z=j,Z={message:z.message,name:z.name,stack:z.stack};for(var q in z)Object.prototype.hasOwnProperty.call(z,q)&&(Z[q]=z[q]);return Z}if((0,y.cO)(j)){var X={};X.type=j.type;try{X.target=(0,y.kK)(j.target)?(0,A.Rt)(j.target):Object.prototype.toString.call(j.target)}catch(ae){X.target="<unknown>"}try{X.currentTarget=(0,y.kK)(j.currentTarget)?(0,A.Rt)(j.currentTarget):Object.prototype.toString.call(j.currentTarget)}catch(ae){X.currentTarget="<unknown>"}for(var q in typeof CustomEvent<"u"&&j instanceof CustomEvent&&(X.detail=j.detail),j)Object.prototype.hasOwnProperty.call(j,q)&&(X[q]=j[q]);return X}return j}function M(j,z,Z){void 0===z&&(z=3),void 0===Z&&(Z=102400);var q=L(j,z);return function N(j){return function E(j){return~-encodeURI(j).split(/%..|./).length}(JSON.stringify(j))}(q)>Z?M(j,z-1,Z):q}function I(j,z){return"domain"===z&&"object"==typeof j&&j._events?"[Domain]":"domainEmitter"===z?"[DomainEmitter]":typeof v.g<"u"&&j===v.g?"[Global]":typeof window<"u"&&j===window?"[Window]":typeof document<"u"&&j===document?"[Document]":(0,y.Cy)(j)?"[SyntheticEvent]":"number"==typeof j&&j!=j?"[NaN]":void 0===j?"[undefined]":"function"==typeof j?"[Function: "+(j.name||"<unknown-function-name>")+"]":j}function S(j,z,Z,q){if(void 0===Z&&(Z=1/0),void 0===q&&(q=new f),0===Z)return function x(j){var z=Object.prototype.toString.call(j);if("string"==typeof j)return j;if("[object Object]"===z)return"[Object]";if("[object Array]"===z)return"[Array]";var Z=I(j);return(0,y.pt)(Z)?Z:z}(z);if(null!=z&&"function"==typeof z.toJSON)return z.toJSON();var X=I(z,j);if((0,y.pt)(X))return X;var ae=O(z),fe=Array.isArray(z)?[]:{};if(q.memoize(z))return"[Circular ~]";for(var Pe in ae)Object.prototype.hasOwnProperty.call(ae,Pe)&&(fe[Pe]=S(Pe,ae[Pe],Z-1,q));return q.unmemoize(z),fe}function L(j,z){try{return JSON.parse(JSON.stringify(j,function(Z,q){return S(Z,q,z)}))}catch(Z){return"**non-serializable**"}}function D(j,z){void 0===z&&(z=40);var Z=Object.keys(O(j));if(Z.sort(),!Z.length)return"[object has no keys]";if(Z[0].length>=z)return(0,C.$G)(Z[0],z);for(var q=Z.length;q>0;q--){var X=Z.slice(0,q).join(", ");if(!(X.length>z))return q===Z.length?X:(0,C.$G)(X,z)}return""}},40313:(Q,F,v)=>{"use strict";v.d(F,{$G:()=>f,nK:()=>C,zC:()=>P});var y=v(23523);function f(k,O){return void 0===O&&(O=0),"string"!=typeof k||0===O||k.length<=O?k:k.substr(0,O)+"..."}function C(k,O){if(!Array.isArray(k))return"";for(var E=[],N=0;N<k.length;N++){var M=k[N];try{E.push(String(M))}catch(x){E.push("[value cannot be serialized]")}}return E.join(O)}function P(k,O){return(0,y.Kj)(O)?O.test(k):"string"==typeof O&&-1!==k.indexOf(O)}},13100:(Q,F,v)=>{"use strict";v.d(F,{c:()=>A});var y=v(23523),f=function(C){return C.PENDING="PENDING",C.RESOLVED="RESOLVED",C.REJECTED="REJECTED",C}(f||{}),A=function(){function C(P){var k=this;this._state=f.PENDING,this._handlers=[],this._resolve=function(O){k._setResult(f.RESOLVED,O)},this._reject=function(O){k._setResult(f.REJECTED,O)},this._setResult=function(O,E){if(k._state===f.PENDING){if((0,y.J8)(E))return void E.then(k._resolve,k._reject);k._state=O,k._value=E,k._executeHandlers()}},this._attachHandler=function(O){k._handlers=k._handlers.concat(O),k._executeHandlers()},this._executeHandlers=function(){k._state!==f.PENDING&&(k._handlers.forEach(k._state===f.REJECTED?function(O){O.onrejected&&O.onrejected(k._value)}:function(O){O.onfulfilled&&O.onfulfilled(k._value)}),k._handlers=[])};try{P(this._resolve,this._reject)}catch(O){this._reject(O)}}return C.prototype.toString=function(){return"[object SyncPromise]"},C.resolve=function(P){return new C(function(k){k(P)})},C.reject=function(P){return new C(function(k,O){O(P)})},C.all=function(P){return new C(function(k,O){if(Array.isArray(P))if(0!==P.length){var E=P.length,N=[];P.forEach(function(M,x){C.resolve(M).then(function(I){N[x]=I,0==(E-=1)&&k(N)}).then(null,O)})}else k([]);else O(new TypeError("Promise.all requires an array as input."))})},C.prototype.then=function(P,k){var O=this;return new C(function(E,N){O._attachHandler({onfulfilled:function(M){if(P)try{return void E(P(M))}catch(x){return void N(x)}else E(M)},onrejected:function(M){if(k)try{return void E(k(M))}catch(x){return void N(x)}else N(M)}})})},C.prototype.catch=function(P){return this.then(function(k){return k},P)},C.prototype.finally=function(P){var k=this;return new C(function(O,E){var N,M;return k.then(function(x){M=!1,N=x,P&&P()},function(x){M=!0,N=x,P&&P()}).then(function(){M?E(N):O(N)})})},C}()},83581:Q=>{function v(){}Q.exports=function F(y,f,A){var C=!1;return A=A||v,P.count=y,0===y?f():P;function P(k,O){if(P.count<=0)throw new Error("after called too many times");--P.count,k?(C=!0,f(k),f=A):0===P.count&&!C&&f(null,O)}}},4535:Q=>{Q.exports=function(F,v,y){var f=F.byteLength;if(v=v||0,y=y||f,F.slice)return F.slice(v,y);if(v<0&&(v+=f),y<0&&(y+=f),y>f&&(y=f),v>=f||v>=y||0===f)return new ArrayBuffer(0);for(var A=new Uint8Array(F),C=new Uint8Array(y-v),P=v,k=0;P<y;P++,k++)C[k]=A[P];return C.buffer}},56625:Q=>{function F(v){this.ms=(v=v||{}).min||100,this.max=v.max||1e4,this.factor=v.factor||2,this.jitter=v.jitter>0&&v.jitter<=1?v.jitter:0,this.attempts=0}Q.exports=F,F.prototype.duration=function(){var v=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var y=Math.random(),f=Math.floor(y*this.jitter*v);v=1&Math.floor(10*y)?v+f:v-f}return 0|Math.min(v,this.max)},F.prototype.reset=function(){this.attempts=0},F.prototype.setMin=function(v){this.ms=v},F.prototype.setMax=function(v){this.max=v},F.prototype.setJitter=function(v){this.jitter=v}},36072:(Q,F)=>{!function(){"use strict";for(var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=new Uint8Array(256),f=0;f<64;f++)y[v.charCodeAt(f)]=f;F.encode=function(A){var P,C=new Uint8Array(A),k=C.length,O="";for(P=0;P<k;P+=3)O+=v[C[P]>>2],O+=v[(3&C[P])<<4|C[P+1]>>4],O+=v[(15&C[P+1])<<2|C[P+2]>>6],O+=v[63&C[P+2]];return k%3==2?O=O.substring(0,O.length-1)+"=":k%3==1&&(O=O.substring(0,O.length-2)+"=="),O},F.decode=function(A){var k,E,N,M,x,C=.75*A.length,P=A.length,O=0;"="===A[A.length-1]&&(C--,"="===A[A.length-2]&&C--);var I=new ArrayBuffer(C),S=new Uint8Array(I);for(k=0;k<P;k+=4)E=y[A.charCodeAt(k)],N=y[A.charCodeAt(k+1)],M=y[A.charCodeAt(k+2)],x=y[A.charCodeAt(k+3)],S[O++]=E<<2|N>>4,S[O++]=(15&N)<<4|M>>2,S[O++]=(3&M)<<6|63&x;return I}}()},83385:Q=>{var F=typeof F<"u"?F:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"&&MozBlobBuilder,v=function(){try{return 2===new Blob(["hi"]).size}catch(O){return!1}}(),y=v&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(O){return!1}}(),f=F&&F.prototype.append&&F.prototype.getBlob;function A(k){return k.map(function(O){if(O.buffer instanceof ArrayBuffer){var E=O.buffer;if(O.byteLength!==E.byteLength){var N=new Uint8Array(O.byteLength);N.set(new Uint8Array(E,O.byteOffset,O.byteLength)),E=N.buffer}return E}return O})}function C(k,O){O=O||{};var E=new F;return A(k).forEach(function(N){E.append(N)}),O.type?E.getBlob(O.type):E.getBlob()}function P(k,O){return new Blob(A(k),O||{})}typeof Blob<"u"&&(C.prototype=Blob.prototype,P.prototype=Blob.prototype),Q.exports=v?y?Blob:P:f?C:void 0},57951:Q=>{var F=[].slice;Q.exports=function(v,y){if("string"==typeof y&&(y=v[y]),"function"!=typeof y)throw new Error("bind() requires a function");var f=F.call(arguments,2);return function(){return y.apply(v,f.concat(F.call(arguments)))}}},85879:Q=>{function F(y){if(y)return function v(y){for(var f in F.prototype)y[f]=F.prototype[f];return y}(y)}Q.exports=F,F.prototype.on=F.prototype.addEventListener=function(y,f){return this._callbacks=this._callbacks||{},(this._callbacks["$"+y]=this._callbacks["$"+y]||[]).push(f),this},F.prototype.once=function(y,f){function A(){this.off(y,A),f.apply(this,arguments)}return A.fn=f,this.on(y,A),this},F.prototype.off=F.prototype.removeListener=F.prototype.removeAllListeners=F.prototype.removeEventListener=function(y,f){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var A=this._callbacks["$"+y];if(!A)return this;if(1==arguments.length)return delete this._callbacks["$"+y],this;for(var C,P=0;P<A.length;P++)if((C=A[P])===f||C.fn===f){A.splice(P,1);break}return this},F.prototype.emit=function(y){this._callbacks=this._callbacks||{};var f=[].slice.call(arguments,1),A=this._callbacks["$"+y];if(A)for(var C=0,P=(A=A.slice(0)).length;C<P;++C)A[C].apply(this,f);return this},F.prototype.listeners=function(y){return this._callbacks=this._callbacks||{},this._callbacks["$"+y]||[]},F.prototype.hasListeners=function(y){return!!this.listeners(y).length}},40353:Q=>{Q.exports=function(F,v){var y=function(){};y.prototype=v.prototype,F.prototype=new y,F.prototype.constructor=F}},10012:function(Q,F){var y,A,C,P,k,O,E,N,M,x,I,L,v;Q.exports=(v=v||(y=Math,A=Object.create||function(){function D(){}return function(j){var z;return D.prototype=j,z=new D,D.prototype=null,z}}(),P=(C={}).lib={},k=P.Base={extend:function(D){var j=A(this);return D&&j.mixIn(D),(!j.hasOwnProperty("init")||this.init===j.init)&&(j.init=function(){j.$super.init.apply(this,arguments)}),j.init.prototype=j,j.$super=this,j},create:function(){var D=this.extend();return D.init.apply(D,arguments),D},init:function(){},mixIn:function(D){for(var j in D)D.hasOwnProperty(j)&&(this[j]=D[j]);D.hasOwnProperty("toString")&&(this.toString=D.toString)},clone:function(){return this.init.prototype.extend(this)}},O=P.WordArray=k.extend({init:function(D,j){D=this.words=D||[],this.sigBytes=null!=j?j:4*D.length},toString:function(D){return(D||N).stringify(this)},concat:function(D){var j=this.words,z=D.words,Z=this.sigBytes,q=D.sigBytes;if(this.clamp(),Z%4)for(var X=0;X<q;X++)j[Z+X>>>2]|=(z[X>>>2]>>>24-X%4*8&255)<<24-(Z+X)%4*8;else for(X=0;X<q;X+=4)j[Z+X>>>2]=z[X>>>2];return this.sigBytes+=q,this},clamp:function(){var D=this.words,j=this.sigBytes;D[j>>>2]&=4294967295<<32-j%4*8,D.length=y.ceil(j/4)},clone:function(){var D=k.clone.call(this);return D.words=this.words.slice(0),D},random:function(D){for(var q,j=[],z=function(fe){var Pe=987654321,Ae=4294967295;return function(){var Ie=((Pe=36969*(65535&Pe)+(Pe>>16)&Ae)<<16)+(fe=18e3*(65535&fe)+(fe>>16)&Ae)&Ae;return Ie/=4294967296,(Ie+=.5)*(y.random()>.5?1:-1)}},Z=0;Z<D;Z+=4){var X=z(4294967296*(q||y.random()));q=987654071*X(),j.push(4294967296*X()|0)}return new O.init(j,D)}}),E=C.enc={},N=E.Hex={stringify:function(D){for(var j=D.words,z=D.sigBytes,Z=[],q=0;q<z;q++){var X=j[q>>>2]>>>24-q%4*8&255;Z.push((X>>>4).toString(16)),Z.push((15&X).toString(16))}return Z.join("")},parse:function(D){for(var j=D.length,z=[],Z=0;Z<j;Z+=2)z[Z>>>3]|=parseInt(D.substr(Z,2),16)<<24-Z%8*4;return new O.init(z,j/2)}},M=E.Latin1={stringify:function(D){for(var j=D.words,z=D.sigBytes,Z=[],q=0;q<z;q++)Z.push(String.fromCharCode(j[q>>>2]>>>24-q%4*8&255));return Z.join("")},parse:function(D){for(var j=D.length,z=[],Z=0;Z<j;Z++)z[Z>>>2]|=(255&D.charCodeAt(Z))<<24-Z%4*8;return new O.init(z,j)}},x=E.Utf8={stringify:function(D){try{return decodeURIComponent(escape(M.stringify(D)))}catch(j){throw new Error("Malformed UTF-8 data")}},parse:function(D){return M.parse(unescape(encodeURIComponent(D)))}},I=P.BufferedBlockAlgorithm=k.extend({reset:function(){this._data=new O.init,this._nDataBytes=0},_append:function(D){"string"==typeof D&&(D=x.parse(D)),this._data.concat(D),this._nDataBytes+=D.sigBytes},_process:function(D){var j=this._data,z=j.words,Z=j.sigBytes,q=this.blockSize,ae=Z/(4*q),fe=(ae=D?y.ceil(ae):y.max((0|ae)-this._minBufferSize,0))*q,Pe=y.min(4*fe,Z);if(fe){for(var Ae=0;Ae<fe;Ae+=q)this._doProcessBlock(z,Ae);var Ie=z.splice(0,fe);j.sigBytes-=Pe}return new O.init(Ie,Pe)},clone:function(){var D=k.clone.call(this);return D._data=this._data.clone(),D},_minBufferSize:0}),P.Hasher=I.extend({cfg:k.extend(),init:function(D){this.cfg=this.cfg.extend(D),this.reset()},reset:function(){I.reset.call(this),this._doReset()},update:function(D){return this._append(D),this._process(),this},finalize:function(D){return D&&this._append(D),this._doFinalize()},blockSize:16,_createHelper:function(D){return function(j,z){return new D.init(z).finalize(j)}},_createHmacHelper:function(D){return function(j,z){return new L.HMAC.init(D,z).finalize(j)}}}),L=C.algo={},C),v)},85506:function(Q,F,v){var y,C;Q.exports=(y=v(10012),C=y.lib.WordArray,y.enc.Base64={stringify:function(E){var N=E.words,M=E.sigBytes,x=this._map;E.clamp();for(var I=[],S=0;S<M;S+=3)for(var z=(N[S>>>2]>>>24-S%4*8&255)<<16|(N[S+1>>>2]>>>24-(S+1)%4*8&255)<<8|N[S+2>>>2]>>>24-(S+2)%4*8&255,Z=0;Z<4&&S+.75*Z<M;Z++)I.push(x.charAt(z>>>6*(3-Z)&63));var q=x.charAt(64);if(q)for(;I.length%4;)I.push(q);return I.join("")},parse:function(E){var N=E.length,M=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var I=0;I<M.length;I++)x[M.charCodeAt(I)]=I}var S=M.charAt(64);if(S){var L=E.indexOf(S);-1!==L&&(N=L)}return function O(E,N,M){for(var x=[],I=0,S=0;S<N;S++)if(S%4){var L=M[E.charCodeAt(S-1)]<<S%4*2,D=M[E.charCodeAt(S)]>>>6-S%4*2;x[I>>>2]|=(L|D)<<24-I%4*8,I++}return C.create(x,I)}(E,N,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},y.enc.Base64)},22406:function(Q,F,v){Q.exports=v(10012).enc.Hex},92873:function(Q,F,v){var y;Q.exports=(y=v(10012),function(f){var A=y,C=A.lib,P=C.WordArray,k=C.Hasher,O=A.algo,E=[];!function(){for(var L=0;L<64;L++)E[L]=4294967296*f.abs(f.sin(L+1))|0}();var N=O.MD5=k.extend({_doReset:function(){this._hash=new P.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(L,D){for(var j=0;j<16;j++){var z=D+j,Z=L[z];L[z]=16711935&(Z<<8|Z>>>24)|4278255360&(Z<<24|Z>>>8)}var q=this._hash.words,X=L[D+0],ae=L[D+1],fe=L[D+2],Pe=L[D+3],Ae=L[D+4],Ie=L[D+5],De=L[D+6],Te=L[D+7],xe=L[D+8],Ge=L[D+9],Ue=L[D+10],st=L[D+11],It=L[D+12],xt=L[D+13],gt=L[D+14],At=L[D+15],ht=q[0],dt=q[1],kt=q[2],St=q[3];ht=M(ht,dt,kt,St,X,7,E[0]),St=M(St,ht,dt,kt,ae,12,E[1]),kt=M(kt,St,ht,dt,fe,17,E[2]),dt=M(dt,kt,St,ht,Pe,22,E[3]),ht=M(ht,dt,kt,St,Ae,7,E[4]),St=M(St,ht,dt,kt,Ie,12,E[5]),kt=M(kt,St,ht,dt,De,17,E[6]),dt=M(dt,kt,St,ht,Te,22,E[7]),ht=M(ht,dt,kt,St,xe,7,E[8]),St=M(St,ht,dt,kt,Ge,12,E[9]),kt=M(kt,St,ht,dt,Ue,17,E[10]),dt=M(dt,kt,St,ht,st,22,E[11]),ht=M(ht,dt,kt,St,It,7,E[12]),St=M(St,ht,dt,kt,xt,12,E[13]),kt=M(kt,St,ht,dt,gt,17,E[14]),ht=x(ht,dt=M(dt,kt,St,ht,At,22,E[15]),kt,St,ae,5,E[16]),St=x(St,ht,dt,kt,De,9,E[17]),kt=x(kt,St,ht,dt,st,14,E[18]),dt=x(dt,kt,St,ht,X,20,E[19]),ht=x(ht,dt,kt,St,Ie,5,E[20]),St=x(St,ht,dt,kt,Ue,9,E[21]),kt=x(kt,St,ht,dt,At,14,E[22]),dt=x(dt,kt,St,ht,Ae,20,E[23]),ht=x(ht,dt,kt,St,Ge,5,E[24]),St=x(St,ht,dt,kt,gt,9,E[25]),kt=x(kt,St,ht,dt,Pe,14,E[26]),dt=x(dt,kt,St,ht,xe,20,E[27]),ht=x(ht,dt,kt,St,xt,5,E[28]),St=x(St,ht,dt,kt,fe,9,E[29]),kt=x(kt,St,ht,dt,Te,14,E[30]),ht=I(ht,dt=x(dt,kt,St,ht,It,20,E[31]),kt,St,Ie,4,E[32]),St=I(St,ht,dt,kt,xe,11,E[33]),kt=I(kt,St,ht,dt,st,16,E[34]),dt=I(dt,kt,St,ht,gt,23,E[35]),ht=I(ht,dt,kt,St,ae,4,E[36]),St=I(St,ht,dt,kt,Ae,11,E[37]),kt=I(kt,St,ht,dt,Te,16,E[38]),dt=I(dt,kt,St,ht,Ue,23,E[39]),ht=I(ht,dt,kt,St,xt,4,E[40]),St=I(St,ht,dt,kt,X,11,E[41]),kt=I(kt,St,ht,dt,Pe,16,E[42]),dt=I(dt,kt,St,ht,De,23,E[43]),ht=I(ht,dt,kt,St,Ge,4,E[44]),St=I(St,ht,dt,kt,It,11,E[45]),kt=I(kt,St,ht,dt,At,16,E[46]),ht=S(ht,dt=I(dt,kt,St,ht,fe,23,E[47]),kt,St,X,6,E[48]),St=S(St,ht,dt,kt,Te,10,E[49]),kt=S(kt,St,ht,dt,gt,15,E[50]),dt=S(dt,kt,St,ht,Ie,21,E[51]),ht=S(ht,dt,kt,St,It,6,E[52]),St=S(St,ht,dt,kt,Pe,10,E[53]),kt=S(kt,St,ht,dt,Ue,15,E[54]),dt=S(dt,kt,St,ht,ae,21,E[55]),ht=S(ht,dt,kt,St,xe,6,E[56]),St=S(St,ht,dt,kt,At,10,E[57]),kt=S(kt,St,ht,dt,De,15,E[58]),dt=S(dt,kt,St,ht,xt,21,E[59]),ht=S(ht,dt,kt,St,Ae,6,E[60]),St=S(St,ht,dt,kt,st,10,E[61]),kt=S(kt,St,ht,dt,fe,15,E[62]),dt=S(dt,kt,St,ht,Ge,21,E[63]),q[0]=q[0]+ht|0,q[1]=q[1]+dt|0,q[2]=q[2]+kt|0,q[3]=q[3]+St|0},_doFinalize:function(){var L=this._data,D=L.words,j=8*this._nDataBytes,z=8*L.sigBytes;D[z>>>5]|=128<<24-z%32;var Z=f.floor(j/4294967296),q=j;D[15+(z+64>>>9<<4)]=16711935&(Z<<8|Z>>>24)|4278255360&(Z<<24|Z>>>8),D[14+(z+64>>>9<<4)]=16711935&(q<<8|q>>>24)|4278255360&(q<<24|q>>>8),L.sigBytes=4*(D.length+1),this._process();for(var X=this._hash,ae=X.words,fe=0;fe<4;fe++){var Pe=ae[fe];ae[fe]=16711935&(Pe<<8|Pe>>>24)|4278255360&(Pe<<24|Pe>>>8)}return X},clone:function(){var L=k.clone.call(this);return L._hash=this._hash.clone(),L}});function M(L,D,j,z,Z,q,X){var ae=L+(D&j|~D&z)+Z+X;return(ae<<q|ae>>>32-q)+D}function x(L,D,j,z,Z,q,X){var ae=L+(D&z|j&~z)+Z+X;return(ae<<q|ae>>>32-q)+D}function I(L,D,j,z,Z,q,X){var ae=L+(D^j^z)+Z+X;return(ae<<q|ae>>>32-q)+D}function S(L,D,j,z,Z,q,X){var ae=L+(j^(D|~z))+Z+X;return(ae<<q|ae>>>32-q)+D}A.MD5=k._createHelper(N),A.HmacMD5=k._createHmacHelper(N)}(Math),y.MD5)},32078:function(Q,F,v){var y;Q.exports=(y=v(10012),function(f){var A=y,C=A.lib,P=C.WordArray,k=C.Hasher,O=A.algo,E=[],N=[];!function(){function I(j){for(var z=f.sqrt(j),Z=2;Z<=z;Z++)if(!(j%Z))return!1;return!0}function S(j){return 4294967296*(j-(0|j))|0}for(var L=2,D=0;D<64;)I(L)&&(D<8&&(E[D]=S(f.pow(L,.5))),N[D]=S(f.pow(L,.3333333333333333)),D++),L++}();var M=[],x=O.SHA256=k.extend({_doReset:function(){this._hash=new P.init(E.slice(0))},_doProcessBlock:function(I,S){for(var L=this._hash.words,D=L[0],j=L[1],z=L[2],Z=L[3],q=L[4],X=L[5],ae=L[6],fe=L[7],Pe=0;Pe<64;Pe++){if(Pe<16)M[Pe]=0|I[S+Pe];else{var Ae=M[Pe-15],De=M[Pe-2];M[Pe]=((Ae<<25|Ae>>>7)^(Ae<<14|Ae>>>18)^Ae>>>3)+M[Pe-7]+((De<<15|De>>>17)^(De<<13|De>>>19)^De>>>10)+M[Pe-16]}var Ge=D&j^D&z^j&z,It=fe+((q<<26|q>>>6)^(q<<21|q>>>11)^(q<<7|q>>>25))+(q&X^~q&ae)+N[Pe]+M[Pe];fe=ae,ae=X,X=q,q=Z+It|0,Z=z,z=j,j=D,D=It+(((D<<30|D>>>2)^(D<<19|D>>>13)^(D<<10|D>>>22))+Ge)|0}L[0]=L[0]+D|0,L[1]=L[1]+j|0,L[2]=L[2]+z|0,L[3]=L[3]+Z|0,L[4]=L[4]+q|0,L[5]=L[5]+X|0,L[6]=L[6]+ae|0,L[7]=L[7]+fe|0},_doFinalize:function(){var I=this._data,S=I.words,L=8*this._nDataBytes,D=8*I.sigBytes;return S[D>>>5]|=128<<24-D%32,S[14+(D+64>>>9<<4)]=f.floor(L/4294967296),S[15+(D+64>>>9<<4)]=L,I.sigBytes=4*S.length,this._process(),this._hash},clone:function(){var I=k.clone.call(this);return I._hash=this._hash.clone(),I}});A.SHA256=k._createHelper(x),A.HmacSHA256=k._createHmacHelper(x)}(Math),y.SHA256)},20563:(Q,F,v)=>{function P(){var O;try{O=F.storage.debug}catch(E){}return!O&&typeof process<"u"&&"env"in process&&(O=process.env.DEBUG),O}(F=Q.exports=v(33597)).log=function A(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},F.formatArgs=function f(O){var E=this.useColors;if(O[0]=(E?"%c":"")+this.namespace+(E?" %c":" ")+O[0]+(E?"%c ":" ")+"+"+F.humanize(this.diff),E){var N="color: "+this.color;O.splice(1,0,N,"color: inherit");var M=0,x=0;O[0].replace(/%[a-zA-Z%]/g,function(I){"%%"!==I&&(M++,"%c"===I&&(x=M))}),O.splice(x,0,N)}},F.save=function C(O){try{null==O?F.storage.removeItem("debug"):F.storage.debug=O}catch(E){}},F.load=P,F.useColors=function y(){return!!(typeof window<"u"&&window.process&&"renderer"===window.process.type)||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},F.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:function k(){try{return window.localStorage}catch(O){}}(),F.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],F.formatters.j=function(O){try{return JSON.stringify(O)}catch(E){return"[UnexpectedJSONParseError]: "+E.message}},F.enable(P())},33597:(Q,F,v)=>{function f(E){var N;function M(){if(M.enabled){var x=M,I=+new Date;x.diff=I-(N||I),x.prev=N,x.curr=I,N=I;for(var L=new Array(arguments.length),D=0;D<L.length;D++)L[D]=arguments[D];L[0]=F.coerce(L[0]),"string"!=typeof L[0]&&L.unshift("%O");var j=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,function(Z,q){if("%%"===Z)return Z;j++;var X=F.formatters[q];return"function"==typeof X&&(Z=X.call(x,L[j]),L.splice(j,1),j--),Z}),F.formatArgs.call(x,L),(M.log||F.log||console.log.bind(console)).apply(x,L)}}return M.namespace=E,M.enabled=F.enabled(E),M.useColors=F.useColors(),M.color=function y(E){var M,N=0;for(M in E)N=(N<<5)-N+E.charCodeAt(M),N|=0;return F.colors[Math.abs(N)%F.colors.length]}(E),M.destroy=A,"function"==typeof F.init&&F.init(M),F.instances.push(M),M}function A(){var E=F.instances.indexOf(this);return-1!==E&&(F.instances.splice(E,1),!0)}(F=Q.exports=f.debug=f.default=f).coerce=function O(E){return E instanceof Error?E.stack||E.message:E},F.disable=function P(){F.enable("")},F.enable=function C(E){F.save(E),F.names=[],F.skips=[];var N,M=("string"==typeof E?E:"").split(/[\s,]+/),x=M.length;for(N=0;N<x;N++)M[N]&&("-"===(E=M[N].replace(/\*/g,".*?"))[0]?F.skips.push(new RegExp("^"+E.substr(1)+"$")):F.names.push(new RegExp("^"+E+"$")));for(N=0;N<F.instances.length;N++){var I=F.instances[N];I.enabled=F.enabled(I.namespace)}},F.enabled=function k(E){if("*"===E[E.length-1])return!0;var N,M;for(N=0,M=F.skips.length;N<M;N++)if(F.skips[N].test(E))return!1;for(N=0,M=F.names.length;N<M;N++)if(F.names[N].test(E))return!0;return!1},F.humanize=v(67253),F.instances=[],F.names=[],F.skips=[],F.formatters={}},70896:function(Q){Q.exports=function(){"use strict";var F=Object.freeze||function(gt){return gt},v=F(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),y=F(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),f=F(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),A=F(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),C=F(["#text"]),P=Object.freeze||function(gt){return gt},k=P(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","minlength","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"]),O=P(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),E=P(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),N=P(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),M=Object.hasOwnProperty,x=Object.setPrototypeOf,S=(typeof Reflect<"u"&&Reflect).apply;function L(gt,At){x&&x(gt,null);for(var ht=At.length;ht--;){var dt=At[ht];if("string"==typeof dt){var kt=dt.toLowerCase();kt!==dt&&(Object.isFrozen(At)||(At[ht]=kt),dt=kt)}gt[dt]=!0}return gt}function D(gt){var At={},ht=void 0;for(ht in gt)S(M,gt,[ht])&&(At[ht]=gt[ht]);return At}S||(S=function(At,ht,dt){return At.apply(ht,dt)});var j=Object.seal||function(gt){return gt},z=j(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Z=j(/<%[\s\S]*|[\s\S]*%>/gm),q=j(/^data-[\-\w.\u00B7-\uFFFF]/),X=j(/^aria-[\-\w]+$/),ae=j(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fe=j(/^(?:\w+script|data):/i),Pe=j(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(gt){return typeof gt}:function(gt){return gt&&"function"==typeof Symbol&&gt.constructor===Symbol&&gt!==Symbol.prototype?"symbol":typeof gt};function Ie(gt){if(Array.isArray(gt)){for(var At=0,ht=Array(gt.length);At<gt.length;At++)ht[At]=gt[At];return ht}return Array.from(gt)}var Te=(typeof Reflect<"u"&&Reflect).apply,xe=Array.prototype.slice,Ge=Object.freeze;Te||(Te=function(At,ht,dt){return At.apply(ht,dt)});return function It(){var gt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window,At=function(Ct){return It(Ct)};if(At.version="2.0.7",At.removed=[],!gt||!gt.document||9!==gt.document.nodeType)return At.isSupported=!1,At;var ht=gt.document,dt=!1,kt=!1,St=gt.document,$i=gt.DocumentFragment,wo=gt.Node,uc=gt.NodeFilter,gr=gt.NamedNodeMap,Rr=void 0===gr?gt.NamedNodeMap||gt.MozNamedAttrMap:gr,Le=gt.Text,tt=gt.Comment,_t=gt.DOMParser,ut=gt.TrustedTypes;if("function"==typeof gt.HTMLTemplateElement){var Wt=St.createElement("template");Wt.content&&Wt.content.ownerDocument&&(St=Wt.content.ownerDocument)}var Bt=function(At,ht){if("object"!==(typeof At>"u"?"undefined":Ae(At))||"function"!=typeof At.createPolicy)return null;var dt=null,kt="data-tt-policy-suffix";ht.currentScript&&ht.currentScript.hasAttribute(kt)&&(dt=ht.currentScript.getAttribute(kt));var St="dompurify"+(dt?"#"+dt:"");try{return At.createPolicy(St,{createHTML:function(Xr){return Xr}})}catch($i){return console.warn("TrustedTypes policy "+St+" could not be created."),null}}(ut,ht),On=Bt?Bt.createHTML(""):"",zn=St.implementation,Gr=St.createNodeIterator,ua=St.getElementsByTagName,gi=St.createDocumentFragment,si=ht.importNode,To={};At.isSupported=zn&&typeof zn.createHTMLDocument<"u"&&9!==St.documentMode;var sr=z,da=Z,ms=q,_d=X,$a=fe,xs=Pe,Ra=ae,oa=null,Zc=L({},[].concat(Ie(v),Ie(y),Ie(f),Ie(A),Ie(C))),_r=null,Oc=L({},[].concat(Ie(k),Ie(O),Ie(E),Ie(N))),th=null,Du=null,nh=!0,xf=!0,vd=!1,jg=!1,Bu=!1,ka=!1,dp=!1,pp=!1,ao=!1,bd=!1,Fl=!1,cm=!1,Hg=!0,sn=!0,Cd=!1,Qn={},lm=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),vr=L({},["audio","video","img","source","image"]),eo=null,ih=L({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),jn=null,qg=St.createElement("form"),oh=function(Ct){jn&&jn===Ct||((!Ct||"object"!==(typeof Ct>"u"?"undefined":Ae(Ct)))&&(Ct={}),oa="ALLOWED_TAGS"in Ct?L({},Ct.ALLOWED_TAGS):Zc,_r="ALLOWED_ATTR"in Ct?L({},Ct.ALLOWED_ATTR):Oc,eo="ADD_URI_SAFE_ATTR"in Ct?L(D(ih),Ct.ADD_URI_SAFE_ATTR):ih,th="FORBID_TAGS"in Ct?L({},Ct.FORBID_TAGS):{},Du="FORBID_ATTR"in Ct?L({},Ct.FORBID_ATTR):{},nh=!1!==Ct.ALLOW_ARIA_ATTR,xf=!1!==Ct.ALLOW_DATA_ATTR,vd=Ct.ALLOW_UNKNOWN_PROTOCOLS||!1,jg=Ct.SAFE_FOR_JQUERY||!1,ka=Ct.WHOLE_DOCUMENT||!1,ao=Ct.RETURN_DOM||!1,Fl=Ct.RETURN_DOM_IMPORT||!1,cm=Ct.RETURN_TRUSTED_TYPE||!1,pp=Ct.FORCE_BODY||!1,Hg=!1!==Ct.SANITIZE_DOM,sn=!1!==Ct.KEEP_CONTENT,Cd=Ct.IN_PLACE||!1,Ra=Ct.ALLOWED_URI_REGEXP||Ra,(Bu=Ct.SAFE_FOR_TEMPLATES||!1)&&(xf=!1),(bd=Ct.RETURN_DOM_FRAGMENT||!1)&&(ao=!0),(Qn="USE_PROFILES"in Ct&&Ct.USE_PROFILES)&&(oa=L({},[].concat(Ie(C))),_r=[],!0===Qn.html&&(L(oa,v),L(_r,k)),!0===Qn.svg&&(L(oa,y),L(_r,O),L(_r,N)),!0===Qn.svgFilters&&(L(oa,f),L(_r,O),L(_r,N)),!0===Qn.mathMl&&(L(oa,A),L(_r,E),L(_r,N))),Ct.ADD_TAGS&&(oa===Zc&&(oa=D(oa)),L(oa,Ct.ADD_TAGS)),Ct.ADD_ATTR&&(_r===Oc&&(_r=D(_r)),L(_r,Ct.ADD_ATTR)),Ct.ADD_URI_SAFE_ATTR&&L(eo,Ct.ADD_URI_SAFE_ATTR),sn&&(oa["#text"]=!0),ka&&L(oa,["html","head","body"]),oa.table&&(L(oa,["tbody"]),delete th.tbody),Ge&&Ge(Ct),jn=Ct)},vt=function(Ct){At.removed.push({element:Ct});try{Ct.parentNode.removeChild(Ct)}catch(Rn){Ct.outerHTML=On}},_l=function(Ct,Rn){try{At.removed.push({attribute:Rn.getAttributeNode(Ct),from:Rn})}catch(hn){At.removed.push({attribute:null,from:Rn})}Rn.removeAttribute(Ct)},Nu=function(Ct){var Rn=void 0,hn=void 0;if(pp)Ct="<remove></remove>"+Ct;else{var di=Ct.match(/^[\s]+/);(hn=di&&di[0])&&(Ct=Ct.slice(hn.length))}if(dt)try{Rn=(new _t).parseFromString(Ct,"text/html")}catch(Fo){}if(kt&&L(th,["title"]),!Rn||!Rn.documentElement){var zs=(Rn=zn.createHTMLDocument("")).body;zs.parentNode.removeChild(zs.parentNode.firstElementChild),zs.outerHTML=Bt?Bt.createHTML(Ct):Ct}return Ct&&hn&&Rn.body.insertBefore(St.createTextNode(hn),Rn.body.childNodes[0]||null),ua.call(Rn,ka?"html":"body")[0]};At.isSupported&&(function(){try{Nu('<svg><p><textarea><img src="</textarea><img src=x abc=1//">').querySelector("svg img")&&(dt=!0)}catch(Ct){}}(),function(){try{var ui=Nu("<x/><title>&lt;/title&gt;&lt;img&gt;");/<\/title/.test(ui.querySelector("title").innerHTML)&&(kt=!0)}catch(Ct){}}());var yd=function(Ct){return Gr.call(Ct.ownerDocument||Ct,Ct,uc.SHOW_ELEMENT|uc.SHOW_COMMENT|uc.SHOW_TEXT,function(){return uc.FILTER_ACCEPT},!1)},Sd=function(Ct){return"object"===(typeof wo>"u"?"undefined":Ae(wo))?Ct instanceof wo:Ct&&"object"===(typeof Ct>"u"?"undefined":Ae(Ct))&&"number"==typeof Ct.nodeType&&"string"==typeof Ct.nodeName},dc=function(Ct,Rn,hn){To[Ct]&&To[Ct].forEach(function(di){di.call(At,Rn,hn,jn)})},mp=function(Ct){var Rn=void 0;if(dc("beforeSanitizeElements",Ct,null),function(Ct){return!(Ct instanceof Le||Ct instanceof tt||"string"==typeof Ct.nodeName&&"string"==typeof Ct.textContent&&"function"==typeof Ct.removeChild&&Ct.attributes instanceof Rr&&"function"==typeof Ct.removeAttribute&&"function"==typeof Ct.setAttribute&&"string"==typeof Ct.namespaceURI)}(Ct))return vt(Ct),!0;var hn=Ct.nodeName.toLowerCase();if(dc("uponSanitizeElement",Ct,{tagName:hn,allowedTags:oa}),("svg"===hn||"math"===hn)&&0!==Ct.querySelectorAll("p, br").length)return vt(Ct),!0;if(!oa[hn]||th[hn]){if(sn&&!lm[hn]&&"function"==typeof Ct.insertAdjacentHTML)try{var di=Ct.innerHTML;Ct.insertAdjacentHTML("AfterEnd",Bt?Bt.createHTML(di):di)}catch(As){}return vt(Ct),!0}return"noscript"===hn&&/<\/noscript/i.test(Ct.innerHTML)||"noembed"===hn&&/<\/noembed/i.test(Ct.innerHTML)?(vt(Ct),!0):(jg&&!Ct.firstElementChild&&(!Ct.content||!Ct.content.firstElementChild)&&/</g.test(Ct.textContent)&&(At.removed.push({element:Ct.cloneNode()}),Ct.innerHTML=Ct.innerHTML?Ct.innerHTML.replace(/</g,"&lt;"):Ct.textContent.replace(/</g,"&lt;")),Bu&&3===Ct.nodeType&&(Rn=(Rn=(Rn=Ct.textContent).replace(sr," ")).replace(da," "),Ct.textContent!==Rn&&(At.removed.push({element:Ct.cloneNode()}),Ct.textContent=Rn)),dc("afterSanitizeElements",Ct,null),!1)},wd=function(Ct,Rn,hn){if(Hg&&("id"===Rn||"name"===Rn)&&(hn in St||hn in qg))return!1;if(!(xf&&ms.test(Rn)||nh&&_d.test(Rn))){if(!_r[Rn]||Du[Rn])return!1;if(!eo[Rn]&&!Ra.test(hn.replace(xs,""))&&("src"!==Rn&&"xlink:href"!==Rn&&"href"!==Rn||"script"===Ct||0!==hn.indexOf("data:")||!vr[Ct])&&(!vd||$a.test(hn.replace(xs,"")))&&hn)return!1}return!0},ke=function(Ct){var Rn=void 0,hn=void 0,di=void 0,As=void 0,zs=void 0;dc("beforeSanitizeAttributes",Ct,null);var Fo=Ct.attributes;if(Fo){var fs={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_r};for(zs=Fo.length;zs--;){var Fu=(Rn=Fo[zs]).name,pc=Rn.namespaceURI;if(hn=Rn.value.trim(),di=Fu.toLowerCase(),fs.attrName=di,fs.attrValue=hn,fs.keepAttr=!0,dc("uponSanitizeAttribute",Ct,fs),hn=fs.attrValue,"name"===di&&"IMG"===Ct.nodeName&&Fo.id)As=Fo.id,Fo=Te(xe,Fo,[]),_l("id",Ct),_l(Fu,Ct),Fo.indexOf(As)>zs&&Ct.setAttribute("id",As.value);else{if("INPUT"===Ct.nodeName&&"type"===di&&"file"===hn&&fs.keepAttr&&(_r[di]||!Du[di]))continue;"id"===Fu&&Ct.setAttribute(Fu,""),_l(Fu,Ct)}if(fs.keepAttr){if(/svg|math/i.test(Ct.namespaceURI)&&new RegExp("</("+Object.keys(lm).join("|")+")","i").test(hn)){_l(Fu,Ct);continue}Bu&&(hn=(hn=hn.replace(sr," ")).replace(da," "));var Ul=Ct.nodeName.toLowerCase();if(wd(Ul,di,hn))try{pc?Ct.setAttributeNS(pc,Fu,hn):Ct.setAttribute(Fu,hn),At.removed.pop()}catch(Wg){}}}dc("afterSanitizeAttributes",Ct,null)}},Sy=function ui(Ct){var Rn=void 0,hn=yd(Ct);for(dc("beforeSanitizeShadowDOM",Ct,null);Rn=hn.nextNode();)dc("uponSanitizeShadowNode",Rn,null),!mp(Rn)&&(Rn.content instanceof $i&&ui(Rn.content),ke(Rn));dc("afterSanitizeShadowDOM",Ct,null)};return At.sanitize=function(ui,Ct){var Rn=void 0,hn=void 0,di=void 0,As=void 0,zs=void 0;if(ui||(ui="\x3c!--\x3e"),"string"!=typeof ui&&!Sd(ui)){if("function"!=typeof ui.toString)throw new TypeError("toString is not a function");if("string"!=typeof(ui=ui.toString()))throw new TypeError("dirty is not a string, aborting")}if(!At.isSupported){if("object"===Ae(gt.toStaticHTML)||"function"==typeof gt.toStaticHTML){if("string"==typeof ui)return gt.toStaticHTML(ui);if(Sd(ui))return gt.toStaticHTML(ui.outerHTML)}return ui}if(dp||oh(Ct),At.removed=[],!Cd)if(ui instanceof wo)1===(hn=(Rn=Nu("\x3c!--\x3e")).ownerDocument.importNode(ui,!0)).nodeType&&"BODY"===hn.nodeName||"HTML"===hn.nodeName?Rn=hn:Rn.appendChild(hn);else{if(!ao&&!Bu&&!ka&&cm&&-1===ui.indexOf("<"))return Bt?Bt.createHTML(ui):ui;if(!(Rn=Nu(ui)))return ao?null:On}Rn&&pp&&vt(Rn.firstChild);for(var Fo=yd(Cd?ui:Rn);di=Fo.nextNode();)3===di.nodeType&&di===As||mp(di)||(di.content instanceof $i&&Sy(di.content),ke(di),As=di);if(As=null,Cd)return ui;if(ao){if(bd)for(zs=gi.call(Rn.ownerDocument);Rn.firstChild;)zs.appendChild(Rn.firstChild);else zs=Rn;return Fl&&(zs=si.call(ht,zs,!0)),zs}var fs=ka?Rn.outerHTML:Rn.innerHTML;return Bu&&(fs=(fs=fs.replace(sr," ")).replace(da," ")),Bt&&cm?Bt.createHTML(fs):fs},At.setConfig=function(ui){oh(ui),dp=!0},At.clearConfig=function(){jn=null,dp=!1},At.isValidAttribute=function(ui,Ct,Rn){jn||oh({});var hn=ui.toLowerCase(),di=Ct.toLowerCase();return wd(hn,di,Rn)},At.addHook=function(ui,Ct){"function"==typeof Ct&&(To[ui]=To[ui]||[],To[ui].push(Ct))},At.removeHook=function(ui){To[ui]&&To[ui].pop()},At.removeHooks=function(ui){To[ui]&&(To[ui]=[])},At.removeAllHooks=function(){To={}},At}()}()},97230:(Q,F,v)=>{Q.exports=v(94931),Q.exports.parser=v(88012)},94931:(Q,F,v)=>{var y=v(7303),f=v(85879),A=v(20563)("engine.io-client:socket"),C=v(83300),P=v(88012),k=v(29163),O=v(1367);function E(M,x){if(!(this instanceof E))return new E(M,x);x=x||{},M&&"object"==typeof M&&(x=M,M=null),M?(M=k(M),x.hostname=M.host,x.secure="https"===M.protocol||"wss"===M.protocol,x.port=M.port,M.query&&(x.query=M.query)):x.host&&(x.hostname=k(x.host).host),this.secure=null!=x.secure?x.secure:v.g.location&&"https:"===location.protocol,x.hostname&&!x.port&&(x.port=this.secure?"443":"80"),this.agent=x.agent||!1,this.hostname=x.hostname||(v.g.location?location.hostname:"localhost"),this.port=x.port||(v.g.location&&location.port?location.port:this.secure?443:80),this.query=x.query||{},"string"==typeof this.query&&(this.query=O.decode(this.query)),this.upgrade=!1!==x.upgrade,this.path=(x.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!x.forceJSONP,this.jsonp=!1!==x.jsonp,this.forceBase64=!!x.forceBase64,this.enablesXDR=!!x.enablesXDR,this.timestampParam=x.timestampParam||"t",this.timestampRequests=x.timestampRequests,this.transports=x.transports||["polling","websocket"],this.transportOptions=x.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=x.policyPort||843,this.rememberUpgrade=x.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=x.onlyBinaryUpgrades,this.perMessageDeflate=!1!==x.perMessageDeflate&&(x.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=x.pfx||null,this.key=x.key||null,this.passphrase=x.passphrase||null,this.cert=x.cert||null,this.ca=x.ca||null,this.ciphers=x.ciphers||null,this.rejectUnauthorized=void 0===x.rejectUnauthorized||x.rejectUnauthorized,this.forceNode=!!x.forceNode;var I="object"==typeof v.g&&v.g;I.global===I&&(x.extraHeaders&&Object.keys(x.extraHeaders).length>0&&(this.extraHeaders=x.extraHeaders),x.localAddress&&(this.localAddress=x.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}Q.exports=E,E.priorWebsocketSuccess=!1,f(E.prototype),E.protocol=P.protocol,E.Socket=E,E.Transport=v(65060),E.transports=v(7303),E.parser=v(88012),E.prototype.createTransport=function(M){A('creating transport "%s"',M);var x=function N(M){var x={};for(var I in M)M.hasOwnProperty(I)&&(x[I]=M[I]);return x}(this.query);x.EIO=P.protocol,x.transport=M;var I=this.transportOptions[M]||{};return this.id&&(x.sid=this.id),new y[M]({query:x,socket:this,agent:I.agent||this.agent,hostname:I.hostname||this.hostname,port:I.port||this.port,secure:I.secure||this.secure,path:I.path||this.path,forceJSONP:I.forceJSONP||this.forceJSONP,jsonp:I.jsonp||this.jsonp,forceBase64:I.forceBase64||this.forceBase64,enablesXDR:I.enablesXDR||this.enablesXDR,timestampRequests:I.timestampRequests||this.timestampRequests,timestampParam:I.timestampParam||this.timestampParam,policyPort:I.policyPort||this.policyPort,pfx:I.pfx||this.pfx,key:I.key||this.key,passphrase:I.passphrase||this.passphrase,cert:I.cert||this.cert,ca:I.ca||this.ca,ciphers:I.ciphers||this.ciphers,rejectUnauthorized:I.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:I.perMessageDeflate||this.perMessageDeflate,extraHeaders:I.extraHeaders||this.extraHeaders,forceNode:I.forceNode||this.forceNode,localAddress:I.localAddress||this.localAddress,requestTimeout:I.requestTimeout||this.requestTimeout,protocols:I.protocols||void 0})},E.prototype.open=function(){var M;if(this.rememberUpgrade&&E.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))M="websocket";else{if(0===this.transports.length){var x=this;return void setTimeout(function(){x.emit("error","No transports available")},0)}M=this.transports[0]}this.readyState="opening";try{M=this.createTransport(M)}catch(I){return this.transports.shift(),void this.open()}M.open(),this.setTransport(M)},E.prototype.setTransport=function(M){A("setting transport %s",M.name);var x=this;this.transport&&(A("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=M,M.on("drain",function(){x.onDrain()}).on("packet",function(I){x.onPacket(I)}).on("error",function(I){x.onError(I)}).on("close",function(){x.onClose("transport close")})},E.prototype.probe=function(M){A('probing transport "%s"',M);var x=this.createTransport(M,{probe:1}),I=!1,S=this;function L(){S.onlyBinaryUpgrades&&(I=I||!this.supportsBinary&&S.transport.supportsBinary),I||(A('probe transport "%s" opened',M),x.send([{type:"ping",data:"probe"}]),x.once("packet",function(fe){if(!I)if("pong"===fe.type&&"probe"===fe.data){if(A('probe transport "%s" pong',M),S.upgrading=!0,S.emit("upgrading",x),!x)return;E.priorWebsocketSuccess="websocket"===x.name,A('pausing current transport "%s"',S.transport.name),S.transport.pause(function(){I||"closed"!==S.readyState&&(A("changing transport and sending upgrade packet"),X(),S.setTransport(x),x.send([{type:"upgrade"}]),S.emit("upgrade",x),x=null,S.upgrading=!1,S.flush())})}else{A('probe transport "%s" failed',M);var Pe=new Error("probe error");Pe.transport=x.name,S.emit("upgradeError",Pe)}}))}function D(){I||(I=!0,X(),x.close(),x=null)}function j(ae){var fe=new Error("probe error: "+ae);fe.transport=x.name,D(),A('probe transport "%s" failed because of error: %s',M,ae),S.emit("upgradeError",fe)}function z(){j("transport closed")}function Z(){j("socket closed")}function q(ae){x&&ae.name!==x.name&&(A('"%s" works - aborting "%s"',ae.name,x.name),D())}function X(){x.removeListener("open",L),x.removeListener("error",j),x.removeListener("close",z),S.removeListener("close",Z),S.removeListener("upgrading",q)}E.priorWebsocketSuccess=!1,x.once("open",L),x.once("error",j),x.once("close",z),this.once("close",Z),this.once("upgrading",q),x.open()},E.prototype.onOpen=function(){if(A("socket open"),this.readyState="open",E.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){A("starting upgrade probes");for(var M=0,x=this.upgrades.length;M<x;M++)this.probe(this.upgrades[M])}},E.prototype.onPacket=function(M){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(A('socket receive: type "%s", data "%s"',M.type,M.data),this.emit("packet",M),this.emit("heartbeat"),M.type){case"open":this.onHandshake(JSON.parse(M.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var x=new Error("server error");x.code=M.data,this.onError(x);break;case"message":this.emit("data",M.data),this.emit("message",M.data)}else A('packet received with socket readyState "%s"',this.readyState)},E.prototype.onHandshake=function(M){this.emit("handshake",M),this.id=M.sid,this.transport.query.sid=M.sid,this.upgrades=this.filterUpgrades(M.upgrades),this.pingInterval=M.pingInterval,this.pingTimeout=M.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},E.prototype.onHeartbeat=function(M){clearTimeout(this.pingTimeoutTimer);var x=this;x.pingTimeoutTimer=setTimeout(function(){"closed"!==x.readyState&&x.onClose("ping timeout")},M||x.pingInterval+x.pingTimeout)},E.prototype.setPing=function(){var M=this;clearTimeout(M.pingIntervalTimer),M.pingIntervalTimer=setTimeout(function(){A("writing ping packet - expecting pong within %sms",M.pingTimeout),M.ping(),M.onHeartbeat(M.pingTimeout)},M.pingInterval)},E.prototype.ping=function(){var M=this;this.sendPacket("ping",function(){M.emit("ping")})},E.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},E.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(A("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},E.prototype.write=E.prototype.send=function(M,x,I){return this.sendPacket("message",M,x,I),this},E.prototype.sendPacket=function(M,x,I,S){if("function"==typeof x&&(S=x,x=void 0),"function"==typeof I&&(S=I,I=null),"closing"!==this.readyState&&"closed"!==this.readyState){(I=I||{}).compress=!1!==I.compress;var L={type:M,data:x,options:I};this.emit("packetCreate",L),this.writeBuffer.push(L),S&&this.once("flush",S),this.flush()}},E.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var M=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?S():x()}):this.upgrading?S():x()}function x(){M.onClose("forced close"),A("socket closing - telling transport to close"),M.transport.close()}function I(){M.removeListener("upgrade",I),M.removeListener("upgradeError",I),x()}function S(){M.once("upgrade",I),M.once("upgradeError",I)}return this},E.prototype.onError=function(M){A("socket error %j",M),E.priorWebsocketSuccess=!1,this.emit("error",M),this.onClose("transport error",M)},E.prototype.onClose=function(M,x){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(A('socket close with reason: "%s"',M),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",M,x),this.writeBuffer=[],this.prevBufferLen=0)},E.prototype.filterUpgrades=function(M){for(var x=[],I=0,S=M.length;I<S;I++)~C(this.transports,M[I])&&x.push(M[I]);return x}},65060:(Q,F,v)=>{var y=v(88012),f=v(85879);function A(C){this.path=C.path,this.hostname=C.hostname,this.port=C.port,this.secure=C.secure,this.query=C.query,this.timestampParam=C.timestampParam,this.timestampRequests=C.timestampRequests,this.readyState="",this.agent=C.agent||!1,this.socket=C.socket,this.enablesXDR=C.enablesXDR,this.pfx=C.pfx,this.key=C.key,this.passphrase=C.passphrase,this.cert=C.cert,this.ca=C.ca,this.ciphers=C.ciphers,this.rejectUnauthorized=C.rejectUnauthorized,this.forceNode=C.forceNode,this.extraHeaders=C.extraHeaders,this.localAddress=C.localAddress}Q.exports=A,f(A.prototype),A.prototype.onError=function(C,P){var k=new Error(C);return k.type="TransportError",k.description=P,this.emit("error",k),this},A.prototype.open=function(){return("closed"===this.readyState||""===this.readyState)&&(this.readyState="opening",this.doOpen()),this},A.prototype.close=function(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this},A.prototype.send=function(C){if("open"!==this.readyState)throw new Error("Transport not open");this.write(C)},A.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},A.prototype.onData=function(C){var P=y.decodePacket(C,this.socket.binaryType);this.onPacket(P)},A.prototype.onPacket=function(C){this.emit("packet",C)},A.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},7303:(Q,F,v)=>{var y=v(91047),f=v(2406),A=v(60232),C=v(15223);F.polling=function P(k){var E=!1,N=!1,M=!1!==k.jsonp;if(v.g.location){var x="https:"===location.protocol,I=location.port;I||(I=x?443:80),E=k.hostname!==location.hostname||I!==k.port,N=k.secure!==x}if(k.xdomain=E,k.xscheme=N,"open"in new y(k)&&!k.forceJSONP)return new f(k);if(!M)throw new Error("JSONP disabled");return new A(k)},F.websocket=C},60232:(Q,F,v)=>{var y=v(26732),f=v(40353);Q.exports=O;var P,A=/\n/g,C=/\\n/g;function k(){}function O(E){y.call(this,E),this.query=this.query||{},P||(v.g.___eio||(v.g.___eio=[]),P=v.g.___eio),this.index=P.length;var N=this;P.push(function(M){N.onData(M)}),this.query.j=this.index,v.g.document&&v.g.addEventListener&&v.g.addEventListener("beforeunload",function(){N.script&&(N.script.onerror=k)},!1)}f(O,y),O.prototype.supportsBinary=!1,O.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),y.prototype.doClose.call(this)},O.prototype.doPoll=function(){var E=this,N=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),N.async=!0,N.src=this.uri(),N.onerror=function(I){E.onError("jsonp poll error",I)};var M=document.getElementsByTagName("script")[0];M?M.parentNode.insertBefore(N,M):(document.head||document.body).appendChild(N),this.script=N,typeof navigator<"u"&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var I=document.createElement("iframe");document.body.appendChild(I),document.body.removeChild(I)},100)},O.prototype.doWrite=function(E,N){var M=this;if(!this.form){var L,x=document.createElement("form"),I=document.createElement("textarea"),S=this.iframeId="eio_iframe_"+this.index;x.className="socketio",x.style.position="absolute",x.style.top="-1000px",x.style.left="-1000px",x.target=S,x.method="POST",x.setAttribute("accept-charset","utf-8"),I.name="d",x.appendChild(I),document.body.appendChild(x),this.form=x,this.area=I}function D(){j(),N()}function j(){if(M.iframe)try{M.form.removeChild(M.iframe)}catch(Z){M.onError("jsonp polling iframe removal error",Z)}try{L=document.createElement('<iframe src="javascript:0" name="'+M.iframeId+'">')}catch(Z){(L=document.createElement("iframe")).name=M.iframeId,L.src="javascript:0"}L.id=M.iframeId,M.form.appendChild(L),M.iframe=L}this.form.action=this.uri(),j(),E=E.replace(C,"\\\n"),this.area.value=E.replace(A,"\\n");try{this.form.submit()}catch(z){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===M.iframe.readyState&&D()}:this.iframe.onload=D}},2406:(Q,F,v)=>{var y=v(91047),f=v(26732),A=v(85879),C=v(40353),P=v(20563)("engine.io-client:polling-xhr");function k(){}function O(M){if(f.call(this,M),this.requestTimeout=M.requestTimeout,this.extraHeaders=M.extraHeaders,v.g.location){var x="https:"===location.protocol,I=location.port;I||(I=x?443:80),this.xd=M.hostname!==v.g.location.hostname||I!==M.port,this.xs=M.secure!==x}}function E(M){this.method=M.method||"GET",this.uri=M.uri,this.xd=!!M.xd,this.xs=!!M.xs,this.async=!1!==M.async,this.data=void 0!==M.data?M.data:null,this.agent=M.agent,this.isBinary=M.isBinary,this.supportsBinary=M.supportsBinary,this.enablesXDR=M.enablesXDR,this.requestTimeout=M.requestTimeout,this.pfx=M.pfx,this.key=M.key,this.passphrase=M.passphrase,this.cert=M.cert,this.ca=M.ca,this.ciphers=M.ciphers,this.rejectUnauthorized=M.rejectUnauthorized,this.extraHeaders=M.extraHeaders,this.create()}function N(){for(var M in E.requests)E.requests.hasOwnProperty(M)&&E.requests[M].abort()}Q.exports=O,Q.exports.Request=E,C(O,f),O.prototype.supportsBinary=!0,O.prototype.request=function(M){return(M=M||{}).uri=this.uri(),M.xd=this.xd,M.xs=this.xs,M.agent=this.agent||!1,M.supportsBinary=this.supportsBinary,M.enablesXDR=this.enablesXDR,M.pfx=this.pfx,M.key=this.key,M.passphrase=this.passphrase,M.cert=this.cert,M.ca=this.ca,M.ciphers=this.ciphers,M.rejectUnauthorized=this.rejectUnauthorized,M.requestTimeout=this.requestTimeout,M.extraHeaders=this.extraHeaders,new E(M)},O.prototype.doWrite=function(M,x){var S=this.request({method:"POST",data:M,isBinary:"string"!=typeof M&&void 0!==M}),L=this;S.on("success",x),S.on("error",function(D){L.onError("xhr post error",D)}),this.sendXhr=S},O.prototype.doPoll=function(){P("xhr poll");var M=this.request(),x=this;M.on("data",function(I){x.onData(I)}),M.on("error",function(I){x.onError("xhr poll error",I)}),this.pollXhr=M},A(E.prototype),E.prototype.create=function(){var M={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};M.pfx=this.pfx,M.key=this.key,M.passphrase=this.passphrase,M.cert=this.cert,M.ca=this.ca,M.ciphers=this.ciphers,M.rejectUnauthorized=this.rejectUnauthorized;var x=this.xhr=new y(M),I=this;try{P("xhr open %s: %s",this.method,this.uri),x.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var S in x.setDisableHeaderCheck&&x.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(S)&&x.setRequestHeader(S,this.extraHeaders[S])}catch(L){}if("POST"===this.method)try{x.setRequestHeader("Content-type",this.isBinary?"application/octet-stream":"text/plain;charset=UTF-8")}catch(L){}try{x.setRequestHeader("Accept","*/*")}catch(L){}"withCredentials"in x&&(x.withCredentials=!0),this.requestTimeout&&(x.timeout=this.requestTimeout),this.hasXDR()?(x.onload=function(){I.onLoad()},x.onerror=function(){I.onError(x.responseText)}):x.onreadystatechange=function(){if(2===x.readyState)try{var L=x.getResponseHeader("Content-Type");I.supportsBinary&&"application/octet-stream"===L&&(x.responseType="arraybuffer")}catch(D){}4===x.readyState&&(200===x.status||1223===x.status?I.onLoad():setTimeout(function(){I.onError(x.status)},0))},P("xhr data %s",this.data),x.send(this.data)}catch(L){return void setTimeout(function(){I.onError(L)},0)}v.g.document&&(this.index=E.requestsCount++,E.requests[this.index]=this)},E.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},E.prototype.onData=function(M){this.emit("data",M),this.onSuccess()},E.prototype.onError=function(M){this.emit("error",M),this.cleanup(!0)},E.prototype.cleanup=function(M){if(!(typeof this.xhr>"u"||null===this.xhr)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=k:this.xhr.onreadystatechange=k,M)try{this.xhr.abort()}catch(x){}v.g.document&&delete E.requests[this.index],this.xhr=null}},E.prototype.onLoad=function(){var M;try{var x;try{x=this.xhr.getResponseHeader("Content-Type")}catch(I){}M="application/octet-stream"===x&&this.xhr.response||this.xhr.responseText}catch(I){this.onError(I)}null!=M&&this.onData(M)},E.prototype.hasXDR=function(){return typeof v.g.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},E.prototype.abort=function(){this.cleanup()},E.requestsCount=0,E.requests={},v.g.document&&(v.g.attachEvent?v.g.attachEvent("onunload",N):v.g.addEventListener&&v.g.addEventListener("beforeunload",N,!1))},26732:(Q,F,v)=>{var y=v(65060),f=v(1367),A=v(88012),C=v(40353),P=v(51323),k=v(20563)("engine.io-client:polling");Q.exports=E;var O=null!=new(v(91047))({xdomain:!1}).responseType;function E(N){(!O||N&&N.forceBase64)&&(this.supportsBinary=!1),y.call(this,N)}C(E,y),E.prototype.name="polling",E.prototype.doOpen=function(){this.poll()},E.prototype.pause=function(N){var M=this;function x(){k("paused"),M.readyState="paused",N()}if(this.readyState="pausing",this.polling||!this.writable){var I=0;this.polling&&(k("we are currently polling - waiting to pause"),I++,this.once("pollComplete",function(){k("pre-pause polling complete"),--I||x()})),this.writable||(k("we are currently writing - waiting to pause"),I++,this.once("drain",function(){k("pre-pause writing complete"),--I||x()}))}else x()},E.prototype.poll=function(){k("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},E.prototype.onData=function(N){var M=this;k("polling got data %s",N),A.decodePayload(N,this.socket.binaryType,function(I,S,L){if("opening"===M.readyState&&M.onOpen(),"close"===I.type)return M.onClose(),!1;M.onPacket(I)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():k('ignoring poll - transport state "%s"',this.readyState))},E.prototype.doClose=function(){var N=this;function M(){k("writing close packet"),N.write([{type:"close"}])}"open"===this.readyState?(k("transport open - closing"),M()):(k("transport not open - deferring close"),this.once("open",M))},E.prototype.write=function(N){var M=this;this.writable=!1;var x=function(){M.writable=!0,M.emit("drain")};A.encodePayload(N,this.supportsBinary,function(I){M.doWrite(I,x)})},E.prototype.uri=function(){var N=this.query||{},M=this.secure?"https":"http",x="";return!1!==this.timestampRequests&&(N[this.timestampParam]=P()),!this.supportsBinary&&!N.sid&&(N.b64=1),N=f.encode(N),this.port&&("https"===M&&443!==Number(this.port)||"http"===M&&80!==Number(this.port))&&(x=":"+this.port),N.length&&(N="?"+N),M+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+x+this.path+N}},15223:(Q,F,v)=>{var E,y=v(65060),f=v(88012),A=v(1367),C=v(40353),P=v(51323),k=v(20563)("engine.io-client:websocket"),O=v.g.WebSocket||v.g.MozWebSocket;if(typeof window>"u")try{E=v(77020)}catch(x){}var N=O;function M(x){x&&x.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=x.perMessageDeflate,this.usingBrowserWebSocket=O&&!x.forceNode,this.protocols=x.protocols,this.usingBrowserWebSocket||(N=E),y.call(this,x)}!N&&typeof window>"u"&&(N=E),Q.exports=M,C(M,y),M.prototype.name="websocket",M.prototype.supportsBinary=!0,M.prototype.doOpen=function(){if(this.check()){var x=this.uri(),I=this.protocols,S={agent:this.agent,perMessageDeflate:this.perMessageDeflate};S.pfx=this.pfx,S.key=this.key,S.passphrase=this.passphrase,S.cert=this.cert,S.ca=this.ca,S.ciphers=this.ciphers,S.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(S.headers=this.extraHeaders),this.localAddress&&(S.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?I?new N(x,I):new N(x):new N(x,I,S)}catch(L){return this.emit("error",L)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},M.prototype.addEventListeners=function(){var x=this;this.ws.onopen=function(){x.onOpen()},this.ws.onclose=function(){x.onClose()},this.ws.onmessage=function(I){x.onData(I.data)},this.ws.onerror=function(I){x.onError("websocket error",I)}},M.prototype.write=function(x){var I=this;this.writable=!1;for(var S=x.length,L=0,D=S;L<D;L++)!function(z){f.encodePacket(z,I.supportsBinary,function(Z){if(!I.usingBrowserWebSocket){var q={};z.options&&(q.compress=z.options.compress),I.perMessageDeflate&&("string"==typeof Z?v.g.Buffer.byteLength(Z):Z.length)<I.perMessageDeflate.threshold&&(q.compress=!1)}try{I.usingBrowserWebSocket?I.ws.send(Z):I.ws.send(Z,q)}catch(ae){k("websocket closed before onclose event")}--S||(I.emit("flush"),setTimeout(function(){I.writable=!0,I.emit("drain")},0))})}(x[L])},M.prototype.onClose=function(){y.prototype.onClose.call(this)},M.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},M.prototype.uri=function(){var x=this.query||{},I=this.secure?"wss":"ws",S="";return this.port&&("wss"===I&&443!==Number(this.port)||"ws"===I&&80!==Number(this.port))&&(S=":"+this.port),this.timestampRequests&&(x[this.timestampParam]=P()),this.supportsBinary||(x.b64=1),(x=A.encode(x)).length&&(x="?"+x),I+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+S+this.path+x},M.prototype.check=function(){return!(!N||"__initialize"in N&&this.name===M.prototype.name)}},91047:(Q,F,v)=>{var y=v(67323);Q.exports=function(f){var A=f.xdomain,C=f.xscheme,P=f.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!A||y))return new XMLHttpRequest}catch(k){}try{if(typeof XDomainRequest<"u"&&!C&&P)return new XDomainRequest}catch(k){}if(!A)try{return new(v.g[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(k){}}},88012:(Q,F,v)=>{var k,y=v(62629),f=v(96829),A=v(4535),C=v(83581),P=v(33379);typeof ArrayBuffer<"u"&&(k=v(36072));var O=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),E=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),N=O||E;F.protocol=3;var M=F.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},x=y(M),I={type:"error",data:"parser error"},S=v(83385);function q(X,ae,fe){for(var Pe=new Array(X.length),Ae=C(X.length,fe),Ie=function(Te,xe,Ge){ae(xe,function(Ue,st){Pe[Te]=st,Ge(Ue,Pe)})},De=0;De<X.length;De++)Ie(De,X[De],Ae)}F.encodePacket=function(X,ae,fe,Pe){"function"==typeof ae&&(Pe=ae,ae=!1),"function"==typeof fe&&(Pe=fe,fe=null);var Ae=void 0===X.data?void 0:X.data.buffer||X.data;if(typeof ArrayBuffer<"u"&&Ae instanceof ArrayBuffer)return function D(X,ae,fe){if(!ae)return F.encodeBase64Packet(X,fe);var Pe=X.data,Ae=new Uint8Array(Pe),Ie=new Uint8Array(1+Pe.byteLength);Ie[0]=M[X.type];for(var De=0;De<Ae.length;De++)Ie[De+1]=Ae[De];return fe(Ie.buffer)}(X,ae,Pe);if(typeof S<"u"&&Ae instanceof S)return function z(X,ae,fe){if(!ae)return F.encodeBase64Packet(X,fe);if(N)return function j(X,ae,fe){if(!ae)return F.encodeBase64Packet(X,fe);var Pe=new FileReader;return Pe.onload=function(){F.encodePacket({type:X.type,data:Pe.result},ae,!0,fe)},Pe.readAsArrayBuffer(X.data)}(X,ae,fe);var Pe=new Uint8Array(1);return Pe[0]=M[X.type],fe(new S([Pe.buffer,X.data]))}(X,ae,Pe);if(Ae&&Ae.base64)return function L(X,ae){return ae("b"+F.packets[X.type]+X.data.data)}(X,Pe);var Ie=M[X.type];return void 0!==X.data&&(Ie+=fe?P.encode(String(X.data),{strict:!1}):String(X.data)),Pe(""+Ie)},F.encodeBase64Packet=function(X,ae){var Ae,fe="b"+F.packets[X.type];if(typeof S<"u"&&X.data instanceof S){var Pe=new FileReader;return Pe.onload=function(){var xe=Pe.result.split(",")[1];ae(fe+xe)},Pe.readAsDataURL(X.data)}try{Ae=String.fromCharCode.apply(null,new Uint8Array(X.data))}catch(xe){for(var Ie=new Uint8Array(X.data),De=new Array(Ie.length),Te=0;Te<Ie.length;Te++)De[Te]=Ie[Te];Ae=String.fromCharCode.apply(null,De)}return fe+=btoa(Ae),ae(fe)},F.decodePacket=function(X,ae,fe){if(void 0===X)return I;if("string"==typeof X){if("b"===X.charAt(0))return F.decodeBase64Packet(X.substr(1),ae);if(fe&&!1===(X=function Z(X){try{X=P.decode(X,{strict:!1})}catch(ae){return!1}return X}(X)))return I;var Ae=X.charAt(0);return Number(Ae)==Ae&&x[Ae]?X.length>1?{type:x[Ae],data:X.substring(1)}:{type:x[Ae]}:I}Ae=new Uint8Array(X)[0];var Ie=A(X,1);return S&&"blob"===ae&&(Ie=new S([Ie])),{type:x[Ae],data:Ie}},F.decodeBase64Packet=function(X,ae){var fe=x[X.charAt(0)];if(!k)return{type:fe,data:{base64:!0,data:X.substr(1)}};var Pe=k.decode(X.substr(1));return"blob"===ae&&S&&(Pe=new S([Pe])),{type:fe,data:Pe}},F.encodePayload=function(X,ae,fe){"function"==typeof ae&&(fe=ae,ae=null);var Pe=f(X);return ae&&Pe?S&&!N?F.encodePayloadAsBlob(X,fe):F.encodePayloadAsArrayBuffer(X,fe):X.length?void q(X,function Ie(De,Te){F.encodePacket(De,!!Pe&&ae,!1,function(xe){Te(null,function Ae(De){return De.length+":"+De}(xe))})},function(De,Te){return fe(Te.join(""))}):fe("0:")},F.decodePayload=function(X,ae,fe){if("string"!=typeof X)return F.decodePayloadAsBinary(X,ae,fe);var Pe;if("function"==typeof ae&&(fe=ae,ae=null),""===X)return fe(I,0,1);for(var Ie,De,Ae="",Te=0,xe=X.length;Te<xe;Te++){var Ge=X.charAt(Te);if(":"===Ge){if(""===Ae||Ae!=(Ie=Number(Ae))||Ae!=(De=X.substr(Te+1,Ie)).length)return fe(I,0,1);if(De.length){if(Pe=F.decodePacket(De,ae,!1),I.type===Pe.type&&I.data===Pe.data)return fe(I,0,1);if(!1===fe(Pe,Te+Ie,xe))return}Te+=Ie,Ae=""}else Ae+=Ge}return""!==Ae?fe(I,0,1):void 0},F.encodePayloadAsArrayBuffer=function(X,ae){if(!X.length)return ae(new ArrayBuffer(0));q(X,function fe(Pe,Ae){F.encodePacket(Pe,!0,!0,function(Ie){return Ae(null,Ie)})},function(Pe,Ae){var Ie=Ae.reduce(function(xe,Ge){var Ue;return xe+(Ue="string"==typeof Ge?Ge.length:Ge.byteLength).toString().length+Ue+2},0),De=new Uint8Array(Ie),Te=0;return Ae.forEach(function(xe){var Ge="string"==typeof xe,Ue=xe;if(Ge){for(var xt=new Uint8Array(xe.length),st=0;st<xe.length;st++)xt[st]=xe.charCodeAt(st);Ue=xt.buffer}De[Te++]=Ge?0:1;var It=Ue.byteLength.toString();for(st=0;st<It.length;st++)De[Te++]=parseInt(It[st]);for(De[Te++]=255,xt=new Uint8Array(Ue),st=0;st<xt.length;st++)De[Te++]=xt[st]}),ae(De.buffer)})},F.encodePayloadAsBlob=function(X,ae){q(X,function fe(Pe,Ae){F.encodePacket(Pe,!0,!0,function(Ie){var De=new Uint8Array(1);if(De[0]=1,"string"==typeof Ie){for(var Te=new Uint8Array(Ie.length),xe=0;xe<Ie.length;xe++)Te[xe]=Ie.charCodeAt(xe);Ie=Te.buffer,De[0]=0}var Ue=(Ie instanceof ArrayBuffer?Ie.byteLength:Ie.size).toString(),st=new Uint8Array(Ue.length+1);for(xe=0;xe<Ue.length;xe++)st[xe]=parseInt(Ue[xe]);if(st[Ue.length]=255,S){var It=new S([De.buffer,st.buffer,Ie]);Ae(null,It)}})},function(Pe,Ae){return ae(new S(Ae))})},F.decodePayloadAsBinary=function(X,ae,fe){"function"==typeof ae&&(fe=ae,ae=null);for(var Pe=X,Ae=[];Pe.byteLength>0;){for(var Ie=new Uint8Array(Pe),De=0===Ie[0],Te="",xe=1;255!==Ie[xe];xe++){if(Te.length>310)return fe(I,0,1);Te+=Ie[xe]}Pe=A(Pe,2+Te.length),Te=parseInt(Te);var Ge=A(Pe,0,Te);if(De)try{Ge=String.fromCharCode.apply(null,new Uint8Array(Ge))}catch(It){var Ue=new Uint8Array(Ge);for(Ge="",xe=0;xe<Ue.length;xe++)Ge+=String.fromCharCode(Ue[xe])}Ae.push(Ge),Pe=A(Pe,Te)}var st=Ae.length;Ae.forEach(function(It,xt){fe(F.decodePacket(It,ae,!0),xt,st)})}},62629:Q=>{Q.exports=Object.keys||function(v){var y=[],f=Object.prototype.hasOwnProperty;for(var A in v)f.call(v,A)&&y.push(A);return y}},33379:Q=>{
/*! https://mths.be/utf8js v2.1.2 by @mathias */
var E,N,M,F=String.fromCharCode;function v(I){for(var j,z,S=[],L=0,D=I.length;L<D;)(j=I.charCodeAt(L++))>=55296&&j<=56319&&L<D?56320==(64512&(z=I.charCodeAt(L++)))?S.push(((1023&j)<<10)+(1023&z)+65536):(S.push(j),L--):S.push(j);return S}function f(I,S){if(I>=55296&&I<=57343){if(S)throw Error("Lone surrogate U+"+I.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function A(I,S){return F(I>>S&63|128)}function C(I,S){if(!(4294967168&I))return F(I);var L="";return 4294965248&I?4294901760&I?4292870144&I||(L=F(I>>18&7|240),L+=A(I,12),L+=A(I,6)):(f(I,S)||(I=65533),L=F(I>>12&15|224),L+=A(I,6)):L=F(I>>6&31|192),L+F(63&I|128)}function k(){if(M>=N)throw Error("Invalid byte index");var I=255&E[M];if(M++,128==(192&I))return 63&I;throw Error("Invalid continuation byte")}function O(I){var S,z;if(M>N)throw Error("Invalid byte index");if(M==N)return!1;if(S=255&E[M],M++,!(128&S))return S;if(192==(224&S)){if((z=(31&S)<<6|k())>=128)return z;throw Error("Invalid continuation byte")}if(224==(240&S)){if((z=(15&S)<<12|k()<<6|k())>=2048)return f(z,I)?z:65533;throw Error("Invalid continuation byte")}if(240==(248&S)&&(z=(7&S)<<18|k()<<12|k()<<6|k())>=65536&&z<=1114111)return z;throw Error("Invalid UTF-8 detected")}Q.exports={version:"2.1.2",encode:function P(I,S){for(var L=!1!==(S=S||{}).strict,D=v(I),j=D.length,z=-1,q="";++z<j;)q+=C(D[z],L);return q},decode:function x(I,S){var L=!1!==(S=S||{}).strict;E=v(I),N=E.length,M=0;for(var j,D=[];!1!==(j=O(L));)D.push(j);return function y(I){for(var D,S=I.length,L=-1,j="";++L<S;)(D=I[L])>65535&&(j+=F((D-=65536)>>>10&1023|55296),D=56320|1023&D),j+=F(D);return j}(D)}}},82016:Q=>{"use strict";var y,F="object"==typeof Reflect?Reflect:null,v=F&&"function"==typeof F.apply?F.apply:function(X,ae,fe){return Function.prototype.apply.call(X,ae,fe)};y=F&&"function"==typeof F.ownKeys?F.ownKeys:Object.getOwnPropertySymbols?function(X){return Object.getOwnPropertyNames(X).concat(Object.getOwnPropertySymbols(X))}:function(X){return Object.getOwnPropertyNames(X)};var A=Number.isNaN||function(X){return X!=X};function C(){C.init.call(this)}Q.exports=C,Q.exports.once=function j(q,X){return new Promise(function(ae,fe){function Pe(Ie){q.removeListener(X,Ae),fe(Ie)}function Ae(){"function"==typeof q.removeListener&&q.removeListener("error",Pe),ae([].slice.call(arguments))}Z(q,X,Ae,{once:!0}),"error"!==X&&function z(q,X,ae){"function"==typeof q.on&&Z(q,"error",X,ae)}(q,Pe,{once:!0})})},C.EventEmitter=C,C.prototype._events=void 0,C.prototype._eventsCount=0,C.prototype._maxListeners=void 0;var P=10;function k(q){if("function"!=typeof q)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof q)}function O(q){return void 0===q._maxListeners?C.defaultMaxListeners:q._maxListeners}function E(q,X,ae,fe){var Pe,Ae,Ie;if(k(ae),void 0===(Ae=q._events)?(Ae=q._events=Object.create(null),q._eventsCount=0):(void 0!==Ae.newListener&&(q.emit("newListener",X,ae.listener?ae.listener:ae),Ae=q._events),Ie=Ae[X]),void 0===Ie)Ie=Ae[X]=ae,++q._eventsCount;else if("function"==typeof Ie?Ie=Ae[X]=fe?[ae,Ie]:[Ie,ae]:fe?Ie.unshift(ae):Ie.push(ae),(Pe=O(q))>0&&Ie.length>Pe&&!Ie.warned){Ie.warned=!0;var De=new Error("Possible EventEmitter memory leak detected. "+Ie.length+" "+String(X)+" listeners added. Use emitter.setMaxListeners() to increase limit");De.name="MaxListenersExceededWarning",De.emitter=q,De.type=X,De.count=Ie.length,function f(q){console&&console.warn&&console.warn(q)}(De)}return q}function N(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function M(q,X,ae){var fe={fired:!1,wrapFn:void 0,target:q,type:X,listener:ae},Pe=N.bind(fe);return Pe.listener=ae,fe.wrapFn=Pe,Pe}function x(q,X,ae){var fe=q._events;if(void 0===fe)return[];var Pe=fe[X];return void 0===Pe?[]:"function"==typeof Pe?ae?[Pe.listener||Pe]:[Pe]:ae?function D(q){for(var X=new Array(q.length),ae=0;ae<X.length;++ae)X[ae]=q[ae].listener||q[ae];return X}(Pe):S(Pe,Pe.length)}function I(q){var X=this._events;if(void 0!==X){var ae=X[q];if("function"==typeof ae)return 1;if(void 0!==ae)return ae.length}return 0}function S(q,X){for(var ae=new Array(X),fe=0;fe<X;++fe)ae[fe]=q[fe];return ae}function Z(q,X,ae,fe){if("function"==typeof q.on)fe.once?q.once(X,ae):q.on(X,ae);else{if("function"!=typeof q.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof q);q.addEventListener(X,function Pe(Ae){fe.once&&q.removeEventListener(X,Pe),ae(Ae)})}}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return P},set:function(q){if("number"!=typeof q||q<0||A(q))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+q+".");P=q}}),C.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},C.prototype.setMaxListeners=function(X){if("number"!=typeof X||X<0||A(X))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+X+".");return this._maxListeners=X,this},C.prototype.getMaxListeners=function(){return O(this)},C.prototype.emit=function(X){for(var ae=[],fe=1;fe<arguments.length;fe++)ae.push(arguments[fe]);var Pe="error"===X,Ae=this._events;if(void 0!==Ae)Pe=Pe&&void 0===Ae.error;else if(!Pe)return!1;if(Pe){var Ie;if(ae.length>0&&(Ie=ae[0]),Ie instanceof Error)throw Ie;var De=new Error("Unhandled error."+(Ie?" ("+Ie.message+")":""));throw De.context=Ie,De}var Te=Ae[X];if(void 0===Te)return!1;if("function"==typeof Te)v(Te,this,ae);else{var xe=Te.length,Ge=S(Te,xe);for(fe=0;fe<xe;++fe)v(Ge[fe],this,ae)}return!0},C.prototype.on=C.prototype.addListener=function(X,ae){return E(this,X,ae,!1)},C.prototype.prependListener=function(X,ae){return E(this,X,ae,!0)},C.prototype.once=function(X,ae){return k(ae),this.on(X,M(this,X,ae)),this},C.prototype.prependOnceListener=function(X,ae){return k(ae),this.prependListener(X,M(this,X,ae)),this},C.prototype.off=C.prototype.removeListener=function(X,ae){var fe,Pe,Ae,Ie,De;if(k(ae),void 0===(Pe=this._events))return this;if(void 0===(fe=Pe[X]))return this;if(fe===ae||fe.listener===ae)0==--this._eventsCount?this._events=Object.create(null):(delete Pe[X],Pe.removeListener&&this.emit("removeListener",X,fe.listener||ae));else if("function"!=typeof fe){for(Ae=-1,Ie=fe.length-1;Ie>=0;Ie--)if(fe[Ie]===ae||fe[Ie].listener===ae){De=fe[Ie].listener,Ae=Ie;break}if(Ae<0)return this;0===Ae?fe.shift():function L(q,X){for(;X+1<q.length;X++)q[X]=q[X+1];q.pop()}(fe,Ae),1===fe.length&&(Pe[X]=fe[0]),void 0!==Pe.removeListener&&this.emit("removeListener",X,De||ae)}return this},C.prototype.removeAllListeners=function(X){var ae,fe,Pe;if(void 0===(fe=this._events))return this;if(void 0===fe.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==fe[X]&&(0==--this._eventsCount?this._events=Object.create(null):delete fe[X]),this;if(0===arguments.length){var Ie,Ae=Object.keys(fe);for(Pe=0;Pe<Ae.length;++Pe)"removeListener"!==(Ie=Ae[Pe])&&this.removeAllListeners(Ie);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(ae=fe[X]))this.removeListener(X,ae);else if(void 0!==ae)for(Pe=ae.length-1;Pe>=0;Pe--)this.removeListener(X,ae[Pe]);return this},C.prototype.listeners=function(X){return x(this,X,!0)},C.prototype.rawListeners=function(X){return x(this,X,!1)},C.listenerCount=function(q,X){return"function"==typeof q.listenerCount?q.listenerCount(X):I.call(q,X)},C.prototype.listenerCount=I,C.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]}},84606:function(module){var F;typeof self<"u"&&self,F=function(){return function(Q){var F={};function v(y){if(F[y])return F[y].exports;var f=F[y]={i:y,l:0,exports:{}};return Q[y].call(f.exports,f,f.exports,v),f.l=1,f.exports}return v.m=Q,v.c=F,v.d=function(y,f,A){v.o(y,f)||Object.defineProperty(y,f,{enumerable:1,get:A})},v.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:1})},v.t=function(y,f){if(1&f&&(y=v(y)),8&f||4&f&&"object"==typeof y&&y&&y.__esModule)return y;var A=Object.create(null);if(v.r(A),Object.defineProperty(A,"default",{enumerable:1,value:y}),2&f&&"string"!=typeof y)for(var C in y)v.d(A,C,function(P){return y[P]}.bind(null,C));return A},v.n=function(y){var f=y&&y.__esModule?function(){return y.default}:function(){return y};return v.d(f,"a",f),f},v.o=function(y,f){return Object.prototype.hasOwnProperty.call(y,f)},v.p="",v(v.s=1)}([function(module,__nested_webpack_exports__,__webpack_require__){"use strict";function get(){if(typeof DOMParser<"u")return DOMParser;try{return eval("require")("xmldom").DOMParser}catch(Q){return}}__nested_webpack_exports__.a={get}},function(Q,F,v){"use strict";function y(W,ce,Oe){for(var Ze=[],at=0;at<Oe&&ce+at<W.byteLength;at++)Ze.push(W.getUint8(ce+at));return A(Ze)}function f(W,ce,Oe){for(var Ze=[],at=0;at<Oe&&ce+at<W.byteLength;at+=2)Ze.push(W.getUint16(ce+at));return A(Ze)}function A(W){return W.map(function(ce){return String.fromCharCode(ce)}).join("")}function C(){for(var W=1;W<arguments.length;W++)for(var ce in arguments[W])arguments[0][ce]=arguments[W][ce];return arguments[0]}function P(W){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(ce){return typeof ce}:function(ce){return ce&&"function"==typeof Symbol&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce})(W)}v.r(F),v.d(F,"errors",function(){return Fo}),v.d(F,"load",function(){return fs}),v.d(F,"loadView",function(){return pc});var k=function(){function W(Oe){if(function(Ze,at){if(!(Ze instanceof at))throw new TypeError("Cannot call a class as a function")}(this,W),"object"!==P(Ze=Oe)||void 0===Ze.length||void 0===Ze.readUInt8||void 0===Ze.readUInt16LE||void 0===Ze.readUInt16BE||void 0===Ze.readUInt32LE||void 0===Ze.readUInt32BE||void 0===Ze.readInt32LE||void 0===Ze.readInt32BE)throw Error("DataView: Passed buffer type is unsupported.");var Ze;this.buffer=Oe,this.byteLength=this.buffer.length}var ce;return(ce=[{key:"getUint8",value:function(Oe){return this.buffer.readUInt8(Oe)}},{key:"getUint16",value:function(Oe,Ze){return Ze?this.buffer.readUInt16LE(Oe):this.buffer.readUInt16BE(Oe)}},{key:"getUint32",value:function(Oe,Ze){return Ze?this.buffer.readUInt32LE(Oe):this.buffer.readUInt32BE(Oe)}},{key:"getInt32",value:function(Oe,Ze){return Ze?this.buffer.readInt32LE(Oe):this.buffer.readInt32BE(Oe)}}])&&function(Oe,Ze){for(var at=0;at<Ze.length;at++){var Ft=Ze[at];Ft.enumerable=Ft.enumerable||0,Ft.configurable=1,"value"in Ft&&(Ft.writable=1),Object.defineProperty(Oe,Ft.key,Ft)}}(W.prototype,ce),W}();function O(W){return W.map(function(ce){return String.fromCharCode(ce)}).join("")}function E(W){if(W.length>=8){var ce=O(W.slice(0,8));if("ASCII\0\0\0"===ce)return O(W.slice(8));if("JIS\0\0\0\0\0"===ce)return"[JIS encoded text]";if("UNICODE\0"===ce)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===ce)return"[Undefined encoding]"}return"Undefined"}function N(W){return W[0][0]/W[0][1]+W[1][0]/W[1][1]/60+W[2][0]/W[2][1]/3600}function M(W,ce){return 65472===W.getUint16(ce)}function x(W,ce){return 65474===W.getUint16(ce)}function I(W,ce){return 65506===W.getUint16(ce)&&"ICC_PROFILE\0"===y(W,ce+4,12)}function S(W,ce){return 65505===W.getUint16(ce)&&"Exif"===y(W,ce+4,4)&&0===W.getUint8(ce+4+4)}function L(W,ce){return 65505===W.getUint16(ce)&&"http://ns.adobe.com/xap/1.0/\0"===y(W,ce+4,29)}function D(W,ce){return 65505===W.getUint16(ce)&&"http://ns.adobe.com/xmp/extension/\0"===y(W,ce+4,35)}function j(W,ce){return{dataOffset:W+33,length:ce-31}}function z(W,ce){return{dataOffset:W+79,length:ce-77}}function Z(W,ce){return 65517===W.getUint16(ce)&&"Photoshop 3.0"===y(W,ce+4,13)&&0===W.getUint8(ce+4+13)}function q(W,ce){var Oe=W.getUint16(ce);return Oe>=65504&&Oe<=65519||65534===Oe||65472===Oe||65474===Oe||65476===Oe||65499===Oe||65501===Oe||65498===Oe}function X(W,ce){return"IHDR"===y(W,ce+4,4)}function ae(W,ce){return"iTXt"===y(W,ce+4,4)&&"XML:com.adobe.xmp\0"===y(W,ce+8,18)}function fe(W,ce){ce+=28;for(var Oe=0;Oe<2&&ce<W.byteLength;)0===W.getUint8(ce)&&Oe++,ce++;if(!(Oe<2))return ce}function Pe(W,ce){var Oe=W.getUint32(ce);return 0===Oe?W.byteLength-ce:1===Oe&&function(Ze,at){return 0===Ze.getUint32(at+8)}(W,ce)?W.getUint32(ce+12):Oe}var Ae=function(W){if((ce=W).byteLength>=4&&(Ze=18761===(Oe=ce).getUint16(0),42===Oe.getUint16(2,Ze)))return{hasAppMarkers:1,tiffHeaderOffset:0};var ce,Oe,Ze;if(function(ce){return ce.byteLength>=2&&65496===ce.getUint16(0)}(W))return function(ce){for(var Oe,Ze,at,Ft,bn,_e,ye,Be=2;Be+4+5<=ce.byteLength;){if(M(ce,Be))Ze=Be+2;else if(x(ce,Be))at=Be+2;else if(S(ce,Be))Oe=ce.getUint16(Be+2),Ft=Be+10;else if(L(ce,Be))_e||(_e=[]),Oe=ce.getUint16(Be+2),_e.push(j(Be,Oe));else if(D(ce,Be))_e||(_e=[]),Oe=ce.getUint16(Be+2),_e.push(z(Be,Oe));else if(Z(ce,Be))Oe=ce.getUint16(Be+2),bn=Be+18;else if(I(ce,Be)){var Ye=Be+18,Et=(Oe=ce.getUint16(Be+2))-16,Vt=ce.getUint8(Be+16),_n=ce.getUint8(Be+17);ye||(ye=[]),ye.push({offset:Ye,length:Et,chunkNumber:Vt,chunksTotal:_n})}else{if(!q(ce,Be))break;Oe=ce.getUint16(Be+2)}Be+=2+Oe}return{hasAppMarkers:Be>2,fileDataOffset:Ze||at,tiffHeaderOffset:Ft,iptcDataOffset:bn,xmpChunks:_e,iccChunks:ye}}(W);if(function(ce){return"\x89PNG\r\n\x1a\n"===y(ce,0,8)}(W))return function(ce){for(var Oe={hasAppMarkers:0},Ze=8;Ze+4+4<=ce.byteLength;){if(X(ce,Ze))Oe.hasAppMarkers=1,Oe.pngHeaderOffset=Ze+8;else if(ae(ce,Ze)){var at=fe(ce,Ze);void 0!==at&&(Oe.hasAppMarkers=1,Oe.xmpChunks=[{dataOffset:at,length:ce.getUint32(Ze+0)-(at-(Ze+8))}])}Ze+=ce.getUint32(Ze+0)+4+4+4}return Oe}(W);if(function(ce){var Oe=y(ce,8,4);return"ftyp"===y(ce,4,4)&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(Oe)}(W))return function(ce){var Oe=function(Vt){for(var _n=0;_n+4+4<=Vt.byteLength;){var kn=Pe(Vt,_n);if(kn>=8&&"meta"===y(Vt,_n+4,4))return{offset:_n,length:kn};_n+=kn}return{offset:void 0,length:0}}(ce),Ze=Oe.offset;if(void 0===Ze)return{hasAppMarkers:0};var Ft=Math.min(Ze+Oe.length,ce.byteLength),bn=function(Vt,_n,kn){for(var In={ilocOffset:void 0,exifItemOffset:void 0,colrOffset:void 0};_n+4<=kn&&(!In.ilocOffset||!In.exifItemOffset||!In.colrOffset);){var to=y(Vt,_n,4);"iloc"===to?In.ilocOffset=_n:"Exif"===to?In.exifItemOffset=_n+-4:"colr"===to&&(In.colrOffset=_n+-4),_n++}return In}(ce,Ze,Ft),Be=bn.colrOffset,Ye=function(Vt,_n,kn,In){if(kn&&_n&&!(_n+2>In)){var to=Vt.getUint16(_n);for(kn+=12;kn+16<=In;){if(Vt.getUint16(kn)===to){var Mr=Vt.getUint32(kn+8);if(Mr+4<=Vt.byteLength)return Mr+(Vt.getUint32(Mr)+4)}kn+=16}}}(ce,bn.exifItemOffset,bn.ilocOffset,Ft),Et=function(Vt,_n,kn){if(_n&&!(_n+12>kn)){var In=y(Vt,_n+8,4);if("prof"===In||"rICC"===In)return[{offset:_n+12,length:Pe(Vt,_n)-12,chunkNumber:1,chunksTotal:1}]}}(ce,Be,Ft);return{hasAppMarkers:void 0!==Ye||void 0!==Et,tiffHeaderOffset:Ye,iccChunks:Et}}(W);if(function(ce){return"RIFF"===y(ce,0,4)&&"WEBP"===y(ce,8,4)}(W))return function(ce){for(var Oe,Ze,at,Ft=12,bn=0;Ft+8<ce.byteLength;){var _e=y(ce,Ft,4),ye=ce.getUint32(Ft+4,1);"EXIF"===_e?(bn=1,Oe="Exif\0\0"===y(ce,Ft+8,6)?Ft+8+6:Ft+8):"XMP "===_e?(bn=1,Ze=[{dataOffset:Ft+8,length:ye}]):"ICCP"===_e&&(bn=1,at=[{offset:Ft+8,length:ye,chunkNumber:1,chunksTotal:1}]),Ft+=8+(ye%2==0?ye:ye+1)}return{hasAppMarkers:bn,tiffHeaderOffset:Oe,xmpChunks:Ze,iccChunks:at}}(W);throw Error("Invalid image format")},Ie={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},De={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Te={getAsciiValue:function(W){return W.map(function(ce){return String.fromCharCode(ce)})},getByteAt:xe,getAsciiAt:function(W,ce){return W.getUint8(ce)},getShortAt:function(W,ce,Oe){return W.getUint16(ce,18761===Oe)},getLongAt:Ge,getRationalAt:function(W,ce,Oe){return[Ge(W,ce,Oe),Ge(W,ce+4,Oe)]},getUndefinedAt:function(W,ce){return xe(W,ce)},getSlongAt:Ue,getSrationalAt:function(W,ce,Oe){return[Ue(W,ce,Oe),Ue(W,ce+4,Oe)]},getIfdPointerAt:function(W,ce,Oe){return Ge(W,ce,Oe)},typeSizes:Ie,tagTypes:De,getTypeSize:function(W){if(void 0===De[W])throw Error("No such type found.");return Ie[De[W]]}};function xe(W,ce){return W.getUint8(ce)}function Ge(W,ce,Oe){return W.getUint32(ce,18761===Oe)}function Ue(W,ce,Oe){return W.getInt32(ce,18761===Oe)}var st={LightSource:function(W){return 1===W?"Daylight":2===W?"Fluorescent":3===W?"Tungsten (incandescent light)":4===W?"Flash":9===W?"Fine weather":10===W?"Cloudy weather":11===W?"Shade":12===W?"Daylight fluorescent (D 5700 \u2013 7100K)":13===W?"Day white fluorescent (N 4600 \u2013 5400K)":14===W?"Cool white fluorescent (W 3900 \u2013 4500K)":15===W?"White fluorescent (WW 3200 \u2013 3700K)":17===W?"Standard light A":18===W?"Standard light B":19===W?"Standard light C":20===W?"D55":21===W?"D65":22===W?"D75":23===W?"D50":24===W?"ISO studio tungsten":255===W?"Other light source":"Unknown"}};function It(W,ce){(null==ce||ce>W.length)&&(ce=W.length);for(var Oe=0,Ze=Array(ce);Oe<ce;Oe++)Ze[Oe]=W[Oe];return Ze}function xt(W,ce){(null==ce||ce>W.length)&&(ce=W.length);for(var Oe=0,Ze=Array(ce);Oe<ce;Oe++)Ze[Oe]=W[Oe];return Ze}var gt={0:{name:"GPSVersionID",description:function(W){return 2===W[0]&&2===W[1]&&0===W[2]&&0===W[3]?"Version 2.2":"Unknown"}},1:{name:"GPSLatitudeRef",description:function(W){var ce=W.join("");return"N"===ce?"North latitude":"S"===ce?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:N},3:{name:"GPSLongitudeRef",description:function(W){var ce=W.join("");return"E"===ce?"East longitude":"W"===ce?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:N},5:{name:"GPSAltitudeRef",description:function(W){return 0===W?"Sea level":1===W?"Sea level reference (negative value)":"Unknown"}},6:{name:"GPSAltitude",description:function(W){return W[0]/W[1]+" m"}},7:{name:"GPSTimeStamp",description:function(W){return W.map(function(ce){var Oe,Ze=function(Ft){if(Array.isArray(Ft))return Ft}(Oe=ce)||function(Ft,bn){if(typeof Symbol<"u"&&Symbol.iterator in Object(Ft)){var _e=[],ye=1,Be=0,Ye=void 0;try{for(var Et,Vt=Ft[Symbol.iterator]();!(ye=(Et=Vt.next()).done)&&(_e.push(Et.value),2!==_e.length);ye=1);}catch(_n){Be=1,Ye=_n}finally{try{ye||null==Vt.return||Vt.return()}finally{if(Be)throw Ye}}return _e}}(Oe)||function(Ft,bn){if(Ft){if("string"==typeof Ft)return xt(Ft,2);var _e=Object.prototype.toString.call(Ft).slice(8,-1);return"Object"===_e&&Ft.constructor&&(_e=Ft.constructor.name),"Map"===_e||"Set"===_e?Array.from(_e):"Arguments"===_e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e)?xt(Ft,2):void 0}}(Oe)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),at=Ze[0]/Ze[1];return/^\d(\.|$)/.test("".concat(at))?"0".concat(at):at}).join(":")}},8:"GPSSatellites",9:{name:"GPSStatus",description:function(W){var ce=W.join("");return"A"===ce?"Measurement in progress":"V"===ce?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:function(W){var ce=W.join("");return"2"===ce?"2-dimensional measurement":"3"===ce?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:function(W){var ce=W.join("");return"K"===ce?"Kilometers per hour":"M"===ce?"Miles per hour":"N"===ce?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:function(W){var ce=W.join("");return"T"===ce?"True direction":"M"===ce?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:function(W){var ce=W.join("");return"T"===ce?"True direction":"M"===ce?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:function(W){var ce=W.join("");return"N"===ce?"North latitude":"S"===ce?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:function(W){return W[0][0]/W[0][1]+W[1][0]/W[1][1]/60+W[2][0]/W[2][1]/3600}},21:{name:"GPSDestLongitudeRef",description:function(W){var ce=W.join("");return"E"===ce?"East longitude":"W"===ce?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:function(W){return W[0][0]/W[0][1]+W[1][0]/W[1][1]/60+W[2][0]/W[2][1]/3600}},23:{name:"GPSDestBearingRef",description:function(W){var ce=W.join("");return"T"===ce?"True direction":"M"===ce?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:function(W){var ce=W.join("");return"K"===ce?"Kilometers":"M"===ce?"Miles":"N"===ce?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:E},28:{name:"GPSAreaInformation",description:E},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(W){return 0===W?"Measurement without differential correction":1===W?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},At={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(W){return O(W)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},ht=C({},{11:"ProcessingSoftware",254:{name:"SubfileType",description:function(W){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[W]||"Unknown"}},255:{name:"OldSubfileType",description:function(W){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[W]||"Unknown"}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(W){return{1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[W]||"Unknown"}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(W){return{1:"Normal",2:"Reversed"}[W]||"Unknown"}},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:function(W){return 1===W?"top-left":2===W?"top-right":3===W?"bottom-right":4===W?"bottom-left":5===W?"left-top":6===W?"right-top":7===W?"right-bottom":8===W?"left-bottom":"Undefined"}},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:function(W){return""+Math.round(W[0]/W[1])}},283:{name:"YResolution",description:function(W){return""+Math.round(W[0]/W[1])}},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:function(W){return""+Math.round(W[0]/W[1])}},287:{name:"YPosition",description:function(W){return""+Math.round(W[0]/W[1])}},290:{name:"GrayResponseUnit",description:function(W){return{1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[W]||"Unknown"}},296:{name:"ResolutionUnit",description:function(W){return 2===W?"inches":3===W?"centimeters":"Unknown"}},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(W){return W.map(function(ce){return"".concat(ce[0],"/").concat(ce[1])}).join(", ")}},319:{name:"PrimaryChromaticities",description:function(W){return W.map(function(ce){return"".concat(ce[0],"/").concat(ce[1])}).join(", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(W){return{1:"CMYK",2:"Not CMYK"}[W]||"Unknown"}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(W){return{0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[W]||"Unknown"}},339:{name:"SampleFormat",description:function(W){var ce={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(W)?W.map(function(Oe){return ce[Oe]||"Unknown"}).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:function(W){return W.map(function(ce){return""+ce[0]/ce[1]}).join("/")}},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(W){return 1===W?"centered":2===W?"co-sited":"undefined "+W}},532:{name:"ReferenceBlackWhite",description:function(W){return W.map(function(ce){return""+ce[0]/ce[1]}).join(", ")}},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:function(W){return W.join("; ")}},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:function(W){return{0:"Unsafe",1:"Safe"}[W]||"Unknown"}},50778:{name:"CalibrationIlluminant1",description:st.LightSource},50779:{name:"CalibrationIlluminant2",description:st.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:function(W){return{0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[W]||"Unknown"}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(W){return{1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[W]||"Unknown"}},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:function(W){return{0:"Linear",1:"sRGB"}[W]||"Unknown"}},51108:{name:"ProfileLookTableEncoding",description:function(W){return{0:"Linear",1:"sRGB"}[W]||"Unknown"}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(W){return{0:"Auto",1:"None"}[W]||"Unknown"}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"},{33434:{name:"ExposureTime",description:function(W){return 0!==W[0]?"1/".concat(Math.round(W[1]/W[0])):"0/".concat(W[1])}},33437:{name:"FNumber",description:function(W){return"f/".concat(W[0]/W[1])}},34850:{name:"ExposureProgram",description:function(W){return 0===W?"Undefined":1===W?"Manual":2===W?"Normal program":3===W?"Aperture priority":4===W?"Shutter priority":5===W?"Creative program":6===W?"Action program":7===W?"Portrait mode":8===W?"Landscape mode":9===W?"Bulb":"Unknown"}},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:function(W){return{1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[W]||"Unknown"}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:function(W){return O(W)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:function(W){return W.map(function(ce){return 49===ce?"Y":50===ce?"Cb":51===ce?"Cr":52===ce?"R":53===ce?"G":54===ce?"B":void 0}).join("")}},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:function(W){return"1/".concat(Math.round(Math.pow(2,W[0]/W[1])))}},37378:{name:"ApertureValue",description:function(W){return Math.pow(Math.sqrt(2),W[0]/W[1]).toFixed(2)}},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:function(W){return Math.pow(Math.sqrt(2),W[0]/W[1]).toFixed(2)}},37382:{name:"SubjectDistance",description:function(W){return W[0]/W[1]+" m"}},37383:{name:"MeteringMode",description:function(W){return 1===W?"Average":2===W?"CenterWeightedAverage":3===W?"Spot":4===W?"MultiSpot":5===W?"Pattern":6===W?"Partial":255===W?"Other":"Unknown"}},37384:{name:"LightSource",description:st.LightSource},37385:{name:"Flash",description:function(W){return 0===W?"Flash did not fire":1===W?"Flash fired":5===W?"Strobe return light not detected":7===W?"Strobe return light detected":9===W?"Flash fired, compulsory flash mode":13===W?"Flash fired, compulsory flash mode, return light not detected":15===W?"Flash fired, compulsory flash mode, return light detected":16===W?"Flash did not fire, compulsory flash mode":24===W?"Flash did not fire, auto mode":25===W?"Flash fired, auto mode":29===W?"Flash fired, auto mode, return light not detected":31===W?"Flash fired, auto mode, return light detected":32===W?"No flash function":65===W?"Flash fired, red-eye reduction mode":69===W?"Flash fired, red-eye reduction mode, return light not detected":71===W?"Flash fired, red-eye reduction mode, return light detected":73===W?"Flash fired, compulsory flash mode, red-eye reduction mode":77===W?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===W?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===W?"Flash fired, auto mode, red-eye reduction mode":93===W?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===W?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"}},37386:{name:"FocalLength",description:function(W){return W[0]/W[1]+" mm"}},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(W){return{C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[W]||"Unknown"}},37395:"ImageHistory",37396:{name:"SubjectArea",description:function(W){return 2===W.length?"Location; X: ".concat(W[0],", Y: ").concat(W[1]):3===W.length?"Circle; X: ".concat(W[0],", Y: ").concat(W[1],", diameter: ").concat(W[2]):4===W.length?"Rectangle; X: ".concat(W[0],", Y: ").concat(W[1],", width: ").concat(W[2],", height: ").concat(W[3]):"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:E},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37888:{name:"AmbientTemperature",description:function(W){return W[0]/W[1]+" \xb0C"}},37889:{name:"Humidity",description:function(W){return W[0]/W[1]+" %"}},37890:{name:"Pressure",description:function(W){return W[0]/W[1]+" hPa"}},37891:{name:"WaterDepth",description:function(W){return W[0]/W[1]+" m"}},37892:{name:"Acceleration",description:function(W){return W[0]/W[1]+" mGal"}},37893:{name:"CameraElevationAngle",description:function(W){return W[0]/W[1]+" \xb0"}},40960:{name:"FlashpixVersion",description:function(W){return W.map(function(ce){return String.fromCharCode(ce)}).join("")}},40961:{name:"ColorSpace",description:function(W){return 1===W?"sRGB":65535===W?"Uncalibrated":"Unknown"}},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:function(){return"[Raw SFR table data]"}},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:function(W){return 2===W?"inches":3===W?"centimeters":"Unknown"}},41492:{name:"SubjectLocation",description:function(W){var ce,Oe=function(Ft){if(Array.isArray(Ft))return Ft}(ce=W)||function(Ft,bn){if(typeof Symbol<"u"&&Symbol.iterator in Object(Ft)){var _e=[],ye=1,Be=0,Ye=void 0;try{for(var Et,Vt=Ft[Symbol.iterator]();!(ye=(Et=Vt.next()).done)&&(_e.push(Et.value),2!==_e.length);ye=1);}catch(_n){Be=1,Ye=_n}finally{try{ye||null==Vt.return||Vt.return()}finally{if(Be)throw Ye}}return _e}}(ce)||function(Ft,bn){if(Ft){if("string"==typeof Ft)return It(Ft,2);var _e=Object.prototype.toString.call(Ft).slice(8,-1);return"Object"===_e&&Ft.constructor&&(_e=Ft.constructor.name),"Map"===_e||"Set"===_e?Array.from(_e):"Arguments"===_e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e)?It(Ft,2):void 0}}(ce)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),at=Oe[1];return"X: ".concat(Oe[0],", Y: ").concat(at)}},41493:"ExposureIndex",41495:{name:"SensingMethod",description:function(W){return 1===W?"Undefined":2===W?"One-chip color area sensor":3===W?"Two-chip color area sensor":4===W?"Three-chip color area sensor":5===W?"Color sequential area sensor":7===W?"Trilinear sensor":8===W?"Color sequential linear sensor":"Unknown"}},41728:{name:"FileSource",description:function(W){return 3===W?"DSC":"Unknown"}},41729:{name:"SceneType",description:function(W){return 1===W?"A directly photographed image":"Unknown"}},41730:{name:"CFAPattern",description:function(){return"[Raw CFA pattern table data]"}},41985:{name:"CustomRendered",description:function(W){return 0===W?"Normal process":1===W?"Custom process":"Unknown"}},41986:{name:"ExposureMode",description:function(W){return 0===W?"Auto exposure":1===W?"Manual exposure":2===W?"Auto bracket":"Unknown"}},41987:{name:"WhiteBalance",description:function(W){return 0===W?"Auto white balance":1===W?"Manual white balance":"Unknown"}},41988:{name:"DigitalZoomRatio",description:function(W){return 0===W[0]?"Digital zoom was not used":""+W[0]/W[1]}},41989:{name:"FocalLengthIn35mmFilm",description:function(W){return 0===W?"Unknown":W}},41990:{name:"SceneCaptureType",description:function(W){return 0===W?"Standard":1===W?"Landscape":2===W?"Portrait":3===W?"Night scene":"Unknown"}},41991:{name:"GainControl",description:function(W){return 0===W?"None":1===W?"Low gain up":2===W?"High gain up":3===W?"Low gain down":4===W?"High gain down":"Unknown"}},41992:{name:"Contrast",description:function(W){return 0===W?"Normal":1===W?"Soft":2===W?"Hard":"Unknown"}},41993:{name:"Saturation",description:function(W){return 0===W?"Normal":1===W?"Low saturation":2===W?"High saturation":"Unknown"}},41994:{name:"Sharpness",description:function(W){return 0===W?"Normal":1===W?"Soft":2===W?"Hard":"Unknown"}},41995:{name:"DeviceSettingDescription",description:function(){return"[Raw device settings table data]"}},41996:{name:"SubjectDistanceRange",description:function(W){return 1===W?"Macro":2===W?"Close view":3===W?"Distant view":"Unknown"}},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:function(W){var ce="".concat(W[0][0]/W[0][1],"-").concat(W[1][0]/W[1][1]," mm");return 0===W[3][1]?"".concat(ce," f/?"):"".concat(ce," f/").concat(1/(W[2][1]/W[2][1]/(W[3][0]/W[3][1])))}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(W){return{1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[W]||"Unknown"}},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"}),dt={"0th":ht,exif:ht,gps:gt,interoperability:At},kt={1:Te.getByteAt,2:Te.getAsciiAt,3:Te.getShortAt,4:Te.getLongAt,5:Te.getRationalAt,7:Te.getUndefinedAt,9:Te.getSlongAt,10:Te.getSrationalAt,13:Te.getIfdPointerAt},St=function(W,ce){var at,Ft,bn,ye,Oe=function(at,Ft){if(18761===at.getUint16(Ft))return 18761;if(19789===at.getUint16(Ft))return 19789;throw Error("Illegal byte order value. Faulty image.")}(W,ce),Ze=$i(at=W,"0th",Ft=ce,(ye=Ft)+Te.getLongAt(at,ye+4,bn=Oe),bn);return function(at,Ft,bn,_e){return void 0!==at["Interoperability IFD Pointer"]?C(at,$i(Ft,"interoperability",bn,bn+at["Interoperability IFD Pointer"].value,_e)):at}(Ze=function(at,Ft,bn,_e){return void 0!==at["GPS Info IFD Pointer"]?C(at,$i(Ft,"gps",bn,bn+at["GPS Info IFD Pointer"].value,_e)):at}(Ze=function(at,Ft,bn,_e){return void 0!==at["Exif IFD Pointer"]?C(at,$i(Ft,"exif",bn,bn+at["Exif IFD Pointer"].value,_e)):at}(Ze,W,ce,Oe),W,ce,Oe),W,ce,Oe)};function $i(W,ce,Oe,Ze,at){var Et,Vt,_n,Ft=Te.getTypeSize("SHORT"),bn={},_e=(Et=W,_n=at,(Vt=Ze)+Te.getTypeSize("SHORT")<=Et.byteLength?Te.getShortAt(Et,Vt,_n):0);Ze+=Ft;for(var ye=0;ye<_e&&!(Ze+12>W.byteLength);ye++){var Be=Xr(W,ce,Oe,Ze,at);void 0!==Be&&(bn[Be.name]={id:Be.id,value:Be.value,description:Be.description}),Ze+=12}if(Ze<W.byteLength-Te.getTypeSize("LONG")){var Ye=Te.getLongAt(W,Ze,at);0!==Ye&&(bn.Thumbnail=$i(W,ce,Oe,Oe+Ye,at))}return bn}function Xr(W,ce,Oe,Ze,at){var Ft,bn=Te.getTypeSize("SHORT"),_e=bn+Te.getTypeSize("SHORT"),ye=_e+Te.getTypeSize("LONG"),Be=Te.getShortAt(W,Ze,at),Ye=Te.getShortAt(W,Ze+bn,at),Et=Te.getLongAt(W,Ze+_e,at);if(void 0!==Te.typeSizes[Ye]){if(Te.typeSizes[Ye]*Et<=Te.getTypeSize("LONG"))Ft=wo(W,Ze+ye,Ye,Et,at);else{var Vt=Te.getLongAt(W,Ze+ye,at);Ft=Oe+Vt+Te.typeSizes[Ye]*Et<=W.byteLength?wo(W,Oe+Vt,Ye,Et,at,33723===Be):"<faulty value>"}Ye===Te.tagTypes.ASCII&&(Ft=function(In){try{return In.map(function(to){return decodeURIComponent(escape(to))})}catch(to){return In}}(Ft=function(In){for(var to=[],Mr=0,lu=0;lu<In.length;lu++)"\0"!==In[lu]?(void 0===to[Mr]&&(to[Mr]=""),to[Mr]+=In[lu]):Mr++;return to}(Ft)));var _n="undefined-".concat(Be),kn=Ft;if(void 0!==dt[ce][Be])if(void 0!==dt[ce][Be].name&&void 0!==dt[ce][Be].description){_n=dt[ce][Be].name;try{kn=dt[ce][Be].description(Ft)}catch(In){kn=uc(Ft)}}else Ye===Te.tagTypes.RATIONAL||Ye===Te.tagTypes.SRATIONAL?(_n=dt[ce][Be],kn=""+Ft[0]/Ft[1]):(_n=dt[ce][Be],kn=uc(Ft));return{id:Be,name:_n,value:Ft,description:kn}}}function wo(W,ce,Oe,Ze,at){var bn=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(Ze*=Te.typeSizes[Oe],Oe=Te.tagTypes.BYTE);for(var _e=0;_e<Ze;_e++)bn.push(kt[Oe](W,ce,at)),ce+=Te.typeSizes[Oe];return Oe===Te.tagTypes.ASCII?bn=Te.getAsciiValue(bn):1===bn.length&&(bn=bn[0]),bn}function uc(W){return W instanceof Array?W.join(", "):W}var gr=function(W,ce){var Oe=Te.getShortAt(W,ce),Ze=function(at,Ft,bn){if(!(8>bn)){var _e=Te.getByteAt(at,Ft+7);return{value:_e,description:""+_e}}}(W,ce,Oe);return{"Bits Per Sample":Rr(W,ce,Oe),"Image Height":Le(W,ce,Oe),"Image Width":tt(W,ce,Oe),"Color Components":Ze,Subsampling:Ze&&_t(W,ce,Ze.value,Oe)}};function Rr(W,ce,Oe){if(!(3>Oe)){var Ze=Te.getByteAt(W,ce+2);return{value:Ze,description:""+Ze}}}function Le(W,ce,Oe){if(!(5>Oe)){var Ze=Te.getShortAt(W,ce+3);return{value:Ze,description:"".concat(Ze,"px")}}}function tt(W,ce,Oe){if(!(7>Oe)){var Ze=Te.getShortAt(W,ce+5);return{value:Ze,description:"".concat(Ze,"px")}}}function _t(W,ce,Oe,Ze){if(!(8+3*Oe>Ze)){for(var at=[],Ft=0;Ft<Oe;Ft++){var bn=ce+8+3*Ft;at.push([Te.getByteAt(W,bn),Te.getByteAt(W,bn+1),Te.getByteAt(W,bn+2)])}return{value:at,description:at.length>1?ut(at)+Wt(at):""}}}function ut(W){var ce={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return W.map(function(Oe){return ce[Oe[0]]}).join("")}function Wt(W){var ce={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===W.length||void 0===W[0][1]||void 0===ce[W[0][1]]?"":ce[W[0][1]]}var Bt={iptc:{256:{name:"Model Version",description:function(W){return""+((W[0]<<8)+W[1])}},261:{name:"Destination",repeatable:1},276:{name:"File Format",description:function(W){return""+((W[0]<<8)+W[1])}},278:{name:"File Format Version",description:function(W){return""+((W[0]<<8)+W[1])}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:On},336:{name:"Time Sent",description:zt},346:{name:"Coded Character Set",description:zn,encoding_name:zn},356:"UNO",376:{name:"ARM Identifier",description:function(W){return""+((W[0]<<8)+W[1])}},378:{name:"ARM Version",description:function(W){return""+((W[0]<<8)+W[1])}},512:{name:"Record Version",description:function(W){return""+((W[0]<<8)+W[1])}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(W){return"01"===O(W)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(W){var ce=O(W).split(":");return ce[2]+(ce[3]?"/"+ce[3]:"")+(ce[4]?"/"+ce[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:1},534:"Fixture Identifier",537:{name:"Keywords",repeatable:1},538:{name:"Content Location Code",repeatable:1},539:{name:"Content Location Name",repeatable:1},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(W){var ce=O(W);return"01"===ce?"Object Kill":"02"===ce?"Object Replace":"03"===ce?"Object Append":"04"===ce?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:1},559:{name:"Reference Date",repeatable:1},562:{name:"Reference Number",repeatable:1},567:{name:"Date Created",description:On},572:{name:"Time Created",description:zt},574:{name:"Digital Creation Date",description:On},575:{name:"Digital Creation Time",description:zt},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(W){var ce=O(W);return"a"===ce?"morning":"p"===ce?"evening":"b"===ce?"both":"Unknown"}},592:{name:"By-line",repeatable:1},597:{name:"By-line Title",repeatable:1},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:1},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:1},637:{name:"Rasterized Caption",description:function(W){return W}},642:"Image Type",643:{name:"Image Orientation",description:function(W){var ce=O(W);return"P"===ce?"Portrait":"L"===ce?"Landscape":"S"===ce?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(W){var ce=O(W),Oe=ce.charAt(0),Ze=ce.charAt(1),at="";return"1"===Oe?at+="Mono":"2"===Oe&&(at+="Stereo"),"A"===Ze?at+=", actuality":"C"===Ze?at+=", question and answer session":"M"===Ze?at+=", music, transmitted by itself":"Q"===Ze?at+=", response to a question":"R"===Ze?at+=", raw sound":"S"===Ze?at+=", scener":"V"===Ze?at+=", voicer":"W"===Ze&&(at+=", wrap"),""!==at?at:ce}},663:{name:"Audio Sampling Rate",description:function(W){return parseInt(O(W),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(W){var ce=parseInt(O(W),10);return ce+(1===ce?" bit":" bits")}},665:{name:"Audio Duration",description:function(W){var ce=O(W);return ce.length>=6?ce.substr(0,2)+":"+ce.substr(2,2)+":"+ce.substr(4,2):ce}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:function(W){return 2===W.length?"ObjectData Preview File Format":"Record 2 destination"},description:function(W){if(2===W.length){var ce=(W[0]<<8)+W[1];return 0===ce?"No ObjectData":1===ce?"IPTC-NAA Digital Newsphoto Parameter Record":2===ce?"IPTC7901 Recommended Message Format":3===ce?"Tagged Image File Format (Adobe/Aldus Image data)":4===ce?"Illustrator (Adobe Graphics data)":5===ce?"AppleSingle (Apple Computer Inc)":6===ce?"NAA 89-3 (ANPA 1312)":7===ce?"MacBinary II":8===ce?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===ce?"United Press International ANPA 1312 variant":10===ce?"United Press International Down-Load Message":11===ce?"JPEG File Interchange (JFIF)":12===ce?"Photo-CD Image-Pac (Eastman Kodak)":13===ce?"Microsoft Bit Mapped Graphics File [*.BMP]":14===ce?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===ce?"Audio plus Moving Video [*.AVI] (Microsoft)":16===ce?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===ce?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===ce?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===ce?"RIFF Wave (Microsoft Corporation)":20===ce?"Freehand (Macromedia/Aldus)":21===ce?'Hypertext Markup Language "HTML" (The Internet Society)':22===ce?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===ce?"MPEG 2 Audio Layer 3, ISO/IEC":24===ce?"Portable Document File (*.PDF) Adobe":25===ce?"News Industry Text Format (NITF)":26===ce?"Tape Archive (*.TAR)":27===ce?"Tidningarnas Telegrambyr\xe5 NITF version (TTNITF DTD)":28===ce?"Ritzaus Bureau NITF version (RBNITF DTD)":29===ce?"Corel Draw [*.CDR]":"Unknown format ".concat(ce)}return O(W)}},713:{name:"ObjectData Preview File Format Version",description:function(W,ce){var Oe={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},Ze=O(W);if(ce["ObjectData Preview File Format"]){var at=O(ce["ObjectData Preview File Format"].value);if(Oe[at]&&Oe[at][Ze])return Oe[at][Ze]}return Ze}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:function(W){return W[0].toString()}},1812:{name:"Max Subfile Size",description:function(W){for(var ce=0,Oe=0;Oe<W.length;Oe++)ce=(ce<<8)+W[Oe];return ce.toString()}},1882:{name:"ObjectData Size Announced",description:function(W){for(var ce=0,Oe=0;Oe<W.length;Oe++)ce=(ce<<8)+W[Oe];return ce.toString()}},1887:{name:"Maximum ObjectData Size",description:function(W){for(var ce=0,Oe=0;Oe<W.length;Oe++)ce=(ce<<8)+W[Oe];return ce.toString()}}}};function On(W){var ce=O(W);return ce.length>=8?ce.substr(0,4)+"-"+ce.substr(4,2)+"-"+ce.substr(6,2):ce}function zt(W){var ce=O(W),Oe=ce;return ce.length>=6&&(Oe=ce.substr(0,2)+":"+ce.substr(2,2)+":"+ce.substr(4,2),11===ce.length&&(Oe+=ce.substr(6,1)+ce.substr(7,2)+":"+ce.substr(9,2))),Oe}function zn(W){var ce=O(W);return"\x1b%G"===ce?"UTF-8":"\x1b%5"===ce?"Windows-1252":"\x1b%/G"===ce?"UTF-8 Level 1":"\x1b%/H"===ce?"UTF-8 Level 2":"\x1b%/I"===ce?"UTF-8 Level 3":"\x1b/A"===ce?"ISO-8859-1":"\x1b/B"===ce?"ISO-8859-2":"\x1b/C"===ce?"ISO-8859-3":"\x1b/D"===ce?"ISO-8859-4":"\x1b/@"===ce?"ISO-8859-5":"\x1b/G"===ce?"ISO-8859-6":"\x1b/F"===ce?"ISO-8859-7":"\x1b/H"===ce?"ISO-8859-8":"Unknown"}var Gr=function(W,ce){var Oe=function(){if(typeof TextDecoder<"u")return TextDecoder}();if(typeof Oe<"u"&&void 0!==W)try{return new Oe(W).decode(Uint8Array.from(ce))}catch(Ze){}return function(Ze){try{return decodeURIComponent(escape(Ze))}catch(at){return Ze}}(ce.map(function(Ze){return String.fromCharCode(Ze)}).join(""))},ua=function(W,ce){try{if(Array.isArray(W))return sr(new DataView(Uint8Array.from(W).buffer),{size:W.length},0);var Oe=function(Ze,at){for(;at+12<=Ze.byteLength;){var Ft=gi(Ze,at);if(si(Ft))return{naaBlock:Ft,dataOffset:at+12};at+=12+Ft.size+To(Ft)}throw Error("No IPTC NAA resource block.")}(W,ce);return sr(W,Oe.naaBlock,Oe.dataOffset)}catch(Ze){return{}}};function gi(W,ce){if(943868237!==W.getUint32(ce,0))throw Error("Not an IPTC resource block.");return{type:W.getUint16(ce+4),size:W.getUint16(ce+10)}}function si(W){return 1028===W.type}function To(W){return W.size%2!=0?1:0}function sr(W,ce,Oe){for(var Ze={},at=void 0,Ft=Oe+ce.size;Oe<Ft&&Oe<W.byteLength;){var bn=da(W,Oe,Ze,at),_e=bn.tag,ye=bn.tagSize;if(null===_e)break;"encoding"in _e&&(at=_e.encoding),void 0===Ze[_e.name]||void 0===_e.repeatable?Ze[_e.name]={id:_e.id,value:_e.value,description:_e.description}:(Ze[_e.name]instanceof Array||(Ze[_e.name]=[{id:Ze[_e.name].id,value:Ze[_e.name].value,description:Ze[_e.name].description}]),Ze[_e.name].push({id:_e.id,value:_e.value,description:_e.description})),Oe+=5+ye}return Ze}function da(W,ce,Oe,Ze){if(28!==W.getUint8(ce))return{tag:null,tagSize:0};var ye,at=W.getUint16(ce+1),Ft=W.getUint16(ce+3),bn=function(ye,Be,Ye){for(var Et=[],Vt=0;Vt<Ye;Vt++)Et.push(ye.getUint8(Be+Vt));return Et}(W,ce+5,Ft),_e={id:at,name:ms(Bt.iptc[at],at,bn),value:bn,description:_d(Bt.iptc[at],bn,Oe,Ze)};return Bt.iptc[ye=at]&&Bt.iptc[ye].repeatable&&(_e.repeatable=1),function(ye){return Bt.iptc[ye]&&void 0!==Bt.iptc[ye].encoding_name}(at)&&(_e.encoding=Bt.iptc[at].encoding_name(bn)),{tag:_e,tagSize:Ft}}function ms(W,ce,Oe){return W?"string"==typeof W?W:"function"==typeof W.name?W.name(Oe):W.name:"undefined-".concat(ce)}function _d(W,ce,Oe,Ze){if((at=W)&&void 0!==at.description)try{return W.description(ce,Oe)}catch(at){}var at;return function(at,Ft){return at&&Ft instanceof Array}(W,ce)?Gr(Ze,ce):ce}function $a(W,ce){(null==ce||ce>W.length)&&(ce=W.length);for(var Oe=0,Ze=Array(ce);Oe<ce;Oe++)Ze[Oe]=W[Oe];return Ze}var xs={"tiff:Orientation":function(W){return"1"===W?"Horizontal (normal)":"2"===W?"Mirror horizontal":"3"===W?"Rotate 180":"4"===W?"Mirror vertical":"5"===W?"Mirror horizontal and rotate 270 CW":"6"===W?"Rotate 90 CW":"7"===W?"Mirror horizontal and rotate 90 CW":"8"===W?"Rotate 270 CW":W},"exif:GPSLatitude":Ra,"exif:GPSLongitude":Ra};function Ra(W){var ce,Oe=function(ye){if(Array.isArray(ye))return ye}(ce=W.split(","))||function(ye,Be){if(typeof Symbol<"u"&&Symbol.iterator in Object(ye)){var Ye=[],Et=1,Vt=0,_n=void 0;try{for(var kn,In=ye[Symbol.iterator]();!(Et=(kn=In.next()).done)&&(Ye.push(kn.value),2!==Ye.length);Et=1);}catch(to){Vt=1,_n=to}finally{try{Et||null==In.return||In.return()}finally{if(Vt)throw _n}}return Ye}}(ce)||function(ye,Be){if(ye){if("string"==typeof ye)return $a(ye,2);var Ye=Object.prototype.toString.call(ye).slice(8,-1);return"Object"===Ye&&ye.constructor&&(Ye=ye.constructor.name),"Map"===Ye||"Set"===Ye?Array.from(Ye):"Arguments"===Ye||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ye)?$a(ye,2):void 0}}(ce)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),Ze=Oe[0],at=Oe[1];if(void 0!==Ze&&void 0!==at){var Ft=parseFloat(Ze),bn=parseFloat(at),_e=at.charAt(at.length-1);if(!Number.isNaN(Ft)&&!Number.isNaN(bn))return""+(Ft+bn/60)+_e}return W}var oa=v(0);function Zc(W){return(Zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(ce){return typeof ce}:function(ce){return ce&&"function"==typeof Symbol&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce})(W)}var _r=function(W,ce){return"string"==typeof W?th({},W):function(Oe,Ze){if(0===Ze.length)return[];var at=[Oc(Oe,Ze.slice(0,1))];return Ze.length>1&&at.push(Oc(Oe,Ze.slice(1))),at}(W,ce).reduce(th,{})};function Oc(W,ce){for(var Oe=ce.reduce(function(ye,Be){return ye+Be.length},0),Ze=new Uint8Array(Oe),at=0,Ft=0;Ft<ce.length;Ft++){var bn=ce[Ft],_e=W.buffer.slice(bn.dataOffset,bn.dataOffset+bn.length);Ze.set(new Uint8Array(_e),at),at+=bn.length}return new DataView(Ze.buffer)}function th(W,ce){try{return C(W,ka(Du(function Oe(Ze){for(var at=0;at<Ze.childNodes.length;at++){if("x:xmpmeta"===Ze.childNodes[at].tagName)return Oe(Ze.childNodes[at]);if("rdf:RDF"===Ze.childNodes[at].tagName)return Ze.childNodes[at]}throw Error()}(function(Oe){var Ze=oa.a.get();if(!Ze)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),Error();var at=new Ze,Ft="string"==typeof Oe?Oe:y(Oe,0,Oe.byteLength),bn=at.parseFromString(Ft.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1"),"application/xml");if("parsererror"===bn.documentElement.nodeName)throw Error(bn.documentElement.textContent);return bn}(ce)),1)))}catch(Oe){return W}}function Du(W){var ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,Oe=function nh(W){for(var ce=[],Oe=0;Oe<W.childNodes.length;Oe++)ce.push(W.childNodes[Oe]);return ce}(W);return function xf(W){return 1===W.length&&"#text"===W[0].nodeName}(Oe)?ce?{}:function vd(W){return W.nodeValue}(Oe[0]):function jg(W){var ce={};return W.forEach(function(Oe){if((at=Oe).nodeName&&"#text"!==at.nodeName){var Ze=function(at){return{attributes:Bu(at),value:Du(at)}}(Oe);void 0!==ce[Oe.nodeName]?(Array.isArray(ce[Oe.nodeName])||(ce[Oe.nodeName]=[ce[Oe.nodeName]]),ce[Oe.nodeName].push(Ze)):ce[Oe.nodeName]=Ze}var at}),ce}(Oe)}function Bu(W){for(var ce={},Oe=0;Oe<W.attributes.length;Oe++)ce[W.attributes[Oe].nodeName]=decodeURIComponent(escape(W.attributes[Oe].value));return ce}function ka(W){var ce={};if("string"==typeof W)return W;for(var Oe in W){var Ze=W[Oe];Array.isArray(Ze)||(Ze=[Ze]),Ze.forEach(function(at){C(ce,dp(at.attributes)),"object"===Zc(at.value)&&C(ce,Cd(at.value))})}return ce}function dp(W){var ce={};for(var Oe in W)pp(Oe)&&(ce[bd(Oe)]={value:W[Oe],attributes:{},description:Fl(W[Oe],Oe)});return ce}function pp(W){return"rdf:parseType"!==W&&!ao(W)}function ao(W){return"xmlns"===W.split(":")[0]}function bd(W){return W.split(":")[1]}function Fl(W){var ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(W))return function cm(W){return W.map(function(ce){return Fl(void 0!==ce.value?ce.value:ce)}).join(", ")}(W);if("object"===Zc(W))return function Hg(W){var ce=[];for(var Oe in W)ce.push("".concat(sn(Oe),": ").concat(W[Oe].value));return ce.join("; ")}(W);try{return ce&&"function"==typeof xs[ce]?xs[ce](W):decodeURIComponent(escape(W))}catch(Oe){return W}}function sn(W){return"CiAdrCity"===W?"CreatorCity":"CiAdrCtry"===W?"CreatorCountry":"CiAdrExtadr"===W?"CreatorAddress":"CiAdrPcode"===W?"CreatorPostalCode":"CiAdrRegion"===W?"CreatorRegion":"CiEmailWork"===W?"CreatorWorkEmail":"CiTelWork"===W?"CreatorWorkPhone":"CiUrlWork"===W?"CreatorWorkUrl":W}function Cd(W){var ce={};for(var Oe in W)ao(Oe)||(ce[bd(Oe)]=Qn(W[Oe],Oe));return ce}function Qn(W,ce){return lm(W)?vr(W,ce):"Resource"===(Oe=W).attributes["rdf:parseType"]||void 0!==Oe.value["rdf:Description"]&&void 0===Oe.value["rdf:Description"].value["rdf:value"]?function(Oe,Ze){var at={value:{},attributes:{}};return void 0!==Oe.value["rdf:Description"]&&(C(at.value,dp(Oe.value["rdf:Description"].attributes)),C(at.attributes,eo(Oe)),Oe=Oe.value["rdf:Description"]),C(at.value,Cd(Oe.value)),at.description=Fl(at.value,Ze),at}(W,ce):function(Oe){return 0===Object.keys(Oe.value).length&&void 0===Oe.attributes["rdf:resource"]}(W)?function(Oe,Ze){var at=dp(Oe.attributes);return{value:at,attributes:{},description:Fl(at,Ze)}}(W,ce):function(Oe){return void 0!==ih(Oe.value)}(W)?function(Oe,Ze){var at=ih(Oe.value).value["rdf:li"],Ft=eo(Oe),bn=[];return void 0===at?at=[]:Array.isArray(at)||(at=[at]),at.forEach(function(_e){var ye;bn.push(lm(ye=_e)?vr(ye):"Resource"===ye.attributes["rdf:parseType"]?Cd(ye.value):{value:ye.value,attributes:eo(ye),description:Fl(ye.value)})}),{value:bn,attributes:Ft,description:Fl(bn,Ze)}}(W,ce):function(Oe,Ze){var at=jn(Oe)||ka(Oe.value);return{value:at,attributes:eo(Oe),description:Fl(at,Ze)}}(W,ce);var Oe}function lm(W){return"Resource"===W.attributes["rdf:parseType"]&&void 0!==W.value["rdf:value"]||void 0!==W.value["rdf:Description"]&&void 0!==W.value["rdf:Description"].value["rdf:value"]}function vr(W,ce){var Oe=eo(W);void 0!==W.value["rdf:Description"]&&(W=W.value["rdf:Description"]),C(Oe,eo(W),function(at){var Ft={};for(var bn in at.value)"rdf:value"===bn||ao(bn)||(Ft[bd(bn)]=at.value[bn].value);return Ft}(W));var at,Ze=jn((at=W).value["rdf:value"])||at.value["rdf:value"].value;return{value:Ze,attributes:Oe,description:Fl(Ze,ce)}}function eo(W){var ce={};for(var Oe in W.attributes)"rdf:parseType"===Oe||"rdf:resource"===Oe||ao(Oe)||(ce[bd(Oe)]=W.attributes[Oe]);return ce}function ih(W){return W["rdf:Bag"]||W["rdf:Seq"]||W["rdf:Alt"]}function jn(W){return W.attributes&&W.attributes["rdf:resource"]}var qg={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},oh={4:{name:"Preferred CMM type",value:function(W,ce){return y(W,ce,4)},description:function(W){return null!==W?vt(W):""}},8:{name:"Profile Version",value:function(W,ce){return W.getUint8(ce).toString(10)+"."+(W.getUint8(ce+1)>>4).toString(10)+"."+(W.getUint8(ce+1)%16).toString(10)}},12:{name:"Profile/Device class",value:function(W,ce){return y(W,ce,4)},description:function(W){switch(W.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return W}}},16:{name:"Color Space",value:function(W,ce){return y(W,ce,4)}},20:{name:"Connection Space",value:function(W,ce){return y(W,ce,4)}},24:{name:"ICC Profile Date",value:function(W,ce){return(Oe=W,Ze=ce,at=Oe.getUint16(Ze),Ft=Oe.getUint16(Ze+2)-1,bn=Oe.getUint16(Ze+4),_e=Oe.getUint16(Ze+6),ye=Oe.getUint16(Ze+8),Be=Oe.getUint16(Ze+10),new Date(Date.UTC(at,Ft,bn,_e,ye,Be))).toISOString();var Oe,Ze,at,Ft,bn,_e,ye,Be}},36:{name:"ICC Signature",value:function(W,ce){return Oe=W.buffer.slice(ce,ce+4),String.fromCharCode.apply(null,new Uint8Array(Oe));var Oe}},40:{name:"Primary Platform",value:function(W,ce){return y(W,ce,4)},description:function(W){return vt(W)}},48:{name:"Device Manufacturer",value:function(W,ce){return y(W,ce,4)},description:function(W){return vt(W)}},52:{name:"Device Model Number",value:function(W,ce){return y(W,ce,4)}},64:{name:"Rendering Intent",value:function(W,ce){return W.getUint32(ce)},description:function(W){switch(W){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return W}}},80:{name:"Profile Creator",value:function(W,ce){return y(W,ce,4)}}};function vt(W){switch(W.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return W}}var _l=function(W,ce){try{for(var Oe=ce.reduce(function(ye,Be){return ye+Be.length},0),Ze=new Uint8Array(Oe),at=0,Ft=(ye=W,Array.isArray(ye)?new DataView(Uint8Array.from(ye).buffer).buffer:ye.buffer),bn=function(ye){var Be=ce.find(function(Vt){return Vt.chunkNumber===ye});if(!Be)throw Error("ICC chunk ".concat(ye," not found"));var Ye=Ft.slice(Be.offset,Be.offset+Be.length),Et=new Uint8Array(Ye);Ze.set(Et,at),at+=Et.length},_e=1;_e<=ce.length;_e++)bn(_e);return function(ye){var Be=ye.buffer,Ye=ye.getUint32();if(ye.byteLength!==Ye)throw Error("ICC profile length not matching");if(ye.length<84)throw Error("ICC profile too short");for(var Et={},Vt=Object.keys(oh),_n=0;_n<Vt.length;_n++){var kn=Vt[_n],In=oh[kn],to=In.value(ye,parseInt(kn,10)),Mr=to;In.description&&(Mr=In.description(to)),Et[In.name]={value:to,description:Mr}}if("acsp"!==yd(Be.slice(36,40)))throw Error("ICC profile: missing signature");if(Be.length<132)return Et;for(var lu=ye.getUint32(128),Uu=132,Zg=0;Zg<lu;Zg++){if(Nu(Be,Uu))return Et;var uu=y(ye,Uu,4),Ec=ye.getUint32(Uu+4),w1=ye.getUint32(Uu+8);if(Ec>Be.length)return Et;var mo=y(ye,Ec,4);if("desc"===mo){var T1=ye.getUint32(Ec+8);if(T1>w1)return Et;hp(Et,uu,yd(Be.slice(Ec+12,Ec+T1+11)))}else if("mluc"===mo){for(var Ty=ye.getUint32(Ec+8),LO=ye.getUint32(Ec+12),Qg=Ec+16,fp=[],P1=0;P1<Ty;P1++){var DO=y(ye,Qg+0,2),sB=y(ye,Qg+2,2),BO=ye.getUint32(Qg+4),aB=ye.getUint32(Qg+8),cB=f(ye,Ec+aB,BO);fp.push({languageCode:DO,countryCode:sB,text:cB}),Qg+=LO}if(1===Ty)hp(Et,uu,fp[0].text);else{for(var Gu={},Fv=0;Fv<fp.length;Fv++)Gu["".concat(fp[Fv].languageCode,"-").concat(fp[Fv].countryCode)]=fp[Fv].text;hp(Et,uu,Gu)}}else"text"===mo?hp(Et,uu,yd(Be.slice(Ec+8,Ec+w1-7))):"sig "===mo&&hp(Et,uu,yd(Be.slice(Ec+8,Ec+12)));Uu+=12}return Et}(new DataView(Ze.buffer))}catch(ye){return{}}var ye};function Nu(W,ce){return W.length<ce+12}function yd(W){return String.fromCharCode.apply(null,new Uint8Array(W))}function hp(W,ce,Oe){qg[ce]?W[qg[ce].name]={value:Oe,description:Oe}:W[ce]={value:Oe,description:Oe}}var Sd=function(W,ce){return{"Image Width":dc(W,ce),"Image Height":mp(W,ce),"Bit Depth":wd(W,ce),"Color Type":ke(W,ce),Compression:Sy(W,ce),Filter:ui(W,ce),Interlace:Ct(W,ce)}};function dc(W,ce){if(!(ce+0+4>W.byteLength)){var Oe=Te.getLongAt(W,ce);return{value:Oe,description:"".concat(Oe,"px")}}}function mp(W,ce){if(!(ce+4+4>W.byteLength)){var Oe=Te.getLongAt(W,ce+4);return{value:Oe,description:"".concat(Oe,"px")}}}function wd(W,ce){if(!(ce+8+1>W.byteLength)){var Oe=Te.getByteAt(W,ce+8);return{value:Oe,description:"".concat(Oe)}}}function ke(W,ce){if(!(ce+9+1>W.byteLength)){var Oe=Te.getByteAt(W,ce+9);return{value:Oe,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[Oe]||"Unknown"}}}function Sy(W,ce){if(!(ce+10+1>W.byteLength)){var Oe=Te.getByteAt(W,ce+10);return{value:Oe,description:0===Oe?"Deflate/Inflate":"Unknown"}}}function ui(W,ce){if(!(ce+11+1>W.byteLength)){var Oe=Te.getByteAt(W,ce+11);return{value:Oe,description:0===Oe?"Adaptive":"Unknown"}}}function Ct(W,ce){if(!(ce+12+1>W.byteLength)){var Oe=Te.getByteAt(W,ce+12);return{value:Oe,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[Oe]||"Unknown"}}}function Rn(W){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(ce){return typeof ce}:function(ce){return ce&&"function"==typeof Symbol&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce})(W)}var hn=[6,7,99],di=function(W,ce,Oe){if((_e=ce)&&(void 0===_e.Compression||hn.includes(_e.Compression.value))&&_e.JPEGInterchangeFormat&&_e.JPEGInterchangeFormat.value&&_e.JPEGInterchangeFormatLength&&_e.JPEGInterchangeFormatLength.value){ce.type="image/jpeg";var Ze=Oe+ce.JPEGInterchangeFormat.value;ce.image=W.buffer.slice(Ze,Ze+ce.JPEGInterchangeFormatLength.value),Ft=function(){return ye=this.image,typeof btoa<"u"?btoa(Array.prototype.reduce.call(new Uint8Array(ye),function(Be,Ye){return Be+String.fromCharCode(Ye)},"")):typeof Buffer<"u"?void 0!==Rn(Buffer.from)?Buffer.from(ye).toString("base64"):new Buffer(ye).toString("base64"):void 0;var ye},bn=0,Object.defineProperty(at=ce,"base64",{get:function(){return bn||(bn=1,Object.defineProperty(at,"base64",{configurable:1,enumerable:1,value:Ft.apply(at),writable:1})),at.base64},configurable:1,enumerable:1})}var at,Ft,bn,_e;return ce};function As(W){this.name="MetadataMissingError",this.message=W||"No Exif data",this.stack=Error().stack}As.prototype=Error();var zs={MetadataMissingError:As},Fo=(F.default={load:fs,loadView:pc,errors:zs},zs);function fs(W){var ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0};return function Af(W){try{return Buffer.isBuffer(W)}catch(ce){return 0}}(W)&&(W=new Uint8Array(W).buffer),pc(function Fu(W){try{return new DataView(W)}catch(ce){return new k(W)}}(W),ce)}function pc(W){var ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0},Oe=0,Ze={},at=Ae(W),Ft=at.fileDataOffset,bn=at.tiffHeaderOffset,_e=at.iptcDataOffset,ye=at.xmpChunks,Be=at.iccChunks,Ye=at.pngHeaderOffset;if(function Ul(W){return void 0!==W}(Ft)){Oe=1;var Et=gr(W,Ft);ce.expanded?Ze.file=Et:Ze=C({},Ze,Et)}if(function Wg(W){return void 0!==W}(bn)){Oe=1;var Vt=St(W,bn);if(Vt.Thumbnail&&(Ze.Thumbnail=Vt.Thumbnail,delete Vt.Thumbnail),ce.expanded?(Ze.exif=Vt,function wy(W){W.exif&&(W.exif.GPSLatitude&&W.exif.GPSLatitudeRef&&(W.gps=W.gps||{},W.gps.Latitude=N(W.exif.GPSLatitude.value),"S"===W.exif.GPSLatitudeRef.value.join("")&&(W.gps.Latitude=-W.gps.Latitude)),W.exif.GPSLongitude&&W.exif.GPSLongitudeRef&&(W.gps=W.gps||{},W.gps.Longitude=N(W.exif.GPSLongitude.value),"W"===W.exif.GPSLongitudeRef.value.join("")&&(W.gps.Longitude=-W.gps.Longitude)),W.exif.GPSAltitude&&W.exif.GPSAltitudeRef&&(W.gps=W.gps||{},W.gps.Altitude=W.exif.GPSAltitude.value[0]/W.exif.GPSAltitude.value[1],1===W.exif.GPSAltitudeRef.value&&(W.gps.Altitude=-W.gps.Altitude)))}(Ze)):Ze=C({},Ze,Vt),Vt["IPTC-NAA"]&&!Bv(_e)){var _n=ua(Vt["IPTC-NAA"].value,0);ce.expanded?Ze.iptc=_n:Ze=C({},Ze,_n)}if(Vt.ApplicationNotes&&!$g(ye)){var kn=_r(A(Vt.ApplicationNotes.value));ce.expanded?Ze.xmp=kn:Ze=C({},Ze,kn)}if(Vt.ICC_Profile&&!Nv(Be)){var In=_l(Vt.ICC_Profile.value,[{offset:0,length:Vt.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);ce.expanded?Ze.icc=In:Ze=C({},Ze,In)}}if(Bv(_e)){Oe=1;var to=ua(W,_e);ce.expanded?Ze.iptc=to:Ze=C({},Ze,to)}if($g(ye)){Oe=1;var Mr=_r(W,ye);ce.expanded?Ze.xmp=Mr:Ze=C({},Ze,Mr)}if(Nv(Be)){Oe=1;var lu=_l(W,Be);ce.expanded?Ze.icc=lu:Ze=C({},Ze,lu)}if(function Kg(W){return void 0!==W}(Ye)){Oe=1;var Uu=Sd(W,Ye);ce.expanded?Ze.pngFile=Uu:Ze=C({},Ze,Uu)}var Zg=di(W,Ze.Thumbnail,bn);if(Zg?(Oe=1,Ze.Thumbnail=Zg):delete Ze.Thumbnail,!Oe)throw new zs.MetadataMissingError;return Ze}function Bv(W){return void 0!==W}function $g(W){return Array.isArray(W)&&W.length>0}function Nv(W){return Array.isArray(W)&&W.length>0}}])},module.exports=F()},14831:function(Q,F,v){var y;!function(f){"use strict";var A=function(){},C=f.requestAnimationFrame||f.webkitRequestAnimationFrame||f.mozRequestAnimationFrame||f.msRequestAnimationFrame||function(I){return setTimeout(I,16)};function P(){var I=this;I.reads=[],I.writes=[],I.raf=C.bind(f),A("initialized",I)}function k(I){I.scheduled||(I.scheduled=!0,I.raf(O.bind(null,I)),A("flush scheduled"))}function O(I){A("flush");var D,S=I.writes,L=I.reads;try{A("flushing reads",L.length),E(L),A("flushing writes",S.length),E(S)}catch(j){D=j}if(I.scheduled=!1,(L.length||S.length)&&k(I),D){if(A("task errored",D.message),!I.catch)throw D;I.catch(D)}}function E(I){A("run tasks");for(var S;S=I.shift();)S()}function N(I,S){var L=I.indexOf(S);return!!~L&&!!I.splice(L,1)}P.prototype={constructor:P,measure:function(I,S){A("measure");var L=S?I.bind(S):I;return this.reads.push(L),k(this),L},mutate:function(I,S){A("mutate");var L=S?I.bind(S):I;return this.writes.push(L),k(this),L},clear:function(I){return A("clear",I),N(this.reads,I)||N(this.writes,I)},extend:function(I){if(A("extend",I),"object"!=typeof I)throw new Error("expected object");var S=Object.create(this);return function M(I,S){for(var L in S)S.hasOwnProperty(L)&&(I[L]=S[L])}(S,I),S.fastdom=this,S.initialize&&S.initialize(),S},catch:null};var x=f.fastdom=f.fastdom||new P;void 0!==(y=function(){return x}.call(x,v,x,Q))&&(Q.exports=y)}(typeof window<"u"?window:this)},57271:(Q,F,v)=>{var y;
/*! Hammer.JS - v2.0.7 - 2016-04-22
        * http://hammerjs.github.io/
        *
        * Copyright (c) 2016 Jorik Tangelder;
        * Licensed under the MIT license */!function(f,A,C,P){"use strict";var j,k=["","webkit","Moz","MS","ms","o"],O=A.createElement("div"),E="function",N=Math.round,M=Math.abs,x=Date.now;function I(_e,ye,Be){return setTimeout(X(_e,Be),ye)}function S(_e,ye,Be){return!!Array.isArray(_e)&&(L(_e,Be[ye],Be),!0)}function L(_e,ye,Be){var Ye;if(_e)if(_e.forEach)_e.forEach(ye,Be);else if(_e.length!==P)for(Ye=0;Ye<_e.length;)ye.call(Be,_e[Ye],Ye,_e),Ye++;else for(Ye in _e)_e.hasOwnProperty(Ye)&&ye.call(Be,_e[Ye],Ye,_e)}function D(_e,ye,Be){var Ye="DEPRECATED METHOD: "+ye+"\n"+Be+" AT \n";return function(){var Et=new Error("get-stack-trace"),Vt=Et&&Et.stack?Et.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",_n=f.console&&(f.console.warn||f.console.log);return _n&&_n.call(f.console,Ye,Vt),_e.apply(this,arguments)}}j="function"!=typeof Object.assign?function(ye){if(ye===P||null===ye)throw new TypeError("Cannot convert undefined or null to object");for(var Be=Object(ye),Ye=1;Ye<arguments.length;Ye++){var Et=arguments[Ye];if(Et!==P&&null!==Et)for(var Vt in Et)Et.hasOwnProperty(Vt)&&(Be[Vt]=Et[Vt])}return Be}:Object.assign;var z=D(function(ye,Be,Ye){for(var Et=Object.keys(Be),Vt=0;Vt<Et.length;)(!Ye||Ye&&ye[Et[Vt]]===P)&&(ye[Et[Vt]]=Be[Et[Vt]]),Vt++;return ye},"extend","Use `assign`."),Z=D(function(ye,Be){return z(ye,Be,!0)},"merge","Use `assign`.");function q(_e,ye,Be){var Et,Ye=ye.prototype;(Et=_e.prototype=Object.create(Ye)).constructor=_e,Et._super=Ye,Be&&j(Et,Be)}function X(_e,ye){return function(){return _e.apply(ye,arguments)}}function ae(_e,ye){return typeof _e==E?_e.apply(ye&&ye[0]||P,ye):_e}function fe(_e,ye){return _e===P?ye:_e}function Pe(_e,ye,Be){L(Te(ye),function(Ye){_e.addEventListener(Ye,Be,!1)})}function Ae(_e,ye,Be){L(Te(ye),function(Ye){_e.removeEventListener(Ye,Be,!1)})}function Ie(_e,ye){for(;_e;){if(_e==ye)return!0;_e=_e.parentNode}return!1}function De(_e,ye){return _e.indexOf(ye)>-1}function Te(_e){return _e.trim().split(/\s+/g)}function xe(_e,ye,Be){if(_e.indexOf&&!Be)return _e.indexOf(ye);for(var Ye=0;Ye<_e.length;){if(Be&&_e[Ye][Be]==ye||!Be&&_e[Ye]===ye)return Ye;Ye++}return-1}function Ge(_e){return Array.prototype.slice.call(_e,0)}function Ue(_e,ye,Be){for(var Ye=[],Et=[],Vt=0;Vt<_e.length;){var _n=ye?_e[Vt][ye]:_e[Vt];xe(Et,_n)<0&&Ye.push(_e[Vt]),Et[Vt]=_n,Vt++}return Be&&(Ye=ye?Ye.sort(function(In,to){return In[ye]>to[ye]}):Ye.sort()),Ye}function st(_e,ye){for(var Be,Ye,Et=ye[0].toUpperCase()+ye.slice(1),Vt=0;Vt<k.length;){if((Ye=(Be=k[Vt])?Be+Et:ye)in _e)return Ye;Vt++}return P}var It=1;function gt(_e){var ye=_e.ownerDocument||_e;return ye.defaultView||ye.parentWindow||f}var ht="ontouchstart"in f,dt=st(f,"PointerEvent")!==P,kt=ht&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),St="touch",Xr="mouse",uc=25,gr=1,Le=4,tt=8,_t=1,ut=2,Wt=4,Bt=8,On=16,zt=ut|Wt,zn=Bt|On,Gr=zt|zn,ua=["x","y"],gi=["clientX","clientY"];function si(_e,ye){var Be=this;this.manager=_e,this.callback=ye,this.element=_e.element,this.target=_e.options.inputTarget,this.domHandler=function(Ye){ae(_e.options.enable,[_e])&&Be.handler(Ye)},this.init()}function sr(_e,ye,Be){var Ye=Be.pointers.length,Et=Be.changedPointers.length,Vt=ye&gr&&Ye-Et==0,_n=ye&(Le|tt)&&Ye-Et==0;Be.isFirst=!!Vt,Be.isFinal=!!_n,Vt&&(_e.session={}),Be.eventType=ye,function da(_e,ye){var Be=_e.session,Ye=ye.pointers,Et=Ye.length;Be.firstInput||(Be.firstInput=$a(ye)),Et>1&&!Be.firstMultiple?Be.firstMultiple=$a(ye):1===Et&&(Be.firstMultiple=!1);var Vt=Be.firstInput,_n=Be.firstMultiple,kn=_n?_n.center:Vt.center,In=ye.center=xs(Ye);ye.timeStamp=x(),ye.deltaTime=ye.timeStamp-Vt.timeStamp,ye.angle=_r(kn,In),ye.distance=Zc(kn,In),function ms(_e,ye){var Be=ye.center,Ye=_e.offsetDelta||{},Et=_e.prevDelta||{},Vt=_e.prevInput||{};(ye.eventType===gr||Vt.eventType===Le)&&(Et=_e.prevDelta={x:Vt.deltaX||0,y:Vt.deltaY||0},Ye=_e.offsetDelta={x:Be.x,y:Be.y}),ye.deltaX=Et.x+(Be.x-Ye.x),ye.deltaY=Et.y+(Be.y-Ye.y)}(Be,ye),ye.offsetDirection=oa(ye.deltaX,ye.deltaY);var to=Ra(ye.deltaTime,ye.deltaX,ye.deltaY);ye.overallVelocityX=to.x,ye.overallVelocityY=to.y,ye.overallVelocity=M(to.x)>M(to.y)?to.x:to.y,ye.scale=_n?function th(_e,ye){return Zc(ye[0],ye[1],gi)/Zc(_e[0],_e[1],gi)}(_n.pointers,Ye):1,ye.rotation=_n?function Oc(_e,ye){return _r(ye[1],ye[0],gi)+_r(_e[1],_e[0],gi)}(_n.pointers,Ye):0,ye.maxPointers=Be.prevInput?ye.pointers.length>Be.prevInput.maxPointers?ye.pointers.length:Be.prevInput.maxPointers:ye.pointers.length,function _d(_e,ye){var Et,Vt,_n,kn,Be=_e.lastInterval||ye,Ye=ye.timeStamp-Be.timeStamp;if(ye.eventType!=tt&&(Ye>uc||Be.velocity===P)){var In=ye.deltaX-Be.deltaX,to=ye.deltaY-Be.deltaY,Mr=Ra(Ye,In,to);Vt=Mr.x,_n=Mr.y,Et=M(Mr.x)>M(Mr.y)?Mr.x:Mr.y,kn=oa(In,to),_e.lastInterval=ye}else Et=Be.velocity,Vt=Be.velocityX,_n=Be.velocityY,kn=Be.direction;ye.velocity=Et,ye.velocityX=Vt,ye.velocityY=_n,ye.direction=kn}(Be,ye);var Mr=_e.element;Ie(ye.srcEvent.target,Mr)&&(Mr=ye.srcEvent.target),ye.target=Mr}(_e,Be),_e.emit("hammer.input",Be),_e.recognize(Be),_e.session.prevInput=Be}function $a(_e){for(var ye=[],Be=0;Be<_e.pointers.length;)ye[Be]={clientX:N(_e.pointers[Be].clientX),clientY:N(_e.pointers[Be].clientY)},Be++;return{timeStamp:x(),pointers:ye,center:xs(ye),deltaX:_e.deltaX,deltaY:_e.deltaY}}function xs(_e){var ye=_e.length;if(1===ye)return{x:N(_e[0].clientX),y:N(_e[0].clientY)};for(var Be=0,Ye=0,Et=0;Et<ye;)Be+=_e[Et].clientX,Ye+=_e[Et].clientY,Et++;return{x:N(Be/ye),y:N(Ye/ye)}}function Ra(_e,ye,Be){return{x:ye/_e||0,y:Be/_e||0}}function oa(_e,ye){return _e===ye?_t:M(_e)>=M(ye)?_e<0?ut:Wt:ye<0?Bt:On}function Zc(_e,ye,Be){Be||(Be=ua);var Ye=ye[Be[0]]-_e[Be[0]],Et=ye[Be[1]]-_e[Be[1]];return Math.sqrt(Ye*Ye+Et*Et)}function _r(_e,ye,Be){return Be||(Be=ua),180*Math.atan2(ye[Be[1]]-_e[Be[1]],ye[Be[0]]-_e[Be[0]])/Math.PI}si.prototype={handler:function(){},init:function(){this.evEl&&Pe(this.element,this.evEl,this.domHandler),this.evTarget&&Pe(this.target,this.evTarget,this.domHandler),this.evWin&&Pe(gt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&Ae(this.element,this.evEl,this.domHandler),this.evTarget&&Ae(this.target,this.evTarget,this.domHandler),this.evWin&&Ae(gt(this.element),this.evWin,this.domHandler)}};var Du={mousedown:gr,mousemove:2,mouseup:Le},nh="mousedown",xf="mousemove mouseup";function vd(){this.evEl=nh,this.evWin=xf,this.pressed=!1,si.apply(this,arguments)}q(vd,si,{handler:function(ye){var Be=Du[ye.type];Be&gr&&0===ye.button&&(this.pressed=!0),2&Be&&1!==ye.which&&(Be=Le),this.pressed&&(Be&Le&&(this.pressed=!1),this.callback(this.manager,Be,{pointers:[ye],changedPointers:[ye],pointerType:Xr,srcEvent:ye}))}});var jg={pointerdown:gr,pointermove:2,pointerup:Le,pointercancel:tt,pointerout:tt},Bu={2:St,3:"pen",4:Xr,5:"kinect"},ka="pointerdown",dp="pointermove pointerup pointercancel";function pp(){this.evEl=ka,this.evWin=dp,si.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}f.MSPointerEvent&&!f.PointerEvent&&(ka="MSPointerDown",dp="MSPointerMove MSPointerUp MSPointerCancel"),q(pp,si,{handler:function(ye){var Be=this.store,Ye=!1,Et=ye.type.toLowerCase().replace("ms",""),Vt=jg[Et],_n=Bu[ye.pointerType]||ye.pointerType,kn=_n==St,In=xe(Be,ye.pointerId,"pointerId");Vt&gr&&(0===ye.button||kn)?In<0&&(Be.push(ye),In=Be.length-1):Vt&(Le|tt)&&(Ye=!0),!(In<0)&&(Be[In]=ye,this.callback(this.manager,Vt,{pointers:Be,changedPointers:[ye],pointerType:_n,srcEvent:ye}),Ye&&Be.splice(In,1))}});var ao={touchstart:gr,touchmove:2,touchend:Le,touchcancel:tt};function cm(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,si.apply(this,arguments)}function Hg(_e,ye){var Be=Ge(_e.touches),Ye=Ge(_e.changedTouches);return ye&(Le|tt)&&(Be=Ue(Be.concat(Ye),"identifier",!0)),[Be,Ye]}q(cm,si,{handler:function(ye){var Be=ao[ye.type];if(Be===gr&&(this.started=!0),this.started){var Ye=Hg.call(this,ye,Be);Be&(Le|tt)&&Ye[0].length-Ye[1].length==0&&(this.started=!1),this.callback(this.manager,Be,{pointers:Ye[0],changedPointers:Ye[1],pointerType:St,srcEvent:ye})}}});var sn={touchstart:gr,touchmove:2,touchend:Le,touchcancel:tt},Cd="touchstart touchmove touchend touchcancel";function Qn(){this.evTarget=Cd,this.targetIds={},si.apply(this,arguments)}function lm(_e,ye){var Be=Ge(_e.touches),Ye=this.targetIds;if(ye&(2|gr)&&1===Be.length)return Ye[Be[0].identifier]=!0,[Be,Be];var Et,Vt,_n=Ge(_e.changedTouches),kn=[],In=this.target;if(Vt=Be.filter(function(to){return Ie(to.target,In)}),ye===gr)for(Et=0;Et<Vt.length;)Ye[Vt[Et].identifier]=!0,Et++;for(Et=0;Et<_n.length;)Ye[_n[Et].identifier]&&kn.push(_n[Et]),ye&(Le|tt)&&delete Ye[_n[Et].identifier],Et++;return kn.length?[Ue(Vt.concat(kn),"identifier",!0),kn]:void 0}q(Qn,si,{handler:function(ye){var Be=sn[ye.type],Ye=lm.call(this,ye,Be);Ye&&this.callback(this.manager,Be,{pointers:Ye[0],changedPointers:Ye[1],pointerType:St,srcEvent:ye})}});var vr=2500;function ih(){si.apply(this,arguments);var _e=X(this.handler,this);this.touch=new Qn(this.manager,_e),this.mouse=new vd(this.manager,_e),this.primaryTouch=null,this.lastTouches=[]}function jn(_e,ye){_e&gr?(this.primaryTouch=ye.changedPointers[0].identifier,qg.call(this,ye)):_e&(Le|tt)&&qg.call(this,ye)}function qg(_e){var ye=_e.changedPointers[0];if(ye.identifier===this.primaryTouch){var Be={x:ye.clientX,y:ye.clientY};this.lastTouches.push(Be);var Ye=this.lastTouches;setTimeout(function(){var Vt=Ye.indexOf(Be);Vt>-1&&Ye.splice(Vt,1)},vr)}}function oh(_e){for(var ye=_e.srcEvent.clientX,Be=_e.srcEvent.clientY,Ye=0;Ye<this.lastTouches.length;Ye++){var Et=this.lastTouches[Ye],Vt=Math.abs(ye-Et.x),_n=Math.abs(Be-Et.y);if(Vt<=25&&_n<=25)return!0}return!1}q(ih,si,{handler:function(ye,Be,Ye){var Vt=Ye.pointerType==Xr;if(!(Vt&&Ye.sourceCapabilities&&Ye.sourceCapabilities.firesTouchEvents)){if(Ye.pointerType==St)jn.call(this,Be,Ye);else if(Vt&&oh.call(this,Ye))return;this.callback(ye,Be,Ye)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var vt=st(O.style,"touchAction"),_l=vt!==P,Nu="compute",hp="manipulation",Sd="none",dc="pan-x",mp="pan-y",wd=function ui(){if(!_l)return!1;var _e={},ye=f.CSS&&f.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(Be){_e[Be]=!ye||f.CSS.supports("touch-action",Be)}),_e}();function ke(_e,ye){this.manager=_e,this.set(ye)}ke.prototype={set:function(_e){_e==Nu&&(_e=this.compute()),_l&&this.manager.element.style&&wd[_e]&&(this.manager.element.style[vt]=_e),this.actions=_e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var _e=[];return L(this.manager.recognizers,function(ye){ae(ye.options.enable,[ye])&&(_e=_e.concat(ye.getTouchAction()))}),function Sy(_e){if(De(_e,Sd))return Sd;var ye=De(_e,dc),Be=De(_e,mp);return ye&&Be?Sd:ye||Be?ye?dc:mp:De(_e,hp)?hp:"auto"}(_e.join(" "))},preventDefaults:function(_e){var ye=_e.srcEvent,Be=_e.offsetDirection;if(!this.manager.session.prevented){var Ye=this.actions,Et=De(Ye,Sd)&&!wd[Sd],Vt=De(Ye,mp)&&!wd[mp],_n=De(Ye,dc)&&!wd[dc];if(Et&&1===_e.pointers.length&&_e.distance<2&&_e.deltaTime<250)return;return _n&&Vt||!(Et||Vt&&Be&zt||_n&&Be&zn)?void 0:this.preventSrc(ye)}ye.preventDefault()},preventSrc:function(_e){this.manager.session.prevented=!0,_e.preventDefault()}};var Ct=1;function fs(_e){this.options=j({},this.defaults,_e||{}),this.id=function xt(){return It++}(),this.manager=null,this.options.enable=fe(this.options.enable,!0),this.state=Ct,this.simultaneous={},this.requireFail=[]}function Af(_e){return 16&_e?"cancel":8&_e?"end":4&_e?"move":2&_e?"start":""}function Fu(_e){return _e==On?"down":_e==Bt?"up":_e==ut?"left":_e==Wt?"right":""}function pc(_e,ye){var Be=ye.manager;return Be?Be.get(_e):_e}function Ul(){fs.apply(this,arguments)}function Wg(){Ul.apply(this,arguments),this.pX=null,this.pY=null}function wy(){Ul.apply(this,arguments)}function Bv(){fs.apply(this,arguments),this._timer=null,this._input=null}function $g(){Ul.apply(this,arguments)}function Nv(){Ul.apply(this,arguments)}function Kg(){fs.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function W(_e,ye){return(ye=ye||{}).recognizers=fe(ye.recognizers,W.defaults.preset),new Ze(_e,ye)}function Ze(_e,ye){this.options=j({},W.defaults,ye||{}),this.options.inputTarget=this.options.inputTarget||_e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=_e,this.input=function To(_e){return new(_e.options.inputClass||(dt?pp:kt?Qn:ht?ih:vd))(_e,sr)}(this),this.touchAction=new ke(this,this.options.touchAction),at(this,!0),L(this.options.recognizers,function(Be){var Ye=this.add(new Be[0](Be[1]));Be[2]&&Ye.recognizeWith(Be[2]),Be[3]&&Ye.requireFailure(Be[3])},this)}function at(_e,ye){var Ye,Be=_e.element;Be.style&&(L(_e.options.cssProps,function(Et,Vt){Ye=st(Be.style,Vt),ye?(_e.oldCssProps[Ye]=Be.style[Ye],Be.style[Ye]=Et):Be.style[Ye]=_e.oldCssProps[Ye]||""}),ye||(_e.oldCssProps={}))}fs.prototype={defaults:{},set:function(_e){return j(this.options,_e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(_e){if(S(_e,"recognizeWith",this))return this;var ye=this.simultaneous;return ye[(_e=pc(_e,this)).id]||(ye[_e.id]=_e,_e.recognizeWith(this)),this},dropRecognizeWith:function(_e){return S(_e,"dropRecognizeWith",this)||(_e=pc(_e,this),delete this.simultaneous[_e.id]),this},requireFailure:function(_e){if(S(_e,"requireFailure",this))return this;var ye=this.requireFail;return-1===xe(ye,_e=pc(_e,this))&&(ye.push(_e),_e.requireFailure(this)),this},dropRequireFailure:function(_e){if(S(_e,"dropRequireFailure",this))return this;_e=pc(_e,this);var ye=xe(this.requireFail,_e);return ye>-1&&this.requireFail.splice(ye,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(_e){return!!this.simultaneous[_e.id]},emit:function(_e){var ye=this,Be=this.state;function Ye(Et){ye.manager.emit(Et,_e)}Be<8&&Ye(ye.options.event+Af(Be)),Ye(ye.options.event),_e.additionalEvent&&Ye(_e.additionalEvent),Be>=8&&Ye(ye.options.event+Af(Be))},tryEmit:function(_e){if(this.canEmit())return this.emit(_e);this.state=32},canEmit:function(){for(var _e=0;_e<this.requireFail.length;){if(!(this.requireFail[_e].state&(32|Ct)))return!1;_e++}return!0},recognize:function(_e){var ye=j({},_e);if(!ae(this.options.enable,[this,ye]))return this.reset(),void(this.state=32);56&this.state&&(this.state=Ct),this.state=this.process(ye),30&this.state&&this.tryEmit(ye)},process:function(_e){},getTouchAction:function(){},reset:function(){}},q(Ul,fs,{defaults:{pointers:1},attrTest:function(_e){var ye=this.options.pointers;return 0===ye||_e.pointers.length===ye},process:function(_e){var ye=this.state,Be=_e.eventType,Ye=6&ye,Et=this.attrTest(_e);return Ye&&(Be&tt||!Et)?16|ye:Ye||Et?Be&Le?8|ye:2&ye?4|ye:2:32}}),q(Wg,Ul,{defaults:{event:"pan",threshold:10,pointers:1,direction:Gr},getTouchAction:function(){var _e=this.options.direction,ye=[];return _e&zt&&ye.push(mp),_e&zn&&ye.push(dc),ye},directionTest:function(_e){var ye=this.options,Be=!0,Ye=_e.distance,Et=_e.direction,Vt=_e.deltaX,_n=_e.deltaY;return Et&ye.direction||(ye.direction&zt?(Et=0===Vt?_t:Vt<0?ut:Wt,Be=Vt!=this.pX,Ye=Math.abs(_e.deltaX)):(Et=0===_n?_t:_n<0?Bt:On,Be=_n!=this.pY,Ye=Math.abs(_e.deltaY))),_e.direction=Et,Be&&Ye>ye.threshold&&Et&ye.direction},attrTest:function(_e){return Ul.prototype.attrTest.call(this,_e)&&(2&this.state||!(2&this.state)&&this.directionTest(_e))},emit:function(_e){this.pX=_e.deltaX,this.pY=_e.deltaY;var ye=Fu(_e.direction);ye&&(_e.additionalEvent=this.options.event+ye),this._super.emit.call(this,_e)}}),q(wy,Ul,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Sd]},attrTest:function(_e){return this._super.attrTest.call(this,_e)&&(Math.abs(_e.scale-1)>this.options.threshold||2&this.state)},emit:function(_e){1!==_e.scale&&(_e.additionalEvent=this.options.event+(_e.scale<1?"in":"out")),this._super.emit.call(this,_e)}}),q(Bv,fs,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(_e){var ye=this.options,Be=_e.pointers.length===ye.pointers,Ye=_e.distance<ye.threshold,Et=_e.deltaTime>ye.time;if(this._input=_e,!Ye||!Be||_e.eventType&(Le|tt)&&!Et)this.reset();else if(_e.eventType&gr)this.reset(),this._timer=I(function(){this.state=8,this.tryEmit()},ye.time,this);else if(_e.eventType&Le)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(_e){8===this.state&&(_e&&_e.eventType&Le?this.manager.emit(this.options.event+"up",_e):(this._input.timeStamp=x(),this.manager.emit(this.options.event,this._input)))}}),q($g,Ul,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Sd]},attrTest:function(_e){return this._super.attrTest.call(this,_e)&&(Math.abs(_e.rotation)>this.options.threshold||2&this.state)}}),q(Nv,Ul,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:zt|zn,pointers:1},getTouchAction:function(){return Wg.prototype.getTouchAction.call(this)},attrTest:function(_e){var Be,ye=this.options.direction;return ye&(zt|zn)?Be=_e.overallVelocity:ye&zt?Be=_e.overallVelocityX:ye&zn&&(Be=_e.overallVelocityY),this._super.attrTest.call(this,_e)&&ye&_e.offsetDirection&&_e.distance>this.options.threshold&&_e.maxPointers==this.options.pointers&&M(Be)>this.options.velocity&&_e.eventType&Le},emit:function(_e){var ye=Fu(_e.offsetDirection);ye&&this.manager.emit(this.options.event+ye,_e),this.manager.emit(this.options.event,_e)}}),q(Kg,fs,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[hp]},process:function(_e){var ye=this.options,Be=_e.pointers.length===ye.pointers,Ye=_e.distance<ye.threshold,Et=_e.deltaTime<ye.time;if(this.reset(),_e.eventType&gr&&0===this.count)return this.failTimeout();if(Ye&&Et&&Be){if(_e.eventType!=Le)return this.failTimeout();var Vt=!this.pTime||_e.timeStamp-this.pTime<ye.interval,_n=!this.pCenter||Zc(this.pCenter,_e.center)<ye.posThreshold;if(this.pTime=_e.timeStamp,this.pCenter=_e.center,_n&&Vt?this.count+=1:this.count=1,this._input=_e,0==this.count%ye.taps)return this.hasRequireFailures()?(this._timer=I(function(){this.state=8,this.tryEmit()},ye.interval,this),2):8}return 32},failTimeout:function(){return this._timer=I(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),W.VERSION="2.0.7",W.defaults={domEvents:!1,touchAction:Nu,enable:!0,inputTarget:null,inputClass:null,preset:[[$g,{enable:!1}],[wy,{enable:!1},["rotate"]],[Nv,{direction:zt}],[Wg,{direction:zt},["swipe"]],[Kg],[Kg,{event:"doubletap",taps:2},["tap"]],[Bv]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ze.prototype={set:function(_e){return j(this.options,_e),_e.touchAction&&this.touchAction.update(),_e.inputTarget&&(this.input.destroy(),this.input.target=_e.inputTarget,this.input.init()),this},stop:function(_e){this.session.stopped=_e?2:1},recognize:function(_e){var ye=this.session;if(!ye.stopped){this.touchAction.preventDefaults(_e);var Be,Ye=this.recognizers,Et=ye.curRecognizer;(!Et||Et&&8&Et.state)&&(Et=ye.curRecognizer=null);for(var Vt=0;Vt<Ye.length;)Be=Ye[Vt],2===ye.stopped||Et&&Be!=Et&&!Be.canRecognizeWith(Et)?Be.reset():Be.recognize(_e),!Et&&14&Be.state&&(Et=ye.curRecognizer=Be),Vt++}},get:function(_e){if(_e instanceof fs)return _e;for(var ye=this.recognizers,Be=0;Be<ye.length;Be++)if(ye[Be].options.event==_e)return ye[Be];return null},add:function(_e){if(S(_e,"add",this))return this;var ye=this.get(_e.options.event);return ye&&this.remove(ye),this.recognizers.push(_e),_e.manager=this,this.touchAction.update(),_e},remove:function(_e){if(S(_e,"remove",this))return this;if(_e=this.get(_e)){var ye=this.recognizers,Be=xe(ye,_e);-1!==Be&&(ye.splice(Be,1),this.touchAction.update())}return this},on:function(_e,ye){if(_e!==P&&ye!==P){var Be=this.handlers;return L(Te(_e),function(Ye){Be[Ye]=Be[Ye]||[],Be[Ye].push(ye)}),this}},off:function(_e,ye){if(_e!==P){var Be=this.handlers;return L(Te(_e),function(Ye){ye?Be[Ye]&&Be[Ye].splice(xe(Be[Ye],ye),1):delete Be[Ye]}),this}},emit:function(_e,ye){this.options.domEvents&&function Ft(_e,ye){var Be=A.createEvent("Event");Be.initEvent(_e,!0,!0),Be.gesture=ye,ye.target.dispatchEvent(Be)}(_e,ye);var Be=this.handlers[_e]&&this.handlers[_e].slice();if(Be&&Be.length){ye.type=_e,ye.preventDefault=function(){ye.srcEvent.preventDefault()};for(var Ye=0;Ye<Be.length;)Be[Ye](ye),Ye++}},destroy:function(){this.element&&at(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},j(W,{INPUT_START:gr,INPUT_MOVE:2,INPUT_END:Le,INPUT_CANCEL:tt,STATE_POSSIBLE:Ct,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:_t,DIRECTION_LEFT:ut,DIRECTION_RIGHT:Wt,DIRECTION_UP:Bt,DIRECTION_DOWN:On,DIRECTION_HORIZONTAL:zt,DIRECTION_VERTICAL:zn,DIRECTION_ALL:Gr,Manager:Ze,Input:si,TouchAction:ke,TouchInput:Qn,MouseInput:vd,PointerEventInput:pp,TouchMouseInput:ih,SingleTouchInput:cm,Recognizer:fs,AttrRecognizer:Ul,Tap:Kg,Pan:Wg,Swipe:Nv,Pinch:wy,Rotate:$g,Press:Bv,on:Pe,off:Ae,each:L,merge:Z,extend:z,assign:j,inherit:q,bindFn:X,prefixed:st}),(typeof f<"u"?f:typeof self<"u"?self:{}).Hammer=W,(y=function(){return W}.call(F,v,F,Q))!==P&&(Q.exports=y)}(window,document)},96829:(Q,F,v)=>{var y=v(26243),f=Object.prototype.toString,A="function"==typeof Blob||typeof Blob<"u"&&"[object BlobConstructor]"===f.call(Blob),C="function"==typeof File||typeof File<"u"&&"[object FileConstructor]"===f.call(File);Q.exports=function P(k){if(!k||"object"!=typeof k)return!1;if(y(k)){for(var O=0,E=k.length;O<E;O++)if(P(k[O]))return!0;return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(k)||"function"==typeof ArrayBuffer&&k instanceof ArrayBuffer||A&&k instanceof Blob||C&&k instanceof File)return!0;if(k.toJSON&&"function"==typeof k.toJSON&&1===arguments.length)return P(k.toJSON(),!0);for(var N in k)if(Object.prototype.hasOwnProperty.call(k,N)&&P(k[N]))return!0;return!1}},67323:Q=>{try{Q.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(F){Q.exports=!1}},18755:(Q,F,v)=>{var f;
/*!
        *  howler.js v2.1.3
        *  howlerjs.com
        *
        *  (c) 2013-2019, James Simpson of GoldFire Studios
        *  goldfirestudios.com
        *
        *  MIT License
        */!function(){"use strict";var A=function(){this.init()};A.prototype={init:function(){var S=this||C;return S._counter=1e3,S._html5AudioPool=[],S.html5PoolSize=10,S._codecs={},S._howls=[],S._muted=!1,S._volume=1,S._canPlayEvent="canplaythrough",S._navigator=typeof window<"u"&&window.navigator?window.navigator:null,S.masterGain=null,S.noAudio=!1,S.usingWebAudio=!0,S.autoSuspend=!0,S.ctx=null,S.autoUnlock=!0,S._setup(),S},volume:function(S){var L=this||C;if(S=parseFloat(S),L.ctx||I(),typeof S<"u"&&S>=0&&S<=1){if(L._volume=S,L._muted)return L;L.usingWebAudio&&L.masterGain.gain.setValueAtTime(S,C.ctx.currentTime);for(var D=0;D<L._howls.length;D++)if(!L._howls[D]._webAudio)for(var j=L._howls[D]._getSoundIds(),z=0;z<j.length;z++){var Z=L._howls[D]._soundById(j[z]);Z&&Z._node&&(Z._node.volume=Z._volume*S)}return L}return L._volume},mute:function(S){var L=this||C;L.ctx||I(),L._muted=S,L.usingWebAudio&&L.masterGain.gain.setValueAtTime(S?0:L._volume,C.ctx.currentTime);for(var D=0;D<L._howls.length;D++)if(!L._howls[D]._webAudio)for(var j=L._howls[D]._getSoundIds(),z=0;z<j.length;z++){var Z=L._howls[D]._soundById(j[z]);Z&&Z._node&&(Z._node.muted=!!S||Z._muted)}return L},unload:function(){for(var S=this||C,L=S._howls.length-1;L>=0;L--)S._howls[L].unload();return S.usingWebAudio&&S.ctx&&typeof S.ctx.close<"u"&&(S.ctx.close(),S.ctx=null,I()),S},codecs:function(S){return(this||C)._codecs[S.replace(/^x-/,"")]},_setup:function(){var S=this||C;if(S.state=S.ctx&&S.ctx.state||"suspended",S._autoSuspend(),!S.usingWebAudio)if(typeof Audio<"u")try{typeof(new Audio).oncanplaythrough>"u"&&(S._canPlayEvent="canplay")}catch(D){S.noAudio=!0}else S.noAudio=!0;try{(new Audio).muted&&(S.noAudio=!0)}catch(D){}return S.noAudio||S._setupCodecs(),S},_setupCodecs:function(){var S=this||C,L=null;try{L=typeof Audio<"u"?new Audio:null}catch(Z){return S}if(!L||"function"!=typeof L.canPlayType)return S;var D=L.canPlayType("audio/mpeg;").replace(/^no$/,""),j=S._navigator&&S._navigator.userAgent.match(/OPR\/([0-6].)/g),z=j&&parseInt(j[0].split("/")[1],10)<33;return S._codecs={mp3:!(z||!D&&!L.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!D,opus:!!L.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!L.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!L.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!L.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!L.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!L.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(L.canPlayType("audio/x-m4a;")||L.canPlayType("audio/m4a;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(L.canPlayType("audio/x-mp4;")||L.canPlayType("audio/mp4;")||L.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!L.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!L.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!L.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(L.canPlayType("audio/x-flac;")||L.canPlayType("audio/flac;")).replace(/^no$/,"")},S},_unlockAudio:function(){var S=this||C;if(!S._audioUnlocked&&S.ctx){S._audioUnlocked=!1,S.autoUnlock=!1,!S._mobileUnloaded&&44100!==S.ctx.sampleRate&&(S._mobileUnloaded=!0,S.unload()),S._scratchBuffer=S.ctx.createBuffer(1,1,22050);var L=function(D){for(var j=0;j<S.html5PoolSize;j++)try{var z=new Audio;z._unlocked=!0,S._releaseHtml5Audio(z)}catch(fe){S.noAudio=!0}for(j=0;j<S._howls.length;j++)if(!S._howls[j]._webAudio)for(var Z=S._howls[j]._getSoundIds(),q=0;q<Z.length;q++){var X=S._howls[j]._soundById(Z[q]);X&&X._node&&!X._node._unlocked&&(X._node._unlocked=!0,X._node.load())}S._autoResume();var ae=S.ctx.createBufferSource();ae.buffer=S._scratchBuffer,ae.connect(S.ctx.destination),typeof ae.start>"u"?ae.noteOn(0):ae.start(0),"function"==typeof S.ctx.resume&&S.ctx.resume(),ae.onended=function(){ae.disconnect(0),S._audioUnlocked=!0,document.removeEventListener("touchstart",L,!0),document.removeEventListener("touchend",L,!0),document.removeEventListener("click",L,!0);for(var fe=0;fe<S._howls.length;fe++)S._howls[fe]._emit("unlock")}};return document.addEventListener("touchstart",L,!0),document.addEventListener("touchend",L,!0),document.addEventListener("click",L,!0),S}},_obtainHtml5Audio:function(){var S=this||C;if(S._html5AudioPool.length)return S._html5AudioPool.pop();var L=(new Audio).play();return L&&typeof Promise<"u"&&(L instanceof Promise||"function"==typeof L.then)&&L.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(S){var L=this||C;return S._unlocked&&L._html5AudioPool.push(S),L},_autoSuspend:function(){var S=this;if(S.autoSuspend&&S.ctx&&!(typeof S.ctx.suspend>"u")&&C.usingWebAudio){for(var L=0;L<S._howls.length;L++)if(S._howls[L]._webAudio)for(var D=0;D<S._howls[L]._sounds.length;D++)if(!S._howls[L]._sounds[D]._paused)return S;return S._suspendTimer&&clearTimeout(S._suspendTimer),S._suspendTimer=setTimeout(function(){S.autoSuspend&&(S._suspendTimer=null,S.state="suspending",S.ctx.suspend().then(function(){S.state="suspended",S._resumeAfterSuspend&&(delete S._resumeAfterSuspend,S._autoResume())}))},3e4),S}},_autoResume:function(){var S=this;if(S.ctx&&!(typeof S.ctx.resume>"u")&&C.usingWebAudio)return"running"===S.state&&S._suspendTimer?(clearTimeout(S._suspendTimer),S._suspendTimer=null):"suspended"===S.state?(S.ctx.resume().then(function(){S.state="running";for(var L=0;L<S._howls.length;L++)S._howls[L]._emit("resume")}),S._suspendTimer&&(clearTimeout(S._suspendTimer),S._suspendTimer=null)):"suspending"===S.state&&(S._resumeAfterSuspend=!0),S}};var C=new A,P=function(S){S.src&&0!==S.src.length?this.init(S):console.error("An array of source files must be passed with any new Howl.")};P.prototype={init:function(S){var L=this;return C.ctx||I(),L._autoplay=S.autoplay||!1,L._format="string"!=typeof S.format?S.format:[S.format],L._html5=S.html5||!1,L._muted=S.mute||!1,L._loop=S.loop||!1,L._pool=S.pool||5,L._preload="boolean"!=typeof S.preload||S.preload,L._rate=S.rate||1,L._sprite=S.sprite||{},L._src="string"!=typeof S.src?S.src:[S.src],L._volume=void 0!==S.volume?S.volume:1,L._xhrWithCredentials=S.xhrWithCredentials||!1,L._duration=0,L._state="unloaded",L._sounds=[],L._endTimers={},L._queue=[],L._playLock=!1,L._onend=S.onend?[{fn:S.onend}]:[],L._onfade=S.onfade?[{fn:S.onfade}]:[],L._onload=S.onload?[{fn:S.onload}]:[],L._onloaderror=S.onloaderror?[{fn:S.onloaderror}]:[],L._onplayerror=S.onplayerror?[{fn:S.onplayerror}]:[],L._onpause=S.onpause?[{fn:S.onpause}]:[],L._onplay=S.onplay?[{fn:S.onplay}]:[],L._onstop=S.onstop?[{fn:S.onstop}]:[],L._onmute=S.onmute?[{fn:S.onmute}]:[],L._onvolume=S.onvolume?[{fn:S.onvolume}]:[],L._onrate=S.onrate?[{fn:S.onrate}]:[],L._onseek=S.onseek?[{fn:S.onseek}]:[],L._onunlock=S.onunlock?[{fn:S.onunlock}]:[],L._onresume=[],L._webAudio=C.usingWebAudio&&!L._html5,typeof C.ctx<"u"&&C.ctx&&C.autoUnlock&&C._unlockAudio(),C._howls.push(L),L._autoplay&&L._queue.push({event:"play",action:function(){L.play()}}),L._preload&&L.load(),L},load:function(){var S=this,L=null;if(C.noAudio)S._emit("loaderror",null,"No audio support.");else{"string"==typeof S._src&&(S._src=[S._src]);for(var D=0;D<S._src.length;D++){var j,z;if(S._format&&S._format[D])j=S._format[D];else{if("string"!=typeof(z=S._src[D])){S._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(j=/^data:audio\/([^;,]+);/i.exec(z))||(j=/\.([^.]+)$/.exec(z.split("?",1)[0])),j&&(j=j[1].toLowerCase())}if(j||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),j&&C.codecs(j)){L=S._src[D];break}}if(L)return S._src=L,S._state="loading","https:"===window.location.protocol&&"http:"===L.slice(0,5)&&(S._html5=!0,S._webAudio=!1),new k(S),S._webAudio&&E(S),S;S._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(S,L){var D=this,j=null;if("number"==typeof S)j=S,S=null;else{if("string"==typeof S&&"loaded"===D._state&&!D._sprite[S])return null;if(typeof S>"u"&&(S="__default",!D._playLock)){for(var z=0,Z=0;Z<D._sounds.length;Z++)D._sounds[Z]._paused&&!D._sounds[Z]._ended&&(z++,j=D._sounds[Z]._id);1===z?S=null:j=null}}var q=j?D._soundById(j):D._inactiveSound();if(!q)return null;if(j&&!S&&(S=q._sprite||"__default"),"loaded"!==D._state){q._sprite=S,q._ended=!1;var X=q._id;return D._queue.push({event:"play",action:function(){D.play(X)}}),X}if(j&&!q._paused)return L||D._loadQueue("play"),q._id;D._webAudio&&C._autoResume();var ae=Math.max(0,q._seek>0?q._seek:D._sprite[S][0]/1e3),fe=Math.max(0,(D._sprite[S][0]+D._sprite[S][1])/1e3-ae),Pe=1e3*fe/Math.abs(q._rate),Ae=D._sprite[S][0]/1e3,Ie=(D._sprite[S][0]+D._sprite[S][1])/1e3;q._sprite=S,q._ended=!1;var De=function(){q._paused=!1,q._seek=ae,q._start=Ae,q._stop=Ie,q._loop=!(!q._loop&&!D._sprite[S][2])};if(!(ae>=Ie)){var Te=q._node;if(D._webAudio){var xe=function(){D._playLock=!1,De(),D._refreshBuffer(q),Te.gain.setValueAtTime(q._muted||D._muted?0:q._volume,C.ctx.currentTime),q._playStart=C.ctx.currentTime,typeof Te.bufferSource.start>"u"?Te.bufferSource.noteGrainOn(0,ae,q._loop?86400:fe):Te.bufferSource.start(0,ae,q._loop?86400:fe),Pe!==1/0&&(D._endTimers[q._id]=setTimeout(D._ended.bind(D,q),Pe)),L||setTimeout(function(){D._emit("play",q._id),D._loadQueue()},0)};"running"===C.state?xe():(D._playLock=!0,D.once("resume",xe),D._clearTimer(q._id))}else{var Ge=function(){Te.currentTime=ae,Te.muted=q._muted||D._muted||C._muted||Te.muted,Te.volume=q._volume*C.volume(),Te.playbackRate=q._rate;try{var It=Te.play();if(It&&typeof Promise<"u"&&(It instanceof Promise||"function"==typeof It.then)?(D._playLock=!0,De(),It.then(function(){D._playLock=!1,Te._unlocked=!0,L||(D._emit("play",q._id),D._loadQueue())}).catch(function(){D._playLock=!1,D._emit("playerror",q._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),q._ended=!0,q._paused=!0})):L||(D._playLock=!1,De(),D._emit("play",q._id),D._loadQueue()),Te.playbackRate=q._rate,Te.paused)return void D._emit("playerror",q._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==S||q._loop?D._endTimers[q._id]=setTimeout(D._ended.bind(D,q),Pe):(D._endTimers[q._id]=function(){D._ended(q),Te.removeEventListener("ended",D._endTimers[q._id],!1)},Te.addEventListener("ended",D._endTimers[q._id],!1))}catch(xt){D._emit("playerror",q._id,xt)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===Te.src&&(Te.src=D._src,Te.load());var Ue=window&&window.ejecta||!Te.readyState&&C._navigator.isCocoonJS;if(Te.readyState>=3||Ue)Ge();else{D._playLock=!0;var st=function(){Ge(),Te.removeEventListener(C._canPlayEvent,st,!1)};Te.addEventListener(C._canPlayEvent,st,!1),D._clearTimer(q._id)}}return q._id}D._ended(q)},pause:function(S){var L=this;if("loaded"!==L._state||L._playLock)return L._queue.push({event:"pause",action:function(){L.pause(S)}}),L;for(var D=L._getSoundIds(S),j=0;j<D.length;j++){L._clearTimer(D[j]);var z=L._soundById(D[j]);if(z&&!z._paused&&(z._seek=L.seek(D[j]),z._rateSeek=0,z._paused=!0,L._stopFade(D[j]),z._node))if(L._webAudio){if(!z._node.bufferSource)continue;typeof z._node.bufferSource.stop>"u"?z._node.bufferSource.noteOff(0):z._node.bufferSource.stop(0),L._cleanBuffer(z._node)}else(!isNaN(z._node.duration)||z._node.duration===1/0)&&z._node.pause();arguments[1]||L._emit("pause",z?z._id:null)}return L},stop:function(S,L){var D=this;if("loaded"!==D._state||D._playLock)return D._queue.push({event:"stop",action:function(){D.stop(S)}}),D;for(var j=D._getSoundIds(S),z=0;z<j.length;z++){D._clearTimer(j[z]);var Z=D._soundById(j[z]);Z&&(Z._seek=Z._start||0,Z._rateSeek=0,Z._paused=!0,Z._ended=!0,D._stopFade(j[z]),Z._node&&(D._webAudio?Z._node.bufferSource&&(typeof Z._node.bufferSource.stop>"u"?Z._node.bufferSource.noteOff(0):Z._node.bufferSource.stop(0),D._cleanBuffer(Z._node)):(!isNaN(Z._node.duration)||Z._node.duration===1/0)&&(Z._node.currentTime=Z._start||0,Z._node.pause(),Z._node.duration===1/0&&D._clearSound(Z._node))),L||D._emit("stop",Z._id))}return D},mute:function(S,L){var D=this;if("loaded"!==D._state||D._playLock)return D._queue.push({event:"mute",action:function(){D.mute(S,L)}}),D;if(typeof L>"u"){if("boolean"!=typeof S)return D._muted;D._muted=S}for(var j=D._getSoundIds(L),z=0;z<j.length;z++){var Z=D._soundById(j[z]);Z&&(Z._muted=S,Z._interval&&D._stopFade(Z._id),D._webAudio&&Z._node?Z._node.gain.setValueAtTime(S?0:Z._volume,C.ctx.currentTime):Z._node&&(Z._node.muted=!!C._muted||S),D._emit("mute",Z._id))}return D},volume:function(){var D,j,q,S=this,L=arguments;if(0===L.length)return S._volume;if(1===L.length||2===L.length&&typeof L[1]>"u"?S._getSoundIds().indexOf(L[0])>=0?j=parseInt(L[0],10):D=parseFloat(L[0]):L.length>=2&&(D=parseFloat(L[0]),j=parseInt(L[1],10)),!(typeof D<"u"&&D>=0&&D<=1))return(q=j?S._soundById(j):S._sounds[0])?q._volume:0;if("loaded"!==S._state||S._playLock)return S._queue.push({event:"volume",action:function(){S.volume.apply(S,L)}}),S;typeof j>"u"&&(S._volume=D),j=S._getSoundIds(j);for(var X=0;X<j.length;X++)(q=S._soundById(j[X]))&&(q._volume=D,L[2]||S._stopFade(j[X]),S._webAudio&&q._node&&!q._muted?q._node.gain.setValueAtTime(D,C.ctx.currentTime):q._node&&!q._muted&&(q._node.volume=D*C.volume()),S._emit("volume",q._id));return S},fade:function(S,L,D,j){var z=this;if("loaded"!==z._state||z._playLock)return z._queue.push({event:"fade",action:function(){z.fade(S,L,D,j)}}),z;S=parseFloat(S),L=parseFloat(L),D=parseFloat(D),z.volume(S,j);for(var Z=z._getSoundIds(j),q=0;q<Z.length;q++){var X=z._soundById(Z[q]);if(X){if(j||z._stopFade(Z[q]),z._webAudio&&!X._muted){var ae=C.ctx.currentTime,fe=ae+D/1e3;X._volume=S,X._node.gain.setValueAtTime(S,ae),X._node.gain.linearRampToValueAtTime(L,fe)}z._startFadeInterval(X,S,L,D,Z[q],typeof j>"u")}}return z},_startFadeInterval:function(S,L,D,j,z,Z){var q=this,X=L,ae=D-L,fe=Math.abs(ae/.01),Pe=Math.max(4,fe>0?j/fe:j),Ae=Date.now();S._fadeTo=D,S._interval=setInterval(function(){var Ie=(Date.now()-Ae)/j;Ae=Date.now(),X+=ae*Ie,X=Math.max(0,X),X=Math.min(1,X),X=Math.round(100*X)/100,q._webAudio?S._volume=X:q.volume(X,S._id,!0),Z&&(q._volume=X),(D<L&&X<=D||D>L&&X>=D)&&(clearInterval(S._interval),S._interval=null,S._fadeTo=null,q.volume(D,S._id),q._emit("fade",S._id))},Pe)},_stopFade:function(S){var L=this,D=L._soundById(S);return D&&D._interval&&(L._webAudio&&D._node.gain.cancelScheduledValues(C.ctx.currentTime),clearInterval(D._interval),D._interval=null,L.volume(D._fadeTo,S),D._fadeTo=null,L._emit("fade",S)),L},loop:function(){var D,j,z,S=this,L=arguments;if(0===L.length)return S._loop;if(1===L.length){if("boolean"!=typeof L[0])return!!(z=S._soundById(parseInt(L[0],10)))&&z._loop;S._loop=D=L[0]}else 2===L.length&&(D=L[0],j=parseInt(L[1],10));for(var Z=S._getSoundIds(j),q=0;q<Z.length;q++)(z=S._soundById(Z[q]))&&(z._loop=D,S._webAudio&&z._node&&z._node.bufferSource&&(z._node.bufferSource.loop=D,D&&(z._node.bufferSource.loopStart=z._start||0,z._node.bufferSource.loopEnd=z._stop)));return S},rate:function(){var D,j,q,S=this,L=arguments;if(0===L.length?j=S._sounds[0]._id:1===L.length?S._getSoundIds().indexOf(L[0])>=0?j=parseInt(L[0],10):D=parseFloat(L[0]):2===L.length&&(D=parseFloat(L[0]),j=parseInt(L[1],10)),"number"!=typeof D)return(q=S._soundById(j))?q._rate:S._rate;if("loaded"!==S._state||S._playLock)return S._queue.push({event:"rate",action:function(){S.rate.apply(S,L)}}),S;typeof j>"u"&&(S._rate=D),j=S._getSoundIds(j);for(var X=0;X<j.length;X++)if(q=S._soundById(j[X])){S.playing(j[X])&&(q._rateSeek=S.seek(j[X]),q._playStart=S._webAudio?C.ctx.currentTime:q._playStart),q._rate=D,S._webAudio&&q._node&&q._node.bufferSource?q._node.bufferSource.playbackRate.setValueAtTime(D,C.ctx.currentTime):q._node&&(q._node.playbackRate=D);var ae=S.seek(j[X]),Pe=1e3*((S._sprite[q._sprite][0]+S._sprite[q._sprite][1])/1e3-ae)/Math.abs(q._rate);(S._endTimers[j[X]]||!q._paused)&&(S._clearTimer(j[X]),S._endTimers[j[X]]=setTimeout(S._ended.bind(S,q),Pe)),S._emit("rate",q._id)}return S},seek:function(){var D,j,S=this,L=arguments;if(0===L.length?j=S._sounds[0]._id:1===L.length?S._getSoundIds().indexOf(L[0])>=0?j=parseInt(L[0],10):S._sounds.length&&(j=S._sounds[0]._id,D=parseFloat(L[0])):2===L.length&&(D=parseFloat(L[0]),j=parseInt(L[1],10)),typeof j>"u")return S;if("loaded"!==S._state||S._playLock)return S._queue.push({event:"seek",action:function(){S.seek.apply(S,L)}}),S;var q=S._soundById(j);if(q){if(!("number"==typeof D&&D>=0)){if(S._webAudio){var Pe=S.playing(j)?C.ctx.currentTime-q._playStart:0;return q._seek+((q._rateSeek?q._rateSeek-q._seek:0)+Pe*Math.abs(q._rate))}return q._node.currentTime}var X=S.playing(j);X&&S.pause(j,!0),q._seek=D,q._ended=!1,S._clearTimer(j),!S._webAudio&&q._node&&!isNaN(q._node.duration)&&(q._node.currentTime=D);var ae=function(){S._emit("seek",j),X&&S.play(j,!0)};if(X&&!S._webAudio){var fe=function(){S._playLock?setTimeout(fe,0):ae()};setTimeout(fe,0)}else ae()}return S},playing:function(S){var L=this;if("number"==typeof S){var D=L._soundById(S);return!!D&&!D._paused}for(var j=0;j<L._sounds.length;j++)if(!L._sounds[j]._paused)return!0;return!1},duration:function(S){var L=this,D=L._duration,j=L._soundById(S);return j&&(D=L._sprite[j._sprite][1]/1e3),D},state:function(){return this._state},unload:function(){for(var S=this,L=S._sounds,D=0;D<L.length;D++)L[D]._paused||S.stop(L[D]._id),S._webAudio||(S._clearSound(L[D]._node),L[D]._node.removeEventListener("error",L[D]._errorFn,!1),L[D]._node.removeEventListener(C._canPlayEvent,L[D]._loadFn,!1),C._releaseHtml5Audio(L[D]._node)),delete L[D]._node,S._clearTimer(L[D]._id);var j=C._howls.indexOf(S);j>=0&&C._howls.splice(j,1);var z=!0;for(D=0;D<C._howls.length;D++)if(C._howls[D]._src===S._src||S._src.indexOf(C._howls[D]._src)>=0){z=!1;break}return O&&z&&delete O[S._src],C.noAudio=!1,S._state="unloaded",S._sounds=[],S=null,null},on:function(S,L,D,j){return"function"==typeof L&&this["_on"+S].push(j?{id:D,fn:L,once:j}:{id:D,fn:L}),this},off:function(S,L,D){var j=this,z=j["_on"+S],Z=0;if("number"==typeof L&&(D=L,L=null),L||D)for(Z=0;Z<z.length;Z++){var q=D===z[Z].id;if(L===z[Z].fn&&q||!L&&q){z.splice(Z,1);break}}else if(S)j["_on"+S]=[];else{var X=Object.keys(j);for(Z=0;Z<X.length;Z++)0===X[Z].indexOf("_on")&&Array.isArray(j[X[Z]])&&(j[X[Z]]=[])}return j},once:function(S,L,D){return this.on(S,L,D,1),this},_emit:function(S,L,D){for(var j=this,z=j["_on"+S],Z=z.length-1;Z>=0;Z--)(!z[Z].id||z[Z].id===L||"load"===S)&&(setTimeout(function(q){q.call(this,L,D)}.bind(j,z[Z].fn),0),z[Z].once&&j.off(S,z[Z].fn,z[Z].id));return j._loadQueue(S),j},_loadQueue:function(S){var L=this;if(L._queue.length>0){var D=L._queue[0];D.event===S&&(L._queue.shift(),L._loadQueue()),S||D.action()}return L},_ended:function(S){var L=this,D=S._sprite;if(!L._webAudio&&S._node&&!S._node.paused&&!S._node.ended&&S._node.currentTime<S._stop)return setTimeout(L._ended.bind(L,S),100),L;var j=!(!S._loop&&!L._sprite[D][2]);if(L._emit("end",S._id),!L._webAudio&&j&&L.stop(S._id,!0).play(S._id),L._webAudio&&j){L._emit("play",S._id),S._seek=S._start||0,S._rateSeek=0,S._playStart=C.ctx.currentTime;var z=1e3*(S._stop-S._start)/Math.abs(S._rate);L._endTimers[S._id]=setTimeout(L._ended.bind(L,S),z)}return L._webAudio&&!j&&(S._paused=!0,S._ended=!0,S._seek=S._start||0,S._rateSeek=0,L._clearTimer(S._id),L._cleanBuffer(S._node),C._autoSuspend()),!L._webAudio&&!j&&L.stop(S._id,!0),L},_clearTimer:function(S){var L=this;if(L._endTimers[S]){if("function"!=typeof L._endTimers[S])clearTimeout(L._endTimers[S]);else{var D=L._soundById(S);D&&D._node&&D._node.removeEventListener("ended",L._endTimers[S],!1)}delete L._endTimers[S]}return L},_soundById:function(S){for(var L=this,D=0;D<L._sounds.length;D++)if(S===L._sounds[D]._id)return L._sounds[D];return null},_inactiveSound:function(){var S=this;S._drain();for(var L=0;L<S._sounds.length;L++)if(S._sounds[L]._ended)return S._sounds[L].reset();return new k(S)},_drain:function(){var S=this,L=S._pool,D=0,j=0;if(!(S._sounds.length<L)){for(j=0;j<S._sounds.length;j++)S._sounds[j]._ended&&D++;for(j=S._sounds.length-1;j>=0;j--){if(D<=L)return;S._sounds[j]._ended&&(S._webAudio&&S._sounds[j]._node&&S._sounds[j]._node.disconnect(0),S._sounds.splice(j,1),D--)}}},_getSoundIds:function(S){if(typeof S>"u"){for(var D=[],j=0;j<this._sounds.length;j++)D.push(this._sounds[j]._id);return D}return[S]},_refreshBuffer:function(S){return S._node.bufferSource=C.ctx.createBufferSource(),S._node.bufferSource.buffer=O[this._src],S._node.bufferSource.connect(S._panner?S._panner:S._node),S._node.bufferSource.loop=S._loop,S._loop&&(S._node.bufferSource.loopStart=S._start||0,S._node.bufferSource.loopEnd=S._stop||0),S._node.bufferSource.playbackRate.setValueAtTime(S._rate,C.ctx.currentTime),this},_cleanBuffer:function(S){var D=C._navigator&&C._navigator.vendor.indexOf("Apple")>=0;if(C._scratchBuffer&&S.bufferSource&&(S.bufferSource.onended=null,S.bufferSource.disconnect(0),D))try{S.bufferSource.buffer=C._scratchBuffer}catch(j){}return S.bufferSource=null,this},_clearSound:function(S){/MSIE |Trident\//.test(C._navigator&&C._navigator.userAgent)||(S.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var k=function(S){this._parent=S,this.init()};k.prototype={init:function(){var S=this,L=S._parent;return S._muted=L._muted,S._loop=L._loop,S._volume=L._volume,S._rate=L._rate,S._seek=0,S._paused=!0,S._ended=!0,S._sprite="__default",S._id=++C._counter,L._sounds.push(S),S.create(),S},create:function(){var S=this,L=S._parent,D=C._muted||S._muted||S._parent._muted?0:S._volume;return L._webAudio?(S._node=typeof C.ctx.createGain>"u"?C.ctx.createGainNode():C.ctx.createGain(),S._node.gain.setValueAtTime(D,C.ctx.currentTime),S._node.paused=!0,S._node.connect(C.masterGain)):C.noAudio||(S._node=C._obtainHtml5Audio(),S._errorFn=S._errorListener.bind(S),S._node.addEventListener("error",S._errorFn,!1),S._loadFn=S._loadListener.bind(S),S._node.addEventListener(C._canPlayEvent,S._loadFn,!1),S._node.src=L._src,S._node.preload="auto",S._node.volume=D*C.volume(),S._node.load()),S},reset:function(){var S=this,L=S._parent;return S._muted=L._muted,S._loop=L._loop,S._volume=L._volume,S._rate=L._rate,S._seek=0,S._rateSeek=0,S._paused=!0,S._ended=!0,S._sprite="__default",S._id=++C._counter,S},_errorListener:function(){var S=this;S._parent._emit("loaderror",S._id,S._node.error?S._node.error.code:0),S._node.removeEventListener("error",S._errorFn,!1)},_loadListener:function(){var S=this,L=S._parent;L._duration=Math.ceil(10*S._node.duration)/10,0===Object.keys(L._sprite).length&&(L._sprite={__default:[0,1e3*L._duration]}),"loaded"!==L._state&&(L._state="loaded",L._emit("load"),L._loadQueue()),S._node.removeEventListener(C._canPlayEvent,S._loadFn,!1)}};var O={},E=function(S){var L=S._src;if(O[L])return S._duration=O[L].duration,void x(S);if(/^data:[^;]+;base64,/.test(L)){for(var D=atob(L.split(",")[1]),j=new Uint8Array(D.length),z=0;z<D.length;++z)j[z]=D.charCodeAt(z);M(j.buffer,S)}else{var Z=new XMLHttpRequest;Z.open("GET",L,!0),Z.withCredentials=S._xhrWithCredentials,Z.responseType="arraybuffer",Z.onload=function(){var q=(Z.status+"")[0];"0"===q||"2"===q||"3"===q?M(Z.response,S):S._emit("loaderror",null,"Failed loading audio file with status: "+Z.status+".")},Z.onerror=function(){S._webAudio&&(S._html5=!0,S._webAudio=!1,S._sounds=[],delete O[L],S.load())},N(Z)}},N=function(S){try{S.send()}catch(L){S.onerror()}},M=function(S,L){var D=function(){L._emit("loaderror",null,"Decoding audio data failed.")},j=function(z){z&&L._sounds.length>0?(O[L._src]=z,x(L,z)):D()};typeof Promise<"u"&&1===C.ctx.decodeAudioData.length?C.ctx.decodeAudioData(S).then(j).catch(D):C.ctx.decodeAudioData(S,j,D)},x=function(S,L){L&&!S._duration&&(S._duration=L.duration),0===Object.keys(S._sprite).length&&(S._sprite={__default:[0,1e3*S._duration]}),"loaded"!==S._state&&(S._state="loaded",S._emit("load"),S._loadQueue())},I=function(){if(C.usingWebAudio){try{typeof AudioContext<"u"?C.ctx=new AudioContext:typeof webkitAudioContext<"u"?C.ctx=new webkitAudioContext:C.usingWebAudio=!1}catch(z){C.usingWebAudio=!1}C.ctx||(C.usingWebAudio=!1);var S=/iP(hone|od|ad)/.test(C._navigator&&C._navigator.platform),L=C._navigator&&C._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),D=L?parseInt(L[1],10):null;if(S&&D&&D<9){var j=/safari/.test(C._navigator&&C._navigator.userAgent.toLowerCase());(C._navigator&&C._navigator.standalone&&!j||C._navigator&&!C._navigator.standalone&&!j)&&(C.usingWebAudio=!1)}C.usingWebAudio&&(C.masterGain=typeof C.ctx.createGain>"u"?C.ctx.createGainNode():C.ctx.createGain(),C.masterGain.gain.setValueAtTime(C._muted?0:C._volume,C.ctx.currentTime),C.masterGain.connect(C.ctx.destination)),C._setup()}};void 0!==(f=function(){return{Howler:C,Howl:P}}.apply(F,[]))&&(Q.exports=f),F.Howler=C,F.Howl=P,typeof window<"u"?(window.HowlerGlobal=A,window.Howler=C,window.Howl=P,window.Sound=k):typeof v.g<"u"&&(v.g.HowlerGlobal=A,v.g.Howler=C,v.g.Howl=P,v.g.Sound=k)}(),
/*!
         *  Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
         *  
         *  howler.js v2.1.3
         *  howlerjs.com
         *
         *  (c) 2013-2019, James Simpson of GoldFire Studios
         *  goldfirestudios.com
         *
         *  MIT License
         */
function(){"use strict";var C;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(C){var P=this;if(!P.ctx||!P.ctx.listener)return P;for(var k=P._howls.length-1;k>=0;k--)P._howls[k].stereo(C);return P},HowlerGlobal.prototype.pos=function(C,P,k){var O=this;return O.ctx&&O.ctx.listener?"number"!=typeof C?O._pos:(O._pos=[C,P="number"!=typeof P?O._pos[1]:P,k="number"!=typeof k?O._pos[2]:k],typeof O.ctx.listener.positionX<"u"?(O.ctx.listener.positionX.setTargetAtTime(O._pos[0],Howler.ctx.currentTime,.1),O.ctx.listener.positionY.setTargetAtTime(O._pos[1],Howler.ctx.currentTime,.1),O.ctx.listener.positionZ.setTargetAtTime(O._pos[2],Howler.ctx.currentTime,.1)):O.ctx.listener.setPosition(O._pos[0],O._pos[1],O._pos[2]),O):O},HowlerGlobal.prototype.orientation=function(C,P,k,O,E,N){var M=this;if(!M.ctx||!M.ctx.listener)return M;var x=M._orientation;return"number"!=typeof C?x:(M._orientation=[C,P="number"!=typeof P?x[1]:P,k="number"!=typeof k?x[2]:k,O="number"!=typeof O?x[3]:O,E="number"!=typeof E?x[4]:E,N="number"!=typeof N?x[5]:N],typeof M.ctx.listener.forwardX<"u"?(M.ctx.listener.forwardX.setTargetAtTime(C,Howler.ctx.currentTime,.1),M.ctx.listener.forwardY.setTargetAtTime(P,Howler.ctx.currentTime,.1),M.ctx.listener.forwardZ.setTargetAtTime(k,Howler.ctx.currentTime,.1),M.ctx.listener.upX.setTargetAtTime(O,Howler.ctx.currentTime,.1),M.ctx.listener.upY.setTargetAtTime(E,Howler.ctx.currentTime,.1),M.ctx.listener.upZ.setTargetAtTime(N,Howler.ctx.currentTime,.1)):M.ctx.listener.setOrientation(C,P,k,O,E,N),M)},Howl.prototype.init=(C=Howl.prototype.init,function(P){var k=this;return k._orientation=P.orientation||[1,0,0],k._stereo=P.stereo||null,k._pos=P.pos||null,k._pannerAttr={coneInnerAngle:typeof P.coneInnerAngle<"u"?P.coneInnerAngle:360,coneOuterAngle:typeof P.coneOuterAngle<"u"?P.coneOuterAngle:360,coneOuterGain:typeof P.coneOuterGain<"u"?P.coneOuterGain:0,distanceModel:typeof P.distanceModel<"u"?P.distanceModel:"inverse",maxDistance:typeof P.maxDistance<"u"?P.maxDistance:1e4,panningModel:typeof P.panningModel<"u"?P.panningModel:"HRTF",refDistance:typeof P.refDistance<"u"?P.refDistance:1,rolloffFactor:typeof P.rolloffFactor<"u"?P.rolloffFactor:1},k._onstereo=P.onstereo?[{fn:P.onstereo}]:[],k._onpos=P.onpos?[{fn:P.onpos}]:[],k._onorientation=P.onorientation?[{fn:P.onorientation}]:[],C.call(this,P)}),Howl.prototype.stereo=function(C,P){var k=this;if(!k._webAudio)return k;if("loaded"!==k._state)return k._queue.push({event:"stereo",action:function(){k.stereo(C,P)}}),k;var O=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof P>"u"){if("number"!=typeof C)return k._stereo;k._stereo=C,k._pos=[C,0,0]}for(var E=k._getSoundIds(P),N=0;N<E.length;N++){var M=k._soundById(E[N]);if(M){if("number"!=typeof C)return M._stereo;M._stereo=C,M._pos=[C,0,0],M._node&&(M._pannerAttr.panningModel="equalpower",(!M._panner||!M._panner.pan)&&A(M,O),"spatial"===O?typeof M._panner.positionX<"u"?(M._panner.positionX.setValueAtTime(C,Howler.ctx.currentTime),M._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),M._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):M._panner.setPosition(C,0,0):M._panner.pan.setValueAtTime(C,Howler.ctx.currentTime)),k._emit("stereo",M._id)}}return k},Howl.prototype.pos=function(C,P,k,O){var E=this;if(!E._webAudio)return E;if("loaded"!==E._state)return E._queue.push({event:"pos",action:function(){E.pos(C,P,k,O)}}),E;if(P="number"!=typeof P?0:P,k="number"!=typeof k?-.5:k,typeof O>"u"){if("number"!=typeof C)return E._pos;E._pos=[C,P,k]}for(var N=E._getSoundIds(O),M=0;M<N.length;M++){var x=E._soundById(N[M]);if(x){if("number"!=typeof C)return x._pos;x._pos=[C,P,k],x._node&&((!x._panner||x._panner.pan)&&A(x,"spatial"),typeof x._panner.positionX<"u"?(x._panner.positionX.setValueAtTime(C,Howler.ctx.currentTime),x._panner.positionY.setValueAtTime(P,Howler.ctx.currentTime),x._panner.positionZ.setValueAtTime(k,Howler.ctx.currentTime)):x._panner.setPosition(C,P,k)),E._emit("pos",x._id)}}return E},Howl.prototype.orientation=function(C,P,k,O){var E=this;if(!E._webAudio)return E;if("loaded"!==E._state)return E._queue.push({event:"orientation",action:function(){E.orientation(C,P,k,O)}}),E;if(P="number"!=typeof P?E._orientation[1]:P,k="number"!=typeof k?E._orientation[2]:k,typeof O>"u"){if("number"!=typeof C)return E._orientation;E._orientation=[C,P,k]}for(var N=E._getSoundIds(O),M=0;M<N.length;M++){var x=E._soundById(N[M]);if(x){if("number"!=typeof C)return x._orientation;x._orientation=[C,P,k],x._node&&(x._panner||(x._pos||(x._pos=E._pos||[0,0,-.5]),A(x,"spatial")),typeof x._panner.orientationX<"u"?(x._panner.orientationX.setValueAtTime(C,Howler.ctx.currentTime),x._panner.orientationY.setValueAtTime(P,Howler.ctx.currentTime),x._panner.orientationZ.setValueAtTime(k,Howler.ctx.currentTime)):x._panner.setOrientation(C,P,k)),E._emit("orientation",x._id)}}return E},Howl.prototype.pannerAttr=function(){var k,O,E,C=this,P=arguments;if(!C._webAudio)return C;if(0===P.length)return C._pannerAttr;if(1===P.length){if("object"!=typeof P[0])return(E=C._soundById(parseInt(P[0],10)))?E._pannerAttr:C._pannerAttr;k=P[0],typeof O>"u"&&(k.pannerAttr||(k.pannerAttr={coneInnerAngle:k.coneInnerAngle,coneOuterAngle:k.coneOuterAngle,coneOuterGain:k.coneOuterGain,distanceModel:k.distanceModel,maxDistance:k.maxDistance,refDistance:k.refDistance,rolloffFactor:k.rolloffFactor,panningModel:k.panningModel}),C._pannerAttr={coneInnerAngle:typeof k.pannerAttr.coneInnerAngle<"u"?k.pannerAttr.coneInnerAngle:C._coneInnerAngle,coneOuterAngle:typeof k.pannerAttr.coneOuterAngle<"u"?k.pannerAttr.coneOuterAngle:C._coneOuterAngle,coneOuterGain:typeof k.pannerAttr.coneOuterGain<"u"?k.pannerAttr.coneOuterGain:C._coneOuterGain,distanceModel:typeof k.pannerAttr.distanceModel<"u"?k.pannerAttr.distanceModel:C._distanceModel,maxDistance:typeof k.pannerAttr.maxDistance<"u"?k.pannerAttr.maxDistance:C._maxDistance,refDistance:typeof k.pannerAttr.refDistance<"u"?k.pannerAttr.refDistance:C._refDistance,rolloffFactor:typeof k.pannerAttr.rolloffFactor<"u"?k.pannerAttr.rolloffFactor:C._rolloffFactor,panningModel:typeof k.pannerAttr.panningModel<"u"?k.pannerAttr.panningModel:C._panningModel})}else 2===P.length&&(k=P[0],O=parseInt(P[1],10));for(var N=C._getSoundIds(O),M=0;M<N.length;M++)if(E=C._soundById(N[M])){var x=E._pannerAttr;x={coneInnerAngle:typeof k.coneInnerAngle<"u"?k.coneInnerAngle:x.coneInnerAngle,coneOuterAngle:typeof k.coneOuterAngle<"u"?k.coneOuterAngle:x.coneOuterAngle,coneOuterGain:typeof k.coneOuterGain<"u"?k.coneOuterGain:x.coneOuterGain,distanceModel:typeof k.distanceModel<"u"?k.distanceModel:x.distanceModel,maxDistance:typeof k.maxDistance<"u"?k.maxDistance:x.maxDistance,refDistance:typeof k.refDistance<"u"?k.refDistance:x.refDistance,rolloffFactor:typeof k.rolloffFactor<"u"?k.rolloffFactor:x.rolloffFactor,panningModel:typeof k.panningModel<"u"?k.panningModel:x.panningModel};var I=E._panner;I?(I.coneInnerAngle=x.coneInnerAngle,I.coneOuterAngle=x.coneOuterAngle,I.coneOuterGain=x.coneOuterGain,I.distanceModel=x.distanceModel,I.maxDistance=x.maxDistance,I.refDistance=x.refDistance,I.rolloffFactor=x.rolloffFactor,I.panningModel=x.panningModel):(E._pos||(E._pos=C._pos||[0,0,-.5]),A(E,"spatial"))}return C},Sound.prototype.init=function(C){return function(){var P=this,k=P._parent;P._orientation=k._orientation,P._stereo=k._stereo,P._pos=k._pos,P._pannerAttr=k._pannerAttr,C.call(this),P._stereo?k.stereo(P._stereo):P._pos&&k.pos(P._pos[0],P._pos[1],P._pos[2],P._id)}}(Sound.prototype.init),Sound.prototype.reset=function(C){return function(){var P=this,k=P._parent;return P._orientation=k._orientation,P._stereo=k._stereo,P._pos=k._pos,P._pannerAttr=k._pannerAttr,P._stereo?k.stereo(P._stereo):P._pos?k.pos(P._pos[0],P._pos[1],P._pos[2],P._id):P._panner&&(P._panner.disconnect(0),P._panner=void 0,k._refreshBuffer(P)),C.call(this)}}(Sound.prototype.reset);var A=function(C,P){"spatial"===(P=P||"spatial")?(C._panner=Howler.ctx.createPanner(),C._panner.coneInnerAngle=C._pannerAttr.coneInnerAngle,C._panner.coneOuterAngle=C._pannerAttr.coneOuterAngle,C._panner.coneOuterGain=C._pannerAttr.coneOuterGain,C._panner.distanceModel=C._pannerAttr.distanceModel,C._panner.maxDistance=C._pannerAttr.maxDistance,C._panner.refDistance=C._pannerAttr.refDistance,C._panner.rolloffFactor=C._pannerAttr.rolloffFactor,C._panner.panningModel=C._pannerAttr.panningModel,typeof C._panner.positionX<"u"?(C._panner.positionX.setValueAtTime(C._pos[0],Howler.ctx.currentTime),C._panner.positionY.setValueAtTime(C._pos[1],Howler.ctx.currentTime),C._panner.positionZ.setValueAtTime(C._pos[2],Howler.ctx.currentTime)):C._panner.setPosition(C._pos[0],C._pos[1],C._pos[2]),typeof C._panner.orientationX<"u"?(C._panner.orientationX.setValueAtTime(C._orientation[0],Howler.ctx.currentTime),C._panner.orientationY.setValueAtTime(C._orientation[1],Howler.ctx.currentTime),C._panner.orientationZ.setValueAtTime(C._orientation[2],Howler.ctx.currentTime)):C._panner.setOrientation(C._orientation[0],C._orientation[1],C._orientation[2])):(C._panner=Howler.ctx.createStereoPanner(),C._panner.pan.setValueAtTime(C._stereo,Howler.ctx.currentTime)),C._panner.connect(C._node),C._paused||C._parent.pause(C._id,!0).play(C._id,!0)}}()},68805:function(Q){Q.exports=function(F){var v={};function y(f){if(v[f])return v[f].exports;var A=v[f]={i:f,l:!1,exports:{}};return F[f].call(A.exports,A,A.exports,y),A.l=!0,A.exports}return y.m=F,y.c=v,y.d=function(f,A,C){y.o(f,A)||Object.defineProperty(f,A,{enumerable:!0,get:C})},y.r=function(f){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},y.t=function(f,A){if(1&A&&(f=y(f)),8&A||4&A&&"object"==typeof f&&f&&f.__esModule)return f;var C=Object.create(null);if(y.r(C),Object.defineProperty(C,"default",{enumerable:!0,value:f}),2&A&&"string"!=typeof f)for(var P in f)y.d(C,P,function(k){return f[k]}.bind(null,P));return C},y.n=function(f){var A=f&&f.__esModule?function(){return f.default}:function(){return f};return y.d(A,"a",A),A},y.o=function(f,A){return Object.prototype.hasOwnProperty.call(f,A)},y.p="",y(y.s=0)}([function(F,v,y){"use strict";var f,q;function A(q){return["image/png","image/jpeg","image/gif"].some(X=>X===q)}y.r(v),y.d(v,"canvastoDataURL",function(){return P}),y.d(v,"canvastoFile",function(){return k}),y.d(v,"dataURLtoFile",function(){return E}),y.d(v,"dataURLtoImage",function(){return N}),y.d(v,"downloadFile",function(){return M}),y.d(v,"filetoDataURL",function(){return x}),y.d(v,"imagetoCanvas",function(){return S}),y.d(v,"urltoBlob",function(){return L}),y.d(v,"urltoImage",function(){return D}),y.d(v,"compress",function(){return z}),y.d(v,"compressAccurately",function(){return Z}),y.d(v,"EImageType",function(){return f}),(q=f||(f={})).PNG="image/png",q.JPEG="image/jpeg",q.GIF="image/gif";var C=function(q,X,ae,fe){return new(ae||(ae=Promise))(function(Pe,Ae){function Ie(xe){try{Te(fe.next(xe))}catch(Ge){Ae(Ge)}}function De(xe){try{Te(fe.throw(xe))}catch(Ge){Ae(Ge)}}function Te(xe){var Ge;xe.done?Pe(xe.value):(Ge=xe.value,Ge instanceof ae?Ge:new ae(function(Ue){Ue(Ge)})).then(Ie,De)}Te((fe=fe.apply(q,X||[])).next())})};function P(q,X=.92,ae=f.JPEG){return C(this,void 0,void 0,function*(){return A(ae)||(ae=f.JPEG),q.toDataURL(ae,X)})}function k(q,X=.92,ae=f.JPEG){return new Promise(fe=>q.toBlob(Pe=>fe(Pe),ae,X))}var O=function(q,X,ae,fe){return new(ae||(ae=Promise))(function(Pe,Ae){function Ie(xe){try{Te(fe.next(xe))}catch(Ge){Ae(Ge)}}function De(xe){try{Te(fe.throw(xe))}catch(Ge){Ae(Ge)}}function Te(xe){var Ge;xe.done?Pe(xe.value):(Ge=xe.value,Ge instanceof ae?Ge:new ae(function(Ue){Ue(Ge)})).then(Ie,De)}Te((fe=fe.apply(q,X||[])).next())})};function E(q,X){return O(this,void 0,void 0,function*(){const ae=q.split(",");let fe=ae[0].match(/:(.*?);/)[1];const Pe=atob(ae[1]);let Ae=Pe.length;const Ie=new Uint8Array(Ae);for(;Ae--;)Ie[Ae]=Pe.charCodeAt(Ae);return A(X)&&(fe=X),new Blob([Ie],{type:fe})})}function N(q){return new Promise((X,ae)=>{const fe=new Image;fe.onload=()=>X(fe),fe.onerror=()=>ae(new Error("dataURLtoImage(): dataURL is illegal")),fe.src=q})}function M(q,X){const ae=document.createElement("a");ae.href=window.URL.createObjectURL(q),ae.download=X||Date.now().toString(36),document.body.appendChild(ae);const fe=document.createEvent("MouseEvents");fe.initEvent("click",!1,!1),ae.dispatchEvent(fe),document.body.removeChild(ae)}function x(q){return new Promise(X=>{const ae=new FileReader;ae.onloadend=fe=>X(fe.target.result),ae.readAsDataURL(q)})}var I=function(q,X,ae,fe){return new(ae||(ae=Promise))(function(Pe,Ae){function Ie(xe){try{Te(fe.next(xe))}catch(Ge){Ae(Ge)}}function De(xe){try{Te(fe.throw(xe))}catch(Ge){Ae(Ge)}}function Te(xe){var Ge;xe.done?Pe(xe.value):(Ge=xe.value,Ge instanceof ae?Ge:new ae(function(Ue){Ue(Ge)})).then(Ie,De)}Te((fe=fe.apply(q,X||[])).next())})};function S(q,X={}){return I(this,void 0,void 0,function*(){const ae=Object.assign({},X),fe=document.createElement("canvas"),Pe=fe.getContext("2d");let Ae,Ie;for(const De in ae)Object.prototype.hasOwnProperty.call(ae,De)&&(ae[De]=Number(ae[De]));if(ae.scale){const De=ae.scale>0&&ae.scale<10?ae.scale:1;Ie=q.width*De,Ae=q.height*De}else Ie=ae.width||ae.height*q.width/q.height||q.width,Ae=ae.height||ae.width*q.height/q.width||q.height;switch([5,6,7,8].some(De=>De===ae.orientation)?(fe.height=Ie,fe.width=Ae):(fe.height=Ae,fe.width=Ie),ae.orientation){case 3:Pe.rotate(180*Math.PI/180),Pe.drawImage(q,-fe.width,-fe.height,fe.width,fe.height);break;case 6:Pe.rotate(90*Math.PI/180),Pe.drawImage(q,0,-fe.width,fe.height,fe.width);break;case 8:Pe.rotate(270*Math.PI/180),Pe.drawImage(q,-fe.height,0,fe.height,fe.width);break;case 2:Pe.translate(fe.width,0),Pe.scale(-1,1),Pe.drawImage(q,0,0,fe.width,fe.height);break;case 4:Pe.translate(fe.width,0),Pe.scale(-1,1),Pe.rotate(180*Math.PI/180),Pe.drawImage(q,-fe.width,-fe.height,fe.width,fe.height);break;case 5:Pe.translate(fe.width,0),Pe.scale(-1,1),Pe.rotate(90*Math.PI/180),Pe.drawImage(q,0,-fe.width,fe.height,fe.width);break;case 7:Pe.translate(fe.width,0),Pe.scale(-1,1),Pe.rotate(270*Math.PI/180),Pe.drawImage(q,-fe.height,0,fe.height,fe.width);break;default:Pe.drawImage(q,0,0,fe.width,fe.height)}return fe})}function L(q){return fetch(q).then(X=>X.blob())}function D(q){return new Promise((X,ae)=>{const fe=new Image;fe.onload=()=>X(fe),fe.onerror=()=>ae(new Error("urltoImage(): Image failed to load, please check the image URL")),fe.src=q})}var j=function(q,X,ae,fe){return new(ae||(ae=Promise))(function(Pe,Ae){function Ie(xe){try{Te(fe.next(xe))}catch(Ge){Ae(Ge)}}function De(xe){try{Te(fe.throw(xe))}catch(Ge){Ae(Ge)}}function Te(xe){var Ge;xe.done?Pe(xe.value):(Ge=xe.value,Ge instanceof ae?Ge:new ae(function(Ue){Ue(Ge)})).then(Ie,De)}Te((fe=fe.apply(q,X||[])).next())})};function z(q,X={}){return j(this,void 0,void 0,function*(){if(!(q instanceof Blob))throw new Error("compress(): First arg must be a Blob object or a File object.");if("object"!=typeof X&&(X=Object.assign({quality:X})),X.quality=Number(X.quality),Number.isNaN(X.quality))return q;const ae=yield x(q);let fe=ae.split(",")[0].match(/:(.*?);/)[1],Pe=f.JPEG;A(X.type)&&(Pe=X.type,fe=X.type);const Ae=yield N(ae),Ie=yield S(Ae,Object.assign({},X)),De=yield P(Ie,X.quality,Pe),Te=yield E(De,fe);return Te.size>q.size?q:Te})}function Z(q,X={}){return j(this,void 0,void 0,function*(){if(!(q instanceof Blob))throw new Error("compressAccurately(): First arg must be a Blob object or a File object.");if("object"!=typeof X&&(X=Object.assign({size:X})),X.size=Number(X.size),Number.isNaN(X.size)||1024*X.size>q.size)return q;X.accuracy=Number(X.accuracy),(!X.accuracy||X.accuracy<.8||X.accuracy>.99)&&(X.accuracy=.95);const ae=X.size*(2-X.accuracy)*1024,fe=1024*X.size,Pe=X.size*X.accuracy*1024,Ae=yield x(q);let Ie=Ae.split(",")[0].match(/:(.*?);/)[1],De=f.JPEG;A(X.type)&&(De=X.type,Ie=X.type);const Te=yield N(Ae),xe=yield S(Te,Object.assign({},X));let Ge,Ue=.5;const st=[null,null];for(let xt=1;xt<=7;xt++){Ge=yield P(xe,Ue,De);const gt=.75*Ge.length;if(7===xt){(ae<gt||Pe>gt)&&(Ge=[Ge,...st].filter(At=>At).sort((At,ht)=>Math.abs(.75*At.length-fe)-Math.abs(.75*ht.length-fe))[0]);break}if(ae<gt)st[1]=Ge,Ue-=Math.pow(.5,xt+1);else{if(!(Pe>gt))break;st[0]=Ge,Ue+=Math.pow(.5,xt+1)}}const It=yield E(Ge,Ie);return It.size>q.size?q:It})}}])},81651:(Q,F,v)=>{Q.exports=v(68805)},83300:Q=>{var F=[].indexOf;Q.exports=function(v,y){if(F)return v.indexOf(y);for(var f=0;f<v.length;++f)if(v[f]===y)return f;return-1}},26243:Q=>{var F={}.toString;Q.exports=Array.isArray||function(v){return"[object Array]"==F.call(v)}},36506:(Q,F,v)=>{var A=v(98745)(v(98492),"DataView");Q.exports=A},19618:(Q,F,v)=>{var y=v(35602),f=v(81499),A=v(52990),C=v(70480),P=v(4469);function k(O){var E=-1,N=null==O?0:O.length;for(this.clear();++E<N;){var M=O[E];this.set(M[0],M[1])}}k.prototype.clear=y,k.prototype.delete=f,k.prototype.get=A,k.prototype.has=C,k.prototype.set=P,Q.exports=k},3597:(Q,F,v)=>{var y=v(39365),f=v(89343),A=v(34779),C=v(51509),P=v(27137);function k(O){var E=-1,N=null==O?0:O.length;for(this.clear();++E<N;){var M=O[E];this.set(M[0],M[1])}}k.prototype.clear=y,k.prototype.delete=f,k.prototype.get=A,k.prototype.has=C,k.prototype.set=P,Q.exports=k},21136:(Q,F,v)=>{var A=v(98745)(v(98492),"Map");Q.exports=A},21811:(Q,F,v)=>{var y=v(43413),f=v(45419),A=v(47253),C=v(81115),P=v(76648);function k(O){var E=-1,N=null==O?0:O.length;for(this.clear();++E<N;){var M=O[E];this.set(M[0],M[1])}}k.prototype.clear=y,k.prototype.delete=f,k.prototype.get=A,k.prototype.has=C,k.prototype.set=P,Q.exports=k},70641:(Q,F,v)=>{var A=v(98745)(v(98492),"Promise");Q.exports=A},91732:(Q,F,v)=>{var A=v(98745)(v(98492),"Set");Q.exports=A},15960:(Q,F,v)=>{var y=v(21811),f=v(76151),A=v(12154);function C(P){var k=-1,O=null==P?0:P.length;for(this.__data__=new y;++k<O;)this.add(P[k])}C.prototype.add=C.prototype.push=f,C.prototype.has=A,Q.exports=C},31339:(Q,F,v)=>{var y=v(3597),f=v(9488),A=v(15943),C=v(55456),P=v(74793),k=v(68689);function O(E){var N=this.__data__=new y(E);this.size=N.size}O.prototype.clear=f,O.prototype.delete=A,O.prototype.get=C,O.prototype.has=P,O.prototype.set=k,Q.exports=O},61763:(Q,F,v)=>{var y=v(98492);Q.exports=y.Symbol},82760:(Q,F,v)=>{var y=v(98492);Q.exports=y.Uint8Array},26413:(Q,F,v)=>{var A=v(98745)(v(98492),"WeakMap");Q.exports=A},57910:Q=>{Q.exports=function F(v,y,f){switch(f.length){case 0:return v.call(y);case 1:return v.call(y,f[0]);case 2:return v.call(y,f[0],f[1]);case 3:return v.call(y,f[0],f[1],f[2])}return v.apply(y,f)}},93591:Q=>{Q.exports=function F(v,y,f,A){for(var C=-1,P=null==v?0:v.length;++C<P;){var k=v[C];y(A,k,f(k),v)}return A}},57772:Q=>{Q.exports=function F(v,y){for(var f=-1,A=null==v?0:v.length;++f<A&&!1!==y(v[f],f,v););return v}},92134:Q=>{Q.exports=function F(v,y){for(var f=-1,A=null==v?0:v.length,C=0,P=[];++f<A;){var k=v[f];y(k,f,v)&&(P[C++]=k)}return P}},18750:(Q,F,v)=>{var y=v(29568);Q.exports=function f(A,C){return!(null==A||!A.length)&&y(A,C,0)>-1}},6736:Q=>{Q.exports=function F(v,y,f){for(var A=-1,C=null==v?0:v.length;++A<C;)if(f(y,v[A]))return!0;return!1}},31384:(Q,F,v)=>{var y=v(5025),f=v(31955),A=v(82261),C=v(57525),P=v(65188),k=v(74868),E=Object.prototype.hasOwnProperty;Q.exports=function N(M,x){var I=A(M),S=!I&&f(M),L=!I&&!S&&C(M),D=!I&&!S&&!L&&k(M),j=I||S||L||D,z=j?y(M.length,String):[],Z=z.length;for(var q in M)(x||E.call(M,q))&&(!j||!("length"==q||L&&("offset"==q||"parent"==q)||D&&("buffer"==q||"byteLength"==q||"byteOffset"==q)||P(q,Z)))&&z.push(q);return z}},73880:Q=>{Q.exports=function F(v,y){for(var f=-1,A=null==v?0:v.length,C=Array(A);++f<A;)C[f]=y(v[f],f,v);return C}},17853:Q=>{Q.exports=function F(v,y){for(var f=-1,A=y.length,C=v.length;++f<A;)v[C+f]=y[f];return v}},44523:(Q,F,v)=>{var y=v(84231),f=v(62059);Q.exports=function A(C){return f(y(C))}},25916:Q=>{Q.exports=function F(v,y){for(var f=-1,A=null==v?0:v.length;++f<A;)if(y(v[f],f,v))return!0;return!1}},16697:(Q,F,v)=>{var y=v(71741),f=v(37826);Q.exports=function A(C,P,k){(void 0!==k&&!f(C[P],k)||void 0===k&&!(P in C))&&y(C,P,k)}},89553:(Q,F,v)=>{var y=v(71741),f=v(37826),C=Object.prototype.hasOwnProperty;Q.exports=function P(k,O,E){var N=k[O];(!C.call(k,O)||!f(N,E)||void 0===E&&!(O in k))&&y(k,O,E)}},14056:(Q,F,v)=>{var y=v(37826);Q.exports=function f(A,C){for(var P=A.length;P--;)if(y(A[P][0],C))return P;return-1}},50491:(Q,F,v)=>{var y=v(35103);Q.exports=function f(A,C,P,k){return y(A,function(O,E,N){C(k,O,P(O),N)}),k}},16234:(Q,F,v)=>{var y=v(35931),f=v(74614);Q.exports=function A(C,P){return C&&y(P,f(P),C)}},4431:(Q,F,v)=>{var y=v(35931),f=v(85602);Q.exports=function A(C,P){return C&&y(P,f(P),C)}},71741:(Q,F,v)=>{var y=v(89383);Q.exports=function f(A,C,P){"__proto__"==C&&y?y(A,C,{configurable:!0,enumerable:!0,value:P,writable:!0}):A[C]=P}},79838:(Q,F,v)=>{var y=v(55440);Q.exports=function f(A,C){for(var P=-1,k=C.length,O=Array(k),E=null==A;++P<k;)O[P]=E?void 0:y(A,C[P]);return O}},61320:(Q,F,v)=>{var y=v(31339),f=v(57772),A=v(89553),C=v(16234),P=v(4431),k=v(86002),O=v(84231),E=v(79385),N=v(24354),M=v(6131),x=v(2442),I=v(62472),S=v(39431),L=v(20514),D=v(99225),j=v(82261),z=v(57525),Z=v(10990),q=v(49794),X=v(28611),ae=v(74614),Ie="[object Arguments]",Ue="[object Function]",gt="[object Object]",Bt={};Bt[Ie]=Bt["[object Array]"]=Bt["[object ArrayBuffer]"]=Bt["[object DataView]"]=Bt["[object Boolean]"]=Bt["[object Date]"]=Bt["[object Float32Array]"]=Bt["[object Float64Array]"]=Bt["[object Int8Array]"]=Bt["[object Int16Array]"]=Bt["[object Int32Array]"]=Bt["[object Map]"]=Bt["[object Number]"]=Bt[gt]=Bt["[object RegExp]"]=Bt["[object Set]"]=Bt["[object String]"]=Bt["[object Symbol]"]=Bt["[object Uint8Array]"]=Bt["[object Uint8ClampedArray]"]=Bt["[object Uint16Array]"]=Bt["[object Uint32Array]"]=!0,Bt["[object Error]"]=Bt[Ue]=Bt["[object WeakMap]"]=!1,Q.exports=function On(zt,zn,Gr,ua,gi,si){var To,sr=1&zn,da=2&zn,ms=4&zn;if(Gr&&(To=gi?Gr(zt,ua,gi,si):Gr(zt)),void 0!==To)return To;if(!q(zt))return zt;var _d=j(zt);if(_d){if(To=S(zt),!sr)return O(zt,To)}else{var $a=I(zt),xs=$a==Ue||"[object GeneratorFunction]"==$a;if(z(zt))return k(zt,sr);if($a==gt||$a==Ie||xs&&!gi){if(To=da||xs?{}:D(zt),!sr)return da?N(zt,P(To,zt)):E(zt,C(To,zt))}else{if(!Bt[$a])return gi?zt:{};To=L(zt,$a,sr)}}si||(si=new y);var Ra=si.get(zt);if(Ra)return Ra;if(si.set(zt,To),X(zt))return zt.forEach(function(_r){To.add(On(_r,zn,Gr,_r,zt,si))}),To;if(Z(zt))return zt.forEach(function(_r,Oc){To.set(Oc,On(_r,zn,Gr,Oc,zt,si))}),To;var oa=ms?da?x:M:da?keysIn:ae,Zc=_d?void 0:oa(zt);return f(Zc||zt,function(_r,Oc){Zc&&(_r=zt[Oc=_r]),A(To,Oc,On(_r,zn,Gr,Oc,zt,si))}),To}},31391:(Q,F,v)=>{var y=v(49794),f=Object.create,A=function(){function C(){}return function(P){if(!y(P))return{};if(f)return f(P);C.prototype=P;var k=new C;return C.prototype=void 0,k}}();Q.exports=A},57491:(Q,F,v)=>{var y=v(15960),f=v(18750),A=v(6736),C=v(73880),P=v(35249),k=v(64795);Q.exports=function E(N,M,x,I){var S=-1,L=f,D=!0,j=N.length,z=[],Z=M.length;if(!j)return z;x&&(M=C(M,P(x))),I?(L=A,D=!1):M.length>=200&&(L=k,D=!1,M=new y(M));e:for(;++S<j;){var q=N[S],X=null==x?q:x(q);if(q=I||0!==q?q:0,D&&X==X){for(var ae=Z;ae--;)if(M[ae]===X)continue e;z.push(q)}else L(M,X,I)||z.push(q)}return z}},35103:(Q,F,v)=>{var y=v(17794),A=v(29386)(y);Q.exports=A},11892:(Q,F,v)=>{var y=v(35103);Q.exports=function f(A,C){var P=[];return y(A,function(k,O,E){C(k,O,E)&&P.push(k)}),P}},84051:Q=>{Q.exports=function F(v,y,f,A){for(var C=v.length,P=f+(A?1:-1);A?P--:++P<C;)if(y(v[P],P,v))return P;return-1}},1883:(Q,F,v)=>{var y=v(17853),f=v(42241);Q.exports=function A(C,P,k,O,E){var N=-1,M=C.length;for(k||(k=f),E||(E=[]);++N<M;){var x=C[N];P>0&&k(x)?P>1?A(x,P-1,k,O,E):y(E,x):O||(E[E.length]=x)}return E}},16483:(Q,F,v)=>{var f=v(62086)();Q.exports=f},17794:(Q,F,v)=>{var y=v(16483),f=v(74614);Q.exports=function A(C,P){return C&&y(C,P,f)}},82202:(Q,F,v)=>{var y=v(44826),f=v(38916);Q.exports=function A(C,P){for(var k=0,O=(P=y(P,C)).length;null!=C&&k<O;)C=C[f(P[k++])];return k&&k==O?C:void 0}},37427:(Q,F,v)=>{var y=v(17853),f=v(82261);Q.exports=function A(C,P,k){var O=P(C);return f(C)?O:y(O,k(C))}},24590:(Q,F,v)=>{var y=v(61763),f=v(95933),A=v(79243),k=y?y.toStringTag:void 0;Q.exports=function O(E){return null==E?void 0===E?"[object Undefined]":"[object Null]":k&&k in Object(E)?f(E):A(E)}},94493:Q=>{var v=Object.prototype.hasOwnProperty;Q.exports=function y(f,A){return null!=f&&v.call(f,A)}},23274:Q=>{Q.exports=function F(v,y){return null!=v&&y in Object(v)}},29568:(Q,F,v)=>{var y=v(84051),f=v(91817),A=v(62528);Q.exports=function C(P,k,O){return k==k?A(P,k,O):y(P,f,O)}},36635:(Q,F,v)=>{var y=v(15960),f=v(18750),A=v(6736),C=v(73880),P=v(35249),k=v(64795),O=Math.min;Q.exports=function E(N,M,x){for(var I=x?A:f,S=N[0].length,L=N.length,D=L,j=Array(L),z=1/0,Z=[];D--;){var q=N[D];D&&M&&(q=C(q,P(M))),z=O(q.length,z),j[D]=!x&&(M||S>=120&&q.length>=120)?new y(D&&q):void 0}q=N[0];var X=-1,ae=j[0];e:for(;++X<S&&Z.length<z;){var fe=q[X],Pe=M?M(fe):fe;if(fe=x||0!==fe?fe:0,!(ae?k(ae,Pe):I(Z,Pe,x))){for(D=L;--D;){var Ae=j[D];if(!(Ae?k(Ae,Pe):I(N[D],Pe,x)))continue e}ae&&ae.push(Pe),Z.push(fe)}}return Z}},53022:(Q,F,v)=>{var y=v(24590),f=v(53714);Q.exports=function C(P){return f(P)&&"[object Arguments]"==y(P)}},97108:(Q,F,v)=>{var y=v(97946),f=v(53714);Q.exports=function A(C,P,k,O,E){return C===P||(null==C||null==P||!f(C)&&!f(P)?C!=C&&P!=P:y(C,P,k,O,A,E))}},97946:(Q,F,v)=>{var y=v(31339),f=v(17469),A=v(81642),C=v(99462),P=v(62472),k=v(82261),O=v(57525),E=v(74868),M="[object Arguments]",x="[object Array]",I="[object Object]",L=Object.prototype.hasOwnProperty;Q.exports=function D(j,z,Z,q,X,ae){var fe=k(j),Pe=k(z),Ae=fe?x:P(j),Ie=Pe?x:P(z),De=(Ae=Ae==M?I:Ae)==I,Te=(Ie=Ie==M?I:Ie)==I,xe=Ae==Ie;if(xe&&O(j)){if(!O(z))return!1;fe=!0,De=!1}if(xe&&!De)return ae||(ae=new y),fe||E(j)?f(j,z,Z,q,X,ae):A(j,z,Ae,Z,q,X,ae);if(!(1&Z)){var Ge=De&&L.call(j,"__wrapped__"),Ue=Te&&L.call(z,"__wrapped__");if(Ge||Ue){var st=Ge?j.value():j,It=Ue?z.value():z;return ae||(ae=new y),X(st,It,Z,q,ae)}}return!!xe&&(ae||(ae=new y),C(j,z,Z,q,X,ae))}},78562:(Q,F,v)=>{var y=v(62472),f=v(53714);Q.exports=function C(P){return f(P)&&"[object Map]"==y(P)}},2527:(Q,F,v)=>{var y=v(31339),f=v(97108);Q.exports=function P(k,O,E,N){var M=E.length,x=M,I=!N;if(null==k)return!x;for(k=Object(k);M--;){var S=E[M];if(I&&S[2]?S[1]!==k[S[0]]:!(S[0]in k))return!1}for(;++M<x;){var L=(S=E[M])[0],D=k[L],j=S[1];if(I&&S[2]){if(void 0===D&&!(L in k))return!1}else{var z=new y;if(N)var Z=N(D,j,L,k,O,z);if(!(void 0===Z?f(j,D,3,N,z):Z))return!1}}return!0}},91817:Q=>{Q.exports=function F(v){return v!=v}},41082:(Q,F,v)=>{var y=v(66861),f=v(9950),A=v(49794),C=v(37075),k=/^\[object .+?Constructor\]$/,x=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Q.exports=function I(S){return!(!A(S)||f(S))&&(y(S)?x:k).test(C(S))}},61202:(Q,F,v)=>{var y=v(62472),f=v(53714);Q.exports=function C(P){return f(P)&&"[object Set]"==y(P)}},38902:(Q,F,v)=>{var y=v(24590),f=v(7765),A=v(53714),xe={};xe["[object Float32Array]"]=xe["[object Float64Array]"]=xe["[object Int8Array]"]=xe["[object Int16Array]"]=xe["[object Int32Array]"]=xe["[object Uint8Array]"]=xe["[object Uint8ClampedArray]"]=xe["[object Uint16Array]"]=xe["[object Uint32Array]"]=!0,xe["[object Arguments]"]=xe["[object Array]"]=xe["[object ArrayBuffer]"]=xe["[object Boolean]"]=xe["[object DataView]"]=xe["[object Date]"]=xe["[object Error]"]=xe["[object Function]"]=xe["[object Map]"]=xe["[object Number]"]=xe["[object Object]"]=xe["[object RegExp]"]=xe["[object Set]"]=xe["[object String]"]=xe["[object WeakMap]"]=!1,Q.exports=function Ge(Ue){return A(Ue)&&f(Ue.length)&&!!xe[y(Ue)]}},21627:(Q,F,v)=>{var y=v(72924),f=v(38526),A=v(65657),C=v(82261),P=v(12692);Q.exports=function k(O){return"function"==typeof O?O:null==O?A:"object"==typeof O?C(O)?f(O[0],O[1]):y(O):P(O)}},190:(Q,F,v)=>{var y=v(26587),f=v(10366),C=Object.prototype.hasOwnProperty;Q.exports=function P(k){if(!y(k))return f(k);var O=[];for(var E in Object(k))C.call(k,E)&&"constructor"!=E&&O.push(E);return O}},7673:(Q,F,v)=>{var y=v(49794),f=v(26587),A=v(18981),P=Object.prototype.hasOwnProperty;Q.exports=function k(O){if(!y(O))return A(O);var E=f(O),N=[];for(var M in O)"constructor"==M&&(E||!P.call(O,M))||N.push(M);return N}},62839:(Q,F,v)=>{var y=v(35103),f=v(32447);Q.exports=function A(C,P){var k=-1,O=f(C)?Array(C.length):[];return y(C,function(E,N,M){O[++k]=P(E,N,M)}),O}},72924:(Q,F,v)=>{var y=v(2527),f=v(57895),A=v(92265);Q.exports=function C(P){var k=f(P);return 1==k.length&&k[0][2]?A(k[0][0],k[0][1]):function(O){return O===P||y(O,P,k)}}},38526:(Q,F,v)=>{var y=v(97108),f=v(55440),A=v(12494),C=v(86300),P=v(53921),k=v(92265),O=v(38916);Q.exports=function M(x,I){return C(x)&&P(I)?k(O(x),I):function(S){var L=f(S,x);return void 0===L&&L===I?A(S,x):y(I,L,3)}}},33294:(Q,F,v)=>{var y=v(31339),f=v(16697),A=v(16483),C=v(19218),P=v(49794),k=v(85602),O=v(67524);Q.exports=function E(N,M,x,I,S){N!==M&&A(M,function(L,D){if(P(L))S||(S=new y),C(N,M,D,x,E,I,S);else{var j=I?I(O(N,D),L,D+"",N,M,S):void 0;void 0===j&&(j=L),f(N,D,j)}},k)}},19218:(Q,F,v)=>{var y=v(16697),f=v(86002),A=v(72501),C=v(84231),P=v(99225),k=v(31955),O=v(82261),E=v(13471),N=v(57525),M=v(66861),x=v(49794),I=v(28168),S=v(74868),L=v(67524),D=v(84210);Q.exports=function j(z,Z,q,X,ae,fe,Pe){var Ae=L(z,q),Ie=L(Z,q),De=Pe.get(Ie);if(De)y(z,q,De);else{var Te=fe?fe(Ae,Ie,q+"",z,Z,Pe):void 0,xe=void 0===Te;if(xe){var Ge=O(Ie),Ue=!Ge&&N(Ie),st=!Ge&&!Ue&&S(Ie);Te=Ie,Ge||Ue||st?O(Ae)?Te=Ae:E(Ae)?Te=C(Ae):Ue?(xe=!1,Te=f(Ie,!0)):st?(xe=!1,Te=A(Ie,!0)):Te=[]:I(Ie)||k(Ie)?(Te=Ae,k(Ae)?Te=D(Ae):(!x(Ae)||X&&M(Ae))&&(Te=P(Ie))):xe=!1}xe&&(Pe.set(Ie,Te),ae(Te,Ie,X,fe,Pe),Pe.delete(Ie)),y(z,q,Te)}}},252:(Q,F,v)=>{var y=v(73880),f=v(21627),A=v(62839),C=v(6389),P=v(35249),k=v(79664),O=v(65657);Q.exports=function E(N,M,x){var I=-1;M=y(M.length?M:[O],P(f));var S=A(N,function(L,D,j){return{criteria:y(M,function(Z){return Z(L)}),index:++I,value:L}});return C(S,function(L,D){return k(L,D,x)})}},2772:(Q,F,v)=>{var y=v(82202),f=v(19478),A=v(44826);Q.exports=function C(P,k,O){for(var E=-1,N=k.length,M={};++E<N;){var x=k[E],I=y(P,x);O(I,x)&&f(M,A(x,P),I)}return M}},3400:Q=>{Q.exports=function F(v){return function(y){return null==y?void 0:y[v]}}},96443:(Q,F,v)=>{var y=v(82202);Q.exports=function f(A){return function(C){return y(C,A)}}},41102:(Q,F,v)=>{var y=v(4205),f=v(65188),C=Array.prototype.splice;Q.exports=function P(k,O){for(var E=k?O.length:0,N=E-1;E--;){var M=O[E];if(E==N||M!==x){var x=M;f(M)?C.call(k,M,1):y(k,M)}}return k}},25204:Q=>{var F=Math.floor,v=Math.random;Q.exports=function y(f,A){return f+F(v()*(A-f+1))}},78951:(Q,F,v)=>{var y=v(65657),f=v(92394),A=v(36814);Q.exports=function C(P,k){return A(f(P,k,y),P+"")}},19478:(Q,F,v)=>{var y=v(89553),f=v(44826),A=v(65188),C=v(49794),P=v(38916);Q.exports=function k(O,E,N,M){if(!C(O))return O;for(var x=-1,I=(E=f(E,O)).length,S=I-1,L=O;null!=L&&++x<I;){var D=P(E[x]),j=N;if(x!=S){var z=L[D];void 0===(j=M?M(z,D,L):void 0)&&(j=C(z)?z:A(E[x+1])?[]:{})}y(L,D,j),L=L[D]}return O}},58235:(Q,F,v)=>{var y=v(51075),f=v(89383),A=v(65657);Q.exports=f?function(P,k){return f(P,"toString",{configurable:!0,enumerable:!1,value:y(k),writable:!0})}:A},48904:(Q,F,v)=>{var y=v(62059),f=v(78808);Q.exports=function A(C){return y(f(C))}},52037:Q=>{Q.exports=function F(v,y,f){var A=-1,C=v.length;y<0&&(y=-y>C?0:C+y),(f=f>C?C:f)<0&&(f+=C),C=y>f?0:f-y>>>0,y>>>=0;for(var P=Array(C);++A<C;)P[A]=v[A+y];return P}},6389:Q=>{Q.exports=function F(v,y){var f=v.length;for(v.sort(y);f--;)v[f]=v[f].value;return v}},17176:(Q,F,v)=>{var y=v(76644),f=v(65657),A=v(23423);Q.exports=function k(O,E,N){var M=0,x=null==O?M:O.length;if("number"==typeof E&&E==E&&x<=2147483647){for(;M<x;){var I=M+x>>>1,S=O[I];null!==S&&!A(S)&&(N?S<=E:S<E)?M=I+1:x=I}return x}return y(O,E,f,N)}},76644:(Q,F,v)=>{var y=v(23423),C=Math.floor,P=Math.min;Q.exports=function k(O,E,N,M){E=N(E);for(var x=0,I=null==O?0:O.length,S=E!=E,L=null===E,D=y(E),j=void 0===E;x<I;){var z=C((x+I)/2),Z=N(O[z]),q=void 0!==Z,X=null===Z,ae=Z==Z,fe=y(Z);if(S)var Pe=M||ae;else Pe=j?ae&&(M||q):L?ae&&q&&(M||!X):D?ae&&q&&!X&&(M||!fe):!X&&!fe&&(M?Z<=E:Z<E);Pe?x=z+1:I=z}return P(I,4294967294)}},94227:Q=>{Q.exports=function F(v,y){for(var f,A=-1,C=v.length;++A<C;){var P=y(v[A]);void 0!==P&&(f=void 0===f?P:f+P)}return f}},5025:Q=>{Q.exports=function F(v,y){for(var f=-1,A=Array(v);++f<v;)A[f]=y(f);return A}},97002:(Q,F,v)=>{var y=v(61763),f=v(73880),A=v(82261),C=v(23423),k=y?y.prototype:void 0,O=k?k.toString:void 0;Q.exports=function E(N){if("string"==typeof N)return N;if(A(N))return f(N,E)+"";if(C(N))return O?O.call(N):"";var M=N+"";return"0"==M&&1/N==-1/0?"-0":M}},35249:Q=>{Q.exports=function F(v){return function(y){return v(y)}}},39154:(Q,F,v)=>{var y=v(15960),f=v(18750),A=v(6736),C=v(64795),P=v(98433),k=v(28e3);Q.exports=function E(N,M,x){var I=-1,S=f,L=N.length,D=!0,j=[],z=j;if(x)D=!1,S=A;else if(L>=200){var Z=M?null:P(N);if(Z)return k(Z);D=!1,S=C,z=new y}else z=M?[]:j;e:for(;++I<L;){var q=N[I],X=M?M(q):q;if(q=x||0!==q?q:0,D&&X==X){for(var ae=z.length;ae--;)if(z[ae]===X)continue e;M&&z.push(X),j.push(q)}else S(z,X,x)||(z!==j&&z.push(X),j.push(q))}return j}},4205:(Q,F,v)=>{var y=v(44826),f=v(92819),A=v(89247),C=v(38916);Q.exports=function P(k,O){return O=y(O,k),null==(k=A(k,O))||delete k[C(f(O))]}},16680:(Q,F,v)=>{var y=v(73880);Q.exports=function f(A,C){return y(C,function(P){return A[P]})}},64795:Q=>{Q.exports=function F(v,y){return v.has(y)}},6579:(Q,F,v)=>{var y=v(13471);Q.exports=function f(A){return y(A)?A:[]}},84655:(Q,F,v)=>{var y=v(65657);Q.exports=function f(A){return"function"==typeof A?A:y}},44826:(Q,F,v)=>{var y=v(82261),f=v(86300),A=v(40163),C=v(12674);Q.exports=function P(k,O){return y(k)?k:f(k,O)?[k]:A(C(k))}},72355:(Q,F,v)=>{var y=v(82760);Q.exports=function f(A){var C=new A.constructor(A.byteLength);return new y(C).set(new y(A)),C}},86002:(Q,F,v)=>{Q=v.nmd(Q);var y=v(98492),f=F&&!F.nodeType&&F,A=f&&Q&&!Q.nodeType&&Q,P=A&&A.exports===f?y.Buffer:void 0,k=P?P.allocUnsafe:void 0;Q.exports=function O(E,N){if(N)return E.slice();var M=E.length,x=k?k(M):new E.constructor(M);return E.copy(x),x}},26693:(Q,F,v)=>{var y=v(72355);Q.exports=function f(A,C){var P=C?y(A.buffer):A.buffer;return new A.constructor(P,A.byteOffset,A.byteLength)}},80497:Q=>{var F=/\w*$/;Q.exports=function v(y){var f=new y.constructor(y.source,F.exec(y));return f.lastIndex=y.lastIndex,f}},43330:(Q,F,v)=>{var y=v(61763),f=y?y.prototype:void 0,A=f?f.valueOf:void 0;Q.exports=function C(P){return A?Object(A.call(P)):{}}},72501:(Q,F,v)=>{var y=v(72355);Q.exports=function f(A,C){var P=C?y(A.buffer):A.buffer;return new A.constructor(P,A.byteOffset,A.length)}},25400:(Q,F,v)=>{var y=v(23423);Q.exports=function f(A,C){if(A!==C){var P=void 0!==A,k=null===A,O=A==A,E=y(A),N=void 0!==C,M=null===C,x=C==C,I=y(C);if(!M&&!I&&!E&&A>C||E&&N&&x&&!M&&!I||k&&N&&x||!P&&x||!O)return 1;if(!k&&!E&&!I&&A<C||I&&P&&O&&!k&&!E||M&&P&&O||!N&&O||!x)return-1}return 0}},79664:(Q,F,v)=>{var y=v(25400);Q.exports=function f(A,C,P){for(var k=-1,O=A.criteria,E=C.criteria,N=O.length,M=P.length;++k<N;){var x=y(O[k],E[k]);if(x)return k>=M?x:x*("desc"==P[k]?-1:1)}return A.index-C.index}},84231:Q=>{Q.exports=function F(v,y){var f=-1,A=v.length;for(y||(y=Array(A));++f<A;)y[f]=v[f];return y}},35931:(Q,F,v)=>{var y=v(89553),f=v(71741);Q.exports=function A(C,P,k,O){var E=!k;k||(k={});for(var N=-1,M=P.length;++N<M;){var x=P[N],I=O?O(k[x],C[x],x,k,C):void 0;void 0===I&&(I=C[x]),E?f(k,x,I):y(k,x,I)}return k}},79385:(Q,F,v)=>{var y=v(35931),f=v(20771);Q.exports=function A(C,P){return y(C,f(C),P)}},24354:(Q,F,v)=>{var y=v(35931),f=v(20708);Q.exports=function A(C,P){return y(C,f(C),P)}},56189:(Q,F,v)=>{var y=v(98492);Q.exports=y["__core-js_shared__"]},61149:(Q,F,v)=>{var y=v(93591),f=v(50491),A=v(21627),C=v(82261);Q.exports=function P(k,O){return function(E,N){var M=C(E)?y:f,x=O?O():{};return M(E,k,A(N,2),x)}}},81300:(Q,F,v)=>{var y=v(78951),f=v(33817);Q.exports=function A(C){return y(function(P,k){var O=-1,E=k.length,N=E>1?k[E-1]:void 0,M=E>2?k[2]:void 0;for(N=C.length>3&&"function"==typeof N?(E--,N):void 0,M&&f(k[0],k[1],M)&&(N=E<3?void 0:N,E=1),P=Object(P);++O<E;){var x=k[O];x&&C(P,x,O,N)}return P})}},29386:(Q,F,v)=>{var y=v(32447);Q.exports=function f(A,C){return function(P,k){if(null==P)return P;if(!y(P))return A(P,k);for(var O=P.length,E=C?O:-1,N=Object(P);(C?E--:++E<O)&&!1!==k(N[E],E,N););return P}}},62086:Q=>{Q.exports=function F(v){return function(y,f,A){for(var C=-1,P=Object(y),k=A(y),O=k.length;O--;){var E=k[v?O:++C];if(!1===f(P[E],E,P))break}return y}}},76738:(Q,F,v)=>{var y=v(21627),f=v(32447),A=v(74614);Q.exports=function C(P){return function(k,O,E){var N=Object(k);if(!f(k)){var M=y(O,3);k=A(k),O=function(I){return M(N[I],I,N)}}var x=P(k,O,E);return x>-1?N[M?k[x]:x]:void 0}}},98433:(Q,F,v)=>{var y=v(91732),f=v(24249),A=v(28e3),P=y&&1/A(new y([,-0]))[1]==1/0?function(k){return new y(k)}:f;Q.exports=P},89383:(Q,F,v)=>{var y=v(98745),f=function(){try{var A=y(Object,"defineProperty");return A({},"",{}),A}catch(C){}}();Q.exports=f},17469:(Q,F,v)=>{var y=v(15960),f=v(25916),A=v(64795);Q.exports=function k(O,E,N,M,x,I){var S=1&N,L=O.length,D=E.length;if(L!=D&&!(S&&D>L))return!1;var j=I.get(O);if(j&&I.get(E))return j==E;var z=-1,Z=!0,q=2&N?new y:void 0;for(I.set(O,E),I.set(E,O);++z<L;){var X=O[z],ae=E[z];if(M)var fe=S?M(ae,X,z,E,O,I):M(X,ae,z,O,E,I);if(void 0!==fe){if(fe)continue;Z=!1;break}if(q){if(!f(E,function(Pe,Ae){if(!A(q,Ae)&&(X===Pe||x(X,Pe,N,M,I)))return q.push(Ae)})){Z=!1;break}}else if(X!==ae&&!x(X,ae,N,M,I)){Z=!1;break}}return I.delete(O),I.delete(E),Z}},81642:(Q,F,v)=>{var y=v(61763),f=v(82760),A=v(37826),C=v(17469),P=v(71575),k=v(28e3),X=y?y.prototype:void 0,ae=X?X.valueOf:void 0;Q.exports=function fe(Pe,Ae,Ie,De,Te,xe,Ge){switch(Ie){case"[object DataView]":if(Pe.byteLength!=Ae.byteLength||Pe.byteOffset!=Ae.byteOffset)return!1;Pe=Pe.buffer,Ae=Ae.buffer;case"[object ArrayBuffer]":return!(Pe.byteLength!=Ae.byteLength||!xe(new f(Pe),new f(Ae)));case"[object Boolean]":case"[object Date]":case"[object Number]":return A(+Pe,+Ae);case"[object Error]":return Pe.name==Ae.name&&Pe.message==Ae.message;case"[object RegExp]":case"[object String]":return Pe==Ae+"";case"[object Map]":var Ue=P;case"[object Set]":if(Ue||(Ue=k),Pe.size!=Ae.size&&!(1&De))return!1;var It=Ge.get(Pe);if(It)return It==Ae;De|=2,Ge.set(Pe,Ae);var xt=C(Ue(Pe),Ue(Ae),De,Te,xe,Ge);return Ge.delete(Pe),xt;case"[object Symbol]":if(ae)return ae.call(Pe)==ae.call(Ae)}return!1}},99462:(Q,F,v)=>{var y=v(6131),C=Object.prototype.hasOwnProperty;Q.exports=function P(k,O,E,N,M,x){var I=1&E,S=y(k),L=S.length;if(L!=y(O).length&&!I)return!1;for(var z=L;z--;){var Z=S[z];if(!(I?Z in O:C.call(O,Z)))return!1}var q=x.get(k);if(q&&x.get(O))return q==O;var X=!0;x.set(k,O),x.set(O,k);for(var ae=I;++z<L;){var fe=k[Z=S[z]],Pe=O[Z];if(N)var Ae=I?N(Pe,fe,Z,O,k,x):N(fe,Pe,Z,k,O,x);if(!(void 0===Ae?fe===Pe||M(fe,Pe,E,N,x):Ae)){X=!1;break}ae||(ae="constructor"==Z)}if(X&&!ae){var Ie=k.constructor,De=O.constructor;Ie!=De&&"constructor"in k&&"constructor"in O&&!("function"==typeof Ie&&Ie instanceof Ie&&"function"==typeof De&&De instanceof De)&&(X=!1)}return x.delete(k),x.delete(O),X}},46801:(Q,F,v)=>{var y=v(9336),f=v(92394),A=v(36814);Q.exports=function C(P){return A(f(P,void 0,y),P+"")}},40248:(Q,F,v)=>{Q.exports="object"==typeof v.g&&v.g&&v.g.Object===Object&&v.g},6131:(Q,F,v)=>{var y=v(37427),f=v(20771),A=v(74614);Q.exports=function C(P){return y(P,A,f)}},2442:(Q,F,v)=>{var y=v(37427),f=v(20708),A=v(85602);Q.exports=function C(P){return y(P,A,f)}},4113:(Q,F,v)=>{var y=v(29);Q.exports=function f(A,C){var P=A.__data__;return y(C)?P["string"==typeof C?"string":"hash"]:P.map}},57895:(Q,F,v)=>{var y=v(53921),f=v(74614);Q.exports=function A(C){for(var P=f(C),k=P.length;k--;){var O=P[k],E=C[O];P[k]=[O,E,y(E)]}return P}},98745:(Q,F,v)=>{var y=v(41082),f=v(11015);Q.exports=function A(C,P){var k=f(C,P);return y(k)?k:void 0}},16186:(Q,F,v)=>{var f=v(33106)(Object.getPrototypeOf,Object);Q.exports=f},95933:(Q,F,v)=>{var y=v(61763),f=Object.prototype,A=f.hasOwnProperty,C=f.toString,P=y?y.toStringTag:void 0;Q.exports=function k(O){var E=A.call(O,P),N=O[P];try{O[P]=void 0;var M=!0}catch(I){}var x=C.call(O);return M&&(E?O[P]=N:delete O[P]),x}},20771:(Q,F,v)=>{var y=v(92134),f=v(81315),C=Object.prototype.propertyIsEnumerable,P=Object.getOwnPropertySymbols;Q.exports=P?function(O){return null==O?[]:(O=Object(O),y(P(O),function(E){return C.call(O,E)}))}:f},20708:(Q,F,v)=>{var y=v(17853),f=v(16186),A=v(20771),C=v(81315);Q.exports=Object.getOwnPropertySymbols?function(O){for(var E=[];O;)y(E,A(O)),O=f(O);return E}:C},62472:(Q,F,v)=>{var y=v(36506),f=v(21136),A=v(70641),C=v(91732),P=v(26413),k=v(24590),O=v(37075),E="[object Map]",M="[object Promise]",x="[object Set]",I="[object WeakMap]",S="[object DataView]",L=O(y),D=O(f),j=O(A),z=O(C),Z=O(P),q=k;(y&&q(new y(new ArrayBuffer(1)))!=S||f&&q(new f)!=E||A&&q(A.resolve())!=M||C&&q(new C)!=x||P&&q(new P)!=I)&&(q=function(X){var ae=k(X),fe="[object Object]"==ae?X.constructor:void 0,Pe=fe?O(fe):"";if(Pe)switch(Pe){case L:return S;case D:return E;case j:return M;case z:return x;case Z:return I}return ae}),Q.exports=q},11015:Q=>{Q.exports=function F(v,y){return null==v?void 0:v[y]}},44583:(Q,F,v)=>{var y=v(44826),f=v(31955),A=v(82261),C=v(65188),P=v(7765),k=v(38916);Q.exports=function O(E,N,M){for(var x=-1,I=(N=y(N,E)).length,S=!1;++x<I;){var L=k(N[x]);if(!(S=null!=E&&M(E,L)))break;E=E[L]}return S||++x!=I?S:!!(I=null==E?0:E.length)&&P(I)&&C(L,I)&&(A(E)||f(E))}},35602:(Q,F,v)=>{var y=v(10893);Q.exports=function f(){this.__data__=y?y(null):{},this.size=0}},81499:Q=>{Q.exports=function F(v){var y=this.has(v)&&delete this.__data__[v];return this.size-=y?1:0,y}},52990:(Q,F,v)=>{var y=v(10893),C=Object.prototype.hasOwnProperty;Q.exports=function P(k){var O=this.__data__;if(y){var E=O[k];return"__lodash_hash_undefined__"===E?void 0:E}return C.call(O,k)?O[k]:void 0}},70480:(Q,F,v)=>{var y=v(10893),A=Object.prototype.hasOwnProperty;Q.exports=function C(P){var k=this.__data__;return y?void 0!==k[P]:A.call(k,P)}},4469:(Q,F,v)=>{var y=v(10893);Q.exports=function A(C,P){var k=this.__data__;return this.size+=this.has(C)?0:1,k[C]=y&&void 0===P?"__lodash_hash_undefined__":P,this}},39431:Q=>{var v=Object.prototype.hasOwnProperty;Q.exports=function y(f){var A=f.length,C=new f.constructor(A);return A&&"string"==typeof f[0]&&v.call(f,"index")&&(C.index=f.index,C.input=f.input),C}},20514:(Q,F,v)=>{var y=v(72355),f=v(26693),A=v(80497),C=v(43330),P=v(72501);Q.exports=function Ie(De,Te,xe){var Ge=De.constructor;switch(Te){case"[object ArrayBuffer]":return y(De);case"[object Boolean]":case"[object Date]":return new Ge(+De);case"[object DataView]":return f(De,xe);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return P(De,xe);case"[object Map]":case"[object Set]":return new Ge;case"[object Number]":case"[object String]":return new Ge(De);case"[object RegExp]":return A(De);case"[object Symbol]":return C(De)}}},99225:(Q,F,v)=>{var y=v(31391),f=v(16186),A=v(26587);Q.exports=function C(P){return"function"!=typeof P.constructor||A(P)?{}:y(f(P))}},42241:(Q,F,v)=>{var y=v(61763),f=v(31955),A=v(82261),C=y?y.isConcatSpreadable:void 0;Q.exports=function P(k){return A(k)||f(k)||!!(C&&k&&k[C])}},65188:Q=>{var v=/^(?:0|[1-9]\d*)$/;Q.exports=function y(f,A){var C=typeof f;return!!(A=null==A?9007199254740991:A)&&("number"==C||"symbol"!=C&&v.test(f))&&f>-1&&f%1==0&&f<A}},33817:(Q,F,v)=>{var y=v(37826),f=v(32447),A=v(65188),C=v(49794);Q.exports=function P(k,O,E){if(!C(E))return!1;var N=typeof O;return!!("number"==N?f(E)&&A(O,E.length):"string"==N&&O in E)&&y(E[O],k)}},86300:(Q,F,v)=>{var y=v(82261),f=v(23423),A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/;Q.exports=function P(k,O){if(y(k))return!1;var E=typeof k;return!("number"!=E&&"symbol"!=E&&"boolean"!=E&&null!=k&&!f(k))||C.test(k)||!A.test(k)||null!=O&&k in Object(O)}},29:Q=>{Q.exports=function F(v){var y=typeof v;return"string"==y||"number"==y||"symbol"==y||"boolean"==y?"__proto__"!==v:null===v}},9950:(Q,F,v)=>{var C,y=v(56189),f=(C=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"";Q.exports=function A(C){return!!f&&f in C}},26587:Q=>{var F=Object.prototype;Q.exports=function v(y){var f=y&&y.constructor;return y===("function"==typeof f&&f.prototype||F)}},53921:(Q,F,v)=>{var y=v(49794);Q.exports=function f(A){return A==A&&!y(A)}},39365:Q=>{Q.exports=function F(){this.__data__=[],this.size=0}},89343:(Q,F,v)=>{var y=v(14056),A=Array.prototype.splice;Q.exports=function C(P){var k=this.__data__,O=y(k,P);return!(O<0||(O==k.length-1?k.pop():A.call(k,O,1),--this.size,0))}},34779:(Q,F,v)=>{var y=v(14056);Q.exports=function f(A){var C=this.__data__,P=y(C,A);return P<0?void 0:C[P][1]}},51509:(Q,F,v)=>{var y=v(14056);Q.exports=function f(A){return y(this.__data__,A)>-1}},27137:(Q,F,v)=>{var y=v(14056);Q.exports=function f(A,C){var P=this.__data__,k=y(P,A);return k<0?(++this.size,P.push([A,C])):P[k][1]=C,this}},43413:(Q,F,v)=>{var y=v(19618),f=v(3597),A=v(21136);Q.exports=function C(){this.size=0,this.__data__={hash:new y,map:new(A||f),string:new y}}},45419:(Q,F,v)=>{var y=v(4113);Q.exports=function f(A){var C=y(this,A).delete(A);return this.size-=C?1:0,C}},47253:(Q,F,v)=>{var y=v(4113);Q.exports=function f(A){return y(this,A).get(A)}},81115:(Q,F,v)=>{var y=v(4113);Q.exports=function f(A){return y(this,A).has(A)}},76648:(Q,F,v)=>{var y=v(4113);Q.exports=function f(A,C){var P=y(this,A),k=P.size;return P.set(A,C),this.size+=P.size==k?0:1,this}},71575:Q=>{Q.exports=function F(v){var y=-1,f=Array(v.size);return v.forEach(function(A,C){f[++y]=[C,A]}),f}},92265:Q=>{Q.exports=function F(v,y){return function(f){return null!=f&&f[v]===y&&(void 0!==y||v in Object(f))}}},37371:(Q,F,v)=>{var y=v(87659);Q.exports=function A(C){var P=y(C,function(O){return 500===k.size&&k.clear(),O}),k=P.cache;return P}},10893:(Q,F,v)=>{var f=v(98745)(Object,"create");Q.exports=f},10366:(Q,F,v)=>{var f=v(33106)(Object.keys,Object);Q.exports=f},18981:Q=>{Q.exports=function F(v){var y=[];if(null!=v)for(var f in Object(v))y.push(f);return y}},68849:(Q,F,v)=>{Q=v.nmd(Q);var y=v(40248),f=F&&!F.nodeType&&F,A=f&&Q&&!Q.nodeType&&Q,P=A&&A.exports===f&&y.process,k=function(){try{return A&&A.require&&A.require("util").types||P&&P.binding&&P.binding("util")}catch(E){}}();Q.exports=k},79243:Q=>{var v=Object.prototype.toString;Q.exports=function y(f){return v.call(f)}},33106:Q=>{Q.exports=function F(v,y){return function(f){return v(y(f))}}},92394:(Q,F,v)=>{var y=v(57910),f=Math.max;Q.exports=function A(C,P,k){return P=f(void 0===P?C.length-1:P,0),function(){for(var O=arguments,E=-1,N=f(O.length-P,0),M=Array(N);++E<N;)M[E]=O[P+E];E=-1;for(var x=Array(P+1);++E<P;)x[E]=O[E];return x[P]=k(M),y(C,this,x)}}},89247:(Q,F,v)=>{var y=v(82202),f=v(52037);Q.exports=function A(C,P){return P.length<2?C:y(C,f(P,0,-1))}},98492:(Q,F,v)=>{var y=v(40248),f="object"==typeof self&&self&&self.Object===Object&&self,A=y||f||Function("return this")();Q.exports=A},67524:Q=>{Q.exports=function F(v,y){return"__proto__"==y?void 0:v[y]}},76151:Q=>{Q.exports=function v(y){return this.__data__.set(y,"__lodash_hash_undefined__"),this}},12154:Q=>{Q.exports=function F(v){return this.__data__.has(v)}},28e3:Q=>{Q.exports=function F(v){var y=-1,f=Array(v.size);return v.forEach(function(A){f[++y]=A}),f}},36814:(Q,F,v)=>{var y=v(58235),A=v(59531)(y);Q.exports=A},59531:Q=>{var y=Date.now;Q.exports=function f(A){var C=0,P=0;return function(){var k=y(),O=16-(k-P);if(P=k,O>0){if(++C>=800)return arguments[0]}else C=0;return A.apply(void 0,arguments)}}},62059:(Q,F,v)=>{var y=v(25204);Q.exports=function f(A,C){var P=-1,k=A.length,O=k-1;for(C=void 0===C?k:C;++P<C;){var E=y(P,O),N=A[E];A[E]=A[P],A[P]=N}return A.length=C,A}},9488:(Q,F,v)=>{var y=v(3597);Q.exports=function f(){this.__data__=new y,this.size=0}},15943:Q=>{Q.exports=function F(v){var y=this.__data__,f=y.delete(v);return this.size=y.size,f}},55456:Q=>{Q.exports=function F(v){return this.__data__.get(v)}},74793:Q=>{Q.exports=function F(v){return this.__data__.has(v)}},68689:(Q,F,v)=>{var y=v(3597),f=v(21136),A=v(21811);Q.exports=function P(k,O){var E=this.__data__;if(E instanceof y){var N=E.__data__;if(!f||N.length<199)return N.push([k,O]),this.size=++E.size,this;E=this.__data__=new A(N)}return E.set(k,O),this.size=E.size,this}},62528:Q=>{Q.exports=function F(v,y,f){for(var A=f-1,C=v.length;++A<C;)if(v[A]===y)return A;return-1}},40163:(Q,F,v)=>{var y=v(37371),f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A=/\\(\\)?/g,C=y(function(P){var k=[];return 46===P.charCodeAt(0)&&k.push(""),P.replace(f,function(O,E,N,M){k.push(N?M.replace(A,"$1"):E||O)}),k});Q.exports=C},38916:(Q,F,v)=>{var y=v(23423);Q.exports=function A(C){if("string"==typeof C||y(C))return C;var P=C+"";return"0"==P&&1/C==-1/0?"-0":P}},37075:Q=>{var v=Function.prototype.toString;Q.exports=function y(f){if(null!=f){try{return v.call(f)}catch(A){}try{return f+""}catch(A){}}return""}},14705:(Q,F,v)=>{var y=v(89553),f=v(35931),A=v(81300),C=v(32447),P=v(26587),k=v(74614),E=Object.prototype.hasOwnProperty,N=A(function(M,x){if(P(x)||C(x))f(x,k(x),M);else for(var I in x)E.call(x,I)&&y(M,I,x[I])});Q.exports=N},30020:(Q,F,v)=>{var y=v(35931),f=v(81300),A=v(85602),C=f(function(P,k){y(k,A(k),P)});Q.exports=C},62871:(Q,F,v)=>{var y=v(52037),f=v(33817),A=v(90481),C=Math.ceil,P=Math.max;Q.exports=function k(O,E,N){E=(N?f(O,E,N):void 0===E)?1:P(A(E),0);var M=null==O?0:O.length;if(!M||E<1)return[];for(var x=0,I=0,S=Array(C(M/E));x<M;)S[I++]=y(O,x,x+=E);return S}},8734:(Q,F,v)=>{var y=v(61320);Q.exports=function A(C){return y(C,4)}},54451:(Q,F,v)=>{var y=v(61320);Q.exports=function C(P){return y(P,5)}},51075:Q=>{Q.exports=function F(v){return function(){return v}}},64430:(Q,F,v)=>{var y=v(49794),f=v(55533),A=v(94282),P=Math.max,k=Math.min;Q.exports=function O(E,N,M){var x,I,S,L,D,j,z=0,Z=!1,q=!1,X=!0;if("function"!=typeof E)throw new TypeError("Expected a function");function ae(Ue){var st=x,It=I;return x=I=void 0,z=Ue,L=E.apply(It,st)}function Ae(Ue){var st=Ue-j;return void 0===j||st>=N||st<0||q&&Ue-z>=S}function Ie(){var Ue=f();if(Ae(Ue))return De(Ue);D=setTimeout(Ie,function Pe(Ue){var xt=N-(Ue-j);return q?k(xt,S-(Ue-z)):xt}(Ue))}function De(Ue){return D=void 0,X&&x?ae(Ue):(x=I=void 0,L)}function Ge(){var Ue=f(),st=Ae(Ue);if(x=arguments,I=this,j=Ue,st){if(void 0===D)return function fe(Ue){return z=Ue,D=setTimeout(Ie,N),Z?ae(Ue):L}(j);if(q)return D=setTimeout(Ie,N),ae(j)}return void 0===D&&(D=setTimeout(Ie,N)),L}return N=A(N)||0,y(M)&&(Z=!!M.leading,S=(q="maxWait"in M)?P(A(M.maxWait)||0,N):S,X="trailing"in M?!!M.trailing:X),Ge.cancel=function Te(){void 0!==D&&clearTimeout(D),z=0,x=j=I=D=void 0},Ge.flush=function xe(){return void 0===D?L:De(f())},Ge}},99577:(Q,F,v)=>{var y=v(57491),f=v(1883),A=v(78951),C=v(13471),P=v(92819),k=A(function(O,E){var N=P(E);return C(N)&&(N=void 0),C(O)?y(O,f(E,1,C,!0),void 0,N):[]});Q.exports=k},37826:Q=>{Q.exports=function F(v,y){return v===y||v!=v&&y!=y}},97661:(Q,F,v)=>{var y=v(92134),f=v(11892),A=v(21627),C=v(82261);Q.exports=function P(k,O){return(C(k)?y:f)(k,A(O,3))}},76177:(Q,F,v)=>{var A=v(76738)(v(81904));Q.exports=A},81904:(Q,F,v)=>{var y=v(84051),f=v(21627),A=v(90481),C=Math.max;Q.exports=function P(k,O,E){var N=null==k?0:k.length;if(!N)return-1;var M=null==E?0:A(E);return M<0&&(M=C(N+M,0)),y(k,f(O,3),M)}},9336:(Q,F,v)=>{var y=v(1883);Q.exports=function f(A){return null!=A&&A.length?y(A,1):[]}},67170:(Q,F,v)=>{var y=v(57772),f=v(35103),A=v(84655),C=v(82261);Q.exports=function P(k,O){return(C(k)?y:f)(k,A(O))}},55440:(Q,F,v)=>{var y=v(82202);Q.exports=function f(A,C,P){var k=null==A?void 0:y(A,C);return void 0===k?P:k}},47132:(Q,F,v)=>{var y=v(71741),f=v(61149),C=Object.prototype.hasOwnProperty,P=f(function(k,O,E){C.call(k,E)?k[E].push(O):y(k,E,[O])});Q.exports=P},58669:(Q,F,v)=>{var y=v(94493),f=v(44583);Q.exports=function A(C,P){return null!=C&&f(C,P,y)}},12494:(Q,F,v)=>{var y=v(23274),f=v(44583);Q.exports=function A(C,P){return null!=C&&f(C,P,y)}},65657:Q=>{Q.exports=function F(v){return v}},3094:(Q,F,v)=>{var y=v(29568),f=v(32447),A=v(12164),C=v(90481),P=v(78808),k=Math.max;Q.exports=function O(E,N,M,x){E=f(E)?E:P(E),M=M&&!x?C(M):0;var I=E.length;return M<0&&(M=k(I+M,0)),A(E)?M<=I&&E.indexOf(N,M)>-1:!!I&&y(E,N,M)>-1}},71541:(Q,F,v)=>{var y=v(73880),f=v(36635),A=v(78951),C=v(6579),P=A(function(k){var O=y(k,C);return O.length&&O[0]===k[0]?f(O):[]});Q.exports=P},31955:(Q,F,v)=>{var y=v(53022),f=v(53714),A=Object.prototype,C=A.hasOwnProperty,P=A.propertyIsEnumerable,k=y(function(){return arguments}())?y:function(O){return f(O)&&C.call(O,"callee")&&!P.call(O,"callee")};Q.exports=k},82261:Q=>{Q.exports=Array.isArray},32447:(Q,F,v)=>{var y=v(66861),f=v(7765);Q.exports=function A(C){return null!=C&&f(C.length)&&!y(C)}},13471:(Q,F,v)=>{var y=v(32447),f=v(53714);Q.exports=function A(C){return f(C)&&y(C)}},57525:(Q,F,v)=>{Q=v.nmd(Q);var y=v(98492),f=v(15706),A=F&&!F.nodeType&&F,C=A&&Q&&!Q.nodeType&&Q,k=C&&C.exports===A?y.Buffer:void 0;Q.exports=(k?k.isBuffer:void 0)||f},45350:(Q,F,v)=>{var y=v(190),f=v(62472),A=v(31955),C=v(82261),P=v(32447),k=v(57525),O=v(26587),E=v(74868),I=Object.prototype.hasOwnProperty;Q.exports=function S(L){if(null==L)return!0;if(P(L)&&(C(L)||"string"==typeof L||"function"==typeof L.splice||k(L)||E(L)||A(L)))return!L.length;var D=f(L);if("[object Map]"==D||"[object Set]"==D)return!L.size;if(O(L))return!y(L).length;for(var j in L)if(I.call(L,j))return!1;return!0}},99391:(Q,F,v)=>{var y=v(97108);Q.exports=function f(A,C){return y(A,C)}},66861:(Q,F,v)=>{var y=v(24590),f=v(49794);Q.exports=function O(E){if(!f(E))return!1;var N=y(E);return"[object Function]"==N||"[object GeneratorFunction]"==N||"[object AsyncFunction]"==N||"[object Proxy]"==N}},7765:Q=>{Q.exports=function v(y){return"number"==typeof y&&y>-1&&y%1==0&&y<=9007199254740991}},10990:(Q,F,v)=>{var y=v(78562),f=v(35249),A=v(68849),C=A&&A.isMap,P=C?f(C):y;Q.exports=P},49794:Q=>{Q.exports=function F(v){var y=typeof v;return null!=v&&("object"==y||"function"==y)}},53714:Q=>{Q.exports=function F(v){return null!=v&&"object"==typeof v}},28168:(Q,F,v)=>{var y=v(24590),f=v(16186),A=v(53714),O=Function.prototype.toString,E=Object.prototype.hasOwnProperty,N=O.call(Object);Q.exports=function M(x){if(!A(x)||"[object Object]"!=y(x))return!1;var I=f(x);if(null===I)return!0;var S=E.call(I,"constructor")&&I.constructor;return"function"==typeof S&&S instanceof S&&O.call(S)==N}},28611:(Q,F,v)=>{var y=v(61202),f=v(35249),A=v(68849),C=A&&A.isSet,P=C?f(C):y;Q.exports=P},12164:(Q,F,v)=>{var y=v(24590),f=v(82261),A=v(53714);Q.exports=function P(k){return"string"==typeof k||!f(k)&&A(k)&&"[object String]"==y(k)}},23423:(Q,F,v)=>{var y=v(24590),f=v(53714);Q.exports=function C(P){return"symbol"==typeof P||f(P)&&"[object Symbol]"==y(P)}},74868:(Q,F,v)=>{var y=v(38902),f=v(35249),A=v(68849),C=A&&A.isTypedArray,P=C?f(C):y;Q.exports=P},54370:(Q,F,v)=>{var y=v(71741),A=v(61149)(function(C,P,k){y(C,k,P)});Q.exports=A},74614:(Q,F,v)=>{var y=v(31384),f=v(190),A=v(32447);Q.exports=function C(P){return A(P)?y(P):f(P)}},85602:(Q,F,v)=>{var y=v(31384),f=v(7673),A=v(32447);Q.exports=function C(P){return A(P)?y(P,!0):f(P)}},92819:Q=>{Q.exports=function F(v){var y=null==v?0:v.length;return y?v[y-1]:void 0}},58921:(Q,F,v)=>{var y=v(73880),f=v(21627),A=v(62839),C=v(82261);Q.exports=function P(k,O){return(C(k)?y:A)(k,f(O,3))}},87659:(Q,F,v)=>{var y=v(21811);function A(C,P){if("function"!=typeof C||null!=P&&"function"!=typeof P)throw new TypeError("Expected a function");var k=function(){var O=arguments,E=P?P.apply(this,O):O[0],N=k.cache;if(N.has(E))return N.get(E);var M=C.apply(this,O);return k.cache=N.set(E,M)||N,M};return k.cache=new(A.Cache||y),k}A.Cache=y,Q.exports=A},82213:(Q,F,v)=>{var y=v(33294),A=v(81300)(function(C,P,k){y(C,P,k)});Q.exports=A},58427:(Q,F,v)=>{var y=v(33294),A=v(81300)(function(C,P,k,O){y(C,P,k,O)});Q.exports=A},24249:Q=>{Q.exports=function F(){}},55533:(Q,F,v)=>{var y=v(98492);Q.exports=function(){return y.Date.now()}},31008:(Q,F,v)=>{var y=v(252),f=v(82261);Q.exports=function A(C,P,k,O){return null==C?[]:(f(P)||(P=null==P?[]:[P]),f(k=O?void 0:k)||(k=null==k?[]:[k]),y(C,P,k))}},94107:(Q,F,v)=>{var y=v(73880),f=v(21627),A=v(2772),C=v(2442);Q.exports=function P(k,O){if(null==k)return{};var E=y(C(k),function(N){return[N]});return O=f(O),A(k,E,function(N,M){return O(N,M[0])})}},12692:(Q,F,v)=>{var y=v(3400),f=v(96443),A=v(86300),C=v(38916);Q.exports=function P(k){return A(k)?y(C(k)):f(k)}},27991:(Q,F,v)=>{var y=v(73880),f=v(79838),A=v(41102),C=v(25400),P=v(46801),k=v(65188),O=P(function(E,N){var M=null==E?0:E.length,x=f(E,N);return A(E,y(N,function(I){return k(I,M)?+I:I}).sort(C)),x});Q.exports=O},41770:(Q,F,v)=>{var y=v(25204),f=v(33817),A=v(99292),C=parseFloat,P=Math.min,k=Math.random;Q.exports=function O(E,N,M){if(M&&"boolean"!=typeof M&&f(E,N,M)&&(N=M=void 0),void 0===M&&("boolean"==typeof N?(M=N,N=void 0):"boolean"==typeof E&&(M=E,E=void 0)),void 0===E&&void 0===N?(E=0,N=1):(E=A(E),void 0===N?(N=E,E=0):N=A(N)),E>N){var x=E;E=N,N=x}if(M||E%1||N%1){var I=k();return P(E+I*(N-E+C("1e-"+((I+"").length-1))),N)}return y(E,N)}},38119:(Q,F,v)=>{var y=v(21627),f=v(41102);Q.exports=function A(C,P){var k=[];if(!C||!C.length)return k;var O=-1,E=[],N=C.length;for(P=y(P,3);++O<N;){var M=C[O];P(M,O,C)&&(k.push(M),E.push(O))}return f(C,E),k}},17939:(Q,F,v)=>{var y=v(19478);Q.exports=function f(A,C,P){return null==A?A:y(A,C,P)}},48265:(Q,F,v)=>{var y=v(44523),f=v(48904),A=v(82261);Q.exports=function C(P){return(A(P)?y:f)(P)}},77184:(Q,F,v)=>{var y=v(1883),f=v(252),A=v(78951),C=v(33817),P=A(function(k,O){if(null==k)return[];var E=O.length;return E>1&&C(k,O[0],O[1])?O=[]:E>2&&C(O[0],O[1],O[2])&&(O=[O[0]]),f(k,y(O,1),[])});Q.exports=P},73446:(Q,F,v)=>{var y=v(17176);Q.exports=function f(A,C){return y(A,C)}},85727:(Q,F,v)=>{var y=v(21627),f=v(76644);Q.exports=function A(C,P,k){return f(C,P,y(k,2))}},69338:(Q,F,v)=>{var y=v(17176);Q.exports=function f(A,C){return y(A,C,!0)}},22487:(Q,F,v)=>{var y=v(21627),f=v(76644);Q.exports=function A(C,P,k){return f(C,P,y(k,2),!0)}},81315:Q=>{Q.exports=function F(){return[]}},15706:Q=>{Q.exports=function F(){return!1}},74147:(Q,F,v)=>{var y=v(21627),f=v(94227);Q.exports=function A(C,P){return C&&C.length?f(C,y(P,2)):0}},36690:(Q,F,v)=>{var y=v(64430),f=v(49794);Q.exports=function C(P,k,O){var E=!0,N=!0;if("function"!=typeof P)throw new TypeError("Expected a function");return f(O)&&(E="leading"in O?!!O.leading:E,N="trailing"in O?!!O.trailing:N),y(P,k,{leading:E,maxWait:k,trailing:N})}},99292:(Q,F,v)=>{var y=v(94282),f=1/0;Q.exports=function C(P){return P?(P=y(P))===f||P===-f?17976931348623157e292*(P<0?-1:1):P==P?P:0:0===P?P:0}},90481:(Q,F,v)=>{var y=v(99292);Q.exports=function f(A){var C=y(A),P=C%1;return C==C?P?C-P:C:0}},94282:(Q,F,v)=>{var y=v(49794),f=v(23423),C=/^\s+|\s+$/g,P=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,O=/^0o[0-7]+$/i,E=parseInt;Q.exports=function N(M){if("number"==typeof M)return M;if(f(M))return NaN;if(y(M)){var x="function"==typeof M.valueOf?M.valueOf():M;M=y(x)?x+"":x}if("string"!=typeof M)return 0===M?M:+M;M=M.replace(C,"");var I=k.test(M);return I||O.test(M)?E(M.slice(2),I?2:8):P.test(M)?NaN:+M}},84210:(Q,F,v)=>{var y=v(35931),f=v(85602);Q.exports=function A(C){return y(C,f(C))}},12674:(Q,F,v)=>{var y=v(97002);Q.exports=function f(A){return null==A?"":y(A)}},60572:(Q,F,v)=>{var y=v(39154);Q.exports=function f(A){return A&&A.length?y(A):[]}},19299:(Q,F,v)=>{var y=v(21627),f=v(39154);Q.exports=function A(C,P){return C&&C.length?f(C,y(P,2)):[]}},78808:(Q,F,v)=>{var y=v(16680),f=v(74614);Q.exports=function A(C){return null==C?[]:y(C,f(C))}},67253:Q=>{var F=1e3,v=60*F,y=60*v,f=24*y;function O(E,N,M){if(!(E<N))return E<1.5*N?Math.floor(E/N)+" "+M:Math.ceil(E/N)+" "+M+"s"}Q.exports=function(E,N){N=N||{};var M=typeof E;if("string"===M&&E.length>0)return function C(E){if(!((E=String(E)).length>100)){var N=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(E);if(N){var M=parseFloat(N[1]);switch((N[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*M;case"days":case"day":case"d":return M*f;case"hours":case"hour":case"hrs":case"hr":case"h":return M*y;case"minutes":case"minute":case"mins":case"min":case"m":return M*v;case"seconds":case"second":case"secs":case"sec":case"s":return M*F;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return M;default:return}}}}(E);if("number"===M&&!1===isNaN(E))return N.long?function k(E){return O(E,f,"day")||O(E,y,"hour")||O(E,v,"minute")||O(E,F,"second")||E+" ms"}(E):function P(E){return E>=f?Math.round(E/f)+"d":E>=y?Math.round(E/y)+"h":E>=v?Math.round(E/v)+"m":E>=F?Math.round(E/F)+"s":E+"ms"}(E);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(E))}},1367:(Q,F)=>{F.encode=function(v){var y="";for(var f in v)v.hasOwnProperty(f)&&(y.length&&(y+="&"),y+=encodeURIComponent(f)+"="+encodeURIComponent(v[f]));return y},F.decode=function(v){for(var y={},f=v.split("&"),A=0,C=f.length;A<C;A++){var P=f[A].split("=");y[decodeURIComponent(P[0])]=decodeURIComponent(P[1])}return y}},29163:Q=>{var F=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,v=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];Q.exports=function(f){var A=f,C=f.indexOf("["),P=f.indexOf("]");-1!=C&&-1!=P&&(f=f.substring(0,C)+f.substring(C,P).replace(/:/g,";")+f.substring(P,f.length));for(var k=F.exec(f||""),O={},E=14;E--;)O[v[E]]=k[E]||"";return-1!=C&&-1!=P&&(O.source=A,O.host=O.host.substring(1,O.host.length-1).replace(/;/g,":"),O.authority=O.authority.replace("[","").replace("]","").replace(/;/g,":"),O.ipv6uri=!0),O}},88857:(Q,F,v)=>{"use strict";var f=v(22327);F.zD=f.load,v(16585)},16585:function(Q,F){"use strict";var v=this&&this.__awaiter||function(A,C,P,k){return new(P||(P=Promise))(function(E,N){function M(S){try{I(k.next(S))}catch(L){N(L)}}function x(S){try{I(k.throw(S))}catch(L){N(L)}}function I(S){S.done?E(S.value):function O(E){return E instanceof P?E:new P(function(N){N(E)})}(S.value).then(M,x)}I((k=k.apply(A,C||[])).next())})},y=this&&this.__generator||function(A,C){var k,O,E,N,P={label:0,sent:function(){if(1&E[0])throw E[1];return E[1]},trys:[],ops:[]};return N={next:M(0),throw:M(1),return:M(2)},"function"==typeof Symbol&&(N[Symbol.iterator]=function(){return this}),N;function M(I){return function(S){return function x(I){if(k)throw new TypeError("Generator is already executing.");for(;P;)try{if(k=1,O&&(E=2&I[0]?O.return:I[0]?O.throw||((E=O.return)&&E.call(O),0):O.next)&&!(E=E.call(O,I[1])).done)return E;switch(O=0,E&&(I=[2&I[0],E.value]),I[0]){case 0:case 1:E=I;break;case 4:return P.label++,{value:I[1],done:!1};case 5:P.label++,O=I[1],I=[0];continue;case 7:I=P.ops.pop(),P.trys.pop();continue;default:if(!(E=(E=P.trys).length>0&&E[E.length-1])&&(6===I[0]||2===I[0])){P=0;continue}if(3===I[0]&&(!E||I[1]>E[0]&&I[1]<E[3])){P.label=I[1];break}if(6===I[0]&&P.label<E[1]){P.label=E[1],E=I;break}if(E&&P.label<E[2]){P.label=E[2],P.ops.push(I);break}E[2]&&P.ops.pop(),P.trys.pop();continue}I=C.call(A,P)}catch(S){I=[6,S],O=0}finally{k=E=0}if(5&I[0])throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}([I,S])}}};Object.defineProperty(F,"__esModule",{value:!0});var f=function(){function A(C,P,k){this.siteKey=C,this.recaptchaID=P,this.recaptcha=k,this.styleContainer=null}return A.prototype.execute=function(C){return v(this,void 0,void 0,function(){return y(this,function(P){return[2,this.recaptcha.execute(this.recaptchaID,{action:C})]})})},A.prototype.getSiteKey=function(){return this.siteKey},A.prototype.hideBadge=function(){null===this.styleContainer&&(this.styleContainer=document.createElement("style"),this.styleContainer.innerHTML=".grecaptcha-badge{display:none !important;}",document.head.appendChild(this.styleContainer))},A.prototype.showBadge=function(){null!==this.styleContainer&&(document.head.removeChild(this.styleContainer),this.styleContainer=null)},A}();F.ReCaptchaInstance=f},22327:(Q,F,v)=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});var y=v(16585),f=function(C){return C[C.NOT_LOADED=0]="NOT_LOADED",C[C.LOADING=1]="LOADING",C[C.LOADED=2]="LOADED",C}(f||{}),A=function(){function C(){}return C.load=function(P,k){if(void 0===k&&(k={}),typeof document>"u")return Promise.reject(new Error("This is a library for the browser!"));if(C.getLoadingState()===f.LOADED)return C.instance.getSiteKey()===P?Promise.resolve(C.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(C.getLoadingState()===f.LOADING)return P!==C.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(E,N){C.successfulLoadingConsumers.push(function(M){return E(M)}),C.errorLoadingRunnable.push(function(M){return N(M)})});C.instanceSiteKey=P,C.setLoadingState(f.LOADING);var O=new C;return new Promise(function(E,N){O.loadScript(P,k.useRecaptchaNet||!1,k.renderParameters?k.renderParameters:{},k.customUrl).then(function(){C.setLoadingState(f.LOADED);var M=O.doExplicitRender(grecaptcha,P,k.explicitRenderParameters?k.explicitRenderParameters:{}),x=new y.ReCaptchaInstance(P,M,grecaptcha);C.successfulLoadingConsumers.forEach(function(I){return I(x)}),C.successfulLoadingConsumers=[],k.autoHideBadge&&x.hideBadge(),C.instance=x,E(x)}).catch(function(M){C.errorLoadingRunnable.forEach(function(x){return x(M)}),C.errorLoadingRunnable=[],N(M)})})},C.getInstance=function(){return C.instance},C.setLoadingState=function(P){C.loadingState=P},C.getLoadingState=function(){return null===C.loadingState?f.NOT_LOADED:C.loadingState},C.prototype.loadScript=function(P,k,O,E){var N=this;void 0===k&&(k=!1),void 0===O&&(O={}),void 0===E&&(E="");var M=document.createElement("script");M.setAttribute("recaptcha-v3-script","");var x="https://www.google.com/recaptcha/api.js";k&&(x="https://recaptcha.net/recaptcha/api.js"),E&&(x=E),O.render&&(O.render=void 0);var I=this.buildQueryString(O);return M.src=x+"?render=explicit"+I,new Promise(function(S,L){M.addEventListener("load",N.waitForScriptToLoad(function(){S(M)}),!1),M.onerror=function(D){C.setLoadingState(f.NOT_LOADED),L(D)},document.head.appendChild(M)})},C.prototype.buildQueryString=function(P){return Object.keys(P).length<1?"":"&"+Object.keys(P).filter(function(O){return!!P[O]}).map(function(O){return O+"="+P[O]}).join("&")},C.prototype.waitForScriptToLoad=function(P){var k=this;return function(){void 0===window.grecaptcha?setTimeout(function(){k.waitForScriptToLoad(P)},C.SCRIPT_LOAD_DELAY):window.grecaptcha.ready(function(){P()})}},C.prototype.doExplicitRender=function(P,k,O){var E={sitekey:k,badge:O.badge,size:O.size,tabindex:O.tabindex};return O.container?P.render(O.container,E):P.render(E)},C.loadingState=null,C.instance=null,C.instanceSiteKey=null,C.successfulLoadingConsumers=[],C.errorLoadingRunnable=[],C.SCRIPT_LOAD_DELAY=25,C}();F.load=A.load,F.getInstance=A.getInstance},76840:(Q,F,v)=>{var y=v(1664),f=v(49153),A=v(51598),C=v(35967)("socket.io-client");Q.exports=F=k;var P=F.managers={};function k(O,E){"object"==typeof O&&(E=O,O=void 0),E=E||{};var D,N=y(O),M=N.source,x=N.id;return E.forceNew||E["force new connection"]||!1===E.multiplex||P[x]&&N.path in P[x].nsps?(C("ignoring socket cache for %s",M),D=A(M,E)):(P[x]||(C("new io instance for %s",M),P[x]=A(M,E)),D=P[x]),N.query&&!E.query&&(E.query=N.query),D.socket(N.path,E)}F.protocol=f.protocol,F.connect=k,F.Manager=v(51598),F.Socket=v(49197)},51598:(Q,F,v)=>{var y=v(97230),f=v(49197),A=v(85879),C=v(49153),P=v(43506),k=v(57951),O=v(35967)("socket.io-client:manager"),E=v(83300),N=v(56625),M=Object.prototype.hasOwnProperty;function x(I,S){if(!(this instanceof x))return new x(I,S);I&&"object"==typeof I&&(S=I,I=void 0),(S=S||{}).path=S.path||"/socket.io",this.nsps={},this.subs=[],this.opts=S,this.reconnection(!1!==S.reconnection),this.reconnectionAttempts(S.reconnectionAttempts||1/0),this.reconnectionDelay(S.reconnectionDelay||1e3),this.reconnectionDelayMax(S.reconnectionDelayMax||5e3),this.randomizationFactor(S.randomizationFactor||.5),this.backoff=new N({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==S.timeout?2e4:S.timeout),this.readyState="closed",this.uri=I,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var L=S.parser||C;this.encoder=new L.Encoder,this.decoder=new L.Decoder,this.autoConnect=!1!==S.autoConnect,this.autoConnect&&this.open()}Q.exports=x,x.prototype.emitAll=function(){for(var I in this.emit.apply(this,arguments),this.nsps)M.call(this.nsps,I)&&this.nsps[I].emit.apply(this.nsps[I],arguments)},x.prototype.updateSocketIds=function(){for(var I in this.nsps)M.call(this.nsps,I)&&(this.nsps[I].id=this.generateId(I))},x.prototype.generateId=function(I){return("/"===I?"":I+"#")+this.engine.id},A(x.prototype),x.prototype.reconnection=function(I){return arguments.length?(this._reconnection=!!I,this):this._reconnection},x.prototype.reconnectionAttempts=function(I){return arguments.length?(this._reconnectionAttempts=I,this):this._reconnectionAttempts},x.prototype.reconnectionDelay=function(I){return arguments.length?(this._reconnectionDelay=I,this.backoff&&this.backoff.setMin(I),this):this._reconnectionDelay},x.prototype.randomizationFactor=function(I){return arguments.length?(this._randomizationFactor=I,this.backoff&&this.backoff.setJitter(I),this):this._randomizationFactor},x.prototype.reconnectionDelayMax=function(I){return arguments.length?(this._reconnectionDelayMax=I,this.backoff&&this.backoff.setMax(I),this):this._reconnectionDelayMax},x.prototype.timeout=function(I){return arguments.length?(this._timeout=I,this):this._timeout},x.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},x.prototype.open=x.prototype.connect=function(I,S){if(O("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;O("opening %s",this.uri),this.engine=y(this.uri,this.opts);var L=this.engine,D=this;this.readyState="opening",this.skipReconnect=!1;var j=P(L,"open",function(){D.onopen(),I&&I()}),z=P(L,"error",function(X){if(O("connect_error"),D.cleanup(),D.readyState="closed",D.emitAll("connect_error",X),I){var ae=new Error("Connection error");ae.data=X,I(ae)}else D.maybeReconnectOnOpen()});if(!1!==this._timeout){var Z=this._timeout;O("connect attempt will timeout after %d",Z);var q=setTimeout(function(){O("connect attempt timed out after %d",Z),j.destroy(),L.close(),L.emit("error","timeout"),D.emitAll("connect_timeout",Z)},Z);this.subs.push({destroy:function(){clearTimeout(q)}})}return this.subs.push(j),this.subs.push(z),this},x.prototype.onopen=function(){O("open"),this.cleanup(),this.readyState="open",this.emit("open");var I=this.engine;this.subs.push(P(I,"data",k(this,"ondata"))),this.subs.push(P(I,"ping",k(this,"onping"))),this.subs.push(P(I,"pong",k(this,"onpong"))),this.subs.push(P(I,"error",k(this,"onerror"))),this.subs.push(P(I,"close",k(this,"onclose"))),this.subs.push(P(this.decoder,"decoded",k(this,"ondecoded")))},x.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},x.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},x.prototype.ondata=function(I){this.decoder.add(I)},x.prototype.ondecoded=function(I){this.emit("packet",I)},x.prototype.onerror=function(I){O("error",I),this.emitAll("error",I)},x.prototype.socket=function(I,S){var L=this.nsps[I];if(!L){L=new f(this,I,S),this.nsps[I]=L;var D=this;L.on("connecting",j),L.on("connect",function(){L.id=D.generateId(I)}),this.autoConnect&&j()}function j(){~E(D.connecting,L)||D.connecting.push(L)}return L},x.prototype.destroy=function(I){var S=E(this.connecting,I);~S&&this.connecting.splice(S,1),!this.connecting.length&&this.close()},x.prototype.packet=function(I){O("writing packet %j",I);var S=this;I.query&&0===I.type&&(I.nsp+="?"+I.query),S.encoding?S.packetBuffer.push(I):(S.encoding=!0,this.encoder.encode(I,function(L){for(var D=0;D<L.length;D++)S.engine.write(L[D],I.options);S.encoding=!1,S.processPacketQueue()}))},x.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var I=this.packetBuffer.shift();this.packet(I)}},x.prototype.cleanup=function(){O("cleanup");for(var I=this.subs.length,S=0;S<I;S++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},x.prototype.close=x.prototype.disconnect=function(){O("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},x.prototype.onclose=function(I){O("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",I),this._reconnection&&!this.skipReconnect&&this.reconnect()},x.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var I=this;if(this.backoff.attempts>=this._reconnectionAttempts)O("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var S=this.backoff.duration();O("will wait %dms before reconnect attempt",S),this.reconnecting=!0;var L=setTimeout(function(){I.skipReconnect||(O("attempting reconnect"),I.emitAll("reconnect_attempt",I.backoff.attempts),I.emitAll("reconnecting",I.backoff.attempts),!I.skipReconnect&&I.open(function(D){D?(O("reconnect attempt error"),I.reconnecting=!1,I.reconnect(),I.emitAll("reconnect_error",D.data)):(O("reconnect success"),I.onreconnect())}))},S);this.subs.push({destroy:function(){clearTimeout(L)}})}},x.prototype.onreconnect=function(){var I=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",I)}},43506:Q=>{Q.exports=function F(v,y,f){return v.on(y,f),{destroy:function(){v.removeListener(y,f)}}}},49197:(Q,F,v)=>{var y=v(49153),f=v(85879),A=v(40138),C=v(43506),P=v(57951),k=v(35967)("socket.io-client:socket"),O=v(1367);Q.exports=M;var E={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},N=f.prototype.emit;function M(x,I,S){this.io=x,this.nsp=I,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,S&&S.query&&(this.query=S.query),this.io.autoConnect&&this.open()}f(M.prototype),M.prototype.subEvents=function(){if(!this.subs){var x=this.io;this.subs=[C(x,"open",P(this,"onopen")),C(x,"packet",P(this,"onpacket")),C(x,"close",P(this,"onclose"))]}},M.prototype.open=M.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},M.prototype.send=function(){var x=A(arguments);return x.unshift("message"),this.emit.apply(this,x),this},M.prototype.emit=function(x){if(E.hasOwnProperty(x))return N.apply(this,arguments),this;var I=A(arguments),S={type:y.EVENT,data:I,options:{}};return S.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof I[I.length-1]&&(k("emitting packet with ack id %d",this.ids),this.acks[this.ids]=I.pop(),S.id=this.ids++),this.connected?this.packet(S):this.sendBuffer.push(S),delete this.flags,this},M.prototype.packet=function(x){x.nsp=this.nsp,this.io.packet(x)},M.prototype.onopen=function(){if(k("transport is open - connecting"),"/"!==this.nsp)if(this.query){var x="object"==typeof this.query?O.encode(this.query):this.query;k("sending connect packet with query %s",x),this.packet({type:y.CONNECT,query:x})}else this.packet({type:y.CONNECT})},M.prototype.onclose=function(x){k("close (%s)",x),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",x)},M.prototype.onpacket=function(x){if(x.nsp===this.nsp)switch(x.type){case y.CONNECT:this.onconnect();break;case y.EVENT:case y.BINARY_EVENT:this.onevent(x);break;case y.ACK:case y.BINARY_ACK:this.onack(x);break;case y.DISCONNECT:this.ondisconnect();break;case y.ERROR:this.emit("error",x.data)}},M.prototype.onevent=function(x){var I=x.data||[];k("emitting event %j",I),null!=x.id&&(k("attaching ack callback to event"),I.push(this.ack(x.id))),this.connected?N.apply(this,I):this.receiveBuffer.push(I)},M.prototype.ack=function(x){var I=this,S=!1;return function(){if(!S){S=!0;var L=A(arguments);k("sending ack %j",L),I.packet({type:y.ACK,id:x,data:L})}}},M.prototype.onack=function(x){var I=this.acks[x.id];"function"==typeof I?(k("calling ack %s with %j",x.id,x.data),I.apply(this,x.data),delete this.acks[x.id]):k("bad ack %s",x.id)},M.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},M.prototype.emitBuffered=function(){var x;for(x=0;x<this.receiveBuffer.length;x++)N.apply(this,this.receiveBuffer[x]);for(this.receiveBuffer=[],x=0;x<this.sendBuffer.length;x++)this.packet(this.sendBuffer[x]);this.sendBuffer=[]},M.prototype.ondisconnect=function(){k("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},M.prototype.destroy=function(){if(this.subs){for(var x=0;x<this.subs.length;x++)this.subs[x].destroy();this.subs=null}this.io.destroy(this)},M.prototype.close=M.prototype.disconnect=function(){return this.connected&&(k("performing disconnect (%s)",this.nsp),this.packet({type:y.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},M.prototype.compress=function(x){return this.flags=this.flags||{},this.flags.compress=x,this}},1664:(Q,F,v)=>{var y=v(29163),f=v(35967)("socket.io-client:url");Q.exports=function A(C,P){var k=C;P=P||v.g.location,null==C&&(C=P.protocol+"//"+P.host),"string"==typeof C&&("/"===C.charAt(0)&&(C="/"===C.charAt(1)?P.protocol+C:P.host+C),/^(https?|wss?):\/\//.test(C)||(f("protocol-less url %s",C),C=typeof P<"u"?P.protocol+"//"+C:"https://"+C),f("parse %s",C),k=y(C)),k.port||(/^(http|ws)$/.test(k.protocol)?k.port="80":/^(http|ws)s$/.test(k.protocol)&&(k.port="443")),k.path=k.path||"/";var E=-1!==k.host.indexOf(":")?"["+k.host+"]":k.host;return k.id=k.protocol+"://"+E+":"+k.port,k.href=k.protocol+"://"+E+(P&&P.port===k.port?"":":"+k.port),k}},35967:(Q,F,v)=>{function P(){var O;try{O=F.storage.debug}catch(E){}return!O&&typeof process<"u"&&"env"in process&&(O=process.env.DEBUG),O}(F=Q.exports=v(89928)).log=function A(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},F.formatArgs=function f(O){var E=this.useColors;if(O[0]=(E?"%c":"")+this.namespace+(E?" %c":" ")+O[0]+(E?"%c ":" ")+"+"+F.humanize(this.diff),E){var N="color: "+this.color;O.splice(1,0,N,"color: inherit");var M=0,x=0;O[0].replace(/%[a-zA-Z%]/g,function(I){"%%"!==I&&(M++,"%c"===I&&(x=M))}),O.splice(x,0,N)}},F.save=function C(O){try{null==O?F.storage.removeItem("debug"):F.storage.debug=O}catch(E){}},F.load=P,F.useColors=function y(){return!!(typeof window<"u"&&window.process&&"renderer"===window.process.type)||typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},F.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:function k(){try{return window.localStorage}catch(O){}}(),F.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],F.formatters.j=function(O){try{return JSON.stringify(O)}catch(E){return"[UnexpectedJSONParseError]: "+E.message}},F.enable(P())},89928:(Q,F,v)=>{var y;function A(E){function N(){if(N.enabled){var M=N,x=+new Date;M.diff=x-(y||x),M.prev=y,M.curr=x,y=x;for(var S=new Array(arguments.length),L=0;L<S.length;L++)S[L]=arguments[L];S[0]=F.coerce(S[0]),"string"!=typeof S[0]&&S.unshift("%O");var D=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,function(z,Z){if("%%"===z)return z;D++;var q=F.formatters[Z];return"function"==typeof q&&(z=q.call(M,S[D]),S.splice(D,1),D--),z}),F.formatArgs.call(M,S),(N.log||F.log||console.log.bind(console)).apply(M,S)}}return N.namespace=E,N.enabled=F.enabled(E),N.useColors=F.useColors(),N.color=function f(E){var M,N=0;for(M in E)N=(N<<5)-N+E.charCodeAt(M),N|=0;return F.colors[Math.abs(N)%F.colors.length]}(E),"function"==typeof F.init&&F.init(N),N}(F=Q.exports=A.debug=A.default=A).coerce=function O(E){return E instanceof Error?E.stack||E.message:E},F.disable=function P(){F.enable("")},F.enable=function C(E){F.save(E),F.names=[],F.skips=[];for(var N=("string"==typeof E?E:"").split(/[\s,]+/),M=N.length,x=0;x<M;x++)N[x]&&("-"===(E=N[x].replace(/\*/g,".*?"))[0]?F.skips.push(new RegExp("^"+E.substr(1)+"$")):F.names.push(new RegExp("^"+E+"$")))},F.enabled=function k(E){var N,M;for(N=0,M=F.skips.length;N<M;N++)if(F.skips[N].test(E))return!1;for(N=0,M=F.names.length;N<M;N++)if(F.names[N].test(E))return!0;return!1},F.humanize=v(67253),F.names=[],F.skips=[],F.formatters={}},64545:(Q,F,v)=>{var y=v(26243),f=v(35916),A=Object.prototype.toString,C="function"==typeof v.g.Blob||"[object BlobConstructor]"===A.call(v.g.Blob),P="function"==typeof v.g.File||"[object FileConstructor]"===A.call(v.g.File);function k(E,N){if(!E)return E;if(f(E)){var M={_placeholder:!0,num:N.length};return N.push(E),M}if(y(E)){for(var x=new Array(E.length),I=0;I<E.length;I++)x[I]=k(E[I],N);return x}if("object"==typeof E&&!(E instanceof Date)){for(var S in x={},E)x[S]=k(E[S],N);return x}return E}function O(E,N){if(!E)return E;if(E&&E._placeholder)return N[E.num];if(y(E))for(var M=0;M<E.length;M++)E[M]=O(E[M],N);else if("object"==typeof E)for(var x in E)E[x]=O(E[x],N);return E}F.deconstructPacket=function(E){var N=[],x=E;return x.data=k(E.data,N),x.attachments=N.length,{packet:x,buffers:N}},F.reconstructPacket=function(E,N){return E.data=O(E.data,N),E.attachments=void 0,E},F.removeBlobs=function(E,N){var x=0,I=E;(function M(S,L,D){if(!S)return S;if(C&&S instanceof Blob||P&&S instanceof File){x++;var j=new FileReader;j.onload=function(){D?D[L]=this.result:I=this.result,--x||N(I)},j.readAsArrayBuffer(S)}else if(y(S))for(var z=0;z<S.length;z++)M(S[z],z,S);else if("object"==typeof S&&!f(S))for(var Z in S)M(S[Z],Z,S)})(I),x||N(I)}},49153:(Q,F,v)=>{var y=v(20563)("socket.io-parser"),f=v(85879),A=v(96829),C=v(64545),P=v(26243),k=v(35916);function O(){}function E(D){var j=""+D.type;return(F.BINARY_EVENT===D.type||F.BINARY_ACK===D.type)&&(j+=D.attachments+"-"),D.nsp&&"/"!==D.nsp&&(j+=D.nsp+","),null!=D.id&&(j+=D.id),null!=D.data&&(j+=JSON.stringify(D.data)),y("encoded %j as %s",D,j),j}function M(){this.reconstructor=null}function S(D){this.reconPack=D,this.buffers=[]}function L(D){return{type:F.ERROR,data:"parser error: "+D}}F.protocol=4,F.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],F.CONNECT=0,F.DISCONNECT=1,F.EVENT=2,F.ACK=3,F.ERROR=4,F.BINARY_EVENT=5,F.BINARY_ACK=6,F.Encoder=O,F.Decoder=M,O.prototype.encode=function(D,j){(D.type===F.EVENT||D.type===F.ACK)&&A(D.data)&&(D.type=D.type===F.EVENT?F.BINARY_EVENT:F.BINARY_ACK),y("encoding packet %j",D),F.BINARY_EVENT===D.type||F.BINARY_ACK===D.type?function N(D,j){C.removeBlobs(D,function z(Z){var q=C.deconstructPacket(Z),X=E(q.packet),ae=q.buffers;ae.unshift(X),j(ae)})}(D,j):j([E(D)])},f(M.prototype),M.prototype.add=function(D){var j;if("string"==typeof D)j=function x(D){var j=0,z={type:Number(D.charAt(0))};if(null==F.types[z.type])return L("unknown packet type "+z.type);if(F.BINARY_EVENT===z.type||F.BINARY_ACK===z.type){for(var Z="";"-"!==D.charAt(++j)&&(Z+=D.charAt(j),j!=D.length););if(Z!=Number(Z)||"-"!==D.charAt(j))throw new Error("Illegal attachments");z.attachments=Number(Z)}if("/"===D.charAt(j+1))for(z.nsp="";++j&&(","!==(q=D.charAt(j))&&(z.nsp+=q,j!==D.length)););else z.nsp="/";var X=D.charAt(j+1);if(""!==X&&Number(X)==X){for(z.id="";++j;){var q;if(null==(q=D.charAt(j))||Number(q)!=q){--j;break}if(z.id+=D.charAt(j),j===D.length)break}z.id=Number(z.id)}if(D.charAt(++j)){var ae=function I(D){try{return JSON.parse(D)}catch(j){return!1}}(D.substr(j));if(!1===ae||z.type!==F.ERROR&&!P(ae))return L("invalid payload");z.data=ae}return y("decoded %s as %j",D,z),z}(D),F.BINARY_EVENT===j.type||F.BINARY_ACK===j.type?(this.reconstructor=new S(j),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",j)):this.emit("decoded",j);else{if(!k(D)&&!D.base64)throw new Error("Unknown type: "+D);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(j=this.reconstructor.takeBinaryData(D))&&(this.reconstructor=null,this.emit("decoded",j))}},M.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},S.prototype.takeBinaryData=function(D){if(this.buffers.push(D),this.buffers.length===this.reconPack.attachments){var j=C.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),j}return null},S.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},35916:(Q,F,v)=>{Q.exports=function y(f){return v.g.Buffer&&v.g.Buffer.isBuffer(f)||v.g.ArrayBuffer&&(f instanceof ArrayBuffer||ArrayBuffer.isView(f))}},40138:Q=>{Q.exports=function F(v,y){for(var f=[],A=(y=y||0)||0;A<v.length;A++)f[A-y]=v[A];return f}},29156:Q=>{for(var F=[],v=0;v<256;++v)F[v]=(v+256).toString(16).substr(1);Q.exports=function y(f,A){var C=A||0;return[F[f[C++]],F[f[C++]],F[f[C++]],F[f[C++]],"-",F[f[C++]],F[f[C++]],"-",F[f[C++]],F[f[C++]],"-",F[f[C++]],F[f[C++]],"-",F[f[C++]],F[f[C++]],F[f[C++]],F[f[C++]],F[f[C++]],F[f[C++]]].join("")}},66695:Q=>{var F=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(F){var v=new Uint8Array(16);Q.exports=function(){return F(v),v}}else{var y=new Array(16);Q.exports=function(){for(var C,A=0;A<16;A++)3&A||(C=4294967296*Math.random()),y[A]=C>>>((3&A)<<3)&255;return y}}},7326:(Q,F,v)=>{var y=v(66695),f=v(29156);Q.exports=function A(C,P,k){var O=P&&k||0;"string"==typeof C&&(P="binary"===C?new Array(16):null,C=null);var E=(C=C||{}).random||(C.rng||y)();if(E[6]=15&E[6]|64,E[8]=63&E[8]|128,P)for(var N=0;N<16;++N)P[O+N]=E[N];return P||f(E)}},51323:Q=>{"use strict";var C,F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),v=64,y={},f=0,A=0;function P(E){var N="";do{N=F[E%v]+N,E=Math.floor(E/v)}while(E>0);return N}function O(){var E=P(+new Date);return E!==C?(f=0,C=E):E+"."+P(f++)}for(;A<v;A++)y[F[A]]=A;O.encode=P,O.decode=function k(E){var N=0;for(A=0;A<E.length;A++)N=N*v+y[E.charAt(A)];return N},Q.exports=O},68907:(Q,F,v)=>{"use strict";v.d(F,{fl:()=>L,pi:()=>A});var A=function(){return A=Object.assign||function(De){for(var Te,xe=1,Ge=arguments.length;xe<Ge;xe++)for(var Ue in Te=arguments[xe])Object.prototype.hasOwnProperty.call(Te,Ue)&&(De[Ue]=Te[Ue]);return De},A.apply(this,arguments)};function S(Ie,De){var Te="function"==typeof Symbol&&Ie[Symbol.iterator];if(!Te)return Ie;var Ge,st,xe=Te.call(Ie),Ue=[];try{for(;(void 0===De||De-- >0)&&!(Ge=xe.next()).done;)Ue.push(Ge.value)}catch(It){st={error:It}}finally{try{Ge&&!Ge.done&&(Te=xe.return)&&Te.call(xe)}finally{if(st)throw st.error}}return Ue}function L(){for(var Ie=[],De=0;De<arguments.length;De++)Ie=Ie.concat(S(arguments[De]));return Ie}},77020:()=>{},72036:(Q,F,v)=>{"use strict";v.d(F,{G:()=>y,r:()=>f});const y={CustomEvent:"ce",Pr:"p",xu:"pc",vc:"ca",Ua:"i",Ms:"ie",M:"cci",R:"ccic",I:"ccc",F:"ccd",kl:"ss",xl:"se",Xe:"si",Ve:"sc",We:"sbc",Cc:"sfe",po:"iec",Pu:"lr",Mu:"uae",O:"ci",$:"cc",Ou:"lcaa",Nu:"lcar",On:"inc",Ln:"add",Rn:"rem",$n:"set",Bn:"ncam",Uu:"sgu",Fr:"ffi"},f={Br:"feed_displayed",Ec:"content_cards_displayed"}},25701:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});const f={W:function(){const A=(C=!1)=>{const P=(Math.random().toString(16)+"000000000").substr(2,8);return C?"-"+P.substr(0,4)+"-"+P.substr(4,4):P};return A()+A(!0)+A(!0)+A()}}},76775:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>y});let y=(()=>{class f{constructor(C,P){this.database=C,this.dd=P,this.parent=typeof window>"u"?self:window,this.database=C,this.dd=P}ud(){if("indexedDB"in this.parent)return this.parent.indexedDB}isSupported(){var C;try{if(null==this.ud())return!1;{const P=null===(C=this.ud())||void 0===C?void 0:C.open("Braze IndexedDB Support Test");if(P&&(P.onupgradeneeded=()=>P.result.close(),P.onsuccess=()=>P.result.close()),typeof window<"u"){const k=window,O=k.chrome||k.browser||k.fd;if(O&&O.runtime&&O.runtime.id)return this.dd.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}}catch(P){return this.dd.info("Not using IndexedDB for storage due to following error: "+P),!1}}ad(C,P){var k;const O=null===(k=this.ud())||void 0===k?void 0:k.open(this.database.vd,this.database.VERSION);if(null==O)return"function"==typeof P&&P(),!1;const E=this;return O.onupgradeneeded=N=>{var M;E.dd.info("Upgrading indexedDB "+E.database.vd+" to v"+E.database.VERSION+"...");const x=null===(M=N.target)||void 0===M?void 0:M.result;for(const I in E.database.ss){const S=I;E.database.ss.hasOwnProperty(I)&&!x.objectStoreNames.contains(E.database.ss[S])&&x.createObjectStore(E.database.ss[S])}},O.onsuccess=N=>{var M;const x=null===(M=N.target)||void 0===M?void 0:M.result;x.onversionchange=()=>{x.close(),"function"==typeof P&&P(),E.dd.error("Needed to close the database unexpectedly because of an upgrade in another tab")},C(x)},O.onerror=N=>{var M;return E.dd.info("Could not open indexedDB "+E.database.vd+" v"+E.database.VERSION+": "+(null===(M=N.target)||void 0===M?void 0:M.errorCode)),"function"==typeof P&&P(),!0},!0}setItem(C,P,k,O,E){if(!this.isSupported())return"function"==typeof E&&E(),!1;const N=this;return this.ad(M=>{if(!M.objectStoreNames.contains(C))return N.dd.error("Could not store object "+P+" in "+C+" on indexedDB "+N.database.vd+" - "+C+" is not a valid objectStore"),"function"==typeof E&&E(),void M.close();const x=M.transaction([C],"readwrite");x.oncomplete=()=>M.close();const I=x.objectStore(C).put(k,P);I.onerror=()=>{N.dd.error("Could not store object "+P+" in "+C+" on indexedDB "+N.database.vd),"function"==typeof E&&E()},I.onsuccess=()=>{"function"==typeof O&&O()}},E)}getItem(C,P,k){if(!this.isSupported())return!1;const O=this;return this.ad(E=>{if(!E.objectStoreNames.contains(C))return O.dd.error("Could not retrieve object "+P+" in "+C+" on indexedDB "+O.database.vd+" - "+C+" is not a valid objectStore"),void E.close();const N=E.transaction([C],"readonly");N.oncomplete=()=>E.close();const M=N.objectStore(C).get(P);M.onerror=()=>{O.dd.error("Could not retrieve object "+P+" in "+C+" on indexedDB "+O.database.vd)},M.onsuccess=x=>{var I;const S=null===(I=x.target)||void 0===I?void 0:I.result;null!=S&&k(S)}})}jr(C,P,k){if(!this.isSupported())return"function"==typeof k&&k(),!1;const O=this;return this.ad(E=>{if(!E.objectStoreNames.contains(C))return O.dd.error("Could not retrieve last record from "+C+" on indexedDB "+O.database.vd+" - "+C+" is not a valid objectStore"),"function"==typeof k&&k(),void E.close();const N=E.transaction([C],"readonly");N.oncomplete=()=>E.close();const M=N.objectStore(C).openCursor(null,"prev");M.onerror=()=>{O.dd.error("Could not open cursor for "+C+" on indexedDB "+O.database.vd),"function"==typeof k&&k()},M.onsuccess=x=>{var I;const S=null===(I=x.target)||void 0===I?void 0:I.result;null!=S&&null!=S.value&&null!=S.key?P(S.key,S.value):"function"==typeof k&&k()}},k)}re(C,P){if(!this.isSupported())return!1;const k=this;return this.ad(O=>{if(!O.objectStoreNames.contains(C))return k.dd.error("Could not delete record "+P+" from "+C+" on indexedDB "+k.database.vd+" - "+C+" is not a valid objectStore"),void O.close();const E=O.transaction([C],"readwrite");E.oncomplete=()=>O.close(),E.objectStore(C).delete(P).onerror=()=>{k.dd.error("Could not delete record "+P+" from "+C+" on indexedDB "+k.database.vd)}})}Zt(C,P){if(!this.isSupported())return!1;const k=this;return this.ad(O=>{if(!O.objectStoreNames.contains(C))return k.dd.error("Could not retrieve objects from "+C+" on indexedDB "+k.database.vd+" - "+C+" is not a valid objectStore"),void O.close();const E=O.transaction([C],"readwrite");E.oncomplete=()=>O.close();const N=E.objectStore(C),M=N.openCursor(),x=[];M.onerror=()=>{x.length>0?(k.dd.info("Cursor closed midway through for "+C+" on indexedDB "+k.database.vd),P(x)):k.dd.error("Could not open cursor for "+C+" on indexedDB "+k.database.vd)},M.onsuccess=I=>{var S;const L=null===(S=I.target)||void 0===S?void 0:S.result;null!=L?(null!=L.value&&null!=L.key&&(N.delete(L.key).onsuccess=()=>{x.push(L.value)}),"function"==typeof L.continue&&L.continue()):x.length>0&&P(x)}})}clearData(){if(!this.isSupported())return!1;const C=[];for(const k in this.database.ss){const O=k;this.database.ss.hasOwnProperty(k)&&this.database.ss[O]!==this.database.ss.ae&&C.push(this.database.ss[O])}const P=this;return this.ad(function(k){const O=k.transaction(C,"readwrite");O.oncomplete=()=>k.close();for(let E=0;E<C.length;E++)O.objectStore(C[E]).clear().onerror=function(){P.dd.error("Could not clear "+this.source.name+" on indexedDB "+P.database.vd)};O.onerror=function(){P.dd.error("Could not clear object stores on indexedDB "+P.database.vd)}})}}return f.Yt={Qt:{vd:"AppboyServiceWorkerAsyncStorage",VERSION:6,ss:{La:"data",hr:"pushClicks",cu:"pushSubscribed",Dd:"fallbackDevice",ts:"cardUpdates",ae:"optOut",wr:"pendingData",jh:"sdkAuthenticationSignature"},ie:1}},f})()},52387:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});const y={init:function(A){void 0===A&&void 0!==y.zg||(y.zg=!!A),y.t||(y.t=!0)},destroy:function(){y.t=!1,y.zg=void 0,y.dd=void 0},setLogger:function(A){"function"==typeof A?(y.init(),y.dd=A):y.info("Ignoring setLogger call since logger is not a function")},toggleLogging:function(){y.init(),y.zg?(console.log("Disabling Braze logging"),y.zg=!1):(console.log("Enabled Braze logging"),y.zg=!0)},info:function(A){if(y.zg){const C="Braze: "+A;null!=y.dd?y.dd(C):console.log(C)}},warn:function(A){if(y.zg){const C="Braze SDK Warning: "+A+" (v5.2.0)";null!=y.dd?y.dd(C):console.warn(C)}},error:function(A){if(y.zg){const C="Braze SDK Error: "+A+" (v5.2.0)";null!=y.dd?y.dd(C):console.error(C)}}},f=y},57654:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>M});var y=v(6236),f=v(62992),A=v(41028),C=v(52387),P=v(72036),k=v(71221);class O{constructor(I){this.u=I,this.u=I}h(I,S){const L=new A.Z;if(I.p(),null==I.url||""===I.url)return C.Z.info("Card ".concat(I.id," has no url. Not logging click to Braze servers.")),L;if(S&&I.id&&this.u){const z=this.u.j(k.I.C.v)||{};z[I.id]=!0,this.u.k(k.I.C.v,z)}const D=this.D([I]);return null==D?L:f.Z.q(S?P.G.I:P.G.$,D)}B(I){const S=new A.Z;if(!I.N())return C.Z.info("Card ".concat(I.id," refused this dismissal. Ignoring analytics event.")),S;if(I.id&&this.u){const D=this.u.j(k.I.C.A)||{};D[I.id]=!0,this.u.k(k.I.C.A,D)}const L=this.D([I]);return null==L?S:f.Z.q(P.G.F,L)}G(I,S){const L=new A.Z(!0),D=[],j=[];let z={};this.u&&(z=S?this.u.j(k.I.C.H)||{}:this.u.j(k.I.C.J)||{});for(const X of I)X.K(),X instanceof y.Z?j.push(X):D.push(X),X.id&&(z[X.id]=!0);const Z=this.D(D),q=this.D(j);if(null==Z&&null==q)return L.L=!1,L;if(this.u&&this.u.k(S?k.I.C.H:k.I.C.J,z),null!=Z){const ae=f.Z.q(S?P.G.M:P.G.O,Z);L.P(ae)}if(null!=q&&S){const X=f.Z.q(P.G.R,q);L.P(X)}return L}D(I){let S,L=null;for(let D=0;D<I.length;D++)S=I[D].id,null!=S&&""!==S&&(L=L||{},L.ids=L.ids||[],L.ids.push(S));return L}}var E=v(27885);const N={t:!1,i:null,m:()=>(N.o(),N.i||(N.i=new O(E.ZP.l())),N.i),o:()=>{N.t||(E.ZP.g(N),N.t=!0)},destroy:()=>{N.i=null,N.t=!1}},M=N},59955:(Q,F,v)=>{"use strict";v.d(F,{CG:()=>D,Dj:()=>j,Ji:()=>N,Zw:()=>x,pq:()=>I,ql:()=>E,rW:()=>M,sv:()=>S});var y=v(69019),f=v(36859),A=v(15817),C=v(88131),P=v(25701);function E(z){return null!=z&&!!z.getAttribute("data-ab-had-top-impression")}function N(z){null!=z&&z.setAttribute("data-ab-had-top-impression","true")}function M(z){return null!=z&&!!z.getAttribute("data-ab-had-bottom-impression")}function x(z){null!=z&&z.setAttribute("data-ab-had-bottom-impression","true")}function I(z){if(null!=z){const Z=z.querySelectorAll(".ab-unread-indicator")[0];null!=Z&&(Z.className+=" read")}}function S(z){return z.getAttribute("data-ab-card-id")}function D(z,Z){const q=Z.querySelectorAll(".ab-image-area");let X,ae=0;q.length>0&&(ae=q[0].offsetWidth);for(const fe of z)if(X=fe.T,X&&fe.imageUrl&&"number"==typeof fe.aspectRatio){const Pe=ae/fe.aspectRatio;Pe&&(X.style.height="".concat(Pe,"px"))}}function j(z,Z,q){const X=document.createElement("div");X.className="ab-card ab-effect-card "+z._,z.id&&(X.setAttribute("data-ab-card-id",z.id),X.setAttribute("id",z.id)),X.setAttribute("role","article"),X.setAttribute("tabindex","0");let ae="",fe=!1;z.url&&""!==z.url&&(ae=z.url,fe=!0);const Pe=Ge=>(I(X),fe&&(Z(z),(0,A.S)(ae,q,Ge)),!1);if(z.pinned){const Ge=document.createElement("div");Ge.className="ab-pinned-indicator";const Ue=document.createElement("i");Ue.className="fa fa-star",Ge.appendChild(Ue),X.appendChild(Ge)}if(z.imageUrl&&""!==z.imageUrl){const Ge=document.createElement("div");Ge.className="ab-image-area";const Ue=document.createElement("img");if(Ue.setAttribute("src",z.imageUrl),Ue.onload=()=>{X.style.height="auto"},function L(z,Z){let q="";z.title||z.description||(q="Feed Image"),Z.setAttribute("alt",q)}(z,Ue),Ge.appendChild(Ue),X.className+=" with-image",fe&&!z.S){const st=document.createElement("a");st.setAttribute("href",ae),st.onclick=Pe,st.appendChild(Ge),X.appendChild(st)}else X.appendChild(Ge)}const Ae=document.createElement("div");if(Ae.className="ab-card-body",z.dismissible){z.logCardDismissal=()=>(0,C.K)(z);const Ge=(0,y.B)("Dismiss Card",void 0,z.dismissCard.bind(z));X.appendChild(Ge),(0,f.FZ)(Ae,f.mQ.U,Ue=>{X.className+=" ab-swiped-left",Ge.onclick(Ue)}),(0,f.FZ)(Ae,f.mQ.V,Ue=>{X.className+=" ab-swiped-right",Ge.onclick(Ue)})}let Ie="",De=!1;if(z.title&&""!==z.title&&(Ie=z.title,De=!0),De){const Ge=document.createElement("h1");if(Ge.className="ab-title",Ge.id=P.Z.W(),X.setAttribute("aria-labelledby",Ge.id),fe){const Ue=document.createElement("a");Ue.setAttribute("href",ae),Ue.onclick=Pe,Ue.appendChild(document.createTextNode(Ie)),Ge.appendChild(Ue)}else Ge.appendChild(document.createTextNode(Ie));Ae.appendChild(Ge)}const Te=document.createElement("div");if(Te.className=De?"ab-description":"ab-description ab-no-title",Te.id=P.Z.W(),X.setAttribute("aria-describedby",Te.id),z.description&&Te.appendChild(document.createTextNode(z.description)),fe){const Ge=document.createElement("div");Ge.className="ab-url-area";const Ue=document.createElement("a");Ue.setAttribute("href",ae),z.linkText&&Ue.appendChild(document.createTextNode(z.linkText)),Ue.onclick=Pe,Ge.appendChild(Ue),Te.appendChild(Ge)}Ae.appendChild(Te),X.appendChild(Ae);const xe=document.createElement("div");return xe.className="ab-unread-indicator",z.viewed&&(xe.className+=" read"),X.appendChild(xe),z.T=X,X}},83094:(Q,F,v)=>{"use strict";v.d(F,{d:()=>k});var y=v(35066),f=v(57654),A=v(85016),C=v(27885),P=v(52387);function k(O,E){return!!C.ZP.X()&&(O instanceof y.Z?f.Z.m().h(O,E).L:(P.Z.error("card "+A.U4),!1))}},88131:(Q,F,v)=>{"use strict";v.d(F,{K:()=>k});var y=v(35066),f=v(57654),A=v(85016),C=v(27885),P=v(52387);function k(O){return!!C.ZP.X()&&(O instanceof y.Z?f.Z.m().B(O).L:(P.Z.error("card "+A.U4),!1))}},59381:(Q,F,v)=>{"use strict";v.d(F,{p:()=>O});var y=v(35066),f=v(57654),A=v(27885),C=v(47799),P=v(85016),k=v(52387);function O(E,N){if(!A.ZP.X())return!1;if(!(0,C.kJ)(E))return k.Z.error("cards must be an array"),!1;for(const M of E)if(!(M instanceof y.Z))return k.Z.error("Each card in cards ".concat(P.U4)),!1;return f.Z.m().G(E,N).L}},78060:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(35066);class f extends y.Z{constructor(C,P,k,O,E,N,M,x,I,S,L,D,j,z,Z,q){super(C,P,k,O,E,N,M,x,I,S,L,D,j,z,Z,q),this._="ab-captioned-image",this.S=!0,this.test=!1}Y(){const C={};return C[y.Z.tt.Z]=y.Z.it.st,C[y.Z.tt.ht]=this.id,C[y.Z.tt.et]=this.viewed,C[y.Z.tt.rt]=this.title,C[y.Z.tt.ot]=this.imageUrl,C[y.Z.tt.ct]=this.description,C[y.Z.tt.nt]=this.updated,C[y.Z.tt.dt]=this.created,C[y.Z.tt.ut]=this.categories,C[y.Z.tt.lt]=this.expiresAt,C[y.Z.tt.URL]=this.url,C[y.Z.tt.ft]=this.linkText,C[y.Z.tt.xt]=this.aspectRatio,C[y.Z.tt.bt]=this.extras,C[y.Z.tt.gt]=this.pinned,C[y.Z.tt.jt]=this.dismissible,C[y.Z.tt.zt]=this.clicked,C[y.Z.tt.kt]=this.test,C}}},35066:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>P});var y=v(73345),f=v(85016),A=v(94939),C=v(52387);class P{constructor(O,E,N,M,x,I,S,L,D,j,z,Z,q,X,ae,fe){this.id=O,this.viewed=E,this.title=N,this.imageUrl=M,this.description=x,this.created=I,this.updated=S,this.categories=L,this.expiresAt=D,this.url=j,this.linkText=z,this.aspectRatio=Z,this.extras=q,this.pinned=X,this.dismissible=ae,this.clicked=fe,this.id=O,this.viewed=E||!1,this.title=N||"",this.imageUrl=M,this.description=x||"",this.created=I||null,this.updated=S||null,this.categories=L||[],this.expiresAt=D||null,this.url=j,this.linkText=z,null==Z?this.aspectRatio=null:(Z=parseFloat(Z.toString()),this.aspectRatio=isNaN(Z)?null:Z),this.extras=q||{},this.pinned=X||!1,this.dismissible=ae||!1,this.dismissed=!1,this.clicked=fe||!1,this.isControl=!1,this.test=!1,this.Et=null,this.Tt=null}subscribeToClickedEvent(O){return this.Nt().It(O)}subscribeToDismissedEvent(O){return this.St().It(O)}removeSubscription(O){this.Nt().removeSubscription(O),this.St().removeSubscription(O)}removeAllSubscriptions(){this.Nt().removeAllSubscriptions(),this.St().removeAllSubscriptions()}dismissCard(){if(!this.dismissible||this.dismissed)return;"function"==typeof this.logCardDismissal&&this.logCardDismissal();let O=this.T;!O&&this.id&&(O=document.getElementById(this.id)),O&&(O.style.height=O.offsetHeight+"px",O.className=O.className+" ab-hide",setTimeout(function(){O&&O.parentNode&&(O.style.height="0",O.style.margin="0",setTimeout(function(){O&&O.parentNode&&O.parentNode.removeChild(O)},P.At))},f.rF))}Nt(){return null==this.Et&&(this.Et=new A.Z),this.Et}St(){return null==this.Tt&&(this.Tt=new A.Z),this.Tt}K(){this.viewed=!0}p(){this.viewed=!0,this.clicked=!0,this.Nt().Dt()}N(){return!(!this.dismissible||this.dismissed||(this.dismissed=!0,this.St().Dt(),0))}Ct(O){if(null==O||O[P.Rt.ht]!==this.id)return!0;if(O[P.Rt.Lt])return!1;if(null!=O[P.Rt.nt]&&null!=this.updated&&parseInt(O[P.Rt.nt])<(0,y.FX)(this.updated.valueOf()))return!0;if(O[P.Rt.et]&&!this.viewed&&(this.viewed=!0),O[P.Rt.zt]&&!this.clicked&&(this.clicked=O[P.Rt.zt]),null!=O[P.Rt.rt]&&(this.title=O[P.Rt.rt]),null!=O[P.Rt.ot]&&(this.imageUrl=O[P.Rt.ot]),null!=O[P.Rt.ct]&&(this.description=O[P.Rt.ct]),null!=O[P.Rt.nt]){const E=(0,y.X2)(O[P.Rt.nt]);null!=E&&(this.updated=E)}if(null!=O[P.Rt.lt]){let E;E=O[P.Rt.lt]===P._t?null:(0,y.X2)(O[P.Rt.lt]),this.expiresAt=E}if(null!=O[P.Rt.URL]&&(this.url=O[P.Rt.URL]),null!=O[P.Rt.ft]&&(this.linkText=O[P.Rt.ft]),null!=O[P.Rt.xt]){const E=parseFloat(O[P.Rt.xt].toString());this.aspectRatio=isNaN(E)?null:E}return null!=O[P.Rt.bt]&&(this.extras=O[P.Rt.bt]),null!=O[P.Rt.gt]&&(this.pinned=O[P.Rt.gt]),null!=O[P.Rt.jt]&&(this.dismissible=O[P.Rt.jt]),null!=O[P.Rt.kt]&&(this.test=O[P.Rt.kt]),!0}Y(){C.Z.error("Must be implemented in a subclass")}}P._t=-1,P.Rt={ht:"id",et:"v",jt:"db",Lt:"r",nt:"ca",gt:"p",lt:"ea",bt:"e",Z:"tp",ot:"i",rt:"tt",ct:"ds",URL:"u",ft:"dm",xt:"ar",zt:"cl",kt:"t"},P.it={st:"captioned_image",Ot:"text_announcement",Mt:"short_news",Pt:"banner_image",Ut:"control"},P.tt={ht:"id",et:"v",jt:"db",dt:"cr",nt:"ca",gt:"p",ut:"t",lt:"ea",bt:"e",Z:"tp",ot:"i",rt:"tt",ct:"ds",URL:"u",ft:"dm",xt:"ar",zt:"cl",kt:"s"},P.Gt={Xt:"ADVERTISING",vt:"ANNOUNCEMENTS",Vt:"NEWS",Wt:"SOCIAL"},P.At=400},27884:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(35066);class f extends y.Z{constructor(C,P,k,O,E,N,M,x,I,S,L,D,j,z,Z,q){super(C,P,k,O,E,N,M,x,I,S,L,D,j,z,Z,q),this._="ab-classic-card",this.S=!0}Y(){const C={};return C[y.Z.tt.Z]=y.Z.it.Mt,C[y.Z.tt.ht]=this.id,C[y.Z.tt.et]=this.viewed,C[y.Z.tt.rt]=this.title,C[y.Z.tt.ot]=this.imageUrl,C[y.Z.tt.ct]=this.description,C[y.Z.tt.nt]=this.updated,C[y.Z.tt.dt]=this.created,C[y.Z.tt.ut]=this.categories,C[y.Z.tt.lt]=this.expiresAt,C[y.Z.tt.URL]=this.url,C[y.Z.tt.ft]=this.linkText,C[y.Z.tt.xt]=this.aspectRatio,C[y.Z.tt.bt]=this.extras,C[y.Z.tt.gt]=this.pinned,C[y.Z.tt.jt]=this.dismissible,C[y.Z.tt.zt]=this.clicked,C[y.Z.tt.kt]=this.test,C}}},6236:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(35066);class f extends y.Z{constructor(C,P,k,O,E,N){super(C,P,null,null,null,null,k,null,O,null,null,null,E,N),this.isControl=!0,this._="ab-control-card",this.S=!1}Y(){const C={};return C[y.Z.tt.Z]=y.Z.it.Ut,C[y.Z.tt.ht]=this.id,C[y.Z.tt.et]=this.viewed,C[y.Z.tt.nt]=this.updated,C[y.Z.tt.lt]=this.expiresAt,C[y.Z.tt.bt]=this.extras,C[y.Z.tt.gt]=this.pinned,C[y.Z.tt.kt]=this.test,C}}},1677:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(35066);class f extends y.Z{constructor(C,P,k,O,E,N,M,x,I,S,L,D,j,z){super(C,P,null,k,null,O,E,N,M,x,I,S,L,D,j,z),this._="ab-image-only",this.S=!1,this.test=!1}Y(){const C={};return C[y.Z.tt.Z]=y.Z.it.Pt,C[y.Z.tt.ht]=this.id,C[y.Z.tt.et]=this.viewed,C[y.Z.tt.ot]=this.imageUrl,C[y.Z.tt.nt]=this.updated,C[y.Z.tt.dt]=this.created,C[y.Z.tt.ut]=this.categories,C[y.Z.tt.lt]=this.expiresAt,C[y.Z.tt.URL]=this.url,C[y.Z.tt.ft]=this.linkText,C[y.Z.tt.xt]=this.aspectRatio,C[y.Z.tt.bt]=this.extras,C[y.Z.tt.gt]=this.pinned,C[y.Z.tt.jt]=this.dismissible,C[y.Z.tt.zt]=this.clicked,C[y.Z.tt.kt]=this.test,C}}},16391:(Q,F,v)=>{"use strict";v.d(F,{D5:()=>M,rN:()=>x,xA:()=>N});var y=v(35066),f=v(27884),A=v(78060),C=v(1677),P=v(6236),k=v(73345),O=v(52387);function E(I,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge){let Ue;if(S===y.Z.it.Ot||S===y.Z.it.Mt)Ue=new f.Z(I,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe);else if(S===y.Z.it.st)Ue=new A.Z(I,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe);else if(S===y.Z.it.Pt)Ue=new C.Z(I,L,j,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe);else{if(S!==y.Z.it.Ut)return O.Z.error("Ignoring card with unknown type "+S),null;Ue=new P.Z(I,L,q,ae,Ie,De)}return Ge&&(Ue.test=Ge),Ue}function N(I){if(I[y.Z.Rt.Lt])return null;const S=I[y.Z.Rt.ht],L=I[y.Z.Rt.Z],D=I[y.Z.Rt.et],j=I[y.Z.Rt.rt],z=I[y.Z.Rt.ot],Z=I[y.Z.Rt.ct],q=(0,k.X2)(I[y.Z.Rt.nt]),X=q;let ae;return ae=I[y.Z.Rt.lt]===y.Z._t?null:(0,k.X2)(I[y.Z.Rt.lt]),E(S,L,D,j,z,Z,X,q,null,ae,I[y.Z.Rt.URL],I[y.Z.Rt.ft],I[y.Z.Rt.xt],I[y.Z.Rt.bt],I[y.Z.Rt.gt],I[y.Z.Rt.jt],I[y.Z.Rt.zt],I[y.Z.Rt.kt]||!1)}function M(I){return E(I.id,I.type,I.viewed,I.title,I.image,I.description,(0,k.X2)(I.created),(0,k.X2)(I.updated),I.categories,(0,k.X2)(I.expires_at),I.url,I.domain,I.aspect_ratio,I.extras,!1,!1)}function x(I){return E(I[y.Z.tt.ht],I[y.Z.tt.Z],I[y.Z.tt.et],I[y.Z.tt.rt],I[y.Z.tt.ot],I[y.Z.tt.ct],(0,k.Rd)(I[y.Z.tt.dt]),(0,k.Rd)(I[y.Z.tt.nt]),I[y.Z.tt.ut],(0,k.Rd)(I[y.Z.tt.lt]),I[y.Z.tt.URL],I[y.Z.tt.ft],I[y.Z.tt.xt],I[y.Z.tt.bt],I[y.Z.tt.gt],I[y.Z.tt.jt],I[y.Z.tt.zt],I[y.Z.tt.kt]||!1)||void 0}},10342:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{changeUser:()=>k});var y=v(27885),f=v(65752),A=v(52387),C=v(12060),P=v(48809);function k(O,E){if(!y.ZP.X())return;if(null==O||0===O.length||O!=O)return void A.Z.error("changeUser requires a non-empty userId.");if((0,f.E)(O)>C.Z.lr)return void A.Z.error('Rejected user id "'.concat(O,'" because it is longer than ').concat(C.Z.lr," bytes."));if(null!=E&&!(0,P.ro)(E,"set signature for new user","signature"))return;const N=y.ZP.cr();N&&N.changeUser(O.toString(),y.ZP.gr(),E)}},96814:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>y});const y={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"}},85504:(Q,F,v)=>{"use strict";v.d(F,{P:()=>f});var y=v(27885);function f(){if(y.ZP.X())return y.ZP.pr()}},15817:(Q,F,v)=>{"use strict";v.d(F,{S:()=>M,h:()=>x});var y=v(52387),f=v(85016),A=v(27885),C=v(53456),P=v(72565),k=v(34841),O=v(48809),E=v(62999),N=v(85504);function M(I,S,L){if(A.ZP.X())if(O.y9.test(I)){const D=(0,C.OL)(I);if(!D)return;const j=z=>{if(!(0,O.zR)(z))return void y.Z.error("Decoded Braze Action json is invalid: ".concat(JSON.stringify(z,null,2)));const X=C.A9.properties.eo,ae=z[C.A9.properties.type];if(ae===C.A9.types.ro){const fe=z[C.A9.properties.oo];for(const Pe of fe)j(Pe)}else{const fe=z[X];let Pe,Ae;switch(ae){case C.A9.types.logCustomEvent:Promise.resolve().then(v.bind(v,46974)).then(({logCustomEvent:Ie})=>{A.ZP.so()?(Ae=Array.prototype.slice.call(fe),Ie(...Ae)):y.Z.error(f.Go)});break;case C.A9.types.requestPushPermission:Promise.resolve().then(v.bind(v,82445)).then(({requestPushPermission:Ie})=>{A.ZP.so()?"Safari"===P.Z.browser&&P.Z.OS===k.T.io?window.navigator.standalone&&Ie():Ie():y.Z.error(f.Go)});break;case C.A9.types.setEmailNotificationSubscriptionType:case C.A9.types.setPushNotificationSubscriptionType:case C.A9.types.setCustomUserAttribute:case C.A9.types.addToSubscriptionGroup:case C.A9.types.removeFromSubscriptionGroup:case C.A9.types.addToCustomAttributeArray:case C.A9.types.removeFromCustomAttributeArray:Pe=(0,N.P)(),Pe&&Pe[ae](...Array.prototype.slice.call(fe));break;case C.A9.types.no:case C.A9.types.ao:Ae=Array.prototype.slice.call(fe),E.SD.openUri(...Ae);break;default:y.Z.info("Ignoring unknown Braze Action: ".concat(ae))}}};j(D)}else E.SD.openUri(I,S,L)}function x(I,S){M(I,S)}},46974:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{logCustomEvent:()=>N});var y=v(27885),f=v(62992),A=v(52387),C=v(72036),P=v(30122),k=v(53836),O=v(48809),E=v(85016);function N(M,x){if(!y.ZP.X())return!1;if(null==M||M.length<=0)return A.Z.error('logCustomEvent requires a non-empty eventName, got "'.concat(M,'". Ignoring event.')),!1;if(!(0,O.zM)(M,"log custom event","the event name"))return!1;const[I,S]=(0,O.lg)(x,E._P,"eventProperties",'log custom event "'.concat(M,'"'),"event");if(!I)return!1;const L=y.ZP.ir();if(L&&L.me(M))return A.Z.info('Custom Event "'.concat(M,'" is blocklisted, ignoring.')),!1;const D=f.Z.q(C.G.CustomEvent,{n:M,p:S});if(D.L){A.Z.info('Logged custom event "'.concat(M,'".'));for(const j of D.ge)k.n.rr().fe(P.Z.ue,[M,x],j)}return D.L}},20541:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{logPurchase:()=>N});var y=v(27885),f=v(85016),A=v(52387),C=v(72036),P=v(30122),k=v(53836),O=v(48809),E=v(62992);function N(M,x,I,S,L){if(!y.ZP.X())return!1;if(null==I&&(I="USD"),null==S&&(S=1),null==M||M.length<=0)return A.Z.error('logPurchase requires a non-empty productId, got "'.concat(M,'", ignoring.')),!1;if(!(0,O.zM)(M,"log purchase","the purchase name"))return!1;if(null==x||isNaN(parseFloat(x.toString())))return A.Z.error("logPurchase requires a numeric price, got ".concat(x,", ignoring.")),!1;const D=parseFloat(x.toString()).toFixed(2);if(null==S||isNaN(parseInt(S.toString())))return A.Z.error("logPurchase requires an integer quantity, got ".concat(S,", ignoring.")),!1;const j=parseInt(S.toString());if(j<1||j>f.Fz)return A.Z.error("logPurchase requires a quantity >1 and <".concat(f.Fz,", got ").concat(j,", ignoring.")),!1;if(I=null!=I?I.toUpperCase():I,-1===["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTC","BTN","BWP","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MTL","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMK","ZMW","ZWL"].indexOf(I))return A.Z.error("logPurchase requires a valid currencyCode, got ".concat(I,", ignoring.")),!1;const[z,Z]=(0,O.lg)(L,"logPurchase","purchaseProperties",'log purchase "'.concat(M,'"'),"purchase");if(!z)return!1;const q=y.ZP.ir();if(q&&q.Dr(M))return A.Z.info('Purchase "'.concat(M,'" is blocklisted, ignoring.')),!1;const X=E.Z.q(C.G.Pr,{pid:M,c:I,p:D,q:j,pr:Z});if(X.L){A.Z.info("Logged ".concat(j," purchase").concat(j>1?"s":"",' of "').concat(M,'" for ').concat(I," ").concat(D,"."));for(const ae of X.ge)k.n.rr().fe(P.Z.Rr,[M,L],ae)}return X.L}},29426:(Q,F,v)=>{"use strict";v.d(F,{A:()=>f});var y=v(27885);function f(A){y.ZP.X()&&y.ZP.removeSubscription(A)}},24352:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{requestImmediateDataFlush:()=>f});var y=v(27885);function f(A){if(!y.ZP.X())return;const C=y.ZP.cr();C&&C.requestImmediateDataFlush(A)}},64736:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(52387);class f{constructor(C,P=!1,k={},O){this.id=C,this.enabled=P,this.properties=k,this.trackingString=O,this.id=C,this.enabled=P,this.properties=k,this.trackingString=O}getStringProperty(C){const P=this.properties[C];return null==P?(this.Er(C),null):this.Ir(P)?P.value:(this.Nr("string"),null)}getNumberProperty(C){const P=this.properties[C];return null==P?(this.Er(C),null):this.Tr(P)?P.value:(this.Nr("number"),null)}getBooleanProperty(C){const P=this.properties[C];return null==P?(this.Er(C),null):this.Ar(P)?P.value:(this.Nr("boolean"),null)}Y(){const C={};return C[f.tt.ht]=this.id,C[f.tt.le]=this.enabled,C[f.tt.pe]=this.properties,C[f.tt.Fe]=this.trackingString,C}Nr(C){y.Z.info("Property is not of type ".concat(C,"."))}Er(C){y.Z.info("".concat(C," not found in feature flag properties."))}Ir(C){return"string"===C.type&&"string"==typeof C.value}Tr(C){return"number"===C.type&&"number"==typeof C.value}Ar(C){return"boolean"===C.type&&"boolean"==typeof C.value}}f.tt={ht:"id",le:"e",pe:"pr",Fe:"fts"},f.Rt={ht:"id",le:"enabled",pe:"properties",Fe:"fts"}},99990:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>L});var y=v(27885),f=v(52387),A=v(17156),C=v(71221),P=v(94939),k=v(32775),O=v(21494),E=v(64736);function N(D){if(D[E.Z.Rt.ht]&&"boolean"==typeof D[E.Z.Rt.le])return new E.Z(D[E.Z.Rt.ht],D[E.Z.Rt.le],D[E.Z.Rt.pe],D[E.Z.Rt.Fe]);f.Z.info("Unable to create feature flag from ".concat(JSON.stringify(D,null,2)))}function M(D){if(D[E.Z.tt.ht]&&"boolean"==typeof D[E.Z.tt.le])return new E.Z(D[E.Z.tt.ht],D[E.Z.tt.le],D[E.Z.tt.pe],D[E.Z.tt.Fe]);f.Z.info("Unable to deserialize feature flag from ".concat(JSON.stringify(D,null,2)))}var x=v(64038);class I extends A.Z{constructor(j,z,Z,q){super(),this.yt=j,this.qt=z,this.u=Z,this.di=q,this.mi=[],this.gi=0,this.yt=j,this.qt=z,this.u=Z,this.di=q,this.Fi=null,this.vi=new P.Z,this.pi=10,this.wi=null,this.ji=null,y.ZP.$t(this.vi)}Rs(j){var z;if(null!==(z=this.yt)&&void 0!==z&&z.yi()&&null!=j&&j.feature_flags){this.mi=[];for(const Z of j.feature_flags){const q=N(Z);q&&this.mi.push(q)}this.gi=(new Date).getTime(),this.bi(),this.vi.Dt(this.mi)}}Ci(){let j={};this.u&&(j=this.u.j(C.I.C.Ti));const z={};for(const Z in j){const q=M(j[Z]);q&&(z[q.id]=q)}return z}Di(){var j;return(null===(j=this.u)||void 0===j?void 0:j.j(C.I.C.Ii))||{}}Ri(j){this.u&&this.u.k(C.I.C.Ii,j)}ei(j){return this.vi.It(j)}refreshFeatureFlags(j,z,Z=!1,q=!0){const X=()=>{"function"==typeof z&&z(),this.vi.Dt(this.mi)};if(!this.Si(Z))return!this.Fi&&this.yt&&(this.Fi=this.yt.xi(()=>{this.refreshFeatureFlags(j,z)})),void X();if(q&&this.Ni(),!this.qt)return void X();const ae=this.qt.Ps({},!0),fe=this.qt._s(ae,x.Z.Gs.qi);let Pe=!1;this.qt.Hs(ae,()=>{this.qt?(x.Z.Os(this.u,x.Z.Gs.qi,(new Date).valueOf()),O.Z.Qs({url:"".concat(this.qt.Vs(),"/feature_flags/sync"),headers:fe,data:ae,L:Ae=>{if(!this.qt.Ws(ae,Ae,fe))return Pe=!0,void X();this.qt.Xs(),this.Rs(Ae),Pe=!1,x.Z.Ys(this.u,x.Z.Gs.qi,1),"function"==typeof j&&j()},error:Ae=>{this.qt.Zs(Ae,"retrieving feature flags"),Pe=!0,X()},ti:()=>{if(q&&Pe&&!this.ji){x.Z.si(this.u,x.Z.Gs.qi);let Ae=this.wi;(null==Ae||Ae<1e3*this.pi)&&(Ae=1e3*this.pi),this.$i(Math.min(3e5,(0,k.R)(1e3*this.pi,3*Ae)),j,z,Z)}}})):X()},x.Z.ii.qi)}Ni(){null!=this.ji&&(clearTimeout(this.ji),this.ji=null)}$i(j=1e3*this.pi,z,Z,q=!1){this.Ni(),this.ji=window.setTimeout(()=>{this.refreshFeatureFlags(z,Z,q)},j),this.wi=j}Si(j){if(!this.yt)return!1;if(!j){const z=this.yt.zi();if(null==z)return!1;let Z=!1;if(!isNaN(z)){if(-1===z)return f.Z.info("Feature flag refreshes not allowed"),!1;Z=(new Date).getTime()>=(this.gi||0)+1e3*z}if(!Z)return f.Z.info("Feature flag refreshes were rate limited to ".concat(z," seconds")),!1}return this.yt.yi()}Mi(){var j;return(null===(j=this.u)||void 0===j?void 0:j.j(C.I.C.Ui))||null}_i(){var j,z;null===(j=this.u)||void 0===j||j.k(C.I.C.Ui,null===(z=this.di)||void 0===z?void 0:z.ki())}Ai(){var j;const z=null===(j=this.di)||void 0===j?void 0:j.ki(),Z=this.Mi();return null==Z||z===Z}bi(){if(!this.u)return;const j={};for(const z of this.mi){const Z=z.Y();j[z.id]=Z}this.u.k(C.I.C.Ti,j),this.u.k(C.I.C.Bi,this.gi),this._i()}}const S={t:!1,provider:null,rr:()=>(S.o(),S.provider||(S.provider=new I(y.ZP.ir(),y.ZP.nr(),y.ZP.l(),y.ZP.zr()),y.ZP.ar(S.provider)),S.provider),o:()=>{S.t||(y.ZP.g(S),S.t=!0)},destroy:()=>{S.provider=null,S.t=!1}},L=S},85110:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{default:()=>P,refreshFeatureFlags:()=>C});var y=v(27885),f=v(99990);function A(k,O,E=!1){if(y.ZP.X())return f.Z.rr().refreshFeatureFlags(k,O,E)}function C(k,O){A(k,O)}const P=A},27243:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>M});var y=v(27885),f=v(17156),A=v(23911),C=v(16391),P=v(73345),k=v(71221),O=v(94939);class E extends f.Z{constructor(I,S){super(),this.u=I,this.Ei=S,this.cards=[],this.Gi=null,this.u=I,this.Ei=S,this.Jt=new O.Z,y.ZP.$t(this.Jt),this.Kt()}Kt(){let I=[];this.u&&(I=this.u.j(k.I.C.Hi)||[]);const S=[];for(let L=0;L<I.length;L++){const D=(0,C.rN)(I[L]);null!=D&&S.push(D)}this.cards=S,this.u&&(this.Gi=(0,P.Rd)(this.u.j(k.I.C.Ji)))}Ki(I){const S=[];let L=null,D={};this.u&&(D=this.u.j(k.I.C.J)||{});const j={};for(let z=0;z<I.length;z++){L=I[z];const Z=(0,C.D5)(L);if(null!=Z){const q=Z.id;q&&D[q]&&(Z.viewed=!0,j[q]=!0),S.push(Z)}}this.cards=S,this.js(),this.Gi=new Date,this.u&&(this.u.k(k.I.C.J,j),this.u.k(k.I.C.Ji,this.Gi))}js(){var I;const S=[];for(let L=0;L<this.cards.length;L++)S.push(this.cards[L].Y());null===(I=this.u)||void 0===I||I.k(k.I.C.Hi,S)}Rs(I){null!=I&&I.feed&&(this.Kt(),this.Ki(I.feed),this.Jt.Dt(new A.Z(this.cards.slice(),this.Gi)))}Li(){this.Kt();const I=[],S=new Date;for(let L=0;L<this.cards.length;L++){const D=this.cards[L].expiresAt;let j=!0;null!=D&&(j=D>=S),j&&I.push(this.cards[L])}return new A.Z(I,this.Gi)}Fs(){this.Ei&&this.Ei.requestFeedRefresh()}ei(I){return this.Jt.It(I)}clearData(I){null==I&&(I=!1),this.cards=[],this.Gi=null,I&&this.u&&(this.u.hi(k.I.C.Hi),this.u.hi(k.I.C.Ji)),this.Jt.Dt(new A.Z(this.cards.slice(),this.Gi))}}const N={t:!1,provider:null,rr:()=>(N.o(),N.provider||(N.provider=new E(y.ZP.l(),y.ZP.cr()),y.ZP.ar(N.provider)),N.provider),o:()=>{N.t||(y.ZP.g(N),N.t=!0)},destroy:()=>{N.provider=null,N.t=!1}},M=N},23911:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>P});var y=v(2134),f=v(59381),A=v(83094),C=v(94215);class P extends y.Z{constructor(O,E){super(O,E)}logCardImpressions(O){(0,f.p)(O,!1)}logCardClick(O){return(0,A.d)(O,!1)}sr(){(0,C.a)()}dr(){return!1}}},49904:(Q,F,v)=>{"use strict";v.d(F,{j:()=>A});var y=v(27885),f=v(72036);function A(){var C;if(y.ZP.X())return null===(C=y.ZP.nr())||void 0===C?void 0:C.qr(f.r.Br).L}},94215:(Q,F,v)=>{"use strict";v.d(F,{a:()=>A});var y=v(27885),f=v(27243);function A(){if(y.ZP.X())return f.Z.rr().Fs()}},50580:(Q,F,v)=>{"use strict";v.d(F,{n:()=>A});var y=v(27885),f=v(27243);function A(C){if(y.ZP.X())return f.Z.rr().ei(C)}},81814:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{showFeed:()=>x});var y=v(27885),f=v(98022),A=v(23911),C=v(50580),P=v(49904),k=v(27243),O=v(47799),E=v(59955),N=v(11406),M=v(52387);function x(I,S,L){if(!y.ZP.X())return;(0,N.B)();const D=(Pe,Ae)=>{if(null==Ae)return Pe;const Ie=[];for(let Te=0;Te<Ae.length;Te++)Ie.push(Ae[Te].toLowerCase());const De=[];for(let Te=0;Te<Pe.length;Te++){const xe=[],Ge=Pe[Te].categories||[];for(let Ue=0;Ue<Ge.length;Ue++)xe.push(Ge[Ue].toLowerCase());(0,O.jV)(xe,Ie).length>0&&De.push(Pe[Te])}return De},j=y.ZP.nn(y.JY.tn)||y.ZP.nn(y.JY.en)||!1;let z=!1;null==I&&(I=document.body,z=!0);let Z,q=!1;null==S?(Z=k.Z.rr().Li(),(0,f.Of)(Z,D(Z.cards,L),Z.lastUpdated,null,j),q=!0):Z=new A.Z(D(S,L),new Date);const X=(0,f.Yz)(Z,j,z);if(q){(null==Z.lastUpdated||(new Date).valueOf()-Z.lastUpdated.valueOf()>A.Z.ur)&&(M.Z.info("Cached feed was older than max TTL of ".concat(A.Z.ur," ms, requesting an update from the server.")),(0,f.cV)(Z,X));const Pe=(new Date).valueOf(),Ae=(0,C.n)(function(Ie){const De=X.querySelectorAll(".ab-refresh-button")[0];if(null!=De){let Te=500;Te-=(new Date).valueOf()-Pe;const xe=X.getAttribute(f.cP);if(xe){const Ge=parseInt(xe);isNaN(Ge)||(Te-=(new Date).valueOf()-Ge)}setTimeout(function(){De.className=De.className.replace(/fa-spin/g,"")},Math.max(Te,0))}(0,f.Of)(Z,D(Ie.cards,L),Ie.lastUpdated,X,j)});(0,f.GB)(Ae,X)}const ae=Pe=>{const Ae=Pe.querySelectorAll(".ab-feed");let Ie=null;for(let De=0;De<Ae.length;De++)Ae[De].parentNode===Pe&&(Ie=Ae[De]);null!=Ie?((0,f.tQ)(Ie),Ie.parentNode&&Ie.parentNode.replaceChild(X,Ie)):Pe.appendChild(X),setTimeout(function(){X.className=X.className.replace("ab-hide","ab-show")},0),z&&X.focus(),(0,P.j)(),(0,f.cz)(Z,X),Z&&(0,E.CG)(Z.cards,Pe)};var fe;null!=I?ae(I):window.onload=(fe=window.onload,function(){"function"==typeof fe&&fe(new Event("oldLoad")),ae(document.body)})}},11655:(Q,F,v)=>{"use strict";v.d(F,{V:()=>M,q:()=>N});var y=v(56650),f=v(2284),A=v(73891),C=v(38838),P=v(74211),k=v(67347),O=v(11116),E=v(52387);function N(x){if(!x)return null;if(x.is_control)return f.Z.fromJson(x);let I=x.type;null!=I&&(I=I.toUpperCase());const S=x.message,L=x.text_align_message,D=x.slide_from,j=x.extras,z=x.trigger_id,Z=x.click_action,q=x.uri,X=x.open_target,ae=x.message_close,fe=x.duration,Pe=x.icon,Ae=x.image_url,Ie=x.image_style,De=x.icon_color,Te=x.icon_bg_color,xe=x.bg_color,Ge=x.text_color,Ue=x.close_btn_color,st=x.header,It=x.text_align_header,xt=x.header_text_color,gt=x.frame_color,At=[];let ht=x.btns;null==ht&&(ht=[]);for(let Rr=0;Rr<ht.length;Rr++)At.push(P.Z.fromJson(ht[Rr]));const dt=x.crop_type,kt=x.orientation,St=x.animate_in,$i=x.animate_out;let Xr=x.html_id,wo=x.css;null!=Xr&&""!==Xr&&null!=wo&&""!==wo||(Xr=void 0,wo=void 0);const uc=x.message_extras;let gr;if(I===k.Z.it||I===y.Z.Ce.Je)gr=new k.Z(S,L,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge,Ue,St,$i,st,It,xt,gt,At,dt,Xr,wo,uc);else if(I===A.Z.it)gr=new A.Z(S,L,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge,Ue,St,$i,st,It,xt,gt,At,dt,kt,Xr,wo,uc);else if(I===O.Z.it)gr=new O.Z(S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,De,Te,xe,Ge,Ue,St,$i,Xr,wo,uc);else{if(I!==C.Z.it&&I!==y.Z.Ce.je&&I!==y.Z.Ce.Se)return void E.Z.error("Ignoring message with unknown type "+I);gr=new C.Z(S,j,z,ae,fe,St,$i,gt,Xr,wo,x.message_fields,uc),gr.trusted=x.trusted||!1}return gr.Ae=I,gr}function M(x){const I=[];for(const S of x)I.push(new P.Z(S.text,S.backgroundColor,S.textColor,S.borderColor,S.clickAction,S.uri,S.id));return I}},78097:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>Ie});var y=v(21494),f=v(27885),A=v(2284),C=v(38838),P=v(56650),k=v(74211),O=v(62992),E=v(11655),N=v(32775),M=v(41028),x=v(72036),I=v(52387),S=v(94939),L=v(1979),D=v(48809),j=v(53456),z=v(3671),Z=v(64038),q=v(71221),X=v(73891),ae=v(67347),fe=v(11116);class Pe{constructor(Te,xe,Ge,Ue){this.qt=Te,this.di=xe,this.u=Ge,this.wt=Ue,this.qt=Te,this.di=xe,this.u=Ge,this.wt=Ue,this._e=new S.Z,f.ZP.$t(this._e),this.Ne=1e3,this.Oe=6e4,this.Re=null}He(){return this._e}Ke(Te){return this._e.It(Te)}Qe(){return this.Re}Ue(Te){this.Re=Te}q(Te,xe,Ge,Ue){const st=new M.Z;let It;if(Te instanceof A.Z)It={trigger_ids:[Te.triggerId]};else{if(xe===x.G.Ve||Te instanceof C.Z&&xe===x.G.We){if(!Te.p(Ue))return I.Z.info("This in-app message has already received a click. Ignoring analytics event."),st}else if(xe===x.G.Xe&&!Te.K())return I.Z.info("This in-app message has already received an impression. Ignoring analytics event."),st;It=this.Ye(Te)}return null==It?st:(Te.messageExtras&&(It.message_extras=Te.messageExtras),null!=Ge&&(It.bid=Ge),O.Z.q(xe,It))}Ze(Te,xe){const Ge=new M.Z;if(!Te.p())return I.Z.info("This in-app message button has already received a click. Ignoring analytics event."),Ge;const Ue=this.Ye(xe);return null==Ue?Ge:Te.id===k.Z.Pi?(I.Z.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),Ge):(null!=Te.id&&(Ue.bid=Te.id),O.Z.q(x.G.We,Ue))}Oi(Te){const xe=Te.messageFields;return null!=xe&&xe.is_push_primer||!1}Qi(Te){if(!(Te instanceof P.Z))return;const xe=st=>{if(!st)return;const It=(0,j.OL)(st);return(0,j.je)(It)?(0,j.Tu)(j.yi.Vi,"In-App Message"):(0,j.zA)(It)&&!z.Z.Wi()?(0,j.Tu)(j.yi.Xi,"In-App Message"):void 0};if(this.Oi(Te)&&!z.Z.Wi())return"In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.";const Ge=Te.buttons||[];let Ue;for(const st of Ge)if(st.clickAction===P.Z.ClickAction.URI&&st.uri&&D.y9.test(st.uri)&&(Ue=xe(st.uri),Ue))return Ue;return Te.clickAction===P.Z.ClickAction.URI&&Te.uri&&D.y9.test(Te.uri)?xe(Te.uri):void 0}Yi(Te,xe,Ge,Ue){if(!this.qt)return;const st=this.qt.Zi(!1,!1),It=this.qt.Ps(st);It.template={trigger_id:Te.triggerId,trigger_event_type:xe},null!=Ge&&(It.template.data=Ge.Mr());const xt=this.qt._s(It,Z.Z.Gs._r);this.qt.Hs(It,()=>{this.qt&&(Z.Z.Os(this.u,Z.Z.Gs._r,(new Date).valueOf()),y.Z.Qs({url:"".concat(this.qt.Vs(),"/template/"),data:It,headers:xt,L:gt=>{if(Z.Z.Ys(this.u,Z.Z.Gs._r,1),!this.qt.Ws(It,gt,xt))return void("function"==typeof Te.Gr&&Te.Gr());if(this.qt.Xs(),null==gt||null==gt.templated_message)return;const At=gt.templated_message;if(At.type!==L.Z.Or.Cr)return;const ht=(0,E.q)(At.data);if(null==ht)return;const dt=this.Qi(ht);if(dt)return I.Z.error(dt),void("function"==typeof Te.Gr&&Te.Gr());"function"==typeof Te.Hr&&Te.Hr(ht)},error:gt=>{let At="getting user personalization for message ".concat(Te.triggerId);if((new Date).valueOf()-Te.Jr<Te.Kr){Z.Z.si(this.u,Z.Z.Gs._r);const ht=Math.min(Te.Kr,this.Oe),dt=this.Ne;null==Ue&&(Ue=dt);const kt=Math.min(ht,(0,N.R)(dt,3*Ue));At+=". Retrying in ".concat(kt," ms"),setTimeout(()=>{this.Yi(Te,xe,Ge,kt)},kt)}this.qt.Zs(gt,At)}}))},Z.Z.ii._r)}Ye(Te){if(null==Te.triggerId)return I.Z.info("The in-app message has no analytics id. Not logging event to Braze servers."),null;const xe={};return null!=Te.triggerId&&(xe.trigger_ids=[Te.triggerId]),xe}de(Te){return!!this.u&&!(!(Te&&Te instanceof P.Z&&Te.constructor!==P.Z)||Te instanceof A.Z)&&this.u.k(q.I.C.Lr,Te.Y())}Ge(){if(!this.u)return null;const Te=this.u.j(q.I.C.Lr);if(!Te)return null;let xe;switch(Te.type){case P.Z.Ce.Qr:xe=X.Z.Ur(Te);break;case P.Z.Ce.Vr:case P.Z.Ce.je:case P.Z.Ce.Se:xe=C.Z.Ur(Te);break;case P.Z.Ce.Wr:case P.Z.Ce.Je:xe=ae.Z.Ur(Te);break;case P.Z.Ce.Xr:xe=fe.Z.Ur(Te)}return xe&&this.Yr(),xe}Yr(){this.u&&this.u.hi(q.I.C.Lr)}}const Ae={i:null,t:!1,m:()=>(Ae.o(),Ae.i||(Ae.i=new Pe(f.ZP.nr(),f.ZP.zr(),f.ZP.l(),f.ZP.er())),Ae.i),o:()=>{Ae.t||(f.ZP.g(Ae),Ae.t=!0)},destroy:()=>{Ae.i=null,Ae.t=!1}},Ie=Ae},2284:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>y});class y{constructor(A,C){this.triggerId=A,this.messageExtras=C,this.triggerId=A,this.messageExtras=C,this.extras={},this.isControl=!0}static fromJson(A){return new y(A.trigger_id,A.message_extras)}}},73891:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>A});var y=v(11655),f=v(56650);class A extends f.Z{constructor(P,k,O,E,N,M,x,I,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge,Ue,st,It,xt){super(P,k,void 0,O,E,N,M,x,I=I||f.Z.DismissType.MANUAL,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge=Ge||f.Z.CropType.CENTER_CROP,Ue=Ue||f.Z.Orientation.PORTRAIT,st,It,xt),this.$e=f.Z.TextAlignment.CENTER}Y(){return super.Y(A.it)}static Ur(P){return new A(P[f.Z.tt.ea],P[f.Z.tt.ra],P[f.Z.tt.bt],P[f.Z.tt.sa],P[f.Z.tt.ta],P[f.Z.tt.URI],P[f.Z.tt.ia],P[f.Z.tt.aa],P[f.Z.tt.oa],P[f.Z.tt.pa],P[f.Z.tt.ot],P[f.Z.tt.ma],P[f.Z.tt.na],P[f.Z.tt.ua],P[f.Z.tt.ca],P[f.Z.tt.fa],P[f.Z.tt.da],P[f.Z.tt.la],P[f.Z.tt.ga],P[f.Z.tt.ja],P[f.Z.tt.xa],P[f.Z.tt.za],P[f.Z.tt.ha],(0,y.V)(P[f.Z.tt.va]),P[f.Z.tt.wa],P[f.Z.tt.ya],P[f.Z.tt.Sa],P[f.Z.tt.CSS],P[f.Z.tt.ba])}}A.it=f.Z.Ce.Qr},38838:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(56650);class f extends y.Z{constructor(C,P,k,O,E,N,M,x,I,S,L,D){super(C,void 0,void 0,P,k,void 0,void 0,void 0,O=O||y.Z.DismissType.MANUAL,E,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,N,M,void 0,void 0,void 0,x,void 0,void 0,void 0,I,S,D),this.messageFields=L,this.messageFields=L}do(){return!1}p(C){if(this.Ae===y.Z.Ce.Vr){if(this.vo)return!1;this.vo=!0}return this.Et.Dt(C),!0}Y(){const C=super.Y(f.it);return C[y.Z.tt.uo]=this.messageFields,C}static Ur(C){return new f(C[y.Z.tt.ea],C[y.Z.tt.bt],C[y.Z.tt.sa],C[y.Z.tt.aa],C[y.Z.tt.oa],C[y.Z.tt.la],C[y.Z.tt.ga],C[y.Z.tt.ha],C[y.Z.tt.Sa],C[y.Z.tt.CSS],C[y.Z.tt.uo],C[y.Z.tt.ba])}}f.it=y.Z.Ce.Vr},74211:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>A});var y=v(56650),f=v(94939);let A=(()=>{class C{constructor(k,O,E,N,M,x,I){this.text=k,this.backgroundColor=O,this.textColor=E,this.borderColor=N,this.clickAction=M,this.uri=x,this.id=I,this.text=k||"",this.backgroundColor=O||y.Z.th.sh,this.textColor=E||y.Z.th.ih,this.borderColor=N||this.backgroundColor,this.clickAction=M||y.Z.ClickAction.NONE,this.uri=x,null==I&&(I=C.Pi),this.id=I,this.vo=!1,this.Et=new f.Z}subscribeToClickedEvent(k){return this.Et.It(k)}removeSubscription(k){this.Et.removeSubscription(k)}removeAllSubscriptions(){this.Et.removeAllSubscriptions()}p(){return!this.vo&&(this.vo=!0,this.Et.Dt(),!0)}static fromJson(k){return new C(k.text,k.bg_color,k.text_color,k.border_color,k.click_action,k.uri,k.id)}}return C.Pi=-1,C})()},56650:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>O});var y=v(27885),f=v(72565),A=v(36859),C=v(72606),P=v(94939),k=v(93677);class O{constructor(N,M,x,I,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge,Ue,st,It,xt,gt,At,ht,dt,kt){this.message=N,this.messageAlignment=M,this.slideFrom=x,this.extras=I,this.triggerId=S,this.clickAction=L,this.uri=D,this.openTarget=j,this.dismissType=z,this.duration=Z,this.icon=q,this.imageUrl=X,this.imageStyle=ae,this.iconColor=fe,this.iconBackgroundColor=Pe,this.backgroundColor=Ae,this.textColor=Ie,this.closeButtonColor=De,this.animateIn=Te,this.animateOut=xe,this.header=Ge,this.headerAlignment=Ue,this.headerTextColor=st,this.frameColor=It,this.buttons=xt,this.cropType=gt,this.orientation=At,this.htmlId=ht,this.css=dt,this.messageExtras=kt,this.message=N,this.messageAlignment=M||O.TextAlignment.CENTER,this.duration=Z||5e3,this.slideFrom=x||O.SlideFrom.BOTTOM,this.extras=I||{},this.triggerId=S,this.clickAction=L||O.ClickAction.NONE,this.uri=D,this.openTarget=j||O.OpenTarget.NONE,this.dismissType=z||O.DismissType.AUTO_DISMISS,this.icon=q,this.imageUrl=X,this.imageStyle=ae||O.ImageStyle.TOP,this.iconColor=fe||O.th.ih,this.iconBackgroundColor=Pe||O.th.sh,this.backgroundColor=Ae||O.th.ih,this.textColor=Ie||O.th.hh,this.closeButtonColor=De||O.th.eh,this.animateIn=Te,null==this.animateIn&&(this.animateIn=!0),this.animateOut=xe,null==this.animateOut&&(this.animateOut=!0),this.header=Ge,this.headerAlignment=Ue||O.TextAlignment.CENTER,this.headerTextColor=st||O.th.hh,this.frameColor=It||O.th.Eh,this.buttons=xt||[],this.cropType=gt||O.CropType.FIT_CENTER,this.orientation=At,this.htmlId=ht,this.css=dt,this.isControl=!1,this.messageExtras=kt,this.nh=!1,this.Th=!1,this.vo=!1,this.oh=!1,this.Pe=null,this.we=null,this.Et=new P.Z,this.rh=new P.Z,this.$e=O.TextAlignment.CENTER}subscribeToClickedEvent(N){return this.Et.It(N)}subscribeToDismissedEvent(N){return this.rh.It(N)}removeSubscription(N){this.Et.removeSubscription(N),this.rh.removeSubscription(N)}removeAllSubscriptions(){this.Et.removeAllSubscriptions(),this.rh.removeAllSubscriptions()}closeMessage(){this.he(this.Pe)}xe(){return!0}do(){return this.xe()}ve(){return null!=this.htmlId&&this.htmlId.length>4}be(){return this.ve()&&null!=this.css&&this.css.length>0}ye(){if(this.ve()&&this.be())return this.htmlId+"-css"}K(){return!this.Th&&(this.Th=!0,!0)}mo(){return this.Th}p(N){return!this.vo&&(this.vo=!0,this.Et.Dt(),!0)}N(){return!this.oh&&(this.oh=!0,this.rh.Dt(),!0)}hide(N){if(N&&N.parentNode){let M=N.closest(".ab-iam-root");if(null==M&&(M=N),this.xe()&&null!=M.parentNode){const x=M.parentNode.classList;x&&x.contains(O.lh)&&x.remove(O.lh),document.body.removeEventListener("touchmove",O.uh)}M.className=M.className.replace(O.ah,O.Ih)}return this.animateOut||!1}he(N,M){if(null==N)return;let x;this.Pe=null,x=-1===N.className.indexOf("ab-in-app-message")?N.getElementsByClassName("ab-in-app-message")[0]:N;let I=!1;x&&(I=this.hide(x));const S=document.body;let L;null!=S&&(L=S.scrollTop);const D=()=>{if(N&&N.parentNode){let z=N.closest(".ab-iam-root");null==z&&(z=N),z.parentNode&&z.parentNode.removeChild(z)}const j=this.ye();if(null!=j){const z=document.getElementById(j);z&&z.parentNode&&z.parentNode.removeChild(z)}null!=S&&"Safari"===f.Z.browser&&(S.scrollTop=L),M?M():this.N()};I?setTimeout(D,O.Ah):D(),this.we&&this.we.focus()}Ie(){return document.createTextNode(this.message||"")}ze(N){let M="";this.message||this.header||!this.xe()||(M="Modal Image"),N.setAttribute("alt",M)}static uh(N){if(N.targetTouches&&N.targetTouches.length>1)return;const M=N.target;M&&M.classList&&M.classList.contains("ab-message-text")&&M.scrollHeight>M.clientHeight||document.querySelector(".".concat(O.lh))&&N.preventDefault()}Oh(N){const M=N.parentNode;this.xe()&&null!=M&&this.orientation!==O.Orientation.LANDSCAPE&&(null!=M.classList&&M.classList.add(O.lh),document.body.addEventListener("touchmove",O.uh,!!(0,A.QZ)()&&{passive:!1})),N.className+=" "+O.ah}static _h(N){if(N.keyCode===C.m.mh&&!y.ZP.nn(y.JY.Lh)&&document.querySelectorAll(".ab-modal-interactions").length>0){const M=document.getElementsByClassName("ab-html-message");let x=!1;for(const I of M){let S=null;(0,k.f)(I)&&I.contentWindow&&(S=I.contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0]),null!=S&&((0,A.$j)(S),x=!0)}if(!x){const I=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];null!=I&&(0,A.$j)(I)}}}Nh(){this.nh||y.ZP.nn(y.JY.Lh)||(document.addEventListener("keydown",O._h,!1),y.ZP.Sh(()=>{document.removeEventListener("keydown",O._h)}),this.nh=!0)}Y(N){const M={};return N&&(M[O.tt.ea]=this.message,M[O.tt.ra]=this.messageAlignment,M[O.tt.Rh]=this.slideFrom,M[O.tt.bt]=this.extras,M[O.tt.sa]=this.triggerId,M[O.tt.ta]=this.clickAction,M[O.tt.URI]=this.uri,M[O.tt.ia]=this.openTarget,M[O.tt.aa]=this.dismissType,M[O.tt.oa]=this.duration,M[O.tt.pa]=this.icon,M[O.tt.ot]=this.imageUrl,M[O.tt.ma]=this.imageStyle,M[O.tt.na]=this.iconColor,M[O.tt.ua]=this.iconBackgroundColor,M[O.tt.ca]=this.backgroundColor,M[O.tt.fa]=this.textColor,M[O.tt.da]=this.closeButtonColor,M[O.tt.la]=this.animateIn,M[O.tt.ga]=this.animateOut,M[O.tt.ja]=this.header,M[O.tt.xa]=this.headerAlignment,M[O.tt.za]=this.headerTextColor,M[O.tt.ha]=this.frameColor,M[O.tt.va]=this.buttons,M[O.tt.wa]=this.cropType,M[O.tt.ya]=this.orientation,M[O.tt.Sa]=this.htmlId,M[O.tt.CSS]=this.css,M[O.tt.Z]=N,M[O.tt.ba]=this.messageExtras),M}}O.th={hh:4281545523,ih:4294967295,sh:4278219733,Mh:4293914607,Dh:4283782485,Eh:3224580915,eh:4288387995},O.Me={Ch:"hd",ke:"ias",dh:"of",Uh:"do",bh:"umt",Ph:"tf",ph:"te"},O.SlideFrom={TOP:"TOP",BOTTOM:"BOTTOM"},O.ClickAction={NEWS_FEED:"NEWS_FEED",URI:"URI",NONE:"NONE"},O.DismissType={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},O.OpenTarget={NONE:"NONE",BLANK:"BLANK"},O.ImageStyle={TOP:"TOP",GRAPHIC:"GRAPHIC"},O.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},O.TextAlignment={START:"START",CENTER:"CENTER",END:"END"},O.CropType={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},O.Ce={Xr:"SLIDEUP",Wr:"MODAL",Je:"MODAL_STYLED",Qr:"FULL",Vr:"WEB_HTML",je:"HTML",Se:"HTML_FULL"},O.Ah=500,O.fh=200,O.ah="ab-show",O.Ih="ab-hide",O.lh="ab-pause-scrolling",O.tt={ea:"m",ra:"ma",Rh:"sf",bt:"e",sa:"ti",ta:"ca",URI:"u",ia:"oa",aa:"dt",oa:"d",pa:"i",ot:"iu",ma:"is",na:"ic",ua:"ibc",ca:"bc",fa:"tc",da:"cbc",la:"ai",ga:"ao",ja:"h",xa:"ha",za:"htc",ha:"fc",va:"b",wa:"ct",ya:"o",Sa:"hi",CSS:"css",Z:"type",uo:"messageFields",ba:"me"}},67347:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>A});var y=v(11655),f=v(56650);class A extends f.Z{constructor(P,k,O,E,N,M,x,I,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge,Ue,st,It){super(P,k,void 0,O,E,N,M,x,I=I||f.Z.DismissType.MANUAL,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De,Te,xe,Ge=Ge||f.Z.CropType.FIT_CENTER,void 0,Ue,st,It),this.$e=f.Z.TextAlignment.CENTER}Y(){return super.Y(A.it)}static Ur(P){return new A(P[f.Z.tt.ea],P[f.Z.tt.ra],P[f.Z.tt.bt],P[f.Z.tt.sa],P[f.Z.tt.ta],P[f.Z.tt.URI],P[f.Z.tt.ia],P[f.Z.tt.aa],P[f.Z.tt.oa],P[f.Z.tt.pa],P[f.Z.tt.ot],P[f.Z.tt.ma],P[f.Z.tt.na],P[f.Z.tt.ua],P[f.Z.tt.ca],P[f.Z.tt.fa],P[f.Z.tt.da],P[f.Z.tt.la],P[f.Z.tt.ga],P[f.Z.tt.ja],P[f.Z.tt.xa],P[f.Z.tt.za],P[f.Z.tt.ha],(0,y.V)(P[f.Z.tt.va]),P[f.Z.tt.wa],P[f.Z.tt.Sa],P[f.Z.tt.CSS],P[f.Z.tt.ba])}}A.it=f.Z.Ce.Wr},11116:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>A});var y=v(56650),f=v(36859);class A extends y.Z{constructor(P,k,O,E,N,M,x,I,S,L,D,j,z,Z,q,X,ae,fe,Pe,Ae,Ie,De){super(P,k=k||y.Z.TextAlignment.START,O,E,N,M,x,I,S,L,D,j,void 0,z,Z,q=q||y.Z.th.Mh,X=X||y.Z.th.Dh,ae,fe,Pe,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Ae,Ie,De),this.$e=y.Z.TextAlignment.START}xe(){return!1}Ie(){const P=document.createElement("span");return P.appendChild(document.createTextNode(this.message||"")),P}Oh(P){const k=P.getElementsByClassName("ab-in-app-message")[0];f.lP.co(k,!0,!0)||(this.slideFrom===y.Z.SlideFrom.TOP?k.style.top="0px":k.style.bottom="0px"),super.Oh(P)}Y(){return super.Y(A.it)}static Ur(P){return new A(P[y.Z.tt.ea],P[y.Z.tt.ra],P[y.Z.tt.Rh],P[y.Z.tt.bt],P[y.Z.tt.sa],P[y.Z.tt.ta],P[y.Z.tt.URI],P[y.Z.tt.ia],P[y.Z.tt.aa],P[y.Z.tt.oa],P[y.Z.tt.pa],P[y.Z.tt.ot],P[y.Z.tt.na],P[y.Z.tt.ua],P[y.Z.tt.ca],P[y.Z.tt.fa],P[y.Z.tt.da],P[y.Z.tt.la],P[y.Z.tt.ga],P[y.Z.tt.Sa],P[y.Z.tt.CSS],P[y.Z.tt.ba])}}A.it=y.Z.Ce.Xr},93677:(Q,F,v)=>{"use strict";v.d(F,{E:()=>f,f:()=>y});const y=A=>null!==A&&"IFRAME"===A.tagName;function f(A){var C;if("SCRIPT"===A.tagName)null===(C=A.parentNode)||void 0===C||C.replaceChild(function(P){const k=document.createElement("script");k.text=P.innerHTML;for(const O of P.attributes)k.setAttribute(O.name,O.value);return k}(A),A);else for(const P of A.childNodes)f(P);return A}},90802:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{default:()=>L});var y=v(27885),f=v(47799),A=v(77540),C=v(52387);var O=v(71221),E=v(12060),N=v(62999),M=v(3671),x=v(13658);let I=(()=>{class D{constructor(z,Z,q,X,ae,fe,Pe,Ae,Ie,De){this.sn=z,this.rn=Z,this.on=q,this.un=ae,this.an=fe,this.yt=Pe,this.cn=Ae,this.hn=Ie,this.u=De,this.sn=z,this.rn=Z,this.on=q,this.fn=X+"/safari/"+Z,this.un=ae||"/service-worker.js",this.an=fe,this.yt=Pe,this.cn=Ae||!1,this.hn=Ie||!1,this.u=De,this.ln=M.Z.dn(),this.pn=M.Z.bn()}mn(){return this.hn}yn(z,Z,q,X,ae){z.unsubscribe().then(fe=>{fe?this.vn(Z,q,X,ae):(C.Z.error("Failed to unsubscribe device from push."),"function"==typeof ae&&ae(!1))}).catch(fe=>{C.Z.error("Push unsubscription error: "+fe),"function"==typeof ae&&ae(!1)})}gn(z,Z,q){var X;const ae=(De=>{if("string"==typeof De)return De;if(0!==De.endpoint.indexOf("https://android.googleapis.com/gcm/send"))return De.endpoint;let Te=De.endpoint;const xe=De;return xe.wn&&-1===De.endpoint.indexOf(xe.wn)&&(Te=De.endpoint+"/"+xe.wn),Te})(z);let fe=null,Pe=null;const Ae=z;if(null!=Ae.getKey)try{const De=Array.from(new Uint8Array(Ae.getKey("p256dh"))),Te=Array.from(new Uint8Array(Ae.getKey("auth")));fe=btoa(String.fromCharCode.apply(null,De)),Pe=btoa(String.fromCharCode.apply(null,Te))}catch(De){C.Z.error((0,x.e)(De))}const Ie=(De=>{let Te;return De.options&&(Te=De.options.applicationServerKey)&&Te.byteLength&&Te.byteLength>0?btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(Te)))).replace(/\+/g,"-").replace(/\//g,"_"):null})(Ae);null===(X=this.sn)||void 0===X||X.kn(ae,Z,fe,Pe,Ie),ae&&"function"==typeof q&&q(ae,fe,Pe)}Pn(){var z;null===(z=this.sn)||void 0===z||z.Dn(!0)}Sn(z,Z){var q;null===(q=this.sn)||void 0===q||q.Dn(!1),C.Z.info(z),"function"==typeof Z&&Z(!1)}An(z,Z,q,X){var ae;if("default"===Z.permission)try{window.safari.pushNotification.requestPermission(this.fn,z,{api_key:this.rn,device_id:(null===(ae=this.on)||void 0===ae?void 0:ae.ce().id)||""},fe=>{"granted"===fe.permission&&this.sn&&this.sn.setPushNotificationSubscriptionType(E.Z.NotificationSubscriptionTypes.OPTED_IN),this.An(z,fe,q,X)})}catch(fe){this.Sn("Could not request permission for push: "+fe,X)}else"denied"===Z.permission?this.Sn("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",X):"granted"===Z.permission&&(C.Z.info("Device successfully subscribed to push."),this.gn(Z.deviceToken,new Date,q))}requestPermission(z,Z,q){const X=fe=>{switch(fe){case"granted":return void("function"==typeof z&&z());case"default":return void("function"==typeof Z&&Z());case"denied":return void("function"==typeof q&&q());default:C.Z.error("Received unexpected permission result "+fe)}};let ae=!1;if("default"!==window.Notification.permission)X(Notification.permission);else{const fe=window.Notification.requestPermission(Pe=>{ae&&X(Pe)});fe?fe.then(Pe=>{X(Pe)}):ae=!0}}vn(z,Z,q,X){const ae={userVisibleOnly:!0};null!=Z&&(ae.applicationServerKey=Z),z.pushManager.subscribe(ae).then(fe=>{C.Z.info("Device successfully subscribed to push."),this.gn(fe,new Date,q)}).catch(fe=>{M.Z.isPushBlocked()?(C.Z.info("Permission for push notifications was denied."),"function"==typeof X&&X(!1)):(C.Z.error("Push subscription failed: "+fe),"function"==typeof X&&X(!0))})}jn(){return this.cn?navigator.serviceWorker.getRegistration(this.un):navigator.serviceWorker.register(this.un).then(()=>navigator.serviceWorker.ready.then(z=>(z&&"function"==typeof z.update&&z.update().catch(Z=>{C.Z.info("ServiceWorker update failed: "+Z)}),z)))}xn(z){this.cn||(z.unregister(),C.Z.info("Service worker successfully unregistered."))}subscribe(z,Z){if(!M.Z.isPushSupported())return C.Z.info(D.Nn),void("function"==typeof Z&&Z(!1));if(this.ln){if(!this.cn&&null!=window.location){let Pe=this.un;-1===Pe.indexOf(window.location.host)&&(Pe=window.location.host+Pe),-1===Pe.indexOf(window.location.protocol)&&(Pe=window.location.protocol+"//"+Pe);const Ae=Pe.substr(0,Pe.lastIndexOf("/")+1);if(0!==N.SD.Un().indexOf(Ae))return C.Z.error("Cannot subscribe to push from a path higher than the service worker location (tried to subscribe from "+window.location.pathname+" but service worker is at "+Pe+")"),void("function"==typeof Z&&Z(!0))}if(M.Z.isPushBlocked())return void this.Sn("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",Z);if(this.yt&&!this.yt.Wn()&&0===this.yt.ni())return C.Z.info("Waiting for VAPID key from server config before subscribing to push."),void this.yt._n(()=>{this.subscribe(z,Z)});const q=()=>{C.Z.info("Permission for push notifications was denied."),"function"==typeof Z&&Z(!1)},X=()=>{let Pe="Permission for push notifications was ignored.";M.Z.isPushBlocked()&&(Pe+=" The browser has automatically blocked further permission requests for a period (probably 1 week)."),C.Z.info(Pe),"function"==typeof Z&&Z(!0)},ae=M.Z.isPushPermissionGranted();this.requestPermission(()=>{!ae&&this.sn&&this.sn.setPushNotificationSubscriptionType(E.Z.NotificationSubscriptionTypes.OPTED_IN),this.jn().then(Pe=>{if(null==Pe)return C.Z.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to false or ensure that your service worker is registered before calling registerPush."),void("function"==typeof Z&&Z(!0));Pe.pushManager.getSubscription().then(Ae=>{var Ie;let De=null;if(null!=(null===(Ie=this.yt)||void 0===Ie?void 0:Ie.Wn())&&(De=function(D){const j=(D+"=".repeat((4-D.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),z=atob(j),Z=new Uint8Array(z.length);for(let q=0;q<z.length;++q)Z[q]=z.charCodeAt(q);return Z}(this.yt.Wn())),Ae){let Te,xe=null,Ge=null;if(this.u&&(Te=this.u.j(O.I.C.In)),Te&&!(0,f.kJ)(Te)){let Ue;try{Ue=A.Z.qn(Te).Vn}catch(st){Ue=null}null==Ue||isNaN(Ue.getTime())||0===Ue.getTime()||(xe=Ue,Ge=new Date(xe),Ge.setMonth(xe.getMonth()+6))}null!=De&&Ae.options&&Ae.options.applicationServerKey&&Ae.options.applicationServerKey.byteLength&&Ae.options.applicationServerKey.byteLength>0&&!(0,f.Xy)(De,new Uint8Array(Ae.options.applicationServerKey))?(C.Z.info(Ae.options.applicationServerKey.byteLength>12?"Device was already subscribed to push using a different VAPID provider, creating new subscription.":"Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription."),this.yn(Ae,Pe,De,z,Z)):Ae.expirationTime&&new Date(Ae.expirationTime).valueOf()<=(new Date).valueOf()?(C.Z.info("Push subscription is expired, creating new subscription."),this.yn(Ae,Pe,De,z,Z)):Te&&(0,f.kJ)(Te)?this.yn(Ae,Pe,De,z,Z):null==Ge?(C.Z.info("No push subscription creation date found, creating new subscription."),this.yn(Ae,Pe,De,z,Z)):Ge.valueOf()<=(new Date).valueOf()?(C.Z.info("Push subscription older than 6 months, creating new subscription."),this.yn(Ae,Pe,De,z,Z)):(C.Z.info("Device already subscribed to push, sending existing subscription to backend."),this.gn(Ae,xe,z))}else this.vn(Pe,De,z,Z)}).catch(Ae=>{C.Z.error("Error checking current push subscriptions: "+Ae)})}).catch(Pe=>{C.Z.error("ServiceWorker registration failed: "+Pe)})},X,q)}else if(this.pn){if(null==this.an||""===this.an)return C.Z.error("You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari"),void("function"==typeof Z&&Z(!0));const q=window.safari.pushNotification.permission(this.an);this.An(this.an,q,z,Z)}}unsubscribe(z,Z){if(!M.Z.isPushSupported())return C.Z.info(D.Nn),void("function"==typeof Z&&Z());this.ln?navigator.serviceWorker.getRegistration().then(q=>{q?q.pushManager.getSubscription().then(X=>{X?(this.Pn(),X.unsubscribe().then(ae=>{ae?(C.Z.info("Device successfully unsubscribed from push."),"function"==typeof z&&z()):(C.Z.error("Failed to unsubscribe device from push."),"function"==typeof Z&&Z()),this.xn(q)}).catch(ae=>{C.Z.error("Push unsubscription error: "+ae),"function"==typeof Z&&Z()})):(C.Z.info("Device already unsubscribed from push."),"function"==typeof z&&z())}).catch(X=>{C.Z.error("Error unsubscribing from push: "+X),"function"==typeof Z&&Z()}):(C.Z.info("Device already unsubscribed from push."),"function"==typeof z&&z())}):this.pn&&(this.Pn(),C.Z.info("Device unsubscribed from push."),"function"==typeof z&&z())}}return D.Nn="Push notifications are not supported in this browser.",D})();const S={t:!1,i:null,m:()=>(S.o(),S.i||(S.i=new I(y.ZP.pr(),y.ZP.Ma(),y.ZP.te(),y.ZP.Vs(),y.ZP.nn(y.JY._a),y.ZP.nn(y.JY.ka),y.ZP.ir(),y.ZP.nn(y.JY.qa),y.ZP.nn(y.JY.Aa),y.ZP.l())),S.i),o:()=>{S.t||(y.ZP.g(S),S.t=!0)},destroy:()=>{S.i=null,S.t=!1}},L=S},82445:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{requestPushPermission:()=>A});var y=v(27885),f=v(90802);function A(C,P){if(y.ZP.X())return f.default.m().subscribe((k,O,E)=>{const N=y.ZP.cr();N&&N.requestImmediateDataFlush(),"function"==typeof C&&C(k,O,E)},P)}},85261:(Q,F,v)=>{"use strict";v.r(F),v.d(F,{unregisterPush:()=>A});var y=v(27885),f=v(90802);function A(C,P){if(y.ZP.X())return f.default.m().unsubscribe(C,P)}},3671:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});const y={dn:()=>"serviceWorker"in navigator&&typeof ServiceWorkerRegistration<"u"&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window,bn:()=>"safari"in window&&"pushNotification"in window.safari&&"function"==typeof window.safari.pushNotification.permission&&"function"==typeof window.safari.pushNotification.requestPermission,isPushSupported:()=>y.dn()||y.bn(),isPushBlocked:()=>{const A=y.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"denied"===window.Notification.permission,C=y.isPushSupported()&&(!("Notification"in window)||null==window.Notification);return A||C},isPushPermissionGranted:()=>y.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"granted"===window.Notification.permission,Wi:()=>!y.isPushBlocked()&&y.isPushSupported()&&!y.isPushPermissionGranted()},f=y},12060:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>O});var y=v(47799),f=v(52387),A=v(72036),C=v(48809),P=v(85016),k=v(73345);class O{constructor(N,M){this.wt=N,this.Ei=M,this.wt=N,this.Ei=M}getUserId(N){const M=this.wt.getUserId();if("function"!=typeof N)return M;f.Z.warn("The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)"),N(M)}addAlias(N,M){return!(0,C.ro)(N,"add alias","the alias",!1)||N.length<=0?(f.Z.error("addAlias requires a non-empty alias"),!1):!(0,C.ro)(M,"add alias","the label",!1)||M.length<=0?(f.Z.error("addAlias requires a non-empty label"),!1):this.Ei.Cn(N,M).L}setFirstName(N){return!!(0,C.ro)(N,"set first name","the firstName",!0)&&this.wt.nu("first_name",N)}setLastName(N){return!!(0,C.ro)(N,"set last name","the lastName",!0)&&this.wt.nu("last_name",N)}setEmail(N){return null===N||(0,C.vV)(N)?this.wt.nu("email",N):(f.Z.error('Cannot set email address - "'.concat(N,'" did not pass RFC-5322 validation.')),!1)}setGender(N){return"string"==typeof N&&(N=N.toLowerCase()),!(null!==N&&!(0,y.fk)(O.Genders,N,'Gender "'.concat(N,'" is not a valid gender.'),"User.Genders"))&&this.wt.nu("gender",N)}setDateOfBirth(N,M,x){return null===N&&null===M&&null===x?this.wt.nu("dob",null):(N=null!=N?parseInt(N.toString()):null,M=null!=M?parseInt(M.toString()):null,x=null!=x?parseInt(x.toString()):null,null==N||null==M||null==x||isNaN(N)||isNaN(M)||isNaN(x)||M>12||M<1||x>31||x<1?(f.Z.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):this.wt.nu("dob","".concat(N,"-").concat(M,"-").concat(x)))}setCountry(N){return!!(0,C.ro)(N,"set country","the country",!0)&&this.wt.nu("country",N)}setHomeCity(N){return!!(0,C.ro)(N,"set home city","the homeCity",!0)&&this.wt.nu("home_city",N)}setLanguage(N){return!!(0,C.ro)(N,"set language","the language",!0)&&this.wt.nu("language",N)}setEmailNotificationSubscriptionType(N){return!!(0,y.fk)(O.NotificationSubscriptionTypes,N,'Email notification setting "'.concat(N,'" is not a valid subscription type.'),"User.NotificationSubscriptionTypes")&&this.wt.nu("email_subscribe",N)}setPushNotificationSubscriptionType(N){return!!(0,y.fk)(O.NotificationSubscriptionTypes,N,'Push notification setting "'.concat(N,'" is not a valid subscription type.'),"User.NotificationSubscriptionTypes")&&this.wt.nu("push_subscribe",N)}setPhoneNumber(N){return!!(0,C.ro)(N,"set phone number","the phoneNumber",!0)&&(null===N||N.match(O.En)?this.wt.nu("phone",N):(f.Z.error('Cannot set phone number - "'.concat(N,'" did not pass validation.')),!1))}setLastKnownLocation(N,M,x,I,S){return null==N||null==M?(f.Z.error("Cannot set last-known location - latitude and longitude are required."),!1):(N=parseFloat(N.toString()),M=parseFloat(M.toString()),null!=x&&(x=parseFloat(x.toString())),null!=I&&(I=parseFloat(I.toString())),null!=S&&(S=parseFloat(S.toString())),isNaN(N)||isNaN(M)||null!=x&&isNaN(x)||null!=I&&isNaN(I)||null!=S&&isNaN(S)?(f.Z.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):N>90||N<-90||M>180||M<-180?(f.Z.error("Cannot set last-known location - latitude and longitude are bounded by \xb190 and \xb1180 respectively."),!1):null!=x&&x<0||null!=S&&S<0?(f.Z.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.Ei.setLastKnownLocation(this.wt.getUserId(),N,M,I,x,S).L)}setCustomUserAttribute(N,M,x){if(!(0,C.bj)(N))return!1;const I=S=>{const[L]=(0,C.lg)(S,P.db,"attribute value",'set custom user attribute "'.concat(N,'"'),"custom user attribute");return L};if((0,y.kJ)(M)){const[S,L]=(0,C.$g)(N,M);if(!S&&!L&&0!==M.length)return!1;if(S||0===M.length)return this.Ei.Fn(A.G.$n,N,M).L;for(const D of M)if(!I(D))return!1}else if((0,y.Kn)(M)){if(!I(M))return!1;if(x)return this.Ei.Fn(A.G.Bn,N,M).L}else if(void 0===M||!(0,C.UO)(M)||((0,y.J_)(M)&&(M=(0,k.BT)(M)),"string"==typeof M&&!(0,C.zM)(M,'set custom user attribute "'.concat(N,'"'),"the element in the given array")))return!1;return this.wt.setCustomUserAttribute(N,M)}addToCustomAttributeArray(N,M){return!!(0,C.zM)(N,"add to custom user attribute array","the given key")&&!(null!=M&&!(0,C.zM)(M,"add to custom user attribute array","the given value"))&&this.Ei.Fn(A.G.Ln,N,M).L}removeFromCustomAttributeArray(N,M){return!!(0,C.zM)(N,"remove from custom user attribute array","the given key")&&!(null!=M&&!(0,C.zM)(M,"remove from custom user attribute array","the given value"))&&this.Ei.Fn(A.G.Rn,N,M).L}incrementCustomUserAttribute(N,M){if(!(0,C.zM)(N,"increment custom user attribute","the given key"))return!1;null==M&&(M=1);const x=parseInt(M.toString());return isNaN(x)||x!==parseFloat(M.toString())?(f.Z.error('Cannot increment custom user attribute because the given incrementValue "'.concat(M,'" is not an integer.')),!1):this.Ei.Fn(A.G.On,N,x).L}setCustomLocationAttribute(N,M,x){return!!(0,C.zM)(N,"set custom location attribute","the given key")&&((null!==M||null!==x)&&(M=null!=M?parseFloat(M.toString()):null,x=null!=x?parseFloat(x.toString()):null,null==M&&null!=x||null!=M&&null==x||null!=M&&(isNaN(M)||M>90||M<-90)||null!=x&&(isNaN(x)||x>180||x<-180))?(f.Z.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by \xb190 and \xb1180 respectively, or must both be null for removal."),!1):this.Ei.Gn(N,M,x).L)}addToSubscriptionGroup(N){return!(0,C.ro)(N,"add user to subscription group","subscription group ID",!1)||N.length<=0?(f.Z.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ei.Hn(N,O.Kn.SUBSCRIBED).L}removeFromSubscriptionGroup(N){return!(0,C.ro)(N,"remove user from subscription group","subscription group ID",!1)||N.length<=0?(f.Z.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ei.Hn(N,O.Kn.UNSUBSCRIBED).L}kn(N,M,x,I,S){this.wt.kn(N,M,x,I,S),this.Ei.Mn()}Dn(N){this.wt.Dn(N)}}O.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},O.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},O.En=/^[0-9 .\\(\\)\\+\\-]+$/,O.Kn={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},O.Yn="user_id",O.lu="custom",O.lr=997},2134:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>C});var y=v(52387),f=v(6236);class C{constructor(k,O){this.cards=k,this.lastUpdated=O,this.cards=k,this.lastUpdated=O}getUnreadCardCount(){let k=0;for(const O of this.cards)O.viewed||O instanceof f.Z||k++;return k}dr(){y.Z.error("Must be implemented in a subclass")}logCardImpressions(k){y.Z.error("Must be implemented in a subclass")}logCardClick(k){y.Z.error("Must be implemented in a subclass")}sr(){y.Z.error("Must be implemented in a subclass")}}C.ur=6e4,C.Ah=500,C.Co=1e4},17156:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>y});class y{constructor(){}Rs(A){}changeUser(A=!1){}clearData(A=!1){}}},85016:(Q,F,v)=>{"use strict";v.d(F,{De:()=>f,Fz:()=>y,Go:()=>O,JG:()=>N,O4:()=>E,S6:()=>L,Tt:()=>S,U4:()=>A,Up:()=>M,Y$:()=>x,_P:()=>P,dH:()=>I,db:()=>k,rF:()=>C});const y=100,f="inAppMessage must be an InAppMessage object",A="must be a Card object",C=500,P="logCustomEvent",k="setCustomUserAttribute",O="Braze must be initialized before calling methods.",E=5,N=90,M=30,x=30,I=72e5,S=3,L=1},62992:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>k});var y=v(52387),f=v(27885),A=v(30012),C=v(41028);const k={q:(O,E,N)=>{var M,x;const I=new C.Z,S=f.ZP.zr();if(!S)return y.Z.info('Not logging event with type "'.concat(O,'" because the current session ID could not be found.')),I;const L=S.xo();return I.ge.push(new A.Z(N||(null===(M=f.ZP.er())||void 0===M?void 0:M.getUserId()),O,(new Date).valueOf(),L,E)),I.L=(null===(x=f.ZP.l())||void 0===x?void 0:x.zo(I.ge))||!1,I}}},98022:(Q,F,v)=>{"use strict";v.d(F,{cP:()=>q,tQ:()=>Pe,cz:()=>Ie,Yz:()=>Te,cV:()=>De,GB:()=>Ge,Of:()=>xe});var y=v(2134),f=v(59955),A=v(36859),C=v(6236),P=v(35066),k=v(47799),O=v(72606),E=v(27885),N=v(72565),M=v(52387);const x={en:{NO_CARDS_MESSAGE:"We have no updates for you at this time.<br/>Please check again later.",FEED_TIMEOUT_MESSAGE:"Sorry, this refresh timed out.<br/>Please try again later."},ar:{NO_CARDS_MESSAGE:"\u0644\u064a\u0633 \u0644\u062f\u064a\u0646\u0627 \u0623\u064a \u062a\u062d\u062f\u064a\u062b. \u064a\u0631\u062c\u0649 \u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649 \u0644\u0627\u062d\u0642\u0627\u064b",FEED_TIMEOUT_MESSAGE:"\u064a\u0631\u062c\u0649 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629 \u0644\u0627\u062d\u0642\u0627"},cs:{NO_CARDS_MESSAGE:"V tuto chv\xedli pro v\xe1s nem\xe1me \u017e\xe1dn\xe9 aktualizace.<br/>Zkontrolujte pros\xedm znovu pozd\u011bji.",FEED_TIMEOUT_MESSAGE:"Pros\xedm zkuste to znovu pozd\u011bji."},da:{NO_CARDS_MESSAGE:"Vi har ingen updates.<br/>Pr\xf8v venligst senere.",FEED_TIMEOUT_MESSAGE:"Pr\xf8v venligst senere."},de:{NO_CARDS_MESSAGE:"Derzeit sind keine Updates verf\xfcgbar.<br/>Bitte sp\xe4ter noch einmal versuchen.",FEED_TIMEOUT_MESSAGE:"Bitte sp\xe4ter noch einmal versuchen."},es:{NO_CARDS_MESSAGE:"No tenemos actualizaciones.<br/>Por favor compru\xe9belo m\xe1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor int\xe9ntelo m\xe1s tarde."},"es-mx":{NO_CARDS_MESSAGE:"No tenemos ninguna actualizaci\xf3n.<br/>Vuelva a verificar m\xe1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, vuelva a intentarlo m\xe1s tarde."},et:{NO_CARDS_MESSAGE:"Uuendusi pole praegu saadaval.<br/>Proovige hiljem uuesti.",FEED_TIMEOUT_MESSAGE:"Palun proovige hiljem uuesti."},fi:{NO_CARDS_MESSAGE:"P\xe4ivityksi\xe4 ei ole saatavilla.<br/>Tarkista my\xf6hemmin uudelleen.",FEED_TIMEOUT_MESSAGE:"Yrit\xe4 my\xf6hemmin uudelleen."},fr:{NO_CARDS_MESSAGE:"Aucune mise \xe0 jour disponible.<br/>Veuillez v\xe9rifier ult\xe9rieurement.",FEED_TIMEOUT_MESSAGE:"Veuillez r\xe9essayer ult\xe9rieurement."},he:{NO_CARDS_MESSAGE:".\u05d0\u05d9\u05df \u05dc\u05e0\u05d5 \u05e2\u05d3\u05db\u05d5\u05e0\u05d9\u05dd. \u05d1\u05d1\u05e7\u05e9\u05d4 \u05d1\u05d3\u05d5\u05e7 \u05e9\u05d5\u05d1 \u05d1\u05e7\u05e8\u05d5\u05d1",FEED_TIMEOUT_MESSAGE:".\u05d1\u05d1\u05e7\u05e9\u05d4 \u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1 \u05d1\u05e7\u05e8\u05d5\u05d1"},hi:{NO_CARDS_MESSAGE:"\u0939\u092e\u093e\u0930\u0947 \u092a\u093e\u0938 \u0915\u094b\u0908 \u0905\u092a\u0921\u0947\u091f \u0928\u0939\u0940\u0902 \u0939\u0948\u0902\u0964 \u0915\u0943\u092a\u092f\u093e \u092c\u093e\u0926 \u092e\u0947\u0902 \u092b\u093f\u0930 \u0938\u0947 \u091c\u093e\u0901\u091a \u0915\u0930\u0947\u0902.\u0964",FEED_TIMEOUT_MESSAGE:"\u0915\u0943\u092a\u092f\u093e \u092c\u093e\u0926 \u092e\u0947\u0902 \u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947\u0902\u0964."},id:{NO_CARDS_MESSAGE:"Kami tidak memiliki pembaruan. Coba lagi nanti.",FEED_TIMEOUT_MESSAGE:"Coba lagi nanti."},it:{NO_CARDS_MESSAGE:"Non ci sono aggiornamenti.<br/>Ricontrollare pi\xf9 tardi.",FEED_TIMEOUT_MESSAGE:"Riprovare pi\xf9 tardi."},ja:{NO_CARDS_MESSAGE:"\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br/>\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",FEED_TIMEOUT_MESSAGE:"\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002"},ko:{NO_CARDS_MESSAGE:"\uc5c5\ub370\uc774\ud2b8\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc5d0 \ub2e4\uc2dc \ud655\uc778\ud574 \uc8fc\uc2ed\uc2dc\uc624.",FEED_TIMEOUT_MESSAGE:"\ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc2ed\uc2dc\uc624."},ms:{NO_CARDS_MESSAGE:"Tiada kemas kini. Sila periksa kemudian.",FEED_TIMEOUT_MESSAGE:"Sila cuba kemudian."},nl:{NO_CARDS_MESSAGE:"Er zijn geen updates.<br/>Probeer het later opnieuw.",FEED_TIMEOUT_MESSAGE:"Probeer het later opnieuw."},no:{NO_CARDS_MESSAGE:"Vi har ingen oppdateringer.<br/>Vennligst sjekk igjen senere.",FEED_TIMEOUT_MESSAGE:"Vennligst pr\xf8v igjen senere."},pl:{NO_CARDS_MESSAGE:"Brak aktualizacji.<br/>Prosz\u0119 sprawdzi\u0107 ponownie p\xf3\u017aniej.",FEED_TIMEOUT_MESSAGE:"Prosz\u0119 spr\xf3bowa\u0107 ponownie p\xf3\u017aniej."},pt:{NO_CARDS_MESSAGE:"N\xe3o temos atualiza\xe7\xf5es.<br/>Por favor, verifique mais tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, tente mais tarde."},"pt-br":{NO_CARDS_MESSAGE:"N\xe3o temos nenhuma atualiza\xe7\xe3o.<br/>Verifique novamente mais tarde.",FEED_TIMEOUT_MESSAGE:"Tente novamente mais tarde."},ru:{NO_CARDS_MESSAGE:"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b.<br/>\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0437\u0436\u0435.",FEED_TIMEOUT_MESSAGE:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043f\u043e\u0437\u0436\u0435."},sv:{NO_CARDS_MESSAGE:"Det finns inga uppdateringar.<br/>F\xf6rs\xf6k igen senare.",FEED_TIMEOUT_MESSAGE:"F\xf6rs\xf6k igen senare."},th:{NO_CARDS_MESSAGE:"\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e15 \u0e01\u0e23\u0e38\u0e13\u0e32\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e20\u0e32\u0e22\u0e2b\u0e25\u0e31\u0e07.",FEED_TIMEOUT_MESSAGE:"\u0e01\u0e23\u0e38\u0e13\u0e32\u0e25\u0e2d\u0e07\u0e43\u0e2b\u0e21\u0e48\u0e20\u0e32\u0e22\u0e2b\u0e25\u0e31\u0e07."},uk:{NO_CARDS_MESSAGE:"\u041e\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0456.<br/>\u043b\u0430\u0441\u043a\u0430, \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u0437\u043d\u043e\u0432\u0443 \u043f\u0456\u0437\u043d\u0456\u0448\u0435.",FEED_TIMEOUT_MESSAGE:"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0441\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0449\u0435 \u0440\u0430\u0437 \u043f\u0456\u0437\u043d\u0456\u0448\u0435."},vi:{NO_CARDS_MESSAGE:"Ch\xfang t\xf4i kh\xf4ng c\xf3 c\u1eadp nh\u1eadt n\xe0o.<br/>Vui l\xf2ng ki\u1ec3m tra l\u1ea1i sau.",FEED_TIMEOUT_MESSAGE:"Vui l\xf2ng th\u1eed l\u1ea1i sau."},"zh-hk":{NO_CARDS_MESSAGE:"\u66ab\u6642\u6c92\u6709\u66f4\u65b0.<br/>\u8acb\u7a0d\u5019\u518d\u8a66.",FEED_TIMEOUT_MESSAGE:"\u8acb\u7a0d\u5019\u518d\u8a66."},"zh-hans":{NO_CARDS_MESSAGE:"\u6682\u65f6\u6ca1\u6709\u66f4\u65b0.<br/>\u8bf7\u7a0d\u540e\u518d\u8bd5.",FEED_TIMEOUT_MESSAGE:"\u8bf7\u7a0d\u5019\u518d\u8bd5."},"zh-hant":{NO_CARDS_MESSAGE:"\u66ab\u6642\u6c92\u6709\u66f4\u65b0.<br/>\u8acb\u7a0d\u5019\u518d\u8a66.",FEED_TIMEOUT_MESSAGE:"\u8acb\u7a0d\u5019\u518d\u8a66."},"zh-tw":{NO_CARDS_MESSAGE:"\u66ab\u6642\u6c92\u6709\u66f4\u65b0.<br/>\u8acb\u7a0d\u5019\u518d\u8a66.",FEED_TIMEOUT_MESSAGE:"\u8acb\u7a0d\u5019\u518d\u8a66."},zh:{NO_CARDS_MESSAGE:"\u6682\u65f6\u6ca1\u6709\u66f4\u65b0.<br/>\u8bf7\u7a0d\u540e\u518d\u8bd5.",FEED_TIMEOUT_MESSAGE:"\u8bf7\u7a0d\u5019\u518d\u8bd5."}};class I{constructor(st,It=!1){if(this.language=st,null!=st&&(st=st.toLowerCase()),null!=st&&null==x[st]){const xt=st.indexOf("-");xt>0&&(st=st.substring(0,xt))}if(null==x[st]){const xt="Braze does not yet have a localization for language "+st+", defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.";It?M.Z.error(xt):M.Z.info(xt),st="en"}this.language=st}get(st){return x[this.language][st]}}const S={t:!1,i:null,m:()=>{if(S.o(),!S.i){let Ue=N.Z.language,st=!1;E.ZP.nn(E.JY.zn)&&(Ue=E.ZP.nn(E.JY.zn),st=!0),S.i=new I(Ue,st)}return S.i},o:()=>{S.t||(E.ZP.g(S),S.t=!0)},destroy:()=>{S.i=null,S.t=!1}},L=S;var D=v(29426),j=v(25701),z=v(48809),Z=v(53456);const q="data-last-requested-refresh",fe={};function Pe(Ue){Ue&&(Ue.className=Ue.className.replace("ab-show","ab-hide"),setTimeout(()=>{Ue&&Ue.parentNode&&Ue.parentNode.removeChild(Ue)},y.Z.Ah));const st=Ue.getAttribute("data-update-subscription-id");null!=st&&(0,D.A)(st);const It=Ue.getAttribute("data-listener-id");null!=It&&(window.removeEventListener("scroll",fe[It]),delete fe[It])}function Ae(Ue,st){const It=document.createElement("div");if(It.className="ab-feed-body",It.setAttribute("aria-label","Feed"),It.setAttribute("role","feed"),null==Ue.lastUpdated){const xt=document.createElement("div");xt.className="ab-no-cards-message";const gt=document.createElement("i");gt.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner",xt.appendChild(gt),It.appendChild(xt)}else{let xt=!1;const gt=At=>Ue.logCardClick(At);for(const At of Ue.cards){const ht=At instanceof C.Z;!ht||Ue.dr()?(It.appendChild((0,f.Dj)(At,gt,st)),xt=xt||!ht):M.Z.error("Received a control card for a legacy news feed. Control cards are only supported with content cards.")}if(!xt){const At=document.createElement("div");At.className="ab-no-cards-message",At.innerHTML=L.m().get("NO_CARDS_MESSAGE")||"",At.setAttribute("role","article"),It.appendChild(At)}}return It}function Ie(Ue,st){if(null!=Ue&&null!=st){const It=[],xt=st.querySelectorAll(".ab-card");Ue.yo||(Ue.yo={});for(let gt=0;gt<xt.length;gt++){const At=(0,f.sv)(xt[gt]),ht=(0,A.rJ)(xt[gt]),dt=(0,A.Fr)(xt[gt]);if(Ue.yo[At]){ht||dt||(0,f.pq)(xt[gt]);continue}let kt=(0,f.ql)(xt[gt]),St=(0,f.rW)(xt[gt]);const $i=kt,Xr=St;if(!kt&&ht&&(kt=!0,(0,f.Ji)(xt[gt])),!St&&dt&&(St=!0,(0,f.Zw)(xt[gt])),kt&&St){if($i&&Xr)continue;for(const wo of Ue.cards)if(wo.id===At){Ue.yo[wo.id]=!0,It.push(wo);break}}}It.length>0&&Ue.logCardImpressions(It)}}function De(Ue,st){if(null==Ue||null==st)return;st.setAttribute("aria-busy","true");const It=st.querySelectorAll(".ab-refresh-button")[0];null!=It&&(It.className+=" fa-spin");const xt=(new Date).valueOf().toString();st.setAttribute("data-last-requested-refresh",xt),setTimeout(()=>{if(st.getAttribute("data-last-requested-refresh")===xt){const gt=st.querySelectorAll(".fa-spin");for(let ht=0;ht<gt.length;ht++)gt[ht].className=gt[ht].className.replace(/fa-spin/g,"");const At=st.querySelectorAll(".ab-initial-spinner")[0];if(null!=At){const ht=document.createElement("span");ht.innerHTML=L.m().get("FEED_TIMEOUT_MESSAGE")||"",null!=At.parentNode&&(At.parentNode.appendChild(ht),At.parentNode.removeChild(At))}"true"===st.getAttribute("aria-busy")&&st.setAttribute("aria-busy","false")}},y.Z.Co),Ue.sr()}function Te(Ue,st,It){const xt=document.createElement("div");xt.className="ab-feed ab-hide ab-effect-slide",xt.setAttribute("role","dialog"),xt.setAttribute("aria-label","Feed"),xt.setAttribute("tabindex","-1");const gt=document.createElement("div");gt.className="ab-feed-buttons-wrapper",gt.setAttribute("role","group"),xt.appendChild(gt);const At=document.createElement("i");At.className="fa fa-times ab-close-button",At.setAttribute("aria-label","Close Feed"),At.setAttribute("tabindex","0"),At.setAttribute("role","button");const ht=$i=>{Pe(xt),$i.stopPropagation()};At.addEventListener("keydown",$i=>{$i.keyCode!==O.m.Fo&&$i.keyCode!==O.m.To||ht($i)}),At.onclick=ht;const dt=document.createElement("i");dt.className="fa fa-refresh ab-refresh-button",Ue&&null==Ue.lastUpdated&&(dt.className+=" fa-spin"),dt.setAttribute("aria-label","Refresh Feed"),dt.setAttribute("tabindex","0"),dt.setAttribute("role","button");const kt=$i=>{De(Ue,xt),$i.stopPropagation()};dt.addEventListener("keydown",$i=>{$i.keyCode!==O.m.Fo&&$i.keyCode!==O.m.To||kt($i)}),dt.onclick=kt,gt.appendChild(dt),gt.appendChild(At),xt.appendChild(Ae(Ue,st));const St=()=>Ie(Ue,xt);if(xt.addEventListener("scroll",St),!It){window.addEventListener("scroll",St);const $i=j.Z.W();fe[$i]=St,xt.setAttribute("data-listener-id",$i)}return xt}function xe(Ue,st,It,xt,gt){if(!(0,k.kJ)(st))return;const At=[];for(const ht of st)if(ht instanceof P.Z){if(ht.url&&z.y9.test(ht.url)){const dt=(0,Z.OL)(ht.url);if((0,Z.je)(dt)){M.Z.error((0,Z.Tu)(Z.yi.Vi,"Content Card"));continue}}At.push(ht)}if(Ue.cards=At,Ue.lastUpdated=It,null!=xt)if(xt.setAttribute("aria-busy","false"),null==Ue.lastUpdated)Pe(xt);else{const ht=xt.querySelectorAll(".ab-feed-body")[0];if(null!=ht){const dt=Ae(Ue,gt);ht.parentNode&&ht.parentNode.replaceChild(dt,ht),Ie(Ue,dt.parentNode)}}}function Ge(Ue,st){Ue&&st.setAttribute("data-update-subscription-id",Ue)}},27885:(Q,F,v)=>{"use strict";v.d(F,{JY:()=>wo,ZP:()=>gr});var y=v(71221),f=v(94939),A=v(76775),C=v(52387);class P{constructor(Le,tt,_t){this.u=Le,this.Jn=tt,this.Qn=_t,this.u=Le,this.Jn=tt||!1,this.Qn=_t,this.Xn=new f.Z,this.Zn=0,this.gh=1}Fh(){return this.Jn}kh(){return this.u.j(y.I.C.wh)}setSdkAuthenticationSignature(Le){const tt=this.kh();this.u.k(y.I.C.wh,Le);const _t=A.Z.Yt.Qt;new A.Z(_t,C.Z).setItem(_t.ss.jh,this.gh,Le),tt!==Le&&this.Xs()}xh(){this.u.hi(y.I.C.wh);const Le=A.Z.Yt.Qt;new A.Z(Le,C.Z).re(Le.ss.jh,this.gh)}subscribeToSdkAuthenticationFailures(Le){return this.Qn.It(Le)}qh(Le){this.Qn.Dt(Le)}yh(){this.Xn.removeAllSubscriptions()}Bh(){this.Zn+=1}Gh(){return this.Zn}Xs(){this.Zn=0}}var k=v(17156),O=v(72565);class E{constructor(Le){this.id=Le,this.id=Le}Mr(){const Le={};return null!=this.browser&&(Le.browser=this.browser),null!=this.Ta&&(Le.browser_version=this.Ta),null!=this.os&&(Le.os_version=this.os),null!=this.resolution&&(Le.resolution=this.resolution),null!=this.language&&(Le.locale=this.language),null!=this.timeZone&&(Le.time_zone=this.timeZone),null!=this.userAgent&&(Le.user_agent=this.userAgent),Le}}var N=v(96814),M=v(84827),x=v(25701),I=v(47799),S=v(13658);class L{constructor(Le,tt){this.u=Le,this.Ia=tt,this.u=Le,null==tt&&(tt=(0,I.VO)(N.Z)),this.Ia=tt}ce(Le=!0){let tt=this.u.tu(y.I.iu.Uo);null==tt&&(tt=new M.Z(x.Z.W()),Le&&this.u.uu(y.I.iu.Uo,tt));const _t=new E(tt.eu);for(let ut=0;ut<this.Ia.length;ut++)switch(this.Ia[ut]){case N.Z.BROWSER:_t.browser=O.Z.browser;break;case N.Z.BROWSER_VERSION:_t.Ta=O.Z.version;break;case N.Z.OS:_t.os=this.Da();break;case N.Z.RESOLUTION:_t.Oa=screen.width+"x"+screen.height;break;case N.Z.LANGUAGE:_t.language=O.Z.language;break;case N.Z.TIME_ZONE:_t.timeZone=this.Ca(new Date);break;case N.Z.USER_AGENT:_t.userAgent=O.Z.userAgent}return _t}Da(){if(O.Z.Fa())return O.Z.Fa();const Le=this.u.j(y.I.C.Ga);return Le&&Le.os_version?Le.os_version:O.Z.Da()}Ca(Le){let tt=!1;if(typeof Intl<"u"&&"function"==typeof Intl.DateTimeFormat)try{if("function"==typeof Intl.DateTimeFormat().resolvedOptions){const ut=Intl.DateTimeFormat().resolvedOptions().timeZone;if(null!=ut&&""!==ut)return ut}}catch(ut){C.Z.info("Intl.DateTimeFormat threw an error, cannot detect user's time zone:"+(0,S.e)(ut)),tt=!0}if(tt)return"";const _t=Le.getTimezoneOffset();return this.Ja(_t)}Ja(Le){const tt=Math.trunc(Le/60),_t=Math.trunc(Le%60);let ut="GMT";return 0!==Le&&(ut+=Le<0?"+":"-",ut+=("00"+Math.abs(tt)).slice(-2)+":"+("00"+Math.abs(_t)).slice(-2)),ut}}var D=v(23810),j=v(30012),z=v(73345),Z=v(62992),q=v(72036),X=v(64038),ae=v(85016),fe=v(33786);class Pe{constructor(Le,tt,_t,ut,Wt,Bt,On,zt,zn,Gr,ua,gi){this.on=Le,this.u=tt,this.Go=_t,this.wt=ut,this.di=Wt,this.yt=Bt,this.rn=On,this.Ko=zt,this.Wo=zn,this.Vo=Gr,this.appVersion=ua,this.Xh=gi,this.Hh=si=>null==si?"":"".concat(si," "),this.on=Le,this.u=tt,this.Go=_t,this.wt=ut,this.di=Wt,this.yt=Bt,this.rn=On,this.Ko=zt,this.Wo=zn,this.Vo=Gr,this.appVersion=ua,this.Xh=gi,this.Yh=["npm"]}Ps(Le,tt=!1,_t=!1){const ut=this.on.ce(!_t),Wt=ut.Mr(),Bt=this.u.j(y.I.C.Ga);(0,I.Xy)(Bt,Wt)||(Le.device=Wt),Le.api_key=this.rn,Le.time=(0,z.FX)((new Date).valueOf(),!0);const On=this.u.j(y.I.C.Jh)||[],zt=this.u.j(y.I.C.Qh)||"";if(this.Yh.length>0&&(!(0,I.Xy)(On,this.Yh)||zt!==this.di.ki())&&(Le.sdk_metadata=this.Yh),Le.sdk_version=this.Wo,this.Vo&&(Le.sdk_flavor=this.Vo),Le.app_version=this.appVersion,Le.app_version_code=this.Xh,Le.device_id=ut.id,tt){const zn=this.wt.getUserId();null!=zn&&(Le.user_id=zn)}if(!Le.user_id&&!this.Go.Fh()){const zn=(0,fe.q)(this.u);zn&&(Le.alias=zn)}return Le}Ws(Le,tt,_t){const ut=tt.auth_error,Wt=tt.error;if(!ut&&!Wt)return!0;if(ut){let Bt;this.Go.Bh();const On={errorCode:ut.error_code};for(const zn of _t)(0,I.kJ)(zn)&&"X-Braze-Auth-Signature"===zn[0]&&(On.signature=zn[1]);Le.respond_with&&Le.respond_with.user_id?On.userId=Le.respond_with.user_id:Le.user_id&&(On.userId=Le.user_id);const zt=ut.reason;return zt?(On.reason=zt,Bt="due to ".concat(zt)):Bt="with error code ".concat(ut.error_code,"."),this.Go.Fh()||(Bt+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),C.Z.error("SDK Authentication failed ".concat(Bt)),this.Zh(Le.events||[],Le.attributes||[]),this.Go.qh(On),!1}if(Wt){let Bt,On=Wt;switch(On){case D.Z.Ra:return Bt="Received successful response with empty body.",Z.Z.q(q.G.Ms,{e:Bt}),C.Z.info(Bt),!1;case D.Z.Ba:return Bt="Received successful response with invalid JSON",Z.Z.q(q.G.Ms,{e:Bt+": "+tt.response}),C.Z.info(Bt),!1;case D.Z.Xa:On='The API key "'.concat(Le.api_key,'" is invalid for the baseUrl ').concat(this.Ko);break;case D.Z.Na:On="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case D.Z.$a:On="No device identifier. Please contact support@braze.com"}C.Z.error("Backend error: "+On)}return!1}Ea(Le,tt,_t,ut){return!!(Le&&0!==Le.length||tt&&0!==tt.length||_t||ut)}Ka(Le,tt,_t,ut,Wt=!1){const Bt=[],On=sr=>sr||"",zt=On(this.wt.getUserId());let zn=this.Zi(Le,tt);const Gr=[],ua=[];let gi,si=null;if(_t.length>0){const sr=[];for(const da of _t){if(gi=da.Mr(),this.Go.Fh()){if(zt&&!gi.user_id){si||(si={}),si.events||(si.events=[]),si.events.push(gi);continue}if(On(gi.user_id)!==zt){ua.push(gi);continue}}sr.push(gi)}sr.length>0&&(zn.events=sr)}if(ut.length>0){const sr=[];for(const da of ut)da&&(this.Go.Fh()&&On(da.user_id)!==zt?Gr.push(da):sr.push(da));sr.length>0&&(zn.attributes=sr)}if(this.Zh(ua,Gr),zn=this.Ps(zn,!0,Wt),si){si=this.Ps(si,!1,Wt);const sr={requestData:si,headers:this._s(si,X.Z.Gs.La)};Bt.push(sr)}if(zn&&!this.Ea(zn.events,zn.attributes,Le,tt))return si?Bt:null;const To={requestData:zn,headers:this._s(zn,X.Z.Gs.La)};return Bt.push(To),Bt}Zh(Le,tt){if(Le){const _t=[];for(const ut of Le){const Wt=j.Z.fromJson(ut);Wt.time=(0,z.Pn)(Wt.time),_t.push(Wt)}this.u.zo(_t)}if(tt)for(const _t of tt)this.u.Pa(_t)}Zs(Le,tt){let _t="HTTP error ";null!=Le&&(_t+=Le+" "),_t+=tt,C.Z.error(_t)}qr(Le){return Z.Z.q(q.G.Ua,{n:Le})}Zi(Le,tt,_t){const ut={};Le&&(ut.feed=!0),tt&&(ut.triggers=!0);const Wt=null!=_t?_t:this.wt.getUserId();if(Wt&&(ut.user_id=Wt),!ut.user_id&&!this.Go.Fh()){const Bt=(0,fe.q)(this.u);Bt&&(ut.alias=Bt)}return ut.config={config_time:this.yt.ni()},{respond_with:ut}}Ha(Le){const tt=(new Date).valueOf();let _t=ae.dH.toString();const ut=X.Z.Wa(this.u,Le);return-1!==ut&&(_t=(tt-ut).toString()),_t}_s(Le,tt,_t=!1){const ut=[["X-Braze-Api-Key",this.rn]],Wt=this.Ha(tt);ut.push(["X-Braze-Last-Req-Ms-Ago",Wt]);const Bt=X.Z.Ya(this.u,tt).toString();ut.push(["X-Braze-Req-Attempt",Bt]);let On=!1;if(null!=Le.respond_with&&Le.respond_with.triggers&&(ut.push(["X-Braze-TriggersRequest","true"]),On=!0),null!=Le.respond_with&&Le.respond_with.feed&&(ut.push(["X-Braze-FeedRequest","true"]),On=!0),tt===X.Z.Gs.Bs){ut.push(["X-Braze-ContentCardsRequest","true"]);let zt=this.u.j(y.I.C.As);zt&&_t||(zt=0,this.u.k(y.I.C.As,zt)),ut.push(["BRAZE-SYNC-RETRY-COUNT",zt.toString()]),On=!0}if(tt===X.Z.Gs.qi&&(ut.push(["X-Braze-FeatureFlagsRequest","true"]),On=!0),On&&ut.push(["X-Braze-DataRequest","true"]),this.Go.Fh()){const zt=this.Go.kh();null!=zt&&ut.push(["X-Braze-Auth-Signature",zt])}return ut}Qa(Le,tt,_t,ut){window.setTimeout(()=>{C.Z.info("Retrying rate limited ".concat(this.Hh(ut),"SDK request.")),this.Hs(tt,_t,ut)},Le)}Hs(Le,tt,_t){const ut=this.Va();if(!ut.Za)return C.Z.info("".concat(this.Hh(_t),"SDK request being rate limited. Request will be retried in ").concat(Math.trunc(ut.au/1e3)," seconds.")),void this.Qa(ut.au,Le,tt,_t);this.u.k(y.I.C.du,(new Date).valueOf());const Wt=Le.device;Wt&&Wt.os_version instanceof Promise?Wt.os_version.then(Bt=>{Le.device.os_version=Bt,tt()}):tt()}li(Le){var tt;null===(tt=this.u)||void 0===tt||tt.k(y.I.C.fu,Le)}ui(){var Le;return null===(Le=this.u)||void 0===Le?void 0:Le.j(y.I.C.fu)}Ru(Le,tt,_t,ut){let Wt=this.ui();return(null==Wt||isNaN(Wt))&&(Wt=tt),Wt=Math.min(Wt+(Le-ut)/1e3/_t,tt),Wt}vu(Le,tt){return Math.max(0,(1-Le)*tt*1e3)}Va(){var Le,tt,_t;const ut={Za:!0,au:0},Wt=null===(Le=this.u)||void 0===Le?void 0:Le.j(y.I.C.du);if(null==Wt||isNaN(Wt))return ut;const Bt=(null===(tt=this.yt)||void 0===tt?void 0:tt.pu())||-1,On=(null===(_t=this.yt)||void 0===_t?void 0:_t.gu())||-1;if(-1===Bt||-1===On)return ut;const zt=(new Date).valueOf();let zn=this.Ru(zt,Bt,On,Wt);return zn<1?(ut.Za=!1,ut.au=this.vu(zn,On),ut):(zn=Math.trunc(zn)-1,this.li(zn),ut)}Xs(){this.Go.Xs()}Vs(){return this.Ko}addSdkMetadata(Le){for(const tt of Le)-1===this.Yh.indexOf(tt)&&this.Yh.push(tt)}}var Ae=v(21494),Ie=v(32775),De=v(41028),Te=v(3671);class xe{constructor(Le,tt,_t,ut,Wt,Bt,On,zt,zn,Gr){this.rn=Le,this.baseUrl=tt,this.di=_t,this.on=ut,this.wt=Wt,this.yt=Bt,this.u=On,this.bu=zt,this.Go=zn,this.qt=Gr,this.rn=Le,this.baseUrl=tt,this.wu=0,this.fE=On.OE()||0,this.ku=null,this.di=_t,this.on=ut,this.wt=Wt,this.yt=Bt,this.u=On,this.Go=zn,this.qt=Gr,this.bu=zt,this.yu=new f.Z,this.ju=null,this.Su=50,this.Au=!1}$u(Le,tt){return!Le&&!tt&&this.Go.Gh()>=this.Su}qu(Le){let tt=this.di.El();if(Le.length>0){const _t=this.wt.getUserId();for(const ut of Le)ut.type===q.G.kl&&(!ut.userId&&!_t||ut.userId===_t)&&(tt=!0)}return tt}Cu(Le=!1,tt=!1,_t=!0,ut,Wt,Bt,On=!1,zt=!1){_t&&this.Du();const zn=this.u.hE(),Gr=this.u.gE();let ua=!1;const gi=(ms,_d)=>{let $a=!1;X.Z.Os(this.u,X.Z.Gs.La,(new Date).valueOf()),Ae.Z.Qs({url:this.baseUrl+"/data/",data:ms,headers:_d,L:xs=>{null!=ms.respond_with&&ms.respond_with.triggers&&(this.wu=Math.max(this.wu-1,0)),this.qt.Ws(ms,xs,_d)?(this.Go.Xs(),this.yt.ul(xs),null!=ms.respond_with&&ms.respond_with.user_id!=this.wt.getUserId()||(null!=ms.device&&this.u.k(y.I.C.Ga,ms.device),null!=ms.sdk_metadata&&(this.u.k(y.I.C.Jh,ms.sdk_metadata),this.u.k(y.I.C.Qh,this.di.ki())),this.bu(xs),X.Z.Ys(this.u,X.Z.Gs.La,1),"function"==typeof ut&&ut())):xs.auth_error&&($a=!0)},error:()=>{null!=ms.respond_with&&ms.respond_with.triggers&&(this.wu=Math.max(this.wu-1,0)),this.qt.Zh(ms.events,ms.attributes),"function"==typeof Wt&&Wt()},ti:xs=>{if("function"==typeof Bt&&Bt(xs),_t&&!ua){if(xs&&!$a)this.Fu();else{X.Z.si(this.u,X.Z.Gs.La);let Ra=this.ku;(null==Ra||Ra<1e3*this.fE)&&(Ra=1e3*this.fE),this.Fu(Math.min(3e5,(0,Ie.R)(1e3*this.fE,3*Ra)))}ua=!0}}})},si=this.qu(zn),To=tt||si;if(this.$u(On,si))return void C.Z.info("Declining to flush data due to 50 consecutive authentication failures");if(_t&&!this.qt.Ea(zn,Gr,Le,To))return this.Fu(),void("function"==typeof Bt&&Bt(!0));const sr=this.qt.Ka(Le,To,zn,Gr,zt);To&&this.wu++;let da=!1;if(sr)for(const ms of sr)this.qt.Hs(ms.requestData,()=>gi(ms.requestData,ms.headers),X.Z.ii.La),da=!0;this.Go.Fh()&&_t&&!da?this.Fu():si&&(C.Z.info("Invoking new session subscriptions"),this.yu.Dt())}Tu(){return this.wu>0}Fu(Le=1e3*this.fE){this.Au||(this.Du(),this.ju=window.setTimeout(()=>{if(document.hidden){const tt="visibilitychange",_t=()=>{document.hidden||(document.removeEventListener(tt,_t,!1),this.Cu())};document.addEventListener(tt,_t,!1)}else this.Cu()},Le),this.ku=Le)}Du(){null!=this.ju&&(clearTimeout(this.ju),this.ju=null)}initialize(){this.Au=!1,this.Fu()}destroy(){this.yu.removeAllSubscriptions(),this.Go.yh(),this.Du(),this.Au=!0,this.Cu(void 0,void 0,!1,void 0,void 0,void 0,void 0,!0),this.ju=null}mr(Le){return this.yu.It(Le)}openSession(){const Le=this.di.ki()!==this.di.xo();Le&&(this.u.cE(y.I.iu.Uo),this.u.cE(y.I.iu.su)),this.Cu(void 0,!1,void 0,()=>{this.u.hi(y.I.C.Ii)}),this.Mn(),Le&&Promise.resolve().then(v.bind(v,90802)).then(tt=>{if(this.Au)return;const _t=tt.default.m();if(null!=_t&&(Te.Z.isPushPermissionGranted()||Te.Z.isPushBlocked())){const ut=()=>{_t.mn()?C.Z.info("Push token maintenance is disabled, not refreshing token for backend."):_t.subscribe()},Wt=(zt,zn)=>{zn&&ut()},Bt=()=>{const zt=this.u.j(y.I.C.In);(null==zt||zt)&&ut()},On=A.Z.Yt.Qt;new A.Z(On,C.Z).jr(On.ss.cu,Wt,Bt)}})}Lu(){this.u.hi(y.I.C.Ti),this.u.hi(y.I.C.Cs),this.u.hi(y.I.C.Lr)}changeUser(Le,tt,_t){const ut=this.wt.getUserId();if(ut!==Le){this.di.ql(),this.Lu(),null!=ut&&this.Cu(void 0,!1,void 0,void 0,void 0),this.wt.ou(Le),_t?this.Go.setSdkAuthenticationSignature(_t):this.Go.xh();for(let Wt=0;Wt<tt.length;Wt++)tt[Wt].changeUser(null==ut);null!=ut&&this.u.hi(y.I.C.J),this.u.hi(y.I.C.Ga),this.u.hi(y.I.C.ai),this.u.hi(y.I.C.SE),this.openSession(),C.Z.info('Changed user to "'+Le+'".')}else{let Wt="Doing nothing.";_t&&this.Go.kh()!==_t&&(this.Go.setSdkAuthenticationSignature(_t),Wt="Updated SDK authentication signature"),C.Z.info("Current user is already ".concat(Le,". ").concat(Wt))}}requestImmediateDataFlush(Le){this.Du(),this.di.xo(),this.Cu(void 0,void 0,void 0,void 0,()=>{C.Z.error("Failed to flush data, request will be retried automatically.")},Le,!0)}requestFeedRefresh(){this.di.xo(),this.Cu(!0)}$r(Le,tt){this.di.xo(),C.Z.info("Requesting explicit trigger refresh."),this.Cu(void 0,!0,void 0,Le,tt)}Cn(Le,tt){const ut={a:Le,l:tt},Wt=Z.Z.q(q.G.Mu,ut);return Wt&&(C.Z.info("Logged alias ".concat(Le," with label ").concat(tt)),this.u.k(y.I.C.SE,ut)),Wt}Fn(Le,tt,_t){if(this.yt.hu(tt))return C.Z.info('Custom Attribute "'.concat(tt,'" is blocklisted, ignoring.')),new De.Z;const Wt=Z.Z.q(Le,{key:tt,value:_t});if(Wt){const Bt="object"==typeof _t?JSON.stringify(_t,null,2):_t;C.Z.info("Logged custom attribute: ".concat(tt," with value: ").concat(Bt))}return Wt}setLastKnownLocation(Le,tt,_t,ut,Wt,Bt){const On={latitude:tt,longitude:_t};null!=ut&&(On.altitude=ut),null!=Wt&&(On.ll_accuracy=Wt),null!=Bt&&(On.alt_accuracy=Bt);const zt=Z.Z.q(q.G.Pu,On,Le||void 0);return zt&&C.Z.info("Set user last known location as ".concat(JSON.stringify(On,null,2))),zt}kr(Le,tt){const _t=this.di.xo();return new j.Z(this.wt.getUserId(),q.G.xu,Le,_t,{cid:tt})}Iu(Le,tt){return new A.Z(Le,tt)}Mn(){const Le=A.Z.Yt.Qt;this.Iu(Le,C.Z).setItem(Le.ss.La,1,{baseUrl:this.baseUrl,data:{api_key:this.rn,device_id:this.on.ce().id},userId:this.wt.getUserId(),sdkAuthEnabled:this.Go.Fh()})}yr(Le){for(const tt of Le)if(tt.api_key===this.rn)this.qt.Zh(tt.events,tt.attributes);else{const _t=A.Z.Yt.Qt;new A.Z(_t,C.Z).setItem(_t.ss.wr,x.Z.W(),tt)}}Gn(Le,tt,_t){if(this.yt.hu(Le))return C.Z.info('Custom Attribute "'.concat(Le,'" is blocklisted, ignoring.')),new De.Z;let ut,Wt;return null===tt&&null===_t?(ut=q.G.Nu,Wt={key:Le}):(ut=q.G.Ou,Wt={key:Le,latitude:tt,longitude:_t}),Z.Z.q(ut,Wt)}Hn(Le,tt){return Z.Z.q(q.G.Uu,{group_id:Le,status:tt})}}class Ge{constructor(Le=0,tt=[],_t=[],ut=[],Wt=null,Bt=null,On={enabled:!1},zt={enabled:!1,refresh_rate_limit:void 0},zn={enabled:!0,capacity:ae.Up,refill_rate:ae.Y$}){this.ol=Le,this.gl=tt,this.fl=_t,this.bl=ut,this.Cl=Wt,this.cl=Bt,this.ml=On,this.mi=zt,this.al=zn,this.ol=Le,this.gl=tt,this.fl=_t,this.bl=ut,this.Cl=Wt,this.cl=Bt,this.ml=On,this.mi=zt,this.al=zn}Y(){return{s:"5.2.0",l:this.ol,e:this.gl,a:this.fl,p:this.bl,m:this.Cl,v:this.cl,c:this.ml,f:this.mi,grl:this.al}}static qn(Le){let tt=Le.l;return"5.2.0"!==Le.s&&(tt=0),new Ge(tt,Le.e,Le.a,Le.p,Le.m,Le.v,Le.c,Le.f,Le.grl)}}class Ue{constructor(Le){this.u=Le,this.u=Le,this.tl=new f.Z,this.el=new f.Z,this.il=new f.Z,this.sl=null,this.rl=null}ll(){if(null==this.rl){const Le=this.u.j(y.I.C.hl);this.rl=null!=Le?Ge.qn(Le):new Ge}return this.rl}ni(){return this.ll().ol}ul(Le){if(null!=Le&&null!=Le.config){const tt=Le.config;if(tt.time>this.ll().ol){const ut=new Ge(tt.time,tt.events_blacklist,tt.attributes_blacklist,tt.purchases_blacklist,tt.messaging_session_timeout,tt.vapid_public_key,tt.content_cards,tt.feature_flags,(zt=>null==zt?this.ll().al:zt)(tt.global_request_rate_limit));let Wt=!1;null!=ut.cl&&this.Wn()!==ut.cl&&(Wt=!0);let Bt=!1;null!=ut.ml.enabled&&this.ri()!==ut.ml.enabled&&(Bt=!0);let On=!1;null!=ut.mi.enabled&&this.yi()!==ut.mi.enabled&&(On=!0),this.rl=ut,this.u.k(y.I.C.hl,ut.Y()),Wt&&this.tl.Dt(),Bt&&this.el.Dt(),On&&this.il.Dt()}}}_n(Le){const tt=this.tl.It(Le);return this.sl&&this.tl.removeSubscription(this.sl),this.sl=tt,tt}qs(Le){return this.el.It(Le)}xi(Le){return this.il.It(Le)}me(Le){return-1!==this.ll().gl.indexOf(Le)}hu(Le){return-1!==this.ll().fl.indexOf(Le)}Dr(Le){return-1!==this.ll().bl.indexOf(Le)}dl(){return this.ll().Cl}Wn(){return this.ll().cl}ri(){return this.ll().ml.enabled||!1}Is(){const Le=this.ll().ml.rate_limit;return!(!Le||null==Le.enabled)&&Le.enabled}ci(){if(!this.Is())return-1;const Le=this.ll().ml.rate_limit;return null==Le.capacity?ae.O4:Le.capacity<=0?-1:Le.capacity}fi(){if(!this.Is())return-1;const Le=this.ll().ml.rate_limit;return null==Le.refill_rate?ae.JG:Le.refill_rate<=0?-1:Le.refill_rate}Rl(){const Le=this.ll().al;return!(!Le||null==Le.enabled)&&Le.enabled}pu(){if(!this.Rl())return-1;const Le=this.ll().al;return null==Le.capacity||Le.capacity<10?-1:Le.capacity}gu(){if(!this.Rl())return-1;const Le=this.ll().al;return null==Le.refill_rate||Le.refill_rate<=0?-1:Le.refill_rate}yi(){return this.ll().mi.enabled&&null==this.zi()?(Z.Z.q(q.G.Ms,{e:"Missing feature flag refresh_rate_limit."}),!1):this.ll().mi.enabled||!1}zi(){return this.ll().mi.refresh_rate_limit}}class st{constructor(Le,tt,_t,ut){this.u=Le,this.wt=tt,this.yt=_t,this.wl=ut,this.u=Le,this.wt=tt,this.yt=_t,this.Sl=1e3,(null==ut||isNaN(ut))&&(ut=1800),ut<this.Sl/1e3&&(C.Z.info("Specified session timeout of "+ut+"s is too small, using the minimum session timeout of "+this.Sl/1e3+"s instead."),ut=this.Sl/1e3),this.wl=ut}jl(Le,tt){return new j.Z(this.wt.getUserId(),q.G.xl,Le,tt.eu,{d:(0,z.FX)(Le-tt.vl)})}ki(){const Le=this.u.tu(y.I.iu.Dl);return null==Le?null:Le.eu}El(){const Le=(new Date).valueOf(),tt=this.yt.dl(),_t=this.u.j(y.I.C.Gl);if(null!=_t&&null==tt)return!1;let ut=!1;return null==_t?ut=!0:null!=tt&&(ut=Le-_t>1e3*tt),ut&&this.u.k(y.I.C.Gl,Le),ut}Nl(Le,tt){return null==tt||null==tt.zl||!(Le-tt.vl<this.Sl)&&tt.zl<Le}xo(){const Le=(new Date).valueOf(),tt=Le+1e3*this.wl,_t=this.u.tu(y.I.iu.Dl);if(this.Nl(Le,_t)){let ut="Generating session start event with time "+Le;if(null!=_t){let Bt=_t.Hl;Bt-_t.vl<this.Sl&&(Bt=_t.vl+this.Sl),this.u.Wl(this.jl(Bt,_t)),ut+=" (old session ended "+Bt+")"}ut+=". Will expire "+tt.valueOf(),C.Z.info(ut);const Wt=new M.Z(x.Z.W(),tt);return this.u.Wl(new j.Z(this.wt.getUserId(),q.G.kl,Le,Wt.eu)),this.u.uu(y.I.iu.Dl,Wt),null==this.u.j(y.I.C.Gl)&&this.u.k(y.I.C.Gl,Le),Wt.eu}if(null!=_t)return _t.Hl=Le,_t.zl=tt,this.u.uu(y.I.iu.Dl,_t),_t.eu}ql(){const Le=this.u.tu(y.I.iu.Dl);null!=Le&&(this.u.yl(y.I.iu.Dl),this.u.Wl(this.jl((new Date).valueOf(),Le)))}}const It={Wh:function(Rr,Le=!1){let tt=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(y.I.C.ec,"true"),localStorage.getItem(y.I.C.ec)&&(localStorage.removeItem(y.I.C.ec),tt=!0)}catch(Bt){if(!(Bt instanceof Error&&("QuotaExceededError"===Bt.name||"NS_ERROR_DOM_QUOTA_REACHED"===Bt.name)&&localStorage.length>0))throw Bt;tt=!0}}catch(Bt){C.Z.info("Local Storage not supported!")}const _t=It.oc(),ut=new y.Z.tc(Rr,_t&&!Le,tt);let Wt;return Wt=tt?new y.Z.rc(Rr):new y.Z.ac,new y.Z(ut,Wt)},oc:function(){return navigator.cookieEnabled||"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)}},xt=It;var gt=v(53836),At=v(65752),ht=v(77540),dt=v(12060);class kt{constructor(Le,tt){this.yt=Le,this.u=tt,this.yt=Le,this.u=tt}getUserId(){const Le=this.u.tu(y.I.iu.su);if(null==Le)return null;let tt=Le.eu,_t=(0,At.E)(tt);if(_t>dt.Z.lr){for(;_t>dt.Z.lr;)tt=tt.slice(0,tt.length-1),_t=(0,At.E)(tt);Le.eu=tt,this.u.uu(y.I.iu.su,Le)}return tt}ou(Le){const tt=null==this.getUserId();this.u.uu(y.I.iu.su,new M.Z(Le)),tt&&this.u.ru(Le)}setCustomUserAttribute(Le,tt){if(this.yt.hu(Le))return C.Z.info('Custom Attribute "'+Le+'" is blocklisted, ignoring.'),!1;const _t={};return _t[Le]=tt,this.nu(dt.Z.lu,_t,!0)}nu(Le,tt,_t=!1,ut=!1){const Wt=this.u.mu(this.getUserId(),Le,tt);let Bt="",On=Le,zt=tt;return _t&&(Bt=" custom","object"==typeof tt&&(On=Object.keys(tt)[0],zt=tt[On],"object"==typeof zt&&(zt=JSON.stringify(zt,null,2)))),!ut&&Wt&&C.Z.info("Logged".concat(Bt," attribute ").concat(On," with value ").concat(zt)),Wt}kn(Le,tt,_t,ut,Wt){this.nu("push_token",Le,!1,!0),this.nu("custom_push_public_key",_t,!1,!0),this.nu("custom_push_user_auth",ut,!1,!0),this.nu("custom_push_vapid_public_key",Wt,!1,!0);const Bt=A.Z.Yt.Qt,On=new A.Z(Bt,C.Z),zt=new ht.Z(Le,tt,_t,ut,Wt);this.u.k(y.I.C.In,zt.Y()),On.setItem(Bt.ss.cu,Bt.ie,!0)}Dn(Le){if(this.nu("push_token",null,!1,!0),this.nu("custom_push_public_key",null,!1,!0),this.nu("custom_push_user_auth",null,!1,!0),this.nu("custom_push_vapid_public_key",null,!1,!0),Le){const tt=A.Z.Yt.Qt,_t=new A.Z(tt,C.Z);this.u.k(y.I.C.In,!1),_t.setItem(tt.ss.cu,tt.ie,!1)}}}var St=v(60408),$i=v(62999);const Xr={Eo:"allowCrawlerActivity",_o:"baseUrl",Io:"noCookies",Ao:"devicePropertyAllowlist",Aa:"disablePushTokenMaintenance",So:"enableLogging",No:"enableSdkAuthentication",qa:"manageServiceWorkerExternally",Oo:"minimumIntervalBetweenTriggerActionsInSeconds",Po:"sessionTimeoutInSeconds",Ro:"appVersion",Lo:"appVersionNumber",_a:"serviceWorkerLocation",ka:"safariWebsitePushId",zn:"localization",ho:"contentSecurityNonce",Do:"allowUserSuppliedJavascript",bo:"inAppMessageZIndex",wo:"openInAppMessagesInNewTab",en:"openNewsFeedCardsInNewTab",Lh:"requireExplicitInAppMessageDismissal",Mo:"doNotLoadFontAwesome",Uo:"deviceId",Bo:"sdkFlavor",tn:"openCardsInNewTab"},wo={Eo:"allowCrawlerActivity",_o:"baseUrl",Io:"noCookies",Ao:"devicePropertyAllowlist",Aa:"disablePushTokenMaintenance",So:"enableLogging",No:"enableSdkAuthentication",qa:"manageServiceWorkerExternally",Oo:"minimumIntervalBetweenTriggerActionsInSeconds",Po:"sessionTimeoutInSeconds",Ro:"appVersion",Lo:"appVersionNumber",_a:"serviceWorkerLocation",ka:"safariWebsitePushId",zn:"localization",ho:"contentSecurityNonce",Do:"allowUserSuppliedJavascript",bo:"inAppMessageZIndex",wo:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",en:"openNewsFeedCardsInNewTab",Lh:"requireExplicitInAppMessageDismissal",Mo:"doNotLoadFontAwesome",Uo:"deviceId",Bo:"sdkFlavor"},gr=new class uc{constructor(){this.rn="",this.Wo="",this.Vo=void 0,this.Go=null,this.on=null,this.qt=null,this.Ei=null,this.yt=null,this.di=null,this.u=null,this.wt=null,this.Ko="",this.$o=!1,this.qo=!1,this.Jo=new f.Z,this.Yo=new f.Z,this.options={},this.Ho=[],this.Xo=[],this._e=[],this.Wo="5.2.0"}Zo(Le){this.Jo.It(Le)}Sh(Le){this.Yo.It(Le)}initialize(Le,tt){if(this.so())return C.Z.info("Braze has already been initialized with an API key."),!0;this.options=tt||{};let _t=this.nn(wo.So);const ut=(0,St.L)($i.SD.Un());if(ut&&"true"===ut.brazeLogging&&(_t=!0),C.Z.init(_t),C.Z.info("Initialization Options: ".concat(JSON.stringify(this.options,null,2))),null==Le||""===Le||"string"!=typeof Le)return C.Z.error("Braze requires a valid API key to be initialized."),!1;this.rn=Le;let Wt=this.nn(wo._o);if(null==Wt||""===Wt||"string"!=typeof Wt)return C.Z.error("Braze requires a valid baseUrl to be initialized."),!1;!1===/^https?:/.test(Wt)&&(Wt="https://".concat(Wt));const Bt=Wt;if(Wt=document.createElement("a"),Wt.href=Bt,"/"===Wt.pathname&&(Wt="".concat(Wt,"api/v3")),this.Ko=Wt.toString(),O.Z.Qo&&!this.nn(wo.Eo))return C.Z.info("Ignoring activity from crawler bot "+navigator.userAgent),this.qo=!0,!1;const On=this.nn(wo.Io)||!1;if(this.u=xt.Wh(Le,On),On&&this.u.Vh(Le),new y.Z.ee(null,!0).br(y.I.se))return C.Z.info("Ignoring all activity due to previous opt out"),this.qo=!0,!1;for(const gi of(0,I.XP)(this.options))-1===(0,I.VO)(Xr).indexOf(gi)&&C.Z.warn("Ignoring unknown initialization option '".concat(gi,"'."));const zt=["mparticle","wordpress","tealium"];if(null!=this.nn(wo.Bo)){const gi=this.nn(wo.Bo);-1!==zt.indexOf(gi)?this.Vo=gi:C.Z.error("Invalid sdk flavor passed: "+gi)}let zn=this.nn(Xr.Ao);if(null!=zn)if((0,I.kJ)(zn)){const gi=[];for(let si=0;si<zn.length;si++)(0,I.fk)(N.Z,zn[si],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&gi.push(zn[si]);zn=gi}else C.Z.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),zn=null;const Gr=this.nn(wo.Uo);if(Gr){const gi=new M.Z(Gr);this.u.uu(y.I.iu.Uo,gi)}this.on=new L(this.u,zn),this.yt=new Ue(this.u),this.wt=new kt(this.yt,this.u),this.di=new st(this.u,this.wt,this.yt,this.nn(wo.Po));const ua=new f.Z;return this.Go=new P(this.u,this.nn(wo.No),ua),this.$t(ua),this.qt=new Pe(this.on,this.u,this.Go,this.wt,this.di,this.yt,this.rn,this.Ko,this.Wo,this.Vo||"",this.nn(wo.Ro),this.nn(wo.Lo)),this.Ei=new xe(this.rn,this.Ko,this.di,this.on,this.wt,this.yt,this.u,gi=>{if(this.so())for(const si of this.gr())si.Rs(gi)},this.Go,this.qt),this.Ei.initialize(),On||this.u.Kh(),C.Z.info('Initialized for the Braze backend at "'.concat(this.nn(wo._o),'" with API key "').concat(this.rn,'".')),gt.n.o(),this.yt.xi(()=>{var gi;this.$o&&null!==(gi=this.yt)&&void 0!==gi&&gi.yi()&&Promise.resolve().then(v.bind(v,85110)).then(si=>{this.$o&&(0,si.default)()})}),this.Ei.mr(()=>{var gi;this.$o&&null!==(gi=this.yt)&&void 0!==gi&&gi.yi()&&Promise.resolve().then(v.bind(v,85110)).then(si=>{this.$o&&(0,si.default)(void 0,void 0,!0)})}),this.Jo.Dt(this.options),this.$o=!0,!0}destroy(Le){if(C.Z.destroy(),this.so()){this.Yo.Dt(),this.Yo.removeAllSubscriptions();for(const tt of this.Ho)tt.destroy();this.Ho=[];for(const tt of this.Xo)tt.clearData(!1);this.Xo=[],this.removeAllSubscriptions(),this._e=[],null!=this.Ei&&this.Ei.destroy(),this.Ei=null,this.Go=null,this.on=null,this.qt=null,this.yt=null,this.di=null,this.wt=null,this.options={},this.Vo=void 0,this.$o=!1,this.qo=!1,Le&&(this.u=null)}}X(){return!(this.$h()||!this.so()&&(console.warn(ae.Go),1))}Ma(){return this.rn}Sr(){return this.Go}Vs(){return this.Ko}te(){return this.on}nr(){return this.qt}nn(Le){return this.options[Le]}gr(){return this.Xo}cr(){return this.Ei}ir(){return this.yt}zr(){return this.di}l(){return this.u}pr(){if(this.wt&&this.Ei)return new dt.Z(this.wt,this.Ei)}er(){return this.wt}tr(){return!0===this.nn(wo.Do)}g(Le){let tt=!1;for(const _t of this.Ho)_t===Le&&(tt=!0);tt||this.Ho.push(Le)}ar(Le){let tt=!1;for(const _t of this.Xo)_t.constructor===Le.constructor&&(tt=!0);Le instanceof k.Z&&!tt&&this.Xo.push(Le)}$t(Le){Le instanceof f.Z&&this._e.push(Le)}removeAllSubscriptions(){if(this.X())for(const Le of this._e)Le.removeAllSubscriptions()}removeSubscription(Le){if(this.X())for(const tt of this._e)tt.removeSubscription(Le)}oe(Le){this.qo=Le}so(){return this.$o}$h(){return this.qo}Ss(){return this.Wo}}},71221:(Q,F,v)=>{"use strict";v.d(F,{I:()=>N,Z:()=>M});var y=v(30012),f=v(84827),A=v(47799),C=v(72036),P=v(52387),k=v(12060),O=v(72565),E=v(13658);const N={iu:{su:"ab.storage.userId",Uo:"ab.storage.deviceId",Dl:"ab.storage.sessionId"},C:{ec:"ab.test",tE:"ab.storage.events",eE:"ab.storage.attributes",sE:"ab.storage.attributes.anonymous_user",Ga:"ab.storage.device",Jh:"ab.storage.sdk_metadata",Qh:"ab.storage.session_id_for_cached_metadata",In:"ab.storage.pushToken",Hi:"ab.storage.newsFeed",Ji:"ab.storage.lastNewsFeedRefresh",J:"ab.storage.cardImpressions",hl:"ab.storage.serverConfig",rE:"ab.storage.triggers",oE:"ab.storage.triggers.ts",Gl:"ab.storage.messagingSessionStart",Cs:"ab.storage.cc",gs:"ab.storage.ccLastFullSync",ys:"ab.storage.ccLastCardUpdated",Ks:"ab.storage.ccLastClientRequest",ai:"ab.storage.ccRateLimitCurrentTokenCount",fu:"ab.storage.globalRateLimitCurrentTokenCount",v:"ab.storage.ccClicks",H:"ab.storage.ccImpressions",A:"ab.storage.ccDismissals",nE:"ab.storage.lastDisplayedTriggerTimesById",aE:"ab.storage.lastDisplayedTriggerTime",iE:"ab.storage.triggerFireInstancesById",wh:"ab.storage.signature",As:"ab.storage.brazeSyncRetryCount",Ds:"ab.storage.sdkVersion",Ti:"ab.storage.ff",Ii:"ab.storage.ffImpressions",Bi:"ab.storage.ffLastRefreshAt",Ui:"ab.storage.ff.sessionId",EE:"ab.storage.lastReqToEndpoint",lE:"ab.storage.requestAttempts",Lr:"ab.storage.deferredIam",du:"ab.storage.lastSdkReq",SE:"ab.storage.alias"},se:"ab.optOut"};class M{constructor(I,S){this._E=I,this.uE=S,this._E=I,this.uE=S}Vh(I){const S=(0,A.XP)(N.iu),L=new M.ee(I);for(const D of S)L.remove(N.iu[D])}uu(I,S){let L=null;null!=S&&S instanceof f.Z&&(L=S.Y()),this._E.store(I,L)}cE(I){const S=this.tu(I);null!=S&&(S.Hl=(new Date).valueOf(),this.uu(I,S))}tu(I){const S=this._E.br(I),L=(j=>{let z;try{z=JSON.parse(j)}catch(Z){z=null}return z})(S);let D;if(L)D=f.Z.qn(L)||null,D&&this.uu(I,D);else{const j=f.Z.TE(S);D=f.Z.qn(j)||null,j!==S&&D&&this.uu(I,D)}return D}yl(I){this._E.remove(I)}Kh(){const I=(0,A.XP)(N.iu);let S;for(const L of I)S=this.tu(N.iu[L]),null!=S&&this.uu(N.iu[L],S)}zo(I){let S;if(null==I||0===I.length)return!1;S=(0,A.kJ)(I)?I:[I];let L=this.uE.br(N.C.tE);null!=L&&(0,A.kJ)(L)||(L=[]);for(let D=0;D<S.length;D++)L.push(S[D].Y());return this.uE.store(N.C.tE,L)}Wl(I){return null!=I&&this.zo([I])}hE(){let I=this.uE.br(N.C.tE);this.uE.remove(N.C.tE),null==I&&(I=[]);const S=[];let L=!1,D=null;if((0,A.kJ)(I))for(let j=0;j<I.length;j++)y.Z.AE(I[j])?S.push(y.Z.qn(I[j])):D=j;else L=!0;if(L||null!=D){let j="Stored events could not be deserialized as Events";L&&(j+=", was "+Object.prototype.toString.call(I)+" not an array"),null!=D&&(j+=", value at index "+D+" does not look like an event"),j+=", serialized values were of type "+typeof I+": "+JSON.stringify(I),S.push(new y.Z(null,C.G.Ms,(new Date).valueOf(),null,{e:j}))}return S}k(I,S){return!!(0,A.fk)(N.C,I,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this.uE.store(I,S)}j(I){return!!(0,A.fk)(N.C,I,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this.uE.br(I)}hi(I){return!!(0,A.fk)(N.C,I,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this.uE.remove(I),!0)}clearData(){const I=(0,A.XP)(N.iu),S=(0,A.XP)(N.C);for(let L=0;L<I.length;L++)this._E.remove(N.iu[I[L]]);for(let L=0;L<S.length;L++)this.uE.remove(N.C[S[L]])}RE(I){return I||N.C.sE}Pa(I){let S=this.uE.br(N.C.eE);null==S&&(S={});const L=this.RE(I[k.Z.Yn]),D=S[L];for(const j in I)j!==k.Z.Yn&&(null==S[L]||D&&null==D[j])&&this.mu(I[k.Z.Yn],j,I[j])}mu(I,S,L){let D=this.uE.br(N.C.eE);null==D&&(D={});const j=this.RE(I);let z=D[j];if(null==z&&(z={},null!=I&&(z[k.Z.Yn]=I)),S===k.Z.lu){null==z[S]&&(z[S]={});for(const Z in L)z[S][Z]=L[Z]}else z[S]=L;return D[j]=z,this.uE.store(N.C.eE,D)}gE(){const I=this.uE.br(N.C.eE);this.uE.remove(N.C.eE);const S=[];for(const L in I)null!=I[L]&&S.push(I[L]);return S}ru(I){const S=this.uE.br(N.C.eE);if(null!=S){const z=this.RE(null),Z=S[z];null!=Z&&(S[z]=void 0,this.uE.store(N.C.eE,S),Z[k.Z.Yn]=I,this.Pa(Z))}const L=this.tu(N.iu.Dl);let D=null;null!=L&&(D=L.eu);const j=this.hE();if(null!=j)for(let z=0;z<j.length;z++){const Z=j[z];null==Z.userId&&Z.sessionId==D&&(Z.userId=I),this.Wl(Z)}}OE(){return this.uE.fE}}M.rc=class{constructor(x){this.rn=x,this.rn=x,this.fE=O.Z.dE()?3:10}IE(x){return x+"."+this.rn}store(x,I){const S={v:I};try{return localStorage.setItem(this.IE(x),JSON.stringify(S)),!0}catch(L){return P.Z.info("Storage failure: "+(0,E.e)(L)),!1}}br(x){try{let I=null;const S=localStorage.getItem(this.IE(x));return null!=S&&(I=JSON.parse(S)),null==I?null:I.v}catch(I){return P.Z.info("Storage retrieval failure: "+(0,E.e)(I)),null}}remove(x){try{localStorage.removeItem(this.IE(x))}catch(I){return P.Z.info("Storage removal failure: "+(0,E.e)(I)),!1}}},M.ac=class{constructor(){this.bE={},this.KE=5242880,this.fE=3}store(x,I){const S={value:I},L=this.mE(I);return L>this.KE?(P.Z.info("Storage failure: object is \u2248"+L+" bytes which is greater than the max of "+this.KE),!1):(this.bE[x]=S,!0)}mE(x){const I=[],S=[x];let L=0;for(;S.length;){const D=S.pop();if("boolean"==typeof D)L+=4;else if("string"==typeof D)L+=2*D.length;else if("number"==typeof D)L+=8;else if("object"==typeof D&&-1===I.indexOf(D)){let j,z;I.push(D);for(const Z in D)z=D,j=Z,S.push(z[j])}}return L}br(x){const I=this.bE[x];return null==I?null:I.value}remove(x){this.bE[x]=null}},M.ee=class{constructor(x,I){this.rn=x,this.YE=I,this.rn=x,this.NE=this.CE(),this.GE=576e3,this.YE=!!I}IE(x){return null!=this.rn?x+"."+this.rn:x}CE(){let x=0,I=document.location.hostname;const S=I.split("."),L="ab._gd";for(;x<S.length-1&&-1===document.cookie.indexOf(L+"="+L);)x++,I="."+S.slice(-1-x).join("."),document.cookie=L+"="+L+";domain="+I+";";return document.cookie=L+"=;expires="+new Date(0).toUTCString()+";domain="+I+";",I}ne(){const x=new Date;return x.setTime(x.getTime()+60*this.GE*1e3),x.getFullYear()}DE(){const x=(0,A.VO)(N.iu),I=document.cookie.split(";");for(let S=0;S<I.length;S++){let L=I[S];for(;" "===L.charAt(0);)L=L.substring(1);let D=!1;for(let j=0;j<x.length;j++)if(0===L.indexOf(x[j])){D=!0;break}if(D){const j=L.split("=")[0];-1===j.indexOf("."+this.rn)&&this.ME(j)}}}store(x,I){this.DE();const S=new Date;S.setTime(S.getTime()+60*this.GE*1e3);const L="expires="+S.toUTCString(),D="domain="+this.NE;let j;j=this.YE?I:encodeURIComponent(I);const z=this.IE(x)+"="+j+";"+L+";"+D+";path=/";return z.length>=4093?(P.Z.info("Storage failure: string is "+z.length+" chars which is too large to store as a cookie."),!1):(document.cookie=z,!0)}br(x){const I=[],S=this.IE(x)+"=",L=document.cookie.split(";");for(let D=0;D<L.length;D++){let j=L[D];for(;" "===j.charAt(0);)j=j.substring(1);if(0===j.indexOf(S))try{let z;z=this.YE?j.substring(S.length,j.length):decodeURIComponent(j.substring(S.length,j.length)),I.push(z)}catch(z){return P.Z.info("Storage retrieval failure: "+(0,E.e)(z)),this.remove(x),null}}return I.length>0?I[I.length-1]:null}remove(x){this.ME(this.IE(x))}ME(x){const I=x+"=;expires="+new Date(0).toUTCString();document.cookie=I,document.cookie=I+";path=/";const S=I+";domain="+this.NE;document.cookie=S,document.cookie=S+";path=/"}},M.tc=class{constructor(x,I,S){this.rn=x,this.pE=[],I&&this.pE.push(new M.ee(x)),S&&this.pE.push(new M.rc(x)),this.pE.push(new M.ac)}store(x,I){let S=!0;for(let L=0;L<this.pE.length;L++)S=this.pE[L].store(x,I)&&S;return S}br(x){for(let I=0;I<this.pE.length;I++){const S=this.pE[I].br(x);if(null!=S)return S}return null}remove(x){new M.ee(this.rn).remove(x);for(let I=0;I<this.pE.length;I++)this.pE[I].remove(x)}}},94939:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(25701);class f{constructor(){this._e={}}It(C){if("function"!=typeof C)return null;const P=y.Z.W();return this._e[P]=C,P}removeSubscription(C){delete this._e[C]}removeAllSubscriptions(){this._e={}}ic(){return Object.keys(this._e).length}Dt(C){const P=[];for(const k in this._e)P.push((0,this._e[k])(C));return P}}},33786:(Q,F,v)=>{"use strict";v.d(F,{q:()=>f});var y=v(71221);function f(A){const C=null==A?void 0:A.j(y.I.C.SE);let P;return C&&(P={label:C.l,name:C.a}),P}},23810:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>y});const y={Xa:"invalid_api_key",Na:"blacklisted",$a:"no_device_identifier",Ba:"invalid_json_response",Ra:"empty_response",__:"sdk_auth_error"}},30012:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>P});var y=v(27885),f=v(33786),A=v(47799),C=v(73345);class P{constructor(O,E,N,M,x){this.userId=O,this.type=E,this.time=N,this.sessionId=M,this.data=x,this.userId=O,this.type=E,this.time=(0,C._0)(N),this.sessionId=M,this.data=x}Mr(){var O;const E={name:this.type,time:(0,C.FX)(this.time),data:this.data||{},session_id:this.sessionId};null!=this.userId&&(E.user_id=this.userId);const N=(null===(O=y.ZP.Sr())||void 0===O?void 0:O.Fh())||!1;if(!E.user_id&&!N){const M=(0,f.q)(y.ZP.l());M&&(E.alias=M)}return E}Y(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(O){return new P(O.user_id,O.name,O.time,O.session_id,O.data)}static AE(O){return null!=O&&(0,A.Kn)(O)&&null!=O.t&&""!==O.t}static qn(O){return new P(O.u,O.t,O.ts,O.s,O.d)}}},84827:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>P});var y=v(25701),f=v(52387),A=v(47799),C=v(13658);class P{constructor(O,E,N){this.eu=O,null==O&&(O=y.Z.W()),this.vl=!N||isNaN(N)?(new Date).valueOf():N,this.eu=O,this.Hl=(new Date).valueOf(),this.zl=E}Y(){return"g:".concat(encodeURIComponent(this.eu),"|e:").concat(this.zl,"|c:").concat(this.vl,"|l:").concat(this.Hl)}static TE(O){if("string"!=typeof O)return null;const E=O.lastIndexOf("|e:"),N=O.substring(0,E),M=N.split("g:")[1];let x;return x=/[|:]/.test(M)?encodeURIComponent(M):M,O.replace(N,"g:".concat(x))}static qn(O){let E;if("string"==typeof O)try{const N=O.split("|");if(!(0,A.kJ)(N)||4!==N.length)return null;const M=I=>I.split(":")[1],x=I=>{const S=parseInt(M(I));if(!isNaN(S))return S};E=new P(decodeURIComponent(M(N[0])),x(N[1]),x(N[2])),E.Hl=x(N[3])}catch(N){f.Z.info("Unable to parse cookie string ".concat(O,", failed with error: ").concat((0,C.e)(N)))}else{if(null==O||null==O.g)return null;E=new P(O.g,O.e,O.c),E.Hl=O.l}return E}}},77540:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>f});var y=v(73345);class f{constructor(C,P,k,O,E){this.endpoint=C,this.Vn=P,this.publicKey=k,this.Vl=O,this.cl=E,this.endpoint=C||null,this.Vn=P||null,this.publicKey=k||null,this.Vl=O||null,this.cl=E||null}Y(){return{e:this.endpoint,c:this.Vn,p:this.publicKey,u:this.Vl,v:this.cl}}static qn(C){return new f(C.e,(0,y.Rd)(C.c),C.p,C.u,C.v)}}},41028:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>y});class y{constructor(A=!1,C=[]){this.L=A,this.ge=C,this.L=A,this.ge=C}P(A){this.L=this.L&&A.L,this.ge.push(...A.ge)}}},30122:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>y});const y={OPEN:"open",Rr:"purchase",vr:"push_click",ue:"custom_event",Zr:"iam_click",kt:"test"}},1979:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>D});var y=v(73345),f=v(52387);class A{constructor(z){this.Bl=z,this.Bl=z}Jl(z){return null==this.Bl||this.Bl===z[0]}static fromJson(z){return new A(z?z.event_name:null)}Y(){return this.Bl}}var C=v(47799);class P{constructor(z,Z,q,X){this.Tl=z,this.Al=Z,this.comparator=q,this._l=X,this.Tl=z,this.Al=Z,this.comparator=q,this._l=X,this.Al===P.Il.Ll&&this.comparator!==P.Ul.Ol&&this.comparator!==P.Ul.Ql&&this.comparator!==P.Ul.Xl&&this.comparator!==P.Ul.Fl&&(this._l=(0,y.X2)(this._l))}Jl(z){let Z=null;switch(null!=z&&(Z=z[this.Tl]),this.comparator){case P.Ul.Kl:return null!=Z&&Z.valueOf()===this._l.valueOf();case P.Ul.Pl:return null==Z||Z.valueOf()!==this._l.valueOf();case P.Ul.Yl:return null!=Z&&typeof Z==typeof this._l&&Z>this._l;case P.Ul.Ol:return this.Al===P.Il.Ll?null!=Z&&(0,C.J_)(Z)&&(0,y.$N)(Z)<=this._l.valueOf():null!=Z&&typeof Z==typeof this._l&&Z>=this._l;case P.Ul.Zl:return null!=Z&&typeof Z==typeof this._l&&Z<this._l;case P.Ul.Ql:return this.Al===P.Il.Ll?null!=Z&&(0,C.J_)(Z)&&(0,y.$N)(Z)>=this._l.valueOf():null!=Z&&typeof Z==typeof this._l&&Z<=this._l;case P.Ul.$l:return null!=Z&&"string"==typeof Z&&typeof Z==typeof this._l&&null!=Z.match(this._l);case P.Ul.Eu:return null!=Z;case P.Ul._u:return null==Z;case P.Ul.Xl:return null!=Z&&(0,C.J_)(Z)&&(0,y.yo)(Z)<this._l;case P.Ul.Fl:return null!=Z&&(0,C.J_)(Z)&&(0,y.yo)(Z)>this._l;case P.Ul.Hu:return null==Z||typeof Z!=typeof this._l||"string"!=typeof Z||null==Z.match(this._l)}return!1}static fromJson(z){return new P(z.property_key,z.property_type,z.comparator,z.property_value)}Y(){let z=this._l;return(0,C.J_)(this._l)&&(z=(0,y.FX)(z.valueOf())),{k:this.Tl,t:this.Al,c:this.comparator,v:z}}static qn(z){return new P(z.k,z.t,z.c,z.v)}}P.Il={Qu:"boolean",Xu:"number",Bu:"string",Ll:"date"},P.Ul={Kl:1,Pl:2,Yl:3,Ol:4,Zl:5,Ql:6,$l:10,Eu:11,_u:12,Xl:15,Fl:16,Hu:17};class k{constructor(z){this.filters=z,this.filters=z}Jl(z){let Z=!0;for(let q=0;q<this.filters.length;q++){const X=this.filters[q];let ae=!1;for(let fe=0;fe<X.length;fe++)if(X[fe].Jl(z)){ae=!0;break}if(!ae){Z=!1;break}}return Z}static fromJson(z){if(null==z||!(0,C.kJ)(z))return null;const Z=[];for(let q=0;q<z.length;q++){const X=[],ae=z[q];for(let fe=0;fe<ae.length;fe++)X.push(P.fromJson(ae[fe]));Z.push(X)}return new k(Z)}Y(){const z=[];for(let Z=0;Z<this.filters.length;Z++){const q=this.filters[Z],X=[];for(let ae=0;ae<q.length;ae++)X.push(q[ae].Y());z.push(X)}return z}static qn(z){const Z=[];for(let q=0;q<z.length;q++){const X=[],ae=z[q];for(let fe=0;fe<ae.length;fe++)X.push(P.qn(ae[fe]));Z.push(X)}return new k(Z)}}class O{constructor(z,Z){this.Bl=z,this.Ml=Z,this.Bl=z,this.Ml=Z}Jl(z){return null!=this.Bl&&null!=this.Ml&&(z[0]===this.Bl&&this.Ml.Jl(z[1]))}static fromJson(z){return new O(z?z.event_name:null,z?k.fromJson(z.property_filters):null)}Y(){return{e:this.Bl,pf:this.Ml?this.Ml.Y():null}}}class E{constructor(z,Z){this.zu=z,this.Ju=Z,this.zu=z,this.Ju=Z}Jl(z){if(null==this.zu)return!1;const Z=L.Gu(z[0],this.zu);if(!Z)return!1;let q=null==this.Ju||0===this.Ju.length;if(null!=this.Ju)for(let X=0;X<this.Ju.length;X++)if(this.Ju[X]===z[1]){q=!0;break}return Z&&q}static fromJson(z){return new E(z?z.id:null,z?z.buttons:null)}Y(){return this.zu}}class N{constructor(z){this.productId=z,this.productId=z}Jl(z){return null==this.productId||z[0]===this.productId}static fromJson(z){return new N(z?z.product_id:null)}Y(){return this.productId}}class M{constructor(z,Z){this.productId=z,this.Ml=Z,this.productId=z,this.Ml=Z}Jl(z){return null!=this.productId&&null!=this.Ml&&(z[0]===this.productId&&this.Ml.Jl(z[1]))}static fromJson(z){return new M(z?z.product_id:null,z?k.fromJson(z.property_filters):null)}Y(){return{id:this.productId,pf:this.Ml?this.Ml.Y():null}}}class x{constructor(z){this.zu=z,this.zu=z}Jl(z){return null==this.zu||L.Gu(z[0],this.zu)}static fromJson(z){return new x(z?z.campaign_id:null)}Y(){return this.zu}}var I=v(30122),S=v(13658);class L{constructor(z,Z){this.type=z,this.data=Z,this.type=z,this.data=Z}sc(z,Z){return L.cc[this.type]===z&&(null==this.data||this.data.Jl(Z))}static Gu(z,Z){let q=null;try{q=window.atob(z)}catch(X){return f.Z.info("Failed to unencode analytics id "+z+": "+(0,S.e)(X)),!1}return Z===q.split("_")[0]}static fromJson(z){const Z=z.type;let q=null;switch(Z){case L.Or.OPEN:case L.Or.kt:break;case L.Or.Rr:q=N.fromJson(z.data);break;case L.Or.nc:q=M.fromJson(z.data);break;case L.Or.vr:q=x.fromJson(z.data);break;case L.Or.ue:q=A.fromJson(z.data);break;case L.Or.lc:q=O.fromJson(z.data);break;case L.Or.Zr:q=E.fromJson(z.data)}return new L(Z,q)}Y(){return{t:this.type,d:this.data?this.data.Y():null}}static qn(z){let Z,q=null;switch(z.t){case L.Or.OPEN:case L.Or.kt:break;case L.Or.Rr:q=new N(z.d);break;case L.Or.nc:Z=z.d||{},q=new M(Z.id,k.qn(Z.pf||[]));break;case L.Or.vr:q=new x(z.d);break;case L.Or.ue:q=new A(z.d);break;case L.Or.lc:Z=z.d||{},q=new O(Z.e,k.qn(Z.pf||[]));break;case L.Or.Zr:q=new E(z.d)}return new L(z.t,q)}}L.Or={OPEN:"open",Rr:"purchase",nc:"purchase_property",vr:"push_click",ue:"custom_event",lc:"custom_event_property",Zr:"iam_click",kt:"test"},L.cc={},L.cc[L.Or.OPEN]=I.Z.OPEN,L.cc[L.Or.Rr]=I.Z.Rr,L.cc[L.Or.nc]=I.Z.Rr,L.cc[L.Or.vr]=I.Z.vr,L.cc[L.Or.ue]=I.Z.ue,L.cc[L.Or.lc]=I.Z.ue,L.cc[L.Or.Zr]=I.Z.Zr,L.cc[L.Or.kt]=I.Z.kt;class D{constructor(z,Z=[],q,X,ae=0,fe,Pe,Ae=0,Ie=D.Vu,De,Te,xe){this.id=z,this.Ku=Z,this.startTime=q,this.endTime=X,this.priority=ae,this.type=fe,this.data=Pe,this.Wu=Ae,this.Yu=Ie,this.Kr=De,this.Zu=Te,this.td=xe,this.id=z,this.Ku=Z||[],void 0===q&&(q=null),this.startTime=q,void 0===X&&(X=null),this.endTime=X,this.priority=ae||0,this.type=fe,this.Wu=Ae||0,null==De&&(De=1e3*(this.Wu+30)),this.Kr=De,this.data=Pe,null!=Ie&&(this.Yu=Ie),this.Zu=Te,this.td=xe||null}sd(z){return null==this.td||this.Yu!==D.Vu&&z-this.td>=1e3*this.Yu}ed(z){this.td=z}rd(z){return Math.max(z+1e3*this.Wu-(new Date).valueOf(),0)}hd(z){const Z=(new Date).valueOf()-z,q=null==z||isNaN(Z)||null==this.Kr||Z<this.Kr;return q||f.Z.info("Trigger action ".concat(this.type," is no longer eligible for display - fired ").concat(Z,"ms ago and has a timeout of ").concat(this.Kr,"ms.")),!q}static fromJson(z){const Z=z.id,q=[];for(let Ge=0;Ge<z.trigger_condition.length;Ge++)q.push(L.fromJson(z.trigger_condition[Ge]));const X=(0,y.X2)(z.start_time),ae=(0,y.X2)(z.end_time),fe=z.priority,Pe=z.type,Ae=z.delay,Ie=z.re_eligibility,De=z.timeout,Te=z.data,xe=z.min_seconds_since_last_trigger;return(0,C.fk)(D.Or,Pe,"Could not construct Trigger from server data","Trigger.Types")?new D(Z,q,X,ae,fe,Pe,Te,Ae,Ie,De,xe):null}Y(){const z=[];for(let Z=0;Z<this.Ku.length;Z++)z.push(this.Ku[Z].Y());return{i:this.id,c:z,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.Wu,r:this.Yu,tm:this.Kr,ss:this.Zu,ld:this.td}}static qn(z){const Z=[],q=z.c||[];for(let X=0;X<q.length;X++)Z.push(L.qn(q[X]));return new D(z.i,Z,(0,y.Rd)(z.s),(0,y.Rd)(z.e),z.p,z.t,z.da,z.d,z.r,z.tm,z.ss,z.ld)}}D.Or={Cr:"inapp",od:"templated_iam"},D.Vu=-1},53836:(Q,F,v)=>{"use strict";v.d(F,{n:()=>S});var y=v(78097),f=v(27885),A=v(17156),C=v(11655),P=v(30012),k=v(47799),O=v(71221);class E{constructor(D,j,z,Z,q){this.triggerId=D,this.Hr=j,this.Gr=z,this.Jr=Z,this.Kr=q,this.triggerId=D,this.Hr=j,this.Gr=z,this.Jr=Z,this.Kr=q}static fromJson(D,j,z,Z,q){return null==D||null==D.trigger_id?null:new E(D.trigger_id,j,z,Z,q)}}var N=v(1979),M=v(30122),x=v(52387);class I extends A.Z{constructor(D,j,z,Z,q){super(),this.tg=D,this.Jt=j,this.u=z,this.Ei=Z,this.ig=q,this.tg=D,this.Jt=j,this.u=z,this.Ei=Z,this.ig=q,this.sg=[],this.eg=[],this.hg=null,this.ng={},this.og={},this.triggers=[],this.lg=0,this.ag(),this.gg()}fg(){if(this.u){this.hg=this.u.j(O.I.C.aE)||this.hg,this.ng=this.u.j(O.I.C.iE)||this.ng,this.og=this.u.j(O.I.C.nE)||this.og;for(let D=0;D<this.triggers.length;D++){const j=this.triggers[D];j.id&&null!=this.og[j.id]&&j.ed(this.og[j.id])}}}ag(){if(!this.u)return;this.lg=this.u.j(O.I.C.oE)||0;const D=this.u.j(O.I.C.rE)||[],j=[];for(let z=0;z<D.length;z++)j.push(N.Z.qn(D[z]));this.triggers=j,this.fg()}gg(){const D=this,j=function(q,X,ae,fe,Pe){return function(){D.cg(q,X,ae,fe,Pe)}},z={};for(const q of this.triggers)q.id&&(z[q.id]=q);let Z=!1;for(let q=0;q<this.triggers.length;q++){const X=this.triggers[q];if(X.id&&null!=this.ng[X.id]){const ae=this.ng[X.id],fe=[];for(let Pe=0;Pe<ae.length;Pe++){const Ae=ae[Pe],Ie=X.rd(Ae.Jr||0);if(Ie>0){let De,Te;fe.push(Ae),null!=Ae.ug&&(De=Ae.ug),null!=Ae.dg&&P.Z.AE(Ae.dg)&&(Te=P.Z.qn(Ae.dg));const xe=[];if(Ae.pg&&(0,k.kJ)(Ae.pg))for(let Ge=0;Ge<Ae.pg.length;Ge++){const Ue=z[Ae.pg[Ge]];null!=Ue&&xe.push(Ue)}this.eg.push(window.setTimeout(j(X,Ae.Jr||0,De,Te,xe),Ie))}}this.ng[X.id].length>fe.length&&(this.ng[X.id]=fe,Z=!0,0===this.ng[X.id].length&&delete this.ng[X.id])}}Z&&this.u&&this.u.k(O.I.C.iE,this.ng)}mg(){if(!this.u)return;const D=[];for(let j=0;j<this.triggers.length;j++)D.push(this.triggers[j].Y());this.lg=(new Date).valueOf(),this.u.k(O.I.C.rE,D),this.u.k(O.I.C.oE,this.lg)}bg(){this.u&&((this.u.j(O.I.C.oE)||0)>this.lg?this.ag():this.fg())}Rs(D){let j=!1;if(null!=D&&D.triggers){this.ig.Yr(),this.fg();const z={},Z={};this.triggers=[];for(let ae=0;ae<D.triggers.length;ae++){const fe=N.Z.fromJson(D.triggers[ae]);if(fe){fe.id&&null!=this.og[fe.id]&&(fe.ed(this.og[fe.id]),z[fe.id]=this.og[fe.id]),fe.id&&null!=this.ng[fe.id]&&(Z[fe.id]=this.ng[fe.id]);for(let Pe=0;Pe<fe.Ku.length;Pe++)if(fe.Ku[Pe].sc(M.Z.kt,null)){j=!0;break}this.triggers.push(fe)}}(0,k.Xy)(this.og,z)||(this.og=z,this.u&&this.u.k(O.I.C.nE,this.og)),(0,k.Xy)(this.ng,Z)||(this.ng=Z,this.u&&this.u.k(O.I.C.iE,this.ng)),this.mg(),j&&(x.Z.info("Trigger with test condition found, firing test."),this.fe(M.Z.kt)),this.fe(M.Z.OPEN);const q=this.sg;let X;this.sg=[];for(let ae=0;ae<q.length;ae++)X=Array.prototype.slice.call(q[ae]),this.fe(...X)}}cg(D,j,z,Z,q){const X=Ie=>{this.fg();const De=(new Date).valueOf();D.hd(j)||(!1===navigator.onLine&&D.type===N.Z.Or.Cr&&Ie.imageUrl?x.Z.info("Not showing ".concat(D.type," trigger action ").concat(D.id," due to offline state.")):D.sd(De)&&this.wg(D,De,z)?0===this.Jt.ic()?x.Z.info("Not displaying trigger ".concat(D.id," because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.")):(this.Jt.Dt([Ie]),this.yg(D,De)):x.Z.info("Not displaying trigger ".concat(D.id," because display time fell outside of the acceptable time window.")))},ae=()=>{this.fg();const Ie=q.pop();if(null!=Ie)if(this.Tg(Ie,j,z,Z,q),Ie.hd(j)){let De="Server aborted in-app message display, but the timeout on fallback trigger ".concat(Ie.id," has already elapsed.");q.length>0&&(De+=" Continuing to fall back."),x.Z.info(De),ae()}else{x.Z.info("Server aborted in-app message display. Falling back to lower priority ".concat(Ie.type," trigger action ").concat(D.id,"."));const De=1e3*Ie.Wu-((new Date).valueOf()-j);De>0?this.eg.push(window.setTimeout(()=>{this.cg(Ie,j,z,Z,q)},De)):this.cg(Ie,j,z,Z,q)}};let fe,Pe,Ae;switch(D.type){case N.Z.Or.Cr:if(fe=(0,C.q)(D.data),null==fe){x.Z.error("Could not parse trigger data for trigger ".concat(D.id,", ignoring."));break}if(Pe=this.ig.Qi(fe),Pe){x.Z.error(Pe),ae();break}X(fe);break;case N.Z.Or.od:if(Ae=E.fromJson(D.data,X,ae,j,D.Kr||0),null==Ae){x.Z.error("Could not parse trigger data for trigger ".concat(D.id,", ignoring."));break}this.ig.Yi(Ae,z,Z);break;default:x.Z.error("Trigger ".concat(D.id," was of unexpected type ").concat(D.type,", ignoring."))}}fe(D,j=null,z){if(!(0,k.fk)(M.Z,D,"Cannot fire trigger action.","TriggerEvents"))return;if(this.Ei&&this.Ei.Tu())return x.Z.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),void this.sg.push(arguments);this.bg();const Z=(new Date).valueOf(),q=Z-(this.hg||0);let X=!0,ae=!0;const fe=[];for(let Ae=0;Ae<this.triggers.length;Ae++){const Ie=this.triggers[Ae],De=Z+1e3*Ie.Wu;if(Ie.sd(De)&&(null==Ie.startTime||Ie.startTime.valueOf()<=Z)&&(null==Ie.endTime||Ie.endTime.valueOf()>=Z)){let Te=!1;for(let xe=0;xe<Ie.Ku.length;xe++)if(Ie.Ku[xe].sc(D,j)){Te=!0;break}Te&&(X=!1,this.wg(Ie,De,D)&&(ae=!1,fe.push(Ie)))}}if(X)return void x.Z.info("Trigger event ".concat(D," did not match any trigger conditions."));if(ae)return void x.Z.info("Ignoring ".concat(D," trigger event because a trigger was displayed ").concat(q/1e3,"s ago."));fe.sort((Ae,Ie)=>Ae.priority-Ie.priority);const Pe=fe.pop();null!=Pe&&(x.Z.info("Firing ".concat(Pe.type," trigger action ").concat(Pe.id," from trigger event ").concat(D,".")),this.Tg(Pe,Z,D,z,fe),0===Pe.Wu?this.cg(Pe,Z,D,z,fe):this.eg.push(window.setTimeout(()=>{this.cg(Pe,Z,D,z,fe)},1e3*Pe.Wu)))}changeUser(D=!1){if(this.triggers=[],this.u&&this.u.hi(O.I.C.rE),!D){this.sg=[],this.hg=null,this.og={},this.ng={};for(let j=0;j<this.eg.length;j++)clearTimeout(this.eg[j]);this.eg=[],this.u&&(this.u.hi(O.I.C.aE),this.u.hi(O.I.C.nE),this.u.hi(O.I.C.iE))}}clearData(){this.triggers=[],this.hg=null,this.og={},this.ng={};for(let D=0;D<this.eg.length;D++)clearTimeout(this.eg[D]);this.eg=[]}wg(D,j,z){if(null==this.hg)return!0;if(z===M.Z.kt)return x.Z.info("Ignoring minimum interval between trigger because it is a test type."),!0;let Z=D.Zu;return null==Z&&(Z=this.tg),j-this.hg>=1e3*Z}Tg(D,j,z,Z,q){this.fg(),D.id&&(this.ng[D.id]=this.ng[D.id]||[]);const X={};let ae;X.Jr=j,X.ug=z,null!=Z&&(ae=Z.Y()),X.dg=ae;const fe=[];for(const Pe of q)Pe.id&&fe.push(Pe.id);X.pg=fe,D.id&&this.ng[D.id].push(X),this.u&&this.u.k(O.I.C.iE,this.ng)}yg(D,j){this.fg(),D.ed(j),this.hg=j,D.id&&(this.og[D.id]=j),this.u&&(this.u.k(O.I.C.aE,j),this.u.k(O.I.C.nE,this.og))}}const S={t:!1,provider:null,rr:()=>(S.o(),S.provider||S.rg(),S.provider),rg:()=>{if(!S.provider){const L=f.ZP.nn(f.JY.Oo);S.provider=new I(null!=L?L:30,y.Z.m().He(),f.ZP.l(),f.ZP.cr(),y.Z.m()),f.ZP.ar(S.provider)}},o:()=>{S.t||(S.rg(),f.ZP.g(S),S.t=!0)},destroy:()=>{S.provider=null,S.t=!1}}},50895:(Q,F,v)=>{"use strict";v.d(F,{e:()=>f});var y=v(27885);function f(A,C,P){const k=A||document.querySelector("head"),O="ab-".concat(C,"-css-definitions-").concat("5.2.0".replace(/\./g,"-"));if(!k)return;const E=k.ownerDocument||document;if(null==E.getElementById(O)){const N=E.createElement("style");N.innerHTML=P||"",N.id=O;const M=y.ZP.nn(y.JY.ho);null!=M&&N.setAttribute("nonce",M),k.appendChild(N)}}},11406:(Q,F,v)=>{"use strict";v.d(F,{B:()=>C});var y=v(50895),f=v(76819);function C(){(function A(P){(0,y.e)(P,"feed","body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}")})(),(0,f.N)()}},76819:(Q,F,v)=>{"use strict";v.d(F,{N:()=>f});var y=v(27885);function f(){if(y.ZP.nn(y.JY.Mo))return;const A="https://use.fontawesome.com/7f85a56ba4.css";if(null===document.querySelector('link[rel=stylesheet][href="'+A+'"]')){const C=document.createElement("link");C.setAttribute("rel","stylesheet"),C.setAttribute("href",A),document.getElementsByTagName("head")[0].appendChild(C)}}},53456:(Q,F,v)=>{"use strict";v.d(F,{A9:()=>P,OL:()=>E,Tu:()=>O,je:()=>M,yi:()=>k,zA:()=>x});var y=v(52387),f=v(13658),A=v(65752),C=v(48809);const P={types:{ro:"container",logCustomEvent:"logCustomEvent",setEmailNotificationSubscriptionType:"setEmailNotificationSubscriptionType",setPushNotificationSubscriptionType:"setPushNotificationSubscriptionType",setCustomUserAttribute:"setCustomUserAttribute",requestPushPermission:"requestPushPermission",addToSubscriptionGroup:"addToSubscriptionGroup",removeFromSubscriptionGroup:"removeFromSubscriptionGroup",addToCustomAttributeArray:"addToCustomAttributeArray",removeFromCustomAttributeArray:"removeFromCustomAttributeArray",no:"openLink",ao:"openLinkInWebView"},properties:{type:"type",oo:"steps",eo:"args"}},k={Vi:"unknownBrazeAction",Xi:"noPushPrompt"},O=(I,S)=>{switch(I){case k.Vi:return"".concat(S," contains an unknown braze action type and will not be displayed.");case k.Xi:return"".concat(S," contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.");default:return""}};function E(I){try{const S=I.match(C.y9),L=S?S[0].length:null,D=L?I.substring(L):null;if(null==L||L>I.length-1||!D)return void y.Z.error("Did not find base64 encoded brazeAction in url to process : ".concat(I));const j=(0,A.T)(D);return j?JSON.parse(j):void y.Z.error("Failed to decode base64 encoded brazeAction: ".concat(D))}catch(S){return void y.Z.error("Failed to process brazeAction URL ".concat(I," : ").concat((0,f.e)(S)))}}function N(I,S){let L=!1;if(S)for(const D of S)if(L=L||I(D),L)return!0;return!1}function M(I){const S=P.properties.type,L=P.properties.oo;try{if(null==I)return!0;const D=I[S];return D===P.types.ro?N(M,I[L]):!(0,C.OM)(D)}catch(D){return!0}}function x(I){if(!I||!(0,C.zR)(I))return!1;const D=I[P.properties.type];return D===P.types.ro?N(x,I[P.properties.oo]):D===P.types.requestPushPermission}},72565:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>O});var y=v(47799);class f{constructor(){}tf(){}ef(){}Da(N){}static rf(N,M){if(N&&M)if(N=N.toLowerCase(),(0,y.kJ)(M.if)){for(let x=0;x<M.if.length;x++)if(-1!==N.indexOf(M.if[x].toLowerCase()))return M.identity}else if(-1!==N.indexOf(M.if.toLowerCase()))return M.identity}}var A=v(34841);class C extends f{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){const N=this.hc();this.browser=N.browser||"Unknown Browser",this.version=N.version||"Unknown Version"}this.OS=null}tf(){return this.browser}ef(){return this.version}Da(N){if(this.OS)return Promise.resolve(this.OS);const M=x=>{for(let I=0;I<N.length;I++){const S=C.rf(x,N[I]);if(S)return this.OS=S,this.OS}return x};return this.userAgentData.platform?Promise.resolve(M(this.userAgentData.platform)):this.getHighEntropyValues().then(x=>x.platform?M(x.platform):navigator.platform).catch(()=>navigator.platform)}hc(){const N={},M=this.userAgentData.brands;if(M&&M.length)for(const x of M){const I=this.uc(A.s),S=x.brand.match(I);if(S&&S.length>0){N.browser=S[0],N.version=x.version;break}}return N}uc(N){const M=[];for(const x in N)M.push(N[x]);return new RegExp("("+M.join("|")+")","i")}getHighEntropyValues(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()}}class P extends f{constructor(){super(),this.nd=P.hc(navigator.userAgent||"")}tf(){return this.nd[0]||"Unknown Browser"}ef(){return this.nd[1]||"Unknown Version"}Da(N){for(let M=0;M<N.length;M++){let I=P.rf(N[M].string,N[M]);if(I)return I===A.T.Pg&&navigator.maxTouchPoints>1&&(I=A.T.io),Promise.resolve(I)}return Promise.resolve(navigator.platform)}static hc(N){let M,x=N.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(-1!==N.indexOf("(Web0S; Linux/SmartTV)"))return["LG Smart TV",null];if(-1!==N.indexOf("CrKey"))return["Chromecast",null];if(-1!==N.indexOf("BRAVIA")||-1!==N.indexOf("SonyCEBrowser")||-1!==N.indexOf("SonyDTV"))return["Sony Smart TV",null];if(-1!==N.indexOf("PhilipsTV"))return["Philips Smart TV",null];if(N.match(/\b(Roku)\b/))return["Roku",null];if(N.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(x[1]===A.s.rO&&(M=N.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),null!=M))return M=M.slice(1),M[0]=M[0].replace("OPR",A.s.oO),M[0]=M[0].replace("EdgA",A.s.eO),"Edg"===M[0]&&(M[0]=A.s.eO),[M[0],M[1]];if(x[1]===A.s.Bg&&(M=N.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),null!=M))return M=M.slice(1),M[0]=M[0].replace("EdgiOS",A.s.eO),[M[0],M[1]];if(x=x[2]?[x[1],x[2]]:[null,null],x[0]===A.s.Bg&&null!=(M=N.match(/version\/(\.?\d+(\.\d+)*)/i))&&x.splice(1,1,M[1]),null!=(M=N.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))&&x.splice(1,1,M[2]),x[0]===A.s.oO&&null!=(M=N.match(/mini\/(\.?\d+(\.\d+)*)/i)))return["Opera Mini",M[1]||""];if(x[0]){const I=x[0].toLowerCase();"crios"===I&&(x[0]=A.s.rO),"tizen"===I&&(x[0]="Samsung Smart TV",x[1]=null),"samsungbrowser"===I&&(x[0]="Samsung Browser")}return x}}class k{constructor(){const N=navigator.userAgentData?C:P;this.Sg=new N,this.userAgent=navigator.userAgent,this.browser=this.Sg.tf(),this.version=this.Sg.ef(),this.OS=null,this.Da().then(x=>this.OS=x);const M=navigator;this.language=(M.userLanguage||M.language||M.browserLanguage||M.systemLanguage||"").toLowerCase(),this.Qo=k.vg(this.userAgent)}dE(){return this.browser===A.s.Bg}Fa(){return this.OS||null}Da(){return this.OS?Promise.resolve(this.OS):this.Sg.Da(k.kg).then(N=>(this.OS=N,N))}static vg(N){N=N.toLowerCase();const M=["googlebot","bingbot","slurp","duckduckbot","baiduspider","yandex","facebookexternalhit","sogou","ia_archiver","https://github.com/prerender/prerender","aolbuild","bingpreview","msnbot","adsbot","mediapartners-google","teoma","taiko"];for(let x=0;x<M.length;x++)if(-1!==N.indexOf(M[x]))return!0;return!1}}k.kg=[{string:navigator.platform,if:"Win",identity:A.T.Og},{string:navigator.platform,if:"Mac",identity:A.T.Pg},{string:navigator.platform,if:"BlackBerry",identity:"BlackBerry"},{string:navigator.platform,if:"FreeBSD",identity:"FreeBSD"},{string:navigator.platform,if:"OpenBSD",identity:"OpenBSD"},{string:navigator.platform,if:"Nintendo",identity:"Nintendo"},{string:navigator.platform,if:"SunOS",identity:"SunOS"},{string:navigator.platform,if:"PlayStation",identity:"PlayStation"},{string:navigator.platform,if:"X11",identity:"X11"},{string:navigator.userAgent,if:["iPhone","iPad","iPod"],identity:A.T.io},{string:navigator.platform,if:"Pike v",identity:A.T.io},{string:navigator.userAgent,if:["Web0S"],identity:"WebOS"},{string:navigator.platform,if:["Linux armv7l","Android"],identity:A.T.xg},{string:navigator.userAgent,if:["Android"],identity:A.T.xg},{string:navigator.platform,if:"Linux",identity:"Linux"}];const O=new k},47799:(Q,F,v)=>{"use strict";v.d(F,{J_:()=>P,Kn:()=>k,VO:()=>f,XP:()=>E,Xy:()=>N,fk:()=>A,jV:()=>O,kJ:()=>C});var y=v(52387);function f(M){const x=[];let I;for(const S in M)I=S,Object.prototype.hasOwnProperty.call(M,I)&&void 0!==M[I]&&x.push(M[I]);return x}function A(M,x,I,S){const L=f(M);return-1!==L.indexOf(x)||(y.Z.error("".concat(I," Valid values from ").concat(S,' are "').concat(L.join('"/"'),'".')),!1)}function C(M){return Array.isArray?Array.isArray(M):"[object Array]"===Object.prototype.toString.call(M)}function P(M){return"[object Date]"===Object.prototype.toString.call(M)}function k(M){return"[object Object]"===Object.prototype.toString.call(M)}function O(M,...x){null==M&&(M=[]);const I=[],S=arguments.length;for(let L=0,D=M.length;L<D;L++){const j=M[L];if(-1!==I.indexOf(j))continue;let z=1;for(z=1;z<S&&-1!==arguments[z].indexOf(j);z++);z===S&&I.push(j)}return I}function E(M){const x=[];for(const I in M)Object.prototype.hasOwnProperty.call(M,I)&&x.push(I);return x}function N(M,x){if(M===x)return 0!==M||1/M==1/x;if(null==M||null==x)return M===x;const I=M.toString();if(I!==x.toString())return!1;switch(I){case"[object RegExp]":case"[object String]":return""+M==""+x;case"[object Number]":return+M!=+M?+x!=+x:0==+M?1/+M==1/x:+M==+x;case"[object Date]":case"[object Boolean]":return+M==+x}const S="[object Array]"===I;if(!S){if("object"!=typeof M||"object"!=typeof x)return!1;const z=M.constructor,Z=x.constructor;if(z!==Z&&!("function"==typeof z&&z instanceof z&&"function"==typeof Z&&Z instanceof Z)&&"constructor"in M&&"constructor"in x)return!1}const L=[],D=[];let j=L.length;for(;j--;)if(L[j]===M)return D[j]===x;if(L.push(M),D.push(x),S){if(j=M.length,j!==x.length)return!1;for(;j--;)if(!N(M[j],x[j]))return!1}else{const z=E(M);let Z;if(j=z.length,E(x).length!==j)return!1;for(;j--;)if(Z=z[j],!Object.prototype.hasOwnProperty.call(x,Z)||!N(M[Z],x[Z]))return!1}return L.pop(),D.pop(),!0}},69019:(Q,F,v)=>{"use strict";v.d(F,{B:()=>A});var y=v(36859),f=v(72606);function A(C,P,k){const O=document.createElement("button");O.setAttribute("aria-label",C),O.setAttribute("tabindex","0"),O.setAttribute("role","button"),(0,y.lj)(O,"touchstart"),O.className="ab-close-button";const E=(0,y.MK)("0 0 15 15","M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z",P);return O.appendChild(E),O.addEventListener("keydown",N=>{N.keyCode!==f.m.Fo&&N.keyCode!==f.m.To||(k(),N.stopPropagation())}),O.onclick=N=>{k(),N.stopPropagation()},O}},73345:(Q,F,v)=>{"use strict";v.d(F,{$N:()=>E,BT:()=>P,FX:()=>f,Pn:()=>A,Rd:()=>k,X2:()=>C,_0:()=>O,yo:()=>N});var y=v(47799);function f(M,x=!1){let I=M/1e3;return x&&(I=Math.floor(I)),I}function A(M){return 1e3*M}function C(M){if(null==M)return null;const x=parseInt(M.toString());return isNaN(x)?null:new Date(1e3*x)}function P(M){return null!=M&&(0,y.J_)(M)?M.toISOString().replace(/\.[0-9]{3}Z$/,""):M}function k(M){return null==M||""===M?null:new Date(M)}function O(M){return null==M||""===M?(new Date).valueOf():M}function E(M){return((new Date).valueOf()-M.valueOf())/1e3}function N(M){return(M.valueOf()-(new Date).valueOf())/1e3}},34841:(Q,F,v)=>{"use strict";v.d(F,{T:()=>f,s:()=>y});const y={rO:"Chrome",eO:"Edge",oO:"Opera",Bg:"Safari",OO:"Firefox"},f={xg:"Android",io:"iOS",Pg:"Mac",Og:"Windows"}},36859:(Q,F,v)=>{"use strict";v.d(F,{$j:()=>M,FZ:()=>x,Fr:()=>N,MK:()=>I,QZ:()=>k,lP:()=>C,lj:()=>O,mQ:()=>P,rJ:()=>E});var y=v(52387),f=v(13658);const C={dc:null,co:function A(S,L=!1,D=!1,j=!1){if(null==S)return!1;L=L||!1,D=D||!1;const z=S.getBoundingClientRect();return null!=z&&(z.top>=0&&z.top<=(window.innerHeight||document.documentElement.clientHeight)||!L)&&(z.left>=0||!j)&&(z.bottom>=0&&z.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!D)&&(z.right<=(window.innerWidth||document.documentElement.clientWidth)||!j)}},P={De:"up",Ee:"down",U:"left",V:"right"};function k(){if(null==C.dc){C.dc=!1;try{const S=Object.defineProperty({},"passive",{get:()=>{C.dc=!0}});window.addEventListener("testPassive",()=>{},S),window.removeEventListener("testPassive",()=>{},S)}catch(S){y.Z.error((0,f.e)(S))}}return C.dc}function O(S,L,D=(()=>{})){S.addEventListener(L,D,!!k()&&{passive:!0})}function E(S){return C.co(S,!0,!1,!1)}function N(S){return C.co(S,!1,!0,!1)}function M(S){if(S.onclick){const L=document.createEvent("MouseEvents");L.initEvent("click",!0,!0),S.onclick.apply(S,[L])}}function x(S,L,D){let j=null,z=null;O(S,"touchstart",Z=>{j=Z.touches[0].clientX,z=Z.touches[0].clientY}),O(S,"touchmove",Z=>{if(null==j||null==z)return;const q=j-Z.touches[0].clientX,X=z-Z.touches[0].clientY;Math.abs(q)>Math.abs(X)&&Math.abs(q)>=25?((q>0&&L===P.U||q<0&&L===P.V)&&D(Z),j=null,z=null):Math.abs(X)>=25&&((X>0&&L===P.De&&S.scrollTop===S.scrollHeight-S.offsetHeight||X<0&&L===P.Ee&&0===S.scrollTop)&&D(Z),j=null,z=null)})}function I(S,L,D){const j="http://www.w3.org/2000/svg",z=document.createElementNS(j,"svg");z.setAttribute("viewBox",S),z.setAttribute("xmlns",j);const Z=document.createElementNS(j,"path");return Z.setAttribute("d",L),null!=D&&Z.setAttribute("fill",D),z.appendChild(Z),z}},13658:(Q,F,v)=>{"use strict";v.d(F,{e:()=>y});const y=f=>f instanceof Error?f.message:String(f)},72606:(Q,F,v)=>{"use strict";v.d(F,{m:()=>y});const y={Fo:32,lo:9,To:13,mh:27}},32775:(Q,F,v)=>{"use strict";v.d(F,{R:()=>y});const y=(f,A)=>(f=Math.ceil(f),A=Math.floor(A),Math.floor(Math.random()*(A-f+1))+f)},21494:(Q,F,v)=>{"use strict";v.d(F,{D:()=>P,Z:()=>k});var y=v(52387),f=v(23810),A=v(13658);const P=O=>{const E={},N=O.toString().split("\r\n");if(!N)return E;let M,x;for(const I of N)I&&(M=I.slice(0,I.indexOf(":")).toLowerCase().trim(),x=I.slice(I.indexOf(":")+1).trim(),E[M]=x);return E},k={Qs:O=>{let E,N;try{let x=!1;if(window.XMLHttpRequest&&(x=!0),!x)return void y.Z.error("This browser does not have any supported ajax options!");E=new XMLHttpRequest;const I=()=>{"function"==typeof O.error&&O.error(E.status),"function"==typeof O.ti&&O.ti(!1)};E.onload=()=>{let L=!1;if(4===E.readyState)if(L=E.status>=200&&E.status<300||304===E.status,L){if("function"==typeof O.L){let D,j;try{D=JSON.parse(E.responseText),j=E.getAllResponseHeaders()}catch(z){(0,O.L)({error:""===E.responseText?f.Z.Ra:f.Z.Ba,response:E.responseText},j)}D&&O.L(D,j)}"function"==typeof O.ti&&O.ti(!0)}else I()},E.onerror=()=>{I()},E.ontimeout=()=>{I()},N=JSON.stringify(O.data),E.open("POST",O.url,!0),E.setRequestHeader("Content-type","application/json"),E.setRequestHeader("X-Requested-With","XMLHttpRequest");const S=O.headers||[];for(const L of S)E.setRequestHeader(L[0],L[1]);E.send(N)}catch(M){y.Z.error("Network request error: ".concat((0,A.e)(M)))}}}},64038:(Q,F,v)=>{"use strict";v.d(F,{Z:()=>C});var y=v(85016),f=v(71221);const A={Gs:{La:"d",Bs:"cc",qi:"ff",_r:"t"},ii:{La:"/data",Bs:"/content_cards/sync",qi:"/feature_flags/sync",_r:"/template"},mc:P=>null==P?void 0:P.j(f.I.C.EE),Ac:P=>null==P?void 0:P.j(f.I.C.lE),Tc:(P,k)=>{null==P||P.k(f.I.C.EE,k)},Rc:(P,k)=>{null==P||P.k(f.I.C.lE,k)},Wa:(P,k)=>{if(!P||!k)return-1;const O=A.mc(P);if(null==O)return-1;const E=O[k];return null==E||isNaN(E)?-1:E},Ya:(P,k)=>{let O=y.S6;if(!P||!k)return O;const E=A.Ac(P);return null==E?O:(O=E[k],null==O||isNaN(O)?y.S6:O)},Os:(P,k,O)=>{if(!P||!k)return;let E=A.mc(P);null==E&&(E={}),E[k]=O,A.Tc(P,E)},Ys:(P,k,O)=>{if(!P||!k)return;let E=A.Ac(P);null==E&&(E={}),E[k]=O,A.Rc(P,E)},si:(P,k)=>{if(!P||!k)return;const O=A.Ya(P,k);A.Ys(P,k,O+1)}},C=A},65752:(Q,F,v)=>{"use strict";v.d(F,{E:()=>f,T:()=>A});var y=v(52387);function f(C){let P=C.length;for(let k=C.length-1;k>=0;k--){const O=C.charCodeAt(k);O>127&&O<=2047?P++:O>2047&&O<=65535&&(P+=2),O>=56320&&O<=57343&&k--}return P}function A(C){try{C=C.replace(/-/g,"+").replace(/_/g,"/");const P=window.atob(C),k=new Uint8Array(P.length);for(let E=0;E<P.length;E++)k[E]=P.charCodeAt(E);const O=new Uint16Array(k.buffer);return String.fromCharCode(...O)}catch(P){return y.Z.error("Unable to decode Base64: "+P),null}}},60408:(Q,F,v)=>{"use strict";function y(A){null==A&&(A="");const C=A.split("?").slice(1).join("?"),P={};if(null!=C){const k=C.split("&");for(let O=0;O<k.length;O++){const E=k[O].split("=");""!==E[0]&&(P[E[0]]=E[1])}}return P}function f(A){return!(!A||0!==(A=A.toString().toLowerCase()).lastIndexOf("javascript:",0)&&0!==A.lastIndexOf("data:",0))}v.d(F,{L:()=>y,o:()=>f})},48809:(Q,F,v)=>{"use strict";v.d(F,{$g:()=>Ae,OM:()=>Te,UO:()=>q,bj:()=>Z,lg:()=>Pe,ro:()=>fe,vV:()=>Ie,y9:()=>j,zM:()=>z,zR:()=>De});var y=v(47799),f=v(65752),A=v(52387),C=v(73345),P=v(53456),k=v(85016);const O=/^[^\x00-\x1F\x22]+$/,E=/[$.]/,N=["$add","$update","$remove","$identifier_key","$identifier_value","$new_object","$time","$google_ad_personalization","$google_ad_user_data"],M=new RegExp(/^.+@.+\..+$/),j=/^brazeActions:\/\/v\d+\//;function z(xe,Ge,Ue){const st=null!=xe&&"string"==typeof xe&&(""===xe||null!=xe.match(O));return st||A.Z.error("Cannot ".concat(Ge," because ").concat(Ue,' "').concat(xe,'" is invalid.')),st}function Z(xe){return null!=xe&&xe.match(E)&&-1===N.indexOf(xe)&&A.Z.warn("Custom attribute keys cannot contain '$' or '.'"),z(xe,"set custom user attribute","the given key")}function q(xe){const Ge=typeof xe;return null==xe||"number"===Ge||"boolean"===Ge||(0,y.J_)(xe)||"string"===Ge}function X(xe,Ge,Ue){const st=-1!==Ue;if(st&&Ue>50)return A.Z.error("Nested attributes cannot be more than 50 levels deep."),!1;const It=st?Ue+1:-1;if((0,y.kJ)(xe)&&(0,y.kJ)(Ge)){for(let xt=0;xt<xe.length&&xt<Ge.length;xt++)if((0,y.J_)(xe[xt])&&(Ge[xt]=(0,C.BT)(xe[xt])),!X(xe[xt],Ge[xt],It))return!1}else{if(!(0,y.Kn)(xe))return q(xe);for(const xt of(0,y.XP)(xe)){const gt=xe[xt];if(st&&!Z(xt)||((0,y.J_)(gt)&&(Ge[xt]=(0,C.BT)(gt)),!X(gt,Ge[xt],It)))return!1}}return!0}function ae(xe,Ge,Ue,st,It){let xt;return xt=(0,y.Kn)(xe)||(0,y.kJ)(xe)?X(xe,Ge,It?1:-1):q(xe),xt||A.Z.error("Cannot ".concat(Ue," because ").concat(st,' "').concat(xe,'" is invalid.')),xt}function fe(xe,Ge,Ue,st=!1){const It="string"==typeof xe||null===xe&&st;return It||A.Z.error("Cannot ".concat(Ge," because ").concat(Ue,' "').concat(xe,'" is invalid.')),It}function Pe(xe,Ge,Ue,st,It){if(null==xe&&(xe={}),"object"!=typeof xe||(0,y.kJ)(xe))return A.Z.error("".concat(Ge," requires that ").concat(Ue," be an object. Ignoring ").concat(It,".")),[!1,null];let xt,gt;Ge===k.db?(xt=76800,gt="75KB"):(xt=51200,gt="50KB");const At=JSON.stringify(xe);if((0,f.E)(At)>xt)return A.Z.error("Could not ".concat(st," because ").concat(Ue," was greater than the max size of ").concat(gt,".")),[!1,null];let ht;try{ht=JSON.parse(At)}catch(dt){return A.Z.error("Could not ".concat(st," because ").concat(Ue," did not contain valid JSON.")),[!1,null]}for(const dt in xe){if(Ge===k.db&&!Z(dt))return[!1,null];if(!z(dt,st,"the ".concat(It," property name")))return[!1,null];const kt=xe[dt];if(Ge===k.db||null!=kt){if((0,y.J_)(kt)&&(ht[dt]=(0,C.BT)(kt)),!ae(kt,ht[dt],st,"the ".concat(It,' property "').concat(dt,'"'),Ge===k.db))return[!1,null]}else delete xe[dt],delete ht[dt]}return[!0,ht]}function Ae(xe,Ge){let Ue=!1,st=!1;const It=()=>{A.Z.error("Custom attribute arrays must be either string arrays or object arrays.")};for(const xt of Ge)if("string"==typeof xt){if(st)return It(),[!1,!1];if(!z(xt,'set custom user attribute "'.concat(xe,'"'),"the element in the given array"))return[!1,!1];Ue=!0}else{if(!(0,y.Kn)(xt))return It(),[!1,!1];if(Ue)return It(),[!1,!1];if(!Pe(xt,k.db,"attribute value",'set custom user attribute "'.concat(xe,'"'),"custom user attribute"))return[!1,!1];st=!0}return[Ue,st]}function Ie(xe){return"string"==typeof xe&&null!=xe.toLowerCase().match(M)}function De(xe){if(!(P.A9.properties.type in xe))return!1;switch(xe[P.A9.properties.type]){case P.A9.types.ro:if(P.A9.properties.oo in xe)return!0;break;case P.A9.types.logCustomEvent:case P.A9.types.setEmailNotificationSubscriptionType:case P.A9.types.setPushNotificationSubscriptionType:case P.A9.types.setCustomUserAttribute:case P.A9.types.addToSubscriptionGroup:case P.A9.types.removeFromSubscriptionGroup:case P.A9.types.addToCustomAttributeArray:case P.A9.types.removeFromCustomAttributeArray:case P.A9.types.no:case P.A9.types.ao:if(P.A9.properties.eo in xe)return!0;break;case P.A9.types.requestPushPermission:return!0;default:return!1}return!1}function Te(xe){let Ge=!1;return Object.keys(P.A9.types).forEach(Ue=>{P.A9.types[Ue]!==xe.toString()||(Ge=!0)}),Ge}},62999:(Q,F,v)=>{"use strict";v.d(F,{SD:()=>k,eh:()=>y});const y={PORTRAIT:0,LANDSCAPE:1},k={openUri:function C(O,E,N){O&&(E||null!=N&&N.metaKey?window.open(O):window.location=O)},fo:function f(){return screen.width<=600},jo:function A(){if("orientation"in window)return 90===Math.abs(window.orientation)||270===window.orientation?y.LANDSCAPE:y.PORTRAIT;const O=window;if("screen"in O){let E=O.screen.orientation||screen.mozOrientation||screen.msOrientation;return null!=E&&"object"==typeof E&&(E=E.type),"landscape-primary"===E||"landscape-secondary"===E?y.LANDSCAPE:y.PORTRAIT}return y.PORTRAIT},Un:function P(){return window.location.href}}}},__webpack_module_cache__={};function __webpack_require__(Q){var F=__webpack_module_cache__[Q];if(void 0!==F)return F.exports;var v=__webpack_module_cache__[Q]={id:Q,loaded:!1,exports:{}};return __webpack_modules__[Q].call(v.exports,v,v.exports,__webpack_require__),v.loaded=!0,v.exports}__webpack_require__.n=Q=>{var F=Q&&Q.__esModule?()=>Q.default:()=>Q;return __webpack_require__.d(F,{a:F}),F},__webpack_require__.d=(Q,F)=>{for(var v in F)__webpack_require__.o(F,v)&&!__webpack_require__.o(Q,v)&&Object.defineProperty(Q,v,{enumerable:!0,get:F[v]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(Q){if("object"==typeof window)return window}}(),__webpack_require__.hmd=Q=>((Q=Object.create(Q)).children||(Q.children=[]),Object.defineProperty(Q,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+Q.id)}}),Q),__webpack_require__.o=(Q,F)=>Object.prototype.hasOwnProperty.call(Q,F),__webpack_require__.r=Q=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Q,"__esModule",{value:!0})},__webpack_require__.nmd=Q=>(Q.paths=[],Q.children||(Q.children=[]),Q);var __webpack_exports__={};(()=>{"use strict";var Q={};__webpack_require__.r(Q),__webpack_require__.d(Q,{BrazeSdkMetadata:()=>cae,CaptionedImage:()=>Eqe.Z,Card:()=>Mqe.Z,ClassicCard:()=>xqe.Z,ContentCards:()=>N_,ControlCard:()=>Aqe.Z,ControlMessage:()=>oI.Z,DeviceProperties:()=>Kqe.Z,FeatureFlag:()=>UWe.Z,Feed:()=>pWe.Z,FullScreenMessage:()=>LR.Z,HtmlMessage:()=>rI.Z,ImageOnly:()=>Oqe.Z,InAppMessage:()=>os.Z,InAppMessageButton:()=>pae.Z,ModalMessage:()=>Z4.Z,SlideUpMessage:()=>DR.Z,User:()=>FWe.Z,WindowUtils:()=>Wb.SD,addSdkMetadata:()=>qqe,automaticallyShowInAppMessages:()=>xWe,changeUser:()=>Wqe.changeUser,deferInAppMessage:()=>AWe,destroy:()=>$qe,destroyFeed:()=>uae,disableSDK:()=>Zqe,enableSDK:()=>Qqe,getAllFeatureFlags:()=>Cae,getCachedContentCards:()=>Vqe,getCachedFeed:()=>mWe,getDeferredInAppMessage:()=>RWe,getDeviceId:()=>Yqe,getFeatureFlag:()=>VWe,getUser:()=>lae.P,handleBrazeAction:()=>K4.h,hideContentCards:()=>rae,initialize:()=>Jqe,isDisabled:()=>Xqe,isPushBlocked:()=>kWe,isPushPermissionGranted:()=>LWe,isPushSupported:()=>DWe,logCardClick:()=>W4.d,logCardDismissal:()=>Rqe.K,logCardImpressions:()=>$4.p,logContentCardClick:()=>Lqe,logContentCardImpressions:()=>kqe,logCustomEvent:()=>eWe.logCustomEvent,logFeatureFlagImpression:()=>jWe,logFeedDisplayed:()=>fWe.j,logInAppMessageButtonClick:()=>gae,logInAppMessageClick:()=>mae,logInAppMessageHtmlClick:()=>NR,logInAppMessageImpression:()=>BR,logPurchase:()=>tWe.logPurchase,openSession:()=>nWe,refreshFeatureFlags:()=>GWe.refreshFeatureFlags,removeAllSubscriptions:()=>iWe,removeSubscription:()=>oWe.A,requestContentCardsRefresh:()=>oae,requestFeedRefresh:()=>gWe.a,requestImmediateDataFlush:()=>rWe.requestImmediateDataFlush,requestPushPermission:()=>BWe.requestPushPermission,setLogger:()=>sWe,setSdkAuthenticationSignature:()=>cWe,showContentCards:()=>aae,showFeed:()=>dae.showFeed,showInAppMessage:()=>vae,subscribeToContentCardsUpdates:()=>sae,subscribeToFeatureFlagsUpdates:()=>zWe,subscribeToFeedUpdates:()=>_We.n,subscribeToInAppMessage:()=>bae,subscribeToSdkAuthenticationFailures:()=>lWe,toggleContentCards:()=>Hqe,toggleFeed:()=>vWe,toggleLogging:()=>uWe,unregisterPush:()=>NWe.unregisterPush,wipeData:()=>dWe});var F={};__webpack_require__.r(F),__webpack_require__.d(F,{FunctionToString:()=>rfe,InboundFilters:()=>ife});var v={};function y(t,n,o,e,i,r,s){try{var a=t[r](s),c=a.value}catch(u){return void o(u)}a.done?n(c):Promise.resolve(c).then(e,i)}function f(t){return function(){var n=this,o=arguments;return new Promise(function(e,i){var r=t.apply(n,o);function s(c){y(r,e,i,s,a,"next",c)}function a(c){y(r,e,i,s,a,"throw",c)}s(void 0)})}}
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */function A(t,n){return Object.is(t,n)}__webpack_require__.r(v),__webpack_require__.d(v,{Breadcrumbs:()=>f8,GlobalHandlers:()=>yfe,LinkedErrors:()=>Sfe,TryCatch:()=>bfe,UserAgent:()=>wfe});let C=null,P=!1,k=1;const O=Symbol("SIGNAL");function E(t){const n=C;return C=t,n}const I={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function S(t){if(P)throw new Error("");if(null===C)return;C.consumerOnSignalRead(t);const n=C.nextProducerIndex++;De(C),n<C.producerNode.length&&C.producerNode[n]!==t&&Ie(C)&&Ae(C.producerNode[n],C.producerIndexOfThis[n]),C.producerNode[n]!==t&&(C.producerNode[n]=t,C.producerIndexOfThis[n]=Ie(C)?Pe(t,C,n):0),C.producerLastReadVersion[n]=t.version}function D(t){if((!Ie(t)||t.dirty)&&(t.dirty||t.lastCleanEpoch!==k)){if(!t.producerMustRecompute(t)&&!ae(t))return t.dirty=!1,void(t.lastCleanEpoch=k);t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=k}}function j(t){if(void 0===t.liveConsumerNode)return;const n=P;P=!0;try{for(const o of t.liveConsumerNode)o.dirty||Z(o)}finally{P=n}}function z(){var t;return!1!==(null===(t=C)||void 0===t?void 0:t.consumerAllowSignalWrites)}function Z(t){var n;t.dirty=!0,j(t),null===(n=t.consumerMarkedDirty)||void 0===n||n.call(t,t)}function q(t){return t&&(t.nextProducerIndex=0),E(t)}function X(t,n){if(E(n),t&&void 0!==t.producerNode&&void 0!==t.producerIndexOfThis&&void 0!==t.producerLastReadVersion){if(Ie(t))for(let o=t.nextProducerIndex;o<t.producerNode.length;o++)Ae(t.producerNode[o],t.producerIndexOfThis[o]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function ae(t){De(t);for(let n=0;n<t.producerNode.length;n++){const o=t.producerNode[n],e=t.producerLastReadVersion[n];if(e!==o.version||(D(o),e!==o.version))return!0}return!1}function Pe(t,n,o){if(Te(t),De(t),0===t.liveConsumerNode.length)for(let e=0;e<t.producerNode.length;e++)t.producerIndexOfThis[e]=Pe(t.producerNode[e],t,e);return t.liveConsumerIndexOfThis.push(o),t.liveConsumerNode.push(n)-1}function Ae(t,n){if(Te(t),De(t),1===t.liveConsumerNode.length)for(let e=0;e<t.producerNode.length;e++)Ae(t.producerNode[e],t.producerIndexOfThis[e]);const o=t.liveConsumerNode.length-1;if(t.liveConsumerNode[n]=t.liveConsumerNode[o],t.liveConsumerIndexOfThis[n]=t.liveConsumerIndexOfThis[o],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,n<t.liveConsumerNode.length){const e=t.liveConsumerIndexOfThis[n],i=t.liveConsumerNode[n];De(i),i.producerIndexOfThis[e]=n}}function Ie(t){var n,o;return t.consumerIsAlwaysLive||(null!==(n=null==t||null===(o=t.liveConsumerNode)||void 0===o?void 0:o.length)&&void 0!==n?n:0)>0}function De(t){var n,o,e;null!==(n=t.producerNode)&&void 0!==n||(t.producerNode=[]),null!==(o=t.producerIndexOfThis)&&void 0!==o||(t.producerIndexOfThis=[]),null!==(e=t.producerLastReadVersion)&&void 0!==e||(t.producerLastReadVersion=[])}function Te(t){var n,o;null!==(n=t.liveConsumerNode)&&void 0!==n||(t.liveConsumerNode=[]),null!==(o=t.liveConsumerIndexOfThis)&&void 0!==o||(t.liveConsumerIndexOfThis=[])}const Ge=Symbol("UNSET"),Ue=Symbol("COMPUTING"),st=Symbol("ERRORED"),It=(()=>({...I,value:Ge,dirty:!0,error:null,equal:A,producerMustRecompute:t=>t.value===Ge||t.value===Ue,producerRecomputeValue(t){if(t.value===Ue)throw new Error("Detected cycle in computations.");const n=t.value;t.value=Ue;const o=q(t);let e;try{e=t.computation()}catch(i){e=st,t.error=i}finally{X(t,o)}n!==Ge&&n!==st&&e!==st&&t.equal(n,e)?t.value=n:(t.value=e,t.version++)}}))();let gt=function xt(){throw new Error};function At(){gt()}let dt=null;function Xr(t,n){z()||At(),t.equal(t.value,n)||(t.value=n,function gr(t){var n;t.version++,function L(){k++}(),j(t),null===(n=dt)||void 0===n||n()}(t))}const uc=(()=>({...I,equal:A,value:void 0}))();function ut(t){return"function"==typeof t}function Wt(t){const o=t(e=>{Error.call(e),e.stack=(new Error).stack});return o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o}const Bt=Wt(t=>function(o){t(this),this.message=o?"".concat(o.length," errors occurred during unsubscription:\n").concat(o.map((e,i)=>"".concat(i+1,") ").concat(e.toString())).join("\n  ")):"",this.name="UnsubscriptionError",this.errors=o});function On(t,n){if(t){const o=t.indexOf(n);0<=o&&t.splice(o,1)}}class zt{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:o}=this;if(o)if(this._parentage=null,Array.isArray(o))for(const r of o)r.remove(this);else o.remove(this);const{initialTeardown:e}=this;if(ut(e))try{e()}catch(r){n=r instanceof Bt?r.errors:[r]}const{_finalizers:i}=this;if(i){this._finalizers=null;for(const r of i)try{ua(r)}catch(s){n=null!=n?n:[],s instanceof Bt?n=[...n,...s.errors]:n.push(s)}}if(n)throw new Bt(n)}}add(n){var o;if(n&&n!==this)if(this.closed)ua(n);else{if(n instanceof zt){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(o=this._finalizers)&&void 0!==o?o:[]).push(n)}}_hasParent(n){const{_parentage:o}=this;return o===n||Array.isArray(o)&&o.includes(n)}_addParent(n){const{_parentage:o}=this;this._parentage=Array.isArray(o)?(o.push(n),o):o?[o,n]:n}_removeParent(n){const{_parentage:o}=this;o===n?this._parentage=null:Array.isArray(o)&&On(o,n)}remove(n){const{_finalizers:o}=this;o&&On(o,n),n instanceof zt&&n._removeParent(this)}}zt.EMPTY=(()=>{const t=new zt;return t.closed=!0,t})();const zn=zt.EMPTY;function Gr(t){return t instanceof zt||t&&"closed"in t&&ut(t.remove)&&ut(t.add)&&ut(t.unsubscribe)}function ua(t){ut(t)?t():t.unsubscribe()}const gi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},si={setTimeout(t,n,...o){const{delegate:e}=si;return null!=e&&e.setTimeout?e.setTimeout(t,n,...o):setTimeout(t,n,...o)},clearTimeout(t){const{delegate:n}=si;return((null==n?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function To(t){si.setTimeout(()=>{const{onUnhandledError:n}=gi;if(!n)throw t;n(t)})}function sr(){}const da=$a("C",void 0,void 0);function $a(t,n,o){return{kind:t,value:n,error:o}}let xs=null;function Ra(t){if(gi.useDeprecatedSynchronousErrorHandling){const n=!xs;if(n&&(xs={errorThrown:!1,error:null}),t(),n){const{errorThrown:o,error:e}=xs;if(xs=null,o)throw e}}else t()}class Zc extends zt{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,Gr(n)&&n.add(this)):this.destination=jg}static create(n,o,e){return new Du(n,o,e)}next(n){this.isStopped?vd(function _d(t){return $a("N",t,void 0)}(n),this):this._next(n)}error(n){this.isStopped?vd(function ms(t){return $a("E",void 0,t)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?vd(da,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const _r=Function.prototype.bind;function Oc(t,n){return _r.call(t,n)}class th{constructor(n){this.partialObserver=n}next(n){const{partialObserver:o}=this;if(o.next)try{o.next(n)}catch(e){nh(e)}}error(n){const{partialObserver:o}=this;if(o.error)try{o.error(n)}catch(e){nh(e)}else nh(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(o){nh(o)}}}class Du extends Zc{constructor(n,o,e){let i;if(super(),ut(n)||!n)i={next:null!=n?n:void 0,error:null!=o?o:void 0,complete:null!=e?e:void 0};else{let r;this&&gi.useDeprecatedNextContext?(r=Object.create(n),r.unsubscribe=()=>this.unsubscribe(),i={next:n.next&&Oc(n.next,r),error:n.error&&Oc(n.error,r),complete:n.complete&&Oc(n.complete,r)}):i=n}this.destination=new th(i)}}function nh(t){gi.useDeprecatedSynchronousErrorHandling?function oa(t){gi.useDeprecatedSynchronousErrorHandling&&xs&&(xs.errorThrown=!0,xs.error=t)}(t):To(t)}function vd(t,n){const{onStoppedNotification:o}=gi;o&&si.setTimeout(()=>o(t,n))}const jg={closed:!0,next:sr,error:function xf(t){throw t},complete:sr},Bu="function"==typeof Symbol&&Symbol.observable||"@@observable";function ka(t){return t}function pp(t){return 0===t.length?ka:1===t.length?t[0]:function(o){return t.reduce((e,i)=>i(e),o)}}let ao=(()=>{class t{constructor(o){o&&(this._subscribe=o)}lift(o){const e=new t;return e.source=this,e.operator=o,e}subscribe(o,e,i){const r=function cm(t){return t&&t instanceof Zc||function Fl(t){return t&&ut(t.next)&&ut(t.error)&&ut(t.complete)}(t)&&Gr(t)}(o)?o:new Du(o,e,i);return Ra(()=>{const{operator:s,source:a}=this;r.add(s?s.call(r,a):a?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(o){try{return this._subscribe(o)}catch(e){o.error(e)}}forEach(o,e){return new(e=bd(e))((i,r)=>{const s=new Du({next:a=>{try{o(a)}catch(c){r(c),s.unsubscribe()}},error:r,complete:i});this.subscribe(s)})}_subscribe(o){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(o)}[Bu](){return this}pipe(...o){return pp(o)(this)}toPromise(o){return new(o=bd(o))((e,i)=>{let r;this.subscribe(s=>r=s,s=>i(s),()=>e(r))})}}return t.create=n=>new t(n),t})();function bd(t){var n;return null!==(n=null!=t?t:gi.Promise)&&void 0!==n?n:Promise}const Hg=Wt(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let sn=(()=>{class t extends ao{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(o){const e=new Cd(this,this);return e.operator=o,e}_throwIfClosed(){if(this.closed)throw new Hg}next(o){Ra(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const e of this.currentObservers)e.next(o)}})}error(o){Ra(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=o;const{observers:e}=this;for(;e.length;)e.shift().error(o)}})}complete(){Ra(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:o}=this;for(;o.length;)o.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var o;return(null===(o=this.observers)||void 0===o?void 0:o.length)>0}_trySubscribe(o){return this._throwIfClosed(),super._trySubscribe(o)}_subscribe(o){return this._throwIfClosed(),this._checkFinalizedStatuses(o),this._innerSubscribe(o)}_innerSubscribe(o){const{hasError:e,isStopped:i,observers:r}=this;return e||i?zn:(this.currentObservers=null,r.push(o),new zt(()=>{this.currentObservers=null,On(r,o)}))}_checkFinalizedStatuses(o){const{hasError:e,thrownError:i,isStopped:r}=this;e?o.error(i):r&&o.complete()}asObservable(){const o=new ao;return o.source=this,o}}return t.create=(n,o)=>new Cd(n,o),t})();class Cd extends sn{constructor(n,o){super(),this.destination=n,this.source=o}next(n){var o,e;null===(e=null===(o=this.destination)||void 0===o?void 0:o.next)||void 0===e||e.call(o,n)}error(n){var o,e;null===(e=null===(o=this.destination)||void 0===o?void 0:o.error)||void 0===e||e.call(o,n)}complete(){var n,o;null===(o=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===o||o.call(n)}_subscribe(n){var o,e;return null!==(e=null===(o=this.source)||void 0===o?void 0:o.subscribe(n))&&void 0!==e?e:zn}}class Qn extends sn{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const o=super._subscribe(n);return!o.closed&&n.next(this._value),o}getValue(){const{hasError:n,thrownError:o,_value:e}=this;if(n)throw o;return this._throwIfClosed(),e}next(n){super.next(this._value=n)}}function lm(t){return ut(null==t?void 0:t.lift)}function vr(t){return n=>{if(lm(n))return n.lift(function(o){try{return t(o,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}function eo(t,n,o,e,i){return new ih(t,n,o,e,i)}class ih extends Zc{constructor(n,o,e,i,r,s){super(n),this.onFinalize=r,this.shouldUnsubscribe=s,this._next=o?function(a){try{o(a)}catch(c){n.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){n.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=e?function(){try{e()}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:o}=this;super.unsubscribe(),!o&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}}function jn(t,n){return vr((o,e)=>{let i=0;o.subscribe(eo(e,r=>{e.next(t.call(n,r,i++))}))})}
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */const oh="https://g.co/ng/security#xss";class vt extends Error{constructor(n,o){super(function _l(t,n){const o="NG0".concat(Math.abs(t));return"".concat(o).concat(n?": "+n:"")}(n,o)),this.code=n}}function wd(t){return n=>{setTimeout(t,void 0,n)}}const ke=class mp extends sn{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,o,e){let i=n,r=o||(()=>null),s=e;if(n&&"object"==typeof n){var a,c,u;const b=n;i=null===(a=b.next)||void 0===a?void 0:a.bind(b),r=null===(c=b.error)||void 0===c?void 0:c.bind(b),s=null===(u=b.complete)||void 0===u?void 0:u.bind(b)}this.__isAsync&&(r=wd(r),i&&(i=wd(i)),s&&(s=wd(s)));const h=super.subscribe({next:i,error:r,complete:s});return n instanceof zt&&n.add(h),h}};var hn=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(hn||{});function di(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(di).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);const n=t.toString();if(null==n)return""+n;const o=n.indexOf("\n");return-1===o?n:n.substring(0,o)}function As(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}var _e=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(_e||{}),ye=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(ye||{});function Be(t){return{toString:t}.toString()}const Ye=globalThis,_n={},kn=[];function In(t){for(let n in t)if(t[n]===In)return n;throw Error("Could not find renamed property on target object.")}function to(t,n){for(const o in n)n.hasOwnProperty(o)&&!t.hasOwnProperty(o)&&(t[o]=n[o])}const Mr=In({\u0275cmp:In}),lu=In({\u0275dir:In}),Uu=In({\u0275pipe:In}),Zg=In({\u0275mod:In}),uu=In({\u0275fac:In}),Ec=In({__NG_ELEMENT_ID__:In}),w1=In({__NG_ENV_ID__:In});var mo=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(mo||{});function T1(t,n,o){let e=t.length;for(;;){const i=t.indexOf(n,o);if(-1===i)return i;if(0===i||t.charCodeAt(i-1)<=32){const r=n.length;if(i+r===e||t.charCodeAt(i+r)<=32)return i}o=i+1}}function Ty(t,n,o){let e=0;for(;e<o.length;){const i=o[e];if("number"==typeof i){if(0!==i)break;e++;const r=o[e++],s=o[e++],a=o[e++];t.setAttribute(n,s,a,r)}else{const r=i,s=o[++e];Qg(r)?t.setProperty(n,r,s):t.setAttribute(n,r,s),e++}}return e}function LO(t){return 3===t||4===t||6===t}function Qg(t){return 64===t.charCodeAt(0)}function fp(t,n){if(null!==n&&0!==n.length)if(null===t||0===t.length)t=n.slice();else{let o=-1;for(let e=0;e<n.length;e++){const i=n[e];"number"==typeof i?o=i:0===o||P1(t,o,i,null,-1===o||2===o?n[++e]:null)}}return t}function P1(t,n,o,e,i){let r=0,s=t.length;if(-1===n)s=-1;else for(;r<t.length;){const a=t[r++];if("number"==typeof a){if(a===n){s=-1;break}if(a>n){s=r-1;break}}}for(;r<t.length;){const a=t[r];if("number"==typeof a)break;if(a===o){if(null===e)return void(null!==i&&(t[r+1]=i));if(e===t[r+1])return void(t[r+2]=i)}r++,null!==e&&r++,null!==i&&r++}-1!==s&&(t.splice(s,0,n),r=s+1),t.splice(r++,0,o),null!==e&&t.splice(r++,0,e),null!==i&&t.splice(r++,0,i)}const DO="ng-template";function sB(t,n,o){let e=0,i=!0;for(;e<t.length;){let r=t[e++];if("string"==typeof r&&i){const s=t[e++];if(o&&"class"===r&&-1!==T1(s.toLowerCase(),n,0))return!0}else{if(1===r){for(;e<t.length&&"string"==typeof(r=t[e++]);)if(r.toLowerCase()===n)return!0;return!1}"number"==typeof r&&(i=!1)}}return!1}function BO(t){return 4===t.type&&t.value!==DO}function aB(t,n,o){return n===(4!==t.type||o?t.value:DO)}function cB(t,n,o){let e=4;const i=t.attrs||[],r=function WOe(t){for(let n=0;n<t.length;n++)if(LO(t[n]))return n;return t.length}(i);let s=!1;for(let a=0;a<n.length;a++){const c=n[a];if("number"!=typeof c){if(!s)if(4&e){if(e=2|1&e,""!==c&&!aB(t,c,o)||""===c&&1===n.length){if(Gu(e))return!1;s=!0}}else{const u=8&e?c:n[++a];if(8&e&&null!==t.attrs){if(!sB(t.attrs,u,o)){if(Gu(e))return!1;s=!0}continue}const b=Fv(8&e?"class":c,i,BO(t),o);if(-1===b){if(Gu(e))return!1;s=!0;continue}if(""!==u){let w;w=b>r?"":i[b+1].toLowerCase();const R=8&e?w:null;if(R&&-1!==T1(R,u,0)||2&e&&u!==w){if(Gu(e))return!1;s=!0}}}}else{if(!s&&!Gu(e)&&!Gu(c))return!1;if(s&&Gu(c))continue;s=!1,e=c|1&e}}return Gu(e)||s}function Gu(t){return 0==(1&t)}function Fv(t,n,o,e){if(null===n)return-1;let i=0;if(e||!o){let r=!1;for(;i<n.length;){const s=n[i];if(s===t)return i;if(3===s||6===s)r=!0;else{if(1===s||2===s){let a=n[++i];for(;"string"==typeof a;)a=n[++i];continue}if(4===s)break;if(0===s){i+=4;continue}}i+=r?1:2}return-1}return function $Oe(t,n){let o=t.indexOf(4);if(o>-1)for(o++;o<t.length;){const e=t[o];if("number"==typeof e)return-1;if(e===n)return o;o++}return-1}(n,t)}function NO(t,n,o=!1){for(let e=0;e<n.length;e++)if(cB(t,n[e],o))return!0;return!1}function KOe(t,n){e:for(let o=0;o<n.length;o++){const e=n[o];if(t.length===e.length){for(let i=0;i<t.length;i++)if(t[i]!==e[i])continue e;return!0}}return!1}function ZW(t,n){return t?":not("+n.trim()+")":n}function ZOe(t){let n=t[0],o=1,e=2,i="",r=!1;for(;o<t.length;){let s=t[o];if("string"==typeof s)if(2&e){const a=t[++o];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else 8&e?i+="."+s:4&e&&(i+=" "+s);else""!==i&&!Gu(s)&&(n+=ZW(r,i),i=""),e=s,r=r||!Gu(e);o++}return""!==i&&(n+=ZW(r,i)),n}function pe(t){return Be(()=>{var n;const o=YW(t),e={...o,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===_e.OnPush,directiveDefs:null,pipeDefs:null,dependencies:o.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:null!==(n=t.signals)&&void 0!==n&&n,data:t.data||{},encapsulation:t.encapsulation||ye.Emulated,styles:t.styles||kn,_:null,schemas:t.schemas||null,tView:null,id:""};JW(e);const i=t.dependencies;return e.directiveDefs=FO(i,!1),e.pipeDefs=FO(i,!0),e.id=function tEe(t){let n=0;const o=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(const i of o)n=Math.imul(31,n)+i.charCodeAt(0)<<0;return n+=2147483648,"c"+n}(e),e})}function JOe(t){return xo(t)||xc(t)}function XOe(t){return null!==t}function en(t){return Be(()=>({type:t.type,bootstrap:t.bootstrap||kn,declarations:t.declarations||kn,imports:t.imports||kn,exports:t.exports||kn,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function QW(t,n){if(null==t)return _n;const o={};for(const i in t)if(t.hasOwnProperty(i)){const r=t[i];let s,a,c=mo.None;var e;Array.isArray(r)?(c=r[0],s=r[1],a=null!==(e=r[2])&&void 0!==e?e:s):(s=r,a=r),n?(o[s]=c!==mo.None?[i,c]:i,n[s]=a):o[s]=i}return o}function qn(t){return Be(()=>{const n=YW(t);return JW(n),n})}function Vr(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function xo(t){return t[Mr]||null}function xc(t){return t[lu]||null}function vl(t){return t[Uu]||null}function Gl(t,n){const o=t[Zg]||null;if(!o&&!0===n)throw new Error("Type ".concat(di(t)," does not have '\u0275mod' property."));return o}function YW(t){const n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,inputTransforms:null,inputConfig:t.inputs||_n,exportAs:t.exportAs||null,standalone:!0===t.standalone,signals:!0===t.signals,selectors:t.selectors||kn,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:QW(t.inputs,n),outputs:QW(t.outputs),debugInfo:null}}function JW(t){var n;null===(n=t.features)||void 0===n||n.forEach(o=>o(t))}function FO(t,n){if(!t)return null;const o=n?vl:JOe;return()=>("function"==typeof t?t():t).map(e=>o(e)).filter(XOe)}const pa=0,Sn=1,hi=2,Ka=3,rh=4,Vl=5,sh=6,Py=7,js=8,zl=9,Rf=10,Hi=11,I1=12,XW=13,Iy=14,ga=15,M1=16,My=17,um=18,O1=19,e9=20,Jg=21,E1=22,Uv=23,Ki=25,lB=1,dm=7,Oy=9,Za=10;var uB=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(uB||{});function jl(t){return Array.isArray(t)&&"object"==typeof t[lB]}function Hl(t){return Array.isArray(t)&&!0===t[lB]}function dB(t){return 0!=(4&t.flags)}function Gv(t){return t.componentOffset>-1}function GO(t){return 1==(1&t.flags)}function ah(t){return!!t.template}function pB(t){return 0!=(512&t[hi])}const o9="svg";let s9=!1;function gs(t){for(;Array.isArray(t);)t=t[pa];return t}function A1(t,n){return gs(n[t])}function du(t,n){return gs(n[t.index])}function R1(t,n){return t.data[n]}function Ey(t,n){return t[n]}function Td(t,n){const o=n[t];return jl(o)?o:o[pa]}function gB(t){return 128==(128&t[hi])}function pm(t,n){return null==n?null:t[n]}function a9(t){t[My]=0}function lEe(t){1024&t[hi]||(t[hi]|=1024,gB(t)&&k1(t))}function _B(t){var n;return!!(9216&t[hi]||null!==(n=t[Uv])&&void 0!==n&&n.dirty)}function vB(t){if(_B(t))k1(t);else if(64&t[hi])if(function rEe(){return s9}())t[hi]|=1024,k1(t);else{var n;null===(n=t[Rf].changeDetectionScheduler)||void 0===n||n.notify()}}function k1(t){var n;null===(n=t[Rf].changeDetectionScheduler)||void 0===n||n.notify();let o=Vv(t);for(;null!==o&&!(8192&o[hi])&&(o[hi]|=8192,gB(o));)o=Vv(o)}function VO(t,n){if(256==(256&t[hi]))throw new vt(911,!1);null===t[Jg]&&(t[Jg]=[]),t[Jg].push(n)}function Vv(t){const n=t[Ka];return Hl(n)?n[Ka]:n}const Ni={lFrame:_9(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function u9(){return Ni.bindingsEnabled}function xy(){return null!==Ni.skipHydrationRootTNode}function Nt(){return Ni.lFrame.lView}function Vo(){return Ni.lFrame.tView}function oe(t){return Ni.lFrame.contextLView=t,t[js]}function re(t){return Ni.lFrame.contextLView=null,t}function ss(){let t=d9();for(;null!==t&&64===t.type;)t=t.parent;return t}function d9(){return Ni.lFrame.currentTNode}function hm(t,n){const o=Ni.lFrame;o.currentTNode=t,o.isParent=n}function CB(){return Ni.lFrame.isParent}function yB(){Ni.lFrame.isParent=!1}function pu(){const t=Ni.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function kf(){return Ni.lFrame.bindingIndex}function ch(){return Ni.lFrame.bindingIndex++}function Lf(t){const n=Ni.lFrame,o=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,o}function CEe(t,n){const o=Ni.lFrame;o.bindingIndex=o.bindingRootIndex=t,SB(n)}function SB(t){Ni.lFrame.currentDirectiveIndex=t}function TB(){return Ni.lFrame.currentQueryIndex}function zO(t){Ni.lFrame.currentQueryIndex=t}function SEe(t){const n=t[Sn];return 2===n.type?n.declTNode:1===n.type?t[Vl]:null}function f9(t,n,o){if(o&hn.SkipSelf){let i=n,r=t;for(;!(i=i.parent,null!==i||o&hn.Host||(i=SEe(r),null===i||(r=r[Iy],10&i.type))););if(null===i)return!1;n=i,t=r}const e=Ni.lFrame=g9();return e.currentTNode=n,e.lView=t,!0}function PB(t){const n=g9(),o=t[Sn];Ni.lFrame=n,n.currentTNode=o.firstChild,n.lView=t,n.tView=o,n.contextLView=t,n.bindingIndex=o.bindingStartIndex,n.inI18n=!1}function g9(){const t=Ni.lFrame,n=null===t?null:t.child;return null===n?_9(t):n}function _9(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function v9(){const t=Ni.lFrame;return Ni.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const b9=v9;function IB(){const t=v9();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function ql(){return Ni.lFrame.selectedIndex}function zv(t){Ni.lFrame.selectedIndex=t}function Hs(){const t=Ni.lFrame;return R1(t.tView,t.selectedIndex)}function Df(){Ni.lFrame.currentNamespace=o9}function jO(){!function PEe(){Ni.lFrame.currentNamespace=null}()}let y9=!0;function HO(){return y9}function Xg(t){y9=t}function IEe(){return Ay(ss(),Nt())}function Ay(t,n){return new $t(du(t,n))}let xB,$t=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=IEe,n})();function S9(t){return t instanceof $t?t.nativeElement:t}function Ry(t,n){t.forEach(o=>Array.isArray(o)?Ry(o,n):n(o))}function w9(t,n,o){n>=t.length?t.push(o):t.splice(n,0,o)}function qO(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function Pd(t,n,o){let e=ky(t,n);return e>=0?t[1|e]=o:(e=~e,function T9(t,n,o,e){let i=t.length;if(i==n)t.push(o,e);else if(1===i)t.push(e,t[0]),t[0]=o;else{for(i--,t.push(t[i-1],t[i]);i>n;)t[i]=t[i-2],i--;t[n]=o,t[n+1]=e}}(t,e,n,o)),e}function OB(t,n){const o=ky(t,n);if(o>=0)return t[1|o]}function ky(t,n){return function P9(t,n,o){let e=0,i=t.length>>o;for(;i!==e;){const r=e+(i-e>>1),s=t[r<<o];if(n===s)return r<<o;s>n?i=r:e=r+1}return~(i<<o)}(t,n,1)}function OEe(){return this._results[Symbol.iterator]()}class EB{get changes(){var n;return null!==(n=this._changes)&&void 0!==n?n:this._changes=new ke}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const o=EB.prototype;o[Symbol.iterator]||(o[Symbol.iterator]=OEe)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,o){return this._results.reduce(n,o)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,o){this.dirty=!1;const e=function Vu(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function MEe(t,n,o){if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++){let i=t[e],r=n[e];if(o&&(i=o(i),r=o(r)),r!==i)return!1}return!0}(this._results,e,o))&&(this._results=e,this.length=e.length,this.last=e[this.length-1],this.first=e[0])}notifyOnChanges(){void 0!==this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(n){this._onDirty=n}setDirty(){var n;this.dirty=!0,null===(n=this._onDirty)||void 0===n||n.call(this)}destroy(){void 0!==this._changes&&(this._changes.complete(),this._changes.unsubscribe())}}function $O(t){return 128==(128&t.flags)}function e_(){if(void 0!==xB)return xB;if(typeof document<"u")return document;throw new vt(210,!1)}function be(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Xt(t){return{providers:t.providers||[],imports:t.imports||[]}}function ZO(t){return O9(t,YO)||O9(t,E9)}function O9(t,n){return t.hasOwnProperty(n)?t[n]:null}function QO(t){return t&&(t.hasOwnProperty(AB)||t.hasOwnProperty(kEe))?t[AB]:null}const YO=In({\u0275prov:In}),AB=In({\u0275inj:In}),E9=In({ngInjectableDef:In}),kEe=In({ngInjectorDef:In});class Ot{constructor(n,o){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof o?this.__NG_ELEMENT_ID__=o:void 0!==o&&(this.\u0275prov=be({token:this,providedIn:o.providedIn||"root",factory:o.factory}))}get multi(){return this}toString(){return"InjectionToken ".concat(this._desc)}}const JO=new Ot("",{providedIn:"root",factory:()=>LEe}),LEe="ng",x9=new Ot(""),t_=new Ot("",{providedIn:"platform",factory:()=>"unknown"}),A9=new Ot(""),R9=new Ot("",{providedIn:"root",factory:()=>{var t;return(null===(t=e_().body)||void 0===t||null===(t=t.querySelector("[ngCspNonce]"))||void 0===t?void 0:t.getAttribute("ngCspNonce"))||null}}),NEe=In({__forward_ref__:In});function _s(t){return t.__forward_ref__=_s,t.toString=function(){return di(this())},t}function Li(t){return XO(t)?t():t}function XO(t){return"function"==typeof t&&t.hasOwnProperty(NEe)&&t.__forward_ref__===_s}function BB(t){return t&&!!t.\u0275providers}function Zi(t){return"string"==typeof t?t:null==t?"":String(t)}function NB(t,n){throw new vt(-201,!1)}let UB;function L9(){return UB}function zu(t){const n=UB;return UB=t,n}function D9(t,n,o){const e=ZO(t);return e&&"root"==e.providedIn?void 0===e.value?e.value=e.factory():e.value:o&hn.Optional?null:void 0!==n?n:void NB()}const B1={},GB="__NG_DI_FLAG__",eE="ngTempTokenPath",jEe=/\n/gm,B9="__source";let Ly;function n_(t){const n=Ly;return Ly=t,n}function WEe(t,n=hn.Default){if(void 0===Ly)throw new vt(-203,!1);return null===Ly?D9(t,void 0,n):Ly.get(t,n&hn.Optional?null:void 0,n)}function T(t,n=hn.Default){return(L9()||WEe)(Li(t),n)}function mt(t,n=hn.Default){return T(t,tE(n))}function tE(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function VB(t){const n=[];for(let o=0;o<t.length;o++){const e=Li(t[o]);if(Array.isArray(e)){if(0===e.length)throw new vt(900,!1);let i,r=hn.Default;for(let s=0;s<e.length;s++){const a=e[s],c=$Ee(a);"number"==typeof c?-1===c?i=a.token:r|=c:i=a}n.push(T(i,r))}else n.push(T(e))}return n}function N1(t,n){return t[GB]=n,t.prototype[GB]=n,t}function $Ee(t){return t[GB]}let F9=()=>null;function WB(t,n,o=!1){return F9(t,n,o)}const Gy="__parameters__";function zy(t,n,o){return Be(()=>{const e=function QB(t){return function(...o){if(t){const e=t(...o);for(const i in e)this[i]=e[i]}}}(n);function i(...r){if(this instanceof i)return e.apply(this,r),this;const s=new i(...r);return a.annotation=s,a;function a(c,u,h){const b=c.hasOwnProperty(Gy)?c[Gy]:Object.defineProperty(c,Gy,{value:[]})[Gy];for(;b.length<=h;)b.push(null);return(b[h]=b[h]||[]).push(s),c}}return o&&(i.prototype=Object.create(o.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}const jy=N1(zy("Inject",t=>({token:t})),-1),zo=N1(zy("Optional"),8),jo=N1(zy("SkipSelf"),4);function jv(t,n){return t.hasOwnProperty(uu)?t[uu]:null}const Bf=new Ot(""),H9=new Ot("",-1),YB=new Ot("");class cE{get(n,o=B1){if(o===B1){const e=new Error("NullInjectorError: No provider for ".concat(di(n),"!"));throw e.name="NullInjectorError",e}return o}}function sxe(...t){return{\u0275providers:q9(0,t),\u0275fromNgModule:!0}}function q9(t,...n){const o=[],e=new Set;let i;const r=s=>{o.push(s)};return Ry(n,s=>{const a=s;uE(a,r,[],e)&&(i||(i=[]),i.push(a))}),void 0!==i&&W9(i,r),o}function W9(t,n){for(let o=0;o<t.length;o++){const{ngModule:e,providers:i}=t[o];JB(i,r=>{n(r,e)})}}function uE(t,n,o,e){if(!(t=Li(t)))return!1;let i=null,r=QO(t);const s=!r&&xo(t);if(r||s){if(s&&!s.standalone)return!1;i=t}else{const c=t.ngModule;if(r=QO(c),!r)return!1;i=c}const a=e.has(i);if(s){if(a)return!1;if(e.add(i),s.dependencies){const c="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const u of c)uE(u,n,o,e)}}else{if(!r)return!1;{if(null!=r.imports&&!a){let u;e.add(i);try{Ry(r.imports,h=>{uE(h,n,o,e)&&(u||(u=[]),u.push(h))})}finally{}void 0!==u&&W9(u,n)}if(!a){const u=jv(i)||(()=>new i);n({provide:i,useFactory:u,deps:kn},i),n({provide:YB,useValue:i,multi:!0},i),n({provide:Bf,useValue:()=>T(i),multi:!0},i)}const c=r.providers;if(null!=c&&!a){const u=t;JB(c,h=>{n(h,u)})}}}return i!==t&&void 0!==t.providers}function JB(t,n){for(let o of t)BB(o)&&(o=o.\u0275providers),Array.isArray(o)?JB(o,n):n(o)}const axe=In({provide:String,useValue:In});function XB(t){return null!==t&&"object"==typeof t&&axe in t}function Hv(t){return"function"==typeof t}const eN=new Ot(""),dE={},lxe={};let tN;function pE(){return void 0===tN&&(tN=new cE),tN}class Id{}class Hy extends Id{get destroyed(){return this._destroyed}constructor(n,o,e,i){super(),this.parent=o,this.source=e,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,iN(n,s=>this.processProvider(s)),this.records.set(H9,qy(void 0,this)),i.has("environment")&&this.records.set(Id,qy(void 0,this));const r=this.records.get(eN);null!=r&&"string"==typeof r.value&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(YB,kn,hn.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const o of this._ngOnDestroyHooks)o.ngOnDestroy();const n=this._onDestroyHooks;this._onDestroyHooks=[];for(const o of n)o()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(n){return this.assertNotDestroyed(),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){this.assertNotDestroyed();const o=n_(this),e=zu(void 0);try{return n()}finally{n_(o),zu(e)}}get(n,o=B1,e=hn.Default){if(this.assertNotDestroyed(),n.hasOwnProperty(w1))return n[w1](this);e=tE(e);const r=n_(this),s=zu(void 0);try{if(!(e&hn.SkipSelf)){let c=this.records.get(n);if(void 0===c){const u=function mxe(t){return"function"==typeof t||"object"==typeof t&&t instanceof Ot}(n)&&ZO(n);c=u&&this.injectableDefInScope(u)?qy(nN(n),dE):null,this.records.set(n,c)}if(null!=c)return this.hydrate(n,c)}return(e&hn.Self?pE():this.parent).get(n,o=e&hn.Optional&&o===B1?null:o)}catch(a){if("NullInjectorError"===a.name){if((a[eE]=a[eE]||[]).unshift(di(n)),r)throw a;return function KEe(t,n,o,e){const i=t[eE];throw n[B9]&&i.unshift(n[B9]),t.message=function ZEe(t,n,o,e=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.slice(2):t;let i=di(n);if(Array.isArray(n))i=n.map(di).join(" -> ");else if("object"==typeof n){let r=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];r.push(s+":"+("string"==typeof a?JSON.stringify(a):di(a)))}i="{".concat(r.join(", "),"}")}return"".concat(o).concat(e?"("+e+")":"","[").concat(i,"]: ").concat(t.replace(jEe,"\n  "))}("\n"+t.message,i,o,e),t.ngTokenPath=i,t[eE]=null,t}(a,n,"R3InjectorError",this.source)}throw a}finally{zu(s),n_(r)}}resolveInjectorInitializers(){const n=n_(this),o=zu(void 0);try{const i=this.get(Bf,kn,hn.Self);for(const r of i)r()}finally{n_(n),zu(o)}}toString(){const n=[],o=this.records;for(const e of o.keys())n.push(di(e));return"R3Injector[".concat(n.join(", "),"]")}assertNotDestroyed(){if(this._destroyed)throw new vt(205,!1)}processProvider(n){let o=Hv(n=Li(n))?n:Li(n&&n.provide);const e=function dxe(t){return XB(t)?qy(void 0,t.useValue):qy(Z9(t),dE)}(n);if(!Hv(n)&&!0===n.multi){let i=this.records.get(o);i||(i=qy(void 0,dE,!0),i.factory=()=>VB(i.multi),this.records.set(o,i)),o=n,i.multi.push(n)}this.records.set(o,e)}hydrate(n,o){return o.value===dE&&(o.value=lxe,o.value=o.factory()),"object"==typeof o.value&&o.value&&function hxe(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(o.value)&&this._ngOnDestroyHooks.add(o.value),o.value}injectableDefInScope(n){if(!n.providedIn)return!1;const o=Li(n.providedIn);return"string"==typeof o?"any"===o||this.scopes.has(o):this.injectorDefTypes.has(o)}removeOnDestroy(n){const o=this._onDestroyHooks.indexOf(n);-1!==o&&this._onDestroyHooks.splice(o,1)}}function nN(t){const n=ZO(t),o=null!==n?n.factory:jv(t);if(null!==o)return o;if(t instanceof Ot)throw new vt(204,!1);if(t instanceof Function)return function uxe(t){if(t.length>0)throw new vt(204,!1);const o=function REe(t){return t&&(t[YO]||t[E9])||null}(t);return null!==o?()=>o.factory(t):()=>new t}(t);throw new vt(204,!1)}function Z9(t,n,o){let e;if(Hv(t)){const i=Li(t);return jv(i)||nN(i)}if(XB(t))e=()=>Li(t.useValue);else if(function K9(t){return!(!t||!t.useFactory)}(t))e=()=>t.useFactory(...VB(t.deps||[]));else if(function $9(t){return!(!t||!t.useExisting)}(t))e=()=>T(Li(t.useExisting));else{const i=Li(t&&(t.useClass||t.provide));if(!function pxe(t){return!!t.deps}(t))return jv(i)||nN(i);e=()=>new i(...VB(t.deps))}return e}function qy(t,n,o=!1){return{factory:t,value:n,multi:o?[]:void 0}}function iN(t,n){for(const o of t)Array.isArray(o)?iN(o,n):o&&BB(o)?iN(o.\u0275providers,n):n(o)}function i_(t,n){t instanceof Hy&&t.assertNotDestroyed();const e=n_(t),i=zu(void 0);try{return n()}finally{n_(e),zu(i)}}function z1(t){if(!L9()&&!function qEe(){return Ly}())throw new vt(-203,!1)}class Txe{constructor(n,o,e){this.previousValue=n,this.currentValue=o,this.firstChange=e}isFirstChange(){return this.firstChange}}function Y9(t,n,o,e){null!==n?n.applyValueToInputSignal(n,e):t[o]=e}function it(){return J9}function J9(t){return t.type.prototype.ngOnChanges&&(t.setInput=Ixe),Pxe}function Pxe(){const t=e$(this),n=null==t?void 0:t.current;if(n){const o=t.previous;if(o===_n)t.previous=n;else for(let e in n)o[e]=n[e];t.current=null,this.ngOnChanges(n)}}function Ixe(t,n,o,e,i){const r=this.declaredInputs[e],s=e$(t)||function Mxe(t,n){return t[X9]=n}(t,{previous:_n,current:null}),a=s.current||(s.current={}),c=s.previous,u=c[r];a[r]=new Txe(u&&u.currentValue,o,c===_n),Y9(t,n,i,o)}it.ngInherit=!0;const X9="__ngSimpleChanges__";function e$(t){return t[X9]||null}const mm=function(t,n,o){};function mE(t,n){for(let u=n.directiveStart,h=n.directiveEnd;u<h;u++){const w=t.data[u].type.prototype,{ngAfterContentInit:R,ngAfterContentChecked:G,ngAfterViewInit:K,ngAfterViewChecked:te,ngOnDestroy:ee}=w;var o,e,i,r,s,a,c;R&&(null!==(o=t.contentHooks)&&void 0!==o?o:t.contentHooks=[]).push(-u,R),G&&((null!==(e=t.contentHooks)&&void 0!==e?e:t.contentHooks=[]).push(u,G),(null!==(i=t.contentCheckHooks)&&void 0!==i?i:t.contentCheckHooks=[]).push(u,G)),K&&(null!==(r=t.viewHooks)&&void 0!==r?r:t.viewHooks=[]).push(-u,K),te&&((null!==(s=t.viewHooks)&&void 0!==s?s:t.viewHooks=[]).push(u,te),(null!==(a=t.viewCheckHooks)&&void 0!==a?a:t.viewCheckHooks=[]).push(u,te)),null!=ee&&(null!==(c=t.destroyHooks)&&void 0!==c?c:t.destroyHooks=[]).push(u,ee)}}function fE(t,n,o){t$(t,n,3,o)}function gE(t,n,o,e){(3&t[hi])===o&&t$(t,n,o,e)}function sN(t,n){let o=t[hi];(3&o)===n&&(o&=16383,o+=1,t[hi]=o)}function t$(t,n,o,e){const r=null!=e?e:-1,s=n.length-1;let a=0;for(let c=void 0!==e?65535&t[My]:0;c<s;c++)if("number"==typeof n[c+1]){if(a=n[c],null!=e&&a>=e)break}else n[c]<0&&(t[My]+=65536),(a<r||-1==r)&&(xxe(t,o,n,c),t[My]=(4294901760&t[My])+c+2),c++}function n$(t,n){mm(4,t,n);const o=E(null);try{n.call(t)}finally{E(o),mm(5,t,n)}}function xxe(t,n,o,e){const i=o[e]<0,r=o[e+1],a=t[i?-o[e]:o[e]];i?t[hi]>>14<t[My]>>16&&(3&t[hi])===n&&(t[hi]+=16384,n$(a,r)):n$(a,r)}const $y=-1;class H1{constructor(n,o,e){this.factory=n,this.resolving=!1,this.canSeeViewProviders=o,this.injectImpl=e}}function cN(t){return t!==$y}function q1(t){return 32767&t}function W1(t,n){let o=function Dxe(t){return t>>16}(t),e=n;for(;o>0;)e=e[Iy],o--;return e}let lN=!0;function _E(t){const n=lN;return lN=t,n}const i$=255,o$=5;let Bxe=0;const fm={};function vE(t,n){const o=r$(t,n);if(-1!==o)return o;const e=n[Sn];e.firstCreatePass&&(t.injectorIndex=n.length,uN(e.data,t),uN(n,null),uN(e.blueprint,null));const i=bE(t,n),r=t.injectorIndex;if(cN(i)){const s=q1(i),a=W1(i,n),c=a[Sn].data;for(let u=0;u<8;u++)n[r+u]=a[s+u]|c[s+u]}return n[r+8]=i,r}function uN(t,n){t.push(0,0,0,0,0,0,0,0,n)}function r$(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function bE(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let o=0,e=null,i=n;for(;null!==i;){if(e=p$(i),null===e)return $y;if(o++,i=i[Iy],-1!==e.injectorIndex)return e.injectorIndex|o<<16}return $y}function dN(t,n,o){!function Nxe(t,n,o){let e;"string"==typeof o?e=o.charCodeAt(0)||0:o.hasOwnProperty(Ec)&&(e=o[Ec]),null==e&&(e=o[Ec]=Bxe++);const i=e&i$;n.data[t+(i>>o$)]|=1<<i}(t,n,o)}function s$(t,n,o){if(o&hn.Optional||void 0!==t)return t;NB()}function a$(t,n,o,e){if(o&hn.Optional&&void 0===e&&(e=null),!(o&(hn.Self|hn.Host))){const i=t[zl],r=zu(void 0);try{return i?i.get(n,e,o&hn.Optional):D9(n,e,o&hn.Optional)}finally{zu(r)}}return s$(e,0,o)}function c$(t,n,o,e=hn.Default,i){if(null!==t){if(2048&n[hi]&&!(e&hn.Self)){const s=function zxe(t,n,o,e,i){let r=t,s=n;for(;null!==r&&null!==s&&2048&s[hi]&&!(512&s[hi]);){const a=l$(r,s,o,e|hn.Self,fm);if(a!==fm)return a;let c=r.parent;if(!c){const u=s[e9];if(u){const h=u.get(o,fm,e);if(h!==fm)return h}c=p$(s),s=s[Iy]}r=c}return i}(t,n,o,e,fm);if(s!==fm)return s}const r=l$(t,n,o,e,fm);if(r!==fm)return r}return a$(n,o,e,i)}function l$(t,n,o,e,i){const r=function Gxe(t){if("string"==typeof t)return t.charCodeAt(0)||0;const n=t.hasOwnProperty(Ec)?t[Ec]:void 0;return"number"==typeof n?n>=0?n&i$:Vxe:n}(o);if("function"==typeof r){if(!f9(n,t,e))return e&hn.Host?s$(i,0,e):a$(n,o,e,i);try{let s;if(s=r(e),null!=s||e&hn.Optional)return s;NB()}finally{b9()}}else if("number"==typeof r){let s=null,a=r$(t,n),c=$y,u=e&hn.Host?n[ga][Vl]:null;for((-1===a||e&hn.SkipSelf)&&(c=-1===a?bE(t,n):n[a+8],c!==$y&&d$(e,!1)?(s=n[Sn],a=q1(c),n=W1(c,n)):a=-1);-1!==a;){const h=n[Sn];if(u$(r,a,h.data)){const b=Uxe(a,n,o,s,e,u);if(b!==fm)return b}c=n[a+8],c!==$y&&d$(e,n[Sn].data[a+8]===u)&&u$(r,a,n)?(s=h,a=q1(c),n=W1(c,n)):a=-1}}return i}function Uxe(t,n,o,e,i,r){const s=n[Sn],a=s.data[t+8],h=CE(a,s,o,null==e?Gv(a)&&lN:e!=s&&0!=(3&a.type),i&hn.Host&&r===a);return null!==h?qv(n,s,h,a):fm}function CE(t,n,o,e,i){const r=t.providerIndexes,s=n.data,a=1048575&r,c=t.directiveStart,h=r>>20,w=i?a+h:t.directiveEnd;for(let R=e?a:a+h;R<w;R++){const G=s[R];if(R<c&&o===G||R>=c&&G.type===o)return R}if(i){const R=s[c];if(R&&ah(R)&&R.type===o)return c}return null}function qv(t,n,o,e){let i=t[o];const r=n.data;if(function Axe(t){return t instanceof H1}(i)){const s=i;s.resolving&&function GEe(t,n){throw n&&". Dependency path: ".concat(n.join(" > ")," > ").concat(t),new vt(-200,t)}(function zr(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Zi(t)}(r[o]));const a=_E(s.canSeeViewProviders);s.resolving=!0;const u=s.injectImpl?zu(s.injectImpl):null;f9(t,e,hn.Default);try{i=t[o]=s.factory(void 0,r,t,e),n.firstCreatePass&&o>=e.directiveStart&&function Exe(t,n,o){const{ngOnChanges:e,ngOnInit:i,ngDoCheck:r}=n.type.prototype;if(e){var s,a;const b=J9(n);(null!==(s=o.preOrderHooks)&&void 0!==s?s:o.preOrderHooks=[]).push(t,b),(null!==(a=o.preOrderCheckHooks)&&void 0!==a?a:o.preOrderCheckHooks=[]).push(t,b)}var c,u,h;i&&(null!==(c=o.preOrderHooks)&&void 0!==c?c:o.preOrderHooks=[]).push(0-t,i),r&&((null!==(u=o.preOrderHooks)&&void 0!==u?u:o.preOrderHooks=[]).push(t,r),(null!==(h=o.preOrderCheckHooks)&&void 0!==h?h:o.preOrderCheckHooks=[]).push(t,r))}(o,r[o],n)}finally{null!==u&&zu(u),_E(a),s.resolving=!1,b9()}}return i}function u$(t,n,o){return!!(o[n+(t>>o$)]&1<<t)}function d$(t,n){return!(t&hn.Self||t&hn.Host&&n)}class Rc{constructor(n,o){this._tNode=n,this._lView=o}get(n,o,e){return c$(this._tNode,this._lView,n,tE(e),o)}}function Vxe(){return new Rc(ss(),Nt())}function fo(t){return Be(()=>{const n=t.prototype.constructor,o=n[uu]||pN(n),e=Object.prototype;let i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==e;){const r=i[uu]||pN(i);if(r&&r!==o)return r;i=Object.getPrototypeOf(i)}return r=>new r})}function pN(t){return XO(t)?()=>{const n=pN(Li(t));return n&&n()}:jv(t)}function p$(t){const n=t[Sn],o=n.type;return 2===o?n.declTNode:1===o?t[Vl]:null}function Wv(t){return function Fxe(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const o=t.attrs;if(o){const e=o.length;let i=0;for(;i<e;){const r=o[i];if(LO(r))break;if(0===r)i+=2;else if("number"==typeof r)for(i++;i<e&&"string"==typeof o[i];)i++;else{if(r===n)return o[i+1];i+=2}}}return null}(ss(),t)}function _$(t,n=null,o=null,e){const i=v$(t,n,o,e);return i.resolveInjectorInitializers(),i}function v$(t,n=null,o=null,e,i=new Set){const r=[o||kn,sxe(t)];return e=e||("object"==typeof t?void 0:di(t)),new Hy(r,n||pE(),e||null,i)}let vs=(()=>{var t;class n{static create(e,i){if(Array.isArray(e))return _$({name:""},i,e,"");{var r;const s=null!==(r=e.name)&&void 0!==r?r:"";return _$({name:s},e.parent,e.providers,s)}}}return(t=n).THROW_IF_NOT_FOUND=B1,t.NULL=new cE,t.\u0275prov=be({token:t,providedIn:"any",factory:()=>T(H9)}),t.__NG_ELEMENT_ID__=-1,n})();function mN(t){return t.ngOriginalError}class lh{constructor(){this._console=console}handleError(n){const o=this._findOriginalError(n);this._console.error("ERROR",n),o&&this._console.error("ORIGINAL ERROR",o)}_findOriginalError(n){let o=n&&mN(n);for(;o&&mN(o);)o=mN(o);return o||null}}const C$=new Ot("",{providedIn:"root",factory:()=>mt(lh).handleError.bind(void 0)}),S$=new Ot("",{providedIn:"root",factory:()=>!1});let wE,TE;function Qy(t){var n;return(null===(n=function fN(){if(void 0===wE&&(wE=null,Ye.trustedTypes))try{wE=Ye.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return wE}())||void 0===n?void 0:n.createHTML(t))||t}function gN(){if(void 0===TE&&(TE=null,Ye.trustedTypes))try{TE=Ye.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(t){}return TE}function w$(t){var n;return(null===(n=gN())||void 0===n?void 0:n.createHTML(t))||t}function P$(t){var n;return(null===(n=gN())||void 0===n?void 0:n.createScriptURL(t))||t}class $v{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see ".concat(oh,")")}}class Jxe extends $v{getTypeName(){return"HTML"}}class Xxe extends $v{getTypeName(){return"Style"}}class eAe extends $v{getTypeName(){return"Script"}}class tAe extends $v{getTypeName(){return"URL"}}class nAe extends $v{getTypeName(){return"ResourceURL"}}function Md(t){return t instanceof $v?t.changingThisBreaksApplicationSecurity:t}function gm(t,n){const o=function iAe(t){return t instanceof $v&&t.getTypeName()||null}(t);if(null!=o&&o!==n){if("ResourceURL"===o&&"URL"===n)return!0;throw new Error("Required a safe ".concat(n,", got a ").concat(o," (see ").concat(oh,")"))}return o===n}class lAe{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n="<body><remove></remove>"+n;try{const o=(new window.DOMParser).parseFromString(Qy(n),"text/html").body;return null===o?this.inertDocumentHelper.getInertBodyElement(n):(o.removeChild(o.firstChild),o)}catch(o){return null}}}class uAe{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const o=this.inertDocument.createElement("template");return o.innerHTML=Qy(n),o}}const pAe=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function PE(t){return(t=String(t)).match(pAe)?t:"unsafe:"+t}function Nf(t){const n={};for(const o of t.split(","))n[o]=!0;return n}function $1(...t){const n={};for(const o of t)for(const e in o)o.hasOwnProperty(e)&&(n[e]=!0);return n}const M$=Nf("area,br,col,hr,img,wbr"),O$=Nf("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),E$=Nf("rp,rt"),_N=$1(M$,$1(O$,Nf("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),$1(E$,Nf("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),$1(E$,O$)),vN=Nf("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),x$=$1(vN,Nf("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Nf("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),hAe=Nf("script,style,template");class mAe{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let o=n.firstChild,e=!0;for(;o;)if(o.nodeType===Node.ELEMENT_NODE?e=this.startElement(o):o.nodeType===Node.TEXT_NODE?this.chars(o.nodeValue):this.sanitizedSomething=!0,e&&o.firstChild)o=o.firstChild;else for(;o;){o.nodeType===Node.ELEMENT_NODE&&this.endElement(o);let i=this.checkClobberedElement(o,o.nextSibling);if(i){o=i;break}o=this.checkClobberedElement(o,o.parentNode)}return this.buf.join("")}startElement(n){const o=n.nodeName.toLowerCase();if(!_N.hasOwnProperty(o))return this.sanitizedSomething=!0,!hAe.hasOwnProperty(o);this.buf.push("<"),this.buf.push(o);const e=n.attributes;for(let i=0;i<e.length;i++){const r=e.item(i),s=r.name,a=s.toLowerCase();if(!x$.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let c=r.value;vN[a]&&(c=PE(c)),this.buf.push(" ",s,'="',A$(c),'"')}return this.buf.push(">"),!0}endElement(n){const o=n.nodeName.toLowerCase();_N.hasOwnProperty(o)&&!M$.hasOwnProperty(o)&&(this.buf.push("</"),this.buf.push(o),this.buf.push(">"))}chars(n){this.buf.push(A$(n))}checkClobberedElement(n,o){if(o&&(n.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(n.outerHTML));return o}}const fAe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gAe=/([^\#-~ |!])/g;function A$(t){return t.replace(/&/g,"&amp;").replace(fAe,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(gAe,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}let IE;function R$(t,n){let o=null;try{IE=IE||function I$(t){const n=new uAe(t);return function dAe(){try{return!!(new window.DOMParser).parseFromString(Qy(""),"text/html")}catch(t){return!1}}()?new lAe(n):n}(t);let e=n?String(n):"";o=IE.getInertBodyElement(e);let i=5,r=e;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,e=r,r=o.innerHTML,o=IE.getInertBodyElement(e)}while(e!==r);return Qy((new mAe).sanitizeChildren(bN(o)||o))}finally{if(o){const e=bN(o)||o;for(;e.firstChild;)e.removeChild(e.firstChild)}}}function bN(t){return"content"in t&&function _Ae(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Od=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(Od||{});function Yn(t){const n=K1();return n?w$(n.sanitize(Od.HTML,t)||""):gm(t,"HTML")?w$(Md(t)):R$(e_(),Zi(t))}function Wn(t){const n=K1();return n?n.sanitize(Od.URL,t)||"":gm(t,"URL")?Md(t):PE(Zi(t))}function k$(t){const n=K1();if(n)return P$(n.sanitize(Od.RESOURCE_URL,t)||"");if(gm(t,"ResourceURL"))return P$(Md(t));throw new vt(904,!1)}function K1(){const t=Nt();return t&&t[Rf].sanitizer}const wAe=/^>|^->|<!--|-->|--!>|<!-$/g,TAe=/(<|>)/g,PAe="\u200b$1\u200b";const CN=new Map;let xAe=0;const SN="__ngContext__";function Wl(t,n){jl(n)?(t[SN]=n[O1],function RAe(t){CN.set(t[O1],t)}(n)):t[SN]=n}function IN(t){return t.ownerDocument.defaultView}function Ed(t){return t instanceof Function?t():t}var r_=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(r_||{});let MN;function ON(t,n){return MN(t,n)}function Jy(t,n,o,e,i){if(null!=e){let r,s=!1;Hl(e)?r=e:jl(e)&&(s=!0,e=e[pa]);const a=gs(e);0===t&&null!==o?null==i?X$(n,o,a):Kv(n,o,a,i||null,!0):1===t&&null!==o?Kv(n,o,a,i||null,!0):2===t?function LE(t,n,o){const e=RE(t,n);e&&function XAe(t,n,o,e){t.removeChild(n,o,e)}(t,e,n,o)}(n,a,s):3===t&&n.destroyNode(a),null!=r&&function nRe(t,n,o,e,i){const r=o[dm];r!==gs(o)&&Jy(n,t,e,r,i);for(let a=Za;a<o.length;a++){const c=o[a];DE(c[Sn],c,t,n,e,r)}}(n,t,r,o,i)}}function EN(t,n){return t.createComment(function D$(t){return t.replace(wAe,n=>n.replace(TAe,PAe))}(n))}function xE(t,n,o){return t.createElement(n,o)}function Q$(t,n){DE(t,n,n[Hi],2,null,null)}function Y$(t,n){const o=t[Oy],e=o.indexOf(n);o.splice(e,1)}function Q1(t,n){if(t.length<=Za)return;const o=Za+n,e=t[o];if(e){const i=e[M1];null!==i&&i!==t&&Y$(i,e),n>0&&(t[o-1][rh]=e[rh]);const r=qO(t,Za+n);!function WAe(t,n){Q$(t,n),n[pa]=null,n[Vl]=null}(e[Sn],e);const s=r[um];null!==s&&s.detachView(r[Sn]),e[Ka]=null,e[rh]=null,e[hi]&=-129}return e}function AE(t,n){if(!(256&n[hi])){const o=n[Hi];o.destroyNode&&DE(t,n,o,3,null,null),function KAe(t){let n=t[I1];if(!n)return xN(t[Sn],t);for(;n;){let o=null;if(jl(n))o=n[I1];else{const e=n[Za];e&&(o=e)}if(!o){for(;n&&!n[rh]&&n!==t;)jl(n)&&xN(n[Sn],n),n=n[Ka];null===n&&(n=t),jl(n)&&xN(n[Sn],n),o=n&&n[rh]}n=o}}(n)}}function xN(t,n){if(!(256&n[hi])){n[hi]&=-129,n[hi]|=256,n[Uv]&&function fe(t){if(De(t),Ie(t))for(let n=0;n<t.producerNode.length;n++)Ae(t.producerNode[n],t.producerIndexOfThis[n]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}(n[Uv]),function JAe(t,n){let o;if(null!=t&&null!=(o=t.destroyHooks))for(let e=0;e<o.length;e+=2){const i=n[o[e]];if(!(i instanceof H1)){const r=o[e+1];if(Array.isArray(r))for(let s=0;s<r.length;s+=2){const a=i[r[s]],c=r[s+1];mm(4,a,c);try{c.call(a)}finally{mm(5,a,c)}}else{mm(4,i,r);try{r.call(i)}finally{mm(5,i,r)}}}}}(t,n),function YAe(t,n){const o=t.cleanup,e=n[Py];if(null!==o)for(let r=0;r<o.length-1;r+=2)if("string"==typeof o[r]){const s=o[r+3];s>=0?e[s]():e[-s].unsubscribe(),r+=2}else o[r].call(e[o[r+1]]);null!==e&&(n[Py]=null);const i=n[Jg];if(null!==i){n[Jg]=null;for(let r=0;r<i.length;r++)(0,i[r])()}}(t,n),1===n[Sn].type&&n[Hi].destroy();const o=n[M1];if(null!==o&&Hl(n[Ka])){o!==n[Ka]&&Y$(o,n);const e=n[um];null!==e&&e.detachView(t)}!function kAe(t){CN.delete(t[O1])}(n)}}function AN(t,n,o){return function J$(t,n,o){let e=n;for(;null!==e&&40&e.type;)e=(n=e).parent;if(null===e)return o[pa];{const{componentOffset:i}=e;if(i>-1){const{encapsulation:r}=t.data[e.directiveStart+i];if(r===ye.None||r===ye.Emulated)return null}return du(e,o)}}(t,n.parent,o)}function Kv(t,n,o,e,i){t.insertBefore(n,o,e,i)}function X$(t,n,o){t.appendChild(n,o)}function eK(t,n,o,e,i){null!==e?Kv(t,n,o,e,i):X$(t,n,o)}function RE(t,n){return t.parentNode(n)}function tK(t,n,o){return iK(t,n,o)}let RN,iK=function nK(t,n,o){return 40&t.type?du(t,o):null};function kE(t,n,o,e){const i=AN(t,e,n),r=n[Hi],a=tK(e.parent||n[Vl],e,n);if(null!=i)if(Array.isArray(o))for(let c=0;c<o.length;c++)eK(r,i,o[c],a,!1);else eK(r,i,o,a,!1);void 0!==RN&&RN(r,e,n,o,i)}function Y1(t,n){if(null!==n){const o=n.type;if(3&o)return du(n,t);if(4&o)return kN(-1,t[n.index]);if(8&o){const e=n.child;if(null!==e)return Y1(t,e);{const i=t[n.index];return Hl(i)?kN(-1,i):gs(i)}}if(32&o)return ON(n,t)()||gs(t[n.index]);{const e=rK(t,n);return null!==e?Array.isArray(e)?e[0]:Y1(Vv(t[ga]),e):Y1(t,n.next)}}return null}function rK(t,n){return null!==n?t[ga][Vl].projection[n.projection]:null}function kN(t,n){const o=Za+t+1;if(o<n.length){const e=n[o],i=e[Sn].firstChild;if(null!==i)return Y1(e,i)}return n[dm]}function LN(t,n,o,e,i,r,s){for(;null!=o;){const a=e[o.index],c=o.type;if(s&&0===n&&(a&&Wl(gs(a),e),o.flags|=2),32!=(32&o.flags))if(8&c)LN(t,n,o.child,e,i,r,!1),Jy(n,t,i,a,r);else if(32&c){const u=ON(o,e);let h;for(;h=u();)Jy(n,t,i,h,r);Jy(n,t,i,a,r)}else 16&c?aK(t,n,e,o,i,r):Jy(n,t,i,a,r);o=s?o.projectionNext:o.next}}function DE(t,n,o,e,i,r){LN(o,e,t.firstChild,n,i,r,!1)}function aK(t,n,o,e,i,r){const s=o[ga],c=s[Vl].projection[e.projection];if(Array.isArray(c))for(let u=0;u<c.length;u++)Jy(n,t,i,c[u],r);else{let u=c;const h=s[Ka];$O(e)&&(u.flags|=128),LN(t,n,u,h,i,r,!0)}}function cK(t,n,o){""===o?t.removeAttribute(n,"class"):t.setAttribute(n,"class",o)}function lK(t,n,o){const{mergedAttrs:e,classes:i,styles:r}=o;null!==e&&Ty(t,n,e),null!==i&&cK(t,n,i),null!==r&&function oRe(t,n,o){t.setAttribute(n,"style",o)}(t,n,r)}const no={};function d(t=1){uK(Vo(),Nt(),ql()+t,!1)}function uK(t,n,o,e){if(!e)if(3==(3&n[hi])){const r=t.preOrderCheckHooks;null!==r&&fE(n,r,o)}else{const r=t.preOrderHooks;null!==r&&gE(n,r,0,o)}zv(o)}function g(t,n=hn.Default){const o=Nt();return null===o?T(t,n):c$(ss(),o,Li(t),n)}function pK(t,n,o,e,i,r){const s=E(null);try{let a=null;i&mo.SignalBased&&(a=n[e][O]),null!==a&&void 0!==a.transformFn&&(r=a.transformFn(r)),i&mo.HasDecoratorInputTransform&&(r=t.inputTransforms[e].call(n,r)),null!==t.setInput?t.setInput(n,a,r,o,e):Y9(n,a,e,r)}finally{E(s)}}function BE(t,n,o,e,i,r,s,a,c,u,h){const b=n.blueprint.slice();return b[pa]=i,b[hi]=204|e,(null!==u||t&&2048&t[hi])&&(b[hi]|=2048),a9(b),b[Ka]=b[Iy]=t,b[js]=o,b[Rf]=s||t&&t[Rf],b[Hi]=a||t&&t[Hi],b[zl]=c||t&&t[zl]||null,b[Vl]=r,b[O1]=function AAe(){return xAe++}(),b[sh]=h,b[e9]=u,b[ga]=2==n.type?t[ga]:b,b}function Xy(t,n,o,e,i){let r=t.data[n];if(null===r)r=function DN(t,n,o,e,i){const r=d9(),s=CB(),c=t.data[n]=function pRe(t,n,o,e,i,r){let s=n?n.injectorIndex:-1,a=0;return xy()&&(a|=128),{type:o,index:e,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:r,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:n,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,s?r:r&&r.parent,o,n,e,i);return null===t.firstChild&&(t.firstChild=c),null!==r&&(s?null==r.child&&null!==c.parent&&(r.child=c):null===r.next&&(r.next=c,c.prev=r)),c}(t,n,o,e,i),function bEe(){return Ni.lFrame.inI18n}()&&(r.flags|=32);else if(64&r.type){r.type=o,r.value=e,r.attrs=i;const s=function L1(){const t=Ni.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}();r.injectorIndex=null===s?-1:s.injectorIndex}return hm(r,!0),r}function J1(t,n,o,e){if(0===o)return-1;const i=n.length;for(let r=0;r<o;r++)n.push(e),t.blueprint.push(e),t.data.push(null);return i}function hK(t,n,o,e,i){const r=ql(),s=2&e;try{zv(-1),s&&n.length>Ki&&uK(t,n,Ki,!1),mm(s?2:0,i),o(e,i)}finally{zv(r),mm(s?3:1,i)}}function BN(t,n,o){if(dB(n)){const e=E(null);try{const r=n.directiveEnd;for(let s=n.directiveStart;s<r;s++){const a=t.data[s];a.contentQueries&&a.contentQueries(1,o[s],s)}}finally{E(e)}}}function NN(t,n,o){u9()&&(function bRe(t,n,o,e){const i=o.directiveStart,r=o.directiveEnd;Gv(o)&&function IRe(t,n,o){const e=du(n,t),i=mK(o);let s=16;o.signals?s=4096:o.onPush&&(s=64);const a=NE(t,BE(t,i,null,s,e,n,null,t[Rf].rendererFactory.createRenderer(e,o),null,null,null));t[n.index]=a}(n,o,t.data[i+o.componentOffset]),t.firstCreatePass||vE(o,n),Wl(e,n);const s=o.initialInputs;for(let a=i;a<r;a++){const c=t.data[a],u=qv(n,t,a,o);Wl(u,n),null!==s&&MRe(0,a-i,u,c,0,s),ah(c)&&(Td(o.index,n)[js]=qv(n,t,a,o))}}(t,n,o,du(o,n)),64==(64&o.flags)&&bK(t,n,o))}function FN(t,n,o=du){const e=n.localNames;if(null!==e){let i=n.index+1;for(let r=0;r<e.length;r+=2){const s=e[r+1],a=-1===s?o(n,t):t[s];t[i++]=a}}}function mK(t){const n=t.tView;return null===n||n.incompleteFirstPass?t.tView=UN(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):n}function UN(t,n,o,e,i,r,s,a,c,u,h){const b=Ki+e,w=b+i,R=function sRe(t,n){const o=[];for(let e=0;e<n;e++)o.push(e<t?null:no);return o}(b,w),G="function"==typeof u?u():u;return R[Sn]={type:t,blueprint:R,template:o,queries:null,viewQuery:a,declTNode:n,data:R.slice().fill(null,b),bindingStartIndex:b,expandoStartIndex:w,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof r?r():r,pipeRegistry:"function"==typeof s?s():s,firstChild:null,schemas:c,consts:G,incompleteFirstPass:!1,ssrId:h}}let fK=()=>null;function gK(t,n,o,e,i){for(let s in n){var r;if(!n.hasOwnProperty(s))continue;const a=n[s];if(void 0===a)continue;null!==(r=e)&&void 0!==r||(e={});let c,u=mo.None;Array.isArray(a)?(c=a[0],u=a[1]):c=a;let h=s;if(null!==i){if(!i.hasOwnProperty(s))continue;h=i[s]}0===t?_K(e,o,h,c,u):_K(e,o,h,c)}return e}function _K(t,n,o,e,i){let r;t.hasOwnProperty(o)?(r=t[o]).push(n,e):r=t[o]=[n,e],void 0!==i&&r.push(i)}function Hu(t,n,o,e,i,r,s,a){const c=du(n,o);let h,u=n.inputs;!a&&null!=u&&(h=u[e])?(HN(t,o,h,e,i),Gv(n)&&function fRe(t,n){const o=Td(n,t);16&o[hi]||(o[hi]|=64)}(o,n.index)):3&n.type&&(e=function mRe(t){return"class"===t?"className":"for"===t?"htmlFor":"formaction"===t?"formAction":"innerHtml"===t?"innerHTML":"readonly"===t?"readOnly":"tabindex"===t?"tabIndex":t}(e),i=null!=s?s(i,n.value||"",e):i,r.setProperty(c,e,i))}function GN(t,n,o,e){if(u9()){const i=null===e?null:{"":-1},r=function yRe(t,n){const o=t.directiveRegistry;let e=null,i=null;if(o)for(let s=0;s<o.length;s++){const a=o[s];if(NO(n,a.selectors,!1))if(e||(e=[]),ah(a))if(null!==a.findHostDirectiveDefs){const c=[];i=i||new Map,a.findHostDirectiveDefs(a,c,i),e.unshift(...c,a),VN(t,n,c.length)}else e.unshift(a),VN(t,n,0);else{var r;i=i||new Map,null===(r=a.findHostDirectiveDefs)||void 0===r||r.call(a,a,e,i),e.push(a)}}return null===e?null:[e,i]}(t,o);let s,a;null===r?s=a=null:[s,a]=r,null!==s&&vK(t,n,o,s,i,a),i&&function SRe(t,n,o){if(n){const e=t.localNames=[];for(let i=0;i<n.length;i+=2){const r=o[n[i+1]];if(null==r)throw new vt(-301,!1);e.push(n[i],r)}}}(o,e,i)}o.mergedAttrs=fp(o.mergedAttrs,o.attrs)}function vK(t,n,o,e,i,r){for(let b=0;b<e.length;b++)dN(vE(o,n),t,e[b].type);!function TRe(t,n,o){t.flags|=1,t.directiveStart=n,t.directiveEnd=n+o,t.providerIndexes=n}(o,t.data.length,e.length);for(let b=0;b<e.length;b++){const w=e[b];w.providersResolver&&w.providersResolver(w)}let s=!1,a=!1,c=J1(t,n,e.length,null);for(let b=0;b<e.length;b++){const w=e[b];o.mergedAttrs=fp(o.mergedAttrs,w.hostAttrs),PRe(t,o,n,c,w),wRe(c,w,i),null!==w.contentQueries&&(o.flags|=4),(null!==w.hostBindings||null!==w.hostAttrs||0!==w.hostVars)&&(o.flags|=64);const R=w.type.prototype;var u,h;!s&&(R.ngOnChanges||R.ngOnInit||R.ngDoCheck)&&((null!==(u=t.preOrderHooks)&&void 0!==u?u:t.preOrderHooks=[]).push(o.index),s=!0),a||!R.ngOnChanges&&!R.ngDoCheck||((null!==(h=t.preOrderCheckHooks)&&void 0!==h?h:t.preOrderCheckHooks=[]).push(o.index),a=!0),c++}!function hRe(t,n,o){const i=n.directiveEnd,r=t.data,s=n.attrs,a=[];let c=null,u=null;for(let h=n.directiveStart;h<i;h++){const b=r[h],w=o?o.get(b):null,G=w?w.outputs:null;c=gK(0,b.inputs,h,c,w?w.inputs:null),u=gK(1,b.outputs,h,u,G);const K=null===c||null===s||BO(n)?null:ORe(c,h,s);a.push(K)}null!==c&&(c.hasOwnProperty("class")&&(n.flags|=8),c.hasOwnProperty("style")&&(n.flags|=16)),n.initialInputs=a,n.inputs=c,n.outputs=u}(t,o,r)}function bK(t,n,o){const e=o.directiveStart,i=o.directiveEnd,r=o.index,s=function yEe(){return Ni.lFrame.currentDirectiveIndex}();try{zv(r);for(let a=e;a<i;a++){const c=t.data[a],u=n[a];SB(a),(null!==c.hostBindings||0!==c.hostVars||null!==c.hostAttrs)&&CRe(c,u)}}finally{zv(-1),SB(s)}}function CRe(t,n){null!==t.hostBindings&&t.hostBindings(1,n)}function VN(t,n,o){var e;n.componentOffset=o,(null!==(e=t.components)&&void 0!==e?e:t.components=[]).push(n.index)}function wRe(t,n,o){if(o){if(n.exportAs)for(let e=0;e<n.exportAs.length;e++)o[n.exportAs[e]]=t;ah(n)&&(o[""]=t)}}function PRe(t,n,o,e,i){t.data[e]=i;const r=i.factory||(i.factory=jv(i.type)),s=new H1(r,ah(i),g);t.blueprint[e]=s,o[e]=s,function _Re(t,n,o,e,i){const r=i.hostBindings;if(r){let s=t.hostBindingOpCodes;null===s&&(s=t.hostBindingOpCodes=[]);const a=~n.index;(function vRe(t){let n=t.length;for(;n>0;){const o=t[--n];if("number"==typeof o&&o<0)return o}return 0})(s)!=a&&s.push(a),s.push(o,e,r)}}(t,n,e,J1(t,o,i.hostVars,no),i)}function _m(t,n,o,e,i,r){const s=du(t,n);!function zN(t,n,o,e,i,r,s){if(null==r)t.removeAttribute(n,i,o);else{const a=null==s?Zi(r):s(r,e||"",i);t.setAttribute(n,i,a,o)}}(n[Hi],s,r,t.value,o,e,i)}function MRe(t,n,o,e,i,r){const s=r[n];if(null!==s)for(let a=0;a<s.length;)pK(e,o,s[a++],s[a++],s[a++],s[a++])}function ORe(t,n,o){let e=null,i=0;for(;i<o.length;){const r=o[i];if(0!==r)if(5!==r){if("number"==typeof r)break;if(t.hasOwnProperty(r)){null===e&&(e=[]);const s=t[r];for(let a=0;a<s.length;a+=3)if(s[a]===n){e.push(r,s[a+1],s[a+2],o[i+1]);break}}i+=2}else i+=2;else i+=4}return e}function CK(t,n,o,e){return[t,!0,0,n,null,e,null,o,null,null]}function yK(t,n){const o=t.contentQueries;if(null!==o){const e=E(null);try{for(let i=0;i<o.length;i+=2){const s=o[i+1];if(-1!==s){const a=t.data[s];zO(o[i]),a.contentQueries(2,n[s],s)}}}finally{E(e)}}}function NE(t,n){return t[I1]?t[XW][rh]=n:t[I1]=n,t[XW]=n,n}function jN(t,n,o){zO(0);const e=E(null);try{n(t,o)}finally{E(e)}}function SK(t){return t[Py]||(t[Py]=[])}function wK(t){return t.cleanup||(t.cleanup=[])}function FE(t,n){const o=t[zl],e=o?o.get(lh,null):null;e&&e.handleError(n)}function HN(t,n,o,e,i){for(let r=0;r<o.length;){const s=o[r++],a=o[r++],c=o[r++];pK(t.data[s],n[s],e,a,c,i)}}function Ff(t,n,o){const e=A1(n,t);!function Z$(t,n,o){t.setValue(n,o)}(t[Hi],e,o)}function ERe(t,n){const o=Td(n,t),e=o[Sn];!function xRe(t,n){for(let o=n.length;o<t.blueprint.length;o++)n.push(t.blueprint[o])}(e,o);const i=o[pa];null!==i&&null===o[sh]&&(o[sh]=WB(i,o[zl])),qN(e,o,o[js])}function qN(t,n,o){PB(n);try{var e;const i=t.viewQuery;null!==i&&jN(1,i,o);const r=t.template;null!==r&&hK(t,n,r,1,o),t.firstCreatePass&&(t.firstCreatePass=!1),null===(e=n[um])||void 0===e||e.finishViewCreation(t),t.staticContentQueries&&yK(t,n),t.staticViewQueries&&jN(2,t.viewQuery,o);const s=t.components;null!==s&&function ARe(t,n){for(let o=0;o<n.length;o++)ERe(t,n[o])}(n,s)}catch(i){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),i}finally{n[hi]&=-5,IB()}}function X1(t,n,o,e){var i,r;const s=n.tView,u=BE(t,s,o,4096&t[hi]?4096:16,null,n,null,null,null,null!==(i=null==e?void 0:e.injector)&&void 0!==i?i:null,null!==(r=null==e?void 0:e.dehydratedView)&&void 0!==r?r:null);u[M1]=t[n.index];const b=t[um];return null!==b&&(u[um]=b.createEmbeddedView(s)),qN(s,u,o),u}function PK(t,n){const o=Za+n;if(o<t.length)return t[o]}function eS(t,n){return!n||null===n.firstChild||$O(t)}function eT(t,n,o,e=!0){const i=n[Sn];if(function ZAe(t,n,o,e){const i=Za+e,r=o.length;e>0&&(o[i-1][rh]=n),e<r-Za?(n[rh]=o[i],w9(o,Za+e,n)):(o.push(n),n[rh]=null),n[Ka]=o;const s=n[M1];null!==s&&o!==s&&function QAe(t,n){const o=t[Oy];n[ga]!==n[Ka][Ka][ga]&&(t[hi]|=uB.HasTransplantedViews),null===o?t[Oy]=[n]:o.push(n)}(s,n);const a=n[um];null!==a&&a.insertView(t),vB(n),n[hi]|=128}(i,n,t,o),e){const s=kN(o,t),a=n[Hi],c=RE(a,t[dm]);null!==c&&function $Ae(t,n,o,e,i,r){e[pa]=i,e[Vl]=n,DE(t,e,o,1,i,r)}(i,t[Vl],a,n,c,s)}const r=n[sh];null!==r&&null!==r.firstChild&&(r.firstChild=null)}function WN(t,n){const o=Q1(t,n);return void 0!==o&&AE(o[Sn],o),o}function tT(t,n,o,e,i=!1){for(;null!==o;){const r=n[o.index];null!==r&&e.push(gs(r)),Hl(r)&&IK(r,e);const s=o.type;if(8&s)tT(t,n,o.child,e);else if(32&s){const a=ON(o,n);let c;for(;c=a();)e.push(c)}else if(16&s){const a=rK(n,o);if(Array.isArray(a))e.push(...a);else{const c=Vv(n[ga]);tT(c[Sn],c,a,e,!0)}}o=i?o.projectionNext:o.next}return e}function IK(t,n){for(let o=Za;o<t.length;o++){const e=t[o],i=e[Sn].firstChild;null!==i&&tT(e[Sn],e,i,n)}t[dm]!==t[pa]&&n.push(t[dm])}let MK=[];const DRe={...I,consumerIsAlwaysLive:!0,consumerMarkedDirty:t=>{k1(t.lView)},consumerOnSignalRead(){this.lView[Uv]=this}};function OK(t){return xK(t[I1])}function EK(t){return xK(t[rh])}function xK(t){for(;null!==t&&!Hl(t);)t=t[rh];return t}function UE(t,n=!0,o=0){const e=t[Rf],i=e.rendererFactory;var s;null===(s=i.begin)||void 0===s||s.call(i);try{!function FRe(t,n){$N(t,n);let o=0;for(;_B(t);){if(100===o)throw new vt(103,!1);o++,$N(t,1)}}(t,o)}catch(u){throw n&&FE(t,u),u}finally{var a,c;null===(a=i.end)||void 0===a||a.call(i),null===(c=e.inlineEffectRunner)||void 0===c||c.flush()}}function URe(t,n,o,e){var i;const r=n[hi];if(256==(256&r))return;null===(i=n[Rf].inlineEffectRunner)||void 0===i||i.flush(),PB(n);let a=null,c=null;(function GRe(t){return 2!==t.type})(t)&&(c=function RRe(t){var n;return null!==(n=t[Uv])&&void 0!==n?n:function kRe(t){var n;const o=null!==(n=MK.pop())&&void 0!==n?n:Object.create(DRe);return o.lView=t,o}(t)}(n),a=q(c));try{a9(n),function h9(t){return Ni.lFrame.bindingIndex=t}(t.bindingStartIndex),null!==o&&hK(t,n,o,2,e);const u=3==(3&r);if(u){const w=t.preOrderCheckHooks;null!==w&&fE(n,w,null)}else{const w=t.preOrderHooks;null!==w&&gE(n,w,0,null),sN(n,0)}if(function VRe(t){for(let n=OK(t);null!==n;n=EK(n)){if(!(n[hi]&uB.HasTransplantedViews))continue;const o=n[Oy];for(let e=0;e<o.length;e++){lEe(o[e])}}}(n),RK(n,0),null!==t.contentQueries&&yK(t,n),u){const w=t.contentCheckHooks;null!==w&&fE(n,w)}else{const w=t.contentHooks;null!==w&&gE(n,w,1),sN(n,1)}!function rRe(t,n){const o=t.hostBindingOpCodes;if(null!==o)try{for(let e=0;e<o.length;e++){const i=o[e];if(i<0)zv(~i);else{const r=i,s=o[++e],a=o[++e];CEe(s,r),a(2,n[r])}}}finally{zv(-1)}}(t,n);const h=t.components;null!==h&&LK(n,h,0);const b=t.viewQuery;if(null!==b&&jN(2,b,e),u){const w=t.viewCheckHooks;null!==w&&fE(n,w)}else{const w=t.viewHooks;null!==w&&gE(n,w,2),sN(n,2)}if(!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),n[E1]){for(const w of n[E1])w();n[E1]=null}n[hi]&=-73}catch(u){throw k1(n),u}finally{null!==c&&(X(c,a),function LRe(t){t.lView[Uv]!==t&&(t.lView=null,MK.push(t))}(c)),IB()}}function RK(t,n){for(let o=OK(t);null!==o;o=EK(o))for(let e=Za;e<o.length;e++)kK(o[e],n)}function zRe(t,n,o){kK(Td(n,t),o)}function kK(t,n){gB(t)&&$N(t,n)}function $N(t,n){const e=t[Sn],i=t[hi],r=t[Uv];let s=!!(0===n&&16&i);if(s||(s=!!(64&i&&0===n)),s||(s=!!(1024&i)),s||(s=!(null==r||!r.dirty||!ae(r))),r&&(r.dirty=!1),t[hi]&=-9217,s)URe(e,t,e.template,t[js]);else if(8192&i){RK(t,1);const a=e.components;null!==a&&LK(t,a,1)}}function LK(t,n,o){for(let e=0;e<n.length;e++)zRe(t,n[e],o)}function nT(t){var n;for(null===(n=t[Rf].changeDetectionScheduler)||void 0===n||n.notify();t;){t[hi]|=64;const o=Vv(t);if(pB(t)&&!o)return t;t=o}return null}class iT{get rootNodes(){const n=this._lView,o=n[Sn];return tT(o,n,o.firstChild,[])}constructor(n,o,e=!0){this._lView=n,this._cdRefInjectingView=o,this.notifyErrorHandler=e,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[js]}set context(n){this._lView[js]=n}get destroyed(){return 256==(256&this._lView[hi])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const n=this._lView[Ka];if(Hl(n)){const o=n[8],e=o?o.indexOf(this):-1;e>-1&&(Q1(n,e),qO(o,e))}this._attachedToViewContainer=!1}AE(this._lView[Sn],this._lView)}onDestroy(n){VO(this._lView,n)}markForCheck(){nT(this._cdRefInjectingView||this._lView)}detach(){this._lView[hi]&=-129}reattach(){vB(this._lView),this._lView[hi]|=128}detectChanges(){this._lView[hi]|=1024,UE(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new vt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,Q$(this._lView[Sn],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new vt(902,!1);this._appRef=n,vB(this._lView)}}let Qa=(()=>{class n{}return n.__NG_ELEMENT_ID__=qRe,n})();const jRe=Qa,HRe=class extends jRe{constructor(n,o,e){super(),this._declarationLView=n,this._declarationTContainer=o,this.elementRef=e}get ssrId(){var n;return(null===(n=this._declarationTContainer.tView)||void 0===n?void 0:n.ssrId)||null}createEmbeddedView(n,o){return this.createEmbeddedViewImpl(n,o)}createEmbeddedViewImpl(n,o,e){const i=X1(this._declarationLView,this._declarationTContainer,n,{injector:o,dehydratedView:e});return new iT(i)}};function qRe(){return GE(ss(),Nt())}function GE(t,n){return 4&t.type?new HRe(n,t,Ay(t,n)):null}"^(\\d+)*(".concat("b","|").concat("h",")*(.*)");let GK=()=>null;function tS(t,n){return GK(t,n)}class XN{}class hke{}class VK{}class fke{resolveComponentFactory(n){throw function mke(t){const n=Error("No component factory found for ".concat(di(t),"."));return n.ngComponent=t,n}(n)}}let nS=(()=>{class n{}return n.NULL=new fke,n})();class eF{}let ji=(()=>{class n{constructor(){this.destroyNode=null}}return n.__NG_ELEMENT_ID__=()=>function gke(){const t=Nt(),o=Td(ss().index,t);return(jl(o)?o:t)[Hi]}(),n})(),_ke=(()=>{var t;class n{}return(t=n).\u0275prov=be({token:t,providedIn:"root",factory:()=>null}),n})();const tF={};function nF(t,n){const o=function xe(t){const n=Object.create(It);n.computation=t;const o=()=>{if(D(n),S(n),n.value===st)throw n.error;return n.value};return o[O]=n,o}(t);return null!=n&&n.equal&&(o[O].equal=n.equal),o}function iF(t,n){const o=function kt(t){const n=Object.create(uc);n.value=t;const o=()=>(S(n),n.value);return o[O]=n,o}(t),e=o[O];return null!=n&&n.equal&&(e.equal=n.equal),o.set=i=>Xr(e,i),o.update=i=>function wo(t,n){z()||At(),Xr(t,n(t.value))}(e,i),o.asReadonly=vke.bind(o),o}function vke(){const t=this[O];if(void 0===t.readonlyFn){const n=()=>this();n[O]=t,t.readonlyFn=n}return t.readonlyFn}function HK(t){return function jK(t){return"function"==typeof t&&void 0!==t[O]}(t)&&"function"==typeof t.set}function qK(t){const n=E(null);try{return t()}finally{E(n)}}function qE(t){return!!oF(t)&&(Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t)}function oF(t){return null!==t&&("function"==typeof t||"object"==typeof t)}class WK{constructor(){}supports(n){return qE(n)}create(n){return new Ske(n)}}const yke=(t,n)=>n;class Ske{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||yke}forEachItem(n){let o;for(o=this._itHead;null!==o;o=o._next)n(o)}forEachOperation(n){let o=this._itHead,e=this._removalsHead,i=0,r=null;for(;o||e;){const s=!e||o&&o.currentIndex<KK(e,i,r)?o:e,a=KK(s,i,r),c=s.currentIndex;if(s===e)i--,e=e._nextRemoved;else if(o=o._next,null==s.previousIndex)i++;else{r||(r=[]);const u=a-i,h=c-i;if(u!=h){for(let w=0;w<u;w++){const R=w<r.length?r[w]:r[w]=0,G=R+w;h<=G&&G<u&&(r[w]=R+1)}r[s.previousIndex]=h-u}}a!==c&&n(s,a,c)}}forEachPreviousItem(n){let o;for(o=this._previousItHead;null!==o;o=o._nextPrevious)n(o)}forEachAddedItem(n){let o;for(o=this._additionsHead;null!==o;o=o._nextAdded)n(o)}forEachMovedItem(n){let o;for(o=this._movesHead;null!==o;o=o._nextMoved)n(o)}forEachRemovedItem(n){let o;for(o=this._removalsHead;null!==o;o=o._nextRemoved)n(o)}forEachIdentityChange(n){let o;for(o=this._identityChangesHead;null!==o;o=o._nextIdentityChange)n(o)}diff(n){if(null==n&&(n=[]),!qE(n))throw new vt(900,!1);return this.check(n)?this:null}onDestroy(){}check(n){this._reset();let i,r,s,o=this._itHead,e=!1;if(Array.isArray(n)){this.length=n.length;for(let a=0;a<this.length;a++)r=n[a],s=this._trackByFn(a,r),null!==o&&Object.is(o.trackById,s)?(e&&(o=this._verifyReinsertion(o,r,s,a)),Object.is(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,s,a),e=!0),o=o._next}else i=0,function Cke(t,n){if(Array.isArray(t))for(let o=0;o<t.length;o++)n(t[o]);else{const o=t[Symbol.iterator]();let e;for(;!(e=o.next()).done;)n(e.value)}}(n,a=>{s=this._trackByFn(i,a),null!==o&&Object.is(o.trackById,s)?(e&&(o=this._verifyReinsertion(o,a,s,i)),Object.is(o.item,a)||this._addIdentityChange(o,a)):(o=this._mismatch(o,a,s,i),e=!0),o=o._next,i++}),this.length=i;return this._truncate(o),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,o,e,i){let r;return null===n?r=this._itTail:(r=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(e,null))?(Object.is(n.item,o)||this._addIdentityChange(n,o),this._reinsertAfter(n,r,i)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(e,i))?(Object.is(n.item,o)||this._addIdentityChange(n,o),this._moveAfter(n,r,i)):n=this._addAfter(new wke(o,e),r,i),n}_verifyReinsertion(n,o,e,i){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(e,null);return null!==r?n=this._reinsertAfter(r,n._prev,i):n.currentIndex!=i&&(n.currentIndex=i,this._addToMoves(n,i)),n}_truncate(n){for(;null!==n;){const o=n._next;this._addToRemovals(this._unlink(n)),n=o}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,o,e){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const i=n._prevRemoved,r=n._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(n,o,e),this._addToMoves(n,e),n}_moveAfter(n,o,e){return this._unlink(n),this._insertAfter(n,o,e),this._addToMoves(n,e),n}_addAfter(n,o,e){return this._insertAfter(n,o,e),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,o,e){const i=null===o?this._itHead:o._next;return n._next=i,n._prev=o,null===i?this._itTail=n:i._prev=n,null===o?this._itHead=n:o._next=n,null===this._linkedRecords&&(this._linkedRecords=new $K),this._linkedRecords.put(n),n.currentIndex=e,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const o=n._prev,e=n._next;return null===o?this._itHead=e:o._next=e,null===e?this._itTail=o:e._prev=o,n}_addToMoves(n,o){return n.previousIndex===o||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new $K),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,o){return n.item=o,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class wke{constructor(n,o){this.item=n,this.trackById=o,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Tke{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,o){let e;for(e=this._head;null!==e;e=e._nextDup)if((null===o||o<=e.currentIndex)&&Object.is(e.trackById,n))return e;return null}remove(n){const o=n._prevDup,e=n._nextDup;return null===o?this._head=e:o._nextDup=e,null===e?this._tail=o:e._prevDup=o,null===this._head}}class $K{constructor(){this.map=new Map}put(n){const o=n.trackById;let e=this.map.get(o);e||(e=new Tke,this.map.set(o,e)),e.add(n)}get(n,o){const i=this.map.get(n);return i?i.get(n,o):null}remove(n){const o=n.trackById;return this.map.get(o).remove(n)&&this.map.delete(o),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function KK(t,n,o){const e=t.previousIndex;if(null===e)return e;let i=0;return o&&e<o.length&&(i=o[e]),e+n+i}class ZK{constructor(){}supports(n){return n instanceof Map||oF(n)}create(){return new Pke}}class Pke{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(n){let o;for(o=this._mapHead;null!==o;o=o._next)n(o)}forEachPreviousItem(n){let o;for(o=this._previousMapHead;null!==o;o=o._nextPrevious)n(o)}forEachChangedItem(n){let o;for(o=this._changesHead;null!==o;o=o._nextChanged)n(o)}forEachAddedItem(n){let o;for(o=this._additionsHead;null!==o;o=o._nextAdded)n(o)}forEachRemovedItem(n){let o;for(o=this._removalsHead;null!==o;o=o._nextRemoved)n(o)}diff(n){if(n){if(!(n instanceof Map||oF(n)))throw new vt(900,!1)}else n=new Map;return this.check(n)?this:null}onDestroy(){}check(n){this._reset();let o=this._mapHead;if(this._appendAfter=null,this._forEach(n,(e,i)=>{if(o&&o.key===i)this._maybeAddToChanges(o,e),this._appendAfter=o,o=o._next;else{const r=this._getOrCreateRecordForKey(i,e);o=this._insertBeforeOrAppend(o,r)}}),o){o._prev&&(o._prev._next=null),this._removalsHead=o;for(let e=o;null!==e;e=e._nextRemoved)e===this._mapHead&&(this._mapHead=null),this._records.delete(e.key),e._nextRemoved=e._next,e.previousValue=e.currentValue,e.currentValue=null,e._prev=null,e._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,o){if(n){const e=n._prev;return o._next=n,o._prev=e,n._prev=o,e&&(e._next=o),n===this._mapHead&&(this._mapHead=o),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=o,o._prev=this._appendAfter):this._mapHead=o,this._appendAfter=o,null}_getOrCreateRecordForKey(n,o){if(this._records.has(n)){const i=this._records.get(n);this._maybeAddToChanges(i,o);const r=i._prev,s=i._next;return r&&(r._next=s),s&&(s._prev=r),i._next=null,i._prev=null,i}const e=new Ike(n);return this._records.set(n,e),e.currentValue=o,this._addToAdditions(e),e}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,o){Object.is(o,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=o,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,o){n instanceof Map?n.forEach(o):Object.keys(n).forEach(e=>o(n[e],e))}}class Ike{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function QK(){return new rF([new WK])}let rF=(()=>{var t;class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||QK()),deps:[[n,new jo,new zo]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new vt(901,!1)}}return(t=n).\u0275prov=be({token:t,providedIn:"root",factory:QK}),n})();function YK(){return new WE([new ZK])}let WE=(()=>{var t;class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||YK()),deps:[[n,new jo,new zo]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new vt(901,!1)}}return(t=n).\u0275prov=be({token:t,providedIn:"root",factory:YK}),n})(),Re=(()=>{class n{}return n.__NG_ELEMENT_ID__=Oke,n})();function Oke(t){return function Eke(t,n,o){if(Gv(t)&&!o){const e=Td(t.index,n);return new iT(e,e)}return 47&t.type?new iT(n[ga],n):null}(ss(),Nt(),16==(16&t))}let br=(()=>{var t;class n{}return(t=n).__NG_ELEMENT_ID__=kke,t.__NG_ENV_ID__=o=>o,n})();class Rke extends br{constructor(n){super(),this._lView=n}onDestroy(n){return VO(this._lView,n),()=>function bB(t,n){if(null===t[Jg])return;const o=t[Jg].indexOf(n);-1!==o&&t[Jg].splice(o,1)}(this._lView,n)}}function kke(){return new Rke(Nt())}const JK=new Set;function Zv(t){var n,o;JK.has(t)||(JK.add(t),null===(n=performance)||void 0===n||null===(o=n.mark)||void 0===o||o.call(n,"mark_feature_usage",{detail:{feature:t}}))}function XK(...t){}class an{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:o=!1,shouldCoalesceRunChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ke(!1),this.onMicrotaskEmpty=new ke(!1),this.onStable=new ke(!1),this.onError=new ke(!1),typeof Zone>"u")throw new vt(908,!1);Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!e&&o,i.shouldCoalesceRunChangeDetection=e,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function Uke(){const t="function"==typeof Ye.requestAnimationFrame;let n=Ye[t?"requestAnimationFrame":"setTimeout"],o=Ye[t?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&n&&o){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=o[Zone.__symbol__("OriginalDelegate")];i&&(o=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:o}}().nativeRequestAnimationFrame,function zke(t){const n=()=>{!function Vke(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Ye,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,aF(t),t.isCheckStableRunning=!0,sF(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),aF(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(o,e,i,r,s,a)=>{if(function jke(t){var n;return!(!Array.isArray(t)||1!==t.length)&&!0===(null===(n=t[0].data)||void 0===n?void 0:n.__ignore_ng_zone__)}(a))return o.invokeTask(i,r,s,a);try{return eZ(t),o.invokeTask(i,r,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===r.type||t.shouldCoalesceRunChangeDetection)&&n(),tZ(t)}},onInvoke:(o,e,i,r,s,a,c)=>{try{return eZ(t),o.invoke(i,r,s,a,c)}finally{t.shouldCoalesceRunChangeDetection&&n(),tZ(t)}},onHasTask:(o,e,i,r)=>{o.hasTask(i,r),e===i&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,aF(t),sF(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(o,e,i,r)=>(o.handleError(i,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(i)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!an.isInAngularZone())throw new vt(909,!1)}static assertNotInAngularZone(){if(an.isInAngularZone())throw new vt(909,!1)}run(n,o,e){return this._inner.run(n,o,e)}runTask(n,o,e,i){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+i,n,Gke,XK,XK);try{return r.runTask(s,o,e)}finally{r.cancelTask(s)}}runGuarded(n,o,e){return this._inner.runGuarded(n,o,e)}runOutsideAngular(n){return this._outer.run(n)}}const Gke={};function sF(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function aF(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function eZ(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function tZ(t){t._nesting--,sF(t)}class nZ{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ke,this.onMicrotaskEmpty=new ke,this.onStable=new ke,this.onError=new ke}run(n,o,e){return n.apply(o,e)}runGuarded(n,o,e){return n.apply(o,e)}runOutsideAngular(n){return n()}runTask(n,o,e,i){return n.apply(o,e)}}var Qv=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(Qv||{});const iZ={destroy(){}};function rZ(t,n){var o,e,i;!n&&z1();const r=null!==(o=null==n?void 0:n.injector)&&void 0!==o?o:mt(vs);if(!function o_(t){return"browser"===(null!=t?t:mt(vs)).get(t_)}(r))return iZ;Zv("NgAfterNextRender");const s=r.get(cT),a=null!==(e=s.handler)&&void 0!==e?e:s.handler=new aZ,c=null!==(i=null==n?void 0:n.phase)&&void 0!==i?i:Qv.MixedReadWrite,u=()=>{a.unregister(b),h()},h=r.get(br).onDestroy(u),b=new sZ(r,c,()=>{u(),t()});return a.register(b),{destroy:u}}class sZ{constructor(n,o,e){this.phase=o,this.callbackFn=e,this.zone=n.get(an),this.errorHandler=n.get(lh,null,{optional:!0})}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(o){var n;null===(n=this.errorHandler)||void 0===n||n.handleError(o)}}}class aZ{constructor(){this.executingCallbacks=!1,this.buckets={[Qv.EarlyRead]:new Set,[Qv.Write]:new Set,[Qv.MixedReadWrite]:new Set,[Qv.Read]:new Set},this.deferredCallbacks=new Set}register(n){(this.executingCallbacks?this.deferredCallbacks:this.buckets[n.phase]).add(n)}unregister(n){this.buckets[n.phase].delete(n),this.deferredCallbacks.delete(n)}execute(){this.executingCallbacks=!0;for(const n of Object.values(this.buckets))for(const o of n)o.invoke();this.executingCallbacks=!1;for(const n of this.deferredCallbacks)this.buckets[n.phase].add(n);this.deferredCallbacks.clear()}destroy(){for(const n of Object.values(this.buckets))n.clear();this.deferredCallbacks.clear()}}let cT=(()=>{var t;class n{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){var e;const i=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const r of i)r();null===(e=this.handler)||void 0===e||e.execute()}ngOnDestroy(){var e;null===(e=this.handler)||void 0===e||e.destroy(),this.handler=null,this.internalCallbacks.length=0}}return(t=n).\u0275prov=be({token:t,providedIn:"root",factory:()=>new t}),n})();function KE(t,n,o){let e=o?t.styles:null,i=o?t.classes:null,r=0;if(null!==n)for(let s=0;s<n.length;s++){const a=n[s];"number"==typeof a?r=a:1==r?i=As(i,a):2==r&&(e=As(e,a+": "+n[++s]+";"))}o?t.styles=e:t.stylesWithoutHost=e,o?t.classes=i:t.classesWithoutHost=i}class uZ extends nS{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const o=xo(n);return new dT(o,this.ngModule)}}function dZ(t){const n=[];for(const o in t){if(!t.hasOwnProperty(o))continue;const e=t[o];void 0!==e&&n.push({propName:Array.isArray(e)?e[0]:e,templateName:o})}return n}class Zke{constructor(n,o){this.injector=n,this.parentInjector=o}get(n,o,e){e=tE(e);const i=this.injector.get(n,tF,e);return i!==tF||o===tF?i:this.parentInjector.get(n,o,e)}}class dT extends VK{get inputs(){const n=this.componentDef,o=n.inputTransforms,e=dZ(n.inputs);if(null!==o)for(const i of e)o.hasOwnProperty(i.propName)&&(i.transform=o[i.propName]);return e}get outputs(){return dZ(this.componentDef.outputs)}constructor(n,o){super(),this.componentDef=n,this.ngModule=o,this.componentType=n.type,this.selector=function QOe(t){return t.map(ZOe).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!o}create(n,o,e,i){var s;let a=(i=i||this.ngModule)instanceof Id?i:null===(s=i)||void 0===s?void 0:s.injector;a&&null!==this.componentDef.getStandaloneInjector&&(a=this.componentDef.getStandaloneInjector(a)||a);const c=a?new Zke(n,a):n,u=c.get(eF,null);if(null===u)throw new vt(407,!1);const R={rendererFactory:u,sanitizer:c.get(_ke,null),inlineEffectRunner:null,afterRenderEventManager:c.get(cT,null),changeDetectionScheduler:c.get(XN,null)},G=u.createRenderer(null,this.componentDef),K=this.componentDef.selectors[0][0]||"div",te=e?function aRe(t,n,o,e){const r=e.get(S$,!1)||o===ye.ShadowDom,s=t.selectRootElement(n,r);return function cRe(t){fK(t)}(s),s}(G,e,this.componentDef.encapsulation,c):xE(G,K,function Kke(t){const n=t.toLowerCase();return"svg"===n?o9:"math"===n?"math":null}(K));let ee=512;this.componentDef.signals?ee|=4096:this.componentDef.onPush||(ee|=16);let le=null;null!==te&&(le=WB(te,c,!0));const me=UN(0,null,null,1,0,null,null,null,null,null,null),ge=BE(null,me,null,ee,null,null,R,G,c,null,le);let Me,Ke;PB(ge);try{const Ee=this.componentDef;let ot,ct=null;Ee.findHostDirectiveDefs?(ot=[],ct=new Map,Ee.findHostDirectiveDefs(Ee,ot,ct),ot.push(Ee)):ot=[Ee];const Pt=function Yke(t,n){const o=t[Sn],e=Ki;return t[e]=n,Xy(o,e,2,"#host",null)}(ge,te),gn=function Jke(t,n,o,e,i,r,s){const a=i[Sn];!function Xke(t,n,o,e){for(const i of t)n.mergedAttrs=fp(n.mergedAttrs,i.hostAttrs);null!==n.mergedAttrs&&(KE(n,n.mergedAttrs,!0),null!==o&&lK(e,o,n))}(e,t,n,s);let c=null;null!==n&&(c=WB(n,i[zl]));const u=r.rendererFactory.createRenderer(n,o);let h=16;o.signals?h=4096:o.onPush&&(h=64);const b=BE(i,mK(o),null,h,i[t.index],t,r,u,null,null,c);return a.firstCreatePass&&VN(a,t,e.length-1),NE(i,b),i[t.index]=b}(Pt,te,Ee,ot,ge,R,G);Ke=R1(me,Ki),te&&function tLe(t,n,o,e){if(e)Ty(t,o,["ng-version","17.2.1"]);else{const{attrs:i,classes:r}=function YOe(t){const n=[],o=[];let e=1,i=2;for(;e<t.length;){let r=t[e];if("string"==typeof r)2===i?""!==r&&n.push(r,t[++e]):8===i&&o.push(r);else{if(!Gu(i))break;i=r}e++}return{attrs:n,classes:o}}(n.selectors[0]);i&&Ty(t,o,i),r&&r.length>0&&cK(t,o,r.join(" "))}}(G,Ee,te,e),void 0!==o&&function nLe(t,n,o){const e=t.projection=[];for(let i=0;i<n.length;i++){const r=o[i];e.push(null!=r?Array.from(r):null)}}(Ke,this.ngContentSelectors,o),Me=function eLe(t,n,o,e,i,r){const s=ss(),a=i[Sn],c=du(s,i);vK(a,i,s,o,null,e);for(let h=0;h<o.length;h++)Wl(qv(i,a,s.directiveStart+h,s),i);bK(a,i,s),c&&Wl(c,i);const u=qv(i,a,s.directiveStart+s.componentOffset,s);if(t[js]=i[js]=u,null!==r)for(const h of r)h(u,n);return BN(a,s,t),u}(gn,Ee,ot,ct,ge,[iLe]),qN(me,ge,null)}finally{IB()}return new Qke(this.componentType,Me,Ay(Ke,ge),ge,Ke)}}class Qke extends hke{constructor(n,o,e,i,r){super(),this.location=e,this._rootLView=i,this._tNode=r,this.previousInputValues=null,this.instance=o,this.hostView=this.changeDetectorRef=new iT(i,void 0,!1),this.componentType=n}setInput(n,o){const e=this._tNode.inputs;let i;if(null!==e&&(i=e[n])){var r;if(null!==(r=this.previousInputValues)&&void 0!==r||(this.previousInputValues=new Map),this.previousInputValues.has(n)&&Object.is(this.previousInputValues.get(n),o))return;const s=this._rootLView;HN(s[Sn],s,i,n,o),this.previousInputValues.set(n,o),nT(Td(this._tNode.index,s))}}get injector(){return new Rc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}}function iLe(){const t=ss();mE(Nt()[Sn],t)}let bs=(()=>{class n{}return n.__NG_ELEMENT_ID__=oLe,n})();function oLe(){return mZ(ss(),Nt())}const rLe=bs,pZ=class extends rLe{constructor(n,o,e){super(),this._lContainer=n,this._hostTNode=o,this._hostLView=e}get element(){return Ay(this._hostTNode,this._hostLView)}get injector(){return new Rc(this._hostTNode,this._hostLView)}get parentInjector(){const n=bE(this._hostTNode,this._hostLView);if(cN(n)){const o=W1(n,this._hostLView),e=q1(n);return new Rc(o[Sn].data[e+8],o)}return new Rc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const o=hZ(this._lContainer);return null!==o&&o[n]||null}get length(){return this._lContainer.length-Za}createEmbeddedView(n,o,e){let i,r;"number"==typeof e?i=e:null!=e&&(i=e.index,r=e.injector);const s=tS(this._lContainer,n.ssrId),a=n.createEmbeddedViewImpl(o||{},r,s);return this.insertImpl(a,i,eS(this._hostTNode,s)),a}createComponent(n,o,e,i,r){var s,a,c;const u=n&&!function j1(t){return"function"==typeof t}(n);let h;if(u)h=o;else{const ee=o||{};h=ee.index,e=ee.injector,i=ee.projectableNodes,r=ee.environmentInjector||ee.ngModuleRef}const b=u?n:new dT(xo(n)),w=e||this.parentInjector;if(!r&&null==b.ngModule){const le=(u?w:this.parentInjector).get(Id,null);le&&(r=le)}const R=xo(null!==(s=b.componentType)&&void 0!==s?s:{}),G=tS(this._lContainer,null!==(a=null==R?void 0:R.id)&&void 0!==a?a:null),K=null!==(c=null==G?void 0:G.firstChild)&&void 0!==c?c:null,te=b.create(w,i,K,r);return this.insertImpl(te.hostView,h,eS(this._hostTNode,G)),te}insert(n,o){return this.insertImpl(n,o,!0)}insertImpl(n,o,e){const i=n._lView;if(function cEe(t){return Hl(t[Ka])}(i)){const a=this.indexOf(n);if(-1!==a)this.detach(a);else{const c=i[Ka],u=new pZ(c,c[Vl],c[Ka]);u.detach(u.indexOf(n))}}const r=this._adjustIndex(o),s=this._lContainer;return eT(s,i,r,e),n.attachToViewContainerRef(),w9(uF(s),r,n),n}move(n,o){return this.insert(n,o)}indexOf(n){const o=hZ(this._lContainer);return null!==o?o.indexOf(n):-1}remove(n){const o=this._adjustIndex(n,-1),e=Q1(this._lContainer,o);e&&(qO(uF(this._lContainer),o),AE(e[Sn],e))}detach(n){const o=this._adjustIndex(n,-1),e=Q1(this._lContainer,o);return e&&null!=qO(uF(this._lContainer),o)?new iT(e):null}_adjustIndex(n,o=0){return null==n?this.length+o:n}};function hZ(t){return t[8]}function uF(t){return t[8]||(t[8]=[])}function mZ(t,n){let o;const e=n[t.index];return Hl(e)?o=e:(o=CK(e,n,null,t),n[t.index]=o,NE(n,o)),fZ(o,n,t,e),new pZ(o,t,n)}let fZ=function _Z(t,n,o,e){if(t[dm])return;let i;i=8&o.type?gs(e):function sLe(t,n){const o=t[Hi],e=o.createComment(""),i=du(n,t);return Kv(o,RE(o,i),e,function eRe(t,n){return t.nextSibling(n)}(o,i),!1),e}(n,o),t[dm]=i},dF=()=>!1;class pF{constructor(n){this.queryList=n,this.matches=null}clone(){return new pF(this.queryList)}setDirty(){this.queryList.setDirty()}}class hF{constructor(n=[]){this.queries=n}createEmbeddedView(n){const o=n.queries;if(null!==o){const e=null!==n.contentQueries?n.contentQueries[0]:o.length,i=[];for(let r=0;r<e;r++){const s=o.getByIndex(r);i.push(this.queries[s.indexInDeclarationView].clone())}return new hF(i)}return null}insertView(n){this.dirtyQueriesWithMatches(n)}detachView(n){this.dirtyQueriesWithMatches(n)}finishViewCreation(n){this.dirtyQueriesWithMatches(n)}dirtyQueriesWithMatches(n){for(let o=0;o<this.queries.length;o++)null!==vF(n,o).matches&&this.queries[o].setDirty()}}class vZ{constructor(n,o,e=null){this.flags=o,this.read=e,this.predicate="string"==typeof n?function mLe(t){return t.split(",").map(n=>n.trim())}(n):n}}class mF{constructor(n=[]){this.queries=n}elementStart(n,o){for(let e=0;e<this.queries.length;e++)this.queries[e].elementStart(n,o)}elementEnd(n){for(let o=0;o<this.queries.length;o++)this.queries[o].elementEnd(n)}embeddedTView(n){let o=null;for(let e=0;e<this.length;e++){const i=null!==o?o.length:0,r=this.getByIndex(e).embeddedTView(n,i);r&&(r.indexInDeclarationView=e,null!==o?o.push(r):o=[r])}return null!==o?new mF(o):null}template(n,o){for(let e=0;e<this.queries.length;e++)this.queries[e].template(n,o)}getByIndex(n){return this.queries[n]}get length(){return this.queries.length}track(n){this.queries.push(n)}}class fF{constructor(n,o=-1){this.metadata=n,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=o}elementStart(n,o){this.isApplyingToNode(o)&&this.matchTNode(n,o)}elementEnd(n){this._declarationNodeIndex===n.index&&(this._appliesToNextNode=!1)}template(n,o){this.elementStart(n,o)}embeddedTView(n,o){return this.isApplyingToNode(n)?(this.crossesNgTemplate=!0,this.addMatch(-n.index,o),new fF(this.metadata)):null}isApplyingToNode(n){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const o=this._declarationNodeIndex;let e=n.parent;for(;null!==e&&8&e.type&&e.index!==o;)e=e.parent;return o===(null!==e?e.index:-1)}return this._appliesToNextNode}matchTNode(n,o){const e=this.metadata.predicate;if(Array.isArray(e))for(let i=0;i<e.length;i++){const r=e[i];this.matchTNodeWithReadOption(n,o,uLe(o,r)),this.matchTNodeWithReadOption(n,o,CE(o,n,r,!1,!1))}else e===Qa?4&o.type&&this.matchTNodeWithReadOption(n,o,-1):this.matchTNodeWithReadOption(n,o,CE(o,n,e,!1,!1))}matchTNodeWithReadOption(n,o,e){if(null!==e){const i=this.metadata.read;if(null!==i)if(i===$t||i===bs||i===Qa&&4&o.type)this.addMatch(o.index,-2);else{const r=CE(o,n,i,!1,!1);null!==r&&this.addMatch(o.index,r)}else this.addMatch(o.index,e)}}addMatch(n,o){null===this.matches?this.matches=[n,o]:this.matches.push(n,o)}}function uLe(t,n){const o=t.localNames;if(null!==o)for(let e=0;e<o.length;e+=2)if(o[e]===n)return o[e+1];return null}function pLe(t,n,o,e){return-1===o?function dLe(t,n){return 11&t.type?Ay(t,n):4&t.type?GE(t,n):null}(n,t):-2===o?function hLe(t,n,o){return o===$t?Ay(n,t):o===Qa?GE(n,t):o===bs?mZ(n,t):void 0}(t,n,e):qv(t,t[Sn],o,n)}function bZ(t,n,o,e){const i=n[um].queries[e];if(null===i.matches){const r=t.data,s=o.matches,a=[];for(let c=0;null!==s&&c<s.length;c+=2){const u=s[c];a.push(u<0?null:pLe(n,r[u],s[c+1],o.metadata.read))}i.matches=a}return i.matches}function gF(t,n,o,e){const i=t.queries.getByIndex(o),r=i.matches;if(null!==r){const s=bZ(t,n,i,o);for(let a=0;a<r.length;a+=2){const c=r[a];if(c>0)e.push(s[a/2]);else{const u=r[a+1],h=n[-c];for(let b=Za;b<h.length;b++){const w=h[b];w[M1]===w[Ka]&&gF(w[Sn],w,u,e)}if(null!==h[Oy]){const b=h[Oy];for(let w=0;w<b.length;w++){const R=b[w];gF(R[Sn],R,u,e)}}}}}return e}function CZ(t,n,o){var e;const i=new EB(4==(4&o));return function dRe(t,n,o,e){const i=SK(n);i.push(o),t.firstCreatePass&&wK(t).push(e,i.length-1)}(t,n,i,i.destroy),(null!==(e=n[um])&&void 0!==e?e:n[um]=new hF).queries.push(new pF(i))-1}function wZ(t,n,o){null===t.queries&&(t.queries=new mF),t.queries.track(new fF(n,o))}function vF(t,n){return t.queries.getByIndex(n)}function TZ(t,n){const o=t[Sn],e=vF(o,n);return e.crossesNgTemplate?gF(o,t,n,[]):bZ(o,t,e,n)}function Ht(t){let n=function DZ(t){return Object.getPrototypeOf(t.prototype).constructor}(t.type),o=!0;const e=[t];for(;n;){let i;if(ah(t))i=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new vt(903,!1);i=n.\u0275dir}if(i){if(o){e.push(i);const s=t;s.inputs=QE(t.inputs),s.inputTransforms=QE(t.inputTransforms),s.declaredInputs=QE(t.declaredInputs),s.outputs=QE(t.outputs);const a=i.hostBindings;a&&ELe(t,a);const c=i.viewQuery,u=i.contentQueries;if(c&&MLe(t,c),u&&OLe(t,u),PLe(t,i),to(t.outputs,i.outputs),ah(i)&&i.data.animation){const h=t.data;h.animation=(h.animation||[]).concat(i.data.animation)}}const r=i.features;if(r)for(let s=0;s<r.length;s++){const a=r[s];a&&a.ngInherit&&a(t),a===Ht&&(o=!1)}}n=Object.getPrototypeOf(n)}!function ILe(t){let n=0,o=null;for(let e=t.length-1;e>=0;e--){const i=t[e];i.hostVars=n+=i.hostVars,i.hostAttrs=fp(i.hostAttrs,o=fp(o,i.hostAttrs))}}(e)}function PLe(t,n){for(const e in n.inputs){if(!n.inputs.hasOwnProperty(e)||t.inputs.hasOwnProperty(e))continue;const i=n.inputs[e];if(void 0!==i&&(t.inputs[e]=i,t.declaredInputs[e]=n.declaredInputs[e],null!==n.inputTransforms)){var o;const r=Array.isArray(i)?i[0]:i;if(!n.inputTransforms.hasOwnProperty(r))continue;null!==(o=t.inputTransforms)&&void 0!==o||(t.inputTransforms={}),t.inputTransforms[r]=n.inputTransforms[r]}}}function QE(t){return t===_n?{}:t===kn?[]:t}function MLe(t,n){const o=t.viewQuery;t.viewQuery=o?(e,i)=>{n(e,i),o(e,i)}:n}function OLe(t,n){const o=t.contentQueries;t.contentQueries=o?(e,i,r)=>{n(e,i,r),o(e,i,r)}:n}function ELe(t,n){const o=t.hostBindings;t.hostBindings=o?(e,i)=>{n(e,i),o(e,i)}:n}function UZ(t){const n=t.inputConfig,o={};for(const e in n)if(n.hasOwnProperty(e)){const i=n[e];Array.isArray(i)&&i[3]&&(o[e]=i[3])}t.inputTransforms=o}class Yv{}class GZ{}class CF extends Yv{constructor(n,o,e){super(),this._parent=o,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new uZ(this);const i=Gl(n);this._bootstrapComponents=Ed(i.bootstrap),this._r3Injector=v$(n,o,[{provide:Yv,useValue:this},{provide:nS,useValue:this.componentFactoryResolver},...e],di(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(o=>o()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class yF extends GZ{constructor(n){super(),this.moduleType=n}create(n){return new CF(this.moduleType,n,[])}}class VZ extends Yv{constructor(n){super(),this.componentFactoryResolver=new uZ(this),this.instance=null;const o=new Hy([...n.providers,{provide:Yv,useValue:this},{provide:nS,useValue:this.componentFactoryResolver}],n.parent||pE(),n.debugName,new Set(["environment"]));this.injector=o,n.runEnvironmentInitializers&&o.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function SF(t,n,o=null){return new VZ({providers:t,parent:n,debugName:o,runEnvironmentInitializers:!0}).injector}let Jv=(()=>{var t;class n{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Qn(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const e=this.taskId++;return this.pendingTasks.add(e),e}remove(e){this.pendingTasks.delete(e),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function vm(t,n,o){return t[n]=o}function hT(t,n){return t[n]}function Ya(t,n,o){return!Object.is(t[n],o)&&(t[n]=o,!0)}function Xv(t,n,o,e){const i=Ya(t,n,o);return Ya(t,n+1,e)||i}function JE(t,n,o,e,i){const r=Xv(t,n,o,e);return Ya(t,n+2,i)||r}function gp(t,n,o,e,i,r){const s=Xv(t,n,o,e);return Xv(t,n+2,i,r)||s}function U(t,n,o,e,i,r,s,a){const c=Nt(),u=Vo(),h=t+Ki,b=u.firstCreatePass?function FLe(t,n,o,e,i,r,s,a,c){const u=n.consts,h=Xy(n,t,4,s||null,pm(u,a));GN(n,o,h,pm(u,c)),mE(n,h);const b=h.tView=UN(2,h,e,i,r,n.directiveRegistry,n.pipeRegistry,null,n.schemas,u,null);return null!==n.queries&&(n.queries.template(n,h),b.queries=n.queries.embeddedTView(h)),h}(h,u,c,n,o,e,i,r,s):u.data[h];hm(b,!1);const w=zZ(u,c,b,t);HO()&&kE(u,c,w,b),Wl(w,c);const R=CK(w,c,w,b);return c[h]=R,NE(c,R),function gZ(t,n,o){return dF(t,n,o)}(R,b,c),GO(b)&&NN(u,c,b),null!=s&&FN(c,b,a),U}let zZ=function jZ(t,n,o,e){return Xg(!0),n[Hi].createComment("")};function Hn(t,n,o,e){const i=Nt();return Ya(i,ch(),n)&&(Vo(),_m(Hs(),i,t,n,o,e)),Hn}function dS(t,n,o,e){return Ya(t,ch(),o)?n+Zi(o)+e:no}function pS(t,n,o,e,i,r){const a=Xv(t,kf(),o,i);return Lf(2),a?n+Zi(o)+e+Zi(i)+r:no}function ox(t,n){return t<<17|n<<2}function l_(t){return t>>17&32767}function RF(t){return 2|t}function tb(t){return(131068&t)>>2}function kF(t,n){return-131069&t|n<<2}function LF(t){return 1|t}function CQ(t,n,o,e){const i=t[o+1],r=null===n;let s=e?l_(i):tb(i),a=!1;for(;0!==s&&(!1===a||r);){const u=t[s+1];S2e(t[s],n)&&(a=!0,t[s+1]=e?LF(u):RF(u)),s=e?l_(u):tb(u)}a&&(t[o+1]=e?RF(i):LF(i))}function S2e(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&ky(t,n)>=0}const kc={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function yQ(t){return t.substring(kc.key,kc.keyEnd)}function w2e(t){return t.substring(kc.value,kc.valueEnd)}function SQ(t,n){const o=kc.textEnd;return o===n?-1:(n=kc.keyEnd=function I2e(t,n,o){for(;n<o&&t.charCodeAt(n)>32;)n++;return n}(t,kc.key=n,o),bS(t,n,o))}function wQ(t,n){const o=kc.textEnd;let e=kc.key=bS(t,n,o);return o===e?-1:(e=kc.keyEnd=function M2e(t,n,o){let e;for(;n<o&&(45===(e=t.charCodeAt(n))||95===e||(-33&e)>=65&&(-33&e)<=90||e>=48&&e<=57);)n++;return n}(t,e,o),e=PQ(t,e,o),e=kc.value=bS(t,e,o),e=kc.valueEnd=function O2e(t,n,o){let e=-1,i=-1,r=-1,s=n,a=s;for(;s<o;){const c=t.charCodeAt(s++);if(59===c)return a;34===c||39===c?a=s=IQ(t,c,s,o):n===s-4&&85===r&&82===i&&76===e&&40===c?a=s=IQ(t,41,s,o):c>32&&(a=s),r=i,i=e,e=-33&c}return a}(t,e,o),PQ(t,e,o))}function TQ(t){kc.key=0,kc.keyEnd=0,kc.value=0,kc.valueEnd=0,kc.textEnd=t.length}function bS(t,n,o){for(;n<o&&t.charCodeAt(n)<=32;)n++;return n}function PQ(t,n,o,e){return(n=bS(t,n,o))<o&&n++,n}function IQ(t,n,o,e){let i=-1,r=o;for(;r<e;){const s=t.charCodeAt(r++);if(s==n&&92!==i)return r;i=92==s&&92===i?0:s}throw new Error}function l(t,n,o){const e=Nt();return Ya(e,ch(),n)&&Hu(Vo(),Hs(),e,t,n,e[Hi],o,!1),l}function DF(t,n,o,e,i){const s=i?"class":"style";HN(t,o,n.inputs[s],s,e)}function go(t,n,o){return uh(t,n,o,!1),go}function Uo(t,n){return uh(t,n,null,!0),Uo}function vp(t){dh(EQ,E2e,t,!1)}function E2e(t,n){for(let o=function P2e(t){return TQ(t),wQ(t,bS(t,0,kc.textEnd))}(n);o>=0;o=wQ(n,o))EQ(t,yQ(n),w2e(n))}function nb(t){dh(D2e,bm,t,!0)}function bm(t,n){for(let o=function T2e(t){return TQ(t),SQ(t,bS(t,0,kc.textEnd))}(n);o>=0;o=SQ(n,o))Pd(t,yQ(n),!0)}function uh(t,n,o,e){const i=Nt(),r=Vo(),s=Lf(2);r.firstUpdatePass&&OQ(r,t,s,e),n!==no&&Ya(i,s,n)&&xQ(r,r.data[ql()],i,i[Hi],t,i[s+1]=function N2e(t,n){return null==t||""===t||("string"==typeof n?t+=n:"object"==typeof t&&(t=di(Md(t)))),t}(n,o),e,s)}function dh(t,n,o,e){const i=Vo(),r=Lf(2);i.firstUpdatePass&&OQ(i,null,r,e);const s=Nt();if(o!==no&&Ya(s,r,o)){const a=i.data[ql()];if(RQ(a,e)&&!MQ(i,r)){let c=e?a.classesWithoutHost:a.stylesWithoutHost;null!==c&&(o=As(c,o||"")),DF(i,a,s,o,e)}else!function B2e(t,n,o,e,i,r,s,a){i===no&&(i=kn);let c=0,u=0,h=0<i.length?i[0]:null,b=0<r.length?r[0]:null;for(;null!==h||null!==b;){const w=c<i.length?i[c+1]:void 0,R=u<r.length?r[u+1]:void 0;let K,G=null;h===b?(c+=2,u+=2,w!==R&&(G=b,K=R)):null===b||null!==h&&h<b?(c+=2,G=h):(u+=2,G=b,K=R),null!==G&&xQ(t,n,o,e,G,K,s,a),h=c<i.length?i[c]:null,b=u<r.length?r[u]:null}}(i,a,s,s[Hi],s[r+1],s[r+1]=function L2e(t,n,o){if(null==o||""===o)return kn;const e=[],i=Md(o);if(Array.isArray(i))for(let r=0;r<i.length;r++)t(e,i[r],!0);else if("object"==typeof i)for(const r in i)i.hasOwnProperty(r)&&t(e,r,i[r]);else"string"==typeof i&&n(e,i);return e}(t,n,o),e,r)}}function MQ(t,n){return n>=t.expandoStartIndex}function OQ(t,n,o,e){const i=t.data;if(null===i[o+1]){const r=i[ql()],s=MQ(t,o);RQ(r,e)&&null===n&&!s&&(n=!1),n=function x2e(t,n,o,e){const i=function wB(t){const n=Ni.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let r=e?n.residualClasses:n.residualStyles;if(null===i)0===(e?n.classBindings:n.styleBindings)&&(o=_T(o=BF(null,t,n,o,e),n.attrs,e),r=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==i)if(o=BF(i,t,n,o,e),null===r){let c=function A2e(t,n,o){const e=o?n.classBindings:n.styleBindings;if(0!==tb(e))return t[l_(e)]}(t,n,e);void 0!==c&&Array.isArray(c)&&(c=BF(null,t,n,c[1],e),c=_T(c,n.attrs,e),function R2e(t,n,o,e){t[l_(o?n.classBindings:n.styleBindings)]=e}(t,n,e,c))}else r=function k2e(t,n,o){let e;const i=n.directiveEnd;for(let r=1+n.directiveStylingLast;r<i;r++)e=_T(e,t[r].hostAttrs,o);return _T(e,n.attrs,o)}(t,n,e)}return void 0!==r&&(e?n.residualClasses=r:n.residualStyles=r),o}(i,r,n,e),function C2e(t,n,o,e,i,r){let s=r?n.classBindings:n.styleBindings,a=l_(s),c=tb(s);t[e]=o;let h,u=!1;if(Array.isArray(o)?(h=o[1],(null===h||ky(o,h)>0)&&(u=!0)):h=o,i)if(0!==c){const w=l_(t[a+1]);t[e+1]=ox(w,a),0!==w&&(t[w+1]=kF(t[w+1],e)),t[a+1]=function v2e(t,n){return 131071&t|n<<17}(t[a+1],e)}else t[e+1]=ox(a,0),0!==a&&(t[a+1]=kF(t[a+1],e)),a=e;else t[e+1]=ox(c,0),0===a?a=e:t[c+1]=kF(t[c+1],e),c=e;u&&(t[e+1]=RF(t[e+1])),CQ(t,h,e,!0),CQ(t,h,e,!1),function y2e(t,n,o,e,i){const r=i?t.residualClasses:t.residualStyles;null!=r&&"string"==typeof n&&ky(r,n)>=0&&(o[e+1]=LF(o[e+1]))}(n,h,t,e,r),s=ox(a,c),r?n.classBindings=s:n.styleBindings=s}(i,r,n,o,s,e)}}function BF(t,n,o,e,i){let r=null;const s=o.directiveEnd;let a=o.directiveStylingLast;for(-1===a?a=o.directiveStart:a++;a<s&&(r=n[a],e=_T(e,r.hostAttrs,i),r!==t);)a++;return null!==t&&(o.directiveStylingLast=a),e}function _T(t,n,o){const e=o?1:2;let i=-1;if(null!==n)for(let r=0;r<n.length;r++){const s=n[r];"number"==typeof s?i=s:i===e&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),Pd(t,s,!!o||n[++r]))}return void 0===t?null:t}function EQ(t,n,o){Pd(t,n,Md(o))}function D2e(t,n,o){const e=String(n);""!==e&&!e.includes(" ")&&Pd(t,e,o)}function xQ(t,n,o,e,i,r,s,a){if(!(3&n.type))return;const c=t.data,u=c[a+1],h=function b2e(t){return 1==(1&t)}(u)?AQ(c,n,o,i,tb(u),s):void 0;rx(h)||(rx(r)||function _2e(t){return 2==(2&t)}(u)&&(r=AQ(c,null,o,i,a,s)),function iRe(t,n,o,e,i){if(n)i?t.addClass(o,e):t.removeClass(o,e);else{let r=-1===e.indexOf("-")?void 0:r_.DashCase;null==i?t.removeStyle(o,e,r):("string"==typeof i&&i.endsWith("!important")&&(i=i.slice(0,-10),r|=r_.Important),t.setStyle(o,e,i,r))}}(e,s,A1(ql(),o),i,r))}function AQ(t,n,o,e,i,r){const s=null===n;let a;for(;i>0;){const c=t[i],u=Array.isArray(c),h=u?c[1]:c,b=null===h;let w=o[i+1];w===no&&(w=b?kn:void 0);let R=b?OB(w,e):h===e?w:void 0;if(u&&!rx(R)&&(R=OB(c,e)),rx(R)&&(a=R,s))return a;const G=t[i+1];i=s?l_(G):tb(G)}if(null!==n){let c=r?n.residualClasses:n.residualStyles;null!=c&&(a=OB(c,e))}return a}function rx(t){return void 0!==t}function RQ(t,n){return 0!=(t.flags&(n?8:16))}function ni(t,n,o){dh(Pd,bm,dS(Nt(),t,n,o),!0)}function LQ(t,n,o,e,i,r,s){dh(Pd,bm,function hS(t,n,o,e,i,r,s,a){const u=JE(t,kf(),o,i,s);return Lf(3),u?n+Zi(o)+e+Zi(i)+r+Zi(s)+a:no}(Nt(),t,n,o,e,i,r,s),!0)}class q2e{destroy(n){}updateValue(n,o){}swap(n,o){const e=Math.min(n,o),i=Math.max(n,o),r=this.detach(i);if(i-e>1){const s=this.detach(e);this.attach(e,r),this.attach(i,s)}else this.attach(e,r)}move(n,o){this.attach(o,this.detach(n))}}function NF(t,n,o,e,i){return t===o&&Object.is(n,e)?1:Object.is(i(t,n),i(o,e))?-1:0}function FF(t,n,o,e){return!(void 0===n||!n.has(e)||(t.attach(o,n.get(e)),n.delete(e),0))}function DQ(t,n,o,e,i){if(FF(t,n,e,o(e,i)))t.updateValue(e,i);else{const r=t.create(e,i);t.attach(e,r)}}function BQ(t,n,o,e){const i=new Set;for(let r=n;r<=o;r++)i.add(e(r,t.at(r)));return i}class NQ{constructor(){this.kvMap=new Map,this._vMap=void 0}has(n){return this.kvMap.has(n)}delete(n){if(!this.has(n))return!1;const o=this.kvMap.get(n);return void 0!==this._vMap&&this._vMap.has(o)?(this.kvMap.set(n,this._vMap.get(o)),this._vMap.delete(o)):this.kvMap.delete(n),!0}get(n){return this.kvMap.get(n)}set(n,o){if(this.kvMap.has(n)){let e=this.kvMap.get(n);void 0===this._vMap&&(this._vMap=new Map);const i=this._vMap;for(;i.has(e);)e=i.get(e);i.set(e,o)}else this.kvMap.set(n,o)}forEach(n){for(let[o,e]of this.kvMap)if(n(e,o),void 0!==this._vMap){const i=this._vMap;for(;i.has(e);)e=i.get(e),n(e,o)}}}function Qo(t,n,o){Zv("NgControlFlow");const e=Nt(),i=ch(),r=UF(e,Ki+t);if(Ya(e,i,n)){const a=E(null);try{if(WN(r,0),-1!==n){const c=GF(e[Sn],Ki+n),u=tS(r,c.tView.ssrId);eT(r,X1(e,c,o,{dehydratedView:u}),0,eS(c,u))}}finally{E(a)}}else{const a=PK(r,0);void 0!==a&&(a[js]=o)}}class $2e{constructor(n,o,e){this.lContainer=n,this.$implicit=o,this.$index=e}get $count(){return this.lContainer.length-Za}}class Q2e{constructor(n,o,e){this.hasEmptyBlock=n,this.trackByFn=o,this.liveCollection=e}}function vT(t,n,o,e,i,r,s,a,c,u,h,b,w){Zv("NgControlFlow");const R=void 0!==c,G=Nt(),K=a?s.bind(G[ga][js]):s,te=new Q2e(R,K);G[Ki+t]=te,U(t+1,n,o,e,i,r),R&&U(t+2,c,u,h,b,w)}class Y2e extends q2e{constructor(n,o,e){super(),this.lContainer=n,this.hostLView=o,this.templateTNode=e,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-Za}at(n){return this.getLView(n)[js].$implicit}attach(n,o){const e=o[sh];this.needsIndexUpdate||(this.needsIndexUpdate=n!==this.length),eT(this.lContainer,o,n,eS(this.templateTNode,e))}detach(n){return this.needsIndexUpdate||(this.needsIndexUpdate=n!==this.length-1),function J2e(t,n){return Q1(t,n)}(this.lContainer,n)}create(n,o){const e=tS(this.lContainer,this.templateTNode.tView.ssrId);return X1(this.hostLView,this.templateTNode,new $2e(this.lContainer,o,n),{dehydratedView:e})}destroy(n){AE(n[Sn],n)}updateValue(n,o){this.getLView(n)[js].$implicit=o}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let n=0;n<this.length;n++)this.getLView(n)[js].$index=n}getLView(n){return function X2e(t,n){return PK(t,n)}(this.lContainer,n)}}function bT(t){const n=E(null),o=ql();try{const e=Nt(),i=e[Sn],r=e[o];if(void 0===r.liveCollection){const a=o+1,c=UF(e,a),u=GF(i,a);r.liveCollection=new Y2e(c,e,u)}else r.liveCollection.reset();const s=r.liveCollection;if(function W2e(t,n,o){var e;let i,r,s=0,a=t.length-1;if(Array.isArray(n)){let w=n.length-1;for(;s<=a&&s<=w;){var c,u;const R=t.at(s),G=n[s],K=NF(s,R,s,G,o);if(0!==K){K<0&&t.updateValue(s,G),s++;continue}const te=t.at(a),ee=n[w],le=NF(a,te,w,ee,o);if(0!==le){le<0&&t.updateValue(a,ee),a--,w--;continue}const me=o(s,R),ge=o(a,te),Me=o(s,G);if(Object.is(Me,ge)){const Ke=o(w,ee);Object.is(Ke,me)?(t.swap(s,a),t.updateValue(a,ee),w--,a--):t.move(a,s),t.updateValue(s,G),s++}else if(null!==(c=i)&&void 0!==c||(i=new NQ),null!==(u=r)&&void 0!==u||(r=BQ(t,s,a,o)),FF(t,i,s,Me))t.updateValue(s,G),s++,a++;else if(r.has(Me))i.set(me,t.detach(s)),a--;else{const Ke=t.create(s,n[s]);t.attach(s,Ke),s++,a++}}for(;s<=w;)DQ(t,i,o,s,n[s]),s++}else if(null!=n){const w=n[Symbol.iterator]();let R=w.next();for(;!R.done&&s<=a;){const G=t.at(s),K=R.value,te=NF(s,G,s,K,o);if(0!==te)te<0&&t.updateValue(s,K),s++,R=w.next();else{var h,b;null!==(h=i)&&void 0!==h||(i=new NQ),null!==(b=r)&&void 0!==b||(r=BQ(t,s,a,o));const ee=o(s,K);if(FF(t,i,s,ee))t.updateValue(s,K),s++,a++,R=w.next();else if(r.has(ee)){const le=o(s,G);i.set(le,t.detach(s)),a--}else t.attach(s,t.create(s,K)),s++,a++,R=w.next()}}for(;!R.done;)DQ(t,i,o,t.length,R.value),R=w.next()}for(;s<=a;)t.destroy(t.detach(a--));null===(e=i)||void 0===e||e.forEach(w=>{t.destroy(w)})}(s,t,r.trackByFn),s.updateIndexes(),r.hasEmptyBlock){const a=ch(),c=0===s.length;if(Ya(e,a,c)){const u=o+2,h=UF(e,u);if(c){const b=GF(i,u),w=tS(h,b.tView.ssrId);eT(h,X1(e,b,void 0,{dehydratedView:w}),0,eS(b,w))}else WN(h,0)}}}finally{E(n)}}function UF(t,n){return t[n]}function GF(t,n){return R1(t,n)}function p(t,n,o,e){const i=Nt(),r=Vo(),s=Ki+t,a=i[Hi],c=r.firstCreatePass?function eDe(t,n,o,e,i,r){const s=n.consts,c=Xy(n,t,2,e,pm(s,i));return GN(n,o,c,pm(s,r)),null!==c.attrs&&KE(c,c.attrs,!1),null!==c.mergedAttrs&&KE(c,c.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,c),c}(s,r,i,n,o,e):r.data[s],u=FQ(r,i,c,a,n,t);i[s]=u;const h=GO(c);return hm(c,!0),lK(a,u,c),32!=(32&c.flags)&&HO()&&kE(r,i,u,c),0===function uEe(){return Ni.lFrame.elementDepthCount}()&&Wl(u,i),function dEe(){Ni.lFrame.elementDepthCount++}(),h&&(NN(r,i,c),BN(r,c,i)),null!==e&&FN(i,c),p}function m(){let t=ss();CB()?yB():(t=t.parent,hm(t,!1));const n=t;(function hEe(t){return Ni.skipHydrationRootTNode===t})(n)&&function _Ee(){Ni.skipHydrationRootTNode=null}(),function pEe(){Ni.lFrame.elementDepthCount--}();const o=Vo();return o.firstCreatePass&&(mE(o,t),dB(t)&&o.queries.elementEnd(t)),null!=n.classesWithoutHost&&function kxe(t){return 0!=(8&t.flags)}(n)&&DF(o,n,Nt(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function Lxe(t){return 0!=(16&t.flags)}(n)&&DF(o,n,Nt(),n.stylesWithoutHost,!1),m}function B(t,n,o,e){return p(t,n,o,e),m(),B}let FQ=(t,n,o,e,i,r)=>(Xg(!0),xE(e,i,function C9(){return Ni.lFrame.currentNamespace}()));function Tn(t,n,o){const e=Nt(),i=Vo(),r=t+Ki,s=i.firstCreatePass?function iDe(t,n,o,e,i){const r=n.consts,s=pm(r,e),a=Xy(n,t,8,"ng-container",s);return null!==s&&KE(a,s,!0),GN(n,o,a,pm(r,i)),null!==n.queries&&n.queries.elementStart(n,a),a}(r,i,e,n,o):i.data[r];hm(s,!0);const a=UQ(i,e,s,t);return e[r]=a,HO()&&kE(i,e,a,s),Wl(a,e),GO(s)&&(NN(i,e,s),BN(i,s,e)),null!=o&&FN(e,s),Tn}function Pn(){let t=ss();const n=Vo();return CB()?yB():(t=t.parent,hm(t,!1)),n.firstCreatePass&&(mE(n,t),dB(t)&&n.queries.elementEnd(t)),Pn}function Un(t,n,o){return Tn(t,n,o),Pn(),Un}let UQ=(t,n,o,e)=>(Xg(!0),EN(n[Hi],""));function Ce(){return Nt()}function VF(t,n,o){const e=Nt();return Ya(e,ch(),n)&&Hu(Vo(),Hs(),e,t,n,e[Hi],o,!0),VF}const ib=void 0;var aDe=["en",[["a","p"],["AM","PM"],ib],[["AM","PM"],ib,ib],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ib,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ib,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ib,"{1} 'at' {0}",ib],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function sDe(t){const o=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return 1===o&&0===e?1:5}];let CS={};function hu(t){const n=function cDe(t){return t.toLowerCase().replace(/_/g,"-")}(t);let o=zQ(n);if(o)return o;const e=n.split("-")[0];if(o=zQ(e),o)return o;if("en"===e)return aDe;throw new vt(701,!1)}function zQ(t){return t in CS||(CS[t]=Ye.ng&&Ye.ng.common&&Ye.ng.common.locales&&Ye.ng.common.locales[t]),CS[t]}var qs=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(qs||{});const yS="en-US";let jQ=yS;function Y(t,n,o,e){const i=Nt(),r=Vo(),s=ss();return HF(r,i,i[Hi],s,t,n,e),Y}function HF(t,n,o,e,i,r,s){const a=GO(e),u=t.firstCreatePass&&wK(t),h=n[js],b=SK(n);let w=!0;if(3&e.type||s){const K=du(e,n),te=s?s(K):K,ee=b.length,le=s?ge=>s(gs(ge[e.index])):e.index;let me=null;if(!s&&a&&(me=function nBe(t,n,o,e){const i=t.cleanup;if(null!=i)for(let r=0;r<i.length-1;r+=2){const s=i[r];if(s===o&&i[r+1]===e){const a=n[Py],c=i[r+2];return a.length>c?a[c]:null}"string"==typeof s&&(r+=2)}return null}(t,n,i,e.index)),null!==me)(me.__ngLastListenerFn__||me).__ngNextListenerFn__=r,me.__ngLastListenerFn__=r,w=!1;else{r=gY(e,n,h,r,!1);const ge=o.listen(te,i,r);b.push(r,ge),u&&u.push(i,le,ee,ee+1)}}else r=gY(e,n,h,r,!1);const R=e.outputs;let G;if(w&&null!==R&&(G=R[i])){const K=G.length;if(K)for(let te=0;te<K;te+=2){const Me=n[G[te]][G[te+1]].subscribe(r),Ke=b.length;b.push(r,Me),u&&u.push(i,e.index,Ke,"function"==typeof Me?Ke+1:-(Ke+1))}}}function fY(t,n,o,e){try{return mm(6,n,o),!1!==o(e)}catch(i){return FE(t,i),!1}finally{mm(7,n,o)}}function gY(t,n,o,e,i){return function r(s){if(s===Function)return e;nT(t.componentOffset>-1?Td(t.index,n):n);let c=fY(n,o,e,s),u=r.__ngNextListenerFn__;for(;u;)c=fY(n,o,u,s)&&c,u=u.__ngNextListenerFn__;return i&&!1===c&&s.preventDefault(),c}}function _(t=1){return function wEe(t){return(Ni.lFrame.contextLView=function c9(t,n){for(;t>0;)n=n[Iy],t--;return n}(t,Ni.lFrame.contextLView))[js]}(t)}function iBe(t,n){let o=null;const e=function qOe(t){const n=t.attrs;if(null!=n){const o=n.indexOf(5);if(!(1&o))return n[o+1]}return null}(t);for(let i=0;i<n.length;i++){const r=n[i];if("*"!==r){if(null===e?NO(t,r,!0):KOe(e,r))return i}else o=i}return o}function Co(t){const n=Nt()[ga][Vl];if(!n.projection){const e=n.projection=function WO(t,n){const o=[];for(let e=0;e<t;e++)o.push(n);return o}(t?t.length:1,null),i=e.slice();let r=n.child;for(;null!==r;){const s=t?iBe(r,t):0;null!==s&&(i[s]?i[s].projectionNext=r:e[s]=r,i[s]=r),r=r.next}}}function yo(t,n=0,o){const e=Nt(),i=Vo(),r=Xy(i,Ki+t,16,null,o||null);null===r.projection&&(r.projection=n),yB(),(!e[sh]||xy())&&32!=(32&r.flags)&&function tRe(t,n,o){aK(n[Hi],0,n,o,AN(t,o,n),tK(o.parent||n[Vl],o,n))}(i,e,r)}function Uf(t,n,o){return SS(t,"",n,"",o),Uf}function SS(t,n,o,e,i){const r=Nt(),s=dS(r,n,o,e);return s!==no&&Hu(Vo(),Hs(),r,t,s,r[Hi],i,!1),SS}function Ho(t,n,o,e){!function SZ(t,n,o,e){const i=Vo();if(i.firstCreatePass){const r=ss();wZ(i,new vZ(n,o,e),r.index),function fLe(t,n){const o=t.contentQueries||(t.contentQueries=[]);n!==(o.length?o[o.length-1]:-1)&&o.push(t.queries.length-1,n)}(i,t),2==(2&o)&&(i.staticContentQueries=!0)}return CZ(i,Nt(),o)}(t,n,o,e)}function $e(t,n,o){!function yZ(t,n,o){const e=Vo();return e.firstCreatePass&&(wZ(e,new vZ(t,n,o),-1),2==(2&n)&&(e.staticViewQueries=!0)),CZ(e,Nt(),n)}(t,n,o)}function je(t){const n=Nt(),o=Vo(),e=TB();zO(e+1);const i=vF(o,e);if(t.dirty&&function aEe(t){return 4==(4&t[hi])}(n)===(2==(2&i.metadata.flags))){if(null===i.matches)t.reset([]);else{const r=TZ(n,e);t.reset(r,S9),t.notifyOnChanges()}return!0}return!1}function He(){return function _F(t,n){return t[um].queries[n].queryList}(Nt(),TB())}function Kt(t){return Ey(function vEe(){return Ni.lFrame.contextLView}(),Ki+t)}function H(t,n=""){const o=Nt(),e=Vo(),i=t+Ki,r=e.firstCreatePass?Xy(e,i,1,n,null):e.data[i],s=LY(e,o,r,n,t);o[i]=s,HO()&&kE(e,o,s,r),hm(r,!1)}let LY=(t,n,o,e,i)=>(Xg(!0),function EE(t,n){return t.createText(n)}(n[Hi],e));function se(t){return ze("",t,""),se}function ze(t,n,o){const e=Nt(),i=dS(e,t,n,o);return i!==no&&Ff(e,ql(),i),ze}function mu(t,n,o,e,i){const r=Nt(),s=pS(r,t,n,o,e,i);return s!==no&&Ff(r,ql(),s),mu}
/*!
     * @license
     * Copyright Google LLC All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
function qF(t,n,o){HK(n)&&(n=n());const e=Nt();return Ya(e,ch(),n)&&Hu(Vo(),Hs(),e,t,n,e[Hi],o,!1),qF}function WF(t,n){const o=Nt(),e=Vo(),i=ss();return HF(e,o,o[Hi],i,t,n),WF}function $F(t,n,o,e,i){if(t=Li(t),Array.isArray(t))for(let r=0;r<t.length;r++)$F(t[r],n,o,e,i);else{const r=Vo(),s=Nt(),a=ss();let c=Hv(t)?t:Li(t.provide);const u=Z9(t),h=1048575&a.providerIndexes,b=a.directiveStart,w=a.providerIndexes>>20;if(Hv(t)||!t.multi){const R=new H1(u,i,g),G=ZF(c,n,i?h:h+w,b);-1===G?(dN(vE(a,s),r,c),KF(r,t,n.length),n.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),o.push(R),s.push(R)):(o[G]=R,s[G]=R)}else{const R=ZF(c,n,h+w,b),G=ZF(c,n,h,h+w),te=G>=0&&o[G];if(i&&!te||!i&&!(R>=0&&o[R])){dN(vE(a,s),r,c);const ee=function SBe(t,n,o,e,i){const r=new H1(t,o,g);return r.multi=[],r.index=n,r.componentProviders=0,jY(r,i,e&&!o),r}(i?yBe:CBe,o.length,i,e,u);!i&&te&&(o[G].providerFactory=ee),KF(r,t,n.length,0),n.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),o.push(ee),s.push(ee)}else KF(r,t,R>-1?R:G,jY(o[i?G:R],u,!i&&e));!i&&e&&te&&o[G].componentProviders++}}}function KF(t,n,o,e){const i=Hv(n),r=function cxe(t){return!!t.useClass}(n);if(i||r){const c=(r?Li(n.useClass):n).prototype.ngOnDestroy;if(c){const u=t.destroyHooks||(t.destroyHooks=[]);if(!i&&n.multi){const h=u.indexOf(o);-1===h?u.push(o,[e,c]):u[h+1].push(e,c)}else u.push(o,c)}}}function jY(t,n,o){return o&&t.componentProviders++,t.multi.push(n)-1}function ZF(t,n,o,e){for(let i=o;i<e;i++)if(n[i]===t)return i;return-1}function CBe(t,n,o,e){return QF(this.multi,[])}function yBe(t,n,o,e){const i=this.multi;let r;if(this.providerFactory){const s=this.providerFactory.componentProviders,a=qv(o,o[Sn],this.providerFactory.index,e);r=a.slice(0,s),QF(i,r);for(let c=s;c<a.length;c++)r.push(a[c])}else r=[],QF(i,r);return r}function QF(t,n){for(let o=0;o<t.length;o++)n.push((0,t[o])());return n}function mn(t,n=[]){return o=>{o.providersResolver=(e,i)=>function bBe(t,n,o){const e=Vo();if(e.firstCreatePass){const i=ah(t);$F(o,e.data,e.blueprint,i,!0),$F(n,e.data,e.blueprint,i,!1)}}(e,i?i(t):t,n)}}let wBe=(()=>{var t;class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){const i=q9(0,e.type),r=i.length>0?SF([i],this._injector,"Standalone[".concat(e.type.name,"]")):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return(t=n).\u0275prov=be({token:t,providedIn:"environment",factory:()=>new t(T(Id))}),n})();function HY(t){Zv("NgStandalone"),t.getStandaloneInjector=n=>n.get(wBe).getOrCreateStandaloneInjector(t)}function Wu(t,n,o){const e=t.\u0275cmp;e.directiveDefs=FO(n,!1),e.pipeDefs=FO(o,!0)}function pt(t,n,o){const e=pu()+t,i=Nt();return i[e]===no?vm(i,e,o?n.call(o):n()):hT(i,e)}function ne(t,n,o,e){return eJ(Nt(),pu(),t,n,o,e)}function cn(t,n,o,e,i){return tJ(Nt(),pu(),t,n,o,e,i)}function _a(t,n,o,e,i,r){return nJ(Nt(),pu(),t,n,o,e,i,r)}function xd(t,n,o,e,i,r,s){return function iJ(t,n,o,e,i,r,s,a,c){const u=n+o;return gp(t,u,i,r,s,a)?vm(t,u+4,c?e.call(c,i,r,s,a):e(i,r,s,a)):PT(t,u+4)}(Nt(),pu(),t,n,o,e,i,r,s)}function PT(t,n){const o=t[n];return o===no?void 0:o}function eJ(t,n,o,e,i,r){const s=n+o;return Ya(t,s,i)?vm(t,s+1,r?e.call(r,i):e(i)):PT(t,s+1)}function tJ(t,n,o,e,i,r,s){const a=n+o;return Xv(t,a,i,r)?vm(t,a+2,s?e.call(s,i,r):e(i,r)):PT(t,a+2)}function nJ(t,n,o,e,i,r,s,a){const c=n+o;return JE(t,c,i,r,s)?vm(t,c+3,a?e.call(a,i,r,s):e(i,r,s)):PT(t,c+3)}function V(t,n){const o=Vo();let e;const i=t+Ki;var r;o.firstCreatePass?(e=function BBe(t,n){if(n)for(let o=n.length-1;o>=0;o--){const e=n[o];if(t===e.name)return e}}(n,o.pipeRegistry),o.data[i]=e,e.onDestroy&&(null!==(r=o.destroyHooks)&&void 0!==r?r:o.destroyHooks=[]).push(i,e.onDestroy)):e=o.data[i];const s=e.factory||(e.factory=jv(e.type)),c=zu(g);try{const u=_E(!1),h=s();return _E(u),function aBe(t,n,o,e){o>=t.data.length&&(t.data[o]=null,t.blueprint[o]=null),n[o]=e}(o,Nt(),i,h),h}finally{zu(c)}}function $(t,n,o){const e=t+Ki,i=Nt(),r=Ey(i,e);return IT(i,e)?eJ(i,pu(),n,r.transform,o,r):r.transform(o)}function yt(t,n,o,e){const i=t+Ki,r=Nt(),s=Ey(r,i);return IT(r,i)?tJ(r,pu(),n,s.transform,o,e,s):s.transform(o,e)}function u_(t,n,o,e,i){const r=t+Ki,s=Nt(),a=Ey(s,r);return IT(s,r)?nJ(s,pu(),n,a.transform,o,e,i,a):a.transform(o,e,i)}function IT(t,n){return t[Sn].data[n].pure}function ft(t,n){return GE(t,n)}class OT{constructor(n){this.full=n;const o=n.split(".");this.major=o[0],this.minor=o[1],this.patch=o.slice(2).join(".")}}const sNe=new OT("17.2.1");let CJ=(()=>{var t;class n{log(e){console.log(e)}warn(e){console.warn(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"platform"}),n})();const TJ=new Ot(""),hx=new Ot("");let s3,o3=(()=>{var t;class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,s3||(function RNe(t){s3=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{an.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==s),e()},i)),this._callbacks.push({doneCb:e,timeoutId:s,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return(t=n).\u0275fac=function(e){return new(e||t)(T(an),T(r3),T(hx))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),r3=(()=>{var t;class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){var r,s;return null!==(r=null===(s=s3)||void 0===s?void 0:s.findTestabilityInTree(this,e,i))&&void 0!==r?r:null}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"platform"}),n})();function xT(t){return!!t&&"function"==typeof t.then}function PJ(t){return!!t&&"function"==typeof t.subscribe}const mx=new Ot("");let a3=(()=>{var t;class n{constructor(){var e;this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r}),this.appInits=null!==(e=mt(mx,{optional:!0}))&&void 0!==e?e:[]}runInitializers(){if(this.initialized)return;const e=[];for(const r of this.appInits){const s=r();if(xT(s))e.push(s);else if(PJ(s)){const a=new Promise((c,u)=>{s.subscribe({complete:c,error:u})});e.push(a)}}const i=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const c3=new Ot("");function OJ(t,n){return Array.isArray(n)?n.reduce(OJ,t):{...t,...n}}let bp=(()=>{var t;class n{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=mt(C$),this.afterRenderEffectManager=mt(cT),this.componentTypes=[],this.components=[],this.isStable=mt(Jv).hasPendingTasks.pipe(jn(e=>!e)),this._injector=mt(Id)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(e,i){const r=e instanceof VK;if(!this._injector.get(a3).done)throw!r&&function Yg(t){const n=xo(t)||xc(t)||vl(t);return null!==n&&n.standalone}(e),new vt(405,!1);let a;a=r?e:this._injector.get(nS).resolveComponentFactory(e),this.componentTypes.push(a.componentType);const c=function kNe(t){return t.isBoundToModule}(a)?void 0:this._injector.get(Yv),h=a.create(vs.NULL,[],i||a.selector,c),b=h.location.nativeElement,w=h.injector.get(TJ,null);return null==w||w.registerApplication(b),h.onDestroy(()=>{this.detachView(h.hostView),fx(this.components,h),null==w||w.unregisterApplication(b)}),this._loadComponent(h),h}tick(){if(this._runningTick)throw new vt(101,!1);try{this._runningTick=!0,this.detectChangesInAttachedViews()}catch(e){this.internalErrorHandler(e)}finally{this._runningTick=!1}}detectChangesInAttachedViews(){let e=0;do{if(100===e)throw new vt(103,!1);const i=0===e;for(let{_lView:r,notifyErrorHandler:s}of this._views)!i&&!EJ(r)||this.detectChangesInView(r,s,i);this.afterRenderEffectManager.execute(),e++}while(this._views.some(({_lView:i})=>EJ(i)))}detectChangesInView(e,i,r){let s;r?(s=0,e[hi]|=1024):s=64&e[hi]?0:1,UE(e,i,s)}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;fx(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(c3,[]);[...this._bootstrapListeners,...i].forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>fx(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new vt(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function fx(t,n){const o=t.indexOf(n);o>-1&&t.splice(o,1)}function EJ(t){return _B(t)}class DNe{constructor(n,o){this.ngModuleFactory=n,this.componentFactories=o}}let xJ=(()=>{var t;class n{compileModuleSync(e){return new yF(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),s=Ed(Gl(e).declarations).reduce((a,c)=>{const u=xo(c);return u&&a.push(new dT(u)),a},[]);return new DNe(i,s)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),FNe=(()=>{var t;class n{constructor(){this.zone=mt(an),this.applicationRef=mt(bp)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){var e;null===(e=this._onMicrotaskEmptySubscription)||void 0===e||e.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function UNe(){const t=mt(an),n=mt(lh);return o=>t.runOutsideAngular(()=>n.handleError(o))}let VNe=(()=>{var t;class n{constructor(){this.subscription=new zt,this.initialized=!1,this.zone=mt(an),this.pendingTasks=mt(Jv)}initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{an.assertNotInAngularZone(),queueMicrotask(()=>{null!==e&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{var i;an.assertInAngularZone(),null!==(i=e)&&void 0!==i||(e=this.pendingTasks.add())}))}ngOnDestroy(){this.subscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Gf=new Ot("",{providedIn:"root",factory:()=>mt(Gf,hn.Optional|hn.SkipSelf)||function zNe(){return typeof $localize<"u"&&$localize.locale||yS}()}),l3=new Ot("");let LJ=(()=>{var t;class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function Hke(t="zone.js",n){return"noop"===t?new nZ:"zone.js"===t?new an(n):t}(null==i?void 0:i.ngZone,function kJ(t){var n,o;return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:null!==(n=null==t?void 0:t.eventCoalescing)&&void 0!==n&&n,shouldCoalesceRunChangeDetection:null!==(o=null==t?void 0:t.runCoalescing)&&void 0!==o&&o}}({eventCoalescing:null==i?void 0:i.ngZoneEventCoalescing,runCoalescing:null==i?void 0:i.ngZoneRunCoalescing}));return r.run(()=>{const s=function NLe(t,n,o){return new CF(t,n,o)}(e.moduleType,this.injector,function RJ(t){return[{provide:an,useFactory:t},{provide:Bf,multi:!0,useFactory:()=>{const n=mt(FNe,{optional:!0});return()=>n.initialize()}},{provide:Bf,multi:!0,useFactory:()=>{const n=mt(VNe);return()=>{n.initialize()}}},{provide:C$,useFactory:UNe}]}(()=>r)),a=s.injector.get(lh,null);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{a.handleError(u)}});s.onDestroy(()=>{fx(this._modules,s),c.unsubscribe()})}),function MJ(t,n,o){try{const e=o();return xT(e)?e.catch(i=>{throw n.runOutsideAngular(()=>t.handleError(i)),i}):e}catch(e){throw n.runOutsideAngular(()=>t.handleError(e)),e}}(a,r,()=>{const c=s.injector.get(a3);return c.runInitializers(),c.donePromise.then(()=>(function HQ(t){"string"==typeof t&&(jQ=t.toLowerCase().replace(/_/g,"-"))}(s.injector.get(Gf,yS)||yS),this._moduleDoBootstrap(s),s))})})}bootstrapModule(e,i=[]){const r=OJ({},i);return function NNe(t,n,o){const e=new yF(o);return Promise.resolve(e)}(0,0,e).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(e){const i=e.injector.get(bp);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new vt(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new vt(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(l3,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"platform"}),n})(),d_=null;const DJ=new Ot("");function BJ(t,n,o=[]){const e="Platform: ".concat(n),i=new Ot(e);return(r=[])=>{let s=u3();if(!s||s.injector.get(DJ,!1)){const a=[...o,...r,{provide:i,useValue:!0}];t?t(a):function qNe(t){if(d_&&!d_.get(DJ,!1))throw new vt(400,!1);(function IJ(){!function ht(t){gt=t}(()=>{throw new vt(600,!1)})})(),d_=t;const n=t.get(LJ);(function FJ(t){const n=t.get(x9,null);null==n||n.forEach(o=>o())})(t)}(function NJ(t=[],n){return vs.create({name:n,providers:[{provide:eN,useValue:"platform"},{provide:l3,useValue:new Set([()=>d_=null])},...t]})}(a,e))}return function WNe(t){const n=u3();if(!n)throw new vt(401,!1);return n}()}}function u3(){var t,n;return null!==(t=null===(n=d_)||void 0===n?void 0:n.get(LJ))&&void 0!==t?t:null}const JNe=BJ(null,"core",[]);let XNe=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(bp))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();function IS(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */
let _3=null;function p_(){return _3}class EFe{}const La=new Ot("");let v3=(()=>{var t;class n{historyGo(e){throw new Error("")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>mt(AFe),providedIn:"platform"}),n})();const xFe=new Ot("");let AFe=(()=>{var t;class n extends v3{constructor(){super(),this._doc=mt(La),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return p_().getBaseHref(this._doc)}onPopState(e){const i=p_().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=p_().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){this._history.pushState(e,i,r)}replaceState(e,i,r){this._history.replaceState(e,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>new t,providedIn:"platform"}),n})();function b3(t,n){if(0==t.length)return n;if(0==n.length)return t;let o=0;return t.endsWith("/")&&o++,n.startsWith("/")&&o++,2==o?t+n.substring(1):1==o?t+n:t+"/"+n}function cX(t){const n=t.match(/#|\?|$/),o=n&&n.index||t.length;return t.slice(0,o-("/"===t[o-1]?1:0))+t.slice(o)}function Vf(t){return t&&"?"!==t[0]?"?"+t:t}let rb=(()=>{var t;class n{historyGo(e){throw new Error("")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>mt(uX),providedIn:"root"}),n})();const lX=new Ot("");let uX=(()=>{var t;class n extends rb{constructor(e,i){var r,s,a;super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=null!==(r=null!==(s=null!=i?i:this._platformLocation.getBaseHrefFromDOM())&&void 0!==s?s:null===(a=mt(La).location)||void 0===a?void 0:a.origin)&&void 0!==r?r:""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return b3(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Vf(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?"".concat(i).concat(r):i}pushState(e,i,r,s){const a=this.prepareExternalUrl(r+Vf(s));this._platformLocation.pushState(e,i,a)}replaceState(e,i,r,s){const a=this.prepareExternalUrl(r+Vf(s));this._platformLocation.replaceState(e,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){var i,r;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(v3),T(lX,8))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),RFe=(()=>{var t;class n extends rb{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){var i;const r=null!==(i=this._platformLocation.hash)&&void 0!==i?i:"#";return r.length>0?r.substring(1):r}prepareExternalUrl(e){const i=b3(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,s){let a=this.prepareExternalUrl(r+Vf(s));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.pushState(e,i,a)}replaceState(e,i,r,s){let a=this.prepareExternalUrl(r+Vf(s));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){var i,r;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(v3),T(lX,8))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Rs=(()=>{var t;class n{constructor(e){this._subject=new ke,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function DFe(t){if(new RegExp("^(https?:)?//").test(t)){const[,o]=t.split(/\/\/[^\/]+/);return o}return t}(cX(dX(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){var e;null===(e=this._urlChangeSubscription)||void 0===e||e.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Vf(i))}normalize(e){return n.stripTrailingSlash(function LFe(t,n){if(!t||!n.startsWith(t))return n;const o=n.substring(t.length);return""===o||["/",";","?","#"].includes(o[0])?o:n}(this._basePath,dX(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Vf(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Vf(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){var i,r;null===(i=(r=this._locationStrategy).historyGo)||void 0===i||i.call(r,e)}onUrlChange(e){var i;return this._urlChangeListeners.push(e),null!==(i=this._urlChangeSubscription)&&void 0!==i||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)})),()=>{const r=this._urlChangeListeners.indexOf(e);var s;this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(null===(s=this._urlChangeSubscription)||void 0===s||s.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return(t=n).normalizeQueryParams=Vf,t.joinWithSlash=b3,t.stripTrailingSlash=cX,t.\u0275fac=function(e){return new(e||t)(T(rb))},t.\u0275prov=be({token:t,factory:()=>function kFe(){return new Rs(T(rb))}(),providedIn:"root"}),n})();function dX(t){return t.replace(/\/index.html$/,"")}var Tx=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}(Tx||{}),gu=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(gu||{}),ks=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(ks||{}),Ad=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(Ad||{}),Xa=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}(Xa||{});function Px(t,n){return yp(hu(t)[qs.DateFormat],n)}function Ix(t,n){return yp(hu(t)[qs.TimeFormat],n)}function Mx(t,n){return yp(hu(t)[qs.DateTimeFormat],n)}function Cp(t,n){const o=hu(t),e=o[qs.NumberSymbols][n];if(typeof e>"u"){if(n===Xa.CurrencyDecimal)return o[qs.NumberSymbols][Xa.Decimal];if(n===Xa.CurrencyGroup)return o[qs.NumberSymbols][Xa.Group]}return e}function hX(t){if(!t[qs.ExtraData])throw new Error('Missing extra locale data for the locale "'.concat(t[qs.LocaleId],'". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.'))}function yp(t,n){for(let o=n;o>-1;o--)if(typeof t[o]<"u")return t[o];throw new Error("Locale data API: locale data undefined")}function y3(t){const[n,o]=t.split(":");return{hours:+n,minutes:+o}}const ZFe=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,LT={},QFe=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var zf=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}(zf||{}),jr=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}(jr||{}),Hr=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}(Hr||{});function YFe(t,n,o,e){let i=function s3e(t){if(gX(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[i,r=1,s=1]=t.split("-").map(a=>+a);return Ox(i,r-1,s)}const o=parseFloat(t);if(!isNaN(t-o))return new Date(o);let e;if(e=t.match(ZFe))return function a3e(t){const n=new Date(0);let o=0,e=0;const i=t[8]?n.setUTCFullYear:n.setFullYear,r=t[8]?n.setUTCHours:n.setHours;t[9]&&(o=Number(t[9]+t[10]),e=Number(t[9]+t[11])),i.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));const s=Number(t[4]||0)-o,a=Number(t[5]||0)-e,c=Number(t[6]||0),u=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return r.call(n,s,a,c,u),n}(e)}const n=new Date(t);if(!gX(n))throw new Error('Unable to convert "'.concat(t,'" into a date'));return n}(t);n=jf(o,n)||n;let a,s=[];for(;n;){if(a=QFe.exec(n),!a){s.push(n);break}{s=s.concat(a.slice(1));const h=s.pop();if(!h)break;n=h}}let c=i.getTimezoneOffset();e&&(c=fX(e,c),i=function r3e(t,n,o){const e=o?-1:1,i=t.getTimezoneOffset();return function o3e(t,n){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+n),t}(t,e*(fX(n,i)-i))}(i,e,!0));let u="";return s.forEach(h=>{const b=function i3e(t){if(w3[t])return w3[t];let n;switch(t){case"G":case"GG":case"GGG":n=Ws(Hr.Eras,ks.Abbreviated);break;case"GGGG":n=Ws(Hr.Eras,ks.Wide);break;case"GGGGG":n=Ws(Hr.Eras,ks.Narrow);break;case"y":n=mc(jr.FullYear,1,0,!1,!0);break;case"yy":n=mc(jr.FullYear,2,0,!0,!0);break;case"yyy":n=mc(jr.FullYear,3,0,!1,!0);break;case"yyyy":n=mc(jr.FullYear,4,0,!1,!0);break;case"Y":n=Rx(1);break;case"YY":n=Rx(2,!0);break;case"YYY":n=Rx(3);break;case"YYYY":n=Rx(4);break;case"M":case"L":n=mc(jr.Month,1,1);break;case"MM":case"LL":n=mc(jr.Month,2,1);break;case"MMM":n=Ws(Hr.Months,ks.Abbreviated);break;case"MMMM":n=Ws(Hr.Months,ks.Wide);break;case"MMMMM":n=Ws(Hr.Months,ks.Narrow);break;case"LLL":n=Ws(Hr.Months,ks.Abbreviated,gu.Standalone);break;case"LLLL":n=Ws(Hr.Months,ks.Wide,gu.Standalone);break;case"LLLLL":n=Ws(Hr.Months,ks.Narrow,gu.Standalone);break;case"w":n=S3(1);break;case"ww":n=S3(2);break;case"W":n=S3(1,!0);break;case"d":n=mc(jr.Date,1);break;case"dd":n=mc(jr.Date,2);break;case"c":case"cc":n=mc(jr.Day,1);break;case"ccc":n=Ws(Hr.Days,ks.Abbreviated,gu.Standalone);break;case"cccc":n=Ws(Hr.Days,ks.Wide,gu.Standalone);break;case"ccccc":n=Ws(Hr.Days,ks.Narrow,gu.Standalone);break;case"cccccc":n=Ws(Hr.Days,ks.Short,gu.Standalone);break;case"E":case"EE":case"EEE":n=Ws(Hr.Days,ks.Abbreviated);break;case"EEEE":n=Ws(Hr.Days,ks.Wide);break;case"EEEEE":n=Ws(Hr.Days,ks.Narrow);break;case"EEEEEE":n=Ws(Hr.Days,ks.Short);break;case"a":case"aa":case"aaa":n=Ws(Hr.DayPeriods,ks.Abbreviated);break;case"aaaa":n=Ws(Hr.DayPeriods,ks.Wide);break;case"aaaaa":n=Ws(Hr.DayPeriods,ks.Narrow);break;case"b":case"bb":case"bbb":n=Ws(Hr.DayPeriods,ks.Abbreviated,gu.Standalone,!0);break;case"bbbb":n=Ws(Hr.DayPeriods,ks.Wide,gu.Standalone,!0);break;case"bbbbb":n=Ws(Hr.DayPeriods,ks.Narrow,gu.Standalone,!0);break;case"B":case"BB":case"BBB":n=Ws(Hr.DayPeriods,ks.Abbreviated,gu.Format,!0);break;case"BBBB":n=Ws(Hr.DayPeriods,ks.Wide,gu.Format,!0);break;case"BBBBB":n=Ws(Hr.DayPeriods,ks.Narrow,gu.Format,!0);break;case"h":n=mc(jr.Hours,1,-12);break;case"hh":n=mc(jr.Hours,2,-12);break;case"H":n=mc(jr.Hours,1);break;case"HH":n=mc(jr.Hours,2);break;case"m":n=mc(jr.Minutes,1);break;case"mm":n=mc(jr.Minutes,2);break;case"s":n=mc(jr.Seconds,1);break;case"ss":n=mc(jr.Seconds,2);break;case"S":n=mc(jr.FractionalSeconds,1);break;case"SS":n=mc(jr.FractionalSeconds,2);break;case"SSS":n=mc(jr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=xx(zf.Short);break;case"ZZZZZ":n=xx(zf.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=xx(zf.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=xx(zf.Long);break;default:return null}return w3[t]=n,n}(h);u+=b?b(i,o,c):"''"===h?"'":h.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}function Ox(t,n,o){const e=new Date(0);return e.setFullYear(t,n,o),e.setHours(0,0,0),e}function jf(t,n){var o;const e=function NFe(t){return hu(t)[qs.LocaleId]}(t);if(null!==(o=LT[e])&&void 0!==o||(LT[e]={}),LT[e][n])return LT[e][n];let i="";switch(n){case"shortDate":i=Px(t,Ad.Short);break;case"mediumDate":i=Px(t,Ad.Medium);break;case"longDate":i=Px(t,Ad.Long);break;case"fullDate":i=Px(t,Ad.Full);break;case"shortTime":i=Ix(t,Ad.Short);break;case"mediumTime":i=Ix(t,Ad.Medium);break;case"longTime":i=Ix(t,Ad.Long);break;case"fullTime":i=Ix(t,Ad.Full);break;case"short":const r=jf(t,"shortTime"),s=jf(t,"shortDate");i=Ex(Mx(t,Ad.Short),[r,s]);break;case"medium":const a=jf(t,"mediumTime"),c=jf(t,"mediumDate");i=Ex(Mx(t,Ad.Medium),[a,c]);break;case"long":const u=jf(t,"longTime"),h=jf(t,"longDate");i=Ex(Mx(t,Ad.Long),[u,h]);break;case"full":const b=jf(t,"fullTime"),w=jf(t,"fullDate");i=Ex(Mx(t,Ad.Full),[b,w])}return i&&(LT[e][n]=i),i}function Ex(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(o,e){return null!=n&&e in n?n[e]:o})),t}function ph(t,n,o="-",e,i){let r="";(t<0||i&&t<=0)&&(i?t=1-t:(t=-t,r=o));let s=String(t);for(;s.length<n;)s="0"+s;return e&&(s=s.slice(s.length-n)),r+s}function mc(t,n,o=0,e=!1,i=!1){return function(r,s){let a=function XFe(t,n){switch(t){case jr.FullYear:return n.getFullYear();case jr.Month:return n.getMonth();case jr.Date:return n.getDate();case jr.Hours:return n.getHours();case jr.Minutes:return n.getMinutes();case jr.Seconds:return n.getSeconds();case jr.FractionalSeconds:return n.getMilliseconds();case jr.Day:return n.getDay();default:throw new Error('Unknown DateType value "'.concat(t,'".'))}}(t,r);if((o>0||a>-o)&&(a+=o),t===jr.Hours)0===a&&-12===o&&(a=12);else if(t===jr.FractionalSeconds)return function JFe(t,n){return ph(t,3).substring(0,n)}(a,n);const c=Cp(s,Xa.MinusSign);return ph(a,n,c,e,i)}}function Ws(t,n,o=gu.Format,e=!1){return function(i,r){return function e3e(t,n,o,e,i,r){switch(o){case Hr.Months:return function GFe(t,n,o){const e=hu(t),r=yp([e[qs.MonthsFormat],e[qs.MonthsStandalone]],n);return yp(r,o)}(n,i,e)[t.getMonth()];case Hr.Days:return function UFe(t,n,o){const e=hu(t),r=yp([e[qs.DaysFormat],e[qs.DaysStandalone]],n);return yp(r,o)}(n,i,e)[t.getDay()];case Hr.DayPeriods:const s=t.getHours(),a=t.getMinutes();if(r){const u=function HFe(t){const n=hu(t);return hX(n),(n[qs.ExtraData][2]||[]).map(e=>"string"==typeof e?y3(e):[y3(e[0]),y3(e[1])])}(n),h=function qFe(t,n,o){const e=hu(t);hX(e);const r=yp([e[qs.ExtraData][0],e[qs.ExtraData][1]],n)||[];return yp(r,o)||[]}(n,i,e),b=u.findIndex(w=>{if(Array.isArray(w)){const[R,G]=w,K=s>=R.hours&&a>=R.minutes,te=s<G.hours||s===G.hours&&a<G.minutes;if(R.hours<G.hours){if(K&&te)return!0}else if(K||te)return!0}else if(w.hours===s&&w.minutes===a)return!0;return!1});if(-1!==b)return h[b]}return function FFe(t,n,o){const e=hu(t),r=yp([e[qs.DayPeriodsFormat],e[qs.DayPeriodsStandalone]],n);return yp(r,o)}(n,i,e)[s<12?0:1];case Hr.Eras:return function VFe(t,n){return yp(hu(t)[qs.Eras],n)}(n,e)[t.getFullYear()<=0?0:1];default:throw new Error("unexpected translation type ".concat(o))}}(i,r,t,n,o,e)}}function xx(t){return function(n,o,e){const i=-1*e,r=Cp(o,Xa.MinusSign),s=i>0?Math.floor(i/60):Math.ceil(i/60);switch(t){case zf.Short:return(i>=0?"+":"")+ph(s,2,r)+ph(Math.abs(i%60),2,r);case zf.ShortGMT:return"GMT"+(i>=0?"+":"")+ph(s,1,r);case zf.Long:return"GMT"+(i>=0?"+":"")+ph(s,2,r)+":"+ph(Math.abs(i%60),2,r);case zf.Extended:return 0===e?"Z":(i>=0?"+":"")+ph(s,2,r)+":"+ph(Math.abs(i%60),2,r);default:throw new Error('Unknown zone width "'.concat(t,'"'))}}}const t3e=0,Ax=4;function mX(t){const n=t.getDay(),o=0===n?-3:Ax-n;return Ox(t.getFullYear(),t.getMonth(),t.getDate()+o)}function S3(t,n=!1){return function(o,e){let i;if(n){const r=new Date(o.getFullYear(),o.getMonth(),1).getDay()-1,s=o.getDate();i=1+Math.floor((s+r)/7)}else{const r=mX(o),s=function n3e(t){const n=Ox(t,t3e,1).getDay();return Ox(t,0,1+(n<=Ax?Ax:Ax+7)-n)}(r.getFullYear()),a=r.getTime()-s.getTime();i=1+Math.round(a/6048e5)}return ph(i,t,Cp(e,Xa.MinusSign))}}function Rx(t,n=!1){return function(o,e){return ph(mX(o).getFullYear(),t,Cp(e,Xa.MinusSign),n)}}const w3={};function fX(t,n){t=t.replace(/:/g,"");const o=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(o)?n:o}function gX(t){return t instanceof Date&&!isNaN(t.valueOf())}const c3e=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function M3(t){const n=parseInt(t);if(isNaN(n))throw new Error("Invalid integer literal when parsing "+t);return n}function CX(t,n){n=encodeURIComponent(n);for(const o of t.split(";")){const e=o.indexOf("="),[i,r]=-1==e?[o,""]:[o.slice(0,e),o.slice(e+1)];if(i.trim()===n)return decodeURIComponent(r)}return null}const E3=/\s+/,yX=[];let Xe=(()=>{var t;class n{constructor(e,i){this._ngEl=e,this._renderer=i,this.initialClasses=yX,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(E3):yX}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(E3):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,!!e[i]);this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(E3).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ji))},t.\u0275dir=qn({type:t,selectors:[["","ngClass",""]],inputs:{klass:[mo.None,"class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class C3e{constructor(n,o,e,i){this.$implicit=n,this.ngForOf=o,this.index=e,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Mt=(()=>{var t;class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,s,a)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new C3e(r.item,this._ngForOf,-1,-1),null===a?void 0:a);else if(null==a)i.remove(null===s?void 0:s);else if(null!==s){const c=i.get(s);i.move(c,a),wX(c,r)}});for(let r=0,s=i.length;r<s;r++){const c=i.get(r).context;c.index=r,c.count=s,c.ngForOf=this._ngForOf}e.forEachIdentityChange(r=>{wX(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bs),g(Qa),g(rF))},t.\u0275dir=qn({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function wX(t,n){t.context.$implicit=n.item}let Ne=(()=>{var t;class n{constructor(e,i){this._viewContainer=e,this._context=new y3e,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){TX("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){TX("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bs),g(Qa))},t.\u0275dir=qn({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class y3e{constructor(){this.$implicit=null,this.ngIf=null}}function TX(t,n){if(n&&!n.createEmbeddedView)throw new Error("".concat(t," must be a TemplateRef, but received '").concat(di(n),"'."))}let Cm=(()=>{var t;class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,s]=e.split("."),a=-1===r.indexOf("-")?void 0:r_.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,s?"".concat(i).concat(s):i,a):this._renderer.removeStyle(this._ngEl.nativeElement,r,a)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(WE),g(ji))},t.\u0275dir=qn({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),qr=(()=>{var t;class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(this._shouldRecreateView(e)){var i;const r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const s=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,s,{injector:null!==(i=this.ngTemplateOutletInjector)&&void 0!==i?i:void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,i,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,i,r),get:(e,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bs))},t.\u0275dir=qn({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[it]}),n})();function hh(t,n){return new vt(2100,!1)}class I3e{createSubscription(n,o){return qK(()=>n.subscribe({next:o,error:e=>{throw e}}))}dispose(n){qK(()=>n.unsubscribe())}}class M3e{createSubscription(n,o){return n.then(o,e=>{throw e})}dispose(n){}}const O3e=new M3e,E3e=new I3e;let IX=(()=>{var t;class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(xT(e))return O3e;if(PJ(e))return E3e;throw hh()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re,16))},t.\u0275pipe=Vr({name:"async",type:t,pure:!1,standalone:!0}),n})(),MX=(()=>{var t;class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw hh();return e.toLowerCase()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"lowercase",type:t,pure:!0,standalone:!0}),n})(),Sp=(()=>{var t;class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw hh();return e.toUpperCase()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"uppercase",type:t,pure:!0,standalone:!0}),n})();const k3e=new Ot(""),L3e=new Ot("");let sb=(()=>{var t;class n{constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,s){if(null==e||""===e||e!=e)return null;try{var a,c,u,h,b;const w=null!==(a=null!=i?i:null===(c=this.defaultOptions)||void 0===c?void 0:c.dateFormat)&&void 0!==a?a:"mediumDate",R=null!==(u=null!==(h=null!=r?r:null===(b=this.defaultOptions)||void 0===b?void 0:b.timezone)&&void 0!==h?h:this.defaultTimezone)&&void 0!==u?u:void 0;return YFe(e,w,s||this.locale,R)}catch(w){throw hh()}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Gf,16),g(k3e,24),g(L3e,24))},t.\u0275pipe=Vr({name:"date",type:t,pure:!0,standalone:!0}),n})(),Lx=(()=>{var t;class n{constructor(e){this._locale=e}transform(e,i,r){if(!function R3(t){return!(null==t||""===t||t!=t)}(e))return null;r||(r=this._locale);try{return function m3e(t,n,o){return function P3(t,n,o,e,i,r,s=!1){let a="",c=!1;if(isFinite(t)){let u=function g3e(t){let e,i,r,s,a,n=Math.abs(t)+"",o=0;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(i<0&&(i=r),i+=+n.slice(r+1),n=n.substring(0,r)):i<0&&(i=n.length),r=0;"0"===n.charAt(r);r++);if(r===(a=n.length))e=[0],i=1;else{for(a--;"0"===n.charAt(a);)a--;for(i-=r,e=[],s=0;r<=a;r++,s++)e[s]=Number(n.charAt(r))}return i>22&&(e=e.splice(0,21),o=i-1,i=1),{digits:e,exponent:o,integerLen:i}}(t);s&&(u=function f3e(t){if(0===t.digits[0])return t;const n=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===n?t.digits.push(0,0):1===n&&t.digits.push(0),t.integerLen+=2),t}(u));let h=n.minInt,b=n.minFrac,w=n.maxFrac;if(r){const le=r.match(c3e);if(null===le)throw new Error("".concat(r," is not a valid digit info"));const me=le[1],ge=le[3],Me=le[5];null!=me&&(h=M3(me)),null!=ge&&(b=M3(ge)),null!=Me?w=M3(Me):null!=ge&&b>w&&(w=b)}!function _3e(t,n,o){if(n>o)throw new Error("The minimum number of digits after fraction (".concat(n,") is higher than the maximum (").concat(o,")."));let e=t.digits,i=e.length-t.integerLen;const r=Math.min(Math.max(n,i),o);let s=r+t.integerLen,a=e[s];if(s>0){e.splice(Math.max(t.integerLen,s));for(let b=s;b<e.length;b++)e[b]=0}else{i=Math.max(0,i),t.integerLen=1,e.length=Math.max(1,s=r+1),e[0]=0;for(let b=1;b<s;b++)e[b]=0}if(a>=5)if(s-1<0){for(let b=0;b>s;b--)e.unshift(0),t.integerLen++;e.unshift(1),t.integerLen++}else e[s-1]++;for(;i<Math.max(0,r);i++)e.push(0);let c=0!==r;const u=n+t.integerLen,h=e.reduceRight(function(b,w,R,G){return G[R]=(w+=b)<10?w:w-10,c&&(0===G[R]&&R>=u?G.pop():c=!1),w>=10?1:0},0);h&&(e.unshift(h),t.integerLen++)}(u,b,w);let R=u.digits,G=u.integerLen;const K=u.exponent;let te=[];for(c=R.every(le=>!le);G<h;G++)R.unshift(0);for(;G<0;G++)R.unshift(0);G>0?te=R.splice(G,R.length):(te=R,R=[0]);const ee=[];for(R.length>=n.lgSize&&ee.unshift(R.splice(-n.lgSize,R.length).join(""));R.length>n.gSize;)ee.unshift(R.splice(-n.gSize,R.length).join(""));R.length&&ee.unshift(R.join("")),a=ee.join(Cp(o,e)),te.length&&(a+=Cp(o,i)+te.join("")),K&&(a+=Cp(o,Xa.Exponential)+"+"+K)}else a=Cp(o,Xa.Infinity);return a=t<0&&!c?n.negPre+a+n.negSuf:n.posPre+a+n.posSuf,a}(t,function I3(t,n="-"){const o={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},e=t.split(";"),i=e[0],r=e[1],s=-1!==i.indexOf(".")?i.split("."):[i.substring(0,i.lastIndexOf("0")+1),i.substring(i.lastIndexOf("0")+1)],a=s[0],c=s[1]||"";o.posPre=a.substring(0,a.indexOf("#"));for(let h=0;h<c.length;h++){const b=c.charAt(h);"0"===b?o.minFrac=o.maxFrac=h+1:"#"===b?o.maxFrac=h+1:o.posSuf+=b}const u=a.split(",");if(o.gSize=u[1]?u[1].length:0,o.lgSize=u[2]||u[1]?(u[2]||u[1]).length:0,r){const h=i.length-o.posPre.length-o.posSuf.length,b=r.indexOf("#");o.negPre=r.substring(0,b).replace(/'/g,""),o.negSuf=r.slice(b+h).replace(/'/g,"")}else o.negPre=n+o.posPre,o.negSuf=o.posSuf;return o}(function C3(t,n){return hu(t)[qs.NumberFormats][n]}(n,Tx.Decimal),Cp(n,Xa.MinusSign)),n,Xa.Group,Xa.Decimal,o)}(function k3(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error("".concat(t," is not a number"));return t}(e),r,i)}catch(s){throw hh()}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Gf,16))},t.\u0275pipe=Vr({name:"number",type:t,pure:!0,standalone:!0}),n})();let BT=(()=>{var t;class n{transform(e,i,r){if(null==e)return null;if(!this.supports(e))throw hh();return e.slice(i,r)}supports(e){return"string"==typeof e||Array.isArray(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"slice",type:t,pure:!1,standalone:!0}),n})(),xi=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();const EX="browser";function xX(t){return"server"===t}let $3e=(()=>{var t;class n{}return(t=n).\u0275prov=be({token:t,providedIn:"root",factory:()=>function W3e(t){return t===EX}(mt(t_))?new K3e(mt(La),window):new Q3e}),n})();class K3e{constructor(n,o){this.document=n,this.window=o,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(n){this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){const o=function Z3e(t,n){const o=t.getElementById(n)||t.getElementsByName(n)[0];if(o)return o;if("function"==typeof t.createTreeWalker&&t.body&&"function"==typeof t.body.attachShadow){const e=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let i=e.currentNode;for(;i;){const r=i.shadowRoot;if(r){const s=r.getElementById(n)||r.querySelector('[name="'.concat(n,'"]'));if(s)return s}i=e.nextNode()}}return null}(this.document,n);o&&(this.scrollToElement(o),o.focus())}setHistoryScrollRestoration(n){this.window.history.scrollRestoration=n}scrollToElement(n){const o=n.getBoundingClientRect(),e=o.left+this.window.pageXOffset,i=o.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(e-r[0],i-r[1])}}class Q3e{setOffset(n){}getScrollPosition(){return[0,0]}scrollToPosition(n){}scrollToAnchor(n){}setHistoryScrollRestoration(n){}}class AX{}
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */
class TUe extends EFe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class D3 extends TUe{static makeCurrent(){!function OFe(t){var n;null!==(n=_3)&&void 0!==n||(_3=t)}(new D3)}onAndCancel(n,o,e){return n.addEventListener(o,e),()=>{n.removeEventListener(o,e)}}dispatchEvent(n,o){n.dispatchEvent(o)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,o){return(o=o||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,o){return"window"===o?window:"document"===o?n:"body"===o?n.body:null}getBaseHref(n){const o=function PUe(){return UT=UT||document.querySelector("base"),UT?UT.getAttribute("href"):null}();return null==o?null:function IUe(t){return new URL(t,document.baseURI).pathname}(o)}resetBaseElement(){UT=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return CX(document.cookie,n)}}let UT=null,OUe=(()=>{var t;class n{build(){return new XMLHttpRequest}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Nx=new Ot("");let GX=(()=>{var t;class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(s=>s.supports(e)),!i)throw new vt(5101,!1);return this._eventNameToPlugin.set(e,i),i}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Nx),T(an))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class VX{constructor(n){this._doc=n}}const B3="ng-app-id";let zX=(()=>{var t;class n{constructor(e,i,r,s={}){this.doc=e,this.appId=i,this.nonce=r,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=xX(s),this.resetHostNodes()}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){const e=this.styleNodesInDOM;e&&(e.forEach(i=>i.remove()),e.clear());for(const i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){var i;const r=this.styleRef;null===(i=r.get(e))||void 0===i||null===(i=i.elements)||void 0===i||i.forEach(s=>s.remove()),r.delete(e)}collectServerRenderedStyles(){var e;const i=null===(e=this.doc.head)||void 0===e?void 0:e.querySelectorAll("style[".concat(B3,'="').concat(this.appId,'"]'));if(null!=i&&i.length){const r=new Map;return i.forEach(s=>{null!=s.textContent&&r.set(s.textContent,s)}),r}return null}changeUsageCount(e,i){const r=this.styleRef;if(r.has(e)){const s=r.get(e);return s.usage+=i,s.usage}return r.set(e,{usage:i,elements:[]}),i}getStyleElement(e,i){const r=this.styleNodesInDOM,s=null==r?void 0:r.get(i);if((null==s?void 0:s.parentNode)===e)return r.delete(i),s.removeAttribute(B3),s;{const a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(B3,this.appId),e.appendChild(a),a}}addStyleToHost(e,i){var r;const s=this.getStyleElement(e,i),a=this.styleRef,c=null===(r=a.get(i))||void 0===r?void 0:r.elements;c?c.push(s):a.set(i,{elements:[s],usage:1})}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La),T(JO),T(R9,8),T(t_))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const N3={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},F3=/%COMP%/g,EUe="_nghost-".concat("%COMP%"),xUe="_ngcontent-".concat("%COMP%"),RUe=new Ot("",{providedIn:"root",factory:()=>!0});function HX(t,n){return n.map(o=>o.replace(F3,t))}let U3=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=u,this.nonce=h,this.rendererByCompId=new Map,this.platformIsServer=xX(c),this.defaultRenderer=new G3(e,a,u,this.platformIsServer)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===ye.ShadowDom&&(i={...i,encapsulation:ye.Emulated});const r=this.getOrCreateRenderer(e,i);return r instanceof WX?r.applyToHost(e):r instanceof V3&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let s=r.get(i.id);if(!s){const a=this.doc,c=this.ngZone,u=this.eventManager,h=this.sharedStylesHost,b=this.removeStylesOnCompDestroy,w=this.platformIsServer;switch(i.encapsulation){case ye.Emulated:s=new WX(u,h,i,this.appId,b,a,c,w);break;case ye.ShadowDom:return new BUe(u,h,e,i,a,c,this.nonce,w);default:s=new V3(u,h,i,b,a,c,w)}r.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(GX),T(zX),T(JO),T(RUe),T(La),T(t_),T(an),T(R9))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class G3{constructor(n,o,e,i){this.eventManager=n,this.doc=o,this.ngZone=e,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,o){return o?this.doc.createElementNS(N3[o]||o,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,o){(qX(n)?n.content:n).appendChild(o)}insertBefore(n,o,e){n&&(qX(n)?n.content:n).insertBefore(o,e)}removeChild(n,o){n&&n.removeChild(o)}selectRootElement(n,o){let e="string"==typeof n?this.doc.querySelector(n):n;if(!e)throw new vt(-5104,!1);return o||(e.textContent=""),e}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,o,e,i){if(i){o=i+":"+o;const r=N3[i];r?n.setAttributeNS(r,o,e):n.setAttribute(o,e)}else n.setAttribute(o,e)}removeAttribute(n,o,e){if(e){const i=N3[e];i?n.removeAttributeNS(i,o):n.removeAttribute("".concat(e,":").concat(o))}else n.removeAttribute(o)}addClass(n,o){n.classList.add(o)}removeClass(n,o){n.classList.remove(o)}setStyle(n,o,e,i){i&(r_.DashCase|r_.Important)?n.style.setProperty(o,e,i&r_.Important?"important":""):n.style[o]=e}removeStyle(n,o,e){e&r_.DashCase?n.style.removeProperty(o):n.style[o]=""}setProperty(n,o,e){null!=n&&(n[o]=e)}setValue(n,o){n.nodeValue=o}listen(n,o,e){if("string"==typeof n&&!(n=p_().getGlobalEventTarget(this.doc,n)))throw new Error("Unsupported event target ".concat(n," for event ").concat(o));return this.eventManager.addEventListener(n,o,this.decoratePreventDefault(e))}decoratePreventDefault(n){return o=>{if("__ngUnwrap__"===o)return n;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>n(o)):n(o))&&o.preventDefault()}}}function qX(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class BUe extends G3{constructor(n,o,e,i,r,s,a,c){super(n,r,s,c),this.sharedStylesHost=o,this.hostEl=e,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const u=HX(i.id,i.styles);for(const h of u){const b=document.createElement("style");a&&b.setAttribute("nonce",a),b.textContent=h,this.shadowRoot.appendChild(b)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,o){return super.appendChild(this.nodeOrShadowRoot(n),o)}insertBefore(n,o,e){return super.insertBefore(this.nodeOrShadowRoot(n),o,e)}removeChild(n,o){return super.removeChild(this.nodeOrShadowRoot(n),o)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class V3 extends G3{constructor(n,o,e,i,r,s,a,c){super(n,r,s,a),this.sharedStylesHost=o,this.removeStylesOnCompDestroy=i,this.styles=c?HX(c,e.styles):e.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class WX extends V3{constructor(n,o,e,i,r,s,a,c){const u=i+"-"+e.id;super(n,o,e,r,s,a,c,u),this.contentAttr=function kUe(t){return xUe.replace(F3,t)}(u),this.hostAttr=function LUe(t){return EUe.replace(F3,t)}(u)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,o){const e=super.createElement(n,o);return super.setAttribute(e,this.contentAttr,""),e}}let NUe=(()=>{var t;class n extends VX{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const $X=["alt","control","meta","shift"],FUe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},UUe={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let GUe=(()=>{var t;class n extends VX{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>p_().onAndCancel(e,s.domEventName,a))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),$X.forEach(h=>{const b=i.indexOf(h);b>-1&&(i.splice(b,1),a+=h+".")}),a+=s,0!=i.length||0===s.length)return null;const u={};return u.domEventName=r,u.fullKey=a,u}static matchEventFullKeyCode(e,i){let r=FUe[e.key]||e.key,s="";return i.indexOf("code.")>-1&&(r=e.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),$X.forEach(a=>{a!==r&&(0,UUe[a])(e)&&(s+=a+".")}),s+=r,s===i)}static eventCallback(e,i,r){return s=>{n.matchEventFullKeyCode(s,e)&&r.runGuarded(()=>i(s))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const ZX=[{provide:t_,useValue:EX},{provide:x9,useValue:function VUe(){D3.makeCurrent()},multi:!0},{provide:La,useFactory:function jUe(){return function xEe(t){xB=t}(document),document},deps:[]}],HUe=BJ(JNe,"browser",ZX),qUe=new Ot(""),QX=[{provide:hx,useClass:class MUe{addToWindow(n){Ye.getAngularTestability=(e,i=!0)=>{const r=n.findTestabilityInTree(e,i);if(null==r)throw new vt(5103,!1);return r},Ye.getAllAngularTestabilities=()=>n.getAllTestabilities(),Ye.getAllAngularRootElements=()=>n.getAllRootElements(),Ye.frameworkStabilizers||(Ye.frameworkStabilizers=[]),Ye.frameworkStabilizers.push(e=>{const i=Ye.getAllAngularTestabilities();let r=i.length;const s=function(){r--,0==r&&e()};i.forEach(a=>{a.whenStable(s)})})}findTestabilityInTree(n,o,e){if(null==o)return null;const i=n.getTestability(o);return null!=i?i:e?p_().isShadowRoot(o)?this.findTestabilityInTree(n,o.host,!0):this.findTestabilityInTree(n,o.parentElement,!0):null}},deps:[]},{provide:TJ,useClass:o3,deps:[an,r3,hx]},{provide:o3,useClass:o3,deps:[an,r3,hx]}],YX=[{provide:eN,useValue:"root"},{provide:lh,useFactory:function zUe(){return new lh},deps:[]},{provide:Nx,useClass:NUe,multi:!0,deps:[La,an,t_]},{provide:Nx,useClass:GUe,multi:!0,deps:[La]},U3,zX,GX,{provide:eF,useExisting:U3},{provide:AX,useClass:OUe,deps:[]},[]];let JX=(()=>{var t;class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:JO,useValue:e.appId}]}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(qUe,12))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...YX,...QX],imports:[xi,XNe]}),n})(),XX=(()=>{var t;class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const ZUe=new Ot("HammerGestureConfig");let z3=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:function(e){let i=null;return i=e?new(e||t):T(QUe),i},providedIn:"root"}),n})(),QUe=(()=>{var t;class n extends z3{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Od.NONE:return i;case Od.HTML:return gm(i,"HTML")?Md(i):R$(this._doc,String(i)).toString();case Od.STYLE:return gm(i,"Style")?Md(i):i;case Od.SCRIPT:if(gm(i,"Script"))return Md(i);throw new vt(5200,!1);case Od.URL:return gm(i,"URL")?Md(i):PE(String(i));case Od.RESOURCE_URL:if(gm(i,"ResourceURL"))return Md(i);throw new vt(5201,!1);default:throw new vt(5202,!1)}}bypassSecurityTrustHtml(e){return function oAe(t){return new Jxe(t)}(e)}bypassSecurityTrustStyle(e){return function rAe(t){return new Xxe(t)}(e)}bypassSecurityTrustScript(e){return function sAe(t){return new eAe(t)}(e)}bypassSecurityTrustUrl(e){return function aAe(t){return new tAe(t)}(e)}bypassSecurityTrustResourceUrl(e){return function cAe(t){return new nAe(t)}(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function Hf(t){return!!t&&(t instanceof ao||ut(t.lift)&&ut(t.subscribe))}function Qe(t,n,o,e){var s,i=arguments.length,r=i<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,n,o,e);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(i<3?s(r):i>3?s(n,o,r):s(n,o))||r);return i>3&&r&&Object.defineProperty(n,o,r),r}function Fx(t,n){return function(o,e){n(o,e,t)}}function ue(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function h_(t){return this instanceof h_?(this.v=t,this):new h_(t)}function see(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,n=t[Symbol.asyncIterator];return n?n.call(t):(t=function W3(t){var n="function"==typeof Symbol&&Symbol.iterator,o=n&&t[n],e=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o={},e("next"),e("throw"),e("return"),o[Symbol.asyncIterator]=function(){return this},o);function e(r){o[r]=t[r]&&function(s){return new Promise(function(a,c){!function i(r,s,a,c){Promise.resolve(c).then(function(u){r({value:u,done:a})},s)}(a,c,(s=t[r](s)).done,s.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const $3=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function aee(t){return ut(null==t?void 0:t.then)}function cee(t){return ut(t[Bu])}function lee(t){return Symbol.asyncIterator&&ut(null==t?void 0:t[Symbol.asyncIterator])}function uee(t){return new TypeError("You provided ".concat(null!==t&&"object"==typeof t?"an invalid object":"'".concat(t,"'")," where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."))}const dee=function fGe(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function pee(t){return ut(null==t?void 0:t[dee])}function hee(t){return function ree(t,n,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,e=o.apply(t,n||[]),r=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function s(R){return function(G){return Promise.resolve(G).then(R,b)}}),i[Symbol.asyncIterator]=function(){return this},i;function a(R,G){e[R]&&(i[R]=function(K){return new Promise(function(te,ee){r.push([R,K,te,ee])>1||c(R,K)})},G&&(i[R]=G(i[R])))}function c(R,G){try{!function u(R){R.value instanceof h_?Promise.resolve(R.value.v).then(h,b):w(r[0][2],R)}(e[R](G))}catch(K){w(r[0][3],K)}}function h(R){c("next",R)}function b(R){c("throw",R)}function w(R,G){R(G),r.shift(),r.length&&c(r[0][0],r[0][1])}}(this,arguments,function*(){const o=t.getReader();try{for(;;){const{value:e,done:i}=yield h_(o.read());if(i)return yield h_(void 0);yield yield h_(e)}}finally{o.releaseLock()}})}function mee(t){return ut(null==t?void 0:t.getReader)}function Qc(t){if(t instanceof ao)return t;if(null!=t){if(cee(t))return function gGe(t){return new ao(n=>{const o=t[Bu]();if(ut(o.subscribe))return o.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if($3(t))return function _Ge(t){return new ao(n=>{for(let o=0;o<t.length&&!n.closed;o++)n.next(t[o]);n.complete()})}(t);if(aee(t))return function vGe(t){return new ao(n=>{t.then(o=>{n.closed||(n.next(o),n.complete())},o=>n.error(o)).then(null,To)})}(t);if(lee(t))return fee(t);if(pee(t))return function bGe(t){return new ao(n=>{for(const o of t)if(n.next(o),n.closed)return;n.complete()})}(t);if(mee(t))return function CGe(t){return fee(hee(t))}(t)}throw uee(t)}function fee(t){return new ao(n=>{(function yGe(t,n){var o,e,i,r;return function iee(t,n,o,e){return new(o||(o=Promise))(function(r,s){function a(h){try{u(e.next(h))}catch(b){s(b)}}function c(h){try{u(e.throw(h))}catch(b){s(b)}}function u(h){h.done?r(h.value):function i(r){return r instanceof o?r:new o(function(s){s(r)})}(h.value).then(a,c)}u((e=e.apply(t,n||[])).next())})}(this,void 0,void 0,function*(){try{for(o=see(t);!(e=yield o.next()).done;)if(n.next(e.value),n.closed)return}catch(s){i={error:s}}finally{try{e&&!e.done&&(r=o.return)&&(yield r.call(o))}finally{if(i)throw i.error}}n.complete()})})(t,n).catch(o=>n.error(o))})}function qf(t,n,o,e=0,i=!1){const r=n.schedule(function(){o(),i?t.add(this.schedule(null,e)):this.unsubscribe()},e);if(t.add(r),!i)return r}function OS(t,n=0){return vr((o,e)=>{o.subscribe(eo(e,i=>qf(e,t,()=>e.next(i),n),()=>qf(e,t,()=>e.complete(),n),i=>qf(e,t,()=>e.error(i),n)))})}function Ux(t,n=0){return vr((o,e)=>{e.add(t.schedule(()=>o.subscribe(e),n))})}function gee(t,n){if(!t)throw new Error("Iterable cannot be null");return new ao(o=>{qf(o,n,()=>{const e=t[Symbol.asyncIterator]();qf(o,n,()=>{e.next().then(i=>{i.done?o.complete():o.next(i.value)})},0,!0)})})}function _ee(t,n){if(null!=t){if(cee(t))return function SGe(t,n){return Qc(t).pipe(Ux(n),OS(n))}(t,n);if($3(t))return function TGe(t,n){return new ao(o=>{let e=0;return n.schedule(function(){e===t.length?o.complete():(o.next(t[e++]),o.closed||this.schedule())})})}(t,n);if(aee(t))return function wGe(t,n){return Qc(t).pipe(Ux(n),OS(n))}(t,n);if(lee(t))return gee(t,n);if(pee(t))return function PGe(t,n){return new ao(o=>{let e;return qf(o,n,()=>{e=t[dee](),qf(o,n,()=>{let i,r;try{({value:i,done:r}=e.next())}catch(s){return void o.error(s)}r?o.complete():o.next(i)},0,!0)}),()=>ut(null==e?void 0:e.return)&&e.return()})}(t,n);if(mee(t))return function IGe(t,n){return gee(hee(t),n)}(t,n)}throw uee(t)}function Ks(t,n){return n?_ee(t,n):Qc(t)}function vee(t){return t&&ut(t.schedule)}function K3(t){return t[t.length-1]}function Z3(t){return ut(K3(t))?t.pop():void 0}function ES(t){return vee(K3(t))?t.pop():void 0}function Xn(...t){return Ks(t,ES(t))}const{isArray:OGe}=Array,{getPrototypeOf:EGe,prototype:xGe,keys:AGe}=Object;function bee(t){if(1===t.length){const n=t[0];if(OGe(n))return{args:n,keys:null};if(function RGe(t){return t&&"object"==typeof t&&EGe(t)===xGe}(n)){const o=AGe(n);return{args:o.map(e=>n[e]),keys:o}}}return{args:t,keys:null}}const{isArray:kGe}=Array;function Q3(t){return jn(n=>function LGe(t,n){return kGe(n)?t(...n):t(n)}(t,n))}function Cee(t,n){return t.reduce((o,e,i)=>(o[e]=n[i],o),{})}function wp(...t){const n=ES(t),o=Z3(t),{args:e,keys:i}=bee(t);if(0===e.length)return Ks([],n);const r=new ao(function DGe(t,n,o=ka){return e=>{yee(n,()=>{const{length:i}=t,r=new Array(i);let s=i,a=i;for(let c=0;c<i;c++)yee(n,()=>{const u=Ks(t[c],n);let h=!1;u.subscribe(eo(e,b=>{r[c]=b,h||(h=!0,a--),a||e.next(o(r.slice()))},()=>{--s||e.complete()}))},e)},e)}}(e,n,i?s=>Cee(i,s):ka));return o?r.pipe(Q3(o)):r}function yee(t,n,o){t?qf(o,t,n):n()}const Gx=Wt(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Yc(t,n,o=1/0){return ut(n)?Yc((e,i)=>jn((r,s)=>n(e,r,i,s))(Qc(t(e,i))),o):("number"==typeof n&&(o=n),vr((e,i)=>function BGe(t,n,o,e,i,r,s,a){const c=[];let u=0,h=0,b=!1;const w=()=>{b&&!c.length&&!u&&n.complete()},R=K=>u<e?G(K):c.push(K),G=K=>{r&&n.next(K),u++;let te=!1;Qc(o(K,h++)).subscribe(eo(n,ee=>{null==i||i(ee),r?R(ee):n.next(ee)},()=>{te=!0},void 0,()=>{if(te)try{for(u--;c.length&&u<e;){const ee=c.shift();s?qf(n,s,()=>G(ee)):G(ee)}w()}catch(ee){n.error(ee)}}))};return t.subscribe(eo(n,R,()=>{b=!0,w()})),()=>{null==a||a()}}(e,i,t,o)))}function xS(t=1/0){return Yc(ka,t)}function Y3(){return xS(1)}function m_(...t){return Y3()(Ks(t,ES(t)))}function f_(t){return new ao(n=>{Qc(t()).subscribe(n)})}function Wf(t,n){const o=ut(t)?t:()=>t,e=i=>i.error(o());return new ao(n?i=>n.schedule(e,0,i):e)}const Tp=new ao(t=>t.complete());function J3(){return vr((t,n)=>{let o=null;t._refCount++;const e=eo(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount)return void(o=null);const i=t._connection,r=o;o=null,i&&(!r||i===r)&&i.unsubscribe(),n.unsubscribe()});t.subscribe(e),e.closed||(o=t.connect())})}class See extends ao{constructor(n,o){super(),this.source=n,this.subjectFactory=o,this._subject=null,this._refCount=0,this._connection=null,lm(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:n}=this;this._subject=this._connection=null,null==n||n.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new zt;const o=this.getSubject();n.add(this.source.subscribe(eo(o,void 0,()=>{this._teardown(),o.complete()},e=>{this._teardown(),o.error(e)},()=>this._teardown()))),n.closed&&(this._connection=null,n=zt.EMPTY)}return n}refCount(){return J3()(this)}}function es(t,n){return vr((o,e)=>{let i=null,r=0,s=!1;const a=()=>s&&!i&&e.complete();o.subscribe(eo(e,c=>{null==i||i.unsubscribe();let u=0;const h=r++;Qc(t(c,h)).subscribe(i=eo(e,b=>e.next(n?n(c,b,h,u++):b),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function Qi(t){return t<=0?()=>Tp:vr((n,o)=>{let e=0;n.subscribe(eo(o,i=>{++e<=t&&(o.next(i),t<=e&&o.complete())}))})}function VT(...t){const n=ES(t);return vr((o,e)=>{(n?m_(t,o,n):m_(t,o)).subscribe(e)})}function bt(t,n){return vr((o,e)=>{let i=0;o.subscribe(eo(e,r=>t.call(n,r,i++)&&e.next(r)))})}function Vx(t){return vr((n,o)=>{let e=!1;n.subscribe(eo(o,i=>{e=!0,o.next(i)},()=>{e||o.next(t),o.complete()}))})}function wee(t=FGe){return vr((n,o)=>{let e=!1;n.subscribe(eo(o,i=>{e=!0,o.next(i)},()=>e?o.complete():o.error(t())))})}function FGe(){return new Gx}function $u(t,n){const o=arguments.length>=2;return e=>e.pipe(t?bt((i,r)=>t(i,r,e)):ka,Qi(1),o?Vx(n):wee(()=>new Gx))}function ab(t,n){return ut(n)?Yc(t,n,1):Yc(t,1)}function Da(t,n,o){const e=ut(t)||n||o?{next:t,error:n,complete:o}:t;return e?vr((i,r)=>{var s;null===(s=e.subscribe)||void 0===s||s.call(e);let a=!0;i.subscribe(eo(r,c=>{var u;null===(u=e.next)||void 0===u||u.call(e,c),r.next(c)},()=>{var c;a=!1,null===(c=e.complete)||void 0===c||c.call(e),r.complete()},c=>{var u;a=!1,null===(u=e.error)||void 0===u||u.call(e,c),r.error(c)},()=>{var c,u;a&&(null===(c=e.unsubscribe)||void 0===c||c.call(e)),null===(u=e.finalize)||void 0===u||u.call(e)}))}):ka}function mh(t){return vr((n,o)=>{let r,e=null,i=!1;e=n.subscribe(eo(o,void 0,void 0,s=>{r=Qc(t(s,mh(t)(n))),e?(e.unsubscribe(),e=null,r.subscribe(o)):i=!0})),i&&(e.unsubscribe(),e=null,r.subscribe(o))})}function zx(t,n){return vr(function UGe(t,n,o,e,i){return(r,s)=>{let a=o,c=n,u=0;r.subscribe(eo(s,h=>{const b=u++;c=a?t(c,h,b):(a=!0,h),e&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}(t,n,arguments.length>=2,!0))}function X3(t){return t<=0?()=>Tp:vr((n,o)=>{let e=[];n.subscribe(eo(o,i=>{e.push(i),t<e.length&&e.shift()},()=>{for(const i of e)o.next(i);o.complete()},void 0,()=>{e=null}))})}function Tee(t){return jn(()=>t)}function g_(t){return vr((n,o)=>{try{n.subscribe(o)}finally{o.add(t)}})}function wn(t){return vr((n,o)=>{Qc(t).subscribe(eo(o,()=>o.complete(),sr)),!o.closed&&n.subscribe(o)})}
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */const oi="primary",zT=Symbol("RouteTitle");class VGe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const o=this.params[n];return Array.isArray(o)?o[0]:o}return null}getAll(n){if(this.has(n)){const o=this.params[n];return Array.isArray(o)?o:[o]}return[]}get keys(){return Object.keys(this.params)}}function AS(t){return new VGe(t)}function zGe(t,n,o){const e=o.path.split("/");if(e.length>t.length||"full"===o.pathMatch&&(n.hasChildren()||e.length<t.length))return null;const i={};for(let r=0;r<e.length;r++){const s=e[r],a=t[r];if(s.startsWith(":"))i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,e.length),posParams:i}}function ym(t,n){const o=t?eU(t):void 0,e=n?eU(n):void 0;if(!o||!e||o.length!=e.length)return!1;let i;for(let r=0;r<o.length;r++)if(i=o[r],!Pee(t[i],n[i]))return!1;return!0}function eU(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Pee(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;const o=[...t].sort(),e=[...n].sort();return o.every((i,r)=>e[r]===i)}return t===n}function Iee(t){return t.length>0?t[t.length-1]:null}function __(t){return Hf(t)?t:xT(t)?Ks(Promise.resolve(t)):Xn(t)}const HGe={exact:function Eee(t,n,o){if(!cb(t.segments,n.segments)||!jx(t.segments,n.segments,o)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const e in n.children)if(!t.children[e]||!Eee(t.children[e],n.children[e],o))return!1;return!0},subset:xee},Mee={exact:function qGe(t,n){return ym(t,n)},subset:function WGe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(o=>Pee(t[o],n[o]))},ignored:()=>!0};function Oee(t,n,o){return HGe[o.paths](t.root,n.root,o.matrixParams)&&Mee[o.queryParams](t.queryParams,n.queryParams)&&!("exact"===o.fragment&&t.fragment!==n.fragment)}function xee(t,n,o){return Aee(t,n,n.segments,o)}function Aee(t,n,o,e){if(t.segments.length>o.length){const i=t.segments.slice(0,o.length);return!(!cb(i,o)||n.hasChildren()||!jx(i,o,e))}if(t.segments.length===o.length){if(!cb(t.segments,o)||!jx(t.segments,o,e))return!1;for(const i in n.children)if(!t.children[i]||!xee(t.children[i],n.children[i],e))return!1;return!0}{const i=o.slice(0,t.segments.length),r=o.slice(t.segments.length);return!!(cb(t.segments,i)&&jx(t.segments,i,e)&&t.children[oi])&&Aee(t.children[oi],n,r,e)}}function jx(t,n,o){return n.every((e,i)=>Mee[o](t[i].parameters,e.parameters))}class RS{constructor(n=new Cs([],{}),o={},e=null){this.root=n,this.queryParams=o,this.fragment=e}get queryParamMap(){var n;return null!==(n=this._queryParamMap)&&void 0!==n||(this._queryParamMap=AS(this.queryParams)),this._queryParamMap}toString(){return ZGe.serialize(this)}}class Cs{constructor(n,o){this.segments=n,this.children=o,this.parent=null,Object.values(o).forEach(e=>e.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Hx(this)}}class kS{constructor(n,o){this.path=n,this.parameters=o}get parameterMap(){var n;return null!==(n=this._parameterMap)&&void 0!==n||(this._parameterMap=AS(this.parameters)),this._parameterMap}toString(){return Lee(this)}}function cb(t,n){return t.length===n.length&&t.every((o,e)=>o.path===n[e].path)}let LS=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>new tU,providedIn:"root"}),n})();class tU{parse(n){const o=new s4e(n);return new RS(o.parseRootSegment(),o.parseQueryParams(),o.parseFragment())}serialize(n){const o="/".concat(jT(n.root,!0)),e=function JGe(t){const n=Object.entries(t).map(([o,e])=>Array.isArray(e)?e.map(i=>"".concat(qx(o),"=").concat(qx(i))).join("&"):"".concat(qx(o),"=").concat(qx(e))).filter(o=>o);return n.length?"?".concat(n.join("&")):""}(n.queryParams),i="string"==typeof n.fragment?"#".concat(function QGe(t){return encodeURI(t)}(n.fragment)):"";return"".concat(o).concat(e).concat(i)}}const ZGe=new tU;function Hx(t){return t.segments.map(n=>Lee(n)).join("/")}function jT(t,n){if(!t.hasChildren())return Hx(t);if(n){const o=t.children[oi]?jT(t.children[oi],!1):"",e=[];return Object.entries(t.children).forEach(([i,r])=>{i!==oi&&e.push("".concat(i,":").concat(jT(r,!1)))}),e.length>0?"".concat(o,"(").concat(e.join("//"),")"):o}{const o=function KGe(t,n){let o=[];return Object.entries(t.children).forEach(([e,i])=>{e===oi&&(o=o.concat(n(i,e)))}),Object.entries(t.children).forEach(([e,i])=>{e!==oi&&(o=o.concat(n(i,e)))}),o}(t,(e,i)=>i===oi?[jT(t.children[oi],!1)]:["".concat(i,":").concat(jT(e,!1))]);return 1===Object.keys(t.children).length&&null!=t.children[oi]?"".concat(Hx(t),"/").concat(o[0]):"".concat(Hx(t),"/(").concat(o.join("//"),")")}}function Ree(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function qx(t){return Ree(t).replace(/%3B/gi,";")}function nU(t){return Ree(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Wx(t){return decodeURIComponent(t)}function kee(t){return Wx(t.replace(/\+/g,"%20"))}function Lee(t){return"".concat(nU(t.path)).concat(function YGe(t){return Object.entries(t).map(([n,o])=>";".concat(nU(n),"=").concat(nU(o))).join("")}(t.parameters))}const XGe=/^[^\/()?;#]+/;function iU(t){const n=t.match(XGe);return n?n[0]:""}const e4e=/^[^\/()?;=#]+/,n4e=/^[^=?&#]+/,o4e=/^[^&#]+/;class s4e{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Cs([],{}):new Cs([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let o={};this.peekStartsWith("/(")&&(this.capture("/"),o=this.parseParens(!0));let e={};return this.peekStartsWith("(")&&(e=this.parseParens(!1)),(n.length>0||Object.keys(o).length>0)&&(e[oi]=new Cs(n,o)),e}parseSegment(){const n=iU(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new vt(4009,!1);return this.capture(n),new kS(Wx(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const o=function t4e(t){const n=t.match(e4e);return n?n[0]:""}(this.remaining);if(!o)return;this.capture(o);let e="";if(this.consumeOptional("=")){const i=iU(this.remaining);i&&(e=i,this.capture(e))}n[Wx(o)]=Wx(e)}parseQueryParam(n){const o=function i4e(t){const n=t.match(n4e);return n?n[0]:""}(this.remaining);if(!o)return;this.capture(o);let e="";if(this.consumeOptional("=")){const s=function r4e(t){const n=t.match(o4e);return n?n[0]:""}(this.remaining);s&&(e=s,this.capture(e))}const i=kee(o),r=kee(e);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(r)}else n[i]=r}parseParens(n){const o={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const e=iU(this.remaining),i=this.remaining[e.length];if("/"!==i&&")"!==i&&";"!==i)throw new vt(4010,!1);let r;e.indexOf(":")>-1?(r=e.slice(0,e.indexOf(":")),this.capture(r),this.capture(":")):n&&(r=oi);const s=this.parseChildren();o[r]=1===Object.keys(s).length?s[oi]:new Cs([],s),this.consumeOptional("//")}return o}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new vt(4011,!1)}}function Dee(t){return t.segments.length>0?new Cs([],{[oi]:t}):t}function Bee(t){const n={};for(const[e,i]of Object.entries(t.children)){const r=Bee(i);if(e===oi&&0===r.segments.length&&r.hasChildren())for(const[s,a]of Object.entries(r.children))n[s]=a;else(r.segments.length>0||r.hasChildren())&&(n[e]=r)}return function a4e(t){if(1===t.numberOfChildren&&t.children[oi]){const n=t.children[oi];return new Cs(t.segments.concat(n.segments),n.children)}return t}(new Cs(t.segments,n))}function DS(t){return t instanceof RS}function Nee(t){var n;let o;const r=Dee(function e(s){const a={};for(const u of s.children){const h=e(u);a[u.outlet]=h}const c=new Cs(s.url,a);return s===t&&(o=c),c}(t.root));return null!==(n=o)&&void 0!==n?n:r}function Fee(t,n,o,e){let i=t;for(;i.parent;)i=i.parent;if(0===n.length)return oU(i,i,i,o,e);const r=function l4e(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Gee(!0,0,t);let n=0,o=!1;const e=t.reduce((i,r,s)=>{if("object"==typeof r&&null!=r){if(r.outlets){const a={};return Object.entries(r.outlets).forEach(([c,u])=>{a[c]="string"==typeof u?u.split("/"):u}),[...i,{outlets:a}]}if(r.segmentPath)return[...i,r.segmentPath]}return"string"!=typeof r?[...i,r]:0===s?(r.split("/").forEach((a,c)=>{0==c&&"."===a||(0==c&&""===a?o=!0:".."===a?n++:""!=a&&i.push(a))}),i):[...i,r]},[]);return new Gee(o,n,e)}(n);if(r.toRoot())return oU(i,i,new Cs([],{}),o,e);const s=function u4e(t,n,o){if(t.isAbsolute)return new Kx(n,!0,0);if(!o)return new Kx(n,!1,NaN);if(null===o.parent)return new Kx(o,!0,0);const e=$x(t.commands[0])?0:1;return function d4e(t,n,o){let e=t,i=n,r=o;for(;r>i;){if(r-=i,e=e.parent,!e)throw new vt(4005,!1);i=e.segments.length}return new Kx(e,!1,i-r)}(o,o.segments.length-1+e,t.numberOfDoubleDots)}(r,i,t),a=s.processChildren?qT(s.segmentGroup,s.index,r.commands):Vee(s.segmentGroup,s.index,r.commands);return oU(i,s.segmentGroup,a,o,e)}function $x(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function HT(t){return"object"==typeof t&&null!=t&&t.outlets}function oU(t,n,o,e,i){let s,r={};e&&Object.entries(e).forEach(([c,u])=>{r[c]=Array.isArray(u)?u.map(h=>"".concat(h)):"".concat(u)}),s=t===n?o:Uee(t,n,o);const a=Dee(Bee(s));return new RS(a,r,i)}function Uee(t,n,o){const e={};return Object.entries(t.children).forEach(([i,r])=>{e[i]=r===n?o:Uee(r,n,o)}),new Cs(t.segments,e)}class Gee{constructor(n,o,e){if(this.isAbsolute=n,this.numberOfDoubleDots=o,this.commands=e,n&&e.length>0&&$x(e[0]))throw new vt(4003,!1);const i=e.find(HT);if(i&&i!==Iee(e))throw new vt(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Kx{constructor(n,o,e){this.segmentGroup=n,this.processChildren=o,this.index=e}}function Vee(t,n,o){var e;if(null!==(e=t)&&void 0!==e||(t=new Cs([],{})),0===t.segments.length&&t.hasChildren())return qT(t,n,o);const i=function h4e(t,n,o){let e=0,i=n;const r={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(e>=o.length)return r;const s=t.segments[i],a=o[e];if(HT(a))break;const c="".concat(a),u=e<o.length-1?o[e+1]:null;if(i>0&&void 0===c)break;if(c&&u&&"object"==typeof u&&void 0===u.outlets){if(!jee(c,u,s))return r;e+=2}else{if(!jee(c,{},s))return r;e++}i++}return{match:!0,pathIndex:i,commandIndex:e}}(t,n,o),r=o.slice(i.commandIndex);if(i.match&&i.pathIndex<t.segments.length){const s=new Cs(t.segments.slice(0,i.pathIndex),{});return s.children[oi]=new Cs(t.segments.slice(i.pathIndex),t.children),qT(s,0,r)}return i.match&&0===r.length?new Cs(t.segments,{}):i.match&&!t.hasChildren()?rU(t,n,o):i.match?qT(t,0,r):rU(t,n,o)}function qT(t,n,o){if(0===o.length)return new Cs(t.segments,{});{const e=function p4e(t){return HT(t[0])?t[0].outlets:{[oi]:t}}(o),i={};if(Object.keys(e).some(r=>r!==oi)&&t.children[oi]&&1===t.numberOfChildren&&0===t.children[oi].segments.length){const r=qT(t.children[oi],n,o);return new Cs(t.segments,r.children)}return Object.entries(e).forEach(([r,s])=>{"string"==typeof s&&(s=[s]),null!==s&&(i[r]=Vee(t.children[r],n,s))}),Object.entries(t.children).forEach(([r,s])=>{void 0===e[r]&&(i[r]=s)}),new Cs(t.segments,i)}}function rU(t,n,o){const e=t.segments.slice(0,n);let i=0;for(;i<o.length;){const r=o[i];if(HT(r)){const c=m4e(r.outlets);return new Cs(e,c)}if(0===i&&$x(o[0])){e.push(new kS(t.segments[n].path,zee(o[0]))),i++;continue}const s=HT(r)?r.outlets[oi]:"".concat(r),a=i<o.length-1?o[i+1]:null;s&&a&&$x(a)?(e.push(new kS(s,zee(a))),i+=2):(e.push(new kS(s,{})),i++)}return new Cs(e,{})}function m4e(t){const n={};return Object.entries(t).forEach(([o,e])=>{"string"==typeof e&&(e=[e]),null!==e&&(n[o]=rU(new Cs([],{}),0,e))}),n}function zee(t){const n={};return Object.entries(t).forEach(([o,e])=>n[o]="".concat(e)),n}function jee(t,n,o){return t==o.path&&ym(n,o.parameters)}const WT="imperative";var ar=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(ar||{});class Sm{constructor(n,o){this.id=n,this.url=o}}class fh extends Sm{constructor(n,o,e="imperative",i=null){super(n,o),this.type=ar.NavigationStart,this.navigationTrigger=e,this.restoredState=i}toString(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}class as extends Sm{constructor(n,o,e){super(n,o),this.urlAfterRedirects=e,this.type=ar.NavigationEnd}toString(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}var Pp=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(Pp||{}),Zx=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Zx||{});class lb extends Sm{constructor(n,o,e,i){super(n,o),this.reason=e,this.code=i,this.type=ar.NavigationCancel}toString(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}class BS extends Sm{constructor(n,o,e,i){super(n,o),this.reason=e,this.code=i,this.type=ar.NavigationSkipped}}class Qx extends Sm{constructor(n,o,e,i){super(n,o),this.error=e,this.target=i,this.type=ar.NavigationError}toString(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}class Hee extends Sm{constructor(n,o,e,i){super(n,o),this.urlAfterRedirects=e,this.state=i,this.type=ar.RoutesRecognized}toString(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}class f4e extends Sm{constructor(n,o,e,i){super(n,o),this.urlAfterRedirects=e,this.state=i,this.type=ar.GuardsCheckStart}toString(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}class sU extends Sm{constructor(n,o,e,i,r){super(n,o),this.urlAfterRedirects=e,this.state=i,this.shouldActivate=r,this.type=ar.GuardsCheckEnd}toString(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}class g4e extends Sm{constructor(n,o,e,i){super(n,o),this.urlAfterRedirects=e,this.state=i,this.type=ar.ResolveStart}toString(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}class _4e extends Sm{constructor(n,o,e,i){super(n,o),this.urlAfterRedirects=e,this.state=i,this.type=ar.ResolveEnd}toString(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}class v4e{constructor(n){this.route=n,this.type=ar.RouteConfigLoadStart}toString(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}class b4e{constructor(n){this.route=n,this.type=ar.RouteConfigLoadEnd}toString(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}class C4e{constructor(n){this.snapshot=n,this.type=ar.ChildActivationStart}toString(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}class y4e{constructor(n){this.snapshot=n,this.type=ar.ChildActivationEnd}toString(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}class S4e{constructor(n){this.snapshot=n,this.type=ar.ActivationStart}toString(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}class Yx{constructor(n){this.snapshot=n,this.type=ar.ActivationEnd}toString(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}class qee{constructor(n,o,e){this.routerEvent=n,this.position=o,this.anchor=e,this.type=ar.Scroll}toString(){const n=this.position?"".concat(this.position[0],", ").concat(this.position[1]):null;return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(n,"')")}}class aU{}class cU{constructor(n){this.url=n}}class w4e{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new $T,this.attachRef=null}}let $T=(()=>{var t;class n{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new w4e,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class Wee{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const o=this.pathFromRoot(n);return o.length>1?o[o.length-2]:null}children(n){const o=lU(n,this._root);return o?o.children.map(e=>e.value):[]}firstChild(n){const o=lU(n,this._root);return o&&o.children.length>0?o.children[0].value:null}siblings(n){const o=uU(n,this._root);return o.length<2?[]:o[o.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return uU(n,this._root).map(o=>o.value)}}function lU(t,n){if(t===n.value)return n;for(const o of n.children){const e=lU(t,o);if(e)return e}return null}function uU(t,n){if(t===n.value)return[n];for(const o of n.children){const e=uU(t,o);if(e.length)return e.unshift(n),e}return[]}class gh{constructor(n,o){this.value=n,this.children=o}toString(){return"TreeNode(".concat(this.value,")")}}function NS(t){const n={};return t&&t.children.forEach(o=>n[o.value.outlet]=o),n}class $ee extends Wee{constructor(n,o){super(n),this.snapshot=o,hU(this,n)}toString(){return this.snapshot.toString()}}function Kee(t){const n=function T4e(t){const r=new pU([],{},{},"",{},oi,t,null,{});return new Zee("",new gh(r,[]))}(t),o=new Qn([new kS("",{})]),e=new Qn({}),i=new Qn({}),r=new Qn({}),s=new Qn(""),a=new Po(o,e,r,s,i,oi,t,n.root);return a.snapshot=n.root,new $ee(new gh(a,[]),n)}class Po{constructor(n,o,e,i,r,s,a,c){var u,h;this.urlSubject=n,this.paramsSubject=o,this.queryParamsSubject=e,this.fragmentSubject=i,this.dataSubject=r,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=null!==(u=null===(h=this.dataSubject)||void 0===h?void 0:h.pipe(jn(b=>b[zT])))&&void 0!==u?u:Xn(void 0),this.url=n,this.params=o,this.queryParams=e,this.fragment=i,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){var n;return null!==(n=this._paramMap)&&void 0!==n||(this._paramMap=this.params.pipe(jn(o=>AS(o)))),this._paramMap}get queryParamMap(){var n;return null!==(n=this._queryParamMap)&&void 0!==n||(this._queryParamMap=this.queryParams.pipe(jn(o=>AS(o)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}}function dU(t,n,o="emptyOnly"){var e;let i;const{routeConfig:r}=t;var s;return i=null===n||"always"!==o&&""!==(null==r?void 0:r.path)&&(n.component||null!==(e=n.routeConfig)&&void 0!==e&&e.loadComponent)?{params:{...t.params},data:{...t.data},resolve:{...t.data,...null!==(s=t._resolvedData)&&void 0!==s?s:{}}}:{params:{...n.params,...t.params},data:{...n.data,...t.data},resolve:{...t.data,...n.data,...null==r?void 0:r.data,...t._resolvedData}},r&&Yee(r)&&(i.resolve[zT]=r.title),i}class pU{get title(){var n;return null===(n=this.data)||void 0===n?void 0:n[zT]}constructor(n,o,e,i,r,s,a,c,u){this.url=n,this.params=o,this.queryParams=e,this.fragment=i,this.data=r,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){var n;return null!==(n=this._paramMap)&&void 0!==n||(this._paramMap=AS(this.params)),this._paramMap}get queryParamMap(){var n;return null!==(n=this._queryParamMap)&&void 0!==n||(this._queryParamMap=AS(this.queryParams)),this._queryParamMap}toString(){const n=this.url.map(e=>e.toString()).join("/"),o=this.routeConfig?this.routeConfig.path:"";return"Route(url:'".concat(n,"', path:'").concat(o,"')")}}class Zee extends Wee{constructor(n,o){super(o),this.url=n,hU(this,o)}toString(){return Qee(this._root)}}function hU(t,n){n.value._routerState=t,n.children.forEach(o=>hU(t,o))}function Qee(t){const n=t.children.length>0?" { ".concat(t.children.map(Qee).join(", ")," } "):"";return"".concat(t.value).concat(n)}function mU(t){if(t.snapshot){const n=t.snapshot,o=t._futureSnapshot;t.snapshot=o,ym(n.queryParams,o.queryParams)||t.queryParamsSubject.next(o.queryParams),n.fragment!==o.fragment&&t.fragmentSubject.next(o.fragment),ym(n.params,o.params)||t.paramsSubject.next(o.params),function jGe(t,n){if(t.length!==n.length)return!1;for(let o=0;o<t.length;++o)if(!ym(t[o],n[o]))return!1;return!0}(n.url,o.url)||t.urlSubject.next(o.url),ym(n.data,o.data)||t.dataSubject.next(o.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function fU(t,n){const o=ym(t.params,n.params)&&function $Ge(t,n){return cb(t,n)&&t.every((o,e)=>ym(o.parameters,n[e].parameters))}(t.url,n.url);return o&&!(!t.parent!=!n.parent)&&(!t.parent||fU(t.parent,n.parent))}function Yee(t){return"string"==typeof t.title||null===t.title}let Ip=(()=>{var t;class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=oi,this.activateEvents=new ke,this.deactivateEvents=new ke,this.attachEvents=new ke,this.detachEvents=new ke,this.parentContexts=mt($T),this.location=mt(bs),this.changeDetector=mt(Re),this.environmentInjector=mt(Id),this.inputBinder=mt(Jx,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){var e;this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),null===(e=this.inputBinder)||void 0===e||e.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){var i;return(null===(i=this.parentContexts.getContext(e))||void 0===i?void 0:i.outlet)===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);null!=e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new vt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new vt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new vt(4012,!1);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){var r;this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),null===(r=this.inputBinder)||void 0===r||r.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){var r;if(this.isActivated)throw new vt(4013,!1);this._activatedRoute=e;const s=this.location,c=e.snapshot.component,u=this.parentContexts.getOrCreateContext(this.name).children,h=new P4e(e,u,s.injector);this.activated=s.createComponent(c,{index:s.length,injector:h,environmentInjector:null!=i?i:this.environmentInjector}),this.changeDetector.markForCheck(),null===(r=this.inputBinder)||void 0===r||r.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275dir=qn({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[it]}),n})();class P4e{constructor(n,o,e){this.route=n,this.childContexts=o,this.parent=e}get(n,o){return n===Po?this.route:n===$T?this.childContexts:this.parent.get(n,o)}}const Jx=new Ot("");let Jee=(()=>{var t;class n{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){var i;null===(i=this.outletDataSubscriptions.get(e))||void 0===i||i.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){const{activatedRoute:i}=e,r=wp([i.queryParams,i.params,i.data]).pipe(es(([s,a,c],u)=>(c={...s,...a,...c},0===u?Xn(c):Promise.resolve(c)))).subscribe(s=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||null===i.component)return void this.unsubscribeFromRouteData(e);const a=function MFe(t){const n=xo(t);if(!n)return null;const o=new dT(n);return{get selector(){return o.selector},get type(){return o.componentType},get inputs(){return o.inputs},get outputs(){return o.outputs},get ngContentSelectors(){return o.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}(i.component);if(a)for(const{templateName:c}of a.inputs)e.activatedComponentRef.setInput(c,s[c]);else this.unsubscribeFromRouteData(e)});this.outletDataSubscriptions.set(e,r)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function KT(t,n,o){if(o&&t.shouldReuseRoute(n.value,o.value.snapshot)){const e=o.value;e._futureSnapshot=n.value;const i=function M4e(t,n,o){return n.children.map(e=>{for(const i of o.children)if(t.shouldReuseRoute(e.value,i.value.snapshot))return KT(t,e,i);return KT(t,e)})}(t,n,o);return new gh(e,i)}{if(t.shouldAttach(n.value)){const r=t.retrieve(n.value);if(null!==r){const s=r.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>KT(t,a)),s}}const e=function O4e(t){return new Po(new Qn(t.url),new Qn(t.params),new Qn(t.queryParams),new Qn(t.fragment),new Qn(t.data),t.outlet,t.component,t)}(n.value),i=n.children.map(r=>KT(t,r));return new gh(e,i)}}const Xee="ngNavigationCancelingError";function ete(t,n){const{redirectTo:o,navigationBehaviorOptions:e}=DS(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=tte(!1,Pp.Redirect);return i.url=o,i.navigationBehaviorOptions=e,i}function tte(t,n){const o=new Error("NavigationCancelingError: ".concat(t||""));return o[Xee]=!0,o.cancellationCode=n,o}function nte(t){return!!t&&t[Xee]}let ite=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],standalone:!0,features:[HY],decls:1,vars:0,template:function(e,i){1&e&&B(0,"router-outlet")},dependencies:[Ip],encapsulation:2}),n})();function gU(t){const n=t.children&&t.children.map(gU),o=n?{...t,children:n}:{...t};return!o.component&&!o.loadComponent&&(n||o.loadChildren)&&o.outlet&&o.outlet!==oi&&(o.component=ite),o}function wm(t){return t.outlet||oi}function ZT(t){var n;if(!t)return null;if(null!==(n=t.routeConfig)&&void 0!==n&&n._injector)return t.routeConfig._injector;for(let o=t.parent;o;o=o.parent){const e=o.routeConfig;if(null!=e&&e._loadedInjector)return e._loadedInjector;if(null!=e&&e._injector)return e._injector}return null}class B4e{constructor(n,o,e,i,r){this.routeReuseStrategy=n,this.futureState=o,this.currState=e,this.forwardEvent=i,this.inputBindingEnabled=r}activate(n){const o=this.futureState._root,e=this.currState?this.currState._root:null;this.deactivateChildRoutes(o,e,n),mU(this.futureState.root),this.activateChildRoutes(o,e,n)}deactivateChildRoutes(n,o,e){const i=NS(o);n.children.forEach(r=>{const s=r.value.outlet;this.deactivateRoutes(r,i[s],e),delete i[s]}),Object.values(i).forEach(r=>{this.deactivateRouteAndItsChildren(r,e)})}deactivateRoutes(n,o,e){const i=n.value,r=o?o.value:null;if(i===r)if(i.component){const s=e.getContext(i.outlet);s&&this.deactivateChildRoutes(n,o,s.children)}else this.deactivateChildRoutes(n,o,e);else r&&this.deactivateRouteAndItsChildren(o,e)}deactivateRouteAndItsChildren(n,o){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,o):this.deactivateRouteAndOutlet(n,o)}detachAndStoreRouteSubtree(n,o){const e=o.getContext(n.value.outlet),i=e&&n.value.component?e.children:o,r=NS(n);for(const s of Object.values(r))this.deactivateRouteAndItsChildren(s,i);if(e&&e.outlet){const s=e.outlet.detach(),a=e.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,o){const e=o.getContext(n.value.outlet),i=e&&n.value.component?e.children:o,r=NS(n);for(const s of Object.values(r))this.deactivateRouteAndItsChildren(s,i);e&&(e.outlet&&(e.outlet.deactivate(),e.children.onOutletDeactivated()),e.attachRef=null,e.route=null)}activateChildRoutes(n,o,e){const i=NS(o);n.children.forEach(r=>{this.activateRoutes(r,i[r.value.outlet],e),this.forwardEvent(new Yx(r.value.snapshot))}),n.children.length&&this.forwardEvent(new y4e(n.value.snapshot))}activateRoutes(n,o,e){const i=n.value,r=o?o.value:null;if(mU(i),i===r)if(i.component){const s=e.getOrCreateContext(i.outlet);this.activateChildRoutes(n,o,s.children)}else this.activateChildRoutes(n,o,e);else if(i.component){const s=e.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),mU(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=ZT(i.snapshot);s.attachRef=null,s.route=i,s.injector=a,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,e)}}class ote{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class Xx{constructor(n,o){this.component=n,this.route=o}}function N4e(t,n,o){const e=t._root;return QT(e,n?n._root:null,o,[e.value])}function FS(t,n){const o=Symbol(),e=n.get(t,o);return e===o?"function"!=typeof t||function AEe(t){return null!==ZO(t)}(t)?n.get(t):t:e}function QT(t,n,o,e,i={canDeactivateChecks:[],canActivateChecks:[]}){const r=NS(n);return t.children.forEach(s=>{(function U4e(t,n,o,e,i={canDeactivateChecks:[],canActivateChecks:[]}){const r=t.value,s=n?n.value:null,a=o?o.getContext(t.value.outlet):null;if(s&&r.routeConfig===s.routeConfig){const c=function G4e(t,n,o){if("function"==typeof o)return o(t,n);switch(o){case"pathParamsChange":return!cb(t.url,n.url);case"pathParamsOrQueryParamsChange":return!cb(t.url,n.url)||!ym(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!fU(t,n)||!ym(t.queryParams,n.queryParams);default:return!fU(t,n)}}(s,r,r.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new ote(e)):(r.data=s.data,r._resolvedData=s._resolvedData),QT(t,n,r.component?a?a.children:null:o,e,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Xx(a.outlet.component,s))}else s&&YT(n,a,i),i.canActivateChecks.push(new ote(e)),QT(t,null,r.component?a?a.children:null:o,e,i)})(s,r[s.value.outlet],o,e.concat([s.value]),i),delete r[s.value.outlet]}),Object.entries(r).forEach(([s,a])=>YT(a,o.getContext(s),i)),i}function YT(t,n,o){const e=NS(t),i=t.value;Object.entries(e).forEach(([r,s])=>{YT(s,i.component?n?n.children.getContext(r):null:n,o)}),o.canDeactivateChecks.push(new Xx(i.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,i))}function JT(t){return"function"==typeof t}function rte(t){return t instanceof Gx||"EmptyError"===(null==t?void 0:t.name)}const eA=Symbol("INITIAL_VALUE");function US(){return es(t=>wp(t.map(n=>n.pipe(Qi(1),VT(eA)))).pipe(jn(n=>{for(const o of n)if(!0!==o){if(o===eA)return eA;if(!1===o||o instanceof RS)return o}return!0}),bt(n=>n!==eA),Qi(1)))}function ste(t){return function dp(...t){return pp(t)}(Da(n=>{if(DS(n))throw ete(0,n)}),jn(n=>!0===n))}class _U{constructor(n){this.segmentGroup=n||null}}class vU extends Error{constructor(n){super(),this.urlTree=n}}function GS(t){return Wf(new _U(t))}class r5e{constructor(n,o){this.urlSerializer=n,this.urlTree=o}lineralizeSegments(n,o){let e=[],i=o.root;for(;;){if(e=e.concat(i.segments),0===i.numberOfChildren)return Xn(e);if(i.numberOfChildren>1||!i.children[oi])return Wf(new vt(4e3,!1));i=i.children[oi]}}applyRedirectCommands(n,o,e){const i=this.applyRedirectCreateUrlTree(o,this.urlSerializer.parse(o),n,e);if(o.startsWith("/"))throw new vU(i);return i}applyRedirectCreateUrlTree(n,o,e,i){const r=this.createSegmentGroup(n,o.root,e,i);return new RS(r,this.createQueryParams(o.queryParams,this.urlTree.queryParams),o.fragment)}createQueryParams(n,o){const e={};return Object.entries(n).forEach(([i,r])=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);e[i]=o[a]}else e[i]=r}),e}createSegmentGroup(n,o,e,i){const r=this.createSegments(n,o.segments,e,i);let s={};return Object.entries(o.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,e,i)}),new Cs(r,s)}createSegments(n,o,e,i){return o.map(r=>r.path.startsWith(":")?this.findPosParam(n,r,i):this.findOrReturn(r,e))}findPosParam(n,o,e){const i=e[o.path.substring(1)];if(!i)throw new vt(4001,!1);return i}findOrReturn(n,o){let e=0;for(const i of o){if(i.path===n.path)return o.splice(e),i;e++}return n}}const bU={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function s5e(t,n,o,e,i){const r=CU(t,n,o);return r.matched?(e=function x4e(t,n){var o;return t.providers&&!t._injector&&(t._injector=SF(t.providers,n,"Route: ".concat(t.path))),null!==(o=t._injector)&&void 0!==o?o:n}(n,e),function n5e(t,n,o,e){const i=n.canMatch;return i&&0!==i.length?Xn(i.map(s=>{const a=FS(s,t);return __(function W4e(t){return t&&JT(t.canMatch)}(a)?a.canMatch(n,o):i_(t,()=>a(n,o)))})).pipe(US(),ste()):Xn(!0)}(e,n,o).pipe(jn(s=>!0===s?r:{...bU}))):Xn(r)}function CU(t,n,o){var e,i;if("**"===n.path)return function a5e(t){return{matched:!0,parameters:t.length>0?Iee(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}(o);if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||o.length>0)?{...bU}:{matched:!0,consumedSegments:[],remainingSegments:o,parameters:{},positionalParamSegments:{}};const s=(n.matcher||zGe)(o,t,n);if(!s)return{...bU};const a={};Object.entries(null!==(e=s.posParams)&&void 0!==e?e:{}).forEach(([u,h])=>{a[u]=h.path});const c=s.consumed.length>0?{...a,...s.consumed[s.consumed.length-1].parameters}:a;return{matched:!0,consumedSegments:s.consumed,remainingSegments:o.slice(s.consumed.length),parameters:c,positionalParamSegments:null!==(i=s.posParams)&&void 0!==i?i:{}}}function ate(t,n,o,e){return o.length>0&&function u5e(t,n,o){return o.some(e=>tA(t,n,e)&&wm(e)!==oi)}(t,o,e)?{segmentGroup:new Cs(n,l5e(e,new Cs(o,t.children))),slicedSegments:[]}:0===o.length&&function d5e(t,n,o){return o.some(e=>tA(t,n,e))}(t,o,e)?{segmentGroup:new Cs(t.segments,c5e(t,o,e,t.children)),slicedSegments:o}:{segmentGroup:new Cs(t.segments,t.children),slicedSegments:o}}function c5e(t,n,o,e){const i={};for(const r of o)if(tA(t,n,r)&&!e[wm(r)]){const s=new Cs([],{});i[wm(r)]=s}return{...e,...i}}function l5e(t,n){const o={};o[oi]=n;for(const e of t)if(""===e.path&&wm(e)!==oi){const i=new Cs([],{});o[wm(e)]=i}return o}function tA(t,n,o){return(!(t.hasChildren()||n.length>0)||"full"!==o.pathMatch)&&""===o.path}class m5e{}class _5e{constructor(n,o,e,i,r,s,a){this.injector=n,this.configLoader=o,this.rootComponentType=e,this.config=i,this.urlTree=r,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new r5e(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(n){return new vt(4002,"'".concat(n.segmentGroup,"'"))}recognize(){const n=ate(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(jn(o=>{const e=new pU([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},oi,this.rootComponentType,null,{}),i=new gh(e,o),r=new Zee("",i),s=function c4e(t,n,o=null,e=null){return Fee(Nee(t),n,o,e)}(e,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(s),this.inheritParamsAndData(r._root,null),{state:r,tree:s}}))}match(n){return this.processSegmentGroup(this.injector,this.config,n,oi).pipe(mh(e=>{if(e instanceof vU)return this.urlTree=e.urlTree,this.match(e.urlTree.root);throw e instanceof _U?this.noMatchError(e):e}))}inheritParamsAndData(n,o){const e=n.value,i=dU(e,o,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r,e))}processSegmentGroup(n,o,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(n,o,e):this.processSegment(n,o,e,e.segments,i,!0).pipe(jn(r=>r instanceof gh?[r]:[]))}processChildren(n,o,e){const i=[];for(const r of Object.keys(e.children))"primary"===r?i.unshift(r):i.push(r);return Ks(i).pipe(ab(r=>{const s=e.children[r],a=function L4e(t,n){const o=t.filter(e=>wm(e)===n);return o.push(...t.filter(e=>wm(e)!==n)),o}(o,r);return this.processSegmentGroup(n,a,s,r)}),zx((r,s)=>(r.push(...s),r)),Vx(null),function GGe(t,n){const o=arguments.length>=2;return e=>e.pipe(t?bt((i,r)=>t(i,r,e)):ka,X3(1),o?Vx(n):wee(()=>new Gx))}(),Yc(r=>{if(null===r)return GS(e);const s=cte(r);return function v5e(t){t.sort((n,o)=>n.value.outlet===oi?-1:o.value.outlet===oi?1:n.value.outlet.localeCompare(o.value.outlet))}(s),Xn(s)}))}processSegment(n,o,e,i,r,s){return Ks(o).pipe(ab(a=>{var c;return this.processSegmentAgainstRoute(null!==(c=a._injector)&&void 0!==c?c:n,o,a,e,i,r,s).pipe(mh(u=>{if(u instanceof _U)return Xn(null);throw u}))}),$u(a=>!!a),mh(a=>{if(rte(a))return function h5e(t,n,o){return 0===n.length&&!t.children[o]}(e,i,r)?Xn(new m5e):GS(e);throw a}))}processSegmentAgainstRoute(n,o,e,i,r,s,a){return function p5e(t,n,o,e){return!!(wm(t)===e||e!==oi&&tA(n,o,t))&&CU(n,t,o).matched}(e,i,r,s)?void 0===e.redirectTo?this.matchSegmentAgainstRoute(n,i,e,r,s):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,o,e,r,s):GS(i):GS(i)}expandSegmentAgainstRouteUsingRedirect(n,o,e,i,r,s){const{matched:a,consumedSegments:c,positionalParamSegments:u,remainingSegments:h}=CU(o,i,r);if(!a)return GS(o);i.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const b=this.applyRedirects.applyRedirectCommands(c,i.redirectTo,u);return this.applyRedirects.lineralizeSegments(i,b).pipe(Yc(w=>this.processSegment(n,e,o,w.concat(h),s,!1)))}matchSegmentAgainstRoute(n,o,e,i,r){const s=s5e(o,e,i,n);return"**"===e.path&&(o.children={}),s.pipe(es(a=>{var c;return a.matched?(n=null!==(c=e._injector)&&void 0!==c?c:n,this.getChildConfig(n,e,i).pipe(es(({routes:u})=>{var h,b,w;const R=null!==(h=e._loadedInjector)&&void 0!==h?h:n,{consumedSegments:G,remainingSegments:K,parameters:te}=a,ee=new pU(G,te,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function C5e(t){return t.data||{}}(e),wm(e),null!==(b=null!==(w=e.component)&&void 0!==w?w:e._loadedComponent)&&void 0!==b?b:null,e,function y5e(t){return t.resolve||{}}(e)),{segmentGroup:le,slicedSegments:me}=ate(o,G,K,u);if(0===me.length&&le.hasChildren())return this.processChildren(R,u,le).pipe(jn(Me=>null===Me?null:new gh(ee,Me)));if(0===u.length&&0===me.length)return Xn(new gh(ee,[]));const ge=wm(e)===r;return this.processSegment(R,u,le,me,ge?oi:r,!0).pipe(jn(Me=>new gh(ee,Me instanceof gh?[Me]:[])))}))):GS(o)}))}getChildConfig(n,o,e){return o.children?Xn({routes:o.children,injector:n}):o.loadChildren?void 0!==o._loadedRoutes?Xn({routes:o._loadedRoutes,injector:o._loadedInjector}):function t5e(t,n,o,e){const i=n.canLoad;return void 0===i||0===i.length?Xn(!0):Xn(i.map(s=>{const a=FS(s,t);return __(function z4e(t){return t&&JT(t.canLoad)}(a)?a.canLoad(n,o):i_(t,()=>a(n,o)))})).pipe(US(),ste())}(n,o,e).pipe(Yc(i=>i?this.configLoader.loadChildren(n,o).pipe(Da(r=>{o._loadedRoutes=r.routes,o._loadedInjector=r.injector})):function o5e(t){return Wf(tte(!1,Pp.GuardRejected))}())):Xn({routes:[],injector:n})}}function b5e(t){const n=t.value.routeConfig;return n&&""===n.path}function cte(t){const n=[],o=new Set;for(const e of t){if(!b5e(e)){n.push(e);continue}const i=n.find(r=>e.value.routeConfig===r.value.routeConfig);void 0!==i?(i.children.push(...e.children),o.add(i)):n.push(e)}for(const e of o){const i=cte(e.children);n.push(new gh(e.value,i))}return n.filter(e=>!o.has(e))}function lte(t){const n=t.children.map(o=>lte(o)).flat();return[t,...n]}function yU(t){return es(n=>{const o=t(n);return o?Ks(o).pipe(jn(()=>n)):Xn(n)})}let ute=(()=>{var t;class n{buildTitle(e){let i,r=e.root;for(;void 0!==r;){var s;i=null!==(s=this.getResolvedTitleForRoute(r))&&void 0!==s?s:i,r=r.children.find(a=>a.outlet===oi)}return i}getResolvedTitleForRoute(e){return e.data[zT]}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>mt(M5e),providedIn:"root"}),n})(),M5e=(()=>{var t;class n extends ute{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(XX))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const VS=new Ot("",{providedIn:"root",factory:()=>({})}),zS=new Ot("");let SU=(()=>{var t;class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=mt(xJ)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return Xn(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=__(e.loadComponent()).pipe(jn(dte),Da(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),g_(()=>{this.componentLoaders.delete(e)})),r=new See(i,()=>new sn).pipe(J3());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Xn({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const s=function O5e(t,n,o,e){return __(t.loadChildren()).pipe(jn(dte),Yc(i=>i instanceof GZ||Array.isArray(i)?Xn(i):Ks(n.compileModuleAsync(i))),jn(i=>{e&&e(t);let r,s,a=!1;return Array.isArray(i)?(s=i,!0):(r=i.create(o).injector,s=r.get(zS,[],{optional:!0,self:!0}).flat()),{routes:s.map(gU),injector:r}}))}(i,this.compiler,e,this.onLoadEndListener).pipe(g_(()=>{this.childrenLoaders.delete(i)})),a=new See(s,()=>new sn).pipe(J3());return this.childrenLoaders.set(i,a),a}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function dte(t){return function E5e(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let wU=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>mt(x5e),providedIn:"root"}),n})(),x5e=(()=>{var t;class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const pte=new Ot(""),hte=new Ot("");function A5e(t,n,o){const e=t.get(hte),i=t.get(La);return t.get(an).runOutsideAngular(()=>{if(!i.startViewTransition||e.skipNextTransition)return e.skipNextTransition=!1,Promise.resolve();let r;const s=new Promise(u=>{r=u}),a=i.startViewTransition(()=>(r(),function R5e(t){return new Promise(n=>{rZ(n,{injector:t})})}(t))),{onViewTransitionCreated:c}=e;return c&&i_(t,()=>c({transition:a,from:n,to:o})),s})}let nA=(()=>{var t;class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new sn,this.transitionAbortSubject=new sn,this.configLoader=mt(SU),this.environmentInjector=mt(Id),this.urlSerializer=mt(LS),this.rootContexts=mt($T),this.location=mt(Rs),this.inputBindingEnabled=null!==mt(Jx,{optional:!0}),this.titleStrategy=mt(ute),this.options=mt(VS,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=mt(wU),this.createViewTransition=mt(pte,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Xn(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new b4e(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new v4e(r))}complete(){var e;null===(e=this.transitions)||void 0===e||e.complete()}handleNavigationRequest(e){var i;const r=++this.navigationId;null===(i=this.transitions)||void 0===i||i.next({...this.transitions.value,...e,id:r})}setupNavigations(e,i,r){return this.transitions=new Qn({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:WT,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(bt(s=>0!==s.id),jn(s=>({...s,extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),es(s=>{this.currentTransition=s;let a=!1,c=!1;return Xn(s).pipe(Da(u=>{this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),es(u=>{var h;const b=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),w=null!==(h=u.extras.onSameUrlNavigation)&&void 0!==h?h:e.onSameUrlNavigation;if(!b&&"reload"!==w){const R="";return this.events.next(new BS(u.id,this.urlSerializer.serialize(u.rawUrl),R,Zx.IgnoredSameUrlNavigation)),u.resolve(null),Tp}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return Xn(u).pipe(es(R=>{var G,K;const te=null===(G=this.transitions)||void 0===G?void 0:G.getValue();return this.events.next(new fh(R.id,this.urlSerializer.serialize(R.extractedUrl),R.source,R.restoredState)),te!==(null===(K=this.transitions)||void 0===K?void 0:K.getValue())?Tp:Promise.resolve(R)}),function S5e(t,n,o,e,i,r){return Yc(s=>function f5e(t,n,o,e,i,r,s="emptyOnly"){return new _5e(t,n,o,e,i,s,r).recognize()}(t,n,o,e,s.extractedUrl,i,r).pipe(jn(({state:a,tree:c})=>({...s,targetSnapshot:a,urlAfterRedirects:c}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),Da(R=>{s.targetSnapshot=R.targetSnapshot,s.urlAfterRedirects=R.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:R.urlAfterRedirects};const G=new Hee(R.id,this.urlSerializer.serialize(R.extractedUrl),this.urlSerializer.serialize(R.urlAfterRedirects),R.targetSnapshot);this.events.next(G)}));if(b&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){const{id:R,extractedUrl:G,source:K,restoredState:te,extras:ee}=u,le=new fh(R,this.urlSerializer.serialize(G),K,te);this.events.next(le);const me=Kee(this.rootComponentType).snapshot;return this.currentTransition=s={...u,targetSnapshot:me,urlAfterRedirects:G,extras:{...ee,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=G,Xn(s)}{const R="";return this.events.next(new BS(u.id,this.urlSerializer.serialize(u.extractedUrl),R,Zx.IgnoredByUrlHandlingStrategy)),u.resolve(null),Tp}}),Da(u=>{const h=new f4e(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}),jn(u=>(this.currentTransition=s={...u,guards:N4e(u.targetSnapshot,u.currentSnapshot,this.rootContexts)},s)),function $4e(t,n){return Yc(o=>{const{targetSnapshot:e,currentSnapshot:i,guards:{canActivateChecks:r,canDeactivateChecks:s}}=o;return 0===s.length&&0===r.length?Xn({...o,guardsResult:!0}):function K4e(t,n,o,e){return Ks(t).pipe(Yc(i=>function e5e(t,n,o,e,i){const r=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return r&&0!==r.length?Xn(r.map(a=>{var c;const u=null!==(c=ZT(n))&&void 0!==c?c:i,h=FS(a,u);return __(function q4e(t){return t&&JT(t.canDeactivate)}(h)?h.canDeactivate(t,n,o,e):i_(u,()=>h(t,n,o,e))).pipe($u())})).pipe(US()):Xn(!0)}(i.component,i.route,o,n,e)),$u(i=>!0!==i,!0))}(s,e,i,t).pipe(Yc(a=>a&&function V4e(t){return"boolean"==typeof t}(a)?function Z4e(t,n,o,e){return Ks(n).pipe(ab(i=>m_(function Y4e(t,n){return null!==t&&n&&n(new C4e(t)),Xn(!0)}(i.route.parent,e),function Q4e(t,n){return null!==t&&n&&n(new S4e(t)),Xn(!0)}(i.route,e),function X4e(t,n,o){const e=n[n.length-1],r=n.slice(0,n.length-1).reverse().map(s=>function F4e(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>f_(()=>Xn(s.guards.map(c=>{var u;const h=null!==(u=ZT(s.node))&&void 0!==u?u:o,b=FS(c,h);return __(function H4e(t){return t&&JT(t.canActivateChild)}(b)?b.canActivateChild(e,t):i_(h,()=>b(e,t))).pipe($u())})).pipe(US())));return Xn(r).pipe(US())}(t,i.path,o),function J4e(t,n,o){const e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||0===e.length)return Xn(!0);const i=e.map(r=>f_(()=>{var s;const a=null!==(s=ZT(n))&&void 0!==s?s:o,c=FS(r,a);return __(function j4e(t){return t&&JT(t.canActivate)}(c)?c.canActivate(n,t):i_(a,()=>c(n,t))).pipe($u())}));return Xn(i).pipe(US())}(t,i.route,o))),$u(i=>!0!==i,!0))}(e,r,t,n):Xn(a)),jn(a=>({...o,guardsResult:a})))})}(this.environmentInjector,u=>this.events.next(u)),Da(u=>{if(s.guardsResult=u.guardsResult,DS(u.guardsResult))throw ete(0,u.guardsResult);const h=new sU(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(h)}),bt(u=>!!u.guardsResult||(this.cancelNavigationTransition(u,"",Pp.GuardRejected),!1)),yU(u=>{if(u.guards.canActivateChecks.length)return Xn(u).pipe(Da(h=>{const b=new g4e(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(b)}),es(h=>{let b=!1;return Xn(h).pipe(function w5e(t,n){return Yc(o=>{const{targetSnapshot:e,guards:{canActivateChecks:i}}=o;if(!i.length)return Xn(o);const r=new Set(i.map(c=>c.route)),s=new Set;for(const c of r)if(!s.has(c))for(const u of lte(c))s.add(u);let a=0;return Ks(s).pipe(ab(c=>r.has(c)?function T5e(t,n,o,e){const i=t.routeConfig,r=t._resolve;return void 0!==(null==i?void 0:i.title)&&!Yee(i)&&(r[zT]=i.title),function P5e(t,n,o,e){const i=eU(t);if(0===i.length)return Xn({});const r={};return Ks(i).pipe(Yc(s=>function I5e(t,n,o,e){var i;const r=null!==(i=ZT(n))&&void 0!==i?i:e,s=FS(t,r);return __(s.resolve?s.resolve(n,o):i_(r,()=>s(n,o)))}(t[s],n,o,e).pipe($u(),Da(a=>{r[s]=a}))),X3(1),Tee(r),mh(s=>rte(s)?Tp:Wf(s)))}(r,t,n,e).pipe(jn(s=>(t._resolvedData=s,t.data=dU(t,t.parent,o).resolve,null)))}(c,e,t,n):(c.data=dU(c,c.parent,t).resolve,Xn(void 0))),Da(()=>a++),X3(1),Yc(c=>a===s.size?Xn(o):Tp))})}(this.paramsInheritanceStrategy,this.environmentInjector),Da({next:()=>b=!0,complete:()=>{b||this.cancelNavigationTransition(h,"",Pp.NoDataFromResolver)}}))}),Da(h=>{const b=new _4e(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(b)}))}),yU(u=>{const h=b=>{var w;const R=[];null!==(w=b.routeConfig)&&void 0!==w&&w.loadComponent&&!b.routeConfig._loadedComponent&&R.push(this.configLoader.loadComponent(b.routeConfig).pipe(Da(G=>{b.component=G}),jn(()=>{})));for(const G of b.children)R.push(...h(G));return R};return wp(h(u.targetSnapshot.root)).pipe(Vx(null),Qi(1))}),yU(()=>this.afterPreactivation()),es(()=>{var u;const{currentSnapshot:h,targetSnapshot:b}=s,w=null===(u=this.createViewTransition)||void 0===u?void 0:u.call(this,this.environmentInjector,h.root,b.root);return w?Ks(w).pipe(jn(()=>s)):Xn(s)}),jn(u=>{const h=function I4e(t,n,o){const e=KT(t,n._root,o?o._root:void 0);return new $ee(e,n)}(e.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=s={...u,targetRouterState:h},this.currentNavigation.targetRouterState=h,s}),Da(()=>{this.events.next(new aU)}),((t,n,o,e)=>jn(i=>(new B4e(n,i.targetRouterState,i.currentRouterState,o,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),Qi(1),Da({next:u=>{var h;a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new as(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),null===(h=this.titleStrategy)||void 0===h||h.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{a=!0}}),wn(this.transitionAbortSubject.pipe(Da(u=>{throw u}))),g_(()=>{var u;a||c||this.cancelNavigationTransition(s,"",Pp.SupersededByNewNavigation),(null===(u=this.currentNavigation)||void 0===u?void 0:u.id)===s.id&&(this.currentNavigation=null)}),mh(u=>{if(c=!0,nte(u))this.events.next(new lb(s.id,this.urlSerializer.serialize(s.extractedUrl),u.message,u.cancellationCode)),function E4e(t){return nte(t)&&DS(t.url)}(u)?this.events.next(new cU(u.url)):s.resolve(!1);else{var h;this.events.next(new Qx(s.id,this.urlSerializer.serialize(s.extractedUrl),u,null!==(h=s.targetSnapshot)&&void 0!==h?h:void 0));try{s.resolve(e.errorHandler(u))}catch(b){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(b)}}return Tp}))}))}cancelNavigationTransition(e,i,r){const s=new lb(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(s),e.resolve(!1)}isUpdatingInternalState(){var e,i;return(null===(e=this.currentTransition)||void 0===e?void 0:e.extractedUrl.toString())!==(null===(i=this.currentTransition)||void 0===i?void 0:i.currentUrlTree.toString())}isUpdatedBrowserUrl(){var e,i;return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==(null===(e=this.currentTransition)||void 0===e?void 0:e.extractedUrl.toString())&&!(null!==(i=this.currentTransition)&&void 0!==i&&i.extras.skipLocationChange)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function k5e(t){return t!==WT}let L5e=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>mt(B5e),providedIn:"root"}),n})();class D5e{shouldDetach(n){return!1}store(n,o){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,o){return n.routeConfig===o.routeConfig}}let B5e=(()=>{var t;class n extends D5e{}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),mte=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>mt(N5e),providedIn:"root"}),n})(),N5e=(()=>{var t;class n extends mte{constructor(){super(...arguments),this.location=mt(Rs),this.urlSerializer=mt(LS),this.options=mt(VS,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=mt(wU),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new RS,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Kee(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){var e,i;return"computed"!==this.canceledNavigationResolution?this.currentPageId:null!==(e=null===(i=this.restoredState())||void 0===i?void 0:i.\u0275routerPageId)&&void 0!==e?e:this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(i=>{"popstate"===i.type&&e(i.url,i.state)})}handleRouterEvent(e,i){if(e instanceof fh)this.stateMemento=this.createStateMemento();else if(e instanceof BS)this.rawUrlTree=i.initialUrl;else if(e instanceof Hee){if("eager"===this.urlUpdateStrategy&&!i.extras.skipLocationChange){const r=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(r,i)}}else e instanceof aU?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,"deferred"===this.urlUpdateStrategy&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):e instanceof lb&&(e.code===Pp.GuardRejected||e.code===Pp.NoDataFromResolver)?this.restoreHistory(i):e instanceof Qx?this.restoreHistory(i,!0):e instanceof as&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const a={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",a)}else{const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId+1)};this.location.go(r,"",s)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-this.browserPageId;0!==s?this.location.historyGo(s):this.currentUrlTree===e.finalUrl&&0===s&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){var i;this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,null!==(i=e.finalUrl)&&void 0!==i?i:this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var XT=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(XT||{});function fte(t,n){t.events.pipe(bt(o=>o instanceof as||o instanceof lb||o instanceof Qx||o instanceof BS),jn(o=>o instanceof as||o instanceof BS?XT.COMPLETE:o instanceof lb&&(o.code===Pp.Redirect||o.code===Pp.SupersededByNewNavigation)?XT.REDIRECTING:XT.FAILED),bt(o=>o!==XT.REDIRECTING),Qi(1)).subscribe(()=>{n()})}function F5e(t){throw t}const U5e={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},G5e={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let on=(()=>{var t;class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){var e,i;this.disposed=!1,this.isNgZoneEnabled=!1,this.console=mt(CJ),this.stateManager=mt(mte),this.options=mt(VS,{optional:!0})||{},this.pendingTasks=mt(Jv),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=mt(nA),this.urlSerializer=mt(LS),this.location=mt(Rs),this.urlHandlingStrategy=mt(wU),this._events=new sn,this.errorHandler=this.options.errorHandler||F5e,this.navigated=!1,this.routeReuseStrategy=mt(L5e),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=null!==(e=null===(i=mt(zS,{optional:!0}))||void 0===i?void 0:i.flat())&&void 0!==e?e:[],this.componentInputBindingEnabled=!!mt(Jx,{optional:!0}),this.eventsSubscription=new zt,this.isNgZoneEnabled=mt(an)instanceof an&&an.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:r=>{this.console.warn(r)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const e=this.navigationTransitions.events.subscribe(i=>{try{const r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(null!==r&&null!==s)if(this.stateManager.handleRouterEvent(i,s),i instanceof lb&&i.code!==Pp.Redirect&&i.code!==Pp.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof as)this.navigated=!0;else if(i instanceof cU){const a=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),c={info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||k5e(r.source)};this.scheduleNavigation(a,WT,null,c,{resolve:r.resolve,reject:r.reject,promise:r.promise})}(function z5e(t){return!(t instanceof aU||t instanceof cU)})(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),WT,this.stateManager.restoredState())}setUpLocationChangeListener(){var e;null!==(e=this.nonRouterCurrentEntryChangeSubscription)&&void 0!==e||(this.nonRouterCurrentEntryChangeSubscription=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(i,"popstate",r)},0)}))}navigateToSyncWithBrowser(e,i,r){const s={replaceUrl:!0},a=null!=r&&r.navigationId?r:null;if(r){const u={...r};delete u.navigationId,delete u.\u0275routerPageId,0!==Object.keys(u).length&&(s.state=u)}const c=this.parseUrl(e);this.scheduleNavigation(c,i,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(gU),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){const{relativeTo:r,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:u}=i,h=u?this.currentUrlTree.fragment:a;let w,b=null;switch(c){case"merge":b={...this.currentUrlTree.queryParams,...s};break;case"preserve":b=this.currentUrlTree.queryParams;break;default:b=s||null}null!==b&&(b=this.removeEmptyProps(b));try{w=Nee(r?r.snapshot:this.routerState.snapshot.root)}catch(R){("string"!=typeof e[0]||!e[0].startsWith("/"))&&(e=[]),w=this.currentUrlTree.root}return Fee(w,e,b,null!=h?h:null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=DS(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,WT,null,i)}navigate(e,i={skipLocationChange:!1}){return function V5e(t){for(let n=0;n<t.length;n++)if(null==t[n])throw new vt(4008,!1)}(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch(i){return this.urlSerializer.parse("/")}}isActive(e,i){let r;if(r=!0===i?{...U5e}:!1===i?{...G5e}:i,DS(e))return Oee(this.currentUrlTree,e,r);const s=this.parseUrl(e);return Oee(this.currentUrlTree,s,r)}removeEmptyProps(e){return Object.entries(e).reduce((i,[r,s])=>(null!=s&&(i[r]=s),i),{})}scheduleNavigation(e,i,r,s,a){if(this.disposed)return Promise.resolve(!1);let c,u,h;a?(c=a.resolve,u=a.reject,h=a.promise):h=new Promise((w,R)=>{c=w,u=R});const b=this.pendingTasks.add();return fte(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(b))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:s,resolve:c,reject:u,promise:h,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),h.catch(w=>Promise.reject(w))}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),eP=(()=>{var t;class n{constructor(e,i,r,s,a,c){var u;this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=s,this.el=a,this.locationStrategy=c,this.href=null,this.commands=null,this.onChanges=new sn,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const h=null===(u=a.nativeElement.tagName)||void 0===u?void 0:u.toLowerCase();this.isAnchorElement="a"===h||"area"===h,this.isAnchorElement?this.subscription=e.events.subscribe(b=>{b instanceof as&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,s,a){const c=this.urlTree;return!!(null===c||this.isAnchorElement&&(0!==e||i||r||s||a||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(c,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info}),!this.isAnchorElement)}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}updateHref(){var e;const i=this.urlTree;this.href=null!==i&&this.locationStrategy?null===(e=this.locationStrategy)||void 0===e?void 0:e.prepareExternalUrl(this.router.serializeUrl(i)):null;const r=null===this.href?null:function L$(t,n,o){return function SAe(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?k$:Wn}(n,o)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(e,i){const r=this.renderer,s=this.el.nativeElement;null!==i?r.setAttribute(s,e,i):r.removeAttribute(s,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Po),Wv("tabindex"),g(ji),g($t),g(rb))},t.\u0275dir=qn({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&Y("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),2&e&&Hn("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[mo.HasDecoratorInputTransform,"preserveFragment","preserveFragment",IS],skipLocationChange:[mo.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",IS],replaceUrl:[mo.HasDecoratorInputTransform,"replaceUrl","replaceUrl",IS],routerLink:"routerLink"},standalone:!0,features:[UZ,it]}),n})();class gte{}let q5e=(()=>{var t;class n{constructor(e,i,r,s,a){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(bt(e=>e instanceof as),ab(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const u of i){var s,a;u.providers&&!u._injector&&(u._injector=SF(u.providers,e,"Route: ".concat(u.path)));const h=null!==(s=u._injector)&&void 0!==s?s:e,b=null!==(a=u._loadedInjector)&&void 0!==a?a:h;var c;(u.loadChildren&&!u._loadedRoutes&&void 0===u.canLoad||u.loadComponent&&!u._loadedComponent)&&r.push(this.preloadConfig(h,u)),(u.children||u._loadedRoutes)&&r.push(this.processRoutes(b,null!==(c=u.children)&&void 0!==c?c:u._loadedRoutes))}return Ks(r).pipe(xS())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):Xn(null);const s=r.pipe(Yc(a=>{var c;return null===a?Xn(void 0):(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,this.processRoutes(null!==(c=a.injector)&&void 0!==c?c:e,a.routes))}));return i.loadComponent&&!i._loadedComponent?Ks([s,this.loader.loadComponent(i)]).pipe(xS()):s})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(xJ),T(Id),T(gte),T(SU))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const TU=new Ot("");let _te=(()=>{var t;class n{constructor(e,i,r,s,a={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=s,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||(a.scrollPositionRestoration="disabled"),a.anchorScrolling||(a.anchorScrolling="disabled")}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof fh?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof as?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof BS&&e.code===Zx.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof qee&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new qee(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){var e,i;null===(e=this.routerEventsSubscription)||void 0===e||e.unsubscribe(),null===(i=this.scrollEventsSubscription)||void 0===i||i.unsubscribe()}}return(t=n).\u0275fac=function(e){!function dK(){throw new Error("invalid")}()},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function Tm(t,n){return{\u0275kind:t,\u0275providers:n}}function bte(){const t=mt(vs);return n=>{var o,e;const i=t.get(bp);if(n!==i.components[0])return;const r=t.get(on),s=t.get(Cte);1===t.get(PU)&&r.initialNavigation(),null===(o=t.get(yte,null,hn.Optional))||void 0===o||o.setUpPreloading(),null===(e=t.get(TU,null,hn.Optional))||void 0===e||e.init(),r.resetRootComponentType(i.componentTypes[0]),s.closed||(s.next(),s.complete(),s.unsubscribe())}}const Cte=new Ot("",{factory:()=>new sn}),PU=new Ot("",{providedIn:"root",factory:()=>1}),yte=new Ot("");function Z5e(t){return Tm(0,[{provide:yte,useExisting:q5e},{provide:gte,useExisting:t}])}function Y5e(t){return Tm(9,[{provide:pte,useValue:A5e},{provide:hte,useValue:{skipNextTransition:!(null==t||!t.skipInitialTransition),...t}}])}const Ste=new Ot("ROUTER_FORROOT_GUARD"),J5e=[Rs,{provide:LS,useClass:tU},on,$T,{provide:Po,useFactory:function vte(t){return t.routerState.root},deps:[on]},SU,[]];let Ls=(()=>{var t;class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[J5e,[],{provide:zS,multi:!0,useValue:e},{provide:Ste,useFactory:nVe,deps:[[on,new zo,new jo]]},{provide:VS,useValue:i||{}},null!=i&&i.useHash?{provide:rb,useClass:RFe}:{provide:rb,useClass:uX},{provide:TU,useFactory:()=>{const t=mt($3e),n=mt(an),o=mt(VS),e=mt(nA),i=mt(LS);return o.scrollOffset&&t.setOffset(o.scrollOffset),new _te(i,e,t,n,o)}},null!=i&&i.preloadingStrategy?Z5e(i.preloadingStrategy).\u0275providers:[],null!=i&&i.initialNavigation?iVe(i):[],null!=i&&i.bindToComponentInputs?Tm(8,[Jee,{provide:Jx,useExisting:Jee}]).\u0275providers:[],null!=i&&i.enableViewTransitions?Y5e().\u0275providers:[],[{provide:wte,useFactory:bte},{provide:c3,multi:!0,useExisting:wte}]]}}static forChild(e){return{ngModule:n,providers:[{provide:zS,multi:!0,useValue:e}]}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ste,8))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();function nVe(t){return"guarded"}function iVe(t){return["disabled"===t.initialNavigation?Tm(3,[{provide:mx,multi:!0,useFactory:()=>{const n=mt(on);return()=>{n.setUpLocationChangeListener()}}},{provide:PU,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Tm(2,[{provide:PU,useValue:0},{provide:mx,multi:!0,deps:[vs],useFactory:n=>{const o=n.get(xFe,Promise.resolve());return()=>o.then(()=>new Promise(e=>{const i=n.get(on),r=n.get(Cte);fte(i,()=>{e(!0)}),n.get(nA).afterPreactivation=()=>(e(!0),r.closed?Xn(void 0):r),i.initialNavigation()}))}}]).\u0275providers:[]]}const wte=new Ot("");var nt,Fe=__webpack_require__(71184),ie=__webpack_require__(3616),Ve=__webpack_require__(34724),ln=function(t){return t.Chips="chips",t.Gems="gems",t.Ticket="ticket",t}(ln||{}),Rt=function(t){return t[t.Seconds=0]="Seconds",t[t.Minutes=1]="Minutes",t[t.Hours=2]="Hours",t[t.Days=3]="Days",t[t.Months=4]="Months",t[t.Years=5]="Years",t}(Rt||{}),_h=function(t){return t[t.Singular=0]="Singular",t[t.Plural=1]="Plural",t}(_h||{}),qi=function(t){return t.Normal="normal",t.Short="short",t}(qi||{});!function(t){let n;var u;let o,e,i,r,s,a,c;(u=n=t.ERoomState||(t.ERoomState={}))[u.Config="conf"]="Config",u[u.Init="init"]="Init",u[u.WaitingForPlayers="wfp"]="WaitingForPlayers",u[u.WaitingForAccept="wfa"]="WaitingForAccept",u[u.Setup="stp"]="Setup",u[u.Ready="rdy"]="Ready",u[u.RoundReady="rndrdy"]="RoundReady",u[u.InProgress="iprog"]="InProgress",u[u.Finalized="fin"]="Finalized",u[u.Suspended="susp"]="Suspended",u[u.Failed="fail"]="Failed",function(u){u[u.Config="conf"]="Config",u[u.GameReadyToLoad="grtl"]="GameReadyToLoad",u[u.GameReadyToStart="grts"]="GameReadyToStart",u[u.GameInProgress="gip"]="GameInProgress",u[u.GameEnded="end"]="GameEnded",u[u.Finalized="fin"]="Finalized",u[u.Suspended="susp"]="Suspended",u[u.Failed="fail"]="Failed"}(o=t.EGameState||(t.EGameState={})),function(u){u[u.Empty=1]="Empty",u[u.Reserved=2]="Reserved",u[u.Taken=3]="Taken",u[u.Closed=4]="Closed"}(e=t.ESeatState||(t.ESeatState={})),function(u){u[u.KickedByHost=1]="KickedByHost"}(i=t.EPlayerKickReason||(t.EPlayerKickReason={})),function(u){u[u.Idle="idl"]="Idle",u[u.Ready="rdy"]="Ready",u[u.Loading="load"]="Loading",u[u.Loaded="done"]="Loaded",u[u.InGame="ingame"]="InGame"}(r=t.EPlayerState||(t.EPlayerState={})),function(u){u[u.Nomal=0]="Nomal",u[u.InitFail="init_fail"]="InitFail",u[u.ReadyTimeout="ready_timeout"]="ReadyTimeout",u[u.LoadingTimeout="loading_timeout"]="LoadingTimeout",u[u.WaitingTimeout="waiting_timeout"]="WaitingTimeout",u[u.VirtualTransactionFailed="transaction_fail"]="VirtualTransactionFailed",u[u.RoomEmpty="room_empty"]="RoomEmpty",u[u.GameSuspended="game_susp"]="GameSuspended",u[u.AbandonedByHost="abandoned_by_host"]="AbandonedByHost",u[u.GameFailed="game_failed"]="GameFailed",u[u.Interrupted="interrupt"]="Interrupted"}(s=t.ERoomDestroyReason||(t.ERoomDestroyReason={})),function(u){u.GlobalChat="globalChat",u.PrivateChat="privateChat",u.ClubChat="clubChat",u.Profile="profile",u.Friends="friends",u.Leaderboards="leaderboards",u.Shop="shop",u.Lobby="lobby",u.CustomGames="customGames",u.Gallery="gallery",u.Social="social",u.FriendsOnlyChat="friendsOnlyChat",u.ClientMusic="clientMusic",u.AskEnablePush="askEnablePush",u.DealersDeck="dealersDeck",u.Tracking="tracking",u.GameHistory="gameHistory",u.Tutorials="tutorials",u.OnlineUsersList="onlineUsersList",u.Rate="rate",u.SpectateNotification="spectateNotification",u.PublicClub="publicClub",u.PrivateClub="privateClub",u.ClosedClub="closedClub",u.ExternalLinks="externalLinks",u.DailyBonus="dailyBonus",u.RewardedGame="rewardedGame",u.MoreGamesLobby="moreGamesLobby",u.Clubs="clubs",u.CashBack="cashBack",u.Settings="settings",u.CustomBlitzTournaments="customBlitzTournaments",u.Challenges="challenges",u.UserNotes="userNotes",u.GiftablePacks="giftablePacks"}(a=t.EPermissionModule||(t.EPermissionModule={})),function(u){u.View="view",u.Create="create",u.Edit="edit",u.Send="send",u.Merge="merge",u.Migrate="accountMigration",u.Upload="upload",u.Like="like",u.Claim="claim",u.Join="join",u.MathmakingRoom="matchmaking",u.SingleplayerRoom="training",u.CustomRoom="custom",u.Vip="vip",u.TournamentRoom="tournament",u.Royal8Room="royal8",u.Royal16Room="royal16",u.PromoTournament="promoTournament",u.Spectate="spectate",u.SendTextMessage="sendTextMessage",u.SendEmojiMessage="sendEmojiMessage",u.SendImageMessage="sendImageMessage",u.SendVoiceMessage="sendVoiceMessage",u.SendGameRoomMessage="sendGameRoomMessage",u.PromoCodes="promoCodes",u.Gifts="gifts",u.Donate="donate",u.Open="open",u.Show="show",u.Friend="friend",u.NewConversation="newConversation",u.SendClubJoinRequest="sendJoinRequest",u.InviteClubMember="inviteMember",u.DisbandClub="disband",u.AcceptClubJoinRequest="acceptJoinRequest",u.EditClubMemberRole="editMemberRole",u.KickClubMember="kickMember",u.ManageClubChat="manageChat",u.OpenClubActivityFeed="openActivityFeed",u.CreatyStickyTopic="createStickyTopic",u.OpenBlogPage="openBlogPage",u.LeaderboardGems="gems",u.LeaderboardRichest="richest",u.LeaderboardEarnedChips="earnedchips",u.LeaderboardMatchmaking="matchmaking",u.LeaderboardRankedSeason="rankedSeason",u.LeaderboardLikes="likes",u.LeaderboardClubs="clubs",u.LeaderboardClubMembers="clubmembers",u.LeaderboardClubMembersWeekly="clubmembersweekly",u.LeaderboardLikesGame="likesgame",u.LeaderboardRichestGame="richestgame",u.LeaderboardEarnedChipsGame="earnedchipsgame",u.SettingsPremiumGiftNotification="settingsPremiumGiftNotification",u.CreatorCode="creatorCode",u.EditMemberLimit="editMemberLimit",u.Delete="delete"}(c=t.EModuleAction||(t.EModuleAction={}))}(nt||(nt={}));var et,Ut=function(t){return t.Android="android",t.Browser="browser",t.Ios="ios",t.Windows="windows",t}(Ut||{}),$n=function(t){return t.Facebook="facebook",t.VivaAndroid="vivaAndroid",t.SpilGames="spilgames",t.CafeBazaar="cafebazaar",t}($n||{}),Rd=function(t){return t.DeviceReady="deviceready",t.Pause="pause",t.Resume="resume",t.BackButton="backbutton",t.MenuButton="menubutton",t.SearchButton="searchbutton",t.StartCallButton="startcallbutton",t.EndCallButton="endcallbutton",t.VolumeDownButton="volumedownbutton",t.VolumeUpButton="volumeupbutton",t}(Rd||{}),cs=function(t){return t.Portrait="portrait",t.Landscape="landscape",t}(cs||{}),Pm=function(t){return t.Development="development",t.Production="production",t}(Pm||{});!function(t){let n;var Ee;(Ee=n=t.EGamesPlayError||(t.EGamesPlayError={}))[Ee.NotEnoughChips="eChips"]="NotEnoughChips",Ee[Ee.NotFound="eNotFnd"]="NotFound",Ee[Ee.SeatTaken="eSeat"]="SeatTaken",Ee[Ee.Requirements="eReq"]="Requirements",Ee[Ee.Duplicate="eDupl"]="Duplicate",Ee[Ee.Timeout="eTimeout"]="Timeout",Ee[Ee.Banned="eBan"]="Banned",Ee[Ee.State="eState"]="State",Ee[Ee.InvalidOption="eOpt"]="InvalidOption",Ee[Ee.UnsupportedOperation="eOp"]="UnsupportedOperation",Ee[Ee.NotEnoughGems="eGems"]="NotEnoughGems";class o extends Error{constructor(ot,ct){super(),this.targetAmount=ot,this.args=ct,this.errCode=n.NotEnoughChips}}t.NotEnoughMinerals=o;class e extends Error{constructor(ot,ct){super(),this.targetAmount=ot,this.args=ct,this.errCode=n.NotEnoughGems}}t.NotEnoughGems=e;class i extends Error{constructor(){super(...arguments),this.errCode=n.NotFound}}t.ItemNotFound=i;class r extends Error{constructor(){super(...arguments),this.errCode=n.SeatTaken}}t.RoomSeatTaken=r;class s extends Error{constructor(){super(...arguments),this.errCode=n.Requirements}}t.RoomRequirements=s;class a extends Error{constructor(ot){super(),this.errCode=n.Duplicate,this.payload=ot}}t.Duplication=a;class c extends Error{constructor(){super(...arguments),this.errCode=n.Timeout}}t.Timeout=c;class u extends Error{constructor(){super(...arguments),this.errCode=n.Banned}}t.Banned=u;class h extends Error{constructor(){super(...arguments),this.errCode=n.State}}t.StateError=h;class b extends Error{constructor(){super(...arguments),this.errCode=n.InvalidOption}}t.InvalidCustomOption=b;class w extends Error{constructor(){super(...arguments),this.errCode=n.UnsupportedOperation}}t.UnsupportedOperation=w;class R extends Error{constructor(ot){super(),this.name="ValidationError",this.property=ot}}t.ValidationError=R;class G extends Error{constructor(ot){super(),this.name="FieldValidationError",this.validations=ot}}t.FieldValidationError=G;class K extends Error{constructor(){super(...arguments),this.name="UserNotFound"}}t.UserNotFound=K;class te extends Error{constructor(){super(...arguments),this.name="ForbiddenWord"}}let ee,le,me,ge,Me,Ke;t.ForbiddenWord=te,function(Ee){Ee.NotValid="notValid",Ee.NotFound="notFound",Ee.Banned="banned",Ee.Verification="verification",Ee.Normalization="normalization",Ee.ProviderStatus="providerStatus",Ee.UsedReceipt="usedReceipt",Ee.AlreadyCompleted="alreadyCompleted",Ee.AlreadyProcessed="alreadyProcessed",Ee.MyProfileBlocked="blocked",Ee.TargetProfileBlocked="targetBlocked",Ee.Cooldown="cooldown",Ee.RequirementNotMeet="requirementNotMeet",Ee.Muted="muted",Ee.Ownership="ownership",Ee.ExpiredOrWrongToken="expiredOrWrongToken",Ee.LimitReached="limitReached",Ee.NotFriend="friendOnly",Ee.WalletBalance="balance",Ee.DiscountMobile="discountMobile",Ee.DeactivatedAccount="deactivatedAccount",Ee.NotAllowed="notAllowed",Ee.ExpiredOrWrongRefreshToken="expiredOrWrongRefreshToken",Ee.InternalError="internalError",Ee.ClubNameAlreadyTaken="ClubNameTaken",Ee.InvalidClubName="invalidClubName",Ee.UserAlreadyInClub="UserAlreadyInClub",Ee.ClubFull="ClubFull",Ee.ClubNotfound="ClubNotFound",Ee.UserNotInClub="UserNotInClub",Ee.UserActionForbiddenByRole="UserActionForbiddenByRole",Ee.ClubItemNotFound="ClubItemNotFound",Ee.InvalidJoinRequestActionByStatus="InvalidJoinRequestActionByStatus",Ee.MemberStatusOutdated="MemberStatusOutdated",Ee.ClubPrivacy="ClubPrivacyException",Ee.UserExistingJoinRequest="UserExistingJoinRequest",Ee.ClubPermissionFail="clubPermissionFail",Ee.ValidationError="ValidationError"}(ee=t.Code||(t.Code={})),function(Ee){class ot extends Error{constructor(Ir){super(),this.property=Ir,this.code=ee.NotValid}}Ee.Validation=ot;class ct extends Error{constructor(){super(...arguments),this.code=ee.NotFound}}Ee.NotFound=ct;class Pt extends Error{constructor(Ir){super(),this.status=Ir,this.code=ee.Banned,this.isDeviceBan=!1,this.expiresAt=Ir?Ir.expiresAt:void 0,this.isDeviceBan=Ir?Ir.isDeviceBan:void 0}}Ee.Banned=Pt;class gn extends Error{constructor(Ir){super(),this.code=ee.DeactivatedAccount;for(let Ur in Ir)Ir.hasOwnProperty(Ur)&&(this[Ur]=Ir[Ur])}}Ee.DeactivatedAccount=gn;class qt extends Error{constructor(){super(...arguments),this.code=ee.MyProfileBlocked}}Ee.MyProfileBlocked=qt;class Je extends Error{constructor(){super(...arguments),this.code=ee.TargetProfileBlocked}}Ee.TargetProfileBlocked=Je;class xn extends Error{constructor(Ir,Ur){super("User ".concat(Ur||""," trying to use expired token '").concat(Ir,"'")),this.code=ee.ExpiredOrWrongToken}}Ee.ExpiredOrWrongToken=xn;class bi extends Error{constructor(){super("This action needs active friend status"),this.code=ee.NotFriend}}Ee.NotFriend=bi;class rn extends Error{constructor(){super(...arguments),this.code=ee.WalletBalance}}Ee.WalletBalance=rn;class vn extends Error{constructor(){super(...arguments),this.code=ee.AlreadyProcessed}}Ee.AlreadyProcessed=vn;class Vn extends Error{constructor(){super(...arguments),this.code=ee.InternalError}}Ee.InternalError=Vn;class An extends Error{constructor(Ir,Ur){super("'User '".concat(Ur," trying to use expired refresh token '").concat(Ir,"'")),this.code=ee.ExpiredOrWrongRefreshToken}}Ee.ExpiredOrWrongRefreshToken=An}(le=t.General||(t.General={})),function(Ee){class ot extends Error{constructor(qt,Je){super("'".concat(qt,"' is required in order to allow the action")),this.requirement=qt,this.requirementAmount=Je,this.code=ee.RequirementNotMeet}}Ee.RequirementNotMeet=ot;class ct extends Error{constructor(qt,Je){super("'".concat(qt,"' change limit of '").concat(Je,"' reached")),this.issuer=qt,this.limit=Je,this.code=ee.LimitReached}}Ee.LimitReached=ct;class Pt extends Error{constructor(){super(...arguments),this.code=ee.NotAllowed}}Ee.ActionNotAllowed=Pt}(me=t.Permissions||(t.Permissions={})),function(Ee){class ot extends Error{constructor(bi,rn,vn,Vn){super("".concat(vn.toString()," (").concat(bi,"/").concat(rn,") verification failed! Reason: ").concat(Vn)),this.transactionId=bi,this.receiptId=rn,this.provider=vn,this.reason=Vn,this.code=ee.Verification}}Ee.VerificationError=ot;class ct extends Error{constructor(bi){super(bi),this.code=ee.Normalization}}Ee.NormalizationError=ct;class Pt extends Error{constructor(bi){super(bi),this.code=ee.ProviderStatus}}Ee.ProviderStatusError=Pt;class gn extends Error{constructor(bi,rn){super("Receipt ".concat(bi," was already used in transaction:").concat(rn,"!")),this.receiptId=bi,this.transactionId=rn,this.code=ee.UsedReceipt}}Ee.UsedReceiptError=gn;class qt extends Error{constructor(bi,rn){super("Receipt ".concat(rn," was already processed in transaction:").concat(bi,"!")),this.transactionId=bi,this.receiptId=rn,this.code=ee.AlreadyProcessed}}Ee.AlreadyProcessedError=qt;class Je extends Error{constructor(){super("Discount codes not allowed on mobile device apps"),this.code=ee.DiscountMobile}}Ee.DiscountMobile=Je}(ge=t.Iap||(t.Iap={})),function(Ee){class ot extends Error{constructor(xn){super("Create conversation action has a ".concat(xn," second cooldown")),this.cooldown=xn,this.code=ee.Cooldown}}Ee.Cooldown=ot;class ct extends Error{constructor(xn){super(),this.muteStatus=xn,this.code=ee.Muted}}Ee.Muted=ct;class Pt extends Error{constructor(xn=""){super("Action ".concat(xn," requires resource ownership")),this.action=xn,this.code=ee.Ownership}}Ee.Ownership=Pt;class gn extends Error{constructor(){super(...arguments),this.code=ee.NotFound}}Ee.ConversationNotFound=gn;class qt extends Error{constructor(){super(...arguments),this.code=ee.ClubPermissionFail}}Ee.ClubPermissionFail=qt}(Me=t.Chat||(t.Chat={})),function(Ee){class ot extends Error{constructor(Pt){super("Create report action has a ".concat(Pt," second cooldown")),this.cooldown=Pt,this.code=ee.Cooldown}}Ee.Cooldown=ot}(Ke=t.Feedback||(t.Feedback={}))}(et||(et={}));let jS=(()=>{class n{static checkIfTrackingEventIsSupported(e,i){if(!Object.keys(i).find(s=>s===e.category))return console.error("[AnalyticsTracking]: ".concat(e.category," category not found in tracking events config!")),!1;if(i[e.category][e.type])return i[e.category][e.type];{if(i[e.category]["*:*"])return!0;const s=Object.keys(i[e.category]).find(a=>-1!==a.indexOf(e.type.slice(0,e.type.lastIndexOf(":")))&&a.endsWith("*"));return!(!s||!i[e.category][s])&&i[e.category][s]}}}return n.analyticsTrackingEventsConfig={user:{register:["NativeTrackingService"],levelUp:["NativeTrackingService"]},orientation:{start:["GaService"],change:["GaService"]},"public chat":{"chat opened":["GaService"],"message sent":["GaService"],"conversation started":["GaService"],"conversation entered":["GaService"],"message deleted":["GaService"],"chat channel changed":["GaService"],"image lightbox opened":["GaService"],"voice message played":["GaService"],"join game pressed":["GaService"],"emoji_sent:*":["GaService"]},"private chat":{"chat opened":["GaService"],"message sent":["GaService"],"conversation started":["GaService"],"conversation entered":["GaService"],"message deleted":["GaService"],"chat channel changed":["GaService"],"image lightbox opened":["GaService"],"voice message played":["GaService"],"join game_pressed":["GaService"],"emoji_sent:*":["GaService"]},"club chat":{"chat opened":["GaService"],"message sent":["GaService"],"conversation started":["GaService"],"conversation entered":["GaService"],"message deleted":["GaService"],"chat channel changed":["GaService"],"image lightbox opened":["GaService"],"voice message played":["GaService"],"join game_pressed":["GaService"],"emoji_sent:*":["GaService"]},club:{"player joined":["GaService"],"accepted to club":["GaService"],"join request sent":["GaService"],"player left":["GaService"],"player kicked":["GaService"],"join request invited":["GaService"]},game:{hosted:["GaService"],matchmakingQueue:["DeltaDNAAdapterService"],gameLoad:["DeltaDNAAdapterService"],matchStarted:["NativeTrackingService"],matchWon:["NativeTrackingService"],"emoji_sent:*":["GaService"],"phrase_sent:*":["GaService"]},navigation:{private_chat:["GaService"],public_chat:["GaService"],"shop:*":["GaService"],"profile:*":["GaService"],promoStore:["GaService"]},purchase:{"buy:*":["GaService"],"donate:*":["GaService"],track:["FbPixelService"]},deals:{shown:["GaService"],closed:["GaService"],"buy:*":["GaService"]},bet_slider_use:{left_pressed:["GaService"],right_pressed:["GaService"],slide:["GaService"]},purchaseFrom:{"*:*":["GaService"]},register:{"*:*":["GaService"]},tutorials:{resetTutorials:["GaService"],"skippedTutorial:*":["GaService"],"beginStep:*":["GaService"]},info:{clientDevice:["DeltaDNAAdapterService"]},settings:{changed:["DeltaDNAAdapterService"]},shop:{entered:["DeltaDNAAdapterService"]},socket:{state:["DeltaDNAAdapterService"]},ads:{rewardedVideoWatched:["NativeTrackingService"]},personalNotes:{pesonalNoteSaved:["GaService"]}},n})();var Jc,t,Nn=function(t){return t.User="user",t.Orientation="orientation",t.PublicChat="public chat",t.PrivateChat="private chat",t.ClubChat="club chat",t.Club="club",t.Game="game",t.Navigation="navigation",t.Purchase="purchase",t.Deals="deals",t.BetSliderUser="bet_slider_use",t.PurchaseFrom="purchaseFrom",t.Register="register",t.Tutorials="tutorials",t.Info="info",t.Settings="settings",t.Shop="shop",t.Socket="socket",t.Options="options",t.Ads="ads",t.PersonalNotes="personalNotes",t}(Nn||{});(t=Jc||(Jc={})).DefaultEvent=class n{constructor(i,r,s){this.category=i,this.type=r,this.args=s}},t.DefaultUIEvent=class o{constructor(i,r,s){this.action=i,this.target=r,this.args=s}};var bl=function(t){return t.Ready="ready",t.Claimed="claimed",t.Pending="pending",t.Expired="expired",t}(bl||{}),iA=function(t){return t.Normal="normal",t.Reset="reset",t.Goals="goals",t}(iA||{}),ra=function(t){return t.General="general",t.Daily="daily",t.Weekly="weekly",t}(ra||{}),HS=function(t){return t.Title="title",t.Description="description",t}(HS||{}),tP=function(t){return t.ClubStateUdpate="club.state.upd",t.NewFeedItem="club.feed.item",t.PendingJoinRequestsUpdate="club.joinRequests.upd",t.JoinRequestUpdate="club.joinRequestStatus.upd",t}(tP||{});class aVe{constructor(n){var o,e;this.presetAvatar=null!==(o=null==n?void 0:n.presetAvatar)&&void 0!==o?o:(new IU).toJSON(),this.customAvatar=null!==(e=null==n?void 0:n.customAvatar)&&void 0!==e?e:(new IU).toJSON()}toJSON(){return{presetAvatar:this.presetAvatar,customAvatar:this.customAvatar}}}class IU{constructor(n){this.id=null==n?void 0:n.id,this.isActive=null==n?void 0:n.isActive,this.url=null==n?void 0:n.url}toJSON(){return{id:this.id,isActive:this.isActive,url:this.url}}}class cVe{constructor(n){this.minLevel=null==n?void 0:n.minLevel,this.chips=null==n?void 0:n.chips,this.gems=null==n?void 0:n.gems,this.vip=null==n?void 0:n.vip}toJSON(){return{minLevel:this.minLevel,chips:this.chips,gems:this.gems,vip:this.vip}}}class lVe{constructor(n){var o;this.privacy=null==n?void 0:n.privacy,this.memberLimit=null==n?void 0:n.memberLimit,this.isPrivacyTaxPaid=null==n?void 0:n.isPrivacyTaxPaid,this.requirements=null!==(o=null==n?void 0:n.requirements)&&void 0!==o?o:(new cVe).toJSON()}toJSON(){return{privacy:this.privacy,memberLimit:this.memberLimit,isPrivacyTaxPaid:this.isPrivacyTaxPaid,requirements:this.requirements}}}var Dc,qS=function(t){return t[t.MemberActivity=0]="MemberActivity",t[t.JoinRequests=1]="JoinRequests",t[t.DonationRequests=2]="DonationRequests",t[t.Bonuses=3]="Bonuses",t}(qS||{}),Ao=function(t){return t[t.LevelUp=0]="LevelUp",t[t.JoinRequest=1]="JoinRequest",t[t.MemberJoined=2]="MemberJoined",t[t.MemberLeft=3]="MemberLeft",t[t.MemberRoleChange=4]="MemberRoleChange",t[t.DonateRequest=5]="DonateRequest",t[t.DonatedItem=6]="DonatedItem",t[t.InviteRequest=7]="InviteRequest",t}(Ao||{}),Or=function(t){return t[t.Public=0]="Public",t[t.Private=1]="Private",t[t.Closed=2]="Closed",t}(Or||{}),vh=function(t){return t[t.Fighting=0]="Fighting",t[t.Social=1]="Social",t}(vh||{}),Di=function(t){return t[t.PendingClubAccept=0]="PendingClubAccept",t[t.Accepted=1]="Accepted",t[t.ClubRejected=2]="ClubRejected",t[t.UserRejected=3]="UserRejected",t[t.PendingUserAccept=4]="PendingUserAccept",t}(Di||{}),qo=function(t){return t[t.President=0]="President",t[t.VicePresident=10]="VicePresident",t[t.Officer=20]="Officer",t[t.Member=30]="Member",t}(qo||{});!function(t){let n;var i;let o,e;(i=n=t.EGameType||(t.EGameType={})).Multiplayer="multiplayer",i.Singleplayer="singleplayer",i.Betting="betting",function(i){i.Vip="vip"}(o=t.EMembershipType||(t.EMembershipType={})),function(i){i.OutsideGame="outsideGame",i.InGame="inGame"}(e=t.EAdContext||(t.EAdContext={}))}(Dc||(Dc={}));var ri=function(t){return t.Richest="richest",t.EarnedChips="earnedchips",t.Matchmaking="matchmaking",t.RankedSeasonCurrentSeries="rankedSeasonCurrentSeries",t.RankedSeasonHallOfFame="rankedSeasonHallOfFame",t.Likes="likes",t.Gems="gems",t.Club="clubs",t.ClubMembers="clubmembers",t.ClubMembersWeekly="clubmembersweekly",t.MTTournament="mttournament",t.LikesGame="likesgame",t.RichestGame="richestgame",t.EarnedChipsGame="earnedchipsgame",t}(ri||{}),ys=function(t){return t.ThisWeek="this-week",t.LastWeek="last-week",t.Forever="forever",t.CurrentSeries="currentSeries",t.HallOfFame="hallOfFame",t}(ys||{}),va=function(t){return t[t.ThisWeek=0]="ThisWeek",t[t.LastWeek=1]="LastWeek",t}(va||{}),ub=function(t){return t[t.Forever=-1]="Forever",t}(ub||{});const mVe=[Fe.TG.EmojiSet,Fe.TG.PhraseSet],Tte=[Fe.TG.Frame,Fe.TG.EmojiSet,Fe.TG.PhraseSet,Fe.TG.NameColor,Fe.TG.MessageColor,Fe.TG.ProfileBackground],MU=[Fe.TG.Deck,Fe.TG.Table,Fe.TG.Dice,Fe.TG.Pawn,Fe.TG.SkatDeck,Fe.TG.KlaverjasDeck,Fe.TG.DeDeck,Fe.TG.ItDeck,Fe.TG.ChDeck,Fe.TG.EsDeck,Fe.TG.TarotDeck,Fe.TG.SheeshPawn,Fe.TG.SmallSheeshPawn,Fe.TG.LudoPawn,Fe.TG.SheeshBoard,Fe.TG.SmallSheeshBoard,Fe.TG.LudoBoard,Fe.TG.ShudoDice,Fe.TG.BackgammonDice,Fe.TG.TrixDeck,Fe.TG.PokerDeck,Fe.TG.VoiceOver];var kd;!function(t){let n;var a;let o,e,i,r,s;(a=n=t.ETileType||(t.ETileType={})).Room="room",a.Navigation="navigation",a.ExternalNavigation="external-navigation",a.Game="game",a.Promo="promo",a.Bonus="bonus",a.Scroll="scroll",a.RoomScroll="roomScroll",a.Rankings="rankings",a.Events="events",a.RankingsScroll="rankingsScroll",a.CashBack="cashBack",a.BettingGame="bettingGame",a.RankedSeason="rankedSeason",function(a){a[a.Large=4]="Large",a[a.LargeMedium=2.5]="LargeMedium",a[a.Medium=2]="Medium",a[a.SmallMedium=1.5]="SmallMedium",a[a.Small=1]="Small",a[a.ExtraSmall=.5]="ExtraSmall",a[a.Auto=0]="Auto"}(o=t.ETileSize||(t.ETileSize={})),function(a){a.DailyBonus="dailyBonus",a.RewardedGame="rewardedGame"}(e=t.EBonusTileType||(t.EBonusTileType={})),function(a){a.Claim="claim",a.OpenBonuses="open"}(i=t.EBonusTileClickAction||(t.EBonusTileClickAction={})),function(a){a.Basic="basic",a.Matchmaking="matchmaking"}(r=t.EScrollTileType||(t.EScrollTileType={})),function(a){a.InviteOnly="inviteOnly"}(s=t.EPromoTournamentType||(t.EPromoTournamentType={}))}(kd||(kd={}));var nP=function(t){return t.Phaser="phaser",t.Dragonbones="dragonbones",t}(nP||{}),Pte=function(t){return t.NonExisting="nonExisting",t.Slotmlot="slotmlot",t}(Pte||{}),kr=function(t){return t.GUESTUSER="guestUser",t.REGISTEREDUSER="registeredUser",t.REGISTEREDUSERNOTVERIFIED="registeredUserNotVerified",t.CLUB_PRESIDENT="clubPresident",t.CLUB_VICE_PRESIDENT="clubVicePresident",t.CLUB_OFFICER="clubOfficer",t.CLUB_MEMBER="clubMember",t}(kr||{}),ba=function(t){return t.Idle="idle",t.LobbyActivePlay="lobbyActivePlay",t.InGame="inGame",t}(ba||{}),oA=function(t){return t[t.Vip="vip"]="Vip",t[t.Uniqueness="uniqueness"]="Uniqueness",t[t.Level="level"]="Level",t[t.PlayGame="playGame"]="PlayGame",t[t.TimeInterval="timeInterval"]="TimeInterval",t[t.OncePerDay="oncePerDay"]="OncePerDay",t[t.CustomLimit="limit"]="CustomLimit",t[t.Wallet="wallet"]="Wallet",t}(oA||{}),WS=function(t){return t.Android="android",t.IOs="ios",t.Browser="web",t.Facebook="facebook",t}(WS||{}),rA=function(t){return t[t.NewMessage="chat.admin.msg"]="NewMessage",t[t.ChatRead="chat.admin.read"]="ChatRead",t[t.MessageDeleted="chat.admin.msg.del"]="MessageDeleted",t[t.ChatArchived="chat.admin.archived"]="ChatArchived",t}(rA||{}),sA=function(t){return t[t.Pending="pending"]="Pending",t[t.Accepted="accepted"]="Accepted",t[t.Rejected="rejected"]="Rejected",t[t.NotExists="notExists"]="NotExists",t}(sA||{}),wt=function(t){return t.Currency="currency",t.Gems="gems",t.Exchange="exchange",t.Vip="vip",t.Utility="utility",t.Frames="frames",t.Decks="decks",t.PromoCodes="promo-codes",t.Promo="promo",t.Tables="tables",t.Emotions="emotions",t.Dice="dice",t.Pawns="pawns",t.BankTransfer="bank-transfer",t.Inventory="inventory",t.MessageColors="message-colors",t.NameColors="name-colors",t.Boosters="boosters",t.PromoDeals="promoDeals",t.BuyInDeals="buyInDeals",t.RebuyDeals="rebuyDeals",t.HappyHourChips="happyHourChips",t.ProfileBackground="profileBackground",t.CreatorCode="creator-code",t.InitialDeals="initialDeals",t.GiftablePacks="giftable-packs",t}(wt||{}),v_=function(t){return t.Upgrade="upgrade",t.Downgrade="downgrade",t.Crossgrade="crossgrade",t}(v_||{});const $S=[Fe.TG.Premium,Fe.TG.Vip];var Fi=function(t){return t[t.Full=10]="Full",t[t.Premium=20]="Premium",t}(Fi||{}),OU=function(t){return t[t.Vip=0]="Vip",t}(OU||{}),Zs=function(t){return t.Apple="apple",t.Android="android",t.BankTransfer="bankTransfer",t.BCashy="bcashy",t.CafeBazaar="cafebazaar",t.CasWalletChips="caschips",t.CasWalletGems="casgems",t.Code="code",t.Epay="epay",t.Easypay="easypay",t.Facebook="facebook",t.Fortumo="fortumo",t.Google="google",t.Paypal="paypal",t.PaypalCheckout="paypalcheckout",t.Teracomm="teracomm",t.Xsolla="xsolla",t.XsollaCC="xsollacc",t.XsollaEpay="xsollaepay",t.XsollaPaypal="xsollapaypal",t.Windows="windows",t}(Zs||{}),Ss=function(t){return t.SuccessPurchase="iapOk",t.FailPurchase="iapFail",t}(Ss||{}),bh=function(t){return t.ScratchCard="scratchCard",t.WheelOfFortune="wheelOfFortune",t.Slot="slot",t.Piniata="piniata",t.LuckyBall="luckyBall",t.Lottery="lottery",t.Chests="chests",t}(bh||{}),Im=function(t){return t.Pending="pending",t.Trial="trial",t.Active="active",t.Paused="paused",t.OnHold="onHold",t.Canceled="canceled",t.Expired="expired",t.Revoked="revoked",t.Deferred="deferred",t}(Im||{}),Ch=function(t){return t[t.Blue=0]="Blue",t[t.Bronze=5]="Bronze",t[t.Silver=10]="Silver",t[t.Gold=15]="Gold",t[t.Platinum=20]="Platinum",t}(Ch||{}),KS=function(t){return t.FacebookShare="share",t.FacebookShareOpenGraph="share_open_graph",t.FacebookPay="pay",t.FacebookAppRequest="apprequests",t}(KS||{}),Ite=function(t){return t.PurchaseItem="purchaseitem",t}(Ite||{}),Mte=function(t){return t.Share="og.shares",t}(Mte||{}),Ote=function(t){return t.Object="object",t}(Ote||{}),aA=function(t){return t[t.Connected="connected"]="Connected",t[t.NotAuthorized="not_authorized"]="NotAuthorized",t[t.Unknown="unknown"]="Unknown",t}(aA||{}),Wr=function(t){return t.AppPrimary="primary",t.Popup="popup",t}(Wr||{}),Ca=function(t){return t.Connected="Connected",t.Reconnecting="Reconnecting",t.NotConnected="NotConnected",t.Reconnected="Reconnected",t.NoConnection="NoConnection",t}(Ca||{}),co=function(t){return t.ConnectionRestored="ConnectionRestored",t.ConnectionLost="ConnectionLost",t.ReconnectFailed="ReconnectFailed",t.ConnectionRestoreAttempt="ConnectionRestoreAttempt",t.PageHide="PageHidden",t.PageVisible="PageVisible",t}(co||{}),Ds=function(t){return t.ServerDisconnect="io server disconnect",t.ClientDisconnect="io client disconnect",t.ForceDisconnect="force disconnect",t.PingTimeout="ping timeout",t.Unknown="unknown",t.DnspDc="dnsp_dc",t}(Ds||{}),_o=function(t){return t[t.Initial=0]="Initial",t[t.LoadingResources=1]="LoadingResources",t[t.GameLoading=2]="GameLoading",t[t.Ready=3]="Ready",t[t.Disposed=4]="Disposed",t}(_o||{}),EU=function(t){return t.Vip="vip",t.NonVip="non_vip",t}(EU||{}),ec=function(t){return t.Phrase="text",t.Emoteicon="image",t.GiftSent="giftSent",t.Voice="voice",t}(ec||{}),_i=function(t){return t.GameStartInit="gameStartInit",t.NavigatedToGame="navigatedToGame",t.GameLoaded="gameLoaded",t.GameLoadTimeout="gameLoadTimeout",t.GameEnded="gameEnded",t.GameLoadingStarted="gameLoadingStarted",t.GameViewLeft="gameViewLeft",t.GameException="gameException",t.ClientGameStateChange="clientGameStateChange",t.DrawerTabOpened="drawerTabOpened",t.GameInvitePopupOpened="gameInvitePopupOpened",t.IngameMessage="ingameMessage",t}(_i||{}),Ba=function(t){return t.RewardedVideo="rewardedVideo",t.RewardedVideoAfterGame="rewardedVideoAfterGame",t.ProgressiveRewardedVideos="progressiveRewardedVideos",t.RewardedVideoShopChips="rewardedVideoShopChips",t.RewardedVideoShopGems="rewardedVideoShopGems",t.RewardedVideoDeltaBanner="rewardedVideoDeltaBanner",t}(Ba||{}),lo=function(t){return t.updateModel=(n,o)=>{for(const e in n)n.hasOwnProperty(e)&&(o[e]?n[e]instanceof Array?t.updateArray(n[e],o[e]):"object"==typeof n[e]&&null!=n[e]?t.updateModel(n[e],o[e]):o[e]=n[e]:o[e]=n[e]);return o},t.updateArray=(n,o)=>(n.forEach((e,i)=>{if(e instanceof Array)t.updateArray(e,o[i]);else if("object"==typeof e&&null!==e){let r;r=e.hasOwnProperty("id")?o.find(s=>s.id===e.id):o[i],r?"object"==typeof e&&null!=e?t.updateModel(e,r):o[i]=e:o.push(e)}else i>=o.length?o.push(e):o[i]=e}),o),t.findPlayerActiveTable=(n,o)=>o.find(e=>e.state!==Ve.ETableState.Ended&&void 0!==e.seats.find(i=>{const r=i.player||i.reserved;return!!r&&r.id===n&&r.state!==Ve.EPlayerState.Inactive})),t.findLastPlayerTable=(n,o)=>new ie.List(o).where(e=>void 0!==e.seats.find(i=>{const r=i.player;return!!r&&r.id===n&&r.state!==Ve.EPlayerState.Inactive})).last(),t.findMostRecentPlayerProfile=(n,o)=>{const e=new ie.List(o).where(i=>void 0!==i.seats.find(r=>{const s=r.player||r.reserved;return s&&s.id===n})).last();return t.getPlayerFromTable(n,e)},t.findPlayerTablesById=(n,o)=>o.filter(e=>void 0!==e.seats.find(i=>{const r=i.player||i.reserved;return r&&r.id===n})),t.getRematchTable=(n,o)=>{const e=t.findPlayerTablesById(n,o);if(e.length<=1)return;const i=e[e.length-1];return i&&i.state===Ve.ETableState.Waiting?i:void 0},t.getFirstFreeSeat=n=>n.seats.find(o=>!o.player&&!o.reserved),t.findLastTableByState=(n,o,e)=>{const i=o.filter(r=>r.state===e).filter(r=>void 0!==r.seats.find(s=>{const a=s.player||s.reserved;return a&&a.id===n}));return i[i.length-1]},t.findNextTable=(n,o,e)=>{const i=t.findPlayerTablesById(n,o);if(i.length<=1)return;const r=i.findIndex(s=>s.id===e);return-1!==r?i[r+1]:void 0},t.getPlayerFromTable=(n,o)=>{const e=o.seats.find(i=>{const r=i.player||i.reserved;return r&&r.id===n});return(null==e?void 0:e.player)||(null==e?void 0:e.reserved)},t.getPlayerFromSeat=n=>(null==n?void 0:n.player)||(null==n?void 0:n.reserved),t.getPlayersFromTable=n=>n.seats.filter(o=>!!t.getPlayerFromSeat(o)).map(o=>t.getPlayerFromSeat(o)),t.getWinnersFromTable=n=>t.getPlayersFromTable(n).filter(o=>{var e;return!(null==n||null===(e=n.gameResult)||void 0===e||!e.winners.find(i=>i===o.id))}),t.getLosersFromTable=n=>t.getPlayersFromTable(n).filter(o=>{var e;return!(null==n||null===(e=n.gameResult)||void 0===e||!e.losers.find(i=>i===o.id))}),t.hasReservedSeat=(n,o)=>o.some(e=>e.seats.some(i=>{const r=i.reserved;return r&&r.id===n})),t}(lo||{}),Gt=function(t){return t.Facebook="facebook",t.Email="email",t.Google="google",t.Twitter="twitter",t.Mobile="mobile",t.Guest="guest",t.Apple="apple",t.PhoneNumber="phoneNumber",t.Tamatem="tamatem",t}(Gt||{}),rt=function(t){return t.UserLevelUp="UserLevelUp",t.AchievementCompleted="AchievementCompleted",t.RefundUnclaimedPot="RefundUnclaimedPot",t.ItemPurchase="ItemPurchase",t.GameWon="GameWon",t.TournamentWon="TournamentWon",t.KnockoutTournamentWon="KnockoutTournamentWon",t.RefundTournament="RefundTournament",t.FriendRequestSent="FriendRequestSent",t.FriendRequestAccepted="FriendRequestAccepted",t.SocialPlatformFriendRegistered="SocialPlatformFriendRegistered",t.SenderInviteAccepted="SenderInviteAccepted",t.ReceiverInviteAccepted="ReceiverInviteAccepted",t.InvitationLevelUp="InvitationLevelUp",t.GiftSent="GiftSent",t.GiftPackageSent="GiftPackageSent",t.GiftPackageRecieved="GiftPackageRecieved",t.LikeRecieved="LikeRecieved",t.PrivateChatMessage="PrivateChatMessage",t.GameInviteSent="GameInviteSent",t.RatingReceived="RatingReceived",t.AntiChurnReceived="AntiChurnReceived",t.AdminBonusReceived="AdminBonusReceived",t.AccountMigrated="AccountMigrated",t.VipFrameUpdate="VipFrameUpdate",t.FirstLostGameBonus="FirstLostGameBonus",t.ClubInvite="ClubInvite",t.ClubMemberRoleChange="ClubMemberRoleChange",t.ClubDisband="ClubDisband",t.ClubKicked="ClubMemberKick",t.ClubJoinRequestAccepted="ClubJoinRequestAccepted",t.ClubJoinSuccess="ClubJoinSuccess",t.ClubLevelUpReward="ClubLevelUpReward",t.MTTReward="MTTReward",t.PromoTournamentInviteSent="PromoTournamentInviteSent",t.CashbackGenerated="CashbackGenerated",t.HostRewardReceived="HostRewardReceived",t.PromoTournamentRewardAvailable="PromoTournamentRewardAvailable",t}(rt||{}),Ku=function(t){return t.Consumable="inapp",t.Subscription="subs",t}(Ku||{});class Qs{static getInAppType(n){return n===Fe.XM.Subscription?Ku.Subscription:Ku.Consumable}static isAvailableInMobilePlatform(n,o){return!!n.productId[Qs.getMobileProviderByPlatform(o)]}static getMobileProviderByPlatform(n){switch(n){case Ut.Android:return Zs.Google;case Ut.Ios:return Zs.Apple}}static getValidSubscriptionItems(n,o){return n.filter(e=>Qs.getInAppType(e.item.durability)===Ku.Subscription&&Qs.isAvailableInMobilePlatform(e,o))}static getSubscriptionPurchaseType(n,o,e){if(!n)return v_.Upgrade;const i=this.getSubscriptionTypeOrderConfig(e),r=i.findIndex(a=>a===n),s=i.findIndex(a=>a===o);return r===s?v_.Crossgrade:r<s?v_.Upgrade:v_.Downgrade}static hasPendingSubscriptions(n,o,e){return!!n.find(i=>!(!o.find(r=>r===i.item.type)||i.isAcknowledged||e&&e.item&&(e.item.id===i.item.id||e.state===Im.Deferred)&&(e.item.id!==i.item.id||e.state!==Im.Canceled&&e.state!==Im.Expired)))}static hasDefferedItem(n){var o,e;return(null==n?void 0:n.isActive)&&(null==n?void 0:n.state)===Im.Deferred&&(null==n?void 0:n.deferredItem)&&(null==n||null===(o=n.deferredItem)||void 0===o?void 0:o.id)!==(null==n||null===(e=n.item)||void 0===e?void 0:e.id)}static getSubscriptionTypeOrderConfig(n){return $S}}var ve,Bc=function(t){return t.Currency="currency",t.Gems="gems",t.Vip="vip",t}(Bc||{}),Bs=function(t){return t.Notification="notification",t.Basic="basic",t.Blocker="blocker",t.Confirm="confirm",t.Offer="offer",t.Decision="decision",t.Merge="merge",t.GdprPopup="gdpr-popup",t.ProgressiveAds="progressive-ads",t}(Bs||{}),vVe=__webpack_require__(67170),ZS=__webpack_require__.n(vVe);!function(t){let n;var i;let o,e;(i=n=t.EButtonTypes||(t.EButtonTypes={})).BUTTON_ICON="button--icon",i.BUTTON_IMAGE="button--image",function(i){i.BUTTON_ATTENTION="attention",i.BUTTON_ACTION="action",i.BUTTON_TRANSPARENT="transparent",i.BUTTON_LIGHT="light",i.BUTTON_NEGATIVE="negative",i.BUTTON_WHITE="white",i.BUTTON_FB="fb",i.BUTTON_TWITTER="twitter",i.BUTTON_ACCENT="accent",i.BUTTON_DARK="dark",i.BUTTON_DECLINE="decline",i.BUTTON_SORT="sort",i.BUTTON_GOOGLE="google",i.BUTTON_PHONE="phone",i.BUTTON_EMAIL="email",i.BUTTON_PLAIN1="plain1",i.BUTTON_PLAIN2="plain2",i.BUTTON_PLAIN3="plain3",i.BUTTON_PLAY="play",i.BUTTON_STORE="store",i.BUTTON_BONUSES="bonuses",i.BUTTON_SHOP="shop",i.BUTTON_SHOP_DOWNGRADE="shopdowngrade",i.BUTTON_BENEFITS="benefits",i.BUTTON_ACTION_TOP_TABS="actiontoptabs",i.BUTTON_DARK_TOP_TABS="darktoptabs",i.BUTTON_CLUB_LOGOUT="clublogout",i.BUTTON_CLUB_INFO="clubinfo",i.BUTTON_SHARE="share",i.BUTTON_CLUB_CREATE="clubCreate",i.BUTTON_VIEW_GALLERY="viewGallery",i.BUTTON_FRIENDS="friends",i.BUTTON_SEARCH="search",i.BUTTON_INGAME="ingame",i.BUTTON_TAMATEM="tamatem",i.BUTTON_DOUBLE_UP="doubleUp",i.BUTTON_BUY_ITEM="buyItem",i.BUTTON_DONATE="donate",i.CLAIM_STAMP_LOCKED="claimStampLocked"}(o=t.EButtonModifier||(t.EButtonModifier={})),function(i){i.APPLE_LOGO="icons/apple-logo.svg",i.COLORS="icons/font-color-icon.svg",i.ACCOUNT_MERGE="icons/merge-icon.svg",i.ADD_FRIEND="icons/invite-friend-icon.svg",i.ACTIVE_CLOSE_FRIEND="icons/activeclosefriend.svg",i.INACTIVE_CLOSE_FRIEND="icons/inactiveclosefriend.svg",i.ANDROID="icons/android.svg",i.APPLE="icons/apple.svg",i.ARROW_BACK="icons/backicon2.svg",i.ARROW_RIGHT="icons/arrow-right.svg",i.ArrowUp="icons/arrow-up.svg",i.BLOCK="icons/block-icon.svg",i.BOOSTERS="icons/booster-icon.svg",i.BCASHY="icons/bcashy.svg",i.BOT="icons/ghost-bot.svg",i.BUG="icons/feedback-icon.svg",i.BANK_TRANSFER="icons/transfer-tab-icon.svg",i.CALENDAR="icons/calendar-icon.svg",i.CART="icons/cart.svg",i.CHECK="icons/check-icon.svg",i.CHECK_ROUND="icons/check.svg",i.CheckIconEmpty="icons/check-icon-empty.svg",i.CHEST_NEW="icons/daily-reward-closed.svg",i.CHEST_NEW_OPEN="icons/daily-reward-open.svg",i.CHIP="icons/chip-icon.svg",i.CITY="icons/city-icon.svg",i.CLOCK_ICON="icons/time-icon.svg",i.CLOSE="icons/close-icon.svg",i.CLOSE_ROUND="icons/close-icon_alternative.svg",i.CLUB="icons/latest-games-icon.svg",i.CORG="icons/settings-icon.svg",i.COUNTRY="icons/country-icon.svg",i.CROWN="icons/crown-icon.svg",i.DELETE="icons/delete.svg",i.DISABLE_EMOTICONS="icons/disable-emoji-icon.svg",i.EASYPAY="icons/easypay.svg",i.EDIT="icons/edit-icon.svg",i.EMOTICON="icons/emoji-icon.svg",i.EPAY="icons/epay.svg",i.EXPAND="icons/expand-icon.svg",i.EYE="icons/last-seen-icon.svg",i.E_MAIL_LOGIN="icons/message.svg",i.FACEBOOK_LOGO="icons/f.svg",i.FACEBOOK_TEXT="icons/facebook.svg",i.FORTUMO="\ue80d",i.GAME_HISTORY="icons/latest-games-icon.svg",i.GIFT="icons/gift-icon.svg",i.GIFTS="icons/gifts-icon-1.svg",i.GIFT_ALL="icons/gifts-icon-1.svg",i.GIFT_NEW="icons/gift-icon.svg",i.GLOBAL_CHAT="icons/global-chat-icon.svg",i.GOOGLE="icons/google.svg",i.GIFTABLE_ITEMS="icons/giftable-packs.svg",i.TWITTER_LOGO="icons/twitter-logo.svg",i.G_PLUS="icons/g-plus.svg",i.GEMS_CONVERSION="icons/convert.svg",i.HEART="icons/heart-icon_1.svg",i.HEART_HOLLOW="icons/heart-icon.svg",i.HIGH_EARNER="icons/icon-reward.svg",i.HOME="icons/home-icon-1.svg",i.HD_RESOLUTION="icons/optimized_rendering-1.svg",i.INVENTORY_ICON="icons/inventory-icon.svg",i.ICON_ACCOUNT="icons/account-items-icon.svg",i.ICON_BACKGROUNDS="icons/backgrounds-icon.svg",i.ICON_DECK="icons/decks-icon.svg",i.ICON_DICE="icons/dice.svg",i.ICON_PAWN="icons/pawn.svg",i.ICON_EMOJI="icons/emoji-icon.svg",i.IN_GAME_EMOJI="icons/icon-lockedphoto-1.svg",i.ICON_GEMS="icons/gems.svg",i.ICON_GEMS_FLAT="icons/gems-flat.svg",i.INFO="icons/info-icon.svg",i.INVITE_FRIENDS="icons/invite-friend-icon.svg",i.INGAME_MUSIC="icons/game-sounds.svg",i.LEADERBOARD="icons/leaderboard-icon.svg",i.LOCKER="icons/lock-icon.svg",i.LOGOUT="icons/join-game.svg",i.MENU="icons/menu.svg",i.MESSAGE="icons/message.svg",i.MINUS="icons/minus.svg",i.MIN_LEVEL_STAR_LOCKED="icons/below-level-icon.svg",i.MICROPHONE_RELOAD="icons/microphone-reload.svg",i.MUTED="icons/sound-icon.svg",i.MUSIC="icons/music.svg",i.NOTIFICATION="icons/notification-icon.svg",i.NEW_MATCH="icons/new-match.svg",i.OPTION_BLIND_NIL="icons/nil_160x160.svg",i.OPTION_CARD_DECK="icons/decks-icon.svg",i.OPTION_DECLARATION="icons/declatarions_megaphone_3.svg",i.OPTION_DOUBLING_CUBE="icons/dice.svg",i.OPTION_GAME_BACKGROUND="icons/backgrounds-icon.svg",i.OPTION_GAME_MODE="icons/switch-mode3-1.svg",i.OPTION_JACK_OF_DIAMONDS="icons/jack-of-diamonds.svg",i.OPTION_MAX_SCORE="icons/max-score.svg",i.OPTION_PASSING="icons/three-cards.svg",i.OPTION_ROUND_LIMIT="icons/calendar-icon.svg",i.OPTION_SCORE="icons/score.svg",i.OPTION_SHOOTING_THE_MOON="icons/bullseye.svg",i.OPTION_SHUFFLE="icons/shuffle-icon.svg",i.OPTION_TURN_TIME="icons/timer-icon.svg",i.OPTION_MIN_LEVEL="icons/below-level-icon.svg",i.OPTION_REWARD="icons/icon-reward.svg",i.PAYPAL="icons/pplogo.svg",i.PHONE="icons/phone.svg",i.PHONE_CALL="icons/phone-icon.svg",i.PHOTO="icons/heart-icon.svg",i.PIN="icons/pin-icon.svg",i.PLUS="icons/plus-icon-1.svg",i.PROMO_TAB="icons/promo-icon.svg",i.PROMO_CODES="icons/promo-code-icon.svg",i.PRICE_TAG="icons/tag-icon.svg",i.PRO_LEADERBOARDS="icons/rating-cup-icon.svg",i.REMOVE_FRIEND="icons/unfriend-icon.svg",i.REMATCH="icons/rematch-icon.svg",i.REMATCH_CIRCLE_ARROW="icons/replay-circle.svg",i.REMATCH_PLAY_ICON="icons/replay-triangle.svg",i.REPORT="icons/report.svg",i.RICHEST_LEADERBOARDS="icons/highest-earners-leaderboard.svg",i.ROCKET="icons/log-in-icon.svg",i.ROTATE_DEVICE="icons/rotate.svg",i.RULES="icons/rules-icon.svg",i.RANKED_SEASON_LEADERBOARD="icons/ranked-season-leaderboard.svg",i.SEARCH="icons/search-icon.svg",i.SECURITY_CHECK="icons/security-check.svg",i.SEND="icons/send-icon.svg",i.SMALL_MESSAGE="icons/message.svg",i.SMS="icons/sms.svg",i.SMS_PHONE="icons/phone-sms1.svg",i.STAR="icons/filled-star-icon.svg",i.STAR_HOLLOW="icons/star-icon.svg",i.STATISTICS="icons/statistics-icon.svg",i.SOUND="icons/sounds-1.svg",i.SOFTWARE_RENDERING="icons/software-rendering.svg",i.TERACOMM="\ue88a",i.TROPHY="icons/cup-icon.svg",i.UNZOOM="icons/arrows-pointing-in-1.svg",i.USER="icons/user-icon.svg",i.USERNAME="icons/user-icon.svg",i.USERS="icons/players-icon.svg",i.UTILITY="icons/utility.svg",i.UtilityVertical="icons/utility-vertical.svg",i.VIVACOM="icons/vivacom.svg",i.WATCH_VIDEO="icons/watch-video-icon.svg",i.WINDOWS="icons/windows.svg",i.XSOLLA="\ue805",i.XSOLLACC="icons/xsolla-card.svg",i.XSOLLAEPAY="icons/epay.svg",i.XSOLLAPAYPAL="icons/pplogo.svg",i.SORT="icons/sort-button.svg",i.JOIN_GAME="icons/join-game.svg",i.SHARE="icons/share.svg",i.WHATSAPP="icons/whatsapp.svg",i.Score="icons/score-02.svg",i.Filter="icons/filter-03.svg",i.Spectators="icons/spectators.svg",i.Joystick="icons/in-a-game.svg",i.BET="icons/icon-bet.svg",i.PlayIcon="icons/play-button.svg",i.PauseIcon="icons/pause-button.svg",i.PhotoIcon="icons/send-image.svg",i.PersonalNotes="icons/personal-notes.svg",i.ConversationOwner="icons/conversation-owner.svg",i.Microphone="icons/record-message.svg",i.CHALLENGES="icons/daily-quests.svg",i.CHALLENGES_PENDING="icons/calendar-hourglass.svg",i.DAILY_BONUS="icons/daily-bonuses.svg",i.TICK_ICON="icons/tick-icon.svg",i.CLUB_ACTIVITY_FEED="icons/activityfeed-1.svg",i.BROWSE_CLUBS="icons/browseclubs-list_of_clubs.svg",i.CLUB_PAGE="icons/clubpage.svg",i.CLUB_INVITE="icons/invitetoclub.svg",i.CLUB_POINTS="icons/clubpoints.svg",i.CLUB_SHARDS="icons/clubshards.svg",i.CLUB_MEMBERS="icons/club-members.svg",i.INFO_ICON="icons/info-icon.svg",i.INFO_ICON_COIN_LIKE="icons/info-icon-coin-like.svg",i.CHANGE_AVATAR="icons/changeprofilepicture.svg",i.PUBLIC_CLUB="icons/openclub.svg",i.PRIVATE_CLUB="icons/privateclub.svg",i.CLOSED_CLUB="icons/closedclub.svg",i.SOCIAL_CLUB="icons/socialclub.svg",i.FIGHT_CLUB="icons/fightingclub.svg",i.BLOG="icons/latest-news-icon.svg",i.CLUB_XP="icons/clubxp.svg",i.FACEBOOK="icons/facebook-1.svg",i.YOUTUBE="icons/youtube.svg",i.TWITTER="icons/twitter.svg",i.INSTAGRAM="icons/instagram.svg",i.Shop="icons/shop-icon.svg",i.PREMIUM_GIFT="icons/premium-gift-icon.svg",i.LANG="icons/language.svg",i.FRIEND_CHAT="icons/messages-from-friends.svg",i.DEALER_DECK="icons/stickthedealer.svg",i.HIDDEN_PROFILE="icons/hiddenprofile.svg",i.GAME_INVITE="icons/gameInvite.svg",i.LIKE_ICON="icons/like.svg",i.PRIVATE_MESSAGE="icons/privateMessage.svg",i.VS="icons/VS.svg",i.KnockoutArrow="icons/knockout-arrow.svg",i.Padlock="icons/padlock.svg",i.TIKTOK="icons/TikTok.svg",i.CalendarPromoTournament="icons/calendar.svg",i.COLON="icons/colon.svg",i.TAMATEM_LOGO="icons/tamatem_logo.svg",i.LOYALTY_BADGE_BLUE="icons/LoyaltyBadge-Blue.svg",i.LOYALTY_BADGE_BRONZE="icons/LoyaltyBadge-Bronze.svg",i.LOYALTY_BADGE_SILVER="icons/LoyaltyBadge-Silver.svg",i.LOYALTY_BADGE_GOLD="icons/LoyaltyBadge-Gold.svg",i.LOYALTY_BADGE_PLATINUM="icons/LoyaltyBadge-Platinum.svg",i.XP_ICON="icons/xp-icon.svg",i.CLUB_INFO_BOTTOM_BAR="icons/club-icon-bb.svg",i.STORE_ICON_BOTTOM_BAR="icons/store-icon-bb.svg",i.HOME_ICON_BOTTOM_BAR="icons/home-icon-bb.svg",i.DAILY_REWARD_ICON_BOTTOM_BAR="icons/daily-reward-icon-bb.svg",i.GLOBAL_CHAT_ICON_BOTTOM_BAR="icons/global-chat-icon-bb.svg",i.CLUB_BROWSE_BOTTOM_BAR="icons/club-icon-browse-bb.svg",i.STAMP_CHECK_TUTORIAL="shop/stamp-card/check_tutorial.svg",i.STAMP_MONEY_TUTORIAL="shop/stamp-card/money_tutorial.svg",i.STAMP_TUTORIAL="shop/stamp-card/stopwatch_tutorial.svg",i.STAMP_STOPWATCH_TUTORIAL="shop/stamp-card/stamp_tutorial.svg",i.STAMP_BORDER="icons/stamp-border.svg",i.TUTORIAL_ICON="icons/tutorial.svg"}(e=t.EIcons||(t.EIcons={}))}(ve||(ve={}));var li=function(t){return t[t.Static=0]="Static",t[t.Dynamic=1]="Dynamic",t[t.Logo=2]="Logo",t[t.Blank=3]="Blank",t}(li||{}),QS=function(t){return t.BackButton="back-button",t}(QS||{});function Ete(t){return vr((n,o)=>{let e,r,i=!1;const s=()=>{e=n.subscribe(eo(o,void 0,void 0,a=>{r||(r=new sn,Qc(t(r)).subscribe(eo(o,()=>e?s():i=!0))),r&&r.next(a)})),i&&(e.unsubscribe(),e=null,i=!1,s())};s()})}class bVe extends zt{constructor(n,o){super()}schedule(n,o=0){return this}}const cA={setInterval(t,n,...o){const{delegate:e}=cA;return null!=e&&e.setInterval?e.setInterval(t,n,...o):setInterval(t,n,...o)},clearInterval(t){const{delegate:n}=cA;return((null==n?void 0:n.clearInterval)||clearInterval)(t)},delegate:void 0};class xU extends bVe{constructor(n,o){super(n,o),this.scheduler=n,this.work=o,this.pending=!1}schedule(n,o=0){var e;if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,o)),this.pending=!0,this.delay=o,this.id=null!==(e=this.id)&&void 0!==e?e:this.requestAsyncId(r,this.id,o),this}requestAsyncId(n,o,e=0){return cA.setInterval(n.flush.bind(n,this),e)}recycleAsyncId(n,o,e=0){if(null!=e&&this.delay===e&&!1===this.pending)return o;null!=o&&cA.clearInterval(o)}execute(n,o){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const e=this._execute(n,o);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,o){let i,e=!1;try{this.work(n)}catch(r){e=!0,i=r||new Error("Scheduled action threw falsy error")}if(e)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){const{id:n,scheduler:o}=this,{actions:e}=o;this.work=this.state=this.scheduler=null,this.pending=!1,On(e,this),null!=n&&(this.id=this.recycleAsyncId(o,n,null)),this.delay=null,super.unsubscribe()}}}const AU={now:()=>(AU.delegate||Date).now(),delegate:void 0};class iP{constructor(n,o=iP.now){this.schedulerActionCtor=n,this.now=o}schedule(n,o=0,e){return new this.schedulerActionCtor(this,n).schedule(e,o)}}iP.now=AU.now;class RU extends iP{constructor(n,o=iP.now){super(n,o),this.actions=[],this._active=!1}flush(n){const{actions:o}=this;if(this._active)return void o.push(n);let e;this._active=!0;do{if(e=n.execute(n.state,n.delay))break}while(n=o.shift());if(this._active=!1,e){for(;n=o.shift();)n.unsubscribe();throw e}}}const oP=new RU(xU),CVe=oP;function xte(t,n){return n?o=>m_(n.pipe(Qi(1),function yVe(){return vr((t,n)=>{t.subscribe(eo(n,sr))})}()),o.pipe(xte(t))):Yc((o,e)=>Qc(t(o,e)).pipe(Qi(1),Tee(o)))}function _u(t=0,n,o=CVe){let e=-1;return null!=n&&(vee(n)?o=n:e=n),new ao(i=>{let r=function SVe(t){return t instanceof Date&&!isNaN(t)}(t)?+t-o.now():t;r<0&&(r=0);let s=0;return o.schedule(function(){i.closed||(i.next(s++),0<=e?this.schedule(void 0,e):i.complete())},r)})}function Ate(t,n=oP){const o=_u(t,n);return xte(()=>o)}var kU=__webpack_require__(76177),b_=__webpack_require__.n(kU),Rte=__webpack_require__(58921),lA=__webpack_require__.n(Rte);
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */class uA{}class dA{}class Cl{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?"string"==typeof n?this.lazyInit=()=>{this.headers=new Map,n.split("\n").forEach(o=>{const e=o.indexOf(":");if(e>0){const i=o.slice(0,e),r=i.toLowerCase(),s=o.slice(e+1).trim();this.maybeSetNormalizedName(i,r),this.headers.has(r)?this.headers.get(r).push(s):this.headers.set(r,[s])}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((o,e)=>{this.setHeaderEntries(e,o)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([o,e])=>{this.setHeaderEntries(o,e)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const o=this.headers.get(n.toLowerCase());return o&&o.length>0?o[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,o){return this.clone({name:n,value:o,op:"a"})}set(n,o){return this.clone({name:n,value:o,op:"s"})}delete(n,o){return this.clone({name:n,value:o,op:"d"})}maybeSetNormalizedName(n,o){this.normalizedNames.has(o)||this.normalizedNames.set(o,n)}init(){this.lazyInit&&(this.lazyInit instanceof Cl?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(o=>{this.headers.set(o,n.headers.get(o)),this.normalizedNames.set(o,n.normalizedNames.get(o))})}clone(n){const o=new Cl;return o.lazyInit=this.lazyInit&&this.lazyInit instanceof Cl?this.lazyInit:this,o.lazyUpdate=(this.lazyUpdate||[]).concat([n]),o}applyUpdate(n){const o=n.name.toLowerCase();switch(n.op){case"a":case"s":let e=n.value;if("string"==typeof e&&(e=[e]),0===e.length)return;this.maybeSetNormalizedName(n.name,o);const i=("a"===n.op?this.headers.get(o):void 0)||[];i.push(...e),this.headers.set(o,i);break;case"d":const r=n.value;if(r){let s=this.headers.get(o);if(!s)return;s=s.filter(a=>-1===r.indexOf(a)),0===s.length?(this.headers.delete(o),this.normalizedNames.delete(o)):this.headers.set(o,s)}else this.headers.delete(o),this.normalizedNames.delete(o)}}setHeaderEntries(n,o){const e=(Array.isArray(o)?o:[o]).map(r=>r.toString()),i=n.toLowerCase();this.headers.set(i,e),this.maybeSetNormalizedName(n,i)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(o=>n(this.normalizedNames.get(o),this.headers.get(o)))}}class TVe{encodeKey(n){return kte(n)}encodeValue(n){return kte(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const IVe=/%(\d[a-f0-9])/gi,MVe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function kte(t){return encodeURIComponent(t).replace(IVe,(n,o)=>{var e;return null!==(e=MVe[o])&&void 0!==e?e:n})}function pA(t){return"".concat(t)}class $l{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new TVe,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function PVe(t,n){const o=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(i=>{const r=i.indexOf("="),[s,a]=-1==r?[n.decodeKey(i),""]:[n.decodeKey(i.slice(0,r)),n.decodeValue(i.slice(r+1))],c=o.get(s)||[];c.push(a),o.set(s,c)}),o}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(o=>{const e=n.fromObject[o],i=Array.isArray(e)?e.map(pA):[pA(e)];this.map.set(o,i)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const o=this.map.get(n);return o?o[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,o){return this.clone({param:n,value:o,op:"a"})}appendAll(n){const o=[];return Object.keys(n).forEach(e=>{const i=n[e];Array.isArray(i)?i.forEach(r=>{o.push({param:e,value:r,op:"a"})}):o.push({param:e,value:i,op:"a"})}),this.clone(o)}set(n,o){return this.clone({param:n,value:o,op:"s"})}delete(n,o){return this.clone({param:n,value:o,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const o=this.encoder.encodeKey(n);return this.map.get(n).map(e=>o+"="+this.encoder.encodeValue(e)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const o=new $l({encoder:this.encoder});return o.cloneFrom=this.cloneFrom||this,o.updates=(this.updates||[]).concat(n),o}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const o=("a"===n.op?this.map.get(n.param):void 0)||[];o.push(pA(n.value)),this.map.set(n.param,o);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let e=this.map.get(n.param)||[];const i=e.indexOf(pA(n.value));-1!==i&&e.splice(i,1),e.length>0?this.map.set(n.param,e):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class OVe{constructor(){this.map=new Map}set(n,o){return this.map.set(n,o),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function Lte(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Dte(t){return typeof Blob<"u"&&t instanceof Blob}function Bte(t){return typeof FormData<"u"&&t instanceof FormData}class rP{constructor(n,o,e,i){var r,s;let a;if(this.url=o,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function EVe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==e?e:null,a=i):a=e,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.context&&(this.context=a.context),a.params&&(this.params=a.params),this.transferCache=a.transferCache),null!==(r=this.headers)&&void 0!==r||(this.headers=new Cl),null!==(s=this.context)&&void 0!==s||(this.context=new OVe),this.params){const c=this.params.toString();if(0===c.length)this.urlWithParams=o;else{const u=o.indexOf("?");this.urlWithParams=o+(-1===u?"?":u<o.length-1?"&":"")+c}}else this.params=new $l,this.urlWithParams=o}serializeBody(){return null===this.body?null:Lte(this.body)||Dte(this.body)||Bte(this.body)||function xVe(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof $l?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||Bte(this.body)?null:Dte(this.body)?this.body.type||null:Lte(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof $l?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(n={}){var o;const e=n.method||this.method,i=n.url||this.url,r=n.responseType||this.responseType,s=void 0!==n.body?n.body:this.body,a=void 0!==n.withCredentials?n.withCredentials:this.withCredentials,c=void 0!==n.reportProgress?n.reportProgress:this.reportProgress;let u=n.headers||this.headers,h=n.params||this.params;const b=null!==(o=n.context)&&void 0!==o?o:this.context;return void 0!==n.setHeaders&&(u=Object.keys(n.setHeaders).reduce((w,R)=>w.set(R,n.setHeaders[R]),u)),n.setParams&&(h=Object.keys(n.setParams).reduce((w,R)=>w.set(R,n.setParams[R]),h)),new rP(e,i,s,{params:h,headers:u,context:b,reportProgress:c,responseType:r,withCredentials:a})}}var C_=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(C_||{});class LU{constructor(n,o=sP.Ok,e="OK"){this.headers=n.headers||new Cl,this.status=void 0!==n.status?n.status:o,this.statusText=n.statusText||e,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class hA extends LU{constructor(n={}){super(n),this.type=C_.ResponseHeader}clone(n={}){return new hA({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class db extends LU{constructor(n={}){super(n),this.type=C_.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new db({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class Mp extends LU{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for ".concat(n.url||"(unknown url)"):"Http failure response for ".concat(n.url||"(unknown url)",": ").concat(n.status," ").concat(n.statusText),this.error=n.error||null}}var sP=function(t){return t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Processing=102]="Processing",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultiStatus=207]="MultiStatus",t[t.AlreadyReported=208]="AlreadyReported",t[t.ImUsed=226]="ImUsed",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.Unused=306]="Unused",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.MisdirectedRequest=421]="MisdirectedRequest",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.Locked=423]="Locked",t[t.FailedDependency=424]="FailedDependency",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",t}(sP||{});function DU(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}let YS=(()=>{var t;class n{constructor(e){this.handler=e}request(e,i,r={}){let s;if(e instanceof rP)s=e;else{let u,h;u=r.headers instanceof Cl?r.headers:new Cl(r.headers),r.params&&(h=r.params instanceof $l?r.params:new $l({fromObject:r.params})),s=new rP(e,i,void 0!==r.body?r.body:null,{headers:u,context:r.context,params:h,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}const a=Xn(s).pipe(ab(u=>this.handler.handle(u)));if(e instanceof rP||"events"===r.observe)return a;const c=a.pipe(bt(u=>u instanceof db));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(jn(u=>{if(null!==u.body&&!(u.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return u.body}));case"blob":return c.pipe(jn(u=>{if(null!==u.body&&!(u.body instanceof Blob))throw new Error("Response is not a Blob.");return u.body}));case"text":return c.pipe(jn(u=>{if(null!==u.body&&"string"!=typeof u.body)throw new Error("Response is not a string.");return u.body}));default:return c.pipe(jn(u=>u.body))}case"response":return c;default:throw new Error("Unreachable: unhandled observe type ".concat(r.observe,"}"))}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new $l).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,DU(r,i))}post(e,i,r={}){return this.request("POST",e,DU(r,i))}put(e,i,r={}){return this.request("PUT",e,DU(r,i))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(uA))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function Fte(t,n){return n(t)}function DVe(t,n){return(o,e)=>n.intercept(o,{handle:i=>t(i,e)})}const FU=new Ot(""),aP=new Ot(""),Ute=new Ot(""),Gte=new Ot("");function NVe(){let t=null;return(n,o)=>{var e;null===t&&(t=(null!==(e=mt(FU,{optional:!0}))&&void 0!==e?e:[]).reduceRight(DVe,Fte));const i=mt(Jv),r=i.add();return t(n,o).pipe(g_(()=>i.remove(r)))}}let Vte=(()=>{var t;class n extends uA{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null,this.pendingTasks=mt(Jv);const r=mt(Gte,{optional:!0});this.backend=null!=r?r:e}handle(e){if(null===this.chain){const r=Array.from(new Set([...this.injector.get(aP),...this.injector.get(Ute,[])]));this.chain=r.reduceRight((s,a)=>function BVe(t,n,o){return(e,i)=>i_(o,()=>n(e,r=>t(r,i)))}(s,a,this.injector),Fte)}const i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(g_(()=>this.pendingTasks.remove(i)))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(dA),T(Id))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const zVe=/^\)\]\}',?\n/;let jte=(()=>{var t;class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new vt(-2800,!1);const i=this.xhrFactory;return(i.\u0275loadImpl?Ks(i.\u0275loadImpl()):Xn(null)).pipe(es(()=>new ao(s=>{const a=i.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((te,ee)=>a.setRequestHeader(te,ee.join(","))),e.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const te=e.detectContentTypeHeader();null!==te&&a.setRequestHeader("Content-Type",te)}if(e.responseType){const te=e.responseType.toLowerCase();a.responseType="json"!==te?te:"text"}const c=e.serializeBody();let u=null;const h=()=>{if(null!==u)return u;const te=a.statusText||"OK",ee=new Cl(a.getAllResponseHeaders()),le=function jVe(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(a)||e.url;return u=new hA({headers:ee,status:a.status,statusText:te,url:le}),u},b=()=>{let{headers:te,status:ee,statusText:le,url:me}=h(),ge=null;ee!==sP.NoContent&&(ge=typeof a.response>"u"?a.responseText:a.response),0===ee&&(ee=ge?sP.Ok:0);let Me=ee>=200&&ee<300;if("json"===e.responseType&&"string"==typeof ge){const Ke=ge;ge=ge.replace(zVe,"");try{ge=""!==ge?JSON.parse(ge):null}catch(Ee){ge=Ke,Me&&(Me=!1,ge={error:Ee,text:ge})}}Me?(s.next(new db({body:ge,headers:te,status:ee,statusText:le,url:me||void 0})),s.complete()):s.error(new Mp({error:ge,headers:te,status:ee,statusText:le,url:me||void 0}))},w=te=>{const{url:ee}=h(),le=new Mp({error:te,status:a.status||0,statusText:a.statusText||"Unknown Error",url:ee||void 0});s.error(le)};let R=!1;const G=te=>{R||(s.next(h()),R=!0);let ee={type:C_.DownloadProgress,loaded:te.loaded};te.lengthComputable&&(ee.total=te.total),"text"===e.responseType&&a.responseText&&(ee.partialText=a.responseText),s.next(ee)},K=te=>{let ee={type:C_.UploadProgress,loaded:te.loaded};te.lengthComputable&&(ee.total=te.total),s.next(ee)};return a.addEventListener("load",b),a.addEventListener("error",w),a.addEventListener("timeout",w),a.addEventListener("abort",w),e.reportProgress&&(a.addEventListener("progress",G),null!==c&&a.upload&&a.upload.addEventListener("progress",K)),a.send(c),s.next({type:C_.Sent}),()=>{a.removeEventListener("error",w),a.removeEventListener("abort",w),a.removeEventListener("load",b),a.removeEventListener("timeout",w),e.reportProgress&&(a.removeEventListener("progress",G),null!==c&&a.upload&&a.upload.removeEventListener("progress",K)),a.readyState!==a.DONE&&a.abort()}})))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(AX))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const UU=new Ot(""),Hte=new Ot("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),qte=new Ot("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class Wte{}let WVe=(()=>{var t;class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=CX(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La),T(t_),T(Hte))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function $Ve(t,n){const o=t.url.toLowerCase();if(!mt(UU)||"GET"===t.method||"HEAD"===t.method||o.startsWith("http://")||o.startsWith("https://"))return n(t);const e=mt(Wte).getToken(),i=mt(qte);return null!=e&&!t.headers.has(i)&&(t=t.clone({headers:t.headers.set(i,e)})),n(t)}var y_=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(y_||{});function pb(t,n){return{\u0275kind:t,\u0275providers:n}}function KVe(...t){const n=[YS,jte,Vte,{provide:uA,useExisting:Vte},{provide:dA,useExisting:jte},{provide:aP,useValue:$Ve,multi:!0},{provide:UU,useValue:!0},{provide:Wte,useClass:WVe}];for(const o of t)n.push(...o.\u0275providers);return function lE(t){return{\u0275providers:t}}(n)}const $te=new Ot("");let Kte=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[KVe(pb(y_.LegacyInterceptors,[{provide:$te,useFactory:NVe},{provide:aP,useExisting:$te,multi:!0}]))]}),n})();var JS,lt,yh,Yo;!function(t){class n extends Error{constructor(){super(),this.name="SystemCompatibilityError"}}t.SystemCompatibilityError=n,t.LocalStorageNotSupportedError=class o extends n{constructor(){super(),this.name="LocalStorageNotSupportedError"}},t.WebSocketNotSupportedError=class e extends n{constructor(){super(),this.name="WebSocketNotSupportedError"}};class i extends n{constructor(){super(),this.name="RendererNotSupportedError"}}t.RendererNotSupportedError=i,t.WebGlNotSupportedError=class r extends i{constructor(){super(),this.name="WebGlNotSupportedError"}},t.CanvasNotSupportedError=class s extends i{constructor(){super(),this.name="CanvasNotSupportedError"}}}(JS||(JS={})),function(t){class n extends Error{constructor(){super(),this.name="NetworkError"}}t.NetworkError=n;class o extends Error{constructor(){super(),this.name="AppDependeciesLoadError"}}t.AppDependeciesLoadError=o;class e extends Error{constructor(ge){super(),this.name="UnknownError",this.wrappedError=ge}}t.UnknownError=e;class i extends Error{constructor(ge){super(),this.name="UnathorizedError",this.wrappedError=ge}}t.UnathorizedError=i;class r extends Error{constructor(){super(),this.name="ServerUnavailableError"}}t.ServerUnavailableError=r;class s extends Error{constructor(ge){super(),this.name="GenericError",this.wrappedError=ge}}t.GenericError=s;class a extends Error{constructor(ge){super(),this.name="StateMissmatch",this.wrappedError=ge}}t.StateMissmatch=a;class c extends Error{constructor(ge){super(),this.name="RoomConnectReject",this.wrappedError=ge}}t.RoomConnectReject=c;class u extends Error{constructor(ge){super(),this.name="NotFriend",this.wrappedError=ge}}t.NotFriend=u;class h extends Error{constructor(ge){super(),this.name="ActionInProgress",this.wrappedError=ge}}t.ActionInProgress=h;class b extends Error{constructor(ge){super(),this.name="NotAllowed",this.wrappedError=ge}}t.NotAllowed=b;class w extends Error{constructor(){super(),this.name="TargetUserBlockedError"}}t.TargetUserBlockedError=w;class R extends Error{constructor(){super(),this.name="SourceUserBlockedError"}}t.SourceUserBlockedError=R;class G extends Error{constructor(){super(),this.name="MembershipRequiredError"}}t.MembershipRequiredError=G;class K extends Error{constructor(ge){super(),this.name="LevelRequiredError",this.level=ge}}t.LevelRequiredError=K;class te extends Error{constructor(){super(),this.name="ForceDisconnect"}}t.ForceDisconnect=te;class ee extends Error{constructor(){super(),this.name="tooManyRequests"}}let le;var me;t.TooManyRequests=ee,(me=le=t.Code||(t.Code={})).NetworkError="NetworkError",me.RoomConnectReject="RoomConnectReject",me.ActionInProgress="ActionInProgress",me.NotAllowed="NotAllowed"}(lt||(lt={})),function(t){class n extends Error{constructor(e){super(),this.property=e,this.name="NotValid"}}t.NotValid=n}(yh||(yh={})),function(t){let n;var w;(w=n=t.Code||(t.Code={})).Kicked="kicked",w.Locked="locked";class o extends Error{constructor(){super(),this.name="MessageTypeDisabledError"}}t.MessageTypeDisabledError=o;class e extends Error{constructor(R){super(),this.name="ChatMutedError",this.muteStatus=R}}t.ChatMutedError=e;class i extends Error{constructor(R){super(),this.name="TimeBetweenActionsError",this.timeSeconds=R}}t.TimeBetweenActionsError=i;class r extends Error{constructor(){super(),this.name="InvalidMessageContentError"}}t.InvalidMessageContentError=r;class s extends Error{constructor(){super(),this.name="DataFormatNotAllowedError"}}t.DataFormatNotAllowedError=s;class a extends Error{constructor(){super(),this.name="MaxSizeExceededError"}}t.MaxSizeExceededError=a;class c extends Error{constructor(){super(),this.name="ForbiddenMessageTextError"}}t.ForbiddenMessageTextError=c;class u extends Error{constructor(){super(),this.name="PrivateTopicDeleted"}}t.PrivateTopicDeleted=u;class h extends Error{constructor(){super(),this.name="UserKickedError"}}t.UserKickedError=h;class b extends Error{constructor(){super(),this.name="ConversationLockedError"}}t.ConversationLockedError=b}(Yo||(Yo={}));class tne extends Error{constructor(){super(),this.name="ClubNameAlreadyTakenError"}}class GU extends Error{constructor(){super(),this.name="InvalidNameError"}}class XS extends Error{constructor(n,o){super(),this.name="UserAlreadyInClubError",this.userId=n,this.clubState=o}}class cP extends Error{constructor(){super(),this.name="ClubFullError"}}class Mm extends Error{constructor(){super(),this.name=gA.ClubNotFoundError}}class $f extends Error{constructor(n,o){super(),this.name="UserNotInClubError",this.userId=n,this.clubState=o}}class hb extends Error{constructor(n){super(),this.name="UserActionForbiddenByRoleError",this.clubState=n}}class mb extends Error{constructor(){super(),this.name="ClubItemNotFoundError"}}class Sh extends Error{constructor(n){super(),this.name=gA.InvalidJoinRequestActionByStatusError,this.joinRequestStatus=n}}class VU extends Error{constructor(n){super(),this.name="MemberStatusOutdatedError",this.currentRole=n}}class fA extends Error{constructor(n){super(),this.name="ClubPrivacyError",this.clubPrivacyStatus=n}}class S_ extends Error{constructor(n){super(),this.name="UserExistingJoinRequest",this.currentJoinRequest=n}}var gA=function(t){return t.ClubNotFoundError="ClubNotFoundError",t.InvalidJoinRequestActionByStatusError="InvalidJoinRequestActionByStatusError",t}(gA||{}),ts=et.Code,t6e=et.Feedback.Cooldown,n6e=et.General.NotFound,i6e=et.Chat.Ownership,o6e=et.General.WalletBalance,r6e=et.Permissions.RequirementNotMeet,s6e=et.General.Banned,a6e=et.Permissions.LimitReached,c6e=Yo.ChatMutedError,l6e=lt.TooManyRequests,u6e=lt.TargetUserBlockedError,d6e=lt.SourceUserBlockedError,nne=lt.UnknownError,ine=lt.NetworkError,p6e=yh.NotValid,h6e=et.Iap.DiscountMobile,m6e=et.General.DeactivatedAccount,f6e=et.General.ExpiredOrWrongToken;class jt{static createErrorInstance(n){if(!(n&&n instanceof Mp&&n.error))return n&&(n instanceof ine||n.status&&0===n.status)?new ine:n&&n.status&&401===n.status?new lt.UnathorizedError:n&&n.status&&n.status>=500?new lt.ServerUnavailableError:n&&n.status&&429==n.status?new l6e:n===Ds.ServerDisconnect?new lt.ForceDisconnect:n&&n instanceof Error?n:new nne(n);switch(n.error.code||n.error.reason||n.error.name){case ts.Muted:return new c6e(n.error.muteStatus);case ts.Cooldown:return new t6e(n.error.cooldown);case ts.TargetProfileBlocked:return new u6e;case ts.MyProfileBlocked:return new d6e;case ts.NotFound:return new n6e;case ts.ExpiredOrWrongToken:return new f6e(void 0);case ts.Banned:return new s6e(n.error.status);case ts.NotValid:return new p6e(n.error.property);case ts.LimitReached:return new a6e(n.error.issuer,n.error.limit);case ts.Ownership:return new i6e;case ts.WalletBalance:return new o6e;case ts.RequirementNotMeet:return new r6e(n.error.requirement);case ts.NotFriend:return new lt.NotFriend;case ts.DiscountMobile:return new h6e;case ts.DeactivatedAccount:return new m6e(n.error);case lt.Code.NotAllowed:return new lt.NotAllowed;case Yo.Code.Kicked:return new Yo.UserKickedError;case Yo.Code.Locked:return new Yo.ConversationLockedError;case ts.ClubNameAlreadyTaken:return new tne;case ts.InvalidClubName:return new GU;case ts.UserAlreadyInClub:const e=n.error;return new XS(e.userId,e.clubState);case ts.ClubFull:return new cP;case ts.ClubNotfound:return new Mm;case ts.UserNotInClub:const i=n.error;return new $f(i.userId,i.clubState);case ts.UserActionForbiddenByRole:return new hb(n.error.clubState);case ts.ClubItemNotFound:return new mb;case ts.InvalidJoinRequestActionByStatus:return new Sh(n.error.joinRequestStatus);case ts.MemberStatusOutdated:return new VU(n.error.currentRole);case ts.ClubPrivacy:return new fA(n.error.clubPrivacyStatus);case ts.UserExistingJoinRequest:return new S_(n.error.currentJoinRequest);case ts.NotAllowed:return new et.Permissions.ActionNotAllowed;case ts.ClubPermissionFail:return new et.Chat.ClubPermissionFail;case ts.ValidationError:return new et.ValidationError;default:return new nne}}}function lP(t){return(lP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function Ro(t,n,o){return(n=function _6e(t){var n=function g6e(t,n){if("object"!==lP(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var e=o.call(t,n||"default");if("object"!==lP(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===lP(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function one(...t){const n=Z3(t),{args:o,keys:e}=bee(t),i=new ao(r=>{const{length:s}=o;if(!s)return void r.complete();const a=new Array(s);let c=s,u=s;for(let h=0;h<s;h++){let b=!1;Qc(o[h]).subscribe(eo(r,w=>{b||(b=!0,u--),a[h]=w},()=>c--,void 0,()=>{(!c||!b)&&(u||r.next(e?Cee(e,a):a),r.complete())}))}});return n?i.pipe(Q3(n)):i}class zU extends sn{constructor(n=1/0,o=1/0,e=AU){super(),this._bufferSize=n,this._windowTime=o,this._timestampProvider=e,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=o===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,o)}next(n){const{isStopped:o,_buffer:e,_infiniteTimeWindow:i,_timestampProvider:r,_windowTime:s}=this;o||(e.push(n),!i&&e.push(r.now()+s)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();const o=this._innerSubscribe(n),{_infiniteTimeWindow:e,_buffer:i}=this,r=i.slice();for(let s=0;s<r.length&&!n.closed;s+=e?1:2)n.next(r[s]);return this._checkFinalizedStatuses(n),o}_trimBuffer(){const{_bufferSize:n,_timestampProvider:o,_buffer:e,_infiniteTimeWindow:i}=this,r=(i?1:2)*n;if(n<1/0&&r<e.length&&e.splice(0,e.length-r),!i){const s=o.now();let a=0;for(let c=1;c<e.length&&e[c]<=s;c+=2)a=c;a&&e.splice(0,a+1)}}}function rne(t={}){const{connector:n=(()=>new sn),resetOnError:o=!0,resetOnComplete:e=!0,resetOnRefCountZero:i=!0}=t;return r=>{let s,a,c,u=0,h=!1,b=!1;const w=()=>{null==a||a.unsubscribe(),a=void 0},R=()=>{w(),s=c=void 0,h=b=!1},G=()=>{const K=s;R(),null==K||K.unsubscribe()};return vr((K,te)=>{u++,!b&&!h&&w();const ee=c=null!=c?c:n();te.add(()=>{u--,0===u&&!b&&!h&&(a=jU(G,i))}),ee.subscribe(te),!s&&u>0&&(s=new Du({next:le=>ee.next(le),error:le=>{b=!0,w(),a=jU(R,o,le),ee.error(le)},complete:()=>{h=!0,w(),a=jU(R,e),ee.complete()}}),Qc(K).subscribe(s))})(r)}}function jU(t,n,...o){if(!0===n)return void t();if(!1===n)return;const e=new Du({next:()=>{e.unsubscribe(),t()}});return Qc(n(...o)).subscribe(e)}function HU(t,n,o){let e,i=!1;return t&&"object"==typeof t?({bufferSize:e=1/0,windowTime:n=1/0,refCount:i=!1,scheduler:o}=t):e=null!=t?t:1/0,rne({connector:()=>new zU(e,n,o),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}class uP{}let sne=(()=>{var t;class n extends uP{getTranslation(e){return Xn({})}}return t=n,Ro(n,"\u0275fac",(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})()),Ro(n,"\u0275prov",be({token:t,factory:t.\u0275fac})),n})();class qU{}let ane=(()=>{var t;class n{handle(e){return e.key}}return t=n,Ro(n,"\u0275fac",function(e){return new(e||t)}),Ro(n,"\u0275prov",be({token:t,factory:t.\u0275fac})),n})();function fb(t){return typeof t<"u"&&null!==t}function WU(t){return t&&"object"==typeof t&&!Array.isArray(t)}function lne(t,n){let o=Object.assign({},t);return WU(t)&&WU(n)&&Object.keys(n).forEach(e=>{WU(n[e])?e in t?o[e]=lne(t[e],n[e]):Object.assign(o,{[e]:n[e]}):Object.assign(o,{[e]:n[e]})}),o}class _A{}let une=(()=>{var t;class n extends _A{constructor(...e){super(...e),Ro(this,"templateMatcher",/{{\s?([^{}\s]*)\s?}}/g)}interpolate(e,i){let r;return r="string"==typeof e?this.interpolateString(e,i):"function"==typeof e?this.interpolateFunction(e,i):e,r}getValue(e,i){let r="string"==typeof i?i.split("."):[i];i="";do{i+=r.shift(),!fb(e)||!fb(e[i])||"object"!=typeof e[i]&&r.length?r.length?i+=".":e=void 0:(e=e[i],i="")}while(r.length);return e}interpolateFunction(e,i){return e(i)}interpolateString(e,i){return i?e.replace(this.templateMatcher,(r,s)=>{let a=this.getValue(i,s);return fb(a)?a:r}):e}}return t=n,Ro(n,"\u0275fac",(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})()),Ro(n,"\u0275prov",be({token:t,factory:t.\u0275fac})),n})();class vA{}let dne=(()=>{var t;class n extends vA{compile(e,i){return e}compileTranslations(e,i){return e}}return t=n,Ro(n,"\u0275fac",(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})()),Ro(n,"\u0275prov",be({token:t,factory:t.\u0275fac})),n})();class pne{constructor(){Ro(this,"defaultLang",void 0),Ro(this,"currentLang",this.defaultLang),Ro(this,"translations",{}),Ro(this,"langs",[]),Ro(this,"onTranslationChange",new ke),Ro(this,"onLangChange",new ke),Ro(this,"onDefaultLangChange",new ke)}}const $U=new Ot("USE_STORE"),KU=new Ot("USE_DEFAULT_LANG"),ZU=new Ot("DEFAULT_LANGUAGE"),QU=new Ot("USE_EXTEND");let ls=(()=>{var t;class n{get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(e){this.isolate?this._currentLang=e:this.store.currentLang=e}get langs(){return this.isolate?this._langs:this.store.langs}set langs(e){this.isolate?this._langs=e:this.store.langs=e}get translations(){return this.isolate?this._translations:this.store.translations}set translations(e){this.isolate?this._translations=e:this.store.translations=e}constructor(e,i,r,s,a,c=!0,u=!1,h=!1,b){Ro(this,"store",void 0),Ro(this,"currentLoader",void 0),Ro(this,"compiler",void 0),Ro(this,"parser",void 0),Ro(this,"missingTranslationHandler",void 0),Ro(this,"useDefaultLang",void 0),Ro(this,"isolate",void 0),Ro(this,"extend",void 0),Ro(this,"loadingTranslations",void 0),Ro(this,"pending",!1),Ro(this,"_onTranslationChange",new ke),Ro(this,"_onLangChange",new ke),Ro(this,"_onDefaultLangChange",new ke),Ro(this,"_defaultLang",void 0),Ro(this,"_currentLang",void 0),Ro(this,"_langs",[]),Ro(this,"_translations",{}),Ro(this,"_translationRequests",{}),this.store=e,this.currentLoader=i,this.compiler=r,this.parser=s,this.missingTranslationHandler=a,this.useDefaultLang=c,this.isolate=u,this.extend=h,b&&this.setDefaultLang(b)}setDefaultLang(e){if(e===this.defaultLang)return;let i=this.retrieveTranslations(e);typeof i<"u"?(null==this.defaultLang&&(this.defaultLang=e),i.pipe(Qi(1)).subscribe(r=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(e===this.currentLang)return Xn(this.translations[e]);let i=this.retrieveTranslations(e);return typeof i<"u"?(this.currentLang||(this.currentLang=e),i.pipe(Qi(1)).subscribe(r=>{this.changeLang(e)}),i):(this.changeLang(e),Xn(this.translations[e]))}retrieveTranslations(e){let i;return(typeof this.translations[e]>"u"||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),i=this._translationRequests[e]),i}getTranslation(e){this.pending=!0;const i=this.currentLoader.getTranslation(e).pipe(HU(1),Qi(1));return this.loadingTranslations=i.pipe(jn(r=>this.compiler.compileTranslations(r,e)),HU(1),Qi(1)),this.loadingTranslations.subscribe({next:r=>{this.translations[e]=this.extend&&this.translations[e]?{...r,...this.translations[e]}:r,this.updateLangs(),this.pending=!1},error:r=>{this.pending=!1}}),i}setTranslation(e,i,r=!1){i=this.compiler.compileTranslations(i,e),this.translations[e]=(r||this.extend)&&this.translations[e]?lne(this.translations[e],i):i,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){e.forEach(i=>{-1===this.langs.indexOf(i)&&this.langs.push(i)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(e,i,r){let s;if(i instanceof Array){let a={},c=!1;for(let u of i)a[u]=this.getParsedResult(e,u,r),Hf(a[u])&&(c=!0);return c?one(i.map(h=>Hf(a[h])?a[h]:Xn(a[h]))).pipe(jn(h=>{let b={};return h.forEach((w,R)=>{b[i[R]]=w}),b})):a}if(e&&(s=this.parser.interpolate(this.parser.getValue(e,i),r)),typeof s>"u"&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(s=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],i),r)),typeof s>"u"){let a={key:i,translateService:this};typeof r<"u"&&(a.interpolateParams=r),s=this.missingTranslationHandler.handle(a)}return typeof s<"u"?s:i}get(e,i){if(!fb(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(ab(r=>Hf(r=this.getParsedResult(r,e,i))?r:Xn(r)));{let r=this.getParsedResult(this.translations[this.currentLang],e,i);return Hf(r)?r:Xn(r)}}getStreamOnTranslationChange(e,i){if(!fb(e)||!e.length)throw new Error('Parameter "key" required');return m_(f_(()=>this.get(e,i)),this.onTranslationChange.pipe(es(r=>{const s=this.getParsedResult(r.translations,e,i);return"function"==typeof s.subscribe?s:Xn(s)})))}stream(e,i){if(!fb(e)||!e.length)throw new Error('Parameter "key" required');return m_(f_(()=>this.get(e,i)),this.onLangChange.pipe(es(r=>{const s=this.getParsedResult(r.translations,e,i);return Hf(s)?s:Xn(s)})))}instant(e,i){if(!fb(e)||!e.length)throw new Error('Parameter "key" required');let r=this.getParsedResult(this.translations[this.currentLang],e,i);if(Hf(r)){if(e instanceof Array){let s={};return e.forEach((a,c)=>{s[e[c]]=e[c]}),s}return e}return r}set(e,i,r=this.currentLang){this.translations[r][e]=this.compiler.compile(i,r),this.updateLangs(),this.onTranslationChange.emit({lang:r,translations:this.translations[r]})}changeLang(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.getTranslation(e)}resetLang(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,typeof e>"u"?void 0:(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e)}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,e}}return t=n,Ro(n,"\u0275fac",function(e){return new(e||t)(T(pne),T(uP),T(vA),T(_A),T(qU),T(KU),T($U),T(QU),T(ZU))}),Ro(n,"\u0275prov",be({token:t,factory:t.\u0275fac})),n})(),v6e=(()=>{var t;class n{static forRoot(e={}){return{ngModule:n,providers:[e.loader||{provide:uP,useClass:sne},e.compiler||{provide:vA,useClass:dne},e.parser||{provide:_A,useClass:une},e.missingTranslationHandler||{provide:qU,useClass:ane},pne,{provide:$U,useValue:e.isolate},{provide:KU,useValue:e.useDefaultLang},{provide:QU,useValue:e.extend},{provide:ZU,useValue:e.defaultLanguage},ls]}}static forChild(e={}){return{ngModule:n,providers:[e.loader||{provide:uP,useClass:sne},e.compiler||{provide:vA,useClass:dne},e.parser||{provide:_A,useClass:une},e.missingTranslationHandler||{provide:qU,useClass:ane},{provide:$U,useValue:e.isolate},{provide:KU,useValue:e.useDefaultLang},{provide:QU,useValue:e.extend},{provide:ZU,useValue:e.defaultLanguage},ls]}}}return t=n,Ro(n,"\u0275fac",function(e){return new(e||t)}),Ro(n,"\u0275mod",en({type:t})),Ro(n,"\u0275inj",Xt({})),n})();var hne=lt.NetworkError;let pi=(()=>{var t;class n{static readTranslation(e,i){return kU(e,{lang:i}).value}constructor(e){this.inited=!1,this.translate=e,this.translationsStorage=[]}readTranslation(e,i=this.getCurrentLang()){return kU(e,{lang:i}).value}init(e){return!0===this.inited?Promise.resolve():new Promise((i,r)=>{this.languageLoadedSubscription=this.translate.onLangChange.asObservable().subscribe(s=>{this.inited=!0,this.addTranslationToStorage(s.lang,s.translations),this.languageLoadedSubscription.unsubscribe(),i()}),this.translate.getTranslation(e).pipe(Ete(s=>s.pipe(Ate(3e3),Qi(5),function wVe(...t){const n=ES(t);return vr((o,e)=>{Y3()(Ks([o,...t],n)).subscribe(e)})}(Wf(new hne))))).toPromise().then(s=>{this.translate.use(e)}).catch(s=>{0===s.status&&r(new hne),r(s)})})}loadTranslation(e){const i=Rte(this.translationsStorage,"lang");return-1===i.indexOf(e)?this.translate.getTranslation(e).toPromise().then(r=>(this.addTranslationToStorage(e,r),r)):Promise.resolve(this.translationsStorage[i.indexOf(e)])}getParsedTranslation(e,i){let r="";return r=i?this.replaceParams(this.instant(e),i):this.instant(e),r}instant(e,i){return this.translate.instant(e,i)}isKeyExisting(e,i){if(!e)return!1;const r=this.translate.instant(e,i);return r&&r!==e}getCurrentLang(){return this.translate.currentLang}use(e){return this.translate.use(e)}addTranslationToStorage(e,i){this.translationsStorage.push({lang:e,translations:i})}replaceParams(e,i){try{return e.replace(/{(\d+)}/g,(r,s)=>i[s-1].toString())}catch(r){return console.warn("getParsedTranslation error: ",r),e}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ls))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class b6e{constructor(n,o){this.visible=n,this.hidden=o,this.visible=!1,this.hidden=!0}}let Cn=(()=>{var t;class n{constructor(e){this.translate=e,this.idNumber=0,this.state=new b6e,this.popup=new Qn({state:this.state,id:0}),this.backButtonEvent=new sn,this.clearPopupQueueEvent=new sn}get(){return this.popup}dynamicPopupContent(e){let i={state:this.setState({visible:!0,hidden:!1,isComponentRef:!0,component:e.component}),id:this.idNumber++},r=Object.keys(e.popupOptions);return ZS()(r,s=>{i.state[s]=e.popupOptions[s]}),i.state.componentData.id=i.id,this.popup.next(i),i.id}show(e,i,r,s){const a=this.translate.getParsedTranslation(e,i),c=r?this.translate.getParsedTranslation(r.translationKey,r.params):void 0;let u={state:this.setState({visible:!0,hidden:!1,message:a,messageKey:e,title:c,type:Bs.Notification,titleType:s}),id:this.idNumber++};return this.popup.next(u),u.id}hide(e){null!=e&&(this.popup.next({state:this.setState({visible:!0,hidden:!0}),id:e}),this.popup.next({state:this.setState({visible:!1,hidden:!0}),id:e}))}removeAll(){this.clearPopupQueueEvent.next()}basic(e){const i=this.translate.getParsedTranslation(e.textParams.translationKey,e.textParams.params),r=this.translate.getParsedTranslation(e.buttons.buttonObject.buttonTextOptions.translationKey,e.buttons.buttonObject.buttonTextOptions.params);let a={state:this.setState({visible:!0,hidden:!1,message:i,messageKey:e.textParams.translationKey,type:Bs.Basic,firstButtonText:r,action:e.buttons&&e.buttons.buttonObject&&e.buttons.buttonObject.action?e.buttons.buttonObject.action:()=>{},popStateHandlerOn:e.popStateHandlerOn}),id:this.idNumber++};return this.popup.next(a),a.id}blocker(e){const i=this.translate.getParsedTranslation(e.textParams.translationKey,e.textParams.params),r=e.buttons&&e.buttons.buttonObject&&e.buttons.buttonObject.buttonTextOptions.translationKey?this.translate.getParsedTranslation(e.buttons.buttonObject.buttonTextOptions.translationKey,e.buttons.buttonObject.buttonTextOptions.params):void 0;let a,s=!!e.withRefreshButton&&e.withRefreshButton;e.buttons&&e.buttons.buttonObject&&e.buttons.buttonObject.action&&(a=e.buttons.buttonObject.action,s=!1);let c={state:this.setState({visible:!0,hidden:!1,message:i,messageKey:e.textParams.translationKey,type:Bs.Blocker,withRefreshButton:s,navigateToBeforeRefresh:e.navigateToBeforeRefresh,action:a,firstButtonText:r}),id:this.idNumber++};return this.popup.next(c),window.history.forward(),c.id}confirm(e){const i=this.translate.getParsedTranslation(e.textParams.translationKey,e.textParams.params);let s={state:this.setState({visible:!0,hidden:!1,message:i,messageKey:e.textParams.translationKey,type:Bs.Confirm,action:e.buttons.action,actionDecline:e.buttons&&e.buttons.actionDecline?e.buttons.actionDecline:()=>{},popStateHandlerOn:e.popStateHandlerOn}),id:this.idNumber++};return this.popup.next(s),s.id}decision(e){var i,r;const s=this.translate.getParsedTranslation(e.textParams.translationKey,e.textParams.params),a=this.translate.getParsedTranslation(e.buttons.firstOption.buttonTextOptions.translationKey),c=this.translate.getParsedTranslation(e.buttons.secondOption.buttonTextOptions.translationKey),u=e.buttons.thirdOption?this.translate.getParsedTranslation(e.buttons.thirdOption.buttonTextOptions.translationKey):"",h=e.buttons.actionDecline?e.buttons.actionDecline:()=>{};e.buttons.firstOption.modifier=null!==(i=e.buttons.firstOption.modifier)&&void 0!==i?i:ve.EButtonModifier.BUTTON_ATTENTION,e.buttons.secondOption.modifier=null!==(r=e.buttons.secondOption.modifier)&&void 0!==r?r:ve.EButtonModifier.BUTTON_NEGATIVE;let b={visible:!0,hidden:!1,message:s,messageKey:e.textParams.translationKey,type:Bs.Decision,firstOption:e.buttons.firstOption,secondOption:e.buttons.secondOption,firstButtonText:a,secondButtonText:c,actionDecline:h,extraType:e.extraType,popStateHandlerOn:e.popStateHandlerOn};e.buttons.thirdOption&&(b.thirdOption=e.buttons.thirdOption,b.thirdButtonText=u);let w={state:this.setState(b),id:this.idNumber++};return this.popup.next(w),w.id}merge(e){const r={visible:!0,hidden:!1,message:this.translate.getParsedTranslation(e.textParams.translationKey,e.textParams.params),messageKey:e.textParams.translationKey,type:Bs.Merge,buttons:e.buttons,popStateHandlerOn:e.popStateHandlerOn};let s={state:this.setState(r),id:this.idNumber++};return this.popup.next(s),s.id}setState(e){return this.state={},this.state={visible:e.hasOwnProperty("visible")?e.visible:this.state.visible,hidden:e.hasOwnProperty("hidden")?e.hidden:this.state.hidden,messageKey:e.hasOwnProperty("messageKey")?e.messageKey:this.state.messageKey,message:e.hasOwnProperty("message")?e.message:this.state.message,type:e.hasOwnProperty("type")?e.type:this.state.type,popStateHandlerOn:e.hasOwnProperty("popStateHandlerOn")?e.popStateHandlerOn:this.state.popStateHandlerOn,typeOfOffer:e.hasOwnProperty("typeOfOffer")?e.typeOfOffer:this.state.typeOfOffer,action:e.hasOwnProperty("action")?e.action:void 0,actionDecline:e.hasOwnProperty("actionDecline")?e.actionDecline:void 0,firstOption:e.hasOwnProperty("firstOption")?e.firstOption:void 0,secondOption:e.hasOwnProperty("secondOption")?e.secondOption:void 0,thirdOption:e.hasOwnProperty("thirdOption")?e.thirdOption:void 0,title:e.hasOwnProperty("title")?e.title:void 0,firstButtonText:e.hasOwnProperty("firstButtonText")?e.firstButtonText:void 0,secondButtonText:e.hasOwnProperty("secondButtonText")?e.secondButtonText:void 0,thirdButtonText:e.hasOwnProperty("thirdButtonText")?e.thirdButtonText:void 0,withRefreshButton:e.hasOwnProperty("withRefreshButton")?e.withRefreshButton:void 0,navigateToBeforeRefresh:e.hasOwnProperty("navigateToBeforeRefresh")?e.navigateToBeforeRefresh:void 0,extraType:e.hasOwnProperty("extraType")?e.extraType:void 0,buttons:e.hasOwnProperty("buttons")?e.buttons:void 0,isComponentRef:e.hasOwnProperty("isComponentRef")?e.isComponentRef:void 0,componentData:e.hasOwnProperty("componentData")?e.componentData:void 0,component:e.hasOwnProperty("component")?e.component:void 0,titleType:e.titleType in li?e.titleType:li.Logo},this.state}}return(t=n).\u0275fac=function(e){return new(e||t)(T(pi))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var gb,Na,Kf=__webpack_require__(99391),Op=__webpack_require__.n(Kf),mne=(__webpack_require__(57271),__webpack_require__(81651)),fne=__webpack_require__(84606),C6e=__webpack_require__(70896),Zf=__webpack_require__(31008),bA=__webpack_require__.n(Zf);class Ys{static getNextHigher(n,o){const e=this.getAllHigher(n,o);return e.length?Zf(e)[0]:void 0}static getNextLower(n,o){const e=this.getAllLower(n,o);return e.length?Zf(e,[],[ie.ESort.Desc])[0]:void 0}static getAllHigher(n,o){return this.getValues(n).filter(e=>e>o)}static getAllLower(n,o){return this.getValues(n).filter(e=>e<o)}static getAllEqualOrHigher(n,o){return[o,...this.getAllHigher(n,o)]}static getAllEqualOrLower(n,o){return[...this.getAllLower(n,o),o]}static compare(n,o){return n>o?1:n<o?-1:0}static parse(n,o){return n[o]}static getNames(n){return Object.keys(n).filter(o=>isNaN(parseInt(o)))}static getValues(n){return this.getNames(n).map(o=>n[o])}}class w_{get length(){return this.set.length}static fromList(n){let o=new w_;return o._setReplace(n),o}constructor(n){this.set=new ie.List(n)}clear(){this.set=new ie.List}first(){return this.remove(this.set.first())}peek(){return this.set.first()}toArray(){return this.set.toArray()}isEmpty(){return!this.set.length}add(n){this.set.add(n)}has(n){return this.set.has(n)}[Symbol.iterator](){let n=0,o=this.set;return{next:()=>n<o.length?{done:!1,value:o[n++]}:{done:!0,value:void 0}}}get(n){if("number"==typeof n)return this.set.get(n);{let o=this.where(n)[0];if(o)return o;throw new ie.ItemNotFoundError("Assertion failed. No item found matching passed partial model.")}}remove(n){return(0,ie.isPrimitive)(n)?this.set.remove(this.where(o=>o===n).toArray()[0]):this.set.remove(this.where(o=>Kf(o,n)).toArray()[0])}removeByProperty(n,o){this.set.remove(this.where(e=>e[n]===o).toArray()[0])}forEach(n){this.set.forEach(n)}_setReplace(n){this.set=n}where(n){return w_.fromList(this.set.where(n))}}!function(t){let n;var i;let o,e;(i=n=t.EScrollScrollableContainerPosition||(t.EScrollScrollableContainerPosition={})).Top="top",i.Bottom="bottom",function(i){i.Top="top",i.Center="center",i.Bottom="bottom",i.ScrollTop="scrollTop",i.ScrollLeft="scrollLeft"}(o=t.EScrollPosition||(t.EScrollPosition={})),function(i){i.Ease="ease",i.Linear="linear",i.EaseIn="ease-in",i.EaseOut="ease-out",i.EaseInOut="ease-in-out"}(e=t.ETimingFunction||(t.ETimingFunction={}))}(Na||(Na={}));class YU{constructor(n,o){this.promise=n,this.scrollContainer=o}clearListeners(){}finish(){}}class cr{constructor(n){this.ngZone=n}static scrollIntoView(n,o={}){const e=this.findScrollableContainer(n);if(!e)return Promise.resolve();let r,i=this.transitions.find(a=>a.scrollContainer===e);i||(r=!0,i=new YU(void 0,e));const s=new Promise(a=>{const c=requestAnimationFrame(()=>{if(r){const ge=()=>{i.clearListeners(),this.transitions.remove(i),a()};i.finish=ge}const u=e.getBoundingClientRect(),h=n.getBoundingClientRect();if(this.isInViewPort(h,u)&&!o.forceScroll)return void i.finish();const b=h.bottom-(e.clientHeight+u.top),w=o.animation&&o.animation.timeMs||0;let R;R=b<0?-Math.min(e.scrollTop,Math.abs(b)):b;const G=o.scrollPosition?o.scrollPosition:Na.EScrollPosition.Bottom;let K;G===Na.EScrollPosition.Bottom?K=R:G===Na.EScrollPosition.Top?K=R+e.clientHeight-n.offsetHeight:G===Na.EScrollPosition.Center&&(K=R+e.clientHeight/2-n.offsetHeight/2);const te=document.createElement("div");if(r){te.style.cssText="\n                                width: 100%;\n                                height: 100%;\n                                transition: transform ".concat(w,"ms ease-in-out;\n                            ");const ge=Array.from(e.childNodes);e.insertBefore(te,void 0),ge.forEach(Me=>te.insertBefore(Me,void 0)),i.finish=()=>{this.transitions.remove(i),i.clearListeners(),a()}}const ee=new MutationObserver(()=>{e.parentElement||le()}),le=()=>{i.finish(),e.scrollTop+=K};i.clearListeners();const me=setTimeout(()=>{te.style.transform="translateY(".concat(-K,"px)"),i.clearListeners=()=>{clearTimeout(me),cancelAnimationFrame(c),e.removeEventListener("transitionend",le),ee.disconnect(),te.parentElement&&(Array.from(te.childNodes).forEach(Me=>{e.insertBefore(Me,void 0)}),te.parentElement.removeChild(te))},w?(e.addEventListener("transitionend",le),ee.observe(e,{subtree:!0,childList:!0})):le()})})});return r&&(this.transitions.add(i),i.promise=s),i.promise}disableScroll(n){const o=parseInt(n.getAttribute("data-scroll-disable-counter"));o?n.setAttribute("data-scroll-disable-counter",(o+1).toString()):(n.setAttribute("data-scroll-disable-counter","1"),n.style.pointerEvents="none")}enableScroll(n){let o=parseInt(n.getAttribute("data-scroll-disable-counter"));isNaN(o)||(--o?n.setAttribute("data-scroll-disable-counter",o.toString()):(n.removeAttribute("data-scroll-disable-counter"),n.style.pointerEvents="auto"))}nativeScrollIntoView(n,o){const e=cr.findScrollableContainer(n);return e?"smooth"!==o.behavior?(n.scrollIntoView(o),o.offset&&(e.scrollTop+=o.offset),Promise.resolve()):new Promise(i=>{requestAnimationFrame(()=>{let r;if("end"===o.block?r=n.offsetTop-(e.clientHeight+n.offsetHeight):"start"===o.block?r=n.offsetTop:"center"===o.block&&(r=n.offsetTop-e.clientHeight/2+n.offsetHeight/2),cr.hasScrolled(e,r))return void i();let u,s=Math.abs(e.scrollTop-r),a=s,c=e.scrollTop;const h=()=>{clearTimeout(u),cr.hasScrolled(e,r)&&(e.removeEventListener("scroll",h),o.offset&&(e.scrollTop+=o.offset),o.preventScroll&&this.enableScroll(e),i()),s=Math.abs(e.scrollTop-r),s>a?(e.scrollTop=c,n.scrollIntoView(o)):u=setTimeout(()=>{n.scrollIntoView(o)},100),c=e.scrollTop,a=s};this.ngZone.runOutsideAngular(()=>{o.preventScroll&&this.disableScroll(e),e.addEventListener("scroll",h)}),n.scrollIntoView(o)})}):Promise.resolve()}scrollScrollableContainer(n,o){if(!cr.isScrollable(n))return Promise.resolve();let i=cr.transitions.find(s=>s.scrollContainer===n);i&&(i.finish(),cr.transitions.remove(i)),i=new YU(void 0,n),cr.transitions.add(i);const r=new Promise(s=>{let a;i.finish=()=>{i.clearListeners(),this.enableScroll(n),cr.transitions.remove(i),s()},i.clearListeners=()=>{n.removeEventListener("scroll",c),n.style.scrollBehavior="auto"},o.scrollTop?a=o.scrollTop:o.scrollPosition===Na.EScrollScrollableContainerPosition.Top?a=0:o.scrollPosition===Na.EScrollScrollableContainerPosition.Bottom&&(a=n.scrollHeight-n.clientHeight);const c=()=>{Math.abs(a-n.scrollTop)<=1&&i.finish()};this.disableScroll(n),o.smooth?(n.style.scrollBehavior="smooth",n.addEventListener("scroll",c),n.scrollTop=a):(n.scrollTop=a,i.finish())});return i.promise=r,i.promise}static hasScrolled(n,o){return n.scrollTop<=0&&o<0||Math.abs(n.scrollTop-(n.scrollHeight-n.clientHeight))<=1&&o>n.scrollTop||Math.abs(o-n.scrollTop)<=1}scrollIntoViewUsingScrollTop(n,o={}){const e=cr.findScrollableContainer(n);if(!e)return Promise.resolve();let r,i=cr.transitions.find(a=>a.scrollContainer===e);i||(r=!0,i=new YU(void 0,e));const s=new Promise(a=>{if(r){const ee=()=>{i.clearListeners(),cr.transitions.remove(i),a()};i.finish=ee}const c=e.getBoundingClientRect(),u=n.getBoundingClientRect();if(cr.isInViewPort(u,c)&&!o.forceScroll)return void i.finish();const h=u.bottom-(e.clientHeight+c.top),b=o.animation&&o.animation.durationMs||0;let w;w=h<0?-Math.min(e.scrollTop,Math.abs(h)):h,r&&(i.finish=()=>{cr.transitions.remove(i),i.clearListeners(),a()});const R=()=>{i.finish()};i.clearListeners();const G=o.scrollPosition?o.scrollPosition:Na.EScrollPosition.Bottom;let K;G===Na.EScrollPosition.Bottom?K=e.scrollTop+w:G===Na.EScrollPosition.Top?K=n.offsetTop:G===Na.EScrollPosition.Center&&(K=e.scrollTop+w+e.clientHeight/2-n.offsetHeight/2),o.offset&&(K+=o.offset),this.scrollElement({element:e,targetScroll:K,animation:o&&o.animation,position:Na.EScrollPosition.ScrollTop}).finally(R),b||R()});return r&&(cr.transitions.add(i),i.promise=s),i.promise}static isInViewPort(n,o){const e=n instanceof HTMLElement?n.getBoundingClientRect():n;return e.top>=o.top&&e.left>=o.left&&e.bottom<=o.bottom&&e.right<=o.right}static findScrollableContainer(n){let o;const e=n.parentElement;if(e){if(!this.isScrollable(e))return this.findScrollableContainer(e);o=e}return o}static isScrollable(n){return this.hasScrollableSpace(n,"x")&&this.hasOverflow(n,"x")||this.hasScrollableSpace(n,"y")&&this.hasOverflow(n,"y")}static hasScrollableSpace(n,o){return"x"===o?n.clientWidth<n.scrollWidth:n.clientHeight<n.scrollHeight}static hasOverflow(n,o){const e=window.getComputedStyle(n),i=e["overflow".concat(o.toUpperCase())],r=e.overflow;return"auto"===r||"scroll"===r||"auto"===i||"scroll"===i}scrollElement(n){return new Promise(o=>{n.element.style["-webkit-overflow-scrolling"]="auto",n.element.style["overflow-scrolling"]="auto";const e=()=>{this.ngZone.run(()=>{o(),n.element.style["-webkit-overflow-scrolling"]="touch",n.element.style["overflow-scrolling"]="touch"})},i=h=>{requestAnimationFrame(()=>{h()})},r=(h,b)=>{h[n.position]=b};if(!n.animation)return r(n.element,n.targetScroll),e();const s=n.element[n.position],a=n.animation.durationMs;let c=0;const u=h=>{if(n.element){c+=5;const b=n.animation.timingFunction(c,h,n.targetScroll-h,a);r(n.element,b),c>=a?e():i(()=>{u(b)})}};i(()=>{u(s)})})}}(gb=cr).transitions=new ie.List,gb.\u0275fac=function(n){return new(n||gb)(T(an))},gb.\u0275prov=be({token:gb,factory:gb.\u0275fac,providedIn:"root"});class ew{constructor(n){this.canceled=!1,this.type=n}cancel(){this.canceled=!0}}class CA extends ew{constructor(n,o){super(n),this.data=o}}class tc{constructor(){this.eventListeners={}}addEventListener(n,o,e){this.eventListeners[n]||(this.eventListeners[n]=[]),this.eventListeners[n].push({listener:o,context:e})}removeEventListener(n,o){if(this.eventListeners[n])if(void 0!==o)for(let e=this.eventListeners[n].length-1;e>=0;e--)this.eventListeners[n][e].listener===o&&(this.eventListeners[n][e].listener=void 0,this.eventListeners[n][e].context=void 0,this.eventListeners[n].splice(e,1));else for(let e=this.eventListeners[n].length-1;e>=0;e--)this.eventListeners[n][e].listener=void 0,this.eventListeners[n][e].context=void 0,this.eventListeners[n].splice(e,1)}emit(n,...o){if(this.eventListeners[n])for(let e=0;e<this.eventListeners[n].length;e++)this.eventListeners[n][e].listener.apply(this.eventListeners[n][e].context,o)}on(n,o){this.addEventListener(n,o)}once(n,o){const e=(...i)=>{o(...i),this.removeEventListener(n,e)};this.on(n,e)}removeListener(n,o){this.removeEventListener(n,o)}removeAllListeners(n){if(void 0!==n){if(!this.eventListeners[n])return;for(let o=this.eventListeners[n].length-1;o>=0;o--)this.eventListeners[n][o].listener=void 0,this.eventListeners[n][o].context=void 0,this.eventListeners[n].splice(o,1)}else this.eventListeners={}}hasEventListener(n,o){if(!this.eventListeners[n])return!1;for(let e=this.eventListeners[n].length-1;e>=0;e--)if(this.eventListeners[n][e].listener===o)return!0;return!1}dispatchEvent(n){if(this.eventListeners[n.type])for(let o=0;o<this.eventListeners[n.type].length&&(this.eventListeners[n.type][o].listener.apply(this.eventListeners[n.type][o].context,[n]),!n.canceled);o++);}}class JU{static processByImageConfig(n,o){return JU.process(n,{maxWidth:o.defaultSize[0],maxHeight:o.defaultSize[1],quality:o.quality/100,outputFormat:o.outputFormat})}static dataURItoBuffer(n){const o=atob(n.split(",")[1]),e=new ArrayBuffer(o.length),i=new Uint8Array(e);for(let r=0;r<o.length;r++)i[r]=o.charCodeAt(r);return e}static getBrowserAutoRotate(){var n=this;return f(function*(){return void 0!==n.browserAutoRotate?n.browserAutoRotate:new Promise((o,e)=>{let r;const s=new Image;s.addEventListener("load",()=>{r=1===s.width&&2===s.height,n.browserAutoRotate=r,o(r)}),s.addEventListener("error",e),s.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})})()}static process(n,o){var e=this;return f(function*(){const i=new Image;return new Promise(function(){var r=f(function*(s,a){const c=function(){var u=f(function*(){try{const h=e.dataURItoBuffer(i.src);let w,b={value:void 0};try{b=fne.load(h).Orientation||b}catch(K){console.log(K)}w=i.width>i.height?(i.width>o.maxWidth?o.maxWidth:i.width)/i.width:(i.height>o.maxHeight?o.maxHeight:i.height)/i.height;const R=yield e.getBrowserAutoRotate(),G=yield mne.compress(n,{height:i.height,width:i.width,quality:o.quality,type:e.createMimeType(o.outputFormat),scale:w,orientation:R?void 0:b.value});s(G)}catch(h){console.warn(h),a()}});return function(){return u.apply(this,arguments)}}();i.addEventListener("load",c),i.addEventListener("error",a);try{i.src=yield n.toBase64()}catch(u){a()}});return function(s,a){return r.apply(this,arguments)}}())})()}static createMimeType(n){return"image/".concat(n)}}class Jn{constructor(n){this.then=(o,e)=>this.racePromise.then(o,e),this.catch=o=>this.racePromise.catch(o),this.finally=o=>this.racePromise.finally(o),this.wrappedPromise=n,this.cancelPromise=new Promise((o,e)=>{this.cancelPromiseMethod=e}),this.cancelled=!1,this.racePromise=Promise.race([this.wrappedPromise,this.cancelPromise])}cancel(){!0!==this.cancelled&&(this.cancelled=!0,this.cancelPromiseMethod(new Cr),this.racePromise=null,this.cancelPromise=null,this.wrappedPromise=null)}cancelPromiseMethod(n){}}class Cr extends Error{constructor(){super(),this.name="PromiseCancelledError"}}class gne extends Error{constructor(n){super(),this.name="PromiseTimeoutError",this.message=n}}class T_{constructor(n,o){this.then=(e,i)=>this.internalPromise.then(e,i),this.catch=e=>this.internalPromise.catch(e),this.finally=e=>this.internalPromise.finally(e),this.execTask=()=>{this.currentActiveTask=new Jn(this.promiseCreatorFunction()),this.currentActiveTask.then(e=>{this.stopTimers(),this.resolve(e)}).catch(e=>{e instanceof Cr?this.stopTimers():this.retriesCount>=this.config.maxRetriesCount?(this.stopTimers(),this.reject(e)):(this.retriesCount++,this.startRetryInterval(this.execTask))})},this.promiseCreatorFunction=n,this.retriesCount=0,null==o&&(o={maxRetriesCount:0,operationTimeoutMs:void 0,retryDelayMs:0}),this.config={maxRetriesCount:o.maxRetriesCount||0,operationTimeoutMs:o.operationTimeoutMs,retryDelayMs:null!=o.retryDelayMs?o.retryDelayMs:0},this.internalPromise=new Promise((e,i)=>{this.resolve=e,this.reject=i}),this.init()}cancel(){this.cancelCurrentActiveTask(),this.stopTimers(),this.reject(new Cr)}init(){this.config.operationTimeoutMs&&this.startOperationTimeout(this.config.operationTimeoutMs),this.execTask()}cancelCurrentActiveTask(){this.currentActiveTask&&(this.stopTimers(),this.currentActiveTask.cancel())}startOperationTimeout(n){this.operationTimeoutId=setTimeout(()=>{console.log(n),this.cancelCurrentActiveTask(),this.reject(new gne)},n)}stopOperationTimeout(){clearTimeout(this.operationTimeoutId)}startRetryInterval(n){this.retryTimeoutId=setTimeout(n,this.config.retryDelayMs)}stopRetryInterval(){clearTimeout(this.retryTimeoutId)}stopTimers(){this.stopOperationTimeout(),this.stopRetryInterval()}}class Gn{constructor(n){let o=n;this.years=Gn.getYears(n),this.yearsTotal=Gn.getYears(n),o-=this.years*Gn.ETime.SecondsPerYear,this.months=Gn.getMonths(o),this.monthsTotal=Gn.getMonths(n),o-=this.months*Gn.ETime.SecondsPerMonth,this.days=Gn.getDays(o),this.daysTotal=Gn.getDays(n),o-=this.days*Gn.ETime.SecondsPerDay,this.hours=Gn.getHours(o),this.hoursTotal=Gn.getHours(n),o-=this.hours*Gn.ETime.SecondsPerHour,this.minutes=Gn.getMinutes(o),this.minutesTotal=Gn.getMinutes(n),o-=this.minutes*Gn.ETime.SecondsPerMinute,this.seconds=o,this.secondsTotal=n,12===this.months&&(this.years+=1,this.yearsTotal+=1,this.months=0,this.days=0,this.hours=0,this.minutes=0,this.seconds=0)}static toSeconds(n){return n/Gn.ETime.MsPerSecond}static getYears(n){return Math.floor(n/Gn.ETime.SecondsPerYear)}static getMonths(n){return Math.floor(n/Gn.ETime.SecondsPerMonth)}static getDays(n){return Math.floor(n/Gn.ETime.SecondsPerDay)}static getHours(n){return Math.floor(n/Gn.ETime.SecondsPerHour%24)}static getMinutes(n){return Math.floor(n/Gn.ETime.SecondsPerMinute%60)}static getBiggestTimePeriodBySeconds(n,o=Rt.Years){return Math.min(n<Gn.ETime.SecondsPerMinute?Rt.Seconds:n<Gn.ETime.SecondsPerHour?Rt.Minutes:n<Gn.ETime.SecondsPerDay?Rt.Hours:n<Gn.ETime.SecondsPerMonth?Rt.Days:n<Gn.ETime.SecondsPerYearByMonths?Rt.Months:Rt.Years,o)}getTotalTimeAmountByPeriod(n){switch(n){case Rt.Seconds:return this.secondsTotal;case Rt.Minutes:return this.minutesTotal;case Rt.Hours:return this.hoursTotal;case Rt.Days:return this.daysTotal;case Rt.Months:return this.monthsTotal;case Rt.Years:return this.yearsTotal}}getTimeAmountByPeriod(n){switch(n){case Rt.Seconds:return this.seconds;case Rt.Minutes:return this.minutes;case Rt.Hours:return this.hours;case Rt.Days:return this.days;case Rt.Months:return this.months;case Rt.Years:return this.years}}static getTimeKey(n,o){const r=1===new Gn(n).getTimeAmountByPeriod(o.period)?_h.Singular:_h.Plural;switch(o.format=o.format||qi.Normal,o.period){case Rt.Seconds:return o.format===qi.Short?"TIME.SECONDS_SHORT":Gn.getKeyByForm(o.period,r);case Rt.Minutes:return o.format===qi.Short?"TIME.MINUTES_SHORT":Gn.getKeyByForm(o.period,r);case Rt.Hours:return o.format===qi.Short?"TIME.HOURS_SHORT":Gn.getKeyByForm(o.period,r);case Rt.Days:return o.format===qi.Short?"TIME.DAYS_SHORT":Gn.getKeyByForm(o.period,r);case Rt.Months:return o.format===qi.Short?"TIME.MONTHS_SHORT":Gn.getKeyByForm(o.period,r);case Rt.Years:return o.format===qi.Short?"TIME.YEARS_SHORT":Gn.getKeyByForm(o.period,r);default:return Gn.getKeyByForm(o.period,r)}}static getKeyByForm(n,o){switch(n){case Rt.Seconds:return o===_h.Singular?"TIME.SECOND":"TIME.SECONDS";case Rt.Minutes:return o===_h.Singular?"TIME.MINUTE":"TIME.MINUTES";case Rt.Hours:return o===_h.Singular?"TIME.HOUR":"TIME.HOURS";case Rt.Days:return o===_h.Singular?"TIME.DAY":"TIME.DAYS";case Rt.Months:return o===_h.Singular?"TIME.MONTH":"TIME.MONTHS";default:return o===_h.Singular?"TIME.YEAR":"TIME.YEARS"}}static compareTwoPeriods(n,o){let e=Gn.getTimePeriodCount(n),i=Gn.getTimePeriodCount(o);return e===i?0:e>i?1:-1}static getTimePeriodCount(n){switch(n){case Rt.Seconds:return 1;case Rt.Minutes:return 2;case Rt.Hours:return 3;case Rt.Days:return 4;case Rt.Months:return 5;case Rt.Years:return 6;default:return 0}}static getPrevTimePeriod(n){switch(n){case Rt.Years:return Rt.Months;case Rt.Months:return Rt.Days;case Rt.Days:return Rt.Hours;case Rt.Hours:return Rt.Minutes;case Rt.Minutes:case Rt.Seconds:return Rt.Seconds}}static getSecondsByPeriod(n){switch(n){case Rt.Years:return Gn.ETime.SecondsPerYear;case Rt.Months:return Gn.ETime.SecondsPerMonth;case Rt.Days:return Gn.ETime.SecondsPerDay;case Rt.Hours:return Gn.ETime.SecondsPerHour;case Rt.Minutes:return Gn.ETime.SecondsPerMinute;case Rt.Seconds:return 1}}}!function(t){let n;var o;(o=n=t.ETime||(t.ETime={}))[o.SecondsPerYearByMonths=31104e3]="SecondsPerYearByMonths",o[o.SecondsPerYear=31536e3]="SecondsPerYear",o[o.SecondsPerMonth=2592e3]="SecondsPerMonth",o[o.SecondsPerDay=86400]="SecondsPerDay",o[o.SecondsPerHour=3600]="SecondsPerHour",o[o.SecondsPerMinute=60]="SecondsPerMinute",o[o.MsPerSecond=1e3]="MsPerSecond"}(Gn||(Gn={}));var fc=function(t){return t.Initial="initial",t.Running="running",t.Cleared="cleared",t.Paused="paused",t}(fc||{});class y6e{constructor(n,o){this.callback=n,this.timeMs=o,this.timeLeft=o,this.state=fc.Initial}start(){(this.getState()===fc.Initial||this.getState()===fc.Cleared)&&this.startInterval(this.timeMs)}restart(){this.clear(),this.start()}pause(){this.getState()===fc.Running&&(this.timeLeft=this.timeLeft-(Date.now()-this.timerStartedTimestamp),this.clear(),this.setState(fc.Paused))}resume(){this.getState()===fc.Paused&&this.startInterval(this.timeLeft)}clear(){clearTimeout(this.internalTimerId),this.setState(fc.Cleared)}getState(){return this.state}startInterval(n){this.timerStartedTimestamp=Date.now(),this.timeLeft=n,this.internalTimerId=setInterval(this.callback,n),this.setState(fc.Running)}setState(n){this.state=n}}class XU{constructor(n,o,e){this.onTimerTickFn=()=>{this.timeLeft-=1e3,this.timeLeft<=0&&this.interval.clear(),this.onTimerTick(this.timeLeft)},this.callback=n,this.onTimerTick=e,this.timeMs=o,this.timeLeft=o,this.state=fc.Initial}start(){(this.getState()===fc.Initial||this.getState()===fc.Cleared)&&this.startTimer(this.timeMs)}restart(){this.clear(),this.start()}pause(){this.getState()===fc.Running&&(this.timeLeft=this.timeLeft-(Date.now()-this.timerStartedTimestamp),this.clear(),this.setState(fc.Paused),this.interval&&this.interval.pause())}resume(){this.getState()===fc.Paused&&(this.startTimer(this.timeLeft),this.interval&&this.interval.resume())}clear(){clearTimeout(this.internalTimeoutId),this.setState(fc.Cleared),this.interval&&this.interval.clear()}getState(){return this.state}startTimer(n){this.timerStartedTimestamp=Date.now(),this.timeLeft=n,this.internalTimeoutId=setTimeout(this.callback,n),this.setState(fc.Running),this.onTimerTick&&(this.interval=new y6e(this.onTimerTickFn,1e3),this.interval.start())}setState(n){this.state=n}}const S6e=(t,n,o,e)=>(t/=e/2)<1?o/2*t*t+n:-o/2*(--t*(t-2)-1)+n;class Om{static isClubMemberRole(n){return Om.allClubMemberPermissionRoles().some(o=>o===n)}static allClubMemberPermissionRoles(){return Ys.getValues(qo).map(n=>Om.toPermissionRole(n))}static toPermissionRole(n){switch(n){case qo.President:return kr.CLUB_PRESIDENT;case qo.VicePresident:return kr.CLUB_VICE_PRESIDENT;case qo.Officer:return kr.CLUB_OFFICER;case qo.Member:return kr.CLUB_MEMBER;default:throw new Error('Permission role for club member role "'.concat(n,'" not found'))}}static permissionToMemberRole(n){switch(n){case kr.CLUB_PRESIDENT:return qo.President;case kr.CLUB_VICE_PRESIDENT:return qo.VicePresident;case kr.CLUB_OFFICER:return qo.Officer;case kr.CLUB_MEMBER:return qo.Member;default:throw new Error('Club member role for permission role "'.concat(n,'" not found'))}}static getNextHigher(n){return Ys.getNextLower(qo,n)}static getNextLower(n){return Ys.getNextHigher(qo,n)}static compare(n,o){return n<o?1:n>o?-1:0}}class yl{constructor(n=_ne){this.config={...n}}useYearsConfig(n){return this.config.years={...this.config.years,...n},this}useMonthsConfig(n){return this.config.months={...this.config.months,...n},this}useDaysConfig(n){return this.config.days={...this.config.days,...n},this}useHoursConfig(n){return this.config.hours={...this.config.hours,...n},this}useMinutesConfig(n){return this.config.minutes={...this.config.minutes,...n},this}useSecondsConfig(n){return this.config.seconds={...this.config.seconds,...n},this}build(){return this.config}}const _ne={years:{period:Rt.Years,max:Rt.Years,min:Rt.Days,showNullValue:!1,showTextPeriod:!0,timeFormat:qi.Short,showDoubleDigits:!1},months:{period:Rt.Months,max:Rt.Months,min:Rt.Days,showNullValue:!1,showTextPeriod:!0,timeFormat:qi.Short,showDoubleDigits:!1},days:{period:Rt.Days,max:Rt.Days,min:Rt.Hours,showNullValue:!1,showTextPeriod:!0,timeFormat:qi.Short,showDoubleDigits:!1},hours:{period:Rt.Hours,max:Rt.Hours,min:Rt.Minutes,showNullValue:!1,showTextPeriod:!0,timeFormat:qi.Short,showDoubleDigits:!1},minutes:{period:Rt.Minutes,max:Rt.Minutes,min:Rt.Minutes,showNullValue:!1,showTextPeriod:!0,timeFormat:qi.Short,showDoubleDigits:!1},seconds:{period:Rt.Seconds,max:Rt.Seconds,min:Rt.Seconds,showNullValue:!1,showTextPeriod:!0,timeFormat:qi.Short,showDoubleDigits:!1}},Zu=(new yl).useYearsConfig({timeFormat:qi.Normal}).useMonthsConfig({timeFormat:qi.Normal}).useDaysConfig({timeFormat:qi.Normal}).useHoursConfig({timeFormat:qi.Normal}).useMinutesConfig({timeFormat:qi.Normal}).useSecondsConfig({timeFormat:qi.Normal}).build();class vne{}class w6e extends vne{constructor(n,o,e){super(),this.domElement=n,this.cssClass=o,this.ngZone=e}play(){return new Promise((n,o)=>{this.domElement.classList.add(this.cssClass);const e=r=>{r.target===this.domElement&&(this.domElement.classList.remove(this.cssClass),this.domElement.removeEventListener("animationend",e),this.domElement.removeEventListener("animationcancel",i),n())},i=r=>{r.target===this.domElement&&(this.domElement.removeEventListener("animationcancel",i),this.domElement.removeEventListener("animationend",e),o(new Error("animation was canceled")))};this.ngZone.runOutsideAngular(()=>{this.domElement.addEventListener("animationend",e),this.domElement.addEventListener("animationcancel",i)})})}}class T6e extends vne{constructor(n,o,e,i){super(),this.domElement=n,this.ngZone=o,this.css=e,this.cssPartialObject=i}play(){return new Promise((n,o)=>{const e=typeof this.css;let i;if("string"===e?this.domElement.classList.add(this.css):i=this.css,this.cssPartialObject&&(i=this.cssPartialObject),i)for(const a in i)this.cssPartialObject.hasOwnProperty(a)&&(this.domElement.style[a]=this.cssPartialObject[a]);const r=a=>{a.target===this.domElement&&("string"===e&&this.domElement.classList.remove(this.css),this.domElement.removeEventListener("transitionend",r),this.domElement.removeEventListener("transitioncancel",s),n())},s=a=>{a.target===this.domElement&&(this.domElement.removeEventListener("transitioncancel",s),this.domElement.removeEventListener("transitionend",r),o(new Error("transition was canceled")))};this.ngZone.runOutsideAngular(()=>{this.domElement.addEventListener("transitionend",r),this.domElement.addEventListener("transitioncancel",s)})})}}let tw=(()=>{var t;class n{constructor(e){this.ngZone=e}createAnimationTween(e,i){return new w6e(e,i,this.ngZone)}createTransitionTween(e,i,r){return new T6e(e,this.ngZone,i,r)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(an))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class R6e{constructor(){this.blockerTypes=[Bs.Blocker,Bs.GdprPopup],this.queue=new w_}getQueueLength(){return this.queue.length}clear(){this.queue.clear()}getFirst(){return this.queue.peek()}isQueueEmpty(){return this.queue.isEmpty()}add(n){this.queue.add(n)}getQueueAsArray(){return this.queue.toArray()}remove(n){-1===n.id?this.queue.first():this.queue.removeByProperty("id",n.id)}doesNotExistsCheck(n,o){if(void 0!==o)return this.queue.get(o).state.message===n.state.message;{let e=this.getQueueLength(),i=!1;for(;e--;)this.getQueueAsArray()[e].state.message!==n.state.message&&(i=!0);return i}}getBlocker(n){let e,o=!1,i=this.getQueueLength();for(;i--;)(-1!==this.blockerTypes.indexOf(this.getQueueAsArray()[i].state.type)||-1!==this.blockerTypes.indexOf(n.state.type))&&(o=!0,e=-1!==this.blockerTypes.indexOf(this.getQueueAsArray()[i].state.type)?this.getQueueAsArray()[i]:n);return e}}var hP=function(t){return t.Marketing="marketing",t.Privacy="privacy",t}(hP||{}),Sne=__webpack_require__(18755);class Js{constructor(n){this.canceled=!1,this.type=n}cancel(){this.canceled=!0}}class Mi extends Js{constructor(n,o){super(n),this.data=o}}class Ep{constructor(){this.eventListeners={}}addEventListener(n,o,e){this.eventListeners[n]||(this.eventListeners[n]=[]),this.eventListeners[n].push({listener:o,context:e})}removeEventListener(n,o){if(this.eventListeners[n])if(void 0!==o)for(let e=this.eventListeners[n].length-1;e>=0;e--)this.eventListeners[n][e].listener===o&&(this.eventListeners[n][e].listener=void 0,this.eventListeners[n][e].context=void 0,this.eventListeners[n].splice(e,1));else for(let e=this.eventListeners[n].length-1;e>=0;e--)this.eventListeners[n][e].listener=void 0,this.eventListeners[n][e].context=void 0,this.eventListeners[n].splice(e,1)}emit(n,...o){if(this.eventListeners[n])for(let e=0;e<this.eventListeners[n].length;e++)this.eventListeners[n][e].listener.apply(this.eventListeners[n][e].context,o)}on(n,o){this.addEventListener(n,o)}once(n,o){const e=(...i)=>{o(...i),this.removeEventListener(n,e)};this.on(n,e)}removeListener(n,o){this.removeEventListener(n,o)}removeAllListeners(n){if(void 0!==n){if(!this.eventListeners[n])return;for(let o=this.eventListeners[n].length-1;o>=0;o--)this.eventListeners[n][o].listener=void 0,this.eventListeners[n][o].context=void 0,this.eventListeners[n].splice(o,1)}else this.eventListeners={}}hasEventListener(n,o){if(!this.eventListeners[n])return!1;for(let e=this.eventListeners[n].length-1;e>=0;e--)if(this.eventListeners[n][e].listener===o)return!0;return!1}dispatchEvent(n){if(this.eventListeners[n.type])for(let o=0;o<this.eventListeners[n.type].length&&(this.eventListeners[n.type][o].listener.apply(this.eventListeners[n.type][o].context,[n]),!n.canceled);o++);}}class Lt{static fetchManifest(n){var o=this;return f(function*(){o.environmentConfig=n;try{const e="".concat(n.apiUrl).concat(n.apiVersion,"/"),i="".concat(e).concat(n.configEndpoint);return Lt.CONFIG=yield fetch(i).then(r=>r.json()),Lt.CONFIG.platform.endPoints.api=e,Lt.CONFIG.platform.endPoints.socketServer=n.socketServer,Lt.CONFIG}catch(e){return Lt.CONFIG={build:{language:"bg"},error:!0},Lt.CONFIG}})()}}let tG=(()=>{var t;class n{constructor(){}websocketSupported(){return window.hasOwnProperty("WebSocket")}localStorageSupported(){try{window.localStorage.setItem("localStorage","local-storage-support-test"),window.localStorage.removeItem("localStorage")}catch(e){return!1}return!0}canvasSupported(){let e=window.document.createElement("canvas"),i=!0;return e.getContext&&e.getContext("2d")||(i=!1),e=null,i}webGlSupported(){let e=!1;if(window.WebGLRenderingContext){let i=window.document.createElement("canvas"),r=["webgl","experimental-webgl","moz-webgl"];for(let s of r)void 0!==i.getContext(s)&&(e=!0);i=null}else console.warn("WebGl is not supported!");return e}handleLocalStorageSupportError(e=Lt.CONFIG.platform.languages.default){window.location.href="./pages/requirements/local_storage.".concat(e,".html")}handleWebSocketSupportError(e=Lt.CONFIG.platform.languages.default){window.location.href="./pages/requirements/websocket.".concat(e,".html")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var wne=JS.LocalStorageNotSupportedError;let Ci=(()=>{var t;class n{constructor(e){this.systemService=e}setItem(e,i){try{window.localStorage.setItem(e,JSON.stringify(i))}catch(r){throw new wne}}getItem(e,i){let r=window.localStorage.getItem(e);try{r=JSON.parse(r)}catch(s){r=i}return null===r&&(r=i),r}removeItem(e){this.throwIfLocalStorageNotSupported(),window.localStorage.removeItem(e)}checkItem(e){return this.throwIfLocalStorageNotSupported(),window.localStorage.hasOwnProperty(e)}throwIfLocalStorageNotSupported(){if(!1===this.systemService.localStorageSupported())throw new wne}}return(t=n).\u0275fac=function(e){return new(e||t)(T(tG))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const nG=new class L6e extends RU{}(class k6e extends xU{constructor(n,o){super(n,o),this.scheduler=n,this.work=o}schedule(n,o=0){return o>0?super.schedule(n,o):(this.delay=o,this.state=n,this.scheduler.flush(this),this)}execute(n,o){return o>0||this.closed?super.execute(n,o):this._execute(n,o)}requestAsyncId(n,o,e=0){return null!=e&&e>0||null==e&&this.delay>0?super.requestAsyncId(n,o,e):(n.flush(this),0)}});function iG(...t){const n=Z3(t);return vr((o,e)=>{const i=t.length,r=new Array(i);let s=t.map(()=>!1),a=!1;for(let c=0;c<i;c++)Qc(t[c]).subscribe(eo(e,u=>{r[c]=u,!a&&!s[c]&&(s[c]=!0,(a=s.every(ka))&&(s=null))},sr));o.subscribe(eo(e,c=>{if(a){const u=[c,...r];e.next(n?n(...u):u)}}))})}function ws(t,n=ka){return t=null!=t?t:B6e,vr((o,e)=>{let i,r=!0;o.subscribe(eo(e,s=>{const a=n(s);(r||!t(i,a))&&(r=!1,i=a,e.next(s))}))})}function B6e(t,n){return t===n}
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */function mi(t){t||(z1(),t=mt(br));const n=new ao(o=>t.onDestroy(o.next.bind(o)));return o=>o.pipe(wn(n))}function oG(t,n){var o,e;const i=!(null!=n&&n.manualCleanup);i&&(null==n||!n.injector)&&z1();const r=i?null!==(o=null==n||null===(e=n.injector)||void 0===e?void 0:e.get(br))&&void 0!==o?o:mt(br):null;let s;s=iF(null!=n&&n.requireSync?{kind:0}:{kind:1,value:null==n?void 0:n.initialValue});const a=t.subscribe({next:c=>s.set({kind:1,value:c}),error:c=>{if(null!=n&&n.rejectErrors)throw c;s.set({kind:2,error:c})}});return null==r||r.onDestroy(a.unsubscribe.bind(a)),nF(()=>{const c=s();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new vt(601,"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}})}const mP={};function he(t,n){if(mP[t]=(mP[t]||0)+1,"function"==typeof n)return rG(t,(...e)=>({...n(...e),type:t}));switch(n?n._as:"empty"){case"empty":return rG(t,()=>({type:t}));case"props":return rG(t,e=>({...e,type:t}));default:throw new Error("Unexpected config.")}}function rG(t,n){return Object.defineProperty(n,"type",{value:t,writable:!1})}const Tne="@ngrx/store/init";let yr=(()=>{var t;class n extends Qn{constructor(){super({type:Tne})}next(e){if("function"==typeof e)throw new TypeError("\n        Dispatch expected an object, instead it received a function.\n        If you're using the createAction function, make sure to invoke the function\n        before dispatching the action. For example, someAction should be someAction().");if(typeof e>"u")throw new TypeError("Actions must be objects");if(typeof e.type>"u")throw new TypeError("Actions must have a type property");super.next(e)}complete(){}ngOnDestroy(){super.complete()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const V6e=[yr],aG=new Ot("@ngrx/store Internal Root Guard"),Pne=new Ot("@ngrx/store Internal Initial State"),cG=new Ot("@ngrx/store Initial State"),Ine=new Ot("@ngrx/store Reducer Factory"),Mne=new Ot("@ngrx/store Internal Reducer Factory Provider"),One=new Ot("@ngrx/store Initial Reducers"),lG=new Ot("@ngrx/store Internal Initial Reducers"),Ene=new Ot("@ngrx/store Store Features"),xne=new Ot("@ngrx/store Internal Store Reducers"),uG=new Ot("@ngrx/store Internal Feature Reducers"),Ane=new Ot("@ngrx/store Internal Feature Configs"),dG=new Ot("@ngrx/store Internal Store Features"),Rne=new Ot("@ngrx/store Internal Feature Reducers Token"),pG=new Ot("@ngrx/store Feature Reducers"),kne=new Ot("@ngrx/store User Provided Meta Reducers"),yA=new Ot("@ngrx/store Meta Reducers"),Lne=new Ot("@ngrx/store Internal Resolved Meta Reducers"),Dne=new Ot("@ngrx/store User Runtime Checks Config"),Bne=new Ot("@ngrx/store Internal User Runtime Checks Config"),fP=new Ot("@ngrx/store Internal Runtime Checks"),gP=new Ot("@ngrx/store Check if Action types are unique");function mG(t,n={}){const o=Object.keys(t),e={};for(let r=0;r<o.length;r++){const s=o[r];"function"==typeof t[s]&&(e[s]=t[s])}const i=Object.keys(e);return function(s,a){s=void 0===s?n:s;let c=!1;const u={};for(let h=0;h<i.length;h++){const b=i[h],R=s[b],G=(0,e[b])(R,a);u[b]=G,c=c||G!==R}return c?u:s}}function Fne(...t){return function(n){if(0===t.length)return n;const o=t[t.length-1];return t.slice(0,-1).reduceRight((i,r)=>r(i),o(n))}}function Une(t,n){return Array.isArray(n)&&n.length>0&&(t=Fne.apply(null,[...n,t])),(o,e)=>{const i=t(o);return(r,s)=>i(r=void 0===r?e:r,s)}}new Ot("@ngrx/store Root Store Provider"),new Ot("@ngrx/store Feature State Provider");class SA extends ao{}class Gne extends yr{}let iw=(()=>{var t;class n extends Qn{get currentReducers(){return this.reducers}constructor(e,i,r,s){super(s(r,i)),this.dispatcher=e,this.initialState=i,this.reducers=r,this.reducerFactory=s}addFeature(e){this.addFeatures([e])}addFeatures(e){const i=e.reduce((r,{reducers:s,reducerFactory:a,metaReducers:c,initialState:u,key:h})=>{const b="function"==typeof s?function j6e(t){const n=Array.isArray(t)&&t.length>0?Fne(...t):o=>o;return(o,e)=>(o=n(o),(i,r)=>o(i=void 0===i?e:i,r))}(c)(s,u):Une(a,c)(s,u);return r[h]=b,r},{});this.addReducers(i)}removeFeature(e){this.removeFeatures([e])}removeFeatures(e){this.removeReducers(e.map(i=>i.key))}addReducer(e,i){this.addReducers({[e]:i})}addReducers(e){this.reducers={...this.reducers,...e},this.updateReducers(Object.keys(e))}removeReducer(e){this.removeReducers([e])}removeReducers(e){e.forEach(i=>{this.reducers=function z6e(t,n){return Object.keys(t).filter(o=>o!==n).reduce((o,e)=>Object.assign(o,{[e]:t[e]}),{})}(this.reducers,i)}),this.updateReducers(e)}updateReducers(e){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:"@ngrx/store/update-reducers",features:e})}ngOnDestroy(){this.complete()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Gne),T(cG),T(One),T(Ine))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const q6e=[iw,{provide:SA,useExisting:iw},{provide:Gne,useExisting:yr}];let wA=(()=>{var t;class n extends sn{ngOnDestroy(){this.complete()}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const W6e=[wA];class fG extends ao{}let gG=(()=>{var t;class n extends Qn{constructor(e,i,r,s){super(s);const h=e.pipe(OS(nG)).pipe(iG(i)).pipe(zx($6e,{state:s}));this.stateSubscription=h.subscribe(({state:b,action:w})=>{this.next(b),r.next(w)}),this.state=oG(this,{manualCleanup:!0,requireSync:!0})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}}return(t=n).INIT=Tne,t.\u0275fac=function(e){return new(e||t)(T(yr),T(SA),T(wA),T(cG))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function $6e(t={state:void 0},[n,o]){const{state:e}=t;return{state:o(e,n),action:n}}const K6e=[gG,{provide:fG,useExisting:gG}];let Jo=(()=>{var t;class n extends ao{constructor(e,i,r){super(),this.actionsObserver=i,this.reducerManager=r,this.source=e,this.state=e.state}select(e,...i){return Q6e.call(null,e,...i)(this)}selectSignal(e,i){return nF(()=>e(this.state()),i)}lift(e){const i=new n(this,this.actionsObserver,this.reducerManager);return i.operator=e,i}dispatch(e){this.actionsObserver.next(e)}next(e){this.actionsObserver.next(e)}error(e){this.actionsObserver.error(e)}complete(){this.actionsObserver.complete()}addReducer(e,i){this.reducerManager.addReducer(e,i)}removeReducer(e){this.reducerManager.removeReducer(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(fG),T(yr),T(iw))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Z6e=[Jo];function Q6e(t,n,...o){return function(i){let r;if("string"==typeof t){const s=[n,...o].filter(Boolean);r=i.pipe(function D6e(...t){const n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return jn(o=>{let e=o;for(let i=0;i<n;i++){const r=null==e?void 0:e[t[i]];if(!(typeof r<"u"))return;e=r}return e})}(t,...s))}else{if("function"!=typeof t)throw new TypeError("Unexpected type '".concat(typeof t,"' in select operator,")+" expected 'string' or 'function'");r=i.pipe(jn(s=>t(s,n)))}return r.pipe(ws())}}const _G="https://ngrx.io/guide/store/configuration/runtime-checks";function Vne(t){return void 0===t}function zne(t){return null===t}function jne(t){return Array.isArray(t)}function Hne(t){return"object"==typeof t&&null!==t}function vG(t){return"function"==typeof t}function bG(t,n){return t===n}function CG(t,n=bG,o=bG){let r,e=null,i=null;return{memoized:function u(){if(void 0!==r)return r.result;if(!e)return i=t.apply(null,arguments),e=arguments,i;if(!function o8e(t,n,o){for(let e=0;e<t.length;e++)if(!o(t[e],n[e]))return!0;return!1}(arguments,e,n))return i;const h=t.apply(null,arguments);return e=arguments,o(i,h)?i:(i=h,h)},reset:function s(){e=null,i=null},setResult:function a(h=void 0){r={result:h}},clearResult:function c(){r=void 0}}}function We(...t){return function s8e(t,n={stateFn:r8e}){return function(...o){let e=o;if(Array.isArray(e[0])){const[h,...b]=e;e=[...h,...b]}else 1===e.length&&function a8e(t){return!!t&&"object"==typeof t&&Object.values(t).every(n=>"function"==typeof n)}(e[0])&&(e=function c8e(t){const n=Object.values(t),o=Object.keys(t);return[...n,(...i)=>o.reduce((r,s,a)=>({...r,[s]:i[a]}),{})]}(e[0]));const i=e.slice(0,e.length-1),r=e[e.length-1],s=i.filter(h=>h.release&&"function"==typeof h.release),a=t(function(...h){return r.apply(null,h)}),c=CG(function(h,b){return n.stateFn.apply(null,[h,i,b,a])});return Object.assign(c.memoized,{release:function u(){c.reset(),a.reset(),s.forEach(h=>h.release())},projector:a.memoized,setResult:c.setResult,clearResult:c.clearResult})}}(CG)(...t)}function r8e(t,n,o,e){if(void 0===o){const r=n.map(s=>s(t));return e.memoized.apply(null,r)}const i=n.map(r=>r(t,o));return e.memoized.apply(null,[...i,o])}function Ts(t){return We(n=>n[t],n=>n)}function d8e(t){return t instanceof Ot?mt(t):t}function p8e(t,n){return n.map((o,e)=>{if(t[e]instanceof Ot){const i=mt(t[e]);return{key:o.key,reducerFactory:i.reducerFactory?i.reducerFactory:mG,metaReducers:i.metaReducers?i.metaReducers:[],initialState:i.initialState}}return o})}function h8e(t){return t.map(n=>n instanceof Ot?mt(n):n)}function yG(t){return"function"==typeof t?t():t}function m8e(t,n){return t.concat(n)}function f8e(){if(mt(Jo,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function SG(t){Object.freeze(t);const n=vG(t);return Object.getOwnPropertyNames(t).forEach(o=>{if(!o.startsWith("\u0275")&&function n8e(t,n){return Object.prototype.hasOwnProperty.call(t,n)}(t,o)&&(!n||"caller"!==o&&"callee"!==o&&"arguments"!==o)){const e=t[o];(Hne(e)||vG(e))&&!Object.isFrozen(e)&&SG(e)}}),t}function wG(t,n=[]){return(Vne(t)||zne(t))&&0===n.length?{path:["root"],value:t}:Object.keys(t).reduce((e,i)=>{if(e)return e;const r=t[i];return function t8e(t){return vG(t)&&t.hasOwnProperty("\u0275cmp")}(r)?e:!(Vne(r)||zne(r)||function X6e(t){return"number"==typeof t}(r)||function J6e(t){return"boolean"==typeof t}(r)||function Y6e(t){return"string"==typeof t}(r)||jne(r))&&(function qne(t){if(!function e8e(t){return Hne(t)&&!jne(t)}(t))return!1;const n=Object.getPrototypeOf(t);return n===Object.prototype||null===n}(r)?wG(r,[...n,i]):{path:[...n,i],value:r})},!1)}function $ne(t,n){if(!1===t)return;const o=t.path.join("."),e=new Error("Detected unserializable ".concat(n,' at "').concat(o,'". ').concat(_G,"#strict").concat(n,"serializability"));throw e.value=t.value,e.unserializablePath=o,e}function b8e(t){return{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function C8e({strictActionSerializability:t,strictStateSerializability:n}){return o=>t||n?function _8e(t,n){return function(o,e){n.action(e)&&$ne(wG(e),"action");const i=t(o,e);return n.state()&&$ne(wG(i),"state"),i}}(o,{action:e=>t&&!TG(e),state:()=>n}):o}function y8e({strictActionImmutability:t,strictStateImmutability:n}){return o=>t||n?function g8e(t,n){return function(o,e){const i=n.action(e)?SG(e):e,r=t(o,i);return n.state()?SG(r):r}}(o,{action:e=>t&&!TG(e),state:()=>n}):o}function TG(t){return t.type.startsWith("@ngrx")}function S8e({strictActionWithinNgZone:t}){return n=>t?function v8e(t,n){return function(o,e){if(n.action(e)&&!an.isInAngularZone())throw new Error("Action '".concat(e.type,"' running outside NgZone. ").concat(_G,"#strictactionwithinngzone"));return t(o,e)}}(n,{action:o=>t&&!TG(o)}):n}function w8e(t){return[{provide:Bne,useValue:t},{provide:Dne,useFactory:T8e,deps:[Bne]},{provide:fP,deps:[Dne],useFactory:b8e},{provide:yA,multi:!0,deps:[fP],useFactory:y8e},{provide:yA,multi:!0,deps:[fP],useFactory:C8e},{provide:yA,multi:!0,deps:[fP],useFactory:S8e}]}function Kne(){return[{provide:gP,multi:!0,deps:[fP],useFactory:P8e}]}function T8e(t){return t}function P8e(t){if(!t.strictActionTypeUniqueness)return;const n=Object.entries(mP).filter(([,o])=>o>1).map(([o])=>o);if(n.length)throw new Error("Action types are registered more than once, ".concat(n.map(o=>'"'.concat(o,'"')).join(", "),". ").concat(_G,"#strictactiontypeuniqueness"))}function Zne(t={},n={}){return[{provide:aG,useFactory:f8e},{provide:Pne,useValue:n.initialState},{provide:cG,useFactory:yG,deps:[Pne]},{provide:lG,useValue:t},{provide:xne,useExisting:t instanceof Ot?t:lG},{provide:One,deps:[lG,[new jy(xne)]],useFactory:d8e},{provide:kne,useValue:n.metaReducers?n.metaReducers:[]},{provide:Lne,deps:[yA,kne],useFactory:m8e},{provide:Mne,useValue:n.reducerFactory?n.reducerFactory:mG},{provide:Ine,deps:[Mne,Lne],useFactory:Une},V6e,q6e,W6e,K6e,Z6e,w8e(n.runtimeChecks),Kne()]}function Qne(t,n,o={}){return[{provide:Ane,multi:!0,useValue:t instanceof Object?{}:o},{provide:Ene,multi:!0,useValue:{key:t instanceof Object?t.name:t,reducerFactory:o instanceof Ot||!o.reducerFactory?mG:o.reducerFactory,metaReducers:o instanceof Ot||!o.metaReducers?[]:o.metaReducers,initialState:o instanceof Ot||!o.initialState?void 0:o.initialState}},{provide:dG,deps:[Ane,Ene],useFactory:p8e},{provide:uG,multi:!0,useValue:t instanceof Object?t.reducer:n},{provide:Rne,multi:!0,useExisting:n instanceof Ot?n:uG},{provide:pG,multi:!0,deps:[uG,[new jy(Rne)]],useFactory:h8e},Kne()]}let Yne=(()=>{var t;class n{constructor(e,i,r,s,a,c){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(yr),T(SA),T(wA),T(Jo),T(aG,8),T(gP,8))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})(),x8e=(()=>{var t;class n{constructor(e,i,r,s,a){this.features=e,this.featureReducers=i,this.reducerManager=r;const c=e.map((u,h)=>{const w=i.shift()[h];return{...u,reducers:w,initialState:yG(u.initialState)}});r.addFeatures(c)}ngOnDestroy(){this.reducerManager.removeFeatures(this.features)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(dG),T(pG),T(iw),T(Yne),T(gP,8))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})(),_b=(()=>{var t;class n{static forRoot(e,i){return{ngModule:Yne,providers:[...Zne(e,i)]}}static forFeature(e,i,r={}){return{ngModule:x8e,providers:[...Qne(e,i,r)]}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();function de(...t){return{reducer:t.pop(),types:t.map(e=>e.type)}}function Sr(t,...n){const o=new Map;for(const e of n)for(const i of e.types){const r=o.get(i);o.set(i,r?(a,c)=>e.reducer(r(a,c),c):e.reducer)}return function(e=t,i){const r=o.get(i.type);return r?r(e,i):e}}function ai(...t){return bt(n=>t.some(o=>"string"==typeof o?o===n.type:o.type===n.type))}function ya(t){return[he(t,n=>n),he("".concat(t," success"),n=>n),he("".concat(t," error"),n=>n)]}let J=(()=>{var t;class n extends Jo{constructor(e,i,r,s){super(e,i,r),this.state=s,n.prototype.select=this.select.bind(this),n.prototype.selectSync=this.selectSync.bind(this),n.prototype.select=this.select.bind(this)}selectSync(e,i){return e(this.state.getValue(),i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(fG),T(yr),T(iw),T(gG))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const A8e=[J,{provide:Jo,useClass:J}];let $r=(()=>{var t;class n{static forRoot(e,i){return{..._b.forRoot(e,i),providers:[..._b.forRoot(e,i).providers,...A8e]}}static forFeature(e,i,r){return _b.forFeature(e,i,r)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();var PG=Symbol.for("immer-nothing"),ow=Symbol.for("immer-draftable"),Er=Symbol.for("immer-state");function Xc(t,...n){throw new Error("[Immer] minified error nr: ".concat(t,". Full error at: https://bit.ly/3cXEKWf"))}var vb=Object.getPrototypeOf;function P_(t){return!!t&&!!t[Er]}function Em(t){var n;return!!t&&(Jne(t)||Array.isArray(t)||!!t[ow]||!(null===(n=t.constructor)||void 0===n||!n[ow])||vP(t)||bP(t))}var R8e=Object.prototype.constructor.toString();function Jne(t){if(!t||"object"!=typeof t)return!1;const n=vb(t);if(null===n)return!0;const o=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===R8e}function bb(t,n){0===Cb(t)?Object.entries(t).forEach(([o,e])=>{n(o,e,t)}):t.forEach((o,e)=>n(e,o,t))}function Cb(t){const n=t[Er];return n?n.type_:Array.isArray(t)?1:vP(t)?2:bP(t)?3:0}function _P(t,n){return 2===Cb(t)?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function Xne(t,n,o){const e=Cb(t);2===e?t.set(n,o):3===e?t.add(o):t[n]=o}function vP(t){return t instanceof Map}function bP(t){return t instanceof Set}function el(t){return t.copy_||t.base_}function MG(t,n){if(vP(t))return new Map(t);if(bP(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);if(!n&&Jne(t))return vb(t)?{...t}:Object.assign(Object.create(null),t);const o=Object.getOwnPropertyDescriptors(t);delete o[Er];let e=Reflect.ownKeys(o);for(let i=0;i<e.length;i++){const r=e[i],s=o[r];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[r]})}return Object.create(vb(t),o)}function OG(t,n=!1){return TA(t)||P_(t)||!Em(t)||(Cb(t)>1&&(t.set=t.add=t.clear=t.delete=L8e),Object.freeze(t),n&&bb(t,(o,e)=>OG(e,!0))),t}function L8e(){Xc(2)}function TA(t){return Object.isFrozen(t)}var CP,EG={};function yb(t){const n=EG[t];return n||Xc(0),n}function PA(){return CP}function tie(t,n){n&&(yb("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=n)}function xG(t){AG(t),t.drafts_.forEach(B8e),t.drafts_=null}function AG(t){t===CP&&(CP=t.parent_)}function nie(t){return CP=function D8e(t,n){return{drafts_:[],parent_:t,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}(CP,t)}function B8e(t){const n=t[Er];0===n.type_||1===n.type_?n.revoke_():n.revoked_=!0}function iie(t,n){n.unfinalizedDrafts_=n.drafts_.length;const o=n.drafts_[0];return void 0!==t&&t!==o?(o[Er].modified_&&(xG(n),Xc(4)),Em(t)&&(t=IA(n,t),n.parent_||MA(n,t)),n.patches_&&yb("Patches").generateReplacementPatches_(o[Er].base_,t,n.patches_,n.inversePatches_)):t=IA(n,o,[]),xG(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),t!==PG?t:void 0}function IA(t,n,o){if(TA(n))return n;const e=n[Er];if(!e)return bb(n,(i,r)=>oie(t,e,n,i,r,o)),n;if(e.scope_!==t)return n;if(!e.modified_)return MA(t,e.base_,!0),e.base_;if(!e.finalized_){e.finalized_=!0,e.scope_.unfinalizedDrafts_--;const i=e.copy_;let r=i,s=!1;3===e.type_&&(r=new Set(i),i.clear(),s=!0),bb(r,(a,c)=>oie(t,e,i,a,c,o,s)),MA(t,i,!1),o&&t.patches_&&yb("Patches").generatePatches_(e,o,t.patches_,t.inversePatches_)}return e.copy_}function oie(t,n,o,e,i,r,s){if(P_(i)){const c=IA(t,i,r&&n&&3!==n.type_&&!_P(n.assigned_,e)?r.concat(e):void 0);if(Xne(o,e,c),!P_(c))return;t.canAutoFreeze_=!1}else s&&o.add(i);if(Em(i)&&!TA(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;IA(t,i),(!n||!n.scope_.parent_)&&MA(t,i)}}function MA(t,n,o=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&OG(n,o)}var RG={get(t,n){if(n===Er)return t;const o=el(t);if(!_P(o,n))return function F8e(t,n,o){var e;const i=rie(n,o);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(t.draft_):void 0}(t,o,n);const e=o[n];return t.finalized_||!Em(e)?e:e===kG(t.base_,n)?(LG(t),t.copy_[n]=SP(e,t)):e},has:(t,n)=>n in el(t),ownKeys:t=>Reflect.ownKeys(el(t)),set(t,n,o){const e=rie(el(t),n);if(null!=e&&e.set)return e.set.call(t.draft_,o),!0;if(!t.modified_){const i=kG(el(t),n),r=null==i?void 0:i[Er];if(r&&r.base_===o)return t.copy_[n]=o,t.assigned_[n]=!1,!0;if(function k8e(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}(o,i)&&(void 0!==o||_P(t.base_,n)))return!0;LG(t),Qf(t)}return t.copy_[n]===o&&(void 0!==o||n in t.copy_)||Number.isNaN(o)&&Number.isNaN(t.copy_[n])||(t.copy_[n]=o,t.assigned_[n]=!0),!0},deleteProperty:(t,n)=>(void 0!==kG(t.base_,n)||n in t.base_?(t.assigned_[n]=!1,LG(t),Qf(t)):delete t.assigned_[n],t.copy_&&delete t.copy_[n],!0),getOwnPropertyDescriptor(t,n){const o=el(t),e=Reflect.getOwnPropertyDescriptor(o,n);return e&&{writable:!0,configurable:1!==t.type_||"length"!==n,enumerable:e.enumerable,value:o[n]}},defineProperty(){Xc(11)},getPrototypeOf:t=>vb(t.base_),setPrototypeOf(){Xc(12)}},yP={};function kG(t,n){const o=t[Er];return(o?el(o):t)[n]}function rie(t,n){if(!(n in t))return;let o=vb(t);for(;o;){const e=Object.getOwnPropertyDescriptor(o,n);if(e)return e;o=vb(o)}}function Qf(t){t.modified_||(t.modified_=!0,t.parent_&&Qf(t.parent_))}function LG(t){t.copy_||(t.copy_=MG(t.base_,t.scope_.immer_.useStrictShallowCopy_))}function SP(t,n){const o=vP(t)?yb("MapSet").proxyMap_(t,n):bP(t)?yb("MapSet").proxySet_(t,n):function N8e(t,n){const o=Array.isArray(t),e={type_:o?1:0,scope_:n?n.scope_:PA(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=e,r=RG;o&&(i=[e],r=yP);const{revoke:s,proxy:a}=Proxy.revocable(i,r);return e.draft_=a,e.revoke_=s,a}(t,n);return(n?n.scope_:PA()).drafts_.push(o),o}function sie(t){if(!Em(t)||TA(t))return t;const n=t[Er];let o;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,o=MG(t,n.scope_.immer_.useStrictShallowCopy_)}else o=MG(t,!0);return bb(o,(e,i)=>{Xne(o,e,sie(i))}),n&&(n.finalized_=!1),o}bb(RG,(t,n)=>{yP[t]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}}),yP.deleteProperty=function(t,n){return yP.set.call(this,t,n,void 0)},yP.set=function(t,n,o){return RG.set.call(this,t[0],n,o,t[0])};var Ld=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(n,o,e)=>{if("function"==typeof n&&"function"!=typeof o){const r=o;o=n;const s=this;return function(c=r,...u){return s.produce(c,h=>o.call(this,h,...u))}}let i;if("function"!=typeof o&&Xc(6),void 0!==e&&"function"!=typeof e&&Xc(7),Em(n)){const r=nie(this),s=SP(n,void 0);let a=!0;try{i=o(s),a=!1}finally{a?xG(r):AG(r)}return tie(r,e),iie(i,r)}if(!n||"object"!=typeof n){if(i=o(n),void 0===i&&(i=n),i===PG&&(i=void 0),this.autoFreeze_&&OG(i,!0),e){const r=[],s=[];yb("Patches").generateReplacementPatches_(n,i,r,s),e(r,s)}return i}Xc(1)},this.produceWithPatches=(n,o)=>{if("function"==typeof n)return(s,...a)=>this.produceWithPatches(s,c=>n(c,...a));let e,i;return[this.produce(n,o,(s,a)=>{e=s,i=a}),e,i]},"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof(null==t?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Em(t)||Xc(8),P_(t)&&(t=function G8e(t){return P_(t)||Xc(10),sie(t)}(t));const n=nie(this),o=SP(t,void 0);return o[Er].isManual_=!0,AG(n),o}finishDraft(t,n){const o=t&&t[Er];(!o||!o.isManual_)&&Xc(9);const{scope_:e}=o;return tie(e,n),iie(void 0,e)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,n){let o;for(o=n.length-1;o>=0;o--){const i=n[o];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}o>-1&&(n=n.slice(o+1));const e=yb("Patches").applyPatches_;return P_(t)?e(t,n):this.produce(t,i=>e(i,n))}},Se=Ld.produce;Ld.produceWithPatches.bind(Ld),Ld.setAutoFreeze.bind(Ld),Ld.setUseStrictShallowCopy.bind(Ld),Ld.applyPatches.bind(Ld),Ld.createDraft.bind(Ld),Ld.finishDraft.bind(Ld);var Sb=__webpack_require__(45350),wb=__webpack_require__.n(Sb);const wP=3e4,wh="ontouchstart"in document,rw="production";var Xs=function(t){return t.domElementId="game",t.gameRoute="game",t}(Xs||{}),TP=function(t){return t.domElementId="bettingGame",t.gameRoute="betting-game/:gameId",t}(TP||{});const DG="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAIAAAAErfB6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAC89JREFUeNrsnVtoHNcZx885M7M3XSwrBIJt6IMl3KrECcWuUhyo7QenenAKcR4KMqR12lC5pJhS3Kf6IXmqCcUUiiHFgkADfbAKyUPb6KEXsEFuC7VTUBNqQx4cU1NqsCxrtbszc/rNrrXaPbO7M7M7M/ud0fdHCLOxnNX89v9dzpV/4fA8I2VXgh4BASYRYBIBJhFgEgEmEWASASbAJAJMIsAkAkwiwCQCTCLABJhEgEkEmESASQSYRIBJBJhEgAkwiQCTCDCJAJMIMIkAk1SZGft9jh20jz9bg+9jRdl88dPPjYndbP+05FLKqtv69298Yn5tlvGCwfiTV1ZuieVrxtWPjLX1LDwQnpnto4emnbfny3sm3c4f5BwrjMsegUyMmrxkNF9YW+eLS8bikqk75iwABrOef2Xz5dlaV3wmK+6SnAc9C4uLCYsZ23/v7n/4Gxdyq7e5vg/HmNh7UGu6YNnLZ8tHvmR3xcZZcVwKI8S/5TK56XBL8C3G46Ns/qQDmFfvCHJwejqw1zl+0IbvYyV2aMru/ZchMkN8jvZQLA6fC54TzOI8LxpWvnufr94WKzcFJGmN4rZOgCEUnz5ahVDcLdH6ZRVZfkQO2GfwvCFGjdbQDSXYpfdMoE4hOs4a6vLChlIeB6AxWWEsOPUGCP5vtvRCN8h6EqhnpuSZUw4E8L/8DXvo1iO1gGuvvPk4vHGfBOfRgem2pGd3zXYftqWDM6fs371bBcwEeFC60P9E/alcyXNwvJJlR2E8M+X+5udVCtED1VMQmSN/bOvBOZE3ZEuosZuxGvT0pMQcq7E7+PypSh8/BcE5ubfkPrJZ+z8PsRqyMgGOrPmj1cAuKJ3grObjh+qgyjvnawQ4clO0MBfZvsKA1ihxM8lNVxnThmQMdTUBjiBoeceio8qV4qucezNeV3Gee81GWFELtPaF+By5YrSYmU/pHYKDFROPj8oTRxwCHEqRBjRa7Zvmm5RltS9HGKWRAj7dl33hK13AjlJOQybGVk5jBAzehfY36k8NOubcb6BWXsEWpTEChvgc9UfMXMKtUfdyWnnlheddAhygw9F73xRao86yfYCfI8BBOrAv2jNKP/tuO7jW4YOFysQoAUdMwEOzb5c0PLNfEuDY6AqDRV2wEXeUVnGOjxLgHiV0KWL2LQz7aboUopN0sFkY8huWtssQCx3g8SgJFYIzH/q6KL+DnyMH9wjRkQDnJSNpFqJD90jg3dSmFiJV0aB9z0gCPGgOHlbv20GOJMDxh2g88Vn6AONJw0JT+3oOzuF1MOXgQZtgYSKon7cBUw6OW2YO9dsjwIPKsKhByjRgYRK77ALGlYAJcPzxmeybbcAc/bteW+cEOEMVlu8p4jnWAxfgv//bCPWmDWSfOBNvRUAhOpanyH0OFgS4i4lvm5rZFz5wPgffvU8huovu/Y/rZV/vSB5GOTi0Pvkcn0MDSj688RkX4LGiPDQdPJuEbgyLc2/Ov2VCCeLzC89j2aSE5ZysA3udKz/cCDMZnCulvYswrFd2W41T05q69J4JX+RgTwtzlbGi3vMH7pq64wbDlnAsgMMEZ+xypLTRLe1AARi8q7t9t1ys/hYzUwQ4+m4zvLLRfUxRAH60kRG+/paJAHv6VLvet2tTwghwZ917kIXrQbjPwSu3BAH2FHIeCSTRVmNAF9+oFhbAH/w17DJJ10bKVxTVzyiGq1sQOfhPH+u8EsfgfLQN8No6H/owFkM1Fn3xt4VH5eAqRaJsqcQuleXikoHhzH9EgKHOev/PwYHaxTfkxXPCu8GjRYAWg30ZtunCD26E2jGIzcR8pEP2pTaps4nDZGJcJvauZREEOKz++M9gEzs1RAMKPG/4WyM8N+6gAwwODiy1UIVoXsRrX4yAgS6U0wEOtvHQNZTyCuwL9TOe54mx9fzwhgVt8Z6n5JU3H6Md6xDjJoPi2Wy7Dg2+Vm7i8gzSsQWotu496J2Gh31Gh8mV1bKNmw3RNegMsXok46HXWf55hdU7GPc3oAbcYxrRGfotNoYeG1hRA+6xCB4AD3Fayb/YfW2dI4zP2AH/uufI5RBN3HoZfEPL1+lqu75C9IfdBy+d6pCCpMF5EePEkX6AWc8pJrsypEfmmzjCfFk0dsBA96fvFzv+J8jB6TPmI+rIxvJ1A9XIhhpu8N8A/tl9b/ttl5XxPM3zSAGtmLCU3veNC7kK4huE9Vjqdvn3+Y7J2K6mNy4NlbPYbSmp98cXraEvyskC4EYy7tgW1zZ5Os/J8y5vo/utH+Xw7APWHjAk49d/UfIzrpVToTuZU0Y23vqliZ8u0+uMDmB87lfF9EstsctShp2hbEY1J5gRwKw+CeFPxtWNJJ0EXa9vwcbikjYLQPXbT+DfA+E6XrWVXG2lvLJySyAvrPQG3FG1cmIm1nzjY0YAOzUE80sEOFElm4kJMAYT26mMKKG6e3IHAfZM/DgNE6O6e3JnAfbK6QojZRZwIxNLus0hw4DBxAm2TAQ4BQVenlUrxznFJB1JgFNV4OVZEKLjbJk6AUZ1BXSmAHsHlk4F72uobcY57iErrr6dkmaAjx0Mu2ulEl/LJDdVwK++5BDgRLQwF7YNcu3YWiZZdpRAPTPl6hKldQI8f7S6ZzLCY62sx9YyuY/UyHHhrE2AYy6ez7+yGc158VVbEKXlhqOY+J2faDC/ocGqSrZ1XHg++nZCCNRmLp5rHqDU4gbnlmhhLPc9I5evGwR40Lz7s2+X8/1uFnUdbhXiK6dt6Z3ZwLcZQzKuLwHgBDiyDk17xg1fOXem4no38cR204MtoebifNvKYOJXX3LzObZ6RyBcII3lzgY/WjBumJY31C/JWWlSxnxhqcHFqNG6SQlMvLhkLC6ZqBb0oAP88mztm7O1uNA2ZRVZfiSB0QnAPFLHzNswX/3IQLJbCQtg6H+AK9CN1AhFUmlCJnUlj3dUluFtW2pZXQvF19U/GEPfVjpkwFAeQzQGtIFTCDGYzWLFXQkPMUKZXRA8v32yIRgaGC9fGxrpIQAGjwLUw1M2fE/Orx1VGJMpbVYTWwdYtpzEA55euSmg5E5zS0QagMeK8sA+F4iCTeEPKUNNvNoKA9usw7bqB/PUt8DUMXukofZOlLeZnE2hvfGgDpWo2jJJbzlA2henuUxWXe/6uxZzz+4Xs1/eNjfwbpg79oM+YnZwAyp8xwPVrxEwMZIh2kZ1loPMvV2HQyRfvibgeyztVjyAIfY2amAt7rdKo9rqg0QR2q22c6cbpAfc5TYo4ITa1qQFgId8UF7v8ZOC2lj3PX7SP2BAuzBXwRyKe4VGg5V2Iw42gomS2XoJRN+Y+xmLhoB88Tubp49W9b1wsD5PzJGa2Ht/9bqs7PKtEzHzOW8h2PxJp1Ll//iXSBBwY25HU+O21ba2N37JMS+xlfXVQi3zV4D56191TxxxgfF/H/CYAYNxL58tf+MrGdrFJ7mZQ/8mG/NXlmgef/r0pDx5zAXA0EPHBvjQtHN5YSMDxlVNXMBt4qaVy23LDcDKJ150wyw3CAUY6qlL393IWyx7cu3YlgMkTrniMofxQrQlJcGAge7b82WWUUnXa4uFLref2jIq4wDAEJnBuyzTinFNTzqMuYiwNKwXYMi4/S11087Eca7pSSVWezVXy9wzMIZGuWP71KsMu/S9sr6dbiRpt+nUfVhT1uJf+EENMEcADP1uCpPwaKK0bptOXWCsDg+/+1Y1LGAIzt+f21l75b1Np1qZ2Bvqat8VB5n43Gt2KMALczvuJITGVLFmgWdNxXnmlDM+GgQY7AutEdt50s7EkIa9jXEtGh+VZ07ZAYB3oH2bJtbusC1lx5TfxCpgKJsH3EmgvYm1Go2VNSltqZj4xBGnK2Cgu0Naox4tk2YmLqsmPvGi2xXw8Wd3+pGPtU3dTOw7gAAc3IzSKuAud1+QiXGXWrb0M+4A+MBeZ4fH54bsim7ldFU1cfOECUH2zUBPDKWW8krzHKA2wF/cS4C3TazV2/Ud9DTVycF7nqL4/ESJXhOQgoPrjL0X/y/AAG+riObpGlSTAAAAAElFTkSuQmCC",aie=function H8e(){let t=null,n=function q8e(){return window.location.href.toString().split("affiliateId=")[1]&&decodeURIComponent((new RegExp("[?|&]affiliateId=([^&;]+?)(&|/|#|;|$|%3F)").exec(window.location.href.toString())||[null,""])[1].replace(/\+/g,"%20"))||null}();return-1!==window.name.indexOf("iframe_canvas_fb")||-1!==window.name.indexOf("iframe_canvas_on_ig")?t=$n.Facebook:n&&n===$n.SpilGames.toString()&&(t=$n.SpilGames),t}()===$n.Facebook,cie=t=>{window.removeEventListener("setConfig",cie),Tb.buildData=t.detail};window.addEventListener("setConfig",cie);let Tb=(()=>{class n{get defaultAvatarPath(){return"avatar/default.png"}get defaultLoggedRoute(){return"/games"}get gameRoute(){return Xs.gameRoute}get defaultNotLoggedRoute(){return aie?"/facebook/splash":"/home"}get translationsPath(){return"".concat(n.buildData.apiUrl,"localizations/")}get imagesPath(){return"assets/".concat(n.buildData.game,"/images")}get soundsPath(){return"assets/".concat(n.buildData.game,"/sounds")}get emojisPath(){return"".concat(this.imagesPath,"/game/emoticons")}get emojisSpritesheetsPath(){return"".concat(this.imagesPath,"/game/emoticons/spritesheets")}get nonGamblingStyleEnabled(){return!1}}return n.isFacebookCanvas=aie,n})();var Ns=function(t){return t.Chiching="walletChipsUpdate",t.Blingbling="blingbling",t.AvatarUpdated="avatar_updated",t.BonusesUpdated="bonusesUpdated",t.DeactivatedAccount="deactivatedAccount",t.XpUpdated="xpUpdated",t.CashBackBonusUpdated="cashbackBonusUpdate",t.LevelUpReward="levelUpReward",t.UpdateState="updateStateV2",t.UpdateGameInventory="gameInventoryUpdated",t.XpBoosterUpdated="xpBoosterUpdated",t}(Ns||{}),PP=function(t){return t.Minislot="minislot",t}(PP||{});const tn=new Ot("Constants",{factory:()=>new Tb}),wr=(t,n)=>{for(const o in n)n.hasOwnProperty(o)&&(!t&&null!=n&&(t={}),!t[o]||"object"!=typeof n[o]||n[o]instanceof Array||null==n[o]?t[o]=n[o]:wr(t[o],n[o]));return"object"==typeof t&&!Sb(n)&&(t={...t}),t};var BG=function(t){return t.Login="Login",t.Logout="Logout",t}(BG||{});function lie(t){return"[Auth] ".concat(t)}he(lie(BG.Login));const sw=he(lie(BG.Logout));let En=(()=>{var t;class n{constructor(e){this.httpClient=e}get(e,i){return this.httpClient.get("".concat(this.getAPIUrl()).concat(e),this.mandatoryOptionsCheckOrCreate(i))}post(e,i=null,r){return this.httpClient.post("".concat(this.getAPIUrl()).concat(e),i,this.mandatoryOptionsCheckOrCreate(r))}put(e,i=null,r){return this.httpClient.put("".concat(this.getAPIUrl()).concat(e),i,this.mandatoryOptionsCheckOrCreate(r))}delete(e,i=null,r){return this.request("DELETE","".concat(this.getAPIUrl()).concat(e),{...i,...this.mandatoryOptionsCheckOrCreate(r)})}head(e,i){return this.httpClient.head("".concat(this.getAPIUrl()).concat(e),this.mandatoryOptionsCheckOrCreate(i))}request(e,i,r){return this.httpClient.request(e,i,r)}getAPIUrl(){return Lt.CONFIG.platform.endPoints.api}mandatoryOptionsCheckOrCreate(e){let i=null;var r,s;return null==e?i={observe:"response",responseType:"json"}:(i=e,i.observe=null!==(r=i.observe)&&void 0!==r?r:"response",i.responseType=null!==(s=i.responseType)&&void 0!==s?s:"json"),i}}return(t=n).\u0275fac=function(e){return new(e||t)(T(YS))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const OA="_appListeners",xp=(t,n)=>{(t=>{t.prototype[OA]=t.prototype[OA]||[]})(t),t.prototype[OA].push(n)};function Wo(){return function(t){return class extends t{constructor(...n){super(...n),((t,n)=>{t.prototype[OA].forEach(o=>o(n))})(t,this)}}}}function vu(){return function(t,n,o){xp(t.constructor,i=>{const r=a=>{"appReady"===a.detail.eventName&&o.value.apply(i,[a.detail.data])},s=t.constructor.prototype.ngOnDestroy;t.constructor.prototype.ngOnDestroy=function(...a){window.removeEventListener("AuthEvent",r),s&&s.apply(this,a)},window.addEventListener("AuthEvent",r)})}}function Lr(){return function(t,n,o){xp(t.constructor,i=>{const r=function(a){"appLogout"===a.detail.eventName&&o.value.apply(i)},s=t.constructor.prototype.ngOnDestroy;t.constructor.prototype.ngOnDestroy=function(...a){window.removeEventListener("AuthEvent",r),s&&s.apply(this,a)},window.addEventListener("AuthEvent",r)})}}function uie(){return function(t,n,o){xp(t.constructor,i=>{const r=a=>{"appPause"===a.detail.eventName&&o.value.apply(i)},s=t.constructor.prototype.ngOnDestroy;t.constructor.prototype.ngOnDestroy=function(...a){window.removeEventListener("AuthEvent",r),s&&s.apply(this,a)},window.addEventListener("AuthEvent",r)})}}function EA(){return function(t,n,o){xp(t.constructor,i=>{const r=a=>{"appResume"===a.detail.eventName&&o.value.apply(i)},s=t.constructor.prototype.ngOnDestroy;t.constructor.prototype.ngOnDestroy=function(...a){window.removeEventListener("AuthEvent",r),s&&s.apply(this,a)},window.addEventListener("AuthEvent",r)})}}const xA="_instanceEnumerated",die=t=>{t.prototype[xA]||(t.prototype[xA]=[])};function ko(){return function(t){var n;return die(t),n=ow,class extends t{constructor(...o){super(...o),this[n]=!0,((t,n)=>{t.prototype[xA].forEach(o=>{Object.defineProperty(n,o.propertyKey,{enumerable:!0,...o.descriptor})})})(t,this)}}}}function un(t=!0){return function(n,o,e){e.enumerable=!0,(t=>{die(t.target.constructor),t.target.constructor.prototype[xA].push(t)})({target:n,propertyKey:o,descriptor:e})}}let Bn=(()=>{var t;class n{constructor(){return null===n.instance&&(this.offset=null,n.instance=this),n.instance}setDateHeaderValue(e){this.dateHeaderValue=e,this.syncClock(),this.calculateTimesOffset(this.dateHeaderValue)}getServerTimeMs(){return null===this.offset&&this.calculateTimesOffset(this.dateHeaderValue),Date.now()+this.offset}getServerTimeS(){return null===this.offset&&this.calculateTimesOffset(this.dateHeaderValue),Math.floor((Date.now()+this.offset)/1e3)}recalcOffset(){this.dateHeaderValue&&this.setDateHeaderValue(new Date(this.getServerTimeMs()).toUTCString())}syncClock(){this.offset=null}calculateTimesOffset(e){let i=Date.parse(new Date(Date.parse(e)).toUTCString());const r=Date.parse((new Date).toUTCString());!0===isNaN(i)&&(i=r),this.offset=i-r}}return(t=n).instance=null,t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Y8e=(()=>{let t=class{constructor(){this.items=[]}};return t=Qe([ko()],t),t})(),J8e=(()=>{let t=class{constructor(){this.city="",this.country=""}};return t=Qe([ko()],t),t})(),xm=(()=>{let t=class{constructor(o){this.isOnline=!1,this.lastSeen=0,this.userId="",wr(this,o)}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),NG=(()=>{let t=class{constructor(){this.currentUsername="",this.usernamesUsed=[]}};return t=Qe([ko()],t),t})(),pie=(()=>{let t=class{constructor(o){wr(this,o)}remainingTime(){return Math.max(this.expiresAt-Bn.instance.getServerTimeS(),0)}isActive(){return Bn.instance.getServerTimeS()<=this.expiresAt}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"remainingTime",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isActive",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),AA=(()=>{let t=class{constructor(o){this.id="",this.purchasedAt=0,this.tiers={},this.loadingState={isLoading:!1,isLoaded:!0},wr(this,o),null!=o&&o.tiers&&Object.keys(o.tiers).map(e=>this.tiers[e]=new pie(o.tiers[e]))}hasTierOrHigher(o){return Ys.getAllEqualOrLower(Fi,o).some(i=>{var r;return null===(r=this.tiers[i])||void 0===r?void 0:r.isActive()})}currentTier(){const o=Object.keys(this.tiers).filter(e=>this.tiers[e].isActive()).sort((e,i)=>Ys.compare(parseInt(e),parseInt(i)))[0];return this.tiers[o]}isActiveSubscription(){var o;return!(null===(o=this.custom)||void 0===o||null===(o=o.subscription)||void 0===o||!o.isActive)}getCurrentSubscriptionItem(){var o;return null===(o=this.custom)||void 0===o||null===(o=o.subscription)||void 0===o?void 0:o.item}willAutorenew(){return!!this.isActiveSubscription()&&!(this.custom.subscription.state===Im.Canceled||this.custom.subscription.state===Im.Expired)}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Boolean)],t.prototype,"hasTierOrHigher",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"currentTier",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isActiveSubscription",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getCurrentSubscriptionItem",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"willAutorenew",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})();var Am;let Lo=Am=class{constructor(n){this.username=new NG,this.level=1,this.status="",this.vip=new AA,this.location=new J8e,this.inventory=new Y8e,wr(this,n),null!=n&&n.vip&&(this.vip=new AA(n.vip))}hasTierOrHigher(n){return Am.hasTierOrHigher(this.vip,n)}getCurrentSubscriptionItem(){return Am.getCurrentSubscriptionItem(this.vip)}static toGDKProfile(n){return{id:n.id,avatar:n.avatar,avatarUrl:n.avatar,level:n.level,isVip:Am.hasTierOrHigher(n.vip,Fi.Full),username:n.username.currentUsername,membershipLevel:0,inventory:Am.mapPlatformToGdkInventory(n.inventory),device:""}}static updateGdkProfileWithPlatformProfile(n,o){return o?{id:n.id,avatar:n.avatar,avatarUrl:n.avatar,level:n.level,isVip:Am.hasTierOrHigher(n.vip,Fi.Full),username:n.username.currentUsername,membershipLevel:0,inventory:o.inventory,device:""}:Am.toGDKProfile(n)}static toPlatformProfile(n){const o=new Am;o.id=n.id,o.avatar=n.avatar,o.inventory.items=n.inventory.map(i=>({item:{id:i.id,type:i.type,durability:void 0,data:{previewUrl:i.data.storeUrl,avatarFrame:i.data.avatarIcon,avatarFrameSpritesheet:i.data.avatarFrameSpritesheet,profileHeaderUrl:i.data.profileHeaderUrl,backgroundUrl:i.data.backgroundUrl,spritesheets:i.data.spritesheets,list:i.data.list,messageColor:i.data.messageColor,nameColor:i.data.nameColor,cardsHDPng:i.data.cardsHDPng,cardsHDJson:i.data.cardsHDJson,cardsSDPng:i.data.cardsSDPng,cardsSDJson:i.data.cardsSDJson,levels:i.data.levels,voiceOverPath:i.data.voiceOverPath}},equipped:i.equipped})),o.username.currentUsername=n.username,o.level=n.level;const e=n.isVip?Fi.Full.toString():"";return o.vip.tiers=n.isVip?{[e]:new pie({purchasedAt:0,expiresAt:1/0,isCurrentActiveTier:!0})}:{},o}static hasTierOrHigher(n,o){return n.hasTierOrHigher(o)}static getCurrentSubscriptionItem(n){return n.getCurrentSubscriptionItem()}toJson(){return JSON.parse(JSON.stringify(this))}static mapPlatformToGdkInventory(n){return n.items.filter(o=>o.item.type===Fe.TG.Frame).filter(o=>o.equipped).map(o=>({id:o.item.id,type:o.item.type,equipped:o.equipped,data:Am.toOldData(o.item)}))}static toOldData(n){let o={};return n.data&&(n.data.previewUrl&&(o.storeUrl=n.data.previewUrl),n.data.avatarFrame&&(o.avatarIcon=n.data.avatarFrame),n.data.avatarFrameSpritesheet&&(o.avatarFrameSpritesheet=n.data.avatarFrameSpritesheet),n.data.profileHeaderUrl&&(o.profileHeaderUrl=n.data.profileHeaderUrl),n.data.backgroundUrl&&(o.backgroundUrl=n.data.backgroundUrl),n.data.spritesheets&&(o.spritesheets=n.data.spritesheets),n.data.list&&(o.list=n.data.list),n.data.messageColor&&(o.messageColor=n.data.messageColor),n.data.nameColor&&(o.nameColor=n.data.nameColor),n.data.cardsHDPng&&(o.cardsHDPng=n.data.cardsHDPng),n.data.cardsHDJson&&(o.cardsHDJson=n.data.cardsHDJson),n.data.cardsSDPng&&(o.cardsSDPng=n.data.cardsSDPng),n.data.cardsSDJson&&(o.cardsSDJson=n.data.cardsSDJson),n.data.voiceOverPath&&(o.voiceOverPath=n.data.voiceOverPath)),o}};Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Boolean)],Lo.prototype,"hasTierOrHigher",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],Lo.prototype,"getCurrentSubscriptionItem",null),Lo=Am=Qe([ko(),ue("design:paramtypes",[Object])],Lo);let X8e=(()=>{let t=class{constructor(){this.multiplier=0,this.expiresAt=0}isActive(){return this.remainingTime()>0}remainingTime(){return Math.max(this.expiresAt-Bn.instance.getServerTimeS(),0)}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isActive",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"remainingTime",null),t=Qe([ko()],t),t})(),RA=(()=>{let t=class{constructor(o){this.currentXp=0,this.level=1,this.xpBooster=new X8e,this.previousLevelAt=0,this.nextLevelAt=0,wr(this,o)}static getUserExperiencePercent(o,e,i){return 0!==i?100*(e-o)/(i-o):0}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),kA=(()=>{let t=class{constructor(o){this.expiresAt=0,this.value="",o&&(this.expiresAt=o.expiresAt,this.value=o.value)}isActive(){return this.expiresAt>Bn.instance.getServerTimeS()}getRemainingTime(){return Math.max(this.expiresAt-Bn.instance.getServerTimeS(),0)}getActiveCodeValue(){return this.isActive()?this.value:""}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isActive",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getRemainingTime",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",String)],t.prototype,"getActiveCodeValue",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})();class eze{constructor(){}load(n,o){let e;return n&&null!=o?e="libs/cordova/".concat(n,"/").concat(o,"/cordova.js?v="):n&&null==o&&(e="libs/cordova/".concat(n,"/cordova.js?v=")),this.loadScript(e,!1,!1)}loadScript(n,o=!1,e=!1){return new Promise((i,r)=>{let s=document.createElement("script");s.async=o,s.defer=e,s.src=n,document.body.appendChild(s),s.addEventListener("load",i),s.addEventListener("error",r)})}}var wi,MP=__webpack_require__(54451),Qu=__webpack_require__.n(MP);!function(t){let n;var Je;let o,e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke,Ee,ot,ct,Pt,gn,qt;(Je=n=t.EEventAction||(t.EEventAction={})).LevelUp="levelUp",Je.Register="register",Je.RewardedVideoWatched="rewardedVideoWatched",function(Je){Je.Show="show",Je.Hide="hide"}(o=t.EBannerAction||(t.EBannerAction={})),function(Je){Je.MyProfile="myProfile"}(e=t.EActionPoint||(t.EActionPoint={})),function(Je){Je.Initialize="initialize"}(i=t.EStoreState||(t.EStoreState={})),function(Je){Je.Show="show",Je.Hide="hide"}(r=t.ESplashScreenAction||(t.ESplashScreenAction={})),function(Je){Je.Interstitial="INTERSTITIAL",Je.RewardedVideo="REWARDED"}(s=t.EDeltaDnaAdType||(t.EDeltaDnaAdType={})),function(Je){Je.Authorized="authorized",Je.NotFound="notFound",Je.Revoked="revoked",Je.Transffered="transferred"}(a=t.EAppleLoginStatus||(t.EAppleLoginStatus={})),function(Je){Je.Login="login",Je.IsSignIn="isSignIn",Je.GetId="getId",Je.SignOut="signOut"}(c=t.EGoogleAction||(t.EGoogleAction={})),function(Je){Je.ShowRewardedVideo="showRewardedVideo",Je.ShowInterstitial="showInterstitial",Je.IsRewardedVideoReady="isRewardedVideoReady",Je.ShowBanner="showBanner",Je.HideBanner="hideBanner"}(u=t.EAdmobAction||(t.EAdmobAction={})),function(Je){Je.Login="login",Je.Api="api",Je.Ui="ui",Je.GetLoginStatus="getLoginStatus",Je.Logout="logout"}(h=t.EFacebookAction||(t.EFacebookAction={})),function(Je){Je.Login="login",Je.Logout="logout"}(b=t.ETwitterAction||(t.ETwitterAction={})),function(Je){Je.Login="login",Je.GetLoginStatus="getLoginStatus",Je.Logout="logout"}(w=t.EAppleAction||(t.EAppleAction={})),function(Je){Je.Login="login"}(R=t.ETamatemAction||(t.ETamatemAction={})),function(Je){Je.GetUnreadMessagesCount="getUnreadMessagesCount",Je.ShowConversation="showConversation",Je.ShowFAQs="showFAQs"}(G=t.EHelpShiftAction||(t.EHelpShiftAction={})),function(Je){Je.Whatsapp="whatsapp"}(K=t.ENativeInviteSchemes||(t.ENativeInviteSchemes={})),function(Je){Je.All="all",Je.Default="default"}(te=t.EOrientationMessageValue||(t.EOrientationMessageValue={})),function(Je){Je.Production="production",Je.Staging="staging"}(ee=t.EAppEnvironment||(t.EAppEnvironment={})),function(Je){Je.Show="show",Je.Hide="hide"}(le=t.ERecordUIAction||(t.ERecordUIAction={})),function(Je){Je.Manual="manual",Je.Auto="auto"}(me=t.ERecordUIType||(t.ERecordUIType={})),function(Je){Je.Join="join",Je.Leave="leave",Je.Kick="kick",Je.Mute="mute",Je.ToggleMic="toggleMic",Je.ToggleSound="toggleSound"}(ge=t.EVivoxAction||(t.EVivoxAction={})),function(Je){Je.VivoxParticipantAdded="vivoxParticipantAdded",Je.VivoxParticipantJoined="vivoxParticipantJoined",Je.VivoxParticipantLeft="vivoxParticipantLeft",Je.VivoxParticipantSpeaking="vivoxParticipantSpeaking",Je.VivoxParticipantMuted="vivoxParticipantMuted",Je.VivoxParticipantRemoved="vivoxParticipantRemoved",Je.VivoxLocalMicToggled="vivoxLocalMicToggled",Je.VivoxLocalSoundToggled="vivoxLocalSoundToggled",Je.VivoxError="vivoxError"}(Me=t.EVivoxEvents||(t.EVivoxEvents={})),function(Je){Je[Je.incorrectAction=1e3]="incorrectAction",Je[Je.incorrectJoinArguments=1001]="incorrectJoinArguments",Je[Je.incorrectMuteArguments=1002]="incorrectMuteArguments",Je[Je.incorrectKickArguments=1003]="incorrectKickArguments",Je[Je.incorrectToggleMicArguments=1004]="incorrectToggleMicArguments",Je[Je.incorrectToggleSoundArguments=1005]="incorrectToggleSoundArguments",Je[Je.joinFailed=1006]="joinFailed"}(Ke=t.EVivoxError||(t.EVivoxError={})),function(Je){Je[Je.participant_left=0]="participant_left",Je[Je.participant_timeout=1]="participant_timeout",Je[Je.participant_kicked=2]="participant_kicked",Je[Je.participant_banned=3]="participant_banned"}(Ee=t.EVivoxParticipantRemovedReason||(t.EVivoxParticipantRemovedReason={})),function(Je){Je[Je.is_moderator_muted=0]="is_moderator_muted",Je[Je.is_muted_for_me=1]="is_muted_for_me"}(ot=t.EVivoxParticipantMutedReason||(t.EVivoxParticipantMutedReason={})),function(Je){Je.Set="set",Je.Remove="remove"}(ct=t.ELocalNotificationAction||(t.ELocalNotificationAction={})),function(Je){Je.Consumable="inapp",Je.Subscription="subs"}(Pt=t.EInAppItemType||(t.EInAppItemType={})),function(Je){Je.ManageSubscriptions="manageSubscriptions"}(gn=t.ENativeScreen||(t.ENativeScreen={})),function(Je){Je.Deferred="DEFERRED",Je.ChargeFullPrice="CHARGE_FULL_PRICE",Je.ChargeProratedPrice="CHARGE_PRORATED_PRICE",Je.WithoutProration="WITHOUT_PRORATION",Je.WithTimeProration="WITH_TIME_PRORATION"}(qt=t.EProrationMode||(t.EProrationMode={}))}(wi||(wi={}));class Pb{constructor(...n){this.events=new tc,this.success=o=>{console.log("Success cb cordova message ",this.action," args:",this.args," ",o),this.events.emit("success",o),this.events.removeAllListeners()},this.fail=o=>{console.log("Fail cb cordova message ",this.action," args:",this.args," ",o),this.events.emit("fail",o),this.events.removeAllListeners()},"string"==typeof n[0]?(this.action=n[0],this.args=n[1],this.onSuccess(n[2]),this.onFail(n[3])):wr(this,n[0])}onSuccess(n){return new ie.EventListener(this.events,"success",n)}onFail(n){return new ie.EventListener(this.events,"fail",n)}}class mie{init(n){return new Promise((o,e)=>{this.addEventListener(Rd.DeviceReady,()=>{this.messages=window.messages,o()}),(new eze).load(n)})}openExternalUrl(n){this.messages.openExternalUrl(n)}quit(){this.messages.quit()}rate(){this.messages.rate()}localNotification(n){this.messages.localNotification(n)}restart(){this.messages.restart()}logout(){this.messages.logout()}sendEvent(n){this.messages.sendEvent(n)}nativeInvite(n){this.messages.nativeInvite(n)}user(n){this.messages.user(n)}store(n){this.messages.store(n)}google(n,o,e){this.messages.google(n,o,e)}apple(n,o,e){this.messages.apple(n,o,e)}facebook(n,o,e){this.messages.facebook(n,o,e)}twitter(n,o,e){this.messages.twitter(n,o,e)}splashScreen(n){this.messages.splashScreen(n)}helpShift(n){this.messages.helpShift(n)}getDeviceInfo(n,o){this.messages.getDeviceInfo(n,o)}admob(n,o,e){this.messages.admob(n,o,e)}actionPoint(n){this.messages.actionPoint(n)}banner(n){this.messages.banner(n)}consumeParameter(n){this.messages.consumeParameter(n)}setOrientation(n){this.messages.setOrientation(n)}enableNotifications(n,o,e={openSettings:!1}){this.messages.enableNotifications(n,o,e)}mobileUser(n,o){this.messages.mobileUser(n,o)}guest(n,o,e){this.messages.guest(n,o,e)}recordMicrophone(n,o,e){this.messages.recordMicrophone(n,o,e)}vivox(n){this.messages.vivox(n)}addVivoxEventListener(n,o){this.messages.addVivoxEventListener(n,o)}removeVivoxEventListener(n,o){this.messages.removeVivoxEventListener(n,o)}showAppConsole(){this.messages.showAppConsole()}trackError(n){try{this.messages.trackError({name:n.name,data:JSON.stringify(n.data)})}catch(o){console.warn(o)}}showOnboarding(n,o){this.messages.showOnboarding(n,o)}open(n){this.messages.open(n)}addEventListener(n,o){window.document.addEventListener(n.toString(),o)}removeEventListener(n,o){window.document.removeEventListener(n.toString(),o)}tamatem(n,o,e){this.messages.tamatem(n,o,e)}}class tze extends Pb{constructor(){super(...arguments),this.action="get"}}class FG extends Pb{constructor(){super(...arguments),this.action="buy"}}class OP extends Pb{constructor(){super(...arguments),this.action="finishTransactions"}}class nze extends Pb{constructor(n){super({args:n}),this.action="getActiveSubscriptions"}}class ize extends Pb{constructor(){super(...arguments),this.action="restorePurchases"}}var fie=__webpack_require__(3094),oze=__webpack_require__.n(fie);class aw{static hideLoader(){this.dispatchEvent("appLoaded")}static appReady(n){this.dispatchCustomEvent({eventName:"appReady",data:n})}static login(){this.dispatchCustomEvent({eventName:"appLogin"})}static logout(){this.dispatchCustomEvent({eventName:"appLogout"})}static appPause(){this.dispatchCustomEvent({eventName:"appPause"})}static appResume(){this.dispatchCustomEvent({eventName:"appResume"})}static appBackButton(){this.dispatchCustomEvent({eventName:"appBackButton"})}static dispatchCustomEvent(n){const o=document.createEvent("CustomEvent");o.initCustomEvent("AuthEvent",!0,!0,n),window.dispatchEvent(o)}static dispatchEvent(n){let o=document.createEvent("Event");o.initEvent(n,!0,!0),window.dispatchEvent(o)}}var gie=wi.ESplashScreenAction;class UG{static get Instance(){return null==this.instance&&(this.instance=new UG),this.instance}init(){var n=this;return new Promise(function(){var o=f(function*(e){!0===n.mobileAppInited()&&e(),n.messagesPlugin=new mie,yield n.messages().init(n.getPlatform()),n.ready=!0,console.warn("init"),n.hideSplash(),yield n.getDeviceInfo(),n.addEventListener(Rd.Pause,()=>aw.appPause()),n.addEventListener(Rd.Resume,()=>aw.appResume()),n.addEventListener(Rd.BackButton,()=>aw.appBackButton()),e()});return function(e){return o.apply(this,arguments)}}())}mobileAppInited(){return this.ready}getVersion(){return this.version}getOsVersion(){return this.osVersion}getPlatform(){return this.platform}getDeviceId(){return this.deviceId}getUid(){return this.uid}getAdvertisingId(){return this.advertisingId}getDevicePlatform(){return this.devicePlatform}admob(n,o,e){this.messages().admob(n,o,e)}messages(){return this.messagesPlugin}addEventListener(n,o){var e;null===(e=this.messages())||void 0===e||e.addEventListener(n,o)}removeEventListener(n,o){var e;null===(e=this.messages())||void 0===e||e.removeEventListener(n,o)}openExternalUrl(n){this.messages().openExternalUrl(n)}logout(){return this.messages().logout(),Promise.resolve()}hideSplash(){this.messages().splashScreen({action:gie.Hide})}showSplash(){this.messages().splashScreen({action:gie.Show})}restart(){this.messages().restart()}quit(){this.messages().quit()}getCachedDeviceInfo(){return this.deviceInfo}setOrientation(n){this.messages().setOrientation(n)}getMobileUserStream(){return this.mobileUserStream}getMobileUser(){return new Promise((n,o)=>{if(this.messages())try{this.messages().mobileUser(e=>(this.mobileUser=e,this.mobileUserStream.next(this.mobileUser),n(this.mobileUser)),e=>o(e||"MessagesPlugin mobileUser Failed"))}catch(e){o(e)}else o("There is no messagesPlugin")})}getCachedMobileUser(){var n=this;return f(function*(){if(n.mobileUser)return Promise.resolve(n.mobileUser);{let o;try{o=yield n.getMobileUser()}catch(e){console.log(e)}return o}})()}consumeParameter(n){switch(this.messages().consumeParameter(n),n){case"forwardto":this.deviceInfo.forwardTo=void 0;break;case"data":this.deviceInfo.data=void 0;break;case"affiliateId":this.deviceInfo.affiliateId=void 0,this.affiliateId=void 0;break;case"referralId":this.deviceInfo.referralId=void 0,this.referralId=void 0}}detectAffiliateId(){return this.deviceInfo.affiliateId}detectReferralId(){return this.deviceInfo.referralId}constructor(){this.platform=this.detectPlatform(),this.devicePlatform=this.detectDevicePlatform(),this.ready=!1,this.mobileUserStream=new Qn(this.mobileUser)}getAffiliateId(){return this.affiliateId}getReferralId(){return this.referralId}detectDeviceId(n){let o;return o=window.localStorage&&window.localStorage.getItem("deviceId")?window.localStorage.getItem("deviceId"):n,o&&window.localStorage.setItem("deviceId",o),o}detectPlatform(){let n=null,o=window.location.search;return-1!==o.indexOf("device=ios")?n=Ut.Ios:-1!==o.indexOf("device=android")?n=Ut.Android:-1!==o.indexOf("device=windows")?n=Ut.Windows:window.localStorage&&fie(Ut,window.localStorage.getItem("device"))&&window.localStorage.getItem("device")!==Ut.Browser&&(n=window.localStorage.getItem("device")),window.localStorage.setItem("device",n),n}detectDevicePlatform(){let n=null,o=window.location.search.match(/devicePlatform=([^&;]+?)(&|#|;|$|%3F)/);if(o&&o.length&&o[1])switch(o[1]){case $n.VivaAndroid.toString():n=$n.VivaAndroid;break;case $n.CafeBazaar:n=$n.CafeBazaar;break;default:console.log("Could not determine the devicePlatform")}return n}getDeviceInfo(){return new Promise(n=>{this.messages().getDeviceInfo(o=>{this.version=o.appVersion,this.deviceId=this.detectDeviceId(o.deviceId),this.uid=o.uid,this.advertisingId=o.advertisingId,this.osVersion=o.osVersion?parseFloat(o.osVersion):void 0,this.affiliateId=o.affiliateId,this.referralId=o.referralId,this.setDeviceInfo(o),n()},o=>{console.error(o),n()})})}setDeviceInfo(n){this.deviceInfo=n}}let rze=(()=>{var t;class n{constructor(){this.devicePlatform=this.detectDevicePlatform()}init(){return this.affiliateId=this.detectAffiliateId(),this.referralId=this.detectReferralId(),Promise.resolve()}openExternalUrl(e){window.open(e,"_blank")}hideSplash(){throw new Error("Method not implemented.")}showSplash(){throw new Error("Method not implemented.")}restart(){window.location.replace(window.location.pathname)}getVersion(){return this.version}getPlatform(){return Ut.Browser}getUid(){throw new Error("Method not implemented.")}getDeviceId(){throw new Error("Method not implemented.")}getAdvertisingId(){throw new Error("Method not implemented.")}getDevicePlatform(){return this.devicePlatform}detectReferralId(){return this.getUrlParam("referralId")}getAffiliateId(){return this.affiliateId}getReferralId(){return this.referralId}detectAffiliateId(){return window.location.href.toString().split("affiliateId=")[1]&&decodeURIComponent((new RegExp("[?|&]affiliateId=([^&;]+?)(&|/|#|;|$|%3F)").exec(window.location.href.toString())||[null,""])[1].replace(/\+/g,"%20"))||null}detectDevicePlatform(){let e=null,i=this.detectAffiliateId();return-1!==window.name.indexOf("iframe_canvas_fb")||-1!==window.name.indexOf("iframe_canvas_on_ig")?e=$n.Facebook:i&&i===$n.SpilGames.toString()&&(e=$n.SpilGames),e}getOsVersion(){return 0}consumeParameter(e){switch(e){case"affiliateId":this.affiliateId=void 0;break;case"referralId":this.referralId=void 0}}getUrlParam(e){return window.location.href.toString().split("".concat(e,"="))[1]&&decodeURIComponent((new RegExp("[?&]".concat(e,"=([^&#/;]+?)(&|/|#|;|$)")).exec(window.location.href.toString())||[null,""])[1].replace(/\+/g,"%20"))||null}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Qt=(()=>{var t;class n{static get getInstance(){return null==this.instance&&(this.instance=new n),this.instance}constructor(){this.mobileApp=UG.Instance,this.app=this.mobileApp.getPlatform()?this.mobileApp:new rze,this.appVersion=this.app.getVersion(),this.urlLang=this.detectLangParam()}init(){var e=this;return f(function*(){yield e.app.init()})()}openExternalUrl(e){"string"==typeof e?this.app.openExternalUrl(e):(e.preventDefault(),this.app.openExternalUrl(e.target.href))}logout(){return Promise.resolve()}hideSplash(){this.app.hideSplash()}showSplash(){this.app.showSplash()}restart(){this.app.restart()}quit(){}getVersion(){return this.app.getVersion()}getDeviceId(){return this.app.getDeviceId()}getUid(){return this.app.getUid()}getAdvertisingId(){return this.app.getAdvertisingId()}isMobileApp(){return null!=this.getMobileAppService().getPlatform()}getPlatform(){return this.app.getPlatform()}getDevicePlatform(){return this.app.getDevicePlatform()}getMobileAppService(){return this.mobileApp}getAffiliateId(){return this.app.getAffiliateId()}getReferralId(){return this.app.getReferralId()}getUrlLang(){return this.urlLang}consumeParameter(e){this.app.consumeParameter(e)}consumeUrlParam(e){window.history.replaceState({},document.title,window.location.href.replace("".concat(e,"=").concat(this.getUrlParam(e)),""))}detectLangParam(){return this.getUrlParam("lang")}detectAffiliateId(){return this.app.detectAffiliateId()}detectReferralId(){return this.app.detectReferralId()}getUrlParam(e){return window.location.href.toString().split("".concat(e,"="))[1]&&decodeURIComponent((new RegExp("[?&]".concat(e,"=([^&#/;]+?)(&|/|#|;|$)")).exec(window.location.href.toString())||[null,""])[1].replace(/\+/g,"%20"))||null}getOsVersion(){return this.app.getOsVersion()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:()=>t.getInstance,providedIn:"root"}),n})();const _ie=new Ot("AppService",{factory:()=>Qt.getInstance});new Ot("Messages",{factory:()=>new mie});let Th=(()=>{var t;class n{static loadScript(e,i=!1,r=!1){return new Promise((s,a)=>{let c=document.createElement("script");i&&(c.async=i),r&&(c.defer=r),c.src=e,document.body.appendChild(c);const u=b=>{c.removeEventListener("load",u),c.removeEventListener("error",h),s(b)},h=b=>{c.removeEventListener("load",u),c.removeEventListener("error",h),a(b)};c.addEventListener("load",u),c.addEventListener("error",h)})}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class VG{static timeoutPromise(n,o){let e,i=new Promise((r,s)=>{e=setTimeout(()=>{s(new vie("Timed out in "+n+"ms."))},n)});return Promise.race([i,o]).then(r=>(clearTimeout(e),r)).catch(r=>(clearTimeout(e),Promise.reject(r)))}}class vie extends Error{constructor(n){super(),this.name="PromiseTimeoutError",this.message=n}}var sa=function(t){return t[t.Up=0]="Up",t[t.Down=1]="Down",t[t.Left=2]="Left",t[t.Right=3]="Right",t}(sa||{}),tl=function(t){return t[t.Facebook="facebook"]="Facebook",t[t.Email="email"]="Email",t[t.Google="google"]="Google",t[t.Twitter="twitter"]="Twitter",t[t.Mobile="mobile"]="Mobile",t[t.Guest="guest"]="Guest",t[t.Apple="apple"]="Apple",t[t.PhoneNumber="phoneNumber"]="PhoneNumber",t}(tl||{}),Rm=function(t){return t[t.Up=0]="Up",t[t.Down=1]="Down",t}(Rm||{});class I_ extends Error{constructor(n={error:null,details:null}){super(),this.message=n.error,this.detail=n.details}}var EP=wi.EFacebookAction;class aze{constructor(n){this.mobileAppService=n,this.platform=this.mobileAppService.getPlatform(),this.messages=this.mobileAppService.messages()}init(n){return Promise.resolve()}api(n,o="get",e={}){return new Promise((i,r)=>{this.messages.facebook({action:EP.Api,data:{method:o,params:e,path:n}},a=>{console.log(a),i(a)},a=>{console.log(a),r(new I_(a))})})}ui(n){return new Promise((o,e)=>{this.messages.facebook({action:EP.Ui,data:{params:n}},r=>{console.log(r),o(r)},r=>{console.log(r),e(new I_(r))})})}getLoginStatus(){return new Promise((n,o)=>{this.messages.facebook({action:EP.GetLoginStatus},i=>{console.log(i),n(i)},i=>{console.log(i),o(new I_(i))})})}login(n,o=null){return new Promise((e,i)=>{this.messages.facebook({action:EP.Login,data:{permissions:n,params:o}},s=>{console.log(s),e(s)},s=>{console.log(s),i(new I_(s))})})}logout(){return new Promise((n,o)=>{this.messages.facebook({action:EP.Logout},i=>{console.log(i),n(i)},i=>{console.log(i),o(new I_(i))})})}getAuthResponse(){return{}}}class cze{constructor(n){this.devicePlatform=n}init(n){return VG.timeoutPromise(5e3,new Promise((o,e)=>{let i={appId:n,cookie:!0,xfbml:!0,status:!0,version:"v8.0"};window.fbAsyncInit=()=>{FB.init(i)},Th.loadScript("https://connect.facebook.net/en_US/sdk.js",!0,!0).then(()=>{o()}).catch(r=>{e(new I_(r.error))})}))}api(n,o="get",e={}){return new Promise((i,r)=>{FB.api(n,o,e,s=>{s?s.error?r(new I_(s.error)):i(s):r()})})}ui(n){return this.devicePlatform!==$n.Facebook&&(n.display="popup"),new Promise((o,e)=>{FB.ui(n,i=>{console.error(i),i?i.error||i.error_code||i.error_message?e(new I_(i.error)):o(i):e()})})}getLoginStatus(){return VG.timeoutPromise(5e3,new Promise((n,o)=>{FB.getLoginStatus(e=>{e?n(e):o()},!0)}))}login(n,o){if(!("standalone"in navigator&&navigator.standalone||window.matchMedia("(display-mode: standalone)").matches)){let e={};return o&&(e={...o}),n&&n.length>0&&(e.scope=n.toString()),new Promise((i,r)=>{FB.login(s=>{s.authResponse?i(s):r(s.status)},e)})}try{const e="".concat(window.location.protocol,"//").concat(window.location.hostname,"/play"),i=document.createElement("a");return i.setAttribute("href",e),i.setAttribute("target","_blank"),i.click(),Promise.reject("not_authorized")}catch(e){return console.warn(e),Promise.reject("not_authorized")}}logout(){return new Promise(n=>{FB.logout(o=>{n(o)})})}getAuthResponse(){return FB.getAuthResponse()}}class lze{constructor(){this.appService=Qt.getInstance,this.fbSdkMethods=this.appService.isMobileApp()?new aze(this.appService.getMobileAppService()):new cze(this.appService.getDevicePlatform())}init(n){return this.fbSdkMethods.init(n)}api(n,o="get",e={}){return this.fbSdkMethods.api(n,o,e)}ui(n){return this.fbSdkMethods.ui(n)}getLoginStatus(){return this.fbSdkMethods.getLoginStatus()}login(n,o){return this.fbSdkMethods.login(n,o)}logout(){return this.fbSdkMethods.logout()}getAuthResponse(){return this.fbSdkMethods.getAuthResponse()}}class bie{constructor(n){this.method=KS.FacebookShare,this.href=n}}class uze{constructor(n,o,e,i,r){this.method=KS.FacebookShareOpenGraph,this.action_type=n,this.action_properties=this.buildActionProperties(o,e,i,r)}buildActionProperties(n,o,e,i){let r={};return r[n]={"og:title":o,"og:image":e,"og:description":i},JSON.stringify(r)}}let km=(()=>{var t;class n{constructor(e){this.appStorageService=e,this.facebookAppId=Lt.CONFIG.social.networks.facebook.id,this.fb=new lze}init(){var e=this;return f(function*(){n.initialized||(yield e.fb.init(e.facebookAppId),n.initialized=!0)})()}login(e,i){return console.log("asked permissions:",e),this.fb.login(e,i)}api(e,i="get",r){return this.fb.api(e,i,r)}getLoginStatus(){return this.fb.getLoginStatus()}logout(){return this.clearCredentials(),this.getLoginStatus().then(e=>e.status===aA.Connected?this.fb.logout():Promise.reject("Invalid access token"))}ui(e){return this.fb.ui(e)}fbLogin(){var e=this;return f(function*(){let i=yield e.login(["public_profile","email"]);if(!i)return Promise.reject("Empty facebook loginResponse");let r={accessToken:i.authResponse.accessToken,fbUserId:i.authResponse.userID};return e.facebookCredentials=r,r})()}facebookRegisterCredentials(){return this.facebookCredentials}isFacebookUser(){let e=this.getFacebookLocalStorageCredentials(),i=this.appStorageService.getItem("loginType");return e&&i&&e.fbUserId&&e.accessToken&&i===tl.Facebook}isFacebookAuthorized(){var e=this;return f(function*(){if(!e.isFacebookUser())return!1;try{let i=e.getFacebookLocalStorageCredentials(),r=yield e.getLoginStatus();return r&&r.authResponse&&i.fbUserId===r.authResponse.userID&&r.status===aA.Connected}catch(i){return!1}})()}isFacebookCredentialsValid(e){return!(!e||!e.facebookId||!e.facebookToken||"null"===e.facebookId||"undefined"===e.facebookId||"null"===e.facebookToken||"undefined"===e.facebookToken)}clearCredentials(){this.appStorageService.removeItem("".concat(Gt.Facebook,"AuthResponseCredentials"))}getFacebookLocalStorageCredentials(){return this.appStorageService.getItem("".concat(Gt.Facebook,"AuthResponseCredentials"))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ci))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var Ib=function(t){return t.Facebook="FACEBOOK",t.IosApp="IOS_MOBILE",t.IosMobileWeb="IOS",t.AndroidApp="ANDROID_MOBILE",t.AndroidMobileWeb="ANDROID",t.Web="WEB",t}(Ib||{}),zG=function(t){return t.PC="PC",t.MobilePhone="MOBILE_PHONE",t}(zG||{});class Ap{constructor(){this.appService=Qt.getInstance,this.header=[navigator.platform,navigator.userAgent,navigator.appVersion,navigator.vendor],this.dataos=[{name:"WP",value:"Windows Phone",version:"OS"},{name:"Windows",value:"Win",version:"NT"},{name:"IOS",value:"iPhone",version:"OS"},{name:"IOS",value:"iPad",version:"OS"},{name:"Kindle",value:"Silk",version:"Silk"},{name:"Android",value:"Android",version:"Android"},{name:"PlayBook",value:"PlayBook",version:"OS"},{name:"BlackBerry",value:"BlackBerry",version:"/"},{name:"Mac",value:"Mac",version:"OS X"},{name:"Linux",value:"Linux",version:"rv"},{name:"Palm",value:"Palm",version:"PalmOS"}],this.databrowser=[{name:"Chrome",value:"Chrome",version:"Chrome"},{name:"Firefox",value:"Firefox",version:"Firefox"},{name:"Safari",value:"Safari",version:"Version"},{name:"Internet Explorer",value:"MSIE",version:"MSIE"},{name:"Opera",value:"Opera",version:"Opera"},{name:"BlackBerry",value:"CLDC",version:"CLDC"},{name:"Mozilla",value:"Mozilla",version:"Mozilla"}]}getDeviceType(){let n;const o=this.getDeviceInfo().os.name.toLowerCase();return n=this.appService.isMobileApp()&&"wp"!==o?zG.MobilePhone:zG.PC,n}getPlatform(){if(this.appService.getDevicePlatform()===$n.Facebook)return Ib.Facebook;if(this.appService.getPlatform()===Ut.Android)return Ib.AndroidApp;if(this.appService.getPlatform()===Ut.Ios)return Ib.IosApp;const o=this.getDeviceInfo().os.name.toLowerCase();return"android"===o?Ib.AndroidMobileWeb:"ios"===o?Ib.IosMobileWeb:Ib.Web}getDeviceInfo(){let n=this.header.join(" ");return{os:this.matchItem(n,this.dataos),browser:this.matchItem(n,this.databrowser)}}matchItem(n,o){let r,s,a,c,u,e=0,i=0;for(e=0;e<o.length;e+=1)if(r=new RegExp(o[e].value,"i"),a=r.test(n),a){if(s=new RegExp(o[e].version+"[- /:;]([\\d._]+)","i"),c=n.match(s),u="",c&&c[1]&&(c=c[1]),c)for(c=c.split(/[._]+/),i=0;i<c.length;i+=1)u+=0===i?c[i]+".":c[i];else u="0";return{name:o[e].name,version:parseFloat(u)}}return{name:"UNKNOWN",version:0}}}var xP=function(t){return t.featureKey="user",t.featureActionCtx="User State",t}(xP||{}),Xo=function(t){return t.ResetUserState="Reset User State",t.GetState="Get State",t.GetStateSuccess="Get State Success",t.GetStateError="Get State Error",t.GetProfile="Get Profile",t.GetProfileSuccess="Get Profile Success",t.GetProfileError="Get Profile Error",t.GetMembership="Get Membership",t.GetMembershipSuccess="Get Membership Success",t.GetMembershipError="Get Membership Error",t.MergeAccount="Merge Account",t.MergeAccountSuccess="Merge Account Success",t.MergeAccountError="Merge Account Error",t.UpdateSettings="Update Settings",t.UpdateSettingsSuccess="Update Settings Success",t.UpdateSettingsError="Update Settings Error",t.UpdateProfile="Update Profile",t.UpdateProfileSuccess="Update Profile Success",t.UpdateProfileError="Update Profile Error",t.UpdateAvatar="Update Avatar",t.UpdateAvatarSuccess="Update Avatar Success",t.UpdateAvatarError="Update Avatar Error",t.UpdateState="Update State",t.UpdateProfileState="Update Profile State",t.UpdateChips="Update Chips",t.UpdateGems="Update Gems",t.UpdateXp="Update Xp",t.UpdateCashBackBonus="Update CashBack Bonus",t.UpdateInventory="Update Inventory",t.UpdateInventoryItem="Update Inventory Item",t.UpdateGameInventory="Update Game Inventory",t.UpdateGameInventoryItem="Update Game Inventory Item",t.UpdateBonuses="Update Bonuses",t.UpdateLikes="Update Likes",t.UpdateXpBooster="Update Xp Booster",t}(Xo||{});function lr(t){return"[".concat(xP.featureActionCtx,"] ").concat(t)}const dze=he(lr(Xo.ResetUserState)),Cie=he(lr(Xo.GetState)),cw=he(lr(Xo.GetStateSuccess),{_as:"props",_p:void 0}),yie=he(lr(Xo.GetStateError),{_as:"props",_p:void 0}),Sie=he(lr(Xo.GetMembership)),wie=he(lr(Xo.GetMembershipSuccess),{_as:"props",_p:void 0}),Tie=he(lr(Xo.GetMembershipError),{_as:"props",_p:void 0}),Pie=he(lr(Xo.GetProfile)),Iie=he(lr(Xo.GetProfileSuccess),{_as:"props",_p:void 0}),Mie=he(lr(Xo.GetProfileError),{_as:"props",_p:void 0}),Oie=(he(lr(Xo.MergeAccount)),he(lr(Xo.MergeAccountSuccess),{_as:"props",_p:void 0})),pze=he(lr(Xo.MergeAccountError),{_as:"props",_p:void 0}),hze=he(lr(Xo.UpdateSettings),{_as:"props",_p:void 0}),Eie=he(lr(Xo.UpdateSettingsSuccess),{_as:"props",_p:void 0}),mze=he(lr(Xo.UpdateSettingsError),{_as:"props",_p:void 0}),fze=he(lr(Xo.UpdateProfile),{_as:"props",_p:void 0}),xie=he(lr(Xo.UpdateProfileSuccess),{_as:"props",_p:void 0}),gze=he(lr(Xo.UpdateProfileError),{_as:"props",_p:void 0}),_ze=he(lr(Xo.UpdateAvatar),{_as:"props",_p:void 0}),LA=he(lr(Xo.UpdateAvatarSuccess),{_as:"props",_p:void 0}),vze=he(lr(Xo.UpdateAvatarError),{_as:"props",_p:void 0}),AP=he(lr(Xo.UpdateState),{_as:"props",_p:void 0}),bze=he(lr(Xo.UpdateProfileState),{_as:"props",_p:void 0}),RP=he(lr(Xo.UpdateChips),{_as:"props",_p:void 0}),Aie=he(lr(Xo.UpdateGems),{_as:"props",_p:void 0}),Rie=he(lr(Xo.UpdateXp),{_as:"props",_p:void 0}),kie=he(lr(Xo.UpdateInventory),{_as:"props",_p:void 0}),Lie=he(lr(Xo.UpdateInventoryItem),{_as:"props",_p:void 0}),jG=he(lr(Xo.UpdateGameInventory),{_as:"props",_p:void 0}),Die=he(lr(Xo.UpdateGameInventoryItem),{_as:"props",_p:void 0}),DA=he(lr(Xo.UpdateCashBackBonus),{_as:"props",_p:void 0}),HG=he(lr(Xo.UpdateBonuses),{_as:"props",_p:void 0}),Bie=he(lr(Xo.UpdateLikes),{_as:"props",_p:void 0}),Nie=he(lr(Xo.UpdateXpBooster),{_as:"props",_p:void 0});function BA(t){return t[xP.featureKey]}const Fie=Ts(xP.featureKey),Ph=We(BA,t=>t.userState.result),Uie=We(BA,t=>t.userProfile.result),Gie=We(BA,t=>t.userState.result?t.userState.result.wallet:void 0),Vie=We(BA,t=>!!t.userState.result&&t.userState.result.profile.hasTierOrHigher(Fi.Full)),qG=We(Ph,t=>t?t.profile:void 0),zie=We(Ph,t=>t?t.settings.privacy:void 0),jie=We(Ph,t=>{var n;return t?null===(n=t.profile)||void 0===n?void 0:n.vip:void 0}),Hie=We(Ph,t=>t?t.profile.inventory:void 0),qie=We(Ph,t=>t?t.gameInventory:void 0);J.prototype.selectUser=function Cze(){return this.selectSync(Fie)},J.prototype.subscribeUser=function yze(){return this.select(Fie)},J.prototype.selectUserState=function Sze(){return this.selectSync(Ph)},J.prototype.subscribeUserState=function wze(){return this.select(Ph)},J.prototype.selectUserProfile=function Tze(){return this.selectSync(Uie)},J.prototype.subscribeUserProfile=function Pze(){return this.select(Uie)},J.prototype.selectWallet=function Ize(){return this.selectSync(Gie)},J.prototype.subscribeWallet=function Mze(){return this.select(Gie)},J.prototype.selectIsVip=function Oze(){return this.selectSync(Vie)},J.prototype.subscribeIsVip=function Eze(){return this.select(Vie)},J.prototype.selectSimpleProfile=function xze(){return this.selectSync(qG)},J.prototype.subscribeSimpleProfile=function Aze(){return this.select(qG)},J.prototype.selectUserPrivacySettings=function Rze(){return this.selectSync(zie)},J.prototype.subscribeUserPrivacySettings=function kze(){return this.select(zie)},J.prototype.selectVipStateSync=function Lze(){return this.selectSync(jie)},J.prototype.subscribeVipState=function Dze(){return this.select(jie)},J.prototype.selectUserInventory=function Bze(){return this.selectSync(Hie)},J.prototype.subscribeUserInventory=function Nze(){return this.select(Hie)},J.prototype.selectUserGameInventory=function Fze(){return this.selectSync(qie)},J.prototype.subscribeUserGameInventory=function Uze(){return this.select(qie)};const WG={userState:{loadingState:{isLoading:!1,error:void 0},result:void 0},userProfile:{loadingState:{isLoading:!1,error:void 0},result:void 0},ignoreResponse:{vip:!1}},Gze=Sr(WG,de(dze,t=>WG),de(sw,t=>WG),de(bze,(t,n)=>t.userProfile.result?Se(t,o=>{o.userProfile.result={...t.userProfile.result,...n};for(let e in n)o.userState&&o.userState.result&&o.userState.result.hasOwnProperty(e)&&(o.userState.result[e]=n[e])}):t),de(AP,(t,n)=>Se(t,o=>{var e;o.userState&&o.userState.result&&(null!=n&&null!==(e=n.profile)&&void 0!==e&&e.vip&&o.userState.result.profile.vip.loadingState.isLoading&&(o.ignoreResponse.vip=!0),o.userState.result={...wr(o.userState.result,n)}),o.userProfile&&o.userProfile.result&&(o.userProfile.result={...wr(o.userProfile.result,n)})})),de(Cie,t=>Se(t,n=>{n.userState.loadingState={isLoading:!0,error:void 0}})),de(cw,(t,n)=>Se(t,o=>{o.userState.result=n;for(let e in n)o.userProfile&&o.userProfile.result&&o.userProfile.result.hasOwnProperty(e)&&(o.userProfile.result[e]=n[e]);o.userState.loadingState={isLoading:!1,error:void 0}})),de(yie,(t,n)=>Se(t,o=>{o.userState.loadingState={isLoading:!1,error:n}})),de(Sie,t=>Se(t,n=>{n.userState&&n.userState.result&&(n.userState.result.profile.vip.loadingState.isLoading=!0),n.userProfile&&n.userProfile.result&&(n.userProfile.result.profile.vip.loadingState.isLoading=!0)})),de(wie,(t,n)=>Se(t,o=>{o.userState&&o.userState.result&&(o.userState.result.profile.vip.loadingState.isLoading=!1,o.ignoreResponse.vip||(o.userState.result.profile.vip=n.vip)),o.userProfile&&o.userProfile.result&&(o.userProfile.result.profile.vip.loadingState.isLoading=!1,o.ignoreResponse.vip||(o.userProfile.result.profile.vip=n.vip)),o.ignoreResponse.vip=!1})),de(Tie,t=>Se(t,n=>{n.userState&&n.userState.result&&(n.userState.result.profile.vip.loadingState.isLoading=!1),n.userProfile&&n.userProfile.result&&(n.userProfile.result.profile.vip.loadingState.isLoading=!1),n.ignoreResponse.vip=!1})),de(Pie,t=>Se(t,n=>{n.userProfile.loadingState={isLoading:!0,error:void 0}})),de(Iie,(t,n)=>Se(t,o=>{o.userProfile.result=n,o.userProfile.loadingState={isLoading:!1,error:void 0};for(let e in n)o.userState&&o.userState.result&&o.userState.result.hasOwnProperty(e)&&(o.userState.result[e]=n[e])})),de(Mie,(t,n)=>Se(t,o=>{o.userProfile.loadingState={isLoading:!1,error:n}})),de(xie,(t,n)=>Se(t,o=>{o.userProfile.result={...t.userProfile.result,...n},o.userProfile.loadingState={isLoading:!1,error:void 0}})),de(Oie,(t,n)=>Se(t,o=>{o.userState.result.authentications=t.userState.result.authentications.concat(n.data.name)})),de(Eie,(t,n)=>Se(t,o=>{var e;null!==(e=o.userState.result)&&void 0!==e&&e.settings&&(o.userState.result.settings=wr(o.userState.result.settings,n))})),de(LA,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.profile.avatar=n.url&&!n.withoutTimestamp?"".concat(n.url,"?").concat(Date.now()):n.url),o.userProfile.result&&(o.userProfile.result.profile.avatar=n.url&&!n.withoutTimestamp?"".concat(n.url,"?").concat(Date.now()):n.url)})),de(RP,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.wallet.chips=t.userState.result.wallet.chips+n.amount),o.userProfile.result&&(o.userProfile.result.wallet.chips=t.userProfile.result.wallet.chips+n.amount)})),de(Aie,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.wallet.gems=t.userState.result.wallet.gems+n.delta),o.userProfile.result&&(o.userProfile.result.wallet.gems=t.userProfile.result.wallet.gems+n.delta)})),de(Rie,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.xp={...o.userState.result.xp,currentXp:n.xp,level:n.level,previousLevelAt:n.previousLevelAt,nextLevelAt:n.nextLevelAt},o.userState.result.profile.level=n.level),o.userProfile.result&&(o.userProfile.result.xp={...o.userState.result.xp,currentXp:n.xp,level:n.level,previousLevelAt:n.previousLevelAt,nextLevelAt:n.nextLevelAt},o.userProfile.result.profile.level=n.level)})),de(DA,(t,n)=>Se(t,o=>{Object.keys(n).forEach(e=>{o.userState.result.bonuses.cashback[e]&&(o.userState.result.bonuses.cashback[e]=n[e])})})),de(kie,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.profile.inventory.items=n.items),o.userProfile.result&&(o.userProfile.result.profile.inventory.items=n.items)})),de(Lie,(t,n)=>Se(t,o=>{if(o.userState.result){const e=o.userState.result.profile.inventory.items.findIndex(i=>i.item.id===n.invItem.item.id);-1!==e&&(o.userState.result.profile.inventory.items[e]=n.invItem)}if(o.userProfile.result){const e=o.userProfile.result.profile.inventory.items.findIndex(i=>i.item.id===n.invItem.item.id);-1!==e&&(o.userProfile.result.profile.inventory.items[e]=n.invItem)}})),de(jG,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.gameInventory.items=n.items)})),de(Die,(t,n)=>Se(t,o=>{if(o.userState.result){const e=o.userState.result.gameInventory.items.findIndex(i=>i.item.id===n.invItem.item.id);-1!==e&&(o.userState.result.gameInventory.items[e]=n.invItem)}})),de(HG,(t,n)=>Se(t,o=>{Object.keys(n.bonuses).forEach(e=>{o.userState.result.bonuses[e]=n.bonuses[e]})})),de(Bie,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.stats.likes=o.userState.result.stats.likes+n.delta),o.userProfile.result&&(o.userProfile.result.stats.likes=o.userProfile.result.stats.likes+n.delta)})),de(Nie,(t,n)=>Se(t,o=>{o.userState.result&&(o.userState.result.xp.xpBooster={...o.userState.result.xp.xpBooster,...n.xpBooster}),o.userProfile.result&&(o.userProfile.result.xp.xpBooster={...o.userProfile.result.xp.xpBooster,...n.xpBooster})}))),zze=[$r.forFeature(xP.featureKey,function Vze(t,n){return Gze(t,n)})];let bu=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[zze]}),n})(),jze=(()=>{var t;class n{constructor(e,i,r,s){this.analyticsDevicePlatform=new Ap,this.http=e,this.appService=i,this.facebook=r,this.store=s}getState(e={useCache:!0}){var i=this;return f(function*(){const r=i.appService.getDevicePlatform()===$n.Facebook,s=i.facebook.facebookRegisterCredentials(),a={params:{facebookApp:r.toString(),facebookToken:i.facebook.isFacebookCredentialsValid(s)?s.accessToken:"",uid:i.appService.getPlatform()===Ut.Android?i.appService.getUid():""},headers:{"user-platform":i.analyticsDevicePlatform.getPlatform()}};try{let c;if(e&&e.useCache&&(c=i.store.selectUserState(),c))return c;i.store.dispatch(Cie());const u=yield i.http.get("users/me",a).toPromise();return c={...u.body,profile:new Lo(u.body.profile),xp:new RA(u.body.xp),creatorCode:new kA(u.body.creatorCode)},i.store.dispatch(cw(c)),i.store.selectUserState()}catch(c){throw i.store.dispatch(yie(c)),c}})()}getProfile(e={useCache:!0}){var i=this;return f(function*(){try{const r=i.store.selectUserState().profile.id;let s;if(e&&e.useCache&&(s=i.store.selectUserProfile(),s))return s;i.store.dispatch(Pie());const a=yield i.http.get("users/".concat(r)).toPromise();return s={...a.body,profile:new Lo(a.body.profile),xp:new RA(a.body.xp),creatorCode:new kA(a.body.creatorCode)},i.store.dispatch(Iie(s)),i.store.selectUserProfile()}catch(r){throw i.store.dispatch(Mie(r)),r}})()}getMembership(){var e=this;return f(function*(){try{e.store.dispatch(Sie());const i=yield e.http.post("users/profile/memberships").toPromise();return e.store.dispatch(wie({vip:new AA(i.body.vip)})),i.body}catch(i){throw e.store.dispatch(Tie(i)),i}})()}mergeAccount(e){var i=this;return f(function*(){if(!i.store.selectUserState())throw new lt.UnathorizedError;try{const s=yield i.http.post("auth/account/merge",e).toPromise();return i.store.dispatch(Oie({data:e})),s.body}catch(s){throw i.store.dispatch(pze(s)),s}})()}updateSettings(e){var i=this;return f(function*(){try{i.store.dispatch(hze(e));const r=yield i.http.post("users/profile/update/settings",{data:e}).toPromise();return i.store.dispatch(Eie(e)),r.body}catch(r){throw i.store.dispatch(mze(r)),r}})()}updateProfile(e){var i=this;return f(function*(){try{i.store.dispatch(fze(e));const r=yield i.http.post("users/profile/update",{data:e}).toPromise(),s=i.store.selectUserProfile(),a={...s},c=new Lo(a.profile);return(null!=e.city||null!=e.country)&&(c.location.city=null!=e.city?e.city:a.profile.location.city,c.location.country=null!=e.country?e.country:a.profile.location.country),null!=e.username&&(c.username.currentUsername=e.username,c.username.usernamesUsed=[...c.username.usernamesUsed,s.profile.username.currentUsername],a.remainingUsernameChanges--),c.status=null!=e.status?e.status:a.profile.status,c.avatar=null!=e.avatar?e.avatar:a.profile.avatar,c.age=null!=e.age?e.age:a.profile.age,c.sex=null!=e.sex?e.sex:a.profile.sex,c.phone=null!=e.phone?e.phone:a.profile.phone,i.store.dispatch(xie({...a,profile:c})),r.body}catch(r){throw i.store.dispatch(gze(r)),r}})()}updateAvatar(e,i){var r=this;return f(function*(){try{r.store.dispatch(_ze({base64String:e}));let s=yield r.getState();const a=yield r.http.post("users/profile/update/avatar",{image:e,avatarAssetIsInClientFlag:i}).toPromise();return s.profile.avatar||(s=yield r.getState({useCache:!1})),r.store.dispatch(LA({url:a.body.avatar})),Promise.resolve()}catch(s){throw r.store.dispatch(vze(s)),s}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(_ie),T(km),T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:bu}),n})();const Kr=new Ot("UserService",{factory:()=>new jze(mt(En),mt(_ie),mt(km),mt(J))});var fi=function(t){return t.ClientSoundsEnabled="sounds",t.GameSoundsEnabled="inGameMusic",t.ForceCanvasEnabled="forceCanvas",t.LowQualityGraphicsEnabled="lowQualityGraphics",t.FriendsOnlyChatEnabled="frinedsOnlyChat",t.ClientBackgroundMusicEnabled="clientBackgroundMusic",t.DealerDeckEnabled="dealerDeck",t.HiddenProfileEnabled="hiddenProfile",t.AppLanguage="lang",t.Country="country",t.TutorialReset="tutorialReset",t.NotificationsEnabled="notifications",t.PushNotifications="pushNotifications",t.PremiumGiftNotificationEnabled="premiumGiftNotificationEnabled",t.LikeNotifications="LikeRecieved",t.GiftNotifications="GiftSent",t.FriendNotifications="FriendRequestSent",t.InviteNotifications="GameInviteSent",t.TournamentInviteNotifications="TournamentInviteSent",t.CloseFriendOnlineNotifications="CloseFriendOnline",t.BonusNotifications="BonusNotifications",t.PrivateMsgsNotifications="PrivateChatMessage",t.PrivateImageMsgsNotifications="PrivateChatImageMessage",t.PrivateVoiceMsgsNotifications="PrivateChatVoiceMessage",t.PrivateEmojiMsgsNotifications="PrivateChatEmojiMessage",t.PrivateGameRoomMsgsNotifications="PrivateChatGameRoomMessage",t.PrivateAdminMsgsNotifications="AdminChatMessage",t}(fi||{});let M_=(()=>{var t;class n{constructor(e,i){this.appStorage=e,this.store=i,this.eventDispatcher=new Ep}setCountry(e="XX"){this.saveSettingToStorage(fi.Country,e)}getCountry(){return this.getSettingFromStorage(fi.Country)}setPremiumGiftNotificationEnabled(e){this.saveSettingToStorage(fi.PremiumGiftNotificationEnabled,e)}getPremiumGiftNotificationEnabled(){return this.getSettingFromStorage(fi.PremiumGiftNotificationEnabled,!0)}setPrivateChatPermission(e){this.saveSettingToStorage(fi.FriendsOnlyChatEnabled,e)}getPrivateChatPermission(){return this.store.selectUserState().settings.friendsOnlyChat?this.store.selectUserState().settings.friendsOnlyChat:this.getSettingFromStorage(fi.FriendsOnlyChatEnabled,!1)}setClientBackgroundMusic(e){this.saveSettingToStorage(fi.ClientBackgroundMusicEnabled,e)}getClientBackgroundMusic(){return this.getSettingFromStorage(fi.ClientBackgroundMusicEnabled,!0)}setInGameMusic(e){this.saveSettingToStorage(fi.GameSoundsEnabled,e)}getInGameMusic(){return this.getSettingFromStorage(fi.GameSoundsEnabled,!0)}setSounds(e){this.saveSettingToStorage(fi.ClientSoundsEnabled,e)}getSounds(){return this.appStorage.checkItem(fi.ClientSoundsEnabled)||this.saveSettingToStorage(fi.ClientSoundsEnabled,!0),this.getSettingFromStorage(fi.ClientSoundsEnabled,!0)}setLanguage(e=Lt.CONFIG.platform.languages.default){this.saveSettingToStorage(fi.AppLanguage,e)}getLanguage(){return this.getSettingFromStorage(fi.AppLanguage)}setLowQualityGraphics(e){this.saveSettingToStorage(fi.LowQualityGraphicsEnabled,e)}getLowQualityGraphics(){return this.getSettingFromStorage(fi.LowQualityGraphicsEnabled,!1)}setForceCanvas(e){this.saveSettingToStorage(fi.ForceCanvasEnabled,e)}getForceCanvas(){return this.getSettingFromStorage(fi.ForceCanvasEnabled,!1)}setBonusNotifications(e){return this.saveSettingToStorage(fi.BonusNotifications,e)}getBonusNotifications(){return this.getSettingFromStorage(fi.BonusNotifications,!0)}setDealerDeck(e){this.saveSettingToStorage(fi.DealerDeckEnabled,e)}getDealerDeck(){return this.getSettingFromStorage(fi.DealerDeckEnabled,!0)}setHiddenProfile(e){this.saveSettingToStorage(fi.HiddenProfileEnabled,e)}getHiddenProfile(){return this.store.selectUserState().settings.hiddenProfile?this.store.selectUserState().settings.hiddenProfile:this.getSettingFromStorage(fi.HiddenProfileEnabled,!1)}setGiftNotifications(e){return this.saveSettingToStorage(fi.GiftNotifications,e)}getGiftNotifications(){return this.store.selectUserState().settings.pushNotificationsSettings[fi.GiftNotifications]?this.store.selectUserState().settings.pushNotificationsSettings[fi.GiftNotifications]:this.getSettingFromStorage(fi.GiftNotifications)}setTournamentInviteNotifications(e){return this.saveSettingToStorage(fi.TournamentInviteNotifications,e)}getTournamentInviteNotifications(){return this.store.selectUserState().settings.pushNotificationsSettings[fi.TournamentInviteNotifications]?this.store.selectUserState().settings.pushNotificationsSettings[fi.TournamentInviteNotifications]:this.getSettingFromStorage(fi.TournamentInviteNotifications)}setInviteNotifications(e){return this.saveSettingToStorage(fi.InviteNotifications,e)}getInviteNotifications(){return this.store.selectUserState().settings.pushNotificationsSettings[fi.InviteNotifications]?this.store.selectUserState().settings.pushNotificationsSettings[fi.InviteNotifications]:this.getSettingFromStorage(fi.InviteNotifications)}setLikeNotifications(e){return this.saveSettingToStorage(fi.LikeNotifications,e)}getLikeNotifications(){return this.store.selectUserState().settings.pushNotificationsSettings[fi.LikeNotifications]?this.store.selectUserState().settings.pushNotificationsSettings[fi.LikeNotifications]:this.getSettingFromStorage(fi.LikeNotifications)}setFriendNotifications(e){return this.saveSettingToStorage(fi.FriendNotifications,e)}getFriendNotifications(){return this.store.selectUserState().settings.pushNotificationsSettings[fi.FriendNotifications]?this.store.selectUserState().settings.pushNotificationsSettings[fi.FriendNotifications]:this.getSettingFromStorage(fi.FriendNotifications)}setPrivateMsgsNotifications(e){return this.saveSettingToStorage(fi.PrivateMsgsNotifications,e)}getPrivateMsgsNotifications(){return this.store.selectUserState().settings.pushNotificationsSettings[fi.PrivateMsgsNotifications]?this.store.selectUserState().settings.pushNotificationsSettings[fi.PrivateMsgsNotifications]:this.getSettingFromStorage(fi.PrivateMsgsNotifications)}addSettingChangedListener(e){return new ie.EventListener(this.eventDispatcher,"change",e)}removeSettingChangedListener(e){this.eventDispatcher.removeEventListener("change",e)}saveSettingToStorage(e,i){this.appStorage.setItem(e,i),this.dispatchEvent(new Mi("change",{key:e,value:i}))}getSettingFromStorage(e,i){return this.appStorage.getItem(e,i)}dispatchEvent(e){this.eventDispatcher.dispatchEvent(e)}getCloseFriendNotifications(){return null!=this.getSettingFromStorage(fi.CloseFriendOnlineNotifications)?this.getSettingFromStorage(fi.CloseFriendOnlineNotifications):this.store.selectUserState().settings.pushNotificationsSettings[fi.CloseFriendOnlineNotifications]}setCloseFriendNotifications(e){return this.saveSettingToStorage(fi.CloseFriendOnlineNotifications,e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ci),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const nc=new Ot("SettingsService",{factory:()=>new M_(mt(Ci),mt(J))}),ha={CHROME:"chrome",FIREFOX:"firefox",SAFARI:"safari",OPERA:"opera",IE:"ie",MS_EDGE:"ms-edge",FB_MESSANGER:"fb-messanger",UNKNOWN:"unknown"},ns={ANDROID:"android",I_PAD:"ipad",IPHONE:"iphone",I_POD:"ipod",BLACKBERRY:"blackberry",FIREFOX_OS:"firefox-os",CHROME_BOOK:"chrome-book",WINDOWS_PHONE:"windows-phone",PS4:"ps4",VITA:"vita",CHROMECAST:"chromecast",APPLE_TV:"apple-tv",GOOGLE_TV:"google-tv",UNKNOWN:"unknown"},Dd={WINDOWS:"windows",MAC:"mac",IOS:"ios",ANDROID:"android",LINUX:"linux",UNIX:"unix",FIREFOX_OS:"firefox-os",CHROME_OS:"chrome-os",WINDOWS_PHONE:"windows-phone",UNKNOWN:"unknown"},ur={WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",MACOSX_15:"mac-os-x-15",MACOSX_14:"mac-os-x-14",MACOSX_13:"mac-os-x-13",MACOSX_12:"mac-os-x-12",MACOSX_11:"mac-os-x-11",MACOSX_10:"mac-os-x-10",MACOSX_9:"mac-os-x-9",MACOSX_8:"mac-os-x-8",MACOSX_7:"mac-os-x-7",MACOSX_6:"mac-os-x-6",MACOSX_5:"mac-os-x-5",MACOSX_4:"mac-os-x-4",MACOSX_3:"mac-os-x-3",MACOSX_2:"mac-os-x-2",MACOSX:"mac-os-x",UNKNOWN:"unknown"},qze={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:/Windows Phone/}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/Windows Phone/}]},ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},Wze={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/]},{not:{or:[/\bOPR\b/,/\bEdge\b/]}}]},FIREFOX:/\bFirefox\b/,SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdge\b/,/Windows Phone/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/,/^Mozilla\/5\.0 \(Windows NT 10\.0; Win64; x64\)$/]},MS_EDGE:{or:[/\bEdge\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/,FB_MESSANGER:/\bFBAN\/MessengerForiOS\b/},$ze={ANDROID:{and:[/\bAndroid\b/,{not:/Windows Phone/}]},I_PAD:/\biPad\b/,IPHONE:{and:[/\biPhone\b/,{not:/Windows Phone/}]},I_POD:/\biPod\b/,BLACKBERRY:/\bblackberry\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,CHROMECAST:/\bCrKey\b/,APPLE_TV:/^iTunes-AppleTV\/4.1$/,GOOGLE_TV:/\bGoogleTV\b/,VITA:/\bMozilla\/5.0 \(Play(S|s)tation Vita\b/},Kze={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]},MACOSX:/(MAC OS X\s*[^ 0-9])/,MACOSX_3:/(Darwin 10.3|Mac OS X 10.3)/,MACOSX_4:/(Darwin 10.4|Mac OS X 10.4)/,MACOSX_5:/(Mac OS X 10.5)/,MACOSX_6:/(Mac OS X 10.6)/,MACOSX_7:/(Mac OS X 10.7)/,MACOSX_8:/(Mac OS X 10.8)/,MACOSX_9:/(Mac OS X 10.9)/,MACOSX_10:/(Mac OS X 10.10)/,MACOSX_11:/(Mac OS X 10.11)/,MACOSX_12:/(Mac OS X 10.12)/,MACOSX_13:/(Mac OS X 10.13)/,MACOSX_14:/(Mac OS X 10.14)/,MACOSX_15:/(Mac OS X 10.15)/},Wie={CHROME:[/\bChrome\/([\d\.]+)\b/,/\bCriOS\/([\d\.]+)\b/],FIREFOX:/\bFirefox\/([\d\.]+)\b/,SAFARI:/\bVersion\/([\d\.]+)\b/,OPERA:[/\bVersion\/([\d\.]+)\b/,/\bOPR\/([\d\.]+)\b/],IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/],MS_EDGE:/\bEdge\/([\d\.]+)\b/},Zze=Object.keys(Wie).reduce((t,n)=>(t[ha[n]]=Wie[n],t),{});class Qze{constructor(){}test(n,o){return"string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?o.test(n):o&&Array.isArray(o.and)?o.and.every(e=>this.test(n,e)):o&&Array.isArray(o.or)?o.or.some(e=>this.test(n,e)):!(!o||!o.not||this.test(n,o.not))}exec(n,o){return"string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?o.exec(n):o&&Array.isArray(o)?o.reduce((e,i)=>e||this.exec(n,i),null):null}}let Kl=(()=>{var t;class n{constructor(){this.ua=window.navigator.userAgent,this._setDeviceInfo()}getDeviceInfo(){return{userAgent:this.userAgent,os:this.os,browser:this.browser,device:this.device,osVersion:this.osVersion,browserVersion:this.browserVersion}}isMobile(){return[ns.ANDROID,ns.I_PAD,ns.IPHONE,ns.I_POD,ns.BLACKBERRY,ns.FIREFOX_OS,ns.WINDOWS_PHONE,ns.VITA].some(e=>this.device===e)}isTablet(){return[ns.I_PAD,ns.FIREFOX_OS].some(e=>this.device===e)}isDesktop(){return[ns.PS4,ns.CHROME_BOOK,ns.UNKNOWN].some(e=>this.device===e)}_setDeviceInfo(){let e=new Qze,i=this.ua;if(this.userAgent=i,this.os=Object.keys(Dd).reduce((r,s)=>(r[Dd[s]]=e.test(i,qze[s]),r),{}),this.browser=Object.keys(ha).reduce((r,s)=>(r[ha[s]]=e.test(i,Wze[s]),r),{}),this.device=Object.keys(ns).reduce((r,s)=>(r[ns[s]]=e.test(i,$ze[s]),r),{}),this.osVersion=Object.keys(ur).reduce((r,s)=>(r[ur[s]]=e.test(i,Kze[s]),r),{}),this.os=[Dd.WINDOWS,Dd.IOS,Dd.MAC,Dd.ANDROID,Dd.LINUX,Dd.UNIX,Dd.FIREFOX_OS,Dd.CHROME_OS,Dd.WINDOWS_PHONE].reduce((r,s)=>r===Dd.UNKNOWN&&this.os[s]?s:r,Dd.UNKNOWN),this.browser=[ha.CHROME,ha.FIREFOX,ha.SAFARI,ha.OPERA,ha.IE,ha.MS_EDGE,ha.FB_MESSANGER].reduce((r,s)=>r===ha.UNKNOWN&&this.browser[s]?s:r,ha.UNKNOWN),this.device=[ns.ANDROID,ns.I_PAD,ns.IPHONE,ns.I_POD,ns.BLACKBERRY,ns.FIREFOX_OS,ns.CHROME_BOOK,ns.WINDOWS_PHONE,ns.PS4,ns.CHROMECAST,ns.APPLE_TV,ns.GOOGLE_TV,ns.VITA].reduce((r,s)=>r===ns.UNKNOWN&&this.device[s]?s:r,ns.UNKNOWN),this.osVersion=[ur.WINDOWS_3_11,ur.WINDOWS_95,ur.WINDOWS_ME,ur.WINDOWS_98,ur.WINDOWS_CE,ur.WINDOWS_2000,ur.WINDOWS_XP,ur.WINDOWS_SERVER_2003,ur.WINDOWS_VISTA,ur.WINDOWS_7,ur.WINDOWS_8_1,ur.WINDOWS_8,ur.WINDOWS_10,ur.WINDOWS_PHONE_7_5,ur.WINDOWS_PHONE_8_1,ur.WINDOWS_PHONE_10,ur.WINDOWS_NT_4_0,ur.MACOSX,ur.MACOSX_3,ur.MACOSX_4,ur.MACOSX_5,ur.MACOSX_6,ur.MACOSX_7,ur.MACOSX_8,ur.MACOSX_9,ur.MACOSX_10,ur.MACOSX_11,ur.MACOSX_12,ur.MACOSX_13,ur.MACOSX_14,ur.MACOSX_15].reduce((r,s)=>r===ur.UNKNOWN&&this.osVersion[s]?s:r,ur.UNKNOWN),this.browserVersion="0",this.browser!==ha.UNKNOWN){let s=e.exec(i,Zze[this.browser]);s&&(this.browserVersion=s[1])}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),$ie=(()=>{var t;class n{constructor(){this.pageVisibleBSubject=new Qn(!0),this.init()}isVisible(){return this.pageVisible}pageVisibleObservable(){return this.pageVisibleBSubject.asObservable()}init(){this.detectPageVisibilityProperties(),!0===this.isVisibilityApiSupported()?this.setListener():this.setFallbackListeners()}setListener(){window.document.addEventListener(this.visibilityChangeEvent.toString(),e=>{this.setVisible(!document[this.hiddenPropertyKey]),this.pageVisibleBSubject.next(this.isVisible())})}setFallbackListeners(){window.onblur=this.changedVisibility,window.onfocus=this.changedVisibility,window.onpagehide=this.changedVisibility,window.onpageshow=this.changedVisibility}changedVisibility(e){("pagehide"===e.type||"blur"===e.type||"pageshow"===e.type||"focus"===e.type)&&("pagehide"===e.type||"blur"===e.type?(this.setVisible(!1),this.pageVisibleBSubject.next(this.isVisible())):("pageshow"===e.type||"focus"===e.type)&&(this.setVisible(!0),this.pageVisibleBSubject.next(this.isVisible())))}isVisibilityApiSupported(){return!(typeof document.addEventListener>"u"||typeof document[this.hiddenPropertyKey.toString()]>"u")}setVisible(e){this.pageVisible=e}detectPageVisibilityProperties(){typeof window.document.hidden<"u"?(this.hiddenPropertyKey=kP.Hidden,this.visibilityChangeEvent=LP.VisibilityChange):typeof window.document.mozHidden<"u"?(this.hiddenPropertyKey=kP.MozHidden,this.visibilityChangeEvent=LP.MozVisibilityChange):typeof window.document.msHidden<"u"?(this.hiddenPropertyKey=kP.MsHidden,this.visibilityChangeEvent=LP.MsVisibilityChange):typeof window.document.webkitHidden<"u"&&(this.hiddenPropertyKey=kP.WebkitHidden,this.visibilityChangeEvent=LP.WebkitVisibilityChange)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var kP=function(t){return t[t.Hidden="hidden"]="Hidden",t[t.MozHidden="mozHidden"]="MozHidden",t[t.MsHidden="msHidden"]="MsHidden",t[t.WebkitHidden="webkitHidden"]="WebkitHidden",t}(kP||{}),LP=function(t){return t[t.VisibilityChange="visibilitychange"]="VisibilityChange",t[t.MozVisibilityChange="mozvisibilitychange"]="MozVisibilityChange",t[t.MsVisibilityChange="msvisibilitychange"]="MsVisibilityChange",t[t.WebkitVisibilityChange="webkitvisibilitychange"]="WebkitVisibilityChange",t}(LP||{}),Yze=__webpack_require__(76840),er=function(t){return t.Logout="logout",t.Login="login",t.AppReady="appReady",t}(er||{});let xr=(()=>{var t;class n{constructor(){this.authStatusChangeEvent=new sn}dispatch(e){this.authStatusChangeEvent.next(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Zt=(()=>{var t;class n{constructor(e,i){this.http=e,this.authListenerService=i,this.config=Lt.CONFIG,this.authListenerService.authStatusChangeEvent.pipe(bt(r=>r===er.Logout)).subscribe(this.onLogout)}requestConfigByUser(e,i){var r=this;return f(function*(){try{let s=new Cl;e&&(s=s.set("engaged-segment",e));let a=new $l;i&&(a=a.append("gridVersion",i)),r.configByUser=yield r.http.get("config/by-user",{headers:s,params:a}).toPromise().then(c=>c.body)}catch(s){throw jt.createErrorInstance(s)}})()}getConfig(){var e;return null!==(e=this.configByUser)&&void 0!==e?e:this.config}getEnvironmentEndpoints(){return Lt.environmentConfig}getGameRelatedConfig(e){return{gameConfig:this.getConfig().content.games.list.find(r=>e===r.id),matchmaking:this.getConfig().content.matchmaking[e]}}getMultiplayerGames(){return this.getConfig().content.games.list.filter(e=>e.type===Dc.EGameType.Multiplayer)}singleGamePlatform(){return 0===this.getConfig().content.games.grid.length}onLogout(){this.configByUser=void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(xr))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Dr=new Ot("MainConfig",{factory:()=>mt(Zt).getConfig()}),Fn="popupOutlet",Ai="popup";class Kie{createContext(n){switch(n){case oi:return this.createPrimaryContext();case Fn:return this.createPopupOutletContext();default:throw new Error("Unknown outlet")}}createPrimaryContext(){return this.createObject(oi,"",Wr.AppPrimary)}createPopupOutletContext(){return this.createObject(Fn,Ai,Wr.Popup)}createObject(n,o,e){return{outlet:n,path:o,container:e}}}let Yt=(()=>{var t;class n{constructor(e,i,r,s){this.maxHistoryLength=50,this.router=e,this.rootActivatedRoute=i,this.constants=r,this.appOutlets=new ie.List([oi,Fn]),this.browserHistory=new ie.List,this.history={app:new ie.List,[oi]:new ie.List,[Fn]:new ie.List},this.outletCtxFactory=new Kie,this.platformConfig=s,this.subscribeListeners()}set urlToRedirectAfterLogin(e){this._urlToRedirectAfterLogin=e}get urlToRedirectAfterLogin(){return this._urlToRedirectAfterLogin}isDomainLink(e){return!!e.match(this.platformConfig.platform.domain)}getActiveOutletContexts(){const e=new ie.List([this.outletCtxFactory.createContext(oi)]);return this.appOutlets.where(i=>i!==oi).forEach(i=>{""!==this.getOutletUrl(i)&&e.add(this.outletCtxFactory.createContext(i))}),e}getHistory(e){return this.history[e||"app"]}getBrowserHistory(){return this.browserHistory}closeSecondaryOutlets(e){return this.closeOutlets(this.appOutlets.where(i=>i!==oi),e)}closeOutlets(e,i){const r={};return e.forEach(s=>r[s]=null),this.navigate([{outlets:r}],i)}findOutletContext(e){const i=new ie.List(e).where(r=>r.outlet!==oi&&this.appOutlets.has(r.outlet)).first();return this.outletCtxFactory.createContext(i?i.outlet:oi)}navigateBack(e){if(!e)return history.back(),Promise.resolve(!0);const i=this.history[e],r=i.get(i.length-2);let s;return r&&(s=r.endEvent.urlAfterRedirects,this.history.app.remove(this.history.app.last()),this.history.app.remove(r),i.toArray().splice(i.length-2)),this.navigateByUrl(s||this.constants.defaultLoggedRoute)}getOutletUrl(...e){let i=null,r=oi,s=this.rootActivatedRoute.snapshot;e[0]&&("string"==typeof e[0]?r=e[0]:(s=e[0].root,r=e[1]||oi)),i=s.children.find(c=>c.outlet===r);let a="";if(i){let c=i;for(;c;)c.url.length>0&&c.url.forEach(u=>a+="/".concat(u)),c=c.firstChild}return a}navigateTo(e,i){return this.navigateByUrl(e,i)}navigateByUrl(e,i){var r=this;return f(function*(){const s=r.buildExtras(i);r.currentNavigation={url:e,extras:s};let a=yield r.router.navigateByUrl(e,s);return s&&s.ignoreGuards&&(a=yield r.router.navigateByUrl(e,{...s,queryParams:{bypassGuards:null},queryParamsHandling:"merge",replaceUrl:!0})),a})()}isNavigationStoppable(e){return!(null!=e&&e.root.queryParams&&"true"===e.root.queryParams.bypassGuards)}get config(){return this.router.config}get events(){return this.router.events}get routerState(){return this.router.routerState}get navigated(){return this.navigated}get urlHandlingStrategy(){return this.urlHandlingStrategy}get routeReuseStrategy(){return this.routeReuseStrategy}getCurrentNavigation(){return this.router.getCurrentNavigation()}get onSameUrlNavigation(){return this.router.onSameUrlNavigation}initialNavigation(){this.router.initialNavigation()}setUpLocationChangeListener(){this.router.setUpLocationChangeListener()}get url(){return this.router.url}resetConfig(e){this.resetConfig(e)}ngOnDestroy(){this.router.ngOnDestroy()}dispose(){this.router.dispose()}createUrlTree(e,i){return this.router.createUrlTree(e,this.buildExtras(i))}navigate(e,i){var r=this;return f(function*(){const s=r.buildExtras(i);if(s&&s.outletContext&&!s.relativeTo&&s.outletContext.outlet!==oi){const c=[];e.forEach(b=>{"string"==typeof b&&0!==b.length?b.split("/").forEach(w=>{""!==w&&c.push(w)}):c.push(b)});const u=[{outlets:{[s.outletContext.outlet]:[s.outletContext.path,...c]}}];r.currentNavigation={url:r.serializeUrl(r.createUrlTree(u,s)),extras:s};let h=yield r.router.navigate(u,s);return s&&s.ignoreGuards&&(h=yield r.router.navigate(u,{...s,queryParams:{bypassGuards:null},queryParamsHandling:"merge",replaceUrl:!0})),h}r.currentNavigation={url:r.serializeUrl(r.createUrlTree(e,s)),extras:s};let a=yield r.router.navigate(e,s);return s&&s.ignoreGuards&&(a=yield r.router.navigate(e,{...s,queryParams:{bypassGuards:null},queryParamsHandling:"merge",replaceUrl:!0})),a})()}getUrlByOutlet(e,i=oi){let r=e;const s=this.router.parseUrl(e),a=s.root.children[i];if(a&&a.segments.length){let c="";for(let u=1;u<a.segments.length;u++){const h=a.segments[u];c+="/".concat(h.path),Object.keys(h.parameters).forEach(b=>{c+=";".concat(b,"=").concat(h.parameters[b])})}r=c,Object.keys(s.queryParams).forEach(u=>{r+="?".concat(u,"=").concat(s.queryParams[u])})}return r}serializeUrl(e){return this.router.serializeUrl(e)}parseUrl(e){return this.router.parseUrl(e)}isActive(e,i){return this.router.isActive(e,i)}isFirstNavigation(e){return!!this.firstNavigation&&this.firstNavigation.id===e.id}getFirstNavigation(){return this.firstNavigation}isSecondaryOutlet(e){const i=e.match("".concat(Fn,":").concat(Ai));return i&&0!==i.length}subscribeListeners(){let e;this.router.events.pipe(bt(i=>i instanceof fh)).subscribe(i=>{this.firstNavigation||(this.firstNavigation=this.getCurrentNavigation()),e={startEvent:i,activationEvent:void 0,endEvent:void 0,context:void 0,popupOutletUrl:this.getOutletUrl(Fn),extras:this.getCurrentNavigation().extras},this.currentNavigation&&this.currentNavigation.url===i.url&&(e.extras=this.currentNavigation.extras)}),this.router.events.pipe(bt(i=>i instanceof Yx)).subscribe(i=>{0===i.snapshot.children.length&&(e.activationEvent=i,e.context=this.findOutletContext(i.snapshot.pathFromRoot))}),this.router.events.pipe(bt(i=>i instanceof lb)).subscribe(()=>{"popstate"===e.startEvent.navigationTrigger&&this.browserHistory.remove(this.browserHistory.last())}),this.router.events.pipe(bt(i=>i instanceof as)).subscribe(i=>{if(this.currentNavigation=void 0,e.endEvent=i,"popstate"===e.startEvent.navigationTrigger){this.browserHistory.remove(this.browserHistory.last());const r=this.history.app.last();if(r){this.history.app.remove(r);const s=this.history[r.context.outlet];s.remove(s.last())}}else{const r=this.history[e.context.outlet],s=r.last();e.extras&&e.extras.replaceUrl&&this.browserHistory.remove(this.browserHistory.last()),this.browserHistory.add(e),"/auto-login"!==i.urlAfterRedirects&&(!s||i.urlAfterRedirects!==s.endEvent.urlAfterRedirects)&&(e.extras&&e.extras.replaceUrl&&this.history.app.last()&&this.history.app.remove(this.history.app.last()),this.history.app.add(e),this.history.app.length>=this.maxHistoryLength&&this.history.app.removeAt(0),e.extras&&e.extras.replaceUrl&&r.last()&&r.remove(r.last()),r.add(e),r.length>=this.maxHistoryLength&&r.removeAt(0))}e.popupOutletUrl&&!this.getOutletUrl(Fn)&&(this.history[Fn]=new ie.List)})}buildExtras(e){let i=e;return void 0!==e&&e.ignoreGuards&&(i.queryParams={...e.queryParams||{},bypassGuards:"true"}),i}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Po),T(tn),T(Dr))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class Zie{constructor(n,o,e){this.handleRootDisconnect=()=>{!1===this.options.autoReconnect&&this.socket.disconnect()},this.handleReconnect=i=>{this.reconnectState={isReconnecting:!0,data:i}},this.handleConnect=()=>{this.reconnectState.isReconnecting&&(this.reconnectState.isReconnecting=!1,this.events.emit("reconnect",this.reconnectState.data))},this.handleDisconnect=i=>{i!==Ds.ClientDisconnect&&i!==Ds.ServerDisconnect&&this.events.emit("connection.lost",i)},this.socket=n,this.options=e||{autoReconnect:!0},this.reconnectState={isReconnecting:!1,data:void 0},this.events=new Ep,this.internalListeners=new ie.List,this.rootRef=this.socket.io.nsps["/"],this.ngZone=o,this.attachInternalListeners()}get connected(){return this.socket.connected}get disconnected(){return this.socket.disconnected}get name(){return this.socket.nsp}get manager(){return this.socket.io}set manager(n){this.socket.io=n}emit(n,...o){this.ngZone.runOutsideAngular(()=>{this.socket.emit(n,...o)})}once(n,o){this.socket.once(n,this.wrapCallbackInZone(o))}disconnect(){this.socket.disconnect()}dispose(){this.removeAllListeners(),this.disconnect()}connect(){return new Promise((n,o)=>{let e;this.internalListeners.length||this.attachInternalListeners();const i=()=>{var s;this.socket.removeEventListener("connect.ok",i),this.socket.removeEventListener("error",r),this.socket.removeEventListener("disconnect",r),null===(s=e)||void 0===s||s.detach(),n()},r=s=>{var a;this.socket.removeEventListener("connect.ok",i),this.socket.removeEventListener("error",r),this.socket.removeEventListener("disconnect",r),null===(a=e)||void 0===a||a.detach(),o(s)};this.onConnect(i),this.onError(r),e=this.onForceDisconnect(s=>{r(s.reason===Ds.DnspDc?Ds.ServerDisconnect:s.reason)}),this.onDisconnect(r),this.socket.connect()})}on(n,o){return new ie.EventListener(this.socket,n,this.wrapCallbackInZone(o))}removeListener(n,o){this.socket.removeListener(n,o)}removeAllListeners(){this.internalListeners.forEach(n=>n.detach()),this.internalListeners=new ie.List,this.events.removeAllListeners(),this.socket.removeAllListeners()}onConnect(n){return this.on("connect.ok",n)}onConnecting(n){return this.on("connecting",n)}onError(n){return this.on("error",n)}onDisconnect(n){return this.on("disconnect",n)}onForceDisconnect(n){return this.on("force_dc",n)}onReconnect(n){return new ie.EventListener(this.events,"reconnect",n)}onConnectionLost(n){return new ie.EventListener(this.events,"connection.lost",n)}onReconnectAttempt(n){return this.on("reconnect_attempt",n)}onReconnecting(n){return this.on("reconnecting",n)}onReconnectError(n){return this.on("reconnect_error",n)}onReconnectFailed(n){return this.on("reconnect_failed",n)}attachInternalListeners(){this.internalListeners.add(new ie.EventListener(this.rootRef,"disconnect",this.handleRootDisconnect)),this.internalListeners.add(new ie.EventListener(this.socket,"disconnect",this.handleDisconnect)),this.internalListeners.add(new ie.EventListener(this.socket,"reconnect",this.handleReconnect)),this.internalListeners.add(this.onConnect(this.handleConnect))}wrapCallbackInZone(n){const o=(...e)=>{this.ngZone.run(()=>{n.apply(this,[...e])})};return o.fn=n,o}}var Jze=JS.WebSocketNotSupportedError,NA=lt.NetworkError;let Xze=(()=>{var t;class n{constructor(e,i,r,s,a){this.onSocketReconnect=c=>{console.log("[Socket] reconnect",c),this.updateStatusAndNotify(Ca.Reconnected,void 0,{attempt:c})},this.onSocketReconnectAttempt=c=>{console.warn("[Socket] reconnect_attempt",c),this.updateStatusAndNotify(Ca.Reconnecting,void 0,{attempt:c,maxAttempts:this.options.reconnectionAttempts})},this.onSocketForceDisconnect=c=>{console.log("[Socket] force disconnect, reason",c),this.updateStatusAndNotify(Ca.NotConnected,"MultipleConnections"===c?Ds.ForceDisconnect:Ds.ServerDisconnect)},this.onSocketDisconnect=c=>{console.log("[Socket] disconnect",c,this.rootNamespace),this.updateStatusAndNotify(Ca.NotConnected,c)},this.onUserLogout=()=>{this.dispose()},this.systemService=i,this.navigation=r,this.defaultNotLoggedRoute=s.defaultNotLoggedRoute,this.options={multiplex:!0,forceNew:!1,jsonp:!1,autoConnect:!1,reconnectionDelay:2e3,reconnectionDelayMax:5e3,reconnectionAttempts:5,transports:["websocket"]},this.connectionStatusBSubject=new Qn({previous:void 0,current:Ca.NoConnection,data:void 0}),e.authStatusChangeEvent.pipe(bt(c=>c===er.Logout)).subscribe(this.onUserLogout),this.namespacesList=new ie.List,this.ngZone=a}initialize(e){this.token=e,this.clearNamespacesList()}connect(){var e=this;return this.throwIfSocketNotSupported(),new Promise((i,r)=>{this.ngZone.runOutsideAngular(f(function*(){try{e.rootNamespace=new Zie(Yze.connect("".concat(Lt.CONFIG.platform.endPoints.socketServer,"?token=").concat(e.token),e.options),e.ngZone),e.rootNamespace.onReconnectFailed(s=>{console.warn("[Socket] reconnect_failed, reason:",s),r(new NA),e.onSocketReconnectFailed()}),e.rootNamespace.onError(s=>e.onSocketError(s,r)),e.rootNamespace.onDisconnect(e.onSocketDisconnect),e.rootNamespace.onReconnect(e.onSocketReconnect),e.rootNamespace.onReconnectAttempt(e.onSocketReconnectAttempt),e.rootNamespace.onReconnecting(s=>{console.warn("[Socket] reconnecting",s)}),e.rootNamespace.onReconnectError(s=>{console.warn("[Socket] reconnect_error",s)}),e.rootNamespace.on("force_disconnect",e.onSocketForceDisconnect),e.rootNamespace.on("message",(s,...a)=>{console.log("[Socket] message, event: ".concat(s,"', data:"),a),e.onSocketMessage(s,...a)}),e.rootNamespace.onConnect(()=>{e.updateStatusAndNotify(Ca.Connected),console.log("Connected to Websocket")}),yield e.rootNamespace.connect(),i()}catch(s){r(s)}}))})}connectToNamespace(e,i){var r=this;return f(function*(){const s=r.parseNamespace(e);if(!0===r.rootNamespace.disconnected)throw new NA;const a=r.getNamespace(s);if(a&&!0===a.connected)return console.log("Namespace ".concat(s," already connected!")),a;let c;a&&!0===a.disconnected?(console.log("Reuse namespace ".concat(s,"!")),c=a):(c=new Zie(r.rootNamespace.manager.socket(s),r.ngZone,i),r.namespacesList.add(c));try{return yield c.connect(),console.log("Connected to Socket namespace ".concat(s,".")),c}catch(u){throw"string"!=typeof u||u!==Ds.ClientDisconnect&&u!==Ds.ServerDisconnect&&u!==Ds.Unknown?(console.warn("Error connecting to socket namespace ".concat(s,". Reason: ").concat(u)),new NA):u}})()}on(e,i){return this.rootNamespace.on(e,i)}emit(e,...i){this.throwIfSocketNotSupported(),this.rootNamespace.emit(e,...i)}once(e,i){this.rootNamespace.once(e,i)}removeListener(e,i){this.rootNamespace&&this.rootNamespace.removeListener(e,i)}off(e,i){this.rootNamespace.removeListener(e,i)}removeAllListeners(){this.rootNamespace.removeAllListeners()}disconnect(){this.rootNamespace&&(this.rootNamespace.disconnect(),console.warn("[Socket] disconnecting namespaces."),this.namespacesList.forEach(e=>e.disconnect())),console.warn("Socket disconnect!",this.rootNamespace)}dispose(){this.rootNamespace&&(this.removeAllListeners(),this.disconnect(),this.rootNamespace.dispose()),this.namespacesList.forEach(e=>e.dispose()),this.clearNamespacesList()}get connected(){return!!this.rootNamespace&&this.rootNamespace.connected}connectionStatusStream(){return this.connectionStatusBSubject.asObservable()}onConnect(e){return this.rootNamespace.onConnect(e)}onConnecting(e){return this.rootNamespace.onConnecting(e)}onDisconnect(e){return this.rootNamespace.onDisconnect(e)}onForceDisconnect(e){return this.rootNamespace.onForceDisconnect(e)}onReconnect(e){return this.rootNamespace.onReconnect(e)}onReconnecting(e){return this.rootNamespace.onReconnecting(e)}onConnectionLost(e){return this.rootNamespace.onConnectionLost(e)}onSocketError(e,i){if(console.log("[Socket] error",e),e.arguments&&e.arguments.length>0&&"not authorized"===e.arguments[0])this.rootNamespace&&this.rootNamespace.connected?(this.rootNamespace.disconnect(),location.reload()):this.navigation.navigate([this.defaultNotLoggedRoute],{ignoreGuards:!0});else switch(e){case"ExpiredOrWrongToken":this.navigation.navigate([this.defaultNotLoggedRoute],{ignoreGuards:!0}),this.rootNamespace.disconnect(),i(new et.General.ExpiredOrWrongToken(null,null));break;case"UnexpectedError":this.disconnect(),this.updateStatusAndNotify(Ca.NotConnected,Ds.ClientDisconnect),i(new NA)}}onSocketMessage(e,...i){if("force_disconnect"===e){const[r]=i;this.onSocketForceDisconnect(r)}}onSocketReconnectFailed(){this.updateStatusAndNotify(Ca.NotConnected)}throwIfSocketNotSupported(){if(!1===this.systemService.websocketSupported())throw new Jze}parseNamespace(e){return"/"===e.charAt(0)?e:"/".concat(e)}getNamespace(e){return this.namespacesList.where(i=>i.name===e).first()}clearNamespacesList(){this.namespacesList=new ie.List}updateStatusAndNotify(e,i,r){this.connectionStatusBSubject.next({previous:this.connectionStatusBSubject.getValue().current,current:e,reason:i,data:r})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(xr),T(tG),T(Yt),T(tn),T(an))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Ri=(()=>{var t;class n{initialize(e){throw new Error("Method not implemented.")}onConnect(e){throw new Error("Method not implemented.")}dispose(){throw new Error("Method not implemented.")}connectToNamespace(e,i){throw new Error("Method not implemented.")}connectionStatusStream(){throw new Error("Method not implemented.")}emit(e,i,...r){throw new Error("Method not implemented.")}onReconnect(e){throw new Error("Method not implemented.")}onConnectionLost(e){throw new Error("Method not implemented.")}once(e,i){throw new Error("Method not implemented.")}disconnect(){throw new Error("Method not implemented.")}onConnecting(e){throw new Error("Method not implemented.")}onReconnecting(e){throw new Error("Method not implemented.")}onDisconnect(e){throw new Error("Method not implemented.")}onForceDisconnect(e){throw new Error("Method not implemented.")}connect(){throw new Error("Method not implemented.")}removeListener(e,i){throw new Error("Method not implemented.")}removeAllListeners(){throw new Error("Method not implemented.")}on(e,i){throw new Error("Method not implemented.")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:function(e){let i=null;return i=e?new(e||t):T(Xze),i},providedIn:"root"}),n})();new Ot("ISignalRCommunicationConfig",{factory:()=>({endpoint:mt(Zt).getConfig().platform.endPoints.cgpSocketServer})});let Sa=(()=>{var t;class n{constructor(e,i,r){this.constants=r,this.onConnectionStatusChange=s=>{s.previous!==s.current&&(s.previous===Ca.Connected&&s.current===Ca.NotConnected&&s.reason!==Ds.ClientDisconnect&&s.reason!==Ds.ServerDisconnect?this.dispatchEvent(co.ConnectionLost):s.current===Ca.Reconnecting?this.dispatchEvent(co.ConnectionRestoreAttempt):s.previous===Ca.Reconnecting&&s.current===Ca.NotConnected?this.dispatchEvent(co.ReconnectFailed):s.previous===Ca.Reconnected&&s.current===Ca.Connected&&this.dispatchEvent(co.ConnectionRestored)),this.updateState({connectionStatus:s})},this.onPageVisibilityStatusChange=s=>{this.appState.visible!==s&&this.dispatchEvent(!0===s?co.PageVisible:co.PageHide),this.updateState({visible:s})},this.communicationService=i,this.pageVisibility=e,this.eventDispatcher=new Ep}init(){this.state=this.constants.defaultLoggedRoute,this.appState={connectionStatus:{current:Ca.NoConnection,previous:void 0,reason:void 0},visible:this.pageVisibility.isVisible()},this.connectionStatusSubscription=this.communicationService.connectionStatusStream().subscribe(this.onConnectionStatusChange),this.visibilityStatusSubscription=this.pageVisibility.pageVisibleObservable().subscribe(this.onPageVisibilityStatusChange),this.previousRoute=""}get(){return this.state}set(e){this.state=e}getAppState(){return this.appState}setPreviousRoute(e){this.previousRoute=this.get(),this.set(e)}getPreviousRoute(){return this.previousRoute}subscribe(e,i){this.eventDispatcher.addEventListener(e,i)}unsubscribe(e,i){this.eventDispatcher.removeEventListener(e,i)}dispatchEvent(e,i){const r=e===co.ConnectionRestoreAttempt?new Js(e.toString()):new Mi(e.toString(),i);this.eventDispatcher.dispatchEvent(r);const s=document.createEvent("CustomEvent");s.initCustomEvent("AppStateEvent",!0,!0,e),window.dispatchEvent(s)}updateState(e){for(const i in e)!0===e.hasOwnProperty(i)&&(this.appState[i]=e[i])}}return(t=n).\u0275fac=function(e){return new(e||t)(T($ie),T(Ri),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),ii=(()=>{var t;class n{constructor(e,i){this.config=e.getConfig(),this.constants=i}getImageUrl(e){return"".concat(this.constants.imagesPath,"/").concat(e)}getSoundsUrl(e){return"".concat(this.constants.soundsPath,"/").concat(e)}getClientEmojiUrl(e){return{emojiUrl:"".concat(this.constants.emojisPath,"/").concat(e,".png"),spritesheetUrl:"".concat(this.constants.emojisSpritesheetsPath,"/").concat(e,".png")}}createCdnPath(e){const i=this.config.core.cdn.path[e.prefix]||"",r=e.url||"";let s="";return e.cacheBusting&&e.cacheBusting===n.EAssetCacheBusting.Timestamp&&(s="?".concat(Date.now)),"".concat(this.config.core.cdn.url).concat(i).concat(r).concat(s)}createClubActiveAvatarUrl(e){return e.customAvatar&&e.customAvatar.isActive?this.createClubCustomAvatarPath(e.customAvatar.url):this.createClubPresetAvatarPath(e.presetAvatar.id)}createClubPresetAvatarPath(e){return this.createCdnPath({prefix:"clubsPresetAvatars",url:"".concat(e,".png")})}createClubCustomAvatarPath(e){return this.isBase64(e)?e:this.createClubRemoteAvatarPath(e)}createClubRemoteAvatarPath(e){return this.createCdnPath({prefix:"clubs",url:e})}isBase64(e){return new RegExp(/^data:([A-Za-z-+\/]+);base64,(.+)$/).test(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var aa;!function(t){let n;(n=t.EAssetCacheBusting||(t.EAssetCacheBusting={})).Timestamp="timestamp"}(ii||(ii={})),function(t){t.DefaultEvent=class n{constructor(i,r,s){this.category=i,this.type=r,this.args=s}},t.BuySuccessEvent=class o{constructor(i,r,s){this.category=i,this.type=r,this.args=s}}}(aa||(aa={}));let Qie=(()=>{var t;class n{constructor(e){this.store=e}adapt(e){var i;let r={action:e.args&&e.args.typeArgs?this.getAnalyticsValue({value:e.type,args:e.args.typeArgs}):e.type,label:null!=e&&null!==(i=e.args)&&void 0!==i&&i.label?this.getAnalyticsValue(e.args.label):void 0,value:e.args?e.args.value:0,nonInteraction:!!e.args&&!!e.args.nonInteraction};return("buy:success"===e.type||"donate:success"===e.type)&&(r.currency=e.args?e.args.currency:"",r.affiliation=e.args?e.args.affiliation:"",r.items=e.args?e.args.items:[],r.transactionId=e.args?e.args.transactionId:""),{eventName:e.category.replace(" ","_"),args:r}}getAnalyticsValue(e){if(typeof e>"u"||"string"==typeof e)return e?e.toString():void 0;const i=Object.keys(e.args);return e.value.replace(/{(\d+)}/g,(r,s)=>{let a;return"userId"===i[s]&&(a=this.store.selectUserState().profile.id!==e.args.userId&&e.args.userId?"otherProfile":"myProfile"),a})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),$G=(()=>{let t=class{constructor(o,e,i,r,s){this.ngZone=o,this.store=e,this.config=i,this.document=r,this.googleAnalyticsEventAdapter=s,this.gtag=()=>{},this.onNavigation=a=>{this.lastNavigationEvent=a},this.store=e,this.ngZone=o,this.config=i,this.eventSentSubject=new sn,this.attachListeners(),this.lastNavigationEvent={event:void 0,context:void 0},this.window=this.document.defaultView,this.initialized=this.initGtag()}sendPageView(o){this.initialized.then(()=>{Lt.CONFIG.core.tracking.google4.enabled&&this.ngZone.runOutsideAngular(()=>{this.setGeneralProperties(),this.gtag("event","pageview",{page:o,title:o})})})}sendEvent(o,e){this.initialized.then(()=>{if(!jS.checkIfTrackingEventIsSupported(o,this.config))return;const i=this.googleAnalyticsEventAdapter.adapt(o);console.warn("GATrackingService",i),this.ngZone.runOutsideAngular(()=>{this.eventSentSubject.next({event:o,context:e}),this.setGeneralProperties(),"buy:success"===o.type||"donate:success"===o.type?this.sendBuySuccessEvent(i,o):this.gtag("event",i.eventName,i.args)})})}sendException(o,e=!1){Lt.CONFIG.core.tracking.google4.enabled&&(console.warn("Sending GA exception ",o,e),this.ngZone.runOutsideAngular(()=>{this.gtag("event","exception",{exDescription:o,exFatal:e})}))}initGtag(){var o=this;return new Promise(function(){var e=f(function*(i){if(!Lt.CONFIG.core.tracking.google4.enabled)return i(!1);let r=Lt.CONFIG.core.tracking.google4.trackingId;try{yield Th.loadScript("https://www.googletagmanager.com/gtag/js?id=".concat(r),!0,!0),o.window.dataLayer=o.window.dataLayer||[],o.gtag=function(){this.window.dataLayer.push(arguments)},o.gtag("js",new Date),o.gtag("config",r,{send_page_view:!1}),i(!0)}catch(s){console.error("Error initializing GA service",s),i(!1)}});return function(i){return e.apply(this,arguments)}}())}sendBuySuccessEvent(o,e){var i,r;this.gtag("event","currencyCode",e.args.currency||""),this.gtag("set",{dimension3:e.args.affiliation||""}),this.gtag("set","user_properties",{user_id:null===(i=this.store.selectUserState())||void 0===i?void 0:i.profile.id}),this.gtag("event",o.eventName,o.args);const s=this.lastNavigationEvent&&this.lastNavigationEvent.event&&this.lastNavigationEvent.event.type.toString().startsWith("shop")&&null!==(r=this.lastNavigationEvent.event)&&void 0!==r&&r.args.label?this.lastNavigationEvent.event.args.label:"directUrl",a=e.type.toString().split(":")[0],c=e.args?o.args.label:void 0,u=new Jc.DefaultEvent(Nn.PurchaseFrom,s,{label:"".concat(a,":").concat(c)});this.sendEvent(u,this.lastNavigationEvent.context)}setGeneralProperties(){const o=window.innerWidth<window.innerHeight?cs.Portrait:cs.Landscape;if(this.gtag("set",{dimension1:"".concat(o,":").concat(window.innerWidth,"x").concat(window.innerHeight)}),this.store.selectUserState()){const e=!this.store.selectUserState()||void 0!==this.store.selectUserState().roles.find(r=>r.name===kr.GUESTUSER),i=this.store.selectUserState().profile.hasTierOrHigher(Fi.Full);this.gtag("set","user_properties",{user_id:this.store.selectUserState().profile.id,dimension2:e?"guest":i?"vip":"normal"})}else this.gtag("set",{userId:null,dimension2:"none"})}attachListeners(){this.eventSentSubject.pipe(bt(o=>"navigation"===o.event.category)).subscribe(this.onNavigation)}};return t=Qe([Fx(3,jy(La)),ue("design:paramtypes",[an,Jo,Object,Document,Qie])],t),t})();class FA{static isClubMemberRole(n){return FA.allClubMemberPermissionRoles().some(o=>o===n)}static allClubMemberPermissionRoles(){return Ys.getValues(qo).map(n=>FA.toPermissionRole(n))}static toPermissionRole(n){switch(n){case qo.President:return kr.CLUB_PRESIDENT;case qo.VicePresident:return kr.CLUB_VICE_PRESIDENT;case qo.Officer:return kr.CLUB_OFFICER;case qo.Member:return kr.CLUB_MEMBER;default:throw new Error('Permission role for club member role "'.concat(n,'" not found'))}}static permissionToMemberRole(n){switch(n){case kr.CLUB_PRESIDENT:return qo.President;case kr.CLUB_VICE_PRESIDENT:return qo.VicePresident;case kr.CLUB_OFFICER:return qo.Officer;case kr.CLUB_MEMBER:return qo.Member;default:throw new Error('Club member role for permission role "'.concat(n,'" not found'))}}static getNextHigher(n){return Ys.getNextLower(qo,n)}static getNextLower(n){return Ys.getNextHigher(qo,n)}static compare(n,o){return n<o?1:n>o?-1:0}}var Do=__webpack_require__(86455),Jt=__webpack_require__(52760),lw=__webpack_require__(54370),Yie=__webpack_require__.n(lw);function Ju(...t){const n=ES(t),o=function MGe(t,n){return"number"==typeof K3(t)?t.pop():n}(t,1/0),e=t;return e.length?1===e.length?Qc(e[0]):xS(o)(Ks(e,n)):Tp}const DP="default-avatars";let Rp=(()=>{var t;class n{constructor(e){this.urlService=e,this._defaultAvatarsList=[]}get defaultAvatarsList(){return this._defaultAvatarsList}set defaultAvatarsList(e){this._defaultAvatarsList=e}transformAvatarUrl(e){const i=new RegExp(/^data:([A-Za-z-+\/]+);base64,(.+)$/);return e&&this.isDefaultAvatar(e)?this.urlService.getImageUrl("".concat(DP,"/").concat(e)):e&&this.includesDefaultAvatar(e)?this.urlService.getImageUrl("".concat(DP,"/").concat(this.extractDefaultAvatarFromSrc(e))):e&&i.test(e)?e:e&&-1===e.indexOf("".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.avatars))?"".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.avatars).concat(e):e||void 0}isDefaultAvatar(e){return-1!==this.defaultAvatarsList.indexOf(e.slice(0,-1!==e.lastIndexOf("?")?e.lastIndexOf("?"):e.length))}includesDefaultAvatar(e){let i=!1;for(let r of this.defaultAvatarsList)-1!==e.indexOf(r)&&(i=!0);return i}extractDefaultAvatarFromSrc(e){let i=e;for(let r of this.defaultAvatarsList)-1!==e.indexOf(r)&&(i=r);return i}getRandomAvatar(){return this.defaultAvatarsList[(0,ie.randomInt)(0,this.defaultAvatarsList.length-1)]}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ii))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class KG{constructor(){this.device=new Kl}log(n){let o=n;n&&(n instanceof Error?o=(this.device.browser===ha.IE||this.device.browser===ha.MS_EDGE)&&n.stack||n:n instanceof ErrorEvent&&(o=n.error?(this.device.browser===ha.IE||this.device.browser===ha.MS_EDGE)&&n.error.stack||n.error:"".concat(n.message," ").concat(n.lineno," ").concat(n.colno," ").concat(n.filename))),console.error(o)}}var Tt;!function(t){let n;var e;let o;(e=n=t.EGameClientEvent||(t.EGameClientEvent={})).GameLoaded="gameLoaded",e.GameLoadError="gameLoadError",e.GameEnded="gameEnded",e.Win="gameWon",e.Loss="gameLost",e.OpenProfile="openProfile",e.OpenGifts="openGifts",e.OpenGiftsToAll="openGiftsToAll",e.OpenEmoticons="openEmoticons",e.OpenPhrases="openPhrases",e.OpenSettings="openSettings",e.ServerGameException="serverGameException",e.KickPenalty="kickPenalty",e.KickedTimeout="kickedTimeout",e.LoadingTimeout="loadingTimeout",e.AnalyticsEvent="analyticsEvent",e.RematchGame="rematchGame",e.SettingsChanged="settingsChanged",e.ClientMessage="clientMessage",e.OpenBuyIn="openBuyIn",e.OpenGameInvite="openGameInvite",e.TableUpdate="tableUpdate",e.ShowBotMessage="showBotMessage",e.OpenLeaderboard="openLeaderboard",e.OpenHowToPlay="openHowToPlay",e.BuyCurrency="buyCurrency",e.ShowAds="showAds",e.RemoveAds="removeAds",e.SendMessage="sendMessage",e.SendAnalyticsEvent="sendAnalyticsEvent",e.SaveData="saveData",e.Rematch="rematch",e.StartLoading="startLoading",function(e){e.Minislot="minislot"}(o=t.EBettingGame||(t.EBettingGame={}))}(Tt||(Tt={}));class Jie{constructor(n){this._settingsService=n}get language(){return this._settingsService.getLanguage()}get sound(){return this._settingsService.getInGameMusic()}get lowQualityGraphics(){return this._settingsService.getLowQualityGraphics()}get forceCanvas(){return this._settingsService.getForceCanvas()}}class Xie{constructor(n,o,e,i,r,s,a,c,u){this.eventDispatcher=new Ep,this.onBuyCurrency=h=>{this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.BetError,Jt.EBettingClientError.GenericError))},this.containerId=n,this.basePath=o,this.cdnPath=e,this.localizationsEndpoint=i,this.channelId=r,this.gameService=a,this.settings=new Jie(c),this.socketService=s,this.myPlayerId=this.gameService.myPlayerId(),this.isWidget=u}init(){var n=this;return f(function*(){try{if(n.nsp=yield n.socketService.connectToNamespace(n.channelId),n.destroyed||(n.sendMessage("get.conf",o=>n.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.Config,o)),o=>n.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.ConfigError,o))),n.initialized))return;n.nsp.on("jp.updt",o=>n.handleUpdate(o)),n.nsp.on("btg.wupdt",o=>n.handleUpdateGameWin(o)),n.nsp.onReconnect(()=>n.eventDispatcher.dispatchEvent(new Js(Jt.GameEvent.Reconnect))),n.initialized=!0}catch(o){n.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.ConfigError,o))}})()}bet(n){if(n.bet>this.getWallet().chips)this.buyCurrency({amount:5*n.bet,currency:Jt.EInGameBuyCurrency.Chips},this.onBuyCurrency,this.onBuyCurrency);else{const o={isWidget:this.isWidget,...n};this.sendMessage("place.bet",o,e=>this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.Bet,e)),e=>this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.BetError,e)))}}getWallet(){return this.gameService.getWallet()}getUserProfile(n){return this.gameService.getUserProfile(n)}updateGameWin(n){console.log("Betting Game client update game win",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.GameWinUpdate,n))}updateWallet(n){console.log("Betting Game client update wallet",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.WalletUpdate,n))}buyCurrency(n,o,e){console.log("Betting Game client buy currency",n),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.BuyCurrency,{args:n,onSuccess:o,onFail:e}))}changeSettings(n){console.warn("Betting Game client change settings",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.SettingsChanged,n))}openSettings(){console.log("Betting Game client open settings"),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenSettings,"openSettings"))}openLeaderboard(){console.log("Betting Game client openLeaderboard"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.OpenLeaderboard))}gameLoaded(){console.log("Betting Game loaded"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.GameLoaded))}destroy(){var n,o,e;console.log("Betting Game Client Destroy"),this.destroyed=!0,null===(n=this.nsp)||void 0===n||n.removeAllListeners(),null===(o=this.nsp)||void 0===o||o.disconnect(),null===(e=this.nsp)||void 0===e||e.dispose()}handleUpdate(n){console.log("Betting game update",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.JackpotUpdate,n))}handleUpdateGameWin(n){var o=this;return f(function*(){console.log("Betting handle update game win",n),o.updateGameWin({profile:o.gameService.transformProfile(n.profile),amount:n.amount,bet:n.bet,isJackpot:n.isJackpot})})()}sendMessage(...n){if(this.destroyed)return;const o=n[0],e="function"!=typeof n[1]?n[1]:void 0;let i=e?n[2]:n[1],r=e?n[3]:n[2];const s=setTimeout(()=>{this.destroyed||r(new class extends Error{constructor(){super(...arguments),this.errCode=Jt.EBettingClientError.Timeout}})},15e3),a=[];e&&a.push(e),a.push(c=>{if(clearTimeout(s),!this.destroyed){if(c.status===Ve.ECmdStatus.Ok)return i(c.data);{const u=new class extends Error{constructor(){super(...arguments),this.errCode=c.status}};return r(u)}}}),this.nsp.emit(o,...a)}}var Zl=Tt.EGameClientEvent,eje=Tt.EBettingGame;class eoe{constructor(n,o){this._settingsService=n,this.isSpectating=o}get language(){return this._settingsService.getLanguage()}get sound(){return this._settingsService.getInGameMusic()}get lowQualityGraphics(){return this._settingsService.getLowQualityGraphics()}get dealerDeck(){return this._settingsService.getDealerDeck()}get forceCanvas(){return this._settingsService.getForceCanvas()}get spectatorMode(){return this.isSpectating}destroy(){this._settingsService=void 0}}let toe=(()=>{var t;class n{constructor(e,i,r,s,a){this.id=e,this._userId=i,this.type=r,this._message=s,this.url=a}get userId(){return this._userId}get message(){return this._message}}return(t=n).TYPE_TEXT="text",t.TYPE_IMAGE="image",n})();class noe extends toe{constructor(n,o,e,i,r){super(n,o,Jt.EGameClientChatMessage.Emoji,e,i),this.data=r}}class ioe extends toe{constructor(n,o,e,i,r){super(n,o,Jt.EGameClientChatMessage.Phrase,e,i),this.data=r}}class tje{constructor(n,o,e,i,r,s,a,c,u,h){this._destroyed=!1,this._onGameMessage=b=>{try{this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.GameMessage.toString(),b))}catch(w){this._gameService.onGameException(w)}},this.onClientMessage=b=>{try{let le,me;const ge=b.userId;let Me;if(b.type===ec.GiftSent)return void this._onGiftSent(b.payload);if(b.type===ec.Phrase&&(me=this._gameService.getInGameMessages()[b.type][b.payload.key][b.id],Me=new ioe(b.payload.key+b.id,ge,me,le,void 0),b.payload)){var w,R,G;const Ke=(null===(w=b.payload)||void 0===w||null===(w=w.voiceOver)||void 0===w?void 0:w.languages[this.settings.language])||(null===(R=b.payload)||void 0===R||null===(R=R.voiceOver)||void 0===R?void 0:R.languages[Lt.CONFIG.platform.languages.default])||(null===(G=b.payload)||void 0===G||null===(G=G.voiceOver)||void 0===G?void 0:G.languages.en);let Ee;Ke&&(Ee=b.payload.voiceOver.formats.map(ot=>"".concat(Ke.path,".").concat(ot))),Me.data={audioUrls:Ee}}if(this.isEmojiMessage(b))if(me=b.id,le=b.id,Me=new noe(le,ge,me,le,void 0),b.payload){var K,te,ee;Me.url=b.payload.spritesheet;const Ke=(null===(K=b.payload)||void 0===K||null===(K=K.voiceOver)||void 0===K?void 0:K.languages[this.settings.language])||(null===(te=b.payload)||void 0===te||null===(te=te.voiceOver)||void 0===te?void 0:te.languages[Lt.CONFIG.platform.languages.default])||(null===(ee=b.payload)||void 0===ee||null===(ee=ee.voiceOver)||void 0===ee?void 0:ee.languages.en);let Ee;Ke&&(Ee=b.payload.voiceOver.formats.map(ot=>"".concat(Ke.path,".").concat(ot))),Me.data={url:b.payload.url,spritesheet:b.payload.spritesheet,audioUrls:Ee}}else Me.data={url:le,spritesheet:le,audioUrls:void 0};console.warn("Dispatching message event",Me),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.ChatMessage.toString(),Me))}catch(le){console.error(le)}},this._onGiftSent=b=>{console.warn("Dispatch GIFT_SENT",b),b.forEach(w=>{w.giftURL="".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.giftsSpritesheets).concat(w.giftId,".png");try{this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.GiftSent.toString(),w))}catch(R){throw this._loggerService.error(R),R}})},this._containerId=n,this._basePath=o,this._cdnPath=e,this._localizationsEndpoint=i,this._settings=new eoe(u,c.isSpectating),this._gameInfo=r,this._socketService=s,this.nsp=a,this._gameService=c,this._loggerService=h,this._eventDispatcher=new Ep,this.slotGameClient=new Xie(n,o,e,i,eje.Minislot,s,c,u,!0),this.nsp.on(Ve.ActiveRoomProtocol.Messages.GameMessageOut,this._onGameMessage)}saveData(){console.warn("Method not implemented.")}get gameInfo(){return this._gameInfo}set gameInfo(n){this._gameInfo=n}get eventDispatcher(){return this._eventDispatcher}get containerId(){return this._containerId}get basePath(){return this._basePath}get cdnPath(){return this._cdnPath}get localizationsEndpoint(){return this._localizationsEndpoint}get settings(){return this._settings}get myPlayerId(){return this._gameService.myPlayerId()}get giftsEnabled(){return this._gameService.getInGameGiftsEnabled()}sendMessage(n){this.gameInfo.gameId?n?this.nsp.emit(Ve.ActiveRoomProtocol.Messages.GameMessageIn,n):console.log("Trying to send empty game message!"):console.log("Trying to send game message, but no gameId is defined!")}getUserProfile(n){return this._gameService.getUserProfile(n)}getWallet(){return this._gameService.getWallet()}updateWallet(n){console.warn("Game client update wallet",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.WalletUpdate,n)),this.slotGameClient.updateWallet(n)}openEmoticons(){try{this.eventDispatcher.dispatchEvent(new Mi(Zl.OpenEmoticons,"openEmoticons"))}catch(n){throw this._loggerService.error(n),n}}openPhrases(){try{this.eventDispatcher.dispatchEvent(new Mi(Zl.OpenPhrases,"openPhrases"))}catch(n){throw this._loggerService.error(n),n}}openSettings(){try{console.log("Game client openSettings"),this.eventDispatcher.dispatchEvent(new Mi(Zl.OpenSettings,"openSettings"))}catch(n){throw this._loggerService.error(n),n}}openUserProfile(n){try{console.log("Game client openUserProfile",n),this.eventDispatcher.dispatchEvent(new Mi(Zl.OpenProfile,n))}catch(o){throw this._loggerService.error(o),o}}openGifts(n){try{console.log("Game client openGifts",n),this.eventDispatcher.dispatchEvent(new Mi(Zl.OpenGifts,n))}catch(o){throw this._loggerService.error(o),o}}openGiftToAll(){try{console.log("Game client openGiftToAll"),this.eventDispatcher.dispatchEvent(new Js(Zl.OpenGiftsToAll))}catch(n){throw this._loggerService.error(n),n}}openBuyInInterface(n,o){try{console.log("Game client openBuyInInterface",n),this._eventDispatcher.dispatchEvent(new Mi(Zl.OpenBuyIn,{args:n,onSuccess:o}))}catch(e){throw this._loggerService.error(e),e}}buyCurrency(n,o,e=(()=>{})){try{console.log("Game client buy currency",n),this._eventDispatcher.dispatchEvent(new Mi(Zl.BuyCurrency,{args:n,onSuccess:o,onFail:e}))}catch(i){throw this._loggerService.error(i),i}}showBotMessage(n){try{console.log("Bot chat message",n),this.eventDispatcher.dispatchEvent(new Mi(Zl.ShowBotMessage,n))}catch(o){throw this._loggerService.error(o),o}}openGameInvite(){try{console.log("Game client openGameInvite"),this.eventDispatcher.dispatchEvent(new Js(Zl.OpenGameInvite))}catch(n){throw this._loggerService.error(n),n}}openLeaderboard(){try{console.log("Game client openLeaderboard"),this.eventDispatcher.dispatchEvent(new Js(Zl.OpenLeaderboard))}catch(n){throw this._loggerService.error(n),n}}openHowToPlay(){try{console.log("Game client openHowToPlay"),this.eventDispatcher.dispatchEvent(new Js(Zl.OpenHowToPlay))}catch(n){throw this._loggerService.error(n),n}}showAds(){}removeAds(){}sendAnalytics(){}rematch(){}startLoading(){clearTimeout(this._loadingTimeout)}gameLoaded(){clearTimeout(this._loadingTimeout);try{console.log("Dispatching Game_Loaded."),this._eventDispatcher.dispatchEvent(new Js(Zl.GameLoaded))}catch(n){throw this._loggerService.error(n),n}}gameLoadError(){clearTimeout(this._loadingTimeout);try{console.log("Dispatching Game load erorr."),this._eventDispatcher.dispatchEvent(new Js(Zl.GameLoadError))}catch(n){throw this._loggerService.error(n),n}}gameEnded(){console.warn("Game ended");try{return this.eventDispatcher.dispatchEvent(new Js(Zl.GameEnded))}catch(n){throw this._loggerService.error(n),n}}win(){}loss(){}changeSettings(n){try{console.warn("Dispatching setting changed",new Mi(Zl.SettingsChanged,n)),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.SettingsChanged.toString(),n)),this.slotGameClient.changeSettings(n)}catch(o){throw this._loggerService.error(o),o}}destroy(){console.log("Game Client Destroy"),this.nsp.removeListener(Ve.ActiveRoomProtocol.Messages.GameMessageOut,this._onGameMessage),this._settings=void 0,this.nsp=void 0,this._gameService=void 0,this._eventDispatcher=void 0,this._gameInfo=void 0,this._containerId=void 0,this._basePath=void 0,this._cdnPath=void 0,clearTimeout(this._loadingTimeout),this._destroyed=!0,this.slotGameClient.destroy()}isEmojiMessage(n){return n.type===ec.Emoteicon}}const ZG=new Ot("GameClientFactory");class nje{constructor(n,o,e,i){this.eventDispatcher=new Ep,this.players={},this.destroy$=new sn,this.myPlayerId=n.myPlayerId,this.containerId=n.containerId,this.basePath=n.basePath,this.cdnPath=n.cdnPath,this.localizationsEndpoint=n.localizationsEndpoint,this.settings=new Jie(o),this.walletManager=i,this.assetResolver=e,this.walletManager.updateWallet$.pipe(wn(this.destroy$)).subscribe(r=>this.updateWallet(r)),n.players.forEach(r=>{const s=e.resolveAvatar(r.avatar);this.players[r.id]={...r,avatar:s,avatarUrl:s}})}init(){console.warn("BaseBettingGameClient init() not implemented.")}bet(n){console.warn("BaseBettingGameClient bet() not implemented.",n)}getWallet(){return this.walletManager.getWallet()}updateWallet(n,o){console.log("BaseBettingGameClient updateWallet()",n,"reason",o),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.WalletUpdate,n))}updateGameWin(n){console.log("BaseBettingGameClient updateGameWin()",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.GameWinUpdate,n))}getUserProfile(n){return this.players[n]}buyCurrency(n,o,e){console.log("BaseBettingGameClient buy currency",n),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.BuyCurrency,{args:n,onSuccess:o,onFail:e}))}handleGameMessage(n){this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.GameMessage,n))}handleClientMessage(n){console.log("BaseBettingGameClient handleClientMessage()",n)}updatePlayer(n){console.log("BaseBettingGameClient updatePlayer()",n),this.players[n.id]=n}openSettings(){console.log("BaseBettingGameClient openSettings()"),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenSettings,"openSettings"))}changeSettings(n){console.log("BaseBettingGameClient changeSettings()",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.SettingsChanged,n))}openLeaderboard(){console.log("BaseBettingGameClient openLeaderboard()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.OpenLeaderboard))}gameLoaded(){console.log("BaseBettingGameClient gameLoaded()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.GameLoaded))}destroy(){console.log("BaseBettingGameClient destroy()"),this.eventDispatcher.removeAllListeners(),this.walletManager.destroy(),this.destroy$.next(),this.destroy$.complete()}}class ije{constructor(n,o,e,i,r,s){this.eventDispatcher=new Ep,this.players={},this.destroy$=new sn,this.containerId=n.containerId,this.basePath=n.basePath,this.cdnPath=n.cdnPath,this.localizationsEndpoint=n.localizationsEndpoint,this.settings=new eoe(o,n.isSpectator),this.gameInfo=n.gameInfo,this.assetResolver=e,this.myPlayerId=n.myPlayerId,this.walletManager=i,this.slotGameClient=r,this.chatMessageFactory=s,this.walletManager.updateWallet$.pipe(wn(this.destroy$)).subscribe(a=>this.updateWallet(a)),n.players.forEach(a=>{const c=e.resolveAvatar(a.avatar);this.players[a.id]={...a,avatar:c,avatarUrl:c}})}sendMessage(n){console.log("BaseGameClient sendMessage()",n),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.SendMessage,n))}getUserProfile(n){return this.players[n]}openUserProfile(n){console.log("BaseGameClient openUserProfile()",n),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenProfile,n))}openEmoticons(){console.log("BaseGameClient openEmoticons()"),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenEmoticons,"openEmoticons"))}openPhrases(){console.log("BaseGameClient openPhrases()"),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenPhrases,"openPhrases"))}openSettings(){console.log("BaseGameClient openSettings"),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenSettings,"openSettings"))}openGifts(n){console.log("BaseGameClient openGifts()",n),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenGifts,n))}openGiftToAll(){console.log("BaseGameClient openGiftToAll()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.OpenGiftsToAll))}openGameInvite(){console.log("BaseGameClient openGameInvite()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.OpenGameInvite))}openLeaderboard(){console.log("BaseGameClient openLeaderboard()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.OpenLeaderboard))}openHowToPlay(){console.log("BaseGameClient openHowToPlay()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.OpenHowToPlay))}getWallet(){return this.walletManager.getWallet()}updateWallet(n){console.log("BaseGameClient updateWallet()",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.WalletUpdate,n))}updatePlayer(n){console.log("BaseGameClient updatePlayer()",n);const o=this.assetResolver.resolveAvatar(n.avatar);this.players[n.id]={...n,avatar:o,avatarUrl:o}}changeSettings(n){console.log("BaseGameClient changeSettings()",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.SettingsChanged,n)),this.slotGameClient.changeSettings(n)}handleGameMessage(n){this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.GameMessage,n))}handleClientMessage(n){switch(console.log("BaseGameClient handleClientMessage()",n),n.type){case ec.GiftSent:this.handleGiftSent(n.payload);break;case ec.Phrase:this.handlePhraseSent(n);break;case ec.Emoteicon:this.handleEmoteiconSent(n);break;default:console.log("BaseGameClient handleClientMessage() - unknown message type",n)}}handleGiftSent(n){n.map(o=>(o.giftURL=this.assetResolver.resolveGift(o.giftId),o)).forEach(o=>{console.log("BaseGameClient handleGiftSent()",n),this.eventDispatcher.dispatchEvent(new Mi(Jt.GameEvent.GiftSent.toString(),o))})}handlePhraseSent(n){const o=new Mi(Jt.GameEvent.ChatMessage,this.chatMessageFactory.createGameClientChatMessage(n));this.eventDispatcher.dispatchEvent(o)}handleEmoteiconSent(n){const o=new Mi(Jt.GameEvent.ChatMessage,this.chatMessageFactory.createGameClientChatMessage(n));this.eventDispatcher.dispatchEvent(o)}showAds(){console.log("BaseGameClient showAds()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.ShowAds))}removeAds(){console.log("BaseGameClient removeAds()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.RemoveAds))}openBuyInInterface(n,o){console.log("BaseGameClient openBuyInInterface",n,o),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.OpenBuyIn,{args:n,onSuccess:o}))}buyCurrency(n,o,e){console.log("BaseGameClient buyCurrency()",n,o,e),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.BuyCurrency,{args:n,onSuccess:o,onFail:e}))}showBotMessage(n){console.log("BaseGameClient showBotMessage()",n),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.ShowBotMessage,n))}sendAnalytics(n,o){console.log("BaseGameClient sendAnalytics()",n,o),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.SendAnalyticsEvent,{action:n,params:o}))}saveData(n,o){console.log("BaseGameClient saveData()",n,o),this.eventDispatcher.dispatchEvent(new Mi(Tt.EGameClientEvent.SaveData,{key:n,value:o}))}rematch(){console.log("BaseGameClient rematch()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.Rematch))}startLoading(){console.log("BaseGameClient startLoading()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.StartLoading))}gameLoaded(){console.log("BaseGameClient gameLoaded()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.GameLoaded))}gameEnded(){return console.log("BaseGameClient gameEnded()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.GameEnded))}win(){return console.log("BaseGameClient win()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.Win))}loss(){return console.log("BaseGameClient loss()"),this.eventDispatcher.dispatchEvent(new Js(Tt.EGameClientEvent.Loss))}destroy(){var n;console.log("BaseGameClient destroy()"),this.eventDispatcher.removeAllListeners(),null===(n=this.slotGameClient)||void 0===n||n.destroy(),this.destroy$.next(),this.destroy$.complete()}}class oje{constructor(n){this.assetResolver=n}createGameClientChatMessage(n){switch(n.type){case ec.Emoteicon:return this.createEmojiMessage(n);case ec.Phrase:return this.createPhraseMessage(n);default:return void console.warn("Unknown message type: ".concat(n.type))}}createEmojiMessage(n){const o=new noe(n.id,n.userId,n.id,n.id,{url:n.id,spritesheetUrl:n.id,audioUrls:void 0});return n.payload&&(o.url=n.payload.spritesheet,o.data.url=n.payload.url,o.data.spritesheetUrl=n.payload.spritesheet,n.payload.voiceOver&&(o.data.audioUrls=this.assetResolver.resolveVoiceOverUrls(n.payload.voiceOver))),o}createPhraseMessage(n){var o;const e=new ioe(n.payload.key+n.id,n.userId,this.assetResolver.resolvePhraseText(n.payload.key,n.id),n.id,{audioUrls:void 0});return null!==(o=n.payload)&&void 0!==o&&o.voiceOver&&(e.data.audioUrls=this.assetResolver.resolveVoiceOverUrls(n.payload.voiceOver)),e}}class rje{constructor(n,o,e,i,r){this.info=n,this.settingService=o,this.assetResolver=e,this.walletManager=i,this.bettingGameClientFactory=r}createInstance(){return new ije(this.info,this.settingService,this.assetResolver,this.walletManager,this.bettingGameClientFactory.createInstance(),new oje(this.assetResolver))}}class sje{constructor(n,o,e,i){this.info=n,this.settingService=o,this.assetResolver=e,this.walletManager=i}createInstance(){return new nje(this.info,this.settingService,this.assetResolver,this.walletManager)}}var Tr=function(t){return t.Emoticons="emoticons",t.Phrases="phrases",t.Settings="settings",t.Home="home",t.Gifts="gifts",t.Spectators="spectators",t.VoiceMessage="voiceMessage",t.VivoxRejoinButton="vivoxRejoin",t.Toggle="toggle",t}(Tr||{}),Ih=function(t){return t.Default="default",t.Custom="custom",t}(Ih||{});class aje{constructor(n,o,e,i,r){this.walletManager=n,this.settingService=o,this.assetResolver=e,this.bettingGameClientBuilder=i,this.injector=r}useConfig(n){const o=this.injector.get(J),e=this.injector.get(Zt),i=this.injector.get(tn),r=this.injector.get(pi);return this.config={containerId:n.containerId,basePath:n.basePath,gameInfo:n.gameInfo,myPlayerId:n.myPlayerId.strategy===Ih.Custom?n.myPlayerId.value:o.selectSimpleProfile().id,isSpectator:n.isSpectator.strategy===Ih.Custom&&n.isSpectator.value,cdnPath:n.cdnPath.strategy===Ih.Custom?n.cdnPath.value:e.getConfig().core.cdn.url,localizationsEndpoint:n.localizationsEndpoint.strategy===Ih.Custom?n.localizationsEndpoint.value:"".concat(i.translationsPath,"games/").concat(r.getCurrentLang(),"/"),players:n.players},this}useSettingService(n){return this.settingService=n,this}useAssetResolver(n){return this.assetResolver=n,this}useWalletManager(n){return this.walletManager=n,this}useBettingGameClientFactory(n){return this.bettingGameClientFactory=n,this}build(){return this.bettingGameClientFactory||(this.bettingGameClientFactory=this.bettingGameClientBuilder.useConfig(this.config).build()),new rje(this.config,this.settingService,this.assetResolver,this.walletManager,this.bettingGameClientFactory)}}class cje{constructor(n,o,e){this.walletManager=n,this.settingService=o,this.assetResolver=e}useConfig(n){return this.config=n,this}useSettingService(n){return this.settingService=n,this}useAssetResolver(n){return this.assetResolver=n,this}useWalletManager(n){return this.walletManager=n,this}build(){return new sje(this.config,this.settingService,this.assetResolver,this.walletManager)}}class lje{resolveAvatar(n){return n}resolveGift(n){return n}resolvePhraseText(n,o){return o}resolveVoiceOverUrls(n){const o=n.languages[Object.keys(n.languages)[0]].path;return n.formats.map(e=>"".concat(o,".").concat(e))}}let QG=(()=>{var t;class n extends lje{constructor(e,i,r,s,a,c){super(),this.translationService=e,this.configService=i,this.defaultAvatars=r,this.urlService=s,this.constants=a,this.settings=c}resolveAvatar(e){if(!e||""===e)return this.urlService.getImageUrl(this.constants.defaultAvatarPath);if(this.defaultAvatars.isDefaultAvatar(e))return this.urlService.getImageUrl("".concat(DP,"/").concat(e));const i=this.configService.getConfig().core.cdn;return"".concat(i.url).concat(i.path.avatars).concat(e)}resolveGift(e){const i=this.configService.getConfig().core.cdn;return"".concat(i.url).concat(i.path.giftsSpritesheets).concat(e,".png")}resolvePhraseText(e,i){return this.translationService.instant("game_chat.chat_messages.text")[e][i]}resolveVoiceOverUrls(e){const i=e.languages[this.settings.getLanguage()]||e.languages[this.configService.getConfig().platform.languages.default]||e.languages.en;if(i)return e.formats.map(r=>"".concat(i.path,".").concat(r))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(pi),T(Zt),T(Rp),T(ii),T(tn),T(nc))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class ooe{constructor(n){this.store=n,this.destroy$=new sn,this.updateWallet$=this.store.subscribeWallet()}getWallet(){return this.store.selectWallet()}destroy(){this.destroy$.next(),this.destroy$.complete()}}class uje extends ooe{constructor(n,o){super(n),this.actions=o,this.updateWallet$=(new sn).pipe(wn(this.destroy$)),this.actions.pipe(ai(RP),bt(e=>e.reason!==PP.Minislot),wn(this.destroy$)).subscribe(e=>this.updateWallet$.next(e))}}let roe=(()=>{var t;class n{constructor(e,i){this.store=e,this.actions=i}createDefaultGameWalletManager(){return new ooe(this.store)}createBettingGameWalletManager(){return new uje(this.store,this.actions)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(yr))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),dje=(()=>{var t;class n{constructor(e,i,r){this.settingsService=e,this.walletManagerFactory=i,this.defaultAssetResolver=r}createGameClientBuilder(){return new cje(this.walletManagerFactory.createBettingGameWalletManager(),this.settingsService,this.defaultAssetResolver)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(M_),T(roe),T(QG))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),pje=(()=>{var t;class n{constructor(e,i,r,s,a){this.settingsService=e,this.walletManagerFactory=i,this.defaultAssetResolver=r,this.bettingGameClientBuilderFactory=s,this.injector=a}createGameClientFactoryBuilder(){return new aje(this.walletManagerFactory.createDefaultGameWalletManager(),this.settingsService,this.defaultAssetResolver,this.bettingGameClientBuilderFactory.createGameClientBuilder(),this.injector)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(M_),T(roe),T(QG),T(dje),T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class UA{static createGameInstance(n,o){return new window[n](o)}}var uw=function(t){return t.NotLoaded="notLoaded",t.Loading="loading",t.Loaded="loaded",t}(uw||{}),dw=function(t){return t.Uninitialized="uninitialized",t.Used="used",t.Ready="ready",t.Unloaded="unloaded",t}(dw||{});class hje extends Error{constructor(){super(),this.name="ResourceLoadingAborted"}}class GA extends Error{constructor(){super(),this.name="ResourceLoadingFailed"}}class soe{constructor(n){this.url=n,this.loadingState=uw.NotLoaded,this.resourceState=dw.Uninitialized,this.eventDispatcher=new tc}addUnloadCallback(n){this.eventDispatcher.addEventListener("unload",n)}removeUnloadCallback(n){this.eventDispatcher.removeEventListener("unload",n)}getResourceState(){return this.resourceState}getLoadingState(){return this.loadingState}getLoadedResource(){return this.loadedResource}load(){var n=this;return new Promise(function(){var o=f(function*(e,i){n.resourceLoadTask=new Jn(n.loadResource()),n.setLoadingState(uw.Loading);try{n.loadedResource=yield n.resourceLoadTask,n.setLoadingState(uw.Loaded),n.setResourceState(dw.Ready),e()}catch(r){n.setResourceState(dw.Uninitialized),n.setLoadingState(uw.NotLoaded),i(r instanceof Cr?new hje:new GA)}});return function(e,i){return o.apply(this,arguments)}}())}setAsUsed(){this.setResourceState(dw.Used)}abortLoading(){this.resourceLoadTask&&this.resourceLoadTask.cancel()}unload(){this.setResourceState(dw.Unloaded),this.setLoadingState(uw.NotLoaded),this.unloadResource(),this.eventDispatcher.dispatchEvent(new ew("unload"))}setLoadingState(n){this.loadingState=n}setResourceState(n){this.resourceState=n}}class YG extends soe{constructor(n){super(n)}loadResource(){return new Promise((n,o)=>{const e=new Image,i=()=>{e.removeEventListener("load",i),e.removeEventListener("error",r),n(e)},r=()=>{e.removeEventListener("load",i),e.removeEventListener("error",r),o()};e.addEventListener("load",i),e.addEventListener("error",r),e.src=this.url,e.style.cssText="position: absolute; top: -99999px; width: 100%; height: 100%",document.body.appendChild(e)})}unloadResource(){this.loadedResource&&this.loadedResource.parentElement&&this.loadedResource.parentElement.removeChild(this.loadedResource)}}class Mb extends soe{constructor(n){super(n)}loadResource(){return Th.loadScript(this.url).then(n=>n.target)}unloadResource(){this.loadedResource&&this.loadedResource.parentElement&&this.loadedResource.parentElement.removeChild(this.loadedResource)}}let aoe=(()=>{var t;class n{constructor(e){this.httpService=e}setLevelUpRewards(e){this.levelUpRewards=e}getLevelUpRewards(){return this.levelUpRewards}updateAndGetPlayerRate(e,i){return this.httpService.post("users/profile/rate",{ratedPlayer:e,rateValue:i}).toPromise().then(r=>r.body.avg)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var pw;!function(t){let n;(n=t.EResizeEvent||(t.EResizeEvent={})).ScreenOrientationChange="screenOrientationChange"}(pw||(pw={}));var mje=pw.EResizeEvent;class JG{constructor(n,o){this.onResize=()=>{this.rafId=requestAnimationFrame(()=>{const e=document.documentElement.clientWidth,i=Math.min(document.documentElement.clientHeight,this.parentDomElement.parentElement.clientHeight);this.parentDomElement.style.width="".concat(e,"px"),this.parentDomElement.style.minWidth="".concat(e,"px"),this.parentDomElement.style.height="".concat(i,"px"),this.parentDomElement.style.minHeight="".concat(i,"px");const r=this.parentDomElement.getBoundingClientRect(),s=this.orientation;this.orientation=i>e?cs.Portrait:cs.Landscape,s!==this.orientation&&this.dispatchEvent(new Mi(mje.ScreenOrientationChange,this.orientation)),this.aspectRatio.portrait&&this.aspectRatio.landscape?this.resizeByTwoDimensions(r):this.resizeByOrientation(r,this.aspectRatio.portrait?cs.Portrait:cs.Landscape)})},this.parentDomElement=n.parentElement,this.gameDomElement=n,this.aspectRatio=o,this.eventDispatcher=new Ep,this.init()}dispose(){window.removeEventListener("resize",this.onResize),this.eventDispatcher.removeAllListeners(),cancelAnimationFrame(this.rafId)}getCurrentOrientation(){return this.orientation}addEventListener(n,o){this.eventDispatcher.addEventListener(n,o)}removeEventListener(n,o){this.eventDispatcher.removeEventListener(n,o)}dispatchEvent(n){this.eventDispatcher.dispatchEvent(n)}resizeByTwoDimensions(n){!0===this.canKeepAspectRatio(n,this.orientation)?this.orientation===cs.Landscape?this.resizeForLandscape(this.gameDomElement,n):this.resizeForPortrait(this.gameDomElement,n):this.setElementDimensions(this.gameDomElement,"100%","100%")}resizeByOrientation(n,o){!0===this.canKeepAspectRatioByOrientation(n,o)?o===cs.Landscape?this.resizeForLandscape(this.gameDomElement,n):this.resizeForPortrait(this.gameDomElement,n):this.setElementDimensions(this.gameDomElement,"100%","100%")}init(){const n=document.documentElement.clientWidth,o=document.documentElement.clientHeight;this.orientation=o>n?cs.Portrait:cs.Landscape,this.onResize(),window.addEventListener("resize",this.onResize)}canKeepAspectRatio(n,o){const e=Math.max(n.width,n.height)/Math.min(n.width,n.height);let i=0;return i=o===cs.Portrait?this.aspectRatio.portrait:this.aspectRatio.landscape,e<i}canKeepAspectRatioByOrientation(n,o){const e=Math.max(n.width,n.height)/Math.min(n.width,n.height);return o===cs.Portrait?this.orientation!==cs.Portrait||e<this.aspectRatio.portrait:this.orientation!==cs.Landscape||e<this.aspectRatio.landscape}resizeForLandscape(n,o){this.setElementDimensions(n,"".concat(o.width,"px"),o.width/this.aspectRatio.landscape+"px")}resizeForPortrait(n,o){this.setElementDimensions(n,o.height/this.aspectRatio.portrait+"px","".concat(o.height,"px"))}setElementDimensions(n,o,e){n.style.width=o,n.style.height=e}}var hw=function(t){return t[t.Initial=0]="Initial",t[t.LoadingResources=1]="LoadingResources",t[t.GameLoading=2]="GameLoading",t[t.Ready=3]="Ready",t}(hw||{});class XG{constructor(){this.destroy$=new sn,this.error=n=>this.error$.next(n),this.gameLoaded=()=>this.loaded$.next(),this.error$=this.createSubject(),this.loaded$=this.createSubject(),this.loadStart$=this.createSubject(),this.gameStartInit$=this.createSubject()}destroy(){this.destroy$.next(),this.destroy$.complete()}addListeners(n){this.gameClient=n,this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameLoaded,this.gameLoaded),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameLoadError,this.error)}removeListeners(){var n,o;null===(n=this.gameClient)||void 0===n||n.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameLoadError,this.error),null===(o=this.gameClient)||void 0===o||o.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameLoaded,this.gameLoaded)}createSubject(){return(new sn).pipe(wn(this.destroy$))}}class fje extends XG{constructor(){super(),this.openProfile=()=>this.openProfile$.next(),this.openGifts=()=>this.openGifts$.next(),this.openEmoticons=()=>this.openEmoticons$.next(),this.openPhrases=()=>this.openPhrases$.next(),this.openSettings=()=>this.openSettings$.next(),this.rematch=()=>this.rematch$.next(),this.openBuyIn=()=>this.openBuyIn$.next(),this.openGiftsToAll=()=>this.openGiftsToAll$.next(),this.openGameInvite=()=>this.openGameInvite$.next(),this.showBotMessage=()=>this.showBotMessage$.next(),this.openLeaderboard=()=>this.openLeaderboard$.next(),this.openHowToPlay=()=>this.openHowToPlay$.next(),this.openBuyCurrency=()=>this.openBuyCurrency$.next(),this.gameEnded=()=>this.ended$.next(),this.ended$=this.createSubject(),this.won$=this.createSubject(),this.lost$=this.createSubject(),this.openProfile$=this.createSubject(),this.openGifts$=this.createSubject(),this.openEmoticons$=this.createSubject(),this.openPhrases$=this.createSubject(),this.openSettings$=this.createSubject(),this.rematch$=this.createSubject(),this.openBuyIn$=this.createSubject(),this.openGiftsToAll$=this.createSubject(),this.openGameInvite$=this.createSubject(),this.showBotMessage$=this.createSubject(),this.openLeaderboard$=this.createSubject(),this.openHowToPlay$=this.createSubject(),this.openBuyCurrency$=this.createSubject(),this.slotBuyCurrency$=this.createSubject()}addListeners(n){super.addListeners(n),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenProfile,this.openProfile),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenGifts,this.openGifts),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenEmoticons,this.openEmoticons),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenPhrases,this.openPhrases),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenSettings,this.openSettings),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.RematchGame,this.rematch),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenBuyIn,this.openBuyIn),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenGiftsToAll,this.openGiftsToAll),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenGameInvite,this.openGameInvite),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.ShowBotMessage,this.showBotMessage),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenLeaderboard,this.openLeaderboard),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenHowToPlay,this.openHowToPlay),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.BuyCurrency,this.openBuyCurrency)}removeListeners(){var n,o,e,i,r,s,a,c,u,h,b,w,R,G;super.removeListeners(),null===(n=this.gameClient)||void 0===n||n.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenProfile,this.openProfile),null===(o=this.gameClient)||void 0===o||o.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenGifts,this.openGifts),null===(e=this.gameClient)||void 0===e||e.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenEmoticons,this.openEmoticons),null===(i=this.gameClient)||void 0===i||i.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenPhrases,this.openPhrases),null===(r=this.gameClient)||void 0===r||r.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenSettings,this.openSettings),null===(s=this.gameClient)||void 0===s||s.eventDispatcher.removeEventListener(Tt.EGameClientEvent.RematchGame,this.rematch),null===(a=this.gameClient)||void 0===a||a.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded),null===(c=this.gameClient)||void 0===c||c.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenBuyIn,this.openBuyIn),null===(u=this.gameClient)||void 0===u||u.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenGiftsToAll,this.openGiftsToAll),null===(h=this.gameClient)||void 0===h||h.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenGameInvite,this.openGameInvite),null===(b=this.gameClient)||void 0===b||b.eventDispatcher.removeEventListener(Tt.EGameClientEvent.ShowBotMessage,this.showBotMessage),null===(w=this.gameClient)||void 0===w||w.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenLeaderboard,this.openLeaderboard),null===(R=this.gameClient)||void 0===R||R.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenHowToPlay,this.openHowToPlay),null===(G=this.gameClient)||void 0===G||G.eventDispatcher.removeEventListener(Tt.EGameClientEvent.BuyCurrency,this.openBuyCurrency)}}class coe extends XG{constructor(){super(),this.loaded=()=>this.loaded$.next(),this.openProfile=()=>this.openProfile$.next(),this.openSettings=()=>this.openSettings$.next(),this.openBuyIn=()=>this.openBuyIn$.next(),this.openBuyCurrency=()=>this.openBuyCurrency$.next(),this.openProfile$=this.createSubject(),this.openSettings$=this.createSubject(),this.openBuyIn$=this.createSubject(),this.openBuyCurrency$=this.createSubject()}addListeners(n){super.addListeners(n),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameLoaded,this.loaded),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenProfile,this.openProfile),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenSettings,this.openSettings),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenBuyIn,this.openBuyIn),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.BuyCurrency,this.openBuyCurrency)}removeListeners(){var n,o,e,i,r;super.removeListeners(),null===(n=this.gameClient)||void 0===n||n.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameLoaded,this.loaded),null===(o=this.gameClient)||void 0===o||o.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenProfile,this.openProfile),null===(e=this.gameClient)||void 0===e||e.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenSettings,this.openSettings),null===(i=this.gameClient)||void 0===i||i.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenBuyIn,this.openBuyIn),null===(r=this.gameClient)||void 0===r||r.eventDispatcher.removeEventListener(Tt.EGameClientEvent.BuyCurrency,this.openBuyCurrency)}}class gje{static parseException(n){if(!n)return new lt.UnknownError;let o;return n instanceof Error?o=n:n instanceof ErrorEvent&&(o=null!=n&&n.error?n.error:n),o}}class _je{constructor(n,o,e){this.config=n,this.gameClientFactory=o,this.pageVisibility=e,this.events=new XG,this.loadingState=new Qn(hw.Initial),this.logger=new KG,this.loadingTimer=new XU(this.onLoadingTimeout,n.loadingTimeoutMs)}start(){var n=this;return f(function*(){try{yield n.load(),n.gameClient=n.gameClientFactory.createInstance(),n.subscribeForGameEvents(n.gameClient),n.vendor.setAsUsed(),n.main.setAsUsed(),n.game=UA.createGameInstance(n.config.class,n.gameClient),n.subscribeForEvents()}catch(o){if(o instanceof Cr)return;n.emitLogError(o instanceof GA?new et.Timeout:o)}})()}destroy(){this.events.destroy(),this.softDestroy()}updatePlayer(n){this.gameClient.updatePlayer(n)}changeSettings(n){try{this.gameClient.changeSettings(n)}catch(o){this.emitLogError(o)}}handleGameMessage(n){try{this.gameClient.handleGameMessage(n)}catch(o){this.emitLogError(o)}}handleClientMessage(n){try{this.gameClient.handleClientMessage(n)}catch(o){this.emitLogError(o)}}softDestroy(){var n,o,e,i;this.unsubscribeFromGameEvents(this.gameClient),null===(n=this.gameClient)||void 0===n||n.destroy(),this.gameClient=void 0,null===(o=this.game)||void 0===o||o.destroy(),this.game=void 0,null===(e=this.loadTask)||void 0===e||e.cancel(),null===(i=this.vendorReadyTask)||void 0===i||i.cancel(),this.loadingTimer.clear(),this.cancelResourceLoading(),this.unloadResources(),this.setLoadingState(hw.Initial)}cancelResourceLoading(){var n,o,e;null===(n=this.vendor)||void 0===n||n.abortLoading(),null===(o=this.main)||void 0===o||o.abortLoading(),null===(e=this.background)||void 0===e||e.abortLoading()}unloadResources(){var n,o,e;null===(n=this.vendor)||void 0===n||n.unload(),null===(o=this.main)||void 0===o||o.unload(),null===(e=this.background)||void 0===e||e.unload()}load(){var n=this;return f(function*(){n.softDestroy(),n.config.background&&(n.background=new YG(n.config.background.url)),n.vendor=new Mb("".concat(n.config.path).concat(n.config.resources.vendor)),n.main=new Mb("".concat(n.config.path).concat(n.config.resources.main)),n.vendor.addUnloadCallback(()=>{delete window.Phaser,delete window.PIXI}),n.main.addUnloadCallback(()=>delete window[n.config.class]);try{var o,e,i,r;n.setLoadingState(hw.LoadingResources),n.events.loadStart$.next(),n.loadTask=new T_(()=>new Promise(function(){var s=f(function*(a,c){try{var u,h;yield null===(u=n.background)||void 0===u?void 0:u.load(),n.background&&(document.getElementById(n.config.background.elementId).style.backgroundImage="url(".concat(null===(h=n.background)||void 0===h?void 0:h.url,")")),yield n.vendor.load(),yield n.main.load(),a(void 0)}catch(b){c(b)}});return function(a,c){return s.apply(this,arguments)}}()),{maxRetriesCount:null!==(o=null===(e=n.config.retryOptions)||void 0===e?void 0:e.maxRetries)&&void 0!==o?o:5,retryDelayMs:null!==(i=null===(r=n.config.retryOptions)||void 0===r?void 0:r.retryDelayMs)&&void 0!==i?i:5e3}),yield n.loadTask,n.applyVendorHacksAndWorkarounds(),yield n.gameVendorReady(),n.setLoadingState(hw.GameLoading)}catch(s){throw n.unloadResources(),s}})()}gameVendorReady(){return this.vendorReadyTask=new Jn(new Promise((n,o)=>{window.Phaser?window.Phaser.Device.whenReady(n):o(new Error("Vendor code is not loaded!"))})),this.vendorReadyTask}setLoadingState(n){this.loadingState.next(n)}applyVendorHacksAndWorkarounds(){window.PIXI&&(window.PIXI.CanvasTinter.tintMethod=window.PIXI.CanvasTinter.tintWithPerPixel)}onLoadingTimeout(){this.cancelResourceLoading(),this.loadingTimer.clear()}subscribeForEvents(){this.pageVisibility.pageVisibleObservable().pipe(wn(Ju(this.events.destroy$,this.events.loaded$,this.events.error$))).subscribe(n=>{n?this.loadingTimer.getState()===fc.Paused?this.loadingTimer.resume():this.loadingTimer.restart():this.loadingTimer.pause()}),this.events.loaded$.pipe(wn(this.events.destroy$)).subscribe(()=>{this.loadingTimer.clear(),this.setLoadingState(hw.Ready)})}emitLogError(n){const o=gje.parseException(n);this.logger.log(o),this.events.error$.next(o)}}class vje extends _je{constructor(){super(...arguments),this.events=new fje,this.bettingGameEvents=new coe}get gameInfo(){return this.gameClient.gameInfo}get players(){return this.gameClient.players}subscribeForGameEvents(n){this.events.addListeners(n),this.bettingGameEvents.addListeners(n)}unsubscribeFromGameEvents(n){this.events.removeListeners(),this.bettingGameEvents.removeListeners()}}class bje{constructor(n){this.pageVisibility=n}useGameClientFactory(n){return this.gameClientFactory=n,this}useGameConfig(n){return this.config=n,this}build(){return new vje(this.config,this.gameClientFactory,this.pageVisibility)}}let Cje=(()=>{var t;class n{constructor(e){this.pageVisibility=e}createGameWrapperBuilder(){return new bje(this.pageVisibility)}}return(t=n).\u0275fac=function(e){return new(e||t)(T($ie))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class mw{constructor(n,o=Ih.Default){const e=mw.isGameClientValueResolution(n);this.value=e?void 0:n,this.strategy=e?n:o}static isGameClientValueResolution(n){return"string"==typeof n&&Ih[n]}}var BP=__webpack_require__(88537),Bi=function(t){return t[t.EntitiesOnly=0]="EntitiesOnly",t[t.Both=1]="Both",t[t.None=2]="None",t}(Bi||{});function ma(t){return function(o,e){const i={ids:[...e.ids],entities:{...e.entities}},r=t(o,i);return r===Bi.Both?Object.assign({},e,i):r===Bi.EntitiesOnly?{...e,entities:i.entities}:e}}function Yf(t,n){return n(t)}function loe(t){function n(te,ee){const le=Yf(te,t);return le in ee.entities?Bi.None:(ee.ids.push(le),ee.entities[le]=te,Bi.Both)}function o(te,ee){let le=!1;for(const me of te)le=n(me,ee)!==Bi.None||le;return le?Bi.Both:Bi.None}function i(te,ee){const le=Yf(te,t);return le in ee.entities?(ee.entities[le]=te,Bi.EntitiesOnly):(ee.ids.push(le),ee.entities[le]=te,Bi.Both)}function a(te,ee){const me=(te instanceof Array?te:ee.ids.filter(ge=>te(ee.entities[ge]))).filter(ge=>ge in ee.entities).map(ge=>delete ee.entities[ge]).length>0;return me&&(ee.ids=ee.ids.filter(ge=>ge in ee.entities)),me?Bi.Both:Bi.None}function h(te,ee){return b([te],ee)}function b(te,ee){const le={};return(te=te.filter(ge=>ge.id in ee.entities)).length>0?te.filter(Me=>function u(te,ee,le){const ge=Object.assign({},le.entities[ee.id],ee.changes),Me=Yf(ge,t),Ke=Me!==ee.id;return Ke&&(te[ee.id]=Me,delete le.entities[ee.id]),le.entities[Me]=ge,Ke}(le,Me,ee)).length>0?(ee.ids=ee.ids.map(Me=>le[Me]||Me),Bi.Both):Bi.EntitiesOnly:Bi.None}function K(te,ee){const le=[],me=[];for(const Ke of te){const Ee=Yf(Ke,t);Ee in ee.entities?me.push({id:Ee,changes:Ke}):le.push(Ke)}const ge=b(me,ee),Me=o(le,ee);switch(!0){case Me===Bi.None&&ge===Bi.None:return Bi.None;case Me===Bi.Both||ge===Bi.Both:return Bi.Both;default:return Bi.EntitiesOnly}}return{removeAll:function c(te){return Object.assign({},te,{ids:[],entities:{}})},addOne:ma(n),addMany:ma(o),setAll:ma(function e(te,ee){return ee.ids=[],ee.entities={},o(te,ee),Bi.Both}),setOne:ma(i),setMany:ma(function r(te,ee){const le=te.map(me=>i(me,ee));switch(!0){case le.some(me=>me===Bi.Both):return Bi.Both;case le.some(me=>me===Bi.EntitiesOnly):return Bi.EntitiesOnly;default:return Bi.None}}),updateOne:ma(h),updateMany:ma(b),upsertOne:ma(function G(te,ee){return K([te],ee)}),upsertMany:ma(K),removeOne:ma(function s(te,ee){return a([te],ee)}),removeMany:ma(a),map:ma(function w(te,ee){return b(ee.ids.reduce((ge,Me)=>{const Ke=te(ee.entities[Me]);return Ke!==ee.entities[Me]&&ge.push({id:Me,changes:Ke}),ge},[]).filter(({id:ge})=>ge in ee.entities),ee)}),mapOne:ma(function R({map:te,id:ee},le){const me=le.entities[ee];return me?h({id:ee,changes:te(me)},le):Bi.None})}}function Pje(t,n){const{removeOne:o,removeMany:e,removeAll:i}=loe(t);function r(le,me){return s([le],me)}function s(le,me){const ge=le.filter(Me=>!(Yf(Me,t)in me.entities));return 0===ge.length?Bi.None:(ee(ge,me),Bi.Both)}function c(le,me){const ge=Yf(le,t);return ge in me.entities?(me.ids=me.ids.filter(Me=>Me!==ge),ee([le],me),Bi.Both):r(le,me)}function h(le,me){return w([le],me)}function w(le,me){const ge=[],Me=le.filter(Ke=>function b(le,me,ge){if(!(me.id in ge.entities))return!1;const Ke=Object.assign({},ge.entities[me.id],me.changes),Ee=Yf(Ke,t);return delete ge.entities[me.id],le.push(Ke),Ee!==me.id}(ge,Ke,me)).length>0;if(0===ge.length)return Bi.None;{const Ke=me.ids,Ee=[];return me.ids=me.ids.filter((ot,ct)=>ot in me.entities||(Ee.push(ct),!1)),ee(ge,me),!Me&&Ee.every(ot=>me.ids[ot]===Ke[ot])?Bi.EntitiesOnly:Bi.Both}}function te(le,me){const ge=[],Me=[];for(const ot of le){const ct=Yf(ot,t);ct in me.entities?Me.push({id:ct,changes:ot}):ge.push(ot)}const Ke=w(Me,me),Ee=s(ge,me);switch(!0){case Ee===Bi.None&&Ke===Bi.None:return Bi.None;case Ee===Bi.Both||Ke===Bi.Both:return Bi.Both;default:return Bi.EntitiesOnly}}function ee(le,me){le.sort(n);const ge=[];let Me=0,Ke=0;for(;Me<le.length&&Ke<me.ids.length;){const Ee=le[Me],ot=Yf(Ee,t),ct=me.ids[Ke];n(Ee,me.entities[ct])<=0?(ge.push(ot),Me++):(ge.push(ct),Ke++)}me.ids=ge.concat(Me<le.length?le.slice(Me).map(t):me.ids.slice(Ke)),le.forEach((Ee,ot)=>{me.entities[t(Ee)]=Ee})}return{removeOne:o,removeMany:e,removeAll:i,addOne:ma(r),updateOne:ma(h),upsertOne:ma(function K(le,me){return te([le],me)}),setAll:ma(function a(le,me){return me.entities={},me.ids=[],s(le,me),Bi.Both}),setOne:ma(c),setMany:ma(function u(le,me){const ge=le.map(Me=>c(Me,me));switch(!0){case ge.some(Me=>Me===Bi.Both):return Bi.Both;case ge.some(Me=>Me===Bi.EntitiesOnly):return Bi.EntitiesOnly;default:return Bi.None}}),addMany:ma(s),updateMany:ma(w),upsertMany:ma(te),map:ma(function R(le,me){return w(me.ids.reduce((Me,Ke)=>{const Ee=le(me.entities[Ke]);return Ee!==me.entities[Ke]&&Me.push({id:Ke,changes:Ee}),Me},[]),me)}),mapOne:ma(function G({map:le,id:me},ge){const Me=ge.entities[me];return Me?h({id:me,changes:le(Me)},ge):Bi.None})}}function ki(t={}){var n,o;const{selectId:e,sortComparer:i}={selectId:null!==(n=t.selectId)&&void 0!==n?n:c=>c.id,sortComparer:null!==(o=t.sortComparer)&&void 0!==o&&o},r=function wje(){return{getInitialState:function t(n={}){return Object.assign({ids:[],entities:{}},n)}}}(),s=function Tje(){return{getSelectors:function t(n){const o=s=>s.ids,e=s=>s.entities,i=We(o,e,(s,a)=>s.map(c=>a[c])),r=We(o,s=>s.length);return n?{selectIds:We(n,o),selectEntities:We(n,e),selectAll:We(n,i),selectTotal:We(n,r)}:{selectIds:o,selectEntities:e,selectAll:i,selectTotal:r}}}}();return{selectId:e,sortComparer:i,...r,...s,...i?Pje(e,i):loe(e)}}var NP=__webpack_require__(60572);let Xu=(()=>{var t;class n{constructor(e,i){this.translate=e,this.clientConfig=i}createProfileWithOnlineStatus(e){return{profile:this.createProfile(e.profile),onlineStatus:{...new xm,...e.onlineStatus,userId:e.profile.id}}}createFallbackSimpleProfile(e){return this.createProfile({username:{...new NG,currentUsername:this.translate.instant("CHAT.FALLBACK_USERNAME")},...e})}createAdminSimpleProfile(e){return this.createProfile({id:"admin",username:{...new NG,currentUsername:this.translate.getParsedTranslation("CHAT_ADMIN_USERNAME",["".concat(this.clientConfig.getConfig().platform.name)])},...e})}createClientFriendProfile(e){const i=e.requestInfo?e.requestInfo.requestSentAt:void 0,r=this.createProfile(e.profile);return{id:r.id,profile:r,onlineStatus:e.onlineStatus||new xm,currentGameName:e.currentGameName,currentGameRoomType:e.currentGameRoomType,isCloseFriend:e.isCloseFriend,requestInfo:{...e.requestInfo,requestSentAt:i||Bn.instance.getServerTimeS()}}}createProfile(e){return new Lo(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(pi),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const uoe="usersSimpleProfiles",e4=9e5;function VA(t,n,o){return t-n>o}var O_=function(t){return t.ResetUsers="Reset Users",t.ClearExpiredUsers="Clear Expired Users",t.ClearExpiredOnlineStatuses="Clear Expired Online Statuses",t.GetUsers="Get Users",t.GetUsersSuccess="Get Users Success",t.GetUsersError="Get Users Error",t.UpdateOnlineStatuses="Update Online Statuses",t}(O_||{});function Ob(t){return"[".concat("Users Repository","] ").concat(t)}const Oje=he(Ob(O_.ResetUsers)),Eje=he(Ob(O_.ClearExpiredUsers)),xje=he(Ob(O_.ClearExpiredOnlineStatuses)),doe=(he(Ob(O_.GetUsers),{_as:"props",_p:void 0}),he(Ob(O_.GetUsersSuccess),{_as:"props",_p:void 0})),poe=he(Ob(O_.GetUsersError),{_as:"props",_p:void 0}),hoe=he(Ob(O_.UpdateOnlineStatuses),{_as:"props",_p:void 0}),FP=ki({selectId:t=>t.id,sortComparer:!1}),UP=ki({selectId:t=>t.userId,sortComparer:!1}),Rje=Sr({profiles:FP.getInitialState(),onlineStatuses:UP.getInitialState()},de(Oje,t=>({...t,profiles:FP.removeAll(t.profiles),onlineStatuses:UP.removeAll(t.onlineStatuses)})),de(Eje,t=>{const n=Date.now();return{...t,profiles:FP.removeMany(o=>VA(n,o.lastUpdatedAt,e4),t.profiles)}}),de(xje,t=>{const n=Date.now();return{...t,onlineStatuses:UP.removeMany(o=>VA(n,o.lastUpdatedAt,9e5),t.onlineStatuses)}}),de(doe,(t,{profiles:n})=>({...t,profiles:FP.upsertMany(n,t.profiles)})),de(hoe,(t,{onlineStatuses:n})=>({...t,onlineStatuses:UP.upsertMany(n,t.onlineStatuses)})));function moe(t){return t[uoe]}const Lje=We(moe,t=>t.profiles),Dje=We(moe,t=>t.onlineStatuses),Bje=FP.getSelectors(Lje),Nje=UP.getSelectors(Dje),Fje=We(Bje.selectEntities,(t,n)=>{const o={hits:[],misses:[]};return n.forEach(e=>{const i=t[e];i?o.hits.push(i):o.misses.push(e)}),o}),Uje=We(Nje.selectEntities,(t,n)=>{const o={hits:[],misses:[]};return n.forEach(e=>{const i=t[e];i?o.hits.push(i):o.misses.push(e)}),o}),foe=We(Fje,t=>{const n={hits:[],misses:t.misses},o=Date.now();return t.hits.forEach(e=>{VA(o,e.lastUpdatedAt,e4)?n.misses.push(e.id):n.hits.push(e)}),n}),Gje=We(Uje,t=>{const n={hits:[],misses:t.misses},o=Date.now();return t.hits.forEach(e=>{VA(o,e.lastUpdatedAt,e4)?n.misses.push(e.userId):n.hits.push(e)}),n}),Vje=We(foe,Gje,(t,n)=>({hits:t.hits.map(o=>{const e=n.hits.find(i=>i.userId===o.id);if(e)return{profile:o,onlineStatus:e}}).filter(o=>!!o),misses:NP(t.misses.concat(n.misses))})),zje=[$r.forFeature(uoe,function kje(t,n){return Rje(t,n)})];let goe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[zje]}),n})(),ed=(()=>{var t;class n{constructor(e,i,r){this.http=e,this.store=i,this.userFactory=r}getSimpleProfiles(e,i=!0){var r=this;return f(function*(){let s,a={hits:[],misses:e};if(i&&(a=r.store.selectSync(foe,e)),s=a.hits,a.misses.length)try{const c=yield r.requestProfiles(a.misses);s=r.updateProfilesCache(e,a.hits,c)}catch(c){throw r.store.dispatch(poe(c)),c}return s})()}getSimpleProfilesWithOnlineStatus(e){var i=this;return f(function*(){const r=i.store.selectSync(Vje,e);let s=r.hits;if(r.misses.length)try{const a=yield i.requestProfilesWithOnlineStatus(r.misses),c=i.updateProfilesCache(e,r.hits.map(h=>h.profile),a.map(h=>h.profile)),u=i.updateOnlineStatusesCache(e,r.hits.map(h=>h.onlineStatus),a.map(h=>h.onlineStatus));s=c.map(h=>i.userFactory.createProfileWithOnlineStatus({profile:h,onlineStatus:u.find(b=>b.userId===h.id)}))}catch(a){throw i.store.dispatch(poe(a)),a}return s})()}updateProfilesCache(e,i,r){const s=Date.now();let a=i;const c=r.map(h=>(h.lastUpdatedAt=s,h));a=a.concat(c);const u=e.filter(h=>!a.find(b=>b.id===h));if(u.length){const h=u.map(b=>({...this.userFactory.createFallbackSimpleProfile({id:b}),lastUpdatedAt:s}));a=a.concat(h)}return this.store.dispatch(doe({profiles:a})),a}updateOnlineStatusesCache(e,i,r){const s=Date.now();let a=i;const c=r.map(h=>(h.lastUpdatedAt=s,h));a=a.concat(c);const u=e.filter(h=>!a.find(b=>b.userId===h));if(u.length){const h=u.map(b=>({...new xm,userId:b,lastUpdatedAt:s}));a=a.concat(h)}return this.store.dispatch(hoe({onlineStatuses:a})),a}getProfile(e){var i=this;return f(function*(){return i.http.get("users/".concat(e)).toPromise().then(r=>({...r.body,profile:i.userFactory.createProfile(r.body.profile),xp:new RA(r.body.xp)}))})()}requestProfiles(e){return this.http.post("users/profiles",{userIds:e}).toPromise().then(i=>i.body.map(r=>this.userFactory.createProfile(r)))}requestProfilesWithOnlineStatus(e){return this.http.post("users/profiles/online",{userIds:e}).toPromise().then(i=>i.body.map(r=>({profile:this.userFactory.createProfile(r.profile),onlineStatus:r.onlineStatus})))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(J),T(Xu))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:goe}),n})(),_oe=(()=>{var t;class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji),g($t))},t.\u0275dir=qn({type:t}),n})(),Eb=(()=>{var t;class n extends _oe{}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275dir=qn({type:t,features:[Ht]}),n})();
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */const Mh=new Ot(""),Hje={provide:Mh,useExisting:_s(()=>xb),multi:!0},Wje=new Ot("");let xb=(()=>{var t;class n extends _oe{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function qje(){const t=p_()?p_().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",null==e?"":e)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji),g($t),g(Wje,8))},t.\u0275dir=qn({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&Y("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},features:[mn([Hje]),Ht]}),n})();function E_(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function boe(t){return null!=t&&"number"==typeof t.length}const Sl=new Ot(""),x_=new Ot(""),$je=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Ln{static min(n){return function Coe(t){return n=>{if(E_(n.value)||E_(t))return null;const o=parseFloat(n.value);return!isNaN(o)&&o<t?{min:{min:t,actual:n.value}}:null}}(n)}static max(n){return function yoe(t){return n=>{if(E_(n.value)||E_(t))return null;const o=parseFloat(n.value);return!isNaN(o)&&o>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return function Soe(t){return E_(t.value)?{required:!0}:null}(n)}static requiredTrue(n){return function woe(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function Toe(t){return E_(t.value)||$je.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function Poe(t){return n=>E_(n.value)||!boe(n.value)?null:n.value.length<t?{minlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static maxLength(n){return function Ioe(t){return n=>boe(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function Moe(t){if(!t)return zA;let n,o;return"string"==typeof t?(o="","^"!==t.charAt(0)&&(o+="^"),o+=t,"$"!==t.charAt(t.length-1)&&(o+="$"),n=new RegExp(o)):(o=t.toString(),n=t),e=>{if(E_(e.value))return null;const i=e.value;return n.test(i)?null:{pattern:{requiredPattern:o,actualValue:i}}}}(n)}static nullValidator(n){return null}static compose(n){return koe(n)}static composeAsync(n){return Loe(n)}}function zA(t){return null}function Ooe(t){return null!=t}function Eoe(t){return xT(t)?Ks(t):t}function xoe(t){let n={};return t.forEach(o=>{n=null!=o?{...n,...o}:n}),0===Object.keys(n).length?null:n}function Aoe(t,n){return n.map(o=>o(t))}function Roe(t){return t.map(n=>function Kje(t){return!t.validate}(n)?n:o=>n.validate(o))}function koe(t){if(!t)return null;const n=t.filter(Ooe);return 0==n.length?null:function(o){return xoe(Aoe(o,n))}}function t4(t){return null!=t?koe(Roe(t)):null}function Loe(t){if(!t)return null;const n=t.filter(Ooe);return 0==n.length?null:function(o){return one(Aoe(o,n).map(Eoe)).pipe(jn(xoe))}}function n4(t){return null!=t?Loe(Roe(t)):null}function Doe(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function Boe(t){return t._rawValidators}function Noe(t){return t._rawAsyncValidators}function i4(t){return t?Array.isArray(t)?t:[t]:[]}function jA(t,n){return Array.isArray(t)?t.includes(n):t===n}function Foe(t,n){const o=i4(n);return i4(t).forEach(i=>{jA(o,i)||o.push(i)}),o}function Uoe(t,n){return i4(n).filter(o=>!jA(t,o))}class Goe{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=t4(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=n4(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,o){return!!this.control&&this.control.hasError(n,o)}getError(n,o){return this.control?this.control.getError(n,o):null}}class Cu extends Goe{get formDirective(){return null}get path(){return null}}class A_ extends Goe{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Voe{constructor(n){this._cd=n}get isTouched(){var n;return!(null===(n=this._cd)||void 0===n||null===(n=n.control)||void 0===n||!n.touched)}get isUntouched(){var n;return!(null===(n=this._cd)||void 0===n||null===(n=n.control)||void 0===n||!n.untouched)}get isPristine(){var n;return!(null===(n=this._cd)||void 0===n||null===(n=n.control)||void 0===n||!n.pristine)}get isDirty(){var n;return!(null===(n=this._cd)||void 0===n||null===(n=n.control)||void 0===n||!n.dirty)}get isValid(){var n;return!(null===(n=this._cd)||void 0===n||null===(n=n.control)||void 0===n||!n.valid)}get isInvalid(){var n;return!(null===(n=this._cd)||void 0===n||null===(n=n.control)||void 0===n||!n.invalid)}get isPending(){var n;return!(null===(n=this._cd)||void 0===n||null===(n=n.control)||void 0===n||!n.pending)}get isSubmitted(){var n;return!(null===(n=this._cd)||void 0===n||!n.submitted)}}let Ql=(()=>{var t;class n extends Voe{constructor(e){super(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(A_,2))},t.\u0275dir=qn({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Uo("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Ht]}),n})(),yu=(()=>{var t;class n extends Voe{constructor(e){super(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cu,10))},t.\u0275dir=qn({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Uo("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Ht]}),n})();const GP="VALID",qA="INVALID",fw="PENDING",VP="DISABLED";function s4(t){return(WA(t)?t.validators:t)||null}function a4(t,n){return(WA(n)?n.asyncValidators:t)||null}function WA(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function joe(t,n,o){const e=t.controls;if(!(n?Object.keys(e):e).length)throw new vt(1e3,"");if(!e[o])throw new vt(1001,"")}function Hoe(t,n,o){t._forEachChild((e,i)=>{if(void 0===o[i])throw new vt(1002,"")})}class $A{constructor(n,o){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(o)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===GP}get invalid(){return this.status===qA}get pending(){return this.status==fw}get disabled(){return this.status===VP}get enabled(){return this.status!==VP}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Foe(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Foe(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Uoe(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Uoe(n,this._rawAsyncValidators))}hasValidator(n){return jA(this._rawValidators,n)}hasAsyncValidator(n){return jA(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(o=>{o.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=fw,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const o=this._parentMarkedDirty(n.onlySelf);this.status=VP,this.errors=null,this._forEachChild(e=>{e.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:o}),this._onDisabledChange.forEach(e=>e(!0))}enable(n={}){const o=this._parentMarkedDirty(n.onlySelf);this.status=GP,this._forEachChild(e=>{e.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:o}),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===GP||this.status===fw)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(o=>o._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?VP:GP}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=fw,this._hasOwnPendingAsyncValidator=!0;const o=Eoe(this.asyncValidator(this));this._asyncValidationSubscription=o.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,o={}){this.errors=n,this._updateControlsErrors(!1!==o.emitEvent)}get(n){let o=n;return null==o||(Array.isArray(o)||(o=o.split(".")),0===o.length)?null:o.reduce((e,i)=>e&&e._find(i),this)}getError(n,o){const e=o?this.get(o):this;return e&&e.errors?e.errors[n]:null}hasError(n,o){return!!this.getError(n,o)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new ke,this.statusChanges=new ke}_calculateStatus(){return this._allControlsDisabled()?VP:this.errors?qA:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(fw)?fw:this._anyControlsHaveStatus(qA)?qA:GP}_anyControlsHaveStatus(n){return this._anyControls(o=>o.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){WA(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function Jje(t){return Array.isArray(t)?t4(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function Xje(t){return Array.isArray(t)?n4(t):t||null}(this._rawAsyncValidators)}}class gw extends $A{constructor(n,o,e){super(s4(o),a4(e,o)),this.controls=n,this._initObservables(),this._setUpdateStrategy(o),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,o){return this.controls[n]?this.controls[n]:(this.controls[n]=o,o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange),o)}addControl(n,o,e={}){this.registerControl(n,o),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}removeControl(n,o={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:o.emitEvent}),this._onCollectionChange()}setControl(n,o,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],o&&this.registerControl(n,o),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,o={}){Hoe(this,0,n),Object.keys(n).forEach(e=>{joe(this,!0,e),this.controls[e].setValue(n[e],{onlySelf:!0,emitEvent:o.emitEvent})}),this.updateValueAndValidity(o)}patchValue(n,o={}){null!=n&&(Object.keys(n).forEach(e=>{const i=this.controls[e];i&&i.patchValue(n[e],{onlySelf:!0,emitEvent:o.emitEvent})}),this.updateValueAndValidity(o))}reset(n={},o={}){this._forEachChild((e,i)=>{e.reset(n?n[i]:null,{onlySelf:!0,emitEvent:o.emitEvent})}),this._updatePristine(o),this._updateTouched(o),this.updateValueAndValidity(o)}getRawValue(){return this._reduceChildren({},(n,o,e)=>(n[e]=o.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(o,e)=>!!e._syncPendingControls()||o);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(o=>{const e=this.controls[o];e&&n(e,o)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[o,e]of Object.entries(this.controls))if(this.contains(o)&&n(e))return!0;return!1}_reduceValue(){return this._reduceChildren({},(o,e,i)=>((e.enabled||this.disabled)&&(o[i]=e.value),o))}_reduceChildren(n,o){let e=n;return this._forEachChild((i,r)=>{e=o(e,i,r)}),e}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class qoe extends gw{}const Ab=new Ot("CallSetDisabledState",{providedIn:"root",factory:()=>zP}),zP="always";function KA(t,n){return[...n.path,t]}function jP(t,n,o=zP){var e,i;c4(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===o)&&(null===(e=(i=n.valueAccessor).setDisabledState)||void 0===e||e.call(i,t.disabled)),function tHe(t,n){n.valueAccessor.registerOnChange(o=>{t._pendingValue=o,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&Woe(t,n)})}(t,n),function iHe(t,n){const o=(e,i)=>{n.valueAccessor.writeValue(e),i&&n.viewToModelUpdate(e)};t.registerOnChange(o),n._registerOnDestroy(()=>{t._unregisterOnChange(o)})}(t,n),function nHe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&Woe(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function eHe(t,n){if(n.valueAccessor.setDisabledState){const o=e=>{n.valueAccessor.setDisabledState(e)};t.registerOnDisabledChange(o),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(o)})}}(t,n)}function ZA(t,n,o=!0){const e=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(e),n.valueAccessor.registerOnTouched(e)),YA(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function QA(t,n){t.forEach(o=>{o.registerOnValidatorChange&&o.registerOnValidatorChange(n)})}function c4(t,n){const o=Boe(t);null!==n.validator?t.setValidators(Doe(o,n.validator)):"function"==typeof o&&t.setValidators([o]);const e=Noe(t);null!==n.asyncValidator?t.setAsyncValidators(Doe(e,n.asyncValidator)):"function"==typeof e&&t.setAsyncValidators([e]);const i=()=>t.updateValueAndValidity();QA(n._rawValidators,i),QA(n._rawAsyncValidators,i)}function YA(t,n){let o=!1;if(null!==t){if(null!==n.validator){const i=Boe(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(s=>s!==n.validator);r.length!==i.length&&(o=!0,t.setValidators(r))}}if(null!==n.asyncValidator){const i=Noe(t);if(Array.isArray(i)&&i.length>0){const r=i.filter(s=>s!==n.asyncValidator);r.length!==i.length&&(o=!0,t.setAsyncValidators(r))}}}const e=()=>{};return QA(n._rawValidators,e),QA(n._rawAsyncValidators,e),o}function Woe(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function u4(t,n){if(!t.hasOwnProperty("model"))return!1;const o=t.model;return!!o.isFirstChange()||!Object.is(n,o.currentValue)}function d4(t,n){if(!n)return null;let o,e,i;return Array.isArray(n),n.forEach(r=>{r.constructor===xb?o=r:function sHe(t){return Object.getPrototypeOf(t.constructor)===Eb}(r)?e=r:i=r}),i||e||o||null}function Zoe(t,n){const o=t.indexOf(n);o>-1&&t.splice(o,1)}function Qoe(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const _w=class extends $A{constructor(n=null,o,e){super(s4(o),a4(e,o)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(o),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),WA(o)&&(o.nonNullable||o.initialValueIsDefault)&&(this.defaultValue=Qoe(n)?n.value:n)}setValue(n,o={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==o.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==o.emitViewToModelChange)),this.updateValueAndValidity(o)}patchValue(n,o={}){this.setValue(n,o)}reset(n=this.defaultValue,o={}){this._applyFormState(n),this.markAsPristine(o),this.markAsUntouched(o),this.setValue(this.value,o),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){Zoe(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){Zoe(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){Qoe(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},dHe={provide:A_,useExisting:_s(()=>h4)},Xoe=(()=>Promise.resolve())();let h4=(()=>{var t;class n extends A_{constructor(e,i,r,s,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this.control=new _w,this._registered=!1,this.name="",this.update=new ke,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=d4(0,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),u4(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){jP(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){Xoe.then(()=>{var i;this.control.setValue(e,{emitViewToModelChange:!1}),null===(i=this._changeDetectorRef)||void 0===i||i.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&IS(i);Xoe.then(()=>{var s;r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),null===(s=this._changeDetectorRef)||void 0===s||s.markForCheck()})}_getPath(e){return this._parent?KA(e,this._parent):[e]}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cu,9),g(Sl,10),g(x_,10),g(Mh,10),g(Re,8),g(Ab,8))},t.\u0275dir=qn({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[mo.None,"disabled","isDisabled"],model:[mo.None,"ngModel","model"],options:[mo.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[mn([dHe]),Ht,it]}),n})(),Su=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275dir=qn({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})();const m4=new Ot(""),_He={provide:Cu,useExisting:_s(()=>wl)};let wl=(()=>{var t;class n extends Cu{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new ke,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(YA(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return jP(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ZA(e.control||null,e,!1),function aHe(t,n){const o=t.indexOf(n);o>-1&&t.splice(o,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){var i;return this.submitted=!0,function Koe(t,n){t._syncPendingControls(),n.forEach(o=>{const e=o.control;"submit"===e.updateOn&&e._pendingChange&&(o.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===(null==e||null===(i=e.target)||void 0===i?void 0:i.method)}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(ZA(i||null,e),(t=>t instanceof _w)(r)&&(jP(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function $oe(t,n){c4(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function oHe(t,n){return YA(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){c4(this.form,this),this._oldForm&&YA(this._oldForm,this)}_checkFormPresent(){}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Sl,10),g(x_,10),g(Ab,8))},t.\u0275dir=qn({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&Y("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:[mo.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[mn([_He]),Ht,it]}),n})();const CHe={provide:A_,useExisting:_s(()=>Yl)};let Yl=(()=>{var t;class n extends A_{set isDisabled(e){}constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new ke,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=d4(0,s)}ngOnChanges(e){this._added||this._setUpControl(),u4(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return KA(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return(t=n)._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(g(Cu,13),g(Sl,10),g(x_,10),g(Mh,10),g(m4,8))},t.\u0275dir=qn({type:t,selectors:[["","formControlName",""]],inputs:{name:[mo.None,"formControlName","name"],isDisabled:[mo.None,"disabled","isDisabled"],model:[mo.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[mn([CHe]),Ht,it]}),n})(),gre=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();class _re extends $A{constructor(n,o,e){super(s4(o),a4(e,o)),this.controls=n,this._initObservables(),this._setUpdateStrategy(o),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,o={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:o.emitEvent}),this._onCollectionChange()}insert(n,o,e={}){this.controls.splice(n,0,o),this._registerControl(o),this.updateValueAndValidity({emitEvent:e.emitEvent})}removeAt(n,o={}){let e=this._adjustIndex(n);e<0&&(e=0),this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:o.emitEvent})}setControl(n,o,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),o&&(this.controls.splice(i,0,o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,o={}){Hoe(this,0,n),n.forEach((e,i)=>{joe(this,!1,i),this.at(i).setValue(e,{onlySelf:!0,emitEvent:o.emitEvent})}),this.updateValueAndValidity(o)}patchValue(n,o={}){null!=n&&(n.forEach((e,i)=>{this.at(i)&&this.at(i).patchValue(e,{onlySelf:!0,emitEvent:o.emitEvent})}),this.updateValueAndValidity(o))}reset(n=[],o={}){this._forEachChild((e,i)=>{e.reset(n[i],{onlySelf:!0,emitEvent:o.emitEvent})}),this._updatePristine(o),this._updateTouched(o),this.updateValueAndValidity(o)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(o=>o._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((o,e)=>!!e._syncPendingControls()||o,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((o,e)=>{n(o,e)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(o=>o.enabled&&n(o))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){var o;return null!==(o=this.at(n))&&void 0!==o?o:null}}function vre(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let td=(()=>{var t;class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let s={};return vre(i)?s=i:null!==i&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new gw(r,s)}record(e,i=null){const r=this._reduceControls(e);return new qoe(r,i)}control(e,i,r){let s={};return this.useNonNullable?(vre(i)?s=i:(s.validators=i,s.asyncValidators=r),new _w(e,{...s,nonNullable:!0})):new _w(e,i,r)}array(e,i,r){const s=e.map(a=>this._createControl(a));return new _re(s,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof _w||e instanceof $A?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),kb=(()=>{var t;class n{static withConfig(e){var i;return{ngModule:n,providers:[{provide:Ab,useValue:null!==(i=e.callSetDisabledState)&&void 0!==i?i:zP}]}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[gre]}),n})(),Lb=(()=>{var t;class n{static withConfig(e){var i,r;return{ngModule:n,providers:[{provide:m4,useValue:null!==(i=e.warnOnNgModelWithFormControl)&&void 0!==i?i:"always"},{provide:Ab,useValue:null!==(r=e.callSetDisabledState)&&void 0!==r?r:zP}]}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[gre]}),n})(),JA=(()=>{var t;class n{constructor(e){this.regex={},this.config=e,this.buildWordsList()}containsBadWord(e,i){if(i)return!!this.regex[i]&&this.regex[i].test(e);{let r=!1;const s=Object.keys(this.regex);for(let a of s)if(r=this.regex[a].test(e),r)break;return r}}buildWordsList(){const e=this.config.social.chat.filteredWords;e&&Object.keys(e).forEach(i=>{const r=[];e[i].forEach((s,a)=>{if(r[a]=s.replace(/\*/g,"\\*").replace(/#/g,"\\#").replace(/@/,"\\@").replace(/_/g,"\\_"),0!==a){const c=r[a];r[a]="(^|[ \n\r\t.,*'\"+!?-]+?)(";const u=!c[0].match(/[\[\(]+?/),h=!c[c.length-1].match(/[\]\)]+?/);u&&(r[a]+="".concat(c[0],"+?")),r[a]+=c.slice(u?1:0,h?c.length-1:c.length),h&&(r[a]+="".concat(c[c.length-1],"+?"))}a!==e[i].length-1&&(r[a]+=")([ \n\r\t.,*'\"+}!?-]+?|$)")}),this.regex[i]=new RegExp("(.*[\u2800-\u28fe].*)|(^|[ \n\r\t.,'\"+!?-]+)("+r.join("|")+")([ \n\r\t.,'\"+!?-]+|$)","i")})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dr))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var DHe=__webpack_require__(94107),XA=__webpack_require__(19299),bre=__webpack_require__.n(XA);class Cre{constructor(n,o){this.key=n,this.isValidCallback=o}getValidatorFn(){return n=>this.isValidCallback(n)?null:{[this.key]:n.value}}}class eR{constructor(...n){this.configs=[],this.extraValidators=[],this.configs=n}isValid(n){return this.minLength<=(n=n||"").length&&n.length<=this.maxLength&&new RegExp(this.pattern).test(n)&&!this.forbiddenValues.find(o=>o==n)}get validators(){return[Ln.minLength(this.minLength),Ln.maxLength(this.maxLength),Ln.pattern(this.pattern),this.forbiddenValuesValidator,...this.extraValidators]}get minLength(){return Math.min(...this.configs.filter(n=>null!=n.minLength).map(n=>n.minLength))||0}get maxLength(){return Math.max(...this.configs.filter(n=>null!=n.maxLength).map(n=>n.maxLength))||1/0}get pattern(){return this.configs.filter(n=>null!=n.pattern).map(n=>n.pattern).join("|")||""}get forbiddenValues(){let n=[];return this.configs.filter(o=>null!=o.forbidden).forEach(o=>n=n.concat(o.forbidden)),n}get options(){let n=[];return this.configs.filter(o=>null!=o.options).forEach(o=>n=n.concat(o.options)),n}addValidator(n){this.extraValidators.push(n)}forbiddenValuesValidator(n){return new Cre("forbiddenValues",()=>!!this.forbiddenValues.find(e=>e==n.value)).getValidatorFn()}}class BHe extends eR{isValid(n){const o=parseInt(n)||0;return this.minLength<=o&&o<=this.maxLength&&new RegExp(this.pattern).test(n)&&!this.forbiddenValues.find(e=>e===n)}get validators(){return[Ln.min(this.minLength),Ln.max(this.maxLength),Ln.pattern(this.pattern)]}}class yre{constructor(){this.minLengthConfigs=[],this.maxLengthConfigs=[],this.patternConfigs=[],this.forbiddenValuesConfigs=[],this.extraValidators=[]}addMinLengthConfig(...n){return this.minLengthConfigs=this.minLengthConfigs.concat(n),this}addMaxLengthConfig(...n){return this.maxLengthConfigs=this.maxLengthConfigs.concat(n),this}addPatternConfig(...n){return this.patternConfigs=this.patternConfigs.concat(n),this}addForbiddenValuesConfig(...n){return this.forbiddenValuesConfigs=this.forbiddenValuesConfigs.concat(n),this}addValidator(n){return this.extraValidators.push(n),this}build(){const n=this.minLengthConfigs.map(s=>({id:"field",type:"string",minLength:s})),o=this.maxLengthConfigs.map(s=>({id:"field",type:"string",maxLength:s})),e=this.patternConfigs.map(s=>({id:"field",type:"string",pattern:s})),i=this.forbiddenValuesConfigs.map(s=>({id:"field",type:"string",forbidden:s})),r=new eR(...n,...o,...e,...i);return this.extraValidators.forEach(s=>r.addValidator(s)),r}}let wa=(()=>{var t;class n{constructor(e,i){this.config=e,this.profanityFilterService=i,this.formFieldsConfig=e.core.validations.formFields}createEmailValidator(){return this.createValidatorByField("email")}createUsernameValidator(){const e=this.createValidatorByField("username");return e.addValidator(this.createProfanityValidatorFn().getValidatorFn()),e}createPasswordValidator(){return this.createValidatorByField("password")}createPhoneValidator(){return this.createValidatorByField("phone")}createPhoneEmailValidator(){return new eR(this.formFieldsConfig.phone,this.formFieldsConfig.email)}createAgeValidator(){return new BHe(this.formFieldsConfig.age)}createCityValidator(){return this.createValidatorByField("city")}createCountryValidator(){return this.createValidatorByField("country")}createProfileStatusValidator(){const e=this.createValidatorByField("status");return e.addValidator(this.createProfanityValidatorFn().getValidatorFn()),e}createGenderValidator(){return this.createValidatorByField("sex")}createChatMessageValidator(){return this.createValidatorByField("chatMessage")}createClubNameValidator(){return this.createValidatorByField("clubName")}createClubStatusValidator(){return this.createValidatorByField("clubStatus")}createClubJoinRequestMessageValidator(){return this.createValidatorByField("clubJoinRequestMessage")}createCreatorCodeValidator(){return this.createValidatorByField("creatorCode")}createNoteValidator(){return this.createValidatorByField("userNotes")}createBlitzTournamentNameValidator(){const e=this.formFieldsConfig.blitzTournamentName,i=this.formFieldsConfig.username;return(new yre).addMinLengthConfig(e.minLength).addMaxLengthConfig(e.maxLength).addForbiddenValuesConfig(i.forbidden).build()}createUsernameSearchValidator(){const e=this.formFieldsConfig.username;return(new yre).addMinLengthConfig(e.minLength).addMaxLengthConfig(e.maxLength).addForbiddenValuesConfig(e.forbidden).build()}createValidatorByField(e){return new eR(this.formFieldsConfig[e])}createProfanityValidatorFn(){return new Cre("profanity",e=>!this.profanityFilterService.containsBadWord(e.value))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dr),T(JA))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class gc{static getSameFieldsValidatorConfig(n){return o=>{let e=n.map(i=>({control:o.get(i),value:o.get(i).value}));1===XA(e,"value").length?e.forEach(i=>{i.control.errors?1===Object.keys(i.control.errors).length&&i.control.hasError("dontmatch")?i.control.setErrors(null):i.control.errors.dontmatch=!1:i.control.setErrors(null)}):e.forEach(i=>{i.control.errors||i.control.setErrors({}),i.control.errors.dontmatch=!0})}}static isFormValid(n){return this.areControlsValid(n.controls)}static areControlsValid(n){let o=!0;for(let e in n)!0===n.hasOwnProperty(e)&&!1===n[e].valid&&(o=!1);return o}static getFormErroredFields(n){return DHe(n.controls,o=>!1===Sb(o.errors))}}var vw=function(t){return t[t.Client=0]="Client",t[t.Room=1]="Room",t[t.Table=2]="Table",t}(vw||{}),yn=function(t){return t.Idle="idle",t.Active="active",t.Desync="desync",t.Searching="searching",t.RoomFound="roomFound",t}(yn||{}),Bd=function(t){return t[t.Communication=0]="Communication",t[t.Cmd=1]="Cmd",t}(Bd||{}),Db=function(t){return t.MMCancelSearch="mmCancelSearch",t.GameWon="gameWon",t.GameLost="gameLost",t}(Db||{});class tR{createErrorObject(n,o){switch(n){case Ve.ECmdStatus.Duplicated:return new et.Duplication(o);case Ve.ECmdStatus.GenericError:return new lt.GenericError;case Ve.ECmdStatus.StateMissmatch:return new lt.StateMissmatch;case Ve.ECmdStatus.NotFound:return new et.ItemNotFound;case Ve.ECmdStatus.UnsupportedOp:return new et.UnsupportedOperation;case et.EGamesPlayError.Duplicate:return new et.Duplication(o);case et.EGamesPlayError.NotEnoughChips:return new et.NotEnoughMinerals;case et.EGamesPlayError.NotFound:return new et.ItemNotFound;case et.EGamesPlayError.SeatTaken:return new et.RoomSeatTaken;case et.EGamesPlayError.Timeout:return new et.Timeout;case et.EGamesPlayError.Requirements:return new et.RoomRequirements;case et.EGamesPlayError.InvalidOption:return new et.InvalidCustomOption;case et.EGamesPlayError.State:return new et.StateError;case et.EGamesPlayError.Banned:return new et.Banned;case lt.Code.RoomConnectReject:return new lt.RoomConnectReject;case lt.Code.ActionInProgress:return new lt.ActionInProgress;default:return new lt.UnknownError}}}class C4{constructor(){this.errors=new tR,this.currentAckId=0}useNamespace(n){this.communication=n}send(n,...o){this.communication.emit(n,...o)}subscribe(n,o){return this.communication.on(n,o)}once(n,o){this.communication.once(n,o)}unsubscribe(n,o){this.communication.removeListener(n,o)}unsubscribeAll(){this.communication.removeAllListeners()}getCommunication(){return this.communication}onReconnect(n){return this.communication.onReconnect(n)}onConnectionLost(n){return this.communication.onConnectionLost(n)}request(n,o=[],e=3e4){var i=this;return new Promise(function(){var r=f(function*(s,a){let c;const u=()=>(clearTimeout(c),a(new lt.NetworkError));void 0!==e&&(c=setTimeout(()=>(i.communication.removeListener("disconnect",u),a(new et.Timeout("Request ".concat(n.cmd," timed out after ").concat(e," ms!")))),e)),i.communication.once("disconnect",u),n.ack||(n.ack=Bd.Communication);try{let h;return h=n.ack===Bd.Communication?yield i.requestWithCommunicationAck(n.cmd,o):yield i.requestWithCmdAck(n.cmd,o[0]),i.communication.removeListener("disconnect",u),clearTimeout(c),s(h)}catch(h){return clearTimeout(c),a(h)}});return function(s,a){return r.apply(this,arguments)}}())}requestWithCommunicationAck(n,o){return new Promise((e,i)=>{this.send(n,...o.concat(r=>r.status===Ve.ECmdStatus.Ok?e(r.data):i(this.errors.createErrorObject(r.status,r.data))))})}requestWithCmdAck(n,o={}){return new Promise((e,i)=>{o.cid=this.generateId(),this.send(n,o),this.communication.once(o.cid.toString(),r=>r.status===Ve.ECmdStatus.Ok?e(r.data):i(this.errors.createErrorObject(r.status,r.data)))})}generateId(){return this.currentAckId++}}var nl=function(t){return t.ResetState="[Games Play] Reset Games Play client State",t.AddPlayClientRoomStates="[Games Play] Add Play Client Room States",t.UpdateCurrentRoomViewModel="[Games Play] Update current room view model",t.UpdateCurrentTableViewModel="[Games Play] Update current table view model",t.UpdateIsSpectator="[Games Play] Update current is spectator",t.UnlockRoomSuccess="[Games Play] Unlock room success",t.AcceptInvite="[Games Play] Accept Invite",t.AcceptInviteSuccess="[Games Play] Accept Invite Success",t.AcceptInviteError="[Games Play] Accept Invite Error",t.InitPlayClients="[Games Play] Init Play Clients",t.ResetPlayClientState="[Games Play] Reset Play Client State",t.ConnectPlayClient="[Games Play] Connect Play Client",t.ConnectPlayClientSuccess="[Games Play] Connect Play Client Success",t.ConnectPlayClientError="[Games Play] Connect Play Client Error",t.ConnectAndHandlePlayClientState="[Games Play] Connect And Handle Play Client State",t.ConnectAndHandlePlayClientStateSuccess="[Games Play] Connect And Handle Play Client State Success",t.ConnectAndHandlePlayClientStateError="[Games Play] Connect And Handle Play Client State Error",t}(nl||{});const Zre=he(nl.ResetState),Qre=he(nl.AddPlayClientRoomStates,{_as:"props",_p:void 0}),Yre=he(nl.UpdateIsSpectator,{_as:"props",_p:void 0}),Jre=he(nl.UpdateCurrentRoomViewModel,{_as:"props",_p:void 0}),Xre=he(nl.UpdateCurrentTableViewModel,{_as:"props",_p:void 0}),nR=he(nl.UnlockRoomSuccess,{_as:"props",_p:void 0}),ese=he(nl.AcceptInvite,{_as:"props",_p:void 0}),tse=he(nl.AcceptInviteSuccess,{_as:"props",_p:void 0}),nse=he(nl.AcceptInviteError,{_as:"props",_p:void 0}),ise=he(nl.InitPlayClients,{_as:"props",_p:void 0}),ose=he(nl.ResetPlayClientState,{_as:"props",_p:void 0}),rse=he(nl.ConnectPlayClient,{_as:"props",_p:void 0}),sse=he(nl.ConnectPlayClientSuccess,{_as:"props",_p:void 0}),ase=he(nl.ConnectPlayClientError,{_as:"props",_p:void 0}),cse=he(nl.ConnectAndHandlePlayClientState,{_as:"props",_p:void 0}),lse=he(nl.ConnectAndHandlePlayClientStateSuccess,{_as:"props",_p:void 0}),use=he(nl.ConnectAndHandlePlayClientStateError,{_as:"props",_p:void 0});class dse extends C4{constructor(n){super(),this.store=n}getRoomList(n){return this.send(Ve.MatchmakingProtocol.Messages.GetCustomRooms,n)}getRoomByCode(n,o){var e=this;return f(function*(){const i=yield e.request({ack:Bd.Cmd,cmd:Ve.MatchmakingProtocol.Messages.GetRoomByCode},[n],o);return i&&e.store.dispatch(nR({id:i.id,roomCode:n.roomCode})),i})()}onRoomCreate(n){return new ie.EventListener(null,Ve.ActiveRoomProtocol.Messages.RoomDestroyed,n)}onRoomDestroy(n){return new ie.EventListener(null,Ve.ActiveRoomProtocol.Messages.RoomDestroyed,n)}}let NHe=(()=>{var t;class n{constructor(e){var i=this;this.store=e,this.listeners=new ie.List,this.disposeRoom=r=>{this.onRoomUpdate(r.channel,void 0)},this.dispose=()=>{this.store.dispatch(Zre()),this.listeners.forEach(r=>r.detach())},this.onRoomUpdate=function(){var r=f(function*(s,a){i.store.dispatch(Xre({gameId:s,table:a&&a.currentTable?MP(a.currentTable.getViewModel()):void 0})),i.store.dispatch(Jre({gameId:s,room:a?MP(a.getViewModel()):void 0}))});return function(s,a){return r.apply(this,arguments)}}()}initialize(e){const i=e.toArray().map(r=>r.channel);this.store.dispatch(Qre({gameIds:i}));for(let r of e.toArray())this.listeners.add(r.stateEvents.onRoomStateTransition(s=>{this.onRoomUpdate(r.channel,s.data.currentRoom),this.onSpectate(r.channel,s.data.currentRoom.isSpectating),this.listeners.add(s.data.currentRoom.onUpdate(()=>this.onRoomUpdate(r.channel,s.data.currentRoom))),this.listeners.add(s.data.currentRoom.onMyTableUpdate(()=>this.onRoomUpdate(r.channel,s.data.currentRoom))),this.listeners.add(s.data.currentRoom.onDispose(()=>this.disposeRoom(r))),this.listeners.add(s.data.currentRoom.onSpectate(a=>this.onSpectate(r.channel,a)))}))}onSpectate(e,i){this.store.dispatch(Yre({gameId:e,isSpectator:i}))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class qP extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.resetActiveClientModel()})()}findRoom(n,o){var e=this;return f(function*(){try{if(e.updateActiveClientModel({roomSearchModel:{...n,poolStats:void 0}}),n.customPool){const i=yield e.sdk.findRoom({presetId:n.pool.id,customPool:n.customPool},o);e.updateActiveClientModel({roomSearchModel:{pool:{...e.activeClientModel.roomSearchModel.pool,id:i.poolId},poolStats:i.poolStats}})}else yield e.sdk.findRoom(n.pool.id,o);yield e.state.to(yn.Searching)}catch(i){if(i instanceof et.Duplication)return e.findRoom(n,o);throw i instanceof lt.NetworkError||(yield e.state.to(yn.Idle)),i}})()}createRoom(n,o){var e=this;return f(function*(){let i;try{yield e.state.to(yn.Active);const r=yield e.sdk.createRoom(n,o);i=e.createGameRoom({id:r.id,type:r.settings.type}),yield i.state.start();const s=i.getActiveTableReservedSeat(),a={tableId:s.table.id,seatId:s.seat.id,isAutoTopUpEnabled:"string"==typeof n?void 0:n.isAutoTopUpEnabled,buyInAmount:"string"==typeof n?void 0:n.buyInAmount};return yield i.join(a),r}catch(r){throw r instanceof et.Timeout&&i?yield i.dispose().then(()=>i.returnPlayerToLobby()):r instanceof lt.NetworkError||(yield e.state.to(yn.Idle)),r}})()}joinRoom(n,o,e){var i=this;return f(function*(){try{yield i.state.to(yn.Active);const r=i.createGameRoom(n);yield r.state.start(),yield r.join(o)}catch(r){const s=i.activeClientModel.currentRoom;throw r instanceof et.Timeout&&s?s.id===n.id&&(yield s.dispose().then(()=>s.returnPlayerToLobby())):r instanceof lt.NetworkError||(yield i.state.to(yn.Idle)),r}})()}spectateRoom(n,o,e){var i=this;return f(function*(){try{i.updateActiveClientModel({spectateRoomModel:{viewModel:n,args:o}}),yield i.state.to(yn.Active);const r=i.createGameRoom(n);yield r.state.start(),yield r.spectate(o,e)}catch(r){const s=i.activeClientModel.currentRoom;throw r instanceof et.Timeout&&s?s.id===n.id&&(yield s.dispose().then(()=>s.returnPlayerToLobby())):r instanceof lt.NetworkError||(yield i.state.to(yn.Idle)),r}})()}acceptInvite(n,o,e){var i=this;return f(function*(){yield i.joinInvitedRoom(n,o,e)})()}reconnectToRoom(n){var o=this;return f(function*(){yield o.state.to(yn.Active);const e=o.createGameRoom({id:n.currentRoomId,type:n.currentRoomType});e.setAsReconnecting(),yield e.state.start()})()}}qP.stateName=yn.Idle;class iR extends Do.AsyncState{leaveCurrentRoom(n){var o=this;return f(function*(){if(o.activeClientModel.currentRoom)return yield o.activeClientModel.currentRoom.leave(n);throw o.errors.createErrorObject(et.Code.NotFound)})()}invite(n,o){var e=this;return f(function*(){if(e.activeClientModel.currentRoom)return yield e.activeClientModel.currentRoom.invite(n);throw e.errors.createErrorObject(et.Code.NotFound)})()}rematchRoom(n,o){var e=this;return f(function*(){if(e.activeClientModel.currentRoom)return yield e.activeClientModel.currentRoom.rematch(n);throw e.errors.createErrorObject(et.Code.NotFound)})()}}iR.stateName=yn.Active;var w4,bw=function(t){return t.Desync="desync",t}(bw||{}),io=function(t){return t.ActionTimeout="actionTimeout",t.UnsupportedOperation="unsupportedOp",t.LeaveRoom="leaveRoom",t.RoomNoActivePlayers="roomNoActivePlayers",t.NoLongerInRoom="noLongerInRoom",t.WaitingTimeout="wtimeout",t}(io||{}),y4=function(t){return t.Phrase="phrase",t.Emoji="emoji",t}(y4||{});class oR extends Do.AsyncState{onConnectionRestored(){var n=this;return f(function*(){try{const o=n.activeClientModel.currentRoom;if(o){let e;e=o.isSpectating?{id:n.currentPlayerId,currentRoomId:o.id,currentRoomType:o.getViewModel().settings.type,gameName:n.channel}:yield n.getPlayerState(),e.currentRoomId&&e.gameName===n.channel?o.getViewModel().id===e.currentRoomId?o.destroyed||o.pendingDestroy?(o.pendingDestroy&&(yield o.pendingDestroy),yield o.returnPlayerToLobby(),yield n.state.to(yn.Idle)):(yield o.onConnectionRestored(),yield n.state.to(yn.Active)):(yield o.dispose(),yield n.reconnectToRoom(e)):o.stayAsSpectatorIfKickedOnDisconnect?(e={id:n.currentPlayerId,currentRoomId:o.id,currentRoomType:o.getViewModel().settings.type,gameName:n.channel},o.isSpectating=!0,o.destroyed||o.pendingDestroy?(o.pendingDestroy&&(yield o.pendingDestroy),yield o.returnPlayerToLobby(),yield n.state.to(yn.Idle)):(yield o.onConnectionRestored(),yield n.state.to(yn.Active))):(yield o.dispose(io.NoLongerInRoom),yield o.returnPlayerToLobby(),yield n.state.to(yn.Idle))}else{const e=yield n.getPlayerState();e.currentRoomId?yield n.reconnectToRoom(e):yield n.state.to(yn.Idle)}}catch(o){console.warn("".concat(n.state.current.stateName," onConnectionRestored handler error"),o)}})()}onConnectionLost(){return f(function*(){console.log("Ignore connection lost")})()}reconnectToRoom(n){var o=this;return f(function*(){try{yield o.state.to(yn.Active);const e=o.createGameRoom({id:n.currentRoomId,type:n.currentRoomType});e.setAsReconnecting(),yield e.state.start()}catch(e){console.warn("Reconnect to room error",e)}})()}cancelSearch(){var n=this;return f(function*(){n.activeClientModel.roomSearchModel&&(yield n.sdk.cancelSearch(n.activeClientModel.roomSearchModel.pool.id))})()}}oR.stateName=yn.Desync;class WP extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.state.current.timeoutMs=n.activeClientModel.roomSearchModel.pool.sessionTimeout+3e4})()}cancelSearch(n,o){var e=this;return f(function*(){e.sdk.cancelSearch(n,o).catch(i=>console.warn("Cancel search caught error",i)),yield e.state.to(yn.Idle)})()}onRoomFound(n){var o=this;return f(function*(){o.state.clearCurrentStateTimeout();try{o.updateActiveClientModel({foundRoomModel:n}),yield o.state.to(yn.RoomFound)}catch(e){console.warn("".concat(o.state.current.stateName," onRoomFound error"),e)}})()}acceptInvite(n,o,e){var i=this;return f(function*(){i.state.clearCurrentStateTimeout(),i.sdk.cancelSearch(i.activeClientModel.roomSearchModel.pool.id,e).catch(r=>console.warn("Cancel search caught error",r)),yield i.joinInvitedRoom(n,o)})()}onExit(){var n=this;return f(function*(){n.state.clearCurrentStateTimeout();const o=n.state.current;clearTimeout(o.stateNavigateDelayId),o.roomReadyListener&&o.roomReadyListener.detach()})()}onTimeout(){var n=this;return f(function*(){n.state.current.stateNavigateDelayId=setTimeout(()=>{n.state.to(yn.Idle)})})()}onBeforeUnload(){var n=this;return f(function*(){try{yield n.cancelSearch(n.activeClientModel.roomSearchModel.pool.id)}catch(o){console.warn(o)}})()}dispose(){var n=this;return f(function*(){clearTimeout(n.state.current.stateNavigateDelayId)})()}}WP.stateName=yn.Searching;class FHe extends C4{getPlayerState(){return this.request({cmd:Ve.MatchmakingProtocol.Messages.GetCurrentState})}findRoom(n,o){let e;return e="string"==typeof n?{presetId:n}:n,this.request({cmd:Ve.MatchmakingProtocol.Messages.RoomSearch},[e],o)}cancelSearch(n,o){return this.request({cmd:Ve.MatchmakingProtocol.Messages.SearchCancel},[{presetId:n}],o)}createRoom(n,o){let e,i;return"string"==typeof n?(e={poolId:n},i=Ve.CreateRoomProtocol.Messages.CreateSinglePlayerRoom):n.presetId?(e={poolId:n.presetId},i=Ve.CreateRoomProtocol.Messages.CreateSinglePlayerRoom):n.roomType===Jt.RoomType.BlitzTournament?(e=n,i=Ve.CreateRoomProtocol.Messages.CreateCustomBlitzRoom):(e=n,i=Ve.CreateRoomProtocol.Messages.CreateCustomRoom),this.request({cmd:i},[e],o)}}class $P extends Do.AsyncState{onEnter(){var n=this;return f(function*(){try{const o=n.createGameRoom({id:n.activeClientModel.foundRoomModel.id,type:n.activeClientModel.foundRoomModel.settings.type});yield o.state.start(),n.state.getCurrentState().roomReadyListener=o.state.onEnter(Ve.ERoomState.Ready,f(function*(){yield n.state.to(yn.Active)}));const i=o.getActiveTableReservedSeat(),r={tableId:i.table.id,seatId:i.seat.id,buyInAmount:n.activeClientModel.roomSearchModel.buyInAmount};yield o.join(r)}catch(o){if(o instanceof et.Timeout||o instanceof et.UnsupportedOperation||o instanceof lt.GenericError||o===Ds.Unknown){const e=n.activeClientModel.currentRoom;yield e.dispose().then(()=>e.returnPlayerToLobby())}console.warn("".concat(n.state.current.stateName," onRoomFound error"),o)}})()}onExit(){var n=this;return f(function*(){const o=n.state.getCurrentState();o.roomReadyListener&&o.roomReadyListener.detach()})()}cancelSearch(){var n=this;return f(function*(){return n.leaveCurrentRoom()})()}leaveCurrentRoom(n){var o=this;return f(function*(){if(o.activeClientModel.currentRoom)return yield o.activeClientModel.currentRoom.leave(n);throw o.errors.createErrorObject(et.Code.NotFound)})()}onRoomDisposed(n){var o=this;return f(function*(){o.activeClientModel.currentRoom&&o.activeClientModel.currentRoom.id!==n.data.id||(n.data&&n.data.reason===Ve.ActiveRoomProtocol.EDestroyReason.WaitingTimeout?yield o.state.to(yn.Searching):yield o.state.to(yn.Idle))})()}}$P.stateName=yn.RoomFound;class pse{constructor(){this.events=new tc}onMyTableUpdate(n){return new ie.EventListener(this.events,"table.update",n)}onStateTransition(n){return new ie.EventListener(this.events,"transition",n)}onClientStateTransition(...n){return"function"==typeof n[0]?new ie.EventListener(this.events,"transition.client",n[0]):new ie.EventListener(this.events,"transition.client.from.".concat(n[0],".to.").concat(n[1]),n[2])}onRoomStateTransition(...n){return"function"==typeof n[0]?new ie.EventListener(this.events,"transition.room",n[0]):new ie.EventListener(this.events,"transition.room.".concat(n[0],".to.").concat(n[1]),n[2])}onStateTimeout(n){return new ie.EventListener(this.events,"timeout",n)}onClientStateTimeout(...n){return"function"==typeof n[0]?new ie.EventListener(this.events,"timeout.client",n[0]):new ie.EventListener(this.events,"timeout.client.".concat(n[0]),n[1])}onRoomStateTimeout(...n){return"function"==typeof n[0]?new ie.EventListener(this.events,"timeout.room",n[0]):new ie.EventListener(this.events,"timeout.room.".concat(n[0]),n[1])}onKnockoutStateUpdate(n){return new ie.EventListener(this.events,"knockoutStateUpdate",n)}onStatsUpdate(n){return new ie.EventListener(this.events,Ve.ActiveRoomProtocol.Messages.StatsUpdate,n)}onPlayerMoved(n){return new ie.EventListener(this.events,Ve.ActiveRoomProtocol.Messages.PlayerMoved,n)}onNewRoom(n){return new ie.EventListener(this.events,"playerNewRoom",n)}emitEvent(n,o){this.events.emit(n,o)}emitTransition(n){this.emitEvent("transition",n)}emitTimeout(n){this.emitEvent("timeout",n)}emitTableUpdate(n){this.emitEvent("table.update",n)}emitRoomTransition(n){this.emitTransition(n),this.emitEvent("transition.room",n),this.emitEvent("transition.room.".concat(n.from,".to.").concat(n.to),n)}emitClientTransition(n){this.emitTransition(n),this.emitEvent("transition.client",n),this.emitEvent("transition.client.".concat(n.from,".to.").concat(n.to),n)}emitRoomStateTimeout(n){this.emitTimeout(n),this.emitEvent("timeout.client",n),this.emitEvent("timeout.client.".concat(n.state),n)}emitClientStateTimeout(n){this.emitTimeout(n),this.emitEvent("timeout.room",n),this.emitEvent("timeout.room.".concat(n.state),n)}emitKnockoutStateUpdate(n){this.emitEvent("knockoutStateUpdate",n)}emitStatsUpdate(n){this.emitEvent(Ve.ActiveRoomProtocol.Messages.StatsUpdate,n)}emitPlayerMoved(){this.emitEvent(Ve.ActiveRoomProtocol.Messages.PlayerMoved,{})}emitPlayerNewRoom(n){this.emitEvent("playerNewRoom",n)}}class UHe{constructor(n,o,e,i){var r=this;this.onBeforeUnload=f(function*(){var s;try{yield r.pendingStateTransition()}catch(a){console.warn("Pending transition failed",a)}r.state.current.onBeforeUnload&&r.state.current.onBeforeUnload.apply(r),null!==(s=r.activeClientModel)&&void 0!==s&&s.currentRoom&&r.activeClientModel.currentRoom.onBeforeUnload()}),this.onConnectionLost=f(function*(){try{yield r.pendingStateTransition()}catch(s){console.warn("Pending transition failed",s)}if(r.state.current.onConnectionLost)r.state.current.onConnectionLost.apply(r);else if(r.activeClientModel.currentRoom&&r.activeClientModel.currentRoom.onConnectionLost(),r.state.current.stateName!==yn.Desync)try{yield r.state.to(yn.Desync)}catch(s){console.warn(s)}}),this.onConnectionRestored=f(function*(){try{yield r.pendingStateTransition()}catch(s){console.warn("Pending transition failed",s)}r.state.current.onConnectionRestored?r.state.current.onConnectionRestored.apply(r):console.warn("Missing connection restored handler in current state")}),this.onRoomFound=function(){var s=f(function*(a){try{yield r.pendingStateTransition()}catch(c){console.warn("Pending transition failed",c)}r.state.current.onRoomFound?yield r.state.current.onRoomFound.apply(r,[a]):console.warn("Missing room found handler in current state")});return function(a){return s.apply(this,arguments)}}(),this.onPoolMatchTimeout=function(){var s=f(function*(a){try{yield r.pendingStateTransition()}catch(c){console.warn("Pending transition failed",c)}r.state.current.onPoolMatchTimeout?r.state.current.onPoolMatchTimeout.apply(r,[a]):console.warn("Missing pool match timeout handler in current state")});return function(a){return s.apply(this,arguments)}}(),this.onKnockoutStateUpdate=s=>{this.updateKnockoutState(s)},this.onRoomDisposed=function(){var s=f(function*(a){try{yield r.pendingStateTransition()}catch(c){console.warn("Pending transition failed",c)}r.updateActiveClientModel({currentRoom:void 0}),r.state.current.onRoomDisposed?r.state.current.onRoomDisposed.apply(r,[a]):r.state.current.stateName!==yn.Desync&&(yield r.state.to(yn.Idle))});return function(a){return s.apply(this,arguments)}}(),this.onRoomStateTransition=(s,a)=>{this.stateEvents.emitRoomTransition(this.createTransitionEvent(vw.Room,s,a))},this.onClientStateTransition=(s,a)=>{this.stateEvents.emitClientTransition(this.createTransitionEvent(vw.Client,s,a))},this.onClientStateTimeout=s=>{this.stateEvents.emitClientStateTimeout(this.createTimeoutEvent(vw.Client,s))},this.onRoomStateTimeout=s=>{this.stateEvents.emitRoomStateTimeout(this.createTimeoutEvent(vw.Room,s))},this.channel=n,this.communicationService=o,this.roomFactory=e,this.store=i,this.errors=new tR,this.initialized=!1,this.namespaceClients={customLobby:void 0},this.activeClientModel={currentRoom:void 0,roomSearchModel:void 0,foundRoomModel:void 0,acceptInviteModel:void 0,spectateRoomModel:void 0,knockoutState:void 0},this.stateEvents=new pse}initialize(n){var o=this;return f(function*(){o.roomListeners=new ie.List,o.currentPlayerId=n,o.setupStateMachine(),o.namespaceClients={customLobby:void 0};const e=yield o.communicationService.connectToNamespace(o.channel);o.sdk=new FHe,o.sdk.useNamespace(e),o.sdk.onReconnect(o.onConnectionRestored),o.sdk.onConnectionLost(o.onConnectionLost),o.subscribeEvents(),yield o.state.start(),o.initialized=!0})()}findRoom(n,o){var e=this;return f(function*(){if(yield e.pendingStateTransition(),e.state.current.findRoom)return yield e.state.current.findRoom.apply(e,[n,o]);throw e.errors.createErrorObject(et.EGamesPlayError.State)})()}cancelSearch(n,o){var e=this;return f(function*(){if(yield e.pendingStateTransition(),e.state.current.cancelSearch)return yield e.state.current.cancelSearch.apply(e,[n,o]);throw e.errors.createErrorObject(et.EGamesPlayError.State)})()}createRoom(n,o){var e=this;return f(function*(){if(yield e.pendingStateTransition(),e.state.current.createRoom)return yield e.state.current.createRoom.apply(e,[n,o]);throw e.errors.createErrorObject(et.EGamesPlayError.State)})()}invite(n,o){var e=this;return f(function*(){if(yield e.pendingStateTransition(),e.state.current.invite)return yield e.state.current.invite.apply(e,[n,o]);throw e.errors.createErrorObject(et.EGamesPlayError.State)})()}rematchRoom(n={},o){var e=this;return f(function*(){if(yield e.pendingStateTransition(),e.state.current.rematchRoom)return yield e.state.current.rematchRoom.apply(e,[n,o]);throw e.errors.createErrorObject(et.EGamesPlayError.State)})()}acceptInvite(n,o,e){var i=this;return f(function*(){if(yield i.pendingStateTransition(),i.state.current.acceptInvite)return yield i.state.current.acceptInvite.apply(i,[n,o,e]);throw i.errors.createErrorObject(et.EGamesPlayError.State)})()}cancelInvite(n,o,e){var i=this;return f(function*(){if(yield i.pendingStateTransition(),i.state.current.cancelInvite)return yield i.state.current.cancelInvite.apply(i,[n,o,e]);if(i.activeClientModel.currentRoom)return yield i.activeClientModel.currentRoom.cancelInvite(o);throw i.errors.createErrorObject(et.EGamesPlayError.State)})()}spectateRoom(n,o,e){var i=this;return f(function*(){if(yield i.pendingStateTransition(),i.state.current.spectateRoom)return yield i.state.current.spectateRoom.apply(i,[n,o,e]);throw i.errors.createErrorObject(et.EGamesPlayError.State)})()}joinRoom(n,o,e){var i=this;return f(function*(){if(yield i.pendingStateTransition(),i.state.current.joinRoom)return yield i.state.current.joinRoom.apply(i,[n,o,e]);throw i.errors.createErrorObject(et.EGamesPlayError.State)})()}leaveCurrentRoom(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.leaveCurrentRoom)return yield o.state.current.leaveCurrentRoom.apply(o,[n]);throw o.errors.createErrorObject(et.EGamesPlayError.State)})()}getPlayerState(n){var o=this;return f(function*(){const e=yield o.sdk.getPlayerState(n);return Kf(o.activeClientModel.knockoutState,e.knockoutTournamentState)||o.updateKnockoutState(e.knockoutTournamentState),e})()}getRoomList(n){this.namespaceClients.customLobby.getRoomList(n)}getRoomByCode(n,o){return this.namespaceClients.customLobby.getRoomByCode(n,o)}connectToCustomLobby(n={autoReconnect:!1}){var o=this;return f(function*(){const e=yield o.communicationService.connectToNamespace("".concat(o.channel,"-custom-lobby"),n),i=new dse(o.store);return i.useNamespace(e),o.namespaceClients.customLobby=i,e})()}reconnectToRoom(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.reconnectToRoom)return yield o.state.current.reconnectToRoom.apply(o,[n]);console.warn("Missing reconnect to room handler in current state")})()}subscribe(n,o){return this.sdk.subscribe(n,o)}once(n,o){this.sdk.once(n,o)}unsubscribe(n,o){this.sdk.unsubscribe(n,o)}subscribeRoomEvents(n){this.roomListeners.add(n.state.onTransition(this.onRoomStateTransition)),this.roomListeners.add(n.state.onTimeout(Ve.ERoomState.Init,()=>this.onRoomStateTimeout(Ve.ERoomState.Init))),this.roomListeners.add(n.state.onTimeout(Ve.ERoomState.Waiting,()=>this.onRoomStateTimeout(Ve.ERoomState.Waiting))),this.roomListeners.add(n.state.onTimeout(Ve.ERoomState.Ready,()=>this.onRoomStateTimeout(Ve.ERoomState.Ready))),this.roomListeners.add(n.state.onTimeout(Ve.ERoomState.Rematch,()=>this.onRoomStateTimeout(Ve.ERoomState.Rematch))),this.roomListeners.add(n.state.onTimeout(Ve.ERoomState.Finalize,()=>this.onRoomStateTimeout(Ve.ERoomState.Finalize))),this.roomListeners.add(n.state.onTimeout(bw.Desync,()=>this.onRoomStateTimeout(bw.Desync))),this.roomListeners.add(n.onMyTableUpdate(o=>this.stateEvents.emitTableUpdate({update:o,roomModel:n.getViewModel()}))),this.roomListeners.add(n.onDispose(this.onRoomDisposed)),this.roomListeners.add(n.onStatsUpdate(o=>this.stateEvents.emitStatsUpdate(o))),this.roomListeners.add(n.onPlayerMoved(()=>this.stateEvents.emitPlayerMoved()))}resetActiveClientModel(){this.activeClientModel.roomSearchModel=void 0,this.activeClientModel.currentRoom=void 0,this.activeClientModel.foundRoomModel=void 0,this.activeClientModel.acceptInviteModel=void 0,this.activeClientModel.spectateRoomModel=void 0}updateActiveClientModel(n){n.currentRoom&&(!this.activeClientModel.currentRoom||this.activeClientModel.currentRoom.id!==n.currentRoom.id)&&this.stateEvents.emitPlayerNewRoom(n.currentRoom);for(let o in n)o&&(this.activeClientModel[o]=n[o])}createGameRoom(n){const o=this.roomFactory.createRoom(this.currentPlayerId,n,this.channel);return this.updateActiveClientModel({currentRoom:o}),this.subscribeRoomEvents(o),o}joinInvitedRoom(n,o,e){var i=this;return f(function*(){try{let r;i.updateActiveClientModel({acceptInviteModel:{viewModel:n,args:o}}),yield i.state.to(yn.Active),i.activeClientModel.currentRoom?r=i.activeClientModel.currentRoom:(r=i.createGameRoom(n),yield r.state.start()),yield r.acceptInvite(o,e)}catch(r){const s=i.activeClientModel.currentRoom;throw s&&(r instanceof et.Timeout||r instanceof et.StateError)?n.id===s.id&&(yield s.dispose(),yield i.state.to(yn.Idle)):r instanceof lt.NetworkError||(yield i.state.to(yn.Idle)),r}})()}dispose(){var n=this;return f(function*(){n.state.current.dispose&&(yield n.state.current.dispose.apply(n)),n.roomListeners.forEach(o=>o.detach()),n.sdk&&(n.sdk.unsubscribeAll(),n.sdk.getCommunication().dispose()),n.namespaceClients.customLobby&&(n.namespaceClients.customLobby.unsubscribeAll(),n.namespaceClients.customLobby.getCommunication().dispose()),n.activeClientModel.currentRoom&&n.activeClientModel.currentRoom.dispose(),n.resetActiveClientModel(),yield n.state.destroy(),n.initialized=!1})()}setupStateMachine(){this.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(qP,WP,$P,iR,oR).setInitialState(qP).from(WP).to($P).from(WP).to(iR).from($P).to(WP).from($P).to(iR).fromAny().to(qP,oR).from(qP).toAny().from(oR).toAny().setStateContext(this).build(),this.state.logger.isEnabled=!0,this.state.logger.namespace="StateMachine - GamesClient"}pendingStateTransition(){var n=this;return f(function*(){n.state.pendingTransition&&(yield n.state.pendingTransition)})()}subscribeEvents(){this.state.onTransition(this.onClientStateTransition),this.state.onTimeout(yn.Idle,()=>this.onClientStateTimeout(yn.Idle)),this.state.onTimeout(yn.Searching,()=>this.onClientStateTimeout(yn.Searching)),this.state.onTimeout(yn.RoomFound,()=>this.onClientStateTimeout(yn.RoomFound)),this.state.onTimeout(yn.Active,()=>this.onClientStateTimeout(yn.Active)),this.state.onTimeout(yn.Desync,()=>this.onClientStateTimeout(yn.Desync)),this.subscribe(Ve.MatchmakingProtocol.Messages.RoomFound,this.onRoomFound),this.subscribe(Ve.MatchmakingProtocol.Messages.SessionTimeout,this.onPoolMatchTimeout),this.subscribe(Ve.MatchmakingProtocol.Messages.KnockoutStateUpdate,this.onKnockoutStateUpdate)}createTransitionEvent(n,o,e){return{object:n,from:o.stateName,to:e.stateName,data:this.buildActiveModel()}}createTimeoutEvent(n,o){return{object:n,state:o,data:this.buildActiveModel()}}buildActiveModel(){return{roomSearchModel:this.activeClientModel.roomSearchModel,currentRoom:this.activeClientModel.currentRoom,foundRoomModel:this.activeClientModel.foundRoomModel,acceptInviteModel:this.activeClientModel.acceptInviteModel,spectateRoomModel:this.activeClientModel.spectateRoomModel,knockoutState:this.activeClientModel.knockoutState}}updateKnockoutState(n){var o;const e=this.activeClientModel.knockoutState,i={...e,...n,tournamentWon:null!==(o=n.tournamentWon)&&void 0!==o&&o};this.activeClientModel.knockoutState=i,this.stateEvents.emitKnockoutStateUpdate({previous:e,current:i,gameName:this.channel})}}class GHe extends C4{constructor(n,o){super(),this.communicationService=n,this.channelId=o}connectToGameRoom(){var n=this;return new Promise(function(){var o=f(function*(e,i){const s=setTimeout(()=>{i(new et.Timeout("Connect to room timed out after 30000 ms!"))},3e4);try{n.communication=yield n.communicationService.connectToNamespace(n.channelId,{autoReconnect:!1});const a=u=>{n.communication.removeListener(Ve.ActiveRoomProtocol.Messages.ConnectOk,a),n.communication.removeListener(Ve.ActiveRoomProtocol.Messages.ConnectRejected,c),n.communication.removeListener("disconnect",c),clearTimeout(s),e(u)},c=()=>{n.communication.removeListener(Ve.ActiveRoomProtocol.Messages.ConnectOk,a),n.communication.removeListener(Ve.ActiveRoomProtocol.Messages.ConnectRejected,c),n.communication.removeListener("disconnect",c),clearTimeout(s),i(n.errors.createErrorObject(lt.Code.RoomConnectReject))};n.communication.once(Ve.ActiveRoomProtocol.Messages.ConnectOk,a),n.communication.once(Ve.ActiveRoomProtocol.Messages.ConnectRejected,c),n.communication.once("disconnect",c)}catch(a){clearTimeout(s),i(a)}});return function(e,i){return o.apply(this,arguments)}}())}start(){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.StartRoom})}join(n){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.JoinRoom},[n])}rematch(n){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.Rematch})}spectate(n,o){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.SpectatorJoin},[n,o])}leave(n,o){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.LeaveRoom},[n],o)}ban(n){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.BanPlayer},[n])}invite(n,o){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.InvitePlayer},[n,o])}cancelInvite(n,o){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.InviteCancel},[n,o])}ready(){return this.request({ack:Bd.Cmd,cmd:Ve.ActiveRoomProtocol.Messages.PlayerReady})}}class hse extends Do.AsyncState{}hse.stateName=Ve.ETableState.Waiting;class mse extends Do.AsyncState{}mse.stateName=Ve.ETableState.Ready;class fse extends Do.AsyncState{}fse.stateName=Ve.ETableState.Gameplay;class gse extends Do.AsyncState{}gse.stateName=Ve.ETableState.Ended;class Nd{constructor(n,o){var e=this;this.onTableUpdate=function(){var i=f(function*(r){e.state.pendingTransition&&(yield e.state.pendingTransition),e.updateModel(r),e.state.current.stateName!==r.state&&(yield e.state.to(r.state))});return function(r){return i.apply(this,arguments)}}(),this.id=n.id,this.viewModel=n,this.gameService=o,this.listeners=new ie.List,this.events=new tc}static getTournamentRound(n){return 0===n?1:n}getViewModel(){return this.viewModel}getPlayers(){return this.getViewModel().seats.filter(n=>null!=n.player||null!=n.reserved).map(n=>n.player?n.player:n.reserved)}startGame(n,o){this.gameService.startGame(n,o,this.isSpectating)}useNamespace(n){this.gameService.useNamespace(n)}changeInGameSettings(n){this.gameService.changeInGameSettings(n)}sendInGameMessage(n){this.gameService.sendInGameMessage(n)}onConnectionLost(){this.gameService.onConnectionLost()}onGameLoaded(n){return this.createAndKeepListener(_i.GameLoaded,this.gameService.events,n)}onClientException(n){return this.createAndKeepListener(_i.GameException,this.gameService.events,n)}onTransition(...n){return this.state.onTransition(n[0],n[1],n[2])}onStateEnter(n,o){return this.state.onEnter(n,o)}onDispose(n){return this.createAndKeepListener("dispose",this.events,n)}get gameState(){return this.gameService.gameState}dispose(){var n=this;return f(function*(){n.destroyGame(),n.listeners.forEach(o=>o.detach()),yield n.state.destroy(),n.destroyed=!0,n.events.emit("dispose"),n.events.removeAllListeners()})()}destroyGame(){this.gameService.dispose()}reloadGame(n,o){this.gameService.reloadGame(n,o,this.isSpectating)}updateModel(n){lo.updateModel(n,this.viewModel),this.gameService.onTableUpdate(this.getViewModel())}createAndKeepListener(n,o,e){const i=new ie.EventListener(o,n,e);return this.listeners.add(i),i}}class VHe{constructor(n){this.gameService=n}createGameTable(n,o=Ve.ETableState.Waiting){const e=new Nd(n,this.gameService),i=new ie.List([hse,mse,fse,gse]);return e.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(...i).setInitialState(i.where(r=>r.stateName===o).first()).fromAny().toAny().build(),e.state.logger.isEnabled=!0,e.state.logger.namespace="StateMachine - Table",e}}class Lm{constructor(n,o,e){this.handler=n,this.args=o,this.context=e}}class S4{constructor(){this.queue=new w_,this.processing=!1,this.lastMessage=void 0}add(n){console.warn("Message add",n),this.queue.add(n),!1===this.processing&&this.processNextMessage()}clear(){console.warn("Clearing message queue"),this.queue.clear(),console.warn("Message queue",this.queue)}messageProcessed(){console.warn("Message processed",this.lastMessage),this.processing=!1,this.queue.length>0&&this.processNextMessage()}processNextMessage(){this.processing=!0,this.lastMessage=this.queue.first(),console.warn("Processing message",this.lastMessage),this.lastMessage.handler.apply(this.lastMessage.context,[this.lastMessage.args])}}let Oh=w4=class{constructor(n,o,e,i,r,s,a,c){var u=this;this.constants=c,this.onRoomUpdate=function(){var h=f(function*(b){u.messageQueue.add(new Lm(f(function*(){try{yield u.pendingStateTransition()}catch(w){console.warn("Pending transition failed",w)}if(u.updateViewModel(b),u.state.current.onRoomUpdate)yield u.state.current.onRoomUpdate.apply(u,[b]);else if(b.state!==u.state.current.stateName)try{yield u.state.to(b.state)}catch(w){console.warn(w)}u.messageProcessed()})))});return function(b){return h.apply(this,arguments)}}(),this.onNamespaceDisconnect=function(){var h=f(function*(b){u.messageQueue.add(new Lm(f(function*(){try{yield u.pendingStateTransition()}catch(w){console.warn("Pending transition failed",w)}b===Ds.ServerDisconnect&&(u.state.current.onNamespaceDisconnect?yield u.state.current.onNamespaceDisconnect.apply(u,[b]):u.dispose().then(()=>{u.navigationService.getOutletUrl()==="/".concat(u.roomPages.gamePage)&&u.returnPlayerToLobby()})),u.messageProcessed()})))});return function(b){return h.apply(this,arguments)}}(),this.onRoomDestroy=function(){var h=f(function*(b){u.messageQueue.add(new Lm(f(function*(){try{yield u.pendingStateTransition()}catch(w){console.warn("Pending transition failed",w)}u.state.current.onRoomDestroy?yield u.state.current.onRoomDestroy.apply(u,[b]):u.dispose(b.reason).then(()=>u.returnPlayerToLobby()),u.messageProcessed()})))});return function(b){return h.apply(this,arguments)}}(),this.onGameEnded=f(function*(){u.messageQueue.add(new Lm(f(function*(){try{yield u.pendingStateTransition()}catch(h){console.warn("Pending transition failed",h)}u.state.current.onGameEnded?yield u.state.current.onGameEnded.apply(u):u.currentTable&&(yield u.currentTable.destroyGame()),u.messageProcessed()})))}),this.onGameLoaded=f(function*(){u.messageQueue.add(new Lm(f(function*(){try{yield u.pendingStateTransition()}catch(h){console.warn("Pending transition failed",h)}u.state.current.onGameLoaded&&(yield u.state.current.onGameLoaded.apply(u)),u.messageProcessed()})))}),this.handleMyTableUpdate=function(){var h=f(function*(b){u.messageQueue.add(new Lm(f(function*(){try{yield u.pendingStateTransition()}catch(w){console.warn(w)}u.updateViewModel({tables:[b]}),u.state.current.handleMyTableUpdate?yield u.state.current.handleMyTableUpdate.apply(u,[b]):u.currentTable&&(yield u.currentTable.onTableUpdate(b)),u.messageProcessed()})))});return function(b){return h.apply(this,arguments)}}(),this.onMessage=(h,b)=>{"force_disconnect"===h&&this.events.emit("kicked",b)},this.reemitRoomUpdate=(h,b)=>{this.events.emit(Ve.ActiveRoomProtocol.Messages.RoomUpdate,h,b)},this.reemitMyGameUpdate=h=>{this.events.emit(Ve.ActiveRoomProtocol.Messages.MyGameUpdate,h)},this.reemitStatsUpdate=h=>{this.events.emit(Ve.ActiveRoomProtocol.Messages.StatsUpdate,h)},this.reemitPlayerMoved=h=>{this.events.emit(Ve.ActiveRoomProtocol.Messages.PlayerMoved,h)},this.reemitSpectatorsCountUpdate=h=>{this.events.emit(Ve.ActiveRoomProtocol.Messages.SpectatorsCountUpdate,h)},this.reemitRematchAsked=h=>{this.events.emit(Ve.ActiveRoomProtocol.Messages.Rematch,h)},this.id=o.id,this.type=o.type,this.playerId=n,this.gameName=a,this.viewModel={id:o.id,settings:{type:o.type}},this.sdk=new GHe(e,o.id),this.gameTableFactory=new VHe(i),this.navigationService=r,this.roomPages=s,this.messageQueue=new S4,this.events=new tc,this.errors=new tR,this.listeners=new ie.List}tryConnectToServer(){return this.sdk.connectToGameRoom()}start(){var n=this;return f(function*(){if(yield n.pendingStateTransition(),n.state.current.start)return yield n.state.current.start.apply(n);throw console.warn("Missing start handler in ".concat(n.state.current.stateName)),n.errors.createErrorObject(et.EGamesPlayError.State)})()}join(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.join){const e=yield o.state.current.join.apply(o,[n]);return o.updateViewModel(e),o.subscribeForEvents(),o.isSpectating=!1,e}throw console.warn("Missing join handler in ".concat(o.state.current.stateName)),o.errors.createErrorObject(et.EGamesPlayError.State)})()}rematch(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.rematch)return yield o.state.current.rematch.apply(o,[n]);throw console.warn("Missing rematch handler in ".concat(o.state.current.stateName)),o.errors.createErrorObject(et.EGamesPlayError.State)})()}spectate(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.spectate){var e;o.updateViewModel({invitationCode:n.roomCode||(null===(e=o.getViewModel())||void 0===e?void 0:e.invitationCode)});const i=yield o.state.current.spectate.apply(o,[n]);return o.subscribeForEvents(),i}throw console.warn("Missing spectate handler in ".concat(o.state.current.stateName)),o.errors.createErrorObject(et.EGamesPlayError.State)})()}leave(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),!o.state.current.leave)throw console.warn("Missing leave handler in ".concat(o.state.current.stateName)),o.errors.createErrorObject(et.EGamesPlayError.State);yield o.state.current.leave.apply(o,[n])})()}leaveGame(n){var o=this;return f(function*(){if(yield o.pendingStateTransition,!o.state.current.leaveGame)throw console.warn("Missing leaveGame handler in ".concat(o.state.current.stateName)),o.errors.createErrorObject(et.EGamesPlayError.State);yield o.state.current.leaveGame.apply(o,[n])})()}ban(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.ban)return yield o.state.current.ban.apply(o,[n]);console.warn("Missing ban handler in ".concat(o.state.current.stateName))})()}ready(){return this.sdk.ready()}sendSpectateMessage(n,o){var e=this;return f(function*(){let i;try{var r;i=yield e.sdk.spectate({...n,roomCode:n.roomCode||(null===(r=e.getViewModel())||void 0===r?void 0:r.invitationCode)},o)}catch(s){if(!(s instanceof et.Duplication))throw s;i=s.payload}return e.updateViewModel(i),i})()}sendLeaveMessage(n,o){return this.sdk.leave({currentClientTableStateName:this.currentTable?this.currentTable.state.current.stateName:void 0,currentClientRoomStateName:this.state.current.stateName,onlyLeaveTable:n.onlyLeaveTable},o)}invite(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.invite)return yield o.state.current.invite.apply(o,[n]);console.warn("Missing invite handler in ".concat(o.state.current.stateName))})()}acceptInvite(n,o){var e=this;return f(function*(){if(yield e.pendingStateTransition(),e.state.current.acceptInvite)return n.inviteAccepted=!0,yield e.state.current.acceptInvite.apply(e,[n,o]);throw console.warn("Missing accept invite handler in ".concat(e.state.current.stateName)),e.errors.createErrorObject(et.EGamesPlayError.State)})()}cancelInvite(n){var o=this;return f(function*(){if(yield o.pendingStateTransition(),o.state.current.cancelInvite)return yield o.state.current.cancelInvite.apply(o,[n]);console.warn("Missing cancel invite handler in ".concat(o.state.current.stateName))})()}getViewModel(){return this.viewModel}onConnectionLost(){var n=this;return f(function*(){n.messageQueue.add(new Lm(f(function*(){try{yield n.pendingStateTransition()}catch(o){console.warn("Pending transition failed",o)}if(n.sdk.getCommunication()&&n.unsubscribeFromEvents(),n.currentTable&&n.currentTable.onConnectionLost(),n.state.current.onConnectionLost)yield n.state.current.onConnectionLost.apply(n);else if(n.state.current.stateName!==bw.Desync)try{yield n.state.to(bw.Desync)}catch(o){console.warn(o)}n.clearMessageQueue(),n.messageProcessed()})))})()}onBeforeUnload(){var n=this;return f(function*(){try{yield n.pendingStateTransition()}catch(o){console.warn("Pending transition failed",o)}n.state.current.onBeforeUnload&&n.state.current.onBeforeUnload.apply(n)})()}subscribeForEvents(){this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.RoomUpdate,this.onRoomUpdate),this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.MyGameUpdate,this.handleMyTableUpdate),this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.MyGameUpdate,this.reemitMyGameUpdate),this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.StatsUpdate,this.reemitStatsUpdate),this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.PlayerMoved,this.reemitPlayerMoved),this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.SpectatorsCountUpdate,this.reemitSpectatorsCountUpdate),this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.Rematch,this.reemitRematchAsked)}subscribeForProtocolMessages(){this.sdk.subscribe(Ve.ActiveRoomProtocol.Messages.RoomDestroyed,this.onRoomDestroy),this.sdk.subscribe("message",this.onMessage),this.sdk.subscribe("disconnect",this.onNamespaceDisconnect)}unsubscribeFromEvents(){this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.RoomUpdate,this.onRoomUpdate),this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.RoomDestroyed,this.onRoomDestroy),this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.MyGameUpdate,this.handleMyTableUpdate),this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.MyGameUpdate,this.reemitMyGameUpdate),this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.StatsUpdate,this.reemitStatsUpdate),this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.PlayerMoved,this.reemitPlayerMoved),this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.SpectatorsCountUpdate,this.reemitSpectatorsCountUpdate),this.sdk.unsubscribe(Ve.ActiveRoomProtocol.Messages.Rematch,this.reemitRematchAsked),this.sdk.unsubscribe("message",this.onMessage),this.sdk.unsubscribe("disconnect",this.onNamespaceDisconnect)}onConnectionRestored(){var n=this;return f(function*(){n.messageQueue.add(new Lm(f(function*(){try{yield n.pendingStateTransition()}catch(o){console.warn("Pending transition failed",o)}n.state.current.onConnectionRestored&&(yield n.state.current.onConnectionRestored.apply(n)),n.messageProcessed()})))})()}dispose(n){var o=this;return this.pendingDestroy?this.pendingDestroy:this.destroyed?Promise.resolve():(this.pendingDestroy=new Promise(function(){var e=f(function*(i){o.clearMessageQueue(),o.messageQueue.add(new Lm(f(function*(){try{yield o.pendingStateTransition()}catch(r){console.warn(r)}o.state.current.dispose&&(yield o.state.current.dispose.apply(o,[n])),o.sdk.getCommunication()&&(o.sdk.unsubscribeAll(),o.sdk.getCommunication().dispose()),o.clearMessageQueue(),o.currentTable&&o.currentTable.dispose(),o.currentTable=void 0,o.events.dispatchEvent(new CA("dispose",{id:o.id,reason:n})),o.events.removeAllListeners(),o.listeners.forEach(r=>r.detach()),o.reconnecting=!1,yield o.state.destroy(),o.destroyed=!0,i(),o.pendingDestroy=void 0,o.messageProcessed()})))});return function(i){return e.apply(this,arguments)}}()),this.pendingDestroy)}clearMessageQueue(){this.messageQueue.clear()}messageProcessed(){this.messageQueue.messageProcessed()}returnPlayerToLobby(){var n=this;return f(function*(){return yield n.navigationService.navigateTo(n.roomPages.createRoomReturnPage(n.getViewModel().settings.type,n.gameName,n.getViewModel()))})()}setAsReconnecting(){this.reconnecting=!0}set isSpectating(n){n!==this.isSpectating&&(this._isSpectating=n,this.events.emit("spectate",this.isSpectating))}get isSpectating(){return this._isSpectating}onKicked(n){return this.createAndKeepListener(this.events,"kicked",n)}onDispose(n){return this.createAndKeepListener(this.events,"dispose",n)}onUpdate(n){return this.createAndKeepListener(this.events,Ve.ActiveRoomProtocol.Messages.RoomUpdate,n)}onSpectate(n){return this.createAndKeepListener(this.events,"spectate",n)}onMyTableUpdate(n){return this.createAndKeepListener(this.events,Ve.ActiveRoomProtocol.Messages.MyGameUpdate,n)}onStatsUpdate(n){return this.createAndKeepListener(this.events,Ve.ActiveRoomProtocol.Messages.StatsUpdate,n)}onPlayerMoved(n){return this.createAndKeepListener(this.events,Ve.ActiveRoomProtocol.Messages.PlayerMoved,n)}updateViewModel(n){lo.updateModel(n,this.viewModel),this.reemitRoomUpdate(n,this.getViewModel())}pendingStateTransition(){var n=this;return f(function*(){n.state.pendingTransition&&(yield n.state.pendingTransition)})()}createTable(n,o){var e=this;return f(function*(){const i=e.gameTableFactory.createGameTable(n,o);return yield i.state.start(),i.useNamespace(e.sdk.getCommunication()),i})()}setCurrentTable(n){this.currentTable=n,this.currentTable.onTableUpdate(n.getViewModel())}startGame(n){n.startGame(this.getViewModel(),n.getViewModel()),n.onGameLoaded(this.onGameLoaded),n.onStateEnter(Ve.ETableState.Ended,this.onGameEnded)}getActiveTableReservedSeat(){let n;const o=this.viewModel.tables.find(e=>{if(e.state===Ve.ETableState.Ended)return!1;const i=e.seats.find(r=>r.reserved&&r.reserved.id===this.playerId);return n=i,void 0!==i});if(o&&n)return{table:o,seat:n}}createAndKeepListener(n,o,e){const i=new ie.EventListener(n,o,e);return this.listeners.add(i),i}static getPlayersCount(n){return n.tables.filter(o=>1===Nd.getTournamentRound(o.tournamentRound)).reduce((o,e)=>o+e.seats.filter(i=>!!i.player).length,0)}static getPlayers(n){const o=[];return n.tables.filter(e=>1===Nd.getTournamentRound(e.tournamentRound)).map(e=>e.seats.filter(i=>!!i.player).forEach(i=>o.push(i.player))),o}static isFull(n){return w4.getPlayersCount(n)===n.settings.players.count}};Oh=w4=Qe([Fx(7,jy(tn)),ue("design:paramtypes",[String,Object,Object,Object,Object,Object,String,Object])],Oh);class _c extends Do.AsyncState{onEnter(){var n=this;return f(function*(){const o=yield n.tryConnectToServer();n.updateViewModel(o);const e=()=>{n.reconnecting=!1};n.state.to(o.state).then(e).catch(e),n.subscribeForProtocolMessages(),n.reconnecting&&n.subscribeForEvents()})()}onError(n){var o=this;return f(function*(){if(o.destroyed)throw n;throw o.reconnecting=!1,n===Ds.ServerDisconnect?o.onNamespaceDisconnect(n):(n instanceof et.Timeout||n instanceof lt.RoomConnectReject)&&o.dispose(n instanceof et.Timeout?io.ActionTimeout:void 0).then(()=>{o.navigationService.getOutletUrl()==="/".concat(o.constants.gameRoute)&&o.returnPlayerToLobby()}),n})()}}_c.stateName=Ve.ERoomState.Init;class R_ extends Do.AsyncState{join(n){var o=this;return f(function*(){const e=yield o.sdk.join(n),i=o.getViewModel().tables.find(s=>s.id===n.tableId),r=yield o.createTable(i,i.state);return o.setCurrentTable(r),e})()}leave(n){var o=this;return f(function*(){try{yield o.sendLeaveMessage({onlyLeaveTable:!1},n),yield o.dispose(io.LeaveRoom)}catch(e){if(!(e instanceof et.Timeout))throw e;yield o.dispose()}})()}leaveGame(n){var o=this;return f(function*(){try{yield o.sendLeaveMessage({onlyLeaveTable:!0},n),o.isSpectating=!0;const e=o.roomPages.createRoomPage(o.getViewModel().settings.type,o.gameName,o.getViewModel());o.navigationService.navigateTo(e)}catch(e){if(!(e instanceof et.Timeout||e instanceof et.UnsupportedOperation))throw e;yield o.dispose(),o.returnPlayerToLobby()}})()}}R_.stateName=Ve.ERoomState.Waiting;class Eh extends Do.AsyncState{onEnter(){var n=this;return f(function*(){const o=n.state.getCurrentState();if(o.gameLoadedReconnectData=void 0,n.currentTable){let e;if(e=n.isSpectating?n.getViewModel().tables.find(i=>i.id===n.currentTable.id):lo.findLastPlayerTable(n.playerId,n.getViewModel().tables),yield n.currentTable.onTableUpdate(e),n.currentTable.gameState===_o.LoadingResources||n.currentTable.gameState===_o.GameLoading)o.gameLoadedReconnectData={tableId:n.currentTable.id,isSpectating:n.isSpectating},n.currentTable.reloadGame(n.getViewModel(),n.currentTable.getViewModel());else if(n.currentTable.gameState===_o.Ready)try{n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({tableId:n.currentTable.id,roomCode:n.getViewModel().invitationCode})),e.state!==Ve.ETableState.Ended&&(yield n.ready())}catch(i){console.warn(i),(i instanceof et.Timeout||i instanceof et.UnsupportedOperation)&&n.dispose(i instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}else n.startGame(n.currentTable)}else{const e=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(e){const i=yield n.createTable(e,e.state);switch(n.setCurrentTable(i),e.state){case Ve.ETableState.Ready:case Ve.ETableState.Gameplay:n.startGame(n.currentTable);break;case Ve.ETableState.Ended:n.reconnecting&&(yield n.navigationService.navigateTo(n.constants.gameRoute));break;default:yield n.navigationService.navigateTo(n.constants.gameRoute)}}}})()}rematch(n){var o=this;return f(function*(){try{o.currentTable&&(yield o.currentTable.dispose()),yield o.sdk.rematch(n);const e=o.getViewModel().tables[o.getViewModel().tables.length-1],i=yield o.createTable(e,e.state);o.setCurrentTable(i),o.rematchTable=i;const r=()=>{o.rematchTable=void 0,s&&s.detach(),a&&a.detach()},s=i.onTransition(r),a=i.onDispose(r)}catch(e){if(!(e instanceof et.Timeout))throw e;o.dispose(io.ActionTimeout).then(()=>o.returnPlayerToLobby())}})()}leave(n){var o=this;return f(function*(){try{yield o.sendLeaveMessage({onlyLeaveTable:!1},n),yield o.dispose(io.LeaveRoom)}catch(e){if(!(e instanceof et.Timeout||e instanceof et.UnsupportedOperation))throw e;yield o.dispose()}})()}leaveGame(n){var o=this;return f(function*(){try{yield o.sendLeaveMessage({onlyLeaveTable:o.isSpectating},n),yield o.dispose(io.LeaveRoom),o.returnPlayerToLobby()}catch(e){if(!(e instanceof et.Timeout||e instanceof et.UnsupportedOperation))throw e;yield o.dispose(),o.returnPlayerToLobby()}})()}onGameLoaded(){var n=this;return f(function*(){try{const o=n.state.getCurrentState(),e=o.gameLoadedReconnectData;e&&e.isSpectating&&e.tableId===n.currentTable.id&&(yield n.spectate({tableId:n.currentTable.id,roomCode:n.getViewModel().invitationCode})),o.gameLoadedReconnectData=void 0,yield n.ready()}catch(o){(o instanceof et.Timeout||o instanceof et.UnsupportedOperation)&&n.dispose(o instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}})()}handleMyTableUpdate(n){var o=this;return f(function*(){if(o.currentTable&&o.currentTable.getViewModel().id!==n.id&&(yield o.currentTable.dispose(),o.currentTable=void 0),!o.currentTable){const r=o.getViewModel().tables.find(a=>a.id===n.id),s=yield o.createTable(r,n.state);o.setCurrentTable(s)}yield o.currentTable.onTableUpdate(n);const e=o.currentTable.getViewModel().state,i=o.currentTable.gameState;(e===Ve.ETableState.Gameplay||e===Ve.ETableState.Ready)&&(i===_o.Disposed||i===_o.Initial)&&o.startGame(o.currentTable)})()}}Eh.stateName=Ve.ERoomState.Ready;class Jl extends Do.AsyncState{leave(n){var o=this;return f(function*(){o.dispose(io.LeaveRoom).then(()=>o.returnPlayerToLobby())})()}leaveGame(n){var o=this;return f(function*(){o.dispose(io.LeaveRoom).then(()=>o.returnPlayerToLobby())})()}onRoomDestroy(n){var o=this;return f(function*(){const e=o.currentTable,i=o.rematchTable;e&&e.state.is(Ve.ETableState.Ended)&&!i||e&&e.state.is(Ve.ETableState.Waiting)&&i&&e.id===i.id?console.warn("Ignore room destroy"):o.dispose().then(()=>o.returnPlayerToLobby())})()}}Jl.stateName=Ve.ERoomState.Finalize;class Fa extends Do.AsyncState{onConnectionRestored(){var n=this;return f(function*(){try{n.setAsReconnecting(),yield n.state.to(Ve.ERoomState.Init)}catch(o){console.warn(o)}})()}}Fa.stateName=bw.Desync;class rR extends R_{ban(n){return this.sdk.ban(n)}onBeforeUnload(){this.state.current.leave().catch(n=>console.warn(n))}start(){var n=this;return f(function*(){try{yield n.sdk.start()}catch(o){if(!(o instanceof et.Timeout))throw o;n.dispose(io.ActionTimeout).then(()=>n.returnPlayerToLobby())}})()}invite(n,o){var e=this;return f(function*(){try{yield e.sdk.invite(n,o)}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}acceptInvite(n,o){var e=this;return f(function*(){let i=n.tableId;var r;i||(i=null===(r=e.getViewModel().tables.find(a=>!!lo.getFirstFreeSeat(a)))||void 0===r?void 0:r.id),yield e.join({...n,tableId:i});const s=e.roomPages.createRoomPage(e.getViewModel().settings.type,e.gameName,e.getViewModel());yield e.navigationService.navigateTo(s,{ignoreGuards:!0})})()}cancelInvite(n,o){var e=this;return f(function*(){try{yield e.sdk.cancelInvite(n,o)}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}}rR.stateName=Ve.ERoomState.Waiting;class Jf extends Eh{onEnter(){var n=this;return f(function*(){const o=n.state.getCurrentState();if(o.gameLoadedReconnectData=void 0,n.currentTable){let e;if(e=n.isSpectating?n.getViewModel().tables.find(i=>i.id===n.currentTable.id):lo.findLastPlayerTable(n.playerId,n.getViewModel().tables),yield n.currentTable.onTableUpdate(e),n.currentTable.gameState===_o.LoadingResources||n.currentTable.gameState===_o.GameLoading)o.gameLoadedReconnectData={tableId:n.currentTable.id,isSpectating:n.isSpectating},n.currentTable.reloadGame(n.getViewModel(),n.currentTable.getViewModel());else if(n.currentTable.gameState===_o.Ready)try{n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({tableId:n.currentTable.id,roomCode:n.getViewModel().invitationCode})),e.state!==Ve.ETableState.Ended&&(yield n.ready())}catch(i){console.warn(i),(i instanceof et.Timeout||i instanceof et.UnsupportedOperation)&&n.dispose(i instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}else{if(n.isSpectating&&e.state===Ve.ETableState.Ended)return;if(n.reconnecting)n.startGame(n.currentTable);else{const i=n.getViewModel().settings.timers.readyStateStartTimer;n.state.getCurrentState().startGameAfterDelay.apply(n,[i])}}}else{const e=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(e){const i=yield n.createTable(e,e.state);switch(n.setCurrentTable(i),e.state){case Ve.ETableState.Ready:case Ve.ETableState.Gameplay:if(n.reconnecting)n.startGame(n.currentTable);else{const r=n.getViewModel().settings.timers.readyStateStartTimer;n.state.getCurrentState().startGameAfterDelay.apply(n,[r])}break;case Ve.ETableState.Ended:n.reconnecting&&(yield n.navigationService.navigateTo(n.constants.gameRoute));break;default:yield n.navigationService.navigateTo(n.constants.gameRoute)}}}})()}spectate(n,o){var e=this;return f(function*(){const i=yield e.sendSpectateMessage(n,o);e.isSpectating=!0;const r=e.getViewModel().tables.find(a=>a.id===n.tableId),s=yield e.createTable(r,r.state);return e.setCurrentTable(s),e.currentTable.isSpectating=!0,e.startGame(e.currentTable),i})()}ban(n){var o=this;return f(function*(){return o.sdk.ban(n)})()}onExit(){var n=()=>super.onExit,o=this;return f(function*(){yield n().call(o),clearTimeout(o.state.getCurrentState().gameStartDelayId)})()}startGameAfterDelay(n){this.state.getCurrentState().gameStartDelayId=setTimeout(()=>{this.startGame(this.currentTable)},n)}dispose(){clearTimeout(this.state.getCurrentState().gameStartDelayId)}}Jf.stateName=Ve.ERoomState.Ready;var sR=function(t){return t.roomFoundNavigationDelayMs=4e3,t.blitzLobbyNavigationDelayMs=1e4,t}(sR||{});class Bb extends Eh{onEnter(){var n=this;return f(function*(){const o=n.state.getCurrentState();o.gameLoadedReconnectData=void 0;const e=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(n.currentTable)if(yield n.currentTable.onTableUpdate(e),n.currentTable.gameState===_o.LoadingResources||n.currentTable.gameState===_o.GameLoading)o.gameLoadedReconnectData={tableId:n.currentTable.id,isSpectating:n.isSpectating},n.currentTable.reloadGame(n.getViewModel(),n.currentTable.getViewModel());else if(n.currentTable.gameState===_o.Ready)try{n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({tableId:n.currentTable.id,roomCode:n.getViewModel().invitationCode})),e.state!==Ve.ETableState.Ended&&(yield n.ready())}catch(i){console.warn(i),(i instanceof et.Timeout||i instanceof et.UnsupportedOperation)&&n.dispose(i instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}else n.reconnecting?n.startGame(n.currentTable):o.startGameAfterDelay.apply(n);else if(e){const i=yield n.createTable(e,e.state);switch(n.setCurrentTable(i),e.state){case Ve.ETableState.Ready:case Ve.ETableState.Gameplay:n.reconnecting?n.startGame(n.currentTable):o.startGameAfterDelay.apply(n);break;case Ve.ETableState.Ended:n.reconnecting&&(yield n.navigationService.navigateTo(n.constants.gameRoute));break;default:yield n.navigationService.navigateTo(n.constants.gameRoute)}}})()}onExit(){var n=this;return f(function*(){n.state.getCurrentState().clearDelayTimer()})()}clearDelayTimer(){clearTimeout(this.gameStartDelayId)}startGameAfterDelay(){this.state.getCurrentState().gameStartDelayId=setTimeout(()=>{this.startGame(this.currentTable)},sR.roomFoundNavigationDelayMs)}dispose(){this.state.getCurrentState().clearDelayTimer()}}Bb.stateName=Ve.ERoomState.Ready;class Nb extends Eh{onEnter(){var n=this;return f(function*(){n.stayAsSpectatorIfKickedOnDisconnect=!1;const o=n.roomPages.createRoomPage(n.getViewModel().settings.type,n.gameName,n.getViewModel());n.state.getCurrentState().roomPage=o;const e=lo.findPlayerActiveTable(n.playerId,n.getViewModel().tables),i=n.state.getCurrentState();if(i.gameLoadedReconnectData=void 0,n.currentTable)if(e)if(n.currentTable.getViewModel().id===e.id)if(yield n.currentTable.onTableUpdate(e),n.currentTable.gameState===_o.LoadingResources||n.currentTable.gameState===_o.GameLoading)i.gameLoadedReconnectData={tableId:n.currentTable.id,isSpectating:n.isSpectating},n.currentTable.reloadGame(n.getViewModel(),n.currentTable.getViewModel());else if(n.currentTable.gameState===_o.Ready)try{n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({tableId:n.currentTable.id,roomCode:n.getViewModel().invitationCode})),yield n.ready()}catch(r){console.warn(r),(r instanceof et.Timeout||r instanceof et.UnsupportedOperation)&&n.dispose(r instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}else yield n.navigationService.navigateTo(o),i.startGameAfterDelay.apply(n);else{n.currentTable.dispose(),n.currentTable=void 0,yield n.navigationService.navigateTo(o);const r=yield n.createTable(e,e.state);n.setCurrentTable(r),i.startGameAfterDelay.apply(n)}else n.currentTable.dispose(),n.currentTable=void 0,yield n.navigationService.navigateTo(o);else if(e){const r=yield n.createTable(e,e.state);n.setCurrentTable(r),n.currentTable.state.is(Ve.ETableState.Gameplay)?n.startGame(n.currentTable):(yield new Promise((s,a)=>setTimeout(()=>s())),yield n.navigationService.navigateTo(o),i.startGameAfterDelay.apply(n))}else yield new Promise((r,s)=>setTimeout(()=>r())),n.getViewModel().hostId||(yield n.navigationService.navigateTo(o)),n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({roomCode:n.getViewModel().invitationCode}))})()}onExit(){var n=()=>super.onExit,o=this;return f(function*(){yield n().call(o),clearTimeout(o.state.getCurrentState().gameStartDelayId)})()}spectate(n,o){var e=this;return f(function*(){const i=yield e.sendSpectateMessage(n,o);e.isSpectating=!0;const r=i.tables.find(s=>s.id===n.tableId);if(r){const s=yield e.createTable(r,r.state);e.setCurrentTable(s),yield e.currentTable.onTableUpdate(s.getViewModel()),e.currentTable.isSpectating=!0,e.startGame(e.currentTable)}else yield e.navigationService.navigateTo(e.state.getCurrentState().roomPage);return i})()}handleMyTableUpdate(n){var o=this;return f(function*(){const e=o.state.getCurrentState(),i=e.nextTable;if(o.currentTable)o.currentTable.getViewModel().id===n.id?yield o.currentTable.onTableUpdate(n):i?yield i.onTableUpdate(n):e.nextTable=yield o.createTable(n,n.state);else{if(i)yield i.onTableUpdate(n),e.nextTable=void 0,yield o.currentTable.dispose(),o.setCurrentTable(i);else{const r=yield o.createTable(n,n.state);o.setCurrentTable(r)}e.startGameAfterDelay.apply(o)}})()}onGameEnded(){var n=this;return f(function*(){n.currentTable.destroyGame()})()}leaveGame(n){var o=this;return f(function*(){var e,i,r;if(o.currentTable&&!o.isSpectating&&(o.currentTable.state.is(Ve.ETableState.Ready)||o.currentTable.state.is(Ve.ETableState.Gameplay)))return yield o.state.getCurrentState().leave.apply(o,[n]),void o.returnPlayerToLobby();o.isSpectating?yield o.sendLeaveMessage({onlyLeaveTable:!0},n):null!==(r=o.currentTable.getViewModel())&&void 0!==r&&null!==(r=r.gameResult)&&void 0!==r&&r.losers.find(h=>h===o.playerId)&&(o.isSpectating=!0);const s=null===(e=o.currentTable)||void 0===e?void 0:e.id;yield null===(i=o.currentTable)||void 0===i?void 0:i.dispose(),o.currentTable=void 0,yield o.navigationService.navigateTo(o.state.getCurrentState().roomPage,{state:{tableId:s}});const a=o.state.getCurrentState(),c=a.nextTable;c&&(a.nextTable=void 0,o.setCurrentTable(c),a.startGameAfterDelay.apply(o))})()}startGameAfterDelay(){this.state.getCurrentState().gameStartDelayId=setTimeout(()=>{this.startGame(this.currentTable)},sR.blitzLobbyNavigationDelayMs)}dispose(){clearTimeout(this.state.getCurrentState().gameStartDelayId)}}Nb.stateName=Ve.ERoomState.Ready;class T4 extends Jl{onEnter(){var n=this;return f(function*(){if(n.stayAsSpectatorIfKickedOnDisconnect=!1,n.getViewModel().tables.some(o=>o.state!==Ve.ETableState.Ended))setTimeout(()=>{n.dispose(io.RoomNoActivePlayers).then(()=>n.returnPlayerToLobby())});else if(!n.currentTable){const o=n.roomPages.createRoomPage(n.getViewModel().settings.type,n.gameName,n.getViewModel());n.navigationService.navigateTo(o)}})()}leave(n){var o=this;return f(function*(){o.dispose(io.LeaveRoom).then(()=>o.returnPlayerToLobby())})()}leaveGame(n){var o=this;return f(function*(){o.currentTable&&(yield o.currentTable.dispose(),o.currentTable=void 0);const e=o.roomPages.createRoomPage(o.getViewModel().settings.type,o.gameName,o.getViewModel());o.navigationService.navigateTo(e)})()}onRoomDestroy(n){var o=this;return f(function*(){o.state.getCurrentState().destroyed=!0,o.isSpectating&&o.currentTable&&!o.currentTable.state.is(Ve.ETableState.Ended)&&o.leaveGame()})()}onNamespaceDisconnect(){var n=this;return f(function*(){n.state.getCurrentState().destroyed||n.dispose().then(()=>n.returnPlayerToLobby())})()}handleMyTableUpdate(n){var o=this;return f(function*(){o.currentTable&&o.currentTable.getViewModel().id===n.id&&(yield o.currentTable.onTableUpdate(n))})()}}T4.stateName=Ve.ERoomState.Finalize;class KP extends Eh{onEnter(){var n=this;return f(function*(){const o=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(o)if(n.currentTable)yield n.currentTable.onTableUpdate(o);else{const e=yield n.createTable(o,o.state);n.setCurrentTable(e),yield n.navigationService.navigateTo(n.constants.gameRoute)}})()}handleMyTableUpdate(n){var o=this;return f(function*(){if(o.currentTable&&o.currentTable.getViewModel().id!==n.id&&(yield o.currentTable.dispose(),o.currentTable=void 0),!o.currentTable){const e=o.getViewModel().tables.find(r=>r.id===n.id),i=yield o.createTable(e,n.state);o.setCurrentTable(i)}yield o.currentTable.onTableUpdate(n)})()}}KP.stateName=Ve.ERoomState.Rematch;class ZP extends Jf{onEnter(){var n=this;return f(function*(){const o=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(o)if(n.currentTable)yield n.currentTable.onTableUpdate(o);else{const e=yield n.createTable(o,o.state);n.setCurrentTable(e),yield n.navigationService.navigateTo(n.constants.gameRoute)}})()}handleMyTableUpdate(n){var o=this;return f(function*(){if(o.currentTable&&o.currentTable.getViewModel().id!==n.id&&(yield o.currentTable.dispose(),o.currentTable=void 0),!o.currentTable){const e=o.getViewModel().tables.find(r=>r.id===n.id),i=yield o.createTable(e,n.state);o.setCurrentTable(i)}yield o.currentTable.onTableUpdate(n)})()}}ZP.stateName=Ve.ERoomState.Rematch;class QP extends Bb{onEnter(){var n=this;return f(function*(){const o=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(o)if(n.currentTable)yield n.currentTable.onTableUpdate(o);else{const e=yield n.createTable(o,o.state);n.setCurrentTable(e),yield n.navigationService.navigateTo(n.constants.gameRoute)}})()}handleMyTableUpdate(n){var o=this;return f(function*(){if(o.currentTable&&o.currentTable.getViewModel().id!==n.id&&(yield o.currentTable.dispose(),o.currentTable=void 0),!o.currentTable){const e=o.getViewModel().tables.find(r=>r.id===n.id),i=yield o.createTable(e,n.state);o.setCurrentTable(i)}yield o.currentTable.onTableUpdate(n)})()}}QP.stateName=Ve.ERoomState.Rematch;class YP extends Nb{onEnter(){var n=this;return f(function*(){const o=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(o)if(n.currentTable)yield n.currentTable.onTableUpdate(o);else{const e=yield n.createTable(o,o.state);n.setCurrentTable(e),yield n.navigationService.navigateTo(n.constants.gameRoute)}})()}handleMyTableUpdate(n){var o=this;return f(function*(){const e=o.state.getCurrentState(),i=e.nextTable;if(o.currentTable)o.currentTable.getViewModel().id===n.id?yield o.currentTable.onTableUpdate(n):i?yield i.onTableUpdate(n):e.nextTable=yield o.createTable(n,n.state);else if(i)yield i.onTableUpdate(n),e.nextTable=void 0,yield o.currentTable.dispose(),o.setCurrentTable(i);else{const r=yield o.createTable(n,n.state);o.setCurrentTable(r)}})()}}YP.stateName=Ve.ERoomState.Rematch;class aR extends Jf{onEnter(){var n=this;return f(function*(){const o=lo.findPlayerActiveTable(n.playerId,n.getViewModel().tables),e=n.state.getCurrentState();if(e.gameLoadedReconnectData=void 0,n.currentTable)if(yield n.currentTable.onTableUpdate(o),n.currentTable.gameState===_o.LoadingResources||n.currentTable.gameState===_o.GameLoading)e.gameLoadedReconnectData={tableId:n.currentTable.id,isSpectating:n.isSpectating},n.currentTable.reloadGame(n.getViewModel(),n.currentTable.getViewModel());else if(n.currentTable.gameState===_o.Ready)try{n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({tableId:n.currentTable.id})),yield n.ready()}catch(i){console.warn(i),(i instanceof et.Timeout||i instanceof et.UnsupportedOperation)&&n.dispose(i instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}else n.startGame(n.currentTable);else if(o){const i=yield n.createTable(o,o.state);n.setCurrentTable(i),n.reconnecting&&(n.currentTable.state.is(Ve.ETableState.Ready)||n.currentTable.state.is(Ve.ETableState.Gameplay)?n.startGame(n.currentTable):yield n.navigationService.navigateTo(n.constants.gameRoute))}})()}join(n){var o=this;return f(function*(){const e=yield o.sdk.join(n),i=o.getViewModel().tables.find(s=>s.id===n.tableId),r=yield o.createTable(i,i.state);return o.setCurrentTable(r),o.updateViewModel(e),o.startGame(o.currentTable),e})()}invite(n,o){var e=this;return f(function*(){try{yield e.sdk.invite(n,o)}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}acceptInvite(n,o){var e=this;return f(function*(){yield e.join(n)})()}cancelInvite(n,o){var e=this;return f(function*(){try{yield e.sdk.cancelInvite(n,o)}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}}aR.stateName=Ve.ERoomState.Ready;class _se extends rR{}class cR extends Jf{onEnter(){var n=this;return f(function*(){const o=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables),e=n.state.getCurrentState();if(e.gameLoadedReconnectData=void 0,n.currentTable)if(n.currentTable.id===o.id)if(yield n.currentTable.onTableUpdate(o),n.currentTable.gameState===_o.LoadingResources||n.currentTable.gameState===_o.GameLoading)e.gameLoadedReconnectData={tableId:n.currentTable.id,isSpectating:n.isSpectating},n.currentTable.reloadGame(n.getViewModel(),n.currentTable.getViewModel());else if(n.currentTable.gameState===_o.Ready)try{yield n.ready()}catch(i){console.warn(i),(i instanceof et.Timeout||i instanceof et.UnsupportedOperation)&&n.dispose(i instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}else(n.currentTable.state.is(Ve.ETableState.Ready)||n.currentTable.state.is(Ve.ETableState.Gameplay))&&n.startGame(n.currentTable);else{n.currentTable.dispose();const i=yield n.createTable(o,o.state);n.setCurrentTable(i),(n.currentTable.state.is(Ve.ETableState.Ready)||n.currentTable.state.is(Ve.ETableState.Gameplay))&&n.startGame(n.currentTable)}else if(o){const i=yield n.createTable(o,o.state);n.setCurrentTable(i),n.reconnecting&&(n.currentTable.state.is(Ve.ETableState.Ready)||n.currentTable.state.is(Ve.ETableState.Gameplay))&&n.startGame(n.currentTable)}})()}join(n){var o=this;return f(function*(){const e=yield o.sdk.join(n),i=lo.findPlayerActiveTable(o.playerId,e.tables),r=yield o.createTable(i,i.state);return o.setCurrentTable(r),o.updateViewModel(e),(o.currentTable.state.is(Ve.ETableState.Ready)||o.currentTable.state.is(Ve.ETableState.Gameplay))&&o.startGame(o.currentTable),e})()}invite(n,o){var e=this;return f(function*(){try{yield e.sdk.invite(n,o)}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}acceptInvite(n,o){var e=this;return f(function*(){yield e.join(n)})()}cancelInvite(n,o){var e=this;return f(function*(){try{yield e.sdk.cancelInvite(n,o)}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}handleMyTableUpdate(n){var o=this;return f(function*(){if(o.currentTable)if(o.currentTable.getViewModel().id===n.id){const e=o.currentTable.state.current.stateName;yield o.currentTable.onTableUpdate(n),e!==Ve.ETableState.Ready&&e!==Ve.ETableState.Gameplay&&(o.currentTable.state.is(Ve.ETableState.Ready)||o.currentTable.state.is(Ve.ETableState.Gameplay))&&o.startGame(o.currentTable)}else{yield o.currentTable.dispose();const e=o.getViewModel().tables.find(r=>r.id===n.id),i=yield o.createTable(e,n.state);o.setCurrentTable(i),(o.currentTable.state.is(Ve.ETableState.Ready)||o.currentTable.state.is(Ve.ETableState.Gameplay))&&o.startGame(o.currentTable)}else{const e=yield o.createTable(n,n.state);o.setCurrentTable(e),(o.currentTable.state.is(Ve.ETableState.Ready)||o.currentTable.state.is(Ve.ETableState.Gameplay))&&o.startGame(o.currentTable)}})()}}cR.stateName=Ve.ERoomState.Ready;class vse extends R_{join(n){var o=this;return f(function*(){const e=yield o.sdk.join(n),i=lo.findPlayerActiveTable(o.playerId,e.tables);if(i){const r=yield o.createTable(i,i.state);o.setCurrentTable(r)}return e})()}handleMyTableUpdate(n){var o=this;return f(function*(){if(o.currentTable)if(o.currentTable.getViewModel().id===n.id)yield o.currentTable.onTableUpdate(n);else{yield o.currentTable.dispose();const e=yield o.createTable(n,n.state);o.setCurrentTable(e)}else{const e=yield o.createTable(n,n.state);o.setCurrentTable(e)}})()}}class P4 extends R_{onEnter(){var n=this;return f(function*(){if(!n.getViewModel().hostId)return;const e=n.roomPages.createRoomPage(n.getViewModel().settings.type,n.gameName,n.getViewModel());n.state.getCurrentState().roomPage=e;const i=lo.findPlayerActiveTable(n.playerId,n.getViewModel().tables);if(n.currentTable)if(i)if(n.currentTable.getViewModel().id===i.id)yield n.currentTable.onTableUpdate(i),yield n.navigationService.navigateTo(e);else{n.currentTable.dispose(),n.currentTable=void 0,yield n.navigationService.navigateTo(e);const r=yield n.createTable(i,i.state);n.setCurrentTable(r)}else n.currentTable.dispose(),n.currentTable=void 0,yield n.navigationService.navigateTo(e),n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({roomCode:n.getViewModel().invitationCode}));else if(i){const r=yield n.createTable(i,i.state);n.setCurrentTable(r),yield n.navigationService.navigateTo(e)}else yield new Promise((r,s)=>setTimeout(()=>r())),yield n.navigationService.navigateTo(e),n.reconnecting&&n.isSpectating&&(yield n.sendSpectateMessage({roomCode:n.getViewModel().invitationCode}))})()}ban(n){return this.sdk.ban(n)}spectate(n,o){var e=this;return f(function*(){const i=yield e.sendSpectateMessage(n,o);e.isSpectating=!0;const r=i.tables.find(s=>s.id===n.tableId);return r&&(e.currentTable=yield e.createTable(r,r.state),e.currentTable.isSpectating=!0),i})()}join(n){var o=()=>super.join,e=this;return f(function*(){const i=yield o().apply(e,[n]),r=e.getViewModel().hostId;return e.stayAsSpectatorIfKickedOnDisconnect=r&&e.playerId!==r,i})()}invite(n,o){var e=this;return f(function*(){try{yield e.sdk.invite(n,o);const i=e.getViewModel().hostId;e.stayAsSpectatorIfKickedOnDisconnect=i&&e.playerId!==i}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}acceptInvite(n,o){var e=this;return f(function*(){let i=n.tableId;var r;i||(i=null===(r=e.getViewModel().tables.find(c=>!!lo.getFirstFreeSeat(c)))||void 0===r?void 0:r.id),yield e.join({...n,tableId:i});const s=e.getViewModel().hostId;e.stayAsSpectatorIfKickedOnDisconnect=s&&e.playerId!==s;const a=e.roomPages.createRoomPage(e.getViewModel().settings.type,e.gameName,e.getViewModel());yield e.navigationService.navigateTo(a,{ignoreGuards:!0})})()}cancelInvite(n,o){var e=this;return f(function*(){try{yield e.sdk.cancelInvite(n,o)}catch(i){if(!(i instanceof et.Timeout))throw i;e.dispose(io.ActionTimeout).then(()=>e.returnPlayerToLobby())}})()}onNamespaceDisconnect(n){var o=this;return f(function*(){n===Ds.ServerDisconnect&&o.dispose().then(()=>o.returnPlayerToLobby())})()}onBeforeUnload(){this.leave().catch(n=>console.warn(n))}}P4.stateName=Ve.ERoomState.Waiting;class lR extends _c{onError(n){var o=this;return f(function*(){if(o.destroyed)throw n;throw o.reconnecting=!1,n===Ds.ServerDisconnect?o.onNamespaceDisconnect(n):(n instanceof et.Timeout||n instanceof lt.RoomConnectReject)&&o.dispose(n instanceof et.Timeout?io.ActionTimeout:void 0).then(()=>o.returnPlayerToLobby()),n})()}onNamespaceDisconnect(){var n=this;return f(function*(){n.dispose().then(()=>n.returnPlayerToLobby())})()}}lR.stateName=Ve.ERoomState.Init;let bse=(()=>{let t=class{constructor(o,e,i,r,s){this.constants=s,this.communicationService=o,this.gameService=e,this.navigationService=i,this.pages=r}createRoom(o,e,i){const r=new Oh(o,e,this.communicationService,this.gameService,this.navigationService,this.pages,i,this.constants);switch(e.type){case Jt.RoomType.SinglePlayer:this.configureForSingleplayerRoom(r);break;case Jt.RoomType.Matchmaking:case Jt.RoomType.PromoTournament:case Jt.RoomType.KnockoutTournament:this.configureForMatchmakingRoom(r);break;case Jt.RoomType.Custom:this.configureForCustomRoom(r);break;case Jt.RoomType.Casino:this.configureForCasinoRoom(r);break;case Jt.RoomType.CasinoMTT:this.configureForCasinoMTTRoom(r);break;case Jt.RoomType.BlitzTournament:this.configureForBlitzTournamentRoom(r);break;default:throw new Error("Unknown room type")}return r.state.logger.isEnabled=!0,r.state.logger.namespace="StateMachine - Room",r}configureForSingleplayerRoom(o){o.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(_c,R_,Eh,Jl,Fa,KP).setInitialState(_c).from(_c).toAny().from(R_).to(Eh).from(Eh).to(Jl).from(Eh).to(KP).from(KP).to(Eh).from(KP).to(Jl).fromAny().to(Fa).from(Fa).toAny().setStateContext(o).build()}configureForCustomRoom(o){o.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(_c,rR,Jf,Jl,Fa,ZP).setInitialState(_c).from(_c).toAny().from(rR).to(Jf).from(Jf).to(Jl).from(Jf).to(ZP).from(ZP).to(Jf).from(ZP).to(Jl).fromAny().to(Fa).from(Fa).toAny().setStateContext(o).build()}configureForCasinoRoom(o){o.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(_c,_se,aR,Jl,Fa).setInitialState(_c).from(_c).toAny().from(_se).to(aR).from(aR).to(Jl).fromAny().to(Fa).from(Fa).toAny().setStateContext(o).build()}configureForCasinoMTTRoom(o){o.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(_c,vse,cR,Jl,Fa).setInitialState(_c).from(_c).toAny().from(vse).to(cR).from(cR).to(Jl).fromAny().to(Fa).from(Fa).toAny().setStateContext(o).build()}configureForMatchmakingRoom(o){o.state=(new Do.AsyncStateMachine.Builder).setInitialState(_c).setAllowedStates(_c,R_,Bb,Jl,Fa,QP).from(_c).toAny().from(R_).to(Bb).from(Bb).to(Jl).from(Bb).to(QP).from(QP).to(Bb).from(QP).to(Jl).fromAny().to(Fa).from(Fa).toAny().setStateContext(o).build()}configureForBlitzTournamentRoom(o){o.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(lR,P4,Nb,T4,Fa,YP).setInitialState(lR).from(lR).toAny().from(P4).to(Nb).from(Nb).to(T4).from(Nb).to(YP).from(YP).to(Nb).from(YP).to(Jl).fromAny().to(Fa).from(Fa).toAny().setStateContext(o).build()}};return t=Qe([Fx(4,jy(tn)),ue("design:paramtypes",[Object,Object,Object,Object,Object])],t),t})(),nd=(()=>{var t;class n extends Ep{}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Cse=new Ot("IGSGiftsService"),zHe=new Ot("IGSProfileService");let uR=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me){var ge=this;this.actions=ee,this.cs=le,this.userRepository=me,this.exceptionLogger=new KG,this.subscriptions=new ie.List,this.onGameException=Me=>{if(console.error("Reload game",Me),Me){let Ke;this.exceptionLogger.log(Me),Me instanceof Error?Ke=Me:Me instanceof ErrorEvent&&(Ke=null!=Me&&Me.error?Me.error:Me),this.emitEvent(_i.GameException,Ke)}else this.emitEvent(_i.GameException)},this.loadGameResources=()=>new Promise(function(){var Me=f(function*(Ke,Ee){try{ge.gameVendorResource=new Mb("".concat(ge.currentGameConfig.path).concat(ge.currentGameConfig.scripts[0])),ge.gameResource=new Mb("".concat(ge.currentGameConfig.path).concat(ge.currentGameConfig.scripts[1])),ge.currentGameConfig.scripts[2]&&(ge.spineResource=new Mb("".concat(ge.currentGameConfig.path).concat(ge.currentGameConfig.scripts[2])),ge.spineResource.addUnloadCallback(ge.unloadSpineResourceCallback)),ge.gameVendorResource.addUnloadCallback(ge.unloadGameVendorResourceCallback),ge.gameResource.addUnloadCallback(ge.unloadGameResourceCallback),console.log("Loading phaser.js!"),yield ge.gameVendorResource.load(),ge.spineResource&&(yield ge.spineResource.load(),console.log("Loaded spine.js!")),yield ge.gameResource.load(),console.log("Loaded main.js!"),Ke()}catch(ot){ge.unloadGameResources(),Ee(ot)}});return function(Ke,Ee){return Me.apply(this,arguments)}}()),this.onGameLoadingComplete=()=>{console.log("Game loading complete."),this.stopLoadingTimeout(),this.removePageVisibilityListeners(),this.setServiceState(_o.Ready),this.emitEvent(_i.GameLoaded,{roomModel:this.roomViewModel,tableModel:this.tableViewModel})},this.showBotMessage=Me=>{const Ke=this.translationService.instant("game_chat.bot_chat.intent.".concat(Me.data.intent));if(!(Ke&&Ke instanceof Array&&Ke.length))return;const Ee=Ke[(0,ie.randomInt)(0,Ke.length-1)];if(!Ee)return;let ot;Ee.type===y4.Emoji?ot={id:this.urlService.getClientEmojiUrl(Ee.id).spritesheetUrl,type:ec.Emoteicon,userId:Me.data.userId,payload:void 0}:Ee.type===y4.Phrase&&(ot={id:Ee.id,type:ec.Phrase,userId:Me.data.userId,payload:{key:Ee.key}}),ot&&this.onClientMessage(ot)},this.gameEnded=()=>{this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded),this.ngZone.run(()=>{this.gameEndedEventDelayId=setTimeout(()=>{this.emitEvent(_i.GameEnded,{gameViewModel:this.tableViewModel,roomViewModel:this.roomViewModel})})})},this.onGameLoadingTimeout=()=>{this.cancelResourceLoading(),this.removePageVisibilityListeners(),this.stopLoadingTimeout()},this.loadGameBackground=()=>new Promise(function(){var Me=f(function*(Ke){ge.gameBackgroundResource=new YG(ge.getBackgroundUrl(ge.currentGameConfig));try{yield ge.gameBackgroundResource.load()}catch(Ee){Ke()}finally{ge.gameBackgroundResource.unload(),Ke()}});return function(Ke){return Me.apply(this,arguments)}}()),this.onPageVisible=()=>{this.loadingTimer.getState()===fc.Paused?this.loadingTimer.resume():this.loadingTimer.restart()},this.onPageHide=()=>{this.loadingTimer.pause()},this.stopLoadingTimeout=()=>{this.loadingTimer.clear()},this.onClientMessage=Me=>{if(this.emitEvent(_i.IngameMessage,Me),this.gameClient){if(Me.type===ec.Voice){const Ke={id:this.urlService.getClientEmojiUrl("emoji_voiceMsg").spritesheetUrl,type:ec.Emoteicon,userId:Me.userId,payload:void 0};this.gameClient.onClientMessage(Ke)}this.gameClient.onClientMessage(Me)}},this.handleOpenBuyIn=Me=>{this.emitEvent(Tt.EGameClientEvent.OpenBuyIn,this.gameClient.gameInfo,Me.data.args,Me.data.onSuccess)},this.handleBuyCurrency=Me=>{const Ke={gameId:this.gameClient.gameInfo.configuration.name,...Me.data.args};this.emitEvent(Tt.EGameClientEvent.BuyCurrency,this.gameClient.gameInfo,Ke,Me.data.onSuccess,Me.data.onFail)},this.handleSlotGameBuyCurrency=Me=>{const Ke={gameId:Tt.EBettingGame.Minislot,...Me.data.args};this.emitEvent(Tt.EGameClientEvent.BuyCurrency,this.gameClient.gameInfo,Ke,Me.data.onSuccess,Me.data.onFail)},this.handleOpenGiftsToAll=()=>{this.emitEvent(Tt.EGameClientEvent.OpenGiftsToAll,this.gameClient.gameInfo)},this.handleOpenGameInvite=()=>{console.warn("Game invite popup open event"),this.emitEvent(_i.GameInvitePopupOpened,"gameInvitePopup")},this.onEmoticonsOpened=()=>{console.warn("Game drawer tab open event: emoticonsTab"),this.emitEvent(_i.DrawerTabOpened,"emoticonsTab")},this.onPhrasesOpened=()=>{console.warn("Game drawer tab open event: phrasesTab"),this.emitEvent(_i.DrawerTabOpened,"phrasesTab")},this.onSettingsOpened=()=>{console.warn("Game drawer tab open event: settingsTab"),this.emitEvent(_i.DrawerTabOpened,"settingsTab")},this.onProfileOpened=Me=>{var Ke;null!==(Ke=this.getPlayerViewModel(Me.data))&&void 0!==Ke&&Ke.isBot||this.ngZone.run(()=>{this.profileService?this.profileService.openUserProfile(Me.data):this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/profile/").concat(Me.data)}}])})},this.onGiftsOpened=Me=>{if(Me.data&&this.tableViewModel){const Ke=this.tableViewModel.seats.filter(ct=>null!=ct.player).map(ct=>ct.player.profile),Ee=Me.data,ot=Ke.filter(ct=>ct.id!==this.myPlayerId());this.gifts&&this.ngZone.run(()=>{this.gifts.openShopGifts({receiver:this.getUserProfile(Ee),receivers:ot,roomId:this.tableViewModel.id})})}else console.log("Invalid data! Event:",Me,"GameViewModel: ",this.tableViewModel)},this.onOpenLeaderboard=()=>{this.emitEvent(Tt.EGameClientEvent.OpenLeaderboard)},this.onOpenHowToPlay=()=>{this.emitEvent(Tt.EGameClientEvent.OpenHowToPlay)},this.onChipsUpdate=Me=>{console.log("onChipsUpdate",Me),Me.reason!==PP.Minislot&&this.gameClient&&this.gameClient.updateWallet(this.store.selectWallet())},this.unloadGameVendorResourceCallback=()=>{delete window.Phaser,delete window.PIXI},this.unloadGameResourceCallback=()=>{this.currentGameConfig&&delete window[this.currentGameConfig.class]},this.unloadSpineResourceCallback=()=>{},this.defaultAvatarsService=G,this.urlService=h,this.events=b,this.ngZone=r,this.gameClientFactory=e,this.translationService=c,this.router=i,this.gifts=s,this.profileService=a,this.clientConfig=w,this.state=_o.Initial,this.appState=u,this.store=R,this.constants=K,this.settings=te,this.loadingTimer=new XU(this.onGameLoadingTimeout,9e4)}returnPlayerToGame(e,i,r){console.log("Game service returnPlayerToGame",e,i),this.startGame(e,i,r)}startGame(e,i,r=!1){var s=this;return f(function*(){console.log("startGame(roomViewModel: IRoomViewModel, gameViewModel: IGameViewModel)",e,i),s.spectating=r,s.currentGameConfig=s.clientConfig.getGameRelatedConfig(e.settings.game.name).gameConfig,s.setServiceState(_o.LoadingResources),s.emitEvent(_i.GameStartInit),s.setGameRoomViewModel(e),s.setTableViewModel(i),s.gameInfo=i.gameInfo;const a=new ie.UniqueList(s.getPlayers(i.seats)),c=a.remove({id:s.store.selectUserState().profile.id});let u;c?u=c:s.profiles&&(u=s.profiles[s.store.selectUserState().profile.id]),a.add(Lo.updateGdkProfileWithPlatformProfile(s.store.selectSimpleProfile(),u)),s.profiles=lw(a.toArray(),"id");try{s.emitEvent(_i.GameLoadingStarted,{roomModel:e,tableModel:i}),s.bgLoadTask=new Jn(s.loadGameBackground()),yield s.bgLoadTask,s.removeAppBodyBackground(),yield s.retryNavigationIfNeeded(),s.emitEvent(_i.NavigatedToGame,{roomModel:e,tableModel:i}),s.resourcesLoadTask=new T_(s.loadGameResources,{maxRetriesCount:5,retryDelayMs:3e3}),yield s.resourcesLoadTask,yield s.retryNavigationIfNeeded(),s.applyChangesToVendorCode(),console.warn("await this.gameVendorReady()"),yield s.gameVendorReady(),yield s.retryNavigationIfNeeded(),s.setServiceState(_o.GameLoading),s.runGame()}catch(h){console.error(h),h instanceof Cr||(h instanceof GA?s.emitEvent(_i.GameLoadTimeout):s.onGameException(h))}})()}dispose(){clearTimeout(this.gameEndedEventDelayId),this.removeGameScripts(),this.setServiceState(_o.Disposed)}removeGameScripts(){this.stopLoadingTimeout(),this.clearInGameListeners(),this.removePageVisibilityListeners(),this.cancelNavigation(),this.cancelResourceLoading(),this.cancelGameBackgroundLoading(),this.cancelVendorReadyTask();try{void 0!==this.game&&this.game.destroy()}catch(e){console.error(e)}try{this.gameClient&&this.gameClient.destroy()}catch(e){console.error("Error deleting game properties from window object!",e)}finally{this.game=void 0,this.gameClient=void 0,this.unloadGameResources(),console.log("Set state as not loaded")}}unloadGameResources(){this.gameVendorResource&&(this.gameVendorResource.unload(),this.gameVendorResource=void 0),this.gameResource&&(this.gameResource.unload(),this.gameResource=void 0),this.spineResource&&(this.spineResource.unload(),this.spineResource=void 0)}onGameViewInitialized(){this.setGamePageListeners()}onGameViewDestroyed(){this.showAppBodyBackground(),this.emitEvent(_i.GameViewLeft),this.removeGamePageListeners()}sendInGameMessage(e){this.communication&&this.communication.connected&&(e.userId||(e.userId=this.myPlayerId()),this.communication.emit(BP.ActiveRoomProtocol.Messages.ClientMessageIn,BP.ActiveRoomProtocol.Messages.ClientMessageOut,e))}changeInGameSettings(e){this.gameClient.changeSettings(e)}getInGameGiftsEnabled(){return this.tableViewModel.settings.enableGifts}getUserProfile(e){return{...this.profiles[e],avatarUrl:this.buildAvatarUrl(this.profiles[e].avatar)}}getWallet(){return this.store.selectWallet()}myPlayerId(){return this.store.selectUserState().profile.id}getInGameMessages(){return this.translationService.instant("game_chat.chat_messages")}onConnectionLost(){console.warn("Lost connection in game!"),this.cancelResourceLoading(),this.cancelGameBackgroundLoading(),this.cancelVendorReadyTask()}subscribe(e,i){return new ie.EventListener(this.events,e,i)}unsubscribe(e,i){this.events.removeListener(e,i)}getBackgroundUrl(e=this.currentGameConfig){let r,s,i=this.urlService.getImageUrl(e.backgroundImage);const a=this.roomViewModel;if(this.tableViewModel&&this.tableViewModel.settings.inventory&&(r=this.tableViewModel.settings.inventory.find(c=>c.type===Jt.PlayerItemType.Table&&c.equipped)),!r&&a&&a.settings.game.inventory&&(s=a.settings.game.inventory.find(c=>c.type===Jt.PlayerItemType.Table)),r)i="".concat(Lt.CONFIG.core.cdn.url).concat(r.data.backgroundUrl);else if(void 0!==s)i="".concat(Lt.CONFIG.core.cdn.url).concat(s.data.backgroundUrl);else{let c=this.store.selectUserState().gameInventory.items.find(u=>u.item.type===Fe.TG.Table&&u.equippedGames&&-1!==u.equippedGames.indexOf(e.id));void 0!==c&&(i="".concat(Lt.CONFIG.core.cdn.url).concat(c.item.data.backgroundUrl))}return i}get gameState(){return this.state}get isSpectating(){return this.spectating}useNamespace(e){this.communication=e}reloadGame(e,i,r){this.removeGameScripts(),this.returnPlayerToGame(e,i,r)}onTableUpdate(e){this.setTableViewModel(e),this.gameInfo=e.gameInfo;const i=new ie.UniqueList(this.getPlayers(e.seats)),r=i.remove({id:this.store.selectUserState().profile.id});let s;r?s=r:this.profiles&&(s=this.profiles[this.store.selectUserState().profile.id]),i.add(Lo.updateGdkProfileWithPlatformProfile(this.store.selectSimpleProfile(),s)),this.profiles=lw(i.toArray(),"id"),this.emitEvent(Tt.EGameClientEvent.TableUpdate,e)}subscribeMyTableUpdate(e){return new ie.EventListener(this.events,Tt.EGameClientEvent.TableUpdate,e)}unsubscribeMyTableUpdate(e){this.events.removeListener(Tt.EGameClientEvent.TableUpdate,e)}subscribeOnOpenBuyIn(e){return new ie.EventListener(this.events,Tt.EGameClientEvent.OpenBuyIn,e)}unsubscribeOnOpenBuyIn(e){this.events.removeListener(Tt.EGameClientEvent.OpenBuyIn,e)}subscribeOnBuyCurrency(e){return new ie.EventListener(this.events,Tt.EGameClientEvent.BuyCurrency,e)}unsubscribeOnBuyCurrency(e){this.events.removeListener(Tt.EGameClientEvent.BuyCurrency,e)}subscribeOnOpenGiftsToAll(e){return new ie.EventListener(this.events,Tt.EGameClientEvent.OpenGiftsToAll,e)}unsubscribeOnOpenGiftsToAll(e){this.events.removeListener(Tt.EGameClientEvent.OpenGiftsToAll,e)}subscribeOnOpenLeaderboard(e){return new ie.EventListener(this.events,Tt.EGameClientEvent.OpenLeaderboard,e)}unsubscribeOnOpenLeaderboard(e){this.events.removeListener(Tt.EGameClientEvent.OpenLeaderboard,e)}subscribeOnOpenHowToPlay(e){return new ie.EventListener(this.events,Tt.EGameClientEvent.OpenHowToPlay,e)}unsubscribeOnOpenHowToPlay(e){this.events.removeListener(Tt.EGameClientEvent.OpenHowToPlay,e)}requestUserProfile(e){var i=this;return f(function*(){const r=(yield i.userRepository.getSimpleProfiles([e]))[0],s=Lo.toGDKProfile(r);return{...s,avatar:i.buildAvatarUrl(s.avatar),avatarUrl:i.buildAvatarUrl(s.avatar)}})()}transformProfile(e){return{...e,avatar:this.buildAvatarUrl(e.avatar),avatarUrl:this.buildAvatarUrl(e.avatar)}}retryNavigationIfNeeded(){var e=this;return f(function*(){e.router.url!=="/".concat(e.constants.gameRoute)&&(console.warn("await navigation to game"),e.navigationTask=new Jn(e.router.navigate([e.constants.gameRoute])),yield e.navigationTask)})()}setServiceState(e){const i=this.gameState;this.state=e,this.emitEvent(_i.ClientGameStateChange,{previous:i,current:e})}runGame(){this.ngZone.runOutsideAngular(()=>{this.gameClient=this.gameClientFactory.createInstance(this.currentGameConfig.id,Xs.domElementId,this.gameInfo,this.cs,this.communication,this),this.setInGameListeners(),this.gameVendorResource.setAsUsed(),this.gameResource.setAsUsed(),this.game=UA.createGameInstance(this.currentGameConfig.class,this.gameClient)}),this.addPageVisibilityListeners(),this.startLoadingTimeout()}rematch(){console.log("GameService rematch clicked.")}getPlayers(e){return e.filter(i=>i.player).map(i=>i.player.profile)}gameVendorReady(){return this.vendorReadyTask=new Jn(new Promise((e,i)=>{window.Phaser?window.Phaser.Device.whenReady(e):i(new Error("Vendor code is not loaded!"))})),this.vendorReadyTask}applyChangesToVendorCode(){window.PIXI&&(window.PIXI.CanvasTinter.tintMethod=window.PIXI.CanvasTinter.tintWithPerPixel)}setGameRoomViewModel(e){this.roomViewModel=e}setTableViewModel(e){this.tableViewModel=e}startLoadingTimeout(){!0===this.appState.getAppState().visible&&this.loadingTimer.restart()}addPageVisibilityListeners(){this.appState.subscribe(co.PageVisible,this.onPageVisible),this.appState.subscribe(co.PageHide,this.onPageHide)}removePageVisibilityListeners(){this.appState.unsubscribe(co.PageVisible,this.onPageVisible),this.appState.unsubscribe(co.PageHide,this.onPageHide)}setGamePageListeners(){this.communication.on(BP.ActiveRoomProtocol.Messages.ClientMessageOut,this.onClientMessage)}removeGamePageListeners(){this.communication.removeListener(BP.ActiveRoomProtocol.Messages.ClientMessageOut,this.onClientMessage)}setInGameListeners(){console.log("Setting inGame listeners."),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameLoaded,this.onGameLoadingComplete),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenProfile,this.onProfileOpened),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenGifts,this.onGiftsOpened),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenEmoticons,this.onEmoticonsOpened),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenPhrases,this.onPhrasesOpened),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenSettings,this.onSettingsOpened),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.RematchGame,this.rematch),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameLoadError,this.onGameLoadingTimeout),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenBuyIn,this.handleOpenBuyIn),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenGiftsToAll,this.handleOpenGiftsToAll),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenGameInvite,this.handleOpenGameInvite),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.ShowBotMessage,this.showBotMessage),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenLeaderboard,this.onOpenLeaderboard),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenHowToPlay,this.onOpenHowToPlay),this.gameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.BuyCurrency,this.handleBuyCurrency),this.subscriptions.add(this.actions.pipe(ai(RP)).subscribe(this.onChipsUpdate)),this.gameClient.slotGameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenSettings,this.onSettingsOpened),this.gameClient.slotGameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.BuyCurrency,this.handleSlotGameBuyCurrency)}clearInGameListeners(){var e,i;this.gameClient&&this.gameClient.eventDispatcher&&(this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameLoaded,this.onGameLoadingComplete),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenProfile,this.onProfileOpened),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenGifts,this.onGiftsOpened),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenEmoticons,this.onEmoticonsOpened),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenPhrases,this.onPhrasesOpened),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenSettings,this.onSettingsOpened),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.RematchGame,this.rematch),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameLoadError,this.onGameLoadingTimeout),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenBuyIn,this.handleOpenBuyIn),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenGiftsToAll,this.handleOpenGiftsToAll),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenGameInvite,this.handleOpenGameInvite),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.ShowBotMessage,this.showBotMessage),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenLeaderboard,this.onOpenLeaderboard),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenHowToPlay,this.onOpenHowToPlay),this.gameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.BuyCurrency,this.handleBuyCurrency),null===(e=this.gameClient.slotGameClient)||void 0===e||e.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenSettings,this.onSettingsOpened),null===(i=this.gameClient.slotGameClient)||void 0===i||i.eventDispatcher.removeEventListener(Tt.EGameClientEvent.BuyCurrency,this.handleSlotGameBuyCurrency)),this.settingChangeListener&&this.settingChangeListener.detach(),this.subscriptions.forEach(r=>r.unsubscribe())}buildAvatarUrl(e){return e&&""!==e?this.defaultAvatarsService.isDefaultAvatar(e)?this.urlService.getImageUrl("".concat(DP,"/").concat(e)):"".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.avatars).concat(e):this.urlService.getImageUrl(this.constants.defaultAvatarPath)}emitEvent(e,...i){this.ngZone.run(()=>{this.events.emit(e,...i)})}cancelResourceLoading(){this.gameVendorResource&&this.gameVendorResource.abortLoading(),this.gameResource&&this.gameResource.abortLoading(),this.resourcesLoadTask&&this.resourcesLoadTask.cancel()}cancelNavigation(){this.navigationTask&&this.navigationTask.cancel()}cancelGameBackgroundLoading(){this.gameBackgroundResource&&this.gameBackgroundResource.abortLoading(),this.bgLoadTask&&this.bgLoadTask.cancel()}cancelVendorReadyTask(){this.vendorReadyTask&&this.vendorReadyTask.cancel()}removeAppBodyBackground(){document.body.classList.contains("prime")&&document.body.classList.remove("prime")}showAppBodyBackground(){document.body.classList.add("prime")}getPlayerViewModel(e){var i;return null===(i=this.tableViewModel.seats.find(r=>{var s;return(null===(s=r.player)||void 0===s?void 0:s.id)===e}))||void 0===i?void 0:i.player}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ZG),T(on),T(an),T(Cse,8),T(zHe,8),T(pi),T(Sa),T(ii),T(nd),T(Zt),T(J),T(Rp),T(tn),T(nc),T(yr),T(Ri),T(ed))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Xf=new Ot("RoomsPages"),yse=new Ot("ClientGameRoomFactory",{factory:()=>new bse(mt(Ri),mt(uR),mt(Yt),mt(Xf),mt(tn))});let jHe=(()=>{var t;class n{constructor(e,i,r){this.store=r,this.communicationService=e,this.clientGameRoomFactory=i}createPlayClient(e){return new UHe(e,this.communicationService,this.clientGameRoomFactory,this.store)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(yse),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),oo=(()=>{var t;class n{constructor(e,i,r,s,a){this.store=a,this.statsUpdated=c=>{this.events.emit(Ve.MatchmakingProtocol.Messages.StatsUpdate,c)},this.onLogout=()=>{this.dispose()},this.onBeforeUnload=()=>{this.currentPlayClient&&this.currentPlayClient.onBeforeUnload()},this.gamesPlayClientListenerService=s,this.deviceService=e,this.playClientFactory=r,this.events=new tc,this.listeners=new ie.List,this.playClients=new ie.List,this.stateEvents=new pse,this.errors=new tR,this.tasks={connect:void 0,connectAndHandleState:void 0,action:void 0},i.authStatusChangeEvent.pipe(bt(c=>c===er.Logout)).subscribe(this.onLogout)}initialize(e,i){this.currentPlayerId=e,this.playClients=new ie.List,i.forEach(r=>{this.playClients.add(this.playClientFactory.createPlayClient(r))}),this.store.dispatch(ise({gameIds:this.playClients.map(r=>r.channel).toArray()})),this.gamesPlayClientListenerService.initialize(this.playClients),window.addEventListener(this.getBeforeUnloadEvent(),this.onBeforeUnload)}connect(e){var i=this;return f(function*(){if(i.tasks.connect)return i.tasks.connect.gameId!==e&&(i.tasks.connect.promise=new Jn(i.tasks.connect.promise.then(()=>i.connect(e)))),i.tasks.connect.promise;const r=i.getPlayClient(e);return r.initialized?r:(i.tasks.connect={gameId:e,promise:void 0},i.store.dispatch(rse({gameId:e})),i.tasks.connect.promise=new Jn(new Promise(function(){var s=f(function*(a,c){try{yield r.initialize(i.currentPlayerId),yield i.disposeCurrentPlayClient(),i.currentPlayClient=r,i.listeners.add(r.subscribe(Ve.MatchmakingProtocol.Messages.StatsUpdate,i.statsUpdated)),i.listeners.add(r.stateEvents.onClientStateTransition(u=>i.stateEvents.emitClientTransition(u))),i.listeners.add(r.stateEvents.onRoomStateTransition(u=>i.stateEvents.emitRoomTransition(u))),i.listeners.add(r.stateEvents.onClientStateTimeout(u=>i.stateEvents.emitClientStateTimeout(u))),i.listeners.add(r.stateEvents.onRoomStateTimeout(u=>i.stateEvents.emitRoomStateTimeout(u))),i.listeners.add(r.stateEvents.onMyTableUpdate(u=>i.stateEvents.emitTableUpdate(u))),i.listeners.add(r.stateEvents.onKnockoutStateUpdate(u=>i.stateEvents.emitKnockoutStateUpdate(u))),i.listeners.add(r.stateEvents.onStatsUpdate(u=>i.stateEvents.emitStatsUpdate(u))),i.listeners.add(r.stateEvents.onPlayerMoved(()=>i.stateEvents.emitPlayerMoved())),i.listeners.add(r.stateEvents.onNewRoom(u=>i.stateEvents.emitPlayerNewRoom(u))),i.store.dispatch(sse({gameId:e})),a(r)}catch(u){console.warn(u),i.store.dispatch(ase({gameId:e})),c(u)}finally{i.tasks.connect=void 0}});return function(a,c){return s.apply(this,arguments)}}())),i.tasks.connect.promise)})()}connectAndHandlePlayerState(e){var i=this;return f(function*(){return i.tasks.connectAndHandleState?(i.tasks.connectAndHandleState.gameId!==e&&(i.tasks.connectAndHandleState.promise=new Jn(i.tasks.connectAndHandleState.promise.then(()=>i.connectAndHandlePlayerState(e)))),i.tasks.connectAndHandleState.promise):(i.tasks.connectAndHandleState={gameId:e,promise:void 0},i.store.dispatch(cse({gameId:e})),i.tasks.connectAndHandleState.promise=new Jn(new Promise(function(){var r=f(function*(s,a){try{const c=yield i.connect(e),u=yield c.getPlayerState();if(u.currentRoomId&&u.gameName===e)try{yield c.reconnectToRoom(u)}catch(h){throw h===Ds.ServerDisconnect||h instanceof et.Timeout||h instanceof lt.RoomConnectReject?(console.log("Cannot connect to room namespace."),new lt.RoomConnectReject):(console.error("Ooooo error",h),new lt.UnknownError)}i.store.dispatch(lse({gameId:e})),s(u)}catch(c){console.warn(c),i.store.dispatch(use({gameId:e})),a(c)}finally{i.tasks.connectAndHandleState=void 0}});return function(s,a){return r.apply(this,arguments)}}())),i.tasks.connectAndHandleState.promise)})()}acceptInvite(e,i,r){var s=this;return f(function*(){try{s.store.dispatch(ese({gameId:e.game})),yield(yield s.acceptAction(e.game,r)).acceptInvite(e,i,r),s.store.dispatch(tse({gameId:e.game})),s.store.dispatch(nR({id:e.id,roomCode:i.roomCode}))}catch(a){throw s.store.dispatch(nse({gameId:e.game})),a}})()}joinRoom(e,i,r){return this.acceptAction(e.game,r).then(s=>s.joinRoom(e,i,r))}createRoom(e,i,r){return this.acceptAction(i,r).then(s=>s.createRoom(e,r))}spectateRoom(e,i,r){return this.acceptAction(e.game,r).then(s=>s.spectateRoom(e,i,r))}acceptAction(e,i){var r=this;return f(function*(){if(r.tasks.connect||r.tasks.connectAndHandleState)throw r.errors.createErrorObject(lt.Code.ActionInProgress);return r.tasks.action?(r.tasks.action.gameId!==e&&(r.tasks.action.promise=new Jn(r.tasks.action.promise.then(()=>r.acceptAction(e,i)))),r.tasks.action.promise):(r.tasks.action={gameId:e,promise:void 0},r.tasks.action.promise=new Jn(new Promise(function(){var s=f(function*(a,c){try{let u;const h=r.currentPlayClient;if(h&&h.activeClientModel.currentRoom){const b=r.currentPlayClient.activeClientModel.currentRoom;yield b.leave(),yield b.returnPlayerToLobby()}u=h&&h.channel===e?h:yield r.connect(e),a(u)}catch(u){console.warn(u),c(u)}});return function(a,c){return s.apply(this,arguments)}}())),r.tasks.action.promise.then(s=>(r.tasks.action=void 0,s)))})()}dispose(){var e=this;return f(function*(){e.cancelTasks(),window.removeEventListener(e.getBeforeUnloadEvent(),e.onBeforeUnload),yield e.disposeCurrentPlayClient(),e.playClients.forEach(i=>{i.initialized&&i.dispose()}),e.gamesPlayClientListenerService.dispose(),e.playClients=new ie.List,e.listeners.forEach(i=>i.detach()),e.listeners=new ie.List,e.events.emit("dispose")})()}onStatsUpdate(e){return new ie.EventListener(this.events,Ve.MatchmakingProtocol.Messages.StatsUpdate,e)}onDispose(e){return new ie.EventListener(this.events,"dispose",e)}getPlayClient(e){return this.playClients.find(i=>i.channel===e)}getBeforeUnloadEvent(){return this.deviceService.browser!==ha.SAFARI?"beforeunload":"unload"}disposeCurrentPlayClient(){var e=this;return f(function*(){e.currentPlayClient&&(e.listeners.forEach(i=>i.detach()),e.store.dispatch(ose({gameId:e.currentPlayClient.channel})),yield e.currentPlayClient.dispose(),e.currentPlayClient=void 0)})()}cancelTasks(){for(let e in this.tasks)this.tasks.hasOwnProperty(e)&&this.tasks[e]&&(this.tasks[e].promise.cancel(),this.tasks[e]=void 0)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kl),T(xr),T(jHe),T(NHe),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var I4=function(t){return t.featureKey="gamesPlay",t}(I4||{}),HHe=lo.updateModel;const Cw=ki({selectId:t=>t.gameId,sortComparer:!1}),M4=ki({selectId:t=>t.id,sortComparer:!1}),Dm=ki({selectId:t=>t.id,sortComparer:!1}),Sse={rooms:Cw.getInitialState(),unlockedRooms:M4.getInitialState(),playClients:Dm.getInitialState(),actions:{acceptInvite:void 0}},qHe=Sr(Sse,de(Zre,()=>Sse),de(Qre,(t,n)=>{const o=n.gameIds.map(e=>({gameId:e,currentRoom:void 0,currentTable:void 0,isSpectating:!1}));return{...t,rooms:Cw.upsertMany(o,t.rooms)}}),de(Jre,(t,n)=>{var o;let e,i=t.rooms.entities[n.gameId];return e=i&&n.room&&(null==i||null===(o=i.currentRoom)||void 0===o?void 0:o.id)===n.room.id?Se(i,r=>{r.currentRoom=HHe(n.room,r.currentRoom)}).currentRoom:n.room,{...t,rooms:Cw.updateOne({id:n.gameId,changes:{currentRoom:e}},t.rooms)}}),de(Xre,(t,n)=>({...t,rooms:Cw.updateOne({id:n.gameId,changes:{currentTable:n.table}},t.rooms)})),de(Yre,(t,n)=>({...t,rooms:Cw.updateOne({id:n.gameId,changes:{isSpectating:n.isSpectator}},t.rooms)})),de(nR,(t,n)=>({...t,unlockedRooms:M4.upsertOne(n,t.unlockedRooms)})),de(ese,(t,n)=>({...t,actions:{...t.actions,acceptInvite:{inProgress:!0,gameId:n.gameId}}})),de(tse,(t,n)=>({...t,actions:{...t.actions,acceptInvite:void 0}})),de(nse,(t,n)=>({...t,actions:{...t.actions,acceptInvite:void 0}})),de(ise,(t,n)=>({...t,playClients:Dm.upsertMany(n.gameIds.map(o=>({id:o,actions:{connect:{inProgress:!1,isSuccessful:!1},connectAndHandleState:{inProgress:!1,isSuccessful:!1}}})),t.playClients)})),de(rse,(t,n)=>{const o=t.playClients.entities[n.gameId];return{...t,playClients:Dm.updateOne({id:n.gameId,changes:{actions:{...o.actions,connect:{inProgress:!0,isSuccessful:!1}}}},t.playClients)}}),de(sse,(t,n)=>{const o=t.playClients.entities[n.gameId];return o?{...t,playClients:Dm.updateOne({id:n.gameId,changes:{actions:{...o.actions,connect:{inProgress:!1,isSuccessful:!0}}}},t.playClients)}:t}),de(ase,(t,n)=>{const o=t.playClients.entities[n.gameId];return o?{...t,playClients:Dm.updateOne({id:n.gameId,changes:{actions:{...o.actions,connect:{inProgress:!1,isSuccessful:!1}}}},t.playClients)}:t}),de(cse,(t,n)=>{const o=t.playClients.entities[n.gameId];return o?{...t,playClients:Dm.updateOne({id:n.gameId,changes:{actions:{...o.actions,connectAndHandleState:{inProgress:!0,isSuccessful:!1}}}},t.playClients)}:t}),de(lse,(t,n)=>{const o=t.playClients.entities[n.gameId];return o?{...t,playClients:Dm.updateOne({id:n.gameId,changes:{actions:{...o.actions,connectAndHandleState:{inProgress:!1,isSuccessful:!0}}}},t.playClients)}:t}),de(use,(t,n)=>{const o=t.playClients.entities[n.gameId];return o?{...t,playClients:Dm.updateOne({id:n.gameId,changes:{actions:{...o.actions,connectAndHandleState:{inProgress:!1,isSuccessful:!1}}}},t.playClients)}:t}),de(ose,(t,n)=>({...t,playClients:Dm.updateOne({id:n.gameId,changes:{actions:{connect:{inProgress:!1,isSuccessful:!1},connectAndHandleState:{inProgress:!1,isSuccessful:!1}}}},t.playClients)})));function WHe(t,n){return qHe(t,n)}const dR=Ts(I4.featureKey),$He=We(dR,t=>t.rooms),KHe=We(dR,t=>t.unlockedRooms),ZHe=We(dR,t=>t.playClients),JP=Cw.getSelectors($He),O4=M4.getSelectors(KHe),QHe=Dm.getSelectors(ZHe),wse=()=>We(JP.selectEntities,(t,n)=>t[n].isSpectating),Tse=()=>We(JP.selectAll,t=>!!t.find(n=>n.currentRoom&&n.currentRoom.state===Ve.ERoomState.Waiting&&!n.isSpectating)),Pse=()=>We(O4.selectAll,t=>t),Ise=()=>We(O4.selectEntities,(t,n)=>t[n]),Mse=()=>We(O4.selectEntities,(t,n)=>!!t[n]),Ose=()=>We(dR,t=>t.actions),Ese=()=>We(QHe.selectEntities,(t,n)=>t[n]);J.prototype.games={subscribeCurrentRoomState:function e7e(t){return this.select(We(JP.selectEntities,(t,n)=>t[n].currentRoom.state),t)}.bind(J.prototype),subscribeCurrentRoomViewModel:function t7e(t){return this.select(We(JP.selectEntities,(t,n)=>t[n].currentRoom),t)}.bind(J.prototype),subscribeCurrentTable:function n7e(t){return this.select(We(JP.selectEntities,(t,n)=>t[n].currentTable),t)}.bind(J.prototype),selectIsSpectator:function i7e(t){return this.selectSync(wse(),t)}.bind(J.prototype),subscribeIsSpectator:function o7e(t){return this.select(wse(),t)}.bind(J.prototype),subscribeIsRoomInWaitingState:function r7e(){return this.select(Tse())}.bind(J.prototype),selectIsRoomInWaitingState:function s7e(){return this.selectSync(Tse())}.bind(J.prototype),subscribeUnlockedPrivateRooms:function a7e(){return this.select(Pse())}.bind(J.prototype),selectUnlockedPrivateRooms:function c7e(){return this.selectSync(Pse())}.bind(J.prototype),subscribeIsUnlockedPrivateRoom:function d7e(t){return this.select(Mse(),t)}.bind(J.prototype),selectIsUnlockedPrivateRoom:function p7e(t){return this.selectSync(Mse(),t)}.bind(J.prototype),subscribeUnlockedPrivateRoom:function l7e(t){return this.select(Ise(),t)}.bind(J.prototype),selectUnlockedPrivateRoom:function u7e(t){return this.selectSync(Ise(),t)}.bind(J.prototype),selectActions:function h7e(t){return this.selectSync(Ose(),t)}.bind(J.prototype),subscribeActions:function m7e(t){return this.select(Ose(),t)}.bind(J.prototype),selectPlayClientState:function f7e(t){return this.selectSync(Ese(),t)}.bind(J.prototype),subscribePlayClientState:function g7e(t){return this.select(Ese(),t)}.bind(J.prototype)};let pR=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[$r.forFeature(I4.featureKey,WHe)]}),n})(),xse=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R){var G=this;this.gameClientFactory=e,this.ngZone=i,this.appState=r,this.urlService=s,this.events=a,this.clientConfig=c,this.store=u,this.constants=h,this.actions=b,this.userRepository=w,this.defaultAvatarsService=R,this.subscriptions=new ie.List,this.exceptionLogger=new KG,this.onGameException=K=>{K&&this.exceptionLogger.log(K),console.error("Reload game",K),this.emitEvent(_i.GameException)},this.loadGameResources=()=>new Promise(function(){var K=f(function*(te,ee){try{G.gameVendorResource=new Mb("".concat(G.currentGameConfig.path).concat(G.currentGameConfig.scripts[0])),G.gameResource=new Mb("".concat(G.currentGameConfig.path).concat(G.currentGameConfig.scripts[1])),G.gameVendorResource.addUnloadCallback(G.unloadGameVendorResourceCallback),G.gameResource.addUnloadCallback(G.unloadGameResourceCallback),console.log("Loading phaser.js!"),yield G.gameVendorResource.load(),yield G.gameResource.load(),console.log("Loaded main.js!"),te()}catch(le){G.unloadGameResources(),ee(le)}});return function(te,ee){return K.apply(this,arguments)}}()),this.onGameLoadingComplete=()=>{console.log("Game loading complete."),this.stopLoadingTimeout(),this.removePageVisibilityListeners(),this.setServiceState(_o.Ready)},this.gameEnded=()=>{this.bettingGameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded)},this.onGameLoadingTimeout=()=>{this.cancelResourceLoading(),this.removePageVisibilityListeners(),this.stopLoadingTimeout()},this.loadGameBackground=()=>new Promise(function(){var K=f(function*(te){G.gameBackgroundResource=new YG(G.getBackgroundUrl(G.currentGameConfig));try{yield G.gameBackgroundResource.load()}catch(ee){te()}finally{G.gameBackgroundResource.unload(),te()}});return function(te){return K.apply(this,arguments)}}()),this.onPageVisible=()=>{this.loadingTimer.getState()===fc.Paused?this.loadingTimer.resume():this.loadingTimer.restart()},this.onPageHide=()=>{this.loadingTimer.pause()},this.stopLoadingTimeout=()=>{this.loadingTimer.clear()},this.handleBuyCurrency=K=>{const te={gameId:this.currentGameConfig.id,...K.data.args};this.emitEvent(Tt.EGameClientEvent.BuyCurrency,te,K.data.onSuccess,K.data.onFail)},this.onSettingsOpened=()=>{console.warn("Game drawer tab open event: settingsTab"),this.emitEvent(_i.DrawerTabOpened,"settingsTab")},this.onChipsUpdate=K=>{console.log("onChipsUpdate",K),K.reason!==PP.Minislot&&this.bettingGameClient&&this.bettingGameClient.updateWallet(this.store.selectWallet())},this.unloadGameVendorResourceCallback=()=>{delete window.Phaser,delete window.PIXI},this.unloadGameResourceCallback=()=>{this.currentGameConfig&&delete window[this.currentGameConfig.class]},this.state=_o.Initial,this.loadingTimer=new XU(this.onGameLoadingTimeout,9e4)}returnPlayerToGame(e){console.log("Game service returnPlayerToGame",e),this.startGame(e)}startGame(e){var i=this;return f(function*(){console.log("startGame(roomViewModel: IRoomViewModel, gameViewModel: IGameViewModel)"),i.currentGameConfig=i.clientConfig.getGameRelatedConfig(e).gameConfig,i.setServiceState(_o.LoadingResources),i.emitEvent(_i.GameStartInit);try{i.bgLoadTask=new Jn(i.loadGameBackground()),yield i.bgLoadTask,i.removeAppBodyBackground(),i.emitEvent(_i.NavigatedToGame),i.resourcesLoadTask=new T_(i.loadGameResources,{maxRetriesCount:5,retryDelayMs:3e3}),yield i.resourcesLoadTask,i.applyChangesToVendorCode(),console.warn("await this.gameVendorReady()"),yield i.gameVendorReady(),i.setServiceState(_o.GameLoading),i.runGame()}catch(r){console.error(r),r instanceof Cr||(r instanceof GA?i.emitEvent(_i.GameLoadTimeout):i.onGameException())}})()}dispose(){this.removeGameScripts(),this.setServiceState(_o.Disposed)}removeGameScripts(){this.stopLoadingTimeout(),this.clearInGameListeners(),this.removePageVisibilityListeners(),this.cancelResourceLoading(),this.cancelGameBackgroundLoading(),this.cancelVendorReadyTask();try{void 0!==this.game&&this.game.destroy()}catch(i){console.error(i)}try{var e;null===(e=this.bettingGameClient)||void 0===e||e.destroy()}catch(i){console.error("Error deleting game properties from window object!",i)}finally{this.game=void 0,this.bettingGameClient=void 0,this.unloadGameResources(),console.log("Set state as not loaded")}}unloadGameResources(){this.gameVendorResource&&(this.gameVendorResource.unload(),this.gameVendorResource=void 0),this.gameResource&&(this.gameResource.unload(),this.gameResource=void 0)}onGameViewDestroyed(){this.showAppBodyBackground(),this.emitEvent(_i.GameViewLeft)}changeInGameSettings(e){this.bettingGameClient.changeSettings(e)}getWallet(){return this.store.selectWallet()}myPlayerId(){return this.store.selectUserState().profile.id}onConnectionLost(){console.warn("Lost connection in game!"),this.cancelResourceLoading(),this.cancelGameBackgroundLoading(),this.cancelVendorReadyTask()}subscribe(e,i){return new ie.EventListener(this.events,e,i)}unsubscribe(e,i){this.events.removeListener(e,i)}getBackgroundUrl(e=this.currentGameConfig){return this.urlService.getImageUrl(e.backgroundImage)}get gameState(){return this.state}reloadGame(e){this.removeGameScripts(),this.returnPlayerToGame(e)}ngOnDestroy(){this.dispose(),this.onGameViewDestroyed()}setServiceState(e){const i=this.gameState;this.state=e,this.emitEvent(_i.ClientGameStateChange,{previous:i,current:e})}runGame(){this.ngZone.runOutsideAngular(()=>{this.bettingGameClient=this.gameClientFactory.createBettingGameClient(this.currentGameConfig.id,TP.domElementId,this,!1),this.setInGameListeners(),this.gameVendorResource.setAsUsed(),this.gameResource.setAsUsed(),this.game=UA.createGameInstance(this.currentGameConfig.class,this.bettingGameClient)}),this.addPageVisibilityListeners(),this.startLoadingTimeout()}subscribeOnBuyCurrency(e){return new ie.EventListener(this.events,Tt.EGameClientEvent.BuyCurrency,e)}unsubscribeOnBuyCurrency(e){this.events.removeListener(Tt.EGameClientEvent.BuyCurrency,e)}requestUserProfile(e){var i=this;return f(function*(){const r=(yield i.userRepository.getSimpleProfiles([e]))[0],s=Lo.toGDKProfile(r);return{...s,avatar:i.buildAvatarUrl(s.avatar),avatarUrl:i.buildAvatarUrl(s.avatar)}})()}transformProfile(e){return{...e,avatar:this.buildAvatarUrl(e.avatar),avatarUrl:this.buildAvatarUrl(e.avatar)}}getUserProfile(e){const i=this.store.selectUserState().profile;if(i.id===e)return Lo.toGDKProfile(i)}gameVendorReady(){return this.vendorReadyTask=new Jn(new Promise((e,i)=>{window.Phaser?window.Phaser.Device.whenReady(e):i(new Error("Vendor code is not loaded!"))})),this.vendorReadyTask}applyChangesToVendorCode(){window.PIXI&&(window.PIXI.CanvasTinter.tintMethod=window.PIXI.CanvasTinter.tintWithPerPixel)}startLoadingTimeout(){!0===this.appState.getAppState().visible&&this.loadingTimer.restart()}addPageVisibilityListeners(){this.appState.subscribe(co.PageVisible,this.onPageVisible),this.appState.subscribe(co.PageHide,this.onPageHide)}removePageVisibilityListeners(){this.appState.unsubscribe(co.PageVisible,this.onPageVisible),this.appState.unsubscribe(co.PageHide,this.onPageHide)}setInGameListeners(){console.log("Setting inGame listeners."),this.bettingGameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameLoaded,this.onGameLoadingComplete),this.bettingGameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.OpenSettings,this.onSettingsOpened),this.bettingGameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded),this.bettingGameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.GameLoadError,this.onGameLoadingTimeout),this.bettingGameClient.eventDispatcher.addEventListener(Tt.EGameClientEvent.BuyCurrency,this.handleBuyCurrency),this.subscriptions.add(this.actions.pipe(ai(RP)).subscribe(this.onChipsUpdate))}clearInGameListeners(){var e;this.bettingGameClient&&this.bettingGameClient.eventDispatcher&&(this.bettingGameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameLoaded,this.onGameLoadingComplete),this.bettingGameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.OpenSettings,this.onSettingsOpened),this.bettingGameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameEnded,this.gameEnded),this.bettingGameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.GameLoadError,this.onGameLoadingTimeout),this.bettingGameClient.eventDispatcher.removeEventListener(Tt.EGameClientEvent.BuyCurrency,this.handleBuyCurrency)),null===(e=this.settingChangeListener)||void 0===e||e.detach(),this.subscriptions.forEach(i=>i.unsubscribe())}buildAvatarUrl(e){return e&&""!==e?this.defaultAvatarsService.isDefaultAvatar(e)?this.urlService.getImageUrl("".concat(DP,"/").concat(e)):"".concat(this.clientConfig.getConfig().core.cdn.url).concat(this.clientConfig.getConfig().core.cdn.path.avatars).concat(e):this.urlService.getImageUrl(this.constants.defaultAvatarPath)}emitEvent(e,...i){this.ngZone.run(()=>{this.events.emit(e,...i)})}cancelResourceLoading(){var e,i,r;null===(e=this.gameVendorResource)||void 0===e||e.abortLoading(),null===(i=this.gameResource)||void 0===i||i.abortLoading(),null===(r=this.resourcesLoadTask)||void 0===r||r.cancel()}cancelGameBackgroundLoading(){var e,i;null===(e=this.gameBackgroundResource)||void 0===e||e.abortLoading(),null===(i=this.bgLoadTask)||void 0===i||i.cancel()}cancelVendorReadyTask(){var e;null===(e=this.vendorReadyTask)||void 0===e||e.cancel()}removeAppBodyBackground(){document.body.classList.contains("prime")&&document.body.classList.remove("prime")}showAppBodyBackground(){document.body.classList.add("prime")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ZG),T(an),T(Sa),T(ii),T(nd),T(Zt),T(J),T(tn),T(yr),T(ed),T(Rp))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),v7e=(()=>{var t;class n{constructor(e,i){this.defaultAvatarService=e,this.fieldValidator=i}createRandomProfile(e={},i){var r;return{id:this.createRandomUserId({isBot:null!==(r=null==i?void 0:i.isBot)&&void 0!==r&&r}),avatar:this.defaultAvatarService.getRandomAvatar(),avatarUrl:this.defaultAvatarService.getRandomAvatar(),device:"web",inventory:[],level:(0,ie.randomInt)(5,70),isVip:(0,ie.randomInt)(0,2)%2==0,membershipLevel:(0,ie.randomInt)(10,30),username:this.createRandomUsername(),...e}}createRandomProfiles(e,i){const r=[];for(let s=0;s<e;s++)r.push(this.createRandomProfile({},i));return r}createRandomUsername(){return"Player".concat((0,ie.uuidV4)()).slice(0,this.fieldValidator.createUsernameValidator().maxLength)}createRandomUserId(e){return e.isBot?"bot_".concat((0,ie.uuidV4)().slice(3)):(0,ie.uuidV4)()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Rp),T(wa))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),ic=(()=>{var t;class n{constructor(e,i,r){this.constants=r,this.determineContext=()=>{let s=ba.Idle;if(this.navigation.getOutletUrl(oi)==="/".concat(this.constants.gameRoute))s=ba.InGame;else{const u=this.gamesPlayClient.currentPlayClient;u&&u.state.current&&u.state.current.stateName!==yn.Idle&&(s=ba.LobbyActivePlay)}const a=this.currentContext,c=s;return this.currentContext=s,a!==c&&this.events.emit("ctxChange",{previous:a,current:c}),this.currentContext},this.gamesPlayClient=e,this.navigation=i,this.events=new tc,this.navigation.events.pipe(bt(s=>s instanceof as)).subscribe(this.determineContext),this.gamesPlayClient.stateEvents.onClientStateTransition(this.determineContext)}getCurrent(){return this.currentContext?this.currentContext:this.determineContext()}onContextChange(e){return new ie.EventListener(this.events,"ctxChange",e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(oo),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var xh=function(t){return t.Module="modulePermission",t.Action="actionPermission",t.Room="roomPermission",t.Tile="tilePermission",t.Club="clubPermission",t}(xh||{}),Nc=function(t){return t.Role="role",t.Vip="vip",t.MinLevel="minLevel",t.MaxLevel="maxLevel",t.Context="context",t.ChipsBalance="chipsBalance",t.GemsBalance="gemsBalance",t.Platform="platform",t}(Nc||{});class E4{constructor(...n){if(this.type=Nc.Context,1===n.length)this.isFulfilled=n[0].every(e=>e.isFulfilled);else{const o=n[0],e=n[1];this.isFulfilled=o&&(!o.contexts||!o.contexts.length||void 0!==o.contexts.find(i=>i===e))}}}class yw{constructor(...n){if(this.type=Nc.Role,1===n.length)this.isFulfilled=n[0].every(e=>e.isFulfilled);else{const o=n[0],e=n[1];this.isFulfilled=e&&e.roles.some(i=>o.find(r=>r.name===i))}}}class k_{constructor(...n){if(this.type=Nc.MinLevel,1===n.length)if(Array.isArray(n[0])){const o=n[0];this.isFulfilled=o.every(e=>e.isFulfilled),this.requiredLevel=Math.max(...o.map(e=>e.requiredLevel))}else{const o=n[0];for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e])}else{const o=n[0],e=n[1];this.requiredLevel=e,this.isFulfilled=!!o&&o.level>=e}}}class Fb{constructor(...n){if(this.type=Nc.Vip,1===n.length)if(Array.isArray(n[0]))this.isFulfilled=n[0].every(e=>e.isFulfilled);else{const o=n[0];for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e])}else{const o=n[0],e=n[1];this.isFulfilled=!e.length||!!o&&e.filter(i=>i.id===Dc.EMembershipType.Vip).some(i=>o.hasTierOrHigher(i.tier))}}}class hR{constructor(...n){if(this.type=Nc.Platform,1===n.length)this.isFulfilled=n[0].every(e=>e.isFulfilled);else{const o=n[0],e=n[1];this.isFulfilled=e&&(!e.requirements.platform.length||e.requirements.platform.some(i=>i===hR.getPermissionPlatform(o)))}}static getPermissionPlatform(n){return n.getDevicePlatform()===$n.Facebook?WS.Facebook:n.getPlatform()===Ut.Android?WS.Android:n.getPlatform()===Ut.Ios?WS.IOs:(n.getPlatform(),WS.Browser)}}class Ase{constructor(n,o,e,i,r,s){this.type=xh.Action,this.action=n,this.config=o,this.modulePermission=e,this.isEnabled=!!o&&o.enabled&&this.modulePermission.isEnabled,this.store=i,this.playerContext=r,this.appService=s}get isPermitted(){return this.isEnabled&&this.failedRequirements.every(n=>n.isFulfilled)}get failedRequirements(){return[...this.modulePermission.failedRequirements,this.contextRequirement,this.minLevelRequirement,this.roleRequirement,this.vipRequirement,this.platformRequirement].filter(o=>!o.isFulfilled)}get contextRequirement(){return new E4(this.config,this.playerContext.getCurrent())}get roleRequirement(){var n;return new yw((null===(n=this.store.selectUserState())||void 0===n?void 0:n.roles)||[],this.config)}get minLevelRequirement(){return new k_(this.store.selectSimpleProfile(),this.config.requirements.level)}get vipRequirement(){return new Fb(this.store.selectSimpleProfile(),this.config.requirements.membership)}get platformRequirement(){return new hR(this.appService,this.config)}}class b7e extends Ase{constructor(n,o,e,i,r,s,a){super(n,o,e,i,r,s),this.type=xh.Club,this.clubProfile=a,this.myClubRole=this.getThisClubMyMemberRole()}get roleRequirement(){var n;const o=[];if(o.push(new yw([...(null===(n=this.store.selectUserState())||void 0===n?void 0:n.roles)||[]],this.config)),null!=this.myClubRole){const e=Ys.getAllEqualOrHigher(qo,this.myClubRole).map(i=>({name:FA.toPermissionRole(i)}));o.push(new yw(e,this.config))}return new yw(o)}get minLevelRequirement(){const n=this.store.selectSimpleProfile(),o=[new k_(n,this.config.requirements.level)];return this.action===nt.EModuleAction.SendClubJoinRequest&&o.push(new k_(n,this.clubProfile.settings.requirements.minLevel)),new k_(o)}getThisClubMyMemberRole(){var n,o;const e=null===(n=this.store.clubs)||void 0===n?void 0:n.selectCurrentClubState();return(null==e||null===(o=e.clubProfile)||void 0===o?void 0:o.id)===this.clubProfile.id?e.role:void 0}}class C7e{constructor(n,o,e){this.type=xh.Module,this.config=n,this.store=o,this.playerContext=e}get isEnabled(){return this.config.enabled}get isPermitted(){return this.isEnabled&&this.failedRequirements.every(n=>n.isFulfilled)}get failedRequirements(){return[this.contextRequirement].filter(o=>!o.isFulfilled)}get contextRequirement(){return new E4(this.config,this.playerContext.getCurrent())}get roleRequirement(){var n;return new yw((null===(n=this.store.selectUserState())||void 0===n?void 0:n.roles)||[],this.config)}get minLevelRequirement(){return new k_(this.store.selectSimpleProfile(),this.config.requirements.level)}get vipRequirement(){return new Fb(this.store.selectSimpleProfile(),this.config.requirements.membership)}}class mR{constructor(...n){if(this.type=Nc.ChipsBalance,1===n.length){const o=n[0];for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e])}else{const o=n[0];this.requiredAmount=n[1],this.isFulfilled=!!o&&this.requiredAmount<=o.chips}}}class Rse{constructor(...n){if(this.type=Nc.MaxLevel,1===n.length)if(Array.isArray(n[0])){const o=n[0];this.isFulfilled=o.every(e=>e.isFulfilled),this.requiredLevel=Math.min(...o.map(e=>e.requiredLevel))}else{const o=n[0];for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e])}else{const o=n[0],e=null!=n[1]?n[1]:1/0;this.requiredLevel=e,this.isFulfilled=!!o&&o.level<=e}}}class y7e{constructor(n,o){this.type=xh.Room,this.settings=n,this.store=o}get isPermitted(){return this.failedRequirements.every(n=>n.isFulfilled)}get failedRequirements(){return[this.vipRequirement,this.minLevelRequirement,this.maxLevelRequirement,this.chipsBalanceRequirement].filter(o=>!o.isFulfilled)}get minLevelRequirement(){return new k_(this.store.selectSimpleProfile(),this.settings.requirements.minLevel)}get maxLevelRequirement(){return new Rse(this.store.selectSimpleProfile(),this.settings.requirements.maxLevel)}get vipRequirement(){const n=[];return this.settings.requirements.requiresVip&&n.push({id:Dc.EMembershipType.Vip,tier:Fi.Full}),new Fb(this.store.selectSimpleProfile(),n)}get chipsBalanceRequirement(){return new mR(this.store.selectWallet(),this.settings.transactions.bet)}get roleRequirement(){return new mR(this.store.selectWallet(),this.settings.transactions.bet)}}class S7e{constructor(n,o={}){this.type=xh.Tile,this.lobbyTilePermission=n,this.roomPermission=o.roomPermission,this.actionPermission=o.actionPermission}get isPermitted(){return this.lobbyTilePermission.isPermitted&&(!this.roomPermission||this.roomPermission.isPermitted)&&(!this.actionPermission||this.actionPermission.isPermitted)}get failedRequirements(){return[this.roleRequirement,this.contextRequirement,this.vipRequirement,this.minLevelRequirement,this.maxLevelRequirement,this.chipsBalanceRequirement].filter(o=>!o.isFulfilled)}get isEnabled(){return this.lobbyTilePermission.isEnabled&&(!this.actionPermission||this.actionPermission.isEnabled)}get config(){return this.lobbyTilePermission.config}get settings(){return this.roomPermission?this.roomPermission.settings:void 0}get contextRequirement(){const n=[this.lobbyTilePermission.contextRequirement];return this.actionPermission&&n.push(this.actionPermission.contextRequirement),new E4(n)}get roleRequirement(){const n=[this.lobbyTilePermission.roleRequirement];return this.actionPermission&&n.push(this.actionPermission.roleRequirement),new yw(n)}get minLevelRequirement(){const n=[this.lobbyTilePermission.minLevelRequirement];return this.roomPermission&&n.push(this.roomPermission.minLevelRequirement),this.actionPermission&&n.push(this.actionPermission.minLevelRequirement),this.lobbyTilePermission&&n.push(this.lobbyTilePermission.minLevelRequirement),new k_(n)}get vipRequirement(){const n=[this.lobbyTilePermission.vipRequirement];return this.roomPermission&&n.push(this.roomPermission.vipRequirement),this.actionPermission&&n.push(this.actionPermission.vipRequirement),this.lobbyTilePermission&&n.push(this.lobbyTilePermission.vipRequirement),new Fb(n)}get platformRequirement(){const n=[this.lobbyTilePermission.platformRequirement];return this.actionPermission&&n.push(this.actionPermission.platformRequirement),new hR(n)}get maxLevelRequirement(){return this.roomPermission?this.roomPermission.maxLevelRequirement:new Rse({isFulfilled:!0})}get chipsBalanceRequirement(){return this.roomPermission?this.roomPermission.chipsBalanceRequirement:new mR({isFulfilled:!0})}}const w7e=[bu];let x4=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[w7e]}),n})(),kse=(()=>{var t;class n{constructor(e){this.injector=e}createModuleConfig(e){return this.config[e]||this.createDefaultModuleConfig(e)}createModuleActionConfig(e,i){return this.createModuleConfig(e).actions[i]}createModulePermission(e){const i=this.createModuleConfig(e);return new C7e(i,this.injector.get(J),this.injector.get(ic))}createActionPermission(e,i){const r=this.createModuleActionConfig(e,i),s=this.createModulePermission(e);return new Ase(i,r,s,this.injector.get(J),this.injector.get(ic),this.injector.get(Qt))}createRoomPermission(e){return new y7e(e,this.injector.get(J))}createTilePermission(e){const i=this.createActionPermission(nt.EPermissionModule.Lobby,e.id);let r,s;return e.roomSettings&&(r=this.createRoomPermission(e.roomSettings)),e.tileModuleAction&&(s=this.createActionPermission(e.tileModuleAction.module,e.tileModuleAction.action)),new S7e(i,{roomPermission:r,actionPermission:s})}createClubActionPermission(e,i){let r;switch(e.settings.privacy){case Or.Public:r=nt.EPermissionModule.PublicClub;break;case Or.Private:r=nt.EPermissionModule.PrivateClub;break;case Or.Closed:r=nt.EPermissionModule.ClosedClub;break;default:throw new Error("No club permissions found for club with privacy type ".concat(e.settings.privacy))}const s=this.createModuleActionConfig(r,i),a=this.createModulePermission(r);return new b7e(i,s,a,this.injector.get(J),this.injector.get(ic),this.injector.get(Qt),e)}get config(){const e=this.injector.get(J).selectUserState();return e?e.permissions:{}}createDefaultModuleConfig(e){return{enabled:!1,actions:{},roles:[]}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:x4}),n})();class T7e{constructor(...n){if(this.type=Nc.GemsBalance,1===n.length){const o=n[0];for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e])}else{const o=n[0];this.requiredAmount=n[1],this.isFulfilled=!!o&&this.requiredAmount<=o.gems}}}let Ti=(()=>{var t;class n{constructor(e,i){this.permissionFactory=e,this.store=i}getModuleConfig(e){return this.permissionFactory.createModuleConfig(e)}getModuleActionConfig(e,i){return this.permissionFactory.createModuleActionConfig(e,i)}getChipBalanceRequirement(e){return new mR(this.store.selectWallet(),e)}getGemBalanceRequirement(e){return new T7e(this.store.selectWallet(),e)}getMinLevelRequirement(e,i){return new k_(e,i)}getModulePermission(e){return this.permissionFactory.createModulePermission(e)}getActionPermission(e,i){return this.permissionFactory.createActionPermission(e,i)}getRoomPermission(e){return this.permissionFactory.createRoomPermission(e)}getTilePermission(e){return this.permissionFactory.createTilePermission(e)}getClubActionPermission(e,i){return this.permissionFactory.createClubActionPermission(e,i)}throwIfNotPermitted(e,i){let r;if(r=i?this.getActionPermission(e,i):this.getModulePermission(e),!r.isPermitted){const s=r.failedRequirements[0].type;let a;throw s===Nc.MinLevel||s===Nc.MaxLevel?a=r.failedRequirements[0].requiredLevel:(s===Nc.ChipsBalance||s===Nc.GemsBalance)&&(a=r.failedRequirements[0].requiredAmount),new et.Permissions.RequirementNotMeet(s,a)}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(kse),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:x4}),n})();new Ot("PermissionsService",{factory:()=>new Ti(mt(kse),mt(J))});const P7e=new Ot("");let nn=(()=>{var t;class n{get context(){const e=[];return this.parentContext.length&&e.push(...this.parentContext),this.customContext&&e.push(this.customContext),e}constructor(e,i){this.parentContext=[],this.customContext={ctx:e||""},i&&(this.parentContext=[...i.context])}setContext(e,i=this.parentContext){e&&(this.customContext.ctx="string"==typeof e?e:e.ctx),i&&(this.parentContext=i)}getContext(e=""){return this.context.map(i=>i.ctx).concat(e).filter(i=>i).join(":")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(P7e,8),T(t,12))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var Ub,fR;!function(t){t.DefaultEvent=class n{constructor(i,r,s){this.category=i,this.type=r,this.args=s}},t.LevelUpEvent=class o{constructor(i,r,s){this.category=i,this.type=r,this.args=s}}}(Ub||(Ub={}));class I7e{constructor(n,o){this.appService=n,this.config=o,this.appService.isMobileApp()&&(this.messagesPlugin=this.appService.getMobileAppService().messages())}sendEvent(n){jS.checkIfTrackingEventIsSupported(n,this.config)&&(console.warn("NativeTrackingService",n),this.messagesPlugin&&this.messagesPlugin.sendEvent({action:n.type,args:n.args}))}}(fR||(fR={})).PurchaseTrackEvent=class n{constructor(e,i,r){this.category=e,this.type=i,this.args=r}};class M7e{constructor(n){this.fbEvents=[{analyticsEventInfo:{category:Nn.Purchase,type:"track"},fbPixelEventInfo:{category:"Purchase",type:"track"}}],this.config=n,this.initialized=new Promise(function(){var o=f(function*(e,i){if(!Lt.CONFIG.core.tracking.fbPixel.enabled)return Promise.resolve();let r=Lt.CONFIG.core.tracking.fbPixel.trackingId;if(window.fbq)return Promise.resolve();const s=window.fbq=function(){s.callMethod?s.callMethod.apply(s,arguments):s.queue.push(arguments)};window._fbq||(window._fbq=s),s.push=s,s.loaded=!0,s.version="2.0",s.queue=[],s.disablePushState=!0,window.fbq("set","autoConfig","false",r),window.fbq("init",r),window.fbq("track","PageView");try{yield Th.loadScript("https://connect.facebook.net/en_US/fbevents.js",!0),e()}catch(a){console.error("Error initializing FBPixel service",a)}});return function(e,i){return o.apply(this,arguments)}}())}sendEvent(n){this.initialized.then(()=>{if(!jS.checkIfTrackingEventIsSupported(n,this.config))return;console.warn("FbPixelService",n);const e=this.fbEvents.find(i=>Kf(i.analyticsEventInfo,{category:n.category,type:n.type})).fbPixelEventInfo;window.fbq(e.type,e.category,n.args)})}}var Gb=__webpack_require__(14831),A4=__webpack_require__.n(Gb);function Lse(t,n=oP){return vr((o,e)=>{let i=null,r=null,s=null;const a=()=>{if(i){i.unsubscribe(),i=null;const u=r;r=null,e.next(u)}};function c(){const u=s+t,h=n.now();if(h<u)return i=this.schedule(void 0,u-h),void e.add(i);a()}o.subscribe(eo(e,u=>{r=u,s=n.now(),i||(i=n.schedule(c,t),e.add(i))},()=>{a(),e.complete()},void 0,()=>{r=i=null}))})}let Ua=(()=>{var t;class n{constructor(e,i){this.ngZone=e,this.document=i,this.dimensions={},this.changeObservable=new sn,this.orientationChangeListener=r=>{this.dimensions={},this.changeObservable.next(r)},this.ngZone.runOutsideAngular(()=>{window.addEventListener("resize",this.orientationChangeListener)})}getAppSize(){return this.getElementDimension(this.document.body,"body")}change(){return this.changeObservable.pipe(Lse(500))}getElementDimension(e,i){return this.change().pipe(VT(Tp),es(()=>this.dimensions[i]?Xn(this.dimensions[i]):new ao(r=>{Gb.measure(()=>{const s={width:e.clientWidth,height:e.clientHeight,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight};i&&(this.dimensions[i]=s),this.ngZone.run(()=>r.next(s))})})),ws((r,s)=>r.width===s.width&&r.height===s.height))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(an),T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var Sw=void 0;function Bse(t,n){t.push.apply(t,n)}function Nse(t,n){for(var o=0;o<n.length;o++){var e=t.indexOf(n[o]);-1!==e&&t.splice(e,1)}}function R4(t){return Array.isArray(t)?t:[t]}var gR=function(){};function k4(t){var a,c,n=!1!==(t=t||{}).distinct,o=t.onNext||gR,e=t.onDispose||gR,i=t.onSubscribe||gR,r=t.onUnsubscribe||gR,s=R4(t.subscribe||[]);return{value:function(){return a},dispose:function(){s.length=0,e()},next:function(u){if(c||(c=[]),c.push(u),!(c.length>1)){for(var h=0;h<c.length;h++){var b=s.slice();if(u=c[h],!n||u!==a){a=u;for(var w=0;w<b.length;w++)b[w](u)}}c.length=0,o(u,s)}},subscribe:function(u){return u=R4(u),i(s),Bse(s,u),function(){Nse(s,u),r(s)}}}}var Fse=typeof requestAnimationFrame<"u"?requestAnimationFrame.bind(window):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},_R=k4({onSubscribe:function(t){t.length||Fse(_R.next)},onNext:function(t,n){n.length&&Fse(_R.next)}});function L4(t){return"string"==typeof t}var Use=Math,E7e=Use.min,x7e=Use.max;function Gse(t,n,o){return E7e(x7e(n,t),o)}function ww(t){var n=t||{},o=function Dse(t,n){return t instanceof n?t:Object.create(n.prototype)}(this,ww);o._opts=n,o._timer=n.timer||_R,o._pos=n.duration||0,o._time=0,o.labels=n.labels||{},o.easing=n.easing,o.playbackRate=1,o._tick=function(i){var s=o._time+(n.frameSize||(i-(o._last||i))*o.playbackRate);o._last=i,o.seek(s)};var e=k4(n);return o.dispose=function(){o.pause(),o._pos=0,o._time=0,o.playbackRate=1,o._tweens=Sw,o.labels={},e.dispose()},o.next=e.next,o.value=e.value,o.subscribe=e.subscribe,o}function R7e(t){return t instanceof ww?t:ww(t)}ww.prototype={get duration(){var n=this._tweens,o=this._pos;if(n)for(var e=0,i=n.length;e<i;e++){var r=n[e],s=r.pos+r.tween.duration;o<s&&(o=s)}return o},set duration(t){this._pos=t},get currentTime(){return this._time},set currentTime(t){this.seek(t)},get isPlaying(){return!!this._sub},add:function(t,n){var o=this;o._tweens||(o._tweens=[]),t=R4(t);for(var e=o._tweens,i=function A7e(t,n){return t===Sw?n:t}(L4((n=n||{}).position)?o.labels[n.position]:n.position,o.duration),r=n.sequence,s=n.stagger,a=t.length,c=Array(a),u=0;u<a;u++){var h=R7e(t[u]);h.isPlaying&&h.pause(),h._timer=Sw,c[u]={pos:i,tween:h},r&&(i+=h.duration),s&&(i+=s)}return Bse(e,c),function(){Nse(e,c)}},play:function(){var t=this,n=t._timer;if(n&&!t.isPlaying){var o=t.playbackRate>=0,e=t.duration,i=t._time;o&&i>=e?i=0:!o&&i<=0&&(i=e),t.seek(i),t._sub=n.subscribe(t._tick),t._opts.onPlay&&t._opts.onPlay()}return t},restart:function(){var t=this;return t.pause().seek(t.playbackRate>=0?0:t.duration).play()},pause:function(){var t=this,n=t._sub;return n&&(n(),t._sub=t._last=Sw,t._opts.onPause&&t._opts.onPause()),t},reverse:function(){return this.playbackRate*=-1,this},seek:function(t){var s,n=this,o=n.playbackRate>=0,e=n.isPlaying,i=n.duration,r=L4(t)?n.labels[t]:t;o&&r>=i?(r=i,n.pause(),s=!0):!o&&r<=0&&(r=0,n.pause(),s=!0),n._time=r;var a=r/(i||1);n.easing&&(a=n.easing(a)),s&&e&&n._opts.onFinish&&n._opts.onFinish();var c=r<n.value();n.next(a);var u=n._tweens;if(u){var h=i-r;u.sort(function(le,me){return(h+le.pos)%i-(h+me.pos)%i}),c&&u.reverse();for(var b=0,w=u.length;b<w;b++){var R=u[b],G=R.tween,K=R.pos,ee=Gse((r-K)/(K+(G.duration||1)-K),0,1);G.next(ee)}}return n},getLabel:function(t){return this.labels[t]},setLabel:function(t,n){return this.labels[t]=n,this}};var D4=__webpack_require__(36690),k7e=__webpack_require__.n(D4),L7e=__webpack_require__(22487),XP=__webpack_require__(64430),zse=__webpack_require__.n(XP),is=__webpack_require__(78650);let Go=(()=>{var t;class n{constructor(e,i){this.numberPipe=e,this.translate=i,this.lastResult=void 0}transform(e,i,r){if(!e)return"0";if(i){let s=this.numberPipe.transform(e,"1.2-2"),a=this.replaceThousandSeparator(s,this.translate.instant("LOCALE.THOUSAND_SEPARATOR"));a=this.replaceDecimalSeparator(a,this.translate.instant("LOCALE.DECIMAL_SEPARATOR")),this.lastResult=r?a+" "+this.translate.instant("LOCALE.CURRENCY_SIGN"):a}else{let s=this.numberPipe.transform(e,"1.0-2");this.lastResult=this.replaceThousandSeparator(s,this.translate.instant("LOCALE.THOUSAND_SEPARATOR"))}return this.lastResult}replaceThousandSeparator(e,i){return e.toString().split(",").join(i)}replaceDecimalSeparator(e,i){return e.toString().substr(0,e.toString().length-3)+i+e.toString().substr(e.toString().length-2,e.toString().length)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Lx,16),g(pi,16))},t.\u0275pipe=Vr({name:"formatNumber",type:t,pure:!0}),n})(),qe=(()=>{var t;class n{constructor(e,i){this.translate=e,this.formatNumber=i}transform(e,i=[]){let s,a,r="";return e?("object"==typeof e?(s=e.key,a=e.params?[...e.params,...i]:i):(s=e,a=i),r=this.translate.instant(s),a&&(r=r.replace(/{(\d+)}/g,(c,u)=>{let h=a[u-1];return void 0!==h?("number"==typeof h&&(h=this.formatNumber.transform(h)),this.translate.instant(h.toString())):c})),r):r}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ls,16),g(Go,16))},t.\u0275pipe=Vr({name:"translate",type:t,pure:!0}),n})(),Tw=(()=>{var t;class n{constructor(e){this.translatePipe=e}transform(e,i,r){const s=i===HS.Title,a=e.id.split("_")[0],c="CHALLENGES.MISSIONS.".concat(e.categoryId.toUpperCase(),".").concat(a);if(s){let u="".concat(c,".TITLE_").concat(r);const h=this.translatePipe.transform(u);return h!==u?h:this.translatePipe.transform("".concat(c,".TITLE_0"))}{const u=this.translatePipe.transform("CHALLENGES.GAMES.".concat(e.games&&e.games.length?e.games[0].game:null)),h=e.getPointByLevel(r);return this.translatePipe.transform("".concat(c,".DESCRIPTION"),[h,u])}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(qe,16))},t.\u0275pipe=Vr({name:"challengeTranslate",type:t,pure:!0}),n})(),Bm=(()=>{var t;class n{constructor(e,i){this.elapsed=0,this.timeElapsed=null,this.minuteMs=60,this.hourMs=60*this.minuteMs,this.dayMs=24*this.hourMs,this.monthMs=30*this.dayMs,this.yearMs=365*this.dayMs,this.time=e,this.translation=i}transform(e,i){if(null==e)return this.translation.getParsedTranslation("USER_STATS.NEVER");switch(this.elapsed=Math.max(this.time.getServerTimeS()-e,1),this.timeType=this.elapsed<this.minuteMs?Rt.Seconds:this.elapsed<this.hourMs?Rt.Minutes:this.elapsed<this.dayMs?Rt.Hours:this.elapsed<this.monthMs?Rt.Days:this.elapsed<this.yearMs?Rt.Months:Rt.Years,this.timeType){case Rt.Seconds:this.timeElapsed=Math.round(this.elapsed),this.timePeriodKey=1===this.timeElapsed?"SECOND_AGO":"SECONDS_AGO";break;case Rt.Minutes:this.timeElapsed=Math.round(this.elapsed/this.minuteMs),this.timePeriodKey=1===this.timeElapsed?"MINUTE_AGO":"MINUTES_AGO";break;case Rt.Hours:this.timeElapsed=Math.round(this.elapsed/this.hourMs),this.timePeriodKey=1===this.timeElapsed?"HOUR_AGO":"HOURS_AGO";break;case Rt.Days:this.timeElapsed=Math.round(this.elapsed/this.dayMs),this.timePeriodKey=1===this.timeElapsed?"DAY_AGO":"DAYS_AGO";break;case Rt.Months:this.timeElapsed=Math.round(this.elapsed/this.monthMs),this.timePeriodKey=1===this.timeElapsed?"MONTH_AGO":"MONTHS_AGO";break;case Rt.Years:this.timeElapsed=Math.round(this.elapsed/this.yearMs),this.timePeriodKey=1===this.timeElapsed?"YEAR_AGO":"YEARS_AGO";break;default:console.warn("Some error I guess..")}return this.translation.getParsedTranslation("DATE_AGO.".concat(this.timePeriodKey),[this.timeElapsed])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Bn,16),g(pi,16))},t.\u0275pipe=Vr({name:"timeElapsedPipe",type:t,pure:!0}),n})(),vR=(()=>{var t;class n{constructor(){this.desanitizeConfig=[{regexp:new RegExp("&quot;","g"),newValue:'"'},{regexp:new RegExp("&lt;","g"),newValue:"<"},{regexp:new RegExp("&gt;","g"),newValue:">"},{regexp:new RegExp("&amp;","g"),newValue:"&"}]}transform(e){if(!e)return e;let i=e;for(let r of this.desanitizeConfig)i=i.replace(r.regexp,r.newValue);return i}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"desanitize",type:t,pure:!0}),n})(),kp=(()=>{var t;class n{constructor(e,i){this.datePipe=e,this.translate=i,this.lastResult=""}transform(e,i){const r=new Date(1e3*e);return this.lastResult="dMMMMYYYY"===i?"".concat(r.getDate()," ").concat(this.translate.instant(n.months[r.getMonth()])," ").concat(r.getFullYear()):this.datePipe.transform(r,i),this.lastResult}}return(t=n).months=["MONTHS.JAN","MONTHS.FEB","MONTHS.MAR","MONTHS.APR","MONTHS.MAY","MONTHS.JUN","MONTHS.JUL","MONTHS.AUG","MONTHS.SEP","MONTHS.OCT","MONTHS.NOV","MONTHS.DEC"],t.\u0275fac=function(e){return new(e||t)(g(sb,16),g(pi,16))},t.\u0275pipe=Vr({name:"exactDate",type:t,pure:!0}),n})(),Pw=(()=>{var t;class n{transform(e){return"number"==typeof e&&(e/=1e3),e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"formatSeconds",type:t,pure:!0}),n})(),bR=(()=>{var t;class n{constructor(e,i,r){this.config=e,this.navigation=i,this.sanitizer=r;const s=[...e.social.chat.public.links.allowedSites,e.platform.domain];this.regExp=new RegExp("(https?://([a-z0-9-.]+.)?(".concat(s.join("|"),")(/[^\\s]+)?)"))}transform(e){if(!e||!1===Lt.CONFIG.social.chat.public.links.enabled)return e;let i;if(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),this.navigation.isDomainLink(e)){const r=e.match(new RegExp("(https?://([a-z0-9-.]+.)?(".concat(this.config.platform.domain,")(/[^\\s]+)?)")));if(r){const s=r[0].split("#")[1],a=null==s?void 0:s.split("(".concat(Fn,":").concat(Ai))[1];let c;a?(c="".concat(this.navigation.getOutletUrl(oi),"(").concat(Fn,":").concat(Ai).concat(a),i='<a class="transformed-link" data-relative-path="'.concat(c,'" href="').concat(c,'">$1</a>')):i=s?'<a class="transformed-link" data-relative-path="'.concat(s,'" href="/#').concat(s,'">$1</a>'):'<a class="transformed-link" href="$1" target="_blank">$1</a>'}else i='<a class="transformed-link" href="$1" target="_blank">$1</a>'}else i='<a class="transformed-link" href="$1" target="_blank">$1</a>';return this.sanitizer.sanitize(Od.HTML,e).replace(this.regExp,r=>(r=r.replace("/?#/watch","/watch"),i.replace(/\$1/g,r)))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Dr,16),g(Yt,16),g(z3,16))},t.\u0275pipe=Vr({name:"linkTransform",type:t,pure:!0}),n})(),L_=(()=>{var t;class n{constructor(){}transform(e,i){return e>i?"".concat(i,"+"):"".concat(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"numberLimit",type:t,pure:!0}),n})(),Ta=(()=>{var t;class n{constructor(e){this.sanitizer=e}transform(e){return this.sanitizer.bypassSecurityTrustHtml(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(z3,16))},t.\u0275pipe=Vr({name:"safeHtml",type:t,pure:!0}),n})(),eI=(()=>{var t;class n{transform(e){e=Math.floor(e);const i=["","K","M","B","T","P","E"];let r=Math.log10(Math.abs(e))/3|0;if(0===r)return e.toString();r>i.length-1&&(r=i.length-1);const s=i[r],a=Math.pow(1e3,r),c=e/a;let u;u=c>100?0:c>10?1:2;const h=Math.pow(10,u);return(Math.floor(e/a*h)/h).toString()+s}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"shortNumber",type:t,pure:!0}),n})(),CR=(()=>{var t;class n{transform(e,i){return e&&e.length>i?"".concat(e.slice(0,i-3),"..."):e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275pipe=Vr({name:"textLimit",type:t,pure:!0}),n})(),B4=(()=>{var t;class n{constructor(e){this.formatNumber=e}transform(e,i,r){return i&&r?i<r?this.calculateSuffix(e):this.result=this.formatNumber.transform(e):this.calculateSuffix(e),this.result}calculateSuffix(e){e<1e3&&(this.result="".concat(e)),e>=1e3&&e<1e6&&(this.result="".concat(this.devision(e,Vb.Thousands),"K")),e>=1e6&&e<1e9&&(this.result="".concat(this.devision(e,Vb.Millions),"M")),e>=1e9&&(this.result="".concat(this.devision(e,Vb.Billions),"B"))}devision(e,i){let r=e;const s=this.createTypeObject(i);return r%s.value==0?r/=s.value:r=(r/s.value).toFixed(s.separator),r}createTypeObject(e){let i;switch(e){case Vb.Thousands:i={value:1e3,separator:1};break;case Vb.Millions:i={value:1e6,separator:2};break;case Vb.Billions:i={value:1e9,separator:2}}return i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Go,16))},t.\u0275pipe=Vr({name:"thousandSuffixes",type:t,pure:!0}),n})();var Vb=function(t){return t[t.Thousands=0]="Thousands",t[t.Millions=1]="Millions",t[t.Billions=2]="Billions",t}(Vb||{});let Ps=(()=>{var t;class n{constructor(e){this.translation=e}transform(e,i){var r;const s=(null==i?void 0:i.timeConfig)||(new yl).build(),a=Math.min(Gn.getBiggestTimePeriodBySeconds(e),null!==(r=null==i?void 0:i.maxTimeUnitsType)&&void 0!==r?r:Rt.Years),c=Object.keys(s).find(R=>s[R].period===a),u=s[c].timeFormat;let h=(null==i?void 0:i.minTimeUnitsType)&&1===Gn.compareTwoPeriods(null==i?void 0:i.minTimeUnitsType,s[c].min),b=s[c].max,w=h?null==i?void 0:i.minTimeUnitsType:s[c].min;return null!=i&&i.minTimeUnitsType&&1===Gn.compareTwoPeriods(null==i?void 0:i.minTimeUnitsType,a)?"".concat(this.translation.getParsedTranslation("TIME.LESS_THAN",[1])," ").concat(this.translation.getParsedTranslation(Gn.getTimeKey(Gn.getSecondsByPeriod(i.minTimeUnitsType),{period:i.minTimeUnitsType,format:qi.Normal}))," "):null!=i&&i.showLessThanTimeUnit&&1===Gn.compareTwoPeriods(i.showLessThanTimeUnit,a)?"".concat(this.translation.getParsedTranslation("TIME.LESS_THAN",[1])," ").concat(this.translation.getParsedTranslation(Gn.getTimeKey(Gn.getSecondsByPeriod(i.showLessThanTimeUnit),{period:i.showLessThanTimeUnit,format:qi.Normal}))," "):this.getResult({secondsRemaining:e,currentPeriod:b,min:w,max:b,timeFormat:u,isFirstPeriod:!0,showNullValue:s[c].showNullValue,showDoubleDigits:s[c].showDoubleDigits,showTextPeriod:s[c].showTextPeriod})}getResult(e){e.isFirstPeriod&&(e.result="");const i=new Gn(e.secondsRemaining),r=e.isFirstPeriod?i.getTotalTimeAmountByPeriod(e.currentPeriod):i.getTimeAmountByPeriod(e.currentPeriod),s=e.min===e.currentPeriod;return e.result+=this.getFormatedPeriod({...e,timeAmount:r,period:e.currentPeriod,isLastPeriod:s}),s?e.result:this.getResult({...e,isFirstPeriod:!1,currentPeriod:Gn.getPrevTimePeriod(e.currentPeriod)})}getFormatedPeriod(e){if(!e.showNullValue&&0===e.timeAmount)return"";if(!e.showTextPeriod){let i=e.timeAmount.toString();return e.timeAmount<10&&e.showDoubleDigits&&(i="0".concat(e.timeAmount.toString())),e.isLastPeriod?i:"".concat(i,":")}return"".concat(e.timeAmount).concat(this.getTextPeriod(e)," ")}getTextPeriod(e){const i=this.translation.getParsedTranslation(Gn.getTimeKey(e.secondsRemaining,{period:e.period,format:e.timeFormat}));return e.timeFormat===qi.Normal?" ".concat(i):i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(pi,16))},t.\u0275pipe=Vr({name:"timeLeft",type:t,pure:!0}),n})(),uo=(()=>{var t;class n{constructor(e){this.urlService=e}transform(e){return this.urlService.getImageUrl(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii,16))},t.\u0275pipe=Vr({name:"transformUrl",type:t,pure:!0}),n})(),yR=(()=>{var t;class n{constructor(e){this.translate=e}transform(e){let i="";if("boolean"!=typeof e)return e;switch(e){case!0:i=this.translate.instant("BUTTON.YES");break;case!1:i=this.translate.instant("BUTTON.NO")}return i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(pi,16))},t.\u0275pipe=Vr({name:"yesNo",type:t,pure:!0}),n})();const D7e=[kb,Lb,xi],B7e=[Lx,qe,Tw,Ps,Bm,vR,kp,Go,eI,Pw,bR,yR,Ta,uo,B4,L_,CR];let Yi=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:B7e,imports:[D7e,kb,Lb,xi]}),n})(),zb=(()=>{var t;class n{constructor(e,i,r){this.starClass="",this.onAnimationIteration=s=>{this.randomizeStarStyles(s.target)},this.el=e,this.renderer2=i,this.ngZone=r,this.starsCollection=[]}ngOnDestroy(){cancelAnimationFrame(this.rafId),this.starsCollection.forEach(e=>e.removeEventListener("animationiteration",this.onAnimationIteration))}ngOnChanges(e){e.animationOn&&(this.animationOn?this.startBlinkAnimation():this.stopBlinkAnimation())}startBlinkAnimation(){this.starsCollection.length?this.starsCollection.forEach(e=>this.renderer2.setStyle(e,"animation-play-state","running")):this.ngZone.runOutsideAngular(()=>{this.rafId=requestAnimationFrame(()=>{this.elementWidth=this.el.nativeElement.clientWidth,this.elementHeight=this.el.nativeElement.clientHeight,this.generateStars()})})}stopBlinkAnimation(){this.starsCollection.forEach(e=>this.renderer2.setStyle(e,"animation-play-state","paused"))}generateStars(){for(let e=0;e<this.elementWidth/40;e++)this.createStar();this.starsCollection.forEach(e=>this.renderer2.appendChild(this.el.nativeElement,e))}createStar(){let e=this.renderer2.createElement("div");this.renderer2.addClass(e,"blinking-star"),this.starClass&&this.renderer2.addClass(e,this.starClass),this.calculateStarPosition(e),this.starsCollection.push(e)}calculateStarPosition(e){this.renderer2.setStyle(e,"top","0",1),this.renderer2.setStyle(e,"left","0",1),this.renderer2.setStyle(e,"opacity",0),this.renderer2.setStyle(e,"animation-delay","".concat((0,ie.randomInt)(0,1.6),"s"),1),this.renderer2.setStyle(e,"fontSize","".concat(1.2*Math.random(),"rem"),1),this.randomizeStarStyles(e),e.addEventListener("animationiteration",this.onAnimationIteration,{passive:!0})}randomizeStarStyles(e){this.renderer2.setStyle(e,"transform","translate(".concat((0,ie.randomInt)(-5,this.elementWidth+5),"px, ").concat((0,ie.randomInt)(-5,this.elementHeight+5),"px"),1)}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ji),g(an))},t.\u0275dir=qn({type:t,selectors:[["","blinking-stars",""]],inputs:{animationOn:"animationOn",starClass:"starClass"},features:[it]}),n})(),po=(()=>{var t;class n{constructor(e,i){this.clickFeedbackDisabled=!1,this.onMouseDown=r=>{this.domElement.addEventListener("mouseleave",this.onPointerUp),this.onPointerDown(r)},this.onPointerDown=r=>{this.domElement.hasAttribute("disabled")||this.clickFeedbackDisabled||(r.stopPropagation(),this.redispatchEvent(r),this.cancelRAF(),this.rafId=requestAnimationFrame(()=>{this.domElement.style.transform="scale(".concat(this.scaleFactor,")")}))},this.onPointerUp=()=>{this.domElement.removeEventListener("mouseleave",this.onPointerUp),this.cancelRAF(),this.rafId=requestAnimationFrame(()=>{this.domElement.style.transform!==this.initialTransformValue&&(this.domElement.style.transform=this.initialTransformValue)})},this.scaleFactor=.98,this.domElement=e.nativeElement,this.initialTransformValue=this.domElement.style.transform,this.ngZone=i,this.debounceTimeMs=75}ngOnInit(){this.ngZone.runOutsideAngular(()=>{wh?(this.domElement.addEventListener("touchstart",this.onPointerDown),this.debounced=XP(this.onPointerUp,this.debounceTimeMs),this.domElement.addEventListener("touchend",this.debounced)):(this.domElement.addEventListener("mousedown",this.onMouseDown),this.domElement.addEventListener("mouseup",this.onPointerUp))})}ngOnDestroy(){this.domElement.removeEventListener("mousedown",this.onMouseDown),this.domElement.removeEventListener("mouseup",this.onPointerUp),this.domElement.removeEventListener("mouseleave",this.onPointerUp),this.domElement.removeEventListener("touchstart",this.onPointerDown),this.domElement.removeEventListener("touchend",this.debounced),this.debounced&&this.debounced.cancel(),this.cancelRAF()}redispatchEvent(e){this.ngZone.runOutsideAngular(()=>{const i=document.createEvent("CustomEvent");wh?i.initCustomEvent("castouchstart",!0,!0,{changedTouches:e.changedTouches}):i.initCustomEvent("caspointerdown",!0,!0,void 0),this.domElement.dispatchEvent(i)})}cancelRAF(){cancelAnimationFrame(this.rafId)}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(an))},t.\u0275dir=qn({type:t,selectors:[["","click-feedback",""]],inputs:{scaleFactor:"scaleFactor",clickFeedbackDisabled:"clickFeedbackDisabled"}}),n})(),SR=(()=>{var t;class n{constructor(e){this.copied=new ke,this.device=e}onClick(e){if(e.preventDefault(),!this.text)return;let i=document.createElement("textarea");if(i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.text,i.readOnly=!0,document.body.appendChild(i),this.device.browser===ha.SAFARI){let s=document.createRange();s.selectNodeContents(i);let a=window.getSelection();a.removeAllRanges(),a.addRange(s),i.setSelectionRange(0,999999)}else i.focus(),i.select();document.execCommand("copy")&&this.copied.emit(),document.body.removeChild(i),i=void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Kl))},t.\u0275dir=qn({type:t,selectors:[["","copy-clipboard",""]],hostBindings:function(e,i){1&e&&Y("click",function(s){return i.onClick(s)})},inputs:{text:[mo.None,"copy-text","text"]},outputs:{copied:"copied"}}),n})(),wR=(()=>{var t;class n{constructor(){this.debounceTime=100,this.debounceClick=new ke}ngOnInit(){this.debounced=XP(this.emitClick,this.debounceTime,{maxWait:this.debounceTime,leading:this.leading,trailing:this.trailing})}ngOnDestroy(){this.debounced.cancel()}clickEvent(e){e.preventDefault(),e.stopPropagation(),this.debounced()}emitClick(){this.debounceClick.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275dir=qn({type:t,selectors:[["","debounce-click",""]],hostBindings:function(e,i){1&e&&Y("click",function(s){return i.clickEvent(s)})},inputs:{debounceTime:"debounceTime",leading:"leading",trailing:"trailing"},outputs:{debounceClick:"debounceClick"}}),n})(),N4=(()=>{var t;class n{constructor(e,i){this.onResize=()=>{XP(()=>{const s={width:this.el.nativeElement.offsetWidth,height:this.el.nativeElement.offsetHeight};s.width>0&&s.height>0&&this.elementDimensionsEmitter(s)},600)()},this.el=e,this.elementDimensions=new ke,this.dimensions={width:0,height:0},this.renderer=i}ngOnInit(){const e=this.el.nativeElement;requestAnimationFrame(()=>{this.elementDimensionsEmitter(this.getElementDimensions(e))}),this.resizeListener=this.renderer.listen("window","resize",this.onResize)}ngOnDestroy(){this.resizeListener&&this.resizeListener()}getElementDimensions(e){return{width:e.offsetWidth,height:e.offsetHeight}}elementDimensionsEmitter(e){0!==e.height&&0!==e.width&&this.elementDimensions.emit(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ji))},t.\u0275dir=qn({type:t,selectors:[["","element-dimensions",""]],outputs:{elementDimensions:"dimensions"}}),n})(),$o=(()=>{var t;class n{constructor(e,i,r){this.img=e.nativeElement,this.urlService=i,this.ngZone=r,this.placeholderImg="placeholders/placeholder.svg"}ngOnChanges(e){this.updateDirective()}updateDirective(){this.img.removeEventListener("load",this.imageLoadListener),this.img.removeEventListener("load",this.placeholderLoadListener),this.img.removeEventListener("error",this.placeholderLoadListener),this.checkElTypeAndTriggerLogic()}checkElTypeAndTriggerLogic(){this.imageLoadListener=()=>{this.img.removeEventListener("load",this.imageLoadListener),this.customPlaceholderSizing&&this.img.classList.remove(this.customPlaceholderSizing)},this.placeholderLoadListener=()=>{this.img.removeEventListener("load",this.placeholderLoadListener),this.img.removeEventListener("error",this.placeholderLoadListener),this.img.src=this.imageSource,this.img.addEventListener("load",this.imageLoadListener)},this.img.src=this.imageSource,this.img.complete?(this.customPlaceholderSizing&&this.img.classList.remove(this.customPlaceholderSizing),this.img.src=this.imageSource):(this.customPlaceholderSizing&&this.img.classList.add(this.customPlaceholderSizing),this.ngZone.runOutsideAngular(()=>{this.img.addEventListener("load",this.placeholderLoadListener),this.img.addEventListener("error",this.placeholderLoadListener)}),this.img.src=this.urlService.getImageUrl(this.placeholderImg))}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ii),g(an))},t.\u0275dir=qn({type:t,selectors:[["","empty-placeholder",""]],inputs:{customPlaceholderImg:[mo.None,"customPlaceholder","customPlaceholderImg"],customPlaceholderSizing:[mo.None,"customPlaceholderSize","customPlaceholderSizing"],imageSource:[mo.None,"imgSrc","imageSource"]},features:[it]}),n})(),jse=(()=>{var t;class n{constructor(e,i){this.validateEqual=e,this.reverse=i}get isReverse(){return!!this.reverse&&"true"===this.reverse}validate(e){let i=e.value,r=e.root.get(this.validateEqual);return r&&i!==r.value&&!this.isReverse?{validateEqual:!1}:(r&&i===r.value&&this.isReverse&&(delete r.errors.validateEqual,Object.keys(r.errors).length||r.setErrors(null)),r&&i!==r.value&&this.isReverse&&r.setErrors({validateEqual:!1}),null)}}return(t=n).\u0275fac=function(e){return new(e||t)(Wv("validateEqual"),Wv("reverse"))},t.\u0275dir=qn({type:t,selectors:[["","validateEqual","","formControlName",""],["","validateEqual","","formControl",""],["","validateEqual","","ngModel",""]],features:[mn([{provide:Sl,useExisting:_s(()=>t),multi:!0}])]}),n})(),F4=(()=>{var t;class n{constructor(e,i,r,s){this.valueChanges=!1,this.resizeListenerEnabled=!0,this.onImageLoad=()=>{this.getImageDimensions(this.el)},this.resizeImage=()=>{if(this.el.nativeElement.parentElement.offsetWidth<=0)return;const a=this.image;this.parent={width:this.el.nativeElement.parentElement.offsetWidth,height:this.el.nativeElement.parentElement.offsetWidth},a&&(a.width>a.height?this.resizeByWidth():a.width<a.height?this.resizeByHeight():this.resizeDefault()),this.isVisible||(this.el.nativeElement.className="".concat(this.el.nativeElement.className," visible__image"),this.isVisible=!0)},this.urlService=r,this.renderer=i,this.el=e,this.isVisible=!1,this.ngZone=s}ngAfterViewInit(){this.ngZone.runOutsideAngular(()=>{this.getParentDimensions(this.el),this.el.nativeElement.addEventListener("load",this.onImageLoad),this.resizeListenerEnabled&&(this.resizeListener=this.renderer.listen("window","resize",this.resizeImage))})}ngOnDestroy(){this.el.nativeElement.removeEventListener("load",this.onImageLoad),this.resizeListener&&this.resizeListener(),this.loaderImage=null}getParentDimensions(e){this.parent={width:e.nativeElement.parentElement.offsetWidth,height:e.nativeElement.parentElement.offsetWidth},this.loaderImage=this.renderer.createElement("img"),this.el.nativeElement.appendChild(this.loaderImage),this.loaderImage.src=this.urlService.getImageUrl("loaders/loader_1.svg"),this.loaderImage.className+="gallery__image--loader"}getImageDimensions(e){this.el.nativeElement.removeEventListener("load",this.onImageLoad),this.image={width:e.nativeElement.width,height:e.nativeElement.height},this.el.nativeElement&&0===this.image.width&&0===this.image.height?this.el.nativeElement.style.display="none":(this.el.nativeElement.style.display="block",this.loaderImage.style.display="none",this.renderer.removeChild(this.el.nativeElement,this.loaderImage),this.resizeImage())}resizeByWidth(){this.el.nativeElement.height=this.image.height+(this.parent.height-this.image.height),this.el.nativeElement.style.marginLeft="".concat(-(this.el.nativeElement.width-this.parent.width)/2,"px"),this.el.nativeElement.style.marginTop=0}resizeByHeight(){this.el.nativeElement.width=this.parent.width,this.el.nativeElement.style.marginTop="".concat((this.parent.height-this.el.nativeElement.height)/2,"px"),this.el.nativeElement.style.marginLeft=0}resizeDefault(){this.el.nativeElement.width=this.parent.width,this.el.nativeElement.height=this.parent.height}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ji),g(ii),g(an))},t.\u0275dir=qn({type:t,selectors:[["","image-resizable",""]],inputs:{valueChanges:"valueChanges",resizeListenerEnabled:"resizeListenerEnabled"}}),n})(),U4=(()=>{var t;class n{constructor(e){this.lastValue="",this.selectionStart=0,this.selectionEnd=0,this.phoneMaxLength=12,this.formattedPhone=!0,this.rawPhoneNumberChange=new ke,this.el=e.nativeElement}ngOnInit(){this.el&&!(this.el instanceof HTMLInputElement)&&(this.el=this.el.querySelector("input"))}onModelChange(e){this.onInputChange(e,!1)}onKeydown(e){this.selectionStart=e.target.selectionStart,this.selectionEnd=e.target.selectionEnd}onClick(e){this.selectionStart=e.target.selectionStart,this.selectionEnd=e.target.selectionEnd}onFocus(e){this.selectionStart=e.target.selectionStart,this.selectionEnd=e.target.selectionEnd}onInputChange(e,i){this.formattedPhone?this.formattedInput(e,i):this.onlyDigitsInput(e,i)}onlyDigitsInput(e,i){let r=e.replace(/\D/g,"");i&&r.length<=this.phoneMaxLength?r=r.substring(0,r.length-1):r.length>=this.phoneMaxLength&&(r=r.substring(0,this.phoneMaxLength)),0===r.length&&(r=""),this.el.value=r}formattedInput(e,i){let r=e.replace(/\D/g,""),s=r,a=this.selectionStart,c=this.selectionEnd;i&&s.length<=3?s=s.substring(0,s.length-1):s.length>=this.phoneMaxLength&&(s=s.substring(0,this.phoneMaxLength)),s=0===s.length?"":this.splitToGroups(s),this.el.value=s,this.rawPhoneNumberChange.emit(r),r>3&&(this.lastValue.length<s.length&&a===c?(i?a+=s.length-this.lastValue.length:a=s.length,/^\d+$/.test(s[a])||a++):this.lastValue.length>s.length&&a===c?a-=this.lastValue.length-s.length:this.selectionStart!==this.selectionEnd&&(a=c-(Math.max(this.lastValue.length,s.length)-Math.min(this.lastValue.length,s.length))),this.el.setSelectionRange(a,a)),this.lastValue=s}splitToGroups(e){let i=Math.ceil(e.length/3),r=[],s=[];for(let c=0;c<i;c++)r.push("$".concat(c+1));for(let c=0;c<i;c++)s.push("(\\d{0,3})");let a=new RegExp("^"+s.join(""));return e.replace(a,"".concat(r.join("-")))}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t))},t.\u0275dir=qn({type:t,selectors:[["","PhoneMask",""]],hostBindings:function(e,i){1&e&&Y("ngModelChange",function(s){return i.onModelChange(s)})("keydown",function(s){return i.onKeydown(s)})("click",function(s){return i.onClick(s)})("focus",function(s){return i.onFocus(s)})},inputs:{phoneMaxLength:"phoneMaxLength",formattedPhone:"formattedPhone"},outputs:{rawPhoneNumberChange:"rawPhoneNumberChange"}}),n})(),Is=(()=>{var t;class n{constructor(e,i,r){this.rafIds=new is.List,this.onScroll=s=>{this.ngZone.runOutsideAngular(()=>requestAnimationFrame(()=>{this.currentScrollTop=s.target.scrollTop,this.currentScrollTop<0&&(this.currentScrollTop=0),this.scrollOffsetDifference=s.target.scrollHeight-s.target.offsetHeight,this.currentScrollTop>this.scrollOffsetDifference&&(this.currentScrollTop=this.scrollOffsetDifference),this.currentScrollTop<this.lastScrollTop&&(this.onScrollUp&&(this.lastScrollDirection!==Rm.Up||this.currentScrollTop!==this.scrollOffsetDifference)&&this.executeEventHandler(this.onScrollUp),(this.onScrolledToTop||this.items&&this.infiniteScrollDirection===Rm.Up)&&this.currentScrollTop<=0&&this.lastScrollTop>0&&(this.onScrolledToTop&&this.executeEventHandler(this.onScrolledToTop),this.items&&(this.length+=this.step||10,this.cdr.detectChanges())),this.lastScrollDirection=Rm.Up),this.currentScrollTop>this.lastScrollTop&&(this.onScrollDown&&this.lastScrollDirection!==Rm.Down&&this.executeEventHandler(this.onScrollDown),this.items&&this.infiniteScrollDirection===Rm.Down&&this.scrollOffsetDifference-this.currentScrollTop<=.1*s.target.offsetHeight&&(this.length+=this.step||10,this.cdr.detectChanges()),this.onScrolledToBottom&&this.scrollOffsetDifference-this.currentScrollTop<=3&&this.executeEventHandler(this.onScrolledToBottom),this.lastScrollDirection=Rm.Down),this.lastScrollTop=this.currentScrollTop}))},this.elementRef=e,this.ngZone=i,this.cdr=r,this.infiniteScrollDirection=Rm.Down}ngOnInit(){this.init()}ngOnDestroy(){this.elementRef.nativeElement.removeEventListener("scroll",this.onScroll),this.rafIds.forEach(e=>cancelAnimationFrame(e)),this.elementRef.nativeElement.onscroll=void 0,this.items=void 0,this.step=void 0,this.initialCount=void 0,this.infiniteScrollDirection=void 0,this.length=void 0,this.lastScrollTop=void 0,this.scrollOffsetDifference=void 0,this.onScrollDown=void 0,this.onScrollUp=void 0,this.onScrolledToTop=void 0,this.onScrolledToBottom=void 0}reset(){this.elementRef.nativeElement.removeEventListener("scroll",this.onScroll),this.init()}init(){this.ngZone.runOutsideAngular(()=>{this.length=this.initialCount||20,this.elementRef.nativeElement.addEventListener("scroll",this.onScroll),this.elementRef.nativeElement.style.overflowX="false",this.lastScrollTop=this.infiniteScrollDirection===Rm.Up||this.onScrolledToTop||this.onScrollUp?this.elementRef.nativeElement.scrollTop:0})}executeEventHandler(e){var i=this;if(e.outsideZone){const r=requestAnimationFrame(f(function*(){const s=e.handler();i.cdr.detectChanges();try{yield s}catch(a){console.warn(a)}i.cdr.detectChanges(),i.rafIds.remove(r)}));this.rafIds.add(r)}else this.ngZone.run(()=>{e.handler()})}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(an),g(Re))},t.\u0275dir=qn({type:t,selectors:[["","scroll-directive",""]],inputs:{items:[mo.None,"list","items"],initialCount:[mo.None,"initialListCount","initialCount"],step:"step",infiniteScrollDirection:"infiniteScrollDirection",onScrolledToBottom:"onScrolledToBottom",onScrolledToTop:"onScrolledToTop",onScrollUp:"onScrollUp",onScrollDown:"onScrollDown"},exportAs:["scroll"]}),n})(),TR=(()=>{var t;class n{constructor(e,i,r){this.element=e,this.ngZone=i,this.hammerConfig=r,this.disableSwipe=!1,this.velocity=2,this.swipeDistancePercent=.5,this.onSwipe=new ke,this.elId=(0,ie.uuidV4)(),this.isSwiped=!1,this.onPan=D4(s=>{this.disableSwipe||s.changedPointers.find(a=>"pointercancel"===a.type)||(-1!==this.element.nativeElement.style.transition.indexOf("none")&&(this.element.nativeElement.style.transition=n.Transitions.Default),this.element.nativeElement.style.left="".concat(Math.floor(s.deltaX),"px"))},4,{trailing:!1}),this.onPanEnd=s=>{this.isSwiped||this.disableSwipe||(s.velocityX>=this.velocity||s.distance>=this.swipePoint?(this.onSwipe.emit(this.elId),this.isSwiped=!0,requestAnimationFrame(()=>this.element.nativeElement.style.left="0px")):this.onPanCancel(s))},this.onPanCancel=()=>{this.disableSwipe||(this.element.nativeElement.style.transition=n.Transitions.Elastic,requestAnimationFrame(()=>this.element.nativeElement.style.left="0px"),clearTimeout(this.transitionResetTimeout),this.transitionResetTimeout=setTimeout(()=>{this.element.nativeElement.style.transition=n.Transitions.Default},220))}}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Gb.measure(()=>{this.elId=this.element.nativeElement.id||this.elId,this.hammer=this.hammerConfig.buildHammer(this.element.nativeElement),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd),this.hammer.on("pancancel",this.onPanCancel),this.swipePoint=(this.elementWidth||this.element.nativeElement.offsetWidth)*this.swipeDistancePercent,this.element.nativeElement.style.transition=n.Transitions.Default,this.element.nativeElement.style.transform="translateZ(0)"})})}ngOnDestroy(){clearTimeout(this.transitionResetTimeout),this.hammer&&(this.hammer.off("pan",this.onPan),this.hammer.off("panend",this.onPanEnd),this.hammer.off("pancancel",this.onPanCancel),this.hammer.destroy())}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(an),g(ZUe))},t.\u0275dir=qn({type:t,selectors:[["","swipe-element",""]],inputs:{disableSwipe:"disableSwipe",velocity:"velocity",swipeDistancePercent:"swipeDistancePercent",elementWidth:"elementWidth"},outputs:{onSwipe:"onSwipe"}}),n})();!function(t){let n;var o;(o=n=t.Transitions||(t.Transitions={})).Default="none",o.Elastic="left .2s cubic-bezier(.5,.3,.35,1.35)"}(TR||(TR={}));let wu=(()=>{var t;class n{constructor(e,i){this.touchstartX=0,this.touchstartY=0,this.touchendX=0,this.touchendY=0,this.casTouchStartHandler=r=>{this.touchstartX=r.detail.changedTouches[0].screenX,this.touchstartY=r.detail.changedTouches[0].screenY},this.touchStartHandler=r=>{this.touchstartX=r.changedTouches[0].screenX,this.touchstartY=r.changedTouches[0].screenY},this.touchEndHandler=r=>{this.touchendX=r.changedTouches[0].screenX,this.touchendY=r.changedTouches[0].screenY,this.handleGesture(r)},this.element=e,this.ngZone=i,this.swipeAction=new ke,this.swipeActionLeft=new ke,this.swipeActionRight=new ke,this.swipeActionUp=new ke,this.swipeActionDown=new ke}ngOnInit(){this.ngZone.runOutsideAngular(()=>{this.element.nativeElement.addEventListener("touchstart",this.touchStartHandler,!1),this.element.nativeElement.addEventListener("castouchstart",this.casTouchStartHandler,!1),this.element.nativeElement.addEventListener("touchend",this.touchEndHandler,!1)})}ngOnDestroy(){this.element.nativeElement.removeEventListener("touchstart",this.touchStartHandler),this.element.nativeElement.removeEventListener("castouchstart",this.casTouchStartHandler),this.element.nativeElement.removeEventListener("touchend",this.touchEndHandler)}handleGesture(e){this.touchendX-this.touchstartX>80&&this.touchendX>=this.touchstartX&&this.touchstartY-this.touchendY<80&&this.touchendY-this.touchstartY<80&&(this.ngZone.run(()=>{this.swipeAction.emit(sa.Right),this.swipeActionRight.emit(e)}),this.clearLastTouchPoints()),this.touchstartX-this.touchendX>80&&this.touchendX<=this.touchstartX&&this.touchstartY-this.touchendY<80&&this.touchendY-this.touchstartY<80&&(this.ngZone.run(()=>{this.swipeAction.emit(sa.Left),this.swipeActionLeft.emit(e)}),this.clearLastTouchPoints()),this.touchstartY-this.touchendY>80&&this.touchendY<=this.touchstartY&&this.touchstartX-this.touchendX<80&&this.touchendX-this.touchstartX<80&&(this.ngZone.run(()=>{this.swipeAction.emit(sa.Up),this.swipeActionUp.emit(e)}),this.clearLastTouchPoints()),this.touchendY-this.touchstartY>80&&this.touchendY>=this.touchstartY&&this.touchstartX-this.touchendX<80&&this.touchendX-this.touchstartX<80&&(this.ngZone.run(()=>{this.swipeAction.emit(sa.Down),this.swipeActionDown.emit(e)}),this.clearLastTouchPoints())}clearLastTouchPoints(){this.touchstartX=0,this.touchstartY=0,this.touchendX=0,this.touchendY=0}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(an))},t.\u0275dir=qn({type:t,selectors:[["","swipe-directive",""]],outputs:{swipeAction:"swipeAction",swipeActionLeft:"swipeActionLeft",swipeActionRight:"swipeActionRight",swipeActionUp:"swipeActionUp",swipeActionDown:"swipeActionDown"}}),n})(),Iw=(()=>{var t;class n extends ie.UniqueList{constructor(){super()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Nm=(()=>{var t;class n{constructor(e,i,r){this.activeCmpsList=e,this.elRef=i,this.viewRef=r}ngOnInit(){const e=this.elRef.nativeElement.id||this.id;if(this.elRef.nativeElement.id=e,this.elRef.nativeElement.setAttribute("id",e),!e)throw new Error("Element id is undefined");this.cmp={id:e,instance:this.viewRef._lContainer[0][8],element:this.elRef.nativeElement},this.activeCmpsList.tryAdd(this.cmp)}ngOnDestroy(){this.activeCmpsList.remove(this.cmp)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Iw),g($t),g(bs))},t.\u0275dir=qn({type:t,selectors:[["","activeCmp",""]],inputs:{id:"id"}}),n})();const N7e=[kb,Lb,xi,Yi],F7e=[N4,jse];let Io=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:F7e,imports:[N7e]}),n})();function U7e(t,n){}const G7e=(t,n,o)=>({visibilityState:t,distanceToCenter:n,ready:o});function V7e(t,n){if(1&t&&(Tn(0),p(1,"div",4),Un(2,5),m(),Pn()),2&t){_();const o=Kt(4);d(2),l("ngTemplateOutlet",o)}}const z7e=(t,n)=>({transform:t,"-webkit-transform":n});function j7e(t,n){if(1&t&&(B(0,"div",6),p(1,"div",7),Un(2,5),m()),2&t){const o=_(),e=Kt(4);go("width",o.contentWidth,"px"),d(),l("ngStyle",cn(4,z7e,"translateX("+o.vsRendererOffsetX+"px)","translateX("+o.vsRendererOffsetX+"px)")),d(),l("ngTemplateOutlet",e)}}function H7e(t,n){if(1&t&&B(0,"view-fragment",9),2&t){const o=n.$implicit;Uo("main-fragment",o.contentFragmentIsMain),l("isMainFragment",o.contentFragmentIsMain)("template",o.template)("ngClass",o.contentFragmentClass)("width",o.contentFragmentWidth)}}function q7e(t,n){if(1&t&&(U(0,H7e,1,6,"view-fragment",8),V(1,"slice")),2&t){const o=_();l("ngForOf",u_(1,2,o.contentList,o.vsRendererStartIdx,o.vsRendererEndIdx))("ngForTrackBy",o.trackById)}}function W7e(t,n){1&t&&Un(0,5),2&t&&l("ngTemplateOutlet",_(2).leftButtonTemplateRef)}function $7e(t,n){1&t&&(p(0,"div",14)(1,"div",15),B(2,"div",16),m()()),2&t&&(d(),l("scaleFactor",.94))}function K7e(t,n){1&t&&Un(0,5),2&t&&l("ngTemplateOutlet",_(2).rightButtonTemplateRef)}function Z7e(t,n){1&t&&(p(0,"div",17)(1,"div",15),B(2,"div",18),m()()),2&t&&(d(),l("scaleFactor",.94))}function Q7e(t,n){if(1&t){const o=Ce();Tn(0),p(1,"div",10),Y("debounceClick",function(){return oe(o),re(_().goToIndex(-1))}),U(2,W7e,1,1,"ng-container",11)(3,$7e,3,1,"div",12),m(),p(4,"div",10),Y("debounceClick",function(){return oe(o),re(_().goToIndex(1))}),U(5,K7e,1,1,"ng-container",11)(6,Z7e,3,1,"div",13),m(),Pn()}if(2&t){const o=_();d(),l("debounceTime",200)("leading",!0),d(),l("ngIf",o.leftButtonTemplateRef),d(),l("ngIf",!o.leftButtonTemplateRef),d(),l("debounceTime",200)("leading",!0),d(),l("ngIf",o.rightButtonTemplateRef),d(),l("ngIf",!o.rightButtonTemplateRef)}}class tI{get center(){return this.start+this.width/2}constructor(n,o){this.start=n,this.width=o,this.width=Math.ceil(this.width),this.end=this.start+this.width-1}horizontalIntersects(n,o){const e=o?o(new tI(n.start,n.width)):n;return e.start>=this.start&&e.start<=this.end||e.end<=this.end&&e.end>=this.start}}const jb=new Ot("FragmentedViewControllerShowControls",{factory:()=>{const t=Qt.getInstance;return{showArrows:!t.isMobileApp(),showScrollbar:!t.isMobileApp()}}}),nI=new Ot("FragmentedViewControllerScrollHeight",{factory:()=>20});let PR=(()=>{var t;class n{constructor(e,i,r){this.rulerService=e,this.controls=i,this.scrollHeight=r}getElementDimension(e,i){return this.rulerService.getElementDimension(e,i).pipe(jn(r=>({width:r.width,height:r.height-(this.controls.showScrollbar?Math.min(this.scrollHeight-(r.offsetHeight-r.height),this.scrollHeight):0),offsetWidth:r.offsetWidth,offsetHeight:r.offsetHeight})))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ua),T(jb),T(nI))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class IR{constructor(){this.isInView=!1,this.isPrepared=!1,this.isSnapped=!1}}let G4=(()=>{var t;class n{set visibilityState(e){for(let i in e)e.hasOwnProperty(i)&&this._visibilityState[i]!==e[i]&&(this._visibilityState[i]=e[i],this.cdr.markForCheck())}get visibilityState(){return this._visibilityState}set distanceToCenter(e){this._distanceToCenter=e,this.cdr.markForCheck()}get distanceToCenter(){return this._distanceToCenter}constructor(e,i,r,s){this.element=e,this.renderer=i,this.cdr=r,this.ngZone=s,this.isMainFragment=!1,this.ready=!1,this._visibilityState=new IR}triggerHideAnimation(){var e=this;return f(function*(){return new Promise(i=>{e.tween=ww({duration:500,onFinish:()=>{e.renderer.setAttribute(e.element.nativeElement,"hidden","hidden"),i()}}),e.tween.subscribe(s=>{e.renderer.setStyle(e.element.nativeElement.lastElementChild,"transform","scale(".concat(1-s,")"))}),e.ngZone.runOutsideAngular(()=>{e.tween.play()})})})()}ngAfterViewInit(){this.ready=!0,this.cdr.markForCheck()}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ji),g(Re),g(an))},t.\u0275cmp=pe({type:t,selectors:[["view-fragment"]],hostVars:4,hostBindings:function(e,i){2&e&&go("width",i.width,"px")("max-width",i.maxWidth,"px")},inputs:{isMainFragment:"isMainFragment",template:"template",width:"width",maxWidth:"maxWidth"},decls:1,vars:6,consts:[[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&U(0,U7e,0,0,"ng-template",0),2&e&&l("ngTemplateOutlet",i.template)("ngTemplateOutletContext",_a(2,G7e,i.visibilityState,i.distanceToCenter,i.ready))},dependencies:[qr],styles:["[_nghost-%COMP%]{flex-grow:0;flex-shrink:0;height:100%}"],changeDetection:0}),n})(),Hb=(()=>{var t;class n{get width(){return this.contentFragmentWidth}constructor(e){this.template=e,this.contentFragmentClass="",this.oid=(0,ie.uuidV4)()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qa))},t.\u0275dir=qn({type:t,selectors:[["","contentFragment",""]],inputs:{contentFragmentWidth:"contentFragmentWidth",contentFragmentClass:"contentFragmentClass",contentFragmentIsMain:"contentFragmentIsMain"}}),n})(),Fm=(()=>{var t;class n{set vsRenderedFragments(e){this._fragmentsToRender=e}get vsRenderedFragments(){const e=this.contentList?this.contentList.length:0;return this.vsEnabled?Math.min(this._fragmentsToRender,e):e}set transcludedDirectivesList(e){this._transcludedDirectivesList=e,this.transcludedDirectives$.next(e)}set renderedFragments(e){this._renderedFragments=e,this.renderedFragments$.next(e)}constructor(e,i,r,s,a,c){this.controls=e,this.element=i,this.ngZone=r,this.fragmentedViewControllerRulerService=s,this.cdr=a,this.device=c,this.scrollDetectionThrottleMs=50,this.vsEnabled=!1,this.vsEdgeScroll=!1,this.distanceToCenterCheckEnabled=!1,this.contentList=[],this.vsRendererOffsetX=0,this.vsRendererStartIdx=0,this.vsRendererEndIdx=0,this.scrollDirty=!1,this.logger=ie.Logging.createLogger("fragmented-view-controller"),this.onScroll=D4(u=>{this.scrollDirty=!0,this.vsEnabled&&this.updateRenderer(),Gb.measure(()=>{this.updateFragmentVisibilityState(this.element.nativeElement.scrollLeft)})},this.scrollDetectionThrottleMs),this.vsTranslateFn=u=>(u.start+=this.vsRendererOffsetX-this.contentList[0].bounds.start,u),this._fragmentsToRender=0,this.transcludedDirectives$=new sn,this.renderedFragments$=new Qn(void 0),this.destroy$=new sn,this.updateFragmentVisibilityState=u=>{if(!this._renderedFragments)return;let h=!1;this.scrolledViewportBounds=new tI(u,this.viewportWidth);let b=0,w=-1,R=-1;this.logger.isEnabled&&console.clear(),this.logger.write("VP: ".concat(this.scrolledViewportBounds.start,"-").concat(this.scrolledViewportBounds.end));for(let K of this._renderedFragments.toArray()){let te=new IR,ee=this.vsEnabled?this.scrolledViewportBounds.horizontalIntersects(K.bounds,this.vsTranslateFn):this.scrolledViewportBounds.horizontalIntersects(K.bounds);if(ee){w<0&&(w=b),R=b,this.logger.write("Intersects ".concat(b,": ").concat(ee," ").concat(K.bounds.start,"-").concat(K.bounds.end,", ").concat(K.width)),K.visibilityState.isInView||(h=!0,this.logger.write("ScrolledIntoView ".concat(b))),this.distanceToCenterCheckEnabled&&(K.distanceToCenter=Math.min((this.scrolledViewportBounds.center-K.bounds.center)/(this.scrolledViewportBounds.width/2),1),h=!0),te.isInView=!0;const le=K.bounds.width/4;this.scrolledViewportBounds.center-le<=K.bounds.center&&this.scrolledViewportBounds.center+le>=K.bounds.center?(te.isSnapped=!0,h=!0,this.snappedIndex!==b&&(this.snappedIndex=b,this.fragmentSnap.emit(this.snappedIndex))):K.visibilityState.isSnapped&&(te.isSnapped=!1,h=!0)}else K.visibilityState.isInView&&(h=!0,this.logger.write("ScrolledOutOfView ".concat(b))),this.logger.write("Intersects ".concat(b,": ").concat(ee,", ").concat(K.bounds.start,"-").concat(K.bounds.end," ").concat(K.bounds.width));K.visibilityState=te,b++}if(void 0===this.snappedIndex&&this._renderedFragments.length>0){let K=this._renderedFragments.first.visibilityState;K.isSnapped=!0,this._renderedFragments.first.visibilityState=K,this.snappedIndex=0,this.fragmentSnap.emit(this.snappedIndex),h=!0}this.logger.write("First index in view ".concat(w)),this.logger.write("Last index in view ".concat(R));let G=this._renderedFragments.toArray()[w-1];if(G&&!G.visibilityState.isInView){this.logger.write("Prepare for view: , ".concat(w-1));let K=new IR;K.isPrepared=!0,G.visibilityState=K}if(G=this._renderedFragments.toArray()[R+1],G&&!G.visibilityState.isInView){this.logger.write("Prepare for view: ".concat(R+1));let K=new IR;K.isPrepared=!0,G.visibilityState=K}this.logger.write("========"),this.logger.write("========"),this.logger.write("========"),h&&(this.logger.write("CDR detect changes!"),this.detectChanges())},this.onTranscludeDirectivesUpdate=u=>{this.updateBounds(u);const h=this.vsEdgeScroll?Math.ceil(this.viewportWidth/2-u.last.bounds.width/2):0;this.contentWidth=u.last.bounds.end+h,this.contentList=u.toArray(),this.showScrollbar=this.controls.showScrollbar&&this.viewportWidth<this.contentWidth,this.showArrows=this.controls.showArrows&&this.viewportWidth<this.contentWidth,this.updateRenderer()},this.logger.isEnabled=!1,this.fragmentSnap=new ke}updateRenderer(){let i=L7e(this.contentList,{bounds:{start:this.element.nativeElement.scrollLeft}},c=>c.bounds.start)-1,r=Math.max(0,i),s=this._renderedFragments&&this._renderedFragments.length?Math.floor((this._renderedFragments.length-1)/2):0;const a=this.vsRendererStartIdx;this.vsRendererStartIdx=Math.min(Math.max(0,r-s),this.contentList.length-this.vsRenderedFragments),this.vsRendererEndIdx=this.vsRendererStartIdx+this.vsRenderedFragments,this.vsRendererOffsetX=this.contentList[this.vsRendererStartIdx].bounds.start,this.vsRendererStartIdx!==a&&this.detectChanges()}goToIndex(e){let i=this.snappedIndex+e,r=this._renderedFragments.toArray();for(;i>=0&&i<=this._renderedFragments.length-1&&r[i].bounds.center>this.scrolledViewportBounds.start&&r[i].bounds.center<this.scrolledViewportBounds.end;)i+=e;this.scrollToIndex(Math.max(0,Math.min(i,this._renderedFragments.length-1)))}scrollToIndex(e,i={animate:!0,durationMs:200}){if(!this._renderedFragments||void 0===e||e<0||e>this._renderedFragments.length-1)return;const r=this._renderedFragments.toArray()[e].bounds,s=r.start-(this.viewportWidth/2-r.width/2),a=this.element.nativeElement.scrollLeft;i.animate?(this.tween=ww({duration:i.durationMs,onPlay:()=>{this.device.browser!==ha.SAFARI&&(this.element.nativeElement.style.scrollSnapType="none")},onFinish:()=>{this.device.browser!==ha.SAFARI&&(this.element.nativeElement.style.scrollSnapType="x mandatory")}}),this.tween.subscribe(c=>{this.element.nativeElement.scrollLeft=(s-a)*c+a}),this.ngZone.runOutsideAngular(()=>{this.tween.play()})):this.element.nativeElement.scrollLeft=s}setStartPosition(){return new ao(e=>{if(!1===this.scrollDirty){let i=this._transcludedDirectivesList.find(this.snapToIndex?(s,a)=>a===this.snapToIndex:s=>s.contentFragmentIsMain),r=i?Math.max(i.bounds.start-(this.viewportWidth/2-i.width/2),0):0;Gb.mutate(r?()=>{this.element.nativeElement.scrollLeft=r,e.next(r),e.complete()}:()=>{this.element.nativeElement.scrollLeft=0,e.next(0),e.complete()})}else Gb.measure(()=>{e.next(this.element.nativeElement.scrollLeft),e.complete()})})}updateBounds(e){e.forEach((i,r,s)=>{let a=s[r-1]?s[r-1].bounds:void 0;const c=new tI(a?a.end+1:0,i.width);i.bounds=this.vsEdgeScroll?new tI(a?c.start:Math.ceil(this.viewportWidth/2-c.center),i.width):c})}trackById(e,i){return i.oid}ngOnInit(){this.dimensions$=this.fragmentedViewControllerRulerService.getElementDimension(this.element.nativeElement,this.cacheId),wp([this.dimensions$,this.transcludedDirectives$]).pipe(bt(e=>e[1]&&e[1].length>0),Da(e=>{this.viewportWidth=e[0].width,this.scrollDirty=!1,this.onTranscludeDirectivesUpdate(e[1]),this.detectChanges()}),es(e=>this.renderedFragments$.pipe(bt(i=>void 0!==i&&i.length>0),Da(i=>this.updateBounds(i)),es(i=>this.setStartPosition()))),wn(this.destroy$)).subscribe(this.updateFragmentVisibilityState),this.ngZone.runOutsideAngular(()=>this.element.nativeElement.addEventListener("scroll",this.onScroll,{passive:!0}))}ngOnChanges(e){e.snapToIndex&&void 0!==e.snapToIndex.currentValue&&e.snapToIndex.currentValue!==e.snapToIndex.previousValue&&e.snapToIndex.currentValue!==this.snappedIndex&&this.scrollToIndex(e.snapToIndex.currentValue)}ngOnDestroy(){this.element.nativeElement.removeEventListener("scroll",this.onScroll),this.contentChildSubscription&&this.contentChildSubscription.unsubscribe(),this.viewInitSubscription&&this.viewInitSubscription.unsubscribe(),this.tween&&this.tween.dispose(),this.destroy$.next()}hideFragmentByIndex(e){var i=this;return f(function*(){yield i._renderedFragments.find((s,a)=>a===e).triggerHideAnimation()})()}detectChanges(){this.cdr.destroyed||this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(jb),g($t),g(an),g(PR),g(Re),g(Kl))},t.\u0275cmp=pe({type:t,selectors:[["fragmented-view-controller"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,Hb,4),2&e){let s;je(s=He())&&(i.transcludedDirectivesList=s)}},viewQuery:function(e,i){if(1&e&&$e(G4,5),2&e){let r;je(r=He())&&(i.renderedFragments=r)}},hostVars:2,hostBindings:function(e,i){2&e&&Uo("show-scrollbar",i.showScrollbar)},inputs:{scrollDetectionThrottleMs:"scrollDetectionThrottleMs",vsEnabled:"vsEnabled",vsEdgeScroll:"vsEdgeScroll",snapToIndex:"snapToIndex",cacheId:"cacheId",distanceToCenterCheckEnabled:"distanceToCenterCheckEnabled",vsRenderedFragments:"vsRenderedFragments",leftButtonTemplateRef:"leftButtonTemplateRef",rightButtonTemplateRef:"rightButtonTemplateRef"},outputs:{fragmentSnap:"fragmentSnap"},features:[it],decls:6,vars:3,consts:[[4,"ngIf","ngIfElse"],["virtualScroll",""],["paintViewFragments",""],[4,"ngIf"],[1,"content__fragments"],[3,"ngTemplateOutlet"],[1,"content__scroll"],[1,"content__fragments","virtual-scroll",3,"ngStyle"],["class","content__view-fragment",3,"isMainFragment","main-fragment","template","ngClass","width",4,"ngFor","ngForOf","ngForTrackBy"],[1,"content__view-fragment",3,"isMainFragment","template","ngClass","width"],["debounce-click","",1,"content__controls--wrapper",3,"debounceTime","leading","debounceClick"],[3,"ngTemplateOutlet",4,"ngIf"],["class","content__controls left",4,"ngIf"],["class","content__controls right",4,"ngIf"],[1,"content__controls","left"],["click-feedback","",1,"content__arrow",3,"scaleFactor"],[1,"content__arrow--icon"],[1,"content__controls","right"],[1,"content__arrow--icon","right"]],template:function(e,i){if(1&e&&U(0,V7e,3,1,"ng-container",0)(1,j7e,3,7,"ng-template",null,1,ft)(3,q7e,2,6,"ng-template",null,2,ft)(5,Q7e,7,8,"ng-container",3),2&e){const r=Kt(2);l("ngIf",!1===i.vsEnabled)("ngIfElse",r),d(5),l("ngIf",i.showArrows)}},dependencies:[Xe,Mt,Ne,qr,Cm,po,wR,G4,BT],styles:['[_nghost-%COMP%]{display:block;height:100%;width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory}[_nghost-%COMP%]:not(.show-scrollbar){scrollbar-width:none;-ms-overflow-style:none}[_nghost-%COMP%]:not(.show-scrollbar)::-webkit-scrollbar{width:0;height:0}.show-scrollbar[_nghost-%COMP%]{padding-bottom:10px}.content__scroll[_ngcontent-%COMP%]{height:1px;top:0;left:0}.content__view-fragment[_ngcontent-%COMP%]{scroll-snap-align:center;scroll-snap-stop:always}.content__fragments[_ngcontent-%COMP%]{display:inline-flex;height:100%;flex-flow:row nowrap}.content__fragments.virtual-scroll[_ngcontent-%COMP%]{height:calc(100% - 1px)}.content__controls[_ngcontent-%COMP%]{position:relative;position:absolute;display:flex;justify-content:center;align-items:center;width:5%;max-width:80px;min-width:50px;max-height:80px;min-height:50px;margin:.5em;top:50%;z-index:10;transform:translateY(-50%)}.content__controls[_ngcontent-%COMP%]:before{display:block;content:"";width:100%;padding-top:100%}.content__controls[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{position:absolute;top:0;left:0;right:0;bottom:0}.content__controls.right[_ngcontent-%COMP%]{right:0}.content__controls.left[_ngcontent-%COMP%]{left:0}.content__controls--wrapper[_ngcontent-%COMP%]{display:inline-block}.content__arrow[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;background-color:rgba(0,0,0,.7)}.content__arrow--icon[_ngcontent-%COMP%]{width:100%;height:100%;background-position:center center;background-repeat:no-repeat;background-size:70%}'],changeDetection:0}),n})();const Y7e=[xi,Io];let MR=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[Y7e]}),n})();class Hse{constructor(n,o){this.ngZone=n,this.scheduler=o}now(){return this.scheduler.now()}}class J7e extends Hse{schedule(...n){return this.ngZone.runOutsideAngular(()=>this.scheduler.schedule(...n))}}class X7e extends Hse{schedule(...n){return an.isInAngularZone()?this.scheduler.schedule(...n):this.ngZone.run(()=>this.scheduler.schedule(...n))}}let eqe=(()=>{var t;class n{constructor(e){this.ngZone=e}observeOnNgZone(e){return OS(this.enterNgZone(e))}observeOutOfNgZone(e){return OS(this.leaveNgZone(e))}subscribeOnNgZone(e){return Ux(this.enterNgZone(e))}subscribeOutOfNgZone(e){return Ux(this.leaveNgZone(e))}enterNgZone(e=oP){return new X7e(this.ngZone,e)}leaveNgZone(e=oP){return new J7e(this.ngZone,e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(an))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const tqe=["fvc"];function nqe(t,n){}function iqe(t,n){1&t&&U(0,nqe,0,0,"ng-template",4),2&t&&l("ngTemplateOutlet",_().$implicit.template)}function oqe(t,n){1&t&&U(0,iqe,1,1,"ng-template",3),2&t&&l("contentFragmentWidth",_().fragmentWidth)("contentFragmentClass","carousel__vf")}const rqe=["placeholder"],sqe=["text-with-placeholders",""],aqe=["*"];let V4=(()=>{var t;class n{constructor(e){this.template=e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qa))},t.\u0275dir=qn({type:t,selectors:[["","carouselItem",""]]}),n})(),qse=(()=>{var t;class n{constructor(e,i,r,s){this.el=e,this.rulerService=i,this.cdr=r,this.zoneScheduler=s,this.interval=5e3,this.fragmentWidth=0,this.currentSlide=0,this.reset$=new Qn(void 0),this.lastSlide=0}ngAfterContentInit(){this.changeItems$=this.reset$.pipe(es(()=>_u(this.interval,this.interval,this.zoneScheduler.leaveNgZone()))),this.subscription=wp([this.rulerService.getElementDimension(this.fvc.nativeElement),this.items.changes.pipe(VT(this.items))]).pipe(Da(e=>{this.fragmentWidth=e[0].width,this.cdr.detectChanges()}),es(()=>this.changeItems$)).subscribe(()=>{this.currentSlide>=this.items.length-1?this.currentSlide=0:this.currentSlide+=1,this.currentSlide!==this.lastSlide&&(this.lastSlide=this.currentSlide,this.cdr.detectChanges())})}onSnap(e){e!==this.currentSlide&&(this.currentSlide=e,this.cdr.detectChanges(),this.reset$.next())}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(Ua),g(Re),g(eqe))},t.\u0275cmp=pe({type:t,selectors:[["carousel"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,V4,4),2&e){let s;je(s=He())&&(i.items=s)}},viewQuery:function(e,i){if(1&e&&$e(tqe,7,$t),2&e){let r;je(r=He())&&(i.fvc=r.first)}},inputs:{interval:"interval"},features:[mn([{provide:jb,useValue:{showArrows:!1,showScrollbar:!1}}])],decls:3,vars:2,consts:[[1,"carousel__fvc",3,"snapToIndex","fragmentSnap"],["fvc",""],[4,"ngFor","ngForOf"],["contentFragment","",3,"contentFragmentWidth","contentFragmentClass"],[3,"ngTemplateOutlet"]],template:function(e,i){1&e&&(p(0,"fragmented-view-controller",0,1),Y("fragmentSnap",function(s){return i.onSnap(s)}),U(2,oqe,1,2,null,2),m()),2&e&&(l("snapToIndex",i.currentSlide),d(2),l("ngForOf",i.items))},dependencies:[Mt,qr,Fm,Hb],styles:["[_nghost-%COMP%]{display:flex;align-self:center}.carousel__fvc[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),n})();const hqe=[xi,Io,Yi,MR];let z4=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[hqe]}),n})();const D_=(new yl).useYearsConfig({showNullValue:!0,showDoubleDigits:!0}).useMonthsConfig({showNullValue:!0,showDoubleDigits:!0}).useDaysConfig({min:Rt.Days,showNullValue:!0,showTextPeriod:!1,showDoubleDigits:!0}).useHoursConfig({min:Rt.Seconds,showNullValue:!0,showTextPeriod:!1,showDoubleDigits:!0}).useMinutesConfig({max:Rt.Hours,min:Rt.Seconds,showNullValue:!0,showTextPeriod:!1,showDoubleDigits:!0}).useSecondsConfig({max:Rt.Hours,min:Rt.Seconds,showNullValue:!0,showTextPeriod:!1,showDoubleDigits:!0}).build(),eg=(new yl).useYearsConfig({showTextPeriod:!0,showNullValue:!1,showDoubleDigits:!1}).useMonthsConfig({showTextPeriod:!0,showDoubleDigits:!1}).useDaysConfig({min:Rt.Days,showNullValue:!1,showTextPeriod:!0,showDoubleDigits:!1}).useHoursConfig({min:Rt.Minutes,showNullValue:!1,showTextPeriod:!0,showDoubleDigits:!1}).useMinutesConfig({max:Rt.Minutes,min:Rt.Minutes,showNullValue:!1,showTextPeriod:!0,showDoubleDigits:!1}).useSecondsConfig({min:Rt.Seconds,max:Rt.Minutes,showNullValue:!1,showTextPeriod:!0,showDoubleDigits:!1}).build();let Fs=(()=>{var t;class n{constructor(e,i,r,s,a){this.appState=e,this.changeDetectionRef=i,this.ngZone=r,this.timerLeftPipe=s,this.timeService=a,this.hideTextPeriod=!0,this.timerConfig=D_,this.minTimeUnitsType=Rt.Seconds,this.maxTimeUnitsType=Rt.Years,this.onAppResume=()=>{this.stop();const c=this.timeStamp-this.timeService.getServerTimeMs();c<=0?this.onCountdownFinished.emit():this.start(c)},this.onCountdownFinished=new ke,this.running=!1}ngOnInit(){this.changeDetectionRef.detach(),this.appState.subscribe(co.PageVisible,this.onAppResume),this.appState.subscribe(co.ConnectionRestored,this.onAppResume)}ngOnChanges(e){e.milliseconds&&(this.timeStamp=this.timeService.getServerTimeMs()+e.milliseconds.currentValue),e.milliseconds&&e.milliseconds.currentValue>0&&(this.stop(),this.start()),e.milliseconds&&0===e.milliseconds.currentValue&&(this.setHumanReadableTime(0),this.changeDetectionRef.detectChanges())}ngOnDestroy(){this.stop(),this.appState.unsubscribe(co.PageVisible,this.onAppResume),this.appState.unsubscribe(co.ConnectionRestored,this.onAppResume)}start(e){e&&(this.milliseconds=e),this.setIsRunning(!0),this.updateTime(this.milliseconds),this.ngZone.runOutsideAngular(()=>{this.interval=setInterval(()=>{this.milliseconds-=1e3,this.milliseconds<=0&&(this.updateTime(0),this.stop(),this.ngZone.run(()=>this.onCountdownFinished.emit())),!1!==this.appState.getAppState().visible&&this.updateTime(this.milliseconds)},1e3)})}stop(){this.setIsRunning(!1),clearInterval(this.interval)}updateTime(e){this.setHumanReadableTime(e),!0===this.isRunning()&&this.changeDetectionRef.detectChanges()}setHumanReadableTime(e){const i={timeConfig:this.timerConfig,maxTimeUnitsType:this.maxTimeUnitsType,minTimeUnitsType:this.minTimeUnitsType,showLessThanTimeUnit:this.showLessThanTimeUnit};this.humanReadableTime=this.timerLeftPipe.transform(Math.floor(e/1e3),i)}isRunning(){return this.running}setIsRunning(e){this.running=e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Sa),g(Re),g(an),g(Ps),g(Bn))},t.\u0275cmp=pe({type:t,selectors:[["timer"]],inputs:{milliseconds:"milliseconds",hideTextPeriod:"hideTextPeriod",timerConfig:"timerConfig",minTimeUnitsType:"minTimeUnitsType",maxTimeUnitsType:"maxTimeUnitsType",showLessThanTimeUnit:"showLessThanTimeUnit",styleObject:"styleObject"},outputs:{onCountdownFinished:"onCountdownFinished"},features:[it],decls:2,vars:2,consts:[[1,"time",3,"ngStyle"]],template:function(e,i){1&e&&(p(0,"span",0),H(1),m()),2&e&&(l("ngStyle",i.styleObject),d(),se(i.humanReadableTime))},dependencies:[Cm],styles:["[_nghost-%COMP%]{font-size:2.4rem;text-align:center;color:#fff;-webkit-text-orientation:upright;text-orientation:upright;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media only screen and (max-width: 768px),only screen and (max-width: 980px) and (orientation: landscape){[_nghost-%COMP%]{font-size:1.4rem}}"],changeDetection:0}),n})();!function(t){let n;(n=t.ECustomFormat||(t.ECustomFormat={})).BonusTimeFormat="bonusTimeFormat"}(Fs||(Fs={}));let oc=(()=>{var t;class n{constructor(e,i){this.translate=e,this.renderer=i}ngOnInit(){const e=this.translate.instant(this.key).split(/{\d+}/);e.length<=1&&(this.placeholder.nativeElement.innerHtml="",this.placeholder.nativeElement.innerText="");for(let i=0;i<e.length;i++)this.renderer.insertBefore(this.placeholder.nativeElement,this.renderer.createText(e[i]),this.placeholder.nativeElement.children[i])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ls),g(ji))},t.\u0275cmp=pe({type:t,selectors:[["","text-with-placeholders",""]],viewQuery:function(e,i){if(1&e&&$e(rqe,7),2&e){let r;je(r=He())&&(i.placeholder=r.first)}},inputs:{key:"key"},attrs:sqe,ngContentSelectors:aqe,decls:3,vars:0,consts:[[1,"twp__text"],["placeholder",""]],template:function(e,i){1&e&&(Co(),p(0,"p",0,1),yo(2),m())},styles:[".twp__text[_ngcontent-%COMP%]{white-space:break-spaces}"],changeDetection:0}),n})();const fqe=[xi];let Mw=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[fqe]}),n})();var Wse=__webpack_require__(14705),gqe=__webpack_require__.n(Wse),Ah=__webpack_require__(58669);function _qe(t,n){if(1&t&&(p(0,"div",5)(1,"p",6),H(2),V(3,"translate"),m(),B(4,"timer",7),m()),2&t){const o=_(2);l("ngStyle",o.viewModel.timer.style.wrapper),d(),l("ngStyle",o.viewModel.timer.style.heading),d(),ze(" ",$(3,6,"IMAGE_MESSAGE.TIMER_HEADING")," "),d(2),l("milliseconds",o.viewModel.timer.timeLeft)("timerConfig",o.timerConfig)("styleObject",o.viewModel.timer.style.timer)}}function vqe(t,n){if(1&t){const o=Ce();p(0,"div",8),Y("click",function(i){const s=oe(o).$implicit;return re(_(2).clickManager(s.action,i))}),m()}2&t&&l("ngStyle",n.$implicit.style)}function bqe(t,n){if(1&t){const o=Ce();p(0,"div",1),Y("click",function(i){oe(o);const r=_();return re(r.clickManager(r.viewModel.shim.action,i))}),p(1,"div",2),Y("click",function(i){oe(o);const r=_();return re(r.clickManager(r.viewModel.background.action,i))}),yo(2),U(3,_qe,5,8,"div",3)(4,vqe,1,1,"div",4),m()()}if(2&t){const o=_();d(),l("ngStyle",o.viewModel.background.style),d(2),l("ngIf",o.viewModel.timer),d(),l("ngForOf",o.viewModel.buttons)("ngForTrackBy",o.trackByFn)}}const Cqe=["*"];class OR{constructor(){this.events={envKey:Lt.CONFIG.core.tracking.deltadna.events.envKey,collectURL:Lt.CONFIG.core.tracking.deltadna.events.url,url:Lt.CONFIG.core.tracking.deltadna.events.url+"/"+Lt.CONFIG.core.tracking.deltadna.events.envKey,eventsEnabled:Lt.CONFIG.core.tracking.deltadna.events.enabled,deny:Lt.CONFIG.core.tracking.deltadna.events.deny},this.engagement={engagementEnabled:Lt.CONFIG.core.tracking.deltadna.engage.enabled,engageURL:Lt.CONFIG.core.tracking.deltadna.engage.url,envKey:Lt.CONFIG.core.tracking.deltadna.engage.envKey,url:Lt.CONFIG.core.tracking.deltadna.engage.url+"/"+Lt.CONFIG.core.tracking.deltadna.engage.envKey,deny:Lt.CONFIG.core.tracking.deltadna.engage.deny}}}let $se=(()=>{var t;class n{constructor(e,i){this.http=e,this.settings=i}process(e){e||console.error("[dDNA] HttpEventRequest.process - invalid event");let i=null;try{i=JSON.stringify(e)}catch(s){console.error("[dDNA] HttpEventRequest.process - JSON.stringify error",s)}console.warn("[dDNA] sending event",e);let r=new Cl({"Access-Control-Allow-Headers":"Content-Type","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Origin":"*"});this.http.post(this.settings.events.url,i,{headers:r}).toPromise().catch(s=>{console.error("[dDNA] HttpEventRequest.process error",s)})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(YS),T(OR))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class ER{constructor(){this.params={},this.items=[]}addParam(n,o){return"string"!=typeof n||null==o?(console.error("[dDNA] Params.addParam - invalid arguments"),this):(ER.prototype.isPrototypeOf(o)?(console.warn("value",o),this.params[n]=o.getModel()):this.params[n]=o,this)}getParam(n){return this.params[n]||null}getModel(){return this.params}addItem(n,o,e){if("string"!=typeof n||"string"!=typeof o||isNaN(e))return console.error("[dDNA] Product.addItem - invalid arguments"),this;let i={item:{itemName:n,itemType:o,itemAmount:e}};return this.getParam("items")||(this.items=[],this.addParam("items",this.items)),this.items.push(i),this}}class Kse{constructor(n,o){"string"==typeof n?o?(this.name=n,this.userId=o.analytics.userId,this.sessionId=o.analytics.sessionId,this.parameters=new ER):console.error("[dDNA] GameEvent - invalid user"):console.error("[dDNA] GameEvent - invalid arguments")}getParams(n){return this.parameters.getParam(n)}addParam(n,o){return"string"!=typeof n||null==o?(console.error("[dDNA] GameEvent.addParam - invalid arguments",n),this):(this.parameters.addParam(n,o),this)}getModel(){return{eventName:this.name,eventUUID:(Math.floor(9999999999999*Math.random())+1).toString(),userID:this.userId,sessionID:this.sessionId,eventParams:this.parameters.getModel()}}}const j4=new Ot("SettingsService");let Zse=(()=>{var t;class n{constructor(e,i,r){this.communication=e,this.ngZone=i,this.engageSettings=r}recordEvent(e){e&&e instanceof Kse?this.engageSettings.preventCollect()||this.ngZone.runOutsideAngular(()=>{this.communication.process(e.getModel())}):console.error("[dDNA] EventManager.recordEvent - invalid gameEvent")}}return(t=n).\u0275fac=function(e){return new(e||t)(T($se),T(an),T(j4))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Qse=function(t){return t.PlayRV="playRV",t}(Qse||{}),Ow=function(t){return t.Dismiss="dismiss",t.None="none",t.Action="action",t.Link="link",t}(Ow||{});let H4=(()=>{var t;class n{constructor(e){this.appService=e,this.destroy=new ke,this.onLinkClicked=new ke,this.onActionClicked=new ke,this.openLink=new ke,this.timerConfig=new yl(D_).useYearsConfig({min:Rt.Months,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useMonthsConfig({min:Rt.Days,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useDaysConfig({min:Rt.Hours,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).build()}clickManager(e,i){switch(i.stopPropagation(),console.log("type of action",e),e&&e.type?e.type:Ow.Dismiss){case Ow.Dismiss:this.dismiss();break;case Ow.None:this.noneAction();break;case Ow.Link:this.linkAction(e);break;case Ow.Action:this.clickAction(e.value);break;default:this.dismiss()}}destroyComponent(){this.destroy.emit()}trackByFn(e){return e}dismiss(){this.destroyComponent()}noneAction(){console.log("no action clicked")}linkAction(e){if(!e||!e.value)return this.destroyComponent();this.onLinkClicked.emit(this.viewModel.eventParams.responseEngagementID),this.openLink.emit(e.value),this.destroyComponent()}clickAction(e){this.onActionClicked.emit(e),this.dismiss()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt))},t.\u0275cmp=pe({type:t,selectors:[["image-message"]],inputs:{viewModel:"viewModel"},outputs:{destroy:"destroy",onLinkClicked:"onLinkClicked",onActionClicked:"onActionClicked",openLink:"openLink"},ngContentSelectors:Cqe,decls:1,vars:1,consts:[["class","image-message__wrapper",3,"click",4,"ngIf"],[1,"image-message__wrapper",3,"click"],[1,"image-message__main--image-message",3,"ngStyle","click"],["class","image-message__timer--wrapper",3,"ngStyle",4,"ngIf"],["class","image-message__buttons",3,"ngStyle","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"image-message__timer--wrapper",3,"ngStyle"],[1,"image-message__timer--text",3,"ngStyle"],[1,"image-message__timer",3,"milliseconds","timerConfig","styleObject"],[1,"image-message__buttons",3,"ngStyle","click"]],template:function(e,i){1&e&&(Co(),U(0,bqe,5,4,"div",0)),2&e&&l("ngIf",i.viewModel)},dependencies:[Mt,Ne,Cm,Fs,qe],styles:["[_nghost-%COMP%]{width:100%;height:100%}.image-message__wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.image-message__main--image-message[_ngcontent-%COMP%]{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden}.image-message__buttons[_ngcontent-%COMP%]{background-repeat:no-repeat;position:absolute;cursor:pointer}.image-message__buttons[_ngcontent-%COMP%]:hover{transform:scale(1.05)}.image-message__timer--wrapper[_ngcontent-%COMP%]{position:absolute;bottom:8%;right:3%;display:flex;align-items:center;justify-content:center;flex-flow:row wrap;font-size:28px}@media only screen and (max-width: 568px) and (orientation: portrait){.image-message__timer--wrapper[_ngcontent-%COMP%]{font-size:20px}}@media only screen and (max-width: 980px) and (orientation: landscape){.image-message__timer--wrapper[_ngcontent-%COMP%]{font-size:18px}}.image-message__timer[_ngcontent-%COMP%]{display:flex}"],changeDetection:0}),n})(),q4=(()=>{var t;class n{constructor(){}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["simple-message"]],inputs:{viewModel:"viewModel"},decls:5,vars:2,consts:[[1,"simple-message__wrapper"],[1,"simple-message__main--simple-message"],[1,"simple-message__container--title"],[1,"simple-message__simple-message--title",3,"innerHTML"],[1,"simple-message__container--message",3,"innerHTML"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2),B(3,"div",3),m(),B(4,"div",4),m()()),2&e&&(d(3),l("innerHTML",i.viewModel.heading,Yn),d(),l("innerHTML",i.viewModel.message,Yn))},styles:["[_nghost-%COMP%]{width:100%;height:100%}.simple-message__wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.simple-message__main--simple-message[_ngcontent-%COMP%]{position:relative;width:100%;max-width:70rem;margin:1.5rem;height:35rem;display:flex;flex-flow:column nowrap;max-height:90%}.simple-message__main--simple-message[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], .simple-message__main--simple-message[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{color:#fff;list-style-type:initial}.simple-message__main--simple-message[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:4rem}.simple-message__container--title[_ngcontent-%COMP%]{position:relative;padding:1rem;display:flex;justify-content:center;align-items:center;flex-shrink:0;font-size:1.8rem}.simple-message__container--message[_ngcontent-%COMP%]{padding:0 1rem;margin:1rem 0;overflow-y:auto;overflow-x:hidden;font-size:1.4rem}"],changeDetection:0}),n})(),Yse=(()=>{var t;class n{constructor(e,i){this.http=e,this.settings=i}request(e){return new Promise((i,r)=>{if(!e)return console.error("[dDNA] HttpEngageRequest.process - invalid engagementModel"),r("InvalidParams");let s=null;try{s=JSON.stringify(e)}catch(c){return console.error("[dDNA] HttpEngageRequest.request - JSON.stringify error",c),r("InternalError")}console.warn("[dDNA] requesting engagement",e);let a=new Cl({"Content-Type":"application/json","Access-Control-Allow-Headers":"Content-Type","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Origin":"*"});this.http.post(this.settings.engagement.url,s,{headers:a}).toPromise().then(c=>{i(c)}).catch(c=>c instanceof Mp&&c.error&&-1!==c.error.indexOf("Unknown decision point")?i():(console.error("[dDNA] HttpEngageRequest.request error",c),r(c)))})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(YS),T(OR))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class Jse{constructor(n,o,e,i,r){this.decisionPoint=n,this.userId=o,this.sessionId=e,this.platform=i,this.locale="".concat(r,"_").concat(r.toUpperCase()),this.parameters=new ER,this.flavour="engagement"}addParam(n,o){return"string"!=typeof n||null==o?(console.error("[dDNA] Engagement.addParam - invalid arguments",n),this):(this.parameters.addParam(n,o),this)}getModel(){return{userID:this.userId,decisionPoint:this.decisionPoint,flavour:this.flavour,sessionID:this.sessionId,locale:this.locale,platform:this.platform.toUpperCase()||"UNKNOWN",version:"4",parameters:this.parameters.getModel()}}}class Xse{constructor(n){this.id=n.eventParams.responseEngagementID,this.isImageMessage=!!n.image,this.isSimpleMessage=!!n.heading&&!!n.message,this.image=n.image,this.heading=n.heading,this.message=n.message,this.transactionID=n.transactionID,this.eventParams=n.eventParams,this.parameters=n.parameters,this.timeService=new Bn,this.expiresAt=this.calcExpiresAt(n.parameters)}isLimited(){return this.expiresAt&&this.parameters.cmpTimestamp-this.timeService.getServerTimeMs()<=0}getTimeLeft(){return this.expiresAt?this.expiresAt-this.timeService.getServerTimeMs():0}calcExpiresAt(n){const o=n.seeOfferExpirationTimer?this.timeService.getServerTimeMs()+n.seeOfferExpirationTimer*Gn.ETime.MsPerSecond:void 0;return void 0!==o&&void 0!==n.cmpTimestamp?Math.min(o,n.cmpTimestamp):o||n.cmpTimestamp}}let Um=(()=>{var t;class n{constructor(e){this.dispose=()=>{this.inited=!1,this.promoList=new ie.List,this.storeBehaviorSubject.next(void 0),this.containerBehaviorSubject.next(void 0),this.authSubscription&&this.authSubscription.unsubscribe(),Object.keys(this.timersIds).forEach(i=>clearTimeout(this.timersIds[i]))},this.authListenerService=e,this.promoList=new ie.List,this.bannerList=new ie.List,this.containerBehaviorSubject=new Qn(void 0),this.storeBehaviorSubject=new Qn(void 0),this.bannerBehaviorSubject=new Qn(void 0),this.inited=!1,this.timersIds={}}get storePromotions(){return this.storeBehaviorSubject.asObservable()}get containerPromotions(){return this.containerBehaviorSubject.asObservable()}get bannerPromotions(){return this.bannerBehaviorSubject.asObservable()}onConversion(e){const i=this.promoList.find(r=>r.parameters.productID===e);this.removeFromPromoList(i)}onBannerDestroy(e){this.removeFromBannerList(e)}addEngagement(e){const i=this.showInBanner(e),r=this.canAddToList(e);i&&this.addToBannerList(e),r&&this.addToPromoList(e),(i||r)&&this.trackExpiration(e)}init(){!0!==this.inited&&(this.attachListeners(),this.inited=!0)}addToPromoList(e){this.promoList.add(e),this.emitListUpdate(e)}addToBannerList(e){this.bannerList.add(e),this.emitBannerUpdate()}removeFromPromoList(e){this.promoList.remove(e)&&this.emitListUpdate(e)}removeFromBannerList(e){this.bannerList.remove(e),this.emitBannerUpdate()}isInContainer(e){return!!this.promoList.find(i=>e.id===i.id||e.parameters.productID&&e.parameters.productID===i.parameters.productID)}attachListeners(){this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.dispose)}emitContainerChange(){this.containerBehaviorSubject.next(this.promoList.where(e=>e.parameters.showInContainer).toArray())}emitStoreChange(){const e=this.promoList.where(i=>i.parameters.showInStore);this.storeBehaviorSubject.next(e.length>0?e.toArray():void 0)}emitBannerUpdate(){this.bannerBehaviorSubject.next(this.bannerList.last())}emitListUpdate(e){e.parameters.showInContainer&&this.emitContainerChange(),e.parameters.showInStore&&this.emitStoreChange()}trackExpiration(e){if(e.expiresAt&&void 0===this.timersIds[e.id]){let i=e.getTimeLeft();i<36e5&&(this.timersIds[e.id]=setTimeout(()=>this.onExpire(e),i))}}showInBanner(e){return e.parameters.showInBanner}canAddToList(e){return(e.parameters.showInContainer||e.parameters.showInStore)&&!1===this.isInContainer(e)}onExpire(e){e.expiresAt&&this.timersIds[e.id]&&(clearTimeout(this.timersIds[e.id]),delete this.timersIds[e.id]);const i=this.bannerList.find(s=>s.id===e.id),r=this.promoList.find(s=>s.id===e.id);this.removeFromBannerList(i),this.removeFromPromoList(r)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(xr))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),eae=(()=>{var t;class n{constructor(e,i,r){this.communication=e,this.deltaEngagementManager=i,this.engageSettings=r}handle(e,i){return this.request(e).then(r=>{if(!r||Sb(r.parameters))return;if(!r.transactionID)return void console.error("Delta DNA NotEngaged");const s=new Xse(r);return s.isLimited()||!s.isSimpleMessage&&!s.isImageMessage||(i||(i={}),this.deltaEngagementManager.addEngagement(this.extend(i,s))),s}).catch(r=>{r instanceof Mp&&this.throwException(r.error)?console.error("Delta DNA throwException",r):console.error(r)})}request(e){return new Promise((i,r)=>e&&e instanceof Jse?this.engageSettings.preventEngage()?i():void this.communication.request(e.getModel()).then(s=>{i(s)}).catch(s=>{r(s)}):(console.error("[dDNA] EngagementManager.engagement - invalid engagement"),i()))}extend(e,i){return Wse(i.parameters,e),i}throwException(e){switch(e){case"NotEngaged":return!1;case"InvalidParams":case"InternalError":return console.error("[dDNA] EngageManager handle - error",e),!0;default:return!0}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Yse),T(Um),T(j4))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const yqe=[xi,Mw,Yi],Sqe=[$se,Zse,OR,Yse,eae];let tae=(()=>{var t;class n{static forRoot(e){return{ngModule:n,providers:[...Sqe,{provide:j4,useClass:e.engageSettingsService}]}}static forChild(){return{ngModule:n}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t,bootstrap:[H4,q4]}),t.\u0275inj=Xt({imports:[yqe]}),n})();class wqe{constructor(n,o){this.configuration=n,this.size=o}createImageMessageViewModel(){return this.validConfiguration()?(this.calcPopupDimensions(),this.buildImageMessage()):Promise.reject("Invalid DeltaDNA Image message configuration")}buildImageMessage(){var n=this;return f(function*(){const r={background:yield n.buildBackground(n.configuration.image),buttons:n.configuration.image.spritemap.buttons?n.buildButtons(n.configuration.image):void 0,shim:n.buildShim(n.configuration.image),eventParams:n.configuration.eventParams,parameters:n.configuration.parameters};return n.configuration.expiresAt&&(r.timer=n.buildTimer()),r})()}validConfiguration(){if(!this.configuration||!Ah(this.configuration,"image"))return!1;const n=this.configuration.image;if(!(Ah(n,"url")&&Ah(n,"height")&&Ah(n,"width")&&Ah(n,"spritemap")&&Ah(n,"layout")))return!1;const o=n.layout,e=n.spritemap;return!(!Ah(o,"landscape")&&!Ah(o,"portrait"))&&Ah(e,"background")}buildBackground(n){var o=this;return f(function*(){const e=Object.keys(n.layout)[0],i=Object.keys(n.layout[e].background)[0],r=n.layout[e].background[i].halign,s=n.layout[e].background[i].valign,a=n.layout[e].background.action,c="contain"===i?o.containBackground(n):o.coverBackground(n);return yield o.loadImage(n.url),{style:{...c,...o.getBackgroundPositionStyle(r,s)},action:a}})()}buildButtons(n){const o=n,e=o.spritemap,i=Object.keys(o.layout)[0];let s,r=[];for(let a=0,c=e.buttons.length;a!==c;a++)s={style:{backgroundImage:"url("+o.url+")",width:e.buttons[a].width*this.scaleFactor+"px",height:e.buttons[a].height*this.scaleFactor+"px",backgroundPosition:"-"+e.buttons[a].x*this.scaleFactor+"px -"+e.buttons[a].y*this.scaleFactor+"px",backgroundPositionX:"-"+e.buttons[a].x*this.scaleFactor+"px",backgroundPositionY:"-"+e.buttons[a].y*this.scaleFactor+"px",backgroundSize:o.width/e.buttons[a].width*100+"%",top:o.layout[i].buttons[a].y*this.scaleFactor+"px",left:o.layout[i].buttons[a].x*this.scaleFactor+"px"},action:o.layout[i].buttons[a].action},r.push(s);return r}buildTimer(){return{style:{wrapper:{},heading:{fontWeight:"bold"},timer:{fontWeight:"bold",color:"rgb(255, 255, 255)",margin:"0"}},timeLeft:this.configuration.getTimeLeft()}}buildShim(n){return{style:void 0,action:n.shim.action}}calcPopupDimensions(){const n=this.configuration.image.spritemap,o=this.size.height,e=this.size.width;let i,r,s;i=n.background.height/n.background.width,n.background.height>n.background.width?(s=o>n.background.height?n.background.height:o,r=s/i,r>e&&(r=e,s=r*i)):(r=e>n.background.width?n.background.width:e,s=r*i,s>o&&(s=o,r=s/i)),this.popupDimensions={width:r,height:s}}getPopupDimensions(){return this.popupDimensions}loadImage(n){return new Promise((o,e)=>{let i=new Image;i.src=n,i.onload=function(){i=void 0,o()},i.onerror=function(r){i=void 0,e(r)}})}coverBackground(n){const o=n.spritemap,e=this.size.height/this.size.width,i=o.background.height/o.background.width;let r,s,a;return e>i?(r=this.size.height/i/o.background.width*(o.background.width/2+o.background.x)-this.size.width/2,s=o.background.y*(this.size.height/o.background.height),a=n.width/o.background.width*e/i*100):(r=o.background.x*(this.size.width/o.background.width),s=this.size.width*i/o.background.height*(o.background.height/2+o.background.y)-this.size.height/2,a=n.width/o.background.width*100),{backgroundImage:"url("+n.url+")",backgroundPosition:"-"+r+"px -"+s+"px",backgroundPositionX:"-"+r+"px",backgroundPositionY:"-"+s+"px",backgroundSize:a+"%",height:"100%",backgroundRepeat:"no-repeat"}}containBackground(n){const o=n.spritemap,e=this.getPopupDimensions(),i=e.height,r=e.width,s=Math.round(n.width/o.background.width*100);return this.scaleFactor=i/o.background.height,{backgroundImage:"url("+n.url+")",width:r+"px",height:i+"px",backgroundPosition:"-"+o.background.x*this.scaleFactor+"px -"+o.background.y*this.scaleFactor+"px",backgroundPositionX:"-"+o.background.x*this.scaleFactor+"px",backgroundPositionY:"-"+o.background.y*this.scaleFactor+"px",backgroundSize:s+"%",backgroundRepeat:"no-repeat"}}getBackgroundPositionStyle(n,o){const e={center:"50%",left:"0",right:"100%"},i={center:"50%",top:"0",bottom:"100%"};return{left:e[n],top:i[o],transform:"translate(-".concat(e[n],", -").concat(i[o],")")}}}class Tqe{constructor(n){this.configuration=n}createSimpleMessageViewModel(){if(this.validConfiguration(this.configuration))return{heading:this.configuration.heading,message:this.configuration.message,eventParams:this.configuration.eventParams,parameters:this.configuration.parameters};console.error("Invalid DeltaDNA Simple message configuration")}validConfiguration(n){return Ah(n,"message")&&Ah(n,"heading")}}class Pqe{constructor(n,o,e){this.deltaDNAEvents=[{analyticsEventInfo:{category:Nn.Socket,type:"state"},deltaDNAEventInfo:{category:Nn.Socket,type:"socket"}},{analyticsEventInfo:{category:Nn.Settings,type:"changed"},deltaDNAEventInfo:{category:Nn.Options,type:"options"}},{analyticsEventInfo:{category:Nn.Shop,type:"entered"},deltaDNAEventInfo:{category:Nn.Shop,type:"shopEntered"}}],this.config=e,this.eventManager=n,this.store=o}sendEvent(n){if(!jS.checkIfTrackingEventIsSupported(n,this.config))return;console.warn("DeltaDNAAdapterService",n);const o=this.deltaDNAEvents.find(r=>Kf(r.analyticsEventInfo,{category:n.category,type:n.type}));let e=MP(n);o&&(e.category=o.deltaDNAEventInfo.category,e.type=o.deltaDNAEventInfo.type);const i=this.buildEventModel(e.type);if(i){if(n.args)for(let r in n.args)i.addParam(r,n.args[r]);this.eventManager.recordEvent(i)}}sendUIEvent(n){console.warn("DeltaDNAService UI event",n);const o=this.buildEventModel("uiInteraction");if(o){if(n.args)for(let e in n.args)o.addParam(e,n.args[e]);this.eventManager.recordEvent(o)}}buildEventModel(n){if(this.checkValidUser(this.store.selectUserState()))return new Kse(n,this.store.selectUserState());console.error("buildEventModel - Invalid user")}checkValidUser(n){return!!(n&&n.analytics&&n.profile&&n.wallet&&n.roles&&n.roles.length>0&&n.stats&&n.settings&&n.settings.privacy)}}var Tl;!function(t){t.ClientDeviceEvent=class n{constructor(u,h,b){this.category=u,this.type=h,this.args=b}},t.SettingsChangedEvent=class o{constructor(u,h,b){this.category=u,this.type=h,this.args=b}},t.MatchmakingQueueEvent=class e{constructor(u,h,b){this.category=u,this.type=h,this.args=b}},t.ShopEnteredEvent=class i{constructor(u,h,b){this.category=u,this.type=h,this.args=b}},t.GameLoadEvent=class r{constructor(u,h,b){this.category=u,this.type=h,this.args=b}},t.SocketEvent=class s{constructor(u,h,b){this.category=u,this.type=h,this.args=b}},t.BannerClickEvent=class a{constructor(u,h,b){this.action=u,this.target=h,this.args=b}}}(Tl||(Tl={}));var Mqe=__webpack_require__(35066),Oqe=__webpack_require__(1677),Eqe=__webpack_require__(78060),xqe=__webpack_require__(27884),Aqe=__webpack_require__(6236),W4=__webpack_require__(83094),Rqe=__webpack_require__(88131),$4=__webpack_require__(59381);function kqe(t){return(0,$4.p)(t,!0)}function Lqe(t){return(0,W4.d)(t,!0)}var Dqe=__webpack_require__(2134),fn=__webpack_require__(27885),nae=__webpack_require__(21494),Bqe=__webpack_require__(17156),Nqe=__webpack_require__(73345),xR=__webpack_require__(60408),AR=__webpack_require__(16391),vo=__webpack_require__(71221),Fqe=__webpack_require__(94939),iae=__webpack_require__(62992),B_=__webpack_require__(64038),Uqe=__webpack_require__(32775),Lp=__webpack_require__(85016),Rh=__webpack_require__(76775),ho=__webpack_require__(52387),qb=__webpack_require__(72036);class Gqe extends Bqe.Z{constructor(n,o,e,i,r){super(),this.wt=n,this.u=o,this.yt=e,this.Ft=i,this.qt=r,this.wt=n,this.u=o,this.yt=e,this.Ft=i,this.qt=r,this.Jt=new Fqe.Z,fn.ZP.$t(this.Jt),this.Bt=0,this.Ht=0,this.cards=[],this.Kt();const s=Rh.Z.Yt.Qt;new Rh.Z(s,ho.Z).Zt(s.ss.ts,a=>{this.es(a)}),this.hs=null,this.rs=null,this.ns=null,this.os=null,this.ls=null,this.us=10,this.cs=0}fs(){return this.hs}ds(n){this.hs=n}ps(){return this.rs}vs(n){this.rs=n}Kt(){if(!this.u)return;const n=this.u.j(vo.I.C.Cs)||[],o=[];for(let e=0;e<n.length;e++){const i=(0,AR.rN)(n[e]);null!=i&&o.push(i)}this.cards=this.ws(this.bs(o,!1)),this.Bt=this.u.j(vo.I.C.gs)||this.Bt,this.Ht=this.u.j(vo.I.C.ys)||this.Ht}Ns(n,o=!1,e=0,i=0){let r;if(o){r=[];for(const s of this.cards)s.test&&r.push(s)}else r=this.cards.slice();for(let s=0;s<n.length;s++){const a=n[s];let c=null;for(let u=0;u<this.cards.length;u++)if(a.id===this.cards[u].id){c=this.cards[u];break}if(o){const u=(0,AR.xA)(a);null!=c&&c.viewed&&u&&(u.viewed=!0),null!=u&&r.push(u)}else if(null==c){const u=(0,AR.xA)(a);null!=u&&r.push(u)}else if(!c.Ct(a))for(let u=0;u<r.length;u++)if(a.id===r[u].id){r.splice(u,1);break}}this.cards=this.ws(this.bs(r,o)),this.js(),this.Bt=e,this.Ht=i,this.u&&(this.u.k(vo.I.C.gs,this.Bt),this.u.k(vo.I.C.ys,this.Ht))}Rs(n){if(this.Ts()&&null!=n&&n.cards){this.u&&this.u.k(vo.I.C.Ds,fn.ZP.Ss());const o=n.full_sync;o||this.Kt(),this.Ns(n.cards,o,n.last_full_sync_at,n.last_card_updated_at),this.Jt.Dt(this.ks(!0))}}Us(n){this.u&&this.u.k(vo.I.C.As,n)}Ls(n,o,e){const i=()=>{this.Fs(o,e,!0)},r=n?(0,nae.D)(n):null;let s;if(this.xs(),!r||!r["retry-after"])return void this.Us(0);const a=r["retry-after"];if(isNaN(a)&&!isNaN(Date.parse(a)))s=Date.parse(a)-(new Date).getTime(),s<0&&i();else{if(isNaN(parseFloat(a.toString())))return iae.Z.q(qb.G.Ms,{e:"Received unexpected value for retry-after header in /sync response: "+a}),void this.Us(0);s=1e3*parseFloat(a.toString())}this.ns=window.setTimeout(()=>{i()},s);let c=0;this.u&&(c=this.u.j(vo.I.C.As)),(null==c||isNaN(parseInt(c.toString())))&&(c=0),this.Us(parseInt(c.toString())+1)}es(n){var o;if(!this.Ts())return;this.Kt();const e=this.cards.slice();let i=null;i=null===(o=this.wt)||void 0===o?void 0:o.getUserId();for(let r=0;r<n.length;r++)if(i===n[r].userId||null==i&&null==n[r].userId){const s=n[r].card;let a=null;for(let c=0;c<this.cards.length;c++)if(s.id===this.cards[c].id){a=this.cards[c];break}if(null==a){const c=(0,AR.xA)(s);null!=c&&e.push(c)}else if(!a.Ct(s))for(let c=0;c<e.length;c++)if(s.id===e[c].id){e.splice(c,1);break}}this.cards=this.ws(this.bs(e,!1)),this.js(),this.Jt.Dt(this.ks(!0))}bs(n,o){let e={},i={},r={};this.u&&(e=this.u.j(vo.I.C.v)||{},i=this.u.j(vo.I.C.H)||{},r=this.u.j(vo.I.C.A)||{});const s={},a={},c={};for(let u=0;u<n.length;u++){const h=n[u].id;h&&(e[h]&&(n[u].clicked=!0,s[h]=!0),i[h]&&(n[u].viewed=!0,a[h]=!0),r[h]&&(n[u].dismissed=!0,c[h]=!0))}return o&&this.u&&(this.u.k(vo.I.C.v,s),this.u.k(vo.I.C.H,a),this.u.k(vo.I.C.A,c)),n}ws(n){const o=[],e=new Date;let i={};this.u&&(i=this.u.j(vo.I.C.A)||{});let r=!1;for(let s=0;s<n.length;s++){const a=n[s].url;if(!this.Ft&&a&&(0,xR.o)(a)){ho.Z.error("Card with url ".concat(a,' will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.'));continue}const c=n[s].expiresAt;let u=!0;if(null!=c&&(u=c>=e),u=u&&!n[s].dismissed,u)o.push(n[s]);else{const h=n[s].id;h&&(i[h]=!0),r=!0}}return r&&this.u&&this.u.k(vo.I.C.A,i),o}js(){var n;const o=[];for(let e=0;e<this.cards.length;e++)o.push(this.cards[e].Y());null===(n=this.u)||void 0===n||n.k(vo.I.C.Cs,o)}xs(){this.ns&&(clearTimeout(this.ns),this.ns=null)}zs(){null!=this.os&&(clearTimeout(this.os),this.os=null)}Es(n=1e3*this.us,o,e){this.zs(),this.os=window.setTimeout(()=>{this.Fs(o,e,!0)},n),this.ls=n}Fs(n,o,e=!1,i=!0){var r,s;const a=this.qt,c=this.u;if(!a||!c)return void("function"==typeof o&&o());const u=!e;if(u&&(this.xs(),this.Us(0)),!this.Ts())return void(null===(r=this.yt)||void 0===r||r.qs(()=>{this.Fs(n,o)}));let h=!0;if(u&&!(null===(s=this.yt)||void 0===s)&&s.Is()&&(h=this.Js()),!h)return void ho.Z.info("Content card sync being throttled.");i&&this.zs();const b=a.Ps({},!0);c.j(vo.I.C.Ds)!==fn.ZP.Ss()&&this.$s(),b.last_full_sync_at=this.Bt,b.last_card_updated_at=this.Ht;const w=a._s(b,B_.Z.Gs.Bs,e);let R=!1;a.Hs(b,()=>{if(this.u){const G=(new Date).valueOf();u&&this.u.k(vo.I.C.Ks,G),B_.Z.Os(this.u,B_.Z.Gs.Bs,G)}nae.Z.Qs({url:a.Vs()+"/content_cards/sync",data:b,headers:w,L:(G,K)=>{if(!a.Ws(b,G,w))return R=!0,void("function"==typeof o&&o());a.Xs(),this.Ls(K,n,o),this.Rs(G),R=!1,B_.Z.Ys(this.u,B_.Z.Gs.Bs,1),"function"==typeof n&&n()},error:G=>{a.Zs(G,"retrieving content cards"),R=!0,"function"==typeof o&&o()},ti:()=>{if(R&&i&&!this.os&&this.cs+1<Lp.Tt){B_.Z.si(this.u,B_.Z.Gs.Bs);let G=this.ls;(null==G||G<1e3*this.us)&&(G=1e3*this.us),this.Es(Math.min(3e5,(0,Uqe.R)(1e3*this.us,3*G)),n,o),this.cs=this.cs+1}}})},B_.Z.ii.Bs)}ks(n){n||this.Kt();const o=this.ws(this.cards);o.sort((i,r)=>i.pinned&&!r.pinned?-1:r.pinned&&!i.pinned?1:i.updated&&r.updated&&i.updated>r.updated?-1:i.updated&&r.updated&&r.updated>i.updated?1:0);let e=Math.max(this.Ht||0,this.Bt||0);return 0===e&&(e=void 0),this.u&&this.u.j(vo.I.C.ys)===this.Ht&&void 0===e&&(e=this.Ht),new N_(o,(0,Nqe.X2)(e))}ei(n){return this.Jt.It(n)}$s(){this.Bt=0,this.Ht=0,this.u&&(this.u.hi(vo.I.C.gs),this.u.hi(vo.I.C.ys))}changeUser(n){n||(this.cards=[],this.Jt.Dt(new N_(this.cards.slice(),null)),this.u&&(this.u.hi(vo.I.C.Cs),this.u.hi(vo.I.C.v),this.u.hi(vo.I.C.H),this.u.hi(vo.I.C.A))),this.$s()}clearData(n){this.Bt=0,this.Ht=0,this.cards=[],this.Jt.Dt(new N_(this.cards.slice(),null)),n&&this.u&&(this.u.hi(vo.I.C.Cs),this.u.hi(vo.I.C.v),this.u.hi(vo.I.C.H),this.u.hi(vo.I.C.A),this.u.hi(vo.I.C.gs),this.u.hi(vo.I.C.ys))}Ts(){return!(!this.yt||!this.yt.ri()&&(0!==this.yt.ni()&&this.oi(),1))}li(n){this.u&&this.u.k(vo.I.C.ai,n)}ui(){return this.u?this.u.j(vo.I.C.ai):null}Js(){var n,o,e;const i=null===(n=this.u)||void 0===n?void 0:n.j(vo.I.C.Ks);if(null==i||isNaN(i))return!0;const r=(null===(o=this.yt)||void 0===o?void 0:o.ci())||-1,s=(null===(e=this.yt)||void 0===e?void 0:e.fi())||-1;if(-1===r||-1===s)return!0;let a=this.ui();(null==a||isNaN(a))&&(a=r);const c=((new Date).valueOf()-i)/1e3;return a=Math.min(a+c/s,r),!(a<1||(a=Math.trunc(a)-1,this.li(a),0))}oi(){this.Jt.Dt(new N_([],new Date)),this.u&&this.u.hi(vo.I.C.Cs)}}const kh={t:!1,provider:null,rr:()=>(kh.o(),kh.provider||(kh.provider=new Gqe(fn.ZP.er(),fn.ZP.l(),fn.ZP.ir(),fn.ZP.tr(),fn.ZP.nr()),fn.ZP.ar(kh.provider)),kh.provider),o:()=>{kh.t||(fn.ZP.g(kh),kh.t=!0)},destroy:()=>{kh.provider=null,kh.t=!1}},iI=kh;function oae(t,n){if(fn.ZP.X())return iI.rr().Fs(t,n)}let N_=(()=>{class t extends Dqe.Z{constructor(o,e){super(o,e)}getUnviewedCardCount(){return super.getUnreadCardCount()}logCardImpressions(o){(0,$4.p)(o,!0)}logCardClick(o){return(0,W4.d)(o,!0)}sr(){oae()}dr(){return!0}}return t.ur=6e4,t})();function Vqe(){if(fn.ZP.X())return iI.rr().ks(!1)}var Gm=__webpack_require__(98022);function rae(t){if(!fn.ZP.X())return;const n=document.querySelectorAll(".ab-feed");for(let o=0;o<n.length;o++)(null==t||null!=t&&n[o].parentNode===t)&&(0,Gm.tQ)(n[o])}function sae(t){if(!fn.ZP.X())return;const n=iI.rr(),o=n.ei(t);if(!n.ps()){const e=fn.ZP.cr();if(e){const i=e.mr(()=>{n.Fs()});i&&n.vs(i)}}return o}var zqe=__webpack_require__(59955),jqe=__webpack_require__(11406);function aae(t,n){if(!fn.ZP.X())return;(0,jqe.B)();let o=!1;null==t&&(t=document.body,o=!0);const e=fn.ZP.nn(fn.JY.tn)||fn.ZP.nn(fn.JY.en)||!1,i=iI.rr().ks(!1);"function"==typeof n&&(0,Gm.Of)(i,n(i.cards.slice()),i.lastUpdated,null,e);const r=(0,Gm.Yz)(i,e,o),s=iI.rr(),a=s.fs();(null==i.lastUpdated||(new Date).valueOf()-i.lastUpdated.valueOf()>N_.ur)&&(null==a||(new Date).valueOf()-a>N_.ur)&&(ho.Z.info("Cached content cards were older than max TTL of ".concat(N_.ur," ms, requesting an update from the server.")),(0,Gm.cV)(i,r),s.ds((new Date).valueOf()));const c=(new Date).valueOf(),u=sae(function(w){const R=r.querySelectorAll(".ab-refresh-button")[0];if(null!=R){let K=500,te=K-=(new Date).valueOf()-c;const ee=r.getAttribute(Gm.cP);ee&&(te=parseInt(ee),isNaN(te)||(K-=(new Date).valueOf()-te)),setTimeout(function(){R.className=R.className.replace(/fa-spin/g,"")},Math.max(K,0))}let G=w.cards;"function"==typeof n&&(G=n(G.slice())),(0,Gm.Of)(i,G,w.lastUpdated,r,e)});(0,Gm.GB)(u,r);const h=function(w){const R=w.querySelectorAll(".ab-feed");let G=null;for(let K=0;K<R.length;K++)R[K].parentNode===w&&(G=R[K]);null!=G?((0,Gm.tQ)(G),null!=G.parentNode&&G.parentNode.replaceChild(r,G)):w.appendChild(r),setTimeout(function(){r.className=r.className.replace("ab-hide","ab-show")},0),o&&r.focus(),(0,Gm.cz)(i,r),(0,zqe.CG)(i.cards,w)};var b;null!=t?h(t):window.onload=(b=window.onload,function(){"function"==typeof b&&b(new Event("oldLoad")),h(document.body)})}function Hqe(t,n){fn.ZP.X()&&(document.querySelectorAll(".ab-feed").length>0?rae():aae(t,n))}const cae={GOOGLE_TAG_MANAGER:"gg",MPARTICLE:"mp",SEGMENT:"sg",TEALIUM:"tl",MANUAL:"manu",NPM:"npm",CDN:"wcd",SHOPIFY:"shp"};var Ew=__webpack_require__(47799);function qqe(t){if(!fn.ZP.X())return;const n=fn.ZP.nr();if(n){if(!(0,Ew.kJ)(t))return ho.Z.error("Cannot set SDK metadata because metadata is not an array."),!1;for(const o of t)if(!(0,Ew.fk)(cae,o,"sdkMetadata contained an invalid value.","BrazeSdkMetadata"))return!1;return n.addSdkMetadata(t),!0}}var Wqe=__webpack_require__(10342);function $qe(){ho.Z.info("Destroying Braze instance"),fn.ZP.destroy(!0)}var Kqe=__webpack_require__(96814);function Zqe(){const t=fn.ZP.cr();t&&t.requestImmediateDataFlush();const n=new vo.Z.ee(null,!0),o="This-cookie-will-expire-in-"+n.ne();n.store(vo.I.se,o);const e=Rh.Z.Yt.Qt;new Rh.Z(e,ho.Z).setItem(e.ss.ae,e.ie,!0),ho.Z.info("disableSDK was called"),fn.ZP.destroy(!1),fn.ZP.oe(!0)}function Qqe(){new vo.Z.ee(null,!0).remove(vo.I.se);const t=Rh.Z.Yt.Qt;new Rh.Z(t,ho.Z).re(t.ss.ae,t.ie),ho.Z.info("enableSDK was called"),fn.ZP.destroy(!1),fn.ZP.oe(!1)}function Yqe(t){if(!fn.ZP.X())return;const n=fn.ZP.te();if(!n)return;const o=n.ce().id;if("function"!=typeof t)return o;ho.Z.warn("The callback for getDeviceId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getDeviceId()`)"),t(o)}var lae=__webpack_require__(85504);function Jqe(t,n){return fn.ZP.initialize(t,n)}function Xqe(){return!!new vo.Z.ee(null,!0).br(vo.I.se)}var eWe=__webpack_require__(46974),tWe=__webpack_require__(20541),RR=__webpack_require__(30122),kR=__webpack_require__(53836);function nWe(){if(!fn.ZP.X())return;const t=fn.ZP.cr();if(!t)return;t.openSession();const n=Rh.Z.Yt.Qt,o=new Rh.Z(n,ho.Z);o.jr(n.ss.hr,(e,i)=>{const r=i.lastClick,s=i.trackingString;ho.Z.info("Firing push click trigger from ".concat(s," push click at ").concat(r));const a=t.kr(r,s),c=function(){kR.n.rr().fe(RR.Z.vr,[s],a)};t.$r(c,c),o.re(n.ss.hr,e)}),o.Zt(n.ss.wr,function(e){t.yr(e)})}function iWe(){fn.ZP.X()&&fn.ZP.removeAllSubscriptions()}var oWe=__webpack_require__(29426),rWe=__webpack_require__(24352);function sWe(t){ho.Z.setLogger(t)}var aWe=__webpack_require__(48809);function cWe(t){if(!fn.ZP.X()||""===t||!(0,aWe.ro)(t,"set signature","signature",!1))return!1;const n=fn.ZP.Sr();return!!n&&(n.setSdkAuthenticationSignature(t),!0)}function lWe(t){var n;if(fn.ZP.X())return null===(n=fn.ZP.Sr())||void 0===n?void 0:n.subscribeToSdkAuthenticationFailures(t)}function uWe(){ho.Z.toggleLogging()}function dWe(){const t=fn.ZP.l();if(null==t)return void ho.Z.warn(Lp.Go);t.clearData();const n=(0,Ew.XP)(Rh.Z.Yt);for(let o=0;o<n.length;o++)new Rh.Z(Rh.Z.Yt[n[o]],ho.Z).clearData();if(fn.ZP.X())for(const o of fn.ZP.gr())o.clearData(!0)}var K4=__webpack_require__(15817),pWe=__webpack_require__(23911),hWe=__webpack_require__(27243);function mWe(){if(fn.ZP.X())return hWe.Z.rr().Li()}function uae(){if(!fn.ZP.X())return;const t=document.querySelectorAll(".ab-feed");for(let n=0;n<t.length;n++)(0,Gm.tQ)(t[n])}var fWe=__webpack_require__(49904),gWe=__webpack_require__(94215),dae=__webpack_require__(81814),_We=__webpack_require__(50580);function vWe(t,n,o){fn.ZP.X()&&(document.querySelectorAll(".ab-feed").length>0?uae():(0,dae.showFeed)(t,n,o))}var os=__webpack_require__(56650),pae=__webpack_require__(74211),oI=__webpack_require__(2284),LR=__webpack_require__(73891),rI=__webpack_require__(38838),Z4=__webpack_require__(67347),DR=__webpack_require__(11116),F_=__webpack_require__(78097),bWe=__webpack_require__(50895),CWe=__webpack_require__(76819);function hae(){(function yWe(t){(0,bWe.e)(t,"iam",".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}")})(),(0,CWe.N)()}var Vm=__webpack_require__(36859),wWe=__webpack_require__(69019);function Lh(t,n){return null==t||(t=parseInt(t.toString()),isNaN(t))?"":(n&&!isNaN(parseFloat(n.toString()))||(n=1),"rgba("+[(16711680&(t>>>=0))>>>16,(65280&t)>>>8,255&t,((4278190080&t)>>>24)/255*n].join(",")+")")}function BR(t){if(!fn.ZP.X())return!1;if(!(t instanceof os.Z||t instanceof oI.Z))return ho.Z.error(Lp.De),!1;const n=t instanceof oI.Z?qb.G.po:qb.G.Xe;return F_.Z.m().q(t,n).L}function mae(t){if(!fn.ZP.X())return!1;if(!(t instanceof os.Z))return ho.Z.error(Lp.De),!1;const n=F_.Z.m().q(t,qb.G.Ve);if(n){t.mo()||BR(t);for(let o=0;o<n.ge.length;o++)kR.n.rr().fe(RR.Z.Zr,[t.triggerId],n.ge[o])}return n.L}var PWe=__webpack_require__(72565);function NR(t,n,o){if(!fn.ZP.X())return!1;if(!(t instanceof rI.Z))return ho.Z.error("inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object."),!1;let e=qb.G.Ve;null!=n&&(e=qb.G.We);const i=F_.Z.m().q(t,e,n,o);if(i.L)for(let r=0;r<i.ge.length;r++)kR.n.rr().fe(RR.Z.Zr,[t.triggerId,n],i.ge[r]);return i.L}var IWe=__webpack_require__(34841),Wb=__webpack_require__(62999),fae=__webpack_require__(93677);function gae(t,n){var o;if(!fn.ZP.X())return!1;if(!(t instanceof pae.Z))return ho.Z.error("button must be an InAppMessageButton object"),!1;if(!(n instanceof os.Z))return ho.Z.error(Lp.De),!1;const e=F_.Z.m().Ze(t,n);if(e.L)for(let i=0;i<e.ge.length;i++)kR.n.rr().fe(RR.Z.Zr,[n.triggerId,null===(o=t.id)||void 0===o?void 0:o.toString()],e.ge[i]);return e.L}var _ae=__webpack_require__(72606);const Q4={qe:t=>{const n=t.querySelectorAll(".ab-close-button, .ab-message-text, .ab-message-button");let o;for(let e=0;e<n.length;e++)o=n[e],o.tabIndex=0;if(n.length>0){const e=n[0],i=n[n.length-1];t.addEventListener("keydown",r=>{const s=document.activeElement;r.keyCode===_ae.m.lo&&(r.shiftKey||s!==i&&s!==t?!r.shiftKey||s!==e&&s!==t||(r.preventDefault(),i.focus()):(r.preventDefault(),e.focus()))})}},Be:(t,n)=>{n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-label","Modal Message"),t&&n.setAttribute("aria-labelledby",t)},Te:(t,n,o,e)=>{if(t.buttons&&t.buttons.length>0){const i=document.createElement("div");i.className="ab-message-buttons",o.appendChild(i);const r=o.getElementsByClassName("ab-message-text")[0];null!=r&&(r.className+=" ab-with-buttons");const s=a=>c=>(t.he(o,()=>{gae(a,t),a.clickAction===os.Z.ClickAction.URI?(0,K4.S)(a.uri||"",e||t.openTarget===os.Z.OpenTarget.BLANK,c):a.clickAction===os.Z.ClickAction.NEWS_FEED&&n()}),c.stopPropagation(),!1);for(let a=0;a<t.buttons.length;a++){const c=t.buttons[a],u=document.createElement("button");u.className="ab-message-button",u.setAttribute("type","button"),(0,Vm.lj)(u,"touchstart");let h=c.text;""===c.text&&(h="\xa0"),u.appendChild(document.createTextNode(h)),t.be()||(u.style.backgroundColor=Lh(c.backgroundColor),u.style.color=Lh(c.textColor),u.style.borderColor=Lh(c.borderColor)),u.onclick=s(c),i.appendChild(u)}}}};var OWe=__webpack_require__(25701);function vae(t,n,o){if(!fn.ZP.X())return;if(hae(),null==t)return!1;if(t instanceof oI.Z)return ho.Z.info("User received control for a multivariate test, logging to Braze servers."),BR(t),!0;if(!(t instanceof os.Z)||t.constructor===os.Z)return!1;t.Nh();const e=t instanceof rI.Z;if(e&&!t.trusted&&!fn.ZP.tr())return ho.Z.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'),!1;if(null==n&&(n=document.body),t.xe()&&n.querySelectorAll(".ab-modal-interactions").length>0)return ho.Z.info("Cannot show in-app message ".concat(t.message," because another message is being shown.")),!1;if(Wb.SD.fo()){const a=Wb.SD.jo();if(a===Wb.eh.PORTRAIT&&t.orientation===os.Z.Orientation.LANDSCAPE||a===Wb.eh.LANDSCAPE&&t.orientation===os.Z.Orientation.PORTRAIT){const c=a===Wb.eh.PORTRAIT?"portrait":"landscape";return ho.Z.info("Not showing ".concat(t.orientation===os.Z.Orientation.PORTRAIT?"portrait":"landscape"," in-app message ").concat(t.message," because the screen is currently ").concat(c)),!1}}if(!fn.ZP.tr()){let a=!1;if(t.buttons&&t.buttons.length>0){const c=t.buttons;for(let u=0;u<c.length;u++)c[u].clickAction===os.Z.ClickAction.URI&&(a=(0,xR.o)(c[u].uri))}else t.clickAction===os.Z.ClickAction.URI&&(a=(0,xR.o)(t.uri));if(a)return ho.Z.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'),!1}const i=document.createElement("div");if(i.className="ab-iam-root v3",i.className+=function SWe(t){let n="";return t.animateIn&&(n+=" ab-animate-in"),t.animateOut&&(n+=" ab-animate-out"),t instanceof LR.Z?n+=" ab-effect-fullscreen":t instanceof rI.Z?n+=" ab-effect-html":t instanceof Z4.Z?n+=" ab-effect-modal":t instanceof DR.Z&&(n+=" ab-effect-slide"),n}(t),i.setAttribute("role","complementary"),t.ve()&&(i.id=t.htmlId),fn.ZP.nn(fn.JY.bo)&&(i.style.zIndex=(fn.ZP.nn(fn.JY.bo)+1).toString()),n.appendChild(i),t.be()){const a=document.createElement("style");a.innerHTML=t.css,a.id=t.ye(),null!=fn.ZP.nn(fn.JY.ho)&&a.setAttribute("nonce",fn.ZP.nn(fn.JY.ho)),document.getElementsByTagName("head")[0].appendChild(a)}const r=t instanceof DR.Z,s=function EWe(t,n,o,e,i,r,s,a=document.body){if(t.we=document.activeElement,t instanceof rI.Z)return function MWe(t,n,o,e,i,r){const s=document.createElement("iframe");s.setAttribute("title","Modal Message"),i&&(s.style.zIndex=(i+1).toString());const a=u=>{const h=u.getAttribute("href"),b=u.onclick;return w=>{if(null!=b&&"function"==typeof b&&!1===b.bind(u)(w))return;let R=(0,xR.L)(h).abButtonId;if(null!=R&&""!==R||(R=u.getAttribute("id")||void 0),null!=h&&""!==h&&0!==h.indexOf("#")){const G="blank"===(u.getAttribute("target")||"").toLowerCase().replace("_",""),K=e||t.openTarget===os.Z.OpenTarget.BLANK||G,te=()=>{NR(t,R,h),Wb.SD.openUri(h,K,w)};K?te():t.he(s,te)}else NR(t,R,h||void 0);return w.stopPropagation(),!1}},c=(u,h,b)=>{const w="([\\w]+)\\s*=\\s*document.createElement\\(['\"]".concat(b,"['\"]\\)"),R=u.match(new RegExp(w));if(R){const G="".concat(R[1],'.setAttribute("nonce", "').concat(h,'")');return"".concat(u.slice(0,R.index+R[0].length),";").concat(G,";").concat(u.slice(R.index+R[0].length))}return null};if(s.onload=()=>{let u=null;if(null!=r){u=document.createElement("html"),u.innerHTML=t.message||"";const qt=u.getElementsByTagName("style");for(let xn=0;xn<qt.length;xn++)qt[xn].setAttribute("nonce",r);const Je=u.getElementsByTagName("script");for(let xn=0;xn<Je.length;xn++){Je[xn].setAttribute("nonce",r),Je[xn].innerHTML=Je[xn].innerHTML.replace(/<style>/g,"<style nonce='".concat(r,"'>"));const bi=c(Je[xn].innerHTML,r,"script");bi&&(Je[xn].innerHTML=bi);const rn=c(Je[xn].innerHTML,r,"style");rn&&(Je[xn].innerHTML=rn)}}const h=s.contentWindow;h.focus();const b=h.document.querySelector("html");b&&(b.innerHTML=u?u.innerHTML:t.message||"",(0,fae.E)(b));const w=h.document.getElementsByTagName("head")[0];if(null!=w){if(t.be()){const Je=document.createElement("style");Je.innerHTML=t.css||"",Je.id=t.ye()||"",null!=r&&Je.setAttribute("nonce",r),w.appendChild(Je)}const qt=h.document.createElement("base");null!=qt&&(qt.setAttribute("target","_parent"),w.appendChild(qt))}const R=h.document.getElementsByTagName("title");R&&R.length>0&&s.setAttribute("title",R[0].textContent||"");const G={closeMessage:function(){t.he(s)},logClick:function(){NR(t,...arguments)},display:{},web:{}},K=function(){return function(){const qt=arguments;Promise.resolve().then(__webpack_require__.bind(__webpack_require__,82445)).then(Je=>{fn.ZP.so()?Je.requestPushPermission(...Array.prototype.slice.call(qt)):ho.Z.error(Lp.Go)})}},te={requestImmediateDataFlush:function(){const qt=arguments;Promise.resolve().then(__webpack_require__.bind(__webpack_require__,24352)).then(({requestImmediateDataFlush:Je})=>{fn.ZP.so()?Je(...Array.prototype.slice.call(qt)):ho.Z.error(Lp.Go)})},logCustomEvent:function(){const qt=arguments;Promise.resolve().then(__webpack_require__.bind(__webpack_require__,46974)).then(({logCustomEvent:Je})=>{fn.ZP.so()?Je(...Array.prototype.slice.call(qt)):ho.Z.error(Lp.Go)})},logPurchase:function(){const qt=arguments;Promise.resolve().then(__webpack_require__.bind(__webpack_require__,20541)).then(({logPurchase:Je})=>{fn.ZP.so()?Je(...Array.prototype.slice.call(qt)):ho.Z.error(Lp.Go)})},unregisterPush:function(){const qt=arguments;Promise.resolve().then(__webpack_require__.bind(__webpack_require__,85261)).then(({unregisterPush:Je})=>{fn.ZP.so()?Je(...Array.prototype.slice.call(qt)):ho.Z.error(Lp.Go)})},requestPushPermission:K(),changeUser:function(){const qt=arguments;Promise.resolve().then(__webpack_require__.bind(__webpack_require__,10342)).then(({changeUser:Je})=>{fn.ZP.so()?Je(...Array.prototype.slice.call(qt)):ho.Z.error(Lp.Go)})}},ee=function(qt){return function(){te[qt](...Array.prototype.slice.call(arguments))}};for(const qt of(0,Ew.XP)(te))G[qt]=ee(qt);const le=["setFirstName","setLastName","setEmail","setGender","setDateOfBirth","setCountry","setHomeCity","setEmailNotificationSubscriptionType","setLanguage","addAlias","setPushNotificationSubscriptionType","setPhoneNumber","setCustomUserAttribute","addToCustomAttributeArray","removeFromCustomAttributeArray","incrementCustomUserAttribute","setCustomLocationAttribute","addToSubscriptionGroup","removeFromSubscriptionGroup"],me=function(qt){return function(){const Je=(0,lae.P)();Je&&Je[qt](...Array.prototype.slice.call(arguments))}},ge={};for(let qt=0;qt<le.length;qt++)ge[le[qt]]=me(le[qt]);G.getUser=function(){return ge};const Me={showFeed:n},Ke=function(qt){return function(){const Je=arguments;t.he(s,function(){Me[qt](...Array.prototype.slice.call(Je))})}},Ee=G.display;for(const qt of(0,Ew.XP)(Me))Ee[qt]=Ke(qt);const ot={registerAppboyPushMessages:K()},ct=function(qt){return function(){ot[qt](...Array.prototype.slice.call(arguments))}},Pt=G.web;for(const qt of(0,Ew.XP)(ot))Pt[qt]=ct(qt);if(h.appboyBridge=G,h.brazeBridge=G,t.Ae!==os.Z.Ce.je){const qt=h.document.getElementsByTagName("a");for(let xn=0;xn<qt.length;xn++)qt[xn].onclick=a(qt[xn]);const Je=h.document.getElementsByTagName("button");for(let xn=0;xn<Je.length;xn++)Je[xn].onclick=a(Je[xn])}const gn=h.document.body;if(null!=gn){t.ve()&&(gn.id=t.htmlId||"");const qt=document.createElement("hidden");qt.onclick=G.closeMessage,qt.className="ab-programmatic-close-button",gn.appendChild(qt)}h.dispatchEvent(new CustomEvent("ab.BridgeReady")),-1!==s.className.indexOf("ab-start-hidden")&&(s.className=s.className.replace("ab-start-hidden",""),o(s)),document.activeElement!==s&&s.focus()},s.className="ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions",PWe.Z.OS===IWe.T.io){const u=document.createElement("div");return u.className="ab-ios-scroll-wrapper",u.appendChild(s),t.Pe=u,u}return t.Pe=s,s}(t,n,o,i,r,s);const c=function(u,h,b,w,R,G,K=document.body){let te=null;const ee=document.createElement("div");ee.className="ab-in-app-message ab-start-hidden ab-background",G&&(ee.style.zIndex=(G+1).toString()),u.xe()&&(ee.className+=" ab-modal-interactions",ee.setAttribute("tabindex","-1")),u.be()||(ee.style.color=Lh(u.textColor),ee.style.backgroundColor=Lh(u.backgroundColor),function TWe(t){return null!=t&&(t=parseInt(t.toString()),!isNaN(t)&&(4278190080&t)>>>24==0)}(u.backgroundColor)&&(ee.className+=" ab-no-shadow"));const le=()=>{-1!==ee.className.indexOf("ab-start-hidden")&&(ee.className=ee.className.replace("ab-start-hidden",""),document.querySelectorAll(".ab-iam-img-loading").length>0?w("Cannot show in-app message ".concat(u.message," because another message is being shown."),os.Z.Me.ke):b(ee))},me=(ct=!0)=>{let Pt=document.querySelectorAll(".ab-iam-root");Pt&&0!==Pt.length||(Pt=K.querySelectorAll(".ab-iam-root")),Pt&&Pt.length>0&&(Pt[0].classList.remove("ab-iam-img-loading"),te&&(clearTimeout(te),te=null),ct?le():ho.Z.error("Cannot show in-app message ".concat(u.message," because the image failed to load.")))};u.imageStyle===os.Z.ImageStyle.GRAPHIC&&(ee.className+=" graphic"),u.orientation===os.Z.Orientation.LANDSCAPE&&(ee.className+=" landscape"),null!=u.buttons&&0===u.buttons.length&&(u.clickAction!==os.Z.ClickAction.NONE&&(ee.className+=" ab-clickable"),ee.onclick=ct=>(u.he(ee,()=>{mae(u),u.clickAction===os.Z.ClickAction.URI?(0,K4.S)(u.uri||"",R||u.openTarget===os.Z.OpenTarget.BLANK,ct):u.clickAction===os.Z.ClickAction.NEWS_FEED&&h()}),ct.stopPropagation(),!1));const ge=(0,wWe.B)("Close Message",u.be()?void 0:Lh(u.closeButtonColor),()=>{u.he(ee)});ee.appendChild(ge),G&&(ge.style.zIndex=(G+2).toString());const Me=document.createElement("div");Me.className="ab-message-text";const Ke=(u.messageAlignment||u.$e).toLowerCase();Me.className+=" "+Ke+"-aligned";let Ee=!1;const ot=document.createElement("div");if(ot.className="ab-image-area",u.imageUrl){if(u.cropType===os.Z.CropType.CENTER_CROP){const ct=document.createElement("span");ct.className="ab-center-cropped-img",ct.style.backgroundImage="url("+u.imageUrl+")",ct.setAttribute("role","img"),ct.setAttribute("aria-label","Modal Image"),u.ze(ct),ot.appendChild(ct)}else{const ct=document.createElement("img");if(ct.setAttribute("src",u.imageUrl),u.ze(ct),0===document.querySelectorAll(".ab-iam-img-loading").length){Ee=!0;const Pt=document.querySelectorAll(".ab-iam-root");Pt&&Pt.length>0&&Pt[0].classList.add("ab-iam-img-loading"),te=window.setTimeout(()=>{me(!1)},6e4),ct.onload=()=>{me()},ct.onerror=()=>{me(!1)}}ot.appendChild(ct)}ee.appendChild(ot),Me.className+=" ab-with-image"}else if(u.icon){ot.className+=" ab-icon-area";const ct=document.createElement("span");ct.className="ab-icon",u.be()||(ct.style.backgroundColor=Lh(u.iconBackgroundColor),ct.style.color=Lh(u.iconColor));const Pt=document.createElement("i");Pt.className="fa",Pt.appendChild(document.createTextNode(u.icon)),Pt.setAttribute("aria-hidden","true"),ct.appendChild(Pt),ot.appendChild(ct),ee.appendChild(ot),Me.className+=" ab-with-icon"}if((0,Vm.lj)(Me,"touchstart"),u.header&&u.header.length>0){const ct=document.createElement("h1");ct.className="ab-message-header",u.Le=OWe.Z.W(),ct.id=u.Le;const Pt=(u.headerAlignment||os.Z.TextAlignment.CENTER).toLowerCase();ct.className+=" "+Pt+"-aligned",u.be()||(ct.style.color=Lh(u.headerTextColor)),ct.appendChild(document.createTextNode(u.header)),Me.appendChild(ct)}return Me.appendChild(u.Ie()),ee.appendChild(Me),Ee||le(),u.Pe=ee,ee}(t,n,o,e,i,r,a);if(t instanceof LR.Z||t instanceof Z4.Z)c.className+=" ".concat(t instanceof LR.Z?"ab-fullscreen":"ab-modal"," ab-centered"),Q4.Te(t,n,c,i),Q4.qe(c),Q4.Be(t.Le,c);else if(t instanceof DR.Z){c.className+=" ab-slideup";const u=c.getElementsByClassName("ab-close-button")[0];if(null!=u){const w=(0,Vm.MK)("0 0 11.38 19.44","M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",t.be()?void 0:Lh(t.closeButtonColor));w.setAttribute("class","ab-chevron"),u.appendChild(w)}let h,b;(0,Vm.FZ)(c,Vm.mQ.U,w=>{c.className+=" ab-swiped-left",null!=u&&null!=u.onclick&&u.onclick(w)}),(0,Vm.FZ)(c,Vm.mQ.V,w=>{c.className+=" ab-swiped-right",null!=u&&null!=u.onclick&&u.onclick(w)}),t.slideFrom===os.Z.SlideFrom.TOP?(h=Vm.mQ.De,b=" ab-swiped-up"):(h=Vm.mQ.Ee,b=" ab-swiped-down"),(0,Vm.FZ)(c,h,w=>{c.className+=b,null!=u&&null!=u.onclick&&u.onclick(w)})}return c}(t,()=>{Promise.resolve().then(__webpack_require__.bind(__webpack_require__,81814)).then(a=>{fn.ZP.so()?a.showFeed():ho.Z.error(Lp.Go)})},a=>{if(t.xe()&&t.do()){const c=document.createElement("div");if(c.className="ab-page-blocker",t.be()||(c.style.backgroundColor=Lh(t.frameColor)),fn.ZP.nn(fn.JY.bo)&&(c.style.zIndex=fn.ZP.nn(fn.JY.bo).toString()),i.appendChild(c),!fn.ZP.nn(fn.JY.Lh)){const u=(new Date).valueOf();c.onclick=h=>{(new Date).valueOf()-u>os.Z.fh&&(t.he(a),h.stopPropagation())}}i.appendChild(a),a.focus(),t.Oh(i)}else if(r){const c=document.querySelectorAll(".ab-slideup");let u=null;for(let h=c.length-1;h>=0;h--)if(c[h]!==a){u=c[h];break}if(t.slideFrom===os.Z.SlideFrom.TOP){let h=0;null!=u&&(h=u.offsetTop+u.offsetHeight),a.style.top=Math.max(h,0)+"px"}else{let h=0;null!=u&&(h=(window.innerHeight||document.documentElement.clientHeight)-u.offsetTop),a.style.bottom=Math.max(h,0)+"px"}}else if(e&&!fn.ZP.nn(fn.JY.Lh)){const c=t;(0,fae.f)(a)&&a.contentWindow&&a.contentWindow.addEventListener("keydown",function(u){u.keyCode===_ae.m.mh&&c.closeMessage()})}BR(t),t.dismissType===os.Z.DismissType.AUTO_DISMISS&&setTimeout(()=>{i.contains(a)&&t.he(a)},t.duration),"function"==typeof o&&o()},a=>{ho.Z.info(a)},fn.ZP.nn(fn.JY.wo),fn.ZP.nn(fn.JY.bo),fn.ZP.nn(fn.JY.ho),n);return(e||r)&&(i.appendChild(s),t.Oh(i)),!0}function bae(t){if(fn.ZP.X())return"function"!=typeof t?null:F_.Z.m().Ke(function(n){return t(n[0]),n.slice(1)})}function xWe(){if(!fn.ZP.X())return;hae();const t=F_.Z.m();if(null==t.Qe()){const n=bae(o=>vae(o));t.Ue(n)}return t.Qe()}function AWe(t){if(fn.ZP.X())return t instanceof oI.Z?(ho.Z.info("Not deferring since this is a ControlMessage."),!1):t instanceof os.Z?F_.Z.m().de(t):(ho.Z.info("Not an instance of InAppMessage, ignoring."),!1)}function RWe(){if(fn.ZP.X())return F_.Z.m().Ge()}var Y4=__webpack_require__(3671);function kWe(){if(fn.ZP.X())return Y4.Z.isPushBlocked()}function LWe(){if(fn.ZP.X())return Y4.Z.isPushPermissionGranted()}function DWe(){if(fn.ZP.X())return Y4.Z.isPushSupported()}var BWe=__webpack_require__(82445),NWe=__webpack_require__(85261),FWe=__webpack_require__(12060),UWe=__webpack_require__(64736),GWe=__webpack_require__(85110),xw=__webpack_require__(99990);function VWe(t){if(!fn.ZP.X())return;const n=fn.ZP.ir();if(n&&!n.yi())return ho.Z.info("Feature flags are not enabled."),null;const o=xw.Z.rr().Ci();return o[t]?o[t]:null}function Cae(){if(!fn.ZP.X())return;const t=[],n=fn.ZP.ir();if(n&&!n.yi())return ho.Z.info("Feature flags are not enabled."),t;const o=xw.Z.rr().Ci();for(const e in o)t.push(o[e]);return t}function zWe(t){if(!fn.ZP.X())return;const n=xw.Z.rr();if(n.Ai()){const o=Cae();o&&"function"==typeof t&&t(o)}return n.ei(t)}function jWe(t){if(!fn.ZP.X())return;if(!t)return!1;const n="Not logging a feature flag impression. The feature flag was not part of any matching experiment.",o=xw.Z.rr().Ci();if(!o[t])return ho.Z.info(n),!1;const e=o[t].trackingString;if(!e)return ho.Z.info(n),!1;const i=xw.Z.rr().Di();return i[e]?(ho.Z.info("Not logging another feature flag impression. This ID was already logged this session."),!1):(i[e]=!0,xw.Z.rr().Ri(i),iae.Z.q(qb.G.Fr,{fid:t,fts:e}).L)}let tg=(()=>{var t;class n{constructor(e){this.appStorage=e,this.consoleStatusBSubject=new Qn(this.consoleEnabled())}setDeveloperMode(e){this.setOptionState("developer",e)}developerModeEnabled(){return this.getOptionState("developer")}setConsoleEnabled(e){this.setOptionState("consoleEnabled",e)}consoleEnabled(){return this.getOptionState("consoleEnabled",rw===Pm.Development)}brazeLoggingEnabled(){return this.getOptionState("brazeLoggingEnabled")}setBrazeLoggingEnabled(e){this.setOptionState("brazeLoggingEnabled",e)}setRateDialogShowOnLobby(e){this.setOptionState("rateDialogShowOnLobby",e)}rateDialogShowOnLobby(){return this.getOptionState("rateDialogShowOnLobby")}setShowDailyBonusNotificationSooner(e){this.setOptionState("showDailyBonusNotificationSooner",e)}showDailyBonusNotificationSooner(){return this.getOptionState("showDailyBonusNotificationSooner")}setOptionState(e,i){this.appStorage.setItem(e,i),this.updateConsoleEnabledStatus(i)}getOptionState(e,i=!1){return this.appStorage.getItem(e,i)}removeLocalOptions(e){e.forEach(i=>{this.appStorage.removeItem(i)})}updateConsoleEnabledStatus(e){this.consoleStatusBSubject.next(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ci))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class FR{static isEmptyOrNullOrUndefined(n){return null==n||""===n}static isNotEmptyOrNullOrUndefined(n){return!this.isEmptyOrNullOrUndefined(n)}}class yae{constructor(n){this.configService=n}isEnabled(){return this.configService.getConfig().core.tracking.braze.events.web.enabled&&!!this.configService.getConfig().core.tracking.braze.events.web.envKey&&!!this.configService.getConfig().core.tracking.braze.events.web.url}preventEngage(){return!this.isEnabled()||!this.configService.getConfig().core.tracking.braze.engage.web.enabled}preventCollect(){return!this.isEnabled()||!this.configService.getConfig().core.tracking.braze.events.web.enabled}}const J4=new Ot("IBrazeSettingsService",{factory:()=>new yae(mt(Zt))});let Aw=(()=>{var t;let n=((t=class{constructor(e,i,r,s){this.clientConfig=e,this.store=i,this.brazeSetttings=r,this.developerService=s,this.braze=Q,this.init()}sendEvent(e){if(console.warn("BrazeService","sendEvent",e.name,e.params),!this.brazeSetttings.preventCollect()){if(e.params)return void this.braze.logCustomEvent(e.name,e.params);this.braze.logCustomEvent(e.name)}}getInitedBrazeSdk(){return this.braze}init(){this.brazeSetttings.isEnabled()&&(console.log("BrazeService","init"),this.braze.initialize(this.clientConfig.getConfig().core.tracking.braze.events.web.envKey,{baseUrl:this.clientConfig.getConfig().core.tracking.braze.events.web.url,minimumIntervalBetweenTriggerActionsInSeconds:0,allowUserSuppliedJavascript:!0,sessionTimeoutInSeconds:300,inAppMessageZIndex:99997}),this.developerService.brazeLoggingEnabled()&&this.braze.toggleLogging(),this.store.selectUserState()&&this.onLogin())}onLogin(){if(!this.brazeSetttings.isEnabled())return;console.warn("BrazeService","onLogin");const e=this.store.selectUserState();this.braze.wipeData(),this.braze.changeUser(e.analytics.userId),this.braze.getUser().addAlias(e.profile.username.currentUsername,"username")}onLogout(){this.brazeSetttings.isEnabled()&&console.warn("BrazeService","onLogout")}}).\u0275fac=function(e){return new(e||t)(T(Zt),T(J),T(J4),T(tg))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogin",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogout",null),n=Qe([Wo(),ue("design:paramtypes",[Zt,J,Object,tg])],n),n})();class HWe{constructor(n){var o,e,i,r,s;this.data=n,this.id=(0,ie.uuidV4)(),this.placements={showInBanner:"true"===(null===(o=n.extras.showInBanner)||void 0===o?void 0:o.toLowerCase())||FR.isEmptyOrNullOrUndefined(n.extras.showInBanner)&&FR.isEmptyOrNullOrUndefined(n.extras.showInContainer)&&FR.isEmptyOrNullOrUndefined(n.extras.showInStore),showInContainer:"true"===(null===(e=n.extras.showInContainer)||void 0===e?void 0:e.toLowerCase()),showInStore:void 0},this.placements.showInStore="true"===(null===(i=n.extras.showInStore)||void 0===i?void 0:i.toLowerCase())||this.placements.showInContainer&&"false"!==(null===(r=n.extras.showInStore)||void 0===r?void 0:r.toLowerCase()),this.args={giftable:"true"===(null===(s=n.extras.giftable)||void 0===s?void 0:s.toLowerCase()),expiresAt:parseInt(n.extras.expiresAt,10)}}isExpirable(){return FR.isNotEmptyOrNullOrUndefined(this.data.extras.expiresAt)&&"0"!==this.data.extras.expiresAt}getTimeLeft(){if(this.isExpirable())return Math.max(0,parseInt(this.data.extras.expiresAt,10)-Bn.instance.getServerTimeS())}trackButtonClicked(n){}trackShown(){}trackClicked(){}destroy(){}}let U_=(()=>{var t;let n=((t=class{constructor(e,i,r){this.brazeSetttings=i,this.developerService=r,this.containerMessages=new Qn([]),this.storeOffers=new Qn([]),this.engagement=new Qn(void 0),this.banners=new Qn([]),this.timers=new Map,this.onInAppMessage=s=>{const a=this.createEngagement(s);this.developerService.brazeLoggingEnabled()&&console.warn("BrazeEngagementService","onInAppMessage",a),a.placements.showInBanner&&this.addBanner(a),a.placements.showInContainer&&this.addContainerMessage(a),a.placements.showInStore&&this.addStoreOffer(a),a.isExpirable()&&this.addExpirationTimer(a)},this.brazeSdk=e.getInitedBrazeSdk(),this.brazeSdk.subscribeToInAppMessage(this.onInAppMessage)}engage(e){if(!this.brazeSetttings.preventEngage()){if(Sb(e.params))return void this.brazeSdk.logCustomEvent(e.decisionPoint);this.brazeSdk.logCustomEvent(e.decisionPoint,e.params)}}getInitedBrazeSdk(){return this.brazeSdk}handleControlMessage(e){this.brazeSdk.showInAppMessage(e.data),this.removeBanner(e.id),this.removeContainerMessage(e.id),this.removeStoreOffer(e.id)}handleEngagementClosed(e){this.removeBanner(e.id)}handlePurchase(e){this.removeBanner(e),this.removeContainerMessage(e),this.removeStoreOffer(e)}createEngagement(e){const i=new HWe(e);return i.trackShown=()=>this.brazeSdk.logInAppMessageImpression(e),i.trackClicked=()=>this.brazeSdk.logInAppMessageClick(e),i.trackButtonClicked=r=>this.brazeSdk.logInAppMessageButtonClick(r,e),i.destroy=()=>{this.removeBanner(i.id),this.removeContainerMessage(i.id),this.removeStoreOffer(i.id);const r=this.timers.get(i.id);clearTimeout(r),this.timers.delete(i.id)},i}addContainerMessage(e){if(!e.data.isControl){const i=this.containerMessages.getValue().filter(r=>!r.data.isControl).find(r=>r.data.message===e.data.message);if(this.developerService.brazeLoggingEnabled()&&console.log("BrazeEngagementService","addContainerMessage",i),i)return}this.containerMessages.next([...this.containerMessages.getValue(),e])}addStoreOffer(e){if(!e.data.isControl){const i=this.storeOffers.getValue().filter(r=>!r.data.isControl).find(r=>r.data.message===e.data.message);if(this.developerService.brazeLoggingEnabled()&&console.log("BrazeEngagementService","addStoreOffer",i),i)return}this.storeOffers.next([...this.storeOffers.getValue(),e])}removeContainerMessage(e){const i=this.containerMessages.getValue().find(r=>r.id===e);i&&this.containerMessages.next(this.containerMessages.getValue().filter(r=>r!==i))}removeStoreOffer(e){const i=this.storeOffers.getValue().find(r=>r.id===e);i&&this.storeOffers.next(this.storeOffers.getValue().filter(r=>r!==i))}addBanner(e){this.banners.next([...this.banners.getValue(),e]),this.engagement.next(e)}removeBanner(e){const i=this.banners.getValue().find(r=>r.id===e);i&&(this.banners.next(this.banners.getValue().filter(r=>r!==i)),this.engagement.getValue()===i&&this.engagement.next(this.banners.getValue().length?this.banners.getValue()[0]:void 0))}addExpirationTimer(e){this.timers.has(e.id)||this.timers.set(e.id,setTimeout(()=>{e.destroy()},1e3*e.getTimeLeft()))}onLogout(){this.containerMessages.next([]),this.storeOffers.next([]),this.banners.next([]),this.engagement.next(void 0),this.timers.forEach(e=>clearTimeout(e))}}).\u0275fac=function(e){return new(e||t)(T(Aw),T(J4),T(tg))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogout",null),n=Qe([Wo(),ue("design:paramtypes",[Aw,Object,tg])],n),n})();class qWe{constructor(n){if("string"==typeof n)this.decisionPoint=n;else for(let o in n)n.hasOwnProperty(o)&&(this[o]=n[o])}addParam(n,o){return this.params={...this.params,[n]:o},this}}class WWe{constructor(n,o){this.sdk=n,this.inAppMessage=o,this.web={registerAppboyPushMessages:this.sdk.requestPushPermission}}closeMessage(){console.warn("BrazeBridge","closeMessage not implemented")}requestImmediateDataFlush(n){return this.sdk.requestImmediateDataFlush(n)}logClick(n){return this.sdk.logInAppMessageHtmlClick(this.inAppMessage,n)}logCustomEvent(n,o){return this.sdk.logCustomEvent(n,o)}logPurchase(n,o,e,i,r){return this.sdk.logPurchase(n,o,e,i,r)}getUser(){return this.sdk.getUser()}requestPushPermission(n,o){return this.sdk.requestPushPermission(n,o)}changeUser(n,o){return this.sdk.changeUser(n,o)}}let Sae=(()=>{var t;class n{constructor(e){this.brazeService=e}createBrazeBridge(e){return new WWe(this.brazeService.getInitedBrazeSdk(),e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Aw))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const $We=[bu];let wae=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Aw))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[Aw,U_,Sae],imports:[$We]}),n})();class KWe{constructor(n,o){this.name=n,this.params=o}addParam(n,o){return this.params||(this.params={}),this.params[n]=o,this}serialize(){return{name:this.name,params:this.params}}}class ZWe{constructor(n,o){this.braze=n,this.config=o}sendEvent(n){jS.checkIfTrackingEventIsSupported(n,this.config)&&(console.warn("BrazeAdapterService",n),this.braze.sendEvent(this.createEvent(n)))}sendUIEvent(n){console.warn("BrazeAdapterService UI event not supported",n)}createEvent(n){return new KWe(n.type,n.args).serialize()}}const G_=new Ot("TRACKING_SERVICE"),ng=new Ot("GA_SERVICE");var Rw=function(t){return t.GaService="GaService",t.DeltaDNAAdapterService="DeltaDNAAdapterService",t.FbPixelService="FbPixelService",t.NativeTrackingService="NativeTrackingService",t.BrazeService="BrazeService",t}(Rw||{});let yi=(()=>{var t;class n{constructor(e,i,r,s){this.contextTreeService=r,this.permissions=e,this.store=i,this.trackingServices=s}sendEvent(e){const i=this.permissions.getActionPermission(nt.EPermissionModule.Tracking,nt.EModuleAction.Send);if(!this.store.selectUserState()||i.isPermitted)try{this.validateAnalyticsTrackingConfig(e);const r="category('".concat(e.category,"')"),s="type('".concat(e.type,"')");let a="";e.args&&(a+="args('",Object.keys(e.args).forEach(c=>{a+="".concat(c,": ").concat(e.args[c],", ")}),a+="')"),console.warn("[AnalyticsTracking]: Sending analytics event "+"".concat(r," ").concat(s," ").concat(a),this.contextTreeService),this.trackingServices.forEach(c=>{c.sendEvent(e,this.contextTreeService.getContext())})}catch(r){console.error(r)}}sendUIEvent(e){const i=this.permissions.getActionPermission(nt.EPermissionModule.Tracking,nt.EModuleAction.Send);if(this.store.selectUserState()&&!i.isPermitted)return;this.trackingServices.forEach(a=>{a.sendUIEvent&&a.sendUIEvent(e)});const r="action('".concat(e.action,"')"),s="target('".concat(e.target,"')");console.warn("[AnalyticsTracking]: Sending analytics UI event "+"".concat(r," ").concat(s))}sendPageView(e){const i=this.permissions.getActionPermission(nt.EPermissionModule.Tracking,nt.EModuleAction.Send);this.store.selectUserState()&&!i.isPermitted||(this.trackingServices.forEach(r=>{r.sendPageView&&r.sendPageView(e)}),console.warn("[AnalyticsTracking]: Sending analytics pageview for "+e))}validateAnalyticsTrackingConfig(e){let i;if(e?e.category?e.type||(i="Bad \u0415AnalyticsTrackingConfig Type: ".concat(e.type)):i="Bad \u0415AnalyticsTrackingConfig Category: ".concat(e.category):i="\u0415AnalyticsTrackingConfig is ".concat(e.toString()),i)throw new Error("Incorrect use of AnalyticsTrackingEventDirective. "+i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ti),T(J),T(nn),T(G_))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const QWe=[xi,wae],YWe=[yi];let JWe=(()=>{var t;class n{static forRoot(e){function i(r){let s={};for(let a in e)if(e.hasOwnProperty(a)){s[a]={};for(let c in e[a])e[a].hasOwnProperty(c)&&(s[a][c]=!!e[a][c].find(u=>u===r))}return s}return{ngModule:n,providers:[...YWe,{provide:ng,useFactory:(r,s,a,c)=>new $G(s,a,i(Rw.GaService),r,c),deps:[La,an,Jo,Qie]},{provide:G_,multi:!0,useExisting:ng},{provide:G_,multi:!0,useFactory:r=>new I7e(r,i(Rw.NativeTrackingService)),deps:[Qt]},{provide:G_,multi:!0,useFactory:()=>new M7e(i(Rw.FbPixelService))},{provide:G_,multi:!0,useFactory:(r,s)=>new Pqe(r,s,i(Rw.DeltaDNAAdapterService)),deps:[Zse,Jo]},{provide:G_,multi:!0,useFactory:r=>new ZWe(r,i(Rw.BrazeService)),deps:[Aw]}]}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[QWe]}),n})();var Dp=function(t){return t.ClientSound="clientSound",t.BackgroundMusic="backgroundMusic",t.VoiceMessage="voiceMessage",t}(Dp||{}),dn=function(t){return t.AchievementEarned="AchievementEarned",t.ChipsGain="ChipsGain",t.ChipsLoss="ChipsLoss",t.Click="Click",t.ClickTab="ClickTab",t.ClickToggle="ClickToggle",t.Flip="Flip",t.GameAccept="GameAccept",t.GameFound="GameFound",t.GameReject="GameReject",t.GameDestroyed="GameDestroyed",t.GameWon="GameWon",t.GameLost="GameLost",t.LevelUp="LevelUp",t.Like="Like",t.MatchmakingRoll="MatchmakingRoll",t.MessageSend="MessageSend",t.MessageReceive="MessageReceive",t.Notification="Notification",t.OpponentFound="OpponentFound",t.PopupSlide="PopupSlide",t.Slide="Slide",t.SlideOptions="SlideOptions",t.ToastWarn="ToastWarn",t.ToastInfo="ToastInfo",t.ToastError="ToastError",t.ToastSuccess="ToastSuccess",t.TimeTick="TimeTick",t.TournamentWon="TournamentWon",t.DefaultBackgroundMusic="DefaultBackgroundMusic",t.CoinCounter="CoinCounter",t.Claim="Claim",t.Poker="poker",t.Roulette="roulette",t.Slots="slots",t.Svara="svara",t.Blackjack="blackjack",t.Teenpatti="teenpatti",t.Madaqesh="madaqesh",t.CaseIdle="caseIdle",t.CaseIntro="caseIntro",t.CaseWin="caseWin",t.SlotmlotBigWin="slotmlotBigWin",t.SlotmlotWin="slotmlotWin",t.SlotmlotIdle="slotmlotIdle",t.SlotmlotTableSwipe="slotmlotTableSwipe",t.AdventCalendarCollect="adventCalendarCollect",t.AdventCalendarTomorrowShow="adventCalendarTomorrowShow",t}(dn||{}),Pa=function(t){return t.Load="load",t.Play="play",t.End="end",t.Pause="pause",t.Stop="stop",t.Mute="mute",t.Volume="volume",t.Rate="rate",t.Seek="seek",t.Fade="fade",t}(Pa||{}),sI=function(t){return t.Unload="unload",t}(sI||{}),aI=function(t){return t.LoadError="loaderror",t.PlayError="playerror",t}(aI||{}),X4=function(t){return t.Unloaded="unloaded",t.Loading="loading",t.Loaded="loaded",t}(X4||{});let $b=(()=>{class n{static get ctx(){return Sne.Howler.ctx}constructor(e){this.eventEmitter=new Ep,this.internalListeners=new ie.List,this.emitEvent=(i,...r)=>{this.eventEmitter.emit(i,...r)},this.onSoundPlay=()=>{this.stopped&&(this.stop(),this.removeEventListener(Pa.Play,this.onSoundPlay))},this.internalObject=new Sne.Howl(e),this.options=e,this.id=String(++n.count),this.type=e.type,this.addListeners()}play(){this.stopped=!1,this.internalObject.play()}stop(){this.stopped=!0,this.internalObject.stop(),this.addEventListener(Pa.Play,this.onSoundPlay)}pause(){this.internalObject.pause()}resume(){this.internalObject.playing()||this.play()}rate(e){this.internalObject.rate(e)}mute(){this.internalObject.mute()}load(){this.internalObject.load()}unload(){this.internalObject.unload(),this.eventEmitter.emit(sI.Unload),this.removeListeners()}seek(e){this.internalObject.seek(e)}get state(){return this.internalObject.state()}get currentTime(){return this.internalObject.seek()}get duration(){return this.internalObject.duration()}volume(e){this.internalObject.volume(e)}getOptions(){return this.options}onLoad(e){return new ie.EventListener(this.eventEmitter,Pa.Load,e)}onPlay(e){return new ie.EventListener(this.eventEmitter,Pa.Play,e)}onEnd(e){return new ie.EventListener(this.eventEmitter,Pa.End,e)}onPause(e){return new ie.EventListener(this.eventEmitter,Pa.Pause,e)}onStop(e){return new ie.EventListener(this.eventEmitter,Pa.Stop,e)}onMute(e){return new ie.EventListener(this.eventEmitter,Pa.Mute,e)}onVolume(e){return new ie.EventListener(this.eventEmitter,Pa.Volume,e)}onRate(e){return new ie.EventListener(this.eventEmitter,Pa.Rate,e)}onSeek(e){return new ie.EventListener(this.eventEmitter,Pa.Seek,e)}onFade(e){return new ie.EventListener(this.eventEmitter,Pa.Fade,e)}onUnload(e){return new ie.EventListener(this.eventEmitter,sI.Unload,e)}onPlayError(e){return new ie.EventListener(this.eventEmitter,aI.PlayError,e)}onLoadError(e){return new ie.EventListener(this.eventEmitter,aI.LoadError,e)}addEventListener(e,i){this.internalObject.on(e,i)}removeEventListener(e,i){this.internalObject.off(e,i)}addListeners(){Object.keys(Pa).forEach(e=>{const i=Pa[e],r={event:i,listener:s=>this.emitEvent(i,s)};this.internalListeners.add(r),this.addEventListener(i,r.listener)}),Object.keys(aI).forEach(e=>{const i=aI[e],r={event:i,listener:(s,a)=>this.emitEvent(i,s,a)};this.internalListeners.add(r),this.addEventListener(i,r.listener)})}removeListeners(){this.internalListeners.forEach(e=>this.removeEventListener(e.event,e.listener))}}return n.count=0,n})();const Ui="mp3",XWe=[{id:dn.AchievementEarned,pathToFile:"achievement/AchievementEarned.".concat(Ui),defaultVolume:.5},{id:dn.ChipsGain,pathToFile:"chips/CoinGain.".concat(Ui),defaultVolume:.8},{id:dn.ChipsLoss,pathToFile:"chips/CoinLoss.".concat(Ui),defaultVolume:.8},{id:dn.Click,pathToFile:"utility/ButtonPressed.".concat(Ui),defaultVolume:.45},{id:dn.ClickTab,pathToFile:"utility/ChangeTab.".concat(Ui),defaultVolume:.6},{id:dn.ClickToggle,pathToFile:"utility/ToggleSound.".concat(Ui),defaultVolume:.45},{id:dn.Flip,pathToFile:"utility/FlipSound.".concat(Ui),defaultVolume:.45},{id:dn.GameAccept,pathToFile:"game/GameAccepted.".concat(Ui),defaultVolume:.5},{id:dn.GameDestroyed,pathToFile:"game/GameDestroyed.".concat(Ui),defaultVolume:.5},{id:dn.GameFound,pathToFile:"game/GameFound.".concat(Ui),defaultVolume:.8},{id:dn.GameLost,pathToFile:"game/GameLost.".concat(Ui),defaultVolume:.8},{id:dn.GameReject,pathToFile:"game/GameRejected.".concat(Ui),defaultVolume:.5},{id:dn.GameWon,pathToFile:"game/GameWon.".concat(Ui),defaultVolume:.8},{id:dn.LevelUp,pathToFile:"notifications/LevelUp.".concat(Ui),defaultVolume:.5},{id:dn.Like,pathToFile:"utility/Like.".concat(Ui),defaultVolume:.5},{id:dn.MatchmakingRoll,pathToFile:"matchmaking/MatchMakingSound.".concat(Ui),defaultVolume:.45},{id:dn.MessageReceive,pathToFile:"chat/MessageRecieved.".concat(Ui),defaultVolume:.5},{id:dn.MessageSend,pathToFile:"chat/MessageSent.".concat(Ui),defaultVolume:.45},{id:dn.Notification,pathToFile:"notifications/Notification.".concat(Ui),defaultVolume:.5},{id:dn.OpponentFound,pathToFile:"matchmaking/OpponentFound.".concat(Ui),defaultVolume:.5},{id:dn.PopupSlide,pathToFile:"utility/PopupOpen.".concat(Ui),defaultVolume:.45},{id:dn.Slide,pathToFile:"utility/SlideSound.".concat(Ui),defaultVolume:.45},{id:dn.SlideOptions,pathToFile:"utility/SlidingOptions.".concat(Ui),defaultVolume:.45},{id:dn.TimeTick,pathToFile:"utility/TimerTick.".concat(Ui),defaultVolume:.45},{id:dn.ToastError,pathToFile:"utility/Toast_Error.".concat(Ui),defaultVolume:.45},{id:dn.ToastInfo,pathToFile:"utility/Toast_Hint.".concat(Ui),defaultVolume:.45},{id:dn.ToastSuccess,pathToFile:"utility/Toast_Confirmation.".concat(Ui),defaultVolume:.45},{id:dn.ToastWarn,pathToFile:"utility/Toast_Hint.".concat(Ui),defaultVolume:.45},{id:dn.TournamentWon,pathToFile:"tournament/TournamentWon.".concat(Ui),defaultVolume:.8},{id:dn.DefaultBackgroundMusic,pathToFile:"background/ambient_loop.".concat(Ui),defaultVolume:.3},{id:dn.CoinCounter,pathToFile:"utility/CoinCounter.".concat(Ui),defaultVolume:.8},{id:dn.Claim,pathToFile:"utility/Claim.".concat(Ui),defaultVolume:.8},{id:dn.Poker,pathToFile:"tiles/poker.".concat(Ui),defaultVolume:.8},{id:dn.Roulette,pathToFile:"tiles/roulette.".concat(Ui),defaultVolume:.8},{id:dn.Slots,pathToFile:"tiles/slots.".concat(Ui),defaultVolume:.8},{id:dn.Svara,pathToFile:"tiles/svara.".concat(Ui),defaultVolume:.8},{id:dn.Blackjack,pathToFile:"tiles/blackjack.".concat(Ui),defaultVolume:.8},{id:dn.Teenpatti,pathToFile:"tiles/teenpatti.".concat(Ui),defaultVolume:.8},{id:dn.Madaqesh,pathToFile:"tiles/madaqesh.".concat(Ui),defaultVolume:.8},{id:dn.CaseIdle,pathToFile:"register-bonus/case_idle_sound.".concat(Ui),defaultVolume:.8},{id:dn.CaseIntro,pathToFile:"register-bonus/case_intro_sound.".concat(Ui),defaultVolume:.8},{id:dn.CaseWin,pathToFile:"register-bonus/case_win_sound.".concat(Ui),defaultVolume:.8},{id:dn.SlotmlotBigWin,pathToFile:"slotmlot/slot_bars_sound.".concat(Ui),defaultVolume:.3},{id:dn.SlotmlotWin,pathToFile:"slotmlot/slot_win_sound.".concat(Ui),defaultVolume:.3},{id:dn.SlotmlotIdle,pathToFile:"slotmlot/slot_idle_sound.".concat(Ui),defaultVolume:1},{id:dn.SlotmlotTableSwipe,pathToFile:"slotmlot/swipe_sound.".concat(Ui),defaultVolume:.3},{id:dn.AdventCalendarCollect,pathToFile:"welcome/collected_sound.".concat(Ui),defaultVolume:.3},{id:dn.AdventCalendarTomorrowShow,pathToFile:"welcome/tomorrow_reward_sound.".concat(Ui),defaultVolume:.3}];let Mo=(()=>{var t;let n=((t=class{constructor(e,i,r,s,a,c,u){this.googleAnalyticsService=u,this.pausedOnAppPause=new ie.List,this.pausedList=new ie.List,this.eventEmitter=new Ep,this.onSoundPlayError=(h,b)=>{"string"==typeof b?this.googleAnalyticsService.sendException(b,!1):b instanceof Error&&this.googleAnalyticsService.sendException(b.message)},this.settings=e,this.urlService=i,this.ngZone=r,this.playingList=new ie.List,this.soundsList=new ie.List(XWe),this.soundsPool={},this.device=s,this.appState=a,this.appService=c,this.addListeners()}createSound(e){const i=new $b(e),r=new ie.List;return r.add(i.onPlay(()=>{this.playingList.find(s=>s.id===i.id)||this.playingList.add(i),this.pausedList.remove(i),this.eventEmitter.emit(Pa.Play,i)})),r.add(i.onPause(()=>{this.playingList.remove(i),this.pausedList.add(i),this.eventEmitter.emit(Pa.Pause,i)})),r.add(i.onStop(()=>{this.playingList.remove(i),this.pausedList.remove(i),this.pausedOnAppPause.remove(i),this.eventEmitter.emit(Pa.Stop,i)})),r.add(i.onEnd(()=>{this.playingList.remove(i),this.pausedList.remove(i),this.pausedOnAppPause.remove(i),this.eventEmitter.emit(Pa.End,i)})),r.add(i.onPlayError(this.onSoundPlayError)),r.add(i.onUnload(()=>{this.playingList.remove(i),this.pausedList.remove(i),this.pausedOnAppPause.remove(i),this.eventEmitter.emit(sI.Unload,i),r.forEach(s=>s.detach())})),i}play(e,i){if(!(i&&i.bypassChecks||!1!==this.getIsSoundEnabled()))return null;let r;return this.ngZone.runOutsideAngular(()=>{this.stopAll(this.playingList.where(c=>c.getOptions().interruptable));const s=this.getSoundModel(e),a={src:this.urlService.getSoundsUrl(s.pathToFile),volume:s.defaultVolume,interruptable:!0,type:Dp.ClientSound,...i};r=this.getFromPoolOrCreate(e,a),this.playingList.find(c=>c.id===r.id)||this.playingList.add(r);try{r.play()}catch(c){console.log("Error playing sound",r.id)}}),r.id}stop(e){try{const i=this.playingList.remove(this.findPlayingSound(e));if(i)this.ngZone.runOutsideAngular(()=>{i.stop()});else{const r=this.pausedOnAppPause.remove(this.pausedOnAppPause.find(s=>s.id===e));r&&this.ngZone.runOutsideAngular(()=>{r.stop()})}}catch(i){console.log("Error stopping sound",e)}}pause(e){try{const i=this.findPlayingSound(e);i&&this.ngZone.runOutsideAngular(()=>{i.pause()})}catch(i){console.log("Error pausing sound",e)}}resume(e){try{const i=this.pausedList.find(r=>r.id===e);i&&this.ngZone.runOutsideAngular(()=>{i.resume()})}catch(i){console.log("Error resuming sound",e)}}mute(e){try{const i=this.findPlayingSound(e);i&&this.ngZone.runOutsideAngular(()=>{i.mute()})}catch(i){console.log("Error muting sound",e)}}unload(e){try{const i=this.playingList.remove(this.findPlayingSound(e));i&&this.ngZone.runOutsideAngular(()=>{this.stop(e),i.unload()})}catch(i){console.log("Error unloading sound",e)}}onSoundPlay(e){return new ie.EventListener(this.eventEmitter,Pa.Play,e)}onSoundEnd(e){return new ie.EventListener(this.eventEmitter,Pa.End,e)}onSoundStop(e){return new ie.EventListener(this.eventEmitter,Pa.Stop,e)}onSoundPause(e){return new ie.EventListener(this.eventEmitter,Pa.Pause,e)}onSoundUnload(e){return new ie.EventListener(this.eventEmitter,sI.Unload,e)}onAppPause(){clearTimeout(this.resumeTimeout),this.pausedOnAppPause=new ie.List(this.playingList.toArray()),this.playingList.forEach(e=>e.pause()),Howler.mute(!0)}onAppResume(){clearTimeout(this.resumeTimeout),this.tryResumeAudioContext().catch(e=>{console.log("Audio context resume failed",e),this.tryResumeAudioContext().catch(i=>console.warn("Well rip audio context"))})}addListeners(){!this.appService.isMobileApp()&&this.device.isMobile()&&(this.appState.subscribe(co.PageHide,this.onAppPause.bind(this)),this.appState.subscribe(co.PageVisible,this.onAppResume.bind(this)))}resumeAudioContext(){return $b.ctx&&$b.ctx.state&&("interrupted"===$b.ctx.state||"suspended"===$b.ctx.state)&&$b.ctx.resume?$b.ctx.resume():Promise.resolve()}tryResumeAudioContext(){return new Promise((e,i)=>{this.resumeTimeout=setTimeout(r=>{this.resumeAudioContext().then(s=>{this.pausedOnAppPause.forEach(a=>a.resume()),this.pausedOnAppPause=new ie.List,Howler.mute(!1),e()}).catch(s=>{i(s)})},1e3)})}stopAll(e){e.forEach(i=>{i.stop();try{this.playingList.remove(i)}catch(r){console.log("Remove sound error",r)}})}unloadAll(){this.stopAll(this.playingList),this.playingList.forEach(e=>{e.unload()})}getIsSoundEnabled(){return this.settings.getSounds()}getSoundModel(e){return this.soundsList.where({id:e}).get(0)}findPlayingSound(e){return this.playingList.find(i=>i.id===e)}addToObjectPool(e,i){this.soundsPool[e]=i}getFromPoolOrCreate(e,i){let r=this.soundsPool[e];return r||(r=this.createSound(i),this.addToObjectPool(e,r)),r}}).\u0275fac=function(e){return new(e||t)(T(nc),T(ii),T(an),T(Kl),T(Sa),T(Qt),T(G_))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([uie(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onAppPause",null),Qe([EA(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onAppResume",null),n=Qe([Wo(),ue("design:paramtypes",[Object,ii,an,Kl,Sa,Qt,$G])],n),n})(),Fd=(()=>{var t;class n{constructor(e){this.sound="click",this.soundService=e}ngOnDestroy(){this.sound=null}onClick(e){switch(this.sound){case"click":this.soundType=dn.Click;break;case"like":this.soundType=dn.Like;break;case"globalFeed":this.soundType=dn.Slide;break;default:this.soundType=this.sound}this.soundType&&this.soundService.play(this.soundType)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mo))},t.\u0275dir=qn({type:t,selectors:[["","click-sound",""]],hostBindings:function(e,i){1&e&&Y("click",function(s){return i.onClick(s)})},inputs:{sound:"sound"}}),n})();const e9e=[Mo];let UR=(()=>{var t;class n{static forRoot(){return{ngModule:n,providers:e9e}}static forChild(){return{ngModule:n}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();const t9e=["dynamicComponentContainer"];function n9e(t,n){if(1&t&&(p(0,"div",17)(1,"p"),H(2),m()()),2&t){const o=_(3);d(2),se(o.popupOptions.state.title)}}function i9e(t,n){1&t&&(B(0,"p",18),V(1,"safeHtml")),2&t&&l("innerHtml",$(1,1,_(3).popupOptions.state.message),Yn)}function o9e(t,n){if(1&t){const o=Ce();p(0,"buttons-confirm",19),Y("accept",function(){oe(o);const i=_(3);return re(i.popupOptions.state.action?i.popupOptions.state.action():null)})("decline",function(){oe(o);const i=_(3);return re(i.popupOptions.state.actionDecline?i.popupOptions.state.actionDecline():null)}),m()}2&t&&l("popupOptions",_(3).popupOptions)}function r9e(t,n){if(1&t){const o=Ce();p(0,"buttons-decision",20),Y("actionOne",function(){return oe(o),re(_(3).popupOptions.state.firstOption.action())})("actionTwo",function(){return oe(o),re(_(3).popupOptions.state.secondOption.action())}),m()}2&t&&l("popupOptions",_(3).popupOptions)}function s9e(t,n){if(1&t){const o=Ce();p(0,"buttons-blocker",21),Y("actionRefresh",function(){return oe(o),re(_(3).refresh())})("actionReload",function(){oe(o);const i=_(3);return re(i.popupOptions.state.action?i.popupOptions.state.action():null)})("actionOtherBlockerAction",function(){return oe(o),re(_(3).popupOptions.state.action())}),m()}2&t&&l("popupOptions",_(3).popupOptions)}function a9e(t,n){if(1&t){const o=Ce();p(0,"buttons-basic",22),Y("action",function(){oe(o);const i=_(3);return re(i.popupOptions.state.type===i.popupTypes.Basic?i.popupOptions.state.action():null)}),m()}2&t&&l("popupOptions",_(3).popupOptions)}function c9e(t,n){1&t&&B(0,"buttons-merge",23),2&t&&l("popupOptions",_(3).popupOptions)}const l9e=t=>({"with-title":t}),u9e=t=>({"without-title":t});function d9e(t,n){if(1&t&&(p(0,"div",5)(1,"div",6)(2,"div",7),U(3,n9e,3,1,"div",8),p(4,"div",9),U(5,i9e,2,3,"p",10),m()()(),p(6,"div",11)(7,"div"),U(8,o9e,1,1,"buttons-confirm",12)(9,r9e,1,1,"buttons-decision",13)(10,s9e,1,1,"buttons-blocker",14)(11,a9e,1,1,"buttons-basic",15)(12,c9e,1,1,"buttons-merge",16),m()()()),2&t){const o=_(2);l("ngClass",o.popupOptions.state.type),d(2),l("ngClass",ne(13,l9e,o.popupOptions.state.title)),d(),l("ngIf",o.popupOptions.state.title),d(),l("ngClass",ne(15,u9e,!o.popupOptions.state.title)),d(),l("ngIf",o.popupOptions.state.message),d(2),ni("popup__container--buttons-inner ",o.popupOptions.state.type,""),d(),l("ngIf",o.popupOptions.state.type===o.popupTypes.Confirm),d(),l("ngIf",o.popupOptions.state.type===o.popupTypes.Decision),d(),l("ngIf",o.popupOptions.state.type===o.popupTypes.Blocker),d(),l("ngIf",o.popupOptions.state.type===o.popupTypes.Basic||o.popupOptions.state.type===o.popupTypes.Notification),d(),l("ngIf",o.popupOptions.state.type===o.popupTypes.Merge)}}function p9e(t,n){}const h9e=t=>({key:t});function m9e(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().closeButtonHandler())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().closeButtonHandler())}),m(),U(2,d9e,13,17,"div",3)(3,p9e,0,0,"ng-template",null,4,ft),m()}if(2&t){const o=_();l("popupContainerOpened",o.popupOptions.state&&o.popupOptions.state.visible)("popupContainerOptions",o.popupContainerOptions),Hn("data-cy",o.popupOptions.state.messageKey),d(),l("hideCloseButton",o.popupOptions.state.type===o.popupTypes.Blocker||o.popupOptions.state.type===o.popupTypes.Notification||o.popupOptions.state.type===o.popupTypes.GdprPopup&&o.popupOptions.state.extraType===o.gdprPopupTypes.Privacy)("popupTitleType",o.popupOptions.state.titleType)("text",ne(8,h9e,o.popupOptions.state.title))("customComponentCssClass","popup__title-bar "+o.popupOptions.state.type),d(),l("ngIf",!o.popupOptions.state.isComponentRef)}}let e5=(()=>{var t;class n{constructor(e,i,r,s,a){this.titleTypes=li,this.offerTypeEnum=Bc,this.gdprPopupTypes=hP,this.popupTypes=Bs,this.popStateHandler=c=>{this.popupOptions&&this.popupOptions.state&&this.popupOptions.state.visible&&this.popupOptions.state.popStateHandlerOn&&(this.popupOptions.state.actionDecline&&this.popupOptions.state.actionDecline(),this.hide(c.url),this.cdr.detectChanges())},this.cdr=a,a.detach(),this.router=s,this.popup=e,this.soundService=r,this.popupQueue=new R6e,this.alreadyClickedFlag=!1,this.popupButtonType={first:kw.Other,second:kw.Other},this.location=i,this.popupContainerOptions={componentZIndex:"100002"}}ngOnInit(){this.popup.get().subscribe(e=>{this.fillTheQueue(e),this.cdr.detectChanges()}),this.popup.clearPopupQueueEvent.subscribe(()=>{this.popupQueue.clear(),this.cdr.detectChanges()}),this.backButtonSubscription=this.location.subscribe(this.popStateHandler),this.cdr.detectChanges()}ngOnDestroy(){this.popup.get().unsubscribe(),this.backButtonSubscription&&this.backButtonSubscription.unsubscribe(),this.popupExistenceTimeout&&clearTimeout(this.popupExistenceTimeout)}refresh(){this.popupOptions.state.navigateToBeforeRefresh&&this.location.replaceState(this.popupOptions.state.navigateToBeforeRefresh),location.reload()}hide(e){this.popupOptions.state.type===Bs.Blocker||this.popupOptions.state.type===Bs.GdprPopup&&!e||this.popupOptions.state.type===Bs.GdprPopup&&e&&-1===e.indexOf("home")&&-1===e.indexOf("login")||this.alreadyClickedFlag||(this.alreadyClickedFlag=!0,this.popup.hide(this.popupOptions.id),this.cdr.detectChanges())}closeButtonHandler(){this.popupOptions.state.actionDecline&&this.popupOptions.state.actionDecline(),this.hide(),this.cdr.detectChanges()}fillTheQueue(e){e.state.firstButtonText&&this.checkButtonType(e.state),e.state.visible&&!e.state.hidden?this.addPopupToQueue(e):!e.state.visible&&e.state.hidden&&this.removePopupFromQueue(e),this.cdr.detectChanges()}addPopupToQueue(e){if(!1===this.popupQueue.isQueueEmpty()){let i=this.popupQueue.getBlocker(e);this.popupQueue.doesNotExistsCheck(e)?(this.popupQueue.add(e),this.popupOptions=i||this.popupQueue.getFirst(),this.popupContainerOptions=this.popupOptions.state.typeOfOffer===Bc.Vip?{...this.popupContainerOptions,customComponentCssClass:this.popupOptions.state.type+" "+(this.popupOptions.state.typeOfOffer?this.popupOptions.state.typeOfOffer:"")}:{...this.popupContainerOptions,customComponentCssClass:this.popupOptions.state.type+" "+(this.popupOptions.state.extraType?this.popupOptions.state.extraType:"")},this.popupOptions.state.isComponentRef&&this.showDynamicContent(this.popupOptions)):this.checkPopupStillExist(e)}else this.popupQueue.add(e),this.popupOptions=this.popupQueue.getFirst(),this.popupContainerOptions=this.popupOptions.state.typeOfOffer===Bc.Vip?{...this.popupContainerOptions,customComponentCssClass:this.popupOptions.state.type+" "+(this.popupOptions.state.typeOfOffer?this.popupOptions.state.typeOfOffer:"")}:{...this.popupContainerOptions,customComponentCssClass:this.popupOptions.state.type+" "+(this.popupOptions.state.extraType?this.popupOptions.state.extraType:"")},this.popupOptions.state.isComponentRef&&this.showDynamicContent(this.popupOptions),this.soundService.play(dn.PopupSlide);this.cdr.detectChanges()}showDynamicContent(e){if(this.compRef=this.elementRef.createComponent(e.state.component),this.compRef.instance.close$){const r=this.compRef.instance.close$.subscribe(()=>this.popup.hide(e.id));this.compRef.onDestroy(()=>r.unsubscribe())}let i=Object.keys(e.state.componentData);ZS()(i,r=>{this.compRef.instance[r]=e.state.componentData[r]}),this.cdr.detectChanges()}destroyDynamicContent(){this.compRef&&(this.compRef.destroy(),this.compRef=void 0,this.elementRef.clear(),this.cdr.detectChanges())}removePopupFromQueue(e){-1===e.id&&this.popupOptions&&this.popupOptions.state.visible&&(this.popupOptions.state.visible=!1),this.popupQueue.remove(e),this.popupOptions&&this.popupOptions.state&&this.popupOptions.state.isComponentRef&&this.destroyDynamicContent(),!1===this.popupQueue.isQueueEmpty()?(this.popupOptions=this.popupQueue.getFirst(),this.popupContainerOptions.customComponentCssClass=this.popupOptions.state.type+" "+(this.popupOptions.state.extraType?this.popupOptions.state.extraType:""),this.popupOptions.state.isComponentRef&&this.showDynamicContent(this.popupOptions)):(this.popupOptions=e,this.popupContainerOptions.customComponentCssClass=this.popupOptions.state.type+" "+(this.popupOptions.state.extraType?this.popupOptions.state.extraType:"")),this.alreadyClickedFlag=!1,this.cdr.detectChanges()}checkPopupStillExist(e){this.popupExistenceTimeout=setTimeout(()=>{let i=this.popupQueue.getQueueLength();if(0!==i){for(;i--;)this.popupQueue.getQueueAsArray()[i].state.message!==e.state.message&&this.fillTheQueue(e);clearTimeout(this.popupExistenceTimeout),this.cdr.detectChanges()}else this.fillTheQueue(e)},300)}checkButtonType(e){this.popupButtonType.first=-1!==e.firstButtonText.indexOf("Facebook")?kw.Facebook:-1!==e.firstButtonText.indexOf("Google")?kw.Google:kw.Other,this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Rs),g(Mo),g(on),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["popup-cmp"]],viewQuery:function(e,i){if(1&e&&$e(t9e,5,bs),2&e){let r;je(r=He())&&(i.elementRef=r.first)}},decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"hideCloseButton","popupTitleType","text","customComponentCssClass","buttonCloseClicked"],["class","popup__container--main--content",3,"ngClass",4,"ngIf"],["dynamicComponentContainer",""],[1,"popup__container--main--content",3,"ngClass"],[1,"popup__container--content"],[1,"popup__container--content-inner",3,"ngClass"],["class","popup__container--content-title",4,"ngIf"],[1,"popup__container--content-text",3,"ngClass"],["data-cy","popupText",3,"innerHtml",4,"ngIf"],[1,"popup__container--buttons"],[3,"popupOptions","accept","decline",4,"ngIf"],[3,"popupOptions","actionOne","actionTwo",4,"ngIf"],[3,"popupOptions","actionRefresh","actionReload","actionOtherBlockerAction",4,"ngIf"],[3,"popupOptions","action",4,"ngIf"],[3,"popupOptions",4,"ngIf"],[1,"popup__container--content-title"],["data-cy","popupText",3,"innerHtml"],[3,"popupOptions","accept","decline"],[3,"popupOptions","actionOne","actionTwo"],[3,"popupOptions","actionRefresh","actionReload","actionOtherBlockerAction"],[3,"popupOptions","action"],[3,"popupOptions"]],template:function(e,i){1&e&&U(0,m9e,5,10,"popup-container",0),2&e&&l("ngIf",i.popupOptions)},styles:[".gdpr-popup{max-height:60rem!important}.gdpr-popup.privacy{max-height:40rem!important}@media only screen and (max-height: 580px){.gdpr-popup{height:100%!important;max-height:100%!important}}.gdpr-popup .popup-container__wrapper--content.gdpr-popup{max-height:60rem!important}.gdpr-popup .popup-container__wrapper--content.gdpr-popup.privacy{max-height:35rem!important}@media only screen and (max-height: 580px){.gdpr-popup .popup-container__wrapper--content.gdpr-popup{height:calc(100% - 1rem)!important;max-height:calc(100% - 1rem)!important;margin:.5rem 0}}.progressive-ads{height:auto!important;max-height:90%!important}@media only screen and (max-height: 568px) and (orientation: landscape){.progressive-ads{height:96vh!important}}.popup__container--game-icon{position:absolute;width:10rem;height:10rem;top:-1.5rem;left:-1.5rem}@media only screen and (max-width: 480px){.popup__container--game-icon{width:8rem;height:8rem;top:-1rem;left:-1rem}}.popup__container--main--content{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:calc(100% - 6rem);display:flex;flex-flow:column;justify-content:space-around}.popup__container--main--content.merge{justify-content:flex-start;padding:1rem}.popup__container--main--content.merge .popup__container--buttons{height:auto;flex:none;margin:0 auto}.popup__container--main--content.merge .popup__container--content{height:auto;margin:auto}.popup__container--main--content.merge .popup__container--buttons-inner{max-height:inherit}.popup__container--main--content.merge .popup__container--content-inner{max-height:inherit;margin:1rem auto!important;height:auto}.popup__container--content{display:flex;justify-content:center;align-items:center;order:2;width:calc(100% - 2rem);height:55%;margin-left:1rem;margin-right:1rem;flex:1;overflow-y:auto}.popup__container--content .popup__container--content-inner{display:flex;flex-flow:column nowrap;width:100%;height:calc(100% - 2rem);max-width:45rem;margin:1rem}.popup__container--content .popup__container--content-inner.with-title{max-height:25rem}@media only screen and (max-width: 768px){.popup__container--content .popup__container--content-inner{margin:1rem;height:calc(100% - 2rem)}}.popup__container--content .popup__container--content-inner .popup__container--content-title{display:flex;justify-content:center;align-items:center;width:100%;height:25%}.popup__container--content .popup__container--content-inner .popup__container--content-title p{font-size:2.4rem;font-weight:600}.popup__container--content .popup__container--content-inner .popup__container--content-text{display:flex;justify-content:center;align-items:flex-start;width:100%;height:75%}.popup__container--content .popup__container--content-inner .popup__container--content-text.without-title{height:100%}.popup__container--content .popup__container--content-inner .popup__container--content-text p{font-size:2rem;text-align:center;font-weight:600;line-height:30px;white-space:pre-line;margin:auto 0}@media only screen and (max-width: 640px){.popup__container--content .popup__container--content-inner .popup__container--content-text p{font-size:1.4rem}}.popup__container--buttons{display:flex;justify-content:center;align-items:center;order:3;width:100%;height:30%;min-height:6rem}.popup__container--buttons:nth-of-type(2){width:100%}@media only screen and (max-width: 768px){.popup__container--buttons{width:100%}}.popup__container--buttons .popup__container--buttons-inner{display:flex;flex-flow:row wrap;justify-content:center;align-items:center;width:auto;height:auto;max-height:90px}@media only screen and (max-width: 380px){.popup__container--buttons .popup__container--buttons-inner:not(.confirm){flex-flow:column}}.popup__container--buttons .popup__container--buttons-inner .popup__container--button{display:flex;justify-content:center;align-items:center;height:4rem;margin:.3rem 0}\n"],encapsulation:2,changeDetection:0}),n})();var kw=function(t){return t.Facebook="facebook",t.Google="google",t.Other="other",t}(kw||{}),ig=function(t){return t.Error="error",t.Success="success",t.Warning="warn",t.Info="info",t}(ig||{});let Dt=(()=>{var t;class n{constructor(e){this.translate=e,this.toastSubject=new sn}info(e,i){this.toasterConstructor(ig.Info,this.getToastText(e,i))}warn(e,i){this.toasterConstructor(ig.Warning,this.getToastText(e,i))}error(e,i){this.toasterConstructor(ig.Error,this.getToastText(e,i))}success(e,i){this.toasterConstructor(ig.Success,this.getToastText(e,i))}toasterConstructor(e,i){this.toasterSettings={visible:!0,type:e,hidden:!1,message:i},this.toastSubject.next(this.toasterSettings)}getToastText(e,i){return i?this.translate.getParsedTranslation(e,i):this.translate.getParsedTranslation(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(pi))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),ro=(()=>{var t;class n{constructor(){this.loaderOptions={visible:!1,text:"",params:[]},this.loader=new Qn(this.loaderOptions)}state(){return this.loader}on(e="",i=[]){this.loaderOptions={visible:!0,text:e,params:i},this.loader.next(this.loaderOptions)}off(){this.loaderOptions={visible:!1,text:"",params:[]},this.loader.next(this.loaderOptions)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),GR=(()=>{var t;class n{get isMigratingAccount(){return!!this.migrationToken}constructor(e){this.http=e}findMatchedProfiles(e){var i=this;return f(function*(){let r=[];const s={params:{token:e}};try{r=(yield i.http.get("auth/migration/profiles",s).toPromise()).body}catch(a){return console.warn("Migrate account - can't find profiles",a),[]}return r})()}migrate(e,i){var r=this;return f(function*(){const s={token:e,destinationUserId:i};try{yield r.http.post("auth/migration/migrate",s).toPromise()}catch(a){throw console.warn("Migrate account error",a),jt.createErrorInstance(a)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Tae=nt.EPermissionModule,Pae=nt.EModuleAction;let t5=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.popup=e,this.router=i,this.activatedRoute=r,this.loader=s,this.accountMigrationService=a,this.userService=c,this.authListenerService=u,this.permissionsService=h,this.toaster=b,this.clientConfigService=w,this.navigationService=R,this.constants=G,this.authSubscription=new zt}ngOnInit(){const e=this.activatedRoute.snapshot.params.token||this.activatedRoute.snapshot.queryParams.token;this.validateMigration(e).then(()=>{this.attachListeners(),this.initMigrationProcess(e)}).catch(i=>{if(i instanceof et.ValidationError)return console.error("Can't start the migration, validation failed"),this.dispose(),this.gotoLobby();i instanceof et.Permissions.RequirementNotMeet&&(console.log("Invalid user, migration will continue after login with valid user..."),this.accountMigrationService.migrationToken=e,this.gotoLogin(),this.attachListeners())})}validateMigration(e){var i=this;return f(function*(){const r=i.clientConfigService.getConfig().platform.migration;if(!(r&&r.enabled&&"slave"===r.role&&e&&e.length))throw new et.ValidationError;let s;try{s=yield i.userService.getState()}catch(a){}if(!s||!i.permissionsService.getActionPermission(Tae.Profile,Pae.Migrate).isPermitted)throw new et.Permissions.RequirementNotMeet("user")})()}initMigrationProcess(e){var i=this;return f(function*(){i.accountMigrationService.migrationToken=e;let r=yield i.userService.getState();i.showConfirmPopup(f(function*(){yield i.migrate(e,r.profile.id)}),()=>{i.dispose(),i.gotoLobby()})})()}migrate(e,i){var r=this;return f(function*(){r.loader.on();try{yield r.accountMigrationService.migrate(e,i)}catch(s){r.toaster.error(s instanceof et.Permissions.LimitReached?"MIGRATING_ACCOUNT.LIMIT_REACHED_ERROR":"ERRORS.SOMETHING_WRONG")}finally{r.dispose(),r.loader.off(),r.gotoLobby()}})()}showConfirmPopup(e,i){this.popup.confirm({buttons:{action:e,actionDecline:i},textParams:{translationKey:"MIGRATING_ACCOUNT.CONFIRM",params:[]}})}gotoLogin(){this.router.navigateByUrl("/home")}gotoLobby(){this.router.navigate([this.constants.defaultLoggedRoute])}attachListeners(){this.authSubscription.add(this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Login)).subscribe(()=>{const e=this.accountMigrationService.migrationToken;!e||!this.permissionsService.getActionPermission(Tae.Profile,Pae.Migrate).isPermitted||this.initMigrationProcess(e)}))}dispose(){this.authSubscription&&this.authSubscription.unsubscribe(),this.accountMigrationService.migrationToken=void 0,this.navigationService.urlToRedirectAfterLogin=void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(on),g(Po),g(ro),g(GR),g(Kr),g(xr),g(Ti),g(Dt),g(Zt),g(Yt),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["account-migration"]],decls:1,vars:0,template:function(e,i){1&e&&B(0,"section")}}),n})();var f9e=nt.EPermissionModule,g9e=nt.EModuleAction;let cI=(()=>{var t;class n{constructor(e,i,r,s,a){var c=this;this.userService=e,this.authListenerService=i,this.clientConfigService=r,this.permissionsService=s,this.store=a,this.onUserChanged=function(){var u=f(function*(h){const b=c.clientConfigService.getConfig().platform.migration;if(!(h&&b&&b.enabled&&"master"===b.role&&c.permissionsService.getActionPermission(f9e.Profile,g9e.Migrate).isPermitted))return;let w;try{w=yield c.userService.getState()}catch(R){}!w||!w.migrationToken||c.open()});return function(h){return u.apply(this,arguments)}}(),this.subscriptions=new zt,this.openPopup=new Qn(!1)}initialize(){var e=this;return f(function*(){try{e.openPopup.next(!1);const i=yield e.userService.getState();e.onUserChanged(i)}catch(i){}e.attachListeners()})()}attachListeners(){this.subscriptions.add(this.store.subscribeUserState().pipe(bt(Boolean)).subscribe(this.onUserChanged)),this.subscriptions.add(this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.dispose))}open(){this.openPopup.next(!0)}dispose(){this.subscriptions&&this.subscriptions.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kr),T(xr),T(Zt),T(Ti),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const _9e=["button"];let n5=(()=>{var t;class n{constructor(e){this.buttonDebounce=500,this.timeoutMs=this.buttonDebounce,this.type="button",this.sound="click",this.bclass="",this.onClick=new ke,this.onDisabledClick=new ke,this.renderer2=e}ngOnInit(){this.click=XP(this.emitAction,this.timeoutMs,{maxWait:this.timeoutMs,leading:this.timeoutMs===this.buttonDebounce}),this.nativeAttr&&this.setAttributes(this.nativeAttr),this.flatButton&&this.renderer2.addClass(this.button.nativeElement,"bc__button--flat")}ngOnDestroy(){this.click&&this.click.cancel()}emitAction(e){this.onClick.emit(e)}emitDisabledClick(e){this.disabled&&this.onDisabledClick.emit(e)}setAttributes(e){for(const i in e)e.hasOwnProperty(i)&&this.renderer2.setAttribute(this.button.nativeElement,i,e[i])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&$e(_9e,7),2&e){let r;je(r=He())&&(i.button=r.first)}},inputs:{buttonModifier:"buttonModifier",timeoutMs:"timeoutMs",disabled:"disabled",loading:"loading",flatButton:"flatButton",nativeAttr:"nativeAttr",type:"type",sound:"sound",bclass:"bclass"},outputs:{onClick:"onClick",onDisabledClick:"onDisabledClick"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),vc=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["spinner-loader"]],decls:5,vars:0,consts:[[1,"spinner--loader"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"div")(2,"div")(3,"div")(4,"div"),m())},styles:['[_nghost-%COMP%]{position:relative;width:64px;max-width:100%;font-size:4.8rem}[_nghost-%COMP%]:before{display:block;content:"";width:100%;padding-top:var(--aspect-ratio, 100%)}[_nghost-%COMP%] > [_ngcontent-%COMP%]:first-child{position:absolute;top:0;left:0;right:0;bottom:0}.spinner--loader[_ngcontent-%COMP%]{display:inline-block;position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.spinner--loader[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;border-width:.175em;border-style:solid;border-radius:50%;animation:_ngcontent-%COMP%_tile-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-bottom-color:transparent;border-left-color:transparent;border-right-color:transparent}.spinner--loader[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:nth-child(1){animation-delay:-.1s}.spinner--loader[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:nth-child(2){animation-delay:-.15s}.spinner--loader[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:nth-child(3){animation-delay:-.05s}@keyframes _ngcontent-%COMP%_tile-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}'],changeDetection:0}),n})();var v9e=ve.EButtonModifier;function b9e(t,n){if(1&t){const o=Ce();p(0,"div",4),Y("click",function(i){return oe(o),re(_().emitDisabledClick(i))}),m()}}function C9e(t,n){1&t&&B(0,"spinner-loader",5)}const y9e=(t,n)=>[t,n],S9e=["*"];let pn=(()=>{var t;class n extends n5{constructor(e){super(e),this.buttonModifier=v9e.BUTTON_TRANSPARENT,this.timeoutMs=this.buttonDebounce,this.type="button",this.sound="click",this.bclass="",this.buttonScaleFactor=.96}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji))},t.\u0275cmp=pe({type:t,selectors:[["button-text"]],inputs:{buttonModifier:"buttonModifier",timeoutMs:"timeoutMs",disabled:"disabled",loading:"loading",flatButton:"flatButton",nativeAttr:"nativeAttr",type:"type",sound:"sound",bclass:"bclass",buttonScaleFactor:"buttonScaleFactor"},features:[Ht],ngContentSelectors:S9e,decls:6,vars:10,consts:[["click-feedback","","click-sound","",1,"bc__button",3,"ngClass","scaleFactor","sound","type","disabled","click"],["button",""],["class","button__wrapper",3,"click",4,"ngIf"],["class","bc__spinner--cmp",4,"ngIf"],[1,"button__wrapper",3,"click"],[1,"bc__spinner--cmp"]],template:function(e,i){1&e&&(Co(),p(0,"button",0,1),Y("click",function(s){return i.click(s)}),p(2,"p"),yo(3),m(),U(4,b9e,1,0,"div",2)(5,C9e,1,0,"spinner-loader",3),m()),2&e&&(l("ngClass",cn(7,y9e,"bc__button--text-"+i.buttonModifier,i.bclass))("scaleFactor",i.buttonScaleFactor)("sound",i.sound)("type",i.type)("disabled",i.disabled||i.loading),d(4),l("ngIf",i.disabled),d(),l("ngIf",i.loading))},dependencies:[Xe,Ne,po,Fd,vc],styles:["[_nghost-%COMP%]{min-width:4rem;height:4rem;min-height:3rem;display:block;margin:0 auto}@media only screen and (max-width: 768px){[_nghost-%COMP%]{height:3.5rem}}.button__wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}"],changeDetection:0}),n})(),Iae=(()=>{var t;class n{constructor(e,i){this.http=e,this.transformUrlPipe=i,this.cache={},this.requests={}}loadIcon(e){const i=this.cache[e];return i?Xn(this.createUniqueIdsSvg(i)):this.requestIcon(e).pipe(jn(r=>this.createSvg(r)),Da(r=>(this.cache[e]=r,r)))}requestIcon(e){const i=this.requests[e];if(i)return i;const r=this.http.request("GET",this.transformUrlPipe.transform(e),{responseType:"text"}).pipe(g_(()=>delete this.requests[e]),rne());return this.requests[e]=r,r}createUniqueIdsSvg(e){e.removeAttribute("id");const i=e.cloneNode(!0),s=(0,ie.uuidV4)();return i.innerHTML=i.innerHTML.replace(/url\("?#([a-zA-Z][\w:.-]*)"?\)/g,(a,c)=>"url(#".concat(c+s,")")),i.querySelectorAll("[id]").forEach(a=>{a.setAttribute("id",a.id+s)}),i.querySelectorAll("[*|href]").forEach(a=>{a.setAttribute("href",a.getAttributeNS("http://www.w3.org/1999/xlink","href")+s),a.setAttribute("xlink:href",a.getAttributeNS("http://www.w3.org/1999/xlink","href")+s)}),i}createSvg(e){const i=document.createElement("div");i.innerHTML=e;const r=i.querySelector("svg");return r.style.display="block",this.createUniqueIdsSvg(r)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(uo))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Dn=(()=>{var t;class n{constructor(e,i){this.iconService=e,this.elRef=i}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}ngOnChanges(e){var i;e.icon.currentValue!==e.icon.previousValue&&(null===(i=this.subscription)||void 0===i||i.unsubscribe(),this.subscription=this.iconService.loadIcon(this.icon).subscribe(r=>{this.elRef.nativeElement.innerHTML="",r.style.minWidth="100%",r.style.maxWidth="100%",this.elRef.nativeElement.appendChild(r)},r=>console.log(r)))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Iae),g($t))},t.\u0275cmp=pe({type:t,selectors:[["icon-component"]],inputs:{icon:"icon"},features:[it],decls:0,vars:0,template:function(e,i){},styles:["[_nghost-%COMP%]{width:1em;vertical-align:middle;fill:currentColor;display:inline-block}\n\n/*# sourceMappingURL=icon.component.ts-angular-inline--4.css.map*/"],changeDetection:0}),n})();var Mae=ve.EButtonTypes,w9e=ve.EButtonModifier;function T9e(t,n){1&t&&B(0,"icon-component",6),2&t&&l("icon",_().icon.name)}function P9e(t,n){if(1&t&&(B(0,"img",7),V(1,"transformUrl")),2&t){const o=_();l("src",$(1,1,null==o.image?null:o.image.url),Wn)}}function I9e(t,n){if(1&t){const o=Ce();p(0,"div",8),Y("click",function(i){return oe(o),re(_().emitDisabledClick(i))}),m()}}function M9e(t,n){1&t&&B(0,"spinner-loader",9)}const O9e=(t,n)=>[t,n];let ei=(()=>{var t;class n extends n5{constructor(e){super(e),this.buttonModifier=w9e.BUTTON_TRANSPARENT,this.timeoutMs=this.buttonDebounce,this.type="button",this.sound="click",this.bclass="",this.buttonType=Mae.BUTTON_ICON,this.iconTypeClass=""}ngOnInit(){super.ngOnInit(),this.image&&(this.buttonType=Mae.BUTTON_IMAGE),this.rounded&&this.renderer2.setStyle(this.button.nativeElement,"border-radius","50%"),this.icon&&this.setIconTypeClass(this.icon)}setIconTypeClass(e){let i;switch(this.icon.name){case ve.EIcons.CHIP:i="chip";break;case ve.EIcons.CROWN:i="vip";break;default:i=""}this.iconTypeClass=i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji))},t.\u0275cmp=pe({type:t,selectors:[["button-icon"]],inputs:{icon:"icon",image:"image",rounded:"rounded",buttonModifier:"buttonModifier",timeoutMs:"timeoutMs",disabled:"disabled",loading:"loading",flatButton:"flatButton",nativeAttr:"nativeAttr",type:"type",sound:"sound",bclass:"bclass"},features:[Ht],decls:6,vars:12,consts:[["click-sound","","click-feedback","",1,"bc__button",3,"ngClass","sound","scaleFactor","type","disabled","click"],["button",""],["class","bc__icon--cmp",3,"icon",4,"ngIf"],[3,"src",4,"ngIf"],["class","button__wrapper",3,"click",4,"ngIf"],["class","bc__spinner--cmp",4,"ngIf"],[1,"bc__icon--cmp",3,"icon"],[3,"src"],[1,"button__wrapper",3,"click"],[1,"bc__spinner--cmp"]],template:function(e,i){1&e&&(p(0,"button",0,1),Y("click",function(s){return i.click(s)}),U(2,T9e,1,1,"icon-component",2)(3,P9e,2,3,"img",3)(4,I9e,1,0,"div",4)(5,M9e,1,0,"spinner-loader",5),m()),2&e&&(l("ngClass",cn(9,O9e,"bc__"+i.buttonType+"-"+i.buttonModifier,i.bclass))("sound",i.sound)("scaleFactor",.96)("type",i.type)("disabled",i.disabled||i.loading),d(2),l("ngIf",null==i.icon?null:i.icon.name),d(),l("ngIf",null==i.image?null:i.image.url),d(),l("ngIf",i.disabled),d(),l("ngIf",i.loading))},dependencies:[Xe,Ne,po,Fd,Dn,vc,uo],styles:["[_nghost-%COMP%]{min-width:4rem;height:4rem;min-height:3rem;display:block;margin:0 auto;font-size:2rem}@media only screen and (max-width: 480px){[_nghost-%COMP%]{min-width:3.5rem}}@media only screen and (max-width: 768px){[_nghost-%COMP%]{height:3.5rem}}.bc__icon--cmp[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);min-width:1em;z-index:1}.button__wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}"],changeDetection:0}),n})();var E9e=ve.EIcons,x9e=ve.EButtonModifier;const A9e=t=>({name:t});let Ud=(()=>{var t;class n extends n5{constructor(e){super(e),this.iconNames=E9e,this.buttonModifier=x9e.BUTTON_TRANSPARENT,this.timeoutMs=this.buttonDebounce,this.type="button",this.sound="click",this.bclass=""}closeClick(e){this.click(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji))},t.\u0275cmp=pe({type:t,selectors:[["button-close"]],inputs:{buttonModifier:"buttonModifier",timeoutMs:"timeoutMs",disabled:"disabled",loading:"loading",flatButton:"flatButton",nativeAttr:"nativeAttr",type:"type",sound:"sound",bclass:"bclass"},features:[Ht],decls:1,vars:12,consts:[["data-cy","closeButton",1,"button-close__button",3,"icon","buttonModifier","type","sound","nativeAttr","flatButton","timeoutMs","bclass","disabled","loading","onClick"]],template:function(e,i){1&e&&(p(0,"button-icon",0),Y("onClick",function(s){return i.closeClick(s)}),m()),2&e&&l("icon",ne(10,A9e,i.iconNames.CLOSE))("buttonModifier",i.buttonModifier)("type",i.type)("sound",i.sound)("nativeAttr",i.nativeAttr)("flatButton",i.flatButton)("timeoutMs",i.timeoutMs)("bclass",i.bclass)("disabled",i.disabled)("loading",i.loading)},dependencies:[ei],styles:["[_nghost-%COMP%]{min-width:4rem;height:4rem;min-height:3rem;display:block;margin:0 auto;font-size:3rem}@media only screen and (max-width: 480px){[_nghost-%COMP%]{min-width:3.5rem}}@media only screen and (max-width: 768px){[_nghost-%COMP%]{height:3.5rem}}"],changeDetection:0}),n})();var R9e=ve.EIcons;const k9e=t=>({name:t});let i5=(()=>{var t;class n{constructor(){this.bclass="",this.onClick=new ke,this.iconNames=R9e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["button-close-round"]],inputs:{bclass:"bclass"},outputs:{onClick:"onClick"},decls:2,vars:6,consts:[[1,"bcr__button--close",3,"icon","onClick"]],template:function(e,i){1&e&&(p(0,"div")(1,"button-icon",0),Y("onClick",function(){return i.onClick.emit()}),m()()),2&e&&(ni("bcr__container--close ",i.bclass,""),d(),l("icon",ne(4,k9e,i.iconNames.CLOSE_ROUND)))},dependencies:[ei],styles:[".bcr__container--close[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border-radius:50%;position:absolute;right:1rem;top:1rem;height:4rem;width:4rem;z-index:1}.bcr__button--close[_ngcontent-%COMP%]{font-size:3rem!important}"]}),n})();var Oae=ve.EIcons;function L9e(t,n){1&t&&B(0,"div",8)}function D9e(t,n){if(1&t){const o=Ce();p(0,"button-close",9),Y("onClick",function(i){return oe(o),re(_().closeButtonHandler(i))}),m()}2&t&&(SS("id","title-bar-close-button#",_().popupId,""),l("bclass","title-bar-close-button__bclass"))}function B9e(t,n){if(1&t){const o=Ce();p(0,"button-close",10),Y("onClick",function(i){return oe(o),re(_().closeButtonHandler(i))}),m()}2&t&&l("bclass","title-bar-close-button__bclass")}function N9e(t,n){if(1&t){const o=Ce();p(0,"button-close-round",11),Y("onClick",function(i){return oe(o),re(_().closeButtonHandler(i))}),m()}}function F9e(t,n){if(1&t){const o=Ce();p(0,"button-icon",12),Y("onClick",function(i){return oe(o),re(_().leftButtonActionHandler(i))}),m()}if(2&t){const o=_();ni("popup-title-bar__container--",o.leftButtonOptions.type," container__button--close"),l("icon",o.leftButtonIcon)}}function U9e(t,n){if(1&t&&(p(0,"p",13),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se(yt(2,1,o.text.key,o.text.params))}}function G9e(t,n){1&t&&yo(0,0,["*ngIf","popupTitleType === titleTypes.Dynamic"])}const V9e=["*"];let Ji=(()=>{var t;class n{constructor(e,i){this.customComponentCssClass="",this.popupTitleType=li.Logo,this.hideCloseButton=!1,this.titleTypes=li,this.iconNames=Oae,this.navigation=e,this.cdr=i,i.detach(),this.buttonCloseClicked=new ke}ngOnInit(){this.changeButtonOptions(),this.cdr.detectChanges()}ngOnChanges(e){e.leftButtonOptions&&this.changeButtonOptions(),this.cdr.detectChanges()}changeButtonOptions(){this.leftButtonOptions&&this.leftButtonOptions.type===QS.BackButton&&(this.leftButtonIcon={name:Oae.ARROW_BACK})}closeButtonHandler(e){this.buttonCloseClicked.emit(e)}leftButtonActionHandler(e){this.leftButtonOptions.action?this.leftButtonOptions.action():this.leftButtonOptions.type&&this.navigation.navigateBack(Fn)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Yt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["popup-title-bar"]],inputs:{popupId:"popupId",text:"text",customComponentCssClass:"customComponentCssClass",popupTitleType:"popupTitleType",hideCloseButton:"hideCloseButton",leftButtonOptions:"leftButtonOptions",inlineStyles:"inlineStyles"},outputs:{buttonCloseClicked:"buttonCloseClicked"},features:[it],ngContentSelectors:V9e,decls:8,vars:11,consts:[[3,"ngStyle"],["class","popup-title-bar__image--game-title",4,"ngIf"],["class","popup-title-bar__container--close container__button--close","activeCmp","",3,"id","bclass","onClick",4,"ngIf"],["class","popup-title-bar__container--close container__button--close","id","title-bar-close-button",3,"bclass","onClick",4,"ngIf"],["class","popup-title-bar__container--close-redesign","data-cy","popupCloseButton",3,"onClick",4,"ngIf"],["id","back","data-cy","popupBackButton",3,"class","icon","onClick",4,"ngIf"],["class","popup-title-bar__text--static-title","data-cy","popupTitle",4,"ngIf"],[4,"ngIf"],[1,"popup-title-bar__image--game-title"],["activeCmp","",1,"popup-title-bar__container--close","container__button--close",3,"id","bclass","onClick"],["id","title-bar-close-button",1,"popup-title-bar__container--close","container__button--close",3,"bclass","onClick"],["data-cy","popupCloseButton",1,"popup-title-bar__container--close-redesign",3,"onClick"],["id","back","data-cy","popupBackButton",3,"icon","onClick"],["data-cy","popupTitle",1,"popup-title-bar__text--static-title"]],template:function(e,i){1&e&&(Co(),p(0,"div",0),U(1,L9e,1,0,"div",1)(2,D9e,1,2,"button-close",2)(3,B9e,1,1,"button-close",3)(4,N9e,1,0,"button-close-round",4)(5,F9e,1,4,"button-icon",5)(6,U9e,3,4,"p",6)(7,G9e,1,0,"ng-content",7),m()),2&e&&(ni("popup-title-bar__container--game-title container__title ",i.customComponentCssClass,""),l("ngStyle",i.inlineStyles),d(),l("ngIf",i.popupTitleType===i.titleTypes.Logo),d(),l("ngIf",!i.hideCloseButton&&i.popupId),d(),l("ngIf",!i.hideCloseButton),d(),l("ngIf",!i.hideCloseButton),d(),l("ngIf",i.leftButtonOptions),d(),l("ngIf",i.popupTitleType===i.titleTypes.Static),d(),l("ngIf",i.popupTitleType===i.titleTypes.Dynamic))},dependencies:[Ne,Cm,Nm,ei,Ud,i5,qe],styles:[".popup-title-bar__container--game-title[_ngcontent-%COMP%]{height:6rem!important}.popup-title-bar__container--game-title[_ngcontent-%COMP%]   .popup-title-bar__image--game-title[_ngcontent-%COMP%]{width:30rem;height:65%}"],changeDetection:0}),n})();class Eae{constructor(n=new ie.List){this.components=n}}var o5;class xae{constructor(){this.onCmpFocusableChange=(n,o)=>{const e=this.focuses.find(i=>i.components.has(n));!0===o?e&&this.setFocus(e):this.updateFocusIfNeeded()},this.onCmpDestroy=n=>{this.removeCmp(n)},this.components=new ie.List,this.listeners=new ie.List,this.focuses=new ie.List}static getInstance(){return this.instance}addCmp(n){if(this.components.add(n),n.shouldHijackFocus){const o=new Eae(new ie.List([n]));this.focuses.add(o)}else if(this.currentFocus)this.currentFocus.components.add(n);else{const o=new Eae(new ie.List([n]));this.focuses.add(o)}this.listeners.add({cmp:n,listener:n.onDestroy(this.onCmpDestroy)}),this.listeners.add({cmp:n,listener:n.onFocusableChange(this.onCmpFocusableChange)}),this.updateFocusIfNeeded()}removeCmp(n){const o=this.focuses.find(e=>e.components.has(n));if(o){const e=o.components.remove(n);e&&this.listeners.where({cmp:e}).forEach(i=>i.listener.detach()),o.components.length||Op()(o,this.currentFocus)&&(this.focuses.remove(o),this.currentFocus=void 0,this.updateFocusIfNeeded())}}updateFocusIfNeeded(){const n=this.findGainFocus();n?this.setFocus(n):this.currentFocus=void 0}setFocus(n){this.focuses.add(this.focuses.remove(n)),this.currentFocus&&Op()(this.currentFocus,n)?this.currentFocus.components.where(o=>o.isFocusable&&!o.isOnFocus).forEach(o=>o.onFocus()):(this.currentFocus&&this.currentFocus.components.forEach(o=>o.onLostFocus()),this.currentFocus=n,n.components.forEach(o=>o.onFocus()))}findGainFocus(){return this.focuses.where(n=>void 0!==n.components.find(o=>o.isFocusable)).last()}}(o5=xae).instance=new o5;let Dh=(()=>{var t;class n{constructor(){this.focusable=!0,this.focused=!1,this.hijackFocus=!0,this.events=new tc,this.focusTrack=xae.getInstance()}setFocusable(e){this.focusable=e,this.emit("isFocusableChange",this,e)}get isFocusable(){return this.focusable}get isOnFocus(){return this.focused}get shouldHijackFocus(){return this.hijackFocus}onFocus(){this.focused=!0}onLostFocus(){this.focused=!1}onFocusableChange(e){return new ie.EventListener(this.events,"isFocusableChange",e)}onDestroy(e){return new ie.EventListener(this.events,"destroy",e)}ngOnInit(){this.focusTrack.addCmp(this)}ngOnDestroy(){this.emit("destroy",this),this.events.removeAllListeners()}emit(e,...i){this.events.emit(e,...i)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();var id=function(t){return t.Show="show",t.Hide="hide",t}(id||{}),zR=function(t){return t.Banner="banners",t.Intestitial="interstitials",t}(zR||{}),rc=function(t){return t.BonusPopup="video_bonus_popup",t.ShopChips="video_shop_chips",t.ShopGems="video_shop_gems",t.GameSummary="video_game_summary",t.MiniGame="video_mini_game",t.ProgressiveVideoBonus="video_progressive",t.DeltaBanner="video_delta_banner",t}(rc||{}),Kb=function(t){return t.GameEndInterstitial="int_game_end",t.RejectDoubleUpInterstitial="int_reject_double_up",t.BeforeClaimDailyBonusInterstitial="int_before_daily_bonus_claim",t.AfterClaimDailyBonusInterstitial="int_after_daily_bonus_claim",t.FindNewGameInterstitial="int_find_new_game",t.AfterClaimMiniGameInterstitial="int_after_mini_game_claim",t}(Kb||{}),V_=function(t){return t.NoConnection="noConnection",t.NoAdsToShow="noAdsToShow",t.VideoNotWatched="videoNotWatched",t.GenericError="genericError",t.AdServiceNotInitedError="AdServiceNotInitedError",t}(V_||{}),lI=function(t){return t.ResetState="[Ads] Reset state",t.WatchVideo="[Ads] Watch video",t.WatchVideoSuccess="[Ads] Watch video sucess",t.WatchVideoError="[Ads] Watch video error",t}(lI||{});const q9e=he(lI.ResetState),Rae=he(lI.WatchVideo,{_as:"props",_p:void 0}),kae=he(lI.WatchVideoSuccess,{_as:"props",_p:void 0}),Lae=he(lI.WatchVideoError,{_as:"props",_p:void 0});class Bp extends Error{constructor(){super(),this.name="NoAdsError"}}class Np extends Error{constructor(){super(),this.name="VideoNotWatchedError"}}class W9e extends Error{constructor(){super(),this.name="RewardedVideoNotInitedError"}}class Fp extends Error{constructor(){super(),this.name="AdServiceNotInitedError"}}class zm extends Error{constructor(){super(),this.name="VideoNotWatchRejectError"}}let $9e=(()=>{var t;class n{constructor(e){this.appService=e}isAdapterActive(){return!0}isRewardedVideoReady(e){return new Promise((i,r)=>{this.appService.getMobileAppService().admob({action:wi.EAdmobAction.IsRewardedVideoReady,args:{id:e}},s=>i(!(null==s||!s.ready)),s=>{console.error("Rewarded video ready error",s,e),r(s)})})}showRewardedVideo(e){return new Promise((i,r)=>{const s=a=>{switch(a){case V_.NoConnection:return r(new lt.NetworkError);case V_.VideoNotWatched:return r(new Np);case V_.NoAdsToShow:return r(new Bp);default:return r(new Error("Error watching video "+e.containerId))}};this.appService.getMobileAppService().admob({action:wi.EAdmobAction.ShowRewardedVideo,args:{id:e.containerId}},a=>{console.log("Video closed native result: ",a),a.reward?i():s(V_.VideoNotWatched)},a=>{console.log(a),s(a)})})}showInterstitial(e){return new Promise((i,r)=>{this.appService.getMobileAppService().admob({action:wi.EAdmobAction.ShowInterstitial,args:{tag:e.tag}},s=>{i(),console.warn("OK admob Interstitial, callback response:",s)},s=>{switch(s){case V_.NoConnection:return r(new lt.NetworkError);case V_.VideoNotWatched:return r(new Np);case V_.NoAdsToShow:return r(new Bp);default:return r(new Error("Error watching interstitial"))}})})}toggleBanner(e){return new Promise(i=>{this.appService.getMobileAppService().admob({action:e===id.Show?wi.EAdmobAction.ShowBanner:wi.EAdmobAction.HideBanner},r=>(console.warn("OK admob Banner, callback response:",r),i(!0)),r=>(console.warn("Failed admob Banner, error callback response:",r),i(!1)))})}isRewardedVideoEnabled(){return!0}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var uI=function(t){return t.BottomRail="bottom_rail",t.RewardedVideo="rewarded_ad_video",t}(uI||{}),z_=function(t){return t.GrvRewardedSlotReady="grvRewardedSlotReady",t.RvDestroyUnitEvent="rvDestroyUnitEvent",t.VideoRewardGranted="videoRewardGranted",t.VideoRewardModalClosed="videoRewardModalClosed",t}(z_||{});let Z9e=(()=>{var t;let n=(t=class{constructor(e,i,r,s,a){this.googleAnalyticsService=e,this.clientConfigService=i,this.urlService=r,this.translatePipe=s,this.router=a,this.isInited=new Qn(!1),this.hasInitFailed=!1,this.confirmPopupButtonClickSubject=new sn,this.googleNavigateUrl="goog_rewarded",this.playwireInitTimeoutSecondsAmount=20,this.handleConfirmPopupButtonClick=()=>{this.confirmPopupButtonClickSubject.next(),document.getElementById("ctaWatchAdButton").removeEventListener("click",this.handleConfirmPopupButtonClick),document.getElementById("ctaCloseButton").removeEventListener("click",this.handleConfirmPopupButtonClick)}}isAdapterActive(){return this.clientConfigService.getConfig().content.ads.playwire.enabled&&!Tb.isFacebookCanvas}isRewardedVideoReady(e){return Promise.resolve(this.rewardedVideoReady)}isRewardedVideoEnabled(){return this.clientConfigService.getConfig().content.ads.playwire.rewardedVideoEnabled}showRewardedVideo(e){var i=this;return this.isRewardedVideoEnabled()?(this.isInited.getValue()||this.hasInitFailed)&&window.ramp&&window.ramp.getUnits?new Promise((r,s)=>{window.ramp.que.push(f(function*(){yield i.showVideo(e).then(()=>r()).catch(a=>s(a))}))}):Promise.reject(new Fp):Promise.resolve()}showInterstitial(){return console.warn("not implemented"),Promise.resolve()}toggleBanner(e){var i=this;return new Promise(function(){var r=f(function*(s,a){if(!i.isInited.getValue()){const c=setTimeout(()=>a(new Fp),15e3);yield i.isInited.pipe(bt(u=>u)).toPromise(),clearTimeout(c)}window.ramp.que.push(()=>{f_(()=>i.toggleBannerAction(e)).pipe(function z9e(t=1/0){let n;n=t&&"object"==typeof t?t:{count:t};const{count:o=1/0,delay:e,resetOnSuccess:i=!1}=n;return o<=0?ka:vr((r,s)=>{let c,a=0;const u=()=>{let h=!1;c=r.subscribe(eo(s,b=>{i&&(a=0),s.next(b)},void 0,b=>{if(a++<o){const w=()=>{c?(c.unsubscribe(),c=null,u()):h=!0};if(null!=e){const R="number"==typeof e?_u(e):Qc(e(b,a)),G=eo(s,()=>{G.unsubscribe(),w()},()=>{s.complete()});R.subscribe(G)}else w()}else s.error(b)})),h&&(c.unsubscribe(),c=null,u())};u()})}({count:5,delay:1e3}),mh(c=>(a(c),Xn({error:c})))).subscribe(()=>s(e===id.Show))})});return function(s,a){return r.apply(this,arguments)}}())}toggleBannerAction(e){return f(function*(){if(e===id.Show){if(!window.ramp||!window.ramp.getUnits)throw new Fp;if(window.ramp.getUnits().find(s=>s.includes(uI.BottomRail)))return;yield window.ramp.addUnits([{type:uI.BottomRail}]),yield window.ramp.displayUnits()}else{if(!window.ramp.getUnits)return;const r=window.ramp.getUnits().find(s=>s.includes(uI.BottomRail));r&&window.ramp.destroyUnits(r)}})()}showVideo(e){var i=this;return new Promise(function(){var r=f(function*(s,a){if(!window.ramp.getUnits().find(G=>G===uI.RewardedVideo))return i.initUnits(),a(new W9e);let c;i.rewardedVideoReady||a(new Bp);const u=()=>{c=!0},h=()=>{c||a(new Np)};window.addEventListener(z_.VideoRewardGranted,u),window.addEventListener(z_.VideoRewardModalClosed,h);const b=window.ramp.showRewardedVideoActionModal(i.getConfirmPopupConfig()).catch(G=>{console.warn("rewarded video watched:",G),a(new zm)}),w=new Promise(G=>{document.getElementById("ctaWatchAdButton")&&(document.getElementById("ctaWatchAdButton").innerHTML=i.translatePipe.transform("FREE_REWARDS.CONFIRM_WATCH_REWARDED_VIDEO_POPUP.WATCH_BUTTON"),document.getElementById("ctaWatchAdButton").addEventListener("click",i.handleConfirmPopupButtonClick)),document.getElementById("ctaCloseButton")&&(document.getElementById("ctaCloseButton").innerHTML=i.translatePipe.transform("FREE_REWARDS.CONFIRM_WATCH_REWARDED_VIDEO_POPUP.CANCEL_BUTTON"),document.getElementById("ctaCloseButton").addEventListener("click",i.handleConfirmPopupButtonClick),i.router.events.pipe(wn(i.confirmPopupButtonClickSubject)).subscribe(K=>{K instanceof as&&document.getElementById("ctaCloseButton")&&document.getElementById("ctaCloseButton").click()})),G()});yield Promise.all([b,w]),window.ramp.showRewardedVideoConfirmationModal(i.getGrantedPopupConfig(e.isRewardMiniGame));const R=()=>{i.rewardedVideoReady=!1,window.removeEventListener(z_.VideoRewardGranted,u),window.removeEventListener(z_.VideoRewardModalClosed,h),window.removeEventListener(z_.RvDestroyUnitEvent,R),s()};window.addEventListener(z_.RvDestroyUnitEvent,R)});return function(s,a){return r.apply(this,arguments)}}())}initUnits(){var e=this;return f(function*(){try{yield e.toggleBannerAction(id.Show),yield e.toggleBannerAction(id.Hide)}catch(i){console.warn(i)}})()}init(){var e=this;return f(function*(){try{if(e.isInited.getValue()||!e.isAdapterActive())return;yield e.googleAnalyticsService.initialized,window.ramp={que:[],passiveMode:!0},e.router.events.subscribe(a=>{a instanceof fh&&a.url.includes(e.googleNavigateUrl)&&e.router.navigateByUrl(e.router.routerState.snapshot.url,{replaceUrl:!0})});const i=e.clientConfigService.getConfig().content.ads.playwire.scriptUrl;window._pwGA4PageviewId="".concat(Date.now().toString()),window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const r=e.clientConfigService.getConfig().core.tracking.google4.trackingId;window.gtag("config",r,{send_page_view:!1}),window.gtag("event","ramp_js",{send_to:r,pageview_id:window._pwGA4PageviewId}),window.addEventListener(z_.GrvRewardedSlotReady,()=>{console.log("GrvRewardedSlotReady"),e.rewardedVideoReady=!0});const s=setTimeout(()=>{e.hasInitFailed=!0},1e3*e.playwireInitTimeoutSecondsAmount);window.ramp.onReady=()=>{e.hasInitFailed=!1,e.isInited.next(!0),clearTimeout(s),e.initUnits().then(()=>{e.isInited.complete()})},yield Th.loadScript(i,!0,!1)}catch(i){e.hasInitFailed=!0,console.warn("Ramp init fail",i)}})()}getConfirmPopupConfig(){return{title:this.translatePipe.transform("FREE_REWARDS.CONFIRM_WATCH_REWARDED_VIDEO_POPUP.TITLE"),subText:this.translatePipe.transform("FREE_REWARDS.CONFIRM_WATCH_REWARDED_VIDEO_POPUP.DESCRIPTION"),confirmationButtonText:this.translatePipe.transform("FREE_REWARDS.CONFIRM_WATCH_REWARDED_VIDEO_POPUP.WATCH_BUTTON"),cancelButtonText:this.translatePipe.transform("FREE_REWARDS.CONFIRM_WATCH_REWARDED_VIDEO_POPUP.CANCEL_BUTTON"),backgroundOverlay:!0,backgroundColor:"000000cc",confirmButtonColor:"#00a035",closeButtonColor:"#aa1d22",subTextColor:"black",confirmButtonTextColor:"white",closeButtonTextColor:"white",titleColor:"black",logoSrc:this.urlService.getImageUrl("game-host/host.png")}}getGrantedPopupConfig(e){const r=e?"FREE_REWARDS.GRANTED_REWARDED_VIDEO_POPUP.DESCRIPTION_MINI_GAME":"FREE_REWARDS.GRANTED_REWARDED_VIDEO_POPUP.DESCRIPTION";return{title:this.translatePipe.transform(e?"FREE_REWARDS.GRANTED_REWARDED_VIDEO_POPUP.TITLE_MINI_GAME":"FREE_REWARDS.GRANTED_REWARDED_VIDEO_POPUP.TITLE"),subTitle:this.translatePipe.transform(r),closeButtonText:this.translatePipe.transform("FREE_REWARDS.GRANTED_REWARDED_VIDEO_POPUP.BUTTON"),backgroundOverlay:!0,backgroundColor:"000000cc",subTitleTextColor:"black",buttonTextColor:"white",buttonColor:"#00a035",titleColor:"black",logoSrc:this.urlService.getImageUrl("game-host/host.png")}}},t.\u0275fac=function(e){return new(e||t)(T(G_),T(Zt),T(ii),T(qe),T(on))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([function(t,n,o){let e;const i=o.value;return o.value=function(...r){return e||(e=i.apply(this,r),e.finally(()=>e=void 0)),e},o},ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Promise)],n.prototype,"showInterstitial",null),Qe([function(t,n,o){let e;const i=o.value;return o.value=function(...r){return e||(e=i.apply(this,r),e.finally(()=>e=void 0)),e},o},ue("design:type",Function),ue("design:paramtypes",[Object]),ue("design:returntype",Promise)],n.prototype,"showVideo",null),Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Promise)],n.prototype,"init",null),n=Qe([Wo(),ue("design:paramtypes",[$G,Zt,ii,qe,on])],n),n})();const Q9e=new Ot("IAdsAdapterService",{factory:()=>{const t=mt(Qt);return t.isMobileApp()?new $9e(t):new Z9e(mt(ng),mt(Zt),mt(ii),mt(qe),mt(on))}});let Dae=(()=>{var t;class n{constructor(e,i,r,s){this.adsAdapter=e,this.store=i,this.clientConfig=r,this.analyticsTrackingService=s}hasActiveAdsAdapter(){return this.adsAdapter.isAdapterActive()}isRewardedVideoReady(e,i=5e3){return new Promise((r,s)=>{if(!this.hasActiveAdsAdapter())return r(!1);const a=setTimeout(()=>r(!1),i);this.adsAdapter.isRewardedVideoReady(e).then(c=>{clearTimeout(a),r(c)}).catch(c=>{clearTimeout(a),s(c)})})}showRewardedVideo(e){var i=this;return f(function*(){try{i.store.dispatch(Rae({id:e.containerId})),yield i.adsAdapter.showRewardedVideo(e),i.store.dispatch(kae({id:e.containerId})),i.analyticsTrackingService.sendEvent(new Ub.DefaultEvent(Nn.Ads,wi.EEventAction.RewardedVideoWatched))}catch(r){throw i.store.dispatch(Lae({id:e.containerId})),r}})()}toggleBanner(e){return this.areRequirementsMet(zR.Banner)||e!==id.Show?this.adsAdapter.toggleBanner(e):Promise.resolve(!1)}showInterstitial(e){return this.areRequirementsMet(zR.Intestitial,e)?this.adsAdapter.showInterstitial(e):Promise.resolve()}areRequirementsMet(e,i){const r=this.store.selectSimpleProfile();if(!r)return!1;const s=this.clientConfig.getConfig().content.ads[e],a=s.requirements.level;let c=!1;if(r.hasTierOrHigher(Fi.Premium)&&(c=s.exclude.membership.filter(R=>R.id===Dc.EMembershipType.Vip&&r.vip.hasTierOrHigher(R.tier)).length>0),c||!(r.level>=a))return!1;let b=!0,w=!0;return null!=i&&i.miniGame&&(b=!!(s.requirements.miniGames||[]).find(G=>G===i.miniGame)),null!=i&&i.roomType&&(w=!!(s.requirements.roomTypes||[]).find(G=>G===i.roomType)),b&&w}isRewardedVideoEnabled(){return this.adsAdapter.isRewardedVideoEnabled()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Q9e),T(J),T(Zt),T(yi))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const jR=ki({selectId:t=>t.id,sortComparer:!1}),Bae={rewardedVideos:jR.getInitialState()},Y9e=Sr(Bae,de(q9e,()=>Bae),de(Rae,(t,n)=>({...t,rewardedVideos:jR.upsertOne({id:n.id},t.rewardedVideos)})),de(kae,Lae,(t,n)=>({...t,rewardedVideos:jR.removeOne(n.id,t.rewardedVideos)})));function J9e(t,n){return Y9e(t,n)}const e$e=We(Ts("ads"),t=>t.rewardedVideos),t$e=jR.getSelectors(e$e),Nae=()=>We(t$e.selectEntities,(t,n)=>t[n]);J.prototype.ads={selectRewardedVideo:function n$e(t){return this.selectSync(Nae(),t.id)}.bind(J.prototype),subscribeRewardedVideo:function i$e(t){return this.select(Nae(),t.id)}.bind(J.prototype)};let o$e=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[Dae],imports:[bu,$r.forFeature("ads",J9e)]}),n})();class HR{static isInstantReward(n){return n&&n.reward&&!n.gameType&&!n.gameId&&!n.gameMode}static isFreeRewardedGame(n){return!!(n&&n.gameId&&n.gameType&&n.gameMode&&n.reward&&n.rewards)}}var Zb;let Bh=((Zb=class{constructor(){this.queue=new is.List}queueItem(n){this.queue.add(n),this.current||this.showNext()}clearQueue(){var n,o;this.queue=new is.List,null===(n=this.currentIsReady)||void 0===n||n.unsubscribe(),null===(o=this.current)||void 0===o||o.onDestroy(),this.current=void 0}showNext(){const n=this.queue.removeAt(0);this.current=n,n&&(this.currentIsReady=n.ready.pipe($u()).subscribe(()=>{n.onDestroy(),this.showNext()}),n.execute())}onLogout(){this.clearQueue()}}).\u0275fac=function(n){return new(n||Zb)},Zb.\u0275prov=be({token:Zb,factory:Zb.\u0275fac}),Zb);Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],Bh.prototype,"onLogout",null),Bh=Qe([Wo()],Bh);class Lw{constructor(){this.ready$=new sn}get ready(){return this.ready$.asObservable()}execute(){this.complete()}complete(){this.ready$.next()}onDestroy(){}}var Dw=__webpack_require__(92873),r$e=__webpack_require__.n(Dw);const j_=new Ot("PixiLoader",{providedIn:"root",factory:()=>new PixiClient.loaders.Loader("assets/images/")});class s$e{constructor(n,o){this.id=n,this.app=o,this.onDestroy=new ke,this.isActive=!1,this.canvas=this.app.view}destroy(){this.isActive&&this.onDestroy.emit()}}let Bw=(()=>{var t;class n{constructor(e){this.document=e,this.appsPool=new ie.List}getApp(e){let i=this.appsPool.find(r=>r.app.renderer.width===e.width&&r.app.renderer.height===e.height);if(i)this.resetStyles(i.canvas),this.appsPool.remove(i);else if(this.appsPool.length>0)i=this.appsPool.removeAt(0),this.resetStyles(i.canvas),i.app.renderer.clear(),i.app.renderer.resize(e.width,e.height);else{const r=Dw(JSON.stringify(e)).toString(),s=this.createApp(e);i=new s$e(r,s),i.onDestroy.subscribe(()=>{i.isActive=!1,i.app.stage.children.forEach(a=>i.app.stage.removeChild(a)),this.appsPool.add(i)})}return i.isActive=!0,i.app.ticker.start(),i}createApp(e){let i=this.document.createElement("canvas");return new PixiClient.Application({view:i,height:e.height,width:e.width,sharedTicker:e.sharedTicker,transparent:e.transparent})}prePopulatePool(e,i){const r=[];for(let s=0;s<e;s++)r.push(this.getApp(i));r.forEach(s=>s.destroy())}resetStyles(e){e.style.width="auto",e.style.height="auto",e.className=""}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),qR=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.pixiAppFactory=e,this.ngZone=i,this.armatureNameAttr=r,this.pixiLoader=s,this.host=a,this.renderer=c,this.onAnimationLoad=new ke}ngOnInit(){requestAnimationFrame(()=>{this.ngZone.runOutsideAngular(()=>{this.armatureNameAttr&&(this.armatureName=this.armatureNameAttr),this.createPixiApp(),this.animationLoadAnimFrame=requestAnimationFrame(()=>{this.onAnimationLoad.emit(),this.onAnimationLoad.complete()})})})}ngOnChanges(e){this.pixiApp&&e.pause&&!0===e.pause.currentValue&&!1===e.pause.previousValue&&this.pixiApp.ticker.stop(),this.pixiApp&&e.pause&&!1===e.pause.currentValue&&!0===e.pause.previousValue&&this.pixiApp.ticker.start()}ngOnDestroy(){this.armature&&this.armature.dispose(),this.pixiApp&&this.pixiApp.renderer.clear(),this.pixiAppRef&&this.pixiAppRef.destroy(),cancelAnimationFrame(this.animationLoadAnimFrame)}playAnimation(e,i=!0){if(this.armature)return i?(this.currentAnimationState=this.armature.animation.play(e,1),this.currentAnimationState):(this.currentAnimationState=this.armature.animation.play(e),this.currentAnimationState);throw"No armature"}createPixiApp(){this.pixiAppRef=this.pixiAppFactory.getApp({height:this.height,width:this.width,sharedTicker:!0,transparent:!0}),this.renderer.insertBefore(this.host.nativeElement,this.pixiAppRef.canvas,this.host.nativeElement.childNodes[0]),this.renderer.setStyle(this.pixiAppRef.canvas,"width","100%"),this.renderer.setStyle(this.pixiAppRef.canvas,"pointerEvents","none"),this.pixiApp=this.pixiAppRef.app,this.armature=this.createArmature(this.armatureName)}createArmature(e){const r=dragonBones.PixiFactory.factory.buildArmatureDisplay(e,this.armatureName).armature;return r.display.x=this.width/2,r.display.y=this.height/2,r.display.interactive=!1,this.pixiApp.stage.addChild(r.display),r}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Bw),g(an),Wv("armatureName"),g(j_),g($t),g(ji))},t.\u0275cmp=pe({type:t,selectors:[["dragonbones"]],inputs:{height:"height",width:"width",pause:"pause"},outputs:{onAnimationLoad:"onAnimationLoad"},features:[it],decls:0,vars:0,template:function(e,i){},styles:["[_nghost-%COMP%]{height:100%;width:100%}canvas[_ngcontent-%COMP%]{height:100%;touch-action:manipulation!important}"],changeDetection:0}),n})(),a$e=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();class c$e{constructor(n){this.skeJson="".concat(n,"_ske.json"),this.texJson="".concat(n,"_tex.json"),this.texPng="".concat(n,"_tex.png")}}const Fae=new Ot("CUSTOM_MINI_GAMES"),r5=new Ot("MiniGameWrapperElementFactory");var jm=function(t){return t.Claim="claim",t.Close="close",t.GameLoadError="gameLoadError",t}(jm||{});class l$e{constructor(n,o,e,i,r,s,a){this._containerId=n,this._basePath=o,this._localizationsEndpoint=e,this._gameMode=i,this._reward=r,this._rewards=s,this._settings=new u$e(a),this._eventDispatcher=new tc}get settings(){return this._settings}get containerId(){return this._containerId}get basePath(){return this._basePath}get localizationsEndpoint(){return this._localizationsEndpoint}get gameMode(){return this._gameMode}get reward(){return this._reward.chips}get rewards(){return this._rewards}get eventDispatcher(){return this._eventDispatcher}gameLoadError(){return this._eventDispatcher.dispatchEvent(new ew(jm.GameLoadError))}claim(){return this._eventDispatcher.dispatchEvent(new ew(jm.Claim))}close(){return this._eventDispatcher.dispatchEvent(new ew(jm.Close))}destroy(){this._containerId=null,this._reward=null,this._eventDispatcher=null,this._settings.destroy()}}class u$e{constructor(n){this._settingsService=n}get language(){return this._settingsService.getLanguage()}get sound(){return this._settingsService.getInGameMusic()}get lowQualityGraphics(){return this._settingsService.getLowQualityGraphics()}get forceCanvas(){return this._settingsService.getForceCanvas()}destroy(){this._settingsService=null}}class Hm{static parseReward(n){const o={chips:0,gems:0};if(Hm.isItem(n))o.chips=n.amount;else{const e=n.items?n.items[0]:void 0;if(e)switch(e.type){case Fe.TG.ChipPack:return{chips:e.amount,gems:0};case Fe.TG.GemsPack:return{chips:0,gems:e.amount};default:return console.log("Unsupported reward"),{chips:0,gems:0}}else o.chips=n.chips,o.gems=n.gems}return o}static adaptGameInfo(n){return Hm.isRewardedGameInfo(n)?{id:n.gameId,gameMode:n.gameMode,gameType:n.gameType,type:nP.Phaser,rewards:n.rewards.map(o=>Hm.parseReward(o)),reward:n.reward?Hm.parseReward(n.reward):void 0}:{id:n.id,gameMode:n.gameMode,gameType:n.gameType,type:nP.Phaser,rewards:n.rewards.map(o=>Hm.parseReward(o)),reward:n.reward?Hm.parseReward(n.reward):void 0}}static isRewardedGameInfo(n){return!!n.gameId}static isItem(n){return!!n.id}}class d$e{constructor(n,o,e,i,r){this.translationService=r,this.constants=i,this.wrapperEl=n,this.settingsService=e,this.gameData=o,this.listeners=[]}load(){var n=this;return new Promise(function(){var o=f(function*(e,i){for(let r of n.gameData.config.scripts)try{yield Th.loadScript("".concat(n.gameData.config.path).concat(r))}catch(s){return i(s)}if(!Phaser)return i(new Error("Game is not loaded!"));Phaser.Device.whenReady(e)});return function(e,i){return o.apply(this,arguments)}}())}start(){this.gameClient=new l$e(this.wrapperEl.id,this.gameData.config.path,"".concat(this.constants.translationsPath,"games/").concat(this.translationService.getCurrentLang(),"/"),this.gameData.info.gameMode,Hm.parseReward(this.gameData.info.reward),this.gameData.info.rewards.map(n=>Hm.parseReward(n)),this.settingsService),this.game=UA.createGameInstance(this.gameData.config.class,this.gameClient)}onClaim(n){this.listeners.push({event:jm.Claim,listener:n}),this.gameClient.eventDispatcher.addEventListener(jm.Claim,n)}onClose(n){this.listeners.push({event:jm.Close,listener:n}),this.gameClient.eventDispatcher.addEventListener(jm.Close,n)}onLoadError(n){this.listeners.push({event:jm.GameLoadError,listener:n}),this.gameClient.eventDispatcher.addEventListener(jm.GameLoadError,n)}destroy(){this.gameClient&&(this.listeners.forEach(n=>this.gameClient.eventDispatcher.removeEventListener(n.event,n.listener)),this.listeners=[],this.gameClient.destroy()),this.game&&this.game.destroy(),delete window.Phaser,delete window.PIXI,delete window[this.gameData.config.class]}}let Uae=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.settingsService=e,this.clientConfigService=i,this.componentFactoryResolver=r,this.constants=s,this.translationService=a,this.customMiniGames=c}createMiniGame(e,i,r){const s=this.clientConfigService.getConfig();switch(i.type){case nP.Phaser:const a=s.content.games.list.find(u=>u.id===i.id);return new d$e(e,{info:i,config:a},this.settingsService,this.constants,this.translationService);case nP.Dragonbones:return this.createComponentMinigame(e,i,r)}}createComponentMinigame(e,i,r){const s=this.customMiniGames.find(b=>b.type===i.gameType);let a;if(!s)throw new Error("[MiniGameFactoryService:createComponentMinigame] No game found for gameType ".concat(i.gameType," in the provided CUSTOM_MINI_GAMES_TOKEN"));a=s.constructor;let c=this.componentFactoryResolver.resolveComponentFactory(a);const u=r.createComponent(c);e.appendChild(u.location.nativeElement),u.instance.gameData=i;let h=u.instance.destroy.bind(u.instance);return u.instance.destroy=()=>{u.destroy(),h()},u.instance}}return(t=n).\u0275fac=function(e){return new(e||t)(T(nc),T(Zt),T(nS),T(tn),T(pi),T(Fae))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),s5=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.miniGameFactoryService=e,this.settingsService=i,this.miniGameWrapperElementFactory=r,this.viewContainerRef=s,this.ngZone=a,this.cdr=c,this.onGameClosed=()=>{console.log("onGameClose"),this.ngZone.run(()=>this.onGameClose.emit())},this.onGameClaimed=()=>{console.log("onGameClaim"),this.ngZone.run(()=>this.onGameClaim.emit())},this.onGameAssetsLoadErrorHandler=()=>{console.log("onGameAssetsLoadError"),this.destroyMiniGame(),this.onGameAssetsLoadError.emit()},this.onGameLoaded=new ke,this.onGameClose=new ke,this.onGameClaim=new ke,this.onGameError=new ke,this.onGameAssetsLoadError=new ke,this.cdr.detach()}ngOnInit(){}ngOnChanges(e){e.hasOwnProperty("gameData")&&(e.gameData.previousValue&&this.miniGame&&this.destroyMiniGame(),e.gameData.currentValue&&this.openGame())}ngOnDestroy(){this.destroyMiniGame()}openGame(){var e=this;return f(function*(){e.miniGame=e.miniGameFactoryService.createMiniGame(e.miniGameWrapperElementFactory.getWrapperElement(),e.gameData,e.viewContainerRef);try{yield e.miniGame.load(),e.addErrorListener(),e.onGameLoaded.emit(),e.miniGame.start(),e.miniGame.onClaim(e.onGameClaimed),e.miniGame.onClose(e.onGameClosed),e.miniGame.onLoadError(e.onGameAssetsLoadErrorHandler),e.cdr.detectChanges()}catch(i){e.onGameError.emit(i),e.destroyMiniGame()}})()}destroyMiniGame(){this.removeErrorListener(),this.miniGameWrapperElementFactory.removeWrapperElement(),this.miniGame&&(this.miniGame.destroy(),this.miniGame=void 0)}addErrorListener(){window.addEventListener("error",this.onGameAssetsLoadErrorHandler)}removeErrorListener(){window.removeEventListener("error",this.onGameAssetsLoadErrorHandler)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Uae),g(nc),g(r5),g(bs),g(an),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["mini-game-wrapper"]],inputs:{gameData:"gameData"},outputs:{onGameLoaded:"onGameLoaded",onGameClose:"onGameClose",onGameClaim:"onGameClaim",onGameError:"onGameError",onGameAssetsLoadError:"onGameAssetsLoadError"},features:[it],decls:0,vars:0,template:function(e,i){},styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center}"]}),n})();const p$e=[{provide:M_,useExisting:nc},Uae,Zt],h$e=[a$e];let Gae=(()=>{var t;class n{constructor(){}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:p$e,imports:[h$e]}),n})();class m$e{constructor(n,o){this.wrapperEl=n.nativeElement,this.pixiLoader=o,this.loadedEmitter=new ke,this.claimEmitter=new ke,this.closeEmitter=new ke,this.loadErrorEmitter=new ke}destroy(){this.onClaimSubscription&&this.onCloseSubscription.unsubscribe()}load(){return new Promise((n,o)=>{if(Object.keys(this.assets).find(e=>this.pixiLoader.resources.hasOwnProperty(this.assets[e].skeJson)))return console.log("pixiloader already loaded"),this.loaded=!0,this.loadedEmitter.emit(),n();for(let e in this.assets)this.pixiLoader.add(this.assets[e].skeJson,this.assets[e].skeJson),this.pixiLoader.add(this.assets[e].texJson,this.assets[e].texJson),this.pixiLoader.add(this.assets[e].texPng,this.assets[e].texPng);this.pixiLoader.load(()=>{const e=dragonBones.PixiFactory.factory;for(let i in this.assets)e.parseDragonBonesData(this.pixiLoader.resources[this.assets[i].skeJson].data),e.parseTextureAtlasData(this.pixiLoader.resources[this.assets[i].texJson].data,this.pixiLoader.resources[this.assets[i].texPng].texture);console.log("pixiloader.load ready"),this.loaded=!0,this.loadedEmitter.emit(),n()}),this.pixiLoader.onError.add(e=>{console.error(e),this.loadErrorEmitter.next(),o("PixiLoadError")})})}onClaim(n){this.onClaimSubscription=this.claimEmitter.subscribe(()=>{n()})}onClose(n){this.onCloseSubscription=this.closeEmitter.subscribe(()=>{n()})}onLoadError(n){this.onLoadErrorSubscription=this.loadErrorEmitter.subscribe(()=>{n()})}start(){}}let Ia=(()=>{var t;class n{set currentContextRootContainer(e){this._currentContextRootContainer=e}constructor(e){this.appRef=e}createComponent(e,i,r=!1){return(this._currentContextRootContainer&&!r?this._currentContextRootContainer:this.getRootContainerRef()).createComponent(e,i)}addTemplate(e,i=!1){let s=(this._currentContextRootContainer&&!i?this._currentContextRootContainer:this.getRootContainerRef()).createEmbeddedView(e);return this.appRef.tick(),s}getRootContainerRef(){return this.appRef.components[0].instance.rootViewContainerRef}}return(t=n).\u0275fac=function(e){return new(e||t)(T(bp))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class a5{constructor(){this.isMet$=new sn}destroy(){}completeCondition(){this.isMet$.next(),this.isMet$.complete()}}class f$e extends a5{constructor(n){super(),this.injector=n,this.addListener()}addListener(){const n=this.injector.get(J);this.subscription=n.subscribeSimpleProfile().pipe(wn(this.isMet$),bt(o=>null==o)).subscribe(()=>this.completeCondition())}destroy(){var n;null===(n=this.subscription)||void 0===n||n.unsubscribe()}}class g$e extends a5{constructor(n){super(),this.injector=n,this.mmEvents=this.injector.get(nd),this.listener=()=>this.completeCondition(),this.addListener()}addListener(){this.mmEvents.addEventListener(_i.GameStartInit,this.listener)}destroy(){var n;null===(n=this.mmEvents)||void 0===n||n.removeEventListener(_i.GameStartInit,this.listener)}}class _$e extends a5{constructor(n){super(),this.injector=n,this.addListener()}addListener(){const n=this.injector.get(Yt);this.subscription=n.events.pipe(wn(this.isMet$),bt(o=>o instanceof as)).subscribe(()=>this.completeCondition())}destroy(){var n;null===(n=this.subscription)||void 0===n||n.unsubscribe()}}class v$e{constructor(n,o){this.injector=n,this.info=o,this.destroy$=new sn,this.destroyListeners=new ie.List,this.claim=(new sn).pipe(wn(this.destroy$)),this.loaded=(new sn).pipe(wn(this.destroy$)),this.error=(new sn).pipe(wn(this.destroy$)),this.close=(new sn).pipe(wn(this.destroy$)),this.assetsLoadError=(new sn).pipe(wn(this.destroy$)),this.onDestroy=this.destroy$.pipe(Qi(1)),this.popupService=this.injector.get(Cn)}get gameInfo(){return this.info.gameInfo}start(){this.cmpRef=this.injector.get(Ia).createComponent(s5,{},!0),this.cmpRef.instance.gameData=this.info.gameInfo,this.cmpRef.changeDetectorRef.detectChanges(),this.cmpRef.instance.openGame(),this.cmpRef.instance.onGameClaim.pipe(wn(this.destroy$)).subscribe(()=>this.claim.next()),this.cmpRef.instance.onGameClose.pipe(wn(this.destroy$)).subscribe(()=>this.close.next()),this.cmpRef.instance.onGameLoaded.pipe(wn(this.destroy$)).subscribe(()=>this.loaded.next()),Ju(this.cmpRef.instance.onGameError,this.cmpRef.instance.onGameAssetsLoadError).pipe(wn(this.destroy$)).subscribe(()=>{if(!this.info.retry)return this.error.next();this.popupId=this.showRetryPopup(()=>this.cmpRef.instance.openGame(),()=>this.error.next())}),this.cmpRef.onDestroy(()=>{this.destroy$.next(),this.destroy$.complete()}),this.addDestroyListeners()}destroy(){if(this.cmpRef)return this.cmpRef.destroy();this.destroy$.next(),this.destroy$.complete(),this.popupService.hide(this.popupId),this.destroyListeners.forEach(n=>n.destroy())}addDestroyListeners(){this.info.destroyConditions.onLogout&&this.destroyListeners.add(new f$e(this.injector)),this.info.destroyConditions.onMainGameInit&&this.destroyListeners.add(new g$e(this.injector)),this.info.destroyConditions.onRouteChange&&this.destroyListeners.add(new _$e(this.injector)),this.destroyListeners.forEach(n=>n.isMet$.pipe(wn(this.destroy$)).subscribe(()=>this.destroy()))}showRetryPopup(n,o){const i={action:()=>o(),buttonTextOptions:{translationKey:"BUTTON.CANCEL"}};this.popupId=this.popupService.decision({buttons:{firstOption:{action:()=>n(),buttonTextOptions:{translationKey:"POPUP.TRY_AGAIN"}},secondOption:i,actionDecline:i.action},textParams:{translationKey:"MINI_GAMES.LOAD_ERROR"}})}}class b$e{constructor(n){this.injector=n,this.defaultDestroyConditions={onLogout:!0,onMainGameInit:!0,onRouteChange:!1},this.createArgs={retry:!1,destroyConditions:void 0,gameInfo:void 0}}withGameInfo(n){return this.createArgs.gameInfo=Hm.adaptGameInfo(n),this}withRetry(){return this.createArgs.retry=!0,this}withDefaultDestroyConditions(){return this.createArgs.destroyConditions=this.defaultDestroyConditions,this}withDestroyConditions(n){return this.createArgs.destroyConditions={...this.createArgs.destroyConditions,...n},this}build(){return new v$e(this.injector,{gameInfo:this.createArgs.gameInfo,destroyConditions:this.createArgs.destroyConditions,retry:this.createArgs.retry})}}let dI=(()=>{var t;class n{constructor(e){this.injector=e}createBuilder(){return new b$e(this.injector)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),bc=(()=>{var t;class n{constructor(e,i,r){this.ads=e,this.overlayManager=i,this.miniGamesBuilder=r}hasActiveAdsAdapter(){return this.ads.hasActiveAdsAdapter()}isRewardedVideoReady(e,i=5e3){return this.ads.isRewardedVideoReady(e,i)}isRewardedVideoEnabled(){return this.ads.isRewardedVideoEnabled()}showInterstitial(e){return new Promise((i,r)=>{const s=new Lw;s.execute=()=>{this.ads.showInterstitial(e).then(i).catch(r).finally(()=>s.complete())},s.onDestroy=()=>{i()},this.overlayManager.queueItem(s)})}areRequirementsMet(e){return this.ads.areRequirementsMet(e)}toggleBanner(e){return this.ads.toggleBanner(e)}showRewardedVideo(e){var i=this;return f(function*(){return new Promise((r,s)=>{const a=new Lw;a.execute=f(function*(){try{yield i.ads.showRewardedVideo({containerId:e.containerId,isRewardMiniGame:e.isRewardMiniGame}),e.video&&(yield i.handleRewardedVideoWatched(e.video)),r()}catch(c){s(c)}finally{a.complete()}}),a.onDestroy=()=>s(),i.overlayManager.queueItem(a)})})()}handleRewardedVideoWatched(e){return new Promise((i,r)=>{if(HR.isInstantReward(e))i();else if(HR.isFreeRewardedGame(e)){const s=this.miniGamesBuilder.createBuilder().withGameInfo(e).withDefaultDestroyConditions().build();Ju(s.close,s.onDestroy,s.error).pipe(Qi(1)).subscribe(()=>{i(),s.destroy()}),s.start()}})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dae),T(Bh),T(dI))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Qb;let og=((Qb=class{constructor(n,o,e,i,r){this.adsService=r,this.shouldResizeForBannerSubject=new Qn(!1),this.context={ctx:Dc.EAdContext.OutsideGame},this.subscriptions=new is.List,this.onNavigatedToGame=s=>{this.context={ctx:Dc.EAdContext.InGame,data:s},this.handleStateChange()},this.onGameViewLeft=()=>{this.context={ctx:Dc.EAdContext.OutsideGame,data:void 0},this.handleStateChange()},this.app=n,this.clientConfig=e,this.store=o,this.mmEvents=i}init(){this.context={ctx:Dc.EAdContext.OutsideGame},this.toggleBanner(id.Hide),this.subscriptions.add(this.store.subscribeSimpleProfile().pipe(bt(n=>!!n)).subscribe(n=>this.handleStateChange())),this.mmEvents.addEventListener(_i.NavigatedToGame,this.onNavigatedToGame),this.mmEvents.addEventListener(_i.GameViewLeft,this.onGameViewLeft)}onLogout(){this.mmEvents.removeEventListener(_i.NavigatedToGame,this.onNavigatedToGame),this.mmEvents.removeEventListener(_i.GameViewLeft,this.onGameViewLeft),this.subscriptions.forEach(n=>n.unsubscribe()),this.subscriptions=new is.List,this.context={ctx:Dc.EAdContext.OutsideGame},this.toggleBanner(id.Hide)}handleStateChange(){let n=this.canShowBanner()?id.Show:id.Hide;n===id.Show&&this.isBannerShown||n===id.Hide&&!this.isBannerShown||this.toggleBanner(n)}toggleBanner(n){var o=this;return f(function*(){try{o.isBannerShown=!!(yield o.adsService.toggleBanner(n))&&n===id.Show,o.shouldResizeForBannerSubject.next(!o.app.isMobileApp()&&o.isBannerShown)}catch(e){console.warn(e)}})()}canShowBanner(){const n=this.clientConfig.getConfig().content.ads.banners;let o=!1;return this.context.ctx===Dc.EAdContext.InGame?o=!!n.requirements.contexts.find(e=>e===Dc.EAdContext.InGame)&&!!n.requirements.roomTypes.find(e=>{var i;return e===(null===(i=this.context.data)||void 0===i||null===(i=i.roomModel)||void 0===i||null===(i=i.settings)||void 0===i?void 0:i.type)}):this.context.ctx===Dc.EAdContext.OutsideGame&&(o=!!n.requirements.contexts.find(e=>e===Dc.EAdContext.OutsideGame)),o&&this.adsService.areRequirementsMet(zR.Banner)}}).\u0275fac=function(n){return new(n||Qb)(T(Qt),T(J),T(Zt),T(nd),T(bc))},Qb.\u0275prov=be({token:Qb,factory:Qb.\u0275fac}),Qb);Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],og.prototype,"onLogout",null),og=Qe([Wo(),ue("design:paramtypes",[Qt,J,Zt,nd,bc])],og);const C$e=["*"];let Ga=(()=>{var t;class n{constructor(){this.class=!0}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["container-component"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("container",i.class)},ngContentSelectors:C$e,decls:1,vars:0,template:function(e,i){1&e&&(Co(),yo(0))},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}\n\n/*# sourceMappingURL=container.component.ts-angular-inline--6.css.map*/"],changeDetection:0}),n})();const y$e=["wrapperOverlay"];function S$e(t,n){1&t&&B(0,"div",5)}const w$e=(t,n)=>({"has-backdrop":t,"resize-for-banner":n}),T$e=t=>({zIndex:t}),P$e=t=>({popupAnimation:t});function I$e(t,n){if(1&t){const o=Ce();p(0,"section",1,2),Y("click.zoneless",function(i){return oe(o),re(_().onClick(i))}),U(2,S$e,1,0,"div",3),p(3,"container-component",4),yo(4),m()()}if(2&t){const o=_();ni("popup-container__wrapper ",o.customClasses.backdrop,""),l("ngClass",cn(11,w$e,!o.popupContainerOptions||o.popupContainerOptions&&!o.popupContainerOptions.disableBackdrop,o.shouldResizeForBanner))("ngStyle",ne(14,T$e,o.popupContainerOptions&&o.popupContainerOptions.componentZIndex?o.popupContainerOptions.componentZIndex:"10001")),d(2),l("ngIf",o.raysAnimationOn),d(),ni("popup-container__wrapper--content ",o.customClasses.content,""),l("ngClass",ne(16,P$e,o.popupContainerOpened))("ngStyle",o.inlineStyles)}}const M$e=["*"];let Wi=(()=>{var t;class n extends Dh{constructor(e,i,r,s,a){super(),this.ngZone=r,this.bannerListenerService=s,this.destroyRef=a,this.wrapperTapListenerAttached=!1,this.touchHandler=c=>{"wrapper"===c.target.id&&(c.stopPropagation(),c.preventDefault())},this.onKeyPress=c=>{this.isOnFocus&&27===c.keyCode&&(c.stopPropagation(),this.ngZone.run(()=>this.hide(c)))},this.onClick=c=>{"wrapper"===c.target.id&&(c.stopPropagation(),this.ngZone.run(()=>this.hide(c)))},this.soundService=i,this.renderer=e,this.closePopup=new ke,this.inlineStyles={}}ngOnInit(){super.ngOnInit(),this.buildInlineStyle(),this.setCustomClasses(),this.bannerListenerService.shouldResizeForBannerSubject.pipe(mi(this.destroyRef)).subscribe(e=>{this.shouldResizeForBanner=e})}ngOnChanges(e){e.popupContainerOpened&&(this.isFocusable!==this.popupContainerOpened&&this.setFocusable(this.popupContainerOpened),this.popupContainerOpened?(this.soundService.play(dn.PopupSlide),this.addKeyPressListener()):(this.removeKeyPressListener(),this.removeTouchMoveListener())),e.popupContainerOptions&&this.setCustomClasses()}ngAfterViewInit(){this.addTouchMoveListener()}ngOnDestroy(){super.ngOnDestroy(),this.removeKeyPressListener(),this.removeTouchMoveListener()}setCustomClasses(){this.customClasses={backdrop:this.popupContainerOptions&&this.popupContainerOptions.customBackdropCssClass?this.popupContainerOptions.customBackdropCssClass:"",content:this.popupContainerOptions&&this.popupContainerOptions.customComponentCssClass?this.popupContainerOptions.customComponentCssClass:""}}buildInlineStyle(){this.popupContainerOptions&&this.popupContainerOptions.styleProperties&&Object.keys(this.popupContainerOptions.styleProperties).forEach(i=>{this.inlineStyles[i]=this.popupContainerOptions.styleProperties[i]})}hide(e){(!this.popupContainerOptions||!this.popupContainerOptions.closeDisabled)&&this.closePopup.emit()}addKeyPressListener(){this.ngZone.runOutsideAngular(()=>{this.keyPressListener=this.renderer.listen("window","keyup",this.onKeyPress)})}removeKeyPressListener(){this.keyPressListener&&this.keyPressListener()}addTouchMoveListener(){!this.wrapperTapListenerAttached&&this.wrapperOverlay&&(this.ngZone.runOutsideAngular(()=>{this.wrapperOverlay.nativeElement.addEventListener("touchmove",this.touchHandler)}),this.wrapperTapListenerAttached=!0)}removeTouchMoveListener(){this.wrapperOverlay&&(this.wrapperOverlay.nativeElement.removeEventListener("touchmove",this.touchHandler),this.wrapperTapListenerAttached=!1)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji),g(Mo),g(an),g(og),g(br))},t.\u0275cmp=pe({type:t,selectors:[["popup-container"]],viewQuery:function(e,i){if(1&e&&$e(y$e,5),2&e){let r;je(r=He())&&(i.wrapperOverlay=r.first)}},inputs:{popupContainerOptions:"popupContainerOptions",popupContainerOpened:"popupContainerOpened",raysAnimationOn:"raysAnimationOn"},outputs:{closePopup:"closePopup"},features:[Ht,it],ngContentSelectors:M$e,decls:1,vars:1,consts:[["id","wrapper",3,"class","ngClass","ngStyle","click.zoneless",4,"ngIf"],["id","wrapper",3,"ngClass","ngStyle","click.zoneless"],["wrapperOverlay",""],["class","popup-container__container--rays",4,"ngIf"],["data-cy","pop-up",3,"ngClass","ngStyle"],[1,"popup-container__container--rays"]],template:function(e,i){1&e&&(Co(),U(0,I$e,5,18,"section",0)),2&e&&l("ngIf",i.popupContainerOpened)},dependencies:[Xe,Ne,Cm,Ga],styles:['.popupAnimation[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_popupAnimation .3s cubic-bezier(.215,.61,.355,1)}@keyframes _ngcontent-%COMP%_popupAnimation{0%{transform:scale3d(.4,.4,1)}to{transform:scaleZ(1)}}.popup-container__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}@media only screen and (max-height: 280px){.popup-container__wrapper[_ngcontent-%COMP%]{align-items:flex-start}}.popup-container__wrapper[_ngcontent-%COMP%]:not(.has-backdrop){position:fixed;top:0;left:0;overflow-y:auto;overflow-x:hidden}.popup-container__wrapper.resize-for-banner[_ngcontent-%COMP%]{height:calc(100% - 100px)}.popup-container__container--rays[_ngcontent-%COMP%]{position:absolute;pointer-events:none;display:flex;flex-flow:row;justify-content:center;top:0;left:0;width:100%;height:100%;overflow:hidden}@media only screen and (max-width: 568px){.popup-container__container--rays[_ngcontent-%COMP%]{display:none}}.popup-container__container--rays[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-30%;left:-25%;width:150%;height:150%;background-repeat:no-repeat;background-size:contain;background-position:center}.popup-container__wrapper--content[_ngcontent-%COMP%]{position:relative;width:100%;height:calc(100% - 4rem);max-width:70rem;max-height:45rem}@media only screen and (max-width: 768px){.popup-container__wrapper--content[_ngcontent-%COMP%]{margin:0 1rem}}@media only screen and (max-width: 900px){.popup-container__wrapper--content[_ngcontent-%COMP%]{max-width:59rem}}.vip[_ngcontent-%COMP%]{max-width:45rem;max-height:56rem}']}),n})();const O$e=t=>[t];function E$e(t,n){if(1&t&&(p(0,"div",1),B(1,"spinner-loader",2),m()),2&t){const o=_();Uo("transparent-bg",o.transparentBG),l("ngClass",ne(3,O$e,o.loaderImageClass))}}let Oi=(()=>{var t;class n{constructor(e,i){this.ngZone=i,this.loaderImageClass="",this.delay=0,this.showLoader=!1,this.changeDetRef=e,this.changeDetRef.detach()}ngOnInit(){this.showLoaderFn(),this.detectChanges()}ngOnDestroy(){clearTimeout(this.timeout),this.timeout=void 0}showLoaderFn(){this.ngZone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>{this.showLoader=!0,this.detectChanges()},this.delay)})}detectChanges(){this.changeDetRef.destroyed||this.changeDetRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(an))},t.\u0275cmp=pe({type:t,selectors:[["loader-image"]],inputs:{transparentBG:"transparentBG",loaderImageClass:"loaderImageClass",delay:"delay"},decls:1,vars:1,consts:[["class","container__loader",3,"transparent-bg","ngClass",4,"ngIf"],[1,"container__loader",3,"ngClass"],[1,"loader__image"]],template:function(e,i){1&e&&U(0,E$e,2,5,"div",0),2&e&&l("ngIf",i.showLoader)},dependencies:[Xe,Ne,vc],styles:[".container__loader[_ngcontent-%COMP%]{position:absolute;background:rgba(0,0,0,.5);height:100%;display:flex;justify-content:center;align-items:center;width:100%;margin:0;top:0;left:0}.container__loader.transparent-bg[_ngcontent-%COMP%]{background:transparent}.loader__image[_ngcontent-%COMP%]{position:relative;width:5rem}"],changeDetection:0}),n})();var x$e=ve.EButtonModifier;const A$e=()=>({key:"MIGRATING_ACCOUNT.POPUP_TITLE"});function R$e(t,n){if(1&t){const o=Ce();p(0,"popup-title-bar",4),Y("buttonCloseClicked",function(){return oe(o),re(_(2).hide())}),m()}if(2&t){const o=_(2);l("popupTitleType",o.popupTitleTypes.Static)("text",pt(3,A$e))("hideCloseButton",o.isBlockerPopup)}}function k$e(t,n){1&t&&(p(0,"div",17),B(1,"loader-image",18),m()),2&t&&(d(),l("transparentBG",!0))}function L$e(t,n){if(1&t){const o=Ce();p(0,"div",5),U(1,k$e,2,1,"div",6),p(2,"div",7),B(3,"div",8),m(),p(4,"div",9),B(5,"div",10),V(6,"safeHtml"),V(7,"translate"),B(8,"div",11),V(9,"safeHtml"),V(10,"translate"),p(11,"div",12),B(12,"div",13),m(),p(13,"div",14)(14,"button-text",15),Y("onClick",function(){return oe(o),re(_(2).migrate())}),p(15,"p"),H(16),V(17,"translate"),m()()(),B(18,"div",16),V(19,"safeHtml"),V(20,"translate"),m()()}if(2&t){const o=_(2);d(),l("ngIf",o.loaderOn),d(4),l("innerHtml",$(6,6,$(7,8,"MIGRATING_ACCOUNT.POPUP_INNER_TITLE")),Yn),d(3),l("innerHtml",$(9,10,$(10,12,"MIGRATING_ACCOUNT.POPUP_TEXT")),Yn),d(6),l("buttonModifier",o.buttonType),d(2),ze(" ",$(17,14,"BUTTON.MIGRATE_NOW")," "),d(2),l("innerHtml",$(19,16,$(20,18,"MIGRATING_ACCOUNT.POPUP_INFO_TEXT")),Yn)}}function D$e(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().hide())}),U(1,R$e,1,4,"popup-title-bar",2)(2,L$e,21,20,"div",3),m()}if(2&t){const o=_();l("popupContainerOpened",o.openPopup)("popupContainerOptions",o.popupContainerOptions),d(),l("ngIf",o.openPopup),d(),l("ngIf",!o.loaderOn&&o.openPopup)}}let c5=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.appService=e,this.accountMigrationPopupService=i,this.clientConfigService=r,this.userService=s,this.navigation=a,this.popup=c,this.constants=u,this.cdr=h,this.openPopup=!1,this.loaderOn=!1,this.isApp=!1,this.isBlockerPopup=!1,this.popupTitleTypes=li,this.buttonType=x$e.BUTTON_ATTENTION,this.isApp=this.appService.isMobileApp();const b=this.clientConfigService.getConfig().platform.migration;this.isBlockerPopup=b.required,this.popupContainerOptions={closeDisabled:this.isBlockerPopup,componentZIndex:"99999",customComponentCssClass:"account-migration-popup--height",styleProperties:{maxWidth:"42rem"}},h.detach()}ngOnInit(){this.accountMigrationPopupService.openPopup.subscribe(e=>this.onOpenPopupRequested(e)),this.cdr.detectChanges()}migrate(){var e=this;return f(function*(){const i=e.clientConfigService.getConfig().platform.migration;if(!i||!i.enabled||"master"!==i.role)return;let r;try{r=yield e.userService.getState()}catch(a){}if(!r||!r.migrationToken)return;const s=e.clientConfigService.getConfig().core.tracking.adjust.migrationUrl.replace(/{token}/g,r.migrationToken);e.appService.openExternalUrl(decodeURIComponent(s)),e.popup.hide(-1),e.navigation.navigate([e.constants.defaultNotLoggedRoute],{ignoreGuards:!0})})()}hide(){this.accountMigrationPopupService.openPopup.next(!1)}onOpenPopupRequested(e){this.openPopup=e,this.loaderOn=!e,this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(cI),g(Zt),g(Kr),g(Yt),g(Cn),g(tn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["account-migration-popup"]],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","hideCloseButton","buttonCloseClicked",4,"ngIf"],["class","account-migration-popup__container",4,"ngIf"],[3,"popupTitleType","text","hideCloseButton","buttonCloseClicked"],[1,"account-migration-popup__container"],["class","free-rewards-popup-loader-container",4,"ngIf"],[1,"account-migration-popup-header__container"],[1,"account-migration-popup__header--image","migration-image"],[1,"account-migration-popup__container--content"],[1,"account-migration-popup--title",3,"innerHtml"],[1,"account-migration-popup--upper-text",3,"innerHtml"],[1,"account-migration-popup--games-container"],[1,"account-migration-popup--games-image","games-image"],[1,"account-migration-popup--button-action"],[1,"account-migration-popup__button-text",3,"buttonModifier","onClick"],[1,"account-migration-popup--info-text",3,"innerHtml"],[1,"free-rewards-popup-loader-container"],[3,"transparentBG"]],template:function(e,i){1&e&&U(0,D$e,3,4,"popup-container",0),2&e&&l("ngIf",i.openPopup)},dependencies:[Ne,pn,Ji,Wi,Oi,qe,Ta],styles:[".account-migration-popup__container[_ngcontent-%COMP%]{justify-content:center;align-items:center;width:100%;height:calc(100% - 6rem);display:flex;flex-flow:column nowrap;overflow:auto}.account-migration-popup-header__container[_ngcontent-%COMP%]{width:100%;height:6rem;min-height:6rem;padding:0}.account-migration-popup-header__container[_ngcontent-%COMP%]   .migration-image[_ngcontent-%COMP%]{width:100%;height:auto;min-height:100%;min-width:100%}@media only screen and (max-width: 320px){.account-migration-popup-header__container[_ngcontent-%COMP%]{height:5rem;min-height:5rem}}.account-migration-popup__container--content[_ngcontent-%COMP%]{width:100%;padding:0 2rem;text-align:center;position:relative;height:88%;min-height:4rem;margin-top:1rem}@media only screen and (max-width: 365px){.account-migration-popup__container--content[_ngcontent-%COMP%]{height:89%;margin-top:0}}.account-migration-popup--games-container[_ngcontent-%COMP%]{width:100%;padding:0;height:20rem;margin:1rem 0}.account-migration-popup--games-container[_ngcontent-%COMP%]   .games-image[_ngcontent-%COMP%]{width:100%;height:auto;min-height:100%;min-width:100%}@media only screen and (max-width: 480px){.account-migration-popup--games-container[_ngcontent-%COMP%]{height:18rem;margin:0}}@media only screen and (max-width: 380px){.account-migration-popup--games-container[_ngcontent-%COMP%]{height:15rem;margin:0}}.account-migration-popup--button-action[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:0 .5rem;width:100%;display:flex;margin:2rem 0}"],changeDetection:0}),n})(),l5=(()=>{var t;class n{canActivate(e){return!(!e.queryParams.token&&!e.params.token)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Vae=[{path:"account-migration/:token",data:{redirectOptions:{skipRedirect:!0,onlyLogged:!1,relativeUrl:"account-migration"}},component:t5,canActivate:[l5]},{matcher:function B$e(t){if(1!==t.length||-1===t[0].path.indexOf("account-migration"))return null;if(-1===t[0].path.indexOf("account-migration?token="))return{consumed:t};const n=t[0].path.match(/[?|&]token=(.*)/)[1],o=new kS(n,{token:n});return{consumed:[t[0]],posParams:{token:o}}},data:{redirectOptions:{onlyLogged:!1,skipRedirect:!0,relativeUrl:"account-migration"}},component:t5,canActivate:[l5]}];var Oo=function(t){return t.ClientSoundsEnabled="sounds",t.GameSoundsEnabled="inGameMusic",t.ForceCanvasEnabled="forceCanvas",t.LowQualityGraphicsEnabled="lowQualityGraphics",t.FriendsOnlyChatEnabled="frinedsOnlyChat",t.ClientBackgroundMusicEnabled="clientBackgroundMusic",t.DealerDeckEnabled="dealerDeck",t.AppLanguage="lang",t.Country="country",t.HiddenProfile="hiddenProfile",t.VoiceChat="voiceChat",t.NotificationsEnabled="notifications",t.PushNotifications="pushNotifications",t.PremiumGiftNotificationEnabled="premiumGiftNotificationEnabled",t.LikeNotifications="LikeRecieved",t.GiftNotifications="GiftSent",t.FriendNotifications="FriendRequestSent",t.InviteNotifications="GameInviteSent",t.CloseFriendOnlineNotifications="CloseFriendOnline",t.BonusNotifications="BonusNotifications",t.PrivateMsgsNotifications="PrivateChatMessage",t.PrivateImageMsgsNotifications="PrivateChatImageMessage",t.PrivateVoiceMsgsNotifications="PrivateChatVoiceMessage",t.PrivateEmojiMsgsNotifications="PrivateChatEmojiMessage",t.PrivateGameRoomMsgsNotifications="PrivateChatGameRoomMessage",t.PrivateAdminMsgsNotifications="AdminChatMessage",t}(Oo||{}),ea=function(t){return t.Toggle="toggle",t.Select="select",t}(ea||{});let Ma=(()=>{var t;class n{constructor(e,i){this.translationService=i,this.appStorage=e,this.languagesConfig=Lt.CONFIG,this.platformLangDefault=this.languagesConfig.platform.languages.default}setLanguage(e){return e!==this.getAppLanguage()?this.changeAppLanguage(this.validateLanguage(e)):(this.setBodyLangClass(e),this.setLocalStorageLanguage(e),Promise.resolve(e))}setLocalStorageLanguage(e){this.appStorage.setItem(Oo.AppLanguage,this.validateLanguage(e))}getLocalStorageLanguage(){return this.appStorage.getItem(Oo.AppLanguage,void 0)}getAppLanguage(){const e=this.appStorage.getItem(Oo.AppLanguage,this.platformLangDefault);return this.checkIsLanguageAvailable(e)?e:this.platformLangDefault}validateLanguage(e){return this.checkIsLanguageAvailable(e)?e:this.platformLangDefault}get list(){return this.languagesConfig.platform.languages.list}setBodyLangClass(e){const i=this.appStorage.getItem(Oo.AppLanguage),r=document.getElementsByTagName("body")[0];r.classList.remove("".concat(Oo.AppLanguage,"-").concat(i)),r.classList.add("".concat(Oo.AppLanguage,"-").concat(e)),document.getElementsByTagName("html")[0].setAttribute("lang",e)}checkIsLanguageAvailable(e){return-1!==this.languagesConfig.platform.languages.list.indexOf(e.toString())}changeAppLanguage(e){return this.translationService.use(e).toPromise().then(()=>(this.setBodyLangClass(e),this.setLocalStorageLanguage(e),e))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ci),T(pi))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),u5=(()=>{var t;class n{constructor(e){this.http=e}sendForgotten(e){return this.http.post("auth/forgottenPassword",e).toPromise()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var N$e=ve.EIcons;const F$e=["iconEl"],U$e=["inputEl"],G$e=["textareaEl"];function V$e(t,n){if(1&t&&(p(0,"label",9),H(1),m()),2&t){const o=_();l("for",o.fieldId),d(),se(o.label)}}function z$e(t,n){1&t&&B(0,"div")}function j$e(t,n){if(1&t){const o=Ce();p(0,"textarea",10,11),Y("input.zoneless",function(i){return oe(o),re(_().onValueChanged(i))}),m()}if(2&t){const o=_();l("id",o.fieldId)("ngModel",o.inputValue)("ngClass",o.icon?"input--has-icon"+o.inputCssClass:o.inputCssClass)("placeholder",o.placeholder),Hn("data-cy","input"+o.fieldId)}}function H$e(t,n){if(1&t){const o=Ce();p(0,"input",12,13),Y("input.zoneless",function(i){return oe(o),re(_().onValueChanged(i))})("keydown.enter",function(i){return oe(o),re(_().onSubmitClicked(i))}),m()}if(2&t){const o=_();l("id",o.fieldId)("ngModel",o.inputValue)("ngClass",o.icon?"input--has-icon"+o.inputCssClass:o.inputCssClass)("type",o.type)("placeholder",o.placeholder),Hn("data-cy","input"+o.fieldId)}}function q$e(t,n){1&t&&B(0,"icon-component",14),2&t&&l("icon",_().icon)}const W$e=t=>({tabindex:t}),$$e=t=>({name:t});function K$e(t,n){if(1&t){const o=Ce();p(0,"button-icon",15),Y("onClick",function(){return oe(o),re(_().onClearClicked())}),m()}if(2&t){const o=_();l("nativeAttr",ne(2,W$e,-1))("icon",ne(4,$$e,o.EIcons.CLOSE))}}let il=(()=>{var t;class n{constructor(e,i){this.EIcons=N$e,this.type="text",this.nativeAttr={},this.inputCssClass="",this.isSet=!0,this.onClear=new ke,this.onChange=new ke,this.onSubmit=new ke,this.renderer2=e,this.changeDetectorRef=i,this.inputValue="",this.shouldShowClear=this.hideClearButton,this.propagateChange=r=>{this.inputValue=r}}ngOnInit(){this.inputValue=this.nativeAttr.value||this.inputValue,this.changeDetectorRef.detach()}ngOnChanges(e){e.nativeAttr&&(this.inputValue=e.nativeAttr.currentValue.value),this.updateChangeDetectorRef()}ngAfterViewInit(){this.nativeAttr&&this.setAttributes(),this.updateChangeDetectorRef()}writeValue(e){null!=e&&(this.inputValue=e,this.shouldShowClearButton(""!==e),this.updateChangeDetectorRef())}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}focus(){var e,i;null===(e=this.textareaEl)||void 0===e||null===(e=e.nativeElement)||void 0===e||e.focus(),null===(i=this.inputEl)||void 0===i||null===(i=i.nativeElement)||void 0===i||i.focus()}blur(){var e,i;null===(e=this.textareaEl)||void 0===e||null===(e=e.nativeElement)||void 0===e||e.blur(),null===(i=this.inputEl)||void 0===i||null===(i=i.nativeElement)||void 0===i||i.blur()}onValueChanged(e){let i=e.target.value;this.maxLength&&(i=i.slice(0,this.maxLength)),this.inputValue=i,(this.textareaEl||this.inputEl).nativeElement.value=i,this.propagateChange(i),this.shouldShowClearButton(""!==i),this.onChange.emit(this.inputValue),i||this.onClear.emit(),this.updateChangeDetectorRef()}onSubmitClicked(e){this.onSubmit.emit(e.target.value),this.updateChangeDetectorRef()}onClearClicked(){this.inputValue="",this.shouldShowClearButton(!1),this.propagateChange(""),this.onClear.emit(),this.updateChangeDetectorRef()}isTranslatableText(e){return"object"==typeof e}setAttributes(){const e=this.textareaEl||this.inputEl;for(const i in this.nativeAttr)this.nativeAttr.hasOwnProperty(i)&&this.renderer2.setAttribute(e.nativeElement,i,this.nativeAttr[i])}updateChangeDetectorRef(){this.changeDetectorRef.destroyed||this.changeDetectorRef.detectChanges()}shouldShowClearButton(e){this.hideClearButton?this.shouldShowClear=!1:!0===this.nativeAttr.disabled||!0===this.nativeAttr.readonly||(this.shouldShowClear=e,e&&(this.inputEl&&this.inputEl.nativeElement.classList.add("dirty"),this.textareaEl&&this.textareaEl.nativeElement.classList.add("dirty")))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["user-input"]],viewQuery:function(e,i){if(1&e&&($e(F$e,5),$e(U$e,5),$e(G$e,5)),2&e){let r;je(r=He())&&(i.iconEl=r.first),je(r=He())&&(i.inputEl=r.first),je(r=He())&&(i.textareaEl=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Uo("user--input__host",i.isSet)},inputs:{placeholder:"placeholder",label:"label",icon:"icon",type:"type",errorMessage:"errorMessage",nativeAttr:"nativeAttr",maxLength:"maxLength",fieldId:"fieldId",inputCssClass:"inputCssClass",hideClearButton:"hideClearButton"},outputs:{onClear:"onClear",onChange:"onChange",onSubmit:"onSubmit"},features:[mn([{provide:Mh,multi:!0,useExisting:_s(()=>t)}]),it],decls:13,vars:11,consts:[[3,"for",4,"ngIf"],[1,"user-input__input-container"],[1,"user-input__input-wrapper"],[4,"ngIf","ngIfThen","ngIfElse"],["textareaInput",""],["normalInput",""],["class","user-input__icon",3,"icon",4,"ngIf"],["class","user-input__clear","data-cy","inputCancelButton",3,"nativeAttr","icon","onClick",4,"ngIf"],["data-cy","userInputError",1,"user-input__error",3,"hidden"],[3,"for"],[1,"user-input__input","user-input__input--textarea",3,"id","ngModel","ngClass","placeholder","input.zoneless"],["textareaEl",""],[1,"user-input__input",3,"id","ngModel","ngClass","type","placeholder","input.zoneless","keydown.enter"],["inputEl",""],[1,"user-input__icon",3,"icon"],["data-cy","inputCancelButton",1,"user-input__clear",3,"nativeAttr","icon","onClick"]],template:function(e,i){if(1&e&&(U(0,V$e,2,2,"label",0),p(1,"div",1)(2,"div",2),U(3,z$e,1,0,"div",3)(4,j$e,2,5,"ng-template",null,4,ft)(6,H$e,2,6,"ng-template",null,5,ft)(8,q$e,1,1,"icon-component",6)(9,K$e,1,6,"button-icon",7),m(),p(10,"p",8),H(11),V(12,"translate"),m()()),2&e){const r=Kt(5),s=Kt(7);l("ngIf",i.label&&i.fieldId),d(3),l("ngIf","textarea"===i.type)("ngIfThen",r)("ngIfElse",s),d(5),l("ngIf",!!i.icon),d(),l("ngIf",i.shouldShowClear),d(),l("hidden",!i.errorMessage),d(),se(i.isTranslatableText(i.errorMessage)?yt(12,8,i.errorMessage.key,i.errorMessage.params):i.errorMessage)}},dependencies:[Xe,Ne,xb,Ql,h4,Dn,ei,qe],styles:['.user-input__input-container[_ngcontent-%COMP%]{position:relative;display:flex;height:inherit;line-height:inherit}.user-input__input-wrapper[_ngcontent-%COMP%]{position:absolute;width:100%;display:flex;border-radius:.8rem;overflow:hidden;height:inherit;line-height:inherit;align-items:center}.user-input__input[_ngcontent-%COMP%]{position:relative;transition:border .2s ease-in-out,color .2s ease-in-out;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;width:100%;font-size:1.8rem;text-align:inherit;text-transform:inherit;height:inherit;padding:0 3.2rem 0 1rem;border-radius:.8rem;resize:none;overflow:auto}@media only screen and (max-width: 320px){.user-input__input[_ngcontent-%COMP%]{padding:0 1rem}}.user-input__input[_ngcontent-%COMP%]:active + label[_ngcontent-%COMP%], .user-input__input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{color:red}.user-input__input.input--has-icon[_ngcontent-%COMP%]{padding-left:5rem}.user-input__input.user-input__input--textarea[_ngcontent-%COMP%]{padding:1rem 3.2rem 1rem 1rem}.user-input__icon[_ngcontent-%COMP%]{position:absolute;left:1rem;top:50%;transform:translateY(-50%);pointer-events:none;width:2.5rem;height:100%;display:flex;justify-content:center;align-items:center}.user-input__icon[_ngcontent-%COMP%]:after{transition:color .2s ease-in-out}.user-input__clear[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;transform:translateY(-50%);font-size:2rem;width:4rem;height:4rem;min-width:0;min-height:0;max-height:100%}.user-input__error[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;content:"";width:100%;line-height:1.4rem;margin-top:.1rem;padding:.1rem .5rem;font-size:1.25rem;font-weight:400;z-index:1;border-radius:.4rem}.user-input__error[_ngcontent-%COMP%]:before{position:absolute;top:-.5rem;left:1rem;content:"";width:0;height:0}'],changeDetection:0}),n})();var Z$e=lt.NetworkError,Q$e=ve.EButtonModifier,Y$e=ve.EIcons;let zae=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.EIcons=Y$e,this.popupTitleTypes=li,this.buttonModifier=Q$e,this.appLanguage=i,this.appStorage=e,this.loader=r,this.router=h,this.fieldValidatorFactory=a,this.formBuilder=s,this.fpService=c,this.popup=u,this.translation=b,this.toaster=w,this.popupContainerOptions={disableBackdrop:!0,customComponentCssClass:"fp__container",closeDisabled:!0},this.popupTitleBarStyle={height:"9rem"},this.titleBarLeftButton={type:QS.BackButton,action:()=>this.router.navigate(["/home"])}}ngOnInit(){this.loader.off(),this.forgottenPassForm=this.formBuilder.group({email:["",Ln.compose([...this.fieldValidatorFactory.createPhoneEmailValidator().validators,Ln.required])]}),this.formError={email:""},this.messages={email:{required:"",maxlength:"",pattern:""}};let e=this.translation.getParsedTranslation("API_ERRORS.EmailNotValid");this.messages.email.required=e,this.messages.email.maxlength=e,this.messages.email.pattern=e}ngOnDestroy(){this.forgottenPassForm.reset(),this.popup.hide(this.infoPopupId)}sendEmail(){if(this.formError={email:""},!1===gc.isFormValid(this.forgottenPassForm))return this.showErrors();this.loader.on(),this.forgottenPassForm.value.lang=this.appLanguage.getAppLanguage();const e=this.forgottenPassForm.value;new RegExp(this.fieldValidatorFactory.createEmailValidator().pattern).test(e.email)||(e.phoneNumber=e.email,e.email=void 0),this.fpService.sendForgotten(e).then(r=>{this.loader.off(),this.forgottenPassForm.reset(),this.infoPopupId=this.popup.basic({textParams:{translationKey:"POPUP.CHANGE_PASSWORD_FORM"},buttons:{buttonObject:{action:()=>{this.router.navigate(["/home"])},buttonTextOptions:{translationKey:this.translation.getParsedTranslation("TEXT.OK")}}}})}).catch(r=>{this.loader.off(),r instanceof Z$e?this.toaster.error("API_ERRORS.ServerError"):(this.forgottenPassForm.reset(),this.infoPopupId=this.popup.basic({textParams:{translationKey:"POPUP.CHANGE_PASSWORD_FORM"},buttons:{buttonObject:{action:()=>{this.router.navigate(["/home"])},buttonTextOptions:{translationKey:this.translation.getParsedTranslation("TEXT.OK")}}}}))})}showErrors(){for(let e in gc.getFormErroredFields(this.forgottenPassForm))if(e)for(let i in this.forgottenPassForm.controls[e].errors)i&&(this.formError[e]+=this.messages[e][i]+" ")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ci),g(Ma),g(ro),g(td),g(wa),g(u5),g(Cn),g(on),g(pi),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["forgotten-pass"]],decls:10,vars:19,consts:[[3,"popupContainerOpened","popupContainerOptions"],[3,"popupTitleType","inlineStyles","hideCloseButton","leftButtonOptions","customComponentCssClass"],[1,"fp__container--form","form__content"],["novalidate","",3,"formGroup","submit"],[1,"fp__container--email"],["formControlName","email",3,"icon","type","placeholder","errorMessage"],[1,"fp__button--send",3,"buttonModifier","type"]],template:function(e,i){1&e&&(p(0,"popup-container",0),B(1,"popup-title-bar",1),p(2,"div",2)(3,"form",3),Y("submit",function(){return i.sendEmail()}),p(4,"div",4),B(5,"user-input",5),V(6,"translate"),m(),p(7,"button-text",6),H(8),V(9,"translate"),m()()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Logo)("inlineStyles",i.popupTitleBarStyle)("hideCloseButton",!0)("leftButtonOptions",i.titleBarLeftButton)("customComponentCssClass","fp__title-container"),d(2),l("formGroup",i.forgottenPassForm),d(2),l("icon",i.EIcons.MESSAGE)("type","email")("placeholder",$(6,15,"PLACEHOLDERS.ENTER_EMAIL"))("errorMessage",i.formError.email),d(2),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("type","submit"),d(),ze(" ",$(9,17,"BUTTON.SEND")," "))},dependencies:[pn,Ji,Wi,il,Su,Ql,yu,wl,Yl,qe],styles:[".fp__container--form[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;max-width:50rem;margin:0 auto;padding:2rem;height:calc(100% - 9rem)!important}@media only screen and (max-width: 768px){.fp__container--form[_ngcontent-%COMP%]{padding:1rem;height:calc(100% - 5rem)!important}}@media only screen and (max-height: 379px){.fp__container--form[_ngcontent-%COMP%]{display:block}}@media only screen and (min-height: 380px){.fp__container--form[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center}}.fp__container--email[_ngcontent-%COMP%]{min-height:7.5rem}@media only screen and (max-width: 768px){.fp__container--email[_ngcontent-%COMP%]{min-height:6.5rem}}.fp__button--send[_ngcontent-%COMP%]{width:100%;flex-grow:1;margin:2rem auto 0}"]}),n})();const jae=[{path:"forgotten-pass",component:zae}];var WR=function(t){return t.TermsAndPrivacy="termsPrivacy",t.Marketing="marketing",t.Profiling="profiling",t.Targeting="targeting",t}(WR||{}),J$e=ve.EButtonModifier;const X$e=t=>[t];let d5=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){var h=this;this.gdprType=hP,this.gameName=Lt.CONFIG.platform.name,this.buttonModifier=J$e,this.requestInProgress=!1,this.continueAction=f(function*(){try{h.requestInProgress=!0;const b=h.store.selectUserPrivacySettings(),R=h.gdprService.buildOptions(b).find(G=>G.id===WR.TermsAndPrivacy);R.state=!0,yield h.gdprService.updateSettings(R),h.popupService.hide(h.id)}catch(b){h.toaster.error("ERRORS.SOMETHING_WRONG")}finally{h.requestInProgress=!1}}),this.appLanguage=c,this.clientConfigService=a,this.appService=s,this.toaster=r,this.gdprService=i,this.popupService=e,this.store=u}openExternalUrl(e){this.appService.openExternalUrl("https://".concat(this.clientConfigService.getConfig().platform.staticPagesDomain).concat(e,"/").concat(this.appLanguage.getAppLanguage()))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(pI),g(Dt),g(Qt),g(Zt),g(Ma),g(J))},t.\u0275cmp=pe({type:t,selectors:[["gdpr-popup"]],inputs:{id:[mo.None,"popupId","id"]},decls:12,vars:15,consts:[[1,"gdpr-popup__wrapper"],[1,"gdpr-popup__container--main"],[1,"gdpr-popup__text--upper","privacy"],[1,"gdpr-popup__container--button"],[1,"gdpr-popup__button--privacy",3,"buttonModifier","click"],[1,"gdpr-popup__button--continue",3,"buttonModifier","loading","onClick"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"p",2),H(3),V(4,"translate"),m(),p(5,"div",3)(6,"button-text",4),Y("click",function(){return i.openExternalUrl("/privacy-policy")}),H(7),V(8,"translate"),m(),p(9,"button-text",5),Y("onClick",function(){return i.continueAction()}),H(10),V(11,"translate"),m()()()()),2&e&&(d(3),se(yt(4,6,"GDPR_POPUP.YOU_MUST_ACCEPT",ne(13,X$e,i.gameName))),d(3),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION),d(),ze(" ",$(8,9,"LOGIN_COMPONENT.PRIVACY_POLICY"),""),d(2),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("loading",i.requestInProgress),d(),ze(" ",$(11,11,"MERGING_ACCOUNTS.CONTINUE"),""))},dependencies:[pn,qe],styles:[".gdpr-popup__wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;width:calc(100% - 1rem);height:calc(100% - 7rem);margin:.5rem}.gdpr-popup__container--main[_ngcontent-%COMP%]{width:100%;min-height:100%;padding:.5rem 2rem;display:flex;flex-flow:row wrap;height:100%;flex-flow:column nowrap}@media only screen and (max-width: 480px){.gdpr-popup__container--main[_ngcontent-%COMP%]{padding:.5rem}}.gdpr-popup__text--upper[_ngcontent-%COMP%]{display:flex;align-items:center;height:50%;text-align:center;justify-content:center;font-size:1.8rem}.gdpr-popup__text--upper[_ngcontent-%COMP%], .gdpr-popup__text--bottom[_ngcontent-%COMP%]{width:100%}.gdpr-popup__text--upper[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover, .gdpr-popup__text--bottom[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{cursor:pointer}.gdpr-popup__text--bottom[_ngcontent-%COMP%]{margin-top:2rem}.gdpr-popup__container--checkboxes[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap;padding:1rem}@media only screen and (max-width: 480px){.gdpr-popup__container--checkboxes[_ngcontent-%COMP%]{padding:0}}.gdpr-popup__container--checkbox-accept-refuse[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;justify-content:flex-end;align-items:center}.gdpr-popup__container--checkbox-accept-refuse[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0 .5rem;font-size:1.4rem}.gdpr-popup__button--continue[_ngcontent-%COMP%], .gdpr-popup__button--privacy[_ngcontent-%COMP%]{width:20rem;margin:1rem .5rem}.gdpr-popup__container--option[_ngcontent-%COMP%]{width:100%;margin:1rem 0}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]{width:100%;height:5rem;display:flex;flex-flow:row wrap}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]   .title-text-container[_ngcontent-%COMP%]{width:calc(100% - 11rem);display:flex;align-items:center;justify-content:flex-start}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]   .title-text-container[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:flex-start;padding-left:.5rem;font-size:1.4rem}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]   .title-text-container[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{margin:0 .5rem;cursor:pointer}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]   .title-text-container[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{margin-right:.3rem}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]   .title-text-container[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] > span.underlined[_ngcontent-%COMP%]{text-decoration:underline}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]   .option-accept[_ngcontent-%COMP%], .gdpr-popup__container--option[_ngcontent-%COMP%]   .option-title[_ngcontent-%COMP%]   .option-refuse[_ngcontent-%COMP%]{width:5.5rem;height:100%}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-text[_ngcontent-%COMP%]{width:100%;padding-left:1.5rem}.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.2rem}@media only screen and (max-width: 480px){.gdpr-popup__container--option[_ngcontent-%COMP%]   .option-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1rem}}.gdpr-popup__container--button[_ngcontent-%COMP%]{width:100%;min-height:5rem;display:flex;justify-content:center;align-items:center;flex-flow:column nowrap}"]}),n})(),pI=(()=>{var t;class n{constructor(e,i,r){this.userService=e,this.popupService=i,this.store=r}updateSettings(e){var i=this;return f(function*(){const r={};r[e.id]=e.state,yield i.updatePrivacySettings(r)})()}buildOptions(e){return Object.keys(e).map(r=>({id:r,state:e[r]}))}updatePrivacySettings(e){return this.userService.updateSettings({privacy:e})}gdprPopupShow(){this.popupService.dynamicPopupContent({component:d5,popupOptions:{type:Bs.GdprPopup,extraType:hP.Privacy,componentData:{popupType:hP.Privacy}}})}checkIfPrivacyAccepted(){this.store.selectUserPrivacySettings().termsPrivacy||this.gdprPopupShow()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kr),T(Cn),T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Hae=(()=>{var t;class n{constructor(e,i,r){this.gdprService=e,this.store=i,this.popupService=r}unsubscribeFromAdminBonusMail(e){var i=this;return f(function*(){const r={buttonObject:{action:()=>{},buttonTextOptions:{translationKey:"TEXT.OK"}}};if(e)if(e===i.store.selectSimpleProfile().id)try{yield i.updateGdprSettings(),i.popupService.basic({textParams:{translationKey:"SETTINGS.ADMIN_MAIL_UNSUBSCRIBE_SUCCESS"},buttons:r})}catch(s){i.popupService.basic({textParams:{translationKey:"SETTINGS.ADMIN_MAIL_UNSUBSCRIBE_ERROR"},buttons:r}),console.warn(s)}else i.popupService.basic({textParams:{translationKey:"SETTINGS.ADMIN_MAIL_UNSUBSCRIBE_ERROR_WRONG_ID"},buttons:r});else i.popupService.basic({textParams:{translationKey:"SETTINGS.ADMIN_MAIL_UNSUBSCRIBE_ERROR"},buttons:r})})()}updateGdprSettings(){return this.gdprService.updateSettings({id:"adminBonusMail",state:!1})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(pI),T(J),T(Cn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function eKe(t,n){1&t&&(p(0,"div",4),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"SETTINGS.ADMIN_MAIL_UNSUBSCRIBE_SUCCESS")," "))}function tKe(t,n){1&t&&B(0,"loader-image",5),2&t&&l("transparentBG",!0)}function nKe(t,n){1&t&&(p(0,"div",8),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SETTINGS.ADMIN_MAIL_UNSUBSCRIBE_ERROR_WRONG_ID")))}function iKe(t,n){1&t&&(p(0,"div",8),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SETTINGS.ADMIN_MAIL_UNSUBSCRIBE_ERROR")))}function oKe(t,n){if(1&t&&(p(0,"div",6),U(1,nKe,3,3,"div",7)(2,iKe,3,3,"div",7),m()),2&t){const o=_();d(),l("ngIf",!o.foundUser),d(),l("ngIf",o.foundUser)}}let qae=(()=>{var t;class n{constructor(e,i,r){this.route=e,this.appStorage=i,this.adminBonusMailUnsubscribeService=r,this.emailUnsubscribeLoadingState={isLoaded:!1,isLoading:!1,error:void 0}}ngOnInit(){var e=this;return f(function*(){if(e.foundUser=e.appStorage.getItem("user-".concat(e.route.snapshot.params.userId)),e.foundUser)try{e.emailUnsubscribeLoadingState.isLoading=!0,yield e.adminBonusMailUnsubscribeService.updateGdprSettings(),e.emailUnsubscribeLoadingState.isLoading=!1,e.emailUnsubscribeLoadingState.isLoaded=!0}catch(r){e.emailUnsubscribeLoadingState.error=r}else e.emailUnsubscribeLoadingState.error=new Error})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Po),g(Ci),g(Hae))},t.\u0275cmp=pe({type:t,selectors:[["admin-bonus-mail-unsubscribe"]],decls:4,vars:3,consts:[[1,"admin-bonus-email-unsubscribe__container"],["class","admin-bonus-email-unsubscribe__success admin-bonus-email-unsubscribe__message",4,"ngIf"],[3,"transparentBG",4,"ngIf"],["class","admin-bonus-email-unsubscribe__error ",4,"ngIf"],[1,"admin-bonus-email-unsubscribe__success","admin-bonus-email-unsubscribe__message"],[3,"transparentBG"],[1,"admin-bonus-email-unsubscribe__error"],["class","admin-bonus-email-unsubscribe__error__wrong-userId admin-bonus-email-unsubscribe__message",4,"ngIf"],[1,"admin-bonus-email-unsubscribe__error__wrong-userId","admin-bonus-email-unsubscribe__message"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,eKe,3,3,"div",1)(2,tKe,1,1,"loader-image",2)(3,oKe,3,2,"div",3),m()),2&e&&(d(),l("ngIf",!i.emailUnsubscribeLoadingState.error&&i.emailUnsubscribeLoadingState.isLoaded),d(),l("ngIf",i.emailUnsubscribeLoadingState.isLoading&&!i.emailUnsubscribeLoadingState.error),d(),l("ngIf",i.emailUnsubscribeLoadingState.error))},dependencies:[Ne,Oi,qe],styles:[".admin-bonus-email-unsubscribe__container[_ngcontent-%COMP%], .admin-bonus-email-unsubscribe__error[_ngcontent-%COMP%]{height:100%}.admin-bonus-email-unsubscribe__message[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;font-size:1.8rem;text-align:center}"]}),n})();const rKe=[{path:"admin-bonus-mail-unsubscribe/:userId",data:{redirectOptions:{skipRedirect:!0,onlyLogged:!1,skipLogin:!0,relativeUrl:"admin-bonus-mail-unsubscribe/"}},component:qae}];let Wae=(()=>{var t;class n{constructor(e){this.http=e}verify(e){return this.http.post("auth/verifyAccount",{token:e}).toPromise().catch(i=>{throw console.warn("Verify Account error",i),i})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),$ae=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.popup=e,this.router=i,this.activatedRoute=r,this.loader=s,this.registerVerifyService=a,this.store=c,this.constants=u}ngOnInit(){this.verify(this.activatedRoute.snapshot.params.token)}verify(e){this.loader.on(),this.registerVerifyService.verify(e).then(()=>{this.loader.off(),this.popup.show("POPUP.VERIFICATION_COMPLETE"),this.store.dispatch(AP({verified:!0})),this.router.navigate([this.constants.defaultLoggedRoute]).catch(i=>{console.error(i)})}).catch(i=>{this.loader.off(),console.warn(i),this.router.navigate([this.constants.defaultLoggedRoute]).catch(r=>{console.error(r)})})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(on),g(Po),g(ro),g(Wae),g(J),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["register-verify"]],decls:1,vars:0,template:function(e,i){1&e&&B(0,"section")},encapsulation:2}),n})(),Kae=(()=>{var t;class n{canActivate(e){return!!e.params.token}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Zae=[{path:"register-verify/:token",data:{redirectOptions:{skipRedirect:!0,relativeUrl:"register-verify/"}},component:$ae,canActivate:[Kae]}];var $R,Yb=function(t){return t[t.Redirect=0]="Redirect",t[t.Action=1]="Action",t}(Yb||{}),ol=function(t){return t.DailyBonus="bonus",t.AccountMerge="accountMerge",t.PrivateChat="privateChat",t.GlobalChat="globalChat",t.RateDialog="rateDialog",t.FreeRewards="freeRewards",t.GameInvite="gameInvite",t.RedeemPromoCode="redeemPromoCode",t.PromoTournamentInvite="promoTournamentInvite",t.AdminBonusMailUnsubscribe="adminBonusMailUnsubscribe",t.LevelUpRewards="levelUpRewards",t.RegistrationAdventBonus="registrationAdventBonus",t.WatchBannerRewardedVideo="watchBannerRewardedVideo",t}(ol||{}),sKe=__webpack_require__(78808),p5=__webpack_require__.n(sKe);class rl extends Tb{set nonGamblingStyleEnabled(n){rl.nonGamblingStyleEnabled=n}get nonGamblingStyleEnabled(){return rl.nonGamblingStyleEnabled}}($R=rl).defaultLoggedRoute="/games",$R.defaultNotLoggedRoute=function cKe(){return Tb.isFacebookCanvas?"/facebook/splash":"/home"}(),$R.nonGamblingStyleEnabled=!1;class dr{static buildCurrencyTypes(n){let o=[];return Array.isArray(n)?o=n.map(e=>this.checkItem(e)):o.push(dr.checkItem(n)),o}static buildCurrencyTypesFromRewards(n){const o=new Map,e=i=>{var r;const s=this.checkItem(i);s&&o.set(s,!0),null===(r=i.items)||void 0===r||r.forEach(a=>{o.set(this.checkItem(a),!0)}),i.chips&&o.set(ln.Chips,!0),i.gems&&o.set(ln.Gems,!0)};if(Array.isArray(n))for(let i of n)e(i);else e(n);return Array.from(o.keys())}static checkItem(n){return n.type===Fe.TG.ChipPack?ln.Chips:n.type===Fe.TG.GemsPack?ln.Gems:void 0}static buildBoundingRect(n){const o=n.getBoundingClientRect();return{...o,x:o.left+o.width/2,y:o.top+o.height/2}}}let Fc=(()=>{var t;class n{constructor(e,i,r){this.soundService=e,this.urlService=i,this.settings=r,this.chipsAnimSound=this.soundService.createSound({volume:.2,type:Dp.ClientSound,src:this.urlService.getSoundsUrl("chips/chipsWalletAnimSound.mp3"),interruptable:!1})}setChipsAnimCanvasCmpRef(e){this.animCanvasCmpRef=e}createWalletAnimArgs(e){let i=e;if(i||(i=dr.buildBoundingRect(document.body)),!this.walletElCache){const s=document.getElementById("chipsWallet");if(!s)return;const a=s.firstElementChild.lastElementChild.firstElementChild.firstElementChild.firstElementChild.getBoundingClientRect();this.walletElCache={coordinates:a},this.walletElCache.coordinates.x=a.left+a.width/2,this.walletElCache.coordinates.y=a.top+a.width/2}return{fromCoords:i,walletCoords:this.walletElCache.coordinates}}playChipAnimation(e){const i=this.createWalletAnimArgs(e);return i?(this.settings.getSounds()&&this.chipsAnimSound.play(),this.animCanvasCmpRef.playAnimation(ln.Chips,i)):Promise.resolve()}playGemsAnimation(e){const i=this.createWalletAnimArgs(e);return i?(this.settings.getSounds()&&this.chipsAnimSound.play(),this.animCanvasCmpRef.playAnimation(ln.Gems,i)):Promise.resolve()}playAnimations(e,i){if(rl.nonGamblingStyleEnabled||!this.animCanvasCmpRef)return Promise.resolve();let s=[];"string"==typeof e&&(e===ln.Chips||e===ln.Gems)&&(e=[e]);for(let a of e)a===ln.Chips?s.push(this.playChipAnimation(i)):a===ln.Gems&&s.push(this.playGemsAnimation(i));return Promise.all(s).then()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Mo),T(ii),T(nc))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class Nh extends Error{constructor(n={error:null,details:null}){super(),this.message=n.error,this.detail=n.details}}var KR=wi.EGoogleAction;class lKe{constructor(n){this.mobileAppService=n,this.platform=this.mobileAppService.getPlatform(),this.messages=this.mobileAppService.messages()}initApi(n){return Promise.resolve()}login(){return new Promise((n,o)=>{this.messages.google({action:KR.Login},i=>{i&&i.accessToken?(console.log(i),i.googleAvatar&&(this.profileAvatar=i.googleAvatar),n(i)):o(new Nh({error:"Invalid credentials"}))},i=>{console.log(i),o(new Nh(i))})})}isSignedIn(){return new Promise((n,o)=>{this.messages.google({action:KR.IsSignIn},i=>{i&&i.signedIn?(console.log(i),n(i.signedIn)):o(new Nh({error:"Invalid credentials"}))},i=>{console.log(i),o(new Nh(i))})})}getId(){return new Promise((n,o)=>{this.messages.google({action:KR.GetId},i=>{i&&i.userId?(console.log(i),n(i.userId)):o(new Nh({error:"Invalid credentials"}))},i=>{console.log(i),o(new Nh(i))})})}getProfileAvatar(){return new Promise((n,o)=>{n(this.profileAvatar)})}signOut(){return new Promise((n,o)=>{this.messages.google({action:KR.SignOut},i=>{console.log(i),n(i)},i=>{console.log(i),o(new Nh(i))})})}}class uKe{initApi(n){return this.clientId=n,VG.timeoutPromise(5e3,new Promise((o,e)=>{if(!n)return e(new Nh({error:"Empty clientId"}));Th.loadScript("https://accounts.google.com/gsi/client",!0,!0).then(()=>{try{this.gapi=window.google,console.warn("GoogleWebPlugin load success"),o()}catch(i){console.warn(i),e(new Nh(i))}}).catch(i=>{console.warn(i),e(new Nh(i))})}))}isSignedIn(){return Promise.resolve(!0)}signOut(){return Promise.resolve()}login(){return new Promise((n,o)=>{var e;this.client=this.gapi.accounts.oauth2.initTokenClient({client_id:this.clientId,scope:"profile email openid",callback:(e=f(function*(i){if(i.error)return o(new Nh(i.error));try{n({accessToken:i.access_token})}catch(r){console.error(r)}}),function(r){return e.apply(this,arguments)})}),this.client.requestAccessToken()})}}class dKe{constructor(){this.appService=Qt.getInstance,this.googleMethods=this.appService.isMobileApp()?new lKe(this.appService.getMobileAppService()):new uKe}initApi(n){return this.googleMethods.initApi(n)}signOut(){return this.googleMethods.signOut()}login(){return this.googleMethods.login()}isSignedIn(){return this.googleMethods.isSignedIn()}}let ZR=(()=>{var t;class n{constructor(e){this.googleAppId=Lt.CONFIG.social.networks.google.webId,this.appStorageService=e,this.googlePlugin=new dKe}init(){var e=this;return f(function*(){n.initialized||(yield e.googlePlugin.initApi(e.googleAppId),n.initialized=!0)})()}googleLogin(){var e=this;return f(function*(){try{let i=yield e.login();return e.signInResponse=i,i}catch(i){return Promise.reject(i)}})()}googleRegister(){var e=this;return f(function*(){return e.signInResponse||Promise.reject("Empty google accessToken")})()}isGoogleUser(){let e=this.appStorageService.getItem("".concat(Gt.Google,"AuthResponseCredentials")),i=this.appStorageService.getItem("loginType");return!(!e||!i||i!==tl.Google)}isGoogleAuthorized(){var e=this;return f(function*(){return!!e.isGoogleUser()&&null!=e.appStorageService.getItem("".concat(Gt.Google,"AuthResponseCredentials"))})()}logout(){return this.appStorageService.removeItem("".concat(Gt.Google,"AuthResponseCredentials")),this.googlePlugin.signOut()}login(){return this.googlePlugin.login()}}return(t=n).initialized=!1,t.\u0275fac=function(e){return new(e||t)(T(Ci))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class pKe extends Error{constructor(n={error:null,details:null}){super(),this.message=n.error,this.detail=n.details}}var Qae=wi.ETwitterAction;class hKe{constructor(n){this.mobileAppService=n,this.platform=this.mobileAppService.getPlatform(),this.messages=this.mobileAppService.messages()}login(){return new Promise((n,o)=>{const e={action:Qae.Login};this.mobileAppService.messages().twitter(e,i=>n(i),i=>o(new pKe(i)))})}signOut(n,o){return new Promise((e,i)=>{const r={action:Qae.Logout};this.mobileAppService.messages().twitter(r,s=>{e(s)},s=>{i(s)})})}share(n){throw new Error("Method not implemented.")}}class mKe{constructor(n){this.onMessageFromTwitterPopup=o=>{window.removeEventListener("message",this.onMessageFromTwitterPopup);const e=o.data;(o.origin!==window.location.origin||e.denied)&&console.warn("Application Access denied!"),e.oauth_token&&e.oauth_verifier&&(this.twitterTokenPayload.oauth_token=e.oauth_token,this.twitterTokenPayload.oauth_verifier=e.oauth_verifier)},this.httpService=n,this.twitterTokenPayload={oauth_token:void 0,oauth_token_secret:void 0},this.twitterLoginData={accessToken:void 0,accessTokenSecret:void 0}}login(){var n=this;return f(function*(){return n.loginTask||(n.loginTask=new Promise(function(){var o=f(function*(e,i){n.twitterWindow=window.open("","_blank","width=600,height=600");try{n.twitterTokenPayload=(yield n.httpService.post("auth/login/twitter/request-token").toPromise()).body}catch(s){return void i(s)}n.twitterWindow.location.href="https://api.twitter.com/oauth/authenticate?oauth_token="+n.twitterTokenPayload.oauth_token,window.addEventListener("message",n.onMessageFromTwitterPopup),clearInterval(n.twitterWindowInterval),n.twitterWindowInterval=setInterval(f(function*(){if(n.twitterWindow&&n.twitterWindow.closed)if(window.removeEventListener("message",n.onMessageFromTwitterPopup),clearInterval(n.twitterWindowInterval),n.twitterTokenPayload.oauth_verifier){let s;try{s=yield n.accessToken()}catch(a){return void i(a)}s.user_id&&s.screen_name?(n.twitterLoginData={accessToken:s.oauth_token,accessTokenSecret:s.oauth_token_secret,twitterUserId:s.user_id,twitterUserName:s.screen_name},e(n.twitterLoginData)):i("no parsedQuery")}else i("window closed")}),500)});return function(e,i){return o.apply(this,arguments)}}()),n.loginTask.finally(()=>{n.loginTask=void 0,clearInterval(n.twitterWindowInterval)})),n.loginTask})()}signOut(n,o){var e=this;return f(function*(){return e.httpService.post("auth/login/twitter/invalidate-token",{accessToken:n,accessTokenSecret:o}).toPromise()})()}share(n){const r=screen.height,s=screen.width,a=Math.round(s/2-275);let c=0;r>420&&(c=Math.round(r/2-210)),window.open("https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(n)),"intent","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left="+a+",top="+c)}accessToken(){var n=this;return f(function*(){const o={oauthToken:n.twitterTokenPayload.oauth_token,oauthTokenSecret:n.twitterTokenPayload.oauth_token_secret,oauthVerifier:n.twitterTokenPayload.oauth_verifier},e=(yield n.httpService.post("auth/login/twitter/access-token",o).toPromise()).body;return Promise.resolve(e)})()}}class fKe{constructor(n){this.appService=Qt.getInstance,this.httpService=n,this.twitterMethods=this.appService.isMobileApp()?new hKe(this.appService.getMobileAppService()):new mKe(n)}signOut(n,o){return this.twitterMethods.signOut(n,o)}login(){return this.twitterMethods.login()}isLoggedIn(n,o){var e=this;return f(function*(){try{const i={accessToken:n,accessTokenSecret:o},r=(yield e.httpService.post("auth/login/twitter/verify",i).toPromise()).body;return Promise.resolve(!!r)}catch(i){return Promise.reject(i)}})()}share(n){this.twitterMethods.share(n)}}let hI=(()=>{var t;class n{constructor(e,i){this.appStorageService=e,this.twitterPlugin=new fKe(i)}init(){return f(function*(){n.initialized||(n.initialized=!0)})()}twitterLogin(){var e=this;return f(function*(){try{return e.signInResponse=yield e.login(),Promise.resolve(e.signInResponse)}catch(i){return Promise.reject(i)}})()}share(e){this.twitterPlugin.share(e)}twitterRegister(){var e=this;return f(function*(){return e.signInResponse||Promise.reject("Empty twitter accessToken")})()}isTwitterUser(){let e=this.getTwitterLocalStorageCredentials(),i=this.appStorageService.getItem("loginType");return e&&e.accessToken&&e.accessTokenSecret&&i&&i===tl.Twitter}isTwitterAuthorized(){var e=this;return f(function*(){if(!e.isTwitterUser())return!1;try{let i=e.getTwitterLocalStorageCredentials(),r=!!(yield e.isTwitterLoggedIn(i.accessToken,i.accessTokenSecret));return i&&i.accessToken&&i.accessTokenSecret&&r}catch(i){return!1}})()}isTwitterLoggedIn(e,i){var r=this;return f(function*(){return r.twitterPlugin.isLoggedIn(e,i)})()}logout(){const e=this.getTwitterLocalStorageCredentials();return this.clearCredentials(),this.twitterPlugin.signOut(e.accessToken,e.accessTokenSecret)}login(){return this.twitterPlugin.login()}clearCredentials(){this.appStorageService.removeItem("".concat(Gt.Twitter,"AuthResponseCredentials"))}getTwitterLocalStorageCredentials(){return this.appStorageService.getItem("".concat(Gt.Twitter,"AuthResponseCredentials"))}}return(t=n).initialized=!1,t.\u0275fac=function(e){return new(e||t)(T(Ci),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class QR extends Error{constructor(n={error:null,details:null}){super(),this.message=n.error,this.detail=n.details}}var Yae=wi.EAppleAction,gKe=wi.EAppleLoginStatus;class _Ke{constructor(n){this.messages=n.messages()}isSignedIn(){return new Promise((n,o)=>{this.messages.apple({action:Yae.GetLoginStatus},i=>{i&&i.status&&i.status===gKe.Authorized?(console.log(i.status),n(!0)):o(new QR({error:"Invalid credentials"}))},i=>{console.log(i),o(new QR(i))})})}login(){return new Promise((n,o)=>{this.messages.apple({action:Yae.Login},i=>{(!i||!i.user)&&o(new QR({error:"Invalid credentials"})),console.log(i),n(i)},i=>{console.log(i),o(new QR(i))})})}signOut(){var n=this;return f(function*(){n.messages.logout()})()}}let mI=(()=>{var t;class n{constructor(e){this.appStorageService=e,this.applePlugin=new _Ke(Qt.getInstance.getMobileAppService())}init(){return f(function*(){n.initialized||(n.initialized=!0)})()}isSignedIn(){return this.applePlugin.isSignedIn()}login(){var e=this;return f(function*(){try{e.signInResponse=yield e.applePlugin.login()}catch(i){return Promise.reject(i)}return e.signInResponse})()}register(){var e=this;return f(function*(){if(!e.signInResponse)throw new Error("empty apple sign-in data");return e.signInResponse})()}isAppleUser(){let e=this.appStorageService.getItem("".concat(Gt.Apple,"AuthResponseCredentials")).appleId,i=this.appStorageService.getItem("loginType");return!(!e||!i||i!==tl.Apple)}isAppleAuthorized(){var e=this;return f(function*(){if(!e.isAppleUser())return!1;let i,r;try{i=e.appStorageService.getItem("".concat(Gt.Apple,"AuthResponseCredentials")).appleId,r=yield e.isSignedIn()}catch(s){return console.warn("isAppleAuthorized",s),!1}return r&&!!i})()}isSignInPermitted(){if(Qt.getInstance.getPlatform()!==Ut.Ios)return!1;const i=Qt.getInstance.getOsVersion();return i&&i>=13}logout(){var e=this;return f(function*(){return e.appStorageService.removeItem("".concat(Gt.Apple,"AuthResponseCredentials")),e.applePlugin.signOut()})()}}return(t=n).initialized=!1,t.\u0275fac=function(e){return new(e||t)(T(Ci))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var vKe=__webpack_require__(32078),bKe=__webpack_require__(85506);class CKe extends Error{constructor(n={error:null,details:null}){super(),this.message=n.error,this.detail=n.details}}class Jae{constructor(n){this.config=n}getAuthenticateUrl(n,o){const e=this.config.getConfig().social.networks.tamatem,i="".concat(e.endpoint,"/api/o/authorize"),r=e.clientId,s=vKe(n).toString(bKe).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),a=e.codeChallengeMethod;let c=this.getRedirectUrl(o);return"".concat(i,"?client_id=").concat(r,"&response_type=code&redirect_uri=").concat(c,"&code_challenge=").concat(s,"&code_challenge_method=").concat(a)}getRedirectUrl(n){const o=this.config.getConfig().social.networks.tamatem;switch(n){case Ut.Browser:return o.redirectUrl.web;case Ut.Ios:return o.redirectUrl.ios;case Ut.Android:return o.redirectUrl.android;default:return o.redirectUrl.web}}}var yKe=wi.ETamatemAction;class SKe extends Jae{constructor(n,o){super(o),this.appService=n,this.mobileAppService=this.appService.getMobileAppService(),this.messages=this.mobileAppService.messages()}login(){return new Promise((n,o)=>{this.codeVerifier=(0,ie.uuidV4)();const e=super.getAuthenticateUrl(this.codeVerifier,this.appService.getPlatform());this.messages.tamatem({action:yKe.Login,data:{url:e}},r=>{const s={authorizationCode:r.code,codeVerifier:this.codeVerifier,platform:this.appService.getPlatform()};return n(s)},r=>o(new CKe(r)))})}}class wKe extends Jae{constructor(n,o){super(o),this.onMessageFromTamatemPopup=e=>{window.removeEventListener("message",this.onMessageFromTamatemPopup),this.loginResponse=e.data},this.appService=n}login(){var n=this;return this.loginTask||(this.loginTask=new Promise((o,e)=>{this.window=window.open("","_blank","width=600,height=600"),this.codeVerifier=(0,ie.uuidV4)();const i=super.getAuthenticateUrl(this.codeVerifier,this.appService.getPlatform());this.window.location.href=i,window.addEventListener("message",this.onMessageFromTamatemPopup),this.tamatemWindowInterval=setInterval(f(function*(){if(n.window&&n.window.closed)if(window.removeEventListener("message",n.onMessageFromTamatemPopup),clearInterval(n.tamatemWindowInterval),n.loginResponse&&n.loginResponse.code){const r={authorizationCode:n.loginResponse.code,codeVerifier:n.codeVerifier,platform:n.appService.getPlatform()};o(r)}else n.loginResponse&&n.loginResponse.error&&e(n.loginResponse.error),e("window closed")}),500)}),this.loginTask.finally(()=>{this.loginTask=void 0,clearInterval(this.tamatemWindowInterval)})),this.loginTask}}class TKe{constructor(n){this.config=n,this.appService=Qt.getInstance,this.twitterMethods=this.appService.isMobileApp()?new SKe(this.appService,this.config):new wKe(this.appService,this.config)}login(){return this.twitterMethods.login()}}let PKe=(()=>{var t;class n{constructor(e){this.config=e,this.tamatemPlugin=new TKe(this.config)}tamatemLogin(){var e=this;return f(function*(){try{return e.signInResponse=yield e.login(),Promise.resolve(e.signInResponse)}catch(i){return Promise.reject(i)}})()}login(){return this.tamatemPlugin.login()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var IKe=et.Permissions.RequirementNotMeet,MKe=lt.NetworkError,Nw=ve.EButtonModifier,Fw=ve.EIcons;let Jb=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le){var me=this;this.fbService=e,this.userService=i,this.popup=r,this.router=s,this.googleService=a,this.twitterService=c,this.formatNumber=u,this.authListenerService=h,this.toaster=b,this.store=w,this.constants=R,this.appleService=G,this.clientConfigService=K,this.tamatemService=te,this.translateService=ee,this.animationService=le,this.dispose=()=>{this.user=void 0,this.inited=!1,this.authSubscription&&this.authSubscription.unsubscribe(),this.userSubscription&&this.userSubscription.unsubscribe(),this.popup.hide(this.infoPopupId)},this.facebookMerge=()=>{this.loginStatus().then(ge=>{ge.status===aA.Connected?this.sendFacebookMergeData(ge.authResponse.userID,ge.authResponse.accessToken):this.askFacebookConnect()}).catch(ge=>{this.errorHandler(ge)})},this.googleMerge=()=>{this.googleService.googleLogin().then(ge=>{this.sendGoogleMergeData(ge.accessToken)}).catch(ge=>{this.errorHandler(ge)})},this.twitterMerge=()=>{this.twitterService.twitterLogin().then(ge=>{this.sendTwitterMergeData(ge.twitterUserId,ge.accessToken,ge.accessTokenSecret)}).catch(ge=>{this.errorHandler(ge)})},this.emailMerge=()=>{this.openEmailMerge.next(!0)},this.appleMerge=()=>{this.appleService.login().then(ge=>{this.sendAppleMergeData(ge)}).catch(ge=>{this.errorHandler(ge)})},this.tamatemMerge=f(function*(){try{const ge=yield me.tamatemService.tamatemLogin();me.sendTamatemMergeData(ge)}catch(ge){console.log(ge)}}),this.onUserChange=ge=>{this.user=ge,this.updateMergeState()},this.openEmailMerge=new Qn(!1),this.formatNumber=u,this.inited=!1,this.mergeBonus=this.formatNumber.transform(Lt.CONFIG.transactions.bonus.accountMerge.items[0].amount),this.mergeSubject=new Qn({isMerged:!1,hasAvailableMerges:!1})}init(){!0!==this.inited&&(this.attachListeners(),this.inited=!0)}isAccountMerged(){return this.user&&this.user.authentications.length>1}askForMerge(){let e=this.isAccountMerged()?"NO_BONUS_LOGIN_TEXT":"BONUS_LOGIN_TEXT";const i=this.getMergeButtons();this.showMergePopup({buttons:i,textParams:{translationKey:"MERGING_ACCOUNTS.".concat(e),params:[this.mergeBonus]}})}showMergePopup(e){this.infoPopupId=this.popup.merge(e)}sendEmailMergeData(e,i){const s=this.user.bonuses.accountMerge.reward.current;this.userService.mergeAccount({name:Gt.Email,role:kr.REGISTEREDUSER,credentials:{email:e,password:i}}).then(()=>{const a=dr.buildCurrencyTypesFromRewards(s);this.animationService.playAnimations(a),this.updateMergeState(),this.toaster.success("FREE_REWARDS.MERGE_SUCCESSFUL",[this.getAuthProvidersTranslation(Gt.Email)]),console.log("email merge successful")}).catch(a=>{this.errorHandler(a)}),this.closeEmailPopup()}get(){return this.openEmailMerge.asObservable()}mergeState(){return this.mergeSubject.asObservable()}closeEmailPopup(){this.openEmailMerge.next(!1)}isMergeAvailable(){return this.user.authentications.length<5}facebookLogin(){var e=this;return f(function*(){try{const i=yield e.fbService.login(["public_profile","email"]);let r=i.authResponse.userID,s=i.authResponse.accessToken;const a=yield e.fbService.api("".concat(r,"/friends")),c=a&&a.data?a.data.map(u=>u.id):[];e.sendFacebookMergeData(r,s,c)}catch(i){e.errorHandler(i)}})()}askFacebookConnect(){this.infoPopupId=this.popup.confirm({buttons:{action:()=>this.facebookLogin()},textParams:{translationKey:"MERGING_ACCOUNTS.FACEBOOK_ACCOUNT_CONNECT"}})}sendFacebookMergeData(e,i,r){const a=this.user.bonuses.accountMerge.reward.current;this.userService.mergeAccount({name:Gt.Facebook,role:kr.REGISTEREDUSER,credentials:{fbUserId:e,accessToken:i,friends:r}}).then(()=>{const c=dr.buildCurrencyTypesFromRewards(a);this.animationService.playAnimations(c),this.updateMergeState(),this.toaster.success("FREE_REWARDS.MERGE_SUCCESSFUL",[this.getAuthProvidersTranslation(Gt.Facebook)]),console.log("facebook merge successful")}).catch(c=>{this.errorHandler(c)})}sendGoogleMergeData(e){const r=this.user.bonuses.accountMerge.reward.current;this.userService.mergeAccount({name:Gt.Google,role:kr.REGISTEREDUSER,credentials:{accessToken:e}}).then(()=>{const s=dr.buildCurrencyTypesFromRewards(r);this.animationService.playAnimations(s),this.updateMergeState(),this.toaster.success("FREE_REWARDS.MERGE_SUCCESSFUL",[this.getAuthProvidersTranslation(Gt.Google)]),console.log("google merge successful")}).catch(s=>{this.errorHandler(s)})}sendTwitterMergeData(e,i,r){const a=this.user.bonuses.accountMerge.reward.current;this.userService.mergeAccount({name:Gt.Twitter,role:kr.REGISTEREDUSER,credentials:{twitterUserId:e,accessToken:i,accessTokenSecret:r}}).then(()=>{const c=dr.buildCurrencyTypesFromRewards(a);this.animationService.playAnimations(c),this.updateMergeState(),this.toaster.success("FREE_REWARDS.MERGE_SUCCESSFUL",[this.getAuthProvidersTranslation(Gt.Twitter)]),console.log("twitter merge successful")}).catch(c=>{this.errorHandler(c)})}sendAppleMergeData(e){const r=this.user.bonuses.accountMerge.reward.current;this.userService.mergeAccount({name:Gt.Apple,role:kr.REGISTEREDUSER,credentials:{appleId:e.user,authorizationCode:e.authorizationCode}}).then(()=>{const s=dr.buildCurrencyTypesFromRewards(r);this.animationService.playAnimations(s),this.updateMergeState(),this.toaster.success("FREE_REWARDS.MERGE_SUCCESSFUL",[this.getAuthProvidersTranslation(Gt.Apple)]),console.log("apple merge successful")}).catch(s=>{this.errorHandler(s)})}sendTamatemMergeData(e){const r=this.user.bonuses.accountMerge.reward.current;this.userService.mergeAccount({name:Gt.Tamatem,role:kr.REGISTEREDUSER,credentials:e}).then(()=>{const s=dr.buildCurrencyTypesFromRewards(r);this.animationService.playAnimations(s),this.updateMergeState(),this.toaster.success("FREE_REWARDS.MERGE_SUCCESSFUL",[this.getAuthProvidersTranslation(Gt.Tamatem)]),console.log("tamatem merge successful")}).catch(s=>{this.errorHandler(s)})}loginStatus(){var e=this;return f(function*(){return(yield e.fbService.getLoginStatus())||Promise.reject(new Error("Empty Facebook login status "))})()}logOut(){this.router.navigate([this.constants.defaultNotLoggedRoute])}errorHandler(e){let i=jt.createErrorInstance(e);i instanceof IKe&&"uniqueness"===i.requirement?this.infoPopupId=this.popup.decision({buttons:{firstOption:{action:()=>{},buttonTextOptions:{translationKey:"MERGING_ACCOUNTS.CONTINUE"}},secondOption:{action:()=>this.logOut(),buttonTextOptions:{translationKey:"MERGING_ACCOUNTS.LOGOUT"}}},textParams:{translationKey:"MERGING_ACCOUNTS.ALREADY_TAKEN"}}):(e instanceof MKe||e instanceof Mp)&&this.toaster.error("ERRORS.CONNECTION_ERROR"),console.warn(e)}updateMergeState(){this.mergeSubject.next({isMerged:this.isAccountMerged(),hasAvailableMerges:this.isMergeAvailable()})}attachListeners(){this.userSubscription=this.store.subscribeUserState().pipe(bt(Boolean)).subscribe(this.onUserChange),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.dispose)}getMergeButtons(){let e=this.user.authentications;const i=this.clientConfigService.getConfig();let r=[];return Object.keys(i.platform.registrationConfig).forEach(s=>{if(i.platform.registrationConfig[s].enabled&&i.platform.registrationConfig[s].isMergeEnabled)switch(s){case Gt.Apple:this.appleService.isSignInPermitted()&&r.push({buttonModifier:Nw.BUTTON_WHITE,text:"MERGING_ACCOUNTS.APPLE_CONNECT",icon:Fw.APPLE_LOGO,provider:Gt.Apple,action:()=>this.appleMerge(),disabled:!1});break;case Gt.Facebook:r.push({buttonModifier:Nw.BUTTON_FB,text:"MERGING_ACCOUNTS.FACEBOOK_CONNECT",icon:Fw.FACEBOOK_LOGO,provider:Gt.Facebook,action:()=>this.facebookMerge(),disabled:!1});break;case Gt.Google:r.push({buttonModifier:Nw.BUTTON_GOOGLE,text:"MERGING_ACCOUNTS.GOOGLE_CONNECT",icon:Fw.GOOGLE,provider:Gt.Google,action:()=>this.googleMerge(),disabled:!1});break;case Gt.Email:r.push({buttonModifier:Nw.BUTTON_EMAIL,text:"MERGING_ACCOUNTS.EMAIL_CONNECT",icon:Fw.PHONE,provider:Gt.Email,action:()=>this.emailMerge(),disabled:!1});break;case Gt.Twitter:r.push({buttonModifier:Nw.BUTTON_TWITTER,text:"MERGING_ACCOUNTS.TWITTER_CONNECT",icon:Fw.TWITTER_LOGO,provider:Gt.Twitter,action:()=>this.twitterMerge(),disabled:!1});break;case Gt.Tamatem:r.push({buttonModifier:Nw.BUTTON_TAMATEM,text:"MERGING_ACCOUNTS.TAMATEM_CONNECT",icon:Fw.TAMATEM_LOGO,provider:Gt.Tamatem,action:()=>this.tamatemMerge(),disabled:!1})}}),r=r.filter(s=>!e.find(a=>a===s.provider)),r}getAuthProvidersTranslation(e){return this.translateService.instant("SOCIAL_NETWORKS.".concat(e.toUpperCase()))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(km),T(Kr),T(Cn),T(on),T(ZR),T(hI),T(Go),T(xr),T(Dt),T(J),T(tn),T(mI),T(Zt),T(PKe),T(ls),T(Fc))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Xae=function(t){return t.TournamentWon="TournamentWon",t.TournamentLost="TournamentLost",t.TournamentEnded="TournamentEnded",t.TournamentConnectionLost="ConnectionLost",t.TournamentConnectionRestored="ConnectionRestored",t.TournamentStateChange="StateChange",t.TournamentRoomUpdate="tournamentRoomUpdate",t.TournamentGameUpdate="GameUpdate",t}(Xae||{});let ece=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[x4]}),n})();var Cc=function(t){return t.AppStarted="AppStarted",t.AppStarted2="AppStarted2",t.GameFinished="GameFinished",t.GameLobbyOpened="GameLobbyOpened",t.GameLobbyOpened2="GameLobbyOpened2",t.PublicChatOpened="PublicChatOpened",t.MyProfileOpened="MyProfileOpened",t.OtherProfileOpened="OtherProfileOpened",t.DailyBonusOpened="DailyBonusOpened",t.DailyBonusClaimed="DailyBonusClaimed",t.TournamentLobbyOpened="TournamentLobbyOpened",t.StoreOpened="StoreOpened",t.PurchaseCompleted="PurchaseCompleted",t.EnterCustomLobby="EnterCustomLobby",t.EnterLeaderboards="EnterLeaderboards",t.GetSegment="GetSegment",t.RankedLobbyOpen="RankedLobbyOpen",t.ClaimLevelUp="ClaimLevelUP",t}(Cc||{}),od=function(t){return t.Language="lang",t.Country="country",t.LowQualityGraphics="lowQualityGraphics",t.ForceCanvas="forceCanvas",t.Sounds="sounds",t.GameSounds="gameSounds",t.ClientMusic="clientMusic",t.DealerDeck="dealerDeck",t.HiddenProfile="hiddenProfile",t.PremiumGiftNotification="premiumGiftNotification",t.FriendsOnlyChat="friendsOnlyChat",t.Notifications="notifications",t}(od||{}),h5=function(t){return t.Shop="store",t.HiddenShop="promoStore",t}(h5||{}),m5=function(t){return t.DeltaDNALinkClicked="deltaDNALinkClicked",t}(m5||{}),f5=function(t){return t.Click="click",t}(f5||{}),tce=function(t){return t.SideMenu="SideMenu",t.BottomBar="BottomBar",t.DeltaBanner="DeltaBanner",t}(tce||{}),nce=function(t){return t.DeltaBannerClicked="DeltaBannerClicked",t}(nce||{}),g5=function(t){return t.Button="button",t.Link="link",t}(g5||{}),_5=function(t){return t.GAME_WON="Won",t.GAME_LOST="Lost",t}(_5||{}),v5=function(t){return t.Started="Started",t.Finished="Finished",t}(v5||{}),fI=function(t){return t.Started="started",t.Matched="matched",t.Cancel="cancel",t.Timeout="timeout",t}(fI||{}),b5=function(t){return t.RECONNECTED="reconnected",t.TIMEOUT="timeout",t}(b5||{});let sl=(()=>{var t;class n{constructor(e,i,r){this.engageManager=e,this.analyticsDevicePlatform=new Ap,this.platform=this.analyticsDevicePlatform.getPlatform(),this.deviceType=this.analyticsDevicePlatform.getDeviceType(),this.store=i,this.deltaEvent=new sn,this.clientAdsService=r}appStartedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.AppStarted);if(i)return e.engageManager.handle(i)})()}appStartedEngage2(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.AppStarted2);if(i)return e.engageManager.handle(i)})()}getUserSegment(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.GetSegment);if(i)return e.engageManager.handle(i)})()}gameLobbyOpenedEngage(e){var i=this;return f(function*(){const r=yield i.buildEngageModel(Cc.GameLobbyOpened);r&&(r.addParam("gameName",e||"UNKNOWN"),i.engageManager.handle(r))})()}gameLobbyOpenedEngage2(e){var i=this;return f(function*(){const r=yield i.buildEngageModel(Cc.GameLobbyOpened2);r&&(r.addParam("gameName",e||"UNKNOWN"),i.engageManager.handle(r))})()}gameFinishedEngage(e){var i=this;return f(function*(){if(e.tableModel.gameInfo.roomType===Jt.RoomType.BlitzTournament)return;const r=-1!==e.tableModel.gameResult.winners.indexOf(i.store.selectUserState().profile.id)?_5.GAME_WON:_5.GAME_LOST,s=yield i.buildEngageModel(Cc.GameFinished);s&&(s.addParam("matchFinalResult",r||"UNKNOWN").addParam("gameName",e.roomModel.settings.game.name).addParam("matchName",e.roomModel.settings.trackingId).addParam("virtualCurrencyAmount",null==e.tableModel.gameInfo.bet?0:e.tableModel.gameInfo.bet),i.engageManager.handle(s))})()}publicChatOpenedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.PublicChatOpened);i&&e.engageManager.handle(i)})()}myProfileOpenedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.MyProfileOpened);i&&e.engageManager.handle(i)})()}otherProfileOpenedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.OtherProfileOpened);i&&e.engageManager.handle(i)})()}dailyBonusOpenedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.DailyBonusOpened);i&&e.engageManager.handle(i)})()}dailyBonusClaimedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.DailyBonusClaimed);i&&e.engageManager.handle(i)})()}tournamentLobbyOpenedEngage(e){var i=this;return f(function*(){const r=yield i.buildEngageModel(Cc.TournamentLobbyOpened);r&&(r.addParam("gameName",e||"UNKNOWN"),i.engageManager.handle(r))})()}customLobbyOpenedEngage(e){var i=this;return f(function*(){const r=yield i.buildEngageModel(Cc.EnterCustomLobby);r&&(r.addParam("gameName",e||"UNKNOWN"),i.engageManager.handle(r))})()}leaderboardsOpenedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.EnterLeaderboards);i&&e.engageManager.handle(i)})()}storeOpenedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.StoreOpened);i&&e.engageManager.handle(i)})()}levelUpRewardsOpenedEngage(){var e=this;return f(function*(){const i=yield e.buildEngageModel(Cc.ClaimLevelUp);i&&e.engageManager.handle(i)})()}purchaseCompletedEngage(e,i){var r=this;return f(function*(){const s=yield r.buildEngageModel(Cc.PurchaseCompleted);s&&(s.addParam("productID",e.storeProduct.item.id),i&&s.addParam("engagementID",i),r.engageManager.handle(s))})()}rankedLobbyOpenEngage(e){var i=this;return f(function*(){const r=yield i.buildEngageModel(Cc.RankedLobbyOpen);r&&(r.addParam("gameName",e||"UNKNOWN"),i.engageManager.handle(r))})()}buildEngageModel(e){var i=this;return f(function*(){var r,s;if(i.checkValidUser(i.store.selectUserState()))return new Jse(e,i.store.selectUserState().analytics.userId,i.store.selectUserState().analytics.sessionId,i.platform,i.store.selectUserState().settings.lang).addParam("platform",i.platform).addParam("deviceType",i.deviceType).addParam("userLevel",i.store.selectUserState().profile.level).addParam("chipsBalance",i.store.selectUserState().wallet.chips).addParam("gemBalance",i.store.selectUserState().wallet.gems).addParam("gdprMarketing",i.store.selectUserState().settings.privacy.marketing||!1).addParam("gdprProfiling",i.store.selectUserState().settings.privacy.profiling||!1).addParam("gdprTargeting",i.store.selectUserState().settings.privacy.targeting||!1).addParam("gdprTermsPrivacy",i.store.selectUserState().settings.privacy.termsPrivacy||!1).addParam("isVip",!(null===(r=i.store.selectVipStateSync().tiers[Fi.Full])||void 0===r||!r.isActive())).addParam("isPremium",!(null===(s=i.store.selectVipStateSync().tiers[Fi.Premium])||void 0===s||!s.isActive())).addParam("isInClub",!!i.store.clubs.selectClubProfileId()).addParam("acquisitionChannel",i.store.selectUserState().affiliateId||"NONE").addParam("registeredAt",i.store.selectUserState().createdAt).addParam("userRoleEmail",(!!i.store.selectUserState().authentications.find(a=>a===Gt.Email)).toString()).addParam("userRoleMobile",(!!i.store.selectUserState().authentications.find(a=>a===Gt.Mobile)).toString()).addParam("userRoleFacebook",(!!i.store.selectUserState().authentications.find(a=>a===Gt.Facebook)).toString()).addParam("userRoleGoogle",(!!i.store.selectUserState().authentications.find(a=>a===Gt.Google)).toString()).addParam("userRoleTwitter",(!!i.store.selectUserState().authentications.find(a=>a===Gt.Twitter)).toString()).addParam("userRoleApple",(!!i.store.selectUserState().authentications.find(a=>a===Gt.Apple)).toString()).addParam("userRolePhoneNumber",(!!i.store.selectUserState().authentications.find(a=>a===Gt.PhoneNumber)).toString()).addParam("userRoleTamatem",(!!i.store.selectUserState().authentications.find(a=>a===Gt.Tamatem)).toString()).addParam("rewardedVideoReady",yield i.isRewardedVideoReady(e)).addParam("creatorCode",i.store.creatorCode.selectCreatorCode().getActiveCodeValue())})()}isRewardedVideoReady(e){var i=this;return f(function*(){try{var r;const s=i.store.bonuses.videoDeltaBanner.selectState();return(null==s||null===(r=s.requirements)||void 0===r?void 0:r.limit)>0&&e!==Cc.GetSegment&&i.clientAdsService.isRewardedVideoEnabled()&&(yield i.clientAdsService.isRewardedVideoReady(rc.DeltaBanner,2e3))}catch(s){return console.warn(s),!1}})()}emitDeltaEvent(e){this.deltaEvent.next(e)}getDeltaEvent(){return this.deltaEvent}checkValidUser(e){return!!(e&&e.analytics&&e.profile&&e.wallet&&e.roles&&e.roles.length>0&&e.stats&&e.settings&&e.settings.privacy)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(eae),T(Jo),T(bc))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const C5="/hStore";class gI{constructor(){this.eventDispatcher=new tc}onCancel(n){this.eventDispatcher.addEventListener("close",n)}open(n){this.window.location.href=n,this.attachListeners()}load(){this.window=window.open("","_blank")}attachListeners(){this.clearCheckInterval(),this.closeWindowInterval=setInterval(()=>{this.window.closed&&this.close()},500)}clearCheckInterval(){clearInterval(this.closeWindowInterval)}close(){this.clearCheckInterval(),this.window&&(this.window.close(),this.window=null),this.eventDispatcher.emit("close"),this.eventDispatcher.removeAllListeners(),console.log("Detach listeners")}}class OKe{constructor(){this.events=new tc}onFail(n){this.events.addEventListener("fail",n)}onSuccess(n){this.events.addEventListener("success",n)}onCancel(n){this.events.addEventListener("cancel",n)}complete(){this.events.emit("success"),this.unsubscribe()}error(n){this.events.emit("fail",n),this.unsubscribe()}cancel(){this.events.emit("cancel"),this.unsubscribe()}unsubscribe(){this.events.removeAllListeners()}}var rg=function(t){return t.ResetPaymentsState="ResetPaymentsState",t.IAPStart="IAPStart",t.IAPSuccess="IAPSuccess",t.IAPFail="IAPFail",t.IAPOk="IAPOk",t.IAPCompleteUnfinished="IAPCompleteUnfinished",t.IAPCompleteUnfinishedSuccess="IAPCompleteUnfinishedSuccess",t.IAPCompleteUnfinishedError="IAPCompleteUnfinishedError",t}(rg||{});function H_(t){return"[Payments] ".concat(t)}const EKe=he(H_(rg.ResetPaymentsState)),y5=he(H_(rg.IAPStart),{_as:"props",_p:void 0}),_I=he(H_(rg.IAPSuccess),{_as:"props",_p:void 0}),YR=he(H_(rg.IAPFail),{_as:"props",_p:void 0}),ice=he(H_(rg.IAPOk),{_as:"props",_p:void 0}),oce=he(H_(rg.IAPCompleteUnfinished)),rce=he(H_(rg.IAPCompleteUnfinishedSuccess)),sce=he(H_(rg.IAPCompleteUnfinishedError));var S5=function(t){return t.featureKey="payments",t}(S5||{});const vI=ki({selectId:t=>t.product.item.id,sortComparer:!1}),ace={currentTransactions:vI.getInitialState(),lastTransaction:void 0,isCompletingUnfinishedTransactions:!1},xKe=Sr(ace,de(EKe,()=>ace),de(y5,(t,n)=>Se(t,o=>{o.currentTransactions=vI.addOne(n.transaction,o.currentTransactions)})),de(_I,(t,n)=>Se(t,o=>{o.currentTransactions=vI.removeOne(n.transaction.product.item.id,o.currentTransactions),o.lastTransaction=n.transaction})),de(YR,(t,n)=>Se(t,o=>{o.currentTransactions=vI.removeOne(n.transaction.product.item.id,o.currentTransactions)})),de(oce,t=>Se(t,n=>{n.isCompletingUnfinishedTransactions=!0})),de(rce,sce,t=>Se(t,n=>{n.isCompletingUnfinishedTransactions=!1})));function AKe(t,n){return xKe(t,n)}const w5=Ts(S5.featureKey),RKe=We(w5,t=>t.currentTransactions),cce=We(vI.getSelectors(RKe).selectAll,t=>t),lce=We(w5,t=>t.isCompletingUnfinishedTransactions),uce=We(w5,t=>t.lastTransaction);J.prototype.payments={selectCurrentTransactions:function LKe(){return this.selectSync(cce)}.bind(J.prototype),subscribeCurrentTransactions:function DKe(){return this.select(cce)}.bind(J.prototype),selectIsCompletingUnfinishedTransactions:function BKe(){return this.selectSync(lce)}.bind(J.prototype),subscribeIsCompletingUnfinishedTransactions:function NKe(){return this.select(lce)}.bind(J.prototype),selectLastTransaction:function FKe(){return this.selectSync(uce)}.bind(J.prototype),subscribeLastTransaction:function UKe(){return this.select(uce)}.bind(J.prototype)};let Xl=(()=>{var t;class n{constructor(e){this.store=e}createTransaction(){return new OKe}getProviderId(){return this.providerId}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),GKe=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="apple",this.appService=i,this.messages=this.appService.getMobileAppService().messages()}initTransaction(e){const i={itemId:e.storeProduct.item.id,productId:e.storeProduct.productId.apple,group:e.storeProduct.item.type,receiverUserId:e.receiverId,storeId:e.storeId,type:Qs.getInAppType(e.storeProduct.item.durability),exchangeData:e.exchangeData},r=this.createTransaction();r.correlationId=e.correlationId;const s=new FG({args:i});return s.onSuccess(a=>{console.log("Apple Successful purchase",e.storeProduct.item.id),r.id=a.transactionId,r.storeProduct=e.storeProduct,r.price=a.price,r.complete()}),s.onFail(a=>{a&&404===a.code?r.cancel():(console.error("".concat(this.providerId," startBuyProcedure error"),a,i),r.error(a.description))}),this.messages.store(s),r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),VKe=(()=>{var t;class n extends Xl{constructor(e,i,r){super(e),this.providerId="bcashy",this.http=i,this.communicationService=r}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId;const r=u=>{this.communicationService.removeListener(Ss.SuccessPurchase,s),this.communicationService.removeListener(Ss.FailPurchase,a)},s=u=>{r(),i.currency=u.currency,i.price=u.price,i.complete()},a=u=>{i.error(),r()};let c={itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,customData:e.customData,exchangeData:e.exchangeData};return this.http.post("iap/".concat(this.providerId),c).toPromise().then(u=>{i.id=u.body.transactionId,i.storeProduct=e.storeProduct,this.communicationService.on(Ss.SuccessPurchase,s),this.communicationService.on(Ss.FailPurchase,a)}).catch(u=>{console.error("Bcashy purchase fail",u),i.error(u.message)}),i}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),zKe=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="cafebazaar",this.appService=i,this.messages=this.appService.getMobileAppService().messages()}initTransaction(e){const i={itemId:e.storeProduct.item.id,productId:e.storeProduct.productId.cafebazaar,group:e.storeProduct.item.type,receiverUserId:e.receiverId,type:Qs.getInAppType(e.storeProduct.item.durability),storeId:e.storeId,exchangeData:e.exchangeData},r=this.createTransaction();r.correlationId=e.correlationId;const s=new FG({args:i});return s.onSuccess(a=>{console.log("CafeBazaar Successful purchase",e.storeProduct.item.id),r.id=a.transactionId,r.storeProduct=e.storeProduct,r.price=a.price,r.complete()}),s.onFail(a=>{a&&404===a.code?r.cancel():(console.error("".concat(this.providerId," startBuyProcedure error"),a),r.error())}),this.messages.store(s),r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class sg{static createInitTransactionParams(n){const o={itemId:n.itemId,receiverId:n.receiverId,storeId:n.storeId};return n.customData&&(o.customData=n.customData),n.discountCode&&(o.discountCode=n.discountCode),n.exchangeData&&(o.exchangeData=JSON.stringify(n.exchangeData)),o}}let jKe=(()=>{var t;class n extends Xl{constructor(e,i,r){super(e),this.newTabPaymentWidget=new gI,this.providerId="carry1st",this.http=i,this.communicationService=r,this.carry1stConfig=Lt.CONFIG.transactions.purchases.providers[this.providerId]}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId;const r=c=>{this.communicationService.removeListener(Ss.SuccessPurchase,s),this.communicationService.removeListener(Ss.FailPurchase,a)},s=c=>{r(),i.currency=c.currency,i.price=c.price,i.complete()},a=c=>{r(),i.error()};return this.newTabPaymentWidget.load(),this.initiateTransaction({itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData}).then(c=>{console.log("transactionData",c);const u=this.carry1stConfig.url.replace("{{productBundleId}}",e.storeProduct.productId[this.providerId]).replace("{{username}}",this.store.selectUserState().profile.id);i.id=c.transactionId,i.storeProduct=e.storeProduct,this.newTabPaymentWidget.open(u),this.newTabPaymentWidget.onCancel(()=>{i.cancel(),r()}),console.log("Start ".concat(this.providerId," payment"),u)}).catch(c=>{console.log("".concat(this.providerId," gg error"),c),this.newTabPaymentWidget.close(),i.error(c)}),i}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),HKe=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="caschips",this.http=i}initTransaction(e){let i={receipt:{itemId:e.storeProduct.item.id},receiverId:e.receiverId,storeId:e.storeId,gameName:e.gameId,exchangeData:e.exchangeData};const r=this.createTransaction();return r.correlationId=e.correlationId,this.http.post("iap/".concat(this.providerId),i).toPromise().then(s=>{r.id=s.body.transactionId,r.storeProduct=e.storeProduct,r.currency=s.body.currency,r.price=s.body.price,r.complete()}).catch(s=>{console.error("Caschips purchase fail",s),r.error(s.message)}),r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),qKe=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="casgems",this.http=i}initTransaction(e){let i={receipt:{itemId:e.storeProduct.item.id},receiverId:e.receiverId,storeId:e.storeId,gameName:e.gameId,exchangeData:e.exchangeData};const r=this.createTransaction();return r.correlationId=e.correlationId,this.http.post("iap/".concat(this.providerId),i).toPromise().then(s=>{r.id=s.body.transactionId,r.storeProduct=e.storeProduct,r.currency=s.body.currency,r.price=s.body.price,r.complete()}).catch(s=>{console.error("Casgems purchase fail",s),r.error(s.message)}),r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),WKe=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="code",this.http=i}initTransaction(e){const i=this.createTransaction();if(i.correlationId=e.correlationId,!e||!e.itemParams.promoCode)return i.error("Invalid code"),i;let r={receipt:{itemId:e.storeProduct.item.id},receiverId:e.receiverId,storeId:e.storeId,code:e.itemParams.promoCode,exchangeData:e.exchangeData};return this.http.post("iap/".concat(this.providerId),r).toPromise().then(s=>{i.id=s.body.transactionId,i.storeProduct=e.storeProduct,i.currency=s.body.currency,i.price=s.body.price,i.complete()}).catch(s=>{console.error("Promo code purchase fail",s),i.error(jt.createErrorInstance(s).name)}),i}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),$Ke=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="easypay",this.http=i}initTransaction(e){const i=this.createTransaction();return i.correlationId=e.correlationId,this.initiateTransaction({itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData}).catch(r=>{console.log("Easypay gg error",r),i.error(r)}),i}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),KKe=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="epay",this.epayConfig=Lt.CONFIG.transactions.purchases.providers.epay,this.epayFormId="epay-form",this.http=i}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId,this.attachListeners(),this.epayWindow=window.open("","_blank");const r={itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData};return e&&e.itemParams&&e.itemParams.promoCode&&(r.discountCode=e.itemParams.promoCode),this.initiateTransaction(r).then(s=>{this.createEpayForm({description:null,encoded:s.customData.params,encoding:"utf8",page:"paylogin",checksum:s.customData.checksum},this.epayWindow).submit(),this.removeEpayForm()}).catch(s=>{console.error("Epay gg error",s),this.detachListeners(),this.epayWindow.close(),this.epayWindow=null,i.error(s)}),i}attachListeners(){this.clearCheckInterval(),this.epayWindowInterval=setInterval(()=>{this.epayWindow.closed&&this.detachListeners()},500)}detachListeners(){this.clearCheckInterval()}clearCheckInterval(){clearInterval(this.epayWindowInterval)}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}createEpayForm(e,i){this.removeEpayForm();const r=i.document.createElement("form");i.document.body.appendChild(r);const s=i.document.createElement("button");s.setAttribute("type","submit"),s.setAttribute("id","epayGGButton"),r.appendChild(s),r.id=this.epayFormId,r.method="POST",r.target="",r.action=this.epayConfig.url;for(let a in e)if(!0===e.hasOwnProperty(a)){const c=i.document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name",a),c.setAttribute("value",e[a]),r.appendChild(c)}return r}removeEpayForm(){const e=document.getElementById(this.epayFormId);null!=e&&e.parentElement.removeChild(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var T5;!function(t){class n extends Error{constructor(e){super(),this.code=e.code,this.description=e.description,this.name="MobileStoreError"}}t.MobileStoreError=n}(T5||(T5={}));let YKe=(()=>{var t;class n extends Xl{constructor(e,i,r,s,a){super(e),this.providerId="facebook",this.http=i,this.facebookService=r,this.communicationService=s,this.constants=a}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId;const r=u=>{this.communicationService.removeListener(Ss.SuccessPurchase,s),this.communicationService.removeListener(Ss.FailPurchase,a)},s=u=>{r(),i.currency=u.currency,i.price=u.price,i.complete()},a=u=>{r(),i.error()};return this.initiateTransaction({itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData}).then(u=>{this.openFacebookUi(e.storeProduct.item.id,u.transactionId).then(()=>{i.id=u.transactionId,i.storeProduct=e.storeProduct,this.communicationService.on(Ss.SuccessPurchase,s),this.communicationService.on(Ss.FailPurchase,a)}).catch(h=>{console.error("Facebook ui cancel:",h),i.cancel()})}).catch(u=>{console.error("Facebook initTransaction error",u),i.error()}),i}initiateTransaction(e){return this.http.get("iap/facebook",{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}openFacebookUi(e,i){let s="In-game item for {1}".replace("{1}",Lt.CONFIG.platform.name),a="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname).concat(this.constants.imagesPath,"/shop/items/inApp.png?v=").concat(Date.now());const c={method:KS.FacebookPay,action:Ite.PurchaseItem,product:encodeURI("".concat(Lt.CONFIG.platform.endPoints.api,"iap/facebook/").concat(e,"?title=").concat("Offer","&descr=").concat(s,"&imgUrl=").concat(a)),request_id:i};return this.facebookService.ui(c)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(km),T(Ri),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),XKe=(()=>{var t;class n extends Xl{constructor(e,i,r){super(e),this.providerId="fortumo",this.http=r,this.device=i,this.loaded=!1,this.isMobileBrowser=this.device.isMobile()}init(){return this.openPopup(),new Promise((e,i)=>{Th.loadScript("./libs/other/loader.js").then(()=>{window.loadFortumo(()=>{this.loaded=!0,e()})}).catch(r=>{i(r)})})}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId;const r={itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData};return this.isMobileBrowser&&(this.fortumoWindow=window.open("","_blank")),this.initiateTransaction(r).then(s=>{this.buildRel(e.storeProduct,s.transactionId),this.loaded||this.init().then(()=>{this.isMobileBrowser?this.mobileBrowserFlow():document.getElementById("fmp-button").click()})}).catch(s=>{console.error("".concat(this.providerId," startBuyProcedure error"),s),this.onTransactionFailed(),i.error(s)}),i}onTransactionSuccessful(e){this.detachListeners(),this.fortumoWindow=null}onTransactionFailed(){this.detachListeners(),this.fortumoWindow=null}cancelTransaction(...e){console.log("".concat(this.providerId," transaction cancelled.")),this.detachListeners()}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}openPopup(){let e=document.createElement("a");e.id="fmp-button",e.href="#",e.className="fmpboxElement",e.rel=this.getRelLink(),document.body.appendChild(e)}mobileBrowserFlow(){const e=this.getRelLink();this.fortumoWindow.location.href="".concat("http://pay.fortumo.com/mobile_payments","/").concat(e),this.attachListeners()}buildRel(e,i){this.relLink="".concat(e.productId[this.providerId],"?cuid=").concat(i)}getRelLink(){return this.relLink}attachListeners(){this.clearCheckInterval(),this.closeWindowInterval=setInterval(()=>{this.fortumoWindow.closed&&(this.cancelTransaction(),this.detachListeners())},500)}detachListeners(){this.clearCheckInterval()}clearCheckInterval(){clearInterval(this.closeWindowInterval)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Kl),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),eZe=(()=>{var t;class n extends Xl{constructor(e,i){super(e),this.providerId="google",this.appService=i,this.messages=this.appService.getMobileAppService().messages()}initTransaction(e){var i;let r;const s=null===(i=this.store.selectSimpleProfile().vip.custom)||void 0===i?void 0:i.subscription;e.storeProduct.item.durability===Fe.XM.Subscription&&(r=this.getSubscriptionStrategy(e.storeProduct.item.type));const a={itemId:e.storeProduct.item.id,productId:e.storeProduct.productId.google,group:e.storeProduct.item.type,receiverUserId:e.receiverId,storeId:e.storeId,type:Qs.getInAppType(e.storeProduct.item.durability),exchangeData:e.exchangeData,previousGroup:null!=s&&s.isActive?s.item.type:void 0,strategy:r},c=this.createTransaction();c.correlationId=e.correlationId;const u=new FG({args:a});return u.onSuccess(h=>{console.log("Google Successful purchase",e.storeProduct.item.id),c.id=null==h?void 0:h.transactionId,c.storeProduct=e.storeProduct,c.price=h.price,c.complete()}),u.onFail(h=>{h&&404===h.code?c.cancel():(console.error("".concat(this.providerId," startBuyProcedure error"),h),c.error())}),this.messages.store(u),c}getSubscriptionStrategy(e){var i;const r=null===(i=this.store.selectSimpleProfile().vip.custom)||void 0===i?void 0:i.subscription;switch(Qs.getSubscriptionPurchaseType(null!=r&&r.isActive?r.item.type:void 0,e,OU.Vip)){case v_.Crossgrade:return wi.EProrationMode.ChargeFullPrice;case v_.Downgrade:return wi.EProrationMode.Deferred;case v_.Upgrade:return wi.EProrationMode.ChargeProratedPrice;default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),tZe=(()=>{var t;class n extends Xl{constructor(e,i,r){super(e),this.newTabPaymentWidget=new gI,this.providerId="paypal",this.http=i,this.communicationService=r,this.paypalConfig=Lt.CONFIG.transactions.purchases.providers.paypal}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId;const r=c=>{this.communicationService.removeListener(Ss.SuccessPurchase,s),this.communicationService.removeListener(Ss.FailPurchase,a)},s=c=>{r(),i.currency=c.currency,i.price=c.price,i.complete()},a=c=>{r(),i.error()};return this.newTabPaymentWidget.load(),this.initiateTransaction({itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData}).then(c=>{const u=this.paypalConfig.endpoint.replace("{{externalId}}",e.storeProduct.productId.paypal).replace("{{transactionId}}",c.transactionId);i.id=c.transactionId,i.storeProduct=e.storeProduct,this.newTabPaymentWidget.open(u),this.communicationService.on(Ss.SuccessPurchase,s),this.communicationService.on(Ss.FailPurchase,a),this.newTabPaymentWidget.onCancel(()=>{i.cancel(),r()}),console.log("Start paypal payment",u)}).catch(c=>{console.log("Paypal gg error",c),this.newTabPaymentWidget.close(),i.error(c)}),i}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class nZe{constructor(){this.xsollaConfig=Lt.CONFIG.transactions.purchases.providers.xsolla,this.eventDispatcher=new Ep,this.close=()=>{XPayStationWidget&&XPayStationWidget.off(),this.eventDispatcher.emit("close"),this.eventDispatcher.removeAllListeners()}}onCancel(n){this.eventDispatcher.addEventListener("close",n)}open(n){const o={access_token:n,sandbox:this.xsollaConfig.sandbox};XPayStationWidget.on(XPayStationWidget.eventTypes.CLOSE,this.close),XPayStationWidget.init(o),XPayStationWidget.open()}load(){return void 0===window.XPayStationWidget?Th.loadScript("https://static.xsolla.com/embed/paystation/1.0.7/widget.min.js",!0).then(()=>{}).catch(n=>console.error("Xsolla script loading error: ",n)):Promise.resolve()}}class iZe{constructor(){this.xsollaConfig=Lt.CONFIG.transactions.purchases.providers.xsolla,this.newTabPaymentWidget=new gI}onCancel(n){this.newTabPaymentWidget.onCancel(n)}open(n){this.newTabPaymentWidget.open(this.xsollaConfig.url.replace("{{token}}",n))}load(){return this.newTabPaymentWidget.load(),Promise.resolve()}close(){this.newTabPaymentWidget.close()}}let JR=(()=>{var t;class n extends Xl{constructor(e,i,r,s){super(e),this.providerId="xsolla",this.http=i,this.communicationService=r,this.xsollaStation=s.isMobile()?new iZe:new nZe}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId;const r=c=>{this.communicationService.removeListener(Ss.SuccessPurchase,s),this.communicationService.removeListener(Ss.FailPurchase,a)},s=c=>{r(),i.currency=c.currency,i.price=c.price,i.storeProduct=e.storeProduct,i.complete()},a=c=>{r(),i.error()};return this.xsollaStation.load().then(()=>{const c={itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData};e&&e.itemParams&&e.itemParams.promoCode&&(c.discountCode=e.itemParams.promoCode),this.initiateTransaction(c).then(u=>{i.id=u.transactionId,i.storeProduct=e.storeProduct,this.communicationService.on(Ss.SuccessPurchase,s),this.communicationService.on(Ss.FailPurchase,a),this.xsollaStation.open(u.customData.token),this.xsollaStation.onCancel(()=>{i.cancel(),r()})}).catch(u=>{this.onTransactionFailed(u),i.error(u)})}).catch(c=>{this.onTransactionFailed(c),i.error(c)}),i}onTransactionFailed(e){console.error("".concat(this.providerId," startBuyProcedure error"),e),this.xsollaStation.close()}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Ri),T(Kl))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),oZe=(()=>{var t;class n extends Xl{constructor(e,i,r,s){super(e),this.clientConfig=s,this.providerId="teracomm",this.http=i,this.communicationService=r,this.teracommWidget=new gI}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId,console.log("".concat(super.getProviderId()," startBuyProcedure(...data: any[]): void"));const r=c=>{this.communicationService.removeListener(Ss.SuccessPurchase,s),this.communicationService.removeListener(Ss.FailPurchase,a)},s=c=>{r(),i.currency=c.currency,i.price=c.price,i.complete()},a=c=>{r(),i.error()};return this.initiateTransaction({itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData}).then(c=>{i.id=c.transactionId,i.storeProduct=e.storeProduct,this.communicationService.on(Ss.SuccessPurchase,s),this.communicationService.on(Ss.FailPurchase,a),this.teracommWidget.load();const u=this.clientConfig.getConfig().transactions.purchases.providers.teracomm,h=new URL(u.url),b=e.storeProduct.productId[this.providerId];h.searchParams.append("cid",b),h.searchParams.append("app_id",u.appId),h.searchParams.append("return_url","".concat(u.returnUrl,"?seed=").concat(c.transactionId,"&sid=").concat(b,"&transactionId=").concat(c.transactionId,"&apiUrl=").concat(this.clientConfig.getEnvironmentEndpoints().apiUrl,"iap/teracomm")),h.searchParams.append("hash",c.exchangeData.signature),this.teracommWidget.open(h.toString()),this.teracommWidget.onCancel(()=>{r(),i.cancel()})}).catch(c=>{console.error("Teracomm initTransaction GG error",c),i.error(c)}),i}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Ri),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),rZe=(()=>{var t;class n extends JR{constructor(e,i,r,s){super(e,i,s,r),this.providerId="xsollacc"}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Kl),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),sZe=(()=>{var t;class n extends JR{constructor(e,i,r,s){super(e,i,s,r),this.providerId="xsollaepay"}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Kl),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),aZe=(()=>{var t;class n extends JR{constructor(e,i,r,s){super(e,i,s,r),this.providerId="xsollapaypal"}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Kl),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var dce=function(t){return t.Self="self",t.PayerAction="payer-action",t}(dce||{});let cZe=(()=>{var t;class n extends Xl{constructor(e,i,r){super(e),this.newTabPaymentWidget=new gI,this.providerId=Zs.PaypalCheckout,this.http=i,this.communicationService=r,this.paypalConfig=Lt.CONFIG.transactions.purchases.providers[Zs.PaypalCheckout]}initTransaction(e){const i=this.createTransaction();i.correlationId=e.correlationId;const r=c=>{this.communicationService.removeListener(Ss.SuccessPurchase,s),this.communicationService.removeListener(Ss.FailPurchase,a)},s=c=>{r(),i.currency=c.currency,i.price=c.price,i.complete()},a=c=>{r(),i.error()};return this.newTabPaymentWidget.load(),this.initiateTransaction({itemId:e.storeProduct.item.id,receiverId:e.receiverId,storeId:e.storeId,exchangeData:e.exchangeData}).then(c=>{const u=c.customData.checkout.links.find(h=>h.rel===dce.PayerAction).href;i.id=c.transactionId,i.storeProduct=e.storeProduct,this.newTabPaymentWidget.open(u),this.communicationService.on(Ss.SuccessPurchase,s),this.communicationService.on(Ss.FailPurchase,a),this.newTabPaymentWidget.onCancel(()=>{i.cancel(),r()}),console.log("Start paypal checkout payment",u)}).catch(c=>{console.log("Paypal checkout gg error",c),this.newTabPaymentWidget.close(),i.error(c)}),i}initiateTransaction(e){return this.http.get("iap/".concat(this.providerId),{params:sg.createInitTransactionParams(e)}).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),lZe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me){this.paymentsDictionary={},this.paymentsDictionary[i.getProviderId()]=e,this.paymentsDictionary[e.getProviderId()]=e,this.paymentsDictionary[r.getProviderId()]=r,this.paymentsDictionary[s.getProviderId()]=s,this.paymentsDictionary[a.getProviderId()]=a,this.paymentsDictionary[K.getProviderId()]=K,this.paymentsDictionary[w.getProviderId()]=w,this.paymentsDictionary[R.getProviderId()]=R,this.paymentsDictionary[G.getProviderId()]=G,this.paymentsDictionary[c.getProviderId()]=c,this.paymentsDictionary[u.getProviderId()]=u,this.paymentsDictionary[h.getProviderId()]=h,this.paymentsDictionary[b.getProviderId()]=b,this.paymentsDictionary[te.getProviderId()]=te,this.paymentsDictionary[ee.getProviderId()]=ee,this.paymentsDictionary[le.getProviderId()]=le,this.paymentsDictionary[me.getProviderId()]=me,this.paymentsDictionary[ge.getProviderId()]=ge,this.paymentsDictionary[Me.getProviderId()]=Me}createPaymentService(e){return this.paymentsDictionary[e]}}return(t=n).\u0275fac=function(e){return new(e||t)(T(KKe),T($Ke),T(YKe),T(tZe),T(cZe),T(JR),T(rZe),T(sZe),T(aZe),T(GKe),T(eZe),T(VKe),T(oZe),T(HKe),T(qKe),T(WKe),T(XKe),T(zKe),T(jKe))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),pce=(()=>{var t;class n{constructor(e,i,r){this.paymentAdapterFactory=e,this.appService=i,this.store=r}initTransaction(e){const i=this.paymentAdapterFactory.createPaymentService(e.providerId).initTransaction(e);i.storeProduct=e.storeProduct,i.correlationId=e.correlationId;const r={product:i.storeProduct,correlationId:i.correlationId};return this.store.dispatch(y5({transaction:r})),i.onSuccess(()=>{this.store.dispatch(_I({transaction:r}))}),i.onCancel(()=>{this.store.dispatch(YR({transaction:r}))}),i.onFail(()=>{this.store.dispatch(YR({transaction:r}))}),i}completeUnfinishedTransactions(){return this.appService.isMobileApp()?new Promise((e,i)=>{const r=new OP;this.store.dispatch(oce()),r.onSuccess(s=>{this.store.dispatch(rce()),e(s)}),r.onFail(s=>{this.store.dispatch(sce()),i(s)}),this.appService.getMobileAppService().messages().store(r)}):Promise.resolve(void 0)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(lZe),T(Qt),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),hce=(()=>{var t;let n=((t=class{constructor(e,i){this.listeners=new is.List,this.onIapOk=r=>{this.store.dispatch(ice({transaction:r}))},this.cs=e,this.store=i}init(){this.listeners.add(this.cs.on(Ss.SuccessPurchase,this.onIapOk))}dispose(){this.listeners.forEach(e=>e.detach()),this.listeners=new is.List}}).\u0275fac=function(e){return new(e||t)(T(Ri),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"init",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[Ri,J])],n),n})(),uZe=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(hce))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[hce],imports:[bu,$r.forFeature(S5.featureKey,AKe)]}),n})();var Xb=function(t){return t.featureKey="shop",t.firstInitialPurchaseCid="firstPurchaseOffer",t}(Xb||{}),Eo=function(t){return t.Promo="promo",t.Iap="iap",t.Customization="customization",t}(Eo||{});class bI{constructor(n){this.item=n.item,this.vCurrency=n.vCurrency,this.prices=n.prices||{},this.group=n.group||"",this.tierBonus=n.tierBonus||0,this.productId=n.productId||{},this.providers=n.providers||[],this.flags=n.flags,this.equipped=n.equipped,this.equippedGames=n.equippedGames||[],this.expiresAt=n.expiresAt||0,this.mobilePrice=n.mobilePrice||void 0}static isInventoryItem(n){return void 0!==Tte.find(o=>o===n)||void 0!==MU.find(o=>o===n)}static isGameInventoryItem(n){return void 0!==MU.find(o=>o===n)}static isGlobalInventoryItem(n){return void 0!==Tte.find(o=>o===n)}}var P5,ci=function(t){return t.BuyItems="buyItems",t.RequestClubDonation="requestClubDonation",t.DonateItems="donateItems",t}(ci||{});!function(t){class n extends Error{constructor(){super(),this.name="MobileShopLoad"}}t.MobileShopLoad=n}(P5||(P5={}));class mce{constructor(n,o){this.messages=n,this.platform=o}getDeviceAccountActiveSubscriptions(){return new Promise((n,o)=>{const e=new nze({currentTime:Bn.instance.getServerTimeMs()});e.onSuccess(i=>n(i)),e.onFail(i=>o(i)),this.messages.store(e)})}finishUnfinishedTransactions(){return new Promise((n,o)=>{const e=new OP;e.onSuccess(()=>n()),e.onFail(i=>o(i)),this.messages.store(e)})}restorePurchases(){return new Promise((n,o)=>{const e=new ize;e.onSuccess(()=>n()),e.onFail(i=>o(i)),this.messages.store(e)})}initializeMobileStore(n){return new Promise((o,e)=>{const i=this.getPaymentProvider(this.platform),r=n.products.filter(c=>!!c.productId[i]).map(c=>({id:c.item.id,product:c.productId,group:c.item.type,type:Qs.getInAppType(c.item.durability)})),s=n.products.filter(c=>c.vCurrency).map(c=>({price:void 0,productId:void 0}));if(!r.length)return o(s);const a=new tze({args:{inAppProducts:r}});a.onSuccess(c=>o([...c,...s])),a.onFail(c=>{console.warn(c),e(new P5.MobileShopLoad)}),this.messages.store(a)})}buildMobileItems(n,o){const e=this.getPaymentProvider(this.platform);if(!o.some(a=>a.productId))return n.products.filter(a=>a.productId[e]||a.vCurrency).map(a=>new bI(a));const r=lw(o,"productId"),s=n.products.filter(a=>{const c=a.productId[e];return c&&r[c]||a.vCurrency}).map(a=>new bI(a));return s.forEach(a=>{if(a.vCurrency)return;const u=r[a.productId[e]];a.mobilePrice=u&&u.price?u.price:"".concat(n.defaultCurrency).concat(a.prices[n.defaultCurrency])}),s}getPaymentProvider(n){switch(n){case Ut.Ios:return"apple";case Ut.Android:return"google";case Ut.Windows:return"windows";case $n.CafeBazaar:return $n.CafeBazaar;default:return null}}}var sc=function(t){return t.ResetShopState="[Shop] Reset shop state",t.GetShop="[Shop] Get shop",t.GetShopSuccess="[Shop] Get shop success",t.GetShopError="[Shop] Get shop error",t.GetActiveDeviceSubscriptions="[Shop] Get active device subscriptions",t.GetActiveDeviceSubscriptionsSuccess="[Shop] Get active device subscriptions success",t.GetActiveDeviceSubscriptionsError="[Shop] Get active device subscriptions error",t.OpenShop="[Shop] Open shop",t.CloseShop="[Shop] Close shop",t.SetShopReceiver="[Shop] Set shop receiver",t.GetDailyDealState="[Shop] Get daily deal",t.GetDailyDealStateSuccess="[Shop] Get daily deal success",t.GetDailyDealStateError="[Shop] Get daily deal error",t.GetFirstPurchaseBundleOffer="[Store] Get first purchase bundle offer",t.GetFirstPurchaseBundleOfferSuccess="[Store] Get first purchase bundle offer success",t.GetFirstPurchaseBundleOfferError="[Store] Get first purchase bundle offer error",t.RestorePurchases="[Shop] Restore purchases",t.RestorePurchasesSuccess="[Shop] Restore purchases success",t.RestorePurchasesError="[Shop] Restore purchases error",t.FirstPurchaseOfferCooldownExpire="[Shop] First purchase offer cooldown expire",t}(sc||{});const dZe=he(sc.ResetShopState),fce=he(sc.GetShop,{_as:"props",_p:void 0}),gce=he(sc.GetShopSuccess,{_as:"props",_p:void 0}),_ce=he(sc.GetShopError,{_as:"props",_p:void 0}),vce=he(sc.GetActiveDeviceSubscriptions),bce=he(sc.GetActiveDeviceSubscriptionsSuccess,{_as:"props",_p:void 0}),Cce=he(sc.GetActiveDeviceSubscriptionsError,{_as:"props",_p:void 0}),yce=he(sc.OpenShop,{_as:"props",_p:void 0}),Sce=he(sc.CloseShop,{_as:"props",_p:void 0}),I5=he(sc.SetShopReceiver,{_as:"props",_p:void 0}),wce=he(sc.GetDailyDealState),Tce=he(sc.GetDailyDealStateSuccess,{_as:"props",_p:void 0}),Pce=he(sc.GetDailyDealStateError,{_as:"props",_p:void 0}),Ice=he(sc.GetFirstPurchaseBundleOffer),Mce=he(sc.GetFirstPurchaseBundleOfferSuccess,{_as:"props",_p:void 0}),Oce=he(sc.GetFirstPurchaseBundleOfferError,{_as:"props",_p:void 0}),Ece=he(sc.RestorePurchases),xce=he(sc.RestorePurchasesSuccess),Ace=he(sc.RestorePurchasesError,{_as:"props",_p:void 0}),Rce=he(sc.FirstPurchaseOfferCooldownExpire);class kce{constructor(n,o,e,i,r){this.happyHourChangedState=new sn,this.getShopRequests={},this.app=n,this.providersConfig=o,this.store=e,this.adapterFactory=i,this.http=r}load(n={}){var o=this;return f(function*(){const e={gameId:n.gameId,useCache:null==n.useCache||n.useCache},i=o.app.getPlatform(),r=o.createGetShopRequestKey(n);try{if(e.useCache&&o.store.shop[o.shopType].selectState().model)return o.store.shop[o.shopType].selectState().model;if(o.getShopRequests[r])return o.getShopRequests[r];o.store.dispatch(fce({shopType:o.shopType}));const s=o.adapterFactory.createAdapter(i).load(e.gameId,o.shopType);o.getShopRequests[r]=s;const a=yield s;return o.store.dispatch(gce({shopType:o.shopType,model:a})),o.setHappyHourStateTimer(),delete o.getShopRequests[r],a}catch(s){throw o.store.dispatch(_ce({shopType:o.shopType,error:s})),delete o.getShopRequests[r],s}})()}closeShop(){var n;null===(n=this.happyHourSubscription)||void 0===n||n.unsubscribe(),this.store.dispatch(Sce({shopType:this.shopType}))}markShopAsOpened(n){this.store.dispatch(yce({receiver:n.receiver||this.store.shop[this.shopType].selectState().receiver||{profile:this.store.selectUserState().profile,gameInventory:this.store.selectUserState().gameInventory},usageIntent:n.usageIntent||{type:ci.BuyItems},shopType:this.shopType}))}openShop(n={}){this.markShopAsOpened(n)}set shopReceiver(n){this.store.dispatch(I5({shopType:this.shopType,receiver:n}))}get shopReceiver(){return this.store.shop[this.shopType].selectState().receiver}updateShopReceiverWithPromise(n){return this.store.dispatch(I5({shopType:this.shopType,receiver:n})),this.store.shop[this.shopType].subscribeState().pipe(Qi(1)).toPromise()}getProvidersByItem(n,o){const e=this.app.getDevicePlatform()||this.app.getPlatform(),i=this.providersConfig.paymentsByPlatform[e];let r=n.paymentProviders;return o.providers&&o.providers.length&&(r=n.paymentProviders.filter(s=>-1!==o.providers.indexOf(s.provider))),r.filter(s=>{if(-1===i.indexOf(s.provider)||!s.active)return!1;if(o.vCurrency)return s.vCurrency;if(s.vCurrency)return!1;const a=o.prices[n.defaultCurrency];return(s.minPaymentAmount||0)<=a&&a<=(void 0!==s.maxPaymentAmount?s.maxPaymentAmount:1/0)})}getShopInventoryCollection(n){const o=new ie.List,e=this.shopReceiver.profile.inventory.items.concat(this.shopReceiver.gameInventory.items).filter(s=>!s.item.giftOnly).map(s=>new bI(s));let i=new ie.List(e).where(s=>-1!==n.indexOf(s.item.type));return this.store.shop[this.shopType].selectNonGiftableShopProducts().filter(s=>-1!==n.indexOf(s.item.type)).map(s=>new bI(s)).forEach(s=>o.add(s)),i.forEach(s=>{let a=o.find(c=>c.item.id===s.item.id);a?(a.equipped=s.equipped,a.equippedGames=s.equippedGames,a.expiresAt=s.expiresAt):(a=s,o.add(s)),a.owned=!0}),o.toArray()}loadDailyDeal(){var n=this;return f(function*(){try{n.store.dispatch(wce());const o=yield n.http.get("store/promo-deal/daily").toPromise().then(e=>e.body);return n.store.dispatch(Tce({product:o})),o}catch(o){throw n.store.dispatch(Pce({error:o})),o}})()}getFirstPurchaseBundleOffer(){var n=this;return f(function*(){try{n.store.dispatch(Ice());const o=yield n.http.get("store/promo-deal/initial").toPromise().then(e=>e.body);return n.store.dispatch(Mce({offer:o})),o}catch(o){throw n.store.dispatch(Oce({error:o})),o}})()}getDeviceAccountActiveSubscriptions(){var n=this;return f(function*(){n.store.dispatch(vce());try{const o=n.store.shop[n.shopType],e=n.app.getPlatform(),i=n.adapterFactory.createAdapter(e);let r,s;if(o.selectState().loadingState.isLoaded)r=o.selectState().model.products,s=yield i.getDeviceAccountActiveSubscriptions();else{const c=yield Promise.all([n.load(),i.getDeviceAccountActiveSubscriptions()]);r=c[0].products,s=c[1]}const a=n.findItemsByPlatform(r,s,e);return n.store.dispatch(bce({items:a})),a}catch(o){throw n.store.dispatch(Cce(o)),o}})()}restorePurchases(){var n=this;return f(function*(){try{n.store.dispatch(Ece()),yield n.adapterFactory.createAdapter(n.app.getPlatform()).restorePurchases(),n.store.dispatch(xce())}catch(o){throw n.store.dispatch(Ace(o)),o}})()}createGetShopRequestKey(n){return this.shopType}getProductIdKeyByPlatform(n){switch(n){case Ut.Android:return Zs.Google;case Ut.Ios:return Zs.Apple;default:return}}findItemsByPlatform(n,o,e){const i=this.getProductIdKeyByPlatform(e);switch(e){case Ut.Android:return n.filter(r=>!!o.find(s=>s.productId===Dw(r.productId[i]).toString())).map(r=>{const s=o.find(a=>a.productId===Dw(r.productId[i]).toString());return{item:r.item,group:s.group,userId:s.userId,isAcknowledged:s.isAcknowledged}});case Ut.Ios:return n.filter(r=>!!o.find(s=>s.productId===r.productId[i])).map(r=>{const s=o.find(a=>a.productId===r.productId[i]);return{item:r.item,group:s.group,isAcknowledged:s.isAcknowledged}});default:return[]}}setHappyHourStateTimer(){var n;if(null===(n=this.happyHourSubscription)||void 0===n||n.unsubscribe(),this.store.shop[this.shopType].selectIsHappyHourEnabled()){const o=this.store.shop[this.shopType].selectState().happyHourViewModel;this.happyHourSubscription=_u(o.timeToNextState()).subscribe(()=>{this.happyHourChangedState.next(),this.setHappyHourStateTimer()})}}}const Uw=new Ot("ShopConfig");class pZe extends mce{constructor(n,o,e){super(n,o),this.webAdapter=e}load(){var n=this;return f(function*(){const o=yield n.webAdapter.load(),e=yield n.initializeMobileStore(o);return o.products=n.buildMobileItems(o,e),o})()}}class hZe{constructor(n){this.http=n}load(){return this.http.get("store/promo").toPromise().then(n=>n.body)}getDeviceAccountActiveSubscriptions(){return Promise.resolve([])}restorePurchases(){return Promise.resolve()}}let Lce=(()=>{var t;class n{constructor(e){this.injector=e}createAdapter(e){switch(e){case Ut.Browser:return this.createWebAdapter();case Ut.Android:case Ut.Ios:case Ut.Windows:return this.createMobileAdapter();default:throw new Error("Unknown promo shop adapter for platform ".concat(e))}}createWebAdapter(){return new hZe(this.injector.get(En))}createMobileAdapter(){const e=this.injector.get(Qt);return new pZe(e.getMobileAppService().messages(),e.getDevicePlatform()||e.getPlatform(),this.createWebAdapter())}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),mZe=(()=>{let t=class{timeToNextState(){return this.activeHours?this.isActive()?1e3*(this.activeHours.to-Bn.instance.getServerTimeS()):1e3*(this.activeHours.from-Bn.instance.getServerTimeS()):0}isActive(){return this.activeHours&&this.activeHours.from<=Bn.instance.getServerTimeS()&&this.activeHours.to>Bn.instance.getServerTimeS()}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"timeToNextState",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isActive",null),t=Qe([ko()],t),t})();const Dce={promo:M5(),iap:M5(),customization:M5(),dailyDeal:{product:void 0,loadingState:{isLoaded:!1,isLoading:!1,error:void 0}},firstPurchaseOffer:{offer:void 0,loadingState:{isLoaded:!1,isLoading:!1,error:void 0},transactionState:{inProgress:!1}},activeDeviceSubscriptions:{items:[],loadingState:{isLoaded:!1,isLoading:!1}},restorePurchases:{inProgress:!1,error:void 0}},fZe=Sr(Dce,de(dZe,()=>Dce),de(fce,(t,n)=>Se(t,o=>{o[n.shopType].loadingState.isLoading=!0})),de(gce,(t,n)=>Se(t,o=>{var e;o[n.shopType].loadingState.isLoading=!1,o[n.shopType].loadingState.error=void 0,o[n.shopType].loadingState.isLoaded=!0,o[n.shopType].model=n.model,o[n.shopType].happyHourViewModel.activeHours=null===(e=n.model)||void 0===e||null===(e=e.happyHour)||void 0===e?void 0:e.activeHours})),de(_ce,(t,n)=>Se(t,o=>{o[n.shopType].loadingState.isLoading=!1,o[n.shopType].loadingState.error=n.error})),de(vce,t=>Se(t,n=>{n.activeDeviceSubscriptions.loadingState.isLoading=!0})),de(bce,(t,n)=>Se(t,o=>{o.activeDeviceSubscriptions.loadingState.isLoading=!1,o.activeDeviceSubscriptions.loadingState.isLoaded=!0,o.activeDeviceSubscriptions.items=n.items})),de(Cce,(t,n)=>Se(t,o=>{o.activeDeviceSubscriptions.loadingState.isLoading=!1,o.activeDeviceSubscriptions.loadingState.error=n.error})),de(I5,(t,n)=>Se(t,o=>{o[n.shopType].receiver=n.receiver})),de(yce,(t,n)=>Se(t,o=>{o[n.shopType].isOpened=!0,o[n.shopType].receiver=n.receiver,o[n.shopType].usageIntent=n.usageIntent})),de(Sce,(t,n)=>Se(t,o=>{o[n.shopType].isOpened=!1,o[n.shopType].receiver=void 0,o[n.shopType].usageIntent=Bce()})),de(wce,t=>Se(t,n=>{n.dailyDeal.loadingState.isLoading=!0})),de(Tce,(t,n)=>Se(t,o=>{o.dailyDeal.loadingState.isLoading=!1,o.dailyDeal.loadingState.error=void 0,o.dailyDeal.loadingState.isLoaded=!0,o.dailyDeal.product=t.iap.model.products.find(e=>e.item.id===n.product.item.id)})),de(Pce,(t,n)=>Se(t,o=>{o.dailyDeal.loadingState.isLoading=!1,o.dailyDeal.loadingState.error=n.error})),de(Ice,t=>Se(t,n=>{n.firstPurchaseOffer.loadingState.isLoading=!0})),de(Mce,(t,n)=>Se(t,o=>{o.firstPurchaseOffer.loadingState.isLoading=!1,o.firstPurchaseOffer.loadingState.error=void 0,o.firstPurchaseOffer.loadingState.isLoaded=!0,o.firstPurchaseOffer.offer={isAvailable:n.offer.isAvailable},n.offer.storeProduct&&(o.firstPurchaseOffer.offer.storeProduct=t.iap.model.products.find(e=>e.item.id===n.offer.storeProduct.item.id))})),de(Oce,(t,n)=>Se(t,o=>{o.firstPurchaseOffer.loadingState.isLoading=!1,o.firstPurchaseOffer.loadingState.error=n.error})),de(Ece,t=>Se(t,n=>{n.restorePurchases.inProgress=!0})),de(xce,t=>Se(t,n=>{n.restorePurchases.inProgress=!1,n.restorePurchases.error=void 0})),de(Ace,(t,n)=>Se(t,o=>{o.restorePurchases.inProgress=!1,o.restorePurchases.error=n.error})),de(y5,(t,n)=>n.transaction.correlationId!==Xb.firstInitialPurchaseCid?t:Se(t,o=>{o.firstPurchaseOffer.transactionState.inProgress=!0})),de(_I,(t,n)=>n.transaction.correlationId!==Xb.firstInitialPurchaseCid?t:Se(t,o=>{o.firstPurchaseOffer.transactionState.inProgress=!1,o.firstPurchaseOffer.offer.isAvailable=!1})),de(Rce,t=>Se(t,n=>{n.firstPurchaseOffer.transactionState.inProgress=!1})));function M5(){return{isOpened:!1,model:void 0,receiver:void 0,usageIntent:Bce(),loadingState:{isLoaded:!1,isLoading:!1,error:void 0},happyHourViewModel:new mZe}}function Bce(){return{type:ci.BuyItems,data:void 0}}function bZe(t,n){return fZe(t,n)}const Gd=Ts(Xb.featureKey),Nce=()=>We(Gd,(t,n)=>t[n]),Fce=()=>We(Gd,(t,n)=>t[n].model?t[n].model.products:[]),Uce=()=>We(Gd,(t,n)=>t[n].model?t[n].model.products.filter(o=>!o.item.giftOnly):[]),Gce=()=>We(Gd,(t,n)=>t[n].loadingState),Vce=We(Gd,t=>t.dailyDeal.loadingState),zce=We(Gd,t=>t.dailyDeal),jce=We(Gd,t=>t.firstPurchaseOffer.loadingState),Hce=We(Gd,t=>t.firstPurchaseOffer),qce=We(Gd,t=>t.activeDeviceSubscriptions),Wce=We(Gd,t=>t.restorePurchases);function O5(t){return this.selectSync(Nce(),t)}function E5(t){return this.select(Nce(),t)}function x5(t){return this.selectSync(Fce(),t)}function A5(t){return this.select(Fce(),t)}function R5(t){return this.selectSync(Gce(),t)}function k5(t){return this.select(Gce(),t)}function L5(t){return this.selectSync(We(Gd,(t,n)=>{var o;return!(null===(o=t[n].model)||void 0===o||!o.products.find(e=>e.item.type===Fe.TG.GemsPack))}),t)}function D5(t){return this.selectSync(We(Gd,(t,n)=>t[n].happyHourViewModel),t)}function B5(t){return this.selectSync(We(Gd,(t,n)=>{var o;return!(null===(o=t[n].happyHourViewModel)||void 0===o||!o.activeHours)&&t[n].happyHourViewModel.timeToNextState()>0}),t)}function N5(t){return this.selectSync(Uce(),t)}function F5(t){return this.select(Uce(),t)}J.prototype.shop={promo:{selectState:O5.bind(J.prototype,Eo.Promo),subscribeState:E5.bind(J.prototype,Eo.Promo),selectShopProducts:x5.bind(J.prototype,Eo.Promo),subscribeShopProducts:A5.bind(J.prototype,Eo.Promo),selectLoadingState:R5.bind(J.prototype,Eo.Promo),subscribeLoadingState:k5.bind(J.prototype,Eo.Promo),selectGemsEnabledState:L5.bind(J.prototype,Eo.Promo),selectHappyHourViewModel:D5.bind(J.prototype,Eo.Promo),selectIsHappyHourEnabled:B5.bind(J.prototype,Eo.Promo),selectNonGiftableShopProducts:N5.bind(J.prototype,Eo.Promo),subscribeNonGiftableShopProducts:F5.bind(J.prototype,Eo.Promo)},iap:{selectState:O5.bind(J.prototype,Eo.Iap),subscribeState:E5.bind(J.prototype,Eo.Iap),selectShopProducts:x5.bind(J.prototype,Eo.Iap),subscribeShopProducts:A5.bind(J.prototype,Eo.Iap),selectLoadingState:R5.bind(J.prototype,Eo.Iap),subscribeLoadingState:k5.bind(J.prototype,Eo.Iap),selectGemsEnabledState:L5.bind(J.prototype,Eo.Iap),selectHappyHourViewModel:D5.bind(J.prototype,Eo.Iap),selectIsHappyHourEnabled:B5.bind(J.prototype,Eo.Iap),selectNonGiftableShopProducts:N5.bind(J.prototype,Eo.Iap),subscribeNonGiftableShopProducts:F5.bind(J.prototype,Eo.Iap)},customization:{selectState:O5.bind(J.prototype,Eo.Customization),subscribeState:E5.bind(J.prototype,Eo.Customization),selectShopProducts:x5.bind(J.prototype,Eo.Customization),subscribeShopProducts:A5.bind(J.prototype,Eo.Customization),selectLoadingState:R5.bind(J.prototype,Eo.Customization),subscribeLoadingState:k5.bind(J.prototype,Eo.Customization),selectGemsEnabledState:L5.bind(J.prototype,Eo.Customization),selectHappyHourViewModel:D5.bind(J.prototype,Eo.Customization),selectIsHappyHourEnabled:B5.bind(J.prototype,Eo.Customization),selectNonGiftableShopProducts:N5.bind(J.prototype,Eo.Customization),subscribeNonGiftableShopProducts:F5.bind(J.prototype,Eo.Customization)},dailyDeal:{selectDailyDealState:function PZe(){return this.selectSync(zce)}.bind(J.prototype),subscribeDailyDealState:function IZe(){return this.select(zce)}.bind(J.prototype),selectDailyDealLoadingState:function wZe(){return this.selectSync(Vce)}.bind(J.prototype),subscribeDailyDealLoadingState:function TZe(){return this.select(Vce)}.bind(J.prototype)},firstPurchaseOffer:{selectFirstPurchaseOfferState:function EZe(){return this.selectSync(Hce)}.bind(J.prototype),subscribeFirstPurchaseOfferState:function xZe(){return this.select(Hce)}.bind(J.prototype),selectFirstPurchaseOfferLoadingState:function MZe(){return this.selectSync(jce)}.bind(J.prototype),subscribeFirstPurchaseOfferLoadingState:function OZe(){return this.select(jce)}.bind(J.prototype)},activeDeviceSubscriptions:{selectActiveDeviceSubscriptions:function RZe(){return this.selectSync(qce)}.bind(J.prototype),subscribeActiveDeviceSubscriptions:function AZe(){return this.select(qce)}.bind(J.prototype)},restorePurchases:{selectRestorePurchasesState:function kZe(){return this.selectSync(Wce)}.bind(J.prototype),subscribeRestorePurchasesState:function LZe(){return this.select(Wce)}.bind(J.prototype)}};let $ce=(()=>{var t;let n=((t=class{constructor(e,i){this.actionListener=e,this.store=i,this.addListener()}onLogout(){clearTimeout(this.timeoutId)}addListener(){this.actionListener.pipe(ai(YR),bt(e=>e.transaction.correlationId===Xb.firstInitialPurchaseCid)).subscribe(()=>this.handleIapFail())}handleIapFail(){this.timeoutId=setTimeout(()=>{this.store.dispatch(Rce())},3e4)}}).\u0275fac=function(e){return new(e||t)(T(yr),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogout",null),n=Qe([Wo(),ue("design:paramtypes",[yr,J])],n),n})(),Kce=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T($ce))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[$ce],imports:[bu,$r.forFeature(Xb.featureKey,bZe)]}),n})(),Zce=(()=>{var t;class n extends kce{constructor(e,i,r,s,a){super(e,i,r,s,a),this.shopType=Eo.Promo}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(Uw),T(J),T(Lce),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:Kce}),n})();class DZe extends mce{constructor(n,o,e){super(n,o),this.webAdapter=e}load(n,o){var e=this;return f(function*(){const i=yield e.webAdapter.load(n,o),r=yield e.initializeMobileStore(i);return i.products=e.buildMobileItems(i,r),i})()}}class BZe{constructor(n){this.http=n}load(n,o){let e;return e=o?"store/general/".concat(o,"/events"):n?"store/game/".concat(n):"store",this.http.get(e).toPromise().then(i=>i.body)}getDeviceAccountActiveSubscriptions(){return Promise.resolve([])}restorePurchases(){return Promise.resolve()}}let U5=(()=>{var t;class n{constructor(e){this.injector=e}createAdapter(e){switch(e){case Ut.Browser:return this.createWebAdapter();case Ut.Android:case Ut.Ios:case Ut.Windows:return this.createMobileAdapter();default:throw new Error("Unknown shop adapter for platform ".concat(e))}}createWebAdapter(){return new BZe(this.injector.get(En))}createMobileAdapter(){const e=this.injector.get(Qt);return new DZe(e.getMobileAppService().messages(),e.getDevicePlatform()||e.getPlatform(),this.createWebAdapter())}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Qce=(()=>{var t;class n extends kce{constructor(e,i,r,s,a){super(e,i,s,r,a),this.shopType=Eo.Iap}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(Uw),T(U5),T(J),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class qm{static compareVipItemTiers(n,o){const e=$S.findIndex(r=>r===n.type),i=$S.findIndex(r=>r===o.type);return e===i?0:e>i?1:-1}static compareVipItemsOrder(n,o){const e=this.compareVipItemTiers(n,o);return 0!==e?e:n.lifeTime>o.lifeTime?1:n.lifeTime<o.lifeTime?-1:0}static getSortedVipItems(n,o){return n.filter(e=>e.item.type===Fe.TG.Vip||e.item.type===Fe.TG.Premium).filter(e=>o!==ci.RequestClubDonation||!!e.productId.apple&&!!e.productId.google).sort((e,i)=>e.item.lifeTime-i.item.lifeTime).sort((e,i)=>e.item.type===i.item.type?0:i.item.type===Fe.TG.Premium?1:-1)}static getVipBonusAmount(n,o){return o?Math.round(n*(o-1)):0}}var rd;!function(t){let n;var e;let o;(e=n=t.EOptionsPosition||(t.EOptionsPosition={})).Before="before",e.After="after",function(e){e[e.Input=0]="Input",e[e.Button=1]="Button"}(o=t.EControlType||(t.EControlType={}))}(rd||(rd={}));const NZe=["customSelectContainer"],FZe=(t,n,o)=>({"width.px":t,"max-height.px":n,transform:o}),UZe=t=>({"max-height.px":t});let G5=(()=>{var t;class n{constructor(e,i,r,s){this.destroy=new ke,this.customSelectDirections=CI,this.maxDefaultHeight=150,this.containerMinOffset=15,r.nativeElement.component=this,this.rulerService=e,this.customSelectService=s,this.cdr=i}ngOnInit(){this.setDefaultPosition()}ngAfterViewInit(){var e;this.customSelectContainerElement=this.customSelectContainer.nativeElement,this.position={minWidth:this.getTargetElementBoundingRect().height,maxHeight:(null===(e=this.config)||void 0===e?void 0:e.maxDefaultHeight)|this.maxDefaultHeight,leftMargin:this.getTargetElementBoundingRect().left,topMargin:this.getTargetElementBoundingRect().top+this.getTargetElementBoundingRect().height},this.appResizeSubscription=this.rulerService.getAppSize().subscribe(i=>{this.setDefaultPosition(),this.getContainerBoundingRect().bottom>i.height&&(this.getTargetElementBoundingRect().top<i.height/2?(this.position.maxHeight=i.height-this.getTargetElementBoundingRect().bottom-this.containerMinOffset,this.customSelectDirection=CI.Bottom):(this.position.topMargin-=this.customSelectContainerElement.clientHeight+this.targetElement.nativeElement.clientHeight,this.customSelectDirection=CI.Top)),this.cdr.detectChanges(),this.getContainerBoundingRect().top<0&&(this.position.maxHeight=this.getTargetElementBoundingRect().top-this.containerMinOffset,this.position.topMargin=this.containerMinOffset,this.cdr.detectChanges())})}ngOnDestroy(){this.appResizeSubscription&&this.appResizeSubscription.unsubscribe()}hide(){this.customSelectService.destroyCustomSelect()}setDefaultPosition(){this.position={minWidth:this.getTargetElementBoundingRect().width,maxHeight:this.maxDefaultHeight,leftMargin:this.getTargetElementBoundingRect().left,topMargin:this.getTargetElementBoundingRect().top+this.getTargetElementBoundingRect().height},this.customSelectDirection=CI.Bottom,this.cdr.detectChanges()}getContainerBoundingRect(){return this.customSelectContainerElement.getBoundingClientRect()}getTargetElementBoundingRect(){return this.targetElement.nativeElement.getBoundingClientRect()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ua),g(Re),g($t),g(Yce))},t.\u0275cmp=pe({type:t,selectors:[["custom-select-wrapper"]],viewQuery:function(e,i){if(1&e&&$e(NZe,5),2&e){let r;je(r=He())&&(i.customSelectContainer=r.first)}},inputs:{templateRef:"templateRef",targetElement:"targetElement",config:"config"},outputs:{destroy:"destroy"},decls:5,vars:11,consts:[[1,"custom-select-wrapper__background",3,"click"],[1,"custom-select-wrapper__container",3,"ngStyle","ngClass"],["customSelectContainer",""],[1,"custom-select-content",3,"ngStyle","ngClass"],[3,"ngTemplateOutlet"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.hide()}),m(),p(1,"div",1,2)(3,"div",3),Un(4,4),m()()),2&e&&(d(),l("ngStyle",_a(5,FZe,i.position.minWidth,i.position.maxHeight,"translate("+i.position.leftMargin+"px,"+i.position.topMargin+"px)"))("ngClass",null!=i.config&&i.config.isWidthAuto?"custom-select-wrapper__container__width":""),d(2),l("ngStyle",ne(9,UZe,i.position.maxHeight))("ngClass",i.customSelectDirection===i.customSelectDirections.Top?"custom-select-content__top":"custom-select-content__bottom"),d(),l("ngTemplateOutlet",i.templateRef))},dependencies:[Xe,qr,Cm],styles:[".custom-select-wrapper__background[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%}.custom-select-wrapper__container[_ngcontent-%COMP%]{position:fixed;width:inherit;height:initial;max-width:98%;top:0;left:0}.custom-select-content[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;max-height:100%}"],changeDetection:0}),n})();var CI=function(t){return t.Top="top",t.Bottom="Bottom",t}(CI||{});let Yce=(()=>{var t;class n{constructor(e,i){this.rootContainerService=e,this.injector=i,this.closeCustomSelect=new sn,this.destroyCustomSelect=()=>{this.customSelectWrapperComponentRef&&(this.closeCustomSelect.next(),this.destroySubscription&&this.destroySubscription.unsubscribe(),this.customSelectCompDestroy(),this.customSelectWrapperComponentRef=void 0)}}openCustomSelect(e,i,r){if(!this.customSelectWrapperComponentRef)return this.customSelectWrapperComponentRef=this.rootContainerService.createComponent(G5,{injector:this.injector}),this.customSelectCompDestroy=this.customSelectWrapperComponentRef.destroy.bind(this.customSelectWrapperComponentRef),this.customSelectWrapperComponentRef.instance.templateRef=e,this.customSelectWrapperComponentRef.instance.targetElement=i,this.customSelectWrapperComponentRef.instance.config=r,this.destroySubscription=this.customSelectWrapperComponentRef.instance.destroy.subscribe(()=>{this.destroyCustomSelect()}),this.customSelectWrapperComponentRef.changeDetectorRef.detectChanges(),this.customSelectWrapperComponentRef.destroy=this.destroyCustomSelect,this.customSelectWrapperComponentRef}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ia),T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const GZe=["*"];let Vd=(()=>{var t;class n{constructor(){this.select=new ke}selectItem(){this.select.emit(this.value)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["custom-select-item"]],hostBindings:function(e,i){1&e&&Y("click",function(){return i.selectItem()})},inputs:{value:"value"},outputs:{select:"select"},ngContentSelectors:GZe,decls:1,vars:0,template:function(e,i){1&e&&(Co(),yo(0))},encapsulation:2,changeDetection:0}),n})();var VZe=ve.EIcons;const zZe=["options"],jZe=["selectedItem"],HZe=["optionContainer"],qZe=t=>({"custom--select__options--visible":t}),WZe=t=>({$implicit:t});let Up=(()=>{var t;class n{constructor(e,i,r,s,a){this.document=s,this.buttonCustomCss="",this.EIcons=VZe,this.EControlType=rd.EControlType,this.destroy=new sn,this.cdr=e,this.translate=i,this.customSelectService=a,this.elementRef=r}ngAfterViewInit(){this.cdr.detectChanges(),this.items.changes.pipe(VT(this.items),wn(this.destroy),es(()=>Ju(...this.items.map(e=>e.select)))).subscribe(e=>{this.selectedValue=e,this.customSelectService.destroyCustomSelect()}),this.customSelectService.closeCustomSelect.pipe(wn(this.destroy)).subscribe(()=>{this.optionsVisible=!1,this.cdr.detectChanges()})}ngOnChanges(){this.cdr.detectChanges()}ngOnDestroy(){clearTimeout(this.timeoutId),this.customSelectService.destroyCustomSelect(),this.destroy.next(),this.destroy.complete()}setOptionsState(e){this.customSelectService.customSelectWrapperComponentRef||(this.optionsVisible=e||!this.optionsVisible,this.cdr.detectChanges(),this.optionsVisible&&this.customSelectService.openCustomSelect(this.optionsRef,this.elementRef,this.config)),this.cdr.detectChanges()}trackBy(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re,4),g(qe),g($t),g(La),g(Yce))},t.\u0275cmp=pe({type:t,selectors:[["custom-select"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,zZe,7),Ho(r,jZe,7),Ho(r,Vd,4)),2&e){let s;je(s=He())&&(i.optionsRef=s.first),je(s=He())&&(i.selectedItem=s.first),je(s=He())&&(i.items=s)}},viewQuery:function(e,i){if(1&e&&$e(HZe,5,Qa),2&e){let r;je(r=He())&&(i.optionContainer=r.first)}},inputs:{config:"config",isWidthAuto:"isWidthAuto",error:"error",buttonCustomCss:"buttonCustomCss"},features:[it],decls:8,vars:13,consts:[[1,"custom-select__wrapper"],[1,"custom-select__container",3,"ngClass"],["data-cy","customSelect",1,"custom-select__input",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"custom-select__dropdown-arrow",3,"ngClass","icon"],[1,"custom-select__error",3,"hidden"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2),Y("click",function(){return i.setOptionsState()}),Un(3,3),B(4,"icon-component",4),p(5,"p",5),H(6),V(7,"translate"),m()()()()),2&e&&(d(),l("ngClass",ne(9,qZe,!0===i.optionsVisible)),d(2),l("ngTemplateOutlet",i.selectedItem)("ngTemplateOutletContext",ne(11,WZe,i.selectedValue)),d(),l("ngClass",i.buttonCustomCss)("icon",i.EIcons.ArrowUp),d(),l("hidden",!i.error),d(),se($(7,7,i.error)))},dependencies:[Xe,qr,Dn,qe],styles:['[_nghost-%COMP%]{display:flex;height:4rem}.custom-select__wrapper[_ngcontent-%COMP%], .custom-select__container[_ngcontent-%COMP%]{position:relative;display:block;width:100%;height:100%}.custom-select__input[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;direction:ltr!important;justify-content:space-between;padding:0 .6rem}.custom-select__input[_ngcontent-%COMP%]   .custom-select__dropdown-arrow[_ngcontent-%COMP%]{transition:transform .2s linear;transform:rotate(-180deg)}.custom-select__error[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;content:"";width:100%;line-height:1.4rem;margin-top:.1rem;padding:.1rem .5rem;font-size:1.25rem;font-weight:400;z-index:1;border-radius:.4rem}.custom-select__error[_ngcontent-%COMP%]:before{position:absolute;top:-.5rem;left:1rem;content:"";width:0;height:0}'],changeDetection:0}),n})();var $Ze=ve.EButtonModifier,KZe=ve.EIcons;function ZZe(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.selectedCity.text))}}function QZe(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.selectCity.placeholder))}}function YZe(t,n){if(1&t&&(Tn(0),U(1,ZZe,3,3,"p",18)(2,QZe,3,3,"p",18),Pn()),2&t){const o=_();d(),l("ngIf",o.selectedCity),d(),l("ngIf",!o.selectedCity)}}function JZe(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",20),Y("select",function(i){return oe(o),re(_(2).cityChange(i))}),p(1,"div",21)(2,"p",22),H(3),V(4,"translate"),m()()()}if(2&t){const o=n.$implicit;l("value",o),d(3),se($(4,2,o.text))}}function XZe(t,n){if(1&t&&U(0,JZe,5,4,"custom-select-item",19),2&t){const o=_();l("ngForOf",o.cityConfig)("ngForTrackBy",o.trackOptionByFn)}}const eQe=()=>({readonly:!0});let tQe=(()=>{var t;class n{constructor(e,i,r,s){this.popupTitleTypes=li,this.popupContainerOptions={customComponentCssClass:"bcashy-form__popup"},this.EIcons=KZe,this.buttonModifier=$Ze,this.disable=!1,this.selectCity={type:rd.EControlType.Input,placeholder:{key:"EDIT_PROFILE.CITY"}},this.clientConfigService=r,this.minLength=2,this.maxNameLength=30,this.maxAddressLength=300,this.maxEmailLength=200,this.maxPhoneLength=20,this.minPhoneLength=10,this.formBuilder=i,this.translation=e,this.formSubmit=new ke,this.close=new ke,this.config=this.clientConfigService.getConfig().transactions.purchases.providers.bcashy.cityConfig,this.cityConfig=this.buildCityConfig(),this.emailPattern=this.clientConfigService.getConfig().core.validations.formFields.email.pattern,this.translatePipe=s}ngOnInit(){this.createBcashyForm()}createBcashyForm(){this.bcashyForm=this.formBuilder.group({name:["",Ln.compose([Ln.maxLength(this.maxNameLength),Ln.minLength(this.minLength),Ln.pattern(/^\s*([A-Za-z]+([.,] |[-']| )?)+[A-Za-z]+\.?\s*$/),Ln.required])],address:["",Ln.compose([Ln.maxLength(this.maxAddressLength),Ln.minLength(this.minLength),Ln.pattern(/^[A-Za-z0-9-,. ]*$/),Ln.required])],city:["",Ln.required],phone:["",Ln.compose([Ln.maxLength(this.maxPhoneLength),Ln.minLength(this.minPhoneLength),Ln.pattern(/^(\+962|\+966)([0-9]([ \-])?)*$/),Ln.required])],email:["",Ln.compose([Ln.pattern(this.emailPattern),Ln.maxLength(this.maxEmailLength),Ln.minLength(this.minLength),Ln.required])]}),this.formError={name:"",address:"",phone:"",email:"",city:""},this.messages={name:{required:"",maxlength:"",minlength:"",pattern:""},phone:{required:"",maxlength:"",minlength:""},email:{required:"",maxlength:"",minlength:"",pattern:""},address:{required:"",minlength:"",maxlength:"",pattern:""},city:{required:""}};let e=this.translation.getParsedTranslation("BCASHY.BCASHY_ERRORS.NAME_EXPLANATION",[this.minLength,this.maxNameLength]),i=this.translation.getParsedTranslation("BCASHY.BCASHY_ERRORS.PHONE_EXPLANATION",[this.minPhoneLength,this.maxPhoneLength]),r=this.translation.getParsedTranslation("BCASHY.BCASHY_ERRORS.PHONE_PATTERN"),s=this.translation.getParsedTranslation("HINTS.EMAIL"),a=this.translation.getParsedTranslation("BCASHY.BCASHY_ERRORS.ADDRESS_EXPLANATION",[this.minLength,this.maxAddressLength]),c=this.translation.getParsedTranslation("EDIT_PROFILE.REQUIRED_FIELD");this.messages.name.required=e,this.messages.name.maxlength=e,this.messages.name.minlength=e,this.messages.name.pattern=e,this.messages.phone.required=i,this.messages.phone.maxlength=i,this.messages.phone.minlength=i,this.messages.phone.pattern=r,this.messages.email.pattern=s,this.messages.email.required=s,this.messages.email.maxlength=s,this.messages.email.minlength=s,this.messages.address.required=a,this.messages.address.maxlength=a,this.messages.address.minlength=a,this.messages.address.pattern=a,this.messages.city.required=c}buy(){if(!1===gc.isFormValid(this.bcashyForm))return this.formErrors();this.disable=!0,this.formSubmit.emit(this.bcashyForm.value)}hide(){this.close.emit()}cityChange(e){this.selectedCity=e,this.bcashyForm.markAsDirty(),this.bcashyForm.patchValue({city:e.value}),this.bcashyForm.controls.city.markAsTouched(),this.currency=this.config[e.value].currency.toUpperCase(),this.itemPrice="".concat(this.item.prices[this.config[e.value].currency])}formErrors(){this.formError={name:"",address:"",phone:"",email:"",city:""};for(let e in gc.getFormErroredFields(this.bcashyForm))if(e)for(let i in this.bcashyForm.controls[e].errors)i&&this.bcashyForm.controls[e].errors[i]&&(this.formError[e]=this.messages[e][i])}buildCityConfig(){const e=[];for(const i in this.config)e.push({value:i,text:{key:"TEXT.".concat(i.toUpperCase())}});return e}trackOptionByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(pi),g(td),g(Zt),g(qe))},t.\u0275cmp=pe({type:t,selectors:[["bcashy-form"]],inputs:{item:"item"},outputs:{formSubmit:"formSubmit",close:"close"},decls:53,vars:57,consts:[[3,"popupContainerOptions","popupContainerOpened"],[3,"popupTitleType","buttonCloseClicked"],[1,"bcsh-wrapper"],[1,"bcsh-explanation"],["novalidate","",1,"bcsh-form",3,"formGroup","ngSubmit"],[1,"bcsh-form__input"],[1,"bcsh-form__label"],["selectedItem",""],["options",""],[1,"bcsh-form__input--content"],[1,"bcsh-form__currency",3,"nativeAttr","placeholder"],[1,"bcsh-form__item-value"],["formControlName","name",3,"icon","errorMessage","placeholder"],["formControlName","phone",3,"icon","errorMessage","placeholder"],["formControlName","address",3,"icon","errorMessage","placeholder"],["formControlName","email",3,"icon","errorMessage","placeholder"],[1,"bcsh-form__container--buttons"],[1,"bcsh-form__button--send",3,"buttonModifier","disabled","type"],[4,"ngIf"],[3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","select"],[1,"bcashy__custom-select__option"],[1,"bcashy__custom-select__text"]],template:function(e,i){1&e&&(p(0,"popup-container",0)(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.hide()}),m(),p(2,"div",2)(3,"span",3),H(4),V(5,"translate"),m(),p(6,"form",4),Y("ngSubmit",function(){return i.buy()}),p(7,"div",5)(8,"div",6),H(9),V(10,"translate"),m(),p(11,"custom-select"),U(12,YZe,3,2,"ng-template",null,7,ft)(14,XZe,1,2,"ng-template",null,8,ft),m()(),p(16,"div",5)(17,"div",6),H(18),V(19,"translate"),m(),p(20,"div",9),B(21,"user-input",10),V(22,"translate"),p(23,"div",11),H(24),m()()(),p(25,"div",5)(26,"div",6),H(27),V(28,"translate"),m(),B(29,"user-input",12),V(30,"translate"),m(),p(31,"div",5)(32,"div",6),H(33),V(34,"translate"),m(),B(35,"user-input",13),V(36,"translate"),m(),p(37,"div",5)(38,"div",6),H(39),V(40,"translate"),m(),B(41,"user-input",14),V(42,"translate"),m(),p(43,"div",5)(44,"div",6),H(45),V(46,"translate"),m(),B(47,"user-input",15),V(48,"translate"),m(),p(49,"div",16)(50,"button-text",17),H(51),V(52,"translate"),m()()()()()),2&e&&(l("popupContainerOptions",i.popupContainerOptions)("popupContainerOpened",!0),d(),l("popupTitleType",i.popupTitleTypes.Logo),d(3),se($(5,30,"BCASHY.EXPLANATION")),d(2),l("formGroup",i.bcashyForm),d(3),se($(10,32,"EDIT_PROFILE.CITY")),d(9),se($(19,34,"PLACEHOLDERS.CURRENCY")),d(3),l("nativeAttr",pt(56,eQe))("placeholder",i.currency||$(22,36,"BCASHY.CHOOSE_CITY")),d(3),se(i.itemPrice),d(3),se($(28,38,"PLACEHOLDERS.NAME")),d(2),l("icon",i.EIcons.USER)("errorMessage",i.formError.name)("placeholder",i.bcashyForm.controls.name.value||$(30,40,"PLACEHOLDERS.NAME")),d(4),se($(34,42,"PLACEHOLDERS.PHONE_NUMBER")),d(2),l("icon",i.EIcons.PHONE)("errorMessage",i.formError.phone)("placeholder",i.bcashyForm.controls.phone.value||$(36,44,"BCASHY.BCASHY_ERRORS.PHONE_PATTERN")),d(4),se($(40,46,"PLACEHOLDERS.ADDRESS")),d(2),l("icon",i.EIcons.HOME)("errorMessage",i.formError.address)("placeholder",i.bcashyForm.controls.address.value||$(42,48,"PLACEHOLDERS.ADDRESS")),d(4),se($(46,50,"PLACEHOLDERS.EMAIL")),d(2),l("icon",i.EIcons.E_MAIL_LOGIN)("errorMessage",i.formError.email)("placeholder",i.bcashyForm.controls.email.value||$(48,52,"PLACEHOLDERS.EMAIL")),d(3),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("disabled",i.disable)("type","submit"),d(),ze("",$(52,54,"BUTTON.BUY")," "))},dependencies:[Mt,Ne,Up,Vd,pn,Ji,Wi,il,Su,Ql,yu,wl,Yl,qe],styles:[".bcsh-form__input[_ngcontent-%COMP%]{height:7.5rem}@media only screen and (max-width: 768px){.bcsh-form__input[_ngcontent-%COMP%]{min-height:6.5rem}}.bcsh-form__input--content[_ngcontent-%COMP%]{display:flex}.bcsh-form__currency[_ngcontent-%COMP%]{flex:1}.bcsh-form__item-value[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center;font-size:1.8rem}.bcsh-wrapper[_ngcontent-%COMP%]{overflow:auto;height:calc(100% - 6rem);padding:0 5%}@media only screen and (max-width: 768px){.bcsh-wrapper[_ngcontent-%COMP%]{height:calc(100% - 5rem)}}.bcsh-form[_ngcontent-%COMP%]{display:block;margin:1rem auto}"],changeDetection:0}),n})(),Jce=(()=>{var t;class n{constructor(e,i){this.rootContainerService=e,this.injector=i}openForm(e){const i=this.rootContainerService.createComponent(tQe,{injector:this.injector});return i.instance.item=e,this.cmpRef=i,i}closeForm(){this.cmpRef&&this.cmpRef.destroy()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ia),T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const XR="chips",ek="gems",Xce="clientShop";var eC=function(t){return t.Expireable="expireable",t.ItemShopBuyable="item-store-buyable",t.WithProviders="with-providers",t}(eC||{});function ag(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ele(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n
/*!
     * GSAP 3.12.2
     * https://greensock.com
     *
     * @license Copyright 2008-2023, GreenSock. All rights reserved.
     * Subject to the terms at https://greensock.com/standard-license or for
     * Club GreenSock members, the agreement issued with that membership.
     * @author: Jack Doyle, jack@greensock.com
    */}var V5,eu,Va,Oa,Vp,$5,K5,sle,lle,qw,OI,zd={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Gw={duration:.5,overwrite:!1,delay:0},Gp=1e8,Us=1e-8,z5=2*Math.PI,nQe=z5/4,iQe=0,tle=Math.sqrt,oQe=Math.cos,rQe=Math.sin,al=function(n){return"string"==typeof n},za=function(n){return"function"==typeof n},cg=function(n){return"number"==typeof n},j5=function(n){return typeof n>"u"},Wm=function(n){return"object"==typeof n},sd=function(n){return!1!==n},H5=function(){return typeof window<"u"},tk=function(n){return za(n)||al(n)},nle="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},tu=Array.isArray,q5=/(?:-?\.?\d|\.)+/gi,ile=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Vw=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,W5=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ole=/[+-]=-?[.\d]+/,rle=/[^,'"\[\]\s]+/gi,sQe=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,jd={},nk={},ale=function(n){return(nk=nC(n,jd))&&Uc},Z5=function(n,o){return console.warn("Invalid property",n,"set to",o,"Missing plugin? gsap.registerPlugin()")},ik=function(n,o){return!o&&console.warn(n)},cle=function(n,o){return n&&(jd[n]=o)&&nk&&(nk[n]=o)||jd},yI=function(){return 0},aQe={suppressEvents:!0,isStart:!0,kill:!1},ok={suppressEvents:!0,kill:!1},cQe={suppressEvents:!0},Q5={},q_=[],Y5={},Hd={},J5={},ule=30,rk=[],X5="",eV=function(n){var e,i,o=n[0];if(Wm(o)||za(o)||(n=[n]),!(e=(o._gsap||{}).harness)){for(i=rk.length;i--&&!rk[i].targetTest(o););e=rk[i]}for(i=n.length;i--;)n[i]&&(n[i]._gsap||(n[i]._gsap=new Ule(n[i],e)))||n.splice(i,1);return n},tC=function(n){return n._gsap||eV(Hp(n))[0]._gsap},dle=function(n,o,e){return(e=n[o])&&za(e)?n[o]():j5(e)&&n.getAttribute&&n.getAttribute(o)||e},ad=function(n,o){return(n=n.split(",")).forEach(o)||n},ac=function(n){return Math.round(1e5*n)/1e5||0},Pl=function(n){return Math.round(1e7*n)/1e7||0},zw=function(n,o){var e=o.charAt(0),i=parseFloat(o.substr(2));return n=parseFloat(n),"+"===e?n+i:"-"===e?n-i:"*"===e?n*i:n/i},lQe=function(n,o){for(var e=o.length,i=0;n.indexOf(o[i])<0&&++i<e;);return i<e},sk=function(){var e,i,n=q_.length,o=q_.slice(0);for(Y5={},q_.length=0,e=0;e<n;e++)(i=o[e])&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},ple=function(n,o,e,i){q_.length&&!eu&&sk(),n.render(o,e,i||eu&&o<0&&(n._initted||n._startAt)),q_.length&&!eu&&sk()},hle=function(n){var o=parseFloat(n);return(o||0===o)&&(n+"").match(rle).length<2?o:al(n)?n.trim():n},mle=function(n){return n},zp=function(n,o){for(var e in o)e in n||(n[e]=o[e]);return n},nC=function(n,o){for(var e in o)n[e]=o[e];return n},fle=function t(n,o){for(var e in o)"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(n[e]=Wm(o[e])?t(n[e]||(n[e]={}),o[e]):o[e]);return n},ak=function(n,o){var i,e={};for(i in n)i in o||(e[i]=n[i]);return e},SI=function(n){var o=n.parent||Oa,e=n.keyframes?function(n){return function(o,e){for(var i in e)i in o||"duration"===i&&n||"ease"===i||(o[i]=e[i])}}(tu(n.keyframes)):zp;if(sd(n.inherit))for(;o;)e(n,o.vars.defaults),o=o.parent||o._dp;return n},gle=function(n,o,e,i,r){void 0===e&&(e="_first"),void 0===i&&(i="_last");var a,s=n[i];if(r)for(a=o[r];s&&s[r]>a;)s=s._prev;return s?(o._next=s._next,s._next=o):(o._next=n[e],n[e]=o),o._next?o._next._prev=o:n[i]=o,o._prev=s,o.parent=o._dp=n,o},ck=function(n,o,e,i){void 0===e&&(e="_first"),void 0===i&&(i="_last");var r=o._prev,s=o._next;r?r._next=s:n[e]===o&&(n[e]=s),s?s._prev=r:n[i]===o&&(n[i]=r),o._next=o._prev=o.parent=null},W_=function(n,o){n.parent&&(!o||n.parent.autoRemoveChildren)&&n.parent.remove&&n.parent.remove(n),n._act=0},iC=function(n,o){if(n&&(!o||o._end>n._dur||o._start<0))for(var e=n;e;)e._dirty=1,e=e.parent;return n},tV=function(n,o,e,i){return n._startAt&&(eu?n._startAt.revert(ok):n.vars.immediateRender&&!n.vars.autoRevert||n._startAt.render(o,!0,i))},hQe=function t(n){return!n||n._ts&&t(n.parent)},_le=function(n){return n._repeat?jw(n._tTime,n=n.duration()+n._rDelay)*n:0},jw=function(n,o){var e=Math.floor(n/=o);return n&&e===n?e-1:e},lk=function(n,o){return(n-o._start)*o._ts+(o._ts>=0?0:o._dirty?o.totalDuration():o._tDur)},uk=function(n){return n._end=Pl(n._start+(n._tDur/Math.abs(n._ts||n._rts||Us)||0))},dk=function(n,o){var e=n._dp;return e&&e.smoothChildTiming&&n._ts&&(n._start=Pl(e._time-(n._ts>0?o/n._ts:((n._dirty?n.totalDuration():n._tDur)-o)/-n._ts)),uk(n),e._dirty||iC(e,n)),n},vle=function(n,o){var e;if((o._time||!o._dur&&o._initted||o._start<n._time&&(o._dur||!o.add))&&(e=lk(n.rawTime(),o),(!o._dur||TI(0,o.totalDuration(),e)-o._tTime>Us)&&o.render(e,!0)),iC(n,o)._dp&&n._initted&&n._time>=n._dur&&n._ts){if(n._dur<n.duration())for(e=n;e._dp;)e.rawTime()>=0&&e.totalTime(e._tTime),e=e._dp;n._zTime=-Us}},$m=function(n,o,e,i){return o.parent&&W_(o),o._start=Pl((cg(e)?e:e||n!==Oa?jp(n,e,o):n._time)+o._delay),o._end=Pl(o._start+(o.totalDuration()/Math.abs(o.timeScale())||0)),gle(n,o,"_first","_last",n._sort?"_start":0),nV(o)||(n._recent=o),i||vle(n,o),n._ts<0&&dk(n,n._tTime),n},ble=function(n,o){return(jd.ScrollTrigger||Z5("scrollTrigger",o))&&jd.ScrollTrigger.create(o,n)},Cle=function(n,o,e,i,r){return dV(n,o,r),n._initted?!e&&n._pt&&!eu&&(n._dur&&!1!==n.vars.lazy||!n._dur&&n.vars.lazy)&&lle!==qd.frame?(q_.push(n),n._lazy=[r,i],1):void 0:1},mQe=function t(n){var o=n.parent;return o&&o._ts&&o._initted&&!o._lock&&(o.rawTime()<0||t(o))},nV=function(n){var o=n.data;return"isFromStart"===o||"isStart"===o},Hw=function(n,o,e,i){var r=n._repeat,s=Pl(o)||0,a=n._tTime/n._tDur;return a&&!i&&(n._time*=s/n._dur),n._dur=s,n._tDur=r?r<0?1e10:Pl(s*(r+1)+n._rDelay*r):s,a>0&&!i&&dk(n,n._tTime=n._tDur*a),n.parent&&uk(n),e||iC(n.parent,n),n},yle=function(n){return n instanceof cd?iC(n):Hw(n,n._dur)},_Qe={_start:0,endTime:yI,totalDuration:yI},jp=function t(n,o,e){var a,c,u,i=n.labels,r=n._recent||_Qe,s=n.duration()>=Gp?r.endTime(!1):n._dur;return al(o)&&(isNaN(o)||o in i)?(c=o.charAt(0),u="%"===o.substr(-1),a=o.indexOf("="),"<"===c||">"===c?(a>=0&&(o=o.replace(/=/,"")),("<"===c?r._start:r.endTime(r._repeat>=0))+(parseFloat(o.substr(1))||0)*(u?(a<0?r:e).totalDuration()/100:1)):a<0?(o in i||(i[o]=s),i[o]):(c=parseFloat(o.charAt(a-1)+o.substr(a+1)),u&&e&&(c=c/100*(tu(e)?e[0]:e).totalDuration()),a>1?t(n,o.substr(0,a-1),e)+c:s+c)):null==o?s:+o},wI=function(n,o,e){var a,c,i=cg(o[1]),r=(i?2:1)+(n<2?0:1),s=o[r];if(i&&(s.duration=o[1]),s.parent=e,n){for(a=s,c=e;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=sd(c.vars.inherit)&&c.parent;s.immediateRender=sd(a.immediateRender),n<2?s.runBackwards=1:s.startAt=o[r-1]}return new yc(o[0],s,o[r+1])},$_=function(n,o){return n||0===n?o(n):o},TI=function(n,o,e){return e<n?n:e>o?o:e},nu=function(n,o){return al(n)&&(o=sQe.exec(n))?o[1]:""},iV=[].slice,Sle=function(n,o){return n&&Wm(n)&&"length"in n&&(!o&&!n.length||n.length-1 in n&&Wm(n[0]))&&!n.nodeType&&n!==Vp},Hp=function(n,o,e){return Va&&!o&&Va.selector?Va.selector(n):!al(n)||e||!$5&&Ww()?tu(n)?function(n,o,e){return void 0===e&&(e=[]),n.forEach(function(i){var r;return al(i)&&!o||Sle(i,1)?(r=e).push.apply(r,Hp(i)):e.push(i)})||e}(n,e):Sle(n)?iV.call(n,0):n?[n]:[]:iV.call((o||K5).querySelectorAll(n),0)},oV=function(n){return n=Hp(n)[0]||ik("Invalid scope")||{},function(o){var e=n.current||n.nativeElement||n;return Hp(o,e.querySelectorAll?e:e===n?ik("Invalid scope")||K5.createElement("div"):n)}},wle=function(n){return n.sort(function(){return.5-Math.random()})},Tle=function(n){if(za(n))return n;var o=Wm(n)?n:{each:n},e=oC(o.ease),i=o.from||0,r=parseFloat(o.base)||0,s={},a=i>0&&i<1,c=isNaN(i)||a,u=o.axis,h=i,b=i;return al(i)?h=b={center:.5,edges:.5,end:1}[i]||0:!a&&c&&(h=i[0],b=i[1]),function(w,R,G){var ee,le,me,ge,Me,Ke,Ee,ot,ct,K=(G||o).length,te=s[K];if(!te){if(!(ct="auto"===o.grid?0:(o.grid||[1,Gp])[1])){for(Ee=-Gp;Ee<(Ee=G[ct++].getBoundingClientRect().left)&&ct<K;);ct--}for(te=s[K]=[],ee=c?Math.min(ct,K)*h-.5:i%ct,le=ct===Gp?0:c?K*b/ct-.5:i/ct|0,Ee=0,ot=Gp,Ke=0;Ke<K;Ke++)me=Ke%ct-ee,ge=le-(Ke/ct|0),te[Ke]=Me=u?Math.abs("y"===u?ge:me):tle(me*me+ge*ge),Me>Ee&&(Ee=Me),Me<ot&&(ot=Me);"random"===i&&wle(te),te.max=Ee-ot,te.min=ot,te.v=K=(parseFloat(o.amount)||parseFloat(o.each)*(ct>K?K-1:u?"y"===u?K/ct:ct:Math.max(ct,K/ct))||0)*("edges"===i?-1:1),te.b=K<0?r-K:r,te.u=nu(o.amount||o.each)||0,e=e&&K<0?Ble(e):e}return K=(te[w]-te.min)/te.max||0,Pl(te.b+(e?e(K):K)*te.v)+te.u}},rV=function(n){var o=Math.pow(10,((n+"").split(".")[1]||"").length);return function(e){var i=Pl(Math.round(parseFloat(e)/n)*n*o);return(i-i%1)/o+(cg(e)?0:nu(e))}},Ple=function(n,o){var i,r,e=tu(n);return!e&&Wm(n)&&(i=e=n.radius||Gp,n.values?(n=Hp(n.values),(r=!cg(n[0]))&&(i*=i)):n=rV(n.increment)),$_(o,e?za(n)?function(s){return r=n(s),Math.abs(r-s)<=i?r:s}:function(s){for(var w,R,a=parseFloat(r?s.x:s),c=parseFloat(r?s.y:0),u=Gp,h=0,b=n.length;b--;)(w=r?(w=n[b].x-a)*w+(R=n[b].y-c)*R:Math.abs(n[b]-a))<u&&(u=w,h=b);return h=!i||u<=i?n[h]:s,r||h===s||cg(s)?h:h+nu(s)}:rV(n))},Ile=function(n,o,e,i){return $_(tu(n)?!o:!0===e?!!(e=0):!i,function(){return tu(n)?n[~~(Math.random()*n.length)]:(e=e||1e-5)&&(i=e<1?Math.pow(10,(e+"").length-2):1)&&Math.floor(Math.round((n-e/2+Math.random()*(o-n+.99*e))/e)*e*i)/i})},Mle=function(n,o,e){return $_(e,function(i){return n[~~o(i)]})},PI=function(n){for(var i,r,s,a,o=0,e="";~(i=n.indexOf("random(",o));)s=n.indexOf(")",i),a="["===n.charAt(i+7),r=n.substr(i+7,s-i-7).match(a?rle:q5),e+=n.substr(o,i-o)+Ile(a?r:+r[0],a?0:+r[1],+r[2]||1e-5),o=s+1;return e+n.substr(o,n.length-o)},Ole=function(n,o,e,i,r){var s=o-n,a=i-e;return $_(r,function(c){return e+((c-n)/s*a||0)})},Ele=function(n,o,e){var s,a,c,i=n.labels,r=Gp;for(s in i)(a=i[s]-o)<0==!!e&&a&&r>(a=Math.abs(a))&&(c=s,r=a);return c},qp=function(n,o,e){var c,u,h,i=n.vars,r=i[o],s=Va,a=n._ctx;if(r)return c=i[o+"Params"],u=i.callbackScope||n,e&&q_.length&&sk(),a&&(Va=a),h=c?r.apply(u,c):r.call(u),Va=s,h},II=function(n){return W_(n),n.scrollTrigger&&n.scrollTrigger.kill(!!eu),n.progress()<1&&qp(n,"onInterrupt"),n},xle=[],Ale=function(n){if(H5()&&n){var o=(n=!n.name&&n.default||n).name,e=za(n),i=o&&!e&&n.init?function(){this._props=[]}:n,r={init:yI,render:mV,add:lV,kill:VQe,modifier:GQe,rawVars:0},s={targetTest:0,get:0,getSetter:hV,aliases:{},register:0};if(Ww(),n!==i){if(Hd[o])return;zp(i,zp(ak(n,r),s)),nC(i.prototype,nC(r,ak(n,s))),Hd[i.prop=o]=i,n.targetTest&&(rk.push(i),Q5[o]=1),o=("css"===o?"CSS":o.charAt(0).toUpperCase()+o.substr(1))+"Plugin"}cle(o,i),n.register&&n.register(Uc,i,ld)}else n&&xle.push(n)},Gs=255,MI={aqua:[0,Gs,Gs],lime:[0,Gs,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Gs],navy:[0,0,128],white:[Gs,Gs,Gs],olive:[128,128,0],yellow:[Gs,Gs,0],orange:[Gs,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Gs,0,0],pink:[Gs,192,203],cyan:[0,Gs,Gs],transparent:[Gs,Gs,Gs,0]},sV=function(n,o,e){return(6*(n+=n<0?1:n>1?-1:0)<1?o+(e-o)*n*6:n<.5?e:3*n<2?o+(e-o)*(2/3-n)*6:o)*Gs+.5|0},Rle=function(n,o,e){var r,s,a,c,u,h,b,w,R,G,i=n?cg(n)?[n>>16,n>>8&Gs,n&Gs]:0:MI.black;if(!i){if(","===n.substr(-1)&&(n=n.substr(0,n.length-1)),MI[n])i=MI[n];else if("#"===n.charAt(0)){if(n.length<6&&(r=n.charAt(1),s=n.charAt(2),a=n.charAt(3),n="#"+r+r+s+s+a+a+(5===n.length?n.charAt(4)+n.charAt(4):"")),9===n.length)return[(i=parseInt(n.substr(1,6),16))>>16,i>>8&Gs,i&Gs,parseInt(n.substr(7),16)/255];i=[(n=parseInt(n.substr(1),16))>>16,n>>8&Gs,n&Gs]}else if("hsl"===n.substr(0,3))if(i=G=n.match(q5),o){if(~n.indexOf("="))return i=n.match(ile),e&&i.length<4&&(i[3]=1),i}else c=+i[0]%360/360,u=+i[1]/100,r=2*(h=+i[2]/100)-(s=h<=.5?h*(u+1):h+u-h*u),i.length>3&&(i[3]*=1),i[0]=sV(c+1/3,r,s),i[1]=sV(c,r,s),i[2]=sV(c-1/3,r,s);else i=n.match(q5)||MI.transparent;i=i.map(Number)}return o&&!G&&(r=i[0]/Gs,s=i[1]/Gs,a=i[2]/Gs,h=((b=Math.max(r,s,a))+(w=Math.min(r,s,a)))/2,b===w?c=u=0:(R=b-w,u=h>.5?R/(2-b-w):R/(b+w),c=b===r?(s-a)/R+(s<a?6:0):b===s?(a-r)/R+2:(r-s)/R+4,c*=60),i[0]=~~(c+.5),i[1]=~~(100*u+.5),i[2]=~~(100*h+.5)),e&&i.length<4&&(i[3]=1),i},kle=function(n){var o=[],e=[],i=-1;return n.split(K_).forEach(function(r){var s=r.match(Vw)||[];o.push.apply(o,s),e.push(i+=s.length+1)}),o.c=e,o},Lle=function(n,o,e){var c,u,h,b,i="",r=(n+i).match(K_),s=o?"hsla(":"rgba(",a=0;if(!r)return n;if(r=r.map(function(w){return(w=Rle(w,o,1))&&s+(o?w[0]+","+w[1]+"%,"+w[2]+"%,"+w[3]:w.join(","))+")"}),e&&(h=kle(n),(c=e.c).join(i)!==h.c.join(i)))for(b=(u=n.replace(K_,"1").split(Vw)).length-1;a<b;a++)i+=u[a]+(~c.indexOf(a)?r.shift()||s+"0,0,0,0)":(h.length?h:r.length?r:e).shift());if(!u)for(b=(u=n.split(K_)).length-1;a<b;a++)i+=u[a]+r[a];return i+u[b]},K_=function(){var n,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(n in MI)t+="|"+n+"\\b";return new RegExp(t+")","gi")}(),IQe=/hsl[a]?\(/,Dle=function(n){var e,o=n.join(" ");if(K_.lastIndex=0,K_.test(o))return e=IQe.test(o),n[1]=Lle(n[1],e),n[0]=Lle(n[0],e,kle(n[1])),!0},qd=function(){var c,u,h,b,w,R,t=Date.now,n=500,o=33,e=t(),i=e,r=1e3/240,s=r,a=[],G=function K(te){var me,ge,Me,Ke,ee=t()-i,le=!0===te;if(ee>n&&(e+=ee-o),((me=(Me=(i+=ee)-e)-s)>0||le)&&(Ke=++b.frame,w=Me-1e3*b.time,b.time=Me/=1e3,s+=me+(me>=r?4:r-me),ge=1),le||(c=u(K)),ge)for(R=0;R<a.length;R++)a[R](Me,w,Ke,te)};return b={time:0,frame:0,tick:function(){G(!0)},deltaRatio:function(te){return w/(1e3/(te||60))},wake:function(){sle&&(!$5&&H5()&&(Vp=$5=window,K5=Vp.document||{},jd.gsap=Uc,(Vp.gsapVersions||(Vp.gsapVersions=[])).push(Uc.version),ale(nk||Vp.GreenSockGlobals||!Vp.gsap&&Vp||{}),h=Vp.requestAnimationFrame,xle.forEach(Ale)),c&&b.sleep(),u=h||function(te){return setTimeout(te,s-1e3*b.time+1|0)},OI=1,G(2))},sleep:function(){(h?Vp.cancelAnimationFrame:clearTimeout)(c),OI=0,u=yI},lagSmoothing:function(te,ee){n=te||1/0,o=Math.min(ee||33,n)},fps:function(te){s=1e3*b.time+(r=1e3/(te||240))},add:function(te,ee,le){var me=ee?function(ge,Me,Ke,Ee){te(ge,Me,Ke,Ee),b.remove(me)}:te;return b.remove(te),a[le?"unshift":"push"](me),Ww(),me},remove:function(te,ee){~(ee=a.indexOf(te))&&a.splice(ee,1)&&R>=ee&&R--},_listeners:a}}(),Ww=function(){return!OI&&qd.wake()},pr={},MQe=/^[\d.\-M][\d.\-,\s]/,OQe=/["']/g,EQe=function(n){for(var a,c,u,o={},e=n.substr(1,n.length-3).split(":"),i=e[0],r=1,s=e.length;r<s;r++)c=e[r],a=r!==s-1?c.lastIndexOf(","):c.length,u=c.substr(0,a),o[i]=isNaN(u)?u.replace(OQe,"").trim():+u,i=c.substr(a+1).trim();return o},Ble=function(n){return function(o){return 1-n(1-o)}},Nle=function t(n,o){for(var i,e=n._first;e;)e instanceof cd?t(e,o):e.vars.yoyoEase&&(!e._yoyo||!e._repeat)&&e._yoyo!==o&&(e.timeline?t(e.timeline,o):(i=e._ease,e._ease=e._yEase,e._yEase=i,e._yoyo=o)),e=e._next},oC=function(n,o){return n&&(za(n)?n:pr[n]||function(n){var o=(n+"").split("("),e=pr[o[0]];return e&&o.length>1&&e.config?e.config.apply(null,~n.indexOf("{")?[EQe(o[1])]:function(n){var o=n.indexOf("(")+1,e=n.indexOf(")"),i=n.indexOf("(",o);return n.substring(o,~i&&i<e?n.indexOf(")",e+1):e)}(n).split(",").map(hle)):pr._CE&&MQe.test(n)?pr._CE("",n):e}(n))||o},rC=function(n,o,e,i){void 0===e&&(e=function(c){return 1-o(1-c)}),void 0===i&&(i=function(c){return c<.5?o(2*c)/2:1-o(2*(1-c))/2});var s,r={easeIn:o,easeOut:e,easeInOut:i};return ad(n,function(a){for(var c in pr[a]=jd[a]=r,pr[s=a.toLowerCase()]=e,r)pr[s+("easeIn"===c?".in":"easeOut"===c?".out":".inOut")]=pr[a+"."+c]=r[c]}),r},Fle=function(n){return function(o){return o<.5?(1-n(1-2*o))/2:.5+n(2*(o-.5))/2}},aV=function t(n,o,e){var i=o>=1?o:1,r=(e||(n?.3:.45))/(o<1?o:1),s=r/z5*(Math.asin(1/i)||0),a=function(h){return 1===h?1:i*Math.pow(2,-10*h)*rQe((h-s)*r)+1},c="out"===n?a:"in"===n?function(u){return 1-a(1-u)}:Fle(a);return r=z5/r,c.config=function(u,h){return t(n,u,h)},c},cV=function t(n,o){void 0===o&&(o=1.70158);var e=function(s){return s?--s*s*((o+1)*s+o)+1:0},i="out"===n?e:"in"===n?function(r){return 1-e(1-r)}:Fle(e);return i.config=function(r){return t(n,r)},i};ad("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,n){var o=n<5?n+1:n;rC(t+",Power"+(o-1),n?function(e){return Math.pow(e,o)}:function(e){return e},function(e){return 1-Math.pow(1-e,o)},function(e){return e<.5?Math.pow(2*e,o)/2:1-Math.pow(2*(1-e),o)/2})}),pr.Linear.easeNone=pr.none=pr.Linear.easeIn,rC("Elastic",aV("in"),aV("out"),aV()),function(t,n){var r=function(a){return a<.36363636363636365?t*a*a:a<.7272727272727273?t*Math.pow(a-1.5/n,2)+.75:a<.9090909090909092?t*(a-=2.25/n)*a+.9375:t*Math.pow(a-2.625/n,2)+.984375};rC("Bounce",function(s){return 1-r(1-s)},r)}(7.5625,2.75),rC("Expo",function(t){return t?Math.pow(2,10*(t-1)):0}),rC("Circ",function(t){return-(tle(1-t*t)-1)}),rC("Sine",function(t){return 1===t?1:1-oQe(t*nQe)}),rC("Back",cV("in"),cV("out"),cV()),pr.SteppedEase=pr.steps=jd.SteppedEase={config:function(n,o){void 0===n&&(n=1);var e=1/n,i=n+(o?0:1),r=o?1:0;return function(a){return((i*TI(0,.99999999,a)|0)+r)*e}}},Gw.ease=pr["quad.out"],ad("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return X5+=t+","+t+"Params,"});var Ule=function(n,o){this.id=iQe++,n._gsap=this,this.target=n,this.harness=o,this.get=o?o.get:dle,this.set=o?o.getSetter:hV},EI=function(){function t(o){this.vars=o,this._delay=+o.delay||0,(this._repeat=o.repeat===1/0?-2:o.repeat||0)&&(this._rDelay=o.repeatDelay||0,this._yoyo=!!o.yoyo||!!o.yoyoEase),this._ts=1,Hw(this,+o.duration,1,1),this.data=o.data,Va&&(this._ctx=Va,Va.data.push(this)),OI||qd.wake()}var n=t.prototype;return n.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},n.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},n.totalDuration=function(e){return arguments.length?(this._dirty=0,Hw(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},n.totalTime=function(e,i){if(Ww(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(dk(this,e),!r._dp||r.parent||vle(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&$m(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===Us||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),ple(this,e,i)),this},n.time=function(e,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+_le(this))%(this._dur+this._rDelay)||(e?this._dur:0),i):this._time},n.totalProgress=function(e,i){return arguments.length?this.totalTime(this.totalDuration()*e,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},n.progress=function(e,i){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+_le(this),i):this.duration()?Math.min(1,this._time/this._dur):this.ratio},n.iteration=function(e,i){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*r,i):this._repeat?jw(this._tTime,r)+1:1},n.timeScale=function(e){if(!arguments.length)return this._rts===-Us?0:this._rts;if(this._rts===e)return this;var i=this.parent&&this._ts?lk(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-Us?0:this._rts,this.totalTime(TI(-Math.abs(this._delay),this._tDur,i),!0),uk(this),function(n){for(var o=n.parent;o&&o.parent;)o._dirty=1,o.totalDuration(),o=o.parent;return n}(this)},n.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ww(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==Us&&(this._tTime-=Us)))),this):this._ps},n.startTime=function(e){if(arguments.length){this._start=e;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&$m(i,this,e-this._delay),this}return this._start},n.endTime=function(e){return this._start+(sd(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},n.rawTime=function(e){var i=this.parent||this._dp;return i?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?lk(i.rawTime(e),this):this._tTime:this._tTime},n.revert=function(e){void 0===e&&(e=cQe);var i=eu;return eu=e,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),eu=i,this},n.globalTime=function(e){for(var i=this,r=arguments.length?e:i.rawTime();i;)r=i._start+r/(i._ts||1),i=i._dp;return!this.parent&&this._sat?this._sat.vars.immediateRender?-1/0:this._sat.globalTime(e):r},n.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,yle(this)):-2===this._repeat?1/0:this._repeat},n.repeatDelay=function(e){if(arguments.length){var i=this._time;return this._rDelay=e,yle(this),i?this.time(i):this}return this._rDelay},n.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},n.seek=function(e,i){return this.totalTime(jp(this,e),sd(i))},n.restart=function(e,i){return this.play().totalTime(e?-this._delay:0,sd(i))},n.play=function(e,i){return null!=e&&this.seek(e,i),this.reversed(!1).paused(!1)},n.reverse=function(e,i){return null!=e&&this.seek(e||this.totalDuration(),i),this.reversed(!0).paused(!1)},n.pause=function(e,i){return null!=e&&this.seek(e,i),this.paused(!0)},n.resume=function(){return this.paused(!1)},n.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-Us:0)),this):this._rts<0},n.invalidate=function(){return this._initted=this._act=0,this._zTime=-Us,this},n.isActive=function(){var r,e=this.parent||this._dp,i=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(r=e.rawTime(!0))>=i&&r<this.endTime(!0)-Us))},n.eventCallback=function(e,i,r){var s=this.vars;return arguments.length>1?(i?(s[e]=i,r&&(s[e+"Params"]=r),"onUpdate"===e&&(this._onUpdate=i)):delete s[e],this):s[e]},n.then=function(e){var i=this;return new Promise(function(r){var s=za(e)?e:mle,a=function(){var u=i.then;i.then=null,za(s)&&(s=s(i))&&(s.then||s===i)&&(i.then=u),r(s),i.then=u};i._initted&&1===i.totalProgress()&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},n.kill=function(){II(this)},t}();zp(EI.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Us,_prom:0,_ps:!1,_rts:1});var cd=function(t){function n(e,i){var r;return void 0===e&&(e={}),(r=t.call(this,e)||this).labels={},r.smoothChildTiming=!!e.smoothChildTiming,r.autoRemoveChildren=!!e.autoRemoveChildren,r._sort=sd(e.sortChildren),Oa&&$m(e.parent||Oa,ag(r),i),e.reversed&&r.reverse(),e.paused&&r.paused(!0),e.scrollTrigger&&ble(ag(r),e.scrollTrigger),r}ele(n,t);var o=n.prototype;return o.to=function(i,r,s){return wI(0,arguments,this),this},o.from=function(i,r,s){return wI(1,arguments,this),this},o.fromTo=function(i,r,s,a){return wI(2,arguments,this),this},o.set=function(i,r,s){return r.duration=0,r.parent=this,SI(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new yc(i,r,jp(this,s),1),this},o.call=function(i,r,s){return $m(this,yc.delayedCall(0,i,r),s)},o.staggerTo=function(i,r,s,a,c,u,h){return s.duration=r,s.stagger=s.stagger||a,s.onComplete=u,s.onCompleteParams=h,s.parent=this,new yc(i,s,jp(this,c)),this},o.staggerFrom=function(i,r,s,a,c,u,h){return s.runBackwards=1,SI(s).immediateRender=sd(s.immediateRender),this.staggerTo(i,r,s,a,c,u,h)},o.staggerFromTo=function(i,r,s,a,c,u,h,b){return a.startAt=s,SI(a).immediateRender=sd(a.immediateRender),this.staggerTo(i,r,a,c,u,h,b)},o.render=function(i,r,s){var w,R,G,K,te,ee,le,me,ge,Me,Ke,Ee,a=this._time,c=this._dirty?this.totalDuration():this._tDur,u=this._dur,h=i<=0?0:Pl(i),b=this._zTime<0!=i<0&&(this._initted||!u);if(this!==Oa&&h>c&&i>=0&&(h=c),h!==this._tTime||s||b){if(a!==this._time&&u&&(h+=this._time-a,i+=this._time-a),w=h,ge=this._start,ee=!(me=this._ts),b&&(u||(a=this._zTime),(i||!r)&&(this._zTime=i)),this._repeat){if(Ke=this._yoyo,te=u+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(100*te+i,r,s);if(w=Pl(h%te),h===c?(K=this._repeat,w=u):((K=~~(h/te))&&K===h/te&&(w=u,K--),w>u&&(w=u)),Me=jw(this._tTime,te),!a&&this._tTime&&Me!==K&&this._tTime-Me*te-this._dur<=0&&(Me=K),Ke&&1&K&&(w=u-w,Ee=1),K!==Me&&!this._lock){var ot=Ke&&1&Me,ct=ot===(Ke&&1&K);if(K<Me&&(ot=!ot),a=ot?0:h%u?u:h,this._lock=1,this.render(a||(Ee?0:Pl(K*te)),r,!u)._lock=0,this._tTime=h,!r&&this.parent&&qp(this,"onRepeat"),this.vars.repeatRefresh&&!Ee&&(this.invalidate()._lock=1),a&&a!==this._time||ee!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,ct&&(this._lock=2,this.render(a=ot?u:-1e-4,!0),this.vars.repeatRefresh&&!Ee&&this.invalidate()),this._lock=0,!this._ts&&!ee)return this;Nle(this,Ee)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(le=function(n,o,e){var i;if(e>o)for(i=n._first;i&&i._start<=e;){if("isPause"===i.data&&i._start>o)return i;i=i._next}else for(i=n._last;i&&i._start>=e;){if("isPause"===i.data&&i._start<o)return i;i=i._prev}}(this,Pl(a),Pl(w)),le&&(h-=w-(w=le._start))),this._tTime=h,this._time=w,this._act=!me,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&w&&!r&&!K&&(qp(this,"onStart"),this._tTime!==h))return this;if(w>=a&&i>=0)for(R=this._first;R;){if(G=R._next,(R._act||w>=R._start)&&R._ts&&le!==R){if(R.parent!==this)return this.render(i,r,s);if(R.render(R._ts>0?(w-R._start)*R._ts:(R._dirty?R.totalDuration():R._tDur)+(w-R._start)*R._ts,r,s),w!==this._time||!this._ts&&!ee){le=0,G&&(h+=this._zTime=-Us);break}}R=G}else{R=this._last;for(var Pt=i<0?i:w;R;){if(G=R._prev,(R._act||Pt<=R._end)&&R._ts&&le!==R){if(R.parent!==this)return this.render(i,r,s);if(R.render(R._ts>0?(Pt-R._start)*R._ts:(R._dirty?R.totalDuration():R._tDur)+(Pt-R._start)*R._ts,r,s||eu&&(R._initted||R._startAt)),w!==this._time||!this._ts&&!ee){le=0,G&&(h+=this._zTime=Pt?-Us:Us);break}}R=G}}if(le&&!r&&(this.pause(),le.render(w>=a?0:-Us)._zTime=w>=a?1:-1,this._ts))return this._start=ge,uk(this),this.render(i,r,s);this._onUpdate&&!r&&qp(this,"onUpdate",!0),(h===c&&this._tTime>=this.totalDuration()||!h&&a)&&(ge===this._start||Math.abs(me)!==Math.abs(this._ts))&&(this._lock||((i||!u)&&(h===c&&this._ts>0||!h&&this._ts<0)&&W_(this,1),!r&&(!(i<0)||a)&&(h||a||!c)&&(qp(this,h===c&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<c&&this.timeScale()>0)&&this._prom())))}return this},o.add=function(i,r){var s=this;if(cg(r)||(r=jp(this,r,i)),!(i instanceof EI)){if(tu(i))return i.forEach(function(a){return s.add(a,r)}),this;if(al(i))return this.addLabel(i,r);if(!za(i))return this;i=yc.delayedCall(0,i)}return this!==i?$m(this,i,r):this},o.getChildren=function(i,r,s,a){void 0===i&&(i=!0),void 0===r&&(r=!0),void 0===s&&(s=!0),void 0===a&&(a=-Gp);for(var c=[],u=this._first;u;)u._start>=a&&(u instanceof yc?r&&c.push(u):(s&&c.push(u),i&&c.push.apply(c,u.getChildren(!0,r,s)))),u=u._next;return c},o.getById=function(i){for(var r=this.getChildren(1,1,1),s=r.length;s--;)if(r[s].vars.id===i)return r[s]},o.remove=function(i){return al(i)?this.removeLabel(i):za(i)?this.killTweensOf(i):(ck(this,i),i===this._recent&&(this._recent=this._last),iC(this))},o.totalTime=function(i,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Pl(qd.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),t.prototype.totalTime.call(this,i,r),this._forcing=0,this):this._tTime},o.addLabel=function(i,r){return this.labels[i]=jp(this,r),this},o.removeLabel=function(i){return delete this.labels[i],this},o.addPause=function(i,r,s){var a=yc.delayedCall(0,r||yI,s);return a.data="isPause",this._hasPause=1,$m(this,a,jp(this,i))},o.removePause=function(i){var r=this._first;for(i=jp(this,i);r;)r._start===i&&"isPause"===r.data&&W_(r),r=r._next},o.killTweensOf=function(i,r,s){for(var a=this.getTweensOf(i,s),c=a.length;c--;)Z_!==a[c]&&a[c].kill(i,r);return this},o.getTweensOf=function(i,r){for(var h,s=[],a=Hp(i),c=this._first,u=cg(r);c;)c instanceof yc?lQe(c._targets,a)&&(u?(!Z_||c._initted&&c._ts)&&c.globalTime(0)<=r&&c.globalTime(c.totalDuration())>r:!r||c.isActive())&&s.push(c):(h=c.getTweensOf(a,r)).length&&s.push.apply(s,h),c=c._next;return s},o.tweenTo=function(i,r){r=r||{};var R,s=this,a=jp(s,i),u=r.startAt,h=r.onStart,b=r.onStartParams,w=r.immediateRender,G=yc.to(s,zp({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(u&&"time"in u?u.time:s._time))/s.timeScale())||Us,onStart:function(){if(s.pause(),!R){var te=r.duration||Math.abs((a-(u&&"time"in u?u.time:s._time))/s.timeScale());G._dur!==te&&Hw(G,te,0,1).render(G._time,!0,!0),R=1}h&&h.apply(G,b||[])}},r));return w?G.render(0):G},o.tweenFromTo=function(i,r,s){return this.tweenTo(r,zp({startAt:{time:jp(this,i)}},s))},o.recent=function(){return this._recent},o.nextLabel=function(i){return void 0===i&&(i=this._time),Ele(this,jp(this,i))},o.previousLabel=function(i){return void 0===i&&(i=this._time),Ele(this,jp(this,i),1)},o.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+Us)},o.shiftChildren=function(i,r,s){void 0===s&&(s=0);for(var u,a=this._first,c=this.labels;a;)a._start>=s&&(a._start+=i,a._end+=i),a=a._next;if(r)for(u in c)c[u]>=s&&(c[u]+=i);return iC(this)},o.invalidate=function(i){var r=this._first;for(this._lock=0;r;)r.invalidate(i),r=r._next;return t.prototype.invalidate.call(this,i)},o.clear=function(i){void 0===i&&(i=!0);for(var s,r=this._first;r;)s=r._next,this.remove(r),r=s;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),iC(this)},o.totalDuration=function(i){var u,h,b,r=0,s=this,a=s._last,c=Gp;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-i:i));if(s._dirty){for(b=s.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),(h=a._start)>c&&s._sort&&a._ts&&!s._lock?(s._lock=1,$m(s,a,h-a._delay,1)._lock=0):c=h,h<0&&a._ts&&(r-=h,(!b&&!s._dp||b&&b.smoothChildTiming)&&(s._start+=h/s._ts,s._time-=h,s._tTime-=h),s.shiftChildren(-h,!1,-1/0),c=0),a._end>r&&a._ts&&(r=a._end),a=u;Hw(s,s===Oa&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},n.updateRoot=function(i){if(Oa._ts&&(ple(Oa,lk(i,Oa)),lle=qd.frame),qd.frame>=ule){ule+=zd.autoSleep||120;var r=Oa._first;if((!r||!r._ts)&&zd.autoSleep&&qd._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||qd.sleep()}}},n}(EI);zp(cd.prototype,{_lock:0,_hasPause:0,_forcing:0});var Z_,uV,RQe=function(n,o,e,i,r,s,a){var b,w,R,G,K,te,ee,le,c=new ld(this._pt,n,o,0,1,qle,null,r),u=0,h=0;for(c.b=e,c.e=i,e+="",(ee=~(i+="").indexOf("random("))&&(i=PI(i)),s&&(s(le=[e,i],n,o),e=le[0],i=le[1]),w=e.match(W5)||[];b=W5.exec(i);)G=b[0],K=i.substring(u,b.index),R?R=(R+1)%5:"rgba("===K.substr(-5)&&(R=1),G!==w[h++]&&(te=parseFloat(w[h-1])||0,c._pt={_next:c._pt,p:K||1===h?K:",",s:te,c:"="===G.charAt(1)?zw(te,G)-te:parseFloat(G)-te,m:R&&R<4?Math.round:0},u=W5.lastIndex);return c.c=u<i.length?i.substring(u,i.length):"",c.fp=a,(ole.test(i)||ee)&&(c.e=0),this._pt=c,c},lV=function(n,o,e,i,r,s,a,c,u,h){za(i)&&(i=i(r||0,n,s));var G,b=n[o],w="get"!==e?e:za(b)?u?n[o.indexOf("set")||!za(n["get"+o.substr(3)])?o:"get"+o.substr(3)](u):n[o]():b,R=za(b)?u?NQe:jle:pV;if(al(i)&&(~i.indexOf("random(")&&(i=PI(i)),"="===i.charAt(1)&&((G=zw(w,i)+(nu(w)||0))||0===G)&&(i=G)),!h||w!==i||uV)return isNaN(w*i)||""===i?(!b&&!(o in n)&&Z5(o,i),RQe.call(this,n,o,w,i,R,c||zd.stringFilter,u)):(G=new ld(this._pt,n,o,+w||0,i-(w||0),"boolean"==typeof b?UQe:Hle,0,R),u&&(G.fp=u),a&&G.modifier(a,this,n),this._pt=G)},Gle=function(n,o,e,i,r,s){var a,c,u,h;if(Hd[n]&&!1!==(a=new Hd[n]).init(r,a.rawVars?o[n]:function(n,o,e,i,r){if(za(n)&&(n=xI(n,r,o,e,i)),!Wm(n)||n.style&&n.nodeType||tu(n)||nle(n))return al(n)?xI(n,r,o,e,i):n;var a,s={};for(a in n)s[a]=xI(n[a],r,o,e,i);return s}(o[n],i,r,s,e),e,i,s)&&(e._pt=c=new ld(e._pt,r,n,0,1,a.render,a,0,a.priority),e!==qw))for(u=e._ptLookup[e._targets.indexOf(r)],h=a._props.length;h--;)u[a._props[h]]=c;return a},dV=function t(n,o,e){var Ee,ot,ct,Pt,gn,qt,Je,xn,bi,rn,vn,Vn,An,i=n.vars,r=i.ease,s=i.startAt,a=i.immediateRender,c=i.lazy,u=i.onUpdate,h=i.onUpdateParams,b=i.callbackScope,w=i.runBackwards,R=i.yoyoEase,G=i.keyframes,K=i.autoRevert,te=n._dur,ee=n._startAt,le=n._targets,me=n.parent,ge=me&&"nested"===me.data?me.vars.targets:le,Me="auto"===n._overwrite&&!V5,Ke=n.timeline;if(Ke&&(!G||!r)&&(r="none"),n._ease=oC(r,Gw.ease),n._yEase=R?Ble(oC(!0===R?r:R,Gw.ease)):0,R&&n._yoyo&&!n._repeat&&(R=n._yEase,n._yEase=n._ease,n._ease=R),n._from=!Ke&&!!i.runBackwards,!Ke||G&&!i.stagger){if(Vn=(xn=le[0]?tC(le[0]).harness:0)&&i[xn.prop],Ee=ak(i,Q5),ee&&(ee._zTime<0&&ee.progress(1),o<0&&w&&a&&!K?ee.render(-1,!0):ee.revert(w&&te?ok:aQe),ee._lazy=0),s){if(W_(n._startAt=yc.set(le,zp({data:"isStart",overwrite:!1,parent:me,immediateRender:!0,lazy:!ee&&sd(c),startAt:null,delay:0,onUpdate:u,onUpdateParams:h,callbackScope:b,stagger:0},s))),n._startAt._dp=0,n._startAt._sat=n,o<0&&(eu||!a&&!K)&&n._startAt.revert(ok),a&&te&&o<=0&&e<=0)return void(o&&(n._zTime=o))}else if(w&&te&&!ee)if(o&&(a=!1),ct=zp({overwrite:!1,data:"isFromStart",lazy:a&&!ee&&sd(c),immediateRender:a,stagger:0,parent:me},Ee),Vn&&(ct[xn.prop]=Vn),W_(n._startAt=yc.set(le,ct)),n._startAt._dp=0,n._startAt._sat=n,o<0&&(eu?n._startAt.revert(ok):n._startAt.render(-1,!0)),n._zTime=o,a){if(!o)return}else t(n._startAt,Us,Us);for(n._pt=n._ptCache=0,c=te&&sd(c)||c&&!te,ot=0;ot<le.length;ot++){if(Je=(gn=le[ot])._gsap||eV(le)[ot]._gsap,n._ptLookup[ot]=rn={},Y5[Je.id]&&q_.length&&sk(),vn=ge===le?ot:ge.indexOf(gn),xn&&!1!==(bi=new xn).init(gn,Vn||Ee,n,vn,ge)&&(n._pt=Pt=new ld(n._pt,gn,bi.name,0,1,bi.render,bi,0,bi.priority),bi._props.forEach(function(zi){rn[zi]=Pt}),bi.priority&&(qt=1)),!xn||Vn)for(ct in Ee)Hd[ct]&&(bi=Gle(ct,Ee,n,vn,gn,ge))?bi.priority&&(qt=1):rn[ct]=Pt=lV.call(n,gn,ct,"get",Ee[ct],vn,ge,0,i.stringFilter);n._op&&n._op[ot]&&n.kill(gn,n._op[ot]),Me&&n._pt&&(Z_=n,Oa.killTweensOf(gn,rn,n.globalTime(o)),An=!n.parent,Z_=0),n._pt&&c&&(Y5[Je.id]=1)}qt&&Wle(n),n._onInit&&n._onInit(n)}n._onUpdate=u,n._initted=(!n._op||n._pt)&&!An,G&&o<=0&&Ke.render(Gp,!0,!0)},BQe=function(n,o,e,i){var s,a,r=o.ease||i||"power1.inOut";if(tu(o))a=e[n]||(e[n]=[]),o.forEach(function(c,u){return a.push({t:u/(o.length-1)*100,v:c,e:r})});else for(s in o)a=e[s]||(e[s]=[]),"ease"===s||a.push({t:parseFloat(n),v:o[s],e:r})},xI=function(n,o,e,i,r){return za(n)?n.call(o,e,i,r):al(n)&&~n.indexOf("random(")?PI(n):n},Vle=X5+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",zle={};ad(Vle+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return zle[t]=1});var yc=function(t){function n(e,i,r,s){var a;"number"==typeof i&&(r.duration=i,i=r,r=null);var ge,Me,Ke,Ee,ot,ct,Pt,gn,c=(a=t.call(this,s?i:SI(i))||this).vars,u=c.duration,h=c.delay,b=c.immediateRender,w=c.stagger,R=c.overwrite,G=c.keyframes,K=c.defaults,te=c.scrollTrigger,ee=c.yoyoEase,le=i.parent||Oa,me=(tu(e)||nle(e)?cg(e[0]):"length"in i)?[e]:Hp(e);if(a._targets=me.length?eV(me):ik("GSAP target "+e+" not found. https://greensock.com",!zd.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=R,G||w||tk(u)||tk(h)){if(i=a.vars,(ge=a.timeline=new cd({data:"nested",defaults:K||{},targets:le&&"nested"===le.data?le.vars.targets:me})).kill(),ge.parent=ge._dp=ag(a),ge._start=0,w||tk(u)||tk(h)){if(Ee=me.length,Pt=w&&Tle(w),Wm(w))for(ot in w)~Vle.indexOf(ot)&&(gn||(gn={}),gn[ot]=w[ot]);for(Me=0;Me<Ee;Me++)(Ke=ak(i,zle)).stagger=0,ee&&(Ke.yoyoEase=ee),gn&&nC(Ke,gn),ct=me[Me],Ke.duration=+xI(u,ag(a),Me,ct,me),Ke.delay=(+xI(h,ag(a),Me,ct,me)||0)-a._delay,!w&&1===Ee&&Ke.delay&&(a._delay=h=Ke.delay,a._start+=h,Ke.delay=0),ge.to(ct,Ke,Pt?Pt(Me,ct,me):0),ge._ease=pr.none;ge.duration()?u=h=0:a.timeline=0}else if(G){SI(zp(ge.vars.defaults,{ease:"none"})),ge._ease=oC(G.ease||i.ease||"none");var Je,xn,bi,qt=0;if(tu(G))G.forEach(function(rn){return ge.to(me,rn,">")}),ge.duration();else{for(ot in Ke={},G)"ease"===ot||"easeEach"===ot||BQe(ot,G[ot],Ke,G.easeEach);for(ot in Ke)for(Je=Ke[ot].sort(function(rn,vn){return rn.t-vn.t}),qt=0,Me=0;Me<Je.length;Me++)(bi={ease:(xn=Je[Me]).e,duration:(xn.t-(Me?Je[Me-1].t:0))/100*u})[ot]=xn.v,ge.to(me,bi,qt),qt+=bi.duration;ge.duration()<u&&ge.to({},{duration:u-ge.duration()})}}u||a.duration(u=ge.duration())}else a.timeline=0;return!0===R&&!V5&&(Z_=ag(a),Oa.killTweensOf(me),Z_=0),$m(le,ag(a),r),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(b||!u&&!G&&a._start===Pl(le._time)&&sd(b)&&hQe(ag(a))&&"nested"!==le.data)&&(a._tTime=-Us,a.render(Math.max(0,-h)||0)),te&&ble(ag(a),te),a}ele(n,t);var o=n.prototype;return o.render=function(i,r,s){var w,R,G,K,te,ee,le,me,ge,a=this._time,c=this._tDur,u=this._dur,h=i<0,b=i>c-Us&&!h?c:i<Us?0:i;if(u){if(b!==this._tTime||!i||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h){if(w=b,me=this.timeline,this._repeat){if(K=u+this._rDelay,this._repeat<-1&&h)return this.totalTime(100*K+i,r,s);if(w=Pl(b%K),b===c?(G=this._repeat,w=u):((G=~~(b/K))&&G===b/K&&(w=u,G--),w>u&&(w=u)),(ee=this._yoyo&&1&G)&&(ge=this._yEase,w=u-w),te=jw(this._tTime,K),w===a&&!s&&this._initted)return this._tTime=b,this;G!==te&&(me&&this._yEase&&Nle(me,ee),this.vars.repeatRefresh&&!ee&&!this._lock&&(this._lock=s=1,this.render(Pl(K*G),!0).invalidate()._lock=0))}if(!this._initted){if(Cle(this,h?i:w,s,r,b))return this._tTime=0,this;if(a!==this._time)return this;if(u!==this._dur)return this.render(i,r,s)}if(this._tTime=b,this._time=w,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=le=(ge||this._ease)(w/u),this._from&&(this.ratio=le=1-le),w&&!a&&!r&&!G&&(qp(this,"onStart"),this._tTime!==b))return this;for(R=this._pt;R;)R.r(le,R.d),R=R._next;me&&me.render(i<0?i:!w&&ee?-Us:me._dur*me._ease(w/this._dur),r,s)||this._startAt&&(this._zTime=i),this._onUpdate&&!r&&(h&&tV(this,i,0,s),qp(this,"onUpdate")),this._repeat&&G!==te&&this.vars.onRepeat&&!r&&this.parent&&qp(this,"onRepeat"),(b===this._tDur||!b)&&this._tTime===b&&(h&&!this._onUpdate&&tV(this,i,0,!0),(i||!u)&&(b===this._tDur&&this._ts>0||!b&&this._ts<0)&&W_(this,1),!r&&(!h||a)&&(b||a||ee)&&(qp(this,b===c?"onComplete":"onReverseComplete",!0),this._prom&&!(b<c&&this.timeScale()>0)&&this._prom()))}}else!function(n,o,e,i){var u,h,b,r=n.ratio,s=o<0||!o&&(!n._start&&mQe(n)&&(n._initted||!nV(n))||(n._ts<0||n._dp._ts<0)&&!nV(n))?0:1,a=n._rDelay,c=0;if(a&&n._repeat&&(c=TI(0,n._tDur,o),h=jw(c,a),n._yoyo&&1&h&&(s=1-s),h!==jw(n._tTime,a)&&(r=1-s,n.vars.repeatRefresh&&n._initted&&n.invalidate())),s!==r||eu||i||n._zTime===Us||!o&&n._zTime){if(!n._initted&&Cle(n,o,i,e,c))return;for(b=n._zTime,n._zTime=o||(e?Us:0),e||(e=o&&!b),n.ratio=s,n._from&&(s=1-s),n._time=0,n._tTime=c,u=n._pt;u;)u.r(s,u.d),u=u._next;o<0&&tV(n,o,0,!0),n._onUpdate&&!e&&qp(n,"onUpdate"),c&&n._repeat&&!e&&n.parent&&qp(n,"onRepeat"),(o>=n._tDur||o<0)&&n.ratio===s&&(s&&W_(n,1),!e&&!eu&&(qp(n,s?"onComplete":"onReverseComplete",!0),n._prom&&n._prom()))}else n._zTime||(n._zTime=o)}(this,i,r,s);return this},o.targets=function(){return this._targets},o.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),t.prototype.invalidate.call(this,i)},o.resetTo=function(i,r,s,a){OI||qd.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||dV(this,c),function(n,o,e,i,r,s,a){var u,h,b,w,c=(n._pt&&n._ptCache||(n._ptCache={}))[o];if(!c)for(c=n._ptCache[o]=[],b=n._ptLookup,w=n._targets.length;w--;){if((u=b[w][o])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==o&&u.fp!==o;)u=u._next;if(!u)return uV=1,n.vars[o]="+=0",dV(n,a),uV=0,1;c.push(u)}for(w=c.length;w--;)(u=(h=c[w])._pt||h).s=!i&&0!==i||r?u.s+(i||0)+s*u.c:i,u.c=e-u.s,h.e&&(h.e=ac(e)+nu(h.e)),h.b&&(h.b=u.s+nu(h.b))}(this,i,r,s,a,this._ease(c/this._dur),c)?this.resetTo(i,r,s,a):(dk(this,0),this.parent||gle(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},o.kill=function(i,r){if(void 0===r&&(r="all"),!(i||r&&"all"!==r))return this._lazy=this._pt=0,this.parent?II(this):this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(i,r,Z_&&!0!==Z_.vars.overwrite)._first||II(this),this.parent&&s!==this.timeline.totalDuration()&&Hw(this,this._dur*this.timeline._tDur/s,0,1),this}var b,w,R,G,K,te,ee,a=this._targets,c=i?Hp(i):a,u=this._ptLookup,h=this._pt;if((!r||"all"===r)&&function(n,o){for(var e=n.length,i=e===o.length;i&&e--&&n[e]===o[e];);return e<0}(a,c))return"all"===r&&(this._pt=0),II(this);for(b=this._op=this._op||[],"all"!==r&&(al(r)&&(K={},ad(r,function(le){return K[le]=1}),r=K),r=function(n,o){var r,s,a,c,e=n[0]?tC(n[0]).harness:0,i=e&&e.aliases;if(!i)return o;for(s in r=nC({},o),i)if(s in r)for(a=(c=i[s].split(",")).length;a--;)r[c[a]]=r[s];return r}(a,r)),ee=a.length;ee--;)if(~c.indexOf(a[ee]))for(K in w=u[ee],"all"===r?(b[ee]=r,G=w,R={}):(R=b[ee]=b[ee]||{},G=r),G)(te=w&&w[K])&&((!("kill"in te.d)||!0===te.d.kill(K))&&ck(this,te,"_pt"),delete w[K]),"all"!==R&&(R[K]=1);return this._initted&&!this._pt&&h&&II(this),this},n.to=function(i,r){return new n(i,r,arguments[2])},n.from=function(i,r){return wI(1,arguments)},n.delayedCall=function(i,r,s,a){return new n(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:r,onReverseComplete:r,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:a})},n.fromTo=function(i,r,s){return wI(2,arguments)},n.set=function(i,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new n(i,r)},n.killTweensOf=function(i,r,s){return Oa.killTweensOf(i,r,s)},n}(EI);zp(yc.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ad("staggerTo,staggerFrom,staggerFromTo",function(t){yc[t]=function(){var n=new cd,o=iV.call(arguments,0);return o.splice("staggerFromTo"===t?5:4,0,0),n[t].apply(n,o)}});var pV=function(n,o,e){return n[o]=e},jle=function(n,o,e){return n[o](e)},NQe=function(n,o,e,i){return n[o](i.fp,e)},FQe=function(n,o,e){return n.setAttribute(o,e)},hV=function(n,o){return za(n[o])?jle:j5(n[o])&&n.setAttribute?FQe:pV},Hle=function(n,o){return o.set(o.t,o.p,Math.round(1e6*(o.s+o.c*n))/1e6,o)},UQe=function(n,o){return o.set(o.t,o.p,!!(o.s+o.c*n),o)},qle=function(n,o){var e=o._pt,i="";if(!n&&o.b)i=o.b;else if(1===n&&o.e)i=o.e;else{for(;e;)i=e.p+(e.m?e.m(e.s+e.c*n):Math.round(1e4*(e.s+e.c*n))/1e4)+i,e=e._next;i+=o.c}o.set(o.t,o.p,i,o)},mV=function(n,o){for(var e=o._pt;e;)e.r(n,e.d),e=e._next},GQe=function(n,o,e,i){for(var s,r=this._pt;r;)s=r._next,r.p===i&&r.modifier(n,o,e),r=s},VQe=function(n){for(var e,i,o=this._pt;o;)i=o._next,o.p===n&&!o.op||o.op===n?ck(this,o,"_pt"):o.dep||(e=1),o=i;return!e},zQe=function(n,o,e,i){i.mSet(n,o,i.m.call(i.tween,e,i.mt),i)},Wle=function(n){for(var e,i,r,s,o=n._pt;o;){for(e=o._next,i=r;i&&i.pr>o.pr;)i=i._next;(o._prev=i?i._prev:s)?o._prev._next=o:r=o,(o._next=i)?i._prev=o:s=o,o=e}n._pt=r},ld=function(){function t(o,e,i,r,s,a,c,u,h){this.t=e,this.s=r,this.c=s,this.p=i,this.r=a||Hle,this.d=c||this,this.set=u||pV,this.pr=h||0,this._next=o,o&&(o._prev=this)}return t.prototype.modifier=function(e,i,r){this.mSet=this.mSet||this.set,this.set=zQe,this.m=e,this.mt=r,this.tween=i},t}();ad(X5+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return Q5[t]=1}),jd.TweenMax=jd.TweenLite=yc,jd.TimelineLite=jd.TimelineMax=cd,Oa=new cd({sortChildren:!1,defaults:Gw,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),zd.stringFilter=Dle;var sC=[],pk={},jQe=[],$le=0,HQe=0,fV=function(n){return(pk[n]||jQe).map(function(o){return o()})},gV=function(){var n=Date.now(),o=[];n-$le>2&&(fV("matchMediaInit"),sC.forEach(function(e){var s,a,c,u,i=e.queries,r=e.conditions;for(a in i)(s=Vp.matchMedia(i[a]).matches)&&(c=1),s!==r[a]&&(r[a]=s,u=1);u&&(e.revert(),c&&o.push(e))}),fV("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e)}),$le=n,fV("matchMedia"))},Kle=function(){function t(o,e){this.selector=e&&oV(e),this.data=[],this._r=[],this.isReverted=!1,this.id=HQe++,o&&this.add(o)}var n=t.prototype;return n.add=function(e,i,r){za(e)&&(r=i,i=e,e=za);var s=this,a=function(){var b,u=Va,h=s.selector;return u&&u!==s&&u.data.push(s),r&&(s.selector=oV(r)),Va=s,b=i.apply(s,arguments),za(b)&&s._r.push(b),Va=u,s.selector=h,s.isReverted=!1,b};return s.last=a,e===za?a(s):e?s[e]=a:a},n.ignore=function(e){var i=Va;Va=null,e(this),Va=i},n.getTweens=function(){var e=[];return this.data.forEach(function(i){return i instanceof t?e.push.apply(e,i.getTweens()):i instanceof yc&&!(i.parent&&"nested"===i.parent.data)&&e.push(i)}),e},n.clear=function(){this._r.length=this.data.length=0},n.kill=function(e,i){var r=this;if(e){var s=this.getTweens();this.data.forEach(function(c){"isFlip"===c.data&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(u){return s.splice(s.indexOf(u),1)}))}),s.map(function(c){return{g:c.globalTime(0),t:c}}).sort(function(c,u){return u.g-c.g||-1/0}).forEach(function(c){return c.t.revert(e)}),this.data.forEach(function(c){return!(c instanceof yc)&&c.revert&&c.revert(e)}),this._r.forEach(function(c){return c(e,r)}),this.isReverted=!0}else this.data.forEach(function(c){return c.kill&&c.kill()});if(this.clear(),i)for(var a=sC.length;a--;)sC[a].id===this.id&&sC.splice(a,1)},n.revert=function(e){this.kill(e||{})},t}(),qQe=function(){function t(o){this.contexts=[],this.scope=o}var n=t.prototype;return n.add=function(e,i,r){Wm(e)||(e={matches:e});var c,u,h,s=new Kle(0,r||this.scope),a=s.conditions={};for(u in Va&&!s.selector&&(s.selector=Va.selector),this.contexts.push(s),i=s.add("onMatch",i),s.queries=e,e)"all"===u?h=1:(c=Vp.matchMedia(e[u]))&&(sC.indexOf(s)<0&&sC.push(s),(a[u]=c.matches)&&(h=1),c.addListener?c.addListener(gV):c.addEventListener("change",gV));return h&&i(s),this},n.revert=function(e){this.kill(e||{})},n.kill=function(e){this.contexts.forEach(function(i){return i.kill(e,!0)})},t}(),hk={registerPlugin:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];o.forEach(function(i){return Ale(i)})},timeline:function(n){return new cd(n)},getTweensOf:function(n,o){return Oa.getTweensOf(n,o)},getProperty:function(n,o,e,i){al(n)&&(n=Hp(n)[0]);var r=tC(n||{}).get,s=e?mle:hle;return"native"===e&&(e=""),n&&(o?s((Hd[o]&&Hd[o].get||r)(n,o,e,i)):function(a,c,u){return s((Hd[a]&&Hd[a].get||r)(n,a,c,u))})},quickSetter:function(n,o,e){if((n=Hp(n)).length>1){var i=n.map(function(h){return Uc.quickSetter(h,o,e)}),r=i.length;return function(h){for(var b=r;b--;)i[b](h)}}var s=Hd[o],a=tC(n=n[0]||{}),c=a.harness&&(a.harness.aliases||{})[o]||o,u=s?function(h){var b=new s;qw._pt=0,b.init(n,e?h+e:h,qw,0,[n]),b.render(1,b),qw._pt&&mV(1,qw)}:a.set(n,c);return s?u:function(h){return u(n,c,e?h+e:h,a,1)}},quickTo:function(n,o,e){var i,r=Uc.to(n,nC(((i={})[o]="+=0.1",i.paused=!0,i),e||{})),s=function(c,u,h){return r.resetTo(o,c,u,h)};return s.tween=r,s},isTweening:function(n){return Oa.getTweensOf(n,!0).length>0},defaults:function(n){return n&&n.ease&&(n.ease=oC(n.ease,Gw.ease)),fle(Gw,n||{})},config:function(n){return fle(zd,n||{})},registerEffect:function(n){var o=n.name,e=n.effect,r=n.defaults,s=n.extendTimeline;(n.plugins||"").split(",").forEach(function(a){return a&&!Hd[a]&&!jd[a]&&ik(o+" effect requires "+a+" plugin.")}),J5[o]=function(a,c,u){return e(Hp(a),zp(c||{},r),u)},s&&(cd.prototype[o]=function(a,c,u){return this.add(J5[o](a,Wm(c)?c:(u=c)&&{},this),u)})},registerEase:function(n,o){pr[n]=oC(o)},parseEase:function(n,o){return arguments.length?oC(n,o):pr},getById:function(n){return Oa.getById(n)},exportRoot:function(n,o){void 0===n&&(n={});var i,r,e=new cd(n);for(e.smoothChildTiming=sd(n.smoothChildTiming),Oa.remove(e),e._dp=0,e._time=e._tTime=Oa._time,i=Oa._first;i;)r=i._next,(o||!(!i._dur&&i instanceof yc&&i.vars.onComplete===i._targets[0]))&&$m(e,i,i._start-i._delay),i=r;return $m(Oa,e,0),e},context:function(n,o){return n?new Kle(n,o):Va},matchMedia:function(n){return new qQe(n)},matchMediaRefresh:function(){return sC.forEach(function(n){var e,i,o=n.conditions;for(i in o)o[i]&&(o[i]=!1,e=1);e&&n.revert()})||gV()},addEventListener:function(n,o){var e=pk[n]||(pk[n]=[]);~e.indexOf(o)||e.push(o)},removeEventListener:function(n,o){var e=pk[n],i=e&&e.indexOf(o);i>=0&&e.splice(i,1)},utils:{wrap:function t(n,o,e){var i=o-n;return tu(n)?Mle(n,t(0,n.length),o):$_(e,function(r){return(i+(r-n)%i)%i+n})},wrapYoyo:function t(n,o,e){var i=o-n,r=2*i;return tu(n)?Mle(n,t(0,n.length-1),o):$_(e,function(s){return n+((s=(r+(s-n)%r)%r||0)>i?r-s:s)})},distribute:Tle,random:Ile,snap:Ple,normalize:function(n,o,e){return Ole(n,o,0,1,e)},getUnit:nu,clamp:function(n,o,e){return $_(e,function(i){return TI(n,o,i)})},splitColor:Rle,toArray:Hp,selector:oV,mapRange:Ole,pipe:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];return function(i){return o.reduce(function(r,s){return s(r)},i)}},unitize:function(n,o){return function(e){return n(parseFloat(e))+(o||nu(e))}},interpolate:function t(n,o,e,i){var r=isNaN(n+o)?0:function(R){return(1-R)*n+R*o};if(!r){var c,u,h,b,w,s=al(n),a={};if(!0===e&&(i=1)&&(e=null),s)n={p:n},o={p:o};else if(tu(n)&&!tu(o)){for(h=[],w=(b=n.length)-2,u=1;u<b;u++)h.push(t(n[u-1],n[u]));b--,r=function(G){G*=b;var K=Math.min(w,~~G);return h[K](G-K)},e=o}else i||(n=nC(tu(n)?[]:{},n));if(!h){for(c in o)lV.call(a,n,c,"get",o[c]);r=function(G){return mV(G,a)||(s?n.p:n)}}}return $_(e,r)},shuffle:wle},install:ale,effects:J5,ticker:qd,updateRoot:cd.updateRoot,plugins:Hd,globalTimeline:Oa,core:{PropTween:ld,globals:cle,Tween:yc,Timeline:cd,Animation:EI,getCache:tC,_removeLinkedListItem:ck,reverting:function(){return eu},context:function(n){return n&&Va&&(Va.data.push(n),n._ctx=Va),Va},suppressOverwrites:function(n){return V5=n}}};ad("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return hk[t]=yc[t]}),qd.add(cd.updateRoot),qw=hk.to({},{duration:0});var WQe=function(n,o){for(var e=n._pt;e&&e.p!==o&&e.op!==o&&e.fp!==o;)e=e._next;return e},_V=function(n,o){return{name:n,rawVars:1,init:function(i,r,s){s._onInit=function(a){var c,u;if(al(r)&&(c={},ad(r,function(h){return c[h]=1}),r=c),o){for(u in c={},r)c[u]=o(r[u]);r=c}!function(n,o){var i,r,s,e=n._targets;for(i in o)for(r=e.length;r--;)(s=n._ptLookup[r][i])&&(s=s.d)&&(s._pt&&(s=WQe(s,i)),s&&s.modifier&&s.modifier(o[i],n,e[r],i))}(a,r)}}}},Uc=hk.registerPlugin({name:"attr",init:function(n,o,e,i,r){var s,a,c;for(s in this.tween=e,o)c=n.getAttribute(s)||"",(a=this.add(n,"setAttribute",(c||0)+"",o[s],i,r,0,0,s)).op=s,a.b=c,this._props.push(s)},render:function(n,o){for(var e=o._pt;e;)eu?e.set(e.t,e.p,e.b,e):e.r(n,e.d),e=e._next}},{name:"endArray",init:function(n,o){for(var e=o.length;e--;)this.add(n,e,n[e]||0,o[e],0,0,0,0,0,1)}},_V("roundProps",rV),_V("modifiers"),_V("snap",Ple))||hk;yc.version=cd.version=Uc.version="3.12.2",sle=1,H5()&&Ww();var Zle,Q_,$w,vV,aC,Qle,bV,nue,mk=pr.Circ,lg={},cC=180/Math.PI,Kw=Math.PI/180,Zw=Math.atan2,CV=/([A-Z])/g,QQe=/(left|right|width|margin|padding|x)/i,YQe=/[\s,\(]\S/,Km={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},yV=function(n,o){return o.set(o.t,o.p,Math.round(1e4*(o.s+o.c*n))/1e4+o.u,o)},JQe=function(n,o){return o.set(o.t,o.p,1===n?o.e:Math.round(1e4*(o.s+o.c*n))/1e4+o.u,o)},XQe=function(n,o){return o.set(o.t,o.p,n?Math.round(1e4*(o.s+o.c*n))/1e4+o.u:o.b,o)},eYe=function(n,o){var e=o.s+o.c*n;o.set(o.t,o.p,~~(e+(e<0?-.5:.5))+o.u,o)},Jle=function(n,o){return o.set(o.t,o.p,n?o.e:o.b,o)},Xle=function(n,o){return o.set(o.t,o.p,1!==n?o.b:o.e,o)},tYe=function(n,o,e){return n.style[o]=e},nYe=function(n,o,e){return n.style.setProperty(o,e)},iYe=function(n,o,e){return n._gsap[o]=e},oYe=function(n,o,e){return n._gsap.scaleX=n._gsap.scaleY=e},rYe=function(n,o,e,i,r){var s=n._gsap;s.scaleX=s.scaleY=e,s.renderTransform(r,s)},sYe=function(n,o,e,i,r){var s=n._gsap;s[o]=e,s.renderTransform(r,s)},Ea="transform",Fh=Ea+"Origin",aYe=function t(n,o){var e=this,i=this.target,r=i.style;if(n in lg&&r){if(this.tfm=this.tfm||{},"transform"===n)return Km.transform.split(",").forEach(function(s){return t.call(e,s,o)});if(~(n=Km[n]||n).indexOf(",")?n.split(",").forEach(function(s){return e.tfm[s]=ug(i,s)}):this.tfm[n]=i._gsap.x?i._gsap[n]:ug(i,n),this.props.indexOf(Ea)>=0)return;i._gsap.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Fh,o,"")),n=Ea}(r||o)&&this.props.push(n,o,r[n])},eue=function(n){n.translate&&(n.removeProperty("translate"),n.removeProperty("scale"),n.removeProperty("rotate"))},cYe=function(){var r,s,n=this.props,o=this.target,e=o.style,i=o._gsap;for(r=0;r<n.length;r+=3)n[r+1]?o[n[r]]=n[r+2]:n[r+2]?e[n[r]]=n[r+2]:e.removeProperty("--"===n[r].substr(0,2)?n[r]:n[r].replace(CV,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)i[s]=this.tfm[s];i.svg&&(i.renderTransform(),o.setAttribute("data-svg-origin",this.svgo||"")),(!(r=bV())||!r.isStart)&&!e[Ea]&&(eue(e),i.uncache=1)}},tue=function(n,o){var e={target:n,props:[],revert:cYe,save:aYe};return n._gsap||Uc.core.getCache(n),o&&o.split(",").forEach(function(i){return e.save(i)}),e},SV=function(n,o){var e=Q_.createElementNS?Q_.createElementNS((o||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),n):Q_.createElement(n);return e.style?e:Q_.createElement(n)},Zm=function t(n,o,e){var i=getComputedStyle(n);return i[o]||i.getPropertyValue(o.replace(CV,"-$1").toLowerCase())||i.getPropertyValue(o)||!e&&t(n,Qw(o)||o,1)||""},iue="O,Moz,ms,Ms,Webkit".split(","),Qw=function(n,o,e){var r=(o||aC).style,s=5;if(n in r&&!e)return n;for(n=n.charAt(0).toUpperCase()+n.substr(1);s--&&!(iue[s]+n in r););return s<0?null:(3===s?"ms":s>=0?iue[s]:"")+n},wV=function(){typeof window<"u"&&window.document&&(Zle=window,$w=(Q_=Zle.document).documentElement,aC=SV("div")||{style:{}},SV("div"),Ea=Qw(Ea),Fh=Ea+"Origin",aC.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",nue=!!Qw("perspective"),bV=Uc.core.reverting,vV=1)},TV=function t(n){var s,o=SV("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),e=this.parentNode,i=this.nextSibling,r=this.style.cssText;if($w.appendChild(o),o.appendChild(this),this.style.display="block",n)try{s=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(a){}else this._gsapBBox&&(s=this._gsapBBox());return e&&(i?e.insertBefore(this,i):e.appendChild(this)),$w.removeChild(o),this.style.cssText=r,s},oue=function(n,o){for(var e=o.length;e--;)if(n.hasAttribute(o[e]))return n.getAttribute(o[e])},rue=function(n){var o;try{o=n.getBBox()}catch(e){o=TV.call(n,!0)}return o&&(o.width||o.height)||n.getBBox===TV||(o=TV.call(n,!0)),!o||o.width||o.x||o.y?o:{x:+oue(n,["x","cx","x1"])||0,y:+oue(n,["y","cy","y1"])||0,width:0,height:0}},sue=function(n){return!(!n.getCTM||n.parentNode&&!n.ownerSVGElement||!rue(n))},AI=function(n,o){if(o){var e=n.style;o in lg&&o!==Fh&&(o=Ea),e.removeProperty?(("ms"===o.substr(0,2)||"webkit"===o.substr(0,6))&&(o="-"+o),e.removeProperty(o.replace(CV,"-$1").toLowerCase())):e.removeAttribute(o)}},Y_=function(n,o,e,i,r,s){var a=new ld(n._pt,o,e,0,1,s?Xle:Jle);return n._pt=a,a.b=i,a.e=r,n._props.push(e),a},aue={deg:1,rad:1,turn:1},lYe={grid:1,flex:1},J_=function t(n,o,e,i){var G,K,te,ee,r=parseFloat(e)||0,s=(e+"").trim().substr((r+"").length)||"px",a=aC.style,c=QQe.test(o),u="svg"===n.tagName.toLowerCase(),h=(u?"client":"offset")+(c?"Width":"Height"),b=100,w="px"===i,R="%"===i;return i===s||!r||aue[i]||aue[s]?r:("px"!==s&&!w&&(r=t(n,o,e,"px")),ee=n.getCTM&&sue(n),!R&&"%"!==s||!lg[o]&&!~o.indexOf("adius")?(a[c?"width":"height"]=b+(w?s:i),K=~o.indexOf("adius")||"em"===i&&n.appendChild&&!u?n:n.parentNode,ee&&(K=(n.ownerSVGElement||{}).parentNode),(!K||K===Q_||!K.appendChild)&&(K=Q_.body),(te=K._gsap)&&R&&te.width&&c&&te.time===qd.time&&!te.uncache?ac(r/te.width*b):((R||"%"===s)&&!lYe[Zm(K,"display")]&&(a.position=Zm(n,"position")),K===n&&(a.position="static"),K.appendChild(aC),G=aC[h],K.removeChild(aC),a.position="absolute",c&&R&&((te=tC(K)).time=qd.time,te.width=K[h]),ac(w?G*r/b:G&&r?b/G*r:0))):(G=ee?n.getBBox()[c?"width":"height"]:n[h],ac(R?r/G*b:r/100*G)))},ug=function(n,o,e,i){var r;return vV||wV(),o in Km&&"transform"!==o&&~(o=Km[o]).indexOf(",")&&(o=o.split(",")[0]),lg[o]&&"transform"!==o?(r=kI(n,i),r="transformOrigin"!==o?r[o]:r.svg?r.origin:gk(Zm(n,Fh))+" "+r.zOrigin+"px"):(!(r=n.style[o])||"auto"===r||i||~(r+"").indexOf("calc("))&&(r=fk[o]&&fk[o](n,o,e)||Zm(n,o)||dle(n,o)||("opacity"===o?1:0)),e&&!~(r+"").trim().indexOf(" ")?J_(n,o,r,e)+e:r},uYe=function(n,o,e,i){if(!e||"none"===e){var r=Qw(o,n,1),s=r&&Zm(n,r,1);s&&s!==e?(o=r,e=s):"borderColor"===o&&(e=Zm(n,"borderTopColor"))}var h,b,w,R,G,K,te,ee,le,me,ge,a=new ld(this._pt,n.style,o,0,1,qle),c=0,u=0;if(a.b=e,a.e=i,e+="","auto"==(i+="")&&(n.style[o]=i,i=Zm(n,o)||i,n.style[o]=e),Dle(h=[e,i]),i=h[1],w=(e=h[0]).match(Vw)||[],(i.match(Vw)||[]).length){for(;b=Vw.exec(i);)te=b[0],le=i.substring(c,b.index),G?G=(G+1)%5:("rgba("===le.substr(-5)||"hsla("===le.substr(-5))&&(G=1),te!==(K=w[u++]||"")&&(R=parseFloat(K)||0,ge=K.substr((R+"").length),"="===te.charAt(1)&&(te=zw(R,te)+ge),ee=parseFloat(te),me=te.substr((ee+"").length),c=Vw.lastIndex-me.length,me||(me=me||zd.units[o]||ge,c===i.length&&(i+=me,a.e+=me)),ge!==me&&(R=J_(n,o,K,me)||0),a._pt={_next:a._pt,p:le||1===u?le:",",s:R,c:ee-R,m:G&&G<4||"zIndex"===o?Math.round:0});a.c=c<i.length?i.substring(c,i.length):""}else a.r="display"===o&&"none"===i?Xle:Jle;return ole.test(i)&&(a.e=0),this._pt=a,a},cue={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},dYe=function(n){var o=n.split(" "),e=o[0],i=o[1]||"50%";return("top"===e||"bottom"===e||"left"===i||"right"===i)&&(n=e,e=i,i=n),o[0]=cue[e]||e,o[1]=cue[i]||i,o.join(" ")},pYe=function(n,o){if(o.tween&&o.tween._time===o.tween._dur){var a,c,u,e=o.t,i=e.style,r=o.u,s=e._gsap;if("all"===r||!0===r)i.cssText="",c=1;else for(u=(r=r.split(",")).length;--u>-1;)lg[a=r[u]]&&(c=1,a="transformOrigin"===a?Fh:Ea),AI(e,a);c&&(AI(e,Ea),s&&(s.svg&&e.removeAttribute("transform"),kI(e,1),s.uncache=1,eue(i)))}},fk={clearProps:function(n,o,e,i,r){if("isFromStart"!==r.data){var s=n._pt=new ld(n._pt,o,e,0,0,pYe);return s.u=i,s.pr=-10,s.tween=r,n._props.push(e),1}}},RI=[1,0,0,1,0,0],lue={},uue=function(n){return"matrix(1, 0, 0, 1, 0, 0)"===n||"none"===n||!n},due=function(n){var o=Zm(n,Ea);return uue(o)?RI:o.substr(7).match(ile).map(ac)},PV=function(n,o){var s,a,c,u,e=n._gsap||tC(n),i=n.style,r=due(n);return e.svg&&n.getAttribute("transform")?"1,0,0,1,0,0"===(r=[(c=n.transform.baseVal.consolidate().matrix).a,c.b,c.c,c.d,c.e,c.f]).join(",")?RI:r:(r===RI&&!n.offsetParent&&n!==$w&&!e.svg&&(c=i.display,i.display="block",(!(s=n.parentNode)||!n.offsetParent)&&(u=1,a=n.nextElementSibling,$w.appendChild(n)),r=due(n),c?i.display=c:AI(n,"display"),u&&(a?s.insertBefore(n,a):s?s.appendChild(n):$w.removeChild(n))),o&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},IV=function(n,o,e,i,r,s){var Ke,Ee,ct,a=n._gsap,c=r||PV(n,!0),u=a.xOrigin||0,h=a.yOrigin||0,b=a.xOffset||0,w=a.yOffset||0,R=c[0],G=c[1],K=c[2],te=c[3],ee=c[4],le=c[5],me=o.split(" "),ge=parseFloat(me[0])||0,Me=parseFloat(me[1])||0;e?c!==RI&&(Ee=R*te-G*K)&&(ct=ge*(-G/Ee)+Me*(R/Ee)-(R*le-G*ee)/Ee,ge=ge*(te/Ee)+Me*(-K/Ee)+(K*le-te*ee)/Ee,Me=ct):(ge=(Ke=rue(n)).x+(~me[0].indexOf("%")?ge/100*Ke.width:ge),Me=Ke.y+(~(me[1]||me[0]).indexOf("%")?Me/100*Ke.height:Me)),i||!1!==i&&a.smooth?(a.xOffset=b+((ee=ge-u)*R+(le=Me-h)*K)-ee,a.yOffset=w+(ee*G+le*te)-le):a.xOffset=a.yOffset=0,a.xOrigin=ge,a.yOrigin=Me,a.smooth=!!i,a.origin=o,a.originIsAbsolute=!!e,n.style[Fh]="0px 0px",s&&(Y_(s,a,"xOrigin",u,ge),Y_(s,a,"yOrigin",h,Me),Y_(s,a,"xOffset",b,a.xOffset),Y_(s,a,"yOffset",w,a.yOffset)),n.setAttribute("data-svg-origin",ge+" "+Me)},kI=function(n,o){var e=n._gsap||new Ule(n);if("x"in e&&!o&&!e.uncache)return e;var h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke,Ee,ot,ct,Pt,gn,qt,Je,xn,bi,rn,vn,Vn,An,zi,Ir,Ur,up,fr,eh,i=n.style,r=e.scaleX<0,s="px",a="deg",c=getComputedStyle(n),u=Zm(n,Fh)||"0";return h=b=w=K=te=ee=le=me=ge=0,R=G=1,e.svg=!(!n.getCTM||!sue(n)),c.translate&&(("none"!==c.translate||"none"!==c.scale||"none"!==c.rotate)&&(i[Ea]=("none"!==c.translate?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==c.rotate?"rotate("+c.rotate+") ":"")+("none"!==c.scale?"scale("+c.scale.split(" ").join(",")+") ":"")+("none"!==c[Ea]?c[Ea]:"")),i.scale=i.rotate=i.translate="none"),Ee=PV(n,e.svg),e.svg&&(e.uncache?(Vn=n.getBBox(),u=e.xOrigin-Vn.x+"px "+(e.yOrigin-Vn.y)+"px",vn=""):vn=!o&&n.getAttribute("data-svg-origin"),IV(n,vn||u,!!vn||e.originIsAbsolute,!1!==e.smooth,Ee)),Me=e.xOrigin||0,Ke=e.yOrigin||0,Ee!==RI&&(gn=Ee[0],qt=Ee[1],Je=Ee[2],xn=Ee[3],h=bi=Ee[4],b=rn=Ee[5],6===Ee.length?(R=Math.sqrt(gn*gn+qt*qt),G=Math.sqrt(xn*xn+Je*Je),K=gn||qt?Zw(qt,gn)*cC:0,(le=Je||xn?Zw(Je,xn)*cC+K:0)&&(G*=Math.abs(Math.cos(le*Kw))),e.svg&&(h-=Me-(Me*gn+Ke*Je),b-=Ke-(Me*qt+Ke*xn))):(up=Ee[7],zi=Ee[8],Ir=Ee[9],fr=Ee[11],h=Ee[12],b=Ee[13],w=Ee[14],te=(ot=Zw(eh=Ee[6],Ur=Ee[10]))*cC,ot&&(vn=bi*(ct=Math.cos(-ot))+zi*(Pt=Math.sin(-ot)),Vn=rn*ct+Ir*Pt,An=eh*ct+Ur*Pt,zi=bi*-Pt+zi*ct,Ir=rn*-Pt+Ir*ct,Ur=eh*-Pt+Ur*ct,fr=up*-Pt+fr*ct,bi=vn,rn=Vn,eh=An),ee=(ot=Zw(-Je,Ur))*cC,ot&&(ct=Math.cos(-ot),fr=xn*(Pt=Math.sin(-ot))+fr*ct,gn=vn=gn*ct-zi*Pt,qt=Vn=qt*ct-Ir*Pt,Je=An=Je*ct-Ur*Pt),K=(ot=Zw(qt,gn))*cC,ot&&(vn=gn*(ct=Math.cos(ot))+qt*(Pt=Math.sin(ot)),Vn=bi*ct+rn*Pt,qt=qt*ct-gn*Pt,rn=rn*ct-bi*Pt,gn=vn,bi=Vn),te&&Math.abs(te)+Math.abs(K)>359.9&&(te=K=0,ee=180-ee),R=ac(Math.sqrt(gn*gn+qt*qt+Je*Je)),G=ac(Math.sqrt(rn*rn+eh*eh)),ot=Zw(bi,rn),le=Math.abs(ot)>2e-4?ot*cC:0,ge=fr?1/(fr<0?-fr:fr):0),e.svg&&(vn=n.getAttribute("transform"),e.forceCSS=n.setAttribute("transform","")||!uue(Zm(n,Ea)),vn&&n.setAttribute("transform",vn))),Math.abs(le)>90&&Math.abs(le)<270&&(r?(R*=-1,le+=K<=0?180:-180,K+=K<=0?180:-180):(G*=-1,le+=le<=0?180:-180)),o=o||e.uncache,e.x=h-((e.xPercent=h&&(!o&&e.xPercent||(Math.round(n.offsetWidth/2)===Math.round(-h)?-50:0)))?n.offsetWidth*e.xPercent/100:0)+s,e.y=b-((e.yPercent=b&&(!o&&e.yPercent||(Math.round(n.offsetHeight/2)===Math.round(-b)?-50:0)))?n.offsetHeight*e.yPercent/100:0)+s,e.z=w+s,e.scaleX=ac(R),e.scaleY=ac(G),e.rotation=ac(K)+a,e.rotationX=ac(te)+a,e.rotationY=ac(ee)+a,e.skewX=le+a,e.skewY=me+a,e.transformPerspective=ge+s,(e.zOrigin=parseFloat(u.split(" ")[2])||0)&&(i[Fh]=gk(u)),e.xOffset=e.yOffset=0,e.force3D=zd.force3D,e.renderTransform=e.svg?mYe:nue?pue:hYe,e.uncache=0,e},gk=function(n){return(n=n.split(" "))[0]+" "+n[1]},MV=function(n,o,e){var i=nu(o);return ac(parseFloat(o)+parseFloat(J_(n,"x",e+"px",i)))+i},hYe=function(n,o){o.z="0px",o.rotationY=o.rotationX="0deg",o.force3D=0,pue(n,o)},lC="0deg",LI="0px",uC=") ",pue=function(n,o){var e=o||this,i=e.xPercent,r=e.yPercent,s=e.x,a=e.y,c=e.z,u=e.rotation,h=e.rotationY,b=e.rotationX,w=e.skewX,R=e.skewY,G=e.scaleX,K=e.scaleY,te=e.transformPerspective,ee=e.force3D,le=e.target,me=e.zOrigin,ge="",Me="auto"===ee&&n&&1!==n||!0===ee;if(me&&(b!==lC||h!==lC)){var ct,Ke=parseFloat(h)*Kw,Ee=Math.sin(Ke),ot=Math.cos(Ke);Ke=parseFloat(b)*Kw,ct=Math.cos(Ke),s=MV(le,s,Ee*ct*-me),a=MV(le,a,-Math.sin(Ke)*-me),c=MV(le,c,ot*ct*-me+me)}te!==LI&&(ge+="perspective("+te+uC),(i||r)&&(ge+="translate("+i+"%, "+r+"%) "),(Me||s!==LI||a!==LI||c!==LI)&&(ge+=c!==LI||Me?"translate3d("+s+", "+a+", "+c+") ":"translate("+s+", "+a+uC),u!==lC&&(ge+="rotate("+u+uC),h!==lC&&(ge+="rotateY("+h+uC),b!==lC&&(ge+="rotateX("+b+uC),(w!==lC||R!==lC)&&(ge+="skew("+w+", "+R+uC),(1!==G||1!==K)&&(ge+="scale("+G+", "+K+uC),le.style[Ea]=ge||"translate(0, 0)"},mYe=function(n,o){var Me,Ke,Ee,ot,ct,e=o||this,i=e.xPercent,r=e.yPercent,s=e.x,a=e.y,c=e.rotation,u=e.skewX,h=e.skewY,b=e.scaleX,w=e.scaleY,R=e.target,G=e.xOrigin,K=e.yOrigin,te=e.xOffset,ee=e.yOffset,le=e.forceCSS,me=parseFloat(s),ge=parseFloat(a);c=parseFloat(c),u=parseFloat(u),(h=parseFloat(h))&&(u+=h=parseFloat(h),c+=h),c||u?(c*=Kw,u*=Kw,Me=Math.cos(c)*b,Ke=Math.sin(c)*b,Ee=Math.sin(c-u)*-w,ot=Math.cos(c-u)*w,u&&(h*=Kw,ct=Math.tan(u-h),Ee*=ct=Math.sqrt(1+ct*ct),ot*=ct,h&&(ct=Math.tan(h),Me*=ct=Math.sqrt(1+ct*ct),Ke*=ct)),Me=ac(Me),Ke=ac(Ke),Ee=ac(Ee),ot=ac(ot)):(Me=b,ot=w,Ke=Ee=0),(me&&!~(s+"").indexOf("px")||ge&&!~(a+"").indexOf("px"))&&(me=J_(R,"x",s,"px"),ge=J_(R,"y",a,"px")),(G||K||te||ee)&&(me=ac(me+G-(G*Me+K*Ee)+te),ge=ac(ge+K-(G*Ke+K*ot)+ee)),(i||r)&&(ct=R.getBBox(),me=ac(me+i/100*ct.width),ge=ac(ge+r/100*ct.height)),R.setAttribute("transform",ct="matrix("+Me+","+Ke+","+Ee+","+ot+","+me+","+ge+")"),le&&(R.style[Ea]=ct)},fYe=function(n,o,e,i,r){var b,w,s=360,a=al(r),u=parseFloat(r)*(a&&~r.indexOf("rad")?cC:1)-i,h=i+u+"deg";return a&&("short"===(b=r.split("_")[1])&&(u%=s)!=u%180&&(u+=u<0?s:-s),"cw"===b&&u<0?u=(u+36e9)%s-~~(u/s)*s:"ccw"===b&&u>0&&(u=(u-36e9)%s-~~(u/s)*s)),n._pt=w=new ld(n._pt,o,e,i,u,JQe),w.e=h,w.u="deg",n._props.push(e),w},hue=function(n,o){for(var e in o)n[e]=o[e];return n},gYe=function(n,o,e){var a,c,u,h,b,w,G,i=hue({},e._gsap),s=e.style;for(c in i.svg?(u=e.getAttribute("transform"),e.setAttribute("transform",""),s[Ea]=o,a=kI(e,1),AI(e,Ea),e.setAttribute("transform",u)):(u=getComputedStyle(e)[Ea],s[Ea]=o,a=kI(e,1),s[Ea]=u),lg)(u=i[c])!==(h=a[c])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(c)<0&&(b=nu(u)!==(G=nu(h))?J_(e,c,u,G):parseFloat(u),w=parseFloat(h),n._pt=new ld(n._pt,a,c,b,w-b,yV),n._pt.u=G||0,n._props.push(c));hue(a,i)};
/*!
     * CSSPlugin 3.12.2
     * https://greensock.com
     *
     * Copyright 2008-2023, GreenSock. All rights reserved.
     * Subject to the terms at https://greensock.com/standard-license or for
     * Club GreenSock members, the agreement issued with that membership.
     * @author: Jack Doyle, jack@greensock.com
    */ad("padding,margin,Width,Radius",function(t,n){var o="Top",e="Right",i="Bottom",r="Left",s=(n<3?[o,e,i,r]:[o+r,o+e,i+e,i+r]).map(function(a){return n<2?t+a:"border"+a+t});fk[n>1?"border"+t:t]=function(a,c,u,h,b){var w,R;if(arguments.length<4)return w=s.map(function(G){return ug(a,G,u)}),5===(R=w.join(" ")).split(w[0]).length?w[0]:R;w=(h+"").split(" "),R={},s.forEach(function(G,K){return R[G]=w[K]=w[K]||w[(K-1)/2|0]}),a.init(c,R,b)}});var mue={name:"css",register:wV,targetTest:function(n){return n.style&&n.nodeType},init:function(n,o,e,i,r){var u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke,Ee,ot,s=this._props,a=n.style,c=e.vars.startAt;for(K in vV||wV(),this.styles=this.styles||tue(n),ot=this.styles.props,this.tween=e,o)if("autoRound"!==K&&(h=o[K],!Hd[K]||!Gle(K,o,e,i,n,r)))if(G=fk[K],"function"==(R=typeof h)&&(R=typeof(h=h.call(e,i,n,r))),"string"===R&&~h.indexOf("random(")&&(h=PI(h)),G)G(this,n,K,h,e)&&(Ee=1);else if("--"===K.substr(0,2))u=(getComputedStyle(n).getPropertyValue(K)+"").trim(),h+="",K_.lastIndex=0,K_.test(u)||(te=nu(u),ee=nu(h)),ee?te!==ee&&(u=J_(n,K,u,ee)+ee):te&&(h+=te),this.add(a,"setProperty",u,h,i,r,0,0,K),s.push(K),ot.push(K,0,a[K]);else if("undefined"!==R){if(c&&K in c?(u="function"==typeof c[K]?c[K].call(e,i,n,r):c[K],al(u)&&~u.indexOf("random(")&&(u=PI(u)),nu(u+"")||(u+=zd.units[K]||nu(ug(n,K))||""),"="===(u+"").charAt(1)&&(u=ug(n,K))):u=ug(n,K),w=parseFloat(u),(le="string"===R&&"="===h.charAt(1)&&h.substr(0,2))&&(h=h.substr(2)),b=parseFloat(h),K in Km&&("autoAlpha"===K&&(1===w&&"hidden"===ug(n,"visibility")&&b&&(w=0),ot.push("visibility",0,a.visibility),Y_(this,a,"visibility",w?"inherit":"hidden",b?"inherit":"hidden",!b)),"scale"!==K&&"transform"!==K&&~(K=Km[K]).indexOf(",")&&(K=K.split(",")[0])),me=K in lg)if(this.styles.save(K),ge||((Me=n._gsap).renderTransform&&!o.parseTransform||kI(n,o.parseTransform),Ke=!1!==o.smoothOrigin&&Me.smooth,(ge=this._pt=new ld(this._pt,a,Ea,0,1,Me.renderTransform,Me,0,-1)).dep=1),"scale"===K)this._pt=new ld(this._pt,Me,"scaleY",Me.scaleY,(le?zw(Me.scaleY,le+b):b)-Me.scaleY||0,yV),this._pt.u=0,s.push("scaleY",K),K+="X";else{if("transformOrigin"===K){ot.push(Fh,0,a[Fh]),h=dYe(h),Me.svg?IV(n,h,0,Ke,0,this):((ee=parseFloat(h.split(" ")[2])||0)!==Me.zOrigin&&Y_(this,Me,"zOrigin",Me.zOrigin,ee),Y_(this,a,K,gk(u),gk(h)));continue}if("svgOrigin"===K){IV(n,h,1,Ke,0,this);continue}if(K in lue){fYe(this,Me,K,w,le?zw(w,le+h):h);continue}if("smoothOrigin"===K){Y_(this,Me,"smooth",Me.smooth,h);continue}if("force3D"===K){Me[K]=h;continue}if("transform"===K){gYe(this,h,n);continue}}else K in a||(K=Qw(K)||K);if(me||(b||0===b)&&(w||0===w)&&!YQe.test(h)&&K in a)b||(b=0),(te=(u+"").substr((w+"").length))!==(ee=nu(h)||(K in zd.units?zd.units[K]:te))&&(w=J_(n,K,u,ee)),this._pt=new ld(this._pt,me?Me:a,K,w,(le?zw(w,le+b):b)-w,me||"px"!==ee&&"zIndex"!==K||!1===o.autoRound?yV:eYe),this._pt.u=ee||0,te!==ee&&"%"!==ee&&(this._pt.b=u,this._pt.r=XQe);else if(K in a)uYe.call(this,n,K,u,le?le+h:h);else if(K in n)this.add(n,K,u||n[K],le?le+h:h,i,r);else if("parseTransform"!==K){Z5(K,h);continue}me||(K in a?ot.push(K,0,a[K]):ot.push(K,1,u||n[K])),s.push(K)}Ee&&Wle(this)},render:function(n,o){if(o.tween._time||!bV())for(var e=o._pt;e;)e.r(n,e.d),e=e._next;else o.styles.revert()},get:ug,aliases:Km,getSetter:function(n,o,e){var i=Km[o];return i&&i.indexOf(",")<0&&(o=i),o in lg&&o!==Fh&&(n._gsap.x||ug(n,"x"))?e&&Qle===e?"scale"===o?oYe:iYe:(Qle=e||{})&&("scale"===o?rYe:sYe):n.style&&!j5(n.style[o])?tYe:~o.indexOf("-")?nYe:hV(n,o)},core:{_removeProperty:AI,_getMatrix:PV}};Uc.utils.checkPrefix=Qw,Uc.core.getStyleSaver=tue,function(t,n,o,e){var i=ad(t+","+n+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(r){lg[r]=1});ad(n,function(r){zd.units[r]="deg",lue[r]=1}),Km[i[13]]=t+","+n,ad("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(r){var s=r.split(":");Km[s[1]]=i[s[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY"),ad("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){zd.units[t]="px"}),Uc.registerPlugin(mue);var Zr=Uc.registerPlugin(mue)||Uc;let Qr=(()=>{var t;class n{getValue(){return this.value||0}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["number"]],inputs:{value:"value",showShortNumber:"showShortNumber"},decls:3,vars:5,template:function(e,i){1&e&&(H(0),V(1,"shortNumber"),V(2,"formatNumber")),2&e&&se(i.showShortNumber?$(1,1,i.getValue()):$(2,3,i.getValue()))},dependencies:[Go,eI],styles:["[_nghost-%COMP%]{font-size:1.4rem;white-space:nowrap;display:inline-block;line-height:1;direction:ltr}\n\n/*# sourceMappingURL=number.component.ts-angular-inline--5.css.map*/"],changeDetection:0}),n})(),OV=(()=>{var t;class n extends Qr{constructor(){super(...arguments),this.EIcons=ve.EIcons}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["chip-icon-component"]],hostAttrs:[1,"chip-icon-component-host"],features:[Ht],decls:3,vars:3,consts:[[1,"chip-icon-component__wrapper"],[1,"chip-icon__chip",3,"icon"],[1,"chip-icon__number",3,"value","showShortNumber"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"icon-component",1)(2,"number",2),m()),2&e&&(d(),l("icon",i.EIcons.CHIP),d(),l("value",i.value)("showShortNumber",i.showShortNumber))},dependencies:[Dn,Qr],styles:["[_nghost-%COMP%]{font-size:2.4rem;white-space:nowrap;display:inline-block;vertical-align:top}.chip-icon__number[_ngcontent-%COMP%]{line-height:initial;margin-left:.3rem;font-size:inherit}.chip-icon__chip[_ngcontent-%COMP%]{font-size:inherit;font-weight:inherit}.chip-icon-component__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0}),n})();var _Ye=ve.EIcons;let EV=(()=>{var t;class n extends Qr{constructor(){super(...arguments),this.gemIcon=_Ye.ICON_GEMS}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["gem-icon-component"]],hostAttrs:[1,"gem-icon-component-host"],features:[Ht],decls:3,vars:3,consts:[[1,"gem-icon-component__wrapper"],[1,"gem-icon__chip",3,"icon"],[1,"gem-icon__number",3,"value","showShortNumber"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"icon-component",1)(2,"number",2),m()),2&e&&(d(),l("icon","icons/gems.svg"),d(),l("value",i.value)("showShortNumber",i.showShortNumber))},dependencies:[Dn,Qr],styles:["[_nghost-%COMP%]{font-size:2.4rem;display:inline-block;white-space:nowrap}.gem-icon__number[_ngcontent-%COMP%]{line-height:initial;margin-left:.3rem;font-size:inherit}.gem-icon__chip[_ngcontent-%COMP%]{font-size:inherit;font-weight:inherit}.gem-icon-component__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0}),n})();const fue=t=>({hidden:t});function vYe(t,n){if(1&t&&B(0,"chip-icon-component",8),2&t){const o=_();l("ngClass",ne(3,fue,o.animating))("showShortNumber",o.showShortNumber)("value",o.value)}}function bYe(t,n){if(1&t&&B(0,"chip-icon-component",9),2&t){const o=_();l("showShortNumber",o.showShortNumber)("value",o.currencyAmount.value)}}function CYe(t,n){if(1&t&&B(0,"gem-icon-component",10),2&t){const o=_();l("ngClass",ne(3,fue,o.animating))("showShortNumber",o.showShortNumber)("value",o.value)}}function yYe(t,n){if(1&t&&B(0,"gem-icon-component",11),2&t){const o=_();l("showShortNumber",o.showShortNumber)("value",o.currencyAmount.value)}}function SYe(t,n){if(1&t&&(p(0,"span",15),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,"LOCALE.CURRENCY_SIGNS."+o.currency.toUpperCase()))}}const wYe=t=>[t];function TYe(t,n){if(1&t&&(p(0,"span",12),U(1,SYe,3,3,"span",13),B(2,"number",14),m()),2&t){const o=_();l("ngClass",ne(3,wYe,"bgn"===o.currency?"bgn":"")),d(),l("ngIf",!o.isString(o.value)),d(),l("value",o.value)}}function PYe(t,n){if(1&t&&(p(0,"span",16),H(1),m()),2&t){const o=_();d(),se(o.value)}}function IYe(t,n){1&t&&B(0,"div",17),2&t&&l("ngClass",_().crossType)}let So=(()=>{var t;class n{constructor(e){this.cdr=e,this.crossType=n.ECrossType.WhiteCross,this.animate={enabled:!1,duration:0},this.animating=!1,this.currencyType=ln}isString(e){return"string"==typeof e}ngOnChanges(e){e.value&&(!e.value.firstChange&&this.animate.enabled&&"number"==typeof e.value.currentValue?this.animateValueChange(this.value):this.currencyAmount={value:this.value})}animateValueChange(e){const i={value:this.currencyAmount.value},r=Math.abs(e-this.currencyAmount.value),s=r<=5?.1*r*1e3:this.animate.duration;this.animating=!0,this.cdr.detectChanges(),Zr.to(i,{duration:s/1e3,value:this.currencyAmount.value+(e-this.currencyAmount.value),ease:mk.easeOut,onUpdate:()=>{this.currencyAmount.value=Math.floor(i.value),this.cdr.detectChanges()},onComplete:()=>{this.currencyAmount.value=Math.floor(i.value),this.animating=!1,this.cdr.detectChanges()}})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["currency-component"]],hostAttrs:[1,"currency-component-host"],inputs:{value:"value",currency:"currency",isCrossed:"isCrossed",crossType:"crossType",animate:"animate",showShortNumber:"showShortNumber"},features:[it],decls:8,vars:7,consts:[[1,"currency-component-container"],["class","currency-container","data-cy","chipChichingNotification",3,"ngClass","showShortNumber","value",4,"ngIf"],["class","currency-container animated","data-cy","chipChichingNotification",3,"showShortNumber","value",4,"ngIf"],["class","currency-container","data-cy","gemChichingNotification",3,"ngClass","showShortNumber","value",4,"ngIf"],["class","currency-container animated","data-cy","gemChichingNotification",3,"showShortNumber","value",4,"ngIf"],["class","currency-container price",3,"ngClass",4,"ngIf"],["class","currency-container price",4,"ngIf"],["class","currency-component__cross",3,"ngClass",4,"ngIf"],["data-cy","chipChichingNotification",1,"currency-container",3,"ngClass","showShortNumber","value"],["data-cy","chipChichingNotification",1,"currency-container","animated",3,"showShortNumber","value"],["data-cy","gemChichingNotification",1,"currency-container",3,"ngClass","showShortNumber","value"],["data-cy","gemChichingNotification",1,"currency-container","animated",3,"showShortNumber","value"],[1,"currency-container","price",3,"ngClass"],["class","currency",4,"ngIf"],[1,"price",3,"value"],[1,"currency"],[1,"currency-container","price"],[1,"currency-component__cross",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,vYe,1,5,"chip-icon-component",1)(2,bYe,1,2,"chip-icon-component",2)(3,CYe,1,5,"gem-icon-component",3)(4,yYe,1,2,"gem-icon-component",4)(5,TYe,3,5,"span",5)(6,PYe,2,1,"span",6)(7,IYe,1,1,"div",7),m()),2&e&&(d(),l("ngIf",i.currency===i.currencyType.Chips),d(),l("ngIf",i.currency===i.currencyType.Chips&&i.animating),d(),l("ngIf",i.currency===i.currencyType.Gems),d(),l("ngIf",i.currency===i.currencyType.Gems&&i.animating),d(),l("ngIf",!i.isString(i.value)&&i.currency!==i.currencyType.Chips&&i.currency!==i.currencyType.Gems),d(),l("ngIf",i.isString(i.value)),d(),l("ngIf",i.isCrossed))},dependencies:[Xe,Ne,Qr,OV,EV,qe],styles:[".currency-component-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;position:relative;margin:auto}.currency-container[_ngcontent-%COMP%]{position:relative;font-size:inherit;font-weight:inherit}.currency-container[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{white-space:normal;font-size:inherit!important}.currency-container[_ngcontent-%COMP%]   .currency[_ngcontent-%COMP%]{margin-right:.3rem;font-size:inherit}.currency-container.bgn[_ngcontent-%COMP%]{margin-right:0;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.currency-container.bgn[_ngcontent-%COMP%]   .currency[_ngcontent-%COMP%]{order:2;text-transform:lowercase;margin:0 .3rem}.currency-container.animated[_ngcontent-%COMP%]{position:absolute;left:0}.currency-container.hidden[_ngcontent-%COMP%]{visibility:hidden}.currency-component__cross[_ngcontent-%COMP%]{position:absolute;top:50%;left:0;transform:translateY(-50%);height:2px;width:100%}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.ECrossType||(t.ECrossType={})).RedCross="redCross",o.WhiteCross="whiteCross"}(So||(So={}));let cc=(()=>{var t;class n{constructor(e,i,r){this.http=e,this.inventoryConfig=i.getConfig().store.items,this.store=r}getInventoryItems(){const e=this.store.selectUserState();return e.profile.inventory.items.concat(e.gameInventory.items)}getActiveItem(e,i){return e.find(r=>r.item.type===i&&r.equipped)}equipItem(e,i){var r=this;return f(function*(){yield r.http.post("users/inventory/equip",{itemId:e.item.id,gameName:i}).toPromise();const s=r.store.selectUserState(),a=[];let c,u;if(u=r.isGameItemType(e.item.type)?s.gameInventory:s.profile.inventory,c=ie.clone(u.items.find(h=>h.item.id===e.item.id),!0),!c)throw new ie.InvalidArgumentsError("[InventoryService:equipItem] only owned items can be equipped!");u.items.forEach(h=>{const b=ie.clone(h);h.item.id===c.item.id?r.equipSingleItem(b,i):-1===mVe.indexOf(c.item.type)&&h.item.type===c.item.type&&r.unequipSingleItem(b,i),a.push(b)}),r.isGameItemType(e.item.type)?r.store.dispatch(jG({items:a})):r.store.dispatch(kie({items:a}))})()}equipSingleItem(e,i){i?(e.equippedGames||(e.equippedGames=[]),-1===e.equippedGames.indexOf(i)&&e.equippedGames.push(i)):e.equipped=!0}unequipSingleItem(e,i){i&&(e.equippedGames=e.equippedGames?e.equippedGames.filter(r=>r!==i):[]),e.equipped=!1}unequipItem(e,i){var r=this;return f(function*(){yield r.http.post("users/inventory/unequip",{itemId:e.item.id,gameName:i}).toPromise();const s=r.store.selectUserState();let a,c;if(c=r.isGameItemType(e.item.type)?s.gameInventory:s.profile.inventory,a=ie.clone(c.items.find(u=>u.item.id===e.item.id)),!a)throw new ie.InvalidArgumentsError("[InventoryService:unequipItem] only owned items can be unequipped!");r.unequipSingleItem(a,i),r.isGameItemType(e.item.type)?r.store.dispatch(Die({invItem:a})):r.store.dispatch(Lie({invItem:a}))})()}getEquippedItemsByType(e){let i=[];const r=this.getInventoryItems();return e.forEach(s=>{const a=r.filter(c=>c.item.type===s&&c.equipped);i=i.concat(a)}),i}isInventoryType(e){return!!this.inventoryConfig.find(i=>i.type===e)}isGlobalInventoryType(e){return!!this.inventoryConfig.find(i=>!(i.type!==e||i.gamesAvailable&&i.gamesAvailable.length))}isInventoryCategoryInGeneralTabs(e){return e===wt.Emotions}isInventoryItemTypeInGeneralTabs(e){const i=this.inventoryConfig.find(r=>r.type===e);return this.isInventoryCategoryInGeneralTabs(i.group)}isGameItemType(e){return-1!==MU.indexOf(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Zt),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function MYe(t,n){if(1&t&&B(0,"currency-component",3),2&t){const o=_();l("crossType",o.crossType)("currency",o.currency)("value",o.item.mobilePrice?o.getMobilePrice(o.item.mobilePrice):o.price)("isCrossed",o.isCrossed)("crossType",o.crossType)}}function OYe(t,n){1&t&&(p(0,"span",4),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"WORDS.FREE")))}let X_=(()=>{var t;class n{constructor(){this.crossType=So.ECrossType.WhiteCross,this.isVirtualCurrency=!1}ngOnChanges(){this.item.prices&&(this.price=this.item.prices[Object.keys(this.item.prices)[0]],this.discount&&(this.price=Math.round(this.price*(100-this.discount)/100)),this.currency=Object.keys(this.item.prices)[0],this.isVirtualCurrency=this.item.vCurrency)}getMobilePrice(e){return e.replace(/\u00A0/g," ")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["item-price"]],hostAttrs:[1,"item-price-component-host"],inputs:{item:"item",isCrossed:"isCrossed",discount:"discount",crossType:"crossType"},features:[it],decls:3,vars:2,consts:[[1,"item-price__text"],["class","item-price__currency","data-cy","storePreviewPrice",3,"crossType","currency","value","isCrossed",4,"ngIf"],["class","item-price__currency","data-cy","storePreviewDiscount",4,"ngIf"],["data-cy","storePreviewPrice",1,"item-price__currency",3,"crossType","currency","value","isCrossed"],["data-cy","storePreviewDiscount",1,"item-price__currency"]],template:function(e,i){1&e&&(p(0,"span",0),U(1,MYe,1,5,"currency-component",1)(2,OYe,3,3,"span",2),m()),2&e&&(d(),l("ngIf",0!==i.price),d(),l("ngIf",!i.item.mobilePrice&&0===i.price))},dependencies:[Ne,So,qe],changeDetection:0}),n})();var xV=ve.EButtonModifier;function EYe(t,n){1&t&&B(0,"item-price",3),2&t&&l("item",_().clientStoreProduct)}function xYe(t,n){1&t&&(p(0,"span",4),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.EQUIP")))}function AYe(t,n){1&t&&(p(0,"span",4),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.UNEQUIP")))}let Uh=(()=>{var t;class n{constructor(e,i){this.bclass="",this.isVirtualCurrency=!1,this.cdr=e,this.inventoryService=i,this.buttonClicked=new ke,this.disabledClicked=new ke}ngOnInit(){this.clientStoreProduct.prices&&(this.price=this.clientStoreProduct.prices[Object.keys(this.clientStoreProduct.prices)[0]],this.currency=Object.keys(this.clientStoreProduct.prices)[0],this.isVirtualCurrency=this.clientStoreProduct.vCurrency),this.setButtonType(),this.detectChanges()}ngAfterContentChecked(){this.lastItemOwnedState&&(this.clientStoreProduct.owned!==this.lastItemOwnedState.owned||this.clientStoreProduct.equipped!==this.lastItemOwnedState.equipped||this.clientStoreProduct.equippedGames&&this.lastItemOwnedState.equippedGames&&this.clientStoreProduct.equippedGames.length!==this.lastItemOwnedState.equippedGames.length)&&this.setButtonType(),this.detectChanges()}ngOnChanges(e){e.clientStoreProduct&&!e.clientStoreProduct.firstChange&&(this.clientStoreProduct.prices&&(this.price=this.clientStoreProduct.prices[Object.keys(this.clientStoreProduct.prices)[0]],this.currency=Object.keys(this.clientStoreProduct.prices)[0],this.isVirtualCurrency=this.clientStoreProduct.vCurrency),this.setButtonType(),this.detectChanges())}setButtonType(){var e=this;return f(function*(){e.isEquipped=e.inventoryService.isInventoryType(e.clientStoreProduct.item.type)&&!e.inventoryService.isGlobalInventoryType(e.clientStoreProduct.item.type)?e.clientStoreProduct.equippedGames&&-1!==e.clientStoreProduct.equippedGames.indexOf(e.gameId):e.clientStoreProduct.equipped,e.clientStoreProduct.owned||e.isEquipped?e.clientStoreProduct.owned&&!e.isEquipped?e.buttonType=xV.BUTTON_ACTION:e.clientStoreProduct.owned&&e.isEquipped&&(e.buttonType=xV.BUTTON_ACCENT):e.buttonType=xV.BUTTON_SHOP,e.lastItemOwnedState={owned:e.clientStoreProduct.owned,equipped:e.isEquipped,equippedGames:e.clientStoreProduct.equippedGames},e.detectChanges()})()}buttonClick(){this.paymentProvider&&this.buttonClicked.emit(this.paymentProvider),this.detectChanges()}detectChanges(){this.cdr.detectChanges()}clickDisabled(){this.disabledClicked.emit()}getMobilePrice(e){return e.replace(/\u00A0/g," ")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(cc))},t.\u0275cmp=pe({type:t,selectors:[["item-buy-button"]],inputs:{clientStoreProduct:"clientStoreProduct",paymentProvider:"paymentProvider",disabled:"disabled",loading:"loading",gameId:"gameId",customClass:"customClass",bclass:"bclass"},outputs:{buttonClicked:"buttonClicked",disabledClicked:"disabledClicked"},features:[it],decls:4,vars:8,consts:[[1,"item-buy-button__main",3,"buttonModifier","bclass","disabled","loading","onClick","onDisabledClick"],["class","item-buy-button__text price",3,"item",4,"ngIf"],["class","item-buy-button__text",4,"ngIf"],[1,"item-buy-button__text","price",3,"item"],[1,"item-buy-button__text"]],template:function(e,i){1&e&&(p(0,"button-text",0),Y("onClick",function(){return i.buttonClick()})("onDisabledClick",function(){return i.clickDisabled()}),U(1,EYe,1,1,"item-price",1)(2,xYe,3,3,"span",2)(3,AYe,3,3,"span",2),m()),2&e&&(l("buttonModifier",i.buttonType)("bclass",i.bclass)("disabled",i.disabled)("loading",i.loading),Hn("data-cy","storeBuyButton"+(i.clientStoreProduct.owned&&i.isEquipped?"OwnedAndEquipped":i.clientStoreProduct.owned?"Owned":"")),d(),l("ngIf",!i.clientStoreProduct.owned&&!i.isEquipped||i.clientStoreProduct.item.giftOnly),d(),l("ngIf",i.clientStoreProduct.owned&&!i.isEquipped),d(),l("ngIf",i.clientStoreProduct.owned&&i.isEquipped))},dependencies:[Ne,pn,X_,qe],styles:["[_nghost-%COMP%]{width:100%}.item-buy-button__main[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{width:auto}.item-buy-button__main[_ngcontent-%COMP%]   .currency[_ngcontent-%COMP%]{width:auto;margin-right:.3rem}"]}),n})();var RYe=ve.EButtonModifier;const kYe=t=>({timeConfig:t});let AV=(()=>{var t;class n{constructor(e){this.isVirtualCurrency=!1,this.buttonType=RYe.BUTTON_SHOP,this.cdr=e,this.buttonClicked=new ke}ngOnInit(){this.priceForRentTimeValue=this.item.prices[Object.keys(this.item.prices)[0]],this.currency=Object.keys(this.item.prices)[0],this.isVirtualCurrency=this.item.vCurrency,this.timeLeftConfig=Zu}ngOnDestroy(){}buttonClick(){this.paymentProvider&&this.buttonClicked.emit(this.paymentProvider)}detectChanges(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["rent-button"]],inputs:{item:"item",paymentProvider:"paymentProvider",disabled:"disabled"},outputs:{buttonClicked:"buttonClicked"},decls:9,vars:9,consts:[[1,"rent-button__wrapper"],[1,"rent-button__container--content","only-one-rent-value"],[1,"rent-button__container--rent-time"],[1,"rent-button__container--rent-button"],[1,"rent-button-button__main",3,"buttonModifier","disabled","onClick"],[1,"rent-button-button__text",3,"item"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"p"),H(4),V(5,"timeLeft"),m()(),p(6,"div",3)(7,"button-text",4),Y("onClick",function(){return i.buttonClick()}),B(8,"item-price",5),m()()()()),2&e&&(d(4),se(yt(5,4,i.item.item.lifeTime,ne(7,kYe,i.timeLeftConfig))),d(3),l("buttonModifier",i.buttonType)("disabled",i.disabled),d(),l("item",i.item))},dependencies:[pn,X_,Ps],styles:[".rent-button__wrapper[_ngcontent-%COMP%]{height:12rem;display:flex;flex-flow:row wrap}.rent-button__container--content[_ngcontent-%COMP%]{width:calc(100% - 10rem);height:100%;display:flex;flex-flow:column nowrap}.rent-button__container--content.only-one-rent-value[_ngcontent-%COMP%]{width:100%}.rent-button__container--rent-time[_ngcontent-%COMP%]{position:relative;height:50%;display:flex;justify-content:center;align-items:center;overflow:hidden}.rent-button__container--rent-time[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:2.4rem;transition:transform 2s ease}.rent-button__container--rent-button[_ngcontent-%COMP%]{height:50%;display:flex;justify-content:center;align-items:center}.rent-button-button__main[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{width:auto}.rent-button-button__main[_ngcontent-%COMP%]   .currency[_ngcontent-%COMP%]{width:auto;margin-right:.3rem}"],changeDetection:0}),n})();var LYe=ve.EButtonModifier,Gc=ve.EIcons;function DYe(t,n){1&t&&(p(0,"span",8),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TEXT.OTHER"),""))}function BYe(t,n){1&t&&(p(0,"span",9),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"BUTTON.PAY_SMS"),""))}function NYe(t,n){1&t&&(p(0,"span",10),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"PROMO_CODES.PROMO_CODES_CLAIM"),""))}function FYe(t,n){1&t&&(p(0,"span",10),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"BUTTON.BUY"),""))}function UYe(t,n){if(1&t&&(p(0,"div",11)(1,"p"),H(2),m()()),2&t){const o=_(2);d(2),ze("+",o.paymentProvider.bonusPercent,"%")}}function GYe(t,n){if(1&t){const o=Ce();p(0,"button-text",3),Y("onClick",function(){return oe(o),re(_().providerClicked())}),U(1,DYe,3,3,"span",4)(2,BYe,3,3,"span",5)(3,NYe,3,3,"span",6)(4,FYe,3,3,"span",6)(5,UYe,3,1,"div",7),m()}if(2&t){const o=_();ni("provider-button__button ",o.paymentProvider.provider,""),l("buttonModifier",o.buttonType)("disabled",o.disabled)("bclass",o.paymentProvider.provider+" "+o.bclass),d(),l("ngIf","xsolla"===o.paymentProvider.provider),d(),l("ngIf","teracomm"===o.paymentProvider.provider),d(),l("ngIf","code"===o.paymentProvider.provider),d(),l("ngIf","carry1st"===o.paymentProvider.provider),d(),l("ngIf",o.paymentProvider.bonusPercent&&o.showBonusPercentBadge)}}function VYe(t,n){if(1&t&&(p(0,"div",11)(1,"p"),H(2),m()()),2&t){const o=_(2);d(2),ze("+",o.paymentProvider.bonusPercent,"%")}}function zYe(t,n){if(1&t){const o=Ce();p(0,"button-icon",12),Y("onClick",function(){return oe(o),re(_().providerClicked())}),U(1,VYe,3,1,"div",7),m()}if(2&t){const o=_();ni("provider-button__button ",o.paymentProvider.provider,""),l("buttonModifier",o.buttonType)("disabled",o.disabled)("icon",o.paymentProviderIcon)("bclass",o.paymentProvider.provider+" "+o.bclass),d(),l("ngIf",o.paymentProvider.bonusPercent&&o.showBonusPercentBadge)}}let RV=(()=>{var t;class n{constructor(){this.showBonusPercentBadge=!0,this.buttonType=LYe.BUTTON_SHOP,this.EIcons=Gc,this.textProviderButton=["xsolla","code","carry1st","teracomm"],this.EPaymentProvider=Zs,this.isTextButton=!1,this.providersIcon={[Zs.Epay]:{name:Gc.EPAY},[Zs.Easypay]:{name:Gc.EASYPAY},[Zs.Paypal]:{name:Gc.PAYPAL},[Zs.PaypalCheckout]:{name:Gc.PAYPAL},[Zs.Xsolla]:{name:Gc.XSOLLA},[Zs.XsollaCC]:{name:Gc.XSOLLACC},[Zs.XsollaEpay]:{name:Gc.XSOLLAEPAY},[Zs.XsollaPaypal]:{name:Gc.XSOLLAPAYPAL},[Zs.Fortumo]:{name:Gc.FORTUMO},[Zs.Teracomm]:{name:Gc.TERACOMM},[Zs.Apple]:{name:Gc.APPLE},[Zs.Android]:{name:Gc.ANDROID},[Zs.Google]:{name:Gc.GOOGLE},[Zs.BCashy]:{name:Gc.BCASHY},[Zs.Windows]:{name:Gc.WINDOWS},[Zs.Facebook]:{name:Gc.FACEBOOK},[Zs.CasWalletChips]:{name:Gc.CHIP},[Zs.CasWalletGems]:{name:Gc.ICON_GEMS}},this.buttonClicked=new ke}ngOnInit(){-1!==this.textProviderButton.indexOf(this.paymentProvider.provider)&&(this.isTextButton=!0),this.paymentProviderIcon=this.providersIcon[this.paymentProvider.provider]}providerClicked(){this.buttonClicked.emit(this.paymentProvider)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["provider-button"]],inputs:{paymentProvider:"paymentProvider",disabled:"disabled",bclass:"bclass",showBonusPercentBadge:"showBonusPercentBadge"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:2,consts:[[1,"provider-button__wrapper"],[3,"class","buttonModifier","disabled","bclass","onClick",4,"ngIf"],[3,"class","buttonModifier","disabled","icon","bclass","onClick",4,"ngIf"],[3,"buttonModifier","disabled","bclass","onClick"],["class","provider-button__text--button other",4,"ngIf"],["class","provider-button__text--button teracomm",4,"ngIf"],["class","provider-button__text--button",4,"ngIf"],["class","tag",4,"ngIf"],[1,"provider-button__text--button","other"],[1,"provider-button__text--button","teracomm"],[1,"provider-button__text--button"],[1,"tag"],[3,"buttonModifier","disabled","icon","bclass","onClick"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,GYe,6,11,"button-text",1)(2,zYe,2,8,"button-icon",2),m()),2&e&&(d(),l("ngIf",i.isTextButton),d(),l("ngIf",!i.isTextButton&&i.paymentProviderIcon))},dependencies:[Ne,pn,ei,qe],styles:["[_nghost-%COMP%]{width:100%;height:100%}.provider-button__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button[_ngcontent-%COMP%]{width:100%;min-width:12rem;overflow:hidden;border-radius:.8rem}.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button[_ngcontent-%COMP%]:not(.teracomm)   .provider-button__text--button[_ngcontent-%COMP%]{z-index:2}.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button.teracomm[_ngcontent-%COMP%]   .provider-button__text--button[_ngcontent-%COMP%]{margin:0;width:100%;text-align:center;z-index:2;font-size:1.4rem}.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button[_ngcontent-%COMP%]   .provider-button__text--button.other[_ngcontent-%COMP%]{width:100%;text-align:center}.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button[_ngcontent-%COMP%]   .tag[_ngcontent-%COMP%]{position:absolute;top:0;right:-2rem;width:6rem;height:2rem;transform:rotate(45deg);display:flex;justify-content:center;align-items:center;z-index:2}.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button[_ngcontent-%COMP%]   .tag[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1rem;margin-left:-.8rem}@media only screen and (max-width: 768px){.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button[_ngcontent-%COMP%]   .tag[_ngcontent-%COMP%]{top:-.5rem;right:-3rem;width:8rem;height:1.5rem}.provider-button__wrapper[_ngcontent-%COMP%]   .provider-button__button[_ngcontent-%COMP%]   .tag[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1rem;margin-left:.3rem}}"]}),n})(),Qm=(()=>{var t;class n extends ii{getShopItemPreviewUrl(e){var i,r;if(null!=e&&null!==(i=e.data)&&void 0!==i&&i.clientPreviewUrl)return"".concat(this.constants.imagesPath,"/").concat(e.data.clientPreviewUrl,".png?");if(null!=e&&null!==(r=e.data)&&void 0!==r&&r.previewUrl)return this.createCdnPath({url:e.data.previewUrl});if(e.id&&-1!==e.id.indexOf("promo"))return this.getImageUrl("shop/items/promo.png");switch(e.type){case Fe.TG.Vip:return this.getImageUrl("level-up/vip.png");case Fe.TG.Premium:return this.getImageUrl("level-up/premium.png");case Fe.TG.StatsReset:return this.getImageUrl("shop/items/"+e.type+".png");case Fe.TG.GemsPack:case Fe.TG.ChipPack:case Fe.TG.Xp:case Fe.TG.Block:case Fe.TG.ClubExtender:return this.getImageUrl(e.id?"shop/items/"+e.id+".png":e.type===Fe.TG.Xp?"game-summary/experience-icon.png":"shop/items/"+e.type+".png");case Fe.TG.CashbackUnlocker:return this.getImageUrl("shop/items/cashbackUnlocker-default.png");default:return""}}getMiniGameImageUrl(e){switch(e){case bh.WheelOfFortune:return this.getImageUrl("free-rewards/wheelOfFortune.png");case bh.Piniata:return this.getImageUrl("free-rewards/piniata.png");case bh.LuckyBall:return this.getImageUrl("free-rewards/luckyBall.png");case bh.ScratchCard:return this.getImageUrl("free-rewards/scratchCard.png");case bh.Slot:return this.getImageUrl("free-rewards/slot.png");default:return this.getImageUrl("free-rewards/miniGame.png")}}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),kV=(()=>{var t;class n{constructor(e,i){this.elRef=e,this.ngZone=i,this.startDelay=200,this.scale=[.3,.6],this.onAnimationIteration=r=>{const s=r.target;s.style.transform="translate(-50%, -50%) scale(".concat((0,ie.randomInt)(.3,.6),")"),s.style.top=(0,ie.randomInt)(0,100)+"%",s.style.left=(0,ie.randomInt)(0,100)+"%"}}ngOnInit(){this.ngZone.runOutsideAngular(()=>{const e=Array.isArray(this.startDelay)?(0,ie.randomInt)(this.startDelay[0],this.startDelay[1]):this.startDelay;this.startDelayId=setTimeout(()=>{for(let i=0;i<2;i++)this.createBlinkBlink(500*i).addEventListener("animationiteration",this.onAnimationIteration)},e)})}ngOnDestroy(){clearTimeout(this.startDelayId)}createBlinkBlink(e){const i=this.elRef.nativeElement,r=document.createElement("div");return r.classList.add("bling-bling-img"),r.style.transform="translate(-50%, -50%) scale(".concat((0,ie.randomInt)(this.scale[0],this.scale[1]),")"),r.style.top=(0,ie.randomInt)(0,100)+"%",r.style.left=(0,ie.randomInt)(0,100)+"%",r.style.animationDelay=e+"ms",i.appendChild(r),r}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(an))},t.\u0275dir=qn({type:t,selectors:[["","bling-bling",""]],inputs:{startDelay:"startDelay",scale:"scale"}}),n})(),dC=(()=>{var t;class n{constructor(){this.startDelay=200,this.scale=[.3,.6]}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["bling-bling"]],inputs:{startDelay:"startDelay",scale:"scale"},decls:1,vars:1,consts:[["bling-bling","",1,"bling-bling-wrapper",3,"startDelay"]],template:function(e,i){1&e&&B(0,"div",0),2&e&&l("startDelay",i.startDelay)},dependencies:[kV],styles:["[_nghost-%COMP%]{display:block}.bling-bling-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"],changeDetection:0}),n})();const jYe=(t,n)=>[t,n],HYe=["*"];let Ym=(()=>{var t;class n{constructor(){this.customClass=""}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["item-label-component"]],hostAttrs:[1,"item-label-host"],inputs:{isRibbon:"isRibbon",customClass:"customClass"},ngContentSelectors:HYe,decls:2,vars:4,consts:[[3,"ngClass"]],template:function(e,i){1&e&&(Co(),p(0,"div",0),yo(1),m()),2&e&&l("ngClass",cn(1,jYe,i.isRibbon?"itemProduct_flag__with--flag":"product-flag__with--label",i.customClass))},dependencies:[Xe],styles:["[_nghost-%COMP%]{display:block}.product-flag__with--label[_ngcontent-%COMP%]{border-radius:2rem;display:table;text-transform:uppercase;white-space:nowrap;width:100%;height:100%}"],changeDetection:0}),n})();function qYe(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.BEST_VALUE")))}function WYe(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.MOST_POPULAR")))}function $Ye(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.PROMO")))}const KYe=t=>[t];function ZYe(t,n){if(1&t&&(B(0,"p",3),V(1,"safeHtml"),V(2,"translate"),V(3,"uppercase")),2&t){const o=_();l("innerHtml",$(1,1,yt(2,3,"SHOP.DAILY_DEAL",ne(8,KYe,$(3,6,o.calculateBonusAmoutPercentage())))),Yn)}}function QYe(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.NEW")))}let Yw=(()=>{var t;class n{constructor(){this.shopCategory=wt}calculateBonusAmoutPercentage(){return(100/((this.offer.item.amount-this.offer.tierBonus)/this.offer.tierBonus)).toFixed()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["shop-item-product-flag"]],inputs:{flags:"flags",offer:"offer",isRibbon:"isRibbon"},decls:6,vars:6,consts:[["data-cy","shopItemRibbon",3,"isRibbon"],[4,"ngIf"],["class","shop-item-product-flag_daily-deal",3,"innerHtml",4,"ngIf"],[1,"shop-item-product-flag_daily-deal",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"item-label-component",0),U(1,qYe,3,3,"p",1)(2,WYe,3,3,"p",1)(3,$Ye,3,3,"p",1)(4,ZYe,4,10,"p",2)(5,QYe,3,3,"p",1),m()),2&e&&(l("isRibbon",i.isRibbon),d(),l("ngIf",i.flags.bestValue),d(),l("ngIf",i.flags.mostPopular),d(),l("ngIf",i.flags.promo&&i.offer.group!==i.shopCategory.PromoDeals),d(),l("ngIf",i.flags.promo&&i.offer.group===i.shopCategory.PromoDeals),d(),l("ngIf",i.flags.new))},dependencies:[Ne,Ym,Sp,qe,Ta],encapsulation:2,changeDetection:0}),n})();var YYe=ve.EIcons;function JYe(t,n){1&t&&Un(0)}function XYe(t,n){if(1&t&&(p(0,"div",10),B(1,"currency-component",11),m()),2&t){const o=_(3);d(),l("currency",o.currencyType.Chips)("value",o.getPriceBeforeTierBonus())("isCrossed",!0)}}function eJe(t,n){if(1&t&&(U(0,XYe,2,3,"div",7),p(1,"p",8),B(2,"currency-component",9),m()),2&t){const o=_(2);l("ngIf",o.tierBonus),d(2),l("currency",o.currencyType.Chips)("value",o.isVip?o.item.amount+o.vipBonusAmount:o.item.amount)}}function tJe(t,n){if(1&t&&(p(0,"p",12),B(1,"currency-component",13),m()),2&t){const o=_(2);d(),l("currency",o.currencyType.Gems)("value",o.item.amount)}}function nJe(t,n){if(1&t&&(p(0,"div",2)(1,"div",3),U(2,JYe,1,0,"ng-container",4)(3,eJe,3,3,"ng-template",null,5,ft)(5,tJe,2,2,"ng-template",null,6,ft),m()()),2&t){const o=Kt(4),e=Kt(6),i=_();d(2),l("ngIf",i.item.type!==i.itemTypes.GemsPack)("ngIfThen",o)("ngIfElse",e)}}function iJe(t,n){if(1&t&&(p(0,"div",14)(1,"div",15),B(2,"icon-component",16),p(3,"p",17),H(4),p(5,"span",18),H(6),V(7,"translate"),m()()()()),2&t){const o=_();d(2),l("icon",o.iconNames.CROWN),d(2),ze("",o.vipDuration," "),d(2),ze("\xa0",$(7,3,"TIME."+o.vipText.toUpperCase()).toUpperCase(),"")}}let gue=(()=>{var t;class n{constructor(){this.itemTypes=Fe.TG,this.iconNames=YYe,this.tierBonus=0,this.isDiscounted=!1,this.shopCategories=wt,this.vipBonusAmount=0,this.vipBonusBeforeTierBonusAmount=0,this.currencyType=ln}ngOnChanges(){this.vipDuration=this.calculateVipTime(this.item.lifeTime),this.vipText=this.vipDuration>1?"days":"day",this.vipBonusAmount=qm.getVipBonusAmount(this.item.amount,this.vipBonusMultiplier),this.product.tierBonus&&(this.vipBonusBeforeTierBonusAmount=qm.getVipBonusAmount(this.item.amount-this.product.tierBonus,this.vipBonusMultiplier))}calculateVipTime(e){return new Gn(e).daysTotal}getPriceBeforeTierBonus(){const e=this.item.amount-this.tierBonus;return this.isVip?e+this.vipBonusBeforeTierBonusAmount:e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["shop-item-value-info"]],inputs:{item:"item",isVip:"isVip",vipBonusMultiplier:"vipBonusMultiplier",tierBonus:"tierBonus",isDiscounted:"isDiscounted",product:"product"},features:[it],decls:2,vars:2,consts:[["class","shop-item-info__container--pack-info",4,"ngIf"],["class","shop-item-info__container--badge",4,"ngIf"],[1,"shop-item-info__container--pack-info"],[1,"shop-item-info__item-container"],[4,"ngIf","ngIfThen","ngIfElse"],["chips",""],["gems",""],["class","shop-item-info__promo",4,"ngIf"],[1,"shop-item-info__container"],[1,"chips-item__text--bonus-value-chips",3,"currency","value"],[1,"shop-item-info__promo"],[1,"shop-item-info__chip-cmp",3,"currency","value","isCrossed"],[1,"shop-item-info__value--container"],[1,"sii__chip-cmp",3,"currency","value"],[1,"shop-item-info__container--badge"],[1,"duration__container"],[1,"duration__container__icon",3,"icon"],[1,"duration"],[1,"duration-text"]],template:function(e,i){1&e&&U(0,nJe,7,3,"div",0)(1,iJe,8,5,"div",1),2&e&&(l("ngIf",i.item&&(i.item.type===i.itemTypes.ChipPack||i.item.type===i.itemTypes.GemsPack)),d(),l("ngIf",i.item&&i.item.type===i.itemTypes.Vip))},dependencies:[Ne,Dn,So,qe],styles:["[_nghost-%COMP%]{display:block}.shop-item-info__container--pack-info[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-flow:column nowrap;justify-content:center;align-items:center}.shop-item-info__item-container[_ngcontent-%COMP%]{order:2;width:100%;height:60%;display:flex;justify-content:center}.shop-item-info__item-container[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{align-self:center;font-size:1.3em;font-weight:600;line-height:100%}.shop-item-info__item-container[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:before{margin-right:.3rem}.shop-item-info__container--badge[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;position:relative}.shop-item-info__container--badge[_ngcontent-%COMP%]   .duration__container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:115%}.shop-item-info__container--badge[_ngcontent-%COMP%]   .duration__container[_ngcontent-%COMP%]   .duration__container__icon[_ngcontent-%COMP%]{margin-right:.3rem;font-size:3.5rem}.shop-item-info__container--badge[_ngcontent-%COMP%]   .duration__container[_ngcontent-%COMP%]   .duration[_ngcontent-%COMP%]{align-self:center;font-size:2.5rem;font-weight:600;display:flex}@media only screen and (max-width: 480px){.shop-item-info__container--badge[_ngcontent-%COMP%]   .duration__container[_ngcontent-%COMP%]   .duration[_ngcontent-%COMP%]{font-size:2.4rem}}.shop-item-info__container--badge[_ngcontent-%COMP%]   .duration__container[_ngcontent-%COMP%]   .duration[_ngcontent-%COMP%]   .duration-text[_ngcontent-%COMP%]{font-size:2.4rem;font-weight:600;align-self:center}@media only screen and (max-width: 480px){.shop-item-info__container--badge[_ngcontent-%COMP%]   .duration__container[_ngcontent-%COMP%]   .duration[_ngcontent-%COMP%]   .duration-text[_ngcontent-%COMP%]{font-size:1.8rem}}.shop-item-info__container--item-name[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;justify-content:center;align-items:center}.shop-item-info__container--item-name[_ngcontent-%COMP%]   .item-name[_ngcontent-%COMP%]{order:1;font-size:2.4rem;text-align:center}@media only screen and (max-width: 768px){.shop-item-info__container--item-name[_ngcontent-%COMP%]   .item-name[_ngcontent-%COMP%]{font-size:1.8rem}}.shop-item-info__container--item-name[_ngcontent-%COMP%]   .item-description[_ngcontent-%COMP%]{order:2;font-size:1.4rem;text-align:center}@media only screen and (max-width: 768px){.shop-item-info__container--item-name[_ngcontent-%COMP%]   .item-description[_ngcontent-%COMP%]{font-size:1.2rem}}.sii_chip-cmp__promo[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.sii_chip-cmp__promo[_ngcontent-%COMP%] > .sii__chip-cmp[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}"],changeDetection:0}),n})();function oJe(t,n){if(1&t&&B(0,"shop-item-product-flag",13),2&t){const o=_(2);l("flags",o.showedShopItem.flags)("offer",o.showedShopItem)}}const rJe=t=>({promoItem:t});function sJe(t,n){if(1&t&&B(0,"img",14),2&t){const o=_(2);l("ngClass",ne(2,rJe,o.promoItem))("imgSrc",o.itemImg)}}const aJe=()=>[.3,1];function cJe(t,n){1&t&&B(0,"bling-bling",15),2&t&&l("scale",pt(1,aJe))}function lJe(t,n){if(1&t&&B(0,"shop-item-value-info",19),2&t){const o=_().$implicit,e=_(2);l("item",o)("isVip",e.isVip)("product",e.showedShopItem)("vipBonusMultiplier",e.shopConfig.vipBonusMultiplier)}}function uJe(t,n){if(1&t&&B(0,"shop-item-value-info",20),2&t){const o=_().$implicit,e=_(2);l("item",o)("isVip",e.isVip)("product",e.showedShopItem)("tierBonus",e.showedShopItem.tierBonus)("vipBonusMultiplier",e.shopConfig.vipBonusMultiplier)}}function dJe(t,n){if(1&t&&(p(0,"div",16),U(1,lJe,1,4,"shop-item-value-info",17)(2,uJe,1,5,"shop-item-value-info",18),m()),2&t){const o=_(2);d(),l("ngIf",!o.showTierBonus),d(),l("ngIf",o.showTierBonus)}}function pJe(t,n){1&t&&Un(0,21),2&t&&(_(2),l("ngTemplateOutlet",Kt(3)))}function hJe(t,n){if(1&t&&(p(0,"div",22)(1,"p",23),B(2,"item-price",24),m()()),2&t){const o=_(2);d(2),l("item",o.showedShopItem)("discount",o.discount)}}const _ue=t=>[t];function mJe(t,n){if(1&t&&(p(0,"div",25)(1,"p",26),H(2),V(3,"translate"),m()()),2&t){const o=_(2);d(2),se(yt(3,1,o.options.text.key,ne(4,_ue,o.options.text.params)))}}const vue=t=>({currency:t});function fJe(t,n){if(1&t&&(p(0,"section",3)(1,"div",4)(2,"div",5),U(3,oJe,1,2,"shop-item-product-flag",6)(4,sJe,1,4,"img",7)(5,cJe,1,2,"bling-bling",8),m(),U(6,dJe,3,2,"div",9),m(),U(7,pJe,1,1,"ng-container",10)(8,hJe,3,2,"div",11)(9,mJe,4,6,"div",12),m()),2&t){const o=_();l("ngClass",ne(9,vue,(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.Currency||(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.RebuyDeals||(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.BuyInDeals)),d(2),l("ngClass",ne(11,vue,(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.Currency||(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.RebuyDeals||(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.BuyInDeals)),d(),l("ngIf",o.showedShopItem.flags),d(),l("ngIf",o.showedShopItem&&o.itemImg),d(),l("ngIf",(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.Currency||(null==o.showedShopItem?null:o.showedShopItem.group)===o.EShopCategories.Gems),d(),l("ngForOf",o.items),d(),l("ngIf",o.options.showPrice),d(),l("ngIf",o.discount&&o.options.showPrice),d(),l("ngIf",null==o.options?null:o.options.text)}}function gJe(t,n){if(1&t&&(p(0,"p",35),H(1),m()),2&t){const o=_(3);d(),se(o.itemTitle)}}function _Je(t,n){if(1&t&&B(0,"img",36),2&t){const o=_(3);l("imgSrc",o.itemImg)("ngClass",ne(2,_ue,o.showedShopItem.item.type))}}function vJe(t,n){1&t&&Un(0,21),2&t&&(_(3),l("ngTemplateOutlet",Kt(3)))}function bJe(t,n){if(1&t&&(p(0,"p",37),H(1),m()),2&t){const o=_(3);d(),se(o.itemDescription)}}const CJe=(t,n,o)=>[t,n,o];function yJe(t,n){if(1&t&&(p(0,"div",31),U(1,gJe,2,1,"p",32)(2,_Je,1,4,"img",33)(3,vJe,1,1,"ng-container",10)(4,bJe,2,1,"p",34),m()),2&t){const o=_(2);l("ngClass",_a(5,CJe,o.showedShopItem.item.type,o.itemDescription?"with-description":"",o.options.showPrice?"with-price":"")),d(),l("ngIf",o.itemTitle),d(),l("ngIf",o.showedShopItem&&o.itemImg),d(),l("ngIf",o.options.showPrice),d(),l("ngIf",o.itemDescription)}}function SJe(t,n){if(1&t&&(p(0,"p",40),H(1),m()),2&t){const o=n.$implicit;d(),se(o)}}function wJe(t,n){if(1&t&&(p(0,"div",38),U(1,SJe,2,1,"p",39),m()),2&t){const o=_(2);d(),l("ngForOf",o.phrasesList)}}function TJe(t,n){if(1&t&&(p(0,"section",27)(1,"div",28),U(2,yJe,5,9,"div",29)(3,wJe,2,1,"div",30),m()()),2&t){const o=_();d(2),l("ngIf",!o.phrasesList),d(),l("ngIf",o.phrasesList)}}function PJe(t,n){if(1&t&&(p(0,"p",23),B(1,"item-price",42),m()),2&t){const o=_(3);d(),l("item",o.showedShopItem)("isCrossed",o.discount)("crossType",o.crossType.RedCross)}}function IJe(t,n){if(1&t&&(p(0,"div",22),U(1,PJe,2,3,"p",41),m()),2&t){const o=_(2);d(),l("ngIf",null!==o.price)}}function MJe(t,n){1&t&&U(0,IJe,2,1,"div",11),2&t&&l("ngIf",_().options.showPrice)}let LV=(()=>{var t;class n{constructor(e,i){this.options={},this.EShopCategories=wt,this.crossType=So.ECrossType,this.translation=i,this.urlService=e,this.ribbonStyle={show:!1,text:{durationNumber:0,durationText:"",free:"free"}},this.items=[]}ngOnChanges(e){this.showTierBonus=this.showedShopItem.group===wt.PromoDeals||this.showedShopItem.group===wt.HappyHourChips,this.showedShopItem.group===wt.Emotions&&this.showedShopItem.item.type===Fe.TG.PhraseSet&&(this.phrasesList=this.getPhrases()),e.options&&(this.options={...this.defaultOptions(this.showedShopItem),...this.options}),e.showedShopItem&&null!==e.showedShopItem&&(this.getItems(this.showedShopItem.item),this.setShopItemInfo(),this.options={...this.defaultOptions(this.showedShopItem),...this.options})}getItems(e){return e&&e.type===Fe.TG.Bundle?e.items.forEach(i=>{this.getItems(i)}):this.items.push(e),this.items}getPhrases(){const e=this.translation.getParsedTranslation("game_chat.chat_messages.text.".concat(this.showedShopItem.item.id)),i=[];return Object.keys(e).forEach(r=>{i.push(e[r])}),i}setShopItemInfo(){this.isItemStorePack=this.getIsItemStorePack(this.showedShopItem),this.price=this.showedShopItem.prices[Object.keys(this.showedShopItem.prices)[0]],this.currency=Object.keys(this.showedShopItem.prices)[0],this.promoItem=-1!==this.showedShopItem.item.id.indexOf("promo"),this.setTitle(),this.setImage(),this.setDescription();let e=this.paymentProviders.find(i=>i.discountPercent>0);e&&(this.discount=e.discountPercent,this.discountedPrice=this.price*(100-this.discount)/100),this.value=this.showedShopItem.item.amount}setTitle(){this.showedShopItem.item.type===Fe.TG.CashbackUnlocker&&(this.itemTitle=this.translation.getParsedTranslation("SHOP.ITEMS.".concat(Fe.TG.CashbackUnlocker,".title")))}setImage(){this.itemImg=this.urlService.getShopItemPreviewUrl(this.showedShopItem.item)}setDescription(){switch(this.showedShopItem.item.type){case Fe.TG.NameChanger:this.itemDescription=this.translation.getParsedTranslation("SHOP.ITEMS.".concat(this.showedShopItem.item.id,".DESCRIPTION"));break;case Fe.TG.Block:this.itemDescription=this.translation.getParsedTranslation("SHOP.ITEMS.".concat(this.showedShopItem.item.id,".DESCRIPTION"),[this.showedShopItem.item.amount.toString().toUpperCase()]);break;case Fe.TG.StatsReset:const e=this.translation.getParsedTranslation("PLATFORM_IDS.".concat(this.showedShopItem.item.targetGame));this.itemDescription=this.translation.getParsedTranslation("SHOP.ITEMS.".concat(Fe.TG.StatsReset,".DESCRIPTION"),[e]);break;case Fe.TG.ClubExtender:this.itemDescription=this.translation.getParsedTranslation("SHOP.ITEMS.".concat(this.showedShopItem.item.id,".DESCRIPTION"),[this.showedShopItem.item.amount.toString().toUpperCase()])}}getIsItemStorePack(e){return!![wt.Decks,wt.Frames,wt.Tables,wt.Utility,wt.Emotions,wt.NameColors,wt.MessageColors,wt.Boosters,wt.ProfileBackground].find(r=>r===e.group)}defaultOptions(e){return{showPrice:!this.getIsItemStorePack(e)||e.item.type===Fe.TG.CashbackUnlocker}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qm),g(pi))},t.\u0275cmp=pe({type:t,selectors:[["shop-item-popup-info"]],inputs:{showedShopItem:"showedShopItem",shopConfig:"shopConfig",paymentProviders:"paymentProviders",isVip:"isVip",options:"options"},features:[it],decls:4,vars:2,consts:[["class","shop-item-info__container--upper-info",3,"ngClass",4,"ngIf"],["class","shop-item-info__container--upper-info",4,"ngIf"],["priceTmpl",""],[1,"shop-item-info__container--upper-info",3,"ngClass"],[1,"shop-item-info__container--item-info"],["data-cy","shopItemImage",1,"item-image",3,"ngClass"],["class","shop-item-info__container__flag",3,"flags","offer",4,"ngIf"],["empty-placeholder","",3,"ngClass","imgSrc",4,"ngIf"],["class","shop-item-info--bling",3,"scale",4,"ngIf"],["class","item-extra",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet",4,"ngIf"],["class","shop-item-info__container--price",4,"ngIf"],["class","shop-item-info__container--text",4,"ngIf"],[1,"shop-item-info__container__flag",3,"flags","offer"],["empty-placeholder","",3,"ngClass","imgSrc"],[1,"shop-item-info--bling",3,"scale"],[1,"item-extra"],["class","shop-item-info",3,"item","isVip","product","vipBonusMultiplier",4,"ngIf"],[3,"item","isVip","product","tierBonus","vipBonusMultiplier",4,"ngIf"],[1,"shop-item-info",3,"item","isVip","product","vipBonusMultiplier"],[3,"item","isVip","product","tierBonus","vipBonusMultiplier"],[3,"ngTemplateOutlet"],[1,"shop-item-info__container--price"],[1,"price"],[3,"item","discount"],[1,"shop-item-info__container--text"],[1,"shop-item-info__container--text-p"],[1,"shop-item-info__container--upper-info"],[1,"shop-item-info__container--item-info","item-store"],["class","item-image item-store",3,"ngClass",4,"ngIf"],["class","item--phrases__container","data-cy","itemStorePhrasesPreview",4,"ngIf"],[1,"item-image","item-store",3,"ngClass"],["class","item-title",4,"ngIf"],["class","item-image__img--element","empty-placeholder","",3,"imgSrc","ngClass",4,"ngIf"],["class","item-description",4,"ngIf"],[1,"item-title"],["empty-placeholder","",1,"item-image__img--element",3,"imgSrc","ngClass"],[1,"item-description"],["data-cy","itemStorePhrasesPreview",1,"item--phrases__container"],["class","item--phrase","data-cy","itemStorePhrasesPreviewPhrase",4,"ngFor","ngForOf"],["data-cy","itemStorePhrasesPreviewPhrase",1,"item--phrase"],["class","price",4,"ngIf"],[3,"item","isCrossed","crossType"]],template:function(e,i){1&e&&U(0,fJe,10,13,"section",0)(1,TJe,4,2,"section",1)(2,MJe,1,1,"ng-template",null,2,ft),2&e&&(l("ngIf",!i.isItemStorePack),d(),l("ngIf",i.isItemStorePack))},dependencies:[Xe,Mt,Ne,qr,$o,X_,dC,Yw,gue,qe],styles:['.shop-item-info__container--upper-info[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column wrap}.shop-item-info__container--upper-info.currency[_ngcontent-%COMP%]   .shop-item-info__container--price[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{line-height:100%}.shop-item-info__container--item-info[_ngcontent-%COMP%]{order:1;width:100%;display:flex;flex-flow:column nowrap}.shop-item-info__container--item-info.item-store[_ngcontent-%COMP%]{height:33rem}@media only screen and (max-width: 568px){.shop-item-info__container--item-info.item-store[_ngcontent-%COMP%]{height:30rem}}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.item-store[_ngcontent-%COMP%]{padding-top:3rem;height:90%}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.item-store[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:100%;width:auto;max-width:initial}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.item-store.with-description[_ngcontent-%COMP%]{flex-flow:column nowrap;justify-content:space-around}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.item-store.with-description[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:60%}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.item-store.with-price[_ngcontent-%COMP%]{flex-flow:column nowrap;justify-content:space-around}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.item-store.with-price[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:calc(100% - 4rem)!important}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-height:100%;max-width:5em;min-height:4em}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%] > img.promoItem[_ngcontent-%COMP%]{padding-top:.5rem}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.with-description[_ngcontent-%COMP%], .shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image.with-price[_ngcontent-%COMP%]{align-items:center}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]   .item-title[_ngcontent-%COMP%]{padding:.5rem .5rem 1.5rem;text-align:center;font-size:2.4rem}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]   .item-description[_ngcontent-%COMP%]{padding:.5rem;text-align:center;font-size:1.8rem}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-extra[_ngcontent-%COMP%]{order:3;width:100%;height:30%}.shop-item-info__container--item-info[_ngcontent-%COMP%]   .item-extra.item-store[_ngcontent-%COMP%]{height:0}.shop-item-info__container--price[_ngcontent-%COMP%]{order:2;width:100%;display:flex;justify-content:center;align-items:center;margin:0 0 1rem}.shop-item-info__container--price[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{font-size:2.4rem;font-weight:600;position:relative}.shop-item-info__container--price[_ngcontent-%COMP%]   .price.discount[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:0;left:0;height:48%;width:100%;transform:rotate(-10deg)}.shop-item-info__container--price[_ngcontent-%COMP%]   .price.bgn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.shop-item-info__container--price[_ngcontent-%COMP%]   .price.bgn[_ngcontent-%COMP%]   .currency[_ngcontent-%COMP%]{order:2;margin:0 .3rem}.shop-item-info__container--price[_ngcontent-%COMP%]   .price.bgn[_ngcontent-%COMP%]   .price-text[_ngcontent-%COMP%]{order:1}.shop-item-info__container--price[_ngcontent-%COMP%]   .currency[_ngcontent-%COMP%]{align-self:flex-end;height:70%;font-size:1.8rem;font-weight:600}.shop-item-info__container--title[_ngcontent-%COMP%]{order:3;width:100%;display:flex;justify-content:center;align-items:center;position:relative}.shop-item-info__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem;margin:1.5rem 0;text-align:center}.shop-item-info[_ngcontent-%COMP%]{padding-bottom:.5rem}.shop-item-info__discounted--value[_ngcontent-%COMP%]{font-size:1.6rem}.shop-item-info__container--text[_ngcontent-%COMP%]{order:3;text-align:center;margin:1rem 0;padding:0 1rem}.shop-item-info--bling[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:4em;height:2em}'],changeDetection:0}),n})();var OJe=ve.EButtonModifier;function EJe(t,n){1&t&&(p(0,"span",12),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.VIP_USERS_GETS")))}function xJe(t,n){1&t&&(p(0,"span",12),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.VIP_BONUS_APPLIED")))}function AJe(t,n){if(1&t&&B(0,"currency-component",13),2&t){const o=_(3);l("currency",o.currencyType.Chips)("value",o.bonusChips)}}function RJe(t,n){if(1&t&&(p(0,"span",7),U(1,EJe,3,3,"span",8)(2,xJe,3,3,"span",8),p(3,"span",9)(4,"span",10),H(5,"+"),m(),U(6,AJe,1,2,"currency-component",11),m()()),2&t){const o=_(2);d(),l("ngIf",!o.popupModel.data.receiverProfile.hasTierOrHigher(o.EVipTier.Full)),d(),l("ngIf",o.popupModel.data.receiverProfile.hasTierOrHigher(o.EVipTier.Full)),d(4),l("ngIf",null!==o.bonusChips)}}function kJe(t,n){if(1&t&&(p(0,"div",5),U(1,RJe,7,3,"span",6),m()),2&t){const o=_();d(),l("ngIf",null!==o.bonusChips&&o.popupModel.data.product)}}function LJe(t,n){if(1&t&&(p(0,"div",14),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",$(2,1,null==o.popupModel||null==o.popupModel.data.options||null==o.popupModel.data.options.title?null:o.popupModel.data.options.title.key)," ")}}function DJe(t,n){if(1&t&&(p(0,"div",24),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),ze(" ",yt(2,1,o.popupModel.data.options.description.key,o.popupModel.data.options.description.params)," ")}}function BJe(t,n){1&t&&(p(0,"div",25)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"HIDDEN_SHOP.CHOOSE_PAYMENT_METHOD")))}function NJe(t,n){if(1&t){const o=Ce();p(0,"provider-button",30),Y("buttonClicked",function(i){return oe(o),re(_(3).buyClick(i))}),m()}if(2&t){const o=_().$implicit,e=_(2);l("paymentProvider",o)("disabled",e.disableControls)("showBonusPercentBadge",!e.popupModel.data.product.item.giftOnly)("bclass","shop-item-popup__provider-button__bclass")}}function FJe(t,n){if(1&t){const o=Ce();p(0,"item-buy-button",31),Y("buttonClicked",function(i){return oe(o),re(_(3).buyClick(i))}),m()}if(2&t){const o=_().$implicit,e=_(2);l("clientStoreProduct",e.popupModel.data.product)("paymentProvider",o)("disabled",e.disableControls)}}function UJe(t,n){if(1&t){const o=Ce();p(0,"rent-button",32),Y("buttonClicked",function(i){return oe(o),re(_(3).buyClick(i))}),m()}if(2&t){const o=_().$implicit,e=_(2);l("item",e.popupModel.data.product)("disabled",e.disableControls)("paymentProvider",o)}}const GJe=(t,n)=>({rentable:t,buttonsLenghtMoreThanTwo:n});function VJe(t,n){if(1&t&&(p(0,"div",26),U(1,NJe,1,4,"provider-button",27)(2,FJe,1,3,"item-buy-button",28)(3,UJe,1,3,"rent-button",29),m()),2&t){const o=_(2);l("ngClass",cn(4,GJe,o.popupModel.data.product.item.durability===o.durabilityType.Expireable,o.paymentProviders.length>2)),d(),l("ngIf",o.shopItemType===o.shopItemPopupTypes.WithProviders),d(),l("ngIf",o.shopItemType===o.shopItemPopupTypes.ItemShopBuyable),d(),l("ngIf",o.shopItemType===o.shopItemPopupTypes.Expireable)}}const zJe=t=>({"with--one--provider":t});function jJe(t,n){if(1&t){const o=Ce();p(0,"div",33)(1,"button-text",34),Y("onClick",function(){return oe(o),re(_(2).navigateToShop())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2);l("ngClass",ne(5,zJe,1===o.paymentProviders.length)),d(),l("buttonModifier",o.buttonModifier.BUTTON_VIEW_GALLERY),d(),ze("",$(3,3,"TICKET_POPUP.GO_TO_OFFERS")," ")}}function HJe(t,n){if(1&t&&(p(0,"div",15),U(1,DJe,3,4,"div",16),B(2,"shop-item-popup-info",17),p(3,"div",18),B(4,"div",19),U(5,BJe,4,3,"div",20),p(6,"div",21),U(7,VJe,4,7,"div",22),m(),U(8,jJe,4,7,"div",23),m()()),2&t){const o=_();d(),l("ngIf",null==o.popupModel.data.options?null:o.popupModel.data.options.description),d(),l("showedShopItem",o.popupModel.data.product)("shopConfig",o.popupModel.data.store)("paymentProviders",o.paymentProviders)("isVip",o.popupModel.data.receiverProfile.hasTierOrHigher(o.EVipTier.Full))("options",null==o.popupModel?null:o.popupModel.data.options),d(3),l("ngIf",(null==o.paymentProviders?null:o.paymentProviders.length)>1),d(2),l("ngForOf",o.paymentProviders)("ngForTrackBy",o.trackByFn),d(),l("ngIf",null==o.popupModel.data.options?null:o.popupModel.data.options.showNavigateToShopButton)}}let bue=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.payments=s,this.constants=c,this.ngZone=u,this.navigation=h,this.durabilityType=Fe.XM,this.shopItemPopupTypes=eC,this.popupTitleTypes=li,this.disableControls=!1,this.shopCategories=wt,this.currencyType=ln,this.popupTitleType=li.Logo,this.buttonModifier=OJe,this.EVipTier=Fi,this.shopService=r,this.toastService=i,this.shopItemPopupService=e,this.inlineStyle={height:"5rem !important"},this.popupContainerOptions={customComponentCssClass:"shop-item-popup__container--custom-class",styleProperties:{maxWidth:"45rem",maxHeight:"100%",height:"auto"},componentZIndex:"100011"},a.detach(),this.cdr=a}ngOnInit(){var e;if(this.paymentProviders=this.shopService.getProvidersByItem(this.popupModel.data.store,this.popupModel.data.product),this.popupModel.data.shopItemType?this.shopItemType=this.popupModel.data.shopItemType:this.setShopItemType(this.popupModel.data.product),this.popupContainerOptions.customComponentCssClass=this.popupModel.data.product.group===wt.HappyHourChips?"shop-item-popup__container--custom-class shop-item-popup__container__happy-hour":"shop-item-popup__container--custom-class",this.cdr.detectChanges(),0===this.paymentProviders.length)return console.warn("Shop error:  no available payment providers"),void this.toastService.error("ERRORS.CONNECTION_ERROR");if(!this.payments.canBuyInstant(this.paymentProviders)||null!==(e=this.popupModel.data.options)&&void 0!==e&&e.alwaysShowPreview)this.bonusChips=this.popupModel.data.store.vipBonusMultiplier?qm.getVipBonusAmount(this.popupModel.data.product.item.amount,this.popupModel.data.store.vipBonusMultiplier):null;else{let i={storeProduct:this.popupModel.data.product,receiverId:this.popupModel.data.receiverProfile.id,providerId:this.paymentProviders[0].provider,storeId:this.popupModel.data.store.id,itemParams:this.popupModel.data.itemParams,gameId:this.popupModel.data.gameId,exchangeData:this.popupModel.data.exchangeData,correlationId:this.popupModel.data.correlationId};this.hasStartedBuyProcedure=!0,this.payments.buy(i).then(this.popupModel.onSucess).catch(r=>this.popupModel.onError(r)),this.shopItemPopupService.closeShopItemPopup()}this.setTitleType(),this.cdr.detectChanges()}ngOnDestroy(){var e;this.hasStartedBuyProcedure||null===(e=this.popupModel)||void 0===e||e.onError(new Wp)}buyClick(e){if(!this.disableControls){this.disableControls=!0;let i={storeProduct:this.popupModel.data.product,receiverId:this.popupModel.data.receiverProfile.id,providerId:e.provider,storeId:this.popupModel.data.store.id,itemParams:this.popupModel.data.itemParams,gameId:this.popupModel.data.gameId,exchangeData:this.popupModel.data.exchangeData,correlationId:this.popupModel.data.correlationId};this.hasStartedBuyProcedure=!0,this.payments.buy(i).then(this.popupModel.onSucess).catch(this.popupModel.onError),this.shopItemPopupService.closeShopItemPopup(),this.cdr.detectChanges()}}hide(){this.shopItemPopupService.closeShopItemPopup()}setShopItemType(e){const i=[wt.Decks,wt.Frames,wt.Tables,wt.Utility,wt.Emotions,wt.NameColors,wt.MessageColors,wt.Boosters,wt.ProfileBackground];this.shopItemType=-1===i.indexOf(e.group)&&this.paymentProviders.length>1?eC.WithProviders:-1!==i.indexOf(e.group)&&e.item.durability===this.durabilityType.Expireable?eC.Expireable:eC.ItemShopBuyable}trackByFn(e,i){return i.provider}setTitleType(){var e;this.popupTitleType=!(this.popupModel.data.product&&this.popupModel.data.product.group!==wt.Currency&&this.popupModel.data.product.group!==wt.PromoDeals&&this.popupModel.data.product.group!==wt.HappyHourChips||null===this.bonusChips)||null!==(e=this.popupModel)&&void 0!==e&&null!==(e=e.data.options)&&void 0!==e&&e.title?li.Dynamic:li.Logo}navigateToShop(){var e,i;let r;switch(this.hide(),null!==(e=this.popupModel.data.options)&&void 0!==e&&e.extraNavigateToShopButtonExtraAction&&(null===(i=this.popupModel.data.options)||void 0===i||i.extraNavigateToShopButtonExtraAction()),this.popupModel.data.product.item.type){case Fe.TG.ChipPack:r=Bc.Currency;break;case Fe.TG.GemsPack:r=Bc.Gems;break;case Fe.TG.GemsPack:r=Bc.Vip;break;default:r=Bc.Currency}const s="".concat(Ai).concat(this.constants.defaultLoggedRoute,"/shop/").concat(r);this.ngZone.run(()=>this.navigation.navigate([{outlets:{[Fn]:s}}]))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(DV),g(Dt),g(Ko),g(bk),g(Re),g(tn),g(an),g(Yt))},t.\u0275cmp=pe({type:t,selectors:[["shop-item-popup"]],decls:5,vars:7,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[1,"shop-item-popup__title-bar",3,"inlineStyles","popupTitleType","buttonCloseClicked"],["class","shop-item__container--old-chips-count",4,"ngIf"],["class","shop-item__container__custom--title",4,"ngIf"],["class","shop-item__container--content","data-cy","popupPackSuggestion","data-cy2","popupModel.data.product.item.id",4,"ngIf"],[1,"shop-item__container--old-chips-count"],["class","old-value",4,"ngIf"],[1,"old-value"],["class","vip-bonus-label",4,"ngIf"],[1,"vip-bonus__container"],[1,"vip-bonus-label__plus-sign"],["class","vip-bonus",3,"currency","value",4,"ngIf"],[1,"vip-bonus-label"],[1,"vip-bonus",3,"currency","value"],[1,"shop-item__container__custom--title"],["data-cy","popupPackSuggestion","data-cy2","popupModel.data.product.item.id",1,"shop-item__container--content"],["class","shop-item__container__custom--description",4,"ngIf"],[1,"shop-item__info",3,"showedShopItem","shopConfig","paymentProviders","isVip","options"],[1,"shop-item__container--bottom-info"],[1,"shop-item__separator"],["class","shop-item-info__container--title",4,"ngIf"],[1,"shop-item__container--buttons"],["class","shop-item__container--button",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","shop-item__navigate-to-shop__button__container",3,"ngClass",4,"ngIf"],[1,"shop-item__container__custom--description"],[1,"shop-item-info__container--title"],[1,"shop-item__container--button",3,"ngClass"],["class","shop-item__provider-button-wrapper","data-cy","itemProviderButton",3,"paymentProvider","disabled","showBonusPercentBadge","bclass","buttonClicked",4,"ngIf"],["data-cy","itemBuyButton",3,"clientStoreProduct","paymentProvider","disabled","buttonClicked",4,"ngIf"],["data-cy","itemRentButton",3,"item","disabled","paymentProvider","buttonClicked",4,"ngIf"],["data-cy","itemProviderButton",1,"shop-item__provider-button-wrapper",3,"paymentProvider","disabled","showBonusPercentBadge","bclass","buttonClicked"],["data-cy","itemBuyButton",3,"clientStoreProduct","paymentProvider","disabled","buttonClicked"],["data-cy","itemRentButton",3,"item","disabled","paymentProvider","buttonClicked"],[1,"shop-item__navigate-to-shop__button__container",3,"ngClass"],["data-cy","popupNavigateToShopButton",1,"shop-item__navigate-to-shop__button",3,"buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.hide()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.hide()}),U(2,kJe,2,1,"div",2)(3,LJe,3,3,"div",3),m(),U(4,HJe,9,10,"div",4),m()),2&e&&(l("popupContainerOpened",null!=i.popupModel.data.product)("popupContainerOptions",i.popupContainerOptions),d(),l("inlineStyles",i.inlineStyle)("popupTitleType",i.popupTitleType),d(),l("ngIf",i.popupModel.data.product&&!(null!=i.popupModel&&null!=i.popupModel.data&&null!=i.popupModel.data.options&&i.popupModel.data.options.title)&&(i.popupModel.data.product.group===i.shopCategories.Currency||i.popupModel.data.product.group===i.shopCategories.PromoDeals||i.popupModel.data.product.group===i.shopCategories.HappyHourChips)),d(),l("ngIf",null==i.popupModel||null==i.popupModel.data.options?null:i.popupModel.data.options.title),d(),l("ngIf",i.popupModel.data.product))},dependencies:[Xe,Mt,Ne,pn,So,Ji,Wi,Uh,AV,RV,LV,qe],styles:['.shop-item__container--content[_ngcontent-%COMP%]{width:100%;height:auto;overflow-y:auto;max-height:calc(100vh - 7rem)}@media only screen and (max-height: 360px){.shop-item__container--content[_ngcontent-%COMP%]{height:22rem}}.shop-item__container--old-chips-count[_ngcontent-%COMP%]{width:95%;margin:0 auto;display:flex;justify-content:center;position:relative}.shop-item__container--old-chips-count[_ngcontent-%COMP%]   .old-value[_ngcontent-%COMP%]{align-self:center;font-size:1.8rem;font-weight:600;width:100%;text-align:center;padding-right:4.3rem}@media only screen and (max-width: 480px){.shop-item__container--old-chips-count[_ngcontent-%COMP%]   .old-value[_ngcontent-%COMP%]{font-size:1.4rem}}.shop-item__container--old-chips-count[_ngcontent-%COMP%]   .old-value[_ngcontent-%COMP%]   .vip-bonus[_ngcontent-%COMP%]{position:relative}.shop-item__container--old-chips-count[_ngcontent-%COMP%]   .old-value[_ngcontent-%COMP%]   .vip-bonus.is-not-vip[_ngcontent-%COMP%]:after{position:absolute;left:0;top:50%;height:.3rem;content:"";width:100%;display:block;transform:rotate(-10deg)}.shop-item__container--old-chips-count[_ngcontent-%COMP%]   .old-value[_ngcontent-%COMP%]   .vip-bonus-crown[_ngcontent-%COMP%]{text-transform:uppercase;margin-left:.3rem}.shop-item__container--old-chips-count[_ngcontent-%COMP%]   .old-value[_ngcontent-%COMP%]   .plus[_ngcontent-%COMP%]{margin:0 .5rem}.shop-item__container--bottom-info[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap}.shop-item__container--buttons[_ngcontent-%COMP%]{order:2;width:100%;min-height:7rem;padding:0 .5rem;display:flex;flex-flow:row wrap;align-items:center;justify-content:space-around}.shop-item__container--buttons[_ngcontent-%COMP%]   .shop-item__container--button[_ngcontent-%COMP%]{width:45%;display:flex;justify-content:center;align-items:center;min-height:5rem}.shop-item__container--buttons[_ngcontent-%COMP%]   .shop-item__container--button.buttonsLenghtMoreThanTwo[_ngcontent-%COMP%]{width:33.33%}.shop-item__container--buttons[_ngcontent-%COMP%]   .shop-item__container--button.rentable[_ngcontent-%COMP%]{min-width:22rem}@media only screen and (max-width: 480px){.shop-item__container--buttons[_ngcontent-%COMP%]   .shop-item__container--button[_ngcontent-%COMP%]{width:50%}}.shop-item__provider-button-wrapper[_ngcontent-%COMP%]{width:90%;height:100%}.shop-item__container--buy-button[_ngcontent-%COMP%]{order:5;width:100%;display:flex;justify-content:center;align-items:center;margin:1rem 0}.shop-item-info__container--title[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;position:relative}.shop-item-info__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem;margin:1.5rem 0;text-align:center}.shop-item__info[_ngcontent-%COMP%]{font-size:2.8rem}.shop-item__navigate-to-shop__button__container[_ngcontent-%COMP%]{order:3;margin:0 auto 1rem;width:calc(100% - 1.5rem)}.shop-item__navigate-to-shop__button__container.with--one--provider[_ngcontent-%COMP%]{width:calc(47% - 2.5rem)}@media only screen and (max-width: 480px){.shop-item__navigate-to-shop__button__container.with--one--provider[_ngcontent-%COMP%]{width:calc(52% - 2.5rem)}}.shop-item__navigate-to-shop__button[_ngcontent-%COMP%]{padding:0 .5rem;height:4rem}'],changeDetection:0}),n})();var _k=function(t){return t.ResetShopState="[Client Shop] Reset shop state",t.OpenBuyItemPopup="[Client Shop] Open buy item popup",t.CloseBuyItemPopup="[Client Shop] Close buy item popup",t}(_k||{});const qJe=he(_k.ResetShopState),Cue=he(_k.OpenBuyItemPopup),yue=he(_k.CloseBuyItemPopup);let DV=(()=>{var t;class n{constructor(e,i,r){this.store=e,this.rootContainerService=i,this.location=r}closeShopItemPopup(){var e,i;this.store.dispatch(yue()),null===(e=this.backButtonSubscription)||void 0===e||e.unsubscribe(),null===(i=this.shopItemPopupComponent)||void 0===i||i.destroy()}openShopItemPopup(e){return new Promise((i,r)=>{var s;null===(s=this.shopItemPopupComponent)||void 0===s||s.destroy(),this.shopItemPopupComponent=this.rootContainerService.createComponent(bue),this.backButtonSubscription=this.location.subscribe(()=>this.closeShopItemPopup()),this.store.dispatch(Cue()),this.shopItemPopupComponent.instance.popupModel={data:e,onSucess:()=>i(),onError:a=>{console.log(a),r(a)}}})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Ia),T(Rs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Jm=(()=>{var t;class n extends Qce{constructor(e,i,r,s,a,c,u,h,b,w,R){var G;super(c,u,h,i,R),G=this,this.onUserStateRefresh=function(){var K=f(function*(te){const ee=G.shopReceiver;ee&&ee.profile&&te&&te.profile.id===ee.profile.id&&(yield G.updateShopReceiverWithPromise({profile:te.profile,gameInventory:te.gameInventory}),G.refreshShopContent.next())});return function(te){return K.apply(this,arguments)}}(),this.store=i,this.constants=r,this.navigation=a,this.shopItemPopupService=e,this.loader=b,this.toastService=w,this.refreshShopContent=new sn,this.store.subscribeUserState().pipe(bt(Boolean)).subscribe(this.onUserStateRefresh),this.config=s}openShop(e={}){const i={...e,receiver:e.receiver||{profile:this.store.selectUserState().profile,gameInventory:this.store.selectUserState().gameInventory}};super.openShop(e),this.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/shop/").concat(i.receiver.profile.id,"/").concat(e.page||"currency")}}])}openItemPopup(e){var i=this;return f(function*(){return new Promise(function(){var r=f(function*(s,a){try{var c;let u=e.store;e.store||(i.loader.on(),u=yield i.load({useCache:!1}),i.loader.off()),yield i.shopItemPopupService.openShopItemPopup({...e,store:u,receiverProfile:null!==(c=e.receiverProfile)&&void 0!==c?c:i.store.selectSimpleProfile(),product:u.products.find(h=>h.item.id===e.item.id)}),s()}catch(u){i.loader.off(),console.warn(u),u instanceof lt.NetworkError?i.toastService.error("ERRORS.CONNECTION_ERROR"):u instanceof Wp||i.toastService.warn("ERRORS.SOMETHING_WRONG"),a(u)}});return function(s,a){return r.apply(this,arguments)}}())})()}isCurrentUserReceiver(){return this.store.selectUserState().profile.id===this.shopReceiver.profile.id}getCoinShardsAmount(e){var i;return null===(i=this.config.content)||void 0===i||null===(i=i.clubs)||void 0===i||null===(i=i.items)||void 0===i||null===(i=i.find(r=>r.id===e))||void 0===i?void 0:i.value}}return(t=n).\u0275fac=function(e){return new(e||t)(T(DV),T(J),T(tn),T(Dr),T(Yt),T(Qt),T(Uw),T(U5),T(ro),T(Dt),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Gh=(()=>{var t;class n extends Jm{constructor(){super(...arguments),this.shopType=Eo.Iap}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var BV=function(t){return t.BestValue="bestValue",t.MostPopular="mostPopular",t}(BV||{});const Ko=new Ot("ClientShopService",{factory:()=>new Gh(mt(DV),mt(J),mt(tn),mt(Dr),mt(Yt),mt(Qt),mt(Uw),mt(U5),mt(ro),mt(Dt),mt(En))});class Wp extends Error{constructor(){super(...arguments),this.name="PaymentCancelledError"}}var Jw=function(t){return t.StartTransaction="[Payments Client] Start transaction",t.CompleteTransaction="[Payments Client] Complete transaction",t.CancelTransaction="[Payments Client] Cancel transaction",t.FailTransaction="[Payments Client] Fail transaction",t.ResetPaymentsClientState="[Payments Client] Reset payment client state",t}(Jw||{});const dg=he(Jw.StartTransaction,{_as:"props",_p:void 0}),vk=he(Jw.CompleteTransaction,{_as:"props",_p:void 0}),Xw=he(Jw.CancelTransaction,{_as:"props",_p:void 0}),Xm=he(Jw.FailTransaction,{_as:"props",_p:void 0}),Sue=he(Jw.ResetPaymentsClientState);class $Je{constructor(n,o,e,i,r,s,a,c,u,h,b,w){this.loader=n,this.paymentService=o,this.navigation=e,this.store=i,this.deltaDna=r,this.deltaEngagementManager=s,this.brazeService=a,this.toasterService=c,this.analyticsTrackingService=u,this.userService=h,this.appService=b,this.shopService=w,this.showLoader=()=>this.loader.on(),this.hideLoader=()=>this.loader.off()}canBuyInstant(n){return!0}buy(n){const o=(0,ie.uuidV4)();return new Promise((e,i)=>{let r=this.paymentService.initTransaction(n);r.onSuccess(()=>{this.handleSuccess(r,n,o),e()}),r.onCancel(()=>{this.store.dispatch(Xw({clientTransactionId:o})),this.hideLoader(),i(new Wp)}),r.onFail(s=>{const a=new aa.DefaultEvent(Nn.Purchase,"".concat(this.getAnalyticsAction(n),":fail"),{label:"".concat(n.storeId,":").concat(n.storeProduct.item.id)});if(this.analyticsTrackingService.sendEvent(a),Qs.getInAppType(n.storeProduct.item.durability)===Ku.Subscription)return this.store.dispatch(Xm({clientTransactionId:o})),this.hideLoader(),i(s);const c=new OP;c.onSuccess(u=>{if(!u)return this.handleFail(o),i(new Error("Transaction restore failed!"));r.id=u.transactionId,r.storeProduct=n.storeProduct,r.currency=u.currency,r.price=u.price,this.handleSuccess(r,n,o)}),c.onFail(u=>{this.handleFail(o),i(s)}),this.appService.getMobileAppService().messages().store(c)}),this.store.dispatch(dg({transaction:{clientTransactionId:o,storeProduct:r.storeProduct}})),this.showLoader()})}trackFbPixelPurchase(n,o){if(n&&o&&o.toLowerCase()!==XR&&o.toLowerCase()!==ek){const e=new fR.PurchaseTrackEvent(Nn.Purchase,"track",{value:n,currency:o.toUpperCase()});this.analyticsTrackingService.sendEvent(e)}}getAnalyticsAction(n){return this.store.selectUserState().profile.id===n.receiverId?"buy":"donate"}handleSuccess(n,o,e){var i=this;return f(function*(){i.trackFbPixelPurchase(null==n?void 0:n.price,null==n?void 0:n.currency);const r=new aa.BuySuccessEvent(Nn.Purchase,"".concat(i.getAnalyticsAction(o),":success"),{label:"".concat(o.storeId,":").concat(o.storeProduct.item.id),value:100*(null==n?void 0:n.price),nonInteraction:!1,currency:null==n?void 0:n.currency,affiliation:o.providerId});i.analyticsTrackingService.sendEvent(r);try{var s;const a=[];Qs.getInAppType(o.storeProduct.item.durability)===Ku.Consumable?a.push(i.userService.getState({useCache:!1})):a.push(i.shopService.getDeviceAccountActiveSubscriptions()),yield Promise.all(a),i.deltaDna.purchaseCompletedEngage(n,null===(s=o.exchangeData)||void 0===s?void 0:s.engagementID),i.deltaEngagementManager.onConversion(n.id),i.brazeService.purchaseCompletedEngage(n),i.brazeService.handlePurchase(o.brazeEngagementId)}catch(a){console.warn(a)}finally{i.store.dispatch(vk({clientTransactionId:e})),i.hideLoader()}})()}handleFail(n){this.store.dispatch(Xm({clientTransactionId:n})),this.hideLoader(),this.navigation.closeOutlets(new ie.List([Fn])).catch(o=>{console.error(o)})}}var Vc=function(t){return t.AppStarted="AppStarted",t.AppStarted2="AppStarted2",t.GameLobbyOpened="GameLobbyOpened",t.GameLobbyOpened2="GameLobbyOpened2",t.GameFinished="GameFinished",t.PublicChatOpened="PublicChatOpened",t.MyProfileOpened="MyProfileOpened",t.OtherProfileOpened="OtherProfileOpened",t.DailyBonusOpened="DailyBonusOpened",t.DailyBonusClaimed="DailyBonusClaimed",t.TournamentLobbyOpened="TournamentLobbyOpened",t.CustomLobbyOpened="CustomLobbyOpened",t.LeaderboardsOpened="LeaderboardsOpened",t.StoreOpened="StoreOpened",t.LevelUpRewardsOpened="LevelUpRewardsOpened",t.PurchaseCompleted="PurchaseCompleted",t.RankedLobbyOpened="RankedLobbyOpened",t.TutorialCompleted="TutorialCompleted",t}(Vc||{}),NV=function(t){return t.Won="won",t.Lost="lost",t}(NV||{});let cl=(()=>{var t;class n{constructor(){this.brazeEngagementService=mt(U_),this.store=mt(J),this.defaultAvatarsService=mt(Rp),this.clientAdsService=mt(bc),this.analyticsDevicePlatform=new Ap}appStartedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.AppStarted))})()}appStartedEngage2(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.AppStarted2))})()}gameLobbyOpenedEngage(e){var i=this;return f(function*(){const r=yield i.createEngagementRequest(Vc.GameLobbyOpened);r.addParam("gameName",e),i.brazeEngagementService.engage(r)})()}gameLobbyOpenedEngage2(e){var i=this;return f(function*(){const r=yield i.createEngagementRequest(Vc.GameLobbyOpened2);r.addParam("gameName",e),i.brazeEngagementService.engage(r)})()}gameFinishedEngage(e){var i=this;return f(function*(){if(e.tableModel.gameInfo.roomType===Jt.RoomType.BlitzTournament)return;const r=-1!==e.tableModel.gameResult.winners.indexOf(i.store.selectUserState().profile.id)?NV.Won:NV.Lost,s=yield i.createEngagementRequest(Vc.GameFinished);s.addParam("matchFinalResult",r).addParam("gameName",e.roomModel.settings.game.name).addParam("matchName",e.roomModel.settings.trackingId).addParam("virtualCurrencyAmount",null==e.tableModel.gameInfo.bet?0:e.tableModel.gameInfo.bet),i.brazeEngagementService.engage(s)})()}publicChatOpenedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.PublicChatOpened))})()}myProfileOpenedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.MyProfileOpened))})()}otherProfileOpenedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.OtherProfileOpened))})()}dailyBonusOpenedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.DailyBonusOpened))})()}dailyBonusClaimedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.DailyBonusClaimed))})()}tournamentLobbyOpenedEngage(e){var i=this;return f(function*(){const r=yield i.createEngagementRequest(Vc.TournamentLobbyOpened);r.addParam("gameName",e),i.brazeEngagementService.engage(r)})()}customLobbyOpenedEngage(e){var i=this;return f(function*(){const r=yield i.createEngagementRequest(Vc.CustomLobbyOpened);r.addParam("gameName",e),i.brazeEngagementService.engage(r)})()}leaderboardsOpenedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.LeaderboardsOpened))})()}storeOpenedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.StoreOpened))})()}levelUpRewardsOpenedEngage(){var e=this;return f(function*(){e.brazeEngagementService.engage(yield e.createEngagementRequest(Vc.LevelUpRewardsOpened))})()}purchaseCompletedEngage(e){var i=this;return f(function*(){const r=yield i.createEngagementRequest(Vc.PurchaseCompleted);r.addParam("productID",e.storeProduct.item.id),i.brazeEngagementService.engage(r)})()}rankedLobbyOpenEngage(e){var i=this;return f(function*(){const r=yield i.createEngagementRequest(Vc.RankedLobbyOpened);r.addParam("gameName",e),i.brazeEngagementService.engage(r)})()}tutorialCompletedEngage(e){var i=this;return f(function*(){const r=yield i.createEngagementRequest(Vc.TutorialCompleted);r.addParam("tutorialName",e),i.brazeEngagementService.engage(r)})()}handlePurchase(e){this.brazeEngagementService.handlePurchase(e)}createEngagementRequest(e){var i=this;return f(function*(){var r,s;return new qWe(e).addParam("avatar",i.defaultAvatarsService.transformAvatarUrl(i.store.selectUserState().profile.avatar)).addParam("level",i.store.selectUserState().profile.level).addParam("username",i.store.selectUserState().profile.username.currentUsername).addParam("isVip",!(null===(r=i.store.selectVipStateSync().tiers[Fi.Full])||void 0===r||!r.isActive())).addParam("isPremium",!(null===(s=i.store.selectVipStateSync().tiers[Fi.Premium])||void 0===s||!s.isActive())).addParam("platform",i.analyticsDevicePlatform.getPlatform()).addParam("rewardedVideoReady",yield i.isRewardedVideoReady())})()}isRewardedVideoReady(){var e=this;return f(function*(){try{var i;const r=e.store.bonuses.videoDeltaBanner.selectState();return(null==r||null===(i=r.requirements)||void 0===i?void 0:i.limit)>0&&e.clientAdsService.isRewardedVideoEnabled()&&(yield e.clientAdsService.isRewardedVideoReady(rc.DeltaBanner,2e3))}catch(r){return console.warn(r),!1}})()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),wue=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee){this.paymentService=e,this.loaderService=i,this.userService=r,this.popupService=s,this.bcashyService=a,this.analyticsTrackingService=c,this.deltaDna=u,this.deltaEngagementManager=h,this.brazeService=b,this.navigation=w,this.store=R,this.toasterService=G,this.appService=K,this.shopService=te,this.offerService=ee,this.hideLoader=()=>this.loaderService.off(),this.showLoader=()=>this.loaderService.on(),this.iosPaymentService=new $Je(this.loaderService,this.paymentService,this.navigation,this.store,this.deltaDna,this.deltaEngagementManager,this.brazeService,this.toasterService,this.analyticsTrackingService,this.userService,this.appService,this.shopService)}canBuyInstant(e){if(1!==e.length)return!1;switch(e[0].provider){case"apple":case"google":case"cafebazaar":case"facebook":return!0;default:return!1}}buy(e){var i=this;return f(function*(){const r=(0,ie.uuidV4)();switch(e.providerId){case"apple":return i.iosPaymentService.buy(e);case"google":return new Promise((s,a)=>{let c=i.paymentService.initTransaction(e);c.onSuccess(()=>{i.handleSuccess(c,e,r),s()}),c.onCancel(()=>{i.store.dispatch(Xw({clientTransactionId:r})),i.hideLoader(),a(new Wp)}),c.onFail(u=>{if(Qs.getInAppType(e.storeProduct.item.durability)===Ku.Subscription)return i.store.dispatch(Xm({clientTransactionId:r})),i.hideLoader(),a(u);const h=new OP;h.onSuccess(b=>{if(!b)return i.handleFail(r),a(new Error("Transaction restore failed!"));c.id=b.transactionId,c.storeProduct=e.storeProduct,c.currency=b.currency,c.price=b.price,i.handleSuccess(c,e,r)}),h.onFail(b=>{i.handleFail(r),a(u)}),i.appService.getMobileAppService().messages().store(h)}),i.store.dispatch(dg({transaction:{clientTransactionId:r,storeProduct:e.storeProduct}})),i.showLoader()});case"cafebazaar":return new Promise((s,a)=>{let c=i.paymentService.initTransaction(e);c.onSuccess(()=>{i.handleSuccess(c,e,r),s()}),c.onCancel(()=>{i.store.dispatch(Xw({clientTransactionId:r})),i.hideLoader(),a(new Wp)}),c.onFail(u=>{i.toasterService.error("ERRORS.CONNECTION_ERROR");const h=new OP;h.onSuccess(b=>{if(!b)return i.handleFail(r),a(new Error("Transaction restore failed!"));c.id=b.transactionId,c.storeProduct=e.storeProduct,c.currency=b.currency,c.price=b.price,i.handleSuccess(c,e,r)}),h.onFail(b=>{i.handleFail(r),a(u)}),i.appService.getMobileAppService().messages().store(h)}),i.store.dispatch(dg({transaction:{clientTransactionId:r,storeProduct:e.storeProduct}})),i.showLoader()});case"bcashy":return new Promise((s,a)=>{let c;i.store.dispatch(dg({transaction:{clientTransactionId:r,storeProduct:e.storeProduct}}));const u=()=>{i.closeSubscription.unsubscribe(),i.buySubscription.unsubscribe(),i.bcashyService.closeForm(),i.store.dispatch(Xw({clientTransactionId:r})),c||a(new Wp)};let h=i.bcashyService.openForm(e.storeProduct);i.closeSubscription=h.instance.close.subscribe(u),i.buySubscription=h.instance.formSubmit.subscribe(b=>{const w=i.popupService.basic({buttons:{buttonObject:{action:()=>{i.popupService.hide(w)},buttonTextOptions:{translationKey:"TEXT.OK"}}},textParams:{translationKey:"BCASHY.THANK_YOU"}});e.customData=b,c=i.paymentService.initTransaction(e),c.onSuccess(()=>{i.handleSuccess(c,e,r),s()}),c.onFail(R=>{i.store.dispatch(Xm({clientTransactionId:r})),a(R)}),u()})});case"caschips":return new Promise((s,a)=>{if(i.store.selectWallet().chips<e.storeProduct.prices[XR])i.offerService.offerCurrency({targetValue:e.storeProduct.prices[XR],itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}}),a(new Wp);else{let u=i.paymentService.initTransaction(e);i.onIAPVirtualCurrencySuccess(u,r),u.onSuccess(s),u.onFail(h=>{i.store.dispatch(Xm({clientTransactionId:r})),i.hideLoader(),a(h)}),i.store.dispatch(dg({transaction:{clientTransactionId:r,storeProduct:e.storeProduct}})),i.showLoader()}});case"casgems":return new Promise((s,a)=>{if(i.store.selectWallet().gems<e.storeProduct.prices[ek])i.offerService.offerCurrency({targetValue:e.storeProduct.prices[ek],itemType:Fe.TG.GemsPack,description:{key:"POPUP.BUY_GEMS_QUESTION"}}),a(new Wp);else{let u=i.paymentService.initTransaction(e);i.onIAPVirtualCurrencySuccess(u,r),u.onSuccess(s),u.onFail(h=>{i.store.dispatch(Xm({clientTransactionId:r})),i.hideLoader(),a(h)}),i.store.dispatch(dg({transaction:{clientTransactionId:r,storeProduct:e.storeProduct}})),i.showLoader()}});case"code":return new Promise((s,a)=>{let c=i.paymentService.initTransaction(e);i.onIAPVirtualCurrencySuccess(c,r),c.onSuccess(s),c.onFail(u=>{i.toasterService.error(u===lt.Code.NetworkError?"ERRORS.CONNECTION_ERROR":"PROMO_CODES.PROMO_CODES_ERROR"),i.store.dispatch(Xm({clientTransactionId:r})),i.hideLoader(),a(u)}),i.store.dispatch(dg({transaction:{clientTransactionId:r,storeProduct:e.storeProduct}})),i.showLoader()});default:return new Promise((s,a)=>{let c=i.paymentService.initTransaction(e);c.onSuccess(()=>{i.handleSuccess(c,e,r),s()}),c.onFail(u=>{i.store.dispatch(Xm({clientTransactionId:r})),i.hideLoader(),a(u)}),c.onCancel(()=>{i.store.dispatch(Xw({clientTransactionId:r})),i.hideLoader(),a(new Wp)}),i.store.dispatch(dg({transaction:{clientTransactionId:r,storeProduct:e.storeProduct}})),i.showLoader()})}})()}completeUnfinishedTransactions(){return this.paymentService.completeUnfinishedTransactions()}onIAPVirtualCurrencySuccess(e,i){var r=this;e.onSuccess(f(function*(){try{yield r.userService.getState({useCache:!1})}catch(s){console.warn(s)}finally{r.store.dispatch(vk({clientTransactionId:i})),r.hideLoader()}}))}handleSuccess(e,i,r){var s=this;return f(function*(){s.trackFbPixelPurchase(e.price,e.currency);const a=new aa.BuySuccessEvent(Nn.Purchase,"".concat(s.getAnalyticsAction(i),":success"),{label:"".concat(i.storeId,":").concat(i.storeProduct.item.id),value:null==e?void 0:e.price,nonInteraction:!1,currency:null==e?void 0:e.currency,affiliation:i.providerId,items:[{item_id:i.storeProduct.item.id,item_name:i.storeProduct.item.id}],transactionId:e.id});s.analyticsTrackingService.sendEvent(a);try{var c;const u=[];Qs.getInAppType(i.storeProduct.item.durability)===Ku.Consumable?u.push(s.userService.getState({useCache:!1})):u.push(s.shopService.getDeviceAccountActiveSubscriptions()),yield Promise.all(u),s.deltaDna.purchaseCompletedEngage(e,null===(c=i.exchangeData)||void 0===c?void 0:c.engagementID),s.deltaEngagementManager.onConversion(e.id),s.brazeService.purchaseCompletedEngage(e),s.brazeService.handlePurchase(i.brazeEngagementId)}catch(u){console.warn(u)}finally{s.store.dispatch(vk({clientTransactionId:r})),s.hideLoader()}})()}handleFail(e){this.store.dispatch(Xm({clientTransactionId:e})),this.hideLoader(),this.navigation.closeOutlets(new ie.List([Fn])).catch(i=>{console.error(i)})}trackFbPixelPurchase(e,i){if(e&&i&&i.toLowerCase()!==XR&&i.toLowerCase()!==ek){const r=new fR.PurchaseTrackEvent(Nn.Purchase,"track",{value:e,currency:i.toUpperCase()});this.analyticsTrackingService.sendEvent(r)}}getAnalyticsAction(e){var i;return null!==(i=e.exchangeData)&&void 0!==i&&i.donateRequestId?"club:donate":this.store.selectUserState().profile.id===e.receiverId?"buy":"donate"}}return(t=n).\u0275fac=function(e){return new(e||t)(T(pce),T(ro),T(Kr),T(Cn),T(Jce),T(yi),T(sl),T(Um),T(cl),T(Yt),T(J),T(Dt),T(Qt),T(Jm),T(Sc))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const bk=new Ot("PaymentService",{factory:()=>new wue(mt(pce),mt(ro),mt(Kr),mt(Cn),mt(Jce),mt(yi),mt(sl),mt(Um),mt(cl),mt(Yt),mt(J),mt(Dt),mt(Qt),mt(Jm),mt(Sc))}),Tue=t=>({giftable:t});function KJe(t,n){if(1&t&&B(0,"item-reward",15),2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(3,Tue,e.isGiftable))("vipBonusMultiplier",e.vipBonusMultiplier)("item",o)}}function ZJe(t,n){if(1&t&&(p(0,"div",13),U(1,KJe,1,5,"item-reward",14),m()),2&t){const o=_();d(),l("ngForOf",o.promoItem.item.items)}}function QJe(t,n){if(1&t&&(p(0,"div",13),B(1,"item-reward",16),m()),2&t){const o=_();d(),l("ngClass",ne(2,Tue,o.isGiftable))("item",o.promoItem.item)}}const YJe=t=>({selected:t}),JJe=t=>({online:t});function XJe(t,n){if(1&t){const o=Ce();p(0,"container-component",23),Y("click",function(){const r=oe(o).$implicit;return re(_(2).selectReceiver(r))}),B(1,"avatar",24)(2,"div",25)(3,"username",26),m()}if(2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(8,YJe,(null==e.receiver?null:e.receiver.id)===o.profile.id)),d(),l("user",o.profile)("isLink",!1)("hasUsername",!1)("hasLevel",!1),d(),l("ngClass",ne(10,JJe,null==o.onlineStatus?null:o.onlineStatus.isOnline)),d(),l("userProfile",o.profile)("hasVerifiedBadge",!0)}}const eXe=t=>({handler:t}),tXe=()=>({onlineIndication:!0,isLink:!1,itemClass:"hidden__shop--list--users-box-item",textNoUsers:"HIDDEN_SHOP.EMPTY_FRIENDS_LIST"});function nXe(t,n){if(1&t){const o=Ce();p(0,"div",17)(1,"p",18),H(2),V(3,"translate"),m(),p(4,"div",19)(5,"search-bar",20),Y("filterAction",function(i){return oe(o),re(_().searchUser(i))})("clearFilters",function(){return oe(o),re(_().resetFilters())}),m()(),p(6,"list-users-box",21),Y("filterUsers",function(i){return oe(o),re(_().onFilterUsers(i))}),U(7,XJe,4,12,"ng-template",null,22,ft),m()()}if(2&t){const o=_();d(2),se($(3,11,"HIDDEN_SHOP.CHOOSE_RECEIVER")),d(3),l("customInputCssClass","hidden__shop__search--bar")("searchBarPlaceholder","PLACEHOLDERS.USERNAME"),d(),l("type","blocked stroked")("onScrolledToBottom",ne(13,eXe,o.increaseListLength))("listUsers",o.receivers)("useCustomHeader",!0)("shownUsersCount",o.listLength)("totalListLength",o.receivers.length)("searchedUser",o.username)("configListUsers",pt(15,tXe))}}function iXe(t,n){1&t&&B(0,"item-price",27),2&t&&l("item",_().promoItem)}function oXe(t,n){1&t&&(p(0,"p",28),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"HIDDEN_SHOP.PROCEED_WITH_PAYMENT")))}function rXe(t,n){if(1&t){const o=Ce();p(0,"div",30)(1,"provider-button",31),Y("buttonClicked",function(i){return oe(o),re(_(2).buyItem(i))}),m()()}if(2&t){const o=n.$implicit,e=_(2);d(),l("paymentProvider",o)("disabled",e.isGiftable&&!e.receiver)}}function sXe(t,n){if(1&t&&(Tn(0),U(1,rXe,2,2,"div",29),Pn()),2&t){const o=_();d(),l("ngForOf",o.providerButtons)}}function aXe(t,n){if(1&t){const o=Ce();Tn(0),p(1,"div",30)(2,"item-buy-button",32),Y("buttonClicked",function(i){return oe(o),re(_().buyItem(i))}),m()(),Pn()}if(2&t){const o=_();d(2),l("clientStoreProduct",o.promoItem)("paymentProvider",o.providerButtons[0])("disabled",o.isGiftable&&!o.receiver)}}const cXe=()=>({key:"HIDDEN_SHOP.SPECIAL_OFFER"});let FV=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.payments=s,this.profileFactory=u,this.popupTitleTypes=li,this.EControlType=rd.EControlType,this.username="",this.listLengthStep=20,this.listLength=this.listLengthStep,this.increaseListLength=()=>{this.listLength+=this.listLengthStep,this.cdr.detectChanges()},this.analytics=r,this.analyticsDevicePlatform=new Ap,this.hiddenShopService=e,this.toastService=i,this.store=a,this.providerButtons=null,this.popupContainerOptions={styleProperties:{maxWidth:"42rem",maxHeight:"98%"},customBackdropCssClass:"hidden-shop__popup--backdrop",customComponentCssClass:"hidden-shop__popup--container"},this.cdr=c,c.detach()}hide(){this.closePopup()}ngOnInit(){this.vipBonusMultiplier=this.store.shop.promo.selectState().model.vipBonusMultiplier,this.cdr.detectChanges()}buyItem(e){var i=this;return f(function*(){var r;let s={storeProduct:i.promoItem,receiverId:(null===(r=i.receiver)||void 0===r?void 0:r.id)||i.hiddenShopService.shopReceiver.profile.id,storeId:i.store.shop.promo.selectState().model.id,providerId:e.provider,brazeEngagementId:i.brazeEngagementId,exchangeData:{engagementID:i.engagementID}};try{yield i.payments.buy(s)}catch(a){console.warn(a)}i.closePopup(),i.cdr.detectChanges()})()}trackByUser(e,i){return i.id}selectReceiver(e){this.receiver=e.profile,this.cdr.detectChanges()}searchUser(e){this.username=e.searchbarFilterValue,this.cdr.detectChanges()}resetFilters(){this.username="",this.cdr.detectChanges()}onFilterUsers(e){this.listLength=this.listLengthStep,this.cdr.detectChanges(),this.receiver&&(e.find(i=>i.profile.id===this.receiver.id)||(this.receiver=void 0),this.cdr.detectChanges())}setHiddenShopPopup(e){if(e){var i;if(this.receivers=[...bA()(this.store.friends.selectFriends(),[s=>{var a;return null===(a=s.onlineStatus)||void 0===a?void 0:a.isOnline}],[ie.ESort.Desc]).map(s=>this.profileFactory.createProfileWithOnlineStatus({profile:this.profileFactory.createProfile(s.profile),onlineStatus:s.onlineStatus}))],this.promoItem=e.item,this.isGiftable=null===(i=e.shopOpenData)||void 0===i||null===(i=i.parameters)||void 0===i?void 0:i.giftable,this.engagementID=e.engagementID,this.brazeEngagementId=e.brazeEngagementId,this.isGiftable?this.popupContainerOptions.customComponentCssClass="hidden-shop__popup--container giftable":(this.popupContainerOptions.customComponentCssClass="hidden-shop__popup--container",this.receivers.push(this.profileFactory.createProfileWithOnlineStatus({profile:this.store.selectUserState().profile,onlineStatus:new xm({isOnline:!0})}))),this.popupContainerOptions={...this.popupContainerOptions},this.providerButtons=this.hiddenShopService.getProvidersByItem(this.store.shop.promo.selectState().model,this.promoItem),0===this.providerButtons.length)return console.warn("Hidden shop error: no available payment providers"),this.toastService.error("ERRORS.CONNECTION_ERROR"),void this.cdr.detectChanges();const r=new Tl.ShopEnteredEvent(Nn.Shop,"entered",{shopID:h5.HiddenShop,shopName:"UNKNOWN",shopType:"UNKNOWN",platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});this.analytics.sendEvent(r),this.canBuyInstantly=this.payments.canBuyInstant(this.providerButtons),this.canBuyInstantly&&!this.isGiftable&&(this.buyItem(this.providerButtons[0]),this.closePopup())}else this.closePopup();this.cdr.detectChanges()}closePopup(){this.hiddenShopService.closeShop()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ef),g(Dt),g(yi),g(bk),g(J),g(Re),g(Xu))},t.\u0275cmp=pe({type:t,selectors:[["hidden-shop"]],decls:15,vars:12,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"hidden-shop__content"],[1,"hidden-shop__content__container"],[1,"hidden-shop__items-preview__container"],["class","hidden-shop__items-preview",4,"ngIf"],["class","hidden-shop__selector--wrapper",4,"ngIf"],[1,"hidden-shop__payments"],[1,"hidden-shop__item-price__container"],["class","hidden-shop__item-price",3,"item",4,"ngIf"],["class","hidden-shop__content--text",4,"ngIf"],[1,"hidden-shop__container--buttons"],[4,"ngIf"],[1,"hidden-shop__items-preview"],["class","hidden-shop__item",3,"ngClass","vipBonusMultiplier","item",4,"ngFor","ngForOf"],[1,"hidden-shop__item",3,"ngClass","vipBonusMultiplier","item"],[1,"hidden-shop__item",3,"ngClass","item"],[1,"hidden-shop__selector--wrapper"],[1,"hidden-shop__select-text"],[1,"hidden__shop--users-list--header"],[3,"customInputCssClass","searchBarPlaceholder","filterAction","clearFilters"],["scroll-directive","",1,"hidden__shop--list--users-box",3,"type","onScrolledToBottom","listUsers","useCustomHeader","shownUsersCount","totalListLength","searchedUser","configListUsers","filterUsers"],["ref",""],[1,"hidden-shop__selector-item",3,"ngClass","click"],[1,"hidden-shop__avatar",3,"user","isLink","hasUsername","hasLevel"],[1,"hidden-shop__online-indicator",3,"ngClass"],[1,"hidden-shop__username",3,"userProfile","hasVerifiedBadge"],[1,"hidden-shop__item-price",3,"item"],[1,"hidden-shop__content--text"],["class","hidden-shop__container--button",4,"ngFor","ngForOf"],[1,"hidden-shop__container--button"],[1,"hidden-shop__container--button--provider",3,"paymentProvider","disabled","buttonClicked"],[3,"clientStoreProduct","paymentProvider","disabled","buttonClicked"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.hide()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.hide()}),m(),p(2,"div",2)(3,"div",3)(4,"div",4),U(5,ZJe,2,1,"div",5)(6,QJe,2,4,"div",5),m(),U(7,nXe,9,16,"div",6),m(),p(8,"div",7)(9,"div",8),U(10,iXe,1,1,"item-price",9),m(),U(11,oXe,3,3,"p",10),p(12,"div",11),U(13,sXe,2,1,"ng-container",12)(14,aXe,3,3,"ng-container",12),m()()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Static)("text",pt(11,cXe)),d(4),l("ngIf",i.promoItem.item&&i.promoItem.item.items),d(),l("ngIf",i.promoItem.item&&!i.promoItem.item.items),d(),l("ngIf",i.isGiftable),d(3),l("ngIf",!i.canBuyInstantly),d(),l("ngIf",i.canBuyInstantly),d(2),l("ngIf",!i.canBuyInstantly),d(),l("ngIf",i.canBuyInstantly))},styles:[".hidden-shop__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.hidden-shop__container[_ngcontent-%COMP%]{transform:translate(300%);display:flex;flex-flow:column nowrap;max-height:100%}.hidden-shop__header[_ngcontent-%COMP%]{flex-shrink:0}.hidden__shop--users-list--header[_ngcontent-%COMP%]{width:100%}.hidden-shop__header--title[_ngcontent-%COMP%]{font-size:2.4rem;text-transform:uppercase;text-align:center}.hidden-shop__content[_ngcontent-%COMP%]{padding:1rem;margin:auto 0;display:flex;flex-flow:column;overflow-y:auto;overflow-x:hidden}@media screen and (max-width: 568px){.hidden-shop__content[_ngcontent-%COMP%]{padding:.5rem 1rem}}.hidden-shop__content--text[_ngcontent-%COMP%]{text-align:center;margin:1.5rem 0;text-transform:uppercase;font-size:1.4rem}.hidden-shop__container--buttons[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;justify-content:space-around}.hidden-shop__container--buttons[_ngcontent-%COMP%]   .hidden-shop__container--button[_ngcontent-%COMP%]{width:33.33%;margin:.5rem 0}@media only screen and (max-width: 480px){.hidden-shop__container--buttons[_ngcontent-%COMP%]   .hidden-shop__container--button[_ngcontent-%COMP%]{width:50%}}.hidden-shop__container--buttons[_ngcontent-%COMP%]   .hidden-shop__container--button--provider[_ngcontent-%COMP%]{width:95%;display:block;margin:auto}.hidden__shop--list--users-box[_ngcontent-%COMP%]{margin:0;width:auto;margin-bottom:2rem}.hiddenShopAnimation[_ngcontent-%COMP%]{animation:popupAnimation .3s cubic-bezier(0,.775,0,1) forwards}.hidden-shop__selector-item[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row nowrap;align-items:center}.hidden-shop__selector-item.first[_ngcontent-%COMP%]{margin-top:0}.hidden-shop__selector-item.last[_ngcontent-%COMP%]{margin-bottom:0}.hidden-shop__username[_ngcontent-%COMP%]{margin:0 1rem;overflow:hidden}.hidden-shop__username.selected[_ngcontent-%COMP%]{margin:0}.hidden-shop__avatar[_ngcontent-%COMP%]{width:6rem;padding:1rem;height:auto;flex-shrink:0}.hidden-shop__selector--selected-item[_ngcontent-%COMP%]{height:5rem}.hidden-shop__online-indicator[_ngcontent-%COMP%]{width:1rem;height:1rem;border-radius:50%;flex-shrink:0}.hidden-shop__item-price__container[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:1rem}"],changeDetection:0}),n})();var pC,ti=function(t){return t.Gifts="Gifts",t.LikesAndRatings="LikesAndRatings",t.Likes="Likes",t.System="System",t.Invites="Invites",t.Club="Club",t}(ti||{});!function(t){t.SOCKET_MESSAGE="notification-v2",t.MEMBERSHIP_EXPIRES_TRIGGER=259200;class n{constructor(){this.read=!1,this.id=ie.uuidV4(),this.createdAt=ie.now()}}t.General=n,t.LevelUp=class o extends n{constructor(){super(),this.notificationType=rt.UserLevelUp,this.notificationCategory=ti.System}},t.AchievementCompleted=class e extends n{constructor(){super(),this.notificationType=rt.AchievementCompleted,this.notificationCategory=ti.System}},t.RefundUnclaimedPot=class i extends n{constructor(){super(),this.notificationType=rt.RefundUnclaimedPot,this.notificationCategory=ti.System}},t.ItemPurchase=class r extends n{constructor(){super(),this.notificationType=rt.ItemPurchase,this.notificationCategory=ti.System}},t.GameWon=class s extends n{constructor(){super(),this.notificationType=rt.GameWon,this.notificationCategory=ti.System}},t.TournamentWon=class a extends n{constructor(){super(),this.notificationType=rt.TournamentWon,this.notificationCategory=ti.System}},t.KnockoutTournamentWon=class c extends n{constructor(){super(),this.notificationType=rt.KnockoutTournamentWon,this.notificationCategory=ti.System}},t.RefundTournament=class u extends n{constructor(){super(),this.notificationType=rt.RefundTournament,this.notificationCategory=ti.System}},t.FriendRequestSent=class h extends n{constructor(){super(),this.notificationType=rt.FriendRequestSent,this.notificationCategory=ti.Invites}},t.FriendRequestAccepted=class b extends n{constructor(){super(),this.notificationType=rt.FriendRequestAccepted,this.notificationCategory=ti.Invites}},t.SenderInviteAccepted=class w extends n{constructor(){super(),this.params={},this.notificationType=rt.SenderInviteAccepted,this.notificationCategory=ti.Invites}},t.ReceiverInviteAccepted=class R extends n{constructor(){super(),this.params={},this.notificationType=rt.ReceiverInviteAccepted,this.notificationCategory=ti.Invites}},t.InvitationLevelUp=class G extends n{constructor(){super(),this.params={},this.notificationType=rt.InvitationLevelUp,this.notificationCategory=ti.Invites}},t.GiftSent=class K extends n{constructor(){super(),this.notificationType=rt.GiftSent,this.notificationCategory=ti.Gifts}},t.GiftPackageSent=class te extends n{constructor(){super(),this.notificationType=rt.GiftPackageSent,this.notificationCategory=ti.Gifts}},t.GiftPackageRecieved=class ee extends n{constructor(){super(),this.notificationType=rt.GiftPackageRecieved,this.notificationCategory=ti.Gifts}},t.LikeRecieved=class le extends n{constructor(){super(),this.notificationType=rt.LikeRecieved,this.notificationCategory=ti.LikesAndRatings}},t.RatingReceived=class me extends n{constructor(){super(),this.notificationType=rt.RatingReceived,this.notificationCategory=ti.LikesAndRatings}},t.AntiChurnReceived=class ge extends n{constructor(){super(),this.notificationType=rt.AntiChurnReceived,this.notificationCategory=ti.System}},t.AccountMigrated=class Me extends n{constructor(){super(),this.notificationType=rt.AccountMigrated,this.notificationCategory=ti.System}},t.AdminBonusReceived=class Ke extends n{constructor(){super(),this.notificationType=rt.AdminBonusReceived,this.notificationCategory=ti.Gifts}},t.FirstLostGameBonus=class Ee extends n{constructor(){super(),this.notificationType=rt.FirstLostGameBonus}},t.ClubInvite=class ot extends n{constructor(){super(),this.notificationType=rt.ClubInvite,this.notificationCategory=ti.Invites}},t.ClubDisband=class ct extends n{constructor(){super(),this.notificationType=rt.ClubDisband,this.notificationCategory=ti.System}},t.ClubMemberRoleChange=class Pt extends n{constructor(){super(),this.notificationType=rt.ClubMemberRoleChange,this.notificationCategory=ti.System}},t.ClubKicked=class gn extends n{constructor(){super(),this.notificationType=rt.ClubKicked,this.notificationCategory=ti.System}},t.ClubJoinRequestAccepted=class qt extends n{constructor(){super(),this.notificationType=rt.ClubJoinRequestAccepted,this.notificationCategory=ti.System}},t.ClubJoinSuccess=class Je extends n{constructor(zi){super(),this.params=null!=zi?zi:this.params,this.notificationType=rt.ClubJoinSuccess,this.notificationCategory=ti.System}},t.ClubLevelUpReward=class xn extends n{constructor(){super(),this.notificationType=rt.ClubLevelUpReward,this.notificationCategory=ti.System}},t.PromoTournamentInvite=class bi extends n{constructor(){super(),this.notificationType=rt.PromoTournamentInviteSent,this.notificationCategory=ti.System}},t.CashbackGenerated=class rn extends n{constructor(){super(),this.notificationType=rt.CashbackGenerated,this.notificationCategory=ti.System}},t.HostRewardReceived=class vn extends n{constructor(){super(),this.notificationType=rt.HostRewardReceived,this.notificationCategory=ti.System}},t.PromoTournamentRewardAvailable=class Vn extends n{constructor(){super(),this.notificationType=rt.PromoTournamentRewardAvailable}}}(pC||(pC={}));var hC=function(t){return t.ResetBlockList="Reset Block List",t.GetBlockList="Get Block List",t.GetBlockListSuccess="Get Block List Success",t.GetBlockListError="Get Block List Error",t.BlockUserSuccess="Block User Success",t.UnblockUserSuccess="Unblock User Success",t}(hC||{});function e0(t){return"[".concat("Block List","] ").concat(t)}const uXe=he(e0(hC.ResetBlockList)),Iue=he(e0(hC.GetBlockList)),Mue=he(e0(hC.GetBlockListSuccess),{_as:"props",_p:void 0}),Oue=he(e0(hC.GetBlockListError),{_as:"props",_p:void 0}),Eue=he(e0(hC.BlockUserSuccess),{_as:"props",_p:void 0}),xue=he(e0(hC.UnblockUserSuccess),{_as:"props",_p:void 0}),DI=ki({selectId:t=>t.profile.id,sortComparer:(t,n)=>n.blockedOn-t.blockedOn}),UV={list:DI.getInitialState({limit:void 0,loadingState:{isLoaded:!1,isLoading:!1,error:void 0}})},dXe=Sr(UV,de(uXe,()=>UV),de(sw,()=>UV),de(Iue,t=>({...t,list:{...t.list,loadingState:{...t.list.loadingState,isLoading:!0,error:void 0}}})),de(Mue,(t,n)=>({...t,list:{...DI.upsertMany(n.blocked,t.list),limit:n.limit,loadingState:{...t.list.loadingState,isLoading:!1,isLoaded:!0,error:void 0}}})),de(Oue,(t,n)=>({...t,list:{...t.list,loadingState:{...t.list.loadingState,isLoading:!1,error:n}}})),de(Eue,(t,n)=>{const o={profile:n,blockedOn:(0,ie.now)()};return Se(t,e=>{e.list.loadingState.isLoading=!1,e.list=DI.upsertOne(o,t.list)})}),de(xue,(t,n)=>({...t,list:{...DI.removeOne(n.id,t.list),loadingState:{...t.list.loadingState,isLoading:!1}}})),de(_I,(t,n)=>n.transaction.product.item.type!==Fe.TG.Block?t:{...t,list:{...t.list,limit:t.list.limit+n.transaction.product.item.amount}}));function Aue(t){return function hXe(t){return t.userBlock}(t).list}const{selectAll:mXe,selectTotal:fXe}=DI.getSelectors(Aue),Ck=We(Aue,t=>t),Rue=We(Ck,mXe,(t,n)=>({blocked:n,limit:t.limit})),kue=We(Ck,t=>t.limit);J.prototype.selectBlockListState=function gXe(){return this.selectSync(Ck)},J.prototype.subscribeBlockListState=function _Xe(){return this.select(Ck)},J.prototype.selectPlayerBlockViewModel=function vXe(){return this.selectSync(Rue)},J.prototype.subscribePlayerBlockViewModel=function bXe(){return this.select(Rue)},J.prototype.selectBlockListLimit=function CXe(){return this.selectSync(kue)},J.prototype.subscribeBlockListLimit=function yXe(){return this.select(kue)};const SXe=[$r.forFeature("userBlock",function pXe(t,n){return dXe(t,n)})];let Lue=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[SXe]}),n})(),t0=(()=>{var t;class n{constructor(e,i){this.http=e,this.store=i}getBlockList(e={useCache:!0}){var i=this;return f(function*(){try{if(e&&e.useCache&&i.store.selectBlockListState().loadingState.isLoaded)return i.store.selectPlayerBlockViewModel();i.store.dispatch(Iue());const r=yield i.http.get("users/actions/block").toPromise().then(s=>s.body);return i.store.dispatch(Mue(r)),r}catch(r){throw i.store.dispatch(Oue(r)),r}})()}block(e){var i=this;return f(function*(){const r=i.store.selectBlockListState();if(r.loadingState.isLoaded&&i.store.selectSync(fXe)+1>r.limit)throw new et.Permissions.LimitReached("Block user",r.limit);yield i.http.post("users/actions/block",{userId:e.id}).toPromise().then(s=>s.body),i.store.dispatch(Eue(e))})()}unblock(e){var i=this;return f(function*(){yield i.http.delete("users/actions/block",void 0,{params:{userId:e.id}}).toPromise().then(r=>r.body),i.store.dispatch(xue(e))})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:Lue}),n})();const n0=new Ot("IUserBlockService",{factory:()=>new t0(mt(En),mt(J))});var ta=function(t){return t.ResetFriendsState="Reset Friends State",t.GetFriendsCount="Get Friends Count",t.GetFriendsCountSuccess="Get Friends Count Success",t.GetFriendsCountError="Get Friends Count Error",t.GetFriendsList="Get Friends List",t.GetFriendsListSuccess="Get Friends List Success",t.GetFriendsListError="Get Friends List Error",t.GetFriendsRequestsList="Get Friends Requests List",t.GetFriendsRequestsListSuccess="Get Friends Requests List Success",t.GetFriendsRequestsListError="Get Friends Resuests List Error",t.AcceptFriendRequest="Accept Friend Request",t.AcceptFriendRequestSuccess="Accept Friend Request Success",t.AcceptFriendRequestError="Accept Friend Request Error",t.AddCloseFriendRequest="Add Close Friend Request",t.AddCloseFriendRequestSuccess="Add Close Request Success",t.AddCloseFriendRequestError="Add Close Request Error",t.RemoveCloseFriendRequest="Remove Close Friend Request",t.RemoveCloseFriendRequestSuccess="Remove Close Request Success",t.RemoveCloseFriendRequestError="Remove Close Request Error",t.DeclineFriendRequest="Decline Friend Request",t.UnfriendSuccess="Unfriend Success",t.UpdateFriendOnlineStatus="Update Friend Online Status",t.FriendRequestAccepted="Friend Request Accepted",t.FriendRequestReceived="Friend Request Received",t.ConnectionRestored="Connection Restored",t}(ta||{});function ca(t){return"[".concat("Friends State","] ").concat(t)}const Bue=he(ca(ta.ResetFriendsState)),Nue=he(ca(ta.GetFriendsList)),Fue=he(ca(ta.GetFriendsListSuccess),{_as:"props",_p:void 0}),Uue=he(ca(ta.GetFriendsListError),{_as:"props",_p:void 0}),Gue=he(ca(ta.GetFriendsCount)),Vue=he(ca(ta.GetFriendsCountSuccess),{_as:"props",_p:void 0}),zue=he(ca(ta.GetFriendsCountError),{_as:"props",_p:void 0}),jue=he(ca(ta.GetFriendsRequestsList)),Hue=he(ca(ta.GetFriendsRequestsListSuccess),{_as:"props",_p:void 0}),que=he(ca(ta.GetFriendsRequestsListError),{_as:"props",_p:void 0}),GV=(he(ca(ta.AcceptFriendRequest)),he(ca(ta.AcceptFriendRequestSuccess),{_as:"props",_p:void 0})),Wue=(he(ca(ta.AcceptFriendRequestError),{_as:"props",_p:void 0}),he(ca(ta.AddCloseFriendRequest)),he(ca(ta.AddCloseFriendRequestSuccess),{_as:"props",_p:void 0})),$ue=(he(ca(ta.AddCloseFriendRequestError),{_as:"props",_p:void 0}),he(ca(ta.RemoveCloseFriendRequest)),he(ca(ta.RemoveCloseFriendRequestSuccess),{_as:"props",_p:void 0})),Kue=(he(ca(ta.RemoveCloseFriendRequestError),{_as:"props",_p:void 0}),he(ca(ta.DeclineFriendRequest),{_as:"props",_p:void 0})),Zue=he(ca(ta.UnfriendSuccess),{_as:"props",_p:void 0}),Que=he(ca(ta.UpdateFriendOnlineStatus),{_as:"props",_p:void 0}),Yue=he(ca(ta.FriendRequestAccepted),{_as:"props",_p:void 0}),Jue=he(ca(ta.FriendRequestReceived),{_as:"props",_p:void 0}),TXe=he(ca(ta.ConnectionRestored));let Tu=(()=>{var t;let n=((t=class{constructor(e,i,r,s,a,c,u){this.listeners=new ie.List,this.http=e,this.store=i,this.permissions=r,this.cs=s,this.userFactory=a,this.timeService=c,this.blockService=u}requestFriends(e={useCache:!0}){var i=this;return f(function*(){try{const r=i.store.friends.selectFriendsListState();if(r.loadingState.isLoaded&&r.loadingState.isSynchronized&&e.useCache)return{friends:i.store.friends.selectFriends()};i.store.dispatch(Nue());const s=yield i.http.get("social/friends/inGame/list").toPromise().then(a=>a.body);return i.store.dispatch(Fue(s)),s}catch(r){console.error(r);const s=jt.createErrorInstance(r);throw i.store.dispatch(Uue(s)),s}})()}requestOtherUserFriends(e){var i=this;return f(function*(){try{return yield i.http.get("social/friends/inGame/listById/".concat(e)).toPromise().then(r=>r.body)}catch(r){throw console.error(r),jt.createErrorInstance(r)}})()}requestOtherUserFriendsCount(e){var i=this;return f(function*(){try{return yield i.http.get("social/friends/inGame/listById/count/".concat(e)).toPromise().then(r=>r.body)}catch(r){throw console.error(r),jt.createErrorInstance(r)}})()}requestReceivedFriendRequests(){var e=this;return f(function*(){try{const i=e.store.friends.selectFriendsRequestsListState();if(i.loadingState.isLoaded&&i.loadingState.isSynchronized)return{friends:e.store.friends.selectFriendsRequests()};e.store.dispatch(jue());const r=yield e.http.get("social/friends/inGame/list/requests").toPromise().then(s=>s.body);return e.store.dispatch(Hue(r)),r}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(que(r)),r}})()}requestFriendsCount(){var e=this;return f(function*(){try{const i=e.store.friends.selectFriendsCount();if(i.loadingState.isLoaded&&i.loadingState.isSynchronized)return e.store.friends.selectFriendsCount();e.store.dispatch(Gue());const r=yield e.http.get("social/friends/inGame/list/count").toPromise().then(s=>s.body);return e.store.dispatch(Vue({count:r})),r}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(zue(i)),r}})()}sendFriendRequest(e){var i=this;return f(function*(){const r=i.permissions.getActionPermission(nt.EPermissionModule.Friends,nt.EModuleAction.Send);if(!r.isPermitted)throw new et.Permissions.RequirementNotMeet(r.failedRequirements[0].type);try{if((yield i.blockService.getBlockList()).blocked.find(a=>a.profile.id===e.id))throw new lt.TargetUserBlockedError;if(i.store.friends.selectFriendsRequestsListState().loadingState.isLoaded||(yield i.requestReceivedFriendRequests()),i.store.friends.selectFriendsRequests().find(a=>a.id===e.id))return i.acceptFriendRequest(e);yield i.http.post("social/friends/inGame/invite/".concat(e.id)).toPromise()}catch(s){throw jt.createErrorInstance(s)}})()}acceptFriendRequest(e){var i=this;return f(function*(){try{yield i.http.post("social/friends/inGame/invite/accept/".concat(e.id)).toPromise(),i.store.dispatch(GV({user:i.userFactory.createClientFriendProfile({profile:e})}))}catch(r){throw jt.createErrorInstance(r)}})()}declineFriendRequest(e){var i=this;return f(function*(){try{yield i.requestFriends(),i.store.friends.selectFriends().find(r=>r.id===e)||(yield i.unfriend(e)),i.store.dispatch(Kue({userId:e}))}catch(r){throw jt.createErrorInstance(r)}})()}unfriend(e){var i=this;return f(function*(){try{yield i.http.delete("social/friends/inGame/".concat(e)).toPromise(),i.store.dispatch(Zue({userId:e}))}catch(r){throw jt.createErrorInstance(r)}})()}addCloseFriend(e){var i=this;return f(function*(){const r=i.permissions.getActionPermission(nt.EPermissionModule.Friends,nt.EModuleAction.Edit);if(!r.isPermitted)throw new et.Permissions.RequirementNotMeet(r.failedRequirements[0].type);try{yield i.http.post("social/friends/inGame/close-friend/".concat(e.id)).toPromise(),i.store.dispatch(Wue({user:i.userFactory.createClientFriendProfile(e)}))}catch(s){throw jt.createErrorInstance(s)}})()}removeCloseFriend(e){var i=this;return f(function*(){const r=i.permissions.getActionPermission(nt.EPermissionModule.Friends,nt.EModuleAction.Edit);if(!r.isPermitted)throw new et.Permissions.RequirementNotMeet(r.failedRequirements[0].type);try{yield i.http.delete("social/friends/inGame/close-friend/".concat(e.id)).toPromise(),i.store.dispatch($ue({user:i.userFactory.createClientFriendProfile(e)}))}catch(s){throw jt.createErrorInstance(s)}})()}onAppReady(){this.listeners.add(this.cs.on("friendOnline",e=>this.store.dispatch(Que({userId:e.friendId,timestamp:this.timeService.getServerTimeS(),isOnline:e.online})))),this.listeners.add(this.cs.on(pC.SOCKET_MESSAGE,e=>{e.notificationType===rt.FriendRequestAccepted&&this.store.dispatch(Yue({user:this.userFactory.createClientFriendProfile({profile:e.senderProfile})})),e.notificationType===rt.FriendRequestSent&&this.store.dispatch(Jue({user:this.userFactory.createClientFriendProfile({profile:e.senderProfile,requestInfo:{userId:e.senderProfile.id,toUserId:this.store.selectUserState().profile.id,requestSentAt:void 0}})}))}))}onLogout(){this.store.dispatch(Bue()),this.listeners.forEach(e=>e.detach()),this.listeners=new ie.List}}).\u0275fac=function(e){return new(e||t)(T(En),T(J),T(Ti),T(Ri),T(Xu),T(Bn),T(t0))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onAppReady",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogout",null),n=Qe([Wo(),ue("design:paramtypes",[En,J,Ti,Ri,Xu,Bn,t0])],n),n})();const Pu=ki({selectId:t=>t.id,sortComparer:(t,n)=>n.onlineStatus.lastSeen-t.onlineStatus.lastSeen}),VV={count:{accepted:0,pending:0,loadingState:{isLoaded:!1,isLoading:!1,isSynchronized:!0,error:void 0}},list:Pu.getInitialState({loadingState:{isLoaded:!1,isLoading:!1,isSynchronized:!0,error:void 0}}),friendRequests:Pu.getInitialState({loadingState:{isLoaded:!1,isLoading:!1,isSynchronized:!0,error:void 0}})},PXe=Sr(VV,de(Bue,t=>VV),de(sw,t=>VV),de(TXe,t=>({...t,count:{...t.count,loadingState:{...t.count.loadingState,isSynchronized:!1}},list:{...t.list,loadingState:{...t.list.loadingState,isSynchronized:!1}},friendRequests:{...t.friendRequests,loadingState:{...t.friendRequests.loadingState,isSynchronized:!1}}})),de(Gue,t=>({...t,count:{...t.count,loadingState:{...t.count.loadingState,isLoading:!0,error:void 0}}})),de(Vue,(t,n)=>({...t,count:{...n.count,loadingState:{...t.count.loadingState,isLoading:!1,isLoaded:!0,error:void 0,isSynchronized:!0}}})),de(zue,(t,n)=>({...t,count:{...t.count,loadingState:{...t.count.loadingState,isLoading:!1,error:n}}})),de(Nue,t=>({...t,list:{...t.list,loadingState:{...t.list.loadingState,isLoading:!0,error:void 0}}})),de(Fue,(t,n)=>({...t,list:{...Pu.upsertMany(n.friends,t.list),loadingState:{...t.list.loadingState,isLoading:!1,isLoaded:!0,error:void 0,isSynchronized:!0}}})),de(Uue,(t,n)=>({...t,list:{...t.list,loadingState:{...t.list.loadingState,isLoading:!1,error:n}}})),de(jue,t=>({...t,friendRequests:{...t.friendRequests,loadingState:{...t.list.loadingState,isLoading:!0,error:void 0}}})),de(Hue,(t,n)=>({...t,friendRequests:{...Pu.upsertMany(n.friends,t.friendRequests),loadingState:{...t.friendRequests.loadingState,isLoading:!1,isLoaded:!0,error:void 0,isSynchronized:!0}},count:{...t.count,pending:n.friends.length}})),de(que,(t,n)=>({...t,friendRequests:{...t.friendRequests,loadingState:{...t.friendRequests.loadingState,isLoading:!1,error:n}}})),de(GV,Yue,(t,n)=>({...t,list:Pu.upsertOne(n.user,t.list),friendRequests:Pu.removeOne(n.user.id,t.friendRequests),count:{...t.count,pending:t.count.pending-1,accepted:t.count.accepted+1}})),de(Zue,(t,n)=>{const o=!!t.friendRequests.entities[n.userId],e=!!t.list.entities[n.userId];return{...t,list:Pu.removeOne(n.userId,t.list),friendRequests:Pu.removeOne(n.userId,t.friendRequests),count:{...t.count,pending:o?t.count.pending-1:t.count.pending,accepted:e?t.count.accepted-1:t.count.accepted}}}),de(Kue,(t,n)=>{const o=!!t.friendRequests.entities[n.userId];return{...t,friendRequests:Pu.removeOne(n.userId,t.friendRequests),count:{...t.count,pending:o?t.count.pending-1:t.count.pending}}}),de(Que,(t,n)=>{const o=t.list.entities[n.userId];if(!o)return t;const e=Se({...o},i=>{i.onlineStatus.isOnline=n.isOnline,i.onlineStatus.lastSeen=n.timestamp});return{...t,list:Pu.updateOne({id:n.userId,changes:e},t.list)}}),de(Jue,(t,n)=>({...t,friendRequests:Pu.upsertOne(n.user,t.friendRequests),count:{...t.count,pending:t.count.pending+1}})),de(Wue,(t,n)=>({...t,list:Pu.updateOne({id:n.user.id,changes:{isCloseFriend:!0}},t.list)})),de($ue,(t,n)=>({...t,list:Pu.updateOne({id:n.user.id,changes:{isCloseFriend:!1}},t.list)})));function zV(t){return t.friends}const jV=We(zV,t=>t.list),HV=We(zV,t=>t.friendRequests),Xue=We(zV,t=>t.count),{selectAll:MXe,selectEntities:OXe}=Pu.getSelectors(jV),EXe=Pu.getSelectors(HV),ede=We(MXe,t=>t),tde=We(EXe.selectAll,t=>t);J.prototype.friends={selectFriendsListState:function AXe(){return this.selectSync(jV)}.bind(J.prototype),subscribeFriendsListState:function RXe(){return this.select(jV)}.bind(J.prototype),selectFriends:function kXe(){return this.selectSync(ede)}.bind(J.prototype),subscribeFriends:function LXe(){return this.select(ede)}.bind(J.prototype),selectFriendsRequestsListState:function DXe(){return this.selectSync(HV)}.bind(J.prototype),subscribeFriendsRequestsListState:function BXe(){return this.select(HV)}.bind(J.prototype),selectFriendsRequests:function NXe(){return this.selectSync(tde)}.bind(J.prototype),subscribeFriendsRequests:function FXe(){return this.select(tde)}.bind(J.prototype),selectFriendsCount:function UXe(){return this.selectSync(Xue)}.bind(J.prototype),subscribeFriendsCount:function GXe(){return this.select(Xue)}.bind(J.prototype),selectFriend:function VXe(t){return this.selectSync(We(OXe,(t,n)=>t[n]),t)}.bind(J.prototype)};const zXe=[$r.forFeature("friends",function IXe(t,n){return PXe(t,n)})];let jXe=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Tu))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[Tu],imports:[zXe]}),n})();var HXe=T5.MobileStoreError;let ef=(()=>{var t;class n extends Zce{constructor(e,i,r,s,a,c,u,h,b,w,R,G){super(u,h,e,b,G),this.friendsService=w,this.initialized=!1,this.loader=r,this.store=e,this.deltaDNAService=c,this.toastService=i,this.analyticsTrackingService=s,this.rootContainerService=R}static isHiddenShopLink(e){return-1!==e.indexOf(C5)&&-1!==e.indexOf("promo")}init(){this.initialized||(this.initialized=!0,this.setDeltaEventListener(),this.shopReceiver={profile:this.store.selectUserState().profile,gameInventory:this.store.selectUserState().gameInventory})}closeShop(){this.componentRef&&(this.componentRef.destroy(),this.componentRef=void 0),super.closeShop()}dispose(){this.deltaEvent&&this.deltaEvent.unsubscribe(),this.initialized=!1}openShop(e){this.loader.on(),Promise.all([this.load({useCache:!1}),this.friendsService.requestFriends()]).then(i=>{const r=i[0];this.loader.off();let s=e.value.replace("".concat(C5,"/"),""),a=r.products.find(c=>c.item.id===s);if(e.openedFrom){const c=new aa.DefaultEvent(Nn.Navigation,"promoStore",{label:e.openedFrom});this.analyticsTrackingService.sendEvent(c)}if(!a)return this.toastService.error("HIDDEN_SHOP.ALREADY_BOUGHT");this.componentRef=this.rootContainerService.createComponent(FV),super.openShop(),this.componentRef.instance.setHiddenShopPopup({item:a,shopOpenData:e,engagementID:e.engagementID,brazeEngagementId:e.brazeEngagementId})}).catch(i=>{this.loader.off(),console.warn("Hidden Shop load error: ",i),i instanceof HXe||this.toastService.error("ERRORS.CONNECTION_ERROR")})}isValidHiddenShopLink(e,i){return i===m5.DeltaDNALinkClicked&&-1!==e.indexOf(C5)&&-1!==e.indexOf("promo")}setDeltaEventListener(){this.deltaEvent=this.deltaDNAService.getDeltaEvent().pipe(bt(e=>this.isValidHiddenShopLink(e.value,e.name))).subscribe(e=>{this.openShop(e)})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Dt),T(ro),T(yi),T(Zce),T(sl),T(Qt),T(Uw),T(Lce),T(Tu),T(Ia),T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function tr(t){return bt((n,o)=>t<=o)}var o0,qXe=ve.EIcons;function WXe(t,n){if(1&t&&(p(0,"p",9),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se(yt(2,1,o.message.key,o.message.params))}}function $Xe(t,n){1&t&&(p(0,"p",14),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.ACTIVE_SUBSCRIPTION_ALERT")))}function KXe(t,n){1&t&&(p(0,"p",14),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.ACTIVE_SUBSCRIPTION_ANOTHER_DEVICE_ALERT")))}function ZXe(t,n){1&t&&(p(0,"p",14),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.PENDING_PAYMENT_COMPLETE_ALERT")))}function QXe(t,n){if(1&t&&(p(0,"container-component",12),U(1,$Xe,3,3,"p",13)(2,KXe,3,3,"p",13)(3,ZXe,3,3,"p",13),m()),2&t){const o=_(2);d(),l("ngIf",o.isSubscribedWithOtherAccount()),d(),l("ngIf",o.isSubscribedOnOtherDevice()),d(),l("ngIf",o.hasPendingSubscription())}}function YXe(t,n){if(1&t){const o=Ce();p(0,"offer-buy-item-list",10),Y("itemSelect",function(i){return oe(o),re(_().selectItem(i))}),U(1,QXe,4,3,"container-component",11),m()}if(2&t){const o=_();l("offers",o.offers)("user",o.currentUser)("activeSubscriptions",o.activeSubscriptions),d(),l("ngIf",o.isMobileApp()&&(o.isSubscribedWithOtherAccount()||o.isSubscribedOnOtherDevice()||o.hasPendingSubscription()))}}function JXe(t,n){1&t&&B(0,"loader-image",15),2&t&&l("transparentBG",!0)}const XXe=()=>({textKey:"ERRORS.STORE_LOAD_ERROR"}),eet=t=>[t];function tet(t,n){1&t&&B(0,"empty-content",16),2&t&&l("textArray",ne(2,eet,pt(1,XXe)))}function net(t,n){if(1&t){const o=Ce();p(0,"div",17)(1,"p",18),Y("click",function(){return oe(o),re(_().manageSubscriptions())}),H(2),V(3,"translate"),m()()}2&t&&(d(2),se($(3,1,"SHOP.MANAGE_SUBSCRIPTIONS")))}const iet=t=>({name:t});function oet(t,n){if(1&t&&(p(0,"button-icon-text",19),H(1),V(2,"uppercase"),V(3,"translate"),m()),2&t){const o=_(),e=Kt(9);l("icon",ne(9,iet,o.icons.INFO_ICON))("tooltipTemplate",e)("bclass","item_required-show-offer-benefits__button")("tooltipMaxDimensions",o.tooltipStyle),d(),se($(2,5,$(3,7,"BUTTON.VIEW_ALL_BENEFITS")))}}function ret(t,n){1&t&&(p(0,"p",24),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.SUBSCRIPTIONS_DESCRIPTION_TEXT_ANDROID")))}function set(t,n){1&t&&(p(0,"p",24),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.SUBSCRIPTIONS_DESCRIPTION_TEXT_IOS")))}function aet(t,n){if(1&t){const o=Ce();p(0,"div",20),U(1,ret,3,3,"p",21)(2,set,3,3,"p",21),p(3,"p",22)(4,"span",23),Y("click",function(){return oe(o),re(_().openExternalUrl("/terms-of-use"))}),H(5),V(6,"translate"),m(),H(7," | "),p(8,"span",23),Y("click",function(){return oe(o),re(_().openExternalUrl("/privacy-policy"))}),H(9),V(10,"translate"),m()()()}if(2&t){const o=_();d(),l("ngIf",o.getPlatform()===o.appPlatform.Android),d(),l("ngIf",o.getPlatform()===o.appPlatform.Ios),d(3),ze("",$(6,4,"LOGIN_COMPONENT.TERMS_OF_USE")," "),d(4),se($(10,6,"LOGIN_COMPONENT.PRIVACY_POLICY"))}}function cet(t,n){if(1&t&&B(0,"shop-text-list",25),2&t){const o=_();l("title","VIP_BENEFITS_TITLE")("items",o.itemBenefits)("simpleStyling",!0)("modifierLocalization","VIP_BENEFITS.")}}let r0=((o0=class{constructor(n,o,e,i,r,s,a,c){this.app=s,this.clientConfig=a,this.appLanguage=c,this.offers=[],this.itemBenefits=[],this.offerTypes=Bc,this.appPlatform=Ut,this.icons=qXe,this.activeSubscriptions=[],this.close$=new sn,this.subscriptions=new ie.List,this.destroy=new sn,this.translate=n,this.shopService=o,this.store=e,this.cdRef=i,this.toasterService=r}ngOnInit(){var n=this;return f(function*(){if(n.currentUser=n.store.selectSimpleProfile(),n.addSubscriptions(),n.tooltipStyle={width:90,height:80,offsetHeight:0,offsetWidth:0},n.typeOfOffer===Bc.Vip)try{yield Promise.all([n.shopService.getDeviceAccountActiveSubscriptions()]),n.itemBenefits=n.getBenefits()}catch(o){o instanceof lt.NetworkError?n.toasterService.error("ERRORS.CONNECTION_ERROR"):n.toasterService.warn("ERRORS.SOMETHING_WRONG"),n.close$.next(),console.warn(o),n.cdRef.detectChanges()}})()}ngOnDestroy(){this.subscriptions.forEach(n=>n.unsubscribe()),this.subscriptions=new ie.List,this.close$.next(),this.close$.complete(),this.destroy.next(),this.destroy.complete()}openExternalUrl(n){this.app.openExternalUrl("https://".concat(this.clientConfig.getConfig().platform.staticPagesDomain).concat(n,"/").concat(this.appLanguage.getAppLanguage()))}selectItem(n){this.shopService.openItemPopup({item:n.item,receiverProfile:this.currentUser,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(o=>console.warn(o)),this.close$.next()}isMobileApp(){return this.app.isMobileApp()}hasPendingSubscription(){var n;return Qs.hasPendingSubscriptions(this.activeSubscriptions,[Fe.TG.Vip],null===(n=this.currentUser.vip.custom)||void 0===n?void 0:n.subscription)}isSubscribedOnOtherDevice(){return this.currentUser.vip.isActiveSubscription()&&this.currentUser.hasTierOrHigher(Fi.Full)&&!this.activeSubscriptions.find(n=>n.item.type===Fe.TG.Vip)}isSubscribedWithOtherAccount(){return!this.hasPendingSubscription()&&!this.currentUser.vip.isActiveSubscription()&&!!this.activeSubscriptions.find(n=>n.item.type===Fe.TG.Vip)}manageSubscriptions(){this.app.getMobileAppService().messages().open(new Pb(wi.ENativeScreen.ManageSubscriptions))}hasSubscriptionsItems(){return this.offers.some(n=>Qs.getInAppType(n.item.durability)===Ku.Subscription)}getPlatform(){return this.app.getPlatform()}addSubscriptions(){var n=this;const o=this.store.shop.activeDeviceSubscriptions.subscribeActiveDeviceSubscriptions();o.pipe(wn(this.destroy)).subscribe(function(){var r=f(function*(s){n.activeSubscriptions=s.items;try{yield n.getVipOffers()}catch(a){a instanceof lt.NetworkError?n.toasterService.error("ERRORS.CONNECTION_ERROR"):n.toasterService.warn("ERRORS.SOMETHING_WRONG"),n.error=!0,console.warn(a)}finally{n.cdRef.detectChanges()}});return function(s){return r.apply(this,arguments)}}());const e=this.store.subscribeVipState();e.pipe(tr(1),wn(this.destroy),ws((r,s)=>{var a,c;return(null==r?void 0:r.isActiveSubscription())===(null==s?void 0:s.isActiveSubscription())&&(null==r||null===(a=r.custom)||void 0===a||null===(a=a.subscription)||void 0===a?void 0:a.item)===(null==s||null===(c=s.custom)||void 0===c||null===(c=c.subscription)||void 0===c?void 0:c.item)})).subscribe(r=>{r.hasTierOrHigher(Fi.Full)&&this.close$.next(),this.shopService.getDeviceAccountActiveSubscriptions()});const i=wp(this.store.shop.iap.subscribeState(),this.store.shop.activeDeviceSubscriptions.subscribeActiveDeviceSubscriptions());i.pipe(wn(this.destroy)).subscribe(([r,s])=>{this.isLoaded=!r.loadingState.isLoading&&!s.loadingState.isLoading}),Ju(o.pipe(tr(1)),e.pipe(tr(1)),i.pipe(tr(1))).pipe(wn(this.destroy)).subscribe(()=>this.cdRef.detectChanges())}getVipOffers(){var n=this;return f(function*(){const e=(yield n.shopService.load()).products.filter(r=>r.item.type===Fe.TG.Vip&&!r.item.giftOnly);let i=[];if(!n.isMobileApp()||n.isSubscribedWithOtherAccount()||n.isSubscribedOnOtherDevice())i=e.filter(r=>Qs.getInAppType(r.item.durability)===Ku.Consumable).reverse();else{const r=Qs.getValidSubscriptionItems(e,n.app.getPlatform()).reverse();i=r.length?r:e.filter(s=>Qs.getInAppType(s.item.durability)===Ku.Consumable).reverse()}n.offers=i,n.offers.forEach(r=>{n.shopService.getCoinShardsAmount(r.item.id)})})()}getBenefits(){return Object.keys(this.translate.instant("VIP_BENEFITS"))}onAppResume(){0===this.store.payments.selectCurrentTransactions().length&&!this.store.payments.selectIsCompletingUnfinishedTransactions()&&this.shopService.getDeviceAccountActiveSubscriptions()}}).\u0275fac=function(n){return new(n||o0)(g(pi),g(Ko),g(J),g(Re),g(Dt),g(Qt),g(Zt),g(Ma))},o0.\u0275cmp=pe({type:o0,selectors:[["item-store-offers"]],inputs:{typeOfOffer:"typeOfOffer",message:"message"},features:[mn([{provide:Ko,useExisting:Gh}])],decls:10,vars:7,consts:[["data-cy","vipOffersPopup",1,"item_required-container"],["class","item_required-message",4,"ngIf"],["class","item_required-container-items",3,"offers","user","activeSubscriptions","itemSelect",4,"ngIf"],[3,"transparentBG",4,"ngIf"],[3,"textArray",4,"ngIf"],["class","item_required-vip__container--vip-subscriptions-top-container",4,"ngIf"],["class","item_required-show-offer-benefits","tooltip","",3,"icon","tooltipTemplate","bclass","tooltipMaxDimensions",4,"ngIf"],["class","vip--items__info",4,"ngIf"],["tooltipTmplTag",""],[1,"item_required-message"],[1,"item_required-container-items",3,"offers","user","activeSubscriptions","itemSelect"],["class","item_required-vip--list__hint",4,"ngIf"],[1,"item_required-vip--list__hint"],["class","item_required-vip--list__hint--text",4,"ngIf"],[1,"item_required-vip--list__hint--text"],[3,"transparentBG"],[3,"textArray"],[1,"item_required-vip__container--vip-subscriptions-top-container"],[1,"item_required-vip__container--vip-subscriptions--text-link",3,"click"],["tooltip","",1,"item_required-show-offer-benefits",3,"icon","tooltipTemplate","bclass","tooltipMaxDimensions"],[1,"vip--items__info"],["class","item-store-offers__container--vip-subscriptions--text-bottom",4,"ngIf"],[1,"item-store-offers__container--vip-subscriptions--text-bottom--links"],[1,"item-store-offers__container--vip-subscriptions--text-link",3,"click"],[1,"item-store-offers__container--vip-subscriptions--text-bottom"],[3,"title","items","simpleStyling","modifierLocalization"]],template:function(n,o){1&n&&(p(0,"div",0),U(1,WXe,3,4,"p",1)(2,YXe,2,4,"offer-buy-item-list",2)(3,JXe,1,1,"loader-image",3)(4,tet,1,4,"empty-content",4)(5,net,4,3,"div",5)(6,oet,4,11,"button-icon-text",6)(7,aet,11,8,"div",7),m(),U(8,cet,1,4,"ng-template",null,8,ft)),2&n&&(d(),l("ngIf",o.offers),d(),l("ngIf",o.isLoaded&&o.offers),d(),l("ngIf",!o.isLoaded),d(),l("ngIf",o.error),d(),l("ngIf",o.isMobileApp()&&o.isLoaded&&o.hasSubscriptionsItems()),d(),l("ngIf",o.offers),d(),l("ngIf",o.typeOfOffer===o.offerTypes.Vip&&o.isLoaded&&o.isMobileApp()&&o.hasSubscriptionsItems()))},styles:[".item_required-container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:calc(100% - 6rem)}.item_required-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;text-align:center}.item_required-container-items[_ngcontent-%COMP%]{width:100%}.item_required-show-offer-benefits[_ngcontent-%COMP%]{margin-bottom:2rem;text-decoration:underline}.item_required-message[_ngcontent-%COMP%]{margin-top:2rem;max-width:80%;display:flex;justify-content:center;margin-left:auto;margin-right:auto}.item-store-offers__container--vip-subscriptions--text-bottom[_ngcontent-%COMP%]{text-align:center;padding:0 2rem 2rem}.item-store-offers__container--vip-subscriptions--text-bottom--links[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),o0);Qe([EA(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],r0.prototype,"onAppResume",null),r0=Qe([Wo(),ue("design:paramtypes",[pi,Object,J,Re,Dt,Qt,Zt,Ma])],r0);let Sc=(()=>{var t;class n{constructor(e,i,r,s,a){this.popupService=e,this.shopService=i,this.store=r,this.hiddenShopService=s,this.toaster=a}offerCurrency(e){var i=this;return f(function*(){try{const r=yield i.hiddenShopService.load();let a,s=r.products.filter(h=>h.group===wt.BuyInDeals&&h.item.type===e.itemType).sort((h,b)=>h.item.amount-b.item.amount);const c=s[s.length-1].item;a=c.amount>=e.targetValue?s.filter(h=>h.item.amount>=e.targetValue)[0].item:c;const u={item:a,receiverProfile:i.store.selectSimpleProfile(),store:r,options:{alwaysShowPreview:!0,showNavigateToShopButton:!0,extraNavigateToShopButtonExtraAction:e.action,description:e.description}};yield i.shopService.openItemPopup(u).catch(h=>console.warn(h))}catch(r){i.toaster.warn("ERRORS.SOMETHING_WRONG"),console.warn(r)}})()}offerVip(e){return this.popupService.dynamicPopupContent({component:r0,popupOptions:{type:Bs.Offer,componentData:{typeOfOffer:Bc.Vip,message:{key:e.key,params:e.params}},typeOfOffer:Bc.Vip}})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Cn),T(Jm),T(Jo),T(ef),T(Dt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var uet=et.Permissions.RequirementNotMeet;let Pi=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.permissions=e,this.navigation=i,this.popup=r,this.store=s,this.toaster=a,this.offerService=c,this.attachListeners()}getModuleConfig(e){return this.permissions.getModuleConfig(e)}getModuleActionConfig(e,i){return this.permissions.getModuleActionConfig(e,i)}getChipBalanceRequirement(e){return this.permissions.getChipBalanceRequirement(e)}getGemBalanceRequirement(e){return this.permissions.getGemBalanceRequirement(e)}getMinLevelRequirement(e,i){return this.permissions.getMinLevelRequirement(e,i)}getModulePermission(e,i){const r=this.permissions.getModulePermission(e);return this.handleOptions(r,i),r}getActionPermission(e,i,r){const s=this.permissions.getActionPermission(e,i);return this.handleOptions(s,r),s}getRoomPermission(e,i){const r=this.permissions.getRoomPermission(e);return this.handleOptions(r,i),r}getTilePermission(e,i){const r=this.permissions.getTilePermission(e);return this.handleOptions(r,i),r}getClubActionPermission(e,i,r){const s=this.permissions.getClubActionPermission(e,i);return this.handleOptions(s,r),s}showFailedRequirementsToUser(e){if(e instanceof uet)this.showRequirementNotMeet(e);else switch(e.type){case xh.Module:this.showFailedModuleRequirements(e);break;case xh.Action:this.showFailedActionRequirements(e);break;case xh.Room:this.showFailedRoomRequirements(e);break;case xh.Tile:this.showFailedTileRequirements(e);break;case xh.Club:this.showFailedClubRequirements(e)}}handleOptions(e,i){i&&i.showFailedRequirements&&this.showFailedRequirementsToUser(e)}showFailedModuleRequirements(e){e.isEnabled||this.showGenericPopup()}showFailedActionRequirements(e){e.isEnabled?e.roleRequirement.isFulfilled?e.minLevelRequirement.isFulfilled?e.vipRequirement.isFulfilled||this.showVipPopup():this.showLevelPopup(e.config.requirements.level):this.showLoginPopup():this.showGenericPopup()}showFailedRoomRequirements(e){e.minLevelRequirement.isFulfilled?e.maxLevelRequirement.isFulfilled?e.chipsBalanceRequirement.isFulfilled?e.vipRequirement.isFulfilled?e.isPermitted||this.showGenericPopup():this.showVipPopup():this.offerService.offerCurrency({targetValue:e.settings.transactions.bet,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}}):this.popupId=this.popup.show("POPUP.ROOM_MAX_LEVEL_NOT_MET",[e.settings.requirements.maxLevel]):this.popupId=this.popup.show("POPUP.ROOM_MIN_LEVEL_NOT_MET",[e.settings.requirements.minLevel])}showFailedTileRequirements(e){if(e.isEnabled){if(!e.roleRequirement.isFulfilled){if(this.store.selectUserState().roles.find(i=>i.name===kr.GUESTUSER))return this.showLoginPopup();if(this.store.selectUserState().roles.find(i=>i.name===kr.REGISTEREDUSERNOTVERIFIED))return this.toaster.warn("POPUP.DISABLED_FROM_CONFIG")}e.minLevelRequirement.isFulfilled?e.chipsBalanceRequirement.isFulfilled?e.vipRequirement.isFulfilled||this.showVipPopup():this.offerService.offerCurrency({targetValue:e.settings.transactions.bet,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}}):e.settings?this.popupId=this.popup.show("POPUP.ROOM_MIN_LEVEL_NOT_MET",[e.minLevelRequirement.requiredLevel]):this.showLevelPopup(e.minLevelRequirement.requiredLevel)}else this.showGenericPopup()}showFailedClubRequirements(e){if(e.isEnabled)if(e.roleRequirement.isFulfilled)e.minLevelRequirement.isFulfilled?e.vipRequirement.isFulfilled||this.showVipPopup():this.popupId=this.popup.show("POPUP.ROOM_MIN_LEVEL_NOT_MET",[e.minLevelRequirement.requiredLevel]);else{const i=e.config.roles.find(r=>Om.isClubMemberRole(r));this.showClubRolePopup(i)}else this.showGenericPopup()}showRequirementNotMeet(e){if("number"==typeof e.requirement)this.showLevelPopup(e.requirement);else if(e.requirement===Nc.MinLevel||e.requirement===Nc.MaxLevel)this.showLevelPopup(e.requirementAmount);else switch(e.requirement){case oA.Vip:this.showVipPopup();break;case oA.Wallet:this.offerService.offerCurrency({targetValue:e.requirementAmount,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}});break;default:this.showGenericPopup()}}attachListeners(){this.routeSubscription=this.navigation.events.pipe(bt(e=>e instanceof as)).subscribe(()=>this.hidePopup())}hidePopup(){this.popup.hide(this.popupId)}showLoginPopup(){this.popupId=this.popup.decision({buttons:{firstOption:{action:()=>this.navigation.navigate(["/home"]),buttonTextOptions:{translationKey:"LOGIN"}},secondOption:{action:()=>this.navigation.navigate(["/home"]),buttonTextOptions:{translationKey:"BUTTON.REGISTER"}}},textParams:{translationKey:"POPUP.RESTRICT_GUEST_MESSAGE"}})}showVipPopup(){this.popupId=this.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]})}showLevelPopup(e){this.popupId=this.popup.show("POPUP.RESTRICT_LEVEL_MESSAGE",[e])}showGenericPopup(){this.popupId=this.popup.show("POPUP.DISABLED_FROM_CONFIG")}showClubRolePopup(e){this.toaster.error("CLUBS.CLUB_ROLE_ACTION_OUTDATED")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ti),T(Yt),T(Cn),T(J),T(Dt),T(Sc))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:ece}),n})();var yk;!function(t){let n;var e;let o;(e=n=t.ERateButtonAction||(t.ERateButtonAction={}))[e.Rate="rate"]="Rate",e[e.SendSuggestion="sendSuggestion"]="SendSuggestion",function(e){e.GooglePlay="GooglePlay",e.AppStore="AppStore",e.WindowsStore="WinStore"}(o=t.EStoreName||(t.EStoreName={}))}(yk||(yk={}));var qV=yk.EStoreName,Sk=yk.ERateButtonAction,det=ve.EButtonModifier;const pet=t=>({selected:t});function het(t,n){if(1&t){const o=Ce();p(0,"icon-component",12),Y("click",function(){const i=oe(o),r=i.index,s=i.$implicit;return re(_().onStarsClick(r,s.stars))}),m()}if(2&t){const o=n.$implicit;l("icon",_().EIcons.STAR)("ngClass",ne(2,pet,o.selected))}}function met(t,n){if(1&t){const o=Ce();p(0,"button-text",13),Y("onClick",function(){return oe(o),re(_().rateButtonHandler())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),se($(2,2,o.rateButton.text))}}let nde=(()=>{var t;class n{constructor(e,i,r){this.cdr=e,this.rateService=i,this.appService=r,this.popupTitleTypes=li,this.buttonModifier=det,this.EIcons=ve.EIcons,this.onClose=new sn,this.rateButton={show:!1,text:"",action:null},this.platformStores=[{platform:Ut.Android,store:qV.GooglePlay},{platform:Ut.Ios,store:qV.AppStore},{platform:Ut.Windows,store:qV.WindowsStore}],this.stars=[{stars:5,selected:!1},{stars:4,selected:!1},{stars:3,selected:!1},{stars:2,selected:!1},{stars:1,selected:!1}],this.manifestGame=Lt.CONFIG.platform.name,this.storeName=null,this.popupText={text:"RATE_ME.RATE_US",params:[this.manifestGame]},this.cdr=e,e.detach()}ngOnInit(){this.getStore()}ngOnDestroy(){this.hide(),this.rateButton={show:!1,text:"",action:null}}getStore(){let e=this.appService.getPlatform();this.platformStores.forEach(i=>{i.platform===e&&(this.storeName=i.store)}),this.cdr.detectChanges()}onStarsClick(e,i){for(let r=0;r<this.stars.length;r++)this.stars[r].selected=!(e>r);this.popupText=i===this.stars.length?{text:"RATE_ME.RATED_GOOD",params:this.storeName?[this.storeName]:null}:{text:"RATE_ME.RATED_NOT_GOOD",params:[this.manifestGame]},this.rateButton={show:!0,text:i===this.stars.length?"RATE_ME.RATE_AT_STORE":"RATE_ME.SEND_SUGGESTION",action:i===this.stars.length?Sk.Rate:Sk.SendSuggestion},this.cdr.detectChanges()}onRateClicked(){this.rateService.rate()}onSendSuggestionClicked(){this.rateService.sendSuggestion()}rateButtonHandler(){switch(this.rateButton.action){case Sk.Rate:this.onRateClicked();break;case Sk.SendSuggestion:this.onSendSuggestionClicked()}}hide(){var e;null===(e=this.onClose)||void 0===e||e.next()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(wk),g(Qt))},t.\u0275cmp=pe({type:t,selectors:[["rate"]],decls:14,vars:9,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","buttonCloseClicked"],[1,"rate-popup__container--content"],[1,"rate-popup__container--content-inner"],[1,"rate-popup__container--content-text"],[1,"rate-popup__container--content-text-paragraph"],[1,"rate-popup__container--buttons"],[1,"rate-popup__container--buttons-inner"],[1,"rate-popup__container--stars"],["class","rate-popup__star",3,"icon","ngClass","click",4,"ngFor","ngForOf"],[1,"rate-popup__container--button"],["class","rate-popup__button--rate",3,"buttonModifier","onClick",4,"ngIf"],[1,"rate-popup__star",3,"icon","ngClass","click"],[1,"rate-popup__button--rate",3,"buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.hide()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.hide()}),m(),p(2,"div",2)(3,"div",3)(4,"div",4)(5,"p",5),H(6),V(7,"translate"),m()()()(),p(8,"div",6)(9,"div",7)(10,"div",8),U(11,het,1,4,"icon-component",9),m()()(),p(12,"div",10),U(13,met,3,4,"button-text",11),m()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Logo),d(5),se(yt(7,6,i.popupText.text,i.popupText.params)),d(5),l("ngForOf",i.stars),d(2),l("ngIf",i.rateButton.show))},dependencies:[Xe,Mt,Ne,Dn,pn,Ji,Wi,qe],styles:[".rate-popup__container--content[_ngcontent-%COMP%]{order:2;width:calc(100% - 2rem);height:40%;margin-left:1rem;margin-right:1rem;display:flex;justify-content:center;align-items:center}.rate-popup__container--content[_ngcontent-%COMP%]   .rate-popup__container--content-inner[_ngcontent-%COMP%]{width:100%;height:100%;max-width:45rem;max-height:15rem;display:flex;flex-flow:column nowrap}.rate-popup__container--content[_ngcontent-%COMP%]   .rate-popup__container--content-inner[_ngcontent-%COMP%]   .rate-popup__container--content-text[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:flex-end;align-items:baseline;flex-flow:column nowrap}.rate-popup__container--buttons[_ngcontent-%COMP%]{order:3;width:100%;height:20%;display:flex;justify-content:center;align-items:center;padding:.5rem 1rem}.rate-popup__container--buttons[_ngcontent-%COMP%]   .rate-popup__container--buttons-inner[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.rate-popup__container--buttons[_ngcontent-%COMP%]   .rate-popup__container--buttons-inner[_ngcontent-%COMP%]   .rate-popup__container--stars[_ngcontent-%COMP%]{margin:0 auto;display:flex;flex-flow:row wrap}.rate-popup__star[_ngcontent-%COMP%]{cursor:pointer}.rate-popup__container--button[_ngcontent-%COMP%]{order:4;width:100%;height:20%;display:flex;justify-content:center;align-items:center;padding:.5rem 1rem}@media screen and (max-width: 768px){.rate-popup__container--button[_ngcontent-%COMP%]{height:15%}}.rate-popup__container--content-text-paragraph[_ngcontent-%COMP%]{width:100%;text-align:center;margin-bottom:1rem}.rate-popup__button--rate[_ngcontent-%COMP%]{min-width:12rem}"],changeDetection:0}),n})();var fet=nt.EPermissionModule;let wk=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.overlayManager=c,this.rootContainerService=u,this.onGameWon=h=>{h.roomModel.settings.type!==Jt.RoomType.BlitzTournament&&this.setRequirementsMet(!0)},this.onGameLost=h=>{this.setRequirementsMet(!1)},this.onTournamentWon=()=>{this.setRequirementsMet(!0)},this.clientPermissionsService=a,this.app=e,this.appStorage=i,this.matchmakingEvents=s,this.requirementsMet=!1,this.navigation=r,this.inited=!1,this.listeners=new ie.List}init(){!0!==this.inited&&this.detectRateStatus()}rate(){!0===this.app.isMobileApp()&&this.app.getMobileAppService().messages().rate(),this.closeRatePopup()}sendSuggestion(){this.app.openExternalUrl("mailto:".concat(Lt.CONFIG.platform.support)),this.closeRatePopup()}closeRatePopup(){this.detachListeners(),this.appStorage.setItem("rated",{rated:!0,version:this.app.getMobileAppService().getVersion()})}showRatePopup(){const e=new Lw;let i;e.execute=()=>{this.canShowRatePopup()?(i=this.rootContainerService.createComponent(nde),i.instance.onClose.subscribe(()=>{this.closeRatePopup(),i.destroy(),e.complete()})):e.complete()},e.onDestroy=()=>{i.destroy(),e.complete()},this.overlayManager.queueItem(e)}detectRateStatus(){if(!0===this.appStorage.getItem("rateDialogShowOnLobby")&&this.showRatePopup(),!0===this.app.isMobileApp()&&null==this.app.getDevicePlatform()&&this.clientPermissionsService.getModulePermission(fet.Rate).isEnabled){const e=this.appStorage.getItem("rated",null);e&&e.rated&&e.version===this.app.getMobileAppService().getVersion()||this.attachListeners()}this.inited=!0}attachListeners(){this.listeners.add(new ie.EventListener(this.matchmakingEvents,Db.GameWon,this.onGameWon)),this.listeners.add(new ie.EventListener(this.matchmakingEvents,Db.GameLost,this.onGameLost)),this.listeners.add(new ie.EventListener(this.matchmakingEvents,Xae.TournamentWon,this.onTournamentWon)),this.routerSubscription=this.navigation.events.pipe(bt(e=>e instanceof as)).subscribe(e=>{this.canShowRatePopup()&&this.getRequirementsMet()&&this.showRatePopup()})}setRequirementsMet(e){this.requirementsMet=e}getRequirementsMet(){return this.requirementsMet}detachListeners(){this.routerSubscription&&this.routerSubscription.unsubscribe(),this.listeners.forEach(e=>e.detach())}canShowRatePopup(){return this.navigation.getOutletUrl()!==Xs.gameRoute}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(Ci),T(Yt),T(nd),T(Pi),T(Bh),T(Ia))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var WV=function(t){return t.featureKey="bonuses",t}(WV||{}),Tk=function(t){return t.RewardedGame="rewardedGame",t.RewardedVideo="rewardedVideo",t.RewardedVideoAfterGame="rewardedVideoAfterGame",t.RewardedVideoDeltaBanner="rewardedVideoDeltaBanner",t}(Tk||{});let $V=(()=>{var t;class n{constructor(e,i){this.http=e,this.cs=i}requestDailyBonus(){return this.http.get("bonus/daily").toPromise().then(e=>e.body)}claimDailyBonus(){return this.http.post("bonus/daily/claim").toPromise().then(e=>e.body)}claimCashbackBonus(){return this.http.post("bonus/cashback/claim").toPromise().then(e=>e.body)}claimAdventCalendarBonus(){return this.http.post("bonus/advent-calendar/claim").toPromise().then(e=>e.body)}requestRewardedGames(){return this.http.get("rewarded/games").toPromise().then(e=>e.body)}claimRewardedGameBonus(e){let i;switch(e.source){case Tk.RewardedGame:i="rewarded/games/claim";break;case Tk.RewardedVideo:i="rewarded/video/claim";break;default:i="rewarded/video/claim/".concat(e.source)}return this.http.post(i,{type:e.type,containerId:e.containerId,isRewardedVideoWatched:e.isRewardedVideoWatched}).toPromise().then(s=>s.body)}unlockRewardedGameBonus(e){return this.http.post("rewarded/games/unlock",{type:e}).toPromise().then(i=>i.body)}requestBonuses(){return this.http.get("bonus/bonuses").toPromise().then(e=>e.body)}requestAdventCalendarBonus(){return this.http.get("bonus/advent-calendar").toPromise().then(e=>e.body)}requestRewardedVideoBonus(e){return this.http.get("rewarded/video/".concat(e)).toPromise().then(i=>i.body)}claimRewardedVideoBonus(e){return this.http.post("rewarded/video/claim/".concat(e)).toPromise().then(i=>i.body)}onBonusesUpdate(e){return new ie.EventListener(this.cs,Ns.BonusesUpdated,e)}onConnectionRestored(e){return this.cs.onReconnect(e)}claimLevelUpRewards(){return this.http.post("bonus/level-up/claim").toPromise().then(e=>e.body)}getXpTable(){return this.http.get("bonus/xpTable").toPromise().then(e=>e.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Pk;let mC=Pk=class{constructor(n){this.actions={claim:{inProgress:!1}},this.loadingState={isLoaded:!0,isLoading:!1},wr(this,n)}calcTimeToNextBonus(){return Pk.calcTimeToNextBonus(this.requirements.timeToNextBonus)}calcNextBonusAvailableAt(){return Pk.calcNextBonusAvailableAt(this.requirements.timeToNextBonus)}static calcTimeToNextBonus(n){return Math.max(n-Bn.instance.getServerTimeS())}static calcNextBonusAvailableAt(n){return n}};Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],mC.prototype,"calcTimeToNextBonus",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],mC.prototype,"calcNextBonusAvailableAt",null),mC=Pk=Qe([ko(),ue("design:paramtypes",[Object])],mC);var Il=function(t){return t.ResetBonusesState="[Bonuses] Reset bonuses state",t.InitBonusesState="[Bonuses] Init bonuses state",t.UpdateBonusesState="[Bonuses] Update bonuses state",t.GetBonuses="[Bonuses] Get bonuses",t.GetDailyBonus="[Bonuses] Get daily bonus",t.GetAdventCalendarBonus="[Bonuses] Get advent calendar bonus",t.GetRewardedVideoBonus="[Bonuses] Get rewarded video bonus",t.GetXpTable="[Bonuses] Get xp table",t.ClaimDailyBonus="[Bonuses] Claim daily bonus",t.ClaimAdventCalendarBonus="[Bonuses] Claim advent calendar bonus",t.ClaimCashbackBonus="[Bonuses] Claim cashback bonus",t.ClaimRewardedVideoBonus="[Bonuses] Claim rewarded video bonus",t.ClaimLevelUpRewards="[Bonuses] Claim level up rewards",t.GetRewardedGames="[Bonuses] Get rewarded games",t.ClaimRewardedGameBonus="[Bonuses] Claim rewarded game bonus",t.UnlockRewardedGame="[Bonuses] Unlock rewarded game",t}(Il||{});const ide=he(Il.ResetBonusesState),Ik=he(Il.InitBonusesState,{_as:"props",_p:void 0}),Mk=he(Il.UpdateBonusesState,{_as:"props",_p:void 0}),[ode,hmn,rde]=ya(Il.GetBonuses),[sde,ade,cde]=ya(Il.GetDailyBonus),[lde,KV,ZV]=ya(Il.ClaimDailyBonus),[ude,dde,pde]=ya(Il.GetAdventCalendarBonus),[hde,QV,mde]=ya(Il.ClaimAdventCalendarBonus),[_et,fde,vet]=ya(Il.GetRewardedVideoBonus),[bet,gde,Cet]=ya(Il.ClaimRewardedVideoBonus),[_de,vde,yet]=ya(Il.ClaimCashbackBonus),[bde,Cde,yde]=ya(Il.GetRewardedGames),[Sde,YV,wde]=ya(Il.ClaimRewardedGameBonus),[Tde,Pde,Ide]=ya(Il.UnlockRewardedGame),[Mde,Ode,Ede]=ya(Il.ClaimLevelUpRewards),[xde,Ade,Rde]=ya(Il.GetXpTable);var Ok;let fC=Ok=class{constructor(n){this.actions={claim:{inProgress:!1},unlock:{inProgress:!1}},wr(this,n)}calcTimeToNextBonus(){return Ok.calcTimeToNextBonus(this.requirements.timeToNextBonus)}calcNextBonusAvailableAt(){return Ok.calcNextBonusAvailableAt(this.requirements.timeToNextBonus)}static calcTimeToNextBonus(n){return Math.max(n-Bn.instance.getServerTimeS(),0)}static calcNextBonusAvailableAt(n){return n}};var Ek;Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],fC.prototype,"calcTimeToNextBonus",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],fC.prototype,"calcNextBonusAvailableAt",null),fC=Ok=Qe([ko(),ue("design:paramtypes",[Object])],fC);let BI=Ek=class{constructor(n){this.actions={claim:{inProgress:!1}},wr(this,n)}calcTimeToNextBonus(){return Ek.calcTimeToNextBonus(this.timeInterval)}calcNextBonusAvailableAt(){return Ek.calcNextBonusAvailableAt(this.timeInterval)}static calcTimeToNextBonus(n){return Math.max(n-Bn.instance.getServerTimeS(),0)}static calcNextBonusAvailableAt(n){return n}};var xk;Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],BI.prototype,"calcTimeToNextBonus",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],BI.prototype,"calcNextBonusAvailableAt",null),BI=Ek=Qe([ko(),ue("design:paramtypes",[Object])],BI);let NI=xk=class{constructor(n){this.actions={claim:{inProgress:!1}},this.loadingState={isLoaded:!0,isLoading:!1},wr(this,n)}calcTimeToNextBonus(){return xk.calcTimeToNextBonus(this.timeInterval)}calcNextBonusAvailableAt(){return xk.calcNextBonusAvailableAt(this.timeInterval)}static calcTimeToNextBonus(n){return Math.max(n-Bn.instance.getServerTimeS())}static calcNextBonusAvailableAt(n){return n}};var Ak;Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],NI.prototype,"calcTimeToNextBonus",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],NI.prototype,"calcNextBonusAvailableAt",null),NI=xk=Qe([ko(),ue("design:paramtypes",[Object])],NI);let tf=Ak=class{constructor(n){wr(this,n)}static mapVideoTypeToBonus(n){switch(n){case Ba.RewardedVideo:return"video";case Ba.RewardedVideoShopChips:return"videoShopChips";case Ba.RewardedVideoShopGems:return"videoShopGems";case Ba.RewardedVideoDeltaBanner:return"videoDeltaBanner";default:return}}calcTimeToNextBonus(){return Ak.calcTimeToNextBonus(this.requirements.timeToNextBonus)}calcNextBonusAvailableAt(){return Ak.calcNextBonusAvailableAt(this.requirements.timeToNextBonus)}static calcTimeToNextBonus(n){return Math.max(n-Bn.instance.getServerTimeS(),0)}static calcNextBonusAvailableAt(n){return n}};Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],tf.prototype,"calcTimeToNextBonus",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],tf.prototype,"calcNextBonusAvailableAt",null),tf=Ak=Qe([ko(),ue("design:paramtypes",[Object])],tf);let wet=(()=>{let t=class extends mC{isFull(){return this.custom.accumulatedAmount>=this.reward.current.chips}hasActiveTimer(){return this.isActive&&(this.custom.lastCollected>0||this.isFull())}getDecayLevel(){if(!this.isFull()||!this.custom.tierLevelChangeAt||!this.custom.nextBonusAt)return;return Bn.instance.getServerTimeS()<this.custom.tierLevelChangeAt+1?0:1}calcTimeToNextDecay(){const o=Bn.instance.getServerTimeS(),e=[this.custom.tierLevelChangeAt+1,this.custom.nextBonusAt+1].filter(i=>i>o);if(e.length)return Math.min(...e)-Bn.instance.getServerTimeS()}calcTimeToNextStateUpdate(){if(this.hasActiveTimer())return this.custom.lastCollected>0?this.calcTimeToNextBonus()+5:this.calcTimeToNextDecay()}getDecayNotificationAt(){return this.custom.timers.decayNotificationAt}isInResetCooldownInterval(){return this.custom.timers.purchaseCooldownStartsAt&&Bn.instance.getServerTimeS()>=this.custom.timers.purchaseCooldownStartsAt}isCollected(){return this.custom.lastCollected>0}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isFull",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"hasActiveTimer",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getDecayLevel",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"calcTimeToNextDecay",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"calcTimeToNextStateUpdate",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getDecayNotificationAt",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isInResetCooldownInterval",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isCollected",null),t=Qe([ko()],t),t})(),Tet=(()=>{let t=class{constructor(o){this.rewards=[],wr(this,o.model),this.actions={claim:{inProgress:!1,error:void 0}}}nextReward(o){return this.rewards[this.getNextRewardIndex(o)]}previousReward(o){const e=this.getNextRewardIndex(o);return e<0?this.rewards[this.rewards.length-2]:this.rewards[e-2]}getCurrentReward(o){const e=this.getNextRewardIndex(o);return e<0?this.rewards[this.rewards.length-1]:this.rewards[e-1]}getNextRewardIndex(o){return this.rewards.findIndex(e=>e.level>o)}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Object)],t.prototype,"nextReward",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Object)],t.prototype,"previousReward",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Object)],t.prototype,"getCurrentReward",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Number)],t.prototype,"getNextRewardIndex",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),Iu=(()=>{var t;let n=((t=class{constructor(e,i){this.listeners=new is.List,this.subscriptions=new is.List,this.timers={},this.requests={},this.clientConfigService=mt(Zt),this.onConnectionRestored=()=>{this.requestBonuses().catch(r=>console.log(r))},this.onBonusesUpdate=r=>{this.store.dispatch(Mk({bonuses:r}))},this.store=e,this.client=i}initialize(){this.initBonuses(this.store.selectUserState().bonuses,this.clientConfigService.getConfig()),this.listeners.add(this.client.onConnectionRestored(this.onConnectionRestored)),this.listeners.add(this.client.onBonusesUpdate(this.onBonusesUpdate)),this.addBonusesSubscriptions()}requestBonuses(){var e=this;return f(function*(){try{e.store.dispatch(ode());const i=yield e.client.requestBonuses();return e.initBonuses(i,e.clientConfigService.getConfig()),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(rde(r)),r}})()}requestDailyBonus(){var e=this;return f(function*(){try{e.store.dispatch(sde());const i=yield e.client.requestDailyBonus();return e.store.dispatch(ade({dailyBonus:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(cde(r)),r}})()}claimDailyBonus(){var e=this;return f(function*(){try{e.store.dispatch(lde());const i=yield e.client.claimDailyBonus();if(!i.collected)throw new Error;return e.store.dispatch(KV({dailyBonus:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(ZV(r)),r}})()}claimLevelUpRewards(){var e=this;return f(function*(){try{e.store.dispatch(Mde());const i=yield e.client.claimLevelUpRewards();e.store.dispatch(Ode({claimedLevelUpRewards:i}))}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(Ede(r)),r}})()}getXpTable(){var e=this;return f(function*(){try{let i=e.store.bonuses.xpTable.selectState();return i.length>0||(e.store.dispatch(xde()),i=yield e.client.getXpTable(),e.store.dispatch(Ade({xpTable:i}))),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(Rde(i)),r}})()}claimCashbackBonus(){var e=this;return f(function*(){try{e.store.dispatch(_de());const i=yield e.client.claimCashbackBonus();if(!i.collected)throw new Error;return e.store.dispatch(vde({cashback:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(yet(r)),r}})()}claimAdventCalendarBonus(){var e=this;return f(function*(){try{e.store.dispatch(hde());const i=yield e.client.claimAdventCalendarBonus();if(!i.collected)throw new Error;return e.store.dispatch(QV({adventCalendar:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(mde(r)),r}})()}requestAdventCalendar(){var e=this;return f(function*(){try{e.store.dispatch(ude());const i=yield e.client.requestAdventCalendarBonus();return e.store.dispatch(dde({adventCalendar:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(pde(r)),r}})()}getVideoBonusReward(e){var i=this;return f(function*(){const r=tf.mapVideoTypeToBonus(e);try{r&&i.store.dispatch(_et({id:r}));const s=yield i.client.requestRewardedVideoBonus(e);return r&&i.store.dispatch(fde({id:r,state:s})),s}catch(s){const a=jt.createErrorInstance(s);throw r&&i.store.dispatch(vet({id:r,error:a})),a}})()}claimVideoBonusReward(e){var i=this;return f(function*(){const r=tf.mapVideoTypeToBonus(e);try{r&&i.store.dispatch(bet({id:r}));const s=yield i.client.claimRewardedVideoBonus(e);return r&&i.store.dispatch(gde({id:r,result:s})),s}catch(s){const a=jt.createErrorInstance(s);throw r&&i.store.dispatch(Cet({id:r,error:a})),a}})()}requestRewardedGames(){var e=this;return f(function*(){try{e.store.dispatch(bde());const i=yield e.client.requestRewardedGames();return e.store.dispatch(Cde({rewardedGames:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(yde(r)),r}})()}claimRewardedGameBonus(e){var i=this;return f(function*(){try{i.store.dispatch(Sde({gameType:e.type}));const r=yield i.client.claimRewardedGameBonus(e);return i.store.dispatch(YV({rewardedGame:r})),r}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(wde({gameType:e.type,error:s})),s}})()}unlockRewardedGame(e){var i=this;return f(function*(){try{i.store.dispatch(Tde({gameType:e}));const r=yield i.client.unlockRewardedGameBonus(e);return i.store.dispatch(Pde({rewardedGame:r})),r}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(Ide({gameType:e,error:s})),s}})()}dispose(){this.listeners.forEach(e=>e.detach()),this.listeners=new is.List,this.store.dispatch(ide()),Object.keys(this.timers).forEach(e=>clearTimeout(this.timers[e])),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new is.List}initBonuses(e,i){this.store.dispatch(Ik({dailyBonus:new mC(e.dailyBonus),cashback:new wet(e.cashback),games:e.games.map(r=>new fC(r)),stampCard:e.stampCard,progressiveRewardedVideos:new BI(e.progressiveRewardedVideos),adventCalendar:new NI(e.adventCalendar),video:new tf(e.video),videoShopChips:new tf(e.videoShopChips),videoShopGems:new tf(e.videoShopGems),videoDeltaBanner:new tf(e.videoDeltaBanner),levelUpRewards:new Tet({model:{rewards:null==i?void 0:i.transactions.bonus.levelUp,reward:e.levelUpReward.lastClaimedReward}}),registerBonus:e.registrationAdventBonus}))}startBonusReadyTimer(e,i,r){if(this.stopTimer(e),r>0){const s=setTimeout(i,r);this.timers[e]=s}}stopTimer(e){clearTimeout(this.timers[e])}addBonusesSubscriptions(){this.subscriptions.add(this.store.bonuses.dailyBonus.subscribeState().pipe(bt(e=>!!e&&e.isActive&&!e.isReady),ws((e,i)=>e.requirements.timeToNextBonus!==i.requirements.timeToNextBonus)).subscribe(e=>this.onDailyBonusTimeUpdate(e.calcTimeToNextBonus()+5))),this.subscriptions.add(this.store.bonuses.games.subscribeGamesList().pipe(jn(e=>Math.min(...e.map(i=>i.requirements.timeToNextBonus))),ws((e,i)=>e!==i)).subscribe(e=>this.onRewardedGamesTimeUpdate(fC.calcTimeToNextBonus(e)))),this.subscriptions.add(this.store.bonuses.cashback.subscribeState().pipe(bt(e=>!!e&&e.hasActiveTimer()),ws((e,i)=>e.requirements.timeToNextBonus===i.requirements.timeToNextBonus&&e.custom.tierLevelChangeAt===i.custom.tierLevelChangeAt&&e.custom.nextBonusAt===i.custom.nextBonusAt)).subscribe(e=>this.onCashbackTimeUpdate(e.calcTimeToNextStateUpdate()))),this.subscriptions.add(this.store.bonuses.progressiveVideosBonus.subscribeProgressiveVideoBonus().pipe(bt(e=>!!e&&e.isActive),ws((e,i)=>e.timeInterval!==i.timeInterval)).subscribe(e=>this.onProgressiveVideosTimeUpdate(e.calcTimeToNextBonus()))),this.subscriptions.add(this.store.bonuses.adventCalendar.subscribeState().pipe(bt(e=>!!e&&e.isActive&&!e.isBonusAvailable),ws((e,i)=>e.timeInterval!==i.timeInterval)).subscribe(e=>this.onAdventCalendarTimeUpdate(e.calcTimeToNextBonus()+5))),this.subscriptions.add(this.store.bonuses.videoShopChips.subscribeState().pipe(bt(e=>!!e&&e.isActive&&e.requirements.timeToNextBonus>0),ws((e,i)=>e.requirements.timeToNextBonus!==i.requirements.timeToNextBonus)).subscribe(e=>this.onVideoBonusTimeUpdate(Ba.RewardedVideoShopChips,e.calcTimeToNextBonus()+5))),this.subscriptions.add(this.store.bonuses.videoShopGems.subscribeState().pipe(bt(e=>!!e&&e.isActive&&e.requirements.timeToNextBonus>0),ws((e,i)=>e.requirements.timeToNextBonus!==i.requirements.timeToNextBonus)).subscribe(e=>this.onVideoBonusTimeUpdate(Ba.RewardedVideoShopGems,e.calcTimeToNextBonus()+5))),this.subscriptions.add(this.store.bonuses.videoDeltaBanner.subscribeState().pipe(bt(e=>!!e&&e.isActive&&e.requirements.timeToNextBonus>0),ws((e,i)=>e.requirements.timeToNextBonus!==i.requirements.timeToNextBonus)).subscribe(e=>this.onVideoBonusTimeUpdate(Ba.RewardedVideoDeltaBanner,e.calcTimeToNextBonus()+5)))}onDailyBonusTimeUpdate(e){this.startBonusReadyTimer("dailyBonus",()=>{this.requestDailyBonus().catch(i=>console.log(i))},1e3*e)}onRewardedGamesTimeUpdate(e){this.startBonusReadyTimer("rewardedGames",()=>{this.requestRewardedGames().catch(i=>console.log(i))},1e3*e)}onCashbackTimeUpdate(e){this.startBonusReadyTimer("cashback",()=>{if(this.requests.cashback)return;const r=f_(()=>Ks(this.requestBonuses())).pipe(Ete(s=>s.pipe(Ate(3e3),Qi(5))),$u());r.subscribe(()=>{delete this.requests.cashback},s=>{console.log(s),delete this.requests.cashback}),this.requests.cashback=r},1e3*e)}onProgressiveVideosTimeUpdate(e){this.startBonusReadyTimer("progressiveVideos",()=>{this.requestBonuses().catch(i=>console.log(i))},1e3*e)}onAdventCalendarTimeUpdate(e){this.startBonusReadyTimer("adventCalendar",()=>{this.requestAdventCalendar().catch(i=>console.log(i))},1e3*e)}onVideoBonusTimeUpdate(e,i){this.startBonusReadyTimer(e,()=>{this.getVideoBonusReward(e).catch(r=>console.log(r))},1e3*i)}}).\u0275fac=function(e){return new(e||t)(T(J),T($V))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),t);return Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"initialize",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[J,$V])],n),n})();const nf=ki({selectId:t=>t.gameType,sortComparer:!1}),kde={dailyBonus:void 0,cashback:void 0,games:nf.getInitialState({loadingState:{isLoaded:!1,isLoading:!1}}),progressiveRewardedVideos:void 0,adventCalendar:void 0,video:void 0,videoShopChips:void 0,videoShopGems:void 0,videoDeltaBanner:void 0,loadingState:{isLoaded:!1,isLoading:!1,error:void 0},levelUpRewards:void 0,xpTable:void 0},Pet=Sr(kde,de(ide,()=>kde),de(Ik,(t,n)=>Se(t,o=>{o.dailyBonus=n.dailyBonus,o.cashback=n.cashback,o.adventCalendar=n.adventCalendar,o.games=nf.upsertMany(n.games,t.games),o.games.loadingState={isLoaded:!0,isLoading:!1,error:void 0},o.loadingState={isLoaded:!0,isLoading:!1,error:void 0},o.progressiveRewardedVideos=n.progressiveRewardedVideos,o.video=n.video,o.videoShopChips=n.videoShopChips,o.videoShopGems=n.videoShopGems,o.videoDeltaBanner=n.videoDeltaBanner,o.levelUpRewards=n.levelUpRewards,o.xpTable={table:[],loadingState:{isLoaded:!0,isLoading:!1,error:void 0}}})),de(ode,t=>Se(t,n=>{n.loadingState.isLoading=!0})),de(rde,(t,n)=>Se(t,o=>{o.loadingState.isLoading=!1,o.loadingState.error=n})),de(sde,t=>Se(t,n=>{n.dailyBonus.loadingState.isLoading=!0})),de(ade,(t,n)=>Se(t,o=>{o.dailyBonus={...o.dailyBonus,...n.dailyBonus,loadingState:{isLoaded:!0,isLoading:!1,error:void 0}}})),de(cde,(t,n)=>Se(t,o=>{o.dailyBonus.loadingState.isLoading=!1,o.dailyBonus.loadingState.error=n})),de(lde,t=>Se(t,n=>{n.dailyBonus.actions.claim.inProgress=!0})),de(KV,(t,n)=>Se(t,o=>{o.dailyBonus.actions.claim={inProgress:!1,error:void 0},o.dailyBonus.requirements=n.dailyBonus.requirements,o.dailyBonus.isReady=0===n.dailyBonus.requirements.timeToNextBonus,o.dailyBonus.reward=n.dailyBonus.reward,o.dailyBonus.custom=n.dailyBonus.custom,o.dailyBonus.returnDaysCount=Math.min(o.dailyBonus.returnDaysCount+1,n.dailyBonus.reward.all.length-1)})),de(ZV,(t,n)=>Se(t,o=>{o.dailyBonus.actions.claim={inProgress:!1,error:n}})),de(Mde,t=>Se(t,n=>{n.levelUpRewards.actions.claim.inProgress=!0})),de(Ode,(t,n)=>Se(t,o=>{o.levelUpRewards.actions.claim.inProgress=!1,o.levelUpRewards.actions.claim.error=void 0,o.levelUpRewards.reward=n.claimedLevelUpRewards.reward})),de(Ede,(t,n)=>Se(t,o=>{o.levelUpRewards.actions.claim.inProgress=!1,o.levelUpRewards.actions.claim.error=n})),de(ude,t=>Se(t,n=>{n.adventCalendar.loadingState.isLoading=!0})),de(dde,(t,n)=>Se(t,o=>{o.adventCalendar={...o.adventCalendar,...n.adventCalendar,loadingState:{isLoaded:!0,isLoading:!1,error:void 0}}})),de(pde,(t,n)=>Se(t,o=>{o.adventCalendar.loadingState.isLoading=!1,o.adventCalendar.loadingState.error=n})),de(xde,t=>Se(t,n=>{n.xpTable.loadingState.isLoading=!0})),de(Ade,(t,n)=>Se(t,o=>{o.xpTable.loadingState.isLoading=!1,o.xpTable.loadingState.isLoaded=!0,o.xpTable.loadingState.error=void 0,o.xpTable.table=n.xpTable})),de(Rde,(t,n)=>Se(t,o=>{o.xpTable.loadingState.isLoading=!1,o.xpTable.loadingState.error=n})),de(hde,t=>Se(t,n=>{n.adventCalendar.actions.claim.inProgress=!0})),de(QV,(t,n)=>Se(t,o=>{o.adventCalendar.actions.claim={inProgress:!1,error:void 0},o.adventCalendar.isBonusAvailable=!1,o.adventCalendar.timeInterval=n.adventCalendar.custom.timeInterval,o.adventCalendar.loggedInDaysCount++})),de(mde,(t,n)=>Se(t,o=>{o.adventCalendar.actions.claim={inProgress:!1,error:n}})),de(_de,t=>Se(t,n=>{n.cashback.actions.claim.inProgress=!0})),de(vde,(t,n)=>Se(t,o=>{o.cashback.actions.claim={inProgress:!1,error:void 0},o.cashback.requirements=n.cashback.requirements,o.cashback.isReady=0===n.cashback.requirements.timeToNextBonus,o.cashback.reward=n.cashback.reward,o.cashback.custom=n.cashback.custom})),de(ZV,(t,n)=>Se(t,o=>{o.cashback.actions.claim={inProgress:!1,error:n}})),de(bde,t=>Se(t,n=>{n.games.loadingState.isLoading=!0})),de(Cde,(t,n)=>Se(t,o=>{const e=n.rewardedGames.map(i=>({id:i.gameType,changes:i}));o.games=nf.updateMany(e,t.games),o.games.loadingState={isLoaded:!0,isLoading:!1,error:void 0}})),de(yde,(t,n)=>Se(t,o=>{o.games.loadingState.isLoading=!1,o.games.loadingState.error=n})),de(Sde,(t,n)=>Se(t,o=>{const e=o.games.entities[n.gameType];e&&(e.actions.claim.inProgress=!0,o.games=nf.updateOne({id:n.gameType,changes:e},t.games))})),de(YV,(t,n)=>Se(t,o=>{const e=o.games.entities[n.rewardedGame.gameType];e&&(e.actions.claim.inProgress=!1,e.requirements.timeToNextBonus=n.rewardedGame.next.requirements.timeToNextBonus,e.isReady=0===n.rewardedGame.next.requirements.timeToNextBonus,o.games=nf.updateOne({id:n.rewardedGame.gameType,changes:e},t.games))})),de(wde,(t,n)=>Se(t,o=>{const e=o.games.entities[n.gameType];e&&(e.actions.claim={inProgress:!1,error:n.error},o.games=nf.updateOne({id:n.gameType,changes:e},t.games))})),de(Tde,(t,n)=>Se(t,o=>{const e=o.games.entities[n.gameType];e&&(e.actions.unlock.inProgress=!0,o.games=nf.updateOne({id:n.gameType,changes:e},t.games))})),de(Pde,(t,n)=>Se(t,o=>{const e=o.games.entities[n.rewardedGame.gameType];e&&(e.actions.unlock.inProgress=!1,o.games=nf.updateOne({id:n.rewardedGame.gameType,changes:{...e,...n.rewardedGame}},t.games))})),de(Ide,(t,n)=>Se(t,o=>{const e=o.games.entities[n.gameType];e&&(e.actions.unlock={inProgress:!1,error:n.error},o.games=nf.updateOne({id:n.gameType,changes:e},t.games))})),de(fde,(t,n)=>Se(t,o=>{o[n.id]={...o[n.id],...n.state}})),de(gde,(t,n)=>Se(t,o=>{o[n.id].requirements.limit=n.result.next.requirements.limit,o[n.id].rewards=n.result.next.rewards,o[n.id].isReady=n.result.next.requirements.limit>0,o[n.id].requirements.timeToNextBonus=n.result.next.requirements.timeToNextBonus})),de(Mk,(t,n)=>Se(t,o=>{n.bonuses.progressiveRewardedVideos&&(o.progressiveRewardedVideos.maxProgress=n.bonuses.progressiveRewardedVideos.custom.maxProgress,o.progressiveRewardedVideos.timeInterval=n.bonuses.progressiveRewardedVideos.custom.timeInterval,o.progressiveRewardedVideos.currentProgress=n.bonuses.progressiveRewardedVideos.custom.currentProgress,o.progressiveRewardedVideos.isBonusAvailable=n.bonuses.progressiveRewardedVideos.isReady),n.bonuses.cashback&&(o.cashback.custom=n.bonuses.cashback.custom||o.cashback.custom,o.cashback.isActive=n.bonuses.cashback.isActive||o.cashback.isActive,o.cashback.isReady=n.bonuses.cashback.isReady||o.cashback.isReady,o.cashback.requirements=n.bonuses.cashback.requirements||o.cashback.requirements,o.cashback.reward=n.bonuses.cashback.reward||o.cashback.reward)})),de(DA,(t,n)=>Se(t,o=>{o.cashback.custom=n.custom?wr(o.cashback.custom,n.custom):o.cashback.custom,o.cashback.isActive=n.isActive||o.cashback.isActive,o.cashback.isReady=n.isReady||o.cashback.isReady,o.cashback.requirements=n.requirements?wr(o.cashback.requirements,n.requirements):o.cashback.requirements,o.cashback.reward=n.reward?wr(o.cashback.reward,n.reward):o.cashback.reward})));function Iet(t,n){return Pet(t,n)}const iu=Ts(WV.featureKey),Lde=We(iu,t=>t.cashback),Dde=We(iu,t=>{var n;return null===(n=t.cashback)||void 0===n?void 0:n.isReady}),Bde=We(iu,t=>t.dailyBonus),JV=We(iu,t=>{var n,o;return(null===(n=t.dailyBonus)||void 0===n?void 0:n.isActive)&&(null===(o=t.dailyBonus)||void 0===o?void 0:o.isReady)}),Met=We(iu,t=>{var n,o;return(null===(n=t.adventCalendar)||void 0===n?void 0:n.isActive)&&(null===(o=t.adventCalendar)||void 0===o?void 0:o.isBonusAvailable)}),XV=We(iu,t=>t.games),Rk=nf.getSelectors(XV),Nde=()=>We(Rk.selectEntities,(t,n)=>{var o;return null===(o=t[n])||void 0===o?void 0:o.isReady}),Fde=()=>We(Rk.selectEntities,(t,n)=>t[n]),e6=We(Rk.selectAll,t=>t),Ude=We(JV,Met,e6,(t,n,o)=>t||n||o.some(e=>e.isReady)),t6=We(iu,t=>t.progressiveRewardedVideos),Gde=We(t6,t=>t.rewards[t.currentProgress]),Vde=We(iu,t=>t.adventCalendar),zde=We(iu,t=>t.video),jde=We(iu,t=>t.videoShopChips),Hde=We(iu,t=>t.videoShopGems),qde=We(iu,t=>t.videoDeltaBanner),n6=We(iu,t=>t.levelUpRewards),Wde=We(n6,qG,(t,n)=>null==t?void 0:t.rewards.some(o=>o.level>t.reward.level&&o.level<=(null==n?void 0:n.level))),$de=We(iu,t=>t.xpTable.table);J.prototype.bonuses={selectState:function Oet(){return this.selectSync(iu)}.bind(J.prototype),subscribeState:function Eet(){return this.select(iu)}.bind(J.prototype),selectIsAnyBonusReady:function xet(){return this.selectSync(Ude)}.bind(J.prototype),subscribeIsAnyBonusReady:function Aet(){return this.select(Ude)}.bind(J.prototype),dailyBonus:{selectState:function Ret(){return this.selectSync(Bde)}.bind(J.prototype),subscribeState:function ket(){return this.select(Bde)}.bind(J.prototype),selectIsReady:function Let(){return this.selectSync(JV)}.bind(J.prototype),subscribeIsReady:function Det(){return this.select(JV)}.bind(J.prototype)},cashback:{selectState:function Bet(){return this.selectSync(Lde)}.bind(J.prototype),subscribeState:function Net(){return this.select(Lde)}.bind(J.prototype),selectIsReady:function Fet(){return this.selectSync(Dde)}.bind(J.prototype),subscribeIsReady:function Uet(){return this.select(Dde)}.bind(J.prototype)},games:{selectState:function Get(){return this.selectSync(XV)}.bind(J.prototype),subscribeState:function Vet(){return this.select(XV)}.bind(J.prototype),selectGameIsReady:function Het(t){return this.selectSync(Nde(),t)}.bind(J.prototype),subscribeGameIsReady:function qet(t){return this.select(Nde(),t)}.bind(J.prototype),selectGamesList:function zet(){return this.selectSync(e6)}.bind(J.prototype),subscribeGamesList:function jet(){return this.select(e6)}.bind(J.prototype),selectGameStateByType:function Qet(t){return this.selectSync(Fde(),t)}.bind(J.prototype),subscribeGameStateByType:function Yet(t){return this.select(Fde(),t)}.bind(J.prototype)},progressiveVideosBonus:{selectProgressiveVideoBonus:function Wet(){return this.selectSync(t6)}.bind(J.prototype),subscribeProgressiveVideoBonus:function $et(){return this.select(t6)}.bind(J.prototype),selectCurrentReward:function Ket(){return this.selectSync(Gde)}.bind(J.prototype),subscribeCurrentReward:function Zet(){return this.select(Gde)}.bind(J.prototype)},adventCalendar:{selectState:function Jet(){return this.selectSync(Vde)}.bind(J.prototype),subscribeState:function Xet(){return this.select(Vde)}.bind(J.prototype)},video:{selectState:function ett(){return this.selectSync(zde)}.bind(J.prototype),subscribeState:function ttt(){return this.select(zde)}.bind(J.prototype)},videoShopChips:{selectState:function ntt(){return this.selectSync(jde)}.bind(J.prototype),subscribeState:function itt(){return this.select(jde)}.bind(J.prototype)},videoShopGems:{selectState:function ott(){return this.selectSync(Hde)}.bind(J.prototype),subscribeState:function rtt(){return this.select(Hde)}.bind(J.prototype)},videoDeltaBanner:{selectState:function stt(){return this.selectSync(qde)}.bind(J.prototype),subscribeState:function att(){return this.select(qde)}.bind(J.prototype)},levelUpRewards:{selectState:function ctt(){return this.selectSync(n6)}.bind(J.prototype),subscribeState:function ltt(){return this.select(n6)}.bind(J.prototype),selectIsReadyToClaim:function utt(){return this.selectSync(Wde)}.bind(J.prototype),subscribeIsReadyToClaim:function dtt(){return this.select(Wde)}.bind(J.prototype)},xpTable:{selectState:function ptt(){return this.selectSync($de)}.bind(J.prototype),subscribeState:function htt(){return this.select($de)}.bind(J.prototype)}};let kk=(()=>{var t;class n{constructor(e){this.bonusesService=e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Iu))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[bu,$V,Iu],imports:[$r.forFeature(WV.featureKey,Iet)]}),n})(),mtt=(()=>{let t=class{constructor(o){this.actions={claim:{inProgress:!1,error:void 0}},this.loadingState={isLoaded:!1,isLoading:!1,error:void 0},wr(this.model,o)}getRemainingTime(){if(this.model||this.loadingState.isLoaded)return!this.model&&this.loadingState.isLoaded?0:Math.max(0,this.model.expiresAt-Bn.instance.getServerTimeS())}isActive(){if(this.model||this.loadingState.isLoaded)return!(!this.model&&this.loadingState.isLoaded)&&(this.model.status===bl.Ready||this.getRemainingTime()>0&&this.model.status!==bl.Expired)}isReadyToClaim(){var o;if(this.model||this.loadingState.isLoaded)return!(!this.model&&this.loadingState.isLoaded)&&this.isActive()&&(null===(o=this.model)||void 0===o?void 0:o.status)===bl.Ready}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getRemainingTime",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isActive",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isReadyToClaim",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})();var Lk;let $p=Lk=class{constructor(n){this.actions={claim:{inProgress:!1,error:void 0}},this.loadingState={isLoaded:!1,isLoading:!1,error:void 0},wr(this,n)}isCompleted(){var n,o;return(null===(n=this.model.registrationAdventBonusModel)||void 0===n?void 0:n.daysCollected)>=(null===(o=this.model.registrationAdventBonusModel)||void 0===o?void 0:o.totalDays)}isExpired(){var n;return(null===(n=this.model.registrationAdventBonusModel)||void 0===n?void 0:n.expiresAt)<=Bn.instance.getServerTimeS()}calcExpiresAt(){var n;return null===(n=this.model.registrationAdventBonusModel)||void 0===n?void 0:n.expiresAt}getCurrentDayForClaim(){var n,o;const e=(null===(n=this.model.registrationAdventBonusModel)||void 0===n?void 0:n.daysCollected)+1;return e>(null===(o=this.model.registrationAdventBonusModel)||void 0===o?void 0:o.totalDays)?void 0:e}getCurrentRewardForClaim(){return this.getRewardByDay(this.getCurrentDayForClaim())}getRewardByDay(n){var o;return null===(o=this.model.registrationAdventBonusModel)||void 0===o?void 0:o.rewardConfig.find(e=>e.day===n)}calcTimeToNextBonus(){var n;return Lk.calcTimeToNextBonus(null===(n=this.model.registrationAdventBonusModel)||void 0===n?void 0:n.nextRewardAt)}calcNextBonusAvailableAt(){var n;return null===(n=this.model.registrationAdventBonusModel)||void 0===n?void 0:n.nextRewardAt}getTimeToExpire(){var n;return Lk.calcTimeToExpire(null===(n=this.model.registrationAdventBonusModel)||void 0===n?void 0:n.expiresAt)}static calcTimeToNextBonus(n){return Math.max(n-Bn.instance.getServerTimeS(),0)}static calcTimeToExpire(n){return Math.max(n-Bn.instance.getServerTimeS(),0)}};Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],$p.prototype,"isCompleted",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],$p.prototype,"isExpired",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],$p.prototype,"calcExpiresAt",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],$p.prototype,"getCurrentDayForClaim",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],$p.prototype,"getCurrentRewardForClaim",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Object)],$p.prototype,"getRewardByDay",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],$p.prototype,"calcTimeToNextBonus",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],$p.prototype,"calcNextBonusAvailableAt",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],$p.prototype,"getTimeToExpire",null),$p=Lk=Qe([ko(),ue("design:paramtypes",[Object])],$p);let Kde=(()=>{var t;class n{constructor(e,i){this.appService=e,this.settings=i}set(e){!0===this.notificationsEnabled()&&this.appService.isMobileApp()&&this.appService.getMobileAppService().messages().localNotification({action:wi.ELocalNotificationAction.Set,args:e})}remove(e){!0===this.notificationsEnabled()&&this.appService.isMobileApp()&&this.appService.getMobileAppService().messages().localNotification({action:wi.ELocalNotificationAction.Remove,args:{id:e}})}notificationsEnabled(){return this.settings.getBonusNotifications()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(nc))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Zde=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.adsService=b,this.time=w,this.constants=R,this.brazeEngagementService=G,this.subscriptions=new ie.List,this.translate=r,this.translateService=s,this.formatNumberPipe=a,this.developerService=c,this.localNotificationsService=i,this.deltaDNAService=e,this.actions=u,this.store=h}init(e){this.userState=e,this.attachListeners()}dispose(){this.detachListeners(),clearTimeout(this.admobTimeout)}attachListeners(){this.subscriptions.add(this.actions.pipe(ai(KV)).subscribe(e=>{this.deltaDNAService.dailyBonusClaimedEngage(),this.brazeEngagementService.dailyBonusClaimedEngage(),this.scheduleDailyBonusNotification(e),this.adsService.showInterstitial({tag:Kb.AfterClaimDailyBonusInterstitial}).catch(i=>console.warn("Claim daily bonus show interstitial error",i))})),this.subscriptions.add(this.actions.pipe(ai(QV)).subscribe(e=>{this.deltaDNAService.dailyBonusClaimedEngage(),this.brazeEngagementService.dailyBonusClaimedEngage(),this.scheduleDailyBonusNotification({dailyBonus:{collected:!0,reward:e.adventCalendar.reward,requirements:{timeToNextBonus:e.adventCalendar.custom.timeInterval}}})})),this.subscriptions.add(this.actions.pipe(ai(YV)).subscribe(e=>{clearTimeout(this.admobTimeout),this.admobTimeout=setTimeout(()=>{this.adsService.showInterstitial({miniGame:e.rewardedGame.gameType,tag:Kb.AfterClaimMiniGameInterstitial}).catch(i=>console.warn("Claim rewarded game show interstitial error",i))},3e3),this.scheduleRewardedGameNotification(e)})),this.subscriptions.add(this.store.bonuses.cashback.subscribeState().pipe(bt(e=>!!e),ws((e,i)=>e.getDecayNotificationAt()===i.getDecayNotificationAt()&&this.time.getServerTimeS()<i.getDecayNotificationAt())).subscribe(e=>{!e.getDecayNotificationAt()||this.time.getServerTimeS()>=e.getDecayNotificationAt()?this.localNotificationsService.remove("cashback-decay"):this.scheduleCashbackDecayNotification(e)}))}detachListeners(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}scheduleRewardedGameNotification(e){let r,i=this.translateService.getParsedTranslation("BONUSES_MOBILE_NOTIFICATIONS.BONUS_READY",[this.translateService.getParsedTranslation("FREE_REWARDS.".concat(e.rewardedGame.gameType))]);const s=e.rewardedGame.next.rewards[e.rewardedGame.next.rewards.length-1];s.chips?r=this.translateService.getParsedTranslation("BONUSES_MOBILE_NOTIFICATIONS.GAME_READY_BODY",[this.translateService.getParsedTranslation("SHOP.ITEMS.CHIP_PACKS",[s.chips])]):s.gems?r=this.translateService.getParsedTranslation("BONUSES_MOBILE_NOTIFICATIONS.GAME_READY_BODY",[this.translateService.getParsedTranslation("SHOP.ITEMS.GEM_PACKS",[s.gems])]):(r=i,i=void 0);let a=1e3*fC.calcTimeToNextBonus(e.rewardedGame.next.requirements.timeToNextBonus);this.developerService.showDailyBonusNotificationSooner()&&(a=6e4),this.localNotificationsService.set({id:"rewardedGame-".concat(e.rewardedGame.gameId),showAfterMilliseconds:a,title:i,text:r,forwardTo:ol.FreeRewards})}scheduleDailyBonusNotification(e){const r=Object.keys(this.translate.translations[this.translate.currentLang].MOBILE_LOCAL_NOTIFICATIONS),s=r[Math.floor(Math.random()*r.length)];let a=1e3*mC.calcTimeToNextBonus(e.dailyBonus.requirements.timeToNextBonus);this.developerService.showDailyBonusNotificationSooner()&&(a=6e4);const c=this.translateService.getParsedTranslation("BONUSES_MOBILE_NOTIFICATIONS.BONUS_READY",[this.translateService.getParsedTranslation("DAILY_BONUS.TITLE")]);this.userState&&this.localNotificationsService.set({id:"dailyBonus",showAfterMilliseconds:a,title:c,text:this.translateService.getParsedTranslation("MOBILE_LOCAL_NOTIFICATIONS.".concat(s),[this.formatNumberPipe.transform(e.dailyBonus.reward.current.items[0].amount)]),forwardTo:ol.FreeRewards})}scheduleCashbackDecayNotification(e){this.localNotificationsService.set({id:"cashback-decay",showAfterMilliseconds:1e3*(e.getDecayNotificationAt()-this.time.getServerTimeS()),title:this.translateService.getParsedTranslation("LOCAL_NOTIFICATIONS.CashbackDecay.title"),text:this.translateService.getParsedTranslation("LOCAL_NOTIFICATIONS.CashbackDecay.message"),forwardTo:"/".concat(this.constants.defaultLoggedRoute,"/cash-back")})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(sl),T(Kde),T(ls),T(pi),T(Go),T(tg),T(yr),T(J),T(bc),T(Bn),T(tn),T(cl))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var na=function(t){return t.AdminBonus="AdminBonus",t.AntiChurn="antiChurn",t.RewardedVideo="rewardedVideo",t.AccountMerge="accountMerge",t.InviteFriends="inviteFriends",t.DailyBonus="dailyBonus",t.MiniGame="miniGame",t.EmailVerification="emailVerification",t.PushNotifications="pushNotifications",t.FirstLostGame="firstLostGame",t.AdventCalendar="adventCalendar",t}(na||{});const gtt=[na.AdminBonus,na.InviteFriends,na.RewardedVideo,na.AntiChurn,na.AccountMerge,na.EmailVerification,na.PushNotifications,na.FirstLostGame,na.AdventCalendar,na.DailyBonus,na.MiniGame];var _tt=ve.EIcons;function vtt(t,n){1&t&&(p(0,"div",11),B(1,"loader-image",12),m()),2&t&&(d(),l("transparentBG",!0))}function btt(t,n){1&t&&B(0,"notification-sign",17),2&t&&l("notificationValue","!")}function Ctt(t,n){if(1&t){const o=Ce();p(0,"div",13)(1,"top-tab-item",14),Y("select",function(i){return oe(o),re(_(2).changeCategory(i))}),p(2,"button-text",15),H(3),V(4,"translate"),m(),U(5,btt,1,1,"notification-sign",16),m()()}if(2&t){const o=n.$implicit,e=_(2);d(),l("tabId",o.id),d(),l("bclass","free-rewards__top-tabs__bclass"+(e.tabs.current.id===o.id?" free-rewards__top-tabs__bclass__selected":"")),Hn("data-cy","storeTab"+o.id),d(),ze(" ",yt(4,5,o.text.key,o.text.params)," "),d(2),l("ngIf",e.showNotificationByTab(o))}}function ytt(t,n){1&t&&B(0,"admin-reward-box")}function Stt(t,n){1&t&&B(0,"invite-friends-reward-box",30)}function wtt(t,n){1&t&&B(0,"anti-churn-reward-box",31)}function Ttt(t,n){1&t&&B(0,"account-merge-reward-box",32)}function Ptt(t,n){1&t&&B(0,"email-verification-reward-box")}function Itt(t,n){1&t&&B(0,"push-notifications-reward-box")}function Mtt(t,n){1&t&&B(0,"first-lost-game-reward-box",33)}function Ott(t,n){if(1&t){const o=Ce();p(0,"rewarded-video-reward-box",34),WF("videoChange",function(i){oe(o);const r=_().$implicit;return function zY(t,n){const o=HK(t);return o&&t.set(n),o}(r.video,i)||(r.video=i),re(i)}),m()}2&t&&qF("video",_().$implicit.video)}function Ett(t,n){1&t&&B(0,"daily-bonus-reward-box",35)}function xtt(t,n){1&t&&B(0,"advent-calendar-reward-box",36)}function Att(t,n){if(1&t&&B(0,"mini-game-reward-box",37),2&t){const o=_().$implicit;l("gameType",o.game.gameType),Hn("data-cy","miniGameBonus"+o.game.gameType)}}function Rtt(t,n){if(1&t&&(p(0,"div",20),U(1,ytt,1,0,"admin-reward-box",21)(2,Stt,1,0,"invite-friends-reward-box",22)(3,wtt,1,0,"anti-churn-reward-box",23)(4,Ttt,1,0,"account-merge-reward-box",24)(5,Ptt,1,0,"email-verification-reward-box",21)(6,Itt,1,0,"push-notifications-reward-box",21)(7,Mtt,1,0,"first-lost-game-reward-box",25)(8,Ott,1,1,"rewarded-video-reward-box",26)(9,Ett,1,0,"daily-bonus-reward-box",27)(10,xtt,1,0,"advent-calendar-reward-box",28)(11,Att,1,2,"mini-game-reward-box",29),m()),2&t){const o=n.$implicit,e=_(3);d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.AdminBonus),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.InviteFriends),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.AntiChurn),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.AccountMerge),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.EmailVerification),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.PushNotifications),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.FirstLostGame),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.RewardedVideo),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.DailyBonus),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.AdventCalendar),d(),l("ngIf",o.rewardBoxType===e.ERewardBoxType.MiniGame)}}function ktt(t,n){if(1&t&&(p(0,"div",18),U(1,Rtt,12,11,"div",19),m()),2&t){const o=_(2);d(),l("ngForOf",o.freeRewardsArray)("ngForTrackBy",o.trackByFn)}}function Ltt(t,n){1&t&&(p(0,"div",38),B(1,"level-up-rewards-smart-component"),m())}function Dtt(t,n){1&t&&(p(0,"div",39),B(1,"register-bonus-smart-component"),m())}function Btt(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().hide())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().hide())}),m(),U(2,vtt,2,1,"div",3),p(3,"div",4)(4,"top-tabs",5),U(5,Ctt,6,8,"div",6),m()(),p(6,"div",7),U(7,ktt,2,2,"div",8)(8,Ltt,2,0,"div",9)(9,Dtt,2,0,"div",10),m()()}if(2&t){const o=_();l("popupContainerOpened",o.openFreeRewards)("popupContainerOptions",o.popupContainerOptions),d(),l("popupTitleType",o.popupTitleTypes.Static)("text",o.tabs.current.popupTitleText)("customComponentCssClass","free-rewards-popup__title-bar"),d(),l("ngIf",o.loaderOn),d(2),l("initialOpenedTab",o.tabs.current.id)("scrollStyleCustomClass","free-rewards__top-tabs__scroll")("scrollBarCustomClass","free-rewards__top-tabs__scrollbar")("showBackButton",!1),d(),l("ngForOf",o.tabs.list)("ngForTrackBy",o.trackById),d(2),l("ngIf",!o.loaderOn&&o.freeRewardsArray&&o.tabs.current.id===o.ETabs.Bonuses),d(),l("ngIf",o.tabs.current.id===o.ETabs.LevelRewards),d(),l("ngIf",o.tabs.current.id===o.ETabs.RegisterBonus)}}let Kp=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.ERewardBoxType=na,this.ETabs=n.ETabs,this.openFreeRewards=!1,this.loaderOn=!1,this.isApp=!1,this.popupTitleTypes=li,this.iconNames=_tt,this.popStateHandler=()=>{this.openFreeRewards&&this.hide()},this.appService=a,this.location=s,this.router=r,this.ngZone=i,this.freeRewardsService=e,this.isApp=this.appService.isMobileApp(),this.popupContainerOptions={customComponentCssClass:this.isApp?"free-rewards-popup__popup-container":"free-rewards-popup__isNotApp free-rewards-popup__popup-container",styleProperties:{maxWidth:"45rem",maxHeight:"72rem"}},this.store=u,this.destroyRef=h,this.cdr=c,c.detach(),this.tabs=new n.Tabs(this.ETabs.Bonuses,u)}ngOnInit(){this.freeRewardsSubscription=this.freeRewardsService.initialization.subscribe(e=>{this.freeRewardsArray=e,this.cdr.detectChanges()}),this.loaderOn=!0,this.openFreeRewardsSubscription=this.freeRewardsService.openFreeRewardsEvent.subscribe(e=>{this.openFreeRewards=e.open,e.open&&(this.loaderOn=!1),e.tab&&this.changeCategory(e.tab),this.cdr.detectChanges()}),this.store.bonuses.subscribeIsAnyBonusReady().pipe(mi(this.destroyRef)).subscribe(e=>{this.isAnyBonusReady=e,this.cdr.detectChanges()}),this.store.bonuses.levelUpRewards.subscribeIsReadyToClaim().pipe(mi(this.destroyRef)).subscribe(e=>{this.isLevelUpReadyForClaim=e,this.cdr.detectChanges()}),this.store.registerBonus.subscribeIsReadyForClaim().pipe(mi(this.destroyRef)).subscribe(e=>{this.isRegisterBonusReadyForClaim=e,this.cdr.detectChanges()}),this.store.registerBonus.subscribeRegisterBonusState().pipe(mi(this.destroyRef),jn(e=>{var i;return(null===(i=e.model)||void 0===i?void 0:i.isActive)&&!e.isExpired()}),ws()).subscribe(e=>{this.tabs=new n.Tabs(this.tabs.current.id,this.store),this.cdr.detectChanges()}),this.backButtonSubscription=this.location.subscribe(this.popStateHandler),this.cdr.detectChanges()}ngOnDestroy(){this.freeRewardsSubscription&&this.freeRewardsSubscription.unsubscribe(),this.openFreeRewardsSubscription&&this.openFreeRewardsSubscription.unsubscribe()}hide(){this.tabs.current=this.tabs.findTabByIdOrFirst(this.ETabs.Bonuses),this.freeRewardsService.closeFreeRewards()}trackByFn(e,i){return i.rewardBoxType}trackById(e,i){return i.id}changeCategory(e){this.tabs.current=this.tabs.findTabByIdOrFirst(e),this.cdr.detectChanges()}showNotificationByTab(e){switch(e.id){case this.ETabs.Bonuses:return this.isAnyBonusReady;case this.ETabs.LevelRewards:return this.isLevelUpReadyForClaim;case this.ETabs.RegisterBonus:return this.isRegisterBonusReadyForClaim;default:return!1}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mu),g(an),g(on),g(Rs),g(Qt),g(Re),g(J),g(br))},t.\u0275cmp=pe({type:t,selectors:[["free-rewards-popup"]],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","customComponentCssClass","buttonCloseClicked"],["class","free-rewards-popup-loader-container",4,"ngIf"],[1,"top-tabs--wrapper"],[1,"free-rewards__top-tabs",3,"initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass","showBackButton"],["class","tab",4,"ngFor","ngForOf","ngForTrackBy"],[1,"free-rewards-popup__content-wrapper"],["class","free-rewards-popup__container--content",4,"ngIf"],["class","level-up-rewards__container--wrapper",4,"ngIf"],["class","register-bonus__container--wrapper",4,"ngIf"],[1,"free-rewards-popup-loader-container"],[3,"transparentBG"],[1,"tab"],[3,"tabId","select"],[1,"top-tabs__list-item--navigation",3,"bclass"],["class","free-rewards__top_tabs--notificaton-sign",3,"notificationValue",4,"ngIf"],[1,"free-rewards__top_tabs--notificaton-sign",3,"notificationValue"],[1,"free-rewards-popup__container--content"],["class","free-reward-box",4,"ngFor","ngForOf","ngForTrackBy"],[1,"free-reward-box"],[4,"ngIf"],["data-cy","inviteFriendsBonus",4,"ngIf"],["data-cy","antiChurnBonus",4,"ngIf"],["data-cy","accountMergeBonus",4,"ngIf"],["data-cy","firstLossBonus",4,"ngIf"],[3,"video","videoChange",4,"ngIf"],["data-cy","dailyBonus",4,"ngIf"],["data-cy","dailyAdventCalendarBonus",4,"ngIf"],[3,"gameType",4,"ngIf"],["data-cy","inviteFriendsBonus"],["data-cy","antiChurnBonus"],["data-cy","accountMergeBonus"],["data-cy","firstLossBonus"],[3,"video","videoChange"],["data-cy","dailyBonus"],["data-cy","dailyAdventCalendarBonus"],[3,"gameType"],[1,"level-up-rewards__container--wrapper"],[1,"register-bonus__container--wrapper"]],template:function(e,i){1&e&&U(0,Btt,10,15,"popup-container",0),2&e&&l("ngIf",i.openFreeRewards)},styles:[".free-rewards-popup-loader-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.free-rewards-popup__container--content[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;order:2;width:100%;height:100%;border-radius:0 0 .4rem .4rem;padding:1.5rem;transform:translateZ(0);overflow-y:auto;overflow-x:hidden}@media only screen and (max-width: 768px){.free-rewards-popup__container--content[_ngcontent-%COMP%]{overflow-y:scroll}}@media only screen and (max-width: 440px){.free-rewards-popup__container--content[_ngcontent-%COMP%]{padding:.5rem}}@media only screen and (max-width: 360px){.free-rewards-popup__container--content[_ngcontent-%COMP%]{padding:0}}.free-reward-box[_ngcontent-%COMP%]{position:relative;width:100%}.level-up-rewards__container--wrapper[_ngcontent-%COMP%], .register-bonus__container--wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}.free-rewards-popup__content-wrapper[_ngcontent-%COMP%]{--top-tabs-height: 11.5rem;width:100%;height:calc(100% - var(--top-tabs-height))}@media only screen and (max-width: 768px){.free-rewards-popup__content-wrapper[_ngcontent-%COMP%]{--top-tabs-height: 11rem}}"],changeDetection:0}),n})();!function(t){let o;var e;t.Tabs=class n{constructor(i,r){this.list=[{id:o.Bonuses,popupTitleText:{key:"FREE_REWARDS.FREE_REWARDS"},text:{key:"FREE_REWARDS.BONUSES"},isEnabled:()=>!0},{id:o.LevelRewards,popupTitleText:{key:"FREE_REWARDS.LEVEL_REWARDS"},text:{key:"FREE_REWARDS.LEVELS"},isEnabled:()=>!0},{id:o.RegisterBonus,popupTitleText:{key:"FREE_REWARDS.FREE_REWARDS"},text:{key:"FREE_REWARDS.CALENDAR"},isEnabled:()=>{var s;const a=r.registerBonus.selectRegisterBonusState();return(null===(s=a.model)||void 0===s?void 0:s.isActive)&&!a.isExpired()}}].filter(s=>s.isEnabled()),this.current=this.findTabByIdOrFirst(i)}findTabByIdOrFirst(i){return this.list.find(r=>r.id===i)||this.list[0]}},(e=o=t.ETabs||(t.ETabs={})).Bonuses="bonuses",e.LevelRewards="levels",e.RegisterBonus="registerBonus"}(Kp||(Kp={}));var FI=lt.NetworkError;let Mu=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le){var me=this;this.http=e,this.appState=i,this.appService=r,this.deltaDNAService=s,this.authListenerService=a,this.accountMergeService=c,this.toaster=u,this.userService=h,this.bonusesListenerService=b,this.store=w,this.permissions=R,this.bonuses=G,this.clientConfigService=K,this.offerService=te,this.brazeEngagementService=ee,this.ads=le,this.requestInProgress=!1,this.updateFreeRewards=f(function*(){try{const ge=yield me.bonuses.requestBonuses();me.updateBonuses(ge),me.buildFreeRewards()}catch(ge){console.log(ge)}}),this.updateMobileUser=f(function*(){try{yield me.mobileAppService.getMobileUser()}catch(ge){console.log(ge)}}),this.onMergeStateChange=ge=>{ge.isMerged&&(this.accountMergeSubscription&&this.accountMergeSubscription.unsubscribe(),this.freeRewardsArray=this.freeRewardsArray.filter(Me=>Me.rewardBoxType!==na.AccountMerge),this.emitFreeRewardArray())},this.onUserStateRefresh=ge=>{this.userState=ge,this.buildFreeRewards(),this.bonusesUpdate.next(ge.bonuses)},this.dispose=()=>{this.authSubscription&&this.authSubscription.unsubscribe(),this.accountMergeSubscription&&this.accountMergeSubscription.unsubscribe(),this.userStateSubscription&&this.userStateSubscription.unsubscribe(),this.mobileAppService.removeEventListener(Rd.Resume,this.updateMobileUser),this.appState.unsubscribe(co.ConnectionRestored,this.updateFreeRewards),this.freeRewardsArray=void 0,this.bonusesListenerService.dispose(),this.openFreeRewardsEvent=new Qn({open:!1,tab:Kp.ETabs.Bonuses})},this.mobileAppService=this.appService.getMobileAppService(),this.openFreeRewardsEvent=new Qn({open:!1,tab:Kp.ETabs.Bonuses}),this.freeRewardsArray=[],this.initialization=new Qn(this.freeRewardsArray),this.bonusesUpdate=new Qn(void 0),this.userState=void 0,this.enabledPushNotifications=this.appService.getPlatform()===Ut.Ios||this.appService.getPlatform()===Ut.Android&&this.appService.getMobileAppService().getOsVersion()>=13}init(e){this.userState=e,this.bonusesListenerService.init(e),this.buildFreeRewards(),this.bonusesUpdate.next(this.userState.bonuses),this.userStateSubscription=this.store.subscribeUserState().pipe(ws(),bt(Boolean)).subscribe(this.onUserStateRefresh),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(i=>i===er.Logout)).subscribe(this.dispose),this.autoOpenFreeRewards(),this.appState.subscribe(co.ConnectionRestored,this.updateFreeRewards)}buildFreeRewards(){var e,i;this.freeRewardsArray=[],this.userState.bonuses.adminBonus&&this.userState.bonuses.adminBonus.isActive&&this.userState.bonuses.adminBonus.isReady&&this.freeRewardsArray.push({rewardBoxType:na.AdminBonus}),this.userState.bonuses.firstLostGame&&this.userState.bonuses.firstLostGame.isActive&&this.userState.bonuses.firstLostGame.isReady&&this.freeRewardsArray.push({rewardBoxType:na.FirstLostGame});const r=this.clientConfigService.getConfig().transactions.bonus.invitation;(null!=r&&null!==(e=r.accept)&&void 0!==e&&e.isActive||null!=r&&null!==(i=r.levelUp)&&void 0!==i&&i.isActive)&&this.freeRewardsArray.push({rewardBoxType:na.InviteFriends}),this.userState.bonuses.video&&this.userState.bonuses.video.isActive&&this.ads.hasActiveAdsAdapter()&&this.freeRewardsArray.push({rewardBoxType:na.RewardedVideo,video:this.userState.bonuses.video}),this.userState.bonuses.dailyBonus.isActive&&this.userState.bonuses.dailyBonus.reward.all&&this.freeRewardsArray.push({rewardBoxType:na.DailyBonus,bonus:this.userState.bonuses.dailyBonus}),this.userState.bonuses.adventCalendar.isActive&&this.userState.bonuses.adventCalendar.rewards&&this.freeRewardsArray.push({rewardBoxType:na.AdventCalendar}),this.userState.bonuses.antiChurn&&this.userState.bonuses.antiChurn.isActive&&this.userState.bonuses.antiChurn.isReady&&this.freeRewardsArray.push({rewardBoxType:na.AntiChurn}),this.userState.bonuses.games&&this.userState.bonuses.games.forEach(s=>{this.freeRewardsArray.push({rewardBoxType:na.MiniGame,game:s})}),this.userState.bonuses.verification&&this.userState.bonuses.verification.isActive&&this.userState.bonuses.verification.isReady&&this.freeRewardsArray.push({rewardBoxType:na.EmailVerification}),this.permissions.getActionPermission(nt.EPermissionModule.Profile,nt.EModuleAction.Merge).isEnabled&&this.userState.bonuses.accountMerge&&this.userState.bonuses.accountMerge.isActive&&this.userState.bonuses.accountMerge.isReady&&(this.freeRewardsArray.push({rewardBoxType:na.AccountMerge}),this.accountMergeSubscription=this.accountMergeService.mergeState().subscribe(this.onMergeStateChange)),this.userState.bonuses.pushNotifications&&this.userState.bonuses.pushNotifications.isActive&&this.userState.bonuses.pushNotifications.isReady&&this.enabledPushNotifications&&(this.freeRewardsArray.push({rewardBoxType:na.PushNotifications}),this.mobileAppService.addEventListener(Rd.Resume,this.updateMobileUser)),this.emitFreeRewardArray()}autoOpenFreeRewards(){const e=this.userState.bonuses.autoOpenEnabled&&!this.userState.roles.find(r=>r.name===kr.GUESTUSER),i=this.freeRewardsArray.find(r=>r.rewardBoxType===na.DailyBonus);e&&i&&i.bonus.isActive&&i.bonus.isReady&&this.openFreeRewards()}openFreeRewards(e){this.deltaDNAService.dailyBonusOpenedEngage(),this.brazeEngagementService.dailyBonusOpenedEngage(),this.openFreeRewardsEvent.next({open:!0,tab:null!=e?e:this.openFreeRewardsEvent.getValue().tab})}closeFreeRewards(){this.openFreeRewardsEvent.next({open:!1})}unlockMiniGame(e,i,r){var s=this;return f(function*(){s.requestInProgress=!0;try{let a;if(a=i===Bc.Currency?s.permissions.getChipBalanceRequirement(r):s.permissions.getGemBalanceRequirement(r),!a.isFulfilled)throw new et.General.WalletBalance;yield s.bonuses.unlockRewardedGame(e)}catch(a){if(console.warn(a),a instanceof et.General.WalletBalance)switch(i){case Bc.Currency:case"chips":s.offerService.offerCurrency({targetValue:r,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"},action:()=>s.closeFreeRewards()});break;case Bc.Gems:s.offerService.offerCurrency({targetValue:r,itemType:Fe.TG.GemsPack,description:{key:"POPUP.BUY_GEMS_QUESTION"},action:()=>s.closeFreeRewards()})}else a instanceof FI?s.toaster.error("ERRORS.CONNECTION_ERROR"):s.toaster.warn("ERRORS.SOMETHING_WRONG")}finally{s.requestInProgress=!1}})()}emitFreeRewardArray(){this.requestInProgress||this.initialization.next(this.orderBonusBoxesByConfigOrder(this.freeRewardsArray))}claimAntiChurnBonus(){return this.userState&&this.userState.bonuses.antiChurn&&this.userState.bonuses.antiChurn.isActive&&this.userState.bonuses.antiChurn.isReady?this.http.post("bonus/anti-churn/claim").toPromise().then(e=>e.body&&e.body.collected?(this.updateBonuses({antiChurn:{...this.store.selectUserState().bonuses.antiChurn,isReady:!1}}),this.bonusesUpdate.next(this.userState.bonuses),this.buildFreeRewards(),e.body):(this.toaster.warn("ERRORS.SOMETHING_WRONG"),e.body)).catch(e=>(e instanceof FI&&this.toaster.error("ERRORS.CONNECTION_ERROR"),Promise.reject(e))):(this.toaster.warn("ERRORS.SOMETHING_WRONG"),Promise.reject())}claimAdminBonus(){var e=this;return this.userState&&this.userState.bonuses.adminBonus&&this.userState.bonuses.adminBonus.isActive&&this.userState.bonuses.adminBonus.isReady?this.http.post("bonus/admin-bonus/claim").toPromise().then(function(){var i=f(function*(r){return r&&r.body&&r.body.collected?(e.userState=yield e.userService.getState({useCache:!1}),e.buildFreeRewards(),r.body):(e.toaster.warn("ERRORS.SOMETHING_WRONG"),r.body)});return function(r){return i.apply(this,arguments)}}()).catch(i=>(i instanceof FI&&this.toaster.error("ERRORS.CONNECTION_ERROR"),Promise.reject(i))):(this.toaster.warn("ERRORS.SOMETHING_WRONG"),Promise.reject())}claimPushNotificationBonus(){return this.userState.bonuses.pushNotifications&&this.userState.bonuses.pushNotifications.isActive&&this.userState.bonuses.pushNotifications.isReady&&this.enabledPushNotifications?this.http.post("bonus/push-notifications/claim").toPromise().then(e=>e&&e.body&&e.body.collected?(this.mobileAppService.removeEventListener(Rd.Resume,this.updateMobileUser),this.updateBonuses({pushNotifications:{...this.store.selectUserState().bonuses.pushNotifications,isReady:!1}}),this.bonusesUpdate.next(this.userState.bonuses),this.buildFreeRewards(),Promise.resolve(e.body)):(this.toaster.warn("ERRORS.SOMETHING_WRONG"),e.body)).catch(e=>(e instanceof FI&&this.toaster.error("ERRORS.CONNECTION_ERROR"),Promise.reject(e))):Promise.reject("ERRORS.SOMETHING_WRONG")}sendVerificationEmail(){return this.http.post("auth/resendVerificationMail").toPromise()}claimFirstLostGameBonus(){var e=this;return f(function*(){if(!(e.userState&&e.userState.bonuses.firstLostGame&&e.userState.bonuses.firstLostGame.isActive&&e.userState.bonuses.firstLostGame.isReady))throw e.toaster.warn("ERRORS.SOMETHING_WRONG"),new Error("Trying to claim not active/ready bonus");let i;try{i=yield e.http.post("bonus/first-lost-game/claim").toPromise()}catch(r){throw r instanceof FI&&e.toaster.error("ERRORS.CONNECTION_ERROR"),r}return i.body&&i.body.collected?(e.updateBonuses({firstLostGame:{...e.store.selectUserState().bonuses.firstLostGame,isReady:!1}}),e.bonusesUpdate.next(e.userState.bonuses),e.buildFreeRewards(),i.body):(e.toaster.warn("ERRORS.SOMETHING_WRONG"),i.body)})()}updateBonuses(e){this.store.dispatch(HG({bonuses:e}))}orderBonusBoxesByConfigOrder(e){return e.filter(i=>gtt.find(r=>r===i.rewardBoxType))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Sa),T(Qt),T(sl),T(xr),T(Jb),T(Dt),T(Kr),T(Zde),T(J),T(Pi),T(Iu),T(Zt),T(Sc),T(cl),T(bc))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),o6=(()=>{var t;class n{constructor(e,i,r,s,a){this.onInviteReceived=c=>{const u=this.playClient.currentPlayClient,h=!u||!this.getState(u)||this.shouldShow(this.getState(u),u.activeClientModel);this.store.dispatch(nR({id:c.roomId,roomCode:c.invitationCode})),h&&!this.inviteList.has(c)&&!this.roomIdIgnoreList.has(c.roomId)&&this.addToList(c)},this.onLogout=()=>{this.dispose()},this.onPlayClientDispose=()=>{this.dispose()},this.communication=e,this.playClient=i,this.navigation=r,this.store=a,this.events=new tc,this.roomIdIgnoreList=new ie.List,this.list=new ie.List,this.listeners=new ie.List,this.initialized=!1,s.authStatusChangeEvent.pipe(bt(c=>c===er.Logout)).subscribe(this.onLogout)}accept(e){var i=this;return f(function*(){yield i.playClient.acceptInvite({id:e.roomId,type:e.roomType,game:e.gameName},{seatId:e.seatId,tableId:e.tableId,roomCode:e.invitationCode}),i.navigation.closeSecondaryOutlets({ignoreGuards:!0}),i.removeFromList(e),i.roomIdIgnoreList.add(e.roomId),i.list=new ie.List})()}decline(e){let i;this.roomIdIgnoreList.add(e.roomId),this.removeFromList(e),i=e.roomType===Jt.RoomType.BlitzTournament?Ve.MatchmakingProtocol.Messages.DeclineBlitzInvitation:Ve.MatchmakingProtocol.Messages.DeclineInvitation,this.communication.emit(i,{roomId:e.roomId})}init(){this.listeners=new ie.List,this.listeners.add(this.playClient.onDispose(this.onPlayClientDispose)),this.listeners.add(this.communication.on(Ve.MatchmakingProtocol.Messages.InviteReceived.toString(),this.onInviteReceived)),this.initialized=!0,this.events.emit("init")}dispose(){this.listeners.forEach(e=>e.detach()),this.listeners=new ie.List,this.roomIdIgnoreList=new ie.List,this.list=new ie.List,this.initialized=!1,this.events.emit("dispose")}addToList(e,i){e.receiverId===this.store.selectUserState().profile.id&&(void 0!==i?this.list.insertAt(i,e):this.list.add(e),this.list.length>=20&&this.list.remove(this.list.first()),this.events.emit("invite",e))}removeFromList(e){return this.list.remove(e)}close(){this.events.emit("close")}onInvite(e){return new ie.EventListener(this.events,"invite",e)}onClose(e){return new ie.EventListener(this.events,"close",e)}onInit(e){return new ie.EventListener(this.events,"init",e)}onDispose(e){return new ie.EventListener(this.events,"dispose",e)}get inviteList(){return this.list}shouldShow(e,i){var r;const s=null==i?void 0:i.currentRoom;return void 0!==i.spectateRoomModel||(null==s?void 0:s.isSpectating)||(null==s||null===(r=s.getViewModel())||void 0===r?void 0:r.state)===Ve.ERoomState.Finalize||this.shouldShowInState(e)}shouldShowInState(e){return e!==yn.RoomFound&&e!==yn.Active}getState(e){if(e.state&&e.state.current)return e.state.current.stateName}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(oo),T(Yt),T(xr),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var Ntt=__webpack_require__(22406),r6=__webpack_require__(36564);let Ftt=(()=>{var t;class n{constructor(){this.sanitizer=C6e}sanitizeHtml(e){return this.sanitizer.sanitize(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var Ii=function(t){return t.Text="text",t.Image="image",t.Emoji="emoji",t.Voice="voice",t.GameRoom="gameRoom",t.Kick="kick",t}(Ii||{}),UI=function(t){return t.Client="client",t.Cdn="cdn",t}(UI||{});let Dk=(()=>{var t;class n{constructor(e){this.inputSanitizer=e}sanitizeMessage(e){return e.type===Ii.Text?this.sanitizeTextMessage(e):e}sanitizeTextMessage(e){return{...e,data:{body:this.inputSanitizer.sanitizeHtml(e.data.body)}}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ftt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class Wd{static getChatModuleByKey(n){return"public"===n?nt.EPermissionModule.GlobalChat:nt.EPermissionModule.PrivateChat}static getMessageAction(n){switch(n){case Ii.Text:return nt.EModuleAction.SendTextMessage;case Ii.Emoji:return nt.EModuleAction.SendEmojiMessage;case Ii.Image:return nt.EModuleAction.SendImageMessage;case Ii.Voice:return nt.EModuleAction.SendVoiceMessage;case Ii.GameRoom:return nt.EModuleAction.SendGameRoomMessage;default:return nt.EModuleAction.SendTextMessage}}}let gC=(()=>{var t;class n{constructor(e,i,r){this.config=e,this.permissionsService=i,this.profanityFilterService=r,this.regex=/\S/}containsBadWord(e,i){return this.profanityFilterService.containsBadWord(i,e)}validateMessage(e,i,r){const s=Wd.getChatModuleByKey(i),a=Wd.getMessageAction(e.type);if(!this.permissionsService.getActionPermission(s,a).isEnabled)throw new Yo.MessageTypeDisabledError;switch(e.type){case Ii.Text:return this.validateTextMessage(e,i,r);case Ii.Image:return this.validateImageMessage(e,i);case Ii.Voice:return this.validateVoiceMessage(e,i);default:return{isValid:!0}}}validateTextMessage(e,i,r){const s=this.config.core.validations.formFields.chatMessage,a=e.data.body.trim().slice(0,s.maxLength);return this.regex.test(a)?this.config.social.chat[i].badWordsFilter.enabled&&this.containsBadWord(r,a)?{isValid:!1,error:new Yo.ForbiddenMessageTextError}:{isValid:!0}:{isValid:!1,error:new Yo.InvalidMessageContentError}}validateImageMessage(e,i){const r=this.config.social.chat[i],s=this.validateImageFileType(e.file,i);return s.isValid?e.file.size>r.images.maxImageSize?{isValid:!1,error:new Yo.MaxSizeExceededError}:{isValid:!0}:s}validateImageFileType(e,i){return-1===Object.keys(this.config.social.chat[i].images.allowedFormats).map(a=>"image/".concat(a)).indexOf(e.type)?{isValid:!1,error:new Yo.DataFormatNotAllowedError}:{isValid:!0}}validateVoiceMessage(e,i){return new Audio(e.data.voice).duration<this.config.social.chat[i].voiceMessageDurationLimit?{isValid:!1,error:new Yo.MaxSizeExceededError}:{isValid:!0}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dr),T(Ti),T(JA))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var zc=function(t){return t.General="general",t.ShareContent="shareContent",t}(zc||{}),pg=function(t){return t.Room="room",t}(pg||{});class Qde{constructor(n,o){this.type=n,this.data=o}}class Utt extends Qde{constructor(){super(zc.General,void 0)}}class Gtt extends Qde{constructor(n){super(zc.ShareContent,n)}}class Vtt extends Gtt{constructor(n){super({shareType:pg.Room,shareData:n})}}class Yde{static createGeneralUsageIntent(){return new Utt}static createShareRoomUsageIntent(n){let o;return n.room.settings.type===Jt.RoomType.BlitzTournament&&(o=new Ve.TournamentRoundsCalculator(n.room.settings.players.count,n.room.settings.game.players.perTeam,n.room.settings.game.players.count,n.room.settings.players.qualifyingSpots)),new Vtt({bet:n.room.settings.transactions.bet,gameName:n.room.settings.game.name,requirements:n.room.settings.requirements,reward:n.room.settings.transactions.placementRewards[1],roomId:n.room.id,roomType:n.room.settings.type,tableId:n.table.id,invitationCode:n.room.invitationCode,description:n.room.settings.description,playersCount:n.room.settings.players.count,tournamentRounds:o?o.maxRounds():void 0,totalPool:n.room.settings.transactions.prizePool})}}class s0{constructor(n){for(let o in n)n.hasOwnProperty(o)&&(this[o]=n[o])}}class ztt extends s0{constructor(n,o){super({type:Ii.Image,data:n}),this.file=o}}class jtt extends s0{constructor(n){super({type:Ii.Text,data:n})}}class Htt extends s0{constructor(n){super({type:Ii.GameRoom,data:n})}}class qtt extends s0{constructor(n){super({type:Ii.Emoji,data:n})}}class Wtt extends s0{constructor(n){super({type:Ii.Voice,data:n})}}class $tt{constructor(n){for(let o in n)n.hasOwnProperty(o)&&(this[o]=n[o])}}class Vh{static createNewMessage(n,o){return new s0({type:n,data:o})}static createNewMessageForResend(n){switch(n.type){case Ii.Text:return this.createNewTextMessage(n.data.body);case Ii.Emoji:return this.createNewEmojiMessage(n.data);case Ii.Image:return this.createNewImageMessage(n.data.fullSizedUrl,null);case Ii.Voice:return this.createNewVoiceMessage(n.data.url,n.data.duration);case Ii.GameRoom:return this.createNewGameRoomMessage(n.data);default:throw new Error("Unknown message type ".concat(n.type))}}static createNewTextMessage(n){return new jtt({body:n})}static createNewImageMessage(n,o){return new ztt({image:n},o)}static createNewVoiceMessage(n,o){return new Wtt({voice:n,duration:o})}static createNewEmojiMessage(n){return new qtt(n)}static createNewGameRoomMessage(n){return new Htt({shareType:n.shareType,shareData:n.shareData,gameName:n.shareData.gameName})}static createNewConversation(n,o){return new $tt({message:n,displayOrder:o})}static createNewShareContentMessage(n){if(n.shareType===pg.Room)return this.createNewGameRoomMessage(n)}}var s6=__webpack_require__(71541),Ktt=__webpack_require__.n(s6);const Jde=new Ot("IPrivateChatSelectorFacade");var l6,a6=function(t){return t.featureKey="privateChat",t}(a6||{}),c6=function(t){return t.ReadConversation="chat.prv.read",t.MessageReceived="chat.prv.msg",t}(c6||{});let Ou=l6=class{constructor(n,o,e){this.sharedRoomsIds=[];for(let i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.currentUserId=o,this.selectChatUsers=()=>e.selectPrivateChatUsers(),this.selectMessagesState=()=>e.selectPrivateConversationMessagesState(n.id),this.selectPrivateMessagesByConversationId=i=>e.selectPrivateMessagesByConversationId(i),this.actions={delete:{inProgress:!1,error:void 0},mute:{inProgress:!1,error:void 0},pin:{inProgress:!1,error:void 0}}}getConversationPartner(){return this.selectChatUsers()[l6.findOtherUserId(this.currentUserId,this)]}oldestMessageId(){const n=this.selectMessagesState();return n[ie.ESort.Desc].length?n[ie.ESort.Desc][0].id:n[ie.ESort.Asc][0].id}getLastSentMessage(){if(this.loadingState.isLoaded){const n=this.selectPrivateMessagesByConversationId({conversationId:this.id,sort:ie.ESort.Desc}).filter(o=>o.isSent);if(n.length)return n[n.length-1]}return this.lastMsg}loadedMessagesLength(){const n=this.selectMessagesState();return this.meta[ie.ESort.Desc].isLastPage?n[ie.ESort.Desc].length:n[ie.ESort.Desc].length+n[ie.ESort.Asc].length}messagesLengthBySort(n=ie.ESort.Desc){return this.selectMessagesState()[n].length}getLastMsg(){if(this.messagesLengthBySort(ie.ESort.Desc)){const n=this.selectPrivateMessagesByConversationId({conversationId:this.id,sort:ie.ESort.Desc});if(n.length)return n[n.length-1]}return this.lastMsg}static findOtherUserId(n,o){return o.users[0]===n?o.users[1]:o.users[0]}static calculateNextPageIndex(n,o){let e=Math.ceil(n/o)-1;return n%o==0&&e++,e}};Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],Ou.prototype,"getConversationPartner",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",String)],Ou.prototype,"oldestMessageId",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],Ou.prototype,"getLastSentMessage",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],Ou.prototype,"loadedMessagesLength",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[String]),ue("design:returntype",Number)],Ou.prototype,"messagesLengthBySort",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],Ou.prototype,"getLastMsg",null),Ou=l6=Qe([ko(),ue("design:paramtypes",[Object,String,J])],Ou);let Ztt=(()=>{let t=class{constructor(o,e){for(let i in o)o.hasOwnProperty(i)&&(this[i]=o[i]);this.isSent=!0,this.actions={delete:{inProgress:!1,error:void 0},send:{inProgress:!1,error:void 0}},this.selectChatUsers=()=>e.selectPrivateChatUsers()}getSender(){return this.selectChatUsers()[this.senderId]}static findOtherUserId(o,e){return e.senderId===o?e.receiverId:e.senderId}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getSender",null),t=Qe([ko(),ue("design:paramtypes",[Object,J])],t),t})(),u6=(()=>{var t;class n{constructor(e,i,r,s){this.store=e,this.userFactory=i,this.messagesPerPage=r.social.chat.private.limitMessagesPerPage,this.urlService=s}createConversation(e){return new Ou(this.createConversationState(e),this.store.selectUserState().profile.id,this.store)}createConversationFromMessage(e){return new Ou(this.createConversationStateFromMessage(e),this.store.selectUserState().profile.id,this.store)}createMessage(e){switch(e.type){case Ii.Image:return this.createMessageInstance(this.buildImageMessageModel(e));case Ii.Voice:return this.createMessageInstance(this.buildVoiceMessageModel(e));default:return this.createMessageInstance(e)}}createClientMessage(e){let i;switch(e.type){case Ii.Image:i=this.buildClientImageMessageModel(e);break;case Ii.Voice:i=this.buildClientVoiceMessageModel(e);break;default:i=e}return this.createMessageInstance({...i,id:i.id||n.generateMessageId()})}createConversationId(e){const i=this.userFactory.createProfileWithOnlineStatus({profile:this.userFactory.createAdminSimpleProfile()}),r=this.store.selectUserState().profile.id;return e===i.profile.id?r:(0,r6.stringToUuid)(Dw([e,r].sort().join("")).toString(Ntt))}createInitialConversationState(){return{meta:{messagesPerPage:this.messagesPerPage,[r6.ESort.Asc]:{queriesInProgress:[],isLastPage:!1},[r6.ESort.Desc]:{queriesInProgress:[],isLastPage:!1}},input:void 0,loadingState:{isLoaded:!1,isLoading:!1,error:void 0},isInPagesList:!0}}createConversationState(e){return{...this.createInitialConversationState(),...e,createdAt:e.createdAt||Bn.instance.getServerTimeMs(),lastMsg:e.lastMsg?this.createMessage(e.lastMsg):e.lastMsg}}createConversationStateFromMessage(e){return{...this.createInitialConversationState(),isAdmin:e.isAdmin,displayOrder:e.conversationDisplayOrder,isMuted:e.isConversationMuted,users:[e.senderId,e.receiverId],id:e.conversationId,unread:1,lastMsg:this.createMessage(e)}}buildImageMessageModel(e){const i={...e.data,thumbnailUrl:this.urlService.createCdnPath({prefix:"chat",url:e.data.thumbnailUrl}),fullSizedUrl:this.urlService.createCdnPath({prefix:"chat",url:e.data.fullSizedUrl})};return{...e,data:i}}buildClientImageMessageModel(e){const i={fullSizedHeight:0,fullSizedWidth:0,thumbnailHeight:0,thumbnailWidth:0,thumbnailUrl:e.data.image,fullSizedUrl:e.data.image};return{...e,data:i}}buildVoiceMessageModel(e){const i={...e.data,url:this.urlService.createCdnPath({prefix:"voice",url:e.data.url})};return{...e,data:i}}buildClientVoiceMessageModel(e){const i={duration:e.data.duration,url:e.data.voice};return{...e,data:i}}createMessageInstance(e){return new Ztt({...e,createdAt:e.createdAt||Bn.instance.getServerTimeMs(),conversationId:e.conversationId||this.createConversationId(e.receiverId),isAdmin:e.isAdmin||!1,clientId:e.clientId||n.generateClientMessageId()},this.store)}static generateMessageId(){return(n.messageId++).toString()}static generateClientMessageId(){return this.generateMessageId()}}return(t=n).messageId=0,t.\u0275fac=function(e){return new(e||t)(T(J),T(Xu),T(Dr),T(ii))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),d6=(()=>{var t;class n{constructor(e,i){this.http=e,this.cs=i}requestConversationsPage(e){return this.http.get("chat/private/?page=".concat(e.page,"&pageCnt=").concat(e.pageCount)).toPromise().then(i=>i.body)}deleteConversation(e){return this.http.delete("chat/private/".concat(e)).toPromise().then(i=>i.body)}muteConversation(e,i){return this.http.post("chat/private/mute/".concat(e),{mute:i}).toPromise().then(r=>r.body)}pinConversation(e,i){return this.http.post("chat/private/pin/".concat(e),{displayOrder:i}).toPromise().then(r=>r.body)}sendMessage(e,i,r){return this.http.post("chat/private/".concat(i),{type:e.type,data:e.data,timestamp:r}).toPromise().then(s=>s.body)}sendMessageToAdmin(e,i){return this.http.post("chat/private/admin",{type:e.type,data:e.data,timestamp:i}).toPromise().then(r=>r.body)}requestMessagesPage(e,i){let r=new $l;return void 0!==e.page&&(r=r.append("page",String(e.page))),void 0!==e.pageCount&&(r=r.append("pageCnt",String(e.pageCount))),void 0!==e.sort&&(r=r.append("sort",String(e.sort))),void 0!==e.lastMsgId&&(r=r.append("lastMsgId",String(e.lastMsgId))),this.http.get("chat/private/".concat(i),{params:r}).toPromise().then(s=>s.body)}requestAdminMessagesPage(e){return this.requestMessagesPage(e,"admin")}deleteMessage(e){return this.http.delete("chat/private/m/".concat(e)).toPromise().then(i=>i.body)}readConversation(e){this.cs.emit(c6.ReadConversation,e)}onMessage(e){return this.cs.on(c6.MessageReceived,e)}onAdminMessage(e){return this.cs.on(rA.NewMessage.toString(),e)}onChatArchived(e){return this.cs.on(rA.ChatArchived.toString(),e)}onAdminMessageDeleted(e){return this.cs.on(rA.MessageDeleted.toString(),e)}onConnectionRestored(e){return this.cs.onReconnect(e)}onConnectionLost(e){return this.cs.onConnectionLost(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Gi=function(t){return t.ResetPrivateChat="[Private Chat] Reset Private Chat",t.OpenConversation="[Private Chat] Open Private Conversation",t.CloseConversation="[Private Chat] Close Private Conversation",t.ReadConversation="[Private Chat] Read Private Conversation",t.OpenChat="[Private Chat] Open Private Chat",t.CloseChat="[Private Chat] Close Private Chat",t.SetChatIntent="[Private Chat] Set Private Chat Intent",t.ResetChatIntent="[Private Chat] Reset Private Chat Intent",t.MarkChatAsSeen="[Private Chat] Mark Private Chat As Seen",t.AddReceivedMessage="[Private Chat] Add Received Private Message",t.AddPrivateConversation="[Private Chat] Add Private Conversation",t.ArchiveAdminPrivateConversation="[Private Chat] Archive Admin Private Conversation",t.ArchivePrivateSelectedConversation="[Private Chat] Archive Private Selected Conversation",t.AdminPrivateMessageDeleted="[Private Chat] Admin Private Message Deleted",t.GetPrivateChat="[Private Chat] Get Private Chat",t.GetPrivateChatSuccess="[Private Chat] Get Private Chat Success",t.GetPrivateChatError="[Private Chat] Get Private Chat Error",t.DeleteConversation="[Private Chat] Delete Conversation",t.DeleteConversationSuccess="[Private Chat] Delete Conversation Success",t.DeleteConversationError="[Private Chat] Delete Conversation Error",t.MuteConversation="[Private Chat] Mute Conversation",t.MuteConversationSuccess="[Private Chat] Mute Conversation Success",t.MuteConversationError="[Private Chat] Mute Conversation Error",t.PinConversation="[Private Chat] Pin Conversation",t.PinConversationSuccess="[Private Chat] Pin Conversation Success",t.PinConversationError="[Private Chat] Pin Conversation Error",t.SendMessage="[Private Chat] Send Message",t.SendMessageSuccess="[Private Chat] Send Message Success",t.SendMessageError="[Private Chat] Send Message Error",t.ResendMessage="[Private Chat] Resend Message",t.GetPrivateMessages="[Private Chat] Get Private Messages",t.GetPrivateMessagesSuccess="[Private Chat] Get Private Messages Success",t.GetPrivateMessagesError="[Private Chat] Get Private Messages Error",t.DeleteMessage="[Private Chat] Delete Message",t.DeleteMessageSuccess="[Private Chat] Delete Message Success",t.DeleteMessageError="[Private Chat] Delete Message Error",t.ShareContent="[Private Chat] Share Content",t.ShareContentSuccess="[Private Chat] Share Content Success",t.ShareContentError="[Private Chat] Share Content Error",t.SynchronizeChat="[Private Chat] Synchronize Chat",t.SynchronizeChatSuccess="[Private Chat] Synchronize Chat Success",t.SynchronizeChatError="[Private Chat] Synchronize Chat Error",t.RemoveConversations="[Private Chat] Remove Conversations",t.ClearConversationMessages="[Private Chat] Clear Conversation Messages",t.SetMaintenanceState="[Private Chat] Set maintenance state",t.ChatConnectionRestored="[Private Chat] Chat connection restored",t.SetChatInitializedState="[Private Chat] Set Chat Initialized State",t}(Gi||{});const Xde=he(Gi.ResetPrivateChat),Bk=he(Gi.OpenConversation,{_as:"props",_p:void 0}),p6=he(Gi.CloseConversation,{_as:"props",_p:void 0}),epe=he(Gi.ReadConversation,{_as:"props",_p:void 0}),Qtt=he(Gi.OpenChat),tpe=(he(Gi.CloseChat),he(Gi.SetChatIntent,{_as:"props",_p:void 0}),he(Gi.ResetChatIntent),he(Gi.MarkChatAsSeen)),Nk=he(Gi.AddPrivateConversation,{_as:"props",_p:void 0}),GI=he(Gi.AddReceivedMessage,{_as:"props",_p:void 0}),h6=he(Gi.ArchiveAdminPrivateConversation,{_as:"props",_p:void 0}),npe=he(Gi.ArchivePrivateSelectedConversation),m6=he(Gi.AdminPrivateMessageDeleted,{_as:"props",_p:void 0}),ipe=he(Gi.GetPrivateChat),ope=he(Gi.GetPrivateChatSuccess,{_as:"props",_p:void 0}),rpe=he(Gi.GetPrivateChatError,{_as:"props",_p:void 0}),spe=he(Gi.DeleteConversation,{_as:"props",_p:void 0}),f6=he(Gi.DeleteConversationSuccess,{_as:"props",_p:void 0}),ape=he(Gi.DeleteConversationError,{_as:"props",_p:void 0}),cpe=he(Gi.MuteConversation,{_as:"props",_p:void 0}),lpe=he(Gi.MuteConversationSuccess,{_as:"props",_p:void 0}),upe=he(Gi.MuteConversationError,{_as:"props",_p:void 0}),dpe=he(Gi.PinConversation,{_as:"props",_p:void 0}),Fk=he(Gi.PinConversationSuccess,{_as:"props",_p:void 0}),ppe=he(Gi.PinConversationError,{_as:"props",_p:void 0}),hpe=he(Gi.GetPrivateMessages,{_as:"props",_p:void 0}),mpe=he(Gi.GetPrivateMessagesSuccess,{_as:"props",_p:void 0}),fpe=he(Gi.GetPrivateMessagesError,{_as:"props",_p:void 0}),Uk=he(Gi.SendMessage,{_as:"props",_p:void 0}),Gk=he(Gi.SendMessageSuccess,{_as:"props",_p:void 0}),g6=he(Gi.SendMessageError,{_as:"props",_p:void 0}),gpe=he(Gi.ResendMessage,{_as:"props",_p:void 0}),_pe=he(Gi.DeleteMessage,{_as:"props",_p:void 0}),_6=he(Gi.DeleteMessageSuccess,{_as:"props",_p:void 0}),vpe=he(Gi.DeleteMessageError,{_as:"props",_p:void 0}),bpe=he(Gi.ShareContent,{_as:"props",_p:void 0}),Ytt=he(Gi.ShareContentSuccess,{_as:"props",_p:void 0}),Cpe=he(Gi.ShareContentError,{_as:"props",_p:void 0}),ype=he(Gi.SynchronizeChat),Spe=he(Gi.SynchronizeChatSuccess),wpe=he(Gi.SynchronizeChatError,{_as:"props",_p:void 0}),v6=he(Gi.RemoveConversations,{_as:"props",_p:void 0}),Tpe=he(Gi.ClearConversationMessages,{_as:"props",_p:void 0}),Ppe=he(Gi.SetMaintenanceState,{_as:"props",_p:void 0}),b6=he(Gi.ChatConnectionRestored),Ipe=he(Gi.SetChatInitializedState,{_as:"props",_p:void 0}),us=ki({selectId:t=>t.id,sortComparer:(t,n)=>!t.isAdmin&&!n.isAdmin||t.isAdmin&&n.isAdmin?(t.displayOrder||n.displayOrder)&&n.displayOrder!==t.displayOrder?n.displayOrder-t.displayOrder:n.createdAt-t.createdAt:n.isAdmin?1:-1}),jc=ki({selectId:t=>t.id,sortComparer:(t,n)=>t.createdAt-n.createdAt}),ou=ki({selectId:t=>t.conversationId,sortComparer:!1}),ev=ki({selectId:t=>t.profile.id,sortComparer:!1}),Mpe={isInitialized:!1,conversations:us.getInitialState({unread:[],hasUnseenMessages:!1,synchronizeState:{isSynced:!0,isSynchronizing:!1,error:void 0},isInMaintenance:!1,loadingState:{isLoaded:!1,isLoading:!1,error:void 0},meta:{isLastPage:!1},selected:void 0}),messages:jc.getInitialState(),conversationsMessages:ou.getInitialState(),users:ev.getInitialState()},Jtt=Sr(Mpe,de(Xde,()=>Mpe),de(Bk,(t,n)=>Se(t,o=>{o.conversations.selected=n.conversationId})),de(p6,(t,n)=>{const o=ud(t,t.conversations.selected),e=ud(t,n.conversationId);if(!o||!e)return t;const i=_C(t,e.id),r=jc.getSelectors().selectAll(t.messages).filter(w=>i[ie.ESort.Desc].find(R=>R.id===w.id)).map(w=>({id:w.id,createdAt:w.createdAt})),s=r.length,a=r.slice(Math.max(s-e.meta.messagesPerPage,0),s),c=i[ie.ESort.Desc].concat(i[ie.ESort.Asc]).map(w=>w.id).filter(w=>!a.find(R=>R.id===w)),u=e.meta[ie.ESort.Desc].isLastPage&&a.length===s,h=Se(e,w=>{w.loadingState.isLoading=!1,w.loadingState.error=void 0,w.meta[ie.ESort.Desc].queriesInProgress=[],w.meta[ie.ESort.Desc].isLastPage=u,w.meta[ie.ESort.Asc].queriesInProgress=[],w.meta[ie.ESort.Asc].isLastPage=u}),b=mg(e.id);return b.messages[ie.ESort.Desc]=a,b.messages[ie.ESort.Asc]=u?a:[],{...t,conversations:{...us.updateOne({id:e.id,changes:h},t.conversations),selected:o&&o.id===n.conversationId?void 0:o.id},messages:jc.removeMany(c,t.messages),conversationsMessages:ou.updateOne({id:e.id,changes:b},t.conversationsMessages)}}),de(epe,(t,n)=>Se(t,o=>{o.conversations=us.updateOne({id:n.conversationId,changes:{unread:0}},t.conversations),o.conversations.unread=t.conversations.unread.filter(e=>e.id!==n.conversationId),o.conversations.hasUnseenMessages=o.conversations.unread.length>0})),de(tpe,t=>Se(t,n=>{n.conversations.hasUnseenMessages=!1})),de(cw,(t,n)=>Se(t,o=>{o.conversations.unread=n.chat.unreadPrivateConversations})),de(ipe,t=>Se(t,n=>{n.conversations.loadingState.isLoading=!0})),de(ope,(t,n)=>{const o=t.conversations.synchronizeState.isSynced?n.list.map(i=>({...i,...t.conversations.entities[i.id],isInPagesList:!0,createdAt:i.createdAt})):n.list,e=o.map(i=>mg(i.id));return{...t,conversations:{...us.upsertMany(o,t.conversations),hasUnseenMessages:t.conversations.unread.length>0,isInMaintenance:!1,meta:{isLastPage:n.list.filter(i=>!i.isAdmin).length<n.itemsPerPage},loadingState:{...t.conversations.loadingState,isLoading:!1,isLoaded:!0,error:void 0}},users:ev.upsertMany(n.users,t.users),conversationsMessages:ou.addMany(e,t.conversationsMessages)}}),de(rpe,(t,n)=>Se(t,o=>{o.conversations.loadingState.isLoading=!1,o.conversations.loadingState.error=n})),de(hpe,(t,n)=>{const o=function ent(t,n){return us.getSelectors().selectAll(t.conversations).find(o=>-1!==o.users.indexOf(n))}(t,n.userId);if(!o)return t;const e=Se({...o},i=>{i.meta[n.query.sort].queriesInProgress.push(n.query),i.loadingState.isLoading=!0});return{...t,conversations:us.updateOne({id:o.id,changes:e},t.conversations)}}),de(mpe,(t,n)=>{const o=t.conversations.entities[n.conversationId],e=n.query.sort===ie.ESort.Asc?ie.ESort.Desc:ie.ESort.Asc,i=_C(t,n.conversationId),r=0!==s6(i[e].map(te=>te.id),n.messages.map(te=>te.id)).length,s=n.messages.length<o.meta.messagesPerPage||r,a={...o.meta[e],isLastPage:s},c=i[n.query.sort],u=hg(n.messages),h=u.filter(te=>!c.find(ee=>ee.id===te.id));let b=hg(c.concat(h)),w=i[e],R=[],G=[];if(s){const te=hg(XA(b.concat(w),"id"));G=te,R=te}else G=b,R=w;const K=Se({...o},te=>{te.createdAt=!o.createdAt&&u.length?u[u.length-1].createdAt:o.createdAt,te.loadingState.isLoaded=!0,te.loadingState.isLoading=!1,te.meta[n.query.sort].isLastPage=s,te.meta[n.query.sort].queriesInProgress=Ope(te,n.query),te.meta[e]=a});return{...t,conversations:us.updateOne({id:n.conversationId,changes:K},t.conversations),messages:jc.upsertMany(n.messages,t.messages),users:ev.upsertMany(n.users,t.users),conversationsMessages:ou.upsertOne({conversationId:n.conversationId,messages:{...i,[n.query.sort]:G,[e]:R}},t.conversationsMessages)}}),de(fpe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.meta[n.query.sort].queriesInProgress=Ope(i,n.query),i.loadingState.isLoading=!1,i.loadingState.error=n.error});return{...t,conversations:us.updateOne({id:o.id,changes:e},t.conversations)}}),de(_pe,(t,n)=>{const o=VI(t,n.id);if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.delete.inProgress=!0})};return Se(t,i=>{i.messages=jc.updateOne(e,t.messages)})}),de(_6,(t,n)=>{const o=_C(t,n.conversationId),e=o[ie.ESort.Desc].filter(a=>a.id!==n.messageId),i=mg(n.conversationId);i.messages[ie.ESort.Desc]=e,i.messages[ie.ESort.Asc]=o[ie.ESort.Asc].filter(a=>a.id!==n.messageId);const s=VI(t,e[e.length-1].id);return{...t,conversations:us.updateOne({id:n.conversationId,changes:{createdAt:s.createdAt}},t.conversations),messages:jc.removeOne(n.messageId,t.messages),conversationsMessages:ou.upsertOne(i,t.conversationsMessages)}}),de(vpe,(t,n)=>{const o=VI(t,n.id);if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.delete.inProgress=!1})};return Se(t,i=>{i.messages=jc.updateOne(e,t.messages)})}),de(spe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e={id:n.conversationId,changes:Se({...o},i=>{i.actions.delete.inProgress=!0})};return Se(t,i=>{i.conversations=us.updateOne(e,t.conversations)})}),de(f6,(t,n)=>{const o=t.conversations.selected&&t.conversations.selected===n.conversationId;return{...t,conversations:{...us.removeOne(n.conversationId,t.conversations),unread:t.conversations.unread.filter(e=>e.id!==n.conversationId),selected:o?void 0:t.conversations.selected},messages:jc.removeMany(e=>e.conversationId===n.conversationId,t.messages),conversationsMessages:ou.removeOne(n.conversationId,t.conversationsMessages)}}),de(ape,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.delete.inProgress=!1});return{...t,conversations:us.updateOne({id:o.id,changes:e},t.conversations)}}),de(cpe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e={id:n.conversationId,changes:Se({...o},i=>{i.actions.mute.inProgress=!0})};return Se(t,i=>{i.conversations=us.updateOne(e,t.conversations)})}),de(lpe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e={id:n.conversationId,changes:Se({...o},i=>{i.actions.mute.inProgress=!1,i.isMuted=n.mute,i.unread=0})};return Se(t,i=>{i.conversations=us.updateOne(e,t.conversations),i.conversations.unread=t.conversations.unread.filter(r=>r.id!==o.id)})}),de(upe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.mute.inProgress=!1});return{...t,conversations:us.updateOne({id:o.id,changes:e},t.conversations)}}),de(dpe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e={id:n.conversationId,changes:Se({...o},i=>{i.actions.pin.inProgress=!0})};return Se(t,i=>{i.conversations=us.updateOne(e,t.conversations)})}),de(Fk,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;let e=!0;const i=us.getSelectors().selectAll(t.conversations).filter(s=>!s.isAdmin);!n.displayOrder&&i.length>=n.itemsPerPage&&(e=i[i.length-1].createdAt<=o.createdAt);const r={id:n.conversationId,changes:Se({...o},s=>{s.actions.pin.inProgress=!1,s.displayOrder=n.displayOrder,s.isInPagesList=e})};return Se(t,s=>{s.conversations=us.updateOne(r,t.conversations)})}),de(ppe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.pin.inProgress=!1});return{...t,conversations:us.updateOne({id:o.id,changes:e},t.conversations)}}),de(Nk,(t,n)=>({...t,conversations:us.upsertOne(n.conversation,t.conversations),users:ev.upsertMany(n.users,t.users),conversationsMessages:ou.upsertOne(mg(n.conversation.id),t.conversationsMessages)})),de(Uk,(t,n)=>{const o=t.conversations.entities[n.message.conversationId];if(!o)return t;const e=Se({...n.message},u=>{u.isSent=!1,u.actions.send={inProgress:!0,error:void 0}}),i=_C(t,o.id),r={id:n.message.id,createdAt:n.message.createdAt},s=i[ie.ESort.Asc],a=i[ie.ESort.Desc],c=mg(o.id);return c.messages[ie.ESort.Asc]=o.meta[ie.ESort.Asc].isLastPage?hg(s.concat(r)):s,c.messages[ie.ESort.Desc]=hg(a.concat(r)),{...t,messages:jc.upsertOne(e,t.messages),users:ev.upsertOne(n.sender,t.users),conversationsMessages:ou.upsertOne(c,t.conversationsMessages)}}),de(gpe,(t,n)=>Se(t,o=>{const e=Se({...n.message},i=>{i.actions.send.inProgress=!0,i.actions.send.error=void 0});o.messages=jc.upsertOne(e,t.messages)})),de(Gk,(t,n)=>{const o=t.conversations.entities[n.message.conversationId];if(!o||!VI(t,n.tempMessageId))return t;const i=_C(t,o.id),r={id:n.message.conversationId,changes:{createdAt:n.message.createdAt,isInPagesList:!0}},s={id:n.tempMessageId,changes:{...n.message,isSent:!0}},a={id:n.message.id,createdAt:n.message.createdAt},c=i[ie.ESort.Asc].filter(b=>b.id!==n.tempMessageId),u=i[ie.ESort.Desc].filter(b=>b.id!==n.tempMessageId),h=mg(o.id);return h.messages[ie.ESort.Asc]=o.meta[ie.ESort.Asc].isLastPage?hg(c.concat(a)):c,h.messages[ie.ESort.Desc]=hg(u.concat(a)),{...t,conversations:us.updateOne(r,t.conversations),messages:jc.updateOne(s,t.messages),users:ev.upsertOne(n.sender,t.users),conversationsMessages:ou.upsertOne(h,t.conversationsMessages)}}),de(GI,(t,n)=>{const o=t.conversations.selected&&t.conversations.selected===n.message.conversationId,e=Epe(),i=t.conversations.entities[n.message.conversationId];if(!i)return t;const r=_C(t,i.id),s=i.getLastMsg()&&i.getLastMsg().id===n.message.id;let a=[],c=0;n.message.isConversationMuted?a=t.conversations.unread:(c=s||o&&e?i.unread:i.unread+1,a=void 0!==t.conversations.unread.find(K=>K.id===n.message.conversationId)||o&&e?t.conversations.unread:t.conversations.unread.concat({id:n.message.conversationId,isAdmin:n.message.isAdmin}));const u={id:n.message.conversationId,changes:{createdAt:n.message.createdAt,isInPagesList:!0,unread:c}},h={id:n.message.id,createdAt:n.message.createdAt},b=r[ie.ESort.Asc],w=r[ie.ESort.Desc],R=mg(i.id);return R.messages[ie.ESort.Asc]=i.meta[ie.ESort.Asc].isLastPage?hg(b.concat(h)):b,R.messages[ie.ESort.Desc]=hg(w.concat(h)),{...t,conversations:{...us.updateOne(u,t.conversations),hasUnseenMessages:!Epe()&&a.length>0,unread:a},messages:jc.upsertOne(n.message,t.messages),users:ev.upsertOne(n.sender,t.users),conversationsMessages:ou.upsertOne(R,t.conversationsMessages)}}),de(g6,(t,n)=>{const o=VI(t,n.id);if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.send.inProgress=!1,i.actions.send.error=n.error})};return Se(t,i=>{i.messages=jc.updateOne(e,t.messages)})}),de(h6,(t,n)=>Se(t,o=>{o.conversations=us.removeOne(n.conversationId,t.conversations),o.conversations.unread=o.conversations.unread.filter(e=>e.id!==n.conversationId),o.conversations.selected=o.conversations.selected===n.conversationId?void 0:o.conversations.selected,o.messages=jc.removeMany(e=>e.conversationId===n.conversationId,t.messages),o.conversationsMessages=ou.removeOne(n.conversationId,t.conversationsMessages)})),de(m6,(t,n)=>{const o=t.conversations.entities[n.conversationId];if(!o)return t;const e=_C(t,n.conversationId),i=mg(o.id);return i.messages[ie.ESort.Asc]=e[ie.ESort.Asc].filter(r=>r.id!==n.messageId),i.messages[ie.ESort.Desc]=e[ie.ESort.Desc].filter(r=>r.id!==n.messageId),{...t,messages:jc.removeOne(n.messageId,t.messages),conversationsMessages:ou.updateOne({id:n.conversationId,changes:i},t.conversationsMessages)}}),de(bpe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{n.content.shareType===pg.Room&&(i.sharedRoomsIds=o.sharedRoomsIds.concat(n.content.shareData.roomId))});return{...t,conversations:us.updateOne({id:n.conversationId,changes:e},t.conversations)}}),de(Cpe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{if(n.content.shareType===pg.Room){const r=n.content.shareData.roomId;i.sharedRoomsIds=i.sharedRoomsIds.filter(s=>s!==r)}});return{...t,conversations:us.updateOne({id:n.conversationId,changes:e},t.conversations)}}),de(v6,(t,n)=>Se(t,o=>{o.conversations={meta:{isLastPage:!1},selected:-1!==n.ids.indexOf(t.conversations.selected)?void 0:t.conversations.selected,unread:o.conversations.unread.filter(e=>void 0!==n.ids.find(i=>i===e.id)),...us.removeMany(n.ids,t.conversations)},o.messages=jc.removeMany(e=>-1!==n.ids.indexOf(e.conversationId),t.messages),o.conversationsMessages=ou.removeMany(n.ids,t.conversationsMessages)})),de(Tpe,(t,n)=>{const o=ud(t,n.conversationId);if(!o)return t;const e={id:n.conversationId,changes:{meta:{...o.meta,[ie.ESort.Asc]:{...o.meta[ie.ESort.Asc],isLastPage:!1},[ie.ESort.Desc]:{...o.meta[ie.ESort.Desc],isLastPage:!1}}}};return{...t,conversations:us.updateOne(e,t.conversations),messages:jc.removeMany(i=>i.conversationId===n.conversationId,t.messages),conversationsMessages:ou.updateOne({id:n.conversationId,changes:mg(n.conversationId)},t.conversationsMessages)}}),de(b6,t=>Se(t,n=>{n.conversations.synchronizeState.isSynced=!1})),de(Ppe,(t,n)=>Se(t,o=>{o.conversations.isInMaintenance=n.isInMaintenance})),de(ype,t=>Se(t,n=>{n.conversations.synchronizeState.isSynchronizing=!0})),de(Spe,t=>Se(t,n=>{n.conversations.synchronizeState.isSynced=!0,n.conversations.synchronizeState.isSynchronizing=!1,n.conversations.synchronizeState.error=void 0})),de(wpe,(t,n)=>Se(t,o=>{o.conversations.synchronizeState.isSynced=!1,o.conversations.synchronizeState.isSynchronizing=!1,o.conversations.synchronizeState.error=n.error})),de(Ipe,(t,n)=>({...t,isInitialized:n.isInitialized})));function Xtt(t,n){return Jtt(t,n)}function hg(t,n=ie.ESort.Asc){return Zf(t,["createdAt"],[n])}function ud(t,n){return us.getSelectors().selectEntities(t.conversations)[n]}function VI(t,n){return jc.getSelectors().selectEntities(t.messages)[n]}function _C(t,n){return ou.getSelectors().selectEntities(t.conversationsMessages)[n].messages}function Ope(t,n){return t.meta[n.sort].queriesInProgress.filter(o=>!Kf(o,n))}function mg(t){return{conversationId:t,messages:{[ie.ESort.Desc]:[],[ie.ESort.Asc]:[]}}}function Epe(){return J.prototype.selectPrivateChatIsOpened()}let zI=(()=>{var t;let n=((t=class{constructor(e,i,r,s,a,c,u,h,b,w){this.listeners=new ie.List,this.onAdminMessageDeleted=R=>{const G=this.store.selectPrivateConversationsList().find(K=>K.isAdmin);G&&this.store.dispatch(m6({messageId:R.messageId,conversationId:G.id}))},this.store=e,this.userRepository=i,this.userFactory=r,this.chatItemsFactory=s,this.chatClient=a,this.messageValidator=c,this.messageSanitizer=h,this.config=u,this.translations=b,this.conversationsPerPage=u.social.chat.private.limitConversationsPerPage,this.setupProvidedSelectors(w)}getConversations(e){var i=this;return f(function*(){const r=i.store.selectPrivateConversationsState();try{if(r.loadingState.isLoaded&&r.synchronizeState.isSynced){const w=e.page*i.conversationsPerPage,R=w+e.pageCount*i.conversationsPerPage,G=i.store.selectPrivateConversationsList().filter(K=>K.isInPagesList&&!K.isAdmin).slice(w,R);if(r.meta.isLastPage||G.length===e.pageCount*i.conversationsPerPage)return G}i.store.dispatch(ipe());const s=yield i.chatClient.requestConversationsPage(e),a=i.userFactory.createProfileWithOnlineStatus({profile:i.store.selectUserState().profile}),c=i.userFactory.createProfileWithOnlineStatus({profile:i.userFactory.createAdminSimpleProfile()}),u=s.conversations.map(w=>(w.isAdmin&&w.users.push(c.profile.id),i.chatItemsFactory.createConversation({isMuted:!1,displayOrder:0,...w}))),h=u.filter(w=>!w.isAdmin).map(w=>Ou.findOtherUserId(a.profile.id,w)),b=[a,...yield i.userRepository.getSimpleProfilesWithOnlineStatus(h),c];return i.store.dispatch(ope({list:u,itemsPerPage:i.conversationsPerPage,users:b})),u}catch(s){const a=jt.createErrorInstance(s);throw i.store.dispatch(rpe(a)),i.handleCommonErrors(a),a}})()}getNextConversations(e=1){var i=this;return f(function*(){const r=i.store.selectPrivateConversationsList().filter(a=>a.isInPagesList&&!a.isAdmin).length,s={page:Ou.calculateNextPageIndex(r,i.conversationsPerPage),pageCount:e};return i.getConversations(s)})()}deleteConversation(e){var i=this;return f(function*(){const r=i.chatItemsFactory.createConversationId(e);try{i.store.dispatch(spe({conversationId:r})),yield i.chatClient.deleteConversation(r),i.store.dispatch(f6({conversationId:r}))}catch(s){const a=jt.createErrorInstance(s);throw i.store.dispatch(ape({conversationId:r,error:a})),i.handleCommonErrors(a),a}})()}muteConversation(e,i){var r=this;return f(function*(){const s=r.chatItemsFactory.createConversationId(e);try{r.store.dispatch(cpe({conversationId:s})),yield r.chatClient.muteConversation(s,i),r.store.dispatch(lpe({conversationId:s,mute:i}))}catch(a){const c=jt.createErrorInstance(a);throw r.store.dispatch(upe({conversationId:s,error:c})),r.handleCommonErrors(c),c}})()}pinConversation(e,i){var r=this;return f(function*(){const s=r.chatItemsFactory.createConversationId(e);try{r.store.dispatch(dpe({conversationId:s})),yield r.chatClient.pinConversation(s,i),r.store.dispatch(Fk({conversationId:s,displayOrder:i,itemsPerPage:r.conversationsPerPage}))}catch(a){const c=jt.createErrorInstance(a);throw r.store.dispatch(ppe({conversationId:s,error:c})),r.handleCommonErrors(c),c}})()}sendMessage(e,i){var r=this;return f(function*(){const s=r.messageSanitizer.sanitizeMessage(e),a=r.translations.getCurrentLang(),c=r.messageValidator.validateMessage(s,"private",a);if(!c.isValid)throw c.error;const u=r.userFactory.createProfileWithOnlineStatus({profile:r.store.selectUserState().profile}),h={type:s.type,senderId:u.profile.id,receiverId:i,data:s.data},b=r.chatItemsFactory.createClientMessage(h);try{r.store.dispatch(Uk({message:b,sender:u}));const w=yield r.chatClient.sendMessage(s,i,b.createdAt),R=r.chatItemsFactory.createClientMessage({id:w.messageId,...h,clientId:b.clientId,createdAt:b.createdAt});return r.store.dispatch(Gk({message:R,tempMessageId:b.id,sender:u})),w}catch(w){const R=jt.createErrorInstance(w);throw r.store.dispatch(g6({id:b.id,error:R})),r.handleCommonErrors(R),R}})()}resendMessage(e){var i=this;return f(function*(){try{const r=i.store.selectPrivateMessage(e);if(!r)throw Error("Message not found");const s=Vh.createNewMessageForResend(r),a={id:r.id,conversationId:r.conversationId,senderId:r.senderId,receiverId:r.receiverId,type:r.type,data:s.data},c=i.chatItemsFactory.createClientMessage(a);i.store.dispatch(gpe({message:c}));const u=yield i.chatClient.sendMessage(s,r.receiverId,c.createdAt),h=i.chatItemsFactory.createClientMessage({...a,id:u.messageId});return i.store.dispatch(Gk({message:h,tempMessageId:r.id,sender:r.getSender()})),u}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(g6({id:e,error:s})),i.handleCommonErrors(s),s}})()}getMessages(e,i){var r=this;return f(function*(){const s=r.chatItemsFactory.createConversationId(i);try{const a=r.store.selectPrivateConversationById(s);if(a&&a.loadingState.isLoaded){const R=a.meta[e.sort],G=r.store.selectPrivateMessagesByConversationId({conversationId:a.id,sort:e.sort});let K,te;const ee=e.pageCount*a.meta.messagesPerPage;if(e.lastMsgId){const me=G.findIndex(ge=>ge.id===e.lastMsgId)+1;e.sort===ie.ESort.Desc?(K=Math.max(0,me-ee),te=me):(K=me,te=K+ee)}else K=e.page*a.meta.messagesPerPage,te=K+ee;const le=G.slice(K,te);if(R.isLastPage||le.length===ee)return G}r.store.dispatch(hpe({query:e,userId:i}));const c=r.userFactory.createProfileWithOnlineStatus({profile:r.userFactory.createAdminSimpleProfile()}),u=a.isAdmin?yield r.chatClient.requestAdminMessagesPage(e):yield r.chatClient.requestMessagesPage(e,a.id);if(!r.store.selectHasPrivateActiveMessagesQuery({conversationId:a.id,query:e}))return[];const b=[r.userFactory.createProfileWithOnlineStatus({profile:r.store.selectUserState().profile}),a.isAdmin?c:(yield r.userRepository.getSimpleProfilesWithOnlineStatus([i]))[0]],w=u.messages.map(R=>(R.senderId=R.isAdmin?c.profile.id:R.senderId,r.chatItemsFactory.createMessage(R)));return e.lastMsgId&&!r.store.selectPrivateMessagesByConversationId({conversationId:a.id,sort:e.sort}).find(R=>R.id===e.lastMsgId)&&w.push(a.getLastMsg()),r.store.dispatch(mpe({conversationId:a.id,messages:w,query:e,users:b})),w}catch(a){const c=jt.createErrorInstance(a);throw r.store.dispatch(fpe({query:e,error:c,conversationId:s})),r.handleCommonErrors(c),c}})()}getNextMessages(e,i={pageCount:1,sort:ie.ESort.Asc}){var r=this;return f(function*(){const s={pageCount:i.pageCount,sort:i.sort},a=r.store.selectPrivateMessagesByConversationId({conversationId:e.id,sort:i.sort});let c=i.sort===ie.ESort.Desc?a[0]||e.getLastMsg():a[a.length-1];return c?s.lastMsgId=c.id:s.page=Ou.calculateNextPageIndex(e.messagesLengthBySort(s.sort),e.meta.messagesPerPage),r.getMessages(s,e.getConversationPartner().profile.id)})()}deleteMessage(e,i){var r=this;return f(function*(){try{r.store.dispatch(_pe({id:e})),yield r.chatClient.deleteMessage(e),r.store.dispatch(_6({messageId:e,conversationId:i}))}catch(s){const a=jt.createErrorInstance(s);throw r.store.dispatch(vpe({id:e,error:a})),r.handleCommonErrors(a),a}})()}readConversation(e,i){this.chatClient.readConversation(i),this.store.dispatch(epe({conversationId:e}))}shareContent(e,i){var r=this;return f(function*(){try{r.store.dispatch(bpe({content:e,conversationId:i}));const s=r.store.selectPrivateConversationById(i);yield r.sendMessage(Vh.createNewShareContentMessage(e),s.getConversationPartner().profile.id),r.store.dispatch(Ytt({conversationId:i}))}catch(s){throw console.warn(s),r.store.dispatch(Cpe({content:e,conversationId:i,error:s})),r.handleCommonErrors(s),s}})()}openConversation(e){var i=this;return f(function*(){const r=i.chatItemsFactory.createConversationId(e);try{if(i.store.dispatch(Bk({conversationId:r})),!i.store.selectPrivateConversationById(r)){const s=[i.userFactory.createProfileWithOnlineStatus({profile:i.store.selectUserState().profile}),(yield i.userRepository.getSimpleProfilesWithOnlineStatus([e]))[0]],a=i.chatItemsFactory.createConversation({id:r,isAdmin:!1,unread:0,isMuted:!1,displayOrder:0,users:s.map(c=>c.profile.id),createdAt:void 0,lastMsg:void 0,isInPagesList:!1});i.store.dispatch(Nk({conversation:a,users:s}))}yield i.getMessages({page:0,pageCount:1,sort:ie.ESort.Desc},e)}catch(s){console.warn(s)}})()}closeConversation(e){const i=this.chatItemsFactory.createConversationId(e);this.store.dispatch(p6({conversationId:i}))}openChat(e={}){this.store.dispatch(Qtt()),this.markChatAsSeen(),e.userId&&this.openConversation(e.userId)}markChatAsSeen(){this.store.dispatch(tpe())}initialize(){this.store.selectPrivateChatState().isInitialized||(this.store.dispatch(Ipe({isInitialized:!0})),this.listeners.add(this.chatClient.onMessage(this.onMessageReceived.bind(this))),this.listeners.add(this.chatClient.onAdminMessage(this.onMessageReceived.bind(this))),this.listeners.add(this.chatClient.onChatArchived(this.onConversationArchived.bind(this))),this.listeners.add(this.chatClient.onAdminMessageDeleted(this.onAdminMessageDeleted)),this.listeners.add(this.chatClient.onConnectionRestored(this.onConnectionRestored.bind(this))),this.listeners.add(this.chatClient.onConnectionLost(this.onConnectionLost.bind(this))))}dispose(){this.listeners.forEach(e=>e.detach()),this.stopTryToSynchronizeChatCycle(),this.store.dispatch(Xde())}onConnectionLost(){this.stopTryToSynchronizeChatCycle()}onConnectionRestored(){this.store.dispatch(b6())}synchronizeChat(){var e=this;return f(function*(){const i=e.store.selectPrivateConversationsState();if(i.synchronizeState.isSynchronizing)return;const r=e.store.selectPrivateOpenedConversation();if(!i.synchronizeState.isSynced){const u=e.store.selectPrivateConversationsList().filter(h=>h.id!==r).map(h=>h.id);e.store.dispatch(v6({ids:u}))}const s=e.store.selectPrivateOpenedConversationModel(),a=Ou.calculateNextPageIndex(i.ids.length,e.conversationsPerPage),c={page:0,pageCount:Math.max(a,1)};try{if(e.store.dispatch(ype()),yield e.getConversations(c),r&&!i.synchronizeState.isSynced){e.store.dispatch(Tpe({conversationId:r}));try{yield e.getMessages({page:0,pageCount:Ou.calculateNextPageIndex(s.messagesLengthBySort(ie.ESort.Desc),s.meta.messagesPerPage)+1,sort:ie.ESort.Desc},s.getConversationPartner().profile.id)}catch(u){s&&e.closeConversation(s.getConversationPartner().profile.id)}}e.store.dispatch(Spe())}catch(u){throw s&&e.closeConversation(s.getConversationPartner().profile.id),e.store.dispatch(v6({ids:e.store.selectPrivateConversationsList().map(h=>h.id)})),e.store.dispatch(wpe({error:u})),u}})()}startTryToSynchronizeChatCycle(){var e=this;this.stopTryToSynchronizeChatCycle(),this.retryIntervalId=setInterval(f(function*(){try{yield e.synchronizeChat(),e.stopTryToSynchronizeChatCycle()}catch(i){console.warn(i)}}),1e3*(0,ie.randomInt)(30,60))}stopTryToSynchronizeChatCycle(){clearInterval(this.retryIntervalId)}handleCommonErrors(e){e instanceof lt.ServerUnavailableError&&this.store.dispatch(Ppe({isInMaintenance:!0}))}onMessageReceived(e){var i=this;return f(function*(){try{const r=i.userFactory.createProfileWithOnlineStatus({profile:i.store.selectUserState().profile});let s;e.isAdmin?(s=i.userFactory.createProfileWithOnlineStatus({profile:i.userFactory.createAdminSimpleProfile()}),e.senderId=s.profile.id):s=e.senderId===r.profile.id?r:(yield i.userRepository.getSimpleProfilesWithOnlineStatus([e.senderId]))[0];const a=[r,s];i.store.selectPrivateConversationById(e.conversationId)||i.store.dispatch(Nk({conversation:i.chatItemsFactory.createConversationFromMessage(e),users:a})),i.store.dispatch(GI({message:i.chatItemsFactory.createMessage(e),sender:s}))}catch(r){console.warn("Add private message error",r)}})()}onConversationArchived(e){const i=this.store.selectPrivateConversationsList().find(r=>r.isAdmin);if(i&&e.conversationId===i.id){const r=this.store.selectPrivateOpenedConversation();this.store.dispatch(h6({conversationId:i.id})),r===i.id&&this.store.dispatch(npe())}}setupProvidedSelectors(e){J.prototype.selectPrivateChatIsOpened=e.selectPrivateChatIsOpened(),J.prototype.subscribePrivateChatIsOpened=e.subscribePrivateChatIsOpened()}}).\u0275fac=function(e){return new(e||t)(T(J),T(ed),T(Xu),T(u6),T(d6),T(gC),T(Dr),T(Dk),T(pi),T(Jde))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[J,ed,Xu,u6,d6,gC,Object,Dk,pi,Object])],n),n})();const vC=Ts(a6.featureKey),a0=We(vC,t=>t.conversations),tnt=We(vC,t=>t.messages),nnt=We(vC,t=>t.conversationsMessages),int=We(vC,t=>t.users),jI=us.getSelectors(a0),C6=jc.getSelectors(tnt),y6=ou.getSelectors(nnt),ont=ev.getSelectors(int),xpe=We(a0,t=>t.selected),Ape=We(a0,jI.selectEntities,(t,n)=>n[t.selected]),S6=We(jI.selectAll,t=>t),Rpe=()=>We(S6,(t,n)=>t.find(o=>-1!==o.users.indexOf(n))),kpe=()=>We(jI.selectEntities,(t,n)=>t[n]),Lpe=We(a0,t=>t.unread),Dpe=We(Lpe,t=>t.length),Bpe=We(Lpe,t=>t.some(n=>n.isAdmin)),Npe=We(vC,t=>t.conversations.hasUnseenMessages),Fpe=We(vC,t=>t.conversations.isInMaintenance),Upe=()=>We(jI.selectAll,y6.selectEntities,C6.selectEntities,(t,n,o,e)=>{const i=t.find(r=>-1!==r.users.indexOf(e.userId));return n&&n[i.id]?n[i.id].messages[e.sort].map(r=>o[r.id]):[]}),Gpe=()=>We(y6.selectEntities,C6.selectEntities,(t,n,o)=>t&&t[o.conversationId]?t[o.conversationId].messages[o.sort].map(e=>n[e.id]):[]),snt=We(jI.selectEntities,(t,n)=>{const o=t[n.conversationId];return!!o&&void 0!==o.meta[n.query.sort].queriesInProgress.find(e=>Kf(e,n.query))});J.prototype.selectPrivateChatState=function cnt(){return this.selectSync(vC)},J.prototype.selectPrivateChatUsers=function lnt(){return this.selectSync(ont.selectEntities)},J.prototype.selectPrivateOpenedConversationModel=function unt(){return this.selectSync(Ape)},J.prototype.selectPrivateOpenedConversation=function pnt(){return this.selectSync(xpe)},J.prototype.subscribePrivateOpenedConversationModel=function dnt(){return this.select(Ape)},J.prototype.subscribePrivateOpenedConversation=function hnt(){return this.select(xpe)},J.prototype.selectPrivateConversationsState=function mnt(){return this.selectSync(a0)},J.prototype.subscribePrivateConversationsState=function fnt(){return this.select(a0)},J.prototype.selectPrivateConversationById=function gnt(t){return this.selectSync(kpe(),t)},J.prototype.subscribePrivateConversationById=function _nt(t){return this.select(kpe(),t)},J.prototype.selectPrivateUnreadConversationsCount=function vnt(){return this.selectSync(Dpe)},J.prototype.subscribePrivateUnreadConversationsCount=function bnt(){return this.select(Dpe)},J.prototype.selectPrivateConversationsList=function Cnt(){return this.selectSync(S6)},J.prototype.subscribePrivateConversationsList=function ynt(){return this.select(S6)},J.prototype.selectPrivateConversationByUserId=function Snt(t){return this.selectSync(Rpe(),t)},J.prototype.subscribePrivateConversationByUserId=function wnt(t){return this.select(Rpe(),t)},J.prototype.selectPrivateMessagesByUser=function Tnt(t){return this.selectSync(Upe(),t)},J.prototype.subscribePrivateMessagesByUser=function Pnt(t){return this.select(Upe(),t)},J.prototype.selectPrivateChatHasUnseenMessages=function Int(){return this.selectSync(Npe)},J.prototype.subscribePrivateChatHasUnseenMessages=function Mnt(){return this.select(Npe)},J.prototype.selectPrivateChatIsOpened=function Ont(){throw new Error("Method not implemented. An implementation for IPrivateChatSelectorFacade needs to be provided.")},J.prototype.subscribePrivateChatIsOpened=function Ent(){throw new Error("Method not implemented. An implementation for IPrivateChatSelectorFacade needs to be provided.")},J.prototype.selectPrivateChatIsInMaintenance=function xnt(){return this.selectSync(Fpe)},J.prototype.subscribePrivateChatIsInMaintenance=function Ant(){return this.select(Fpe)},J.prototype.selectPrivateMessagesByConversationId=function Rnt(t){return this.selectSync(Gpe(),t)},J.prototype.subscribePrivateMessagesByConversationId=function knt(t){return this.select(Gpe(),t)},J.prototype.selectHasUnreadAdminMessages=function Lnt(){return this.selectSync(Bpe)},J.prototype.subscribeHasUnreadAdminMessages=function Dnt(){return this.select(Bpe)},J.prototype.selectPrivateConversationMessagesState=function Bnt(t){return this.selectSync(We(y6.selectEntities,(t,n)=>t[n.conversationId].messages),{conversationId:t})},J.prototype.selectHasPrivateActiveMessagesQuery=function Nnt(t){return this.selectSync(snt,t)},J.prototype.selectPrivateMessage=function Fnt(t){return this.selectSync(We(C6.selectEntities,(t,n)=>t[n]),t)};let Unt=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(zI))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[zI,gC,u6,d6],imports:[$r.forFeature(a6.featureKey,Xtt)]}),n})();var c0=__webpack_require__(12882);let HI=(()=>{var t;class n{constructor(e){this.http=e}reportUser(e,i){var r=this;return f(function*(){try{const s={targetUserId:e,reason:i,objectId:e};yield r.http.post("feedback/profileReport",s).toPromise()}catch(s){throw jt.createErrorInstance(s)}})()}reportMessage(e,i){var r=this;return f(function*(){try{yield r.http.post("feedback/chatReport",{objectId:e,targetUserId:i}).toPromise()}catch(s){throw jt.createErrorInstance(s)}})()}reportPhoto(e,i){var r=this;return f(function*(){try{yield r.http.post("feedback/galleryReport",{objectId:i,targetUserId:e}).toPromise()}catch(s){throw jt.createErrorInstance(s)}})()}reportClub(e,i,r){var s=this;return f(function*(){try{yield s.http.post("feedback/clubReport",{objectId:e,reason:r,targetUserId:i}).toPromise()}catch(a){throw jt.createErrorInstance(a)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Vpe=new Ot("IPublicChatSelectorFacade");var w6=function(t){return t.featureKey="publicChat",t}(w6||{}),tv=function(t){return t.TopicCreated="chat.pub.conv",t.TopicDeleted="chat.pub.conv.del",t.TopicLocked="chat.pub.conv.lock",t.TopicUnlocked="chat.pub.conv.unlock",t.MessageReceived="chat.pub.msg",t.MessageDeleted="chat.pub.msg.del",t.MessageRead="chat.pub.read",t}(tv||{}),Ar=function(t){return t.LanguageBased="languageBased",t.Club="club",t}(Ar||{});let qI=(()=>{let t=class{constructor(o,e,i){this.sharedRoomsIds=[];for(let r in o)o.hasOwnProperty(r)&&(this[r]=o[r]);this.actions={create:{inProgress:!1},delete:{inProgress:!1},like:{inProgress:!1},unlike:{inProgress:!1},mute:{inProgress:!1},pin:{inProgress:!1}},this.currentUserId=e,this.selectChatUsers=()=>i.selectPublicChatUsers(),this.selectMessagesState=()=>i.selectPublicConversationMessagesState(this.id),this.selectPublicMessagesByConversationId=r=>i.selectPublicMessagesByConversationId(r),this.isLiked=i.selectPublicConversationIsLiked(this.id)}getOwner(){return this.selectChatUsers()[this.ownerId]}getLastMsg(){if(this.loadingState.isLoaded){const o=this.selectPublicMessagesByConversationId({conversationId:this.id,sort:ie.ESort.Desc});if(o.length)return o[o.length-1]}return this.firstMsg}messagesLengthBySort(o){return this.selectMessagesState()[o].length}oldestMessageId(){return this.firstMsg?this.firstMsg.id:void 0}getLastSentMessage(){if(this.loadingState.isLoaded){const o=this.selectPublicMessagesByConversationId({conversationId:this.id,sort:ie.ESort.Desc}).filter(e=>e.isSent);if(o.length)return o[o.length-1]}}loadedMessagesLength(){const o=this.selectMessagesState();return this.meta[ie.ESort.Desc].isLastPage?o[ie.ESort.Desc].length:o[ie.ESort.Desc].length+o[ie.ESort.Asc].length}static calculateNextPageIndex(o,e){let i=Math.ceil(o/e);return o%e==0&&i++,i}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getOwner",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getLastMsg",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[String]),ue("design:returntype",Number)],t.prototype,"messagesLengthBySort",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",String)],t.prototype,"oldestMessageId",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getLastSentMessage",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"loadedMessagesLength",null),t=Qe([ko(),ue("design:paramtypes",[Object,String,J])],t),t})(),Gnt=(()=>{let t=class{constructor(o,e){for(let i in o)o.hasOwnProperty(i)&&(this[i]=o[i]);this.isSent=!0,this.actions={delete:{inProgress:!1},report:{inProgress:!1},kick:{inProgress:!1},send:{inProgress:!1}},this.selectChatUsers=()=>e.selectPublicChatUsers()}getSender(){return this.selectChatUsers()[this.senderId]}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getSender",null),t=Qe([ko(),ue("design:paramtypes",[Object,J])],t),t})(),T6=(()=>{var t;class n{constructor(e,i,r,s){this.store=e,this.time=i,this.messagesPerPage=r.social.chat.public.limitMessagesPerPage,this.urlService=s}createConversation(e,i){return new qI(this.createConversationState(e,i),this.store.selectUserState().profile.id,this.store)}createClientConversation(e,i){return new qI({...this.createConversationState(e,i),id:e.id||n.generateConversationId()},this.store.selectUserState().profile.id,this.store)}createDraftConversation(e,i){return new qI({...this.createConversationState(e,i),id:e.id||n.generateConversationId(),isDraft:!0},this.store.selectUserState().profile.id,this.store)}createMessage(e,i){switch(e.type){case Ii.Image:return this.createMessageInstance(this.buildImageMessageModel(e));case Ii.Voice:return this.createMessageInstance(this.buildVoiceMessageModel(e));case Ii.Kick:return this.createMessageInstance(this.buildKickMessageModel(e,i));default:return this.createMessageInstance(e)}}createClientMessage(e){let i;switch(e.type){case Ii.Image:i=this.buildClientImageMessageModel(e);break;case Ii.Voice:i=this.buildClientVoiceMessageModel(e);break;default:i=e}return this.createMessageInstance({...i,id:i.id||n.generateMessageId()})}createConversationState(e,i){return{...this.createInitialConversationState(),...e,createdAt:e.createdAt||this.time.getServerTimeMs(),firstMsg:e.firstMsg?this.createMessage(e.firstMsg,i):e.firstMsg}}createInitialConversationState(){return{meta:{messagesPerPage:this.messagesPerPage,[c0.ESort.Asc]:{queriesInProgress:[],isLastPage:!1},[c0.ESort.Desc]:{queriesInProgress:[],isLastPage:!1}},kicked:[],input:void 0,isDraft:!1,messagesCount:0,likes:0,loadingState:{isLoaded:!1,isLoading:!1,error:void 0}}}buildImageMessageModel(e){const i={...e.data,thumbnailUrl:this.urlService.createCdnPath({prefix:"chat",url:e.data.thumbnailUrl}),fullSizedUrl:this.urlService.createCdnPath({prefix:"chat",url:e.data.fullSizedUrl})};return{...e,data:i}}buildClientImageMessageModel(e){const i={fullSizedHeight:0,fullSizedWidth:0,thumbnailHeight:0,thumbnailWidth:0,thumbnailUrl:e.data.image,fullSizedUrl:e.data.image};return{...e,data:i}}buildVoiceMessageModel(e){const i={...e.data,url:this.urlService.createCdnPath({prefix:"voice",url:e.data.url})};return{...e,data:i}}buildClientVoiceMessageModel(e){const i={duration:e.data.duration,url:e.data.voice};return{...e,data:i}}buildKickMessageModel(e,i){const r={...e.data,username:i.find(s=>s.id===e.data.kickedUserId).username};return{...e,data:r}}createMessageInstance(e){return new Gnt({...e,createdAt:e.createdAt||this.time.getServerTimeMs(),clientId:e.clientId||n.generateClientMessageId()},this.store)}static generateConversationId(){return(n.conversationId++).toString()}static generateMessageId(){return(n.messageId++).toString()}static generateClientMessageId(){return this.generateMessageId()}}return(t=n).conversationId=0,t.messageId=0,t.\u0275fac=function(e){return new(e||t)(T(J),T(Bn),T(Dr),T(ii))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),P6=(()=>{var t;class n{constructor(e,i,r){this.channels=new ie.List,this.http=e,this.cs=i,this.feedback=r}connect(e){var i=this;return f(function*(){i.channels.add({id:e,namespace:yield i.cs.connectToNamespace("/public-chat-".concat(e))})})()}dispose(e){const i=this.channels.find(r=>r.id===e);i&&i.namespace.dispose()}disposeAll(){this.channels.forEach(e=>e.namespace.dispose()),this.channels=new ie.List}disconnect(e){const i=this.channels.find(r=>r.id===e);i&&i.namespace.disconnect()}disconnectAll(){this.channels.forEach(e=>e.namespace.disconnect())}requestConversationsPage(e){return this.http.get("".concat(n.getBaseUrlByChannelType(e.type),"?channel=").concat(e.id)).toPromise().then(i=>i.body)}deleteConversation(e,i){return this.http.delete("".concat(n.getBaseUrlByChannelType(i.type),"/").concat(e),{body:{channel:i.id}}).toPromise().then(r=>r.body)}sendMessage(e,i,r,s){return this.http.post("".concat(n.getBaseUrlByChannelType(s),"/").concat(i),{type:e.type,data:e.data,timestamp:r}).toPromise().then(a=>a.body)}requestMessagesPage(e,i,r){let s=new $l;return void 0!==e.page&&(s=s.append("page",String(e.page))),void 0!==e.pageCount&&(s=s.append("pageCnt",String(e.pageCount))),void 0!==e.sort&&(s=s.append("sort",String(e.sort))),void 0!==e.lastMsgId&&(s=s.append("lastMsgId",String(e.lastMsgId))),this.http.get("".concat(n.getBaseUrlByChannelType(r),"/").concat(i),{params:s}).toPromise().then(a=>a.body)}deleteMessage(e,i){return this.http.delete("".concat(n.getBaseUrlByChannelType(i.type),"/m/").concat(e),{body:{channel:i.id}}).toPromise().then(r=>r.body)}reportMessage(e,i){return this.feedback.reportMessage(e,i)}kickUser(e,i,r){return this.http.post("".concat(n.getBaseUrlByChannelType(r),"/kick"),{userId:i,conversationId:e}).toPromise().then(s=>s.body)}likeConversation(e,i){return this.http.post("".concat(n.getBaseUrlByChannelType(i),"/like/").concat(e)).toPromise().then(r=>r.body)}unlikeConversation(e,i){return this.http.post("".concat(n.getBaseUrlByChannelType(i),"/unlike/").concat(e)).toPromise().then(r=>r.body)}createConversation(e,i,r){return this.http.post("".concat(n.getBaseUrlByChannelType(i.type)),{type:e.message.type,data:e.message.data,channel:i.id,timestamp:r,displayOrder:e.displayOrder}).toPromise().then(s=>s.body)}readConversation(e,i){const r=this.getNamespace(i);if(!r)throw new lt.NetworkError;r.emit(tv.MessageRead,e)}onConversationCreated(e,i){return this.getNamespace(e).on(tv.TopicCreated,i)}onConversationDeleted(e,i){return this.getNamespace(e).on(tv.TopicDeleted,i)}onConversationLocked(e,i){return this.getNamespace(e).on(tv.TopicLocked,i)}onConversationUnlocked(e,i){return this.getNamespace(e).on(tv.TopicUnlocked,i)}onMessage(e,i){return this.getNamespace(e).on(tv.MessageReceived,i)}onMessageDeleted(e,i){return this.getNamespace(e).on(tv.MessageDeleted,i)}onDisconnect(e,i){return this.getNamespace(e).on("disconnect",i)}onConnectionRestored(e,i){return this.getNamespace(e).onReconnect(i)}getNamespace(e){const i=this.channels.find(r=>r.id===e);return i?i.namespace:void 0}static getBaseUrlByChannelType(e){switch(e){case Ar.LanguageBased:return"chat/global";case Ar.Club:return"chat/club"}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Ri),T(HI))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Kn=function(t){return t.ResetPublicChat="[Public Chat] Reset Public Chat",t.OpenConversation="[Public Chat] Open Public Conversation",t.CloseConversation="[Public Chat] Close Public Conversation",t.ReadConversation="[Public Chat] Read Public Conversation",t.OpenChat="[Public Chat] Open Public Chat",t.CloseChat="[Public Chat] Close Public Chat",t.SetChatIntent="[Public Chat] Set Public Chat Intent",t.ResetChatIntent="[Public Chat] Reset Public Chat Intent",t.MarkChatAsSeen="[Public Chat] Mark Public Chat As Seen",t.ReceiveMessage="[Public Chat] Receive Public Message",t.AddReceivedMessage="[Public Chat] Add Received Public Message",t.RemovePublicMessage="[Public Chat] Remove Public Message",t.AddPublicConversation="[Public Chat] Add Public Conversation",t.RemovePublicConversation="[Public Chat] Remove Public Conversation",t.RemovePublicSelectedConversation="[Public Chat] Remove Public Selected Conversation",t.LockPublicConversation="[Public Chat] Lock Public Conversation",t.UnlockPublicConversation="[Public Chat] Unlock Public Conversation",t.LikePublicConversation="[Public Chat] Like Public Conversation",t.LikePublicConversationSuccess="[Public Chat] Like Public Conversation Success",t.LikePublicConversationError="[Public Chat] Like Public Conversation Error",t.UnlikePublicConversation="[Public Chat] Unlike Public Conversation",t.UnlikePublicConversationSuccess="[Public Chat] Unlike Public Conversation Success",t.UnlikePublicConversationError="[Public Chat] Unlike Public Conversation Error",t.PinPublicConversation="[Public Chat] Pin Public Conversation",t.PinPublicConversationSuccess="[Public Chat] Pin Public Conversation Success",t.PinPublicConversationError="[Public Chat] Pin Public Conversation Error",t.UnpinPublicConversation="[Public Chat] Unpin Public Conversation",t.UnpinPublicConversationSuccess="[Public Chat] Unpin Public Conversation Success",t.UnpinPublicConversationError="[Public Chat] Unpin Public Conversation Error",t.AddToSubscribedConversations="[Public Chat] Add To Subscribed Conversations",t.GetPublicChat="[Public Chat] Get Public Chat",t.GetPublicChatSuccess="[Public Chat] Get Public Chat Success",t.GetPublicChatError="[Public Chat] Get Public Chat Error",t.DeleteConversation="[Public Chat] Delete Conversation",t.DeleteConversationSuccess="[Public Chat] Delete Conversation Success",t.DeleteConversationError="[Public Chat] Delete Conversation Error",t.SendMessage="[Public Chat] Send Message",t.SendMessageSuccess="[Public Chat] Send Message Success",t.SendMessageError="[Public Chat] Send Message Error",t.ResendMessage="[Public Chat] Resend Message",t.GetPublicMessages="[Public Chat] Get Public Messages",t.GetPublicMessagesSuccess="[Public Chat] Get Public Messages Success",t.GetPublicMessagesError="[Public Chat] Get Public Messages Error",t.DeleteMessage="[Public Chat] Delete Message",t.DeleteMessageSuccess="[Public Chat] Delete Message Success",t.DeleteMessageError="[Public Chat] Delete Message Error",t.ReportMessage="[Public Chat] Report Message",t.ReportMessageSuccess="[Public Chat] Report Message Success",t.ReportMessageError="[Public Chat] Report Message Error",t.ShareContent="[Public Chat] Share Content",t.ShareContentSuccess="[Public Chat] Share Content Success",t.ShareContentError="[Public Chat] Share Content Error",t.RemovePublicConversations="[Public Chat] Remove Conversations",t.ClearConversationMessages="[Public Chat] Clear Conversation Messages",t.CreateConversation="[Public Chat] Create Conversation",t.CreateConversationSuccess="[Public Chat] Create Conversation Success",t.CreateConversationError="[Public Chat] Create Conversation Error",t.KickUser="[Public Chat] Kick User",t.KickUserSuccess="[Public Chat] Kick User Success",t.KickUserError="[Public Chat] Kick User Error",t.SynchronizeChat="[Public Chat] Synchronize Chat",t.SynchronizeChatSuccess="[Public Chat] Synchronize Chat Success",t.SynchronizeChatError="[Public Chat] Synchronize Chat Error",t.InitChatStates="[Public Chat] Init Chat States",t.DeleteChatsData="[Public Chat] Delete Chats Data",t.InitLikedConversations="[Public Chat] Init Liked Conversations",t.ChatConnectionRestored="[Public Chat] Chat Connection Restored",t.ChatChannelDisconnect="[Public Chat] Chat Channel Disconnect",t.SetMaintenanceState="[Public Chat] Set Maintenance State",t.AddConversationDraft="[Public Chat] Add Conversation Draft",t.SetChatInitializedState="[Public Chat] Set Chat Initialized State",t}(Kn||{});const zpe=he(Kn.ResetPublicChat),Vk=he(Kn.OpenConversation,{_as:"props",_p:void 0}),I6=he(Kn.CloseConversation,{_as:"props",_p:void 0}),jpe=he(Kn.ReadConversation,{_as:"props",_p:void 0}),Hpe=(he(Kn.OpenChat,{_as:"props",_p:void 0}),he(Kn.CloseChat,{_as:"props",_p:void 0}),he(Kn.SetChatIntent,{_as:"props",_p:void 0}),he(Kn.ResetChatIntent,{_as:"props",_p:void 0}),he(Kn.MarkChatAsSeen,{_as:"props",_p:void 0})),M6=he(Kn.AddPublicConversation,{_as:"props",_p:void 0}),O6=he(Kn.ReceiveMessage,{_as:"props",_p:void 0}),WI=he(Kn.AddReceivedMessage,{_as:"props",_p:void 0}),E6=he(Kn.RemovePublicConversation,{_as:"props",_p:void 0}),qpe=he(Kn.RemovePublicSelectedConversation,{_as:"props",_p:void 0}),Wpe=he(Kn.RemovePublicMessage,{_as:"props",_p:void 0}),$pe=he(Kn.LockPublicConversation,{_as:"props",_p:void 0}),Kpe=he(Kn.UnlockPublicConversation,{_as:"props",_p:void 0}),Zpe=he(Kn.LikePublicConversation,{_as:"props",_p:void 0}),Qpe=he(Kn.LikePublicConversationSuccess,{_as:"props",_p:void 0}),Ype=he(Kn.LikePublicConversationError,{_as:"props",_p:void 0}),Jpe=he(Kn.UnlikePublicConversation,{_as:"props",_p:void 0}),Xpe=he(Kn.UnlikePublicConversationSuccess,{_as:"props",_p:void 0}),ehe=he(Kn.UnlikePublicConversationError,{_as:"props",_p:void 0}),x6=(he(Kn.PinPublicConversation,{_as:"props",_p:void 0}),he(Kn.PinPublicConversationSuccess,{_as:"props",_p:void 0}),he(Kn.PinPublicConversationError,{_as:"props",_p:void 0}),he(Kn.UnpinPublicConversation,{_as:"props",_p:void 0}),he(Kn.UnpinPublicConversationSuccess,{_as:"props",_p:void 0}),he(Kn.UnpinPublicConversationError,{_as:"props",_p:void 0}),he(Kn.AddToSubscribedConversations,{_as:"props",_p:void 0})),the=he(Kn.GetPublicChat,{_as:"props",_p:void 0}),nhe=he(Kn.GetPublicChatSuccess,{_as:"props",_p:void 0}),ihe=he(Kn.GetPublicChatError,{_as:"props",_p:void 0}),ohe=he(Kn.DeleteConversation,{_as:"props",_p:void 0}),rhe=he(Kn.DeleteConversationSuccess,{_as:"props",_p:void 0}),she=he(Kn.DeleteConversationError,{_as:"props",_p:void 0}),ahe=he(Kn.GetPublicMessages,{_as:"props",_p:void 0}),che=he(Kn.GetPublicMessagesSuccess,{_as:"props",_p:void 0}),lhe=he(Kn.GetPublicMessagesError,{_as:"props",_p:void 0}),zk=he(Kn.SendMessage,{_as:"props",_p:void 0}),jk=he(Kn.SendMessageSuccess,{_as:"props",_p:void 0}),A6=he(Kn.SendMessageError,{_as:"props",_p:void 0}),uhe=he(Kn.ResendMessage,{_as:"props",_p:void 0}),dhe=he(Kn.DeleteMessage,{_as:"props",_p:void 0}),phe=he(Kn.DeleteMessageSuccess,{_as:"props",_p:void 0}),hhe=he(Kn.DeleteMessageError,{_as:"props",_p:void 0}),mhe=he(Kn.ReportMessage,{_as:"props",_p:void 0}),fhe=he(Kn.ReportMessageSuccess,{_as:"props",_p:void 0}),ghe=he(Kn.ReportMessageError,{_as:"props",_p:void 0}),R6=he(Kn.ShareContent,{_as:"props",_p:void 0}),_he=he(Kn.ShareContentSuccess,{_as:"props",_p:void 0}),vhe=he(Kn.ShareContentError,{_as:"props",_p:void 0}),Hk=he(Kn.RemovePublicConversations,{_as:"props",_p:void 0}),bhe=he(Kn.ClearConversationMessages,{_as:"props",_p:void 0}),Che=he(Kn.CreateConversation,{_as:"props",_p:void 0}),yhe=he(Kn.CreateConversationSuccess,{_as:"props",_p:void 0}),She=he(Kn.CreateConversationError,{_as:"props",_p:void 0}),whe=he(Kn.KickUser,{_as:"props",_p:void 0}),The=he(Kn.KickUserSuccess,{_as:"props",_p:void 0}),Phe=he(Kn.KickUserError,{_as:"props",_p:void 0}),Ihe=he(Kn.SynchronizeChat,{_as:"props",_p:void 0}),Mhe=he(Kn.SynchronizeChatSuccess,{_as:"props",_p:void 0}),Ohe=he(Kn.SynchronizeChatError,{_as:"props",_p:void 0}),Ehe=he(Kn.InitChatStates,{_as:"props",_p:void 0}),xhe=he(Kn.DeleteChatsData,{_as:"props",_p:void 0}),k6=he(Kn.ChatConnectionRestored,{_as:"props",_p:void 0}),Ahe=he(Kn.ChatChannelDisconnect,{_as:"props",_p:void 0}),Rhe=he(Kn.SetMaintenanceState,{_as:"props",_p:void 0}),khe=he(Kn.AddConversationDraft,{_as:"props",_p:void 0}),L6=he(Kn.SetChatInitializedState,{_as:"props",_p:void 0}),Lhe=he(Kn.InitLikedConversations,{_as:"props",_p:void 0});let l0=(()=>{var t;let n=((t=class{constructor(e,i,r,s,a,c,u,h,b,w){var R=this;this.listeners=new ie.List,this.chatRetryIntervals=new ie.List,this.onMessageReceived=function(){var G=f(function*(K){if(K.senderId===R.store.selectUserState().profile.id)return;R.store.dispatch(O6({message:K}));const te=R.store.selectPublicConversationById(K.conversationId);if(te&&(R.store.selectIsPublicConversationOpened(K.conversationId)||te.loadingState.isLoaded))try{const ee=[K.senderId];K.type===Ii.Kick&&ee.push(K.data.kickedUserId);let le=yield R.userRepository.getSimpleProfiles(ee);const me=R.userFactory.createProfileWithOnlineStatus({profile:R.userFactory.createAdminSimpleProfile()}),ge=K.isAdmin?me.profile:le.find(Me=>Me.id===K.senderId);K.isAdmin&&(le=[...le,me.profile]),K={...K,senderId:K.isAdmin?me.profile.id:K.senderId},R.store.dispatch(WI({message:R.chatItemsFactory.createMessage(K,le),sender:ge}))}catch(ee){console.warn("Add public message error",ee)}});return function(K){return G.apply(this,arguments)}}(),this.onMessageDeleted=function(){var G=f(function*(K){R.store.dispatch(Wpe({message:K}))});return function(K){return G.apply(this,arguments)}}(),this.onConversationCreated=function(){var G=f(function*(K){try{if(K.ownerId===R.store.selectUserState().profile.id)return;const te=[(yield R.userRepository.getSimpleProfiles([K.ownerId]))[0]];R.store.dispatch(M6({conversation:R.chatItemsFactory.createConversation(K,te),users:te}))}catch(te){console.warn(te)}});return function(K){return G.apply(this,arguments)}}(),this.onConversationDeleted=(G,K)=>{const te=this.store.selectPublicChatState({channel:K});this.store.dispatch(E6({conversationId:G})),te.selected===G&&this.store.dispatch(qpe({conversationId:G,channel:K}))},this.onConversationLocked=G=>{this.store.dispatch($pe({conversationId:G}))},this.onConversationUnlocked=G=>{this.store.dispatch(Kpe({conversationId:G}))},this.store=e,this.userRepository=i,this.userFactory=r,this.chatItemsFactory=s,this.chatClient=a,this.messageValidator=c,this.config=u,this.messageSanitizer=h,this.appStorage=b,this.setupProvidedSelectors(w),this.initChatState(u.social.chat.public.channels.map(G=>({id:G,type:Ar.LanguageBased})))}connect(e){var i=this;return f(function*(){i.store.selectPublicChatState({channel:e}).isInitialized||(yield i.chatClient.connect(e),i.store.dispatch(L6({isInitialized:!0,channels:[e]})),i.listeners.add({channel:e,listener:i.chatClient.onMessage(e,i.onMessageReceived)}),i.listeners.add({channel:e,listener:i.chatClient.onMessageDeleted(e,i.onMessageDeleted)}),i.listeners.add({channel:e,listener:i.chatClient.onConversationCreated(e,i.onConversationCreated)}),i.listeners.add({channel:e,listener:i.chatClient.onConversationDeleted(e,r=>i.onConversationDeleted(r,e))}),i.listeners.add({channel:e,listener:i.chatClient.onConversationLocked(e,i.onConversationLocked)}),i.listeners.add({channel:e,listener:i.chatClient.onConversationUnlocked(e,i.onConversationUnlocked)}),i.listeners.add({channel:e,listener:i.chatClient.onDisconnect(e,()=>i.onDisconnect(e))}),i.listeners.add({channel:e,listener:i.chatClient.onConnectionRestored(e,()=>i.onConnectionRestored(e))}))})()}disconnect(e){const i="string"==typeof e?[e]:e;i.forEach(r=>{this.chatClient.disconnect(r),this.listeners.where(s=>s.channel===r).forEach(s=>s.listener.detach())}),this.store.dispatch(L6({isInitialized:!1,channels:i}))}disconnectAll(){const e=this.store.selectPublicChatsIds();this.disconnect(e)}getConversations(e){var i=this;return f(function*(){const r=i.store.selectPublicChatState({channel:e});try{if(r.loadingState.isLoaded&&r.synchronizeState.isSynced){const w=i.store.selectPublicConversationsList({channel:e});if(w.length)return w}i.store.dispatch(the({channel:e}));const s=i.store.selectPublicChatState({channel:e}).type,a=yield i.chatClient.requestConversationsPage({id:e,type:s}),c=NP(a.conversations.map(w=>w.ownerId).concat(a.conversations.filter(w=>void 0!==w.firstMsg).map(w=>w.firstMsg.senderId))),u=yield i.userRepository.getSimpleProfiles(c),h=i.appStorage.getItem("likedPublicCnvs-".concat(i.store.selectUserState().profile.id))||[];i.store.dispatch(Lhe({conversationsIds:h}));const b=a.conversations.map(w=>i.chatItemsFactory.createConversation(w,u));return i.store.dispatch(nhe({list:b,users:u,channel:e})),b}catch(s){const a=jt.createErrorInstance(s);throw i.store.dispatch(ihe({error:a,channel:e})),i.handleCommonErrors(a),a}})()}deleteConversationDraft(e){this.store.dispatch(Hk({ids:[e]}))}deleteConversation(e){var i=this;return f(function*(){try{i.store.dispatch(ohe({conversationId:e}));const r=i.store.selectPublicConversationById(e).channel,s=i.store.selectPublicChatState({channel:r}).type;yield i.chatClient.deleteConversation(e,{id:r,type:s}),i.store.dispatch(rhe({conversationId:e}))}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(she({conversationId:e,error:s})),i.handleCommonErrors(s),s}})()}sendMessage(e,i){var r=this;return f(function*(){const s=r.store.selectUserState(),a=r.store.selectConversationChannelType(i);if(a===Ar.LanguageBased&&s.isGlobalFeedMuted.isMuted)throw new Yo.ChatMutedError(s.isGlobalFeedMuted);const c=r.messageSanitizer.sanitizeMessage(e),u=r.store.selectPublicConversationById(i).channel,h=r.messageValidator.validateMessage(c,"public",u);if(!h.isValid)throw h.error;const b={senderId:s.profile.id,clientId:e.clientId,data:c.data,type:c.type,conversationId:i,isDeleted:!1},w=r.chatItemsFactory.createClientMessage(b);try{r.store.dispatch(zk({message:w,sender:s.profile}));const R=yield r.chatClient.sendMessage(c,i,w.createdAt,a);r.store.selectIsSubscribedToPublicConversation(i)||r.store.dispatch(x6({conversationId:i}));const G=r.chatItemsFactory.createClientMessage({id:R.messageId,...b,createdAt:w.createdAt});return r.store.dispatch(jk({message:G,tempMessageId:w.id,sender:s.profile})),R}catch(R){const G=jt.createErrorInstance(R);throw r.store.dispatch(A6({id:w.id,error:G})),r.handleCommonErrors(G),G}})()}resendMessage(e){var i=this;return f(function*(){try{const r=Vh.createNewMessageForResend(e),s={id:e.id,conversationId:e.conversationId,senderId:e.senderId,isDeleted:e.isDeleted,type:e.type,data:r.data},a=i.chatItemsFactory.createClientMessage(s);i.store.dispatch(uhe({message:a}));const c=i.store.selectConversationChannelType(e.conversationId),u=yield i.chatClient.sendMessage(r,e.conversationId,a.createdAt,c),h=i.chatItemsFactory.createClientMessage({...s,id:u.messageId});return i.store.dispatch(jk({message:h,tempMessageId:e.id,sender:e.getSender()})),u}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(A6({id:e.id,error:s})),i.handleCommonErrors(s),s}})()}getMessages(e,i){var r=this;return f(function*(){try{const s=r.store.selectPublicConversationById(i);if(s&&s.loadingState.isLoaded){const R=s.meta[e.sort],G=r.store.selectPublicMessagesByConversationId({conversationId:s.id,sort:e.sort});let K,te;const ee=e.pageCount*s.meta.messagesPerPage;if(e.lastMsgId){const me=G.findIndex(ge=>ge.id===e.lastMsgId)+1;e.sort===ie.ESort.Desc?(K=Math.max(0,me-ee),te=me):(K=me,te=K+ee)}else K=e.page*s.meta.messagesPerPage,te=K+ee;const le=G.slice(K,te);if(R.isLastPage||le.length===ee)return G}r.store.dispatch(ahe({query:e,conversationId:i}));const a=r.store.selectConversationChannelType(i),c=yield r.chatClient.requestMessagesPage(e,i,a);if(!r.store.selectHasPublicActiveMessagesQuery({conversationId:s.id,query:e}))return[];let u=c.messages.map(R=>R.senderId);u=u.concat(c.messages.filter(R=>R.type===Ii.Kick).map(R=>R.data.kickedUserId));let h=yield r.userRepository.getSimpleProfiles(NP(u));const b=r.userFactory.createProfileWithOnlineStatus({profile:r.userFactory.createAdminSimpleProfile()}),w=c.messages.map(R=>(R.senderId=R.isAdmin?b.profile.id:R.senderId,r.chatItemsFactory.createMessage(R,h)));return w.find(R=>R.isAdmin)&&(h=[...h,b.profile]),r.store.dispatch(che({messages:w,query:e,users:h,conversationId:i})),w}catch(s){const a=jt.createErrorInstance(s);throw r.store.dispatch(lhe({query:e,conversationId:i,error:a})),r.handleCommonErrors(a),a}})()}getNextMessages(e,i={pageCount:1,sort:ie.ESort.Asc}){var r=this;return f(function*(){const s={pageCount:i.pageCount,sort:i.sort},a=r.store.selectPublicMessagesByConversationId({conversationId:e.id,sort:i.sort});let c=i.sort===ie.ESort.Desc?a[0]||e.getLastMsg():a[a.length-1];return c?s.lastMsgId=c.id:s.page=qI.calculateNextPageIndex(e.messagesLengthBySort(s.sort),e.meta.messagesPerPage),r.getMessages(s,e.id)})()}deleteMessage(e,i){var r=this;return f(function*(){try{r.store.dispatch(dhe({id:e}));const s=r.store.selectPublicConversationById(i).channel,a=r.store.selectPublicChatState({channel:s}).type;yield r.chatClient.deleteMessage(e,{id:s,type:a}),r.store.dispatch(phe({message:{messageId:e,conversationId:i}}))}catch(s){const a=jt.createErrorInstance(s);throw r.store.dispatch(hhe({id:e,error:a})),r.handleCommonErrors(a),a}})()}reportMessage(e,i){var r=this;return f(function*(){try{r.store.dispatch(mhe({id:e})),yield r.chatClient.reportMessage(e,i),r.store.dispatch(fhe({id:e}))}catch(s){throw console.warn(s),r.store.dispatch(ghe({id:e,error:s})),r.handleCommonErrors(s),s}})()}likeConversation(e){var i=this;return f(function*(){try{i.store.dispatch(Zpe({conversationId:e}));const r=i.store.selectConversationChannelType(e);yield i.chatClient.likeConversation(e,r),i.appStorage.setItem("likedPublicCnvs-".concat(i.store.selectUserState().profile.id),i.store.selectPublicLikedConversations().concat(e)),i.store.dispatch(Qpe({conversationId:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(r),i.store.dispatch(Ype({conversationId:e,error:s})),i.handleCommonErrors(s),s}})()}unlikeConversation(e){var i=this;return f(function*(){try{i.store.dispatch(Jpe({conversationId:e}));const r=i.store.selectConversationChannelType(e);yield i.chatClient.unlikeConversation(e,r),i.appStorage.setItem("likedPublicCnvs-".concat(i.store.selectUserState().profile.id),i.store.selectPublicLikedConversations().filter(s=>s!==e)),i.store.dispatch(Xpe({conversationId:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(r),i.store.dispatch(ehe({conversationId:e,error:s})),i.handleCommonErrors(s),s}})()}kickUser(e,i){var r=this;return f(function*(){try{r.store.dispatch(whe({conversationId:e,userId:i}));const s=r.store.selectConversationChannelType(e),a=yield r.chatClient.kickUser(e,i,s),c=r.store.selectUserState().profile,u=(yield r.userRepository.getSimpleProfiles([i]))[0],b=r.chatItemsFactory.createMessage({id:a.messageId,type:Ii.Kick,conversationId:e,data:{kickedUserId:i,username:u.username.currentUsername},isDeleted:!1,senderId:c.id},[c,u]);r.store.dispatch(WI({message:b,sender:c})),r.store.dispatch(The({conversationId:e,userId:i}))}catch(s){const a=jt.createErrorInstance(s);throw console.warn(a),r.store.dispatch(Phe({conversationId:e,userId:i,error:a})),a}})()}addNewConversationDraft(e,i={}){var r;const s=this.store.selectUserState().profile,a=this.chatItemsFactory.createClientConversation({channel:e,ownerId:s.id,isLocked:!1,displayOrder:null!==(r=null==i?void 0:i.displayOrder)&&void 0!==r?r:0},[s]);return this.store.dispatch(khe({conversation:a,owner:s})),a}createConversation(e,i,r){var s=this;return f(function*(){const a=s.messageSanitizer.sanitizeMessage(e.message),c=s.messageValidator.validateMessage(a,"public",i);if(!c.isValid)throw c.error;const u=s.store.selectUserState().profile,h={type:a.type,data:a.data,conversationId:void 0,isDeleted:!1,senderId:u.id,id:void 0,createdAt:void 0,isAdmin:!1};let b;if(r){var w;const R=s.store.selectPublicConversationById(r);e.displayOrder=null!==(w=e.displayOrder)&&void 0!==w?w:R.displayOrder,b=s.chatItemsFactory.createClientConversation({...R,firstMsg:h,displayOrder:e.displayOrder},[u])}else b=s.chatItemsFactory.createClientConversation({ownerId:u.id,channel:i,firstMsg:h,displayOrder:e.displayOrder},[u]);try{s.store.dispatch(Che({conversation:b,owner:u}));const R=s.store.selectPublicChatState({channel:i}).type,G=yield s.chatClient.createConversation({...e,message:a},{id:i,type:R},b.createdAt);return s.store.dispatch(yhe({conversationId:G.conversationId,tempId:b.id,firstMsg:s.chatItemsFactory.createClientMessage({...h,conversationId:G.conversationId,id:G.messageId})})),s.store.dispatch(x6({conversationId:G.conversationId})),G.conversationId}catch(R){const G=jt.createErrorInstance(R);throw console.warn(G),s.store.dispatch(She({id:b.id,error:G})),s.handleCommonErrors(G),G}})()}readConversation(e){const i=this.store.selectPublicConversationById(e);if(i){try{this.chatClient.readConversation(e,i.channel)}catch(r){console.warn(r)}this.store.dispatch(jpe({conversationId:e}))}}shareContent(e,i){var r=this;return f(function*(){try{const s=Vh.createNewShareContentMessage(e);r.store.dispatch(R6({content:e,conversationId:i})),yield r.sendMessage(s,i),r.store.dispatch(_he({conversationId:i}))}catch(s){throw console.warn(s),r.store.dispatch(vhe({content:e,conversationId:i,error:s})),r.handleCommonErrors(s),s}})()}shareInNewConversation(e,i){var r=this;return f(function*(){try{const s=Vh.createNewShareContentMessage(e),a=r.addNewConversationDraft(i),c=yield r.createConversation(Vh.createNewConversation(s),i,a.id);r.store.dispatch(R6({content:e,conversationId:c})),r.store.dispatch(_he({conversationId:c}))}catch(s){throw console.warn(s),r.handleCommonErrors(s),s}})()}openConversation(e){var i=this;return f(function*(){try{i.store.dispatch(Vk({conversationId:e})),yield i.getMessages({page:0,pageCount:1,sort:ie.ESort.Desc},e)}catch(r){console.warn(r)}})()}closeConversation(e){this.store.dispatch(I6({conversationId:e}))}openChat(e={}){const i=e.channel||this.store.selectPublicChatsIds()[0];this.markChatAsSeen(i),e.conversationId&&this.openConversation(e.conversationId)}markChatAsSeen(e){this.store.dispatch(Hpe({channels:"string"==typeof e?[e]:e}))}dispose(){this.listeners.forEach(e=>e.listener.detach()),this.chatRetryIntervals.forEach(e=>clearInterval(e.intervalId)),this.chatClient.disposeAll(),this.store.dispatch(zpe());for(let e in localStorage)-1!==e.indexOf("likedPublicCnvs")&&this.appStorage.removeItem(e)}onDisconnect(e){var i=this;return f(function*(){i.stopTryToSynchronizeChatCycle(e),i.store.dispatch(Ahe({channel:e}))})()}onConnectionRestored(e){var i=this;return f(function*(){i.store.dispatch(k6({channel:e}))})()}synchronizeChat(e){var i=this;return f(function*(){const r=i.store.selectPublicChatState({channel:e});if(r.synchronizeState.isSynchronizing)return;const s=i.store.selectPublicOpenedConversationModel({channel:e});try{i.store.dispatch(Ihe({channel:e})),yield i.connect(e);const a=i.store.selectPublicOpenedConversation({channel:e});if(!r.synchronizeState.isSynced){const c=i.store.selectPublicConversationsList().filter(u=>u.channel===e&&u.id!==a).map(u=>u.id);i.store.dispatch(Hk({ids:c}))}if(yield i.getConversations(e),s&&!r.synchronizeState.isSynced){i.store.dispatch(bhe({conversationId:s.id}));try{yield i.getMessages({page:0,pageCount:qI.calculateNextPageIndex(s.messagesLengthBySort(ie.ESort.Desc),s.meta.messagesPerPage)+1,sort:ie.ESort.Desc},s.id)}catch(c){s&&i.closeConversation(s.id)}}i.store.dispatch(Mhe({channel:e}))}catch(a){throw s&&i.closeConversation(s.id),i.store.dispatch(Hk({ids:i.store.selectPublicConversationsList().filter(c=>c.channel===e).map(c=>c.id)})),i.store.dispatch(Ohe({channel:e,error:a})),a}})()}startTryToSynchronizeChatCycle(e){var i=this;this.stopTryToSynchronizeChatCycle(e);const r=setInterval(f(function*(){try{yield i.synchronizeChat(e),i.stopTryToSynchronizeChatCycle(e)}catch(s){console.warn(s)}}),1e3*(0,ie.randomInt)(30,60));this.chatRetryIntervals.find(s=>s.channel===e).intervalId=r}stopTryToSynchronizeChatCycle(e){const i=this.chatRetryIntervals.find(r=>r.channel===e);i&&clearInterval(i.intervalId)}initChatState(e){var i=this;return f(function*(){const r=Array.isArray(e)?e:[e];yield i.store.dispatch(Ehe({channels:r})),i.chatRetryIntervals.concat(new ie.List(r.map(s=>({channel:s.id,intervalId:void 0}))))})()}deleteChatState(e){const i="string"==typeof e?[e]:e;i.forEach(r=>this.stopTryToSynchronizeChatCycle(r)),this.disconnect(i),this.store.dispatch(xhe({channels:i})),this.chatRetryIntervals=this.chatRetryIntervals.where(r=>null!=i.find(s=>s===r.channel))}handleCommonErrors(e){e instanceof lt.ServerUnavailableError&&this.store.dispatch(Rhe({isInMaintenance:!0}))}initChannelStateIfMissing(e){var i=this;return f(function*(){i.store.selectPublicChatState({channel:e.id})||(yield i.initChatState(e))})()}setupProvidedSelectors(e){J.prototype.selectPublicChatIsOpened=e.selectPublicChatIsOpened(),J.prototype.subscribePublicChatIsOpened=e.subscribePublicChatIsOpened()}}).\u0275fac=function(e){return new(e||t)(T(J),T(ed),T(Xu),T(T6),T(P6),T(gC),T(Dr),T(Dk),T(Ci),T(Vpe))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[J,ed,Xu,T6,P6,gC,Object,Dk,Ci,Object])],n),n})(),Dhe=(()=>{var t;class n{constructor(e,i){this.store=e,this.publicChatService=i,this.addListeners()}onClubJoined(e){this.publicChatService.initChatState({id:e,type:Ar.Club})}onClubLeft(e){this.publicChatService.deleteChatState(e)}addListeners(){this.addClubListener()}addClubListener(){var e;let i,r;null===(e=this.store.clubs)||void 0===e||e.subscribeClubProfileId().pipe(ws((s,a)=>(i=s,r=a,!(!s&&null!=a||null!=s&&!a||a!=s)))).subscribe(s=>{s?this.onClubJoined(s):!s&&i&&this.onClubLeft(i)})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(l0))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Ml=ki({selectId:t=>t.id,sortComparer:!1}),nr=ki({selectId:t=>t.id,sortComparer:(t,n)=>(t.displayOrder||n.displayOrder)&&n.displayOrder!==t.displayOrder?n.displayOrder-t.displayOrder:n.createdAt-t.createdAt}),rs=ki({selectId:t=>t.id,sortComparer:(t,n)=>t.createdAt-n.createdAt}),rf=ki({selectId:t=>t.id,sortComparer:!1}),Ol=ki({selectId:t=>t.conversationId,sortComparer:!1}),Bhe={chats:Ml.getInitialState(),conversations:nr.getInitialState({subscribed:[],liked:[]}),messages:rs.getInitialState(),users:rf.getInitialState(),conversationsMessages:Ol.getInitialState()},Vnt=Sr(Bhe,de(zpe,t=>{const n=Ml.getSelectors().selectAll(t.chats);return{...Bhe,chats:Ml.setAll(n.map(o=>Fhe(o)),t.chats)}}),de(Vk,(t,n)=>Se(t,o=>{const e=Wk(o,n.conversationId);e&&(e.selected=n.conversationId)})),de(I6,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Hc(t,t.chats.entities[o.channel].selected);if(!e)return t;const i=u0(t,o.id),r=rs.getSelectors().selectAll(t.messages).filter(w=>i[ie.ESort.Desc].find(R=>R.id===w.id)).map(w=>({id:w.id,createdAt:w.createdAt})),s=r.length,a=r.slice(Math.max(s-o.meta.messagesPerPage,0),s),c=i[ie.ESort.Desc].concat(i[ie.ESort.Asc]).map(w=>w.id).filter(w=>!a.find(R=>R.id===w)),u=o.meta[ie.ESort.Desc].isLastPage&&a.length===s,h=Se(o,w=>{w.loadingState.isLoading=!1,w.loadingState.error=void 0,w.meta[ie.ESort.Desc].queriesInProgress=[],w.meta[ie.ESort.Desc].isLastPage=u,w.meta[ie.ESort.Asc].queriesInProgress=[],w.meta[ie.ESort.Asc].isLastPage=u}),b=fg(o.id);return b.messages[ie.ESort.Desc]=a,b.messages[ie.ESort.Asc]=u?a:[],{...t,chats:Ml.updateOne({id:o.channel,changes:{selected:e&&e.id===n.conversationId?void 0:e.id}},t.chats),conversations:nr.updateOne({id:o.id,changes:h},t.conversations),messages:rs.removeMany(c,t.messages),conversationsMessages:Ol.updateOne({id:o.id,changes:b},t.conversationsMessages)}}),de(jpe,(t,n)=>Se(t,o=>{o.conversations=nr.updateOne({id:n.conversationId,changes:{unread:0}},t.conversations);const e=Wk(o,n.conversationId);e&&(e.unread=e.unread.filter(i=>i!==n.conversationId))})),de(Hpe,(t,n)=>Se(t,o=>{const e=n.channels.map(i=>({id:i,changes:{hasUnseenMessages:!1}}));o.chats=Ml.updateMany(e,t.chats)})),de(cw,(t,n)=>Se(t,o=>{o.conversations.subscribed=n.chat.globalConversations})),de(the,(t,n)=>Se(t,o=>{const e=gg(o,n.channel);e&&(e.loadingState.isLoading=!0)})),de(nhe,(t,n)=>{const o=n.list.map(r=>fg(r.id)),e=gg(t,n.channel);if(!e)return t;const i=n.list.filter(r=>r.unread>0).map(r=>r.id);return{...t,chats:Ml.updateOne({id:n.channel,changes:{hasUnseenMessages:i.length>0,isInMaintenance:!1,unread:i,loadingState:{...e.loadingState,isLoading:!1,isLoaded:!0,error:void 0}}},t.chats),conversations:nr.upsertMany(n.list,t.conversations),users:rf.upsertMany(n.users,t.users),conversationsMessages:Ol.upsertMany(o,t.conversationsMessages)}}),de(ihe,(t,n)=>Se(t,o=>{const e=gg(o,n.channel);e&&(e.loadingState.isLoading=!1,e.loadingState.error=n.error)})),de(ahe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.meta[n.query.sort].queriesInProgress.push(n.query),i.loadingState.isLoading=!0});return{...t,conversations:nr.updateOne({id:o.id,changes:e},t.conversations)}}),de(che,(t,n)=>{const o=t.conversations.entities[n.conversationId],e=n.query.sort===ie.ESort.Asc?ie.ESort.Desc:ie.ESort.Asc,i=u0(t,n.conversationId),r=0!==s6(i[e].map(te=>te.id),n.messages.map(te=>te.id)).length,s=n.messages.length<o.meta.messagesPerPage||r,a={...o.meta[e],isLastPage:s},c=i[n.query.sort],u=zh(n.messages),h=u.filter(te=>!c.find(ee=>ee.id===te.id));let b=zh(c.concat(h)),w=i[e],R=[],G=[];if(s){const te=zh(XA(b.concat(w),"id"));G=te,R=te}else G=b,R=w;const K=Se({...o},te=>{te.createdAt=!o.createdAt&&u.length?u[u.length-1].createdAt:o.createdAt,te.loadingState.isLoaded=!0,te.loadingState.isLoading=!1,te.meta[n.query.sort].isLastPage=s,te.meta[n.query.sort].queriesInProgress=Nhe(te,n.query),te.meta[e]=a});return{...t,conversations:nr.updateOne({id:n.conversationId,changes:K},t.conversations),messages:rs.upsertMany(n.messages,t.messages),users:rf.upsertMany(n.users,t.users),conversationsMessages:Ol.upsertOne({conversationId:n.conversationId,messages:{...i,[n.query.sort]:G,[e]:R}},t.conversationsMessages)}}),de(lhe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.meta[n.query.sort].queriesInProgress=Nhe(i,n.query),i.loadingState.isLoading=!1,i.loadingState.error=n.error});return{...t,conversations:nr.updateOne({id:o.id,changes:e},t.conversations)}}),de(dhe,(t,n)=>{const o=qk(t,n.id);if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.delete.inProgress=!0})};return Se(t,i=>{i.messages=rs.updateOne(e,t.messages)})}),de(phe,Wpe,(t,n)=>({...t,messages:rs.updateOne({id:n.message.messageId,changes:{isDeleted:!0}},t.messages)})),de(hhe,(t,n)=>{const o=qk(t,n.id);if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.delete.inProgress=!1})};return Se(t,i=>{i.messages=rs.updateOne(e,t.messages)})}),de(mhe,(t,n)=>{const o=rs.getSelectors().selectEntities(t.messages)[n.id];if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.report.inProgress=!1})};return Se(t,i=>{i.messages=rs.updateOne(e,t.messages)})}),de(fhe,ghe,(t,n)=>{const o=rs.getSelectors().selectEntities(t.messages)[n.id];if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.report.inProgress=!1})};return Se(t,i=>{i.messages=rs.updateOne(e,t.messages)})}),de(ohe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e={id:n.conversationId,changes:Se({...o},i=>{i.actions.delete.inProgress=!0})};return Se(t,i=>{i.conversations=nr.updateOne(e,t.conversations)})}),de(rhe,E6,(t,n)=>{const o=Wk(t,n.conversationId);return o?{...t,chats:Ml.updateOne({id:o.id,changes:{selected:o.selected===n.conversationId?void 0:o.selected,unread:o.unread.filter(e=>e!==n.conversationId)}},t.chats),conversations:{...nr.removeOne(n.conversationId,t.conversations),subscribed:t.conversations.subscribed.filter(e=>e.conversationId!==n.conversationId)},messages:rs.removeMany(e=>e.conversationId===n.conversationId,t.messages),conversationsMessages:Ol.removeOne(n.conversationId,t.conversationsMessages)}:t}),de(she,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.delete.inProgress=!1});return{...t,conversations:nr.updateOne({id:o.id,changes:e},t.conversations)}}),de(Zpe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.like.inProgress=!0});return{...t,conversations:nr.updateOne({id:o.id,changes:e},t.conversations)}}),de(Qpe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.like.inProgress=!1,i.likes=i.likes+1,i.isLiked=!0});return{...t,conversations:{...nr.updateOne({id:o.id,changes:e},t.conversations),liked:t.conversations.liked.concat(n.conversationId)}}}),de(Ype,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.like.inProgress=!1,i.actions.like.error=n.error});return{...t,conversations:nr.updateOne({id:o.id,changes:e},t.conversations)}}),de(Jpe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.unlike.inProgress=!0});return{...t,conversations:nr.updateOne({id:o.id,changes:e},t.conversations)}}),de(Xpe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.unlike.inProgress=!1,i.likes=Math.max(0,i.likes-1),i.isLiked=!1});return{...t,conversations:{...nr.updateOne({id:o.id,changes:e},t.conversations),liked:t.conversations.liked.filter(i=>i!==n.conversationId)}}}),de(ehe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{i.actions.unlike.inProgress=!1,i.actions.unlike.error=n.error});return{...t,conversations:nr.updateOne({id:o.id,changes:e},t.conversations)}}),de(M6,(t,n)=>({...t,conversations:nr.upsertOne(n.conversation,t.conversations),users:rf.upsertMany(n.users,t.users),conversationsMessages:Ol.upsertOne(fg(n.conversation.id),t.conversationsMessages)})),de(x6,(t,n)=>{const o=Hc(t,n.conversationId);return o?{...t,conversations:{...t.conversations,subscribed:t.conversations.subscribed.concat({conversationId:o.id,channel:o.channel})}}:t}),de(Lhe,(t,n)=>({...t,conversations:{...t.conversations,liked:n.conversationsIds}})),de(zk,(t,n)=>{const o=t.conversations.entities[n.message.conversationId];if(!o)return t;const e=Se({...n.message},u=>{u.isSent=!1,u.actions.send={inProgress:!0,error:void 0}}),i=u0(t,o.id),r={id:n.message.id,createdAt:n.message.createdAt},s=i[ie.ESort.Asc],a=i[ie.ESort.Desc],c=fg(o.id);return c.messages[ie.ESort.Asc]=o.meta[ie.ESort.Asc].isLastPage?zh(s.concat(r)):s,c.messages[ie.ESort.Desc]=zh(a.concat(r)),{...t,messages:rs.upsertOne(e,t.messages),users:rf.upsertOne(n.sender,t.users),conversationsMessages:Ol.upsertOne(c,t.conversationsMessages)}}),de(uhe,(t,n)=>Se(t,o=>{const e=Se({...n.message},i=>{i.actions.send.inProgress=!0,i.actions.send.error=void 0});o.messages=rs.upsertOne(e,t.messages)})),de(jk,(t,n)=>{const o=t.conversations.entities[n.message.conversationId];if(!o||!qk(t,n.tempMessageId))return t;const i=u0(t,o.id),r={id:n.tempMessageId,changes:{...n.message,isSent:!0}},s={id:n.message.id,createdAt:n.message.createdAt},a=i[ie.ESort.Asc].filter(b=>b.id!==n.tempMessageId),c=i[ie.ESort.Desc].filter(b=>b.id!==n.tempMessageId),u=fg(o.id);u.messages[ie.ESort.Asc]=o.meta[ie.ESort.Asc].isLastPage?zh(a.concat(s)):a,u.messages[ie.ESort.Desc]=zh(c.concat(s));const h={id:o.id,changes:{messagesCount:o.messagesCount+1}};return{...t,conversations:nr.updateOne(h,t.conversations),messages:rs.updateOne(r,t.messages),users:rf.upsertOne(n.sender,t.users),conversationsMessages:Ol.upsertOne(u,t.conversationsMessages)}}),de(O6,(t,n)=>{const o=t.conversations.entities[n.message.conversationId];if(!o)return t;const e=Wk(t,n.message.conversationId);if(!e)return t;const i=e.selected===n.message.conversationId,s=!(void 0===t.conversations.subscribed.find(c=>c.conversationId===o.id)||i&&Uhe(e.id)),a={id:n.message.conversationId,changes:{messagesCount:o.messagesCount+1,unread:s?o.unread+1:o.unread}};return{...t,chats:Ml.updateOne({id:e.id,changes:{hasUnseenMessages:!Uhe(e.id),unread:s&&!e.unread.find(c=>c===n.message.conversationId)?e.unread.concat(n.message.conversationId):e.unread}},t.chats),conversations:nr.updateOne(a,t.conversations)}}),de(WI,(t,n)=>{const o=t.conversations.entities[n.message.conversationId];if(!o)return t;const e=u0(t,o.id),i={id:n.message.id,createdAt:n.message.createdAt},r=e[ie.ESort.Asc],s=e[ie.ESort.Desc],a=fg(o.id);return a.messages[ie.ESort.Asc]=o.meta[ie.ESort.Asc].isLastPage?zh(r.concat(i)):r,a.messages[ie.ESort.Desc]=zh(s.concat(i)),Se(t,c=>{if(c.messages=rs.upsertOne(n.message,t.messages),c.users=rf.upsertOne(n.sender,t.users),c.conversationsMessages=Ol.upsertOne(a,t.conversationsMessages),n.message.type===Ii.Kick){const u=t.conversations.entities[n.message.conversationId];u&&(c.conversations=nr.updateOne({id:n.message.conversationId,changes:{kicked:u.kicked.concat(u.kicked.concat(n.message.data.kickedUserId)),messagesCount:u.messagesCount+1}},t.conversations))}})}),de(A6,(t,n)=>{const o=qk(t,n.id);if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.send.inProgress=!1,i.actions.send.error=n.error})};return Se(t,i=>{i.messages=rs.updateOne(e,t.messages)})}),de($pe,(t,n)=>({...t,conversations:nr.updateOne({id:n.conversationId,changes:{isLocked:!0}},t.conversations)})),de(Kpe,(t,n)=>({...t,conversations:nr.updateOne({id:n.conversationId,changes:{isLocked:!1}},t.conversations)})),de(L6,(t,n)=>{const o=n.channels.map(e=>({id:e,changes:{isInitialized:n.isInitialized}}));return{...t,chats:Ml.updateMany(o,t.chats)}}),de(R6,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{n.content.shareType===pg.Room&&(i.sharedRoomsIds=o.sharedRoomsIds.concat(n.content.shareData.roomId))});return{...t,conversations:nr.updateOne({id:n.conversationId,changes:e},t.conversations)}}),de(vhe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e=Se({...o},i=>{if(n.content.shareType===pg.Room){const r=n.content.shareData.roomId;i.sharedRoomsIds=i.sharedRoomsIds.filter(s=>s!==r)}});return{...t,conversations:nr.updateOne({id:n.conversationId,changes:e},t.conversations)}}),de(Hk,(t,n)=>Se(t,o=>{o.conversations=nr.removeMany(n.ids,t.conversations),Ml.getSelectors().selectAll(o.chats).forEach(e=>{e.selected=-1!==n.ids.indexOf(e.selected)?void 0:e.selected}),o.messages=rs.removeMany(e=>-1!==n.ids.indexOf(e.conversationId),t.messages),o.conversationsMessages=Ol.removeMany(n.ids,t.conversationsMessages)})),de(bhe,(t,n)=>{const o=Hc(t,n.conversationId);if(!o)return t;const e={id:n.conversationId,changes:{meta:{...o.meta,[ie.ESort.Asc]:{...o.meta[ie.ESort.Asc],isLastPage:!1},[ie.ESort.Desc]:{...o.meta[ie.ESort.Desc],isLastPage:!1}}}};return{...t,conversations:nr.updateOne(e,t.conversations),messages:rs.removeMany(i=>i.conversationId===n.conversationId,t.messages),conversationsMessages:Ol.updateOne({id:n.conversationId,changes:fg(n.conversationId)},t.conversationsMessages)}}),de(Che,(t,n)=>{const o=Se({...n.conversation},e=>{e.actions.create.inProgress=!0,e.messagesCount=1,e.unread=0,e.meta[ie.ESort.Desc].isLastPage=!0,e.meta[ie.ESort.Asc].isLastPage=!0});return{...t,conversations:nr.upsertOne(o,t.conversations),users:rf.upsertOne(n.owner,t.users),conversationsMessages:Ol.upsertOne(fg(o.id),t.conversationsMessages)}}),de(yhe,(t,n)=>{const o=Hc(t,n.tempId);if(!o)return t;const e=gg(t,o.channel);if(!e)return t;const i=Se({...o},s=>{s.id=n.conversationId,s.isDraft=!1,s.actions.create.inProgress=!1,s.loadingState.isLoaded=!0,s.loadingState.isLoading=!1,s.firstMsg=n.firstMsg}),r=u0(t,n.tempId);return{...t,chats:Ml.updateOne({id:o.channel,changes:{selected:e.selected===n.tempId?n.conversationId:e.selected}},t.chats),conversations:nr.updateOne({id:n.tempId,changes:i},t.conversations),conversationsMessages:Ol.updateOne({id:n.tempId,changes:{conversationId:n.conversationId,messages:{...r,[ie.ESort.Asc]:zh(r[ie.ESort.Asc].concat(n.firstMsg)),[ie.ESort.Desc]:zh(r[ie.ESort.Desc].concat(n.firstMsg))}}},t.conversationsMessages),messages:rs.upsertOne(n.firstMsg,t.messages)}}),de(She,(t,n)=>{const o=Hc(t,n.id);if(!o)return t;const e={id:n.id,changes:Se({...o},i=>{i.actions.create.inProgress=!1,i.actions.create.error=n.error})};return Se(t,i=>{i.conversations=nr.updateOne(e,t.conversations)})}),de(Ehe,(t,n)=>({...t,chats:Ml.upsertMany(n.channels.map(o=>Fhe(o)),t.chats)})),de(xhe,(t,n)=>{const o=function jnt(t,n){const o=lw(n);return nr.getSelectors().selectAll(t.conversations).filter(e=>null!=o[e.channel])}(t,n.channels).map(i=>i.id),e=function Hnt(t,n){const o=lw(n);return rs.getSelectors().selectAll(t.messages).filter(e=>null!=o[e.conversationId])}(t,o).map(i=>i.id);return{...t,chats:Ml.removeMany(n.channels,t.chats),conversations:nr.removeMany(o,t.conversations),messages:rs.removeMany(e,t.messages),conversationsMessages:Ol.removeMany(o,t.conversationsMessages)}}),de(k6,Ahe,(t,n)=>{const o=gg(t,n.channel);if(!o)return t;const e={id:n.channel,changes:{synchronizeState:{...o.synchronizeState,isSynced:!1}}};return{...t,chats:Ml.updateOne(e,t.chats)}}),de(Rhe,(t,n)=>{const e=Ml.getSelectors().selectAll(t.chats).map(i=>({id:i.id,changes:{isInMaintenance:n.isInMaintenance}}));return{...t,chats:Ml.updateMany(e,t.chats)}}),de(khe,(t,n)=>{const o=Se({...n.conversation},e=>{e.isDraft=!0,e.loadingState.isLoaded=!0,e.meta[ie.ESort.Desc].isLastPage=!0,e.meta[ie.ESort.Asc].isLastPage=!0});return{...t,conversations:nr.upsertOne(o,t.conversations),users:rf.upsertOne(n.owner,t.users),conversationsMessages:Ol.upsertOne(fg(o.id),t.conversationsMessages)}}),de(whe,(t,n)=>{const e=rs.getSelectors().selectAll(t.messages).filter(i=>i.conversationId===n.conversationId&&i.senderId===n.userId).map(i=>({id:i.id,changes:Se({...i},r=>{r.actions.kick.inProgress=!0,r.actions.kick.error=void 0})}));return{...t,messages:rs.updateMany(e,t.messages)}}),de(The,(t,n)=>{const e=rs.getSelectors().selectAll(t.messages).filter(i=>i.conversationId===n.conversationId&&i.senderId===n.userId).map(i=>({id:i.id,changes:Se({...i},r=>{r.actions.kick.inProgress=!1})}));return{...t,messages:rs.updateMany(e,t.messages)}}),de(Phe,(t,n)=>{const e=rs.getSelectors().selectAll(t.messages).filter(i=>i.conversationId===n.conversationId&&i.senderId===n.userId).map(i=>({id:i.id,changes:Se({...i},r=>{r.actions.kick.inProgress=!1,r.actions.kick.error=n.error})}));return{...t,messages:rs.updateMany(e,t.messages)}}),de(Ihe,(t,n)=>Se(t,o=>{const e=gg(o,n.channel);e&&(e.synchronizeState.isSynchronizing=!0)})),de(Mhe,(t,n)=>Se(t,o=>{const e=gg(o,n.channel);e&&(e.synchronizeState.isSynced=!0,e.synchronizeState.isSynchronizing=!1,e.synchronizeState.error=void 0)})),de(Ohe,(t,n)=>Se(t,o=>{const e=gg(o,n.channel);e&&(e.synchronizeState.isSynced=!1,e.synchronizeState.isSynchronizing=!1,e.synchronizeState.error=n.error)})));function znt(t,n){return Vnt(t,n)}function zh(t,n=ie.ESort.Asc){return Zf(t,["createdAt"],[n])}function Hc(t,n){return nr.getSelectors().selectEntities(t.conversations)[n]}function qk(t,n){return rs.getSelectors().selectEntities(t.messages)[n]}function u0(t,n){return Ol.getSelectors().selectEntities(t.conversationsMessages)[n].messages}function Nhe(t,n){return t.meta[n.sort].queriesInProgress.filter(o=>!Kf(o,n))}function fg(t){return{conversationId:t,messages:{[ie.ESort.Desc]:[],[ie.ESort.Asc]:[]}}}function Wk(t,n){const o=Hc(t,n);return o?gg(t,o.channel):void 0}function gg(t,n){return t.chats.entities[n]}function Fhe(t){return{id:t.id,type:t.type,hasUnseenMessages:!1,isInitialized:!1,synchronizeState:{isSynced:!0,isSynchronizing:!1,error:void 0},isInMaintenance:!1,loadingState:{error:void 0,isLoaded:!1,isLoading:!1},selected:void 0,unread:[]}}function Uhe(t){return J.prototype.selectPublicChatIsOpened({channel:t})}const nv=Ts(w6.featureKey),qnt=We(nv,t=>t.chats),$I=We(nv,t=>t.conversations),Wnt=We(nv,t=>t.messages),$nt=We(nv,t=>t.users),Knt=We(nv,t=>t.conversationsMessages),dd=Ml.getSelectors(qnt),d0=nr.getSelectors($I),Ghe=rs.getSelectors(Wnt),Vhe=Ol.getSelectors(Knt),Znt=rf.getSelectors($nt),zhe=()=>We(dd.selectEntities,(t,n)=>t[n.channel]),Qnt=We(dd.selectAll,t=>t),jhe=We(dd.selectAll,t=>t.filter(n=>n.type===Ar.LanguageBased)),D6=We(dd.selectAll,t=>t.find(n=>n.type===Ar.Club)),Hhe=We(D6,t=>null==t?void 0:t.id),Ynt=We(dd.selectEntities,d0.selectEntities,(t,n,o)=>{var e;const i=n[o.conversationId];return!!i&&(null===(e=t[i.channel])||void 0===e?void 0:e.selected)===o.conversationId}),qhe=()=>We(dd.selectEntities,(t,n)=>{var o;return null===(o=t[n.channel])||void 0===o?void 0:o.selected}),Whe=()=>We(dd.selectEntities,d0.selectEntities,(t,n,o)=>{var e;return n[null===(e=t[o.channel])||void 0===e?void 0:e.selected]}),$he=()=>We($I,(t,n)=>n.channel?nr.getSelectors().selectAll(t).filter(o=>o.channel===n.channel):nr.getSelectors().selectAll(t)),Khe=()=>We(d0.selectEntities,(t,n)=>t[n]),Zhe=We(dd.selectAll,t=>{const n=t.filter(i=>i.type===Ar.Club).reduce((i,r)=>i+r.unread.length,0),o=t.filter(i=>i.type===Ar.LanguageBased).reduce((i,r)=>i+r.unread.length,0),e={languageBasedTotal:o,clubTotal:n,total:o+n};return t.forEach(i=>e[i.id]=i.unread.length),e}),Qhe=We(dd.selectAll,t=>{const n={hasUnseenMessages:t.some(o=>o.hasUnseenMessages)};return t.forEach(o=>n[o.id]=o.hasUnseenMessages),n}),Yhe=()=>We(dd.selectEntities,(t,n)=>{var o;return null===(o=t[n.channel])||void 0===o?void 0:o.isInMaintenance}),Jnt=We(nv,(t,n)=>void 0!==t.conversations.subscribed.find(o=>o.conversationId===n)),Xnt=We(nv,(t,n)=>!!t.conversations.liked.find(o=>o===n)),eit=We(nv,t=>t.conversations.liked),Jhe=()=>We(Vhe.selectEntities,Ghe.selectEntities,(t,n,o)=>t&&t[o.conversationId]?t[o.conversationId].messages[o.sort].map(e=>n[e.id]):[]),tit=We(Vhe.selectEntities,(t,n)=>t[n.conversationId].messages),nit=We(d0.selectEntities,(t,n)=>{const o=t[n.conversationId];return!!o&&void 0!==o.meta[n.query.sort].queriesInProgress.find(e=>Kf(e,n.query))}),Xhe=We($I,t=>NP(t.subscribed.map(n=>n.channel)));J.prototype.selectPublicChatUsers=function rit(){return this.selectSync(Znt.selectEntities)},J.prototype.selectPublicOpenedConversationModel=function sit(t){return this.selectSync(Whe(),t)},J.prototype.subscribePublicOpenedConversationModel=function ait(t){return this.select(Whe(),t)},J.prototype.selectPublicOpenedConversation=function cit(t){return this.selectSync(qhe(),t)},J.prototype.subscribePublicOpenedConversation=function lit(t){return this.select(qhe(),t)},J.prototype.selectPublicConversationsState=function uit(){return this.selectSync($I)},J.prototype.subscribePublicConversationsState=function dit(){return this.select($I)},J.prototype.selectPublicConversationById=function pit(t){return this.selectSync(Khe(),t)},J.prototype.subscribePublicConversationById=function hit(t){return this.select(Khe(),t)},J.prototype.selectPublicUnreadConversationsCount=function mit(){return this.selectSync(Zhe)},J.prototype.subscribePublicUnreadConversationsCount=function fit(){return this.select(Zhe)},J.prototype.selectPublicConversationsList=function git(t={}){return this.selectSync($he(),t)},J.prototype.subscribePublicConversationsList=function _it(t={}){return this.select($he(),t)},J.prototype.selectPublicChatHasUnseenMessages=function vit(){return this.selectSync(Qhe)},J.prototype.subscribePublicChatHasUnseenMessages=function bit(){return this.select(Qhe)},J.prototype.selectPublicChatIsOpened=function Cit(t){throw new Error("Method not implemented. An implementation for IPublicChatSelectorFacade needs to be provided.")},J.prototype.subscribePublicChatIsOpened=function yit(t){throw new Error("Method not implemented. An implementation for IPublicChatSelectorFacade needs to be provided.")},J.prototype.selectPublicMessagesByConversationId=function Mit(t){return this.selectSync(Jhe(),t)},J.prototype.subscribePublicMessagesByConversationId=function Oit(t){return this.select(Jhe(),t)},J.prototype.selectIsSubscribedToPublicConversation=function Tit(t){return this.selectSync(Jnt,t)},J.prototype.selectPublicConversationMessagesState=function Eit(t){return this.selectSync(tit,{conversationId:t})},J.prototype.selectHasPublicActiveMessagesQuery=function xit(t){return this.selectSync(nit,t)},J.prototype.selectIsPublicConversationOpened=function Ait(t){return this.selectSync(Ynt,{conversationId:t})},J.prototype.selectPublicConversationIsLiked=function Pit(t){return this.selectSync(Xnt,t)},J.prototype.selectPublicLikedConversations=function Iit(){return this.selectSync(eit)},J.prototype.selectPublicChatState=function Rit(t){return this.selectSync(zhe(),t)},J.prototype.subscribePublicChatState=function kit(t){return this.select(zhe(),t)},J.prototype.selectPublicChatsStateList=function Lit(){return this.selectSync(Qnt)},J.prototype.selectPublicChatsIds=function Dit(){return this.selectSync(dd.selectIds)},J.prototype.subscribePublicChatsIds=function Bit(){return this.select(dd.selectIds)},J.prototype.selectPublicSubscribedChannels=function Nit(){return this.selectSync(Xhe)},J.prototype.subscribePublicSubscribedChannels=function Fit(){return this.select(Xhe)},J.prototype.selectPublicChatIsInMaintenance=function Sit(t){return this.selectSync(Yhe(),t)},J.prototype.subscribePublicChatIsInMaintenance=function wit(t){return this.select(Yhe(),t)},J.prototype.selectClubChannel=function Uit(){return this.selectSync(D6)},J.prototype.subscribeClubChannel=function Git(){return this.select(D6)},J.prototype.selectClubChannelId=function Vit(){return this.selectSync(Hhe)},J.prototype.subscribeClubChannelId=function zit(){return this.select(Hhe)},J.prototype.selectLanguageBasedChannels=function jit(){return this.selectSync(jhe)},J.prototype.subscribeLanguageBasedChannels=function Hit(){return this.select(jhe)},J.prototype.selectConversationChannelType=function qit(t){return this.selectSync(We(dd.selectEntities,d0.selectEntities,(t,n,o)=>{var e;const i=n[o.conversationId];if(i)return null===(e=t[i.channel])||void 0===e?void 0:e.type}),{conversationId:t})},J.prototype.selectMessageChannelType=function Wit(t){return this.selectSync(We(dd.selectEntities,d0.selectEntities,Ghe.selectEntities,(t,n,o,e)=>{var i;const r=o[e.messageId];if(!r)return;const s=n[r.conversationId];return s?null===(i=t[s.channel])||void 0===i?void 0:i.type:void 0}),{messageId:t})};let $it=(()=>{var t;class n{constructor(e,i){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(l0),T(Dhe))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[P6,l0,gC,T6,Dhe],imports:[$r.forFeature(w6.featureKey,znt)]}),n})();var jh=function(t){return t.ResetState="[Chat Component] Reset State",t.InitializeState="[Chat Component] Initialize State",t.SetOpened="[Chat Component] Set Opened",t.SelectTab="[Chat Component] Select tab",t.SelectChannel="[Chat Component] Select channel",t.SetUsageIntent="[Chat Component] Set usage intent",t.ResetUsageIntent="[Chat Component] Reset usage intent",t.SetTabs="[Chat Component] Set tabs",t.SetInteractableTabsSubset="[Chat Component] Set interactable tabs subset",t.SetPublicChannels="[Chat Component] Set public channels",t}(jh||{});const eme=he(jh.ResetState),tme=he(jh.InitializeState,{_as:"props",_p:void 0}),B6=he(jh.SetOpened,{_as:"props",_p:void 0}),nme=he(jh.SelectTab,{_as:"props",_p:void 0}),ime=he(jh.SelectChannel,{_as:"props",_p:void 0}),ome=he(jh.SetUsageIntent,{_as:"props",_p:void 0}),rme=he(jh.ResetUsageIntent),Kit=he(jh.SetTabs,{_as:"props",_p:void 0}),sme=he(jh.SetInteractableTabsSubset,{_as:"props",_p:void 0}),Zit=he(jh.SetPublicChannels,{_as:"props",_p:void 0});var N6=function(t){return t.featureKey="chatsContainer",t}(N6||{}),Br=function(t){return t.Public="globalChat",t.Private="privateChat",t.Club="clubChat",t}(Br||{}),Yr=function(t){return t.Select="select",t.Delete="delete",t.Like="like",t.Unlike="unlike",t.ShareContent="shareContent",t.Mute="mute",t.Pin="pin",t.ToggleDropdown="toggleDropdown",t}(Yr||{});let F6=(()=>{var t;class n{constructor(e,i){this.permissions=e,this.store=i}createPublicTab(){return{id:Br.Public,chatType:Br.Public,enabled:()=>this.store.selectLanguageBasedChannels().length&&this.isChatTypeEnabled(nt.EPermissionModule.GlobalChat),text:{key:"CHAT.TABS.GLOBAL"},unread:()=>{const e=this.store.chatComponent.selectPublicChatSelectState().selectedId;return this.store.selectPublicUnreadConversationsCount()[e]},isDisabled:()=>{const e=this.store.chatComponent.selectTabsState().interactableTabsSubset;return e&&!e.find(i=>i===Br.Public)}}}createClubTab(){return{id:Br.Club,chatType:Br.Club,enabled:()=>this.isChatTypeEnabled(nt.EPermissionModule.ClubChat)&&this.permissions.getModulePermission(nt.EPermissionModule.Clubs).isEnabled,text:{key:"CLUBS.CLUB"},unread:()=>this.store.selectPublicUnreadConversationsCount().clubTotal,isDisabled:()=>{const e=this.store.chatComponent.selectTabsState().interactableTabsSubset;return e&&!e.find(i=>i===Br.Club)}}}createPrivateTab(){return{id:Br.Private,chatType:Br.Private,enabled:()=>this.isChatTypeEnabled(nt.EPermissionModule.PrivateChat),text:{key:"CHAT.TABS.PRIVATE"},unread:()=>this.store.selectPrivateUnreadConversationsCount(),hasUnreadAdminMessages:()=>this.store.selectHasUnreadAdminMessages(),isDisabled:()=>{const e=this.store.chatComponent.selectTabsState().interactableTabsSubset;return e&&!e.find(i=>i===Br.Private)}}}createChannelsSelectorOptions(){return this.store.selectLanguageBasedChannels().map(e=>({text:{key:"LANGUAGES.".concat(e.id.toUpperCase(),".FULL")},abbreviation:{key:"LANGUAGES.".concat(e.id.toUpperCase(),".SHORT")},value:e.id}))}isChatTypeEnabled(e){return this.permissions.getActionPermission(e,nt.EModuleAction.Open).isEnabled}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ti),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var iv,sf;let ds=(sf=iv=class{constructor(n,o,e,i){this.contextTreeService=i,this.subs=new ie.List,this.onPublicConversationOpened=r=>{const s=this.store.selectPublicConversationById(r.conversationId);if(!s||s.isDraft)return;const a=this.store.selectPublicChatState({channel:s.channel}).type,c=new Jc.DefaultEvent(a===Ar.LanguageBased?Nn.PublicChat:Nn.ClubChat,sf.EChatAction.ConversationEntered,this.contextTreeService.getContext());this.sendEvent(c)},this.onPrivateConversationOpened=()=>{const r=new Jc.DefaultEvent(Nn.PrivateChat,sf.EChatAction.ConversationEntered,this.contextTreeService.getContext());this.sendEvent(r)},this.onPublicMsgSent=r=>{const s=this.store.selectPublicConversationById(r.message.conversationId),a=this.store.selectPublicChatState({channel:s.channel}).type;this.sendMessageSentEvent(r.message.type,a===Ar.LanguageBased?Nn.PublicChat:Nn.ClubChat)},this.onPrivateMsgSent=r=>{this.sendMessageSentEvent(r.message.type,Nn.PrivateChat)},this.actions=n,this.analytics=o,this.store=e}static getCategoryByConfigKey(n){switch(n){case"private":return Nn.PrivateChat;case"public":return Nn.PublicChat;default:throw new Error("Unknown chat key ".concat(n))}}static getTrackingCategoryByPublicChatType(n){switch(n){case Ar.LanguageBased:return Nn.PublicChat;case Ar.Club:return Nn.ClubChat}}getAnalyticsCategory(n){if("private"===n.chat)return Nn.PrivateChat;switch(this.store.selectMessageChannelType(n.model.id)){case Ar.LanguageBased:return Nn.PublicChat;case Ar.Club:return Nn.ClubChat}}init(){this.attachListeners()}dispose(){this.subs.forEach(n=>n.unsubscribe())}attachListeners(){this.subs.add(this.actions.pipe(ai(Vk)).subscribe(this.onPublicConversationOpened)),this.subs.add(this.actions.pipe(ai(Bk)).subscribe(this.onPrivateConversationOpened)),this.subs.add(this.actions.pipe(ai(jk)).subscribe(this.onPublicMsgSent)),this.subs.add(this.actions.pipe(ai(Gk)).subscribe(this.onPrivateMsgSent))}sendMessageSentEvent(n,o){const e=this.getMessageLabelByType(n);if(!e)return;const i=new aa.DefaultEvent(o,sf.EChatAction.MessageSent,{label:e});this.sendEvent(i)}sendEvent(n){this.analytics.sendEvent(n)}getMessageLabelByType(n){switch(n){case Ii.Text:return sf.EMessageSentLabel.TextMessage;case Ii.Emoji:return sf.EMessageSentLabel.EmojiMessage;case Ii.Image:return sf.EMessageSentLabel.ImageMessage;case Ii.Voice:return sf.EMessageSentLabel.VoiceMessage;case Ii.GameRoom:return sf.EMessageSentLabel.JoinGame;default:return}}},iv.\u0275fac=function(n){return new(n||iv)(T(yr),T(yi),T(J),T(nn))},iv.\u0275prov=be({token:iv,factory:iv.\u0275fac}),iv);var bC;Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],ds.prototype,"init",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],ds.prototype,"dispose",null),ds=sf=Qe([Wo(),ue("design:paramtypes",[yr,yi,J,nn])],ds),function(t){let n;var r;let o,e,i;(r=n=t.EAnalyticsCategory||(t.EAnalyticsCategory={})).Public="public chat",r.Private="private chat",r.Club="club chat",function(r){r.ChatOpened="chat opened",r.MessageSent="message sent",r.ConversationStarted="conversation started",r.ConversationEntered="conversation entered",r.MessageDeleted="message deleted",r.ChatChannelChanged="chat channel changed",r.ImageLightboxOpened="image lightbox opened",r.VoiceMessagePlayed="voice message played",r.JoinGamePressed="join game pressed"}(o=t.EChatAction||(t.EChatAction={})),function(r){r.TextMessage="text message",r.ImageMessage="image message",r.EmojiMessage="emoji message",r.VoiceMessage="voice message",r.JoinGame="join game"}(e=t.EMessageSentLabel||(t.EMessageSentLabel={})),function(r){r.ByOwner="by conversation owner",r.ByAdmin="by admin",r.ByUser="by user",r.ByModerator="by moderator"}(i=t.EMessageDeletedLabel||(t.EMessageDeletedLabel={}))}(ds||(ds={}));let El=((bC=class{constructor(n,o,e,i,r,s,a,c){this.rulerService=c,this.widthBreakpoint=1024,this.subscriptions=new is.List,this.onNavigatedToGame=()=>{this.publicChatService.disconnectAll()},this.onGameViewLeft=()=>{this.synchronizePublicChat(),this.synchronizeClubChat()},this.privateChatService=n,this.publicChatService=o,this.store=e,this.appStorage=i,this.cmpFactory=r,this.matchmakingEvents=s,this.analyticsTracking=a}onAppReady(){this.initializeState(),this.synchronizePublicChat(),this.addClubChatSubscriptions(),this.matchmakingEvents.addEventListener(_i.NavigatedToGame,this.onNavigatedToGame),this.matchmakingEvents.addEventListener(_i.GameViewLeft,this.onGameViewLeft),this.subscriptions.add(this.rulerService.getAppSize().subscribe(n=>this.dimensions=n))}onUserLogout(){this.matchmakingEvents.removeEventListener(_i.NavigatedToGame,this.onNavigatedToGame),this.matchmakingEvents.removeEventListener(_i.GameViewLeft,this.onGameViewLeft),this.subscriptions.forEach(n=>n.unsubscribe()),this.subscriptions=new is.List,this.store.dispatch(eme())}selectTab(n){this.open({tab:n,interactableTabsSubset:this.store.chatComponent.selectTabsState().interactableTabsSubset})}selectChannel(n){this.open({data:{channel:n},interactableTabsSubset:this.store.chatComponent.selectTabsState().interactableTabsSubset})}open(n={}){const o=n.tab||this.store.chatComponent.selectTabsList()[0].chatType;if(this.store.chatComponent.selectIsOpened()||this.trackChatOpened(o),n.tab===Br.Private){const e=this.store.selectPrivateOpenedConversationModel();e&&this.privateChatService.closeConversation(e.getConversationPartner().profile.id)}if(this.store.chatComponent.selectState().tabsState.selectedId&&n.intent&&n.intent.type===zc.ShareContent){const e=this.store.selectPublicOpenedConversationModel({channel:this.store.chatComponent.selectPublicChatSelectState().selectedId})||this.store.selectPublicOpenedConversationModel({channel:this.store.selectClubChannelId()});e&&this.publicChatService.closeConversation(e.id)}switch(n.intent&&this.store.dispatch(ome({intent:n.intent})),this.store.dispatch(sme({tabs:n.interactableTabsSubset})),this.store.dispatch(B6({opened:!0})),this.store.dispatch(nme({tab:o})),o){case Br.Public:this.selectPublicChat(n);break;case Br.Club:this.publicChatService.openChat({...n.data,channel:this.store.selectClubChannelId()});break;case Br.Private:this.privateChatService.openChat(n.data)}}openPrivateChat(n={}){this.open({tab:Br.Private,data:n})}openPublicChat(n={}){this.open({tab:Br.Public,data:n})}openClubChat(n={}){this.open({tab:Br.Club,data:n})}close(){this.store.dispatch(B6({opened:!1})),this.store.dispatch(rme())}closeIfOverlapping(){this.shouldClose()&&this.close()}selectPublicChat(n={}){var o,e,i;const r=this.store.chatComponent.selectPublicChatSelectState().selectedId,s=null!==(o=null===(e=n.data)||void 0===e?void 0:e.channel)&&void 0!==o?o:r;if(this.publicChatService.openChat({...n.data,channel:s}),null!==(i=n.data)&&void 0!==i&&i.channel&&n.data.channel!==r){this.store.dispatch(ime({channel:s})),this.saveLocalSelectedChannel(n.data.channel),this.publicChatService.disconnect(r);const a=new Jc.DefaultEvent(Nn.PublicChat,ds.EChatAction.ChatChannelChanged,{label:s});this.analyticsTracking.sendEvent(a)}}getSelectedPublicChat(){return this.getChat(this.readLocalSelectedChat())||this.getChat(this.store.selectUserState().settings.lang)||this.store.selectLanguageBasedChannels()[0].id}getChat(n){const o=this.store.selectPublicChatsIds();return n&&o.find(e=>e===n)?n:void 0}readLocalSelectedChat(){return this.appStorage.getItem("selectedPublicChannel-".concat(this.store.selectUserState().profile.id))}saveLocalSelectedChannel(n){this.appStorage.setItem("selectedPublicChannel-".concat(this.store.selectUserState().profile.id),n)}synchronizePublicChat(){const n=this.getSelectedPublicChat();this.trySynchronizeChat(n)}synchronizeClubChat(){var n;const o=null===(n=this.store.selectClubChannel())||void 0===n?void 0:n.id;o&&this.trySynchronizeChat(o)}trySynchronizeChat(n){var o=this;return f(function*(){try{yield o.publicChatService.synchronizeChat(n)}catch(e){console.warn(e)}})()}initializeState(){this.store.dispatch(tme({tabs:[this.cmpFactory.createPublicTab(),this.cmpFactory.createClubTab(),this.cmpFactory.createPrivateTab()].filter(n=>n.enabled()),publicChannels:this.cmpFactory.createChannelsSelectorOptions(),selectedPublicChannel:this.getSelectedPublicChat()}))}addClubChatSubscriptions(){const n=this.store.subscribeClubChannelId().pipe(bt(o=>!!o)).subscribe(()=>this.synchronizeClubChat());this.subscriptions.add(n)}trackChatOpened(n){let o;switch(n){case Br.Public:o=Nn.PublicChat;break;case Br.Private:o=Nn.PrivateChat;break;case Br.Club:o=Nn.ClubChat}const e=new Jc.DefaultEvent(o,ds.EChatAction.ChatOpened);this.analyticsTracking.sendEvent(e)}shouldClose(){var n;return!!this.dimensions&&(this.dimensions.width<this.dimensions.height||(null===(n=this.dimensions)||void 0===n?void 0:n.width)<=this.widthBreakpoint)}}).\u0275fac=function(n){return new(n||bC)(T(zI),T(l0),T(J),T(Ci),T(F6),T(nd),T(yi),T(Ua))},bC.\u0275prov=be({token:bC,factory:bC.\u0275fac}),bC);Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],El.prototype,"onAppReady",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],El.prototype,"onUserLogout",null),El=Qe([Wo(),ue("design:paramtypes",[zI,l0,J,Ci,F6,nd,yi,Ua])],El);let ame=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.httpService=e,this.appService=i,this.loader=r,this.shop=s,this.toast=a,this.store=c}redeemPromoCode(e){return this.httpService.get("store/redeem/".concat(e),{params:{device:this.appService.getPlatform()}}).toPromise().then(i=>i.body)}startRedeemPromoCodeProcedure(e){this.loader.on(),this.redeemPromoCode(e).then(i=>{this.loader.off();let r=i.store;this.shop.openItemPopup({item:r.products[0].item,receiverProfile:this.store.selectUserState().profile,store:r,itemParams:{promoCode:e},shopItemType:eC.WithProviders}).catch(a=>console.warn(a))}).catch(i=>{this.loader.off(),this.toast.error("PROMO_CODES.PROMO_CODES_ERROR")})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Qt),T(ro),T(Ko),T(Dt),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),$d=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te){this.constants=w,this.adminBonusMailUnsubscribeService=R,this.clientAdsService=G,this.bonusesService=K,this.toaster=te,this.router=e,this.store=i,this.accountMerge=r,this.appService=Qt.getInstance,this.rateService=s,this.freeRewardsService=a,this.dropNotifications=c,this.chatService=u,this.permissions=h,this.promoCodesService=b}getForwardLink(){const e=this.getForwardToParameter();let i;if(void 0!==e){const r=this.buildForwardObject(e,this.getForwardData());void 0!==r&&(r.type===Yb.Redirect?i=r.data.url:r.type===Yb.Action&&this.handleFeatureAction(r.data))}return i}forward(e,i){const r=this.buildForwardObject(e,i);void 0!==r&&(r.type===Yb.Redirect?this.router.navigateByUrl(r.data.url):r.type===Yb.Action&&this.handleFeatureAction(r.data))}hasForward(){if(!0===this.appService.isMobileApp()){const e=this.appService.getMobileAppService().getCachedDeviceInfo();return e&&void 0!==e.forwardTo&&""!==e.forwardTo}return void 0!==this.getForwardToParameter()}consumeParameter(){if(!0===this.appService.isMobileApp())this.appService.getMobileAppService().consumeParameter("forwardto"),this.appService.getMobileAppService().consumeParameter("data"),this.appService.getMobileAppService().consumeParameter("affiliateId"),this.appService.getMobileAppService().consumeParameter("referralId");else{const e=this.getForwardToString().replace(this.getForwardToParameter(),""),i=this.getForwardData().replace(this.getForwardData(),""),r=this.getUrlParamString("affiliateId").replace(this.getUrlParamString("affiliateId"),""),s=this.getUrlParamString("referralId").replace(this.getUrlParamString("referralId"),"");window.history.replaceState({},document.title,window.location.href.replace(this.getForwardToString(),e)),window.history.replaceState({},document.title,window.location.href.replace(this.getForwardData(),i)),window.history.replaceState({},document.title,window.location.href.replace(this.getUrlParamString("affiliateId"),r)),window.history.replaceState({},document.title,window.location.href.replace(this.getUrlParamString("referralId"),s)),this.appService.consumeParameter("affiliateId"),this.appService.consumeParameter("referralId")}}getForwardToParameter(){let e;if(!0===this.appService.isMobileApp())e=this.appService.getMobileAppService().getCachedDeviceInfo().forwardTo;else{const i=window.location.search.match(/[?|&]forwardto=([^&;]+?)(&|#|;|$|%3F)/);i&&i.length>1&&(i[1]=decodeURIComponent(i[1]).split("|").join("/"),i[1]=-1===i[1].indexOf("undefined")?i[1]:void 0,e=i[1])}return e}getForwardData(){let e="";if(!0===this.appService.isMobileApp())e=this.appService.getMobileAppService().getCachedDeviceInfo().data;else{const i={};new URLSearchParams(window.location.search).forEach((r,s)=>{i[s]=r}),e=JSON.stringify(i)}return e}getForwardToString(){const e=window.location.search.match(/[?|&]forwardto=([^&;]+?)(&|#|;|$|%3F)/);let i;return e&&e.length>1&&(e[1]=decodeURIComponent(e[1]).split("|").join("/"),e[1]=-1===e[1].indexOf("undefined")?e[1]:void 0,i=e[0]),i||""}getUrlParamString(e){const i=window.location.search.match(/[?|&]/+e+/=([^&;]+?)(&|#|;|$|%3F)/);let r;return i&&i.length>1&&(i[1]=decodeURIComponent(i[1]).split("|").join("/"),i[1]=-1===i[1].indexOf("undefined")?i[1]:void 0,r=i[0]),r||""}buildForwardObject(e,i){let r;if(-1!==p5()(ol).indexOf(e)){let s;if(i)if("string"==typeof i)try{s=JSON.parse(i)}catch(a){s=i}else s=i;r={type:Yb.Action,data:{feature:e,payload:s}}}else void 0!==e&&(r={type:Yb.Redirect,data:{url:e}});return r}handleFeatureAction(e){var i=this;return f(function*(){switch(e.feature){case ol.DailyBonus:i.store.selectUserState()&&i.freeRewardsService.openFreeRewards(Kp.ETabs.Bonuses);break;case ol.AccountMerge:i.store.selectUserState()&&i.accountMerge.askForMerge();break;case ol.PrivateChat:i.store.selectUserState()&&i.permissions.getModulePermission(nt.EPermissionModule.PrivateChat).isEnabled&&i.chatService.openPrivateChat();break;case ol.GlobalChat:i.store.selectUserState()&&i.permissions.getModulePermission(nt.EPermissionModule.PublicClub).isEnabled&&i.chatService.openPublicChat();break;case ol.RateDialog:i.store.selectUserState()&&i.rateService.showRatePopup();break;case ol.FreeRewards:i.store.selectUserState()&&i.freeRewardsService.openFreeRewards(Kp.ETabs.Bonuses);break;case ol.LevelUpRewards:i.store.selectUserState()&&i.freeRewardsService.openFreeRewards(Kp.ETabs.LevelRewards);break;case ol.RegistrationAdventBonus:i.store.selectUserState()&&i.freeRewardsService.openFreeRewards(Kp.ETabs.RegisterBonus);break;case ol.GameInvite:const r=e.payload;i.store.selectUserState()&&r&&r.receiverId===i.store.selectUserState().profile.id&&i.dropNotifications.addToList(e.payload);break;case ol.RedeemPromoCode:i.store.selectUserState()&&e.payload&&i.promoCodesService.startRedeemPromoCodeProcedure(e.payload.promoCode);break;case ol.AdminBonusMailUnsubscribe:i.store.selectUserState()&&e.payload&&i.adminBonusMailUnsubscribeService.unsubscribeFromAdminBonusMail(e.payload.userId);break;case ol.PromoTournamentInvite:if(i.store.selectUserState()&&e.payload){const s=e.payload;i.router.navigate(["/".concat(i.constants.defaultLoggedRoute,"/").concat(s.gameId,"/lobby/tournaments")])}break;case ol.WatchBannerRewardedVideo:if(i.store.selectUserState())try{const s=i.store.bonuses.videoDeltaBanner.selectState();yield i.clientAdsService.showRewardedVideo({containerId:rc.DeltaBanner,video:s,isRewardMiniGame:!!s.gameMode}),yield i.bonusesService.claimVideoBonusReward(Ba.RewardedVideoDeltaBanner),yield i.bonusesService.getVideoBonusReward(Ba.RewardedVideoDeltaBanner)}catch(s){s instanceof lt.NetworkError?i.toaster.error("ERRORS.CONNECTION_ERROR"):s instanceof Bp?i.toaster.error("BONUS.NO_VIDEOS"):s instanceof Np?i.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):s instanceof zm||(s instanceof Fp?i.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):i.toaster.warn("ERRORS.SOMETHING_WRONG")),console.log(s)}}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(J),T(Jb),T(wk),T(Mu),T(o6),T(El),T(Ti),T(ame),T(tn),T(Hae),T(bc),T(Iu),T(Dt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Yit=__webpack_require__(88857);let p0=(()=>{var t;class n{constructor(e){this.config=e,this.isCaptchaEnabled()&&(this.promiseRecaptcha=(0,Yit.zD)(this.config.platform.captchaConfig.siteKey))}isCaptchaEnabled(){return!(!this.config.platform.captchaConfig||!this.config.platform.captchaConfig.siteKey)}verifyCaptcha(e){var i=this;return f(function*(){return(yield i.promiseRecaptcha).execute(e)})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dr))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Jit=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[p0],imports:[Mw,Yi]}),n})();class Xit{constructor(n,o){this.http=n,this.apple=o}isAuthorized(){return this.apple.isAppleAuthorized()}login(){var n=this;return f(function*(){const o=yield n.apple.login(),e=yield n.http.post("auth/login/apple",{appleId:o.user,authorizationCode:o.authorizationCode}).toPromise().then(i=>i.body);return{appleId:o.user,...e}})()}register(n,o){var e=this;return f(function*(){const i=yield e.apple.register(),r={...n,authorizationCode:i.authorizationCode,appleId:i.user,email:i.email,firstName:i.firstName,lastName:i.lastName};return e.http.post("auth/register/apple",r,{headers:o}).toPromise().then(s=>s.body)})()}logout(){var n=this;return f(function*(){try{yield n.apple.logout(),console.log("Apple logout success")}catch(o){console.warn("Apple logout error",o)}})()}}var U6;!function(t){class n extends Error{constructor(){super(),this.name="MissingAdvertisementId"}}t.MissingAdvertisementId=n}(U6||(U6={}));class tot{constructor(n){this.http=n}isAuthorized(){return f(function*(){return!0})()}register(n,o){return this.http.post("auth/register/phone-number",n,{headers:o}).toPromise().then(e=>e.body)}login(n){return this.http.post("auth/login/phone-number",n).toPromise().then(o=>o.body)}}class not{constructor(n,o,e){this.http=n,this.config=e,this.reCaptchaVerificationService=o}isAuthorized(){return f(function*(){return!0})()}register(n,o){var e=this;return f(function*(){if(e.reCaptchaVerificationService.isCaptchaEnabled()&&e.config.platform.registrationConfig.email.enabledCaptcha){const r=yield e.reCaptchaVerificationService.verifyCaptcha("emailRegistration");return o.csec=r,(yield e.http.post("auth/register/email",Object.assign(n,{ctoken:r}),{headers:o}).toPromise()).body}return(yield e.http.post("auth/register/email",n,{headers:o}).toPromise()).body})()}login(n){return this.http.post("auth/login/email",n).toPromise().then(o=>o.body)}}class iot{constructor(n,o,e){this.app=n,this.http=o,this.facebook=e}isAuthorized(){return this.facebook.isFacebookAuthorized()}register(n,o){var e=this;return f(function*(){const i=e.app.getDevicePlatform()===$n.Facebook,r=e.facebook.facebookRegisterCredentials(),s=yield e.facebook.api("".concat(r.fbUserId,"/friends")),a={...n,...r,facebookApp:i.toString(),friends:s.data.map(c=>c.id)};return e.http.post("auth/register/facebook",a,{headers:o}).toPromise().then(c=>({...c.body,...r}))})()}login(){var n=this;return f(function*(){const o=yield n.facebook.fbLogin(),e=yield n.http.post("auth/login/facebook",o).toPromise().then(i=>i.body);return console.log("Success - fb token:",o.accessToken),console.log("Success - fb id:",o.fbUserId),{...e,...o}})()}logout(){var n=this;return f(function*(){try{yield n.facebook.logout(),console.log("Facebook logout success")}catch(o){console.warn("Facebook logout error",o)}})()}}class oot{constructor(n,o,e){this.analyticsDevicePlatform=new Ap,this.http=n,this.config=e,this.reCaptchaVerificationService=o}isAuthorized(){return f(function*(){return!0})()}login(n){var o=this;return f(function*(){const e={headers:{"user-platform":o.analyticsDevicePlatform.getPlatform()}};if(o.reCaptchaVerificationService.isCaptchaEnabled()&&o.config.platform.registrationConfig.guest.enabledCaptcha){const r=yield o.reCaptchaVerificationService.verifyCaptcha("webGuestRegistration");return e.headers.csec=r,(yield o.http.post("auth/register/guest",Object.assign(n,{ctoken:r}),e).toPromise()).body}return(yield o.http.post("auth/register/guest",n,e).toPromise()).body})()}}class rot{constructor(n,o,e,i){this.app=n,this.http=o,this.reCaptchaVerificationService=e,this.config=i}isAuthorized(){var n=this;return f(function*(){let o=n.app.getDeviceId();return o&&o.length>0})()}register(n,o){var e=this;return f(function*(){if(e.throwIfMissingAdvertisimentId(),e.reCaptchaVerificationService.isCaptchaEnabled()&&e.config.platform.registrationConfig.guest.enabledCaptcha){const i=yield e.reCaptchaVerificationService.verifyCaptcha("mobileUserRegistration");return e.registerMessage(Object.assign(n,{ctoken:i}),o)}return e.registerMessage(n,o)})()}login(){this.throwIfMissingAdvertisimentId();const n={mobileId:this.app.getDeviceId(),uid:this.app.getUid()};return this.http.post("auth/login/mobile",n).toPromise().then(o=>o.body)}logout(){var n=this;return f(function*(){n.app.getMobileAppService().messages().logout()})()}throwIfMissingAdvertisimentId(){if(!this.app.getDeviceId())throw new U6.MissingAdvertisementId}registerMessage(n,o){return new Promise((e,i)=>{this.app.getMobileAppService().messages().guest({action:"register",args:{...n,headers:o}},r=>{e(r)},r=>{i(new Mp({error:r}))})})}}class sot{constructor(n,o){this.http=n,this.twitter=o}isAuthorized(){var n=this;return f(function*(){return n.twitter.isTwitterAuthorized()})()}register(n,o){var e=this;return f(function*(){const i=yield e.twitter.twitterRegister(),r={accessToken:i.accessToken,accessTokenSecret:i.accessTokenSecret,twitterUserId:i.twitterUserId,twitterUserName:n.username,...n};return e.http.post("auth/register/twitter",r,{headers:o}).toPromise().then(s=>({...s.body,...i}))})()}login(){var n=this;return f(function*(){const o=yield n.twitter.twitterLogin();return{...yield n.http.post("auth/login/twitter",o).toPromise().then(i=>i.body),...o}})()}logout(){var n=this;return f(function*(){try{yield n.twitter.logout(),console.log("Twitter logout success")}catch(o){console.warn("Twitter logout error",o)}})()}}class aot{constructor(n,o){this.http=n,this.google=o}isAuthorized(){return this.google.isGoogleAuthorized()}register(n,o){var e=this;return f(function*(){const i=yield e.google.googleRegister(),r={accessToken:i.accessToken,...n};return e.http.post("auth/register/google",r,{headers:o}).toPromise().then(s=>({...s.body,...i}))})()}login(){var n=this;return f(function*(){const o=yield n.google.googleLogin();return yield n.http.post("auth/login/google",{accessToken:o.accessToken}).toPromise().then(i=>i.body)})()}logout(){var n=this;return f(function*(){try{yield n.google.logout(),console.log("Google logout success")}catch(o){console.warn("Google logout error",o)}})()}}let cot=(()=>{var t;class n{constructor(e){this.injector=e}createAdapter(e){switch(e){case Gt.Email:return new not(this.injector.get(En),this.injector.get(p0),this.injector.get(Dr));case Gt.Facebook:return new iot(this.injector.get(Qt),this.injector.get(En),this.injector.get(km));case Gt.Guest:return new oot(this.injector.get(En),this.injector.get(p0),this.injector.get(Dr));case Gt.Mobile:return new rot(this.injector.get(Qt),this.injector.get(En),this.injector.get(p0),this.injector.get(Dr));case Gt.Twitter:return new sot(this.injector.get(En),this.injector.get(hI));case Gt.Google:return new aot(this.injector.get(En),this.injector.get(ZR));case Gt.Apple:return new Xit(this.injector.get(En),this.injector.get(mI));case Gt.PhoneNumber:return new tot(this.injector.get(En));default:throw new Error("Unknown auth provider: ".concat(e))}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Kd=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.analyticsDevicePlatform=new Ap,this.http=e,this.authListener=i,this.appStorage=r,this.adapterFactory=s,this.app=a,this.store=c,this.clientConfig=u,this.store.subscribeUserState().pipe(ws()).subscribe(this.onUserStateUpdated.bind(this))}isAuthorized(){var e=this;return f(function*(){let i=e.getCurrentLoginType();return!!i&&(yield e.adapterFactory.createAdapter(i).isAuthorized())})()}register(e,i,r){var s=this;return f(function*(){if(!s.clientConfig.getConfig().platform.registrationConfig[e].isRegistrationEnabled)throw new et.Permissions.ActionNotAllowed;const a=s.adapterFactory.createAdapter(e);if(!a.register)throw new Error("Auth adapter "+e+" does not implement method register");const c={};s.app.getAffiliateId()&&(c.affiliateId=s.app.getAffiliateId()),s.app.getReferralId()&&(c.referralId=s.app.getReferralId());const u={"user-platform":s.analyticsDevicePlatform.getPlatform()};try{const h=yield a.register({...i,...c},u);if(r&&r.autoLogin)switch(e){case Gt.Email:const b=i;yield s.login(Gt.Email,{email:b.email,password:b.password});break;case Gt.Facebook:s.writeLoginData(Gt.Facebook,h);break;case Gt.Google:s.writeLoginData(Gt.Google,h);break;case Gt.Twitter:s.writeLoginData(Gt.Twitter,h);break;case Gt.Mobile:const w=i;yield s.login(Gt.Mobile,{mobileId:w.mobileId,uid:w.uid});break;case Gt.Apple:s.writeLoginData(Gt.Apple,h);break;case Gt.PhoneNumber:const R=i;yield s.login(Gt.PhoneNumber,{phoneNumber:R.phoneNumber,password:R.password})}return h}catch(h){throw h instanceof Error?h:jt.createErrorInstance(h)}})()}login(e,i){var r=this;return f(function*(){try{const s=yield r.adapterFactory.createAdapter(e).login(i);return r.writeLoginData(e,s),s}catch(s){throw jt.createErrorInstance(s)}})()}logout(){var e=this;return f(function*(){if(e.getToken()){e.http.post("auth/logout").toPromise().catch(r=>console.log(r));const i=e.getCurrentLoginType();if(i){const r=e.adapterFactory.createAdapter(i);r&&r.logout&&r.logout().catch(s=>console.log(s))}e.store.dispatch(sw()),aw.logout(),e.authListener.dispatch(er.Logout)}for(let i in localStorage)(-1!==i.indexOf("user-")||-1!==i.indexOf("AuthResponseCredentials"))&&localStorage.removeItem(i);e.appStorage.removeItem("loginType"),e.appStorage.removeItem("token")})()}writeLoginData(e,i){this.appStorage.setItem("token",i.token),this.appStorage.setItem("loginType",e),this.appStorage.setItem("".concat(e,"AuthResponseCredentials"),i)}getToken(){const e=this.store.selectUserState(),i=this.appStorage.getItem("token"),r=e?this.appStorage.getItem("user-".concat(e.profile.id)):void 0;return r&&null!=r.token&&"null"!==r.token?r.token:i}hasLoginCredentials(){let e=this.getCurrentLoginType(),i=this.getToken();return i&&i.length>0&&e&&e.length>0}getCountry(){var e=this;return f(function*(){try{const i=yield e.http.get("auth/register/getCountry").toPromise().then(r=>r.body.country);return e.clientConfig.getConfig().platform.countries[i]||"XX"}catch(i){throw jt.createErrorInstance(i)}})()}isEmailRegistered(e){var i=this;return f(function*(){try{return yield i.http.post("auth/check-email",{email:e}).toPromise(),!1}catch(r){const s=jt.createErrorInstance(r);if(s instanceof lt.UnknownError)return!0;throw s}})()}isPhoneRegistered(e){var i=this;return f(function*(){try{return yield i.http.post("auth/check-phone-number",{phone:e}).toPromise(),!1}catch(r){const s=jt.createErrorInstance(r);if(s instanceof lt.UnknownError)return!0;throw s}})()}sendConfirmationCode(e){var i=this;return f(function*(){if(!e)throw new Error("InvalidPhoneNumber");try{yield i.http.post("auth/register/phone-number",{phoneNumber:e}).toPromise()}catch(r){throw jt.createErrorInstance(r)}})()}deleteAccount(){var e=this;return f(function*(){try{yield e.http.post("auth/request-account-reset").toPromise()}catch(i){throw jt.createErrorInstance(i)}})()}getCurrentLoginType(){return this.appStorage.getItem("loginType")}onUserStateUpdated(e){if(e){const i=this.appStorage.getItem("token");this.appStorage.setItem("user-".concat(e.profile.id),{token:i})}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(xr),T(Ci),T(cot),T(Qt),T(J),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const lot=[Kd,bu];let uot=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:lot}),n})(),af=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.router=e,this.location=i,this.userService=r,this.appStorageService=s,this.forwardingService=a,this.navigationService=c,this.auth=u,this.constants=h}isAuthorized(){return Promise.resolve(!1)}onLogin(){const i=this.urlToRedirect(this.navigationService.urlToRedirectAfterLogin||this.constants.defaultLoggedRoute,!0);return this.router.navigateByUrl(this.buildOutletRedirectUrl(i,Fn)).then(r=>(this.forwardingService.consumeParameter(),r))}onLoginFail(){return this.navigationService.navigate([this.urlToRedirect(this.constants.defaultNotLoggedRoute,!1)],{ignoreGuards:!0})}isLogged(){var e=this;return f(function*(){try{return!!e.auth.getToken()||Promise.reject(!1)}catch(i){return Promise.reject(!1)}})()}urlToRedirect(e,i){let r=this.location.path();return!0===this.forwardingService.hasForward()&&(r=this.forwardingService.getForwardLink()||r),this.router.config[0].children.filter(a=>a.data&&a.data.redirectOptions&&a.data.redirectOptions.skipRedirect&&a.data.redirectOptions.relativeUrl).some(a=>!(a.data.redirectOptions.onlyLogged&&!i)&&-1!==r.indexOf(a.data.redirectOptions.relativeUrl))?r:e}buildOutletRedirectUrl(e,i=oi){let r=e;const s=this.router.parseUrl(e),a=s.root.children[i];if(a&&a.segments.length){let c="";for(let u=1;u<a.segments.length;u++){const h=a.segments[u];c+="/".concat(h.path),Object.keys(h.parameters).forEach(b=>{c+=";".concat(b,"=").concat(h.parameters[b])})}r=c,Object.keys(s.queryParams).forEach(u=>{r+="?".concat(u,"=").concat(s.queryParams[u])})}return r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(Kr),T(Ci),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),cme=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h,b){super(e,i,a,s,c,u,h,b),this.facebookService=r}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){return(yield i.facebookService.isFacebookAuthorized())&&(yield e().call(i))})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(km),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),lme=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h,b){super(e,i,a,s,c,u,h,b),this.googleService=r}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){return yield e().call(i),i.googleService.isGoogleAuthorized()})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(ZR),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),ume=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h){super(e,i,s,r,a,c,u,h)}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){return yield e().call(i),i.appStorageService.getItem("loginType")===tl.Email})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),dme=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h,b){super(e,i,a,s,c,u,h,b),this.appService=r}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){yield e().call(i);let r=i.appService.getDeviceId(),s=i.appStorageService.getItem("loginType");return!(!r||s!==tl.Mobile)})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(Qt),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),pme=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h){super(e,i,s,r,a,c,u,h)}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){return yield e().call(i),i.appStorageService.getItem("loginType")===tl.Guest})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),hme=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h,b){super(e,i,a,s,c,u,h,b),this.appleService=r}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){return yield e().call(i),yield i.appleService.isAppleAuthorized()})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(mI),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),mme=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h,b){super(e,i,a,s,c,u,h,b),this.twitterService=r}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){return yield e().call(i),i.twitterService.isTwitterAuthorized()})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(hI),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),fme=(()=>{var t;class n extends af{constructor(e,i,r,s,a,c,u,h,b){super(e,i,a,s,c,u,h,b),this.appService=r}isAuthorized(){var e=()=>super.isLogged,i=this;return f(function*(){return yield e().call(i),i.appStorageService.getItem("loginType")===tl.PhoneNumber})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Rs),T(Qt),T(Ci),T(Kr),T($d),T(Yt),T(Kd),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),gme=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.appStorageService=e,this.googleLoginManger=c,this.mobileLoginManger=i,this.emailLoginManger=r,this.guestLoginManger=s,this.twitterLoginManager=u,this.facebookLoginManger=a,this.appleLoginManager=h,this.baseLoginManger=b,this.phoneNumberLoginManger=w}isAuthorized(){return this.getLoginService().isAuthorized()}onLogin(){return this.getLoginService().onLogin()}onLoginFail(){return this.getLoginService().onLoginFail()}getLoginService(){switch(this.getLoginType()){case tl.Mobile:this.loginManager=this.mobileLoginManger;break;case tl.Email:this.loginManager=this.emailLoginManger;break;case tl.Guest:this.loginManager=this.guestLoginManger;break;case tl.Facebook:this.loginManager=this.facebookLoginManger;break;case tl.Google:this.loginManager=this.googleLoginManger;break;case tl.Twitter:this.loginManager=this.twitterLoginManager;break;case tl.Apple:this.loginManager=this.appleLoginManager;break;case tl.PhoneNumber:this.loginManager=this.phoneNumberLoginManger;break;default:this.loginManager=this.baseLoginManger}return this.loginManager}getLoginType(){return this.appStorageService.getItem("loginType")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ci),T(dme),T(ume),T(pme),T(cme),T(lme),T(mme),T(hme),T(af),T(fme))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),h0=(()=>{var t;class n{constructor(e,i,r){this.restartDisconnectTimeout=()=>{this.stopTimeout(),this.timeout=setTimeout(this.disconnect,this.inactivityDelay)},this.disconnect=()=>{console.log("Disconnect because of inactivity!"),this.stopAutoDisconnect(),!0===this.communicationService.connected&&(this.communicationService.dispose(),this.popup.blocker({textParams:{translationKey:"AUTO_DISCONNECT.DISCONNECTED"},withRefreshButton:!0}))},this.inactivityDelay=18e5,this.listenerSet=!1,this.popup=e,this.communicationService=i,this.ngZone=r}startAutoDisconnect(){!1===this.listenerSet&&this.setListener(),this.restartDisconnectTimeout()}stopAutoDisconnect(){this.stopTimeout(),this.removeListener()}stopTimeout(){clearTimeout(this.timeout)}setListener(){const e=[{listener:"ontouchstart",event:"touchstart"},{listener:"onmousedown",event:"mousedown"},{listener:"onmouseup",event:"mouseup"},{listener:"onpointerdown",event:"pointerdown"}];for(let i=0;i<e.length;i++)if(!0===window.hasOwnProperty(e[i].listener)){this.listenerSet=!0,this.supportedEvent=e[i].event,this.ngZone.runOutsideAngular(()=>{window.document.addEventListener("castouchstart",this.restartDisconnectTimeout),window.document.addEventListener("caspointerdown",this.restartDisconnectTimeout),window.document.addEventListener(this.supportedEvent,this.restartDisconnectTimeout)});break}}removeListener(){this.listenerSet=!1,window.document.removeEventListener("castouchstart",this.restartDisconnectTimeout),window.document.removeEventListener("caspointerdown",this.restartDisconnectTimeout),window.document.removeEventListener(this.supportedEvent,this.restartDisconnectTimeout)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Cn),T(Ri),T(an))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var _me=function(t){return t.EBanned="Banned",t}(_me||{});let KI=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.onUserBanned=w=>{this.eventDispatcher.dispatchEvent(new ew(_me.EBanned)),w.isDeviceBan&&this.setLocalStorageBan(w),this.navigation.navigate([this.constants.defaultNotLoggedRoute],{ignoreGuards:!0}).then(R=>{if(!0===R){this.router.navigate([this.constants.defaultNotLoggedRoute],{queryParams:{}}),this.popup.hide(-1);let G=this.datePipe.transform(w.expiresAt,"dMMMMYYYY");const K=[Lt.CONFIG.platform.name,G,this.translate.instant("PUNNISH_REASONS.".concat(w.visibleReason)),Lt.CONFIG.platform.support];this.popup.show("POPUP.BANNED",K)}})},this.onLogout=()=>{this.dispose()},this.inited=!1,this.communicationService=e,this.authListenerService=i,this.eventDispatcher=new tc,this.popup=r,this.translate=a,this.appStorage=s,this.datePipe=c,this.router=u,this.navigation=h,this.constants=b}init(){this.inited||(this.attachListeners(),this.inited=!0)}dispose(){this.removeListeners(),this.inited=!1}subscribe(e,i){this.eventDispatcher.addEventListener(e,i)}unsubscribe(e,i){this.eventDispatcher.removeEventListener(e,i)}setLocalStorageBan(e){e?this.appStorage.setItem("BanStatus",e):this.appStorage.removeItem("BanStatus")}getLocalStorageBan(){return this.appStorage.getItem("BanStatus")}attachListeners(){this.communicationService.on("Banned",this.onUserBanned),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onLogout)}removeListeners(){this.communicationService.removeListener("Banned",this.onUserBanned),this.authSubscription&&this.authSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(xr),T(Cn),T(Ci),T(ls),T(kp),T(on),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var vme=pC.SOCKET_MESSAGE;let G6=(()=>{var t;class n{constructor(e,i,r,s){this.onNotificationReceived=a=>{this.notificationReceivedSubject.next(a)},this.authListenerService=s,this.http=r,this.communicationService=e,this.notificationReceivedSubject=new sn,this.notificationModelChangeSubject=new sn,this.appState=i,this.authListenerService.authStatusChangeEvent.pipe(bt(a=>a===er.Logout)).subscribe(this.dispose.bind(this))}init(){this.attachListeners(),this.getInitialUnreadCount(),this.getNotifications()}dispose(){this.notificationModelChangeSubject.next({notifications:[],unreadCount:0}),this.subscriptions&&this.subscriptions.unsubscribe(),this.communicationService.removeListener(vme,this.onNotificationReceived)}attachListeners(){this.subscriptions=new zt,this.communicationService.on(vme,this.onNotificationReceived)}fetchNotifications(){return this.http.get("notifications").pipe(jn(e=>e.body))}getNotifications(){this.http.get("notifications").toPromise().then(e=>{this.notificationModelChangeSubject.next({notifications:e.body})}).catch(e=>{console.error("Get notifications error:",e)})}getInitialUnreadCount(){this.http.get("notifications/unread").toPromise().then(e=>{this.notificationModelChangeSubject.next({unreadCount:e.body.unreadCount})}).catch(e=>{console.error("Get unread notifications count error:",e)})}deleteNotification(e){return this.http.delete("notifications",{body:{notificationId:e}}).toPromise().then(()=>Promise.resolve()).catch(i=>{throw console.warn("Delete notification error:",i),i})}readNotifications(e){var i=this;return f(function*(){try{yield i.http.post("notifications/read",{timestamp:e.createdAt}).toPromise()}catch(r){console.error("Error reading notifications: ",r)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(Sa),T(En),T(xr))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),ja=(()=>{var t;class n{constructor(e){this.showNotificationSubject=new sn,this.list=new ie.UniqueList,this.notificationsSubject=new Qn(this.list),this.unreadNotificationsCount=new Qn(0),this.notificationClient=e,this.notificationClient.notificationReceivedSubject.subscribe(this.addNotification.bind(this)),this.notificationClient.notificationModelChangeSubject.subscribe(this.onNotificationsModelChange.bind(this))}init(){this.notificationClient.init()}getNotifications(){return this.notificationsSubject.asObservable()}fetchNotifications(){return this.notificationClient.fetchNotifications().pipe(es(e=>(this.prepareNotificationsList(e),this.notificationsSubject.next(this.list),this.notificationsSubject.asObservable())),mh(e=>(console.error("Fetch notifications error:",e),Xn(this.list))))}addNotification(e){this.list.addFirst(e),this.unreadNotificationsCount.next(this.unreadNotificationsCount.getValue()+1),this.notificationsSubject.next(this.list),this.showNotification(e)}showNotification(e){this.showNotificationSubject.next(e)}deleteNotification(e){try{const i=this.list.findById(e);return i&&(i.read||this.unreadNotificationsCount.next(this.unreadNotificationsCount.getValue()-1),this.list.remove(i),this.notificationsSubject.next(this.list)),this.notificationClient.deleteNotification(e)}catch(i){throw i}}readNotifications(e){return this.list.length&&(this.notificationClient.readNotifications(e),this.list.forEach(i=>i.read=!0),this.unreadNotificationsCount.next(0)),Promise.resolve()}getUnreadNotificationsCount(){return this.unreadNotificationsCount}onNotificationsModelChange(e){e.notifications&&this.prepareNotificationsList(e.notifications),null!=e.unreadCount&&this.unreadNotificationsCount.next(e.unreadCount),this.notificationsSubject.next(this.list)}prepareNotificationsList(e){this.list=new ie.UniqueList,e.sort((i,r)=>i.createdAt<r.createdAt?-1:1),e.forEach(i=>{this.list.addFirst(i)})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(G6))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),CC=(()=>{var t;class n{constructor(e,i){this.onDeleted=new ke,this.actionInProgress=!1,this.changeDetRef=i,this.notificationsService=e}delete(e,i){var r=this;return f(function*(){if(!r.actionInProgress){r.actionInProgress=!0,r.detectChanges();try{i&&e.deleteExtraAction&&e.deleteExtraAction(),yield r.notificationsService.deleteNotification(e.id),r.onDeleted.emit()}catch(s){console.log(s)}finally{r.actionInProgress=!1,r.detectChanges()}}})()}isTranslatableText(e){return"object"==typeof e}detectChanges(){this.changeDetRef&&!this.changeDetRef.destroyed&&this.changeDetRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],inputs:{notificationData:"notificationData"},outputs:{onDeleted:"onDeleted"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();class V6{static isPromoItem(n){return-1!==n.indexOf("promo")}}class dot{constructor(){this.actions=[]}}const z6=new Ot("NotificationViewModelFactory");var pot=wi.EEventAction;let hot=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.listeners=new ie.List,this.subscriptions=new ie.List,this.onBonusesUpdated=R=>{this.store.dispatch(HG({bonuses:R}))},this.onUpdateState=R=>{R.profile.vip&&(R.profile.vip=new AA(R.profile.vip)),this.store.dispatch(AP(R))},this.onGameInventoryUpdated=R=>{this.store.dispatch(jG({items:R.items}))},this.onXpBoosterUpdated=R=>{this.store.dispatch(Nie({xpBooster:R}))},this.onLevelUpReward=R=>{this.userService.getState({useCache:!1}).catch(G=>console.warn(G))},this.onLogout=()=>{this.listeners.forEach(R=>R.detach()),this.subscriptions.forEach(R=>R.unsubscribe()),this.listeners=new ie.List,this.subscriptions=new ie.List,this.appService.isMobileApp()&&this.appService.getMobileAppService().removeEventListener(Rd.Resume,this.appResumeBound)},this.onChiching=R=>{this.store.dispatch(RP(R))},this.onBlingbling=R=>{this.store.dispatch(Aie({delta:parseInt(""!==R?R:"0",10)}))},this.onAvatarUpdated=R=>{this.store.dispatch(LA({url:R}))},this.onXpUpdated=R=>{this.store.dispatch(Rie({...R}))},this.onCashBackBonusUpdated=R=>{this.store.dispatch(DA(R))},this.onNotificationReceived=R=>{switch(R.notificationType){case rt.UserLevelUp:if(this.appService.isMobileApp()){const G=new Ub.LevelUpEvent(Nn.User,pot.LevelUp,{level:R.params.level});this.analyticsTrackingService.sendEvent(G)}break;case rt.LikeRecieved:this.store.dispatch(Bie({delta:1}))}},this.analyticsTrackingService=b,this.appService=h,this.notificationClient=u,this.cs=e,this.defaultAvatarsService=c,this.store=i,this.authListener=r,this.navigation=s,this.app=a,this.userService=w,this.appService.isMobileApp()&&(this.messagesPlugin=this.appService.getMobileAppService().messages()),this.init()}init(){this.authListener.authStatusChangeEvent.pipe(bt(e=>e===er.Login)).subscribe(this.onLogin.bind(this)),this.authListener.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onLogout.bind(this)),this.appResumeBound=this.onAppResume.bind(this)}onLogin(){this.listeners.add(this.cs.on(Ns.Chiching,this.onChiching)),this.listeners.add(this.cs.on(Ns.Blingbling,this.onBlingbling)),this.listeners.add(this.cs.on(Ns.AvatarUpdated,this.onAvatarUpdated)),this.listeners.add(this.cs.on(Ns.XpUpdated,this.onXpUpdated)),this.listeners.add(this.cs.on(Ns.CashBackBonusUpdated,this.onCashBackBonusUpdated)),this.listeners.add(this.cs.on(Ns.BonusesUpdated,this.onBonusesUpdated)),this.listeners.add(this.cs.on(Ns.LevelUpReward,this.onLevelUpReward)),this.listeners.add(this.cs.on(Ns.UpdateState,this.onUpdateState)),this.listeners.add(this.cs.on(Ns.UpdateGameInventory,this.onGameInventoryUpdated)),this.listeners.add(this.cs.on(Ns.XpBoosterUpdated,this.onXpBoosterUpdated)),this.subscriptions.add(this.notificationClient.notificationReceivedSubject.subscribe(this.onNotificationReceived)),this.appService.isMobileApp()&&this.appService.getMobileAppService().addEventListener(Rd.Resume,this.appResumeBound)}onAppResume(){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(Jo),T(xr),T(Yt),T(Qt),T(Rp),T(G6),T(Qt),T(yi),T(Kr))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var ZI=function(t){return t.HelpShiftSupportSessionHasBegun="helpshiftSupportSessionHasBegun",t.HelpShiftSupportUnreadMessages="helpshiftSupportUnreadMessages",t}(ZI||{}),m0=function(t){return t.UnreadMessagesCountChange="unreadMessagesCountChange",t}(m0||{}),bme=wi.EHelpShiftAction;let Cme=(()=>{var t;class n{constructor(e){this.onGetUnreadMessages=i=>{this.eventDispatcher.dispatchEvent(new CA(m0.UnreadMessagesCountChange,i.count))},this.setUnreadMessagesCounter=i=>{this.eventDispatcher.dispatchEvent(new CA(m0.UnreadMessagesCountChange,0))},this.appService=e,this.eventDispatcher=new tc}init(){this.attachListeners()}showFaqs(){this.appService.getMobileAppService().messages().helpShift({action:bme.ShowFAQs})}openContactForm(e){this.appService.getMobileAppService().messages().helpShift({action:bme.ShowConversation,args:e})}dispose(){this.detachListeners()}subscribe(e,i){this.eventDispatcher.addEventListener(e,i)}unsubscribe(e,i){this.eventDispatcher.removeEventListener(e,i)}attachListeners(){this.addEventListener(ZI.HelpShiftSupportUnreadMessages,this.onGetUnreadMessages),this.addEventListener(ZI.HelpShiftSupportSessionHasBegun,this.setUnreadMessagesCounter)}detachListeners(){this.removeEventListener(ZI.HelpShiftSupportUnreadMessages,this.onGetUnreadMessages),this.removeEventListener(ZI.HelpShiftSupportSessionHasBegun,this.setUnreadMessagesCounter)}addEventListener(e,i){window.addEventListener(e.toString(),i),window.document.addEventListener(e.toString(),i)}removeEventListener(e,i){window.removeEventListener(e.toString(),i),window.document.removeEventListener(e.toString(),i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),yme=(()=>{var t;class n{constructor(e,i){this.settingsService=e,this.appService=i}init(){}showFaqs(){const e=this.settingsService.getLanguage();this.appService.openExternalUrl("".concat(Lt.CONFIG.core.feedback.providers.helpshift.url,"&l=").concat(e))}openContactForm(e){const i=this.settingsService.getLanguage();this.appService.openExternalUrl("".concat(Lt.CONFIG.core.feedback.providers.helpshift.url,"&l=").concat(i,"&contact=1&name=").concat(e.username,"&email=").concat(e.email))}dispose(){}subscribe(e,i){}unsubscribe(e,i){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(nc),T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),QI=(()=>{var t;class n{constructor(e,i,r,s){this.onUserLogout=()=>{this.dispose()},this.appService=s,this.authListenerService=e,this.inited=!1,this.helpShift=this.appService.isMobileApp()?i:r}init(){!0!==this.inited&&(this.inited=!0,this.attachListeners(),this.helpShift.init())}showFaqs(){this.helpShift.showFaqs()}openContactForm(e){this.helpShift.openContactForm(e)}dispose(){this.detachListeners(),this.inited=!1,this.authSubscription=null,this.helpShift.dispose()}subscribe(e,i){this.helpShift.subscribe(e,i)}unsubscribe(e,i){this.helpShift.unsubscribe(e,i)}attachListeners(){this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onUserLogout)}detachListeners(){this.authSubscription&&this.authSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(xr),T(Cme),T(yme),T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Sme=(()=>{var t;class n extends hot{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){super(e,i,r,s,c,u,h,b,w,G),this.helpShiftService=K,this.onAccountDeactivated=te=>{this.navigation.navigate([this.constants.defaultNotLoggedRoute],{ignoreGuards:!0}).then(ee=>{if(!0===ee){if(this.navigation.navigate([this.constants.defaultNotLoggedRoute],{queryParams:{}}),this.popup.hide(-1),"pendingReset"===(null==te?void 0:te.reason)&&null!=te&&te.account){let le;this.popup.decision({textParams:{translationKey:"DELETE_ACCOUNT.ACCOUNT_FLAGGED_FOR_DELETION_ERROR"},buttons:{firstOption:{action:()=>this.popup.hide(le),buttonTextOptions:{translationKey:"TEXT.OK"}},secondOption:{action:()=>{this.popup.hide(le),this.helpShiftService.openContactForm({username:te.account.username,userId:te.account.id,email:te.account.email})},modifier:ve.EButtonModifier.BUTTON_ACTION,buttonTextOptions:{translationKey:"TEXT.CONTACT_US"}}}})}}else this.popup.show("migration"===(null==te?void 0:te.reason)?"POPUP.MIGRATED_ACCOUNT":"POPUP.DEACTIVATED_ACCOUNT")})},this.popup=a,this.constants=R}onLogin(){super.onLogin(),this.listeners.add(this.cs.on(Ns.DeactivatedAccount,this.onAccountDeactivated))}onAppResume(){var e;super.onAppResume(),0===this.store.payments.selectCurrentTransactions().length&&!this.store.payments.selectIsCompletingUnfinishedTransactions()&&this.userService.getMembership().catch(i=>console.warn(i)),Bn.instance.recalcOffset(),this.appService.getPlatform()===Ut.Ios&&window.hasOwnProperty("Phaser")&&(null===(e=Phaser)||void 0===e||null===(e=e.GAMES[0])||void 0===e||null===(e=e.sound)||void 0===e||null===(e=e.context)||void 0===e||e.resume())}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(J),T(xr),T(Yt),T(Cn),T(Qt),T(Rp),T(G6),T(Qt),T(yi),T(tn),T(Kr),T(QI))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),j6=(()=>{var t;class n{constructor(e,i,r,s,a){this.userEventsHandler=i,this.maintenanceCheckSubject=new sn,this.banService=e,this.navigation=r,this.constants=s,this.popup=a}onRequestErrorResponse(e){var i=this;return f(function*(){e&&(500===e.status||0===e.status||-1===e.status)&&i.maintenanceCheckSubject.next(),e&&401===e.status&&e.error&&e.error.code===et.Code.Banned&&i.banService.onUserBanned(e.error.status),e&&(400===e.status||401===e.status)&&e.error&&e.error.code===et.Code.DeactivatedAccount&&i.userEventsHandler.onAccountDeactivated(e.error),e&&401===e.status&&(yield i.navigation.navigateByUrl(i.constants.defaultNotLoggedRoute,{ignoreGuards:!0}),i.popup.show("API_ERRORS.UNAUTHORIZED"))})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(KI),T(Sme),T(Yt),T(tn),T(Cn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),H6=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.checkMaintenanceStatus=b=>new Promise((w,R)=>{this.setRequestInFlight(!0),this.checkMaintenanceRequest(b).then(G=>{if((new Bn).setDateHeaderValue(G.headers.get("Date")),this.setRequestInFlight(!1),200===G.status)try{const K=Number(G.body.timestamp)||0;-1!==K?(this.onMaintenanceMessage({timestamp:K}),K-this.time.getServerTimeS()>0?w(!1):w(!0)):w(!1)}catch(K){w(!1)}else w(!1)}).catch(G=>{this.setRequestInFlight(!1),!G||G.status>=400||-1===G.status?(this.onMaintenanceMessage({timestamp:0}),w(!0)):w(!1)})}),this.onMaintenanceMessage=b=>{if(-1!==b.timestamp){const w=b.timestamp-this.time.getServerTimeS();w>0&&(this.infoPopupId=this.popup.show("MAINTENANCE.POPUP",[Lt.CONFIG.platform.name,this.timeLeft.transform(w,{timeConfig:Zu})],{translationKey:"MAINTENANCE.TITLE"},li.Logo)),w<=0&&this.navigation.navigate(["maintenance"],{ignoreGuards:!0})}},this.onConnectionRestored=()=>{this.checkMaintenanceStatus()},this.onServerErrorResponse=()=>{!1===this.getRequestInFlight()&&(console.log("Received >= 500 from a service. Check the health of the server."),this.checkMaintenanceStatus())},this.appState=e,this.http=i,this.communicationService=r,this.timeLeft=a,this.popup=s,this.time=c,this.requestInFlight=!1,this.navigation=h,this.serverErrorResponseSubscription=u.maintenanceCheckSubject.subscribe(this.onServerErrorResponse)}init(){this.setRequestInFlight(!1),this.attachListeners()}dispose(){this.setRequestInFlight(!1),this.detachListeners(),this.serverErrorResponseSubscription&&this.serverErrorResponseSubscription.unsubscribe(),this.popup.hide(this.infoPopupId)}attachListeners(){this.communicationService.on("maintenance",this.onMaintenanceMessage),this.appState.subscribe(co.ConnectionRestored,this.onConnectionRestored)}detachListeners(){this.communicationService.removeListener("maintenance",this.onMaintenanceMessage),this.appState.unsubscribe(co.ConnectionRestored,this.onConnectionRestored)}checkMaintenanceRequest(e={}){let i=new Cl;return e.csec&&(i=i.set("csec",e.csec)),this.http.get("maintenance?".concat(Date.now()),{headers:i}).toPromise()}setRequestInFlight(e){this.requestInFlight=e}getRequestInFlight(){return this.requestInFlight}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Sa),T(En),T(Ri),T(Cn),T(Ps),T(Bn),T(j6),T(Yt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var q6=function(t){return t.vipRemaining=259200,t.xpBoosterRemaining=42200,t}(q6||{}),hr=function(t){return t.VipExpires="VipExpires",t.XpBoosterExpires="XpBoosterExpires",t.ReconnectAttempt="ReconnectAttempt",t.Reconnected="Reconnected",t.SpectateGameNotification="SpectateGameNotification",t.PremiumGiftNotification="PremiumGiftNotification",t.CashbackDecay="CashbackDecay",t.StampCardCompleted="StampCardCompleted",t.StampCardStampCollected="StampCardStampCollected",t}(hr||{});class cf{constructor(){this.clientNotificationsEvent=new sn}dispatch(n){this.clientNotificationsEvent.next(n)}}var mot=q6.vipRemaining;let wme=(()=>{var t;class n{constructor(e,i,r,s){this.router=e,this.store=i,this.clientNotificationsDispatcher=r,this.constants=s}init(){!0!==this.inited&&(this.inited=!0,this.attachListeners())}dispose(){this.detachListeners(),this.inited=!1,this.routerSubscription=null}attachListeners(){this.routerSubscription=this.router.events.pipe(bt(e=>e instanceof as)).subscribe(e=>{-1!==e.url.indexOf("/lobby")&&this.vipRemaining()&&this.showNotification()})}vipRemaining(){var e;const i=this.store.selectSimpleProfile().vip;return i.hasTierOrHigher(Fi.Full)&&(null===(e=i.currentTier())||void 0===e?void 0:e.remainingTime())<mot&&(!i.isActiveSubscription()||i.custom.subscription.state===Im.Canceled)}showNotification(){this.clientNotificationsDispatcher.dispatch(this.buildNotification()),this.detachListeners()}buildNotification(){return{notificationType:hr.VipExpires,params:{actionUrl:"".concat(this.constants.defaultLoggedRoute,"/shop/").concat(this.store.selectUserState().profile.id,"/vip"),remainingTime:this.store.selectUserState().profile.vip.currentTier().remainingTime()}}}detachListeners(){this.routerSubscription&&this.routerSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(J),T(cf),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Tme=(()=>{var t;class n{constructor(e,i,r,s,a){this.time=a,this.router=e,this.store=i,this.clientNotificationsDispatcher=r,this.constants=s}init(){!0!==this.inited&&(this.inited=!0,this.attachListeners())}dispose(){this.detachListeners(),this.inited=!1,this.routerSubscription=null}attachListeners(){this.routerSubscription=this.router.events.pipe(bt(e=>e instanceof as)).subscribe(e=>{-1!==e.url.indexOf("/lobby")&&this.expires()&&this.showNotification()})}expires(){const e=this.store.bonuses.cashback.selectState();return!e.isReady&&!e.isCollected()&&e.getDecayNotificationAt()&&this.time.getServerTimeS()>=e.getDecayNotificationAt()&&!e.isInResetCooldownInterval()}showNotification(){this.clientNotificationsDispatcher.dispatch(this.buildNotification()),this.detachListeners()}buildNotification(){return{notificationType:hr.CashbackDecay,params:{actionUrl:"/".concat(this.constants.defaultLoggedRoute,"/cash-back")}}}detachListeners(){this.routerSubscription&&this.routerSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(J),T(cf),T(tn),T(Bn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var fot=q6.xpBoosterRemaining;let Pme=(()=>{var t;class n{constructor(e,i,r,s){this.router=e,this.store=i,this.clientNotificationsDispatcher=r,this.constants=s}init(){!0!==this.inited&&(this.inited=!0,this.attachListeners())}dispose(){this.detachListeners(),this.inited=!1,this.routerSubscription=null}attachListeners(){this.routerSubscription=this.router.events.pipe(bt(e=>e instanceof as)).subscribe(e=>{-1!==e.url.indexOf("/lobby")&&this.xpBoosterRemaining()&&this.showNotification()})}xpBoosterRemaining(){return this.store.selectUserState().xp.xpBooster&&this.store.selectUserState().xp.xpBooster.remainingTime()<fot&&this.store.selectUserState().xp.xpBooster.remainingTime()>0}showNotification(){this.clientNotificationsDispatcher.dispatch(this.buildNotification()),this.detachListeners()}buildNotification(){return{notificationType:hr.XpBoosterExpires,params:{actionUrl:"".concat(this.constants.defaultLoggedRoute,"/profile/").concat(this.store.selectUserState().profile.id,"/boosters"),remainingTime:this.store.selectUserState().xp.xpBooster.remainingTime()}}}detachListeners(){this.routerSubscription&&this.routerSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(J),T(cf),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function Ime(t){return vr((n,o)=>{let e=!1,i=0;n.subscribe(eo(o,r=>(e||(e=!t(r,i++)))&&o.next(r)))})}let Mme=(()=>{var t;class n{constructor(e,i,r,s){this.router=e,this.store=i,this.clientNotificationsDispatcher=r,this.constants=s}init(){!0!==this.inited&&(this.inited=!0,this.attachListeners())}dispose(){this.detachListeners(),this.inited=!1,this.stampCardSubscription=null}attachListeners(){this.stampCardSubscription=this.store.stampCard.subscribeStampCardState().pipe(bt(e=>e.isActive()),Ime(e=>e.model.status!==bl.Ready),Qi(1)).subscribe(e=>{e.isReadyToClaim()&&!this.router.url.split("/").find(i=>"shop"===i)&&this.showNotification()})}showNotification(){this.clientNotificationsDispatcher.dispatch(this.buildNotification()),this.detachListeners()}buildNotification(){return{notificationType:hr.StampCardCompleted,params:{actionUrl:"".concat(this.constants.defaultLoggedRoute,"/shop/").concat(this.store.selectUserState().profile.id,"/currency")}}}detachListeners(){this.stampCardSubscription&&this.stampCardSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(J),T(cf),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Ome=(()=>{var t;class n{constructor(e,i,r){this.router=e,this.store=i,this.clientNotificationsDispatcher=r}init(){!0!==this.inited&&(this.inited=!0,this.attachListeners())}dispose(){this.detachListeners(),this.inited=!1,this.stampCardSubscription=null}attachListeners(){this.stampCardSubscription=this.store.stampCard.subscribeStampCardState().pipe(bt(e=>e.isActive())).subscribe(e=>{!this.router.url.split("/").find(i=>"shop"===i)&&this.stampCardState&&e.model.status!==bl.Ready&&this.stampCardState.model.collectedStamps<e.model.collectedStamps&&this.showNotification(),this.stampCardState=e})}showNotification(){this.clientNotificationsDispatcher.dispatch(this.buildNotification())}buildNotification(){return{notificationType:hr.StampCardStampCollected}}detachListeners(){this.stampCardSubscription&&this.stampCardSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(J),T(cf))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),W6=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.authListenerService=e,this.vipExpires=i,this.xpBoosterExpires=r,this.clientNotificationsDispatcher=s,this.notificationsService=a,this.cashbackExpires=c,this.stampCardCompleted=u,this.stampCardStampCollected=h,this.dispose=()=>{this.inited=!1,this.detachListeners(),this.vipExpires.dispose(),this.xpBoosterExpires.dispose(),this.cashbackExpires.dispose(),this.stampCardCompleted.dispose(),this.stampCardStampCollected.dispose(),this.authStatusSubscription=null,this.clientNotificationsSubscription=null},this.emitClientNotification=b=>{this.notificationsService.showNotification(b)},this.showNotificationSubject=new sn}init(){!0!==this.inited&&(this.attachListeners(),this.vipExpires.init(),this.xpBoosterExpires.init(),this.cashbackExpires.init(),this.stampCardCompleted.init(),this.stampCardStampCollected.init())}attachListeners(){this.authStatusSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.dispose),this.clientNotificationsSubscription=this.clientNotificationsDispatcher.clientNotificationsEvent.subscribe(this.emitClientNotification)}detachListeners(){this.authStatusSubscription&&this.authStatusSubscription.unsubscribe(),this.clientNotificationsSubscription&&this.clientNotificationsSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(xr),T(wme),T(Pme),T(cf),T(ja),T(Tme),T(Mme),T(Ome))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class ll{static hideLoader(){let n=document.createEvent("Event");n.initEvent("appLoaded",!0,!0),window.dispatchEvent(n)}static loadResourcesFail(){let n=document.createEvent("Event");n.initEvent("appLoadFail",!0,!0),window.dispatchEvent(n)}}let Eme=(()=>{var t;class n{constructor(e,i,r){this.showPopup=()=>{const s=!1===this.app.isMobileApp()?"NEW_VERSION_WEB":"NEW_VERSION_APP";this.popupService.blocker({textParams:{translationKey:"VERSION.".concat(s),params:[Lt.CONFIG.platform.name]},withRefreshButton:!0,buttons:{buttonObject:{action:()=>{this.app.restart()}}}})},this.onClientNewVersion=()=>{this.showPopup()},this.app=e,this.popupService=i,this.communicationService=r}init(){this.communicationService.on("new-version",this.onClientNewVersion)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(Cn),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class xme{constructor(n){this.currentGameState=n}}class $6{constructor(n){this.updatedState=n}}var _g=function(t){return t.Download="download",t.Downloading="downloading",t.Update="update",t.Ready="ready",t}(_g||{});let Zn=(()=>{var t;class n{constructor(e,i){this.clientConfig=i,this.appStorageService=e,this.currentGameChange=new Qn(void 0),this.gameStateUpdate=new Qn(void 0)}init(){return this.setGamesState(),this.setCurrentGame(this.getLocaleStorageGame()),Promise.resolve()}setCurrentGame(e){this.currentGameId!==e&&this.isValidGameId(e)&&(this.currentGameId=e,this.appStorageService.setItem("game",e),this.currentGameChange.next(new xme(this.getCurrentGameState())))}getCurrentGameState(){return this.state.find(e=>e.id===this.currentGameId)}getGamesState(){return this.state}get currentGameChangeEvents(){return this.currentGameChange.asObservable()}get gameStateUpdateEvents(){return this.gameStateUpdate.asObservable()}updateGameState(e,i){this.state=this.state.map(r=>{if(r.id!==e)return r;const s={...r,currentState:i};return this.gameStateUpdate.next(new $6(s)),s})}removeCurrentGame(){this.currentGameId&&(this.currentGameId=void 0,this.currentGameChange.next(void 0),this.appStorageService.removeItem("game"))}getCurrentGameRelatedConfig(){const e=this.getCurrentGameState();return void 0===e?{gameConfig:void 0,matchmaking:void 0}:this.clientConfig.getGameRelatedConfig(e.id)}getGameRelatedConfigStream(){return this.currentGameChangeEvents.pipe(bt(e=>e instanceof xme),jn(()=>this.getCurrentGameRelatedConfig()))}isValidGameId(e){return this.state.some(i=>i.id===e)}getLocaleStorageGame(){return this.appStorageService.getItem("game")}setGamesState(){this.state=this.clientConfig.getConfig().content.games.list.filter(e=>e.type===Dc.EGameType.Multiplayer).map(e=>({id:e.id,url:void 0,currentState:_g.Ready,initialState:_g.Ready}))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ci),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Ame=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.brazeEngagementService=b,this.onClientStateTransition=w=>{w.from===yn.Idle&&w.to===yn.Searching&&this.onEnterMatchmakingQueue(w.data.roomSearchModel.pool);try{if(w.to===yn.Idle&&this.gameEndedState.ended&&this.gameEndedState.data){const R=this.gameEndedState.data;this.deltaDna.gameFinishedEngage(R),this.brazeEngagementService.gameFinishedEngage(R),this.gameEndedState={ended:!1,data:void 0}}}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onRoomStateTransition=w=>{try{const R=this.gamesPlayClient.currentPlayClient;if(R&&R.state&&R.state.current&&R.state.current.stateName===yn.RoomFound&&(w.to===Ve.ERoomState.Ready||w.to===Ve.ERoomState.Rematch)&&this.onMatchmakingFound({pool:w.data.roomSearchModel.pool,room:w.data.currentRoom.getViewModel()}),w.data.currentRoom&&!w.data.currentRoom.isSpectating&&!w.data.currentRoom.reconnecting&&w.to===Ve.ERoomState.Ready){const G=new Ub.DefaultEvent(Nn.Game,"matchStarted");this.analytics.sendEvent(G)}if(w.data.currentRoom&&!w.data.currentRoom.isSpectating&&!w.data.currentRoom.reconnecting&&(w.to===Ve.ERoomState.Rematch||w.to===Ve.ERoomState.Finalize)&&w.from===Ve.ERoomState.Ready&&w.data.currentRoom.currentTable&&lo.getWinnersFromTable(w.data.currentRoom.currentTable.getViewModel()).find(G=>G.id===this.currentUserId)){const G=new Ub.DefaultEvent(Nn.Game,"matchWon");this.analytics.sendEvent(G)}}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onClientStateTimeout=w=>{try{w.state===yn.Searching&&this.onMatchmakingTimeout(w.data.roomSearchModel.pool)}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onGameEnded=w=>{this.gameEndedState={ended:!0,data:w};try{const R=this.gamesPlayClient.currentPlayClient;if((!R||!R.state||!R.state.current||R.state.current.stateName===yn.Idle)&&this.gameEndedState.ended&&this.gameEndedState.data){const G=this.gameEndedState.data;this.deltaDna.gameFinishedEngage(G),this.brazeEngagementService.gameFinishedEngage(G),this.gameEndedState={ended:!1,data:void 0}}}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onGameLoadingFinished=w=>{try{const K=new Tl.GameLoadEvent(Nn.Game,"gameLoad",{loadState:v5.Finished,matchID:w.tableModel&&w.tableModel.id?w.tableModel.id:"UNKNOWN",roomId:w.roomModel&&w.roomModel.id?w.roomModel.id:"UNKNOWN",gameName:w.roomModel.settings.game.name,platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});this.analytics.sendEvent(K)}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onGameLoadingStarted=w=>{try{const K=new Tl.GameLoadEvent(Nn.Game,"gameLoad",{loadState:v5.Started,matchID:w.tableModel&&w.tableModel.id?w.tableModel.id:"UNKNOWN",roomId:w.roomModel&&w.roomModel.id?w.roomModel.id:"UNKNOWN",gameName:w.roomModel.settings.game.name,platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});this.analytics.sendEvent(K)}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onMyGameUpdate=w=>{try{if(w.update.state&&w.update.state===Ve.ETableState.Ended&&w.update.gameResult&&w.update.gameResult.losers&&w.update.gameResult.winners){const R={roomModel:w.roomModel,tableModel:w.roomModel.tables.find(G=>G.id===w.update.id)};this.onGameEnded(R),-1!==w.update.gameResult.winners.indexOf(this.currentUserId)?this.matchmakingEvents.emit(Db.GameWon,R):-1!==w.update.gameResult.losers.indexOf(this.currentUserId)&&this.matchmakingEvents.emit(Db.GameLost,R)}}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onEnterMatchmakingQueue=w=>{try{const R=new Tl.MatchmakingQueueEvent(Nn.Game,"matchmakingQueue",{matchmakingState:fI.Started,matchType:w.roomSettings.type,matchMode:w.roomSettings.game.mode,gameName:w.roomSettings.game.name,matchName:w.id,platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});if(this.gamesStateService.getCurrentGameState()){let G=this.gamesStateService.getCurrentGameState().id;this.store.selectUserState().stats.games[G]&&(R.args.elo=this.store.selectUserState().stats.games[G].elo)}this.analytics.sendEvent(R)}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onMatchmakingTimeout=w=>{try{const R=new Tl.MatchmakingQueueEvent(Nn.Game,"matchmakingQueue",{matchmakingState:fI.Timeout,matchType:w.roomSettings.type,matchMode:w.roomSettings.game.mode,gameName:w.roomSettings.game.name,matchName:w.id,platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});if(this.gamesStateService.getCurrentGameState()){let G=this.gamesStateService.getCurrentGameState().id;this.store.selectUserState().stats.games[G]&&(R.args.elo=this.store.selectUserState().stats.games[G].elo)}this.analytics.sendEvent(R)}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onMatchmakingFound=w=>{try{let R=new Tl.MatchmakingQueueEvent(Nn.Game,"matchmakingQueue",{matchmakingState:fI.Matched,matchType:w.pool.roomSettings.type,matchMode:w.pool.roomSettings.game.mode,gameName:w.pool.roomSettings.game.name,matchName:w.pool.id,roomId:w.room.id,platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});if(this.gamesStateService.getCurrentGameState()){let G=this.gamesStateService.getCurrentGameState().id;this.store.selectUserState().stats.games[G]&&(R.args.elo=this.store.selectUserState().stats.games[G].elo)}this.analytics.sendEvent(R)}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onMatchmakingCancel=w=>{try{let R=new Tl.MatchmakingQueueEvent(Nn.Game,"matchmakingQueue",{matchmakingState:fI.Cancel,matchType:w.roomType,matchMode:"classic",gameName:w.gameName,matchName:w.poolId,platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});if(this.gamesStateService.getCurrentGameState()){let G=this.gamesStateService.getCurrentGameState().id;this.store.selectUserState().stats.games[G]&&(R.args.elo=this.store.selectUserState().stats.games[G].elo)}this.analytics.sendEvent(R)}catch(R){console.error(R),this.googleAnalyticsService.sendException(R)}},this.onUserLogout=()=>{this.dispose()},this.gamesStateService=r,this.analytics=i,this.analyticsDevicePlatform=new Ap,this.deltaDna=s,this.store=e,this.authListenerService=a,this.matchmakingEvents=c,this.gamesPlayClient=u,this.gameEndedState={ended:!0,data:void 0},this.listeners=new ie.List,this.googleAnalyticsService=h}init(e){this.currentUserId=e,this.attachListeners()}dispose(){this.listeners.forEach(e=>e.detach()),this.authSubscription&&this.authSubscription.unsubscribe()}ngOnDestroy(){this.dispose()}attachListeners(){this.listeners.add(new ie.EventListener(this.matchmakingEvents,_i.GameLoaded,this.onGameLoadingFinished)),this.listeners.add(new ie.EventListener(this.matchmakingEvents,_i.GameLoadingStarted,this.onGameLoadingStarted)),this.listeners.add(new ie.EventListener(this.matchmakingEvents,Db.MMCancelSearch,this.onMatchmakingCancel)),this.listeners.add(this.gamesPlayClient.stateEvents.onRoomStateTransition(this.onRoomStateTransition)),this.listeners.add(this.gamesPlayClient.stateEvents.onClientStateTransition(this.onClientStateTransition)),this.listeners.add(this.gamesPlayClient.stateEvents.onClientStateTimeout(this.onClientStateTimeout)),this.listeners.add(this.gamesPlayClient.stateEvents.onMyTableUpdate(this.onMyGameUpdate)),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onUserLogout)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Jo),T(yi),T(Zn),T(sl),T(xr),T(nd),T(oo),T(ng),T(cl))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var yC;let f0=((yC=class{constructor(n,o,e,i){this.subs=new ie.List,this.onPrivateMessageReceived=r=>{!r.message.isConversationMuted&&this.navigation.getOutletUrl()!=="/".concat(Xs.gameRoute)&&this.soundService.play(dn.MessageReceive)},this.onPublicMessageReceived=r=>{(this.store.selectIsSubscribedToPublicConversation(r.message.conversationId)||this.store.selectIsPublicConversationOpened(r.message.conversationId))&&this.navigation.getOutletUrl()!=="/".concat(Xs.gameRoute)&&this.soundService.play(dn.MessageReceive)},this.onMessageSent=()=>{this.soundService.play(dn.MessageSend)},this.onConversationOpened=()=>{this.soundService.play(dn.Slide)},this.soundService=o,this.navigation=n,this.actions=e,this.store=i}init(){this.attachListeners()}dispose(){this.detachListeners()}ngOnDestroy(){this.dispose()}attachListeners(){this.subs.add(this.actions.pipe(ai(Bk)).subscribe(this.onConversationOpened)),this.subs.add(this.actions.pipe(ai(p6)).subscribe(this.onConversationOpened)),this.subs.add(this.actions.pipe(ai(Vk)).subscribe(this.onConversationOpened)),this.subs.add(this.actions.pipe(ai(I6)).subscribe(this.onConversationOpened)),this.subs.add(this.actions.pipe(ai(Uk)).subscribe(this.onMessageSent)),this.subs.add(this.actions.pipe(ai(zk)).subscribe(this.onMessageSent)),this.subs.add(this.actions.pipe(ai(GI)).subscribe(this.onPrivateMessageReceived)),this.subs.add(this.actions.pipe(ai(WI)).subscribe(this.onPublicMessageReceived))}detachListeners(){this.subs.forEach(n=>n.unsubscribe())}}).\u0275fac=function(n){return new(n||yC)(T(Yt),T(Mo),T(yr),T(J))},yC.\u0275prov=be({token:yC,factory:yC.\u0275fac}),yC);Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],f0.prototype,"init",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],f0.prototype,"dispose",null),f0=Qe([Wo(),ue("design:paramtypes",[Yt,Mo,yr,J])],f0);let YI=(()=>{var t;class n{constructor(e,i,r){this.onUserLogout=()=>{this.clearAllRentTimers()},this.authListenerService=r,this.timeService=i,this.ngZone=e,this.timers={},this.timerTick=new sn,this.rentIsOver=new sn,this.attachListeners()}ngOnDestroy(){this.detachListeners()}getTimers(){return this.timers}addAndGetRentTime(e,i){return this.timers[e]||this.triggerNewTimer(e,i),this.timers[e]}triggerNewTimer(e,i){!i||this.transformTime(i).total<=0||(this.timers[e]={totalTimer:null,timeLeft:this.transformTime(i),rentTimeInterval:null,rentExpiresAt:i,itemId:e},this.timers[e].rentTimeInterval=null,clearInterval(this.timers[e].rentTimeInterval),this.ngZone.runOutsideAngular(()=>{this.timers[e].rentTimeInterval=setInterval(()=>{this.timers[e].timeLeft&&(0===this.timers[e].timeLeft.total&&(clearInterval(this.timers[e].rentTimeInterval),this.rentIsOver.next({timerTotal:this.timers[e].timeLeft.total,itemId:e})),this.timerTick.next(e))},6e4)}),this.ngZone.runOutsideAngular(()=>{this.timers[e].totalTimer=setInterval(()=>{this.timers[e].timeLeft.total-=1,this.timers[e].rentExpiresAt=this.timers[e].timeLeft.total,this.timers[e].timeLeft.total<=0&&clearInterval(this.timers[e].totalTimer)},1e3)}))}deleteTimer(e){this.timers[e]&&(clearInterval(this.timers[e].rentTimeInterval),clearInterval(this.timers[e].totalTimer),delete this.timers[e])}transformTime(e){let i=this.transformTimestampToSeconds(e),r=Math.floor(i/60%60),s=Math.floor(i/3600%24),a=Math.floor(i/86400);return{days:a<0?0:a,total:i<0?0:i,hours:s<0?0:s,minutes:r<0?0:r}}transformTimestampToSeconds(e){return new Date(e).getTime()-this.timeService.getServerTimeS()}clearAllRentTimers(){let e=Object.keys(this.timers);for(let i=0,r=e.length;i<r;i++)console.warn("Deleting timer id:",e[i]),this.deleteTimer(e[i])}attachListeners(){this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onUserLogout)}detachListeners(){this.authSubscription&&this.authSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(an),T(Bn),T(xr))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Rme=(()=>{var t;class n{constructor(e,i,r,s){this.onUserLogout=()=>{this.dispose()},this.authListenerService=r,this.shopRentTimerService=i,this.userService=e,this.store=s,this.attachListeners()}ngOnDestroy(){this.detachListeners()}init(){this.getUserInventory().forEach(i=>{i.item.durability===Fe.XM.Expireable&&this.shopRentTimerService.addAndGetRentTime(i.item.id,i.expiresAt)}),this.rentIsOverSubscription=this.shopRentTimerService.rentIsOver.subscribe(i=>{this.userService.getState({useCache:!1}).then(r=>{}).catch(r=>{this.checkConnectionStatus()}),this.shopRentTimerService.deleteTimer(i.itemId)})}dispose(){this.rentIsOverSubscription&&this.rentIsOverSubscription.unsubscribe()}getUserInventory(){return this.store.selectUserState().profile.inventory.items}checkConnectionStatus(){let e=setInterval(()=>{this.userService.getState({useCache:!1}).then(()=>{clearInterval(e)}).catch(i=>{})},6e4)}attachListeners(){this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onUserLogout)}detachListeners(){this.authSubscription&&this.authSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kr),T(YI),T(xr),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),$k=(()=>{var t;class n{constructor(e,i){this.currencyComponentInited=!1,this.removeCurrencyUpdateListeners=()=>{this.communicationService.removeListener(Ns.Chiching,this.chipsTransactionHandler),this.communicationService.removeListener(Ns.Blingbling,this.gemsTransactionHandler),this.authSubscription.unsubscribe()},this.chipsTransactionHandler=r=>{r.reason!==PP.Minislot&&this.handleTransactionEvent(r.amount.toString(),Ns.Chiching)},this.gemsTransactionHandler=r=>{this.handleTransactionEvent(r,Ns.Blingbling)},this.handleTransactionEvent=(r,s)=>{this.isComponentInited()||this.cacheTransaction(r,s)},this.authListener=i,this.communicationService=e,this.savedTransactionsCache=new ie.List}setCurrencyItemsWrapperCmpRef(e){this.currencyItemsWrapperCmpRef=e}setIsShownOverAll(e,i){this.currencyItemsWrapperCmpRef.setIsShownOverAll(e,i)}addCurrencyUpdateListeners(){this.communicationService.on(Ns.Chiching,this.chipsTransactionHandler),this.communicationService.on(Ns.Blingbling,this.gemsTransactionHandler),this.authSubscription=this.authListener.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.removeCurrencyUpdateListeners)}cacheTransaction(e,i){this.savedTransactionsCache.add({type:i,value:e})}getCachedTransactionsCache(){return this.savedTransactionsCache}clearCache(){this.savedTransactionsCache=new ie.List([])}setComponentInited(e){this.currencyComponentInited=e}isComponentInited(){return this.currencyComponentInited}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(xr))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var SC=kd.ETileSize;let ov=(()=>{var t;class n{constructor(e,i,r,s,a){this.tileSize=SC,this.permissionsService=e,this.popup=i,this.router=r,this.clientConfigService=s,this.gamesStateService=a,this.tileSizeMap={[SC.Large]:"large-tile",[SC.LargeMedium]:"extra-medium-tile",[SC.Medium]:"medium-tile",[SC.SmallMedium]:"small-medium-tile",[SC.Small]:"small-tile",[SC.ExtraSmall]:"extra-small-tile"}}ngOnChanges(e){this.tileConfig=e.tileConfig.currentValue}getTilePermission(e){return this.permissionsService.getTilePermission(e)}handleUserRestrictions(e){return e.minLevelRequirement.isFulfilled?e.maxLevelRequirement.isFulfilled?this.permissionsService.showFailedRequirementsToUser(e):this.popup.show("POPUP.ROOM_MAX_LEVEL_NOT_MET",[e.maxLevelRequirement.requiredLevel]):this.popup.show("POPUP.ROOM_MIN_LEVEL_NOT_MET",[e.minLevelRequirement.requiredLevel]),e.isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pi),g(Cn),g(on),g(Zt),g(Zn))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],inputs:{tileConfig:"tileConfig"},features:[it],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();class JI extends ov{constructor(n,o,e,i,r,s){super(e,o,n,i,s),this.appService=r}navigate(){const n=this.tileConfig.info.tileData;return(0,ie.isAbsoluteLink)(n.route)?(this.appService.openExternalUrl(n.route),Promise.resolve(!0)):this.router.navigate([n.route])}}function got(t,n){1&t&&(p(0,"div",5),B(1,"spinner-loader"),m())}let Kk=(()=>{var t;class n extends JI{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c),this.cdr=u,u.detach(),this.navigated=new ke,this.urlService=h}ngOnInit(){this.backgroundImage="url(".concat(this.urlService.getImageUrl("games/"+this.tileConfig.id+".jpg"),")"),this.cdr.detectChanges()}onClick(){this.tileClick()}tileClick(){this.navigateToLobby(),this.cdr.detectChanges()}navigateToLobby(){this.showLoader=!0,this.cdr.detectChanges(),this.navigate().then(()=>{this.showLoader=!1,this.navigated.emit()}).catch(e=>{this.showLoader=!1,console.error("GameTile play error: ",e)}).finally(()=>{this.cdr.detectChanges()})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Qt),g(Zn),g(Re),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["game-tile"]],inputs:{tileConfig:"tileConfig"},outputs:{navigated:"navigated"},features:[Ht],decls:6,vars:8,consts:[[1,"game-tile__wrapper",3,"ngClass"],[1,"game-tile-title__img",3,"src"],[1,"game-tile__container",3,"ngClass"],[1,"game-tile_second_container",3,"ngClass"],["class","game-tile__wait-wrapper",4,"ngIf"],[1,"game-tile__wait-wrapper"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"img",1),V(2,"transformUrl"),B(3,"div",2)(4,"div",3),U(5,got,2,0,"div",4),m()),2&e&&(l("ngClass","game-id__"+i.tileConfig.id),Hn("data-cy","tile"+i.tileConfig.id),d(),l("src",$(2,6,"platform-logos/"+i.tileConfig.id+".svg"),Wn),d(2),l("ngClass","game-id__"+i.tileConfig.id),d(),l("ngClass","game-id__"+i.tileConfig.id),d(),l("ngIf",i.showLoader))},dependencies:[Xe,Ne,vc,uo],styles:[".game-tile__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-size:cover;background-position:center;background-repeat:no-repeat}.game-tile__wait-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.game-tile__button-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:3rem;height:3rem;background-color:rgba(0,0,0,.5);border-radius:50%;margin:1rem}.game-tile-title__img[_ngcontent-%COMP%]{width:60%;height:90%}@media only screen and (max-width: 768px){.game-tile-title__img[_ngcontent-%COMP%]{width:75%}}"],changeDetection:0}),n})();class wC{constructor(n,o,e){this.destroyed=!1,this.steps=new ie.List,this.tutorialUI=n,this.services=o,this.payload=e,this.events=new tc}onCmpDestroy(){var n=this;return new Promise(o=>{this.disposeTimeout=setTimeout(f(function*(){yield n.dispose(),o()}))})}start(){this.createSteps(),this.beginNextStep(),this.tutorialUI.disablePopups()}skip(){this.events.emit("skipped"),this.end()}end(){var n=this;return f(function*(){n.events.emit("ended"),yield n.dispose()})()}endWithoutDisposing(){this.events.emit("ended")}dispose(){var n=this;return f(function*(){n.destroyed||(n.destroyed=!0,clearTimeout(n.disposeTimeout),n.tutorialUI.removeOverlay(),n.currentStep&&(yield n.currentStep.dispose()),n.tutorialUI.enablePopups(),n.events.emit("dispose"),n.events.removeAllListeners())})()}beginNextStep(){let o,n=this.currentStep?this.steps.toArray().findIndex(e=>e===this.currentStep)+1:0;n<this.steps.length&&(o=this.steps.get(n)),o?(this.currentStep=o,o.begin(),this.events.emit("stepBegin")):this.end()}onEnded(n){return new ie.EventListener(this.events,"ended",n)}onDispose(n){return new ie.EventListener(this.events,"dispose",n)}onStepBegin(n){return new ie.EventListener(this.events,"stepBegin",n)}onSkip(n){return new ie.EventListener(this.events,"skipped",n)}}class vg{constructor(n,o,e,i,r){var s=this;this.highlightedElements=new ie.List,this.animatedElements=new ie.List,this.disabledPopupElements=new ie.List,this.popups=new ie.List,this.onResize=f(function*(){clearTimeout(s.resizeTimeoutId),s.updateCanvasSize(),s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height),s.highlightedElements.length&&(yield s.scrollElementIntoView(s.elementScrollKeepOnResize||s.highlightedElements.last().element,!1)),s.popups.forEach(a=>a.onResize()),s.resizeTimeoutId=setTimeout(f(function*(){s.highlightedElements.length&&(yield s.scrollElementIntoView(s.elementScrollKeepOnResize||s.highlightedElements.last().element,!1)),s.updateHighlighed()}),50)}),this.onWheel=a=>{a.preventDefault()},this.canvas=n,this.tutorialElement=o,this.ctx=n.getContext("2d"),e.useUI(this),this.popupCmpFactory=e,this.cmpsList=i,this.ngZone=r}static getBoundingRect(n){return{x:n.left,y:n.top,top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,center:{x:n.left+n.width/2,y:n.top+n.height/2},toJSON:()=>{}}}static doesCollide(n,o){return!(n.bottom<o.top||n.top>o.bottom||n.right<o.left||n.left>o.right)}scrollElementIntoView(n,o=!0){var e=this;return f(function*(){let i=!0;const r=()=>{e.ctx.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillCanvas(),e.highlightedElements.forEach(s=>e.updateHighlightedRect(s)),i&&requestAnimationFrame(()=>{r()})};r(),yield cr.scrollIntoView(n,{animation:o?{timeMs:500,timing:Na.ETimingFunction.EaseInOut}:void 0}),i=!1,r()})()}resetOverlay(){this.removeOverlay(),this.drawOverlay()}removeOverlay(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.canvas.style.display="none",this.highlightedElements.forEach(n=>{n.element.style.pointerEvents=n.pointerEvents,n.element.removeEventListener("wheel",this.onWheel),n.element.removeEventListener("touchmove",this.onWheel),n.border&&n.border.parentElement.removeChild(n.border)}),this.highlightedElements=new ie.List,this.animatedElements.forEach(n=>n.animations.forEach(o=>this.removeAnimation(n.element,o))),this.animatedElements=new ie.List,this.popups=new ie.List,this.removeKeepResizeScrollOnElement(),window.removeEventListener("resize",this.onResize),document.getElementById("appWrapper").style.pointerEvents="all"}drawOverlay(){this.canvas.style.display="block",this.updateCanvasSize(),this.fillCanvas(),this.ngZone.runOutsideAngular(()=>{window.addEventListener("resize",this.onResize)}),document.getElementById("appWrapper").style.pointerEvents="none",document.getElementById("tutorialCanvas").style.pointerEvents="auto"}highlightElement(n,o){const i={pointerEvents:n.style.pointerEvents,element:n,border:void 0,offsetPx:o&&!1===o.offset?0:30,clickable:!o||o.clickable,animated:o&&o.animated};this.ngZone.run(()=>{n.addEventListener("wheel",this.onWheel),n.addEventListener("touchmove",this.onWheel)}),this.highlightedElements.add(i),this.updateHighlightedRect(i),!n.style.pointerEvents&&(!o||o.clickable)&&(n.style.pointerEvents="auto")}removeElementHighlight(n){const o=this.highlightedElements.find(e=>e.element===n);this.highlightedElements.remove(o),n.removeEventListener("wheel",this.onWheel),n.removeEventListener("touchmove",this.onWheel),n.style.pointerEvents=o.pointerEvents,o.border&&o.border.parentElement.removeChild(o.border),this.fillRoundedRect(vg.getBoundingRect(n.getBoundingClientRect()),o.offsetPx)}findComponentById(n){return this.cmpsList.findById(n)}addToScreen(n){this.popups.add(n),this.tutorialElement.appendChild(n.toHtml())}removeFromScreen(n){this.popups.remove(n)}getPopupFactory(){return this.popupCmpFactory}disablePopups(){this.getPopupElements().forEach(n=>{this.disabledPopupElements.add({visibility:n.style.visibility,element:n}),n.style.visibility="hidden"})}enablePopups(){this.disabledPopupElements.forEach(n=>{n.element.style.visibility=n.visibility}),this.disabledPopupElements=new ie.List}animate(n,o){let e=this.isTutorialPopupElement(n)?n.toHtml():n;e.classList.add(o);let i=this.animatedElements.find(r=>r.element===e);i||(i={element:e,animations:new ie.List},this.animatedElements.add(i)),i.animations.add(o)}removeAnimation(n,o){let e=this.isTutorialPopupElement(n)?n.toHtml():n;e.classList.remove(o);let i=this.animatedElements.find(r=>r.element===e);i&&i.animations.remove(o)}keepResizeScrollOnElement(n){this.elementScrollKeepOnResize=n}removeKeepResizeScrollOnElement(){this.elementScrollKeepOnResize=void 0}updateCanvasSize(){this.canvas.width=Math.max(document.documentElement.clientWidth,window.innerWidth),this.canvas.height=Math.max(document.documentElement.clientHeight,window.innerHeight)}fillCanvas(){this.ctx.fillStyle="rgba(0, 0, 0, 0.8)",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}getPopupElements(){return[this.findComponentById("popups"),this.findComponentById("ddnaPopup"),this.findComponentById("freeRewardsPopup"),this.findComponentById("hiddenShop")].filter(n=>void 0!==n).map(n=>n.element)}updateHighlightedRect(n){const o=cr.findScrollableContainer(n.element),e=vg.getBoundingRect(n.element.getBoundingClientRect());if(o){const i=vg.getBoundingRect(o.getBoundingClientRect()),r=e.y,s=e.bottom;if(e.x=Math.max(e.x,i.x),e.y=Math.max(e.y,i.y),e.width=Math.min(e.width,i.width),e.y===i.y){let a=0;e.bottom===i.bottom&&(a=s-e.bottom),e.height=Math.max(e.height-(e.y-r)-a,0)}else e.height=e.bottom===i.bottom?Math.max(e.height-(s-e.bottom)-0,0):Math.min(e.height,i.height)}this.clearRoundedRect(e,n.offsetPx),n.border||(n.border=this.createShadowElement(n.offsetPx,n.animated)),this.updateBorderShadow(n.border,e,n.offsetPx)}updateHighlighed(){this.updateCanvasSize(),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.fillCanvas(),this.highlightedElements.forEach(n=>this.updateHighlightedRect(n))}clearRoundedRect(n,o){this.ctx.clearRect(Math.round(n.x)-o,Math.round(n.y)-o,Math.round(n.width)+2*o,Math.round(n.height)+2*o)}fillRoundedRect(n,o){this.ctx.fillStyle="rgba(0, 0, 0, 0.8)",this.ctx.fillRect(n.x-o,n.y-o,n.width+2*o,n.height+2*o)}createShadowElement(n,o){const e=document.createElement("div"),i=document.createElement("div");return e.classList.add("tut__outerElement"),e.style.boxShadow="inset 0px 0px ".concat(n,"px ").concat(n-n/3,"px rgba(0, 0, 0, 0.8)"),e.appendChild(i),o&&i.classList.add("tut__innerElement"),this.tutorialElement.appendChild(e),e}updateBorderShadow(n,o,e){n.style.width="".concat(Math.round(o.width)+2*e,"px"),n.style.height="".concat(Math.round(o.height)+2*e,"px"),n.style.display=Math.round(o.height)+2*e?"flex":"none",n.style.transform="translate3d(".concat(Math.round(o.x)-e,"px, ").concat(Math.round(o.y)-e,"px, 0)"),n.style.webkitTransform="translate3d(".concat(Math.round(o.x)-e,"px, ").concat(Math.round(o.y)-e,"px, 0)");const i=n.children[0];i.style.width="".concat(o.width,"px"),i.style.height="".concat(o.height,"px")}isTutorialPopupElement(n){return!!n.toHtml}}class kme{constructor(n){this.pos={x:"0",y:"0",z:"0",translateX:"0",translateY:"0"},this.cmpRef=n}toHtml(){return this.cmpRef.hostView.rootNodes[0]}updatePos(n){n.x&&(this.toHtml().style.left=n.x,this.pos.x=n.x),n.y&&(this.toHtml().style.top=n.y,this.pos.y=n.y),(n.translateX||n.translateY)&&(this.pos.translateX=n.translateX||this.pos.translateX,this.pos.translateY=n.translateY||this.pos.translateY,this.toHtml().style.webkitTransform="translate(".concat(this.pos.translateX,", ").concat(this.pos.translateY,")"),this.toHtml().style.transform="translate(".concat(this.pos.translateX,", ").concat(this.pos.translateY,")"))}updateDimensions(n){for(let o in n)n.hasOwnProperty(o)&&(this.toHtml().style[o]=n[o])}getBoundingRect(){return vg.getBoundingRect(this.toHtml().getBoundingClientRect())}dispose(){try{this.cmpRef.onDestroy(()=>this.toHtml().parentElement.removeChild(this.toHtml())),this.cmpRef.destroy()}catch(n){console.warn(n)}}}class _ot extends kme{constructor(n,o){super(o),this.text=n.text,this.action=n.action,this.toHtml().style.width="auto",this.toHtml().style.height="auto",this.cmpRef.instance.button.nativeElement.style.width="80%",this.cmpRef.instance.button.nativeElement.style.height="3rem",o.instance.text=n.text,o.instance.buttonModifier=n.modifier,o.instance.id=n.id,this.clickSubscription=o.instance.onClick.subscribe(()=>this.action()),o.changeDetectorRef.detectChanges()}setText(n){this.text=n}dispose(){super.dispose(),this.clickSubscription&&this.clickSubscription.unsubscribe()}}var xl;!function(t){let n;var e;let o;(e=n=t.EAnimation||(t.EAnimation={})).Pulse="tut__pulse__animation",e.SlowPulse="tut__slow-pulse__animation",function(e){let i;var r;(r=i=e.EPosition||(e.EPosition={}))[r.Top=0]="Top",r[r.Center=1]="Center",r[r.Bottom=2]="Bottom",e.Top={pos:i.Top,x:"50%",y:"10px",translateX:"-50%",translateY:"0%"},e.Center={pos:i.Center,x:"50%",y:"50%",translateX:"-50%",translateY:"-50%"},e.Bottom={pos:i.Bottom,x:"50%",y:"calc(100% - 10px)",translateX:"-50%",translateY:"-100%"}}(o=t.PredefinedPositions||(t.PredefinedPositions={}))}(xl||(xl={}));class vot extends kme{constructor(n,o,e,i){super(e),this.onResize=()=>{this.relativeTo&&this.positionRelativeTo(this.relativeTo.element,this.relativeTo.preferredPos)},this.text=n,this.buttons=o,this.ui=i,this.draw()}setText(n){this.text=n}open(){this.cmpRef.instance.open()}close(){this.cmpRef.instance.close()}dispose(){super.dispose(),this.ui.removeFromScreen(this),this.buttons=void 0}positionRelativeTo(n,o){this.relativeTo={element:n,preferredPos:o};const e=vg.getBoundingRect(this.toHtml().getBoundingClientRect()),i=vg.getBoundingRect(n.getBoundingClientRect()),r=document.documentElement.clientWidth,s=document.documentElement.clientHeight,a=r/2-e.width/2,c={...this.buildRect(a,10,e),position:xl.PredefinedPositions.Top},u={...this.buildRect(a,s/2-e.height/2,e),position:xl.PredefinedPositions.Center},h={...this.buildRect(a,s-(10+e.height),e),position:xl.PredefinedPositions.Bottom},b=new ie.List([c,u,h]).where(w=>!vg.doesCollide(w,i));if(b.length){const w=o?b.find(R=>R.position.pos===o.pos):void 0;this.updatePos(w?w.position:this.findClosestPoint(b,i).position)}else this.updatePos(o||xl.PredefinedPositions.Center)}updateDimensions(n){super.updateDimensions(n),this.relativeTo&&this.positionRelativeTo(this.relativeTo.element,this.relativeTo.preferredPos)}draw(){const n={position:"fixed",zIndex:"1000000",minWidth:"initial",maxWidth:"60vw",minHeight:"initial",maxHeight:"initial",width:"30rem"};for(let o in n)n.hasOwnProperty(o)&&(this.toHtml().style[o]=n[o]);this.cmpRef.instance.text=this.text,this.cmpRef.instance.buttons=this.buttons,this.updatePos(xl.PredefinedPositions.Center),this.ui.addToScreen(this),this.cmpRef.changeDetectorRef.detectChanges()}findClosestPoint(n,o){let e,i;return n.forEach(r=>{const s=Math.abs(o.x-r.x)+Math.abs(o.y-r.y);(!e||s<i)&&(e=r,i=s)}),e}buildRect(n,o,e){return{x:n,y:o,top:o,right:n+e.width,bottom:o+e.height,left:n,width:e.width,height:e.height,center:{x:n+e.width/2,y:o+e.height/2},toJSON:()=>{}}}}class bot{constructor(n,o){this.buttons=[],this.cmpRef=n,this.ui=o}setText(n){return this.text=n,this}addButton(n){return this.buttons.push(n),this}useUI(n){return this.ui=n,this}build(){return new vot(this.text,this.buttons,this.cmpRef,this.ui)}}let K6=(()=>{var t;class n{constructor(e){e.detach()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["tutorial-canvas"]],decls:2,vars:0,consts:[["id","canvas"],["canvas",""]],template:function(e,i){1&e&&B(0,"canvas",0,1)},styles:["[_nghost-%COMP%]{position:absolute;top:0;left:0;display:block;width:100%;height:100%}#canvas[_ngcontent-%COMP%]{display:none;top:0;left:0;width:100%;height:100%;position:fixed;z-index:100000;pointer-events:none}"],changeDetection:0}),n})();class TC{constructor(){this.events=new tc}dispose(){var n=this;return f(function*(){n.events.removeAllListeners()})()}end(){var n=this;return f(function*(){n.events.emit("ended"),yield n.dispose()})()}onEnd(n){return new ie.EventListener(this.events,"ended",n)}}let Lme=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();const Cot=new Ot("TutorialComponentFactory");var Vs=function(t){return t.FirstLogin="firstLogin",t.MultiGame="multiGamesLobbyTutorial",t.FirstTraining="firstTrainingTutorial",t.FirstMM="firstNatchmakingTutorial",t.CustomGame="customGameTutorial",t.CustomGameRoomCreate="customGameRoomCreateTutorial",t.ScriptedGame="scriptedGameTutorial",t}(Vs||{}),Ms=function(t){return t.Lobby="multiGameLobby",t.GameLobby="gameLobby",t.CustomRoom="customRoom",t.Onboarding="onboarding",t.Game="game",t}(Ms||{}),Zk=function(t){return t.Matchmaking="matchmaking",t.Custom="custom",t.Training="training",t.Scroll="scroll",t}(Zk||{});class yot extends wC{constructor(){super(...arguments),this.group=Ms.Lobby,this.name=Vs.MultiGame,this.popupRefs=new ie.List}createSteps(){const n=this.tutorialUI,o=this.tutorialUI.getPopupFactory(),e=this.popupRefs;this.steps.add(new class extends TC{constructor(){super(...arguments),this.listeners=new ie.List,this.onClick=()=>{this.end()}}begin(){var s=this;return f(function*(){try{n.resetOverlay();const c=o.createPopupBuilder().setText({key:"TUTORIALS.MULTIGAME.GAMES_SHOW"}).build();e.add(c),c.updatePos(xl.PredefinedPositions.Top),c.updateDimensions({width:"35rem",maxWidth:"90%",height:"8rem"}),c.open(),s.popup=c,yield s.delay(600);const h=document.getElementsByTagName("tile-component"),b=[];Array.from(h).forEach(K=>{const te=n.findComponentById(K.id);te.instance.dynamicTile.instance instanceof Kk&&b.push(te)}),b.slice(0,3);const R=b[0];s.scrollTask=new Jn(n.scrollElementIntoView(R.element)),yield s.scrollTask,n.keepResizeScrollOnElement(R.element),Array.from(b).forEach(K=>{n.highlightElement(K.element,{clickable:!0,offset:!1}),K.element.addEventListener("click",s.onClick),s.listeners.add(()=>K.element.removeEventListener("click",s.onClick))});const G=R.element.querySelector("img");n.animate(G,xl.EAnimation.SlowPulse)}catch(a){console.warn(a)}})()}dispose(){var s=this;return f(function*(){clearTimeout(s.delayTimeout),s.scrollTask&&s.scrollTask.cancel(),s.delayTask&&s.delayTask.cancel(),s.popup.dispose(),e.remove(s.popup),s.listeners.forEach(a=>a())})()}delay(s){var a=this;return f(function*(){return a.delayTask=new Jn(new Promise((c,u)=>{a.delayTimeout=setTimeout(()=>{c()},s)})),a.delayTask})()}}),this.steps.forEach(r=>r.onEnd(()=>this.beginNextStep()))}dispose(){var n=()=>super.dispose,o=this;return f(function*(){o.popupRefs.forEach(e=>e.dispose()),o.currentStep&&(yield o.currentStep.dispose()),yield n().call(o)})()}}function Sot(t,n){1&t&&B(0,"spinner-loader",4)}const wot=(t,n)=>[t,n],Tot=t=>[t];let rv=(()=>{var t;class n extends pn{constructor(){super(...arguments),this.type=n.EButtonType.Generic}ngOnInit(){super.ngOnInit()}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["tutorial-text-button"]],inputs:{id:"id",type:"type",text:"text",action:"action"},features:[Ht],decls:6,vars:14,consts:[["click-feedback","","click-sound","",1,"bc__button","text__button",3,"ngClass","sound","disabled","click"],["button",""],[1,"text"],["class","bc__spinner--cmp",4,"ngIf"],[1,"bc__spinner--cmp"]],template:function(e,i){1&e&&(p(0,"button",0,1),Y("click",function(s){return i.click(s)}),p(2,"p",2),H(3),V(4,"translate"),m(),U(5,Sot,1,0,"spinner-loader",3),m()),2&e&&(l("ngClass",cn(9,wot,"bc__button--text-"+i.buttonModifier,i.bclass))("sound",i.sound)("disabled",i.disabled||i.loading),Hn("data-cy","tutorial"+i.id),d(3),ze(" ",yt(4,6,i.text.key,ne(12,Tot,i.text.params))," "),d(2),l("ngIf",i.loading))},dependencies:[Xe,Ne,vc,Fd,po,qe],encapsulation:2,changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EButtonType||(t.EButtonType={})).SkipButton="SkipButton",o.Generic="Generic"}(rv||(rv={}));const Pot=["buttonsContainer"],Iot=["popupContainer"];function Mot(t,n){1&t&&B(0,"div",7)}const Oot=t=>({"closed-to-opened":t}),Eot=t=>[t];let Dme=(()=>{var t;class n{constructor(e){this.cdr=e,e.detach()}ngOnInit(){this.buttons.forEach(e=>this.addButton(e)),this.updateView()}addButton(e){e.toHtml().classList.add("tut__popup--button"),this.container.insert(e.cmpRef.hostView)}setText(e){this.text=e,this.updateView()}open(){this.hasOpenClass=!0,this.hasCloseClass=!1,this.popupContainer.nativeElement.classList.add("closed-to-opened"),this.updateView()}close(){this.hasOpenClass=!1,this.hasCloseClass=!0,this.popupContainer.nativeElement.classList.remove("closed-to-opened"),this.updateView()}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["tutorial-popup"]],viewQuery:function(e,i){if(1&e&&($e(Pot,7,bs),$e(Iot,5,$t)),2&e){let r;je(r=He())&&(i.container=r.first),je(r=He())&&(i.popupContainer=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Uo("tut__popup--closed",i.hasCloseClass)},inputs:{buttons:"buttons",text:"text"},decls:10,vars:10,consts:[[1,"tut__popup",3,"ngClass"],["popupContainer",""],[1,"text-content"],[1,"tut__text-content-p"],["class","tut__popup--separator",4,"ngIf"],[1,"tut__popup__buttons"],["buttonsContainer",""],[1,"tut__popup--separator"]],template:function(e,i){1&e&&(p(0,"container-component",0,1)(2,"div",2)(3,"p",3),H(4),V(5,"translate"),m()(),U(6,Mot,1,0,"div",4),p(7,"div",5),Un(8,null,6),m()()),2&e&&(l("ngClass",ne(6,Oot,i.hasOpenClass)),d(4),se(yt(5,3,i.text.key,ne(8,Eot,i.text.params))),d(2),l("ngIf",i.buttons&&0!==i.buttons.length))},dependencies:[Xe,Ne,Ga,qe],styles:[".closed-to-opened[_ngcontent-%COMP%]{visibility:visible!important;animation:_ngcontent-%COMP%_open .3s linear forwards}.tut__popup[_ngcontent-%COMP%]{display:block;visibility:hidden;overflow:initial;padding:1rem}.tut__popup__buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-flow:row wrap}.text-content[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start;width:100%;height:100%}.text-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:2rem;text-align:center;font-weight:600;line-height:35px;white-space:pre-line;margin:auto 0}@media only screen and (max-width: 768px){.text-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:1.8rem;line-height:30px}}.opened-to-closed[_ngcontent-%COMP%]{display:none}@keyframes _ngcontent-%COMP%_open{0%{transform:scale3d(0,0,0)}to{transform:scaleZ(1)}}"],changeDetection:0}),n})(),Bme=(()=>{var t;class n{constructor(e,i){this.factoryResolver=e,this.injector=i}useUI(e){this.ui=e}createPopupBuilder(){return new bot(this.factoryResolver.resolveComponentFactory(Dme).create(this.injector),this.ui)}createButton(e){return new _ot(e,this.factoryResolver.resolveComponentFactory(rv).create(this.injector))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(nS),T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var xot=ve.EButtonModifier;class Aot extends wC{constructor(){super(...arguments),this.group=Ms.GameLobby,this.name=Vs.FirstTraining,this.popupRefs=new ie.List}createSteps(){let n=this.tutorialUI;const o=this.tutorialUI.getPopupFactory();let e=this.popupRefs;const i=()=>this.skip();this.steps.add(new class extends TC{constructor(){super(...arguments),this.onClick=()=>{this.end()}}begin(){var s=this;return f(function*(){n.resetOverlay();const a=n.findComponentById("training");s.tile=a,yield n.scrollElementIntoView(a.element),n.highlightElement(a.element,{clickable:!0,animated:!0});const u=o.createPopupBuilder().setText({key:"TUTORIALS.GAME.TRAINING_SHOW"}).addButton(o.createButton({text:{key:"BUTTON.SKIP"},action:i,modifier:xot.BUTTON_ACTION,id:rv.EButtonType.SkipButton})).build();e.add(u),u.updatePos(xl.PredefinedPositions.Top),u.updateDimensions({width:"35rem",maxWidth:"90%"}),a.element.addEventListener("click",s.onClick),u.open(),s.popup=u;const h=a.element.getElementsByClassName("box__image--wrapper")[0];n.animate(h,xl.EAnimation.SlowPulse)})()}dispose(){var s=this;return f(function*(){s.popup.dispose(),e.remove(s.popup),s.tile.element.removeEventListener("click",s.onClick)})()}}),this.steps.forEach(r=>r.onEnd(()=>this.beginNextStep()))}dispose(){var n=()=>super.dispose,o=this;return f(function*(){o.popupRefs.forEach(e=>e.dispose()),yield n().call(o)})()}}function Rot(t,n){if(1&t&&(p(0,"div",7),B(1,"tile-component",8),m()),2&t){const o=_().$implicit;d(),l("tileConfig",o)("id",o.id)}}function kot(t,n){1&t&&U(0,Rot,2,2,"ng-template",6),2&t&&l("contentFragmentWidth",_(2).fragmentWidth)("contentFragmentClass","scroll--tile--fragment")}function Lot(t,n){if(1&t&&(Tn(0),U(1,kot,1,2,null,5),Pn()),2&t){const o=_();d(),l("ngForOf",o.tiles)("ngForTrackBy",o.trackById)}}const Nme=t=>({name:t});function Dot(t,n){if(1&t&&B(0,"button-icon",9),2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_TRANSPARENT)("bclass","scroll--tile__button--bclass")("icon",ne(3,Nme,o.EIcons.ARROW_BACK))}}function Bot(t,n){if(1&t&&B(0,"button-icon",10),2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_TRANSPARENT)("bclass","scroll--tile__button--bclass")("icon",ne(3,Nme,o.EIcons.ARROW_RIGHT))}}let XI=(()=>{var t;class n extends ov{constructor(e,i,r,s,a,c,u,h,b){super(s,r,e,a,c),this.fragmentedViewControllerRulerService=h,this.scrollHeight=b,this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.currentTileIndex=0,this.store=i,this.cdr=u}ngOnInit(){this.tiles=this.tileConfig.info.tileData.tiles,this.tileId=(0,ie.uuidV4)(),this.subscription=this.fragmentedViewControllerRulerService.getElementDimension(this.fvc.nativeElement,this.tileId).subscribe(e=>{this.fragmentWidth=e.height-this.scrollHeight,this.cdr.detectChanges()}),this.cdr.detectChanges()}onClick(){}ngOnChanges(e){this.cdr.detectChanges()}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}trackById(e,i){return i.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Jo),g(Cn),g(Pi),g(Zt),g(Zn),g(Re),g(PR),g(nI))},t.\u0275cmp=pe({type:t,selectors:[["scroll-tile"]],viewQuery:function(e,i){if(1&e&&($e(Fm,7,$t),$e(Fm,7,Fm)),2&e){let r;je(r=He())&&(i.fvc=r.first),je(r=He())&&(i.fvcCmp=r.first)}},features:[mn([{provide:jb,useFactory:()=>({showArrows:!wh,showScrollbar:!1})},{provide:nI,useFactory:()=>wh?20:0}]),Ht,it],decls:7,vars:6,consts:[[1,"scroll--tile__container"],[1,"scroll--tile__fvc",3,"vsEnabled","cacheId","snapToIndex","leftButtonTemplateRef","rightButtonTemplateRef"],[4,"ngIf"],["leftButton",""],["rightButton",""],[4,"ngFor","ngForOf","ngForTrackBy"],["contentFragment","",3,"contentFragmentWidth","contentFragmentClass"],[1,"grid-tile-scroll"],[1,"grid-tile__wrapper",3,"tileConfig","id"],[1,"scroll--tile__button","left",3,"buttonModifier","bclass","icon"],[1,"scroll--tile__button","right",3,"buttonModifier","bclass","icon"]],template:function(e,i){if(1&e&&(p(0,"div",0)(1,"fragmented-view-controller",1),U(2,Lot,2,2,"ng-container",2),m(),U(3,Dot,1,5,"ng-template",null,3,ft)(5,Bot,1,5,"ng-template",null,4,ft),m()),2&e){const r=Kt(4),s=Kt(6);d(),l("vsEnabled",!1)("cacheId",i.tileId)("snapToIndex",i.currentTileIndex)("leftButtonTemplateRef",r)("rightButtonTemplateRef",s),d(),l("ngIf",i.fragmentWidth)}},styles:[".scroll--tile__container[_ngcontent-%COMP%]{height:100%;overflow:hidden}.grid-tile-scroll[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.scroll--tile__button[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translate(-150%,-50%)}.scroll--tile__button.left[_ngcontent-%COMP%]{left:0}.scroll--tile__button.right[_ngcontent-%COMP%]{right:0;transform:translate(150%,-50%) rotateY(180deg)}.scroll--tile--fragment--text[_ngcontent-%COMP%]{position:relative}.scroll--tile--fragment--text-p[_ngcontent-%COMP%]{transform:rotate(-90deg) translate(-100%,-50%);position:absolute;transform-origin:top left;text-align:center;left:50%}"],changeDetection:0}),n})();function Not(t,n){if(1&t&&(p(0,"div",7),B(1,"tile-component",8),m()),2&t){const o=_().$implicit;d(),l("tileConfig",o)("id",o.id)}}function Fot(t,n){1&t&&U(0,Not,2,2,"ng-template",6),2&t&&l("contentFragmentWidth",_(2).fragmentWidth)("contentFragmentClass","scroll--tile--fragment")}function Uot(t,n){if(1&t&&(Tn(0),U(1,Fot,1,2,null,5),Pn()),2&t){const o=_();d(),l("ngForOf",o.tiles)("ngForTrackBy",o.trackById)}}const Fme=t=>({name:t});function Got(t,n){if(1&t&&B(0,"button-icon",9),2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_TRANSPARENT)("bclass","scroll--tile__button--bclass")("icon",ne(3,Fme,o.EIcons.ARROW_BACK))}}function Vot(t,n){if(1&t&&B(0,"button-icon",10),2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_TRANSPARENT)("bclass","scroll--tile__button--bclass")("icon",ne(3,Fme,o.EIcons.ARROW_RIGHT))}}let eM=(()=>{var t;class n extends XI{constructor(e,i,r,s,a,c,u,h,b){super(e,i,r,s,a,c,u,h,b),this.fragmentedViewControllerRulerService=h,this.scrollHeight=b,this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.currentTileIndex=0,this.store=i,this.cdr=u}ngOnInit(){super.ngOnInit(),this.setTile()}scrollToRecommendedTile(){this.fvcCmp.scrollToIndex(this.currentTileIndex,{animate:!1})}setTile(){const e=this.tileConfig.info.tileData,i=this.tiles.filter(r=>r.info.tileData.pools).map(r=>r.info.tileData.pools[0]);if(this.pools=this.getPoolSettings(i),e.type===kd.EScrollTileType.Matchmaking){const r=this.store.selectUserState().profile.level,a=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.pools.filter(c=>c.roomSettings.requirements&&c.roomSettings.requirements.minLevel<=r&&r<=c.roomSettings.requirements.maxLevel&&c.roomSettings.type===Jt.RoomType.Matchmaking).filter(c=>c.active&&!!i.find(u=>u===c.id)).map(c=>c.id);this.tiles=e.tiles.filter(c=>!c.info.tileData.pools||this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.pools.filter(u=>u.roomSettings.requirements&&r<=u.roomSettings.requirements.maxLevel&&u.roomSettings.type===Jt.RoomType.Matchmaking).find(u=>c.info.tileData.pools[0]===u.id)&&this.pools.find(u=>u.id===c.info.tileData.pools[0])),this.currentTileIndex=a.length,this.cdr.detectChanges()}}getPoolSettings(e){const i=this.gamesStateService.getCurrentGameRelatedConfig();return wb()(i.matchmaking)?[]:i.matchmaking.pools.filter(r=>-1!==e.indexOf(r.id)&&r.active)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Jo),g(Cn),g(Pi),g(Zt),g(Zn),g(Re),g(PR),g(nI))},t.\u0275cmp=pe({type:t,selectors:[["scroll-matchmaking-tile"]],features:[mn([{provide:jb,useFactory:()=>({showArrows:!wh,showScrollbar:!1})},{provide:nI,useFactory:()=>0}]),Ht],decls:7,vars:6,consts:[[1,"scroll--tile__container"],[1,"scroll--tile__fvc",3,"vsEnabled","cacheId","snapToIndex","leftButtonTemplateRef","rightButtonTemplateRef"],[4,"ngIf"],["leftButton",""],["rightButton",""],[4,"ngFor","ngForOf","ngForTrackBy"],["contentFragment","",3,"contentFragmentWidth","contentFragmentClass"],[1,"grid-tile-scroll"],[1,"grid-tile__wrapper",3,"tileConfig","id"],[1,"scroll--tile__button","left",3,"buttonModifier","bclass","icon"],[1,"scroll--tile__button","right",3,"buttonModifier","bclass","icon"]],template:function(e,i){if(1&e&&(p(0,"div",0)(1,"fragmented-view-controller",1),U(2,Uot,2,2,"ng-container",2),m(),U(3,Got,1,5,"ng-template",null,3,ft)(5,Vot,1,5,"ng-template",null,4,ft),m()),2&e){const r=Kt(4),s=Kt(6);d(),l("vsEnabled",!1)("cacheId",i.tileId)("snapToIndex",i.currentTileIndex)("leftButtonTemplateRef",r)("rightButtonTemplateRef",s),d(),l("ngIf",i.fragmentWidth)}},styles:[".scroll--tile__container[_ngcontent-%COMP%]{height:100%;overflow:hidden}.grid-tile-scroll[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.scroll--tile__button[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translate(-150%,-50%)}.scroll--tile__button.left[_ngcontent-%COMP%]{left:0}.scroll--tile__button.right[_ngcontent-%COMP%]{right:0;transform:translate(150%,-50%)}.scroll--tile--fragment--text[_ngcontent-%COMP%]{position:relative}.scroll--tile--fragment--text-p[_ngcontent-%COMP%]{transform:rotate(-90deg) translate(-100%,-50%);position:absolute;transform-origin:top left;text-align:center;left:50%}"],changeDetection:0}),n})();var zot=ve.EButtonModifier;class jot extends wC{constructor(){super(...arguments),this.group=Ms.GameLobby,this.name=Vs.FirstMM,this.popupRefs=new ie.List}createSteps(){let n=this.tutorialUI;const o=this.tutorialUI.getPopupFactory();let e=this.popupRefs;const i=()=>this.skip();this.steps.add(new class extends TC{constructor(){super(...arguments),this.onClick=()=>{this.end()}}begin(){var s=this;return f(function*(){n.resetOverlay();let c,a=n.findComponentById(Zk.Scroll);a&&a.instance.dynamicTile.instance instanceof eM?c=a.instance.dynamicTile.instance:a=n.findComponentById(Zk.Matchmaking),yield n.scrollElementIntoView(a.element),n.highlightElement(a.element,{clickable:!0,animated:!0}),c&&c.scrollToRecommendedTile();const h=o.createPopupBuilder().setText({key:"TUTORIALS.GAME.MATCHMAKING_SHOW"}).addButton(o.createButton({text:{key:"BUTTON.SKIP"},action:i,modifier:zot.BUTTON_ACTION,id:rv.EButtonType.SkipButton})).build();e.add(h),h.positionRelativeTo(a.element,xl.PredefinedPositions.Top),h.updateDimensions({width:"35rem",maxWidth:"90%"}),h.open(),s.popup=h;const b=a.element.getElementsByTagName("button-text")[0];b&&n.animate(b,xl.EAnimation.SlowPulse),s.element=a.element,a.element.addEventListener("click",s.onClick)})()}dispose(){var s=this;return f(function*(){s.popup.dispose(),e.remove(s.popup),s.element.removeEventListener("click",s.onClick)})()}}),this.steps.forEach(r=>r.onEnd(()=>this.beginNextStep()))}dispose(){var n=()=>super.dispose,o=this;return f(function*(){o.popupRefs.forEach(e=>e.dispose()),yield n().call(o)})()}}var Hot=ve.EButtonModifier;class qot extends wC{constructor(){super(...arguments),this.group=Ms.GameLobby,this.name=Vs.CustomGame,this.popupRefs=new ie.List}createSteps(){let n=this.tutorialUI;const o=this.tutorialUI.getPopupFactory();let e=this.popupRefs;const i=()=>this.skip();this.steps.add(new class extends TC{constructor(){super(...arguments),this.onClick=()=>{this.end()}}begin(){var s=this;return f(function*(){n.resetOverlay();const a=n.findComponentById("custom");s.tile=a,yield n.scrollElementIntoView(a.element),n.highlightElement(a.element,{clickable:!0,animated:!0});const u=o.createPopupBuilder().setText({key:"TUTORIALS.GAME.CUSTOM_SHOW"}).addButton(o.createButton({text:{key:"BUTTON.SKIP"},action:i,modifier:Hot.BUTTON_ACTION,id:rv.EButtonType.SkipButton})).build();e.add(u),u.updatePos(xl.PredefinedPositions.Top),u.updateDimensions({width:"35rem",maxWidth:"90%"}),a.element.addEventListener("click",s.onClick),u.open(),s.popup=u;const h=a.element.getElementsByClassName("box__container--room-icon")[0];n.animate(h,xl.EAnimation.SlowPulse)})()}dispose(){var s=this;return f(function*(){s.popup.dispose(),e.remove(s.popup),s.tile.element.removeEventListener("click",s.onClick)})()}}),this.steps.forEach(r=>r.onEnd(()=>this.beginNextStep()))}dispose(){var n=()=>super.dispose,o=this;return f(function*(){o.popupRefs.forEach(e=>e.dispose()),yield n().call(o)})()}}var Wot=ve.EButtonModifier;class $ot extends wC{constructor(){super(...arguments),this.group=Ms.GameLobby,this.name=Vs.CustomGame,this.popupRefs=new ie.List}createSteps(){let n=this.tutorialUI;const o=this.tutorialUI.getPopupFactory();let e=this.popupRefs;const i=()=>this.skip();this.steps.add(new class extends TC{constructor(){super(...arguments),this.onClick=()=>{this.end()}}begin(){var a=this;return f(function*(){n.resetOverlay();let c=n.findComponentById("createGameBtn-small");"none"===getComputedStyle(c.element).display&&(c=n.findComponentById("createGameBtn-normal")),a.createGameBtn=c,yield n.scrollElementIntoView(c.element),n.highlightElement(c.element,{clickable:!0,animated:!0});const h=o.createPopupBuilder().setText({key:"TUTORIALS.GAME.CREATE_CUSTOM_ROOM"}).addButton(o.createButton({text:{key:"BUTTON.SKIP"},action:i,modifier:Wot.BUTTON_ACTION,id:rv.EButtonType.SkipButton})).build();e.add(h),h.updatePos(xl.PredefinedPositions.Top),h.updateDimensions({width:"35rem",maxWidth:"90%"}),c.element.addEventListener("click",a.onClick),h.open(),a.popup=h})()}dispose(){var a=this;return f(function*(){a.popup.dispose(),e.remove(a.popup),a.createGameBtn.element.removeEventListener("click",a.onClick)})()}}),this.steps.forEach(s=>s.onEnd(()=>this.beginNextStep()))}dispose(){var n=()=>super.dispose,o=this;return f(function*(){o.popupRefs.forEach(e=>e.dispose()),yield n().call(o)})()}}class Kot extends wC{constructor(n,o,e,i){super(n,o,i),this.group=Ms.Onboarding,this.name=Vs.FirstLogin,this.appService=e}createSteps(){let n=this.tutorialUI;const o=this.appService,e=()=>this.skip(),i=()=>this.end();this.steps.add(new class extends TC{begin(){return f(function*(){n.resetOverlay(),o.isMobileApp()?o.getMobileAppService().messages().showOnboarding(()=>{i()},s=>{i()}):e()})()}}),this.steps.forEach(r=>r.onEnd(()=>this.beginNextStep()))}dispose(){var n=()=>super.dispose,o=this;return f(function*(){yield n().call(o)})()}}const Qk="scriptedGame",Ume=t=>"scripted/".concat(t);class Zot extends wC{constructor(n,o,e,i){super(n,o,i),this.navigation=e,this.payload=i,this.group=Ms.Game,this.name=Vs.ScriptedGame,this.popupRefs=new ie.List}createSteps(){let n=this.tutorialUI;const o=this.navigation,e=this.payload,i=()=>this.end(),r=this.tutorialUI.getPopupFactory(),s=this.popupRefs,a=()=>this.skip();this.steps.add(new class extends TC{begin(){var u=this;return f(function*(){n.resetOverlay();const h=Ume(e.gameId),b=function(){var G=f(function*(){u.removePopup(),n.removeOverlay(),yield o.navigateByUrl(h),n.enablePopups(),u.rafId=requestAnimationFrame(()=>{n.findComponentById("scripted-game").instance.completeTutorial$.subscribe(()=>i())})});return function(){return G.apply(this,arguments)}}();if(o.url==="/".concat(h))return void b();const R=r.createPopupBuilder().setText({key:"TUTORIALS.GAME.TRAINING_SHOW"}).addButton(r.createButton({id:"Play",modifier:ve.EButtonModifier.BUTTON_ACTION,text:{key:"TEXT.PLAY"},action:b})).addButton(r.createButton({id:"Skip",modifier:ve.EButtonModifier.BUTTON_ACTION,text:{key:"BUTTON.SKIP"},action:()=>a()})).build();s.add(R),R.updatePos(xl.PredefinedPositions.Center),R.updateDimensions({width:"35rem",maxWidth:"90%"}),R.open(),u.popup=R})()}dispose(){var u=this;return f(function*(){u.removePopup(),cancelAnimationFrame(u.rafId)})()}removePopup(){var u;null===(u=this.popup)||void 0===u||u.dispose(),s.remove(this.popup)}}),this.steps.forEach(c=>c.onEnd(()=>this.beginNextStep()))}}let Qot=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.appService=a,this.navigation=c,this.popupFactory=e,this.services={activeCmpsList:i,clientConfig:r,ngZone:s,navigation:c}}createTutorial(e,i){if(this.tutorialUI||(this.tutorialUI=new vg(document.getElementById("canvas"),document.getElementById("tutorialCanvas"),this.popupFactory,this.services.activeCmpsList,this.services.ngZone)),this.isScriptedGameTutorial(e)){const r=new Zot(this.tutorialUI,this.services,this.navigation,i);return r.name=e,r}switch(e){case Vs.FirstLogin:return new Kot(this.tutorialUI,this.services,this.appService,i);case Vs.MultiGame:return new yot(this.tutorialUI,this.services,i);case Vs.FirstTraining:return new Aot(this.tutorialUI,this.services,i);case Vs.FirstMM:return new jot(this.tutorialUI,this.services,i);case Vs.CustomGame:return new qot(this.tutorialUI,this.services,i);case Vs.CustomGameRoomCreate:return new $ot(this.tutorialUI,this.services,i);default:throw new Error("Unknown tutorial")}}isScriptedGameTutorial(e){return!!this.services.clientConfig.getConfig().content.tutorials.list.filter(i=>i.group===Ms.Game).find(i=>i.name===e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Bme),T(Iw),T(Zt),T(an),T(Qt),T(Yt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class PC{constructor(n){this.injector=n,this.clientConfig=n.get(Zt),this.accountMigrationPopupService=n.get(cI)}meetsRequirements(n,o){const e=this.clientConfig.getConfig().content.tutorials.list.find(i=>i.name===this.name);return e.enabled&&n&&void 0===e.requirements.completedTutorials.find(i=>-1===n.completedTutorials.indexOf(i))&&void 0!==e.requirements.userRole.find(i=>void 0!==n.roles.find(r=>r.name===i))&&n.profile.level>=e.requirements.level.min&&n.profile.level<=e.requirements.level.max&&(!e.requirements.membership.length||n.profile.hasTierOrHigher(Fi.Full))}canBeShown(n,o){const e=this.injector.get(Cn).get().getValue();return-1===n.completedTutorials.indexOf(this.name)&&(!e.state.visible||e.state.type!==Bs.Blocker&&e.state.type!==Bs.GdprPopup)&&!1===this.accountMigrationPopupService.openPopup.getValue()}}class Gme extends PC{constructor(n){super(n),this.name=Vs.ScriptedGame,this.store=n.get(J),this.navigation=n.get(Yt),this.playerContext=n.get(ic),this.app=n.get(Qt)}canBeShown(n,o){const e=this.clientConfig.getConfig().content.tutorials.list.find(r=>r.name===this.name),i=this.clientConfig.getGameRelatedConfig(e.info.gameId);return super.canBeShown(n)&&this.playerContext.getCurrent()===ba.Idle&&i.gameConfig.sources.tutorial&&!this.store.chatComponent.selectIsOpened()&&!this.store.clientShop.selectBuyItemPopupState()&&!this.navigation.getOutletUrl(Fn)&&o.gameId===e.info.gameId&&(this.navigation.getOutletUrl().includes("/games/".concat(e.info.gameId,"/lobby"))||this.navigation.getOutletUrl()==="/".concat(Ume(e.info.gameId)))}}class IC{constructor(n,o,e,i){this.injector=n,this.group=o,this.name=e,this.requirementsCheckers=this.createRequirmentCheckers(i)}meetsRequirements(n){let o=!0;for(let e=0,i=this.requirementsCheckers[e];e<this.requirementsCheckers.length;e++)if(!i.meetsRequirements(this.injector.get(J).selectUserState(),n)){o=!1;break}return o}canBeShown(n){let o=!0;for(let e=0,i=this.requirementsCheckers[e];e<this.requirementsCheckers.length;e++)if(!i.canBeShown(this.injector.get(J).selectUserState(),n)){o=!1;break}return o}setAutoCompleteTutorials(n){this.autoCompleteTutorials=n}createRequirmentCheckers(n){const o=[];return n.forEach(e=>o.push(this.createRequirementChecker(e))),o}createRequirementChecker(n){if(n===Gme){const o=new n(this.injector);return o.name=this.name,o}return new n(this.injector)}}class Yot extends PC{constructor(n){super(n),this.name=Vs.MultiGame,this.store=n.get(J),this.navigation=n.get(Yt),this.playerContext=n.get(ic)}canBeShown(n){return super.canBeShown(n)&&this.playerContext.getCurrent()===ba.Idle&&!this.store.chatComponent.selectIsOpened()&&!this.store.clientShop.selectBuyItemPopupState()&&"/games"===this.navigation.getOutletUrl()&&!this.navigation.getOutletUrl(Fn)}}class Jot extends PC{constructor(n){super(n),this.name=Vs.FirstTraining,this.store=n.get(J),this.navigation=n.get(Yt),this.playerContext=n.get(ic)}canBeShown(n){return super.canBeShown(n)&&this.playerContext.getCurrent()===ba.Idle&&!this.store.chatComponent.selectIsOpened()&&!this.store.clientShop.selectBuyItemPopupState()&&this.injector.get(Iw).findById("training")&&!this.navigation.getOutletUrl(Fn)}}class Xot extends PC{constructor(n){super(n),this.name=Vs.FirstMM,this.store=n.get(J),this.navigation=n.get(Yt),this.playerContext=n.get(ic)}canBeShown(n){return super.canBeShown(n)&&this.playerContext.getCurrent()===ba.Idle&&!this.store.chatComponent.selectIsOpened()&&(this.injector.get(Iw).findById("matchmaking")||this.injector.get(Iw).findById(Zk.Scroll))&&!this.store.clientShop.selectBuyItemPopupState()&&!this.navigation.getOutletUrl(Fn)}}var ert=__webpack_require__(8734),trt=__webpack_require__.n(ert),nrt=__webpack_require__(82213),Vme=__webpack_require__.n(nrt),zme=function(t){return t.SetOpened="[Settings-Popup Component] Set Opened",t}(zme||{});const Z6=he(zme.SetOpened,{_as:"props",_p:void 0});let g0=(()=>{var t;class n{constructor(e,i,r){this.unreadHelpShiftCountUpdate=s=>{this.settingsPopupMessagesCount.next(s.data)},this.user=e,this.helpShiftService=i,this.settingsPopupMessagesCount=new Qn(0),this.store=r,this.helpShiftService.subscribe(m0.UnreadMessagesCountChange,this.unreadHelpShiftCountUpdate)}openSettings(){this.store.dispatch(Z6({opened:!0}))}closeSettings(){this.store.dispatch(Z6({opened:!1}))}setPushNotificationsSettings(e){var i=this;return f(function*(){let r=yield i.user.getState();const s={pushNotificationsSettings:Vme()(trt()(r.settings.pushNotificationsSettings),e.pushNotificationsSettings)};return i.user.updateSettings(s)})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kr),T(QI),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class irt extends PC{constructor(n){super(n),this.name=Vs.CustomGame,this.gamesStateService=n.get(Zn),this.store=n.get(J),this.navigation=n.get(Yt),this.playerContext=n.get(ic)}canBeShown(n){const o=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.grid.lobby.find(e=>"custom"===e.id);return super.canBeShown(n)&&o&&this.playerContext.getCurrent()===ba.Idle&&!this.store.chatComponent.selectIsOpened()&&!this.store.clientShop.selectBuyItemPopupState()&&!this.navigation.getOutletUrl(Fn)}}class ort extends PC{constructor(n){super(n),this.name=Vs.CustomGameRoomCreate,this.store=n.get(J),this.navigation=n.get(Yt),this.playerContext=n.get(ic)}canBeShown(n){return super.canBeShown(n)&&this.playerContext.getCurrent()===ba.Idle&&!this.store.chatComponent.selectIsOpened()&&!this.store.clientShop.selectBuyItemPopupState()&&!this.navigation.getOutletUrl(Fn)}}class rrt extends PC{constructor(n){super(n),this.name=Vs.FirstLogin,this.store=n.get(J),this.navigation=n.get(Yt),this.playerContext=n.get(ic),this.app=n.get(Qt)}canBeShown(n){return super.canBeShown(n)&&this.playerContext.getCurrent()===ba.Idle&&!this.store.chatComponent.selectIsOpened()&&!this.store.clientShop.selectBuyItemPopupState()&&!this.navigation.getOutletUrl(Fn)&&this.app.isMobileApp()}}let jme=(()=>{var t;class n{constructor(e,i,r,s){this.gamesPlayClient=e,this.settings=r,this.store=i,this.permissions=s}preventEngage(){if(!this.settings.engagement.engagementEnabled)return!0;const e=this.gamesPlayClient.currentPlayClient;return this.preventCollect()||e&&e.state&&e.state.current&&e.state.current.stateName!==yn.Idle&&!this.currentTutorial}setCurrentTutorial(e){this.currentTutorial=e}preventCollect(){if(!this.settings.events.eventsEnabled)return!0;const e=this.permissions.getActionPermission(nt.EPermissionModule.Tracking,nt.EModuleAction.Send);return void 0!==this.store.selectUserState()&&!e.isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(T(oo),T(J),T(OR),T(Ti))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),sv=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge){this.deltaDnaSettingsService=le,this.overlayManager=me,this.brazeEngagementService=ge,this.requestedTutorials=new ie.List,this.services={tutorials:e,user:i,navigation:s,playerContext:a,http:c,clientConfig:u,injector:h,popup:b,settings:w,appState:R,analytics:G,store:te,permissions:ee},this.listeners=new ie.List,this.services.store.subscribeUserState().pipe(bt(Me=>null!=Me)).subscribe(Me=>this.userState=Me),r.authStatusChangeEvent.pipe(bt(Me=>Me===er.Logout)).subscribe(()=>this.dispose()),s.events.pipe(bt(Me=>Me instanceof as)).subscribe(Me=>this.manageTutorialsByAppState()),te.chatComponent.subscribeIsOpened().subscribe(Me=>this.manageTutorialsByAppState()),te.clientShop.subscribBuyItemPopupState().subscribe(Me=>this.manageTutorialsByAppState()),this.lastPopupState=b.get().getValue(),b.get().subscribe(Me=>this.onPopupStateChange(Me)),te.settingPopupComponent.subscribeIsOpened().subscribe(Me=>this.onSettingsPopupStateChange(Me)),K.openPopup.subscribe(Me=>this.onMigrationPopupStateChange(Me)),R.subscribe(co.ReconnectFailed,()=>this.onReconnectFail()),this.createTutorialConfigList()}init(e){this.userState=e}dispose(){var e=this;return f(function*(){if(e.userState=void 0,e.requestedTutorials=new ie.List,e.currentTutorial)try{yield e.currentTutorial.instance.dispose()}catch(i){console.warn(i)}e.currentTutorial=void 0,e.deltaDnaSettingsService.setCurrentTutorial(void 0),e.listeners.forEach(i=>i.detach()),e.listeners=new ie.List})()}requestTutorial(e){var i=this;if(!this.services.permissions.getModulePermission(nt.EPermissionModule.Tutorials).isPermitted)return;const r=this.selectTutorialByRequirements(e);if(this.tutorialsConfig.where(c=>c.group===e.group).forEach(c=>{const u=this.requestedTutorials.toArray().findIndex(b=>b.name===c.name),h={cmp:e.cmp,group:e.group,name:c.name,payload:e.payload};-1===u&&this.requestedTutorials.add(h),-1!==u&&e.replaceExisting&&this.requestedTutorials.insertAt(u,h)}),!r||this.currentTutorial)return;const a=new Lw;a.execute=()=>{const c=this.services.tutorials.createTutorial(r.name,e.payload);this.currentTutorial={cmp:e.cmp,instance:c,config:r},this.deltaDnaSettingsService.setCurrentTutorial(this.currentTutorial);const h=function(){var R=f(function*(){if(yield i.completeTutorial(r.name).catch(G=>console.warn(G)),i.brazeEngagementService.tutorialCompletedEngage(r.name),r.autoCompleteTutorials)for(const G of r.autoCompleteTutorials)yield i.completeTutorial(G).catch(K=>console.warn(K));a.complete()});return function(){return R.apply(this,arguments)}}();this.listeners.add(c.onDispose(()=>{this.currentTutorial=void 0,this.deltaDnaSettingsService.setCurrentTutorial(void 0),this.listeners.forEach(R=>R.detach()),this.listeners=new ie.List,this.manageTutorialsByAppState(),a.complete()})),this.listeners.add(c.onEnded(h)),this.listeners.add(c.onSkip(()=>{const R=new Jc.DefaultEvent(Nn.Tutorials,"skippedTutorial:".concat(c.name));this.trackEvent(R),a.complete()})),this.listeners.add(c.onStepBegin(()=>{const R=new Jc.DefaultEvent(Nn.Tutorials,"beginStep:".concat(c.name));this.trackEvent(R)})),c.start()},this.overlayManager.queueItem(a)}removeTutorialRequest(e,i){this.requestedTutorials=this.requestedTutorials.where(r=>!(r.cmp===e&&r.group===i))}onTutorialComponentDestroy(e,i){var r=this;return f(function*(){r.removeTutorialRequest(e,i),r.currentTutorial&&r.currentTutorial.cmp===e&&r.currentTutorial.config.group===i&&(yield r.currentTutorial.instance.onCmpDestroy(),r.manageTutorialsByAppState())})()}completeTutorial(e){var i=this;return f(function*(){i.services.store.dispatch(AP({completedTutorials:i.userState.completedTutorials.concat(e)})),yield i.services.http.post("tutorials/complete/".concat(e)).toPromise()})()}resetTutorials(){var e=this;return f(function*(){e.services.store.dispatch(AP({completedTutorials:[]})),yield e.services.http.post("tutorials/reset").toPromise()})()}selectTutorialByRequirements(e){return this.services.permissions.getModulePermission(nt.EPermissionModule.Tutorials).isPermitted?this.tutorialsConfig.where(s=>s.group===e.group).find(s=>s.meetsRequirements(e.payload)&&s.canBeShown(e.payload)):void 0}createTutorialConfigList(){this.tutorialsConfig=new ie.List,this.tutorialsConfig.add(new IC(this.services.injector,Ms.Onboarding,Vs.FirstLogin,[rrt])),this.tutorialsConfig.add(new IC(this.services.injector,Ms.Lobby,Vs.MultiGame,[Yot])),this.tutorialsConfig.add(new IC(this.services.injector,Ms.GameLobby,Vs.FirstTraining,[Jot])),this.tutorialsConfig.add(new IC(this.services.injector,Ms.GameLobby,Vs.FirstMM,[Xot])),this.tutorialsConfig.add(new IC(this.services.injector,Ms.GameLobby,Vs.CustomGame,[irt])),this.tutorialsConfig.add(new IC(this.services.injector,Ms.CustomRoom,Vs.CustomGameRoomCreate,[ort])),this.tutorialsConfig=this.tutorialsConfig.where(e=>void 0!==this.services.clientConfig.getConfig().content.tutorials.list.find(i=>i.name===e.name)),this.tutorialsConfig.concat(this.createScriptedGameTutorials()),this.tutorialsConfig.forEach(e=>{const i=this.services.clientConfig.getConfig().content.tutorials.list.find(r=>r.name===e.name);i&&i.autoCompleteTutorials&&e.setAutoCompleteTutorials(i.autoCompleteTutorials)})}createScriptedGameTutorials(){return new ie.List(this.services.clientConfig.getConfig().content.tutorials.list.filter(i=>i.group===Ms.Game).map(i=>new IC(this.services.injector,Ms.Game,i.name,[Gme])))}onPopupStateChange(e){var i=this;return f(function*(){i.currentTutorial?i.hiddenTutorial||e.state.type!==Bs.Blocker&&e.state.type!==Bs.GdprPopup?i.hiddenTutorial&&e.state.type!==Bs.Blocker&&e.state.type!==Bs.GdprPopup&&(i.currentTutorial=void 0,i.deltaDnaSettingsService.setCurrentTutorial(void 0),i.requestTutorial({cmp:i.hiddenTutorial.cmp,group:i.hiddenTutorial.config.group,payload:i.hiddenTutorial.instance.payload})):(i.listeners.forEach(r=>r.detach()),i.listeners=new ie.List,yield i.currentTutorial.instance.dispose(),i.hiddenTutorial=i.currentTutorial):i.lastPopupState&&(i.lastPopupState.state.type===Bs.Blocker||i.lastPopupState.state.type===Bs.GdprPopup)&&e.state.type!==Bs.Blocker&&e.state.type!==Bs.GdprPopup&&i.manageTutorialsByAppState(),i.lastPopupState=e})()}onSettingsPopupStateChange(e){e||this.manageTutorialsByAppState()}onMigrationPopupStateChange(e){var i=this;return f(function*(){e||i.manageTutorialsByAppState()})()}onReconnectFail(){this.dispose()}manageTutorialsByAppState(){var e=this;return f(function*(){const i=e.selectNextTutorial(e.requestedTutorials);!e.currentTutorial&&i?e.requestTutorial({cmp:i.cmp,group:i.group,payload:i.payload}):e.currentTutorial&&(!e.currentTutorial.config.meetsRequirements(e.currentTutorial.instance.payload)||!e.currentTutorial.config.canBeShown(e.currentTutorial.instance.payload))&&(yield e.currentTutorial.instance.onCmpDestroy())})()}selectNextTutorial(e){let i;return e.find(r=>(this.tutorialsConfig.where(c=>c.group===r.group).find(c=>c.meetsRequirements(r.payload)&&c.canBeShown(r.payload))&&(i=r),void 0!==i)),i}trackEvent(e){this.services.analytics.sendEvent(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qot),T(Kr),T(xr),T(Yt),T(ic),T(En),T(Zt),T(vs),T(Cn),T(g0),T(Sa),T(yi),T(cI),T(J),T(Ti),T(jme),T(Bh),T(cl))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Hme="premium.gift.notification",_0="premiumGifts";let bg=(()=>{var t;class n{constructor(e,i,r){this.onNotificationReceived=s=>{switch(s.notificationType){case hr.ReconnectAttempt:void 0!==s.params.reconnectAttempt?this.displayNotification(s):(this.notificationOnScreen=!1,this.showNotificationSubject.next({opened:!1,data:null}));break;case hr.Reconnected:this.notificationOnScreen=!1,this.showNotificationSubject.next({opened:!1,data:null}),this.receivedQueue.add(s),this.startShowNotificationsCycle();break;case rt.GiftSent:if(s.params.productV5.group===_0)return;this.receivedQueue.add(s),this.startShowNotificationsCycle();break;default:this.receivedQueue.add(s),this.startShowNotificationsCycle()}},this.notifications=e,this.notificationFactory=i,this.receivedQueue=new w_,this.showNotificationSubject=new sn,this.inited=!1,this.notificationOnScreen=!1,this.currentNotificationStream=new sn}init(){!0!==this.inited&&(this.inited=!0,this.attachListeners())}destroy(){this.receivedQueue.clear(),this.stopShowNotificationsCycle(),this.showNotificationInterval=null,this.inited=!1,this.detachListeners()}setCurrentNotification(e){this.currentNotification=e,this.currentNotificationStream.next(e)}closeNotification(){this.stopShowNotificationsCycle(),this.startShowNotificationsCycle()}attachListeners(){this.newNotificationSubscription=this.notifications.showNotificationSubject.subscribe(this.onNotificationReceived)}detachListeners(){this.newNotificationSubscription&&this.newNotificationSubscription.unsubscribe()}startShowNotificationsCycle(){!1===this.receivedQueue.isEmpty()&&null==this.showNotificationInterval&&!1===this.notificationOnScreen&&(this.displayNotification(this.receivedQueue.first()),this.showNotificationInterval=setInterval(()=>{!1===this.receivedQueue.isEmpty()?this.displayNotification(this.receivedQueue.first()):(this.stopShowNotificationsCycle(),this.showNotificationInterval=null)},1e4))}stopShowNotificationsCycle(){this.currentNotificationShown&&this.currentNotificationShown.notificationType!==hr.ReconnectAttempt&&(this.notificationOnScreen=!1,clearInterval(this.showNotificationInterval),this.showNotificationInterval=null,this.showNotificationSubject.next({opened:!1,data:null}))}displayNotification(e){const i=this.notificationFactory.createNotification(e);e?(this.notificationOnScreen=!0,this.currentNotificationShown=i,this.currentNotificationShown.onReceiveAction&&this.currentNotificationShown.onReceiveAction(),this.showNotificationSubject.next({opened:!0,data:this.currentNotificationShown})):console.log("Unknown notification type")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ja),T(z6),T(W6))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),qme=(()=>{var t;class n extends tc{}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Wme=(()=>{var t;class n{constructor(e,i,r,s,a){var c=this;this.onPlayClientStateTransition=u=>{const h=u.to;h===yn.RoomFound||h===yn.Active?this.disconnectFromGameLobby():this.gamesStateService.getCurrentGameState()&&this.connectToGameLobby(this.gamesStateService.getCurrentGameState().id)},this.onCurrentGameChanged=function(){var u=f(function*(h){let b;if(c.disconnectFromGameLobby(),c.playClient.currentPlayClient)try{b=yield c.playClient.currentPlayClient.getPlayerState()}catch(w){console.log("[onCurrentGameChanged] couldn't get currentPlayClient.playerState")}(!b||!b.currentRoomId)&&h&&h.currentGameState&&h.currentGameState.id&&c.connectToGameLobby(h.currentGameState.id)});return function(h){return u.apply(this,arguments)}}(),this.onNavigatedToGame=()=>{this.disconnectFromGameLobby()},this.onGameViewLeft=()=>{const u=this.gamesStateService.getCurrentGameState().id;u&&this.connectToGameLobby(u)},this.onLogout=()=>{this.dispose()},this.communicationService=e,this.authListenerService=i,this.matchmakingEvents=r,this.playClient=s,this.gamesStateService=a,this.gameCommunicationStream=new sn}init(){var e=this;return f(function*(){e.clientStateListener=e.playClient.stateEvents.onClientStateTransition(e.onPlayClientStateTransition),e.matchmakingEvents.addEventListener(_i.NavigatedToGame,e.onNavigatedToGame),e.matchmakingEvents.addEventListener(_i.GameViewLeft,e.onGameViewLeft),e.gameStateChangeSub=e.gamesStateService.currentGameChangeEvents.subscribe(e.onCurrentGameChanged),e.authSubscription=e.authListenerService.authStatusChangeEvent.pipe(bt(i=>i===er.Logout)).subscribe(e.onLogout)})()}dispose(){var e=this;return f(function*(){e.disconnectFromGameLobby(),e.clientStateListener.detach(),e.matchmakingEvents.removeListener(_i.NavigatedToGame,e.onNavigatedToGame),e.matchmakingEvents.removeListener(_i.GameViewLeft,e.onGameViewLeft),e.gameStateChangeSub&&e.gameStateChangeSub.unsubscribe(),e.authSubscription&&e.authSubscription.unsubscribe()})()}on(e,i){this.communication&&this.communication.on(e,i)}removeListener(e,i){this.communication&&this.communication.removeListener(e,i)}connectToGameLobby(e){var i=this;return f(function*(){try{i.currentGameNamespaceId=e,i.communication=yield i.communicationService.connectToNamespace("".concat(i.currentGameNamespaceId,"-lobby")),i.gameCommunicationStream.next(i.currentGameNamespaceId),console.log("Connecting to namespace ".concat(i.currentGameNamespaceId,"-lobby"))}catch(r){console.log("[Connect to ".concat(i.currentGameNamespaceId,"-lobby namespace FAILED: ]"),r)}})()}disconnectFromGameLobby(){this.communication&&(console.log("Disconnecting from namespace ".concat(this.currentGameNamespaceId,"-lobby")),this.communication.removeAllListeners(),this.communication.disconnect(),this.communication=void 0,this.currentGameNamespaceId=void 0)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(xr),T(qme),T(oo),T(Zn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var srt=nt.EPermissionModule,art=nt.EModuleAction;let crt=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){var h=this;this.onGameSpectateNotification=function(){var b=f(function*(w){h.permissions.getActionPermission(srt.SpectateNotification,art.Open).isPermitted&&h.clientNotificationsDispatcher.dispatch({notificationType:hr.SpectateGameNotification,params:w})});return function(w){return b.apply(this,arguments)}}(),this.onNotificationClose=()=>{this.topBarNotifications.currentNotification&&this.topBarNotifications.currentNotification.notificationData.notificationType===hr.SpectateGameNotification&&(this.topBarNotifications.closeNotification(),this.detachCloseNotification())},this.onPlayClientStateTransition=b=>{const w=b.to;(w===yn.RoomFound||w===yn.Active)&&this.onNotificationClose()},this.onTopBarNotificationChanged=b=>{this.detachCloseNotification(),b&&b.notificationData.notificationType===hr.SpectateGameNotification&&(this.matchmakingEvents.addEventListener(_i.NavigatedToGame,this.onNotificationClose),this.clientStateListener=this.playClient.stateEvents.onClientStateTransition(this.onPlayClientStateTransition))},this.onLogout=()=>{this.dispose()},this.permissions=u,this.gameNamespaceService=e,this.topBarNotifications=i,this.matchmakingEvents=s,this.playClient=r,this.authListenerService=a,this.clientNotificationsDispatcher=c}init(){this.gameCommunicationSubscription=this.gameNamespaceService.gameCommunicationStream.subscribe(e=>{e&&this.attachListeners()}),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onLogout)}dispose(){this.gameCommunicationSubscription&&this.gameCommunicationSubscription.unsubscribe(),this.detachListeners(),this.authSubscription&&this.authSubscription.unsubscribe()}attachListeners(){this.gameNamespaceService.on(Ve.MatchmakingProtocol.Messages.SpectateGameNotification,this.onGameSpectateNotification),this.spectateNotificationSubscription=this.topBarNotifications.currentNotificationStream.subscribe(this.onTopBarNotificationChanged)}detachListeners(){this.gameNamespaceService.removeListener(Ve.MatchmakingProtocol.Messages.SpectateGameNotification,this.onGameSpectateNotification),this.spectateNotificationSubscription&&this.spectateNotificationSubscription.unsubscribe()}detachCloseNotification(){this.matchmakingEvents.removeListener(_i.NavigatedToGame,this.onNotificationClose),this.clientStateListener&&this.clientStateListener.detach()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Wme),T(bg),T(oo),T(qme),T(xr),T(cf),T(Pi))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),lrt=(()=>{var t;class n{constructor(e,i,r){this.onConnectionStatusChange=s=>{s.current===Ca.NotConnected&&(s.reason===Ds.ForceDisconnect?this.onForceDisconnect():s.reason===Ds.ServerDisconnect&&this.onSocketReconnectFailed(0)),s.previous===Ca.Reconnecting&&s.current===Ca.NotConnected&&this.onSocketReconnectFailed(),s.current===Ca.Reconnecting&&this.onConnectionRestoreAttempt(s),s.current===Ca.Reconnected&&this.onSocketReconnect(s)},this.communicationService=e,this.popup=i,this.clientNotificationsDispatcher=r}init(){this.communicationService.connectionStatusStream().subscribe(this.onConnectionStatusChange)}onForceDisconnect(){this.popup.blocker({textParams:{translationKey:"ERRORS.OPEN_WITH_THIS_ACCOUNT"},withRefreshButton:!0})}onSocketReconnectFailed(e){var i;e=null!==(i=e)&&void 0!==i?i:1e3*this.getRandomInteger(0,30),setTimeout(()=>{this.clientNotificationsDispatcher.dispatch({notificationType:hr.ReconnectAttempt,params:{reconnectAttempt:void 0,reconnectionAttemptsCount:void 0}}),this.popup.blocker({textParams:{translationKey:"ERRORS.CONNECTION_RESTORE_ERROR"},withRefreshButton:!0})},e)}onSocketReconnect(e){e.data.attempt>=2&&this.clientNotificationsDispatcher.dispatch({notificationType:hr.Reconnected,params:void 0})}onConnectionRestoreAttempt(e){e.data.attempt>=2&&this.clientNotificationsDispatcher.dispatch({notificationType:hr.ReconnectAttempt,params:{reconnectAttempt:e.data.attempt,reconnectionAttemptsCount:e.data.maxAttempts}})}getRandomInteger(e,i){return Math.floor(Math.random()*(i-e))+e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(Cn),T(cf))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),urt=(()=>{var t;class n{constructor(e,i,r,s){this.gaService=s,this.onNewRoom=a=>{var c,u;(null===(c=this.currentRoom)||void 0===c?void 0:c.id)!==a.id&&(this.currentRoom=void 0,this.removeListeners()),this.listeners.add(a.onDispose(this.onRoomDispose)),this.listeners.add(null===(u=a.state)||void 0===u?void 0:u.onError(Ve.ERoomState.Init,this.onError)),this.listeners.add(a.onKicked(this.onKicked)),this.currentRoom=a},this.onStateTransition=a=>{const c=a.data.currentRoom;this.currentRoom&&(!c||this.currentRoom.id!==c.id)&&(this.currentRoom=void 0,this.removeListeners())},this.onRoomDispose=a=>{a.data.reason===io.UnsupportedOperation&&this.toast.warn("CUSTOM_GAMES.ROOM_DESTROYED")},this.onKicked=a=>{a===BP.ActiveRoomProtocol.EPlayerDisconnectReason.Inactivity&&this.popup.show("GAME.KICKED_DUE_TO_INACTIVITY")},this.onError=a=>{var c;if(a!==Ds.Unknown)return;const u=null===(c=this.playClientService.currentPlayClient)||void 0===c||null===(c=c.state)||void 0===c?void 0:c.getCurrentState();(null==u?void 0:u.stateName)===yn.RoomFound?this.toast.warn("ERRORS.SOMETHING_WRONG"):this.popup.blocker({textParams:{translationKey:"GAME.GAME_EXCEPTION_UNKNOWN"},withRefreshButton:!0}),this.gaService.sendException("Room nsp disconnect unknown",!0)},this.onPlayClientDispose=()=>{this.currentRoom=void 0,this.removeListeners()},this.playClientService=e,this.toast=i,this.popup=r,this.listeners=new ie.List}init(){this.inited||(this.playClientService.onDispose(this.onPlayClientDispose),this.playClientService.stateEvents.onStateTransition(this.onStateTransition),this.playClientService.stateEvents.onNewRoom(this.onNewRoom),this.inited=!0)}removeListeners(){this.listeners.forEach(e=>e.detach()),this.listeners=new ie.List}}return(t=n).\u0275fac=function(e){return new(e||t)(T(oo),T(Dt),T(Cn),T(ng))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const $me=[1e3,5e3],Kme=[5e3,8e3],v0={initialFrameAnimationRange:[1e3,3e3],replayFrameAnimationRange:[3e3,5e3]},hrt=["img"],mrt=t=>({animate:t});let av=(()=>{var t;class n{constructor(e,i,r){this.cdr=e,this.ngZone=i,this.elRef=r,this.animate=!1}ngOnInit(){this.addObserver(),this.scheduleInitialAnimation()}ngOnChanges(e){this.init()}ngOnDestroy(){var e;null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.frameAnimationDelay)}addObserver(){const e={root:null,rootMargin:"0px",threshold:.5};this.ngZone.runOutsideAngular(()=>{this.intersectionObserver=new IntersectionObserver((i,r)=>{this.entry=i[0]},e),this.intersectionObserver.observe(this.elRef.nativeElement)})}init(){var e,i,r;this.animation=null!==(e=this.animation)&&void 0!==e?e:{},this.animationConfig=this.isAnimationPresetConfig(this.animation)?{initialFrameAnimationRange:this.animation.isPriority?n.priorityInitialAnimationRange:n.defaultInitialAnimationRange,replayFrameAnimationRange:this.animation.isPriority?n.priorityReplayAnimationRange:n.defaultReplayAnimationRange}:{initialFrameAnimationRange:null!==(i=this.animation.initialFrameAnimationRange)&&void 0!==i?i:n.defaultInitialAnimationRange,replayFrameAnimationRange:null!==(r=this.animation.replayFrameAnimationRange)&&void 0!==r?r:n.defaultReplayAnimationRange}}scheduleInitialAnimation(){this.scheduleAnimation(this.animationConfig.initialFrameAnimationRange)}scheduleReplayAnimation(){this.scheduleAnimation(this.animationConfig.replayFrameAnimationRange)}scheduleAnimation(e){this.ngZone.runOutsideAngular(()=>{this.frameAnimationDelay=setTimeout(()=>{this.playFrameAnimation()},(0,ie.randomInt)(e[0],e[1]))})}playFrameAnimation(){var e;null!==(e=this.entry)&&void 0!==e&&e.isIntersecting?(this.animate=!0,this.cdr.detectChanges(),this.img.nativeElement.addEventListener("animationend",()=>{this.animate=!1,this.cdr.detectChanges()},{passive:!0,once:!0}),this.scheduleReplayAnimation()):this.scheduleReplayAnimation()}isAnimationPresetConfig(e){return null!=(null==e?void 0:e.isPriority)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(an),g($t))},t.\u0275cmp=pe({type:t,selectors:[["spritesheet-image-animation"]],viewQuery:function(e,i){if(1&e&&$e(hrt,5),2&e){let r;je(r=He())&&(i.img=r.first)}},inputs:{spritesheet:"spritesheet",animation:"animation"},features:[it],decls:3,vars:4,consts:[[1,"spritesheet__img-animated--wrapper"],[1,"spritesheet__img-animated",3,"src","ngClass"],["img",""]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"img",1,2),m()),2&e&&(d(),l("src",i.spritesheet,Wn)("ngClass",ne(2,mrt,i.animate)))},dependencies:[Xe],styles:['[_nghost-%COMP%]{display:block}.spritesheet__img-animated--wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;overflow:hidden}.spritesheet__img-animated--wrapper[_ngcontent-%COMP%]:before{display:block;content:"";width:100%;padding-top:var(--aspect-ratio, 100%)}.spritesheet__img-animated--wrapper[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{position:absolute;top:0;left:0;right:0;bottom:0}.spritesheet__img-animated[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;width:500%;height:500%}.spritesheet__img-animated.animate[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_frameX 1s steps(1);animation-iteration-count:1}@keyframes _ngcontent-%COMP%_frameX{0%{transform:translate(0)}4%{transform:translate(-20%)}8%{transform:translate(-40%)}12%{transform:translate(-60%)}16%{transform:translate(-80%)}20%{transform:translateY(-20%)}24%{transform:translate(-20%,-20%)}28%{transform:translate(-40%,-20%)}32%{transform:translate(-60%,-20%)}36%{transform:translate(-80%,-20%)}40%{transform:translateY(-40%)}44%{transform:translate(-20%,-40%)}48%{transform:translate(-40%,-40%)}52%{transform:translate(-60%,-40%)}56%{transform:translate(-80%,-40%)}60%{transform:translateY(-60%)}64%{transform:translate(-20%,-60%)}68%{transform:translate(-40%,-60%)}72%{transform:translate(-60%,-60%)}76%{transform:translate(-80%,-60%)}80%{transform:translateY(-80%)}84%{transform:translate(-20%,-80%)}88%{transform:translate(-40%,-80%)}92%{transform:translate(-60%,-80%)}96%{transform:translate(-80%,-80%)}to{transform:translate(0)}}'],changeDetection:0}),n})();function frt(t,n){if(1&t&&B(0,"spritesheet-image-animation",2),2&t){const o=_();l("spritesheet",o.frameUrl)("animation",o.animation)}}function grt(t,n){1&t&&B(0,"img",3),2&t&&l("src",_().frameUrl,Wn)}!function(t){t.defaultInitialAnimationRange=[1e3,5e3],t.defaultReplayAnimationRange=[5e3,8e3],t.priorityInitialAnimationRange=[1e3,3e3],t.priorityReplayAnimationRange=[3e3,5e3],t.noDelayInitialAnimationRange=[0,0],t.noDelayReplayAnimationRange=[0,0],t.defaultAvatarFrameAnimation={initialFrameAnimationRange:t.defaultInitialAnimationRange,replayFrameAnimationRange:t.defaultReplayAnimationRange},t.priorityAvatarFrameAnimation={initialFrameAnimationRange:t.priorityInitialAnimationRange,replayFrameAnimationRange:t.priorityReplayAnimationRange},t.noDelayAvatarFrameAnimation={initialFrameAnimationRange:t.noDelayInitialAnimationRange,replayFrameAnimationRange:t.noDelayReplayAnimationRange}}(av||(av={}));let Q6=(()=>{var t;class n{constructor(e,i){this.urlService=i,this.isAnimated=!1,this.cdr=e,e.detach()}ngOnInit(){this.init()}ngOnChanges(e){e.frameItem&&!e.frameItem.firstChange&&this.init()}init(){var e,i,r;this.isAnimated=!!this.frameItem.data.avatarFrameSpritesheet,this.isAnimated?(this.animation=null!==(e=this.animation)&&void 0!==e?e:{},this.animation.initialFrameAnimationRange=null!==(i=this.animation.initialFrameAnimationRange)&&void 0!==i?i:$me,this.animation.replayFrameAnimationRange=null!==(r=this.animation.replayFrameAnimationRange)&&void 0!==r?r:Kme,this.frameUrl="".concat(this.urlService.createCdnPath({url:this.frameItem.data.avatarFrameSpritesheet}))):this.frameUrl="".concat(this.urlService.createCdnPath({url:this.frameItem.data.avatarFrame})),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["avatar-frame"]],inputs:{frameItem:"frameItem",animation:"animation"},features:[it],decls:2,vars:2,consts:[["class","frame__img-animated",3,"spritesheet","animation",4,"ngIf"],["class","frame__img",3,"src",4,"ngIf"],[1,"frame__img-animated",3,"spritesheet","animation"],[1,"frame__img",3,"src"]],template:function(e,i){1&e&&U(0,frt,1,2,"spritesheet-image-animation",0)(1,grt,1,1,"img",1),2&e&&(l("ngIf",i.isAnimated),d(),l("ngIf",!i.isAnimated))},dependencies:[Ne,av],styles:["[_nghost-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.frame__img[_ngcontent-%COMP%], .frame__img-animated[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}"],changeDetection:0}),n})();var b0=ve.EIcons;function _rt(t,n){1&t&&B(0,"icon-component",3),2&t&&l("icon",_().badgeIcon)}let Zp=(()=>{var t;class n{constructor(){this.hasVerifiedBadge=!1,this.color=""}ngOnInit(){this.setUsernameColor(),this.userProfile.isIdentityVerified&&this.setLoyaltyBadgeIcon()}ngOnChanges(){this.setUsernameColor(),this.userProfile.isIdentityVerified&&this.setLoyaltyBadgeIcon()}setUsernameColor(){if(this.userProfile&&this.userProfile.inventory&&this.userProfile.inventory.items.length){const e=this.userProfile.inventory.items.find(i=>i.item.type===Fe.TG.NameColor&&i.equipped);e&&e.item.data.nameColor&&(this.color=e.item.data.nameColor)}else this.color=""}setLoyaltyBadgeIcon(){switch(this.userProfile.loyaltyLevel){case Ch.Blue:this.badgeIcon=b0.LOYALTY_BADGE_BLUE;break;case Ch.Bronze:this.badgeIcon=b0.LOYALTY_BADGE_BRONZE;break;case Ch.Silver:this.badgeIcon=b0.LOYALTY_BADGE_SILVER;break;case Ch.Gold:this.badgeIcon=b0.LOYALTY_BADGE_GOLD;break;case Ch.Platinum:this.badgeIcon=b0.LOYALTY_BADGE_PLATINUM;break;default:this.badgeIcon=b0.LOYALTY_BADGE_BLUE}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["username"]],hostAttrs:[1,"username-host"],inputs:{userProfile:"userProfile",hasVerifiedBadge:"hasVerifiedBadge"},features:[it],decls:4,vars:4,consts:[[1,"username-label"],["data-cy","profileUsernameText",1,"username__text"],["class","username__badge","data-cy","profileVerified",3,"icon",4,"ngIf"],["data-cy","profileVerified",1,"username__badge",3,"icon"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"p",1),H(2),m(),U(3,_rt,1,1,"icon-component",2),m()),2&e&&(d(),go("color",i.color),d(),se(i.userProfile?i.userProfile.username.currentUsername:""),d(),l("ngIf",i.badgeIcon&&i.hasVerifiedBadge))},dependencies:[Ne,Dn],styles:["[_nghost-%COMP%]{display:inline-block}.username-label[_ngcontent-%COMP%]{display:flex;align-items:center}.username-label[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:1.2em;margin:0 .25em}@media screen and (max-width: 568px){.username-label[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{margin:0}}.username__text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.username__badge[_ngcontent-%COMP%]{margin-left:.2rem;font-size:1.1em!important}"],changeDetection:0}),n})();var vrt=nt.EPermissionModule,brt=nt.EModuleAction;const Crt=["avatarImageTag"];function yrt(t,n){1&t&&B(0,"div")}function Srt(t,n){1&t&&B(0,"div",11)}const tM=t=>({"no-frame":t});function wrt(t,n){if(1&t&&(p(0,"div",12)(1,"p",13),B(2,"username",14),m()()),2&t){const o=_(2);l("ngClass",ne(3,tM,!o.activatedItem)),d(),l("ngClass",ne(5,tM,!o.activatedItem)),d(),l("userProfile",o.user)}}function Trt(t,n){if(1&t&&B(0,"avatar-frame",15),2&t){const o=_(2);l("frameItem",o.activatedItem.item)("animation",o.frameAnimation)}}function Prt(t,n){if(1&t&&(p(0,"div",5),U(1,Srt,1,0,"div",6),B(2,"img",7,8),U(4,wrt,3,7,"div",9)(5,Trt,1,2,"avatar-frame",10),m()),2&t){const o=_();d(),l("ngIf",!o.avatarIsLoaded),d(),l("ngClass",ne(6,tM,!o.activatedItem))("src",o.avatarSrc,Wn)("title",o.user.username.currentUsername),d(2),l("ngIf",o.hasUsername),d(),l("ngIf",o.activatedItem)}}function Irt(t,n){1&t&&B(0,"avatar-frame",18),2&t&&l("frameItem",_(2).activatedItem.item)}function Mrt(t,n){if(1&t&&(B(0,"img",16),U(1,Irt,1,1,"avatar-frame",17)),2&t){const o=_();l("ngClass",ne(4,tM,!o.activatedItem))("src",o.avatarImage,Wn)("title",o.user.username.currentUsername),d(),l("ngIf",o.activatedItem)}}function Ort(t,n){if(1&t&&(p(0,"p",19),H(1),m()),2&t){const o=_();l("ngClass",ne(2,tM,!o.activatedItem)),d(),se(o.user.level)}}let Bo=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.store=b,this.permissionsService=w,this.avatarImage="",this.hasUsername=!0,this.hasLevel=!0,this.allowClickPropagation=!1,this.avatarIsLoaded=!1,this.avatarLoaded=R=>{this.avatarIsLoaded=!0,this.cdr.detectChanges()},this.avatarLoadFail=R=>{this.avatarSrc=DG,this.avatarIsLoaded=!0,this.cdr.detectChanges()},this.defaultAvatarsService=h,this.router=e,this.inventoryService=i,this.cdnURL="".concat(Lt.CONFIG.core.cdn.url,"uploads/"),this.ngZone=r,s.detach(),this.cdr=s,this.analyticsTrackingService=a,this.contextTreeService=c,this.constants=u}ngOnInit(){this.setAvatarAttributes(),this.cdr.detectChanges()}ngOnChanges(e){if(e.user){this.setAvatarAttributes(),this.user=e.user.currentValue;const i=this.store.selectUserState();this.avatarSubscription&&this.avatarSubscription.unsubscribe(),i.profile.id===this.user.id?this.avatarSubscription=this.store.subscribeUserState().pipe(bt(Boolean)).subscribe(r=>{this.avatarSrc=this.getAvatarUrl(r.profile.avatar||""),this.cdr.detectChanges()}):this.avatarSrc=this.getAvatarUrl(this.user.avatar||"")}this.cdr.detectChanges()}ngAfterViewInit(){this.avatarImageTag&&(this.avatarImageElement=this.avatarImageTag.nativeElement,this.ngZone.runOutsideAngular(()=>{this.avatarImageElement.addEventListener("load",this.avatarLoaded),this.avatarImageElement.addEventListener("error",this.avatarLoadFail)})),this.cdr.detectChanges()}ngOnDestroy(){this.avatarImageElement&&(this.avatarImageElement.removeEventListener("load",this.avatarLoaded),this.avatarImageElement.removeEventListener("error",this.avatarLoadFail)),this.avatarSubscription&&this.avatarSubscription.unsubscribe()}getAvatarUrl(e){return this.defaultAvatarsService.transformAvatarUrl(e)||DG}navigateToProfileFunc(e,i){if(this.allowClickPropagation||i.stopPropagation(),this.isLink){this.permissionsService.getActionPermission(vrt.Profile,brt.Open,{showFailedRequirements:!0});const r=new aa.DefaultEvent(Nn.Navigation,"profile:".concat(this.user.id),{label:this.contextTreeService.getContext()});this.analyticsTrackingService.sendEvent(r),this.ngZone.run(()=>{this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/profile/").concat(e)}}])})}}setAvatarAttributes(){var e;this.user&&(this.activatedItem=null!==(e=this.frame)&&void 0!==e?e:this.inventoryService.getActiveItem(this.user.inventory.items,Fe.TG.Frame))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(cc),g(an),g(Re),g(yi),g(nn),g(tn),g(Rp),g(J),g(Pi))},t.\u0275cmp=pe({type:t,selectors:[["avatar"]],viewQuery:function(e,i){if(1&e&&$e(Crt,5),2&e){let r;je(r=He())&&(i.avatarImageTag=r.first)}},inputs:{user:"user",isLink:"isLink",avatarImage:"avatarImage",hasUsername:"hasUsername",hasLevel:"hasLevel",allowClickPropagation:"allowClickPropagation",frame:"frame",frameAnimation:"frameAnimation"},features:[it],decls:7,vars:5,consts:[["click-feedback","",1,"avatar__wrapper",3,"clickFeedbackDisabled","click"],[4,"ngIf","ngIfThen","ngIfElse"],["avatarNormalContainer",""],["avatarPreviewContainer",""],["class","avatar__text--level","data-cy","avatarLevel",3,"ngClass",4,"ngIf"],[1,"avatar__dummy"],["class","avatar__image--placeholder",4,"ngIf"],["data-cy","avatarImage",1,"avatar__image--user","normal",3,"ngClass","src","title"],["avatarImageTag",""],["class","avatar__container--footer",3,"ngClass",4,"ngIf"],["class","avatar-frame","data-cy","avatarFrame",3,"frameItem","animation",4,"ngIf"],[1,"avatar__image--placeholder"],[1,"avatar__container--footer",3,"ngClass"],[1,"avatar__text--username",3,"ngClass"],[3,"userProfile"],["data-cy","avatarFrame",1,"avatar-frame",3,"frameItem","animation"],["image-resizable","","alt","User avatar","data-cy","avatarImagePreviewContainer",1,"preview",3,"ngClass","src","title"],["class","avatar-frame","data-cy","avatarFrameEditProfile",3,"frameItem",4,"ngIf"],["data-cy","avatarFrameEditProfile",1,"avatar-frame",3,"frameItem"],["data-cy","avatarLevel",1,"avatar__text--level",3,"ngClass"]],template:function(e,i){if(1&e&&(p(0,"section",0),Y("click",function(s){return i.navigateToProfileFunc(i.user.id,s)}),U(1,yrt,1,0,"div",1)(2,Prt,6,8,"ng-template",null,2,ft)(4,Mrt,2,6,"ng-template",null,3,ft)(6,Ort,2,4,"p",4),m()),2&e){const r=Kt(3),s=Kt(5);l("clickFeedbackDisabled",!i.isLink),d(),l("ngIf",""===i.avatarImage)("ngIfThen",r)("ngIfElse",s),d(5),l("ngIf",i.hasLevel)}},dependencies:[Xe,Ne,po,F4,Q6,Zp],styles:["[_nghost-%COMP%]{width:100%;height:100%}.avatar__wrapper[_ngcontent-%COMP%]{display:block;height:100%;width:100%;overflow:hidden;position:relative}.avatar__dummy[_ngcontent-%COMP%]{margin-top:100%}.avatar__image--placeholder[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:40%;height:40%;transform:translate(-50%,-50%)}.avatar__image--user[_ngcontent-%COMP%]{position:absolute;top:2%;bottom:0;left:2%;right:0;display:block;border:0px;background-color:transparent;text-decoration:none;height:96%;width:96%}.avatar__image--user.no-frame[_ngcontent-%COMP%]{height:100%;width:100%;left:0;top:0}.preview[_ngcontent-%COMP%]{position:absolute;top:2%;bottom:0;left:3%;right:0;display:block;border:0px;background-color:transparent;text-decoration:none;height:94%;width:94%}.avatar__container--footer[_ngcontent-%COMP%]{position:absolute;left:3%;bottom:.1rem;width:94%;height:2.2rem}.avatar__container--footer.no-frame[_ngcontent-%COMP%]{width:100%;left:0;bottom:0}@media only screen and (max-width: 768px){.avatar__container--footer[_ngcontent-%COMP%]{height:1.6rem}}.avatar__text--username[_ngcontent-%COMP%]{font-size:1.2rem;line-height:18px;padding:0 0 0 .6rem;width:calc(100% - 2.4rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}.avatar__text--username.no-frame[_ngcontent-%COMP%]{line-height:2.2rem}@media only screen and (max-width: 768px){.avatar__text--username[_ngcontent-%COMP%]{font-size:1rem;width:calc(100% - 1.6rem);line-height:16px}.avatar__text--username.no-frame[_ngcontent-%COMP%]{line-height:1.8rem}}.avatar__text--level[_ngcontent-%COMP%]{position:absolute;bottom:2%;right:6%;font-size:1.4rem;font-weight:600;line-height:21px}.avatar__text--level.no-frame[_ngcontent-%COMP%]{line-height:2.2rem;bottom:0}@media only screen and (max-width: 768px){.avatar__text--level[_ngcontent-%COMP%]{font-size:1rem;line-height:14px;bottom:.2rem}.avatar__text--level.no-frame[_ngcontent-%COMP%]{line-height:1.6rem;bottom:0}}"],changeDetection:0}),n})();const Ert=["wrapper"];function xrt(t,n){if(1&t&&(p(0,"div",6)(1,"div",7),Df(),B(2,"svg",8),jO(),B(3,"avatar",9),m(),p(4,"p",10),H(5),m()()),2&t){const o=n.ngIf;d(3),l("user",o.profile)("hasUsername",!1),d(2),se(o.profile.username.currentUsername)}}function Art(t,n){if(1&t&&(Tn(0),U(1,xrt,6,3,"div",5),V(2,"async"),Pn()),2&t){const o=_(2);d(),l("ngIf",$(2,1,o.userStream$))}}function Rrt(t,n){if(1&t){const o=Ce();p(0,"image-message",3),Y("destroy",function(){return oe(o),re(_().onRequestDestroy())})("openLink",function(i){return oe(o),re(_().openLink(i))})("onActionClicked",function(i){return oe(o),re(_().clickAction(i))}),U(1,Art,3,3,"ng-container",4),m()}if(2&t){const o=_();l("viewModel",o.imageMessageConfig),d(),l("ngIf",o.imageMessageConfig&&o.imageMessageConfig.parameters.personalised&&o.imageMessageConfig.parameters.showInBanner)}}let nM=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.cdr=e,this.renderer=i,this.ngZone=r,this.store=s,this.analytics=a,this.appService=c,this.forwarding=u,this.deltaDNAService=h,this.rulerService=b,this.clientAdsService=w,this.bonusesService=R,this.toaster=G,this.destroy=new ke,this.resize=K=>{this.wrapperSize={width:this.wrapper.nativeElement.clientWidth,height:this.wrapper.nativeElement.clientHeight},this.buildViewModel()},this.analyticsDevicePlatform=new Ap,e.detach()}ngOnInit(){this.wrapperSize={width:this.wrapper.nativeElement.clientWidth,height:this.wrapper.nativeElement.clientHeight},this.buildViewModel(),this.subscription=this.rulerService.getAppSize().subscribe(this.resize),this.userStream$=this.store.subscribeUserState()}ngOnChanges(e){!1===e.params.isFirstChange()&&this.buildViewModel()}buildViewModel(){new wqe(this.params,this.wrapperSize).createImageMessageViewModel().then(i=>{this.imageMessageConfig=i,this.imageMessageConfig.timer&&(this.imageMessageConfig.timer.style.heading.display="none",this.imageMessageConfig.timer.style.wrapper.justifyContent="flex-end"),this.cdr.detectChanges()}).catch(i=>{console.error(i)})}onRequestDestroy(){this.destroy.emit(this.params)}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}onLinkedClicked(e){const i=new Tl.BannerClickEvent(f5.Click,g5.Button,{UIType:g5.Button,UIAction:f5.Click,UILocation:tce.DeltaBanner,UIName:nce.DeltaBannerClicked,engagementBannerIDSeen:e,platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});this.analytics.sendUIEvent(i)}openLink(e){!1===(0,ie.isAbsoluteLink)(e)?(this.deltaDNAService.emitDeltaEvent({name:m5.DeltaDNALinkClicked,value:e,engagementID:this.imageMessageConfig.eventParams.responseEngagementID,parameters:this.imageMessageConfig.parameters,openedFrom:this.openedFrom}),this.forwarding.forward(e)):this.appService.openExternalUrl(e)}clickAction(e){var i=this;return f(function*(){if(e===Qse.PlayRV)try{const r=i.store.bonuses.videoDeltaBanner.selectState();yield i.clientAdsService.showRewardedVideo({containerId:rc.DeltaBanner,video:r,isRewardMiniGame:!!r.gameId}),yield i.bonusesService.claimVideoBonusReward(Ba.RewardedVideoDeltaBanner),yield i.bonusesService.getVideoBonusReward(Ba.RewardedVideoDeltaBanner)}catch(r){console.warn(r),r instanceof Bp?i.toaster.error("BONUS.NO_VIDEOS"):r instanceof Np?i.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):r instanceof zm||(r instanceof Fp?i.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):i.toaster.warn("ERRORS.SOMETHING_WRONG"))}else console.log("Delta action clicked: ",e)})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ji),g(an),g(J),g(yi),g(Qt),g($d),g(sl),g(Ua),g(bc),g(Iu),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["image-message-wrapper"]],viewQuery:function(e,i){if(1&e&&$e(Ert,7,$t),2&e){let r;je(r=He())&&(i.wrapper=r.first)}},inputs:{openedFrom:"openedFrom",params:"params"},outputs:{destroy:"destroy"},features:[it],decls:3,vars:1,consts:[[1,"image-message-wrapper__wrapper"],["wrapper",""],[3,"viewModel","destroy","openLink","onActionClicked",4,"ngIf"],[3,"viewModel","destroy","openLink","onActionClicked"],[4,"ngIf"],["class","image-message-wrapper__container--avatar",4,"ngIf"],[1,"image-message-wrapper__container--avatar"],[1,"image-message-wrapper__container--avatar-inner"],["viewBox","0 0 1 1","xmlns","http://www.w3.org/2000/svg",1,"image-message-wrapper__avatar-aspect-ratio-holder"],[1,"image-message-wrapper__avatar",3,"user","hasUsername"],[1,"image-message-wrapper__text--username"]],template:function(e,i){1&e&&(p(0,"div",0,1),U(2,Rrt,2,2,"image-message",2),m()),2&e&&(d(2),l("ngIf",i.imageMessageConfig))},dependencies:[Ne,H4,Bo,IX],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.image-message-wrapper__wrapper[_ngcontent-%COMP%]{height:100%}.image-message-wrapper__container--avatar[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;height:25%;transform:translate(-50%);display:flex;flex-flow:column nowrap;z-index:1;pointer-events:none}.image-message-wrapper__container--avatar-inner[_ngcontent-%COMP%]{position:relative;height:85%;margin:0 auto}.image-message-wrapper__avatar-aspect-ratio-holder[_ngcontent-%COMP%]{height:100%;display:block}.image-message-wrapper__avatar[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:calc(100% - 1rem);height:calc(100% - 1rem)}"],changeDetection:0}),n})();function krt(t,n){1&t&&B(0,"simple-message",1),2&t&&l("viewModel",_().simpleMessageConfig)}let Y6=(()=>{var t;class n{constructor(e){this.cdr=e,e.detach()}ngOnChanges(){this.buildViewModel()}buildViewModel(){const e=new Tqe(this.params);this.simpleMessageConfig=e.createSimpleMessageViewModel(),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["simple-message-wrapper"]],inputs:{params:"params"},features:[it],decls:1,vars:1,consts:[[3,"viewModel",4,"ngIf"],[3,"viewModel"]],template:function(e,i){1&e&&U(0,krt,1,1,"simple-message",0),2&e&&l("ngIf",i.simpleMessageConfig)},dependencies:[Ne,q4],styles:["[_nghost-%COMP%]{display:block;height:100%}"],changeDetection:0}),n})();function Lrt(t,n){if(1&t){const o=Ce();p(0,"image-message-wrapper",4),Y("destroy",function(i){return oe(o),re(_().destroyChildComponent(i))}),m()}if(2&t){const o=_();l("openedFrom","deltaPopup")("params",o.banner)}}function Drt(t,n){1&t&&B(0,"simple-message-wrapper",5),2&t&&l("params",_().banner)}let J6=(()=>{var t;class n{constructor(e,i,r,s){this.onClose=new sn,this.router=i,this.playClient=r,this.cdr=s,s.detach()}ngOnInit(){this.attachListeners(),this.updateView()}ngOnDestroy(){this.detachListeners(),this.close()}destroyChildComponent(e){this.close(),this.updateView()}updateView(){this.cdr.detectChanges()}attachListeners(){void 0===this.routerSubscription&&(this.routerSubscription=this.router.events.pipe(bt(e=>e instanceof as)).subscribe(e=>{this.destroyChildComponent(this.banner)})),this.clientTransitionListener||(this.clientTransitionListener=this.playClient.stateEvents.onClientStateTransition(e=>{e.to!==yn.Idle&&this.destroyChildComponent(this.banner)}))}detachListeners(){var e,i,r;null===(e=this.routerSubscription)||void 0===e||e.unsubscribe(),null===(i=this.deltaDNASubscription)||void 0===i||i.unsubscribe(),null===(r=this.clientTransitionListener)||void 0===r||r.detach()}close(){this.onClose.next()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Um),g(on),g(oo),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["deltaDNA-popup"]],inputs:{banner:"banner"},decls:4,vars:2,consts:[[1,"deltaDNA-popup__container"],[3,"openedFrom","params","destroy",4,"ngIf"],[3,"params",4,"ngIf"],["id","close-button",1,"deltaDNA-popup__container--close",3,"onClick"],[3,"openedFrom","params","destroy"],[3,"params"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,Lrt,1,2,"image-message-wrapper",1)(2,Drt,1,1,"simple-message-wrapper",2),p(3,"button-close",3),Y("onClick",function(){return i.destroyChildComponent(i.banner)}),m()()),2&e&&(d(),l("ngIf",i.banner.isImageMessage),d(),l("ngIf",i.banner.isSimpleMessage))},dependencies:[Ne,Ud,nM,Y6],styles:[".deltaDNA-popup__container[_ngcontent-%COMP%]{height:100%;width:100%;position:absolute;top:0;left:0}.deltaDNA-popup__container--close[_ngcontent-%COMP%]{position:absolute;right:0;top:0}"],changeDetection:0}),n})();var MC;let iM=((MC=class{constructor(n,o,e,i,r,s,a){this.appState=n,this.analytics=o,this.store=e,this.deltaEngagementManager=i,this.navigation=r,this.overlayManager=s,this.rootContainerService=a,this.queued=new ie.List,this.onConnectionRestored=()=>{if(this.store.selectUserState()){const c=new Tl.SocketEvent(Nn.Socket,"state",{socketState:b5.RECONNECTED});this.analytics.sendEvent(c)}},this.onReconnectFailed=()=>{if(this.store.selectUserState()){const c=new Tl.SocketEvent(Nn.Socket,"state",{socketState:b5.TIMEOUT});this.analytics.sendEvent(c)}},this.onEngage=c=>{if(!this.canShow()||this.queued.has(c))return;this.queued.add(c);const u=new Lw;let h;u.execute=()=>{this.canShow()?(h=this.rootContainerService.createComponent(J6),h.instance.banner=c,h.instance.updateView(),h.instance.onClose.pipe($u()).subscribe(()=>{var b;this.deltaEngagementManager.onBannerDestroy(c),null===(b=h)||void 0===b||b.destroy(),u.complete(),this.queued.remove(c)})):u.complete()},u.onDestroy=()=>{var b;null===(b=h)||void 0===b||b.destroy(),u.complete(),this.queued.remove(c)},this.overlayManager.queueItem(u)}}attachSocketListeners(){this.appState.subscribe(co.ConnectionRestored,this.onConnectionRestored),this.appState.subscribe(co.ReconnectFailed,this.onReconnectFailed),this.deltaDNASubscription=this.deltaEngagementManager.bannerPromotions.pipe(bt(n=>!!n)).subscribe(this.onEngage)}canShow(){return this.store.selectUserState()&&this.navigation.url!=="".concat(Xs.gameRoute)}onLogout(){var n;this.appState.unsubscribe(co.ConnectionRestored,this.onConnectionRestored),this.appState.unsubscribe(co.ReconnectFailed,this.onReconnectFailed),null===(n=this.deltaDNASubscription)||void 0===n||n.unsubscribe(),this.queued=new ie.List}}).\u0275fac=function(n){return new(n||MC)(T(Sa),T(yi),T(Jo),T(Um),T(Yt),T(Bh),T(Ia))},MC.\u0275prov=be({token:MC,factory:MC.\u0275fac}),MC);Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],iM.prototype,"onLogout",null),iM=Qe([Wo(),ue("design:paramtypes",[Sa,yi,Jo,Um,Yt,Bh,Ia])],iM);let Brt=(()=>{var t;class n{constructor(e,i,r,s,a){var c=this;this.onPremiumGiftNotification=function(){var u=f(function*(h){const b=c.store.selectUserState().profile.id;!c.settings.getPremiumGiftNotificationEnabled()&&b!==h.giftSenderId&&b!==h.giftReceiverId||c.clientNotificationsDispatcher.dispatch({notificationType:hr.PremiumGiftNotification,params:h})});return function(h){return u.apply(this,arguments)}}(),this.onLogout=()=>{this.dispose()},this.store=a,this.settings=s,this.communicationService=i,this.authListenerService=e,this.clientNotificationsDispatcher=r}init(){this.attachListeners(),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onLogout)}dispose(){this.detachListeners(),this.authSubscription&&this.authSubscription.unsubscribe()}attachListeners(){this.communicationService.on(Hme,this.onPremiumGiftNotification)}detachListeners(){this.communicationService.removeListener(Hme,this.onPremiumGiftNotification)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(xr),T(Ri),T(cf),T(nc),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var OC,Hh=function(t){return t.Default="default",t.Special="special",t}(Hh||{});let C0=((OC=class{constructor(n,o,e,i,r){this.store=n,this.appStorage=o,this.inventoryService=e,this.translationService=i,this.gamesState=r}getDefaultPhrases(){const n=this.objectToCollection({dictionary:this.nonVipPhrasesMap(),isVip:!1,key:"non_vip",type:Hh.Default}),o=this.objectToCollection({dictionary:this.vipPhrasesMap(),isVip:!0,key:"vip",type:Hh.Default}),e=this.objectToCollection({dictionary:this.gameSpecificPhrases(),isVip:!1,key:"pack_phrases_".concat(this.gamesState.getCurrentGameState().id),type:Hh.Default});return this.getOrderedPhrases(n,o,e)}getSpecialPhrases(){let n=[];const o=this.inventoryService.getEquippedItemsByType([Fe.TG.PhraseSet]),e=o.filter(i=>!i.item.data.items).map(i=>i.item.id);for(let i=0;i<e.length;i++){const r=this.objectToCollection({dictionary:this.specialPhrasesMap(e[i]),isVip:!1,key:e[i],type:Hh.Special,packId:o[i].item.id}).reverse();n=n.concat(r)}return o.filter(i=>!!i.item.data.items).forEach(i=>{const r=this.specialPhrasesMap(i.item.id);n=n.concat(i.item.data.items.map(s=>({id:s.id,isVip:!1,key:i.item.id,message:r[s.id],type:Hh.Special,packId:i.item.id,config:s})))}),n}addNewPhraseToRecentlyUsed(n){let o=this.appStorage.getItem("recentlyUsedPhrases-".concat(this.store.selectUserState().profile.id))||[];o=o.filter(e=>n.type===Hh.Default?e.id!==n.id||n.isVip!==e.isVip:e.id!==n.id||!e.packId||e.packId!==n.packId).slice(0,3),o.unshift({id:n.id,type:n.type,packId:n.packId,isVip:n.isVip}),this.appStorage.setItem("recentlyUsedPhrases-".concat(this.store.selectUserState().profile.id),o)}getRecentlyUsedPhrases(){let n=this.appStorage.getItem("recentlyUsedPhrases-".concat(this.store.selectUserState().profile.id)),o=[];return n&&(n=this.removeUnequippedPremiumPhrases(n),o=this.mapRecentlyUsedPhrases(n)),o}removeUnequippedPremiumPhrases(n){return n.filter(o=>!!this.getSpecialPhrases().find(e=>e.id===o.id)||o.type===Hh.Default)}mapRecentlyUsedPhrases(n){return n.map(o=>o.type===Hh.Special?this.getSpecialPhrases().find(e=>e.id===o.id&&(!o.packId||e.packId===o.packId)):this.getDefaultPhrases().find(e=>e.id===o.id&&e.isVip===o.isVip)).filter(o=>!!o)}specialPhrasesMap(n){return this.translationService.getParsedTranslation("game_chat.chat_messages.text.".concat(n))}nonVipPhrasesMap(){return this.translationService.getParsedTranslation("game_chat.chat_messages.text.non_vip")}vipPhrasesMap(){return this.translationService.getParsedTranslation("game_chat.chat_messages.text.vip")}gameSpecificPhrases(){const n=this.translationService.getParsedTranslation("game_chat.chat_messages.text.pack_phrases_".concat(this.gamesState.getCurrentGameState().id));return"object"==typeof n?n:{}}objectToCollection(n){return Object.keys(n.dictionary).map(o=>({id:o,message:n.dictionary[o],isVip:n.isVip,key:n.key,type:n.type,packId:n.type===Hh.Special?n.key:void 0}))}getOrderedPhrases(n,o,e){n.concat(e),n.reverse(),o.reverse();const i=Math.max(n.length,o.length),r=[];for(let s=0;s<i;s++)n[s]&&r.push(n[s]),o[s]&&r.push(o[s]);return r}onLogout(){for(let n in localStorage)-1!==n.indexOf("recentlyUsedPhrases")&&this.appStorage.removeItem(n)}}).\u0275fac=function(n){return new(n||OC)(T(J),T(Ci),T(cc),T(pi),T(Zn))},OC.\u0275prov=be({token:OC,factory:OC.\u0275fac}),OC);Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],C0.prototype,"onLogout",null),C0=Qe([Wo(),ue("design:paramtypes",[J,Ci,cc,pi,Zn])],C0);var EC,y0=function(t){return t.Default="default",t.Special="special",t}(y0||{});let S0=((EC=class{constructor(n,o,e,i,r){this.clientConfig=r,this.maxRecentlyUsedEmojiList=12,this.appStorage=n,this.store=o,this.inventoryService=e,this.urlService=i}addNewItemRecentlyUsedEmoji(n){let o=this.getRecentlyUsedEmojis()||[];o=o.filter(e=>e.id!==n.id).slice(0,this.maxRecentlyUsedEmojiList-1),o.unshift(n),this.appStorage.setItem("recentlyUsedEmojis-".concat(this.store.selectUserState().profile.id),o)}getRecentlyUsedEmojis(){let n=this.appStorage.getItem("recentlyUsedEmojis-".concat(this.store.selectUserState().profile.id)),o=[];if(n){const e=this.getDefaultEmojis(),i=this.getSpecialEmojis();o=n.map(r=>e.find(s=>s.id===r.id)||i.find(s=>s.id===r.id)).filter(r=>!!r)}return o}getSpecialEmojis(){let n=this.inventoryService.getEquippedItemsByType([Fe.TG.EmojiSet]).map(i=>i.item),o=[];const e=n.map(i=>i.data);for(let i of e.filter(r=>r.items))i.items.forEach(r=>{const s=this.urlService.createCdnPath({url:r.list[0]}),a=r.spritesheets?this.urlService.createCdnPath({url:r.spritesheets[0]}):s;o.push({id:r.id,url:s,spritesheet:a,type:y0.Special,config:r})});for(let i of e.filter(r=>!r.items))i.list.forEach((r,s)=>{const a=this.urlService.createCdnPath({url:r}),c=i.spritesheets?this.urlService.createCdnPath({url:i.spritesheets[s]}):a;o.push({id:a,url:a,spritesheet:c,type:y0.Special})});return o}getDefaultEmojis(){const n=this.getDefaultEmojisMap();return this.clientConfig.getConfig(),Object.keys(n).map(e=>{const i=n[e];return{id:i,url:this.urlService.getImageUrl("game/emoticons/".concat(i,".png")),spritesheet:this.urlService.getImageUrl("game/emoticons/spritesheets/".concat(i,".png")),type:y0.Default,config:{id:i}}})}getDefaultEmojisMap(){return{message_1:"emoji_angel",message_10:"emoji_angry",message_11:"emoji_bandit",message_12:"emoji_blink",message_13:"emoji_cool",message_14:"emoji_crazy",message_15:"emoji_cry",message_16:"emoji_evilLaugh",message_17:"emoji_glasses",message_19:"emoji_goldTooth",message_2:"emoji_guilty",message_20:"emoji_handwave",message_21:"emoji_kiss",message_22:"emoji_laugh",message_23:"emoji_laughTears",message_24:"emoji_money",message_4:"emoji_party",message_5:"emoji_sad",message_6:"emoji_sleep",message_7:"emoji_smile",message_8:"emoji_thumbsUp",message_9:"emoji_worried"}}onLogout(){for(let n in localStorage)-1!==n.indexOf("recentlyUsedEmojis")&&this.appStorage.removeItem(n)}}).\u0275fac=function(n){return new(n||EC)(T(Ci),T(J),T(cc),T(ii),T(Zt))},EC.\u0275prov=be({token:EC,factory:EC.\u0275fac}),EC);Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],S0.prototype,"onLogout",null),S0=Qe([Wo(),ue("design:paramtypes",[Ci,J,cc,ii,Zt])],S0);const Zme={belotbg:2,euchrecom:1,gamesarena:1,vipbaloot:2,vipbelote:1,vipgames:1,viphearts:1,viphokm:1,vipklaverjas:1,vipludo:1,vipremi:1,vipsheesh:1,vipspades:2,viptarneeb:1,viptarot:1,yanciplus:1,vipokey:1};let X6=(()=>{var t;let n=((t=class{constructor(e,i,r,s,a,c,u,h,b){this.listeners=new ie.List,this.inGame=!1,this.isAppOnFocus=!0,this.onSoundPlay=w=>{w.type===Dp.VoiceMessage&&(clearTimeout(this.resumeDebounceDelay),this.pause())},this.onSoundStop=w=>{if(w.type!==Dp.VoiceMessage||this.soundService.playingList.find(G=>G.type===Dp.VoiceMessage))return;const R=void 0!==this.soundService.pausedOnAppPause.find(G=>G.id===this.currentSoundId);!this.inGame&&!this.isPlaying&&!this.preventPlaying&&!R&&this.isAppOnFocus&&(clearTimeout(this.resumeDebounceDelay),this.ngZone.runOutsideAngular(()=>{this.resumeDebounceDelay=setTimeout(()=>{this.resume()},500)}))},this.onNavigatedToGame=()=>{this.inGame=!0,this.stop()},this.onGameViewLeft=()=>{this.inGame=!1,this.play()},this.onAppSettingChanged=w=>{!this.inGame&&w.data.key===fi.ClientBackgroundMusicEnabled&&(!1===w.data.value?this.stop():this.play())},this.onPageHide=()=>{this.onAppPause()},this.onPageVisible=()=>{this.onAppResume()},this.matchmakingEvents=e,this.permissionsService=i,this.settingsService=r,this.soundService=s,this.currentSound=dn.DefaultBackgroundMusic,this.navigation=a,this.appState=c,this.device=u,this.ngZone=h,this.appService=b,this.preventPlaying=!0}onLogout(){this.dispose()}init(){this.permissionsService.getModulePermission(nt.EPermissionModule.ClientMusic).isPermitted?(this.matchmakingEvents.addEventListener(_i.NavigatedToGame,this.onNavigatedToGame),this.matchmakingEvents.addEventListener(_i.GameViewLeft,this.onGameViewLeft),this.settingsService.addSettingChangedListener(this.onAppSettingChanged),this.listeners.add(this.soundService.onSoundPlay(this.onSoundPlay)),this.listeners.add(this.soundService.onSoundPause(this.onSoundStop)),this.listeners.add(this.soundService.onSoundStop(this.onSoundStop)),this.listeners.add(this.soundService.onSoundEnd(this.onSoundStop)),this.listeners.add(this.soundService.onSoundUnload(this.onSoundStop)),!this.appService.isMobileApp()&&this.device.isMobile()&&(this.appState.subscribe(co.PageHide,this.onPageHide),this.appState.subscribe(co.PageVisible,this.onPageVisible))):this.stop()}play(e=this.currentSound){this.currentSound=e,this.permissionsService.getModulePermission(nt.EPermissionModule.ClientMusic).isPermitted&&!this.isRecordUIOpened&&this.settingsService.getClientBackgroundMusic()&&!this.inGame&&(this.currentSoundId=this.soundService.play(e,{type:Dp.BackgroundMusic,interruptable:!1,loop:!0,bypassChecks:!0}),this.preventPlaying=!1,this.isPlaying=!0)}stop(){clearTimeout(this.resumeDebounceDelay),this.preventPlaying=!0,this.soundService.stop(this.currentSoundId),this.isPlaying=!1}pause(){clearTimeout(this.resumeDebounceDelay),this.soundService.pause(this.currentSoundId),this.isPlaying=!1}resume(){!this.isRecordUIOpened&&this.settingsService.getClientBackgroundMusic()&&(this.soundService.resume(this.currentSoundId),this.preventPlaying=!1,this.isPlaying=!0)}dispose(){this.settingsService.removeSettingChangedListener(this.onAppSettingChanged),this.appState.unsubscribe(co.PageHide,this.onAppPause),this.appState.unsubscribe(co.PageVisible,this.onAppResume),this.matchmakingEvents.removeEventListener(_i.NavigatedToGame,this.onNavigatedToGame),this.matchmakingEvents.removeEventListener(_i.GameViewLeft,this.onGameViewLeft),this.listeners.forEach(e=>e.detach()),this.stop()}setRecordUIOpened(e){this.isRecordUIOpened=e}onAppPause(){clearTimeout(this.resumeDebounceDelay),this.isAppOnFocus=!1}onAppResume(){clearTimeout(this.resumeDebounceDelay),this.isAppOnFocus=!0}}).\u0275fac=function(e){return new(e||t)(T(nd),T(Ti),T(nc),T(Mo),T(Yt),T(Sa),T(Kl),T(an),T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogout",null),Qe([uie(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onAppPause",null),Qe([EA(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onAppResume",null),n=Qe([Wo(),ue("design:paramtypes",[nd,Ti,Object,Mo,Yt,Sa,Kl,an,Qt])],n),n})();
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.
    
    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.
    
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */function Nrt(t,n){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,s,e=o.call(t),r=[];try{for(;(void 0===n||n-- >0)&&!(i=e.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(o=e.return)&&o.call(e)}finally{if(s)throw s.error}}return r}var Zd=__webpack_require__(61425);function Qd(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var e=(0,Zd.Gd)();if(e&&e[t])return e[t].apply(e,function Frt(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(Nrt(arguments[n]));return t}(n));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function Jme(t){var n;try{throw new Error("Sentry syntheticException")}catch(o){n=o}return Qd("captureException",t,{originalException:t,syntheticException:n})}function Xme(t,n){Qd("setExtra",t,n)}function efe(t,n){Qd("setTag",t,n)}var n8=function(){return n8=Object.assign||function(n){for(var o,e=1,i=arguments.length;e<i;e++)for(var r in o=arguments[e])Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r]);return n},n8.apply(this,arguments)};function nfe(t,n){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,s,e=o.call(t),r=[];try{for(;(void 0===n||n-- >0)&&!(i=e.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(o=e.return)&&o.call(e)}finally{if(s)throw s.error}}return r}function oM(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(nfe(arguments[n]));return t}var ofe,Xk=__webpack_require__(14818),xa=__webpack_require__(1826),mr=__webpack_require__(50404),cv=__webpack_require__(40313),Vrt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],ife=function(){function t(n){void 0===n&&(n={}),this._options=n,this.name=t.id}return t.prototype.setupOnce=function(){(0,Xk.c)(function(n){var o=(0,Zd.Gd)();if(!o)return n;var e=o.getIntegration(t);if(e){var i=o.getClient(),r=i?i.getOptions():{},s=e._mergeOptions(r);if(e._shouldDropEvent(n,s))return null}return n})},t.prototype._shouldDropEvent=function(n,o){return this._isSentryError(n,o)?(xa.k.warn("Event dropped due to being internal Sentry Error.\nEvent: "+(0,mr.jH)(n)),!0):this._isIgnoredError(n,o)?(xa.k.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+(0,mr.jH)(n)),!0):this._isBlacklistedUrl(n,o)?(xa.k.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: "+(0,mr.jH)(n)+".\nUrl: "+this._getEventFilterUrl(n)),!0):!this._isWhitelistedUrl(n,o)&&(xa.k.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: "+(0,mr.jH)(n)+".\nUrl: "+this._getEventFilterUrl(n)),!0)},t.prototype._isSentryError=function(n,o){if(void 0===o&&(o={}),!o.ignoreInternal)return!1;try{return"SentryError"===n.exception.values[0].type}catch(e){return!1}},t.prototype._isIgnoredError=function(n,o){return void 0===o&&(o={}),!(!o.ignoreErrors||!o.ignoreErrors.length)&&this._getPossibleEventMessages(n).some(function(e){return o.ignoreErrors.some(function(i){return(0,cv.zC)(e,i)})})},t.prototype._isBlacklistedUrl=function(n,o){if(void 0===o&&(o={}),!o.blacklistUrls||!o.blacklistUrls.length)return!1;var e=this._getEventFilterUrl(n);return!!e&&o.blacklistUrls.some(function(i){return(0,cv.zC)(e,i)})},t.prototype._isWhitelistedUrl=function(n,o){if(void 0===o&&(o={}),!o.whitelistUrls||!o.whitelistUrls.length)return!0;var e=this._getEventFilterUrl(n);return!e||o.whitelistUrls.some(function(i){return(0,cv.zC)(e,i)})},t.prototype._mergeOptions=function(n){return void 0===n&&(n={}),{blacklistUrls:oM(this._options.blacklistUrls||[],n.blacklistUrls||[]),ignoreErrors:oM(this._options.ignoreErrors||[],n.ignoreErrors||[],Vrt),ignoreInternal:!(typeof this._options.ignoreInternal<"u")||this._options.ignoreInternal,whitelistUrls:oM(this._options.whitelistUrls||[],n.whitelistUrls||[])}},t.prototype._getPossibleEventMessages=function(n){if(n.message)return[n.message];if(n.exception)try{var o=n.exception.values[0],i=o.value;return[""+i,o.type+": "+i]}catch(r){return xa.k.error("Cannot extract message for event "+(0,mr.jH)(n)),[]}return[]},t.prototype._getEventFilterUrl=function(n){try{if(n.stacktrace){var o=n.stacktrace.frames;return o[o.length-1].filename}if(n.exception){var e=n.exception.values[0].stacktrace.frames;return e[e.length-1].filename}return null}catch(i){return xa.k.error("Cannot extract url for event "+(0,mr.jH)(n)),null}},t.id="InboundFilters",t}(),rfe=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){ofe=Function.prototype.toString,Function.prototype.toString=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return ofe.apply(this.__sentry__?this.__sentry_original__:this,n)}},t.id="FunctionToString",t}(),i8=function(t,n){return(i8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i])})(t,n)};function eL(t,n){function o(){this.constructor=t}i8(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}var qh=function(){return qh=Object.assign||function(n){for(var o,e=1,i=arguments.length;e<i;e++)for(var r in o=arguments[e])Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r]);return n},qh.apply(this,arguments)};function jrt(t,n){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,s,e=o.call(t),r=[];try{for(;(void 0===n||n-- >0)&&!(i=e.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(o=e.return)&&o.call(e)}finally{if(s)throw s.error}}return r}function o8(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(jrt(arguments[n]));return t}var Aa=__webpack_require__(1611),r8=function(t,n){return(r8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i])})(t,n)},Wrt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function $rt(t,n){return t.__proto__=n,t}:function Krt(t,n){for(var o in n)t.hasOwnProperty(o)||(t[o]=n[o]);return t}),lv=function(t){function n(o){var e=this.constructor,i=t.call(this,o)||this;return i.message=o,i.name=e.prototype.constructor.name,Wrt(i,e.prototype),i}return function Hrt(t,n){function o(){this.constructor=t}r8(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}(n,t),n}(Error),Zrt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,iL="Invalid Dsn",lfe=function(){function t(n){"string"==typeof n?this._fromString(n):this._fromComponents(n),this._validate()}return t.prototype.toString=function(n){void 0===n&&(n=!1);var o=this,i=o.path,r=o.pass,s=o.port;return o.protocol+"://"+o.user+(n&&r?":"+r:"")+"@"+o.host+(s?":"+s:"")+"/"+(i&&i+"/")+o.projectId},t.prototype._fromString=function(n){var o=Zrt.exec(n);if(!o)throw new lv(iL);var e=nfe(o.slice(1),6),i=e[0],r=e[1],s=e[2],a=void 0===s?"":s,c=e[3],u=e[4],h=void 0===u?"":u,w="",R=e[5],G=R.split("/");G.length>1&&(w=G.slice(0,-1).join("/"),R=G.pop()),this._fromComponents({host:c,pass:a,path:w,projectId:R,port:h,protocol:i,user:r})},t.prototype._fromComponents=function(n){this.protocol=n.protocol,this.user=n.user,this.pass=n.pass||"",this.host=n.host,this.port=n.port||"",this.path=n.path||"",this.projectId=n.projectId},t.prototype._validate=function(){var n=this;if(["protocol","user","host","projectId"].forEach(function(o){if(!n[o])throw new lv(iL)}),"http"!==this.protocol&&"https"!==this.protocol)throw new lv(iL);if(this.port&&isNaN(parseInt(this.port,10)))throw new lv(iL)},t}(),oL=function(){function t(n){this.dsn=n,this._dsnObject=new lfe(n)}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getStoreEndpoint=function(){return""+this._getBaseUrl()+this.getStoreEndpointPath()},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var o={sentry_key:this._dsnObject.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+(0,Aa._j)(o)},t.prototype._getBaseUrl=function(){var n=this._dsnObject;return(n.protocol?n.protocol+":":"")+"//"+n.host+(n.port?":"+n.port:"")},t.prototype.getStoreEndpointPath=function(){var n=this._dsnObject;return(n.path?"/"+n.path:"")+"/api/"+n.projectId+"/store/"},t.prototype.getRequestHeaders=function(n,o){var e=this._dsnObject,i=["Sentry sentry_version=7"];return i.push("sentry_timestamp="+(new Date).getTime()),i.push("sentry_client="+n+"/"+o),i.push("sentry_key="+e.user),e.pass&&i.push("sentry_secret="+e.pass),{"Content-Type":"application/json","X-Sentry-Auth":i.join(", ")}},t.prototype.getReportDialogEndpoint=function(n){void 0===n&&(n={});var o=this._dsnObject,e=this._getBaseUrl()+(o.path?"/"+o.path:"")+"/api/embed/error-page/",i=[];for(var r in i.push("dsn="+o.toString()),n)if("user"===r){if(!n.user)continue;n.user.name&&i.push("name="+encodeURIComponent(n.user.name)),n.user.email&&i.push("email="+encodeURIComponent(n.user.email))}else i.push(encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return i.length?e+"?"+i.join("&"):e},t}(),Al=__webpack_require__(23523),Yd=__webpack_require__(13100),dfe=[];
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.
    
    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.
    
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var Xrt=function(){function t(n,o){this._integrations={},this._processing=!1,this._backend=new n(o),this._options=o,o.dsn&&(this._dsn=new lfe(o.dsn)),this._isEnabled()&&(this._integrations=function Jrt(t){var n={};return function Qrt(t){var n=t.defaultIntegrations&&oM(t.defaultIntegrations)||[],o=t.integrations,e=[];if(Array.isArray(o)){var i=o.map(function(s){return s.name}),r=[];n.forEach(function(s){-1===i.indexOf(s.name)&&-1===r.indexOf(s.name)&&(e.push(s),r.push(s.name))}),o.forEach(function(s){-1===r.indexOf(s.name)&&(e.push(s),r.push(s.name))})}else{if("function"!=typeof o)return oM(n);e=o(n),e=Array.isArray(e)?e:[e]}return e}(t).forEach(function(o){n[o.name]=o,function Yrt(t){-1===dfe.indexOf(t.name)&&(t.setupOnce(Xk.c,Zd.Gd),dfe.push(t.name),xa.k.log("Integration installed: "+t.name))}(o)}),n}(this._options))}return t.prototype.captureException=function(n,o,e){var i=this,r=o&&o.event_id;return this._processing=!0,this._getBackend().eventFromException(n,o).then(function(s){return i._processEvent(s,o,e)}).then(function(s){r=s&&s.event_id,i._processing=!1}).then(null,function(s){xa.k.error(s),i._processing=!1}),r},t.prototype.captureMessage=function(n,o,e,i){var r=this,s=e&&e.event_id;return this._processing=!0,((0,Al.pt)(n)?this._getBackend().eventFromMessage(""+n,o,e):this._getBackend().eventFromException(n,e)).then(function(c){return r._processEvent(c,e,i)}).then(function(c){s=c&&c.event_id,r._processing=!1}).then(null,function(c){xa.k.error(c),r._processing=!1}),s},t.prototype.captureEvent=function(n,o,e){var i=this,r=o&&o.event_id;return this._processing=!0,this._processEvent(n,o,e).then(function(s){r=s&&s.event_id,i._processing=!1}).then(null,function(s){xa.k.error(s),i._processing=!1}),r},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(n){var o=this;return this._isClientProcessing(n).then(function(e){return clearInterval(e.interval),o._getBackend().getTransport().close(n).then(function(i){return e.ready&&i})})},t.prototype.close=function(n){var o=this;return this.flush(n).then(function(e){return o.getOptions().enabled=!1,e})},t.prototype.getIntegrations=function(){return this._integrations||{}},t.prototype.getIntegration=function(n){try{return this._integrations[n.id]||null}catch(o){return xa.k.warn("Cannot retrieve integration "+n.id+" from the current Client"),null}},t.prototype._isClientProcessing=function(n){var o=this;return new Yd.c(function(e){var i=0,s=0;clearInterval(s),s=setInterval(function(){o._processing?(i+=1,n&&i>=n&&e({interval:s,ready:!1})):e({interval:s,ready:!0})},1)})},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(n,o,e){var i=this.getOptions(),r=i.environment,s=i.release,a=i.dist,c=i.maxValueLength,u=void 0===c?250:c,h=n8({},n);void 0===h.environment&&void 0!==r&&(h.environment=r),void 0===h.release&&void 0!==s&&(h.release=s),void 0===h.dist&&void 0!==a&&(h.dist=a),h.message&&(h.message=(0,cv.$G)(h.message,u));var b=h.exception&&h.exception.values&&h.exception.values[0];b&&b.value&&(b.value=(0,cv.$G)(b.value,u));var w=h.request;w&&w.url&&(w.url=(0,cv.$G)(w.url,u)),void 0===h.event_id&&(h.event_id=(0,mr.DM)()),this._addIntegrations(h.sdk);var R=Yd.c.resolve(h);return o&&(R=o.applyToEvent(h,e)),R},t.prototype._addIntegrations=function(n){var o=Object.keys(this._integrations);n&&o.length>0&&(n.integrations=o)},t.prototype._processEvent=function(n,o,e){var i=this,r=this.getOptions(),s=r.beforeSend,a=r.sampleRate;return this._isEnabled()?"number"==typeof a&&Math.random()>a?Yd.c.reject("This event has been sampled, will not send event."):new Yd.c(function(c,u){i._prepareEvent(n,e,o).then(function(h){if(null!==h){var b=h;try{if(o&&o.data&&!0===o.data.__sentry__||!s)return i._getBackend().sendEvent(b),void c(b);var R=s(h,o);if(typeof R>"u")xa.k.error("`beforeSend` method has to return `null` or a valid event.");else if((0,Al.J8)(R))i._handleAsyncBeforeSend(R,c,u);else{if(null===(b=R))return xa.k.log("`beforeSend` returned `null`, will not send event."),void c(null);i._getBackend().sendEvent(b),c(b)}}catch(G){i.captureException(G,{data:{__sentry__:!0},originalException:G}),u("`beforeSend` threw an error, will not send event.")}}else u("An event processor returned null, will not send event.")}).then(null,function(){u("`beforeSend` threw an error, will not send event.")})}):Yd.c.reject("SDK not enabled, will not send event.")},t.prototype._handleAsyncBeforeSend=function(n,o,e){var i=this;n.then(function(r){null!==r?(i._getBackend().sendEvent(r),o(r)):e("`beforeSend` returned `null`, will not send event.")}).then(null,function(r){e("beforeSend rejected with "+r)})},t}(),w0=function(t){return t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed",t}(w0||{});!function(t){t.fromHttpCode=function n(o){return o>=200&&o<300?t.Success:429===o?t.RateLimit:o>=400&&o<500?t.Invalid:o>=500?t.Failed:t.Unknown}}(w0||(w0={}));var est=function(){function t(){}return t.prototype.sendEvent=function(n){return Yd.c.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:w0.Skipped})},t.prototype.close=function(n){return Yd.c.resolve(!0)},t}(),tst=function(){function t(n){this._options=n,this._options.dsn||xa.k.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype._setupTransport=function(){return new est},t.prototype.eventFromException=function(n,o){throw new lv("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(n,o,e){throw new lv("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(n){this._transport.sendEvent(n).then(null,function(o){xa.k.error("Error while sending event: "+o)})},t.prototype.getTransport=function(){return this._transport},t}(),Cg=function(t){return t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical",t}(Cg||{});function s8(){if(!("fetch"in(0,mr.Rf)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function ist(){if(!s8())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}!function(t){t.fromString=function n(o){switch(o){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;default:return t.Log}}}(Cg||(Cg={}));var rM="?",rst=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[-a-z]+:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sst=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,ast=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cst=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,lst=/\((\S*)(?::(\d+))(?::(\d+))\)/;function sM(t){var n=null,o=t&&t.framesToPop;try{if(n=function dst(t){if(!t||!t.stacktrace)return null;for(var s,o=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,e=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=t.stacktrace.split("\n"),r=[],a=0;a<i.length;a+=2){var c=null;(s=o.exec(i[a]))?c={url:s[2],func:s[3],args:[],line:+s[1],column:null}:(s=e.exec(i[a]))&&(c={url:s[6],func:s[3]||s[4],args:s[5]?s[5].split(","):[],line:+s[1],column:+s[2]}),c&&(!c.func&&c.line&&(c.func=rM),r.push(c))}return r.length?{message:a8(t),name:t.name,stack:r}:null}(t),n)return pfe(n,o)}catch(e){}try{if(n=function ust(t){if(!t||!t.stack)return null;for(var i,r,s,n=[],o=t.stack.split("\n"),a=0;a<o.length;++a){if(r=rst.exec(o[a])){var c=r[2]&&0===r[2].indexOf("native");r[2]&&0===r[2].indexOf("eval")&&(i=lst.exec(r[2]))&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),s={url:r[2],func:r[1]||rM,args:c?[r[2]]:[],line:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}else if(r=ast.exec(o[a]))s={url:r[2],func:r[1]||rM,args:[],line:+r[3],column:r[4]?+r[4]:null};else{if(!(r=sst.exec(o[a])))continue;r[3]&&r[3].indexOf(" > eval")>-1&&(i=cst.exec(r[3]))?(r[1]=r[1]||"eval",r[3]=i[1],r[4]=i[2],r[5]=""):0===a&&!r[5]&&void 0!==t.columnNumber&&(n[0].column=t.columnNumber+1),s={url:r[3],func:r[1]||rM,args:r[2]?r[2].split(","):[],line:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}!s.func&&s.line&&(s.func=rM),n.push(s)}return n.length?{message:a8(t),name:t.name,stack:n}:null}(t),n)return pfe(n,o)}catch(e){}return{message:a8(t),name:t&&t.name,stack:[],failed:!0}}function pfe(t,n){try{return qh({},t,{stack:t.stack.slice(n)})}catch(o){return t}}function a8(t){var n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}var pst=50;function hfe(t){var n=c8(t.stack),o={type:t.name,value:t.message};return n&&n.length&&(o.stacktrace={frames:n}),void 0===o.type&&""===o.value&&(o.value="Unrecoverable error caught"),o}function mfe(t){return{exception:{values:[hfe(t)]}}}function c8(t){if(!t||!t.length)return[];var n=t,o=n[0].func||"",e=n[n.length-1].func||"";return(-1!==o.indexOf("captureMessage")||-1!==o.indexOf("captureException"))&&(n=n.slice(1)),-1!==e.indexOf("sentryWrapped")&&(n=n.slice(0,-1)),n.map(function(i){return{colno:null===i.column?void 0:i.column,filename:i.url||n[0].url,function:i.func||"?",in_app:!0,lineno:null===i.line?void 0:i.line}}).slice(0,pst).reverse()}function l8(t,n,o){var e;if(void 0===o&&(o={}),(0,Al.VW)(t)&&t.error)return mfe(sM(t=t.error));if((0,Al.TX)(t)||(0,Al.fm)(t)){var r=t,s=r.name||((0,Al.TX)(r)?"DOMError":"DOMException"),a=r.message?s+": "+r.message:s;return e=u8(a,n,o),(0,mr.Db)(e,a),e}return(0,Al.VZ)(t)?e=mfe(sM(t)):(0,Al.PO)(t)||(0,Al.cO)(t)?(e=function hst(t,n,o){var e={exception:{values:[{type:(0,Al.cO)(t)?t.constructor.name:o?"UnhandledRejection":"Error",value:"Non-Error "+(o?"promise rejection":"exception")+" captured with keys: "+(0,Aa.zf)(t)}]},extra:{__serialized__:(0,Aa.Qy)(t)}};if(n){var r=c8(sM(n).stack);e.stacktrace={frames:r}}return e}(t,n,o.rejection),(0,mr.EG)(e,{synthetic:!0}),e):(e=u8(t,n,o),(0,mr.Db)(e,""+t,void 0),(0,mr.EG)(e,{synthetic:!0}),e)}function u8(t,n,o){void 0===o&&(o={});var e={message:t};if(o.attachStacktrace&&n){var r=c8(sM(n).stack);e.stacktrace={frames:r}}return e}var aM,_fe,mst=function(){function t(n){this._limit=n,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()<this._limit},t.prototype.add=function(n){var o=this;return this.isReady()?(-1===this._buffer.indexOf(n)&&this._buffer.push(n),n.then(function(){return o.remove(n)}).then(null,function(){return o.remove(n).then(null,function(){})}),n):Yd.c.reject(new lv("Not adding Promise due to buffer limit reached."))},t.prototype.remove=function(n){return this._buffer.splice(this._buffer.indexOf(n),1)[0]},t.prototype.length=function(){return this._buffer.length},t.prototype.drain=function(n){var o=this;return new Yd.c(function(e){var i=setTimeout(function(){n&&n>0&&e(!1)},n);Yd.c.all(o._buffer).then(function(){clearTimeout(i),e(!0)}).then(null,function(){e(!0)})})},t}(),ffe=function(){function t(n){this.options=n,this._buffer=new mst(30),this.url=new oL(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(n){throw new lv("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(n){return this._buffer.drain(n)},t}(),fst=(0,mr.Rf)(),gst=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return eL(n,t),n.prototype.sendEvent=function(o){var e={body:JSON.stringify(o),method:"POST",referrerPolicy:ist()?"origin":""};return this._buffer.add(fst.fetch(this.url,e).then(function(i){return{status:w0.fromHttpCode(i.status)}}))},n}(ffe),_st=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return eL(n,t),n.prototype.sendEvent=function(o){var e=this;return this._buffer.add(new Yd.c(function(i,r){var s=new XMLHttpRequest;s.onreadystatechange=function(){4===s.readyState&&(200===s.status&&i({status:w0.fromHttpCode(s.status)}),r(s))},s.open("POST",e.url),s.send(JSON.stringify(o))}))},n}(ffe),vst=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return eL(n,t),n.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var o=qh({},this._options.transportOptions,{dsn:this._options.dsn});return this._options.transport?new this._options.transport(o):s8()?new gst(o):new _st(o)},n.prototype.eventFromException=function(o,e){var r=l8(o,e&&e.syntheticException||void 0,{attachStacktrace:this._options.attachStacktrace});return(0,mr.EG)(r,{handled:!0,type:"generic"}),r.level=Cg.Error,e&&e.event_id&&(r.event_id=e.event_id),Yd.c.resolve(r)},n.prototype.eventFromMessage=function(o,e,i){void 0===e&&(e=Cg.Info);var s=u8(o,i&&i.syntheticException||void 0,{attachStacktrace:this._options.attachStacktrace});return s.level=e,i&&i.event_id&&(s.event_id=i.event_id),Yd.c.resolve(s)},n}(tst),Cst=function(t){function n(o){return void 0===o&&(o={}),t.call(this,vst,o)||this}return eL(n,t),n.prototype._prepareEvent=function(o,e,i){return o.platform=o.platform||"javascript",o.sdk=qh({},o.sdk,{name:"sentry.javascript.browser",packages:o8(o.sdk&&o.sdk.packages||[],[{name:"npm:@sentry/browser",version:"5.7.1"}]),version:"5.7.1"}),t.prototype._prepareEvent.call(this,o,e,i)},n.prototype.showReportDialog=function(o){void 0===o&&(o={});var e=(0,mr.Rf)().document;if(e){if(!this._isEnabled())return void xa.k.error("Trying to call showReportDialog with Sentry Client is disabled");var i=o.dsn||this.getDsn();if(!o.eventId)return void xa.k.error("Missing `eventId` option in showReportDialog call");if(!i)return void xa.k.error("Missing `Dsn` option in showReportDialog call");var r=e.createElement("script");r.async=!0,r.src=new oL(i).getReportDialogEndpoint(o),o.onLoad&&(r.onload=o.onLoad),(e.head||e.body).appendChild(r)}},n}(Xrt),d8=0;function vfe(){return d8>0}function xC(t,n,o){if(void 0===n&&(n={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(s){return t}var e=function(){o&&"function"==typeof o&&o.apply(this,arguments);var s=Array.prototype.slice.call(arguments);try{var a=s.map(function(c){return xC(c,n)});return t.handleEvent?t.handleEvent.apply(this,a):t.apply(this,a)}catch(c){throw function Sst(){d8+=1,setTimeout(function(){d8-=1})}(),function Grt(t){Qd("withScope",t)}(function(u){u.addEventProcessor(function(h){var b=qh({},h);return n.mechanism&&((0,mr.Db)(b,void 0,void 0),(0,mr.EG)(b,n.mechanism)),b.extra=qh({},b.extra,{arguments:(0,Aa.Fv)(s,3)}),b}),Jme(c)}),c}};try{for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}catch(s){}t.prototype=t.prototype||{},e.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:e}),Object.defineProperties(e,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(e,"name").configurable&&Object.defineProperty(e,"name",{get:function(){return t.name}})}catch(s){}return e}var p8=0;function rL(t,n){return void 0===n&&(n=!1),function(o){if(aM=void 0,o&&_fe!==o){_fe=o;var e=function(){var i;try{i=(0,mr.Rt)(o.target?o.target:o)}catch(r){i="<unknown>"}0!==i.length&&(0,Zd.Gd)().addBreadcrumb({category:"ui."+t,message:i},{event:o,name:t})};p8&&clearTimeout(p8),n?p8=setTimeout(e):e()}}}function h8(){return function(t){var n;try{n=t.target}catch(e){return}var o=n&&n.tagName;!o||"INPUT"!==o&&"TEXTAREA"!==o&&!n.isContentEditable||(aM||rL("input")(t),clearTimeout(aM),aM=setTimeout(function(){aM=void 0},1e3))}}var bfe=function(){function t(){this._ignoreOnError=0,this.name=t.id}return t.prototype._wrapTimeFunction=function(n){return function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return o[0]=xC(o[0],{mechanism:{data:{function:sL(n)},handled:!0,type:"instrument"}}),n.apply(this,o)}},t.prototype._wrapRAF=function(n){return function(o){return n(xC(o,{mechanism:{data:{function:"requestAnimationFrame",handler:sL(n)},handled:!0,type:"instrument"}}))}},t.prototype._wrapEventTarget=function(n){var o=(0,mr.Rf)(),e=o[n]&&o[n].prototype;!e||!e.hasOwnProperty||!e.hasOwnProperty("addEventListener")||((0,Aa.hl)(e,"addEventListener",function(i){return function(r,s,a){try{"function"==typeof s.handleEvent&&(s.handleEvent=xC(s.handleEvent.bind(s),{mechanism:{data:{function:"handleEvent",handler:sL(s),target:n},handled:!0,type:"instrument"}}))}catch(c){}return i.call(this,r,xC(s,{mechanism:{data:{function:"addEventListener",handler:sL(s),target:n},handled:!0,type:"instrument"}}),a)}}),(0,Aa.hl)(e,"removeEventListener",function(i){return function(r,s,a){var c=s;try{c=c&&(c.__sentry_wrapped__||c)}catch(u){}return i.call(this,r,c,a)}}))},t.prototype.setupOnce=function(){this._ignoreOnError=this._ignoreOnError;var n=(0,mr.Rf)();(0,Aa.hl)(n,"setTimeout",this._wrapTimeFunction.bind(this)),(0,Aa.hl)(n,"setInterval",this._wrapTimeFunction.bind(this)),(0,Aa.hl)(n,"requestAnimationFrame",this._wrapRAF.bind(this)),["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"].forEach(this._wrapEventTarget.bind(this))},t.id="TryCatch",t}();function sL(t){try{return t&&t.name||"<anonymous>"}catch(n){return"<anonymous>"}}var m8,wc=(0,mr.Rf)(),f8=function(){function t(n){this.name=t.id,this._options=qh({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},n)}return t.prototype._instrumentConsole=function(){"console"in wc&&["debug","info","warn","error","log","assert"].forEach(function(n){n in wc.console&&(0,Aa.hl)(wc.console,n,function(o){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var r={category:"console",data:{extra:{arguments:(0,Aa.Fv)(e,3)},logger:"console"},level:Cg.fromString(n),message:(0,cv.nK)(e," ")};"assert"===n?!1===e[0]&&(r.message="Assertion failed: "+((0,cv.nK)(e.slice(1)," ")||"console.assert"),r.data.extra.arguments=(0,Aa.Fv)(e.slice(1),3),t.addBreadcrumb(r,{input:e,level:n})):t.addBreadcrumb(r,{input:e,level:n}),o&&Function.prototype.apply.call(o,wc.console,e)}})})},t.prototype._instrumentDOM=function(){"document"in wc&&(wc.document.addEventListener("click",rL("click"),!1),wc.document.addEventListener("keypress",h8(),!1),["EventTarget","Node"].forEach(function(n){var o=wc[n]&&wc[n].prototype;!o||!o.hasOwnProperty||!o.hasOwnProperty("addEventListener")||((0,Aa.hl)(o,"addEventListener",function(e){return function(i,r,s){return r&&r.handleEvent?("click"===i&&(0,Aa.hl)(r,"handleEvent",function(a){return function(c){return rL("click")(c),a.call(this,c)}}),"keypress"===i&&(0,Aa.hl)(r,"handleEvent",function(a){return function(c){return h8()(c),a.call(this,c)}})):("click"===i&&rL("click",!0)(this),"keypress"===i&&h8()(this)),e.call(this,i,r,s)}}),(0,Aa.hl)(o,"removeEventListener",function(e){return function(i,r,s){var a=r;try{a=a&&(a.__sentry_wrapped__||a)}catch(c){}return e.call(this,i,a,s)}}))}))},t.prototype._instrumentFetch=function(){(function nst(){if(!s8())return!1;var t=function(r){return-1!==r.toString().indexOf("native")},n=(0,mr.Rf)(),o=null,e=n.document;if(e){var i=e.createElement("iframe");i.hidden=!0;try{e.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(o=t(i.contentWindow.fetch)),e.head.removeChild(i)}catch(r){xa.k.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}}return null===o&&(o=t(n.fetch)),o})()&&(0,Aa.hl)(wc,"fetch",function(n){return function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var s,i=o[0],r="GET";"string"==typeof i?s=i:"Request"in wc&&i instanceof Request?(s=i.url,i.method&&(r=i.method)):s=String(i),o[1]&&o[1].method&&(r=o[1].method);var a=(0,Zd.Gd)().getClient(),c=a&&a.getDsn();if(c){var u=new oL(c).getStoreEndpoint();if(u&&-1!==s.indexOf(u))return"POST"===r&&o[1]&&o[1].body&&Cfe(o[1].body),n.apply(wc,o)}var h={method:(0,Al.HD)(r)?r.toUpperCase():r,url:s};return n.apply(wc,o).then(function(b){return h.status_code=b.status,t.addBreadcrumb({category:"fetch",data:h,type:"http"},{input:o,response:b}),b}).then(null,function(b){throw t.addBreadcrumb({category:"fetch",data:h,level:Cg.Error,type:"http"},{error:b,input:o}),b})}})},t.prototype._instrumentHistory=function(){var n=this;if(function ost(){var t=(0,mr.Rf)(),n=t.chrome;return!(n&&n.app&&n.app.runtime||!("history"in t)||!t.history.pushState||!t.history.replaceState)}()){var o=function(r,s){var a=(0,mr.en)(wc.location.href),c=(0,mr.en)(s),u=(0,mr.en)(r);u.path||(u=a),m8=s,a.protocol===c.protocol&&a.host===c.host&&(s=c.relative),a.protocol===u.protocol&&a.host===u.host&&(r=u.relative),t.addBreadcrumb({category:"navigation",data:{from:r,to:s}})},e=wc.onpopstate;wc.onpopstate=function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];if(o(m8,wc.location.href),e)return e.apply(n,r)},(0,Aa.hl)(wc.history,"pushState",i),(0,Aa.hl)(wc.history,"replaceState",i)}function i(r){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var c=s.length>2?s[2]:void 0;return c&&o(m8,String(c)),r.apply(this,s)}}},t.prototype._instrumentXHR=function(){if("XMLHttpRequest"in wc){var o=XMLHttpRequest.prototype;(0,Aa.hl)(o,"open",function(e){return function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];var s=i[1];this.__sentry_xhr__={method:(0,Al.HD)(i[0])?i[0].toUpperCase():i[0],url:i[1]};var a=(0,Zd.Gd)().getClient(),c=a&&a.getDsn();if(c){var u=new oL(c).getStoreEndpoint();(0,Al.HD)(s)&&u&&-1!==s.indexOf(u)&&(this.__sentry_own_request__=!0)}return e.apply(this,i)}}),(0,Aa.hl)(o,"send",function(e){return function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];var s=this;function a(){if(4===s.readyState){if(s.__sentry_own_request__)return;try{s.__sentry_xhr__&&(s.__sentry_xhr__.status_code=s.status)}catch(u){}t.addBreadcrumb({category:"xhr",data:s.__sentry_xhr__,type:"http"},{xhr:s})}}return s.__sentry_own_request__&&Cfe(i[0]),["onload","onerror","onprogress"].forEach(function(u){!function n(e,i){e in i&&"function"==typeof i[e]&&(0,Aa.hl)(i,e,function(r){return xC(r,{mechanism:{data:{function:e,handler:r&&r.name||"<anonymous>"},handled:!0,type:"instrument"}})})}(u,s)}),"onreadystatechange"in s&&"function"==typeof s.onreadystatechange?(0,Aa.hl)(s,"onreadystatechange",function(u){return xC(u,{mechanism:{data:{function:"onreadystatechange",handler:u&&u.name||"<anonymous>"},handled:!0,type:"instrument"}},a)}):s.onreadystatechange=a,e.apply(this,i)}})}},t.addBreadcrumb=function(n,o){(0,Zd.Gd)().getIntegration(t)&&(0,Zd.Gd)().addBreadcrumb(n,o)},t.prototype.setupOnce=function(){this._options.console&&this._instrumentConsole(),this._options.dom&&this._instrumentDOM(),this._options.xhr&&this._instrumentXHR(),this._options.fetch&&this._instrumentFetch(),this._options.history&&this._instrumentHistory()},t.id="Breadcrumbs",t}();function Cfe(t){try{var n=JSON.parse(t);f8.addBreadcrumb({category:"sentry",event_id:n.event_id,level:n.level||Cg.fromString("error"),message:(0,mr.jH)(n)},{event:n})}catch(o){xa.k.error("Error while adding sentry type breadcrumb")}}var yfe=function(){function t(n){this.name=t.id,this._global=(0,mr.Rf)(),this._oldOnErrorHandler=null,this._oldOnUnhandledRejectionHandler=null,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=qh({onerror:!0,onunhandledrejection:!0},n)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(xa.k.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(xa.k.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},t.prototype._installGlobalOnErrorHandler=function(){if(!this._onErrorHandlerInstalled){var n=this;this._oldOnErrorHandler=this._global.onerror,this._global.onerror=function(o,e,i,r,s){var a=(0,Zd.Gd)(),c=a.getIntegration(t),u=s&&!0===s.__sentry_own_request__;if(!c||vfe()||u)return!!n._oldOnErrorHandler&&n._oldOnErrorHandler.apply(this,arguments);var h=a.getClient(),b=(0,Al.pt)(s)?n._eventFromIncompleteOnError(o,e,i,r):n._enhanceEventWithInitialFrame(l8(s,void 0,{attachStacktrace:h&&h.getOptions().attachStacktrace,rejection:!1}),e,i,r);return(0,mr.EG)(b,{handled:!1,type:"onerror"}),a.captureEvent(b,{originalException:s}),!!n._oldOnErrorHandler&&n._oldOnErrorHandler.apply(this,arguments)},this._onErrorHandlerInstalled=!0}},t.prototype._installGlobalOnUnhandledRejectionHandler=function(){if(!this._onUnhandledRejectionHandlerInstalled){var n=this;this._oldOnUnhandledRejectionHandler=this._global.onunhandledrejection,this._global.onunhandledrejection=function(o){var e=o;try{e=o&&"reason"in o?o.reason:o}catch(u){}var i=(0,Zd.Gd)(),r=i.getIntegration(t),s=e&&!0===e.__sentry_own_request__;if(!r||vfe()||s)return!!n._oldOnUnhandledRejectionHandler&&n._oldOnUnhandledRejectionHandler.apply(this,arguments);var a=i.getClient(),c=(0,Al.pt)(e)?n._eventFromIncompleteRejection(e):l8(e,void 0,{attachStacktrace:a&&a.getOptions().attachStacktrace,rejection:!0});return c.level=Cg.Error,(0,mr.EG)(c,{handled:!1,type:"onunhandledrejection"}),i.captureEvent(c,{originalException:e}),!!n._oldOnUnhandledRejectionHandler&&n._oldOnUnhandledRejectionHandler.apply(this,arguments)},this._onUnhandledRejectionHandlerInstalled=!0}},t.prototype._eventFromIncompleteOnError=function(n,o,e,i){var a,s=(0,Al.VW)(n)?n.message:n;if((0,Al.HD)(s)){var c=s.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);c&&(a=c[1],s=c[2])}return this._enhanceEventWithInitialFrame({exception:{values:[{type:a||"Error",value:s}]}},o,e,i)},t.prototype._eventFromIncompleteRejection=function(n){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+n}]}}},t.prototype._enhanceEventWithInitialFrame=function(n,o,e,i){return n.exception=n.exception||{},n.exception.values=n.exception.values||[],n.exception.values[0]=n.exception.values[0]||{},n.exception.values[0].stacktrace=n.exception.values[0].stacktrace||{},n.exception.values[0].stacktrace.frames=n.exception.values[0].stacktrace.frames||[],0===n.exception.values[0].stacktrace.frames.length&&n.exception.values[0].stacktrace.frames.push({colno:i,filename:o||(0,mr.l4)(),function:"?",in_app:!0,lineno:e}),n},t.id="GlobalHandlers",t}(),Sfe=function(){function t(n){void 0===n&&(n={}),this.name=t.id,this._key=n.key||"cause",this._limit=n.limit||5}return t.prototype.setupOnce=function(){(0,Xk.c)(function(n,o){var e=(0,Zd.Gd)().getIntegration(t);return e?e._handler(n,o):n})},t.prototype._handler=function(n,o){if(!(n.exception&&n.exception.values&&o&&o.originalException instanceof Error))return n;var e=this._walkErrorTree(o.originalException,this._key);return n.exception.values=o8(e,n.exception.values),n},t.prototype._walkErrorTree=function(n,o,e){if(void 0===e&&(e=[]),!(n[o]instanceof Error)||e.length+1>=this._limit)return e;var r=hfe(sM(n[o]));return this._walkErrorTree(n[o],o,o8([r],e))},t.id="LinkedErrors",t}(),aL=(0,mr.Rf)(),wfe=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){(0,Xk.c)(function(n){if((0,Zd.Gd)().getIntegration(t)){if(!aL.navigator||!aL.location)return n;var o=n.request||{};return o.url=o.url||aL.location.href,o.headers=o.headers||{},o.headers["User-Agent"]=aL.navigator.userAgent,qh({},n,{request:o})}return n})},t.id="UserAgent",t}(),Pst=[new ife,new rfe,new bfe,new f8,new yfe,new Sfe,new wfe];var Tfe={},g8=(0,mr.Rf)();g8.Sentry&&g8.Sentry.Integrations&&(Tfe=g8.Sentry.Integrations);var Mst=qh({},Tfe,F,v);let uv=(()=>{var t;class n{constructor(e,i){this.app=e,this.googleAnalyticsService=i,this.appName=Lt.CONFIG.platform.id,this.init()}captureException(e){this.googleAnalyticsService.sendException(e.message),!0===this.isExceptionTrackerEnabled()&&Jme(e)}captureUser(e){!0===this.isExceptionTrackerEnabled()&&(function Urt(t){Qd("setUser",t)}({id:e.profile.id,username:e.profile.username.currentUsername}),Xme("user",e))}isExceptionTrackerEnabled(){return this.exceptionTrackerEnabled}init(){const e=Tb.buildData.sentryConfig;if(e&&null!=e.url&&null!=e.version){(function Ist(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=Pst),void 0===t.release){var n=(0,mr.Rf)();n.SENTRY_RELEASE&&n.SENTRY_RELEASE.id&&(t.release=n.SENTRY_RELEASE.id)}!function zrt(t,n){!0===n.debug&&xa.k.enable(),(0,Zd.Gd)().bindClient(new t(n))
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.
    
    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.
    
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */}(Cst,t)})({dsn:e.url,environment:e.environment,release:e.version,integrations:[new Mst.Breadcrumbs({console:!1})]}),console.log("Init sentry: tags",this.appName,rw),efe("app",this.appName),efe("environment",rw);const i={device:this.app.getPlatform()};!0===this.app.isMobileApp()&&(i.deviceId=this.app.getDeviceId()),null!=this.app.getDevicePlatform()&&(i.devicePlatform=this.app.getDevicePlatform()),console.log("Sentry extra context: device",this.app.getPlatform(),"devicePlatform",this.app.getDevicePlatform(),"extra",i),Xme("deviceInfo",i),this.setExceptionTrackerEnabled(!0)}else this.setExceptionTrackerEnabled(!1)}setExceptionTrackerEnabled(e){this.exceptionTrackerEnabled=e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(ng))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),_8=(()=>{var t;class n{constructor(e,i){this.dispose=()=>{this.inited=!1,this.communicationService.removeListener(Ve.MatchmakingProtocol.Messages.ActivePlayersUpdate,this.onActivePlayersUpdate),this.authSubscription&&this.authSubscription.unsubscribe()},this.askForActivePlayersUpdates=()=>{this.communicationService.emit(Ve.MatchmakingProtocol.Messages.ActivePlayersAll)},this.onActivePlayersUpdate=r=>{const s=(0,ie.clone)(this.counters,!0);this.counters=r,Object.keys(s).filter(c=>!this.counters[c]).forEach(c=>{this.counters[c]=0});const a={};for(let c in this.counters){const u=c.split(":"),h=[c];for(let b=u.length-1;b>0;b--)u[b]="*",h.push(u.join(":").split("*")[0]+"*");h.forEach(b=>{a[b]?a[b]+=this.counters[c]:a[b]=this.counters[c]})}for(let c in a){const u=new CA(c,{key:c,value:a[c]});this.eventDispatcher.dispatchEvent(u)}},this.counters={},this.authListenerService=i,this.eventDispatcher=new tc,this.communicationService=e}init(){this.inited||(this.inited=!0,this.attachListeners())}addOnCounterUpdate(e,i){this.eventDispatcher.addEventListener(e,i)}removeOnCounterUpdate(e,i){this.eventDispatcher.removeEventListener(e,i)}getCounters(e){let i={};return e&&e.forEach(r=>{const s=r.split("*")[0],a=Object.keys(this.counters).filter(u=>u.startsWith(s));let c=0;a.forEach(u=>{c+=this.counters[u]}),i[r]=c}),i}attachListeners(){this.askForActivePlayersUpdates(),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.dispose),this.communicationService.on(Ve.MatchmakingProtocol.Messages.ActivePlayersAll,this.onActivePlayersUpdate)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(xr))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Ost=(()=>{var t;class n{constructor(e,i){this.activePlayersService=e,this.cdr=i,this.onCounterUpdate=r=>{this.counters[r.data.key]=r.data.value,this.counter=this.calculateCounter(),this.cdr.detectChanges()},this.countersKeys=[],this.counter=0,this.counters={}}ngOnChanges(e){const i=e.countersKeys;if(i){const r=i.previousValue;r&&r.length&&r.forEach(a=>{this.activePlayersService.removeOnCounterUpdate(a,this.onCounterUpdate)});const s=i.currentValue;s&&s.length&&s.forEach(a=>{this.activePlayersService.addOnCounterUpdate(a,this.onCounterUpdate)}),this.counters=this.activePlayersService.getCounters(this.countersKeys),this.counter=this.calculateCounter(),this.cdr.detectChanges()}}ngOnDestroy(){this.countersKeys&&this.countersKeys.forEach(e=>{this.activePlayersService.removeOnCounterUpdate(e,this.onCounterUpdate)}),this.countersKeys=void 0,this.counters=void 0,this.counter=void 0}calculateCounter(){let e=0;return Object.keys(this.counters).forEach(i=>{e+=this.counters[i]}),e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(_8),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["active-players"]],inputs:{countersKeys:"countersKeys"},features:[it],decls:3,vars:3,template:function(e,i){1&e&&(p(0,"span"),H(1),V(2,"formatNumber"),m()),2&e&&(d(),se(i.counter?$(2,1,i.counter):"-"))},dependencies:[Go],encapsulation:2}),n})(),Pfe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[_8],imports:[Yi]}),n})(),v8=(()=>{var t;class n{constructor(e,i){this.shopRentTimerService=e,this.store=i,this.membershipTimeUpdate=new ke}init(){this.userStateSubscription=this.store.subscribeUserState().pipe(bt(Boolean)).subscribe(e=>{let i=e.profile,r=e.xp.xpBooster;this.shopRentTimerService.deleteTimer("vip"),i.hasTierOrHigher(Fi.Full)&&this.shopRentTimerService.addAndGetRentTime("vip",i.vip.currentTier().expiresAt),this.shopRentTimerService.deleteTimer("xpBooster"),r.isActive()&&this.shopRentTimerService.addAndGetRentTime("xpBooster",r.expiresAt),this.membershipTimeUpdate.emit()})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(YI),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Jd=function(t){return t.GetChallenges="[Challenges] Get challenges",t.GetChallengesSuccess="[Challenges] Get challenges success",t.GetChallengesError="[Challenges] Get challenges error",t.ClaimChallengeReward="[Challenges] Claim challenges reward",t.ClaimChallengeRewardSuccess="[Challenges] Claim challenges reward success",t.ClaimChallengeRewardError="[Challenges] Claim challenge reward error",t.UpdateChallenges="[Challenges] Update challenges",t.UpdateChallengesSuccess="[Challenges] Update challenges success",t.UpdateChallengesError="[Challenges] Update challenges error",t.UpdateChallengesProgress="[Challenges] Update challenges progress",t.UpdateChallengesProgressSuccess="[Challenges] Update challenges progress success",t.UpdateChallengesProgressError="[Challenges] Update challenges progress error",t.ResetChallenges="[Challenges] Reset challenges",t.ChallengesConnectionRestore="[Challenges] Challenges connection restore",t}(Jd||{});const Ife=he(Jd.GetChallenges),Mfe=he(Jd.GetChallengesSuccess,{_as:"props",_p:void 0}),Ofe=he(Jd.GetChallengesError,{_as:"props",_p:void 0}),Efe=he(Jd.ClaimChallengeReward,{_as:"props",_p:void 0}),cL=he(Jd.ClaimChallengeRewardSuccess,{_as:"props",_p:void 0}),xfe=he(Jd.ClaimChallengeRewardError,{_as:"props",_p:void 0}),Afe=he(Jd.UpdateChallengesSuccess,{_as:"props",_p:void 0}),Rfe=he(Jd.UpdateChallengesProgress),kfe=he(Jd.UpdateChallengesProgressSuccess,{_as:"props",_p:void 0}),Lfe=he(Jd.UpdateChallengesProgressError,{_as:"props",_p:void 0}),Dfe=he(Jd.ResetChallenges),Bfe=he(Jd.ChallengesConnectionRestore);let b8=(()=>{var t;class n{constructor(e,i){this.httpService=e,this.communicationService=i}requestUserChallenges(){return this.httpService.get("challenges").toPromise().then(e=>e.body)}requestUserChallengesProgress(){return this.httpService.get("challenges/progress").toPromise().then(e=>e.body)}requestCompletedChallenges(e,i){return this.httpService.get("challenges/find/".concat(e),{params:{count:i}}).toPromise().then(r=>r.body)}claimReward(e,i){return this.httpService.post("challenges/reward",{challengeId:e,categoryId:i}).toPromise().then(r=>r.body)}onConnectionRestored(e){return this.communicationService.onReconnect(e)}onChallengeProgressUpdate(e){return this.communicationService.on("challengeProgressUpdatedEvent",e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class C8{constructor(n){this.breakpoints=n.breakpoints,this.categoryId=n.categoryId,this.completedAt=n.completedAt,this.currentProgress=n.currentProgress,this.expiresAt=n.expiresAt,this.games=n.games,this.goals=n.goals,this.goalsCompleted=n.goalsCompleted,this.id=n.id,this.levelsCompleted=n.levelsCompleted,this.progressType=n.progressType,this.rewards=n.rewards,this.takenRewards=n.takenRewards,this.type=n.type,this.actions={claim:{inProgress:!1}}}}let Est=(()=>{let t=class extends C8{constructor(o){super(o)}getCurrentLevel(){return Math.min(this.takenRewards+1,this.breakpoints.length)}getCurrentLevelPoints(){return Math.min(this.currentProgress,this.breakpoints[this.getCurrentLevel()-1])}getEdges(){return[this.breakpoints[this.getCurrentLevel()-2]||0,this.breakpoints[this.getCurrentLevel()-1]]}getCurrentLevelRewards(){return this.rewards[this.getCurrentLevel()-1]}getMaxLevel(){return this.breakpoints.length}isDone(){return this.takenRewards===this.breakpoints.length}isCompleted(){return this.takenRewards<this.levelsCompleted}getPointByLevel(o){return this.breakpoints[Math.min(Math.max(0,o),this.breakpoints.length-1)]}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getCurrentLevel",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getCurrentLevelPoints",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Array)],t.prototype,"getEdges",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getCurrentLevelRewards",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getMaxLevel",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isDone",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isCompleted",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Number)],t.prototype,"getPointByLevel",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),xst=(()=>{let t=class extends C8{constructor(o){super(o)}getCurrentLevel(){return 1}getCurrentLevelPoints(){return this.goalsCompleted.length}getEdges(){return[0,this.goals.length]}getCurrentLevelRewards(){return this.rewards[this.getCurrentLevel()-1]}getMaxLevel(){return 1}isDone(){return this.goalsCompleted.length===this.goals.length&&this.takenRewards>0}isCompleted(){return this.goalsCompleted.length===this.goals.length&&0===this.takenRewards}getPointByLevel(o){return 1}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getCurrentLevel",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getCurrentLevelPoints",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Array)],t.prototype,"getEdges",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getCurrentLevelRewards",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getMaxLevel",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isDone",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isCompleted",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Number)],t.prototype,"getPointByLevel",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),Ast=(()=>{let t=class extends C8{constructor(o){super(o)}getCurrentLevel(){return Math.min(this.takenRewards+1,this.breakpoints.length)}getCurrentLevelPoints(){return this.takenRewards<this.levelsCompleted?this.breakpoints[this.getCurrentLevel()-1]:Math.min(this.currentProgress,this.breakpoints[this.getCurrentLevel()-1])}getEdges(){return[this.breakpoints[this.getCurrentLevel()-2]||0,this.breakpoints[this.getCurrentLevel()-1]]}getCurrentLevelRewards(){return this.rewards[this.getCurrentLevel()-1]}getMaxLevel(){return this.breakpoints.length}isDone(){return this.takenRewards===this.breakpoints.length}isCompleted(){return this.takenRewards<this.levelsCompleted}getPointByLevel(o){return this.breakpoints[Math.min(Math.max(0,o),this.breakpoints.length-1)]}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getCurrentLevel",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getCurrentLevelPoints",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Array)],t.prototype,"getEdges",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],t.prototype,"getCurrentLevelRewards",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getMaxLevel",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isDone",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isCompleted",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[Number]),ue("design:returntype",Number)],t.prototype,"getPointByLevel",null),t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),lL=(()=>{var t;class n{static createChallenge(e){switch(e.progressType){case iA.Normal:return new Est(e);case iA.Reset:return new Ast(e);case iA.Goals:return new xst(e);default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),cM=(()=>{var t;let n=((t=class{constructor(e,i,r){this.store=e,this.challengesClientService=i,this.timeService=r,this.listeners=new ie.List,this.onChallengeProgressUpdated=s=>{const a=s.challenges.map(c=>lL.createChallenge(c.challengeViewModel));this.store.dispatch(Afe({challenges:a}))},this.onChallengesConnectionRestore=()=>{this.store.dispatch(Bfe())},this.challengeSyncSubscriptionState=this.getInitialChallengeSyncSubscriptionState()}init(){this.attachListeners()}requestChallenges(e=ra.Daily){var i=this;return f(function*(){try{i.timeService.getServerTimeS()>=i.store.challenges.selectChallengesExpirationTime({challengeCategory:e})?yield i.requestUserChallenges():yield i.requestUserChallengesProgress()}catch(r){throw console.warn(r),r}})()}startSyncronizeChallengesCycle(e={challengeCategory:ra.Daily,retryTimeout:1e4}){this.challengeSyncSubscriptionState.activeSubscriptionCount++,!(this.challengeSyncSubscriptionState.activeSubscriptionCount>1)&&(this.challengeSyncSubscriptionState.subscription=this.store.challenges.subscribeChallengesAreSynced().pipe(bt(i=>!i||this.timeService.getServerTimeS()>this.store.challenges.selectChallengesExpirationTime({challengeCategory:e.challengeCategory}))).subscribe(i=>{this.syncronizeChallenges(e)}))}stopSyncronizeChallengesCycle(){var e;this.challengeSyncSubscriptionState.activeSubscriptionCount--,!(this.challengeSyncSubscriptionState.activeSubscriptionCount>0)&&(clearTimeout(this.challengesRetryTimeout),null===(e=this.challengeSyncSubscriptionState.subscription)||void 0===e||e.unsubscribe())}getCompletedChallenges(e,i){var r=this;return f(function*(){return(yield r.challengesClientService.requestCompletedChallenges(e,i)).map(a=>lL.createChallenge(a))})()}claimReward(e){var i=this;return f(function*(){try{i.store.dispatch(Efe({challengeId:e}));const r=i.store.challenges.selectChallenge(e);yield i.challengesClientService.claimReward(e,r.categoryId),i.store.dispatch(cL({challengeId:e}))}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(xfe({challengeId:e,error:s})),s}})()}requestUserChallenges(){var e=this;return f(function*(){try{e.store.dispatch(Ife());let r={categories:(yield e.challengesClientService.requestUserChallenges()).categories.map(s=>({id:s.id,challenges:s.challenges.map(a=>lL.createChallenge(a))}))};e.store.dispatch(Mfe({challengesResponse:r}))}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(Ofe({error:r})),i}})()}requestUserChallengesProgress(){var e=this;return f(function*(){try{e.store.dispatch(Rfe());const i=yield e.challengesClientService.requestUserChallengesProgress(),r=[];i.categories.forEach(s=>{s.challenges.forEach(a=>r.push(a))}),e.store.dispatch(kfe({challengesProgressData:r}))}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(Lfe({error:r})),i}})()}syncronizeChallenges(e){var i=this;return f(function*(){try{i.store.challenges.selectChallengesLoadingState().isLoading||(yield i.requestChallenges(e.challengeCategory))}catch(r){i.challengesRetryTimeout=setTimeout(()=>{i.syncronizeChallenges(e)},e.retryTimeout)}})()}attachListeners(){this.listeners.add(this.challengesClientService.onConnectionRestored(this.onChallengesConnectionRestore)),this.listeners.add(this.challengesClientService.onChallengeProgressUpdate(this.onChallengeProgressUpdated))}getInitialChallengeSyncSubscriptionState(){return{subscription:void 0,activeSubscriptionCount:0}}dispose(){var e;this.store.dispatch(Dfe()),this.listeners.forEach(i=>i.detach()),clearTimeout(this.challengesRetryTimeout),null===(e=this.challengeSyncSubscriptionState.subscription)||void 0===e||e.unsubscribe(),this.challengeSyncSubscriptionState=this.getInitialChallengeSyncSubscriptionState(),this.listeners=new ie.List}}).\u0275fac=function(e){return new(e||t)(T(J),T(b8),T(Bn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[J,b8,Bn])],n),n})();const Nfe="challenges",lM=Ts(Nfe),uL=ki({selectId:t=>t.id,sortComparer:!1}),dv=ki({selectId:t=>t.id,sortComparer:!1}),Rst=We(lM,t=>t),kst=We(lM,t=>t.categories),Ffe=uL.getSelectors(kst),Lst=(We(Ffe.selectAll,t=>t),We(lM,t=>t.challenges)),Dst=dv.getSelectors(Lst),T0=()=>We(Dst.selectEntities,Ffe.selectEntities,(t,n,o)=>n[o.challengeCategory]?n[o.challengeCategory].challenges.map(e=>t[e]):[]),Ufe=We(lM,t=>t.areSynced),Gfe=()=>We(T0(),t=>t.filter(n=>n.isCompleted()).length),Vfe=()=>We(T0(),t=>t.some(n=>n.isCompleted())),zfe=()=>We(T0(),t=>t.some(n=>!n.isDone())),jfe=We(lM,t=>t.loadingState),Hfe=()=>We(Rst,(t,n)=>t.challenges.entities[n]),qfe=function Fst(){return{challenges:dv.getInitialState(),categories:uL.getInitialState(),loadingState:{isLoaded:!1,isLoading:!1,error:void 0},areSynced:!1}}(),Nst=Sr(qfe,de(Ife,t=>Se(t,n=>{n.loadingState.isLoading=!0,n.loadingState.error=void 0})),de(Mfe,(t,n)=>{let o=[];const e=n.challengesResponse.categories.map(i=>(o=o.concat(i.challenges),{id:i.id,challenges:i.challenges.map(s=>s.id)}));return Se(t,i=>{i.loadingState.isLoading=!1,i.loadingState.error=void 0,i.loadingState.isLoaded=!0,i.areSynced=!0,i.categories=uL.setAll(e,t.categories),i.challenges=dv.setAll(o,t.challenges)})}),de(Ofe,(t,n)=>Se(t,o=>{o.loadingState.isLoading=!1,o.loadingState.error=n.error})),de(Efe,(t,n)=>Se(t,o=>{o.challenges=dv.updateOne({id:n.challengeId,changes:{actions:{claim:{inProgress:!0}}}},t.challenges)})),de(cL,(t,n)=>{let o=t.challenges.entities[n.challengeId].takenRewards;return Se(t,e=>{e.challenges=dv.updateOne({id:n.challengeId,changes:{takenRewards:o+1,actions:{claim:{inProgress:!1,error:void 0}}}},t.challenges)})}),de(xfe,(t,n)=>Se(t,o=>{o.challenges=dv.updateOne({id:n.challengeId,changes:{actions:{claim:{inProgress:!1,error:n.error}}}},t.challenges)})),de(Afe,(t,n)=>Se(t,o=>{n.challenges.forEach(e=>{var i,r;let s=null!==(i=null===(r=t.categories.entities[e.categoryId])||void 0===r?void 0:r.challenges)&&void 0!==i?i:[e.id];s.find(a=>a===e.id)||(s=[...s,e.id]),o.categories=uL.upsertOne({id:e.categoryId,challenges:s},t.categories)}),o.challenges=dv.upsertMany(n.challenges,t.challenges)})),de(Rfe,t=>Se(t,n=>{n.loadingState.isLoading=!0})),de(kfe,(t,n)=>{let o=n.challengesProgressData.map(e=>({id:e.id,changes:{currentProgress:e.currentProgress,levelsCompleted:e.levelsCompleted}}));return Se(t,e=>{e.loadingState.isLoading=!1,e.loadingState.error=void 0,e.loadingState.isLoaded=!0,e.areSynced=!0,e.challenges=dv.updateMany(o,t.challenges)})}),de(Lfe,(t,n)=>Se(t,o=>{o.loadingState.isLoading=!1,o.loadingState.error=n.error})),de(Dfe,()=>qfe),de(Bfe,t=>Se(t,n=>{n.areSynced=!1})));function Ust(t,n){return Nst(t,n)}J.prototype.challenges={selectChallengesList:function Gst(t){return this.selectSync(T0(),t)}.bind(J.prototype),subscribeChallengesList:function Vst(t){return this.select(T0(),t)}.bind(J.prototype),selectChallengesAreSynced:function zst(){return this.selectSync(Ufe)}.bind(J.prototype),subscribeChallengesAreSynced:function jst(){return this.select(Ufe)}.bind(J.prototype),selectCompletedChallengesCount:function Hst(t){return this.selectSync(Gfe(),t)}.bind(J.prototype),subscribeCompletedChallengesCount:function qst(t){return this.select(Gfe(),t)}.bind(J.prototype),selectHasUndoneChallenges:function Wst(t){return this.selectSync(zfe(),t)}.bind(J.prototype),subscribeHasUndoneChallenges:function $st(t){return this.select(zfe(),t)}.bind(J.prototype),selectChallengesExpirationTime:function Kst(t){return this.selectSync(We(T0(),t=>Math.max(...t.map(n=>n.expiresAt),0)),t)}.bind(J.prototype),selectChallengesLoadingState:function Zst(){return this.selectSync(jfe)}.bind(J.prototype),subscribeChallengesLoadingState:function Qst(){return this.select(jfe)}.bind(J.prototype),selectHasCompletedChallenges:function Yst(t){return this.selectSync(Vfe(),t)}.bind(J.prototype),subscribeHasCompletedChallenges:function Jst(t){return this.select(Vfe(),t)}.bind(J.prototype),selectChallenge:function Xst(t){return this.selectSync(Hfe(),t)}.bind(J.prototype),subscribeChallenge:function eat(t){return this.select(Hfe(),t)}.bind(J.prototype)};let tat=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[cM,b8,lL],imports:[$r.forFeature(Nfe,Ust)]}),n})(),Wfe=(()=>{var t;class n{constructor(e,i,r,s){this.communicationService=e,this.gameSummaryService=i,this.router=r,this.authListenerService=s,this.dispose=()=>{this.listener.detach(),this.subscription.unsubscribe()}}init(){this.listener=this.communicationService.on(Ns.LevelUpReward,e=>{-1!==this.router.url.indexOf(Xs.gameRoute)&&this.gameSummaryService.setLevelUpRewards(e)}),this.subscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.dispose)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(aoe),T(on),T(xr))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),pv=(()=>{var t;class n{constructor(e){this.config=e}static createFeedQueryHash(e){var i;const r=null!==(i=e.groups)&&void 0!==i?i:Ys.getValues(qS),s=e.users?Zf(e.users,[ie.ESort.Asc]):[];return Dw([...Zf(r,[ie.ESort.Asc]),...s].join()).toString()}static createFeedFirstPageQuery(e){return{clubId:e,offset:0,limit:20,groups:void 0,users:[]}}static calculateCreatePrice(e,i){let r=i.foundingTaxAmount;return e!==Or.Public&&(r+=i.privacyTaxAmount),{amount:r,currency:i.foundingTaxCurrency}}static calculateEditPrice(e,i,r){let s=0;return!e.settings.isPrivacyTaxPaid&&i.privacy!==Or.Public&&(s+=r.privacyTaxAmount),i.newCustomAvatarImage&&(s+=r.customAvatarTaxAmount),{amount:s,currency:r.privacyTaxCurrency}}static clubPrivacyToPermissionModule(e){switch(e){case Or.Public:return nt.EPermissionModule.PublicClub;case Or.Private:return nt.EPermissionModule.PrivateClub;case Or.Closed:return nt.EPermissionModule.ClosedClub}}calculateCreatePrice(e){return n.calculateCreatePrice(e,this.config.content.clubs)}calculateEditPrice(e,i){return n.calculateEditPrice(e,i,this.config.content.clubs)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dr))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),dL=(()=>{var t;class n{constructor(e,i){this.http=e,this.cs=i,this.globalNsp=i}connectToClubFeedChannel(e){var i=this;return f(function*(){return i.clubNsp=yield i.cs.connectToNamespace("/club-".concat(e)),i.clubNsp})()}disconnectFromClubFeedChannel(){this.clubNsp&&this.clubNsp.disconnect()}getClubDetails(e){return this.http.get("clubs/".concat(e)).toPromise().then(i=>i.body)}getList(e){let i=new $l;for(let r in e)e.hasOwnProperty(r)&&null!=e[r]&&(i=i.append(r,e[r]));return this.http.get("clubs/list",{params:i}).toPromise().then(r=>r.body)}getClubsProfiles(e){let i=new $l;return(e.clubsIds||[]).forEach(r=>{i=i.append("clubsIds",r)}),this.http.get("clubs/profiles",{params:i}).toPromise().then(r=>r.body)}getClubFeed(e){let i=new $l;return i=i.append("clubId",e.clubId),null!=e.limit&&(i=i.append("limit",e.limit.toString())),null!=e.limit&&(i=i.append("skip",e.offset.toString())),(e.users||[]).forEach(r=>{i=i.append("users",r.toString())}),(e.groups||[]).forEach(r=>{i=i.append("groups",r.toString())}),this.http.get("clubs/".concat(e.clubId,"/feed"),{params:i}).toPromise().then(r=>r.body)}createClub(e){return this.http.post("clubs/create",e).toPromise().then(i=>i.body)}editClubInfo(e){return this.http.post("clubs/".concat(e.clubId,"/edit"),e).toPromise().then(i=>i.body)}leaveClub(e){return this.http.post("clubs/".concat(e.clubId,"/leave"),e).toPromise().then(i=>i.body)}sendClubJoinRequest(e){return this.http.post("clubs/".concat(e.clubId,"/join"),e).toPromise().then(i=>i.body)}sendClubInviteToUser(e){return this.http.post("clubs/".concat(e.clubId,"/invite"),e).toPromise().then(i=>i.body)}processJoinRequest(e,i){return this.http.post("clubs/".concat(i,"/request/proceed"),e).toPromise().then(r=>r.body)}cancelJoinRequest(e,i){return this.http.post("clubs/".concat(i,"/request/cancel"),e).toPromise().then(r=>r.body)}cancelClubInviteRequest(e,i){return this.http.post("clubs/".concat(i,"/request/cancel"),e).toPromise().then(r=>r.body)}kickMember(e){return this.http.post("clubs/".concat(e.clubId,"/kick"),e).toPromise().then(i=>i.body)}editMemberRole(e){return this.http.post("clubs/".concat(e.clubId,"/editRole"),e).toPromise().then(i=>i.body)}requestDonation(e){return this.http.post("clubs/".concat(e.clubId,"/donation/request"),e).toPromise().then(i=>i.body)}onClubStateUpdate(e){return new ie.EventListener(this.globalNsp,tP.ClubStateUdpate,e)}onNewFeedItem(e){return new ie.EventListener(this.clubNsp,tP.NewFeedItem,e)}onPendingRequestsUpdate(e){return new ie.EventListener(this.globalNsp,tP.PendingJoinRequestsUpdate,e)}onJoinRequestUpdate(e){return new ie.EventListener(this.globalNsp,tP.JoinRequestUpdate,e)}onConnectionLost(e){return this.globalNsp.onConnectionLost(e)}onConnectionRestored(e){return this.globalNsp.onReconnect(e)}onClubNspDisconnect(e){return this.clubNsp.onDisconnect(e)}onClubNspConnectionRestored(e){return this.clubNsp.onReconnect(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var vi=function(t){return t.ResetClubsState="[Clubs] Reset clubs state",t.InitCurrentClubState="[Clubs] Init current club state",t.NewActivityFeedItemReceived="[Club] New Activity Feed Item Received",t.GetCurrentClubDetails="[Clubs] Get current club details",t.GetClubFeed="[Clubs] Get club feed",t.GetClubFeedSuccess="[Clubs] Get club feed success",t.GetClubFeedError="[Clubs] Get club feed error",t.CreateClub="[Clubs] Create club",t.EditClub="[Clubs] Edit club",t.DisbandClubSuccess="[Clubs] Disband club success",t.LeaveClub="[Clubs] Leave club",t.SendJoinRequest="[Clubs] Send join request",t.AcceptJoinRequest="[Clubs] Accept join request",t.RejectJoinRequest="[Clubs] Reject join request",t.RejectJoinRequestSuccess="[Clubs] Reject join request success",t.RejectJoinRequestError="[Clubs] Reject join request error",t.CancelJoinRequest="[Clubs] Cancel join request",t.CancelJoinRequestSuccess="[Clubs] Cancel join request success",t.CancelJoinRequestError="[Clubs] Cancel join request error",t.AcceptClubInviteRequest="[Clubs] Accept club invite request",t.AcceptClubInviteRequestSuccess="[Clubs] Accept club invite request success",t.AcceptClubInviteRequestError="[Clubs] Accept club invite request error",t.RejectClubInviteRequest="[Clubs] Reject club invite request",t.RejectClubInviteRequestSuccess="[Clubs] Reject club invite request success",t.RejectClubInviteRequestError="[Clubs] Reject club invite request error",t.CancelClubInviteRequest="[Clubs] Cancel club invite request",t.CancelClubInviteRequestSuccess="[Clubs] Cancel club invite request success",t.CancelClubInviteRequestError="[Clubs] Cancel club invite request error",t.SendClubInviteRequest="[Clubs] Send club invite request",t.SendClubInviteRequestSuccess="[Clubs] Send club invite request success",t.SendClubInviteRequestError="[Clubs] Send club invite request error",t.KickMember="[Clubs] Kick member",t.KickMemberSuccess="[Clubs] Kick member success",t.KickMemberError="[Clubs] Kick member error",t.EditMemberRole="[Clubs] Edit member role",t.EditMemberRoleSuccess="[Clubs] Edit member role success",t.EditMemberRoleError="[Clubs] Edit member role error",t.RequestDonation="[Clubs] Request donation",t.RequestDonationSuccess="[Clubs] Request donation success",t.RequestDonationError="[Clubs] Request donation error",t.ClubJoinRequestUpdate="[Clubs] Join request update",t.SynchronizeClubFeed="[Clubs] Synchronize club feed",t.JoinRequestAccepted="[Clubs] Join request accepted",t.ConnectionRestored="[Clubs] Connection restored",t.ClubChannelConnectionRestored="[Clubs] Club channel connection restored",t.ClubChannelConnect="[Clubs] Club channel connect",t.ClubChannelDisconnect="[Clubs] Club channel disconnect",t.UpdateCurrentClubState="[Clubs] Update current club state",t.KickedFromClub="[Clubs] Kicked from club",t.ClubDisbanded="[Clubs] Club disbanded",t.ClearClubJoinRequestState="[Clubs] Clear club join request state",t.ClearInflightClubJoinRequestState="[Clubs] Clear inflight club join request state",t.UpdatePendingClubJoinRequests="[Clubs] Update pending club join requests",t.ClearCurrentClubState="[Clubs] Clear current club state",t.ResetFeedState="[Clubs] Reset feed state",t}(vi||{});const $fe=he(vi.ResetClubsState),Kfe=he(vi.InitCurrentClubState,{_as:"props",_p:void 0}),y8=he(vi.NewActivityFeedItemReceived,{_as:"props",_p:void 0}),[Zfe,Qfe,S8]=ya(vi.GetCurrentClubDetails),Yfe=he(vi.GetClubFeed,{_as:"props",_p:void 0}),Jfe=he(vi.GetClubFeedSuccess,{_as:"props",_p:void 0}),Xfe=he(vi.GetClubFeedError,{_as:"props",_p:void 0}),[ege,tge,nge]=ya(vi.CreateClub),[ige,oge,rge]=ya(vi.EditClub),sge=he(vi.DisbandClubSuccess,{_as:"props",_p:void 0}),[age,w8,cge]=ya(vi.LeaveClub),[lge,pL,uge]=ya(vi.SendJoinRequest),[dge,T8,pge]=ya(vi.AcceptJoinRequest),hge=he(vi.RejectJoinRequest,{_as:"props",_p:void 0}),mge=he(vi.RejectJoinRequestSuccess,{_as:"props",_p:void 0}),fge=he(vi.RejectJoinRequestError,{_as:"props",_p:void 0}),gge=he(vi.CancelJoinRequest,{_as:"props",_p:void 0}),_ge=he(vi.CancelJoinRequestSuccess,{_as:"props",_p:void 0}),vge=he(vi.CancelJoinRequestError,{_as:"props",_p:void 0}),bge=he(vi.AcceptClubInviteRequest,{_as:"props",_p:void 0}),hL=he(vi.AcceptClubInviteRequestSuccess,{_as:"props",_p:void 0}),Cge=he(vi.AcceptClubInviteRequestError,{_as:"props",_p:void 0}),yge=he(vi.RejectClubInviteRequest,{_as:"props",_p:void 0}),Sge=he(vi.RejectClubInviteRequestSuccess,{_as:"props",_p:void 0}),wge=he(vi.RejectClubInviteRequestError,{_as:"props",_p:void 0}),Tge=he(vi.CancelClubInviteRequest,{_as:"props",_p:void 0}),Pge=he(vi.CancelClubInviteRequestSuccess,{_as:"props",_p:void 0}),Ige=he(vi.CancelClubInviteRequestError,{_as:"props",_p:void 0}),Mge=he(vi.SendClubInviteRequest,{_as:"props",_p:void 0}),P8=he(vi.SendClubInviteRequestSuccess,{_as:"props",_p:void 0}),Oge=he(vi.SendClubInviteRequestError,{_as:"props",_p:void 0}),Ege=he(vi.KickMember,{_as:"props",_p:void 0}),I8=he(vi.KickMemberSuccess,{_as:"props",_p:void 0}),xge=he(vi.KickMemberError,{_as:"props",_p:void 0}),Age=he(vi.EditMemberRole,{_as:"props",_p:void 0}),Rge=he(vi.EditMemberRoleSuccess,{_as:"props",_p:void 0}),kge=he(vi.EditMemberRoleError,{_as:"props",_p:void 0}),Lge=he(vi.RequestDonation,{_as:"props",_p:void 0}),Dge=he(vi.RequestDonationSuccess,{_as:"props",_p:void 0}),Bge=he(vi.RequestDonationError,{_as:"props",_p:void 0}),M8=he(vi.ClubJoinRequestUpdate,{_as:"props",_p:void 0}),nat=he(vi.ConnectionRestored),O8=he(vi.ClubChannelConnectionRestored),Nge=(he(vi.ClubChannelConnect),he(vi.ClubChannelDisconnect)),[Fge,Uge,Gge]=ya(vi.SynchronizeClubFeed),hv=he(vi.UpdateCurrentClubState,{_as:"props",_p:void 0}),Vge=he(vi.KickedFromClub),zge=he(vi.ClubDisbanded),jge=he(vi.ClearCurrentClubState),P0=he(vi.ClearClubJoinRequestState,{_as:"props",_p:void 0}),yg=he(vi.ClearInflightClubJoinRequestState,{_as:"props",_p:void 0}),E8=he(vi.UpdatePendingClubJoinRequests,{_as:"props",_p:void 0}),Hge=he(vi.ResetFeedState);let x8=(()=>{let t=class{constructor(o){this.id="",this.clubId="",this.createdAt=Bn.instance.getServerTimeS(),this.actions={accept:{inProgress:!1},claim:{inProgress:!1},cancel:{inProgress:!1},reject:{inProgress:!1}},wr(this,o)}static getUserIds(...o){const e=[];return o.forEach(i=>{switch(i.type){case Ao.JoinRequest:case Ao.InviteRequest:case Ao.MemberJoined:case Ao.MemberRoleChange:case Ao.MemberLeft:case Ao.DonateRequest:e.push(i.params.userId);break;case Ao.DonatedItem:const r=i.params;e.push(r.senderId,r.receiverId)}}),NP(e)}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})();class iat{createNotificationFromDTO(n,o,e){let i=new x8(n);switch(i.clubId=e,n.type){case Ao.JoinRequest:case Ao.InviteRequest:const r=n.params;i.params={...r,sender:o.find(b=>b.id===r.userId)};break;case Ao.MemberJoined:const s=n.params;i.params={...s,user:o.find(b=>b.id===s.userId)};break;case Ao.MemberRoleChange:const a=n.params;i.params={...a,user:o.find(b=>b.id===a.userId)};break;case Ao.MemberLeft:const c=n.params;i.params={...c,user:o.find(b=>b.id===c.userId)};break;case Ao.DonateRequest:const u=n.params;i.params={...u,user:o.find(b=>b.id===u.userId)};break;case Ao.DonatedItem:const h=n.params;i.params={...h,sender:o.find(b=>b.id===h.senderId),receiver:o.find(b=>b.id===h.receiverId)};break;case Ao.LevelUp:break;default:console.warn("Couldn't find",n,"type")}return i}}let qc=(()=>{let t=class{constructor(o){this.actions={send:{inProgress:!1},cancel:{inProgress:!1},accept:{inProgress:!1},reject:{inProgress:!1}},wr(this,o)}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),oat=(()=>{let t=class{constructor(o){this.role=qo.Member,this.info={profile:new Lo,onlineStatus:new xm},this.createdAt=Bn.instance.getServerTimeS(),this.actions={sendFriendRequest:{inProgress:!1},kick:{inProgress:!1},editRole:{inProgress:!1}},wr(this,o)}static sortCollectionByRole(o,e=c0.ESort.Desc){return Zf(o,["role"],[e===c0.ESort.Desc?c0.ESort.Asc:c0.ESort.Desc])}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),mL=(()=>{let t=class{constructor(o){this.id="",this.name="",this.level=1,this.avatar=(new aVe).toJSON(),this.description="",this.location="",this.createdAt=Bn.instance.getServerTimeS(),this.settings=(new lVe).toJSON(),this.lastModified=0,wr(this,o)}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})();var Sg=function(t){return t[t.JoinRequestProcess=0]="JoinRequestProcess",t[t.KickedFromClub=1]="KickedFromClub",t[t.ClubDisband=2]="ClubDisband",t[t.MemberRoleUpdate=3]="MemberRoleUpdate",t[t.ClubEdit=4]="ClubEdit",t[t.LevelUp=5]="LevelUp",t[t.ClubJoin=6]="ClubJoin",t[t.InventoryUpdate=7]="InventoryUpdate",t}(Sg||{});let ru=(()=>{var t;let n=((t=class{constructor(e,i,r,s,a,c,u){var h=this;this.notificationFactory=new iat,this.listeners=new is.List,this.clubChannelListeners=new is.List,this.onConnectionRestored=()=>{this.store.dispatch(nat())},this.onClubChannelConnectionRestored=()=>{this.store.dispatch(O8())},this.onClubChannelDisconnect=()=>{this.store.dispatch(Nge())},this.onClubStateUpdate=b=>{var w,R,G;switch(b.reason){case Sg.KickedFromClub:this.store.dispatch(Vge());break;case Sg.ClubDisband:this.store.dispatch(zge());break;case Sg.JoinRequestProcess:if((null===(w=b.joinRequest)||void 0===w?void 0:w.status)===Di.Accepted){const le=this.store.selectUserState().profile,me=new qc({...b.joinRequest,userId:le.id,sender:le});this.store.dispatch(hv({currentClub:{clubProfile:b.clubProfile,role:b.role},currentJoinRequest:me,inventory:b.inventory}))}else(null===(R=b.joinRequest)||void 0===R?void 0:R.status)===Di.ClubRejected&&this.store.dispatch(hv({currentJoinRequest:void 0}));break;case Sg.MemberRoleUpdate:this.store.dispatch(hv({currentClub:{role:b.role}}));const K=this.store.clubs.selectClubProfile();this.permissions.getClubActionPermission(K,nt.EModuleAction.AcceptClubJoinRequest).isPermitted||this.store.dispatch(E8({update:void 0}));break;case Sg.ClubEdit:this.store.dispatch(hv({currentClub:{clubProfile:b.clubProfile}}));break;case Sg.ClubJoin:let ee;if((null===(G=b.joinRequest)||void 0===G?void 0:G.status)===Di.PendingClubAccept){const le=this.store.selectUserState().profile;ee=new qc({...b.joinRequest,userId:le.id,sender:le})}this.store.dispatch(hv({currentClub:{clubProfile:b.clubProfile,role:b.role},currentJoinRequest:ee,inventory:b.inventory}));break;case Sg.InventoryUpdate:this.store.dispatch(hv({inventory:b.inventory}));break;default:console.warn("No handler for club state update with reason",Ys.parse(Sg,b.reason))}},this.onNewFeedItem=function(){var b=f(function*(w){try{const R=yield h.userRepository.getSimpleProfiles(x8.getUserIds(w)),G=h.store.clubs.selectCurrentClubState();if(!G)return;const K=h.notificationFactory.createNotificationFromDTO(w,R,G.clubProfile.id);h.store.dispatch(y8({item:K}))}catch(R){const G=jt.createErrorInstance(R);console.warn(G)}});return function(w){return b.apply(this,arguments)}}(),this.onPendingRequestsUpdate=b=>{this.store.dispatch(E8({update:b}))},this.onJoinRequestUpdate=b=>{this.store.dispatch(M8(b))},this.connectAndSynchronizeClubFeed=f(function*(){const b=h.store.clubs.selectCurrentClub();if(!b.feed.synchronizeState.isSynchronizing)try{h.store.dispatch(Fge()),yield h.subscribeToCurrentClubFeedChannel();const w=pv.createFeedFirstPageQuery(b.clubState.clubProfile.id);yield h.getClubFeed({...b.feed.query,clubId:b.clubState.clubProfile.id,offset:w.offset,limit:w.limit}),h.store.dispatch(Uge())}catch(w){throw h.store.dispatch(Gge({error:w})),w}}),this.clubsClient=e,this.store=i,this.userRepository=r,this.fieldValidatorFactory=s,this.permissions=a,this.userFactory=c,this.clubUtils=u}initialize(){var e;this.syncCurrentClubState(null===(e=this.store.selectUserState().club)||void 0===e?void 0:e.userClubState),this.listeners.add(this.clubsClient.onConnectionRestored(this.onConnectionRestored)),this.listeners.add(this.clubsClient.onClubStateUpdate(this.onClubStateUpdate)),this.listeners.add(this.clubsClient.onPendingRequestsUpdate(this.onPendingRequestsUpdate)),this.listeners.add(this.clubsClient.onJoinRequestUpdate(this.onJoinRequestUpdate))}subscribeToCurrentClubFeedChannel(){var e=this;return f(function*(){const i=e.store.clubs.selectCurrentClubState();if(i)try{yield e.clubsClient.connectToClubFeedChannel(i.clubProfile.id),e.clubChannelListeners.length||(e.clubChannelListeners.add(e.clubsClient.onNewFeedItem(e.onNewFeedItem)),e.clubChannelListeners.add(e.clubsClient.onClubNspDisconnect(e.onClubChannelDisconnect)),e.clubChannelListeners.add(e.clubsClient.onClubNspConnectionRestored(e.onClubChannelConnectionRestored)))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),s}})()}disconnectAndClearClubFeed(){this.disconnectFromClubChannel(),this.store.dispatch(Hge())}getCurrentClubDetails(e={}){var i=this;return f(function*(){const r=i.store.clubs.selectCurrentClubState();if(r)try{if(e.useCache){const s=i.store.clubs.selectCurrentClubDetails();if(s.clubProfile&&s.loadingState.isLoaded&&s.synchronizeState.isSynced)return{clubProfile:s.clubProfile,clubMembers:i.store.clubs.selectMembersList(),clubInventory:s.clubInventory,clubXp:s.clubXp,myRequest:s.myRequest}}return i.store.dispatch(Zfe()),i.requestClubDetails(r.clubProfile.id)}catch(s){const a=jt.createErrorInstance(s);throw console.warn(a),i.store.dispatch(S8(a)),a}else console.warn("User has no club")})()}getClubDetails(e){var i=this;return f(function*(){return i.store.clubs.selectClubProfileId()===e?i.getCurrentClubDetails():i.requestClubDetails(e)})()}getList(e){return this.clubsClient.getList(e).then(i=>i.clubs).catch(i=>{throw jt.createErrorInstance(i)})}getClubProfile(e){var i=this;return f(function*(){var r;const s=null===(r=i.store.clubs.selectCurrentClubState())||void 0===r?void 0:r.clubProfile;return s&&e===s.id?MP({clubProfile:s,inventory:i.store.clubs.selectCurrentClub().inventory}):(yield i.getClubsProfiles({clubsIds:[e]})).clubs[0]})()}getClubsProfiles(e){return this.clubsClient.getClubsProfiles(e)}getClubFeed(e){var i=this;return f(function*(){try{var r;e.useCache=null===(r=e.useCache)||void 0===r||r;const s=i.store.clubs.selectFeedState(),a=pv.createFeedQueryHash(e);if(s.queryFiltersHash===a&&e.useCache&&s.loadingState.isLoaded&&s.synchronizeState.isSynced){const w=i.store.clubs.selectFeedListByQuery(e);if(w.length>=e.limit||s.meta.isLastPage)return{items:w,currentDonationRequest:s.currentDonationRequest,users:[]}}i.store.dispatch(Yfe({query:e}));const c=yield i.clubsClient.getClubFeed(e),u=x8.getUserIds(...c.items).map(w=>{var R;return i.userFactory.createFallbackSimpleProfile({id:w,...null===(R=c.users.find(G=>G.profile.id===w))||void 0===R?void 0:R.profile})}),h=c.items.map(w=>i.notificationFactory.createNotificationFromDTO(w,u,e.clubId)),b=c.currentDonationRequest?i.notificationFactory.createNotificationFromDTO(c.currentDonationRequest,u,e.clubId):void 0;return i.store.dispatch(Jfe({query:e,list:h,currentDonationRequest:b})),{items:h,currentDonationRequest:b,users:c.users}}catch(s){const a=jt.createErrorInstance(s);throw console.warn(a),i.handleCommonErrors(a),i.store.dispatch(Xfe(a)),a}})()}createClub(e){var i=this;return f(function*(){if(!i.fieldValidatorFactory.createClubNameValidator().isValid(e.name))throw new GU;const r=i.clubUtils.calculateCreatePrice(e.privacy);if(r.amount){if(r.currency===ln.Chips&&i.store.selectWallet().chips<r.amount)throw new et.NotEnoughMinerals(r.amount);if(r.currency===ln.Gems&&i.store.selectWallet().gems<r.amount)throw new et.NotEnoughGems(r.amount)}try{i.store.dispatch(ege({club:e}));const s=yield i.clubsClient.createClub(e);return i.store.dispatch(tge({result:s})),s}catch(s){const a=jt.createErrorInstance(s);throw console.warn(a),i.handleCommonErrors(a),i.store.dispatch(nge(a)),a}})()}editClubInfo(e){var i=this;return f(function*(){try{i.store.dispatch(ige()),yield i.clubsClient.editClubInfo(e),i.store.dispatch(oge({args:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.handleCommonErrors(s),i.store.dispatch(rge(s)),s}})()}leaveClub(e){var i=this;return f(function*(){try{i.store.dispatch(age()),yield i.clubsClient.leaveClub(e),e.disband&&i.store.dispatch(sge({clubId:e.clubId})),i.store.dispatch(w8())}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.handleCommonErrors(s),i.store.dispatch(cge(s)),s}})()}sendClubJoinRequest(e){var i=this;return f(function*(){const r=(0,ie.uuidV4)();try{var s,a;const c=new qc({id:r,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:i.store.selectUserState().profile.id,message:e.message,status:Di.PendingClubAccept});i.store.dispatch(lge({request:c,tempId:r}));const u=yield i.clubsClient.sendClubJoinRequest(e);return i.store.dispatch(pL({tempId:r,result:{clubProfile:null!==(s=u.currentClub)&&void 0!==s&&s.clubProfile?new mL(u.currentClub.clubProfile):void 0,role:null===(a=u.currentClub)||void 0===a?void 0:a.role,joinRequest:u.currentJoinRequest?new qc(u.currentJoinRequest):void 0,inventory:u.clubInventory}})),i.store.dispatch(yg({requestId:r})),u}catch(c){const u=jt.createErrorInstance(c);throw console.warn(u),i.handleCommonErrors(u),i.store.dispatch(uge({error:u,tempId:r})),i.store.dispatch(yg({requestId:r})),u}})()}sendClubInviteToUser(e){var i=this;return f(function*(){const r=(0,ie.uuidV4)();try{var s;const a=new qc({id:r,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:e.userId,status:Di.PendingUserAccept});i.store.dispatch(Mge({request:a,tempId:r}));const c=yield i.clubsClient.sendClubInviteToUser(e),u=c.joinRequest?new qc(c.joinRequest):void 0;return i.store.dispatch(P8({result:{joinRequest:u},tempId:r})),i.store.dispatch(P0({requestId:null!==(s=null==u?void 0:u.id)&&void 0!==s?s:r})),c}catch(a){const c=jt.createErrorInstance(a);throw console.warn(a),i.store.dispatch(Oge({error:a,tempId:r})),i.store.dispatch(P0({requestId:r})),i.handleCommonErrors(c),c}})()}acceptJoinRequest(e){var i=this;return f(function*(){try{var r,s;const a=new qc({id:e.requestId,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:e.userId,status:Di.PendingClubAccept});i.store.dispatch(dge({request:a}));const c=yield i.clubsClient.processJoinRequest({requestId:e.requestId,newStatus:Di.Accepted},e.clubId);return i.store.dispatch(T8({requestId:e.requestId,result:{clubProfile:null!==(r=c.club)&&void 0!==r&&r.clubProfile?new mL(c.club.clubProfile):void 0,role:null===(s=c.club)||void 0===s?void 0:s.role,joinRequest:new qc(c.joinRequest),inventory:c.clubInventory}})),c}catch(a){const c=jt.createErrorInstance(a);throw console.warn(c),i.handleCommonErrors(c),i.store.dispatch(pge({requestId:e.requestId,error:c})),c}finally{i.store.dispatch(P0({requestId:e.requestId}))}})()}rejectJoinRequest(e){var i=this;return f(function*(){try{const r=new qc({id:e.requestId,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:e.userId,status:Di.PendingClubAccept});i.store.dispatch(hge({request:r}));const s=yield i.clubsClient.processJoinRequest({requestId:e.requestId,newStatus:Di.ClubRejected},e.clubId);return i.store.dispatch(mge({requestId:e.requestId,result:{joinRequest:new qc(s.joinRequest)}})),s}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.handleCommonErrors(s),i.store.dispatch(fge({requestId:e.requestId,error:s})),s}finally{i.store.dispatch(P0({requestId:e.requestId}))}})()}cancelJoinRequest(e){var i=this;return f(function*(){try{const s=new qc({id:e.requestId,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:i.store.selectUserState().profile.id,status:Di.PendingClubAccept});i.store.dispatch(gge({request:s})),yield i.clubsClient.cancelJoinRequest(e,e.clubId),i.store.dispatch(_ge({requestId:e.requestId,result:{joinRequest:void 0}})),i.store.dispatch(yg({requestId:e.requestId}))}catch(s){var r;const a=jt.createErrorInstance(s);throw console.warn(a),i.handleCommonErrors(a),i.store.dispatch(vge({request:e,error:a})),i.store.dispatch(yg({requestId:e.requestId})),a instanceof Sh&&(null===(r=i.store.clubs.selectCurrentJoinRequest())||void 0===r?void 0:r.id)===e.requestId&&a.joinRequestStatus!==Di.PendingClubAccept&&i.store.dispatch(hv({currentJoinRequest:void 0})),a}})()}cancelClubInviteRequest(e){var i=this;return f(function*(){try{const r=new qc({id:e.requestId,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:e.userId,status:Di.PendingUserAccept});i.store.dispatch(Tge({request:r}));const s=yield i.clubsClient.cancelClubInviteRequest(e,e.clubId);i.store.dispatch(Pge({requestId:e.requestId,result:{joinRequest:s.joinRequest?new qc(s.joinRequest):void 0}}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.handleCommonErrors(s),i.store.dispatch(Ige({requestId:e.requestId,error:s})),s}finally{i.store.dispatch(P0({requestId:e.requestId}))}})()}acceptClubInviteRequest(e){var i=this;return f(function*(){try{var r,s;i.store.dispatch(bge({request:new qc({id:e.requestId,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:i.store.selectUserState().profile.id,status:Di.PendingUserAccept})}));const a=yield i.clubsClient.processJoinRequest({requestId:e.requestId,newStatus:Di.Accepted},e.clubId);i.store.dispatch(hL({requestId:e.requestId,result:{clubProfile:null!==(r=a.club)&&void 0!==r&&r.clubProfile?new mL(a.club.clubProfile):void 0,role:null===(s=a.club)||void 0===s?void 0:s.role,joinRequest:new qc(a.joinRequest),inventory:a.clubInventory}})),i.store.dispatch(yg({requestId:e.requestId}))}catch(a){const c=jt.createErrorInstance(a);throw console.warn(c),i.handleCommonErrors(c),i.store.dispatch(Cge({args:e,error:c})),i.store.dispatch(yg({requestId:e.requestId})),c}})()}rejectClubInviteRequest(e){var i=this;return f(function*(){try{var r,s;const a=new qc({id:e.requestId,clubId:e.clubId,createdAt:Bn.instance.getServerTimeS(),sender:i.store.selectUserState().profile,userId:i.store.selectUserState().profile.id,status:Di.PendingClubAccept});i.store.dispatch(yge({request:a}));const c=yield i.clubsClient.processJoinRequest({requestId:e.requestId,newStatus:Di.UserRejected},e.clubId);i.store.dispatch(Sge({requestId:e.requestId,result:{clubProfile:null!==(r=c.club)&&void 0!==r&&r.clubProfile?new mL(c.club.clubProfile):void 0,role:null===(s=c.club)||void 0===s?void 0:s.role,joinRequest:new qc(c.joinRequest),inventory:c.clubInventory}})),i.store.dispatch(yg({requestId:e.requestId}))}catch(a){const c=jt.createErrorInstance(a);throw console.warn(c),i.handleCommonErrors(c),i.store.dispatch(wge({args:e,error:c})),i.store.dispatch(yg({requestId:e.requestId})),c}})()}kickMember(e){var i=this;return f(function*(){try{i.store.dispatch(Ege({args:e})),yield i.clubsClient.kickMember(e),i.store.dispatch(I8({args:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.handleCommonErrors(s),i.store.dispatch(xge({args:e,error:s})),s}})()}editMemberRole(e){var i=this;return f(function*(){try{i.store.dispatch(Age({userId:e.userId,newRole:e.newRole})),yield i.clubsClient.editMemberRole(e),i.store.dispatch(Rge({userId:e.userId,newRole:e.newRole}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.handleCommonErrors(s),i.store.dispatch(kge({userId:e.userId,error:s})),s}})()}requestDonation(e){var i=this;return f(function*(){try{i.store.dispatch(Lge({args:e})),yield i.clubsClient.requestDonation(e),i.store.dispatch(Dge({args:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.handleCommonErrors(s),i.store.dispatch(Bge({args:e,error:s})),s}})()}dispose(){this.disconnectFromClubChannel(),this.listeners.forEach(e=>e.detach()),this.listeners=new is.List,this.store.dispatch($fe())}disconnectFromClubChannel(){this.clubsClient.disconnectFromClubFeedChannel(),this.clubChannelListeners.forEach(e=>e.detach()),this.clubChannelListeners=new is.List,this.stopTryToSynchronizeFeedCycle()}requestClubDetails(e){var i=this;return f(function*(){try{var r,s,a;const c=yield i.clubsClient.getClubDetails(e),u=c.clubMembers.map(R=>{var G;return new oat({...R,info:null!==(G=c.users.find(K=>K.profile.id===R.userId))&&void 0!==G?G:i.userFactory.createProfileWithOnlineStatus({profile:i.userFactory.createFallbackSimpleProfile({id:R.userId})})})}),h={clubProfile:c.clubProfile,clubMembers:Zf(u,[R=>{var G;return!(null===(G=R.info)||void 0===G||null===(G=G.onlineStatus)||void 0===G||!G.isOnline)},R=>R.role],[ie.ESort.Desc,ie.ESort.Asc]),clubXp:c.clubXp,clubInventory:c.clubInventory,myRequest:new qc({id:null===(r=c.myRequest)||void 0===r?void 0:r.id,clubId:e,createdAt:Bn.instance.getServerTimeS(),userId:null===(s=c.myRequest)||void 0===s?void 0:s.id,status:null===(a=c.myRequest)||void 0===a?void 0:a.status})},b=i.store.clubs.selectClubProfileId(),w=i.store.selectUserState().profile;return(h.clubProfile.id===b||u.find(R=>R.userId===w.id))&&i.store.dispatch(Qfe({result:h})),h}catch(c){const u=jt.createErrorInstance(c);console.warn(u);const h=i.store.clubs.selectClubProfileId();throw e===h&&i.store.dispatch(S8(u)),u}})()}startTryToSynchronizeFeedCycle(){var e=this;this.stopTryToSynchronizeFeedCycle(),this.feedRetryIntervalId=setInterval(f(function*(){try{yield e.connectAndSynchronizeClubFeed(),e.stopTryToSynchronizeFeedCycle()}catch(i){console.warn(i)}}),1e3*(0,ie.randomInt)(30,60))}stopTryToSynchronizeFeedCycle(){clearInterval(this.feedRetryIntervalId)}handleCommonErrors(e){var i=this;return f(function*(){if(e instanceof $f||e instanceof XS||e instanceof hb){if((e instanceof $f||e instanceof XS)&&e.userId!==i.store.selectUserState().profile.id)return;e instanceof $f&&i.store.dispatch(jge()),i.syncCurrentClubState(e.clubState)}})()}syncCurrentClubState(e){const i=this.store.selectUserState();this.store.dispatch(Kfe({currentUserId:i.profile.id,clubState:e?{clubProfile:e.clubProfile,role:e.role}:void 0,currentJoinRequest:null!=e&&e.currentJoinRequest?new qc({...e.currentJoinRequest,userId:i.profile.id,sender:i.profile}):void 0,inventory:null==e?void 0:e.inventory,pendingJoinRequests:null==e?void 0:e.joinRequestsCounter}))}}).\u0275fac=function(e){return new(e||t)(T(dL),T(J),T(ed),T(wa),T(Ti),T(Xu),T(pv))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[dL,J,ed,wa,Ti,Xu,pv])],n),n})(),qge=(()=>{var t;let n=((t=class{constructor(e,i,r,s){this.subs=new is.List,this.onAcceptClubInviteRequestSuccess=a=>{var c;a.result.clubProfile&&(null===(c=this.notifications)||void 0===c||c.showNotification(new pC.ClubJoinSuccess({club:a.result.clubProfile,inventory:a.result.inventory})))},this.onSendJoinRequestSuccess=a=>{!a.result.clubProfile||a.result.clubProfile.settings.privacy!==Or.Public||!this.notifications||this.notifications.showNotification(new pC.ClubJoinSuccess({club:a.result.clubProfile,inventory:a.result.inventory}))},this.store=e,this.clubsService=i,this.actions=r,this.notifications=s}init(){this.addListeners()}dispose(){this.removeListeners()}addListeners(){this.subs.add(this.actions.pipe(ai(hL)).subscribe(this.onAcceptClubInviteRequestSuccess)),this.subs.add(this.actions.pipe(ai(pL)).subscribe(this.onSendJoinRequestSuccess))}removeListeners(){this.subs.forEach(e=>e.unsubscribe())}}).\u0275fac=function(e){return new(e||t)(T(J),T(ru),T(yr),T(ja,8))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"init",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[J,ru,yr,ja])],n),n})();var A8=function(t){return t.featureKey="clubs",t}(A8||{});const Rl=ki({selectId:t=>t.id,sortComparer:(t,n)=>n.createdAt-t.createdAt}),Wh=ki({selectId:t=>t.id,sortComparer:!1}),Eu=ki({selectId:t=>t.id,sortComparer:!1}),uM=ki({selectId:t=>t.item.id,sortComparer:!1}),xu=ki({selectId:t=>t.id,sortComparer:!1}),Wge={currentUserId:void 0,currentClub:R8(),currentJoinRequest:void 0,inflightJoinRequests:xu.getInitialState()},rat=Sr(Wge,de($fe,()=>Wge),de(Kfe,(t,n)=>Se(t,o=>{o.currentUserId=n.currentUserId,o.currentClub.clubState=n.clubState,o.currentClub.inventory=n.inventory,o.currentJoinRequest=n.currentJoinRequest,o.currentClub.pendingJoinRequests=n.pendingJoinRequests})),de(Zfe,t=>Se(t,n=>{n.currentClub.details.loadingState.isLoading=!0})),de(Qfe,(t,n)=>Se(t,o=>{var e,i;o.currentClub.details.loadingState.isLoading=!1,o.currentClub.details.loadingState.isLoaded=!0,o.currentClub.details.clubProfile=n.result.clubProfile,o.currentClub.details.clubXp=n.result.clubXp,o.currentClub.details.clubMembers=Wh.setAll(n.result.clubMembers,t.currentClub.details.clubMembers),o.currentClub.clubState={...t.currentClub.clubState,clubProfile:n.result.clubProfile,role:null===(e=n.result.clubMembers.find(r=>r.userId===t.currentUserId))||void 0===e?void 0:e.role},(null===(i=t.currentJoinRequest)||void 0===i?void 0:i.clubId)===n.result.clubProfile.id&&(o.currentJoinRequest=void 0)})),de(S8,(t,n)=>t.currentClub.details.clubProfile?Se(t,o=>{var e,i;o.currentClub.details.loadingState.isLoading=!1,o.currentClub.details.loadingState.error=n,n.name===gA.ClubNotFoundError&&((null===(e=t.currentJoinRequest)||void 0===e?void 0:e.clubId)===(null===(i=t.currentClub.clubState)||void 0===i||null===(i=i.clubProfile)||void 0===i?void 0:i.id)&&(o.currentJoinRequest=void 0),o.currentClub=R8())}):t),de(y8,(t,n)=>Se(t,o=>{o.currentClub.feed.items=Rl.upsertOne(n.item,t.currentClub.feed.items)})),de(Yfe,(t,n)=>Se(t,o=>{n.query.offset?o.currentClub.feed.loadingState.isLoadingNext=!0:o.currentClub.feed.loadingState.isLoading=!0,o.currentClub.feed.synchronizeState.isSynced||(o.currentClub.feed.synchronizeState.isSynchronizing=!0)})),de(Jfe,(t,n)=>Se(t,o=>{o.currentClub.feed.currentDonationRequest=n.currentDonationRequest,o.currentClub.feed.loadingState={...t.currentClub.feed.loadingState,isLoading:!1,isLoadingNext:!1,isLoaded:!0,error:void 0};const e=pv.createFeedQueryHash(n.query);o.currentClub.feed.items=o.currentClub.feed.synchronizeState.isSynced&&o.currentClub.feed.queryFiltersHash===e?Rl.upsertMany(n.list,t.currentClub.feed.items):Rl.setAll(n.list,t.currentClub.feed.items),o.currentClub.feed.synchronizeState.isSynchronizing&&(o.currentClub.feed.synchronizeState.isSynced=!0,o.currentClub.feed.synchronizeState.isSynchronizing=!1),o.currentClub.feed.query=n.query,o.currentClub.feed.queryFiltersHash=e,o.currentClub.feed.meta.isLastPage=n.list.length<n.query.limit})),de(Xfe,(t,n)=>Se(t,o=>{o.currentClub.feed.loadingState.isLoading=!1,o.currentClub.feed.loadingState.error=n})),de(ege,t=>Se(t,n=>{n.currentClub.actions.create.inProgress=!0})),de(tge,(t,n)=>Se(t,o=>{o.currentClub.clubState=n.result.currentClub,o.currentClub.inventory=n.result.clubInventory,o.currentClub.actions.create.inProgress=!1})),de(nge,t=>Se(t,n=>{n.currentClub.actions.create.inProgress=!1})),de(ige,t=>Se(t,n=>{n.currentClub.actions.edit.inProgress=!0})),de(oge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.actions.edit.inProgress=!1,$ge(e.currentClub.clubState.clubProfile,n.args),$ge(e.currentClub.details.clubProfile,n.args)}):t}),de(rge,t=>t.currentClub.details.clubProfile?Se(t,n=>{n.currentClub.actions.edit.inProgress=!1}):t),de(Vge,zge,jge,w8,t=>{var n,o;return{...t,currentClub:R8(),currentJoinRequest:(null===(n=t.currentJoinRequest)||void 0===n?void 0:n.clubId)===(null===(o=t.currentClub.clubState)||void 0===o||null===(o=o.clubProfile)||void 0===o?void 0:o.id)?void 0:t.currentJoinRequest}}),de(age,t=>Se(t,n=>{n.currentClub.actions.leave.inProgress=!0})),de(cge,t=>Se(t,n=>{n.currentClub.actions.leave.inProgress=!1})),de(Ege,(t,n)=>{if(!t.currentClub.details.clubProfile)return t;const o=AC(n.args.userId,t.currentClub.details.clubMembers);return o?Se(t,e=>{e.currentClub.details.clubMembers=Wh.updateOne({id:o.id,changes:{actions:{...o.actions,kick:{inProgress:!0}}}},t.currentClub.details.clubMembers)}):t}),de(I8,(t,n)=>{if(!t.currentClub.details.clubProfile)return t;const o=AC(n.args.userId,t.currentClub.details.clubMembers);return o?Se(t,e=>{e.currentClub.details.clubMembers=Wh.removeOne(o.id,t.currentClub.details.clubMembers)}):t}),de(xge,(t,n)=>{if(!t.currentClub.details.clubProfile)return t;const o=AC(n.args.userId,t.currentClub.details.clubMembers);return o?Se(t,e=>{e.currentClub.details.clubMembers=Wh.updateOne({id:o.id,changes:{actions:{...o.actions,kick:{inProgress:!1}}}},t.currentClub.details.clubMembers)}):t}),de(Age,(t,n)=>{if(!t.currentClub.details.clubProfile)return t;const o=AC(n.userId,t.currentClub.details.clubMembers);return o?Se(t,e=>{e.currentClub.details.clubMembers=Wh.updateOne({id:o.id,changes:{actions:{...o.actions,editRole:{inProgress:!0}}}},t.currentClub.details.clubMembers)}):t}),de(Rge,(t,n)=>{if(!t.currentClub.details.clubProfile)return t;const o=AC(n.userId,t.currentClub.details.clubMembers);return o?Se(t,e=>{e.currentClub.details.clubMembers=Wh.updateOne({id:o.id,changes:{role:n.newRole,actions:{...o.actions,editRole:{inProgress:!1}}}},t.currentClub.details.clubMembers)}):t}),de(kge,(t,n)=>{if(!t.currentClub.details.clubProfile)return t;const o=AC(n.userId,t.currentClub.details.clubMembers);return o?Se(t,e=>{e.currentClub.details.clubMembers=Wh.updateOne({id:o.id,changes:{role:n.error instanceof VU?n.error.currentRole:o.role,actions:{...o.actions,editRole:{inProgress:!1}}}},t.currentClub.details.clubMembers)}):t}),de(lge,(t,n)=>Se(t,o=>{o.currentJoinRequest||(o.currentJoinRequest={...n.request,actions:{...n.request.actions,send:{inProgress:!0}}}),o.inflightJoinRequests=xu.upsertOne({...n.request,actions:{...n.request.actions,send:{inProgress:!0}}},t.inflightJoinRequests)})),de(pL,(t,n)=>Se(t,o=>{o.currentClub.clubState=n.result.clubProfile?{clubProfile:n.result.clubProfile,role:n.result.role}:void 0,o.currentClub.inventory=n.result.inventory,o.currentJoinRequest=n.result.joinRequest?{...o.currentJoinRequest,...n.result.joinRequest,actions:{...n.result.joinRequest.actions,send:{inProgress:!1}}}:void 0,o.inflightJoinRequests=xu.updateOne({id:n.tempId,changes:{result:n.result}},t.inflightJoinRequests)})),de(uge,(t,n)=>Se(t,o=>{var e;o.currentJoinRequest=(null===(e=t.currentJoinRequest)||void 0===e?void 0:e.id)===n.tempId?void 0:t.currentJoinRequest,o.inflightJoinRequests=xu.removeOne(n.tempId,t.inflightJoinRequests)})),de(gge,(t,n)=>Se(t,o=>{var e;(null===(e=o.currentJoinRequest)||void 0===e?void 0:e.id)===n.request.id&&(o.currentJoinRequest.actions.cancel.inProgress=!0),o.inflightJoinRequests=xu.upsertOne({...n.request,actions:{...n.request.actions,cancel:{inProgress:!0}}},t.inflightJoinRequests)})),de(_ge,(t,n)=>Se(t,o=>{var e;o.currentJoinRequest=(null===(e=t.currentJoinRequest)||void 0===e?void 0:e.id)===n.requestId?void 0:t.currentJoinRequest,o.inflightJoinRequests=xu.updateOne({id:n.requestId,changes:{...n.result.joinRequest,result:n.result}},t.inflightJoinRequests)})),de(vge,(t,n)=>Se(t,o=>{var e;(null===(e=o.currentJoinRequest)||void 0===e?void 0:e.id)===n.request.requestId&&(o.currentJoinRequest.actions.cancel.inProgress=!1),o.inflightJoinRequests=xu.removeOne(n.request.requestId,t.inflightJoinRequests)})),de(bge,(t,n)=>Se(t,o=>{o.inflightJoinRequests=xu.upsertOne({...n.request,actions:{...n.request.actions,accept:{inProgress:!0}}},t.inflightJoinRequests)})),de(hL,(t,n)=>Se(t,o=>{o.currentClub.clubState=n.result.clubProfile?{clubProfile:n.result.clubProfile,role:n.result.role}:void 0,o.currentClub.inventory=n.result.inventory,o.inflightJoinRequests=xu.updateOne({id:n.requestId,changes:{actions:n.result.joinRequest.actions,result:n.result}},t.inflightJoinRequests)})),de(Cge,(t,n)=>Se(t,o=>{o.inflightJoinRequests=xu.removeOne(n.args.requestId,t.inflightJoinRequests)})),de(yge,(t,n)=>Se(t,o=>{o.inflightJoinRequests=xu.upsertOne({...n.request,actions:{...n.request.actions,reject:{inProgress:!0}}},t.inflightJoinRequests)})),de(Sge,(t,n)=>Se(t,o=>{o.inflightJoinRequests=xu.updateOne({id:n.requestId,changes:{actions:n.result.joinRequest.actions,result:n.result}},t.inflightJoinRequests)})),de(wge,(t,n)=>Se(t,o=>{o.inflightJoinRequests=xu.removeOne(n.args.requestId,t.inflightJoinRequests)})),de(dge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.upsertOne({...n.request,actions:{...n.request.actions,accept:{inProgress:!0}}},t.currentClub.joinRequests);const i=wg(n.request.id,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{actions:{...i.actions,accept:{inProgress:!0}}}},t.currentClub.feed.items))}):t}),de(T8,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.updateOne({id:n.requestId,changes:{actions:n.result.joinRequest.actions,result:n.result}},t.currentClub.joinRequests);const i=wg(n.requestId,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{params:{...i.params,requestStatus:n.result.joinRequest?n.result.joinRequest.status:i.params.requestStatus},actions:{...i.actions,accept:{inProgress:!1}}}},t.currentClub.feed.items))}):t}),de(pge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.removeOne(n.requestId,t.currentClub.joinRequests);const i=wg(n.requestId,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{actions:{...i.actions,accept:{inProgress:!1}}}},t.currentClub.feed.items))}):t}),de(hge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.upsertOne({...n.request,actions:{...n.request.actions,reject:{inProgress:!0}}},t.currentClub.joinRequests);const i=wg(n.request.id,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{actions:{...i.actions,reject:{inProgress:!0}}}},t.currentClub.feed.items))}):t}),de(mge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.updateOne({id:n.requestId,changes:{actions:n.result.joinRequest.actions,result:n.result}},t.currentClub.joinRequests);const i=wg(n.requestId,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{params:{...i.params,requestStatus:n.result.joinRequest?n.result.joinRequest.status:i.params.requestStatus},actions:{...i.actions,reject:{inProgress:!1}}}},t.currentClub.feed.items))}):t}),de(fge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.removeOne(n.requestId,t.currentClub.joinRequests);const i=wg(n.requestId,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{actions:{...i.actions,reject:{inProgress:!1}}}},t.currentClub.feed.items))}):t}),de(Mge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?{...t,currentClub:{...t.currentClub,joinRequests:Eu.upsertOne({...n.request,actions:{...n.request.actions,send:{inProgress:!0}}},t.currentClub.joinRequests)}}:t}),de(P8,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.updateOne({id:n.tempId,changes:{...n.result.joinRequest,result:n.result}},t.currentClub.joinRequests)}):t}),de(Oge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.removeOne(n.tempId,t.currentClub.joinRequests)}):t}),de(Tge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.upsertOne({...n.request,actions:{...n.request.actions,cancel:{inProgress:!0}}},t.currentClub.joinRequests);const i=wg(n.request.id,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{actions:{...i.actions,cancel:{inProgress:!0}}}},t.currentClub.feed.items))}):t}),de(Pge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.updateOne({id:n.requestId,changes:{...n.result.joinRequest,result:n.result}},t.currentClub.joinRequests);const i=wg(n.requestId,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{params:{...i.params,requestStatus:n.result.joinRequest?n.result.joinRequest.status:void 0},actions:{...i.actions,cancel:{inProgress:!1}}}},t.currentClub.feed.items))}):t}),de(Ige,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.removeOne(n.requestId,t.currentClub.joinRequests);const i=wg(n.requestId,t.currentClub.feed);i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{actions:{...i.actions,cancel:{inProgress:!1}}}},t.currentClub.feed.items))}):t}),de(hv,(t,n)=>Se(t,o=>{var i;if(n.hasOwnProperty("currentClub")&&(o.currentClub.clubState=n.currentClub?wr(o.currentClub.clubState,n.currentClub):void 0,null!==(i=o.currentClub.details)&&void 0!==i&&i.clubMembers)&&n.currentClub.hasOwnProperty("role")){const c=AC(t.currentUserId,t.currentClub.details.clubMembers);c&&(o.currentClub.details.clubMembers=Wh.updateOne({id:c.id,changes:{role:n.currentClub.role}},t.currentClub.details.clubMembers))}n.hasOwnProperty("currentJoinRequest")&&(o.currentJoinRequest=n.currentJoinRequest?wr(o.currentJoinRequest,n.currentJoinRequest):void 0),n.hasOwnProperty("inventory")&&o.currentClub.clubState&&(o.currentClub.inventory=n.inventory?wr(o.currentClub.inventory,n.inventory):void 0)})),de(Nge,t=>Se(t,n=>{n.currentClub.feed.synchronizeState.isSynced=!1,n.currentClub.feed.channelState.isConnected=!1})),de(O8,t=>Se(t,n=>{n.currentClub.feed.channelState.isConnected=!0})),de(Fge,t=>Se(t,n=>{n.currentClub.feed.synchronizeState.isSynchronizing=!0})),de(Uge,t=>Se(t,n=>{n.currentClub.feed.synchronizeState.isSynced=!0,n.currentClub.feed.synchronizeState.isSynchronizing=!1,n.currentClub.feed.synchronizeState.error=void 0})),de(Gge,(t,n)=>Se(t,o=>{o.currentClub.feed.synchronizeState.isSynchronizing=!1,o.currentClub.feed.synchronizeState.error=n.error})),de(P0,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.joinRequests=Eu.removeOne(n.requestId,t.currentClub.joinRequests)}):t}),de(yg,(t,n)=>Se(t,o=>{o.inflightJoinRequests=xu.removeOne(n.requestId,t.inflightJoinRequests)})),de(E8,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.pendingJoinRequests=n.update}):t}),de(Hge,t=>{var n;return null!==(n=t.currentClub.clubState)&&void 0!==n&&n.clubProfile?Se(t,o=>{o.currentClub.feed=Kge()}):t}),de(Lge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.inflightDonationRequests=uM.upsertOne({...n.args,actions:{send:{inProgress:!0}}},t.currentClub.inflightDonationRequests)}):t}),de(Dge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.inflightDonationRequests=uM.removeOne(n.args.item.id,t.currentClub.inflightDonationRequests)}):t}),de(Bge,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{e.currentClub.inflightDonationRequests=uM.removeOne(n.args.item.id,t.currentClub.inflightDonationRequests)}):t}),de(_I,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{const i=e.currentClub.feed.items.entities[n.transaction.correlationId];i&&(e.currentClub.feed.items=Rl.updateOne({id:i.id,changes:{params:{...i.params,isFulfilled:!0}}},t.currentClub.feed.items))}):t}),de(ice,(t,n)=>{var o;return null!==(o=t.currentClub.clubState)&&void 0!==o&&o.clubProfile?Se(t,e=>{var i;const r=e.currentClub.feed.items.entities[null===(i=n.transaction.exchangeData)||void 0===i?void 0:i.donateRequestId];r&&(e.currentClub.feed.items=Rl.updateOne({id:r.id,changes:{params:{...r.params,isFulfilled:!0}}},t.currentClub.feed.items))}):t}));function sat(t,n){return rat(t,n)}function R8(){return{clubState:void 0,details:{clubProfile:void 0,clubXp:void 0,clubMembers:Wh.getInitialState(),loadingState:{isLoaded:!1,isLoading:!1,error:void 0},synchronizeState:{isSynced:!0,isSynchronizing:!1,error:void 0}},feed:Kge(),actions:{create:{inProgress:!1},edit:{inProgress:!1},leave:{inProgress:!1}},inventory:void 0,joinRequests:Eu.getInitialState(),pendingJoinRequests:void 0,inflightDonationRequests:uM.getInitialState()}}function wg(t,n){return function aat(t){return Rl.getSelectors().selectAll(t.items)}(n).find(o=>(o.type===Ao.JoinRequest||o.type===Ao.InviteRequest)&&o.params.requestId===t)}function AC(t,n){return Wh.getSelectors().selectAll(n).find(o=>o.info.profile.id===t)}function $ge(t,n){var o;n.newCustomAvatarImage&&(t.avatar.customAvatar={id:"",isActive:!0,url:n.newCustomAvatarImage}),t.location=n.location,t.description=null!==(o=n.description)&&void 0!==o?o:t.description,t.settings.privacy=n.privacy||t.settings.privacy,t.settings.requirements.minLevel=n.minLevel||t.settings.requirements.minLevel,t.tag=n.tag}function Kge(){return{query:void 0,queryFiltersHash:void 0,currentDonationRequest:void 0,items:Rl.getInitialState(),loadingState:{isLoaded:!1,isLoadingNext:!1,isLoading:!1,error:void 0},meta:{isLastPage:!1},synchronizeState:{isSynced:!0,isSynchronizing:!1,error:void 0},channelState:{isConnected:!1,isConnecting:!0}}}const su=Ts(A8.featureKey),Zge=We(su,t=>t.currentClub.feed),cat=We(su,t=>t.currentClub.feed.items),k8=We(su,t=>t.currentClub),Qge=We(su,t=>t.currentClub.clubState),Yge=We(su,t=>t.currentClub.details),L8=We(su,t=>{var n;return null===(n=t.currentClub)||void 0===n||null===(n=n.clubState)||void 0===n?void 0:n.clubProfile}),Jge=We(L8,t=>null==t?void 0:t.id),Xge=We(su,t=>t.currentClub.details.clubXp),e_e=We(su,t=>t.currentJoinRequest),uat=We(su,t=>t.currentClub.details.clubMembers),dat=We(su,t=>t.currentClub.joinRequests),pat=We(su,t=>t.currentClub.inflightDonationRequests),hat=We(su,t=>t.inflightJoinRequests),t_e=Rl.getSelectors(cat),mat=Wh.getSelectors(uat),fat=Eu.getSelectors(dat),n_e=uM.getSelectors(pat),gat=xu.getSelectors(hat),D8=We(t_e.selectAll,t=>t),i_e=()=>We(D8,(t,n)=>{let o=t;return n.groups&&n.groups.length&&(o=o.filter(e=>null!=n.groups.find(i=>i===e.group))),o.slice(n.offset,n.limit)}),B8=We(mat.selectAll,t=>t),o_e=We(n_e.selectAll,t=>t),r_e=()=>We(n_e.selectEntities,(t,n)=>t[n]),s_e=We(su,B8,(t,n)=>n?n.find(o=>o.userId===t.currentUserId):void 0),a_e=()=>We(fat.selectAll,(t,n)=>t.find(o=>o.userId===n)),c_e=()=>We(gat.selectAll,(t,n)=>t.find(o=>o.clubId===n)),vat=We(k8,t=>t.pendingJoinRequests),l_e=We(vat,t=>null==t?void 0:t.totalPendingJoinRequests);function bat(){return this.selectSync(su)}function Cat(){return this.select(su)}function yat(){return this.selectSync(k8)}function Sat(){return this.select(k8)}function wat(){return this.selectSync(Yge)}function Tat(){return this.select(Yge)}function Pat(){return this.selectSync(Qge)}function Iat(){return this.select(Qge)}function Mat(){return this.selectSync(Zge)}function Oat(){return this.select(Zge)}function Eat(){return this.selectSync(D8)}function xat(){return this.select(D8)}function Aat(t){return this.selectSync(i_e(),t)}function Rat(t){return this.select(i_e(),t)}function kat(t){return this.selectSync(We(t_e.selectEntities,(t,n)=>t[n]),t)}function Lat(){return this.selectSync(B8)}function Dat(){return this.select(B8)}function Bat(){return this.selectSync(L8)}function Nat(){return this.select(L8)}function Fat(){return this.selectSync(Jge)}function Uat(){return this.select(Jge)}function Gat(){return this.selectSync(s_e)}function Vat(){return this.select(s_e)}function zat(){return this.selectSync(Xge)}function jat(){return this.select(Xge)}function Hat(){return this.selectSync(e_e)}function qat(){return this.select(e_e)}function Wat(t){return this.selectSync(We(su,(t,n)=>t.currentJoinRequest&&t.currentJoinRequest.clubId===n?t.currentJoinRequest:void 0),t)}function $at(t){return this.selectSync(a_e(),t)}function Kat(t){return this.select(a_e(),t)}function Zat(t){return this.selectSync(c_e(),t)}function Qat(t){return this.select(c_e(),t)}function Yat(){return this.selectSync(l_e)}function Jat(){return this.select(l_e)}function Xat(){return this.selectSync(o_e)}function ect(){return this.select(o_e)}function tct(t){return this.selectSync(r_e(),t)}function nct(t){return this.select(r_e(),t)}let oct=(()=>{var t;class n{constructor(e){!function ict(){J.prototype.clubs={selectClubsState:bat.bind(J.prototype),subscribeClubsState:Cat.bind(J.prototype),selectCurrentClub:yat.bind(J.prototype),subscribeCurrentClub:Sat.bind(J.prototype),selectCurrentClubDetails:wat.bind(J.prototype),subscribeCurrentClubDetails:Tat.bind(J.prototype),selectCurrentClubState:Pat.bind(J.prototype),subscribeCurrentClubState:Iat.bind(J.prototype),selectFeedState:Mat.bind(J.prototype),subscribeFeedState:Oat.bind(J.prototype),selectFeedList:Eat.bind(J.prototype),subscribeFeedList:xat.bind(J.prototype),selectFeedItem:kat.bind(J.prototype),selectFeedListByQuery:Aat.bind(J.prototype),subscribeFeedListByQuery:Rat.bind(J.prototype),selectMembersList:Lat.bind(J.prototype),subscribeMembersList:Dat.bind(J.prototype),selectClubProfile:Bat.bind(J.prototype),subscribeClubProfile:Nat.bind(J.prototype),selectClubProfileId:Fat.bind(J.prototype),subscribeClubProfileId:Uat.bind(J.prototype),selectMyMemberInfo:Gat.bind(J.prototype),subscribeMyMemberInfo:Vat.bind(J.prototype),selectClubXp:zat.bind(J.prototype),subscribeClubXp:jat.bind(J.prototype),selectCurrentJoinRequest:Hat.bind(J.prototype),subscribeCurrentJoinRequest:qat.bind(J.prototype),selectJoinRequestByClubId:Wat.bind(J.prototype),selectInflightJoinRequestByClubId:Zat.bind(J.prototype),subscribeInflightJoinRequestByClubId:Qat.bind(J.prototype),selectUserClubJoinRequestByUserId:$at.bind(J.prototype),subscribeUserClubJoinRequestByUserId:Kat.bind(J.prototype),selectPendingJoinRequestsCount:Yat.bind(J.prototype),subscribePendingJoinRequestsCount:Jat.bind(J.prototype),selectDonationRequestsList:Xat.bind(J.prototype),subscribeDonationRequestsList:ect.bind(J.prototype),selectDonationRequest:tct.bind(J.prototype),subscribeDonationRequest:nct.bind(J.prototype)}}()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(qge))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[dL,qge],imports:[$r.forFeature(A8.featureKey,sat)]}),n})();var N8=function(t){return t[t.Leave=0]="Leave",t[t.Kick=1]="Kick",t}(N8||{});class u_e extends Error{constructor(n){super(),this.name="ImageSizeExceededError",this.sizeInBytes=n}}class d_e extends Error{constructor(){super(),this.name="ImageFormatNotAllowedError"}}let lf=(()=>{var t;class n{static getMaxSizeInBytes(e){return Lt.CONFIG.core.images[e].maxImageSize}constructor(e){this.http=e}upload(e,i,r){var s=this;return f(function*(){if(!n.isOfAllowedMimeType(e,r))throw new d_e;const a=yield JU.processByImageConfig(e,Lt.CONFIG.platform.baseImgConfig);if(!n.isSizeInBounds(a,r))throw new u_e(n.getMaxSizeInBytes(r));const c=yield a.toBase64();return s.http.post(i,{image:c}).toPromise()})()}static isSizeInBounds(e,i){return e.size<n.getMaxSizeInBytes(i)}static isOfAllowedMimeType(e,i){return!(!e||!e.type)&&-1!==this.allowedMimeTypes.indexOf(e.type)}}return(t=n).allowedMimeTypes=["image/png","image/jpg","image/x-png","image/jpeg","image/gif"],t.\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();File.prototype.toBase64=function rct(){return new Promise(t=>{const n=new FileReader,o=e=>{t(e.target.result),n.removeEventListener("load",o)};n.addEventListener("load",o),n.readAsDataURL(this)})},Blob.prototype.toBase64=function sct(){return new Promise(t=>{const n=new FileReader,o=e=>{t(e.target.result),n.removeEventListener("load",o)};n.addEventListener("load",o),n.readAsDataURL(this)})};let act=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({}),n})();var lc=function(t){return t.ResetGalleryState="Reset Gallery State",t.ResetUserGalleryState="Reset User Gallery State",t.GetGalleryList="Get Gallery List",t.GetGalleryListSuccess="Get Gallery List Success",t.GetGalleryListError="Get Gallery List Error",t.DeletePhoto="Delete Photo",t.DeletePhotoSuccess="Delete Photo Success",t.DeletePhotoError="Delete Photo Error",t.LikePhoto="Like Photo",t.LikePhotoSuccess="Like Photo Success",t.LikePhotoError="Like Photo Error",t.ReportPhoto="Report Photo",t.ReportPhotoSuccess="Report Photo Success",t.ReportPhotoError="Report Photo Error",t.UploadPhoto="Upload Photo",t.UploadPhotoSuccess="Upload Photo Success",t.UploadPhotoError="Upload Photo Error",t.SelectPhotoAsAvatar="Select Photo As Avatar",t.SelectPhotoAsAvatarSuccess="Select Photo As Avatar Success",t.SelectPhotoAsAvatarError="Select Photo As Avatar Error",t}(lc||{});function Tc(t){return"[".concat("Gallery State","] ").concat(t)}const h_e=he(Tc(lc.ResetGalleryState)),m_e=he(Tc(lc.ResetUserGalleryState),{_as:"props",_p:void 0}),f_e=he(Tc(lc.GetGalleryList),{_as:"props",_p:void 0}),g_e=he(Tc(lc.GetGalleryListSuccess),{_as:"props",_p:void 0}),__e=he(Tc(lc.GetGalleryListError),{_as:"props",_p:void 0}),v_e=he(Tc(lc.LikePhoto),{_as:"props",_p:void 0}),b_e=he(Tc(lc.LikePhotoSuccess),{_as:"props",_p:void 0}),C_e=he(Tc(lc.LikePhotoError),{_as:"props",_p:void 0}),y_e=he(Tc(lc.DeletePhoto),{_as:"props",_p:void 0}),S_e=he(Tc(lc.DeletePhotoSuccess),{_as:"props",_p:void 0}),w_e=he(Tc(lc.DeletePhotoError),{_as:"props",_p:void 0}),T_e=he(Tc(lc.ReportPhoto),{_as:"props",_p:void 0}),P_e=he(Tc(lc.ReportPhotoSuccess),{_as:"props",_p:void 0}),I_e=he(Tc(lc.ReportPhotoError),{_as:"props",_p:void 0}),M_e=he(Tc(lc.UploadPhoto),{_as:"props",_p:void 0}),O_e=he(Tc(lc.UploadPhotoSuccess),{_as:"props",_p:void 0}),E_e=he(Tc(lc.UploadPhotoError),{_as:"props",_p:void 0}),x_e=he(Tc(lc.SelectPhotoAsAvatar),{_as:"props",_p:void 0}),A_e=he(Tc(lc.SelectPhotoAsAvatarSuccess),{_as:"props",_p:void 0}),lct=he(Tc(lc.SelectPhotoAsAvatarError),{_as:"props",_p:void 0}),RC=ki({selectId:t=>t.userId,sortComparer:!1}),ul=ki({selectId:t=>t.id,sortComparer:(t,n)=>n.createdAt-t.createdAt}),R_e={currentUserId:void 0,galleries:RC.getInitialState(),photos:ul.getInitialState()},dct=Sr(R_e,de(h_e,()=>R_e),de(m_e,(t,n)=>({...t,galleries:RC.removeOne(n.userId,t.galleries),photos:ul.removeMany(o=>o.userId===n.userId,t.photos)})),de(LA,t=>{const n=t.galleries.entities[t.currentUserId];if(!n)return t;const o={id:n.userId,changes:{loadingState:{...n.loadingState,isFullyLoaded:!1,isSynced:!1}}};return{...t,galleries:RC.updateOne(o,t.galleries)}}),de(cw,(t,n)=>({...t,currentUserId:n.profile.id})),de(f_e,(t,n)=>({...t,galleries:RC.upsertOne({...n.state,loadingState:{...n.state.loadingState,isLoading:!0,isFullyLoaded:!1}},t.galleries)})),de(g_e,(t,n)=>{if(!t.galleries.entities[n.userId])return t;const e={id:n.userId,changes:{loadingState:{isLoading:!1,isLoaded:!0,isFullyLoaded:n.isFullyLoaded,isSynced:!0,error:void 0}}};return{...t,galleries:RC.updateOne(e,t.galleries),photos:ul.upsertMany(n.photos,t.photos)}}),de(__e,(t,n)=>{const o=t.galleries.entities[n.userId];if(!o)return t;const e={id:n.userId,changes:{loadingState:{...o.loadingState,isLoading:!1,error:n.error}}};return{...t,galleries:RC.updateOne(e,t.galleries)}}),de(v_e,(t,n)=>{const o=t.photos.entities[n.photoId];if(!o)return t;const e={id:n.photoId,changes:{actions:{...o.actions,like:{inProgress:!0}}}};return{...t,photos:ul.updateOne(e,t.photos)}}),de(b_e,(t,n)=>{const o=t.photos.entities[n.photoId];if(!o)return t;const e={id:n.photoId,changes:{likes:o.likes+1,isLiked:!0,actions:{...o.actions,like:{inProgress:!1}}}};return{...t,photos:ul.updateOne(e,t.photos)}}),de(C_e,(t,n)=>{const o=t.photos.entities[n.photoId];if(!o)return t;const e={id:n.photoId,changes:{actions:{...o.actions,like:{inProgress:!1}}}};return{...t,photos:ul.updateOne(e,t.photos)}}),de(T_e,(t,n)=>{const o=t.photos.entities[n.photoId];if(!o)return t;const e={id:n.photoId,changes:{actions:{...o.actions,report:{inProgress:!0}}}};return{...t,photos:ul.updateOne(e,t.photos)}}),de(P_e,(t,n)=>{const o=t.photos.entities[n.photoId];if(!o)return t;const e={id:n.photoId,changes:{actions:{...o.actions,report:{inProgress:!1}}}};return{...t,photos:ul.updateOne(e,t.photos)}}),de(I_e,(t,n)=>{const o=t.photos.entities[n.photoId];if(!o)return t;const e={id:n.photoId,changes:{actions:{...o.actions,report:{inProgress:!1}}}};return{...t,photos:ul.updateOne(e,t.photos)}}),de(y_e,(t,n)=>{const o=t.photos.entities[n.photoId];return o?{...t,photos:ul.updateOne({id:n.photoId,changes:{actions:{...o.actions,delete:{inProgress:!0}}}},t.photos)}:t}),de(S_e,(t,n)=>({...t,photos:ul.removeOne(n.photoId,t.photos)})),de(w_e,(t,n)=>{const o=t.photos.entities[n.photoId];return o?{...t,photos:ul.updateOne({id:n.photoId,changes:{actions:{...o.actions,delete:{inProgress:!1}}}},t.photos)}:t}),de(M_e,(t,n)=>({...t,photos:ul.upsertOne({...n.photo,actions:{...n.photo.actions,upload:{inProgress:!0}}},t.photos)})),de(O_e,(t,n)=>({...t,photos:ul.updateOne({id:n.tempId,changes:n.photo},t.photos)})),de(E_e,(t,n)=>({...t,photos:ul.removeOne(n.photoId,t.photos)})),de(x_e,(t,n)=>{const o=t.photos.entities[n.photoId];return o?{...t,photos:ul.updateOne({id:n.photoId,changes:{actions:{...o.actions,changeAsAvatar:{inProgress:!0}}}},t.photos)}:t}),de(A_e,(t,n)=>t.photos.entities[n.photoId]?Se(t,e=>{e.photos=ul.map(i=>{let r={...i,isAvatar:i.id===n.photoId};return i.id===n.photoId&&(r.actions={...i.actions,changeAsAvatar:{inProgress:!1}}),r},t.photos)}):t));function F8(t){return t.gallery}const hct=We(F8,t=>t.galleries),mct=We(F8,t=>t.photos),U8=We(F8,t=>t.currentUserId),k_e=RC.getSelectors(hct),fL=ul.getSelectors(mct),L_e=()=>We(k_e.selectEntities,(t,n)=>t[n]),D_e=We(U8,k_e.selectEntities,(t,n)=>n[t]),B_e=()=>We(fL.selectAll,(t,n)=>t.filter(o=>o.userId===n)),N_e=We(U8,fL.selectAll,(t,n)=>n.filter(o=>o.userId===t)),F_e=We(U8,fL.selectAll,(t,n)=>n.find(o=>o.actions.upload.inProgress&&o.userId===t)),U_e=()=>We(fL.selectAll,(t,n)=>t.find(o=>o.actions.upload.inProgress&&o.userId===n));J.prototype.gallery={selectGalleryPhotosState:function fct(){return this.selectSync(D_e)}.bind(J.prototype),subscribeGalleryPhotosState:function gct(){return this.select(D_e)}.bind(J.prototype),selectGalleryPhotos:function _ct(){return this.selectSync(N_e)}.bind(J.prototype),subscribeGalleryPhotos:function vct(){return this.select(N_e)}.bind(J.prototype),selectUploadingPhoto:function bct(){return this.selectSync(F_e)}.bind(J.prototype),subscribeUploadingPhoto:function Cct(){return this.select(F_e)}.bind(J.prototype),selectGalleryPhotosStateByUserId:function yct(t){return this.selectSync(L_e(),t)}.bind(J.prototype),subscribeGalleryPhotosStateByUserId:function Sct(t){return this.select(L_e(),t)}.bind(J.prototype),selectGalleryPhotosByUserId:function wct(t){return this.selectSync(B_e(),t)}.bind(J.prototype),subscribeGalleryPhotosByUserId:function Tct(t){return this.select(B_e(),t)}.bind(J.prototype),selectUploadingPhotoByUserId:function Pct(t){return this.selectSync(U_e(),t)}.bind(J.prototype),subscribeUploadingPhotoByUserId:function Ict(t){return this.select(U_e(),t)}.bind(J.prototype)};let gL=(()=>{let t=class{constructor(o){this.createdAt=Bn.instance.getServerTimeS(),this.url="",this.thumb="",this.likes=0,this.isAvatar=!1,this.dimensions={height:0,width:0};for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e]);this.actions={changeAsAvatar:{inProgress:!1},delete:{inProgress:!1},like:{inProgress:!1},upload:{inProgress:!1},report:{inProgress:!1}}}static generateId(){return(0,ie.uuidV4)()}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),Mct=(()=>{let t=class{constructor(o){this.loadingState={isLoaded:!1,isLoading:!1,isFullyLoaded:!1,isSynced:!0,error:void 0};for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e])}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),I0=(()=>{var t;let n=((t=class{constructor(e,i,r,s,a){this.http=e,this.imageUploader=i,this.store=r,this.clientConfig=s,this.feedbackService=a}init(){this.initUserState(this.store.selectUserState().profile.id)}requestGallery(e,i){var r=this;return f(function*(){try{const s=r.store.gallery.selectGalleryPhotosStateByUserId(e);if(null!=s&&s.loadingState.isSynced&&null!=s&&s.loadingState.isLoaded){const b=r.store.gallery.selectGalleryPhotosByUserId(e);if(s.loadingState.isFullyLoaded||i&&b.length>=i)return i?b.slice(0,i):b}r.initUserState(e);let a=new $l;i&&(a=a.append("size",i.toString()));const u=(yield r.http.get("social/gallery/".concat(e,"/list"),{params:a}).toPromise().then(b=>b.body)).photos.map(b=>new gL({...b,userId:e}));return r.store.dispatch(g_e({userId:e,photos:u,isFullyLoaded:!i||u.length<i})),u}catch(s){const a=jt.createErrorInstance(s);throw i||r.store.dispatch(__e({userId:e,error:a})),a}})()}likePhoto(e,i){var r=this;return f(function*(){try{r.store.dispatch(v_e({photoId:e})),yield r.http.post("social/gallery/".concat(i,"/photo/").concat(e,"/like")).toPromise(),r.store.dispatch(b_e({photoId:e}))}catch(s){const a=jt.createErrorInstance(s);throw r.store.dispatch(C_e({photoId:e})),a}})()}deletePhoto(e){var i=this;return f(function*(){try{i.store.dispatch(y_e({photoId:e})),yield i.http.delete("social/gallery/photo/".concat(e)).toPromise(),i.store.dispatch(S_e({photoId:e}))}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(w_e({photoId:e})),s}})()}uploadPhoto(e){var i=this;return f(function*(){if(i.store.gallery.selectGalleryPhotos().length>=i.clientConfig.getConfig().core.images.gallery.maxImages)throw new et.Permissions.LimitReached("Gallery photos",i.clientConfig.getConfig().core.images.gallery.maxImages);const r=gL.generateId();try{const s=yield e.toBase64(),a=new gL({id:r,thumb:s,url:s,userId:i.store.selectUserState().profile.id});i.store.dispatch(M_e({photo:a}));const c=yield i.imageUploader.upload(e,"social/gallery/photo/upload","gallery").then(u=>u.body);return i.store.dispatch(O_e({tempId:a.id,photo:new gL({...c,userId:i.store.selectUserState().profile.id})})),{...c}}catch(s){const a=jt.createErrorInstance(s);throw i.store.dispatch(E_e({photoId:r,error:a})),a}})()}reportPhoto(e,i){var r=this;return f(function*(){try{r.store.dispatch(T_e({photoId:i})),yield r.feedbackService.reportPhoto(e,i),r.store.dispatch(P_e({photoId:i}))}catch(s){throw r.store.dispatch(I_e({photoId:i})),s}})()}selectPhotoAsAvatar(e){var i=this;return f(function*(){try{i.store.dispatch(x_e({photoId:e})),yield i.http.post("social/gallery/photo/avatar/".concat(e)).toPromise(),i.store.dispatch(A_e({photoId:e}))}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(lct({photoId:e})),s}})()}clearUserGalleryState(e){this.store.dispatch(m_e({userId:e}))}onLogout(){this.store.dispatch(h_e())}initUserState(e){this.store.dispatch(f_e({state:new Mct({userId:e})}))}}).\u0275fac=function(e){return new(e||t)(T(En),T(lf),T(J),T(Zt),T(HI))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogout",null),n=Qe([Wo(),ue("design:paramtypes",[En,lf,J,Zt,HI])],n),n})();const Oct=[$r.forFeature("gallery",function pct(t,n){return dct(t,n)}),act];let Ect=(()=>{var t;class n{constructor(e){this.galleryService=e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(I0))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[I0],imports:[Oct]}),n})();var xct=JS.WebSocketNotSupportedError,Act=lt.NetworkError,Rct=lt.UnknownError,kct=nt.EPermissionModule,Lct=nt.EModuleAction;let G_e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke,Ee,ot,ct,Pt,gn,qt,Je,xn,bi,rn,vn,Vn,An,zi,Ir,Ur,up,fr,eh,KW,gl,zg,gd,S1,kO,nrn,irn,orn,rrn,srn,arn,crn,lrn,urn){this.accountMigrationService=eh,this.accountMigrationPopupService=KW,this.levelUpRewardService=gl,this.bannerListener=rrn,this.clientConfig=crn,this.store=lrn,this.brazeEngagementService=urn,this.deltaDNAListenersService=irn,this.analyticsDevicePlatform=new Ap,this.currencyItemService=vn,this.gdprService=rn,this.appLanguage=Me,this.autoDisconnect=e,this.shopRentService=r,this.freeRewardService=i,this.backgroundMusicService=s,this.notificationsService=b,this.communicationService=a,this.deltaEngagementManager=w,this.analyticsTrackingService=c,this.maintenance=h,this.deltaDNAService=te,this.gamesStateService=u,this.settings=le,this.clientNotifications=K,this.exceptionTracker=ge,this.appService=me,this.version=Ke,this.banService=ee,this.helpShiftService=Ee,this.appState=ot,this.chatEventsListener=ct,this.gameNamespaceService=R,this.spectateGameNotificationListener=G,this.rate=Pt,this.matchmakingListener=gn,this.accountMergeService=qt,this.activePlayersService=Je,this.friendsService=xn,this.gamesPlayClient=bi,this.dropNotification=Vn,this.permissions=An,this.roomEvents=zi,this.tutorials=Ir,this.membershipService=Ur,this.challengesService=up,this.user=fr,this.auth=gd,this.navigation=S1,this.clubsService=kO,this.appState.init(),zg.init(),this.galleryService=nrn,this.premiumGiftNotificationListener=orn,this.phrasesService=srn,this.emoticonsService=arn}start(){var e=this;return new Promise(function(){var i=f(function*(r,s){try{const h=yield e.user.getState();try{var a,c;const b=e.auth.getToken();if(e.communicationService.initialize(b),e.exceptionTracker.captureUser(h),e.clientConfig.getConfig().core.tracking.deltadna.engage.enabled){var u;const[G,K]=yield Promise.all([e.deltaDNAService.getUserSegment(),e.communicationService.connect()]);yield e.clientConfig.requestConfigByUser(null==G||null===(u=G.parameters)||void 0===u?void 0:u.action,Zme[rl.buildData.game])}else yield e.communicationService.connect();e.banService.init(),e.gameNamespaceService.init(),e.spectateGameNotificationListener.init(),e.premiumGiftNotificationListener.init(),e.maintenance.init(),e.version.init(),e.matchmakingListener.init(h.profile.id),e.notificationsService.init(),e.autoDisconnect.startAutoDisconnect(),e.backgroundMusicService.init(),e.clubsService.initialize(),e.deltaDNAListenersService.attachSocketListeners(),e.clientNotifications.init(),e.helpShiftService.init(),e.gdprService.checkIfPrivacyAccepted(),e.currencyItemService.addCurrencyUpdateListeners(),e.rate.init(),e.deltaEngagementManager.init(),e.activePlayersService.init(),e.friendsService.requestFriends().catch(G=>console.warn(G)),e.challengesService.init(),e.challengesService.requestChallenges().catch(G=>console.warn(G)),e.freeRewardService.init(h),e.shopRentService.init(),e.membershipService.init(),e.dropNotification.init(),e.gamesPlayClient.initialize(h.profile.id,e.gamesStateService.getGamesState().map(G=>G.id)),e.roomEvents.init(),e.tutorials.init(h),e.accountMergeService.init(),e.accountMigrationPopupService.initialize(),e.levelUpRewardService.init(),e.galleryService.init(),e.bannerListener.init();let w=e.analyticsDevicePlatform.getDeviceInfo(),R=new Tl.ClientDeviceEvent(Nn.Info,"clientDevice",{browserName:w.browser.name,browserVersion:w.browser.version.toString(),deviceName:navigator.platform,operatingSystemVersion:w.os.version.toString(),platform:e.analyticsDevicePlatform.getPlatform(),userLevel:h.profile.level,isVip:!(null===(a=h.profile.vip.tiers[Fi.Full])||void 0===a||!a.isActive()),isPremium:!(null===(c=h.profile.vip.tiers[Fi.Premium])||void 0===c||!c.isActive()),userRoleEmail:(!!h.authentications.find(G=>G===Gt.Email)).toString(),userRoleMobile:(!!h.authentications.find(G=>G===Gt.Mobile)).toString(),userRoleFacebook:(!!h.authentications.find(G=>G===Gt.Facebook)).toString(),userRoleGoogle:(!!h.authentications.find(G=>G===Gt.Google)).toString(),userRoleTwitter:(!!h.authentications.find(G=>G===Gt.Twitter)).toString(),userRoleApple:(!!h.authentications.find(G=>G===Gt.Apple)).toString(),userRolePhoneNumber:(!!h.authentications.find(G=>G===Gt.PhoneNumber)).toString(),userRoleTamatem:(!!h.authentications.find(G=>G===Gt.Tamatem)).toString(),userLanguage:h.settings.lang});if(e.appService.isMobileApp()&&(R.args.mobileID=e.appService.getDeviceId(),e.appService.getPlatform()===Ut.Android&&(R.args.mobileAAID=e.appService.getAdvertisingId(),R.args.mobileIDFA="null"),e.appService.getPlatform()===Ut.Ios&&(R.args.mobileAAID="null",R.args.mobileIDFA=e.appService.getAdvertisingId())),e.store.clubs.selectClubProfileId()&&(R.args.clubId=e.store.clubs.selectClubProfileId()),e.analyticsTrackingService.sendEvent(R),h.settings.lang!==e.settings.getLanguage()&&(yield e.settings.setLanguage(h.settings.lang)),e.appService.isMobileApp()){const G=h.profile.toJson(),K={token:b,userData:{profile:{id:G.id,level:G.level,username:G.username,isVip:h.profile.hasTierOrHigher(Fi.Full)},affiliateId:h.affiliateId,verified:h.verified,analytics:h.analytics,settings:h.settings},api:Lt.CONFIG.platform.endPoints.api};e.appService.getMobileAppService().messages().user(K);const te=h.bonuses.pushNotifications;e.permissions.getActionPermission(kct.AskEnablePush,Lct.Show).isPermitted&&(!te.isActive||te.isActive&&!te.isReady)&&h.profile.level>=2&&e.appService.getMobileAppService().messages().enableNotifications(()=>{},()=>{})}rl.nonGamblingStyleEnabled=Lt.CONFIG.platform.nonGamblingStyle.enabled,e.deltaDNAService.appStartedEngage(),e.deltaDNAService.appStartedEngage2(),e.brazeEngagementService.appStartedEngage(),e.brazeEngagementService.appStartedEngage2(),e.settings.setPrivateChatPermission(h.settings.friendsOnlyChat),aw.appReady(h),e.navigation.getOutletUrl()!=="/".concat(Xs.gameRoute)&&e.backgroundMusicService.play(),r()}catch(b){ll.hideLoader(),b instanceof Act||b instanceof xct||b instanceof Rct||b instanceof et.General.ExpiredOrWrongToken||e.exceptionTracker.captureException(b),s(b)}}catch(h){console.warn("AppStartService User get",h),s(h)}});return function(r,s){return i.apply(this,arguments)}}())}}return(t=n).\u0275fac=function(e){return new(e||t)(T(h0),T(Mu),T(Rme),T(X6),T(Ri),T(yi),T(Zn),T(H6),T(ja),T(Um),T(Wme),T(crt),T(W6),T(sl),T(KI),T(nc),T(Qt),T(uv),T(Ma),T(Eme),T(QI),T(Sa),T(f0),T(wk),T(Ame),T(Jb),T(_8),T(Tu),T(oo),T(pI),T($k),T(o6),T(Ti),T(urt),T(sv),T(v8),T(cM),T(Kr),T(GR),T(cI),T(Wfe),T(lrt),T(Kd),T(Yt),T(ru),T(I0),T(iM),T(Brt),T(og),T(C0),T(S0),T(Zt),T(J),T(cl))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),G8=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.constants=u,this.clientConfigService=h,this.loginTypeManager=e,this.appStartService=i,this.appService=r,this.authListenerService=a,this.loader=s,this.navigation=c}isAuthorized(){return this.loginTypeManager.isAuthorized()}onLogin(){return this.appStartService.start().then(()=>(this.authListenerService.dispatch(er.Login),this.loginTypeManager.onLogin().then(()=>{this.loader.off();let e=!1;if(this.navigation.getCurrentNavigation()){var i;const r=(null===(i=this.navigation.getCurrentNavigation().extractedUrl)||void 0===i||null===(i=i.root)||void 0===i||null===(i=i.children)||void 0===i||null===(i=i.primary)||void 0===i?void 0:i.segments)||[];e=this.isGameLobbyRoute(r)}return this.navigation.getOutletUrl()!=="/".concat(Xs.gameRoute)&&!this.isGameLobbyRoute(this.navigation.getOutletUrl())&&!e&&(ll.hideLoader(),this.appService.isMobileApp()&&this.appService.getMobileAppService().hideSplash()),Promise.resolve(!0)}))).catch(e=>{var i;if(console.warn("LoginTypeManager onLogin error",e),this.appService.isMobileApp()&&this.appService.getMobileAppService().messages().trackError({name:"LoginFlowRedirectToHome",data:{errorName:null!==(i=null==e?void 0:e.code)&&void 0!==i?i:null==e?void 0:e.name,errorMessage:null==e?void 0:e.message,error:e}}),e instanceof et.General.ExpiredOrWrongToken)return this.onLoginFail();throw ll.hideLoader(),this.loader.off(),this.appService.isMobileApp()&&this.appService.getMobileAppService().hideSplash(),e})}onLoginFail(){return ll.hideLoader(),this.loader.off(),this.appService.isMobileApp()&&this.appService.getMobileAppService().hideSplash(),this.loginTypeManager.onLoginFail()}isGameLobbyRoute(e){return"string"==typeof e?this.clientConfigService.getMultiplayerGames().some(s=>-1!==e.indexOf("".concat(this.constants.defaultLoggedRoute,"/").concat(s.id,"/lobby"))):"/".concat(null===(i=e[0])||void 0===i?void 0:i.path)===this.constants.defaultLoggedRoute&&this.clientConfigService.getMultiplayerGames().some(s=>{var a;return(null===(a=e[1])||void 0===a?void 0:a.path)===s.id})&&"lobby"===(null===(r=e[2])||void 0===r?void 0:r.path);var i,r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(gme),T(G_e),T(Qt),T(ro),T(xr),T(Yt),T(tn),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Dct=et.General.NotFound,V_e=et.General.Banned,Bct=wi.EEventAction;let Tg=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.analyticsTrackingService=c,this.auth=e,this.appLanguage=a,this.banService=i,this.appService=r,this.baseLoginPlatform=s,this.defaultAvatarsService=u}register(e,i,r){var s=this;return f(function*(){var a;s.checkLocalStorageBan();const c=yield s.auth.register(e,{...i,lang:s.appLanguage.getAppLanguage(),avatar:null!==(a=i.avatar)&&void 0!==a?a:s.defaultAvatarsService.getRandomAvatar()},r);if(r&&r.autoLogin&&(yield s.onAfterLogin()),null==c||!c.username){if(s.appService.isMobileApp()){const u=new Ub.DefaultEvent(Nn.User,Bct.Register);s.analyticsTrackingService.sendEvent(u)}s.analyticsTrackingService.sendEvent(new aa.DefaultEvent(Nn.Register,e))}return c})()}login(e,i){var r=this;return f(function*(){try{r.checkLocalStorageBan(),yield r.auth.login(e,i),yield r.onAfterLogin()}catch(s){if(s instanceof V_e)throw r.banService.onUserBanned(s.status),s;if(s instanceof Dct&&(e===Gt.Twitter||e===Gt.Google||e===Gt.Facebook||e===Gt.Apple||e===Gt.Mobile)&&null!=i&&i.autoRegister)return r.register(e,i,{autoLogin:!0}).then();throw console.warn("".concat(e," login failed"),s),s}})()}loginAsGuest(){return this.appService.isMobileApp()&&this.appService.getDeviceId()?this.login(Gt.Mobile,{mobileId:this.appService.getDeviceId(),uid:this.appService.getUid(),autoRegister:!0}):this.login(Gt.Guest,{lang:this.appLanguage.getAppLanguage()})}logout(){return this.auth.logout()}getCountry(){return this.auth.getCountry()}isEmailRegistered(e){return this.auth.isEmailRegistered(e)}isPhoneRegistered(e){return this.auth.isPhoneRegistered(e)}sendConfirmationCode(e){return this.auth.sendConfirmationCode(e)}deleteAccount(){return this.auth.deleteAccount()}onAfterLogin(){var e=this;return f(function*(){yield e.baseLoginPlatform.onLogin(),aw.login(),e.appService.isMobileApp()&&e.appService.getMobileAppService().messages().sendEvent({action:"login"})})()}checkLocalStorageBan(){const e=this.banService.getLocalStorageBan();if(e){if(e.expiresAt>Date.now()/1e3)throw new V_e(e);this.banService.setLocalStorageBan(void 0)}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kd),T(KI),T(Qt),T(G8),T(Ma),T(yi),T(Rp))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),z_e=(()=>{var t;class n{constructor(e){this.http=e}submitNewPassword(e){return this.http.post("auth/forgottenPassword",e).toPromise()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Nct=ve.EButtonModifier,Fct=ve.EIcons;const j_e=()=>({autocomplete:"off"});let H_e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.EIcons=Fct,this.popupTitleTypes=li,this.buttonModifier=Nct,this.route=e,this.router=i,this.auth=s,this.toaster=a,this.loader=r,this.translation=c,this.changePasswordService=h,this.formBuilder=b,this.fieldValidatorFactory=u,this.popupContainerOptions={disableBackdrop:!0,customComponentCssClass:"cp__container",closeDisabled:!0},this.popupTitleBarStyle={height:"9rem"},this.titleBarLeftButton={type:QS.BackButton,action:()=>this.router.navigate(["/home"])}}ngOnInit(){this.auth.logout(),this.token=this.route.snapshot.params.token,this.createForm(),this.createErrorMessages()}ngOnDestroy(){this.changePassForm.reset()}changePassword(){this.loader.on(),gc.isFormValid(this.changePassForm)?this.changePasswordService.submitNewPassword({password:this.changePassForm.value.password,token:this.token}).then(i=>{this.loader.off(),this.router.navigate(["/home"]),this.toaster.success("HINTS.CHANGE_PASS_SUCCESS")}).catch(i=>{console.warn("Change password error: ",i),this.loader.off(),this.router.navigate(["/home"]),this.toaster.error("HINTS.LINK_USED")}):this.formErrors()}createForm(){this.changePassForm=this.formBuilder.group({password:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])],password_repeat:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])]},{validator:gc.getSameFieldsValidatorConfig(["password","password_repeat"])})}createErrorMessages(){this.messages={password:{required:"",minlength:"",maxlength:"",dontmatch:""},password_repeat:{required:"",minlength:"",maxlength:"",dontmatch:""}},this.formError={password:"",password_repeat:""};let r=this.translation.getParsedTranslation("API_ERRORS.PasswordLength",[Lt.CONFIG.core.validations.formFields.password.minLength,Lt.CONFIG.core.validations.formFields.password.maxLength]),s=this.translation.getParsedTranslation("API_ERRORS.PasswordDontMatch");this.messages.password.required=r,this.messages.password.minlength=r,this.messages.password.maxlength=r,this.messages.password.dontmatch=s,this.messages.password_repeat.required=r,this.messages.password_repeat.minlength=r,this.messages.password_repeat.maxlength=r,this.messages.password_repeat.dontmatch=s}formErrors(){this.loader.off();for(let e in gc.getFormErroredFields(this.changePassForm))if(e)for(let i in this.changePassForm.controls[e].errors)i&&this.changePassForm.controls[e].errors[i]&&(this.formError[e]=this.messages[e][i])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Po),g(on),g(ro),g(Tg),g(Dt),g(pi),g(wa),g(z_e),g(td))},t.\u0275cmp=pe({type:t,selectors:[["change-password"]],decls:14,vars:29,consts:[[3,"popupContainerOpened","popupContainerOptions"],[3,"popupTitleType","inlineStyles","hideCloseButton","leftButtonOptions","customComponentCssClass"],[1,"cp__container--form","form__content"],["novalidate","",3,"formGroup","submit"],["type","password",2,"display","none"],[1,"cp__container--password"],["formControlName","password",3,"icon","nativeAttr","type","placeholder","errorMessage"],["formControlName","password_repeat",3,"icon","nativeAttr","type","placeholder","errorMessage"],[1,"cp__button--send",3,"buttonModifier","type"]],template:function(e,i){1&e&&(p(0,"popup-container",0),B(1,"popup-title-bar",1),p(2,"div",2)(3,"form",3),Y("submit",function(){return i.changePassword()}),B(4,"input",4),p(5,"div",5),B(6,"user-input",6),V(7,"translate"),m(),p(8,"div",5),B(9,"user-input",7),V(10,"translate"),m(),p(11,"button-text",8),H(12),V(13,"translate"),m()()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Logo)("inlineStyles",i.popupTitleBarStyle)("hideCloseButton",!0)("leftButtonOptions",i.titleBarLeftButton)("customComponentCssClass","cp__title-container"),d(2),l("formGroup",i.changePassForm),d(3),l("icon",i.EIcons.LOCKER)("nativeAttr",pt(27,j_e))("type","password")("placeholder",$(7,21,"PLACEHOLDERS.PASSWORD"))("errorMessage",i.formError.password),d(3),l("icon",i.EIcons.LOCKER)("nativeAttr",pt(28,j_e))("type","password")("placeholder",$(10,23,"PLACEHOLDERS.REPEAT_PASS"))("errorMessage",i.formError.password_repeat),d(2),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("type","submit"),d(),se($(13,25,"BUTTON.SEND")))},dependencies:[pn,Ji,Wi,il,Su,Ql,yu,wl,Yl,qe],styles:[".cp__container--form[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;max-width:50rem;margin:0 auto;padding:2rem;height:calc(100% - 9rem)!important;overflow:auto}@media only screen and (max-width: 768px){.cp__container--form[_ngcontent-%COMP%]{padding:1rem;height:calc(100% - 5rem)!important}}@media only screen and (max-height: 379px){.cp__container--form[_ngcontent-%COMP%]{display:block}}@media only screen and (min-height: 380px){.cp__container--form[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center}}.cp__button--send[_ngcontent-%COMP%]{width:100%;flex-grow:1;margin:2rem auto 0}.cp__container--password[_ngcontent-%COMP%]{min-height:7.5rem}@media only screen and (max-width: 768px){.cp__container--password[_ngcontent-%COMP%]{min-height:6.5rem}}"]}),n})(),q_e=(()=>{var t;class n{canActivate(e){return!!e.params.token}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const W_e=[{path:"change-password/:token",data:{redirectOptions:{skipRedirect:!0,relativeUrl:"change-password/"}},component:H_e,canActivate:[q_e]}];var Uct=et.General.DeactivatedAccount,Gct=lt.TooManyRequests;const Vct=["input"];function zct(t,n){1&t&&(p(0,"div")(1,"p",4),H(2),V(3,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,1,"HOME_COMPONENT.ENTER_EMAIL")," "))}function jct(t,n){1&t&&(p(0,"div")(1,"p",4),H(2),V(3,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,1,"HOME_COMPONENT.ENTER_PASSWORD")," "))}function Hct(t,n){1&t&&(p(0,"div")(1,"p",4),H(2),V(3,"translate"),m(),p(4,"p",4),H(5),V(6,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,2,"REGISTER_COMPONENT.NOT_REGISTERED")," "),d(3),ze(" ",$(6,4,"REGISTER_COMPONENT.CREATE_ACCOUNT")," "))}const V8=t=>[t],_L=()=>({autocomplete:"off"});function qct(t,n){if(1&t){const o=Ce();p(0,"div",9),Y("animationend",function(){return oe(o),re(_(2).onAnimationEnd())}),p(1,"div")(2,"div",10),B(3,"user-input",11,12),V(5,"translate"),m()(),p(6,"div",13)(7,"button-text",14),Y("onClick",function(){return oe(o),re(_(2).handleSubmit())}),p(8,"p"),H(9),V(10,"translate"),m()()()()}if(2&t){const o=_(2);l("ngClass",ne(15,V8,o.transition)),d(3),l("icon",o.EIcons.MESSAGE)("type","email")("nativeAttr",pt(17,_L))("placeholder",$(5,11,"PLACEHOLDERS.ENTER_EMAIL"))("errorMessage",o.formError.email),Hn("data-cy","email-login-input-field"),d(4),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isActionInProgress),Hn("data-cy","email-login-continue-button"),d(2),ze(" ",$(10,13,"BUTTON.CONTINUE")," ")}}function Wct(t,n){if(1&t){const o=Ce();p(0,"div",9),Y("animationend",function(){return oe(o),re(_(2).onAnimationEnd())}),p(1,"div")(2,"div",10),B(3,"user-input",15,12),V(5,"translate"),m()(),p(6,"div",13)(7,"button-text",16),Y("onClick",function(){return oe(o),re(_(2).handleSubmit())}),p(8,"p"),H(9),V(10,"translate"),m()(),p(11,"button-text",17),Y("onClick",function(){return oe(o),re(_(2).sendForgottenPasswordEmail())}),H(12),V(13,"translate"),m()()()}if(2&t){const o=_(2);l("ngClass",ne(20,V8,o.transition)),d(3),l("icon",o.EIcons.LOCKER)("type","password")("nativeAttr",pt(22,_L))("placeholder",$(5,14,"PLACEHOLDERS.ENTER_PASSWORD"))("errorMessage",o.formError.password),Hn("data-cy","email-login-password-input-field"),d(4),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isActionInProgress),Hn("data-cy","email-login-sign-in-button"),d(2),se($(10,16,"LOGIN")),d(2),l("bclass","er__text--forgotten-bclass")("loading",o.isSendingForgottenPassword),d(),ze(" ",$(13,18,"FORGOTTEN_PASS")," ")}}function $ct(t,n){if(1&t){const o=Ce();p(0,"form",5),Y("keydown.enter",function(){return oe(o),re(_().handleSubmit())}),B(1,"input",6)(2,"input",7),U(3,qct,11,18,"div",8)(4,Wct,14,23,"div",8),m()}if(2&t){const o=_();l("formGroup",o.loginForm),d(3),l("ngIf",o.shownPage===o.EPage.Email),d(),l("ngIf",o.shownPage===o.EPage.Password)}}function Kct(t,n){if(1&t){const o=Ce();p(0,"div",13)(1,"button-text",16),Y("onClick",function(){return oe(o),re(_(3).handleSubmit())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_(3);d(),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isActionInProgress),Hn("data-cy","email-register-create-account-button"),d(),ze(" ",$(3,4,"BUTTON.REGISTER")," ")}}function Zct(t,n){if(1&t&&(p(0,"div",19)(1,"div")(2,"div",10),B(3,"user-input",15,12),V(5,"translate"),m(),p(6,"div",10),B(7,"user-input",20),V(8,"translate"),m()(),U(9,Kct,4,6,"div",21),m()),2&t){const o=_(2);l("ngClass",ne(18,V8,o.transition)),d(3),l("icon",o.EIcons.LOCKER)("type","password")("nativeAttr",pt(20,_L))("placeholder",$(5,14,"PLACEHOLDERS.ENTER_PASSWORD"))("errorMessage",o.formError.password),Hn("data-cy","email-register-password-input-field"),d(4),l("icon",o.EIcons.LOCKER)("type","password")("nativeAttr",pt(21,_L))("placeholder",$(8,16,"PLACEHOLDERS.REPEAT_PASS"))("errorMessage",o.formError.password_repeat),Hn("data-cy","email-register-repeat-password-input-field"),d(2),l("ngIf",o.shownPage===o.EPage.Register)}}function Qct(t,n){if(1&t){const o=Ce();p(0,"form",5),Y("keydown.enter",function(){return oe(o),re(_().handleSubmit())}),B(1,"input",6)(2,"input",7),U(3,Zct,10,22,"div",18),m()}if(2&t){const o=_();l("formGroup",o.registerForm),d(3),l("ngIf",o.shownPage===o.EPage.Register)}}const Yct=t=>({name:t});let vL=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.auth=e,this.formBuilder=i,this.fieldValidatorFactory=r,this.clientConfigService=s,this.cdr=a,this.forgottenPasswordService=c,this.popupService=u,this.toastService=h,this.timeLeftPipe=b,this.onRegisterDisabled=w=>{},this.formError={},this.EIcons=ve.EIcons,this.buttonModifier=ve.EButtonModifier,this.shownPage=n.EPage.Email,this.EPage=n.EPage,this.transition="",this.valueChangeSubs=new ie.List}ngOnInit(){this.createForms()}ngOnDestroy(){var e;this.valueChangeSubs.forEach(i=>i.unsubscribe()),null===(e=this.input)||void 0===e||e.blur()}handleSubmit(){switch(this.shownPage){case n.EPage.Email:this.handleEmailSubmit();break;case n.EPage.Password:this.login();break;case n.EPage.Register:this.register()}}sendForgottenPasswordEmail(){var e=this;return f(function*(){const i=()=>{e.popupService.basic({textParams:{translationKey:"POPUP.CHANGE_PASSWORD_FORM"},buttons:{buttonObject:{action:()=>{},buttonTextOptions:{translationKey:"TEXT.OK"}}}})},r=e.loginForm.get("email").value,a={email:r};new RegExp(e.fieldValidatorFactory.createEmailValidator().pattern).test(r)||(a.phoneNumber=a.email,a.email=void 0);try{e.isSendingForgottenPassword=!0,e.cdr.detectChanges(),yield e.forgottenPasswordService.sendForgotten(a),i()}catch(c){c instanceof lt.NetworkError?e.toastService.error("API_ERRORS.ServerError"):i()}finally{e.isSendingForgottenPassword=!1,e.cdr.detectChanges()}})()}handleEmailSubmit(){var e=this;return f(function*(){if(e.loginForm.get("email").valid)try{if(e.setIsActionInProgress(!0),yield e.auth.isEmailRegistered(e.loginForm.get("email").value))e.goTo(n.EPage.Password);else{if(!e.clientConfigService.getConfig().platform.registrationConfig.email.isRegistrationEnabled)return void e.onRegisterDisabled();e.goTo(n.EPage.Register)}}catch(i){console.warn(i),e.setErrorMessage("email",i instanceof lt.NetworkError?{key:"ERRORS.CONNECTION_ERROR"}:i instanceof yh.NotValid?{key:"API_ERRORS.UserAlreadyExists"}:{key:"ERRORS.SOMETHING_WRONG"})}finally{e.setIsActionInProgress(!1)}else e.setFieldErrors(e.loginForm,"email")})()}login(){var e=this;return f(function*(){if(e.loginForm.get("password").valid)try{e.setIsActionInProgress(!0),yield e.auth.login(Gt.Email,{email:e.loginForm.value.email,password:e.loginForm.value.password})}catch(r){if(console.log(r),r instanceof lt.NetworkError)e.setErrorMessage("password",{key:"ERRORS.CONNECTION_ERROR"});else if(r instanceof et.General.Banned||r instanceof Uct)console.warn(r);else if(r instanceof Gct){var i;const s=null===(i=e.clientConfigService.getConfig().platform.registrationConfig.rateLimits)||void 0===i?void 0:i.login,a=e.timeLeftPipe.transform(s.blockDuration,{timeConfig:Zu});e.onRegisterDisabled({key:"LOGIN_COMPONENT.MAXIMUM_LOGIN_ATTEMPTS_BLOCKED_MESSAGE",params:[a]})}else e.setErrorMessage("password",{key:"API_ERRORS.UserNotFound"});e.setIsActionInProgress(!1)}else e.setFieldErrors(e.loginForm,"password")})()}register(){var e=this;return f(function*(){if(e.resetErrors(),e.registerForm.get("email").setValue(e.loginForm.get("email").value),gc.isFormValid(e.registerForm))try{e.setIsActionInProgress(!0),yield e.auth.register(Gt.Email,e.registerForm.value,{autoLogin:!0})}catch(i){console.log(i),i instanceof yh.NotValid&&i.property?"email"===i.property&&(e.setErrorMessage("email",{key:"API_ERRORS.UserAlreadyExists"}),e.goTo(n.EPage.Email)):i instanceof et.Permissions.ActionNotAllowed?e.onRegisterDisabled():e.setErrorMessage("password",i instanceof lt.NetworkError?{key:"ERRORS.CONNECTION_ERROR"}:{key:"ERRORS.SOMETHING_WRONG"}),e.setIsActionInProgress(!1)}else for(let i in gc.getFormErroredFields(e.registerForm))i&&e.setFieldErrors(e.registerForm,i)})()}goTo(e){this.transition="from-".concat(this.shownPage,"-to-").concat(e),this.shownPage=e,this.cdr.detectChanges()}onAnimationEnd(){var e;null===(e=this.input)||void 0===e||e.focus()}back(){switch(this.shownPage){case n.EPage.Email:this.backClicked();break;case n.EPage.Password:case n.EPage.Register:this.goTo(n.EPage.Email)}}getErrorText(e,i){const r=this.clientConfigService.getConfig().core.validations.formFields;let s={key:""};switch(e){case"email":s.key="API_ERRORS.EmailNotValid";break;case"password":case"password_repeat":"dontmatch"===i?s.key="API_ERRORS.PasswordDontMatch":(s.key="API_ERRORS.PasswordLength",s.params=[r.password.minLength,r.password.maxLength]);break;default:s=void 0}return s}setFieldErrors(e,i){for(let r in e.controls[i].errors)r&&e.controls[i].errors[r]&&(this.formError[i]=this.getErrorText(i,r));this.cdr.detectChanges()}setErrorMessage(e,i){this.formError[e]=i,this.cdr.detectChanges()}resetErrors(){for(let e in this.formError)this.formError.hasOwnProperty(e)&&(this.formError[e]=void 0);this.cdr.detectChanges()}setIsActionInProgress(e){this.isActionInProgress=e,this.cdr.detectChanges()}createForms(){this.loginForm=this.formBuilder.group({email:["",Ln.compose([...this.fieldValidatorFactory.createEmailValidator().validators,Ln.required])],password:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])]}),this.registerForm=this.formBuilder.group({email:["",Ln.compose([...this.fieldValidatorFactory.createEmailValidator().validators,Ln.required])],password:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])],password_repeat:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])]},{validator:gc.getSameFieldsValidatorConfig(["password","password_repeat"])}),this.valueChangeSubs.add(this.loginForm.valueChanges.subscribe(()=>this.resetErrors())),this.valueChangeSubs.add(this.registerForm.valueChanges.subscribe(()=>this.resetErrors()))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Tg),g(td),g(wa),g(Zt),g(Re),g(u5),g(Cn),g(Dt),g(Ps))},t.\u0275cmp=pe({type:t,selectors:[["email-register"]],viewQuery:function(e,i){if(1&e&&$e(Vct,5),2&e){let r;je(r=He())&&(i.input=r.first)}},inputs:{backClicked:"backClicked",onRegisterDisabled:"onRegisterDisabled"},decls:7,vars:10,consts:[[1,"er__container--title"],["id","back",1,"er__button--back",3,"bclass","icon","onClick"],[4,"ngIf"],["autocomplete","off","novalidate","",3,"formGroup","keydown.enter",4,"ngIf"],[1,"er__container--title--text"],["autocomplete","off","novalidate","",3,"formGroup","keydown.enter"],["type","email",2,"display","none"],["type","password",2,"display","none"],["class","er__container--input-fields",3,"ngClass","animationend",4,"ngIf"],[1,"er__container--input-fields",3,"ngClass","animationend"],[1,"er__container--input-wrapper"],["formControlName","email",1,"er__input",3,"icon","type","nativeAttr","placeholder","errorMessage"],["input",""],[1,"er__container--login-button"],[1,"er__container--login-button__btn",3,"buttonModifier","loading","onClick"],["formControlName","password",1,"er__input",3,"icon","type","nativeAttr","placeholder","errorMessage"],[3,"buttonModifier","loading","onClick"],[1,"er__text--forgotten",3,"bclass","loading","onClick"],["class","er__container--input-fields",3,"ngClass",4,"ngIf"],[1,"er__container--input-fields",3,"ngClass"],["formControlName","password_repeat",1,"er__input",3,"icon","type","nativeAttr","placeholder","errorMessage"],["class","er__container--login-button",4,"ngIf"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"button-icon",1),Y("onClick",function(){return i.back()}),m(),U(2,zct,4,3,"div",2)(3,jct,4,3,"div",2)(4,Hct,7,6,"div",2),m(),U(5,$ct,5,3,"form",3)(6,Qct,4,2,"form",3)),2&e&&(d(),l("bclass","er__button--back--bclass")("icon",ne(8,Yct,i.EIcons.ARROW_BACK)),Hn("data-cy","email-login-back-button"),d(),l("ngIf",i.shownPage===i.EPage.Email),d(),l("ngIf",i.shownPage===i.EPage.Password),d(),l("ngIf",i.shownPage===i.EPage.Register),d(),l("ngIf",i.loginForm),d(),l("ngIf",i.registerForm))},dependencies:[Xe,Ne,pn,ei,il,Su,Ql,yu,wl,Yl,qe],styles:["[_nghost-%COMP%]{position:relative;height:100%;min-height:26rem;width:calc(100% - 2rem);max-width:35rem;margin:2% auto;padding:0 1rem;display:flex;flex-flow:column nowrap}@media screen and (max-width: 980px) and (orientation: landscape){[_nghost-%COMP%]{min-height:unset!important}}.er__container--title[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;align-items:center;justify-content:center;flex-flow:row wrap;margin-bottom:1rem;min-width:25rem}.er__container--title--text[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;text-align:center;font-size:1.8rem}@media screen and (max-width: 568px){.er__container--title--text[_ngcontent-%COMP%]{font-size:1.4rem}}.er__button--back[_ngcontent-%COMP%]{position:absolute;left:0;transform:translate(-100%)}@media screen and (max-width: 568px){.er__button--back[_ngcontent-%COMP%]{font-size:1.8rem;transform:translate(-50%)}}.er__container--input-fields[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap}.from-email-to-register[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromRight .2s ease-out forwards}.from-register-to-email[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromLeft .2s ease-out forwards}.from-email-to-password[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromRight .2s ease-out forwards}.from-password-to-email[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromLeft .2s ease-out forwards}.er__container--input-wrapper[_ngcontent-%COMP%]{position:relative;width:100%}.er__container--input-wrapper[_ngcontent-%COMP%]   .er__input[_ngcontent-%COMP%]{display:block;margin-bottom:1rem!important}.er__text--forgotten[_ngcontent-%COMP%]{margin-top:1rem;display:inline-block}.er__container--login-button[_ngcontent-%COMP%]{text-align:center}@keyframes _ngcontent-%COMP%_showFromLeft{0%{transform:translate(-90%)}to{transform:translate(0)}}@keyframes _ngcontent-%COMP%_showFromRight{0%{transform:translate(90%)}to{transform:translate(0)}}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EPage||(t.EPage={})).Email="email",o.Password="password",o.Register="register"}(vL||(vL={}));var Jct=lt.TooManyRequests;const Xct=["input"];function elt(t,n){1&t&&(p(0,"div")(1,"p",4),H(2),V(3,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,1,"HOME_COMPONENT.ENTER_PHONE")," "))}function tlt(t,n){1&t&&(p(0,"div")(1,"p",4),H(2),V(3,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,1,"HOME_COMPONENT.ENTER_PASSWORD")," "))}function nlt(t,n){1&t&&(p(0,"div")(1,"p",4),H(2),V(3,"translate"),m(),p(4,"p",4),H(5),V(6,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,2,"REGISTER_COMPONENT.NOT_REGISTERED")," "),d(3),ze(" ",$(6,4,"REGISTER_COMPONENT.CREATE_ACCOUNT")," "))}function ilt(t,n){if(1&t&&(Tn(0),p(1,"div",19)(2,"p"),H(3),V(4,"translate"),m()(),Pn()),2&t){const o=_(4);d(3),se($(4,1,o.select.current.text))}}const olt=t=>({"custom-select__option-text-selected":t});function rlt(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",21),Y("select",function(i){return oe(o),re(_(5).changePhoneCode(i))}),p(1,"div",22)(2,"p",23),H(3),V(4,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(5);l("value",o),d(),l("ngClass",o.value===e.select.current.value?"phone-register__custom-select__option__selected ":""),d(),l("ngClass",ne(6,olt,e.select.current&&e.select.current===o)),d(),se($(4,4,o.text))}}function slt(t,n){if(1&t&&U(0,rlt,5,8,"custom-select-item",20),2&t){const o=_(4);l("ngForOf",o.select.options)("ngForTrackBy",o.trackByFn)}}function alt(t,n){1&t&&(p(0,"custom-select",16),U(1,ilt,5,3,"ng-template",null,17,ft)(3,slt,1,2,"ng-template",null,18,ft),m()),2&t&&l("buttonCustomCss","phone-register__custom-select__expand--color")}function clt(t,n){if(1&t){const o=Ce();p(0,"user-input",24,25),Y("rawPhoneNumberChange",function(i){return oe(o),re(_(3).onRawPhoneNumberChanged(i))}),m()}if(2&t){const o=_(3);l("fieldId","phone-number")("icon",o.EIcons.PHONE)("type","tel")("errorMessage",o.formError.phoneNumber)("placeholder","XXX-XXX-XXX")("phoneMaxLength",o.config.core.validations.formFields.phone.maxLength)}}const z8=t=>[t];function llt(t,n){if(1&t){const o=Ce();p(0,"div",10)(1,"div",11),U(2,alt,5,1,"custom-select",12)(3,clt,2,6,"user-input",13),m(),p(4,"div",14)(5,"button-text",15),Y("onClick",function(){return oe(o),re(_(2).handleSubmit())}),p(6,"p"),H(7),V(8,"translate"),m()()()()}if(2&t){const o=_(2);l("ngClass",ne(8,z8,o.transition)),d(2),l("ngIf",o.select&&o.select.options.length>1),d(),l("ngIf",o.shownPage===o.EPage.Phone),d(2),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isActionInProgress),d(2),ze(" ",$(8,6,"BUTTON.CONTINUE")," ")}}const j8=()=>({autocomplete:"off"});function ult(t,n){if(1&t){const o=Ce();p(0,"div",26),Y("animationend",function(){return oe(o),re(_(2).onAnimationEnd())}),p(1,"div",11),B(2,"user-input",27,25),V(4,"translate"),m(),p(5,"div",14)(6,"button-text",15),Y("onClick",function(){return oe(o),re(_(2).handleSubmit())}),p(7,"p"),H(8),V(9,"translate"),m()(),p(10,"a",28),H(11),V(12,"translate"),m()()()}if(2&t){const o=_(2);l("ngClass",ne(17,z8,o.transition)),d(2),l("fieldId","password")("icon",o.EIcons.LOCKER)("type","password")("nativeAttr",pt(19,j8))("placeholder",$(4,11,"PLACEHOLDERS.ENTER_PASSWORD"))("errorMessage",o.formError.password),d(4),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isActionInProgress),d(2),ze(" ",$(9,13,"LOGIN")," "),d(3),ze(" ",$(12,15,"FORGOTTEN_PASS")," ")}}function dlt(t,n){if(1&t){const o=Ce();p(0,"form",5),Y("keydown.enter",function(){return oe(o),re(_().handleSubmit())}),B(1,"input",6)(2,"input",7),U(3,llt,9,10,"div",8)(4,ult,13,20,"div",9),m()}if(2&t){const o=_();l("formGroup",o.loginForm),d(3),l("ngIf",o.shownPage===o.EPage.Phone),d(),l("ngIf",o.shownPage===o.EPage.Password)}}function plt(t,n){if(1&t){const o=Ce();p(0,"div",26),Y("animationend",function(){return oe(o),re(_(2).onAnimationEnd())}),p(1,"div",11),B(2,"user-input",29,25),V(4,"translate"),m(),p(5,"div",11),B(6,"user-input",27),V(7,"translate"),m(),p(8,"div",11),B(9,"user-input",30),V(10,"translate"),m(),p(11,"div",14)(12,"button-text",15),Y("onClick",function(){return oe(o),re(_(2).handleSubmit())}),H(13),V(14,"translate"),m()()()}if(2&t){const o=_(2);l("ngClass",ne(29,z8,o.transition)),d(2),l("fieldId","confirmation-code")("type","text")("icon",o.EIcons.CHECK)("errorMessage",o.formError.confirmationCode)("placeholder",$(4,21,"PLACEHOLDERS.CONFIRMATION_CODE")),d(4),l("fieldId","password")("icon",o.EIcons.LOCKER)("type","password")("nativeAttr",pt(31,j8))("placeholder",$(7,23,"PLACEHOLDERS.ENTER_PASSWORD"))("errorMessage",o.formError.password),d(3),l("fieldId","password-repeat")("icon",o.EIcons.LOCKER)("type","password")("nativeAttr",pt(32,j8))("placeholder",$(10,25,"PLACEHOLDERS.REPEAT_PASS"))("errorMessage",o.formError.password_repeat),d(3),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isActionInProgress),d(),ze(" ",$(14,27,"BUTTON.REGISTER")," ")}}function hlt(t,n){if(1&t){const o=Ce();p(0,"form",5),Y("keydown.enter",function(){return oe(o),re(_().handleSubmit())}),B(1,"input",6)(2,"input",7),U(3,plt,15,33,"div",9),m()}if(2&t){const o=_();l("formGroup",o.registerForm),d(3),l("ngIf",o.shownPage===o.EPage.Register)}}const mlt=t=>({name:t});let bL=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.config=e,this.auth=i,this.formBuilder=r,this.fieldValidatorFactory=s,this.cdr=a,this.timeLeftPipe=c,this.onRegisterDisabled=u=>{},this.formError={},this.EIcons=ve.EIcons,this.buttonModifier=ve.EButtonModifier,this.shownPage=n.EPage.Phone,this.EPage=n.EPage,this.transition="",this.rawNumberValue=""}ngOnInit(){this.createForms(),this.select=this.buildSelectOptions(this.config.platform.phoneCodes),this.valueChangeSubs=this.registerForm.valueChanges.subscribe(()=>this.resetErrors()),this.cdr.detectChanges()}ngOnDestroy(){var e,i;null===(e=this.valueChangeSubs)||void 0===e||e.unsubscribe(),null===(i=this.input)||void 0===i||i.blur()}sendConfirmationCode(){var e=this;return f(function*(){if(e.loginForm.get("phoneNumber").valid)try{e.setIsActionInProgress(!0);const i=e.loginForm.get("phoneNumber").value;if(yield e.auth.isPhoneRegistered(i))e.goTo(n.EPage.Password);else{if(!e.config.platform.registrationConfig.phoneNumber.isRegistrationEnabled)return void e.onRegisterDisabled();yield e.auth.sendConfirmationCode(i),e.goTo(n.EPage.Register)}}catch(i){console.log(i),i instanceof yh.NotValid&&i.property?"phoneNumber"===i.property?(e.setErrorMessage("phoneNumber",{key:"API_ERRORS.InvalidPhoneNumber"}),e.goTo(n.EPage.Phone)):e.setErrorMessage("phoneNumber",{key:"API_ERRORS.ServerError"}):e.formError.phoneNumber={key:"API_ERRORS.ServerError"}}finally{e.setIsActionInProgress(!1)}else e.setFieldErrors(e.loginForm,"phoneNumber")})()}changePhoneCode(e){this.select.current=this.select.options.find(i=>i.value===e.value),this.loginForm.get("phoneNumber").setValue(this.select.current.value+this.rawNumberValue)}trackByFn(e,i){return e}login(){var e=this;return f(function*(){if(e.loginForm.get("password").valid)try{e.setIsActionInProgress(!0),yield e.auth.login(Gt.PhoneNumber,{phoneNumber:e.loginForm.value.phoneNumber,password:e.loginForm.value.password})}catch(r){if(console.log(r),r instanceof lt.NetworkError)e.setErrorMessage("password",{key:"ERRORS.CONNECTION_ERROR"});else if(r instanceof Jct){var i;const s=null===(i=e.config.platform.registrationConfig.rateLimits)||void 0===i?void 0:i.login,a=e.timeLeftPipe.transform(s.blockDuration,{timeConfig:Zu});e.onRegisterDisabled({key:"LOGIN_COMPONENT.MAXIMUM_LOGIN_ATTEMPTS_BLOCKED_MESSAGE",params:[a]})}else e.setErrorMessage("password",{key:"API_ERRORS.UserNotFound"});e.setIsActionInProgress(!1)}else e.setFieldErrors(e.loginForm,"password")})()}register(){var e=this;return f(function*(){if(e.resetErrors(),e.registerForm.get("phoneNumber").setValue(e.loginForm.get("phoneNumber").value),gc.isFormValid(e.registerForm))try{e.setIsActionInProgress(!0),yield e.auth.register(Gt.PhoneNumber,e.registerForm.value,{autoLogin:!0})}catch(i){console.log(i),i instanceof yh.NotValid&&i.property?"password"===i.property?e.setErrorMessage("password",{key:"API_ERRORS.NotValid.Password"}):"phoneNumber"===i.property?(e.setErrorMessage("phoneNumber",{key:"API_ERRORS.PhoneNumberAlreadyExists"}),e.goTo(n.EPage.Phone)):"confirmationCode"===i.property?e.setErrorMessage("confirmationCode",{key:"API_ERRORS.ConfirmationCodeNotValid"}):e.setErrorMessage("password",{key:"API_ERRORS.ServerError"}):i instanceof et.Permissions.ActionNotAllowed?e.onRegisterDisabled():e.setErrorMessage("password",{key:"API_ERRORS.ServerError"}),e.setIsActionInProgress(!1)}else for(let i in gc.getFormErroredFields(e.registerForm))i&&e.setFieldErrors(e.registerForm,i)})()}buildSelectOptions(e){const i=[];return e.forEach(r=>{i.push({value:r.code,text:"+".concat(r.code)})}),{current:i[0],options:i}}createForms(){this.loginForm=this.formBuilder.group({phoneNumber_:["",Ln.compose([...this.fieldValidatorFactory.createPhoneValidator().validators,Ln.required])],phoneNumber:["",Ln.compose([...this.fieldValidatorFactory.createPhoneValidator().validators,Ln.required])],password:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])]}),this.registerForm=this.formBuilder.group({phoneNumber:["",Ln.compose([...this.fieldValidatorFactory.createPhoneValidator().validators,Ln.required])],confirmationCode:["",Ln.compose([Ln.required])],password:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])],password_repeat:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])]},{validator:gc.getSameFieldsValidatorConfig(["password","password_repeat"])})}onRawPhoneNumberChanged(e){this.resetErrors(),this.rawNumberValue=e,this.loginForm.get("phoneNumber").setValue(this.select.current.value+e)}goTo(e){this.transition="from-".concat(this.shownPage,"-to-").concat(e),this.shownPage=e,this.cdr.detectChanges()}onAnimationEnd(){var e;null===(e=this.input)||void 0===e||e.focus()}back(){switch(this.shownPage){case n.EPage.Phone:this.backClicked();break;case n.EPage.Password:case n.EPage.Register:this.goTo(n.EPage.Phone)}}handleSubmit(){switch(this.shownPage){case n.EPage.Phone:this.sendConfirmationCode();break;case n.EPage.Password:this.login();break;case n.EPage.Register:this.register()}}setIsActionInProgress(e){this.isActionInProgress=e,this.cdr.detectChanges()}setFieldErrors(e,i){for(let r in e.controls[i].errors)r&&e.controls[i].errors[r]&&(this.formError[i]=this.getErrorText(i,r));this.cdr.detectChanges()}setErrorMessage(e,i){this.formError[e]=i,this.cdr.detectChanges()}resetErrors(){for(let e in this.formError)this.formError.hasOwnProperty(e)&&(this.formError[e]=void 0);this.cdr.detectChanges()}getErrorText(e,i){const r=this.config.core.validations.formFields;let s={key:""};switch(e){case"phoneNumber":s.key="API_ERRORS.InvalidPhoneNumber",s.params=[r.phone.minLength,r.phone.maxLength];break;case"confirmationCode":s.key="API_ERRORS.ConfirmationCodeNotValid";break;case"password":case"password_repeat":"dontmatch"===i?s.key="API_ERRORS.PasswordDontMatch":(s.key="API_ERRORS.PasswordLength",s.params=[r.password.minLength,r.password.maxLength]);break;default:s=void 0}return s}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Dr),g(Tg),g(td),g(wa),g(Re),g(Ps))},t.\u0275cmp=pe({type:t,selectors:[["phone-register"]],viewQuery:function(e,i){if(1&e&&$e(Xct,5),2&e){let r;je(r=He())&&(i.input=r.first)}},inputs:{backClicked:"backClicked",onRegisterDisabled:"onRegisterDisabled"},decls:7,vars:8,consts:[[1,"pr__container--title"],["id","back",1,"pr__button--back",3,"icon","onClick"],[4,"ngIf"],["autocomplete","off","novalidate","",3,"formGroup","keydown.enter",4,"ngIf"],[1,"pr__container--title--text"],["autocomplete","off","novalidate","",3,"formGroup","keydown.enter"],["type","email",2,"display","none"],["type","password",2,"display","none"],["class","pr__container--input-fields",3,"ngClass",4,"ngIf"],["class","pr__container--input-fields",3,"ngClass","animationend",4,"ngIf"],[1,"pr__container--input-fields",3,"ngClass"],[1,"pr__container--input-wrapper"],["class","phone-register__custom-select custom-select lang",3,"buttonCustomCss",4,"ngIf"],["id","phone-number","class","pr__input","formControlName","phoneNumber_","PhoneMask","",3,"fieldId","icon","type","errorMessage","placeholder","phoneMaxLength","rawPhoneNumberChange",4,"ngIf"],[1,"pr__container--login-button"],[3,"buttonModifier","loading","onClick"],[1,"phone-register__custom-select","custom-select","lang",3,"buttonCustomCss"],["selectedItem",""],["options",""],[1,"phone-register__custom-select__label"],[3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","select"],[1,"phone-register__custom-select__option",3,"ngClass"],[1,"phone-register__custom-select__option__text",3,"ngClass"],["id","phone-number","formControlName","phoneNumber_","PhoneMask","",1,"pr__input",3,"fieldId","icon","type","errorMessage","placeholder","phoneMaxLength","rawPhoneNumberChange"],["input",""],[1,"pr__container--input-fields",3,"ngClass","animationend"],["formControlName","password",1,"pr__input",3,"fieldId","icon","type","nativeAttr","placeholder","errorMessage"],["routerLink","/forgotten-pass",1,"pr__text--forgotten"],["formControlName","confirmationCode",1,"pr__input",3,"fieldId","type","icon","errorMessage","placeholder"],["formControlName","password_repeat",1,"pr__input",3,"fieldId","icon","type","nativeAttr","placeholder","errorMessage"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"button-icon",1),Y("onClick",function(){return i.back()}),m(),U(2,elt,4,3,"div",2)(3,tlt,4,3,"div",2)(4,nlt,7,6,"div",2),m(),U(5,dlt,5,3,"form",3)(6,hlt,4,2,"form",3)),2&e&&(d(),l("icon",ne(6,mlt,i.EIcons.ARROW_BACK)),d(),l("ngIf",i.shownPage===i.EPage.Phone),d(),l("ngIf",i.shownPage===i.EPage.Password),d(),l("ngIf",i.shownPage===i.EPage.Register),d(),l("ngIf",i.loginForm),d(),l("ngIf",i.registerForm))},dependencies:[Xe,Mt,Ne,eP,Up,Vd,pn,ei,il,U4,Su,Ql,yu,wl,Yl,qe],styles:["[_nghost-%COMP%]{position:relative;height:100%;min-height:26rem;width:calc(100% - 2rem);max-width:35rem;margin:2% auto;padding:0 1rem;display:flex;flex-flow:column nowrap}.pr__container--title[_ngcontent-%COMP%]{position:relative;width:100%;height:4rem;display:flex;align-items:center;justify-content:center;flex-flow:row wrap;margin-bottom:1rem;min-width:25rem}.pr__button--back[_ngcontent-%COMP%]{position:absolute;left:0;transform:translate(-50%)}@media screen and (max-width: 568px){.pr__button--back[_ngcontent-%COMP%]{font-size:1.8rem}}.pr__container--input-fields[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap}.pr__container--input-wrapper[_ngcontent-%COMP%]{width:100%;display:flex}.from-phone-to-register[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromRight .2s ease-out forwards}.from-register-to-phone[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromLeft .2s ease-out forwards}.from-phone-to-password[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromRight .2s ease-out forwards}.from-password-to-phone[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromLeft .2s ease-out forwards}.pr__input[_ngcontent-%COMP%]{display:block;margin-bottom:1rem!important}.pr__container--login-button[_ngcontent-%COMP%]{margin:1rem 0}.pr__text--forgotten[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:center;align-items:center}.pr__container--title--text[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;text-align:center;font-size:1.8rem}@media screen and (max-width: 568px){.pr__container--title--text[_ngcontent-%COMP%]{font-size:1.4rem}}@keyframes _ngcontent-%COMP%_showFromLeft{0%{transform:translate(-90%)}to{transform:translate(0)}}@keyframes _ngcontent-%COMP%_showFromRight{0%{transform:translate(90%)}to{transform:translate(0)}}.phone-register__custom-select[_ngcontent-%COMP%]{margin-right:.5rem}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EPage||(t.EPage={})).Phone="phone",o.Password="password",o.Register="register"}(bL||(bL={}));var $_e=ve.EButtonTypes;function flt(t,n){if(1&t&&B(0,"icon-component",6),2&t){const o=_();l("icon",o.icon.name)("ngClass",o.iconTypeClass)}}function glt(t,n){if(1&t&&(B(0,"img",7),V(1,"transformUrl")),2&t){const o=_();l("src",$(1,1,null==o.image?null:o.image.url),Wn)}}function _lt(t,n){if(1&t){const o=Ce();p(0,"div",8),Y("click",function(i){return oe(o),re(_().emitDisabledClick(i))}),m()}}function vlt(t,n){1&t&&B(0,"spinner-loader",9)}const blt=(t,n)=>[t,n],Clt=["*"];let so=(()=>{var t;class n extends ei{constructor(e){super(e),this.buttonType=$_e.BUTTON_ICON}ngOnInit(){super.ngOnInit(),this.image&&(this.buttonType=$_e.BUTTON_IMAGE)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji))},t.\u0275cmp=pe({type:t,selectors:[["button-icon-text"]],inputs:{icon:"icon",image:"image"},features:[Ht],ngContentSelectors:Clt,decls:8,vars:11,consts:[["click-feedback","","click-sound","",1,"bc__button",3,"ngClass","sound","type","disabled","click"],["button",""],["class","bc__button--icon-cmp",3,"icon","ngClass",4,"ngIf"],[3,"src",4,"ngIf"],["class","button__wrapper",3,"click",4,"ngIf"],["class","bc__spinner--cmp",4,"ngIf"],[1,"bc__button--icon-cmp",3,"icon","ngClass"],[3,"src"],[1,"button__wrapper",3,"click"],[1,"bc__spinner--cmp"]],template:function(e,i){1&e&&(Co(),p(0,"button",0,1),Y("click",function(s){return i.click(s)}),U(2,flt,1,2,"icon-component",2)(3,glt,2,3,"img",3),p(4,"p"),yo(5),m(),U(6,_lt,1,0,"div",4)(7,vlt,1,0,"spinner-loader",5),m()),2&e&&(l("ngClass",cn(8,blt,"bc__"+i.buttonType+"-text-"+i.buttonModifier,i.bclass))("sound",i.sound)("type",i.type)("disabled",i.disabled||i.loading),d(2),l("ngIf",null==i.icon?null:i.icon.name),d(),l("ngIf",null==i.image?null:i.image.url),d(3),l("ngIf",i.disabled),d(),l("ngIf",i.loading))},dependencies:[Xe,Ne,po,Fd,Dn,vc,uo],styles:["[_nghost-%COMP%]{min-width:12rem;height:4rem;min-height:3rem;display:block;margin:0 auto}@media only screen and (max-width: 768px){[_nghost-%COMP%]{height:3.5rem}}.bc__button--icon-cmp[_ngcontent-%COMP%]{flex-shrink:0;margin-right:.5rem;font-size:1.8rem;position:relative}.button__wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}"],changeDetection:0}),n})();const ylt=t=>({name:t}),Slt=t=>({focused:t});function wlt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",2),Y("onClick",function(){return re(oe(o).$implicit.onClick())}),H(1),V(2,"translate"),m()}if(2&t){const o=n.$implicit;ni("social__button ",o.id,"-button"),l("icon",ne(11,ylt,null==o.image?null:o.image.url))("buttonModifier",o.buttonModifier)("ngClass",ne(13,Slt,o.focused)),Hn("data-cy","login-button-"+o.id),d(),se(yt(2,8,o.text.key,o.text.params))}}let H8=(()=>{var t;class n{constructor(){this.authProviders=[]}trackByFn(e,i){return i.id}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["auth-providers-buttons"]],inputs:{authProviders:"authProviders"},decls:2,vars:2,consts:[[1,"auth--providers__buttons"],[3,"icon","buttonModifier","class","ngClass","onClick",4,"ngFor","ngForOf","ngForTrackBy"],[3,"icon","buttonModifier","ngClass","onClick"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,wlt,3,15,"button-icon-text",1),m()),2&e&&(d(),l("ngForOf",i.authProviders)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,so,qe],styles:["[_nghost-%COMP%]{display:block;width:100%}.auth--providers__buttons[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column wrap;justify-content:center;align-items:center}.social__button[_ngcontent-%COMP%]{margin:.5rem;width:85%;height:5rem}.social__button.focused[_ngcontent-%COMP%]{width:calc(100% - 1rem)}.social__button.guest-button[_ngcontent-%COMP%], .social__button.mobile-button[_ngcontent-%COMP%]{height:3rem!important}@media only screen and (max-width: 568px){.social__button[_ngcontent-%COMP%]{height:4rem}}@media only screen and (max-width: 980px) and (orientation: landscape){.social__button[_ngcontent-%COMP%]{height:4rem}}"],changeDetection:0}),n})();var K_e=ve.EIcons;const Tlt=t=>[t];let Z_e=(()=>{var t;class n{constructor(){this.authProviders=[],this.backButtonIcon={name:K_e.ARROW_BACK},this.EIcons=K_e}back(){this.backClicked()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["disabled-login-method"]],inputs:{backClicked:"backClicked",text:"text",authProviders:"authProviders"},decls:11,vars:11,consts:[[1,"disabled--login__container--title"],["id","back",1,"disabled--login__button--back",3,"icon","onClick"],[1,"disabled--login__container"],[1,"disabled--login__text"],[3,"authProviders"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"button-icon",1),Y("onClick",function(){return i.back()}),m(),p(2,"p"),H(3),V(4,"translate"),m()(),p(5,"container-component",2)(6,"p",3)(7,"span"),H(8),V(9,"translate"),m()()(),B(10,"auth-providers-buttons",4)),2&e&&(d(),l("icon",i.backButtonIcon),d(2),se($(4,4,"REGISTER")),d(5),se(yt(9,6,i.text.key,ne(9,Tlt,i.text.params))),d(2),l("authProviders",i.authProviders))},dependencies:[ei,Ga,H8,qe],styles:["[_nghost-%COMP%]{position:relative;height:100%;min-height:26rem;width:calc(100% - 2rem);max-width:35rem;margin:2% auto;padding:0 1rem;display:flex;flex-flow:column nowrap}.disabled--login__container--title[_ngcontent-%COMP%]{position:relative;width:100%;height:4rem;display:flex;align-items:center;justify-content:center;flex-flow:row wrap;margin-bottom:1rem}.disabled--login__container--title[_ngcontent-%COMP%]   .disabled--login__button--back[_ngcontent-%COMP%]{position:absolute;left:0}.disabled--login__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;text-align:center;font-size:1.8rem}.disabled--login__container[_ngcontent-%COMP%]{height:auto;margin-bottom:2rem}.disabled--login__text[_ngcontent-%COMP%]{text-align:center;padding:1rem 2rem}"],changeDetection:0}),n})(),Plt=(()=>{var t;class n{constructor(e){this.http=e}getOnlineUsersCount(){return this.http.get("users/online/total").toPromise().then(e=>e.body.total)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),q8=(()=>{var t;class n{constructor(){this.icon=ve.EIcons.USERS}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["online-users-counter"]],inputs:{count:"count"},decls:3,vars:2,consts:[[1,"ouc__container"],[1,"ouc__text--icon",3,"icon"],[1,"ouc__text--users",3,"value"]],template:function(e,i){1&e&&(p(0,"section",0),B(1,"icon-component",1)(2,"number",2),m()),2&e&&(d(),l("icon",i.icon),d(),l("value",i.count))},dependencies:[Dn,Qr],styles:[".ouc__container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center}.ouc__text--users[_ngcontent-%COMP%]{display:inline-block;font-size:1.3em;font-weight:600;text-indent:1rem}.ouc__text--icon[_ngcontent-%COMP%]{font-size:1.7em}"],changeDetection:0}),n})();var Ilt=et.General.Banned,Pg=ve.EButtonModifier,Q_e=ve.EIcons,Mlt=et.General.NotFound,Y_e=et.Permissions.ActionNotAllowed;const Olt=["componentContainer"],Elt=["registerCmpViewRef"];function xlt(t,n){1&t&&Un(0)}function Alt(t,n){if(1&t&&(p(0,"p",28),H(1),V(2,"translate"),m()),2&t){const o=_(4);d(),se($(2,1,o.select.current.abbreviation))}}function Rlt(t,n){if(1&t&&(Tn(0),p(1,"div",26),U(2,Alt,3,3,"p",27),p(3,"p"),H(4),V(5,"translate"),m()(),Pn()),2&t){const o=_(3);d(2),l("ngIf",o.select.current.abbreviation),d(2),se($(5,2,o.select.current.text))}}function klt(t,n){1&t&&B(0,"icon-component",36),2&t&&l("icon",_().$implicit.icon)}function Llt(t,n){if(1&t){const o=Ce();p(0,"img",37,38),Y("load",function(){return oe(o),re(Kt(1).hidden=!1)})("error",function(){return oe(o),re(Kt(1).hidden=!0)}),m()}2&t&&l("src",_().$implicit.icon,Wn)}const J_e=t=>({"custom-select__option-text-selected":t});function Dlt(t,n){if(1&t&&(p(0,"p",39),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit,e=_(4);l("ngClass",ne(4,J_e,e.select.current&&e.select.current===o)),d(),se($(2,2,o.abbreviation))}}function Blt(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",30),Y("select",function(i){return oe(o),re(_(4).chooseLang(i))}),p(1,"div",31),U(2,klt,1,1,"icon-component",32)(3,Llt,2,1,"img",33)(4,Dlt,3,6,"p",34),p(5,"p",35),H(6),V(7,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(4);l("value",o),d(),l("ngClass",o.value===e.select.current.value?"home__custom-select__option__selected ":""),d(),l("ngIf",o.icon&&(!o.iconType||"string"!==o.iconType)),d(),l("ngIf",o.icon&&o.iconType&&"string"===o.iconType),d(),l("ngIf",o.abbreviation),d(),l("ngClass",ne(9,J_e,e.select.current&&e.select.current===o)),d(),se($(7,7,o.text))}}function Nlt(t,n){if(1&t&&U(0,Blt,8,11,"custom-select-item",29),2&t){const o=_(3);l("ngForOf",o.select.options)("ngForTrackBy",o.trackByFn)}}function Flt(t,n){1&t&&(p(0,"custom-select",23),U(1,Rlt,6,4,"ng-template",null,24,ft)(3,Nlt,1,2,"ng-template",null,25,ft),m()),2&t&&l("buttonCustomCss","home__custom-select__expand--color")}const X_e=t=>[t];function Ult(t,n){if(1&t&&(p(0,"div",18)(1,"div",19),U(2,Flt,5,1,"custom-select",20),m(),p(3,"div",21),B(4,"auth-providers-buttons",22),m()()),2&t){const o=_();l("ngClass",ne(3,X_e,o.transition)),d(2),l("ngIf",o.select&&o.select.options.length>1),d(2),l("authProviders",o.authProviders)}}function Glt(t,n){}var dM=function(t){return t.LangChooser="langChooser",t.Login="login",t.EmailRegister="emailRegister",t.PhoneRegister="phoneRegister",t.DisabledLoginMethod="disabledLogin",t}(dM||{});let eve=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me){var ge=this;this.exceptionTracker=me,this.authProviders=[],this.buttonModifier=Pg,this.iconNames=Q_e,this.EIcons=Q_e,this.homeViewStates=dM,this.transition="",this.changeHomeView=Me=>{this.setHomeView(null!=Me?Me:this.homeViewStates.Login)},this.doGuestLogin=f(function*(){ge.services.loader.on();try{yield ge.services.authService.loginAsGuest()}catch(Me){if(console.warn("Error guestLogin homeComponent",Me),ge.services.loader.off(),Me instanceof Ilt)ge.services.banService.onUserBanned(Me.status);else if(!(Me instanceof Mlt&&ge.services.appService.isMobileApp()||Me instanceof et.General.DeactivatedAccount))if(Me instanceof Y_e){const Ke=ge.services.appService.isMobileApp()?Gt.Mobile:Gt.Guest;ge.showDisabledRegisterPage(Ke,{key:"LOGIN_COMPONENT.DISABLED_GUEST_LOGIN"})}else ge.services.toaster.error("API_ERRORS.InvalidParams")}finally{ge.services.loader.off()}}),this.fbLogin=()=>{this.signInOrRegisterIfNotFound(Gt.Facebook)},this.googleLogin=()=>{this.signInOrRegisterIfNotFound(Gt.Google)},this.twitterLogin=()=>{this.signInOrRegisterIfNotFound(Gt.Twitter)},this.appleLogin=()=>{this.services.appleService.isSignInPermitted()?this.signInOrRegisterIfNotFound(Gt.Apple):this.services.toaster.info("FACEBOOK.permissionCancelledFacebookLogin")},this.phoneNumberRegister=()=>{this.setHomeView(dM.PhoneRegister),this.compRef=this.registerCmpViewRef.createComponent(bL),this.compRef.instance.backClicked=this.changeHomeView,this.compRef.instance.onRegisterDisabled=Me=>this.showDisabledRegisterPage(Gt.PhoneNumber,Me),this.cdr.detectChanges()},this.registerNavigate=()=>{this.setHomeView(dM.EmailRegister),this.compRef=this.registerCmpViewRef.createComponent(vL),this.compRef.instance.backClicked=this.changeHomeView,this.compRef.instance.onRegisterDisabled=Me=>this.showDisabledRegisterPage(Gt.Email,Me),this.cdr.detectChanges()},this.showDisabledRegisterPage=(Me,Ke)=>{this.setHomeView(dM.DisabledLoginMethod),this.compRef=this.registerCmpViewRef.createComponent(Z_e),this.compRef.instance.backClicked=this.changeHomeView,this.compRef.instance.authProviders=this.authProviders.filter(Ee=>Ee.id!==Me),this.compRef.instance.text=null!=Ke?Ke:{key:"LOGIN_COMPONENT.DISABLED_AUTH_METHOD_REGISTER",params:[Me]},this.cdr.detectChanges()},this.services={fieldValidatorFactory:K,formBuilder:G,translation:R,appLanguage:b,authService:i,appState:s,appService:u,banService:a,loader:e,toaster:r,homeService:c,accountMigrationService:w,appleService:te,appStorageService:ee},this.currentLang=this.services.appLanguage.getAppLanguage(),this.availableLanguages=h.platform.languages.list,this.buildProviderButtons(h),this.config=h,this.cdr=le}ngOnInit(){this.services.loader.off(),this.services.authService.logout(),this.services.accountMigrationService.migrationToken=void 0,this.services.homeService.getOnlineUsersCount().then(e=>{this.onlineUsersCount=e,this.cdr.detectChanges()}).catch(e=>{console.warn("getOnlineUsersCount error: ",e)})}ngAfterViewInit(){let e=[];const i=this.services.translation.instant("LANGUAGES");this.availableLanguages.forEach(r=>{e.push({value:r,text:i[r.toUpperCase()].FULL})}),this.select={control:{type:rd.EControlType.Input},current:{value:this.currentLang,text:i[this.currentLang.toUpperCase()].FULL},options:e},this.changeHomeView(),this.cdr.detectChanges()}chooseLang(e){this.currentLang!==e.value&&(this.currentLang=this.services.appLanguage.validateLanguage(e.value),this.services.appLanguage.setLocalStorageLanguage(this.currentLang),window.location.reload())}openExternalUrl(e){this.services.appService.openExternalUrl("https://".concat(this.config.platform.staticPagesDomain).concat(e,"/").concat(this.services.appLanguage.getAppLanguage()))}buildProviderButtons(e){this.socialButtonImages={[Gt.Google]:{url:"icons/google.svg"},[Gt.Facebook]:{url:"icons/fb-logo.svg"},[Gt.Twitter]:{url:"icons/twitter-logo.svg"},[Gt.Apple]:{url:"icons/apple-logo.svg"},[Gt.PhoneNumber]:{url:"icons/phone.svg"},[Gt.Email]:{url:"icons/email.svg"}};const i=this.services.appService.getPlatform();this.authProviders=e.platform.registrationConfig.platformsConfig[i].availableMethods.filter(r=>!(r===Gt.Apple&&!this.services.appleService.isSignInPermitted())&&e.platform.registrationConfig[r].enabled).map(r=>({id:r,text:r===Gt.Guest||r===Gt.Mobile?{key:"HOME_COMPONENT.CONTINUE_AS_V6",params:[this.services.translation.instant("HOME_COMPONENT.AS_GUEST")]}:{key:"".concat(r.toUpperCase(),"_LOGIN")},focused:!!e.platform.registrationConfig.platformsConfig[i].focusedMethods.find(s=>s===r),image:this.socialButtonImages[r],onClick:this.getAuthProviderButtonAction(r),buttonModifier:this.getAuthProviderButtonModifier(r)}))}getAuthProviderButtonAction(e){switch(e){case Gt.Facebook:return this.fbLogin;case Gt.Google:return this.googleLogin;case Gt.Twitter:return this.twitterLogin;case Gt.Apple:return this.appleLogin;case Gt.PhoneNumber:return this.phoneNumberRegister;case Gt.Email:return this.registerNavigate;case Gt.Mobile:case Gt.Guest:return this.doGuestLogin;default:return()=>{}}}getAuthProviderButtonModifier(e){switch(e){case Gt.Facebook:return Pg.BUTTON_FB;case Gt.Google:return Pg.BUTTON_GOOGLE;case Gt.Twitter:return Pg.BUTTON_TWITTER;case Gt.Apple:return Pg.BUTTON_WHITE;case Gt.PhoneNumber:return Pg.BUTTON_PHONE;case Gt.Email:return Pg.BUTTON_EMAIL;case Gt.Mobile:case Gt.Guest:return Pg.BUTTON_TRANSPARENT;default:return Pg.BUTTON_ACTION}}signInOrRegisterIfNotFound(e){var i=this;return f(function*(){e!==Gt.Google&&i.services.loader.on();try{yield i.services.authService.login(e,{autoRegister:!0})}catch(r){console.warn("Error loginComponent",r),i.exceptionTracker.captureException(r),r instanceof lt.NetworkError?i.services.toaster.error("ERRORS.CONNECTION_ERROR"):r instanceof et.General.Banned||r instanceof et.General.DeactivatedAccount?console.warn(r):r instanceof Y_e?i.showDisabledRegisterPage(e):i.services.toaster.info("FACEBOOK.permissionCancelledFacebookLogin")}finally{i.services.loader.off()}})()}trackByFn(e,i){return e}destroyCurrentComponentRef(){var e,i;null===(e=this.compRef)||void 0===e||e.destroy(),null===(i=this.registerCmpViewRef)||void 0===i||i.clear()}setHomeView(e){this.transition="from-".concat(this.homeViewShown,"-to-").concat(e),this.destroyCurrentComponentRef(),this.homeViewShown=e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ro),g(Tg),g(Dt),g(Sa),g(KI),g(Plt),g(Qt),g(Dr),g(Ma),g(GR),g(pi),g(td),g(wa),g(mI),g(Ci),g(Re),g(uv))},t.\u0275cmp=pe({type:t,selectors:[["home"]],viewQuery:function(e,i){if(1&e&&($e(Olt,5,$t),$e(Elt,5,bs)),2&e){let r;je(r=He())&&(i.componentContainer=r.first),je(r=He())&&(i.registerCmpViewRef=r.first)}},decls:26,vars:18,consts:[[1,"home__wrapper"],[1,"home__container--logo-actions"],[1,"home__container--logo"],[1,"home__image--logo"],[1,"home__container--counter",3,"hidden"],[3,"count"],[1,"home__container--players-online-text"],[1,"home__image--game-element"],[1,"app__container--user-login"],["componentContainer",""],[4,"ngIf","ngIfThen","ngIfElse"],["loginView",""],[1,"login__dynamic",3,"ngClass"],["registerCmpViewRef",""],[1,"home__container--terms"],["text-with-placeholders","",1,"home__text--terms-privacy",3,"key"],[1,"home__link","home__link--terms",3,"click"],[1,"home__link","home__link--privacy",3,"click"],[1,"login__wrapper",3,"ngClass"],[1,"home__container--language"],["class","home__custom-select--lang custom-select lang",3,"buttonCustomCss",4,"ngIf"],[1,"home__container--login"],[3,"authProviders"],[1,"home__custom-select--lang","custom-select","lang",3,"buttonCustomCss"],["selectedItem",""],["options",""],[1,"home__custom-select__label"],["class","home-custom-select--abbreviation",4,"ngIf"],[1,"home-custom-select--abbreviation"],[3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","select"],[1,"home__custom-select__option",3,"ngClass"],["class","home__custom-select__icon",3,"icon",4,"ngIf"],["class","home__custom-select__icon image",3,"src","load","error",4,"ngIf"],["class","custom-select--abbreviation",3,"ngClass",4,"ngIf"],[3,"ngClass"],[1,"home__custom-select__icon",3,"icon"],[1,"home__custom-select__icon","image",3,"src","load","error"],["imgCountry",""],[1,"custom-select--abbreviation",3,"ngClass"]],template:function(e,i){if(1&e&&(p(0,"section",0)(1,"section",1)(2,"section",2),B(3,"div",3),p(4,"div",4),B(5,"online-users-counter",5),m(),p(6,"div",6),H(7),V(8,"translate"),m(),B(9,"div",7),m(),p(10,"section",8,9),U(12,xlt,1,0,"ng-container",10)(13,Ult,5,5,"ng-template",null,11,ft),p(15,"div",12),U(16,Glt,0,0,"ng-template",null,13,ft),m()()(),p(18,"div",14)(19,"p",15)(20,"a",16),Y("click",function(){return i.openExternalUrl("/terms-of-use")}),H(21),V(22,"translate"),m(),p(23,"a",17),Y("click",function(){return i.openExternalUrl("/privacy-policy")}),H(24),V(25,"translate"),m()()()()),2&e){const r=Kt(14),s=Kt(17);d(4),l("hidden",i.onlineUsersCount>0),d(),l("count",i.onlineUsersCount),d(2),se($(8,10,"HOME_COMPONENT.PLAYERS_ONLINE")),d(5),l("ngIf",i.homeViewShown===i.homeViewStates.Login)("ngIfThen",r)("ngIfElse",s),d(3),l("ngClass",ne(16,X_e,i.transition)),d(4),l("key","LOGIN_COMPONENT.TERMS_AND_PRIVACY_POLICY_REGISTER"),d(2),se($(22,12,"LOGIN_COMPONENT.TERMS_OF_USE")),d(3),se($(25,14,"LOGIN_COMPONENT.PRIVACY_POLICY"))}},dependencies:[Xe,Mt,Ne,oc,q8,Dn,Up,Vd,H8,qe],styles:[".home__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;justify-content:space-between;width:100%;height:100%;min-height:5.4rem;animation:fadeIn .3s linear}.home__container--logo-actions[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;justify-content:space-between;width:100%;height:100%}@media only screen and (max-width: 980px) and (orientation: landscape){.home__container--logo-actions[_ngcontent-%COMP%]{flex-flow:row}}.home__container--logo[_ngcontent-%COMP%]{position:relative;width:80%;max-width:100%;flex:1;padding-top:4rem;display:flex;flex-flow:column nowrap;align-items:center;justify-content:flex-end}@media only screen and (orientation: portrait){.home__container--logo[_ngcontent-%COMP%]{width:100%;padding-top:.5rem}}@media only screen and (max-height: 480px) and (orientation: portrait){.home__container--logo[_ngcontent-%COMP%]{justify-content:center}}@media only screen and (max-width: 980px) and (orientation: landscape){.home__container--logo[_ngcontent-%COMP%]{justify-content:center}}@media only screen and (max-height: 480px) and (orientation: landscape){.home__container--logo[_ngcontent-%COMP%]{padding-top:0;height:40%;flex:auto}}.home__image--logo[_ngcontent-%COMP%]{width:100%;height:15%;min-height:5rem}.home__container--counter[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap;justify-content:center;margin:1% auto;font-size:1.4rem}.home__image--game-element[_ngcontent-%COMP%]{width:130%;flex:1 1 100%;margin:1rem 0;max-height:40rem;max-width:100%}@media only screen and (max-height: 480px){.home__image--game-element[_ngcontent-%COMP%]{display:none}}.app__container--user-login[_ngcontent-%COMP%]{display:block;width:100%;min-height:30rem}@media only screen and (orientation: portrait){.app__container--user-login[_ngcontent-%COMP%]{min-height:27rem}}@media only screen and (max-width: 980px) and (orientation: landscape){.app__container--user-login[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center}}.home__container--login[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;width:100%;max-width:35rem;margin:2% auto}@media only screen and (orientation: landscape){.home__container--login[_ngcontent-%COMP%]{height:auto}}@media only screen and (max-width: 980px) and (orientation: landscape){.home__container--login[_ngcontent-%COMP%]{max-width:26rem}}@media only screen and (orientation: portrait) and (max-width: 980px){.home__container--login[_ngcontent-%COMP%]{max-width:28rem}}@media only screen and (max-height: 320px){.home__container--login[_ngcontent-%COMP%]{margin:0 auto}}.home__container--login[_ngcontent-%COMP%] > form[_ngcontent-%COMP%]{width:100%}.home__container--login[_ngcontent-%COMP%]   .phone-number-button[_ngcontent-%COMP%]{width:100%;margin-top:.5rem}.home__container--language[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:1rem 0}@media only screen and (min-width: 768px) and (max-width: 980px) and (orientation: landscape){.home__container--language[_ngcontent-%COMP%]{margin-bottom:auto;margin-top:1rem}}.home__container--language[_ngcontent-%COMP%]   .home__custom-select--lang[_ngcontent-%COMP%]{width:14rem;height:4rem}.from-login-to-emailRegister[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromRightHomeScreen .2s ease-out forwards}.from-emailRegister-to-login[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromLeftHomeScreen .2s ease-out forwards}.from-login-to-phoneRegister[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromRightHomeScreen .2s ease-out forwards}.from-phoneRegister-to-login[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_showFromLeftHomeScreen .2s ease-out forwards}.home__text--terms-privacy[_ngcontent-%COMP%]{flex:1;margin:0 .5rem;text-align:center;font-size:1.4rem}.lang-ar[_ngcontent-%COMP%]   .home__text--terms-privacy[_ngcontent-%COMP%], .lang-fa[_ngcontent-%COMP%]   .home__text--terms-privacy[_ngcontent-%COMP%]{direction:rtl}@media only screen and (max-width: 768px){.home__text--terms-privacy[_ngcontent-%COMP%]{font-size:1.2rem}}@media only screen and (max-height: 440px) and (min-width: 768px) and (orientation: landscape){.home__text--terms-privacy[_ngcontent-%COMP%]{font-size:1.2rem}}.home__container--terms[_ngcontent-%COMP%]{flex-flow:row wrap;justify-content:center;align-items:center;margin:1rem 0;position:relative;width:100%;padding:1rem;display:flex}.home__link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}@keyframes _ngcontent-%COMP%_showFromLeftHomeScreen{0%{transform:translate(-60%)}to{transform:translate(0)}}@keyframes _ngcontent-%COMP%_showFromRightHomeScreen{0%{transform:translate(60%)}to{transform:translate(0)}}.home__custom-select__option[_ngcontent-%COMP%]{padding:1rem}.home__container--players-online-text[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})();const tve=[{path:"home",component:eve}];let nve=(()=>{var t;class n{constructor(e){this.router=e}isAuthorized(){return Promise.resolve(!1)}onLogin(){return this.router.navigate(["/facebook/splash"])}onLoginFail(){return this.router.navigate(["/facebook/splash"])}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),W8=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.loader=h,this.toaster=a,this.authService=s,this.appService=e,this.baseLoginPlatform=i,this.facebookCanvasService=r,this.navigationService=u,this.location=c,this.constants=b}isAuthorized(){return this.getPlatformService().isAuthorized()}onLogin(){return this.getPlatformService().onLogin()}onLoginFail(){return this.getPlatformService().onLoginFail()}isFacebookApp(){return this.appService.getDevicePlatform()===$n.Facebook}doGuestLogin(){var e=this;return f(function*(){const i=e.location.path();i!==e.constants.defaultLoggedRoute&&i!==e.constants.defaultNotLoggedRoute&&(e.navigationService.urlToRedirectAfterLogin=e.location.path());try{yield e.authService.loginAsGuest()}catch(r){e.toaster.error("ERRORS.CONNECTION_ERROR")}finally{e.loader.off(),ll.hideLoader(),e.appService.isMobileApp()&&e.appService.getMobileAppService().hideSplash()}})()}getPlatformService(){return this.appService.getDevicePlatform()===$n.Facebook?this.facebookCanvasService:this.baseLoginPlatform}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(G8),T(nve),T(Tg),T(Dt),T(Rs),T(Yt),T(ro),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),ive=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.appService=u,this.router=h,this.location=b,this.constants=w,this.configService=c,this.appStorage=a,this.autoLoginService=e,this.reCaptchaVerificationService=s,this.maintenance=i,this.changeDetectorRef=r}ngOnInit(){var e=this;return f(function*(){let i;if(e.changeDetectorRef.detach(),e.reCaptchaVerificationService.isCaptchaEnabled())try{i=yield e.reCaptchaVerificationService.verifyCaptcha("lgEd")}catch(c){console.error(c)}if(!1===(yield e.maintenance.checkMaintenanceStatus(i?{csec:i}:{}))){if(e.router.config[0].children.filter(u=>u.data&&u.data.redirectOptions&&u.data.redirectOptions.skipLogin).some(u=>-1!==e.location.path().indexOf(u.data.redirectOptions.relativeUrl))){try{const u=yield e.autoLoginService.isAuthorized();if(ll.hideLoader(),u)window.location.href=window.location.href;else{const h=window.location.hash.split("/")[window.location.hash.split("/").length-1];e.router.navigateByUrl(e.constants.defaultNotLoggedRoute).then(()=>{history.pushState({},"","".concat(window.location.origin,"/?forwardto=").concat(ol.AdminBonusMailUnsubscribe,"&userId=").concat(h))})}}catch(u){var s;if(u instanceof lt.NetworkError)ll.loadResourcesFail();else e.appService.isMobileApp()&&e.appService.getMobileAppService().messages().trackError({name:"LoginFlowRedirectToHome",data:{errorName:null!==(s=null==u?void 0:u.code)&&void 0!==s?s:null==u?void 0:u.name,errorMessage:null==u?void 0:u.message,error:u}}),e.autoLoginService.onLoginFail()}return}try{(yield e.autoLoginService.isAuthorized())||e.autoLoginService.isFacebookApp()?(yield e.autoLoginService.onLogin())||ll.loadResourcesFail():(e.appStorage.checkItem("newUser")||e.appStorage.setItem("newUser",!0),e.appStorage.getItem("newUser")&&e.configService.getConfig().platform.registrationConfig.autoGuestLogin.enabled?(e.autoLoginService.doGuestLogin(),e.appStorage.setItem("newUser",!1)):e.autoLoginService.onLoginFail())}catch(u){var a;if(console.warn(u),u instanceof lt.NetworkError)ll.loadResourcesFail();else e.appService.isMobileApp()&&e.appService.getMobileAppService().messages().trackError({name:"LoginFlowRedirectToHome",data:{errorName:null!==(a=null==u?void 0:u.code)&&void 0!==a?a:null==u?void 0:u.name,errorMessage:null==u?void 0:u.message,error:u}}),e.autoLoginService.onLoginFail()}}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(W8),g(H6),g(Re),g(p0),g(Ci),g(Zt),g(Qt),g(on),g(Rs),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["auto-login"]],decls:1,vars:0,template:function(e,i){1&e&&B(0,"div")},encapsulation:2,changeDetection:0}),n})();const ove=[{path:"auto-login",component:ive}];var Vlt=ve.EButtonModifier;function zlt(t,n){if(1&t){const o=Ce();Tn(0),p(1,"button-text",3),Y("onClick",function(){const r=oe(o).$implicit;return re(_(2).selectLang(r))}),H(2),m(),Pn()}if(2&t){const o=n.$implicit,e=_(2);d(),l("buttonModifier",e.currentLang!==o?e.buttonModifier.BUTTON_DARK:e.buttonModifier.BUTTON_ACTION),d(),ze(" ",o.toUpperCase()," ")}}function jlt(t,n){if(1&t&&(p(0,"div",1),U(1,zlt,3,2,"ng-container",2),m()),2&t){const o=_();d(),l("ngForOf",o.languages)}}let $8=(()=>{var t;class n{constructor(e){this.buttonModifier=Vlt,this.appLanguage=e,this.languages=Lt.CONFIG.platform.languages.list,this.currentLang=this.appLanguage.getAppLanguage()}selectLang(e){this.currentLang!==e&&(this.currentLang=this.appLanguage.validateLanguage(e),this.appLanguage.setLocalStorageLanguage(this.currentLang),window.location.reload())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ma))},t.\u0275cmp=pe({type:t,selectors:[["languages"]],decls:1,vars:1,consts:[["class","languages__wrapper",4,"ngIf"],[1,"languages__wrapper"],[4,"ngFor","ngForOf"],[1,"languages__button",3,"buttonModifier","onClick"]],template:function(e,i){1&e&&U(0,jlt,2,1,"div",0),2&e&&l("ngIf",i.languages.length>1)},dependencies:[Mt,Ne,pn],styles:[".languages__wrapper[_ngcontent-%COMP%]{display:flex}.languages__button[_ngcontent-%COMP%]{margin:.5rem 1rem}"],changeDetection:0}),n})();var Hlt=et.General.Banned,qlt=ve.EButtonModifier,Wlt=et.General.NotFound;function $lt(t,n){if(1&t){const o=Ce();p(0,"button-text",14),Y("onClick",function(){return oe(o),re(_().handleButtonClick())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isLoading),d(),se($(2,3,o.buttonText.key))}}const Klt=t=>[t];let CL=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.toaster=h,this.cdr=b,this.buttonText={key:"FACEBOOK.permissionCancelledTryAgainButton"},this.buttonModifier=qlt,this.state=n.EState.Login,this.appLanguage=u,this.config=a,this.appService=s,this.authService=e,this.loader=i,this.translate=c,this.datePipe=r,this.showButton=!1}ngOnInit(){this.loader.off(),ll.hideLoader(),this.text={key:"FACEBOOK.loading"},this.login(),this.cdr.detectChanges()}login(){var e=this;return f(function*(){try{e.setIsLoading(!0),yield e.authService.login(Gt.Facebook)}catch(i){console.warn("Error facebookLogin",i),i instanceof Wlt?(e.showButton=!0,e.state=n.EState.Register,e.text={key:"REGISTER_COMPONENT.NOT_REGISTERED"},e.buttonText={key:"BUTTON.CONTINUE"}):i instanceof Hlt?e.handleBanError(i.status):i instanceof lt.NetworkError?(e.showButton=!0,e.text={key:"ERRORS.CONNECTION_ERROR"},e.buttonText={key:"FACEBOOK.permissionCancelledTryAgainButton"}):(e.showButton=!0,e.text={key:"FACEBOOK.permissionCancelledFacebookLogin"},e.buttonText={key:"FACEBOOK.permissionCancelledTryAgainButton"})}finally{e.setIsLoading(!1)}})()}register(){var e=this;return f(function*(){try{e.setIsLoading(!0),yield e.authService.register(Gt.Facebook,{},{autoLogin:!0})}catch(i){console.log(i),e.toaster.error(i instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"FACEBOOK.permissionCancelledFacebookLogin")}finally{e.setIsLoading(!1)}})()}openExternalUrl(e){this.appService.openExternalUrl("https://".concat(this.config.platform.staticPagesDomain).concat(e,"/").concat(this.appLanguage.getAppLanguage()))}handleButtonClick(){this.state===n.EState.Login?this.login():this.register()}setIsLoading(e){this.isLoading=e,this.cdr.detectChanges()}handleBanError(e){if(e.isDeviceBan){const s=this.banService.getLocalStorageBan();(!s||e.expiresAt>s.expiresAt)&&this.banService.setLocalStorageBan({expiresAt:e.expiresAt,visibleReason:e.visibleReason,isDeviceBan:!0})}let i=this.datePipe.transform(e.expiresAt,"dMMMMYYYY");const r=[this.config.platform.name,i,this.translate.instant("PUNNISH_REASONS.".concat(e.visibleReason)),this.config.platform.support];this.text={key:"POPUP.BANNED",params:r}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Tg),g(ro),g(kp),g(Qt),g(Dr),g(ls),g(Ma),g(Dt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["facebook-splash"]],decls:25,vars:20,consts:[[1,"fb-splash__wrapper"],[1,"fb-splash__container--logo-actions"],[1,"fb-splash__container--logo"],[1,"fb-splash__image--logo"],[1,"fb-splash__wrapper--hostess"],[1,"fb-splash__image--hostess"],[1,"fb-splash__container"],[1,"fb-splash__text"],["class","fb-splash__button--facebook",3,"buttonModifier","loading","onClick",4,"ngIf"],[1,"fb-splash__container--language"],[1,"fb-splash__container--terms"],[1,"fb-splash__text--terms-privacy"],[1,"fb-splash__link--terms",3,"click"],[1,"fb-splash__link--privacy",3,"click"],[1,"fb-splash__button--facebook",3,"buttonModifier","loading","onClick"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2),B(3,"div",3),p(4,"div",4),B(5,"div",5),m()(),p(6,"div",6)(7,"div",7),H(8),V(9,"translate"),m(),U(10,$lt,3,5,"button-text",8),m()(),p(11,"div",9),B(12,"languages"),m(),p(13,"div",10)(14,"p",11),H(15),V(16,"translate"),p(17,"a",12),Y("click",function(){return i.openExternalUrl("/terms-of-use")}),H(18),V(19,"translate"),m(),H(20),V(21,"translate"),p(22,"a",13),Y("click",function(){return i.openExternalUrl("/privacy-policy")}),H(23),V(24,"translate"),m()()()()),2&e&&(d(8),se(yt(9,6,i.text.key,i.text.params)),d(2),l("ngIf",i.showButton),d(5),ze("",yt(16,9,"LOGIN_COMPONENT.TERMS_AND_PRIVACY_POLICY",ne(18,Klt,i.config.platform.name))," "),d(3),se($(19,12,"LOGIN_COMPONENT.TERMS_OF_USE")),d(2),ze(" ",$(21,14,"WORDS.AND")," "),d(3),ze("",$(24,16,"LOGIN_COMPONENT.PRIVACY_POLICY"),"."))},dependencies:[Ne,$8,pn,qe],styles:[".fb-splash__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;align-items:center;width:100%;height:100%;overflow:hidden}.fb-splash__container--logo-actions[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;width:100%;flex:1;overflow:hidden}.fb-splash__container--logo[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;align-items:center;width:100%;flex:1}.fb-splash__image--logo[_ngcontent-%COMP%]{width:100%;height:15%;min-height:5rem}.fb-splash__wrapper--hostess[_ngcontent-%COMP%]{display:flex;height:85%;width:100%;align-items:center}@media only screen and (max-height: 440px){.fb-splash__wrapper--hostess[_ngcontent-%COMP%]{display:none}}.fb-splash__image--hostess[_ngcontent-%COMP%]{width:100%;height:80%}.fb-splash__container[_ngcontent-%COMP%]{padding:2rem;width:90%;text-align:center;margin-bottom:1rem}.fb-splash__button--facebook[_ngcontent-%COMP%]{margin:2rem auto 0;width:20rem}.fb-splash__container--terms[_ngcontent-%COMP%]{min-height:10%;width:100%;margin:1rem 0}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EState||(t.EState={}))[o.Login=0]="Login",o[o.Register=1]="Register"}(CL||(CL={}));const rve=[{path:"facebook/splash",component:CL}];let K8=(()=>{var t;class n{constructor(e,i,r){this.app=e,this.time=0,this.ngZone=i,this.http=r,this.healthCheckInterval=null,this.text=null}ngOnInit(){this.waitTime=1e3*this.getRandomInteger(30,60),this.text=this.getText(localStorage.getItem("lang")),this.startHealthCheckCycle(),ll.hideLoader(),this.app.isMobileApp()&&this.app.getMobileAppService().hideSplash()}ngOnDestroy(){this.stopHealthCheckCycle()}startHealthCheckCycle(){var e=this;this.ngZone.runOutsideAngular(()=>{this.healthCheckInterval=setInterval(f(function*(){try{const i=yield e.requestMaintenanceState();try{-1===Number(i.body.timestamp)&&e.onMaintenanceEnded()}catch(r){e.onMaintenanceEnded()}}catch(i){console.error(i)}}),this.waitTime)})}stopHealthCheckCycle(){clearInterval(this.healthCheckInterval)}requestMaintenanceState(){return this.http.get("".concat(Lt.CONFIG.platform.endPoints.api,"maintenance"),{observe:"response",responseType:"json"}).toPromise()}onMaintenanceEnded(){this.stopHealthCheckCycle(),this.app.restart()}getText(e){let i=sve[JSON.parse(e)];return void 0===i&&(i=sve.en),i}getRandomInteger(e,i){return Math.floor(Math.random()*(i-e))+e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(an),g(YS))},t.\u0275cmp=pe({type:t,selectors:[["maintenance"]],decls:7,vars:4,consts:[[1,"maintenance__wrapper"],[1,"maintenance__container"],[1,"maintenance__container--logo-image"],["alt","Game logo",1,"maintenance__image--logo",3,"src"],[1,"maintenance__text--sorry"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2),B(3,"img",3),V(4,"transformUrl"),p(5,"p",4),H(6),m()()()()),2&e&&(d(3),l("src",$(4,2,"game-logo/logo.svg"),Wn),d(3),se(i.text))},dependencies:[uo],styles:[".maintenance__wrapper[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;align-items:center;justify-content:center}@media only screen and (max-width: 1920px){.maintenance__container[_ngcontent-%COMP%]{max-width:55rem}}@media only screen and (max-width: 1366px){.maintenance__container[_ngcontent-%COMP%]{max-width:50rem}}@media only screen and (max-width: 480px){.maintenance__container[_ngcontent-%COMP%]{max-width:35rem}}.maintenance__container--logo-image[_ngcontent-%COMP%]{display:flex;justify-content:center;height:8rem}.maintenance__container--logo-image[_ngcontent-%COMP%]   .maintenance__image--logo[_ngcontent-%COMP%]{height:100%}@media only screen and (max-width: 480px){.maintenance__container--logo-image[_ngcontent-%COMP%]{height:18rem;flex-flow:column nowrap}}.maintenance__container--logo-image[_ngcontent-%COMP%]   .maintenance__text--sorry[_ngcontent-%COMP%]{text-align:center;margin:2.75rem;font-size:1.5rem;font-family:OpenSans,sans-serif,Emoji;font-weight:100}"],changeDetection:0}),n})();const sve={bg:"\u041f\u043b\u0430\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0430\u043a\u0442\u0438\u043a\u0430 \u0435 \u0432 \u0445\u043e\u0434. \u0429\u0435 \u0431\u044a\u0434\u0435\u043c \u043e\u043d\u043b\u0430\u0439\u043d \u0441\u043a\u043e\u0440\u043e.",en:"Scheduled maintenance in progress. We will be back online shortly.",fr:"Maintien programm\xe9 en cours. Nous serons disponibles en ligne bient\xf4t.",de:"Eine planm\xe4\xdfige Wartung l\xe4uft. Wir werden in K\xfcrze wieder online sein.",es:"Estamos actualizando el juego. \xa1Vuelve a intentarlo m\xe1s tarde!",ar:"\u0627\u0644\u0635\u064a\u0627\u0646\u0629 \u0642\u064a\u062f \u0627\u0644\u062a\u0646\u0641\u064a\u0630. \u0633\u0648\u0641 \u0646\u0639\u0648\u062f \u0628\u0639\u062f \u0642\u0644\u064a\u0644.",ru:"\u041c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0438\u0433\u0440\u0443. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0437\u0436\u0435!",tr:"Oyunu g\xfcncelliyoruz. L\xfctfen daha sonra tekrar dene!",nl:"Gepland onderhoud wordt uitgevoerd. We zijn binnenkort weer online."};let Z8=(()=>{var t;class n{constructor(e,i,r){this.popup=e,this.communicationService=i,this.gamesPlay=r}canActivate(e,i){return this.communicationService.dispose(),this.gamesPlay.dispose(),this.popup.hide(-1),!0}canDeactivate(e,i,r,s){return console.log("Stop!"),!1}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Cn),T(Ri),T(oo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const ave=[{path:"maintenance",canActivate:[Z8],canDeactivate:[Z8],component:K8}];let Q8=(()=>{var t;class n{constructor(e,i,r,s,a){this.popup=e,this.autoLoginService=i,this.authService=s,this.appStorageService=r,this.navigationService=a}canActivate(e,i){var r=this;return f(function*(){if(!1===r.navigationService.isNavigationStoppable(i))return r.authService.logout(),Promise.resolve(!0);try{let s=yield r.autoLoginService.isAuthorized(),a=r.appStorageService.getItem("loginType");return s&&a!==tl.Guest?new Promise(c=>{r.popup.confirm({popStateHandlerOn:!0,buttons:{action:()=>{r.authService.logout(),c(!0)},actionDecline:()=>c(!1)},textParams:{translationKey:"POPUP.LOGOUT_CONFIRMATION"}})}):Promise.resolve(!0)}catch(s){return Promise.resolve(!0)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Cn),T(W8),T(Ci),T(Tg),T(Yt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Y8=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["top-tab-separator"]],hostAttrs:[1,"top-tab-item-separator"],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})();function Zlt(t,n){1&t&&B(0,"top-tab-separator",2),2&t&&l("ngClass",_().separatorClass)}const Qlt=["*"];let dl=(()=>{var t;class n{set showSeparator(e){this._showSeparator=e,this.cdr.detectChanges()}constructor(e){this.cdr=e,this.separatorClass="",this.tabClass="",this.select=new ke,this._showSeparator=!0}selectItem(){this.select.emit(this.tabId)}get showSeparator(){return this._showSeparator}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["top-tab-item"]],hostBindings:function(e,i){1&e&&Y("click",function(){return i.selectItem()})},inputs:{tabId:"tabId",showSeparator:"showSeparator",separatorClass:"separatorClass",tabClass:"tabClass"},outputs:{select:"select"},ngContentSelectors:Qlt,decls:3,vars:2,consts:[[1,"top-tab-item-container",3,"ngClass"],["class","top-tab-item-separator",3,"ngClass",4,"ngIf"],[1,"top-tab-item-separator",3,"ngClass"]],template:function(e,i){1&e&&(Co(),p(0,"div",0),yo(1),U(2,Zlt,1,1,"top-tab-separator",1),m()),2&e&&(l("ngClass",i.tabClass),d(2),l("ngIf",i.showSeparator))},dependencies:[Xe,Ne,Y8],styles:["[_nghost-%COMP%]{display:block}.top-tab-item-container[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}.top-tab-item-separator[_ngcontent-%COMP%]{height:70%;position:absolute;display:block;top:50%;right:0;transform:translateY(-50%)}\n\n/*# sourceMappingURL=top-tab-item.component.ts-angular-inline--2.css.map*/"],changeDetection:0}),n})();function Ylt(t,n){1&t&&(p(0,"div",4),B(1,"div",5),m())}const Jlt=(t,n)=>({"multi-line-white":t,"single-line":n});function Xlt(t,n){if(1&t&&(p(0,"p",6),H(1),V(2,"translate"),m()),2&t){const o=n.$implicit,e=n.index,i=_();l("ngClass",cn(5,Jlt,e%2||1===i.textArray.length,1===i.textArray.length)),d(),se(yt(2,2,o.textKey,o.params))}}const eut=t=>({"no-img":t}),tut=["*"];let bo=(()=>{var t;class n{constructor(e){this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["empty-content"]],inputs:{textArray:"textArray",noImgFlag:"noImgFlag"},features:[it],ngContentSelectors:tut,decls:5,vars:5,consts:[[1,"empty-content__wrapper",3,"ngClass"],["class","empty-content__container--no-notifications-image",4,"ngIf"],[1,"empty-content__container--no-notifications-text"],["class","empty-content__text--no-notifications",3,"ngClass",4,"ngFor","ngForOf"],[1,"empty-content__container--no-notifications-image"],[1,"empty-content__image--no-notifications"],[1,"empty-content__text--no-notifications",3,"ngClass"]],template:function(e,i){1&e&&(Co(),p(0,"section",0),U(1,Ylt,2,0,"div",1),p(2,"div",2),U(3,Xlt,3,8,"p",3),yo(4),m()()),2&e&&(l("ngClass",ne(3,eut,i.noImgFlag)),d(),l("ngIf",!i.noImgFlag),d(2),l("ngForOf",i.textArray))},dependencies:[Xe,Mt,Ne,qe],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.empty-content__wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.empty-content__wrapper.no-img[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.empty-content__container--no-notifications-text[_ngcontent-%COMP%]{width:100%;padding:1.5rem 3rem;display:flex;flex-flow:column nowrap}@media only screen and (max-height: 568px){.empty-content__container--no-notifications-text[_ngcontent-%COMP%]{padding:.5rem 3rem}}@media only screen and (max-height: 440px){.empty-content__container--no-notifications-text[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;padding:.5rem 1rem}}.empty-content__text--no-notifications[_ngcontent-%COMP%]{width:100%;max-width:60rem;margin:0 auto;font-size:1.8rem;text-transform:uppercase;font-weight:600;line-height:22px;text-align:center}@media only screen and (max-width: 440px){.empty-content__text--no-notifications[_ngcontent-%COMP%]{font-size:1.4rem;line-height:14px}}.empty-content__text--no-notifications.single-line[_ngcontent-%COMP%]{text-align:center}@media only screen and (max-width: 768px){.empty-content__text--no-notifications[_ngcontent-%COMP%]{font-size:1.8rem}}@media only screen and (max-width: 530px){.empty-content__text--no-notifications[_ngcontent-%COMP%]{font-size:1.4rem}.lang-ar[_ngcontent-%COMP%]   .empty-content__text--no-notifications[_ngcontent-%COMP%], .lang-fa[_ngcontent-%COMP%]   .empty-content__text--no-notifications[_ngcontent-%COMP%]{font-size:1.8rem}}@media only screen and (max-width: 380px){.empty-content__text--no-notifications[_ngcontent-%COMP%]{font-size:1.2rem}.lang-ar[_ngcontent-%COMP%]   .empty-content__text--no-notifications[_ngcontent-%COMP%], .lang-fa[_ngcontent-%COMP%]   .empty-content__text--no-notifications[_ngcontent-%COMP%]{font-size:1.8rem}}.empty-content__container--no-notifications-image[_ngcontent-%COMP%]{position:relative;height:70%;width:100%;max-width:60rem;margin:0 auto;display:flex;justify-content:center;align-items:center;padding:1.5rem 0}@media only screen and (max-height: 440px){.empty-content__container--no-notifications-image[_ngcontent-%COMP%]{display:none}}.empty-content__container--no-notifications-image[_ngcontent-%COMP%]   .empty-content__image--no-notifications[_ngcontent-%COMP%]{height:100%;max-height:50rem}@media only screen and (max-width: 480px){.empty-content__container--no-notifications-image[_ngcontent-%COMP%]   .empty-content__image--no-notifications[_ngcontent-%COMP%]{max-height:25rem}}"],changeDetection:0}),n})();class Pr{constructor(n){this.route=n,this.outletCtx=(new Kie).createContext(this.findOutlet())}get outletContext(){return this.outletCtx}findOutlet(){return this.route.pathFromRoot.find(n=>n.outlet===Fn)?Fn:oi}}const ia={provide:Pr,useFactory:t=>new Pr(t),deps:[Po]};let nut=(()=>{var t;class n extends Dh{constructor(e,i,r,s,a,c,u){super(),this.showBackButton=!0,this.currentTabIndex=0,this.onLeftKeyPress=h=>{this.currentTabIndex-1>=0&&this.changeTab(this.tabsIds[this.currentTabIndex-1])},this.onRightKeyPress=h=>{this.currentTabIndex+1<this.tabsIds.length&&this.changeTab(this.tabsIds[this.currentTabIndex+1])},this.popStateHandler=()=>{const h=window.location.hash.slice(window.location.hash.lastIndexOf("/")+1,window.location.hash.length),b=void 0!==this.tabsIds.find(w=>w===h);this.currentTab=b?h:this.tabsIds[0],this.updateView()},this.hijackFocus=!1,this.navigation=a,this.activatedComponentRoute=c,this.appState=s,this.renderer=r,this.location=i,this.constants=u,this.changeDetRef=e,this.changeDetRef.detach(),this.listeners=new ie.List}ngOnInit(){super.ngOnInit(),this.backButtonSubscription=this.location.subscribe(this.popStateHandler),this.updateView()}ngOnChanges(e){this.tabsIds&&e.initialOpenedTab&&e.initialOpenedTab.currentValue&&this.currentTab!==e.initialOpenedTab.currentValue&&(this.currentTab=this.initialOpenedTab||this.tabsIds[0],this.currentTabIndex=this.tabsIds.findIndex(i=>i===this.currentTab),this.currentTab=e.initialOpenedTab.currentValue),this.updateView()}ngOnDestroy(){super.ngOnDestroy(),this.backButtonSubscription&&this.backButtonSubscription.unsubscribe(),this.detachKeyPressListeners()}onFocus(){super.onFocus(),this.attachKeyPressListeners()}onLostFocus(){super.onLostFocus(),this.detachKeyPressListeners()}changeTab(e){this.currentTab=e,this.currentTabIndex=this.tabsIds.indexOf(e),this.updateView()}goBack(){""!==this.appState.getPreviousRoute()&&-1===this.appState.getPreviousRoute().indexOf("auto-login")&&history.length>1?this.activatedComponentRoute.outletContext.outlet===oi?this.navigation.navigateBack(oi):history.back():this.navigation.navigate([this.constants.defaultLoggedRoute])}updateView(){this.changeDetRef.detectChanges()}attachKeyPressListeners(){this.listeners.add(this.renderer.listen("window","keyup.arrowleft",this.onLeftKeyPress)),this.listeners.add(this.renderer.listen("window","keyup.arrowright",this.onRightKeyPress))}detachKeyPressListeners(){this.listeners.forEach(e=>e()),this.listeners=new ie.List}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Rs),g(ji),g(Sa),g(Yt),g(Pr),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],inputs:{initialOpenedTab:"initialOpenedTab",showBackButton:"showBackButton"},features:[Ht,it],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();const pM=(t,n,o,e)=>(t/=e/2)<1?o/2*t*t+n:-o/2*(--t*(t-2)-1)+n;var iut=ve.EIcons;const out=["tabsContainer"],rut=["scrollableContainer"],sut=["scrollbar"],aut=["scrollbarContainer"],cut=t=>({"top-tabs__hidden":t}),lut=t=>({name:t}),uut=["*"];let kl=(()=>{var t;class n extends nut{constructor(e,i,r,s,a,c,u,h,b){super(e,i,r,s,a,u,b),this.scrollStyleCustomClass="",this.scrollBarCustomClass="",this.showScroll=!0,this.showSeparator=!0,this.scrollableContainerClass="",this.scrollAnimation={durationMs:100,timingFunction:pM},this.iconNames=iut,this.rulerService=h,this.scrollHelper=c}ngAfterContentInit(){this.tabSelectSubscription=this.tabItems.changes.pipe(VT(this.tabItems),es(e=>(this.tabsIds=e.map(i=>i.tabId),this.setScrollbarDimensions(),Ju(...e.map((i,r)=>(i.showSeparator=this.showSeparator&&r!==e.length-1,i.select)))))).subscribe(e=>{this.changeTab(e)}),this.showScroll&&(this.appSizeSubscription=this.rulerService.getAppSize().subscribe(()=>{this.setScrollbarDimensions()}))}ngOnDestroy(){this.tabSelectSubscription&&this.tabSelectSubscription.unsubscribe(),this.appSizeSubscription&&this.appSizeSubscription.unsubscribe(),this.tabItemsSubscription&&this.tabItemsSubscription.unsubscribe(),this.stopUpdateCycle()}stopUpdateCycle(){cancelAnimationFrame(this.rafId)}setScrollbarDimensions(){this.stopUpdateCycle(),this.rafId=requestAnimationFrame(()=>{if(this.scrollbar.nativeElement.style.width=this.tabContainer.nativeElement.scrollWidth/this.tabsIds.length+"px",this.scrollbar.nativeElement.style.transform="translate(".concat(100*Math.max(this.tabsIds.findIndex(e=>e===this.initialOpenedTab),0),"%, -50%)"),this.scrollbarContainer.nativeElement.style.width=this.tabContainer.nativeElement.scrollWidth+"px",this.initialOpenedTab){let e=this.tabsIds.indexOf(this.initialOpenedTab);this.scrollToTab(Math.max(e,0),!0)}})}ngOnChanges(e){if(super.ngOnChanges(e),this.tabsIds&&e.initialOpenedTab&&this.currentTab){let i=this.tabsIds.indexOf(this.currentTab);this.scrollToTab(Math.max(i,0))}}scrollToTab(e,i){const s={element:this.scrollContainer.nativeElement,targetScroll:this.scrollbar.nativeElement.clientWidth*e-(this.scrollContainer.nativeElement.clientWidth/3-(this.scrollbar.nativeElement.clientWidth-this.scrollContainer.nativeElement.clientWidth/3)/2),animation:i?void 0:this.scrollAnimation,position:Na.EScrollPosition.ScrollLeft};this.scrollbar.nativeElement.style.transition=i?"none":"transform 0.2s ease-in-out",this.scrollbar.nativeElement.style.transform="translate(".concat(100*e,"%, -50%)"),this.scrollHelper.scrollElement(s)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Rs),g(ji),g(Sa),g(Yt),g(cr),g(Pr),g(Ua),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["top-tabs"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,dl,5),2&e){let s;je(s=He())&&(i.tabItems=s)}},viewQuery:function(e,i){if(1&e&&($e(out,5),$e(rut,5),$e(sut,5),$e(aut,5)),2&e){let r;je(r=He())&&(i.tabContainer=r.first),je(r=He())&&(i.scrollContainer=r.first),je(r=He())&&(i.scrollbar=r.first),je(r=He())&&(i.scrollbarContainer=r.first)}},inputs:{scrollStyleCustomClass:"scrollStyleCustomClass",scrollBarCustomClass:"scrollBarCustomClass",showScroll:"showScroll",showSeparator:"showSeparator",scrollableContainerClass:"scrollableContainerClass"},features:[mn([ia]),Ht,it],ngContentSelectors:uut,decls:12,vars:9,consts:[[1,"top-tabs__navigation"],[1,"top-tabs__container--back-navigation",3,"ngClass","icon","onClick"],[1,"top-tabs__container--navigation",3,"ngClass"],["scrollableContainer",""],[1,"top-tabs__tabs-container"],[1,"top-tabs__list--navigation"],["tabsContainer",""],[1,"top-tabs__scroll",3,"ngClass"],["scrollbarContainer",""],[1,"top-tabs__scrollbar",3,"ngClass"],["scrollbar",""]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"button-icon",1),Y("onClick",function(){return i.goBack()}),m(),p(2,"div",2,3)(4,"div",4)(5,"ul",5,6),yo(7),m(),p(8,"div",7,8),B(10,"div",9,10),m()()()()),2&e&&(d(),l("ngClass",ne(5,cut,!i.showBackButton))("icon",ne(7,lut,i.iconNames.ARROW_BACK)),d(),l("ngClass",i.scrollableContainerClass),d(6),l("ngClass",i.showScroll?i.scrollStyleCustomClass:"top-tabs-scrollbar__hidden"),d(2),l("ngClass",i.scrollBarCustomClass))},dependencies:[Xe,ei],styles:['.top-tabs__container--navigation[_ngcontent-%COMP%]{position:relative;order:1;width:100%;overflow-x:auto;overflow-y:hidden}.top-tabs__list-item--navigation[_ngcontent-%COMP%]{position:relative;height:4rem;flex-shrink:0}.top-tabs__list-item--navigation.with-text[_ngcontent-%COMP%]{max-width:initial}.top-tabs__list-item--navigation.hidden[_ngcontent-%COMP%]{display:none}.top-tabs__list-item--navigation.separator[_ngcontent-%COMP%]:before{content:"";position:absolute;left:-.06rem;top:50%;transform:translateY(-50%);width:.2rem;height:85%}.top-tabs__container--back-navigation[_ngcontent-%COMP%]{height:100%;width:4rem;display:flex;justify-content:center;align-items:center;margin:0!important}.top-tabs__list--navigation[_ngcontent-%COMP%]{height:100%;width:-moz-fit-content;width:fit-content;margin:0 auto;display:flex;flex-flow:row nowrap;justify-content:left;align-items:center}.top-tabs__hidden[_ngcontent-%COMP%]{display:none}.top-tabs__scroll[_ngcontent-%COMP%]{position:relative;display:block;margin:0 auto}.top-tabs__scrollbar[_ngcontent-%COMP%]{position:absolute;top:50%}.top-tabs__container[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%}.top-tabs__navigation[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 .5rem;width:calc(100% - 1rem);height:100%}'],changeDetection:0}),n})();var dut=ve.EIcons,put=ve.EButtonModifier;const hut=["userLabel"],mut=["ref"],fut=["buttons"];function gut(t,n){1&t&&yo(0,0,["*ngIf","useCustomHeader"])}function _ut(t,n){if(1&t&&(p(0,"p",12),H(1),m()),2&t){const o=_(2);d(),mu("( ",null!=o.currentListLength?o.currentListLength:o.listUsers.length," / ",o.totalListLength," )")}}function vut(t,n){if(1&t&&(Tn(0),p(1,"p",10),H(2),V(3,"uppercase"),V(4,"translate"),m(),U(5,_ut,2,2,"p",11),Pn()),2&t){const o=_();d(),ni("list-users-box__text--list-title ",o.type,""),d(),se($(3,5,$(4,7,o.configListUsers.textTitle))),d(3),l("ngIf",o.configListUsers.showPartOfTotal)}}const cve=t=>[t];function but(t,n){if(1&t&&(p(0,"div",13)(1,"p"),H(2),V(3,"translate"),m()()),2&t){const o=_();d(2),se(yt(3,1,o.configListUsers.textNoUsers,ne(4,cve,o.siteName)))}}const Cut=t=>({name:t});function yut(t,n){if(1&t){const o=Ce();p(0,"div",14)(1,"div",15)(2,"button-icon",16),Y("onClick",function(){return oe(o),re(_().slotButtonClicked())}),m()(),p(3,"div",17)(4,"div",18)(5,"div",19)(6,"p"),H(7),V(8,"translate"),m()()()()()}if(2&t){const o=_();d(2),l("bclass","list-users-box__button-buy-block-skin")("icon",ne(6,Cut,o.iconsEnum.PLUS))("buttonModifier",o.buttonModifier.BUTTON_TRANSPARENT),d(5),se($(8,4,"BUTTON.ADD_MORE_SLOTS"))}}function Sut(t,n){1&t&&(p(0,"div",13)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"ERRORS.NO_USERS_FOUND")))}function wut(t,n){}function Tut(t,n){if(1&t&&(p(0,"div",15),B(1,"avatar",24),m()),2&t){const o=_().$implicit;d(),l("isLink",!0)("user",o.profile)("hasUsername",!1)}}function Put(t,n){}const J8=t=>({$implicit:t});function Iut(t,n){if(1&t&&(p(0,"div",30),U(1,Put,0,0,"ng-template",21),m()),2&t){const o=_(2).$implicit,e=_();d(),l("ngTemplateOutlet",e.userLabel)("ngTemplateOutletContext",ne(2,J8,o))}}const Mut=(t,n)=>({"list-users-box-online-indicator":t,online:n});function Out(t,n){if(1&t&&(p(0,"div",17)(1,"div",18)(2,"div",19)(3,"p",25),B(4,"username",26),m()(),U(5,Iut,2,4,"div",27),m(),p(6,"div",28),Un(7,29),m()()),2&t){const o=_().$implicit,e=_();d(3),l("ngClass",cn(6,Mut,e.configListUsers.onlineIndication,e.configListUsers.onlineIndication&&o.onlineStatus.isOnline)),d(),l("userProfile",o.profile)("hasVerifiedBadge",!0),d(),l("ngIf",e.userLabel),d(2),l("ngTemplateOutlet",e.buttons)("ngTemplateOutletContext",ne(9,J8,o))}}function Eut(t,n){if(1&t&&(p(0,"div",20),U(1,wut,0,0,"ng-template",21)(2,Tut,2,3,"div",22)(3,Out,8,11,"div",23),m()),2&t){const o=n.$implicit,e=_();l("ngClass",ne(6,cve,e.configListUsers.itemClass||"")),Hn("data-cy2",o.profile.id),d(),l("ngTemplateOutlet",e.ref)("ngTemplateOutletContext",ne(8,J8,o)),d(),l("ngIf",!e.ref),d(),l("ngIf",!e.ref)}}const xut=[[["","header",""]]],Aut=t=>({customHeader:t}),lve=t=>({empty:t}),Rut=["[header]"];let mv=(()=>{var t;class n{constructor(e,i){this.showAddSlotButton=!1,this.showBuyMoreSlotsButton=!1,this.filterUsers=new ke,this.iconsEnum=dut,this.buttonModifier=put,this.siteName=i.getConfig().platform.name,this.changeDetectorRef=e,this.shownUsers=[],this.addSlotButtonClicked=new ke,this.useCustomHeader=!1}ngOnChanges(e){e.listUsers||e.shownUsersCount||e.searchedUser?(this.updateShownUsers(),e.searchedUser&&this.filterUsers.emit(this.shownUsers)):e.totalListLength&&this.changeDetectorRef.detectChanges()}ngOnInit(){this.updateShownUsers()}trackByFn(e,i){return i.id}slotButtonClicked(){this.addSlotButtonClicked.emit()}updateShownUsers(){this.shownUsers=""!==this.searchedUser?this.listUsers.filter(e=>-1!==e.profile.username.currentUsername.toLowerCase().indexOf(this.searchedUser.toLowerCase())):this.shownUsersCount?this.listUsers.slice(0,this.shownUsersCount):this.listUsers}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["list-users-box"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,hut,5),Ho(r,mut,5),Ho(r,fut,5)),2&e){let s;je(s=He())&&(i.userLabel=s.first),je(s=He())&&(i.ref=s.first),je(s=He())&&(i.buttons=s.first)}},inputs:{listUsers:"listUsers",showAddSlotButton:"showAddSlotButton",shownUsersCount:"shownUsersCount",searchedUser:"searchedUser",currentListLength:"currentListLength",totalListLength:"totalListLength",type:"type",configListUsers:"configListUsers",useCustomHeader:"useCustomHeader",showBuyMoreSlotsButton:"showBuyMoreSlotsButton"},outputs:{addSlotButtonClicked:"addSlotButtonClicked",filterUsers:"filterUsers"},features:[it],ngContentSelectors:Rut,decls:12,vars:16,consts:[[1,"list-users-box__container--friends"],[1,"list-users-box__container--list-title",3,"ngClass"],[4,"ngIf"],[1,"list-users-box__container--list-title-line"],[1,"line"],[1,"list-users-box__container--list-friends-users",3,"ngClass"],[1,"list-users-box__container--list-inner",3,"ngClass"],["class","list-users-box__container--no-users",4,"ngIf"],["class","list-users-box__container--list-item",4,"ngIf"],["class","list-users-box__container--list-item","data-cy","listMemberContainer",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","blockedTitle"],["class","list-users-box__text--list--title-numbers","data-cy","blockedNumberOfPlayers",4,"ngIf"],["data-cy","blockedNumberOfPlayers",1,"list-users-box__text--list--title-numbers"],[1,"list-users-box__container--no-users"],[1,"list-users-box__container--list-item"],[1,"list-users-box__container--avatar"],["data-cy","blockedAddSlotsButton",1,"button-buy-block",3,"bclass","icon","buttonModifier","onClick"],[1,"list-users-box__container--info-and-action"],[1,"list-users-box__container--info"],[1,"username"],["data-cy","listMemberContainer",1,"list-users-box__container--list-item",3,"ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","list-users-box__container--avatar",4,"ngIf"],["class","list-users-box__container--info-and-action",4,"ngIf"],["data-cy","listMemberAvatar",3,"isLink","user","hasUsername"],[3,"ngClass"],["data-cy","listMemberUsername",1,"username__component",3,"userProfile","hasVerifiedBadge"],["class","list-users-box__container--wrapper",4,"ngIf"],[1,"list-users-box__container--action"],["data-cy","listUserAction",3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"list-users-box__container--wrapper"]],template:function(e,i){1&e&&(Co(xut),p(0,"section",0)(1,"div",1),U(2,gut,1,0,"ng-content",2)(3,vut,6,9,"ng-container",2),p(4,"div",3),B(5,"div",4),m()(),p(6,"div",5)(7,"div",6),U(8,but,4,6,"div",7)(9,yut,9,8,"div",8)(10,Sut,4,3,"div",7)(11,Eut,4,10,"div",9),m()()()),2&e&&(d(),l("ngClass",ne(10,Aut,i.useCustomHeader)),d(),l("ngIf",i.useCustomHeader),d(),l("ngIf",!i.useCustomHeader),d(3),l("ngClass",ne(12,lve,!i.listUsers||i.listUsers&&0===i.listUsers.length)),d(),l("ngClass",ne(14,lve,!i.listUsers||i.listUsers&&0===i.listUsers.length)),d(),l("ngIf",!i.listUsers||i.listUsers&&0===i.listUsers.length),d(),l("ngIf",i.showBuyMoreSlotsButton),d(),l("ngIf",i.listUsers&&0!==i.listUsers.length&&i.shownUsers&&0===i.shownUsers.length),d(),l("ngForOf",i.shownUsers)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Ne,qr,Bo,ei,Zp,Sp,qe],styles:["list-users-box{display:flex;width:calc(100% - 4rem);min-height:40%;margin:2rem 2rem 1rem}@media only screen and (max-width: 768px){list-users-box{margin-left:1rem;margin-top:1rem;width:calc(100% - 2rem)}}.list-users-box__container--friends{width:100%;display:flex;flex-flow:column nowrap}.list-users-box__container--list-title{order:1;width:calc(100% - 8rem);position:relative;display:flex;flex-flow:row wrap;padding:2rem .5rem .5rem 0;margin:0 4rem}.list-users-box__container--list-title.customHeader{padding:0 .5rem}@media only screen and (max-width: 768px){.list-users-box__container--list-title{margin:0 2rem;width:calc(100% - 4rem)}}.list-users-box__text--list-title{display:flex;align-items:center;justify-content:center;margin-right:.5rem;font-size:1.4rem;line-height:2.4rem}.list-users-box__text--list-title:before{display:inline-block;width:2rem;height:2rem;margin-right:.8rem;background-size:contain;vertical-align:middle}.lang-ar .list-users-box__text--list-title:before,.lang-fa .list-users-box__text--list-title:before{margin-right:0;margin-left:.8rem}.list-users-box__text--list--title-numbers{display:flex;align-items:flex-end;justify-content:center;font-size:1.4rem;line-height:2.4rem}.list-users-box__container--list-title-line{display:flex;justify-content:flex-end;align-items:center;flex:1}.list-users-box__container--list-title-line .line{width:98%;height:.2rem}@media only screen and (max-width: 768px){.list-users-box__container--list-title-line .line{width:95%}}.list-users-box__container--list-friends-users{order:2;width:100%;height:auto;display:flex;justify-content:center}.list-users-box__container--list-friends-users.empty{min-height:calc(100% - 5rem)}.list-users-box__container--list-inner{width:94%;height:auto;align-self:flex-start;display:flex;flex-flow:row wrap;justify-content:flex-start}.list-users-box__container--list-inner.empty{align-self:center;justify-content:center}.list-users-box__container--no-users{width:100%;height:7rem;display:flex;justify-content:center;align-items:center;margin-top:3%}.list-users-box__container--no-users>p{font-size:1.8rem;text-align:center}.list-users-box__container--list-item{width:100%;height:8.5rem;display:flex;flex-flow:row wrap;margin:1%;margin-bottom:.5rem}@media only screen and (max-width: 480px){.list-users-box__container--list-item{height:6.5rem}}.list-users-box__container--avatar{order:1;width:8.5rem;height:100%;position:relative;padding:.5rem}@media only screen and (max-width: 480px){.list-users-box__container--avatar{width:6.5rem}}.list-users-box__container--avatar .button-buy-block{width:100%;height:100%;font-size:4rem}.list-users-box__container--info-and-action{order:2;width:calc(100% - 8.5rem);height:100%;display:flex;justify-content:space-between}@media only screen and (max-width: 480px){.list-users-box__container--info-and-action{max-width:calc(100% - 6.5rem)}}.list-users-box__container--info{display:flex;flex-flow:column nowrap;justify-content:center;height:100%;width:calc(100% - 12rem)}@media only screen and (max-width: 480px){.list-users-box__container--info{width:calc(100% - 8rem)}}@media only screen and (max-width: 320px){.list-users-box__container--info{width:calc(100% - 6rem)}}.list-users-box__container--info .username{display:flex;align-items:center;padding-left:1rem}.list-users-box__container--info .username>p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1.4rem}@media only screen and (max-width: 480px){.list-users-box__container--info .username>p{font-size:1.2rem;width:13rem}}.list-users-box__container--wrapper{padding-left:1rem}.list-users-box__container--action{display:flex;height:100%;justify-content:center;align-items:center;width:12rem}@media only screen and (max-width: 480px){.list-users-box__container--action{width:8rem}}.username__component{display:block!important}.list-users-box__action{margin-left:auto;display:inline-flex}\n"],encapsulation:2}),n})();var kut=__webpack_require__(74147),Lut=__webpack_require__.n(kut);const Dut=(t,n)=>({overrided:t,"progress-bar-color-animation-inner":n});function But(t,n){if(1&t&&B(0,"div",2),2&t){const o=n.$implicit,e=_(2);ni("progress-bar__progress--partition\n                 ",o.cssClass,""),go("width",o.widthPercentage,"%"),l("ngClass",cn(6,Dut,!!o.cssClass,2===e.partitionsPercentages.length&&e.isXPBoosted))}}function Nut(t,n){1&t&&(p(0,"span"),H(1,"/"),m())}function Fut(t,n){if(1&t&&(p(0,"div",7)(1,"span"),H(2),V(3,"formatNumber"),m(),U(4,Nut,2,0,"span",8),m()),2&t){const o=n.$implicit,e=n.index,i=_(3);d(2),se($(3,2,o.value)),d(2),l("ngIf",e<i.progressBarConfig.progressPartitions.length-1)}}function Uut(t,n){if(1&t&&(p(0,"div",5),U(1,Fut,5,4,"div",6),m()),2&t){const o=_(2);d(),l("ngForOf",o.progressBarConfig.progressPartitions)}}const Gut=(t,n,o)=>({"progress-classic":t,"progress-good-bad-empty":n,"progress-multiple":o});function Vut(t,n){if(1&t&&(p(0,"div",1)(1,"div",2),U(2,But,1,9,"div",3),m(),U(3,Uut,2,1,"div",4),m()),2&t){const o=_();d(),ni("progress-bar__progress--container ",o.progressBarConfig.containerCssClass,""),l("ngClass",_a(6,Gut,2===o.partitionsPercentages.length,3===o.partitionsPercentages.length,o.partitionsPercentages.length>3)),d(),l("ngForOf",o.partitionsPercentages),d(),l("ngIf",o.progressBarConfig.areValuesShown)}}let uf=(()=>{var t;class n{constructor(e){this.isXPBoosted=!1,this.partitionsPercentages=[],this.changeDetectorRef=e,this.changeDetectorRef.detach()}ngOnInit(){this.calculatePartitionsPercentages(),this.changeDetectorRef.detectChanges()}ngOnChanges(e){this.calculatePartitionsPercentages(),this.changeDetectorRef.detectChanges()}calculatePartitionsPercentages(){this.partitionsPercentages=[];const e=this.progressBarConfig.progressPartitions;let i=Lut()(e,r=>r.widthCoefficient)||1;for(let r=0;r<e.length;r++){let s={widthPercentage:e[r].widthCoefficient/i*100,cssClass:e[r].cssClass};r>0&&(s.widthPercentage+=this.partitionsPercentages[r-1].widthPercentage),this.partitionsPercentages.push(s)}this.partitionsPercentages.reverse()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["progress-bar"]],inputs:{progressBarConfig:"progressBarConfig",isXPBoosted:"isXPBoosted"},features:[it],decls:1,vars:1,consts:[["class","progress-bar__wrapper",4,"ngIf"],[1,"progress-bar__wrapper"],[3,"ngClass"],[3,"class","ngClass","width",4,"ngFor","ngForOf"],["class","progress-bar__values--container",4,"ngIf"],[1,"progress-bar__values--container"],["class","progress-bar__value--wrapper",4,"ngFor","ngForOf"],[1,"progress-bar__value--wrapper"],[4,"ngIf"]],template:function(e,i){1&e&&U(0,Vut,4,10,"div",0),2&e&&l("ngIf",i.progressBarConfig)},dependencies:[Xe,Mt,Ne,Go],styles:["[_nghost-%COMP%]{width:100%}.progress-bar__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;height:1rem;width:100%;position:relative}.progress-bar__progress--container[_ngcontent-%COMP%]{height:100%;width:100%;border-radius:1rem;overflow:hidden;position:relative}.progress-bar__progress--partition[_ngcontent-%COMP%]{position:absolute;top:0;height:100%;border-radius:1rem;box-sizing:content-box}.progress-bar__values--container[_ngcontent-%COMP%]{font-size:1.2rem;display:flex;margin-left:.5rem}.progress-bar__value--wrapper[_ngcontent-%COMP%]{display:flex;white-space:nowrap}"],changeDetection:0}),n})(),X8=(()=>{var t;class n{constructor(e){this.EIcons=ve.EIcons,this.userProgress="0",this.barNumbers={firstNumber:0,secondNumber:0,thirdNumber:0},this.cdr=e,e.detach()}ngOnInit(){this.updateProgressConfig()}ngOnChanges(e){this.updateProgressConfig()}updateProgressConfig(){this.isXPBoosted=this.currentUser.xp.xpBooster&&this.currentUser.xp.xpBooster.isActive(),this.progressBarConfig={progressPartitions:[{value:this.currentUser.xp.currentXp,widthCoefficient:this.currentUser.xp.currentXp-this.currentUser.xp.previousLevelAt},{value:this.currentUser.xp.nextLevelAt,widthCoefficient:this.currentUser.xp.nextLevelAt-this.currentUser.xp.currentXp}],areValuesShown:!0},this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["user-experience-bar"]],inputs:{currentUser:"currentUser"},features:[it],decls:8,vars:4,consts:[[1,"user-experience-bar__wrapper"],[1,"user-experience-bar__container--star-level"],[1,"user-experience-bar__container--star-level--icon",3,"icon"],[1,"user-experience-bar__container--exp-bar"],[3,"progressBarConfig","isXPBoosted"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"p"),B(3,"icon-component",2),p(4,"span"),H(5),m()()(),p(6,"div",3),B(7,"progress-bar",4),m()()),2&e&&(d(3),l("icon",i.EIcons.STAR_HOLLOW),d(2),se(i.currentUser.profile.level),d(2),l("progressBarConfig",i.progressBarConfig)("isXPBoosted",i.isXPBoosted))},dependencies:[Dn,uf],styles:[".user-experience-bar__container--exp-bar[_ngcontent-%COMP%], .user-experience-bar__container--star-level[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-end}[_nghost-%COMP%]{width:100%;height:100%}.user-experience-bar__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:row nowrap}.user-experience-bar__container--star-level[_ngcontent-%COMP%]{position:relative;width:3.2rem;height:100%}.user-experience-bar__container--star-level[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1rem;height:3.2rem;width:3.2rem}.user-experience-bar__container--star-level[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{position:absolute;bottom:0;left:50%;margin-bottom:.9rem;transform:translate(-50%);line-height:1rem;z-index:2}.user-experience-bar__container--exp-bar[_ngcontent-%COMP%]{flex:1;padding:0 .5rem .7rem .2rem}"],changeDetection:0}),n})();var zut=__webpack_require__(30020),df=__webpack_require__.n(zut),Ei=__webpack_require__(63988),Si=__webpack_require__(89794);class jut{constructor(n,o,e,i,r,s){this.gamesStateService=r,this.shopInventoryService=i,this.store=e,this.option=n,this.optionGroup=o,this.constants=s,this.userItemStash=this.store.selectUserState().gameInventory.items,this.pathPrefix="".concat(Lt.CONFIG.core.cdn.url),this.init()}init(){this.setOptionByType()}getOptions(){let n;return n={id:this.option.id,defaultValue:this.getOptionDefaultValue(),options:this.getOptionValues(),type:Si.FieldType.Picker,value:this.getOptionDefaultValue(),group:this.optionGroup},n}getOptionDefaultValue(){let n;const o=this.shopInventoryService.getGameSpecificCategory(this.option.customTag,this.userItems,this.gamesStateService.getCurrentGameRelatedConfig().gameConfig);return o&&o.itemViewModel&&(n={id:o.itemViewModel.item.id,path:"".concat(this.pathPrefix).concat(o.itemViewModel.item.data.previewUrl),group:this.optionGroup}),n}setOptionByType(){this.userItems=this.getOptionByType(this.getOptionType())}getOptionType(){if(this.option.customTag)return this.option.customTag}getDefaultPlayerItem(){const n={id:"default_table",group:"inventory",path:"".concat(this.constants.imagesPath,"/item-store/default__background.jpg"),isDefaultItem:!0},o={id:"default_deck",group:"inventory",path:"".concat(this.constants.imagesPath,"/item-store/default_deck.png"),isDefaultItem:!0};return"game.inventory.deck"===this.option.id?o:"game.inventory.table"===this.option.id?n:void 0}getOptionByType(n){return this.userItemStash.filter(o=>o.item.type===n)}getOptionValues(){let n=[];return this.userItems.forEach((o,e)=>{const i={id:o.item.id,path:"".concat(this.pathPrefix).concat(o.item.data.previewUrl),group:this.optionGroup};n.push(i)}),n.unshift(this.getDefaultPlayerItem()),n}}let uve=(()=>{var t;class n{getGlobalInventoryCategory(e,i){switch(e){case Fe.TG.Frame:return{type:Fe.TG.Frame,group:Fe.TG.Frame,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.Frame)};case Fe.TG.EmojiSet:return{type:Fe.TG.EmojiSet,group:Fe.TG.EmojiSet};case Fe.TG.PhraseSet:return{type:Fe.TG.PhraseSet,group:Fe.TG.PhraseSet};case Fe.TG.Booster:return{type:Fe.TG.Booster,group:Fe.TG.Booster};case Fe.TG.MessageColor:return{type:Fe.TG.MessageColor,group:Fe.TG.MessageColor,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.MessageColor)};case Fe.TG.NameColor:return{type:Fe.TG.NameColor,group:Fe.TG.NameColor,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.NameColor)};case Fe.TG.ProfileBackground:return{type:Fe.TG.ProfileBackground,group:Fe.TG.ProfileBackground,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.ProfileBackground)};default:return}}getGameSpecificCategory(e,i,r){switch(e){case Fe.TG.Deck:return{type:Fe.TG.Deck,group:Fe.TG.Deck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.Deck,r)};case Fe.TG.SkatDeck:return{type:Fe.TG.SkatDeck,group:Fe.TG.Deck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.SkatDeck,r)};case Fe.TG.KlaverjasDeck:return{type:Fe.TG.KlaverjasDeck,group:Fe.TG.Deck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.KlaverjasDeck,r)};case Fe.TG.DeDeck:return{type:Fe.TG.DeDeck,group:Fe.TG.Deck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.DeDeck,r)};case Fe.TG.ItDeck:return{type:Fe.TG.ItDeck,group:Fe.TG.Deck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.ItDeck,r)};case Fe.TG.ChDeck:return{type:Fe.TG.ChDeck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.ChDeck,r),group:Fe.TG.Deck};case Fe.TG.EsDeck:return{type:Fe.TG.EsDeck,group:Fe.TG.Deck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.EsDeck,r)};case Fe.TG.TarotDeck:return{type:Fe.TG.TarotDeck,group:Fe.TG.Deck,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.TarotDeck,r)};case Fe.TG.Table:return{type:Fe.TG.Table,group:Fe.TG.Table,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.Table,r)};case Fe.TG.Dice:return{type:Fe.TG.Dice,group:Fe.TG.Dice,itemViewModel:this.getInventoryEquippedItemByType(i,this.getPlayerItemTypeByGame(wt.Dice,r),r)};case Fe.TG.Pawn:return{type:Fe.TG.Pawn,group:Fe.TG.Pawn,itemViewModel:this.getInventoryEquippedItemByType(i,this.getPlayerItemTypeByGame(wt.Pawns,r),r)};case Fe.TG.VoiceOver:return{type:Fe.TG.VoiceOver,group:Fe.TG.VoiceOver,itemViewModel:this.getInventoryEquippedItemByType(i,Fe.TG.VoiceOver,r)};default:return}}getInventoryEquippedItemByType(e,i,r){return e.find(s=>s.item.type===i&&(r?s.equippedGames&&-1!==s.equippedGames.indexOf(r.id):s.equipped))}getPlayerItemTypeByGame(e,i){switch(e){case wt.Dice:return-1!==i.id.toLowerCase().indexOf("backgammon")?Fe.TG.BackgammonDice:-1!==i.id.toLowerCase().indexOf("shudo")?Fe.TG.ShudoDice:Fe.TG.BackgammonDice;case wt.Pawns:return-1!==i.id.toLowerCase().indexOf("ludo")?Fe.TG.LudoPawn:-1!==i.id.toLowerCase().indexOf("sheesh")?Fe.TG.SheeshPawn:-1!==i.id.toLowerCase().indexOf("smallsheesh")?Fe.TG.SmallSheeshPawn:Fe.TG.LudoPawn;default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Ig=(()=>{var t;class n{constructor(e,i,r,s){this.store=e,this.gamesStateService=r,this.shopInventoryService=i,this.constants=s,this.pathPrefix="".concat(Lt.CONFIG.core.cdn.url)}getItemStoreItem(e,i){return new jut(e,i,this.store,this.shopInventoryService,this.gamesStateService,this.constants).getOptions()}getInventoryItemOptions(e){return e.forEach((i,r)=>{if(i&&this.isInventoryItem(i)){const s=this.getItemStoreItem(i,"inventory");e[r].options=[];for(let a of s.options)e[r].options.push({value:a});s.defaultValue&&(e[r].defaultValue={value:void 0},e[r].defaultValue.value=s.defaultValue)}}),e}excludeInventoryItemOptions(e){let i=[];return e.forEach((r,s)=>{r&&this.isInventoryItem(r)&&i.push(r)}),i.forEach(r=>{e.splice(e.findIndex(s=>s.id===r.id),1)}),e}isInventoryItem(e){return-1!==e.id.indexOf("game.inventory")}transformFieldToInfo(e,i,r){return e.format!==Si.EFormat.Custom||e.customTag!==Jt.PlayerItemType.Deck&&e.customTag!==Jt.PlayerItemType.Table?(e.format===Si.EFormat.Boolean&&(i=i?"BUTTON.YES":"BUTTON.NO"),e.linkedTo=void 0,{...e,format:e.format,defaultValue:{value:i,label:r},options:[],type:Si.FieldType.Info,masterFieldId:void 0}):this.transformPickerToInfo(e,i)}transformPickerToInfo(e,i){if(i){const r={id:i.id,group:"inventory",path:"".concat(this.pathPrefix).concat(i.data.previewUrl)};return{...e,options:[{value:r}]}}return{...e,options:e.options.slice(0,1)}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(uve),T(Zn),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Hut=t=>({"text-area":t}),qut=t=>({value:t});let kC=(()=>{var t;class n{constructor(e,i){this.element=i,this.selectedOption=new ke,this.inputType="text",this.cdr=e}ngOnInit(){this.defaultValue=this.defaultValue||{id:"",value:""},this.inputType=this.option.fieldConfig.inputType===Ei.EInputType.TextArea?"textarea":"text",this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){(e.option&&!e.option.firstChange||e.defaultValue&&!e.defaultValue.firstChange||e.error&&!e.error.firstChange)&&(this.defaultValue=this.defaultValue||{id:"",value:""},this.cdr.detectChanges())}onChange(e){this.selectedOption.emit({id:this.option.id,state:{value:e}})}onClear(){this.selectedOption.emit({id:this.option.id,state:{value:""}})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g($t))},t.\u0275cmp=pe({type:t,selectors:[["form-input"]],inputs:{option:"option",defaultValue:"defaultValue",error:"error"},outputs:{selectedOption:"selectedOption"},features:[it],decls:8,vars:21,consts:[[1,"form--input__wrapper"],[1,"form--input__values"],[1,"form--input__component",3,"ngClass","type","placeholder","errorMessage","maxLength","nativeAttr","onChange","onClear"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"p"),H(2),V(3,"translate"),m(),p(4,"div",1)(5,"user-input",2),Y("onChange",function(s){return i.onChange(s)})("onClear",function(){return i.onClear()}),V(6,"translate"),V(7,"translate"),m()()()),2&e&&(d(),ni("form--input__text--label ",i.option.fieldConfig.id.split(".").join("-"),""),d(),ze(" ",$(3,10,i.option.fieldConfig.label)," "),d(3),l("ngClass",ne(17,Hut,"textarea"===i.inputType))("type",i.inputType)("placeholder",$(6,12,i.option.fieldConfig.placeholder))("errorMessage",i.error?yt(7,14,i.error.key,i.error.params):void 0)("maxLength",i.option.fieldConfig.maxLength)("nativeAttr",ne(19,qut,i.defaultValue.value)))},dependencies:[Xe,il,qe],styles:[".form--input__text--label[_ngcontent-%COMP%]{position:relative;display:inline-block;text-transform:uppercase;text-align:center;left:50%;padding:.5rem;font-weight:600;font-size:1.8rem;transform:translate(-50%);line-height:20px;margin:0}.form--input__values[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:26rem;margin:.3rem auto 1.5rem;padding:0 .5rem;border-radius:.8rem}.form--input__component[_ngcontent-%COMP%]{width:100%;display:block;height:4rem}.form--input__component.text-area[_ngcontent-%COMP%]{height:10rem}"],changeDetection:0}),n})();var Wut=__webpack_require__(97661),ez=__webpack_require__.n(Wut);class tz{constructor(n,o=[]){this.fieldsArray=[],this.selectedOptions=new Qn([]),this.fields=[],this.fields=o,this.formOptions=n,this.buildForm()}get formFields(){return this.fieldsArray}get currentSelected(){return this.selectedOptions.getValue()}get selected(){return this.selectedOptions}select(n,o=!0){for(let e=0,i=this.fieldsArray.length;e<i;e++)switch(this.fieldsArray[e].id===n.id&&(this.fieldsArray[e].selectedOption=n.state),this.toggleVisibleState(this.fieldsArray[e]),this.fieldsArray[e].fieldConfig.type){case Ei.FieldType.Picker:this.handlePickerSelectValue(this.fieldsArray[e],e,n);break;case Ei.FieldType.Toggle:this.handleRadioSelectValue(this.fieldsArray[e],e,n);break;case Ei.FieldType.Info:this.handleLabelSelectValue(this.fieldsArray[e]);break;case Ei.FieldType.Dropdown:this.handleDropdownSelectValue(this.fieldsArray[e])}this.constructSellectedSettings(this.fieldsArray,o)}resetForm(n){this.fields=n,this.fieldsArray=[],this.buildForm()}constructSellectedSettings(n,o=!0){const e=[];for(let i of n)if(i.isVisible||i.fieldConfig.hasOwnProperty("isVisible")){const r={id:i.id,value:i.selectedOption?i.selectedOption.value:null};(!i.group||i&&i.group&&"inventory"!==i.group||i&&i.group&&"inventory"===i.group&&i.selectedOption.value&&-1===i.selectedOption.value.id.indexOf("default"))&&e.push(r)}o&&this.selectedOptions.next(e)}buildForm(){let n=100;for(let o of this.fields)this.fieldsArray.push(this.constructClientField(o,o.order?o.order:n+=1));for(let o=0,e=this.fieldsArray.length;o<e;o++){let i=this.fieldsArray[o];i.fieldConfig.type===Ei.FieldType.Picker&&i.fieldConfig.masterFieldId?(i.options=this.filterPickerOptions(i,i.fieldConfig.masterFieldId),i.selectedOption=i.options[0]):i.fieldConfig.type===Ei.FieldType.Toggle?this.filterRadioOptions(i):i.fieldConfig.type===Ei.FieldType.Info?this.filterLabelOptions(i):i.fieldConfig.type===Ei.FieldType.Dropdown&&this.filterDropdownOptions(i),this.toggleVisibleState(i)}this.constructSellectedSettings(this.fieldsArray)}constructClientField(n,o){switch(n.type){case Ei.FieldType.Picker:return{id:n.id,fieldConfig:n,options:n.options,selectedOption:n.defaultValue&&!n.masterFieldId?n.defaultValue:n.options[0],isVisible:!n.hasOwnProperty("isVisible")||n.isVisible,orderIndex:o,group:this.formOptions.isInventoryItem(n)?"inventory":void 0};case Ei.FieldType.Toggle:return{id:n.id,fieldConfig:n,selectedOption:n.defaultValue?n.defaultValue:{value:!0},isVisible:!n.hasOwnProperty("isVisible")||n.isVisible,orderIndex:o};case Ei.FieldType.Info:return{id:n.id,fieldConfig:n,selectedOption:n.defaultValue&&!n.masterFieldId?n.defaultValue:n.options[0],isVisible:!n.hasOwnProperty("isVisible")||n.isVisible,orderIndex:o};case Ei.FieldType.Dropdown:case Ei.FieldType.Input:return{id:n.id,fieldConfig:n,options:n.options,selectedOption:n.defaultValue&&!n.masterFieldId?n.defaultValue:n.options[0],isVisible:!n.hasOwnProperty("isVisible")||n.isVisible,orderIndex:o,group:this.formOptions.isInventoryItem(n)?"inventory":void 0};default:return{id:n.id,fieldConfig:n,isVisible:!0,orderIndex:o}}}filterPickerOptions(n,o){const e=this.getMasterField(o);return ez()(n.options,i=>!i.linkedTo&&!i.linkedToRestOfTheOptions||!i.linkedTo&&i.linkedToRestOfTheOptions&&-1===i.linkedToRestOfTheOptions.excludedValues.indexOf(e.selectedOption.value)||i.linkedTo&&Op()(i.linkedTo.value,e.selectedOption.value))}filterRadioOptions(n){for(let o=0,e=n.fieldConfig.options.length;o<e;o++)if(n.fieldConfig.options[o].linkedTo){let i=this.getMasterField(n.fieldConfig.options[o].linkedTo.id);Op()(n.fieldConfig.options[o].linkedTo.value,i.selectedOption.value)?(n.selectedOption.value=n.fieldConfig.options[o].value,n.disabledOption=!0):n.disabledOption=!1}}filterLabelOptions(n){for(let o=0,e=n.fieldConfig.options.length;o<e;o++)if(n.fieldConfig.options[o].linkedTo){let i=this.getMasterField(n.fieldConfig.options[o].linkedTo.id);Op()(n.fieldConfig.options[o].linkedTo.value,i.selectedOption.value)&&(n.selectedOption=n.fieldConfig.options[o])}}filterDropdownOptions(n){for(let o=0,e=n.fieldConfig.options.length;o<e;o++)if(n.fieldConfig.options[o].linkedTo){let i=this.getMasterField(n.fieldConfig.options[o].linkedTo.id);Op()(n.fieldConfig.options[o].linkedTo.value,i.selectedOption.value)&&(n.selectedOption=n.fieldConfig.options[o])}}getMasterField(n){return this.fieldsArray.find(o=>o.id===n)}handlePickerSelectValue(n,o,e){if(n.fieldConfig.masterFieldId&&n.id!==e.id){const i=n.options.indexOf(n.selectedOption);n.options=this.filterPickerOptions(this.fields[o],this.fields[o].masterFieldId),n.selectedOption=-1===n.options.indexOf(n.selectedOption)||n.options.indexOf(n.selectedOption)!==i?n.options[0]:n.options[n.options.indexOf(n.selectedOption)]}}handleRadioSelectValue(n,o,e){n.fieldConfig.masterFieldId&&n.fieldConfig.linkedTo&&n.id!==e.id&&this.filterRadioOptions(n)}handleLabelSelectValue(n){this.filterLabelOptions(n)}handleDropdownSelectValue(n){this.filterDropdownOptions(n)}toggleVisibleState(n){if(!n.fieldConfig.isVisible&&n.fieldConfig.linkedTo){let o=this.getMasterField(n.fieldConfig.linkedTo.id);n.isVisible=Op()(n.fieldConfig.linkedTo.value,o.selectedOption.value)}}}var $ut=__webpack_require__(81904),Kut=__webpack_require__.n($ut),Zut=ve.EButtonModifier,Qut=ve.EIcons;const Yut=["scrollElement"],Jut=["container"];function Xut(t,n){1&t&&(p(0,"div",10)(1,"p",11)(2,"span"),H(3),V(4,"translate"),m()()()),2&t&&(d(3),se($(4,1,"NONE")))}function edt(t,n){1&t&&(p(0,"p",11)(1,"span"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"NONE")))}function tdt(t,n){1&t&&B(0,"number",20),2&t&&l("value",_(2).$implicit.value)}function ndt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function idt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function odt(t,n){if(1&t&&(p(0,"p",11),U(1,tdt,1,1,"number",18)(2,ndt,3,3,"span",19)(3,idt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function rdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"formatNumber"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.value))}}function sdt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function adt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}const cdt=t=>({chips:t});function ldt(t,n){if(1&t&&(p(0,"p",21),U(1,rdt,3,3,"span",19)(2,sdt,3,3,"span",19)(3,adt,3,3,"span",19),m()),2&t){const o=_().$implicit;l("ngClass",ne(4,cdt,null!==o.value)),d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function udt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"formatNumber"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.value))}}function ddt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function pdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}const hdt=t=>({gems:t});function mdt(t,n){if(1&t&&(p(0,"p",22),U(1,udt,3,3,"span",19)(2,ddt,3,3,"span",19)(3,pdt,3,3,"span",19),m()),2&t){const o=_().$implicit;l("ngClass",ne(4,hdt,null!==o.value)),d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function fdt(t,n){if(1&t&&(p(0,"span",25),H(1),m()),2&t){const o=_(2).$implicit;d(),se(o.value)}}function gdt(t,n){1&t&&(p(0,"span",26),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"LOCALE.POINTS")))}function _dt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function vdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function bdt(t,n){if(1&t&&(p(0,"p",11),U(1,fdt,2,1,"span",23)(2,gdt,3,3,"span",24)(3,_dt,3,3,"span",19)(4,vdt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function Cdt(t,n){if(1&t&&(p(0,"span",28),H(1),V(2,"formatSeconds"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.value))}}function ydt(t,n){1&t&&(p(0,"span",26),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"LOCALE.SECONDS")))}function Sdt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function wdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function Tdt(t,n){if(1&t&&(p(0,"p",11),U(1,Cdt,3,3,"span",27)(2,ydt,3,3,"span",24)(3,Sdt,3,3,"span",19)(4,wdt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function Pdt(t,n){if(1&t&&(p(0,"span",31),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,"LOCALE.CURRENCY_SIGNS."+o.value.currency.toUpperCase()))}}function Idt(t,n){if(1&t&&(p(0,"span",32),H(1),V(2,"formatNumber"),m()),2&t){const o=_(2).$implicit;l("ngClass",o.value.currency),d(),ze(" ",$(2,2,o.value.amount)," ")}}function Mdt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function Odt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function Edt(t,n){if(1&t&&(p(0,"p",11),U(1,Pdt,3,3,"span",29)(2,Idt,3,4,"span",30)(3,Mdt,3,3,"span",19)(4,Odt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function xdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.value))}}function Adt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function Rdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function kdt(t,n){if(1&t&&(p(0,"p"),U(1,xdt,3,3,"span",19)(2,Adt,3,3,"span",19)(3,Rdt,3,3,"span",19),m()),2&t){const o=_().$implicit;ni("fis__text--value ",o.value?o.value.toLowerCase():"",""),d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function Ldt(t,n){1&t&&(B(0,"span",34),V(1,"translate")),2&t&&l("innerHTML",$(1,1,"CUSTOM_GAMES.VALUES."+_(2).$implicit.value),Yn)}function Ddt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function Bdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function Ndt(t,n){if(1&t&&(p(0,"p",11),U(1,Ldt,2,3,"span",33)(2,Ddt,3,3,"span",19)(3,Bdt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function Fdt(t,n){1&t&&(B(0,"span",34),V(1,"translate")),2&t&&l("innerHTML",$(1,1,_(2).$implicit.value),Yn)}function Udt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function Gdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function Vdt(t,n){if(1&t&&(p(0,"p",11),U(1,Fdt,2,3,"span",33)(2,Udt,3,3,"span",19)(3,Gdt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function zdt(t,n){1&t&&(B(0,"span",34),V(1,"translate")),2&t&&l("innerHTML",$(1,1,"TEXT.ON"),Yn)}function jdt(t,n){1&t&&(B(0,"span",34),V(1,"translate")),2&t&&l("innerHTML",$(1,1,"TEXT.OFF"),Yn)}function Hdt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function qdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function Wdt(t,n){if(1&t&&(p(0,"p",11),U(1,zdt,2,3,"span",33)(2,jdt,2,3,"span",33)(3,Hdt,3,3,"span",19)(4,qdt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",null!==o.value&&!0===o.value&&!o.label),d(),l("ngIf",null!==o.value&&!1===o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function $dt(t,n){1&t&&B(0,"img",38),2&t&&l("imgSrc",_(2).$implicit.value.path)}function Kdt(t,n){1&t&&B(0,"div",39)}function Zdt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function Qdt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function Ydt(t,n){if(1&t&&(p(0,"div",35),U(1,$dt,1,1,"img",36)(2,Kdt,1,0,"div",37)(3,Zdt,3,3,"span",19)(4,Qdt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",o.value.path&&null!==o.value),d(),l("ngIf",!o.value.path&&null!==o.value),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function Jdt(t,n){1&t&&B(0,"img",38),2&t&&l("imgSrc",_(2).$implicit.value.path)}function Xdt(t,n){1&t&&B(0,"div",39)}function ept(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function tpt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function npt(t,n){if(1&t&&(p(0,"div",35),U(1,Jdt,1,1,"img",36)(2,Xdt,1,0,"div",37)(3,ept,3,3,"span",19)(4,tpt,3,3,"span",19),m()),2&t){const o=_().$implicit;d(),l("ngIf",o.value.path&&null!==o.value),d(),l("ngIf",!o.value.path&&null!==o.value),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}function ipt(t,n){if(1&t&&(p(0,"span"),H(1),m()),2&t){const o=_(2).$implicit;d(),se(o.value)}}function opt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function rpt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.label))}}function spt(t,n){if(1&t&&(p(0,"p"),U(1,ipt,2,1,"span",19)(2,opt,3,3,"span",19)(3,rpt,3,3,"span",19),m()),2&t){const o=_().$implicit;ni("fis__text--value ",_().fieldConfig.id,""),d(),l("ngIf",null!==o.value&&!o.label),d(),l("ngIf",null===o.value&&!o.label),d(),l("ngIf",o.label)}}const nz=t=>({image:t});function apt(t,n){if(1&t&&(p(0,"div",12),U(1,edt,4,3,"p",13)(2,odt,4,3,"p",13)(3,ldt,4,6,"p",14)(4,mdt,4,6,"p",15)(5,bdt,5,4,"p",13)(6,Tdt,5,4,"p",13)(7,Edt,5,4,"p",13)(8,kdt,4,6,"p",16)(9,Ndt,4,3,"p",13)(10,Vdt,4,3,"p",13)(11,Wdt,5,4,"p",13)(12,Ydt,5,4,"div",17)(13,npt,5,4,"div",17)(14,spt,4,6,"p",16),m()),2&t){const o=n.$implicit,e=_();l("ngClass",ne(15,nz,e.fieldConfig.format===e.optionFormats.Image||e.fieldConfig.format===e.optionFormats.Custom)),d(),l("ngIf",null===o),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Number),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Chips),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Gems),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Points),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Seconds),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Currency),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Text),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.LocalizedText),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.NumberRange),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Boolean),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Image),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Custom&&o.value.path),d(),l("ngIf",e.fieldConfig.format===e.optionFormats.Custom&&!o.value.path)}}const dve=t=>({name:t});let iz=(()=>{var t;class n{constructor(e,i,r,s){this.selectedOption=new ke,this.optionFormats=Si.EFormat,this.buttonModifier=Zut,this.iconNames=Qut,this.renderer=i,this.firstTimeOpen=!0,this.soundService=e,this.cdr=r,this.ngZone=s}ngOnInit(){this.options&&(this.fieldConfig=this.options.fieldConfig,this.availableValues=this.options.options instanceof Array?this.options.options:[this.options.options],this.lastOptionsArray=this.availableValues,this.valueIndex=this.options.fieldConfig.format===Si.EFormat.Image||this.options.fieldConfig.format===Si.EFormat.Custom&&this.options.options[0].value.path?this.findDefaultImageValueIndex(this.defaultValue,this.options.options):this.findDefaultValueIndex(this.defaultValue,this.options.options),this.rafId=requestAnimationFrame(()=>{this.moveStep=this.container.nativeElement.offsetWidth,this.renderer.setStyle(this.scrollElement.nativeElement,"width","".concat(this.moveStep*(this.options&&this.options.options?this.options.options.length:0),"px")),this.valueIndex>0&&this.moveValue(),this.cdr.detectChanges()}))}ngOnChanges(){this.options&&(Op()(this.lastSelectedOption,this.defaultValue)||(this.availableValues=this.options.options instanceof Array?this.options.options:[this.options.options],this.valueIndex=0,this.lastSelectedOption=this.availableValues[this.valueIndex],this.ngZone.runOutsideAngular(()=>{this.rafId=requestAnimationFrame(()=>{this.moveStep=this.container.nativeElement.offsetWidth,this.renderer.setStyle(this.scrollElement.nativeElement,"width","".concat(this.moveStep*(this.options&&this.options.options?this.options.options.length:0),"px")),this.moveValue(),this.cdr.detectChanges()})})))}ngOnDestroy(){this.selectedOption.unsubscribe(),this.options=void 0,this.renderer.destroy(),this.hideDelay&&clearTimeout(this.hideDelay),cancelAnimationFrame(this.rafId)}changeCurrentValue(e,i){const r=this.availableValues.length,s=this.valueIndex>=0&&this.valueIndex<r;this.soundService.play(dn.SlideOptions),i.stopPropagation(),s&&(this.valueIndex=this.setValue(e,this.valueIndex,r),this.moveValue("buttonsTriggered"),this.lastSelectedOption=this.availableValues[this.valueIndex],this.selectedOption.emit({id:this.options.id,state:this.availableValues[this.valueIndex]}))}setValue(e,i,r){return i>=0&&i<r&&("right"===e?i++:i--),i}moveValue(e){this.moveStep=this.moveStep||this.container.nativeElement.offsetWidth,e&&this.renderer.setStyle(this.scrollElement.nativeElement,"transition","all 500ms ease"),this.renderer.setStyle(this.scrollElement.nativeElement,"transform","translateX( -".concat(this.valueIndex*this.moveStep,"px)"))}findDefaultValueIndex(e,i){let r=0;return r=Kut()(i,e),r}findDefaultImageValueIndex(e,i){let r=0;return r=lA()(i,"value.id").indexOf(e.value.id),r}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mo),g(ji),g(Re),g(an))},t.\u0275cmp=pe({type:t,selectors:[["form-items-slider"]],viewQuery:function(e,i){if(1&e&&($e(Yut,5),$e(Jut,5)),2&e){let r;je(r=He())&&(i.scrollElement=r.first),je(r=He())&&(i.container=r.first)}},inputs:{options:"options",defaultValue:"defaultValue"},outputs:{selectedOption:"selectedOption"},features:[it],decls:13,vars:24,consts:[[1,"fis__wrapper"],[1,"fis__container--values"],[1,"fis__button--left",3,"buttonModifier","disabled","icon","onClick"],[1,"fis__container--slide",3,"ngClass"],["container",""],[1,"fis__container--option",3,"ngClass"],["scrollElement",""],["class","fis__text--option",4,"ngIf"],["class","fis__text--option",3,"ngClass",4,"ngFor","ngForOf"],["data-cy","formSliderRightButton",1,"fis__button--right",3,"buttonModifier","icon","disabled","onClick"],[1,"fis__text--option"],[1,"fis__text--value"],[1,"fis__text--option",3,"ngClass"],["class","fis__text--value",4,"ngIf"],["class","fis__text--value",3,"ngClass",4,"ngIf"],["class","fis__text--value gems",3,"ngClass",4,"ngIf"],[3,"class",4,"ngIf"],["class","fis__image--value",4,"ngIf"],[3,"value",4,"ngIf"],[4,"ngIf"],[3,"value"],[1,"fis__text--value",3,"ngClass"],[1,"fis__text--value","gems",3,"ngClass"],["class","fis__text--points-value",4,"ngIf"],["class","fis__text--sek",4,"ngIf"],[1,"fis__text--points-value"],[1,"fis__text--sek"],["class","fis__text--time-value",4,"ngIf"],[1,"fis__text--time-value"],["class","currency",4,"ngIf"],["class","price",3,"ngClass",4,"ngIf"],[1,"currency"],[1,"price",3,"ngClass"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[1,"fis__image--value"],["class","img-slider__image--preview","empty-placeholder","","alt","item img",3,"imgSrc",4,"ngIf"],["class","img-slider__container--placeholder",4,"ngIf"],["empty-placeholder","","alt","item img",1,"img-slider__image--preview",3,"imgSrc"],[1,"img-slider__container--placeholder"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"p"),H(2),V(3,"translate"),m(),p(4,"div",1)(5,"button-icon",2),Y("onClick",function(s){return i.changeCurrentValue("left",s)}),m(),p(6,"div",3,4)(8,"div",5,6),U(10,Xut,5,3,"div",7)(11,apt,15,17,"div",8),m()(),p(12,"button-icon",9),Y("onClick",function(s){return i.changeCurrentValue("right",s)}),m()()()),2&e&&(d(),ni("fis__text--label ",i.options.id.split(".").join("-"),""),d(),ze(" ",$(3,14,i.fieldConfig.label?i.fieldConfig.label:"")," "),d(3),l("buttonModifier",i.fieldConfig.format===i.optionFormats.Image||i.fieldConfig.format===i.optionFormats.Custom?i.buttonModifier.BUTTON_TRANSPARENT:i.buttonModifier.BUTTON_ACTION)("disabled",i.valueIndex<=0)("icon",ne(16,dve,i.fieldConfig.format===i.optionFormats.Text||i.fieldConfig.format===i.optionFormats.LocalizedText||i.fieldConfig.format===i.optionFormats.Image||i.fieldConfig.format===i.optionFormats.Custom?i.iconNames.ARROW_BACK:i.iconNames.MINUS)),d(),l("ngClass",ne(18,nz,i.fieldConfig.format===i.optionFormats.Image||i.fieldConfig.format===i.optionFormats.Custom)),d(2),l("ngClass",ne(20,nz,i.fieldConfig.format===i.optionFormats.Image||i.fieldConfig.format===i.optionFormats.Custom)),d(2),l("ngIf",!i.options.options.length),d(),l("ngForOf",i.options.options),d(),l("buttonModifier",i.fieldConfig.format===i.optionFormats.Image||i.fieldConfig.format===i.optionFormats.Custom?i.buttonModifier.BUTTON_TRANSPARENT:i.buttonModifier.BUTTON_ACTION)("icon",ne(22,dve,i.fieldConfig.format===i.optionFormats.Text||i.fieldConfig.format===i.optionFormats.LocalizedText||i.fieldConfig.format===i.optionFormats.Image||i.fieldConfig.format===i.optionFormats.Custom?i.iconNames.ARROW_RIGHT:i.iconNames.PLUS))("disabled",i.valueIndex===i.availableValues.length-1))},dependencies:[Xe,Mt,Ne,$o,Qr,ei,qe,Go,Pw],changeDetection:0}),n})();var oz=function(t){return t.TOGGLE="toggle",t.CHECKBOX="checkbox",t}(oz||{});const cpt=t=>({checkedToggle:t});function lpt(t,n){if(1&t){const o=Ce();p(0,"div",3),Y("click",function(){return oe(o),re(_().toggleClicked())}),B(1,"div",4),m()}if(2&t){const o=_();l("ngClass",ne(2,cpt,o.state))("sound",o.ESound.ClickToggle)}}const upt=t=>({"toogle-button__checked":t});function dpt(t,n){if(1&t){const o=Ce();p(0,"div",5),Y("click",function(){return oe(o),re(_().toggleClicked())}),B(1,"div",6),m()}if(2&t){const o=_();l("ngClass",ne(1,upt,o.state))}}let M0=(()=>{var t;class n{constructor(e){this.buttonType=oz.TOGGLE,this.EToggleType=oz,this.ESound=dn,this.stateChange=new ke,this.cdr=e}toggleClicked(){var e=this;return f(function*(){try{if(e.conditionCallback&&!e.conditionCallback())return;e.state=!e.state,e.stateChange.emit(e.state),e.cdr.detectChanges()}catch(i){console.log(i)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["toggle-button"]],inputs:{state:"state",conditionCallback:"conditionCallback",buttonType:"buttonType"},outputs:{stateChange:"stateChange"},decls:3,vars:2,consts:[[1,"toggle-button__wrapper"],["class","cmn-toggle","click-sound","",3,"ngClass","sound","click",4,"ngIf"],["class","toggle-button__checkbox",3,"ngClass","click",4,"ngIf"],["click-sound","",1,"cmn-toggle",3,"ngClass","sound","click"],[1,"cmn-toggle-round"],[1,"toggle-button__checkbox",3,"ngClass","click"],[1,"checkbox_check"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,lpt,2,4,"div",1)(2,dpt,2,3,"div",2),m()),2&e&&(d(),l("ngIf",i.buttonType===i.EToggleType.TOGGLE),d(),l("ngIf",i.buttonType===i.EToggleType.CHECKBOX))},dependencies:[Xe,Ne,Fd],styles:['.cmn-toggle[_ngcontent-%COMP%]   .cmn-toggle-round[_ngcontent-%COMP%], .cmn-toggle[_ngcontent-%COMP%]:before{content:"";position:absolute;display:block}.toggle-button__wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.cmn-toggle[_ngcontent-%COMP%]{display:block;position:relative;outline:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cmn-toggle[_ngcontent-%COMP%]:hover{cursor:pointer}.cmn-toggle[_ngcontent-%COMP%]{padding:.2rem;width:7rem;height:3.5rem;border-radius:3.5rem!important;transition:.3s background-color linear}.cmn-toggle[_ngcontent-%COMP%]:before{border-radius:3.5rem}.cmn-toggle[_ngcontent-%COMP%]   .cmn-toggle-round[_ngcontent-%COMP%]{transition:all .3s;transform:translate(0);width:2.6rem;height:2.6rem;margin-top:.2rem;margin-left:.2rem;border-radius:100%}.cmn-toggle.checkedToggle[_ngcontent-%COMP%]   .cmn-toggle-round[_ngcontent-%COMP%]{transform:translate(calc(100% + 1rem));width:2.6rem;height:2.6rem}.toggle-button__checkbox[_ngcontent-%COMP%]{height:2rem;width:2rem;transition:background-color .4s ease}'],changeDetection:0}),n})();const ppt=t=>({$implicit:t});function hpt(t,n){if(1&t&&Un(0,7),2&t){const o=_();l("ngTemplateOutlet",o.option.fieldConfig.templateData.templateRef)("ngTemplateOutletContext",ne(2,ppt,o.option.fieldConfig.templateData.data))}}function mpt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_();ni("ft__text--toggle-label ",o.option.id.split(".").join("-")," "),d(),ze(" ",$(2,4,o.option.fieldConfig.label?o.option.fieldConfig.label:"")," ")}}function fpt(t,n){if(1&t&&(p(0,"div",8)(1,"p"),H(2),V(3,"translate"),m()()),2&t){const o=_();d(2),se(yt(3,1,o.infoText.key,o.infoText.params))}}const gpt=(t,n,o)=>({disabledOption:t,hideAnim:n,hidden:o});let rz=(()=>{var t;class n{constructor(e){this.selectedOption=new ke,this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}setFieldVisability(){this.option.isVisible||this.option.fieldConfig.linkedTo?this.fieldHidden=!1:this.hideDelay=setTimeout(()=>{this.fieldHidden=!0},300)}optionChangeHandler(e){this.selectedOption.emit({value:e})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["form-toggle"]],inputs:{option:"option",infoText:"infoText",defaultValue:"defaultValue"},outputs:{selectedOption:"selectedOption"},features:[it],decls:7,vars:9,consts:[[1,"ft__container--toggle",3,"ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[1,"ft__container--toggle-label"],[3,"class",4,"ngIf"],[1,"ft__container--toggle-button"],[3,"state","stateChange"],["class","ft__container--toggle--hint",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ft__container--toggle--hint"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,hpt,1,4,"ng-container",1),p(2,"div",2),U(3,mpt,3,6,"p",3),m(),p(4,"div",4)(5,"toggle-button",5),Y("stateChange",function(s){return i.optionChangeHandler(s)}),m()(),U(6,fpt,4,4,"div",6),m()),2&e&&(l("ngClass",_a(5,gpt,i.option.disabledOption,!i.option.isVisible,i.fieldHidden)),d(),l("ngIf",i.option.fieldConfig.templateData&&i.option.fieldConfig.templateData.templateRef),d(2),l("ngIf",i.option.fieldConfig.label),d(2),l("state",i.option.selectedOption.value),d(),l("ngIf",i.infoText))},dependencies:[Xe,Ne,qr,M0,qe],styles:[".ft__container--toggle[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;padding:.5rem}@media only screen and (max-width: 320px){.ft__container--toggle[_ngcontent-%COMP%]{padding:.5rem 0!important}}.ft__container--toggle[_ngcontent-%COMP%]   .ft__text--toggle-label[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;font-weight:600;text-transform:uppercase;margin-left:2rem;padding-left:.5rem}@media only screen and (max-width: 768px){.ft__container--toggle[_ngcontent-%COMP%]   .ft__text--toggle-label[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 320px){.ft__container--toggle[_ngcontent-%COMP%]   .ft__text--toggle-label[_ngcontent-%COMP%]{margin:0 .5rem 0 3rem!important}}.ft__container--toggle-label[_ngcontent-%COMP%]{flex:1}.ft__container--toggle-button[_ngcontent-%COMP%]{width:7rem}.disabledOption[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;filter:blur(1px)}.ft__container--toggle--hint[_ngcontent-%COMP%]{margin-top:.3rem;margin-left:.5rem;width:100%}.ft__container--toggle--hint[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;font-size:1.2rem}"],changeDetection:0}),n})();function _pt(t,n){if(1&t&&B(0,"currency-component",10),2&t){const o=_(3);l("currency",o.field.fieldConfig.format===o.optionFormats.Chips?o.currencyType.Chips:o.currencyType.Gems)("value",o.defaultValue.value)}}function vpt(t,n){1&t&&B(0,"icon-component",11),2&t&&l("icon",_(3).iconNames.CLUB_XP)}function bpt(t,n){if(1&t&&(p(0,"span",12),H(1),V(2,"formatNumber"),m()),2&t){const o=_(3);d(),se($(2,1,o.defaultValue.value))}}function Cpt(t,n){if(1&t&&(p(0,"p",6),U(1,_pt,1,2,"currency-component",7)(2,vpt,1,1,"icon-component",8)(3,bpt,3,3,"span",9),m()),2&t){const o=_(2);l("ngClass",o.field.fieldConfig.format),d(),l("ngIf",o.field.fieldConfig.format===o.optionFormats.Chips||o.field.fieldConfig.format===o.optionFormats.Gems),d(),l("ngIf",o.field.fieldConfig.format===o.optionFormats.ClubShards),d(),l("ngIf",o.field.fieldConfig.format!==o.optionFormats.Chips&&o.field.fieldConfig.format!==o.optionFormats.Gems)}}function ypt(t,n){if(1&t&&(p(0,"p",13),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),ze(" ",$(2,1,o.defaultValue.value),"")}}function Spt(t,n){1&t&&(p(0,"p",14),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"NONE")))}function wpt(t,n){if(1&t&&(p(0,"p",14),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.defaultValue.label))}}function Tpt(t,n){if(1&t&&(p(0,"p",14),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.defaultValue.value))}}function Ppt(t,n){if(1&t&&(p(0,"p",14)(1,"span",15),H(2),V(3,"formatSeconds"),m(),p(4,"span"),H(5),V(6,"translate"),m()()),2&t){const o=_(2);d(2),se($(3,2,o.defaultValue.value)),d(3),se($(6,4,"LOCALE.SECONDS"))}}function Ipt(t,n){if(1&t&&(p(0,"p",14)(1,"span"),H(2),V(3,"translate"),m()()),2&t){const o=_(2);d(2),se($(3,1,"CUSTOM_GAMES.VALUES."+o.defaultValue.value))}}function Mpt(t,n){if(1&t&&(p(0,"div",2),U(1,Cpt,4,4,"p",3)(2,ypt,3,3,"p",4)(3,Spt,3,3,"p",5)(4,wpt,3,3,"p",5)(5,Tpt,3,3,"p",5)(6,Ppt,7,6,"p",5)(7,Ipt,4,3,"p",5),m()),2&t){const o=_();d(),l("ngIf",o.defaultValue.value&&!o.defaultValue.label&&(o.field.fieldConfig.format===o.optionFormats.Number||o.field.fieldConfig.format===o.optionFormats.Chips||o.field.fieldConfig.format===o.optionFormats.Gems||o.field.fieldConfig.format===o.optionFormats.ClubShards)),d(),l("ngIf",o.defaultValue.value&&!o.defaultValue.label&&o.field.fieldConfig.format===o.optionFormats.Text),d(),l("ngIf",null===o.defaultValue.value),d(),l("ngIf",o.defaultValue.label&&null!==o.defaultValue.value),d(),l("ngIf",o.field.fieldConfig.format===o.optionFormats.Boolean),d(),l("ngIf",o.field.fieldConfig.format===o.optionFormats.Seconds),d(),l("ngIf",o.field.fieldConfig.format===o.optionFormats.LocalizedText)}}let sz=(()=>{var t;class n{constructor(){this.optionFormats=Si.EFormat,this.currencyType=ln,this.iconNames=ve.EIcons}ngOnInit(){this.setFieldVisability()}ngOnDestroy(){this.hideDelay&&clearTimeout(this.hideDelay)}setFieldVisability(){this.field.isVisible?this.fieldHidden=!1:this.hideDelay=setTimeout(()=>{this.fieldHidden=!0},300)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["form-label"]],inputs:{field:"field",defaultValue:"defaultValue"},decls:5,vars:7,consts:[[1,"fl__wrapper"],["class","fl__container--values",4,"ngIf"],[1,"fl__container--values"],["class","fl__text--reward-value ",3,"ngClass",4,"ngIf"],["class","fl__text--reward-value",4,"ngIf"],["class","fl__text--reward-value none",4,"ngIf"],[1,"fl__text--reward-value",3,"ngClass"],[3,"currency","value",4,"ngIf"],["class","fl__text--reward-value__icon",3,"icon",4,"ngIf"],["class","fl__text--reward-value__amount",4,"ngIf"],[3,"currency","value"],[1,"fl__text--reward-value__icon",3,"icon"],[1,"fl__text--reward-value__amount"],[1,"fl__text--reward-value"],[1,"fl__text--reward-value","none"],[1,"seconds--value"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"p"),H(2),V(3,"translate"),m(),U(4,Mpt,8,7,"div",1),m()),2&e&&(d(),ni("fl__text--label ",i.field.fieldConfig.id.split(".").join("-"),""),d(),ze(" ",$(3,5,i.field.fieldConfig.label)," "),d(2),l("ngIf",i.defaultValue))},dependencies:[Xe,Ne,Dn,So,qe,Go,Pw],styles:[".fl__text--reward-value[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;font-size:2.4rem;font-weight:600;margin:1rem 0;line-height:26px}@media only screen and (max-height: 568px){.fl__text--reward-value[_ngcontent-%COMP%]{font-size:1.8rem;line-height:18px}}.fl__text--reward-value[_ngcontent-%COMP%] > .seconds--value[_ngcontent-%COMP%]{margin:0 .5rem}.fl__text--reward-label[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-transform:uppercase;text-align:center;line-height:2rem}.fl__text--label[_ngcontent-%COMP%]{position:relative;display:inline-block;text-transform:uppercase;text-align:center;left:50%;padding:.5rem;font-weight:600;font-size:1.8rem;transform:translate(-50%);line-height:20px}.fl__container--values[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:26rem;margin:.3rem auto 1.5rem;padding:0 .5rem;border-radius:.8rem}.fl__text--reward-value__amount[_ngcontent-%COMP%]{margin-left:.3rem}"],changeDetection:0}),n})();function Opt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.selected.text))}}function Ept(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.inputControl.placeholder))}}function xpt(t,n){if(1&t&&(Tn(0),p(1,"div",5),U(2,Opt,3,3,"p",6)(3,Ept,3,3,"p",6),m(),Pn()),2&t){const o=_();d(2),l("ngIf",o.selected),d(),l("ngIf",!o.selected)}}function Apt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit;d(),se($(2,1,o.text))}}const Rpt=t=>({"form-dropdown__custom-select__option__selected":t});function kpt(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",8),Y("select",function(i){return oe(o),re(_(2).onSelect(i))}),p(1,"div",9),U(2,Apt,3,3,"p",6),m()()}if(2&t){const o=n.$implicit,e=_(2);l("value",o),d(),l("ngClass",ne(3,Rpt,e.selected&&e.selected.value===o.value)),d(),l("ngIf",o.text)}}function Lpt(t,n){if(1&t&&U(0,kpt,3,5,"custom-select-item",7),2&t){const o=_();l("ngForOf",o.option.options)("ngForTrackBy",o.trackOptionByFn)}}const Dpt=t=>({disabledOption:t});let az=(()=>{var t;class n{constructor(e,i){this.selectedOption=new ke,this.inputControl={type:rd.EControlType.Input,placeholder:{key:"CLUBS.ANY_LOCATION"}},this.options=[],this.cdr=e,this.translatePipe=i}ngOnChanges(e){this.options=this.option.options.map(i=>({text:i.text,value:i.value})),this.defaultValue&&(this.selected=this.options.find(i=>i.value===this.defaultValue.value)),this.cdr.detectChanges()}onSelect(e){this.selected=e,this.selectedOption.emit({id:this.option.id,state:e}),this.cdr.detectChanges()}trackOptionByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(qe))},t.\u0275cmp=pe({type:t,selectors:[["form-dropdown"]],inputs:{option:"option",defaultValue:"defaultValue"},outputs:{selectedOption:"selectedOption"},features:[it],decls:10,vars:10,consts:[[1,"ft__container--dropdown",3,"ngClass"],[1,"ft__container--dropdown-label"],[1,"form-dropdown__custom-select",3,"buttonCustomCss"],["selectedItem",""],["options",""],[1,"form-dropdown__selected-option"],[4,"ngIf"],[3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","select"],["data-cy","customSelectOption",1,"form-dropdown__custom-select__option",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"p"),H(3),V(4,"translate"),m()(),p(5,"custom-select",2),U(6,xpt,4,2,"ng-template",null,3,ft)(8,Lpt,1,2,"ng-template",null,4,ft),m()()),2&e&&(l("ngClass",ne(8,Dpt,i.option.disabledOption)),d(2),ni("ft__text--dropdown-label ",i.option.id.split(".").join("-")," "),d(),ze(" ",$(4,6,i.option.fieldConfig.label?i.option.fieldConfig.label:"")," "),d(2),l("buttonCustomCss","form-dropdown__custom-select__extend--button"))},dependencies:[Xe,Mt,Ne,Up,Vd,qe],styles:[".ft__container--dropdown[_ngcontent-%COMP%]{text-align:center;padding:.5rem}.ft__text--dropdown-label[_ngcontent-%COMP%]{position:relative;display:inline-block;font-size:1.8rem;font-weight:600;text-transform:uppercase;padding-left:.5rem}.ft__container--dropdown-label[_ngcontent-%COMP%]{padding:.5rem 0}.ft__text--dropdown-select[_ngcontent-%COMP%]{display:block;width:26rem;margin:auto}.disabledOption[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;filter:blur(1px)}"],changeDetection:0}),n})();const Bpt=["*"];let cz=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["form-info-container"]],ngContentSelectors:Bpt,decls:2,vars:0,consts:[[1,"form__field--info-container"]],template:function(e,i){1&e&&(Co(),p(0,"container-component",0),yo(1),m())},dependencies:[Ga],encapsulation:2,changeDetection:0}),n})();const Npt=["fieldInfo"];function Fpt(t,n){if(1&t&&B(0,"form-label",10),2&t){const o=_().$implicit;l("field",o)("defaultValue",o.selectedOption)("hidden",!o.isVisible)}}function Upt(t,n){if(1&t){const o=Ce();p(0,"form-items-slider",11),Y("selectedOption",function(i){return oe(o),re(_(2).fieldSelectValue(i))}),m()}if(2&t){const o=_().$implicit;l("defaultValue",o.selectedOption)("options",o)("hidden",!o.isVisible)}}function Gpt(t,n){if(1&t){const o=Ce();p(0,"form-toggle",12),Y("selectedOption",function(i){oe(o);const r=_().$implicit;return re(_().fieldSelectValue({state:i,id:r.id}))}),m()}if(2&t){const o=_().$implicit,e=_();l("defaultValue",o.selectedOption)("option",o)("hidden",!o.isVisible)("infoText",e.infoTexts[o.id])}}function Vpt(t,n){if(1&t){const o=Ce();p(0,"form-dropdown",13),Y("selectedOption",function(i){return oe(o),re(_(2).fieldSelectValue(i))}),m()}if(2&t){const o=_().$implicit;l("defaultValue",o.selectedOption)("option",o)("hidden",!o.isVisible)}}function zpt(t,n){if(1&t){const o=Ce();p(0,"form-input",14),Y("selectedOption",function(i){return oe(o),re(_(2).fieldSelectValue(i))}),m()}if(2&t){const o=_().$implicit,e=_();l("defaultValue",o.selectedOption)("option",o)("error",e.errors[o.id])("hidden",!o.isVisible)}}function jpt(t,n){}const Hpt=t=>({$implicit:t});function qpt(t,n){if(1&t&&(p(0,"form-info-container"),U(1,jpt,0,0,"ng-template",15),m()),2&t){const o=_().$implicit,e=_();d(),l("ngTemplateOutlet",e.fieldInfo)("ngTemplateOutletContext",ne(2,Hpt,o))}}const Wpt=(t,n)=>({visible:t,disabled:n});function $pt(t,n){if(1&t&&(p(0,"div",2)(1,"div",3),U(2,Fpt,1,3,"form-label",4)(3,Upt,1,3,"form-items-slider",5)(4,Gpt,1,4,"form-toggle",6)(5,Vpt,1,3,"form-dropdown",7)(6,zpt,1,4,"form-input",8)(7,qpt,2,4,"form-info-container",9),m()()),2&t){const o=n.$implicit,e=_();go("order",o.orderIndex),l("ngClass",cn(9,Wpt,o.isVisible,e.disabledFields[o.id])),d(2),l("ngIf",o.fieldConfig.type===e.fieldTypes.Info),d(),l("ngIf",o.fieldConfig.type===e.fieldTypes.Picker),d(),l("ngIf",o.fieldConfig.type===e.fieldTypes.Toggle),d(),l("ngIf",o.fieldConfig.type===e.fieldTypes.Dropdown),d(),l("ngIf",o.fieldConfig.type===e.fieldTypes.Input),d(),l("ngIf",e.fieldInfo)}}let Xd=(()=>{var t;class n{constructor(e){this.errors={},this.disabledFields={},this.infoTexts={},this.fieldTypes=Ei.FieldType,this.formOptionsService=e,this.onOptionSelect=new ke}ngOnInit(){this.form=new tz(this.formOptionsService,this.config),this.subscription=this.form.selected.subscribe(e=>this.onOptionSelect.emit(e))}ngOnChanges(e){e.errors&&_u(0).subscribe(()=>{if(this.formInputs){const i=this.formInputs.find(r=>!!r.error);i&&cr.scrollIntoView(i.element.nativeElement)}})}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}reset(){this.form.resetForm(this.config)}fieldSelectValue(e,i=!0){this.form.select(e,i)}trackByFn(e,i){return i.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ig))},t.\u0275cmp=pe({type:t,selectors:[["form-builder"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,Npt,5),2&e){let s;je(s=He())&&(i.fieldInfo=s.first)}},viewQuery:function(e,i){if(1&e&&$e(kC,5,kC),2&e){let r;je(r=He())&&(i.formInputs=r)}},inputs:{config:"config",errors:"errors",disabledFields:"disabledFields",infoTexts:"infoTexts"},outputs:{onOptionSelect:"onOptionSelect"},features:[it],decls:2,vars:2,consts:[[1,"form__wrapper"],["class","form__container--field",3,"order","ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"form__container--field",3,"ngClass"],[1,"form__field"],[3,"field","defaultValue","hidden",4,"ngIf"],[3,"defaultValue","options","hidden","selectedOption",4,"ngIf"],[3,"defaultValue","option","hidden","infoText","selectedOption",4,"ngIf"],[3,"defaultValue","option","hidden","selectedOption",4,"ngIf"],[3,"defaultValue","option","error","hidden","selectedOption",4,"ngIf"],[4,"ngIf"],[3,"field","defaultValue","hidden"],[3,"defaultValue","options","hidden","selectedOption"],[3,"defaultValue","option","hidden","infoText","selectedOption"],[3,"defaultValue","option","hidden","selectedOption"],[3,"defaultValue","option","error","hidden","selectedOption"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,$pt,8,12,"div",1),m()),2&e&&(d(),l("ngForOf",i.form.formFields)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Ne,qr,iz,kC,rz,sz,az,cz],styles:[".form__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:auto;min-height:100%}.form__container--field[_ngcontent-%COMP%]{transition:opacity .5s ease-in;width:100%;opacity:0}.form__container--field[_ngcontent-%COMP%]   .form__field[_ngcontent-%COMP%]{width:100%}.form__container--field.visible[_ngcontent-%COMP%]{opacity:1}.form__container--field.disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}"],changeDetection:0}),n})(),hM=(()=>{var t;class n{constructor(e){this.fields=[],this.infoTexts={},this.filter=new ke,this.reset=new ke,this.filtersState=new Qn({hasAppliedFilters:!1,isSameAsLastApplied:!0,isInitialApplied:!0,lastAppliedFilters:[],changesAfterReset:0}),this.buttonModifier=ve.EButtonModifier,this.selectedFilters=[],this.initialFilters=[],this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}onFilterSelect(e){this.initialFilters.length||(this.initialFilters=e),this.filtersState.getValue().lastAppliedFilters.length||this.updateFilterState({lastAppliedFilters:e}),this.selectedFilters=e,this.updateFilterState({isSameAsLastApplied:e.every(i=>i.value===this.filtersState.getValue().lastAppliedFilters.find(r=>r.id===i.id).value),changesAfterReset:this.filtersState.getValue().changesAfterReset+1}),this.cdr.detectChanges()}emitSelection(){const e=this.selectedFilters.every(i=>i.value===this.initialFilters.find(r=>r.id===i.id).value);this.updateFilterState({isSameAsLastApplied:!0,lastAppliedFilters:this.selectedFilters,isInitialApplied:e,hasAppliedFilters:!e}),this.filter.emit(this.selectedFilters),this.cdr.detectChanges()}resetUnsavedFilters(){this.selectedFilters=this.filtersState.getValue().lastAppliedFilters,this.updateFilterState({isSameAsLastApplied:!0}),this.cdr.detectChanges()}resetSavedFilters(){this.updateFilterState({hasAppliedFilters:!1,changesAfterReset:0,lastAppliedFilters:[]}),this.form&&this.form.reset(),this.reset.emit(),this.cdr.detectChanges()}updateFilterState(e){this.filtersState.next({...this.filtersState.getValue(),...e})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["filter"]],viewQuery:function(e,i){if(1&e&&$e(Xd,7),2&e){let r;je(r=He())&&(i.form=r.first)}},inputs:{fields:"fields",infoTexts:"infoTexts"},outputs:{filter:"filter",reset:"reset"},features:[it],decls:9,vars:12,consts:[[1,"filter__content--wrapper"],[3,"config","infoTexts","onOptionSelect"],[1,"filter__footer"],[1,"filter__button--filter",3,"buttonModifier","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"form-builder",1),Y("onOptionSelect",function(s){return i.onFilterSelect(s)}),m()(),p(2,"div",2)(3,"button-text",3),Y("onClick",function(){return i.emitSelection()}),H(4),V(5,"translate"),m(),p(6,"button-text",3),Y("onClick",function(){return i.resetSavedFilters()}),H(7),V(8,"translate"),m()()),2&e&&(d(),l("config",i.fields)("infoTexts",i.infoTexts),d(2),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("disabled",i.filtersState.getValue().isSameAsLastApplied),d(),ze("",$(5,8,"TEXT.FILTER")," "),d(2),l("buttonModifier",i.buttonModifier.BUTTON_ACTION)("disabled",!(i.filtersState.getValue().changesAfterReset>=2&&(!i.filtersState.getValue().isInitialApplied||!i.filtersState.getValue().isSameAsLastApplied))),d(),ze("",$(8,10,"TEXT.RESET")," "))},dependencies:[pn,Xd,qe],styles:[".filter__content--wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:calc(100% - 12rem);margin:0 auto;padding:.5rem;width:96%}.filter__footer[_ngcontent-%COMP%]{display:flex;align-items:center;height:6rem;padding:0 2rem}.filter__button--filter[_ngcontent-%COMP%]{width:40%}"],changeDetection:0}),n})();class pve{constructor(n){this.options=new Map,this.searchbarFilter={id:"searchFilter",value:void 0},this.updateOptions(n)}set searchbarFilterValue(n){this.searchbarFilter.value=n}get searchbarFilterValue(){return this.searchbarFilter.value}updateOptions(n=[]){n.forEach(o=>this.options.set(o.id,{value:o.value}))}getOptionsMap(n){const o=new Map(this.options);return this.searchbarFilterValue&&o.set(n,{value:this.searchbarFilterValue}),Object.fromEntries(o)}}const hve={submitOnClose:!0},Kpt=["popupTitleBar"],Zpt=["filterComponent"],Qpt=["*"];let yL=(()=>{var t;class n{constructor(e){this.destroyRef=e,this.closePopup=new ke,this.filterPopupOptionsState=hve}ngOnChanges(e){e.filterPopupOptions&&(this.filterPopupOptionsState={...hve,...e.filterPopupOptions.currentValue})}ngAfterViewInit(){this.popupTitleBarComponent.buttonCloseClicked.pipe(mi(this.destroyRef)).subscribe(()=>{this.onClose()})}onClose(){this.filterPopupOptionsState.submitOnClose&&this.filterComponent.emitSelection(),this.closePopup.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(br))},t.\u0275cmp=pe({type:t,selectors:[["filter-popup-container"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,Kpt,5),Ho(r,Zpt,5)),2&e){let s;je(s=He())&&(i.popupTitleBarComponent=s.first),je(s=He())&&(i.filterComponent=s.first)}},inputs:{filterPopupOptions:"filterPopupOptions",popupContainerOptions:"popupContainerOptions",popupContainerOpened:"popupContainerOpened",raysAnimationOn:"raysAnimationOn"},outputs:{closePopup:"closePopup"},features:[it],ngContentSelectors:Qpt,decls:2,vars:2,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"]],template:function(e,i){1&e&&(Co(),p(0,"popup-container",0),Y("closePopup",function(){return i.onClose()}),yo(1),m()),2&e&&l("popupContainerOpened",i.popupContainerOpened)("popupContainerOptions",i.popupContainerOptions)},dependencies:[Wi],encapsulation:2,changeDetection:0}),n})();var lz=ve.EButtonModifier,Ypt=ve.EIcons;const Jpt=["scrollEl"],Xpt=["filterComponent"];function eht(t,n){if(1&t){const o=Ce();p(0,"div",8),Y("click",function(i){return oe(o),re(_().closeSearchHistory(i))}),m()}}const tht=t=>({focused:t}),nht=t=>({tabindex:t}),SL=t=>({name:t});function iht(t,n){if(1&t){const o=Ce();p(0,"p",12),Y("click",function(){const r=oe(o).$implicit;return re(_(2).doSearch(r))}),H(1),p(2,"button-icon",13),Y("onClick",function(i){const s=oe(o).index;return re(_(2).deleteSearchedText(s,i))}),m()()}if(2&t){const o=n.$implicit,e=n.index,i=_(2);SS("id","searchedText",e,""),l("ngClass",ne(6,tht,i.selectedTextIndex===e)),d(),ze("",o," "),d(),l("nativeAttr",ne(8,nht,-1))("bclass","search-bar__delete")("icon",ne(10,SL,i.iconsEnum.CLOSE))}}const oht=(t,n,o)=>({opened:t,"with-filter":n,"with-reset":o});function rht(t,n){if(1&t&&(p(0,"div",9,10),U(2,iht,3,12,"p",11),m()),2&t){const o=_();l("hidden",!o.showSearchHistory)("ngClass",_a(3,oht,o.searchHistory.length>0,o.filterConfig,o.showResetButton&&o.filterConfig)),d(2),l("ngForOf",o.searchHistory)}}function sht(t,n){if(1&t){const o=Ce();p(0,"button-icon",14),Y("onClick",function(){return oe(o),re(_().resetFilters())}),m()}if(2&t){const o=_();l("icon",ne(2,SL,o.iconsEnum.CLOSE))("buttonModifier",o.buttonTypes.resetButton)}}function aht(t,n){if(1&t){const o=Ce();p(0,"button-icon",14),Y("onClick",function(){return oe(o),re(_().changeFilterPopupState(!0))}),m()}if(2&t){const o=_();l("icon",ne(2,SL,o.iconsEnum.Filter))("buttonModifier",o.buttonTypes.filterButton)}}const cht=()=>({submitOnClose:!1});function lht(t,n){if(1&t){const o=Ce();p(0,"filter-popup-container",15),Y("closePopup",function(){return oe(o),re(_().changeFilterPopupState(!1))}),p(1,"popup-title-bar",16,17),Y("buttonCloseClicked",function(){return oe(o),re(_().changeFilterPopupState(!1))}),m(),p(3,"filter",18,19),Y("filter",function(i){return oe(o),re(_().onSearchWithFilters(i))})("reset",function(){return oe(o),re(_().onFiltersReset())}),m()()}if(2&t){const o=_();l("popupContainerOpened",o.filterPopupOpened)("popupContainerOptions",o.filterPopupConfig)("filterPopupOptions",pt(5,cht)),d(),l("popupTitleType",o.popupTitleTypes.Logo),d(2),l("fields",o.filterConfig)}}const uht=()=>({autocomplete:"off"});let pf=(()=>{var t;class n{constructor(e,i,r){this.cdr=e,this.appStorage=i,this.renderer=r,this.showSearchHistory=!1,this.customInputCssClass="",this.clearFilters=new ke,this.filterAction=new ke,this.popupTitleTypes=li,this.filterPopupConfig={styleProperties:{maxWidth:"35rem",maxHeight:"55rem"}},this.buttonTypes={searchButton:lz.BUTTON_SEARCH,resetButton:lz.BUTTON_NEGATIVE,filterButton:lz.BUTTON_ATTENTION},this.iconsEnum=Ypt,this.filterPopupOpened=!1,this.filters=new pve,this.onKeyPress=s=>{if(this.searchHistory&&this.searchHistory.length&&(("Escape"===s.key||27===s.keyCode)&&this.doSearch(""),("Delete"===s.key||46===s.keyCode)&&void 0!==this.selectedTextIndex&&this.deleteSearchedText(this.selectedTextIndex),("ArrowDown"===s.key||40===s.keyCode)&&(void 0!==this.selectedTextIndex&&this.selectedTextIndex<this.searchHistory.length-1?this.selectedTextIndex+=1:void 0===this.selectedTextIndex&&(this.selectedTextIndex=0),this.searcher.writeValue(this.searchHistory[this.selectedTextIndex])),("ArrowUp"===s.key||38===s.keyCode)&&(void 0!==this.selectedTextIndex&&this.selectedTextIndex>0?this.selectedTextIndex-=1:void 0===this.selectedTextIndex&&(this.selectedTextIndex=0),this.searcher.writeValue(this.searchHistory[this.selectedTextIndex])),this.searchHistory[this.selectedTextIndex])){const a=document.getElementById("searchedText".concat(this.selectedTextIndex));a&&this.scrollContainer&&(this.scrollContainer.nativeElement.scrollTop=a.offsetTop-a.offsetHeight),this.detectChanges()}},this.cdr.detach()}ngOnInit(){this.allSearchHistory=this.getSearchHistory(),this.searchHistory=[],this.detectChanges()}ngOnChanges(e){this.detectChanges()}doSearch(e){if(this.closeSearchHistory(),this.searcher.inputValue!==e&&this.searcher.writeValue(e),-1!==this.allSearchHistory.indexOf(e)&&this.allSearchHistory.splice(this.allSearchHistory.indexOf(e),1),this.allSearchHistory.unshift(e),this.allSearchHistory=this.allSearchHistory.slice(0,100),this.showSearchHistory&&this.userMe){let i=this.appStorage.getItem("searchHistory");this.appStorage.setItem("searchHistory",i?df()(i,{[this.userMe.profile.id]:this.allSearchHistory}):{[this.userMe.profile.id]:this.allSearchHistory})}e&&0!==e.length?(this.filters.searchbarFilterValue=e,this.showResetButton=!0,this.filterAction.emit(Qu()(this.filters))):(this.filters.searchbarFilterValue=void 0,0===this.filters.options.size?this.resetFilters():(this.filterAction.emit(Qu()(this.filters)),this.showResetButton=!0)),this.detectChanges()}onSearchWithFilters(e){e.length>0&&(this.showResetButton=!0),this.filters.updateOptions(e),this.changeFilterPopupState(!1),this.filterAction.emit(this.filters)}inputClear(){this.searcher.writeValue(""),this.isSearchEnabled=!1,this.doSearch("")}resetFilters(){var e;this.filterComponent&&this.filters.options.size>0?null===(e=this.filterComponent)||void 0===e||e.resetSavedFilters():this.clearFilters.emit(),this.searcher.writeValue(""),this.showResetButton=!1,this.closeSearchHistory()}onFiltersReset(){this.searcher.writeValue(""),this.isSearchEnabled=!1,this.showResetButton=!1,this.filters=new pve,this.changeFilterPopupState(!1),this.clearFilters.emit()}onSearchButtonClicked(){this.searcher&&this.doSearch(this.searcher.inputValue)}closeSearchHistory(e){this.searchHistory=[],this.detachKeyListeners(),this.detectChanges()}onChange(e){e.length<=0?(this.searchHistory=[],this.detachKeyListeners(),this.isSearchEnabled=!1):(this.isSearchEnabled=!0,this.searchHistory=this.allSearchHistory.filter(i=>i.includes(e)).slice(0,10),this.attachKeyListeners()),this.detectChanges()}getSearchHistory(){let e=this.appStorage.getItem("searchHistory");return e&&this.userMe&&e[this.userMe.profile.id]?e[this.userMe.profile.id]:[]}attachKeyListeners(){this.keyPressListener||(this.keyPressListener=this.renderer.listen("window","keyup",this.onKeyPress))}detachKeyListeners(){this.keyPressListener&&(this.keyPressListener(),this.keyPressListener=null),this.selectedTextIndex=void 0}deleteSearchedText(e,i){i&&i.stopPropagation(),this.allSearchHistory.splice(this.allSearchHistory.indexOf(this.searchHistory[e]),1),this.searchHistory.splice(e,1),this.selectedTextIndex=this.searchHistory[e]?e:this.searchHistory[e+1]?e+1:e-1,this.detectChanges()}changeFilterPopupState(e){this.filterPopupOpened=e,this.detectChanges()}detectChanges(){this.cdr.destroyed||this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Ci),g(ji))},t.\u0275cmp=pe({type:t,selectors:[["search-bar"]],viewQuery:function(e,i){if(1&e&&($e(il,7),$e(Jpt,7),$e(Xpt,5)),2&e){let r;je(r=He())&&(i.searcher=r.first),je(r=He())&&(i.scrollContainer=r.first),je(r=He())&&(i.filterComponent=r.first)}},inputs:{searchBarPlaceholder:"searchBarPlaceholder",showSearchHistory:"showSearchHistory",error:"error",filterConfig:"filterConfig",userMe:"userMe",customInputCssClass:"customInputCssClass"},outputs:{clearFilters:"clearFilters",filterAction:"filterAction"},features:[it],decls:10,vars:25,consts:[["class","search-bar__overlay",3,"click",4,"ngIf"],[1,"search-bar__wrapper"],[1,"search-bar__user-input",3,"nativeAttr","placeholder","errorMessage","hideClearButton","inputCssClass","fieldId","onSubmit","onChange","onClear"],["class","search-bar__container--history",3,"hidden","ngClass",4,"ngIf"],[1,"search-bar__container--button-search"],["data-cy","searchButton",1,"search-bar__button",3,"icon","buttonModifier","disabled","onClick"],["class","search-bar__button with-filter",3,"icon","buttonModifier","onClick",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","filterPopupOptions","closePopup",4,"ngIf"],[1,"search-bar__overlay",3,"click"],[1,"search-bar__container--history",3,"hidden","ngClass"],["scrollEl",""],[3,"id","ngClass","click",4,"ngFor","ngForOf"],[3,"id","ngClass","click"],[1,"delete",3,"nativeAttr","bclass","icon","onClick"],[1,"search-bar__button","with-filter",3,"icon","buttonModifier","onClick"],[3,"popupContainerOpened","popupContainerOptions","filterPopupOptions","closePopup"],[3,"popupTitleType","buttonCloseClicked"],["popupTitleBar",""],[3,"fields","filter","reset"],["filterComponent",""]],template:function(e,i){1&e&&(U(0,eht,1,0,"div",0),p(1,"section",1)(2,"user-input",2),Y("onSubmit",function(s){return i.doSearch(s)})("onChange",function(s){return i.onChange(s)})("onClear",function(){return i.inputClear()}),V(3,"translate"),m(),U(4,rht,3,7,"div",3),p(5,"div",4)(6,"button-icon",5),Y("onClick",function(){return i.onSearchButtonClicked()}),m(),U(7,sht,1,4,"button-icon",6)(8,aht,1,4,"button-icon",6),m()(),U(9,lht,5,6,"filter-popup-container",7)),2&e&&(l("ngIf",i.showSearchHistory&&i.searchHistory&&i.searchHistory.length>0),d(2),Uo("with-filter",i.filterConfig)("with-reset",i.showResetButton&&i.filterConfig),l("nativeAttr",pt(22,uht))("placeholder",$(3,20,i.searchBarPlaceholder))("errorMessage",i.error&&0===i.searchHistory.length?i.error:void 0)("hideClearButton",!1)("inputCssClass",i.customInputCssClass)("fieldId","searchBarInput"),d(2),l("ngIf",i.searchHistory),d(2),Uo("with-filter",i.filterConfig),l("icon",ne(23,SL,i.iconsEnum.SEARCH))("buttonModifier",i.buttonTypes.searchButton)("disabled",!i.isSearchEnabled),d(),l("ngIf",i.showResetButton&&i.filterConfig),d(),l("ngIf",i.filterConfig),d(),l("ngIf",i.filterConfig))},dependencies:[Xe,Mt,Ne,ei,Ji,il,hM,yL,qe],styles:["search-bar{width:100%;height:100%}.search-bar__overlay{position:fixed;top:0;left:0;width:100vw;height:100vh}.search-bar__wrapper{position:relative;display:flex;flex-flow:row wrap;align-items:center;justify-content:center;height:100%;width:100%;margin:0 auto;z-index:1}@media only screen and (max-width: 1024px){.search-bar__wrapper{width:100%}}.search-bar__user-input{position:relative;width:100%;height:4rem;padding-right:4.5rem}@media only screen and (max-width: 768px){.search-bar__user-input{height:4rem!important}.search-bar__user-input input{font-size:1.8rem!important}}.search-bar__user-input.with-filter{padding-right:9.25rem}.search-bar__user-input.with-filter.with-reset{padding-right:14.25rem}.search-bar__container--history{position:absolute;top:4rem;left:0;width:calc(100% - 4.5rem);height:0;max-height:20rem;overflow-x:hidden;overflow-y:auto;opacity:0}.search-bar__container--history.with-filter{width:calc(100% - 9.25rem)}.search-bar__container--history.with-filter.with-reset{width:calc(100% - 14.25rem)}.search-bar__container--history>p{position:relative;font-size:1.8rem;padding:.5rem .5rem .5rem 1rem;border-radius:.8rem}@media only screen and (max-width: 768px){.search-bar__container--history>p{font-size:1.4rem}}.search-bar__container--history>p .delete{position:absolute;right:0;top:50%;height:3rem!important;transform:translateY(-50%);font-size:1.8rem}.search-bar__container--history.opened{height:auto;opacity:1}@media only screen and (max-height: 380px){.search-bar__container--history{max-height:12rem}}.search-bar__button{width:4rem;height:4rem}.search-bar__button.with-filter{margin:0 .25rem}.search-bar__input--search{width:100%;height:100%;margin:0 1rem 0 0!important;line-height:3rem!important;min-width:auto!important}.search-bar__container--button-search{top:50%;transform:translateY(-50%);position:absolute;right:0;display:flex;flex-flow:row wrap}.search-bar__container--clear-search{position:absolute;top:50%;transform:translateY(-50%);right:5rem}@media only screen and (max-width: 768px){.search-bar__container--clear-search{right:4.2rem}}@media only screen and (max-width: 480px){.search-bar__container--clear-search{right:4.8rem}}.lang-ar .search-bar__container--clear-search,.lang-fa .search-bar__container--clear-search{right:0;left:1rem}\n"],encapsulation:2,changeDetection:0}),n})();function dht(t,n){if(1&t&&(p(0,"div",7)(1,"p"),H(2),m()()),2&t){const o=_();d(2),ze("#",o.config.index,"")}}const pht=(t,n)=>({"with-other-item":t,"with-index-score":n});function hht(t,n){if(1&t&&(p(0,"div",8),B(1,"username",9),m()),2&t){const o=_();l("ngClass",cn(2,pht,o.config.score||0===o.config.score||o.config.index,(o.config.score||0===o.config.score)&&o.config.index)),d(),l("userProfile",o.user)}}function mht(t,n){if(1&t&&(p(0,"div")(1,"p"),H(2),V(3,"formatNumber"),m()()),2&t){const o=_();ni("user-list-item__container--score ",o.config.scoreType,""),d(2),se($(3,4,o.config.score))}}let uz=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["user-list-item"]],inputs:{user:"user",config:"config"},decls:7,vars:7,consts:[[1,"user-list-item__wrapper"],[1,"user-list-item__container--avatar"],[3,"isLink","user","hasUsername","hasLevel"],[1,"user-list-item__container--info"],["class","user-list-item__container--index",4,"ngIf"],["class","user-list-item__container--username",3,"ngClass",4,"ngIf"],[3,"class",4,"ngIf"],[1,"user-list-item__container--index"],[1,"user-list-item__container--username",3,"ngClass"],[3,"userProfile"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),B(2,"avatar",2),m(),p(3,"div",3),U(4,dht,3,1,"div",4)(5,hht,2,5,"div",5)(6,mht,4,6,"div",6),m()()),2&e&&(d(2),l("isLink",!0)("user",i.user)("hasUsername",!1)("hasLevel",!0),d(2),l("ngIf",i.config&&i.config.index),d(),l("ngIf",i.config&&i.config.showUsername),d(),l("ngIf",i.config&&i.config.score||i.config&&0===i.config.score))},dependencies:[Xe,Ne,Bo,Zp,Go],styles:[".user-list-item__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;width:100%;min-height:7.5rem}@media only screen and (max-width: 480px){.user-list-item__wrapper[_ngcontent-%COMP%]{min-height:6.5rem}}.user-list-item__container--avatar[_ngcontent-%COMP%]{order:1;width:7.5rem;height:100%;position:relative;padding:.5rem}@media only screen and (max-width: 480px){.user-list-item__container--avatar[_ngcontent-%COMP%]{width:6.5rem}}.user-list-item__container--avatar[_ngcontent-%COMP%]:hover{cursor:pointer}.user-list-item__container--info[_ngcontent-%COMP%]{order:2;width:calc(100% - 7.5rem);height:100%;display:flex;flex-flow:row wrap}@media only screen and (max-width: 480px){.user-list-item__container--info[_ngcontent-%COMP%]{width:calc(100% - 6.5rem)}}.user-list-item__container--index[_ngcontent-%COMP%]{width:5.5rem;height:100%;display:flex;justify-content:flex-start;align-items:center}@media only screen and (max-width: 480px){.user-list-item__container--index[_ngcontent-%COMP%]{width:3.5rem}}.user-list-item__container--index[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1.8rem}@media only screen and (max-width: 480px){.user-list-item__container--index[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.user-list-item__container--username[_ngcontent-%COMP%]{flex:1;width:100%;height:100%;display:flex;justify-content:flex-start;align-items:center;padding-left:1rem}.user-list-item__container--username.with-other-item[_ngcontent-%COMP%]{width:calc(100% - 11rem);justify-content:center}@media only screen and (max-width: 480px){.user-list-item__container--username.with-other-item[_ngcontent-%COMP%]{width:calc(100% - 10rem)}}.user-list-item__container--username.with-index-score[_ngcontent-%COMP%]{width:calc(100% - 16.5rem);padding-left:0;justify-content:center}@media only screen and (max-width: 480px){.user-list-item__container--username.with-index-score[_ngcontent-%COMP%]{width:calc(100% - 13.5rem)}}.user-list-item__container--username[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1.8rem}@media only screen and (max-width: 480px){.user-list-item__container--username[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.user-list-item__container--score[_ngcontent-%COMP%]{width:11rem;height:100%;display:flex;justify-content:flex-end;align-items:center;padding-right:1rem}@media only screen and (max-width: 480px){.user-list-item__container--score[_ngcontent-%COMP%]{width:10rem}}.user-list-item__container--score[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{max-width:100%;white-space:nowrap;text-overflow:ellipsis;font-size:1.8rem}@media only screen and (max-width: 480px){.user-list-item__container--score[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}"],changeDetection:0}),n})();var Ll=function(t){return t[t.GIFTS=0]="GIFTS",t[t.GIFTALL=1]="GIFTALL",t}(Ll||{}),O0=function(t){return t.TopBarNotification="topBarNotification",t.OutsideProfile="outsideProfile",t.Profile="profile",t.Game="game",t}(O0||{}),E0=function(t){return t[t.Drawer=0]="Drawer",t[t.Popup=1]="Popup",t}(E0||{}),fht=lt.SourceUserBlockedError,ght=lt.TargetUserBlockedError,_ht=nt.EPermissionModule,vht=nt.EModuleAction;let hf=(()=>{var t;class n{constructor(e,i,r,s,a,c){var u=this;this.sendGift=function(){var h=f(function*(b,w,R){let G=b;const K=w.prices.chips?ln.Chips:ln.Gems;let te=u.currentGiftShopState.data.roomId?{itemId:w.item.id,receivers:b,roomId:u.currentGiftShopState.data.roomId,currency:K}:{itemId:w.item.id,receivers:b,currency:K};try{return u.http.post("store/gifts",te).toPromise().then(ee=>ee.body)}catch(ee){throw R?u.findUserWhoBlockedYou().then(le=>{(le.error instanceof fht||le.error instanceof ght)&&le.username?(G.splice(G.indexOf(le.id),1),u.sendGift(G,w,!0),u.toaster.error("API_ERRORS.SourceUserNameBlocked",[le.username])):u.toaster.error(u.translate.instant("ERRORS.CONNECTION_ERROR"))}):(console.error(ee),u.toaster.error(u.translate.instant("GENERAL_ERRORS.SOMETHING_WRONG"))),ee}});return function(b,w,R){return h.apply(this,arguments)}}(),this.navigation=a,this.userRepository=s,this.translate=r,this.openGiftsShopEvent=new sn,this.http=e,this.toaster=i,this.permissions=c}openShopGifts(e){const i=this.permissions.getActionPermission(_ht.Shop,vht.Gifts);if(!i.isPermitted&&!i.roleRequirement.isFulfilled)return this.toaster.error("POPUP.DISABLED_FROM_CONFIG");const r=this.navigation.getOutletUrl()==="/".concat(Xs.gameRoute)?E0.Drawer:E0.Popup;!e.roomId&&r===E0.Drawer&&(e.from=O0.TopBarNotification),this.currentGiftShopState={shopType:r,data:e},this.openGiftsShopEvent.next(this.currentGiftShopState)}closeShopGifts(){const e=this.currentGiftShopState.shopType;this.currentGiftShopState=void 0,this.openGiftsShopEvent.next({shopType:e,data:void 0})}findUserWhoBlockedYou(){var e=this;return new Promise((i,r)=>{let s="";ZS()(this.currentGiftShopState.data.receivers,function(){var a=f(function*(c){yield e.userRepository.getProfile(c.id).catch(u=>{let h=jt.createErrorInstance(u);s=c.username.currentUsername,i({username:s,id:c.id,error:h})})});return function(c){return a.apply(this,arguments)}}())})}destroy(){this.openGiftsShopEvent.unsubscribe()}get shopState(){return this.currentGiftShopState}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Dt),T(pi),T(ed),T(Yt),T(Ti))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var wL=ve.EIcons,bht=ve.EButtonModifier;let mve=(()=>{var t;class n{constructor(e,i,r,s){this.giftsTabsTypes=Ll,this.iconNames=wL,this.buttonType=bht.BUTTON_ACTION,this.changeDet=s,this.soundService=r,this.navigation=i,this.openGiftsShop=!1,this.giftsShopService=e,this.config=Lt.CONFIG.store.gifts,this.tabs=[],this.tabsToShow=[],this.receivers=[],this.receiverIds=[],this.receiverUsernames=[]}fetchConfig(){this.tabs.length||ZS()(this.config,(e,i)=>{const r=i.toUpperCase();this.tabs.push({id:r,allowed:e.allowed,show:e.show,icon:this.getTabIcon(Ll[r])}),e.isDefault&&(this.defaultOpenTab=r)})}getTabIcon(e){let i;switch(e){case Ll.GIFTS:i={name:wL.GIFT_NEW};break;case Ll.GIFTALL:i={name:wL.GIFT_ALL};break;default:i={name:wL.GIFT_NEW}}return i}ngOnDestroy(){this.config=void 0,this.tabs=void 0,this.tabsToShow=void 0,this.receivers=void 0,this.receiverIds=void 0}excludeTabs(e){let i="",r=!1;e&&e.from&&(r=e.from===O0.TopBarNotification||e.from===O0.OutsideProfile),i=this.navigation.getOutletUrl()!=="/".concat(Xs.gameRoute)||r?this.navigation.getOutletUrl()==="/".concat(Xs.gameRoute)&&r?"inGameFromOutside":"inLobby":"inGame",this.tabsToShow=[],ZS()(this.tabs,s=>{let a=s.show.length;for(;a--;)s.show[a]===i&&this.checkIfMoreThanOneReceiver(s,e)&&this.tabsToShow.push(s)}),this.tabWidth=(100/this.tabsToShow.length).toString()+"%"}checkIfMoreThanOneReceiver(e,i){return Ll[e.id]!==Ll.GIFTALL||i&&i.receivers.length>1}openTab(e,i){this.soundService.play(dn.ClickTab),this.openedTab=Ll[e],this.receiverIds=[],this.receiverUsernames=[],Ll[e]===Ll.GIFTALL?(this.receivers=this.receiversData.receivers,ZS()(this.receiversData.receivers,r=>{this.receiverIds.push(r.id),this.receiverUsernames.push(r.username.currentUsername?r.username.currentUsername:r.username)})):(this.receivers=[this.receiversData.receiver],this.receiverIds.push(this.receiversData.receiver.id),this.receiverUsernames.push(this.receiversData.receiver.username.currentUsername?this.receiversData.receiver.username.currentUsername:this.receiversData.receiver.username)),i&&this.changeDet.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(hf),g(Yt),g(Mo),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),fve=(()=>{var t;class n{constructor(e){this.http=e}loadGifts(){return this.cachedGifts?new Promise((e,i)=>{e(this.cachedGifts)}):this.http.get("store/gifts").toPromise().then(e=>(this.cachedGifts=e.body,e.body)).catch(e=>{throw e})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function Cht(t,n){if(1&t&&(p(0,"span",8),H(1),m()),2&t){const o=_();d(),ze("x",o.receiverIds.length,"")}}const yht=(t,n)=>({"in-game":t,"gift-container__wrapper--gift-item__premium":n});let dz=(()=>{var t;class n{constructor(){this.isPremium=!1,this.currencyType=ln,this.giftShopTabsTypes=Ll,this.sendGiftEvent=new ke,this.cdnUrlImages="".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.store)}sendGift(){this.sendGiftEvent.emit(this.gift)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["gift-container"]],inputs:{gift:"gift",isInGame:"isInGame",tabId:"tabId",receiverIds:"receiverIds",isPremium:"isPremium"},outputs:{sendGiftEvent:"sendGiftEvent"},decls:8,vars:12,consts:[[1,"gift-container__container--gift",3,"click"],[1,"gift-container__wrapper--gift-item",3,"ngClass"],[1,"image-container"],["empty-placeholder","","click-feedback","",3,"customPlaceholderSize","customPlaceholder","imgSrc"],[1,"price-container"],[1,"price-container-inner"],[1,"price-container__component",3,"currency","value","showShortNumber"],["class","multiple-receivers",4,"ngIf"],[1,"multiple-receivers"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.sendGift()}),p(1,"div",1)(2,"div",2),B(3,"img",3),m(),p(4,"div",4)(5,"div",5),B(6,"currency-component",6),U(7,Cht,2,1,"span",7),m()()()()),2&e&&(Hn("data-cy",i.gift.item.id),d(),l("ngClass",cn(9,yht,i.isInGame,i.isPremium)),d(2),l("customPlaceholderSize","placeholder-small")("customPlaceholder","placeholders/placeholder.svg")("imgSrc",i.cdnUrlImages+i.gift.item.id+".png"),d(3),l("currency",i.gift.prices.chips?i.currencyType.Chips:i.currencyType.Gems)("value",i.gift.prices.chips||i.gift.prices.gems)("showShortNumber",!0),d(),l("ngIf",i.tabId===i.giftShopTabsTypes.GIFTALL))},dependencies:[Xe,Ne,po,$o,So],styles:[".gift-container__container--gift[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center}.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column nowrap;cursor:pointer;overflow:hidden}.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]:hover   .image-container[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{transform:scale(1.1)}.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]{margin:0 1.5rem;height:100%!important;width:calc(100% - 3rem)!important;border-radius:1.5rem;overflow:hidden}.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .image-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:80%!important;margin:auto 10%!important}.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .price-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;order:2;width:100%;height:30%;padding:.2rem;position:relative}.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .price-container[_ngcontent-%COMP%]   .price-container-inner[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .price-container[_ngcontent-%COMP%]   .price-container-inner[_ngcontent-%COMP%]   .price-container__component[_ngcontent-%COMP%], .gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .price-container[_ngcontent-%COMP%]   .price-container-inner[_ngcontent-%COMP%]   .multiple-receivers[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:1.4rem;font-weight:600}@media only screen and (max-width: 768px){.gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .price-container[_ngcontent-%COMP%]   .price-container-inner[_ngcontent-%COMP%]   .price-container__component[_ngcontent-%COMP%], .gift-container__container--gift[_ngcontent-%COMP%]   .gift-container__wrapper--gift-item[_ngcontent-%COMP%]   .price-container[_ngcontent-%COMP%]   .price-container-inner[_ngcontent-%COMP%]   .multiple-receivers[_ngcontent-%COMP%]{font-size:1.2rem}}"]}),n})();const gve=t=>({"in-game":t});function Sht(t,n){if(1&t){const o=Ce();p(0,"gift-container",7),Y("sendGiftEvent",function(i){return oe(o),re(_(2).sendGift(i))}),m()}if(2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(6,gve,e.isInGame))("gift",o)("isInGame",e.isInGame)("receiverIds",e.receiverIds)("tabId",e.tabId)("isPremium",!0)}}function wht(t,n){if(1&t&&(p(0,"div",3)(1,"p",4),H(2),V(3,"translate"),m(),U(4,Sht,1,8,"gift-container",5),p(5,"p",6),H(6),V(7,"translate"),m()()),2&t){const o=_();d(2),se($(3,4,"GIFTS_SHOP.PREMIUM_GIFTS")),d(2),l("ngForOf",o.premiumGifts)("ngForTrackBy",o.trackByFn),d(2),se($(7,6,"GIFTS_SHOP.SHOW_EVERYONE_GENEROUS"))}}function Tht(t,n){if(1&t){const o=Ce();p(0,"gift-container",10),Y("sendGiftEvent",function(i){return oe(o),re(_(2).sendGift(i))}),m()}if(2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(6,gve,e.isInGame))("gift",o)("isInGame",e.isInGame)("receiverIds",e.receiverIds)("tabId",e.tabId)("isPremium",!1)}}function Pht(t,n){if(1&t&&(p(0,"div",8),U(1,Tht,1,8,"gift-container",9),m()),2&t){const o=_();d(),l("ngForOf",o.gifts)("ngForTrackBy",o.trackByFn)}}let pz=(()=>{var t;class n{constructor(){this.giftSent=new ke}ngOnInit(){}ngOnDestroy(){}sendGift(e){this.giftSent.emit(e)}trackByFn(e,i){return i.item.id}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["gift-list"]],inputs:{gifts:"gifts",premiumGifts:"premiumGifts",isInGame:"isInGame",tabId:"tabId",receiverIds:"receiverIds"},outputs:{giftSent:"giftSent"},decls:3,vars:2,consts:[[1,"gift-lists__container"],["class","gift-list__container premium",4,"ngIf"],["class","gift-list__container default",4,"ngIf"],[1,"gift-list__container","premium"],[1,"gifts-tab__text--premium-gifts-label"],["click-feedback","","class","gifts-tab__container--gift__premium",3,"ngClass","gift","isInGame","receiverIds","tabId","isPremium","sendGiftEvent",4,"ngFor","ngForOf","ngForTrackBy"],[1,"gifts-tab__text--premium-gifts"],["click-feedback","",1,"gifts-tab__container--gift__premium",3,"ngClass","gift","isInGame","receiverIds","tabId","isPremium","sendGiftEvent"],[1,"gift-list__container","default"],["click-feedback","","class","gifts-tab__container--gift__default",3,"ngClass","gift","isInGame","receiverIds","tabId","isPremium","sendGiftEvent",4,"ngFor","ngForOf","ngForTrackBy"],["click-feedback","",1,"gifts-tab__container--gift__default",3,"ngClass","gift","isInGame","receiverIds","tabId","isPremium","sendGiftEvent"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,wht,8,8,"div",1)(2,Pht,2,2,"div",2),m()),2&e&&(d(),l("ngIf",i.premiumGifts&&i.premiumGifts.length>0),d(),l("ngIf",i.gifts&&i.gifts.length>0))},dependencies:[Xe,Mt,Ne,po,dz,qe],styles:[".gift-list__container[_ngcontent-%COMP%]{display:flex;flex-flow:wrap}"]}),n})();const Iht=["containerGifts"];function Mht(t,n){1&t&&(p(0,"div",5),B(1,"loader-image",6),m()),2&t&&(d(),l("transparentBG",!0))}function Oht(t,n){if(1&t){const o=Ce();p(0,"gift-list",10),Y("giftSent",function(i){return oe(o),re(_(2).sendGift(i))}),m()}if(2&t){const o=_(2);l("gifts",o.gifts)("premiumGifts",o.premiumGifts)("receiverIds",o.receiverIds)("isInGame",o.isInGame)("tabId",o.tabId)}}function Eht(t,n){if(1&t&&(p(0,"div",7,8),U(2,Oht,1,5,"gift-list",9),m()),2&t){const o=_();d(2),l("ngIf",o.gifts.length>0)}}const xht=t=>({handler:t});let TL=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.giftsShopService=e,this.giftsTabService=i,this.popup=r,this.permissionsService=s,this.changeDetRef=a,this.toaster=c,this.formatNumber=u,this.rulerService=h,this.translationService=b,this.offerService=w,this.loaderOn=!1,this.pageNumber=1,this.onResize=()=>{this.premiumGiftsContainerWidthPercentage=this.getSingleGiftPercentageWidth(),this.updateView()},this.loadNextPage=()=>{this.isInGame&&(this.pageNumber+=1,this.gifts=this.giftsStash.filter(R=>R.group!==_0).slice(0,this.calculatePageLenght()*this.pageNumber),this.updateView())},this.gifts=[],this.giftSent=new ke,this.cdnUrlImages="".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.store),this.changeDetRef.detach()}ngOnInit(){let e=0;this.giftsTabService.cachedGifts||(this.loaderOn=!0,this.updateView(),e=300),this.loadingGiftsDelay=setTimeout(()=>{this.giftsTabService.loadGifts().then(i=>{this.giftsStash=i.products,this.premiumGifts=this.giftsStash.filter(r=>r.group===_0),this.gifts=this.isInGame?this.giftsStash.filter(r=>r.group!==_0).slice(0,this.calculatePageLenght()):this.giftsStash.filter(r=>r.group!==_0),this.hideLoader(),this.onResize()}).catch(i=>{console.warn("Gifts Error: ",i),this.giftsShopService.closeShopGifts(),this.toaster.error("ERRORS.CONNECTION_ERROR"),this.hideLoader()})},e),this.subscription=this.rulerService.getAppSize().subscribe(this.onResize)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe(),this.hideLoader()}hideLoader(){clearTimeout(this.loadingGiftsDelay),this.loadingGiftsDelay=null,this.loaderOn=!1,this.updateView()}sendGift(e){const i=e.prices.chips?ln.Chips:ln.Gems;if(e.group===_0)this.isCurrencyBalanceRequirementFulfilled(e,this.receiverIds.length)?this.popup.confirm({buttons:{action:()=>{this.sendGiftHandler(this.receiverIds,e),this.giftsShopService.closeShopGifts()}},textParams:this.receiverIds.length>1?{translationKey:"POPUP.SEND_PREMIUM_GIFTS_CONFIRM_V2",params:[this.receiverIds.length,this.formatNumber.transform(i===ln.Chips?e.prices.chips:e.prices.gems),this.translationService.instant(i===ln.Chips?"LABEL.CHIPS":"LABEL.GEMS")]}:{translationKey:"POPUP.SEND_PREMIUM_GIFT_CONFIRM_V2",params:[...this.receiverUsernames,this.formatNumber.transform(i===ln.Chips?e.prices.chips:e.prices.gems),this.translationService.instant(i===ln.Chips?"LABEL.CHIPS":"LABEL.GEMS")]}}):this.showOfferPopup(i,e,this.receiverIds.length),this.updateView();else switch(this.tabId){case Ll.GIFTS:this.isCurrencyBalanceRequirementFulfilled(e,this.receiverIds.length)?(this.sendGiftHandler([this.receiverIds[0]],e),this.giftsShopService.closeShopGifts()):this.showOfferPopup(i,e);break;case Ll.GIFTALL:this.isCurrencyBalanceRequirementFulfilled(e,this.receiverIds.length)?(this.sendGiftHandler(this.receiverIds,e),this.giftsShopService.closeShopGifts()):this.showOfferPopup(i,e,this.receiverIds.length)}this.updateView()}trackByFn(e,i){return i.item.id}isCurrencyBalanceRequirementFulfilled(e,i){return e.prices.gems&&this.permissionsService.getGemBalanceRequirement(e.prices.gems*i).isFulfilled||e.prices.chips&&this.permissionsService.getChipBalanceRequirement(e.prices.chips*i).isFulfilled}sendGiftHandler(e,i){this.giftsShopService.sendGift(e,i).then(r=>{this.giftSent.emit(r)}).catch(r=>console.error(r))}showOfferPopup(e,i,r=1){let s;s=e===ln.Chips?{targetValue:i.prices.chips*r,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"},action:()=>this.giftsShopService.closeShopGifts()}:{targetValue:i.prices.gems*r,itemType:Fe.TG.GemsPack,description:{key:"POPUP.BUY_GEMS_QUESTION"},action:()=>this.giftsShopService.closeShopGifts()},this.offerService.offerCurrency(s)}calculatePageLenght(){switch(!0){case window.innerWidth>=1366:return 50;case window.innerWidth>=980:case window.innerWidth<980:default:return 35}}getSingleGiftPercentageWidth(){return this.containerGifts&&this.containerGifts.nativeElement.children.length>=2?this.containerGifts.nativeElement.children[1].clientWidth/this.containerGifts.nativeElement.clientWidth*100:25}updateView(){this.changeDetRef.destroyed||this.changeDetRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(hf),g(fve),g(Cn),g(Ti),g(Re),g(Dt),g(Go),g(Ua),g(pi),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["gifts-tab"]],viewQuery:function(e,i){if(1&e&&$e(Iht,5),2&e){let r;je(r=He())&&(i.containerGifts=r.first)}},inputs:{tabId:"tabId",receiverIds:"receiverIds",receiverUsernames:"receiverUsernames",isInGame:"isInGame"},outputs:{giftSent:"giftSent"},decls:5,vars:5,consts:[[1,"gifts-tab__wrapper"],["scroll-directive","",1,"gifts-tab__container",3,"onScrolledToBottom"],["scroll","scroll"],["class","gifts-tab__container--loader",4,"ngIf"],["class","gifts-tab__container--gifts",4,"ngIf"],[1,"gifts-tab__container--loader"],[3,"transparentBG"],[1,"gifts-tab__container--gifts"],["containerGifts",""],["class","gifts-tab__gifts-list__container",3,"gifts","premiumGifts","receiverIds","isInGame","tabId","giftSent",4,"ngIf"],[1,"gifts-tab__gifts-list__container",3,"gifts","premiumGifts","receiverIds","isInGame","tabId","giftSent"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1,2),U(3,Mht,2,1,"div",3)(4,Eht,3,1,"div",4),m()()),2&e&&(d(),l("onScrolledToBottom",ne(3,xht,i.loadNextPage)),d(2),l("ngIf",i.loaderOn),d(),l("ngIf",!i.loaderOn))},dependencies:[Ne,Is,pz,Oi],styles:[".gifts-tab__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;padding:.5rem;margin:.5rem 0;overflow-y:auto;overflow-x:hidden}.gifts-tab__wrapper[_ngcontent-%COMP%]   .gifts-tab__container[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;width:100%;height:100%;overflow-y:auto;overflow-x:hidden}.gifts-tab__container--loader[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.gifts-tab__container--gifts[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap;justify-content:space-around}.gifts-tab__container--premium-gifts[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-around}.gifts-tab__text--premium-gifts[_ngcontent-%COMP%], .gifts-tab__text--premium-gifts-label[_ngcontent-%COMP%]{width:100%;text-align:center;padding-bottom:.15rem;font-size:1.8rem}@media only screen and (max-width: 1024px){.gifts-tab__text--premium-gifts[_ngcontent-%COMP%], .gifts-tab__text--premium-gifts-label[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 480px){.gifts-tab__text--premium-gifts[_ngcontent-%COMP%], .gifts-tab__text--premium-gifts-label[_ngcontent-%COMP%]{font-size:1.2rem}}.gifts-tab__text--premium-gifts-label[_ngcontent-%COMP%]{padding-top:.15rem;padding-bottom:0}.gifts-tab__container--gift[_ngcontent-%COMP%]{width:20%;min-width:20%;margin:1rem 0}.gifts-tab__container--gift.in-game[_ngcontent-%COMP%]{width:10%;min-width:10%;margin-top:0}@media only screen and (max-width: 980px){.gifts-tab__container--gift.in-game[_ngcontent-%COMP%]{width:20%;min-width:20%}}@media only screen and (max-width: 680px){.gifts-tab__container--gift[_ngcontent-%COMP%]{width:33.33%;min-width:33.33%}}.gifts-tab__gifts-list__container[_ngcontent-%COMP%]{width:100%}"]}),n})();const Aht=()=>({key:"GIFTS_SHOP.GIFTS_SHOP"});function Rht(t,n){if(1&t){const o=Ce();p(0,"popup-title-bar",8),Y("buttonCloseClicked",function(){return oe(o),re(_().hide())}),m()}2&t&&l("popupTitleType",_().popupTitleTypes.Static)("text",pt(2,Aht))}const kht=(t,n,o)=>({selected:t,first:n,last:o});function Lht(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",9),Y("select",function(){const r=oe(o).$implicit;return re(_().openTab(r.id,!0))}),p(1,"button-icon-text",10),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit,e=n.first,i=n.last,r=_();ni("",o.id," button-icon-tab"),l("tabId",o.id),d(),ni("",o.id," button-icon-tab"),l("icon",o.icon)("buttonModifier",r.buttonType)("ngClass",_a(13,kht,r.giftsTabsTypes[r.openedTab]===o.id,e,i)),d(),ze(" ",$(3,11,"GIFTS_SHOP."+o.id)," ")}}function Dht(t,n){if(1&t&&(p(0,"div",11),B(1,"gifts-tab",12),m()),2&t){const o=_();d(),l("tabId",o.openedTab)("receiverIds",o.receiverIds)("receiverUsernames",o.receiverUsernames)}}function Bht(t,n){if(1&t&&(p(0,"div",11),B(1,"gifts-tab",12),m()),2&t){const o=_();d(),l("tabId",o.openedTab)("receiverIds",o.receiverIds)("receiverUsernames",o.receiverUsernames)}}const hz=t=>({"one-tab":t});let mz=(()=>{var t;class n extends mve{constructor(e,i,r,s,a){super(e,i,r,s),this.popupTitleTypes=li,this.popStateHandler=c=>{this.openGiftsShop&&this.hide()},this.location=a,this.popupContainerOptions={styleProperties:{maxWidth:"70rem",maxHeight:"65rem"},customBackdropCssClass:"gifts-shop__popup-container--class"},s.detach()}ngOnInit(){this.fetchConfig(),this.excludeTabs(),this.backButtonSubscription=this.location.subscribe(this.popStateHandler),this.openGifts=this.giftsShopService.openGiftsShopEvent.subscribe(e=>{e.shopType===E0.Popup&&(this.receiversData=e.data,this.openGiftsShop=!!e.data,this.openGiftsShop||(this.openedTab=null),this.excludeTabs(e.data),e.data&&this.openTab(this.defaultOpenTab),this.changeDet.detectChanges())}),this.changeDet.detectChanges()}ngOnDestroy(){this.backButtonSubscription&&this.backButtonSubscription.unsubscribe(),this.openGifts&&this.openGifts.unsubscribe()}hide(){this.giftsShopService.closeShopGifts()}handleGesture(e){let i=0;switch(b_()(this.tabsToShow,(r,s)=>(Ll[r.id]===this.openedTab&&(i=s),Ll[r.id]===this.openedTab)),e){case sa.Right:if(0===i)return;this.openTab(this.tabsToShow[i-1].id);break;case sa.Left:if(i===this.tabsToShow.length-1)return;this.openTab(this.tabsToShow[i+1].id)}this.changeDet.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(hf),g(Yt),g(Mo),g(Re),g(Rs))},t.\u0275cmp=pe({type:t,selectors:[["gifts-shop"]],features:[Ht],decls:9,vars:19,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked",4,"ngIf"],["swipe-directive","",1,"gifts-shop__container--content",3,"ngClass","swipeAction"],[1,"tab-switch",3,"ngClass"],[1,"club_top--tabs",3,"initialOpenedTab","showBackButton","scrollStyleCustomClass","scrollBarCustomClass"],[3,"tabId","class","select",4,"ngFor","ngForOf"],[1,"content-gifts",3,"ngClass"],["class","content-wrapper",4,"ngIf"],[3,"popupTitleType","text","buttonCloseClicked"],[3,"tabId","select"],[3,"icon","buttonModifier","ngClass"],[1,"content-wrapper"],[3,"tabId","receiverIds","receiverUsernames"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.hide()}),U(1,Rht,1,3,"popup-title-bar",1),p(2,"div",2),Y("swipeAction",function(s){return i.handleGesture(s)}),p(3,"div",3)(4,"top-tabs",4),U(5,Lht,4,17,"top-tab-item",5),m()(),p(6,"div",6),U(7,Dht,2,3,"div",7)(8,Bht,2,3,"div",7),m()()()),2&e&&(l("popupContainerOpened",i.openGiftsShop)("popupContainerOptions",i.popupContainerOptions),d(),l("ngIf",i.openGiftsShop),d(),l("ngClass",ne(13,hz,i.tabsToShow.length<=1)),d(),l("ngClass",ne(15,hz,i.tabsToShow.length<=1)),d(),l("initialOpenedTab",i.giftsTabsTypes[i.openedTab])("showBackButton",!1)("scrollStyleCustomClass","club-page__top-tabs__scroll")("scrollBarCustomClass","club-page__top-tabs__scrollbar"),d(),l("ngForOf",i.tabsToShow),d(),l("ngClass",ne(17,hz,i.tabsToShow.length<=1)),d(),l("ngIf",i.openedTab===i.giftsTabsTypes.GIFTS),d(),l("ngIf",i.openedTab===i.giftsTabsTypes.GIFTALL))},dependencies:[Xe,Mt,Ne,wu,kl,dl,TL,so,Ji,Wi,qe],styles:[".gifts-shop__text--title-text[_ngcontent-%COMP%]{font-size:1.8rem}@media only screen and (max-width: 768px){.gifts-shop__text--title-text[_ngcontent-%COMP%]{font-size:1.4rem}}.gifts-shop__container--content[_ngcontent-%COMP%]{display:block;padding:.2rem;order:2;width:100%;height:calc(100% - 11rem)}@media only screen and (max-width: 768px) and (orientation: landscape){.gifts-shop__container--content[_ngcontent-%COMP%]{height:calc(100% - 10rem)}}.gifts-shop__container--content.one-tab[_ngcontent-%COMP%]{height:calc(100% - 6rem)}.gifts-shop__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;order:1;width:90%;height:4rem;max-width:50rem;margin:0 auto;margin-top:1rem}.gifts-shop__container--content[_ngcontent-%COMP%]   .tab-switch.one-tab[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 768px){.gifts-shop__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]{width:100%}}.gifts-shop__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:50%;height:100%}.gifts-shop__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]   .tab.first[_ngcontent-%COMP%]{border-left:none}.gifts-shop__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]   .tab.last[_ngcontent-%COMP%]{border-right:none}.gifts-shop__container--content[_ngcontent-%COMP%]   .content-gifts[_ngcontent-%COMP%]{order:2;width:100%;height:100%}.gifts-shop__container--content[_ngcontent-%COMP%]   .content-gifts.one-tab[_ngcontent-%COMP%]{height:100%}.gifts-shop__container--content[_ngcontent-%COMP%]   .content-gifts[_ngcontent-%COMP%]   .content-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),n})();var x0=function(t){return t.Default="default",t.Large="large",t.Medium="medium",t.Small="small",t}(x0||{});function Nht(t,n){if(1&t&&(p(0,"div",4),B(1,"number",5),m()),2&t){const o=_();d(),l("value",o.position)}}const Fht=t=>[t];function Uht(t,n){if(1&t&&(p(0,"div",6),B(1,"number",5),m()),2&t){const o=_();l("ngClass",ne(2,Fht,o.scoreType)),d(),l("value",o.score)}}const Ght=t=>({"no-position":t}),Vht=["*"];let fz=(()=>{var t;class n{constructor(e){this.cdr=e,e.detach()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["leaderboard-item"]],inputs:{position:"position",score:"score",scoreType:"scoreType"},features:[it],ngContentSelectors:Vht,decls:5,vars:5,consts:[[1,"leaderboard-avatar__container--user"],["class","leaderboard-avatar__item--index",4,"ngIf"],[1,"leaderboard-avatar__item",3,"ngClass"],["class","leaderboard-item__score",3,"ngClass",4,"ngIf"],[1,"leaderboard-avatar__item--index"],[3,"value"],[1,"leaderboard-item__score",3,"ngClass"]],template:function(e,i){1&e&&(Co(),p(0,"section",0),U(1,Nht,2,1,"div",1),p(2,"div",2),yo(3),m(),U(4,Uht,2,4,"div",3),m()),2&e&&(d(),l("ngIf",null!=i.position),d(),l("ngClass",ne(3,Ght,null==i.position)),d(2),l("ngIf",null!=i.score))},dependencies:[Xe,Ne,Qr],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.leaderboard-avatar__container--user[_ngcontent-%COMP%]{width:100%;height:100%}.leaderboard-avatar__container--user[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.leaderboard-avatar__item--index[_ngcontent-%COMP%]{width:100%;height:2rem;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 480px){.leaderboard-avatar__item--index[_ngcontent-%COMP%]{height:1.5rem}}.leaderboard-avatar__item[_ngcontent-%COMP%]{margin:auto;width:95%}.leaderboard-avatar__item.no-position[_ngcontent-%COMP%]{width:100%}@media only screen and (max-width: 1280px){.leaderboard-avatar__item.no-position[_ngcontent-%COMP%]{width:85%}}@media only screen and (max-width: 480px){.leaderboard-avatar__item.no-position[_ngcontent-%COMP%]{width:95%}}@media only screen and (max-width: 1280px){.leaderboard-avatar__item[_ngcontent-%COMP%]{width:85%}}@media only screen and (max-width: 480px){.leaderboard-avatar__item[_ngcontent-%COMP%]{width:95%}}.leaderboard-item__score[_ngcontent-%COMP%]{width:100%;height:3rem;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 1280px){.leaderboard-item__score[_ngcontent-%COMP%]{height:2rem}}"],changeDetection:0}),n})();function zht(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.select.current.text))}}function jht(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.select.control.placeholder))}}function Hht(t,n){if(1&t&&(Tn(0),p(1,"div",6),U(2,zht,3,3,"p",7)(3,jht,3,3,"p",7),m(),Pn()),2&t){const o=_();d(2),l("ngIf",o.select.current),d(),l("ngIf",!o.select.current)}}const qht=t=>[t];function Wht(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",9),Y("select",function(i){return oe(o),re(_(2).onSelectOption(i))}),p(1,"div",10)(2,"p"),H(3),V(4,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(2);l("value",o),d(),l("ngClass",e.select.current&&o.value===e.select.current.value?"club-leader-leave__custom-select__option__selected":""),d(2),se(yt(4,3,o.text.key,ne(6,qht,o.text.params)))}}function $ht(t,n){if(1&t&&U(0,Wht,5,8,"custom-select-item",8),2&t){const o=_();l("ngForOf",o.select.options)("ngForTrackBy",o.trackOptionByFn)}}let LC=(()=>{var t;class n{constructor(e,i){this.membersList=[],this.leave=new ke,this.EButtonModifier=ve.EButtonModifier,this.cdr=e,this.translatePipe=i}ngOnChanges(e){e.membersList&&(this.select=this.createSelect())}onSelectOption(e){this.select.current=e,this.cdr.detectChanges()}leaveClub(){this.leave.emit(this.select.current.value)}createSelect(){const e={control:{type:rd.EControlType.Input,placeholder:{key:"POPUP.CHOOSE"}},current:null,options:[]};return e.options.push({text:{key:"CLUBS.DISBAND_CLUB"},value:{type:n.EOnLeaveOption.Disband}}),this.membersList.filter(r=>r.userId!==this.currentClubMemberInfo.userId&&r.role===qo.VicePresident).forEach(r=>{e.options.push({text:{key:"CLUBS.PROMOTE_USER",params:[r.info.profile.username.currentUsername]},value:{type:n.EOnLeaveOption.PromoteUser,data:r}})}),e}trackOptionByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(qe))},t.\u0275cmp=pe({type:t,selectors:[["club-leader-leave-form"]],inputs:{currentClubMemberInfo:"currentClubMemberInfo",membersList:"membersList",isLeaving:"isLeaving"},outputs:{leave:"leave"},features:[it],decls:13,vars:10,consts:[[1,"club--leader--leave__wrapper"],[1,"club--leader--leave__text","club--leader--leave__item"],[1,"club-leader-leave__custom-select",3,"buttonCustomCss"],["selectedItem",""],["options",""],["data-cy","clubDisbandConfirmButton",1,"club--leader--leave__item-btn-leave",3,"loading","buttonModifier","disabled","onClick"],[1,"club-leader-leave__selected-option"],[4,"ngIf"],[3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","select"],["data-cy","clubDisbandOption",1,"club-leader-leave__custom-select__option",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"p",1)(2,"span"),H(3),V(4,"translate"),m()(),p(5,"custom-select",2),U(6,Hht,4,2,"ng-template",null,3,ft)(8,$ht,1,2,"ng-template",null,4,ft),m(),p(10,"button-text",5),Y("onClick",function(){return i.leaveClub()}),H(11),V(12,"translate"),m()()),2&e&&(d(3),se($(4,6,"CLUBS.CLUB_LEADER_LEAVE_TEXT")),d(2),l("buttonCustomCss","club-leader-leave__custom-select__extend--button"),d(5),l("loading",i.isLeaving)("buttonModifier",i.EButtonModifier.BUTTON_ACTION)("disabled",!i.select.current),d(),se($(12,8,"BUTTON.LEAVE")))},dependencies:[Xe,Mt,Ne,Up,Vd,pn,qe],styles:[".club--leader--leave__wrapper[_ngcontent-%COMP%]{padding:2rem}.club--leader--leave__text[_ngcontent-%COMP%]{text-align:center;font-size:1.8rem}@media only screen and (max-width: 768px){.club--leader--leave__text[_ngcontent-%COMP%]{font-size:1.4rem}}.club--leader--leave__item[_ngcontent-%COMP%]{margin:3rem 0}.club--leader--leave__item-btn-leave[_ngcontent-%COMP%]{width:15rem;margin:2rem auto 0}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EOnLeaveOption||(t.EOnLeaveOption={}))[o.Disband=0]="Disband",o[o.PromoteUser=1]="PromoteUser"}(LC||(LC={}));class Kht{constructor(n,o){this.currentUserMemberInfo=n,this.membersList=o}onLeave(n){}close(){}onClose(){}}class Zht{constructor(n,o){this.clubProfile=n,this.clubInventory=o}onSavedChanges(){}onCanceledChanges(){}close(){}onClose(){}}class Qht{constructor(){this.errors={}}onCreateClub(){}close(){}onClose(){}}class Yht{constructor(n){this.clubProfile=n}onJoin(n){}close(){}onClose(){}}class _ve{onJoin(){}close(){}onClose(){}}class Jht{constructor(n,o,e){this.memberNewRole=n,this.member=o,this.myNewRole=e}onConfirm(){}close(){}onClose(){}}let $h=(()=>{var t;class n extends pv{static getMemberRoleTranslationKey(e){return"CLUBS.CLUB_ROLE_".concat(Ys.parse(qo,e).toUpperCase())}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),Au=(()=>{var t;class n extends ru{constructor(e,i,r,s,a,c,u,h,b,w,R,G){super(e,i,r,s,b,R,G),this.leavePopupArgs=new Qn(void 0),this.editClubPopupArgs=new Qn(void 0),this.createClubPopupArgs=new Qn(void 0),this.joinClubMessagePopupArgs=new Qn(void 0),this.joinNewClubPopupArgs=new Qn(void 0),this.editMemberRolePopupArgs=new Qn(void 0),this.popupService=a,this.toastService=c,this.navigationService=u,this.constants=h,this.clientPermissionsService=w}startJoinClubProcedure(e,i){if(!this.clientPermissionsService.getClubActionPermission(e,nt.EModuleAction.SendClubJoinRequest,{showFailedRequirements:!0}).isPermitted)throw new et.Permissions.RequirementNotMeet(void 0);const s=this.store.clubs.selectClubProfile(),a=new Jn(new Promise((c,u)=>{if(s){const h=new _ve;let b;h.onJoin=()=>{b=!0,this.startLeaveClubProcedure(s.id,{askConfirmation:!1,onLeaveSuccess:()=>{this.closeJoinNewClubPopup(),this.joinClubByPrivacy(e).then(w=>{c(w),i&&i(w)}).catch(u)}}).catch(u)},h.onClose=()=>{b||a.cancel()},this.openJoinNewClubPopup(h)}else this.joinClubByPrivacy(e).then(h=>{c(h),i&&i(h)}).catch(u)}));return a}startLeaveClubProcedure(e,i={askConfirmation:!0,onLeaveSuccess:()=>{}}){const r=this.store.clubs.selectCurrentClubState().role;return r===qo.President?this.leaveClubAsLeader(e,{userId:this.store.selectUserState().profile.id,role:r},i.onLeaveSuccess):this.leaveClubAsMember(e,i)}startCreateClubProcedure(){if(!this.clientPermissionsService.getActionPermission(nt.EPermissionModule.PublicClub,nt.EModuleAction.Create,{showFailedRequirements:!0}).isPermitted)return;const i=new Qht;i.onCreateClub=()=>{this.closeCreateClubPopup(),this.openCurrentClubPage()};const r=this.store.clubs.selectClubProfile();r?this.startLeaveClubProcedure(r.id,{askConfirmation:!0,onLeaveSuccess:()=>{this.openCreateClubPopup(i)}}).catch(s=>console.warn(s)):this.openCreateClubPopup(i)}startAcceptClubInviteProcedure(e,i,r){var s=this;return f(function*(){const a=s.store.clubs.selectClubProfile();if((null==a?void 0:a.id)!==e&&s.clientPermissionsService.getActionPermission(nt.EPermissionModule.PublicClub,nt.EModuleAction.SendClubJoinRequest,{showFailedRequirements:!0}).isPermitted)if(a){const u=new _ve;u.onJoin=()=>{var h;s.closeJoinNewClubPopup(),s.startLeaveClubProcedure(a.id,{askConfirmation:!1,onLeaveSuccess:(h=f(function*(){try{yield s.acceptClubInviteRequest({clubId:e,requestId:i}),r&&r()}catch(b){b instanceof mb||b instanceof S_||b instanceof Sh?s.toastService.error("CLUBS.JOIN_REQUEST_PROCESS_ERROR"):s.showErrorToaster(b)}}),function(){return h.apply(this,arguments)})}).catch(h=>console.warn(h))},s.openJoinNewClubPopup(u)}else try{yield s.acceptClubInviteRequest({clubId:e,requestId:i}),r&&r()}catch(u){u instanceof mb||u instanceof S_||u instanceof Sh?s.toastService.error("CLUBS.JOIN_REQUEST_PROCESS_ERROR"):s.showErrorToaster(u)}})()}startEditMemberRoleProcedure(e){const i=this.store.clubs.selectCurrentClubState();if(!i||!i.clubProfile)return Promise.resolve();if(i.role!==qo.President||e.newRole!==qo.President)return this.editMemberRole(e);const r=new Jn(new Promise((s,a)=>{const c=new Jht(e.newRole,e.user,qo.VicePresident);let u;c.onClose=()=>{u||r.cancel()},c.onConfirm=()=>{u=!0,this.closeEditMemberRolePopup(),this.editMemberRole(e).then(s).catch(a)},this.openEditMemberRolePopup(c)}));return r}openEditClubScreen(e,i){var r=this;return f(function*(){const s=new Zht(e,i);s.onSavedChanges=()=>r.closeEditClubPopup(),s.onCanceledChanges=()=>r.closeEditClubPopup(),r.openEditClubPopup(s)})()}openLeaderLeavePopup(e){this.leavePopupArgs.next({...e,close:()=>{this.closeLeaderLeavePopup(),e.onClose()}})}closeLeaderLeavePopup(){this.leavePopupArgs.next(void 0)}openEditClubPopup(e){this.editClubPopupArgs.next({...e,close:()=>{this.closeEditClubPopup(),e.onClose()}})}closeEditClubPopup(){this.editClubPopupArgs.next(void 0)}openCreateClubPopup(e){this.createClubPopupArgs.next({...e,close:()=>{this.closeCreateClubPopup(),e.onClose()}})}closeCreateClubPopup(){this.createClubPopupArgs.next(void 0)}openJoinNewClubPopup(e){this.joinNewClubPopupArgs.next({...e,close:()=>{this.closeJoinNewClubPopup(),e.onClose()}})}closeJoinNewClubPopup(){this.joinNewClubPopupArgs.next(void 0)}openJoinClubMessagePopup(e){this.joinClubMessagePopupArgs.next({...e,close:()=>{this.closeJoinClubMessagePopup(),e.onClose()}})}closeJoinClubMessagePopup(){this.joinClubMessagePopupArgs.next(void 0)}openEditMemberRolePopup(e){this.editMemberRolePopupArgs.next({...e,close:()=>{this.closeEditMemberRolePopup(),e.onClose()}})}closeEditMemberRolePopup(){this.editMemberRolePopupArgs.next(void 0)}openCurrentClubPage(e){const i=this.store.clubs.selectClubProfileId();i?this.navigationService.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/club/").concat(i)}}]):e&&this.openClubsList()}openClubPage(e){this.navigationService.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/club/").concat(e)}}])}openClubsList(){this.navigationService.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/clubs-list")}}])}openInfoPage(){this.navigationService.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/clubs-info")}}])}joinClubByPrivacy(e){var i=this;return f(function*(){switch(e.settings.privacy){case Or.Public:try{return yield i.sendClubJoinRequest({clubId:e.id,message:""})}catch(s){throw console.warn(s),s instanceof S_?i.toastService.error("CLUBS.JOIN_REQUEST_PROCESS_ERROR"):i.showErrorToaster(s),s}break;case Or.Private:const r=new Jn(new Promise((s,a)=>{const c=new Yht(e);let u,h;c.onJoin=function(){var b=f(function*(w){try{h=!0,u=new Jn(i.sendClubJoinRequest({clubId:w.club.id,message:w.message}));const R=yield u;i.closeJoinClubMessagePopup(),s(R)}catch(R){console.warn(R),R instanceof S_?i.toastService.error("CLUBS.JOIN_REQUEST_PROCESS_ERROR"):i.showErrorToaster(R),a(R)}});return function(w){return b.apply(this,arguments)}}(),c.onClose=()=>{h||r.cancel()},i.openJoinClubMessagePopup(c)}));return r;default:throw console.warn("Can't join club with privacy setting",e.settings.privacy),new Error("Can't join club with privacy setting"+e.settings.privacy)}})()}showErrorToaster(e){e instanceof Cr?console.log("promise was cancelled",e):e instanceof lt.NetworkError?this.toastService.error("ERRORS.CONNECTION_ERROR"):e instanceof Sh?this.toastService.error("CLUBS.JOIN_REQUEST_PROCESS_ERROR"):e instanceof cP?this.toastService.error("CLUBS.CLUB_JOIN_FULL_ERROR"):e instanceof Mm?this.toastService.error("CLUBS.CLUB_NOT_FOUND"):e instanceof lt.ServerUnavailableError?this.toastService.error("CLUBS.SERVICE_UNAVAILABLE"):e instanceof $f?e.userId===this.store.selectUserState().profile.id?this.toastService.error("CLUBS.USER_NOT_IN_CLUB"):this.toastService.error("CLUBS.NO_LONGER_MEMBER"):e instanceof hb?this.toastService.error("CLUBS.CLUB_ROLE_ACTION_OUTDATED"):e instanceof fA?this.toastService.error("CLUBS.CLUB_PRIVACY_SETTINGS_CHANGED_ERROR"):e instanceof S_?this.toastService.error("CLUBS.JOIN_REQUEST_ALREADY_EXISTS"):e instanceof XS?this.toastService.error("CLUBS.PLAYER_ALREADY_IN_A_CLUB"):e instanceof et.Permissions.RequirementNotMeet?this.clientPermissionsService.showFailedRequirementsToUser(e):this.toastService.error("ERRORS.SOMETHING_WRONG")}leaveClubAsLeader(e,i,r){var s=this;const a=new Jn(new Promise(function(){var c=f(function*(u,h){let b;try{const w=new Jn(s.getCurrentClubDetails());yield w;const R=new Kht(i,s.store.clubs.selectMembersList());let G;R.onLeave=function(){var K=f(function*(te){try{b=!0,G=new Jn(s.leaveClub({clubId:e,disband:te.type===LC.EOnLeaveOption.Disband,successorUserId:te.type===LC.EOnLeaveOption.PromoteUser?te.data.userId:void 0})),yield G,r(),u(void 0),s.closeLeaderLeavePopup()}catch(ee){console.warn(ee),s.showErrorToaster(ee),h(ee)}});return function(te){return K.apply(this,arguments)}}(),R.onClose=()=>{var K;null===(K=G)||void 0===K||K.cancel(),null==w||w.cancel(),b||a.cancel()},s.openLeaderLeavePopup(R)}catch(w){console.warn(w),s.showErrorToaster(w),h(w)}});return function(u,h){return c.apply(this,arguments)}}()));return a}leaveClubAsMember(e,i){var r=this;const s=new Jn(new Promise((a,c)=>{let u,h;const b=function(){var G=f(function*(){try{h=!0,u=new Jn(r.leaveClub({clubId:e})),yield u,i.onLeaveSuccess(),a(void 0)}catch(K){console.warn(K),K instanceof hb?r.toastService.error("CLUBS.CLUB_LEADER_LEAVE_TEXT"):r.showErrorToaster(K),c(K)}});return function(){return G.apply(this,arguments)}}();if(!i.askConfirmation)return void b();const R=this.popupService.confirm({textParams:{translationKey:"CLUBS.LEAVE_OLD_CLUB"},buttons:{action:b,actionDecline:()=>{this.popupService.hide(R),u&&u.cancel(),h||s.cancel()}}})}));return s}}return(t=n).\u0275fac=function(e){return new(e||t)(T(dL),T(J),T(ed),T(wa),T(Cn),T(Dt),T(Yt),T(tn),T(Ti),T(Pi),T(Xu),T($h))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),gz=(()=>{var t;class n{constructor(e,i){this.cdr=e,this.cdr.detach(),this.urlService=i}ngOnChanges(e){this.frameUrl=this.urlService.createCdnPath({prefix:"clubsFrames",url:"".concat(this.frameId,".png")}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["club-avatar-frame"]],inputs:{frameId:"frameId"},features:[it],decls:1,vars:1,consts:[[1,"club--avatar--frame__img",3,"src"]],template:function(e,i){1&e&&B(0,"img",0),2&e&&l("src",i.frameUrl,Wn)},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.club--avatar--frame__img[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}"],changeDetection:0}),n})();function Xht(t,n){1&t&&B(0,"club-avatar-frame",7),2&t&&l("frameId",_().club.frame.frameId)}let mf=(()=>{var t;class n{constructor(e,i,r){this.isLink=!0,this.urlService=e,this.cdr=i,this.clubsService=r,this.cdr.detach()}ngOnChanges(e){e.club&&(this.avatarUrl=this.createActiveAvatarUrl(this.club.avatar),this.cdr.detectChanges())}onClick(){this.isLink&&this.clubsService.openClubPage(this.club.id)}createActiveAvatarUrl(e){return this.urlService.createClubActiveAvatarUrl(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Re),g(Au))},t.\u0275cmp=pe({type:t,selectors:[["club-avatar"]],inputs:{club:"club",isLink:"isLink"},features:[it],decls:9,vars:3,consts:[["click-feedback","",1,"club--avatar__wrapper",3,"click"],[1,"club--avatar__dummy"],[1,"club--avatar__image--placeholder"],[1,"club--avatar__image",3,"src"],[3,"frameId",4,"ngIf"],[1,"club--avatar__level"],["data-cy","clubProfileAvatarLevel",1,"club--avatar__text--level"],[3,"frameId"]],template:function(e,i){1&e&&(p(0,"section",0),Y("click",function(){return i.onClick()}),p(1,"div",1),B(2,"div",2)(3,"img",3),U(4,Xht,1,1,"club-avatar-frame",4),m(),p(5,"div",5)(6,"p",6)(7,"span"),H(8),m()()()()),2&e&&(d(3),l("src",i.avatarUrl,Wn),d(),l("ngIf",null==i.club.frame?null:i.club.frame.frameId),d(4),se(i.club.level))},dependencies:[Ne,po,gz],styles:["[_nghost-%COMP%]{width:100%;height:100%;font-size:1.2rem}.club--avatar__wrapper[_ngcontent-%COMP%]{display:inline-block;position:relative;height:100%;width:100%}.club--avatar__dummy[_ngcontent-%COMP%]{margin-top:100%}.club--avatar__image--placeholder[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:40%;height:40%;transform:translate(-50%,-50%)}.club--avatar__image[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;right:0;display:block;border-radius:50%;background-color:transparent;text-decoration:none;height:100%;width:100%}.club--avatar__level[_ngcontent-%COMP%]{position:absolute;display:flex;align-items:center;justify-content:center;bottom:0;width:22.5%;height:22.5%;left:50%;transform:translate(-50%,10%)}"],changeDetection:0}),n})();function emt(t,n){if(1&t&&B(0,"avatar",4),2&t){const o=_();l("isLink",!0)("user",o.entity.profile)("hasUsername",!0)("hasLevel",!0)("frameAnimation",o.frameAnimation)}}const tmt=(t,n,o,e)=>({id:t,avatar:n,level:o,frame:e});function nmt(t,n){if(1&t&&B(0,"club-avatar",5),2&t){const o=_();l("club",xd(1,tmt,o.entity.clubData.clubProfile.id,o.entity.clubData.clubProfile.avatar,o.entity.clubData.clubProfile.level,o.entity.clubData.inventory.frame))}}function imt(t,n){if(1&t&&(p(0,"p",6)(1,"span",7),H(2),m()()),2&t){const o=_();d(2),se(o.entity.clubData.clubProfile.name)}}let mM=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["leaderboard-avatar"]],inputs:{position:"position",scoreType:"scoreType",entity:"entity",frameAnimation:"frameAnimation"},decls:4,vars:6,consts:[[3,"position","score","scoreType"],[3,"isLink","user","hasUsername","hasLevel","frameAnimation",4,"ngIf"],[3,"club",4,"ngIf"],["class","leaderboard__avatar--club--name",4,"ngIf"],[3,"isLink","user","hasUsername","hasLevel","frameAnimation"],[3,"club"],[1,"leaderboard__avatar--club--name"],[1,"leaderboard__avatar--club--name-text"]],template:function(e,i){1&e&&(p(0,"leaderboard-item",0),U(1,emt,1,5,"avatar",1)(2,nmt,1,6,"club-avatar",2)(3,imt,3,1,"p",3),m()),2&e&&(l("position",i.position)("score",i.entity.score)("scoreType",i.scoreType),d(),l("ngIf",i.entity.profile),d(),l("ngIf",i.entity.clubData),d(),l("ngIf",i.entity.clubData))},dependencies:[Ne,Bo,fz,mf],styles:[".leaderboard__avatar--club--name[_ngcontent-%COMP%]{display:flex;font-weight:600;height:3rem;text-align:center;align-items:center;justify-content:center}.leaderboard__avatar--club--name-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),n})();function omt(t,n){if(1&t&&(p(0,"div"),B(1,"img",3),V(2,"transformUrl"),m()),2&t){const o=n.$implicit;ni("leaderboard-profesional__container--ribbon-place ",o.id,""),d(),l("imgSrc",$(2,4,o.src))}}function rmt(t,n){if(1&t&&(p(0,"div",4)(1,"div",5),B(2,"leaderboard-avatar",6),m()()),2&t){const o=n.$implicit,e=_();d(2),l("scoreType",e.type)("entity",o)("frameAnimation",e.frameAnimation)}}const smt=["*"];let fM=(()=>{var t;class n{constructor(e){this.type=ri.Richest,this.elementSize=x0.Default,this.leaderRibbons=[],this.frameAnimation=v0,this.cdr=e,e.detach()}ngOnChanges(e){e.leaders&&(this.leaderRibbons=[],this.leaders.forEach((i,r)=>{this.leaderRibbons.push(n.getRibbon(r+1))})),this.cdr.detectChanges()}trackByRibbon(e,i){return i.id}trackByfn(e,i){var r,s,a;return null!==(r=null===(s=i.profile)||void 0===s?void 0:s.id)&&void 0!==r?r:null===(a=i.clubData)||void 0===a?void 0:a.clubProfile.id}static getRibbon(e){switch(e){case 1:return{id:"first",src:"leaderboards/leaderboard-first.png"};case 2:return{id:"second",src:"leaderboards/leaderboard-second.png"};case 3:return{id:"third",src:"leaderboards/leaderboard-third.png"};default:return{id:"",src:""}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["leaderboard-professionals"]],inputs:{leaders:"leaders",type:"type",elementSize:"elementSize"},features:[it],ngContentSelectors:smt,decls:6,vars:10,consts:[[1,"leaderboard-professionals--label"],[3,"class",4,"ngFor","ngForOf","ngForTrackBy"],["class","leaderboard-professional--avatar-container",4,"ngFor","ngForOf","ngForTrackBy"],["empty-placeholder","",3,"imgSrc"],[1,"leaderboard-professional--avatar-container"],["click-feedback","",1,"leaderboard-professionals--avatar-frame"],[3,"scoreType","entity","frameAnimation"]],template:function(e,i){1&e&&(Co(),p(0,"p",0),yo(1),m(),p(2,"div"),U(3,omt,3,6,"div",1),m(),p(4,"section"),U(5,rmt,3,3,"div",2),m()),2&e&&(d(2),ni("leaderboard-professional__container--ribbons leaderboards ",i.elementSize,""),d(),l("ngForOf",i.leaderRibbons)("ngForTrackBy",i.trackByRibbon),d(),ni("leaderboard-professional--wrapper leaderboards ",i.elementSize,""),d(),l("ngForOf",i.leaders)("ngForTrackBy",i.trackByfn))},dependencies:[Mt,po,$o,mM,uo],styles:[".leaderboard-professionals--label[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-align:center;margin:.5rem 0;line-height:18px}.leaderboard-professional__container--ribbons[_ngcontent-%COMP%]{height:4rem!important;display:flex;flex-flow:row wrap;justify-content:space-around}.leaderboard-professional__container--ribbons[_ngcontent-%COMP%]   .leaderboard-profesional__container--ribbon-place[_ngcontent-%COMP%]{width:33.33%;height:100%;display:flex;justify-content:center;align-items:center}.leaderboard-professional__container--ribbons[_ngcontent-%COMP%]   .leaderboard-profesional__container--ribbon-place.first[_ngcontent-%COMP%]{width:35%;order:1}.leaderboard-professional__container--ribbons[_ngcontent-%COMP%]   .leaderboard-profesional__container--ribbon-place.second[_ngcontent-%COMP%]{width:30%;order:0}.leaderboard-professional__container--ribbons[_ngcontent-%COMP%]   .leaderboard-profesional__container--ribbon-place.third[_ngcontent-%COMP%]{width:30%;order:2}.leaderboard-professional__container--ribbons[_ngcontent-%COMP%]   .leaderboard-profesional__container--ribbon-place[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:100%}.leaderboard-professionals--avatar-frame[_ngcontent-%COMP%]:hover{cursor:pointer}"],changeDetection:0}),n})(),gM=(()=>{var t;class n{constructor(){this.entryTextClass="",this.entryCurrencyClass="",this.currencyType=ln}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["entry-fee"]],hostAttrs:[1,"entry-fee__host"],inputs:{amount:"amount",entryTextClass:"entryTextClass",entryCurrencyClass:"entryCurrencyClass"},decls:6,vars:7,consts:[[1,"entry-fee__wrapper"],[1,"entry-fee__container"],[1,"entry-fee__text--label",3,"ngClass"],[1,"entry-fee__text--amount",3,"ngClass","currency","value"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"p",2),H(3),V(4,"translate"),m(),B(5,"currency-component",3),m()()),2&e&&(d(2),l("ngClass",i.entryTextClass),d(),se($(4,5,"LOBBY.BET")),d(2),l("ngClass",i.entryCurrencyClass)("currency",i.currencyType.Chips)("value",i.amount))},dependencies:[Xe,So,qe],styles:[".entry-fee__wrapper[_ngcontent-%COMP%]{position:relative;display:block;width:100%}.entry-fee__container[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;justify-content:center;align-items:center}.entry-fee__text--label[_ngcontent-%COMP%]{margin:0 .5rem}"],changeDetection:0}),n})();var _M;!function(t){let n;var o;(o=n=t.EButtonIconAnimation||(t.EButtonIconAnimation={}))[o.Pulse=0]="Pulse",o[o.Blink=1]="Blink"}(_M||(_M={}));const amt=(t,n)=>[t,n];let fv=(()=>{var t;class n{constructor(e){this.notificationValue="",this.showBorder=!1,this.iconClass="",this.isEnabled=!0,this.isHostBorderEnabled=!1,this.cdr=e,e.detach()}ngOnChanges(){this.limitNotificationValue(),this.isHostBorderEnabled=this.showBorder,this.cdr.detectChanges()}limitNotificationValue(){"number"==typeof this.notificationValue&&(this.notificationValue=Math.floor(this.notificationValue),this.notificationValue>99&&(this.notificationValue="99+"))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["notification-sign"]],hostVars:4,hostBindings:function(e,i){2&e&&Uo("notification-sign-host",i.isEnabled)("host-border",i.isHostBorderEnabled)},inputs:{notificationValue:"notificationValue",showBorder:"showBorder",iconClass:"iconClass"},features:[it],decls:2,vars:5,consts:[["data-cy","unreadNotificationText",1,"notification-sign__wrapper",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0),H(1),m()),2&e&&(l("ngClass",cn(2,amt,i.iconClass,i.showBorder?"notification-sign__wrapper--border":"")),d(),ze(" ",i.notificationValue,"\n"))},dependencies:[Xe],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;overflow:hidden}.notification-sign__wrapper[_ngcontent-%COMP%]{min-width:inherit;height:inherit;font-size:inherit;padding:0 .2rem;white-space:nowrap;display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:100%}"],changeDetection:0}),n})();var cmt=ve.EButtonModifier;function lmt(t,n){if(1&t){const o=Ce();p(0,"button-icon",2),Y("onClick",function(){return oe(o),re(_().onCustomButtonClick())}),m()}if(2&t){const o=_();l("ngClass",o.buttonClass)("icon",o.icon)("image",o.image)("bclass",o.bclass)("flatButton",o.flatButton)("buttonModifier",o.buttonModifier)("disabled",o.disabled)}}function umt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",2),Y("onClick",function(){return oe(o),re(_().onCustomButtonClick())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("ngClass",o.buttonClass)("icon",o.icon)("image",o.image)("bclass",o.bclass)("flatButton",o.flatButton)("buttonModifier",o.buttonModifier)("disabled",o.disabled),d(),se(yt(2,8,o.text.key,o.text.params))}}function dmt(t,n){if(1&t){const o=Ce();p(0,"div",3),Y("click",function(){return oe(o),re(_().onDisabledButtonClick())}),m()}}let PL=(()=>{var t;class n{constructor(){this.buttonModifier=cmt.BUTTON_TRANSPARENT,this.bclass="",this.timeoutMs=500,this.buttonClass="",this.onClick=new ke,this.onDisabledClick=new ke}onCustomButtonClick(){this.onClick.emit()}onDisabledButtonClick(){this.onDisabledClick.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["custom-button-icon"]],inputs:{icon:"icon",image:"image",text:"text",buttonModifier:"buttonModifier",disabled:"disabled",flatButton:"flatButton",bclass:"bclass",timeoutMs:"timeoutMs",buttonClass:"buttonClass"},outputs:{onClick:"onClick",onDisabledClick:"onDisabledClick"},decls:3,vars:3,consts:[["class","custom-button-icon__button-icon",3,"ngClass","icon","image","bclass","flatButton","buttonModifier","disabled","onClick",4,"ngIf"],["class","custom-button-icon__disabled-overlay",3,"click",4,"ngIf"],[1,"custom-button-icon__button-icon",3,"ngClass","icon","image","bclass","flatButton","buttonModifier","disabled","onClick"],[1,"custom-button-icon__disabled-overlay",3,"click"]],template:function(e,i){1&e&&U(0,lmt,1,7,"button-icon",0)(1,umt,3,11,"button-icon-text",0)(2,dmt,1,0,"div",1),2&e&&(l("ngIf",!i.text),d(),l("ngIf",i.text),d(),l("ngIf",i.disabled))},dependencies:[Xe,Ne,ei,so,qe],styles:["[_nghost-%COMP%]{width:100%;height:100%;position:relative;display:block}.custom-button-icon__button-icon[_ngcontent-%COMP%]{width:100%;min-width:4rem}@media only screen and (max-width: 480px){.custom-button-icon__button-icon[_ngcontent-%COMP%]{min-width:3.5rem}}.custom-button-icon__disabled-overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;cursor:not-allowed}"],changeDetection:0}),n})();var vve=_M.EButtonIconAnimation,pmt=ve.EButtonModifier;const hmt=(t,n,o,e)=>[t,n,o,e];function mmt(t,n){if(1&t&&B(0,"notification-sign",3),2&t){const o=_();l("iconClass",o.iconClass)("ngClass",xd(4,hmt,o.disabled?"element-disabled":"",o.text?"text-button":"",o.notificationClass,o.showNotificationBorder?"notification-border":""))("notificationValue",o.notificationValue)("showBorder",o.showNotificationBorder)}}const fmt=(t,n)=>({"button-icon--pulse":t,"button-icon--blink":n});let au=(()=>{var t;class n{constructor(e){this.EButtonIconAnimation=vve,this.bclass="",this.iconClass="",this.notificationClass="",this.showNotificationBorder=!1,this.buttonModifier=pmt.BUTTON_TRANSPARENT,this.buttonClass="",this.animation=vve.Pulse,this.onClick=new ke,this.onDisabledClick=new ke,this.animationTriggered=!1,this.cdr=e,e.detach()}ngOnInit(){this.highlighted&&(this.bclass+=" highlighted"),this.updateView()}ngOnChanges(e){this.highlighted&&-1===this.bclass.indexOf(" highlighted")&&(this.bclass+=" highlighted"),this.updateView()}ngOnDestroy(){clearTimeout(this.animationTimeout)}startAnimation(e){this.animation=e,this.animationTriggered=!1,this.animationTimeout&&clearTimeout(this.animationTimeout),this.animationTimeout=setTimeout(()=>{this.animationTriggered=!0,this.updateView()}),this.updateView()}stopAnimation(){this.animationTriggered=!1,this.updateView()}onNotificationButtonClick(){this.onClick.emit()}onDisabledButtonClick(){this.onDisabledClick.emit()}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["notification-button-icon"]],inputs:{isNotificationShown:"isNotificationShown",notificationValue:"notificationValue",disabled:"disabled",bclass:"bclass",iconClass:"iconClass",notificationClass:"notificationClass",showNotificationBorder:"showNotificationBorder",icon:"icon",image:"image",text:"text",flatButton:"flatButton",highlighted:"highlighted",buttonModifier:"buttonModifier",buttonClass:"buttonClass"},outputs:{onClick:"onClick",onDisabledClick:"onDisabledClick"},features:[it],decls:3,vars:13,consts:[[1,"notification-button-icon__wrapper"],[1,"notification-button-icon__button-icon",3,"ngClass","bclass","buttonClass","buttonModifier","text","disabled","flatButton","icon","image","onDisabledClick","onClick"],["class","notification-button__notification-sign",3,"iconClass","ngClass","notificationValue","showBorder",4,"ngIf"],[1,"notification-button__notification-sign",3,"iconClass","ngClass","notificationValue","showBorder"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"custom-button-icon",1),Y("onDisabledClick",function(){return i.onDisabledButtonClick()})("onClick",function(){return i.onNotificationButtonClick()}),m(),U(2,mmt,1,9,"notification-sign",2),m()),2&e&&(d(),l("ngClass",cn(10,fmt,i.animationTriggered&&i.animation===i.EButtonIconAnimation.Pulse,i.animationTriggered&&i.animation===i.EButtonIconAnimation.Blink))("bclass",i.bclass)("buttonClass",i.buttonClass)("buttonModifier",i.buttonModifier)("text",i.text)("disabled",i.disabled)("flatButton",i.flatButton)("icon",i.icon)("image",i.image),d(),l("ngIf",i.isNotificationShown))},dependencies:[Xe,Ne,fv,PL],styles:[".notification-button-icon__button-icon.button-icon--pulse[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse .5s linear}@keyframes _ngcontent-%COMP%_pulse{0%{transform:scaleZ(1)}30%{transform:scale3d(.8,.8,.8)}50%{transform:scale3d(1.05,1.05,1.05)}70%{transform:scale3d(.9,.9,.9)}to{transform:scaleZ(1)}}.notification-button-icon__button-icon.button-icon--blink[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink .5s linear}@keyframes _ngcontent-%COMP%_blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.notification-button-icon__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center;color:inherit}.notification-button-icon__button-icon[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;z-index:0;width:100%;height:100%;color:inherit}"],changeDetection:0}),n})();var gmt=ve.EIcons;const _mt=t=>({name:t}),vmt=()=>({key:"SIDE_MENU.FREE_REWARDS"});let _z=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.bclass="",this.iconNames=gmt,this.freeRewardsService=r,this.popup=i,this.router=e,this.store=s,this.cdr=a,this.destroyRef=c,a.detach()}ngOnInit(){const e=this.store.selectUserState().roles;this.disabled=!!e.find(i=>i.name===kr.GUESTUSER),this.subscription=this.store.bonuses.subscribeIsAnyBonusReady().subscribe(i=>{this.isAnyBonusReady=i,this.cdr.detectChanges()}),this.store.bonuses.levelUpRewards.subscribeIsReadyToClaim().pipe(mi(this.destroyRef)).subscribe(i=>{this.readyForClaim=i,this.cdr.detectChanges()}),this.store.registerBonus.subscribeIsReadyForClaim().pipe(mi(this.destroyRef)).subscribe(i=>{this.isRegisterBonusReadyForClaim=i,this.cdr.detectChanges()}),this.cdr.detectChanges()}ngOnDestroy(){var e;this.popup.hide(this.infoPopupId),null===(e=this.subscription)||void 0===e||e.unsubscribe()}openBonus(){this.disabledClick||this.freeRewardsService.openFreeRewards()}onDisabledButtonClick(){this.infoPopupId=this.popup.decision({buttons:{firstOption:{action:()=>{this.router.navigate(["/home"])},buttonTextOptions:{translationKey:"LOGIN"}},secondOption:{action:()=>{this.router.navigate(["/home"])},buttonTextOptions:{translationKey:"BUTTON.REGISTER"}}},textParams:{translationKey:"POPUP.RESTRICT_GUEST_MESSAGE"}})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Mu),g(J),g(Re),g(br))},t.\u0275cmp=pe({type:t,selectors:[["bonus"]],viewQuery:function(e,i){if(1&e&&$e(au,7),2&e){let r;je(r=He())&&(i.notificationButtonIconComponent=r.first)}},inputs:{bclass:"bclass",disabledClick:[mo.None,"disabled","disabledClick"]},features:[mn([{provide:nn,useFactory:o=>new nn("bonus",o),deps:[[new jo,new zo,nn]]}])],decls:2,vars:12,consts:[[1,"bonus__btn--notification--button",3,"icon","disabled","bclass","title","text","isNotificationShown","notificationValue","onClick","onDisabledClick"]],template:function(e,i){1&e&&(p(0,"notification-button-icon",0),Y("onClick",function(){return i.openBonus()})("onDisabledClick",function(){return i.onDisabledButtonClick()}),V(1,"translate"),m()),2&e&&l("icon",ne(9,_mt,i.iconNames.DAILY_REWARD_ICON_BOTTOM_BAR))("disabled",i.disabled)("bclass",i.bclass+" notification-button__active")("title",$(1,7,"SIDE_MENU.FREE_REWARDS"))("text",pt(11,vmt))("isNotificationShown",i.isAnyBonusReady||i.readyForClaim||i.isRegisterBonusReadyForClaim)("notificationValue","!")},dependencies:[au,qe],styles:["[_nghost-%COMP%]{position:relative}.bonus__btn--notification--button[_ngcontent-%COMP%]{display:block;width:45%;margin:auto;height:100%}"],changeDetection:0}),n})();var IL=function(t){return t.featureKey="leaderboards",t.featureActionCtx="Leaderboards State",t}(IL||{}),bmt=IL.featureActionCtx,gv=function(t){return t.ResetLeaderboardsState="Reset Leaderboard State",t.GetLeaderboard="Get Leaderboard",t.GetLeaderboardSuccess="Get Leaderboard Success",t.GetLeaderboardError="Get Leaderboard Error",t.GetMyLeaderboardRecord="Get Leaderboard Record",t.GetMyLeaderboardRecordSuccess="Get My Leaderboard Record Success",t.GetMyLeaderboardRecordError="Get My Leaderboard Record Error",t}(gv||{});function DC(t){return"[".concat(bmt,"] ").concat(t)}const bve=he(DC(gv.ResetLeaderboardsState)),Cve=he(DC(gv.GetLeaderboard)),yve=he(DC(gv.GetLeaderboardSuccess),{_as:"props",_p:void 0}),Sve=he(DC(gv.GetLeaderboardError),{_as:"props",_p:void 0}),wve=he(DC(gv.GetMyLeaderboardRecord)),Tve=he(DC(gv.GetMyLeaderboardRecordSuccess),{_as:"props",_p:void 0}),Cmt=he(DC(gv.GetMyLeaderboardRecordError),{_as:"props",_p:void 0});class ML{static createLeaderboardCacheId(n){var o;return"".concat(n.type,"-").concat(n.game,"-").concat(null!==(o=n.periodModifier)&&void 0!==o?o:0)}}let fa=(()=>{var t;class n{constructor(e,i){var r=this;this.fetchLeaderboard=function(){var s=f(function*(a){if(n.isGameSpecificLeaderboard(a.type)&&!a.secondId)return Promise.resolve({});r.store.dispatch(Cve());try{let c=yield r.http.get("leaderboard/unite/".concat(a.type),{params:a}).toPromise().then(u=>u.body);for(let u in c)c[u].leaderboard.rankings=n.excludeBrokenInfo(c[u].leaderboard.rankings);return a.periodModifiers&&a.periodModifiers.length?a.periodModifiers.forEach((u,h)=>{r.setLeaderboardCacheItem({cacheId:ML.createLeaderboardCacheId({game:a.secondId,periodModifier:u,type:a.type}),type:a.type,periodModifiers:h,leaderboard:c[h].leaderboard,position:c[h].position,secondId:c[h].leaderboard.secondId})}):r.setLeaderboardCacheItem({cacheId:ML.createLeaderboardCacheId({game:a.secondId,type:a.type}),type:a.type,periodModifiers:0,leaderboard:c[0].leaderboard,position:c[0].position,secondId:c[0].leaderboard.secondId}),c}catch(c){throw r.store.dispatch(Sve(c)),c}});return function(a){return s.apply(this,arguments)}}(),this.getCachedLeaderboard=function(){var s=f(function*(a){const c=r.store.selectLeaderboard(a);return Sb(c)||a.userId&&!c[va.ThisWeek].position?yield r.fetchLeaderboard(a):Promise.resolve(c)});return function(a){return s.apply(this,arguments)}}(),this.store=i,this.http=e}loadLeaderboard(e){var i=this;return f(function*(){const r=n.getCategoryByGameSpecificCat(e.type),s=n.isGameSpecificLeaderboard(e.type)?{type:r,...e}:e;e.secondId||(s.secondId=r);const a=s.cache?i.getCachedLeaderboard:i.fetchLeaderboard;let c={};if(s.periodModifiers&&s.periodModifiers.find(u=>u===ub.Forever)){let u=yield Promise.all([a({...s,periodModifiers:s.periodModifiers.filter(h=>h!==ub.Forever)}),a({...s,periodModifiers:[]})]);for(let h of s.periodModifiers)h===ub.Forever?c[ub.Forever]=u[1][0]:c[h]=u[0][h]}else c=yield a(s);return c})()}fetchCurrentUserPlace(e){var i=this;return f(function*(){try{i.store.dispatch(wve());const r=yield i.http.get("leaderboard/find/".concat(e.type),{params:{...e,userId:e.userId}}).toPromise();return i.store.dispatch(Tve({myRecord:{data:r.body,id:e.secondId?e.secondId:e.type,type:e.type}})),r.body}catch(r){throw r}})()}getCurrentUserPlace(e){var i=this;return f(function*(){const r=i.store.selectMyUserRecord(e);return e.cache&&!Sb(r)?Promise.resolve(r):yield i.fetchCurrentUserPlace(e)})()}clearCache(){this.store.dispatch(bve())}setLeaderboardCacheItem(e){this.store.dispatch(yve({leaderboardItem:e}))}static isGameSpecificLeaderboard(e){switch(e){case ri.Matchmaking:case ri.RankedSeasonCurrentSeries:case ri.RankedSeasonHallOfFame:case ri.LikesGame:case ri.RichestGame:case ri.EarnedChipsGame:return!0;default:return!1}}static getCategoryByGameSpecificCat(e){switch(e){case ri.LikesGame:return ri.Likes;case ri.RichestGame:return ri.Richest;case ri.EarnedChipsGame:return ri.EarnedChips;default:return e}}static getLeaderboardPeriodModifiers(e){switch(e){case ri.Matchmaking:case ri.EarnedChips:case ri.EarnedChipsGame:case ri.Likes:case ri.LikesGame:case ri.ClubMembersWeekly:return[va.ThisWeek,va.LastWeek];case ri.Gems:case ri.Richest:case ri.RichestGame:case ri.Club:case ri.ClubMembers:return[];default:return[va.ThisWeek,va.LastWeek]}}static excludeBrokenInfo(e){return e.filter(i=>i.clubData||i.profile)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const vz=ki({selectId:t=>t.cacheId,sortComparer:!1}),Pve=ki({selectId:t=>t.id,sortComparer:!1}),bz={myUserRecord:Pve.getInitialState({loadingState:{isLoading:!1,error:void 0}}),leaderboards:vz.getInitialState({loadingState:{isLoading:!1,error:void 0}})};function ymt(t,n){return Smt(t,n)}const Smt=Sr(bz,de(bve,t=>bz),de(sw,t=>bz),de(Cve,t=>Se(t,n=>{n.leaderboards.loadingState.isLoading=!0})),de(yve,(t,n)=>({...t,leaderboards:vz.upsertOne(n.leaderboardItem,t.leaderboards)})),de(Sve,(t,n)=>Se(t,o=>{o.leaderboards.loadingState={isLoading:!1,error:n}})),de(wve,t=>Se(t,n=>{n.myUserRecord.loadingState.isLoading=!0})),de(Tve,(t,n)=>({...t,myUserRecord:Pve.upsertOne(n.myRecord,t.myUserRecord)})),de(Cmt,(t,n)=>Se(t,o=>{o.myUserRecord.loadingState={isLoading:!1,error:n}})));function Ive(t){return t[IL.featureKey]}const wmt=We(Ive,t=>t.leaderboards),Mve=We(vz.getSelectors(wmt).selectAll,(t,n)=>{var o;const e={},i={};if((null===(o=n.periodModifiers)||void 0===o?void 0:o.length)>0)n.periodModifiers.forEach(r=>{const s=ML.createLeaderboardCacheId({game:n.secondId,type:n.type,periodModifier:r});i[s]=s});else{const r=ML.createLeaderboardCacheId({game:n.secondId,type:n.type});i[r]=r}return t.filter(r=>i[r.cacheId]).forEach(r=>{e[r.periodModifiers]=r}),e}),Ove=We(Ive,(t,n)=>{if(!t||!Object.keys(t.myUserRecord.entities).length)return{};let o;for(let e in t.myUserRecord.entities)n.secondId?t.myUserRecord.entities[e].type===n.type&&e===n.secondId&&(o=t.myUserRecord.entities[e].data):t.myUserRecord.entities[e].type===n.type&&(o=t.myUserRecord.entities[e].data);return o||{}});J.prototype.selectLeaderboard=function Pmt(t){return this.selectSync(Mve,t)},J.prototype.subscribeLeaderboard=function Imt(t){return this.select(Mve,t)},J.prototype.selectMyUserRecord=function Mmt(t){return this.selectSync(Ove,t)},J.prototype.subscribeMyUserRecord=function Omt(t){return this.select(Ove,t)};const Emt=[fa];let Eve=(()=>{var t;class n{static forRoot(){return{ngModule:n,providers:Emt}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[$r.forFeature(IL.featureKey,ymt)]}),n})();const kmt=(t,n)=>({increment:t,decrement:n});function Lmt(t,n){if(1&t&&(p(0,"div",5,6)(2,"div",7)(3,"span",8),H(4),m(),B(5,"currency-component",9),m()()),2&t){const o=_();Hn("data-cy","chichingNotification"+(o.currencyChangeValue>0?"Green":o.currencyChangeValue<0?"Red":"")),d(2),l("ngClass",cn(5,kmt,o.currencyChangeValue>0,o.currencyChangeValue<0)),d(2),se(o.currencyChangeValue>0?"+":"-"),d(),l("currency",o.type)("value",o.currencyChangeValueFormatted)}}const Dmt=()=>({enabled:!0,duration:1e3});let Sz=(()=>{var t;class n{constructor(e,i,r,s){this.inCurrencyWrapper=!1,this.ECurrencyType=ln,this.startChangeValueAnimation=a=>{this.animating?this.animating.finally(()=>this.startChangeValueAnimation(a)):(this.animating=new Promise(c=>{this.currencyChangeValue=0,this.formatChangeValue(),clearTimeout(this.clearValueAnimationTimeout),clearTimeout(this.changeValueAnimationTimeout),this.changeValueAnimationTimeout=setTimeout(()=>{this.emitAnimationStart();const u=parseInt(a,10);this.currencyChangeValue=u,this.formatChangeValue(),this.soundService.play(u<0?dn.ChipsLoss:dn.ChipsGain),this.clearValueAnimationTimeout=setTimeout(()=>{this.currencyChangeValue=0,this.currencyChangeValueFormatted=0,clearTimeout(this.clearValueAnimationTimeout),clearTimeout(this.changeValueAnimationTimeout),this.emitAnimationEnd(),this.updateView(),c()},3e3),this.updateView()})}),this.animating.finally(()=>this.animating=void 0))},this.onClick=new ke,this.animationStart=new ke,this.animationEnd=new ke,this.formatNumber=e,this.shortNumber=i,this.soundService=r,s.detach(),this.cdr=s,this.currencyChangeValue=0,this.currencyChangeValueFormatted=0}ngOnChanges(e){e.hasOwnProperty("currencyValue")&&this.formatNumbers()}ngOnDestroy(){cancelAnimationFrame(this.resizeId),clearTimeout(this.clearValueAnimationTimeout),clearTimeout(this.changeValueAnimationTimeout)}formatNumbers(){cancelAnimationFrame(this.resizeId),this.resizeId=requestAnimationFrame(()=>{this.formatChangeValue()})}formatChangeValue(){this.currencyChangeValueFormatted=Math.abs(this.currencyChangeValue),this.updateView()}onItemClick(){this.onClick.emit(),this.updateView()}emitAnimationStart(){this.animationStart.emit(3e3),this.updateView()}emitAnimationEnd(){this.animationEnd.emit(),this.updateView()}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Go),g(eI),g(Mo),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["currency-item"]],inputs:{type:"type",currencyValue:"currencyValue",inCurrencyWrapper:"inCurrencyWrapper"},outputs:{onClick:"onClick",animationStart:"animationStart",animationEnd:"animationEnd"},features:[it],decls:5,vars:10,consts:[["click-feedback","",1,"currency-item__container--coins",3,"scaleFactor","click"],["containerWrapper",""],[1,"currency-item__container--coins-heading"],[1,"currency-item__container--coins-heading",3,"currency","value","animate"],["class","currency-item__container--coins-animation-wrapper",4,"ngIf"],[1,"currency-item__container--coins-animation-wrapper"],["animationWrapper",""],[1,"currency-item__container--coins-count-change",3,"ngClass"],[1,"currency-item__text-partition","partition__sign"],[1,"currency-item__text-partition",3,"currency","value"]],template:function(e,i){1&e&&(p(0,"div",0,1),Y("click",function(){return i.onItemClick()}),p(2,"div",2),B(3,"currency-component",3),m(),U(4,Lmt,6,8,"div",4),m()),2&e&&(Uo("in-wrapper",i.inCurrencyWrapper),l("scaleFactor",.96),d(2),Uo("in-wrapper",i.inCurrencyWrapper),d(),l("currency",i.type)("value",i.currencyValue)("animate",pt(9,Dmt)),d(),l("ngIf",i.currencyChangeValue))},dependencies:[Xe,Ne,po,So],styles:[".currency-item__container--coins[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap;position:relative;justify-content:center;align-items:center;padding:0 2rem 0 1rem;height:100%}.currency-item__container--coins[_ngcontent-%COMP%]:hover{cursor:pointer}@media only screen and (max-width: 768px){.currency-item__container--coins[_ngcontent-%COMP%]{height:2.4rem}}@media only screen and (max-width: 480px){.currency-item__container--coins[_ngcontent-%COMP%]{padding:0 1rem 0 0rem}}.currency-item__container--coins.in-wrapper[_ngcontent-%COMP%]{height:50%;align-items:flex-start}@media only screen and (max-width: 768px){.currency-item__container--coins.in-wrapper[_ngcontent-%COMP%]{padding:0 1rem 0 1.6rem}}.currency-item__container--coins-heading[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;position:relative;height:2.4rem;font-size:2rem!important;flex-wrap:nowrap!important}@media only screen and (max-width: 480px){.currency-item__container--coins-heading[_ngcontent-%COMP%]{font-size:1.4rem!important}}@media only screen and (max-width: 768px){.currency-item__container--coins-heading.in-wrapper[_ngcontent-%COMP%]{height:1.8rem}}.currency-item__container--coins-animation-wrapper[_ngcontent-%COMP%]{position:absolute;right:0;top:50%;pointer-events:none;z-index:1000004;display:inline-block}.currency-item__container--coins-count-change[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-content:center;opacity:0;flex-flow:nowrap;text-align:center;font-size:2.4rem;line-height:2.4rem;font-weight:600;padding:.3rem 1rem;width:auto;min-width:10rem;transform:translateY(-4rem)}@media only screen and (max-width: 768px){.currency-item__container--coins-count-change[_ngcontent-%COMP%]{padding:.2rem .5rem!important}.currency-item__container--coins-count-change.increment[_ngcontent-%COMP%]{font-size:1.8rem!important;min-width:13rem!important}.currency-item__container--coins-count-change.decrement[_ngcontent-%COMP%]{font-size:1.4rem!important;min-width:10rem!important}}@media only screen and (max-width: 568px){.currency-item__container--coins-count-change.increment[_ngcontent-%COMP%], .currency-item__container--coins-count-change.decrement[_ngcontent-%COMP%]{width:auto;min-width:10rem!important}}.currency-item__container--coins-count-change.increment[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_zoomInDown 3s ease-out 1;min-width:17rem;font-size:2.4rem;-webkit-backface-visibility:hidden;backface-visibility:hidden}.currency-item__container--coins-count-change.increment[_ngcontent-%COMP%]   .partition__sign[_ngcontent-%COMP%]{margin-right:1rem}.currency-item__container--coins-count-change.decrement[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_zoomOutDown 1s ease-out 1;min-width:12rem;padding:.2rem .5rem .2rem 0;font-size:1.4rem}.currency-item__container--coins-count-change.decrement[_ngcontent-%COMP%]   .partition__sign[_ngcontent-%COMP%]{margin-right:.8rem}.currency-item__text[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:nowrap;justify-content:center;align-items:center;padding:0 .4rem}.currency-item__text-partition[_ngcontent-%COMP%]{position:relative;white-space:nowrap}@keyframes _ngcontent-%COMP%_zoomInDown{0%{opacity:0;transform:translate3d(0,-2rem,0) scale3d(.1,.1,.1);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}20%{opacity:1;transform:translate3d(0,2rem,0) scale3d(.475,.475,.475);animation-timing-function:cubic-bezier(.175,.885,.32,1)}75%{opacity:1;transform:translateZ(0) scaleZ(1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}to{opacity:0;transform:translateZ(0) scaleZ(1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes _ngcontent-%COMP%_zoomOutDown{0%{opacity:0;transform:translateZ(0) scaleZ(1);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}25%{opacity:1;transform:translateZ(0) scaleZ(1);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;transform:translateZ(0) scaleZ(1);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}85%{opacity:1;transform:translate3d(0,-.5rem,0) scaleZ(1);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;transform:translate3d(0,2rem,0) scale3d(0,0,0);transform-origin:center bottom;animation-timing-function:cubic-bezier(.175,.885,.32,1)}}"],changeDetection:0}),n})();var Bmt=ve.EIcons,wz=_M.EButtonIconAnimation,OL=nt.EPermissionModule,EL=nt.EModuleAction;const Nmt=t=>({name:t}),Fmt=()=>({key:"LABEL.CHAT"});function Umt(t,n){if(1&t){const o=Ce();p(0,"notification-button-icon",1),Y("onClick",function(){return oe(o),re(_().feedSwitch())})("onDisabledClick",function(){return oe(o),re(_().onDisabledButtonClick())}),V(1,"translate"),V(2,"numberLimit"),m()}if(2&t){const o=_();l("bclass",o.bclass+(o.hasUnseenUnreadMessages?" notification-button__active":""))("iconClass",o.hasAdminMessage?"chat-button__admin-message":"")("disabled",o.disabled)("icon",ne(13,Nmt,o.iconNames.GLOBAL_CHAT_ICON_BOTTOM_BAR))("title",$(1,8,"LABEL.CHAT"))("text",pt(15,Fmt))("isNotificationShown",!!o.unreadTopicsCount)("notificationValue",yt(2,10,o.unreadTopicsCount,99))}}let Tz=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.bclass="",this.iconNames=Bmt,this.subscriptions=new ie.List,this.onNewPrivateMessage=h=>{var b;h.message.isConversationMuted||(null===(b=this.notificationButtonIconComponent)||void 0===b||b.startAnimation(wz.Pulse),this.updateView())},this.onNewPublicMessage=()=>{var h;null===(h=this.notificationButtonIconComponent)||void 0===h||h.startAnimation(wz.Pulse),this.updateView()},this.onHasUnseenMessagesUpdate=()=>{this.hasUnseenUnreadMessages=this.store.selectPublicChatHasUnseenMessages().hasUnseenMessages||this.store.selectPrivateChatHasUnseenMessages(),this.updateView()},this.onUnreadCountUpdate=()=>{const h=this.unreadTopicsCount,b=this.store.selectPrivateUnreadConversationsCount()+this.store.selectPublicUnreadConversationsCount().total;var w;this.unreadTopicsCount=b,b>h&&(null===(w=this.notificationButtonIconComponent)||void 0===w||w.startAnimation(wz.Pulse)),this.updateView()},this.onHasUnreadAdminMessagesUpdate=h=>{this.hasAdminMessage=h,this.updateView()},this.store=r,this.permissionsService=e,this.sideComponentService=i,this.unreadConversationsLimit=99,this.cdr=s,this.actions=a,this.navigation=c,this.analyticsTracking=u,this.showButton=this.store.chatComponent.selectIsChatEnabled(),s.detach()}ngOnInit(){this.disabled=!this.canOpenChat(),this.updateView(),this.subscriptions.add(this.store.subscribePrivateUnreadConversationsCount().subscribe(this.onUnreadCountUpdate)),this.subscriptions.add(this.store.subscribePublicUnreadConversationsCount().subscribe(this.onUnreadCountUpdate)),this.subscriptions.add(this.store.subscribePrivateChatHasUnseenMessages().subscribe(this.onHasUnseenMessagesUpdate)),this.subscriptions.add(this.store.subscribePublicChatHasUnseenMessages().subscribe(this.onHasUnseenMessagesUpdate)),this.subscriptions.add(this.store.subscribeHasUnreadAdminMessages().subscribe(this.onHasUnreadAdminMessagesUpdate)),this.subscriptions.add(this.actions.pipe(ai(O6),bt(e=>this.store.selectIsSubscribedToPublicConversation(e.message.conversationId))).subscribe(this.onNewPublicMessage)),this.subscriptions.add(this.actions.pipe(ai(GI)).subscribe(this.onNewPrivateMessage))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}feedSwitch(){if(!this.disabledClick){this.sideComponentService.open();const e=new aa.DefaultEvent(Nn.Navigation,ds.EAnalyticsCategory.Public,{label:this.navigation.getOutletUrl()});this.analyticsTracking.sendEvent(e),this.updateView()}}onDisabledButtonClick(){this.permissionsService.getActionPermission(OL.GlobalChat,EL.Open,{showFailedRequirements:!0}),this.updateView()}updateView(){this.cdr.detectChanges()}canOpenChat(){return this.permissionsService.getActionPermission(OL.PrivateChat,EL.Open).isPermitted||this.permissionsService.getActionPermission(OL.GlobalChat,EL.Open).isPermitted||this.permissionsService.getActionPermission(OL.ClubChat,EL.Open).isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pi),g(El),g(J),g(Re),g(yr),g(Yt),g(yi))},t.\u0275cmp=pe({type:t,selectors:[["chat-button"]],viewQuery:function(e,i){if(1&e&&$e(au,5),2&e){let r;je(r=He())&&(i.notificationButtonIconComponent=r.first)}},inputs:{bclass:"bclass",disabledClick:[mo.None,"disabled","disabledClick"]},decls:1,vars:1,consts:[["class","chat__btn--notification--button",3,"bclass","iconClass","disabled","icon","title","text","isNotificationShown","notificationValue","onClick","onDisabledClick",4,"ngIf"],[1,"chat__btn--notification--button",3,"bclass","iconClass","disabled","icon","title","text","isNotificationShown","notificationValue","onClick","onDisabledClick"]],template:function(e,i){1&e&&U(0,Umt,3,16,"notification-button-icon",0),2&e&&l("ngIf",i.showButton)},dependencies:[Ne,au,qe,L_],styles:[".chat__btn--notification--button[_ngcontent-%COMP%]{display:block;width:45%;margin:auto;height:100%}"],changeDetection:0}),n})();const Gmt=t=>[t];function Vmt(t,n){if(1&t&&(p(0,"div",2)(1,"div",3),B(2,"p",4)(3,"avatar",5),m()()),2&t){const o=n.$implicit,e=_();l("ngClass",ne(6,Gmt,e.bclass||"")),d(3),l("user",o)("isLink",!0)("hasUsername",e.showUsername)("frameAnimation",e.frameAnimation)("hasLevel",e.showLevel)}}const zmt=["*"];let BC=(()=>{var t;class n{constructor(){this.leaders=[],this.elementSize=x0.Default,this.bclass="",this.showUsername=!0,this.showLevel=!0,this.frameAnimation=v0}trackByFn(e,i){return i.id}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["professionals"]],inputs:{leaders:"leaders",elementSize:"elementSize",bclass:"bclass",showUsername:"showUsername",showLevel:"showLevel"},ngContentSelectors:zmt,decls:4,vars:5,consts:[[1,"lobby__professionals--label"],["class","lobby__professional--avatar-container",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"lobby__professional--avatar-container",3,"ngClass"],["click-feedback","",1,"lobby__professionals--avatar-frame"],[1,"lobby__professionals--place"],[1,"lobby__professionals--avatar",3,"user","isLink","hasUsername","frameAnimation","hasLevel"]],template:function(e,i){1&e&&(Co(),p(0,"p",0),yo(1),m(),p(2,"section"),U(3,Vmt,4,8,"div",1),m()),2&e&&(d(2),ni("lobby__professional--wrapper ",i.elementSize,""),d(),l("ngForOf",i.leaders)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,po,Bo],styles:[".lobby__professionals--label[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-transform:uppercase;text-align:center;padding:1% 0 2%;line-height:20px}@media only screen and (max-width: 480px){.lobby__professionals--label[_ngcontent-%COMP%]{font-size:1.4rem;line-height:18px;padding:1% 0 0}}.lobby__professionals--avatar-frame[_ngcontent-%COMP%]:hover{cursor:pointer}.lobby__professionals--element[_ngcontent-%COMP%]{display:none;position:absolute;left:50%;right:50%;transform:translate(-50%)}.lobby__professionals--badge-container[_ngcontent-%COMP%]{position:absolute;bottom:12%;left:50%;z-index:3;width:91%;height:35%;transform:translate(-50.5%);display:flex;flex-flow:row;align-items:center;justify-content:center;pointer-events:none}.lobby__professionals--badge-container[_ngcontent-%COMP%]   .lobby__professionals--username[_ngcontent-%COMP%]{margin-bottom:3%;width:90%;overflow:hidden;text-align:center;font-size:1.4rem;font-weight:600;white-space:nowrap;text-overflow:ellipsis}"],changeDetection:0}),n})();var Ru;!function(t){let n;var o;(o=n=t.EContent||(t.EContent={}))[o.Text=0]="Text",o[o.Image=1]="Image"}(Ru||(Ru={}));var jmt=ve.EIcons;const Pz=t=>({invisible:t}),Iz=t=>({name:t});function Hmt(t,n){if(1&t&&B(0,"button-icon",8),2&t){const o=_();Uf("routerLink",o.backLink),l("ngClass",ne(3,Pz,!o.showBackButton))("icon",ne(5,Iz,o.iconNames.ARROW_BACK))}}function qmt(t,n){if(1&t){const o=Ce();p(0,"button-icon",9),Y("onClick",function(){return oe(o),re(_().historyBack())}),m()}if(2&t){const o=_();l("ngClass",ne(2,Pz,!o.showBackButton))("icon",ne(4,Iz,o.iconNames.ARROW_BACK))}}function Wmt(t,n){if(1&t){const o=Ce();p(0,"button-icon",9),Y("onClick",function(){return oe(o),re(_().backButtonCallback())}),m()}if(2&t){const o=_();l("ngClass",ne(2,Pz,!o.showBackButton))("icon",ne(4,Iz,o.iconNames.ARROW_BACK))}}const $mt=t=>[t];function Kmt(t,n){if(1&t&&(B(0,"p",10),V(1,"translate")),2&t){const o=_();l("innerHTML",yt(1,1,o.content.data.key,ne(4,$mt,o.content.data.params)),Yn)}}function Zmt(t,n){1&t&&B(0,"img",11),2&t&&l("imgSrc",_().content.data.imgUrl)}const Qmt=["*"];let Kh=(()=>{var t;class n{constructor(e,i,r,s){this.showBackButton=!0,this.iconNames=jmt,this.EContent=Ru.EContent,this.appState=e,this.navigation=i,this.activatedComponentRoute=r,this.constants=s,this.buttonHistoryBack=!1,this.backButtonEvent=new ke}ngOnInit(){"history"===this.backLink&&(this.buttonHistoryBack=!0)}historyBack(){""!==this.appState.getPreviousRoute()&&-1===this.appState.getPreviousRoute().indexOf("auto-login")&&history.length>1?this.activatedComponentRoute.outletContext.outlet===oi?this.navigation.navigateBack(oi):history.back():this.navigation.navigate([this.constants.defaultLoggedRoute])}backButtonCallback(){this.backButtonEvent.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Sa),g(Yt),g(Pr),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["navigation-bar"]],inputs:{content:"content",backLink:"backLink",showBackButton:"showBackButton"},outputs:{backButtonEvent:"backButtonEvent"},features:[mn([ia])],ngContentSelectors:Qmt,decls:10,vars:5,consts:[[1,"nav-bar__wrapper"],[1,"nav-bar__container"],[1,"nav-bar__container--arrow-back"],["class","nav-bar__button--back",3,"ngClass","icon","routerLink",4,"ngIf"],["class","nav-bar__button--back",3,"ngClass","icon","onClick",4,"ngIf"],[1,"nav-bar__container--title"],["class","nav-bar__text--title",3,"innerHTML",4,"ngIf"],["class","nav-bar__image","empty-placeholder","",3,"imgSrc",4,"ngIf"],[1,"nav-bar__button--back",3,"ngClass","icon","routerLink"],[1,"nav-bar__button--back",3,"ngClass","icon","onClick"],[1,"nav-bar__text--title",3,"innerHTML"],["empty-placeholder","",1,"nav-bar__image",3,"imgSrc"]],template:function(e,i){1&e&&(Co(),p(0,"section",0)(1,"div",1)(2,"div",2),U(3,Hmt,1,7,"button-icon",3)(4,qmt,1,6,"button-icon",4)(5,Wmt,1,6,"button-icon",4),m(),p(6,"div",5),U(7,Kmt,2,6,"p",6)(8,Zmt,1,1,"img",7),m(),yo(9),m()()),2&e&&(d(3),l("ngIf",i.backLink&&!i.buttonHistoryBack),d(),l("ngIf",i.backLink&&i.buttonHistoryBack),d(),l("ngIf",!i.backLink&&!i.buttonHistoryBack),d(2),l("ngIf",i.content&&i.content.type===i.EContent.Text),d(),l("ngIf",i.content&&i.content.type===i.EContent.Image))},dependencies:[eP,Xe,Ne,$o,ei,qe],styles:[".nav-bar__container[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;border:none;border-radius:0;min-height:5rem}.nav-bar__container--arrow-back[_ngcontent-%COMP%]{position:relative;height:5rem;z-index:3;display:flex;align-items:center;justify-content:center}.nav-bar__container--arrow-back[_ngcontent-%COMP%]   .nav-bar__button--back[_ngcontent-%COMP%]{margin:0}.nav-bar__container--title[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:5rem;flex:1}@media only screen and (max-width: 768px){.nav-bar__container--title[_ngcontent-%COMP%]{width:calc(100% - 6rem)}}.nav-bar__text--title[_ngcontent-%COMP%]{text-align:center;font-size:2.4rem;text-transform:uppercase;font-weight:600;margin-left:-4rem}@media only screen and (max-width: 480px){.nav-bar__text--title[_ngcontent-%COMP%]{font-size:1.8rem}}.nav-bar__image[_ngcontent-%COMP%]{text-align:center;height:5rem;padding:.25rem 0;margin-left:-4rem}@media only screen and (max-width: 480px){.nav-bar__image[_ngcontent-%COMP%]{font-size:1.8rem}}.nav-bar__container--button-close[_ngcontent-%COMP%]{padding-left:2.5rem;width:3rem;height:3rem;margin-left:1rem}.nav-bar__container--button-close[_ngcontent-%COMP%]:hover{cursor:pointer}@media only screen and (max-width: 1366px){.nav-bar__container--button-close[_ngcontent-%COMP%]{background-size:60% auto}}@media only screen and (max-width: 980px){.nav-bar__container--button-close[_ngcontent-%COMP%]{background-size:90% auto}}.invisible[_ngcontent-%COMP%]{transform:translate(-100%)}"],changeDetection:0}),n})();const Ymt=["input"];let A0=(()=>{var t;class n{constructor(){this.config={},this.select=new ke}ngOnInit(){this.input=this.inputElRef.nativeElement}ngOnChanges(e){this.input&&this.setAttributes()}selectFile(){this.input.click()}onChange(e){this.selectedFiles=e.target.files,this.select.emit({file:e.target.files[0],fileList:e.target.files})}setAttributes(){this.input.setAttribute("accept",this.config.accept.join(",")),this.input.setAttribute("multiple",this.config.multiple.toString());for(let e in this.nativeAttributes)this.nativeAttributes.hasOwnProperty(e)&&this.input.setAttribute(e,this.nativeAttributes[e])}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["input-file"]],viewQuery:function(e,i){if(1&e&&$e(Ymt,7,$t),2&e){let r;je(r=He())&&(i.inputElRef=r.first)}},inputs:{config:"config",nativeAttributes:"nativeAttributes"},outputs:{select:"select"},features:[it],decls:2,vars:0,consts:[["type","file","accept","image/*","data-cy","fileInputField",1,"input__file",3,"change"],["input",""]],template:function(e,i){1&e&&(p(0,"input",0,1),Y("change",function(s){return i.onChange(s)}),m())},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;opacity:0;cursor:pointer}.input__file[_ngcontent-%COMP%]{display:block;width:100%;height:100%;font-size:0}\n\n/*# sourceMappingURL=input-file.component.ts-angular-inline--3.css.map*/"],changeDetection:0}),n})();function Jmt(t,n){if(1&t){const o=Ce();p(0,"input-file",3),Y("select",function(i){return oe(o),re(_().onInputChanged(i))}),m()}}let _v=(()=>{var t;class n{constructor(){this.iconClass="",this.hostClass=!0,this.onClick=new ke,this.change=new ke,this.EIcons=ve.EIcons}onButtonClicked(){this.onClick.emit()}onInputChanged(e){e.file&&this.change.emit(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["add-button"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("add__button-host",i.hostClass)},inputs:{isFileInput:"isFileInput",iconClass:"iconClass"},outputs:{onClick:"onClick",change:"change"},decls:3,vars:3,consts:[["click-sound","","click-feedback","",1,"add-button_button",3,"click"],[1,"add-button__icon",3,"ngClass","icon"],["class","add-button_input",3,"select",4,"ngIf"],[1,"add-button_input",3,"select"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.onButtonClicked()}),B(1,"icon-component",1),U(2,Jmt,1,0,"input-file",2),m()),2&e&&(d(),l("ngClass",i.iconClass)("icon",i.EIcons.PLUS),d(),l("ngIf",i.isFileInput))},dependencies:[Xe,Ne,po,Fd,Dn,A0],styles:["[_nghost-%COMP%]{width:100%;height:100%;font-size:1em}.add-button_button[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:inherit}.add-button__icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.add-button_input[_ngcontent-%COMP%]{position:absolute}"],changeDetection:0}),n})();const Xmt=["scrollContainer"];function eft(t,n){1&t&&B(0,"loader-image",5),2&t&&l("transparentBG",!0)}function tft(t,n){1&t&&B(0,"empty-content",6),2&t&&l("textArray",_().error)("noImgFlag",!0)}const nft=t=>[t],ift=()=>[];function oft(t,n){if(1&t&&B(0,"avatar",9,10),2&t){const o=n.$implicit,e=_(2);l("ngClass",e.avatar.class?ne(6,nft,e.avatar.class):pt(8,ift))("isLink",e.avatar.isLink)("hasUsername",e.avatar.showUsername)("hasLevel",e.avatar.showLevel)("user",o),Hn("data-cy",o.id)}}function rft(t,n){if(1&t&&(Tn(0),p(1,"div",7),U(2,oft,2,9,"avatar",8),m(),Pn()),2&t){const o=_();d(2),l("ngForOf",o.users)("ngForTrackBy",o.trackByFn)}}const sft=t=>({handler:t});let NC=(()=>{var t;class n{constructor(){this.users=[],this.isLoading=!1,this.onScrolledToBottom=new ke,this.emitScrolledToBottom=()=>{this.onScrolledToBottom.emit()},this.avatar=this.createDefaultAvatarConfig()}ngOnChanges(e){e.avatarConfig&&(this.avatar=e.avatarConfig.currentValue?{...this.avatar,...e.avatarConfig.currentValue}:this.createDefaultAvatarConfig())}trackByFn(e,i){return i.id}scrollToTop(){this.scrollContainer.elementRef.nativeElement.scrollTop=0}createDefaultAvatarConfig(){return this.avatarConfig?this.avatarConfig:{class:"",isLink:!0,showLevel:!0,showUsername:!1}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["avatars-list"]],viewQuery:function(e,i){if(1&e&&$e(Xmt,5,Is),2&e){let r;je(r=He())&&(i.scrollContainer=r.first)}},inputs:{users:"users",isLoading:"isLoading",error:"error",avatarConfig:"avatarConfig"},outputs:{onScrolledToBottom:"onScrolledToBottom"},features:[it],decls:5,vars:6,consts:[["scroll-directive","",1,"avatars--list__avatar--container",3,"onScrolledToBottom"],["scrollContainer","scroll"],["class","avatars--list__loader",3,"transparentBG",4,"ngIf"],[3,"textArray","noImgFlag",4,"ngIf"],[4,"ngIf"],[1,"avatars--list__loader",3,"transparentBG"],[3,"textArray","noImgFlag"],[1,"avatars--list__container"],["class","avatars--list__avatar",3,"ngClass","isLink","hasUsername","hasLevel","user",4,"ngFor","ngForOf","ngForTrackBy"],[1,"avatars--list__avatar",3,"ngClass","isLink","hasUsername","hasLevel","user"],["avatarComponentList",""]],template:function(e,i){1&e&&(p(0,"div",0,1),U(2,eft,1,1,"loader-image",2)(3,tft,1,2,"empty-content",3)(4,rft,3,2,"ng-container",4),m()),2&e&&(l("onScrolledToBottom",ne(4,sft,i.emitScrolledToBottom)),d(2),l("ngIf",i.isLoading),d(),l("ngIf",!i.isLoading&&i.error&&i.error.length),d(),l("ngIf",!i.isLoading&&!i.error&&i.users&&i.users.length>0))},dependencies:[Xe,Mt,Ne,Is,Bo,bo,Oi],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.avatars--list__avatar--container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;padding:.25rem 0;width:100%;height:100%;align-items:flex-start;position:relative}.avatars--list__loader[_ngcontent-%COMP%]{display:block;width:5rem;height:5rem}.avatars--list__container[_ngcontent-%COMP%]{width:100%;height:100%;margin:0 .5rem}.avatars--list__avatar[_ngcontent-%COMP%]{display:inline-block;margin:.2rem;width:calc(7.69% - .4rem);height:initial}@media only screen and (max-width: 680px){.avatars--list__avatar[_ngcontent-%COMP%]{width:calc(14.26% - .4rem)}}@media only screen and (max-width: 440px){.avatars--list__avatar[_ngcontent-%COMP%]{width:calc(16.666% - .4rem)}}@media only screen and (max-width: 360px){.avatars--list__avatar[_ngcontent-%COMP%]{width:calc(20% - .4rem)}}.avatars--list__avatar[_ngcontent-%COMP%]:hover{cursor:pointer}@media only screen and (min-width: 768px) and (orientation: landscape){.avatars--list__avatar[_ngcontent-%COMP%]:hover{transform:scale(1.05) translateZ(0)}}"],changeDetection:0}),n})();var aft=ve.EButtonModifier;const cft=()=>({isLink:!0,showLevel:!0});function lft(t,n){if(1&t&&(Tn(0),p(1,"div"),B(2,"avatars-list",3),m(),Pn()),2&t){const o=_();d(2),l("avatarConfig",pt(2,cft))("users",o.users)}}function uft(t,n){1&t&&(p(0,"div",4),B(1,"loader-image",5),m()),2&t&&(d(),l("delay",1e3)("transparentBG",!0))}function dft(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"button-text",7),Y("onClick",function(){return oe(o),re(_().navigateToSocial())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_();d(),l("buttonModifier",o.buttonModifier.BUTTON_ACTION),d(),ze("",$(3,2,"BUTTON.SHOW_MORE")," ")}}let Mz=(()=>{var t;class n{constructor(e,i,r){this.router=e,this.permissions=i,this.constants=r,this.buttonModifier=aft,this.showSocialBtn=this.permissions.getModulePermission(nt.EPermissionModule.Social).isEnabled}navigateToSocial(){this.router.navigate(["".concat(this.constants.defaultLoggedRoute,"/social")]).catch(e=>{console.error("navigate to social error:",e)})}trackByFn(e,i){return i.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Pi),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["avatar-lobby-layout"]],hostAttrs:[1,"avatar__container--layout"],inputs:{users:"users"},decls:4,vars:3,consts:[[4,"ngIf","ngIfElse"],["loader",""],["class","avatar-layout__container--button",4,"ngIf"],[3,"avatarConfig","users"],[1,"avatar-layout__container--loader"],[3,"delay","transparentBG"],[1,"avatar-layout__container--button"],[1,"avatar-layout__button-show-more",3,"buttonModifier","onClick"]],template:function(e,i){if(1&e&&U(0,lft,3,3,"ng-container",0)(1,uft,2,2,"ng-template",null,1,ft)(3,dft,4,4,"div",2),2&e){const r=Kt(2);l("ngIf",i.users)("ngIfElse",r),d(3),l("ngIf",i.showSocialBtn)}},dependencies:[Ne,pn,Oi,NC,qe],styles:["[_nghost-%COMP%]{width:100%}.avatar-layout__container--loader[_ngcontent-%COMP%]{width:100%;height:100%;min-height:10rem}.avatar-layout__container--button[_ngcontent-%COMP%]{padding:1rem 1rem 3rem;width:100%}@media only screen and (max-width: 768px){.avatar-layout__container--button[_ngcontent-%COMP%]{padding:1rem 1rem 2rem;bottom:-12rem}}.avatar-layout__container--button[_ngcontent-%COMP%]   .avatar-layout__button-show-more[_ngcontent-%COMP%]{min-width:20rem;margin:2rem auto;text-decoration:none;width:30%}"],changeDetection:0}),n})();const pft=["chipsCurrencyItem"],hft=["gemsCurrencyItem"],mft=["currencyWrapper"],fft=t=>({"ciw__container--currencies__active":t});let Oz=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){var w=this;this.ECurrencyType=ln,this.EIcons=ve.EIcons,this.targetTimeStamp=0,this.walletAnimations=[],this.walletAnimationsFunctions=[],this.handleTransactionEvent=R=>{switch(R.type){case Ns.Chiching:this.onChipsUpdate(R.value);break;case Ns.Blingbling:this.onGemsUpdate(R.value)}},this.onWalletChange=R=>{if(this.chipsCurrencyValue!==R.chips){const G=R.chips-this.chipsCurrencyValue;this.chipsCurrencyValue=R.chips,this.onChipsUpdate(G.toString())}if(this.gemsCurrencyValue!==R.gems){const G=R.gems-this.gemsCurrencyValue;this.gemsCurrencyValue=R.gems,this.onGemsUpdate(G.toString())}},this.onChipsUpdate=function(){var R=f(function*(G){w.chipsCurrencyItem.startChangeValueAnimation(G),w.cdr.detectChanges()});return function(G){return R.apply(this,arguments)}}(),this.onGemsUpdate=function(){var R=f(function*(G){w.gemsCurrencyItem.startChangeValueAnimation(G),w.cdr.detectChanges()});return function(G){return R.apply(this,arguments)}}(),this.currencyItemService=c,this.formatNumber=e,this.analyticsTrackingService=s,this.contextTreeService=a,this.router=i,this.store=u,this.userProps=this.store.selectUserState(),this.communicationService=r,this.constants=h,this.cdr=b,b.detach()}ngOnInit(){this.currencyItemService.setCurrencyItemsWrapperCmpRef(this);const e=this.store.selectWallet();this.chipsCurrencyValue=e.chips,this.gemsCurrencyValue=e.gems,this.cdr.detectChanges()}ngAfterViewInit(){this.currencyItemService.setComponentInited(!0);const e=this.currencyItemService.getCachedTransactionsCache();if(1===e.length)this.handleTransactionEvent(e.last());else{let i=0,r=0;e.forEach(s=>{s.type===Ns.Chiching?i+=parseInt(s.value,10):s.type===Ns.Blingbling&&(r+=parseInt(s.value,10))}),0!==i&&this.handleTransactionEvent({value:"".concat(i),type:Ns.Chiching}),0!==r&&this.handleTransactionEvent({value:"".concat(r),type:Ns.Blingbling})}this.currencyItemService.clearCache(),this.walletSubscription=this.store.subscribeWallet().pipe(bt(Boolean)).subscribe(this.onWalletChange)}ngOnDestroy(){clearTimeout(this.timeout),this.currencyItemService.setComponentInited(!1),this.currencyItemService.setCurrencyItemsWrapperCmpRef(void 0),this.walletSubscription&&this.walletSubscription.unsubscribe()}navigateToShop(e,i=e){const r=-1!==this.router.url.indexOf("shop")?{replaceUrl:!0}:{},s="".concat(Ai).concat(this.constants.defaultLoggedRoute,"/shop/currency");if(-1!==this.router.url.indexOf("shop")&&-1!==this.router.url.indexOf(this.userProps.profile.id))return;this.router.navigate([{outlets:{[Fn]:s}}],r),this.contextTreeService.setContext(i);const a=new aa.DefaultEvent(Nn.Navigation,"shop:myProfile",{label:this.contextTreeService.getContext(i)});this.analyticsTrackingService.sendEvent(a)}onAnimationStart(e){this.setIsShownOverAll(!0,e),this.currencyWrapperRef.nativeElement.parentElement.classList.add("show-over-all"),this.cdr.detectChanges()}onAnimationEnd(){Date.now()-this.targetTimeStamp>=0?(this.isShownOverAll=!1,this.currencyWrapperRef.nativeElement.parentElement.classList.remove("show-over-all"),this.cdr.detectChanges()):this.setAnimationEndTimeout(this.targetTimeStamp-Date.now())}setAnimationEndTimeout(e){clearTimeout(this.timeout),e>0&&(this.timeout=setTimeout(()=>{this.onAnimationEnd()},e))}setIsShownOverAll(e,i){if(i){const s=Date.now()+i;s>this.targetTimeStamp&&(this.targetTimeStamp=s,this.setAnimationEndTimeout(this.targetTimeStamp-Date.now()))}e&&!this.isShownOverAll&&(this.currencyWrapperRef.nativeElement.parentElement.classList.add("show-over-all"),this.isShownOverAll=!0),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Go),g(on),g(Ri),g(yi),g(nn),g($k),g(J),g(tn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["currency-items-wrapper"]],viewQuery:function(e,i){if(1&e&&($e(pft,7),$e(hft,7),$e(mft,5,$t)),2&e){let r;je(r=He())&&(i.chipsCurrencyItem=r.first),je(r=He())&&(i.gemsCurrencyItem=r.first),je(r=He())&&(i.currencyWrapperRef=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("",o),deps:[[new jo,new zo,nn]]},yi])],decls:6,vars:9,consts:[[1,"ciw__container--currencies",3,"ngClass"],["currencyWrapper",""],[3,"type","currencyValue","inCurrencyWrapper","onClick","animationStart","animationEnd"],["gemsCurrencyItem",""],["chipsCurrencyItem",""]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"currency-item",2,3),Y("onClick",function(){return i.navigateToShop("gems","gems")})("animationStart",function(s){return i.onAnimationStart(s)})("animationEnd",function(){return i.onAnimationEnd()}),m(),p(4,"currency-item",2,4),Y("onClick",function(){return i.navigateToShop("currency","currency")})("animationStart",function(s){return i.onAnimationStart(s)})("animationEnd",function(){return i.onAnimationEnd()}),m()()),2&e&&(l("ngClass",ne(7,fft,i.isShownOverAll)),d(2),l("type",i.ECurrencyType.Gems)("currencyValue",i.gemsCurrencyValue)("inCurrencyWrapper",!0),d(2),l("type",i.ECurrencyType.Chips)("currencyValue",i.chipsCurrencyValue)("inCurrencyWrapper",!0))},dependencies:[Xe,Sz],styles:[".show-over-all[_nghost-%COMP%]{z-index:999999}.ciw__container--currencies[_ngcontent-%COMP%]{width:calc(100% - 4rem)}@media only screen and (max-width: 768px){.ciw__container--currencies[_ngcontent-%COMP%]{width:calc(100% - 3rem)}}.ciw__container--plus-sign[_ngcontent-%COMP%]{width:4rem;font-size:4rem}@media only screen and (max-width: 768px){.ciw__container--plus-sign[_ngcontent-%COMP%]{width:3rem;font-size:3rem}}@media only screen and (max-width: 480px){.ciw__container--plus-sign[_ngcontent-%COMP%]{font-size:2.4rem!important}}"],changeDetection:0}),n})(),vv=(()=>{var t;class n{constructor(e){this.photoFitType=n.EPhotoFitType.None,this.cdr=e,e.detach()}ngOnChanges(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["photo-content"]],inputs:{url:"url",photoFitType:"photoFitType"},features:[it],decls:2,vars:2,consts:[[1,"photo-content-img__wrapper"],["empty-placeholder","",1,"photo-content-img",3,"ngClass","imgSrc"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"img",1),m()),2&e&&(d(),l("ngClass",i.photoFitType)("imgSrc",i.url))},dependencies:[Xe,$o],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.photo-content-img__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;overflow:hidden}.photo-content-img[_ngcontent-%COMP%]{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;pointer-events:none}.photo-content-img.contain[_ngcontent-%COMP%]{max-width:10%;max-height:10%;top:50%;left:50%;transform:translate(-50%,-50%) scale(10)}.photo-content-img.cover[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}"],changeDetection:0}),n})();function gft(t,n){if(1&t){const o=Ce();p(0,"photo-content",5),Y("click",function(){return oe(o),re(_().openPhoto())}),m()}if(2&t){const o=_();l("url",o.url)("photoFitType",o.photoFitType)}}function _ft(t,n){1&t&&(p(0,"div",6),yo(1),m())}!function(t){let n;var o;(o=n=t.EPhotoFitType||(t.EPhotoFitType={})).None="none",o.Contain="contain",o.Cover="cover"}(vv||(vv={}));const vft=t=>({locked:t});function bft(t,n){if(1&t&&B(0,"div",7),2&t){const o=_();l("ngClass",ne(1,vft,o.isLocked))}}function Cft(t,n){if(1&t){const o=Ce();p(0,"div",8),Y("click",function(){return oe(o),re(_().openPhoto())}),B(1,"div",9),m()}}const yft=t=>({placeholder:t}),Sft=["*"];let xL=(()=>{var t;class n{constructor(e){this.photoFitType=vv.EPhotoFitType.Cover,this.isPlaceholder=!1,this.isLocked=!1,this.open=new ke,this.cdr=e,e.detach()}ngOnInit(){this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}openPhoto(){this.open.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["photo-component"]],inputs:{url:"url",photoFitType:"photoFitType",isPlaceholder:"isPlaceholder",isLocked:"isLocked"},outputs:{open:"open"},features:[it],ngContentSelectors:Sft,decls:5,vars:7,consts:[[1,"photo__container--single-photo",3,"ngClass"],["click-feedback","",3,"url","photoFitType","click",4,"ngIf"],["class","photo__container--image-cover",4,"ngIf"],["class","photo__image--placeholder",3,"ngClass",4,"ngIf"],["class","photo__locked-tint","data-cy","galleryPreviewLockedPhotoTint",3,"click",4,"ngIf"],["click-feedback","",3,"url","photoFitType","click"],[1,"photo__container--image-cover"],[1,"photo__image--placeholder",3,"ngClass"],["data-cy","galleryPreviewLockedPhotoTint",1,"photo__locked-tint",3,"click"],["data-cy","galleryPreviewLockedPhotoImage",1,"photo__locked-img"]],template:function(e,i){1&e&&(Co(),p(0,"div",0),U(1,gft,1,2,"photo-content",1)(2,_ft,2,0,"div",2)(3,bft,1,3,"div",3)(4,Cft,2,0,"div",4),m()),2&e&&(l("ngClass",ne(5,yft,i.isPlaceholder)),d(),l("ngIf",!i.isPlaceholder),d(),l("ngIf",!i.isPlaceholder),d(),l("ngIf",i.isPlaceholder),d(),l("ngIf",i.isLocked&&!i.isPlaceholder))},dependencies:[Xe,Ne,po,vv],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.photo__image--placeholder[_ngcontent-%COMP%]{width:100%;height:100%}.photo__container--single-photo[_ngcontent-%COMP%]{position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:.8rem}.photo__container--single-photo.hidden[_ngcontent-%COMP%]{display:none}.photo__container--single-photo[_ngcontent-%COMP%]:hover{cursor:pointer}.photo__container--single-photo.placeholder[_ngcontent-%COMP%]:hover{cursor:initial}.photo__container--image-cover[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%}.photo__locked-tint[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;width:110%;height:110%;transform:translate(-50%) translateY(-50%);border-radius:.8rem;z-index:10}.photo__locked-img[_ngcontent-%COMP%]{width:89%;height:89%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.8}"],changeDetection:0}),n})();var ir=function(t){return t.GiftBack="giftBack",t.Share="share",t.InviteFriend="inviteFr",t.AcceptFriendRequest="acceptFrRequest",t.LikeBack="likeBack",t.NavigateToShop="navigateToShop",t.OpenFreeRewards="openFreeRewards",t.SpectateGame="spectateGame",t.PrivateChat="privateChat",t.AcceptClubInvite="acceptClubInvite",t.RejectClubInvite="rejectClubInvite",t.ClubChat="openClubChat",t.NavigateCashback="navigateToCashback",t}(ir||{}),ep=ve.EIcons,tp=ve.EButtonModifier;const wft=t=>({"small-size":t}),Tft=t=>({name:t});function Pft(t,n){if(1&t){const o=Ce();p(0,"button-icon",1),Y("onClick",function(){const r=oe(o).$implicit;return re(_().executeAction(r.action))})("onDisabledClick",function(){const r=oe(o).$implicit;return re(_().executeDisabledClick(r.action))}),m()}if(2&t){const o=n.$implicit,e=_();l("ngClass",ne(5,wft,e.smallSizedButtons))("buttonModifier",o.buttonModifier)("icon",ne(7,Tft,o.icon))("disabled",e.actionInProgress||o.disabled),Hn("data-cy2","action_"+o.action.type)}}let FC=(()=>{var t;class n{constructor(e){this.buttons=[],this.actionInProgress=!1,this.changeDetRef=e,this.actionDone=new ke}ngOnInit(){var e=this;this.notification.actions.forEach(function(){var i=f(function*(r,s){const a=yield e.getButtonParams(r);e.buttons.push(a),e.notification.actions.length===s+1&&e.detectChanges()});return function(r,s){return i.apply(this,arguments)}}())}executeAction(e){var i=this;return f(function*(){try{i.actionInProgress=!0,i.detectChanges(),yield e.action(),i.actionDone.emit(e)}catch(r){console.warn(r)}finally{i.actionInProgress=!1,i.detectChanges()}})()}executeDisabledClick(e){e.disabledClick&&e.disabledClick()}getButtonParams(e){return f(function*(){switch(e.type){case ir.GiftBack:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ACTION,icon:ep.GIFT_NEW,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.Share:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_FB,icon:ep.FACEBOOK_LOGO,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.InviteFriend:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ATTENTION,icon:ep.INVITE_FRIENDS,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.AcceptFriendRequest:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ATTENTION,icon:ep.CHECK,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.LikeBack:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_NEGATIVE,icon:ep.HEART_HOLLOW,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.NavigateToShop:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ACTION,icon:ep.CHECK,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.OpenFreeRewards:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ACCENT,icon:ep.CHEST_NEW_OPEN,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.SpectateGame:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ACTION,icon:ep.EYE,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.PrivateChat:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ACTION,icon:ep.MESSAGE,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.AcceptClubInvite:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ATTENTION,icon:ep.CHECK,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.RejectClubInvite:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_NEGATIVE,icon:ep.CLOSE,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});case ir.ClubChat:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_LIGHT,icon:ep.GLOBAL_CHAT,disabled:!!e.disabledCheck&&(yield e.disabledCheck())});default:return Promise.resolve({action:e,buttonModifier:tp.BUTTON_ATTENTION,icon:ep.STAR_HOLLOW,disabled:!!e.disabledCheck&&(yield e.disabledCheck())})}})()}detectChanges(){this.changeDetRef.destroyed||this.changeDetRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["notifications-buttons"]],inputs:{notification:"notification",smallSizedButtons:"smallSizedButtons"},outputs:{actionDone:"actionDone"},decls:1,vars:1,consts:[["class","notifications-buttons__container--button","data-cy","notificationActionButton",3,"ngClass","buttonModifier","icon","disabled","onClick","onDisabledClick",4,"ngFor","ngForOf"],["data-cy","notificationActionButton",1,"notifications-buttons__container--button",3,"ngClass","buttonModifier","icon","disabled","onClick","onDisabledClick"]],template:function(e,i){1&e&&U(0,Pft,1,9,"button-icon",0),2&e&&l("ngForOf",i.buttons)},dependencies:[Xe,Mt,ei],styles:["[_nghost-%COMP%]{display:flex}.notifications-buttons__container--button[_ngcontent-%COMP%]{margin-right:.5rem}@media only screen and (min-width: 769px){.notifications-buttons__container--button[_ngcontent-%COMP%]{min-width:12rem}}.notifications-buttons__container--button.small-size[_ngcontent-%COMP%]{align-items:flex-start;direction:ltr!important;min-width:5.8rem!important;height:2.5rem!important;min-height:2.5rem!important;font-size:1.8rem!important}@media only screen and (max-width: 380px){.notifications-buttons__container--button.small-size[_ngcontent-%COMP%]{min-width:4.5rem!important}}"],changeDetection:0}),n})();var Ift=ve.EIcons;const Mft=t=>({name:t});let Ez=(()=>{var t;class n{constructor(){this.iconsEnum=Ift,this.onDelete=new ke}deleteNotificationFn(e,i){(i&&i.deleteOnActionDone||e)&&this.onDelete.emit(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["notification-bottom-info"]],inputs:{notification:"notification"},outputs:{onDelete:"onDelete"},decls:8,vars:9,consts:[[1,"notification-bottom-info__container--date"],[1,"notification-bottom-info__text--notification-date"],[1,"notification-bottom-info__container--action-buttons"],[3,"notification","smallSizedButtons","actionDone"],[1,"notification-bottom-info__container--delete-button"],[1,"notification-bottom-info__button--delete-button",3,"bclass","icon","onClick"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"p",1),H(2),V(3,"timeElapsedPipe"),m()(),p(4,"div",2)(5,"notifications-buttons",3),Y("actionDone",function(s){return i.deleteNotificationFn(!1,s)}),m()(),p(6,"div",4)(7,"button-icon",5),Y("onClick",function(){return i.deleteNotificationFn(!0)}),m()()),2&e&&(d(2),se($(3,5,i.notification.createdAt)),d(3),l("notification",i.notification)("smallSizedButtons",!0),d(2),l("bclass","notification-bottom-info__button--delete-button-color")("icon",ne(7,Mft,i.iconsEnum.DELETE)))},dependencies:[FC,ei,Bm],styles:["[_nghost-%COMP%]{width:100%;height:3rem;direction:ltr!important;display:flex;flex-flow:row wrap}.notification-bottom-info__container--date[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;margin:0 1rem}.notification-bottom-info__container--date[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1rem}.notification-bottom-info__container--action-buttons[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:row wrap;justify-content:center;flex:1;direction:ltr!important}.notification-bottom-info__container--delete-button[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:flex-end;margin:0 .5rem}.notification-bottom-info__container--delete-button[_ngcontent-%COMP%]   .notification-bottom-info__button--delete-button[_ngcontent-%COMP%]{min-width:3rem;font-size:1.8rem;margin:0!important}"]}),n})();function Oft(t,n){1&t&&B(0,"loader-image")}const Eft=["*"];let bv=(()=>{var t;class n{constructor(){this.onDelete=new ke}deleteNotification(e){this.onDelete.emit(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["notification-wrapper"]],inputs:{notification:"notification",loaderOn:"loaderOn"},outputs:{onDelete:"onDelete"},ngContentSelectors:Eft,decls:6,vars:3,consts:[[1,"notification-wrapper__wrapper"],[1,"notification-wrapper__container--main",3,"ngClass"],[4,"ngIf"],[1,"notification-wrapper__container--upper-part"],[3,"notification","onDelete"]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"div",1),U(2,Oft,1,0,"loader-image",2),p(3,"div",3),yo(4),m(),p(5,"notification-bottom-info",4),Y("onDelete",function(s){return i.deleteNotification(s)}),m()()()),2&e&&(d(),l("ngClass",i.notification.group.toString().toLowerCase()+" "+(i.notification.read?"":"highlighted")),d(),l("ngIf",i.loaderOn),d(3),l("notification",i.notification))},dependencies:[Xe,Ne,Ez,Oi],styles:["[_nghost-%COMP%]{width:100%}.notification-wrapper__wrapper[_ngcontent-%COMP%]{width:100%;height:13rem;direction:ltr!important;padding:.5rem}.notification-wrapper__container--main[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-flow:column nowrap}.notification-wrapper__container--upper-part[_ngcontent-%COMP%]{width:100%;height:calc(100% - 3rem);direction:ltr!important;display:flex;flex-flow:row wrap}"]}),n})();function xft(t,n){if(1&t&&(p(0,"div",11),B(1,"p",12),V(2,"safeHtml"),m()),2&t){const o=_();d(),l("innerHtml",$(2,1,o.notificationData.text.title),Yn)}}let Mg=(()=>{var t;class n extends CC{constructor(e,i){super(e,i),this.notificationsService=e,this.changeDetRef=i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["avatar-image-notification"]],features:[Ht],decls:13,vars:13,consts:[[3,"notification","loaderOn","onDelete"],[1,"avatar-image-notification__container--avatar"],[1,"avatar-image-notification__container--avatar-inner"],[3,"isLink","user","hasUsername"],[1,"avatar-image-notification__container--title-and-info"],["class","avatar-image-notification__container--title",4,"ngIf"],[1,"avatar-image-notification__container--info"],[1,"avatar-image-notification__text--notification-info",3,"innerHTML"],[1,"avatar-image-notification__container--image-circle"],[1,"avatar-image-notification__container--image-circle-inner"],["empty-placeholder","",1,"avatar-image-notification__image--notification-image",3,"imgSrc"],[1,"avatar-image-notification__container--title"],[1,"avatar-image-notification__text--sender-title",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"notification-wrapper",0),Y("onDelete",function(s){return i.delete(i.notificationData,s)}),p(1,"div",1)(2,"div",2),B(3,"avatar",3),m()(),p(4,"div",4),U(5,xft,3,3,"div",5),p(6,"div",6),B(7,"div",7),V(8,"safeHtml"),V(9,"translate"),m()(),p(10,"div",8)(11,"div",9),B(12,"img",10),m()()()),2&e&&(l("notification",i.notificationData)("loaderOn",i.actionInProgress),d(3),l("isLink",!0)("user",i.notificationData.senderProfile)("hasUsername",!1),d(2),l("ngIf",i.notificationData.text.title),d(2),l("innerHTML",$(8,8,yt(9,10,i.notificationData.text.key,i.notificationData.text.params)),Yn),d(5),l("imgSrc",i.notificationData.image))},dependencies:[Ne,Bo,bv,$o,qe,Ta],styles:[".avatar-image-notification__container--avatar[_ngcontent-%COMP%]{width:7rem;direction:ltr!important;height:100%;display:flex;justify-content:center;align-items:center}.avatar-image-notification__container--avatar-inner[_ngcontent-%COMP%]{width:5rem;height:5rem;direction:ltr!important}.avatar-image-notification__container--title-and-info[_ngcontent-%COMP%]{flex:1;height:100%;display:flex;flex-flow:column nowrap;justify-content:center}.avatar-image-notification__container--title[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end;direction:ltr!important;margin:.2rem 0}.avatar-image-notification__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1;font-size:1.4rem}.avatar-image-notification__container--info[_ngcontent-%COMP%]{width:100%;direction:ltr!important}.avatar-image-notification__container--info[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:.2rem}.avatar-image-notification__container--image-circle[_ngcontent-%COMP%]{width:9rem;align-items:center;direction:ltr!important;height:100%;display:flex;justify-content:center}.avatar-image-notification__container--image-circle-inner[_ngcontent-%COMP%]{width:6rem;height:6rem;direction:ltr!important;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.avatar-image-notification__container--image-circle-inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;border-radius:25%;transform:translateZ(0)}"]}),n})();function Aft(t,n){if(1&t&&(p(0,"p",12),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se(yt(2,1,o.notificationData.text.title.key,o.notificationData.text.title.params))}}function Rft(t,n){1&t&&(B(0,"p",13),V(1,"safeHtml")),2&t&&l("innerHTML",$(1,1,_(2).notificationData.text.title),Yn)}function kft(t,n){if(1&t&&(p(0,"div",9),U(1,Aft,3,4,"p",10)(2,Rft,2,3,"p",11),m()),2&t){const o=_();d(),l("ngIf",o.isTranslatableText(o.notificationData.text.title)),d(),l("ngIf",!o.isTranslatableText(o.notificationData.text.title))}}function Lft(t,n){if(1&t&&(B(0,"div",14),V(1,"safeHtml"),V(2,"translate")),2&t){const o=_();l("innerHTML",$(1,1,yt(2,3,o.notificationData.text.key,o.getContentTranslation())),Yn)}}function Dft(t,n){if(1&t&&B(0,"currency-component",17),2&t){const o=_(2);l("currency",o.currencyType.Chips)("value",o.notificationData.notificationData.reward.chips)}}function Bft(t,n){if(1&t&&B(0,"currency-component",17),2&t){const o=_(2);l("currency",o.currencyType.Gems)("value",o.notificationData.notificationData.reward.gems)}}function Nft(t,n){if(1&t&&(p(0,"div",15)(1,"span"),H(2),m(),p(3,"span"),H(4),m(),p(5,"span"),U(6,Dft,1,2,"currency-component",16)(7,Bft,1,2,"currency-component",16),m()()),2&t){const o=_();l("key",o.notificationData.text.key),d(2),se(o.getNotificationTitle(o.notificationData.notificationData.title)),d(2),se(o.notificationData.notificationData.reward.place),d(2),l("ngIf",o.notificationData.notificationData.reward.chips),d(),l("ngIf",o.notificationData.notificationData.reward.gems)}}let pl=(()=>{var t;class n extends CC{constructor(e,i,r,s){super(e,i),this.notificationsService=e,this.changeDetRef=i,this.translationService=r,this.translatePipe=s,this.ETypes=rt,this.currencyType=ln}getContentTranslation(){if(this.notificationData.notificationType!==rt.RefundUnclaimedPot)return this.notificationData.text.params;const e=this.notificationData.text.params[0];let i=[];switch(this.notificationData.text.params[1]){case ln.Chips:i=[this.translatePipe.transform("SHOP.ITEMS.CHIP_PACKS",[e])];break;case ln.Gems:i=[this.translatePipe.transform("SHOP.ITEMS.GEM_PACKS",[e])];break;default:i=[this.translatePipe.transform("SHOP.ITEMS.CHIP_PACKS",[e])]}return i}getNotificationTitle(e){return this.translationService.readTranslation(e.title)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(Re),g(pi),g(qe))},t.\u0275cmp=pe({type:t,selectors:[["image-notification"]],features:[Ht],decls:9,vars:6,consts:[[3,"notification","loaderOn","onDelete"],[1,"image-notification__container--avatar"],[1,"image-notification__container--inner"],["empty-placeholder","",1,"notification-box__image",3,"imgSrc"],[1,"image-notification__container--title-and-info"],["class","image-notification__container--title",4,"ngIf"],[1,"image-notification__container--info"],["class","image-notification__text--notification-info",3,"innerHTML",4,"ngIf"],["text-with-placeholders","",3,"key",4,"ngIf"],[1,"image-notification__container--title"],["class","image-notification__text--sender-title",4,"ngIf"],["class","image-notification__text--sender-title",3,"innerHTML",4,"ngIf"],[1,"image-notification__text--sender-title"],[1,"image-notification__text--sender-title",3,"innerHTML"],[1,"image-notification__text--notification-info",3,"innerHTML"],["text-with-placeholders","",3,"key"],["class","image-notification__reward",3,"currency","value",4,"ngIf"],[1,"image-notification__reward",3,"currency","value"]],template:function(e,i){1&e&&(p(0,"notification-wrapper",0),Y("onDelete",function(s){return i.delete(i.notificationData,s)}),p(1,"div",1)(2,"div",2),B(3,"img",3),m()(),p(4,"div",4),U(5,kft,3,2,"div",5),p(6,"div",6),U(7,Lft,3,6,"div",7),m(),U(8,Nft,8,5,"div",8),m()()),2&e&&(l("notification",i.notificationData)("loaderOn",i.actionInProgress),d(3),l("imgSrc",i.notificationData.image),d(2),l("ngIf",i.notificationData.text.title),d(2),l("ngIf",i.notificationData.notificationType!==i.ETypes.PromoTournamentRewardAvailable),d(),l("ngIf",i.notificationData.notificationType===i.ETypes.PromoTournamentRewardAvailable))},dependencies:[Ne,oc,bv,So,$o,qe,Ta],styles:[".image-notification__container--avatar[_ngcontent-%COMP%]{width:10rem;direction:ltr!important;height:100%;display:flex;justify-content:center;align-items:center}.image-notification__container--inner[_ngcontent-%COMP%]{width:7rem;height:7rem;display:flex;align-items:center;direction:ltr!important}.image-notification__container--inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-height:7rem;width:100%;margin-top:.8rem}.image-notification__container--title-and-info[_ngcontent-%COMP%]{flex:1;height:100%;display:flex;flex-flow:column nowrap;justify-content:center}.image-notification__container--title[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end;direction:ltr!important;margin:.2rem 0}.image-notification__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1;font-size:1.4rem}.image-notification__container--info[_ngcontent-%COMP%]{width:100%;direction:ltr!important}.image-notification__container--info[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:2.2rem}.image-notification__container--image-circle[_ngcontent-%COMP%]{width:9rem;align-items:flex-end;direction:ltr!important;height:100%;display:flex;justify-content:center}.image-notification__container--image-circle-inner[_ngcontent-%COMP%]{width:6rem;height:6rem;direction:ltr!important;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.image-notification__container--image-circle-inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;border-radius:25%;transform:translateZ(0)}"]}),n})();function Fft(t,n){if(1&t&&(p(0,"div",8),B(1,"p",9),V(2,"safeHtml"),m()),2&t){const o=_();d(),l("innerHTML",$(2,1,o.notificationData.text.title),Yn)}}let xz=(()=>{var t;class n extends CC{constructor(e,i){super(e,i),this.notificationsService=e,this.changeDetRef=i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["avatar-notification"]],features:[Ht],decls:10,vars:12,consts:[[3,"notification","loaderOn","onDelete"],[1,"avatar-notification__container--avatar"],[1,"avatar-notification__container--avatar-inner"],[3,"isLink","user","hasUsername"],[1,"avatar-notification__container--title-and-info"],["class","avatar-notification__container--title",4,"ngIf"],[1,"avatar-notification__container--info"],[1,"avatar-notification__text--notification-info",3,"innerHTML"],[1,"avatar-notification__container--title"],[1,"avatar-notification__text--sender-title",3,"innerHTML"]],template:function(e,i){1&e&&(p(0,"notification-wrapper",0),Y("onDelete",function(s){return i.delete(i.notificationData,s)}),p(1,"div",1)(2,"div",2),B(3,"avatar",3),m()(),p(4,"div",4),U(5,Fft,3,3,"div",5),p(6,"div",6),B(7,"div",7),V(8,"safeHtml"),V(9,"translate"),m()()()),2&e&&(l("notification",i.notificationData)("loaderOn",i.actionInProgress),d(3),l("isLink",!0)("user",i.notificationData.senderProfile)("hasUsername",!1),d(2),l("ngIf",i.notificationData.text.title),d(2),l("innerHTML",$(8,7,yt(9,9,i.notificationData.text.key,i.notificationData.text.params)),Yn))},dependencies:[Ne,Bo,bv,qe,Ta],styles:[".avatar-notification__container--avatar[_ngcontent-%COMP%]{width:7rem;direction:ltr!important;height:100%;display:flex;justify-content:center;align-items:center}.avatar-notification__container--avatar-inner[_ngcontent-%COMP%]{width:5rem;height:5rem;direction:ltr!important}.avatar-notification__container--title-and-info[_ngcontent-%COMP%]{flex:1;height:100%;display:flex;flex-flow:column nowrap;justify-content:center}.avatar-notification__container--title[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end;direction:ltr!important;margin:.2rem 0}.avatar-notification__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1;font-size:1.4rem}.avatar-notification__container--info[_ngcontent-%COMP%]{width:100%;direction:ltr!important}.avatar-notification__container--info[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:.2rem}.avatar-notification__container--image-circle[_ngcontent-%COMP%]{width:9rem;align-items:flex-end;direction:ltr!important;height:100%;display:flex;justify-content:center}"]}),n})();function Uft(t,n){if(1&t&&(p(0,"div",8),B(1,"p",9),V(2,"safeHtml"),m()),2&t){const o=_();d(),l("innerHTML",$(2,1,o.notificationData.text.title),Yn)}}const Gft=t=>({vipPackage:t});let Az=(()=>{var t;class n extends CC{constructor(e,i){super(e,i),this.notificationsService=e,this.changeDetRef=i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["item-purchase-notification"]],features:[Ht],decls:10,vars:13,consts:[[3,"notification","loaderOn","onDelete"],[1,"item-purchase-notification__container--avatar"],[1,"item-purchase-notification__container--inner"],["empty-placeholder","",1,"notification-box__image",3,"ngClass","imgSrc"],[1,"item-purchase-notification__container--title-and-info"],["class","item-purchase-notification__container--title",4,"ngIf"],[1,"item-purchase-notification__container--info"],[1,"item-purchase-notification__text--notification-info",3,"innerHTML"],[1,"item-purchase-notification__container--title"],[1,"item-purchase-notification__text--sender-title",3,"innerHTML"]],template:function(e,i){1&e&&(p(0,"notification-wrapper",0),Y("onDelete",function(){return i.delete(i.notificationData)}),p(1,"div",1)(2,"div",2),B(3,"img",3),m()(),p(4,"div",4),U(5,Uft,3,3,"div",5),p(6,"div",6),B(7,"div",7),V(8,"safeHtml"),V(9,"translate"),m()()()),2&e&&(l("notification",i.notificationData)("loaderOn",i.actionInProgress),d(3),l("ngClass",ne(11,Gft,-1!==i.notificationData.image.indexOf("vip12")))("imgSrc",i.notificationData.image),d(2),l("ngIf",i.notificationData.text.title),d(2),l("innerHTML",$(8,6,yt(9,8,i.notificationData.text.key,i.notificationData.text.params)),Yn))},dependencies:[Xe,Ne,bv,$o,qe,Ta],styles:[".item-purchase-notification__container--avatar[_ngcontent-%COMP%]{width:10rem;direction:ltr!important;height:100%;display:flex;justify-content:center;align-items:center}.item-purchase-notification__container--inner[_ngcontent-%COMP%]{width:7rem;height:7rem;display:flex;align-items:center;direction:ltr!important}.item-purchase-notification__container--inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-width:100%;max-height:7rem;margin:0 auto;margin-top:.8rem}.item-purchase-notification__container--inner[_ngcontent-%COMP%] > img.vipPackage[_ngcontent-%COMP%]{height:auto;width:100%}.item-purchase-notification__container--title-and-info[_ngcontent-%COMP%]{flex:1;height:100%;display:flex;flex-flow:column nowrap;justify-content:center}.item-purchase-notification__container--title[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end;direction:ltr!important;margin:.2rem 0}.item-purchase-notification__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1;font-size:1.4rem}.item-purchase-notification__container--info[_ngcontent-%COMP%]{width:100%;direction:ltr!important}.item-purchase-notification__container--info[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:2.2rem}.item-purchase-notification__container--image-circle[_ngcontent-%COMP%]{width:9rem;align-items:flex-end;direction:ltr!important;height:100%;display:flex;justify-content:center}.item-purchase-notification__container--image-circle-inner[_ngcontent-%COMP%]{width:6rem;height:6rem;direction:ltr!important;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.item-purchase-notification__container--image-circle-inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;border-radius:25%;transform:translateZ(0)}"]}),n})();const Vft=()=>[200,1e3];function zft(t,n){1&t&&B(0,"bling-bling",4),2&t&&l("startDelay",pt(1,Vft))}function jft(t,n){if(1&t&&B(0,"currency-component",11),2&t){const o=_(3);l("currency",o.showChips?o.currencyType.Chips:o.currencyType.Gems)("value",o.value)}}function Hft(t,n){if(1&t&&(p(0,"span",12),H(1),m()),2&t){const o=_(3);d(),se(o.value)}}function qft(t,n){if(1&t&&U(0,jft,1,2,"currency-component",9)(1,Hft,2,1,"span",10),2&t){const o=_(2);l("ngIf",o.showChips||o.showGems),d(),l("ngIf",!o.showChips&&!o.showGems)}}function Wft(t,n){1&t&&Un(0)}function $ft(t,n){if(1&t&&(Tn(0),U(1,Wft,1,0,"ng-container",13),Pn()),2&t){_();const o=Kt(2);d(),l("ngTemplateOutlet",o)}}function Kft(t,n){1&t&&Un(0)}const Zft=t=>({"item-box__value-for-translatable-value":t});function Qft(t,n){if(1&t&&(p(0,"span",16),H(1),V(2,"translate"),m()),2&t){const o=_(3);l("ngClass",ne(4,Zft,o.valueForTranslate&&o.item.type!=o.EItemType.XpPack)),d(),ze(" ",$(2,2,o.value.key),"")}}const Yft=(t,n)=>({"item-box__item-label-for-frame":t,"item-box__item-label-for-deck":n});function Jft(t,n){if(1&t&&(p(0,"item-label-component",14),U(1,Kft,1,0,"ng-container",13)(2,Qft,3,6,"span",15),m()),2&t){_();const o=Kt(2),e=_();l("ngClass",cn(4,Yft,e.item.type===e.EItemType.Frame,e.item.type===e.EItemType.Deck))("customClass","item-box__label-with-elevated-price"),d(),l("ngTemplateOutlet",o),d(),l("ngIf",e.isTranslatableText(e.value))}}function Xft(t,n){if(1&t&&(p(0,"div",5),U(1,qft,2,2,"ng-template",null,6,ft)(3,$ft,2,1,"ng-container",7)(4,Jft,3,7,"item-label-component",8),m()),2&t){const o=_();d(3),l("ngIf",o.stylePreset===o.EStyle.Normal),d(),l("ngIf",o.stylePreset===o.EStyle.WithElevatedPrice)}}const egt=t=>({"item-box__frame-img":t});let Zh=(()=>{var t;class n{constructor(e,i,r){this.urlService=e,this.timeLeftPipe=i,this.showBling=!0,this.stylePreset=n.EStyle.Normal,this.needToTranslateValue=!1,this.currencyType=ln,this.EStyle=n.EStyle,this.EItemType=Fe.TG}ngOnChanges(e){this.imageUrl=this.urlService.getShopItemPreviewUrl(this.item),this.value=this.getValue(),this.item?(this.showChips=this.item.type===Fe.TG.ChipPack,this.showGems=this.item.type===Fe.TG.GemsPack):(this.showChips=!1,this.showGems=!1)}getValue(){if(this.item)return this.item.lifeTime?this.timeLeftPipe.transform(this.item.lifeTime):this.item.amount?this.item.amount:(this.needToTranslateValue=!0,this.item.type===Fe.TG.Frame?{key:"SHOP.ITEMS.".concat(this.item.type,".shortTitle")}:this.item.type===Fe.TG.XpPack?{key:"SHOP.ITEMS.".concat(this.item.id,".title")}:{key:"SHOP.ITEMS.".concat(this.item.type,".title")})}isTranslatableText(e){return"object"==typeof e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qm),g(Ps),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["item-component"]],hostAttrs:[1,"item-component"],inputs:{item:"item",previewUrl:"previewUrl",customClass:"customClass",showBling:"showBling",stylePreset:"stylePreset"},features:[it],decls:5,vars:9,consts:[[1,"item-box__image-wrapper",3,"ngClass"],[1,"item-box__image",3,"src"],["class","item-bling",3,"startDelay",4,"ngIf"],["class","item-box__value-wrapper",4,"ngIf"],[1,"item-bling",3,"startDelay"],[1,"item-box__value-wrapper"],["currencyTemplate",""],[4,"ngIf"],["class","item-box__item-label",3,"ngClass","customClass",4,"ngIf"],["class","item-box__value",3,"currency","value",4,"ngIf"],["class","item-box__value",4,"ngIf"],[1,"item-box__value",3,"currency","value"],[1,"item-box__value"],[4,"ngTemplateOutlet"],[1,"item-box__item-label",3,"ngClass","customClass"],["class","item-box__value",3,"ngClass",4,"ngIf"],[1,"item-box__value",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div")(1,"div",0),B(2,"img",1),U(3,zft,1,2,"bling-bling",2),m(),U(4,Xft,5,2,"div",3),m()),2&e&&(ni("item-box__container ",i.customClass,""),d(),l("ngClass",ne(7,egt,i.item.type===i.EItemType.Frame)),d(),l("src",i.imageUrl,Wn),d(),l("ngIf",i.showBling),d(),l("ngIf",i.value))},dependencies:[Xe,Ne,qr,So,dC,Ym,qe],styles:["[_nghost-%COMP%]{min-width:8rem;margin:1.5%}.item-box__container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:space-between;align-items:center;flex-flow:column nowrap;overflow:hidden;width:100%;height:100%}.item-box__image-wrapper[_ngcontent-%COMP%]{max-width:100%;display:flex;justify-content:center;align-items:center}.item-box__image[_ngcontent-%COMP%]{max-width:100%}.item-box__value[_ngcontent-%COMP%]{font-size:inherit}.item-bling[_ngcontent-%COMP%]{position:absolute;width:45%;height:45%}.item-box__value-wrapper[_ngcontent-%COMP%]{width:100%;text-align:center}.item-box__item-label[_ngcontent-%COMP%]{width:80%;margin:0 auto}@media screen and (max-width: 440px){.item-box__item-label[_ngcontent-%COMP%]{width:85%}}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EStyle||(t.EStyle={})).Normal="normal",o.WithElevatedPrice="withElevatedPrice"}(Zh||(Zh={}));var tgt=ve.EIcons;function ngt(t,n){if(1&t&&(p(0,"div",4),B(1,"img",5),m()),2&t){const o=_();d(),l("src",o.imageUrl,Wn)}}function igt(t,n){if(1&t&&(p(0,"div",6),B(1,"icon-component",7),m()),2&t){const o=_();d(),l("icon",o.iconNames.XP_ICON)}}function ogt(t,n){if(1&t&&B(0,"currency-component",11),2&t){const o=_(2);l("currency",o.showChips?o.currencyType.Chips:o.currencyType.Gems)("value",o.value)}}function rgt(t,n){if(1&t&&(p(0,"span",12),H(1),m()),2&t){const o=_(2);d(),se(o.value)}}function sgt(t,n){if(1&t&&(p(0,"div",8),U(1,ogt,1,2,"currency-component",9)(2,rgt,2,1,"span",10),m()),2&t){const o=_();d(),l("ngIf",o.showChips||o.showGems),d(),l("ngIf",!o.showChips&&!o.showGems)}}let Rz=(()=>{var t;class n extends Zh{constructor(e,i,r){super(e,i,r),this.currencyType=ln,this.iconNames=tgt}ngOnChanges(e){super.ngOnChanges(e),this.item&&(this.showXp=this.item.type===Fe.TG.Xp)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qm),g(Ps),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["item-small"]],hostAttrs:[1,"item-small-component"],features:[Ht,it],decls:4,vars:3,consts:[[1,"item-small-box__container"],["class","item-small-box__image-wrapper",4,"ngIf"],["class","item-small-box__xp-item__container",4,"ngIf"],["class","item-small-box__value-wrapper","data-cy","smallItemValue",4,"ngIf"],[1,"item-small-box__image-wrapper"],["data-cy","smallItemImage",1,"item-small-box__image",3,"src"],[1,"item-small-box__xp-item__container"],[1,"item-small-box__xp-item",3,"icon"],["data-cy","smallItemValue",1,"item-small-box__value-wrapper"],["class","item-small-box__value",3,"currency","value",4,"ngIf"],["class","item-small-box__value",4,"ngIf"],[1,"item-small-box__value",3,"currency","value"],[1,"item-small-box__value"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,ngt,2,1,"div",1)(2,igt,2,1,"div",2)(3,sgt,3,2,"div",3),m()),2&e&&(d(),l("ngIf",!i.showChips&&!i.showGems&&!i.showXp),d(),l("ngIf",i.showXp),d(),l("ngIf",i.value))},dependencies:[Ne,Dn,So],styles:[".item-small-box__container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-flow:row nowrap;overflow:hidden;width:100%;height:100%}.item-small-box__image-wrapper[_ngcontent-%COMP%]{width:2rem;max-width:100%;height:2rem;display:flex;justify-content:center;margin-right:.2rem;align-items:center}.item-small-box__image[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.item-small-box__value-wrapper[_ngcontent-%COMP%]{text-align:center}.item-small-box__value[_ngcontent-%COMP%]{font-size:inherit}.item-small-box__xp-item[_ngcontent-%COMP%]{margin-right:.3rem}"],changeDetection:0}),n})();function agt(t,n){if(1&t&&B(0,"currency-component",3),2&t){const o=_();l("currency",o.showChips?o.currencyType.Chips:o.currencyType.Gems)("value",o.showChips?o.reward.chips:o.reward.gems)}}function cgt(t,n){1&t&&B(0,"item-small",4),2&t&&l("item",n.$implicit)}let cu=(()=>{var t;class n{constructor(){this.currencyType=ln}ngOnChanges(e){this.showGems=this.reward&&this.reward.gems>0,this.showChips=this.reward&&this.reward.chips>0}trackByFn(e,i){return i.id}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["reward-component"]],inputs:{reward:"reward"},features:[it],decls:3,vars:3,consts:[["class","currency__component",3,"currency","value",4,"ngIf"],[1,"reward__container--items"],["class","reward__item--small",3,"item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"currency__component",3,"currency","value"],[1,"reward__item--small",3,"item"]],template:function(e,i){1&e&&(U(0,agt,1,2,"currency-component",0),p(1,"div",1),U(2,cgt,1,1,"item-small",2),m()),2&e&&(l("ngIf",i.showChips||i.showGems),d(2),l("ngForOf",i.reward.items)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Ne,Rz,So],styles:[".currency__component[_ngcontent-%COMP%]{font-size:inherit;direction:ltr;display:inline-block}.reward__container--items[_ngcontent-%COMP%]{display:inline-flex;flex-flow:column nowrap;align-items:flex-start}.reward__item--small[_ngcontent-%COMP%]{display:inline-block}"],changeDetection:0}),n})();function lgt(t,n){if(1&t&&(p(0,"div",8)(1,"p",9),H(2),m()()),2&t){const o=_();d(2),se(o.notificationData.text.title)}}function ugt(t,n){if(1&t&&(p(0,"div",10)(1,"span"),H(2),m(),B(3,"reward-component",11),m()),2&t){const o=_();l("key",o.notificationData.text.key),d(2),se(o.notificationData.text.params.username),d(),l("reward",o.notificationData.text.params.reward)}}function dgt(t,n){if(1&t&&(p(0,"div",10)(1,"span"),H(2),m(),p(3,"span"),H(4),m(),B(5,"reward-component",11),m()),2&t){const o=_();l("key",o.notificationData.text.key),d(2),se(o.notificationData.text.params.username),d(2),se(o.notificationData.text.params.level),d(),l("reward",o.notificationData.notificationData.reward)}}let AL=(()=>{var t;class n extends CC{constructor(e,i){super(e,i),this.notificationsService=e,this.changeDetRef=i,this.notificationTypes=rt}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["invite-notification"]],features:[Ht],decls:9,vars:6,consts:[[3,"notification","loaderOn","onDelete"],[1,"invite-notification__container--avatar"],[1,"invite-notification__container--inner"],["empty-placeholder","",1,"notification-box__image",3,"imgSrc"],[1,"invite-notification__container--title-and-info"],["class","invite-notification__container--title",4,"ngIf"],[1,"invite-notification__container--info"],["class","invite-notification__text--notification-info","text-with-placeholders","",3,"key",4,"ngIf"],[1,"invite-notification__container--title"],[1,"invite-notification__text--sender-title"],["text-with-placeholders","",1,"invite-notification__text--notification-info",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"notification-wrapper",0),Y("onDelete",function(s){return i.delete(i.notificationData,s)}),p(1,"div",1)(2,"div",2),B(3,"img",3),m()(),p(4,"div",4),U(5,lgt,3,1,"div",5),p(6,"div",6),U(7,ugt,4,3,"div",7)(8,dgt,6,4,"div",7),m()()()),2&e&&(l("notification",i.notificationData)("loaderOn",i.actionInProgress),d(3),l("imgSrc",i.notificationData.image),d(2),l("ngIf",i.notificationData.text.title),d(2),l("ngIf",i.notificationData.notificationType===i.notificationTypes.ReceiverInviteAccepted),d(),l("ngIf",i.notificationData.notificationType===i.notificationTypes.InvitationLevelUp))},dependencies:[Ne,oc,bv,cu,$o],styles:[".invite-notification__container--avatar[_ngcontent-%COMP%]{width:10rem;direction:ltr!important;height:100%;display:flex;justify-content:center;align-items:center}.invite-notification__container--inner[_ngcontent-%COMP%]{width:7rem;height:7rem;display:flex;align-items:center;direction:ltr!important}.invite-notification__container--inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:auto;width:100%;margin-top:.8rem}.invite-notification__container--title-and-info[_ngcontent-%COMP%]{flex:1;height:100%;display:flex;flex-flow:column nowrap;justify-content:center}.invite-notification__container--title[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end;direction:ltr!important;margin:.2rem 0}.invite-notification__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1;font-size:1.4rem}.invite-notification__container--info[_ngcontent-%COMP%]{width:100%;direction:ltr!important}.invite-notification__container--info[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:2.2rem}.invite-notification__container--image-circle[_ngcontent-%COMP%]{width:9rem;align-items:flex-end;direction:ltr!important;height:100%;display:flex;justify-content:center}.invite-notification__container--image-circle-inner[_ngcontent-%COMP%]{width:6rem;height:6rem;direction:ltr!important;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.invite-notification__container--image-circle-inner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;border-radius:25%;transform:translateZ(0)}"]}),n})();function pgt(t,n){if(1&t&&B(0,"avatar",10),2&t){const o=_();l("isLink",!0)("user",o.notificationData.senderProfile)("hasUsername",!1)}}const Rve=(t,n,o,e)=>({id:t,avatar:n,level:o,frame:e});function hgt(t,n){if(1&t&&B(0,"club-avatar",11),2&t){const o=_();l("club",xd(1,Rve,o.notificationData.notificationData.club.id,o.notificationData.notificationData.club.avatar,o.notificationData.notificationData.club.level,null==o.notificationData.notificationData.inventory?null:o.notificationData.notificationData.inventory.frame))}}function mgt(t,n){if(1&t&&(p(0,"p",15),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se(yt(2,1,o.notificationData.text.title.key,o.notificationData.text.title.params))}}function fgt(t,n){1&t&&(B(0,"p",16),V(1,"safeHtml")),2&t&&l("innerHTML",$(1,1,_(2).notificationData.text.title),Yn)}function ggt(t,n){if(1&t&&(p(0,"div",12),U(1,mgt,3,4,"p",13)(2,fgt,2,3,"p",14),m()),2&t){const o=_();d(),l("ngIf",o.isTranslatableText(o.notificationData.text.title)),d(),l("ngIf",!o.isTranslatableText(o.notificationData.text.title))}}function _gt(t,n){if(1&t&&(p(0,"div",17),B(1,"club-avatar",18),m()),2&t){const o=_();d(),l("club",xd(1,Rve,o.notificationData.notificationData.club.id,o.notificationData.notificationData.club.avatar,o.notificationData.notificationData.club.level,null==o.notificationData.notificationData.inventory?null:o.notificationData.notificationData.inventory.frame))}}let Cv=(()=>{var t;class n extends CC{constructor(e,i){super(e,i),this.notificationsService=e,this.changeDetRef=i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-notification"]],features:[Ht],decls:12,vars:12,consts:[[3,"notification","loaderOn","onDelete"],[1,"club-notification__container--avatar"],[1,"club-notification__container--avatar-inner"],[3,"isLink","user","hasUsername",4,"ngIf"],["class","club-notification__club-avatar left",3,"club",4,"ngIf"],[1,"club-notification__container--title-and-info"],["class","club-notification__container--title",4,"ngIf"],[1,"club-notification__container--info"],[1,"club-notification__text--notification-info",3,"innerHTML"],["class","club-notification__container--club-avatar",4,"ngIf"],[3,"isLink","user","hasUsername"],[1,"club-notification__club-avatar","left",3,"club"],[1,"club-notification__container--title"],["class","club-notification__text--sender-title",4,"ngIf"],["class","club-notification__text--sender-title",3,"innerHTML",4,"ngIf"],[1,"club-notification__text--sender-title"],[1,"club-notification__text--sender-title",3,"innerHTML"],[1,"club-notification__container--club-avatar"],[1,"club-notification__club-avatar",3,"club"]],template:function(e,i){1&e&&(p(0,"notification-wrapper",0),Y("onDelete",function(s){return i.delete(i.notificationData,s)}),p(1,"div",1)(2,"div",2),U(3,pgt,1,3,"avatar",3)(4,hgt,1,6,"club-avatar",4),m()(),p(5,"div",5),U(6,ggt,3,2,"div",6),p(7,"div",7),B(8,"div",8),V(9,"safeHtml"),V(10,"translate"),m()(),U(11,_gt,2,6,"div",9),m()),2&e&&(l("notification",i.notificationData)("loaderOn",i.actionInProgress),d(3),l("ngIf",i.notificationData.senderProfile),d(),l("ngIf",!i.notificationData.senderProfile&&i.notificationData.notificationData&&i.notificationData.notificationData.club),d(2),l("ngIf",i.notificationData.text.title),d(2),l("innerHTML",$(9,7,yt(10,9,i.notificationData.text.key,i.notificationData.text.params)),Yn),d(3),l("ngIf",i.notificationData.senderProfile&&i.notificationData.notificationData&&i.notificationData.notificationData.club))},dependencies:[Ne,Bo,bv,mf,qe,Ta],styles:[".club-notification__container--avatar[_ngcontent-%COMP%]{width:7rem;direction:ltr!important;height:100%;display:flex;justify-content:center;align-items:center}.club-notification__container--avatar-inner[_ngcontent-%COMP%]{width:5rem;height:5rem;direction:ltr!important}.club-notification__container--title-and-info[_ngcontent-%COMP%]{flex:1;height:100%;display:flex;flex-flow:column nowrap;justify-content:center}.club-notification__container--title[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end;margin:.2rem 0}.club-notification__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1;font-size:1.4rem}.club-notification__container--info[_ngcontent-%COMP%]{width:100%;direction:ltr!important}.club-notification__container--info[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:.2rem}.club-notification__container--club-avatar[_ngcontent-%COMP%]{width:9rem;align-items:flex-end;direction:ltr!important;height:100%;display:flex;justify-content:center}.club-notification__club-avatar[_ngcontent-%COMP%]{width:6rem;height:6rem;direction:ltr!important;overflow:hidden;display:flex;justify-content:center;align-items:center;font-size:.8rem}.club-notification__club-avatar.left[_ngcontent-%COMP%]{width:5rem;height:5rem}"]}),n})();const vgt={[rt.GiftPackageRecieved]:Mg,[rt.GiftSent]:Mg,[rt.LikeRecieved]:Mg,[rt.FriendRequestAccepted]:Mg,[rt.FriendRequestSent]:Mg,[rt.SocialPlatformFriendRegistered]:Mg,[rt.SenderInviteAccepted]:pl,[rt.GameWon]:pl,[rt.TournamentWon]:pl,[rt.RefundTournament]:pl,[rt.RefundUnclaimedPot]:pl,[rt.UserLevelUp]:pl,[rt.AntiChurnReceived]:pl,[rt.GiftPackageSent]:pl,[rt.AdminBonusReceived]:pl,[rt.KnockoutTournamentWon]:pl,[rt.VipFrameUpdate]:pl,[rt.FirstLostGameBonus]:pl,[rt.ClubJoinSuccess]:Mg,[rt.RatingReceived]:xz,[rt.ItemPurchase]:Az,[rt.ReceiverInviteAccepted]:AL,[rt.InvitationLevelUp]:AL,[rt.ClubInvite]:Cv,[rt.ClubDisband]:Cv,[rt.ClubMemberRoleChange]:Cv,[rt.ClubKicked]:Cv,[rt.ClubJoinRequestAccepted]:Cv,[rt.ClubLevelUpReward]:Cv,[rt.PromoTournamentInviteSent]:pl,[rt.CashbackGenerated]:pl,[rt.HostRewardReceived]:pl,[rt.PromoTournamentRewardAvailable]:pl};let kve=(()=>{var t;class n{createNotificationComponent(e,i){const r=vgt[i.notificationType];if(r)return e.createComponent(r);throw new Error("Missing or invalid notification type ".concat(i.notificationType))}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var bgt=ve.EButtonModifier;const Lve=["dropdown"],Cgt=["dynamic"],ygt=()=>({textKey:"NOTIFICATIONS.NO_NOTIFICATIONS"}),Sgt=t=>[t];function wgt(t,n){1&t&&B(0,"empty-content",6),2&t&&l("textArray",ne(3,Sgt,pt(2,ygt)))("noImgFlag",!0)}function Tgt(t,n){1&t&&(p(0,"div",7),B(1,"loader-image",8),m()),2&t&&(d(),l("transparentBG",!0))}function Pgt(t,n){}const Igt=t=>({highlighted:t});function Mgt(t,n){if(1&t&&(p(0,"div",9),U(1,Pgt,0,0,"ng-template",null,10,ft),m()),2&t){const o=n.$implicit;SS("id","notification",n.index,""),l("ngClass",ne(2,Igt,!o.read))}}function Ogt(t,n){if(1&t){const o=Ce();p(0,"div",11),Y("click",function(){return oe(o),re(_().overlayClicked())})("swipeActionUp",function(i){return oe(o),re(_().overlayClicked(i))}),m()}}const Egt=t=>({dropdownOpened:t});var Qh=function(t){return t.In="in",t.Out="out",t}(Qh||{});let RL=(()=>{var t;class n extends Dh{constructor(e,i,r,s,a,c,u,h,b,w,R,G){super(),this.visibleNotifications=[],this.visibleNotificationsCount=0,this.loaderOn=!1,this.dropdownStateType=Qh,this.buttonModifier=bgt,this.isOpened=!1,this.onKeyPress=K=>{this.isOnFocus&&27===K.keyCode&&this.closeNotifDropdown.emit()},this.increaseVisibleNotifications=K=>{let te=K?this.visibleNotifications.length-2:this.visibleNotifications.length-1;this.visibleNotificationsCount+=this.visibleNotificationsStepCount,this.visibleNotificationsCount>this.notifications.length&&(this.visibleNotificationsCount=this.notifications.length);const ee=[];this.visibleNotifications=this.notifications.map(me=>this.notificationFactory.createNotification(me)).toArray().filter((me,ge)=>(me||ee.push(this.notifications.get(ge)),!!me)).slice(0,this.visibleNotificationsCount),ee.length&&ee.forEach(me=>this.notifications.remove(me)),this.changeDetectorRef.detectChanges();const le=this.notificationsTargets.toArray();this.visibleNotifications.forEach((me,ge)=>{ge>te&&(this.notificationComponentFactory.createNotificationComponent(le[ge],me).instance.notificationData=me),this.changeDetectorRef.detectChanges()})},this.onWindowClick=K=>{this.isOpened&&this.dropdown&&!this.dropdown.nativeElement.contains(K.target)&&document.contains(K.target)&&this.overlayClicked(K)},this.onModelChanged=K=>{this.notifications=K,this.visibleNotifications=[],this.visibleNotificationsCount=0,this.notificationsTargets.forEach(te=>{te.clear()}),this.changeDetectorRef.detectChanges(),this.increaseVisibleNotifications(),this.setLastNotificationsAsReaded(),this.loaderOn=!1,this.changeDetectorRef.detectChanges()},this.onUserLogout=()=>{this.timeouts.lastNotificationReadTimeout&&(clearTimeout(this.timeouts.lastNotificationReadTimeout),this.timeouts.lastNotificationReadTimeout=null),this.timeouts.allNotificationsReadTimeout&&(clearTimeout(this.timeouts.allNotificationsReadTimeout),this.timeouts.allNotificationsReadTimeout=null)},this.notificationComponentFactory=R,this.focusable=!1,this.authListenerService=w,this.renderer=b,this.soundService=c,this.notificationFactory=h,this.ngZone=a,this.friendsService=s,this.changeDetectorRef=r,this.notificationsService=i,this.router=e,this.toaster=u,this.store=G,this.closeNotifDropdown=new ke,this.visibleNotificationsStepCount=10,this.visibleNotificationsCount=0,this.timeouts={lastNotificationReadTimeout:void 0,allNotificationsReadTimeout:void 0,visibilityAnimTimeout:void 0},this.changeDetectorRef.detach()}ngOnChanges(e){e.changeDropdownState.firstChange||(this.scrollNotificationsToTop(),this.changeDropdownState&&(this.isOpened=!0)),this.updateVisibility(),this.dropdownState=this.changeDropdownState?Qh.In:Qh.Out,this.changeDropdownState?(this.loaderOn=!0,this.fetchNotifications(),this.keyPressListener=this.renderer.listen("window","keyup",this.onKeyPress),this.rafId=requestAnimationFrame(()=>this.clickListener=this.renderer.listen("window","click",this.onWindowClick)),this.soundService.play(dn.Slide)):(this.modelChangedSubscription&&this.modelChangedSubscription.unsubscribe(),this.keyPressListener&&this.keyPressListener(),this.clickListener&&(cancelAnimationFrame(this.rafId),this.clickListener()),e.changeDropdownState.firstChange||this.soundService.play(dn.Slide)),this.changeDetectorRef.detectChanges()}ngOnInit(){var e=()=>super.ngOnInit,i=this;return f(function*(){e().call(i),i.dropdownState=Qh.Out,i.routerSubscription=i.router.events.subscribe(r=>{i.dropdownState===Qh.In&&r instanceof fh&&i.closeNotifDropdown.emit()}),i.settingsPopupSubscription=i.store.settingPopupComponent.subscribeIsOpened().subscribe(r=>{r&&i.closeNotifDropdown.emit()}),i.authSubscription=i.authListenerService.authStatusChangeEvent.pipe(bt(r=>r===er.Logout)).subscribe(i.onUserLogout)})()}fetchNotifications(){var e=this;return f(function*(){e.modelChangedSubscription=e.notificationsService.fetchNotifications().subscribe(e.onModelChanged)})()}ngOnDestroy(){super.ngOnDestroy(),this.dropdownState=Qh.Out,this.modelChangedSubscription&&this.modelChangedSubscription.unsubscribe(),this.routerSubscription&&this.routerSubscription.unsubscribe(),this.settingsPopupSubscription&&this.settingsPopupSubscription.unsubscribe(),this.keyPressListener&&this.keyPressListener(),this.clickListener&&(cancelAnimationFrame(this.rafId),this.clickListener()),this.authSubscription&&this.authSubscription.unsubscribe();for(let e in this.timeouts)this.timeouts.hasOwnProperty(e)&&clearTimeout(this.timeouts[e])}trackByFn(e,i){return i.id}overlayClicked(e){e&&(e.preventDefault(),e.stopPropagation()),this.closeNotifDropdown.emit()}deleteNotification(e,i,r){var s=this;return f(function*(){const a=document.getElementById("notification".concat(i));switch(r){case"left":s.renderer.addClass(a,"leave-left");break;case"right":s.renderer.addClass(a,"leave-right")}s.ngZone.run(()=>{a.addEventListener("transitionend",f(function*(){s.renderer.removeChild(a.parentElement?a.parentElement:a.parentNode,a),s.visibleNotificationsCount--,s.changeDetectorRef.detectChanges(),s.increaseVisibleNotifications(!0)}))})})()}onAnimationEnd(){this.isOpened=!1,this.changeDetectorRef.detectChanges()}scrollNotificationsToTop(){this.notifDropdown&&this.notifDropdown.scrollNotificationsToTop()}setLastNotificationsAsReaded(){this.timeouts.lastNotificationReadTimeout=setTimeout(()=>{this.notifications.forEach(e=>{e.read||(e.read=!0)}),this.notificationsService.readNotifications(this.notifications.first()),this.changeDetectorRef.detectChanges()},1e3)}updateVisibility(){this.changeDropdownState?(this.setFocusable(!0),this.timeouts.visibilityAnimTimeout=setTimeout(()=>{this.dropdownState=Qh.In,this.isOpened=!0,this.changeDetectorRef.detectChanges(),clearTimeout(this.timeouts.visibilityAnimTimeout)})):(this.dropdownState=Qh.Out,this.timeouts.visibilityAnimTimeout=setTimeout(()=>{this.setFocusable(!1),this.notifications&&(this.visibleNotificationsCount=this.visibleNotificationsStepCount,this.visibleNotificationsCount>this.notifications.length&&(this.visibleNotificationsCount=this.notifications.length,this.visibleNotifications=this.notifications.map(e=>this.notificationFactory.createNotification(e)).toArray().slice(0,this.visibleNotificationsCount))),this.changeDetectorRef.detectChanges(),clearTimeout(this.timeouts.visibilityAnimTimeout)},400))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(ja),g(Re),g(Tu),g(an),g(Mo),g(Dt),g(z6),g(ji),g(xr),g(kve),g(J))},t.\u0275cmp=pe({type:t,selectors:[["notifications-dropdown"]],viewQuery:function(e,i){if(1&e&&($e(Lve,5),$e(Lve,7,$t),$e(Cgt,5,bs)),2&e){let r;je(r=He())&&(i.notifDropdown=r.first),je(r=He())&&(i.dropdown=r.first),je(r=He())&&(i.notificationsTargets=r)}},inputs:{changeDropdownState:"changeDropdownState"},outputs:{closeNotifDropdown:"closeNotifDropdown"},features:[Ht,it],decls:6,vars:10,consts:[[1,"notifications-dropdown__dropdown",3,"dropdownState","listLength","ngClass","increaseVisibleContent","close"],["dropdown",""],[3,"textArray","noImgFlag",4,"ngIf"],["class","notifications-dropdown-loader-container",4,"ngIf"],["class","notifications-dropdown__container--notification",3,"id","ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","notifications-dropdown__overlay","swipe-directive","",3,"click","swipeActionUp",4,"ngIf"],[3,"textArray","noImgFlag"],[1,"notifications-dropdown-loader-container"],[3,"transparentBG"],[1,"notifications-dropdown__container--notification",3,"id","ngClass"],["dynamic",""],["swipe-directive","",1,"notifications-dropdown__overlay",3,"click","swipeActionUp"]],template:function(e,i){1&e&&(p(0,"dropdown",0,1),Y("increaseVisibleContent",function(){return i.increaseVisibleNotifications()})("close",function(){return i.onAnimationEnd()}),U(2,wgt,1,5,"empty-content",2)(3,Tgt,2,1,"div",3)(4,Mgt,3,4,"div",4),m(),U(5,Ogt,1,0,"div",5)),2&e&&(l("dropdownState",i.dropdownState)("listLength",i.notifications?i.notifications.length:0)("ngClass",ne(8,Egt,i.isOpened)),d(2),l("ngIf",i.notifications&&0===i.notifications.length&&!i.loaderOn),d(),l("ngIf",i.loaderOn),d(),l("ngForOf",i.visibleNotifications)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.changeDropdownState))},styles:[".notifications-dropdown__overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;height:100vh;width:100vw;z-index:5}.notifications-dropdown-loader-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.notifications-dropdown-loader-container[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-height:78%}.notifications-dropdown__dropdown[_ngcontent-%COMP%]{position:absolute;top:0;left:65%;transform:translateY(-100%) translateZ(0);overflow:hidden;z-index:10001}@media only screen and (max-width: 1366px){.notifications-dropdown__dropdown[_ngcontent-%COMP%]{left:60%}}@media only screen and (max-width: 980px){.notifications-dropdown__dropdown[_ngcontent-%COMP%]{left:45%}}@media only screen and (max-width: 768px){.notifications-dropdown__dropdown[_ngcontent-%COMP%]{left:0}}.notifications-dropdown__dropdown.dropdownOpened[_ngcontent-%COMP%]{top:100%;transform:translateY(0) translateZ(0)}.notifications-dropdown__container--notification[_ngcontent-%COMP%]{width:100%}.notifications-dropdown__container--notification.leave-left[_ngcontent-%COMP%]{transform:translate(-110%);transition:transform .3s ease}.notifications-dropdown__container--notification.leave-right[_ngcontent-%COMP%]{transform:translate(110%);transition:transform .3s ease}"],changeDetection:0}),n})();const xgt=["scrollContainer"],Agt=["sectionEl"];function Rgt(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"button-text",7),Y("onClick",function(){return oe(o),re(_().buttonConfig.action())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_();d(),l("buttonModifier",o.buttonConfig.buttonModifier)("bclass","dropdown__button--action-button"),d(),ze(" ",$(3,3,o.buttonConfig.text)," ")}}const kgt=(t,n)=>[t,n],Lgt=t=>({handler:t}),Dgt=(t,n,o)=>({"not-empty":t,"with-action-button":n,"empty-with-button":o}),Bgt=(t,n)=>({"not-empty":t,"with-action-button":n}),Ngt=["*"];let vM=(()=>{var t;class n{constructor(e){this.close=new ke,this.dropdownStateType=Qh,this.loadMoreContent=()=>{this.increaseVisibleContent.emit()},this.onAnimationEnd=i=>{i.target===this.sectionEl.nativeElement&&this.close.emit()},this.cdr=e,e.detach(),this.increaseVisibleContent=new ke}ngOnChanges(e){e.dropdownState&&!e.dropdownState.firstChange&&e.dropdownState.currentValue===Qh.Out?this.addListener():this.removeListener(),this.cdr.detectChanges()}ngOnDestroy(){this.removeListener()}scrollNotificationsToTop(){0!==this.elScrollContainer.nativeElement.scrollTop&&(this.elScrollContainer.nativeElement.scrollTop=0)}addListener(){this.isAttached||(this.isAttached=!0,this.sectionEl.nativeElement.addEventListener("transitionend",this.onAnimationEnd))}removeListener(){this.sectionEl.nativeElement.removeEventListener("transitionend",this.onAnimationEnd),this.isAttached=!1}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["dropdown"]],viewQuery:function(e,i){if(1&e&&($e(xgt,5),$e(Agt,7)),2&e){let r;je(r=He())&&(i.elScrollContainer=r.first),je(r=He())&&(i.sectionEl=r.first)}},inputs:{listLength:"listLength",dropdownState:"dropdownState",buttonConfig:"buttonConfig",customClass:"customClass"},outputs:{increaseVisibleContent:"increaseVisibleContent",close:"close"},features:[it],ngContentSelectors:Ngt,decls:7,vars:17,consts:[[1,"dropdown__container",3,"ngClass"],["sectionEl",""],["scroll-directive","",1,"dropdown__wrapper",3,"onScrolledToBottom","ngClass"],["scrollContainer",""],[1,"dropdown__container--scroll-container",3,"ngClass"],["class","dropdown__container--action-button",4,"ngIf"],[1,"dropdown__container--action-button"],[1,"dropdown__button-action",3,"buttonModifier","bclass","onClick"]],template:function(e,i){if(1&e&&(Co(),p(0,"div",0,1)(2,"section",2,3)(4,"div",4),yo(5),m()(),U(6,Rgt,4,5,"div",5),m()),2&e){let r;l("ngClass",cn(5,kgt,i.dropdownState===i.dropdownStateType.In?"dropdownOpened":"",null!==(r=i.customClass)&&void 0!==r?r:"")),d(2),l("onScrolledToBottom",ne(8,Lgt,i.loadMoreContent))("ngClass",_a(10,Dgt,i.listLength&&0!==i.listLength,!!i.buttonConfig&&(i.listLength&&0!==i.listLength||i.buttonConfig.showWhenEmptyList),(!i.listLength||i.listLength&&i.listLength<=0)&&i.buttonConfig&&i.buttonConfig.showWhenEmptyList)),d(2),l("ngClass",cn(14,Bgt,i.listLength&&0!==i.listLength,!!i.buttonConfig&&(i.listLength&&0!==i.listLength||i.buttonConfig.showWhenEmptyList))),d(2),l("ngIf",i.buttonConfig&&(i.listLength&&0!==i.listLength||i.buttonConfig.showWhenEmptyList))}},dependencies:[Xe,Ne,Is,pn,qe],styles:[".dropdown__wrapper[_ngcontent-%COMP%]{min-height:5rem;max-height:40rem;width:38rem;text-rendering:optimizeSpeed;overflow-y:auto;overflow-x:visible}@media only screen and (max-width: 768px) and (orientation: portrait){.dropdown__wrapper[_ngcontent-%COMP%]{width:100vw}.dropdown__wrapper.not-empty[_ngcontent-%COMP%]{max-height:70vh}}@media only screen and (max-width: 768px) and (orientation: landscape){.dropdown__wrapper[_ngcontent-%COMP%]{width:100vw}.dropdown__wrapper.not-empty[_ngcontent-%COMP%]{max-height:60vh}}.dropdown__wrapper.not-empty[_ngcontent-%COMP%]{max-height:68vh}.dropdown__wrapper.empty-with-button[_ngcontent-%COMP%]{max-height:15rem}.dropdown__container[_ngcontent-%COMP%]{transform:translateY(-120%) translateZ(0);transition:transform .3s ease;border-radius:0 0 .8rem .8rem}.dropdown__container.dropdownOpened[_ngcontent-%COMP%]{transform:translateY(0) translateZ(0)}.dropdown__container--scroll-container[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;height:calc(100% - .2rem);width:100%;overflow-y:hidden;overflow-x:hidden}.dropdown__container--scroll-container.with-action-button[_ngcontent-%COMP%]{height:calc(100% - 6.2rem)}.dropdown__container--action-button[_ngcontent-%COMP%]{position:relative;width:100%;height:6rem;display:flex;justify-content:center;align-items:center}.dropdown__container--action-button[_ngcontent-%COMP%]   .dropdown__button-action[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}"],changeDetection:0}),n})(),R0=(()=>{var t;class n{constructor(e){this.icon=ve.EIcons.Joystick,this.cdr=e,e.detach()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["user-list-box-current-game"]],inputs:{currentGame:"currentGame"},features:[it],decls:5,vars:6,consts:[[1,"user-list-box-current-game__icon",3,"icon"],[1,"user-list-box-current-game__text"]],template:function(e,i){1&e&&(B(0,"icon-component",0),p(1,"p",1),H(2),V(3,"lowercase"),V(4,"translate"),m()),2&e&&(l("icon",i.icon),d(2),se($(3,2,$(4,4,"PLATFORM_IDS."+i.currentGame))))},dependencies:[Dn,MX,qe],styles:["[_nghost-%COMP%]{display:flex;align-items:center}"],changeDetection:0}),n})();var Fgt=ve.EIcons,Ugt=ve.EButtonModifier;const Dve=["dropdown"],Ggt=()=>({textKey:"OTHER.NO_FRIENDS_ONLINE"}),Vgt=t=>[t];function zgt(t,n){1&t&&B(0,"empty-content",6),2&t&&l("textArray",ne(3,Vgt,pt(2,Ggt)))("noImgFlag",!0)}function jgt(t,n){1&t&&(p(0,"div",7),B(1,"loader-image",8),m()),2&t&&(d(),l("transparentBG",!0))}function Hgt(t,n){1&t&&B(0,"user-list-box-current-game",18),2&t&&l("currentGame",_().$implicit.currentGameName)}const qgt=t=>({online:t}),Wgt=t=>({name:t});function $gt(t,n){if(1&t){const o=Ce();p(0,"div",9)(1,"div",10),B(2,"avatar",11),m(),p(3,"div",12)(4,"p",13),B(5,"username",14),m(),U(6,Hgt,1,1,"user-list-box-current-game",15),m(),p(7,"div",16)(8,"button-icon",17),Y("onClick",function(){const r=oe(o).$implicit;return re(_().messageFriend(r.id))}),m()()()}if(2&t){const o=n.$implicit,e=_();d(2),l("user",o.profile)("isLink",!0)("hasUsername",!1),d(2),l("ngClass",ne(10,qgt,o.onlineStatus.isOnline)),d(),l("userProfile",o.profile)("hasVerifiedBadge",!0),d(),l("ngIf",o.currentGameName),d(2),l("bclass","friends-dropdown__container--send-message")("icon",ne(12,Wgt,e.iconsEnum.MESSAGE))("buttonModifier",e.buttonModifier.BUTTON_LIGHT)}}function Kgt(t,n){if(1&t){const o=Ce();p(0,"div",19),Y("click.zoneless",function(){return oe(o),re(_().overlayClicked())})("swipeActionUp",function(i){return oe(o),re(_().overlayClicked(i))}),m()}}const Zgt=(t,n)=>({text:"NOTIFICATIONS.SEE_ALL",buttonModifier:t,action:n,showWhenEmptyList:!0}),Qgt=t=>({dropdownOpened:t});var np=function(t){return t.In="in",t.Out="out",t}(np||{});let kz=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R){this.dropdownStateType=np,this.loaderOn=!1,this.iconsEnum=Fgt,this.buttonModifier=Ugt,this.isOpened=!1,this.goToFriends=()=>{this.closeFriendsDropdown.emit(),this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/friends")}}])},this.onKeyPress=G=>{27===G.keyCode&&this.closeFriendsDropdown.emit()},this.increaseVisibleFriends=()=>{this.visibleFriendsCount+=this.visibleFriendsStepCount,this.visibleFriendsCount>this.friends.length&&(this.visibleFriendsCount=this.friends.length),this.visibleFriends=this.friends.slice(0,this.visibleFriendsCount),this.changeDetectorRef.detectChanges()},this.onWindowClick=G=>{this.isOpened&&this.dropdown&&!this.dropdown.nativeElement.contains(G.target)&&this.overlayClicked(G)},this.chatService=w,this.authListenerService=u,this.renderer=c,this.soundService=a,this.changeDetectorRef=s,this.router=e,this.closeFriendsDropdown=new ke,this.friendsService=i,this.userBlock=r,this.analyticsTracking=h,this.constants=b,this.visibleFriendsStepCount=10,this.visibleFriendsCount=0,this.store=R,this.changeDetectorRef.detach()}ngOnChanges(e){e.changeDropdownState.firstChange||(this.scrollNotificationsToTop(),this.changeDropdownState&&(this.isOpened=!0)),this.dropdownState=this.changeDropdownState?np.In:np.Out,this.changeDropdownState?(this.loaderOn=!0,this.fetchFriends(),this.keyPressListener=this.renderer.listen("window","keyup",this.onKeyPress),this.rafId=requestAnimationFrame(()=>this.clickListener=this.renderer.listen("window","click",this.onWindowClick)),this.soundService.play(dn.Slide)):(this.keyPressListener&&this.keyPressListener(),this.clickListener&&(cancelAnimationFrame(this.rafId),this.clickListener()),e.changeDropdownState.firstChange||this.soundService.play(dn.Slide)),this.changeDetectorRef.detectChanges()}ngOnInit(){this.dropdownState=np.Out,this.routerSubscription=this.router.events.subscribe(e=>{this.dropdownState===np.In&&e instanceof fh&&this.closeFriendsDropdown.emit()}),this.settingsPopupSubscription=this.store.settingPopupComponent.subscribeIsOpened().subscribe(e=>{e&&this.closeFriendsDropdown.emit()}),this.authSubscription=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(()=>{this.closeFriendsDropdown.emit()})}fetchFriends(){var e=this;return f(function*(){let i=[];try{i=(yield e.userBlock.getBlockList()).blocked.map(u=>u.profile);const a=(yield e.friendsService.requestFriends({useCache:!1})).friends.filter(u=>!e.checkIfFriendInBlockedList(i,u.id)),c=new ie.UniqueList(a.filter(u=>u.onlineStatus.isOnline));e.friends=c.orderBy([u=>u.profile.username.currentUsername],ie.ESort.Asc).toArray(),e.increaseVisibleFriends()}catch(r){console.warn(r)}e.loaderOn=!1,e.changeDetectorRef.detectChanges()})()}checkIfFriendInBlockedList(e,i){return!!e.find(r=>r.id===i)}messageFriend(e){this.closeFriendsDropdown.emit(),this.chatService.openPrivateChat({userId:e});const i=new aa.DefaultEvent(Nn.Navigation,ds.EAnalyticsCategory.Private,{label:"online friends drop-down"});this.analyticsTracking.sendEvent(i)}ngOnDestroy(){this.dropdownState=np.Out,this.routerSubscription&&this.routerSubscription.unsubscribe(),this.settingsPopupSubscription&&this.settingsPopupSubscription.unsubscribe(),this.keyPressListener&&this.keyPressListener(),this.clickListener&&(cancelAnimationFrame(this.rafId),this.clickListener()),this.authSubscription&&this.authSubscription.unsubscribe()}trackByFn(e,i){return i.id}overlayClicked(e){e&&(e.preventDefault(),e.stopPropagation()),this.closeFriendsDropdown.emit()}onAnimationEnd(){this.isOpened=!1,this.changeDetectorRef.detectChanges()}scrollNotificationsToTop(){this.friendsDropdown&&this.friendsDropdown.scrollNotificationsToTop()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Tu),g(n0),g(Re),g(Mo),g(ji),g(xr),g(yi),g(tn),g(El),g(J))},t.\u0275cmp=pe({type:t,selectors:[["friends-dropdown"]],viewQuery:function(e,i){if(1&e&&($e(Dve,5),$e(Dve,7,$t)),2&e){let r;je(r=He())&&(i.friendsDropdown=r.first),je(r=He())&&(i.dropdown=r.first)}},inputs:{changeDropdownState:"changeDropdownState"},outputs:{closeFriendsDropdown:"closeFriendsDropdown"},features:[it],decls:6,vars:14,consts:[[1,"friends-dropdown__dropdown",3,"dropdownState","listLength","buttonConfig","ngClass","close","increaseVisibleContent"],["dropdown",""],[3,"textArray","noImgFlag",4,"ngIf"],["class","friends-dropdown-loader-container",4,"ngIf"],["class","friends-dropdown__container--friend",4,"ngFor","ngForOf","ngForTrackBy"],["class","friends-dropdown__overlay","swipe-directive","",3,"click.zoneless","swipeActionUp",4,"ngIf"],[3,"textArray","noImgFlag"],[1,"friends-dropdown-loader-container"],[3,"transparentBG"],[1,"friends-dropdown__container--friend"],[1,"friends-dropdown__container--avatar"],[3,"user","isLink","hasUsername"],[1,"friends-dropdown__container--username"],[1,"friends-dropdown__text--username",3,"ngClass"],[3,"userProfile","hasVerifiedBadge"],["class","friends-dropdown__text--current-game",3,"currentGame",4,"ngIf"],[1,"friends-dropdown__container--buttons"],[1,"friends-dropdown__button-action",3,"bclass","icon","buttonModifier","onClick"],[1,"friends-dropdown__text--current-game",3,"currentGame"],["swipe-directive","",1,"friends-dropdown__overlay",3,"click.zoneless","swipeActionUp"]],template:function(e,i){1&e&&(p(0,"dropdown",0,1),Y("close",function(){return i.onAnimationEnd()})("increaseVisibleContent",function(){return i.increaseVisibleFriends()}),U(2,zgt,1,5,"empty-content",2)(3,jgt,2,1,"div",3)(4,$gt,9,14,"div",4),m(),U(5,Kgt,1,0,"div",5)),2&e&&(l("dropdownState",i.dropdownState)("listLength",i.friends?i.friends.length:0)("buttonConfig",cn(9,Zgt,i.buttonModifier.BUTTON_ATTENTION,i.goToFriends))("ngClass",ne(12,Qgt,i.isOpened)),d(2),l("ngIf",i.friends&&0===i.friends.length&&!i.loaderOn),d(),l("ngIf",i.loaderOn),d(),l("ngForOf",i.visibleFriends)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.changeDropdownState))},dependencies:[Xe,Mt,Ne,wu,Bo,bo,R0,ei,Oi,vM,Zp],styles:['.friends-dropdown__overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;height:100vh;width:100vw;z-index:5}.friends-dropdown-loader-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.friends-dropdown-loader-container[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-height:78%}.friends-dropdown__dropdown[_ngcontent-%COMP%]{position:absolute;top:0;left:65%;transform:translateY(-100%) translateZ(0);overflow:hidden;z-index:10001}@media only screen and (max-width: 1366px){.friends-dropdown__dropdown[_ngcontent-%COMP%]{left:60%}}@media only screen and (max-width: 980px){.friends-dropdown__dropdown[_ngcontent-%COMP%]{left:55%}}@media only screen and (max-width: 768px){.friends-dropdown__dropdown[_ngcontent-%COMP%]{left:0}}.friends-dropdown__dropdown.dropdownOpened[_ngcontent-%COMP%]{top:100%;transform:translateY(0) translateZ(0)}.friends-dropdown__container--friend[_ngcontent-%COMP%]{width:calc(100% - 2rem);height:8rem;margin:1rem;display:flex}.friends-dropdown__container--friend.leave-left[_ngcontent-%COMP%]{transform:translate(-110%);transition:transform .3s ease}.friends-dropdown__container--friend.leave-right[_ngcontent-%COMP%]{transform:translate(110%);transition:transform .3s ease}.friends-dropdown__container--friend[_ngcontent-%COMP%]   .friends-dropdown__container--avatar[_ngcontent-%COMP%]{width:8rem;height:8rem;padding:.6rem}.friends-dropdown__container--friend[_ngcontent-%COMP%]   .friends-dropdown__container--username[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1;overflow:hidden;flex-flow:row wrap;align-content:center}.friends-dropdown__container--friend[_ngcontent-%COMP%]   .friends-dropdown__container--username[_ngcontent-%COMP%]   .friends-dropdown__text--username[_ngcontent-%COMP%]{position:relative;left:.5rem;width:100%;font-size:1.8rem;font-weight:600;padding-left:2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1}.friends-dropdown__container--friend[_ngcontent-%COMP%]   .friends-dropdown__container--username[_ngcontent-%COMP%]   .friends-dropdown__text--username[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;width:1.4rem;height:1.4rem;border-radius:50%;transform:translateY(-50%)}.friends-dropdown__container--friend[_ngcontent-%COMP%]   .friends-dropdown__container--username[_ngcontent-%COMP%]   .friends-dropdown__text--current-game[_ngcontent-%COMP%]{position:relative;width:100%;left:.5rem}.friends-dropdown__container--buttons[_ngcontent-%COMP%]{position:relative;width:8rem;height:100%}.friends-dropdown__container--buttons[_ngcontent-%COMP%]   .friends-dropdown__button-action[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}'],changeDetection:0}),n})();var yv=function(t){return t.WhatsApp="WHATSAPP",t.Twitter="TWITTER",t.Facebook="FACEBOOK",t.Copy="COPY",t.All="ALL",t}(yv||{}),Lz=function(t){return t.Upward="upward",t.Downward="downward",t}(Lz||{});let kL=(()=>{var t;class n{constructor(){}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275dir=qn({type:t,selectors:[["","button-dropdown-header",""]]}),n})(),LL=(()=>{var t;class n{constructor(){}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275dir=qn({type:t,selectors:[["","button-dropdown-body",""]]}),n})();function Ygt(t,n){1&t&&Un(0)}function Jgt(t,n){1&t&&Un(0)}function Xgt(t,n){if(1&t&&(p(0,"div",5),U(1,Jgt,1,0,"ng-container",2),m()),2&t){const o=_();l("ngClass",o.direction),d(),l("ngTemplateOutlet",o.templateRefBody)}}function e_t(t,n){if(1&t){const o=Ce();p(0,"div",6),Y("click",function(){return oe(o),re(_().toggle())}),m()}}let Dz=(()=>{var t;class n{constructor(e){this.direction=Lz.Downward,this.toggled=!1,this.cdr=e}toggle(){this.toggled=!this.toggled,this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["button-dropdown"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,kL,5,Qa),Ho(r,LL,5,Qa)),2&e){let s;je(s=He())&&(i.templateRefHeader=s.first),je(s=He())&&(i.templateRefBody=s.first)}},inputs:{direction:"direction"},decls:5,vars:3,consts:[[1,"bdropdown--wrapper",3,"click"],[1,"bdropdown--header"],[4,"ngTemplateOutlet"],["class","bdropdown--body",3,"ngClass",4,"ngIf"],["class","bdropdown--overlay",3,"click",4,"ngIf"],[1,"bdropdown--body",3,"ngClass"],[1,"bdropdown--overlay",3,"click"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.toggle()}),p(1,"div",1),U(2,Ygt,1,0,"ng-container",2),m(),U(3,Xgt,2,2,"div",3),m(),U(4,e_t,1,0,"div",4)),2&e&&(d(2),l("ngTemplateOutlet",i.templateRefHeader),d(),l("ngIf",i.toggled),d(),l("ngIf",i.toggled))},dependencies:[Xe,Ne,qr],styles:[".bdropdown--wrapper[_ngcontent-%COMP%]{position:relative;z-index:2}.bdropdown--body[_ngcontent-%COMP%]{position:absolute;width:95%;left:50%;transform:translate(-50%);padding:1rem}.bdropdown--overlay[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;left:0;top:0;z-index:1}"],changeDetection:0}),n})();var Bve=ve.EButtonModifier,t_t=ve.EIcons;const DL=t=>({name:t});function n_t(t,n){if(1&t&&(p(0,"button-icon-text",8),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("bclass",o.bclass)("icon",ne(6,DL,o.iconNames.SHARE))("buttonModifier",o.buttonModifier.BUTTON_SHARE),d(),ze("",$(2,4,"TEXT.SHARE")," ")}}function i_t(t,n){1&t&&Un(0)}function o_t(t,n){if(1&t){const o=Ce();p(0,"button-text",9),Y("onClick",function(){oe(o);const i=_(2);return re(i.share(i.shareMethodsEnum.Twitter))}),H(1),V(2,"translate"),m(),U(3,i_t,1,0,"ng-container",10)}if(2&t){const o=_(2),e=Kt(6);l("flatButton",!0)("bclass",o.bclass),d(),ze("",$(2,4,"SOCIAL_NETWORKS.TWITTER")," "),d(2),l("ngTemplateOutlet",e)}}function r_t(t,n){1&t&&(p(0,"button-dropdown",5),U(1,n_t,3,8,"ng-template",6)(2,o_t,4,6,"ng-template",7),m()),2&t&&l("direction",_().direction)}function s_t(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",11),Y("onClick",function(){return oe(o),re(_().mobileShare())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("icon",ne(6,DL,o.iconNames.SHARE))("bclass",o.bclass)("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),ze("",$(2,4,"TEXT.SHARE"),"\n")}}function a_t(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",11),Y("onClick",function(){oe(o);const i=_();return re(i.share(i.shareMethod))}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("icon",ne(6,DL,o.iconNames.WHATSAPP))("bclass",o.bclass)("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),ze("",$(2,4,"SOCIAL_NETWORKS.WHATSAPP"),"\n")}}function c_t(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",12),Y("onClick",function(){oe(o);const i=_();return re(i.share(i.shareMethod))}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("icon",ne(6,DL,o.iconNames.FACEBOOK_LOGO))("buttonModifier",o.buttonModifier.BUTTON_FB)("bclass",o.bclass),d(),ze("",$(2,4,"SOCIAL_NETWORKS.FACEBOOK"),"\n")}}function l_t(t,n){1&t&&Un(0)}function u_t(t,n){if(1&t&&(Tn(0),U(1,l_t,1,0,"ng-container",10),Pn()),2&t){_();const o=Kt(6);d(),l("ngTemplateOutlet",o)}}function d_t(t,n){if(1&t){const o=Ce();p(0,"button-text",13),Y("copied",function(){return oe(o),re(_().onCopy())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("copy-text",o.text)("buttonModifier",o.copyColor)("bclass",o.bclass),d(),ze("",$(2,4,"TEXT.COPY")," ")}}let bM=(()=>{var t;class n{constructor(e,i,r,s){this.bclass="",this.copyColor=Bve.BUTTON_TRANSPARENT,this.shareMethod=yv.All,this.direction=Lz.Downward,this.buttonModifier=Bve,this.iconNames=t_t,this.shareMethodsEnum=yv,this.appService=e,this.twitterService=r,this.facebookService=i,this.isMobileApp=this.appService.isMobileApp(),this.toaster=s}share(e){switch(e){case yv.Twitter:return this.twitterShare();case yv.WhatsApp:return this.shareWhatsApp();case yv.Facebook:return this.facebookShare();default:console.error("Wrong share method")}}mobileShare(){this.nativeInvite({text:this.text})}shareWhatsApp(){this.nativeInvite({scheme:wi.ENativeInviteSchemes.Whatsapp,text:this.text})}onCopy(){console.log("success"),this.toaster.success("POPUP.COPIED_SUCCESSFULLY")}twitterShare(){this.twitterService.share(this.text)}facebookShare(){this.facebookService.ui({method:KS.FacebookShare,href:this.text}).catch(e=>{console.error(e)})}nativeInvite(e){this.appService.getMobileAppService().messages().nativeInvite(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(km),g(hI),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["share-button"]],inputs:{bclass:"bclass",text:"text",copyColor:[mo.None,"copy-color","copyColor"],shareMethod:"shareMethod",direction:"direction"},decls:7,vars:5,consts:[["class","share-button__button",3,"direction",4,"ngIf"],["class","share-button__button",3,"icon","bclass","buttonModifier","onClick",4,"ngIf"],["class","share-button__button",3,"icon","buttonModifier","bclass","onClick",4,"ngIf"],[4,"ngIf"],["copy",""],[1,"share-button__button",3,"direction"],["button-dropdown-header",""],["button-dropdown-body",""],[3,"bclass","icon","buttonModifier"],["data-cy","twitterReferalButton",3,"flatButton","bclass","onClick"],[4,"ngTemplateOutlet"],[1,"share-button__button",3,"icon","bclass","buttonModifier","onClick"],[1,"share-button__button",3,"icon","buttonModifier","bclass","onClick"],["copy-clipboard","","data-cy","copyReferalLinkButton",3,"copy-text","buttonModifier","bclass","copied"]],template:function(e,i){1&e&&U(0,r_t,3,1,"button-dropdown",0)(1,s_t,3,8,"button-icon-text",1)(2,a_t,3,8,"button-icon-text",1)(3,c_t,3,8,"button-icon-text",2)(4,u_t,2,1,"ng-container",3)(5,d_t,3,6,"ng-template",null,4,ft),2&e&&(l("ngIf",!1===i.isMobileApp&&i.shareMethod===i.shareMethodsEnum.All),d(),l("ngIf",i.isMobileApp&&i.shareMethod===i.shareMethodsEnum.All),d(),l("ngIf",i.shareMethod===i.shareMethodsEnum.WhatsApp),d(),l("ngIf",i.shareMethod===i.shareMethodsEnum.Facebook),d(),l("ngIf",i.shareMethod===i.shareMethodsEnum.Copy))},dependencies:[Ne,qr,SR,Dz,pn,so,kL,LL,qe],styles:[".share-button__button[_ngcontent-%COMP%]{min-width:0}"],changeDetection:0}),n})();function p_t(t,n){if(1&t&&B(0,"share-button",11),2&t){const o=_();l("bclass","invite-friends__buttons--mobile")("shareMethod",o.shareEnum.WhatsApp)("text",o.adjustText)}}let Bz=(()=>{var t;class n{constructor(e,i,r,s){this.shareEnum=yv,this.appService=e,this.store=s,this.clientConfigService=i,this.translationService=r,this.isMobileApp=this.appService.isMobileApp();const a=this.store.selectUserState().referralId;this.adjustText=this.translationService.getParsedTranslation("INVITE_FRIENDS.SHARE_MESSAGE",[this.clientConfigService.getConfig().platform.name,this.clientConfigService.getConfig().core.tracking.adjust.url.replace(/{REFERRAL_ID}/g,a)]),this.levelUpReward={chips:0,gems:0,items:[],customText:{},banners:[]},this.acceptReward={chips:0,gems:0,items:[],customText:{},banners:[]},this.acceptReward=this.modifyBonusData(this.acceptReward,this.clientConfigService.getConfig().transactions.bonus.invitation.accept),this.levelUpReward=this.modifyBonusData(this.levelUpReward,this.clientConfigService.getConfig().transactions.bonus.invitation.levelUp),this.level=this.clientConfigService.getConfig().transactions.bonus.invitation.requiredLevel}modifyBonusData(e,i){if(i.isActive){e.chips=i.chips?i.chips+e.chips:e.chips,e.gems=i.gems?i.gems+e.gems:e.gems;for(let r of i.items)r.type===Fe.TG.ChipPack?e.chips+=r.amount:r.type===Fe.TG.GemsPack&&(e.gems+=r.amount)}return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(Zt),g(pi),g(J))},t.\u0275cmp=pe({type:t,selectors:[["invite-friends"]],decls:18,vars:12,consts:[[1,"invite-friends__wrapper"],["data-cy","friendsListRewardTitle",1,"invite-friends__title--wrapper"],[1,"invite-friends__chips--text"],[1,"invite-friends__content"],[1,"invite-friends__banner"],["data-cy","friendsListChipImage",1,"invite-friends__banner--img"],["text-with-placeholders","","data-cy","friendsListRewardDescription",1,"invite-friends__banner--text",3,"key"],[3,"reward"],[1,"invite-friends__buttons-wrapper"],["data-cy","referalShareButton",1,"invite-friends__button",3,"bclass","text"],["class","invite-friends__button",3,"bclass","shareMethod","text",4,"ngIf"],[1,"invite-friends__button",3,"bclass","shareMethod","text"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"span"),H(3),V(4,"translate"),m(),p(5,"span",2),H(6),V(7,"translate"),m()(),p(8,"div",3)(9,"div",4),B(10,"div",5),p(11,"div",6)(12,"span"),H(13),m(),B(14,"reward-component",7),m()(),p(15,"div",8),B(16,"share-button",9),U(17,p_t,1,3,"share-button",10),m()()()),2&e&&(d(3),se($(4,8,"INVITE_FRIENDS.INVITE_FRIENDS_FOR")),d(3),se($(7,10,"TEXT.FREE_CHIPS")),d(5),l("key","INVITE_FRIENDS.SHARE_AND_GET"),d(2),se(i.level),d(),l("reward",i.levelUpReward),d(2),l("bclass","invite-friends__buttons--mobile")("text",i.adjustText),d(),l("ngIf",i.isMobileApp))},dependencies:[Ne,oc,bM,cu,qe],styles:[".invite-friends__title--wrapper[_ngcontent-%COMP%]{font-size:1.8rem;text-align:center;padding:1.5rem 0}.invite-friends__chips--text[_ngcontent-%COMP%]{margin:0 .5rem}.invite-friends__content[_ngcontent-%COMP%]{margin:1.5rem}@media only screen and (max-width: 768px){.invite-friends__content[_ngcontent-%COMP%]{margin:.25rem}}.invite-friends__banner[_ngcontent-%COMP%]{position:relative;display:flex}.invite-friends__banner--img[_ngcontent-%COMP%]{width:20%;height:10rem;max-width:15rem;margin:0 1rem}@media only screen and (max-width: 768px){.invite-friends__banner--img[_ngcontent-%COMP%]{height:8rem}}.invite-friends__banner--text[_ngcontent-%COMP%]{font-size:1.8rem;flex:1;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 768px){.invite-friends__banner--text[_ngcontent-%COMP%]{font-size:1.4rem}}.invite-friends__buttons-wrapper[_ngcontent-%COMP%]{display:flex;margin:1rem 0}.invite-friends__button[_ngcontent-%COMP%]{flex:1;margin:0 .5rem;min-width:0}@media only screen and (max-width: 768px){.invite-friends__button[_ngcontent-%COMP%]{margin:0 .25rem}}"]}),n})(),Nve=(()=>{var t;class n{constructor(e,i,r){this.fbService=e,this.translation=r,this.http=i}openInviteDialog(){return this.fbService.ui({method:KS.FacebookAppRequest,filters:["app_non_users"],message:this.translation.getParsedTranslation("INVITE_FRIENDS.INVITE_MESSAGE",[Lt.CONFIG.platform.name])})}getLoginStatus(){return this.fbService.getLoginStatus()}isFriendsListPermissionGranted(e){var i=this;return f(function*(){const r=yield i.fbService.api("".concat(e,"/permissions"));return r&&r.data&&(!r.data.find(s=>"user_friends"===s.permission)||r.data.find(s=>"user_friends"===s.permission&&"granted"===s.status))})()}askForFriendsListPermissions(){return this.fbService.login(["user_friends"],{auth_type:"rerequest"})}sendFacebookIds(e){return this.http.post("social/invite/facebook",e).toPromise()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(km),T(En),T(pi))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Mn=function(t){return t.Profile="profile",t.MyProfile="myProfile",t.Photos="photos",t.Stats="stats",t.RecentGames="recentGames",t.EditProfile="editProfile",t.GDPR="gdpr",t.Friends="friends",t.InviteFriends="inviteFriends",t.Blocked="blocked",t.ShopChips="shopChips",t.ShopGems="shopGems",t.ShopFrames="shopFrames",t.ShopVip="shopVip",t.ShopMore="shopMore",t.Promo="promo",t.PromoCode="promoCode",t.ShopDecks="shopDecks",t.ShopVoiceovers="shopVoiceovers",t.ShopTables="shopTables",t.ShopEmojis="shopEmojis",t.ShopBoosters="shopBoosters",t.ShopDice="shopDice",t.ShopPawns="shopPawns",t.ShopInventory="shopInventory",t.BankTransfer="bankTransfer",t.Terms="terms",t.Privacy="privacy",t.PersonalNotes="personalNotes",t.MessageColors="shopMessageColors",t.NameColors="shopNameColors",t.ClubsList="clubsList",t.AcivityFeed="clubActivityFeed",t.Leaderboards="leaderboards",t.ClubProfile="clubProfile",t.ClubsInfoPage="clubsInfoPage",t.ProfileBackground="profileBackground",t.ChallengesList="challengesListPage",t.CreatorCode="creatorCode",t.GiftablePacks="giftablePacks",t.GiftablePacksStore="giftablePacksStore",t}(Mn||{});const __t=[{id:Mn.Friends,text:{key:"LABEL.FRIENDS"}},{id:Mn.InviteFriends,text:{key:"INVITE_FRIENDS.INVITE_FRIEND"}},{id:Mn.Blocked,text:{key:"LABEL.BLOCKED"}},{id:Mn.Photos,text:{key:"LABEL.GALLERY"}},{id:Mn.Stats,text:{key:"LABEL.STATISTICS"}},{id:Mn.RecentGames,text:{key:"LABEL.LAST_GAMES"}},{id:Mn.EditProfile,text:{key:"LABEL.EDIT_PROFILE"}},{id:Mn.GDPR,text:{key:"PREFERENCES_PAGE.PAGE_TITLE"}},{id:Mn.PromoCode,text:{key:"PROMO_CODES.PROMO_CODES_TIPS_TITLE"}},{id:Mn.Promo,text:{key:"LABEL.SHOP"}},{id:Mn.Profile,text:{key:"LABEL.PROFILE"}},{id:Mn.ShopChips,text:{key:"LABEL.SHOP"}},{id:Mn.ShopVip,text:{key:"LABEL.SHOP"}},{id:Mn.ShopGems,text:{key:"LABEL.SHOP"}},{id:Mn.ShopMore,text:{key:"LABEL.SHOP"}},{id:Mn.ShopTables,text:{key:"LABEL.SHOP"}},{id:Mn.ShopDecks,text:{key:"LABEL.SHOP"}},{id:Mn.ShopVoiceovers,text:{key:"LABEL.SHOP"}},{id:Mn.ShopFrames,text:{key:"LABEL.SHOP"}},{id:Mn.ShopDice,text:{key:"LABEL.SHOP"}},{id:Mn.ShopPawns,text:{key:"LABEL.SHOP"}},{id:Mn.ShopEmojis,text:{key:"LABEL.SHOP"}},{id:Mn.ShopBoosters,text:{key:"SHOP.XP_BOOSTERS"}},{id:Mn.ShopInventory,text:{key:"LABEL.SHOP"}},{id:Mn.Terms,text:{key:"LABEL.TERMS_OF_USE"}},{id:Mn.Privacy,text:{key:"LABEL.PRIVACY"}},{id:Mn.BankTransfer,text:{key:"LABEL.SHOP"}},{id:Mn.NameColors,text:{key:"LABEL.SHOP"}},{id:Mn.MessageColors,text:{key:"LABEL.SHOP"}},{id:Mn.ClubsList,text:{key:"CLUBS.CLUBS_LIST_PAGE_TITLE"}},{id:Mn.AcivityFeed,text:{key:"CLUBS.ACTIVITY_FEED"}},{id:Mn.Leaderboards,text:{key:"TOURNAMENTS.LEADERBOARD"}},{id:Mn.ClubProfile,text:{key:"CLUBS.CLUB_PROFILE"}},{id:Mn.ClubsInfoPage,text:{key:"CLUBS.CLUBS_INFO_PAGE"}},{id:Mn.ProfileBackground,text:{key:"LABEL.SHOP"}},{id:Mn.ChallengesList,text:{key:"CHALLENGES.LABELS.TITLE"}},{id:Mn.CreatorCode,text:{key:"LABEL.SHOP"}},{id:Mn.PersonalNotes,text:{key:"LABEL.PERSONAL_NOTES"}},{id:Mn.GiftablePacks,text:{key:"SHOP.DONATION_INVENTORY"}},{id:Mn.GiftablePacksStore,text:{key:"SHOP.DONATION_STORE"}}],v_t=["outlet"];function b_t(t,n){if(1&t){const o=Ce();p(0,"popup-title-bar",5),Y("buttonCloseClicked",function(){return oe(o),re(_().close())}),m()}if(2&t){const o=_();l("popupTitleType",o.titleBarOptions.type)("leftButtonOptions",o.getLeftButton())("customComponentCssClass","popup__outlet--wrapper-title "+o.componentCustomCssClass)("text",o.titleBarOptions.text)}}let Uve=(()=>{var t;class n{constructor(e,i,r){this.navigation=e,this.authListenerService=i,this.constants=r,this.popupContainerOptions={customComponentCssClass:"popup__outlet--wrapper",styleProperties:{width:"95%",height:"95%"},customBackdropCssClass:"popup__outlet--backdrop"}}ngOnInit(){this.titleBarOptions={leftButton:{type:QS.BackButton,action:()=>{if(this.navigationHistory.length>=2){const i=this.navigationHistory.get(this.navigationHistory.length-2).url;return this.navigation.navigate([{outlets:{[Fn]:"".concat("/"===i.charAt(0)?i.slice(1):i)}}]),void this.navigationHistory.toArray().splice(this.navigationHistory.length-2)}const e=this.outlet.component;e.getConnectedComponentUrl&&this.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/").concat(e.getConnectedComponentUrl())}}])}},hideBackButton:()=>{var e;if(null===(e=this.outlet)||void 0===e||!e.isActivated)return!1;const i=this.navigationHistory.get(this.navigationHistory.length-2);return this.navigationHistory.length<2&&!this.outlet.component.getConnectedComponentUrl||!(null==i||!i.parentPath)},type:li.Logo},this.subscriptions=new ie.List,this.navigationHistory=new ie.List,this.addNavigationStartSubscription(),this.addActivationEndSubscription(),this.addNavigationEndSubscription(),this.subscribeForLogout()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}close(){this.navigation.navigate([{outlets:{popupOutlet:null}}])}onActivate(e){this.navigationHistory.add({url:this.navigation.getOutletUrl(Fn),parentPath:e.getConnectedComponentUrl?e.getConnectedComponentUrl():void 0}),e.hasOwnProperty("isNavigationVisible")&&(e.isNavigationVisible=!1)}onComponentActivate(e){e.data&&e.data.pageId?(this.titleBarOptions.type=li.Static,this.titleBarOptions.text={key:__t.find(i=>i.id===e.data.pageId).text.key},this.componentCustomCssClass=e.data.pageId,this.popupContainerOptions={...this.popupContainerOptions,customComponentCssClass:"".concat(this.popupContainerOptions.customComponentCssClass," ").concat(this.componentCustomCssClass)}):(this.componentCustomCssClass="",this.titleBarOptions.type=li.Logo,this.popupContainerOptions={...this.popupContainerOptions,customComponentCssClass:"".concat(this.popupContainerOptions.customComponentCssClass," ").concat(this.componentCustomCssClass)})}getLeftButton(){return this.titleBarOptions.hideBackButton()?void 0:this.titleBarOptions.leftButton}addNavigationStartSubscription(){const e=this.subscribeToNavigation(fh,i=>{"popstate"===i.navigationTrigger&&(this.popStateNavigation={id:i.id,url:i.url})});this.subscriptions.add(e)}addActivationEndSubscription(){const e=this.subscribeToNavigation(Yx,i=>{i.snapshot.pathFromRoot.find(r=>r.outlet===Fn)&&0===i.snapshot.children.length&&this.onComponentActivate(i.snapshot)});this.subscriptions.add(e)}addNavigationEndSubscription(){const e=this.subscribeToNavigation(as,i=>{this.popStateNavigation&&this.popStateNavigation.id===i.id&&this.navigationHistory.toArray().splice(this.navigationHistory.length-2)});this.subscriptions.add(e)}subscribeToNavigation(e,i){return this.navigation.events.pipe(bt(r=>r instanceof e)).subscribe(i)}subscribeForLogout(){const e=this.authListenerService.authStatusChangeEvent.pipe(bt(i=>i===er.Logout)).subscribe(()=>{this.logoutNavEndSubscription&&this.logoutNavEndSubscription.unsubscribe();const i=this.subscribeToNavigation(as,()=>{i.unsubscribe(),this.navigation.navigate([{outlets:{[Fn]:null}}])});this.logoutNavEndSubscription=i,this.subscriptions.add(i)});this.subscriptions.add(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Yt),g(xr),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["popup-outlet-wrapper"]],viewQuery:function(e,i){if(1&e&&$e(v_t,7,Ip),2&e){let r;je(r=He())&&(i.outlet=r.first)}},decls:5,vars:3,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","leftButtonOptions","customComponentCssClass","text","buttonCloseClicked",4,"ngIf"],[1,"popup__outlet--content--wrapper"],[3,"activate"],["outlet",""],[3,"popupTitleType","leftButtonOptions","customComponentCssClass","text","buttonCloseClicked"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.close()}),U(1,b_t,1,4,"popup-title-bar",1),p(2,"div",2)(3,"router-outlet",3,4),Y("activate",function(s){return i.onActivate(s)}),m()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("ngIf",i.titleBarOptions))},dependencies:[Ip,Ne,Ji,Wi],styles:[".popup__outlet--wrapper[_ngcontent-%COMP%]{background-size:15rem}.popup__outlet--content--wrapper[_ngcontent-%COMP%]{height:calc(100% - 6rem);width:100%}"]}),n})();const CM=t=>[t];function C_t(t,n){if(1&t&&B(0,"icon-component",4),2&t){const o=_(2);l("ngClass",ne(2,CM,o.textConfig&&o.textConfig.iconClass?o.textConfig.iconClass:""))("icon",o.textConfig.icon)}}const y_t=(t,n)=>[t,n];function S_t(t,n){if(1&t&&(p(0,"p",9),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("ngClass",cn(5,y_t,o.textConfig&&o.textConfig.class?o.textConfig.class:"",o.textConfig&&o.textConfig.icon?"with-icon":"")),d(),ze(" ",yt(2,2,o.text.key,o.text.params)," ")}}function w_t(t,n){if(1&t&&(p(0,"div",6),U(1,C_t,1,4,"icon-component",7)(2,S_t,3,8,"p",8),m()),2&t){const o=_();l("ngClass",ne(3,CM,o.itemContainerConfig?o.itemContainerConfig.class:"")),d(),l("ngIf",o.textConfig&&o.textConfig.icon),d(),l("ngIf",o.text)}}let Yh=(()=>{var t;class n{constructor(){this.currencyTypes=ln,this.EIcons=ve.EIcons}ngOnInit(){switch(this.type){case ln.Chips:this.currencyIcon=ve.EIcons.CHIP;break;case ln.Gems:this.currencyIcon=ve.EIcons.ICON_GEMS}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["currency-label"]],inputs:{value:"value",type:"type",text:"text",valueConfig:"valueConfig",textConfig:"textConfig",itemContainerConfig:"itemContainerConfig"},decls:8,vars:17,consts:[[1,"cgr__wrapper--header-item"],[1,"cgr__container--header-item"],["class","cgr__text--header-item-container",3,"ngClass",4,"ngIf"],[1,"cgr__text--header-item-container","currency",3,"ngClass"],[3,"ngClass","icon"],["data-cy","customRoomContainerBetReward",1,"cgr__text--header-item--value",3,"ngClass"],[1,"cgr__text--header-item-container",3,"ngClass"],[3,"ngClass","icon",4,"ngIf"],["class","cgr__text--header-item",3,"ngClass",4,"ngIf"],[1,"cgr__text--header-item",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),U(2,w_t,3,5,"div",2),p(3,"div",3),B(4,"icon-component",4),p(5,"p",5),H(6),V(7,"formatNumber"),m()()()()),2&e&&(d(2),l("ngIf",i.textConfig||i.text),d(),l("ngClass",ne(11,CM,i.itemContainerConfig?i.itemContainerConfig.class:"")),d(),ni("cgr__text--header--item--icon-",i.type,""),l("ngClass",ne(13,CM,i.valueConfig&&i.valueConfig.iconClass?i.valueConfig.iconClass:""))("icon",i.valueConfig&&i.valueConfig.icon||i.currencyIcon),d(),l("ngClass",ne(15,CM,i.valueConfig&&i.valueConfig.class?i.valueConfig.class:"")),d(),ze(" ",$(7,9,i.value)," "))},dependencies:[Xe,Ne,Dn,qe,Go],styles:["[_nghost-%COMP%]{display:inline-block;vertical-align:top}.cgr__wrapper--header-item[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;justify-content:center;padding:.1rem;text-align:center;flex:1}.cgr__container--header-item[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;height:100%}.cgr__text--header-item[_ngcontent-%COMP%]{font-weight:600;flex:1;font-size:inherit;white-space:nowrap}.cgr__text--header-item.with-icon[_ngcontent-%COMP%]{margin:0 .5rem}.cgr__text--header-item--value[_ngcontent-%COMP%]{font-weight:600;align-items:center;font-size:inherit;direction:ltr!important}.cgr__tier--text-label[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:900;font-size:1.8rem}.cgr__text--header-item-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.cgr__text--header-item-container.currency[_ngcontent-%COMP%]{direction:ltr!important}"],changeDetection:0}),n})(),UC=(()=>{var t;class n{constructor(e,i,r,s){this.thresholdPx=n.defaultThresholdPx,this.isEnabled=wh,this.isRefreshing=!1,this.onTouchStart=a=>{this.isRefreshing||(this.framesIds.touchStart=requestAnimationFrame(()=>{this.pullInProgress=0===this.element.scrollTop,this.isScrolledOverThreshold=!1,this.touchStartY=a.changedTouches[0].screenY,this.cdr.detectChanges()}))},this.onTouchMove=a=>{this.framesIds.touchMove=requestAnimationFrame(()=>{if(this.isRefreshing||!this.pullInProgress)return;const u=a.changedTouches[0].screenY-this.touchStartY;if(u>0&&!this.isVisible&&this.showSpinner(),this.isVisible){if(!this.isScrolledOverThreshold){const h=Math.min(Math.round(u/this.thresholdPx*100),100);this.updateLoadingElement(h)}this.isScrolledOverThreshold=u>this.thresholdPx}this.cdr.detectChanges()})},this.onTouchEnd=a=>{this.isRefreshing||(this.isScrolledOverThreshold?(this.isRefreshing=!0,this.emitRefresh()):this.hideLoading(),this.pullInProgress=!1)},this.element=e.nativeElement,this.viewRef=i,this.ngZone=r,this.cdr=s,this.refresh=new ke,this.timersIds={delete:void 0,showLoading:void 0},this.framesIds={touchStart:void 0,touchMove:void 0,hide:void 0,removeElement:void 0,showLoading:void 0}}ngOnInit(){if(!wh)return;this.element=this.elRef||this.element;const i=this.viewRef.createComponent(vc).hostView.rootNodes[0];this.spinner=i,i.classList.add("pull__refresh--spinner"),this.addListeners()}ngOnDestroy(){for(let e in this.timersIds)this.timersIds.hasOwnProperty(e)&&clearTimeout(this.timersIds[e]);for(let e in this.framesIds)this.timersIds.hasOwnProperty(e)&&cancelAnimationFrame(this.framesIds[e]);this.removeListeners()}setEnabled(e){wh&&(!this.isEnabled&&e?this.enable():this.isEnabled&&!e&&this.disable())}setRefreshing(e){wh&&(!this.isRefreshing&&e?this.showLoading():this.isRefreshing&&!e&&this.hideLoading())}showSpinner(){this.isVisible=!0,this.element.insertBefore(this.spinner,this.element.children[0])}updateLoadingElement(e){this.isVisible&&(this.spinner.style.transform="translate(-50%, ".concat(1.5*e,"%)"),this.spinner.style.opacity="".concat(e/100))}showLoading(){this.isRefreshing||(this.isRefreshing=!0,this.isVisible||this.showSpinner(),this.timersIds.showLoading=setTimeout(()=>{this.framesIds.showLoading=requestAnimationFrame(()=>{this.spinner.classList.add("pull__refresh--show-spinner")}),this.emitRefresh()}))}hideLoading(){this.framesIds.hide=requestAnimationFrame(()=>{this.isVisible&&(this.spinner.classList.add("pull__refresh--hide-spinner"),this.timersIds.delete=setTimeout(()=>{this.framesIds.removeElement=requestAnimationFrame(()=>{this.spinner.parentElement&&this.spinner.parentElement.removeChild(this.spinner),this.spinner.classList.remove("pull__refresh--show-spinner"),this.spinner.classList.remove("pull__refresh--hide-spinner"),this.spinner.style.cssText="",this.isVisible=!1,this.cdr.detectChanges()})},300)),this.isRefreshing=!1,this.cdr.detectChanges()})}emitRefresh(){this.ngZone.run(()=>{this.refresh.emit()})}enable(){this.addListeners()}disable(){this.hideLoading(),this.removeListeners()}addListeners(){this.ngZone.runOutsideAngular(()=>{this.element.addEventListener("touchstart",this.onTouchStart),this.element.addEventListener("touchmove",this.onTouchMove),this.element.addEventListener("touchend",this.onTouchEnd)})}removeListeners(){this.element.removeEventListener("touchstart",this.onTouchStart),this.element.removeEventListener("touchmove",this.onTouchMove),this.element.removeEventListener("touchend",this.onTouchEnd)}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(bs),g(an),g(Re))},t.\u0275dir=qn({type:t,selectors:[["","pull-refresh",""]],inputs:{thresholdPx:"thresholdPx",elRef:"elRef"},outputs:{refresh:"refresh"}}),n})();!function(t){t.defaultThresholdPx=100}(UC||(UC={}));const T_t=["directiveRef"],P_t=["*"];let yM=(()=>{var t;class n{constructor(e){this.thresholdPx=UC.defaultThresholdPx,this.refresh=new ke,this.ref=e}ngAfterContentInit(){this.elRef=this.ref.nativeElement.children[0].children[0]}onRefresh(){this.refresh.emit()}get isRefreshing(){return this.directiveRef.isRefreshing}get isEnabled(){return this.directiveRef.isEnabled}setEnabled(e){this.directiveRef.setEnabled(e)}setRefreshing(e){this.directiveRef.setRefreshing(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t))},t.\u0275cmp=pe({type:t,selectors:[["pull-refresh-component"]],viewQuery:function(e,i){if(1&e&&$e(T_t,5,UC),2&e){let r;je(r=He())&&(i.directiveRef=r.first)}},inputs:{thresholdPx:"thresholdPx"},outputs:{refresh:"refresh"},ngContentSelectors:P_t,decls:3,vars:2,consts:[["pull-refresh","",1,"pull__refresh-cmp-wrapper",3,"thresholdPx","elRef","refresh"],["directiveRef",""]],template:function(e,i){1&e&&(Co(),p(0,"div",0,1),Y("refresh",function(){return i.onRefresh()}),yo(2),m()),2&e&&l("thresholdPx",i.thresholdPx)("elRef",i.elRef)},dependencies:[UC],styles:["[_nghost-%COMP%]{height:100%;width:100%}.pull__refresh-cmp-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"]}),n})();var I_t=ve.EIcons;const Gve=t=>({leveledUp:t}),M_t=t=>({"progress-bar-color-animation-inner":t});let BL=(()=>{var t;class n{constructor(e,i){this.percentage=0,this.currentValue=0,this.nextLevelAt=0,this.previousLevelAt=0,this.currentLevel=0,this.leveledUp=!1,this.EIcons=I_t,this.isAnimationDone=!1,this.translationService=e,this.cdr=i}ngOnChanges(e){e.options&&!e.options.firstChange?this.options.currentValue>this.currentValue&&this.startIncrementNumberAnim(this.options.currentValue):(this.currentValue=this.options.currentValue,this.nextLevelAt=this.options.nextLevelAt,this.previousLevelAt=this.options.previousLevelAt,this.currentLevel=this.options.level,this.percentage=Math.ceil((this.currentValue-this.previousLevelAt)/(this.nextLevelAt-this.previousLevelAt)*100))}ngOnDestroy(){cancelAnimationFrame(this.rafId)}startIncrementNumberAnim(e){this.rafId=requestAnimationFrame(()=>{let i=e-this.currentValue,r=1;i>=100&&this.nextLevelAt>1e3&&(r=Math.pow(10,i.toString().length-2));let s=Math.floor(i/r),a=1,c=setInterval(()=>{this.currentValue+=r,s===a&&(this.currentValue=e),a+=1;let u=(this.currentValue-this.previousLevelAt)/(this.nextLevelAt-this.previousLevelAt)*100;u=u<90?Math.ceil(u):Math.floor(u),(this.percentage<=0&&u>=0||this.percentage>=0&&u>=100)&&(this.nextLevelAt=this.options.nextLevelAt,this.previousLevelAt=this.options.previousLevelAt,this.currentLevel=this.options.level,this.showLevelUpRewards(this.levelRewards)),this.percentage=u,this.currentValue===e&&(this.percentage>=100&&(this.percentage=0),clearInterval(c),this.isAnimationDone=!0,this.levelRewards&&this.showLevelUpRewards(this.levelRewards)),this.cdr.detectChanges()},2e3/s);this.cdr.detectChanges()})}showLevelUpRewards(e){var i,r,s;if(this.leveledUp=!0,e&&(this.levelRewardsLocal={chips:(null===(i=e.items.find(a=>a.type===Fe.TG.ChipPack))||void 0===i?void 0:i.amount)||0,gems:(null===(r=e.items.find(a=>a.type===Fe.TG.GemsPack))||void 0===r?void 0:r.amount)||0,vip:(null===(s=e.items.find(a=>a.type===Fe.TG.Vip))||void 0===s?void 0:s.amount)||0},this.levelRewardsLocal.vip)){const a=this.levelRewardsLocal.vip/Gn.ETime.SecondsPerDay,c=a>1?"TIME.DAYS":"TIME.DAY";this.vipText="".concat(a.toString()," ").concat(this.translationService.instant(c))}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(pi),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["level-animated-bar"]],inputs:{options:"options",levelRewards:"levelRewards",isXPBoosted:"isXPBoosted"},features:[it],decls:13,vars:14,consts:[[1,"level-animated-bar__wrapper"],[1,"level-animated-bar__container--bar"],[1,"level-animated-bar__container--bar-icon",3,"ngClass"],[1,"level-animated-bar__text--level"],[1,"level-animated-bar__container--progress-bar"],[1,"level-animated-bar__container--outer"],[1,"level-animated-bar__container--inner","progress-bar-color-animation-inner",3,"ngClass"],[1,"level-animated-bar__text--values"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"p",3),H(4),m()(),p(5,"div",4)(6,"div",5),B(7,"div",6),m(),p(8,"p",7),H(9),m()(),p(10,"div",2)(11,"p",3),H(12),m()()()()),2&e&&(d(2),l("ngClass",ne(8,Gve,i.leveledUp)),d(2),se(i.currentLevel),d(3),go("width",i.percentage,"%"),l("ngClass",ne(10,M_t,i.isXPBoosted)),d(2),se(i.currentValue+"/"+i.nextLevelAt),d(),l("ngClass",ne(12,Gve,i.leveledUp)),d(2),se(i.currentLevel+1))},dependencies:[Xe],styles:[".level-animated-bar__container--bar-icon.leveledUp[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse .5s linear}@keyframes _ngcontent-%COMP%_pulse{0%{transform:scaleZ(1)}30%{transform:scale3d(.8,.8,.8)}50%{transform:scale3d(1.05,1.05,1.05)}70%{transform:scale3d(.9,.9,.9)}to{transform:scaleZ(1)}}[_nghost-%COMP%]{width:100%;height:100%}.level-animated-bar__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap}.level-animated-bar__container--bar[_ngcontent-%COMP%]{width:100%;height:5rem;display:flex;align-items:center;justify-content:center}.level-animated-bar__container--next-rewards[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;flex-flow:row wrap}.level-animated-bar__container--next-rewards[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.level-animated-bar__container--next-rewards[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{left:0;opacity:0}.level-animated-bar__container--bar-icon[_ngcontent-%COMP%]{position:relative;width:5rem;height:100%;display:flex;justify-content:center;align-items:center}.level-animated-bar__container--bar-icon[_ngcontent-%COMP%]   .level-animated-bar__text--level[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-weight:600}.level-animated-bar__container--progress-bar[_ngcontent-%COMP%]{position:relative;width:calc(100% - 10rem);height:2rem}.level-animated-bar__container--progress-bar[_ngcontent-%COMP%]   .level-animated-bar__container--outer[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:.8rem}.level-animated-bar__container--progress-bar[_ngcontent-%COMP%]   .level-animated-bar__container--inner[_ngcontent-%COMP%]{height:100%;border-radius:.8rem;transition:width linear;will-change:width}.level-animated-bar__container--progress-bar[_ngcontent-%COMP%]   .level-animated-bar__text--values[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}"]}),n})();const O_t=["*"];let Nz=(()=>{var t;class n{constructor(e,i){this.backdropClick=new ke,this.urlService=e,this.cdr=i}ngOnChanges(e){this.url=this.path.prefix?this.urlService.createCdnPath(this.path):this.path.url,this.cdr.detectChanges()}onBackdropClick(){this.backdropClick.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["image-preview-component"]],inputs:{path:"path"},outputs:{backdropClick:"backdropClick"},features:[it],ngContentSelectors:O_t,decls:7,vars:1,consts:[[1,"image--preview__wrapper"],[1,"image--preview__img--wrapper"],["data-cy","galleryPreviewImageBackdrop",1,"image--preview__backdrop",3,"click"],["empty-placeholder","","data-cy","galleryPreviewImage",1,"image--preview__img",3,"imgSrc"],[1,"image--preview__actions--wrapper"],[1,"image--preview__actions"]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"div",1)(2,"div",2),Y("click",function(){return i.onBackdropClick()}),m(),B(3,"img",3),m(),p(4,"div",4)(5,"div",5),yo(6),m()()()),2&e&&(d(3),l("imgSrc",i.url))},dependencies:[$o],styles:[".image--preview__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-flow:column}.image--preview__img[_ngcontent-%COMP%]{position:absolute;max-width:90%;max-height:95%;top:50%;left:50%;transform:translate(-50%,-50%)}.image--preview__img--wrapper[_ngcontent-%COMP%]{position:relative;flex:1}.image--preview__actions--wrapper[_ngcontent-%COMP%]{position:relative;flex-shrink:0;bottom:0;left:0;width:100%}.image--preview__actions[_ngcontent-%COMP%]{padding:1rem}.image--preview__actions[_ngcontent-%COMP%]:empty{display:none}.image--preview__backdrop[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}"],changeDetection:0}),n})();const E_t=["actions"],x_t=(t,n,o)=>({url:t,prefix:n,cacheBusting:o}),A_t=t=>({$implicit:t});function R_t(t,n){if(1&t){const o=Ce();p(0,"image-preview-component",7),Y("backdropClick",function(){return oe(o),re(_(3).onBackdropClick())}),Un(1,8),m()}if(2&t){const o=_(2).$implicit,e=_();l("path",_a(3,x_t,o.url,null==e.cdnPathConfig?null:e.cdnPathConfig.prefix,null==e.cdnPathConfig?null:e.cdnPathConfig.cacheBusting)),d(),l("ngTemplateOutlet",e.actions)("ngTemplateOutletContext",ne(7,A_t,o))}}function k_t(t,n){if(1&t&&(p(0,"div",5),U(1,R_t,2,9,"image-preview-component",6),m()),2&t){const o=n.visibilityState;d(),l("ngIf",o.isInView||o.isPrepared)}}function L_t(t,n){1&t&&U(0,k_t,2,1,"ng-template",4),2&t&&l("contentFragmentWidth",_().fragmentWidth)}let SM=(()=>{var t;class n extends Dh{constructor(e,i){super(),this.ruler=i,this.images=[],this.EIcons=ve.EIcons,this.cdr=e,this.close=new ke}ngOnInit(){super.ngOnInit(),this.subscription=this.ruler.getElementDimension(this.fvc.nativeElement).subscribe(e=>{this.fragmentWidth=e.width,this.cdr.detectChanges()}),this.setCurrent(this.initial||this.images[0])}ngOnChanges(e){var i;null!==(i=e.initial)&&void 0!==i&&i.currentValue&&this.setCurrent(this.initial||this.images[0])}ngOnDestroy(){var e;super.ngOnDestroy(),null===(e=this.subscription)||void 0===e||e.unsubscribe()}setCurrent(e){const i="object"==typeof e?e:this.images[e],r="number"==typeof e?e:this.images.findIndex(s=>s.url===i.url);this.currentIndex=r}onBackdropClick(){this.images.length<=1&&this.onClose()}trackByFn(e,i){return i.url}onClose(){this.close.emit()}updateView(){this.cdr.detectChanges()}onFragmentSnap(e){this.currentIndex=e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(PR))},t.\u0275cmp=pe({type:t,selectors:[["image-slider"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,E_t,5),2&e){let s;je(s=He())&&(i.actions=s.first)}},viewQuery:function(e,i){if(1&e&&$e(Fm,7,$t),2&e){let r;je(r=He())&&(i.fvc=r.first)}},hostBindings:function(e,i){1&e&&Y("keyup.escape",function(){return i.onClose()},0,IN)},inputs:{images:"images",cdnPathConfig:"cdnPathConfig",initial:"initial"},outputs:{close:"close"},features:[Ht,it],decls:4,vars:5,consts:[[1,"image__slider-container"],[3,"vsRenderedFragments","vsEnabled","snapToIndex","fragmentSnap"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"image__slider--close-button",3,"onClick"],["contentFragment","",3,"contentFragmentWidth"],[1,"image__slider-img--wrapper"],[3,"path","backdropClick",4,"ngIf"],[3,"path","backdropClick"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"fragmented-view-controller",1),Y("fragmentSnap",function(s){return i.onFragmentSnap(s)}),U(2,L_t,1,1,null,2),m(),p(3,"button-close",3),Y("onClick",function(){return i.onClose()}),m()()),2&e&&(d(),l("vsRenderedFragments",3)("vsEnabled",!1)("snapToIndex",i.currentIndex),d(),l("ngForOf",i.images)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Ne,qr,Fm,Hb,Ud,Nz],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.image__slider--close-button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem}.image__slider-container[_ngcontent-%COMP%]{width:100%;height:100%;display:block;position:relative}.image__slider-img[_ngcontent-%COMP%]{position:absolute;max-width:90%;max-height:95%;top:50%;left:50%;transform:translate(-50%,-50%)}.image__slider--arrow[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);width:20%;height:100%}.image__slider--arrow.left[_ngcontent-%COMP%]{left:0}.image__slider--arrow.right[_ngcontent-%COMP%]{width:80%;right:0}.image__slider-img--wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"],changeDetection:0}),n})(),NL=(()=>{var t;class n{constructor(e){this.length=new Array(50),this.cdr=e,e.detach()}ngOnInit(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["fireworks"]],decls:3,vars:0,consts:[[1,"fireworks__container"],[1,"fireworks__before"],[1,"fireworks__after"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"div",1)(2,"div",2),m())},styles:["[_nghost-%COMP%]{height:100%;width:100%;display:block}\n\n/*# sourceMappingURL=fireworks.component.ts-angular-inline--7.css.map*/"],changeDetection:0}),n})();const D_t=["container"],B_t=["menuDropdown"],N_t=["toggleButton"],F_t=t=>[t],U_t=(t,n)=>[t,n],Vve=t=>({opened:t});function G_t(t,n){if(1&t){const o=Ce();p(0,"div",5),Y("click",function(i){return oe(o),re(_(2).toggle(i))}),p(1,"div",6,7)(3,"container-component",8)(4,"button-icon",9,2),Y("onClick",function(i){return oe(o),re(_(2).toggle(i))}),m(),p(6,"div",10),yo(7),m()()()()}if(2&t){const o=_(2);d(),l("ngClass",ne(5,F_t,o.currPosition)),d(2),l("ngClass",cn(7,U_t,"menu--dropdown__elements--container__"+o.buttonPaddingDirection,o.containerStyle)),d(),l("ngClass",ne(10,Vve,o.opened))("bclass",o.opened?"menu--dropdown__toggle--button--opened "+o.iconStyle:o.iconStyle)("icon",o.icon)}}function V_t(t,n){1&t&&U(0,G_t,8,12,"div",4),2&t&&l("ngIf",_().opened)}const z_t=t=>({opened:t}),j_t=["*"];let Og=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.position=n.EMenuPosition.BottomRight,this.buttonPaddingDirection=n.EButtonPaddingDirection.Horizontal,this.containerStyle="",this.iconStyle="",this.EIcons=ve.EIcons,this.opened=!1,this.close=()=>{this.currPosition=this.position,this.dropdownContainer&&(this.dropdownContainer.destroy(),this.dropdownContainer=void 0,this.opened=!1,this.cdr.detectChanges())},this.cdr=e,this.scrollHelper=i,this.elementRef=r,this.rootContainerService=s,this.rulerService=a,this.appRef=c}ngOnInit(){this.currPosition=this.position,this.cdr.detach(),this.cdr.detectChanges()}ngAfterViewInit(){this.appSizeSubscription=this.rulerService.getAppSize().subscribe(e=>{this.appSize=e,this.close(),this.cdr.detectChanges()})}ngOnDestroy(){this.appSizeSubscription&&this.appSizeSubscription.unsubscribe()}open(){this.dropdownContainer||(this.currPosition=this.position,this.opened=!0,this.dropdownContainer=this.rootContainerService.addTemplate(this.menuDropdown),this.updateView(),this.setDropdownMenuPosition())}toggle(e){this.dropdownContainer?this.close():this.open(),e.stopPropagation()}setDropdownMenuPosition(){switch(this.currPosition=this.position,this.currPosition){case n.EMenuPosition.BottomRight:this.setPositionBottomRight(),this.isOutOfBoundsVertical()&&this.setPositionTopRight();break;case n.EMenuPosition.TopRight:this.setPositionTopRight(),this.isOutOfBoundsVertical()&&this.setPositionBottomRight();break;case n.EMenuPosition.BottomLeft:this.setPositionBottomLeft(),this.isOutOfBoundsVertical()&&this.setPositionTopLeft();break;case n.EMenuPosition.TopLeft:this.setPositionTopLeft(),this.isOutOfBoundsVertical()&&this.setPositionBottomLeft()}}stopPropagation(e){e.stopPropagation()}setPositionBottomLeft(){this.resetPosition(),this.getDropdownContainerElement().style.left=this.toggleButton.nativeElement.getBoundingClientRect().left+"px",this.getDropdownContainerElement().style.top=this.toggleButton.nativeElement.getBoundingClientRect().top+"px",this.currPosition=n.EMenuPosition.BottomLeft,this.updateView()}setPositionTopLeft(){this.resetPosition(),this.getDropdownContainerElement().style.bottom=this.appSize.height-(this.toggleButton.nativeElement.getBoundingClientRect().top+this.toggleButton.nativeElement.getBoundingClientRect().height)+"px",this.getDropdownContainerElement().style.left=this.toggleButton.nativeElement.getBoundingClientRect().left+"px",this.currPosition=n.EMenuPosition.TopLeft,this.updateView()}setPositionBottomRight(){this.resetPosition(),this.getDropdownContainerElement().style.left=this.toggleButton.nativeElement.getBoundingClientRect().left+"px",this.getDropdownContainerElement().style.top=this.toggleButton.nativeElement.getBoundingClientRect().top+"px",this.currPosition=n.EMenuPosition.BottomRight,this.updateView()}setPositionTopRight(){this.resetPosition(),this.getDropdownContainerElement().style.left=this.toggleButton.nativeElement.getBoundingClientRect().left+"px",this.getDropdownContainerElement().style.bottom=this.appSize.height-(this.toggleButton.nativeElement.getBoundingClientRect().top+this.toggleButton.nativeElement.getBoundingClientRect().height)+"px",this.currPosition=n.EMenuPosition.TopRight,this.updateView()}updateView(){this.appRef.tick(),this.cdr.detectChanges()}resetPosition(){this.getDropdownContainerElement().style.left="",this.getDropdownContainerElement().style.top="",this.getDropdownContainerElement().style.bottom=""}getDropdownContainerElement(){return this.container.nativeElement}isOutOfBoundsVertical(){let e=this.container.nativeElement.getBoundingClientRect();return e.top+e.height>this.appSize.height||e.top<=0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(cr),g($t),g(Ia),g(Ua),g(bp))},t.\u0275cmp=pe({type:t,selectors:[["menu-dropdown"]],viewQuery:function(e,i){if(1&e&&($e(D_t,5,$t),$e(B_t,5,Qa),$e(N_t,5,$t)),2&e){let r;je(r=He())&&(i.container=r.first),je(r=He())&&(i.menuDropdown=r.first),je(r=He())&&(i.toggleButton=r.first)}},inputs:{position:"position",buttonPaddingDirection:"buttonPaddingDirection",containerStyle:"containerStyle",icon:"icon",iconStyle:"iconStyle"},ngContentSelectors:j_t,decls:5,vars:8,consts:[[1,"menu--dropdown__content--wrapper",3,"ngClass"],["data-cy","toggleDropdownButton",1,"menu--dropdown__toggle--button",3,"ngClass","bclass","icon","onClick"],["toggleButton",""],["menuDropdown",""],["class","menu--dropdown__overlay",3,"click",4,"ngIf"],[1,"menu--dropdown__overlay",3,"click"],[1,"menu--dropdown__elements--wrapper",3,"ngClass"],["container",""],[1,"menu--dropdown__elements--container",3,"ngClass"],[1,"menu--dropdown__toggle--button",3,"ngClass","bclass","icon","onClick"],[1,"menu--dropdown__control--buttons"]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"button-icon",1,2),Y("onClick",function(s){return i.toggle(s)}),m(),U(3,V_t,1,1,"ng-template",null,3,ft),m()),2&e&&(l("ngClass",ne(4,z_t,i.opened)),d(),l("ngClass",ne(6,Vve,i.opened))("bclass",i.opened?"menu--dropdown__toggle--button--opened "+i.iconStyle:i.iconStyle)("icon",i.icon))},dependencies:[Xe,Ne,ei,Ga],styles:["[_nghost-%COMP%]{display:block}.menu--dropdown__overlay[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;top:0;left:0;overflow-y:auto;overflow-x:hidden;z-index:10000}.menu--dropdown__content--wrapper[_ngcontent-%COMP%]{position:relative}.menu--dropdown__content--wrapper.opened[_ngcontent-%COMP%]{z-index:10000}.menu--dropdown__elements--wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:1}.menu--dropdown__elements--wrapper.bottomRight[_ngcontent-%COMP%]   .menu--dropdown__elements--container__horizontal[_ngcontent-%COMP%]{transform-origin:top right;display:flex}.menu--dropdown__elements--wrapper.bottomRight[_ngcontent-%COMP%]   .menu--dropdown__elements--container__vertical[_ngcontent-%COMP%]{transform-origin:top right;display:flex;flex-direction:column}.menu--dropdown__elements--wrapper.topRight[_ngcontent-%COMP%]{top:initial;bottom:0;transform-origin:bottom}.menu--dropdown__elements--wrapper.topRight[_ngcontent-%COMP%]   .menu--dropdown__elements--container__horizontal[_ngcontent-%COMP%]{transform-origin:bottom right;display:flex;align-items:flex-end}.menu--dropdown__elements--wrapper.topRight[_ngcontent-%COMP%]   .menu--dropdown__elements--container__vertical[_ngcontent-%COMP%]{transform-origin:bottom right;display:flex;flex-direction:column-reverse}.menu--dropdown__elements--wrapper.bottomLeft[_ngcontent-%COMP%]{transform:translate(calc(-100% + 4rem))}.menu--dropdown__elements--wrapper.bottomLeft[_ngcontent-%COMP%]   .menu--dropdown__elements--container__horizontal[_ngcontent-%COMP%]{transform-origin:top left;display:flex;flex-direction:row-reverse}.menu--dropdown__elements--wrapper.bottomLeft[_ngcontent-%COMP%]   .menu--dropdown__elements--container__vertical[_ngcontent-%COMP%]{transform-origin:top left;display:flex;flex-direction:column;align-items:flex-end}.menu--dropdown__elements--wrapper.topLeft[_ngcontent-%COMP%]{top:initial;bottom:0;transform:translate(calc(-100% + 4rem))}.menu--dropdown__elements--wrapper.topLeft[_ngcontent-%COMP%]   .menu--dropdown__elements--container__horizontal[_ngcontent-%COMP%]{transform-origin:bottom;display:flex;flex-direction:row-reverse;align-items:flex-end}.menu--dropdown__elements--wrapper.topLeft[_ngcontent-%COMP%]   .menu--dropdown__elements--container__vertical[_ngcontent-%COMP%]{transform-origin:bottom;display:flex;flex-direction:column-reverse;align-items:flex-end}.menu--dropdown__elements--container[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_open-menu-dropdown .2s ease forwards}.menu--dropdown__toggle--button[_ngcontent-%COMP%]{position:relative;min-height:3rem;height:100%;margin:0}.menu--dropdown__toggle--button.opened[_ngcontent-%COMP%]{z-index:2}@keyframes _ngcontent-%COMP%_open-menu-dropdown{0%{transform:scale3d(1,.2,1)}to{transform:scaleZ(1)}}"],changeDetection:0}),n})();!function(t){let n;var e;let o;(e=n=t.EMenuPosition||(t.EMenuPosition={})).TopLeft="topLeft",e.TopRight="topRight",e.BottomLeft="bottomLeft",e.BottomRight="bottomRight",function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(o=t.EButtonPaddingDirection||(t.EButtonPaddingDirection={}))}(Og||(Og={}));const H_t=["*"];let FL=(()=>{var t;class n{constructor(){this.isActive=!0}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["menu-dropdown-item-wrapper"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("menu--dropdown--item--wrapper-host",i.isActive)},ngContentSelectors:H_t,decls:1,vars:0,template:function(e,i){1&e&&(Co(),yo(0))},styles:["[_nghost-%COMP%]{display:block}\n\n/*# sourceMappingURL=menu-dropdown-item-wrapper.component.ts-angular-inline--8.css.map*/"],changeDetection:0}),n})(),Fz=(()=>{var t;class n{constructor(e){this.timestampSeconds=Bn.instance.getServerTimeS(),this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["elapsed-time"]],inputs:{timestampSeconds:"timestampSeconds",triggerChange:"triggerChange"},features:[it],decls:4,vars:3,consts:[[1,"elapsed--time--paragraph"]],template:function(e,i){1&e&&(p(0,"p",0)(1,"span"),H(2),V(3,"timeElapsedPipe"),m()()),2&e&&(d(2),se($(3,1,i.timestampSeconds)))},dependencies:[Bm],encapsulation:2,changeDetection:0}),n})();function q_t(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.selectedReason.text))}}function W_t(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.select.placeholder))}}function $_t(t,n){if(1&t&&(Tn(0),p(1,"div",9),U(2,q_t,3,3,"p",10)(3,W_t,3,3,"p",10),m(),Pn()),2&t){const o=_();d(2),l("ngIf",o.selectedReason),d(),l("ngIf",!o.selectedReason)}}function K_t(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit;d(),se($(2,1,o.text))}}const Z_t=t=>({"report__custom-select__option__selected":t});function Q_t(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",12),Y("select",function(i){return oe(o),re(_(2).onSelectedReason(i))}),p(1,"div",13),U(2,K_t,3,3,"p",10),m()()}if(2&t){const o=n.$implicit,e=_(2);l("value",o),d(),l("ngClass",ne(3,Z_t,e.selectedReason&&e.selectedReason===o)),d(),l("ngIf",o.text)}}function Y_t(t,n){if(1&t&&U(0,Q_t,3,5,"custom-select-item",11),2&t){const o=_();l("ngForOf",o.reportReasons)("ngForTrackBy",o.trackOptionByFn)}}let Uz=(()=>{var t;class n{constructor(e,i){this.reportReasons=[],this.report=new ke,this.selectorOptions=[],this.buttonModifier=ve.EButtonModifier,this.select={type:rd.EControlType.Input,placeholder:{key:"PROFILE.CHOOSE_REASON"}},this.cdr=e,this.config=i}ngOnInit(){this.reportReasons.forEach(e=>this.selectorOptions.push(e)),this.cdr.detach(),this.cdr.detectChanges()}onSelectedReason(e){this.selectedReason=e,this.cdr.detectChanges()}emitReport(){this.report.emit(this.selectedReason.value)}trackOptionByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Dr))},t.\u0275cmp=pe({type:t,selectors:[["report"]],inputs:{reportReasons:"reportReasons",reportText:"reportText"},outputs:{report:"report"},decls:19,vars:13,consts:[[1,"report__container--content"],[1,"report__container--upper-text"],[1,"report__container--middle-text"],[1,"report__container--select"],[1,"report__custom-select",3,"buttonCustomCss"],["selectedItem",""],["options",""],[1,"report__container--button"],["data-cy","reportPopupReportButton",1,"ticket-popup__button",3,"buttonModifier","disabled","onClick"],[1,"report__selected-option"],[4,"ngIf"],["data-cy","customSelectOption",3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","customSelectOption",3,"value","select"],[1,"report__custom-select__option",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"p"),H(3),V(4,"translate"),m()(),p(5,"div",2)(6,"p"),H(7),V(8,"translate"),m()(),p(9,"div",3)(10,"custom-select",4),U(11,$_t,4,2,"ng-template",null,5,ft)(13,Y_t,1,2,"ng-template",null,6,ft),m()(),p(15,"div",7)(16,"button-text",8),Y("onClick",function(){return i.emitReport()}),H(17),V(18,"translate"),m()()()),2&e&&(d(3),se(yt(4,6,i.reportText.key,i.reportText.params)),d(4),se($(8,9,"PROFILE.REPORT_REASON")),d(3),l("buttonCustomCss","report__custom-select__extend--button"),d(6),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("disabled",!i.selectedReason),d(),ze(" ",$(18,11,"BUTTON.REPORT")," "))},dependencies:[Xe,Mt,Ne,Up,Vd,pn,qe],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.report__container--content[_ngcontent-%COMP%]{width:100%;height:calc(100% - 6rem);display:flex;flex-flow:column nowrap}.report__container--upper-text[_ngcontent-%COMP%]{width:100%;height:40%;display:flex;justify-content:center;align-items:center;font-size:1.8rem;padding:1rem 3rem}@media only screen and (max-width: 768px){.report__container--upper-text[_ngcontent-%COMP%]{font-size:1.4rem}}.report__container--upper-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{text-align:center}.report__container--middle-text[_ngcontent-%COMP%]{position:relative;width:100%;height:10%;min-height:4rem;display:flex;justify-content:center;align-items:center;font-size:1.8rem;padding:1rem}@media only screen and (max-width: 768px){.report__container--middle-text[_ngcontent-%COMP%]{font-size:1.4rem}}.report__container--select[_ngcontent-%COMP%]{width:100%;height:15%;min-height:5rem;display:flex;justify-content:center;align-items:center;padding:1rem 0}.report__container--select[_ngcontent-%COMP%]   .custom-select[_ngcontent-%COMP%]{width:50%;min-width:22rem}.report__container--button[_ngcontent-%COMP%]{width:100%;height:10rem;display:flex;justify-content:center;align-items:center;padding:1rem 0}.report__container--button[_ngcontent-%COMP%]   .ticket-popup__button[_ngcontent-%COMP%]{width:15rem}.report__custom-select[_ngcontent-%COMP%]{width:25rem}"],changeDetection:0}),n})();const J_t=["tooltipArrow"],X_t=["tooltip"];function evt(t,n){1&t&&Un(0,6),2&t&&l("ngTemplateOutlet",_(2).templateRef)}const tvt=(t,n)=>({"max-width.px":t,"max-height.px":n});function nvt(t,n){if(1&t&&(p(0,"div",3,4),U(2,evt,1,1,"ng-container",5),m()),2&t){const o=_();l("ngStyle",cn(2,tvt,o.maxDimensions.width,o.maxDimensions.height)),d(2),l("ngIf",o.templateRef)}}const ivt=t=>({"left.px":t});let Gz=(()=>{var t;class n{constructor(e,i,r){this.rulerService=e,this.cdr=i,this.destroy=new ke,this.show=!0,this.id="tooltipComponent",this.tooltipOffset={},this.tooltipPadding=10,this.elementRef=r}ngAfterViewInit(){this.subscription=this.rulerService.getAppSize().pipe(Qi(1)).subscribe(e=>{let i=e;if(this.maxDimensions=this.maxDimensionsConfig?{width:this.maxDimensionsConfig.width/100*i.width-this.tooltipMinMargin,height:this.maxDimensionsConfig.height/100*i.height-this.tooltipMinMargin,offsetWidth:i.offsetWidth,offsetHeight:i.offsetHeight}:{width:.55*i.width,height:.45*i.height,offsetWidth:i.offsetWidth,offsetHeight:i.offsetHeight},this.cdr.detectChanges(),this.setToolTipPosition(this.clickEvent,this.elementRef.nativeElement,i),this.tooltipElementRef){let r=this.tooltipElementRef.nativeElement;i.width-(this.tooltipOffset.transformRightValue+r.clientWidth)<this.tooltipMinMargin&&(r.style.maxWidth=e.width-this.tooltipOffset.transformRightValue-this.tooltipMinMargin+"px",this.cdr.detectChanges()),i.width-(this.tooltipOffset.transformLeftValue+r.clientWidth)<this.tooltipMinMargin&&(r.style.maxWidth=e.width-this.tooltipOffset.transformLeftValue-this.tooltipMinMargin+"px",this.cdr.detectChanges()),i.height-(this.tooltipOffset.transformBottomValue+r.clientHeight)<this.tooltipMinMargin&&(r.style.maxHeight=i.height-this.tooltipOffset.transformBottomValue-this.tooltipMinMargin+"px",this.cdr.detectChanges()),i.height-(this.tooltipOffset.transformTopValue+r.clientHeight)<this.tooltipMinMargin&&(r.style.maxHeight=i.height-this.tooltipOffset.transformTopValue-this.tooltipMinMargin+"px",this.cdr.detectChanges())}})}hide(){this.destroy.emit()}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}setToolTipPosition(e,i,r){const s=e.clientX<r.width/2?UL.ToRight:UL.ToLeft,a=e.clientY<r.height/2?GL.ToBottom:GL.ToTop;let c,u=i.children.namedItem("tooltip__arrow");s===UL.ToRight?(this.tooltipOffset.transformLeftValue=Math.max(this.getLeftOffset(e,i,u),this.tooltipMinMargin),i.style.left=this.tooltipOffset.transformLeftValue+"px",u.setAttribute("style","left:\n                    ".concat(e.clientX-(this.tooltipMinMargin+this.tooltipPadding)<=this.tooltipPadding?this.tooltipPadding:e.clientX-this.tooltipOffset.transformLeftValue-u.clientWidth/2,"px")),c="0"):(this.tooltipOffset.transformRightValue=Math.max(this.getRightOffset(e,i,u,r),this.tooltipMinMargin),i.style.right=this.tooltipOffset.transformRightValue+"px",u.setAttribute("style","right:\n                    ".concat(r.width-e.clientX-(this.tooltipMinMargin+this.tooltipPadding)<=this.tooltipPadding?this.tooltipPadding:r.width-this.tooltipOffset.transformRightValue-e.clientX-u.clientWidth/2,"px")),c="100%"),c+=" ",a===GL.ToBottom?(this.tooltipOffset.transformTopValue=e.clientY+u.clientHeight/2,i.style.top=this.tooltipOffset.transformTopValue+"px",c+="0"):(this.tooltipOffset.transformBottomValue=r.height-e.clientY+u.clientHeight/2,i.style.bottom=this.tooltipOffset.transformBottomValue+"px",c+="100%"),i.style.transformOrigin=c,i.classList.add(s,a)}getLeftOffset(e,i,r){return e.clientX-.25*i.offsetWidth-r.clientWidth/2}getRightOffset(e,i,r,s){return s.width-e.clientX-.25*i.offsetWidth-r.clientWidth/2}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ua),g(Re),g($t))},t.\u0275cmp=pe({type:t,selectors:[["tooltip-component"]],viewQuery:function(e,i){if(1&e&&($e(J_t,7,$t),$e(X_t,5,$t)),2&e){let r;je(r=He())&&(i.tooltipArrowElement=r.first),je(r=He())&&(i.tooltipElementRef=r.first)}},hostVars:3,hostBindings:function(e,i){2&e&&(VF("id",i.id),Uo("tooltip_host",i.show))},inputs:{templateRef:"templateRef",maxDimensionsConfig:"maxDimensionsConfig",clickEvent:"clickEvent",tooltipMinMargin:"tooltipMinMargin"},outputs:{destroy:"destroy"},decls:3,vars:4,consts:[["class","tooltip__container--content",3,"ngStyle",4,"ngIf"],["id","tooltip__arrow",1,"tooltip__arrow",3,"ngStyle"],["tooltipArrow",""],[1,"tooltip__container--content",3,"ngStyle"],["tooltip",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(e,i){1&e&&(U(0,nvt,3,5,"div",0),B(1,"div",1,2)),2&e&&(l("ngIf",i.maxDimensions),d(),l("ngStyle",ne(2,ivt,i.tooltipArrowStyle)))},dependencies:[Ne,qr,Cm],styles:['[_nghost-%COMP%]{display:inline-block;position:absolute;background:rgba(0,0,0,.9);border-radius:1rem;z-index:999999;animation:_ngcontent-%COMP%_toolTip .15s;animation-timing-function:cubic-bezier(.53,.05,.15,1.39);animation-fill-mode:forwards}[_nghost-%COMP%]   .tooltip__arrow[_ngcontent-%COMP%]{position:absolute;top:-.575rem;left:25%;content:"";width:1rem;height:1rem;transform:rotate(45deg)}.toTop[_nghost-%COMP%]   .tooltip__arrow[_ngcontent-%COMP%]{top:initial;bottom:-.575rem;transform:rotate(225deg)}.toLeft[_nghost-%COMP%]   .tooltip__arrow[_ngcontent-%COMP%]{left:initial;right:25%}[_nghost-%COMP%]   .tooltip__container--content[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;overflow:auto}@keyframes _ngcontent-%COMP%_toolTip{0%{transform:scale(.75)}to{transform:scale(1)}}.tooltip__container--content[_ngcontent-%COMP%]{padding:1rem}'],changeDetection:0}),n})(),zve=(()=>{var t;class n{constructor(e,i,r,s){this.injector=e,this.rulerService=i,this.rootContainerService=r,this.appRef=s}openTooltip(e,i,r,s){if(this.tooltipComponentRef)return;this.tooltipComponentRef=this.rootContainerService.createComponent(Gz,{injector:this.injector});const a=this.tooltipComponentRef.destroy.bind(this.tooltipComponentRef);this.tooltipComponentRef.instance.templateRef=i,this.tooltipComponentRef.instance.clickEvent=e,this.tooltipComponentRef.instance.tooltipMinMargin=s,r&&(this.tooltipComponentRef.instance.maxDimensionsConfig=r),this.appRef.tick();const c=this.tooltipComponentRef.instance.destroy.subscribe(()=>{u()}),u=()=>{this.tooltipComponentRef&&(window.removeEventListener("click",h,!0),window.removeEventListener("touchstart",h,!0),window.removeEventListener("mousewheel",h,!0),b&&b.unsubscribe(),c&&c.unsubscribe(),a(),setTimeout(()=>{this.tooltipComponentRef=void 0},500))},h=w=>{(w instanceof WheelEvent||window.TouchEvent&&w instanceof TouchEvent)&&w.composedPath()&&w.composedPath().find(R=>"tooltipComponent"===R.id)||u()};window.addEventListener("click",h,!0),window.addEventListener("touchstart",h,!0),window.addEventListener("mousewheel",h,!0);const b=this.rulerService.change().subscribe(u);return this.tooltipComponentRef.destroy=u,this.tooltipComponentRef}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs),T(Ua),T(Ia),T(bp))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var UL=function(t){return t.ToRight="toRight",t.ToLeft="toLeft",t}(UL||{}),GL=function(t){return t.ToBottom="toBottom",t.ToTop="toTop",t}(GL||{});let Eg=(()=>{var t;class n{constructor(e,i){this.elementRef=e,this.tooltipService=i,this.minMargin=10}ngOnDestroy(){this.closeDirective()}closeDirective(){this.tooltipComponent&&this.tooltipComponent.destroy()}onClick(e){this.tooltipDisabled||(this.tooltipComponent=this.tooltipService.openTooltip(e,this.tooltipTemplate,this.tooltipMaxDimensions,this.minMargin),this.tooltipComponent&&this.tooltipComponent.onDestroy(()=>{this.tooltipComponent=void 0}))}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(zve))},t.\u0275dir=qn({type:t,selectors:[["","tooltip",""]],hostBindings:function(e,i){1&e&&Y("click",function(s){return i.onClick(s)})},inputs:{tooltipTemplate:"tooltipTemplate",tooltipDisabled:"tooltipDisabled",tooltipMaxDimensions:"tooltipMaxDimensions",minMargin:"minMargin"},features:[mn([zve])]}),n})(),Vz=(()=>{var t;class n{constructor(e,i,r){this.ids=[],this.isLoading=!0,this.subscriptions=new ie.List,this.cdr=e,this.friendsService=i,this.store=r,this.friendsListState=r.friends.selectFriendsListState()}ngOnInit(){var e=this;return f(function*(){e.cdr.detach(),e.buildFriendsByIds(),e.subscriptions.add(e.store.friends.subscribeFriendsListState().subscribe(i=>{e.friendsListState=i,e.cdr.detectChanges()}));try{yield e.friendsService.requestFriends()}catch(i){console.warn(i),e.error=[{textKey:"ERRORS.CONNECTION_ERROR"}]}finally{e.cdr.detectChanges()}})()}ngOnChanges(e){e.ids&&!e.ids.firstChange&&(this.buildFriendsByIds(),this.cdr.detectChanges())}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}buildFriendsByIds(){this.friends=this.store.friends.selectFriends().filter(e=>!!this.ids.find(i=>i===e.id)).map(e=>new Lo(e.profile)),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Tu),g(Jo))},t.\u0275cmp=pe({type:t,selectors:[["friends-avatars-list"]],inputs:{ids:"ids",avatarConfig:"avatarConfig"},features:[it],decls:1,vars:4,consts:[[1,"friends-avatars-list__list-cmp",3,"avatarConfig","users","isLoading","error"]],template:function(e,i){1&e&&B(0,"avatars-list",0),2&e&&l("avatarConfig",i.avatarConfig)("users",i.friends)("isLoading",i.friendsListState.loadingState.isLoading)("error",i.error)},dependencies:[NC],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.friends-avatars-list__list-cmp[_ngcontent-%COMP%]{max-width:30rem}@media only screen and (max-width: 567px){.friends-avatars-list__list-cmp[_ngcontent-%COMP%]{width:100%}}"],changeDetection:0}),n})();var ovt=ve.EIcons,rvt=_M.EButtonIconAnimation;const svt=t=>({name:t}),avt=()=>({key:"CLUBS.CLUBS_LIST_PAGE_TITLE"});let zz=(()=>{var t;class n{constructor(e,i,r,s){this.bclass="",this.iconNames=ovt,this.subscriptions=new ie.List,this.onNewMessage=()=>{clearTimeout(this.newMessageTimeout),this.newMessageReceived=!1,this.newMessageTimeout=setTimeout(()=>{this.newMessageReceived=!0,this.updateView()}),this.newMessageReceived=!0,this.updateView()},this.onCountUpdate=a=>{const c=this.count,u=a;this.count=u,u>c&&(this.notificationButtonIconComponent.startAnimation(rvt.Pulse),this.onNewMessage()),this.updateView()},this.store=e,this.cdr=i,this.clubsService=r,this.permissionsService=s,i.detach()}ngOnInit(){this.updateView(),this.subscriptions.add(this.store.clubs.subscribePendingJoinRequestsCount().subscribe(this.onCountUpdate)),this.subscriptions.add(this.store.clubs.subscribeClubProfileId().subscribe(e=>{this.isInClub=!!e,this.updateView()}))}ngOnDestroy(){clearTimeout(this.newMessageTimeout),this.subscriptions.forEach(e=>e.unsubscribe())}openClubs(){this.clubsService.openCurrentClubPage(!0)}updateView(){this.cdr.detectChanges()}onDisabledButtonClick(){this.permissionsService.getActionPermission(nt.EPermissionModule.PublicClub,nt.EModuleAction.Open,{showFailedRequirements:!0}),this.updateView()}canOpenClubs(){return this.permissionsService.getModulePermission(nt.EPermissionModule.Clubs).isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Re),g(Au),g(Pi))},t.\u0275cmp=pe({type:t,selectors:[["clubs-button"]],viewQuery:function(e,i){if(1&e&&$e(au,5),2&e){let r;je(r=He())&&(i.notificationButtonIconComponent=r.first)}},inputs:{bclass:"bclass"},decls:3,vars:15,consts:[[1,"clubs__btn--notification--button",3,"bclass","icon","title","text","isNotificationShown","disabled","notificationValue","onClick","onDisabledClick"]],template:function(e,i){1&e&&(p(0,"notification-button-icon",0),Y("onClick",function(){return i.openClubs()})("onDisabledClick",function(){return i.onDisabledButtonClick()}),V(1,"translate"),V(2,"numberLimit"),m()),2&e&&l("bclass",i.bclass+(i.count>0?" notification-button__active":""))("icon",ne(12,svt,i.isInClub?i.iconNames.CLUB_INFO_BOTTOM_BAR:i.iconNames.CLUB_BROWSE_BOTTOM_BAR))("title",$(1,7,"CLUBS.BROWSE_CLUBS"))("text",pt(14,avt))("isNotificationShown",!!i.count)("disabled",!i.canOpenClubs())("notificationValue",yt(2,9,i.count,99))},dependencies:[au,qe,L_],styles:[".clubs__btn--notification--button[_ngcontent-%COMP%]{display:block;width:45%;margin:auto;height:100%}\n\n/*# sourceMappingURL=clubs-button.component.ts-angular-inline--9.css.map*/"],changeDetection:0}),n})();const cvt=["wrapper"];let ip=(()=>{var t;class n{constructor(e,i){this.initialState=n.EState.Show,this.EState=n.EState,this.listeners=[],this.icon=ve.EIcons.ArrowUp,this.onClick=new ke,this.cdr=e,this.elRef=i}ngOnInit(){this.displayProperty=this.elRef.nativeElement.style.display,this.applyStateChange(this.state,this.initialState),this.cdr.detach()}ngOnDestroy(){this.removeAllListeners()}show(){this.applyStateChange(this.state,n.EState.Show)}hide(){this.applyStateChange(this.state,n.EState.Hide)}handleClick(){this.onClick.emit()}applyStateChange(e,i){if(this.state===i)return;this.state=i,this.stateStyleClass=e?"from-".concat(e,"-to-").concat(i):i,this.cdr.detectChanges();const r=this.elRef.nativeElement,s=this.wrapper.nativeElement;if(e){const a=u=>{u.target===s&&(this.removeListener(s,"animationend",a),this.removeListener(s,"animationcancel",c),i===n.EState.Hide&&(r.style.display="none"))},c=u=>{u.target===s&&(this.removeListener(s,"animationend",a),this.removeListener(s,"animationcancel",c))};i===n.EState.Show&&(r.style.display=this.displayProperty),this.addListener(s,"animationend",a),this.addListener(s,"animationcancel",c)}else i===n.EState.Hide&&(r.style.display="none")}addListener(e,i,r){e.addEventListener(i,r),this.listeners.push({target:e,event:i,cb:r})}removeListener(e,i,r){e.removeEventListener(i,r),this.listeners=this.listeners.filter(s=>s.target===e&&s.event===i&&s.cb===r)}removeAllListeners(){this.listeners.forEach(e=>e.target.removeEventListener(e.event,e.cb)),this.listeners=[]}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g($t))},t.\u0275cmp=pe({type:t,selectors:[["new-content-component"]],viewQuery:function(e,i){if(1&e&&$e(cvt,5),2&e){let r;je(r=He())&&(i.wrapper=r.first)}},inputs:{initialState:"initialState",text:"text"},outputs:{onClick:"onClick"},decls:6,vars:7,consts:[["click-feedback","","data-cy","loadNewContentButton",1,"cg__new-rooms-content",3,"ngClass","scaleFactor","click"],["wrapper",""],[1,"cg__new-rooms-icon",3,"icon"],[1,"cg__new-rooms-text"]],template:function(e,i){1&e&&(p(0,"div",0,1),Y("click",function(){return i.handleClick()}),B(2,"icon-component",2),p(3,"p",3),H(4),V(5,"translate"),m()()),2&e&&(l("ngClass",i.stateStyleClass)("scaleFactor",.96),d(2),l("icon",i.icon),d(2),se(yt(5,4,i.text.key,i.text.params)))},dependencies:[Xe,po,Dn,qe],styles:["[_nghost-%COMP%]{height:100%}.visible[_ngcontent-%COMP%], .cg__new-rooms-content.from-hide-to-show[_ngcontent-%COMP%], .cg__new-rooms-content.show[_ngcontent-%COMP%]{cursor:pointer}.hidden[_ngcontent-%COMP%], .cg__new-rooms-content.from-show-to-hide[_ngcontent-%COMP%], .cg__new-rooms-content.hide[_ngcontent-%COMP%]{pointer-events:none}.cg__new-rooms-content[_ngcontent-%COMP%]{height:100%;position:relative;display:flex;justify-content:center;align-items:flex-end}.cg__new-rooms-content.show[_ngcontent-%COMP%]{transform:translateY(0)}.cg__new-rooms-content.hide[_ngcontent-%COMP%]{opacity:0;transform:translateY(-100%)}.cg__new-rooms-content.from-hide-to-show[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_newRoomsShow 1s linear forwards}.cg__new-rooms-content.from-hide-to-show[_ngcontent-%COMP%]   .cg__new-rooms-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_newRoomsArrow 3s ease 1s forwards}.cg__new-rooms-content.from-show-to-hide[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_newRoomsHide .3s ease-in-out forwards}@keyframes _ngcontent-%COMP%_newRoomsShow{0%{opacity:0;transform:translateY(-100%)}20%{opacity:1;transform:translateY(0)}40%{transform:translateY(-20%)}60%{transform:translateY(0)}80%{transform:translateY(-5%)}to{transform:translateY(0)}}@keyframes _ngcontent-%COMP%_newRoomsHide{to{opacity:0;transform:translateY(-100%)}}.cg__new-rooms-text[_ngcontent-%COMP%]{font-size:1.4rem}.cg__new-rooms-icon[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;font-size:1.4rem;transform:translate(-50%,70%)}@keyframes _ngcontent-%COMP%_newRoomsArrow{0%,30%,60%,90%,to{transform:translate(-50%,70%)}15%{transform:translate(-50%)}45%{transform:translate(-50%,20%)}75%{transform:translate(-50%,40%)}}"],changeDetection:0}),n})();function hvt(t,n){1&t&&B(0,"number",3),2&t&&l("value",_().count)}!function(t){let n;var o;(o=n=t.EState||(t.EState={})).Show="show",o.Hide="hide"}(ip||(ip={}));const mvt=t=>({name:t});let GC=(()=>{var t;class n{constructor(e){this.count=0,this.isLoading=!1,this.isInteractable=!0,this.showCounter=!0,this.style=n.EStyle.Dark,this.like=new ke,this.EIcons=ve.EIcons,this.cdr=e,e.detach()}ngOnInit(){this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}addLike(){this.isInteractable&&this.like.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["like-component"]],hostAttrs:[1,"like-component-host"],inputs:{count:"count",isLoading:"isLoading",isInteractable:"isInteractable",showCounter:"showCounter",style:"style"},outputs:{like:"like"},features:[it],decls:3,vars:8,consts:[[1,"like__button--wrapper",3,"ngClass"],["data-cy","likeButton",1,"like__element",3,"icon","bclass","loading","sound","onClick"],["class","like__button--counter","data-cy","likeCounter",3,"value",4,"ngIf"],["data-cy","likeCounter",1,"like__button--counter",3,"value"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"button-icon-text",1),Y("onClick",function(){return i.addLike()}),U(2,hvt,1,1,"number",2),m()()),2&e&&(l("ngClass",i.style),d(),l("icon",ne(6,mvt,i.EIcons.HEART))("bclass","like__button")("loading",i.isLoading)("sound","like"),d(),l("ngIf",i.showCounter))},dependencies:[Xe,Ne,Qr,so],styles:["[_nghost-%COMP%]{display:block}.like__button--wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.like__button--counter[_ngcontent-%COMP%]{font-size:.8em;margin:0 .25rem;font-weight:300}.like__element[_ngcontent-%COMP%]{display:flex;width:auto;min-width:auto;height:auto;min-height:auto;margin:initial;font-size:1.2em}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EStyle||(t.EStyle={})).Light="light",o.Dark="dark"}(GC||(GC={}));var jz=function(t){return t.featureKey="imageSlider",t}(jz||{}),Hz=function(t){return t.OpenImageSlider="[Image Slider Container] Open Image Slider",t.CloseImageSlider="[Image Slider Container] Close Image Slider",t}(Hz||{});const Hve=he(Hz.OpenImageSlider,{_as:"props",_p:void 0}),qve=he(Hz.CloseImageSlider);let wM=(()=>{var t;class n{constructor(e,i){this.imageSliderTemplate$=new sn,this.store=e,this.urlService=i}open(e,i={}){let r=e,s=i.initial;i.cdnPathConfig&&(r=r.map(a=>({...a,url:this.urlService.createCdnPath({...i.cdnPathConfig,url:a.url})})),s&&(s={...s,url:this.urlService.createCdnPath({...i.cdnPathConfig,url:s.url})})),this.store.dispatch(Hve({data:{images:r,initial:s}}))}close(){this.store.dispatch(qve()),this.imageSliderTemplate$.next(void 0)}openComponentInContainer(e){this.close(),this.imageSliderTemplate$.next(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(ii))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const fvt=["imageSlider"];function gvt(t,n){1&t&&yo(0)}const _vt=["*"];let qz=(()=>{var t;class n{constructor(e){this.imageSliderContainerService=e,this.events=new tc}ngAfterViewInit(){this.imageSliderContainerService.openComponentInContainer({templateRef:this.templateRef,cmp:this.cmp,onDestroy:e=>new ie.EventListener(this.events,"destroy",e)})}ngOnDestroy(){this.events.emit("destroy"),this.events.removeAllListeners()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(wM))},t.\u0275cmp=pe({type:t,selectors:[["image-slider-wrapper"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,SM,5),2&e){let s;je(s=He())&&(i.cmp=s.first)}},viewQuery:function(e,i){if(1&e&&$e(fvt,5,Qa),2&e){let r;je(r=He())&&(i.templateRef=r.first)}},ngContentSelectors:_vt,decls:2,vars:0,consts:[["imageSlider",""]],template:function(e,i){1&e&&(Co(),U(0,gvt,1,0,"ng-template",null,0,ft))},encapsulation:2,changeDetection:0}),n})();const vvt=["leftActions"],bvt=["rightActions"];function Cvt(t,n){}function yvt(t,n){}let Wz=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["image-preview-actions-container"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,vvt,5),Ho(r,bvt,5)),2&e){let s;je(s=He())&&(i.leftActions=s.first),je(s=He())&&(i.rightActions=s.first)}},decls:5,vars:2,consts:[[1,"image--preview__actions-wrapper--container"],[1,"image--preview__actions-wrapper","left"],[3,"ngTemplateOutlet"],[1,"image--preview__actions-wrapper","right"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),U(2,Cvt,0,0,"ng-template",2),m(),p(3,"div",3),U(4,yvt,0,0,"ng-template",2),m()()),2&e&&(d(2),l("ngTemplateOutlet",i.leftActions),d(2),l("ngTemplateOutlet",i.rightActions))},dependencies:[qr],styles:[".image--preview__actions-wrapper--container[_ngcontent-%COMP%]{display:flex;width:100%}.image--preview__actions-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1}.image--preview__actions-wrapper.left[_ngcontent-%COMP%]{justify-content:flex-start}.image--preview__actions-wrapper.right[_ngcontent-%COMP%]{justify-content:flex-end}"],changeDetection:0}),n})();const Svt=[MR];let $z=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[{provide:jb,useFactory:()=>({showArrows:!Qt.getInstance.isMobileApp(),showScrollbar:!1})}],imports:[Svt,MR]}),n})(),Wve=(()=>{class n{constructor(e){this.engagementId=e,this.id=(n.id++).toString(),this.brazeLocationPropertyName="brazeUrlChange_".concat(this.id),this.brazeUrlChangeEvent="brazeLocation_".concat(this.id),window[this.brazeLocationPropertyName]=this}get ancestorOrigins(){return location.ancestorOrigins}get hash(){return location.hash}set hash(e){location.hash=e}get host(){return location.host}set host(e){location.host=e}get hostname(){return location.hostname}set hostname(e){location.hostname=e}get href(){return location.href}set href(e){this.dispatchUrlChangeEvent(e)}get origin(){return location.origin}get pathname(){return location.pathname}set pathname(e){this.dispatchUrlChangeEvent(e)}get port(){return location.port}set port(e){location.port=e}get protocol(){return location.protocol}set protocol(e){location.protocol=e}get search(){return location.search}set search(e){location.search=e}toString(){return location.toString()}assign(e){this.dispatchUrlChangeEvent(e.toString())}reload(){location.reload()}replace(e){this.dispatchUrlChangeEvent(e.toString())}onUrlChange(e){return new ie.EventListener(window,this.brazeUrlChangeEvent,r=>{e(r.detail.url)})}patchLocation(e){return e.replaceAll("top.location.href","parent.".concat(this.brazeLocationPropertyName,".href"))}destroy(){delete window[this.brazeLocationPropertyName]}dispatchUrlChangeEvent(e){const i=new CustomEvent(this.brazeUrlChangeEvent,{detail:{url:e,engagementId:this.engagementId}});window.dispatchEvent(i)}}return n.id=0,n})();const wvt=["elRef"];let VL=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.brazeEngagementService=e,this.brazeBridgeFactory=i,this.rulerService=r,this.destroyRef=s,this.viewContainerRef=a,this.forwardingService=c,this.hiddenShopService=u,this.appService=h,this.timerConfig=new yl(D_).useYearsConfig({min:Rt.Months,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useMonthsConfig({min:Rt.Days,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useDaysConfig({min:Rt.Hours,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).build()}ngOnInit(){const e=this.engagement.data,i=document.createElement("iframe");this.brazeLocation=new Wve(this.engagement.id);const r=this.brazeLocation.patchLocation(e.message);this.urlChangeEventListener=this.brazeLocation.onUrlChange(a=>{ef.isHiddenShopLink(a)?this.hiddenShopService.openShop({openedFrom:"brazeImageMessage",value:a,brazeEngagementId:this.engagement.id,parameters:{giftable:this.engagement.args.giftable}}):(0,ie.isAbsoluteLink)(a)?this.appService.openExternalUrl(a):this.forwardingService.forward(a)}),i.srcdoc=r,i.style.border="none",i.style.width="100%",i.style.height="100%",i.style.display="none";const s=this.elRef.nativeElement;i.addEventListener("load",()=>this.onIframeLoaded(i,e)),s.appendChild(i)}ngOnDestroy(){var e,i;cancelAnimationFrame(this.rafId),null===(e=this.urlChangeEventListener)||void 0===e||e.detach(),null===(i=this.brazeLocation)||void 0===i||i.destroy()}onIframeLoaded(e,i){this.engagement.trackShown(),e.style.display="block",e.contentDocument.body.style.overflow="hidden",this.removeCloseButton(e.contentDocument.body),this.overrideBzBackgroundStyles(e.contentDocument.body),this.overrideBzModalStyles(e.contentDocument.body),this.setupBrazeBridgeForIFrame(e,i),this.rulerService.getElementDimension(this.elRef.nativeElement).pipe(mi(this.destroyRef)).subscribe(r=>{cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.overrideBzModalStyles(e.contentDocument.body)})}),this.engagement.isExpirable()&&this.addTimerComponent(e)}setupBrazeBridgeForIFrame(e,i){const r=this.brazeBridgeFactory.createBrazeBridge(i);r.closeMessage=()=>{this.brazeEngagementService.handleEngagementClosed(this.engagement)},e.contentWindow.appboyBridge=r,e.contentWindow.brazeBridge=r}removeCloseButton(e){const i=e.getElementsByClassName("bz-sctn")[0];null==i||i.remove()}overrideBzBackgroundStyles(e){const i=e.getElementsByClassName("bz-background")[0];i&&(i.style.background="transparent")}getModalElement(e){if(e)return e.contentDocument.getElementsByClassName("bz-modal")[0]}overrideBzModalStyles(e){const i=e.getElementsByClassName("bz-modal")[0];i&&(i.style.width="100%",i.style.height="100%",i.style.maxWidth="100%",i.style.maxHeight="100%",i.style.backgroundSize="cover")}addTimerComponent(e){const i=this.getModalElement(e);if(!i)return;const r=this.viewContainerRef.createComponent(Fs);r.instance.timerConfig=this.timerConfig,r.instance.milliseconds=1e3*this.engagement.getTimeLeft();const s=r.hostView.rootNodes[0];s.classList.add("braze-banner__timer"),e.contentDocument.head.insertAdjacentHTML("beforeend","\n            <style>\n                .braze-banner__timer {\n                    position: absolute;\n                    bottom: 8%;\n                    right: 3%;\n                    color: white;\n                    font-size: 28px;\n                    font-weight: bold;\n\n                    @media only screen and (max-width: 568px) and (orientation: portrait) {\n                        font-size: 20px;\n                    }\n\n                    @media only screen and (max-width: 980px) and (orientation: landscape) {\n                        font-size: 18px;\n                    }\n                }\n            </style>"),i.appendChild(s),r.instance.start()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(U_),g(Sae),g(Ua),g(br),g(bs),g($d),g(ef),g(Qt))},t.\u0275cmp=pe({type:t,selectors:[["braze-tile-message"]],viewQuery:function(e,i){if(1&e&&$e(wvt,7),2&e){let r;je(r=He())&&(i.elRef=r.first)}},inputs:{engagement:"engagement"},decls:2,vars:0,consts:[[1,"braze-tile-msg"],["elRef",""]],template:function(e,i){1&e&&B(0,"div",0,1)},styles:[".braze-tile-msg[_ngcontent-%COMP%]{width:100%;height:100%}\n\n/*# sourceMappingURL=braze-message.component.ts-angular-inline--11.css.map*/"],changeDetection:0}),n})();const Tvt=["carousel"];function Pvt(t,n){if(1&t){const o=Ce();p(0,"image-message-wrapper",6),Y("destroy",function(i){return oe(o),re(_(3).destroyChildComponent(i))}),m()}2&t&&l("params",_(2).$implicit)}function Ivt(t,n){1&t&&B(0,"braze-tile-message",7),2&t&&l("engagement",_(2).$implicit)}function Mvt(t,n){if(1&t&&(Tn(0),U(1,Pvt,1,1,"image-message-wrapper",5)(2,Ivt,1,1),Pn()),2&t){const o=_().$implicit,e=_();d(),Qo(1,e.isDDNAPromotion(o)?1:2)}}function Ovt(t,n){1&t&&(Tn(0),U(1,Mvt,3,1,"ng-container",4),Pn())}const Evt=t=>({showBackdrop:t});let Kz=(()=>{var t;class n{constructor(e,i,r){this.ddnaEngagementManager=e,this.brazeEngagementService=i,this.swipePeriod=1e4,this.maxBannersCount=5,this.promotions=[],this.ddnaEngagementManager=e,this.cdr=r}ngOnInit(){this.subscription=wp([this.ddnaEngagementManager.containerPromotions,this.brazeEngagementService.containerMessages]).pipe(Lse(2e3),jn(([e,i])=>[...null!=e?e:[],...null!=i?i:[]])).subscribe(e=>{var i,r;null!==(i=this.promotions)&&void 0!==i&&i.length||null==e||!e.length?null!==(r=this.promotions)&&void 0!==r&&r.length&&!(null!=e&&e.length)&&this.setCarouselIsVisible({visible:!1,animate:!0}):this.setCarouselIsVisible({visible:!0,animate:!0}),this.updateList(e)})}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}updateList(e){this.promotions=(e?[...e].reverse():[]).slice(0,this.maxBannersCount),this.cdr.detectChanges()}destroyChildComponent(e){this.ddnaEngagementManager.onBannerDestroy(e)}setCarouselIsVisible(e){this.carousel.nativeElement.style.transform="translateX(".concat(e.visible?0:100,"%)"),this.carousel.nativeElement.style.transition=e.animate?"transform .2s":""}isDDNAPromotion(e){return e instanceof Xse}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Um),g(U_),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ddna-banner-container"]],viewQuery:function(e,i){if(1&e&&$e(Tvt,7,$t),2&e){let r;je(r=He())&&(i.carousel=r.first)}},inputs:{swipePeriod:"swipePeriod",maxBannersCount:"maxBannersCount"},decls:4,vars:5,consts:[[1,"ddna--banner__carousel--container",3,"ngClass"],["carousel",""],[1,"ddna--banner__carousel",3,"interval"],[4,"ngFor","ngForOf"],[4,"carouselItem"],[3,"params"],[3,"params","destroy"],[3,"engagement"]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"carousel",2),U(3,Ovt,2,0,"ng-container",3),m()()),2&e&&(l("ngClass",ne(3,Evt,null==i.promotions?null:i.promotions.length)),d(2),l("interval",i.swipePeriod),d(),l("ngForOf",i.promotions))},dependencies:[Xe,Mt,qse,V4,nM,VL],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.ddna--banner__carousel--container[_ngcontent-%COMP%]{width:100%;height:100%;transform:translate(100%)}.ddna--banner__carousel--container.showBackdrop[_ngcontent-%COMP%]{background-color:#000}.ddna--banner__carousel[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),n})();var k0=function(t){return t.Facebook="facebook",t.Google="google",t.Twitter="twitter",t.Instagram="instagram",t.Youtube="youtube",t.Tiktok="tiktok",t}(k0||{}),L0=ve.EIcons;const xvt=t=>({name:t});function Avt(t,n){if(1&t){const o=Ce();p(0,"button-icon",2),Y("onClick",function(){return re(oe(o).$implicit.onClickCallback())}),V(1,"translate"),m()}if(2&t){const o=n.$implicit;l("bclass","social-media-link_icon "+o.name)("icon",ne(5,xvt,o.icon))("title",$(1,3,o.title))}}let Zz=(()=>{var t;class n{constructor(e,i,r,s){this.socialMediaToSkip=[],this.socialPagesUrls=[],this.iconNames=L0,this.appService=e,this.appLanguage=i,this.clientConfigService=r,this.permissionsService=s}ngOnInit(){this.initializeSocialMediaLinks()}initializeSocialMediaLinks(){Object.keys(this.clientConfigService.getConfig().social.networks).filter(e=>{const i=this.clientConfigService.getConfig().social.networks[e].pageUrl;return!this.socialMediaToSkip.find(r=>r===e)&&i}).forEach(e=>{const i=this.clientConfigService.getConfig().social.networks[e].pageUrl;let r,s=e;switch(e){case k0.Facebook:r=L0.FACEBOOK;break;case k0.Instagram:r=L0.INSTAGRAM;break;case k0.Youtube:r=L0.YOUTUBE;break;case k0.Twitter:r=L0.TWITTER;break;case k0.Tiktok:r=L0.TIKTOK}const a={name:s,icon:r,title:"SOCIAL_NETWORKS."+e.toUpperCase(),id:(0,ie.uuidV4)(),onClickCallback:()=>{this.appService.openExternalUrl(i)}};this.socialPagesUrls.push(a)}),this.isBlogButtonPermitted=this.permissionsService.getActionPermission(nt.EPermissionModule.ExternalLinks,nt.EModuleAction.OpenBlogPage).isEnabled}trackByFn(e,i){return i.id}openBlogPage(){this.appService.openExternalUrl("https://".concat(this.clientConfigService.getConfig().platform.staticPagesDomain,"/blog/").concat(this.appLanguage.getAppLanguage()))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(Ma),g(Zt),g(Ti))},t.\u0275cmp=pe({type:t,selectors:[["social-media-links"]],inputs:{socialMediaToSkip:"socialMediaToSkip"},decls:2,vars:2,consts:[[1,"social-media-links-container"],["class","social-media-link",3,"bclass","icon","title","onClick",4,"ngFor","ngForOf","ngForTrackBy"],[1,"social-media-link",3,"bclass","icon","title","onClick"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,Avt,2,7,"button-icon",1),m()),2&e&&(d(),l("ngForOf",i.socialPagesUrls)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,ei,qe],styles:[".social-media-links-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-evenly}.social-media-link[_ngcontent-%COMP%]{font-size:1em!important}"],changeDetection:0}),n})(),D0=(()=>{var t;class n extends Qr{constructor(){super(...arguments),this.isActive=!0,this.EIcons=ve.EIcons}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["club-contribution-icon-component"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("club-contribution-icon",i.isActive)},features:[Ht],decls:2,vars:2,consts:[[1,"club-contribution-icon__icon",3,"icon"],[1,"club-contribution-icon__number",3,"value"]],template:function(e,i){1&e&&B(0,"icon-component",0)(1,"number",1),2&e&&(l("icon",i.EIcons.CLUB_PAGE),d(),l("value",i.value))},dependencies:[Dn,Qr],styles:["[_nghost-%COMP%]{display:flex;align-items:center}.club-contribution-icon__icon[_ngcontent-%COMP%], .club-contribution-icon__number[_ngcontent-%COMP%]{margin:0 .2rem}"],changeDetection:0}),n})();const Rvt=["buttons"];function kvt(t,n){if(1&t&&(p(0,"p",18),B(1,"number",19),H(2," /"),B(3,"number",19),m()),2&t){const o=_(3);d(),l("value",null==o.data.progressBarData?null:o.data.progressBarData.currentProgress),d(2),l("value",null==o.data.progressBarData?null:o.data.progressBarData.goalAmount)}}function Lvt(t,n){if(1&t&&(p(0,"div",15),B(1,"progress-bar",16),U(2,kvt,4,2,"p",17),m()),2&t){const o=_(2);Uo("no-progress-text",o.data.progressBarData.hideAmountText),d(),l("animationOn",o.data.progressBarData.starsAnimationEnabled)("progressBarConfig",o.progressBarConfig),d(),l("ngIf",!o.data.progressBarData.hideAmountText)}}function Dvt(t,n){1&t&&Un(0)}function Bvt(t,n){1&t&&B(0,"img",20),2&t&&l("src",_(2).data.imageUrl,Wn)}function Nvt(t,n){1&t&&B(0,"icon-component",21),2&t&&l("icon",_(2).data.svgImageUrl)}function Fvt(t,n){1&t&&Un(0)}function Uvt(t,n){if(1&t&&(p(0,"span",22),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.data.description))}}function Gvt(t,n){1&t&&yo(0)}const Vvt=t=>[t];function zvt(t,n){if(1&t&&(p(0,"span",26),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),ze("",yt(2,1,o.data.rewardText.key,ne(4,Vvt,o.data.rewardText.params)),":")}}function jvt(t,n){1&t&&(p(0,"span",26),H(1),V(2,"translate"),m()),2&t&&(d(),ze("",$(2,1,"LABEL.REWARD"),":"))}function Hvt(t,n){if(1&t&&(p(0,"div",23),U(1,zvt,3,6,"span",24)(2,jvt,3,3,"span",24),B(3,"reward-component",25),m()),2&t){const o=_(2);d(),l("ngIf",o.data.rewardText),d(),l("ngIf",!o.data.rewardText),d(),l("reward",o.data.rewards)}}function qvt(t,n){}function Wvt(t,n){1&t&&U(0,qvt,0,0,"ng-template",32),2&t&&l("ngTemplateOutlet",_().$implicit.templateRef)}function $vt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit;d(),se($(2,1,o.textKey))}}function Kvt(t,n){if(1&t){const o=Ce();p(0,"button-text",29,30),Y("onClick",function(){return re(oe(o).$implicit.action())}),U(2,Wvt,1,1,null,31)(3,$vt,3,3,"span",31),m()}if(2&t){const o=n.$implicit;l("bclass",o.bclass?o.bclass+" pib__button--bclass":"pib__button--bclass")("buttonScaleFactor",o.scaleFactor)("disabled",o.disabled)("loading",o.loading)("buttonModifier",o.buttonModifier),Hn("data-cy","bonusPopupClaimButton"+(o.disabled?"Timer":"")),d(2),l("ngIf",o.templateRef),d(),l("ngIf",!o.templateRef)}}function Zvt(t,n){if(1&t&&(p(0,"div",27),U(1,Kvt,4,8,"button-text",28),m()),2&t){const o=_(2);d(),l("ngForOf",o.data.buttons)}}function Qvt(t,n){if(1&t&&(p(0,"div",1),U(1,Lvt,3,5,"div",2),p(2,"div",3)(3,"div",4),U(4,Dvt,1,0,"ng-container",5)(5,Bvt,1,1,"ng-template",null,6,ft)(7,Nvt,1,1,"ng-template",null,7,ft),m(),p(9,"div",8)(10,"div",9)(11,"span"),H(12),V(13,"translate"),m()(),p(14,"div",10),U(15,Fvt,1,0,"ng-container",5)(16,Uvt,3,3,"ng-template",null,11,ft)(18,Gvt,1,0,"ng-template",null,12,ft),m(),U(20,Hvt,4,3,"div",13),m()(),U(21,Zvt,2,1,"div",14),m()),2&t){const o=Kt(6),e=Kt(8),i=Kt(17),r=Kt(19),s=_();d(),l("ngIf",s.data.progressBarData),d(),Uo("no-progress-bar",!s.data.progressBarData),d(2),l("ngIf",s.data.svgImageUrl)("ngIfThen",e)("ngIfElse",o),d(8),se($(13,12,s.data.title)),d(3),l("ngIf",s.data.description)("ngIfThen",i)("ngIfElse",r),d(5),l("ngIf",s.data.rewards),d(),l("ngIf",s.data.buttons)}}const Yvt=["*"];let pd=(()=>{var t;class n{constructor(e){this.animationService=e}ngOnChanges(e){var i;null!=e&&null!==(i=e.data)&&void 0!==i&&null!==(i=i.currentValue)&&void 0!==i&&i.progressBarData&&(this.progressBarConfig={areValuesShown:!1,progressPartitions:[{value:e.data.currentValue.progressBarData.currentProgress,widthCoefficient:e.data.currentValue.progressBarData.currentProgress},{value:e.data.currentValue.progressBarData.goalAmount,widthCoefficient:e.data.currentValue.progressBarData.goalAmount-e.data.currentValue.progressBarData.currentProgress}]})}playCurrencyClaimAnimation(){var e;const i=null===(e=this.buttons)||void 0===e?void 0:e.first;if(i){const r=dr.buildBoundingRect(i.nativeElement),s=dr.buildCurrencyTypesFromRewards(this.data.rewards);this.animationService.playAnimations(s,r)}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["progress-info-box"]],viewQuery:function(e,i){if(1&e&&$e(Rvt,5,$t),2&e){let r;je(r=He())&&(i.buttons=r)}},inputs:{data:"data"},features:[it],ngContentSelectors:Yvt,decls:1,vars:1,consts:[["class","pib__wrapper",4,"ngIf"],[1,"pib__wrapper"],["class","pib__container--progress-bar",3,"no-progress-text",4,"ngIf"],[1,"pib__container--info"],[1,"pib__container--image"],[4,"ngIf","ngIfThen","ngIfElse"],["defaultImgContainer",""],["svgImgContainer",""],[1,"pib__container--desc-actions"],["data-cy","bonusPopupBonusTitle",1,"pib__container--title"],["data-cy","bonusPopupBonusDescription",1,"pib__container--description"],["text",""],["content",""],["class","pib__container--reward",4,"ngIf"],["class","pib__container--actions",4,"ngIf"],[1,"pib__container--progress-bar"],["blinking-stars","","data-cy","progressBar",1,"pib__progress-bar",3,"animationOn","progressBarConfig"],["class","pib__text--progress-bar",4,"ngIf"],[1,"pib__text--progress-bar"],[3,"value"],["data-cy","bonusPopupBonusIcon",3,"src"],[1,"pib__svg-icon-cmp",3,"icon"],[1,"pib__text--description"],[1,"pib__container--reward"],["class","pib__container--reward--text",4,"ngIf"],["data-cy","bonusPopupBonusReward",1,"pib__reward-value",3,"reward"],[1,"pib__container--reward--text"],[1,"pib__container--actions"],["class","pib__button",3,"bclass","buttonScaleFactor","disabled","loading","buttonModifier","onClick",4,"ngFor","ngForOf"],[1,"pib__button",3,"bclass","buttonScaleFactor","disabled","loading","buttonModifier","onClick"],["buttons",""],[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(e,i){1&e&&(Co(),U(0,Qvt,22,14,"div",0)),2&e&&l("ngIf",i.data)},dependencies:[Mt,Ne,qr,zb,Dn,Qr,uf,pn,cu,qe],styles:[".pib__wrapper[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column nowrap}.pib__container--progress-bar[_ngcontent-%COMP%]{margin:1.5rem 1.5rem 0;display:flex;flex-flow:column nowrap;align-items:flex-end}.pib__container--progress-bar.no-progress-text[_ngcontent-%COMP%]{margin:1.5rem 1.5rem 1rem}.pib__progress-bar[_ngcontent-%COMP%]{position:relative}.pib__text--progress-bar[_ngcontent-%COMP%]{margin-top:.5rem}.pib__container--info[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.pib__container--info.no-progress-bar[_ngcontent-%COMP%]{margin-top:1rem}.pib__container--image[_ngcontent-%COMP%]{width:30%;min-height:8rem;display:flex;justify-content:center;align-items:center}.pib__container--image[_ngcontent-%COMP%] > img[_ngcontent-%COMP%], .pib__container--image[_ngcontent-%COMP%]   .pib__svg-icon-cmp[_ngcontent-%COMP%]{max-width:7rem;max-height:7rem}.pib__container--image[_ngcontent-%COMP%]   .pib__svg-icon-cmp[_ngcontent-%COMP%]{width:100%;height:100%}.pib__container--desc-actions[_ngcontent-%COMP%]{width:70%;display:flex;flex-flow:column nowrap}.pib__container--title[_ngcontent-%COMP%]{margin-bottom:.5rem;font-weight:700;font-size:1.8rem;text-transform:uppercase;padding-right:1rem}.pib__container--reward[_ngcontent-%COMP%], .pib__container--actions[_ngcontent-%COMP%]{margin-bottom:1rem}.pib__container--description[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:1rem}.pib__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}.pib__container--actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center}.pib__button[_ngcontent-%COMP%]{width:100%;margin:.5rem 1rem}.pib__container--reward[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-items:flex-start;align-items:flex-start;font-weight:700}.pib__reward-value[_ngcontent-%COMP%]{font-size:2rem}"],changeDetection:0}),n})();const Jvt=["*"];let B0=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["colored-container"]],ngContentSelectors:Jvt,decls:2,vars:0,consts:[[1,"colored-container"]],template:function(e,i){1&e&&(Co(),p(0,"div",0),yo(1),m())},changeDetection:0}),n})();function Xvt(t,n){if(1&t&&(p(0,"span"),H(1),m()),2&t){const o=_();d(),ze("(",o.timeRemainingSeconds,")")}}const ebt=t=>[t];let Qz=(()=>{var t;class n{constructor(e,i,r){this.ngZone=e,this.cdr=i,this.clientConfig=r,this.deleteEnabledDelay=0,this.delete=new ke,this.cancel=new ke,this.timeRemainingSeconds=0,this.popupTitleTypes=li,this.EButtonModifier=ve.EButtonModifier,this.close=new sn,this.popupContainerOptions={styleProperties:{maxWidth:"41rem",maxHeight:"96vh",height:"auto"}},this.gameName=this.clientConfig.getConfig().platform.name}ngOnInit(){this.deleteEnabledDelay?this.startTimer(this.deleteEnabledDelay):this.isEnabled=!0}ngOnDestroy(){this.close.next(),clearInterval(this.interval)}startTimer(e){this.timeRemainingSeconds=e,clearInterval(this.interval),this.ngZone.runOutsideAngular(()=>{this.interval=setInterval(()=>{this.timeRemainingSeconds--,this.isEnabled=0===this.timeRemainingSeconds,this.isEnabled&&clearInterval(this.interval),this.cdr.detectChanges()},1e3)}),this.cdr.detectChanges()}onClose(){this.close.next()}onCancel(){this.cancel.emit()}onDelete(){this.delete.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(an),g(Re),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["delete-account-popup"]],inputs:{deleteEnabledDelay:"deleteEnabledDelay",isLoading:"isLoading"},outputs:{delete:"delete",cancel:"cancel"},decls:15,vars:20,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","buttonCloseClicked"],[1,"delete--account__wrapper"],[1,"delete--account__text"],[1,"delete--account__buttons"],[1,"delete-account__btn",3,"loading","buttonModifier","disabled","onClick"],[4,"ngIf"],[1,"delete-account__btn",3,"buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.onClose()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.onClose()}),m(),p(2,"div",2)(3,"p",3)(4,"span"),H(5),V(6,"translate"),m()(),p(7,"div",4)(8,"button-text",5),Y("onClick",function(){return i.onDelete()}),U(9,Xvt,2,1,"span",6),H(10),V(11,"translate"),m(),p(12,"button-text",7),Y("onClick",function(){return i.onCancel()}),H(13),V(14,"translate"),m()()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Logo),d(4),se(yt(6,11,"DELETE_ACCOUNT.DELETE_TEXT",ne(18,ebt,i.gameName))),d(3),l("loading",i.isLoading)("buttonModifier",i.EButtonModifier.BUTTON_NEGATIVE)("disabled",!i.isEnabled),d(),l("ngIf",i.timeRemainingSeconds>0),d(),ze("",$(11,14,"DELETE_ACCOUNT.DELETE_CONFIRM_BUTTON")," "),d(2),l("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION),d(),se($(14,16,"DELETE_ACCOUNT.CANCEL_DELETE")))},dependencies:[Ne,pn,Ji,Wi,qe],styles:[".delete--account__wrapper[_ngcontent-%COMP%]{padding:0 2rem;max-height:calc(96vh - 6rem)}.delete--account__text[_ngcontent-%COMP%]{max-height:calc(96vh - 18rem);text-align:center;font-size:1.8rem}@media only screen and (max-width: 768px){.delete--account__text[_ngcontent-%COMP%]{font-size:1.4rem}}.delete-account__btn[_ngcontent-%COMP%]{margin:1rem auto;max-width:30rem}.delete--account__buttons[_ngcontent-%COMP%]{padding:.5rem 0}"],changeDetection:0}),n})();const tbt=["deleteAccount"];let Yz=(()=>{var t;class n{constructor(e,i,r,s,a){this.cdr=e,this.authService=i,this.toaster=r,this.navigation=s,this.constants=a,this.close=new sn}ngOnInit(){this.closeSubscription=this.cmp.close.pipe($u()).subscribe(()=>this.close.next())}ngOnDestroy(){var e;null===(e=this.closeSubscription)||void 0===e||e.unsubscribe(),this.close.next()}delete(){var e=this;return f(function*(){try{e.isLoading=!0,e.cdr.detectChanges(),yield e.authService.deleteAccount(),e.authService.logout().catch(i=>console.log(i)),e.close.next(),e.navigation.navigateByUrl(e.constants.defaultNotLoggedRoute)}catch(i){e.toaster.error(i instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}finally{e.isLoading=!1,e.cdr.detectChanges()}})()}cancel(){this.close.next()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Tg),g(Dt),g(Yt),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["delete-account-popup-smart"]],viewQuery:function(e,i){if(1&e&&$e(tbt,7),2&e){let r;je(r=He())&&(i.cmp=r.first)}},decls:2,vars:2,consts:[[3,"deleteEnabledDelay","isLoading","delete","cancel"],["deleteAccount",""]],template:function(e,i){1&e&&(p(0,"delete-account-popup",0,1),Y("delete",function(){return i.delete()})("cancel",function(){return i.cancel()}),m()),2&e&&l("deleteEnabledDelay",9)("isLoading",i.isLoading)},dependencies:[Qz],encapsulation:2,changeDetection:0}),n})();const nbt=["scrollButton"],ibt=["scrollFragmentsContainer"],obt=t=>({"scroll-button-control__fragmet__current":t});function rbt(t,n){if(1&t){const o=Ce();p(0,"div",7),Y("click",function(){const r=oe(o).index;return re(_().scrollToIndex(r))}),H(1),V(2,"translate"),m()}if(2&t){const o=n.$implicit,e=n.index,i=_();l("ngClass",ne(5,obt,e===i.currentIndex)),d(),ze(" ",yt(2,2,o.textKey.key,o.textKey.params),"")}}let zL=(()=>{var t;class n{constructor(e){this.cdr=e,this.changeRound=new ke,this.currentIndex=0,this.animationDuration=.15}ngOnChanges(e){e.initialIndex&&e.initialIndex.currentValue&&e.initialIndex.firstChange&&this.scrollToIndex(this.initialIndex)}scrollToIndex(e){e>this.fragments.length||e<0||e===this.currentIndex||(Zr.set(this.scrollFragmentsContainer.nativeElement,{x:0,xPercent:-33*(this.currentIndex-1),yPercent:0}),Zr.set(this.scrollButton.nativeElement,{x:0,y:0,xPercent:-50,yPercent:-50}),Zr.to(this.scrollButton.nativeElement,{duration:this.animationDuration,xPercent:e<this.currentIndex?-150:50,ease:"none",onComplete:()=>{this.currentIndex=e,this.changeRound.emit(this.currentIndex),this.cdr.detectChanges()}}),Zr.to(this.scrollButton.nativeElement,{delay:this.animationDuration,duration:this.animationDuration,xPercent:-50,yPercent:-50,ease:"none"}),Zr.to(this.scrollFragmentsContainer.nativeElement,{delay:this.animationDuration,duration:this.animationDuration,xPercent:-33*(e-1),yPercent:0,ease:"none"}))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["scroll-button-control"]],viewQuery:function(e,i){if(1&e&&($e(nbt,7),$e(ibt,7)),2&e){let r;je(r=He())&&(i.scrollButton=r.first),je(r=He())&&(i.scrollFragmentsContainer=r.first)}},inputs:{initialIndex:"initialIndex",fragments:"fragments"},outputs:{changeRound:"changeRound"},features:[it],decls:7,vars:1,consts:[[1,"scroll-button-control__container__"],[1,"scroll-button-control__container"],[1,"scroll-button-control__button"],["scrollButton",""],[1,"scroll-button-control__fragmets--container"],["scrollFragmentsContainer",""],["class","scroll-button-control__fragmet",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"scroll-button-control__fragmet",3,"ngClass","click"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"div",2,3),p(4,"div",4,5),U(6,rbt,3,7,"div",6),m()()()),2&e&&(d(6),l("ngForOf",i.fragments))},dependencies:[Xe,Mt,qe],styles:[".scroll-button-control__container[_ngcontent-%COMP%]{width:calc(100% - 1rem);height:3rem;position:absolute;display:flex}.scroll-button-control__button[_ngcontent-%COMP%]{position:absolute;width:33%;top:50%;left:50%;transform:translate(-50%,-50%);height:130%}.scroll-button-control__fragmets--container[_ngcontent-%COMP%]{width:100%;z-index:1}.scroll-button-control__container[_ngcontent-%COMP%]{display:flex}"],changeDetection:0}),n})();var TM=function(t){return t.Opened="opened",t.Closed="closed",t}(TM||{});const sbt=t=>({drawerUp:t}),abt=["*"];let Sv=(()=>{var t;class n{constructor(e){this.drawerStateType=TM,this.state=TM.Closed,this.changeDetectorRef=e,this.changeDetectorRef.detach()}ngOnInit(){this.changeDetectorRef.detectChanges()}open(){this.next(TM.Opened)}close(){this.next(TM.Closed)}next(e){this.state=e,this.changeDetectorRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["bottom-drawer-component"]],ngContentSelectors:abt,decls:2,vars:3,consts:[[1,"bottom-drawer",3,"ngClass"]],template:function(e,i){1&e&&(Co(),p(0,"div",0),yo(1),m()),2&e&&l("ngClass",ne(1,sbt,i.state.toString()===i.drawerStateType.Opened))},dependencies:[Xe],styles:[".bottom-drawer[_ngcontent-%COMP%]{position:absolute;width:100%;height:35%;left:0;z-index:100;bottom:-35%;overflow-y:hidden;font-size:1.4rem;transform:translateZ(0);transition:transform .5s ease}.bottom-drawer.drawerUp[_ngcontent-%COMP%]{transform:translate3d(0,-100%,0)}@media screen and (min-width: 1025px){.bottom-drawer[_ngcontent-%COMP%]{font-size:1.8rem}}@media screen and (min-width: 1367px){.bottom-drawer[_ngcontent-%COMP%]{font-size:2.4rem}}@media screen and (max-width: 1367px){.bottom-drawer[_ngcontent-%COMP%]{height:45%;bottom:-45%}}@media screen and (max-width: 980px) and (orientation: landscape){.bottom-drawer[_ngcontent-%COMP%]{height:70%;bottom:-70%}}"]}),n})();function cbt(t,n){if(1&t){const o=Ce();p(0,"div",3)(1,"p"),H(2),V(3,"translate"),m(),p(4,"toggle-button",4),Y("stateChange",function(i){const s=oe(o).$implicit;return re(_().handleStateChanged({state:i,id:s.id}))}),m()()}if(2&t){const o=n.$implicit;d(2),se($(3,2,o.name)),d(2),l("state",o.state)}}let PM=(()=>{var t;class n{constructor(e,i,r,s){this.popupTitleTypes=li,this.analytics=s,this.analyticsDevicePlatform=new Ap,this.store=r,this.changeDetectorRef=e,this.onListItemSelect=new ke,this.onSettingChanged=new ke,this.settingsService=i}ngOnInit(){this.options=new ie.UniqueList([{id:Oo.GameSoundsEnabled,name:"SETTINGS.GAME_SOUNDS",state:this.settingsService.getInGameMusic(),setState:e=>{this.settingsService.setInGameMusic(e);const i=new Tl.SettingsChangedEvent(Nn.Settings,"changed",{option:od.GameSounds,action:e.toString(),platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});this.analytics.sendEvent(i),this.onSettingChanged.emit({sound:e})}},{id:Oo.ClientSoundsEnabled,name:"SETTINGS.SOUNDS",state:this.settingsService.getSounds(),setState:e=>{this.settingsService.setSounds(e);const i=new Tl.SettingsChangedEvent(Nn.Settings,"changed",{option:od.Sounds,action:e.toString(),platform:this.analyticsDevicePlatform.getPlatform(),userLevel:this.store.selectUserState().profile.level});this.analytics.sendEvent(i)}}]),this.changeDetectorRef.detectChanges()}handleStateChanged(e){this.options.findById(e.id).setState(e.state),this.changeDetectorRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(nc),g(Jo),g(yi))},t.\u0275cmp=pe({type:t,selectors:[["settings-drawer"]],inputs:{backgroundList:"backgroundList",chosenBgIndex:"chosenBgIndex"},outputs:{onListItemSelect:"onListItemSelect",onSettingChanged:"onSettingChanged"},decls:3,vars:1,consts:[[1,"settings-drawer__wrapper"],[1,"settings-drawer__container--toggles"],["class","settings__drawer-toggle",4,"ngFor","ngForOf"],[1,"settings__drawer-toggle"],[1,"toggle",3,"state","stateChange"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),U(2,cbt,5,4,"div",2),m()()),2&e&&(d(2),l("ngForOf",i.options))},dependencies:[Mt,M0,qe],styles:[".settings-drawer__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;justify-content:center;align-items:center}.settings-drawer__container--top-bar[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;width:100%;height:5rem!important;z-index:1}@media only screen and (max-width: 768px){.settings-drawer__container--top-bar[_ngcontent-%COMP%]{height:3rem!important}}.settings-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.settings-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem}@media only screen and (max-width: 768px){.settings-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.settings-drawer__container--toggles[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;min-height:4rem}@media only screen and (orientation: landscape){.settings-drawer__container--toggles[_ngcontent-%COMP%]{flex-flow:row wrap}}.settings__drawer-toggle[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.settings__drawer-toggle[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{min-width:15rem;font-size:1.4rem;margin-right:1rem;text-transform:uppercase;text-align:center}@media only screen and (max-width: 480px){.settings__drawer-toggle[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.2rem;flex:2}}@media only screen and (max-width: 480px){.settings__drawer-toggle[_ngcontent-%COMP%]   .toggle[_ngcontent-%COMP%]{flex:1}}.settings-drawer__container--background-select[_ngcontent-%COMP%]{width:100%;height:70%;padding:.5rem 0;max-width:154rem;max-height:calc(70% - 2rem)}@media only screen and (max-width: 768px){.settings-drawer__container--background-select[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0}),n})();var lbt=__webpack_require__(77184),N0=__webpack_require__.n(lbt);const ubt=["chips"],dbt=["gems"],pbt=["boosters"],hbt=["item"],mbt=["miniGame"];function fbt(t,n){if(1&t){const o=Ce();p(0,"button-text",5),Y("onClick",function(){return oe(o),re(_().watch())}),p(1,"span",6),H(2),V(3,"translate"),m()()}if(2&t){const o=_();l("bclass","progressive-ads-bonus--button-bclass")("loading",o.isLoading)("buttonModifier",o.watchButton.modifier),d(2),se($(3,4,"TEXT.WATCH"))}}function gbt(t,n){1&t&&B(0,"icon-component",7),2&t&&l("icon",_().EIcons.TICK_ICON)}function _bt(t,n){1&t&&B(0,"icon-component",8),2&t&&l("icon",_().EIcons.Padlock)}const vbt=t=>[t];let ff=(()=>{var t;class n{constructor(e,i){this.urlService=i,this.watchVideo=new ke,this.EState=n.EState,this.EIcons=ve.EIcons,this.EItemType=Fe.TG,this.currencyType=ln,this.watchButton={modifier:ve.EButtonModifier.BUTTON_ATTENTION},this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.getTextTemplate(),this.cdr.detectChanges()}watch(){this.watchVideo.emit()}getRewardImage(){return this.reward.item?this.urlService.getShopItemPreviewUrl(this.reward.item):this.urlService.getImageUrl("free-rewards/miniGame.png")}getTextTemplate(){var e;this.rewardItem=this.reward.item?this.reward.item:this.reward.miniGame?this.reward.miniGame.reward:void 0,this.reward.miniGame?this.textTemplate=this.miniGameTemplate:(this.rewardItem=null===(e=this.reward)||void 0===e?void 0:e.item,this.rewardItem&&(this.textTemplate=this.getItemTemplate(this.rewardItem)))}getItemTemplate(e){switch(e.type){case Fe.TG.ChipPack:return this.chipsTemplate;case Fe.TG.GemsPack:return this.gemsTemplate;case Fe.TG.Booster:return this.boostersTemplate;default:return this.itemTemplate}}getItemDescriptionKey(e){switch(e.type){case Fe.TG.Vip:case Fe.TG.XpPack:case Fe.TG.NameChanger:case Fe.TG.Block:return e.id;default:return e.type}}getBiggestReward(e){return N0()(e,"amount",ie.ESort.Asc)[e.length-1]}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Qm))},t.\u0275cmp=pe({type:t,selectors:[["progressive-ads-reward-container"]],viewQuery:function(e,i){if(1&e&&($e(ubt,7),$e(dbt,7),$e(pbt,7),$e(hbt,7),$e(mbt,7)),2&e){let r;je(r=He())&&(i.chipsTemplate=r.first),je(r=He())&&(i.gemsTemplate=r.first),je(r=He())&&(i.boostersTemplate=r.first),je(r=He())&&(i.itemTemplate=r.first),je(r=He())&&(i.miniGameTemplate=r.first)}},inputs:{reward:"reward",state:"state",isLoading:"isLoading"},outputs:{watchVideo:"watchVideo"},features:[it],decls:5,vars:9,consts:[[1,"progressive-ads-bonus__reward-wrapper",3,"ngClass"],[1,"progressive-ads-bonus__reward--item",3,"item","miniGame","state"],["class","progressive-ads-bonus--button",3,"bclass","loading","buttonModifier","onClick",4,"ngIf"],["class","progressive-ads-bonus__reward--icon tick",3,"icon",4,"ngIf"],["class","progressive-ads-bonus__reward--icon",3,"icon",4,"ngIf"],[1,"progressive-ads-bonus--button",3,"bclass","loading","buttonModifier","onClick"],[1,"progressive-ads-bonus__text--button"],[1,"progressive-ads-bonus__reward--icon","tick",3,"icon"],[1,"progressive-ads-bonus__reward--icon",3,"icon"]],template:function(e,i){1&e&&(p(0,"container-component",0),B(1,"item-reward",1),U(2,fbt,4,6,"button-text",2),m(),U(3,gbt,1,1,"icon-component",3)(4,_bt,1,1,"icon-component",4)),2&e&&(l("ngClass",ne(7,vbt,i.state)),d(),l("item",i.rewardItem)("miniGame",i.reward.miniGame)("state",i.state),d(),l("ngIf",i.state===i.EState.Current),d(),l("ngIf",i.state===i.EState.Claimed),d(),l("ngIf",i.state===i.EState.Locked))},styles:["[_nghost-%COMP%]{display:block}.progressive-ads-bonus__reward--content[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-content:center;align-items:center}.progressive-ads-bonus__reward--icon[_ngcontent-%COMP%]{position:absolute;top:5%;right:7%}.progressive-ads-bonus__reward--image--wrapper[_ngcontent-%COMP%]{width:100%;text-align:center}.progressive-ads-bonus__reward--image[_ngcontent-%COMP%]{width:75%;height:auto}.progressive-ads-bonus__reward--image.table[_ngcontent-%COMP%]{width:50%}.progressive-ads-bonus--button[_ngcontent-%COMP%]{margin-top:1em;height:4em}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EState||(t.EState={})).Current="current",o.Claimed="claimed",o.Locked="locked"}(ff||(ff={}));const bbt=["chipsTemplate"],Cbt=["gemsTemplate"],ybt=["boostersTemplate"],Sbt=["xpPackTemplate"],wbt=["itemTemplate"],Tbt=["miniGameTemplate"],Pbt=["frameTemplate"],Ibt=["usernameChangerTemplate"],Mbt=["bundleTemplate"],Obt=()=>[200,1e3];function Ebt(t,n){1&t&&B(0,"bling-bling",16),2&t&&l("startDelay",pt(1,Obt))}function xbt(t,n){}function Abt(t,n){if(1&t&&B(0,"currency-component",17),2&t){const o=_();l("currency",o.currencyType.Chips)("value",o.getChipValue())}}function Rbt(t,n){if(1&t&&B(0,"currency-component",17),2&t){const o=_();l("currency",o.currencyType.Gems)("value",o.item.amount)}}function kbt(t,n){if(1&t&&(p(0,"div",18)(1,"p"),H(2),V(3,"timeLeft"),m(),p(4,"p"),H(5),V(6,"translate"),m()()),2&t){const o=_();d(2),se($(3,2,o.item.lifeTime)),d(3),se($(6,4,"SHOP.XP_BOOSTER"))}}function Lbt(t,n){1&t&&(p(0,"div",18)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"SHOP.XP_PACK")))}function Dbt(t,n){1&t&&(p(0,"div",18)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"SHOP.ITEMS.frame.shortTitle")))}const Bbt=t=>({maxTimeUnitsType:t});function Nbt(t,n){if(1&t&&(p(0,"div",18)(1,"p"),H(2),V(3,"timeLeft"),m()()),2&t){const o=_(2);d(2),se(yt(3,1,o.item.lifeTime,ne(4,Bbt,o.ETimeType.Days)))}}function Fbt(t,n){1&t&&U(0,Nbt,4,6,"div",19),2&t&&l("ngIf",_().item.lifeTime)}function Ubt(t,n){1&t&&(p(0,"div",18)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"SHOP.ITEMS.nameChanger.title")))}function Gbt(t,n){1&t&&(p(0,"div",18)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"SHOP.ITEMS.BUNDLE_ITEM")))}function Vbt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),se($(2,1,o.getMiniGameNameKey()))}}function zbt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),se($(2,1,o.getMiniGameNameWithGameModeKey()))}}function jbt(t,n){if(1&t&&(p(0,"div",21),U(1,Vbt,3,3,"p",22)(2,zbt,3,3,"p",22),m()),2&t){const o=_(2);d(),l("ngIf",!o.miniGamePreviewConfig.showMiniGameMode),d(),l("ngIf",o.miniGamePreviewConfig.showMiniGameMode)}}function Hbt(t,n){if(1&t&&(p(0,"div",18)(1,"p"),H(2),V(3,"translate"),m(),B(4,"currency-component",17),m()),2&t){const o=_(2);d(2),se($(3,3,"LABEL.GET_UP_TO")),d(2),l("currency",o.getBiggestReward(o.miniGame.rewards).type===o.EItemType.ChipPack?o.currencyType.Chips:o.currencyType.Gems)("value",o.getBiggestReward(o.miniGame.rewards).amount)}}function qbt(t,n){if(1&t&&U(0,jbt,3,2,"div",20)(1,Hbt,5,5,"div",19),2&t){const o=_();l("ngIf",o.miniGame&&o.miniGamePreviewConfig.showMiniGameName),d(),l("ngIf",o.miniGame&&o.miniGamePreviewConfig.showMaxPrize)}}const Wbt=(t,n)=>[t,n],$bt=t=>({"no-template":t});let Jh=(()=>{var t;class n{constructor(e,i){this.clientUrlService=e,this.store=i,this.stylePreset=n.EShopItemPreviewPreset.BackgroundImage,this.miniGamePreviewConfig={showMiniGameImg:!1,showMaxPrize:!0,showMiniGameName:!1,showMiniGameMode:!1},this.showBling=!1,this.EState=ff.EState,this.EIcons=ve.EIcons,this.EItemType=Fe.TG,this.currencyType=ln,this.ETimeType=Rt}ngOnChanges(){this.setTextTemplate()}getRewardImage(){return this.item?this.clientUrlService.getShopItemPreviewUrl(this.item):this.miniGame&&this.miniGamePreviewConfig.showMiniGameImg?this.getMiniGameImageUrl():this.clientUrlService.getImageUrl("free-rewards/miniGame.png")}setTextTemplate(){this.miniGame?this.textTemplate=this.miniGameTemplate:this.item&&(this.textTemplate=this.getItemTemplate(this.item))}getItemTemplate(e){switch(e.type){case Fe.TG.ChipPack:return this.chipsTemplate;case Fe.TG.GemsPack:return this.gemsTemplate;case Fe.TG.Booster:return this.boostersTemplate;case Fe.TG.XpPack:return this.xpPackTemplate;case Fe.TG.Frame:return this.frameTemplate;case Fe.TG.NameChanger:return this.usernameChangerTemplate;case Fe.TG.Bundle:return this.bundleTemplate;default:return this.item.durability===Fe.XM.Durable?void 0:this.itemTemplate}}getItemDescriptionKey(e){switch(e.type){case Fe.TG.Vip:case Fe.TG.XpPack:case Fe.TG.NameChanger:case Fe.TG.Block:return e.id;default:return e.type}}getBiggestReward(e){return N0()(e,"amount",ie.ESort.Asc)[e.length-1]}getChipValue(){let e=this.item.amount;return this.vipBonusMultiplier&&(e*=this.store.selectIsVip()?this.vipBonusMultiplier:1),e}getMiniGameNameKey(){switch(this.miniGame.gameType){case bh.WheelOfFortune:return"FREE_REWARDS.wheelOfFortune";case bh.Piniata:return"FREE_REWARDS.piniata";case bh.LuckyBall:return"FREE_REWARDS.luckyBall";case bh.ScratchCard:return"FREE_REWARDS.scratchCard";case bh.Slot:return"FREE_REWARDS.slot";default:return""}}getMiniGameImageUrl(){return this.clientUrlService.getMiniGameImageUrl(this.miniGame.gameType)}getMiniGameNameWithGameModeKey(){const e=this.getMiniGameNameKey();return"".concat(e,"_").concat(this.miniGame.gameMode)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qm),g(J))},t.\u0275cmp=pe({type:t,selectors:[["item-reward"]],viewQuery:function(e,i){if(1&e&&($e(bbt,7),$e(Cbt,7),$e(ybt,7),$e(Sbt,7),$e(wbt,7),$e(Tbt,7),$e(Pbt,7),$e(Ibt,7),$e(Mbt,7)),2&e){let r;je(r=He())&&(i.chipsTemplate=r.first),je(r=He())&&(i.gemsTemplate=r.first),je(r=He())&&(i.boostersTemplate=r.first),je(r=He())&&(i.xpPackTemplate=r.first),je(r=He())&&(i.itemTemplate=r.first),je(r=He())&&(i.miniGameTemplate=r.first),je(r=He())&&(i.frameTemplate=r.first),je(r=He())&&(i.usernameChangerTemplate=r.first),je(r=He())&&(i.bundleTemplate=r.first)}},hostAttrs:[1,"item-reward"],inputs:{item:"item",miniGame:"miniGame",state:"state",vipBonusMultiplier:"vipBonusMultiplier",stylePreset:"stylePreset",miniGamePreviewConfig:"miniGamePreviewConfig",showBling:"showBling"},features:[it],decls:25,vars:11,consts:[[1,"item-reward__reward",3,"ngClass"],["data-cy","bonusPopupBonusReward",1,"item-reward--content"],[1,"item-reward__reward--image--wrapper"],["empty-placeholder","","data-cy","bonusPopupItemImage",1,"item-reward__reward--image",3,"ngClass","imgSrc"],["class","item-reward__bling",3,"startDelay",4,"ngIf"],["data-cy","bonusPopupItemValue",1,"item-reward__reward--text",3,"ngClass"],[3,"ngTemplateOutlet"],["chipsTemplate",""],["gemsTemplate",""],["boostersTemplate",""],["xpPackTemplate",""],["frameTemplate",""],["itemTemplate",""],["usernameChangerTemplate",""],["bundleTemplate",""],["miniGameTemplate",""],[1,"item-reward__bling",3,"startDelay"],[1,"item-reward__reward--currency",3,"currency","value"],[1,"item-reward__reward--booster"],["class","item-reward__reward--booster",4,"ngIf"],["class","item-reward__reward--booster item-reward__mini-game__title",4,"ngIf"],[1,"item-reward__reward--booster","item-reward__mini-game__title"],[4,"ngIf"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2),B(3,"img",3),U(4,Ebt,1,2,"bling-bling",4),m(),p(5,"div",5),U(6,xbt,0,0,"ng-template",6)(7,Abt,1,2,"ng-template",null,7,ft)(9,Rbt,1,2,"ng-template",null,8,ft)(11,kbt,7,6,"ng-template",null,9,ft)(13,Lbt,4,3,"ng-template",null,10,ft)(15,Dbt,4,3,"ng-template",null,11,ft)(17,Fbt,1,1,"ng-template",null,12,ft)(19,Ubt,4,3,"ng-template",null,13,ft)(21,Gbt,4,3,"ng-template",null,14,ft)(23,qbt,2,2,"ng-template",null,15,ft),m()()()),2&e&&(l("ngClass",cn(6,Wbt,i.stylePreset,i.state?i.state:"")),d(3),l("ngClass",null==i.item?null:i.item.type)("imgSrc",i.getRewardImage()),d(),l("ngIf",i.showBling),d(),l("ngClass",ne(9,$bt,!i.textTemplate)),d(),l("ngTemplateOutlet",i.textTemplate))},dependencies:[Xe,Ne,qr,$o,So,dC,qe,Ps],styles:["[_nghost-%COMP%]{display:block}.item-reward--content[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;flex-direction:column;align-items:center}.item-reward__reward--image--wrapper[_ngcontent-%COMP%]{width:100%;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}.item-reward__reward--image[_ngcontent-%COMP%]{height:auto}.item-reward__bling[_ngcontent-%COMP%]{position:absolute;width:50%;height:50%;pointer-events:none}"],changeDetection:0}),n})();function Kbt(t,n){if(1&t&&(p(0,"p",20),H(1),m()),2&t){const o=_(3);d(),mu("",null==o.data.progressBarData?null:o.data.progressBarData.currentProgress," /",null==o.data.progressBarData?null:o.data.progressBarData.goalAmount,"")}}function Zbt(t,n){if(1&t&&(p(0,"div",17),B(1,"progress-bar",18),U(2,Kbt,2,2,"p",19),m()),2&t){const o=_(2);Uo("no-progress-text",o.data.progressBarData.hideAmountText),d(),l("animationOn",o.data.progressBarData.starsAnimationEnabled)("progressBarConfig",o.progressBarConfig),d(),l("ngIf",!o.data.progressBarData.hideAmountText)}}function Qbt(t,n){1&t&&Un(0)}function Ybt(t,n){1&t&&B(0,"img",21),2&t&&l("src",_(2).data.imageUrl,Wn)}function Jbt(t,n){1&t&&B(0,"icon-component",22),2&t&&l("icon",_(2).data.svgImageUrl)}function Xbt(t,n){1&t&&Un(0)}function eCt(t,n){if(1&t&&(p(0,"span",23),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.data.description))}}function tCt(t,n){1&t&&yo(0)}!function(t){let n;var o;(o=n=t.EShopItemPreviewPreset||(t.EShopItemPreviewPreset={})).Transparent="transparent",o.Backdrop="backdrop",o.BackgroundImage="backgroundImage"}(Jh||(Jh={}));const nCt=t=>[t];function iCt(t,n){if(1&t&&(p(0,"span",28),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),ze("",yt(2,1,o.data.rewardText.key,ne(4,nCt,o.data.rewardText.params)),":")}}function oCt(t,n){1&t&&(p(0,"span",28),H(1),V(2,"translate"),m()),2&t&&(d(),ze("",$(2,1,"LABEL.REWARD"),":"))}function rCt(t,n){1&t&&B(0,"item-reward",29),2&t&&l("item",n.$implicit)}function sCt(t,n){if(1&t&&(p(0,"div",24),U(1,iCt,3,6,"span",25)(2,oCt,3,3,"span",25),p(3,"div",26),U(4,rCt,1,1,"item-reward",27),m()()),2&t){const o=_(2);d(),l("ngIf",o.data.rewardText),d(),l("ngIf",!o.data.rewardText),d(2),l("ngForOf",o.data.rewards.items)}}function aCt(t,n){}function cCt(t,n){1&t&&U(0,aCt,0,0,"ng-template",34),2&t&&l("ngTemplateOutlet",_().$implicit.templateRef)}function lCt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit;d(),se($(2,1,o.textKey))}}function uCt(t,n){if(1&t){const o=Ce();p(0,"button-text",32),Y("onClick",function(){return re(oe(o).$implicit.action())}),U(1,cCt,1,1,null,33)(2,lCt,3,3,"span",33),m()}if(2&t){const o=n.$implicit;l("bclass",o.bclass?o.bclass+" apib__button--bclass":"apib__button--bclass")("buttonScaleFactor",o.scaleFactor)("disabled",o.disabled)("buttonModifier",o.buttonModifier),d(),l("ngIf",o.templateRef),d(),l("ngIf",!o.templateRef)}}function dCt(t,n){if(1&t&&(p(0,"div",30),U(1,uCt,3,6,"button-text",31),m()),2&t){const o=_(2);d(),l("ngForOf",o.data.buttons)}}function pCt(t,n){if(1&t&&(p(0,"div",1),U(1,Zbt,3,5,"div",2),p(2,"div",3)(3,"div",4)(4,"div",5),U(5,Qbt,1,0,"ng-container",6)(6,Ybt,1,1,"ng-template",null,7,ft)(8,Jbt,1,1,"ng-template",null,8,ft),m(),p(10,"div",9)(11,"div",10)(12,"span"),H(13),V(14,"translate"),m()(),p(15,"div",11),U(16,Xbt,1,0,"ng-container",6)(17,eCt,3,3,"ng-template",null,12,ft)(19,tCt,1,0,"ng-template",null,13,ft),m()()(),p(21,"div",14),U(22,sCt,5,3,"div",15),m()(),U(23,dCt,2,1,"div",16),m()),2&t){const o=Kt(7),e=Kt(9),i=Kt(18),r=Kt(20),s=_();d(),l("ngIf",s.data.progressBarData),d(),Uo("no-progress-bar",!s.data.progressBarData),d(3),l("ngIf",s.data.svgImageUrl)("ngIfThen",e)("ngIfElse",o),d(8),se($(14,12,s.data.title)),d(3),l("ngIf",s.data.description)("ngIfThen",i)("ngIfElse",r),d(6),l("ngIf",s.data.rewards),d(),l("ngIf",s.data.buttons)}}const hCt=["*"];let Jz=(()=>{var t;class n extends pd{}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["admin-progress-info-box"]],features:[Ht],ngContentSelectors:hCt,decls:1,vars:1,consts:[["class","apib__wrapper",4,"ngIf"],[1,"apib__wrapper"],["class","apib__container--progress-bar",3,"no-progress-text",4,"ngIf"],[1,"apib__container--info"],[1,"apib__container--info__container"],[1,"apib__container--image"],[4,"ngIf","ngIfThen","ngIfElse"],["defaultImgContainer",""],["svgImgContainer",""],[1,"apib__container__main--info"],["data-cy","bonusPopupBonusTitle",1,"apib__container--title"],["data-cy","bonusPopupBonusDescription",1,"apib__container--description"],["text",""],["content",""],[1,"apib__container--desc-actions"],["class","apib__container--reward",4,"ngIf"],["class","apib__container--actions",4,"ngIf"],[1,"apib__container--progress-bar"],["blinking-stars","",1,"apib__progress-bar",3,"animationOn","progressBarConfig"],["class","apib__text--progress-bar",4,"ngIf"],[1,"apib__text--progress-bar"],["data-cy","bonusPopupBonusIcon",3,"src"],[1,"apib__svg-icon-cmp",3,"icon"],[1,"apib__text--description"],[1,"apib__container--reward"],["class","apib__container--reward--text",4,"ngIf"],[1,"apib__container--reward__container"],["class","apib__reward",3,"item",4,"ngFor","ngForOf"],[1,"apib__container--reward--text"],[1,"apib__reward",3,"item"],[1,"apib__container--actions"],["class","apib__button","data-cy","bonusPopupClaimButton",3,"bclass","buttonScaleFactor","disabled","buttonModifier","onClick",4,"ngFor","ngForOf"],["data-cy","bonusPopupClaimButton",1,"apib__button",3,"bclass","buttonScaleFactor","disabled","buttonModifier","onClick"],[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(e,i){1&e&&(Co(),U(0,pCt,24,14,"div",0)),2&e&&l("ngIf",i.data)},dependencies:[Mt,Ne,qr,zb,Dn,uf,pn,Jh,qe],styles:[".apib__wrapper[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column nowrap}.apib__container--progress-bar[_ngcontent-%COMP%]{margin:1.5rem 1.5rem 0;display:flex;flex-flow:column nowrap;align-items:flex-end}.apib__container--progress-bar.no-progress-text[_ngcontent-%COMP%]{margin:1.5rem 1.5rem 1rem}.apib__progress-bar[_ngcontent-%COMP%]{position:relative}.apib__text--progress-bar[_ngcontent-%COMP%]{margin-top:.5rem}.apib__container--info[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.apib__container--info.no-progress-bar[_ngcontent-%COMP%]{margin-top:1rem}.apib__container--image[_ngcontent-%COMP%]{margin:0 1rem;min-height:8rem;display:flex;justify-content:center;align-items:center}.apib__container--image[_ngcontent-%COMP%] > img[_ngcontent-%COMP%], .apib__container--image[_ngcontent-%COMP%]   .apib__svg-icon-cmp[_ngcontent-%COMP%]{max-width:7rem;max-height:7rem}.apib__container--image[_ngcontent-%COMP%]   .apib__svg-icon-cmp[_ngcontent-%COMP%]{width:100%;height:100%}.apib__container--desc-actions[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column nowrap}.apib__container--info__container[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center}.apib__container__main--info[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;margin:0 1rem;max-width:70%}.apib__container--title[_ngcontent-%COMP%]{margin-bottom:.5rem;font-weight:700;font-size:1.8rem;text-transform:uppercase;padding-right:1rem;width:100%}.apib__container--title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{width:100%;overflow:hidden;text-overflow:ellipsis}.apib__container--reward[_ngcontent-%COMP%], .apib__container--actions[_ngcontent-%COMP%]{margin-bottom:1rem}.apib__container--description[_ngcontent-%COMP%]{font-size:1.2rem;padding-right:1rem}.apib__text--description[_ngcontent-%COMP%]{margin-bottom:1rem;overflow:hidden;text-overflow:ellipsis;width:100%}.apib__container--actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center}.apib__button[_ngcontent-%COMP%]{width:100%;margin:.5rem 1rem}.apib__container--reward[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-items:flex-start;align-items:flex-start;font-weight:700}.apib__reward-value[_ngcontent-%COMP%]{font-size:2rem}.apib__container--reward__container[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-flow:row wrap;width:100%}.apib__container--reward--text[_ngcontent-%COMP%]{margin-left:1rem}"],changeDetection:0}),n})();var Xz=function(t){return t.Default="default",t.WithScale="withScale",t}(Xz||{});const mCt=["shine"],fCt=["shineElement"];let IM=(()=>{var t;class n{constructor(e,i){this.ngZone=e,this.tweenFactory=i,this.startDelayMs=0,this.shineRepeatDelayMs=5e3,this.animationIteration=new ke}ngOnInit(){const e=this.shine.nativeElement;this.ngZone.runOutsideAngular(()=>{this.delayId=setTimeout(()=>{var i;this.animationTweenFirst=this.tweenFactory.createAnimationTween(e,"animated"),this.shineAnimationType===Xz.WithScale&&(this.animationTweenSecond=this.tweenFactory.createAnimationTween(this.shineElementRef.nativeElement,"scaleAnimation")),Promise.all([this.animationTweenFirst.play(),null===(i=this.animationTweenSecond)||void 0===i?void 0:i.play()]).then(()=>{this.animationIteration.emit(),this.intervalId=setInterval(()=>{var r;Promise.all([this.animationTweenFirst.play(),null===(r=this.animationTweenSecond)||void 0===r?void 0:r.play()]).then(()=>this.animationIteration.emit())},this.shineRepeatDelayMs)}).catch(r=>{console.warn(r.message)})},this.startDelayMs)})}ngOnDestroy(){clearTimeout(this.delayId),clearInterval(this.intervalId)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(an),g(tw))},t.\u0275cmp=pe({type:t,selectors:[["shine-component"]],viewQuery:function(e,i){if(1&e&&($e(mCt,7),$e(fCt,7,$t)),2&e){let r;je(r=He())&&(i.shine=r.first),je(r=He())&&(i.shineElementRef=r.first)}},inputs:{startDelayMs:"startDelayMs",shineRepeatDelayMs:"shineRepeatDelayMs",shineAnimationType:"shineAnimationType",animationDelay:"animationDelay"},outputs:{animationIteration:"animationIteration"},decls:5,vars:0,consts:[[1,"shine-wrapper"],[1,"shine-container"],["shine",""],[1,"shine-element"],["shineElement",""]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1,2),B(3,"div",3,4),m()())},styles:["[_nghost-%COMP%]{display:block;overflow:hidden;pointer-events:none}.shine-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;overflow:hidden}.shine-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;transform:translate(-60px)}.shine-container.animated[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_shine .8s}@keyframes _ngcontent-%COMP%_shine{0%{transform:translate(-60px)}to{transform:translate(100%)}}@keyframes _ngcontent-%COMP%_shineScale{0%{transform:skew(-15deg) scaleX(1)}33%{transform:skew(-15deg) scaleX(10)}66%{transform:skew(-15deg) scaleX(1)}to{transform:skew(-15deg) scaleX(1)}}.shine-element[_ngcontent-%COMP%]{transform:skew(-15deg);width:50px;height:100%;background:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.5) 50%,rgba(255,255,255,0) 100%)}.shine-element.scaleAnimation[_ngcontent-%COMP%]{background:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,.651) 50%,rgba(255,255,255,0) 100%);animation:_ngcontent-%COMP%_shineScale .8s cubic-bezier(.83,0,.17,1)}@media screen and (max-width: 568px){.shine-element[_ngcontent-%COMP%]{width:30px}}"],changeDetection:0}),n})();const gCt=["wrapper"];function _Ct(t,n){1&t&&(B(0,"img",6),V(1,"transformUrl")),2&t&&l("src",$(1,1,_().badgeBackground),Wn)}function vCt(t,n){1&t&&(B(0,"img",6),V(1,"transformUrl")),2&t&&l("src",$(1,1,"challenges/challenges_badge_empty.png"),Wn)}function bCt(t,n){1&t&&(B(0,"img",7),V(1,"transformUrl")),2&t&&l("src",$(1,1,_().badgeIcon),Wn)}function CCt(t,n){1&t&&B(0,"icon-component",8),2&t&&l("icon",_().badgeSvg)}function yCt(t,n){if(1&t&&(p(0,"div",9),H(1),V(2,"challengeTranslate"),m(),p(3,"div",10),H(4),V(5,"challengeTranslate"),m(),p(6,"div",11),H(7),V(8,"exactDate"),m()),2&t){const o=_();d(),ze(" ",u_(2,3,o.challenge,o.challengeTranslateArg.Title,o.challenge.levelsCompleted-1)," "),d(3),ze(" ",u_(5,7,o.challenge,o.challengeTranslateArg.Description,o.challenge.levelsCompleted-1)," "),d(3),ze(" ",yt(8,11,o.challenge.completedAt,"d.MM.y")," ")}}const SCt=t=>({"with--tooltip":t});let jL=(()=>{var t;class n extends qR{constructor(e,i,r,s,a,c){super(s,i,"challenges_badge",e,a,c),this.cdr=r,this.armatureName="challenges_badge",this.badgeBackground="",this.showImage=!0,this.challengeTranslateArg=HS}ngOnInit(){this.setChallengeBackground(),this.setBadgeIcon()}ngOnChanges(e){e.currentLevel&&e.currentLevel.previousValue&&e.currentLevel.currentValue&&(this.armature||this.createPixiApp(),this.playAnimation("level_".concat(e.currentLevel.previousValue,"_").concat(e.currentLevel.currentValue)),this.showImage=!1,this.cdr.detectChanges())}createPixiApp(){this.pixiAppRef=this.pixiAppFactory.getApp({height:this.height,width:this.width,sharedTicker:!0,transparent:!0}),this.renderer.insertBefore(this.wrapper.nativeElement,this.pixiAppRef.canvas,this.wrapper.nativeElement.childNodes[0]),this.renderer.setStyle(this.pixiAppRef.canvas,"width","100%"),this.renderer.setStyle(this.pixiAppRef.canvas,"pointerEvents","none"),this.pixiApp=this.pixiAppRef.app,this.armature=this.createArmature(this.armatureName),this.cdr.detectChanges()}setChallengeBackground(){this.currentLevel&&(this.badgeBackground="challenges/challenges_badge_level_".concat(this.currentLevel,".png"))}setBadgeIcon(){this.currentLevel&&(this.challenge.games?this.badgeSvg="platform-logos/".concat(this.challenge.games[0].game,".svg"):this.badgeIcon="challenges/".concat(this.challenge.type,".png"))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(j_),g(an),g(Re),g(Bw),g($t),g(ji))},t.\u0275cmp=pe({type:t,selectors:[["challenge-badge"]],viewQuery:function(e,i){if(1&e&&$e(gCt,7),2&e){let r;je(r=He())&&(i.wrapper=r.first)}},hostAttrs:[1,"challenge__badge--component"],inputs:{challenge:"challenge",showToolTip:"showToolTip",currentLevel:"currentLevel"},features:[Ht,it],decls:8,vars:9,consts:[["tooltip","",1,"challenge-badge__container",3,"ngClass","tooltipTemplate","tooltipDisabled"],["wrapper",""],["class","challenge-badge__image",3,"src",4,"ngIf"],["class","challenge-badge__icon",3,"src",4,"ngIf"],["class","challenge-badge__icon",3,"icon",4,"ngIf"],["tooltipCompletedChallengeBadge",""],[1,"challenge-badge__image",3,"src"],[1,"challenge-badge__icon",3,"src"],[1,"challenge-badge__icon",3,"icon"],[1,"challenge--badge__main--info__title"],[1,"challenge--badge__main--info__description"],[1,"challenge--badge__main--info__completed-at"]],template:function(e,i){if(1&e&&(p(0,"div",0,1),U(2,_Ct,2,3,"img",2)(3,vCt,2,3,"img",2)(4,bCt,2,3,"img",3)(5,CCt,1,1,"icon-component",4),m(),U(6,yCt,9,14,"ng-template",null,5,ft)),2&e){const r=Kt(7);l("ngClass",ne(7,SCt,i.challenge.id&&i.showToolTip))("tooltipTemplate",r)("tooltipDisabled",!i.challenge.id||!i.showToolTip),d(2),l("ngIf",i.showImage&&i.currentLevel),d(),l("ngIf",!i.currentLevel&&i.showImage),d(),l("ngIf",i.badgeIcon),d(),l("ngIf",i.badgeSvg)}},dependencies:[Xe,Ne,Dn,Eg,Tw,kp,uo],styles:[".challenge-badge__container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.challenge-badge__image[_ngcontent-%COMP%]{display:block;max-height:100%;max-width:100%;width:100%;height:100%;position:absolute;top:0;left:0}"],changeDetection:0}),n})();var wCt=ve.EButtonModifier;const TCt=["button"];function PCt(t,n){if(1&t&&(p(0,"div",20),H(1),m()),2&t){const o=_();d(),se(o.challenge.getCurrentLevel()+1)}}function ICt(t,n){if(1&t&&(p(0,"div",21)(1,"p",22),H(2),V(3,"translate"),m(),B(4,"reward-component",23),m()),2&t){const o=_();d(2),ze("",$(3,2,"LABEL.REWARD"),":"),d(2),l("reward",o.challenge.getCurrentLevelRewards())}}function MCt(t,n){if(1&t){const o=Ce();p(0,"button-text",24,25),Y("onClick",function(){return oe(o),re(_().collectReward())}),H(2),V(3,"translate"),m()}if(2&t){const o=_();l("loading",o.challenge.actions.claim.inProgress)("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(2),ze(" ",$(3,3,"BONUS.COLLECT")," ")}}function OCt(t,n){1&t&&(p(0,"div",26)(1,"p",27),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"CHALLENGES.LABELS.COMPLETED")))}let HL=(()=>{var t;class n{constructor(e,i){this.cdr=e,this.animationService=i,this.buttonModifier=wCt,this.challengeTranslateArg=HS,this.onCollectReward=new ke}ngOnChanges(e){e.challenge&&(this.progressBarConfig={areValuesShown:!1,progressPartitions:[{value:this.challenge.getCurrentLevelPoints(),widthCoefficient:this.challenge.getCurrentLevelPoints()},{value:this.challenge.breakpoints[this.challenge.getCurrentLevel()-1],widthCoefficient:this.challenge.breakpoints[this.challenge.getCurrentLevel()-1]-this.challenge.getCurrentLevelPoints()}]},this.cdr.detectChanges())}collectReward(){this.onCollectReward.emit()}playCurrencyAnimation(){if(this.button){const e=dr.buildBoundingRect(this.button.nativeElement),i=dr.buildCurrencyTypesFromRewards(this.challenge.rewards);this.animationService.playAnimations(i,e)}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["challenge"]],viewQuery:function(e,i){if(1&e&&$e(TCt,5,$t),2&e){let r;je(r=He())&&(i.button=r.first)}},inputs:{challenge:"challenge"},outputs:{onCollectReward:"onCollectReward"},features:[it],decls:30,vars:27,consts:[[1,"challenge__container"],[1,"challenge__container--top"],[1,"challenge__badge--container"],[1,"challenge__badge",3,"currentLevel","challenge","height","width"],[1,"challenge__info--container"],[1,"challenge__progress--container"],[1,"challenge__pogress--bar__container"],[1,"challenge__current--level"],["blinking-stars","",1,"challenge__progress-bar",3,"animationOn","progressBarConfig"],["class","challenge__next--level",4,"ngIf"],[1,"challenge__progress__container"],[1,"challenge__current--progress"],[1,"challenge__next--progress"],[1,"challenge__main--info--container"],[1,"challenge__main--info__title"],[1,"challenge__main--info__description"],[1,"challenge__container--bottom"],["class","challenge__rewards--container",4,"ngIf"],["class","challenge__container--bottom__button--claim",3,"loading","buttonModifier","onClick",4,"ngIf"],["class","challenge__completed--label__container",4,"ngIf"],[1,"challenge__next--level"],[1,"challenge__rewards--container"],[1,"challenge__rewards--container__reward--label"],[1,"challenge__rewards--container__reward",3,"reward"],[1,"challenge__container--bottom__button--claim",3,"loading","buttonModifier","onClick"],["button",""],[1,"challenge__completed--label__container"],[1,"challenge__completed--label"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2),B(3,"challenge-badge",3),m(),p(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7),H(8),m(),B(9,"progress-bar",8),U(10,PCt,2,1,"div",9),m(),p(11,"div",10)(12,"div",11),H(13),V(14,"formatNumber"),m(),H(15,"/ "),p(16,"div",12),H(17),V(18,"formatNumber"),m()()(),p(19,"div",13)(20,"div",14),H(21),V(22,"challengeTranslate"),m(),p(23,"div",15),H(24),V(25,"challengeTranslate"),m()()()(),p(26,"div",16),U(27,ICt,5,4,"div",17)(28,MCt,4,5,"button-text",18)(29,OCt,4,3,"div",19),m()()),2&e&&(d(3),l("currentLevel",i.challenge.getCurrentLevel())("challenge",i.challenge)("height",220)("width",220),d(5),se(i.challenge.getCurrentLevel()),d(),l("animationOn",!0)("progressBarConfig",i.progressBarConfig),d(),l("ngIf",i.challenge.getCurrentLevel()<i.challenge.getMaxLevel()),d(3),se($(14,15,i.challenge.getCurrentLevelPoints())),d(4),se($(18,17,i.challenge.breakpoints[i.challenge.getCurrentLevel()-1])),d(4),ze(" ",u_(22,19,i.challenge,i.challengeTranslateArg.Title,i.challenge.getCurrentLevel()-1)," "),d(3),ze(" ",u_(25,23,i.challenge,i.challengeTranslateArg.Description,i.challenge.getCurrentLevel()-1)," "),d(3),l("ngIf",!i.challenge.isDone()),d(),l("ngIf",i.challenge.isCompleted()),d(),l("ngIf",i.challenge.isDone()))},dependencies:[Ne,zb,uf,pn,cu,jL,qe,Tw,Go],styles:[".challenge__container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 2rem;position:relative}@media screen and (max-width: 568px){.challenge__container[_ngcontent-%COMP%]{padding:1rem}}.challenge__container--top[_ngcontent-%COMP%]{display:flex;width:100%}.challenge__badge--container[_ngcontent-%COMP%]{width:8rem}@media screen and (max-width: 380px){.challenge__badge--container[_ngcontent-%COMP%]{width:7rem}}@media screen and (max-width: 320px){.challenge__badge--container[_ngcontent-%COMP%]{width:6rem}}.challenge__badge[_ngcontent-%COMP%]{display:flex}.challenge__info--container[_ngcontent-%COMP%]{width:calc(100% - 8rem);display:flex;flex-direction:column-reverse}@media screen and (max-width: 380px){.challenge__info--container[_ngcontent-%COMP%]{width:calc(100% - 7rem)}}@media screen and (max-width: 320px){.challenge__info--container[_ngcontent-%COMP%]{width:calc(100% - 6rem)}}.challenge__main--info--container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;padding-bottom:2.5rem}.challenge__progress--container[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center;flex-direction:column}@media screen and (max-width: 568px){.challenge__progress--container[_ngcontent-%COMP%]{width:100%}}.challenge__pogress--bar__container[_ngcontent-%COMP%]{width:80%}@media screen and (max-width: 568px){.challenge__pogress--bar__container[_ngcontent-%COMP%]{width:100%}}.challenge__container--bottom[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-top:.5rem;align-items:center}.challenge__container--bottom__button--claim[_ngcontent-%COMP%]{margin:0!important;min-width:10rem!important}.challenge__progress__container[_ngcontent-%COMP%]{margin-top:1rem;display:flex;align-items:center}@media screen and (max-width: 360px){.challenge__progress__container[_ngcontent-%COMP%]{margin-top:.5rem}}.challenge__progress-bar[_ngcontent-%COMP%]{margin:0 3rem;position:relative}.challenge__pogress--bar__container[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;align-items:center}.challenge__current--level[_ngcontent-%COMP%], .challenge__next--level[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.3);position:absolute;border-radius:50%;width:1.7em;height:1.7em;display:flex;justify-content:center;align-items:center;margin:.5rem}.challenge__current--level[_ngcontent-%COMP%]{left:0}.challenge__next--level[_ngcontent-%COMP%]{right:0}.challenges__icon[_ngcontent-%COMP%]{width:100%;padding:1rem}@media screen and (max-width: 380px){.challenges__icon[_ngcontent-%COMP%]{padding:.5rem}}.challenge__completed--label__container[_ngcontent-%COMP%]{margin-left:auto}.challenge__main--info__description[_ngcontent-%COMP%]{text-align:right}"],changeDetection:0}),n})();function ECt(t,n){if(1&t){const o=Ce();p(0,"div",5)(1,"challenge",6),Y("onCollectReward",function(){const r=oe(o).$implicit;return re(_(2).collectReward(r.id))}),m()()}if(2&t){const o=n.$implicit;d(),l("challenge",o)}}function xCt(t,n){if(1&t&&(p(0,"div",3),U(1,ECt,2,1,"div",4),m()),2&t){const o=_();d(),l("ngForOf",o.challenges)("ngForTrackBy",o.trackByFn)}}function ACt(t,n){1&t&&B(0,"loader-image",7),2&t&&l("transparentBG",!0)}const RCt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),Kve=t=>[t];function kCt(t,n){1&t&&B(0,"empty-content",8),2&t&&l("textArray",ne(2,Kve,pt(1,RCt)))}const LCt=()=>({textKey:"CHALLENGES.LABELS.EMPTY_LIST"});function DCt(t,n){1&t&&B(0,"empty-content",8),2&t&&l("textArray",ne(2,Kve,pt(1,LCt)))}let ej=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.challengesService=e,this.store=i,this.cdr=r,this.toast=s,this.actions=a,this.destroyRef=c,this.exceptionTracker=u,this.setChallengesList=h=>{this.rafId=requestAnimationFrame(()=>{this.challenges=h,this.cdr.detectChanges()})},this.setChallengesLoadingState=h=>{this.challengesLoadingState=h},this.onChallengeClaim=h=>{var b;const w=null===(b=this.challengeComponents)||void 0===b?void 0:b.find(R=>R.challenge.id===h.challengeId);w&&w.playCurrencyAnimation()}}ngOnInit(){this.challengesService.startSyncronizeChallengesCycle();const e=this.actions.pipe(ai(cL));e.pipe(mi(this.destroyRef)).subscribe(this.onChallengeClaim);const i=this.store.challenges.subscribeChallengesLoadingState();i.pipe(mi(this.destroyRef)).subscribe(this.setChallengesLoadingState);const r=this.store.challenges.subscribeChallengesList({challengeCategory:ra.General});r.pipe(mi(this.destroyRef)).subscribe(this.setChallengesList),Ju(e.pipe(tr(1)),i.pipe(tr(1)),r.pipe(tr(1))).pipe(mi(this.destroyRef)).subscribe(()=>this.cdr.detectChanges())}ngOnDestroy(){this.challengesService.stopSyncronizeChallengesCycle(),cancelAnimationFrame(this.rafId)}trackByFn(e,i){return i.id}collectReward(e){var i=this;return f(function*(){try{yield i.challengesService.claimReward(e)}catch(r){console.warn("Error while claiming reward",r),r instanceof lt.NetworkError?i.toast.error("ERRORS.CONNECTION_ERROR"):(i.toast.error("ERRORS.SOMETHING_WRONG"),i.exceptionTracker.captureException(r))}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(cM),g(Jo),g(Re),g(Dt),g(yr),g(br),g(uv))},t.\u0275cmp=pe({type:t,selectors:[["challenges-list"]],viewQuery:function(e,i){if(1&e&&$e(HL,5),2&e){let r;je(r=He())&&(i.challengeComponents=r)}},hostAttrs:[1,"challenges-list"],decls:4,vars:4,consts:[["class","challenges--list__list__container",4,"ngIf"],[3,"transparentBG",4,"ngIf"],[3,"textArray",4,"ngIf"],[1,"challenges--list__list__container"],["class","challenges--list__challenge",4,"ngFor","ngForOf","ngForTrackBy"],[1,"challenges--list__challenge"],[3,"challenge","onCollectReward"],[3,"transparentBG"],[3,"textArray"]],template:function(e,i){1&e&&U(0,xCt,2,2,"div",0)(1,ACt,1,1,"loader-image",1)(2,kCt,1,4,"empty-content",2)(3,DCt,1,4,"empty-content",2),2&e&&(l("ngIf",i.challenges&&i.challenges.length>0&&i.challengesLoadingState&&i.challengesLoadingState.isLoaded),d(),l("ngIf",i.challengesLoadingState&&i.challengesLoadingState.isLoading),d(),l("ngIf",i.challengesLoadingState&&i.challengesLoadingState.error),d(),l("ngIf",i.challenges&&0===i.challenges.length&&i.challengesLoadingState&&i.challengesLoadingState.isLoaded))},dependencies:[Mt,Ne,bo,Oi,HL],styles:[".challenges--list__challenge[_ngcontent-%COMP%]{margin:1.5rem}.challenges--list__list__container[_ngcontent-%COMP%]{display:flex;flex-direction:column}"],changeDetection:0}),n})();function BCt(t,n){if(1&t&&B(0,"challenge-badge",5),2&t){const o=n.$implicit;l("height",220)("width",220)("challenge",o)("showToolTip",!0)("currentLevel",o?o.levelsCompleted:void 0)}}function NCt(t,n){if(1&t&&(p(0,"div",1)(1,"p",2),H(2),V(3,"translate"),m(),p(4,"div",3),U(5,BCt,1,5,"challenge-badge",4),m()()),2&t){const o=_();d(2),se($(3,3,"CHALLENGES.LABELS.LATEST_ACHIEVEMENTS")),d(3),l("ngForOf",o.challengesSlots)("ngForTrackBy",o.trackByFn)}}let tj=(()=>{var t;class n{constructor(e,i){this.challengesService=e,this.cdr=i,this.challenges=[],this.maxCompletedChallenges=4}ngOnChanges(e){e.userId&&e.userId.currentValue!==e.userId.previousValue&&this.setCompletedChallenges()}trackByFn(e,i){return i.id}setCompletedChallenges(){var e=this;return f(function*(){try{e.challenges=yield e.challengesService.getCompletedChallenges(e.userId,e.maxCompletedChallenges),e.challengesSlots=e.challenges.concat(Array(e.maxCompletedChallenges-e.challenges.length).fill({})),e.cdr.detectChanges()}catch(i){console.warn(i)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(cM),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["completed-challenges-list-preview"]],inputs:{userId:"userId"},features:[it],decls:1,vars:1,consts:[["class","completed-challenges-list-preview__container",4,"ngIf"],[1,"completed-challenges-list-preview__container"],[1,"completed-challenges-list-preview_title"],[1,"completed-challenges-list-preview__list--container"],["class","completed-challenges-list-preview__challenge",3,"height","width","challenge","showToolTip","currentLevel",4,"ngFor","ngForOf","ngForTrackBy"],[1,"completed-challenges-list-preview__challenge",3,"height","width","challenge","showToolTip","currentLevel"]],template:function(e,i){1&e&&U(0,NCt,6,5,"div",0),2&e&&l("ngIf",i.challengesSlots&&i.challengesSlots.length>0)},dependencies:[Mt,Ne,jL,qe],styles:[".completed-challenges-list-preview__container[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.completed-challenges-list-preview__challenge[_ngcontent-%COMP%]{width:25%;max-width:15rem;display:flex;justify-content:center}"],changeDetection:0}),n})(),Zve=(()=>{var t;class n{constructor(e){this.EIcons=ve.EIcons,this.cd=e,this.cd.detach()}ngOnInit(){this.cd.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["restriction-component"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),qL=(()=>{var t;class n extends Zve{constructor(e){super(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["restriction-vip"]],hostAttrs:[1,"restriction-vip--host"],features:[Ht],decls:5,vars:5,consts:[[1,"restriction__vip--icon",3,"icon"],[1,"restriction__vip--icon--new-design",3,"icon"],[1,"restriction__vip--text--new-design"]],template:function(e,i){1&e&&(B(0,"icon-component",0)(1,"icon-component",1),p(2,"span",2),H(3),V(4,"translate"),m()),2&e&&(l("icon",i.EIcons.Padlock),d(),l("icon",i.EIcons.CROWN),d(2),se($(4,3,"TEXT.VIP_ONLY")))},dependencies:[Dn,qe],styles:[".restriction-vip--host[_ngcontent-%COMP%]{justify-content:center;display:flex;align-items:center}.restriction__vip--host[_ngcontent-%COMP%]{font-size:1.4rem;text-transform:uppercase;margin:.5rem}@media only screen and (max-width: 768px){.restriction__vip--host[_ngcontent-%COMP%]{padding:.5rem}}.restriction__vip--text[_ngcontent-%COMP%], .restriction__vip--icon[_ngcontent-%COMP%], .restriction__vip--text--new-design[_ngcontent-%COMP%], .restriction__vip--icon--new-design[_ngcontent-%COMP%]{flex-shrink:0}"]}),n})(),MM=(()=>{var t;class n extends Zve{constructor(e){super(e)}ngOnChanges(e){this.cd.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["restriction-level"]],hostAttrs:[1,"restriction-level--host"],inputs:{value:"value",isMaxLevelRestricted:"isMaxLevelRestricted"},features:[Ht,it],decls:4,vars:5,consts:[["data-cy","matchmakingRestrictionLevelBadge",1,"restriction__level"],[1,"restriction__icon",3,"icon"]],template:function(e,i){1&e&&(p(0,"span",0),B(1,"icon-component",1),H(2),V(3,"translate"),m()),2&e&&(d(),l("icon",i.EIcons.Padlock),d(),mu("",$(3,3,i.isMaxLevelRestricted?"LABEL.MAX_LEVEL":"LABEL.LEVEL")," ",i.value,""))},dependencies:[Dn,qe],styles:[".restriction__level[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:1em}@media only screen and (max-width: 768px){.restriction__level[_ngcontent-%COMP%]{font-size:.8em}}"],changeDetection:0}),n})(),F0=(()=>{var t;class n{constructor(e){this.cdr=e,e.detach()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["client-players-counter"]],hostAttrs:[1,"client-players-counter--host"],inputs:{countersKeys:"countersKeys"},features:[it],decls:3,vars:2,consts:[[1,"players__number--players"],[1,"players__number--players--icon",3,"icon"],[3,"countersKeys"]],template:function(e,i){1&e&&(p(0,"p",0),B(1,"icon-component",1)(2,"active-players",2),m()),2&e&&(d(),l("icon","icons/players-icon.svg"),d(),l("countersKeys",i.countersKeys))},dependencies:[Ost,Dn],styles:[".players__number--players[_ngcontent-%COMP%]{display:block;text-align:center;line-height:100%;font-size:1em}.players__number--players[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-block;position:relative;text-align:center;font-weight:600;font-size:1.4rem;margin-left:2rem}@media only screen and (max-width: 640px){.players__number--players[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1rem}}.players__number--players--icon[_ngcontent-%COMP%]{margin-right:.5rem}"],changeDetection:0}),n})();function FCt(t,n){if(1&t&&(p(0,"p",7),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit;d(),se($(2,1,o.TITLE))}}function UCt(t,n){if(1&t&&(p(0,"div",8),B(1,"p",9),V(2,"translate"),m()),2&t){const o=_().$implicit;d(),l("innerHtml",$(2,1,o.TEXT),Yn)}}function GCt(t,n){if(1&t&&(Tn(0),p(1,"div",10),B(2,"div",11)(3,"p",12),V(4,"translate"),m(),Pn()),2&t){const o=n.$implicit;d(3),l("innerHtml",$(4,1,o.TEXT),Yn)}}function VCt(t,n){if(1&t&&(p(0,"div",2),U(1,FCt,3,3,"p",3),B(2,"div",4),U(3,UCt,3,3,"div",5)(4,GCt,5,3,"ng-container",6),m()),2&t){const o=n.$implicit,e=_();d(),l("ngIf",o.TITLE),d(2),l("ngIf",o.TEXT),d(),l("ngForOf",o.BULLETS)("ngForTrackBy",e.trackByFn)}}let WL=(()=>{var t;class n{constructor(e){this.translationService=e,this.sections=[]}ngOnChanges(e){var i;this.sections=null!==(i=this.buildSections(this.textKey))&&void 0!==i?i:[]}trackByFn(e,i){return e}buildSections(e){const i=this.translationService.instant(this.textKey);return i instanceof Array?i:void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(pi))},t.\u0275cmp=pe({type:t,selectors:[["translation-text-info-parser-component"]],inputs:{textKey:"textKey"},features:[it],decls:2,vars:2,consts:[[1,"text-parser__content"],["class","text-parser__section",4,"ngFor","ngForOf","ngForTrackBy"],[1,"text-parser__section"],["class","text-parser__section--title",4,"ngIf"],[1,"text-parser__separator","text-parser-section__separator"],["class","text-parser__text--wrapper",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"text-parser__section--title"],[1,"text-parser__text--wrapper"],[1,"text-parser__text",3,"innerHtml"],[1,"text-parser__bullet--wrapper"],[1,"text-parser__bullet"],[1,"text-parser__bullet-text",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,VCt,5,4,"div",1),m()),2&e&&(d(),l("ngForOf",i.sections)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Ne,qe],styles:["[_nghost-%COMP%]{display:block;height:100%}.text-parser__content[_ngcontent-%COMP%]{height:100%;padding:0 2rem;width:100%}@media screen and (max-width: 568px){.text-parser__content[_ngcontent-%COMP%]{padding:0 1rem}}.text-parser__section[_ngcontent-%COMP%]{padding:1.2rem 0}.text-parser__section[_ngcontent-%COMP%]:first-child{padding-top:2.4rem}@media screen and (max-width: 568px){.text-parser__section[_ngcontent-%COMP%]{padding:1rem 0}.text-parser__section[_ngcontent-%COMP%]:first-child{padding-top:2rem}}.text-parser__section--title[_ngcontent-%COMP%]{text-align:center}.text-parser__bullet--wrapper[_ngcontent-%COMP%], .text-parser__text--wrapper[_ngcontent-%COMP%]{display:flex}.text-parser__bullet--wrapper[_ngcontent-%COMP%]:not(:last-child), .text-parser__text--wrapper[_ngcontent-%COMP%]:not(:last-child){margin-bottom:.5rem}.text-parser__bullet[_ngcontent-%COMP%]{flex-shrink:0;border-radius:50%}.text-parser__separator[_ngcontent-%COMP%]{position:relative}.text-parser__separator.text-parser-section__separator[_ngcontent-%COMP%]{padding:1.2rem 0}@media screen and (max-width: 568px){.text-parser__separator.text-parser-section__separator[_ngcontent-%COMP%]{padding:1rem 0}}"],changeDetection:0}),n})();const zCt=["path"];let nj=(()=>{var t;class n{constructor(e,i){this.elementRef=e,this.renderer=i,this.strokeAnimationDurationS=.35,this.fillAnimationDurationS=.2,this.renderer.setStyle(this.elementRef.nativeElement,"opacity",0)}animate(){return this.renderer.setStyle(this.elementRef.nativeElement,"opacity",1),new Promise(e=>{const i=this.path.nativeElement.getTotalLength();Zr.set(this.path.nativeElement,{strokeDasharray:i,strokeDashoffset:i,stroke:"#FFFFFF"}),Zr.fromTo(this.path.nativeElement,this.strokeAnimationDurationS,{strokeDashoffset:i},{strokeDashoffset:0,ease:"power1.in",onComplete:()=>{Zr.to(this.path.nativeElement,{fill:"#FFFFFF",duration:this.fillAnimationDurationS,onComplete:e})}})})}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ji))},t.\u0275cmp=pe({type:t,selectors:[["animated-arrow"]],viewQuery:function(e,i){if(1&e&&$e(zCt,5),2&e){let r;je(r=He())&&(i.path=r.first)}},decls:6,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","width","32","height","32","viewBox","0 0 32 32"],["d","M16.4152,22.9987V0.4152C16.4152,0.1857,16.2295,0,16,0c-0.2295,0-0.4152,0.1857-0.4152,0.4152v22.5835h-1.9971\n\tL16,32l2.4123-9.0013H16.4152z",1,"cbt-1"],["path",""]],template:function(e,i){1&e&&(Df(),p(0,"svg",0)(1,"defs")(2,"style"),H(3," .cbt-1 { fill: none; stroke: transparent; stroke-width: 2px; fill-rule: evenodd; } "),m()(),B(4,"path",1,2),m())},styles:["svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%}\n\n/*# sourceMappingURL=animated-arrow.component.ts-angular-inline--10.css.map*/"],changeDetection:0}),n})();var jCt=ve.EIcons;const HCt=()=>({key:"LABEL.SHOP"}),qCt=t=>({name:t});let ij=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.store=e,this.destroyRef=i,this.cdr=r,this.router=s,this.analyticsTrackingService=a,this.constants=c,this.iconNames=jCt}ngOnInit(){this.store.stampCard.subscribeStampCardState().pipe(mi(this.destroyRef),bt(e=>e.isActive())).subscribe(e=>{this.stampCardState=e,this.cdr.detectChanges()})}navigateToShop(){const e=this.store.selectUserState().profile.id,i=new aa.DefaultEvent(Nn.Navigation,"shop:{0}",{label:{value:"{0}:".concat(wt.Currency),args:{userId:e}},typeArgs:{userId:e}});this.analyticsTrackingService.sendEvent(i),this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/shop/").concat(wt.Currency)}}])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(br),g(Re),g(on),g(yi),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["shop-button"]],decls:1,vars:8,consts:[["data-cy","bottomBarStore",1,"shop--button",3,"isNotificationShown","bclass","notificationValue","text","icon","onClick"]],template:function(e,i){1&e&&(p(0,"notification-button-icon",0),Y("onClick",function(){return i.navigateToShop()}),m()),2&e&&l("isNotificationShown",i.stampCardState&&i.stampCardState.isReadyToClaim())("bclass","bottom-bar__button-icon")("notificationValue","!")("text",pt(5,HCt))("icon",ne(6,qCt,i.iconNames.STORE_ICON_BOTTOM_BAR))},dependencies:[au],styles:["[_nghost-%COMP%]{position:relative}.shop--button[_ngcontent-%COMP%]{display:block;width:45%;margin:auto;height:100%}"],changeDetection:0}),n})(),$L=(()=>{var t;class n{constructor(){this.EIcons=ve.EIcons}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["stamp-bordered-text"]],hostAttrs:[1,"stamp-bordered-text"],inputs:{text:"text"},decls:7,vars:7,consts:[[1,"stamp-bordered-text__border","top","left",3,"icon"],[1,"stamp-bordered-text__border","top","right",3,"icon"],[1,"stamp-bordered-text__border","bottom","left",3,"icon"],[1,"stamp-bordered-text__border","bottom","right",3,"icon"],[1,"stamp-bordered-text__text"]],template:function(e,i){1&e&&(B(0,"icon-component",0)(1,"icon-component",1)(2,"icon-component",2)(3,"icon-component",3),p(4,"span",4),H(5),V(6,"translate"),m()),2&e&&(l("icon",i.EIcons.STAMP_BORDER),d(),l("icon",i.EIcons.STAMP_BORDER),d(),l("icon",i.EIcons.STAMP_BORDER),d(),l("icon",i.EIcons.STAMP_BORDER),d(2),se($(6,5,i.text.key)))},dependencies:[Dn,qe],styles:["[_nghost-%COMP%]{padding:.5rem;position:absolute;font-size:inherit;font-weight:inherit}.stamp-bordered-text__border[_ngcontent-%COMP%]{position:absolute;color:#7cd900;font-size:6rem;max-width:40%}.stamp-bordered-text__border.left[_ngcontent-%COMP%]{left:0}.stamp-bordered-text__border.right[_ngcontent-%COMP%]{right:0;transform:rotateY(180deg)}.stamp-bordered-text__border.top[_ngcontent-%COMP%]{top:0}.stamp-bordered-text__border.bottom[_ngcontent-%COMP%]{bottom:0;transform:rotateX(180deg)}.stamp-bordered-text__border.bottom.right[_ngcontent-%COMP%]{transform:rotateY(180deg) rotateX(180deg)}.stamp-bordered-text__text[_ngcontent-%COMP%]{font-size:inherit;color:#fff;background-color:#7cd900;font-weight:inherit;text-align:center}"],changeDetection:0}),n})();const WCt=["input"],$Ct=t=>({name:t});let KL=(()=>{var t;class n{constructor(e){this.cdr=e,this.onSubmit=new ke,this.EIcons=ve.EIcons}ngOnInit(){this.messageForm=new gw({message:new _w("")})}submitMessage(e){e.preventDefault(),""!==this.messageForm.value.message.trim()&&this.onSubmit.emit(this.messageForm.value.message)}resetInputField(){this.messageForm.reset(),this.messageForm.value.message="",this.input.nativeElement.select(),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["simple-message-input"]],viewQuery:function(e,i){if(1&e&&$e(WCt,5),2&e){let r;je(r=He())&&(i.input=r.first)}},hostAttrs:[1,"simple-message-input-host"],inputs:{placeholder:"placeholder",formFieldValidations:"formFieldValidations",bclass:"bclass"},outputs:{onSubmit:"onSubmit"},decls:7,vars:11,consts:[[1,"simple-message-input__wrapper",3,"ngClass"],["noValidate","",1,"simple-message-form",3,"formGroup","keydown.enter"],["formControlName","message","data-cy","simpleMessageTextInputField",1,"simple-message__input-field",3,"placeholder"],["input",""],["data-cy","simpleMessageSendButton",1,"simple-message-input__button-send",3,"icon","click"]],template:function(e,i){if(1&e&&(p(0,"div",0)(1,"form",1),Y("keydown.enter",function(s){return i.submitMessage(s)}),p(2,"textarea",2,3),V(4,"translate"),H(5,"        "),m()(),p(6,"button-icon",4),Y("click",function(s){return i.submitMessage(s)}),m()()),2&e){let r,s;l("ngClass",i.bclass),d(),l("formGroup",i.messageForm),d(),l("placeholder",yt(4,6,i.placeholder.key,i.placeholder.params)),Hn("maxlength",null!==(r=i.formFieldValidations.maxLength)&&void 0!==r?r:"none")("minlength",null!==(s=i.formFieldValidations.minLength)&&void 0!==s?s:"none"),d(4),l("icon",ne(9,$Ct,i.EIcons.SEND))}},dependencies:[Xe,Su,xb,Ql,yu,wl,Yl,ei,qe],styles:[".simple-message-input__wrapper[_ngcontent-%COMP%]{padding:1rem;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.simple-message-form[_ngcontent-%COMP%]{width:90%;height:100%}.simple-message-input__button-send[_ngcontent-%COMP%]{width:10%;height:100%}.simple-message__input-field[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),n})();var op=function(t){return t.Current="current",t.Claimed="claimed",t.Next="next",t}(op||{});const KCt=()=>({showMaxPrize:!0,showMiniGameImg:!0,showMiniGameName:!1,showMiniGameMode:!1});function ZCt(t,n){if(1&t&&B(0,"item-reward",6),2&t){const o=_(2);l("showBling",o.showBling)("miniGame",o.reward.miniGame)("miniGamePreviewConfig",pt(4,KCt))("stylePreset",o.itemRewardStylePreset)}}const QCt=(t,n)=>n.id;function YCt(t,n){if(1&t&&B(0,"item-reward",7),2&t){const o=n.$implicit,e=_(3);l("showBling",e.showBling)("item",o)("stylePreset",e.itemRewardStylePreset)}}function JCt(t,n){1&t&&vT(0,YCt,1,3,"item-reward",8,QCt),2&t&&bT(_(2).reward.items)}function XCt(t,n){if(1&t&&(p(0,"div",4),U(1,ZCt,1,5,"item-reward",5)(2,JCt,2,0),m()),2&t){const o=_();d(),Qo(1,o.reward.miniGame?1:-1),d(),Qo(2,null!=o.reward.items&&o.reward.items.length?2:-1)}}function eyt(t,n){1&t&&(B(0,"img",13),V(1,"transformUrl")),2&t&&l("imgSrc",$(1,1,_(2).reward.previewUrl))}function tyt(t,n){1&t&&(B(0,"img",13),V(1,"transformUrl")),2&t&&l("imgSrc",$(1,1,_(2).reward.items[0].data.clientPreviewUrl+".png"))}function nyt(t,n){if(1&t&&(p(0,"div",14),B(1,"currency-component",15),m()),2&t){const o=_(2);d(),l("currency",o.reward.items[0].type===o.EItemType.ChipPack?o.currencyType.Chips:o.currencyType.Gems)("value",o.reward.items[0].amount)}}function iyt(t,n){if(1&t&&(p(0,"div",9)(1,"div",10),U(2,eyt,2,3,"img",11)(3,tyt,2,3,"img",11),m(),U(4,nyt,2,2,"div",12),m()),2&t){const o=_();d(2),l("ngIf",o.reward.previewUrl),d(),l("ngIf",!o.reward.previewUrl),d(),l("ngIf",o.reward.items[0].type===o.EItemType.ChipPack||o.reward.items[0].type===o.EItemType.GemsPack)}}function oyt(t,n){if(1&t&&(p(0,"div",16),B(1,"icon-component",17)(2,"div",18),m()),2&t){const o=_();d(),l("icon",o.EIcons.CHECK_ROUND)}}const ryt=(t,n,o,e)=>({checked:t,current:n,highlighted:o,registerAdvent:e}),syt=t=>[t];let xg=(()=>{var t;class n{constructor(){this.showBling=!1,this.rewardStyles=new n.Styles,this.stylePreset=n.EStylePreset.Default,this.itemRewardStylePreset=Jh.EShopItemPreviewPreset.Transparent,this.dailyRewardState=op,this.EIcons=ve.EIcons,this.EItemType=Fe.TG,this.currencyType=ln,this.EStylePreset=n.EStylePreset}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["daily-reward-component"]],hostAttrs:[1,"daily-reward--host"],inputs:{reward:"reward",state:"state",showBling:"showBling",rewardStyles:"rewardStyles",stylePreset:"stylePreset",itemRewardStylePreset:"itemRewardStylePreset"},decls:7,vars:15,consts:[[1,"daily-reward",3,"ngClass"],["data-cy","dailyBonusDayTitle",1,"daily-reward--title","text-format"],["class","daily-reward-container-img--wrapper"],["class","daily-reward--checked-image--wrapper","data-cy","dailyBonusClaimedMark",4,"ngIf"],[1,"daily-reward-container-img--wrapper"],["class","daily-reward-item-reward",3,"showBling","miniGame","miniGamePreviewConfig","stylePreset"],[1,"daily-reward-item-reward",3,"showBling","miniGame","miniGamePreviewConfig","stylePreset"],[1,"daily-reward-item-reward",3,"showBling","item","stylePreset"],["class","daily-reward-item-reward",3,"showBling","item","stylePreset"],[1,"daily-reward--image-wrapper"],[1,"daily-reward-container-img--wrapper-old"],["class","daily-reward-container-img","empty-placeholder","","data-cy","dailyBonusPackImage",3,"imgSrc",4,"ngIf"],["class","daily-reward-container__reward",4,"ngIf"],["empty-placeholder","","data-cy","dailyBonusPackImage",1,"daily-reward-container-img",3,"imgSrc"],[1,"daily-reward-container__reward"],[1,"daily-reward-container__reward--value",3,"currency","value"],["data-cy","dailyBonusClaimedMark",1,"daily-reward--checked-image--wrapper"],[1,"checked-image","round",3,"icon"],[1,"checked-image","not-round"]],template:function(e,i){1&e&&(p(0,"container",0)(1,"div",1),H(2),V(3,"translate"),m(),U(4,XCt,3,2,"div",2)(5,iyt,5,3),m(),U(6,oyt,3,1,"div",3)),2&e&&(l("ngClass",xd(8,ryt,i.state===i.dailyRewardState.Claimed,i.state===i.dailyRewardState.Current,i.rewardStyles.isHighlighted,i.stylePreset===i.EStylePreset.RegisterAdvent)),Hn("data-cy","dailyBonusDay"+i.state),d(2),ze(" ",yt(3,5,"BONUS.DAY_COUNTING",ne(13,syt,i.reward.day))," "),d(2),Qo(4,i.stylePreset===i.EStylePreset.RegisterAdvent?4:5),d(2),l("ngIf",i.state===i.dailyRewardState.Claimed))},dependencies:[Xe,Ne,$o,Dn,So,Jh,qe,uo],styles:["[_nghost-%COMP%]{display:inline-block;width:100%;height:100%;position:relative}.daily-reward-container-img--wrapper[_ngcontent-%COMP%]{position:relative;width:100%;max-width:100%;margin:0 auto;display:flex;justify-content:space-evenly}.daily-reward-container-img--wrapper-old[_ngcontent-%COMP%]{position:relative;width:6rem;height:5rem;max-width:100%;margin:0 auto}.daily-reward-container-img[_ngcontent-%COMP%]{max-width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:100%}.daily-reward[_ngcontent-%COMP%]{display:flex;flex-flow:column;width:100%;height:100%;align-items:center}.daily-reward--title[_ngcontent-%COMP%]{width:100%;padding:.2em;position:relative;text-align:center;display:flex;justify-content:center;align-items:center}.daily-reward--checked-image--wrapper[_ngcontent-%COMP%]{position:absolute!important;top:50%;left:50%;width:2.5rem;height:1.5rem;transform:translate(-50%,-50%)}.daily-reward--image-wrapper[_ngcontent-%COMP%]{position:relative;width:100%}.daily-reward-container__reward[_ngcontent-%COMP%]{text-align:center;max-width:90%;margin:0 auto;display:flex;justify-content:center;margin-bottom:.5rem}.daily-reward-container__reward--value[_ngcontent-%COMP%]{font-size:inherit}"],changeDetection:0}),n})();!function(t){let n;var e;(e=n=t.EStylePreset||(t.EStylePreset={})).Default="default",e.RegisterAdvent="registerAdvent",t.Styles=class o{constructor(i=!1){this.isHighlighted=i}}}(xg||(xg={}));var OM=function(t){return t.OnlineUsers="onlineUsers",t.FilteredUsers="filteredUsers",t}(OM||{});const gf=100;var ZL=function(t){return t.InitState="[Social] Init State",t.UpdateUsers="[Social] Update Social Users",t.ResetState="[Social] Reset Social State",t}(ZL||{});const Yve=he(ZL.InitState,{_as:"props",_p:void 0}),Jve=he(ZL.UpdateUsers,{_as:"props",_p:void 0}),Xve=he(ZL.ResetState,{_as:"props",_p:void 0});var ayt=__webpack_require__(9336),cyt=__webpack_require__.n(ayt);let ebe=(()=>{var t;class n{constructor(e){this.http=e}getOnlineUsers(e){return this.http.get("users/online/list",{params:e}).toPromise().then(i=>i.body.list)}searchWithFilters(e){return this.http.post("users/filteredSearch",{data:{query:e.filters,options:{limit:e.limit,skip:e.skip}}}).toPromise().then(r=>r.body.users)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),QL=(()=>{var t;class n{constructor(e,i){this.socialClientService=e,this.store=i,this.serviceId=(0,ie.uuidV4)(),this.store.dispatch(Yve({serviceId:this.serviceId}))}getUsers(e){const i=this.createResult();let r;e.filters&&(r=e.filters.getOptionsMap("username"));const s=this.store.social.selectUsers({serviceId:this.serviceId,limit:e.limit,filters:r});if(!s.misses||this.isLastPage(r))return this.getSelectUsersObservable({result:i,selectedUsersState:s,filters:e.filters});i.loadingState.isLoading=!0;let a=[];if(e.filters)a.push(this.createGetUsersRequest({skip:s.hits.length,filters:r,limit:s.misses}));else{let c=Math.ceil(s.misses/gf);a=Array.from({length:c}).map((u,h)=>this.createGetUsersRequest({skip:s.hits.length+gf*h,limit:e.limit,filters:r}))}return this.createGetUsersObservable({requests:a,result:i,filters:r,selectedUsersState:s,limit:e.limit})}ngOnDestroy(){this.store.dispatch(Xve({serviceId:this.serviceId}))}createResult(){return{list:[],loadingState:{isLoaded:!1,isLoading:!1,error:void 0},hasMoreRecords:!0}}createGetUsersObservable(e){const i=Ks(Promise.all(e.requests)).pipe(jn((r,s)=>{const a=cyt()(r);this.store.dispatch(Jve({serviceId:this.serviceId,users:a,filters:e.filters,isLastPage:a.length<e.selectedUsersState.misses}));const c=this.store.social.selectUsers({serviceId:this.serviceId,limit:e.limit,filters:e.filters});return e.result.list=c.hits,e.result.hasMoreRecords=a.length===e.requests.length*gf,e.result.loadingState.isLoaded=!0,e.result.loadingState.isLoading=!1,e.result}),mh(r=>(e.result.loadingState.error=r,e.result.loadingState.isLoading=!1,Xn(e.result))));return m_(Xn(e.result),i).pipe(jn(r=>e.result))}createGetUsersRequest(e){return e.filters?this.socialClientService.searchWithFilters({limit:e.limit,skip:e.skip,filters:e.filters}):this.socialClientService.getOnlineUsers({count:gf,page:Math.ceil((e.skip+gf)/gf)})}getSelectUsersObservable(e){return Xn(e.result).pipe(jn(i=>(i.list=e.selectedUsersState.hits,i.loadingState.isLoading=!1,i.loadingState.isLoaded=!0,e.result.hasMoreRecords=e.selectedUsersState.hasMoreRecords,i)))}isLastPage(e){return this.store.social.selectIsLastPage({serviceId:this.serviceId,filters:e})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ebe),T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var VC=function(t){return t.RecentlyPlayed="recentlyPlayed",t.ClubMembers="clubMembers",t.Friends="friends",t.Global="global",t}(VC||{});let oj=(()=>{var t;class n{constructor(e){this.http=e}requestHistory(){return this.http.get("games/history/list").toPromise().then(e=>e.body)}requestFriends(){return this.http.get("games/invite/friends").toPromise().then(e=>e.body)}requestRecentPlayers(){return this.http.get("games/invite/recents").toPromise().then(e=>e.body)}requestClubMembers(){var e=this;return f(function*(){try{return yield e.http.get("games/invite/clubMembers").toPromise().then(i=>i.body)}catch(i){throw jt.createErrorInstance(i)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function lyt(t,n){1&t&&B(0,"loader-image",0),2&t&&l("transparentBG",!0)}function uyt(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",9),Y("select",function(){const r=oe(o).$implicit;return re(_(2).selectTab(r))}),B(1,"button-icon",10),m()}if(2&t){const o=n.$implicit,e=_(2);ni("",o.id," button-icon-tab"),l("tabId",o.id),d(),l("bclass","search-user-popup__top-tabs__bclass "+(o.id===e.tabs.current.id?" top-tabs__selected":""))("flatButton",!0)("icon",o.icon)("buttonModifier",e.EButtonModifier.BUTTON_TRANSPARENT)}}function dyt(t,n){1&t&&B(0,"loader-image",0),2&t&&l("transparentBG",!0)}const pyt=t=>({textKey:t}),hyt=t=>[t];function myt(t,n){if(1&t&&B(0,"empty-content",11),2&t){const o=_(2);l("textArray",ne(3,hyt,ne(1,pyt,o.error)))}}function fyt(t,n){1&t&&B(0,"user-list-box-current-game",16)}function gyt(t,n){if(1&t){const o=Ce();p(0,"button-text",17),Y("onClick",function(){const r=oe(o).$implicit;return re(_(3).selectUser(r))}),H(1),V(2,"translate"),m()}2&t&&(l("buttonModifier",_(3).EButtonModifier.BUTTON_ACTION)("bclass","search-user-popup__select-button-bclass"),d(),ze(" ",$(2,3,"WORDS.SELECT")," "))}const _yt=t=>({textNoUsers:t,textUserLabel:"FRIENDS.ONLINE",showPartOfTotal:!1,onlineIndication:!1});function vyt(t,n){if(1&t&&(p(0,"list-users-box",12),U(1,fyt,1,0,"ng-template",13,14,ft)(3,gyt,3,5,"ng-template",null,15,ft),m()),2&t){const o=_(2);l("type","online")("listUsers",o.users)("totalListLength",o.users.length)("searchedUser",o.usernameFilter)("shownUsersCount",o.visibleUsers)("configListUsers",ne(6,_yt,o.getEmptyTextError()))}}const byt=t=>({handler:t});function Cyt(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().closePopup())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().closePopup())}),m(),p(2,"top-tabs",3),U(3,uyt,2,8,"top-tab-item",4),m(),p(4,"div",5)(5,"div",6)(6,"search-bar",7),Y("clearFilters",function(){return oe(o),re(_().resetFilters())})("filterAction",function(i){return oe(o),re(_().searchUser(i))}),m()(),p(7,"div",8),U(8,dyt,1,1,"loader-image",0)(9,myt,1,5)(10,vyt,5,8),m()()()}if(2&t){const o=_();l("popupContainerOpened",!0)("popupContainerOptions",o.popup.containerOptions),d(),l("popupTitleType",o.popup.titleType)("text",o.tabs.current.text),d(),l("initialOpenedTab",o.tabs.current.id)("showBackButton",!1),d(),l("ngForOf",o.tabs.list),d(),l("onScrolledToBottom",ne(12,byt,o.increaseVisibleFriends)),d(2),l("customInputCssClass","invite-popup__searchbar--input")("searchBarPlaceholder","PLACEHOLDERS.USERNAME")("error",o.searchBarError),d(2),Qo(8,o.usersLoading?8:o.error?9:o.users?10:-1)}}let rj=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){var h=this;this.games=e,this.store=i,this.cdr=r,this.socialService=s,this.permissionService=a,this.userBlockService=c,this.fieldValidatorFactory=u,this.close=new ke,this.onUserSelect=new ke,this.usernameFilter="",this.usersLoading=!1,this.loading=!1,this.defaultVisibleUser=20,this.visibleUserStep=20,this.EButtonModifier=ve.EButtonModifier,this.increaseVisibleFriends=()=>{this.visibleUsers<this.users.length?this.visibleUsers+=this.visibleUserStep:this.visibleUsers=this.users.length,this.cdr.detectChanges()},this.onGlobalSearchTabSelect=function(){var b=f(function*(w){try{h.usersLoading=!0,h.cdr.detectChanges();const R=new Jn(h.socialService.getUsers({filters:w,limit:1e3}).toPromise());h.tasks.users={promise:R};const G=yield R;h.users=h.buildUsersFromGlobalUsers(G)}catch(R){h.showError(R)}finally{h.usersLoading=!1,h.cdr.detectChanges()}});return function(w){return b.apply(this,arguments)}}(),this.onFriendsTabSelect=f(function*(){try{h.usersLoading=!0,h.cdr.detectChanges();const b=new Jn(h.games.requestFriends());h.tasks.users={promise:b};const w=yield b;h.users=h.buildUsersFromInvites(w)}catch(b){h.showError(b)}finally{h.usersLoading=!1,h.cdr.detectChanges()}}),this.onRecentPlayersTabSelect=f(function*(){try{h.usersLoading=!0,h.cdr.detectChanges();const b=new Jn(h.games.requestRecentPlayers());h.tasks.users={promise:b};const w=yield b;h.users=h.buildUsersFromInvites(w)}catch(b){h.showError(b)}finally{h.usersLoading=!1,h.cdr.detectChanges()}}),this.onClubMembersTabSelect=f(function*(){try{var b;h.usersLoading=!0,h.cdr.detectChanges(),null===(b=h.clubSubscription)||void 0===b||b.unsubscribe(),h.clubSubscription=h.store.clubs.subscribeCurrentClub().pipe(tr(1)).subscribe(h.onClubMembersTabSelect);const w=new Jn(h.games.requestClubMembers());h.tasks.users={promise:w};const R=yield w;h.users=h.buildUsersFromInvites(R)}catch(w){h.showError(w)}finally{h.usersLoading=!1,h.cdr.detectChanges()}}),this.popup={titleType:li.Static,containerOptions:{styleProperties:{maxWidth:"50rem",height:"auto",maxHeight:"98%"},customBackdropCssClass:"cg-invite-popup__backdrop",customComponentCssClass:"cg-invite-popup__content"}},this.tabs={current:void 0,list:void 0},this.tasks={users:void 0}}ngOnInit(){var e=this;return f(function*(){e.visibleUsers=e.defaultVisibleUser,e.loading=!0,e.cdr.detectChanges();try{e.blockedUsers=(yield e.userBlockService.getBlockList()).blocked}catch(i){e.blockedUsers=[]}e.loading=!1,e.tabs=e.buildTabs(),e.tabs.current.onSelect.apply(e),e.usernameValidator=e.fieldValidatorFactory.createUsernameValidator()})()}ngOnDestroy(){var e;null===(e=this.clubSubscription)||void 0===e||e.unsubscribe()}closePopup(){this.close.emit()}selectUser(e){this.onUserSelect.emit(e.profile)}selectTab(e){var i;this.tabs.current&&this.tabs.current.id===e.id||(this.tabs.current=e,this.usernameFilter="",this.error=void 0,this.visibleUsers=this.defaultVisibleUser,this.cancelUsersTask(),null===(i=this.clubSubscription)||void 0===i||i.unsubscribe(),requestAnimationFrame(()=>{e.onSelect&&e.onSelect.apply(this)}))}resetFilters(){this.tabs.current.onSelect.apply(this),this.usernameFilter="",this.cdr.detectChanges()}searchUser(e){!e.searchbarFilterValue||this.usernameValidator.isValid(e.searchbarFilterValue)?this.tabs.current.id!==VC.Global?(this.usernameFilter=e.searchbarFilterValue,this.cdr.detectChanges()):this.onGlobalSearchTabSelect(e):this.handleNotValidUsername()}getEmptyTextError(){return this.tabs.current.id===VC.Friends?"FRIENDS.NO_FRIENDS":"ERRORS.NO_USERS_FOUND"}handleNotValidUsername(){this.searchBarError={key:"API_ERRORS.InvalidUsername",params:[this.usernameValidator.minLength,this.usernameValidator.maxLength]}}buildTabs(){let e=[{id:VC.Friends,icon:{name:ve.EIcons.ADD_FRIEND},text:{key:"LABEL.SEARCH_FRIENDS"},isEnabled:!0,onSelect:this.onFriendsTabSelect},{id:VC.RecentlyPlayed,icon:{name:ve.EIcons.USERS},text:{key:"LABEL.SEARCH_IN_RECENT_GAMES"},isEnabled:!0,onSelect:this.onRecentPlayersTabSelect},{id:VC.ClubMembers,icon:{name:ve.EIcons.CLUB_PAGE},text:{key:"LABEL.SEARCH_CLUB"},isEnabled:this.permissionService.getModulePermission(nt.EPermissionModule.Clubs).isPermitted,onSelect:this.onClubMembersTabSelect},{id:VC.Global,icon:{name:ve.EIcons.COUNTRY},text:{key:"LABEL.SEARCH_GLOBAL"},isEnabled:!0,onSelect:this.onGlobalSearchTabSelect}];return{current:e[0],list:e.filter(i=>i.isEnabled)}}buildUsersFromInvites(e){return e.profiles.map(i=>({profile:Lo.toPlatformProfile(i)})).filter(i=>i.profile.id!==this.store.selectSimpleProfile().id&&!this.blockedUsers.find(r=>r.profile.id===i.profile.id))}buildUsersFromGlobalUsers(e){return e.list.map(i=>({profile:i})).filter(i=>i.profile.id!==this.store.selectSimpleProfile().id&&!this.blockedUsers.find(r=>r.profile.id===i.profile.id))}showError(e){e instanceof Cr?console.warn(e):this.error=e instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":e instanceof Mm?"CLUBS.CLUB_NOT_FOUND":e instanceof $f?"CLUBS.GAME_INVITE_NO_CLUB":"ERRORS.SOMETHING_WRONG",this.cdr.detectChanges()}cancelUsersTask(){this.tasks.users&&this.tasks.users.promise.cancel()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oj),g(J),g(Re),g(QL),g(Ti),g(t0),g(wa))},t.\u0275cmp=pe({type:t,selectors:[["search-user-popup"]],outputs:{close:"close",onUserSelect:"onUserSelect"},features:[mn([QL])],decls:2,vars:1,consts:[[3,"transparentBG"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"search-user-popup__tab-container",3,"initialOpenedTab","showBackButton"],[3,"tabId","class","select",4,"ngFor","ngForOf"],["scroll-directive","",1,"search-user-popup__content-section",3,"onScrolledToBottom"],[1,"search-user-popup__search-bar"],[3,"customInputCssClass","searchBarPlaceholder","error","clearFilters","filterAction"],[1,"search-user-popup__player-section"],[3,"tabId","select"],[1,"search-user-popup__list-item--navigation",3,"bclass","flatButton","icon","buttonModifier"],[3,"textArray"],[1,"search-user-popup__users-list",3,"type","listUsers","totalListLength","searchedUser","shownUsersCount","configListUsers"],["slot","user-label"],["userLabel",""],["buttons",""],[1,"search-user-popup__current-game"],[1,"search-user-popup__select-button",3,"buttonModifier","bclass","onClick"]],template:function(e,i){1&e&&U(0,lyt,1,1,"loader-image",0)(1,Cyt,11,14),2&e&&Qo(0,i.loading?0:1)},dependencies:[Mt,Is,bo,kl,dl,mv,R0,pf,pn,ei,Ji,Wi,Oi,qe],styles:[".search-user-popup__tab-container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;width:100%;height:4rem;margin:0 auto;margin-top:1rem}.search-user-popup__select-button[_ngcontent-%COMP%]{min-width:7rem}@media screen and (max-width: 360px){.search-user-popup__select-button[_ngcontent-%COMP%]{min-width:7.8rem}}.search-user-popup__content-section[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:55vh}.search-user-popup__content-section.share[_ngcontent-%COMP%]{height:auto}.search-user-popup__users-list[_ngcontent-%COMP%]{margin:0;width:100%}.search-user-popup__search-bar[_ngcontent-%COMP%]{height:4rem;width:90%;margin:2rem auto 0}.search-user-popup__player-section[_ngcontent-%COMP%]{width:100%;margin:0;position:relative;height:calc(100% - 6rem)}.search-user-popup__current-game[_ngcontent-%COMP%]{margin-top:.5rem}"],changeDetection:0}),n})();const yyt=()=>({textKey:"LEADERBOARDS.EMPTY"}),tbe=t=>[t];function Syt(t,n){1&t&&B(0,"empty-content",0),2&t&&l("textArray",ne(2,tbe,pt(1,yyt)))}const wyt=(t,n)=>n.id;function Tyt(t,n){if(1&t&&(p(0,"p",6),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit;d(),se(yt(2,1,"LEADERBOARDS.MY_POSITION_TEXT",ne(4,tbe,o.myPlacement)))}}function Pyt(t,n){if(1&t&&(p(0,"leaderboard-professionals",3)(1,"span",4),H(2),m()(),U(3,Tyt,3,6,"p",5)),2&t){const o=n.$implicit,e=_(2);l("elementSize",e.avatarSize)("leaders",o.rankings)("type",e.type),d(2),ze(" ",o.rankedSeasonName," "),d(),Qo(3,o.myPlacement?3:-1)}}function Iyt(t,n){if(1&t&&(p(0,"div",1)(1,"div",2),vT(2,Pyt,4,5,null,null,wyt),m()()),2&t){const o=_();d(2),bT(o.seasons)}}let sj=(()=>{var t;class n{constructor(e,i,r,s){this.destroyRef=e,this.store=i,this.appLanguageService=r,this.changeDection=s,this.avatarSize=x0.Medium,this.type=ri.RankedSeasonHallOfFame}ngOnChanges(e){e.game.currentValue!==e.game.previousValue&&(this.subscription&&this.subscription.unsubscribe(),this.subscription=this.store.rankedSeasonsLeaderboards.subscribeHallOfFameLeaderboards(this.game).pipe(mi(this.destroyRef),bt(i=>void 0!==i)).subscribe(i=>{this.hallOfFameState=i,this.seasons=this.store.rankedSeasonsLeaderboards.selectHallOfFameLeaderboardsData(this.game).map(r=>({id:r.id,rankings:r.rankings,rankedSeasonName:r.rankedSeasonName[this.appLanguageService.getAppLanguage()],myPlacement:r.myPlacement})),this.changeDection.detectChanges()}))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(br),g(J),g(Ma),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ranked-seasons-leaderboards"]],hostAttrs:[1,"ranked-seasons-leaderboards-host"],inputs:{game:"game"},features:[it],decls:2,vars:1,consts:[[3,"textArray"],[1,"ranked-seasons-leaderboards--wrapper"],[1,"ranked-seasons-leaderboards--leaders"],[3,"elementSize","leaders","type"],[1,"container-leaderboard--ranked-season-leaderboard-name"],["class","ranked-season--my-position-text"],[1,"ranked-season--my-position-text"]],template:function(e,i){1&e&&U(0,Syt,1,4,"empty-content",0)(1,Iyt,4,0),2&e&&Qo(0,0===(null==i.seasons?null:i.seasons.length)&&null!=i.hallOfFameState&&i.hallOfFameState.loadingState.isLoaded||null!=i.hallOfFameState&&i.hallOfFameState.loadingState.error?0:1)},dependencies:[bo,fM,qe],styles:[".ranked-seasons-leaderboards--wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;overflow:hidden}.ranked-seasons-leaderboards--leaders[_ngcontent-%COMP%]{position:relative;width:100%;min-height:28rem}@media only screen and (max-width: 1280px){.ranked-seasons-leaderboards--leaders[_ngcontent-%COMP%]{min-height:23rem}}@media only screen and (max-width: 480px){.ranked-seasons-leaderboards--leaders[_ngcontent-%COMP%]{min-height:16rem}}"],changeDetection:0}),n})();const Myt=["whenReadyRef"],Oyt=["whenErrorRef"],Eyt=["whenLoadingRef"],xyt=["whenEmptyRef"];function Ayt(t,n){if(1&t&&B(0,"loader-image",2),2&t){const o=_(2);let e;l("delay",o.loading.delay)("transparentBG",null===(e=o.loading.transparent)||void 0===e||e)}}function Ryt(t,n){if(1&t&&(Tn(0),Un(1,0),U(2,Ayt,1,2,"loader-image",1),Pn()),2&t){const o=_();d(),l("ngTemplateOutlet",o.whenLoadingRef),d(),Qo(2,o.whenLoadingRef?-1:2)}}const aj=t=>({textKey:t}),cj=t=>[t];function kyt(t,n){if(1&t&&B(0,"empty-content",4),2&t){const o=_(2);l("textArray",ne(3,cj,ne(1,aj,o.error.message?o.error.message.key:o.defaultErrorMessage.key)))}}function Lyt(t,n){if(1&t&&(Tn(0),Un(1,0),U(2,kyt,1,5,"empty-content",3),Pn()),2&t){const o=_();d(),l("ngTemplateOutlet",o.whenErrorRef),d(),Qo(2,o.whenErrorRef?-1:2)}}function Dyt(t,n){if(1&t&&B(0,"empty-content",4),2&t){const o=_(2);l("textArray",ne(3,cj,ne(1,aj,o.empty.message?o.empty.message.key:o.defaultEmptyMessage.key)))}}function Byt(t,n){if(1&t&&(Tn(0),Un(1,0),U(2,Dyt,1,5,"empty-content",3),Pn()),2&t){const o=_();d(),l("ngTemplateOutlet",o.whenEmptyRef),d(),Qo(2,o.whenEmptyRef?-1:2)}}function Nyt(t,n){if(1&t&&B(0,"empty-content",4),2&t){const o=_(2);l("textArray",ne(3,cj,ne(1,aj,o.empty.message?o.empty.message.key:o.defaultEmptyMessage.key)))}}function Fyt(t,n){if(1&t&&(Tn(0),Un(1,0),U(2,Nyt,1,5,"empty-content",3),Pn()),2&t){const o=_();d(),l("ngTemplateOutlet",o.whenReadyRef),d(),Qo(2,o.whenReadyRef?-1:2)}}let EM=(()=>{var t;class n{constructor(){this.loading=new n.Loading,this.error=new n.Error,this.empty=new n.Empty,this.content=new n.Content,this.defaultErrorMessage=n.Error.defaultErrorMessage,this.defaultEmptyMessage=n.Empty.defaultEmptyMessage}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["async-state-container"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,Myt,5),Ho(r,Oyt,5),Ho(r,Eyt,5),Ho(r,xyt,5)),2&e){let s;je(s=He())&&(i.whenReadyRef=s.first),je(s=He())&&(i.whenErrorRef=s.first),je(s=He())&&(i.whenLoadingRef=s.first),je(s=He())&&(i.whenEmptyRef=s.first)}},inputs:{loading:"loading",error:"error",empty:"empty",content:"content"},decls:4,vars:4,consts:[[3,"ngTemplateOutlet"],["class","async-state-element",3,"delay","transparentBG"],[1,"async-state-element",3,"delay","transparentBG"],["class","async-state-element",3,"textArray"],[1,"async-state-element",3,"textArray"]],template:function(e,i){1&e&&U(0,Ryt,3,2,"ng-container")(1,Lyt,3,2,"ng-container")(2,Byt,3,2,"ng-container")(3,Fyt,3,2,"ng-container"),2&e&&(Qo(0,i.loading.show?0:-1),d(),Qo(1,i.error.show?1:-1),d(),Qo(2,i.empty.show?2:-1),d(),Qo(3,i.content.show?3:-1))},dependencies:[qr,bo,Oi],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:block}.async-state-container[_ngcontent-%COMP%], .async-state-element[_ngcontent-%COMP%]{height:100%;width:100%}"],changeDetection:0}),n})();!function(t){t.Loading=class n{constructor(){this.show=!1,this.delay=200,this.transparent=!1}},t.Error=(()=>{class s{constructor(){this.show=!1,this.message=s.defaultErrorMessage}}return s.defaultErrorMessage={key:"ERRORS.SOMETHING_WRONG"},s})(),t.Empty=(()=>{class s{constructor(){this.show=!1,this.message=s.defaultEmptyMessage}}return s.defaultEmptyMessage={key:"OTHER.NO_DATA"},s})(),t.Content=class i{constructor(){this.show=!1}}}(EM||(EM={}));const eSt=[Ls,xi,Yi,Io,Mw,tae.forChild(),UR.forChild(),$z,z4,Pfe],tSt=[hf,fve,Mu,Ig,$k,cI,Iae,Fc];let No=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:tSt,imports:[eSt,xi,Mw,UR,$z,z4,Io,Yi]}),n})(),rbe=(()=>{var t;class n{constructor(e){setTimeout(()=>this.popupService=e.get(Cn))}handleError(e){this.popupService.blocker({textParams:{translationKey:"CLIENT_ERRORS.".concat(e.name)}})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var nSt=JS.SystemCompatibilityError,iSt=lt.AppDependeciesLoadError;let oSt=(()=>{var t;class n extends lh{constructor(e,i){super(),this.exceptionTracker=e,this.systemErrorHandler=i}handleError(e){console.error("GlobalExceptionHandler:",e),e instanceof iSt||this.exceptionTracker.captureException(e),e instanceof nSt&&this.systemErrorHandler.handleError(e),super.handleError(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(uv),T(rbe))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const sSt=[h0,uv,{provide:lh,useClass:oSt}];let aSt=(()=>{var t;class n{constructor(e){!function rSt(t,n){if(t)throw new Error("".concat(n," has already been loaded. Import ").concat(n," in the root module only."))}(e,"CoreModule")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(t,12))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...sSt]}),n})();class cSt{constructor(){const n=this.getInitialState();for(let o in n)o&&(this[o]=n[o])}resetState(){return this.updateState(this.getInitialState()),this}updateState(n){for(let o in n)o&&(this[o]=n[o])}getInitialState(){return{drawerOpened:!1,showHomeButton:!1,showDeviceRotateHint:!1,preventBottomDrawerClose:!1,showEmoticons:!1,showPhrases:!1,showSpectators:!1,showVoiceMessage:!1,loaderVisible:!1,settingOpened:!1,selectedDrawerTab:void 0,roomViewModel:void 0,tableViewModel:void 0,selectedBackground:void 0,lockedOrientation:void 0,rightMenuButtonsArray:[],leftMenuButtonsArray:[],giftsData:void 0,hideMenuButtons:!1,playersVoiceMsgData:{},voiceChatEnabledToggleState:!0}}}var xM=function(t){return t.Spectators="spectators",t}(xM||{}),lSt=ve.EButtonModifier,uSt=ve.EIcons;const sbe=t=>({opened:t}),lj=t=>({name:t});function dSt(t,n){if(1&t){const o=Ce();p(0,"button-icon",3),Y("onClick",function(){oe(o);const i=_();return re(i.menuToggle(i.buttonPosition))}),m()}if(2&t){const o=_();ni("buttons-list-game__container--main-button ",o.buttonPosition," "),l("rounded",!0)("flatButton",!0)("ngClass",ne(8,sbe,o.menuOpened))("buttonModifier",o.menuOpened?o.buttonModifier.BUTTON_DARK:o.buttonModifier.BUTTON_INGAME)("icon",ne(10,lj,o.menuOpened?o.iconNames.CLOSE:o.iconNames.UTILITY))}}function pSt(t,n){1&t&&B(0,"icon-component",12),2&t&&l("icon",_(3).tooltipArgs.icon)}function hSt(t,n){if(1&t&&(p(0,"p",13),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),se($(2,1,o.tooltipArgs.text))}}function mSt(t,n){if(1&t&&(p(0,"div",8),U(1,pSt,1,1,"icon-component",9)(2,hSt,3,3,"p",10),B(3,"div",11),m()),2&t){const o=_(2);d(),l("ngIf",o.tooltipArgs.icon),d(),l("ngIf",o.tooltipArgs.text)}}const fSt=t=>({"only-list":t});function gSt(t,n){if(1&t){const o=Ce();p(0,"button-icon",14),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_().buttonClicked(i.tab))}),m()}if(2&t){const o=_().$implicit,e=_();ni("buttons-list-game__container--action-button ",o.tab,""),l("ngClass",ne(10,fSt,e.notToggleable))("disabled",o.disabled)("loading",o.loading)("buttonModifier",e.drawerOpened===o.tab?e.buttonModifier.BUTTON_DARK:e.buttonModifier.BUTTON_INGAME)("rounded",!0)("flatButton",!0)("icon",ne(12,lj,o.icon))}}function _St(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",15),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_().buttonClicked(i.type))}),B(1,"number",16),m()}if(2&t){const o=_().$implicit,e=_();(function kQ(t,n,o,e,i){dh(Pd,bm,pS(Nt(),t,n,o,e,i),!0)})("buttons-list-game__container--action-button ",o.type," ",e.drawerOpened===e.EDrawerItem.Spectators?e.buttonModifier.BUTTON_DARK:e.buttonModifier.BUTTON_INGAME,""),l("icon",ne(10,lj,o.icon))("buttonModifier",e.drawerOpened===e.EDrawerItem.Spectators?e.buttonModifier.BUTTON_DARK:e.buttonModifier.BUTTON_INGAME)("flatButton",!0)("rounded",!0)("bclass","buttons-list-game-container__spectatorsButton"),d(),l("value",o.data.length)}}function vSt(t,n){if(1&t&&(p(0,"div",17),B(1,"img",18),m()),2&t){const o=_().$implicit;d(),l("src",o.data.backgroundImgUrl,Wn)}}function bSt(t,n){if(1&t&&(p(0,"div"),U(1,mSt,4,2,"div",4)(2,gSt,1,14,"button-icon",5)(3,_St,2,12,"button-icon-text",6)(4,vSt,2,1,"div",7),m()),2&t){const o=n.$implicit,e=n.index,i=_();ni("buttons-list-game__container--button ",o.type,""),go("transform",i.transformButton(e)),Uo("with-tooltip",i.tooltipArgs&&o.tab===i.tooltipArgs.attachedToBtn),d(),l("ngIf",i.tooltipArgs&&o.tab===i.tooltipArgs.attachedToBtn),d(),l("ngIf",o.tab),d(),l("ngIf",o.type===i.EMenuItem.Spectators),d(),l("ngIf",o.id===i.EDrawerItem.VoiceMessage&&o.data&&o.data.backgroundImgUrl)}}let abe=(()=>{var t;class n{constructor(){this.buttonModifier=lSt,this.iconNames=uSt,this.EMenuItem=xM,this.EDrawerItem=Tr,this.menuButtonClicked=new ke,this.menuToggleClicked=new ke}buttonClicked(e){this.menuButtonClicked.emit(e)}menuToggle(e){this.menuToggleClicked.emit(e)}transformButton(e){if(this.menuOpened){let i=this.notToggleable?e:e+1;return"translateY(calc(".concat(-100*i,"% - ").concat(i,"rem))")}return""}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["buttons-list-game"]],inputs:{tooltipArgs:"tooltipArgs",drawerOpened:"drawerOpened",menuButtons:"menuButtons",menuOpened:"menuOpened",buttonPosition:"buttonPosition",notToggleable:"notToggleable"},outputs:{menuButtonClicked:"menuButtonClicked",menuToggleClicked:"menuToggleClicked"},decls:3,vars:8,consts:[[3,"class","rounded","flatButton","ngClass","buttonModifier","icon","onClick",4,"ngIf"],[3,"ngClass"],[3,"class","transform","with-tooltip",4,"ngFor","ngForOf"],[3,"rounded","flatButton","ngClass","buttonModifier","icon","onClick"],["class","menu-buttons-tooltip",4,"ngIf"],[3,"class","ngClass","disabled","loading","buttonModifier","rounded","flatButton","icon","onClick",4,"ngIf"],[3,"class","icon","buttonModifier","flatButton","rounded","bclass","onClick",4,"ngIf"],["class","buttons-list-game__container--action-button voiceMessageSpeaking",4,"ngIf"],[1,"menu-buttons-tooltip"],["class","menu-buttons-tooltip__icon",3,"icon",4,"ngIf"],["class","menu-buttons-tooltip__text",4,"ngIf"],[1,"menu-buttons-tooltip__arrow"],[1,"menu-buttons-tooltip__icon",3,"icon"],[1,"menu-buttons-tooltip__text"],[3,"ngClass","disabled","loading","buttonModifier","rounded","flatButton","icon","onClick"],[3,"icon","buttonModifier","flatButton","rounded","bclass","onClick"],[3,"value"],[1,"buttons-list-game__container--action-button","voiceMessageSpeaking"],[3,"src"]],template:function(e,i){1&e&&(U(0,dSt,1,12,"button-icon",0),p(1,"section",1),U(2,bSt,5,11,"div",2),m()),2&e&&(l("ngIf",i.menuButtons&&i.menuButtons.length>0&&!i.notToggleable),d(),ni("buttons-list-game__container--buttons-wrapper ",i.buttonPosition,""),l("ngClass",ne(6,sbe,i.menuOpened)),d(),l("ngForOf",i.menuButtons))},dependencies:[Xe,Mt,Ne,Dn,Qr,ei,so,qe],styles:['[_nghost-%COMP%]{width:100%;height:100%}.buttons-list-game__container--main-button[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:5rem;height:5rem;border-radius:50%;z-index:2}@media only screen and (max-width: 480px){.buttons-list-game__container--main-button[_ngcontent-%COMP%]{width:4rem;height:4rem}}.buttons-list-game__container--main-button.left[_ngcontent-%COMP%]:not(.opened){font-size:3.5rem}.buttons-list-game__container--main-button.right[_ngcontent-%COMP%]{right:0;left:auto}.buttons-list-game__container--buttons-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:5rem;height:5rem;z-index:1}@media only screen and (max-width: 480px){.buttons-list-game__container--buttons-wrapper[_ngcontent-%COMP%]{width:4rem;height:4rem}}.buttons-list-game__container--buttons-wrapper[_ngcontent-%COMP%]   .spectators[_ngcontent-%COMP%]{transform:translate(calc(100% + .5rem));cursor:pointer}.buttons-list-game__container--buttons-wrapper.right[_ngcontent-%COMP%]{left:auto}.menu-buttons-tooltip[_ngcontent-%COMP%]{position:absolute;bottom:calc(100% + 1rem);right:0;width:max-content;max-width:99vw;min-height:5rem;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;z-index:2}@media only screen and (max-width: 480px){.menu-buttons-tooltip[_ngcontent-%COMP%]{min-height:4rem;padding:.5rem}.menu-buttons-tooltip[_ngcontent-%COMP%]   .menu-buttons-tooltip__icon[_ngcontent-%COMP%]{width:2rem!important;height:2rem!important;margin:0 .5rem!important}.menu-buttons-tooltip[_ngcontent-%COMP%]   .menu-buttons-tooltip__arrow[_ngcontent-%COMP%]{right:1.5rem!important}.menu-buttons-tooltip[_ngcontent-%COMP%]   .menu-buttons-tooltip__text[_ngcontent-%COMP%]{width:calc(100% - 3rem)}}.menu-buttons-tooltip[_ngcontent-%COMP%]   .menu-buttons-tooltip__arrow[_ngcontent-%COMP%]{position:absolute;bottom:-.575rem;right:2rem;content:"";width:1rem;height:1rem;transform:rotate(45deg);border-top:none;border-left:none}.menu-buttons-tooltip[_ngcontent-%COMP%]   .menu-buttons-tooltip__icon[_ngcontent-%COMP%]{width:3rem;height:3rem;margin:0 .5rem 0 1rem}.menu-buttons-tooltip[_ngcontent-%COMP%]   .menu-buttons-tooltip__text[_ngcontent-%COMP%]{font-size:1.4rem;display:inline-table;text-align:center;padding-right:1rem;width:calc(100% - 4rem)}.buttons-list-game__container--action-button[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:5rem;height:5rem;border-radius:50%;z-index:1}@media only screen and (max-width: 480px){.buttons-list-game__container--action-button[_ngcontent-%COMP%]{width:4rem;height:4rem}}.buttons-list-game__container--action-button.spectators[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap;align-items:center;justify-content:center;font-weight:600}.buttons-list-game__container--action-button.voiceMessageSpeaking[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;overflow:hidden;pointer-events:none}.buttons-list-game__container--action-button.voiceMessageSpeaking[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;height:100%}@media screen and (max-width: 767px){.buttons-list-game__spectators-icon[_ngcontent-%COMP%]{height:2rem}}@media screen and (max-width: 479px){.buttons-list-game__spectators-icon[_ngcontent-%COMP%]{font-size:1.8rem}}@media screen and (max-width: 767px){.buttons-list-game__spectators-number[_ngcontent-%COMP%]{font-size:1.2rem}}.buttons-list-game__container--button[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:5rem;height:5rem;transition:transform .3s ease-in-out}.buttons-list-game__container--button.with-tooltip[_ngcontent-%COMP%]{z-index:2}.buttons-list-game__container--button.spectators[_ngcontent-%COMP%]{transform:initial!important}@media only screen and (max-width: 480px){.buttons-list-game__container--button[_ngcontent-%COMP%]{width:4rem;height:4rem}}']}),n})();var CSt=ve.EIcons;const ySt=t=>({"with-left-menu":t});let uj=(()=>{var t;class n{constructor(e){this.iconNames=CSt,this.menuLeftOpen=!1,this.menuRightOpen=!1,this.onClick=i=>{i&&i.target&&i.target.tagName&&-1!==i.target.tagName.toLowerCase().indexOf("canvas")&&this.closeMenu()},this.changeDetRef=e,this.changeDetRef.detach(),this.menuButtonClicked=new ke}ngOnInit(){this.gameElement=window.document.getElementById("game"),this.gameElement.addEventListener("click",this.onClick),this.gameElement.addEventListener("touchstart",this.onClick),this.changeDetRef.detectChanges()}ngOnDestroy(){void 0!==this.gameElement&&(this.gameElement.removeEventListener("click",this.onClick),this.gameElement.removeEventListener("touchstart",this.onClick))}closeMenu(){this.menuRightOpen=!1,this.menuLeftOpen=!1,this.changeDetRef.detectChanges()}buttonClicked(e){this.menuButtonClicked.emit(e),this.menuRightOpen=!1,this.menuLeftOpen=!1,this.changeDetRef.detectChanges()}menuToggle(e){switch(e){case"left":this.menuLeftOpen=!this.menuLeftOpen,this.menuRightOpen=!1;break;case"right":this.menuRightOpen=!this.menuRightOpen,this.menuLeftOpen=!1}this.changeDetRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["menu-button-game"]],inputs:{tooltipArgs:"tooltipArgs",drawerOpened:"drawerOpened",rightMenuButtons:"rightMenuButtons",leftMenuButtons:"leftMenuButtons"},outputs:{menuButtonClicked:"menuButtonClicked"},decls:3,vars:13,consts:[[1,"menu-button-game__wrapper",3,"ngClass"],[1,"menu-button","menu-button__left-button",3,"menuOpened","buttonPosition","drawerOpened","menuButtons","menuButtonClicked","menuToggleClicked"],[1,"menu-button","menu-button__right-button",3,"menuOpened","buttonPosition","drawerOpened","menuButtons","tooltipArgs","notToggleable","menuButtonClicked","menuToggleClicked"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"buttons-list-game",1),Y("menuButtonClicked",function(s){return i.buttonClicked(s)})("menuToggleClicked",function(s){return i.menuToggle(s)}),m(),p(2,"buttons-list-game",2),Y("menuButtonClicked",function(s){return i.buttonClicked(s)})("menuToggleClicked",function(s){return i.menuToggle(s)}),m()()),2&e&&(l("ngClass",ne(11,ySt,i.leftMenuButtons&&i.leftMenuButtons.length>0)),d(),l("menuOpened",i.menuLeftOpen)("buttonPosition","left")("drawerOpened",i.drawerOpened)("menuButtons",i.leftMenuButtons),d(),l("menuOpened",!0)("buttonPosition","right")("drawerOpened",i.drawerOpened)("menuButtons",i.rightMenuButtons)("tooltipArgs",i.tooltipArgs)("notToggleable",!0))},dependencies:[Xe,abe],styles:["[_nghost-%COMP%]{width:100%;height:100%}.menu-button-game__wrapper[_ngcontent-%COMP%]{position:relative;width:5rem;height:5rem;display:flex}@media only screen and (max-width: 480px){.menu-button-game__wrapper[_ngcontent-%COMP%]{width:4rem;height:4rem}}.menu-button-game__wrapper.with-left-menu[_ngcontent-%COMP%]{width:100%;justify-content:space-between}.menu-button__right-button[_ngcontent-%COMP%]{width:5rem;height:5rem}@media only screen and (max-width: 480px){.menu-button__right-button[_ngcontent-%COMP%]{width:4rem;height:4rem}}.menu-button[_ngcontent-%COMP%]{pointer-events:all}.menu-button__left-button[_ngcontent-%COMP%]{width:5rem;height:5rem}@media only screen and (max-width: 480px){.menu-button__left-button[_ngcontent-%COMP%]{width:4rem;height:4rem}}"]}),n})();const AM=new ao(sr);var Dl;!function(t){t.VivoxParticipantAdded=class n{constructor(b,w){this.id=b,this.micEnabled=w}},t.VivoxParticipantJoined=class o{constructor(){}},t.VivoxParticipantLeft=class e{constructor(){}},t.VivoxParticipantSpeaking=class i{constructor(b){this.id=b}},t.VivoxParticipantMuted=class r{constructor(b,w,R){this.id=b,this.muted=w,this.reason=R}},t.VivoxParticipantRemoved=class s{constructor(b,w){this.id=b,this.reason=w}},t.VivoxLocalMicToggled=class a{constructor(b){this.enabled=b}},t.VivoxLocalSoundToggled=class c{constructor(b){this.enabled=b}},t.VivoxError=class u{constructor(b,w,R){this.description=b,this.code=w,this.targetUserId=R}}}(Dl||(Dl={}));var zC=wi.EVivoxAction,hl=wi.EVivoxEvents,SSt=Dl.VivoxParticipantAdded,cbe=Dl.VivoxParticipantSpeaking,dj=Dl.VivoxParticipantMuted,wSt=Dl.VivoxParticipantRemoved,TSt=Dl.VivoxLocalMicToggled,PSt=Dl.VivoxLocalSoundToggled,ISt=Dl.VivoxError,MSt=Dl.VivoxParticipantJoined,lbe=Dl.VivoxParticipantLeft;class OSt{constructor(n,o){this.appService=n,this.ngZone=o,this.vivoxEvents=new sn,this.attachedVivoxListeners=!1,this._connected=!1,this.onVivoxParticipantAdded=e=>{this.vivoxEvents.next(new SSt(e.id,e.micEnabled))},this.onVivoxParticipantJoined=e=>{this.vivoxEvents.next(new MSt),this.connected=!0},this.onVivoxParticipantLeft=e=>{this.vivoxEvents.next(new lbe),this.connected=!1},this.onVivoxParticipantSpeaking=e=>{this.vivoxEvents.next(new cbe(e.id))},this.onVivoxParticipantMuted=e=>{this.vivoxEvents.next(new dj(e.id,e.muted,e.reason))},this.onVivoxParticipantRemoved=e=>{this.vivoxEvents.next(new wSt(e.id,e.reason))},this.onVivoxLocalMicToggled=e=>{this.vivoxEvents.next(new TSt(e.enabled))},this.onVivoxLocalSoundToggled=e=>{this.vivoxEvents.next(new PSt(e.enabled))},this.onVivoxError=e=>{this.vivoxEvents.next(new ISt(e.description,e.code,e.targetUserId))},this.messagesPlugin=n.getMobileAppService().messages()}join(n,o){this.attachedVivoxListeners||(this.attachVivoxListeners(),this.attachedVivoxListeners=!0),this.messagesPlugin.vivox({action:zC.Join,args:{channel:n,muted:o}})}leave(){this.attachedVivoxListeners&&(this.detachVivoxListeners(),this.attachedVivoxListeners=!1),this.messagesPlugin.vivox({action:zC.Leave})}leaveWithPromise(){return new Promise(n=>{this.messagesPlugin.vivox({action:zC.Leave}),this.vivoxEvents.pipe(bt(o=>o instanceof lbe),$u()).subscribe(o=>{this.attachedVivoxListeners&&(this.detachVivoxListeners(),this.attachedVivoxListeners=!1),n()})})}mute(n,o,e){this.messagesPlugin.vivox({action:zC.Mute,args:{id:n,muted:o,moderator:e}})}kick(n){this.messagesPlugin.vivox({action:zC.Kick,args:{id:n}})}toggleMic(n){this.messagesPlugin.vivox({action:zC.ToggleMic,args:{enabled:n}})}toggleSound(n){this.messagesPlugin.vivox({action:zC.ToggleSound,args:{enabled:n}})}participantMutedEventsByUserId(n){return this.vivoxEvents.pipe(bt(o=>o instanceof dj&&o.id===n),ws((o,e)=>o.id===e.id&&o.muted===e.muted&&o.reason===e.reason))}participantSpeakingEventsByUserId(n){return this.vivoxEvents.pipe(bt(o=>o instanceof cbe&&o.id===n))}get events(){return this.vivoxEvents.asObservable()}set connected(n){this._connected=n}get connected(){return this._connected}get participantMutedEvents(){return this.vivoxEvents.pipe(bt(n=>n instanceof dj),ws((n,o)=>n.id===o.id&&n.muted===o.muted&&n.reason===o.reason),zx((n,o)=>{const e=n[o.id];return e&&e.id===o.id&&e.muted===o.muted&&e.reason===o.reason?n:(n[o.id]=o,Object.assign({},n))},{}),ws())}attachVivoxListeners(){this.ngZone.runOutsideAngular(()=>{this.messagesPlugin.addVivoxEventListener(hl.VivoxParticipantAdded,this.onVivoxParticipantAdded),this.messagesPlugin.addVivoxEventListener(hl.VivoxParticipantJoined,this.onVivoxParticipantJoined),this.messagesPlugin.addVivoxEventListener(hl.VivoxParticipantLeft,this.onVivoxParticipantLeft),this.messagesPlugin.addVivoxEventListener(hl.VivoxParticipantSpeaking,this.onVivoxParticipantSpeaking),this.messagesPlugin.addVivoxEventListener(hl.VivoxParticipantMuted,this.onVivoxParticipantMuted),this.messagesPlugin.addVivoxEventListener(hl.VivoxParticipantRemoved,this.onVivoxParticipantRemoved),this.messagesPlugin.addVivoxEventListener(hl.VivoxLocalMicToggled,this.onVivoxLocalMicToggled),this.messagesPlugin.addVivoxEventListener(hl.VivoxLocalSoundToggled,this.onVivoxLocalSoundToggled),this.messagesPlugin.addVivoxEventListener(hl.VivoxError,this.onVivoxError)})}detachVivoxListeners(){this.messagesPlugin.removeVivoxEventListener(hl.VivoxParticipantAdded,this.onVivoxParticipantAdded),this.messagesPlugin.removeVivoxEventListener(hl.VivoxParticipantJoined,this.onVivoxParticipantJoined),this.messagesPlugin.removeVivoxEventListener(hl.VivoxParticipantLeft,this.onVivoxParticipantLeft),this.messagesPlugin.removeVivoxEventListener(hl.VivoxParticipantSpeaking,this.onVivoxParticipantSpeaking),this.messagesPlugin.removeVivoxEventListener(hl.VivoxParticipantMuted,this.onVivoxParticipantMuted),this.messagesPlugin.removeVivoxEventListener(hl.VivoxParticipantRemoved,this.onVivoxParticipantRemoved),this.messagesPlugin.removeVivoxEventListener(hl.VivoxLocalMicToggled,this.onVivoxLocalMicToggled),this.messagesPlugin.removeVivoxEventListener(hl.VivoxLocalSoundToggled,this.onVivoxLocalSoundToggled),this.messagesPlugin.removeVivoxEventListener(hl.VivoxError,this.onVivoxError)}}let ube=(()=>{var t;class n{get events(){return AM}get connected(){return!1}get participantMutedEvents(){return AM}join(e,i){}kick(e){}leave(){}leaveWithPromise(){return Promise.resolve()}mute(e,i,r){}toggleMic(e=!0){}toggleSound(e=!0){}participantMutedEventsByUserId(e){return AM}participantSpeakingEventsByUserId(e){return AM}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:function(e){let i=null;return e?i=new e:(r=T(Qt),s=T(an),i=r.isMobileApp()?new OSt(r,s):new t),i;var r,s},providedIn:"root"}),n})();var YL=function(t){return t[t.JoinFailed=1006]="JoinFailed",t[t.MuteFailed=1007]="MuteFailed",t[t.MicToggleFailed=1009]="MicToggleFailed",t}(YL||{});const ESt=t=>({"show-purchase-preview":t});let JL=(()=>{var t;class n extends Dh{set title(e){this.popupTitle=e,this._popupTitle=e}set isLoading(e){this.loading=e,this.cdr.detectChanges()}constructor(e){super(),this.cdr=e,this.buyInConfig=[],this.onClose=new ke,this.onBuyIn=new ke,this.onCancelBuyIn=new ke,this.showBuyIn=!0,this.showPurchase=!1,this.popupContainerProperties={styleProperties:{maxWidth:"45rem",maxHeight:"initial",height:"auto"},componentZIndex:"1000",customBackdropCssClass:"create-game__backdrop--style"},this.popupTitleTypes=li}ngOnInit(){super.ngOnInit(),this.options={extraButtons:[],isClosable:!0,...this.options},this.popupContainerProperties.closeDisabled=!this.options.isClosable,this.insufficientFunds={currentFunds:0,neededFunds:0}}buyIn(e){this.onBuyIn.emit(e)}buyChips(e){this.insufficientFunds=e,this.showPurchaseComponent()}purchaseSuccess(){this.showBuyInComponent()}close(){this.onClose.emit()}onMobileBackButton(){this.showPurchase?this.showBuyInComponent():this.close(),this.cdr.detectChanges()}setIsClosable(e){this.options.isClosable=e,this.popupContainerProperties.closeDisabled=!this.options.isClosable,this.cdr.detectChanges()}showPurchaseComponent(){this.showBuyIn=!1,this.showPurchase=!0,this.titleLeftButton={type:QS.BackButton,action:()=>this.showBuyInComponent()},this.popupTitle={key:"HIDDEN_SHOP.SPECIAL_OFFER"}}showBuyInComponent(){this.showBuyIn=!0,this.showPurchase=!1,this.titleLeftButton=void 0,this.popupTitle=this._popupTitle}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["buy-in-popup"]],inputs:{buyInConfig:"buyInConfig",title:"title",options:"options",isLoading:"isLoading"},outputs:{onClose:"onClose",onBuyIn:"onBuyIn",onCancelBuyIn:"onCancelBuyIn"},features:[Ht],decls:8,vars:21,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[1,"bip__popup--style"],[3,"text","popupTitleType","hideCloseButton","leftButtonOptions","buttonCloseClicked"],[1,"bip__popup-wrapper"],[1,"bip__popup-content",3,"ngClass"],[1,"bip__component","bip_buy--in",3,"buyInConfig","selectedValue","extraButtons","isRebuying","currentStack","isLoading","button","onInsufficientAmount","onBuyIn"],[1,"bip__component","bip__container--offer-item"],[1,"bip__offer--item",3,"hidden","offerProvider","neededFunds","currentFunds","extraButtons","onBuy"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.close()}),p(1,"div",1)(2,"popup-title-bar",2),Y("buttonCloseClicked",function(){return i.close()}),m(),p(3,"div",3)(4,"div",4)(5,"buy-in",5),Y("onInsufficientAmount",function(s){return i.buyChips(s)})("onBuyIn",function(s){return i.buyIn(s)}),m(),p(6,"div",6)(7,"offer-item",7),Y("onBuy",function(){return i.purchaseSuccess()}),m()()()()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerProperties),d(2),l("text",i.popupTitle)("popupTitleType",i.popupTitleTypes.Static)("hideCloseButton",!i.options.isClosable)("leftButtonOptions",i.titleLeftButton),d(2),l("ngClass",ne(19,ESt,i.showPurchase)),d(),l("buyInConfig",i.buyInConfig)("selectedValue",i.options.selectedValue)("extraButtons",i.options.extraButtons)("isRebuying",i.options.isRebuying)("currentStack",i.options.currentStack)("isLoading",i.loading)("button",i.options.buyInButton),d(2),l("hidden",!i.showPurchase)("offerProvider",i.options.offerProvider)("neededFunds",i.insufficientFunds.neededFunds)("currentFunds",i.insufficientFunds.currentFunds)("extraButtons",i.options.extraButtons))},styles:[".bip__popup--style[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap}.bip__popup-wrapper[_ngcontent-%COMP%]{position:relative;height:100%;width:90%;margin:0 auto;overflow:hidden}.bip_buy--in[_ngcontent-%COMP%]{margin:2rem auto}.bip__popup-content[_ngcontent-%COMP%]{position:relative;width:200%;height:100%;display:flex;align-items:center;transition:transform .2s ease}.bip__popup-content.show-purchase-preview[_ngcontent-%COMP%]{transform:translate(-50%)}.bip__popup-content.show-purchase-preview[_ngcontent-%COMP%]   .bip__offer--item[_ngcontent-%COMP%]{max-height:initial}.bip__popup-content[_ngcontent-%COMP%]   .bip__offer--item[_ngcontent-%COMP%]{max-height:0}.bip__component[_ngcontent-%COMP%]{flex:1 0 50%}.bip__offer--item[_ngcontent-%COMP%]{font-size:1.6em}.bip__container--offer-item[_ngcontent-%COMP%]{max-height:calc(100vh - 8rem);overflow:auto}"],changeDetection:0}),n})(),pj=(()=>{var t;class n{constructor(e,i){this.rootContainerService=e,this.injector=i,this.onDestroy=new sn}createBuyInCmp(e,i,r){return this.cmpRef||(this.cmpRef=this.rootContainerService.createComponent(JL,{injector:this.injector}),this.cmpRef.instance.buyInConfig=e,this.cmpRef.instance.title=i,this.cmpRef.instance.options=r,this.cmpRef.instance.onClose.pipe(wn(this.onDestroy)).subscribe(()=>{this.destroy()})),this.cmpRef.instance}destroy(){this.cmpRef&&(this.onDestroy.next(),this.cmpRef.destroy(),this.cmpRef=void 0)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ia),T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();new Ot("SpecialOfferService");var RM=function(t){return t[t.GameLobby=0]="GameLobby",t[t.InGame=1]="InGame",t}(RM||{});const xSt=["contLeaderboard"];function ASt(t,n){1&t&&B(0,"loader-image",9),2&t&&l("transparentBG",!0)}const RSt=(t,n)=>({selected:t,"only-one":n});function kSt(t,n){if(1&t){const o=Ce();p(0,"div",10),Y("click",function(){const r=oe(o).$implicit;return re(_().selectTab(r.id))}),p(1,"p"),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit,e=_();ni("container-leaderboard__container--tab ",o.id,""),l("ngClass",cn(7,RSt,e.selectedTab===o.id,1===e.tabs.length)),d(2),se($(3,5,o.key))}}function LSt(t,n){if(1&t&&(p(0,"p",16),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),se($(2,1,o.selectedGame.text))}}function DSt(t,n){1&t&&U(0,LSt,3,3,"p",15),2&t&&l("ngIf",_(2).selectedGame)}function BSt(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",18),Y("select",function(i){return oe(o),re(_(3).choosedGame(i))}),p(1,"div",19)(2,"p"),H(3),V(4,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(3);l("value",o),d(),l("ngClass",o.value===e.selectedGame.value?"container-leaderboard__custom-select__option__selected":""),d(2),se($(4,3,o.text.key))}}function NSt(t,n){1&t&&U(0,BSt,5,5,"custom-select-item",17),2&t&&l("ngForOf",_(2).games)}function FSt(t,n){1&t&&(p(0,"div",11)(1,"custom-select",12),U(2,DSt,1,1,"ng-template",null,13,ft)(4,NSt,1,1,"ng-template",null,14,ft),m()()),2&t&&(d(),l("buttonCustomCss","custom-select__expand--color"))}function USt(t,n){1&t&&B(0,"ranked-seasons-leaderboards",8),2&t&&l("game",_().selectedGame.value)}const GSt=t=>({"container-leaderboard__empty-content--with-game-select":t}),VSt=t=>({textKey:t}),hj=t=>[t];function zSt(t,n){if(1&t&&B(0,"empty-content",22),2&t){const o=_(2);l("ngClass",ne(2,GSt,o.data.type===o.leaderboardTypes.Matchmaking||o.data.type===o.leaderboardTypes.RankedSeasonCurrentSeries))("textArray",ne(6,hj,ne(4,VSt,o.emptyContentText)))}}function jSt(t,n){if(1&t&&(p(0,"div",30)(1,"p"),H(2),V(3,"translate"),p(4,"span")(5,"span"),H(6),V(7,"formatNumber"),m()()(),p(8,"p"),H(9),V(10,"translate"),p(11,"span"),H(12),V(13,"formatNumber"),m()()()),2&t){const o=_(3);d(2),ze("",$(3,7,"LEADERBOARDS.I_HAVE"),": "),d(2),ni("user-score ",o.data.type,""),d(2),se($(7,9,o.data.myLeaderboardRecord.score)),d(3),ze("",$(10,11,"LEADERBOARDS.MY_PLACE"),": "),d(3),se($(13,13,o.data.myLeaderboardRecord.position))}}const dbe=()=>({textKey:"LEADERBOARDS.EMPTY"});function HSt(t,n){1&t&&B(0,"empty-content",31),2&t&&l("textArray",ne(3,hj,pt(2,dbe)))("noImgFlag",!0)}function qSt(t,n){if(1&t&&(Tn(0),p(1,"span",34),H(2," - "),m(),p(3,"span"),H(4),V(5,"translate"),m(),Pn()),2&t){const o=_(5);d(4),se($(5,1,"PLATFORM_IDS."+o.data.game))}}function WSt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m(),U(3,qSt,6,3,"ng-container",33)),2&t){const o=_(4);d(),se($(2,2,"LEADERBOARDS."+o.data.type.toString().toUpperCase())),d(2),l("ngIf",o.data.game&&!1===o.hideGameId)}}function $St(t,n){if(1&t&&(p(0,"span",35),H(1),m()),2&t){const o=_(4);d(),se(o.data.rankedSeasonName)}}function KSt(t,n){if(1&t&&(p(0,"leaderboard-professionals",32),U(1,WSt,4,4)(2,$St,2,1),m()),2&t){const o=_(3);l("elementSize",o.avatarSize)("leaders",o.data.leadersList)("type",o.data.type),d(),Qo(1,o.data.type!==o.leaderboardTypes.RankedSeasonCurrentSeries?1:2)}}function ZSt(t,n){1&t&&B(0,"empty-content",31),2&t&&l("textArray",ne(3,hj,pt(2,dbe)))("noImgFlag",!0)}const QSt=(t,n)=>[t,n];function YSt(t,n){if(1&t&&B(0,"leaderboard-avatar",36),2&t){const o=n.$implicit,e=n.index,i=_(3);l("entity",o)("position",e+1)("scoreType",i.data.type)("ngClass",cn(4,QSt,e<=2?"hidden":"",i.avatarConfig.class))}}const JSt=t=>({"container-leaderboard__inner--with-game-select":t});function XSt(t,n){if(1&t&&(p(0,"div",23),U(1,jSt,14,15,"div",24),p(2,"div",25),U(3,HSt,1,5,"empty-content",26)(4,KSt,3,4,"leaderboard-professionals",27),m(),p(5,"div",28),U(6,ZSt,1,5,"empty-content",26)(7,YSt,1,7,"leaderboard-avatar",29),m()()),2&t){const o=_(2);l("ngClass",ne(7,JSt,o.data.type===o.leaderboardTypes.Matchmaking||o.data.type===o.leaderboardTypes.RankedSeasonCurrentSeries)),d(),l("ngIf",o.data.myLeaderboardRecord&&o.data.myLeaderboardRecord.position&&-1!==o.data.myLeaderboardRecord.position),d(2),l("ngIf",!o.data.leadersList||0===o.data.leadersList.length),d(),l("ngIf",0!==o.data.leadersList.length),d(2),l("ngIf",!o.data.list||o.data.list.length<=3),d(),l("ngForOf",o.data.list)("ngForTrackBy",o.trackByFn)}}function ewt(t,n){if(1&t&&U(0,zSt,1,8,"empty-content",20)(1,XSt,8,9,"div",21),2&t){const o=_();l("ngIf",0===o.data.leadersList.length&&0===o.data.list.length&&!o.loaderOn),d(),l("ngIf",0!==o.data.leadersList.length&&0!==o.data.list.length&&!o.loaderOn)}}const pbe=(t,n)=>({"empty-leaderboard":t,"no-scroll":n});let Ag=(()=>{var t;class n{constructor(e,i,r,s){this.avatarConfig={class:""},this.scrollContFlag=!1,this.ELeaderboardTab=ys,this.games=[],this.select={type:rd.EControlType.Input,placeholder:{key:"LEADERBOARDS.CHOOSE_GAME"}},this.loaderOn=!1,this.avatarSize=x0.Medium,this.tabSelected=new ke,this.gameSelected=new ke,this.leaderboardService=i,this.clientConfigService=e,this.leaderboardTypes=ri,this.changeDetRef=r,this.translatePipe=s}selectTab(e){this.tabSelected.emit(e)}trackByFn(e,i){var r,s,a;return null!==(r=null===(s=i.profile)||void 0===s?void 0:s.id)&&void 0!==r?r:null===(a=i.clubData)||void 0===a?void 0:a.clubProfile.id}loadNextGame(){fa.isGameSpecificLeaderboard(this.data.type)&&(this.lastSelectedGame&&this.lastSelectedGame!==this.data.game||!this.lastSelectedGame)&&(this.lastSelectedGame=this.data.game,this.selectedGame=this.games.find(e=>e.value===this.data.game),this.loaderOn=!1)}ngOnInit(){this.hideGameId=this.clientConfigService.singleGamePlatform(),this.clientConfigService.getMultiplayerGames().forEach(i=>{this.games.push({value:i.id,text:{key:"PLATFORM_IDS.".concat(i.id)}})}),this.emptyContentText=fa.isGameSpecificLeaderboard(this.data.type)?"LEADERBOARDS.NO_GAME_SELECTED":"LEADERBOARDS.EMPTY"}choosedGame(e){this.selectedGame&&this.selectedGame.value===e.value||(this.loaderOn=!0,this.selectedGame=e,this.emptyContentText="LEADERBOARDS.EMPTY",this.gameSelected.emit(this.selectedGame.value),this.changeDetRef.detectChanges())}failedLeaderboardFetch(){this.loaderOn=!1,this.emptyContentText="ERRORS.CONNECTION_ERROR"}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Zt),g(fa),g(Re),g(qe))},t.\u0275cmp=pe({type:t,selectors:[["container-leaderboard"]],viewQuery:function(e,i){if(1&e&&$e(xSt,5),2&e){let r;je(r=He())&&(i.contLeaderboard=r.first)}},inputs:{tabs:"tabs",selectedTab:"selectedTab",data:"data",avatarConfig:"avatarConfig"},outputs:{tabSelected:"tabSelected",gameSelected:"gameSelected"},decls:10,vars:12,consts:[[1,"container-leaderboard__wrapper",3,"ngClass"],["contLeaderboard",""],[3,"transparentBG",4,"ngIf"],[1,"container-leaderboard__container--main",3,"ngClass"],[1,"container-leaderboard__container--tabs"],["click-sound","",3,"class","ngClass","click",4,"ngFor","ngForOf"],[1,"container-leaderboard__container--leaderboard"],["class","container-leaderboard__container--game-select-wrapper",4,"ngIf"],[3,"game"],[3,"transparentBG"],["click-sound","",3,"ngClass","click"],[1,"container-leaderboard__container--game-select-wrapper"],[1,"container-leaderboard__custom-select",3,"buttonCustomCss"],["selectedItem",""],["options",""],["class","leaderboard__custom-select",4,"ngIf"],[1,"leaderboard__custom-select"],[3,"value","select",4,"ngFor","ngForOf"],[3,"value","select"],[1,"container-leaderboard__custom-select__option",3,"ngClass"],[3,"ngClass","textArray",4,"ngIf"],["class","container-leaderboard__container--leaderboard-inner",3,"ngClass",4,"ngIf"],[3,"ngClass","textArray"],[1,"container-leaderboard__container--leaderboard-inner",3,"ngClass"],["class","container-leaderboard__container--my-place",4,"ngIf"],[1,"container-leaderboard__container--leaders"],[3,"textArray","noImgFlag",4,"ngIf"],[3,"elementSize","leaders","type",4,"ngIf"],[1,"container-leaderboard__container--users"],["class","container-leaderboard__container--user",3,"entity","position","scoreType","ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"container-leaderboard__container--my-place"],[3,"textArray","noImgFlag"],[3,"elementSize","leaders","type"],[4,"ngIf"],[1,"container-leaderboard__dash"],[1,"container-leaderboard--ranked-season-leaderboard-name"],[1,"container-leaderboard__container--user",3,"entity","position","scoreType","ngClass"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,ASt,1,1,"loader-image",2),p(3,"div",3)(4,"div",4),U(5,kSt,4,10,"div",5),m(),p(6,"div",6),U(7,FSt,6,1,"div",7)(8,USt,1,1,"ranked-seasons-leaderboards",8)(9,ewt,2,2),m()()()),2&e&&(l("ngClass",cn(6,pbe,0===i.data.leadersList.length||i.data.list.length<=3,!i.scrollContFlag)),d(2),l("ngIf",i.loaderOn),d(),l("ngClass",cn(9,pbe,0===i.data.leadersList.length||i.data.list.length<=3,!i.scrollContFlag)),d(2),l("ngForOf",i.tabs),d(2),l("ngIf",i.data.type===i.leaderboardTypes.Matchmaking||i.data.type===i.leaderboardTypes.RankedSeasonCurrentSeries||i.data.type===i.leaderboardTypes.RankedSeasonHallOfFame),d(),Qo(8,i.selectedTab===i.ELeaderboardTab.HallOfFame?8:9))},dependencies:[Xe,Mt,Ne,bo,Up,Vd,fM,mM,Oi,Fd,sj,qe,Go],styles:["[_nghost-%COMP%]{width:100%;height:100%}.container-leaderboard__wrapper[_ngcontent-%COMP%]{width:100vw;max-width:100%;min-height:100%;height:auto;padding:1rem;display:flex}.container-leaderboard__wrapper.empty-leaderboard[_ngcontent-%COMP%], .container-leaderboard__wrapper.no-scroll[_ngcontent-%COMP%]{height:100%!important}.container-leaderboard__container--main[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap}.container-leaderboard__container--main.empty-leaderboard[_ngcontent-%COMP%], .container-leaderboard__container--main.no-scroll[_ngcontent-%COMP%]{height:100%!important}.container-leaderboard__dash[_ngcontent-%COMP%]{white-space:pre-wrap}.container-leaderboard__container--tabs[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;flex-flow:row wrap}.container-leaderboard__container--my-place[_ngcontent-%COMP%]{width:100%;height:4rem;flex-flow:row wrap;display:flex;justify-content:center;align-items:center}.container-leaderboard__container--my-place[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0 .5rem;font-size:1.4rem;font-weight:700}.container-leaderboard__container--my-place[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{margin:0 .5rem}.container-leaderboard__container--leaderboard[_ngcontent-%COMP%]{position:relative;width:100%;min-height:calc(100% - 4rem);border-top:none;border-top-left-radius:0;border-top-right-radius:0;display:flex;justify-content:center;flex-flow:row wrap}.container-leaderboard__empty-content--with-game-select[_ngcontent-%COMP%]{height:calc(100% - 10rem)}.container-leaderboard__container--game-select-wrapper[_ngcontent-%COMP%]{width:100%;height:8rem;display:flex;justify-content:center;align-items:center}.container-leaderboard__container--game-select-wrapper[_ngcontent-%COMP%]   .container-leaderboard__custom-select[_ngcontent-%COMP%]{min-width:20rem}.container-leaderboard__container--leaderboard-inner[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;overflow:hidden}.container-leaderboard__container--leaderboard-inner.container-leaderboard__inner--with-game-select[_ngcontent-%COMP%]{height:calc(100% - 8rem)}.container-leaderboard__container--tab[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center;border-bottom-left-radius:0;border-bottom-right-radius:0;cursor:pointer;transition:background-color .5s ease}.container-leaderboard__container--tab[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{transition:color .5s ease}.container-leaderboard__container--tab.selected[_ngcontent-%COMP%]{border-bottom:none}.container-leaderboard__container--tab.only-one[_ngcontent-%COMP%]{cursor:initial}.container-leaderboard__container--leaders[_ngcontent-%COMP%]{position:relative;width:100%;min-height:28rem}@media only screen and (max-width: 1280px){.container-leaderboard__container--leaders[_ngcontent-%COMP%]{min-height:23rem}}@media only screen and (max-width: 480px){.container-leaderboard__container--leaders[_ngcontent-%COMP%]{min-height:16rem}}.container-leaderboard__container--users[_ngcontent-%COMP%]{position:relative;width:100%;flex:1 1 auto;display:flex;flex-flow:row wrap;align-content:flex-start;padding:0 10%;padding-top:1rem}@media only screen and (max-width: 1280px){.container-leaderboard__container--users[_ngcontent-%COMP%]{padding:0 3%;padding-top:1rem}}@media only screen and (max-width: 640px){.container-leaderboard__container--users[_ngcontent-%COMP%]{padding:0 1%;padding-top:1rem}}@media only screen and (max-width: 580px){.container-leaderboard__container--users[_ngcontent-%COMP%]{padding:0;padding-top:1rem}}@media only screen and (max-width: 380px){.container-leaderboard__container--users[_ngcontent-%COMP%]{padding:0 5%;padding-top:1rem}}.container-leaderboard__container--user[_ngcontent-%COMP%]{width:10%;height:auto;margin-bottom:1rem}.container-leaderboard__container--user.hidden[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 980px){.container-leaderboard__container--user[_ngcontent-%COMP%]{width:12.5%}}@media only screen and (max-width: 768px){.container-leaderboard__container--user[_ngcontent-%COMP%]{width:16.66%}}@media only screen and (max-width: 530px){.container-leaderboard__container--user[_ngcontent-%COMP%]{width:20%}}@media only screen and (max-width: 480px){.container-leaderboard__container--user[_ngcontent-%COMP%]{width:25%}}@media only screen and (max-width: 380px){.container-leaderboard__container--user[_ngcontent-%COMP%]{width:33.33%}}.container-leaderboard__custom-select__option[_ngcontent-%COMP%]{padding:.5rem}.container-leaderboard__custom-select__option[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}"]}),n})();function twt(t,n){1&t&&(Tn(0),B(1,"loader-image",3),Pn()),2&t&&(d(),l("transparentBG",!0))}function nwt(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",13),Y("select",function(i){return oe(o),re(_(3).changeTab(i))}),p(1,"button-icon-text",14),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit,e=_(3);l("tabId",o.id),d(),l("bclass","leaderboards-popup__top-tabs__bclass"+(e.currentTabId&&o.id===e.currentTabId?" top-tabs__selected":"")),d(),se($(3,3,o.text.key))}}function iwt(t,n){if(1&t&&(p(0,"top-tabs",11),U(1,nwt,4,5,"top-tab-item",12),m()),2&t){const o=_(2);l("showBackButton",!1)("scrollStyleCustomClass","leaderboards-popup__top-tabs__scroll")("scrollBarCustomClass","leaderboards-popup__top-tabs__scrollbar")("initialOpenedTab",o.currentTabId),d(),l("ngForOf",o.tabs)("ngForTrackBy",o.trackById)}}function owt(t,n){if(1&t&&(Tn(0),p(1,"span",16),H(2," - "),m(),p(3,"span"),H(4),V(5,"translate"),m(),Pn()),2&t){const o=_(3);d(4),se($(5,1,"PLATFORM_IDS."+o.currentTabData.game))}}function rwt(t,n){if(1&t&&(p(0,"leaderboard-professionals",15)(1,"span"),H(2),V(3,"translate"),m(),U(4,owt,6,3,"ng-container",2),m()),2&t){const o=_(2);l("elementSize",o.avatarSize)("leaders",o.currentTabData.leadersList)("type",o.currentTabData.type),d(2),se($(3,5,"LEADERBOARDS."+o.currentTabData.type.toString().toUpperCase())),d(2),l("ngIf",o.currentTabData.game)}}const swt=()=>({textKey:"LEADERBOARDS.EMPTY"}),awt=t=>[t];function cwt(t,n){1&t&&B(0,"empty-content",17),2&t&&l("textArray",ne(3,awt,pt(2,swt)))("noImgFlag",!0)}const lwt=(t,n)=>[t,n];function uwt(t,n){if(1&t&&B(0,"leaderboard-avatar",18),2&t){const o=n.$implicit,e=n.index,i=_(2);l("entity",o)("position",e+1)("scoreType",i.currentTabData.type)("ngClass",cn(4,lwt,e<=2?"hidden":"",i.avatarConfig.class))}}function dwt(t,n){if(1&t){const o=Ce();Tn(0),U(1,iwt,2,6,"top-tabs",4),p(2,"div",5),Y("swipeAction",function(i){return oe(o),re(_().changeTabViaSwipe(i))}),p(3,"div",6),U(4,rwt,5,7,"leaderboard-professionals",7),m(),p(5,"div",8),U(6,cwt,1,5,"empty-content",9)(7,uwt,1,7,"leaderboard-avatar",10),m()(),Pn()}if(2&t){const o=_();d(),l("ngIf",o.tabs.length>1),d(3),l("ngIf",0!==o.currentTabData.leadersList.length),d(2),l("ngIf",!o.currentTabData.list||!o.currentTabData.list.length),d(),l("ngForOf",o.currentTabData.list)("ngForTrackBy",o.trackByFn)}}const pwt=()=>({key:"LABEL.LEADERBOARDS"});let mj=(()=>{var t;class n{constructor(e,i,r){this.cdr=e,this.leaderboardsService=i,this.toast=r,this.avatarConfig={class:""},this.popupTitleTypes=li,this.tabs=[],this.showPopup=!1,this.avatarSize=x0.Medium,this.loaderOn=!1,this.popupContainerOptions={styleProperties:{maxWidth:"52rem",height:"90%",maxHeight:"70rem",display:"flex",flexFlow:"column nowrap"},customBackdropCssClass:"lp__wrapper"},e.detach()}openPopup(e,i,r){var s=this;return f(function*(){s.showPopup=!0,s.loaderOn=!0,s.cdr.detectChanges();for(let a of i)s.tabs.push({id:s.getTabsIdByPeriodModifier(a),text:{key:"LEADERBOARDS.".concat(s.getTabsIdByPeriodModifier(a)).replace("-","_").toUpperCase()},periodModifier:a});try{s.leaderboardList=n.convertLeaderboardData(yield s.leaderboardsService.loadLeaderboard(r?{type:e,secondId:r,periodModifiers:s.tabs.map(a=>a.periodModifier)}:{type:e,periodModifiers:s.tabs.map(a=>a.periodModifier)}),e,r),s.changeTab(s.tabs[0].id)}catch(a){a instanceof lt.NetworkError?s.toast.error("ERRORS.CONNECTION_ERROR"):s.toast.warn("ERRORS.SOMETHING_WRONG")}finally{s.loaderOn=!1,s.cdr.detectChanges()}})()}close(){this.showPopup=!1,this.cdr.detectChanges(),this.tabs=[],this.leaderboardList=void 0}trackByFn(e,i){var r,s,a;return null!==(r=null===(s=i.profile)||void 0===s?void 0:s.id)&&void 0!==r?r:null===(a=i.clubData)||void 0===a?void 0:a.clubProfile.id}trackById(e,i){return i.id}changeTabViaSwipe(e){const i=this.tabs.findIndex(r=>r.id===this.currentTabId);switch(e){case sa.Right:if(0===i){this.changeTab(this.tabs[this.tabs.length-1].id);break}this.changeTab(this.tabs[i-1].id);break;case sa.Left:if(i===this.tabs.length-1){this.changeTab(this.tabs[0].id);break}this.changeTab(this.tabs[i+1].id)}}changeTab(e){const i=this.tabs.findIndex(r=>r.id===e);i>=0&&i<=this.tabs.length-1&&(this.currentTabId=this.tabs[i].id,this.currentTabData=this.leaderboardList[this.tabs[i].periodModifier],this.cdr.detectChanges())}getTabsIdByPeriodModifier(e){switch(e){case va.ThisWeek:return ys.ThisWeek;case va.LastWeek:return ys.LastWeek;default:return ys.Forever}}static convertLeaderboardData(e,i,r){let s={[va.ThisWeek]:{type:i,list:[],leadersList:[],game:r},[va.LastWeek]:{type:i,list:[],leadersList:[],game:r},[ub.Forever]:{type:i,list:[],leadersList:[],game:r}};if(e&&Object.keys(e).length)for(let a in e)s[a].list=e[a].leaderboard.rankings,s[a].myLeaderboardRecord=e[a].position,s[a].leadersList=e[a].leaderboard.rankings.slice(0,3);return s}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(fa),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["leaderboards-popup"]],inputs:{avatarConfig:"avatarConfig"},decls:4,vars:7,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[4,"ngIf"],[3,"transparentBG"],["class","leaderboards-popup__cmp--top-tabs",3,"showBackButton","scrollStyleCustomClass","scrollBarCustomClass","initialOpenedTab",4,"ngIf"],["swipe-directive","",1,"leaderboards-popup__container--content",3,"swipeAction"],[1,"leaderboards-popup__container--leaders"],[3,"elementSize","leaders","type",4,"ngIf"],[1,"leaderboards-popup__container--users"],[3,"textArray","noImgFlag",4,"ngIf"],["class","leaderboards-popup__container--user",3,"entity","position","scoreType","ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"leaderboards-popup__cmp--top-tabs",3,"showBackButton","scrollStyleCustomClass","scrollBarCustomClass","initialOpenedTab"],[3,"tabId","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"tabId","select"],[1,"leaderboards-popup-top-tabs__list-item--navigation",3,"bclass"],[3,"elementSize","leaders","type"],[1,"leaderboards-popup__dash"],[3,"textArray","noImgFlag"],[1,"leaderboards-popup__container--user",3,"entity","position","scoreType","ngClass"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.close()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.close()}),m(),U(2,twt,2,1,"ng-container",2)(3,dwt,8,5,"ng-container",2),m()),2&e&&(l("popupContainerOpened",i.showPopup)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Static)("text",pt(6,pwt)),d(),l("ngIf",i.loaderOn),d(),l("ngIf",!i.loaderOn))},dependencies:[Xe,Mt,Ne,bo,kl,dl,fM,so,mM,Ji,Wi,Oi,wu,qe],styles:[".leaderboards-popup__cmp--top-tabs[_ngcontent-%COMP%]{margin-top:1rem;padding:0 1rem 1rem}@media only screen and (max-width: 440px){.leaderboards-popup__cmp--top-tabs[_ngcontent-%COMP%]{padding:0 .5rem}}.leaderboards-popup__container--content[_ngcontent-%COMP%]{flex:1;overflow-x:hidden;overflow-y:auto;padding:0 1rem 1rem}@media only screen and (max-width: 440px){.leaderboards-popup__container--content[_ngcontent-%COMP%]{padding:0 .5rem}}.leaderboards-popup__container--leaders[_ngcontent-%COMP%]{position:relative;width:100%;min-height:28rem}@media only screen and (max-width: 1280px){.leaderboards-popup__container--leaders[_ngcontent-%COMP%]{min-height:23rem}}@media only screen and (max-width: 480px){.leaderboards-popup__container--leaders[_ngcontent-%COMP%]{min-height:16rem}}.leaderboards-popup__container--users[_ngcontent-%COMP%]{position:relative;width:100%;flex:1 1 auto;display:flex;flex-flow:row wrap;align-content:flex-start}.leaderboards-popup__container--user[_ngcontent-%COMP%]{width:25%;height:auto;margin-bottom:1rem}.leaderboards-popup__container--user.hidden[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})(),fj=(()=>{var t;class n{constructor(e,i){this.store=e,this.shopService=i}getSpecialOffer(e,i){var r=this;return f(function*(){const s=e===ln.Chips?Fe.TG.ChipPack:Fe.TG.GemsPack,a=yield r.shopService.load(),c=a.products.filter(h=>h.group===wt.RebuyDeals&&h.item.type===s).sort((h,b)=>s===Fe.TG.ChipPack?r.calcChipAmount(h,a.vipBonusMultiplier)-r.calcChipAmount(b,a.vipBonusMultiplier):h.item.amount-b.item.amount);let u;return u=Fe.TG.ChipPack?c.find(h=>r.calcChipAmount(h,a.vipBonusMultiplier)>=i)||c[c.length-1]:c.find(h=>h.item.amount>=i),{item:u,store:a}})()}calcChipAmount(e,i=1){const r=this.store.selectIsVip()?i:1;return e.item.amount*r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(ef))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var ku;!function(t){let n;var e;let o;t.featureKey="gameSummary",(e=n=t.EGameSummaryButton||(t.EGameSummaryButton={})).Home="home",e.FindNewGame="findNewGame",e.Rematch="rematch",function(e){e.Balance="balance",e.Xp="xp",e.Rate="rate"}(o=t.EPlayerStatsBoxType||(t.EPlayerStatsBoxType={}))}(ku||(ku={}));var la=function(t){return t.Init="[Game Summary] Init game summary",t.InitPlayer="[Game Summary] Init game summary player",t.ResetGameSummary="[Game Summary] Reset game summary",t.CloseGameSummary="[Game Summary] Close game summary",t.UpdateGameSummary="[Game Summary] Update game summary",t.RematchAsked="[Game Summary] Rematch asked",t.RematchAskedSuccess="[Game Summary] Rematch asked success",t.RematchAskedError="[Game Summary] Rematch asked error",t.GameSummaryAction="[Game Summary] Game summary action triggered",t.GameSummaryActionSuccess="[Game Summary] Game summary action success",t.GameSummaryActionError="[Game Summary] Game summary action error",t.SendFriendRequest="[Game Summary] Send friend request",t.SendFriendRequestSuccess="[Game Summary] Send friend request success",t.SendFriendRequestError="[Game Summary] Send friend request error",t.UpdatePlayersActivityState="[Game Summary] Update players activity state",t.UpdateRewardedVideo="[Game Summary] Update rewarded video",t.StartTimer="[Game Summary] Start timer",t.TimerExpire="[Game Summary] Timer expire",t.LevelUpBonusReceived="[Game Summary] Level up bonus received",t.RematchStarts="[Game Summary] Rematch start",t.UpdateEndedTable="[Game Summary] Update ended table",t.UpdateRematchTable="[Game Summary] Update rematch table",t.UpdateXp="[Game Summary] Update xp",t.UpdateBalance="[Game Summary] Update balance",t}(la||{});const hbe=he(la.ResetGameSummary),mbe=he(la.CloseGameSummary),fbe=he(la.Init,{_as:"props",_p:void 0}),gbe=he(la.InitPlayer,{_as:"props",_p:void 0}),gj=he(la.UpdateGameSummary,{_as:"props",_p:void 0}),_be=he(la.RematchAsked),vbe=he(la.RematchAskedSuccess,{_as:"props",_p:void 0}),bbe=he(la.RematchAskedError),XL=he(la.GameSummaryAction,{_as:"props",_p:void 0}),e2=he(la.GameSummaryActionSuccess,{_as:"props",_p:void 0}),kM=he(la.GameSummaryActionError,{_as:"props",_p:void 0}),Cbe=he(la.SendFriendRequest,{_as:"props",_p:void 0}),ybe=he(la.SendFriendRequestSuccess,{_as:"props",_p:void 0}),Sbe=he(la.SendFriendRequestError,{_as:"props",_p:void 0}),_j=he(la.UpdatePlayersActivityState,{_as:"props",_p:void 0}),t2=he(la.UpdateRewardedVideo,{_as:"props",_p:void 0}),wbe=he(la.StartTimer,{_as:"props",_p:void 0}),Tbe=he(la.TimerExpire),Pbe=he(la.LevelUpBonusReceived,{_as:"props",_p:void 0}),Ibe=he(la.RematchStarts),Mbe=he(la.UpdateEndedTable,{_as:"props",_p:void 0}),Obe=he(la.UpdateRematchTable,{_as:"props",_p:void 0}),Ebe=he(la.UpdateXp,{_as:"props",_p:void 0}),xbe=he(la.UpdateBalance,{_as:"props",_p:void 0});var vj;let jC=vj=class{constructor(n,o,e,i){this.isBonusClaimed=!1,this.isReady=!1;for(let r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.selectGsRoomType=()=>{var r;return null===(r=o.gameSummary.selectState())||void 0===r||null===(r=r.roomModel)||void 0===r?void 0:r.settings.type},this.getAvailableInRooms=()=>{var r,s;return null!==(r=null===(s=e.getConfig().content.ads)||void 0===s?void 0:s.rewardedVideoAfterGame.availableInRoomTypes)&&void 0!==r?r:[]},this.isSpectator=()=>o.gameSummary.selectState().isSpectator}isAvailableInRoom(){return!(!this.selectGsRoomType()||this.isSpectator()||!this.getAvailableInRooms().find(n=>n===this.selectGsRoomType()))}getMaxReward(){return vj.getMaxReward(this.video)}isInstantReward(){return HR.isInstantReward(this.video)}isFreeRewardedGame(){return HR.isFreeRewardedGame(this.video)}static getMaxReward(n){return{chips:Math.max(...n.rewards.map(o=>o.chips))||0,gems:Math.max(...n.rewards.map(o=>o.gems))||0,items:n.reward.items,customText:n.reward.customText,banners:n.reward.banners}}};Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],jC.prototype,"isAvailableInRoom",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Object)],jC.prototype,"getMaxReward",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],jC.prototype,"isInstantReward",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],jC.prototype,"isFreeRewardedGame",null),jC=vj=Qe([ko(),ue("design:paramtypes",[Object,J,Zt,Qt])],jC);let U0=class{constructor(n,o){this.wantsReplay=!1,this.hasLeft=!1,this.rating={partnerRating:0},this.actions={sendFriendRequest:{loading:!1}},this.player=n,this.platformProfile=Lo.toPlatformProfile(n.profile),this.currentUserId=o.selectUserState().profile.id,this.selectIsFriend=()=>!!o.friends.selectFriend(this.player.id),this.selectIsWinner=()=>!!o.gameSummary.selectState().endedTable.gameResult.winners.find(e=>e===this.player.id),this.selectIsInMyTeam=()=>!!o.gameSummary.selectMyTeam().find(e=>e.player.id===this.player.id)}canBeAddedAsFriend(){return this.player.id!==this.currentUserId&&!this.player.isBot&&!this.selectIsFriend()}canBeRated(){return this.player.id!==this.currentUserId&&!this.player.isBot&&this.selectIsInMyTeam()}isWinner(){return this.selectIsWinner()}};Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],U0.prototype,"canBeAddedAsFriend",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],U0.prototype,"canBeRated",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],U0.prototype,"isWinner",null),U0=Qe([ko(),ue("design:paramtypes",[Object,J])],U0);let Abe=(()=>{var t;class n{constructor(e,i,r){this.store=e,this.clientConfigService=i,this.appService=r}createGSRewardedVideo(e={}){return new jC(e,this.store,this.clientConfigService,this.appService)}createGSPlayer(e){return new U0(e,this.store)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Zt),T(Qt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var hwt=__webpack_require__(76880);class n2{static areAllPlayersSeated(n){return!n.seats.find(o=>!o.player)}static getSeatedPlayers(n){return n.seats.filter(o=>!!o.player).map(o=>o.player)}static getLeavers(n){return n.seats.filter(o=>(o.reserved||o.player).state===hwt.EPlayerState.Inactive).map(o=>o.reserved||o.player)}}var G0=function(t){return t[t.HasLeft=0]="HasLeft",t[t.WantsReplay=1]="WantsReplay",t}(G0||{}),LM=function(t){return t[t.RewardsAnimationInitialDelay=3e3]="RewardsAnimationInitialDelay",t[t.RewardAnimationDelay=3500]="RewardAnimationDelay",t[t.RewardsStepAnimationDelay=2e3]="RewardsStepAnimationDelay",t[t.XpGainAnimationDelay=2e3]="XpGainAnimationDelay",t[t.GameEndSoundDelay=1e3]="GameEndSoundDelay",t[t.RateClickDelay=400]="RateClickDelay",t}(LM||{});let Rbe=(()=>{var t;class n{constructor(e,i,r,s){this.gameSummary=e,this.friends=i,this.gamesPlay=r,this.cs=s}getFriendList(){var e=this;return f(function*(){yield e.friends.requestFriends()})()}createNewGame(e){var i=this;return f(function*(){yield i.gamesPlay.currentPlayClient.createRoom(e)})()}findNewGame(e){var i=this;return f(function*(){yield i.gamesPlay.currentPlayClient.findRoom(e)})()}sendFriendRequest(e){return this.friends.sendFriendRequest(Lo.toPlatformProfile(e))}ratePlayer(e,i){return this.gameSummary.updateAndGetPlayerRate(e,i)}rematch(){return this.gamesPlay.currentPlayClient.rematchRoom()}onLevelUpReward(e){return this.cs.on(Ns.LevelUpReward,e)}disposeRoom(){var e=this;return f(function*(){var i;yield null===(i=e.gamesPlay.currentPlayClient.activeClientModel.currentRoom)||void 0===i?void 0:i.dispose()})()}leaveGame(){var e=this;return f(function*(){var i;yield null===(i=e.gamesPlay.currentPlayClient.activeClientModel.currentRoom)||void 0===i?void 0:i.leaveGame()})()}leaveRoom(){var e=this;return f(function*(){var i;yield null===(i=e.gamesPlay.currentPlayClient.activeClientModel.currentRoom)||void 0===i?void 0:i.leave()})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(aoe),T(Tu),T(oo),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),bj=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){var w=this;this.store=e,this.toaster=i,this.permissions=r,this.gamesState=s,this.gsClient=a,this.ads=c,this.modelFactory=u,this.bonusService=h,this.offerService=b,this.subscriptions=new ie.List,this.eventListeners=new ie.List,this.onLevelUpReward=R=>{this.store.dispatch(Pbe(R))},this.onSpectatorStateChange=R=>{this.store.dispatch(gj({isSpectator:R}))},this.onRoomUpdate=function(){var R=f(function*(G){const K=w.currentState.roomModel;if(K&&K.id!==G.id&&w.close(),w.store.dispatch(gj({roomModel:G})),!w.currentState.isOpened)return;const te=lo.getRematchTable(w.currentState.currentPlayerId,G.tables);te&&w.handleRematchTable(te)});return function(G){return R.apply(this,arguments)}}(),this.onCurrentTableUpdate=R=>{var G,K,te,ee;const le=this.currentState.isOpened;if(R.state===Ve.ETableState.Ready||R.state===Ve.ETableState.Gameplay)return void(le&&this.close());const me=null!==(G=null===(K=this.currentState.roomModel)||void 0===K?void 0:K.tables)&&void 0!==G?G:[],ge=this.currentState.currentPlayerId;let Me,Ke;var Ee;if(R.state===Ve.ETableState.Ended?(Me=null!==(Ee=R.gameResult)&&void 0!==Ee&&null!==(Ee=Ee.winners)&&void 0!==Ee&&Ee.length?R:me.find(ot=>ot.id===R.id),Ke=lo.getRematchTable(ge,me)):(Me=lo.findLastTableByState(ge,me,Ve.ETableState.Ended),Ke=R),Me&&null!==(te=Me)&&void 0!==te&&null!==(te=te.gameResult)&&void 0!==te&&null!==(te=te.winners)&&void 0!==te&&te.length&&null!==(ee=Me)&&void 0!==ee&&null!==(ee=ee.gameResult)&&void 0!==ee&&null!==(ee=ee.losers)&&void 0!==ee&&ee.length)if(le)this.store.dispatch(Mbe({table:Me})),Ke&&this.handleRematchTable(Ke);else{const ot=lo.findNextTable(ge,me,Me.id);(null==ot?void 0:ot.state)!==Ve.ETableState.Ready&&(null==ot?void 0:ot.state)!==Ve.ETableState.Gameplay&&this.open(Me,Ke)}}}init(e){this.store.dispatch(gbe({playerId:this.store.selectUserState().profile.id})),this.subscriptions.add(this.store.gameSummary.subscribeState().subscribe(i=>this.currentState=i)),this.subscriptions.add(this.store.games.subscribeCurrentRoomViewModel(e).pipe(bt(i=>!!i)).subscribe(this.onRoomUpdate)),this.subscriptions.add(this.store.games.subscribeCurrentTable(e).pipe(bt(i=>!!i)).subscribe(this.onCurrentTableUpdate)),this.subscriptions.add(this.store.games.subscribeIsSpectator(e).pipe(iG(this.store.games.subscribeCurrentRoomViewModel(e))).pipe(bt(([i,r])=>!!r),jn(([i,r])=>i)).subscribe(this.onSpectatorStateChange)),this.eventListeners.add(this.gsClient.onLevelUpReward(this.onLevelUpReward)),this.gsClient.getFriendList()}findNewGame(){var e=this;return f(function*(){e.store.dispatch(XL({buttonId:ku.EGameSummaryButton.FindNewGame}));try{yield e.ads.showInterstitial({tag:Kb.FindNewGameInterstitial}).catch(r=>console.log(r));const i=e.currentState.roomModel.settings;switch(i.type){case Jt.RoomType.Custom:case Jt.RoomType.BlitzTournament:case Jt.RoomType.PromoTournament:yield e.leaveGame();break;case Jt.RoomType.SinglePlayer:yield e.gsClient.disposeRoom(),yield e.gsClient.createNewGame(e.currentState.roomModel.poolId);break;case Jt.RoomType.KnockoutTournament:yield e.gsClient.disposeRoom();const r=e.gamesState.getCurrentGameRelatedConfig().matchmaking.pools.find(u=>u.id===e.currentState.roomModel.poolId),s=e.store.selectClientKnockoutModel(e.currentState.roomModel.settings.game.name).settings.buyIn;yield e.gsClient.findNewGame({pool:r,buyInAmount:s.bet});break;default:if(!e.permissions.getRoomPermission(i,{showFailedRequirements:!0}).isPermitted)return void e.store.dispatch(kM({buttonId:ku.EGameSummaryButton.FindNewGame}));yield e.leaveRoom();const c=e.gamesState.getCurrentGameRelatedConfig().matchmaking.pools.find(u=>u.id===e.currentState.roomModel.poolId);yield e.gsClient.findNewGame({pool:c})}e.store.dispatch(e2({buttonId:ku.EGameSummaryButton.FindNewGame})),e.close()}catch(i){throw e.store.dispatch(kM({buttonId:ku.EGameSummaryButton.FindNewGame})),i}})()}onTimerExpire(){var e=this;return f(function*(){if(e.store.dispatch(Tbe()),e.currentState.isOpened&&!e.currentState.rematch.isStarting)try{yield e.leaveGame()}catch(i){throw console.warn("timer expire leave error",i),i}})()}playVideo(){var e=this;return f(function*(){const i=e.ads.isRewardedVideoEnabled()&&(yield e.ads.isRewardedVideoReady(rc.GameSummary));if(e.store.dispatch(t2({isReady:i})),!i)return;const r=e.currentState.rewardedVideo;try{yield e.ads.showRewardedVideo({containerId:rc.GameSummary,video:r.video,isRewardMiniGame:!!r.video.gameMode}),yield e.bonusService.claimVideoBonusReward(Ba.RewardedVideoAfterGame),e.store.dispatch(t2({isReady:!1,isBonusClaimed:!0}))}catch(s){throw s instanceof Bp?e.toaster.error("BONUS.NO_VIDEOS"):s instanceof Np?e.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):s instanceof zm||(s instanceof Fp?e.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):(console.warn("video claim error",s),e.reloadVideo())),s}})()}sendFriendRequest(e){var i=this;return f(function*(){const r=i.permissions.getActionPermission(nt.EPermissionModule.Friends,nt.EModuleAction.Send);if(r.isPermitted)try{i.store.dispatch(Cbe({playerId:e.id})),yield i.gsClient.sendFriendRequest(e),i.store.dispatch(ybe({playerId:e.id})),i.toaster.success("POPUP.FRIEND_REQUEST_SENT")}catch(s){i.store.dispatch(Sbe({playerId:e.id})),i.toaster.error(s instanceof lt.TargetUserBlockedError?"API_ERRORS.TargetUserBlocked":s instanceof lt.SourceUserBlockedError?"API_ERRORS.SourceUserBlocked":s instanceof yh.NotValid?"POPUP.FRIEND_REQUEST_EXISTS":"POPUP.ERROR_FRIEND_REQUEST")}else r.vipRequirement.isFulfilled?r.roleRequirement.isFulfilled?i.permissions.showFailedRequirementsToUser(r):i.toaster.error("POPUP.DISABLED_FROM_CONFIG"):i.offerService.offerVip({key:"FRIENDS.AddFriendVipRequired"})})()}ratePlayer(e,i){return this.gsClient.ratePlayer(e,i)}leaveGame(){var e=this;return f(function*(){try{e.store.dispatch(XL({buttonId:ku.EGameSummaryButton.Home})),yield e.gsClient.leaveGame(),e.store.dispatch(e2({buttonId:ku.EGameSummaryButton.Home}))}catch(i){throw e.store.dispatch(kM({buttonId:ku.EGameSummaryButton.Home})),i}})()}leaveRoom(){var e=this;return f(function*(){try{e.store.dispatch(XL({buttonId:ku.EGameSummaryButton.Home})),yield e.gsClient.leaveRoom(),e.store.dispatch(e2({buttonId:ku.EGameSummaryButton.Home}))}catch(i){throw e.store.dispatch(kM({buttonId:ku.EGameSummaryButton.Home})),i}})()}rematch(){var e=this;return f(function*(){if(e.permissions.getRoomPermission(e.currentState.roomModel.settings,{showFailedRequirements:!0}).isPermitted)try{e.store.dispatch(_be()),yield e.gsClient.rematch(),e.store.dispatch(vbe({userId:e.store.selectUserState().profile.id}))}catch(r){throw e.store.dispatch(bbe()),r}})()}startTimer(e){this.store.dispatch(wbe({ms:e}))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List,this.store.dispatch(hbe()),this.eventListeners.forEach(e=>e.detach()),this.eventListeners=new ie.List}reloadVideo(){var e=this;return f(function*(){try{const i=yield e.bonusService.getVideoBonusReward(Ba.RewardedVideoAfterGame),r=e.ads.isRewardedVideoEnabled()&&(yield e.ads.isRewardedVideoReady(rc.GameSummary));e.store.dispatch(t2({video:i,isReady:r}))}catch(i){console.error(i)}})()}open(e,i){const r=this.modelFactory.createGSRewardedVideo(),s=this.store.selectUserState().profile.id;this.store.dispatch(fbe({state:{isOpened:!0,currentPlayerId:s,rewardedVideo:r,endedTable:e,rematchTable:i,players:n2.getSeatedPlayers(e).map(a=>this.modelFactory.createGSPlayer(a))}})),i&&this.handleRematchTable(i),this.startTimer(this.currentState.roomModel.settings.timers.gameSummaryTimeout),r.isAvailableInRoom()&&this.reloadVideo(),this.updateXp(e.gameResult),this.updateEndGameBalance(e.gameResult)}close(){this.store.dispatch(mbe())}handleRematchTable(e){this.store.dispatch(Obe({table:e}));const i=n2.getSeatedPlayers(e).map(s=>s.id);i.length&&this.store.dispatch(_j({players:i,actionMade:G0.WantsReplay}));const r=n2.getLeavers(this.currentState.endedTable).map(s=>s.id);r.length&&this.store.dispatch(_j({players:r,actionMade:G0.HasLeft})),!this.currentState.rematch.isStarting&&!r.length&&n2.areAllPlayersSeated(e)&&(this.store.dispatch(Ibe()),this.startTimer(this.currentState.roomModel.settings.timers.nextTableWaitingTimeout))}updateXp(e){var i,r,s;const a=this.store.selectUserState(),c=e.gameSummary,u=c.playerStats?c.playerStats[a.profile.id]:{},h={previousLevelAt:null!==(i=null==u?void 0:u.previousLevelAt)&&void 0!==i?i:0,currentValue:null!==(r=null==u?void 0:u.xp)&&void 0!==r?r:0,nextLevelAt:null!==(s=null==u?void 0:u.nextLevelAt)&&void 0!==s?s:0,level:c.oldLevel&&c.oldLevel[a.profile.id]||a.profile.level};this.store.dispatch(Ebe({deltaXp:c.deltaXp&&c.deltaXp[a.profile.id]||0,deltaLevel:c.deltaXp&&c.deltaLevel[a.profile.id]||0,isXPBoosted:a.xp.xpBooster.isActive(),playerExp:h}))}updateEndGameBalance(e){const i=this.store.selectUserState();let r=this.store.selectWallet();e.gameSummary.playersBalance&&(r=e.gameSummary.playersBalance[i.profile.id]),this.store.dispatch(xbe({balance:r}))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Dt),T(Pi),T(Zn),T(Rbe),T(bc),T(Abe),T(Iu),T(Sc))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var mwt=ve.EIcons;function fwt(t,n){1&t&&B(0,"number",6),2&t&&l("value",_().myTeamScore)}function gwt(t,n){1&t&&B(0,"number",6),2&t&&l("value",_().$implicit.points)}const kbe=t=>({won:t});function _wt(t,n){if(1&t&&(p(0,"div",8)(1,"div",9)(2,"p",3),H(3),V(4,"translate"),U(5,gwt,1,1,"number",4),m()()()),2&t){const o=n.$implicit,e=_(2);d(),l("ngClass",ne(7,kbe,o.isWinner)),d(),Uo("fivePlusPlayers",e.otherTeamsScore.length>=4),d(),ze("",$(4,5,o.isWinner?"GAME_HISTORY.WON":"GAME_HISTORY.LOST")," "),d(2),l("ngIf",void 0!==o.points)}}function vwt(t,n){if(1&t&&(Tn(0),U(1,_wt,6,9,"div",7),Pn()),2&t){const o=_();d(),l("ngForOf",o.otherTeamsScore)("ngForTrackBy",o.trackByFn)}}function bwt(t,n){1&t&&B(0,"div",17)}function Cwt(t,n){if(1&t&&(p(0,"div",25),B(1,"icon-component",26),m()),2&t){const o=_(5);d(),l("icon",o.EIcons.REMATCH_PLAY_ICON)}}const Lbe=(t,n)=>({replay:t,hasLeft:n});function ywt(t,n){if(1&t&&(p(0,"div",21),B(1,"icon-component",22)(2,"icon-component",23),U(3,Cwt,2,1,"div",24),m()),2&t){const o=_(2).$implicit,e=_(2);l("ngClass",cn(4,Lbe,o.wantsReplay,o.hasLeft)),d(),l("icon",e.EIcons.CLOSE),d(),l("icon",e.EIcons.REMATCH_CIRCLE_ARROW),d(),l("ngIf",!o.hasLeft)}}function Swt(t,n){if(1&t){const o=Ce();p(0,"button-text",27),Y("onClick",function(){return oe(o),re(_(4).rematchClick.emit())}),p(1,"span",28),H(2),V(3,"translate"),m()()}if(2&t){const o=_(4);l("buttonModifier",o.EButtonModifier.BUTTON_TRANSPARENT)("loading",o.replayBtnLoadingStatus)("disabled",o.rematch.isRequestedByCurrentPlayer||o.rematch.hasTimerExpired||!o.isRematchEnabled||o.isRematchCancelled),d(),Uo("fivePlusPlayers",o.otherTeamsScore.length>=4),d(),se($(3,6,"GAME_SUMMARY.REMATCH"))}}function wwt(t,n){if(1&t){const o=Ce();p(0,"button-text",29),Y("onClick",function(){return oe(o),re(_(4).rematchClick.emit())}),p(1,"span",28),H(2),V(3,"translate"),m()()}if(2&t){const o=_(4);l("buttonModifier",o.buttonReplay.modifier)("loading",o.replayBtnLoadingStatus)("disabled",o.rematch.isRequestedByCurrentPlayer||o.rematch.hasTimerExpired||!o.isRematchEnabled||o.isRematchCancelled),d(),Uo("fivePlusPlayers",o.otherTeamsScore.length>=4),d(),se($(3,6,"GAME_SUMMARY.REMATCH"))}}function Twt(t,n){if(1&t&&(Tn(0),U(1,ywt,4,7,"div",18)(2,Swt,4,8,"button-text",19)(3,wwt,4,8,"button-text",20),Pn()),2&t){const o=_().$implicit,e=_(2);d(),l("ngIf",o.platformProfile.id!==e.myUserId||e.rematch.isRequestedByCurrentPlayer),d(),l("ngIf",o.platformProfile.id===e.myUserId&&!e.rematch.isRequestedByCurrentPlayer),d(),l("ngIf",o.platformProfile.id===e.myUserId&&!e.rematch.isRequestedByCurrentPlayer)}}const Dbe=t=>({"no-replay":t}),Bbe=(t,n)=>({replay:t,won:n});function Pwt(t,n){if(1&t&&(p(0,"div",13)(1,"div",14),U(2,bwt,1,0,"div",15),B(3,"avatar",16),m(),U(4,Twt,4,3,"ng-container",5),m()),2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(6,Dbe,!e.isRematchEnabled||e.isSpectator)),d(),l("ngClass",cn(8,Bbe,o.wantsReplay,e.isWinner)),d(),l("ngIf",e.isWinner),d(),l("user",o.platformProfile)("isLink",!o.player.isBot),d(),l("ngIf",e.isRematchEnabled&&!e.isSpectator)}}function Iwt(t,n){1&t&&B(0,"div",17)}function Mwt(t,n){if(1&t&&(p(0,"div",25),B(1,"icon-component",26),m()),2&t){const o=_(5);d(),l("icon",o.EIcons.REMATCH_PLAY_ICON)}}function Owt(t,n){if(1&t&&(p(0,"div",21),B(1,"icon-component",22)(2,"icon-component",23),U(3,Mwt,2,1,"div",24),m()),2&t){const o=_().$implicit,e=_(3);l("ngClass",cn(4,Lbe,o.wantsReplay,o.hasLeft)),d(),l("icon",e.EIcons.CLOSE),d(),l("icon",e.EIcons.REMATCH_CIRCLE_ARROW),d(),l("ngIf",!o.hasLeft)}}function Ewt(t,n){if(1&t&&(p(0,"div",13)(1,"div",14),U(2,Iwt,1,0,"div",15),B(3,"avatar",16),m(),U(4,Owt,4,7,"div",18),m()),2&t){const o=n.$implicit,e=_(3);l("ngClass",ne(6,Dbe,!e.isRematchEnabled||e.isSpectator)),d(),l("ngClass",cn(8,Bbe,o.wantsReplay,o.isWinner())),d(),l("ngIf",o.isWinner()),d(),l("user",o.platformProfile)("isLink",!o.player.isBot),d(),l("ngIf",e.isRematchEnabled&&!e.isSpectator)}}const xwt=t=>({"more-than-one":t});function Awt(t,n){if(1&t&&(p(0,"div",30),U(1,Ewt,5,11,"div",11),m()),2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(3,xwt,o.length>1)),d(),l("ngForOf",o)("ngForTrackBy",e.trackByPlayerFn)}}const Nbe=t=>({"rematch-disabled":t});function Rwt(t,n){if(1&t&&(Tn(0),p(1,"div",10),U(2,Pwt,5,11,"div",11)(3,Awt,2,5,"div",12),m(),Pn()),2&t){const o=_();d(),l("ngClass",ne(5,Nbe,!o.isRematchEnabled)),d(),l("ngForOf",o.myTeam)("ngForTrackBy",o.trackByPlayerFn),d(),l("ngForOf",o.otherTeams)("ngForTrackBy",o.trackByFn)}}let Fbe=(()=>{var t;class n{constructor(){this.rematchClick=new ke,this.EIcons=mwt,this.buttonReplay={icon:ve.EIcons.REMATCH,modifier:ve.EButtonModifier.BUTTON_ATTENTION},this.EButtonModifier=ve.EButtonModifier}trackByPlayerFn(e,i){return i.platformProfile.id}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["team-stats"]],inputs:{myUserId:"myUserId",isRematchEnabled:"isRematchEnabled",isRematchCancelled:"isRematchCancelled",isSpectator:"isSpectator",isWinner:"isWinner",myTeam:"myTeam",otherTeams:"otherTeams",myTeamScore:"myTeamScore",otherTeamsScore:"otherTeamsScore",rematch:"rematch",replayBtnLoadingStatus:"replayBtnLoadingStatus"},outputs:{rematchClick:"rematchClick"},decls:9,vars:14,consts:[[1,"team-stats__container--game-stats",3,"ngClass"],[1,"team-stats__container--scores"],[1,"team-stats__container--score","my-team-score",3,"ngClass"],[1,"team-stats__result-text"],[3,"value",4,"ngIf"],[4,"ngIf"],[3,"value"],["class","team-stats__container--score-wrapper",4,"ngFor","ngForOf","ngForTrackBy"],[1,"team-stats__container--score-wrapper"],[1,"team-stats__container--score",3,"ngClass"],[1,"team-stats__container--players",3,"ngClass"],["class","team-stats__container--player",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","team-stats__container--other-teams",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"team-stats__container--player",3,"ngClass"],[1,"team-stats__container--avatar",3,"ngClass"],["class","team-stats__container-rays",4,"ngIf"],[1,"team-stats__avatar",3,"user","isLink"],[1,"team-stats__container-rays"],["class","team-stats__container--replay",3,"ngClass",4,"ngIf"],["class","team-stats__button--replay old-design",3,"buttonModifier","loading","disabled","onClick",4,"ngIf"],["class","team-stats__button--replay new-design",3,"buttonModifier","loading","disabled","onClick",4,"ngIf"],[1,"team-stats__container--replay",3,"ngClass"],[1,"leaved-icon",3,"icon"],[1,"circle-arrow",3,"icon"],["class","team-stats__container--replay-arrow",4,"ngIf"],[1,"team-stats__container--replay-arrow"],[1,"play-icon",3,"icon"],[1,"team-stats__button--replay","old-design",3,"buttonModifier","loading","disabled","onClick"],[1,"team-stats__text--replay-btn"],[1,"team-stats__button--replay","new-design",3,"buttonModifier","loading","disabled","onClick"],[1,"team-stats__container--other-teams",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),H(4),V(5,"translate"),U(6,fwt,1,1,"number",4),m()(),U(7,vwt,2,2,"ng-container",5),m(),U(8,Rwt,4,7,"ng-container",5),m()),2&e&&(l("ngClass",ne(10,Nbe,!i.isRematchEnabled)),d(2),l("ngClass",ne(12,kbe,i.isWinner)),d(),Uo("fivePlusPlayers",i.otherTeamsScore.length>=4),d(),ze("",$(5,8,i.isWinner?"GAME_HISTORY.WON":"GAME_HISTORY.LOST")," "),d(2),l("ngIf",void 0!==i.myTeamScore),d(),l("ngIf",i.otherTeamsScore),d(),l("ngIf",i.myTeam&&i.otherTeams))},dependencies:[Xe,Mt,Ne,Bo,Dn,Qr,pn,qe],styles:['.team-stats__container--game-stats[_ngcontent-%COMP%]{margin:1rem 0;width:100%;min-height:19rem}.team-stats__container--game-stats.rematch-disabled[_ngcontent-%COMP%]{min-height:15rem}.team-stats__container--scores[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;flex-flow:row wrap;justify-content:space-around}.team-stats__container--players[_ngcontent-%COMP%]{width:100%;height:15rem;display:flex;flex-flow:row wrap;justify-content:space-around}.team-stats__container--players.rematch-disabled[_ngcontent-%COMP%]{height:9rem}.team-stats__container--player[_ngcontent-%COMP%]{height:100%;flex:1;display:flex;flex-flow:column nowrap}.team-stats__container--player.no-replay[_ngcontent-%COMP%]{justify-content:center;align-items:center}.team-stats__container--avatar[_ngcontent-%COMP%]{position:relative;width:100%;height:9rem;display:flex;justify-content:center;align-items:center}.team-stats__container--avatar.replay[_ngcontent-%COMP%]{animation:zoomInAndOut 1s linear forwards}.team-stats__container--avatar.won[_ngcontent-%COMP%]   .team-stats__avatar[_ngcontent-%COMP%]{animation:tada 2s linear infinite}.team-stats__avatar[_ngcontent-%COMP%]{width:8rem;height:8rem;z-index:2}@media only screen and (max-width: 480px){.team-stats__avatar[_ngcontent-%COMP%]{width:7rem;height:7rem}}@media only screen and (max-width: 380px){.team-stats__avatar[_ngcontent-%COMP%]{width:6rem;height:6rem}}.team-stats__container--replay-arrow[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.team-stats__container--replay[_ngcontent-%COMP%]{position:relative;width:100%;height:6rem;display:flex;justify-content:center;align-items:center;z-index:2}.team-stats__container--replay.replay[_ngcontent-%COMP%]   .circle-arrow[_ngcontent-%COMP%]{animation:spinReplay .5s linear}.team-stats__container--replay.hasLeft[_ngcontent-%COMP%]{animation:zoomInAndOut .5s linear}.team-stats__button--replay[_ngcontent-%COMP%]{width:calc(100% - 1rem);margin:auto .5rem;z-index:1}.team-stats__text--replay-btn[_ngcontent-%COMP%]{text-decoration:none;font-size:1.4rem}.team-stats__text--replay-btn.fivePlusPlayers[_ngcontent-%COMP%]{font-size:1rem}@media only screen and (max-width: 480px){.team-stats__text--replay-btn[_ngcontent-%COMP%]{font-size:1rem}}@media only screen and (max-width: 360px){.team-stats__text--replay-btn[_ngcontent-%COMP%]{font-size:.8rem}}.team-stats__container--other-teams[_ngcontent-%COMP%]{height:100%;flex:1;display:flex}.team-stats__container--other-teams.more-than-one[_ngcontent-%COMP%]{width:auto;flex:2}.team-stats__container--other-teams.more-than-one[_ngcontent-%COMP%]   .team-stats__container--player[_ngcontent-%COMP%]{width:auto!important;flex:1}.team-stats__container--other-teams[_ngcontent-%COMP%]:not(.more-than-one)   .team-stats__container--player[_ngcontent-%COMP%]{width:100%!important}.team-stats__container--score-wrapper[_ngcontent-%COMP%]{height:100%;flex:1;display:flex;overflow:hidden}.team-stats__container--score-wrapper[_ngcontent-%COMP%]   .team-stats__container--score[_ngcontent-%COMP%]{width:100%!important}.team-stats__container--score[_ngcontent-%COMP%]{height:100%;flex:1;display:flex;justify-content:center;align-items:center;z-index:2}.team-stats__container-rays[_ngcontent-%COMP%]{position:absolute;display:flex;flex-flow:row;justify-content:center;top:-35%;left:-35%;width:170%;height:170%;overflow:hidden}.team-stats__container-rays[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:center}.team-stats__result-text[_ngcontent-%COMP%]{white-space:nowrap}@media only screen and (max-width: 980px){.team-stats__result-text[_ngcontent-%COMP%]{font-size:1.2rem}.team-stats__result-text[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:1.2rem!important}}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%]{font-size:1.1rem}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:1.1rem!important}@media only screen and (max-width: 440px){.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%]{font-size:1rem}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:1rem!important}}@media only screen and (max-width: 380px){.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%]{font-size:.8rem}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:.8rem!important}}'],changeDetection:0}),n})();var kwt=ve.EButtonModifier;function Lwt(t,n){1&t&&B(0,"reward-component",7),2&t&&l("reward",_().maxReward)}let Ube=(()=>{var t;class n{constructor(){this.playVideo=new ke,this.buttonModifier=kwt}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["rewarded-video-in-game-box"]],inputs:{maxReward:"maxReward",isDisabled:"isDisabled"},outputs:{playVideo:"playVideo"},decls:12,vars:12,consts:[[1,"rwigb__wrapper"],[1,"rwigb__container--video-img",3,"click"],["empty-placeholder","",3,"imgSrc"],[1,"rwigb__container--video-info"],[1,"rwigb__video-text"],["class","rwigb__video-reward-text",3,"reward",4,"ngIf"],[1,"rwigb__watch-btn",3,"buttonModifier","disabled","onClick"],[1,"rwigb__video-reward-text",3,"reward"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),Y("click",function(){return i.playVideo.emit()}),B(2,"img",2),V(3,"transformUrl"),m(),p(4,"div",3)(5,"p",4),H(6),V(7,"translate"),U(8,Lwt,1,1,"reward-component",5),m(),p(9,"button-text",6),Y("onClick",function(){return i.playVideo.emit()}),H(10),V(11,"translate"),m()()()),2&e&&(d(2),l("imgSrc",$(3,6,"game-summary/rewarded-video.png")),d(4),ze("",$(7,8,"LABEL.GET_UP_TO")," "),d(2),l("ngIf",i.maxReward),d(),l("buttonModifier",i.buttonModifier.BUTTON_ACTION)("disabled",i.isDisabled),d(),se($(11,10,"TEXT.WATCH")))},dependencies:[Ne,cu,pn,$o,qe,uo],styles:[".rwigb__wrapper[_ngcontent-%COMP%]{margin-bottom:1rem;width:100%;min-height:8rem;display:flex;flex-flow:row wrap;justify-content:center;align-items:center;padding:.5rem}.rwigb__container--video-img[_ngcontent-%COMP%], .rwigb__container--video-info[_ngcontent-%COMP%]{flex:1;margin:.5rem;min-height:8rem}.rwigb__container--video-img[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;height:8rem}.rwigb__container--video-img[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;position:absolute}.rwigb__container--video-info[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-content:space-around}.rwigb__video-text[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;padding:.25rem .5rem;text-align:center}.rwigb__video-reward-text[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;padding:.25rem .25rem .5rem;text-align:center}.rwigb__watch-btn[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();function Dwt(t,n){if(1&t&&(p(0,"div",4)(1,"p",5)(2,"span",6),H(3,"+"),m(),Tn(4),B(5,"currency-component",7),Pn(),m()()),2&t){const o=n.$implicit;d(5),l("currency",o.type)("value",o.value)}}let Gbe=(()=>{var t;class n{constructor(e){this.cdr=e,this.shownRewards=[],this.currencyType=ln,this.currentChipsBalance=0,this.timers=new is.List}ngOnInit(){!this.data||!this.data.wallet||(this.currentChipsBalance=this.data.wallet.chips,this.cdr.detectChanges(),this.timers.add(_u(LM.RewardsAnimationInitialDelay).pipe(Qi(1)).subscribe(()=>{this.data.rewards.forEach((e,i)=>{this.timers.add(_u(LM.RewardAnimationDelay*i).pipe(Qi(1)).subscribe(()=>{if(this.shownRewards.push(e),e.type===ln.Chips){const r={amount:this.currentChipsBalance},s=.7*e.value.toFixed().length,a=()=>{this.currentChipsBalance=Math.floor(r.amount),this.cdr.detectChanges()};Zr.to(r,{duration:s,amount:this.currentChipsBalance+e.value,ease:mk.easeOut,onUpdate:a,onComplete:a})}this.cdr.detectChanges()}))})})))}ngOnDestroy(){this.timers.forEach(e=>e.unsubscribe())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["balance-box"]],inputs:{data:"data"},decls:4,vars:3,consts:[[1,"balance-box__container--reward-container"],[1,"balance-box__container--wallet-reward"],["class","balance-box__container--reward",4,"ngFor","ngForOf"],[3,"currency","value"],[1,"balance-box__container--reward"],[1,"balance-box__text--reward","balance-box__animate"],[1,"balance-box__plus"],[1,"balance-box__reward",3,"currency","value"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),U(2,Dwt,6,2,"div",2),B(3,"currency-component",3),m()()),2&e&&(d(2),l("ngForOf",i.shownRewards),d(),l("currency",i.currencyType.Chips)("value",i.currentChipsBalance))},dependencies:[Mt,So],styles:["[_nghost-%COMP%]{position:relative;width:100%;min-height:8rem;display:flex}.balance-box__container--reward-container[_ngcontent-%COMP%]{width:100%;min-height:5rem;display:flex;justify-content:space-around;flex-flow:row wrap}.balance-box__container--wallet-reward[_ngcontent-%COMP%]{position:relative;min-width:33.33%;min-height:4rem;display:flex;justify-content:center;align-items:center}.balance-box__container--wallet-reward[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:2.4rem;font-weight:600}.balance-box__text--reward[_ngcontent-%COMP%]{padding:.5rem 1rem;border-radius:.8rem;position:absolute;top:-1.8rem;right:-2rem;display:flex;flex-flow:row wrap}.balance-box__reward[_ngcontent-%COMP%]{font-size:1.4rem}.balance-box__plus[_ngcontent-%COMP%]{margin-right:.5rem;font-size:1.4rem}"],changeDetection:0}),n})();function Bwt(t,n){if(1&t&&(p(0,"span",3),H(1),V(2,"formatNumber"),m()),2&t){const o=_();d(),se("+"+$(2,1,o.newXp))}}function Nwt(t,n){if(1&t&&B(0,"level-animated-bar",4),2&t){const o=_();l("options",o.levelBarOptions)("isXPBoosted",o.data.xp.isXPBoosted)("levelRewards",o.data.levelRewards)}}let Vbe=(()=>{var t;class n{constructor(e){this.cdr=e,this.timers=new is.List}ngOnInit(){this.levelBarOptions={previousLevelAt:this.data.xp.playerExp.previousLevelAt,currentValue:Math.max(0,this.data.xp.playerExp.currentValue-this.data.xp.deltaXp),nextLevelAt:this.data.xp.playerExp.nextLevelAt,level:this.data.xp.playerExp.level},this.cdr.detectChanges(),this.timers.add(_u(LM.XpGainAnimationDelay).pipe(Qi(1)).subscribe(()=>{this.newXp=this.data.xp.deltaXp,this.levelBarOptions={previousLevelAt:this.data.xp.playerExp.previousLevelAt,currentValue:this.data.xp.playerExp.currentValue,nextLevelAt:this.data.xp.playerExp.nextLevelAt,level:this.data.xp.playerExp.level+this.data.xp.deltaLevel},this.cdr.detectChanges()}))}ngOnChanges(e){this.data&&this.cdr.detectChanges()}ngOnDestroy(){this.timers.forEach(e=>e.unsubscribe())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["xp-box"]],inputs:{data:"data"},features:[it],decls:3,vars:2,consts:[["class","xp-box__text--xp-gain",4,"ngIf"],[1,"xp-box__container--user-xp-bar"],[3,"options","isXPBoosted","levelRewards",4,"ngIf"],[1,"xp-box__text--xp-gain"],[3,"options","isXPBoosted","levelRewards"]],template:function(e,i){1&e&&(U(0,Bwt,3,3,"span",0),p(1,"div",1),U(2,Nwt,1,3,"level-animated-bar",2),m()),2&e&&(l("ngIf",i.newXp),d(2),l("ngIf",i.levelBarOptions&&i.data))},dependencies:[Ne,BL,Go],styles:["[_nghost-%COMP%]{width:100%;min-height:13rem}.xp-box__container--user-xp-bar[_ngcontent-%COMP%]{width:100%;padding:0 .5rem}.xp-box__text--xp-gain[_ngcontent-%COMP%]{position:absolute;top:2rem;left:50%;transform:translate(-50%);font-size:1.8rem;animation:_ngcontent-%COMP%_zoomInAndOutXp .3s linear forwards}@keyframes _ngcontent-%COMP%_zoomInAndOutXp{0%{transform:translate(-50%) scale(1)}50%{transform:translate(-50%) scale(1.2)}to{transform:translate(-50%) scale(1)}}"],changeDetection:0}),n})();const Fwt=(t,n)=>({selected:t,hidden:n});function Uwt(t,n){if(1&t){const o=Ce();p(0,"icon-component",11),Y("click",function(){const r=oe(o).$implicit,s=_().$implicit;return re(_().onStarsClickedFn({user:s,rating:r.value}))}),m()}if(2&t){const o=n.$implicit,e=_().$implicit;l("icon",_().EIcons.STAR)("ngClass",cn(2,Fwt,o.selected,e.starsRating))}}function Gwt(t,n){if(1&t&&(p(0,"p",12)(1,"span",13),H(2),V(3,"translate"),m(),p(4,"span",14),B(5,"icon-component",15),H(6),m()()),2&t){const o=_().$implicit,e=_();d(2),se($(3,3,"GAME_SUMMARY.YOU_RATED")),d(3),l("icon",e.EIcons.STAR),d(),se(o.starsRating+"/5")}}const Vwt=t=>({rated:t}),zwt=t=>({name:t});function jwt(t,n){if(1&t){const o=Ce();p(0,"div",1)(1,"div",2),B(2,"avatar",3),m(),p(3,"div",4)(4,"div",5)(5,"div",6),U(6,Uwt,1,5,"icon-component",7)(7,Gwt,7,5,"p",8),m()()(),p(8,"div",9)(9,"button-icon",10),Y("onClick",function(){const r=oe(o).$implicit;return re(_().sendFriendRequestFn(r.player))}),m()()()}if(2&t){const o=n.$implicit,e=_();d(2),l("user",o.platformProfile)("isLink",!o.player.profile.isBot),d(3),l("ngClass",ne(10,Vwt,o.starsRating)),d(),l("ngForOf",o.stars)("ngForTrackBy",e.trackByStarsFn),d(),l("ngIf",o.starsRating),d(2),l("icon",ne(12,zwt,e.addFriendBtn.icon))("buttonModifier",e.addFriendBtn.modifier)("loading",o.actions.sendFriendRequest.loading)("disabled",!o.canBeAddedAsFriend())}}let zbe=(()=>{var t;class n{constructor(e){this.cdr=e,this.onStarsClick=new ke,this.sendFriendRequest=new ke,this.addFriendBtn={icon:ve.EIcons.ADD_FRIEND,modifier:ve.EButtonModifier.BUTTON_ACTION},this.rateablePlayers=[],this.EIcons=ve.EIcons,this.timers=new is.List}ngOnInit(){this.rateablePlayers=this.data.rateablePlayers.map(e=>({...e,starsRating:0,stars:[{value:5,selected:!1},{value:4,selected:!1},{value:3,selected:!1},{value:2,selected:!1},{value:1,selected:!1}]}))}onStarsClickedFn(e){let i=this.rateablePlayers.find(r=>r.player.id===e.user.player.id);for(let r=0;r<i.stars.length;r++)i.stars[r].selected=e.rating<=r+1;i.starsRating=e.rating,this.cdr.detectChanges(),this.timers.add(_u(LM.RateClickDelay).pipe(Qi(1)).subscribe(()=>{this.cdr.detectChanges()})),this.onStarsClick.emit(e)}sendFriendRequestFn(e){this.sendFriendRequest.emit(e.profile)}trackByFn(e,i){return i.platformProfile.id}trackByStarsFn(e,i){return i.value}ngOnDestroy(){this.timers.forEach(e=>e.unsubscribe())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["rate-box"]],inputs:{data:"data"},outputs:{onStarsClick:"onStarsClick",sendFriendRequest:"sendFriendRequest"},decls:1,vars:2,consts:[["class","rate-box__container--rate-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"rate-box__container--rate-container"],[1,"avatar"],[3,"user","isLink"],[1,"rate"],[1,"rate-container"],[1,"stars",3,"ngClass"],["class","star",3,"icon","ngClass","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","partner-rating",4,"ngIf"],[1,"add-fr-button"],[3,"icon","buttonModifier","loading","disabled","onClick"],[1,"star",3,"icon","ngClass","click"],[1,"partner-rating"],[1,"label"],[1,"rating"],[3,"icon"]],template:function(e,i){1&e&&U(0,jwt,10,14,"div",0),2&e&&l("ngForOf",i.rateablePlayers)("ngForTrackBy",i.trackByFn)},dependencies:[Xe,Mt,Ne,Bo,Dn,ei,qe],styles:["[_nghost-%COMP%]{width:100%;min-height:15rem}.rate-box__container--rate-container[_ngcontent-%COMP%]{width:100%;height:calc(100% - 3rem);display:flex;flex-flow:row wrap}.rate-box__container--rate-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:10rem;height:100%;padding:2rem 1rem}@media only screen and (max-width: 480px){.rate-box__container--rate-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:8rem;padding:3rem 1rem}}@media only screen and (max-width: 360px){.rate-box__container--rate-container[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{width:7rem;padding:3rem .5rem}}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]{flex:1}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]   .rate-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]   .rate-container[_ngcontent-%COMP%]   .stars[_ngcontent-%COMP%]{margin:0 auto;display:flex;flex-flow:row wrap}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]   .rate-container[_ngcontent-%COMP%]   .stars.rated[_ngcontent-%COMP%]{flex-flow:column nowrap;justify-content:center;align-items:center}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]   .rate-container[_ngcontent-%COMP%]   .stars[_ngcontent-%COMP%]   .star[_ngcontent-%COMP%]{cursor:pointer}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]   .rate-container[_ngcontent-%COMP%]   .stars[_ngcontent-%COMP%]   .partner-rating[_ngcontent-%COMP%]{font-size:1.8rem;animation:fadeIn .8s linear forwards;display:flex}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]   .rate-container[_ngcontent-%COMP%]   .stars[_ngcontent-%COMP%]   .partner-rating[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{order:1;margin:0 .5rem}.rate-box__container--rate-container[_ngcontent-%COMP%]   .rate[_ngcontent-%COMP%]   .rate-container[_ngcontent-%COMP%]   .stars[_ngcontent-%COMP%]   .partner-rating[_ngcontent-%COMP%]   .rating[_ngcontent-%COMP%]{order:2}.rate-box__container--rate-container[_ngcontent-%COMP%]   .add-fr-button[_ngcontent-%COMP%]{width:6rem;height:12rem;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 480px){.rate-box__container--rate-container[_ngcontent-%COMP%]   .add-fr-button[_ngcontent-%COMP%]{width:5.5rem}}@media only screen and (max-width: 360px){.rate-box__container--rate-container[_ngcontent-%COMP%]   .add-fr-button[_ngcontent-%COMP%]{width:5rem}}"],changeDetection:0}),n})();var o2=ku.EPlayerStatsBoxType;function Hwt(t,n){1&t&&B(0,"balance-box",7),2&t&&l("data",_(2).$implicit.data)}function qwt(t,n){1&t&&B(0,"xp-box",7),2&t&&l("data",_(2).$implicit.data)}function Wwt(t,n){if(1&t){const o=Ce();p(0,"rate-box",8),Y("onStarsClick",function(i){return oe(o),re(_(3).onStarsClickedFn(i))})("sendFriendRequest",function(i){return oe(o),re(_(3).sendFriendRequestFn(i))}),m()}2&t&&l("data",_(2).$implicit.data)}function $wt(t,n){if(1&t&&(p(0,"div",3)(1,"p",4),H(2),V(3,"translate"),m(),U(4,Hwt,1,1,"balance-box",5)(5,qwt,1,1,"xp-box",5)(6,Wwt,1,1,"rate-box",6),m()),2&t){const o=_().$implicit,e=_();d(2),ze(" ",yt(3,4,o.title.key,o.title.params)," "),d(2),l("ngIf",o.type===e.statsBoxType.Balance&&o.data),d(),l("ngIf",o.type===e.statsBoxType.Xp&&o.data),d(),l("ngIf",o.type===e.statsBoxType.Rate&&o.data)}}function Kwt(t,n){if(1&t&&(Tn(0),U(1,$wt,7,7,"div",2),Pn()),2&t){const o=n.$implicit;d(),l("ngIf",o.data)}}let jbe=(()=>{var t;class n{constructor(){this.onStarsClick=new ke,this.sendFriendRequest=new ke,this.statsBoxType=o2,this.statsModels=[{type:o2.Balance,title:{key:"LABEL.BALANCE"},data:void 0},{type:o2.Xp,title:{key:"GAME_SUMMARY.PLAYER_EXP"},data:void 0},{type:o2.Rate,title:{key:"GAME_SUMMARY.PARTNER_RATE"},data:void 0}]}ngOnChanges(e){this.statsModels=this.updateStatsViewModelBoxes()}trackByFn(e,i){return i.type}sendFriendRequestFn(e){this.sendFriendRequest.emit(e)}onStarsClickedFn(e){this.onStarsClick.emit(e)}updateStatsViewModelBoxes(){return this.statsModels.map(e=>({...e,data:this.statsViewModels[e.type]}))}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["player-stats"]],inputs:{statsViewModels:"statsViewModels"},outputs:{onStarsClick:"onStarsClick",sendFriendRequest:"sendFriendRequest"},features:[it],decls:2,vars:2,consts:[[1,"player-stats__wrapper"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","player-stats__container",4,"ngIf"],[1,"player-stats__container"],[1,"player-stats__text--title"],[3,"data",4,"ngIf"],[3,"data","onStarsClick","sendFriendRequest",4,"ngIf"],[3,"data"],[3,"data","onStarsClick","sendFriendRequest"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,Kwt,2,1,"ng-container",1),m()),2&e&&(d(),l("ngForOf",i.statsModels)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Ne,Gbe,Vbe,zbe,qe],styles:[".player-stats__wrapper[_ngcontent-%COMP%]{margin-bottom:1rem;width:100%}.player-stats__container[_ngcontent-%COMP%]{position:relative;width:100%}.player-stats__text--title[_ngcontent-%COMP%]{width:100%;height:3rem;font-size:1.8rem;padding:.5rem 1rem}"],changeDetection:0}),n})();
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */var Vi=function(t){return t[t.State=0]="State",t[t.Transition=1]="Transition",t[t.Sequence=2]="Sequence",t[t.Group=3]="Group",t[t.Animate=4]="Animate",t[t.Keyframes=5]="Keyframes",t[t.Style=6]="Style",t[t.Trigger=7]="Trigger",t[t.Reference=8]="Reference",t[t.AnimateChild=9]="AnimateChild",t[t.AnimateRef=10]="AnimateRef",t[t.Query=11]="Query",t[t.Stagger=12]="Stagger",t}(Vi||{});const Rg="*";function r2(t,n){return{type:Vi.Trigger,name:t,definitions:n,options:{}}}function V0(t,n=null){return{type:Vi.Animate,styles:n,timings:t}}function Wc(t){return{type:Vi.Style,styles:t,offset:null}}function Hbe(t,n,o){return{type:Vi.State,name:t,styles:n,options:o}}function Qwt(t){return{type:Vi.Keyframes,steps:t}}function z0(t,n,o=null){return{type:Vi.Transition,expr:t,animation:n,options:o}}function Ywt(t,n,o=null){return{type:Vi.Query,selector:t,animation:n,options:o}}class DM{constructor(n=0,o=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+o}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const o="start"==n?this._onStartFns:this._onDoneFns;o.forEach(e=>e()),o.length=0}}class qbe{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let o=0,e=0,i=0;const r=this.players.length;0==r?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++o==r&&this._onFinish()}),s.onDestroy(()=>{++e==r&&this._onDestroy()}),s.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const o=n*this.totalTime;this.players.forEach(e=>{const i=e.totalTime?Math.min(1,o/e.totalTime):1;e.setPosition(i)})}getPosition(){const n=this.players.reduce((o,e)=>null===o||e.totalTime>o.totalTime?e:o,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const o="start"==n?this._onStartFns:this._onDoneFns;o.forEach(e=>e()),o.length=0}}function t0t(t,n){1&t&&B(0,"div",3),2&t&&l("ngClass",_().messagePosition)}function n0t(t,n){if(1&t&&(Tn(0),B(1,"img",4),Pn()),2&t){const o=_();d(),l("src",o.message.payload.url,Wn)}}function i0t(t,n){if(1&t&&(Tn(0),p(1,"div",5)(2,"p",6),H(3),m()(),Pn()),2&t){const o=_();d(3),se(o.getText(o.message))}}let HC=(()=>{var t;class n{constructor(e,i,r){this.soundService=e,this.assetResolver=i,this.cdr=r,this.messagePosition=n.EMessagePosition.Center,this.end=new ke,this.EInGameMessage=ec,this.animation=av.noDelayAvatarFrameAnimation,this.stateTrigger="closed",this.queue=[]}showMessage(e){if(e.type===ec.Emoteicon||e.type===ec.Phrase){if(this.message)return void this.queue.push(e);switch(this.message=e,this.message.type){case ec.Emoteicon:this.handleEmojiMessage(this.message),this.stateTrigger="opened";break;case ec.Phrase:this.handlePhraseMessage(this.message),this.stateTrigger="opened"}this.delay=setTimeout(()=>{this.stateTrigger="closed",this.end.emit(),this.cdr.detectChanges()},3e3),this.cdr.detectChanges()}}ngOnDestroy(){clearTimeout(this.delay)}onAnimationEnd(e){"closed"===e.toState&&(this.message=null,this.cdr.detectChanges(),this.queue.length&&this.showMessage(this.queue.shift()))}handleEmojiMessage(e){e.payload.voiceOver&&this.playVoiceover(e.payload.voiceOver)}handlePhraseMessage(e){e.payload.voiceOver&&this.playVoiceover(e.payload.voiceOver)}getSpritesheetUrl(e){var i;return null==e||null===(i=e.payload)||void 0===i?void 0:i.spritesheet}playVoiceover(e){this.soundService.createSound({src:this.assetResolver.resolveVoiceOverUrls(e)[0],volume:1,interruptable:!1,format:e.formats[0],preload:!0,type:Dp.ClientSound}).play()}getText(e){return this.assetResolver.resolvePhraseText(e.payload.key,e.id)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mo),g(QG),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["game-summary-message-baloon"]],inputs:{messagePosition:"messagePosition"},outputs:{end:"end"},decls:4,vars:4,consts:[[1,"gs-message-baloon__container"],["class","gs-message-baloon__arrow",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"gs-message-baloon__arrow",3,"ngClass"],[1,"gs-message-baloon__img",3,"src"],[1,"gs-message-baloon__text-animated--wrapper"],[1,"gs-message-baloon__text-animated"]],template:function(e,i){1&e&&(p(0,"div",0),Y("@state.done",function(s){return i.onAnimationEnd(s)}),U(1,t0t,1,1,"div",1)(2,n0t,2,1,"ng-container",2)(3,i0t,4,1,"ng-container",2),m()),2&e&&(l("@state",i.stateTrigger),d(),l("ngIf",i.message),d(),l("ngIf",(null==i.message?null:i.message.type)===i.EInGameMessage.Emoteicon),d(),l("ngIf",(null==i.message?null:i.message.type)===i.EInGameMessage.Phrase))},dependencies:[Xe,Ne],styles:["[_nghost-%COMP%]{border-radius:1.5rem}.gs-message-baloon__container[_ngcontent-%COMP%]{position:relative;background-color:#fff;border-radius:inherit}.gs-message-baloon__img[_ngcontent-%COMP%]{position:relative;padding:.5rem;margin:auto;display:block;width:80px;height:80px}@media screen and (max-width: 568px){.gs-message-baloon__img[_ngcontent-%COMP%]{width:60px;height:60px}}.gs-message-baloon__text-animated--wrapper[_ngcontent-%COMP%]{position:relative;display:flex;width:250px}@media screen and (max-width: 568px){.gs-message-baloon__text-animated--wrapper[_ngcontent-%COMP%]{width:200px}}.gs-message-baloon__text-animated[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);color:#000;font-size:1.6rem;font-weight:700;padding:.75rem 1.25rem;background-color:#fff;border-radius:1.5rem;white-space:normal}.gs-message-baloon__arrow[_ngcontent-%COMP%]{position:absolute;top:50%;left:0;width:2rem;height:3rem;transform-origin:left center;transform:translate(-50%,-50%);background-color:#fff;border-radius:.1rem}.gs-message-baloon__arrow.top[_ngcontent-%COMP%]{-webkit-clip-path:polygon(0 100%,100% 0,100% 75%);clip-path:polygon(0 100%,100% 0,100% 75%)}.gs-message-baloon__arrow.center[_ngcontent-%COMP%]{-webkit-clip-path:polygon(0 12.5%,100% 50%,0 87.5%);clip-path:polygon(0 12.5%,100% 50%,0 87.5%)}.gs-message-baloon__arrow.bottom[_ngcontent-%COMP%]{-webkit-clip-path:polygon(0 0,100% 25%,100% 100%);clip-path:polygon(0 0,100% 25%,100% 100%)}"],data:{animation:[r2("state",[z0("closed => opened",[Wc({opacity:0,transform:"scale(0.4)",transformOrigin:"left"}),V0("0.3s 0.2s cubic-bezier(0.69, 0, 0, 1)",Wc({opacity:1,transform:"scale(1)"}))]),z0("opened => closed",[Wc({opacity:1,transform:"scale(1)",transformOrigin:"left"}),V0(".3s 0.2s cubic-bezier(0.69, 0, 0, 1)",Wc({opacity:0,transform:"scale(0.4)"}))])])]},changeDetection:0}),n})();function o0t(t,n){1&t&&(p(0,"span"),H(1,"+"),m())}!function(t){let n;var o;(o=n=t.EMessagePosition||(t.EMessagePosition={})).Top="top",o.Center="center",o.Bottom="bottom"}(HC||(HC={}));const r0t=(t,n,o)=>({hideDeltaOnAnimationEnd:t,isNegative:n,animate:o});function s0t(t,n){if(1&t&&(p(0,"span",3),U(1,o0t,2,0,"span",4),B(2,"number",5),m()),2&t){const o=_();l("ngClass",_a(3,r0t,o.hideDeltaOnAnimationEnd,o.delta<0,o.animateDelta)),d(),l("ngIf",o.delta>0),d(),l("value",o.delta)}}const a0t=(t,n)=>({isNegative:t,isSame:n});let yj=(()=>{var t;class n{constructor(e){this.cdr=e,this.hideDeltaOnAnimationEnd=!0,this.deltaAnimationDelay=0,this.amount={value:0},this.delta=0,this.animateDelta=!1}ngOnDestroy(){cancelAnimationFrame(this.raf),clearTimeout(this.delay),clearTimeout(this.delayTimeoutId)}ngOnChanges(e){(e.oldRating||e.newRating)&&(this.amount.value=null==this.newRating?0:this.oldRating,this.delta=null==this.newRating?0:this.newRating-this.oldRating,clearTimeout(this.delay),clearTimeout(this.delayTimeoutId),this.delay=setTimeout(()=>{this.animateValueChange(this.newRating)},1e3),this.delayTimeoutId=setTimeout(()=>{this.animateDelta=!0,this.cdr.detectChanges()},1e3*this.deltaAnimationDelay))}animateValueChange(e){const i={value:this.amount.value},r=Math.abs(e-this.amount.value),s=r<=5?.1*r*1e3:1e3;this.cdr.detectChanges(),Zr.to(i,{duration:s/1e3,value:this.amount.value+(e-this.amount.value),ease:mk.easeOut,onUpdate:()=>{this.amount.value=Math.floor(i.value),this.cdr.detectChanges()},onComplete:()=>{this.amount.value=Math.floor(i.value),this.cdr.detectChanges()}})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ranked-stats-rating"]],inputs:{oldRating:"oldRating",newRating:"newRating",hideDeltaOnAnimationEnd:"hideDeltaOnAnimationEnd",deltaAnimationDelay:"deltaAnimationDelay"},features:[it],decls:3,vars:6,consts:[[1,"ranked-stats-rating-text--wrapper"],[1,"ranked-stats-rating-text",3,"ngClass","value"],["class","ranked-stats-rating-text delta",3,"ngClass",4,"ngIf"],[1,"ranked-stats-rating-text","delta",3,"ngClass"],[4,"ngIf"],[3,"value"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"number",1),U(2,s0t,3,7,"span",2),m()),2&e&&(d(),l("ngClass",cn(3,a0t,i.newRating<i.oldRating,i.newRating===i.oldRating))("value",i.amount.value),d(),l("ngIf",i.delta))},dependencies:[Xe,Ne,Qr],styles:["[_nghost-%COMP%]{display:inline-block}.ranked-stats-rating-text--wrapper[_ngcontent-%COMP%]{position:relative}.ranked-stats-rating-text[_ngcontent-%COMP%]{font-size:1em!important}.ranked-stats-rating-text.delta[_ngcontent-%COMP%]{position:absolute;display:flex;font-size:.6em!important;left:calc(100% + 5px);top:50%;opacity:0}.ranked-stats-rating-text.delta.animate[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_positive 4s 1s cubic-bezier(.25,.46,.45,.94) forwards}.ranked-stats-rating-text.delta.animate.hideDeltaOnAnimationEnd[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_positive-hide 4s 1s cubic-bezier(.25,.46,.45,.94) forwards}.ranked-stats-rating-text.delta.animate.isNegative[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_negative 4s 1s cubic-bezier(.25,.46,.45,.94) forwards}.ranked-stats-rating-text.delta.animate.isNegative.hideDeltaOnAnimationEnd[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_negative-hide 4s 1s cubic-bezier(.25,.46,.45,.94) forwards}@keyframes _ngcontent-%COMP%_positive-hide{0%{opacity:.5;transform:translateY(-50%)}15%{opacity:1;transform:translateY(-25px)}95%{opacity:1;transform:translateY(-25px)}to{opacity:0;transform:translateY(-25px)}}@keyframes _ngcontent-%COMP%_positive{0%{opacity:.5;transform:translateY(-50%)}15%{opacity:1;transform:translateY(-25px)}95%{opacity:1;transform:translateY(-25px)}to{opacity:1;transform:translateY(-25px)}}@keyframes _ngcontent-%COMP%_negative{0%{opacity:.5;transform:translateY(-50%)}15%{opacity:1;transform:translateY(-25px)}95%{opacity:1;transform:translateY(-25px)}to{opacity:1;transform:translateY(-25px)}}@keyframes _ngcontent-%COMP%_negative-hide{0%{opacity:.5;transform:translateY(-50%)}15%{opacity:1;transform:translateY(-25px)}95%{opacity:1;transform:translateY(-25px)}to{opacity:0;transform:translateY(-25px)}}"],changeDetection:0}),n})();function c0t(t,n){1&t&&B(0,"number",4),2&t&&l("value",_().newStreak)}function l0t(t,n){1&t&&B(0,"number",5),2&t&&l("value",_().oldStreak)}function u0t(t,n){1&t&&(p(0,"div",6),B(1,"div",7),m())}let Wbe=(()=>{var t;class n{constructor(e){this.cdr=e,this.showCross=!1}ngOnChanges(){null!=this.newStreak&&this.newStreak<this.oldStreak&&(clearTimeout(this.delay),this.delay=setTimeout(()=>{this.showCross=!0,this.cdr.detectChanges()},1e3))}ngOnDestroy(){clearTimeout(this.delay)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ranked-stats-streak"]],inputs:{oldStreak:"oldStreak",newStreak:"newStreak"},features:[it],decls:4,vars:3,consts:[[1,"ranked-stats-streak-text--wrapper"],["class","ranked-stats-streak-text",3,"value",4,"ngIf"],["class","ranked-stats-streak-text isNegative",3,"value",4,"ngIf"],["class","ranked-stats-streak--cross",4,"ngIf"],[1,"ranked-stats-streak-text",3,"value"],[1,"ranked-stats-streak-text","isNegative",3,"value"],[1,"ranked-stats-streak--cross"],[1,"ranked-stats-streak--cross-inner"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,c0t,1,1,"number",1)(2,l0t,1,1,"number",2)(3,u0t,2,0,"div",3),m()),2&e&&(d(),l("ngIf",null!=i.newStreak&&(i.newStreak>i.oldStreak||i.newStreak===i.oldStreak&&0!==i.newStreak)),d(),l("ngIf",null==i.newStreak||i.oldStreak>i.newStreak||i.oldStreak===i.newStreak&&0===i.newStreak),d(),l("ngIf",i.showCross))},dependencies:[Ne,Qr],styles:[".ranked-stats-streak-text--wrapper[_ngcontent-%COMP%]{position:relative}.ranked-stats-streak-text[_ngcontent-%COMP%]{font-size:1em!important}.ranked-stats-streak--cross[_ngcontent-%COMP%]{position:absolute;top:25%;left:50%;height:4px;width:35px;display:flex;border-radius:50%;animation:_ngcontent-%COMP%_cross-animation .5s cubic-bezier(1,0,0,1) forwards;transform-origin:center right}.ranked-stats-streak--cross-inner[_ngcontent-%COMP%]{border-radius:50%;margin:auto;height:2px;width:100%}@keyframes _ngcontent-%COMP%_cross-animation{0%{transform:rotate(-15deg) translate(-50%,-120%) scale(0)}to{transform:rotate(-15deg) translate(-50%,-120%) scale(1)}}"],changeDetection:0}),n})();function d0t(t,n){1&t&&B(0,"div",4)}const p0t=t=>({isWinner:t});let $be=(()=>{var t;class n{constructor(e,i){this.eventsService=e,this.cdr=i,this.hasUsername=!0,this.messagePosition=HC.EMessagePosition.Top,this.onMessageReceived=r=>{r.userId===this.user.id&&this.showMessage(r)}}ngOnInit(){this.eventsService.addEventListener(_i.IngameMessage,this.onMessageReceived)}ngOnDestroy(){this.eventsService.removeEventListener(_i.IngameMessage,this.onMessageReceived)}showMessage(e){this.message=e,this.baloon.showMessage(e),this.cdr.detectChanges()}showMessageEnd(){this.message=null,this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(nd),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["game-summary-avatar"]],viewQuery:function(e,i){if(1&e&&$e(HC,5),2&e){let r;je(r=He())&&(i.baloon=r.first)}},inputs:{user:"user",isLink:"isLink",hasUsername:"hasUsername",isWinner:"isWinner",messagePosition:"messagePosition"},decls:4,vars:9,consts:[[1,"game-summary-avatar__wrapper",3,"ngClass"],["class","ranked-team-stats__container-rays",4,"ngIf"],[1,"game-summary-avatar--cmp",3,"user","isLink","hasUsername"],[1,"game-summary-avatar__message-baloon",3,"ngClass","messagePosition","end"],[1,"ranked-team-stats__container-rays"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,d0t,1,0,"div",1),B(2,"avatar",2),p(3,"game-summary-message-baloon",3),Y("end",function(){return i.showMessageEnd()}),m()()),2&e&&(l("ngClass",ne(7,p0t,i.isWinner)),d(),l("ngIf",i.isWinner),d(),l("user",i.user)("isLink",i.isLink)("hasUsername",i.hasUsername),d(),l("ngClass",i.messagePosition)("messagePosition",i.messagePosition))},dependencies:[Xe,Ne,Bo,HC],styles:['@keyframes _ngcontent-%COMP%_tada{0%{transform:scaleZ(1)}10%,20%{transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{transform:scaleZ(1)}}[_nghost-%COMP%]{display:block;width:100%;height:100%}.game-summary-avatar--cmp[_ngcontent-%COMP%], .game-summary-avatar__wrapper[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.game-summary-avatar__wrapper.isWinner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_tada 2s linear infinite}.ranked-team-stats__container-rays[_ngcontent-%COMP%]{position:absolute;display:flex;flex-flow:row;justify-content:center;top:-35%;left:-35%;width:170%;height:170%;overflow:hidden}.ranked-team-stats__container-rays[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:center}.game-summary-avatar__message-baloon[_ngcontent-%COMP%]{z-index:1;position:absolute;left:calc(100% + 20px);display:flex;top:0;transform:translateY(-50%)}.game-summary-avatar__message-baloon.bottom[_ngcontent-%COMP%]{top:100%;transform:translateY(-50%)}'],changeDetection:0}),n})();function h0t(t,n){1&t&&(p(0,"p",2),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TOURNAMENTS.PROMO.INFO_POPUP.WINNERS")))}function m0t(t,n){1&t&&(p(0,"p",2),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TEXT.LOSERS")))}const f0t=t=>({isFirst:t});function g0t(t,n){if(1&t&&(p(0,"div",14),B(1,"game-summary-avatar",15),m()),2&t){const o=n.$implicit,e=n.first,i=_();l("ngClass",ne(6,f0t,e)),d(),l("isWinner",i.isWinner)("isLink",!o.player.isBot)("hasUsername",!0)("user",o.platformProfile)("messagePosition",e?i.EMessagePosition.Top:i.EMessagePosition.Bottom)}}function _0t(t,n){if(1&t&&B(0,"ranked-stats-rating",16),2&t){const o=n.$implicit,e=n.index,i=_();l("deltaAnimationDelay",i.animationDelay+.3*e)("oldRating",null==i.gameResult.gameSummary.oldRankedStats[o.player.id]?null:i.gameResult.gameSummary.oldRankedStats[o.player.id].elo)("newRating",null==i.gameResult.gameSummary.newRankedStats[o.player.id]?null:i.gameResult.gameSummary.newRankedStats[o.player.id].elo)}}function v0t(t,n){if(1&t&&B(0,"ranked-stats-streak",17),2&t){const o=n.$implicit,e=_();l("oldStreak",null==e.gameResult.gameSummary.oldRankedStats[o.player.id]?null:e.gameResult.gameSummary.oldRankedStats[o.player.id].currentWinStreak)("newStreak",null==e.gameResult.gameSummary.newRankedStats[o.player.id]?null:e.gameResult.gameSummary.newRankedStats[o.player.id].currentWinStreak)}}function b0t(t,n){1&t&&B(0,"div",18)}function C0t(t,n){1&t&&B(0,"div",19)}const y0t=t=>({winners:t});let Kbe=(()=>{var t;class n{constructor(){this.animationDelay=0,this.EMessagePosition=HC.EMessagePosition}trackByPlayerFn(e,i){return i.platformProfile.id}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-team-stats-box"]],hostAttrs:[1,"ranked-team-stats-box"],inputs:{isWinner:"isWinner",team:"team",score:"score",gameResult:"gameResult",animationDelay:"animationDelay"},decls:28,vars:25,consts:[[1,"ranked-team-stats-box-title-bar",3,"ngClass"],["class","ranked-team-stats-box-title-bar-text",4,"ngIf"],[1,"ranked-team-stats-box-title-bar-text"],[3,"ngTemplateOutlet"],[1,"ranked-team-stats-box-avatars","ranked-stats-element","isFirst"],["class","ranked-team-stats-box-avatar--wrapper",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ranked-team-stats-box-result","ranked-stats-element"],[1,"ranked-team-stats-box-result-text",3,"value"],[1,"ranked-team-stats-box-rating","ranked-stats-element"],["class","ranked-team-stats-box-rating-text",3,"deltaAnimationDelay","oldRating","newRating",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ranked-team-stats-box-streak","ranked-stats-element","isLast"],["class","ranked-team-stats-box-streak-text",3,"oldStreak","newStreak",4,"ngFor","ngForOf","ngForTrackBy"],["verticalDelimiter",""],["horizontalDelimiter",""],[1,"ranked-team-stats-box-avatar--wrapper",3,"ngClass"],[1,"ranked-team-stats-box-avatar",3,"isWinner","isLink","hasUsername","user","messagePosition"],[1,"ranked-team-stats-box-rating-text",3,"deltaAnimationDelay","oldRating","newRating"],[1,"ranked-team-stats-box-streak-text",3,"oldStreak","newStreak"],[1,"ranked-team-stats-box-delimiter"],[1,"ranked-team-stats-box-delimiter-horizontal"]],template:function(e,i){if(1&e&&(p(0,"div",0),U(1,h0t,3,3,"p",1)(2,m0t,3,3,"p",1),p(3,"p",2),H(4),V(5,"translate"),m(),p(6,"p",2),H(7),V(8,"translate"),m(),p(9,"p",2),H(10),V(11,"translate"),m()(),Un(12,3),p(13,"div",4),U(14,g0t,2,8,"div",5),m(),Un(15,3),p(16,"div",6),B(17,"number",7),m(),Un(18,3),p(19,"div",8),U(20,_0t,1,3,"ranked-stats-rating",9),m(),Un(21,3),p(22,"div",10),U(23,v0t,1,2,"ranked-stats-streak",11),m(),U(24,b0t,1,0,"ng-template",null,12,ft)(26,C0t,1,0,"ng-template",null,13,ft)),2&e){const r=Kt(25),s=Kt(27);l("ngClass",ne(23,y0t,i.isWinner)),d(),l("ngIf",i.isWinner),d(),l("ngIf",!i.isWinner),d(2),se($(5,17,"GAME_HISTORY.RESULT")),d(3),se($(8,19,"RANKED_GAMES.RATING")),d(3),se($(11,21,"RANKED_GAMES.STREAK")),d(2),l("ngTemplateOutlet",s),d(2),l("ngForOf",i.team)("ngForTrackBy",i.trackByPlayerFn),d(),l("ngTemplateOutlet",r),d(2),l("value",i.gameResult.gameStats.playerPoints[i.team[0].player.id]),d(),l("ngTemplateOutlet",r),d(2),l("ngForOf",i.team)("ngForTrackBy",i.trackByPlayerFn),d(),l("ngTemplateOutlet",r),d(2),l("ngForOf",i.team)("ngForTrackBy",i.trackByPlayerFn)}},dependencies:[Xe,Mt,Ne,qr,Qr,yj,Wbe,$be,qe],styles:['@keyframes _ngcontent-%COMP%_tada{0%{transform:scaleZ(1)}10%,20%{transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{transform:scaleZ(1)}}.ranked-team-stats-box-avatars[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-evenly}.ranked-team-stats-box-avatar--wrapper[_ngcontent-%COMP%]{width:100%;height:auto;padding-top:1rem;position:relative;z-index:1}.ranked-team-stats-box-avatar--wrapper.isFirst[_ngcontent-%COMP%]{padding-top:0}.ranked-team-stats-box-avatar[_ngcontent-%COMP%]{display:block}.ranked-team-stats-box-result[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.ranked-team-stats-box-rating[_ngcontent-%COMP%], .ranked-team-stats-box-streak[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-evenly;align-items:center}.ranked-stats-element.isFirst[_ngcontent-%COMP%]{padding-left:0}.ranked-stats-element.isLast[_ngcontent-%COMP%]{padding-right:0}.ranked-team-stats-box-title-bar[_ngcontent-%COMP%]{width:100%;display:flex;height:3rem;flex-flow:row nowrap;justify-content:space-between}.ranked-team-stats-box-title-bar-text[_ngcontent-%COMP%]{width:20%;text-align:center}.ranked-team-stats__container-rays[_ngcontent-%COMP%]{position:absolute;display:flex;flex-flow:row;justify-content:center;top:-35%;left:-35%;width:170%;height:170%;overflow:hidden}.ranked-team-stats__container-rays[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:center}'],changeDetection:0}),n})();function S0t(t,n){if(1&t&&B(0,"ranked-team-stats-box",3),2&t){const o=n.$implicit,e=n.index,i=_();l("isWinner",o[0].isWinner())("gameResult",i.gameResult)("animationDelay",i.getAnimationDelay(e))("team",o)}}let Zbe=(()=>{var t;class n{constructor(){this.rematchClick=new ke}trackByFn(e,i){return e}getAnimationDelay(e){return.3*this.otherTeams.slice(0,e+1).reduce((i,r,s)=>i+r.length,0)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-team-stats"]],inputs:{isWinner:"isWinner",myTeam:"myTeam",myTeamScore:"myTeamScore",otherTeams:"otherTeams",otherTeamsScore:"otherTeamsScore",gameResult:"gameResult"},outputs:{rematchClick:"rematchClick"},decls:3,vars:6,consts:[[1,"ranked-team-stats--wrapper"],[3,"isWinner","gameResult","team","animationDelay"],["class","ranked-team-stats-other",3,"isWinner","gameResult","animationDelay","team",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ranked-team-stats-other",3,"isWinner","gameResult","animationDelay","team"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"ranked-team-stats-box",1),U(2,S0t,1,4,"ranked-team-stats-box",2),m()),2&e&&(d(),l("isWinner",i.myTeam[0].isWinner())("gameResult",i.gameResult)("team",i.myTeam)("animationDelay",0),d(),l("ngForOf",i.otherTeams)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Kbe],styles:['.ranked-team-stats__container--game-stats[_ngcontent-%COMP%]{margin:1rem 0;width:100%;min-height:15rem}.team-stats__container--scores[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;flex-flow:row wrap;justify-content:space-around}.team-stats__container--players[_ngcontent-%COMP%]{width:100%;height:15rem;display:flex;flex-flow:row wrap;justify-content:space-around}.team-stats__container--players.rematch-disabled[_ngcontent-%COMP%]{height:9rem}.team-stats__container--player[_ngcontent-%COMP%]{height:100%;flex:1;display:flex;flex-flow:column nowrap}.team-stats__container--player.no-replay[_ngcontent-%COMP%]{justify-content:center;align-items:center}.team-stats__container--avatar[_ngcontent-%COMP%]{position:relative;width:100%;height:9rem;display:flex;justify-content:center;align-items:center}.team-stats__container--avatar.replay[_ngcontent-%COMP%]{animation:zoomInAndOut 1s linear forwards}.team-stats__container--avatar.won[_ngcontent-%COMP%]   .team-stats__avatar[_ngcontent-%COMP%]{animation:tada 2s linear infinite}.team-stats__avatar[_ngcontent-%COMP%]{width:8rem;height:8rem;z-index:2}@media only screen and (max-width: 480px){.team-stats__avatar[_ngcontent-%COMP%]{width:7rem;height:7rem}}@media only screen and (max-width: 380px){.team-stats__avatar[_ngcontent-%COMP%]{width:6rem;height:6rem}}.team-stats__container--replay-arrow[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.team-stats__container--replay[_ngcontent-%COMP%]{position:relative;width:100%;height:6rem;display:flex;justify-content:center;align-items:center;z-index:2}.team-stats__container--replay.replay[_ngcontent-%COMP%]   .circle-arrow[_ngcontent-%COMP%]{animation:spinReplay .5s linear}.team-stats__container--replay.hasLeft[_ngcontent-%COMP%]{animation:zoomInAndOut .5s linear}.team-stats__button--replay[_ngcontent-%COMP%]{width:calc(100% - 1rem);margin:auto .5rem;z-index:1}.team-stats__text--replay-btn[_ngcontent-%COMP%]{text-decoration:none;font-size:1.4rem}.team-stats__text--replay-btn.fivePlusPlayers[_ngcontent-%COMP%]{font-size:1rem}@media only screen and (max-width: 480px){.team-stats__text--replay-btn[_ngcontent-%COMP%]{font-size:1rem}}@media only screen and (max-width: 360px){.team-stats__text--replay-btn[_ngcontent-%COMP%]{font-size:.8rem}}.team-stats__container--other-teams[_ngcontent-%COMP%]{height:100%;flex:1;display:flex}.team-stats__container--other-teams.more-than-one[_ngcontent-%COMP%]{width:auto;flex:2}.team-stats__container--other-teams.more-than-one[_ngcontent-%COMP%]   .team-stats__container--player[_ngcontent-%COMP%]{width:auto!important;flex:1}.team-stats__container--other-teams[_ngcontent-%COMP%]:not(.more-than-one)   .team-stats__container--player[_ngcontent-%COMP%]{width:100%!important}.team-stats__container--score-wrapper[_ngcontent-%COMP%]{height:100%;flex:1;display:flex;overflow:hidden}.team-stats__container--score-wrapper[_ngcontent-%COMP%]   .team-stats__container--score[_ngcontent-%COMP%]{width:100%!important}.team-stats__container--score[_ngcontent-%COMP%]{height:100%;flex:1;display:flex;justify-content:center;align-items:center;z-index:2}.team-stats__container-rays[_ngcontent-%COMP%]{position:absolute;display:flex;flex-flow:row;justify-content:center;top:-35%;left:-35%;width:170%;height:170%;overflow:hidden}.team-stats__container-rays[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:center}.team-stats__result-text[_ngcontent-%COMP%]{white-space:nowrap}@media only screen and (max-width: 980px){.team-stats__result-text[_ngcontent-%COMP%]{font-size:1.2rem}.team-stats__result-text[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:1.2rem!important}}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%]{font-size:1.1rem}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:1.1rem!important}@media only screen and (max-width: 440px){.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%]{font-size:1rem}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:1rem!important}}@media only screen and (max-width: 380px){.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%]{font-size:.8rem}.team-stats__result-text.fivePlusPlayers[_ngcontent-%COMP%] > number[_ngcontent-%COMP%]{font-size:.8rem!important}}.ranked-team-stats-other[_ngcontent-%COMP%]{margin-top:1rem}'],changeDetection:0}),n})();const w0t=["arrow"];function T0t(t,n){1&t&&Un(0)}function P0t(t,n){1&t&&(B(0,"img",6,7),V(2,"transformUrl"),B(3,"img",6,7),V(5,"transformUrl"),B(6,"img",6,7),V(8,"transformUrl"),B(9,"img",6,7),V(11,"transformUrl"),B(12,"img",6,7),V(14,"transformUrl"),B(15,"img",6,7),V(17,"transformUrl"),B(18,"img",6,7),V(20,"transformUrl"),B(21,"img",6,7),V(23,"transformUrl"),B(24,"img",6,7),V(26,"transformUrl"),B(27,"img",6,7),V(29,"transformUrl"),B(30,"img",6,7),V(32,"transformUrl"),B(33,"img",6,7),V(35,"transformUrl"),B(36,"img",6,7),V(38,"transformUrl"),B(39,"img",6,7),V(41,"transformUrl"),B(42,"img",6,7),V(44,"transformUrl"),B(45,"img",6,7),V(47,"transformUrl"),B(48,"img",6,7),V(50,"transformUrl"),B(51,"img",6,7),V(53,"transformUrl"),B(54,"img",6,7),V(56,"transformUrl"),B(57,"img",6,7),V(59,"transformUrl"),B(60,"img",6,7),V(62,"transformUrl"),B(63,"img",6,7),V(65,"transformUrl"),B(66,"img",6,7),V(68,"transformUrl"),B(69,"img",6,7),V(71,"transformUrl"),B(72,"img",6,7),V(74,"transformUrl")),2&t&&(l("src",$(2,25,"arrow.png"),Wn),d(3),l("src",$(5,27,"arrow.png"),Wn),d(3),l("src",$(8,29,"arrow.png"),Wn),d(3),l("src",$(11,31,"arrow.png"),Wn),d(3),l("src",$(14,33,"arrow.png"),Wn),d(3),l("src",$(17,35,"arrow.png"),Wn),d(3),l("src",$(20,37,"arrow.png"),Wn),d(3),l("src",$(23,39,"arrow.png"),Wn),d(3),l("src",$(26,41,"arrow.png"),Wn),d(3),l("src",$(29,43,"arrow.png"),Wn),d(3),l("src",$(32,45,"arrow.png"),Wn),d(3),l("src",$(35,47,"arrow.png"),Wn),d(3),l("src",$(38,49,"arrow.png"),Wn),d(3),l("src",$(41,51,"arrow.png"),Wn),d(3),l("src",$(44,53,"arrow.png"),Wn),d(3),l("src",$(47,55,"arrow.png"),Wn),d(3),l("src",$(50,57,"arrow.png"),Wn),d(3),l("src",$(53,59,"arrow.png"),Wn),d(3),l("src",$(56,61,"arrow.png"),Wn),d(3),l("src",$(59,63,"arrow.png"),Wn),d(3),l("src",$(62,65,"arrow.png"),Wn),d(3),l("src",$(65,67,"arrow.png"),Wn),d(3),l("src",$(68,69,"arrow.png"),Wn),d(3),l("src",$(71,71,"arrow.png"),Wn),d(3),l("src",$(74,73,"arrow.png"),Wn))}let Qbe=(()=>{var t;class n{ngOnChanges(){this.isWinner=this.newRating&&this.newRating>this.oldRating,this.isWinner&&(this.raf=requestAnimationFrame(()=>{this.playAnimation()}))}ngOnDestroy(){cancelAnimationFrame(this.raf)}playAnimation(){const e=Math.round(this.arrows.length/2);this.arrows.toArray().slice(0,e).forEach((i,r,s)=>{let a="".concat((0,ie.randomFloat)(20,80),"%");const c=(0,ie.randomFloat)(.3,2),u=(0,ie.randomFloat)(.3,2),h=(0,ie.randomFloat)(.4,.8);Uc.fromTo(i.nativeElement,h,{translateY:"0%",left:a},{repeatDelay:u,delay:c,keyframes:[{opacity:0,left:a,translateY:"0%"},{opacity:1,left:a,translateY:"-25px"},{opacity:0,left:a,translateY:"-50px"}]});const b=r+e;if(b>=s.length)return;const w=this.arrows.get(b);let R="".concat((0,ie.randomFloat)(20,80),"%");Uc.fromTo(w.nativeElement,h,{translateY:"0%",left:R},{repeatDelay:u,delay:c,keyframes:[{opacity:0,left:R,translateY:"0%"},{opacity:1,left:R,translateY:"-25px"},{opacity:0,left:R,translateY:"-50px"}]})})}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-stats-rating-container"]],viewQuery:function(e,i){if(1&e&&$e(w0t,5),2&e){let r;je(r=He())&&(i.arrows=r)}},hostAttrs:[1,"ranked-stats-rating-container"],inputs:{oldRating:"oldRating",newRating:"newRating"},features:[it],decls:9,vars:9,consts:[[1,"ranked-stats-rating-container__rating--wrapper"],[1,"ranked-stats-rating-container__rating--label",3,"customClass"],[1,"ranked-stats-rating-container__rating--label-text"],[1,"ranked-stats-rating-container__rating",3,"oldRating","newRating","hideDeltaOnAnimationEnd"],[4,"ngIf","ngIfThen"],["arrows",""],[1,"ranked-stats-rating-container__rating--arrow",3,"src"],["arrow",""]],template:function(e,i){if(1&e&&(p(0,"div",0)(1,"item-label-component",1)(2,"p",2),H(3),V(4,"translate"),m()(),B(5,"ranked-stats-rating",3),U(6,T0t,1,0,"ng-container",4)(7,P0t,75,75,"ng-template",null,5,ft),m()),2&e){const r=Kt(8);d(),l("customClass","ranked-stats-rating-container__rating--label-cclas"),d(2),se($(4,7,"RANKED_GAMES.RATING")),d(2),l("oldRating",i.oldRating)("newRating",i.newRating)("hideDeltaOnAnimationEnd",!1),d(),l("ngIf",i.isWinner)("ngIfThen",r)}},dependencies:[Ne,Ym,yj,qe,uo],styles:["[_nghost-%COMP%]{display:block;align-items:center;justify-content:center;width:100%}.ranked-stats-rating-container__rating--wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;text-align:center;padding:2rem 1rem 1rem}.ranked-stats-rating-container__rating--label[_ngcontent-%COMP%]{position:absolute;top:5%;left:50%;transform:translate(-50%,-70%);font-size:1.5rem;font-weight:700}.ranked-stats-rating-container__rating--arrow[_ngcontent-%COMP%]{position:absolute;width:10px;bottom:0;transform:translateY(0);opacity:0}"],changeDetection:0}),n})();const I0t=["timer"];function M0t(t,n){if(1&t){const o=Ce();p(0,"team-stats",20),Y("rematchClick",function(){return oe(o),re(_(3).rematchClick())}),m()}if(2&t){const o=_(3);l("myTeam",o.myTeam())("otherTeams",o.otherTeams())("myTeamScore",o.myTeamScore())("otherTeamsScore",o.otherTeamsScore())("isRematchEnabled",o.isRematchEnabled())("isRematchCancelled",o.isRematchCancelled())("isWinner",o.isWinner())("isSpectator",o.gameSummaryViewModel.isSpectator)("myUserId",o.user.profile.id)("rematch",o.gameSummaryViewModel.rematch)("replayBtnLoadingStatus",o.gameSummaryViewModel.buttons.rematch.loading)}}function O0t(t,n){if(1&t&&B(0,"ranked-team-stats",21),2&t){const o=_(3);l("myTeam",o.myTeam())("otherTeams",o.otherTeams())("myTeamScore",o.myTeamScore())("otherTeamsScore",o.otherTeamsScore())("gameResult",null==o.gameSummaryViewModel.endedTable?null:o.gameSummaryViewModel.endedTable.gameResult)("isWinner",o.isWinner())}}function E0t(t,n){1&t&&(p(0,"div",22)(1,"p",23),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"SHARE_NOTIFICATIONS.GameWon.default")))}function x0t(t,n){if(1&t&&B(0,"ranked-stats-rating-container",24),2&t){const o=_(3);l("oldRating",null==o.gameSummaryViewModel.endedTable||null==o.gameSummaryViewModel.endedTable.gameResult.gameSummary.oldRankedStats[o.user.profile.id]?null:o.gameSummaryViewModel.endedTable.gameResult.gameSummary.oldRankedStats[o.user.profile.id].elo)("newRating",null==o.gameSummaryViewModel.endedTable||null==o.gameSummaryViewModel.endedTable.gameResult.gameSummary.newRankedStats[o.user.profile.id]?null:o.gameSummaryViewModel.endedTable.gameResult.gameSummary.newRankedStats[o.user.profile.id].elo)}}function A0t(t,n){if(1&t){const o=Ce();p(0,"rewarded-video-in-game-box",25),Y("playVideo",function(){return oe(o),re(_(3).playVideo())}),m()}if(2&t){const o=_(3);l("maxReward",o.gameSummaryViewModel.rewardedVideo.getMaxReward())("isDisabled",o.rewardedVideo)}}function R0t(t,n){if(1&t){const o=Ce();p(0,"player-stats",26),Y("onStarsClick",function(i){return oe(o),re(_(3).onStarsClick(i))})("sendFriendRequest",function(i){return oe(o),re(_(3).sendFriendRequest(i))}),m()}2&t&&l("statsViewModels",_(3).statsBoxes)}function k0t(t,n){if(1&t&&(p(0,"div",13),U(1,M0t,1,11,"team-stats",14)(2,O0t,1,6,"ranked-team-stats",15)(3,E0t,4,3,"div",16)(4,x0t,1,2,"ranked-stats-rating-container",17)(5,A0t,1,2,"rewarded-video-in-game-box",18)(6,R0t,1,1,"player-stats",19),m()),2&t){const o=_(2);d(),l("ngIf",!(null!=o.gameSummaryViewModel.roomModel&&o.gameSummaryViewModel.roomModel.settings.competitive)),d(),l("ngIf",null==o.gameSummaryViewModel.roomModel?null:o.gameSummaryViewModel.roomModel.settings.competitive),d(),l("ngIf",!o.gameSummaryViewModel.isSpectator&&!(null!=o.gameSummaryViewModel.roomModel&&o.gameSummaryViewModel.roomModel.settings.competitive)&&o.isWinner()),d(),l("ngIf",null==o.gameSummaryViewModel.roomModel?null:o.gameSummaryViewModel.roomModel.settings.competitive),d(),l("ngIf",o.gameSummaryViewModel.rewardedVideo.isReady&&o.gameSummaryViewModel.rewardedVideo.video&&o.gameSummaryViewModel.rewardedVideo.video.isReady&&!o.gameSummaryViewModel.rewardedVideo.isBonusClaimed&&!o.gameSummaryViewModel.buttons.rematch.loading&&!o.gameSummaryViewModel.rematch.isRequestedByCurrentPlayer),d(),l("ngIf",!o.gameSummaryViewModel.isSpectator&&o.statsBoxes)}}const s2=t=>({name:t});function L0t(t,n){if(1&t){const o=Ce();p(0,"div",27)(1,"button-icon",28),Y("onClick",function(){return oe(o),re(_(2).openPhrases())}),m()()}if(2&t){const o=_(2);d(),l("icon",ne(2,s2,o.buttons.phrases.icon))("buttonModifier",o.buttons.phrases.modifier)}}function D0t(t,n){if(1&t){const o=Ce();p(0,"div",29)(1,"button-icon",30),Y("onClick",function(){return oe(o),re(_(2).openEmojis())}),m()()}if(2&t){const o=_(2);d(),l("icon",ne(2,s2,o.buttons.emojis.icon))("buttonModifier",o.buttons.emojis.modifier)}}function B0t(t,n){if(1&t){const o=Ce();p(0,"div",31)(1,"button-icon-text",32),Y("onClick",function(){return oe(o),re(_(2).findNewGame())}),p(2,"span",10),H(3),V(4,"translate"),m()()()}if(2&t){const o=_(2);d(),l("icon",ne(7,s2,o.buttons.findNewGame.icon))("buttonModifier",o.buttons.findNewGame.modifier)("loading",o.gameSummaryViewModel.buttons.findNewGame.loading)("disabled",!o.isRematchEnabled()&&o.gameSummaryViewModel.rematch.isRequestedByCurrentPlayer),d(2),se($(4,5,"GAME_SUMMARY.FIND_NEW"))}}function N0t(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),ze("",$(2,1,o.gameSummaryViewModel.rematch.isStarting?"GAME_SUMMARY.REMATCH_STARTING":"GAME_SUMMARY.TIME_FOR_REMATCH"),": ")}}function F0t(t,n){if(1&t){const o=Ce();p(0,"div",33),U(1,N0t,3,3,"p",34),p(2,"timer",35,36),Y("onCountdownFinished",function(){return oe(o),re(_(2).onTimerExpire())}),m()()}if(2&t){const o=_(2);d(),l("ngIf",o.isRematchEnabled()&&!o.gameSummaryViewModel.isSpectator),d(),l("milliseconds",o.gameSummaryViewModel.rematchTimer.gameSummaryTimeout)("styleObject",o.timerStyleConfig)}}const U0t=t=>({spectator:t}),G0t=t=>({"solo-button":t});function V0t(t,n){if(1&t){const o=Ce();p(0,"popup-container",2),Y("closePopup",function(){return oe(o),re(_().onBackdropClick())}),U(1,k0t,7,6,"div",3),p(2,"div",4)(3,"div",5),U(4,L0t,2,4,"div",6)(5,D0t,2,4,"div",7),p(6,"div",8)(7,"button-icon-text",9),Y("onClick",function(){return oe(o),re(_().onHomeClick())}),p(8,"span",10),H(9),V(10,"translate"),m()()(),U(11,B0t,5,9,"div",11),m(),U(12,F0t,4,3,"div",12),m()()}if(2&t){const o=_();l("popupContainerOpened",o.gameSummaryViewModel&&o.gameSummaryViewModel.isOpened)("popupContainerOptions",o.popupContainerOptions)("raysAnimationOn",!0),d(),l("ngIf",o.gameSummaryViewModel.isOpened),d(3),l("ngIf",!o.gameSummaryViewModel.isSpectator&&o.showPhrases()),d(),l("ngIf",!o.gameSummaryViewModel.isSpectator&&o.showEmojis()),d(),l("ngClass",ne(17,U0t,o.gameSummaryViewModel.isSpectator)),d(),l("ngClass",ne(19,G0t,o.gameSummaryViewModel.isSpectator||!o.showFindNew()))("icon",ne(21,s2,o.buttons.home.icon))("buttonModifier",o.buttons.home.modifier)("loading",o.gameSummaryViewModel.buttons.home.loading)("disabled",o.gameSummaryViewModel.rematch.hasDelayTimerExpired&&!o.gameSummaryViewModel.isSpectator),d(2),se($(10,15,"BUTTON.LEAVE")),d(2),l("ngIf",!o.gameSummaryViewModel.isSpectator&&o.showFindNew()),d(),l("ngIf",!o.gameSummaryViewModel.rematch.hasTimerExpired&&void 0!==o.gameSummaryViewModel.rematchTimer.gameSummaryTimeout)}}function z0t(t,n){1&t&&B(0,"fireworks",37)}let Ybe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.gameSummaryService=e,this.store=i,this.cdr=r,this.sounds=s,this.toaster=a,this.gamesState=c,this.time=u,this.phrases=new ke,this.emojis=new ke,this.backdropClick=new ke,this.buttons={home:{icon:ve.EIcons.HOME,modifier:ve.EButtonModifier.BUTTON_NEGATIVE},findNewGame:{icon:ve.EIcons.NEW_MATCH,modifier:ve.EButtonModifier.BUTTON_ATTENTION},phrases:{icon:ve.EIcons.GLOBAL_CHAT,modifier:ve.EButtonModifier.BUTTON_ACTION},emojis:{icon:ve.EIcons.ICON_EMOJI,modifier:ve.EButtonModifier.BUTTON_ACTION}},this.subscriptions=new is.List,this.onViewModelUpdate=h=>{var b;this.gameSummaryViewModel=h,(null===(b=this.gameSummaryViewModel)||void 0===b||null===(b=b.roomModel)||void 0===b||null===(b=b.settings)||void 0===b||null===(b=b.players)||void 0===b?void 0:b.count)>4&&(this.popupContainerOptions.styleProperties={...this.popupContainerOptions.styleProperties,maxWidth:"50rem"}),this.cdr.detectChanges()},this.onRewardedVideoUpdate=h=>{this.rewardedVideo=h,this.cdr.detectChanges()},this.onTimerStatusUpdate=h=>{h?this.startTimer(this.gameSummaryViewModel.rematchTimer.gameSummaryTimeout):this.stopTimer(),this.cdr.detectChanges()},this.handleError=h=>{h instanceof et.StateError?this.toaster.warn("PLEASE_WAIT"):h instanceof lt.NetworkError?this.toaster.error("ERRORS.CONNECTION_ERROR"):this.toaster.warn("ERRORS.SOMETHING_WRONG"),console.warn(h)},this.popupContainerOptions={closeDisabled:!1,disableBackdrop:!0,customComponentCssClass:"game-summary__popup",componentZIndex:"999",styleProperties:{maxWidth:"45rem",height:"auto",maxHeight:"90%",display:"flex",flexFlow:"column nowrap"}},this.timerStyleConfig={fontSize:"1.4rem",color:"#fffff"}}ngOnInit(){this.gameSummaryService.init(this.gamesState.getCurrentGameState().id),this.user=this.store.selectUserState(),this.subscriptions.add(this.store.gameSummary.subscribeState().subscribe(this.onViewModelUpdate)),this.subscriptions.add(this.store.ads.subscribeRewardedVideo({id:rc.GameSummary}).subscribe(this.onRewardedVideoUpdate)),this.subscriptions.add(this.store.gameSummary.subscribeTimerRunningStatus().subscribe(this.onTimerStatusUpdate)),this.subscriptions.add(this.store.gameSummary.subscribeIsOpened().subscribe(e=>{e?this.onOpen():this.onClose()})),this.subscriptions.add(wp([this.store.gameSummary.subscribeXp(),this.store.gameSummary.subscribePlayersList(),this.store.gameSummary.subscribeReward(),this.store.gameSummary.subscribeBalance()]).subscribe(([e,i,r,s])=>{var a;const c=i.filter(h=>h.canBeRated());this.statsBoxes={xp:e.xp?e:void 0,balance:!s||null!==(a=this.gameSummaryViewModel.roomModel)&&void 0!==a&&a.settings.competitive?void 0:{wallet:s,rewards:r},rate:c.length?{rateablePlayers:c}:void 0}}))}ngOnDestroy(){this.ratePlayers(),this.subscriptions.forEach(e=>e.unsubscribe())}rematchClick(){this.gameSummaryService.rematch().catch(this.handleError)}onHomeClick(){this.gameSummaryService.leaveGame().catch(this.handleError)}onStarsClick(e){this.playerRated={playerId:e.user.player.id,rating:e.rating}}ratePlayers(){var e=this;return f(function*(){if(e.playerRated)try{const i={playerId:e.playerRated.playerId,rating:e.playerRated.rating};e.playerRated=void 0,yield e.gameSummaryService.ratePlayer(i.playerId,i.rating)}catch(i){console.warn(i)}})()}sendFriendRequest(e){this.gameSummaryService.sendFriendRequest(e)}onTimerExpire(){this.gameSummaryService.onTimerExpire().catch(e=>console.log(e))}playVideo(){this.gameSummaryService.playVideo().catch(e=>{e instanceof lt.NetworkError?this.toaster.error("ERRORS.CONNECTION_ERROR"):e instanceof Bp?this.toaster.error("BONUS.NO_VIDEOS"):e instanceof Np?this.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):e instanceof zm||(e instanceof Fp?this.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):this.toaster.warn("ERRORS.SOMETHING_WRONG")),console.warn("Failed admob video, error callback response:",e)}).finally(()=>{})}findNewGame(){this.gameSummaryService.findNewGame().catch(this.handleError)}showEmojis(){var e;return null===(e=this.gameSummaryViewModel.roomModel)||void 0===e?void 0:e.settings.game.enableEmojiAfterGame}showPhrases(){var e;return null===(e=this.gameSummaryViewModel.roomModel)||void 0===e?void 0:e.settings.game.enableEmojiAfterGame}showFindNew(){var e;const i=this.gamesState.getCurrentGameRelatedConfig().matchmaking.pools.find(r=>{var s;return r.id===(null===(s=this.gameSummaryViewModel)||void 0===s||null===(s=s.roomModel)||void 0===s?void 0:s.poolId)});if(null!=i&&null!==(e=i.activeHours)&&void 0!==e&&e.length){const r=this.time.getServerTimeS(),s=i.activeHours.some(a=>a.from<=r&&r<=a.to-60);return this.store.gameSummary.selectShowFindNew()&&s}return this.store.gameSummary.selectShowFindNew()}isRematchEnabled(){return this.store.gameSummary.selectIsRematchEnabled()}isWinner(){return this.store.gameSummary.selectIsWinner()}myTeam(){return this.store.gameSummary.selectMyTeam()}otherTeams(){return this.store.gameSummary.selectOtherTeams()}myTeamScore(){return this.store.gameSummary.selectMyTeamScore()}otherTeamsScore(){return this.store.gameSummary.selectOtherTeamsScore()}isRematchCancelled(){return this.store.gameSummary.selectIsRematchCancelled()}openPhrases(){this.phrases.emit()}openEmojis(){this.emojis.emit()}onBackdropClick(){this.backdropClick.emit()}onOpen(){if(!this.gameSummaryViewModel.isSpectator){const e=this.store.gameSummary.selectIsWinner();this.sounds.play(e?dn.GameWon:dn.GameLost)}}onClose(){this.ratePlayers()}startTimer(e){this.timer&&(this.timer.stop(),this.timer.start(e))}stopTimer(){this.timer&&this.timer.stop()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bj),g(J),g(Re),g(Mo),g(Dt),g(Zn),g(Bn))},t.\u0275cmp=pe({type:t,selectors:[["game-summary"]],viewQuery:function(e,i){if(1&e&&$e(I0t,5),2&e){let r;je(r=He())&&(i.timer=r.first)}},outputs:{phrases:"phrases",emojis:"emojis",backdropClick:"backdropClick"},features:[mn([bj])],decls:2,vars:2,consts:[[3,"popupContainerOpened","popupContainerOptions","raysAnimationOn","closePopup",4,"ngIf"],["class","game-summary__fireworks",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","raysAnimationOn","closePopup"],["class","game-summary__container--content",4,"ngIf"],[1,"game-summary__container--footer"],[1,"game-summary__container--buttons"],["class","game-summary__container--phrases",4,"ngIf"],["class","game-summary__container--emojis",4,"ngIf"],[1,"game-summary__container--to-lobby-button",3,"ngClass"],[1,"game-summary__button--bottom","text-icon","home",3,"ngClass","icon","buttonModifier","loading","disabled","onClick"],[1,"game-summary__text--button"],["class","game-summary__container--find-new-button",4,"ngIf"],["class","game-summary__container--timer",4,"ngIf"],[1,"game-summary__container--content"],[3,"myTeam","otherTeams","myTeamScore","otherTeamsScore","isRematchEnabled","isRematchCancelled","isWinner","isSpectator","myUserId","rematch","replayBtnLoadingStatus","rematchClick",4,"ngIf"],["class","game-summary__ranked-team-stats",3,"myTeam","otherTeams","myTeamScore","otherTeamsScore","gameResult","isWinner",4,"ngIf"],["class","game-summary__container--team-won",4,"ngIf"],["class","game-summary__container--rating",3,"oldRating","newRating",4,"ngIf"],[3,"maxReward","isDisabled","playVideo",4,"ngIf"],[3,"statsViewModels","onStarsClick","sendFriendRequest",4,"ngIf"],[3,"myTeam","otherTeams","myTeamScore","otherTeamsScore","isRematchEnabled","isRematchCancelled","isWinner","isSpectator","myUserId","rematch","replayBtnLoadingStatus","rematchClick"],[1,"game-summary__ranked-team-stats",3,"myTeam","otherTeams","myTeamScore","otherTeamsScore","gameResult","isWinner"],[1,"game-summary__container--team-won"],[1,"game-summary__text--won"],[1,"game-summary__container--rating",3,"oldRating","newRating"],[3,"maxReward","isDisabled","playVideo"],[3,"statsViewModels","onStarsClick","sendFriendRequest"],[1,"game-summary__container--phrases"],[1,"game-summary__button--bottom","text-icon","phrases",3,"icon","buttonModifier","onClick"],[1,"game-summary__container--emojis"],[1,"game-summary__button--bottom","text-icon","emojis",3,"icon","buttonModifier","onClick"],[1,"game-summary__container--find-new-button"],[1,"game-summary__button--bottom","text-icon","find-new",3,"icon","buttonModifier","loading","disabled","onClick"],[1,"game-summary__container--timer"],[4,"ngIf"],[1,"timer",3,"milliseconds","styleObject","onCountdownFinished"],["timer",""],[1,"game-summary__fireworks"]],template:function(e,i){1&e&&U(0,V0t,13,23,"popup-container",0)(1,z0t,1,0,"fireworks",1),2&e&&(l("ngIf",i.gameSummaryViewModel&&i.gameSummaryViewModel.isOpened),d(),l("ngIf",i.gameSummaryViewModel.isOpened&&i.isWinner()&&!i.gameSummaryViewModel.isSpectator))},dependencies:[Xe,Ne,Fs,ei,so,Wi,NL,Fbe,Ube,jbe,Zbe,Qbe,qe],styles:[".game-summary__container--content[_ngcontent-%COMP%]{width:100%;height:calc(100% - 8rem);border-radius:0 0 .4rem .4rem;padding:0 1rem;display:flex;flex-flow:column nowrap;overflow-y:auto;overflow-x:hidden}.game-summary__container--footer[_ngcontent-%COMP%]{width:100%;display:block;flex-flow:column nowrap}.game-summary__container--buttons[_ngcontent-%COMP%]{width:100%;justify-content:space-between;display:flex;flex-flow:row wrap}.game-summary__container--phrases[_ngcontent-%COMP%], .game-summary__container--emojis[_ngcontent-%COMP%]{display:flex;justify-content:center;width:49%;padding:0 1rem 1rem}.game-summary__container--find-new-button[_ngcontent-%COMP%], .game-summary__container--to-lobby-button[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.game-summary__button--bottom[_ngcontent-%COMP%]{width:100%;height:4rem}.game-summary__button--bottom.home[_ngcontent-%COMP%]{padding:0 .5rem 0 1rem}.game-summary__button--bottom.home.solo-button[_ngcontent-%COMP%]{padding:0 1rem}.game-summary__button--bottom.find-new[_ngcontent-%COMP%]{padding:0 1rem 0 .5rem}.game-summary__button--bottom.text-icon[_ngcontent-%COMP%]{min-width:9rem!important}.game-summary__container--find-new-button[_ngcontent-%COMP%]{flex:2}.game-summary__container--timer[_ngcontent-%COMP%]{width:100%;height:3rem;display:flex;justify-content:center;align-items:center;white-space:pre}.timer[_ngcontent-%COMP%]{display:flex}.game-summary__text--button[_ngcontent-%COMP%]{text-transform:uppercase}.game-summary__fireworks[_ngcontent-%COMP%]{position:absolute;top:0;left:0}@keyframes _ngcontent-%COMP%_spinReplay{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.game-summary__container--team-won[_ngcontent-%COMP%]{margin-bottom:1rem;width:100%}.game-summary__text--won[_ngcontent-%COMP%]{width:100%;height:8rem;display:flex;justify-content:center;align-items:center;font-size:1.8rem}.game-summary__congrats[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;font-size:2.4rem;padding:.5rem 0}.game-summary__container-congrats--content[_ngcontent-%COMP%]{padding:2rem 0}.game-summary__ranked-team-stats[_ngcontent-%COMP%]{padding:1rem 0}"]}),n})();function j0t(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se(yt(2,1,o.title.key,o.title.params))}}const H0t=t=>({"emoji-items__container--item":t});function q0t(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"div",7),Y("click",function(){const r=oe(o).$implicit;return re(_().selectItem(r))}),B(2,"img",8),m()()}if(2&t){const o=n.$implicit,e=_();d(),l("ngClass",ne(2,H0t,o.type===e.EEmojiType.Special)),d(),l("imgSrc",o.url)}}let Jbe=(()=>{var t;class n{constructor(e){this.onEmojiSelect=new ke,this.EEmojiType=y0,this.onEmojiSelect=new ke,this.urlService=e}selectItem(e){this.onEmojiSelect.emit(e)}trackByFn(e){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii))},t.\u0275cmp=pe({type:t,selectors:[["emojis-container"]],inputs:{items:"items",title:"title"},outputs:{onEmojiSelect:"onEmojiSelect"},decls:6,vars:3,consts:[[1,"emoji-items__wrapper"],[1,"emoji-tems__contaner--title"],[4,"ngIf"],[1,"emoji-items__container-emoji"],[1,"emoji-items__list"],["class","emoji-items__constainer-list",4,"ngFor","ngForOf","ngForTrackBy"],[1,"emoji-items__constainer-list"],[1,"emoji-items__container--item--default",3,"ngClass","click"],["empty-placeholder","",3,"imgSrc"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),U(2,j0t,3,4,"p",2),m(),p(3,"div",3)(4,"div",4),U(5,q0t,3,4,"div",5),m()()()),2&e&&(d(2),l("ngIf",i.title),d(3),l("ngForOf",i.items)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Ne,$o,qe],styles:[".emoji-items__container-emoji[_ngcontent-%COMP%], .emoji-tems__contaner--title[_ngcontent-%COMP%]{position:relative}.emoji-tems__contaner--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-align:center;padding:.5rem}.emoji-items__list[_ngcontent-%COMP%]{flex-flow:row wrap;display:flex;align-items:center;text-decoration:none}.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:8.33%!important}@media screen and (max-width: 1024px){.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%]{width:10%!important}}@media screen and (max-width: 768px){.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%]{width:16.66%!important}}@media screen and (max-width: 768px) and (orientation: landscape){.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%]{width:10%!important}}.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%] > .emoji-items__container--item--default[_ngcontent-%COMP%]{flex-flow:row wrap;display:flex;align-items:center;justify-content:center;width:90%;height:90%;cursor:pointer;padding:.5rem;margin:.5rem}@media only screen and (max-width: 768px){.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%] > .emoji-items__container--item--default[_ngcontent-%COMP%]{margin:.3rem}}.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%] > .emoji-items__container--item--default[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:100%;max-width:6.2rem}.emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%] > .emoji-items__container--item--default[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]:hover, .emoji-items__list[_ngcontent-%COMP%] > .emoji-items__constainer-list[_ngcontent-%COMP%] > .emoji-items__container--item--default[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]:active{transform:scale(1.05)}"],changeDetection:0}),n})();const W0t=()=>({key:"GAME.RECENTLY_USED_EMOJIS"});function $0t(t,n){if(1&t){const o=Ce();p(0,"div",2)(1,"emojis-container",3),Y("onEmojiSelect",function(i){return oe(o),re(_().select(i))}),m()()}if(2&t){const o=_();d(),l("title",pt(2,W0t))("items",o.recentlyUsedEmojis)}}const K0t=()=>({key:"GAME.SPECIAL_EMOJIS"});function Z0t(t,n){if(1&t){const o=Ce();p(0,"div",2)(1,"emojis-container",3),Y("onEmojiSelect",function(i){return oe(o),re(_().select(i))}),m()()}if(2&t){const o=_();d(),l("title",pt(2,K0t))("items",o.specialEmojis)}}function Q0t(t,n){if(1&t){const o=Ce();p(0,"div",2)(1,"emojis-container",4),Y("onEmojiSelect",function(i){return oe(o),re(_().select(i))}),m()()}if(2&t){const o=_();d(),l("items",o.emoticons)}}let Xbe=(()=>{var t;class n{constructor(e,i,r,s){this.changeDetectorRef=e,this.emoticonsService=i,this.analyticsTrackingService=r,this.urlService=s,this.onListItemSelect=new ke,this.recentlyUsedEmojis=[],this.specialEmojis=[],this.popupTitleTypes=li,this.changeDetectorRef.detach()}ngOnInit(){this.emoticons=this.emoticonsService.getDefaultEmojis(),this.specialEmojis=this.emoticonsService.getSpecialEmojis(),this.recentlyUsedEmojis=this.emoticonsService.getRecentlyUsedEmojis(),this.changeDetectorRef.detectChanges()}select(e){this.emoticonsService.addNewItemRecentlyUsedEmoji(e),this.onListItemSelect.emit({type:ec.Emoteicon,id:e.spritesheet,payload:this.createEmojiMessagePayload(e)}),this.analyticsTrackingService.sendEvent({category:Nn.Game,type:"emoji_sent",args:{label:e.id}}),this.recentlyUsedEmojis=this.emoticonsService.getRecentlyUsedEmojis(),this.changeDetectorRef.detectChanges()}emoticonsTrackBy(e,i){return e}createEmojiMessagePayload(e){var i;let r;if(null!==(i=e.config)&&void 0!==i&&i.voiceOver){const s={};p5()(e.config.voiceOver.languages).forEach(a=>{s[a.id]={id:a.id,path:e.type===y0.Default?a.path:this.urlService.createCdnPath({url:a.path})}}),r={formats:e.config.voiceOver.formats,languages:s}}return{url:e.url,spritesheet:e.spritesheet,voiceOver:r}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(S0),g(yi),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["emoticons-list"]],outputs:{onListItemSelect:"onListItemSelect"},decls:4,vars:3,consts:[[1,"emoticons-drawer__container--items"],["class","emoticons-drawer__container--inventory-items",4,"ngIf"],[1,"emoticons-drawer__container--inventory-items"],[3,"title","items","onEmojiSelect"],[3,"items","onEmojiSelect"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,$0t,2,3,"div",1)(2,Z0t,2,3,"div",1)(3,Q0t,2,1,"div",1),m()),2&e&&(d(),l("ngIf",i.recentlyUsedEmojis.length>0),d(),l("ngIf",i.specialEmojis.length>0),d(),l("ngIf",i.emoticons.length>0))},dependencies:[Ne,Jbe],styles:["[_nghost-%COMP%]{height:100%}.emoticons-drawer__container--items[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;height:100%;margin:0 2rem}@media only screen and (max-width: 768px){.emoticons-drawer__container--items[_ngcontent-%COMP%]{margin:0}}"],changeDetection:0}),n})();var Y0t=ve.EIcons;function J0t(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se(yt(2,1,o.title.key,o.title.params))}}function X0t(t,n){1&t&&B(0,"icon-component",9),2&t&&l("icon",_(2).IconNames.CROWN)}function e1t(t,n){if(1&t){const o=Ce();p(0,"div",5)(1,"div",6),Y("click",function(){const r=oe(o).$implicit;return re(_().selectItem(r))}),p(2,"p"),H(3),m()(),p(4,"div",7),U(5,X0t,1,1,"icon-component",8),m()()}if(2&t){const o=n.$implicit,e=_();d(),LQ("",o.type===e.EPhraseType.Default?"custom-phrases__container--item-default":"custom-phrases__container--item-special","\n         ",o.isVip?"vip":"non-vip"," ",e.isVip?"player-vip":"player-non-vip",""),d(2),se(o.message),d(2),l("ngIf",o.isVip&&!e.isVip)}}let eCe=(()=>{var t;class n{constructor(){this.onPhraseSelect=new ke,this.EPhraseType=Hh,this.IconNames=Y0t}selectItem(e){this.onPhraseSelect.emit(e)}trackByFn(e){return e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["phrases-container"]],inputs:{items:"items",isVip:"isVip",title:"title"},outputs:{onPhraseSelect:"onPhraseSelect"},decls:5,vars:3,consts:[[1,"custom-phrases-container__wrapper"],[1,"custom-phrases__container--title"],[4,"ngIf"],[1,"custom-phrases__list"],["class","custom-phrases__constainer-list","click-feedback","",4,"ngFor","ngForOf","ngForTrackBy"],["click-feedback","",1,"custom-phrases__constainer-list"],[3,"click"],[1,"phrases__vip-crown__container"],["class","phrases__vip-crown",3,"icon",4,"ngIf"],[1,"phrases__vip-crown",3,"icon"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),U(2,J0t,3,4,"p",2),m(),p(3,"div",3),U(4,e1t,6,7,"div",4),m()()),2&e&&(d(2),l("ngIf",i.title),d(2),l("ngForOf",i.items)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Ne,Dn,po,qe],styles:[".custom-phrases__container--title[_ngcontent-%COMP%]{position:relative}.custom-phrases__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-align:center;padding:.5rem}.emoji-items__container-emoji[_ngcontent-%COMP%]{position:relative}.custom-phrases__list[_ngcontent-%COMP%]{position:relative;flex-flow:row wrap;display:flex;flex:1 1 auto;align-items:center;text-decoration:none;padding:.5rem 2rem}@media screen and (max-width: 480px){.custom-phrases__list[_ngcontent-%COMP%]{padding:1rem}}@media screen and (max-height: 560px){.custom-phrases__list[_ngcontent-%COMP%]{bottom:0}}.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-special[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex:1 1 auto;font-size:2rem;font-weight:400;padding:.5rem;margin:.5rem;cursor:pointer;text-align:center}@media only screen and (max-width: 480px){.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-special[_ngcontent-%COMP%]{padding:1rem;font-size:1.4rem}}@media screen and (max-width: 680px) and (orientation: landscape){.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-special[_ngcontent-%COMP%]{flex:1 0 auto}}.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-special[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;font-weight:600}.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-special[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:hover, .custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-special[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:active{transform:scale(1.05)}.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-default[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex:1 1 auto;font-size:2rem;font-weight:400;padding:1rem;margin:.5rem;cursor:pointer;text-align:center}@media only screen and (max-width: 480px){.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-default[_ngcontent-%COMP%]{padding:1rem;font-size:1.4rem}}@media screen and (max-width: 680px) and (orientation: landscape){.custom-phrases__list[_ngcontent-%COMP%] > .custom-phrases__constainer-list[_ngcontent-%COMP%] > .custom-phrases__container--item-default[_ngcontent-%COMP%]{flex:1 0 auto}}"],changeDetection:0}),n})();const t1t=()=>({key:"GAME.RECENTLY_USED_PHRASES"});function n1t(t,n){if(1&t){const o=Ce();p(0,"div")(1,"phrases-container",2),Y("onPhraseSelect",function(i){return oe(o),re(_().select(i))}),m()()}if(2&t){const o=_();d(),l("isVip",o.isVip)("items",o.recentlyUsedPhrases)("title",pt(3,t1t))}}const i1t=()=>({key:"GAME.SPECIAL_PHRASES"});function o1t(t,n){if(1&t){const o=Ce();p(0,"div")(1,"phrases-container",2),Y("onPhraseSelect",function(i){return oe(o),re(_().select(i))}),m()()}if(2&t){const o=_();d(),l("isVip",o.isVip)("items",o.specialPhrases)("title",pt(3,i1t))}}function r1t(t,n){if(1&t){const o=Ce();p(0,"div")(1,"phrases-container",3),Y("onPhraseSelect",function(i){return oe(o),re(_().select(i))}),m()()}if(2&t){const o=_();d(),l("isVip",o.isVip)("items",o.allPhrases)}}let tCe=(()=>{var t;class n{constructor(e,i,r,s){this.analyticsTrackingService=r,this.urlService=s,this.popupTitleTypes=li,this.onListItemSelect=new ke,this.isVip=e.selectIsVip(),this.phrasesService=i}ngOnInit(){this.allPhrases=this.phrasesService.getDefaultPhrases(),this.specialPhrases=this.phrasesService.getSpecialPhrases(),this.recentlyUsedPhrases=this.phrasesService.getRecentlyUsedPhrases()}select(e){if(!this.isVip&&e.isVip)return;this.phrasesService.addNewPhraseToRecentlyUsed(e),this.recentlyUsedPhrases=this.phrasesService.getRecentlyUsedPhrases();const i=this.createPhraseMessagePayload(e);this.onListItemSelect.emit({type:ec.Phrase,id:e.id,payload:i});const r={category:Nn.Game,type:"phrase_sent",args:{label:"".concat(e.id," ").concat(i.vip)}};this.analyticsTrackingService.sendEvent(r)}phrasesTrackBy(e,i){return i.id}createPhraseMessagePayload(e){var i;let r;if(null!==(i=e.config)&&void 0!==i&&i.voiceOver){const s={};p5()(e.config.voiceOver.languages).forEach(a=>{s[a.id]={id:a.id,path:this.urlService.createCdnPath({url:a.path})}}),r={formats:e.config.voiceOver.formats,languages:s}}return{voiceOver:r,vip:e.isVip?EU.Vip:EU.NonVip,key:e.key}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(C0),g(yi),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["phrases-list"]],outputs:{onListItemSelect:"onListItemSelect"},decls:4,vars:3,consts:[[1,"phrases-drawer__container--items"],[4,"ngIf"],[3,"isVip","items","title","onPhraseSelect"],[3,"isVip","items","onPhraseSelect"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,n1t,2,4,"div",1)(2,o1t,2,4,"div",1)(3,r1t,2,2,"div",1),m()),2&e&&(d(),l("ngIf",i.recentlyUsedPhrases.length>0),d(),l("ngIf",i.specialPhrases.length>0),d(),l("ngIf",i.allPhrases.length>0))},dependencies:[Ne,eCe],styles:["[_nghost-%COMP%]{height:100%}.phrases-drawer__container--items[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;height:100%;margin:0 2rem}@media only screen and (max-width: 768px){.phrases-drawer__container--items[_ngcontent-%COMP%]{margin:0}}"],changeDetection:0}),n})();var s1t=ve.EButtonModifier;function a1t(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",7),Y("select",function(){const r=oe(o).$implicit;return re(_().openTab(r.id,!0))}),p(1,"button-icon-text",8),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit,e=_();ni("",o.id," button-icon-tab"),l("tabId",o.id),d(),ni("",o.id," gift-shop-drawer-button-icon-tab"),l("bclass","gift-shop-drawer-button-icon-tab__bclass "+(e.giftsTabsTypes[e.openedTab]===o.id?"gift-shop-drawer-button-icon-tab__selected":""))("icon",o.icon)("flatButton",!0),d(),ze(" ",$(3,11,"GIFTS_SHOP."+o.id)," ")}}function c1t(t,n){if(1&t){const o=Ce();p(0,"div",9)(1,"gifts-tab",10),Y("giftSent",function(i){return oe(o),re(_().giftSentHandler(i))}),m()()}if(2&t){const o=_();d(),l("isInGame",!0)("tabId",o.openedTab)("receiverIds",o.receiverIds)("receiverUsernames",o.receiverUsernames)}}function l1t(t,n){if(1&t){const o=Ce();p(0,"div",9)(1,"gifts-tab",10),Y("giftSent",function(i){return oe(o),re(_().giftSentHandler(i))}),m()()}if(2&t){const o=_();d(),l("isInGame",!0)("tabId",o.openedTab)("receiverIds",o.receiverIds)("receiverUsernames",o.receiverUsernames)}}const Sj=t=>({"one-tab":t});let nCe=(()=>{var t;class n extends mve{constructor(e,i,r,s){super(e,i,r,s),this.popupTitleTypes=li,this.buttonModifier=s1t,this.changeDetRef=s,this.giftSentEvent=new ke}ngOnChanges(){this.fetchConfig(),this.receiversData=this.giftsData,this.excludeTabs(this.giftsData),this.giftsData&&this.openTab(this.defaultOpenTab)}handleGesture(e){let i=0;switch(b_()(this.tabsToShow,(r,s)=>(Ll[r.id]===this.openedTab&&(i=s),Ll[r.id]===this.openedTab)),e){case sa.Right:if(0===i)return;this.openTab(this.tabsToShow[i-1].id,!0);break;case sa.Left:if(i===this.tabsToShow.length-1)return;this.openTab(this.tabsToShow[i+1].id,!0)}}giftSentHandler(e){this.giftSentEvent.emit(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(hf),g(Yt),g(Mo),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["gifts-shop-drawer"]],inputs:{giftsData:"giftsData"},outputs:{giftSentEvent:"giftSentEvent"},features:[Ht,it],decls:8,vars:16,consts:[[1,"gifts-shop-drawer__wrapper"],["swipe-directive","",1,"gifts-shop-drawer__container--content",3,"ngClass","swipeAction"],[1,"tab-switch",3,"ngClass"],[1,"gift-shop-drawer_top--tabs",3,"initialOpenedTab","showBackButton","scrollStyleCustomClass","scrollBarCustomClass"],[3,"tabId","class","select",4,"ngFor","ngForOf"],[1,"content-gifts",3,"ngClass"],["class","content-wrapper",4,"ngIf"],[3,"tabId","select"],[3,"bclass","icon","flatButton"],[1,"content-wrapper"],[3,"isInGame","tabId","receiverIds","receiverUsernames","giftSent"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),Y("swipeAction",function(s){return i.handleGesture(s)}),p(2,"div",2)(3,"top-tabs",3),U(4,a1t,4,13,"top-tab-item",4),m()(),p(5,"div",5),U(6,c1t,2,4,"div",6)(7,l1t,2,4,"div",6),m()()()),2&e&&(d(),l("ngClass",ne(10,Sj,i.tabsToShow.length<=1)),d(),l("ngClass",ne(12,Sj,i.tabsToShow.length<=1)),d(),l("initialOpenedTab",i.giftsTabsTypes[i.openedTab])("showBackButton",!1)("scrollStyleCustomClass","gift-shop-drawer__top-tabs__scroll")("scrollBarCustomClass","gift-shop-drawer__top-tabs__scrollbar"),d(),l("ngForOf",i.tabsToShow),d(),l("ngClass",ne(14,Sj,i.tabsToShow.length<=1)),d(),l("ngIf",i.openedTab===i.giftsTabsTypes.GIFTS),d(),l("ngIf",i.openedTab===i.giftsTabsTypes.GIFTALL))},dependencies:[Xe,Mt,Ne,kl,dl,TL,so,wu,qe],styles:[".gifts-shop-drawer__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:0!important}.gifts-shop-drawer__container--top-bar[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;order:1;width:100%;height:5rem!important;z-index:1}@media only screen and (max-width: 768px){.gifts-shop-drawer__container--top-bar[_ngcontent-%COMP%]{height:3rem!important}}.gifts-shop-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.gifts-shop-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem}@media only screen and (max-width: 768px){.gifts-shop-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]{display:block;padding:.2rem;order:2;width:100%;height:calc(100% - 6rem)}@media only screen and (max-width: 768px){.gifts-shop-drawer__container--content[_ngcontent-%COMP%]{height:calc(100% - 3rem)}}.gifts-shop-drawer__container--content.one-tab[_ngcontent-%COMP%]{height:calc(100% - 1rem)!important}@media only screen and (max-width: 768px){.gifts-shop-drawer__container--content.one-tab[_ngcontent-%COMP%]{height:calc(100% - 1rem)}}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]{display:flex;justify-content:center;order:1;width:90%;height:4rem;max-width:80rem;margin:0 auto}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .tab-switch.one-tab[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 768px){.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]{height:3rem}}@media only screen and (max-width: 480px){.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]{width:100%}}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:50%;height:100%}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .tab-switch[_ngcontent-%COMP%]   .button-icon-tab[_ngcontent-%COMP%]{width:100%}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .content-gifts[_ngcontent-%COMP%]{order:2;width:100%;height:100%;height:calc(100% - 1rem);margin-top:1rem}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .content-gifts.one-tab[_ngcontent-%COMP%]{height:100%}.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .content-gifts[_ngcontent-%COMP%]   .content-wrapper[_ngcontent-%COMP%]{height:100%;margin:1rem 1rem 0;width:calc(100% - 2rem)}@media only screen and (min-width: 768px){.gifts-shop-drawer__container--content[_ngcontent-%COMP%]   .content-gifts[_ngcontent-%COMP%]   .content-wrapper[_ngcontent-%COMP%]{padding:2rem 2rem 0}}"]}),n})();function u1t(t,n){if(1&t&&(Tn(0),B(1,"avatar",9),p(2,"p",10),H(3),m(),Pn()),2&t){const o=_().$implicit;d(),l("user",o.profile)("hasUsername",!1),d(2),se(o.profile.username.currentUsername)}}function d1t(t,n){1&t&&(Tn(0),p(1,"p",5),H(2),V(3,"translate"),m(),Pn()),2&t&&(d(2),se($(3,1,"GAME.MIC_ENABLED")))}const p1t=t=>({disabledOption:t});function h1t(t,n){if(1&t){const o=Ce();p(0,"div",3)(1,"div",4),U(2,u1t,4,3,"ng-container",1)(3,d1t,4,3,"ng-container",1),m(),p(4,"toggle-button",8),Y("stateChange",function(i){const s=oe(o).$implicit;return re(_(3).handleStateChanged({state:i,id:s.profile.id}))}),m()()}if(2&t){const o=n.$implicit,e=_(3);d(2),l("ngIf",o&&o.profile.id!==e.myUserId),d(),l("ngIf",o&&o.profile.id===e.myUserId),d(),l("ngClass",ne(4,p1t,!o.presentInChannel))("state",!o.muted)}}function m1t(t,n){if(1&t&&(Tn(0),U(1,h1t,5,6,"div",7),Pn()),2&t){const o=_(2);d(),l("ngForOf",o.playerArray)}}function f1t(t,n){if(1&t){const o=Ce();Tn(0),p(1,"div",3)(2,"div",4)(3,"p",5),H(4),V(5,"translate"),m()(),p(6,"toggle-button",6),Y("stateChange",function(i){return oe(o),re(_().handleVoiceChatStateChange({state:i,id:"voiceChatEnabledState"}))}),m()(),U(7,m1t,2,1,"ng-container",1),Pn()}if(2&t){const o=_();d(4),se($(5,3,"GAME.VOICE_CHAT_ENABLED")),d(2),l("state",o.voiceChatEnabled),d(),l("ngIf",o.voiceChatEnabled&&o.muteActionAllowed)}}function g1t(t,n){1&t&&B(0,"loader-image",11)}let iCe=(()=>{var t;class n{constructor(e,i){this.store=e,this.cdr=i,this.muteActionAllowed=!0,this.voiceChatEnabled=!0,this.popupTitleTypes=li,this.playerArray=[],this.playerMuted=new ke,this.voiceChatToggle=new ke}ngOnInit(){this.myUserId=this.store.selectUserState().profile.id}ngOnChanges(e){if(this.playersVoiceMsgData){let i;this.playerArray=[];for(let r in this.playersVoiceMsgData)r!==this.store.selectUserState().profile.id?this.playerArray.push(this.playersVoiceMsgData[r]):i=this.playersVoiceMsgData[r];i&&this.playerArray.unshift(i),this.detectChanges()}}handleStateChanged(e){this.playerArray.find(i=>i.profile.id===e.id).muted=!e.state,this.playerMuted.emit(e),this.detectChanges()}handleVoiceChatStateChange(e){this.voiceChatEnabled=e.state,this.voiceChatToggle.emit(e),this.detectChanges()}detectChanges(){this.cdr.destroyed||this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Jo),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["voice-chat-drawer"]],inputs:{playersVoiceMsgData:"playersVoiceMsgData",drawerLoaderOn:"drawerLoaderOn",muteActionAllowed:"muteActionAllowed",voiceChatEnabled:"voiceChatEnabled"},outputs:{playerMuted:"playerMuted",voiceChatToggle:"voiceChatToggle"},features:[it],decls:3,vars:2,consts:[[1,"voice-chat-drawer__container--items"],[4,"ngIf"],["class","voice-chat-drawer__loader",4,"ngIf"],[1,"voice-chat-drawer__container--player-control"],[1,"voice-chat-drawer__container--player-control-info"],["lass","voice-chat-drawer__text--username"],[1,"voice-chat-drawer__toggle",3,"state","stateChange"],["class","voice-chat-drawer__container--player-control",4,"ngFor","ngForOf"],[1,"voice-chat-drawer__toggle",3,"ngClass","state","stateChange"],[1,"voice-chat-drawer__avatar",3,"user","hasUsername"],[1,"voice-chat-drawer__text--username"],[1,"voice-chat-drawer__loader"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,f1t,8,5,"ng-container",1)(2,g1t,1,0,"loader-image",2),m()),2&e&&(d(),l("ngIf",i.playersVoiceMsgData),d(),l("ngIf",i.drawerLoaderOn))},dependencies:[Xe,Mt,Ne,Bo,M0,Oi,qe],styles:[".voice-chat-drawer__container--items[_ngcontent-%COMP%]{position:relative;overflow-y:auto;overflow-x:hidden;height:100%;width:100%;display:flex;flex-flow:column nowrap;align-items:center}.voice-chat-drawer__container--player-control[_ngcontent-%COMP%]{width:88%;height:6rem;min-height:6rem;display:flex;flex-flow:row wrap;align-items:center;justify-content:space-between;margin:auto}.voice-chat-drawer__container--player-control-info[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;max-width:30rem}.voice-chat-drawer__avatar[_ngcontent-%COMP%]{width:5rem;height:5rem;margin:0 1rem}.voice-chat-drawer__text--username[_ngcontent-%COMP%]{font-size:1.4rem}.voice-chat-drawer__toggle.disabledOption[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;filter:blur(1px)}"]}),n})();function _1t(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se(yt(2,1,o.title.key,o.title.params))}}const v1t=()=>({isLink:!0,showLevel:!0});function b1t(t,n){1&t&&B(0,"avatars-list",6),2&t&&l("users",_().users)("avatarConfig",pt(2,v1t))}function C1t(t,n){1&t&&(p(0,"p",7),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TEXT.NOBODYS_WATCHING")))}let oCe=(()=>{var t;class n{constructor(e){this.users=[],this.popupTitleTypes=li,this.cdr=e,e.detach()}ngOnChanges(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["avatars-list-drawer"]],inputs:{title:"title",users:"users"},features:[it],decls:6,vars:7,consts:[[1,"avatars-list-drawer__container--top-bar-title__container",3,"popupTitleType","text","customComponentCssClass","hideCloseButton"],[1,"avatars-list-drawer__container--top-bar-title__new--design"],[4,"ngIf"],[1,"avatars-list-drawer__wrapper"],["class","avatars-list-drawer__list",3,"users","avatarConfig",4,"ngIf"],["class","avatars-list-drawer__text",4,"ngIf"],[1,"avatars-list-drawer__list",3,"users","avatarConfig"],[1,"avatars-list-drawer__text"]],template:function(e,i){1&e&&(B(0,"popup-title-bar",0),p(1,"div",1),U(2,_1t,3,4,"p",2),m(),p(3,"div",3),U(4,b1t,1,3,"avatars-list",4)(5,C1t,3,3,"p",5),m()),2&e&&(l("popupTitleType",i.popupTitleTypes.Static)("text",i.title)("customComponentCssClass","avatars-list-drawer__container--top-bar-title")("hideCloseButton",!0),d(2),l("ngIf",i.title),d(2),l("ngIf",i.users.length),d(),l("ngIf",!i.users.length))},dependencies:[Ne,Ji,NC,qe],styles:[".avatars-list-drawer__wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;width:calc(100% - 4rem);margin:2rem 2rem 0;height:calc(100% - 8rem)}@media only screen and (max-width: 768px){.avatars-list-drawer__wrapper[_ngcontent-%COMP%]{height:calc(100% - 5rem)}}@media only screen and (max-width: 480px){.avatars-list-drawer__wrapper[_ngcontent-%COMP%]{height:calc(100% - 3.5rem);margin:.5rem 2rem 0}}@media only screen and (max-height: 440px) and (max-width: 768px){.avatars-list-drawer__wrapper[_ngcontent-%COMP%]{height:calc(100% - 3.5rem);margin:.25rem 2rem 0}}.avatars-list-drawer__list[_ngcontent-%COMP%]{height:auto}.avatars-list-drawer__container--top-bar[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;width:100%;height:5rem!important;z-index:1}@media only screen and (max-width: 768px){.avatars-list-drawer__container--top-bar[_ngcontent-%COMP%]{height:3rem!important}}.avatars-list-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.avatars-list-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem}@media only screen and (max-width: 768px){.avatars-list-drawer__container--top-bar[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.avatars-list-drawer__text[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}"],changeDetection:0}),n})();var j0,rCe=wi.EOrientationMessageValue,sCe=pw.EResizeEvent,Xh=ve.EIcons,y1t=Dl.VivoxError,S1t=Dl.VivoxParticipantSpeaking,w1t=Dl.VivoxParticipantRemoved,T1t=Dl.VivoxParticipantJoined,P1t=Dl.VivoxParticipantLeft,I1t=Dl.VivoxParticipantAdded;const M1t=["bottomDrawerComponent"],O1t=["menuButtons"],E1t=["leaderboardsPopup"];function x1t(t,n){if(1&t&&(p(0,"div",14)(1,"div",15),B(2,"icon-component",16),p(3,"p",17),H(4),V(5,"translate"),m()()()),2&t){const o=_();d(2),l("icon",o.EIcons.ROTATE_DEVICE),d(2),se($(5,2,"GAME.ROTATE_DEVICE"))}}function A1t(t,n){1&t&&B(0,"loader-image",18)}function R1t(t,n){if(1&t){const o=Ce();p(0,"div",19)(1,"menu-button-game",20,21),Y("menuButtonClicked",function(i){return oe(o),re(_().handleClickTarget(i))}),m()()}if(2&t){const o=_();d(),l("drawerOpened",o.selectedDrawerTab)("tooltipArgs",o.tooltipArgs)("rightMenuButtons",o.rightMenuButtonsArray)("leftMenuButtons",o.leftMenuButtonsArray)}}const H0=t=>({"drawer-shown":t}),k1t=t=>[t],L1t=t=>({key:"LABEL.SPECTATORS",params:t});function D1t(t,n){if(1&t&&B(0,"avatars-list-drawer",22),2&t){const o=_();l("ngClass",ne(3,H0,o.selectedDrawerTab===o.drawerTabsEnum.Spectators))("title",ne(7,L1t,ne(5,k1t,o.spectators.length)))("users",o.spectators)}}const B1t=t=>({up:t});let BM=((j0=class extends cSt{constructor(n,o,e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke,Ee,ot){var ct;super(),ct=this,this.buyCurrencyService=me,this.shopService=ge,this.adsService=Me,this.exceptionTracker=Ke,this.bannerListenerService=Ee,this.destroyRef=ot,this.drawerTabsEnum=Tr,this.drawerLoaderOn=!1,this.spectators=[],this.EIcons=Xh,this.voiceChatSubscriptions=new ie.List,this.buyInSubscriptions=new ie.List,this.onConnectionLost=()=>{this.disconnectVivoxAndShowRejoinBtn();let Pt=this.rightMenuButtonsArray.find(gn=>gn.id===Tr.VivoxRejoinButton);Pt&&(Pt.disabled=!0,this.updateState({}))},this.onConnectionRestored=()=>{let Pt=this.rightMenuButtonsArray.find(gn=>gn.id===Tr.VivoxRejoinButton);Pt&&(Pt.disabled=!1,this.updateState({}))},this.onRoomUpdate=(Pt,gn)=>{const qt=this.leftMenuButtonsArray.find(Je=>Je.id===xM.Spectators);if(qt&&Pt.tables){const Je=Pt.tables.find(xn=>xn.id===this.tableViewModel.id);Je&&Je.spectators&&(this.spectators=Je.spectators.map(xn=>Lo.toPlatformProfile(xn))),Je&&qt.data.length!==this.spectators.length&&(qt.data=this.spectators,this.updateState({leftMenuButtonsArray:[...this.leftMenuButtonsArray]}))}},this.handleMyGameUpdate=Pt=>{var gn;Pt.update.state&&(Pt.update.state===Ve.ETableState.Ended?(this.closeLeavePopup(),this.updateState({showEmoticons:this.tableViewModel.settings.enableEmojiAfterGame,showPhrases:this.tableViewModel.settings.enableEmojiAfterGame})):this.updateState({showEmoticons:this.tableViewModel.settings.enableEmoji&&!this.currentRoom.isSpectating,showPhrases:this.tableViewModel.settings.enableEmoji&&!this.currentRoom.isSpectating}),this.updateState({hideMenuButtons:Pt.update.state===Ve.ETableState.Ended||(null===(gn=this.roomViewModel)||void 0===gn?void 0:gn.state)===Ve.ERoomState.Rematch}),this.tableViewModel.id!==Pt.update.id&&this.updateState({tableViewModel:this.currentRoom.currentTable.getViewModel()}))},this.onStateTransition=Pt=>{Pt.from===yn.Desync&&(Pt.to===yn.Active||Pt.to===yn.Idle)&&this.updateState({hideMenuButtons:!1})},this.sendMessage=Pt=>{console.warn("Item selected:",Pt),this.currentRoom.currentTable.sendInGameMessage(Pt),this.closeDrawer()},this.onSettingChanged=Pt=>{console.warn("Ingame setting changed",Pt),this.currentRoom.currentTable.changeInGameSettings(Pt)},this.onScreenOrientationChange=Pt=>{this.checkScreenOrientation(Pt.data)},this.onClick=Pt=>{Pt&&Pt.target&&Pt.target.tagName&&(-1!==Pt.target.tagName.toLowerCase().indexOf("canvas")||"hintOverlay"===Pt.target.id||"game-wrapper"===Pt.target.id)&&!this.preventBottomDrawerClose&&(this.closeDrawer(),this.autoDisconnectService.restartDisconnectTimeout())},this.errorHandler=Pt=>{this.exceptionTracker.captureException(null==Pt?void 0:Pt.error),this.gameService.onGameException(Pt)},this.onGuardsCheckEnd=Pt=>{!1===Pt.shouldActivate&&this.navigation.getOutletUrl()==="/".concat(Xs.gameRoute)&&(!this.currentRoom||!this.currentRoom.currentTable||this.currentRoom.currentTable.destroyed)&&(console.log("User is at the game component after route guard reject. Leave to lobby!"),this.navigation.navigate([this.constants.defaultLoggedRoute]))},this.onGameException=Pt=>{this.exceptionTracker.captureException(Pt),this.exceptionPopupId=this.popup.blocker({textParams:{translationKey:"GAME.GameException"},withRefreshButton:!0}),this.disposeVoiceChat()},this.onGameLoadTimeout=()=>{this.gameTimeoutPopupId=this.popup.blocker({textParams:{translationKey:"GAME.GAME_LOAD_ERROR"},withRefreshButton:!0}),this.disposeVoiceChat()},this.onBuyIn=(Pt,gn,qt)=>{const Je=this.buyInFactory.createBuyInCmp([gn.initialAmount],{key:"CUSTOM_GAMES.REBUY"},{offerProvider:RM.InGame,isClosable:gn.isClosable,isRebuying:!0,selectedValue:gn.initialAmount,currentStack:gn.currentStack,extraButtons:[{action:()=>this.leaveGame(),modifier:ve.EButtonModifier.BUTTON_NEGATIVE,text:{key:"BUTTON.LEAVE"}}]});this.buyInSubscriptions.add(Je.onClose.subscribe(()=>{this.buyInSubscriptions.forEach(xn=>xn.unsubscribe()),this.buyInSubscriptions=new ie.List})),this.buyInSubscriptions.add(Je.onBuyIn.subscribe(xn=>{this.buyInFactory.destroy(),qt(xn),this.buyInSubscriptions.forEach(bi=>bi.unsubscribe()),this.buyInSubscriptions=new ie.List}))},this.onOpenLeaderboard=()=>{this.roomViewModel&&this.leaderboardsPopup.openPopup(ri.EarnedChips,[va.ThisWeek,va.LastWeek],this.roomViewModel.settings.game.name)},this.onOpenHowToPlay=()=>{this.roomViewModel&&this.appService.openExternalUrl("https://".concat(this.configService.getConfig().platform.staticPagesDomain,"/").concat(this.roomViewModel.settings.game.name,"/rules/").concat(this.settingsService.getLanguage()))},this.onBuyCurrency=function(){var Pt=f(function*(gn,qt,Je,xn){if(!ct.roomViewModel)return;const bi={alwaysShowPreview:!0,title:"minislot"===qt.gameId?{key:"HIDDEN_SHOP.SPECIAL_OFFER"}:void 0,text:"remi"===qt.gameId?{key:"GAME.BUY_ITEM"}:void 0},rn=qt.currency===Jt.EInGameBuyCurrency.Chips?ln.Chips:ln.Gems;try{const vn=yield ct.buyCurrencyService.getSpecialOffer(rn,qt.amount);yield ct.shopService.openItemPopup({item:vn.item.item,receiverProfile:ct.store.selectSimpleProfile(),store:vn.store,options:bi}),Je({amount:vn.item.item.amount})}catch(vn){console.log(vn),vn instanceof lt.NetworkError?(ct.toaster.error("ERRORS.CONNECTION_ERROR"),xn({reason:Jt.EInGameBuyError.Error})):vn instanceof Wp?xn({reason:Jt.EInGameBuyError.Cancelled}):(ct.toaster.error("ERRORS.SOMETHING_WRONG"),xn({reason:Jt.EInGameBuyError.Error}))}});return function(gn,qt,Je,xn){return Pt.apply(this,arguments)}}(),this.gamesState=c,this.appState=te,this.settingsService=K,this.defaultAvatarsService=G,this.voiceChatService=R,this.popup=h,this.gameService=e,this.playClient=u.getPlayClient(c.getCurrentGameState().id),this.autoDisconnectService=o,this.navigation=i,this.appService=r,this.store=s,this.giftsShopService=a,this.toaster=b,this.configService=w,this.changeDetectorRef=n,this.constants=ee,this.buyInFactory=le,this.listeners=new ie.List,this.changeDetectorRef.detach()}ngOnInit(){this.init(),this.newRoomListener=this.playClient.stateEvents.onRoomStateTransition(n=>{this.currentRoom&&(!n.data.currentRoom||n.data.currentRoom&&n.data.currentRoom.id!==this.currentRoom.id)&&this.dispose(),!this.currentRoom&&n.data.currentRoom&&(n.data.currentRoom.state.is(Ve.ERoomState.Ready)||n.data.currentRoom.state.is(Ve.ERoomState.Rematch)||n.data.currentRoom.state.is(Ve.ERoomState.Finalize))&&this.init()}),this.appState.subscribe(co.ConnectionLost,this.onConnectionLost),this.appState.subscribe(co.ConnectionRestored,this.onConnectionRestored),this.gameService.onGameViewInitialized()}ngOnDestroy(){console.warn("Game component onDestroy"),this.newRoomListener&&this.newRoomListener.detach(),this.dispose(),this.gameService.onGameViewDestroyed()}onAppResume(){this.showVoiceMessage&&!this.voiceChatService.connected&&this.showMenuTooltip(Xh.Microphone,"GAME.VOICE_CHAT_DISCONNECTED_HINT",Tr.VivoxRejoinButton)}init(){this.currentRoom=this.playClient.activeClientModel.currentRoom,this.roomType=this.currentRoom.currentTable.getViewModel().gameInfo.roomType,this.listeners.add(this.gameService.subscribe(_i.GameException,this.onGameException)),this.listeners.add(this.gameService.subscribe(_i.GameLoadTimeout,this.onGameLoadTimeout)),window.addEventListener("error",this.errorHandler),this.attachRouterListener(),this.gameElement=window.document.getElementById("game"),this.gameElement.addEventListener("touchstart",this.onClick);const n=this.currentRoom.getViewModel(),o=this.currentRoom.currentTable.getViewModel();this.spectators=o.spectators.map(r=>Lo.toPlatformProfile(r));const e=this.configService.getGameRelatedConfig(n.settings.game.name),i=!(o.state!==Ve.ETableState.Ready&&o.state!==Ve.ETableState.Gameplay||this.gameService.gameState!==_o.Initial&&this.gameService.gameState!==_o.LoadingResources);if(i){const r=this.gameService.subscribe(_i.ClientGameStateChange,s=>{(s.current!==_o.LoadingResources||s.current!==_o.LoadingResources)&&(this.hideLoader(),r.detach())});this.listeners.add(r)}this.updateState({roomViewModel:n,tableViewModel:o,showEmoticons:o.settings.enableEmoji&&!this.currentRoom.isSpectating,showPhrases:o.settings.enableEmoji&&!this.currentRoom.isSpectating,showVoiceMessage:o.settings.enableVoiceMessaging&&this.appService.isMobileApp(),showSpectators:n.settings.spectators,showHomeButton:!0,loaderVisible:i,selectedBackground:this.gameService.getBackgroundUrl(e.gameConfig)}),this.setVoiceMessages(o),this.setGameResizing(),this.buildMenu(this.showEmoticons,this.showPhrases,this.showSpectators,this.showVoiceMessage),this.showSpectators&&this.listeners.add(this.currentRoom.onUpdate(this.onRoomUpdate)),this.openGifts=this.giftsShopService.openGiftsShopEvent.subscribe(r=>{r.shopType===E0.Drawer&&(this.updateState({giftsData:r.data}),this.handleClickTarget(Tr.Gifts))}),this.listeners.add(this.playClient.stateEvents.onMyTableUpdate(this.handleMyGameUpdate)),this.listeners.add(this.playClient.stateEvents.onStateTransition(this.onStateTransition)),this.listeners.add(this.gameService.subscribeOnOpenBuyIn(this.onBuyIn)),this.listeners.add(this.gameService.subscribeOnOpenLeaderboard(this.onOpenLeaderboard)),this.listeners.add(this.gameService.subscribeOnOpenHowToPlay(this.onOpenHowToPlay)),this.listeners.add(this.gameService.subscribeOnBuyCurrency(this.onBuyCurrency))}dispose(){this.listeners.forEach(n=>n.detach()),this.hideLoader(),this.closeLeavePopup(),this.closeGameExceptionPopup(),this.closeGameTimeoutPopup(),this.disposeVoiceChat(),this.appService.isMobileApp()&&this.appService.getMobileAppService().setOrientation(rCe.Default),window.removeEventListener("error",this.errorHandler),this.detachRouterListener(),this.appState.unsubscribe(co.ConnectionLost,this.onConnectionLost),this.appState.unsubscribe(co.ConnectionRestored,this.onConnectionRestored),this.gameResizeStrategy&&(this.gameResizeStrategy.removeEventListener(sCe.ScreenOrientationChange,this.onScreenOrientationChange),this.gameResizeStrategy.dispose()),void 0!==this.gameElement&&this.gameElement.removeEventListener("touchstart",this.onClick),this.showInterstitial(),this.openGifts&&this.openGifts.unsubscribe(),clearTimeout(this.preventDrawerCloseTimeout),this.currentRoom=void 0,this.resetState(),this.buyInSubscriptions.forEach(n=>n.unsubscribe()),this.buyInSubscriptions=new ie.List,this.buyInFactory.destroy()}handleClickTarget(n){if(n===Tr.Home)this.leaveGame();else if(n===Tr.VivoxRejoinButton){this.setVoiceMessages(this.currentRoom.currentTable.getViewModel());let o=this.rightMenuButtonsArray.find(e=>e.id===Tr.VivoxRejoinButton);o.disabled=!0,o.loading=!0}else this.toggleDrawer(n)}openPhrases(){this.toggleDrawer(Tr.Phrases)}openEmojis(){this.toggleDrawer(Tr.Emoticons)}leaveGame(n){var o=this;return f(function*(){if(o.currentRoom&&o.currentRoom.currentTable&&o.currentRoom.currentTable.state.current.stateName===Ve.ETableState.Ended)try{o.showLoader(300),o.disposeVoiceChat(),yield o.currentRoom.leaveGame()}catch(e){console.warn(e)}finally{o.hideLoader()}else o.showLeavePopup()})()}showLeavePopup(){var n=this;const o=function(){var i=f(function*(){try{n.showLoader(300),yield n.currentRoom.leaveGame()}catch(r){r instanceof et.StateError?n.toaster.warn("PLEASE_WAIT"):r instanceof lt.NetworkError?n.toaster.error("ERRORS.CONNECTION_ERROR"):n.toaster.warn("ERRORS.SOMETHING_WRONG"),console.warn("Caught error",r)}finally{n.hideLoader()}});return function(){return i.apply(this,arguments)}}();this.closeLeavePopup(),this.leavePopupId=this.askLeaveConfirmation(o,()=>{this.closeLeavePopup()})}closeLeavePopup(){this.popup.hide(this.leavePopupId)}closeGameExceptionPopup(){this.popup.hide(this.exceptionPopupId)}closeGameTimeoutPopup(){this.popup.hide(this.gameTimeoutPopupId)}askLeaveConfirmation(n,o){const e={buttons:{action:n,actionDecline:o},textParams:void 0};if(this.currentRoom.isSpectating)e.textParams={translationKey:"GAME.LEAVE_GAME_WARNING"};else switch(this.currentRoom.getViewModel().settings.type){case Jt.RoomType.BlitzTournament:e.textParams={translationKey:"TOURNAMENTS.LEAVE"};break;case Jt.RoomType.PromoTournament:e.textParams={translationKey:"TOURNAMENTS.PROMO.LEAVE_WARNING",params:[Math.abs(this.roomViewModel.settings.leaderboard.pointsPerLoss)]};break;case Jt.RoomType.Casino:case Jt.RoomType.SinglePlayer:e.textParams={translationKey:"GAME.LEAVE_GAME_WARNING"};break;default:e.textParams={translationKey:"GAME.LEAVE_GAME_STATS_WARNING"}}return this.popup.confirm(e)}toggleDrawer(n){const o=this.selectedDrawerTab,e=o&&o!==n||!o;e?(this.bottomDrawerComponent.open(),this.updateState({drawerOpened:e,selectedDrawerTab:n,preventBottomDrawerClose:n===Tr.Gifts}),n===Tr.Gifts&&(this.preventDrawerCloseTimeout=setTimeout(()=>{this.updateState({preventBottomDrawerClose:!1})},500))):this.closeDrawer()}giftSentSuccessHandler(n){n&&n[0]&&n[0].receiverId&&this.isReceiverInGame(n[0].receiverId,this.currentRoom.currentTable.getViewModel().seats)?this.sendMessage({type:ec.GiftSent,id:n[0].giftId,payload:n}):console.error("[Gift component] Gift sent handler error")}isReceiverInGame(n,o){return o.find(e=>e&&(e.player&&e.player.id===n||e.reserved&&e.reserved.id===n))}buildMenu(n,o,e,i){const r=[],s=[{id:Tr.Settings,tab:Tr.Settings,icon:Xh.CORG},{id:Tr.Home,tab:Tr.Home,icon:Xh.HOME}];n&&r.push({id:Tr.Emoticons,tab:Tr.Emoticons,icon:Xh.ICON_EMOJI}),o&&r.push({id:Tr.Phrases,tab:Tr.Phrases,icon:Xh.GLOBAL_CHAT}),e&&s.push({id:xM.Spectators,type:xM.Spectators,icon:Xh.Spectators,data:this.spectators}),this.updateState({leftMenuButtonsArray:s,rightMenuButtonsArray:r})}closeDrawer(){this.bottomDrawerComponent&&this.bottomDrawerComponent.close(),this.updateState({drawerOpened:!1,selectedDrawerTab:void 0})}setGameResizing(){const o=this.configService.getGameRelatedConfig(this.roomViewModel.settings.game.name).gameConfig.aspectRatio;if(o&&(o.portrait||o.landscape)&&(this.gameResizeStrategy=new JG(this.gameElement,o),this.bannerListenerService.shouldResizeForBannerSubject.pipe(mi(this.destroyRef),ws()).subscribe(()=>{this.gameResizeStrategy.onResize(),this.changeDetectorRef.detectChanges()}),o.hasOwnProperty("lockOrientation"))){const e=o.lockOrientation;e===cs.Portrait||e===cs.Landscape?(this.updateState({lockedOrientation:e}),this.appService.isMobileApp()?this.appService.getMobileAppService().setOrientation(this.lockedOrientation):(this.checkScreenOrientation(this.gameResizeStrategy.getCurrentOrientation()),this.gameResizeStrategy.addEventListener(sCe.ScreenOrientationChange,this.onScreenOrientationChange))):this.appService.isMobileApp()&&this.appService.getMobileAppService().setOrientation(rCe.All)}}checkScreenOrientation(n){this.updateState(this.lockedOrientation!==n?{showDeviceRotateHint:!0}:{showDeviceRotateHint:!1})}showInterstitial(){var n;(null===(n=this.playClient)||void 0===n||null===(n=n.state)||void 0===n||null===(n=n.current)||void 0===n?void 0:n.stateName)===yn.Idle&&this.adsService.showInterstitial({roomType:this.roomType,tag:Kb.GameEndInterstitial}).catch(o=>console.warn("Show interstitial on game end error",o))}attachRouterListener(){this.routerSubscription=this.navigation.events.pipe(bt(n=>n instanceof sU)).subscribe(this.onGuardsCheckEnd)}detachRouterListener(){console.log("Removing router subscription in game."),this.routerSubscription&&this.routerSubscription.unsubscribe()}updateState(n){n.selectedDrawerTab&&this.leaderboardsPopup.showPopup&&this.leaderboardsPopup.close(),super.updateState(n),this.changeDetectorRef.destroyed||(this.changeDetectorRef.detectChanges(),this.menuButtonsCmp&&this.menuButtonsCmp.changeDetRef.detectChanges())}showLoader(n=void 0){void 0!==n?this.leaveLoaderDelayId=setTimeout(()=>{this.updateState({loaderVisible:!0})},n):this.updateState({loaderVisible:!0})}hideLoader(){clearTimeout(this.leaveLoaderDelayId),this.updateState({loaderVisible:!1})}userIsSpectating(){return!!this.currentRoom&&("boolean"==typeof this.currentRoom.isSpectating?this.currentRoom.isSpectating:!!this.currentRoom.isSpectating)}showMenuTooltip(n,o,e){this.tooltipArgs={icon:n,text:o,attachedToBtn:e},this.updateState({});const i=setTimeout(()=>{this.tooltipArgs=void 0,this.updateState({}),clearTimeout(i)},5e3)}disposeVoiceChat(){this.showVoiceMessage&&(this.playersVoiceMsgData={},this.voiceChatService.leave(),this.voiceChatSubscriptions.forEach(n=>n.unsubscribe()))}setVoiceMessages(n){n.settings.enableVoiceMessaging&&this.appService.isMobileApp()&&(this.voiceChatService.join(this.currentRoom.id,this.userIsSpectating()),this.voiceChatSubscriptions.add(this.voiceChatService.events.subscribe(o=>{if(o instanceof w1t&&this.playersVoiceMsgData&&this.playersVoiceMsgData[o.id])this.playersVoiceMsgData[o.id].presentInChannel=!1,this.updateState({playersVoiceMsgData:this.playersVoiceMsgData});else if(o instanceof I1t&&this.playersVoiceMsgData&&this.playersVoiceMsgData[o.id])this.playersVoiceMsgData[o.id].presentInChannel=!0,this.updateState({playersVoiceMsgData:this.playersVoiceMsgData});else if(o instanceof S1t)this.handleSpeakingEvent(o);else if(o instanceof P1t)this.disconnectVivoxAndShowRejoinBtn();else if(o instanceof y1t)console.warn("VivoxError",o),this.handleVivoxError(o);else if(o instanceof T1t){this.currentRoom.isSpectating||this.handlePlayerMute({state:!0,id:this.store.selectUserState().profile.id});const e=this.rightMenuButtonsArray.findIndex(i=>i.id===Tr.VivoxRejoinButton);-1!==e&&(this.rightMenuButtonsArray.splice(e,1),this.updateState({})),this.rightMenuButtonsArray.find(i=>i.id===Tr.VoiceMessage)||this.updateState({rightMenuButtonsArray:this.rightMenuButtonsArray.concat([{id:Tr.VoiceMessage,tab:Tr.VoiceMessage,icon:Xh.Microphone}])}),this.drawerLoaderOn&&(this.drawerLoaderOn=!1,this.updateState({})),this.showMenuTooltip(Xh.Microphone,"GAME.VOICE_CHAT_HINT",Tr.VoiceMessage)}})),this.setPlayersVoiceData())}setPlayersVoiceData(){let n={};this.currentRoom.currentTable.getPlayers().forEach(o=>{!o.isBot&&(!this.currentRoom.isSpectating||o.id!==this.store.selectUserState().profile.id)&&(n[o.id]={profile:Lo.toPlatformProfile(o.profile),muted:!1,speaking:!1,presentInChannel:o.id===this.store.selectUserState().profile.id})}),this.updateState({playersVoiceMsgData:n,voiceChatEnabledToggleState:!0})}handleSpeakingEvent(n){if(!this.playersVoiceMsgData||!this.playersVoiceMsgData[n.id]||this.playersVoiceMsgData[n.id].speaking)return;for(let i in this.playersVoiceMsgData)this.playersVoiceMsgData[i].speaking=!1;this.playersVoiceMsgData[n.id].speaking=!0;let o=this.rightMenuButtonsArray.find(i=>i.id===Tr.VoiceMessage),e=this.defaultAvatarsService.transformAvatarUrl(this.playersVoiceMsgData[n.id].profile.avatar);e||(e=DG),o&&(o.data={backgroundImgUrl:e}),this.updateState({rightMenuButtonsArray:this.rightMenuButtonsArray})}handleVivoxError(n){switch(n.code){case YL.JoinFailed:this.disconnectVivoxAndShowRejoinBtn();break;case YL.MuteFailed:n.targetUserId&&this.playersVoiceMsgData&&this.playersVoiceMsgData[n.targetUserId]&&(this.playersVoiceMsgData[n.targetUserId].muted=!this.playersVoiceMsgData[n.targetUserId].muted,this.updateState({playersVoiceMsgData:this.playersVoiceMsgData})),this.toaster.error("GAME.PLAYER_MUTE_FAILED");break;case YL.MicToggleFailed:this.playersVoiceMsgData&&(this.playersVoiceMsgData[this.store.selectUserState().profile.id].muted=!this.playersVoiceMsgData[this.store.selectUserState().profile.id].muted,this.updateState({playersVoiceMsgData:this.playersVoiceMsgData}),this.toaster.error("GAME.PLAYER_MUTE_FAILED"))}}disconnectVivoxAndShowRejoinBtn(){if(this.showVoiceMessage){this.disposeVoiceChat(),this.closeDrawer();const n=this.rightMenuButtonsArray.findIndex(e=>e.id===Tr.VoiceMessage);-1!==n&&this.rightMenuButtonsArray.splice(n,1);let o=this.rightMenuButtonsArray.find(e=>e.id===Tr.VivoxRejoinButton);o?(o.disabled=!1,o.loading=!1,this.updateState({})):this.updateState({rightMenuButtonsArray:this.rightMenuButtonsArray.concat([{id:Tr.VivoxRejoinButton,tab:Tr.VivoxRejoinButton,icon:Xh.MICROPHONE_RELOAD}]),voiceChatEnabledToggleState:!1}),this.showMenuTooltip(Xh.Microphone,"GAME.VOICE_CHAT_DISCONNECTED_HINT",Tr.VivoxRejoinButton);for(let e in this.playersVoiceMsgData)this.playersVoiceMsgData[e].speaking=!1}}handlePlayerMute(n){n.id!==this.store.selectUserState().profile.id?this.voiceChatService.mute(n.id,!n.state,!1):this.voiceChatService.toggleMic(n.state),this.playersVoiceMsgData&&this.playersVoiceMsgData[this.store.selectUserState().profile.id]&&(this.playersVoiceMsgData[this.store.selectUserState().profile.id].muted=!1)}handleVoiceChatEnabledChanged(n){var o=this;return f(function*(){if(o.drawerLoaderOn=!0,o.updateState({}),o.voiceChatSubscriptions.forEach(e=>e.unsubscribe()),n.state)o.setVoiceMessages(o.currentRoom.currentTable.getViewModel());else{yield o.voiceChatService.leaveWithPromise();let e=setTimeout(f(function*(){o.drawerLoaderOn=!1;for(let r in o.playersVoiceMsgData)o.playersVoiceMsgData[r].speaking=!1;let i=o.rightMenuButtonsArray.find(r=>r.id===Tr.VoiceMessage);i&&(i.data={backgroundImgUrl:""}),o.updateState({}),clearTimeout(e)}),1e3)}})()}}).\u0275fac=function(n){return new(n||j0)(g(Re),g(h0),g(uR),g(Yt),g(Qt),g(J),g(hf),g(Zn),g(oo),g(Cn),g(Dt),g(Zt),g(ube),g(Rp),g(M_),g(Sa),g(tn),g(pj),g(fj),g(Jm),g(bc),g(uv),g(og),g(br))},j0.\u0275cmp=pe({type:j0,selectors:[["game"]],viewQuery:function(n,o){if(1&n&&($e(M1t,5,Sv),$e(O1t,5,uj),$e(E1t,5,mj)),2&n){let e;je(e=He())&&(o.bottomDrawerComponent=e.first),je(e=He())&&(o.menuButtonsCmp=e.first),je(e=He())&&(o.leaderboardsPopup=e.first)}},features:[mn([{provide:nn,useFactory:t=>new nn("game",t),deps:[[new jo,new zo,nn]]}]),Ht],decls:17,vars:29,consts:[[1,"game",3,"ngClass","click"],[3,"phrases","emojis","backdropClick"],["id","game-wrapper",1,"game-wrapper"],["id","game",1,"game-wrapper"],["class","game__rotate","id","hintOverlay",4,"ngIf"],["class","game__loader",4,"ngIf"],["class","menu",4,"ngIf"],["bottomDrawerComponent",""],[1,"drawer-hidden",3,"muteActionAllowed","playersVoiceMsgData","voiceChatEnabled","ngClass","drawerLoaderOn","playerMuted","voiceChatToggle"],[1,"drawer-hidden",3,"ngClass","onListItemSelect"],[1,"drawer-hidden",3,"ngClass","onSettingChanged"],[1,"drawer-hidden",3,"ngClass","giftsData","giftSentEvent"],["class","drawer-hidden",3,"ngClass","title","users",4,"ngIf"],["leaderboardsPopup",""],["id","hintOverlay",1,"game__rotate"],[1,"game__rotate--info"],[1,"game__rotate--icon",3,"icon"],[1,"game__rotate--text"],[1,"game__loader"],[1,"menu"],[3,"drawerOpened","tooltipArgs","rightMenuButtons","leftMenuButtons","menuButtonClicked"],["menuButtons",""],[1,"drawer-hidden",3,"ngClass","title","users"]],template:function(n,o){1&n&&(p(0,"section",0),Y("click",function(i){return o.onClick(i)}),p(1,"game-summary",1),Y("phrases",function(){return o.openPhrases()})("emojis",function(){return o.openEmojis()})("backdropClick",function(){return o.closeDrawer()}),m(),p(2,"div",2),B(3,"div",3),m(),U(4,x1t,6,4,"div",4)(5,A1t,1,0,"loader-image",5)(6,R1t,3,4,"div",6),m(),p(7,"bottom-drawer-component",null,7)(9,"voice-chat-drawer",8),Y("playerMuted",function(i){return o.handlePlayerMute(i)})("voiceChatToggle",function(i){return o.handleVoiceChatEnabledChanged(i)}),m(),p(10,"emoticons-list",9),Y("onListItemSelect",function(i){return o.sendMessage(i)}),m(),p(11,"phrases-list",9),Y("onListItemSelect",function(i){return o.sendMessage(i)}),m(),p(12,"settings-drawer",10),Y("onSettingChanged",function(i){return o.onSettingChanged(i)}),m(),p(13,"gifts-shop-drawer",11),Y("giftSentEvent",function(i){return o.giftSentSuccessHandler(i)}),m(),U(14,D1t,1,9,"avatars-list-drawer",12),m(),B(15,"leaderboards-popup",null,13)),2&n&&(go("background-image","url("+o.selectedBackground+")"),l("ngClass",ne(17,B1t,o.drawerOpened)),d(4),l("ngIf",!0===o.showDeviceRotateHint),d(),l("ngIf",o.loaderVisible),d(),l("ngIf",!o.hideMenuButtons),d(3),l("muteActionAllowed",!o.userIsSpectating())("playersVoiceMsgData",o.playersVoiceMsgData)("voiceChatEnabled",o.voiceChatEnabledToggleState)("ngClass",ne(19,H0,o.selectedDrawerTab===o.drawerTabsEnum.VoiceMessage&&!0===o.showVoiceMessage))("drawerLoaderOn",o.drawerLoaderOn),d(),l("ngClass",ne(21,H0,o.selectedDrawerTab===o.drawerTabsEnum.Emoticons&&!0===o.showEmoticons)),d(),l("ngClass",ne(23,H0,o.selectedDrawerTab===o.drawerTabsEnum.Phrases&&!0===o.showPhrases)),d(),l("ngClass",ne(25,H0,o.selectedDrawerTab===o.drawerTabsEnum.Settings)),d(),l("ngClass",ne(27,H0,o.selectedDrawerTab===o.drawerTabsEnum.Gifts))("giftsData",o.giftsData),d(),l("ngIf",o.selectedDrawerTab===o.drawerTabsEnum.Spectators))},dependencies:[Xe,Ne,Dn,Oi,Sv,PM,Ybe,Xbe,tCe,nCe,iCe,uj,oCe,mj,qe],styles:[".game[_ngcontent-%COMP%]{font-size:1.4rem;position:relative;overflow:hidden;display:block;width:100%;height:100%;top:0;left:0;bottom:0;right:0;transition:transform .5s ease}@media screen and (min-width: 569px){.game[_ngcontent-%COMP%]{font-size:1.6rem}}@media screen and (min-width: 1025px){.game[_ngcontent-%COMP%]{font-size:1.8rem}}@media screen and (min-width: 1367px){.game[_ngcontent-%COMP%]{font-size:2rem}}@media screen and (min-width: 1921px){.game[_ngcontent-%COMP%]{font-size:2rem}}.game.up[_ngcontent-%COMP%]{transform:translateY(-35%);transition:transform .5s ease}@media screen and (max-width: 1366px){.game.up[_ngcontent-%COMP%]{transform:translateY(-45%)}}.game[_ngcontent-%COMP%]   .menu[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;width:calc(100% - 1rem);height:auto;z-index:2;pointer-events:none}.game[_ngcontent-%COMP%]   .phrase-emoticon-container[_ngcontent-%COMP%]{position:absolute;bottom:0;width:15rem;height:5rem;right:10%}@media screen and (max-width: 680px){.game[_ngcontent-%COMP%]   .phrase-emoticon-container[_ngcontent-%COMP%]{width:11rem}}@media only screen and (max-width: 480px){.game[_ngcontent-%COMP%]   .phrase-emoticon-container[_ngcontent-%COMP%]{right:3%}}.game__loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.game-wrapper[_ngcontent-%COMP%]{position:absolute;overflow:hidden;display:block;width:100%;height:100%;top:0;left:0;bottom:0;right:0;margin:auto}.game__rotate--icon[_ngcontent-%COMP%]{display:block;margin:auto}.game__rotate--info[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:100%;transform:translate(-50%,-50%)}.game__rotate--text[_ngcontent-%COMP%]{display:block;width:100%;text-align:center;font-size:2.4rem}.drawer-shown[_ngcontent-%COMP%]{display:initial!important}.drawer-hidden[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),j0);Qe([EA(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],BM.prototype,"onAppResume",null),BM=Qe([Wo(),ue("design:paramtypes",[Re,h0,uR,Yt,Qt,J,hf,Zn,oo,Cn,Dt,Zt,ube,Rp,M_,Sa,Object,pj,fj,Jm,bc,uv,og,br])],BM);let wj=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.popupService=h,this.gaService=b,this.store=e,this.navigation=i,this.gamesPlayClient=r,this.gamesStateService=s,this.appService=a,this.constants=c,this.roomsPages=u}canActivate(e,i){var r=this;return f(function*(){if(null==r.store.selectUserState())return r.navigation.navigate([r.constants.defaultNotLoggedRoute]),r.hideSplash(),!1;const s=r.gamesStateService.getCurrentGameState();let a=r.gamesPlayClient.currentPlayClient;return s||a?(a=a||r.gamesPlayClient.getPlayClient(s.id),r.gamesStateService.setCurrentGame(a.channel),a.initialized?(r.hideSplash(),!!r.hasTable()||(r.navigation.navigate([r.constants.defaultLoggedRoute]),!1)):r.reconnectToRoom(a.channel)):(r.navigation.navigate([r.constants.defaultLoggedRoute]),r.hideSplash(),!1)})()}reconnectToRoom(e){var i=this;return f(function*(){try{const r=yield i.gamesPlayClient.connect(e),s=yield r.getPlayerState();if(!s.currentRoomId||s.gameName!==e)return i.hideSplash(),i.navigation.navigate([i.constants.defaultLoggedRoute]),!1;try{return yield r.reconnectToRoom(s),i.hideSplash(),i.hasTable()}catch(a){if(a===Ds.ServerDisconnect||a instanceof et.Timeout||a instanceof lt.RoomConnectReject)return console.log("Cannot connect to room namespace.",e),i.hideSplash(),i.navigation.navigateTo(i.roomsPages.createGameLobbyPage(e)),!1;if(a===Ds.Unknown)return i.popupService.blocker({textParams:{translationKey:"GAME.GAME_EXCEPTION_UNKNOWN"},withRefreshButton:!0,navigateToBeforeRefresh:"/game"}),i.gaService.sendException("Room nsp disconnect unknown",!0),!1}}catch(r){console.log("Connect to games namespace error",r)}return i.hideSplash(),i.navigation.navigate([i.constants.defaultLoggedRoute]),!1})()}hasTable(){const e=this.gamesPlayClient.currentPlayClient.activeClientModel.currentRoom;return void 0!==e&&void 0!==e.currentTable}hideSplash(){ll.hideLoader(),this.appService.isMobileApp()&&this.appService.getMobileAppService().hideSplash()}canDeactivate(e,i,r,s){var a=this;return f(function*(){console.warn("Navigating away from game!");const c=a.gamesPlayClient.currentPlayClient.activeClientModel.currentRoom;if(!0===a.navigation.isNavigationStoppable(s)){let u;return c&&c.currentTable&&(u=c.currentTable),u&&!u.destroyed?(e.leaveGame(s.url),Promise.resolve(!1)):Promise.resolve(!0)}return c&&(yield c.dispose()),Promise.resolve(!0)})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Yt),T(oo),T(Zn),T(Qt),T(tn),T(Xf),T(Cn),T(ng))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const qC=ki({selectId:t=>t.player.id,sortComparer:!1}),Tj={currentPlayerId:void 0,isOpened:!1,isSpectator:!1,roomModel:void 0,endedTable:void 0,rematchTable:void 0,players:qC.getInitialState(),rematch:{hasDelayTimerExpired:!1,hasTimerExpired:!1,isDeniedByPlayer:!1,isRequestedByCurrentPlayer:!1,isStarting:!1},rewardedVideo:void 0,rematchTimer:{running:!1,gameSummaryTimeout:void 0},xp:void 0,balance:void 0,levelUpRewards:void 0,buttons:{home:{loading:!1},rematch:{loading:!1},findNewGame:{loading:!1}}},N1t=Sr(Tj,de(hbe,()=>Tj),de(fbe,(t,n)=>Se(t,o=>{o.currentPlayerId=n.state.currentPlayerId,o.rewardedVideo=n.state.rewardedVideo,o.isOpened=n.state.isOpened,o.players=qC.upsertMany(n.state.players,t.players),o.endedTable=n.state.endedTable,o.rematchTable=n.state.rematchTable})),de(gbe,(t,n)=>Se(t,o=>{o.currentPlayerId=n.playerId})),de(gj,(t,n)=>Se(t,o=>{wr(o,n)})),de(_j,(t,n)=>Se(t,o=>{const e=n.players.map(i=>{const r=t.players.entities[i];return{id:i,changes:{hasLeft:n.actionMade===G0.HasLeft||r.hasLeft,wantsReplay:n.actionMade===G0.WantsReplay||r.wantsReplay}}});o.players=qC.updateMany(e,t.players),n.actionMade===G0.HasLeft&&(o.rematch.isStarting=!1,o.rematch.isDeniedByPlayer=!0,o.rematchTimer.gameSummaryTimeout=void 0,o.rematchTimer.running=!1)})),de(_be,t=>Se(t,n=>{n.buttons.rematch.loading=!0})),de(vbe,(t,n)=>Se(t,o=>{o.rematch.isRequestedByCurrentPlayer=!0,o.buttons.rematch.loading=!1,o.players=qC.updateOne({id:n.userId,changes:{wantsReplay:!0}},t.players)})),de(bbe,t=>Se(t,n=>{n.buttons.rematch.loading=!1})),de(XL,(t,n)=>Se(t,o=>{o.buttons[n.buttonId].loading=!0})),de(e2,kM,(t,n)=>Se(t,o=>{o.buttons[n.buttonId].loading=!1})),de(Cbe,(t,n)=>{const o=t.players.entities[n.playerId];return o?Se(t,e=>{e.players=qC.updateOne({id:n.playerId,changes:{actions:{...o.actions,sendFriendRequest:{loading:!0}}}},t.players)}):t}),de(ybe,Sbe,(t,n)=>{const o=t.players.entities[n.playerId];return o?Se(t,e=>{e.players=qC.updateOne({id:n.playerId,changes:{actions:{...o.actions,sendFriendRequest:{loading:!1}}}},t.players)}):t}),de(Tbe,t=>Se(t,n=>{t.rematch.isStarting?n.rematch.hasDelayTimerExpired=!0:n.rematch.hasTimerExpired=!0})),de(Pbe,(t,n)=>Se(t,o=>{o.levelUpRewards=n.reward.current})),de(Ibe,t=>Se(t,n=>{n.rematch.isStarting=!0})),de(Mbe,(t,n)=>Se(t,o=>{wr(o,{endedTable:n.table})})),de(Obe,(t,n)=>Se(t,o=>{wr(o,{rematchTable:n.table})})),de(wbe,(t,n)=>Se(t,o=>{o.rematchTimer.running=!0,o.rematchTimer.gameSummaryTimeout=n.ms})),de(Ebe,(t,n)=>Se(t,o=>{o.xp={...o.xp,...n}})),de(xbe,(t,n)=>Se(t,o=>{o.balance=n.balance})),de(mbe,t=>({...Tj,currentPlayerId:t.currentPlayerId})),de(t2,(t,n)=>Se(t,o=>{wr(o.rewardedVideo,n)}))),Bl=Ts(ku.featureKey),U1t=We(Bl,t=>t.players),a2=qC.getSelectors(U1t),G1t=We(Bl,t=>t.rematchTimer.running),aCe=We(Bl,t=>t.isOpened),cCe=We(Bl,t=>({xp:t.xp,levelRewards:t.levelUpRewards})),lCe=We(Bl,t=>!!t.endedTable&&!t.isSpectator&&t.roomModel&&t.roomModel.settings.findNewRoomEnabled&&(t.roomModel.settings.type!==Jt.RoomType.KnockoutTournament||!!t.endedTable.gameResult.winners.find(n=>n===t.currentPlayerId))),uCe=We(Bl,t=>{var n;return!!t.roomModel&&!t.isSpectator&&(null===(n=t.roomModel)||void 0===n?void 0:n.settings.rematch)}),dCe=We(Bl,a2.selectAll,(t,n)=>!!n.find(o=>o.hasLeft)),Pj=We(Bl,t=>!!t.endedTable&&(t.isSpectator||!!t.endedTable.gameResult.winners.find(n=>n===t.currentPlayerId))),Ij=We(Bl,a2.selectEntities,(t,n)=>{var o;if(!t.endedTable||null===(o=t.endedTable)||void 0===o||null===(o=o.gameResult)||void 0===o||!o.winners.length)return[];let e=t.isSpectator?t.endedTable.gameResult.winners[0]:t.currentPlayerId;return t.endedTable.gameInfo.teams.find(r=>!!r.find(s=>s===e)).map(r=>n[r])}),Mj=We(Bl,Ij,a2.selectEntities,(t,n,o)=>{var e,i;if(!t.endedTable||!n.length||null===(e=t.endedTable)||void 0===e||null===(e=e.gameResult)||void 0===e||!e.winners.length)return[];let r=n[0].player.id;return(null!==(i=t.endedTable.gameInfo.teams.filter(a=>!a.find(c=>c===r)))&&void 0!==i?i:[]).map(a=>a.map(c=>o[c]))}),pCe=We(Bl,t=>{if(!t.endedTable)return 0;let n=t.currentPlayerId;return t.isSpectator&&(n=t.endedTable.gameResult.winners[0]),t.endedTable.gameResult.gameStats.playerPoints?t.endedTable.gameResult.gameStats.playerPoints[n]:void 0}),hCe=We(Bl,Mj,(t,n)=>t.endedTable?n.map(o=>{const e=o[0];let i;return t.endedTable.gameResult.gameStats.playerPoints&&(i=t.endedTable.gameResult.gameStats.playerPoints[e.player.id]),{points:i,isWinner:e.isWinner()}}):[]),mCe=We(Bl,Pj,(t,n)=>{var o;if(t.isSpectator||!n||null===(o=t.endedTable)||void 0===o||null===(o=o.gameInfo)||void 0===o||!o.reward)return[];let e;var i;return e=t.endedTable.settings.splitRewardForWinners?Math.round(t.endedTable.gameInfo.reward/(null===(i=t.endedTable.gameResult.winners)||void 0===i?void 0:i.length)):t.endedTable.gameInfo.reward,[{type:ln.Chips,value:e}]}),fCe=We(Bl,a2.selectAll,(t,n)=>n),gCe=We(Bl,t=>t.balance);J.prototype.gameSummary={subscribeState:function z1t(){return this.select(Bl)}.bind(J.prototype),selectState:function V1t(){return this.selectSync(Bl)}.bind(J.prototype),subscribeTimerRunningStatus:function j1t(){return this.select(G1t)}.bind(J.prototype),selectIsWinner:function H1t(){return this.selectSync(Pj)}.bind(J.prototype),subscribeIsWinner:function q1t(){return this.select(Pj)}.bind(J.prototype),selectIsOpened:function W1t(){return this.selectSync(aCe)}.bind(J.prototype),subscribeIsOpened:function $1t(){return this.select(aCe)}.bind(J.prototype),selectShowFindNew:function K1t(){return this.selectSync(lCe)}.bind(J.prototype),subscribeShowFindNew:function Z1t(){return this.select(lCe)}.bind(J.prototype),selectIsRematchEnabled:function Q1t(){return this.selectSync(uCe)}.bind(J.prototype),subscribeIsRematchEnabled:function Y1t(){return this.select(uCe)}.bind(J.prototype),selectMyTeam:function J1t(){return this.selectSync(Ij)}.bind(J.prototype),subscribeMyTeam:function X1t(){return this.select(Ij)}.bind(J.prototype),selectOtherTeams:function eTt(){return this.selectSync(Mj)}.bind(J.prototype),subscribeOtherTeams:function tTt(){return this.select(Mj)}.bind(J.prototype),selectMyTeamScore:function nTt(){return this.selectSync(pCe)}.bind(J.prototype),subscribeMyTeamScore:function iTt(){return this.select(pCe)}.bind(J.prototype),selectPlayersList:function oTt(){return this.selectSync(fCe)}.bind(J.prototype),subscribePlayersList:function rTt(){return this.select(fCe)}.bind(J.prototype),selectReward:function sTt(){return this.selectSync(mCe)}.bind(J.prototype),subscribeReward:function aTt(){return this.select(mCe)}.bind(J.prototype),selectOtherTeamsScore:function cTt(){return this.selectSync(hCe)}.bind(J.prototype),subscribeOtherTeamsScore:function lTt(){return this.select(hCe)}.bind(J.prototype),selectXp:function uTt(){return this.selectSync(cCe)}.bind(J.prototype),subscribeXp:function dTt(){return this.select(cCe)}.bind(J.prototype),selectIsRematchCancelled:function pTt(){return this.selectSync(dCe)}.bind(J.prototype),subscribeIsRematchCancelled:function hTt(){return this.select(dCe)}.bind(J.prototype),selectBalance:function mTt(){return this.selectSync(gCe)}.bind(J.prototype),subscribeBalance:function fTt(){return this.select(gCe)}.bind(J.prototype)};const gTt=["timer"];function _Tt(t,n){if(1&t){const o=Ce();p(0,"div",9)(1,"timer",10,11),Y("onCountdownFinished",function(){return oe(o),re(_().onTimerExpire())}),m()()}if(2&t){const o=_();d(),l("milliseconds",o.timerMs)("styleObject",o.timerStyleConfig)}}const vTt=()=>({"solo-button":!0}),bTt=t=>({name:t});let _Ce=(()=>{var t;class n{constructor(e,i){this.store=e,this.sounds=i,this.timerMs=9e4,this.leave=new ke,this.timerExpire=new ke,this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.popupContainerOptions={closeDisabled:!0,disableBackdrop:!1,customComponentCssClass:"game-summary__popup",componentZIndex:"999",styleProperties:{maxWidth:"45rem",height:"auto",maxHeight:"90%",display:"flex",flexFlow:"column nowrap"}},this.timerStyleConfig={fontSize:"1.4rem",color:"#fffff"}}ngOnInit(){this.sounds.play(dn.GameWon),this.startTimer(this.timerMs),this.user=this.store.selectUserState()}ngOnDestroy(){this.stopTimer()}onHomeClick(){this.leave.emit()}onTimerExpire(){this.timerExpire.emit()}startTimer(e){this.timer&&(this.timer.stop(),this.timer.start(e))}stopTimer(){this.timer&&this.timer.stop()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Mo))},t.\u0275cmp=pe({type:t,selectors:[["scripted-game-summary"]],viewQuery:function(e,i){if(1&e&&$e(gTt,5),2&e){let r;je(r=He())&&(i.timer=r.first)}},inputs:{timerMs:"timerMs"},outputs:{leave:"leave",timerExpire:"timerExpire"},decls:16,vars:18,consts:[[3,"popupContainerOpened","popupContainerOptions"],[1,"game-summary__container-congrats--content"],[1,"game-summary__congrats"],[1,"game-summary__container--footer"],[1,"game-summary__container--buttons"],[1,"game-summary__container--to-lobby-button"],[1,"game-summary__button--bottom","text-icon","home",3,"ngClass","icon","buttonModifier","onClick"],[1,"game-summary__text--button"],["class","game-summary__container--timer",4,"ngIf"],[1,"game-summary__container--timer"],[1,"timer",3,"milliseconds","styleObject","onCountdownFinished"],["timer",""]],template:function(e,i){1&e&&(p(0,"popup-container",0)(1,"div",1)(2,"p",2),H(3),V(4,"translate"),m(),p(5,"p",2),H(6),V(7,"translate"),m()(),p(8,"div",3)(9,"div",4)(10,"div",5)(11,"button-icon-text",6),Y("onClick",function(){return i.onHomeClick()}),p(12,"span",7),H(13),V(14,"translate"),m()()()(),U(15,_Tt,3,2,"div",8),m()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(3),se($(4,9,"TEXT.CONGRATULATIONS")),d(3),se($(7,11,"TUTORIALS.YOU_COMPLETED_THE_TUTORIAL")),d(5),l("ngClass",pt(15,vTt))("icon",ne(16,bTt,i.EIcons.HOME))("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION),d(2),se($(14,13,"BUTTON.LEAVE")),d(2),l("ngIf",i.timerMs))},dependencies:[Xe,Ne,Fs,so,Wi,qe],styles:[".game-summary__container--content[_ngcontent-%COMP%]{width:100%;height:calc(100% - 8rem);border-radius:0 0 .4rem .4rem;padding:0 1rem;display:flex;flex-flow:column nowrap;overflow-y:auto;overflow-x:hidden}.game-summary__container--footer[_ngcontent-%COMP%]{width:100%;display:block;flex-flow:column nowrap}.game-summary__container--buttons[_ngcontent-%COMP%]{width:100%;justify-content:space-between;display:flex;flex-flow:row wrap}.game-summary__container--phrases[_ngcontent-%COMP%], .game-summary__container--emojis[_ngcontent-%COMP%]{display:flex;justify-content:center;width:49%;padding:0 1rem 1rem}.game-summary__container--find-new-button[_ngcontent-%COMP%], .game-summary__container--to-lobby-button[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.game-summary__button--bottom[_ngcontent-%COMP%]{width:100%;height:4rem}.game-summary__button--bottom.home[_ngcontent-%COMP%]{padding:0 .5rem 0 1rem}.game-summary__button--bottom.home.solo-button[_ngcontent-%COMP%]{padding:0 1rem}.game-summary__button--bottom.find-new[_ngcontent-%COMP%]{padding:0 1rem 0 .5rem}.game-summary__button--bottom.text-icon[_ngcontent-%COMP%]{min-width:9rem!important}.game-summary__container--find-new-button[_ngcontent-%COMP%]{flex:2}.game-summary__container--timer[_ngcontent-%COMP%]{width:100%;height:3rem;display:flex;justify-content:center;align-items:center;white-space:pre}.timer[_ngcontent-%COMP%]{display:flex}.game-summary__text--button[_ngcontent-%COMP%]{text-transform:uppercase}.game-summary__fireworks[_ngcontent-%COMP%]{position:absolute;top:0;left:0}@keyframes _ngcontent-%COMP%_spinReplay{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.game-summary__container--team-won[_ngcontent-%COMP%]{margin-bottom:1rem;width:100%}.game-summary__text--won[_ngcontent-%COMP%]{width:100%;height:8rem;display:flex;justify-content:center;align-items:center;font-size:1.8rem}.game-summary__congrats[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;font-size:2.4rem;padding:.5rem 0}.game-summary__container-congrats--content[_ngcontent-%COMP%]{padding:2rem 0}.game-summary__ranked-team-stats[_ngcontent-%COMP%]{padding:1rem 0}"],changeDetection:0}),n})();const CTt=[No,xi,Yi,Io,Ls,$r.forFeature(ku.featureKey,function F1t(t,n){return N1t(t,n)})],yTt=[bj,Rbe,Abe];let Oj=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:yTt,imports:[CTt]}),n})();const wTt=["gameButtonContainer"],TTt=["*"];let c2=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["game-menu-button-wrapper"]],viewQuery:function(e,i){if(1&e&&$e(wTt,7),2&e){let r;je(r=He())&&(i.gameButtonContainer=r.first)}},ngContentSelectors:TTt,decls:3,vars:0,consts:[[1,"game-menu-button-wrapper__container"],["gameButtonContainer",""]],template:function(e,i){1&e&&(Co(),p(0,"div",0,1),yo(2),m())},styles:["[_nghost-%COMP%]{display:block}.game-menu-button-wrapper__container[_ngcontent-%COMP%]{margin-bottom:.5rem}\n\n/*# sourceMappingURL=game-menu-button-wrapper.component.ts-angular-inline--1.css.map*/"],changeDetection:0}),n})();var PTt=ve.EButtonModifier,ITt=ve.EIcons;const MTt=["menuButtonsContainer"],OTt=t=>({opened:t}),ETt=t=>({name:t}),xTt=["*"];let NM=(()=>{var t;class n{constructor(e){this.cdr=e,this.buttonModifier=PTt,this.icons=ITt}ngAfterViewInit(){this.items.forEach((e,i)=>{e.gameButtonContainer.nativeElement.style.transform="translateY(".concat(100*(this.items.length-i),"%)"),e.gameButtonContainer.nativeElement.style.transition=".2s transform ease",e.gameButtonContainer.nativeElement.style.marginBottom="0"})}toggleButtons(e){this.menuButtonsOpened=e,this.items.forEach((i,r)=>{this.menuButtonsOpened?(i.gameButtonContainer.nativeElement.style.transform="translateY(0)",i.gameButtonContainer.nativeElement.style.marginBottom="0.5rem"):(i.gameButtonContainer.nativeElement.style.transform="translateY(".concat(100*(this.items.length-r),"%)"),i.gameButtonContainer.nativeElement.style.marginBottom="0")}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["game-menu-buttons"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,MTt,7),Ho(r,c2,4)),2&e){let s;je(s=He())&&(i.menuButtonsContainer=s.first),je(s=He())&&(i.items=s)}},ngContentSelectors:xTt,decls:5,vars:9,consts:[[1,"game-menu-buttons__container"],[1,"game-menu-buttons__list__container",3,"ngClass"],[1,"game-menu-button__toggle__container"],[1,"game-menu-button__toggle",3,"buttonModifier","rounded","flatButton","icon","onClick"]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"div",1),yo(2),m(),p(3,"div",2)(4,"button-icon",3),Y("onClick",function(){return i.toggleButtons(!i.menuButtonsOpened)}),m()()()),2&e&&(d(),l("ngClass",ne(5,OTt,i.menuButtonsOpened)),d(3),l("buttonModifier",i.menuButtonsOpened?i.buttonModifier.BUTTON_DARK:i.buttonModifier.BUTTON_INGAME)("rounded",!0)("flatButton",!0)("icon",ne(7,ETt,i.menuButtonsOpened?i.icons.CLOSE:i.icons.UTILITY)))},dependencies:[Xe,ei],styles:[".game-menu-button__toggle[_ngcontent-%COMP%]{width:5rem;height:5rem}.game-menu-buttons__list__container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:5rem;height:5rem}"],changeDetection:0}),n})();const ATt=[No,xi,Yi,Io,Ls,Oj,pR];let Ej=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[ATt]}),n})();const vCe=[{path:Xs.gameRoute,canActivate:[wj],canDeactivate:[wj],component:BM,data:{redirectOptions:{skipRedirect:!0,onlyLogged:!0,relativeUrl:"game"}}}],RTt=[No,xi,Yi,Io,Ls,Oj,pR,Ej],kTt=[wj];let LTt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...kTt],imports:[RTt]}),n})();var DTt=__webpack_require__(47132),BTt=__webpack_require__.n(DTt),or=function(t){return t.GENERAL="general",t.NOTIFICATION="notification",t.MY_DATA="myData",t.DEV="dev",t.GDPR="gdpr",t}(or||{});let xj=(()=>{var t;class n{constructor(){this.openDevSettingsEvent=new sn}openSettings(){this.openDevSettingsEvent.next(!0)}closeSettings(){this.openDevSettingsEvent.next(!1)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const NTt=["hint"],FTt=t=>({"settings-opion__icon-notification":t});function UTt(t,n){if(1&t&&B(0,"icon-component",10),2&t){const o=_();l("ngClass",ne(2,FTt,o.option.type===o.ESettingsType.NOTIFICATION))("icon",o.option.icon)}}function GTt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se($(2,1,o.option.hint))}}function VTt(t,n){if(1&t){const o=Ce();p(0,"toggle-button",11),Y("stateChange",function(i){return oe(o),re(_().optionClicked(i))}),m()}if(2&t){const o=_();l("state",o.option.state)("conditionCallback",o.option.conditionCallback)}}function zTt(t,n){if(1&t&&(Tn(0),H(1),V(2,"translate"),Pn()),2&t){const o=_(3);d(),ze(" ",$(2,1,o.select.current.text)," ")}}function jTt(t,n){1&t&&U(0,zTt,3,3,"ng-container",5),2&t&&l("ngIf",_(2).select.current)}function HTt(t,n){1&t&&B(0,"icon-component",22),2&t&&l("icon",_().$implicit.icon)}function qTt(t,n){if(1&t){const o=Ce();p(0,"img",23,24),Y("load",function(){return oe(o),re(Kt(1).hidden=!1)})("error",function(){return oe(o),re(Kt(1).hidden=!0)}),m()}2&t&&l("src",_().$implicit.icon,Wn)}const bCe=t=>({"custom-select__option-text-selected":t});function WTt(t,n){if(1&t&&(p(0,"p",25),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit,e=_(3);l("ngClass",ne(4,bCe,o&&o===e.option)),d(),se($(2,2,o.abbreviation))}}function $Tt(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",16),Y("select",function(i){return oe(o),re(_(3).selectChoose(i))}),p(1,"div",17),U(2,HTt,1,1,"icon-component",18)(3,qTt,2,1,"img",19)(4,WTt,3,6,"p",20),p(5,"p",21),H(6),V(7,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(3);l("value",o),d(2),l("ngIf",o.icon&&(!o.iconType||"string"!==o.iconType)),d(),l("ngIf",o.icon&&o.iconType&&"string"===o.iconType),d(),l("ngIf",o.abbreviation),d(),l("ngClass",ne(8,bCe,o&&o===e.option)),d(),se($(7,6,o.text))}}function KTt(t,n){if(1&t&&U(0,$Tt,8,10,"custom-select-item",15),2&t){const o=_(2);l("ngForOf",o.select.options)("ngForTrackBy",o.trackByFn)}}function ZTt(t,n){1&t&&(p(0,"custom-select",12),U(1,jTt,1,1,"ng-template",null,13,ft)(3,KTt,1,2,"ng-template",null,14,ft),m())}function QTt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se($(2,1,o.option.hint))}}const CCe=t=>({$implicit:t});let Aj=(()=>{var t;class n{constructor(e,i,r,s,a){this.availableLanguages=[],this.currentLang="",this.currentCountry="",this.appSettingsType=Oo,this.ESettingsType=or,this.optionClicked=c=>{this.stateChange.emit(c)},this.urlService=r,this.translate=i,this.appLanguage=e,this.stateChange=new ke,this.closeParent=new ke,this.translatePipe=s,this.cdr=a}ngOnInit(){if(this.option.id===Oo.AppLanguage&&this.currentLang){let e=[];const i=this.translate.instant("LANGUAGES");this.availableLanguages.forEach(r=>{e.push({value:r,text:i[r.toUpperCase()].FULL})}),this.select={control:{type:rd.EControlType.Input},current:{value:this.currentLang,text:i[this.currentLang.toUpperCase()].FULL},options:e}}else if(this.option.id===Oo.Country&&this.currentCountry){let i,e=[];Object.keys(Lt.CONFIG.platform.countries).forEach(r=>{e.push({value:r,text:Lt.CONFIG.platform.countries[r],icon:"xx"!==r.toLowerCase()?this.urlService.getImageUrl("countries/".concat(r.toLowerCase(),".svg")):void 0,iconType:"string"})}),i=e.find(r=>r.value===this.currentCountry),i||(i=e.find(r=>"XX"===r.value)),this.select={control:{type:rd.EControlType.Input},current:i||{text:"",value:void 0},options:e}}}ngOnChanges(e){e.defaultState&&e.defaultState.currentValue!==this.option.state&&(this.option.state=e.defaultState.currentValue,this.defaultState=e.defaultState.currentValue),this.cdr.detectChanges()}ngOnDestroy(){this.clickSubscription&&this.clickSubscription.unsubscribe(),this.hideSubscription&&this.hideSubscription.unsubscribe()}trackByFn(e,i){return e}selectChoose(e){(this.option.id===Oo.AppLanguage&&this.currentLang!==e.value||this.option.id===Oo.Country&&this.currentCountry!==e.value)&&(this.option.setFunc(e.value),this.select.current=e,this.cdr.detectChanges())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ma),g(ls),g(ii),g(qe),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["settings-option"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,NTt,7),2&e){let s;je(s=He())&&(i.hint=s.first)}},inputs:{option:"option",defaultState:"defaultState",availableLanguages:"availableLanguages",currentLang:"currentLang",currentCountry:"currentCountry"},outputs:{stateChange:"stateChange",closeParent:"closeParent"},features:[it],decls:17,vars:22,consts:[[1,"settings-option__wrapper"],[1,"settings-option__top-section"],["class","settings-option__icon",3,"ngClass","icon",4,"ngIf"],[1,"option-container"],[1,"settings-option__hint-inside"],[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"state","conditionCallback","stateChange",4,"ngIf"],["class","settings-option__custom-select lang",4,"ngIf"],[1,"settings-option__hint-outside"],[1,"settings-option__icon",3,"ngClass","icon"],[3,"state","conditionCallback","stateChange"],[1,"settings-option__custom-select","lang"],["selectedItem",""],["options",""],[3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","select"],[1,"settings-option__custom-select__option"],["class","settings-option__custom-select__icon",3,"icon",4,"ngIf"],["class","settings-option__custom-select__icon image",3,"src","load","error",4,"ngIf"],["class","custom-select--abbreviation",3,"ngClass",4,"ngIf"],[3,"ngClass"],[1,"settings-option__custom-select__icon",3,"icon"],[1,"settings-option__custom-select__icon","image",3,"src","load","error"],["imgCountry",""],[1,"custom-select--abbreviation",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div"),U(3,UTt,1,4,"icon-component",2),p(4,"div",3)(5,"p"),H(6),V(7,"translate"),m(),p(8,"div",4),U(9,GTt,3,3,"p",5),Un(10,6),m()()(),p(11,"div"),U(12,VTt,1,2,"toggle-button",7)(13,ZTt,5,0,"custom-select",8),m()(),p(14,"div",9),U(15,QTt,3,3,"p",5),Un(16,6),m()()),2&e&&(d(2),ni("option-name ",i.option.id,""),d(),l("ngIf",i.option.icon),d(3),se($(7,16,i.option.name)),d(3),l("ngIf",i.option.hint),d(),l("ngTemplateOutlet",i.hint)("ngTemplateOutletContext",ne(18,CCe,i.hint)),d(),ni("toggle-button ",i.option.id,""),d(),l("ngIf","toggle"===i.option.optionType),d(),l("ngIf",i.select&&"select"===i.option.optionType),d(2),l("ngIf",i.option.hint),d(),l("ngTemplateOutlet",i.hint)("ngTemplateOutletContext",ne(20,CCe,i.hint)))},dependencies:[Xe,Mt,Ne,qr,M0,Dn,Up,Vd,qe],styles:["[_nghost-%COMP%]{width:100%}.settings-option__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:5rem;display:flex;flex-direction:column!important;flex-flow:row wrap;justify-content:center;align-items:baseline}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%]{display:flex;width:100%}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]{width:calc(100% - 7.5rem);display:flex;align-items:center}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]   .option-container[_ngcontent-%COMP%]{overflow:hidden}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]   .option-container.lang[_ngcontent-%COMP%], .settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]   .option-container.country[_ngcontent-%COMP%]{flex:1}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]   .option-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{text-transform:initial;font-size:1.8rem;font-weight:600;margin-left:.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 380px){.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]   .option-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]   .option-container[_ngcontent-%COMP%] > .settings-option__hint-inside[_ngcontent-%COMP%]{margin-top:.3rem;width:100%;display:none}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .option-name[_ngcontent-%COMP%]   .option-container[_ngcontent-%COMP%] > .settings-option__hint-inside[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;font-size:1.2rem}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .toggle-button[_ngcontent-%COMP%]{width:7.5rem;display:flex;justify-content:center;align-items:center}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .toggle-button.lang[_ngcontent-%COMP%], .settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .toggle-button.country[_ngcontent-%COMP%]{width:26rem}.settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .toggle-button.lang[_ngcontent-%COMP%] > .custom-select[_ngcontent-%COMP%], .settings-option__wrapper[_ngcontent-%COMP%]   .settings-option__top-section[_ngcontent-%COMP%] > .toggle-button.country[_ngcontent-%COMP%] > .custom-select[_ngcontent-%COMP%]{width:100%}.settings-option__wrapper[_ngcontent-%COMP%] > .settings-option__hint-outside[_ngcontent-%COMP%]{margin-top:.3rem;width:100%;display:block}.settings-option__wrapper[_ngcontent-%COMP%] > .settings-option__hint-outside[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;font-size:1.2rem}.settings-opion__icon-notification[_ngcontent-%COMP%]{display:none}"]}),n})();var YTt=ve.EButtonModifier;const JTt=()=>({key:"DEVELOPER.TITLE"});function XTt(t,n){if(1&t){const o=Ce();p(0,"popup-title-bar",7),Y("buttonCloseClicked",function(){return oe(o),re(_(2).hide())}),m()}2&t&&l("popupTitleType",_(2).popupTitleTypes.Static)("text",pt(2,JTt))}const ePt=(t,n)=>({lastEl:t,firstEl:n});function tPt(t,n){if(1&t){const o=Ce();p(0,"div",8)(1,"settings-option",9),Y("stateChange",function(i){const s=oe(o).$implicit;return re(_(2).handleStateChanged(s,i))}),m()()}if(2&t){const o=n.$implicit,e=n.first,i=n.last;go("height",_(2).optionHeight),l("ngClass",cn(4,ePt,i,e)),d(),l("option",o)}}function nPt(t,n){if(1&t){const o=Ce();p(0,"button-text",10),Y("onClick",function(){return oe(o),re(_(2).showAppConsole())}),p(1,"span"),H(2),V(3,"translate"),m()()}2&t&&(l("buttonModifier",_(2).buttonModifier.BUTTON_ATTENTION),d(2),se($(3,2,"DEVELOPER.SHOW_APP_CONSOLE")))}function iPt(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().hide())}),U(1,XTt,1,3,"popup-title-bar",2),p(2,"div",3)(3,"div",4),U(4,tPt,2,7,"div",5)(5,nPt,4,4,"button-text",6),m()()()}if(2&t){const o=_();l("popupContainerOpened",o.devSettingsOpened)("popupContainerOptions",o.popupContainerOptions),d(),l("ngIf",o.devSettingsOpened),d(3),l("ngForOf",o.options),d(),l("ngIf",o.showDeviceConsoleButton)}}let yCe=(()=>{var t;class n{constructor(e,i,r,s){this.popupTitleTypes=li,this.buttonModifier=YTt,this.showDeviceConsoleButton=!1,this.ESettingsType=or,this.developerService=r,this.devSettingsPopupService=i,this.app=e,this.devSettingsOpened=!1,this.environment=rw,this.cdr=s,this.options=this.createPopup(),this.options=this.optionsVisibilyManager(this.options),this.optionHeight="".concat(100/this.options.length,"%"),this.popupContainerOptions={customComponentCssClass:"dev-settings-popup",styleProperties:{maxWidth:"41rem",maxHeight:"".concat(10*this.options.length,"rem")}},s.detach()}ngOnInit(){var e;this.showDeviceConsoleButton="staging"===(null===(e=this.app.getMobileAppService().getCachedDeviceInfo())||void 0===e?void 0:e.environment),this.devSettingsPopupSubscription=this.devSettingsPopupService.openDevSettingsEvent.subscribe(i=>{this.devSettingsOpened=i,this.cdr.detectChanges()}),this.cdr.detectChanges()}ngOnDestroy(){this.devSettingsPopupSubscription&&this.devSettingsPopupSubscription.unsubscribe()}optionsVisibilyManager(e){const i=BTt()(e,"visibleIn");return this.environment===Pm.Production&&(e=i[Pm.Production],this.developerService.removeLocalOptions(lA()(i[Pm.Development],"id"))),e}hide(){this.devSettingsPopupService.closeSettings()}handleStateChanged(e,i){e.setFunc(i),this.cdr.detectChanges()}showAppConsole(){this.app.getMobileAppService().messages().showAppConsole()}createPopup(){return[{id:"dev-mode",name:"DEVELOPER.DEVELOPER",optionType:ea.Toggle,type:or.DEV,state:this.developerService.developerModeEnabled(),visibleIn:Pm.Production,setFunc:e=>{this.developerService.setDeveloperMode(e)}},{id:"console",name:"DEVELOPER.CONSOLE",optionType:ea.Toggle,type:or.DEV,state:this.developerService.consoleEnabled(),visibleIn:Pm.Production,setFunc:e=>{this.developerService.setConsoleEnabled(e)}},{id:"rateDialogShowOnLobby",name:"DEVELOPER.RATE_DIALOG",optionType:ea.Toggle,type:or.DEV,state:this.developerService.rateDialogShowOnLobby(),visibleIn:Pm.Production,setFunc:e=>{this.developerService.setRateDialogShowOnLobby(e)}},{id:"showDailyBonusNotificationSooner",name:"DEVELOPER.DAILY_BONUS",optionType:ea.Toggle,type:or.DEV,state:this.developerService.showDailyBonusNotificationSooner(),visibleIn:Pm.Production,setFunc:e=>{this.developerService.setShowDailyBonusNotificationSooner(e)}},{id:"levelUpPopup",name:"DEVELOPER.LEVEL_UP",optionType:ea.Toggle,type:or.DEV,state:this.developerService.getOptionState("levelUpPopup"),visibleIn:Pm.Development,setFunc:e=>{this.developerService.setOptionState("levelUpPopup",e)}}]}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(xj),g(tg),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["dev-settings-popup"]],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked",4,"ngIf"],[1,"dev-settings-popup__container--content"],[1,"dev-settings-popup__container--content-inner"],["class","dev-settings-popup__container--option",3,"ngClass","height",4,"ngFor","ngForOf"],[3,"buttonModifier","onClick",4,"ngIf"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"dev-settings-popup__container--option",3,"ngClass"],[3,"option","stateChange"],[3,"buttonModifier","onClick"]],template:function(e,i){1&e&&U(0,iPt,6,5,"popup-container",0),2&e&&l("ngIf",i.devSettingsOpened)},dependencies:[Xe,Mt,Ne,pn,Ji,Wi,Aj,qe],styles:[".dev-settings-popup__container--content[_ngcontent-%COMP%]{width:100%;height:calc(100% - 6rem);display:flex;justify-content:center;align-items:center}.dev-settings-popup__container--content-inner[_ngcontent-%COMP%]{width:90%;height:90%;display:flex;flex-flow:column nowrap;overflow:auto}.dev-settings-popup__container--option[_ngcontent-%COMP%]{position:relative;width:100%;min-height:5rem;margin:.1rem 0;display:flex;justify-content:center;align-items:center}.dev-settings-popup__container--option.firstEl[_ngcontent-%COMP%]{margin-top:.2rem}.dev-settings-popup__container--option.lastEl[_ngcontent-%COMP%]{margin-bottom:.2rem}"],changeDetection:0}),n})();var oPt=ve.EButtonModifier,SCe=nt.EPermissionModule,rPt=nt.EModuleAction,ml=ve.EIcons;const sPt=["scrollCont"];function aPt(t,n){if(1&t){const o=Ce();p(0,"div",17),Y("click",function(){return oe(o),re(_().showWaitToaster())}),m()}}function cPt(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",20),Y("select",function(i){return oe(o),re(_(2).changeTab(i))}),p(1,"button-text",21),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit,e=_(2);l("tabId",o.id),d(),l("title",o.text)("buttonModifier",e.buttonModifier.BUTTON_TRANSPARENT)("bclass","settings__top-tabs__bclass"+(o.id===e.currentTabId?" settings-popup__top-tabs__current ":"")),d(),ze(" ",$(3,5,o.text.key),"")}}function lPt(t,n){if(1&t&&(p(0,"top-tabs",18),U(1,cPt,4,7,"top-tab-item",19),m()),2&t){const o=_();l("scrollStyleCustomClass","settings-popup__top-tabs__scroll")("initialOpenedTab",o.currentTabId)("scrollBarCustomClass","settings-popup__top-tabs__scrollbar")("showBackButton",!1),d(),l("ngForOf",o.tabs)("ngForTrackBy",o.trackById)}}function uPt(t,n){1&t&&(p(0,"p",22),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"PREFERENCES_PAGE.PAGE_DESCRIPTION")))}function dPt(t,n){if(1&t){const o=Ce();p(0,"settings-option",25),Y("stateChange",function(i){oe(o);const r=_().$implicit;return re(_().callOptionFunc(r,i))}),m()}if(2&t){const o=_().$implicit,e=_();l("option",o)("availableLanguages",e.availableLanguages)("currentLang",e.currentLang)("currentCountry",e.currentCountry)}}const pPt=(t,n)=>({lastEl:t,firstEl:n});function hPt(t,n){if(1&t&&(p(0,"div",23),U(1,dPt,1,4,"settings-option",24),m()),2&t){const o=n.$implicit;l("ngClass",cn(2,pPt,n.last,n.first)),d(),l("ngIf",!o.hidden)}}function mPt(t,n){if(1&t){const o=Ce();p(0,"span",32),Y("click",function(){return oe(o),re(_(2).openExternalUrl("/privacy-policy"))}),H(1),V(2,"translate"),m(),p(3,"span",33),H(4),V(5,"translate"),m(),p(6,"span",32),Y("click",function(){return oe(o),re(_(2).openExternalUrl("/terms-of-use"))}),H(7),V(8,"translate"),m()}2&t&&(d(),ze(" ",$(2,3,"LOGIN_COMPONENT.PRIVACY_POLICY"),""),d(3),se($(5,5,"WORDS.AND")),d(3),ze(" ",$(8,7,"LOGIN_COMPONENT.TERMS_OF_USE"),""))}function fPt(t,n){if(1&t){const o=Ce();p(0,"button-text",34),Y("onClick",function(){return oe(o),re(_(2).deleteAccount())}),H(1),V(2,"translate"),m()}2&t&&(l("buttonModifier",_(2).buttonModifier.BUTTON_NEGATIVE),d(),ze(" ",$(2,2,"DELETE_ACCOUNT.DELETE"),""))}function gPt(t,n){if(1&t){const o=Ce();p(0,"div",26)(1,"settings-option",27),Y("stateChange",function(i){oe(o);const r=_();return re(r.callOptionFunc(r.termsAndPrivacyOption,i))}),U(2,mPt,9,9,"ng-template",null,28,ft),m(),p(4,"p",29),H(5),V(6,"translate"),m(),p(7,"div",30),Y("click",function(){return oe(o),re(_().openExternalUrl("/privacy-policy"))}),V(8,"safeHtml"),V(9,"translate"),m(),U(10,fPt,3,4,"button-text",31),m()}if(2&t){const o=_();d(),l("option",o.termsAndPrivacyOption),d(4),se($(6,4,"PREFERENCES_PAGE.LATEST_PRIVACY_DESCRIPTION")),d(2),l("innerHtml",$(8,6,$(9,8,"PREFERENCES_PAGE.RIGHT_TO_BE_FORGOTTEN")),Yn),d(3),l("ngIf",o.showDeleteAccountButton())}}function _Pt(t,n){1&t&&(p(0,"div",35),B(1,"social-media-links",36),m())}const WC=t=>({name:t});function vPt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",44),Y("onClick",function(){return oe(o),re(_(2).resetTutorials())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(2);l("bclass","settings-popup__control--button")("buttonModifier",o.buttonModifier.BUTTON_PLAIN1)("icon",ne(7,WC,o.iconNames.REMATCH_CIRCLE_ARROW))("disabled",o.isTutorialReset),d(),ze(" ",$(2,5,"TUTORIALS.RESET_TUTORIALS")," ")}}function bPt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",45),Y("onClick",function(){return oe(o),re(_(2).navigateToSocial())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(2);l("bclass","settings-popup__control--button")("buttonModifier",o.buttonModifier.BUTTON_PLAIN1)("icon",ne(6,WC,o.iconNames.SEARCH)),d(),ze(" ",$(2,4,"SIDE_MENU.SOCIAL")," ")}}const CPt=t=>({key:t});function yPt(t,n){if(1&t){const o=Ce();p(0,"div",37)(1,"div",38)(2,"notification-button-icon",39),Y("onClick",function(){return oe(o),re(_().openHelpPage())}),V(3,"translate"),m(),p(4,"button-icon-text",40),Y("onClick",function(){return oe(o),re(_().openRulesPage())}),H(5),V(6,"translate"),m()(),p(7,"div",38),U(8,vPt,3,9,"button-icon-text",41),p(9,"button-icon-text",40),Y("onClick",function(){return oe(o),re(_().openBlogPage())}),H(10),V(11,"translate"),m()(),p(12,"div",38),U(13,bPt,3,8,"button-icon-text",42),p(14,"button-icon-text",43),Y("onClick",function(){return oe(o),re(_().navigateToLeaderboards())}),H(15),V(16,"translate"),m()()()}if(2&t){const o=_();d(2),l("buttonModifier",o.buttonModifier.BUTTON_PLAIN1)("bclass","settings-popup__control--button")("notificationValue",o.unreadHelpShiftCount)("isNotificationShown",!!o.unreadHelpShiftCount)("text",ne(28,CPt,$(3,20,"SIDE_MENU.BUG")))("icon",ne(30,WC,o.iconNames.BUG)),d(2),l("bclass","settings-popup__control--button")("buttonModifier",o.buttonModifier.BUTTON_PLAIN1)("icon",ne(32,WC,o.iconNames.RULES)),d(),ze(" ",$(6,22,"SIDE_MENU.RULES")," "),d(3),l("ngIf",o.userMe),d(),l("bclass","settings-popup__control--button")("buttonModifier",o.buttonModifier.BUTTON_PLAIN1)("icon",ne(34,WC,o.iconNames.BLOG)),d(),ze(" ",$(11,24,"SIDE_MENU.NEWS")," "),d(3),l("ngIf",o.userMe),d(),l("bclass","settings-popup__control--button")("buttonModifier",o.buttonModifier.BUTTON_PLAIN1)("icon",ne(36,WC,o.iconNames.LEADERBOARD)),d(),ze(" ",$(16,26,"SIDE_MENU.LEADERBOARDS")," ")}}function SPt(t,n){if(1&t){const o=Ce();p(0,"div",46)(1,"div",38)(2,"button-icon-text",47),Y("onClick",function(){return oe(o),re(_().requestLogout())}),H(3),V(4,"translate"),m()()()}if(2&t){const o=_();d(2),l("bclass","settings-popup__control--button")("buttonModifier",o.buttonModifier.BUTTON_PLAIN3)("icon",ne(6,WC,o.iconNames.LOGOUT)),d(),ze(" ",$(4,4,"SIDE_MENU.LOGOUT")," ")}}const wPt=t=>[t];function TPt(t,n){if(1&t){const o=Ce();p(0,"p",59),Y("copied",function(){return oe(o),re(_(2).copiedSuccessfully())}),V(1,"safeHtml"),V(2,"translate"),V(3,"uppercase"),m()}if(2&t){const o=_(2);l("copy-text",o.userMe.profile.id)("innerHTML",$(1,2,yt(2,4,"LABEL.USER_ID",ne(9,wPt,$(3,7,o.userMe.profile.id)))),Yn)}}function PPt(t,n){if(1&t){const o=Ce();p(0,"div",48),U(1,TPt,4,11,"p",49),p(2,"div",50)(3,"div",51),B(4,"img",52),V(5,"transformUrl"),m(),p(6,"div",53),Y("click",function(){return oe(o),re(_().openDevSettings())}),p(7,"p",54),H(8,"\xa9 "),p(9,"span",55),H(10),m(),p(11,"span",56),H(12),m()()(),p(13,"div",57),B(14,"img",58),V(15,"transformUrl"),m()()()}if(2&t){const o=_();d(),l("ngIf",o.userMe),d(3),l("src",$(5,5,"icons/dev_logo.png"),Wn),d(6),se(o.year),d(2),se(o.mainConfig.platform.name),d(2),l("src",$(15,7,"icons/vivox.png"),Wn)}}const IPt=()=>({key:"SIDE_MENU.SETTINGS"}),MPt=t=>({"no-tabs":t});var $C=function(t){return t[t.InProgress=0]="InProgress",t[t.Waiting=1]="Waiting",t[t.Idle=2]="Idle",t}($C||{});let wCe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke){this.app=e,this.settingsPopupService=i,this.settings=r,this.userService=s,this.appLanguage=a,this.location=c,this.permissionsService=u,this.toast=h,this.tutorialsManager=b,this.analytics=w,this.store=R,this.cdr=G,this.constants=K,this.devSettingsPopupService=te,this.clientConfigService=ee,this.helpShiftService=le,this.gdprService=me,this.router=ge,this.rootContainerService=Me,this.offerService=Ke,this.notificationsOptions=[],this.gdprOptions=[],this.buttonModifier=oPt,this.settingChanges=[],this.settingsRequestStatus=$C.Idle,this.settingsRequestStatusTypes=$C,this.ESettingsType=or,this.iconNames=ml,this.ETypeOffer=Bc,this.cancellableTasks=[],this.clickCounter=0,this.popStateHandler=Ee=>{this.settingsOpened&&this.hide()},this.isPlayerVip=()=>{const Ee=this.store.selectIsVip();return Ee||this.handlePermissionCanceled(),Ee},this.setFriendChatState=Ee=>(this.settings.setPrivateChatPermission(Ee),this.userService.updateSettings({friendsOnlyChat:Ee})),this.setInGameMusicState=Ee=>{this.settings.setInGameMusic(Ee)},this.setSoundsState=Ee=>{this.settings.setSounds(Ee)},this.setClientBackgroundMusicState=Ee=>{this.settings.setClientBackgroundMusic(Ee)},this.setDealerDeckState=Ee=>{this.settings.setDealerDeck(Ee)},this.setLowQualityGraphics=Ee=>{this.settings.setLowQualityGraphics(!Ee)},this.setSoftRenderingState=Ee=>{this.settings.setForceCanvas(Ee)},this.setHiddenProfileState=Ee=>(this.settings.setHiddenProfile(Ee),this.userService.updateSettings({hiddenProfile:Ee})),this.setPremiumGiftNotificationsState=Ee=>{this.settings.setPremiumGiftNotificationEnabled(Ee)},this.setLikeNotificationsState=Ee=>{this.settings.setLikeNotifications(Ee)},this.setGiftNotificationsState=Ee=>{this.settings.setGiftNotifications(Ee)},this.setFriendNotificationsState=Ee=>{this.settings.setFriendNotifications(Ee)},this.setInviteNotificationsState=Ee=>{this.settings.setInviteNotifications(Ee)},this.setPrivateMessageNotificationsState=Ee=>{this.settings.setPrivateMsgsNotifications(Ee)},this.setCloseFriendNotificationsState=Ee=>{this.settings.setCloseFriendNotifications(Ee)},this.switchLocales=Ee=>{Ee!==this.currentLang&&(this.settings.setLanguage(this.appLanguage.validateLanguage(Ee)),this.cdr.detectChanges())},this.switchCountry=Ee=>{Ee!==this.currentCountry&&(this.settings.setCountry(Ee),this.currentCountry=Ee,this.cdr.detectChanges())},this.updateUserState=Ee=>{this.userMe=Ee,this.cdr.detectChanges()},this.unreadHelpShiftCountUpdate=Ee=>{this.unreadHelpShiftCount=Ee.data,this.cdr.detectChanges()},this.handleError=Ee=>{Ee instanceof lt.NetworkError?this.toast.error("ERRORS.CONNECTION_ERROR"):this.toast.warn("ERRORS.SOMETHING_WRONG")},this.analyticsDevicePlatform=new Ap,this.settingsOpened=!1,this.options=[],this.popupTitleType=li.Static,this.popupContainerOptions={styleProperties:{maxWidth:"41rem",maxHeight:"77rem"},customComponentCssClass:"settings-popup__custom-class"},this.mainConfig=this.clientConfigService.getConfig(),this.availableLanguages=this.mainConfig.platform.languages.list,this.year=(new Date).getFullYear()}ngOnInit(){var e=this;this.settingsPopupSubscription=this.store.settingPopupComponent.subscribeIsOpened().subscribe(function(){var i=f(function*(r){if(r)try{e.buildTabs(),yield e.setOptions(),e.isTutorialReset=0===e.userMe.completedTutorials.length,e.changeTab(e.tabs[0].id),e.isBlogButtonPermitted=e.permissionsService.getActionPermission(nt.EPermissionModule.ExternalLinks,nt.EModuleAction.OpenBlogPage).isEnabled}catch(s){console.error("SettingsPopupComponent error: ",s),e.hide()}finally{e.cdr.detectChanges()}else e.options=[];e.settingsOpened=r,e.cdr.detectChanges()});return function(r){return i.apply(this,arguments)}}()),this.backButtonSubscription=this.location.subscribe(this.popStateHandler),this.userStateSubscription=this.store.subscribeUserState().subscribe(this.updateUserState),this.helpShiftService.subscribe(m0.UnreadMessagesCountChange,this.unreadHelpShiftCountUpdate),this.cdr.detectChanges()}copiedSuccessfully(){this.toast.success("POPUP.COPIED_SUCCESSFULLY")}showDeleteAccountButton(){return this.app.getPlatform()===Ut.Ios||this.app.getPlatform()===Ut.Android}ngOnDestroy(){this.settingsPopupSubscription&&this.settingsPopupSubscription.unsubscribe(),this.backButtonSubscription&&this.backButtonSubscription.unsubscribe(),this.userStateSubscription&&this.userStateSubscription.unsubscribe(),this.gdprSettingsSubscription&&this.gdprSettingsSubscription.unsubscribe(),this.cancellableTasks.length>0&&this.cancellableTasks.forEach(e=>{e.cancel()}),this.helpShiftService.unsubscribe(m0.UnreadMessagesCountChange,this.unreadHelpShiftCountUpdate),cancelAnimationFrame(this.scrollToBottomRafId),clearTimeout(this.settingsRequestDelay),clearTimeout(this.devCounterTimeOut),this.settingsPopupService.closeSettings()}buildTabs(){this.tabs=[{id:or.GENERAL,text:{key:"LABEL.GENERAL"}},{id:or.MY_DATA,text:{key:"LABEL.MY_DATA"}}],!0===this.app.isMobileApp()&&this.tabs.push({id:or.NOTIFICATION,text:{key:"LABEL.NOTIFICATIONS"}})}setOptions(){var i,e=this;this.currentLang=this.appLanguage.getAppLanguage(),this.currentCountry=this.store.selectUserState().settings.country,this.generalOptions=[{id:Oo.AppLanguage,optionType:ea.Select,type:or.GENERAL,name:"SETTINGS.language",icon:ml.LANG,hidden:this.getUserHasRole(kr.GUESTUSER)||this.availableLanguages.length<=1,setFunc:i=>this.setGeneralSettingsFunc(this.switchLocales,i,od.Language)},{id:Oo.Country,optionType:ea.Select,name:"EDIT_PROFILE.COUNTRY",type:or.GENERAL,icon:ml.COUNTRY,hidden:this.getUserHasRole(kr.GUESTUSER)||Object.keys(this.mainConfig.platform.countries).length<=1,setFunc:i=>this.setGeneralSettingsFunc(this.switchCountry,i,od.Country)},{id:Oo.FriendsOnlyChatEnabled,name:"SETTINGS.PRIVATE_CHAT_PERMISSION",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.PRIVATE_CHAT_PERMISSION_HINT",icon:ml.FRIEND_CHAT,conditionCallback:this.isPlayerVip,state:this.settings.getPrivateChatPermission(),setFunc:i=>this.setGeneralSettingsFunc(this.setFriendChatState,i,od.FriendsOnlyChat)},{id:Oo.GameSoundsEnabled,name:"SETTINGS.GAME_SOUNDS",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.GAME_SOUNDS_HINT",icon:ml.INGAME_MUSIC,state:this.settings.getInGameMusic(),setFunc:i=>this.setGeneralSettingsFunc(this.setInGameMusicState,i,od.GameSounds)},{id:Oo.ClientSoundsEnabled,name:"SETTINGS.SOUNDS",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.SOUNDS_HINT",icon:ml.SOUND,state:this.settings.getSounds(),setFunc:i=>this.setGeneralSettingsFunc(this.setSoundsState,i,od.Sounds)},{id:Oo.ClientBackgroundMusicEnabled,name:"SETTINGS.CLIENT_MUSIC",optionType:ea.Toggle,type:or.GENERAL,icon:ml.MUSIC,state:this.settings.getClientBackgroundMusic(),setFunc:i=>this.setGeneralSettingsFunc(this.setClientBackgroundMusicState,i,od.ClientMusic)},{id:Oo.DealerDeckEnabled,name:"SETTINGS.DEALER_DECK",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.DEALER_DECK_HINT",icon:ml.DEALER_DECK,state:this.settings.getDealerDeck(),setFunc:i=>this.setGeneralSettingsFunc(this.setDealerDeckState,i,od.DealerDeck)},{id:Oo.LowQualityGraphicsEnabled,name:"SETTINGS.HD_QUALITY_GRAPHICS",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.HD_QUALITY_GRAPHICS_HINT",icon:ml.HD_RESOLUTION,state:!this.settings.getLowQualityGraphics(),setFunc:i=>this.setGeneralSettingsFunc(this.setLowQualityGraphics,i,od.LowQualityGraphics)},{id:Oo.ForceCanvasEnabled,name:"SETTINGS.FORCE_CANVAS",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.FORCE_CANVAS_HINT",icon:ml.SOFTWARE_RENDERING,state:this.settings.getForceCanvas(),setFunc:i=>this.setGeneralSettingsFunc(this.setSoftRenderingState,i,od.ForceCanvas)},{id:Oo.HiddenProfile,name:"SETTINGS.HIDDEN_PROFILE",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.HIDDEN_PROFILE_HINT",icon:ml.HIDDEN_PROFILE,state:this.settings.getHiddenProfile(),setFunc:i=>this.setGeneralSettingsFunc(this.setHiddenProfileState,i,od.HiddenProfile)},{id:Oo.PremiumGiftNotificationEnabled,name:"SETTINGS.PREMIUM_GIFT_NOTIFICATION",optionType:ea.Toggle,type:or.GENERAL,hint:"SETTINGS.PREMIUM_GIFT_NOTIFICATION_HINT",icon:ml.PREMIUM_GIFT,state:this.settings.getPremiumGiftNotificationEnabled(),hidden:!this.permissionsService.getActionPermission(nt.EPermissionModule.Settings,nt.EModuleAction.SettingsPremiumGiftNotification).isPermitted,setFunc:i=>this.setGeneralSettingsFunc(this.setPremiumGiftNotificationsState,i,od.PremiumGiftNotification)}],this.userMe.settings.pushNotificationsSettings&&(this.notificationsOptions=[{id:Oo.LikeNotifications,name:"SETTINGS.LIKE_PUSH_NOTIFICATION",optionType:ea.Toggle,type:or.NOTIFICATION,hint:"SETTINGS.LIKE_PUSH_HINT",icon:ml.LIKE_ICON,state:this.settings.getLikeNotifications(),setFunc:(i=f(function*(r){return e.setPushNotificationsSettingsFunc(e.setLikeNotificationsState,r,Oo.LikeNotifications)}),function(s){return i.apply(this,arguments)})},{id:Oo.GiftNotifications,name:"SETTINGS.GIFT_PUSH_NOTIFICATION",optionType:ea.Toggle,type:or.NOTIFICATION,hint:"SETTINGS.GIFT_PUSH_HINT",icon:ml.GIFT,state:this.settings.getGiftNotifications(),setFunc:i=>this.setPushNotificationsSettingsFunc(this.setGiftNotificationsState,i,Oo.GiftNotifications)},{id:Oo.FriendNotifications,name:"SETTINGS.FRIEND_PUSH_NOTIFICATION",optionType:ea.Toggle,type:or.NOTIFICATION,hint:"SETTINGS.FRIEND_PUSH_HINT",icon:ml.INVITE_FRIENDS,state:this.settings.getFriendNotifications(),setFunc:i=>this.setPushNotificationsSettingsFunc(this.setFriendNotificationsState,i,Oo.FriendNotifications)},{id:Oo.InviteNotifications,name:"SETTINGS.INVITE_PUSH_NOTIFICATION",optionType:ea.Toggle,type:or.NOTIFICATION,hint:"SETTINGS.INVITE_PUSH_HINT",icon:ml.GAME_INVITE,state:this.settings.getInviteNotifications(),setFunc:i=>this.setPushNotificationsSettingsFunc(this.setInviteNotificationsState,i,Oo.InviteNotifications)},{id:Oo.PrivateMsgsNotifications,name:"SETTINGS.PRV_MSG_PUSH_NOTIFICATION",optionType:ea.Toggle,type:or.NOTIFICATION,hint:"SETTINGS.PRV_MSG_PUSH_HINT",icon:ml.PRIVATE_MESSAGE,state:this.settings.getPrivateMsgsNotifications(),setFunc:i=>this.setPushNotificationsSettingsFunc(this.setPrivateMessageNotificationsState,i,Oo.PrivateMsgsNotifications)},{id:Oo.CloseFriendOnlineNotifications,name:"SETTINGS.CLOSE_FRIEND_ONLINE_PUSH_NOTIFICATION",optionType:ea.Toggle,icon:ml.ACTIVE_CLOSE_FRIEND,type:or.NOTIFICATION,hint:"SETTINGS.CLOSE_FRIEND_ONLINE_PUSH_HINT",state:this.settings.getCloseFriendNotifications(),setFunc:i=>this.setPushNotificationsSettingsFunc(this.setCloseFriendNotificationsState,i,Oo.CloseFriendOnlineNotifications)}]),this.gdprSettingsSubscription=this.store.subscribeUserPrivacySettings().pipe(bt(Boolean)).subscribe(i=>{const r=this.gdprService.buildOptions(i),s=r.find(a=>a.id===WR.TermsAndPrivacy);var a;s&&(this.termsAndPrivacyOption={id:WR.TermsAndPrivacy,name:"LABEL.PRIVACY",optionType:ea.Toggle,type:or.GDPR,state:s.state,hint:"",setFunc:(a=f(function*(c){s.state=c,e.termsAndPrivacyOption.state=c,e.gdprService.updateSettings(s)}),function(u){return a.apply(this,arguments)})}),this.gdprOptions=r.filter(a=>"termsPrivacy"!==a.id).map(a=>{return{id:a.id,name:"PREFERENCES_PAGE."+a.id,optionType:ea.Toggle,type:or.GDPR,hint:"PREFERENCES_PAGE."+a.id+"_DESCRIPTION",state:a.state,setFunc:(u=f(function*(h){e.gdprService.updateSettings({id:a.id,state:h})}),function(b){return u.apply(this,arguments)})};var u}),this.cdr.detectChanges()}),this.app.isMobileApp()&&this.notificationsOptions.push({id:Oo.BonusNotifications,name:"SETTINGS.BONUS_NOTIFICATIONS",optionType:ea.Toggle,type:or.NOTIFICATION,hint:"SETTINGS.BONUS_NOTIFICATIONS_HINT",state:this.settings.getBonusNotifications(),setFunc:i=>{this.settings.setBonusNotifications(i)}}),this.cdr.detectChanges()}showWaitToaster(){this.toast.warn("PLEASE_WAIT")}deleteAccount(){const e=this.rootContainerService.createComponent(Yz);e.instance.close.pipe($u()).subscribe(()=>e.destroy())}openRulesPage(){this.app.openExternalUrl("https://".concat(this.clientConfigService.getConfig().platform.staticPagesDomain,"/rules/").concat(this.appLanguage.getAppLanguage()))}openHelpPage(){this.helpShiftService.showFaqs()}openBlogPage(){this.app.openExternalUrl("https://".concat(this.clientConfigService.getConfig().platform.staticPagesDomain,"/blog/").concat(this.appLanguage.getAppLanguage()))}requestLogout(){this.settingsPopupService.closeSettings(),this.router.navigateByUrl(this.constants.defaultNotLoggedRoute)}changePushNotificationsSettings(){var e=this;return f(function*(){return e.settingsRequestStatus===$C.Waiting?yield e.promise:(e.settingsRequestStatus=$C.Waiting,e.cdr.detectChanges(),e.promise=new Promise((i,r)=>{e.settingsRequestDelay=setTimeout(f(function*(){e.settingsRequestStatus=$C.InProgress;let s={};e.settingChanges.forEach(a=>{a.parentProp?s[a.parentProp]?s[a.parentProp][a.id]=a.value:s[a.parentProp]={[a.id]:a.value}:s[a.id]=a.value}),e.cdr.detectChanges();try{yield e.settingsPopupService.setPushNotificationsSettings(s),i()}catch(a){e.settingChanges.forEach(c=>{e.options.find(u=>u.id===c.id).state=!c.value}),e.handleError(a),r(a)}finally{e.settingChanges=[],e.settingsRequestStatus=$C.Idle,e.cdr.detectChanges()}}),3e3)}))})()}getUserHasRole(e){return null!=this.userMe.roles.find(i=>i.name===e)}hide(){!this.termsAndPrivacyOption||this.termsAndPrivacyOption.state?this.settingsPopupService.closeSettings():this.gdprService.gdprPopupShow()}handleStateChanged(e){this.cdr.detectChanges()}filterOptions(e){return e.filter(r=>!r.hidden&&this.getIsSettingAvailable(r.id))}getIsSettingAvailable(e){const i=rPt.Edit;switch(e){case Oo.ClientBackgroundMusicEnabled:return this.permissionsService.getActionPermission(SCe.ClientMusic,i).isPermitted;case Oo.DealerDeckEnabled:return this.permissionsService.getActionPermission(SCe.DealersDeck,i).isPermitted;default:return!0}}changeTab(e){if(!this.currentTabId||this.currentTabId!==e||!this.options.length){switch(this.currentTabId&&this.currentTabId===or.MY_DATA&&this.termsAndPrivacyOption&&!this.termsAndPrivacyOption.state&&this.gdprService.gdprPopupShow(),this.currentTabId=e,this.setOptions(),e){case or.GENERAL:this.options=this.generalOptions;break;case or.NOTIFICATION:this.options=this.notificationsOptions;break;case or.MY_DATA:this.options=this.gdprOptions}this.options=this.filterOptions(this.options),this.cdr.detectChanges()}}resetTutorials(){var e=this;return f(function*(){try{yield e.tutorialsManager.resetTutorials();const i=new Jc.DefaultEvent(Nn.Tutorials,"resetTutorials");e.analytics.sendEvent(i),e.cdr.detectChanges()}catch(i){console.warn(i),e.handleError(i)}finally{e.isTutorialReset=0===e.userMe.completedTutorials.length,e.cdr.detectChanges()}})()}navigateToSocial(){this.router.navigate(["".concat(this.constants.defaultLoggedRoute,"/social")]).then(()=>{this.settingsPopupService.closeSettings()}).catch(e=>{console.error("navigate to social error:",e)})}navigateToLeaderboards(){this.router.navigate(["/".concat(this.constants.defaultLoggedRoute,"/leaderboards")]).then(()=>{this.settingsPopupService.closeSettings()}).catch(e=>{console.error("MatchmakingTileComponent navigation error",e)})}openDevSettings(){this.clickCounter++,3===this.clickCounter?this.devSettingsPopupService.openSettings():1===this.clickCounter&&(this.devCounterTimeOut=setTimeout(()=>{this.clickCounter=0},1e3))}trackByFn(e,i){return i.id}trackById(e,i){return i.id}callOptionFunc(e,i){e.setFunc(i)}openExternalUrl(e){this.app.openExternalUrl("https://".concat(this.clientConfigService.getConfig().platform.staticPagesDomain).concat(e,"/").concat(this.appLanguage.getAppLanguage()))}handlePermissionCanceled(){this.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]})}setGeneralSettingsFunc(e,i,r){var s=this;return f(function*(){const a=new Jn(e(i));s.cancellableTasks.push(a);try{yield a;const c=new Tl.SettingsChangedEvent(Nn.Settings,"changed",{option:r,action:i.toString(),platform:s.analyticsDevicePlatform.getPlatform(),userLevel:s.store.selectUserState().profile.level});s.analytics.sendEvent(c)}catch(c){c instanceof Cr||console.log(c)}finally{s.cancellableTasks.pop()}})()}setPushNotificationsSettingsFunc(e,i,r){var s=this;return f(function*(){const a=new Jn(s.changePushNotificationsSettings());s.cancellableTasks.push(a);try{s.settingChanges.push({id:r,value:i,parentProp:"pushNotificationsSettings"}),e(i),yield a}catch(c){c instanceof Cr||console.log(c)}finally{s.cancellableTasks.pop()}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(g0),g(nc),g(Kr),g(Ma),g(Rs),g(Ti),g(Dt),g(sv),g(yi),g(J),g(Re),g(tn),g(xj),g(Zt),g(QI),g(pI),g(on),g(Ia),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["settings-popup"]],viewQuery:function(e,i){if(1&e&&$e(sPt,5),2&e){let r;je(r=He())&&(i.scrollContainer=r.first)}},decls:18,vars:23,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","customComponentCssClass","text","buttonCloseClicked"],[1,"settings-popup__container--button-close"],[1,"settings-popup__button-close",3,"bclass","title","onClick"],["class","settings-popup__overlay--disable",3,"click",4,"ngIf"],[1,"settings-popup__container--content",3,"ngClass"],["class","settings-popup__tabs__container",3,"scrollStyleCustomClass","initialOpenedTab","scrollBarCustomClass","showBackButton",4,"ngIf"],["data-cy","settingsPopupContent",1,"settings-popup__container--content-inner"],["scrollCont",""],["class","gdpr_info",4,"ngIf"],[1,"settings-popup__container-options-list"],["class","settings-popup__container--option",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","settings-popup_gdpr-description",4,"ngIf"],["class","settings-popup_controls social",4,"ngIf"],["class","settings-popup_controls action_buttons",4,"ngIf"],["class","settings-popup_controls logout_button",4,"ngIf"],["class","settings-popup_controls footer",4,"ngIf"],[1,"settings-popup__overlay--disable",3,"click"],[1,"settings-popup__tabs__container",3,"scrollStyleCustomClass","initialOpenedTab","scrollBarCustomClass","showBackButton"],[3,"tabId","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"tabId","select"],[1,"settings-popup__list-item--navigation",3,"title","buttonModifier","bclass"],[1,"gdpr_info"],[1,"settings-popup__container--option",3,"ngClass"],[3,"option","availableLanguages","currentLang","currentCountry","stateChange",4,"ngIf"],[3,"option","availableLanguages","currentLang","currentCountry","stateChange"],[1,"settings-popup_gdpr-description"],[1,"settings-popup__container--option",3,"option","stateChange"],["hint",""],[1,"settings-popup_privacy-description"],[1,"settings-popup__link--privacy",3,"innerHtml","click"],["class","settings-popup__delete-account",3,"buttonModifier","onClick",4,"ngIf"],[1,"settings-popup__link--privacy__terms",3,"click"],[1,"settings-popup__link--privacy__word"],[1,"settings-popup__delete-account",3,"buttonModifier","onClick"],[1,"settings-popup_controls","social"],[1,"settings-popup__social-media-links"],[1,"settings-popup_controls","action_buttons"],[1,"settings-popup__control"],[1,"settings-popup__control-half",3,"buttonModifier","bclass","notificationValue","isNotificationShown","text","icon","onClick"],[1,"settings-popup__control-half",3,"bclass","buttonModifier","icon","onClick"],["class","settings-popup__control-half",3,"bclass","buttonModifier","icon","disabled","onClick",4,"ngIf"],["class","settings-popup__control-half","data-cy","settingsSearchButton",3,"bclass","buttonModifier","icon","onClick",4,"ngIf"],["data-cy","settingsLeaderboardsButton",1,"settings-popup__control-half",3,"bclass","buttonModifier","icon","onClick"],[1,"settings-popup__control-half",3,"bclass","buttonModifier","icon","disabled","onClick"],["data-cy","settingsSearchButton",1,"settings-popup__control-half",3,"bclass","buttonModifier","icon","onClick"],[1,"settings-popup_controls","logout_button"],["data-cy","settingsLogoutButton",1,"settings-popup__control-full",3,"bclass","buttonModifier","icon","onClick"],[1,"settings-popup_controls","footer"],["class","settings-popup__userId--paragraph","copy-clipboard","","class","settings-popup__userId",3,"copy-text","innerHTML","copied",4,"ngIf"],[1,"settings-popup__bottom-container"],[1,"settings-popup__container--dev"],[1,"dev__image",3,"src"],[1,"settings-popup__container--copyright",3,"click"],[1,"settings-popup__text--copyright"],[1,"settings-popup__text--year"],["dir","rtl",1,"settings-popup__text--game"],[1,"settings-popup__container--vivox"],[1,"vivox__image",3,"src"],["copy-clipboard","",1,"settings-popup__userId",3,"copy-text","innerHTML","copied"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.hide()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.hide()}),m(),p(2,"div",2)(3,"button-close",3),Y("onClick",function(){return i.hide()}),V(4,"translate"),m()(),U(5,aPt,1,0,"div",4),p(6,"div",5),U(7,lPt,2,6,"top-tabs",6),p(8,"div",7,8),U(10,uPt,3,3,"p",9),p(11,"div",10),U(12,hPt,2,5,"div",11),m(),U(13,gPt,11,10,"div",12)(14,_Pt,2,0,"div",13)(15,yPt,17,38,"div",14)(16,SPt,5,8,"div",15)(17,PPt,16,9,"div",16),m()()()),2&e&&(l("popupContainerOpened",i.settingsOpened)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleType)("customComponentCssClass","settings-popup__title-bar")("text",pt(20,IPt)),d(2),l("bclass","settings-popup__button-close--bclass")("title",$(4,18,"CHAT.CLOSE")),d(2),l("ngIf",i.settingsRequestStatus===i.settingsRequestStatusTypes.InProgress),d(),l("ngClass",ne(21,MPt,!i.tabs||i.tabs.length<=1)),d(),l("ngIf",i.tabs&&i.currentTabId&&i.tabs.length>1),d(3),l("ngIf",i.currentTabId&&i.currentTabId===i.ESettingsType.MY_DATA),d(2),l("ngForOf",i.options)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.currentTabId&&i.currentTabId===i.ESettingsType.MY_DATA),d(),l("ngIf",i.currentTabId&&i.currentTabId===i.ESettingsType.GENERAL),d(),l("ngIf",i.currentTabId&&i.currentTabId===i.ESettingsType.GENERAL),d(),l("ngIf",i.currentTabId&&i.currentTabId===i.ESettingsType.GENERAL),d(),l("ngIf",i.currentTabId&&i.currentTabId===i.ESettingsType.GENERAL))},dependencies:[Xe,Mt,Ne,SR,kl,dl,pn,Ud,so,Ji,Wi,au,Zz,Aj,Sp,qe,Ta,uo],styles:[".settings-popup__overlay--disable[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:3}.settings-popup__container--button-close[_ngcontent-%COMP%]{display:none}.settings-popup__tabs__container[_ngcontent-%COMP%]{width:100%;margin-top:1rem}.settings-popup__container--content[_ngcontent-%COMP%]{order:2;width:100%;height:calc(100% - 6rem);display:flex;justify-content:flex-start;align-items:center;flex-direction:column}.settings-popup__container--content.no-tabs[_ngcontent-%COMP%]{height:calc(100% - 5.9rem)}.settings-popup__userId[_ngcontent-%COMP%]{text-align:center;margin:0 2rem}.settings-popup__container--content-inner[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;overflow-y:auto;overflow-x:hidden}.settings-popup__container-options-list[_ngcontent-%COMP%]{padding:0 2rem}.settings-popup__container--option[_ngcontent-%COMP%]{position:relative;width:100%;padding:.8rem 0;display:block}.settings-popup__container--option.firstEl[_ngcontent-%COMP%]{margin-top:.2rem}.settings-popup__container--option.lastEl[_ngcontent-%COMP%]{margin-bottom:.2rem}.settings-popup__container--copyright[_ngcontent-%COMP%]{height:3rem;display:flex;flex-flow:row;align-items:center;padding:0 1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.settings-popup__container--copyright[_ngcontent-%COMP%]   .settings-popup__text--copyright[_ngcontent-%COMP%]{text-align:center}.settings-popup__container--copyright[_ngcontent-%COMP%]   .settings-popup__text--copyright[_ngcontent-%COMP%]   .settings-popup__text--year[_ngcontent-%COMP%]{margin:0 .5rem}.settings-popup__bottom-container[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;align-items:center;margin:1rem 2rem;flex-shrink:0}.settings-popup__container--vivox[_ngcontent-%COMP%], .settings-popup__container--dev[_ngcontent-%COMP%]{height:4rem}.settings-popup__container--vivox[_ngcontent-%COMP%] > img[_ngcontent-%COMP%], .settings-popup__container--dev[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:100%}.settings-popup__social-media-links[_ngcontent-%COMP%]{position:relative;padding:.8rem 0;width:100%;box-sizing:border-box;margin-bottom:.8rem;display:block}.settings-popup__control[_ngcontent-%COMP%]{display:flex;justify-content:space-between;position:relative;padding:.4rem 0}.settings-popup__control-full[_ngcontent-%COMP%]{width:100%;margin:0}.settings-popup__separator[_ngcontent-%COMP%]{display:none}.gdpr_info[_ngcontent-%COMP%]{padding:2rem}.settings-popup__link--privacy__terms[_ngcontent-%COMP%], .settings-popup__link--privacy__word[_ngcontent-%COMP%]{margin-right:.5rem;display:inline}.settings-popup_gdpr-description[_ngcontent-%COMP%]{padding:2rem;order:3}.top-tabs__list-item--navigation[_ngcontent-%COMP%]{height:4rem;width:100%}.settings-popup__delete-account[_ngcontent-%COMP%]{margin-top:2rem}"],changeDetection:0}),n})();var Rj=function(t){return t.featureKey="settingsPopup",t}(Rj||{});const OPt=Sr({isOpened:!1},de(Z6,(t,n)=>Se(t,o=>{o.isOpened=n.opened}))),kj=Ts(Rj.featureKey),TCe=We(kj,t=>t.isOpened);J.prototype.settingPopupComponent={selectState:function xPt(){return this.selectSync(kj)}.bind(J.prototype),subscribeState:function APt(){return this.select(kj)}.bind(J.prototype),selectIsOpened:function RPt(){return this.selectSync(TCe)}.bind(J.prototype),subscribeIsOpened:function kPt(){return this.select(TCe)}.bind(J.prototype)};const LPt=[xi,Yi,Io,No,Ls,$r.forFeature(Rj.featureKey,function EPt(t,n){return OPt(t,n)})],DPt=[g0];let BPt=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(g0))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...DPt],imports:[LPt]}),n})(),Lj=(()=>{var t;class n{constructor(){this.notifDropdownToggle=new sn}toggleDropdown(e){this.notifDropdownToggle.next(e)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const NPt=t=>({"friend-online":t});function FPt(t,n){if(1&t){const o=Ce();p(0,"div",1),B(1,"avatar",2)(2,"div",3),p(3,"div",4),Y("click",function(){return oe(o),re(_().toggleFriendsDropdownFn())}),m()()}if(2&t){const o=_();l("ngClass",ne(5,NPt,o.friendOnline)),d(),l("user",o.friendOnlineProfile)("isLink",!1)("hasLevel",!0)("hasUsername",!1)}}let PCe=(()=>{var t;class n{constructor(e,i,r,s,a){var c=this;this.friendOnline=!1,this.showOnlineFriendNotification=function(){var u=f(function*(h){h.online&&!h.recentlyActive&&(c.receivedQueue.add(h),!1===c.receivedQueue.isEmpty()&&null==c.showNotificationInterval&&!1===c.friendOnline&&(c.displayNotification(c.receivedQueue.first()),c.showNotificationInterval=setInterval(()=>{!1===c.receivedQueue.isEmpty()?c.displayNotification(c.receivedQueue.first()):(c.stopShowNotificationsCycle(),c.showNotificationInterval=null),c.cdr.detectChanges()},6500)),c.cdr.detectChanges())});return function(h){return u.apply(this,arguments)}}(),this.userRepository=r,this.communicationService=i,this.friendsService=e,this.cdr=s,this.store=a,this.toggleFriendsDropdown=new ke,this.receivedQueue=new w_,s.detach()}ngOnInit(){this.communicationService.on("friendOnline",this.showOnlineFriendNotification),this.cdr.detectChanges()}ngOnDestroy(){this.communicationService.removeListener("friendOnline",this.showOnlineFriendNotification),this.receivedQueue.clear(),this.stopShowNotificationsCycle(),this.showNotificationInterval=null}displayNotification(e){var i=this;return f(function*(){var r;let s=null===(r=i.store.friends.selectFriends().find(u=>u.id===e.friendId))||void 0===r?void 0:r.profile;if(!s)try{s=(yield i.userRepository.getSimpleProfiles([e.friendId]))[0]}catch(u){console.warn(u)}if(!s)return;i.friendOnlineProfile=s;let a=setTimeout(()=>{i.friendOnline=!0,i.cdr.detectChanges(),clearTimeout(a)},1e3),c=setTimeout(()=>{i.friendOnline=!1,i.cdr.detectChanges(),clearTimeout(c)},6e3);i.cdr.detectChanges()})()}stopShowNotificationsCycle(){clearInterval(this.showNotificationInterval),this.showNotificationInterval=null,this.cdr.detectChanges()}toggleFriendsDropdownFn(){this.toggleFriendsDropdown.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Tu),g(Ri),g(ed),g(Re),g(J))},t.\u0275cmp=pe({type:t,selectors:[["friend-online"]],outputs:{toggleFriendsDropdown:"toggleFriendsDropdown"},decls:1,vars:1,consts:[["class","friend-online__avatar-container",3,"ngClass",4,"ngIf"],[1,"friend-online__avatar-container",3,"ngClass"],[1,"friend-online__avatar-wrapper",3,"user","isLink","hasLevel","hasUsername"],[1,"friend-online__container--online-dot"],[1,"friend-online__container--online-fr-cover",3,"click"]],template:function(e,i){1&e&&U(0,FPt,4,7,"div",0),2&e&&l("ngIf",i.friendOnlineProfile)},dependencies:[Xe,Ne,Bo],styles:["[_nghost-%COMP%]{position:absolute;left:100%;width:100%;height:100%}@media only screen and (max-width: 768px){[_nghost-%COMP%]{width:4rem}}@media only screen and (max-width: 440px){[_nghost-%COMP%]{width:4rem;height:4rem}}[_nghost-%COMP%]   .friend-online__container--online-dot[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:1rem;height:1rem;border-radius:50%}[_nghost-%COMP%]   .friend-online__container--online-fr-cover[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1}.friend-online__avatar-container[_ngcontent-%COMP%]{z-index:10001;position:relative;transition:transform .5s cubic-bezier(0,.86,.46,1.03)}.friend-online__avatar-container.friend-online[_ngcontent-%COMP%]{transform:translate(-100%)}"],changeDetection:0}),n})();var ICe=ve.EButtonModifier;let l2=(()=>{var t;class n{constructor(e,i,r,s){this.router=e,this.configService=i,this.challengeTranslatePipe=r,this.constants=s,this.buttonModifier=ICe,this.onCollectClicked=()=>{this.canCollectReward&&this.onCollect.emit()},this.onPlayClicked=()=>{this.router.navigate(["".concat(this.constants.defaultLoggedRoute,"/").concat(this.challenge.games[0].game,"/lobby")]).catch(a=>{console.error("HomeLobbyGridRouteGuard error:",a)})},this.onCollect=new ke}ngOnInit(){this.setChallengeIcon(),this.updateVisualChallenge()}ngOnChanges(e){this.updateVisualChallenge()}playCurrencyClaimAnimation(){var e;null===(e=this.progressInfoBox)||void 0===e||e.playCurrencyClaimAnimation()}setChallengeIcon(){this.challengeIcon=this.challenge.games&&1===this.challenge.games.length?"platform-logos/".concat(this.challenge.games[0].game,".svg"):"challenges/".concat(this.challenge.type,".svg")}updateVisualChallenge(){const e=Math.min(this.challenge.takenRewards,this.challenge.rewards.length-1),i=this.challenge.breakpoints[e],r=Math.min(this.challenge.currentProgress,i);this.canCollectReward=this.challenge.takenRewards<this.challenge.breakpoints.length&&r===i,this.viewModel={svgImageUrl:this.challengeIcon,title:this.challengeTranslatePipe.transform(this.challenge,HS.Title,this.challenge.getCurrentLevel()),rewards:{items:this.challenge.rewards[e].items},progressBarData:{goalAmount:i,currentProgress:r,starsAnimationEnabled:!0}},this.canCollectReward?this.viewModel.buttons=[{textKey:"BONUS.COLLECT",action:this.onCollectClicked,buttonModifier:ICe.BUTTON_ATTENTION}]:this.viewModel.description=this.challengeTranslatePipe.transform(this.challenge,HS.Description,this.challenge.getCurrentLevel())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Zt),g(Tw),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["challenge-box"]],viewQuery:function(e,i){if(1&e&&$e(pd,7),2&e){let r;je(r=He())&&(i.progressInfoBox=r.first)}},inputs:{challenge:"challenge",takenRewards:"takenRewards",levelsCompleted:"levelsCompleted",currentProgress:"currentProgress"},outputs:{onCollect:"onCollect"},features:[it],decls:1,vars:1,consts:[[3,"data"]],template:function(e,i){1&e&&B(0,"progress-info-box",0),2&e&&l("data",i.viewModel)},dependencies:[pd],encapsulation:2}),n})();var UPt=ve.EButtonModifier;const GPt=["dropdown"];function VPt(t,n){1&t&&B(0,"notification-sign",13),2&t&&l("notificationValue","!")}function zPt(t,n){if(1&t){const o=Ce();p(0,"div",9)(1,"top-tab-item",10),Y("select",function(i){return oe(o),re(_().changeTab(i))}),p(2,"button-text",11),H(3),V(4,"translate"),m(),U(5,VPt,1,1,"notification-sign",12),m()()}if(2&t){const o=n.$implicit,e=_();d(),l("tabId",o.id),d(),l("bclass","challenges-dropdown__top-tabs__bclass"+(e.tabs.currentTab.id===o.id?" "+o.id+"-challenges-dropdown__top-tabs__bclass__selected":"")),d(),ze(" ",$(4,4,o.text.key)," "),d(2),l("ngIf",e.showNotificationByTab(o))}}function jPt(t,n){1&t&&(H(0),V(1,"translate")),2&t&&ze(" ",$(1,1,"CHALLENGES.DAILY_REFRESH_IN")," ")}function HPt(t,n){1&t&&(H(0),V(1,"translate")),2&t&&ze(" ",$(1,1,"CHALLENGES.WEEKLY_REFRESH_IN")," ")}function qPt(t,n){if(1&t){const o=Ce();p(0,"timer",16),Y("onCountdownFinished",function(){return oe(o),re(_(2).onChallengesExpire())}),m()}if(2&t){const o=_(2);l("minTimeUnitsType",o.timeType.Minutes)("maxTimeUnitsType",o.timeType.Days)("milliseconds",1e3*o.timeleft)("timerConfig",o.timerConfig)}}function WPt(t,n){if(1&t&&(p(0,"div",14),U(1,jPt,2,3)(2,HPt,2,3)(3,qPt,1,4,"timer",15),m()),2&t){const o=_();d(),Qo(1,o.currentChallengesCategory===o.EChallengeCategory.Daily?1:2),d(2),l("ngIf",o.timeleft)}}function $Pt(t,n){1&t&&Un(0)}const KPt=t=>({"challenges-dropdown__container--weekly-challenge":t});function ZPt(t,n){if(1&t){const o=Ce();p(0,"challenge-box",19,20),Y("onCollect",function(){const r=oe(o).$implicit;return re(_(3).onCollectClicked(r))}),m()}if(2&t){const o=n.$implicit,e=_(3);l("ngClass",ne(5,KPt,e.currentChallengesCategory===e.EChallengeCategory.Weekly))("challenge",o)("currentProgress",o.currentProgress)("takenRewards",o.takenRewards)("levelsCompleted",o.levelsCompleted)}}function QPt(t,n){if(1&t&&(Tn(0),U(1,ZPt,2,7,"challenge-box",18),Pn()),2&t){const o=_(2);d(),l("ngForOf",o.challenges)("ngForTrackBy",o.trackByFn)}}function YPt(t,n){if(1&t&&U(0,QPt,2,2,"ng-container",17),2&t){const o=_();l("ngIf",o.dropdownState===o.dropdownStateType.In)}}function JPt(t,n){1&t&&(H(0),V(1,"translate")),2&t&&ze(" ",$(1,1,"CHALLENGES.MORE_DAILY_TOMORROW")," ")}function XPt(t,n){1&t&&(H(0),V(1,"translate")),2&t&&ze(" ",$(1,1,"CHELLENGES.MORE_WEEKLY_NEXT_WEEK")," ")}const eIt=()=>({textKey:"CHALLENGES.QUESTS_COMPLETED"}),MCe=t=>[t];function tIt(t,n){if(1&t&&(p(0,"div",24),B(1,"empty-content",25),p(2,"div",26),U(3,JPt,2,3)(4,XPt,2,3),m()()),2&t){const o=_(2);d(),l("noImgFlag",!0)("textArray",ne(4,MCe,pt(3,eIt))),d(2),Qo(3,o.currentChallengesCategory===o.EChallengeCategory.Daily?3:4)}}function nIt(t,n){1&t&&(p(0,"div",27),B(1,"loader-image"),m())}const iIt=()=>({textKey:"ERRORS.CONNECTION_ERROR"});function oIt(t,n){1&t&&B(0,"empty-content",25),2&t&&l("noImgFlag",!0)("textArray",ne(3,MCe,pt(2,iIt)))}function rIt(t,n){if(1&t&&U(0,tIt,5,6,"div",21)(1,nIt,2,0,"div",22)(2,oIt,1,5,"empty-content",23),2&t){const o=_();l("ngIf",!o.loadingState||o.loadingState&&!o.loadingState.isLoading&&!o.loadingState.error),d(),l("ngIf",o.loadingState&&o.loadingState.isLoading),d(),l("ngIf",o.loadingState&&o.loadingState.error)}}function sIt(t,n){if(1&t){const o=Ce();p(0,"div",28),Y("click",function(){return oe(o),re(_().overlayClicked())})("swipeActionUp",function(i){return oe(o),re(_().overlayClicked(i))}),m()}}const aIt=t=>({dropdownOpened:t});let FM=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R){this.router=e,this.authListenerService=i,this.soundService=r,this.renderer=s,this.challengesService=a,this.store=c,this.changeDetectorRef=u,this.timeService=h,this.actions=b,this.destroyRef=w,this.clientConfigService=R,this.timeFormat=qi.Normal,this.dropdownStateType=np,this.buttonModifier=UPt,this.EChallengeCategory=ra,this.ETab=n.ETab,this.loaderOn=!1,this.isOpened=!1,this.timeType=Rt,this.onKeyPress=G=>{27===G.keyCode&&this.closeChallengesDropdown.emit()},this.onWindowClick=G=>{this.isOpened&&this.dropdown&&!this.dropdown.nativeElement.contains(G.target)&&this.overlayClicked(G)},this.onGetChallenges=G=>{this.challengesListRafId=requestAnimationFrame(()=>{this.challenges=G.filter(K=>!K.isDone()),this.setChallengesTimeLeft(),this.changeDetectorRef.detectChanges()})},this.setChallengesLoadingState=G=>{this.loadingState=G,this.changeDetectorRef.detectChanges()},this.closeChallengesDropdown=new ke,this.challenges=[],this.buildTabs(),this.changeDetectorRef.detach()}ngOnInit(){this.dropdownState=np.Out,this.timerConfig=_ne,this.addSubscriptions(),this.addChallengesListSubscription(this.tabs.currentTab.id)}ngOnChanges(e){e.changeDropdownState.firstChange||this.changeDropdownState&&(this.isOpened=!0),this.dropdownState=this.changeDropdownState?np.In:np.Out,this.changeDropdownState?(this.initChallenges(),this.keyPressListener=this.renderer.listen("window","keyup",this.onKeyPress),this.clickRafId=requestAnimationFrame(()=>{this.clickListener=this.renderer.listen("window","click",this.onWindowClick)}),this.soundService.play(dn.Slide)):(this.keyPressListener&&this.keyPressListener(),this.clickListener&&(cancelAnimationFrame(this.clickRafId),this.clickListener()),clearInterval(this.timeLeftInterval),e.changeDropdownState.firstChange||this.soundService.play(dn.Slide),this.challengesService.stopSyncronizeChallengesCycle()),this.changeDetectorRef.detectChanges()}ngOnDestroy(){this.dropdownState=np.Out,clearInterval(this.timeLeftInterval),this.keyPressListener&&this.keyPressListener(),this.clickListener&&(cancelAnimationFrame(this.clickRafId),this.clickListener()),cancelAnimationFrame(this.challengesListRafId),this.challengesService.stopSyncronizeChallengesCycle()}overlayClicked(e){e&&(e.preventDefault(),e.stopPropagation()),this.closeChallengesDropdown.emit()}onCollectClicked(e){this.challengesService.claimReward(e.id)}onAnimationEnd(){this.isOpened=!1,this.changeDetectorRef.detectChanges()}trackByFn(e,i){return i.id}onChallengesExpire(){this.challengesService.requestChallenges(this.currentChallengesCategory).then(()=>{this.setChallengesTimeLeft()})}trackByTab(e,i){return i.id}changeTab(e){this.tabs.currentTab=this.tabs.list.find(i=>i.id===e),this.currentChallengesCategory=e===ra.Daily?ra.Daily:e===ra.Weekly?ra.Weekly:ra.General,this.addChallengesListSubscription(this.currentChallengesCategory),this.setChallengesTimeLeft()}showNotificationByTab(e){switch(e.id){case ra.Daily:return this.hasCompeleteDailyMissions;case ra.Weekly:return this.hasCompleteteWeeklyMissions;default:return!1}}addSubscriptions(){this.router.events.pipe(mi(this.destroyRef)).subscribe(e=>{this.dropdownState===np.In&&e instanceof fh&&this.closeChallengesDropdown.emit()}),this.store.settingPopupComponent.subscribeIsOpened().pipe(mi(this.destroyRef)).subscribe(e=>{e&&this.closeChallengesDropdown.emit()}),this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout),mi(this.destroyRef)).subscribe(()=>{this.closeChallengesDropdown.emit()}),this.actions.pipe(ai(cL),mi(this.destroyRef)).subscribe(e=>{const i=this.challengeBoxes.find(r=>r.challenge.id===e.challengeId);i&&i.playCurrencyClaimAnimation()}),this.store.challenges.subscribeChallengesLoadingState().pipe(mi(this.destroyRef)).subscribe(this.setChallengesLoadingState),this.store.challenges.subscribeHasCompletedChallenges({challengeCategory:ra.Daily}).pipe(mi(this.destroyRef)).subscribe(e=>{this.hasCompeleteDailyMissions=e,this.changeDetectorRef.detectChanges()}),this.store.challenges.subscribeHasCompletedChallenges({challengeCategory:ra.Weekly}).pipe(mi(this.destroyRef)).subscribe(e=>{this.hasCompleteteWeeklyMissions=e,this.changeDetectorRef.detectChanges()})}addChallengesListSubscription(e){this.challengesListSubscription&&this.challengesListSubscription.unsubscribe(),this.challengesListSubscription=this.store.challenges.subscribeChallengesList({challengeCategory:e}).subscribe(this.onGetChallenges),this.changeDetectorRef.detectChanges()}buildTabs(){const e=[{id:ra.Daily,text:{key:"CHALLENGES.MISSIONS.DAILY.TITLE"},enabled:this.clientConfigService.getConfig().content.dailyChallengesEnabled},{id:ra.Weekly,text:{key:"CHALLENGES.MISSIONS.WEEKLY.TITLE"},enabled:this.clientConfigService.getConfig().content.weeklyChallengesEnabled}];this.tabs={currentTab:e.find(i=>i.enabled),list:e.filter(i=>i.enabled)},this.currentChallengesCategory=this.tabs.currentTab.id}initChallenges(){this.challengesService.startSyncronizeChallengesCycle({challengeCategory:this.currentChallengesCategory})}setChallengesTimeLeft(){const e=this.store.challenges.selectChallengesExpirationTime({challengeCategory:this.currentChallengesCategory});this.timeleft=e-this.timeService.getServerTimeS(),this.changeDetectorRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(xr),g(Mo),g(ji),g(cM),g(J),g(Re),g(Bn),g(yr),g(br),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["challenges-dropdown"]],viewQuery:function(e,i){if(1&e&&($e(GPt,7,$t),$e(l2,5)),2&e){let r;je(r=He())&&(i.dropdown=r.first),je(r=He())&&(i.challengeBoxes=r)}},inputs:{changeDropdownState:"changeDropdownState"},outputs:{closeChallengesDropdown:"closeChallengesDropdown"},features:[it],decls:11,vars:17,consts:[[1,"challenges-dropdown__dropdown",3,"dropdownState","listLength","ngClass","customClass","close"],["dropdown",""],[1,"challenges-dropdown__top-tabs",3,"initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass","showBackButton"],["class","tab",4,"ngFor","ngForOf","ngForTrackBy"],["class","challenges-dropdown__refresh-time",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["challengesTemp",""],["empty",""],["class","challenges-dropdown__overlay","swipe-directive","",3,"click","swipeActionUp",4,"ngIf"],[1,"tab"],[3,"tabId","select"],[1,"top-tabs__list-item--navigation",3,"bclass"],["class","challenges-dropdown__top_tabs--notificaton-sign",3,"notificationValue",4,"ngIf"],[1,"challenges-dropdown__top_tabs--notificaton-sign",3,"notificationValue"],[1,"challenges-dropdown__refresh-time"],["class","challenges-dropdown__refresh--timer",3,"minTimeUnitsType","maxTimeUnitsType","milliseconds","timerConfig","onCountdownFinished",4,"ngIf"],[1,"challenges-dropdown__refresh--timer",3,"minTimeUnitsType","maxTimeUnitsType","milliseconds","timerConfig","onCountdownFinished"],[4,"ngIf"],["class","challenges-dropdown__container--challenge",3,"ngClass","challenge","currentProgress","takenRewards","levelsCompleted","onCollect",4,"ngFor","ngForOf","ngForTrackBy"],[1,"challenges-dropdown__container--challenge",3,"ngClass","challenge","currentProgress","takenRewards","levelsCompleted","onCollect"],["challengeBox",""],["class","challneges-dropdown__empty-content__container",4,"ngIf"],["class","challenges-dropdown-loader-container",4,"ngIf"],[3,"noImgFlag","textArray",4,"ngIf"],[1,"challneges-dropdown__empty-content__container"],[3,"noImgFlag","textArray"],[1,"challenges-dropdown__more"],[1,"challenges-dropdown-loader-container"],["swipe-directive","",1,"challenges-dropdown__overlay",3,"click","swipeActionUp"]],template:function(e,i){if(1&e&&(p(0,"dropdown",0,1),Y("close",function(){return i.onAnimationEnd()}),p(2,"top-tabs",2),U(3,zPt,6,6,"div",3),m(),U(4,WPt,4,2,"div",4)(5,$Pt,1,0,"ng-container",5)(6,YPt,1,1,"ng-template",null,6,ft)(8,rIt,3,3,"ng-template",null,7,ft),m(),U(10,sIt,1,0,"div",8)),2&e){const r=Kt(7),s=Kt(9);l("dropdownState",i.dropdownState)("listLength",i.challenges?i.challenges.length:0)("ngClass",ne(15,aIt,i.isOpened))("customClass",i.currentChallengesCategory===i.EChallengeCategory.Weekly?"challenges-dropdown__weekly-challenges":""),d(2),l("initialOpenedTab",i.tabs.currentTab.id)("scrollStyleCustomClass","challenges-dropdown__top-tabs__scroll")("scrollBarCustomClass",i.currentChallengesCategory===i.EChallengeCategory.Weekly?"weekly-challenges-dropdown__top-tabs__scrollbar":"challenges-dropdown__top-tabs__scrollbar")("showBackButton",!1),d(),l("ngForOf",i.tabs.list)("ngForTrackBy",i.trackByTab),d(),l("ngIf",i.timeleft&&i.loadingState&&i.loadingState.isLoaded),d(),l("ngIf",i.challenges&&i.challenges.length)("ngIfThen",r)("ngIfElse",s),d(5),l("ngIf",i.changeDropdownState)}},dependencies:[Xe,Mt,Ne,Fs,bo,kl,dl,pn,fv,Oi,vM,wu,l2,qe],styles:[".challenges-dropdown__overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;height:100vh;width:100vw;z-index:5}.challenges-dropdown-loader-container[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center}.challenges-dropdown-loader-container[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-height:78%}.challenges-dropdown__dropdown[_ngcontent-%COMP%]{position:absolute;top:0;left:5%;transform:translateY(-100%) translateZ(0);overflow:hidden;z-index:10001}@media only screen and (max-width: 768px){.challenges-dropdown__dropdown[_ngcontent-%COMP%]{left:0}}.challenges-dropdown__dropdown.dropdownOpened[_ngcontent-%COMP%]{top:100%;transform:translateY(0) translateZ(0)}.challenges-dropdown__container--challenge[_ngcontent-%COMP%], .challenges-dropdown__refresh-time[_ngcontent-%COMP%]{margin:1rem;display:block}.challenges-dropdown__more[_ngcontent-%COMP%]{width:100%;font-size:1.6rem;text-align:center;margin-bottom:2rem}.top-tabs__list-item--navigation[_ngcontent-%COMP%]{height:4rem;width:100%}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.ETab||(t.ETab={})).DailyMissions="dailyMissions",o.WeeklyMissions="weeklyMissions"}(FM||(FM={}));var u2=ve.EIcons;const cIt=["challengesButton"];function lIt(t,n){if(1&t&&(p(0,"div",17)(1,"div",18),B(2,"avatar",19),m()()),2&t){const o=_();d(2),l("user",o.userProps.profile)("isLink",!0)("frameAnimation",o.frameAnimation)("hasUsername",!1)}}const UM=t=>({name:t});function uIt(t,n){if(1&t){const o=Ce();p(0,"div",20)(1,"notification-button-icon",21,22),Y("onClick",function(){return oe(o),re(_().toggleChallengesDropDown())}),m()()}if(2&t){const o=_();d(),l("showNotificationBorder",!0)("icon",ne(7,UM,o.challengeIcon))("bclass","top-bar__menu-icon")("iconClass","top-bar__dot--icon")("notificationClass","top-bar__dot")("isNotificationShown",o.challengesTopBarState.completedChallengesTotalCount&&o.challengesTopBarState.completedChallengesTotalCount>0)("notificationValue",o.challengesTopBarState.completedChallengesTotalCount)}}function dIt(t,n){if(1&t){const o=Ce();p(0,"button-icon",26),Y("onClick",function(){return oe(o),re(_(2).toggleFriendsDropdown())}),m()}if(2&t){const o=_(2);l("icon",ne(2,UM,o.iconNames.USERS))("bclass","top-bar__button-icon")}}function pIt(t,n){if(1&t){const o=Ce();p(0,"div",23),U(1,dIt,1,4,"button-icon",24),p(2,"friend-online",25),Y("toggleFriendsDropdown",function(){return oe(o),re(_().toggleFriendsDropdown())}),m()()}if(2&t){const o=_();d(),l("ngIf",o.accessEnabled)}}function hIt(t,n){if(1&t){const o=Ce();p(0,"notification-button-icon",27),Y("onClick",function(){return oe(o),re(_().toggleNotifDropdown())}),V(1,"translate"),m()}if(2&t){const o=_();l("title",$(1,8,"TOP_BAR.NOTIFICATIONS"))("showNotificationBorder",!0)("icon",ne(10,UM,o.iconNames.NOTIFICATION))("bclass","top-bar__button-icon "+(o.unreadNotificationsCount?"notification-button__active":""))("notificationClass","top-bar__dot")("iconClass","top-bar__dot--icon")("isNotificationShown",o.unreadNotificationsCount&&o.unreadNotificationsCount>0)("notificationValue",o.unreadNotificationsCount)}}function mIt(t,n){if(1&t){const o=Ce();p(0,"challenges-dropdown",28),Y("closeChallengesDropdown",function(){return oe(o),re(_().toggleChallengesDropDown(!0))}),m()}2&t&&l("changeDropdownState",_().challengesTopBarState.challengesDropDownOpen)}function fIt(t,n){if(1&t){const o=Ce();p(0,"notifications-dropdown",29),Y("closeNotifDropdown",function(){return oe(o),re(_().toggleNotifDropdown(!0))}),m()}2&t&&l("changeDropdownState",_().notifDropdownOpen)}function gIt(t,n){if(1&t){const o=Ce();p(0,"friends-dropdown",30),Y("closeFriendsDropdown",function(){return oe(o),re(_().toggleFriendsDropdown(!0))}),m()}2&t&&l("changeDropdownState",_().friendsDropdownOpen)}function _It(t,n){if(1&t){const o=Ce();p(0,"div",31),Y("click",function(){return oe(o),re(_().hideDropdowns())}),m()}}const OCe=t=>({"element-disabled":t});function vIt(t,n){if(1&t&&B(0,"currency-items-wrapper",32),2&t){const o=_();l("ngClass",ne(1,OCe,!o.accessEnabled))}}let Dj=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.notificationsService=e,this.renderer=i,this.topBarService=r,this.store=s,this.cdr=a,this.ngZone=c,this.settingsPopupService=u,this.iconNames=u2,this.challengeIcon=u2.CHALLENGES_PENDING,this.frameAnimation=v0,this.destroy$=new sn,this.subscriptions=new ie.List,this.doClick=w=>{if((this.notifDropdownOpen||this.friendsDropdownOpen||this.challengesTopBarState.challengesDropDownOpen)&&w&&w.target){const G=w.target;G instanceof HTMLElement&&G.className&&-1!==G.className.indexOf("bottom-bar__link-overlay")&&this.hideDropdowns(),this.cdr.detectChanges()}},this.updateSettingsPopupMessagesCount=w=>{this.settingsMessagesCount=w},this.onUserStateUpdate=w=>{this.userProps=w},this.onUnreadNotificationsUpdate=w=>{this.unreadNotificationsCount=w},this.readSettingsPopupMessages=w=>{w&&(this.settingsMessagesCount=0)},this.onNewCompletedChallenge=(w,R)=>{R===ra.Daily?(this.challengesTopBarState.completedChallengesTotalCount=this.challengesTopBarState.completedWeeklyChallengesCount+w,this.challengesTopBarState.completedDailyChallengesCount=w):(this.challengesTopBarState.completedChallengesTotalCount=this.challengesTopBarState.completedDailyChallengesCount+w,this.challengesTopBarState.completedWeeklyChallengesCount=w)},this.onUndoneChallengesStateUpdate=()=>{this.challengesButton&&(this.challengesTopBarState.hasUndoneChallenges=this.challengesTopBarState.hasUndoneDailyChallenges||this.challengesTopBarState.hasUndoneWeeklyChallenges,this.challengesTopBarState.hasUndoneChallenges?(this.challengesButton.bclass="top-bar__menu-icon top-bar__challenges-icon-active",this.challengeIcon=u2.CHALLENGES):(this.challengesButton.bclass="top-bar__menu-icon",this.challengeIcon=u2.CHALLENGES_PENDING),this.challengesButton.updateView())},this.userProps=this.store.selectUserState(),this.notifDropdownOpen=!1,this.settingsMessagesCount=this.settingsPopupService.settingsPopupMessagesCount.getValue(),this.showShop=h.getActionPermission(nt.EPermissionModule.Shop,nt.EModuleAction.Open).isEnabled,this.showFriends=h.getActionPermission(nt.EPermissionModule.Friends,nt.EModuleAction.View).isEnabled,this.challengesTopBarState={challengesDropDownOpen:!1,completedDailyChallengesCount:0,completedWeeklyChallengesCount:0,completedChallengesTotalCount:0,hasUndoneDailyChallenges:!1,hasUndoneWeeklyChallenges:!1,hasUndoneChallenges:!1,dailyChallengesEnabled:b.getConfig().content.dailyChallengesEnabled,weeklyChallengesEnabled:b.getConfig().content.weeklyChallengesEnabled}}ngOnInit(){this.ngZone.runOutsideAngular(()=>{this.clickListener=this.renderer.listen("window","click",this.doClick)}),this.accessEnabled=!this.userProps.roles.find(e=>e.name===kr.GUESTUSER)}ngAfterViewInit(){this.addSubscriptions(),this.cdr.detectChanges()}ngOnDestroy(){this.clickListener&&this.clickListener(),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List,this.destroy$.next(),this.destroy$.complete()}showSettingsPopup(){this.settingsPopupService.openSettings()}toggleFriendsDropdown(e){if(e)return this.friendsDropdownOpen=!1,this.topBarService.toggleDropdown(this.friendsDropdownOpen),void this.cdr.detectChanges();this.notifDropdownOpen=!1,this.challengesTopBarState.challengesDropDownOpen=!1,this.friendsDropdownOpen=!this.friendsDropdownOpen,this.topBarService.toggleDropdown(this.friendsDropdownOpen),this.cdr.detectChanges()}toggleChallengesDropDown(e){if(e)return this.challengesTopBarState.challengesDropDownOpen=!1,this.topBarService.toggleDropdown(this.challengesTopBarState.challengesDropDownOpen),void this.cdr.detectChanges();this.notifDropdownOpen=!1,this.friendsDropdownOpen=!1,this.challengesTopBarState.challengesDropDownOpen=!this.challengesTopBarState.challengesDropDownOpen,this.topBarService.toggleDropdown(this.friendsDropdownOpen),this.cdr.detectChanges()}toggleNotifDropdown(e){if(e)return this.notifDropdownOpen=!1,this.topBarService.toggleDropdown(this.notifDropdownOpen),void this.cdr.detectChanges();this.friendsDropdownOpen=!1,this.challengesTopBarState.challengesDropDownOpen=!1,this.notifDropdownOpen=!this.notifDropdownOpen,this.topBarService.toggleDropdown(this.notifDropdownOpen),this.cdr.detectChanges()}hideDropdowns(){this.toggleFriendsDropdown(!0),this.toggleNotifDropdown(!0),this.toggleChallengesDropDown(!0)}addSubscriptions(){const e=this.notificationsService.getUnreadNotificationsCount();e.pipe(wn(this.destroy$)).subscribe(this.onUnreadNotificationsUpdate);const i=this.store.settingPopupComponent.subscribeIsOpened();i.pipe(wn(this.destroy$)).subscribe(this.readSettingsPopupMessages);const r=this.settingsPopupService.settingsPopupMessagesCount;r.pipe(wn(this.destroy$)).subscribe(this.updateSettingsPopupMessagesCount);const s=this.store.subscribeUserState().pipe(bt(Boolean));s.pipe(wn(this.destroy$)).subscribe(this.onUserStateUpdate);const a=this.store.challenges.subscribeCompletedChallengesCount({challengeCategory:ra.Daily}),c=this.store.challenges.subscribeCompletedChallengesCount({challengeCategory:ra.Weekly});a.pipe(wn(this.destroy$)).subscribe(b=>{this.challengesTopBarState.dailyChallengesEnabled&&this.onNewCompletedChallenge(b,ra.Daily)}),c.pipe(wn(this.destroy$)).subscribe(b=>{this.challengesTopBarState.weeklyChallengesEnabled&&this.onNewCompletedChallenge(b,ra.Weekly)});const u=this.store.challenges.subscribeHasUndoneChallenges({challengeCategory:ra.Daily}),h=this.store.challenges.subscribeHasUndoneChallenges({challengeCategory:ra.Weekly});u.pipe(wn(this.destroy$)).subscribe(b=>{this.challengesTopBarState.hasUndoneDailyChallenges=b,this.onUndoneChallengesStateUpdate()}),h.pipe(wn(this.destroy$)).subscribe(b=>{this.challengesTopBarState.hasUndoneWeeklyChallenges=b,this.onUndoneChallengesStateUpdate()}),Ju(e.pipe(tr(1)),i.pipe(tr(1)),r.pipe(tr(1)),s.pipe(tr(1)),a.pipe(tr(1)),c.pipe(tr(1)),u.pipe(tr(1)),h.pipe(tr(1))).pipe(wn(this.destroy$)).subscribe(()=>this.cdr.detectChanges())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ja),g(ji),g(Lj),g(J),g(Re),g(an),g(g0),g(Ti),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["top-bar-component"]],viewQuery:function(e,i){if(1&e&&$e(cIt,5),2&e){let r;je(r=He())&&(i.challengesButton=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("topBar",o),deps:[[new jo,new zo,nn]]}])],decls:17,vars:30,consts:[[1,"top-bar__wrapper"],[1,"top-bar__outer--container"],[1,"top-bar__container--main"],["data-cy","settings",1,"top-bar__wrapper--button-icon","settings","oldDesign",3,"icon","showNotificationBorder","bclass","iconClass","notificationClass","notificationValue","isNotificationShown","onClick"],[1,"top-bar__container--info-middle"],[1,"top-bar__container--user-info",3,"ngClass"],["class","top-bar__container--user-props",4,"ngIf"],["data-cy","settings",1,"top-bar__wrapper--button-icon","settings","newDesign",3,"icon","showNotificationBorder","bclass","iconClass","notificationClass","notificationValue","isNotificationShown","onClick"],["class","top-bar__container--challenges",4,"ngIf"],[1,"top-bar__container--other-info"],["class","top-bar__wrapper--button-icon friends",4,"ngIf"],["class","top-bar__wrapper--button-icon","data-cy","notificationsTopBar",3,"title","showNotificationBorder","icon","bclass","notificationClass","iconClass","isNotificationShown","notificationValue","onClick",4,"ngIf"],[3,"changeDropdownState","closeChallengesDropdown",4,"ngIf"],[3,"changeDropdownState","closeNotifDropdown",4,"ngIf"],[3,"changeDropdownState","closeFriendsDropdown",4,"ngIf"],["class","top-bar__link-overlay",3,"click",4,"ngIf"],["class","top-bar__currency-wrapper","id","chipsWallet","click-sound","",3,"ngClass",4,"ngIf"],[1,"top-bar__container--user-props"],[1,"top-bar__container--avatar"],["data-cy","avatarTopBar",1,"top-bar__avatar-wrapper",3,"user","isLink","frameAnimation","hasUsername"],[1,"top-bar__container--challenges"],["data-cy","challengesTopBar",1,"top-bar__wrapper--button-icon",3,"showNotificationBorder","icon","bclass","iconClass","notificationClass","isNotificationShown","notificationValue","onClick"],["challengesButton",""],[1,"top-bar__wrapper--button-icon","friends"],[3,"icon","bclass","onClick",4,"ngIf"],["data-cy","friendsTopBar",3,"toggleFriendsDropdown"],[3,"icon","bclass","onClick"],["data-cy","notificationsTopBar",1,"top-bar__wrapper--button-icon",3,"title","showNotificationBorder","icon","bclass","notificationClass","iconClass","isNotificationShown","notificationValue","onClick"],[3,"changeDropdownState","closeChallengesDropdown"],[3,"changeDropdownState","closeNotifDropdown"],[3,"changeDropdownState","closeFriendsDropdown"],[1,"top-bar__link-overlay",3,"click"],["id","chipsWallet","click-sound","",1,"top-bar__currency-wrapper",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"notification-button-icon",3),Y("onClick",function(){return i.showSettingsPopup()}),m(),p(4,"div",4)(5,"div",5),U(6,lIt,3,4,"div",6),m(),p(7,"notification-button-icon",7),Y("onClick",function(){return i.showSettingsPopup()}),m(),U(8,uIt,3,9,"div",8),p(9,"div",9),U(10,pIt,3,1,"div",10)(11,hIt,2,12,"notification-button-icon",11),m()()(),U(12,mIt,1,1,"challenges-dropdown",12)(13,fIt,1,1,"notifications-dropdown",13)(14,gIt,1,1,"friends-dropdown",14)(15,_It,1,0,"div",15)(16,vIt,1,3,"currency-items-wrapper",16),m()()),2&e&&(d(3),l("icon",ne(24,UM,i.iconNames.CORG))("showNotificationBorder",!0)("bclass",i.settingsMessagesCount?"top-bar__settings__menu-icon settings__icon-active":"top-bar__settings__menu-icon")("iconClass","top-bar__dot--icon")("notificationClass","top-bar__dot")("notificationValue",i.settingsMessagesCount)("isNotificationShown",!!i.settingsMessagesCount),d(2),l("ngClass",ne(26,OCe,!1===i.accessEnabled)),d(),l("ngIf",i.userProps),d(),l("icon",ne(28,UM,i.iconNames.CORG))("showNotificationBorder",!0)("bclass",i.settingsMessagesCount?"top-bar__settings__menu-icon settings__icon-active":"top-bar__settings__menu-icon")("iconClass","top-bar__dot--icon")("notificationClass","top-bar__dot")("notificationValue",i.settingsMessagesCount)("isNotificationShown",!!i.settingsMessagesCount),d(),l("ngIf",i.accessEnabled&&(i.challengesTopBarState.dailyChallengesEnabled||i.challengesTopBarState.weeklyChallengesEnabled)),d(2),l("ngIf",i.showFriends),d(),l("ngIf",!0===i.accessEnabled),d(),l("ngIf",i.accessEnabled&&(i.challengesTopBarState.dailyChallengesEnabled||i.challengesTopBarState.weeklyChallengesEnabled)),d(),l("ngIf",i.accessEnabled),d(),l("ngIf",i.accessEnabled),d(),l("ngIf",i.notifDropdownOpen||i.friendsDropdownOpen),d(),l("ngIf",i.showShop))},dependencies:[Xe,Ne,Bo,ei,Oz,au,kz,Fd,RL,PCe,FM,qe],styles:[".top-bar__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;min-width:32rem;height:6rem;display:flex;align-items:center;padding:0}@media only screen and (max-width: 1366px){.top-bar__wrapper[_ngcontent-%COMP%]{height:5rem}}@media only screen and (max-width: 768px){.top-bar__wrapper[_ngcontent-%COMP%]{height:4rem}}.top-bar__outer--container[_ngcontent-%COMP%]{display:flex;width:100%;position:relative;margin:0 auto;padding:0;height:100%;align-items:center}.top-bar__container--main[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;flex:1;height:100%;z-index:100}.top-bar__wrapper--button-icon[_ngcontent-%COMP%]{position:relative;margin:0;height:100%;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 1366px){.top-bar__wrapper--button-icon[_ngcontent-%COMP%]{width:5rem}}@media only screen and (max-width: 768px){.top-bar__wrapper--button-icon[_ngcontent-%COMP%]{width:4rem}}.top-bar__wrapper--button-icon.friends[_ngcontent-%COMP%]{overflow:hidden}@media only screen and (max-width: 440px){.top-bar__wrapper--button-icon[_ngcontent-%COMP%]{width:3rem}.top-bar__wrapper--button-icon.friends[_ngcontent-%COMP%]{width:4rem}}.top-bar__container--online-friend[_ngcontent-%COMP%]{position:absolute;left:100%;width:100%;height:100%;transition:transform .5s cubic-bezier(0,.86,.46,1.03)}@media only screen and (max-width: 768px){.top-bar__container--online-friend[_ngcontent-%COMP%]{width:4rem}}@media only screen and (max-width: 440px){.top-bar__container--online-friend[_ngcontent-%COMP%]{width:4rem;height:4rem}}.top-bar__container--online-friend.friend-online[_ngcontent-%COMP%]{transform:translate(-100%)}.top-bar__container--online-friend[_ngcontent-%COMP%]   .top-bar__container--online-fr-cover[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%}.top-bar__container--user-props[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;width:auto;height:100%}@media only screen and (max-width: 768px){.top-bar__container--user-props[_ngcontent-%COMP%]{margin-left:.5rem}}.top-bar__container--info-middle[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:row;justify-content:space-between;flex:1}.top-bar__link-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:7}.top-bar__container--user-info[_ngcontent-%COMP%]{position:relative;order:1;width:auto;height:100%;display:flex}.top-bar__container--challenges[_ngcontent-%COMP%]{order:2;width:6rem;display:flex;justify-content:center;align-items:center}.top-bar__container--other-info[_ngcontent-%COMP%]{order:3;height:100%;display:flex;justify-content:flex-end;align-items:center;flex:1}.top-bar__container--avatar[_ngcontent-%COMP%]{position:relative;padding:0 .2rem 0 .5rem;width:5rem;height:4.3rem;overflow:hidden}@media only screen and (max-width: 768px){.top-bar__container--avatar[_ngcontent-%COMP%]{width:4rem;height:3.3rem}}@media only screen and (max-width: 360px){.top-bar__container--avatar[_ngcontent-%COMP%]{width:3.5rem;padding:0 .2rem 0 0}}.top-bar__avatar-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.top-bar__avatar-wrapper[_ngcontent-%COMP%]:hover{cursor:pointer}.top-bar__currency-wrapper[_ngcontent-%COMP%]{display:flex;height:100%;z-index:100;align-items:center;flex-flow:row wrap;padding-right:2rem}@media only screen and (max-width: 768px){.top-bar__currency-wrapper[_ngcontent-%COMP%]{padding-right:1rem}}@media only screen and (max-width: 380px){.top-bar__currency-wrapper[_ngcontent-%COMP%]{padding-right:.8rem}}@media only screen and (max-width: 360px){.top-bar__currency-wrapper[_ngcontent-%COMP%]{padding-right:.5rem}}"],changeDetection:0}),n})();var rp=function(t){return t.InstantConversationsVisible="InstantConversationsVisible",t.InstantMessagesVisible="InstantMessagesVisible",t.ConversationsVisible="ConversationsVisible",t.MessagesVisible="MessagesVisible",t}(rp||{}),KC=function(t){return t.ContainerScrolledToBottom="containerScrolledToBottom",t.ShowMessagesElements="showMessagesElements",t}(KC||{}),d2=function(t){return t.Emoji="emoji",t.Image="image",t.SoundRecord="soundRecord",t}(d2||{});class GM{static processByImageConfig(n,o){return GM.process(n,{maxWidth:o.defaultSize[0],maxHeight:o.defaultSize[1],quality:o.quality/100,outputFormat:o.outputFormat})}static dataURItoBuffer(n){const o=atob(n.split(",")[1]),e=new ArrayBuffer(o.length),i=new Uint8Array(e);for(let r=0;r<o.length;r++)i[r]=o.charCodeAt(r);return e}static getBrowserAutoRotate(){var n=this;return f(function*(){return void 0!==n.browserAutoRotate?n.browserAutoRotate:new Promise((o,e)=>{let r;const s=new Image;s.addEventListener("load",()=>{r=1===s.width&&2===s.height,n.browserAutoRotate=r,o(r)}),s.addEventListener("error",e),s.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})})()}static process(n,o){var e=this;return f(function*(){const i=new Image;return new Promise(function(){var r=f(function*(s,a){const c=function(){var u=f(function*(){try{const h=e.dataURItoBuffer(i.src);let w,b={value:void 0};try{b=fne.load(h).Orientation||b}catch(K){console.log(K)}w=i.width>i.height?(i.width>o.maxWidth?o.maxWidth:i.width)/i.width:(i.height>o.maxHeight?o.maxHeight:i.height)/i.height;const R=yield e.getBrowserAutoRotate(),G=yield mne.compress(n,{height:i.height,width:i.width,quality:o.quality,type:e.createMimeType(o.outputFormat),scale:w,orientation:R?void 0:b.value});s(G)}catch(h){console.warn(h),a()}});return function(){return u.apply(this,arguments)}}();i.addEventListener("load",c),i.addEventListener("error",a);try{i.src=yield n.toBase64()}catch(u){a()}});return function(s,a){return r.apply(this,arguments)}}())})()}static createMimeType(n){return"image/".concat(n)}}let ZC=(()=>{class n{static bytesFormat(e,i=0){let r=Math.floor(Math.log(e)/Math.log(1e3));return"".concat(parseFloat((e/Math.pow(1e3,r)).toFixed(i))).concat(n.sizeStrings[r])}}return n.sizeStrings=["B","KB","MB"],n})();const SIt=[{id:"message_1",value:"emoji_angel"},{id:"message_10",value:"emoji_angry"},{id:"message_11",value:"emoji_bandit"},{id:"message_12",value:"emoji_blink"},{id:"message_13",value:"emoji_cool"},{id:"message_14",value:"emoji_crazy"},{id:"message_15",value:"emoji_cry"},{id:"message_16",value:"emoji_evilLaugh"},{id:"message_17",value:"emoji_glasses"},{id:"message_19",value:"emoji_goldTooth"},{id:"message_2",value:"emoji_guilty"},{id:"message_20",value:"emoji_handwave"},{id:"message_21",value:"emoji_kiss"},{id:"message_22",value:"emoji_laugh"},{id:"message_23",value:"emoji_laughTears"},{id:"message_24",value:"emoji_money"},{id:"message_4",value:"emoji_party"},{id:"message_5",value:"emoji_sad"},{id:"message_6",value:"emoji_sleep"},{id:"message_7",value:"emoji_smile"},{id:"message_8",value:"emoji_thumbsUp"},{id:"message_9",value:"emoji_worried"}];function wIt(t,n){if(1&t){const o=Ce();p(0,"div",2),Y("click",function(){const r=oe(o).$implicit;return re(_().select(r))}),B(1,"img",3),m()}if(2&t){const o=n.$implicit;l("scaleFactor",.94),d(),l("imgSrc",o.url)}}let ECe=(()=>{var t;class n{constructor(e,i,r){this.emojis=[],this.soundService=r,this.inventory=e,this.urlService=i,this.selectEmoji=new ke}ngOnInit(){this.emojis=this.emojis.concat(this.createInventoryEmojisList()),this.emojis=this.emojis.concat(this.createDefaultEmojisList())}select(e){this.soundService.play(dn.Click),this.selectEmoji.emit(e)}trackByFn(e,i){return i.url}createDefaultEmojisList(){return SIt.map(e=>({url:this.urlService.getImageUrl("game/emoticons/".concat(e.value,".png")),type:UI.Client,info:{id:e.value}}))}createInventoryEmojisList(){const e=[];return this.inventory.getEquippedItemsByType([Fe.TG.EmojiSet]).forEach(i=>{e.push(...i.item.data.list.map(r=>({url:this.urlService.createCdnPath({url:r}),type:UI.Cdn,info:{url:r}})))}),e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(cc),g(ii),g(Mo))},t.\u0275cmp=pe({type:t,selectors:[["message-input-emoji-list"]],outputs:{selectEmoji:"selectEmoji"},decls:2,vars:2,consts:[[1,"message-input__emoji-container"],["class","message-input__emoji-item","click-feedback","",3,"scaleFactor","click",4,"ngFor","ngForOf","ngForTrackBy"],["click-feedback","",1,"message-input__emoji-item",3,"scaleFactor","click"],["empty-placeholder","",1,"message-input__emoji-image",3,"imgSrc"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,wIt,2,2,"div",1),m()),2&e&&(d(),l("ngForOf",i.emojis)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,po,$o],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.message-input__emoji-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:row wrap;overflow:auto}.message-input__emoji-item[_ngcontent-%COMP%]{cursor:pointer;width:10%}@media screen and (max-width: 768px){.message-input__emoji-item[_ngcontent-%COMP%]{width:12.5%}}.message-input__emoji-image[_ngcontent-%COMP%]{width:80%;margin:auto}"],changeDetection:0}),n})();var p2=ve.EIcons,q0=nt.EModuleAction;const TIt=["input"],PIt=["imageInput"];function IIt(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"textarea",7,8),Y("click",function(){return oe(o),re(_(2).closeDrawer())})("focus",function(i){return oe(o),re(_(2).onFocus(i))})("blur",function(i){return oe(o),re(_(2).onBlur(i))}),V(3,"translate"),m()()}if(2&t){const o=_(2);d(),l("placeholder",$(3,1,o.placeholder))}}const MIt=t=>[t],OIt=t=>({name:t});function EIt(t,n){if(1&t){const o=Ce();p(0,"button-icon",14),Y("onClick",function(){return oe(o),re(_().$implicit.onClick())}),m()}if(2&t){const o=_().$implicit,e=_(3);l("ngClass",ne(6,MIt,o.class||""))("icon",ne(8,OIt,o.icon))("buttonModifier",o.modifier)("bclass",o.bclass||"")("disabled",e.isDisabled()),Hn("data-cy","chat"+o.type+"Button")}}function xIt(t,n){if(1&t&&(Tn(0),U(1,EIt,1,10,"button-icon",13),Pn()),2&t){const o=n.$implicit;d(),l("ngIf",!o.isHidden())}}function AIt(t,n){if(1&t){const o=Ce();p(0,"div",9),U(1,xIt,2,1,"ng-container",10),p(2,"input-file",11,12),Y("select",function(i){return oe(o),re(_(2).onImageSelect(i))}),m()()}if(2&t){const o=_(2);d(),l("ngForOf",o.buttons)}}function RIt(t,n){if(1&t){const o=Ce();p(0,"form",3),Y("submit",function(){return oe(o),re(_().sendTextAreaMessage())})("keydown.enter",function(i){return oe(o),re(_().onKeydownEnter(i))})("keyup.enter",function(){return oe(o),re(_().onKeyupEnter())}),U(1,IIt,4,3,"div",4)(2,AIt,4,1,"div",5),m()}if(2&t){const o=_();l("formGroup",o.messageForm),d(),l("ngIf",o.isActionAllowed(o.EAction.SendTextMessage)),d(),l("ngIf",null==o.buttons?null:o.buttons.length)}}function kIt(t,n){if(1&t){const o=Ce();p(0,"message-input-emoji-list",17),Y("selectEmoji",function(i){return oe(o),re(_(2).onSelectEmoji(i))}),m()}}function LIt(t,n){if(1&t&&(p(0,"div",15),U(1,kIt,1,0,"message-input-emoji-list",16),m()),2&t){const o=_();d(),l("ngIf",o.drawerTab===o.EMessageInputTab.Emoji)}}const DIt=(t,n)=>({opened:t,"no-actions":n});let VM=(()=>{var t;class n{get locked(){return this._locked}get muted(){return this._muted}get isInMaintenance(){return this._isInMaintenance}get isKicked(){return this._isKicked}set locked(e){this._locked=e,e?this.goToLockedState():this.goToDefaultState()}set muted(e){this._muted=e,e&&e.isMuted?this.goToLockedState():this.goToDefaultState()}set isInMaintenance(e){this._isInMaintenance=e,e?this.goToLockedState():this.goToDefaultState()}set isKicked(e){this._isKicked=e,e?this.goToLockedState():this.goToDefaultState()}constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){this.buttonModifier=ve.EButtonModifier,this.EMessageInputTab=d2,this.EAction=q0,this.onOrientationChange=()=>{this.blur(),this.cdr.detectChanges()},this.onValueChange=te=>{te&&te.length>this.maxMessageLength&&this.messageForm.get("message").setValue(te.slice(0,this.maxMessageLength)),cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.cdr.detectChanges()})},this.onVoiceMessageResult=te=>{this.ngZone.run(()=>{te.data&&this.sendMessage(Vh.createNewVoiceMessage("data:audio/mp3;base64,".concat(te.data),te.duration))}),this.backgroundMusicService.setRecordUIOpened(!1),this.backgroundMusicService.resume(),this.isRecordUIOpened=!1,this.cdr.detectChanges()},this.datePipe=a,this.translatePipe=s,this.send=new ke,this.textInputFocus=new ke,this.textInputBlur=new ke,this.openDrawer=new ke,this.formBuilder=e,this.appService=c,this.fieldValidatorFactory=i,this.renderer=r,this.mainConfig=u,this.permissions=w,this.backgroundMusicService=h,this.ngZone=b,this.messageValidator=R,this.toaster=G,this.cdr=K}ngOnInit(){this.config=this.mainConfig.social.chat[this.chat],this.maxMessageLength=this.mainConfig.core.validations.formFields.chatMessage.maxLength,this.buttons=this.createButtons(),this.messageForm=this.formBuilder.group({message:[{value:"",disabled:this.isDisabled()||!this.isActionAllowed(q0.SendTextMessage)},Ln.compose([...this.fieldValidatorFactory.createChatMessageValidator().validators,Ln.required])]}),this.orientationChangeListener=this.renderer.listen("window","orientationchange",this.onOrientationChange),this.valueChangeSubscription=this.messageForm.get("message").valueChanges.subscribe(this.onValueChange)}ngOnDestroy(){if(cancelAnimationFrame(this.rafId),this.textInputFocus&&this.textInputFocus.unsubscribe(),this.textInputBlur&&this.textInputBlur.unsubscribe(),this.orientationChangeListener&&this.orientationChangeListener(),this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe(),this.appService.isMobileApp()&&this.isRecordUIOpened){const e={action:wi.ERecordUIAction.Hide};this.appService.getMobileAppService().messages().recordMicrophone(e,this.onVoiceMessageResult)}}onSelectEmoji(e){const i={type:e.type,info:e.info};this.closeDrawer(),this.sendMessage(Vh.createNewEmojiMessage(i)),this.cdr.detectChanges()}onImageSelect(e){var i=this;return f(function*(){if(e.file)try{const r=i.messageValidator.validateImageFileType(e.file,i.chat);if(!r.isValid){if(r.error&&r.error instanceof Yo.DataFormatNotAllowedError){const c=ZC.bytesFormat(i.config.images.maxImageSize);i.toaster.error("GALLERY.IMAGE_UPLOAD_ERROR",[c])}return}const s=yield GM.processByImageConfig(e.file,i.config.images),a=yield s.toBase64();i.sendMessage(Vh.createNewImageMessage(a,s))}catch(r){console.warn(r)}finally{i.cdr.detectChanges()}})()}clear(){this.messageForm.reset(),this.messageForm.value.message="",this.cdr.detectChanges()}focus(){this.input&&this.input.nativeElement.focus(),this.cdr.detectChanges()}blur(){this.input&&this.input.nativeElement.blur(),this.cdr.detectChanges()}select(){this.input&&this.input.nativeElement.select(),this.cdr.detectChanges()}onKeydownEnter(e){this.cdr.detectChanges(),e&&e.preventDefault(),!this.isDisabled()&&(this.sendTextAreaMessage(),this.cdr.detectChanges())}onKeyupEnter(){}onFocus(e){this.textInputFocus.emit(e)}onBlur(e){this.textInputBlur.emit(e)}sendTextAreaMessage(){this.cdr.detectChanges(),!this.isTextAreaEmpty()&&(this.sendMessage(Vh.createNewTextMessage(this.messageForm.value.message)),this.cdr.detectChanges())}sendMessage(e){this.send.emit(e),this.cdr.detectChanges()}isTextAreaEmpty(){return!this.messageForm.value.message||""===this.messageForm.value.message.trim()}goToLockedState(){if(this.locked)this.placeholder="PLACEHOLDERS.LOCKED_TOPIC";else if(this.muted&&this.muted.isMuted){const e=[this.datePipe.transform(this.muted.expiresAt,"dMMMMYYYY")];this.placeholder=this.translatePipe.transform("CHAT.GLOBAL_CHAT.MUTED_DATE",e)}else this.isInMaintenance?this.placeholder="CHAT.CHAT_MAINTENANCE":this.isKicked&&(this.placeholder="CHAT.CURRENT_PLAYER_KICKED");this.messageForm&&this.messageForm.reset({message:{value:"",disabled:this.isDisabled()}}),this.cdr.detectChanges()}goToDefaultState(){this.isDisabled()||(this.placeholder="PLACEHOLDERS.ENTER_MESSAGE",this.messageForm&&this.messageForm.reset({message:{value:"",disabled:this.isDisabled()}})),this.cdr.detectChanges()}openDrawerTab(e){this.drawerTab=e,this.openDrawer.emit(this.drawerTab),this.cdr.detectChanges()}closeDrawer(){this.openDrawerTab(void 0)}isActionAllowed(e){const i=Wd.getChatModuleByKey(this.chat);return this.permissions.getActionPermission(i,e).isPermitted}isDisabled(){return this.locked||this.isInMaintenance||this.isKicked||this.muted&&this.muted.isMuted}createButtons(){return[{icon:p2.SEND,type:n.EMessageInputButtonType.TextMessage,class:"msg-input__send-button",modifier:ve.EButtonModifier.BUTTON_ACTION,isHidden:()=>!this.isSendButtonVisible()||!this.isActionAllowed(q0.SendTextMessage),onClick:()=>{this.isTextAreaEmpty()||this.select(),this.sendTextAreaMessage(),this.closeDrawer(),this.cdr.detectChanges()}},{icon:p2.PhotoIcon,type:n.EMessageInputButtonType.Image,bclass:"gf__button--bclass",modifier:ve.EButtonModifier.BUTTON_TRANSPARENT,isHidden:()=>this.isSendButtonVisible()||!this.isActionAllowed(q0.SendImageMessage),onClick:()=>{this.closeDrawer(),this.imageInput.selectFile(),this.cdr.detectChanges()}},{icon:p2.IN_GAME_EMOJI,type:n.EMessageInputButtonType.Emoji,bclass:"gf__button--bclass",modifier:ve.EButtonModifier.BUTTON_TRANSPARENT,isHidden:()=>this.isSendButtonVisible()||!this.isActionAllowed(q0.SendEmojiMessage),onClick:()=>{this.drawerTab!==d2.Emoji?this.openDrawerTab(d2.Emoji):this.closeDrawer(),this.cdr.detectChanges()}},{icon:p2.Microphone,type:n.EMessageInputButtonType.Voice,bclass:"gf__button--bclass",modifier:ve.EButtonModifier.BUTTON_TRANSPARENT,isHidden:()=>this.isSendButtonVisible()||!this.appService.isMobileApp()||!this.isActionAllowed(q0.SendVoiceMessage),onClick:()=>{this.closeDrawer();const e=this.appService.getMobileAppService().messages();this.backgroundMusicService.setRecordUIOpened(!0),this.backgroundMusicService.pause();const i={action:wi.ERecordUIAction.Show,type:wi.ERecordUIType.Manual,durationLimitSeconds:this.config.voiceMessageDurationLimit};this.isRecordUIOpened=!0,e.recordMicrophone(i,this.onVoiceMessageResult),this.cdr.detectChanges()}}]}isSendButtonVisible(){return this.messageForm.value.message&&""!==this.messageForm.value.message.trim()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(td),g(wa),g(ji),g(qe),g(kp),g(Qt),g(Dr),g(X6),g(an),g(Ti),g(gC),g(Dt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["message-input"]],viewQuery:function(e,i){if(1&e&&($e(TIt,5),$e(PIt,5)),2&e){let r;je(r=He())&&(i.input=r.first),je(r=He())&&(i.imageInput=r.first)}},inputs:{locked:"locked",muted:"muted",isInMaintenance:"isInMaintenance",isKicked:"isKicked",chat:"chat"},outputs:{send:"send",textInputFocus:"textInputFocus",textInputBlur:"textInputBlur",openDrawer:"openDrawer"},decls:3,vars:6,consts:[[1,"gf__container--input",3,"ngClass"],["class","gf__form--submit","noValidate","",3,"formGroup","submit","keydown.enter","keyup.enter",4,"ngIf"],["class","gf__input--drawer",4,"ngIf"],["noValidate","",1,"gf__form--submit",3,"formGroup","submit","keydown.enter","keyup.enter"],["class","gf__container--message-input",4,"ngIf"],["class","gf__container--message-input-actions",4,"ngIf"],[1,"gf__container--message-input"],["formControlName","message",1,"gf__input--message",3,"placeholder","click","focus","blur"],["input",""],[1,"gf__container--message-input-actions"],[4,"ngFor","ngForOf"],["data-cy","fileInputFieldParent",1,"is-hidden",3,"select"],["imageInput",""],["class","gf__form--button gf__button",3,"ngClass","icon","buttonModifier","bclass","disabled","onClick",4,"ngIf"],[1,"gf__form--button","gf__button",3,"ngClass","icon","buttonModifier","bclass","disabled","onClick"],[1,"gf__input--drawer"],[3,"selectEmoji",4,"ngIf"],[3,"selectEmoji"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,RIt,3,3,"form",1)(2,LIt,2,1,"div",2),m()),2&e&&(l("ngClass",cn(3,DIt,i.drawerTab,i.buttons&&!i.buttons.length)),d(),l("ngIf",i.messageForm),d(),l("ngIf",i.drawerTab))},dependencies:[Xe,Mt,Ne,Su,xb,Ql,yu,wl,Yl,ei,A0,ECe,qe],styles:['[_nghost-%COMP%]{display:block}.gf__container--input[_ngcontent-%COMP%]{position:relative;flex-flow:row wrap;height:100%;padding:.5rem 0 0 2%}.gf__container--input.no-actions[_ngcontent-%COMP%]{padding-right:2%}.gf__container--input.opened[_ngcontent-%COMP%]{transition:transform .2s ease-in-out;transform:translateY(-100%) translateY(9rem)}@media screen and (max-width: 768px){.gf__container--input.opened[_ngcontent-%COMP%]{transform:translateY(-100%) translateY(6rem)}}.gf__form--submit[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;flex-flow:row nowrap;height:9rem;padding-bottom:1rem}@media screen and (max-width: 768px){.gf__form--submit[_ngcontent-%COMP%]{height:6rem}}.gf__container--message-input[_ngcontent-%COMP%]{position:relative;flex-grow:1;height:100%}.gf__container--message-input[_ngcontent-%COMP%]:focus{border:none;outline:none}.gf__container--message-input[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;right:-1.3rem;width:0;height:0}.gf__container--message-input-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;min-width:7rem}.gf__input--message[_ngcontent-%COMP%]{width:100%;height:100%;margin:0;padding:.75rem;font-size:1.4rem;resize:none;max-width:100%;max-height:100%;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.gf__input--message[_ngcontent-%COMP%]:focus{outline:none}.gf__button[_ngcontent-%COMP%]{width:4rem;height:5rem;border:none;cursor:pointer;display:flex;justify-content:center;align-items:center;outline:0;margin:0 .5rem;font-size:3rem}.gf__button[_ngcontent-%COMP%]:first-of-type{margin-left:.75rem}.gf__button[_ngcontent-%COMP%]:last-of-type{margin-right:.75rem}.gf__button[_ngcontent-%COMP%]:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media screen and (max-width: 768px){.gf__button[_ngcontent-%COMP%]{width:3rem;height:4rem;margin:0 .25rem;font-size:2.5rem}}.gf__input--drawer[_ngcontent-%COMP%]{height:calc(100% - 9rem);max-height:19rem}@media screen and (max-width: 768px){.gf__input--drawer[_ngcontent-%COMP%]{max-height:16rem}}.is-hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EMessageInputButtonType||(t.EMessageInputButtonType={})).Emoji="Emoji",o.TextMessage="SendMessage",o.Image="Image",o.Voice="Voice"}(VM||(VM={}));var ps=function(t){return t.Delete="delete",t.Report="report",t.Kick="kick",t.Send="send",t}(ps||{});class Bj{constructor(n,o,e){this.chat="private",this.model={...n,messagesCount:void 0,likes:void 0,user:n.getConversationPartner().profile,message:{...n.getLastMsg(),getSender:()=>n.getLastMsg().getSender().profile}},this.ui={actions:Bj.createActions(n,o,e,this.chat),hasAvatar:!n.isAdmin,visible:!0,isSticky:!!n.displayOrder,isLocked:!1,isKicked:!1}}static createActions(n,o,e,i){if(o.type===zc.ShareContent)return n.isAdmin?[]:[Yr.ShareContent];const r=[Yr.Select];return!n.isAdmin&&e.getActionPermission(Wd.getChatModuleByKey(i),nt.EModuleAction.Edit).isEnabled&&(r.push(Yr.Delete),r.push(Yr.Mute),r.push(Yr.Pin),r.push(Yr.ToggleDropdown)),r}}class W0{constructor(n,o,e,i,r,s){this.chat="private",this.model={...n,getSender:()=>n.getSender().profile},this.ui={actions:W0.createActions(n,r,s,this.chat),hasAvatar:W0.shouldShowAvatar(n,o,e),isMyMessage:n.senderId===i,isSticky:!1,showUsername:W0.shouldShowUsername(n,o,e),isDeleted:!1,isConversationOwner:!1}}static createActions(n,o,e,i){const r=[];return n.actions.send.error?r.push(ps.Send):!o.isAdmin&&e.getActionPermission(Wd.getChatModuleByKey(i),nt.EModuleAction.Edit).isEnabled&&r.push(ps.Delete),r}static shouldShowAvatar(n,o,e){if(n.isAdmin)return!1;const i=e[o-1];return!i||i.senderId!==n.senderId}static shouldShowUsername(n,o,e){if(!n.isAdmin)return!1;const i=e[o-1];return!i||i.senderId!==n.senderId}}let Nj=(()=>{var t;class n{constructor(e){this.listeners=[],this.elRef=e}ngOnInit(){this.element=this.elRef.nativeElement,this.parentElement=this.element.parentElement}ngOnDestroy(){}animateEnter(){if(!this.enterAnimationClass)return;const e=this.element;e.classList.add(this.enterAnimationClass);const i=r=>{r.target===e&&(e.classList.remove(this.enterAnimationClass),this.removeListener(e,"animationend",i),this.removeListener(e,"animationcancel",i))};this.addListener(e,"animationend",i),this.addListener(e,"animationcancel",i)}animateExit(){if(!this.exitAnimationClass)return;const e=this.element.cloneNode(!0);this.parentElement.insertBefore(e,this.element),e.classList.add(this.exitAnimationClass);const i=r=>{r.target===e&&(e.classList.remove(this.exitAnimationClass),this.removeListener(e,"animationend",i),this.removeListener(e,"animationcancel",i),e.parentElement.removeChild(e))};this.addListener(e,"animationend",i),this.addListener(e,"animationcancel",i)}addListener(e,i,r){e.addEventListener(i,r),this.listeners.push({target:e,event:i,cb:r})}removeListener(e,i,r){e.removeEventListener(i,r),this.listeners=this.listeners.filter(s=>s.target===e&&s.event===i&&s.cb===r)}removeAllListeners(){this.listeners.forEach(e=>e.target.removeEventListener(e.event,e.cb)),this.listeners=[]}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t))},t.\u0275dir=qn({type:t,selectors:[["","animate-element",""]],inputs:{elId:"elId",enterAnimationClass:"enterAnimationClass",exitAnimationClass:"exitAnimationClass"},exportAs:["animate-element"]}),n})();function BIt(t,n){1&t&&B(0,"icon-component",4),2&t&&l("icon",_().content.icon)}const xCe=t=>({"has-icon":t}),NIt=t=>[t];function FIt(t,n){if(1&t&&(p(0,"p",5),H(1),V(2,"translate"),m()),2&t){const o=_();go("color",o.content.color),l("ngClass",ne(7,xCe,o.content.icon)),d(),ze(" ",yt(2,4,o.content.translatableText.key,ne(9,NIt,o.content.translatableText.params))," ")}}function UIt(t,n){if(1&t&&(p(0,"p",6),H(1),m()),2&t){const o=_();go("color",o.content.color),l("ngClass",ne(4,xCe,o.content.icon)),d(),ze(" ",o.content.plainText," ")}}let ACe=(()=>{var t;class n{constructor(e,i){this.content={},this.EChatMessageType=Ii,this.cdr=e,this.cdr.detach(),this.translate=i}ngOnInit(){this.parseMessage(),this.cdr.detectChanges()}ngOnChanges(e){e.message.currentValue&&(this.parseMessage(),this.cdr.detectChanges())}parseMessage(){switch(this.message.type){case Ii.Text:this.content={plainText:this.message.data.body,color:this.getMessageColor()};break;case Ii.GameRoom:this.content={translatableText:{key:"CHAT.GAME_ROOM_MESSAGE_PREVIEW",params:[this.translate.instant("PLATFORM_IDS.".concat(this.message.data.shareData.gameName)).toLowerCase()]},icon:ve.EIcons.INVITE_FRIENDS};break;case Ii.Emoji:this.content={translatableText:{key:"CHAT.EMOJI_MESSAGE_PREVIEW"},icon:ve.EIcons.IN_GAME_EMOJI};break;case Ii.Image:this.content={translatableText:{key:"CHAT.IMAGE_MESSAGE_PREVIEW"},icon:ve.EIcons.PhotoIcon};break;case Ii.Kick:this.content={translatableText:{key:""}};break;case Ii.Voice:this.content={translatableText:{key:"CHAT.VOICE_MESSAGE_PREVIEW"},icon:ve.EIcons.Microphone};break;default:this.content={translatableText:{key:"CHAT.MESSAGE_TYPE_PLACEHOLDER"}}}}isTranslatableText(e){return"object"==typeof e}getMessageColor(){const e=this.message.getSender();let i="";if(e.inventory.items.length){const r=e.inventory.items.find(s=>s.item.type===Fe.TG.MessageColor&&s.equipped);r&&r.item.data.messageColor&&(i=r.item.data.messageColor)}return i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(pi))},t.\u0275cmp=pe({type:t,selectors:[["chat-message-content-preview"]],inputs:{message:"message"},features:[it],decls:4,vars:3,consts:[[1,"message__preview-container"],["class","message__preview--icon",3,"icon",4,"ngIf"],["class","message__preview--text","data-cy","conversationPreviewText",3,"ngClass","color",4,"ngIf"],["class","message__preview--text",3,"ngClass","color",4,"ngIf"],[1,"message__preview--icon",3,"icon"],["data-cy","conversationPreviewText",1,"message__preview--text",3,"ngClass"],[1,"message__preview--text",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,BIt,1,1,"icon-component",1)(2,FIt,3,11,"p",2)(3,UIt,2,6,"p",3),m()),2&e&&(d(),l("ngIf",i.content.icon),d(),l("ngIf",i.content.translatableText),d(),l("ngIf",i.content.plainText))},dependencies:[Xe,Ne,Dn,qe],styles:["[_nghost-%COMP%]{display:block;margin:.5rem 0}.message__preview-container[_ngcontent-%COMP%]{display:flex;width:100%;height:100%}.message__preview--icon[_ngcontent-%COMP%]{font-size:2.2rem}.message__preview--text[_ngcontent-%COMP%]{font-size:1.2rem;width:100%;text-overflow:ellipsis;word-wrap:break-word;overflow:hidden;margin:auto}@media only screen and (max-width: 768px){.message__preview--text[_ngcontent-%COMP%]{margin:.25rem 0}}.message__preview--text.has-icon[_ngcontent-%COMP%]{text-indent:.5rem}"],changeDetection:0}),n})();var RCe=ve.EIcons,GIt=nt.EModuleAction;const VIt=["dropdown"],zIt=t=>({"avatar--container__with--dropdown":t});function jIt(t,n){if(1&t&&B(0,"avatar",17),2&t){const o=_();l("ngClass",ne(4,zIt,o.isActionAvailable(o.EConversationAction.ToggleDropdown)))("user",o.conversation.model.user)("isLink",!0)("hasUsername",!1)}}const HIt=t=>({"animate-counter":t});function qIt(t,n){if(1&t&&B(0,"notification-sign",18),2&t){const o=_();l("ngClass",ne(2,HIt,o.animateCounter))("notificationValue",o.conversation.model.unread)}}function WIt(t,n){1&t&&B(0,"chat-message-content-preview",19),2&t&&l("message",_().conversation.model.message)}const _f=t=>({name:t});function $It(t,n){if(1&t){const o=Ce();p(0,"button-icon",20),Y("onClick",function(i){oe(o);const r=_();return re(r.emitAction(i,r.EConversationAction.Delete,!0))}),V(1,"translate"),m()}if(2&t){const o=_();l("loading",o.conversation.model.actions.delete.inProgress)("bclass","button--delete-format")("icon",ne(6,_f,o.EIcons.DELETE))("title",$(1,4,"CHAT.DELETE"))}}function KIt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",27),Y("onClick",function(i){oe(o);const r=_(2);return re(r.emitAction(i,r.EConversationAction.Delete,!0))}),V(1,"translate"),H(2),V(3,"translate"),m()}if(2&t){const o=_(2);l("bclass","dropdown--item--button")("loading",o.conversation.model.actions.delete.inProgress)("title",$(1,5,"CHAT.DELETE"))("icon",ne(9,_f,o.EIcons.DELETE)),d(2),se($(3,7,"CHAT.DELETE"))}}function ZIt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",28),Y("onClick",function(i){oe(o);const r=_(2);return re(r.emitAction(i,r.EConversationAction.Mute,!0))}),V(1,"translate"),H(2),V(3,"translate"),m()}if(2&t){const o=_(2);l("bclass","dropdown--item--button")("loading",o.conversation.model.actions.mute.inProgress)("title",$(1,5,o.conversation.model.isMuted?"BUTTON.UNMUTE":"BUTTON.MUTE"))("icon",ne(9,_f,o.EIcons.MUTED)),d(2),se($(3,7,o.conversation.model.isMuted?"BUTTON.UNMUTE":"BUTTON.MUTE"))}}function QIt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",29),Y("onClick",function(i){oe(o);const r=_(2);return re(r.emitAction(i,r.EConversationAction.Pin,!0))}),V(1,"translate"),H(2),V(3,"translate"),m()}if(2&t){const o=_(2);l("bclass","dropdown--item--button")("loading",o.conversation.model.actions.pin.inProgress)("title",$(1,5,o.conversation.ui.isSticky?"BUTTON.UNPIN":"BUTTON.PIN"))("icon",ne(9,_f,o.EIcons.PIN)),d(2),se($(3,7,o.conversation.model.displayOrder?"BUTTON.UNPIN":"BUTTON.PIN"))}}function YIt(t,n){if(1&t&&(p(0,"menu-dropdown",21,22)(2,"menu-dropdown-item-wrapper",23),U(3,KIt,4,11,"button-icon-text",24),m(),p(4,"menu-dropdown-item-wrapper",23),U(5,ZIt,4,11,"button-icon-text",25),m(),p(6,"menu-dropdown-item-wrapper",23),U(7,QIt,4,11,"button-icon-text",26),m()()),2&t){const o=_();l("iconStyle","button--dropdown__toggle")("position",o.dropdownMenuPosition.BottomRight)("icon",ne(8,_f,o.EIcons.UTILITY))("containerStyle","chat--conversation__dropdown")("buttonPaddingDirection",o.dropdownButtonPaddingDirection.Vertical),d(3),l("ngIf",o.isActionAvailable(o.EConversationAction.Delete)),d(2),l("ngIf",o.isActionAvailable(o.EConversationAction.Mute)),d(2),l("ngIf",o.isActionAvailable(o.EConversationAction.Pin))}}function JIt(t,n){if(1&t){const o=Ce();p(0,"button-icon",34),Y("onClick",function(i){oe(o);const r=_(2);return re(r.emitAction(i,r.EConversationAction.Like,!0))}),V(1,"translate"),m()}if(2&t){const o=_(2);l("loading",o.conversation.model.actions.like.inProgress)("bclass","button--like-format")("icon",ne(6,_f,o.EIcons.HEART_HOLLOW))("title",$(1,4,"BUTTON.LIKE"))}}function XIt(t,n){if(1&t){const o=Ce();p(0,"button-icon",35),Y("onClick",function(i){oe(o);const r=_(2);return re(r.emitAction(i,r.EConversationAction.Unlike,!0))}),m()}if(2&t){const o=_(2);l("icon",ne(3,_f,o.EIcons.HEART))("bclass","button--like-format")("loading",o.conversation.model.actions.unlike.inProgress)}}function eMt(t,n){if(1&t&&(p(0,"p",36),H(1),V(2,"formatNumber"),m()),2&t){const o=_(2);d(),ze(" ",$(2,1,o.conversation.model.likes),"")}}function tMt(t,n){if(1&t&&(p(0,"div",30),U(1,JIt,2,8,"button-icon",31)(2,XIt,1,5,"button-icon",32)(3,eMt,3,3,"p",33),m()),2&t){const o=_();d(),l("ngIf",o.isActionAvailable(o.EConversationAction.Like)),d(),l("ngIf",o.isActionAvailable(o.EConversationAction.Unlike)),d(),l("ngIf",o.conversation.model.likes)}}function nMt(t,n){if(1&t&&(p(0,"div",30),B(1,"icon-component",37),p(2,"p",38),H(3),V(4,"formatNumber"),m()()),2&t){const o=_();d(),l("icon",o.EIcons.GLOBAL_CHAT),d(2),ze(" ",$(4,2,o.conversation.model.messagesCount),"")}}function iMt(t,n){if(1&t&&B(0,"button-icon",39),2&t){const o=_();l("loading",o.conversation.model.actions.mute.inProgress)("bclass","conv--icon")("icon",ne(3,_f,o.EIcons.MUTED))}}function oMt(t,n){if(1&t&&B(0,"button-icon",40),2&t){const o=_();l("loading",o.conversation.model.actions.pin.inProgress)("bclass","conv--icon")("icon",ne(3,_f,o.EIcons.PIN))}}function rMt(t,n){if(1&t){const o=Ce();p(0,"button-icon",41),Y("onClick",function(i){oe(o);const r=_();return re(r.emitAction(i,r.EConversationAction.ShareContent,!0))}),m()}if(2&t){const o=_();l("icon",ne(3,_f,o.sendButton.icon))("buttonModifier",o.sendButton.modifier)("disabled",o.sendButton.isDisabled)}}function sMt(t,n){if(1&t&&(p(0,"p",42),H(1),m()),2&t){const o=_();d(),se(o.timeText)}}const aMt=t=>({"conversation--unread":t}),cMt=t=>({"container--user-opts-short":t});let zM=(()=>{var t;class n extends Nj{constructor(e,i,r){super(i),this.EIcons=RCe,this.EConversationAction=Yr,this.dropdownMenuPosition=Og.EMenuPosition,this.dropdownButtonPaddingDirection=Og.EButtonPaddingDirection,this.enterAnimationClass="conversation__enter",this.exitAnimationClass="conversation__exit",this.animateCounter=!1,this.sendButton={modifier:ve.EButtonModifier.BUTTON_LIGHT,icon:RCe.SEND,isDisabled:!1},this.EAction=GIt,this.action=new ke,this.cdr=e,this.permissions=r}ngOnInit(){super.ngOnInit(),this.cdr.detach(),this.updateView()}ngOnChanges(e){if(e.conversation&&!e.conversation.firstChange&&e.conversation.previousValue.model.unread!==e.conversation.currentValue.model.unread&&(clearTimeout(this.animateCounterDelay),this.animateCounter=!0,this.animateCounterDelay=setTimeout(()=>{this.animateCounter=!1,this.updateView()},1e3)),(e.chatUsageIntent||e.conversation)&&this.chatUsageIntent.type===zc.ShareContent&&this.chatUsageIntent.data.shareType===pg.Room){const i=-1!==this.conversation.model.sharedRoomsIds.indexOf(this.chatUsageIntent.data.shareData.roomId);this.sendButton.isDisabled=i||this.conversation.ui.isLocked||this.conversation.ui.isKicked}this.updateView()}ngOnDestroy(){clearTimeout(this.animateCounterDelay),super.ngOnDestroy()}emitAction(e,i,r){var s;this.isActionAvailable(i)&&(r&&e.stopPropagation(),(i===Yr.Mute||i===Yr.Pin||i===Yr.Delete)&&(null===(s=this.dropdown)||void 0===s||s.close()),this.action.emit({type:i}),this.updateView())}isActionAvailable(e){return-1!==this.conversation.ui.actions.indexOf(e)}isActionPermitted(e){const i=Wd.getChatModuleByKey(this.conversation.chat);return this.permissions.getActionPermission(i,e).isPermitted}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g($t),g(Ti))},t.\u0275cmp=pe({type:t,selectors:[["chat-conversation"]],viewQuery:function(e,i){if(1&e&&$e(VIt,5),2&e){let r;je(r=He())&&(i.dropdown=r.first)}},inputs:{chatUsageIntent:"chatUsageIntent",timeText:"timeText",conversation:"conversation"},outputs:{action:"action"},features:[mn([{provide:nn,useFactory:o=>new nn("chatConversation",o),deps:[[new jo,new zo,nn]]}]),Ht,it],decls:18,vars:19,consts:[["click-feedback","",1,"conversation--container",3,"ngClass"],[1,"container--single-conversation",3,"click"],["class","avatar--container","data-cy","conversationAvatar",3,"ngClass","user","isLink","hasUsername",4,"ngIf"],[1,"container--user-opts",3,"ngClass"],[1,"text--username"],["data-cy","conversationUsername",3,"userProfile","hasVerifiedBadge"],["class","text--unread","data-cy","conversationUnreadNotification",3,"ngClass","notificationValue",4,"ngIf"],["class","conversation__message--content-preview","data-cy","chatConversationText",3,"message",4,"ngIf"],[1,"conversation__footer"],["class","button--delete-conversation chat--conversation__icon conversation__action","data-cy","chatConversationDelete",3,"loading","bclass","icon","title","onClick",4,"ngIf"],["class","dropdown--button",3,"iconStyle","position","icon","containerStyle","buttonPaddingDirection",4,"ngIf"],["class","conversation__footer--icon-text-wrapper conversation__action",4,"ngIf"],[1,"private-conv-icons"],["class","chat--conv-icons__icon","data-cy","privateFeedConversationMutedIcon",3,"loading","bclass","icon",4,"ngIf"],["class","chat--conv-icons__icon","data-cy","privateFeedConversationPinnedIcon",3,"loading","bclass","icon",4,"ngIf"],["class","conversation__send--button",3,"icon","buttonModifier","disabled","onClick",4,"ngIf"],["class","text--conv-time",4,"ngIf"],["data-cy","conversationAvatar",1,"avatar--container",3,"ngClass","user","isLink","hasUsername"],["data-cy","conversationUnreadNotification",1,"text--unread",3,"ngClass","notificationValue"],["data-cy","chatConversationText",1,"conversation__message--content-preview",3,"message"],["data-cy","chatConversationDelete",1,"button--delete-conversation","chat--conversation__icon","conversation__action",3,"loading","bclass","icon","title","onClick"],[1,"dropdown--button",3,"iconStyle","position","icon","containerStyle","buttonPaddingDirection"],["dropdown",""],[1,"dropdown--item"],["class","dropdown--button conversation__action","data-cy","privateChatConversationDeleteButton",3,"bclass","loading","title","icon","onClick",4,"ngIf"],["class","dropdown--button conversation__action","data-cy","privateChatConversationMuteButton",3,"bclass","loading","title","icon","onClick",4,"ngIf"],["class","dropdown--button conversation__action","data-cy","privateChatConversationPinButton",3,"bclass","loading","title","icon","onClick",4,"ngIf"],["data-cy","privateChatConversationDeleteButton",1,"dropdown--button","conversation__action",3,"bclass","loading","title","icon","onClick"],["data-cy","privateChatConversationMuteButton",1,"dropdown--button","conversation__action",3,"bclass","loading","title","icon","onClick"],["data-cy","privateChatConversationPinButton",1,"dropdown--button","conversation__action",3,"bclass","loading","title","icon","onClick"],[1,"conversation__footer--icon-text-wrapper","conversation__action"],["class","conversation__footer-icon chat--conversation__icon",3,"loading","bclass","icon","title","onClick",4,"ngIf"],["class","conversation__footer-icon chat--conversation__icon",3,"icon","bclass","loading","onClick",4,"ngIf"],["class","conversation__icon-text-value",4,"ngIf"],[1,"conversation__footer-icon","chat--conversation__icon",3,"loading","bclass","icon","title","onClick"],[1,"conversation__footer-icon","chat--conversation__icon",3,"icon","bclass","loading","onClick"],[1,"conversation__icon-text-value"],[1,"conversation__messages-count-icon","conversation__footer-icon","chat--conversation__icon",3,"icon"],["data-cy","chatMessagesCount",1,"conversation__icon-text-value"],["data-cy","privateFeedConversationMutedIcon",1,"chat--conv-icons__icon",3,"loading","bclass","icon"],["data-cy","privateFeedConversationPinnedIcon",1,"chat--conv-icons__icon",3,"loading","bclass","icon"],[1,"conversation__send--button",3,"icon","buttonModifier","disabled","onClick"],[1,"text--conv-time"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),Y("click",function(s){return i.emitAction(s,i.EConversationAction.Select)}),U(2,jIt,1,6,"avatar",2),p(3,"div",3)(4,"p",4),B(5,"username",5),U(6,qIt,1,4,"notification-sign",6),m(),U(7,WIt,1,1,"chat-message-content-preview",7),p(8,"div",8),U(9,$It,2,8,"button-icon",9)(10,YIt,8,10,"menu-dropdown",10)(11,tMt,4,3,"div",11)(12,nMt,5,4,"div",11),m()(),p(13,"div",12),U(14,iMt,1,5,"button-icon",13)(15,oMt,1,5,"button-icon",14),m(),U(16,rMt,1,5,"button-icon",15)(17,sMt,2,1,"p",16),m()()),2&e&&(l("ngClass",ne(15,aMt,i.conversation.model.unread>0)),d(2),l("ngIf",i.conversation.model.user&&i.conversation.ui.hasAvatar),d(),l("ngClass",ne(17,cMt,i.isActionAvailable(i.EConversationAction.ShareContent)&&i.isActionPermitted(i.EAction.SendGameRoomMessage))),d(2),l("userProfile",i.conversation.model.user)("hasVerifiedBadge",!0),d(),l("ngIf",i.conversation.model.unread>0),d(),l("ngIf",i.conversation.model.message),d(2),l("ngIf",i.isActionAvailable(i.EConversationAction.Delete)&&!i.isActionAvailable(i.EConversationAction.ToggleDropdown)),d(),l("ngIf",i.isActionAvailable(i.EConversationAction.ToggleDropdown)&&i.dropdownMenuPosition),d(),l("ngIf",i.conversation.model.actions.like),d(),l("ngIf",null!=i.conversation.model.messagesCount),d(2),l("ngIf",i.conversation.model.isMuted||i.conversation.model.actions.mute.inProgress),d(),l("ngIf",i.conversation.ui.isSticky||i.conversation.model.actions.pin.inProgress),d(),l("ngIf",i.isActionAvailable(i.EConversationAction.ShareContent)&&i.isActionPermitted(i.EAction.SendGameRoomMessage)),d(),l("ngIf",i.timeText))},dependencies:[Xe,Ne,po,Bo,Dn,ei,so,fv,Zp,Og,FL,ACe,qe,Go],styles:["[_nghost-%COMP%]{display:block}.conversation--container[_ngcontent-%COMP%]{display:flex;margin:.5rem}.avatar--container[_ngcontent-%COMP%]{width:6rem;height:6rem}@media screen and (max-width: 768px){.avatar--container[_ngcontent-%COMP%]{width:5rem;height:5rem}}.container--single-conversation[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row;width:100%;padding:1rem;border-radius:.7rem;margin:0 .5rem 0 0}.container--single-conversation[_ngcontent-%COMP%]:hover{cursor:pointer}@media only screen and (max-width: 768px){.container--single-conversation[_ngcontent-%COMP%]{padding:1rem 1.2rem}}.wrapper--conv-opts[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;flex-grow:1}.container--user-opts[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column wrap;width:calc(100% - 8rem);padding:0 .5rem 0 1rem;min-height:6rem}@media only screen and (max-width: 768px){.container--user-opts[_ngcontent-%COMP%]{min-height:5rem;width:calc(100% - 7rem)}}.container--user-opts-short[_ngcontent-%COMP%]{width:calc(100% - 10rem)}@media only screen and (max-width: 768px){.container--user-opts-short[_ngcontent-%COMP%]{width:calc(100% - 9rem)}}.text--username[_ngcontent-%COMP%]{font-size:1.4rem;text-overflow:ellipsis;overflow:hidden;max-width:17rem}.text--last-message[_ngcontent-%COMP%]{font-size:1.2rem;line-height:1.5rem;width:100%;text-overflow:ellipsis;word-wrap:break-word;overflow:hidden;margin:.5rem 0}@media only screen and (max-width: 768px){.text--last-message[_ngcontent-%COMP%]{margin:.25rem 0}}.text--conv-time[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:1rem;font-size:1rem;text-align:right;white-space:nowrap}.text--unread[_ngcontent-%COMP%]{position:absolute;display:inline-block;top:-.3rem;margin-left:.5rem}.animate-counter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_counter-animation .3s ease-in-out;animation-iteration-count:3}.button--arrow[_ngcontent-%COMP%]{position:absolute;top:50%;right:1rem;transform:translateY(-50%)}.icon--pin[_ngcontent-%COMP%]{position:absolute;top:0;right:0}.conversation__footer--icon-text-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1rem}.conversation__footer-icon[_ngcontent-%COMP%]{height:auto;min-height:initial;margin:0;padding:0;min-width:1.4rem}.button--delete-conversation[_ngcontent-%COMP%]{margin:0;padding:0;min-width:1.4rem}.conversation__action[_ngcontent-%COMP%]{height:auto;min-height:initial;margin-right:.5rem}.conversation__icon-text-value[_ngcontent-%COMP%]{text-indent:.5rem}.conversation__footer[_ngcontent-%COMP%]{height:2rem;margin:0;padding:0;display:flex;align-items:center}.conversation__send--button[_ngcontent-%COMP%]{position:absolute;top:50%;right:1rem;transform:translateY(-50%)}.conversation__message--content-preview[_ngcontent-%COMP%]{max-width:100%}.private-conv-icons[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-evenly;position:absolute;top:0;right:.5rem}.dropdown--button[_ngcontent-%COMP%]{height:2rem;margin:0;padding:0;min-width:1.4rem}.dropdown--item[_ngcontent-%COMP%]{padding:.5rem .2rem;display:flex;justify-content:space-between}@keyframes _ngcontent-%COMP%_counter-animation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}"],changeDetection:0}),n})();const lMt=t=>[t];let kCe=(()=>{var t;class n{constructor(e,i,r,s){this.class="",this.appService=e,this.cdr=i,this.navigation=r,this.ngZone=s,this.cdr.detach()}ngOnInit(){this.cdr.detectChanges()}ngOnChanges(e){e.sender&&this.setMessageColor(),this.cdr.detectChanges()}openExternalUrl(e){var i,r;if(null!=e&&null!==(i=e.target)&&void 0!==i&&i.dataset.relativePath)return e&&e.preventDefault(),void this.ngZone.run(()=>{var s;return this.navigation.navigateByUrl(null==e||null===(s=e.target)||void 0===s?void 0:s.dataset.relativePath)});null!=e&&null!==(r=e.target)&&void 0!==r&&r.href&&!0===this.appService.isMobileApp()&&(e&&e.preventDefault(),this.appService.openExternalUrl(e.target.href))}setMessageColor(){if(this.sender.inventory.items.length){const e=this.sender.inventory.items.find(i=>i.item.type===Fe.TG.MessageColor&&i.equipped);this.messageColor=e&&e.item.data.messageColor?e.item.data.messageColor:""}else this.messageColor=""}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(Re),g(Yt),g(an))},t.\u0275cmp=pe({type:t,selectors:[["chat-message-text-content"]],inputs:{text:"text",sender:"sender",class:"class"},features:[it],decls:4,vars:12,consts:[["dir","auto","data-cy","messageTextContainer",1,"msg-text",3,"ngClass","innerHTML","click"]],template:function(e,i){1&e&&(p(0,"span",0),Y("click",function(s){return i.openExternalUrl(s)}),V(1,"safeHtml"),V(2,"linkTransform"),V(3,"desanitize"),m()),2&e&&(go("color",i.messageColor),l("ngClass",ne(10,lMt,i.class))("innerHTML",$(1,4,$(2,6,$(3,8,i.text))),Yn))},dependencies:[Xe,vR,bR,Ta],styles:["[_nghost-%COMP%]{width:100%;display:flex;-webkit-user-select:text;-moz-user-select:text;user-select:text}.msg-text[_ngcontent-%COMP%]{min-height:2rem;width:100%;font-size:1.5rem;word-wrap:break-word;-webkit-user-select:inherit;-moz-user-select:inherit;user-select:inherit;overflow:hidden}"],changeDetection:0}),n})();var Fj=nt.EPermissionModule;function uMt(t,n){1&t&&(p(0,"div",5),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"GAME_HISTORY.TOURNAMENT:BLITZ")))}function dMt(t,n){if(1&t&&(p(0,"div",6),H(1),m()),2&t){const o=_();d(),se(o.content.description)}}function pMt(t,n){if(1&t&&(p(0,"div",7)(1,"container-component",8)(2,"div",9),H(3),V(4,"translate"),m(),p(5,"div",10),H(6),m()(),p(7,"container-component",8)(8,"div",11),H(9),V(10,"translate"),m(),p(11,"div",12),H(12),m()()()),2&t){const o=_();d(3),se($(4,4,"TOURNAMENTS.OPTIONS.players.count")),d(3),se(o.content.playersCount),d(3),se($(10,6,"TOURNAMENTS.ROUNDS_LABEL")),d(3),se(o.content.tournamentRounds)}}const Uj=t=>({icon:t,class:"chat-invite-content__info-box--text"}),hMt=()=>({key:"LOBBY.WIN"});function mMt(t,n){if(1&t&&(p(0,"container-component",8),B(1,"currency-label",13),m()),2&t){const o=_(2);d(),l("textConfig",ne(4,Uj,o.EIcons.OPTION_REWARD))("text",pt(6,hMt))("value",o.content.reward.amount)("type",o.content.reward.currencyType)}}const fMt=()=>({key:"TOURNAMENTS.OPTIONS.totalPool"});function gMt(t,n){if(1&t&&(p(0,"container-component",8),B(1,"currency-label",13),m()),2&t){const o=_(2);d(),l("textConfig",ne(4,Uj,o.EIcons.BET))("text",pt(6,fMt))("value",o.content.totalPool)("type",o.nonGamblingStyle?o.ECurrencyType.Ticket:o.ECurrencyType.Chips)}}const _Mt=()=>({key:"LOBBY.BET"});function vMt(t,n){if(1&t&&(p(0,"div",7)(1,"container-component",8),B(2,"currency-label",13),m(),U(3,mMt,2,7,"container-component",14)(4,gMt,2,7,"container-component",14),m()),2&t){const o=_();d(2),l("textConfig",ne(6,Uj,o.EIcons.BET))("text",pt(8,_Mt))("value",o.content.bet)("type",o.nonGamblingStyle?o.ECurrencyType.Ticket:o.ECurrencyType.Chips),d(),l("ngIf",!o.nonGamblingStyle),d(),l("ngIf",o.content.totalPool)}}let Gj=(()=>{var t;class n{get portrait(){return this.orientation===cs.Portrait}get landscape(){return this.orientation===cs.Landscape&&this.content.roomType!==Jt.RoomType.BlitzTournament}constructor(e,i){this.permissions=i,this.orientation=cs.Portrait,this.EIcons=ve.EIcons,this.ECurrencyType=ln,this.roomType=Jt.RoomType,this.isJoinPermitted=!1,this.nonGamblingStyle=rl.nonGamblingStyleEnabled,this.cdr=e,this.cdr.detach()}ngOnInit(){const e=this.permissions.getActionPermission(this.getModuleByRoomType(this.content.roomType),nt.EModuleAction.Join);this.isJoinPermitted=e.isPermitted,this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}getModuleByRoomType(e){switch(e){case Jt.RoomType.Custom:return Fj.CustomGames;case Jt.RoomType.BlitzTournament:return Fj.CustomBlitzTournaments;default:return Fj.CustomGames}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Ti))},t.\u0275cmp=pe({type:t,selectors:[["chat-share-room-content"]],hostVars:4,hostBindings:function(e,i){2&e&&Uo("share__room-portrait",i.portrait)("share__room-landscape",i.landscape)},inputs:{content:"content",orientation:"orientation"},features:[it],decls:7,vars:8,consts:[[1,"chat-invite-content__header",3,"ngClass"],["empty-placeholder","",1,"chat-invite-content__image",3,"imgSrc"],["class","chat-invite-content__room--type__label",4,"ngIf"],["class","chat-invite-content__room--description",4,"ngIf"],["class","chat-invite-content__info",4,"ngIf"],[1,"chat-invite-content__room--type__label"],[1,"chat-invite-content__room--description"],[1,"chat-invite-content__info"],[1,"chat-invite-content__info-box"],[1,"chat-invite-content__players--count__label"],[1,"chat-invite-content__players--count"],[1,"chat-invite-content__tournament--count__label"],[1,"chat-invite-content__tournament--count"],[1,"chat-invite-content__currency-label",3,"textConfig","text","value","type"],["class","chat-invite-content__info-box",4,"ngIf"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"img",1),V(2,"transformUrl"),m(),U(3,uMt,3,3,"div",2)(4,dMt,2,1,"div",3)(5,pMt,13,8,"div",4)(6,vMt,5,9,"div",4)),2&e&&(l("ngClass",i.content.roomType),d(),l("imgSrc",$(2,6,"platform-logos/"+i.content.gameName+".svg")),d(2),l("ngIf",i.content.roomType===i.roomType.BlitzTournament),d(),l("ngIf",i.content.description),d(),l("ngIf",i.content.playersCount&&i.content.tournamentRounds),d(),l("ngIf",!i.isJoinPermitted&&!i.nonGamblingStyle||i.isJoinPermitted))},dependencies:[Xe,Ne,$o,Yh,Ga,qe,uo],styles:["[_nghost-%COMP%]{width:100%}.share__room-landscape[_nghost-%COMP%]{display:flex!important}.share__room-landscape[_nghost-%COMP%]   .chat-invite-content__header[_ngcontent-%COMP%]{display:flex;width:auto;justify-content:center}.share__room-landscape[_nghost-%COMP%]   .chat-invite-content__info[_ngcontent-%COMP%]{flex-flow:column;align-items:center;padding:0 1rem;width:auto;flex-grow:1;margin:0}.share__room-landscape[_nghost-%COMP%]   .chat-invite-content__info-box[_ngcontent-%COMP%]{height:auto;margin:.5rem 0;width:100%;padding:0 2rem}@media only screen and (max-width: 568px){.share__room-landscape[_nghost-%COMP%]   .chat-invite-content__info-box[_ngcontent-%COMP%]{padding:0 1rem}}@media only screen and (max-width: 768px){.share__room-landscape[_nghost-%COMP%]   .chat-invite-content__currency-label[_ngcontent-%COMP%]{margin:0}}.chat-invite-content__header[_ngcontent-%COMP%]{width:100%;max-height:100%;flex-grow:1;height:17rem;text-align:center}.chat-invite-content__header.blitzTournament[_ngcontent-%COMP%]{height:5rem}.chat-invite-content__header.blitzTournament[_ngcontent-%COMP%] > .chat-invite-content__image[_ngcontent-%COMP%]{max-height:100%}.chat-invite-content__image[_ngcontent-%COMP%]{width:80%;max-height:70%;display:block;margin:auto}.chat-invite-content__info[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:1rem 0;width:100%}.chat-invite-content__info-box[_ngcontent-%COMP%]{width:48%;max-width:15rem;margin:auto;text-align:center}.chat-invite-content__currency-label[_ngcontent-%COMP%]{margin:.5rem 0}.chat-invite-content__info-box--text[_ngcontent-%COMP%]{text-indent:.5rem;font-weight:600}"],changeDetection:0}),n})();var Vj=nt.EPermissionModule,LCe=nt.EModuleAction;const bMt=t=>({name:t}),CMt=t=>[t];function yMt(t,n){if(1&t){const o=Ce();p(0,"div",2)(1,"button-icon-text",3),Y("onClick",function(){return oe(o),re(_().joinButton.onClick())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_();d(),l("buttonModifier",o.joinButton.modifier)("icon",ne(8,bMt,o.joinButton.icon))("loading",o.joinButton.isLoading)("disabled",o.joinButton.isDisabled),d(),ze(" ",yt(3,5,o.joinButton.text.key,ne(10,CMt,o.joinButton.text.params))," ")}}let DCe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.playClient=e,this.navigation=i,this.cdr=r,this.toast=s,this.store=a,this.popup=c,this.analyticsTracking=u,this.permissions=h,this.chatAnalytics=b,this.offerService=w,this.EIcons=ve.EIcons,this.joinButton={modifier:ve.EButtonModifier.BUTTON_ATTENTION,text:{key:"CUSTOM_GAMES.JOIN_GAME"},isDisabled:!1,icon:void 0,isLoading:!1,onClick:()=>this.join()},this.ECurrencyType=ln,this.listeners=new ie.List,this.subscriptions=new ie.List,this.onPlayClientStateTransition=R=>{this.onUpdate()}}ngOnInit(){this.content=this.message.model.data.shareData;const e=this.permissions.getModuleActionConfig(this.getModuleByRoomType(this.content.roomType),LCe.Join);this.minLevel=Math.max(e.requirements.level,this.content.requirements.minLevel),this.listeners.add(this.playClient.stateEvents.onClientStateTransition(this.onPlayClientStateTransition)),this.subscriptions.add(this.store.subscribeUserState().subscribe(this.onUserStateUpdate.bind(this)))}ngOnDestroy(){this.listeners.forEach(e=>e.detach()),this.subscriptions.forEach(e=>e.unsubscribe()),this.popup.hide(this.popupId)}join(){var e=this;return f(function*(){const i=new Jc.DefaultEvent(e.chatAnalytics.getAnalyticsCategory(e.message),ds.EChatAction.JoinGamePressed);e.analyticsTracking.sendEvent(i);const r=e.store.selectUserState();if(r.profile.level<e.minLevel)return void(e.popupId=e.popup.show("POPUP.ROOM_MIN_LEVEL_NOT_MET",[e.minLevel]));const s=e.permissions.getActionPermission(e.getModuleByRoomType(e.content.roomType),LCe.Join);if(s.isPermitted)if(r.wallet.chips<e.content.bet)e.offerService.offerCurrency({targetValue:e.content.bet,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}});else try{yield e.playClient.acceptInvite({id:e.content.roomId,type:e.content.roomType,game:e.content.gameName},{roomCode:e.content.invitationCode}),e.navigation.closeSecondaryOutlets({ignoreGuards:!0})}catch(a){console.warn(a),a instanceof lt.NetworkError?e.toast.error("ERRORS.CONNECTION_ERROR"):a===Ds.ServerDisconnect||a instanceof et.Timeout||a instanceof lt.RoomConnectReject?e.toast.warn("CUSTOM_GAMES.ROOM_DESTROYED"):a instanceof et.StateError?e.toast.warn("GAME_INVITE.INACTIVE"):a instanceof et.Duplication?e.toast.warn("ERRORS.SEAT_TAKEN"):a instanceof lt.GenericError?e.toast.warn("CUSTOM_GAMES.OWNER_REMOVED_YOU"):a instanceof lt.ActionInProgress?e.toast.warn("PLEASE_WAIT"):a instanceof Cr?console.warn("Accept promise cancelled"):e.toast.warn("ERRORS.SOMETHING_WRONG")}else s.vipRequirement.isFulfilled?s.roleRequirement.isFulfilled||e.toast.error("POPUP.DISABLED_FROM_CONFIG"):e.popupId=e.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]})})()}onUpdate(){const e=this.playClient.currentPlayClient,i=e&&e.state.current?e.state.getCurrentState().stateName:void 0,r=e&&e.activeClientModel?e.activeClientModel:void 0,s=r&&r.currentRoom?r.currentRoom:void 0;r&&r.acceptInviteModel&&r.acceptInviteModel.viewModel.id===this.content.roomId&&(!s||s.state.current&&s.state.current.stateName===Ve.ERoomState.Init)||i===yn.RoomFound||i===yn.Active?(this.joinButton.isLoading=!1,this.joinButton.isDisabled=!0):(this.joinButton.isDisabled=!1,this.joinButton.isLoading=!1),this.cdr.detectChanges()}onUserStateUpdate(e){e.profile.level<this.minLevel?(this.joinButton.text={key:"TEXT.LEVEL",params:[this.minLevel]},this.joinButton.icon=ve.EIcons.LOCKER,this.joinButton.isDisabled=!0):(this.joinButton.text={key:"CUSTOM_GAMES.JOIN_GAME"},this.joinButton.icon=void 0,this.onUpdate()),this.cdr.detectChanges()}getModuleByRoomType(e){switch(e){case Jt.RoomType.Custom:return Vj.CustomGames;case Jt.RoomType.BlitzTournament:return Vj.CustomBlitzTournaments;default:return Vj.CustomGames}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oo),g(Yt),g(Re),g(Dt),g(J),g(Cn),g(yi),g(Ti),g(ds),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["chat-message-invite-content"]],inputs:{message:"message"},decls:2,vars:2,consts:[[1,"chat-invite-content__room",3,"content"],["class","chat-invite-content__footer",4,"ngIf"],[1,"chat-invite-content__footer"],[1,"chat-invite-content__button",3,"buttonModifier","icon","loading","disabled","onClick"]],template:function(e,i){1&e&&(B(0,"chat-share-room-content",0),U(1,yMt,4,12,"div",1)),2&e&&(l("content",i.content),d(),l("ngIf",!i.message.ui.isMyMessage))},dependencies:[Ne,so,Gj,qe],styles:["[_nghost-%COMP%]{width:100%}.chat-invite-content__room[_ngcontent-%COMP%]{display:block}.chat-invite-content__footer[_ngcontent-%COMP%]{width:100%;justify-content:center}.chat-invite-content__button[_ngcontent-%COMP%]{width:90%}"],changeDetection:0}),n})();const SMt=t=>({"my-message":t});let BCe=(()=>{var t;class n{constructor(e,i){this.cdr=e,this.cdr.detach(),this.urlService=i}ngOnInit(){this.cdr.detectChanges()}ngOnChanges(e){this.parseMessage(),this.cdr.detectChanges()}parseMessage(){const e=this.message.model.data;switch(e.type){case UI.Client:this.url=this.urlService.getImageUrl("game/emoticons/".concat(e.info.id,".png"));break;case UI.Cdn:this.url=this.urlService.createCdnPath({url:e.info.url})}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["chat-message-emoji-content"]],inputs:{message:"message"},features:[it],decls:2,vars:4,consts:[[1,"chat-emoji-content-container",3,"ngClass"],["empty-placeholder","",1,"chat-emoji-content-img",3,"imgSrc"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"img",1),m()),2&e&&(l("ngClass",ne(2,SMt,i.message.ui.isMyMessage)),d(),l("imgSrc",i.url))},dependencies:[Xe,$o],styles:["[_nghost-%COMP%]{width:100%}.chat-emoji-content-container[_ngcontent-%COMP%]{width:100%;text-align:left}.chat-emoji-content-container.my-message[_ngcontent-%COMP%]{text-align:right}.chat-emoji-content-img[_ngcontent-%COMP%]{display:block;pointer-events:none;height:5rem;width:5rem;min-width:5rem}"],changeDetection:0}),n})();const wMt=["container"];let NCe=(()=>{var t;class n{constructor(e,i,r,s){this.photoFitType=vv.EPhotoFitType.Contain,this.imageSlider=e,this.cdr=i,this.cdr.detach(),this.analyticsTracking=r,this.chatAnalytics=s}ngOnInit(){this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}onClick(){this.imageSlider.open([{url:this.message.model.data.fullSizedUrl}]);const i=new Jc.DefaultEvent(this.chatAnalytics.getAnalyticsCategory(this.message),ds.EChatAction.ImageLightboxOpened);this.analyticsTracking.sendEvent(i)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(wM),g(Re),g(yi),g(ds))},t.\u0275cmp=pe({type:t,selectors:[["chat-message-image-content"]],viewQuery:function(e,i){if(1&e&&$e(wMt,7,$t),2&e){let r;je(r=He())&&(i.container=r.first)}},inputs:{message:"message"},features:[it],decls:3,vars:2,consts:[["click-feedback","","data-cy","messageImageContainer",1,"chat-image-content-container",3,"click"],["container",""],[3,"url","photoFitType"]],template:function(e,i){1&e&&(p(0,"container-component",0,1),Y("click",function(){return i.onClick()}),B(2,"photo-content",2),m()),2&e&&(d(2),l("url",i.message.model.data.thumbnailUrl)("photoFitType",i.photoFitType))},dependencies:[po,Ga,vv],styles:["[_nghost-%COMP%]{width:100%}.chat-image-content-container[_ngcontent-%COMP%]{display:flex;cursor:pointer;position:relative;overflow:hidden;height:auto;margin:auto;width:20rem;max-width:100%}.chat-image-content-img[_ngcontent-%COMP%]{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;pointer-events:none;max-width:10%;max-height:10%;top:50%;left:50%;transform:translate(-50%,-50%) scale(10)}"],changeDetection:0}),n})();const TMt=t=>({name:t});let h2=(()=>{var t;class n{constructor(e,i,r,s,a){this.contextTreeService=a,this.duration=0,this.button={icon:ve.EIcons.REMATCH_PLAY_ICON,state:n.EPlayState.Play,isLoading:!1},this.listeners=new ie.List,this.onLoad=()=>{this.button.isLoading=!1,this.cdr.detectChanges()},this.onPlay=()=>{const c=new Jc.DefaultEvent(ds.getCategoryByConfigKey(this.message.chat),ds.EChatAction.VoiceMessagePlayed,this.contextTreeService.getContext());this.analyticsTracking.sendEvent(c),this.updateProgressBar(this.audio.currentTime,this.message.model.data.duration),this.button.icon=ve.EIcons.PauseIcon,this.button.state=n.EPlayState.Pause,this.startUpdateBarCycle(),this.cdr.detectChanges()},this.onStop=()=>{this.stopUpdateCycle(),this.button.icon=ve.EIcons.PlayIcon,this.button.state=n.EPlayState.Play,this.updateProgressBar(this.audio.currentTime,this.message.model.data.duration),this.cdr.detectChanges()},this.onEnd=()=>{this.onStop()},this.urlService=e,this.cdr=i,this.cdr.detach(),this.soundService=r,this.analyticsTracking=s}ngOnInit(){const e=this.message.model.data;this.duration=new Date(1970,0,1).setMilliseconds(1e3*e.duration);const i=this.soundService.createSound({src:e.url,volume:1,interruptable:!1,format:"mp3",preload:!1,type:Dp.VoiceMessage});this.listeners.add(i.onLoad(this.onLoad)),this.listeners.add(i.onPlay(this.onPlay)),this.listeners.add(i.onPause(this.onStop)),this.listeners.add(i.onEnd(this.onEnd)),this.audio=i,this.updateProgressBar(0,1),this.cdr.detectChanges()}ngOnDestroy(){this.stopUpdateCycle(),this.listeners.forEach(e=>e.detach()),this.audio&&this.audio.unload()}onClick(){this.button.state===n.EPlayState.Play?(this.audio.state!==X4.Loaded&&(this.button.isLoading=!0),this.audio.state===X4.Unloaded&&this.audio.load(),this.audio.resume()):this.audio.pause(),this.cdr.detectChanges()}onClickOutsideMessage(){this.audio.pause()}updateProgressBar(e,i){this.progressBarConfig={progressPartitions:[{value:0,widthCoefficient:e},{value:0,cssClass:"audio__content--progress-class",widthCoefficient:i-e}],areValuesShown:!1},this.cdr.detectChanges()}startUpdateBarCycle(){this.stopUpdateCycle();const e=()=>{this.rafId=requestAnimationFrame(()=>{this.updateProgressBar(this.audio.currentTime,this.message.model.data.duration),e()})};e()}stopUpdateCycle(){cancelAnimationFrame(this.rafId)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Re),g(Mo),g(yi),g(nn))},t.\u0275cmp=pe({type:t,selectors:[["chat-message-audio-content"]],inputs:{message:"message"},decls:7,vars:10,consts:[[1,"audio__content--controls-container"],[1,"audio__content--button",3,"bclass","icon","loading","onClick"],[1,"audio__content--progress-container"],[3,"progressBarConfig"],[1,"audio__content--time"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"button-icon",1),Y("onClick",function(){return i.onClick()}),m(),p(2,"div",2),B(3,"progress-bar",3),p(4,"span",4),H(5),V(6,"date"),m()()()),2&e&&(d(),l("bclass","audio__content--button-bclass")("icon",ne(8,TMt,i.button.icon))("loading",i.button.isLoading),d(2),l("progressBarConfig",i.progressBarConfig),d(2),se(yt(6,5,i.duration,"m:ss")))},dependencies:[uf,ei,sb],styles:["[_nghost-%COMP%]{width:100%;display:block}.audio__content--progress-container[_ngcontent-%COMP%]{width:100%;position:relative}.audio__content--controls-container[_ngcontent-%COMP%]{display:flex;align-items:center}.audio__content--time[_ngcontent-%COMP%]{position:absolute;font-size:1.3rem;right:0;font-weight:600}.audio__content--button[_ngcontent-%COMP%]{font-size:2rem}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EPlayState||(t.EPlayState={})).Play="play",o.Pause="pause"}(h2||(h2={}));var jM=ve.EIcons;const PMt=["section"],IMt=["wrapper"],MMt=["content"];function OMt(t,n){1&t&&B(0,"icon-component",17),2&t&&l("icon",_(3).EIcons.ConversationOwner)}function EMt(t,n){1&t&&B(0,"icon-component",18),2&t&&l("icon",_(3).EIcons.PIN)}function xMt(t,n){if(1&t&&(p(0,"div",13),B(1,"username",14),U(2,OMt,1,1,"icon-component",15)(3,EMt,1,1,"icon-component",16),m()),2&t){const o=_(2);d(),l("userProfile",o.message.model.getSender())("hasVerifiedBadge",!0),d(),l("ngIf",o.message.ui.isConversationOwner),d(),l("ngIf",o.message.ui.isSticky)}}function AMt(t,n){if(1&t&&(p(0,"div",11),U(1,xMt,4,4,"div",12),m()),2&t){const o=_();d(),l("ngIf",o.message.ui.showUsername)}}function RMt(t,n){if(1&t&&(B(0,"chat-message-text-content",19),V(1,"translate")),2&t){const o=_();l("text",$(1,2,"PLACEHOLDERS.MESSAGE_DELETED"))("sender",o.message.model.getSender())}}function kMt(t,n){if(1&t&&B(0,"chat-message-text-content",23,24),2&t){const o=_(2);l("text",o.message.model.data.body)("sender",o.message.model.getSender())}}const LMt=t=>[t];function DMt(t,n){if(1&t&&(B(0,"chat-message-text-content",25,24),V(2,"translate")),2&t){const o=_(2);nb("message__kick-content-text"),l("text",yt(2,4,"CHAT.KICKED",ne(7,LMt,o.message.model.data.username.currentUsername)))("sender",o.message.model.getSender())}}function BMt(t,n){1&t&&B(0,"chat-message-invite-content",26,24),2&t&&l("message",_(2).message)}function NMt(t,n){1&t&&B(0,"chat-message-emoji-content",26,24),2&t&&l("message",_(2).message)}function FMt(t,n){1&t&&B(0,"chat-message-image-content",26,24),2&t&&l("message",_(2).message)}function UMt(t,n){1&t&&B(0,"chat-message-audio-content",26,24),2&t&&l("message",_(2).message)}function GMt(t,n){if(1&t&&U(0,kMt,2,2,"chat-message-text-content",20)(1,DMt,3,9,"chat-message-text-content",21)(2,BMt,2,1,"chat-message-invite-content",22)(3,NMt,2,1,"chat-message-emoji-content",22)(4,FMt,2,1,"chat-message-image-content",22)(5,UMt,2,1,"chat-message-audio-content",22),2&t){const o=_();l("ngIf",o.message.model.type===o.EChatMessageType.Text),d(),l("ngIf",o.message.model.type===o.EChatMessageType.Kick),d(),l("ngIf",o.message.model.type===o.EChatMessageType.GameRoom),d(),l("ngIf",o.message.model.type===o.EChatMessageType.Emoji),d(),l("ngIf",o.message.model.type===o.EChatMessageType.Image),d(),l("ngIf",o.message.model.type===o.EChatMessageType.Voice)}}function VMt(t,n){if(1&t&&(p(0,"span",31),H(1),V(2,"timeElapsedPipe"),m()),2&t){const o=_(2);d(),se(yt(2,1,o.message.model.createdAt/1e3,o.openActions))}}function zMt(t,n){1&t&&(p(0,"span",32),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CHAT.UNSENT_MESSAGE")))}const jMt=t=>({animate:t}),FCe=t=>({name:t});function HMt(t,n){if(1&t){const o=Ce();p(0,"button-icon",35),Y("onClick",function(){return re(oe(o).$implicit.onClick())}),m()}if(2&t){const o=n.$implicit,e=n.index,i=_(3);go("animation-delay",.05*(e+1)+"s"),l("ngClass",ne(7,jMt,i.openActions||i.actionsState.send.error))("loading",o.isLoading())("icon",ne(9,FCe,o.icon))("bclass","link--format-button"),Hn("data-cy","chat"+o.action+"Button")}}function qMt(t,n){if(1&t&&(p(0,"div",33),U(1,HMt,1,11,"button-icon",34),m()),2&t){const o=_(2);d(),l("ngForOf",o.actionButtons)("ngForTrackBy",o.trackByFn)}}function WMt(t,n){if(1&t){const o=Ce();p(0,"div",33)(1,"button-icon",36),Y("onClick",function(){return oe(o),re(_(2).toggleFooter())}),m()()}if(2&t){const o=_(2);d(),l("icon",ne(2,FCe,o.EIcons.UTILITY))("bclass","link--format-button action__button--open-bclass"+(o.openActions?"action__button--opened-bclass":""))}}const $Mt=t=>({"unsent-message":t});function KMt(t,n){if(1&t&&(p(0,"div",27),U(1,VMt,3,4,"span",28)(2,zMt,3,3,"span",29)(3,qMt,2,2,"div",30)(4,WMt,2,4,"div",30),m()),2&t){const o=_();l("ngClass",ne(5,$Mt,o.actionsState.send.error)),d(),l("ngIf",o.openActions&&!o.actionsState.send.error),d(),l("ngIf",o.actionsState.send.error),d(),l("ngIf",!o.actionsState.send.inProgress),d(),l("ngIf",!o.actionsState.send.error)}}function ZMt(t,n){if(1&t&&B(0,"avatar",37),2&t){const o=_();l("isLink",!0)("hasUsername",!1)("user",o.message.model.getSender())}}const QMt=(t,n,o,e,i,r,s,a)=>({"reverse-message":t,"is-deleted":n,"has-avatar":o,invite:e,image:i,emoji:r,voice:s,kick:a}),YMt=(t,n,o)=>({"no-avatar":t,other:n,openActions:o}),JMt=t=>({"has-avatar":t});let HM=(()=>{var t;class n extends Nj{constructor(e,i,r,s){super(r),this.EMessageAction=ps,this.EIcons=jM,this.exitAnimationClass="message__exit",this.EChatMessageType=Ii,this.openActions=!1,this.onCmpClick=()=>{this.clickListener||this.addClickListener()},this.onClick=a=>{this.wrapper.nativeElement.contains(a.target)||(this.removeClickListener(),this.toggleFooter(!1),this.content&&this.content.onClickOutsideMessage&&this.content.onClickOutsideMessage()),this.updateView()},this.action=new ke,this.renderer=e,this.cdr=i,this.ngZone=s}ngOnInit(){super.ngOnInit(),this.cdr.detach(),this.updateView()}ngOnChanges(e){e.message&&(this.actionButtons=this.createActionButtons(e.message.currentValue.ui.actions)),this.updateView()}ngOnDestroy(){this.removeClickListener()}emitAction(e){this.isActionPermitted(e)&&this.action.emit({type:e}),this.updateView()}isActionPermitted(e){return-1!==this.message.ui.actions.indexOf(e)}toggleFooter(e){this.ngZone.runOutsideAngular(()=>{this.openActions=void 0!==e?e:!this.openActions,this.removeClickListener(),this.openActions&&this.addClickListener()}),this.updateView()}addClickListener(){this.ngZone.runOutsideAngular(()=>{this.clickListener=this.renderer.listen("window",wh?"touchend":"click",this.onClick)})}removeClickListener(){this.clickListener&&this.clickListener(),this.clickListener=void 0}trackByFn(e,i){return i.action}createActionButtons(e){return[{action:ps.Delete,icon:jM.DELETE,text:{key:"CHAT.DELETE"},isLoading:()=>this.actionsState.delete.inProgress,onClick:()=>this.emitAction(ps.Delete)},{action:ps.Report,icon:jM.REPORT,text:{key:"CHAT.REPORT"},isLoading:()=>this.actionsState.report.inProgress,onClick:()=>this.emitAction(ps.Report)},{action:ps.Kick,icon:jM.BLOCK,text:{key:"CHAT.KICK"},isLoading:()=>this.actionsState.kick.inProgress,onClick:()=>this.emitAction(ps.Kick)},{action:ps.Send,icon:jM.SEND,text:{key:"CHAT.SEND_MESSAGE"},isLoading:()=>this.actionsState.send.inProgress,onClick:()=>this.emitAction(ps.Send)}].filter(r=>e.find(s=>s===r.action))}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji),g(Re),g($t),g(an))},t.\u0275cmp=pe({type:t,selectors:[["chat-message"]],viewQuery:function(e,i){if(1&e&&($e(PMt,5),$e(IMt,5),$e(MMt,5)),2&e){let r;je(r=He())&&(i.section=r.first),je(r=He())&&(i.wrapper=r.first),je(r=He())&&(i.content=r.first)}},inputs:{actionsState:"actionsState",message:"message"},outputs:{action:"action"},features:[mn([{provide:nn,useFactory:o=>new nn("chatMessage",o),deps:[[new jo,new zo,nn]]}]),Ht,it],decls:12,vars:23,consts:[[1,"container--single-message",3,"ngClass"],[1,"message__wrapper",3,"ngClass","click.zoneless"],["wrapper",""],[1,"message__content--wrapper",3,"ngClass"],[1,"text--single-message"],["section",""],["class","message--header",4,"ngIf"],["class","message__text-content","data-cy","messageDeleted",3,"text","sender",4,"ngIf","ngIfElse"],["notDeleted",""],["class","message--footer",3,"ngClass",4,"ngIf"],["class","message-avatar",3,"isLink","hasUsername","user",4,"ngIf"],[1,"message--header"],["class","msg-username",4,"ngIf"],[1,"msg-username"],[1,"username__class",3,"userProfile","hasVerifiedBadge"],["class","msg-owner-icon",3,"icon",4,"ngIf"],["class","message-icon--pin",3,"icon",4,"ngIf"],[1,"msg-owner-icon",3,"icon"],[1,"message-icon--pin",3,"icon"],["data-cy","messageDeleted",1,"message__text-content",3,"text","sender"],["class","message__text-content",3,"text","sender",4,"ngIf"],["class","message__text-content message__kick-content",3,"class","text","sender",4,"ngIf"],[3,"message",4,"ngIf"],[1,"message__text-content",3,"text","sender"],["content",""],[1,"message__text-content","message__kick-content",3,"text","sender"],[3,"message"],[1,"message--footer",3,"ngClass"],["class","text--footer text--footer--timestamp",4,"ngIf"],["class","text--footer text--footer--unsent","data-cy","privateChatUnsentErrorText",4,"ngIf"],["class","action__button--list",4,"ngIf"],[1,"text--footer","text--footer--timestamp"],["data-cy","privateChatUnsentErrorText",1,"text--footer","text--footer--unsent"],[1,"action__button--list"],["class","action__button action__button--list-component",3,"ngClass","animationDelay","loading","icon","bclass","onClick",4,"ngFor","ngForOf","ngForTrackBy"],[1,"action__button","action__button--list-component",3,"ngClass","loading","icon","bclass","onClick"],["data-cy","chatMoreActionsButton",1,"action__button","action__button--open",3,"icon","bclass","onClick"],[1,"message-avatar",3,"isLink","hasUsername","user"]],template:function(e,i){if(1&e&&(p(0,"div",0)(1,"div",1,2),Y("click.zoneless",function(){return i.onCmpClick()}),p(3,"div",3)(4,"div",4,5),U(6,AMt,2,1,"div",6)(7,RMt,2,4,"chat-message-text-content",7)(8,GMt,6,6,"ng-template",null,8,ft),m()(),U(10,KMt,5,7,"div",9),m(),U(11,ZMt,1,3,"avatar",10),m()),2&e){const r=Kt(9);l("ngClass",function XY(t,n,o,e,i,r,s,a,c,u,h){const b=pu()+t,w=Nt(),R=gp(w,b,o,e,i,r);return gp(w,b+4,s,a,c,u)||R?vm(w,b+8,h?n.call(h,o,e,i,r,s,a,c,u):n(o,e,i,r,s,a,c,u)):hT(w,b+8)}(8,QMt,i.message.ui.isMyMessage,i.message.ui.isDeleted,i.message.ui.hasAvatar,i.message.model.type===i.EChatMessageType.GameRoom,i.message.model.type===i.EChatMessageType.Image,i.message.model.type===i.EChatMessageType.Emoji,i.message.model.type===i.EChatMessageType.Voice,i.message.model.type===i.EChatMessageType.Kick)),d(),l("ngClass",_a(17,YMt,!i.message.ui.hasAvatar,!i.message.ui.isMyMessage,i.openActions)),d(2),l("ngClass",ne(21,JMt,i.message.ui.hasAvatar)),d(3),l("ngIf",i.message.model.type!==i.EChatMessageType.Kick&&i.message.ui.showUsername&&!i.message.ui.isMyMessage),d(),l("ngIf",i.message.ui.isDeleted)("ngIfElse",r),d(3),l("ngIf",i.message.model.type!==i.EChatMessageType.Kick),d(),l("ngIf",i.message.ui.hasAvatar)}},dependencies:[Xe,Mt,Ne,Bo,Dn,ei,Zp,kCe,DCe,BCe,NCe,h2,qe,Bm],styles:["[_nghost-%COMP%]{display:block}.container--single-message[_ngcontent-%COMP%]{display:flex;flex-flow:row-reverse wrap;justify-content:flex-end;width:100%}.container--single-message.has-avatar[_ngcontent-%COMP%]{margin-top:2rem}@media screen and (max-width: 768px){.container--single-message.has-avatar[_ngcontent-%COMP%]{margin-top:1.5rem}}.container--single-message.emoji[_ngcontent-%COMP%]:not(.is-deleted)   .text--single-message[_ngcontent-%COMP%]{padding:0;border:none;background-color:transparent}.container--single-message.image[_ngcontent-%COMP%]:not(.is-deleted)   .text--single-message[_ngcontent-%COMP%]{padding:0;border:none;background-color:transparent}.container--single-message.voice[_ngcontent-%COMP%]:not(.is-deleted)   .message__wrapper[_ngcontent-%COMP%]{width:100%}.container--single-message.voice[_ngcontent-%COMP%]:not(.is-deleted)   .text--single-message[_ngcontent-%COMP%]{width:100%}.container--single-message.kick[_ngcontent-%COMP%]{min-height:auto}.container--single-message.kick[_ngcontent-%COMP%]   .message__wrapper[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.container--single-message.kick[_ngcontent-%COMP%]   .text--single-message[_ngcontent-%COMP%]{min-height:auto;font-weight:600;width:auto;padding:.25rem 2rem;margin:auto;border-radius:1.8rem}.container--single-message.invite[_ngcontent-%COMP%]:not(.is-deleted)   .message__wrapper[_ngcontent-%COMP%]{width:40rem}@media screen and (max-width: 440px){.container--single-message.invite[_ngcontent-%COMP%]:not(.is-deleted)   .message__wrapper[_ngcontent-%COMP%]{max-width:calc(100% - 6rem)}}.container--single-message.invite[_ngcontent-%COMP%]:not(.is-deleted)   .text--single-message[_ngcontent-%COMP%]{width:100%}@media screen and (max-width: 768px){.container--single-message.invite[_ngcontent-%COMP%]:not(.is-deleted)   .text--single-message[_ngcontent-%COMP%]{padding:1rem .5rem;font-size:1.2rem}}.message__content--wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column}.message__content--wrapper.has-avatar[_ngcontent-%COMP%]{min-height:5rem}@media screen and (max-width: 360px){.message__content--wrapper.has-avatar[_ngcontent-%COMP%]{min-height:4rem}}.text--single-message[_ngcontent-%COMP%]{display:inline-block;flex-flow:row wrap;max-width:100%;font-size:1.4rem;padding:1rem 1.2rem;border-top-left-radius:0;align-self:flex-start;margin-top:auto}.text--single-message.deleted[_ngcontent-%COMP%]{font-style:italic}.text--single-message.openActions[_ngcontent-%COMP%]{animation:enlarge-message .3s linear forwards}.message__wrapper[_ngcontent-%COMP%]{max-width:calc(100% - 8rem);display:flex;flex-flow:column}.message__wrapper.no-avatar[_ngcontent-%COMP%]{margin-top:2px;margin-right:6.5rem}.message__wrapper.no-avatar.other[_ngcontent-%COMP%]{margin-right:initial;margin-left:6.5rem}@media (max-width: 380px){.message__wrapper[_ngcontent-%COMP%]{max-width:calc(100% - 10.75rem)}}.action__button[_ngcontent-%COMP%]{width:auto;height:auto;min-width:auto;min-height:auto;font-size:1.7rem;margin:0 1rem}.action__button--open[_ngcontent-%COMP%]{font-size:2.4rem;width:2.4rem;height:2.4rem;margin:0}.actions__button--close[_ngcontent-%COMP%]{position:absolute;top:1rem;right:1rem;height:auto;min-height:auto;font-size:1.8rem}.action__button--menu[_ngcontent-%COMP%]{display:none;font-size:2.4rem}.text--footer[_ngcontent-%COMP%]{padding:.5rem 0;flex-shrink:0;margin:auto 0;font-size:1rem}.reverse-message[_ngcontent-%COMP%]{flex-flow:row wrap}.reverse-message[_ngcontent-%COMP%]   .text--single-message[_ngcontent-%COMP%]{align-self:flex-end;border-top-left-radius:1.8rem;border-top-right-radius:0}.reverse-message[_ngcontent-%COMP%]   .message--footer[_ngcontent-%COMP%]{flex-flow:row nowrap}.msg-username[_ngcontent-%COMP%]{width:100%;font-weight:600;font-size:1.5rem;display:flex;height:2.25rem}.username__class[_ngcontent-%COMP%]{overflow:hidden}.msg-owner-icon[_ngcontent-%COMP%], .message-icon--pin[_ngcontent-%COMP%]{margin:0 .25rem;font-size:1.2em}.message-avatar[_ngcontent-%COMP%]{margin:0 .75rem;width:5rem;height:5rem}@media screen and (max-width: 440px){.message-avatar[_ngcontent-%COMP%]{width:4rem;height:4rem}}.message--footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;flex-flow:row-reverse nowrap;overflow:hidden}.message--footer.open[_ngcontent-%COMP%]{display:flex;max-height:2rem;margin-bottom:1rem}.message--header[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%}.chat__message--actions[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;right:0;top:0;width:100%;height:100%}.action__button--list-component[_ngcontent-%COMP%]{margin:0 1rem;transform:scale(0);transform-origin:center bottom}.action__button--list-component.animate[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_action-button-list .15s ease-in-out forwards}.action__button--text[_ngcontent-%COMP%]{margin-top:.5rem;font-size:1.25rem;text-align:center}.message__kick-content[_ngcontent-%COMP%]{text-align:center}.action__button--list[_ngcontent-%COMP%]{justify-content:center;display:flex}@keyframes _ngcontent-%COMP%_action-button-list{0%{transform:scale(0)}to{transform:scale(1)}}"],changeDetection:0}),n})();const XMt=t=>({"animate-counter":t});function eOt(t,n){if(1&t&&B(0,"notification-sign",3),2&t){const o=_();l("ngClass",ne(2,XMt,o.animateCountBallon))("notificationValue",o.unreadMessagesCount)}}const tOt=(t,n)=>({"animate-arrow-to-top":t,"animate-arrow-to-bottom":n});let $c=(()=>{var t;class n{constructor(e){this.direction=n.EArrowDirection.Top,this.onClick=new ke,this.EIcons=ve.EIcons,this.EArrowDirection=n.EArrowDirection,this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.updateView()}ngOnDestroy(){clearTimeout(this.newMessageReceivedDelay)}animateNewMessage(){clearTimeout(this.newMessageReceivedDelay),this.animateCountBallon=!0,this.newMessageReceivedDelay=setTimeout(()=>{this.animateCountBallon=!1,this.updateView()},1e3),this.updateView()}onButtonClick(){this.onClick.emit(),this.updateView()}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["new-message-arrow"]],inputs:{unreadMessagesCount:"unreadMessagesCount",direction:"direction"},outputs:{onClick:"onClick"},features:[it],decls:3,vars:7,consts:[["click-sound","","click-feedback","",1,"new-message--arrow",3,"scaleFactor","click"],[3,"ngClass","icon"],["class","container--unread--counter",3,"ngClass","notificationValue",4,"ngIf"],[1,"container--unread--counter",3,"ngClass","notificationValue"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.onButtonClick()}),B(1,"icon-component",1),U(2,eOt,1,4,"notification-sign",2),m()),2&e&&(l("scaleFactor",.96),d(),l("ngClass",cn(4,tOt,i.direction===i.EArrowDirection.Top,i.direction===i.EArrowDirection.Bottom))("icon",i.EIcons.ARROW_BACK),d(),l("ngIf",i.unreadMessagesCount>0))},dependencies:[Xe,Ne,po,Dn,fv,Fd],styles:["[_nghost-%COMP%]{display:block;width:5rem;height:4rem}.new-message--arrow[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;border-radius:.8rem 0 0 .8rem;z-index:2}.new-message--arrow[_ngcontent-%COMP%]:hover{cursor:pointer}.new-message--arrow[_ngcontent-%COMP%]:before{transform:rotate(90deg)}@media screen and (max-width: 768px){.new-message--arrow[_ngcontent-%COMP%]{bottom:8rem}}.new-message--arrow[_ngcontent-%COMP%]   .container--unread--counter[_ngcontent-%COMP%]{position:absolute;top:-2.5rem;left:2rem}.animate-arrow-to-top[_ngcontent-%COMP%]{transform:rotate(90deg);transition:transform .3s ease-in-out}.animate-arrow-to-bottom[_ngcontent-%COMP%]{transform:rotate(-90deg);transition:transform .3s ease-in-out}.animate-counter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_counter-animation .3s ease-in-out;animation-iteration-count:3}@keyframes _ngcontent-%COMP%_counter-animation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}"],changeDetection:0}),n})();function nOt(t,n){if(1&t&&B(0,"chat-share-room-content",2),2&t){const o=_();l("orientation",o.EOrientation.Landscape)("content",o.content.data.shareData)}}!function(t){let n;var o;(o=n=t.EArrowDirection||(t.EArrowDirection={})).Top="top",o.Bottom="bottom"}($c||($c={}));let zj=(()=>{var t;class n{constructor(e){this.EChatShareContentType=pg,this.EOrientation=cs,this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["chat-share-content-preview"]],inputs:{content:"content"},features:[it],decls:2,vars:1,consts:[[1,"chat-share-content-preview__container"],["class","conversation--content",3,"orientation","content",4,"ngIf"],[1,"conversation--content",3,"orientation","content"]],template:function(e,i){1&e&&(p(0,"container-component",0),U(1,nOt,1,2,"chat-share-room-content",1),m()),2&e&&(d(),l("ngIf",i.content.data.shareType===i.EChatShareContentType.Room))},dependencies:[Ne,Ga,Gj],styles:["[_nghost-%COMP%]{display:block;transform:translateZ(0)}.chat-share-content-preview__container[_ngcontent-%COMP%]{display:flex;width:auto;margin:.5rem}.conversation--content[_ngcontent-%COMP%]{display:block;height:100%}"],changeDetection:0}),n})();var iOt=nt.EPermissionModule,oOt=nt.EModuleAction;const rOt=["wrapper"],sOt=["animatedElement"],aOt=["scrollSection"],UCe=["input"],cOt=["conversationsSection"],lOt=["arrow"],uOt=["conversationsViewChildren"],dOt=["messagesViewChildren"];function pOt(t,n){1&t&&(p(0,"div",21)(1,"p",22),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"CHAT.CHAT_MAINTENANCE")))}function hOt(t,n){1&t&&B(0,"spinner-loader",23)}function mOt(t,n){1&t&&B(0,"chat-share-content-preview",24),2&t&&l("content",_().chatUsageIntent)}const fOt=t=>({filtered:t});function gOt(t,n){if(1&t){const o=Ce();p(0,"chat-conversation",25,26),Y("action",function(i){const s=oe(o).$implicit;return re(_().onConversationAction(i,s.model))}),V(2,"timeElapsedPipe"),m()}if(2&t){const o=n.$implicit,e=_();l("ngClass",ne(9,fOt,!o.ui.visible))("conversation",o)("chatUsageIntent",e.chatUsageIntent)("timeText",yt(2,6,o.model.createdAt/1e3,e.updateTimeTrigger))("elId",o.model.id),Hn("data-cy2",o.model.user.id)}}function _Ot(t,n){1&t&&(p(0,"div",27),B(1,"spinner-loader",28),m())}const vOt=t=>({textKey:t}),GCe=t=>[t];function bOt(t,n){if(1&t&&B(0,"empty-content",29),2&t){const o=_();l("textArray",ne(3,GCe,ne(1,vOt,null!=o.conversationsState&&o.conversationsState.isInMaintenance?"CHAT.CHAT_MAINTENANCE":"CHAT.PRIVATE_CHAT.NO_CONVERSATIONS")))}}function COt(t,n){if(1&t){const o=Ce();p(0,"search-bar",30),Y("filterAction",function(i){return oe(o),re(_().searchInConversations(i))})("clearFilters",function(){return oe(o),re(_().resetFilters())}),m()}2&t&&l("customInputCssClass","pf-tab__search-bar__input")("searchBarPlaceholder","PLACEHOLDERS.USERNAME")}function yOt(t,n){if(1&t&&(p(0,"p",31),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",yt(2,1,"CHAT.PRIVATE_CHAT.MESSAGES_LIST_USER_BAR",ne(4,GCe,o.openedConversation.getConversationPartner().profile.username.currentUsername))," ")}}function SOt(t,n){1&t&&B(0,"spinner-loader",23)}const wOt=t=>({"pf__container--messages-drawer-opened":t});function TOt(t,n){if(1&t&&(p(0,"div",32),U(1,SOt,1,0,"spinner-loader",6),m()),2&t){const o=_();l("ngClass",ne(2,wOt,o.openDrawer)),d(),l("ngIf",o.openedConversation&&o.openedConversation.loadingState.isLoading)}}function POt(t,n){1&t&&B(0,"spinner-loader",23)}function IOt(t,n){if(1&t){const o=Ce();p(0,"chat-message",36,37),Y("action",function(i){const s=oe(o).$implicit;return re(_(2).onMessageAction(i,s.model))}),m()}if(2&t){const o=n.$implicit;l("id",o.model.id)("actionsState",o.model.actions)("message",o)("elId",o.model.id),Hn("data-cy2",o.model.id)}}const MOt=(t,n)=>({"pf__element-invisible":t,"pf__container--messages-drawer-opened":n}),OOt=t=>({handler:t,outsideZone:!0}),jj=t=>({handler:t});function EOt(t,n){if(1&t&&(p(0,"div",33,34),U(2,POt,1,0,"spinner-loader",6)(3,IOt,2,5,"chat-message",35),m()),2&t){const o=_();l("ngClass",cn(7,MOt,!1===o.getViewFlag(o.flagEnums.ContainerScrolledToBottom),o.openDrawer))("onScrollUp",ne(10,OOt,o.onScrollUp))("onScrolledToTop",ne(12,jj,o.onMessagesScrolledToTop))("onScrolledToBottom",ne(14,jj,o.onMessagesScrolledToBottom)),d(2),l("ngIf",o.openedConversation&&o.openedConversation.loadingState.isLoading),d(),l("ngForOf",o.messagesList)("ngForTrackBy",o.messagesTrackByFn)}}const xOt=t=>({"pf__new-message--arrow-drawer-open":t});function AOt(t,n){if(1&t){const o=Ce();p(0,"new-message-arrow",38,39),Y("onClick",function(){return oe(o),re(_().onArrowCmpClick())}),m()}if(2&t){const o=_();l("ngClass",ne(3,xOt,o.openDrawer))("direction",o.arrowDirection)("unreadMessagesCount",o.unreadMessagesCount)}}const ROt=t=>({"pf__message-input--arrow-drawer-open":t});function kOt(t,n){if(1&t){const o=Ce();p(0,"message-input",40,41),Y("send",function(i){return oe(o),re(_().sendMessage(i))})("openDrawer",function(i){return oe(o),re(_().onDrawerOpen(i))}),m()}if(2&t){const o=_();l("chat",o.chatKey)("ngClass",ne(3,ROt,o.openDrawer))("isInMaintenance",null==o.conversationsState?null:o.conversationsState.isInMaintenance)}}const LOt=(t,n,o)=>({"open-messages":t,"open-messages-instant":n,"open-conversations":o}),DOt=t=>({"in-maintenance":t});let VCe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){var te=this;this.store=e,this.permissionsService=i,this.popup=r,this.toaster=s,this.ngZone=a,this.chat=c,this.actions=u,this.scrollHelper=h,this.config=b,this.cdr=w,this.renderer=R,this.analyticsTracking=G,this.offerServce=K,this.scrollAnimation={durationMs:100,timingFunction:pM},this.searchedConv="",this.unreadMessagesCount=0,this.subscriptions=new ie.List,this.messagesSubscriptions={list:void 0,firstUpdate:void 0,model:void 0},this.currentSortOrder=ie.ESort.Desc,this.EPrivateChatUsageIntent=zc,this.chatKey="private",this.listeners=new ie.List,this.conversationsListSubscriptions=new ie.List,this.messagesListSubscriptions=new ie.List,this.onChatOpened=function(){var ee=f(function*(le){le?te.trySynchronizeChat():te.chat.stopTryToSynchronizeChatCycle()});return function(le){return ee.apply(this,arguments)}}(),this.onInMaintenance=function(){var ee=f(function*(le){te.store.selectPrivateChatIsOpened()&&le&&te.chat.startTryToSynchronizeChatCycle()});return function(le){return ee.apply(this,arguments)}}(),this.onConnectionRestored=()=>{this.store.selectPrivateChatIsOpened()&&this.trySynchronizeChat(),this.store.selectPrivateOpenedConversationModel()&&this.changeScrollDirection(ie.ESort.Desc)},this.onMessageRemove=ee=>{if(!this.messagesViewChildren)return;const le=this.messagesViewChildren.find(me=>me.elId===ee.messageId);le&&(le.animateExit(),this.cdr.detectChanges())},this.onConversationRemove=ee=>{if(!this.viewChildren)return;const le=this.viewChildren.find(Me=>Me.elId===ee.conversationId),me=this.store.selectPrivateConversationsList().findIndex(Me=>Me.id===le.conversation.model.id),ge=this.viewChildren.toArray().findIndex(Me=>Me.elId===le.elId);le&&(me!==ge&&le.animateExit(),this.cdr.detectChanges())},this.onConversationAdd=ee=>{if(!this.viewChildren)return;this.conversationsListSubscriptions.forEach(ge=>{ge.unsubscribe()});const le=this.viewChildren.toArray().findIndex(ge=>ge.conversation.model.id===ee.conversationId),me=this.viewChildren.changes.pipe(Qi(1)).subscribe(ge=>{const Me=ge.find(Ee=>Ee.conversation.model.id===ee.conversationId),Ke=this.store.selectPrivateConversationsList().findIndex(Ee=>Ee.id===ee.conversationId);Me&&Ke!==le&&Me.animateEnter(),this.conversationsListSubscriptions.remove(me)});this.conversationsListSubscriptions.add(me)},this.onMessageSent=()=>{const ee=this.store.selectPrivateOpenedConversationModel();this.currentSortOrder===ie.ESort.Desc||ee.meta[ie.ESort.Asc].isLastPage?this.scrollInRaf(()=>{this.scrollToBottomAnimated()}):this.currentSortOrder===ie.ESort.Asc&&this.scrollToMostRecent()},this.onMessageReceived=ee=>{!this.openedConversation||this.openedConversation.id!==ee.message.conversationId||(this.arrowDirection===$c.EArrowDirection.Bottom?(this.incrementUnreadMsgsCount(),this.animateNewMessage(),this.cdr.detectChanges()):this.scrollInRaf(()=>{this.scrollToBottomAnimated()}))},this.onSelectedConversationArchived=()=>{this.infoPopupId=this.popup.show("CHAT.PRIVATE_CHAT.DELETED_CONVERSATION")},this.onConversationArchived=ee=>{this.onConversationRemove(ee)},this.scrollToBottomAnimated=()=>{this.scrollMessagesToBottom(this.scrollAnimation)},this.onMessagesScrolledToTop=f(function*(){const ee=te.store.selectPrivateOpenedConversationModel();if(te.currentSortOrder===ie.ESort.Desc&&!ee.loadingState.isLoading&&!ee.meta[ie.ESort.Desc].isLastPage)try{const le=te.messagesList[0].model.id;yield te.chat.getNextMessages(ee,{pageCount:1,sort:ie.ESort.Desc}),te.scrollInRaf(()=>{const me=document.getElementById(le);me&&te.scrollToElement(me)})}catch(le){console.warn(le)}}),this.onConversationsScrolledToBottom=f(function*(){const ee=te.store.selectPrivateConversationsState();if(!(ee.loadingState.isLoading||ee.meta&&ee.meta.isLastPage))try{yield te.chat.getNextConversations()}catch(le){console.warn(le)}}),this.onMessagesScrolledToBottom=f(function*(){const ee=te.store.selectPrivateOpenedConversationModel();if((te.currentSortOrder===ie.ESort.Desc||ee.meta[ie.ESort.Asc].isLastPage)&&(te.resetUnreadMsgsCount(),te.setArrowDirection($c.EArrowDirection.Top)),te.currentSortOrder===ie.ESort.Asc&&!ee.loadingState.isLoading&&!ee.meta[ie.ESort.Asc].isLastPage)try{yield te.chat.getNextMessages(ee,{pageCount:1,sort:ie.ESort.Asc})}catch(le){console.warn(le)}}),this.onScrollUp=()=>{this.setArrowDirection($c.EArrowDirection.Bottom)},this.chatState=rp.InstantConversationsVisible,this.updateTimeTrigger=1,this.componentViewFlags={},this.flagEnums=KC,this.chatStateEnums=rp,w.detach()}ngOnInit(){this.newConversationPermission=this.permissionsService.getActionPermission(nt.EPermissionModule.PrivateChat,nt.EModuleAction.NewConversation),this.chat.initialize(),this.subscriptions.add(this.store.subscribeUserState().pipe(bt(e=>void 0!==e)).subscribe(e=>{this.currentUser=e,this.cdr.detectChanges()})),this.subscriptions.add(this.store.subscribePrivateOpenedConversation().subscribe(this.onSelectedConversationChange.bind(this))),this.subscriptions.add(this.store.subscribePrivateConversationsState().subscribe(e=>{this.conversationsState=e,this.cdr.detectChanges()})),this.subscriptions.add(this.actions.pipe(ai(GI)).subscribe(this.onMessageReceived)),this.subscriptions.add(this.actions.pipe(ai(Uk)).subscribe(this.onMessageSent)),this.subscriptions.add(this.actions.pipe(ai(Nk)).subscribe(e=>this.onConversationAdd({conversationId:e.conversation.id}))),this.subscriptions.add(this.actions.pipe(ai(h6)).subscribe(this.onConversationArchived)),this.subscriptions.add(this.actions.pipe(ai(npe)).subscribe(this.onSelectedConversationArchived)),this.subscriptions.add(this.actions.pipe(ai(m6)).subscribe(this.onMessageRemove)),this.subscriptions.add(this.actions.pipe(ai(_6)).subscribe(this.onMessageRemove)),this.subscriptions.add(this.actions.pipe(ai(f6)).subscribe(this.onConversationRemove)),this.subscriptions.add(this.actions.pipe(ai(Fk)).subscribe(this.onConversationRemove)),this.subscriptions.add(this.actions.pipe(ai(Fk)).subscribe(this.onConversationAdd)),this.subscriptions.add(this.store.chatComponent.subscribeIntent().subscribe(e=>{this.chatUsageIntent=e,this.updateConversationsList(this.store.selectPrivateConversationsList().filter(i=>i.isInPagesList)),this.cdr.detectChanges()})),this.subscriptions.add(this.store.subscribePrivateConversationsList().subscribe(e=>this.updateConversationsList(e.filter(i=>i.isInPagesList)))),this.listeners.add(this.addListenerOutsideAngular(this.wrapper.nativeElement,"click",this.clickOutsideTheInput.bind(this))),this.listeners.add(this.addListenerOutsideAngular(this.animatedElement.nativeElement,"transitionend",this.onTransitionEnd.bind(this))),this.listeners.add(this.addListenerOutsideAngular(window,"resize",this.onResize.bind(this))),this.subscriptions.add(this.store.subscribePrivateChatIsOpened().subscribe(this.onChatOpened)),this.subscriptions.add(this.store.subscribePrivateChatIsInMaintenance().subscribe(this.onInMaintenance)),this.subscriptions.add(this.actions.pipe(ai(b6)).subscribe(this.onConnectionRestored)),this.subscriptions.add(this.store.chatComponent.subscribePrivateChatIsOpened().subscribe(e=>{e||this.onChatClosed()})),this.startUpdateTimer(),this.cdr.detectChanges()}ngOnDestroy(){this.popup.hide(this.infoPopupId),clearInterval(this.updateLastSeenInterval),clearInterval(this.updateTimeInterval),this.subscriptions.forEach(e=>e.unsubscribe()),this.listeners.forEach(e=>e()),this.clearMessagesView(),this.conversationsListSubscriptions.forEach(e=>e.unsubscribe()),this.conversationsListSubscriptions=new ie.List,cancelAnimationFrame(this.updateConversationsRafId),cancelAnimationFrame(this.updateMessagesRafId)}trySynchronizeChat(){var e=this;return f(function*(){try{yield e.chat.synchronizeChat()}catch(i){console.warn(i),e.store.selectPrivateChatIsOpened()&&e.chat.startTryToSynchronizeChatCycle()}})()}onSelectedConversationChange(e){clearInterval(this.updateLastSeenInterval),this.messagesSubscriptions.list&&this.messagesSubscriptions.list.unsubscribe(),this.messagesSubscriptions.firstUpdate&&this.messagesSubscriptions.firstUpdate.unsubscribe(),this.messagesSubscriptions.model&&this.messagesSubscriptions.model.unsubscribe();let i=this.store.selectPrivateOpenedConversationModel();if(this.openedConversation=i,!e)return this.setChatState(rp.ConversationsVisible),this.messagesList=[],void this.cdr.detectChanges();this.messagesSubscriptions.model=this.store.subscribePrivateOpenedConversationModel().subscribe(a=>{this.openedConversation=a,this.cdr.detectChanges()}),this.currentSortOrder=ie.ESort.Desc,this.setChatState(rp.MessagesVisible);const r=this.store.subscribePrivateMessagesByConversationId({conversationId:e,sort:ie.ESort.Desc}).pipe(bt(a=>0!==a.length));this.messagesSubscriptions.list=r.subscribe(a=>{cancelAnimationFrame(this.updateMessagesRafId),this.updateMessagesRafId=requestAnimationFrame(()=>{this.openedConversation&&(this.messagesList=a.map((c,u,h)=>new W0(c,u,h,this.currentUser.profile.id,this.openedConversation,this.permissionsService)),this.cdr.detectChanges())})});let s={lastMessageId:void 0};this.startShowMessagesTimeout(),this.messagesSubscriptions.firstUpdate=r.pipe(Qi(1)).subscribe(()=>{this.scrollInRaf(()=>{this.scrollMessagesToBottom()}),s=this.readConversation(this.store.selectPrivateOpenedConversationModel())}),this.ngZone.runOutsideAngular(()=>{this.updateLastSeenInterval=setInterval(()=>{if(this.store.selectPrivateChatIsOpened()&&(i=this.store.selectPrivateOpenedConversationModel(),i)){const a=i.getLastSentMessage();a&&s.lastMessageId!==a.id&&(s=this.readConversation(i))}},1e4)}),this.cdr.detectChanges()}readConversation(e){const i=e.getLastSentMessage();return i&&this.chat.readConversation(e.id,{lastMessageId:i.id,isAdmin:e.isAdmin}),{lastMessageId:i?i.id:void 0}}closeConversation(e){this.readConversation(e),this.chat.closeConversation(e.getConversationPartner().profile.id)}closeCurrentConversation(){const e=this.store.selectPrivateOpenedConversationModel();e&&this.closeConversation(e)}clearMessagesView(){this.setArrowDirection($c.EArrowDirection.Top),this.setViewFlag(KC.ContainerScrolledToBottom,!1),this.cdr.detectChanges()}onChatClosed(){this.clearMessagesView(),this.closeCurrentConversation(),this.cdr.detectChanges()}isConversationOpened(){return void 0!==this.store.selectPrivateOpenedConversation()}onMessageAction(e,i){switch(e.type){case ps.Delete:this.deleteMessage(i);break;case ps.Send:this.resendMessage(i)}}searchInConversations(e){this.searchedConv=e.searchbarFilterValue.toLowerCase(),this.updateConversationListByFilter()}resetFilters(){this.searchedConv="",this.updateConversationListByFilter()}updateConversationListByFilter(){this.conversationList.forEach(e=>{e.ui.visible=e.model.isInPagesList&&!(this.chatUsageIntent.type===zc.ShareContent&&e.model.isAdmin)&&-1!==e.model.getConversationPartner().profile.username.currentUsername.toLowerCase().indexOf(this.searchedConv)}),this.cdr.detectChanges()}onConversationAction(e,i){switch(e.type){case Yr.Select:this.chatUsageIntent.type===zc.General&&this.openConversation(i);break;case Yr.Delete:this.deleteConversation(i);break;case Yr.Mute:this.toggleMuteConversation(i);break;case Yr.Pin:this.togglePinConversation(i);break;case Yr.ShareContent:this.shareContent(i.id)}}shareContent(e){var i=this;return f(function*(){try{yield i.chat.shareContent(i.chatUsageIntent.data,e)}catch(r){console.warn(r),i.showErrorToUser(r)}})()}openConversation(e){this.chat.openConversation(e.getConversationPartner().profile.id)}deleteConversation(e,i){var r=this;i&&i.stopPropagation();const s=this.checkPermissionForAction(nt.EModuleAction.Edit);var a;s.isPermitted?this.infoPopupId=this.popup.confirm({buttons:{action:(a=f(function*(){try{r.closeConversation(e),yield r.chat.deleteConversation(e.getConversationPartner().profile.id)}catch(c){r.showErrorToUser(c)}}),function(){return a.apply(this,arguments)})},textParams:{translationKey:"CHAT.PRIVATE_CHAT.CONVERSATION_DELETE_CONFIRMATION"}}):this.permissionsService.showFailedRequirementsToUser(s)}toggleMuteConversation(e){var i=this;return f(function*(){const r=i.checkPermissionForAction(nt.EModuleAction.Edit);if(r.isPermitted)try{yield i.chat.muteConversation(e.getConversationPartner().profile.id,!e.isMuted)}catch(s){i.showErrorToUser(s)}else i.permissionsService.showFailedRequirementsToUser(r)})()}togglePinConversation(e){var i=this;return f(function*(){const r=i.checkPermissionForAction(nt.EModuleAction.Edit);if(r.isPermitted)try{yield i.chat.pinConversation(e.getConversationPartner().profile.id,e.displayOrder?0:1)}catch(s){i.showErrorToUser(s)}else i.permissionsService.showFailedRequirementsToUser(r)})()}resendMessage(e){var i=this;return f(function*(){try{yield i.chat.resendMessage(e.id)}catch(r){if(console.warn(r),r instanceof Yo.InvalidMessageContentError)return;r instanceof et.General.NotFound||r instanceof Yo.PrivateTopicDeleted?i.onConversationArchived({conversationId:e.conversationId}):r instanceof lt.NotFriend&&i.openedConversation&&i.openedConversation.id===e.conversationId&&i.closeConversation(i.openedConversation),i.showErrorToUser(r)}})()}sendMessage(e){var i=this;return f(function*(){const r=i.store.selectPrivateOpenedConversationModel();try{if(!i.isTypeAllowed(e.type))throw new Yo.MessageTypeDisabledError;const s=0===r.loadedMessagesLength();if(0===r.loadedMessagesLength()){const a=i.checkPermissionForAction(oOt.NewConversation);if(!a.isPermitted){if(!a.minLevelRequirement.isFulfilled)throw new lt.LevelRequiredError(a.minLevelRequirement.requiredLevel);if(!a.vipRequirement.isFulfilled)throw new lt.MembershipRequiredError}}if(i.clearInput(),yield i.chat.sendMessage(e,r.getConversationPartner().profile.id),s){const a=new Jc.DefaultEvent(Nn.PrivateChat,ds.EChatAction.ConversationStarted);i.analyticsTracking.sendEvent(a)}}catch(s){if(console.warn(s),s instanceof Yo.InvalidMessageContentError)return;if(s instanceof et.Permissions.RequirementNotMeet)return void i.permissionsService.showFailedRequirementsToUser(s);s instanceof et.General.NotFound||s instanceof Yo.PrivateTopicDeleted?i.onConversationArchived({conversationId:r.id}):s instanceof lt.NotFriend&&i.closeConversation(r),i.showErrorToUser(s)}})()}deleteMessage(e){var i=this;return f(function*(){const r=i.checkPermissionForAction(nt.EModuleAction.Edit);if(!r.isPermitted)return void i.permissionsService.showFailedRequirementsToUser(r);const s=i.store.selectPrivateConversationById(e.conversationId);if(s.meta[ie.ESort.Desc].isLastPage&&1===s.loadedMessagesLength()&&s.oldestMessageId()===e.id)i.deleteConversation(s);else{const a={translationKey:"CHAT.PRIVATE_CHAT.MESSAGE_DELETE_CONFIRMATION"},c={action:(u=f(function*(){try{yield i.chat.deleteMessage(e.id,e.conversationId);const h=new aa.DefaultEvent(Nn.PrivateChat,ds.EChatAction.MessageDeleted,{label:ds.EMessageDeletedLabel.ByUser});i.analyticsTracking.sendEvent(h)}catch(h){i.showErrorToUser(h)}}),function(){return u.apply(this,arguments)})};i.infoPopupId=i.popup.confirm({buttons:c,textParams:a})}var u})()}scrollMessagesToBottom(e){this.currentSortOrder=ie.ESort.Desc;const i=this.myScrollContainer&&this.myScrollContainer.nativeElement?this.myScrollContainer.nativeElement:void 0;i&&(this.scrollTo(i.scrollHeight-i.offsetHeight,e),this.setArrowDirection($c.EArrowDirection.Top),this.setViewFlag(KC.ContainerScrolledToBottom,!0)),this.cdr.detectChanges()}scrollToElement(e,i){this.scrollTo(e.offsetTop,i)}scrollTo(e,i){const r=this.myScrollContainer&&this.myScrollContainer.nativeElement?this.myScrollContainer.nativeElement:void 0;r&&this.scrollHelper.scrollElement({element:r,targetScroll:e,animation:i,position:Na.EScrollPosition.ScrollTop}),this.cdr.detectChanges()}incrementUnreadMsgsCount(){this.unreadMessagesCount+=1,this.cdr.detectChanges()}resetUnreadMsgsCount(){this.unreadMessagesCount=0,this.cdr.detectChanges()}onResize(){this.scrollInRaf(()=>{this.currentSortOrder===ie.ESort.Desc?this.scrollMessagesToBottom():this.scrollTo(0)})}scrollToOldest(){this.changeScrollDirection(ie.ESort.Asc)}scrollToMostRecent(){this.changeScrollDirection(ie.ESort.Desc),this.scrollToBottomAnimated()}changeScrollDirection(e){this.messagesSubscriptions.list&&this.messagesSubscriptions.list.unsubscribe(),this.messagesSubscriptions.firstUpdate&&this.messagesSubscriptions.firstUpdate.unsubscribe(),this.currentSortOrder=e;const i=this.store.selectPrivateOpenedConversationModel();this.chat.getMessages({page:0,pageCount:1,sort:e},i.getConversationPartner().profile.id).catch(a=>console.warn(a));const s=this.store.subscribePrivateMessagesByConversationId({conversationId:i.id,sort:e}).pipe(bt(a=>0!==a.length));this.messagesSubscriptions.list=s.subscribe(a=>{this.openedConversation&&(this.messagesList=a.map((c,u,h)=>new W0(c,u,h,this.currentUser.profile.id,this.openedConversation,this.permissionsService)),this.cdr.detectChanges())}),this.messagesSubscriptions.firstUpdate=s.pipe(Qi(1)).subscribe(()=>{this.scrollInRaf(()=>{e===ie.ESort.Desc?this.scrollToBottomAnimated():this.scrollTo(0,this.scrollAnimation)})}),this.cdr.detectChanges()}setViewFlag(e,i){this.componentViewFlags[e]=i,this.cdr.detectChanges()}getViewFlag(e){return this.componentViewFlags[e]}checkPermissionForAction(e){return this.permissionsService.getActionPermission(iOt.PrivateChat,e)}setChatState(e){this.chatState=e,this.cdr.detectChanges()}clickOutsideTheInput(e){this.inputRef&&!1===this.inputRef.nativeElement.contains(e.target)&&(this.closeInputDrawer(),this.cdr.detectChanges())}selectInputField(){this.input&&this.input.select(),this.cdr.detectChanges()}blurInput(){this.input&&this.input.blur(),this.cdr.detectChanges()}clearInput(){this.input&&this.input.clear(),this.cdr.detectChanges()}closeInputDrawer(){this.input&&this.input.closeDrawer(),this.cdr.detectChanges()}onDrawerOpen(e){this.openDrawer=void 0!==e,this.cdr.detectChanges()}trackByFn(e,i){return i.model.id}messagesTrackByFn(e,i){return i.model.clientId}updateConversationsList(e){cancelAnimationFrame(this.updateConversationsRafId),this.updateConversationsRafId=requestAnimationFrame(()=>{this.conversationList=e.map(i=>new Bj(i,this.chatUsageIntent,this.permissionsService)),this.updateConversationListByFilter(),this.cdr.detectChanges()})}onArrowCmpClick(){this.arrowDirection===$c.EArrowDirection.Top?this.scrollToOldest():this.scrollToMostRecent(),this.cdr.detectChanges()}onTransitionEnd(e){e.target===this.animatedElement.nativeElement&&(this.chatState===rp.MessagesVisible?(this.stopShowMessagesTimeout(),this.ngZone.run(()=>{this.setViewFlag(KC.ShowMessagesElements,!0)}),this.scrollInRaf(()=>{this.scrollMessagesToBottom(),this.selectInputField()})):this.ngZone.run(()=>{this.setViewFlag(KC.ShowMessagesElements,!1),this.resetUnreadMsgsCount()}))}setArrowDirection(e){this.arrowDirection=e,this.cdr.detectChanges()}animateNewMessage(){this.arrow&&this.arrow.animateNewMessage(),this.cdr.detectChanges()}scrollInRaf(e){cancelAnimationFrame(this.scrollRafId),this.scrollRafId=requestAnimationFrame(()=>{e(),this.cdr.detectChanges()})}showErrorToUser(e){if(e instanceof lt.NetworkError)this.toaster.error("ERRORS.CONNECTION_ERROR");else if(e instanceof lt.NotFriend)this.infoPopupId=this.popup.show("CHAT.PRIVATE_CHAT.FRIENDS_ONLY");else if(e instanceof lt.TargetUserBlockedError)this.toaster.error("CHAT.PRIVATE_CHAT.TARGET_USER_BLOCKED");else if(e instanceof lt.SourceUserBlockedError)this.toaster.error("CHAT.PRIVATE_CHAT.SOURCE_USER_BLOCKED");else if(e instanceof Yo.PrivateTopicDeleted||e instanceof lt.UnathorizedError)console.warn(e);else if(e instanceof lt.NotAllowed)this.toaster.warn("ERRORS.SOMETHING_WRONG");else if(e instanceof Yo.ForbiddenMessageTextError){const s=this.popup.basic({buttons:{buttonObject:{action:()=>{this.popup.hide(s)},buttonTextOptions:{translationKey:"CHAT.I_UNDERSTAND"}}},textParams:{translationKey:"CHAT.MESSAGE_CONTAINS_BAD_WORD"}})}else if(e instanceof lt.LevelRequiredError)this.toaster.error("CHAT.PRIVATE_CHAT.LEVEL_REQUIRED",[e.level]);else if(e instanceof lt.MembershipRequiredError)this.infoPopupId=this.offerServce.offerVip({key:"CHAT.PRIVATE_CHAT.VIP_REQUIRED"});else if(e instanceof Yo.MaxSizeExceededError||e instanceof Yo.DataFormatNotAllowedError){const i=ZC.bytesFormat(this.config.social.chat[this.chatKey].images.maxImageSize);this.toaster.error("GALLERY.IMAGE_UPLOAD_ERROR",[i])}else console.warn(e),this.toaster.error("ERRORS.SOMETHING_WRONG")}startUpdateTimer(){this.ngZone.runOutsideAngular(()=>{this.updateTimeInterval=setInterval(()=>{this.updateTimeTrigger*=-1,this.cdr.detectChanges()},6e4)})}startShowMessagesTimeout(){this.stopShowMessagesTimeout(),this.showMessagesTimeout=setTimeout(()=>{this.setViewFlag(KC.ShowMessagesElements,!0),this.scrollInRaf(()=>{this.scrollMessagesToBottom(),this.selectInputField()})},500)}stopShowMessagesTimeout(){clearTimeout(this.showMessagesTimeout)}isTypeAllowed(e){return this.checkPermissionForAction(Wd.getMessageAction(e)).isPermitted}addListenerOutsideAngular(e,i,r){let s;return this.ngZone.runOutsideAngular(()=>{s=this.renderer.listen(e,i,r)}),s}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Pi),g(Cn),g(Dt),g(an),g(zI),g(yr),g(cr),g(Dr),g(Re),g(ji),g(yi),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["private-chat-tab"]],viewQuery:function(e,i){if(1&e&&($e(rOt,7),$e(sOt,7),$e(aOt,5),$e(UCe,5),$e(UCe,5,$t),$e(cOt,5),$e(lOt,5,$c),$e(uOt,5,zM),$e(dOt,5,HM)),2&e){let r;je(r=He())&&(i.wrapper=r.first),je(r=He())&&(i.animatedElement=r.first),je(r=He())&&(i.myScrollContainer=r.first),je(r=He())&&(i.input=r.first),je(r=He())&&(i.inputRef=r.first),je(r=He())&&(i.conversationsSection=r.first),je(r=He())&&(i.arrow=r.first),je(r=He())&&(i.viewChildren=r),je(r=He())&&(i.messagesViewChildren=r)}},features:[mn([{provide:nn,useFactory:o=>new nn("privateChat",o),deps:[[new jo,new zo,nn]]},yi])],decls:21,vars:24,consts:[[1,"pf-tab__wrapper"],["wrapper",""],[1,"pf__container--wrapper",3,"ngClass"],["animatedElement",""],["data-cy","privateChatContainer",1,"pf-tab__container--conversations"],["class","pf__maintenance-wrapper",4,"ngIf"],["class","pf__spinner",4,"ngIf"],["scroll-directive","","data-cy","privateChatConversationsList",1,"pf-tab__wrapper--convs",3,"ngClass","onScrolledToBottom"],["conversationsSection",""],["class","chat-share-content-preview",3,"content",4,"ngIf"],["data-cy","privateChatConversation",3,"ngClass","conversation","chatUsageIntent","timeText","elId","action",4,"ngFor","ngForOf","ngForTrackBy"],["class","pf_spinner-wrapper",4,"ngIf"],[3,"textArray",4,"ngIf"],[1,"pf-tab__search-bar--wrapper"],["class","pf-tab__search-bar",3,"customInputCssClass","searchBarPlaceholder","filterAction","clearFilters",4,"ngIf"],["data-cy","privateFeedChatContainer",1,"pf-tab__container--chat"],["class","pf-tab__username","data-cy","privateFeedUsernameReceiver",4,"ngIf"],["class","pf-tab__container--messages","data-cy","privateFeedChatMessagesList",3,"ngClass",4,"ngIf"],["class","pf-tab__container--messages","scroll-directive","",3,"ngClass","onScrollUp","onScrolledToTop","onScrolledToBottom",4,"ngIf"],["class","pf__message--arrow",3,"ngClass","direction","unreadMessagesCount","onClick",4,"ngIf"],["class","pf__message-input","data-cy","privateChatInputField",3,"chat","ngClass","isInMaintenance","send","openDrawer",4,"ngIf"],[1,"pf__maintenance-wrapper"],[1,"pf__maintenance-text"],[1,"pf__spinner"],[1,"chat-share-content-preview",3,"content"],["data-cy","privateChatConversation",3,"ngClass","conversation","chatUsageIntent","timeText","elId","action"],["conversationsViewChildren",""],[1,"pf_spinner-wrapper"],[1,"pf__spinner","pf__spinner-conversations"],[3,"textArray"],[1,"pf-tab__search-bar",3,"customInputCssClass","searchBarPlaceholder","filterAction","clearFilters"],["data-cy","privateFeedUsernameReceiver",1,"pf-tab__username"],["data-cy","privateFeedChatMessagesList",1,"pf-tab__container--messages",3,"ngClass"],["scroll-directive","",1,"pf-tab__container--messages",3,"ngClass","onScrollUp","onScrolledToTop","onScrolledToBottom"],["scrollSection",""],["data-cy","privateFeedChatMessage",3,"id","actionsState","message","elId","action",4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","privateFeedChatMessage",3,"id","actionsState","message","elId","action"],["messagesViewChildren",""],[1,"pf__message--arrow",3,"ngClass","direction","unreadMessagesCount","onClick"],["arrow",""],["data-cy","privateChatInputField",1,"pf__message-input",3,"chat","ngClass","isInMaintenance","send","openDrawer"],["input",""]],template:function(e,i){1&e&&(p(0,"section",0,1)(2,"div",2,3)(4,"div",4),U(5,pOt,4,3,"div",5)(6,hOt,1,0,"spinner-loader",6),p(7,"div",7,8),U(9,mOt,1,1,"chat-share-content-preview",9)(10,gOt,3,11,"chat-conversation",10)(11,_Ot,2,0,"div",11)(12,bOt,1,5,"empty-content",12),m(),p(13,"div",13),U(14,COt,1,2,"search-bar",14),m()(),p(15,"div",15),U(16,yOt,3,6,"p",16)(17,TOt,2,4,"div",17)(18,EOt,4,16,"div",18)(19,AOt,2,5,"new-message-arrow",19)(20,kOt,2,5,"message-input",20),m()()()),2&e&&(d(2),l("ngClass",_a(16,LOt,i.chatState===i.chatStateEnums.MessagesVisible,i.chatState===i.chatStateEnums.InstantMessagesVisible,i.chatState===i.chatStateEnums.ConversationsVisible)),d(3),l("ngIf",(null==i.conversationsState?null:i.conversationsState.isInMaintenance)&&!(i.conversationList&&!i.conversationList.length&&!i.conversationsState.loadingState.isLoading)),d(),l("ngIf",!(null!=i.conversationsState&&i.conversationsState.loadingState.isLoaded)&&(null==i.conversationsState?null:i.conversationsState.loadingState.isLoading)),d(),l("ngClass",ne(20,DOt,(null==i.conversationsState?null:i.conversationsState.isInMaintenance)&&!(i.conversationList&&!i.conversationList.length&&!i.conversationsState.loadingState.isLoading)))("onScrolledToBottom",ne(22,jj,i.onConversationsScrolledToBottom)),d(2),l("ngIf",i.chatUsageIntent&&i.chatUsageIntent.type===i.EPrivateChatUsageIntent.ShareContent),d(),l("ngForOf",i.conversationList)("ngForTrackBy",i.trackByFn),d(),l("ngIf",(null==i.conversationsState?null:i.conversationsState.loadingState.isLoaded)&&(null==i.conversationsState?null:i.conversationsState.loadingState.isLoading)),d(),l("ngIf",i.conversationList&&!i.conversationList.length&&!i.conversationsState.loadingState.isLoading),d(2),l("ngIf",i.conversationList&&i.conversationList.length),d(2),l("ngIf",i.openedConversation),d(),l("ngIf",!(i.getViewFlag(i.flagEnums.ShowMessagesElements)&&i.messagesList&&i.messagesList.length)),d(),l("ngIf",i.messagesList&&i.messagesList.length&&i.getViewFlag(i.flagEnums.ShowMessagesElements)),d(),l("ngIf",i.messagesList&&i.messagesList.length&&i.getViewFlag(i.flagEnums.ShowMessagesElements)),d(),l("ngIf",i.openedConversation&&i.openedConversation.loadingState.isLoaded&&i.getViewFlag(i.flagEnums.ShowMessagesElements)&&i.messagesList&&(i.messagesList.length||i.newConversationPermission.isEnabled)))},dependencies:[Xe,Mt,Ne,Is,bo,pf,vc,HM,VM,zM,zj,$c,qe,Bm],styles:[".pf-tab__wrapper[_ngcontent-%COMP%]{position:relative;top:0;left:0;text-rendering:optimizeSpeed;height:100%;width:100%;overflow:hidden}.pf__container--wrapper[_ngcontent-%COMP%]{top:0;right:0;display:flex;flex-flow:row;flex-wrap:nowrap;flex-direction:row;position:absolute;width:200%;height:100%;overflow:hidden;will-change:transform;transform:translate(50%)}@media screen and (max-width: 768px){.pf__container--wrapper[_ngcontent-%COMP%]{height:100%}}.chat-share-content-preview[_ngcontent-%COMP%]{height:auto;min-height:15rem;width:100%}.pf-tab__container--chat[_ngcontent-%COMP%]{position:relative;bottom:0;right:0;width:50%;flex:1;height:100%;overflow:hidden;z-index:1}.pf-tab__container--messages[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;width:100%;height:calc(100% - 11.25rem);overflow-y:auto;overflow-x:hidden;margin:0}@media screen and (max-width: 768px){.pf-tab__container--messages[_ngcontent-%COMP%]{height:calc(100% - 8.25rem)}}.pf__message--arrow[_ngcontent-%COMP%]{position:absolute;bottom:12rem;right:0}.pf__new-message--arrow-drawer-open[_ngcontent-%COMP%]{transition:transform .2s ease-in-out;transform:translate3d(0,-19rem,0)}@media screen and (max-width: 768px){.pf__new-message--arrow-drawer-open[_ngcontent-%COMP%]{transform:translate3d(0,-16rem,0)}}.pf__message-input[_ngcontent-%COMP%]{height:9rem}@media screen and (max-width: 768px){.pf__message-input[_ngcontent-%COMP%]{height:6rem}}.pf__message-input.pf__message-input--arrow-drawer-open[_ngcontent-%COMP%]{height:28rem}@media screen and (max-width: 768px){.pf__message-input.pf__message-input--arrow-drawer-open[_ngcontent-%COMP%]{height:22rem}}.visible[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s linear}.hidden[_ngcontent-%COMP%]{display:none;transform:scale(1)}.pf-tab__container--conversations[_ngcontent-%COMP%]{bottom:0;flex:1;width:50%;position:relative;overflow:hidden;height:100%;margin:0;transform:translateZ(0)}.pf-tab__wrapper--convs[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;overflow-y:auto;overflow-x:hidden;height:calc(100% - 6rem)}.pf-tab__wrapper--convs.in-maintenance[_ngcontent-%COMP%]{height:calc(100% - 11rem)}.pf-tab__search-bar--wrapper[_ngcontent-%COMP%]{position:relative;height:6rem;padding:.5rem 1rem}.pf__spinner[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2}.pf__spinner-conversations[_ngcontent-%COMP%]{width:4rem;font-size:2.8rem}.pf_spinner-wrapper[_ngcontent-%COMP%]{display:block;position:relative;height:4rem}.pf__element-invisible[_ngcontent-%COMP%]{opacity:0}.open-conversations[_ngcontent-%COMP%]{transition:transform .3s ease;transform:translate(50%)}.open-messages[_ngcontent-%COMP%]{transition:transform .3s ease;transform:translate(0)}.open-messages-instant[_ngcontent-%COMP%]{transform:translate(0)}.pf__container--messages-drawer-opened[_ngcontent-%COMP%]{transition:transform .2s ease-in-out;transform:translate3d(0,-19rem,0)}@media screen and (max-width: 768px){.pf__container--messages-drawer-opened[_ngcontent-%COMP%]{transform:translate3d(0,-16rem,0)}}.filtered[_ngcontent-%COMP%]{display:none}.pf__maintenance-wrapper[_ngcontent-%COMP%]{display:flex;width:100%;height:5rem}.pf__maintenance-text[_ngcontent-%COMP%]{width:100%;margin:auto;padding:0 3rem;text-align:center;font-weight:600;font-size:1.8rem}.pf-tab__username[_ngcontent-%COMP%]{display:flex;width:100%;height:2rem;font-size:1.4rem;text-align:center;margin-top:.25rem;justify-content:center;align-items:center}"],changeDetection:0}),n})();var Hj;!function(t){let n;var e;let o;(e=n=t.EGlobalChatAnimationState||(t.EGlobalChatAnimationState={})).Opened="opened",e.Closed="closed",e.InstantOpened="instantOpened",e.InstantClosed="instantClosed",function(e){e.ShowMessageInput="showMessageInput",e.MessageInputEnabled="messageInputEnabled",e.ContainerScrolledToBottom="containerScrolledToBottom",e.ShowConversationsLoader="showConversationsLoader",e.ShowMessagesLoader="showMessagesLoader",e.ShowMessagesElements="showMessagesElements",e.OverflowHidden="overflowHidden",e.ConversationCreateViewOpened="creatingConversation"}(o=t.EPublicChatComponentFlag||(t.EPublicChatComponentFlag={}))}(Hj||(Hj={}));class qM{constructor(n,o,e,i,r){this.chat="public",this.model={...n,user:n.getOwner(),message:n.firstMsg},this.ui={actions:qM.createActions(n,o,e,i,r,this.chat),hasAvatar:!0,visible:!0,isSticky:!!n.displayOrder,isLocked:n.isLocked,isKicked:void 0!==n.kicked.find(s=>s===e)}}static createActions(n,o,e,i,r,s){switch(o.channelType){case Ar.LanguageBased:return qM.createLanguageBasedChatActions(n,e,i,r,s);case Ar.Club:return qM.createClubChatActions(n,o.clubProfile,e,i,r,s)}}static createLanguageBasedChatActions(n,o,e,i,r){if(e.type===zc.ShareContent)return[Yr.ShareContent];const s=[Yr.Select];return n.ownerId===o&&i.getActionPermission(Wd.getChatModuleByKey(r),nt.EModuleAction.Edit).isEnabled&&s.push(Yr.Delete),s.push(n.isLiked?Yr.Unlike:Yr.Like),s}static createClubChatActions(n,o,e,i,r,s){if(!o)return[];if(i.type===zc.ShareContent)return[Yr.ShareContent];const a=[Yr.Select];return(n.ownerId===e||r.getClubActionPermission(o,nt.EModuleAction.ManageClubChat).isPermitted)&&a.push(Yr.Delete),a.push(n.isLiked?Yr.Unlike:Yr.Like),a}}class kg{constructor(n,o,e,i,r,s,a){this.chat="public",this.model=n,this.ui={actions:kg.createActions(n,o,r,s,e,a,this.chat),hasAvatar:kg.shouldShowAvatar(n,e,i),isMyMessage:n.senderId===r,isSticky:kg.isSticky(s,e),showUsername:kg.shouldShowUsername(n,e,i),isDeleted:this.model.isDeleted,isConversationOwner:s.ownerId===n.senderId}}static createActions(n,o,e,i,r,s,a){switch(o.channelType){case Ar.LanguageBased:return kg.createLanguageBasedChatActions(n,e,i,r,s,a);case Ar.Club:return kg.createClubChatActions(n,o.clubProfile,e,i,r,s,a)}}static createLanguageBasedChatActions(n,o,e,i,r,s){const a=[];return n.isAdmin?a:n.isDeleted?(o!==n.senderId&&o===e.ownerId&&!e.kicked.find(c=>c===n.senderId)&&a.push(ps.Kick),a):(n.actions.send.error?a.push(ps.Send):o===n.senderId?r.getActionPermission(Wd.getChatModuleByKey(s),nt.EModuleAction.Edit).isEnabled&&a.push(ps.Delete):(this.isSticky(e,i)||a.push(ps.Report),o===e.ownerId&&(r.getActionPermission(Wd.getChatModuleByKey(s),nt.EModuleAction.Edit).isEnabled&&a.push(ps.Delete),e.kicked.find(c=>c===n.senderId)||a.push(ps.Kick))),a)}static createClubChatActions(n,o,e,i,r,s,a){const c=[],u=s.getClubActionPermission(o,nt.EModuleAction.ManageClubChat).isPermitted;return n.isDeleted?(e===i.ownerId&&e!==n.senderId&&n.senderId!==i.ownerId&&!i.kicked.find(h=>h===n.senderId)&&c.push(ps.Kick),c):(n.actions.send.error?c.push(ps.Send):e===n.senderId?s.getActionPermission(Wd.getChatModuleByKey(a),nt.EModuleAction.Edit).isEnabled&&c.push(ps.Delete):((e===i.ownerId||u)&&s.getActionPermission(Wd.getChatModuleByKey(a),nt.EModuleAction.Edit).isEnabled&&c.push(ps.Delete),e===i.ownerId&&e!==n.senderId&&n.senderId!==i.ownerId&&!i.kicked.find(h=>h===n.senderId)&&c.push(ps.Kick)),c)}static shouldShowAvatar(n,o,e){if(n.isAdmin||n.type===Ii.Kick)return!1;const i=e[o-1];return!i||i.type===Ii.Kick||i.senderId!==n.senderId}static shouldShowUsername(n,o,e){if(n.type===Ii.Kick)return!1;const i=e[o-1];return!i||i.type===Ii.Kick||i.senderId!==n.senderId}static isSticky(n,o){return n.displayOrder&&0===o}}var qj=ve.EButtonModifier,Wj=ve.EIcons,$j=nt.EModuleAction;const zCe=t=>({name:t});function BOt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",3),Y("onClick",function(){return oe(o),re(_().onNewStickyTopicButtonClick())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("bclass",o.chatUsageIntent.type===o.EChatUsageIntent.General?"gf__button--new-topic--bclass":"gf__button--new-topic--bclass__share")("icon",ne(8,zCe,o.newStickyTopicButton.icon))("buttonModifier",o.newStickyTopicButton.modifier)("loading",o.newStickyTopicButton.loading)("disabled",!o.canCreateStickyTopic()),d(),se($(2,6,"BUTTON.STICKY"))}}let jCe=(()=>{var t;class n{constructor(e,i,r){this.showNewStickyTopic=!1,this.createConversation=new ke,this.createStickyConversation=new ke,this.EChatUsageIntent=zc,this.subscriptions=new ie.List,this.cdr=e,this.cdr.detach(),this.permissions=i,this.store=r}ngOnInit(){this.subscriptions.add(this.store.subscribePublicConversationsList().subscribe(e=>{const i=void 0!==e.find(r=>r.actions.create.inProgress);this.newTopicButton.loading=i,this.newStickyTopicButton.loading=i,this.cdr.detectChanges()})),this.chatType===Ar.Club&&this.subscriptions.add(this.store.clubs.subscribeCurrentClubState().subscribe(e=>{this.cdr.detectChanges()})),this.cdr.detectChanges()}ngOnChanges(e){this.chatUsageIntent.type===zc.General?(this.newTopicButton={...this.newTopicButton,modifier:qj.BUTTON_ATTENTION,icon:Wj.PLUS,disabled:!1},this.newStickyTopicButton={...this.newStickyTopicButton,modifier:qj.BUTTON_ACTION,icon:Wj.PLUS,disabled:!1}):this.newTopicButton={...this.newTopicButton,modifier:qj.BUTTON_LIGHT,icon:Wj.SEND,disabled:!this.isActionAllowed($j.SendGameRoomMessage)},this.cdr.detectChanges()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=void 0}onButtonClick(){this.createConversation.emit(),this.cdr.detectChanges()}onNewStickyTopicButtonClick(){this.createStickyConversation.emit(),this.cdr.detectChanges()}canCreateStickyTopic(){switch(this.chatType){case Ar.LanguageBased:return this.isActionAllowed($j.CreatyStickyTopic);case Ar.Club:const e=this.store.clubs.selectClubProfile();return!!e&&this.permissions.getClubActionPermission(e,$j.CreatyStickyTopic).isPermitted}}isActionAllowed(e){return this.permissions.getActionPermission(this.chatPermissionModule,e).isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Ti),g(Jo))},t.\u0275cmp=pe({type:t,selectors:[["new-topic-container"]],inputs:{chatUsageIntent:"chatUsageIntent",chatPermissionModule:"chatPermissionModule",showNewStickyTopic:"showNewStickyTopic",chatType:"chatType"},outputs:{createConversation:"createConversation",createStickyConversation:"createStickyConversation"},features:[it],decls:5,vars:11,consts:[[1,"gf__container--new-topic"],["class","gf__button--new-topic",3,"bclass","icon","buttonModifier","loading","disabled","onClick",4,"ngIf"],[1,"gf__button--new-topic",3,"bclass","icon","buttonModifier","disabled","loading","onClick"],[1,"gf__button--new-topic",3,"bclass","icon","buttonModifier","loading","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,BOt,3,10,"button-icon-text",1),p(2,"button-icon-text",2),Y("onClick",function(){return i.onButtonClick()}),H(3),V(4,"translate"),m()()),2&e&&(d(),l("ngIf",i.showNewStickyTopic&&i.chatUsageIntent.type===i.EChatUsageIntent.General),d(),l("bclass",i.chatUsageIntent.type===i.EChatUsageIntent.General?"gf__button--new-topic--bclass":"gf__button--new-topic--bclass__share")("icon",ne(9,zCe,i.newTopicButton.icon))("buttonModifier",i.newTopicButton.modifier)("disabled",i.newTopicButton.disabled)("loading",i.newTopicButton.loading),d(),ze("",$(4,7,"BUTTON.NEW_TOPIC")," "))},dependencies:[Ne,so,qe],styles:[".gf__container--new-topic[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.gf__container--new-topic[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-left:1%}.gf__button--new-topic[_ngcontent-%COMP%]{width:100%;height:80%;margin:0}.gf__button--new-topic[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:calc(100% - 7rem)}"],changeDetection:0}),n})();var HCe=et.Feedback.Cooldown,vf=Hj.EPublicChatComponentFlag,qCe=nt.EPermissionModule,Kj=nt.EModuleAction,Zj=et.Permissions.RequirementNotMeet;const NOt=["wrapper"],FOt=["animatedElement"],UOt=["scrollSection"],GOt=["conversationsList"],WCe=["messageInput"],VOt=["arrow"],zOt=["conversationsViewChildren"],jOt=["messagesViewChildren"];function HOt(t,n){1&t&&(p(0,"div",19)(1,"p",20),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"CHAT.CHAT_MAINTENANCE")))}function qOt(t,n){1&t&&B(0,"spinner-loader",21)}function WOt(t,n){1&t&&B(0,"chat-share-content-preview",22),2&t&&l("content",_().chatUsageIntent)}function $Ot(t,n){if(1&t){const o=Ce();Tn(0),p(1,"chat-conversation",23,24),Y("action",function(i){const s=oe(o).$implicit;return re(_().onConversationAction(i,s.model))}),V(3,"timeElapsedPipe"),m(),Pn()}if(2&t){const o=n.$implicit,e=_();d(),l("id",o.model.id)("chatUsageIntent",e.chatUsageIntent)("conversation",o)("timeText",yt(3,6,o.model.createdAt/1e3,e.updateTimeTrigger))("elId",o.model.id),Hn("data-cy2",o.model.user.id)}}const KOt=t=>({textKey:t}),ZOt=t=>[t];function QOt(t,n){if(1&t&&B(0,"empty-content",25),2&t){const o=_();l("textArray",ne(3,ZOt,ne(1,KOt,null!=o.chatState&&o.chatState.isInMaintenance?"CHAT.CHAT_MAINTENANCE":"CHAT.GLOBAL_CHAT.NO_CONVERSATIONS")))}}function YOt(t,n){if(1&t){const o=Ce();p(0,"new-topic-container",26),Y("createConversation",function(){return oe(o),re(_().newTopicClick())})("createStickyConversation",function(){return oe(o),re(_().onNewStickyTopicClick())}),m()}if(2&t){const o=_();l("chatType",o.chatType)("chatPermissionModule",o.chatPermissionModule)("chatUsageIntent",o.chatUsageIntent)("showNewStickyTopic",o.chatType===o.EPublicChatChannelType.Club)}}function JOt(t,n){1&t&&B(0,"spinner-loader",29)}const XOt=t=>({"gf__container--messages-drawer-opened":t});function eEt(t,n){if(1&t&&(p(0,"div",27),U(1,JOt,1,0,"spinner-loader",28),m()),2&t){const o=_();l("ngClass",ne(2,XOt,o.openDrawer)),d(),l("ngIf",o.openedConversation&&(o.openedConversation.loadingState.isLoading||o.openedConversation.actions.create.inProgress))}}function tEt(t,n){if(1&t){const o=Ce();p(0,"chat-message",33,34),Y("action",function(i){const s=oe(o).$implicit;return re(_(2).onMessageAction(i,s.model))}),m()}if(2&t){const o=n.$implicit;l("id",o.model.id)("actionsState",o.model.actions)("message",o)("elId",o.model.id),Hn("data-cy2",o.model.id)}}function nEt(t,n){1&t&&B(0,"spinner-loader",21)}const iEt=(t,n)=>({"gf__element-invisible":t,"gf__container--messages-drawer-opened":n}),oEt=t=>({handler:t,outsideZone:!0}),$Ce=t=>({handler:t});function rEt(t,n){if(1&t&&(p(0,"div",30,31),U(2,tEt,2,5,"chat-message",32)(3,nEt,1,0,"spinner-loader",6),m()),2&t){const o=_();l("ngClass",cn(7,iEt,!o.getViewFlag(o.flagEnums.ContainerScrolledToBottom),o.openDrawer))("onScrollUp",ne(10,oEt,o.onScrollUp))("onScrolledToTop",ne(12,$Ce,o.onScrolledToTop))("onScrolledToBottom",ne(14,$Ce,o.onScrolledToBottom)),d(2),l("ngForOf",o.messagesList)("ngForTrackBy",o.messagesTrackByFn),d(),l("ngIf",o.openedConversation&&o.openedConversation.loadingState.isLoading)}}const sEt=t=>({"gf__new-message--arrow-drawer-open":t});function aEt(t,n){if(1&t){const o=Ce();p(0,"new-message-arrow",35,36),Y("onClick",function(){return oe(o),re(_().onArrowCmpClick())}),m()}if(2&t){const o=_();l("ngClass",ne(3,sEt,o.openDrawer))("direction",o.arrowDirection)("unreadMessagesCount",o.unreadMessagesCount)}}const cEt=t=>({"gf__message-input--arrow-drawer-open":t});function lEt(t,n){if(1&t){const o=Ce();p(0,"message-input",37,38),Y("send",function(i){return oe(o),re(_().onInputSend(i))})("openDrawer",function(i){return oe(o),re(_().onDrawerOpen(i))}),m()}if(2&t){const o=_();l("ngClass",ne(6,cEt,o.openDrawer))("chat",o.chatKey)("muted",o.chatType===o.EPublicChatChannelType.LanguageBased&&o.currentUser.isGlobalFeedMuted)("locked",o.openedConversation&&o.openedConversation.isLocked)("isInMaintenance",null==o.chatState?null:o.chatState.isInMaintenance)("isKicked",o.isKicked(o.openedConversation))}}const uEt=(t,n)=>({"open-messages":t,"open-conversations":n}),dEt=t=>({"in-maintenance":t});let Qj=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te){var ee=this;this.popup=e,this.toaster=i,this.ngZone=r,this.permissionsService=s,this.store=a,this.chat=c,this.actions=u,this.scrollHelper=h,this.config=b,this.cdr=w,this.renderer=R,this.analyticsTracking=G,this.timeLeftPipe=K,this.offerService=te,this.chatType=Ar.LanguageBased,this.scrollAnimation={durationMs:100,timingFunction:pM},this.unreadMessagesCount=0,this.chatPermissionModule=qCe.GlobalChat,this.subscriptions=new ie.List,this.currentSortOrder=ie.ESort.Desc,this.messagesSubscriptions={list:void 0,firstUpdate:void 0,model:void 0},this.EPublicChatUsageIntent=zc,this.listeners=new ie.List,this.chatKey="public",this.EPublicChatChannelType=Ar,this.conversationsListSubscriptions=new ie.List,this.onChatOpened=function(){var le=f(function*(me){me?ee.trySynchronizeChat():ee.chat.stopTryToSynchronizeChatCycle(ee.channel),ee.cdr.detectChanges()});return function(me){return le.apply(this,arguments)}}(),this.onInMaintenance=function(){var le=f(function*(me){ee.store.selectPublicChatIsOpened({channel:ee.channel})&&me&&ee.chat.startTryToSynchronizeChatCycle(ee.channel)});return function(me){return le.apply(this,arguments)}}(),this.onConnectionRestored=()=>{this.store.selectPublicChatIsOpened({channel:this.channel})&&this.trySynchronizeChat(),this.store.selectPublicOpenedConversationModel({channel:this.channel})&&this.changeScrollDirection(ie.ESort.Desc)},this.onConversationAdd=le=>{if(!this.viewChildren)return;const me=this.viewChildren.changes.pipe(Qi(1)).subscribe(ge=>{const Me=ge.find(Ke=>Ke.elId===le.conversation.id);Me&&Me.animateEnter(),this.conversationsListSubscriptions.remove(me)});this.conversationsListSubscriptions.add(me)},this.onConversationRemove=le=>{if(!this.viewChildren)return;const me=this.viewChildren.find(ge=>ge.elId===le.conversationId);me&&me.animateExit()},this.onMessageSent=()=>{const le=this.store.selectPublicOpenedConversationModel({channel:this.channel});this.currentSortOrder===ie.ESort.Desc||le.meta[ie.ESort.Asc].isLastPage?this.scrollInRaf(()=>{this.scrollToBottomAnimated()}):this.currentSortOrder===ie.ESort.Asc&&this.scrollToMostRecent(),this.cdr.detectChanges()},this.onMessageReceived=le=>{!this.openedConversation||this.openedConversation.id!==le.message.conversationId||(this.arrowDirection===$c.EArrowDirection.Bottom?(this.incrementUnreadMsgsCount(),this.animateNewMessage()):this.scrollInRaf(()=>{this.scrollToBottomAnimated()}),le.message.type===Ii.Kick&&le.message.data.kickedUserId===this.currentUser.profile.id&&this.toaster.warn("CHAT.PLAYER_KICKED_NOTIFICATION"),this.cdr.detectChanges())},this.onCurrentTopicDeleted=()=>{this.closeCurrentConversation(),this.infoPopupId=this.popup.show("CHAT.GLOBAL_CHAT.DELETED_CONVERSATION"),this.cdr.detectChanges()},this.onScrolledToTop=f(function*(){const le=ee.store.selectPublicOpenedConversationModel({channel:ee.channel});if(ee.currentSortOrder===ie.ESort.Desc&&!le.loadingState.isLoading&&!le.meta[ie.ESort.Desc].isLastPage)try{const me=ee.messagesList[0].model.id;yield ee.chat.getNextMessages(le,{pageCount:1,sort:ie.ESort.Desc}),ee.scrollInRaf(()=>{const ge=document.getElementById(me);ge&&ee.scrollHelper.scrollElement({element:ee.scrollContainer.nativeElement,targetScroll:ge.offsetTop,position:Na.EScrollPosition.ScrollTop})})}catch(me){console.warn(me)}}),this.onScrolledToBottom=f(function*(){const le=ee.store.selectPublicOpenedConversationModel({channel:ee.channel});if((ee.currentSortOrder===ie.ESort.Desc||le.meta[ie.ESort.Asc].isLastPage)&&(ee.resetUnreadMsgsCount(),ee.setArrowDirection($c.EArrowDirection.Top)),ee.currentSortOrder===ie.ESort.Asc&&!le.loadingState.isLoading&&!le.meta[ie.ESort.Asc].isLastPage)try{yield ee.chat.getNextMessages(le,{pageCount:1,sort:ie.ESort.Asc})}catch(me){console.warn(me)}}),this.onScrollUp=()=>{this.setArrowDirection($c.EArrowDirection.Bottom)},this.scrollToBottomAnimated=()=>{this.scrollMessagesToBottom(this.scrollAnimation)},this.chatAnimationState=rp.InstantConversationsVisible,this.updateTimeTrigger=1,this.componentViewFlags={},this.flagEnums=vf,this.chatStateEnums=rp,this.timeLeftConfig=Zu,w.detach()}ngOnChanges(e){e.channel&&e.channel.currentValue&&e.channel.currentValue!==e.channel.previousValue&&(this.dispose(),this.init(),this.cdr.detectChanges())}ngOnDestroy(){this.dispose()}init(){this.subscriptions.add(this.store.subscribeUserState().pipe(bt(e=>void 0!==e)).subscribe(e=>{this.currentUser=e,this.cdr.detectChanges()})),this.subscriptions.add(this.store.subscribePublicChatState({channel:this.channel}).subscribe(e=>{e||this.dispose()})),this.resetFlags(),this.subscriptions.add(this.store.subscribePublicOpenedConversation({channel:this.channel}).subscribe(this.onConversationChange.bind(this))),this.subscriptions.add(this.store.subscribePublicChatState({channel:this.channel}).subscribe(e=>{this.chatState=e,this.cdr.detectChanges()})),this.subscriptions.add(this.store.chatComponent.subscribeIntent().subscribe(e=>{this.chatUsageIntent=e,this.updateConversationsList(this.store.selectPublicConversationsList({channel:this.channel})),this.cdr.detectChanges()})),this.subscriptions.add(this.store.subscribePublicConversationsList({channel:this.channel}).subscribe(e=>this.updateConversationsList(e))),this.subscriptions.add(this.actions.pipe(ai(WI)).subscribe(this.onMessageReceived)),this.subscriptions.add(this.actions.pipe(ai(zk)).subscribe(this.onMessageSent)),this.subscriptions.add(this.actions.pipe(ai(M6)).subscribe(this.onConversationAdd)),this.subscriptions.add(this.actions.pipe(ai(E6)).subscribe(this.onConversationRemove)),this.subscriptions.add(this.actions.pipe(ai(qpe)).subscribe(this.onCurrentTopicDeleted)),this.listeners.add(this.addListenerOutsideAngular(this.wrapper.nativeElement,"click",this.clickOutsideTheInput.bind(this))),this.listeners.add(this.addListenerOutsideAngular(this.animatedElement.nativeElement,"transitionend",this.onTransitionEnd.bind(this))),this.listeners.add(this.addListenerOutsideAngular(window,"resize",this.onResize.bind(this))),this.subscriptions.add(this.store.subscribePublicChatIsOpened({channel:this.channel}).subscribe(this.onChatOpened)),this.subscriptions.add(this.store.subscribePublicChatIsInMaintenance({channel:this.channel}).subscribe(this.onInMaintenance)),this.subscriptions.add(this.actions.pipe(ai(k6),bt(e=>e.channel===this.channel)).subscribe(this.onConnectionRestored)),this.subscriptions.add(this.store.chatComponent.subscribeIsOpened().pipe(bt(e=>!e)).subscribe(e=>this.onChatClosed())),this.setUpdateInterval(6e4)}dispose(){this.subscriptions.forEach(e=>e.unsubscribe()),this.listeners.forEach(e=>e()),clearInterval(this.updateLastSeenInterval),this.popup.hide(this.infoPopupId),clearInterval(this.updateTimeInterval),cancelAnimationFrame(this.updateConversationsRafId)}trySynchronizeChat(){var e=this;return f(function*(){try{yield e.chat.synchronizeChat(e.channel)}catch(i){console.warn(i),e.store.selectPublicChatIsOpened({channel:e.channel})&&e.chat.startTryToSynchronizeChatCycle(e.channel)}})()}onDrawerOpen(e){this.openDrawer=void 0!==e,this.cdr.detectChanges()}onConversationChange(e){clearInterval(this.updateLastSeenInterval),this.messagesSubscriptions.list&&this.messagesSubscriptions.list.unsubscribe(),this.messagesSubscriptions.firstUpdate&&this.messagesSubscriptions.firstUpdate.unsubscribe(),this.messagesSubscriptions.model&&this.messagesSubscriptions.model.unsubscribe();let i=this.store.selectPublicOpenedConversationModel({channel:this.channel});if(this.openedConversation=i,!e)return this.setChatState(rp.ConversationsVisible),this.messagesList=[],void this.cdr.detectChanges();this.messagesSubscriptions.model=this.store.subscribePublicOpenedConversationModel({channel:this.channel}).subscribe(a=>{this.openedConversation=a,this.cdr.detectChanges()}),this.currentSortOrder=ie.ESort.Desc,this.setChatState(rp.MessagesVisible);const r=this.store.subscribePublicMessagesByConversationId({conversationId:e,sort:ie.ESort.Desc}).pipe(bt(a=>0!==a.length));this.messagesSubscriptions.list=r.subscribe(a=>{const c={channelType:this.chatType};this.chatType===Ar.Club&&(c.clubProfile=this.store.clubs.selectClubProfile()),this.messagesList=a.map((u,h,b)=>new kg(u,c,h,b,this.currentUser.profile.id,this.openedConversation,this.permissionsService)),this.cdr.detectChanges()});let s={lastMessageId:void 0};this.startShowMessagesTimeout(),this.messagesSubscriptions.firstUpdate=r.pipe(Qi(1)).subscribe(()=>{this.scrollInRaf(()=>{this.scrollMessagesToBottom()}),s=this.readConversation(this.store.selectPublicOpenedConversationModel({channel:this.channel}))}),this.ngZone.runOutsideAngular(()=>{this.updateLastSeenInterval=setInterval(()=>{if(this.store.selectPublicChatIsOpened({channel:this.channel})&&(i=this.store.selectPublicOpenedConversationModel({channel:this.channel}),i)){const a=i.getLastSentMessage();a&&s.lastMessageId!==a.id&&(s=this.readConversation(i))}},1e4)}),this.cdr.detectChanges()}readConversation(e){const i=e.getLastSentMessage();return i&&this.store.selectIsSubscribedToPublicConversation(e.id)&&this.chat.readConversation(e.id),{lastMessageId:i?i.id:void 0}}closeConversation(e){e.isDraft||this.readConversation(e),this.chat.closeConversation(e.id)}closeCurrentConversation(){const e=this.store.selectPublicOpenedConversationModel({channel:this.channel});e&&this.closeConversation(e)}clearMessagesView(){clearInterval(this.updateLastSeenInterval),this.clearInputField(),this.blurInputField(),this.setViewFlag(vf.ShowMessageInput,!1),this.setArrowDirection($c.EArrowDirection.Top),this.setViewFlag(vf.ContainerScrolledToBottom,!1),this.cdr.detectChanges()}onChatClosed(){this.clearMessagesView(),this.closeCurrentConversation(),this.cdr.detectChanges()}onConversationAction(e,i){switch(e.type){case Yr.Select:this.openConversation(i.id);break;case Yr.Delete:this.deleteConversation(i);break;case Yr.ShareContent:this.shareContent(i.id);break;case Yr.Like:this.likeConversation(i.id);break;case Yr.Unlike:this.unlikeConversation(i.id)}}onMessageAction(e,i){switch(e.type){case ps.Delete:this.deleteMessage(i);break;case ps.Report:this.reportMessage(i);break;case ps.Send:this.resendMessage(i);break;case ps.Kick:this.kickPlayer(i)}}kickPlayer(e){var i=this;return f(function*(){var r;i.infoPopupId=i.popup.confirm({buttons:{action:(r=f(function*(){try{yield i.chat.kickUser(e.conversationId,e.senderId)}catch(s){console.warn(s),i.showErrorToUser(s)}}),function(){return r.apply(this,arguments)})},textParams:{translationKey:"CHAT.KICK_USER"}})})()}resendMessage(e){var i=this;return f(function*(){try{yield i.chat.resendMessage(e)}catch(r){console.warn(r)}})()}shareContent(e){var i=this;return f(function*(){try{if(e){const r=i.checkPermissionForAction(nt.EModuleAction.Send);if(!i.isTypeAllowed(Ii.GameRoom))throw new Yo.MessageTypeDisabledError;if(!r.isPermitted)return void i.permissionsService.showFailedRequirementsToUser(r);yield i.chat.shareContent(i.chatUsageIntent.data,e)}else{const r=i.checkPermissionForAction(nt.EModuleAction.Create);if(!i.isTypeAllowed(Ii.GameRoom))throw new Yo.MessageTypeDisabledError;if(!r.isPermitted)return void i.permissionsService.showFailedRequirementsToUser(r);yield i.chat.shareInNewConversation(i.chatUsageIntent.data,i.channel)}}catch(r){if(console.warn(r),r instanceof HCe)i.popup.show("CHAT.GLOBAL_CHAT.TOPIC_TIMEOUT",[i.timeLeftPipe.transform(r.cooldown,{timeConfig:i.timeLeftConfig})]);else{if(r instanceof Yo.InvalidMessageContentError)return;r instanceof et.General.NotFound&&e&&i.openedConversation&&i.openedConversation.id===e&&i.onCurrentTopicDeleted(),i.showErrorToUser(r)}}finally{i.cdr.detectChanges()}})()}likeConversation(e){var i=this;return f(function*(){try{yield i.chat.likeConversation(e)}catch(r){i.showErrorToUser(r)}})()}unlikeConversation(e){var i=this;return f(function*(){try{yield i.chat.unlikeConversation(e)}catch(r){i.showErrorToUser(r)}})()}onInputSend(e){!this.openedConversation||this.openedConversation.actions.create.inProgress||(this.openedConversation.isDraft?this.createConversation(e,this.openedConversation.id):this.sendMessage(e))}sendMessage(e){var i=this;return f(function*(){const r=i.store.selectPublicOpenedConversationModel({channel:i.channel});try{if(i.store.selectPublicChatState({channel:i.channel}).type===Ar.LanguageBased){const s=i.checkPermissionForAction(Kj.Send);if(!s.isPermitted)return void i.permissionsService.showFailedRequirementsToUser(s)}if(!i.isTypeAllowed(e.type))throw new Yo.MessageTypeDisabledError;i.clearInputField(),yield i.chat.sendMessage(e,r.id)}catch(s){if(console.warn(s),s instanceof Yo.InvalidMessageContentError)return;if(s instanceof et.Permissions.RequirementNotMeet)return void i.permissionsService.showFailedRequirementsToUser(s);s instanceof et.General.NotFound&&i.openedConversation&&i.openedConversation.id===r.id&&i.onCurrentTopicDeleted(),i.showErrorToUser(s)}finally{i.cdr.detectChanges()}})()}reportMessage(e){var r,i=this;this.infoPopupId=this.popup.confirm({buttons:{action:(r=f(function*(){try{yield i.chat.reportMessage(e.id,e.senderId),i.toaster.success("REPORT.SUCCESSFUL_REPORT")}catch(s){console.warn(s),s instanceof HCe?i.toaster.success("REPORT.SUCCESSFUL_REPORT"):i.showErrorToUser(s)}}),function(){return r.apply(this,arguments)})},textParams:{translationKey:"POPUP.REPORT_MSG"}})}openConversation(e){this.chat.openConversation(e),this.cdr.detectChanges()}clickOutsideTheInput(e){this.inputRef&&!1===this.inputRef.nativeElement.contains(e.target)&&(this.closeInputDrawer(),this.cdr.detectChanges())}onTransitionEnd(e){e.target===this.animatedElement.nativeElement&&(this.chatAnimationState===rp.MessagesVisible?(this.stopShowMessagesTimeout(),this.ngZone.run(()=>{this.setViewFlag(vf.ShowMessagesElements,!0)}),this.scrollInRaf(()=>{this.scrollMessagesToBottom(),this.selectInputField()})):this.ngZone.run(()=>{this.setViewFlag(vf.ShowMessagesElements,!1),this.resetUnreadMsgsCount(),this.cdr.detectChanges()}))}onResize(){this.scrollInRaf(()=>{this.currentSortOrder===ie.ESort.Desc?this.scrollMessagesToBottom():this.scrollTo(0)})}openCreateConversation(e={}){this.closeCurrentConversation(),this.setChatState(rp.MessagesVisible);const i=this.chat.addNewConversationDraft(this.channel,{displayOrder:null!=e&&e.isSticky?1:void 0});this.openConversation(i.id),this.cdr.detectChanges()}newTopicClick(){switch(this.chatUsageIntent.type){case zc.General:this.openCreateConversation({isSticky:!1});break;case zc.ShareContent:this.shareContent()}}onNewStickyTopicClick(){this.chatUsageIntent.type===zc.General&&this.openCreateConversation({isSticky:!0})}createConversation(e,i){var r=this;return f(function*(){try{if(r.store.selectPublicChatState({channel:r.channel}).type===Ar.LanguageBased){const c=r.checkPermissionForAction(Kj.Create);if(!c.isPermitted)return void(c.minLevelRequirement.isFulfilled?c.vipRequirement.isFulfilled?r.permissionsService.showFailedRequirementsToUser(c):r.infoPopupId=r.offerService.offerVip({key:"CHAT.GLOBAL_CHAT.VIP_REQUIRED"}):r.toaster.error("CHAT.GLOBAL_CHAT.LEVEL_REQUIRED",[c.config.requirements.level]))}const s=Vh.createNewConversation(e);yield r.chat.createConversation(s,r.channel,i);const a=new Jc.DefaultEvent(ds.getTrackingCategoryByPublicChatType(r.chatType),ds.EChatAction.ConversationStarted);r.analyticsTracking.sendEvent(a)}catch(s){if(console.warn(s),s instanceof Yo.InvalidMessageContentError)return;s instanceof et.Feedback.Cooldown?r.popup.show("CHAT.GLOBAL_CHAT.TOPIC_TIMEOUT",[r.timeLeftPipe.transform(s.cooldown,{timeConfig:r.timeLeftConfig})]):r.showErrorToUser(s)}finally{r.clearInputField(),r.cdr.detectChanges()}})()}deleteMessage(e){var i=this;const r=this.checkPermissionForAction(nt.EModuleAction.Edit);if(!r.isPermitted)return void this.permissionsService.showFailedRequirementsToUser(r);const s=this.store.selectPublicConversationById(e.conversationId);if(s.meta[ie.ESort.Desc].isLastPage&&s.oldestMessageId()===e.id)this.deleteConversation(s);else{const a={translationKey:"CHAT.GLOBAL_CHAT.MESSAGE_DELETE_CONFIRMATION"},c={action:(u=f(function*(){try{let h;yield i.chat.deleteMessage(e.id,e.conversationId),h=e.senderId===i.currentUser.profile.id?ds.EMessageDeletedLabel.ByUser:s.ownerId===i.currentUser.profile.id?ds.EMessageDeletedLabel.ByOwner:ds.EMessageDeletedLabel.ByModerator;const b=new aa.DefaultEvent(ds.getTrackingCategoryByPublicChatType(i.chatType),ds.EChatAction.MessageDeleted,{label:h});i.analyticsTracking.sendEvent(b)}catch(h){i.showErrorToUser(h)}}),function(){return u.apply(this,arguments)})};this.infoPopupId=this.popup.confirm({buttons:c,textParams:a})}var u}deleteConversation(e){var i=this;event&&event.stopPropagation();const r=this.checkPermissionForAction(nt.EModuleAction.Edit);var s;r.isPermitted?this.infoPopupId=this.popup.confirm({buttons:{action:(s=f(function*(){try{i.closeConversation(e),yield i.chat.deleteConversation(e.id)}catch(a){i.showErrorToUser(a)}}),function(){return s.apply(this,arguments)})},textParams:{translationKey:"CHAT.GLOBAL_CHAT.CONVERSATION_DELETE_CONFIRMATION"}}):this.permissionsService.showFailedRequirementsToUser(r)}resetFlags(){this.setViewFlag(vf.ShowMessageInput,!0),this.setViewFlag(vf.ShowMessagesLoader,!1),this.setViewFlag(vf.ContainerScrolledToBottom,!1)}setViewFlag(e,i){this.componentViewFlags[e]=i,this.cdr.detectChanges()}getViewFlag(e){return this.componentViewFlags[e]}checkPermissionForAction(e){return this.permissionsService.getActionPermission(qCe.GlobalChat,e)}selectInputField(){this.input&&(this.input.select(),this.cdr.detectChanges())}blurInputField(){this.input&&(this.input.blur(),this.cdr.detectChanges())}clearInputField(){this.input&&(this.input.clear(),this.cdr.detectChanges())}closeInputDrawer(){this.input&&(this.input.closeDrawer(),this.cdr.detectChanges())}scrollMessagesToBottom(e){this.currentSortOrder=ie.ESort.Desc;const i=this.scrollContainer&&this.scrollContainer.nativeElement?this.scrollContainer.nativeElement:void 0;i&&(this.scrollTo(i.scrollHeight-i.offsetHeight,e),this.setArrowDirection($c.EArrowDirection.Top),this.setViewFlag(vf.ContainerScrolledToBottom,!0),this.cdr.detectChanges())}scrollToElement(e,i){this.scrollTo(e.offsetTop,i)}scrollTo(e,i){const r=this.scrollContainer&&this.scrollContainer.nativeElement?this.scrollContainer.nativeElement:void 0;r&&(this.scrollHelper.scrollElement({element:r,targetScroll:e,animation:i,position:Na.EScrollPosition.ScrollTop}),this.cdr.detectChanges())}isConversationOpened(){return this.chatAnimationState===rp.MessagesVisible}setUpdateInterval(e){this.ngZone.runOutsideAngular(()=>{this.updateTimeInterval=setInterval(()=>{this.updateTimeTrigger*=-1,this.cdr.detectChanges()},e)})}setChatState(e){this.chatAnimationState=e,this.cdr.detectChanges()}trackByFn(e,i){return i.model.id}messagesTrackByFn(e,i){return i.model.clientId}incrementUnreadMsgsCount(){this.unreadMessagesCount+=1,this.cdr.detectChanges()}resetUnreadMsgsCount(){this.unreadMessagesCount=0,this.cdr.detectChanges()}scrollToOldest(){this.changeScrollDirection(ie.ESort.Asc)}scrollToMostRecent(){this.changeScrollDirection(ie.ESort.Desc),this.scrollToBottomAnimated(),this.cdr.detectChanges()}updateConversationsList(e){cancelAnimationFrame(this.updateConversationsRafId),this.updateConversationsRafId=requestAnimationFrame(()=>{const i={channelType:this.chatType};this.chatType===Ar.Club&&(i.clubProfile=this.store.clubs.selectClubProfile()),this.conversations=e.filter(r=>!r.isDraft).map(r=>new qM(r,i,this.currentUser.profile.id,this.chatUsageIntent,this.permissionsService)),this.cdr.detectChanges()})}isKicked(e){const i=this.currentUser.profile.id;return e&&void 0!==e.kicked.find(r=>r===i)}changeScrollDirection(e){this.messagesSubscriptions.list&&this.messagesSubscriptions.list.unsubscribe(),this.messagesSubscriptions.firstUpdate&&this.messagesSubscriptions.firstUpdate.unsubscribe(),this.currentSortOrder=e;const i=this.store.selectPublicOpenedConversationModel({channel:this.channel});this.chat.getMessages({page:0,pageCount:1,sort:e},i.id).catch(a=>console.warn(a));const s=this.store.subscribePublicMessagesByConversationId({conversationId:i.id,sort:e}).pipe(bt(a=>0!==a.length));this.messagesSubscriptions.list=s.subscribe(a=>{const c={channelType:this.chatType};this.chatType===Ar.Club&&(c.clubProfile=this.store.clubs.selectClubProfile()),this.messagesList=a.map((u,h,b)=>new kg(u,c,h,b,this.currentUser.profile.id,this.openedConversation,this.permissionsService)),this.cdr.detectChanges()}),this.messagesSubscriptions.firstUpdate=s.pipe(Qi(1)).subscribe(()=>{this.scrollInRaf(()=>{e===ie.ESort.Desc?this.scrollToBottomAnimated():this.scrollTo(0,this.scrollAnimation),this.cdr.detectChanges()})})}onArrowCmpClick(){this.arrowDirection===$c.EArrowDirection.Top?this.scrollToOldest():this.scrollToMostRecent(),this.cdr.detectChanges()}startShowMessagesTimeout(){this.stopShowMessagesTimeout(),this.showMessagesTimeout=setTimeout(()=>{this.setViewFlag(vf.ShowMessagesElements,!0),this.scrollInRaf(()=>{this.scrollMessagesToBottom(),this.selectInputField(),this.cdr.detectChanges()}),this.cdr.detectChanges()},500)}stopShowMessagesTimeout(){clearTimeout(this.showMessagesTimeout)}setArrowDirection(e){this.arrowDirection=e,this.cdr.detectChanges()}animateNewMessage(){this.arrow&&(this.arrow.animateNewMessage(),this.cdr.detectChanges())}scrollInRaf(e){cancelAnimationFrame(this.scrollRafId),this.scrollRafId=requestAnimationFrame(()=>{e(),this.cdr.detectChanges()})}showErrorToUser(e){if(e instanceof lt.NetworkError)this.toaster.error("ERRORS.CONNECTION_ERROR");else if(e instanceof et.General.NotFound||e instanceof lt.UnathorizedError)console.warn(e);else if(e instanceof lt.NotAllowed)this.toaster.warn("ERRORS.SOMETHING_WRONG");else if(e instanceof Yo.ForbiddenMessageTextError){const s=this.popup.basic({buttons:{buttonObject:{action:()=>{this.popup.hide(s)},buttonTextOptions:{translationKey:"CHAT.I_UNDERSTAND"}}},textParams:{translationKey:"CHAT.MESSAGE_CONTAINS_BAD_WORD"}})}else if(e instanceof lt.LevelRequiredError)this.toaster.error("CHAT.GLOBAL_CHAT.LEVEL_REQUIRED",[e.level]);else if(e instanceof lt.MembershipRequiredError||e instanceof Zj&&"vip"===e.requirement)this.infoPopupId=this.offerService.offerVip({key:"CHAT.GLOBAL_CHAT.VIP_REQUIRED"});else if(e instanceof Zj&&"role"===e.requirement)this.toaster.error("POPUP.DISABLED_FROM_CONFIG");else if(e instanceof Zj&&"level"===e.requirement){const i=this.checkPermissionForAction(Kj.Send);this.toaster.error("CHAT.GLOBAL_CHAT.LEVEL_REQUIRED",[i.minLevelRequirement.requiredLevel])}else if(e instanceof Yo.ChatMutedError)this.toaster.error("CHAT.GLOBAL_CHAT.MUTED");else if(e instanceof Yo.UserKickedError)this.toaster.error("CHAT.PLAYER_KICKED_NOTIFICATION");else if(e instanceof Yo.ConversationLockedError)this.toaster.error("PLACEHOLDERS.LOCKED_TOPIC");else if(e instanceof Yo.MaxSizeExceededError||e instanceof Yo.DataFormatNotAllowedError){const i=ZC.bytesFormat(this.config.social.chat[this.chatKey].images.maxImageSize);this.toaster.error("GALLERY.IMAGE_UPLOAD_ERROR",[i])}else e instanceof et.Chat.ClubPermissionFail?this.toaster.error("CLUBS.CLUB_ROLE_ACTION_OUTDATED"):(console.warn(e),this.toaster.error("ERRORS.SOMETHING_WRONG"))}isTypeAllowed(e){return this.checkPermissionForAction(Wd.getMessageAction(e)).isPermitted}addListenerOutsideAngular(e,i,r){let s;return this.ngZone.runOutsideAngular(()=>{s=this.renderer.listen(e,i,r)}),s}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Dt),g(an),g(Pi),g(J),g(l0),g(yr),g(cr),g(Dr),g(Re),g(ji),g(yi),g(Ps),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["public-chat"]],viewQuery:function(e,i){if(1&e&&($e(NOt,7),$e(FOt,7),$e(UOt,5),$e(GOt,5),$e(WCe,5),$e(WCe,5,$t),$e(VOt,5,$c),$e(zOt,5,zM),$e(jOt,5,HM)),2&e){let r;je(r=He())&&(i.wrapper=r.first),je(r=He())&&(i.animatedElement=r.first),je(r=He())&&(i.scrollContainer=r.first),je(r=He())&&(i.conversationsList=r.first),je(r=He())&&(i.input=r.first),je(r=He())&&(i.inputRef=r.first),je(r=He())&&(i.arrow=r.first),je(r=He())&&(i.viewChildren=r),je(r=He())&&(i.messagesViewChildren=r)}},inputs:{channel:"channel",chatType:"chatType"},features:[mn([{provide:nn,useFactory:o=>new nn("globalChat",o),deps:[[new jo,new zo,nn]]},yi]),it],decls:19,vars:18,consts:[[1,"global-feed__wrapper"],["wrapper",""],[1,"gf__container--wrapper",3,"ngClass"],["animatedElement",""],["data-cy","conversationContainer",1,"gf__container--conversations"],["class","gf__maintenance-wrapper",4,"ngIf"],["class","gf__spinner",4,"ngIf"],[1,"gf__wrapper--convs",3,"ngClass"],["conversationsList",""],["class","chat-share-content-preview",3,"content",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"textArray",4,"ngIf"],[1,"gf__container--footer"],["class","gf__footer--new-topic","data-cy","newConversationButton",3,"chatType","chatPermissionModule","chatUsageIntent","showNewStickyTopic","createConversation","createStickyConversation",4,"ngIf"],[1,"gf__container--chat"],["class","gf__container--messages",3,"ngClass",4,"ngIf"],["class","gf__container--messages","scroll-directive","","data-cy","messageContainer",3,"ngClass","onScrollUp","onScrolledToTop","onScrolledToBottom",4,"ngIf"],["class","gf__message-arrow",3,"ngClass","direction","unreadMessagesCount","onClick",4,"ngIf"],["class","gf__message-input","data-cy","chatInputField",3,"ngClass","chat","muted","locked","isInMaintenance","isKicked","send","openDrawer",4,"ngIf"],[1,"gf__maintenance-wrapper"],[1,"gf__maintenance-text"],[1,"gf__spinner"],[1,"chat-share-content-preview",3,"content"],["data-cy","chatConversation",3,"id","chatUsageIntent","conversation","timeText","elId","action"],["conversationsViewChildren",""],[3,"textArray"],["data-cy","newConversationButton",1,"gf__footer--new-topic",3,"chatType","chatPermissionModule","chatUsageIntent","showNewStickyTopic","createConversation","createStickyConversation"],[1,"gf__container--messages",3,"ngClass"],["class","gf__spinner chat",4,"ngIf"],[1,"gf__spinner","chat"],["scroll-directive","","data-cy","messageContainer",1,"gf__container--messages",3,"ngClass","onScrollUp","onScrolledToTop","onScrolledToBottom"],["scrollSection",""],["data-cy","chatMessage",3,"id","actionsState","message","elId","action",4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","chatMessage",3,"id","actionsState","message","elId","action"],["messagesViewChildren",""],[1,"gf__message-arrow",3,"ngClass","direction","unreadMessagesCount","onClick"],["arrow",""],["data-cy","chatInputField",1,"gf__message-input",3,"ngClass","chat","muted","locked","isInMaintenance","isKicked","send","openDrawer"],["messageInput",""]],template:function(e,i){1&e&&(p(0,"section",0,1)(2,"div",2,3)(4,"div",4),U(5,HOt,4,3,"div",5)(6,qOt,1,0,"spinner-loader",6),p(7,"div",7,8),U(9,WOt,1,1,"chat-share-content-preview",9)(10,$Ot,4,9,"ng-container",10)(11,QOt,1,5,"empty-content",11),m(),p(12,"div",12),U(13,YOt,1,4,"new-topic-container",13),m()(),p(14,"div",14),U(15,eEt,2,4,"div",15)(16,rEt,4,16,"div",16)(17,aEt,2,5,"new-message-arrow",17)(18,lEt,2,8,"message-input",18),m()()()),2&e&&(d(2),l("ngClass",cn(13,uEt,i.chatAnimationState===i.chatStateEnums.MessagesVisible,i.chatAnimationState===i.chatStateEnums.ConversationsVisible)),d(3),l("ngIf",(null==i.chatState?null:i.chatState.isInMaintenance)&&!(i.conversations&&!i.conversations.length&&!i.chatState.loadingState.isLoading)),d(),l("ngIf",null==i.chatState?null:i.chatState.loadingState.isLoading),d(),l("ngClass",ne(16,dEt,(null==i.chatState?null:i.chatState.isInMaintenance)&&!(i.conversations&&!i.conversations.length&&!i.chatState.loadingState.isLoading))),d(2),l("ngIf",i.chatUsageIntent&&i.chatUsageIntent.type!==i.EPublicChatUsageIntent.General),d(),l("ngForOf",i.conversations)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.conversations&&!i.conversations.length&&((null==i.chatState?null:i.chatState.loadingState.isLoaded)||(null==i.chatState?null:i.chatState.loadingState.error))&&!(null!=i.chatState&&i.chatState.loadingState.isLoading)),d(2),l("ngIf",i.chatUsageIntent),d(2),l("ngIf",!(i.getViewFlag(i.flagEnums.ShowMessagesElements)&&i.messagesList&&i.messagesList.length)),d(),l("ngIf",i.messagesList&&i.messagesList.length&&i.getViewFlag(i.flagEnums.ShowMessagesElements)),d(),l("ngIf",i.messagesList&&i.messagesList.length&&i.getViewFlag(i.flagEnums.ShowMessagesElements)),d(),l("ngIf",i.openedConversation&&i.chatAnimationState===i.chatStateEnums.MessagesVisible))},dependencies:[Xe,Mt,Ne,Is,bo,vc,HM,jCe,VM,zM,zj,$c,qe,Bm],styles:[".global-feed__wrapper[_ngcontent-%COMP%]{position:relative;top:0;left:0;text-rendering:optimizeSpeed;width:100%;overflow:hidden;height:100%}.chat-share-content-preview[_ngcontent-%COMP%]{height:auto;min-height:15rem;width:100%}.gf__container--wrapper[_ngcontent-%COMP%]{top:0;right:0;display:flex;flex-flow:row;flex-wrap:nowrap;flex-direction:row;position:absolute;width:200%;overflow:hidden;height:100%;transform:translate3d(50%,0,0)}.gf__container--chat[_ngcontent-%COMP%]{position:relative;bottom:0;right:0;width:50%;flex:1;height:100%;overflow:hidden;z-index:1}.gf__container--messages[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;width:100%;height:calc(100% - 9rem);overflow-y:auto;overflow-x:hidden;margin:0}@media screen and (max-width: 768px){.gf__container--messages[_ngcontent-%COMP%]{height:calc(100% - 6rem)}}.gf__new-message--arrow-drawer-open[_ngcontent-%COMP%]{transition:transform .2s ease-in-out;transform:translate3d(0,-19rem,0)}@media screen and (max-width: 768px){.gf__new-message--arrow-drawer-open[_ngcontent-%COMP%]{transform:translate3d(0,-16rem,0)}}.visible[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s linear}.hidden[_ngcontent-%COMP%]{display:none;transform:scale(1)}.gf__container--conversations[_ngcontent-%COMP%]{bottom:0;flex:1;width:50%;position:relative;overflow:hidden;height:100%;margin:0;transform:translateZ(0)}.gf__wrapper--convs[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;overflow-y:auto;overflow-x:hidden;height:calc(100% - 6rem);transform:translateZ(0)}@media only screen and (max-width: 768px){.gf__wrapper--convs[_ngcontent-%COMP%]{height:calc(100% - 5rem)}}.gf__wrapper--convs.in-maintenance[_ngcontent-%COMP%]{height:calc(100% - 11rem)}@media only screen and (max-width: 768px){.gf__wrapper--convs.in-maintenance[_ngcontent-%COMP%]{height:calc(100% - 10rem)}}.gf__element-invisible[_ngcontent-%COMP%]{opacity:0}.open-conversations[_ngcontent-%COMP%]{transition:transform .3s ease;transform:translate3d(50%,0,0)}.open-messages[_ngcontent-%COMP%]{transition:transform .3s ease;transform:translateZ(0)}.open-messages-instant[_ngcontent-%COMP%]{transform:translateZ(0)}.gf__message-arrow[_ngcontent-%COMP%]{position:absolute;bottom:12rem;right:0}.gf__spinner[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0);z-index:2}.gf__spinner.chat[_ngcontent-%COMP%]{left:50%}.message-input-drawer-open[_ngcontent-%COMP%]{transition:transform .2s ease-in-out;transform:translate3d(0,-19rem,0)}@media screen and (max-width: 768px){.message-input-drawer-open[_ngcontent-%COMP%]{transform:translate3d(0,-16rem,0)}}.gf__message-input[_ngcontent-%COMP%]{height:9rem}@media screen and (max-width: 768px){.gf__message-input[_ngcontent-%COMP%]{height:6rem}}.gf__message-input.gf__message-input--arrow-drawer-open[_ngcontent-%COMP%]{height:28rem}@media screen and (max-width: 768px){.gf__message-input.gf__message-input--arrow-drawer-open[_ngcontent-%COMP%]{height:22rem}}.gf__container--messages-drawer-opened[_ngcontent-%COMP%]{transition:transform .2s ease-in-out;transform:translate3d(0,-19rem,0)}@media screen and (max-width: 768px){.gf__container--messages-drawer-opened[_ngcontent-%COMP%]{transform:translate3d(0,-16rem,0)}}.gf__maintenance-wrapper[_ngcontent-%COMP%]{display:flex;width:100%;height:5rem}.gf__maintenance-text[_ngcontent-%COMP%]{width:100%;margin:auto;padding:0 3rem;text-align:center;font-weight:600;font-size:1.8rem}.gf__container--footer[_ngcontent-%COMP%]{width:100%;height:6rem;padding:0 1%;transform:translateZ(0)}@media screen and (max-width: 768px){.gf__container--footer[_ngcontent-%COMP%]{height:5rem}}"],changeDetection:0}),n})();const pEt=["cmp"],hEt=()=>({textKey:"CLUBS.CLUB_CHAT_NO_CLUB"}),mEt=t=>[t],fEt=t=>({name:t});function gEt(t,n){if(1&t){const o=Ce();p(0,"empty-content",2)(1,"button-icon-text",3),Y("onClick",function(){return oe(o),re(_().browseClubsList())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_();l("textArray",ne(7,mEt,pt(6,hEt))),d(),l("icon",ne(9,fEt,o.EIcons.BROWSE_CLUBS))("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION),d(),se($(3,4,"CLUBS.BROWSE_CLUBS"))}}function _Et(t,n){if(1&t&&B(0,"public-chat",4,5),2&t){const o=_();l("channel",o.clubChannel)("chatType",o.chatType)}}let KCe=(()=>{var t;class n{constructor(e,i){this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.chatType=Ar.Club,this.clubsService=e,this.cdr=i,i.detach()}ngOnChanges(e){this.cdr.detectChanges()}browseClubsList(){this.clubsService.openClubsList()}closeCurrentConversation(){this.cmp&&this.cmp.closeCurrentConversation()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Au),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-chat"]],viewQuery:function(e,i){if(1&e&&$e(pEt,5),2&e){let r;je(r=He())&&(i.cmp=r.first)}},inputs:{clubChannel:"clubChannel"},features:[mn([{provide:nn,useFactory:o=>new nn("clubChat",o),deps:[[new jo,new zo,nn]]}]),it],decls:2,vars:2,consts:[["class","club--chat__empty-content",3,"textArray",4,"ngIf"],[3,"channel","chatType",4,"ngIf"],[1,"club--chat__empty-content",3,"textArray"],[1,"club--profile--info__invite--btn-chat",3,"icon","buttonModifier","onClick"],[3,"channel","chatType"],["cmp",""]],template:function(e,i){1&e&&U(0,gEt,4,11,"empty-content",0)(1,_Et,2,2,"public-chat",1),2&e&&(l("ngIf",!i.clubChannel),d(),l("ngIf",i.clubChannel))},dependencies:[Ne,bo,so,Qj,qe],encapsulation:2,changeDetection:0}),n})();var $0;const vEt=["privateChat"],bEt=["publicChatCmp"],CEt=["clubChatCmp"];function yEt(t,n){if(1&t&&(p(0,"p",20),H(1),V(2,"translate"),m()),2&t){const o=_(4);d(),se($(2,1,o.getSelectedChannel().abbreviation))}}function SEt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(4);d(),se($(2,1,o.getSelectedChannel().text))}}function wEt(t,n){if(1&t&&(Tn(0),B(1,"icon-component",17),U(2,yEt,3,3,"p",18)(3,SEt,3,3,"p",19),Pn()),2&t){const o=_(3);d(),l("icon",o.iconNames.LANG),d(),l("ngIf",o.getSelectedChannel().abbreviation),d(),l("ngIf",!o.getSelectedChannel().abbreviation)}}const TEt=t=>({"chat__custom-select__option-text-selected ":t});function PEt(t,n){if(1&t&&(p(0,"p",26),H(1),V(2,"translate"),m()),2&t){const o=_().$implicit,e=_(4);l("ngClass",ne(4,TEt,e.getSelectedChannel()&&e.getSelectedChannel()===o)),d(),se($(2,2,o.abbreviation))}}const IEt=t=>({"chat__custom-select__option-text-selected":t});function MEt(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",22),Y("select",function(i){return oe(o),re(_(4).selectChatChannel(i))}),p(1,"div",23),U(2,PEt,3,6,"p",24),p(3,"p",25),H(4),V(5,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(4);l("value",o),d(2),l("ngIf",o.abbreviation),d(),l("ngClass",ne(6,IEt,e.getSelectedChannel()&&e.getSelectedChannel()===o)),d(),se($(5,4,o.text))}}function OEt(t,n){if(1&t&&U(0,MEt,6,8,"custom-select-item",21),2&t){const o=_(3);l("ngForOf",o.state.publicChatSelectState.options)("ngForTrackBy",o.trackOptionByFn)}}const EEt=()=>({isWidthAuto:!0});function xEt(t,n){1&t&&(p(0,"custom-select",14),U(1,wEt,4,3,"ng-template",null,15,ft)(3,OEt,1,2,"ng-template",null,16,ft),m()),2&t&&l("config",pt(1,EEt))}const ZCe=t=>({name:t});function AEt(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",31),Y("select",function(i){return oe(o),re(_(4).onTabClick(i))}),p(1,"notification-button-icon",32),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit,e=_(4);l("separatorClass","chat__top-tabs__tab-separator")("tabId",o.id),d(),l("bclass","chat__top-tabs__bclass "+(e.state.tabsState.selectedId&&e.state.tabsState.selectedId===o.id?" chat__top-tabs__selected":""))("isNotificationShown",o.unread&&!!o.unread())("flatButton",!0)("buttonClass","chat__top-tabs__button")("notificationValue",o.unread&&o.unread())("icon",ne(17,ZCe,o.icon))("notificationClass",o.id+" top-tabs__list-item--navigation__notification")("iconClass",o.id+(o.chatType===e.tabEnums.Private&&o.hasUnreadAdminMessages()?"chat-button__admin-message":""))("text",o.text)("highlighted",o.highlighted)("disabled",o.isDisabled&&o.isDisabled()),Hn("data-cy","chatTab_"+o.id),d(),ze(" ",$(3,15,o.text.key)," ")}}function REt(t,n){if(1&t&&(p(0,"top-tabs",29),U(1,AEt,4,19,"top-tab-item",30),m()),2&t){const o=_(3);l("showBackButton",!1)("initialOpenedTab",o.state.tabsState.selectedId)("scrollStyleCustomClass","chat__top-tabs__scroll")("scrollBarCustomClass","chat__top-tabs__scrollbar")("scrollableContainerClass","chat__top-tabs__scrollable--container"),d(),l("ngForOf",o.tabs)("ngForTrackBy",o.trackById)}}function kEt(t,n){if(1&t&&(p(0,"div",27),U(1,REt,2,7,"top-tabs",28),m()),2&t){const o=_(2);d(),l("ngIf",o.isOpened)}}function LEt(t,n){if(1&t&&(B(0,"notification-sign",37),V(1,"numberLimit")),2&t){const o=_(3);l("iconClass",o.tabs[0].chatType===o.tabEnums.Private&&o.tabs[0].hasUnreadAdminMessages?"chat-button__admin-message":"")("notificationValue",yt(1,2,o.tabs[0].unread(),o.state.tabsState.unreadCountLimit))}}function DEt(t,n){if(1&t&&(p(0,"div",27)(1,"div",33)(2,"div",34)(3,"p",35),H(4),V(5,"translate"),m(),U(6,LEt,2,5,"notification-sign",36),m()()()),2&t){const o=_(2);d(4),ze(" ",$(5,2,o.tabs[0].text.key)," "),d(2),l("ngIf",o.tabs[0].unread()>0)}}const Yj=t=>({"chats-nav-bar__tab--hidden":t});function BEt(t,n){if(1&t&&B(0,"public-chat",39,40),2&t){const o=_().$implicit,e=_(2);l("channel",o.value)("ngClass",ne(2,Yj,e.state.tabsState.selectedId!==e.tabEnums.Public||e.state.publicChatSelectState.selectedId!==o.value))}}function NEt(t,n){if(1&t&&(Tn(0),U(1,BEt,2,4,"public-chat",38),Pn()),2&t){const o=n.$implicit,e=_(2);d(),l("ngIf",e.state.publicChatSelectState.selectedId===o.value)}}function FEt(t,n){if(1&t&&B(0,"club-chat",41,42),2&t){const o=_(2);l("clubChannel",o.getClubChannel())("ngClass",ne(2,Yj,o.state.tabsState.selectedId!==o.tabEnums.Club))}}function UEt(t,n){if(1&t&&B(0,"private-chat-tab",43,44),2&t){const o=_(2);l("ngClass",ne(1,Yj,o.state.tabsState.selectedId!==o.tabEnums.Private))}}const GEt=t=>({"hidden-wrapper":t}),VEt=t=>({"open-chat":t}),zEt=t=>({isCustomSelecVisible:t}),jEt=t=>({"chats-nav-bar__button--back__hidden":t});function HEt(t,n){if(1&t){const o=Ce();p(0,"section",1),Y("swipeAction",function(i){return oe(o),re(_().swipeHandler(i))}),p(1,"div",2)(2,"div",3)(3,"div",4)(4,"button-close",5),Y("onClick",function(){return oe(o),re(_().closeSideComponent())}),V(5,"translate"),m(),p(6,"div",6)(7,"div",7),U(8,xEt,5,2,"custom-select",8),p(9,"button-icon",9),Y("onClick",function(){return oe(o),re(_().onBackButtonClick())}),V(10,"translate"),m()(),U(11,kEt,2,1,"div",10)(12,DEt,7,4,"div",10),m()()(),U(13,NEt,2,1,"ng-container",11)(14,FEt,2,4,"club-chat",12)(15,UEt,2,3,"private-chat-tab",13),m()()}if(2&t){const o=_();let e,i;l("ngClass",ne(20,GEt,!o.state.isOpened)),d(),l("ngClass",ne(22,VEt,o.state.isOpened)),d(3),l("bclass","chats-nav-bar__container--button-close--bclass")("title",$(5,16,"CHAT.CLOSE")),d(3),l("ngClass",ne(24,zEt,o.state.publicChatSelectState.options.length>1)),d(),l("ngIf",!o.isConversationOpened()&&o.state.tabsState.selectedId&&o.state.tabsState.selectedId===o.tabEnums.Public&&o.state.publicChatSelectState.options.length>1),d(),l("bclass","chats-nav-bar__button--back--bclass")("ngClass",ne(26,jEt,!o.isConversationOpened()))("icon",ne(28,ZCe,o.iconNames.ARROW_BACK))("title",$(10,18,"CHAT.BACK")),d(2),l("ngIf",(null==o.tabs?null:o.tabs.length)>1),d(),l("ngIf",1===(null==o.tabs?null:o.tabs.length)),d(),l("ngForOf",o.state.publicChatSelectState.options)("ngForTrackBy",o.trackByPublicCmps),d(),l("ngIf",null==(e=o.getTabState(o.tabEnums.Club))?null:e.enabled()),d(),l("ngIf",null==(i=o.getTabState(o.tabEnums.Private))?null:i.enabled())}}let WM=(($0=class extends Dh{constructor(n,o,e,i,r,s,a){super(),this.brazeEngagementService=a,this.buttonModifier=ve.EButtonModifier,this.iconNames=ve.EIcons,this.isOpened=!1,this.destroy$=new sn,this.onEscKeyPress=()=>{this.isOnFocus&&(this.isConversationOpened()?this.closeConversation():this.closeSideComponent())},this.focusable=!1,this.navigation=n,this.service=o,this.soundService=e,this.deltaDNAService=i,this.tabEnums=Br,this.store=r,this.cdr=s}ngOnInit(){super.ngOnInit(),this.addSubscriptions()}ngOnDestroy(){super.ngOnDestroy(),this.destroy$.next(),this.destroy$.complete()}onOpen(){this.setFocusable(!0),this.soundService.play(dn.Slide),this.deltaDNAService.publicChatOpenedEngage(),this.brazeEngagementService.publicChatOpenedEngage()}onClose(){this.setFocusable(!1),this.soundService.play(dn.Slide)}trackById(n,o){return o.id}addSubscriptions(){const n=this.store.chatComponent.subscribeState();n.pipe(wn(this.destroy$)).subscribe(s=>this.state=s);const o=this.store.chatComponent.subscribeTabsList();o.pipe(wn(this.destroy$)).subscribe(s=>this.tabs=s);const e=this.store.chatComponent.subscribeIsOpened();e.pipe(wn(this.destroy$)).subscribe(s=>{this.isOpened=s,s?this.onOpen():this.onClose()});const i=this.navigation.events.pipe(bt(s=>s instanceof fh&&this.state.isOpened));i.pipe(wn(this.destroy$)).subscribe(()=>this.service.closeIfOverlapping());const r=this.store.subscribePrivateUnreadConversationsCount();Ju(n.pipe(tr(1)),o.pipe(tr(1)),e.pipe(tr(1)),i.pipe(tr(1)),r.pipe(tr(1))).pipe(wn(this.destroy$)).subscribe(()=>this.cdr.detectChanges()),this.cdr.detectChanges()}closeSideComponent(){this.service.close()}swipeHandler(n){const o=this.tabs.findIndex(e=>e.chatType===this.state.tabsState.selectedId);switch(n){case sa.Right:this.isConversationOpened()?this.closeConversation():o<=0?this.closeSideComponent():this.selectTab(this.tabs[o-1]);break;case sa.Left:this.selectTab(o>=this.tabs.length-1?this.tabs[o]:this.tabs[o+1])}}onTabClick(n){this.soundService.play(dn.ClickTab),this.selectTab(this.tabs.find(o=>o.id===n))}selectTab(n){!n.isDisabled()&&n.chatType!==this.store.chatComponent.selectTabsState().selectedId&&this.service.selectTab(n.chatType)}isConversationOpened(){if(!this.state.tabsState.selectedId)return!1;switch(this.state.tabsState.selectedId){case Br.Private:return!!this.store.selectPrivateOpenedConversation();case Br.Club:const n=this.store.selectClubChannel();return!!n&&!!this.store.selectPublicOpenedConversation({channel:n.id});case Br.Public:return!!this.store.selectPublicOpenedConversation({channel:this.state.publicChatSelectState.selectedId});default:return!1}}onBackButtonClick(){this.closeConversation()}onAppBackButton(){var n;null!==(n=this.state)&&void 0!==n&&n.isOpened&&this.closeSideComponent()}closeConversation(){switch(this.state.tabsState.selectedId){case Br.Public:this.publicChatComponent.closeCurrentConversation();break;case Br.Club:this.clubChatComponent&&this.clubChatComponent.closeCurrentConversation();break;case Br.Private:this.privateChatComponent.closeCurrentConversation()}}getTabState(n){return this.store.chatComponent.selectTabsEntities()[n]}getSelectedChannel(){return this.store.chatComponent.selectPublicChatSelectorSelectedOption()}getClubChannel(){var n;return null===(n=this.store.selectClubChannel())||void 0===n?void 0:n.id}trackByFn(n,o){return o.chatType}trackOptionByFn(n,o){return n}trackByPublicCmps(n,o){return o.id}selectChatChannel(n){n.value!==this.store.chatComponent.selectPublicChatSelectState().selectedId&&this.service.selectChannel(n.value)}}).\u0275fac=function(n){return new(n||$0)(g(Yt),g(El),g(Mo),g(sl),g(J),g(Re),g(cl))},$0.\u0275cmp=pe({type:$0,selectors:[["chat"]],viewQuery:function(n,o){if(1&n&&($e(vEt,5),$e(bEt,5),$e(CEt,5)),2&n){let e;je(e=He())&&(o.privateChatComponent=e.first),je(e=He())&&(o.publicChatComponent=e.first),je(e=He())&&(o.clubChatComponent=e.first)}},hostBindings:function(n,o){1&n&&Y("keydown.escape",function(i){return o.onEscKeyPress(i)},0,IN)},features:[Ht],decls:1,vars:1,consts:[["class","chats__component-wrapper","swipe-directive","",3,"ngClass","swipeAction",4,"ngIf"],["swipe-directive","",1,"chats__component-wrapper",3,"ngClass","swipeAction"],[1,"chats__component-container",3,"ngClass"],[1,"chats__navigation"],[1,"chats-nav-bar__container"],[1,"chats-nav-bar__container--button-close",3,"bclass","title","onClick"],[1,"chats-nav-bar__container--arrow-back"],[1,"chats-nav-bar__container--nav",3,"ngClass"],["class","chat-select",3,"config",4,"ngIf"],["data-cy","chatBackButton",1,"chats-nav-bar__button--back",3,"bclass","ngClass","icon","title","onClick"],["class","chats-nav-bar__tab--container",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","chat__chat-container",3,"clubChannel","ngClass",4,"ngIf"],["class","chat__chat-container",3,"ngClass",4,"ngIf"],[1,"chat-select",3,"config"],["selectedItem",""],["options",""],[1,"chat__custom-select__icon--lang",3,"icon"],["class","chat__custom-select--abbreviation",4,"ngIf"],[4,"ngIf"],[1,"chat__custom-select--abbreviation"],[3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value","select"],[1,"chat__custom-select__option"],["class","chat__custom-select--abbreviation",3,"ngClass",4,"ngIf"],[1,"chat__custom-select__text",3,"ngClass"],[1,"chat__custom-select--abbreviation",3,"ngClass"],[1,"chats-nav-bar__tab--container"],["class","chats-nav-bar__tab--container--tabs",3,"showBackButton","initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass","scrollableContainerClass",4,"ngIf"],[1,"chats-nav-bar__tab--container--tabs",3,"showBackButton","initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass","scrollableContainerClass"],["class","chat__top-tabs__tab",3,"separatorClass","tabId","select",4,"ngFor","ngForOf","ngForTrackBy"],[1,"chat__top-tabs__tab",3,"separatorClass","tabId","select"],[1,"top-tabs__list-item--navigation",3,"bclass","isNotificationShown","flatButton","buttonClass","notificationValue","icon","notificationClass","iconClass","text","highlighted","disabled"],[1,"chats-nav-bar__tab","no-top-border","chats-nav-bar__tab--single"],[1,"chats-nav-bar__tab--single--wrapper"],[1,"chats-nav-bar__tab--single--paragraph"],["class","chats-nav-bar__text-unread",3,"iconClass","notificationValue",4,"ngIf"],[1,"chats-nav-bar__text-unread",3,"iconClass","notificationValue"],["class","chat__chat-container",3,"channel","ngClass",4,"ngIf"],[1,"chat__chat-container",3,"channel","ngClass"],["publicChatCmp",""],[1,"chat__chat-container",3,"clubChannel","ngClass"],["clubChatCmp",""],[1,"chat__chat-container",3,"ngClass"],["privateChat",""]],template:function(n,o){1&n&&U(0,HEt,16,30,"section",0),2&n&&l("ngIf",o.state)},dependencies:[Xe,Mt,Ne,wu,kl,dl,Dn,Up,Vd,ei,Ud,fv,au,VCe,Qj,KCe,qe,L_],styles:[".chats__component-wrapper[_ngcontent-%COMP%]{text-rendering:optimizeSpeed;position:relative;width:100%;height:100%}.chats__component-container[_ngcontent-%COMP%]{position:absolute;height:100%;width:100%;transform:translate3d(100%,0,0)}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container[_ngcontent-%COMP%]{padding:0;box-shadow:none;display:flex;flex-direction:column}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__tab[_ngcontent-%COMP%]{padding:0;display:flex;min-height:5rem;justify-content:center}@media screen and (max-width: 768px){.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__tab[_ngcontent-%COMP%]{min-height:4rem}}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__tab--single[_ngcontent-%COMP%]{cursor:default;width:100%}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__tab--single--wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__tab--single--paragraph[_ngcontent-%COMP%]{font-size:2.4rem}@media screen and (max-width: 768px){.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__tab--single--paragraph[_ngcontent-%COMP%]{font-size:1.8rem}}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--arrow-back[_ngcontent-%COMP%]{display:flex;height:5rem;align-items:center}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--arrow-back[_ngcontent-%COMP%]   .chats-nav-bar__container--nav.isCustomSelecVisible[_ngcontent-%COMP%]   .chats-nav-bar__button--back[_ngcontent-%COMP%]{width:10rem}@media screen and (max-width: 440px){.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--arrow-back[_ngcontent-%COMP%]   .chats-nav-bar__container--nav.isCustomSelecVisible[_ngcontent-%COMP%]   .chats-nav-bar__button--back[_ngcontent-%COMP%]{width:6rem}}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--arrow-back[_ngcontent-%COMP%]   .chats-nav-bar__button--back[_ngcontent-%COMP%]{width:100%;height:100%;border:none;outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:0;margin:0}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--arrow-back[_ngcontent-%COMP%]   .chats-nav-bar__button--back.chats-nav-bar__button--back__hidden[_ngcontent-%COMP%]{visibility:hidden}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--arrow-back[_ngcontent-%COMP%]   .chats-nav-bar__button--back[_ngcontent-%COMP%]:hover{cursor:pointer}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--arrow-back[_ngcontent-%COMP%]   .chats-nav-bar__button--back[_ngcontent-%COMP%]:before{z-index:initial}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--icon[_ngcontent-%COMP%]{padding:.75rem 1rem}.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--button-close[_ngcontent-%COMP%]{width:5rem;height:3rem;display:flex;justify-content:center;align-items:center;margin:0 0 0 auto}@media screen and (max-width: 768px){.chats__navigation[_ngcontent-%COMP%]   .chats-nav-bar__container--button-close[_ngcontent-%COMP%]{height:4rem}}.chats-nav-bar__tab--container[_ngcontent-%COMP%]{display:flex;flex-grow:1;width:100%;height:-moz-fit-content;height:fit-content}.chats-nav-bar__tab--container--tabs[_ngcontent-%COMP%]{width:100%}.chat-select[_ngcontent-%COMP%]{width:90%;margin:auto;height:3rem}.no-top-border[_ngcontent-%COMP%]{border-top:none}.hidden-wrapper[_ngcontent-%COMP%], .chats-nav-bar__tab--hidden[_ngcontent-%COMP%]{display:none}.content-lighten-chat[_ngcontent-%COMP%]{background-color:transparent}.chats-nav-bar__text-unread[_ngcontent-%COMP%]{margin-left:.5rem;z-index:2}.open-chat[_ngcontent-%COMP%]{display:initial;animation:_ngcontent-%COMP%_open-chat-component .3s cubic-bezier(.5,.1,.1,1) forwards;transform-origin:center bottom}@keyframes _ngcontent-%COMP%_open-chat-component{0%{transform:translate3d(0,100%,0)}to{transform:translateZ(0)}}.chat__custom-select--abbreviation[_ngcontent-%COMP%]{margin-right:.5rem}.chat__custom-select__option-text-selected[_ngcontent-%COMP%]{text-decoration:underline}.chat__custom-select--abbreviation[_ngcontent-%COMP%], .chat__custom-select__icon--lang[_ngcontent-%COMP%]{margin-right:.5rem}.chat__custom-select__text[_ngcontent-%COMP%]{padding-right:1rem}.chat__chat-container[_ngcontent-%COMP%]{position:relative;height:100%}.chats__component-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}"]}),$0);Qe([function K8e(){return function(t,n,o){xp(t.constructor,i=>{const r=a=>{"appBackButton"===a.detail.eventName&&o.value.apply(i)},s=t.constructor.prototype.ngOnDestroy;t.constructor.prototype.ngOnDestroy=function(...a){window.removeEventListener("AuthEvent",r),s&&s.apply(this,a)},window.addEventListener("AuthEvent",r)})}}(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],WM.prototype,"onAppBackButton",null),WM=Qe([Wo(),ue("design:paramtypes",[Yt,El,Mo,sl,J,Re,cl])],WM);var qEt=ve.EIcons;const QCe=t=>({name:t});function WEt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",13),Y("onClick",function(){return oe(o),re(_().navigateToLeaderboards())}),V(1,"translate"),H(2),V(3,"translate"),m()}if(2&t){const o=_();l("bclass","bottom-bar__button-icon")("title",$(1,4,"SIDE_MENU.LEADERBOARDS"))("icon",ne(8,QCe,o.iconNames.LEADERBOARD)),d(2),ze(" ",$(3,6,"SIDE_MENU.LEADERBOARDS")," ")}}function $Et(t,n){1&t&&Un(0)}function KEt(t,n){1&t&&B(0,"clubs-button",14),2&t&&l("bclass","bottom-bar__button-icon")}function ZEt(t,n){1&t&&B(0,"div",15)}let YCe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.analyticsTrackingService=h,this.iconNames=qEt,this.overlayShown=!1,this.EPermissionModule=nt.EPermissionModule,this.showOverlay=b=>{this.overlayShown=b,this.cdr.detectChanges()},this.topBarService=i,this.router=e,this.cdr=r,this.constants=a,this.store=s,this.clubsService=c,r.detach(),this.permissionsService=u}ngOnInit(){this.notifDropdownSubscription=this.topBarService.notifDropdownToggle.pipe(bt(e=>e!==this.overlayShown)).subscribe(this.showOverlay),this.cdr.detectChanges()}ngOnDestroy(){this.gdprSubscription&&this.gdprSubscription.unsubscribe(),this.notifDropdownSubscription&&this.notifDropdownSubscription.unsubscribe()}navigateToHome(){this.router.navigate([this.constants.defaultLoggedRoute])}navigateToShop(){const e=this.store.selectUserState().profile.id,i=new aa.DefaultEvent(Nn.Navigation,"shop:{0}",{label:{value:"{0}:".concat(wt.Currency),args:{userId:e}},typeArgs:{userId:e}});this.analyticsTrackingService.sendEvent(i),this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/shop/").concat(wt.Currency)}}])}openClubsList(){this.clubsService.openCurrentClubPage(!0)}navigateToLeaderboards(){this.router.navigate(["/".concat(this.constants.defaultLoggedRoute,"/leaderboards")])}isEnabled(e){return this.permissionsService.getModulePermission(e).isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Lj),g(Re),g(J),g(tn),g(Au),g(Ti),g(yi))},t.\u0275cmp=pe({type:t,selectors:[["bottom-bar-component"]],features:[mn([{provide:nn,useFactory:o=>new nn("bottomBar",o),deps:[[new jo,new zo,nn]]}])],decls:18,vars:16,consts:[[1,"bottom-bar__wrapper"],[1,"bottom-bar__container"],[1,"bottom-bar__light"],[1,"bottom-bar__container--button"],["leaderboards",""],["activeCmp","","id","bonusBtn","data-cy","bottomBarBonuses",1,"bottom-bar__container--button",3,"bclass"],["data-cy","bottomBarHome",1,"bottom-bar__container--button",3,"bclass","title","icon","onClick"],[4,"ngIf","ngIfThen","ngIfElse"],["clubs",""],["activeCmp","","id","chatBtn","data-cy","bottomBarChat",1,"bottom-bar__container--button",3,"bclass"],["class","bottom-bar__link-overlay",4,"ngIf"],[1,"bottom-bar__home-button-under--wrapper"],[1,"bottom-bar__home-button-under"],[1,"bottom-bar__container--button",3,"bclass","title","icon","onClick"],["data-cy","bottomBarClubs",1,"bottom-bar__container--button",3,"bclass"],[1,"bottom-bar__link-overlay"]],template:function(e,i){if(1&e&&(p(0,"section",0)(1,"div",1),B(2,"div",2)(3,"shop-button",3),U(4,WEt,4,10,"ng-template",null,4,ft),B(6,"bonus",5),p(7,"button-icon-text",6),Y("onClick",function(){return i.navigateToHome()}),V(8,"translate"),H(9),V(10,"translate"),m(),U(11,$Et,1,0,"ng-container",7)(12,KEt,1,1,"ng-template",null,8,ft),B(14,"chat-button",9),m(),U(15,ZEt,1,0,"div",10),p(16,"div",11),B(17,"div",12),m()()),2&e){const r=Kt(5),s=Kt(13);d(6),l("bclass","bottom-bar__button-icon"),d(),l("bclass","bottom-bar__button-icon bottom-bar__home_button")("title",$(8,10,"SIDE_MENU.HOME"))("icon",ne(14,QCe,i.iconNames.HOME_ICON_BOTTOM_BAR)),d(2),ze(" ",$(10,12,"SIDE_MENU.HOME")," "),d(2),l("ngIf",i.isEnabled(i.EPermissionModule.Clubs))("ngIfThen",s)("ngIfElse",r),d(3),l("bclass","bottom-bar__button-icon"),d(),l("ngIf",i.overlayShown)}},dependencies:[Ne,so,_z,Tz,zz,Nm,ij,qe],styles:[".bottom-bar__wrapper[_ngcontent-%COMP%]{width:100%;z-index:100}.bottom-bar__container[_ngcontent-%COMP%]{display:flex;flex-flow:nowrap;justify-content:space-between;align-items:center;width:100%;height:5rem;margin:0 auto}@media only screen and (max-width: 768px){.bottom-bar__container[_ngcontent-%COMP%]{height:3.5rem}}.bottom-bar__container--button[_ngcontent-%COMP%]{width:10rem;margin:0;min-width:4rem}.bottom-bar__container--button.store__button[_ngcontent-%COMP%]{width:4rem;margin:0 3rem}.bottom-bar__link-overlay[_ngcontent-%COMP%]{width:100%;height:100%;z-index:7}.bottom-bar__home-button-under--wrapper[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})();const QEt=["wrapper"];let JCe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.walletAnimationsService=e,this.pixiAppFactory=i,this.renderer=r,this.ruler=s,this.ngZone=a,this.cdr=c,this.urlService=u,this.currencyItemsService=h,this.pixiLoader=b,this.currentAnimationsCount=0}ngOnInit(){this.walletAnimationsService.setChipsAnimCanvasCmpRef(this),this.cdr.detach(),this.subscription=this.ruler.getAppSize().subscribe(e=>{const i=e;this.appDimensions=i,this.windowScale=i.width>=1280?i.height/i.width+1:i.width>767?i.height/i.width+.5:i.height/i.width-.7,this.pixiAppRef?this.pixiAppRef.app.renderer.resize(i.width,i.height):(this.pixiAppRef=this.pixiAppFactory.getApp({height:i.height,width:i.width,sharedTicker:!0,transparent:!0}),this.renderer.addClass(this.pixiAppRef.canvas,"chips-anim__canvas"),this.renderer.appendChild(this.wrapper.nativeElement,this.pixiAppRef.canvas),this.pixiAppRef.app.ticker.autoStart=!1,this.pixiAppRef.app.ticker.stop())})}ngOnDestroy(){this.pixiAppRef&&(this.pixiAppRef.app.stage.removeChildren(),this.renderer.removeChild(this.wrapper.nativeElement,this.pixiAppRef.canvas),this.pixiAppRef.destroy()),cancelAnimationFrame(this.rafId),this.subscription&&this.subscription.unsubscribe(),this.walletAnimationsService.setChipsAnimCanvasCmpRef(void 0)}playAnimation(e,i){var r=this;return new Promise(s=>{this.ngZone.runOutsideAngular(()=>{this.pixiAppRef.app.ticker.start(),this.rafId=requestAnimationFrame(f(function*(){r.currentAnimationsCount++,yield r.createExplosion(i,e),--r.currentAnimationsCount<=0&&(r.pixiAppRef.app.ticker.stop(),[...r.pixiAppRef.app.stage.children].forEach(c=>c.destroy()),r.pixiAppRef.app.stage.removeChildren()),s()}))})})}createAnimatedSprite(e,i){let r=PixiClient.BaseTexture.from(this.urlService.getImageUrl(e),PixiClient.SCALE_MODES.LINEAR);r.mipmap=!0;let s=[];for(let c=0;c<10;c++)for(let u=0;u<6;u++){let h=new PixiClient.Texture(r,new PixiClient.Rectangle(50*u,50*c,50,50));s.push(h)}let a=new PixiClient.extras.AnimatedSprite(s,!0);return a.interactiveChildren=!1,a.filters=null,a.loop=!0,a.scale.set(this.windowScale*(0,ie.randomFloat)(.2,.7)),a.anchor.set(.5),a.animationSpeed=2,a.position.set(i.fromCoords.x,i.fromCoords.y),a.play(),a.visible=!1,a.rotation=(Math.floor(360*Math.random())-360)*Math.PI/180,a}createExplosion(e,i){var r=this;return new Promise(function(){var s=f(function*(a){let u,c=[];for(let G=0;G<20;G++)u=r.createAnimatedSprite(i===ln.Chips?"chips-animation/spriteSheetCoin.png":"chips-animation/spriteSheetDiamond.png",e),c.push(u);r.pixiAppRef.app.stage.addChild(...c);let h=0;const w=(G=1)=>{h+=G,100===h&&requestAnimationFrame(()=>a())};r.currencyItemsService.setIsShownOverAll(!0,3e3),c.forEach((G,K)=>{Zr.set(G,{visible:!0,delay:0}),Zr.to(G.position,{x:G.position.x+Math.floor(Math.random()*r.pixiAppRef.canvas.height/4)-r.pixiAppRef.canvas.height/8,y:G.position.y+Math.floor(Math.random()*r.pixiAppRef.canvas.height/4)-r.pixiAppRef.canvas.height/8,duration:.8,ease:"expo.out",delay:.3,onComplete:()=>{w(2);let te=.5*Math.random()+.1;K===c.length-1?te=.65:0===K&&(te=.09),Zr.to(G.scale,{x:.3*r.windowScale,y:.3*r.windowScale,duration:.3,ease:"expo.in",delay:te+.7,onComplete:()=>w()}),Zr.to(G.position,{x:e.walletCoords.x,y:e.walletCoords.y,duration:1,ease:"expo.in",delay:te,onComplete:()=>{G.visible=!1,w();const ee=document.getElementById("chipsWallet");if(!ee)return void w(3);let le;i===ln.Chips?le=ee.firstElementChild.lastElementChild.firstElementChild.firstElementChild.firstElementChild:i===ln.Gems&&(le=ee.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild),Zr.to(le,{scale:r.appDimensions.width<568?1.1:1.3,duration:.05,onComplete:()=>{Zr.to(le,{scale:1,duration:.1,onComplete:()=>w()})}})}})}})})});return function(a){return s.apply(this,arguments)}}())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Fc),g(Bw),g(ji),g(Ua),g(an),g(Re),g(Qm),g($k),g(j_))},t.\u0275cmp=pe({type:t,selectors:[["currency-anim-canvas"]],viewQuery:function(e,i){if(1&e&&$e(QEt,7),2&e){let r;je(r=He())&&(i.wrapper=r.first)}},decls:2,vars:0,consts:[[1,"wrapper"],["wrapper",""]],template:function(e,i){1&e&&B(0,"div",0,1)},styles:["[_nghost-%COMP%]{position:fixed;width:100vw;height:100vh;pointer-events:none;z-index:10000000;top:0;left:0}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{width:100vw;height:100vh}"]}),n})();const YEt=["chat"],JEt=["lobby"],XEt=t=>({wide:t});let XCe=(()=>{var t;class n{constructor(e,i,r,s,a){this.rulerService=e,this.store=i,this.navigation=r,this.tutorials=s,this.hiddenShopService=a,this.wideLobby=!1,this.subscriptions=new ie.List,this.chatMargin=10,this.updateChatPosition=()=>{if(!this.appDimensions||!this.store.chatComponent.selectIsOpened())return;const c=this.lobby.nativeElement.getBoundingClientRect(),u=this.chat.nativeElement,h=u.getBoundingClientRect();(this.appDimensions.width-c.width)/2<h.width+this.chatMargin?(u.style.right="".concat(this.chatMargin,"px"),u.style.transform="initial"):(u.style.right="initial",u.style.transform="translateX(".concat(c.right+this.chatMargin,"px)"))},this.addActivationEnd()}ngOnInit(){this.subscriptions.add(this.rulerService.getAppSize().subscribe(e=>{this.appDimensions=e,this.updateChatPosition()})),this.subscriptions.add(this.store.chatComponent.subscribeIsOpened().subscribe(e=>{this.chat.nativeElement.style.display=e?"block":"none",this.updateChatPosition()})),this.tutorials.requestTutorial({cmp:this,group:Ms.Onboarding}),this.hiddenShopService.init()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.hiddenShopService.closeShop(),this.hiddenShopService.dispose(),this.subscriptions=new ie.List}onComponentActivate(e){this.wideLobby=e.data&&e.data.wideLobby}addActivationEnd(){this.subscriptions.add(this.navigation.events.pipe(bt(e=>e instanceof Yx)).subscribe(e=>{0===e.snapshot.children.length&&this.onComponentActivate(e.snapshot)}))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ua),g(J),g(Yt),g(sv),g(ef))},t.\u0275cmp=pe({type:t,selectors:[["home-lobby"]],viewQuery:function(e,i){if(1&e&&($e(YEt,7,$t),$e(JEt,7,$t)),2&e){let r;je(r=He())&&(i.chat=r.first),je(r=He())&&(i.lobby=r.first)}},decls:13,vars:3,consts:[[1,"home-lobby__chat"],["chat",""],[1,"home-lobby__container--outer",3,"ngClass"],[1,"home-lobby__container--inner"],["lobby",""],["activeCmp","","id","freeRewardsPopup"]],template:function(e,i){1&e&&(B(0,"top-bar-component")(1,"chat",0,1),p(3,"div",2)(4,"div",3,4),B(6,"router-outlet"),m()(),B(7,"settings-popup")(8,"bottom-bar-component")(9,"free-rewards-popup",5)(10,"account-migration-popup")(11,"dev-settings-popup")(12,"currency-anim-canvas")),2&e&&(d(3),l("ngClass",ne(1,XEt,i.wideLobby)))},dependencies:[Xe,Dj,WM,Ip,wCe,yCe,c5,Nm,Kp,YCe,JCe],styles:[".home-lobby__chat[_ngcontent-%COMP%]{position:absolute;min-width:40rem;max-width:50rem}"]}),n})();const ext=[No,Ls,kb,Lb,xi,Yi,Io];let txt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[ext,xi]}),n})();Wu(RL,[Xe,Mt,Ne,bo,Oi,vM,wu],[]);let eye=(()=>{var t;class n{constructor(e,i,r,s,a,c){var u=this;this.onStatsUpdate=h=>{this.statsUpdate.next(h)},this.onStateTransition=h=>{this.handleStateChange(h),this.stateTransition.next(h)},this.showRetryDialog=()=>{const h=function(){var w=f(function*(){try{u.loader.on(),yield u.gamesClientService.currentPlayClient.findRoom(u.findRoomArgs)}catch(R){u.toaster.warn(R instanceof et.StateError?"PLEASE_WAIT":R instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG"),console.error(R)}finally{u.loader.off()}});return function(){return w.apply(this,arguments)}}();this.retryPopupId=this.popup.confirm({buttons:{action:h,actionDecline:()=>{this.navigation.getOutletUrl()==="/".concat(Xs.gameRoute)&&this.navigation.navigateTo(this.roomPages.createGameLobbyPage(this.findRoomArgs.pool.roomSettings.game.name)),this.disposeSearch()}},textParams:{translationKey:"MATCHMAKING.SEARCH_TIMEOUT"}})},this.navigation=a,this.popup=i,this.gamesClientService=e,this.toaster=r,this.loader=s,this.listeners=new ie.List,this.stateTransition=new sn,this.statsUpdate=new sn,this.roomPages=c}attachListeners(){this.addListener(this.gamesClientService.stateEvents.onStateTransition(this.onStateTransition)),this.addListener(this.gamesClientService.stateEvents.onStateTimeout(this.showRetryDialog))}attachStatsUpdateListener(){this.statsListener=this.gamesClientService.onStatsUpdate(this.onStatsUpdate)}detachStatsUpdateListener(){this.statsListener&&this.statsListener.detach()}detachListeners(){this.listeners.forEach(e=>e.detach())}disposeSearch(){this.findRoomArgs=void 0,this.closeRetryPopup()}handleStateChange(e){switch(e.to){case yn.Idle:e.from!==yn.Searching&&this.disposeSearch();break;case yn.Searching:e.data&&e.data.roomSearchModel&&(this.findRoomArgs=e.data.roomSearchModel);break;case yn.Desync:e.from===yn.Searching&&this.toaster.error("ERRORS.CONNECTION_ERROR")}}cancelSearch(e){var i=this;return f(function*(){yield i.gamesClientService.currentPlayClient.cancelSearch(e),i.disposeSearch()})()}closeRetryPopup(){this.popup.hide(this.retryPopupId)}addListener(e){this.listeners.add(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(oo),T(Cn),T(Dt),T(ro),T(Yt),T(Xf))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const m2=ki({selectId:t=>t.chatType,sortComparer:!1}),tye={type:zc.General,data:void 0},K0={isOpened:!1,intent:tye,publicChatSelectState:{selectedId:void 0,options:[]},tabsState:{tabs:m2.getInitialState(),interactableTabsSubset:void 0,selectedId:void 0,unreadCountLimit:99}},nxt=Sr(K0,de(eme,t=>K0),de(tme,(t,n)=>{var o,e;return{isOpened:null!==(o=n.isOpened)&&void 0!==o?o:K0.isOpened,intent:null!==(e=n.intent)&&void 0!==e?e:K0.intent,publicChatSelectState:{options:n.publicChannels,selectedId:n.selectedPublicChannel},tabsState:{selectedId:K0.tabsState.selectedId,tabs:m2.setAll(n.tabs,t.tabsState.tabs),interactableTabsSubset:void 0,unreadCountLimit:K0.tabsState.unreadCountLimit}}}),de(B6,(t,n)=>Se(t,o=>{o.isOpened=n.opened})),de(nme,(t,n)=>Se(t,o=>{o.tabsState.selectedId=n.tab})),de(ime,(t,n)=>Se(t,o=>{o.publicChatSelectState.selectedId=n.channel})),de(ome,(t,n)=>Se(t,o=>{o.intent=n.intent})),de(rme,t=>Se(t,n=>{n.intent=tye})),de(Zit,(t,n)=>Se(t,o=>{o.publicChatSelectState.options=n.channels})),de(Kit,(t,n)=>Se(t,o=>{o.tabsState.tabs=m2.setAll(n.tabs,o.tabsState.tabs)})),de(sme,(t,n)=>Se(t,o=>{o.tabsState.interactableTabsSubset=n.tabs}))),QC=Ts(N6.featureKey),f2=We(QC,t=>t.isOpened),nye=We(QC,t=>t.intent),g2=We(QC,t=>t.publicChatSelectState),oxt=We(g2,t=>t.options.find(n=>n.value===t.selectedId)),$M=We(QC,t=>t.tabsState),rxt=We(QC,t=>t.tabsState.tabs),Jj=m2.getSelectors(rxt),iye=We(Jj.selectEntities,t=>t),oye=We(Jj.selectAll,t=>t),rye=()=>We($M,g2,f2,(t,n,o,e)=>{if(!e)return!1;switch(e.type){case Ar.LanguageBased:return o&&n.selectedId===e.id&&t.selectedId===Br.Public;case Ar.Club:return o&&t.selectedId===Br.Club;default:return!1}}),sye=We($M,f2,(t,n)=>n&&t.selectedId===Br.Private),sxt=We(Jj.selectAll,t=>t.filter(n=>n.enabled()).length>0);J.prototype.chatComponent={selectState:function axt(){return this.selectSync(QC)}.bind(J.prototype),subscribeState:function cxt(){return this.select(QC)}.bind(J.prototype),selectIsOpened:function lxt(){return this.selectSync(f2)}.bind(J.prototype),subscribeIsOpened:function uxt(){return this.select(f2)}.bind(J.prototype),selectIntent:function dxt(){return this.selectSync(nye)}.bind(J.prototype),subscribeIntent:function pxt(){return this.select(nye)}.bind(J.prototype),selectTabsState:function hxt(){return this.selectSync($M)}.bind(J.prototype),subscribeTabsState:function mxt(){return this.select($M)}.bind(J.prototype),selectTabsEntities:function fxt(){return this.selectSync(iye)}.bind(J.prototype),subscribeTabsEntities:function gxt(){return this.select(iye)}.bind(J.prototype),selectTabsList:function _xt(){return this.selectSync(oye)}.bind(J.prototype),subscribeTabsList:function vxt(){return this.select(oye)}.bind(J.prototype),selectPublicChatSelectState:function bxt(){return this.selectSync(g2)}.bind(J.prototype),subscribePublicChatSelectState:function Cxt(){return this.select(g2)}.bind(J.prototype),selectPublicChatSelectorSelectedOption:function yxt(){return this.selectSync(oxt)}.bind(J.prototype),selectIsChatEnabled:function Sxt(){return this.selectSync(sxt)}.bind(J.prototype),selectPublicChatIsOpened:function wxt(t){return this.selectSync(rye(),t)}.bind(J.prototype),subscribePublicChatIsOpened:function Txt(t){return this.select(rye(),t)}.bind(J.prototype),selectPrivateChatIsOpened:function Pxt(){return this.selectSync(sye)}.bind(J.prototype),subscribePrivateChatIsOpened:function Ixt(){return this.select(sye)}.bind(J.prototype)};let Mxt=(()=>{var t;class n{constructor(e){this.store=e}selectPublicChatIsOpened(){return e=>{const i=this.store.selectPublicChatState(e);return this.store.chatComponent.selectPublicChatIsOpened(i)}}subscribePublicChatIsOpened(){return e=>{const i=this.store.selectPublicChatState(e);return this.store.chatComponent.subscribePublicChatIsOpened(i)}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Oxt=(()=>{var t;class n{constructor(e){this.store=e}selectPrivateChatIsOpened(){return this.store.chatComponent.selectPrivateChatIsOpened}subscribePrivateChatIsOpened(){return this.store.chatComponent.subscribePrivateChatIsOpened}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Ext=[xi,Yi,Io,No,Ls,$r.forFeature(N6.featureKey,function ixt(t,n){return nxt(t,n)})],xxt=[f0,ds,F6,El,{provide:Vpe,useClass:Mxt},{provide:Jde,useClass:Oxt}];let Axt=(()=>{var t;class n{constructor(e,i){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ds),T(El))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...xxt],imports:[Ext]}),n})();var Rxt=__webpack_require__(55440),_2=__webpack_require__.n(Rxt);function aye(){return vr((t,n)=>{let o,e=!1;t.subscribe(eo(n,i=>{const r=o;o=i,e&&n.next([r,i]),e=!0}))})}var Jr=function(t){return t[t.None=0]="None",t[t.Pending=1]="Pending",t[t.Ready=2]="Ready",t[t.Failed=3]="Failed",t}(Jr||{}),Xj=nt.EModuleAction,eH=nt.EPermissionModule;const cye={[wt.Currency]:ve.EIcons.CHIP,[wt.Gems]:ve.EIcons.ICON_GEMS,[wt.Vip]:ve.EIcons.CROWN,[wt.Utility]:ve.EIcons.EDIT,[wt.Frames]:ve.EIcons.ICON_ACCOUNT,[wt.Decks]:ve.EIcons.ICON_DECK,[wt.PromoCodes]:ve.EIcons.PROMO_CODES,[wt.Promo]:ve.EIcons.PROMO_TAB,[wt.Tables]:ve.EIcons.ICON_BACKGROUNDS,[wt.Emotions]:ve.EIcons.IN_GAME_EMOJI,[wt.Dice]:ve.EIcons.ICON_DICE,[wt.Pawns]:ve.EIcons.ICON_PAWN,[wt.Exchange]:ve.EIcons.GEMS_CONVERSION,[wt.BankTransfer]:ve.EIcons.BANK_TRANSFER,[wt.Inventory]:ve.EIcons.INVENTORY_ICON,[wt.MessageColors]:ve.EIcons.COLORS,[wt.NameColors]:ve.EIcons.COLORS,[wt.Boosters]:ve.EIcons.BOOSTERS},lye=[wt.Currency,wt.Gems,wt.Vip,wt.GiftablePacks,wt.Promo,wt.Inventory,wt.Emotions,wt.Boosters,wt.PromoCodes,wt.Utility,wt.BankTransfer,wt.Frames,wt.Decks,wt.Tables,wt.Dice,wt.Pawns,wt.Exchange,wt.MessageColors,wt.NameColors,wt.CreatorCode],tH=[wt.Inventory,wt.Promo,wt.PromoCodes,wt.CreatorCode,wt.GiftablePacks];var hs=function(t){return t.Own="ownShop",t.OtherPlayer="otherPlayer",t}(hs||{});const uye=[{id:wt.Currency,visibleInProfile:[hs.Own,hs.OtherPlayer],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems,ci.RequestClubDonation],shopItemCategories:[wt.Currency,wt.HappyHourChips]},{id:wt.Gems,visibleInProfile:[hs.Own,hs.OtherPlayer],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems,ci.RequestClubDonation],shopItemCategories:[wt.Gems]},{id:wt.Vip,visibleInProfile:[hs.Own,hs.OtherPlayer],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems,ci.RequestClubDonation],shopItemCategories:[wt.Vip]},{id:wt.GiftablePacks,visibleInProfile:[hs.Own,hs.OtherPlayer],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.GiftablePacks],permissions:{module:eH.GiftablePacks,action:Xj.View}},{id:wt.PromoCodes,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[],permissions:{module:eH.Shop,action:Xj.PromoCodes},visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.PromoCodes]},{id:wt.Promo,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Promo]},{id:wt.Inventory,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Inventory]},{id:wt.BankTransfer,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser],visibleInDevicePlatforms:[],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.BankTransfer]},{id:wt.Exchange,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Exchange]},{id:wt.Boosters,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Boosters]},{id:wt.Emotions,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Emotions]},{id:wt.Utility,hidden:!0,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Utility]},{id:wt.Decks,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Decks]},{id:wt.Dice,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Dice]},{id:wt.Tables,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Tables]},{id:wt.NameColors,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.NameColors]},{id:wt.MessageColors,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.MessageColors]},{id:wt.Frames,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Frames]},{id:wt.Pawns,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[$n.Facebook,$n.SpilGames,$n.CafeBazaar],visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.Pawns]},{id:wt.CreatorCode,visibleInProfile:[hs.Own],visibleInPlatforms:[Ut.Browser,Ut.Android,Ut.Ios,Ut.Windows],visibleInDevicePlatforms:[],permissions:{module:eH.Shop,action:Xj.CreatorCode},visibleInUsageIntents:[ci.BuyItems],shopItemCategories:[wt.CreatorCode]}];var nH=ve.EIcons;function kxt(t,n){1&t&&B(0,"number",10),2&t&&l("value",_(2).$implicit.amount)}function Lxt(t,n){if(1&t&&(p(0,"span",11),H(1),V(2,"timeLeft"),m()),2&t){const o=_(2).$implicit;d(),se($(2,1,o.amount))}}const Dxt=(t,n)=>[t,n];function Bxt(t,n){if(1&t&&(p(0,"span",12),H(1),V(2,"translate"),m()),2&t){const o=_(2).$implicit,e=_();d(),se(yt(2,1,"SHOP.VIP_USERS_CLUB_DONATION",cn(4,Dxt,o.vipBonusPercentage,e.currency)))}}function Nxt(t,n){if(1&t&&(p(0,"p",4)(1,"span",5),H(2),V(3,"translate"),B(4,"icon-component",6),U(5,kxt,1,1,"number",7)(6,Lxt,3,3,"span",8),m(),U(7,Bxt,3,7,"span",9),m()),2&t){const o=_().$implicit;d(2),ze("",$(3,8,"SHOP.YOU_HAVE")," "),d(2),ni("amount-icon ",o.tabId,""),l("icon",o.icon),d(),l("ngIf","vip"!==o.tabId),d(),l("ngIf","vip"===o.tabId),d(),l("ngIf",o.vipBonusPercentage)}}const dye=t=>[t];function Fxt(t,n){if(1&t&&(p(0,"p",13)(1,"span",5),H(2),V(3,"translate"),m()()),2&t){const o=_(2);d(2),se(yt(3,1,"SHOP.SENDING_DONATION",ne(4,dye,o.currentUser.username.currentUsername)))}}function Uxt(t,n){if(1&t&&(B(0,"span",16),V(1,"translate")),2&t){const o=_(2).$implicit;l("innerHtml",yt(1,1,"SHOP.CHIP_BECOME_VIP",ne(4,dye,o.vipBonusPercentage)),Yn)}}function Gxt(t,n){if(1&t&&(p(0,"span",5),H(1),V(2,"translate"),p(3,"span",17),B(4,"icon-component",6)(5,"number",10),m()()),2&t){const o=_(2).$implicit;d(),ze("",$(2,6,"SHOP.YOU_HAVE"),": "),d(3),ni("amount-icon ",o.tabId,""),l("icon",o.icon),d(),l("value",o.amount)}}function Vxt(t,n){if(1&t&&(p(0,"span",20),H(1),V(2,"translate"),m()),2&t){const o=_(3).$implicit;d(),se($(2,1,o.text.key))}}function zxt(t,n){if(1&t&&B(0,"icon-component",6),2&t){const o=_(3).$implicit;ni("amount-icon ",o.tabId,""),l("icon",o.icon)}}const jxt=(t,n)=>({minTimeUnitsType:t,timeConfig:n});function Hxt(t,n){if(1&t&&(p(0,"span",5),H(1),V(2,"translate"),p(3,"span",17),U(4,Vxt,3,3,"span",18)(5,zxt,1,4,"icon-component",19),p(6,"span",11),H(7),V(8,"timeLeft"),m()()()),2&t){const o=_(2).$implicit,e=_();d(),ze("",$(2,4,"SHOP.YOU_HAVE"),": "),d(3),l("ngIf",o.text),d(),l("ngIf",o.icon),d(2),se(yt(8,6,o.amount,cn(9,jxt,e.timeType.Minutes,e.timeLeftConfig)))}}function qxt(t,n){if(1&t&&(p(0,"p",4),U(1,Uxt,2,6,"span",14)(2,Gxt,6,8,"span",15)(3,Hxt,9,12,"span",15),m()),2&t){const o=_().$implicit,e=_();d(),l("ngIf","currency"===o.tabId&&!e.currentUser.hasTierOrHigher(e.EVipTier.Full)),d(),l("ngIf","gems"===o.tabId),d(),l("ngIf","vip"===o.tabId)}}function Wxt(t,n){if(1&t&&(p(0,"div",1),U(1,Nxt,8,10,"p",2)(2,Fxt,4,6,"p",3)(3,qxt,4,3,"p",2),m()),2&t){const o=n.$implicit,e=_();d(),l("ngIf",e.shopUsageIntent===e.EShopUsageIntent.RequestClubDonation&&o),d(),l("ngIf",e.shopUsageIntent!==e.EShopUsageIntent.RequestClubDonation&&o&&!e.isMyShopData&&e.currentUser),d(),l("ngIf",e.shopUsageIntent!==e.EShopUsageIntent.RequestClubDonation&&o&&e.isMyShopData&&e.currentUser)}}let pye=(()=>{var t;class n{constructor(e,i,r,s){this.translate=e,this.destroyRef=s,this.EShopUsageIntent=ci,this.timeType=Rt,this.EVipTier=Fi,this.timeLeftConfig=new yl(Zu).useYearsConfig({min:Rt.Months}).useMonthsConfig({min:Rt.Days}).useDaysConfig({min:Rt.Hours}).useHoursConfig({min:Rt.Minutes}).useMinutesConfig({min:Rt.Minutes}).build(),this.tabChange=new sn,this.store=i,this.cdr=r}ngOnChanges(e){this.currency=this.translate.instant("SHOP.TABS.".concat(this.tabId.toUpperCase())).toLowerCase(),e.tabId&&this.buildCurrentTab()}buildCurrentTab(){switch(this.tabChange.next(),this.tabId){case"currency":this.buildCurrencyTab();break;case"gems":this.buildGemsTab();break;case"vip":this.buildVipTab();break;default:this.textDataList=[]}}buildCurrencyTab(){this.store.subscribeWallet().pipe(bt(e=>!!e),wn(this.tabChange),mi(this.destroyRef)).subscribe(e=>{var i;if(this.store.selectSimpleProfile().vip.hasTierOrHigher(Fi.Full))return this.textDataList=[],void this.cdr.detectChanges();this.textDataList=[{tabId:this.tabId,icon:nH.CHIP,amount:e.chips,vipBonusPercentage:this.store.selectSimpleProfile().vip.hasTierOrHigher(Fi.Full)?void 0:100*((null===(i=this.store.shop.iap.selectState())||void 0===i||null===(i=i.model)||void 0===i?void 0:i.vipBonusMultiplier)-1)}],this.cdr.detectChanges()})}buildGemsTab(){this.subscription=this.store.subscribeWallet().pipe(wn(this.tabChange),bt(e=>!!e&&!!this.textDataList)).subscribe(e=>{this.textDataList=[{tabId:this.tabId,icon:nH.ICON_GEMS,amount:this.store.selectUserState().wallet.gems}],this.cdr.detectChanges()})}buildVipTab(){this.subscription=this.store.subscribeVipState().pipe(wn(this.tabChange),mi(this.destroyRef)).subscribe(e=>{var i,r;if(this.isMyShopData&&(!this.store.selectSimpleProfile().vip.currentTier()||this.store.selectSimpleProfile().vip.currentTier()&&(null===(i=e.currentTier())||void 0===i?void 0:i.remainingTime())<=5))return this.textDataList=[],void this.cdr.detectChanges();this.textDataList=[{tabId:this.tabId,icon:e.hasTierOrHigher(Fi.Full)?nH.CROWN:void 0,text:e.hasTierOrHigher(Fi.Premium)&&!e.hasTierOrHigher(Fi.Full)?{key:"SHOP.ITEMS.PREMIUM"}:void 0,amount:e.currentTier().remainingTime()}],null!==(r=e.tiers[Fi.Premium])&&void 0!==r&&r.isActive()&&e.hasTierOrHigher(Fi.Full)&&this.textDataList.push({tabId:this.tabId,icon:void 0,text:{key:"SHOP.ITEMS.PREMIUM"},amount:e.tiers[Fi.Premium].remainingTime()}),this.cdr.detectChanges()})}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ls),g(J),g(Re),g(br))},t.\u0275cmp=pe({type:t,selectors:[["shop-text-title"]],inputs:{shopUsageIntent:"shopUsageIntent",tabId:"tabId",isMyShopData:"isMyShopData",currentUser:"currentUser"},features:[it],decls:1,vars:1,consts:[["class","shop__container--text-data",4,"ngFor","ngForOf"],[1,"shop__container--text-data"],["class","shop__container--text",4,"ngIf"],["class","shop__container--text shop__text--colored",4,"ngIf"],[1,"shop__container--text"],[1,"title"],[3,"icon"],["class","amount",3,"value",4,"ngIf"],["class","amount",4,"ngIf"],["class","shop__container--text__vip-message",4,"ngIf"],[1,"amount",3,"value"],[1,"amount"],[1,"shop__container--text__vip-message"],[1,"shop__container--text","shop__text--colored"],["class","title shop__text--colored",3,"innerHtml",4,"ngIf"],["class","title",4,"ngIf"],[1,"title","shop__text--colored",3,"innerHtml"],[1,"shop__title--value"],["class","shop__container--text__label",4,"ngIf"],[3,"class","icon",4,"ngIf"],[1,"shop__container--text__label"]],template:function(e,i){1&e&&U(0,Wxt,4,3,"div",0),2&e&&l("ngForOf",i.textDataList)},dependencies:[Mt,Ne,Dn,Qr,qe,Ps],styles:[".shop__container--text[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center;justify-content:center;font-size:1.8rem;flex-flow:column nowrap;text-align:center;font-weight:600}@media screen and (max-width: 768px){.shop__container--text[_ngcontent-%COMP%]{font-size:1.4rem}}.shop__container--text[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{display:flex;align-items:center;margin:1rem 0;font-size:2.4rem}@media screen and (max-width: 768px){.shop__container--text[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.8rem}}@media screen and (max-width: 380px){.shop__container--text[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:1.4rem}}.shop__container--text[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .amount-icon[_ngcontent-%COMP%]{margin:0 .5rem;white-space:nowrap;display:inline-block;line-height:1;direction:ltr}.shop__container--text[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%]{font-size:inherit}.shop__text--colored[_ngcontent-%COMP%]{font-size:1.8rem!important;font-weight:100}.shop__text--colored[_ngcontent-%COMP%] > p[_ngcontent-%COMP%], .shop__text--colored[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:1.8rem!important}.shop__title--value[_ngcontent-%COMP%]{direction:ltr!important;display:flex;align-items:center}.shop__container--text__vip-message[_ngcontent-%COMP%]{max-width:90%}"],changeDetection:0}),n})();var YC;let JC=((YC=class{constructor(n,o){this.appStorageService=n,this.store=o}setStampCardLastSeenAnimation(n){const o=this.store.selectUserState().profile.id;this.appStorageService.setItem("lastCollectedStampSeen-".concat(o),n)}getStampCardLastSeenAnimation(){const n=this.store.selectUserState().profile.id;return this.appStorageService.getItem("lastCollectedStampSeen-".concat(n))||0}isStampCardTutorialWatched(){return this.appStorageService.checkItem("stampCardTutorialWatched")}setStampCardTutorialWatched(){this.appStorageService.setItem("stampCardTutorialWatched",!0)}onLogout(){for(let n in localStorage)-1!==n.indexOf("lastCollectedStampSeen")&&this.appStorageService.removeItem(n)}}).\u0275fac=function(n){return new(n||YC)(T(Ci),T(J))},YC.\u0275prov=be({token:YC,factory:YC.\u0275fac,providedIn:"root"}),YC);Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],JC.prototype,"onLogout",null),JC=Qe([Wo(),ue("design:paramtypes",[Ci,J])],JC);const hye=t=>[t];let KM=(()=>{var t;class n{constructor(){this.direction=n.EStampCardToggleDirection.Top,this.toggleClick=new ke,this.toggleDirections=n.EStampCardToggleDirection}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["stamp-card-toggle"]],inputs:{direction:"direction"},outputs:{toggleClick:"toggleClick"},decls:26,vars:6,consts:[["preserveAspectRatio","none","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 287.6 167.1",1,"stamp-card-top-curved__svg"],["id","Layer_2","data-name","Layer 2"],["id","Layer_1-2","data-name","Layer 1"],["d","M287.2,163.8l0-0.2c-2.1-16.8-11.5-17.6-26.8-17.6h-97.7C82.3,146,82.4,7.4,9,0.5C6.2,0.2,3.2,0.1,0,0.1\n                h267.6l0,0c11.1,0,20,9,20,20v147L287.2,163.8z",1,"stamp-card-top-curved__svg__inner"],["d","\n                M278.4,5.1c-1.7-1.1-5.1-1.9-7.1-2.3c-1-0.2-2-0.3-3-0.3c-0.5,0-1.1,0-1.7,0l-1.7,0l-13.9,0L223,2.6l-55.8-0.1l-55.8-0.4L83.6,1.8\n                L55.8,1.4c-9.3-0.1-18.6-0.4-27.9-0.5C21.8,0.8,15.8,0.7,9.7,0.5C9.5,0.5,9.2,0.5,9,0.5C7.7,0.3,3.8,0.2,2.4,0.1h265.2\n                c7.7,0,14.7,4.4,18,11.3C283.6,8.9,281.2,6.8,278.4,5.1z",2,"fill-rule","evenodd","clip-rule","evenodd","fill","url(#SVGID_00000041995430340973299820000009143808607137181109_)"],["d","M11.6,0.4c3.9,0.4,7.7,1.3,11.4,2.5\n                c7.4,2.5,14.3,6.5,20.2,11.6c5.9,5.1,11.2,10.9,15.8,17.2c2.4,3.1,4.6,6.3,6.7,9.6c2.1,3.3,4.2,6.5,6.1,9.9\n                c7.9,13.3,14.9,27.1,22.7,40.2c3.9,6.6,7.9,13.1,12.4,19.2c4.4,6.1,9.4,11.8,14.9,16.9c5.5,5,11.8,9.1,18.6,12\n                c6.9,2.8,14.2,4.2,21.6,4.3c15.4,0.2,30.8,0.2,46.2,0.4c15.4,0.2,30.8,0.4,46.2,0.7c3.8,0.1,7.7,0.1,11.6,0.3\n                c2,0.1,3.9,0.3,5.8,0.6c2,0.3,3.9,0.8,5.7,1.5c1.9,0.8,3.6,1.9,4.9,3.4l1,1.1l0.8,1.3c0.3,0.4,0.5,0.8,0.7,1.3\n                c0.2,0.4,0.4,0.9,0.6,1.3c1.4,3.7,1.6,7.6,2.1,11.4c-0.7-3.8-1.2-7.6-2.8-11.1c-0.2-0.4-0.4-0.8-0.7-1.2c-0.2-0.4-0.4-0.8-0.7-1.2\n                l-0.8-1.1l-1-1c-1.3-1.3-2.9-2.2-4.7-2.8c-3.6-1.1-7.4-1.6-11.1-1.5c-3.8,0-7.7,0.1-11.5,0.2c-15.4,0.3-30.8,0.6-46.2,0.7\n                c-7.7,0.1-15.4,0.2-23.1,0.2l-23.1,0.2c-8,0-16-1.5-23.4-4.5c-7.4-3.1-14.2-7.4-20.1-12.8c-5.8-5.4-11-11.3-15.5-17.7\n                c-4.5-6.3-8.7-12.9-12.5-19.7c-7.7-13.5-14.5-27.3-22-40.6c-3.7-6.7-7.7-13.2-12.1-19.5c-4.3-6.3-9.3-12.1-14.8-17.2\n                C36,11.1,29.5,7,22.5,4.2C15.3,1.5,7.7,0.1,0,0.1C3.9-0.1,7.7,0,11.6,0.4z",1,"stamp-card-top-curved__svg__left__border"],["preserveAspectRatio","none","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 58 49.4",1,"stamp-card__toggle--outer",3,"ngClass"],["id","header-shape-gradient-desktop","x1","117.55","y1","65.59","x2","469.55","y2","65.59","gradientUnits","userSpaceOnUse"],["offset","0",1,"stop-1"],["offset","0.5",1,"stop-2"],["offset","1",1,"stop-3"],["d","M56.5,7.9C54.2,3,49.3,0,43.9,0H14C8.6,0,3.8,3,1.4,7.9C-1,12.8-0.3,18.5,3.1,22.7l15,18.5\n        c2.7,3.3,6.7,5.2,10.9,5.2c4.3,0,8.2-1.9,10.9-5.2l15-18.5C58.3,18.5,58.9,12.8,56.5,7.9z",1,"stamp-card__toggle__outer__container"],["d","M54.9,22.7l-15,18.5c-2.7,3.3-6.7,5.2-10.9,5.2c-4.3,0-8.2-1.9-10.9-5.2l-15-18.5c-1.7-2.1-2.7-4.6-3-7.2\n            c-0.4,3.6,0.6,7.3,3,10.2l15,18.5c2.7,3.3,6.7,5.2,10.9,5.2c4.3,0,8.2-1.9,10.9-5.2l15-18.5c2.4-3,3.4-6.6,3-10.2\n            C57.6,18.1,56.6,20.6,54.9,22.7z",1,"stamp-card__toggle__outer__border--bottom"],["d","M14,3h29.9c5.4,0,10.2,3,12.6,7.9c0.7,1.5,1.2,3.1,1.4,4.7c0.3-2.6-0.2-5.2-1.4-7.7C54.2,3,49.3,0,43.9,0H14\n        C8.6,0,3.8,3,1.4,7.9c-1.2,2.5-1.6,5.1-1.4,7.7c0.2-1.6,0.6-3.2,1.4-4.7C3.8,6,8.6,3,14,3z",1,"stamp-card__toggle__outer__border--top"],["preserveAspectRatio","none","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 58 49.4",1,"stamp-card__toggle--inner",3,"ngClass"],["id","stamp-card__toggle--inner--gradient","gradientTransform","rotate(90)","gradientUnits","userSpaceOnUse"],["offset","0",1,"stamp-card__toggle--inner--gradient__stop-1"],["offset","0.5",1,"stamp-card__toggle--inner--gradient__stop-2"],["offset","1",1,"stamp-card__toggle--inner--gradient__stop-3"],["d","M56.5,7.9C54.2,3,49.3,0,43.9,0H14C8.6,0,3.8,3,1.4,7.9C-1,12.8-0.3,18.5,3.1,22.7l15,18.5\n        c2.7,3.3,6.7,5.2,10.9,5.2c4.3,0,8.2-1.9,10.9-5.2l15-18.5C58.3,18.5,58.9,12.8,56.5,7.9z",1,"stamp-card__toggle__inner__container"],["d","M54.9,22.7l-15,18.5c-2.7,3.3-6.7,5.2-10.9,5.2c-4.3,0-8.2-1.9-10.9-5.2l-15-18.5c-1.7-2.1-2.7-4.6-3-7.2\n            c-0.4,3.6,0.6,7.3,3,10.2l15,18.5c2.7,3.3,6.7,5.2,10.9,5.2c4.3,0,8.2-1.9,10.9-5.2l15-18.5c2.4-3,3.4-6.6,3-10.2\n            C57.6,18.1,56.6,20.6,54.9,22.7z",1,"stamp-card__toggle__inner__border--bottom"],["d","M14,3h29.9c5.4,0,10.2,3,12.6,7.9c0.7,1.5,1.2,3.1,1.4,4.7c0.3-2.6-0.2-5.2-1.4-7.7C54.2,3,49.3,0,43.9,0H14\n        C8.6,0,3.8,3,1.4,7.9c-1.2,2.5-1.6,5.1-1.4,7.7c0.2-1.6,0.6-3.2,1.4-4.7C3.8,6,8.6,3,14,3z",1,"stamp-card__toggle__inner__border--top"]],template:function(e,i){1&e&&(Df(),p(0,"svg",0)(1,"g",1)(2,"g",2),B(3,"path",3)(4,"path",4)(5,"path",5),m()()(),p(6,"svg",6)(7,"defs")(8,"linearGradient",7),B(9,"stop",8)(10,"stop",9)(11,"stop",10),m()(),B(12,"path",11),p(13,"g"),B(14,"path",12),m(),B(15,"path",13),m(),p(16,"svg",14)(17,"defs")(18,"linearGradient",15),B(19,"stop",16)(20,"stop",17)(21,"stop",18),m()(),B(22,"path",19),p(23,"g"),B(24,"path",20),m(),B(25,"path",21),m()),2&e&&(d(6),l("ngClass",ne(2,hye,i.direction)),d(10),l("ngClass",ne(4,hye,i.direction)))},dependencies:[Xe],styles:[".stamp-card-top-curved__svg[_ngcontent-%COMP%]{width:7rem}.stamp-card__toggle__outer__container[_ngcontent-%COMP%]{fill:#131517}.stamp-card-top-curved__svg__inner[_ngcontent-%COMP%]{fill:#424549}.stamp-card__toggle__outer__border--bottom[_ngcontent-%COMP%]{fill:#737880}.stamp-card__toggle__outer[_ngcontent-%COMP%]{transform:rotate(180deg);position:absolute;top:0;right:0}.stamp-card__toggle--inner[_ngcontent-%COMP%]{position:absolute;right:16px;width:1.8rem;transform:rotate(180deg);top:10px;transition:.2s ease transform;cursor:pointer}.stamp-card__toggle--inner.bottom[_ngcontent-%COMP%]{top:8px;transform:rotate(0)}.stamp-card__toggle--outer[_ngcontent-%COMP%]{position:absolute;top:4px;right:10px;width:3rem;transform:rotate(180deg);transition:.2s ease transform}.stamp-card__toggle--outer.bottom[_ngcontent-%COMP%]{transform:rotate(0)}.stamp-card__toggle__inner__container[_ngcontent-%COMP%]{fill:url(#stamp-card__toggle--inner--gradient)}.stamp-card__toggle--inner--gradient__stop-1[_ngcontent-%COMP%]{stop-color:#dcff19}.stamp-card__toggle--inner--gradient__stop-2[_ngcontent-%COMP%]{stop-color:#a7e901}.stamp-card__toggle--inner--gradient__stop-3[_ngcontent-%COMP%]{stop-color:#85d001}.stamp-card__toggle__inner__border--bottom[_ngcontent-%COMP%]{fill:#416900}.stamp-card__toggle__inner__border--top[_ngcontent-%COMP%]{fill:#ddf748}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EStampCardToggleDirection||(t.EStampCardToggleDirection={})).Top="top",o.Bottom="bottom"}(KM||(KM={}));class mye{}class $xt extends mye{constructor(n,o,e){super(),this.domElement=n,this.cssClass=o,this.ngZone=e}play(){return new Promise((n,o)=>{this.domElement.classList.add(this.cssClass);const e=r=>{r.target===this.domElement&&(this.domElement.classList.remove(this.cssClass),this.domElement.removeEventListener("animationend",e),this.domElement.removeEventListener("animationcancel",i),n())},i=r=>{r.target===this.domElement&&(this.domElement.removeEventListener("animationcancel",i),this.domElement.removeEventListener("animationend",e),o(new Error("animation was canceled")))};this.ngZone.runOutsideAngular(()=>{this.domElement.addEventListener("animationend",e),this.domElement.addEventListener("animationcancel",i)})})}}class Kxt extends mye{constructor(n,o,e,i){super(),this.domElement=n,this.ngZone=o,this.css=e,this.cssPartialObject=i}play(){return new Promise((n,o)=>{const e=typeof this.css;let i;if("string"===e?this.domElement.classList.add(this.css):i=this.css,this.cssPartialObject&&(i=this.cssPartialObject),i)for(const a in i)this.cssPartialObject.hasOwnProperty(a)&&(this.domElement.style[a]=this.cssPartialObject[a]);const r=a=>{a.target===this.domElement&&("string"===e&&this.domElement.classList.remove(this.css),this.domElement.removeEventListener("transitionend",r),this.domElement.removeEventListener("transitioncancel",s),n())},s=a=>{a.target===this.domElement&&(this.domElement.removeEventListener("transitioncancel",s),this.domElement.removeEventListener("transitionend",r),o(new Error("transition was canceled")))};this.ngZone.runOutsideAngular(()=>{this.domElement.addEventListener("transitionend",r),this.domElement.addEventListener("transitioncancel",s)})})}}let Zxt=(()=>{var t;class n{constructor(e){this.ngZone=e}createAnimationTween(e,i){return new $xt(e,i,this.ngZone)}createTransitionTween(e,i,r){return new Kxt(e,this.ngZone,i,r)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(an))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var Qxt=ve.EIcons;const Yxt=["stampsContainer"],Jxt=["stampCard"],Xxt=["stampContainer"],eAt=()=>({key:"SHOP.STAMP_CARD.CLAIMED"});function tAt(t,n){1&t&&B(0,"stamp-bordered-text",19),2&t&&l("text",pt(1,eAt))}function nAt(t,n){1&t&&B(0,"div",20)}function iAt(t,n){if(1&t&&(p(0,"item-label-component",21),B(1,"timer",22),m()),2&t){const o=_();l("customClass","stamp-card__flag__container"),d(),l("milliseconds",1e3*o.stampCardState.getRemainingTime())("timerConfig",o.timerConfig)}}function oAt(t,n){if(1&t&&(p(0,"span",23),H(1),m()),2&t){const o=_();d(),mu("",o.currentStampIndex+1,"/",o.stampsList.length,"")}}const rAt=(t,n)=>({first:t,last:n}),sAt=t=>({"stamp-card__stamp__collected":t});function aAt(t,n){if(1&t&&(p(0,"div",27,28),B(2,"div",29),m()),2&t){const o=n.$implicit;l("ngClass",cn(2,rAt,o.isFirst,o.isLast)),d(2),l("ngClass",ne(5,sAt,o.isChecked))}}const cAt=t=>({"stamp-card__stamps__scrollable":t});function lAt(t,n){if(1&t&&(p(0,"div",24,25),U(2,aAt,3,7,"div",26),m()),2&t){const o=_();l("ngClass",ne(3,cAt,o.showProgress)),d(2),l("ngForOf",o.stampsList)("ngForTrackBy",o.trackByFn)}}function uAt(t,n){1&t&&B(0,"item-component",35),2&t&&l("item",n.$implicit)}function dAt(t,n){if(1&t&&(p(0,"div",33),U(1,uAt,1,1,"item-component",34),m()),2&t){const o=_(2);d(),l("ngForOf",o.stampCardState.model.reward.items)}}const pAt=()=>({showMaxPrize:!0,showMiniGameImg:!0,showMiniGameName:!0,showMiniGameMode:!0});function hAt(t,n){if(1&t&&B(0,"item-reward",36),2&t){const o=_(2);l("showBling",!0)("miniGame",o.stampCardState.model.reward.miniGame)("miniGamePreviewConfig",pt(4,pAt))("stylePreset",o.itemRewardStylePreset)}}function mAt(t,n){if(1&t&&(p(0,"div",30),U(1,dAt,2,1,"div",31)(2,hAt,1,5,"item-reward",32),m()),2&t){const o=_();d(),l("ngIf",o.stampCardState.model.reward.items),d(),l("ngIf",o.stampCardState.model.reward.miniGame)}}const fAt=t=>({isClaimed:t}),gAt=t=>({name:t}),_At=t=>({"stamp-card__claim--button__disabled":t});let fye=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.stampCardComponentService=e,this.destroyRef=i,this.cdr=r,this.rulerService=s,this.soundService=a,this.urlService=c,this.tweenFactoryService=u,this.elementScrollHelper=h,this.settings=b,this.currentStampIndex=0,this.stampCardClaim=new ke,this.stampCardTutorialClick=new ke,this.togglePosition=KM.EStampCardToggleDirection,this.buttonModifier=ve.EButtonModifier,this.claimState=bl,this.opened=!1,this.stampsList=[],this.itemRewardStylePreset=Jh.EShopItemPreviewPreset.Transparent,this.iconNames=Qxt,this.stampCardFullAnimationDelay=500}ngOnInit(){this.buildStampsList(),this.cdr.detectChanges(),this.scrollContainer({targetStamp:this.currentStampIndex+1,animated:!1}),this.cdr.detectChanges()}ngAfterViewInit(){this.rulerService.getAppSize().pipe(mi(this.destroyRef),tr(1)).subscribe(e=>{this.scrollContainer({targetStamp:this.currentStampIndex+1,animated:!1}),this.cdr.detectChanges()})}ngOnDestroy(){var e;null===(e=this.currentAnimationPromise)||void 0===e||e.cancel()}tutorialButtonClick(){this.stampCardTutorialClick.emit()}playCollectStampAnimationChain(e){return this.currentAnimationPromise=new Jn(this.stampCollectAnimation(e)),this.currentAnimationPromise}trackByFn(e,i){return e}isClaimed(){return this.stampCardState.model.status===bl.Claimed}isReadyToClaim(){return this.stampCardState.model.status===bl.Ready}swipeHandler(e){if(!this.isClaimed())switch(e){case sa.Up:this.openStampCard();break;case sa.Down:this.closeStampCard()}}toggleStampCard(){this.opened?this.closeStampCard():this.openStampCard()}openStampCard(){this.opened=!0,this.cdr.detectChanges()}closeStampCard(){this.opened=!1,this.cdr.detectChanges()}claim(){this.stampCardClaim.emit()}playStampCardFullAnimation(){var e=this;return f(function*(){const i=e.tweenFactoryService.createAnimationTween(e.stampsCard.nativeElement,"stamp-card__stamps-full");return yield _u(e.stampCardFullAnimationDelay).pipe(mi(e.destroyRef)).toPromise(),e.settings.getSounds()&&e.soundService.createSound({type:Dp.ClientSound,src:e.urlService.getSoundsUrl("utility/stamp_card_full.mp3")}).play(),i.play()})()}stampCollectAnimation(e){var i=this;return f(function*(){const r=e.targetStampIndex-e.currentStampIndex;try{for(let s=1;s<=r;s++)yield i.scrollContainer({targetStamp:e.currentStampIndex+s+1,animated:!0}),yield i.playCollectStampAnimation(e.currentStampIndex+s),i.stampCardComponentService.setStampCardLastSeenAnimation(i.currentStampIndex)}catch(s){console.warn(s)}})()}buildStampsList(){this.stampsList=Array.from({length:this.stampCardState.model.stampsToCollect},(e,i)=>({isFirst:0===i,isLast:i===this.stampCardState.model.stampsToCollect-1,isCurrent:i===this.currentStampIndex,isChecked:i<=this.currentStampIndex}))}scrollContainer(e){const i=this.stampContainer.first.nativeElement.clientWidth,r=this.stampsContainer.nativeElement.clientWidth,s=r/i;if(s>=this.stampsList.length)return this.showProgress=!1,Promise.resolve();this.showProgress=!0;const a=this.stampsContainer.nativeElement.scrollWidth-r,c=i*(e.targetStamp-s+1.5);if(a===c)return Promise.resolve();const u={element:this.stampsContainer.nativeElement,targetScroll:Math.min(a,c),animation:e.animated?{durationMs:200,timingFunction:pM}:void 0,position:Na.EScrollPosition.ScrollLeft};return this.elementScrollHelper.scrollElement(u)}playCollectStampAnimation(e){return this.stampsList.forEach((r,s)=>{r.isChecked=s<=e}),this.settings.getSounds()&&this.soundService.createSound({type:Dp.ClientSound,src:this.urlService.getSoundsUrl("utility/stamp_collect.mp3")}).play(),this.currentStampIndex=e,this.cdr.detectChanges(),this.tweenFactoryService.createAnimationTween(this.stampsContainer.nativeElement.children[e].children[0],"stamp-card__stamp__current").play()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(JC),g(br),g(Re),g(Ua),g(Mo),g(ii),g(Zxt),g(cr),g(nc))},t.\u0275cmp=pe({type:t,selectors:[["stamp-card"]],viewQuery:function(e,i){if(1&e&&($e(Yxt,5),$e(Jxt,5),$e(Xxt,5)),2&e){let r;je(r=He())&&(i.stampsContainer=r.first),je(r=He())&&(i.stampsCard=r.first),je(r=He())&&(i.stampContainer=r)}},inputs:{timerConfig:"timerConfig",stampCardState:"stampCardState",currentStampIndex:"currentStampIndex"},outputs:{stampCardClaim:"stampCardClaim",stampCardTutorialClick:"stampCardTutorialClick"},decls:24,vars:30,consts:[["swipe-directive","",1,"stamp-card__container__wrapper",3,"swipeAction"],["class","stamp-card__stamp--completed",3,"text",4,"ngIf"],[1,"stamp-card__container"],["stampCard",""],[1,"stamp-card__top-container",3,"ngClass"],["class","stamp-card__overlay",4,"ngIf"],["class","stamp-card__flag",3,"customClass",4,"ngIf"],[1,"stamp-card__tutorial__button",3,"icon","bclass","click"],[1,"stamp-card__toggle__container",3,"direction","click"],[1,"stamp-card__stamps__container__wrapper"],[1,"stamp-card__title_container"],[1,"stamp-card__title"],["class","stamp-card__progress",4,"ngIf"],["class","stamp-card__stamps__container",3,"ngClass",4,"ngIf"],[1,"stamp-card__middle-container"],[1,"stamp-card__bottom-container"],[1,"stamp-card__info",3,"innerHtml"],["class","stamp-card__reward",4,"ngIf"],[1,"stamp-card__claim--button",3,"ngClass","bclass","loading","buttonModifier","click"],[1,"stamp-card__stamp--completed",3,"text"],[1,"stamp-card__overlay"],[1,"stamp-card__flag",3,"customClass"],[1,"stamp-card__timer",3,"milliseconds","timerConfig"],[1,"stamp-card__progress"],[1,"stamp-card__stamps__container",3,"ngClass"],["stampsContainer",""],["class","stamp-card__stamp__outer",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"stamp-card__stamp__outer",3,"ngClass"],["stampContainer",""],[1,"stamp-card__stamp",3,"ngClass"],[1,"stamp-card__reward"],["class","stamp-card__reward__item__container",4,"ngIf"],["class","stamp-card__reward__item mini-game",3,"showBling","miniGame","miniGamePreviewConfig","stylePreset",4,"ngIf"],[1,"stamp-card__reward__item__container"],["class","stamp-card__reward__item item",3,"item",4,"ngFor","ngForOf"],[1,"stamp-card__reward__item","item",3,"item"],[1,"stamp-card__reward__item","mini-game",3,"showBling","miniGame","miniGamePreviewConfig","stylePreset"]],template:function(e,i){1&e&&(p(0,"div",0),Y("swipeAction",function(s){return i.swipeHandler(s)}),U(1,tAt,1,2,"stamp-bordered-text",1),p(2,"div",2,3)(4,"div",4),U(5,nAt,1,0,"div",5)(6,iAt,2,3,"item-label-component",6),p(7,"button-icon",7),Y("click",function(){return i.tutorialButtonClick()}),m(),p(8,"stamp-card-toggle",8),Y("click",function(){return i.toggleStampCard()}),m(),p(9,"div",9)(10,"div",10)(11,"p",11),H(12),V(13,"translate"),m(),U(14,oAt,2,2,"span",12),m(),U(15,lAt,3,5,"div",13),m()(),B(16,"div",14),p(17,"div",15),B(18,"div",16),V(19,"translate"),U(20,mAt,3,2,"div",17),p(21,"button-text",18),Y("click",function(){return i.claim()}),H(22),V(23,"translate"),m()()()()),2&e&&(l("@stampOpened",i.opened),d(),l("ngIf",i.isClaimed()),d(3),l("ngClass",ne(24,fAt,i.isClaimed())),d(),l("ngIf",i.isClaimed()),d(),l("ngIf",!i.isClaimed()&&!i.isReadyToClaim()),d(),l("icon",ne(26,gAt,i.iconNames.TUTORIAL_ICON))("bclass","stamp-card__tutorial__button__bclass"),d(),l("direction",i.opened?i.togglePosition.Bottom:i.togglePosition.Top),d(4),se($(13,18,"SHOP.STAMP_CARD.TITLE")),d(2),l("ngIf",i.showProgress),d(),l("ngIf",i.stampsList),d(3),l("innerHtml",$(19,20,"SHOP.STAMP_CARD.DESCRIPTION"),Yn),d(2),l("ngIf",i.stampCardState.model.reward),d(),l("ngClass",ne(28,_At,i.stampCardState.model.status!==i.claimState.Ready))("bclass","stamp-card__claim--button__bclass")("loading",i.stampCardState.actions.claim.inProgress)("buttonModifier",i.isReadyToClaim()?i.buttonModifier.BUTTON_ATTENTION:i.buttonModifier.CLAIM_STAMP_LOCKED),d(),se($(23,22,"TEXT.CLAIM")))},dependencies:[Xe,Mt,Ne,Fs,Zh,pn,ei,wu,Jh,Ym,$L,KM,qe],styles:[".stamp-card__container.stamp-card__stamps-full[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_stamp-card__full;animation-duration:1s;animation-timing-function:ease-in-out;transform-origin:bottom center}.stamp-card__stamp[_ngcontent-%COMP%]{border-radius:50%;width:6rem;height:6rem;margin:1rem}@media screen and (max-width: 480px){.stamp-card__stamp[_ngcontent-%COMP%]{width:5.5rem;height:5.5rem}}@media screen and (max-width: 440px){.stamp-card__stamp[_ngcontent-%COMP%]{width:5rem;height:5rem}}@media screen and (max-width: 380px){.stamp-card__stamp[_ngcontent-%COMP%]{width:4.5rem;height:4.5rem}}.stamp-card__stamps__container[_ngcontent-%COMP%]{display:flex;justify-content:center;overflow:auto;padding:1rem 0}.stamp-card__stamps__container.stamp-card__stamps__scrollable[_ngcontent-%COMP%]{justify-content:flex-start}@media screen and (max-width: 380px){.stamp-card__stamps__container[_ngcontent-%COMP%]{padding:2rem 0}}.stamp-card__title[_ngcontent-%COMP%]{text-align:center}.stamp-card__title_container[_ngcontent-%COMP%]{height:30%;margin-top:1rem;display:flex;flex-direction:column;justify-content:flex-end}.stamp-card__top-container[_ngcontent-%COMP%]{height:16rem;display:flex;flex-direction:column;justify-content:center}.stamp-card__top-container.isClaimed[_ngcontent-%COMP%]{overflow:hidden}.stamp-card__bottom-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-evenly;position:relative}.stamp-card__info[_ngcontent-%COMP%]{padding:1rem 5rem;text-align:center}.stamp-card__middle-container[_ngcontent-%COMP%]{height:.4rem;width:94%;margin-left:3%;display:flex;flex-direction:column;justify-content:center;position:relative}@media screen and (max-width: 480px){.stamp-card__middle-container[_ngcontent-%COMP%]{width:90%;margin-left:5%}}.stamp-card__middle--border[_ngcontent-%COMP%]{border-top:3px solid #b7b7b7;border-style:dashed}.stamp-card__toggle__container[_ngcontent-%COMP%]{position:absolute;top:0;right:0;border-radius:0 1.5rem 0 0;overflow:hidden;cursor:pointer}.stamp-card__reward[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center}.stamp-card__reward__item[_ngcontent-%COMP%]{width:40%;background-color:transparent!important}.stamp-card__progress[_ngcontent-%COMP%]{display:flex;justify-content:center}.stamp-card__claim--button[_ngcontent-%COMP%]{width:80%!important;height:5rem!important;margin:2rem auto}.stamp-card__claim--button.stamp-card__claim--button__disabled[_ngcontent-%COMP%]{pointer-events:none}.stamp-card__flag[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);z-index:1}.stamp-card__stamps__container__wrapper[_ngcontent-%COMP%]{height:100%}.stamp-card__reward__item__container[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-wrap:wrap;align-items:center}.stamp-card__stamp.stamp-card__stamp__current[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_add-stamp;animation-duration:.2s;animation-timing-function:ease-out}@keyframes _ngcontent-%COMP%_add-stamp{0%{transform:scale(1.5)}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_stamp-card__full{0%{transform:scale(1)}25%{transform:scale(1.05)}50%{transform:scale(1)}75%{transform:scale(1.05)}to{transform:scale(1)}}.stamp-card__tutorial__button[_ngcontent-%COMP%]{position:absolute;width:4rem;top:-2px;left:5px}.stamp-card__completed__text[_ngcontent-%COMP%]{font-weight:900;position:absolute;top:6rem;left:50%;transform:translate(-50%);font-size:3rem}"],data:{animation:[r2("stampOpened",[Hbe("true",Wc({transform:"translateY(0)"})),Hbe("false",Wc({transform:"translateY(calc(100% - 16rem))"})),z0("true => false",V0("200ms ease-out")),z0("* => true",V0("200ms ease-out"))])]},changeDetection:0}),n})();const _ye=Ts("stampCard");J.prototype.stampCard={selectStampCardState:function vAt(){return this.selectSync(_ye)}.bind(J.prototype),subscribeStampCardState:function bAt(){return this.select(_ye)}.bind(J.prototype)};var wv=function(t){return t.GetStampCard="[Stamp Card] Get Stamp Card",t.GetStampCardSuccess="[Stamp Card] Get Stamp Card Success",t.GetStampCardError="[Stamp Card] Get Stamp Card Error",t.ClaimStampCard="[Stamp Card] Claim Stamp Card",t.ClaimStampCardSuccess="[Stamp Card] Claim Stamp Card Success",t.ClaimStampCardError="[Stamp Card] Claim Stamp Card Error",t.ResetStampCardState="[Stamp Card] Reset Stamp Card State",t}(wv||{});const vye=he(wv.ClaimStampCard),bye=he(wv.ClaimStampCardSuccess,{_as:"props",_p:void 0}),Cye=he(wv.ClaimStampCardError,{_as:"props",_p:void 0}),yye=he(wv.ResetStampCardState),Sye=he(wv.GetStampCard),wye=he(wv.GetStampCardSuccess,{_as:"props",_p:void 0}),Tye=he(wv.GetStampCardError,{_as:"props",_p:void 0}),Pye=new mtt,CAt=Sr(Pye,de(Ik,(t,n)=>Se(t,o=>{o.model=n.stampCard.isActive?n.stampCard.stampCardModel:void 0,o.loadingState.isLoaded=!0,o.loadingState.isLoading=!1,o.loadingState.error=void 0})),de(Mk,(t,n)=>t.loadingState.isLoaded&&n.bonuses.stampCard?Se(t,o=>{o.model=n.bonuses.stampCard}):t),de(Sye,t=>t.loadingState.isLoaded?Se(t,n=>{n.loadingState.isLoading=!0}):t),de(wye,(t,n)=>t.loadingState.isLoaded?Se(t,o=>{o.model=n.stampCardState.isActive?n.stampCardState.stampCardModel:void 0,o.loadingState.isLoading=!1,o.loadingState.isLoaded=!0,o.loadingState.error=void 0}):t),de(Tye,(t,n)=>t.loadingState.isLoaded?Se(t,o=>{o.loadingState.error=n.error,o.loadingState.isLoading=!1}):t),de(vye,t=>t.loadingState.isLoaded?Se(t,n=>{n.actions.claim.inProgress=!0}):t),de(bye,(t,n)=>t.loadingState.isLoaded?Se(t,o=>{o.model=n.model,o.actions.claim.inProgress=!1,o.actions.claim.error=void 0}):t),de(Cye,(t,n)=>t.loadingState.isLoaded?Se(t,o=>{o.actions.claim.error=n.error,o.actions.claim.inProgress=!1}):t),de(yye,()=>Pye));function yAt(t,n){return CAt(t,n)}let iH=(()=>{var t;class n{constructor(e){this.http=e}getStampCardState(){return this.http.get("bonus/stampCard").toPromise().then(e=>e.body)}claimReward(){return this.http.post("bonus/stampCard/claim").toPromise().then(e=>e.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),oH=(()=>{var t;let n=((t=class{constructor(e,i){this.stampCardClientService=e,this.store=i,this.logoutSubject=new sn}claimReward(){var e=this;return f(function*(){try{e.store.dispatch(vye());const i=yield e.stampCardClientService.claimReward();e.store.dispatch(bye({model:i.stampCardModel}))}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(Cye({error:r})),i}})()}init(){this.store.stampCard.subscribeStampCardState().pipe(bt(e=>e.isActive()&&e.model.status!==bl.Ready&&e.getRemainingTime()>0),ws((e,i)=>e.model.expiresAt!==i.model.expiresAt),es(e=>_u(Math.min(1e3*(e.getRemainingTime()+5),2147483647))),wn(this.logoutSubject)).subscribe(()=>{this.requestStampCard()})}requestStampCard(){var e=this;return f(function*(){try{e.store.dispatch(Sye());const i=yield e.stampCardClientService.getStampCardState();e.store.dispatch(wye({stampCardState:i}))}catch(i){const r=jt.createErrorInstance(i);e.store.dispatch(Tye({error:r}))}})()}resetStampCardState(){this.logoutSubject.next(),this.store.dispatch(yye())}}).\u0275fac=function(e){return new(e||t)(T(iH),T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"init",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"resetStampCardState",null),n=Qe([Wo(),ue("design:paramtypes",[iH,Jo])],n),n})(),SAt=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(oH))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[oH,iH],imports:[_b.forFeature("stampCard",yAt),kk]}),n})();var wAt=ve.EIcons,TAt=ve.EButtonModifier;const PAt=["stampCardTutorialSteps"],IAt=["stampCardTutorialStepsArrow"];function MAt(t,n){if(1&t&&(p(0,"div",4)(1,"span",5),H(2),V(3,"translate"),m(),B(4,"icon-component",6)(5,"animated-arrow",7,8),m()),2&t){const o=_();d(2),se($(3,2,"SHOP.STAMP_CARD.TUTORIAL_STEP_ONE")),d(2),l("icon",o.iconNames.STAMP_CHECK_TUTORIAL)}}let Iye=(()=>{var t;class n{constructor(e){this.tweenFactoryService=e,this.showFirstStep=!0,this.stampCardTutorialClose=new ke,this.iconNames=wAt,this.buttonModifiers=TAt}ngAfterViewInit(){this.stepsHtmlElements=this.stampCardTutorialSteps.nativeElement.children,this.playTutorialStepAnimationChain()}ngOnDestroy(){var e;null===(e=this.currentTutorialAnimationPromise)||void 0===e||e.cancel()}closeTutorial(){this.stampCardTutorialClose.emit()}playTutorialStepAnimationChain(){return this.currentTutorialAnimationPromise=new Jn(this.playTutorialStepAnimation()),this.currentTutorialAnimationPromise.catch(e=>console.warn(e))}playTutorialStepAnimation(){var e=this;return f(function*(){try{for(let r=0;r<e.stepsHtmlElements.length;r++){var i;yield e.tweenFactoryService.createAnimationTween(e.stepsHtmlElements[r],"stamp-card-tutorial__step__current").play(),e.stepsHtmlElements[r].classList.add("stamp-card-tutorial__step__completed"),null===(i=e.arrows.get(r))||void 0===i||i.animate()}}catch(r){console.warn(r)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(tw))},t.\u0275cmp=pe({type:t,selectors:[["stamp-card-tutorial"]],viewQuery:function(e,i){if(1&e&&($e(PAt,5),$e(IAt,5)),2&e){let r;je(r=He())&&(i.stampCardTutorialSteps=r.first),je(r=He())&&(i.arrows=r)}},inputs:{showFirstStep:"showFirstStep"},outputs:{stampCardTutorialClose:"stampCardTutorialClose"},decls:26,vars:18,consts:[[1,"stamp-card-tutorial__steps__container"],[1,"stamp-card-tutorial__steps"],["stampCardTutorialSteps",""],["class","stamp-card-tutorial__step__container",4,"ngIf"],[1,"stamp-card-tutorial__step__container"],[1,"stamp-card-tutorial__step"],[1,"stamp-card__tutorial--icon",3,"icon"],[1,"stamp-card-tutorial__step__arrow"],["stampCardTutorialStepsArrow",""],["data-cy","stampCardTutorialButton",1,"stamp-card-tutorial-button",3,"bclass","buttonModifier","click"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1,2),U(3,MAt,7,4,"div",3),p(4,"div",4)(5,"span",5),H(6),V(7,"translate"),m(),B(8,"icon-component",6)(9,"animated-arrow",7,8),m(),p(11,"div",4)(12,"span",5),H(13),V(14,"translate"),m(),B(15,"icon-component",6)(16,"animated-arrow",7,8),m(),p(18,"div",4)(19,"span",5),H(20),V(21,"translate"),m(),B(22,"icon-component",6),m(),p(23,"button-text",9),Y("click",function(){return i.closeTutorial()}),H(24),V(25,"translate"),m()()()),2&e&&(d(3),l("ngIf",i.showFirstStep),d(3),se($(7,10,"SHOP.STAMP_CARD.TUTORIAL_STEP_TWO")),d(2),l("icon",i.iconNames.STAMP_MONEY_TUTORIAL),d(5),se($(14,12,"SHOP.STAMP_CARD.TUTORIAL_STEP_THREE")),d(2),l("icon",i.iconNames.STAMP_TUTORIAL),d(5),se($(21,14,"SHOP.STAMP_CARD.TUTORIAL_STEP_FOUR")),d(2),l("icon",i.iconNames.STAMP_STOPWATCH_TUTORIAL),d(),l("bclass","stamp-card-tutorial-button__bclass")("buttonModifier",i.buttonModifiers.BUTTON_ATTENTION),d(),se($(25,16,"BUTTON.GOT_IT")))},dependencies:[Ne,Dn,pn,nj,qe],styles:[".stamp-card-tutorial__step__container[_ngcontent-%COMP%]{opacity:0;position:relative;justify-content:space-between;height:20%;width:100%;font-size:3rem;display:flex;align-items:center;border-radius:.8rem;border:2px dashed;font-weight:700;font-size:2.5vh;margin:2.5rem;padding:4.5rem}.stamp-card-tutorial__step__container[_ngcontent-%COMP%]:nth-child(odd) > .stamp-card-tutorial__step[_ngcontent-%COMP%]{text-align:left}.stamp-card-tutorial__step__container[_ngcontent-%COMP%]:nth-child(2n+2){flex-direction:row-reverse}.stamp-card-tutorial__step__container[_ngcontent-%COMP%]:nth-child(2n+2) > .stamp-card-tutorial__step[_ngcontent-%COMP%]{text-align:right}.stamp-card-tutorial__step__container.stamp-card-tutorial__step__completed[_ngcontent-%COMP%]{opacity:1}.stamp-card-tutorial__step__container.stamp-card-tutorial__step__current[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_show-tutorial-step;animation-duration:.5s;animation-delay:.5s;animation-timing-function:ease-out}@media screen and (max-width: 480px){.stamp-card-tutorial__step__container[_ngcontent-%COMP%]{padding:2.5rem;margin:2.5rem;font-size:2.2vh}}@media screen and (max-width: 380px){.stamp-card-tutorial__step__container[_ngcontent-%COMP%]{height:19%;padding:2rem}}@media screen and (max-width: 320px){.stamp-card-tutorial__step__container[_ngcontent-%COMP%]{padding:1.5rem;margin:1rem}}@media screen and (max-height: 640px){.stamp-card-tutorial__step__container[_ngcontent-%COMP%]{margin:1.5rem!important}}.stamp-card-tutorial-button[_ngcontent-%COMP%]{width:100%;opacity:0}.stamp-card-tutorial-button.stamp-card-tutorial__step__completed[_ngcontent-%COMP%]{opacity:1}.stamp-card-tutorial-button.stamp-card-tutorial__step__current[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_show-tutorial-step;animation-duration:.5s;animation-delay:.5s;animation-timing-function:ease-out}.stamp-card-tutorial__steps__container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:2;background-color:rgba(0,0,0,.9)}@keyframes _ngcontent-%COMP%_show-tutorial-step{0%{opacity:0}to{opacity:1}}.stamp-card-tutorial__steps__container[_ngcontent-%COMP%]{width:100%;height:100%}.stamp-card-tutorial__steps[_ngcontent-%COMP%]{height:80%;width:80%;margin:10%;display:flex;flex-direction:column;justify-content:center;align-items:center}@media screen and (max-width: 440px){.stamp-card-tutorial__steps[_ngcontent-%COMP%]{height:90%;width:90%;margin:5%}}@media screen and (max-width: 380px){.stamp-card-tutorial__steps[_ngcontent-%COMP%]{height:94%;width:94%;margin:3%}}.stamp-card-tutorial__step[_ngcontent-%COMP%]{max-width:70%}.stamp-card-tutorial__step__arrow[_ngcontent-%COMP%]{position:absolute;bottom:0;transform:translate(-50%,100%);padding:1rem 0;left:50%;height:5rem}@media screen and (max-width: 320px){.stamp-card-tutorial__step__arrow[_ngcontent-%COMP%]{display:none}}@media screen and (max-height: 640px){.stamp-card-tutorial__step__arrow[_ngcontent-%COMP%]{display:none}}.stamp-card__tutorial--icon[_ngcontent-%COMP%]{font-size:7vh}"],changeDetection:0}),n})();const OAt=["stampCardComponent"];function EAt(t,n){if(1&t){const o=Ce();p(0,"stamp-card",2,3),Y("stampCardClaim",function(){return oe(o),re(_().claim())})("stampCardTutorialClick",function(){return oe(o),re(_().showStampCardTutorial())}),m()}if(2&t){const o=_();l("timerConfig",o.timerConfig)("stampCardState",o.stampCardState)("currentStampIndex",o.lastSeenAnimation)}}function xAt(t,n){if(1&t){const o=Ce();p(0,"stamp-card-tutorial",4),Y("click",function(){return oe(o),re(_().closeStampCardTutorial())})("stampCardTutorialClose",function(){return oe(o),re(_().closeStampCardTutorial())}),m()}if(2&t){const o=_();l("showFirstStep",o.stampCardState.isActive()&&o.stampCardState.model.stampsToStart>0)}}let Mye=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.store=e,this.stampCardService=i,this.destroyRef=r,this.cdr=s,this.stampCardComponentService=a,this.miniGamesBuilderFactory=c,this.animationService=u,this.toaster=h,this.playerCtx=b,this.isStampCardShowed=new ke,this.timerConfig=new yl(D_).useMonthsConfig({min:Rt.Days,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useDaysConfig({min:Rt.Hours,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).build(),this.currentPlayContext=this.playerCtx.getCurrent()}ngAfterViewInit(){const e=this.store.stampCard.subscribeStampCardState().pipe(mi(this.destroyRef));e.pipe(Qi(1),bt(i=>i.isActive())).subscribe(i=>{this.lastSeenAnimation=Math.max(this.stampCardComponentService.getStampCardLastSeenAnimation(),i.model.stampsToStart-1),this.cdr.detectChanges()}),e.subscribe(i=>{this.stampCardState=i,this.cdr.detectChanges()}),e.pipe(jn(()=>this.isStampCardShown()),ws()).subscribe(i=>{this.isStampCardShowed.emit(i)}),e.pipe(bt(i=>i.isActive()&&i.model.status!==bl.Claimed),jn(i=>i.model.collectedStamps),ws((i,r)=>i===r),es(()=>this.store.paymentsClient.subscribeActiveTransactions().pipe(Ime(i=>i.length>0),Qi(1)))).subscribe(()=>{this.playStampCardCollectAnimation()}),this.playerCtxListener=this.playerCtx.onContextChange(i=>{this.currentPlayContext=i.current,this.cdr.detectChanges()}),this.stampCardComponentService.isStampCardTutorialWatched()||this.showStampCardTutorial()}ngOnDestroy(){var e,i;null===(e=this.miniGame)||void 0===e||e.destroy(),null===(i=this.playerCtxListener)||void 0===i||i.detach()}showStampCardTutorial(){this.isTutorialShown=!0,this.stampCardComponentService.setStampCardTutorialWatched()}closeStampCardTutorial(){this.isTutorialShown=!1}isStampCardShown(){var e,i;return(this.stampCardState&&(null===(e=this.stampCardState.model)||void 0===e?void 0:e.status)===bl.Claimed&&this.isClaimedInThisLifecycle||(null===(i=this.stampCardState)||void 0===i?void 0:i.isActive())&&this.stampCardState.model.status!==bl.Claimed)&&this.currentPlayContext!==ba.InGame}claim(){this.stampCardState.model.status===bl.Ready&&(this.stampCardState.model.reward.miniGame?(this.miniGame=this.miniGamesBuilderFactory.createBuilder().withGameInfo(this.stampCardState.model.reward.miniGame).withDefaultDestroyConditions().withRetry().build(),Ju(this.miniGame.error,this.miniGame.close).pipe(Qi(1),mi(this.destroyRef)).subscribe(()=>this.miniGame.destroy()),this.miniGame.claim.pipe(Qi(1),mi(this.destroyRef)).subscribe(()=>{this.claimReward(this.stampCardState.model.reward.miniGame.reward)}),this.miniGame.start()):this.claimReward(this.stampCardState.model.reward.items))}playStampCardCollectAnimation(){var e=this;return f(function*(){try{var i;null===(i=e.currentAnimationCancelablePromise)||void 0===i||i.cancel(),e.currentAnimationPromise&&(e.currentAnimationCancelablePromise=new Jn(e.currentAnimationPromise),yield e.currentAnimationCancelablePromise),e.currentAnimationPromise=new Promise(function(){var r=f(function*(s,a){try{const c=e.stampCardState.model.status;c===bl.Ready&&e.stampCard.openStampCard(),yield e.stampCard.playCollectStampAnimationChain({currentStampIndex:e.lastSeenAnimation,targetStampIndex:e.stampCardState.model.collectedStamps-1}),e.lastSeenAnimation=e.stampCardState.model.collectedStamps-1,c===bl.Ready&&(yield e.stampCard.playStampCardFullAnimation()),e.cdr.detectChanges(),s()}catch(c){a(c)}});return function(s,a){return r.apply(this,arguments)}}()),yield e.currentAnimationPromise}catch(r){console.warn(r)}})()}claimReward(e){return this.isClaimedInThisLifecycle=!0,this.stampCardService.claimReward().then(()=>{var i;null===(i=this.stampCard)||void 0===i||i.closeStampCard();const r=dr.buildCurrencyTypes(e);this.animationService.playAnimations(r)}).catch(i=>{console.warn(i),this.toaster.error("ERRORS.CONNECTION_ERROR")})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(oH),g(br),g(Re),g(JC),g(dI),g(Fc),g(Dt),g(ic))},t.\u0275cmp=pe({type:t,selectors:[["stamp-card-wrappper"]],viewQuery:function(e,i){if(1&e&&$e(OAt,5),2&e){let r;je(r=He())&&(i.stampCard=r.first)}},outputs:{isStampCardShowed:"isStampCardShowed"},decls:2,vars:2,consts:[[3,"timerConfig","stampCardState","currentStampIndex","stampCardClaim","stampCardTutorialClick",4,"ngIf"],[3,"showFirstStep","click","stampCardTutorialClose",4,"ngIf"],[3,"timerConfig","stampCardState","currentStampIndex","stampCardClaim","stampCardTutorialClick"],["stampCardComponent",""],[3,"showFirstStep","click","stampCardTutorialClose"]],template:function(e,i){1&e&&U(0,EAt,2,3,"stamp-card",0)(1,xAt,1,1,"stamp-card-tutorial",1),2&e&&(l("ngIf",i.isStampCardShown()),d(),l("ngIf",i.isTutorialShown&&i.isStampCardShown()))},dependencies:[Ne,fye,Iye],encapsulation:2,changeDetection:0}),n})();var rH=ve.EIcons;const AAt=["scrollContainer"],RAt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),kAt=t=>[t];function LAt(t,n){1&t&&B(0,"empty-content",5),2&t&&l("textArray",ne(2,kAt,pt(1,RAt)))}function DAt(t,n){1&t&&B(0,"loader-image",6),2&t&&l("transparentBG",!0)}function BAt(t,n){if(1&t){const o=Ce();p(0,"div",13)(1,"top-tab-item",14),Y("select",function(i){return oe(o),re(_(2).changeCategory(i))}),p(2,"button-text",15),H(3),V(4,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(2);d(),l("tabId",o.id),d(),l("bclass","shop__top-tabs__bclass"+(e.tabs.current===o.id?" shop__top-tabs__bclass__selected":"")),Hn("data-cy","storeTab"+o.id),d(),ze(" ",$(4,4,o.text.key)," ")}}const NAt=t=>({"with-stamp-card":t}),FAt=t=>({"shop__request--donation":t});function UAt(t,n){if(1&t){const o=Ce();p(0,"div",7)(1,"top-tabs",8),U(2,BAt,5,6,"div",9),m(),B(3,"shop-text-title",10),p(4,"div",11,12),Y("swipeAction",function(i){return oe(o),re(_().handleGesture(i))}),B(6,"router-outlet"),m()()}if(2&t){const o=_();l("ngClass",ne(12,NAt,o.isStampCardShown&&!o.shouldHideStampCard())),d(),l("initialOpenedTab",o.tabs.current)("scrollStyleCustomClass","shop__top-tabs__scroll")("scrollBarCustomClass","shop__top-tabs__scrollbar")("showBackButton",!1),d(),l("ngForOf",o.tabs.list)("ngForTrackBy",o.trackById),d(),l("shopUsageIntent",o.shopState.usageIntent.type)("tabId",o.tabs.current)("isMyShopData",o.isMyShopData)("currentUser",o.currentUser),d(),l("ngClass",ne(14,FAt,o.shopState.usageIntent.type===o.EShopUsageIntent.RequestClubDonation))}}function GAt(t,n){if(1&t){const o=Ce();p(0,"stamp-card-wrappper",16),Y("isStampCardShowed",function(i){return oe(o),re(_().handleStampCardStateChange(i))}),m()}}const VAt=t=>({"shop__popup-outlet":t});let sH=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge){this.payments=me,this.brazeEngagementService=ge,this.contextEnum=Wr,this.isNavigationVisible=!0,this.EShopUsageIntent=ci,this.EShopCategories=wt,this.tabs={current:void 0,list:[]},this.asyncComponentState=Jr,this.subscriptions=new ie.List,this.services={sound:e,shop:i,route:r,navigation:s,permissions:a,deltaDNA:c,analytics:le,app:u,store:h,userRepository:b,toast:w,analyticsTracking:R,gamesState:G,inventory:te},this.analyticsDevicePlatform=new Ap,this.activatedComponentRoute=K,this.constants=ee}ngOnInit(){const e=this.services.store.shop[this.services.shop.shopType].selectState();this.services.shop.markShopAsOpened({receiver:e.receiver,usageIntent:e.usageIntent}),this.shopState=e,this.isMyShopData=this.services.shop.isCurrentUserReceiver(),this.load(),this.subscribeForEvents()}ngOnDestroy(){this.removeSubscriptions(),this.services.shop.closeShop(),this.fetchShopPromise&&this.fetchShopPromise.cancel(),this.fetchShopRetryablePromise&&this.fetchShopRetryablePromise.cancel(),this.happyHourSubscription&&this.happyHourSubscription.unsubscribe(),cancelAnimationFrame(this.scrollRaf)}load(){var e=this;return f(function*(){try{var i;e.state=Jr.Pending,yield e.loadShop(),null===(i=e.happyHourSubscription)||void 0===i||i.unsubscribe(),e.happyHourSubscription=e.services.shop.happyHourChangedState.subscribe(f(function*(){return yield e.load()}))}catch(r){console.warn(r),e.services.app.isMobileApp()?e.services.navigation.closeOutlets(new ie.List([Fn])).catch(s=>{console.error(s)}):e.onShopFetchError()}})()}buildView(){var e=this;return f(function*(){try{const i=e.services.store.selectUserState().profile,r=e.services.route.snapshot.params.id||i.id,s=!r||r===i.id,a=new Lo(history.state.shopReceiver)||e.services.shop.shopReceiver.profile;let c,u;s?(c=i,u=e.services.store.selectUserState().gameInventory):(c=a&&a.id===r?a:(yield e.services.userRepository.getSimpleProfiles([r],!1))[0],u={items:[]}),e.services.shop.shopReceiver={profile:c,gameInventory:u},e.currentUser=c,e.tabs.list=e.buildTabs(s?hs.Own:hs.OtherPlayer),e.tabs.current=e.parseCurrentTabFromPath()||e.tabs.current,e.buildShopRequestText(e.tabs.current),e.state=Jr.Ready,e.services.deltaDNA.storeOpenedEngage(),e.brazeEngagementService.storeOpenedEngage();const h=new Tl.ShopEnteredEvent(Nn.Shop,"entered",{shopID:h5.Shop,shopName:"UNKNOWN",shopType:e.tabs.current,platform:e.analyticsDevicePlatform.getPlatform(),userLevel:e.services.store.selectUserState().profile.level});e.services.analytics.sendEvent(h)}catch(i){console.warn(i),e.services.toast.error("ERRORS.CONNECTION_ERROR"),e.services.navigation.navigate([e.constants.defaultLoggedRoute])}})()}buildTabs(e){const i=this.services.inventory,r=new ie.List,s=new ie.List,a=this.services.store.shop[this.services.shop.shopType].selectState().model.products,c=new ie.UniqueList(uye);c.findById(wt.Inventory).hidden=!a.find(w=>i.isInventoryType(w.item.type)),new ie.List(a).where(w=>!i.isInventoryType(w.item.type)||i.isInventoryCategoryInGeneralTabs(w.group)).forEach(w=>{const R=w.group,G=c.find(K=>!!K.shopItemCategories.find(te=>te===R));G&&!s.has(G.id)&&s.add(G.id)}),s.concat(new ie.List(tH)),lye.forEach((w,R)=>{const G=s.find(K=>K===w);G&&r.insertAt(R,G)});const u=this.services.app.getPlatform(),h=this.services.app.getDevicePlatform();return r.where(w=>{const R=c.findById(w);return!(R.permissions&&!this.services.permissions.getActionPermission(R.permissions.module,R.permissions.action).isPermitted||R.hidden||void 0===R.visibleInProfile.find(G=>G===e)||void 0===R.visibleInPlatforms.find(G=>G===u)||!R.visibleInUsageIntents.find(G=>G===this.shopState.usageIntent.type)||h&&void 0===R.visibleInDevicePlatforms.find(G=>G===h))}).map(w=>({id:w,icon:cye[w]||ve.EIcons.CHIP,text:{key:"SHOP.TABS.".concat(w.toUpperCase())},highlighted:w===wt.Promo})).toArray()}onShopFetchError(){var e=this;return f(function*(){e.state=Jr.Failed,e.fetchShopRetryablePromise=new T_(e.requestShop.bind(e),{retryDelayMs:wP,maxRetriesCount:1/0});try{e.buildView()}catch(i){console.log(i)}})()}handleStampCardStateChange(e){this.isStampCardShown=e}requestShop(){var e=this;return f(function*(){const i=e.services.gamesState.getCurrentGameState();return(yield Promise.all([e.payments.completeUnfinishedTransactions(),e.services.shop.load({gameId:i?i.id:void 0,useCache:!1})]))[1]})()}changeCategory(e){var i=this;return f(function*(){if(i.tabs.current!==e)try{yield i.services.navigation.navigate([e],{relativeTo:i.services.route}),i.tabs.current=e,i.buildShopRequestText(e),i.scrollToTop();const r=new aa.DefaultEvent(Nn.Navigation,"shop:{0}",{label:"shopTab:".concat(e),typeArgs:{userId:i.services.route.snapshot.params.id}});i.services.analyticsTracking.sendEvent(r)}catch(r){console.error("Shop changeCategory navigation error:",r)}})()}handleGesture(e){const i=new ie.List(this.tabs.list),r=i.toArray().findIndex(c=>c.id===this.tabs.current)||0,s=i.get(r);let a;switch(e){case sa.Right:a=s.id===i.first().id?i.last().id:i.get(r-1).id,this.changeCategory(a),this.services.sound.play(dn.ClickTab);break;case sa.Left:a=s.id===i.last().id?i.first().id:i.get(r+1).id,this.changeCategory(a),this.services.sound.play(dn.ClickTab)}}trackById(e,i){return i.id}getIsLoading(){return this.state===Jr.Pending}shouldHideStampCard(){return this.tabs.current===wt.GiftablePacks}buildShopRequestText(e){switch(e){case wt.Currency:if(this.services.store.selectSimpleProfile().vip.hasTierOrHigher(Fi.Full)){this.shopRequestText=void 0;break}this.shopRequestText={tabId:e,icon:rH.CHIP,amount:this.services.store.selectUserState().wallet.chips,vipBonusPercentage:100*(this.shopState.model.vipBonusMultiplier-1)};break;case wt.Gems:this.shopRequestText={tabId:e,icon:rH.ICON_GEMS,amount:this.services.store.selectUserState().wallet.gems};break;case wt.Vip:if(this.isMyShopData&&!this.services.store.selectSimpleProfile().vip.currentTier()){this.shopRequestText=void 0;break}const i=this.services.store.selectSimpleProfile().vip;this.shopRequestText={tabId:e,icon:i.hasTierOrHigher(Fi.Full)?rH.CROWN:void 0,text:i.hasTierOrHigher(Fi.Premium)&&!i.hasTierOrHigher(Fi.Full)?{key:"SHOP.ITEMS.PREMIUM"}:void 0,amount:this.services.store.selectUserState().profile.vip.currentTier().remainingTime()};break;default:this.shopRequestText=void 0}}scrollToTop(){this.scrollRaf=requestAnimationFrame(()=>{this.scrollCont&&(this.scrollCont.nativeElement.scrollTop=0)})}removeSubscriptions(){this.subscriptions.forEach(e=>e.unsubscribe())}subscribeForEvents(){this.subscriptions.add(this.services.navigation.events.pipe(bt(e=>{var i;return e instanceof as&&!(null===(i=this.shopState)||void 0===i||!i.model)})).subscribe(this.onNavigationEnd.bind(this))),this.subscriptions.add(this.services.store.shop[this.services.shop.shopType].subscribeState().subscribe(e=>this.shopState=e)),this.subscriptions.add(this.services.store.clubs.subscribeClubProfileId().pipe(aye(),jn(e=>({previousClubId:e[0],currentClubId:e[1]}))).subscribe(e=>{this.shopState.usageIntent.type===ci.RequestClubDonation&&e.previousClubId===this.shopState.usageIntent.data.id&&!e.currentClubId&&this.services.navigation.closeSecondaryOutlets()})),this.isMyShopData&&this.subscriptions.add(this.services.store.subscribeVipState().pipe(ws((e,i)=>{var r,s;return(null==e?void 0:e.isActiveSubscription())===(null==i?void 0:i.isActiveSubscription())&&(null==e||null===(r=e.custom)||void 0===r||null===(r=r.subscription)||void 0===r?void 0:r.item)===(null==i||null===(s=i.custom)||void 0===s||null===(s=s.subscription)||void 0===s?void 0:s.item)})).subscribe(e=>{this.buildShopRequestText(this.tabs.current)}))}onNavigationEnd(e){this.tabs.current=this.parseCurrentTabFromPath(),this.buildShopRequestText(this.tabs.current)}parseCurrentTabFromPath(){return _2()(this.services.route.snapshot.children,"[0].url[0].path")}requestDailyDeal(){return this.services.shop.loadDailyDeal()}loadShop(){var e=this;return f(function*(){e.fetchShopPromise=new Jn(e.requestShop()),yield e.fetchShopPromise,yield Promise.all([e.requestDailyDeal().catch(i=>console.warn(i)),e.services.shop.getFirstPurchaseBundleOffer().catch(i=>console.warn(i))]),e.fetchShopPromise=void 0,e.buildView()})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mo),g(Ko),g(Po),g(Yt),g(Ti),g(sl),g(Qt),g(J),g(ed),g(Dt),g(yi),g(Zn),g(Pr),g(cc),g(tn),g(yi),g(wue),g(cl))},t.\u0275cmp=pe({type:t,selectors:[["shop"]],viewQuery:function(e,i){if(1&e&&$e(AAt,5),2&e){let r;je(r=He())&&(i.scrollCont=r.first)}},features:[mn([ia,{provide:Ko,useExisting:Gh}])],decls:5,vars:7,consts:[[1,"shop__wrapper",3,"ngClass"],[3,"textArray",4,"ngIf"],[3,"transparentBG",4,"ngIf"],["class","shop__container--main",3,"ngClass",4,"ngIf"],[3,"isStampCardShowed",4,"ngIf"],[3,"textArray"],[3,"transparentBG"],[1,"shop__container--main",3,"ngClass"],[1,"shop__tabs--redesign",3,"initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass","showBackButton"],["class","tab",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop__text-title",3,"shopUsageIntent","tabId","isMyShopData","currentUser"],["swipe-directive","",1,"shop__container--router-outlet",3,"ngClass","swipeAction"],["scrollContainer",""],[1,"tab"],[3,"tabId","select"],[1,"top-tabs__list-item--navigation",3,"bclass"],[3,"isStampCardShowed"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,LAt,1,4,"empty-content",1)(2,DAt,1,1,"loader-image",2)(3,UAt,7,16,"div",3)(4,GAt,1,0,"stamp-card-wrappper",4),m()),2&e&&(l("ngClass",ne(5,VAt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(),l("ngIf",!i.getIsLoading()&&i.state===i.asyncComponentState.Failed),d(),l("ngIf",i.getIsLoading()),d(),l("ngIf",!i.getIsLoading()&&i.state===i.asyncComponentState.Ready),d(),l("ngIf",!i.getIsLoading()&&!i.shouldHideStampCard()))},dependencies:[Xe,Mt,Ne,bo,kl,dl,pn,Oi,wu,Ip,pye,Mye,qe],styles:[".shop__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;width:100%;height:100%}.shop__container--main[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:column nowrap}.shop__container--main.with-stamp-card[_ngcontent-%COMP%]{padding-bottom:15rem}.shop__container--router-outlet[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;width:100%;position:relative;height:auto;flex:1}"]}),n})();function zAt(t,n){if(1&t&&(p(0,"span",2),H(1),m()),2&t){const o=_();l("ngClass",o.itemGroup),d(),se(o.secondValue)}}const jAt=t=>({first:t});let Oye=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["shop-item-title"]],inputs:{itemGroup:"itemGroup",value:"value",secondValue:"secondValue"},decls:3,vars:8,consts:[[3,"ngClass"],["class","shop-item-component__title second",3,"ngClass",4,"ngIf"],[1,"shop-item-component__title","second",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"span",0),H(1),m(),U(2,zAt,2,2,"span",1)),2&e&&(ni("shop-item-component__title ",i.itemGroup,""),l("ngClass",ne(6,jAt,void 0!==i.secondValue)),d(),se(i.value),d(),l("ngIf",i.secondValue))},dependencies:[Xe,Ne],styles:["[_nghost-%COMP%]{display:block;text-align:center;width:100%;height:100%}\n\n/*# sourceMappingURL=shop-item-title.component.ts-angular-inline--13.css.map*/"],changeDetection:0}),n})();function HAt(t,n){1&t&&B(0,"loader-image",18),2&t&&l("transparentBG",!1)("loaderImageClass","sic__spinner--cmp")}function qAt(t,n){1&t&&B(0,"div",19)}function WAt(t,n){if(1&t&&(p(0,"div",20),B(1,"shop-item-title",21),m()),2&t){const o=_();d(),l("value",o.title)("secondValue",o.secondTitle)("itemGroup",o.clientStoreProduct.group)}}function $At(t,n){1&t&&B(0,"img",22),2&t&&l("imgSrc",_().imageUrl)}const KAt=(t,n)=>({deck:t,table:n});function ZAt(t,n){if(1&t&&B(0,"item-component",23),2&t){const o=_();l("ngClass",cn(3,KAt,o.clientStoreProduct.item.type===o.EItemType.Deck,o.clientStoreProduct.item.type===o.EItemType.Table))("item",o.clientStoreProduct.item)("showBling",!1)}}const QAt=()=>({isPriority:!0});function YAt(t,n){if(1&t&&B(0,"spritesheet-image-animation",24),2&t){const o=_();l("animation",pt(2,QAt))("spritesheet",o.spritesheet)}}function JAt(t,n){if(1&t&&(p(0,"div",25),B(1,"number",26),m()),2&t){const o=_();d(),l("value",o.coinShards)}}function XAt(t,n){if(1&t&&(p(0,"div",27),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se($(2,1,o.description))}}const eRt=t=>({none:t});function tRt(t,n){if(1&t&&B(0,"number",28),2&t){const o=_();l("ngClass",ne(2,eRt,0===o.clientStoreProduct.count))("value",o.clientStoreProduct.count)}}function nRt(t,n){if(1&t&&B(0,"item-buy-button",29),2&t){const o=_();l("clientStoreProduct",o.clientStoreProduct)("disabled",o.isDisabled)("gameId",o.gameId)}}function iRt(t,n){if(1&t&&(p(0,"button-text",30),H(1),V(2,"translate"),m()),2&t){const o=_();l("disabled",o.isDisabled)("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),ze(" ",$(2,3,"CLUBS.REQUEST")," ")}}function oRt(t,n){if(1&t&&(p(0,"button-text",31),H(1),V(2,"translate"),m()),2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_DONATE)("disabled",o.isLoading),d(),ze(" ",$(2,3,"BUTTON.DONATE")," ")}}function rRt(t,n){if(1&t&&B(0,"shop-item-product-flag",32),2&t){const o=_();l("flags",o.clientStoreProduct.flags)("offer",o.clientStoreProduct)("isRibbon",!0)}}let XC=(()=>{var t;class n{constructor(){this.isLoading=!1,this.isDisabled=!1,this.durabilityType=Fe.XM,this.EShopUsageIntent=ci,this.buttonModifier=ve.EButtonModifier,this.EItemType=Fe.TG,this.select=new ke,this.disableClick=new ke}selectItem(){this.isDisabled||this.select.next(this.clientStoreProduct)}clickDisabled(){this.isDisabled&&this.disableClick.next(this.clientStoreProduct)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["shop-item-container"]],hostAttrs:[1,"sic-host-class"],inputs:{clientStoreProduct:"clientStoreProduct",gameId:"gameId",imageUrl:"imageUrl",spritesheet:"spritesheet",description:"description",title:"title",coinShards:"coinShards",secondTitle:"secondTitle",class:"class",shopUsageIntent:"shopUsageIntent",isLoading:"isLoading",isDisabled:"isDisabled",itemData:"itemData"},outputs:{select:"select",disableClick:"disableClick"},decls:18,vars:15,consts:[["debounce-click","",1,"sic__container",3,"leading","ngClass","debounceClick"],["class","sic__spinner--cmp",3,"transparentBG","loaderImageClass",4,"ngIf"],["class","sic__icon",4,"ngIf"],["class","sic__title",4,"ngIf"],[1,"sic__image-container"],[1,"sic__image-wrapper"],["class","sic__image","empty-placeholder","",3,"imgSrc",4,"ngIf"],["class","sic__item-component","empty-placeholder","",3,"ngClass","item","showBling",4,"ngIf"],["class","sic__spritesheet",3,"animation","spritesheet",4,"ngIf"],["class","sic__container--club-points",4,"ngIf"],["class","sic__description",4,"ngIf"],["class","sic__giftable-item--count",3,"ngClass","value",4,"ngIf"],[1,"sic__button"],[3,"clientStoreProduct","disabled","gameId",4,"ngIf"],["class","sic__button--request",3,"disabled","buttonModifier",4,"ngIf"],["class","sic--donate-button",3,"buttonModifier","disabled",4,"ngIf"],[1,"sic__container__flag"],[3,"flags","offer","isRibbon",4,"ngIf"],[1,"sic__spinner--cmp",3,"transparentBG","loaderImageClass"],[1,"sic__icon"],[1,"sic__title"],[3,"value","secondValue","itemGroup"],["empty-placeholder","",1,"sic__image",3,"imgSrc"],["empty-placeholder","",1,"sic__item-component",3,"ngClass","item","showBling"],[1,"sic__spritesheet",3,"animation","spritesheet"],[1,"sic__container--club-points"],[3,"value"],[1,"sic__description"],[1,"sic__giftable-item--count",3,"ngClass","value"],[3,"clientStoreProduct","disabled","gameId"],[1,"sic__button--request",3,"disabled","buttonModifier"],[1,"sic--donate-button",3,"buttonModifier","disabled"],[3,"flags","offer","isRibbon"]],template:function(e,i){if(1&e&&(p(0,"section",0),Y("debounceClick",function(){return i.selectItem()})("debounceClick",function(){return i.clickDisabled()}),U(1,HAt,1,2,"loader-image",1)(2,qAt,1,0,"div",2)(3,WAt,2,3,"div",3),p(4,"div",4)(5,"div",5),U(6,$At,1,1,"img",6)(7,ZAt,1,6,"item-component",7)(8,YAt,1,3,"spritesheet-image-animation",8),m()(),U(9,JAt,2,1,"div",9)(10,XAt,3,3,"div",10)(11,tRt,1,4,"number",11),p(12,"div",12),U(13,nRt,1,3,"item-buy-button",13)(14,iRt,3,5,"button-text",14)(15,oRt,3,5,"button-text",15),m(),p(16,"div",16),U(17,rRt,1,3,"shop-item-product-flag",17),m()()),2&e){let r,s,a;l("leading",!0)("ngClass",i.class),d(),l("ngIf",i.isLoading),d(),l("ngIf",i.clientStoreProduct.item.durability===i.durabilityType.Expireable&&!i.clientStoreProduct.owned&&(null===(r=null==i.itemData?null:i.itemData.showItemDurability)||void 0===r||r)),d(),l("ngIf",i.title),d(3),l("ngIf",!(i.spritesheet||null!=i.itemData&&i.itemData.showItemsValue)),d(),l("ngIf",!i.spritesheet&&(null==i.itemData?null:i.itemData.showItemsValue)),d(),l("ngIf",i.spritesheet),d(),l("ngIf",i.coinShards),d(),l("ngIf",i.description),d(),l("ngIf",null==i.itemData?null:i.itemData.withCount),d(2),l("ngIf",(!i.shopUsageIntent||(null==i.shopUsageIntent?null:i.shopUsageIntent.type)===i.EShopUsageIntent.BuyItems)&&(null===(s=i.clientStoreProduct.canBuy)||void 0===s||s)),d(),l("ngIf",i.shopUsageIntent&&i.shopUsageIntent.type===i.EShopUsageIntent.RequestClubDonation),d(),l("ngIf",(null==i.shopUsageIntent?null:i.shopUsageIntent.type)===i.EShopUsageIntent.DonateItems),d(2),l("ngIf",!i.clientStoreProduct.owned&&i.clientStoreProduct.flags&&(null===(a=null==i.itemData?null:i.itemData.withFlags)||void 0===a||a))}},dependencies:[Xe,Ne,Zh,Qr,pn,Oi,Uh,$o,wR,av,Oye,Yw,qe],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.sic__container[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column nowrap;height:100%;width:100%;padding:1rem;cursor:pointer;overflow:visible;min-height:inherit}.sic__icon[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:3.5rem;height:3.5rem;display:flex;justify-content:center;align-items:center}.sic__image-container[_ngcontent-%COMP%]{margin:2rem 0 .5rem;flex:1;position:relative}.sic__container--club-points[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;margin:.5rem 0}.sic__image-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.sic__image[_ngcontent-%COMP%], .sic__spritesheet[_ngcontent-%COMP%]{max-height:100%;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%);position:relative}.sic__description[_ngcontent-%COMP%]{text-align:center;font-size:1.4rem;padding:1rem}.sic__button[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center}.sic__button--request[_ngcontent-%COMP%]{width:100%;padding:0 1rem}.sic--donate-button[_ngcontent-%COMP%]{width:100%}.sic__item-component[_ngcontent-%COMP%]{display:block}.sic__giftable-item--count[_ngcontent-%COMP%]{min-width:60px}@media screen and (max-width: 568px){.sic__giftable-item--count[_ngcontent-%COMP%]{min-width:50px}}"]}),n})();var aRt=nt.EPermissionModule,cRt=nt.EModuleAction;let Eye=(()=>{var t;class n{constructor(e,i,r){this.permissionsService=e,this.navigation=i,this.constants=r}canActivate(e,i){const r=this.permissionsService.getActionPermission(aRt.Shop,cRt.Open);return!!r.isPermitted||(this.navigation.isFirstNavigation(this.navigation.getCurrentNavigation().previousNavigation)?this.navigation.parseUrl(this.constants.defaultLoggedRoute):(this.permissionsService.showFailedRequirementsToUser(r),!1))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Pi),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var hRt=ve.EButtonModifier;function mRt(t,n){if(1&t&&B(0,"input",10),2&t){const o=n.$implicit;l("formControlName",o.name),Hn("maxlength",o.length)}}function fRt(t,n){1&t&&(p(0,"div",11)(1,"p",12),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"PROMO_CODES.PROMO_CODES_ERROR")))}let xye=(()=>{var t;class n{constructor(e){this.buttonModifier=hRt,this.redeemPromoCode=new ke,this.formBuilder=e,this.formError=!1}ngOnInit(){this.promoObject=this.buildPromoObject(),this.promoCodeForm=this.createForm(),this.code&&this.promoObject.forEach(e=>{this.promoCodeForm.setValue({[e.name]:this.code})})}buyItem(){if(!gc.isFormValid(this.promoCodeForm))return this.formErrors();this.formError=!1;let e="";for(let i in this.promoCodeForm.value)this.promoCodeForm.value.hasOwnProperty(i)&&(e+=this.promoCodeForm.value[i]);this.redeemPromoCode.emit(e.toLowerCase())}moveFocus(e){let i=e.target,r=i.value.length,s=i.maxLength,a=e.key?e.key.toLowerCase():e.keyCode;if(r>=s){let c=i.nextElementSibling;for(;c;){if("input"===c.tagName.toLowerCase()){c.focus();break}c=c.nextElementSibling}}else if(0===r&&("backspace"===a||8===a)){let c=i.previousElementSibling;for(;c;){if("input"===c.tagName.toLowerCase()){c.focus();break}c=c.previousElementSibling}}}createForm(){let e={};return this.promoObject.forEach(i=>{e[i.name]=["",[Ln.required,Ln.minLength(1),Ln.maxLength(i.length)]]}),this.formBuilder.group(e)}formErrors(){for(let e in gc.getFormErroredFields(this.promoCodeForm))if(e)for(let i in this.promoCodeForm.controls[e].errors)i&&this.promoCodeForm.controls[e].errors[i]&&(this.formError=!0)}buildPromoObject(){let e=[];for(let i=0,r=1;i<r;i++){const s=20;let a={name:null,length:null};a.name="".concat("promo").concat(i+1),a.length=s,e.push(a)}return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(td))},t.\u0275cmp=pe({type:t,selectors:[["promo-code"]],hostBindings:function(e,i){1&e&&Y("keyup",function(s){return i.moveFocus(s)})},inputs:{code:"code"},outputs:{redeemPromoCode:"redeemPromoCode"},decls:14,vars:11,consts:[["data-cy","promoCodeContainer",1,"promo-code__wrapper"],["novalidate","",1,"promo-code__container--form",3,"formGroup","submit"],[1,"promo-code__container--title"],[1,"promo-code__container--main"],[1,"promo-code__container--input"],["class","promo-code__input","data-cy","promoCodeInputField",3,"formControlName",4,"ngFor","ngForOf"],["class","promo_code__container--error",4,"ngIf"],[1,"promo-code__container--button"],["data-cy","promoCodeClaimButton",1,"promo-code__button",3,"type","buttonModifier"],[1,"promo-code__container--coins"],["data-cy","promoCodeInputField",1,"promo-code__input",3,"formControlName"],[1,"promo_code__container--error"],[1,"promo_code__text--error","input--error"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"form",1),Y("submit",function(){return i.buyItem()}),p(2,"div",2),H(3),V(4,"translate"),m(),p(5,"div",3)(6,"div",4),U(7,mRt,1,2,"input",5),m(),U(8,fRt,4,3,"div",6),m(),p(9,"div",7)(10,"button-text",8),H(11),V(12,"translate"),m()(),B(13,"div",9),m()()),2&e&&(d(),l("formGroup",i.promoCodeForm),d(2),se($(4,7,"PROMO_CODES.PROMO_CODES_ENTER")),d(4),l("ngForOf",i.promoObject),d(),l("ngIf",i.formError),d(2),l("type","submit")("buttonModifier",i.buttonModifier.BUTTON_ATTENTION),d(),se($(12,9,"PROMO_CODES.PROMO_CODES_REDEEM")))},dependencies:[Su,xb,Ql,yu,wl,Yl,Mt,Ne,pn,qe],styles:['.promo-code__wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.promo-code__container--form[_ngcontent-%COMP%]{height:100%}.promo-code__container--title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:30%;text-align:center;font-size:2.4rem}@media only screen and (max-width: 568px){.promo-code__container--title[_ngcontent-%COMP%]{font-size:1.8rem}}.promo-code__container--main[_ngcontent-%COMP%]{height:32%;padding:0 1rem}.promo-code__container--main[_ngcontent-%COMP%]   .promo-code__container--input[_ngcontent-%COMP%]{display:flex;align-items:center}.promo-code__container--main[_ngcontent-%COMP%]   .promo-code__container--input[_ngcontent-%COMP%]   .promo-code__input[_ngcontent-%COMP%]{text-transform:uppercase;min-width:0}.promo-code__container--main[_ngcontent-%COMP%]   .promo-code__container--input[_ngcontent-%COMP%]   .promo-code__input[_ngcontent-%COMP%]:not(:last-child){margin-right:1rem}.promo-code__container--main[_ngcontent-%COMP%]   .promo-code__container--input[_ngcontent-%COMP%]   .promo-code__container--dash[_ngcontent-%COMP%]{width:5%}.promo-code__container--button[_ngcontent-%COMP%]{height:16%}.promo-code__container--button[_ngcontent-%COMP%]   .promo-code__button[_ngcontent-%COMP%]{width:12rem;margin:auto}.promo-code__container--coins[_ngcontent-%COMP%]{height:22%;display:flex}.promo-code__container--coins[_ngcontent-%COMP%]:before{content:"";width:50%;transform:scaleX(-1)}.promo-code__container--coins[_ngcontent-%COMP%]:after{content:"";width:50%}']}),n})();var gRt=ve.EIcons;const _Rt=t=>({"one-row":t});function vRt(t,n){if(1&t&&(p(0,"div",5)(1,"div",6),B(2,"icon-component",7),m(),B(3,"p",8),V(4,"translate"),m()),2&t){const o=n.$implicit,e=_();l("ngClass",ne(5,_Rt,e.oneRowItems)),d(2),l("icon",e.EIcons.CHECK_ROUND),d(),l("innerHtml",$(4,3,e.modifierLocalization+o),Yn)}}const aH=t=>({"simple-styling":t});let ZM=(()=>{var t;class n{constructor(){this.simpleStyling=!1,this.oneRowItems=!1,this.EIcons=gRt}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["shop-text-list"]],hostAttrs:[1,"shop-text-list-host-container"],inputs:{title:"title",items:"items",modifierLocalization:"modifierLocalization",simpleStyling:"simpleStyling",oneRowItems:"oneRowItems"},decls:6,vars:14,consts:[[1,"shop-text-list__wrapper",3,"ngClass"],[1,"shop-text-list__container--benefits-label",3,"ngClass"],[1,"shop-text-list__text--benefits",3,"innerHtml"],[1,"shop-text-list__container--benefits-list",3,"ngClass"],["class","shop-text-list__container--benefits-list-item",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-text-list__container--benefits-list-item",3,"ngClass"],[1,"shop-text-list__container--item-text-bullet"],[1,"shop-text-list__icon--item-text-bullet",3,"icon"],[1,"shop-text-list__text--benefits-list-item-text",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),B(2,"p",2),V(3,"translate"),m(),p(4,"div",3),U(5,vRt,5,7,"div",4),m()()),2&e&&(l("ngClass",ne(8,aH,i.simpleStyling)),d(),l("ngClass",ne(10,aH,i.simpleStyling)),d(),l("innerHtml",$(3,6,i.title),Yn),d(2),l("ngClass",ne(12,aH,i.simpleStyling)),d(),l("ngForOf",i.items)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Dn,qe],styles:[".shop-text-list__wrapper[_ngcontent-%COMP%]{width:100%}.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-label[_ngcontent-%COMP%]{width:100%;min-height:5rem;display:flex;justify-content:center;align-items:center;padding:0 1rem}.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]{width:100%;flex-flow:row wrap;padding-top:.5rem}.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]{width:100%;margin-bottom:2rem;display:flex;flex-flow:row wrap;padding:0 10%}.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item.one-row[_ngcontent-%COMP%]{width:100%}@media only screen and (max-width: 768px){.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]{width:100%}}.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]   .shop-text-list__container--item-text-bullet[_ngcontent-%COMP%]{border-radius:50%;width:.5rem;height:.5rem;margin-right:.3rem;margin-top:.8rem}@media only screen and (max-width: 480px){.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]   .shop-text-list__container--item-text-bullet[_ngcontent-%COMP%]{margin-top:.6rem}}@media only screen and (max-width: 320px){.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]   .shop-text-list__container--item-text-bullet[_ngcontent-%COMP%]{margin-top:.4rem}}.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]   .shop-text-list__text--benefits-list-item-text[_ngcontent-%COMP%]{flex:1;font-size:1.8rem}@media only screen and (max-width: 480px){.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]   .shop-text-list__text--benefits-list-item-text[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 320px){.shop-text-list__wrapper[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]   .shop-text-list__text--benefits-list-item-text[_ngcontent-%COMP%]{font-size:1.2rem}}.shop-text-list__container--benefits-label[_ngcontent-%COMP%]{width:100%;height:5rem;display:flex;justify-content:center;align-items:center}.shop-text-list__container--benefits-list[_ngcontent-%COMP%]{width:100%;flex-flow:row wrap;padding-top:.5rem}.shop-text-list__container--benefits-list[_ngcontent-%COMP%]   .shop-text-list__container--benefits-list-item[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();function bRt(t,n){if(1&t&&B(0,"shop-text-list",11),2&t){const o=_();l("title","PROMO_CODES.PROMO_CODES_TIPS_TITLE")("items",o.promoTips)("modifierLocalization","PROMO_CODES_TIPS.")}}const CRt=t=>({name:t});let cH=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.tooltipMaxDimensions={height:90,width:100,offsetHeight:0,offsetWidth:0},this.loader=e,this.promoCodeService=i,this.shopService=s,this.translate=r,this.toastService=a,this.route=c}ngOnInit(){this.loader.off(),this.translate.get("PROMO_CODES_TIPS").toPromise().then(e=>{this.promoTips=Object.keys(e)}).catch(e=>{console.warn("PROMO_CODES_TIPS error: ",e)}),this.route.snapshot.params.code&&(this.promoCode=this.route.snapshot.params.code)}ngOnDestroy(){clearTimeout(this.delayTimeout)}redeem(e){this.loader.on(),this.delayTimeout=setTimeout(()=>{this.promoCodeService.startRedeemPromoCodeProcedure(e)},3e3)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ro),g(ame),g(ls),g(Ko),g(Dt),g(Po))},t.\u0275cmp=pe({type:t,selectors:[["shop-promo-codes"]],decls:14,vars:14,consts:[[1,"shop-promo__wrapper"],[1,"shop-promo__content"],[1,"shop-promo__card--wrapper"],[1,"shop-promo__card"],[1,"shop-promo__card--main",3,"code","redeemPromoCode"],[1,"shop-promo__tips"],[3,"title","items","modifierLocalization"],[1,"shop-promo__tips-redesign"],["tooltip","",1,"shop-promo__button--benefits",3,"icon","tooltipMaxDimensions","tooltipTemplate","buttonModifier","bclass"],[1,"shop-promo__text--benefits"],["tooltipBenefits",""],[1,"shop-promo__text--benefits__container",3,"title","items","modifierLocalization"]],template:function(e,i){if(1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"promo-code",4),Y("redeemPromoCode",function(s){return i.redeem(s)}),m()()(),p(5,"div",5),B(6,"shop-text-list",6),m()(),p(7,"div",7)(8,"button-icon-text",8)(9,"span",9),H(10),V(11,"translate"),m()()(),U(12,bRt,1,3,"ng-template",null,10,ft),m()),2&e){const r=Kt(13);d(4),l("code",i.promoCode),d(2),l("title","PROMO_CODES.PROMO_CODES_TIPS_TITLE")("items",i.promoTips)("modifierLocalization","PROMO_CODES_TIPS."),d(2),l("icon",ne(12,CRt,i.EIcons.INFO_ICON))("tooltipMaxDimensions",i.tooltipMaxDimensions)("tooltipTemplate",r)("buttonModifier",i.EButtonModifier.BUTTON_BENEFITS)("bclass","shop-promo__button--benefits-bclass"),d(2),se($(11,10,"BUTTON.VIEW_ALL_BENEFITS"))}},dependencies:[so,Eg,xye,ZM,qe],styles:['@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-promo__content[_ngcontent-%COMP%]{justify-content:center;display:flex;flex-wrap:wrap;align-items:center;position:relative;padding:0 1rem}.shop-promo__card--wrapper[_ngcontent-%COMP%]{width:100%}.shop-promo__card--wrapper[_ngcontent-%COMP%]   .shop-promo__card[_ngcontent-%COMP%]{margin:3rem auto;width:100%;max-width:50rem;position:relative}.shop-promo__card--wrapper[_ngcontent-%COMP%]   .shop-promo__card[_ngcontent-%COMP%]:before{display:block;content:"";padding-top:49.2%}.shop-promo__card--main[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;width:100%;height:100%}.shop-promo__tips[_ngcontent-%COMP%]{width:100%}.promo-code__container--coins[_ngcontent-%COMP%], .shop-promo__tips-redesign[_ngcontent-%COMP%]{display:none}']}),n})();var yRt=nt.EModuleAction,SRt=nt.EPermissionModule;let Aye=(()=>{var t;class n{constructor(e,i){this.permissionsService=i}canActivate(){let e;return e=this.permissionsService.getActionPermission(SRt.Shop,yRt.PromoCodes).isPermitted,e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ro),T(Ti))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Rye=[{path:"promo-codes",data:{pageId:Mn.PromoCode},component:cH,canActivate:[Aye]},{path:"promo-codes/:code",data:{pageId:Mn.PromoCode},component:cH,canActivate:[Aye]}],wRt=["flag"],TRt=["content"],PRt=["buttons"];function IRt(t,n){1&t&&B(0,"loader-image",6),2&t&&l("transparentBG",!1)}function MRt(t,n){if(1&t&&B(0,"shine-component",7),2&t){const o=_();l("startDelayMs",o.shine.startDelayMs)("shineRepeatDelayMs",o.shine.shineRepeatDelayMs)}}let bf=(()=>{var t;class n{constructor(){this.isLoading=!1,this.stylePreset=n.EStyle.Normal,this.shine={enabled:!1,startDelayMs:0,shineRepeatDelayMs:5e3}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["offer-buy-item-container"]],contentQueries:function(e,i,r){if(1&e&&(Ho(r,wRt,7),Ho(r,TRt,7),Ho(r,PRt,7)),2&e){let s;je(s=He())&&(i.flag=s.first),je(s=He())&&(i.content=s.first),je(s=He())&&(i.buttons=s.first)}},hostAttrs:[1,"offer-buy-item-container--host"],inputs:{isLoading:"isLoading",stylePreset:"stylePreset",shine:"shine"},decls:8,vars:6,consts:[[1,"offer-buy-item--container",3,"ngClass"],[3,"transparentBG",4,"ngIf"],[1,"offer-buy-item__flag"],[3,"ngTemplateOutlet"],[1,"offer--item__button--container"],["class","offer-item-shine-cmp",3,"startDelayMs","shineRepeatDelayMs",4,"ngIf"],[3,"transparentBG"],[1,"offer-item-shine-cmp",3,"startDelayMs","shineRepeatDelayMs"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,IRt,1,1,"loader-image",1),p(2,"div",2),Un(3,3),m(),Un(4,3),p(5,"div",4),Un(6,3),m(),U(7,MRt,1,2,"shine-component",5),m()),2&e&&(l("ngClass",i.stylePreset),d(),l("ngIf",i.isLoading),d(2),l("ngTemplateOutlet",i.flag),d(),l("ngTemplateOutlet",i.content),d(2),l("ngTemplateOutlet",i.buttons),d(),l("ngIf",i.shine.enabled))},dependencies:[Xe,Ne,qr,Oi,IM],styles:["[_nghost-%COMP%]{display:block}.offer-buy-item--container[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center;padding:1rem;position:relative}@media only screen and (max-width: 360px){.offer-buy-item--container[_ngcontent-%COMP%]{padding:1rem 0}}.offer--item__button--container[_ngcontent-%COMP%]{text-align:center;flex:1}.offer-buy-item__flag[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);max-width:90%;width:-moz-fit-content;width:fit-content}.offer-item-shine-cmp[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EStyle||(t.EStyle={})).Normal="normal",o.Golden="golden"}(bf||(bf={}));var ORt=ve.EIcons;function ERt(t,n){1&t&&(B(0,"img",10),V(1,"transformUrl")),2&t&&l("customPlaceholderSize","img-size")("imgSrc",$(1,2,"shop/items/vip12.png"))}function xRt(t,n){1&t&&(B(0,"img",10),V(1,"transformUrl")),2&t&&l("customPlaceholderSize","img-size")("imgSrc",$(1,2,"shop/items/premium.png"))}const ARt=t=>[t];function RRt(t,n){if(1&t&&(p(0,"div",11)(1,"span"),H(2),V(3,"uppercase"),V(4,"translate"),m()()),2&t){const o=_();d(2),se($(3,1,yt(4,3,"SHOP.SAVE",ne(6,ARt,o.moneySavedPercentage))))}}function kRt(t,n){1&t&&B(0,"club-contribution-icon-component",12),2&t&&l("value",_().shardsAmount)}const LRt=(t,n,o)=>[t,n,o];let lH=(()=>{var t;class n{constructor(e){this.cdr=e,this.style=bf.EStyle.Normal,this.iconNames=ORt,this.itemType=Fe.TG}ngOnChanges(e){this.currency=Object.keys(this.offer.prices)[0];const i=this.offer.prices[this.currency];this.timePeriod=Gn.getKeyByForm(this.getPeriod(),_h.Singular),this.vipOfferAmount=new Gn(this.offer.item.lifeTime).getTotalTimeAmountByPeriod(this.getPeriod()),this.pricePerPeriod=parseFloat((i/this.vipOfferAmount).toFixed(2));const r=this.getHighestPricePerPeriod(this.offers.filter(s=>s.item.type===this.offer.item.type));this.moneySavedPercentage=Math.round(100-100*this.pricePerPeriod/r),this.cdr.detectChanges()}getTimeKey(){return Gn.getTimeKey(this.offer.item.lifeTime,{period:this.getPeriod()})}getHighestPricePerPeriod(e){const i=[];return e.forEach(r=>{i.push(parseFloat((r.prices[this.currency]/new Gn(r.item.lifeTime).getTotalTimeAmountByPeriod(this.getPeriod())).toFixed(2)))}),Math.max(...i)}getPeriod(){return Gn.getBiggestTimePeriodBySeconds(this.offer.item.lifeTime,Rt.Days)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["offer-vip-item"]],inputs:{offer:"offer",offers:"offers",shardsAmount:"shardsAmount",style:"style"},features:[it],decls:19,vars:24,consts:[[1,"vip-item--container",3,"ngClass"],[1,"vip-days-amount-container"],[1,"vip-days-amount"],[1,"vip-days-label"],[1,"vip-item--offer"],[1,"vip-item--img-ontainer",3,"ngClass"],["empty-placeholder","",3,"customPlaceholderSize","imgSrc",4,"ngIf"],[1,"vip-item--price-per-day"],["class","vip-item--save-from-offer",4,"ngIf"],["class","vip-item__container__vip--shards--amount",3,"value",4,"ngIf"],["empty-placeholder","",3,"customPlaceholderSize","imgSrc"],[1,"vip-item--save-from-offer"],[1,"vip-item__container__vip--shards--amount",3,"value"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"p",2),H(3),m(),p(4,"p",3),H(5),V(6,"uppercase"),V(7,"translate"),m()(),p(8,"div",4)(9,"div",5),U(10,ERt,2,4,"img",6)(11,xRt,2,4,"img",6),m(),p(12,"div",7),H(13),V(14,"translate"),V(15,"uppercase"),V(16,"translate"),m(),U(17,RRt,5,8,"div",8)(18,kRt,1,1,"club-contribution-icon-component",9),m()()),2&e&&(l("ngClass",i.style),d(3),se(i.vipOfferAmount),d(2),se($(6,9,$(7,11,i.getTimeKey()))),d(4),l("ngClass",i.offer.item.type),d(),l("ngIf",i.offer.item.type===i.itemType.Vip),d(),l("ngIf",i.offer.item.type===i.itemType.Premium),d(2),ze(" ",yt(14,13,"SHOP.PRICE_PER_DAY_V7",_a(20,LRt,i.pricePerPeriod,$(15,16,i.currency),$(16,18,i.timePeriod)))," "),d(4),l("ngIf",i.moneySavedPercentage>0),d(),l("ngIf",i.shardsAmount))},dependencies:[Xe,Ne,D0,$o,Sp,qe,uo],styles:[".vip-item--container[_ngcontent-%COMP%]{display:flex;align-items:center}.vip-item--offer[_ngcontent-%COMP%]{text-align:center;flex:1;display:flex;flex-direction:column;align-items:center}.vip-item--price-per-day[_ngcontent-%COMP%]{display:flex;justify-content:center}.vip-days-amount-container[_ngcontent-%COMP%]{flex:1;text-align:center;padding-top:1rem}.vip-days-amount[_ngcontent-%COMP%]{line-height:35px}.vip-days-label[_ngcontent-%COMP%]{line-height:30px}.vip-item--img-ontainer[_ngcontent-%COMP%]{height:3.5em}.vip-item--img-ontainer[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:100%}.img-size[_ngcontent-%COMP%]{padding:.5rem;height:3.5em}.vip-item__container__vip--shards--amount[_ngcontent-%COMP%]{display:flex;margin-top:.5rem;width:100%;justify-content:center}"],changeDetection:0}),n})();var DRt=ve.EIcons;const BRt=()=>[200,1e3];function NRt(t,n){1&t&&B(0,"bling-bling",6),2&t&&l("startDelay",pt(1,BRt))}function FRt(t,n){if(1&t&&(p(0,"p",11)(1,"span",12),H(2),V(3,"translate"),m(),B(4,"currency-component",13),m()),2&t){const o=_(2);d(2),se($(3,3,"SHOP.VIP_GETS")),d(2),l("currency",o.currencyType.Chips)("value",o.offer.item.amount+o.vipBonusAmount)}}function URt(t,n){1&t&&B(0,"club-contribution-icon-component",14),2&t&&l("value",_(2).shardsAmount)}function GRt(t,n){if(1&t&&(p(0,"div",7),B(1,"currency-component",8),U(2,FRt,5,5,"p",9)(3,URt,1,1,"club-contribution-icon-component",10),m()),2&t){const o=_();d(),l("currency",o.currencyType.Chips)("value",o.chipAmount),d(),l("ngIf",!!o.vipBonusMultiplier&&!o.isVip),d(),l("ngIf",o.shardsAmount)}}const VRt=t=>({"chips-item__text--bonus-value__happy-hour":t});function zRt(t,n){if(1&t&&(p(0,"p",19)(1,"span",12),H(2),V(3,"translate"),m(),B(4,"currency-component",13),m()),2&t){const o=_(2);l("ngClass",ne(6,VRt,o.offer.group===o.shopCategories.HappyHourChips)),d(2),se($(3,4,"SHOP.VIP_GETS")),d(2),l("currency",o.currencyType.Chips)("value",o.offer.item.amount+o.vipBonusAmount)}}function jRt(t,n){1&t&&B(0,"club-contribution-icon-component",14),2&t&&l("value",_(2).shardsAmount)}const HRt=t=>({"chips-item__text-value__tier-bonus__happy-hour":t});function qRt(t,n){if(1&t&&(p(0,"div",15),B(1,"currency-component",16)(2,"currency-component",17),U(3,zRt,5,8,"p",18)(4,jRt,1,1,"club-contribution-icon-component",10),m()),2&t){const o=_();d(),l("currency",o.currencyType.Chips)("isCrossed",!0)("value",o.getPriceBeforeTierBonus()),d(),l("ngClass",ne(8,HRt,o.offer.group===o.shopCategories.HappyHourChips))("currency",o.currencyType.Chips)("value",o.chipAmount),d(),l("ngIf",!!o.vipBonusMultiplier&&!o.isVip),d(),l("ngIf",o.shardsAmount)}}const WRt=t=>({"deal-of-the-day":t});let uH=(()=>{var t;class n{constructor(){this.showBlink=!0,this.shopCategories=wt,this.iconNames=DRt,this.vipBonusAmount=0,this.vipBonusBeforeTierBonusAmount=0,this.currencyType=ln}ngOnChanges(){this.vipBonusAmount=qm.getVipBonusAmount(this.offer.item.amount,this.vipBonusMultiplier),this.offer.tierBonus&&(this.vipBonusBeforeTierBonusAmount=qm.getVipBonusAmount(this.offer.item.amount-this.offer.tierBonus,this.vipBonusMultiplier)),this.setChipAmount()}setChipAmount(){this.chipAmount=this.offer.item.amount,this.isVip&&this.vipBonusMultiplier&&this.shopUsageIntent.type!==ci.RequestClubDonation&&(this.chipAmount+=this.vipBonusAmount)}getPriceBeforeTierBonus(){const e=this.offer.item.amount-this.offer.tierBonus;return this.isVip?e+this.vipBonusBeforeTierBonusAmount:e}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["offer-chips-item"]],inputs:{offer:"offer",vipBonusMultiplier:"vipBonusMultiplier",shardsAmount:"shardsAmount",showTierBonus:"showTierBonus",isVip:"isVip",shopUsageIntent:"shopUsageIntent",showBlink:"showBlink"},features:[it],decls:7,vars:10,consts:[[1,"chips-item--container"],[1,"chips-item--img-ontainer"],["empty-placeholder","","data-cy","storeChipImage",3,"customPlaceholderSize","imgSrc","ngClass"],["class","chips-bling",3,"startDelay",4,"ngIf"],["class","chips-item__container--value default",4,"ngIf"],["class","chips-item__container--value tierBonus",4,"ngIf"],[1,"chips-bling",3,"startDelay"],[1,"chips-item__container--value","default"],[1,"chips-item__text-value",3,"currency","value"],["class","chips-item__text--bonus-value",4,"ngIf"],["class","chips-item__container__coin--shards--amount",3,"value",4,"ngIf"],[1,"chips-item__text--bonus-value"],[1,"chips-item__text--bonus-vip"],[1,"chips-item__text--bonus-value-chips",3,"currency","value"],[1,"chips-item__container__coin--shards--amount",3,"value"],[1,"chips-item__container--value","tierBonus"],[1,"chips-item__text-value__tier-bonus","old--price",3,"currency","isCrossed","value"],[1,"chips-item__text-value__tier-bonus","new--price",3,"ngClass","currency","value"],["class","chips-item__text--bonus-value",3,"ngClass",4,"ngIf"],[1,"chips-item__text--bonus-value",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"img",2),V(3,"transformUrl"),U(4,NRt,1,2,"bling-bling",3),m(),U(5,GRt,4,4,"div",4)(6,qRt,5,10,"div",5),m()),2&e&&(d(2),l("customPlaceholderSize","img-size")("imgSrc",$(3,6,i.offer.item.data.clientPreviewUrl+".png"))("ngClass",ne(8,WRt,(null==i.offer.flags?null:i.offer.flags.promo)&&i.offer.group===i.shopCategories.PromoDeals)),d(2),l("ngIf",i.showBlink),d(),l("ngIf",!i.showTierBonus),d(),l("ngIf",i.showTierBonus))},dependencies:[Xe,Ne,So,D0,$o,dC,qe,uo],styles:[".chips-item--container[_ngcontent-%COMP%]{display:flex;align-items:center}.chips-item--img-ontainer[_ngcontent-%COMP%]{flex:1;height:8rem;display:flex;align-items:center;justify-content:center;position:relative}.chips-item--img-ontainer[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-height:160%;max-width:100%}@media screen and (max-width: 480px){.chips-item--img-ontainer[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-width:80%}}.chips-bling[_ngcontent-%COMP%]{position:absolute;width:60%;height:50%;pointer-events:none}.chips-item__container--value[_ngcontent-%COMP%]{flex:1;display:flex;flex-flow:column nowrap;align-items:center}.chips-item__text-value[_ngcontent-%COMP%]{font-size:2rem}.chips-item__text--bonus-value[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center;align-items:center}.chips-item__text--bonus-value[_ngcontent-%COMP%], .chips-item__text--bonus-value-chips[_ngcontent-%COMP%]{font-size:1.2rem!important;padding:0 .5rem}.img-size[_ngcontent-%COMP%]{padding:.5rem;height:3.5em}.chips-item__container__coin--shards--amount[_ngcontent-%COMP%]{display:flex;margin-top:.5rem;width:100%;justify-content:center}.chips-item__text-value__tier-bonus.old--price[_ngcontent-%COMP%]{position:relative;font-size:1.4rem}.chips-item__text-value__tier-bonus.new--price[_ngcontent-%COMP%]{font-size:2rem}"],changeDetection:0}),n})();var $Rt=ve.EIcons;const KRt=()=>[200,1e3];function ZRt(t,n){1&t&&B(0,"bling-bling",7),2&t&&l("startDelay",pt(1,KRt))}function QRt(t,n){1&t&&B(0,"club-contribution-icon-component",8),2&t&&l("value",_().shardsAmount)}const YRt=t=>({"last-tier":t});let kye=(()=>{var t;class n{constructor(){this.showBlink=!0,this.iconNames=$Rt,this.currencyType=ln}isLastTier(){return this.offers.findIndex(i=>i.item.id===this.offer.item.id)===this.offers.length-1}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["offer-gems-item"]],inputs:{offer:"offer",offers:"offers",shardsAmount:"shardsAmount",showBlink:"showBlink"},decls:8,vars:11,consts:[[1,"gems-item--container"],[1,"gems-item--img-container"],["empty-placeholder","",1,"gems-item--img",3,"ngClass","customPlaceholderSize","imgSrc"],["class","gems-bling",3,"startDelay",4,"ngIf"],[1,"gems-item__container--value"],[3,"currency","value"],["class","gems-item__container__gem--shards--amount",3,"value",4,"ngIf"],[1,"gems-bling",3,"startDelay"],[1,"gems-item__container__gem--shards--amount",3,"value"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"img",2),V(3,"transformUrl"),U(4,ZRt,1,2,"bling-bling",3),m(),p(5,"div",4),B(6,"currency-component",5),U(7,QRt,1,1,"club-contribution-icon-component",6),m()()),2&e&&(d(2),l("ngClass",ne(9,YRt,i.isLastTier()))("customPlaceholderSize","img-size")("imgSrc",$(3,7,i.offer.item.data.clientPreviewUrl+".png")),d(2),l("ngIf",i.showBlink),d(2),l("currency",i.currencyType.Gems)("value",i.offer.item.amount),d(),l("ngIf",i.shardsAmount))},dependencies:[Xe,Ne,So,D0,$o,dC,uo],styles:[".gems-item--container[_ngcontent-%COMP%]{display:flex;align-items:center}.gems-item--img-container[_ngcontent-%COMP%]{position:relative;flex:1;height:8rem;display:flex;align-items:center;justify-content:center}.gems-item--img[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.gems-bling[_ngcontent-%COMP%]{position:absolute;width:60%;height:50%;pointer-events:none}.gems-item__container--value[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center}.img-size[_ngcontent-%COMP%]{padding:.5rem;height:3.5em}.gems-item__container__gem--shards--amount[_ngcontent-%COMP%]{display:flex;margin-top:.5rem;width:100%;justify-content:center}"],changeDetection:0}),n})();var JRt=ve.EButtonModifier;function XRt(t,n){if(1&t&&B(0,"shop-item-product-flag",5),2&t){const o=_(2);l("flags",o.offer.flags)("offer",o.offer)}}function ekt(t,n){if(1&t&&U(0,XRt,1,2,"shop-item-product-flag",4),2&t){const o=_();l("ngIf",!o.isLoading&&!o.offer.owned&&o.offer.flags)}}function tkt(t,n){if(1&t&&B(0,"offer-vip-item",9),2&t){const o=_(2);l("shardsAmount",o.shardsAmount)("offers",o.offers)("offer",o.offer)}}function nkt(t,n){if(1&t&&B(0,"offer-chips-item",10),2&t){const o=_(2);l("shardsAmount",o.shardsAmount)("offer",o.offer)("showBlink",o.offer.item.id!==o.offers[0].item.id)("vipBonusMultiplier",o.vipBonusMultiplier)}}function ikt(t,n){if(1&t&&B(0,"offer-gems-item",11),2&t){const o=_(2);l("shardsAmount",o.shardsAmount)("offers",o.offers)("offer",o.offer)("showBlink",o.offer.item.id!==o.offers[0].item.id)}}function okt(t,n){if(1&t&&U(0,tkt,1,3,"offer-vip-item",6)(1,nkt,1,4,"offer-chips-item",7)(2,ikt,1,4,"offer-gems-item",8),2&t){const o=_();l("ngIf",o.offer.group===o.itemGroupTypes.Vip),d(),l("ngIf",o.offer.group===o.itemGroupTypes.Currency),d(),l("ngIf",o.offer.group===o.itemGroupTypes.Gems)}}function rkt(t,n){if(1&t&&B(0,"item-buy-button",14),2&t){const o=_(2);l("customClass","responsive__buy-button")("clientStoreProduct",o.offer)("disabled",o.isDisabled)}}function skt(t,n){if(1&t&&(p(0,"button-text",15),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("disabled",o.isDisabled)("buttonModifier",o.buttonModifier.BUTTON_SHOP),d(),se($(2,3,"CLUBS.REQUEST"))}}function akt(t,n){if(1&t&&U(0,rkt,1,3,"item-buy-button",12)(1,skt,3,5,"button-text",13),2&t){const o=_();l("ngIf",!o.shopUsageIntent||o.shopUsageIntent.type===o.EShopUsageIntent.BuyItems),d(),l("ngIf",o.shopUsageIntent&&o.shopUsageIntent.type===o.EShopUsageIntent.RequestClubDonation)}}let v2=(()=>{var t;class n{constructor(e,i){this.appService=e,this.cdr=i,this.isDisabled=!1,this.isLoading=!1,this.shine={enabled:!1,startDelayMs:0,shineRepeatDelayMs:5e3},this.itemSelect=new ke,this.itemGroupTypes=wt,this.buttonModifier=JRt,this.EShopUsageIntent=ci}selectItem(){this.isLoading||this.isDisabled||!this.offer||this.itemSelect.emit(this.offer)}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Qt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["offer-buy-item"]],inputs:{offer:"offer",offers:"offers",user:"user",vipBonusMultiplier:"vipBonusMultiplier",isDisabled:"isDisabled",isLoading:"isLoading",shardsAmount:"shardsAmount",shopUsageIntent:"shopUsageIntent",shine:"shine"},outputs:{itemSelect:"itemSelect"},features:[it],decls:7,vars:2,consts:[["click-feedback","",1,"offer-buy-item-container",3,"shine","isLoading","click"],["flag",""],["content",""],["buttons",""],[3,"flags","offer",4,"ngIf"],[3,"flags","offer"],["class","offer-buy-item--item",3,"shardsAmount","offers","offer",4,"ngIf"],["class","offer-buy-item--item",3,"shardsAmount","offer","showBlink","vipBonusMultiplier",4,"ngIf"],["class","offer-buy-item--item",3,"shardsAmount","offers","offer","showBlink",4,"ngIf"],[1,"offer-buy-item--item",3,"shardsAmount","offers","offer"],[1,"offer-buy-item--item",3,"shardsAmount","offer","showBlink","vipBonusMultiplier"],[1,"offer-buy-item--item",3,"shardsAmount","offers","offer","showBlink"],["class","buy--offer--button",3,"customClass","clientStoreProduct","disabled",4,"ngIf"],["class","buy--offer--button",3,"disabled","buttonModifier",4,"ngIf"],[1,"buy--offer--button",3,"customClass","clientStoreProduct","disabled"],[1,"buy--offer--button",3,"disabled","buttonModifier"]],template:function(e,i){1&e&&(p(0,"offer-buy-item-container",0),Y("click",function(){return i.selectItem()}),U(1,ekt,1,1,"ng-template",null,1,ft)(3,okt,3,3,"ng-template",null,2,ft)(5,akt,2,2,"ng-template",null,3,ft),m()),2&e&&l("shine",i.shine)("isLoading",i.isLoading)},dependencies:[Ne,pn,Uh,po,Yw,lH,uH,kye,bf,qe],styles:[".offer-buy-item-container[_ngcontent-%COMP%]{cursor:pointer}.buy--offer__button--container[_ngcontent-%COMP%]{text-align:center;flex:1}.offer-buy-item--item[_ngcontent-%COMP%]{flex:2;pointer-events:none}.offer-buy-item__flag[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;transform:translate(-50%,-50%)}"],changeDetection:0}),n})();var ckt=ve.EButtonModifier;function lkt(t,n){if(1&t&&B(0,"shop-item-product-flag",5),2&t){const o=_(2);l("flags",o.offer.flags)("offer",o.offer)}}function ukt(t,n){if(1&t&&U(0,lkt,1,2,"shop-item-product-flag",4),2&t){const o=_();l("ngIf",!o.isLoading&&!o.offer.owned&&o.offer.flags&&o.offer.group!==o.itemGroupTypes.HappyHourChips)}}function dkt(t,n){if(1&t&&B(0,"offer-chips-item",6),2&t){const o=_();l("showTierBonus",o.offer.group===o.itemGroupTypes.PromoDeals||o.offer.group===o.itemGroupTypes.HappyHourChips)("shopUsageIntent",o.shopUsageIntent)("shardsAmount",o.shardsAmount)("offer",o.offer)("showBlink",o.showBlink)("vipBonusMultiplier",o.vipBonusMultiplier)("isVip",o.isVip)}}function pkt(t,n){if(1&t&&B(0,"item-buy-button",9),2&t){const o=_(2);l("customClass","responsive__buy-button-chips")("clientStoreProduct",o.offer)("disabled",o.isDisabled)}}function hkt(t,n){if(1&t&&(p(0,"button-text",10),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("disabled",o.isDisabled)("buttonModifier",o.buttonModifier.BUTTON_SHOP),d(),se($(2,3,"CLUBS.REQUEST"))}}function mkt(t,n){if(1&t&&U(0,pkt,1,3,"item-buy-button",7)(1,hkt,3,5,"button-text",8),2&t){const o=_();l("ngIf",!o.shopUsageIntent||o.shopUsageIntent.type===o.EShopUsageIntent.BuyItems),d(),l("ngIf",o.shopUsageIntent&&o.shopUsageIntent.type===o.EShopUsageIntent.RequestClubDonation)}}let dH=(()=>{var t;class n extends v2{constructor(){super(...arguments),this.isDisabled=!1,this.isLoading=!1,this.showBlink=!0,this.shine={enabled:!1,startDelayMs:0,shineRepeatDelayMs:5e3},this.itemSelect=new ke,this.itemGroupTypes=wt,this.buttonModifier=ckt,this.EShopUsageIntent=ci}selectItem(){this.itemSelect.emit(this.offer)}trackByFn(e,i){return e}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["offer-buy-item-chips"]],inputs:{offer:"offer",offers:"offers",vipBonusMultiplier:"vipBonusMultiplier",isDisabled:"isDisabled",isLoading:"isLoading",shardsAmount:"shardsAmount",shopUsageIntent:"shopUsageIntent",isVip:"isVip",showBlink:"showBlink",shine:"shine"},outputs:{itemSelect:"itemSelect"},features:[Ht],decls:7,vars:2,consts:[["click-feedback","",1,"offer-buy-item-chips-container",3,"shine","isLoading","click"],["flag",""],["content",""],["buttons",""],[3,"flags","offer",4,"ngIf"],[3,"flags","offer"],[1,"offer-buy-item-chips--item",3,"showTierBonus","shopUsageIntent","shardsAmount","offer","showBlink","vipBonusMultiplier","isVip"],["class","buy--offer-chips--button",3,"customClass","clientStoreProduct","disabled",4,"ngIf"],["class","buy--offer--button-chips",3,"disabled","buttonModifier",4,"ngIf"],[1,"buy--offer-chips--button",3,"customClass","clientStoreProduct","disabled"],[1,"buy--offer--button-chips",3,"disabled","buttonModifier"]],template:function(e,i){1&e&&(p(0,"offer-buy-item-container",0),Y("click",function(){return i.selectItem()}),U(1,ukt,1,1,"ng-template",null,1,ft)(3,dkt,1,7,"ng-template",null,2,ft)(5,mkt,2,2,"ng-template",null,3,ft),m()),2&e&&l("shine",i.shine)("isLoading",i.isLoading)},dependencies:[Ne,pn,Uh,po,Yw,uH,bf,qe],styles:[".offer-buy-item-chips--item[_ngcontent-%COMP%]{flex:2}"],changeDetection:0}),n})();var fkt=ve.EButtonModifier;function gkt(t,n){1&t&&B(0,"shop-item-product-flag",6),2&t&&l("flags",_(2).offer.flags)}function _kt(t,n){if(1&t&&U(0,gkt,1,1,"shop-item-product-flag",5),2&t){const o=_();l("ngIf",!o.isLoading&&!o.offer.owned&&o.offer.flags)}}function vkt(t,n){if(1&t&&B(0,"offer-vip-item",7),2&t){const o=_();vp(o.getStyle()),l("shardsAmount",o.shardsAmount)("offers",o.offers)("offer",o.offer)}}function bkt(t,n){1&t&&Un(0)}function Ckt(t,n){if(1&t&&B(0,"item-buy-button",13),2&t){const o=_(3);l("customClass","responsive__buy-button")("clientStoreProduct",o.offer)("disabled",o.isDisabled)}}function ykt(t,n){if(1&t&&(p(0,"button-text",14),H(1),V(2,"translate"),m()),2&t){const o=_(3);l("disabled",o.isDisabled)("buttonModifier",o.buttonModifier.BUTTON_SHOP),d(),se($(2,3,"CLUBS.REQUEST"))}}function Skt(t,n){if(1&t&&U(0,Ckt,1,3,"item-buy-button",11)(1,ykt,3,5,"button-text",12),2&t){const o=_(2);l("ngIf",!o.shopUsageIntent||o.shopUsageIntent.type===o.EShopUsageIntent.BuyItems),d(),l("ngIf",o.shopUsageIntent&&o.shopUsageIntent.type===o.EShopUsageIntent.RequestClubDonation)}}function wkt(t,n){1&t&&Un(0)}const QM=t=>({timeConfig:t});function Tkt(t,n){if(1&t&&(p(0,"button-text",18),H(1),B(2,"br"),H(3),V(4,"timeLeft"),m()),2&t){const o=_(4);l("bclass","buy--offer--button-bclass")("disabled",o.isBuyDisabled())("buttonModifier",o.buttonModifier.BUTTON_SHOP),d(),se(o.offer.mobilePrice),d(2),se(yt(4,5,o.offer.item.lifeTime,ne(8,QM,o.timeLeftConfig)))}}function Pkt(t,n){if(1&t&&(p(0,"button-text",18),H(1),B(2,"br"),H(3),V(4,"timeLeft"),m()),2&t){const o=_(4);l("bclass","buy--offer--button-bclass")("disabled",o.isBuyDisabled())("buttonModifier",o.buttonModifier.BUTTON_SHOP),d(),se(o.offer.mobilePrice),d(2),se(yt(4,5,o.offer.item.lifeTime,ne(8,QM,o.timeLeftConfig)))}}function Ikt(t,n){if(1&t&&U(0,Tkt,5,10,"button-text",17)(1,Pkt,5,10,"button-text",17),2&t){const o=_(3);l("ngIf",!o.isCurrentTier()),d(),l("ngIf",o.isCurrentTier())}}function Mkt(t,n){if(1&t&&(p(0,"button-text",18),H(1),B(2,"br"),H(3),V(4,"timeLeft"),m()),2&t){const o=_(4);l("bclass","buy--offer--button-bclass")("disabled",o.isBuyDisabled())("buttonModifier",o.buttonModifier.BUTTON_SHOP),d(),se(o.offer.mobilePrice),d(2),se(yt(4,5,o.offer.item.lifeTime,ne(8,QM,o.timeLeftConfig)))}}function Okt(t,n){if(1&t&&(p(0,"button-text",18),H(1),B(2,"br"),H(3),V(4,"timeLeft"),m()),2&t){const o=_(4);l("bclass","buy--offer--button-bclass")("disabled",o.isBuyDisabled())("buttonModifier",o.buttonModifier.BUTTON_SHOP_DOWNGRADE),d(),se(o.offer.mobilePrice),d(2),se(yt(4,5,o.offer.item.lifeTime,ne(8,QM,o.timeLeftConfig)))}}function Ekt(t,n){1&t&&(p(0,"p",20),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.SUBSCRIBED")))}function xkt(t,n){if(1&t&&(p(0,"button-text",18),H(1),B(2,"br"),H(3),V(4,"timeLeft"),m()),2&t){const o=_(4);l("bclass","buy--offer--button-bclass")("disabled",o.isBuyDisabled())("buttonModifier",o.buttonModifier.BUTTON_SHOP),d(),se(o.offer.mobilePrice),d(2),se(yt(4,5,o.offer.item.lifeTime,ne(8,QM,o.timeLeftConfig)))}}function Akt(t,n){if(1&t&&U(0,Mkt,5,10,"button-text",17)(1,Okt,5,10,"button-text",17)(2,Ekt,3,3,"p",19)(3,xkt,5,10,"button-text",17),2&t){const o=_(3);l("ngIf",!o.isSubscribed()),d(),l("ngIf",o.isSubscribed()&&!o.isCurrentTier()&&!o.isHigherTier()),d(),l("ngIf",o.isSubscribed()&&o.isCurrentTier()),d(),l("ngIf",o.isSubscribed()&&!o.isCurrentTier()&&o.isHigherTier())}}function Rkt(t,n){if(1&t&&U(0,wkt,1,0,"ng-container",8)(1,Ikt,2,2,"ng-template",null,15,ft)(3,Akt,4,4,"ng-template",null,16,ft),2&t){const o=Kt(2),e=Kt(4),i=_(2);l("ngIf",i.isCancelled()||i.getSubscriptionState()===i.ESubscriptionState.Expired)("ngIfThen",o)("ngIfElse",e)}}function kkt(t,n){if(1&t&&U(0,bkt,1,0,"ng-container",8)(1,Skt,2,2,"ng-template",null,9,ft)(3,Rkt,5,3,"ng-template",null,10,ft),2&t){const o=Kt(2),e=Kt(4);l("ngIf",_().isSubscription())("ngIfThen",e)("ngIfElse",o)}}function Lkt(t,n){1&t&&(p(0,"div",21)(1,"p",22),H(2),V(3,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,1,"BUTTON.PREMIUM_BENEFITS_INFO")," "))}let Lye=(()=>{var t;class n extends v2{constructor(){super(...arguments),this.activeSubscriptions=[],this.isDisabled=!1,this.isLoading=!1,this.shine={enabled:!1,startDelayMs:0,shineRepeatDelayMs:5e3},this.itemSelect=new ke,this.itemGroupTypes=wt,this.buttonModifier=fkt,this.EShopUsageIntent=ci,this.ESubscriptionState=Im,this.timeLeftConfig=Zu,this.itemType=Fe.TG}selectItem(){this.isLoading||!this.offer||this.isBuyDisabled()||this.itemSelect.emit(this.offer)}isSubscribed(){return this.user.vip.isActiveSubscription()}hasPendingSubscription(){var e;return this.isCurrentUser&&Qs.hasPendingSubscriptions(this.activeSubscriptions,$S,null===(e=this.user.vip.custom)||void 0===e?void 0:e.subscription)}isSubscription(){return this.offer.item.durability===Fe.XM.Subscription}isCurrentTier(){var e;return this.user.vip.isActiveSubscription()&&this.offer.item.id===(null===(e=this.user.vip.custom)||void 0===e||null===(e=e.subscription)||void 0===e||null===(e=e.item)||void 0===e?void 0:e.id)}getSubscriptionState(){var e;return null===(e=this.user.vip.custom)||void 0===e||null===(e=e.subscription)||void 0===e?void 0:e.state}isHigherTier(){if(!this.user.vip.isActiveSubscription())return!1;const e=this.offers.find(i=>{var r;return i.item.id===(null===(r=this.user.vip.custom)||void 0===r||null===(r=r.subscription)||void 0===r||null===(r=r.item)||void 0===r?void 0:r.id)});return!e||1===qm.compareVipItemsOrder(this.offer.item,e.item)}isBuyDisabled(){var e,i;return this.isDisabled||this.hasPendingSubscription()||this.isCurrentTier()&&this.user.vip.willAutorenew()||Qs.hasDefferedItem(null===(e=this.user.vip.custom)||void 0===e?void 0:e.subscription)&&this.offer.item.id===(null===(i=this.user.vip.custom)||void 0===i||null===(i=i.subscription.deferredItem)||void 0===i?void 0:i.id)}getStyle(){return this.isCurrentTier()?bf.EStyle.Golden:bf.EStyle.Normal}isCancelled(){return this.getSubscriptionState()===Im.Canceled&&this.appService.getPlatform()!==Ut.Ios}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["offer-buy-vip-item"]],inputs:{offer:"offer",offers:"offers",activeSubscriptions:"activeSubscriptions",user:"user",vipBonusMultiplier:"vipBonusMultiplier",isDisabled:"isDisabled",isLoading:"isLoading",shardsAmount:"shardsAmount",shopUsageIntent:"shopUsageIntent",isCurrentUser:"isCurrentUser",shine:"shine"},outputs:{itemSelect:"itemSelect"},features:[Ht],decls:8,vars:4,consts:[["click-feedback","",1,"offer-buy-item-container",3,"shine","stylePreset","isLoading","click"],["flag",""],["content",""],["buttons",""],["class","buy--offer__premium-benefits",4,"ngIf"],[3,"flags",4,"ngIf"],[3,"flags"],[1,"offer-buy-item--item",3,"shardsAmount","offers","offer"],[4,"ngIf","ngIfThen","ngIfElse"],["packages",""],["subscriptions",""],["class","buy--offer--button",3,"customClass","clientStoreProduct","disabled",4,"ngIf"],["class","buy--offer--button",3,"disabled","buttonModifier",4,"ngIf"],[1,"buy--offer--button",3,"customClass","clientStoreProduct","disabled"],[1,"buy--offer--button",3,"disabled","buttonModifier"],["canceled",""],["active",""],["class","buy--offer--button",3,"bclass","disabled","buttonModifier",4,"ngIf"],[1,"buy--offer--button",3,"bclass","disabled","buttonModifier"],["class","offer-buy-vip-status-text",4,"ngIf"],[1,"offer-buy-vip-status-text"],[1,"buy--offer__premium-benefits"],[1,"buy--offer__premium-benefits__text"]],template:function(e,i){1&e&&(p(0,"offer-buy-item-container",0),Y("click",function(){return i.selectItem()}),U(1,_kt,1,1,"ng-template",null,1,ft)(3,vkt,1,5,"ng-template",null,2,ft)(5,kkt,5,3,"ng-template",null,3,ft),m(),U(7,Lkt,4,3,"div",4)),2&e&&(l("shine",i.shine)("stylePreset",i.getStyle())("isLoading",i.isLoading),d(7),l("ngIf",i.offer.item.type===i.itemType.Premium))},dependencies:[Ne,pn,Uh,po,Yw,lH,bf,qe,Ps],styles:[".offer-buy-item-container[_ngcontent-%COMP%]{cursor:pointer}.buy--offer__button--container[_ngcontent-%COMP%]{text-align:center;flex:1}.offer-buy-item--item[_ngcontent-%COMP%]{flex:2;pointer-events:none}.offer-buy-item__flag[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;transform:translate(-50%,-50%)}.buy--offer__premium-benefits[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:.5rem 0}"],changeDetection:0}),n})();function Dkt(t,n){if(1&t){const o=Ce();p(0,"offer-buy-vip-item",8),Y("itemSelect",function(i){return oe(o),re(_(2).selectItem(i))}),m()}if(2&t){const o=_().$implicit,e=_();l("offers",e.offers)("offer",o)("user",e.user)("shopUsageIntent",e.shopUsageIntent)("vipBonusMultiplier",e.vipBonusMultiplier)("shardsAmount",e.getCoinShardsAmount(o))("activeSubscriptions",e.activeSubscriptions)("isCurrentUser",e.isCurrentUser())("isLoading",e.shopUsageIntent&&e.shopUsageIntent.type===e.EShopUsageIntent.RequestClubDonation&&e.isInActiveDonationRequests(o))("isDisabled",e.shopUsageIntent&&e.shopUsageIntent.type===e.EShopUsageIntent.RequestClubDonation&&e.activeClubDonationRequests.length&&!e.isInActiveDonationRequests(o)),Hn("data-cy",o.item.id)}}function Bkt(t,n){if(1&t){const o=Ce();p(0,"offer-buy-item-chips",9),Y("itemSelect",function(i){return oe(o),re(_(2).selectItem(i))}),m()}if(2&t){const o=_().$implicit,e=_();l("offers",e.offers)("offer",o)("showBlink",o.item.id!==e.offers[0].item.id)("isVip",e.isVip)("shopUsageIntent",e.shopUsageIntent)("vipBonusMultiplier",e.vipBonusMultiplier)("shardsAmount",e.getCoinShardsAmount(o))("isLoading",e.shopUsageIntent&&e.shopUsageIntent.type===e.EShopUsageIntent.RequestClubDonation&&e.isInActiveDonationRequests(o))("isDisabled",e.shopUsageIntent&&e.shopUsageIntent.type===e.EShopUsageIntent.RequestClubDonation&&e.activeClubDonationRequests.length&&!e.isInActiveDonationRequests(o)),Hn("data-cy",o.group)("data-cy-id",o.item.id)}}function Nkt(t,n){if(1&t){const o=Ce();p(0,"offer-buy-item",10),Y("itemSelect",function(i){return oe(o),re(_(2).selectItem(i))}),m()}if(2&t){const o=_().$implicit,e=_();l("offers",e.offers)("user",e.user)("offer",o)("shopUsageIntent",e.shopUsageIntent)("vipBonusMultiplier",e.vipBonusMultiplier)("shardsAmount",e.getCoinShardsAmount(o))("isLoading",e.shopUsageIntent&&e.shopUsageIntent.type===e.EShopUsageIntent.RequestClubDonation&&e.isInActiveDonationRequests(o))("isDisabled",e.shopUsageIntent&&e.shopUsageIntent.type===e.EShopUsageIntent.RequestClubDonation&&e.activeClubDonationRequests.length&&!e.isInActiveDonationRequests(o))}}function Fkt(t,n){if(1&t&&(Tn(0),p(1,"div",4),U(2,Dkt,1,11,"offer-buy-vip-item",5)(3,Bkt,1,11,"offer-buy-item-chips",6)(4,Nkt,1,8,"offer-buy-item",7),m(),Pn()),2&t){const o=n.$implicit,e=_();d(2),l("ngIf",o.item.type===e.EItemType.Vip||o.item.type===e.EItemType.Premium),d(),l("ngIf",o.item.type===e.itemType.ChipPack),d(),l("ngIf",o.item.type!==e.EItemType.Vip&&o.item.type!==e.EItemType.Premium&&o.item.type!==e.itemType.ChipPack)}}const Ukt=["*"];let YM=(()=>{var t;class n{constructor(e,i){this.store=e,this.shopService=i,this.activeClubDonationRequests=[],this.activeSubscriptions=[],this.itemSelect=new ke,this.itemType=Fe.TG,this.EShopUsageIntent=ci,this.shopCategories=wt,this.EItemType=Fe.TG}trackByFn(e,i){return e}selectItem(e){this.itemSelect.emit(e)}isInActiveDonationRequests(e){return!!this.store.clubs.selectDonationRequest(e.item.id)}getCoinShardsAmount(e){if(this.shopUsageIntent&&this.shopUsageIntent.type===ci.RequestClubDonation)return this.shopService.getCoinShardsAmount(e.item.id)}isCurrentUser(){return this.user.id===this.store.selectSimpleProfile().id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Ko))},t.\u0275cmp=pe({type:t,selectors:[["offer-buy-item-list"]],inputs:{offers:"offers",isHappyHour:"isHappyHour",vipBonusMultiplier:"vipBonusMultiplier",user:"user",shopUsageIntent:"shopUsageIntent",activeClubDonationRequests:"activeClubDonationRequests",isVip:"isVip",activeSubscriptions:"activeSubscriptions"},outputs:{itemSelect:"itemSelect"},ngContentSelectors:Ukt,decls:5,vars:2,consts:[[1,"offer-buy-item-list--container"],[1,"offer-buy-item-list--list"],[1,"offer-buy-item-list--content"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"offer-buy-item-list--item"],[3,"offers","offer","user","shopUsageIntent","vipBonusMultiplier","shardsAmount","activeSubscriptions","isCurrentUser","isLoading","isDisabled","itemSelect",4,"ngIf"],[3,"offers","offer","showBlink","isVip","shopUsageIntent","vipBonusMultiplier","shardsAmount","isLoading","isDisabled","itemSelect",4,"ngIf"],[3,"offers","user","offer","shopUsageIntent","vipBonusMultiplier","shardsAmount","isLoading","isDisabled","itemSelect",4,"ngIf"],[3,"offers","offer","user","shopUsageIntent","vipBonusMultiplier","shardsAmount","activeSubscriptions","isCurrentUser","isLoading","isDisabled","itemSelect"],[3,"offers","offer","showBlink","isVip","shopUsageIntent","vipBonusMultiplier","shardsAmount","isLoading","isDisabled","itemSelect"],[3,"offers","user","offer","shopUsageIntent","vipBonusMultiplier","shardsAmount","isLoading","isDisabled","itemSelect"]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"div",1)(2,"div",2),yo(3),m(),U(4,Fkt,5,3,"ng-container",3),m()()),2&e&&(d(4),l("ngForOf",i.offers)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Ne,v2,dH,Lye],styles:[".offer-buy-item-list--container[_ngcontent-%COMP%]{margin:2rem 0}@media only screen and (max-width: 360px){.offer-buy-item-list--container[_ngcontent-%COMP%]{margin:2.5rem 0}}"],changeDetection:0}),n})();function Gkt(t,n){1&t&&(B(0,"img",9),V(1,"transformUrl")),2&t&&l("imgSrc",$(1,1,"shop/items/rewardedVideoChips.png"))}function Vkt(t,n){1&t&&(B(0,"img",9),V(1,"transformUrl")),2&t&&l("imgSrc",$(1,1,"shop/items/rewardedVideoGems.png"))}function zkt(t,n){1&t&&(p(0,"p",10),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"WORDS.FREE")))}function jkt(t,n){if(1&t&&B(0,"currency-component",11),2&t){const o=_(2);l("currency",o.reward.chips?o.currencyType.Chips:o.currencyType.Gems)("value",o.reward.chips?o.reward.chips:o.reward.gems)}}function Hkt(t,n){if(1&t&&(p(0,"div",3)(1,"div",4),U(2,Gkt,2,3,"img",5)(3,Vkt,2,3,"img",5),m(),p(4,"div",6),U(5,zkt,3,3,"p",7)(6,jkt,1,2,"currency-component",8),m()()),2&t){const o=_();d(2),l("ngIf",o.reward.chips),d(),l("ngIf",o.reward.gems),d(2),l("ngIf",!o.reward.chips&&!o.reward.gems),d(),l("ngIf",o.reward.chips||o.reward.gems)}}function qkt(t,n){if(1&t){const o=Ce();p(0,"button-text",12),Y("click",function(){return oe(o),re(_().watchVideo())}),H(1),V(2,"translate"),m()}2&t&&(l("buttonModifier",_().buttonModifier.BUTTON_ATTENTION),d(),se($(2,2,"TEXT.WATCH")))}let Dye=(()=>{var t;class n{constructor(){this.isLoading=!1,this.shine={enabled:!1,delay:0},this.watch=new ke,this.buttonModifier=ve.EButtonModifier,this.currencyType=ln}watchVideo(){this.watch.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["rewarded-video-item"]],inputs:{reward:"reward",isLoading:"isLoading",shine:"shine"},outputs:{watch:"watch"},decls:5,vars:2,consts:[[3,"isLoading","shine"],["content",""],["buttons",""],[1,"rewarded-video-item__content"],[1,"rewarded-video-item__content--img--wrapper"],["class","rewarded-video-item__content--img","empty-placeholder","",3,"imgSrc",4,"ngIf"],[1,"rewarded-video-item__content--info"],["class","rewarded-video-item__content--text",4,"ngIf"],[3,"currency","value",4,"ngIf"],["empty-placeholder","",1,"rewarded-video-item__content--img",3,"imgSrc"],[1,"rewarded-video-item__content--text"],[3,"currency","value"],[1,"rewarded-video-item__button",3,"buttonModifier","click"]],template:function(e,i){1&e&&(p(0,"offer-buy-item-container",0),U(1,Hkt,7,4,"ng-template",null,1,ft)(3,qkt,3,4,"ng-template",null,2,ft),m()),2&e&&l("isLoading",i.isLoading)("shine",i.shine)},dependencies:[Ne,pn,So,$o,bf,qe,uo],styles:[".rewarded-video-item__button[_ngcontent-%COMP%]{max-width:90%}.rewarded-video-item__content[_ngcontent-%COMP%]{flex:2;display:flex}.rewarded-video-item__content--img--wrapper[_ngcontent-%COMP%]{flex:1;height:8rem;display:flex;align-items:center;justify-content:center;position:relative}.rewarded-video-item__content--img[_ngcontent-%COMP%]{left:50%;position:absolute;top:50%;transform:translate(-60%,-50%);width:130%;max-width:13rem}@media only screen and (max-width: 440px){.rewarded-video-item__content--img[_ngcontent-%COMP%]{transform:translate(-55%,-50%);width:130%;max-width:13rem}}.rewarded-video-item__content--info[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;flex-flow:column wrap}"],changeDetection:0}),n})(),pH=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.adsService=e,this.store=i,this.cdr=r,this.toaster=s,this.bonusService=a,this.animationService=c,this.shine={enabled:!1,startDelayMs:0,shineRepeatDelayMs:5e3},this.isLoading=!1,this.subcriptions=new ie.List}ngOnInit(){this.subcriptions.add(this.store.subscribeUserState().subscribe(e=>{this.reward=this.placement===rc.ShopChips?e.bonuses.videoShopChips.reward:e.bonuses.videoShopGems.reward,this.cdr.detectChanges()})),this.subcriptions.add(this.store.ads.subscribeRewardedVideo({id:this.placement}).subscribe(e=>{this.isLoading=!!e,this.cdr.detectChanges()}))}ngOnDestroy(){this.subcriptions.forEach(e=>e.unsubscribe())}watchVideo(){var e=this;return f(function*(){try{let i;yield e.adsService.showRewardedVideo({containerId:e.placement}),i=e.placement===rc.ShopChips?Ba.RewardedVideoShopChips:Ba.RewardedVideoShopGems,yield e.bonusService.claimVideoBonusReward(i),i===Ba.RewardedVideoShopChips?e.animationService.playAnimations(ln.Chips):i===Ba.RewardedVideoShopGems&&e.animationService.playAnimations(ln.Gems)}catch(i){i instanceof lt.NetworkError?e.toaster.error("ERRORS.CONNECTION_ERROR"):i instanceof Bp?e.toaster.error("BONUS.NO_VIDEOS"):i instanceof Np?e.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):i instanceof zm||(i instanceof Fp?e.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):e.toaster.warn("ERRORS.SOMETHING_WRONG")),console.warn("Failed admob video, error callback response:",i)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bc),g(J),g(Re),g(Dt),g(Iu),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["rewarded-video-item-smart"]],inputs:{placement:"placement",shine:"shine"},decls:1,vars:3,consts:[[3,"shine","isLoading","reward","watch"]],template:function(e,i){1&e&&(p(0,"rewarded-video-item",0),Y("watch",function(){return i.watchVideo()}),m()),2&e&&l("shine",i.shine)("isLoading",i.isLoading)("reward",i.reward)},dependencies:[Dye],encapsulation:2,changeDetection:0}),n})();function Wkt(t,n){1&t&&B(0,"rewarded-video-item-smart",4),2&t&&l("placement",_().EAdmobVideoId.ShopGems)}let Bye=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.playerContext=u,this.cdr=h,this.ads=b,this.contextEnum=Wr,this.EShopUsageIntent=ci,this.activeClubDonationRequests=[],this.EAdmobVideoId=rc,this.subscriptions=new ie.List,this.onUserStateUpdate=w=>{this.myGemBalance=w.wallet.gems},this.router=i,this.shopService=e,this.shopState=s.shop[this.shopService.shopType].selectState(),this.packs=[],this.activatedComponentRoute=r,this.store=s,this.clubsService=a,this.constants=c}ngOnInit(){this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full),this.currentUser=this.shopService.shopReceiver.profile,this.myGemBalance=this.store.selectUserState().wallet.gems,this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.subscriptions.add(this.store.bonuses.videoShopGems.subscribeState().subscribe(i=>{this.rewardedVideo=i,this.cdr.detectChanges()}));let e=this.store.shop[this.shopService.shopType].selectNonGiftableShopProducts().filter(i=>i.item.type===Fe.TG.GemsPack);this.shopState.usageIntent.type===ci.RequestClubDonation&&(e=e.filter(i=>{var r,s;return!(null===(r=i.productId)||void 0===r||!r.apple||null===(s=i.productId)||void 0===s||!s.google)})),this.packs=e,this.subscriptions.add(this.router.events.subscribe(i=>{this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full)})),this.subscriptions.add(this.store.subscribeUserState().pipe(bt(Boolean)).subscribe(this.onUserStateUpdate)),this.subscriptions.add(this.store.clubs.subscribeDonationRequestsList().subscribe(i=>this.activeClubDonationRequests=i))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}selectItem(e){switch(this.shopState.usageIntent.type){case ci.BuyItems:this.shopService.openItemPopup({item:e.item,receiverProfile:this.shopService.shopReceiver.profile,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(r=>console.warn(r));break;case ci.RequestClubDonation:this.tryRequestDonation(this.shopState.usageIntent.data,e);break;default:console.log("Unknown intent type")}}tryRequestDonation(e,i){var r=this;return f(function*(){if(!r.store.clubs.selectDonationRequestsList().length)try{yield r.clubsService.requestDonation({clubId:e.id,item:{...i.item,productId:i.productId}});const s=r.store.shop[r.shopService.shopType].selectState();s.isOpened&&s.usageIntent.type===ci.RequestClubDonation&&r.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(r.constants.defaultLoggedRoute,"/club/").concat(e.id,"/activity-feed")}}])}catch(s){console.warn(s)}})()}trackByFn(e,i){return i.item.id}getCoinShardsAmount(e){if(this.shopState.usageIntent.type===ci.RequestClubDonation)return this.shopService.getCoinShardsAmount(e.item.id)}isInActiveDonationRequests(e){return!!this.store.clubs.selectDonationRequest(e.item.id)}showAdItem(){var e,i;return this.ads.hasActiveAdsAdapter()&&this.ads.isRewardedVideoEnabled()&&(null===(e=this.rewardedVideo)||void 0===e?void 0:e.isActive)&&(null===(i=this.rewardedVideo)||void 0===i?void 0:i.requirements.limit)>0&&this.shopState.usageIntent.type===ci.BuyItems&&this.shopState.receiver.profile.id===this.store.selectSimpleProfile().id&&this.playerContext.getCurrent()===ba.Idle}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(on),g(Pr),g(J),g(ru),g(tn),g(ic),g(Re),g(bc))},t.\u0275cmp=pe({type:t,selectors:[["shop-gems"]],decls:5,vars:6,consts:[[1,"shop-gems__wrapper"],["wrapper",""],[1,"shop-gems__container--items",3,"offers","user","vipBonusMultiplier","shopUsageIntent","activeClubDonationRequests","itemSelect"],[3,"placement",4,"ngIf"],[3,"placement"]],template:function(e,i){1&e&&(p(0,"section",0,1)(2,"offer-buy-item-list",2),Y("itemSelect",function(s){return i.selectItem(s)}),p(3,"div"),U(4,Wkt,1,1,"rewarded-video-item-smart",3),m()()()),2&e&&(d(2),l("offers",i.packs)("user",i.currentUser)("vipBonusMultiplier",i.shopState.model.vipBonusMultiplier)("shopUsageIntent",i.shopState.usageIntent)("activeClubDonationRequests",i.activeClubDonationRequests),d(2),l("ngIf",i.showAdItem()))},dependencies:[Ne,YM,pH],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-gems__popup-outlet[_ngcontent-%COMP%]{height:6rem}@media only screen and (max-width: 480px){.shop-gems__popup-outlet[_ngcontent-%COMP%]{height:3rem}}@media only screen and (orientation: landscape){.shop-gems__popup-outlet[_ngcontent-%COMP%]{height:3rem}}.shop-gems__container--items[_ngcontent-%COMP%]{display:initial!important;width:100%;max-width:60rem}"]}),n})();const Nye=[{path:"gems",data:{pageId:Mn.ShopGems},component:Bye}];let Cf=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.elRef=c,this.actionInProgress=!1,this.isInWaitingState=!1,this.route=s,this.router=r,this.shopService=e,this.inventory=i,this.store=a,this.toast=u,this.packs=[],this.shopContentRefreshSubs=e.refreshShopContent.subscribe(this.onRefreshContent.bind(this))}ngOnInit(){var e;this.gameId=this.route.snapshot.params.game,this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full),this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.shopConfig=this.store.shop[this.shopService.shopType].selectState().model,this.packs=this.sortPacks(this.getItems()),this.isInCustomRoomWaitingStateSubscription=this.store.games.subscribeIsRoomInWaitingState().subscribe(i=>this.isInWaitingState=i),this.routeChangeSubscription=this.router.events.subscribe(i=>{this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.shopService.shopReceiver&&this.shopService.shopReceiver.profile&&(this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full))}),this.elRef.nativeElement.firstChild.classList.add(null===(e=this.route.snapshot.parent.url[0])||void 0===e?void 0:e.path)}ngOnDestroy(){this.routeChangeSubscription&&this.routeChangeSubscription.unsubscribe(),this.shopContentRefreshSubs&&this.shopContentRefreshSubs.unsubscribe(),this.isInCustomRoomWaitingStateSubscription&&this.isInCustomRoomWaitingStateSubscription.unsubscribe(),clearTimeout(this.actionDelay)}onRefreshContent(){this.packs=[],this.packs=this.sortPacks(this.getItems())}clickHandler(e,i){var r=this;return f(function*(){if(r.actionInProgress)return;let a=r.inventory.getInventoryItems().find(u=>u.item.id===e.item.id&&!u.item.giftOnly);const c={owned:e.owned,equipped:!1};a&&(c.equipped=i?a.equippedGames&&-1!==a.equippedGames.indexOf(i):a.equipped),c.owned||c.equipped?c.owned&&!c.equipped?r.equipItem(e,i):c.owned&&c.equipped?r.unEquipItem(e,i):console.error("ItemStoreBase click handler error"):r.buyItem(e.item.id,i)})()}equipItem(e,i){var r=this;e.loading=!0,this.actionInProgress=!0,this.actionDelay=setTimeout(f(function*(){try{yield r.inventory.equipItem(e,i)}catch(s){console.warn(s)}finally{e.loading=!1,r.actionInProgress=!1}}),1e3)}unEquipItem(e,i){var r=this;e.loading=!0,this.actionInProgress=!0,this.actionDelay=setTimeout(f(function*(){try{const a=r.inventory.getInventoryItems().find(c=>c.item.id===e.item.id);yield r.inventory.unequipItem(a,i)}catch(s){console.warn(s)}finally{e.loading=!1,r.actionInProgress=!1}}),1e3)}buyItem(e,i){const r=this.shopConfig.products.find(s=>s.item.id===e);this.shopService.openItemPopup({item:r.item,receiverProfile:this.shopService.shopReceiver.profile,gameId:i,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(s=>console.warn(s))}trackByFn(e,i){return i.item.id}sortPacks(e){return new ie.List(e).orderBy([i=>{if(i.flags&&i.flags.new&&!i.owned)return!0},i=>{if(i.flags&&i.flags.promo&&!i.owned)return!0},i=>i.owned],ie.ESort.Asc,ie.ESort.Asc,ie.ESort.Asc).toArray()}isButtonDisabled(e){return!(!e.prices[ln.Chips]||e.owned)&&this.isInWaitingState}clickDisabled(){this.toast.warn("POPUP.DISABLED_CHIPS_USE")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();function $kt(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.OWNED")))}function Kkt(t,n){if(1&t&&(p(0,"div",3),B(1,"icon-component",4),p(2,"p",5)(3,"span",6),H(4),V(5,"translate"),m(),p(6,"span",7)(7,"span"),H(8),m(),p(9,"span"),H(10),V(11,"timeLeft"),m()()()()),2&t){const o=_(2);d(),l("icon",o.EIcons.CLOCK_ICON),d(3),se($(5,4,"SHOP.RENTED")),d(4),se(o.timeUnderAMinute?"<":""),d(2),se($(11,6,o.rentTimeLeft))}}function Zkt(t,n){if(1&t&&(p(0,"div"),U(1,$kt,3,3,"p",1)(2,Kkt,12,8,"div",2),m()),2&t){const o=_();ni("item-store-ribbon__container--ribbon-status ",o.clientStoreProduct.group,""),Hn("data-cy","itemStoreItemRibbon_"+(o.clientStoreProduct.owned?"owned":"")),d(),l("ngIf",o.clientStoreProduct.item.durability!==o.durabilityType.Expireable),d(),l("ngIf",o.clientStoreProduct.item.durability===o.durabilityType.Expireable)}}let Fye=(()=>{var t;class n{constructor(e){this.durabilityType=Fe.XM,this.timeUnderAMinute=!1,this.EIcons=ve.EIcons,this.shopRentTimerService=e}ngOnInit(){this.clientStoreProduct.item.durability===Fe.XM.Expireable&&this.clientStoreProduct.owned&&(this.setRentTime(),this.timerTickSubscription=this.shopRentTimerService.timerTick.subscribe(e=>{e===this.clientStoreProduct.item.id&&this.setRentTime()}))}ngDoCheck(){this.clientStoreProduct.item.durability===Fe.XM.Expireable&&this.clientStoreProduct.owned&&!this.timerTickSubscription&&(this.setRentTime(),this.timerTickSubscription=this.shopRentTimerService.timerTick.subscribe(e=>{e===this.clientStoreProduct.item.id&&this.setRentTime()}))}setRentTime(){this.shopRentTimerService.deleteTimer(this.clientStoreProduct.item.id);let e=this.shopRentTimerService.addAndGetRentTime(this.clientStoreProduct.item.id,this.clientStoreProduct.expiresAt);!e||e&&e.timeLeft.total<=0?(this.rentTimeLeft=60,this.timeUnderAMinute=!0,this.timerTickSubscription&&this.timerTickSubscription.unsubscribe(),this.timerTickSubscription=null):e.timeLeft.total>60?(this.rentTimeLeft=e.timeLeft.total,this.timeUnderAMinute=!1):(this.rentTimeLeft=60,this.timeUnderAMinute=!0)}ngOnDestroy(){this.timerTickSubscription&&this.timerTickSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(YI))},t.\u0275cmp=pe({type:t,selectors:[["item-store-ribbon"]],inputs:{clientStoreProduct:"clientStoreProduct"},decls:1,vars:1,consts:[[3,"class",4,"ngIf"],[4,"ngIf"],["class","item-store-ribbon__container--ribbon-rent",4,"ngIf"],[1,"item-store-ribbon__container--ribbon-rent"],[1,"item-store-ribbon__container--ribbon-icon",3,"icon"],[1,"rent-text"],[1,"rent-text-title"],[1,"rent-text-remaining-time"]],template:function(e,i){1&e&&U(0,Zkt,3,6,"div",0),2&e&&l("ngIf",i.clientStoreProduct.owned)},dependencies:[Ne,Dn,qe,Ps],styles:["[_nghost-%COMP%]{display:block}.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]{position:relative;height:4rem;width:100%;display:flex;justify-content:center;align-items:center}.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:100%;text-align:center;z-index:2;transform:translate(-50%,-50%);font-size:1.4rem;text-transform:uppercase;word-break:break-all}@media only screen and (max-width: 568px){.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1rem}}.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%]{position:absolute;width:100%;height:80%;top:50%;left:50%;transform:translate(-50%,-50%);padding:1% 7%;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 530px){.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%]{top:46%}}.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;height:100%;vertical-align:middle;line-height:100%}@media only screen and (max-width: 530px){.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{height:80%}}.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{padding-left:.5rem;width:100%;height:50%}.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span.rent-text-title[_ngcontent-%COMP%]{font-size:1.4rem}@media only screen and (max-width: 568px){.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span.rent-text-title[_ngcontent-%COMP%]{font-size:1rem}}.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span.rent-text-remaining-time[_ngcontent-%COMP%]{font-size:1.2rem}@media only screen and (max-width: 568px){.item-store-ribbon__container--ribbon-status[_ngcontent-%COMP%]   .item-store-ribbon__container--ribbon-rent[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span.rent-text-remaining-time[_ngcontent-%COMP%]{font-size:.8rem}}"]}),n})();function Qkt(t,n){1&t&&B(0,"loader-image",4),2&t&&l("loaderImageClass","buy-item-store-box__loader")("transparentBG",!1)}let em=(()=>{var t;class n{constructor(){this.buttonClicked=new ke,this.disabledClick=new ke}ngOnInit(){this.imageUrl||(this.imageUrl="".concat(Lt.CONFIG.core.cdn.url).concat(this.clientStoreProduct.item.data.previewUrl)),this.clientStoreProduct.item.data.storeSpritesheetUrl&&!this.spritesheet&&(this.spritesheet="".concat(Lt.CONFIG.core.cdn.url).concat(this.clientStoreProduct.item.data.storeSpritesheetUrl))}buyClick(){this.buttonClicked.next(this.clientStoreProduct)}clickDisabled(){this.disabledClick.next(this.clientStoreProduct)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["buy-item-store-box"]],inputs:{clientStoreProduct:"clientStoreProduct",gameId:"gameId",imageUrl:"imageUrl",spritesheet:"spritesheet",isDisabled:"isDisabled",loading:"loading"},outputs:{buttonClicked:"buttonClicked",disabledClick:"disabledClick"},decls:4,vars:9,consts:[["click-feedback","",1,"buy-item-store-box__wrapper"],[3,"loaderImageClass","transparentBG",4,"ngIf"],[3,"clientStoreProduct","isDisabled","gameId","spritesheet","imageUrl","select","disableClick"],[1,"buy-item-store-box__owned",3,"clientStoreProduct"],[3,"loaderImageClass","transparentBG"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,Qkt,1,2,"loader-image",1),p(2,"shop-item-container",2),Y("select",function(){return i.buyClick()})("disableClick",function(){return i.clickDisabled()}),m(),B(3,"item-store-ribbon",3),m()),2&e&&(d(),l("ngIf",i.loading),d(),nb("buy-item-store-box__container--main"),l("clientStoreProduct",i.clientStoreProduct)("isDisabled",i.isDisabled)("gameId",i.gameId)("spritesheet",i.spritesheet)("imageUrl",i.imageUrl),d(),l("clientStoreProduct",i.clientStoreProduct))},dependencies:[Ne,Oi,po,XC,Fye],styles:[".buy-item-store-box__wrapper[_ngcontent-%COMP%]{position:relative;z-index:1;width:100%;height:100%}.buy-item-store-box__owned[_ngcontent-%COMP%]{width:102%;position:absolute;top:-2rem;left:-.2rem;z-index:10000}"]}),n})();const Ykt=(t,n)=>({"with-margin-bottom":t,popup__outlet:n});function Jkt(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit,s=_();return re(s.clickHandler(r,s.gameId))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",cn(6,Ykt,e,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup))("clientStoreProduct",o)("loading",o.loading)("gameId",i.gameId)("isDisabled",i.isButtonDisabled(o)),Hn("data-cy",o.item.id)}}let hH=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,u,h),this.contextEnum=Wr,this.activatedComponentRoute=s,this.type=a.snapshot.queryParams.subType||a.snapshot.params.subType}ngOnInit(){this.type?super.ngOnInit():this.router.navigate(["inventory"],{relativeTo:this.route.parent})}getItems(){return this.shopService.getShopInventoryCollection([this.type])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-decks"]],features:[mn([ia]),Ht],decls:3,vars:2,consts:[[1,"shop-decks__wrapper"],["wrapper",""],["class","shop-decks__box",3,"ngClass","clientStoreProduct","loading","gameId","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-decks__box",3,"ngClass","clientStoreProduct","loading","gameId","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,Jkt,1,9,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-decks__push-the-bottom-box[_ngcontent-%COMP%]{width:100%;height:8rem}@media only screen and (max-width: 1280px){.shop-decks__push-the-bottom-box[_ngcontent-%COMP%]{height:5rem}}"]}),n})();const b2=[{path:"deck/:game",data:{pageId:Mn.ShopDecks},component:hH},{path:"deck/:game/:subType",data:{pageId:Mn.ShopDecks},component:hH}],Xkt=(t,n)=>({"with-margin-bottom":t,popup__outlet:n});function eLt(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit,s=_();return re(s.clickHandler(r,s.gameId))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",cn(6,Xkt,e,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup))("clientStoreProduct",o)("isDisabled",i.isButtonDisabled(o))("loading",o.loading)("gameId",i.gameId),Hn("data-cy",o.item.id)}}let Uye=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,u,h),this.contextEnum=Wr,this.activatedComponentRoute=s}getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.Table])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-tables"]],features:[mn([ia]),Ht],decls:3,vars:2,consts:[[1,"shop-tables__wrapper"],["wrapper",""],["class","shop-tables__box",3,"ngClass","clientStoreProduct","isDisabled","loading","gameId","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-tables__box",3,"ngClass","clientStoreProduct","isDisabled","loading","gameId","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,eLt,1,9,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em]}),n})();const C2=[{path:"table/:game",data:{pageId:Mn.ShopTables},component:Uye}],tLt=(t,n)=>({"with-margin-bottom":t,popup__outlet:n});function nLt(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit,s=_();return re(s.clickHandler(r,s.gameId))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",cn(5,tLt,e,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup))("clientStoreProduct",o)("loading",o.loading)("isDisabled",i.isButtonDisabled(o))("gameId",i.gameId)}}let Gye=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,u,h),this.contextEnum=Wr,this.activatedComponentRoute=s}getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.Dice])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-dice"]],features:[mn([ia]),Ht],decls:3,vars:2,consts:[[1,"shop-dice__wrapper"],["wrapper",""],["class","shop-dice__box",3,"ngClass","clientStoreProduct","loading","isDisabled","gameId","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-dice__box",3,"ngClass","clientStoreProduct","loading","isDisabled","gameId","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,nLt,1,8,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-dice__push-the-bottom-box[_ngcontent-%COMP%]{width:100%;height:8rem}@media only screen and (max-width: 1280px){.shop-dice__push-the-bottom-box[_ngcontent-%COMP%]{height:5rem}}"]}),n})();const y2=[{path:"dice/:game",data:{pageId:Mn.ShopDice},component:Gye}],iLt=(t,n)=>({"with-margin-bottom":t,popup__outlet:n});function oLt(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit,s=_();return re(s.clickHandler(r,s.gameId))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",cn(5,iLt,e,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup))("clientStoreProduct",o)("loading",o.loading)("gameId",i.gameId)("isDisabled",i.isButtonDisabled(o))}}let Vye=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,h,u),this.contextEnum=Wr,this.activatedComponentRoute=s}getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.Pawn])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g(Dt),g($t))},t.\u0275cmp=pe({type:t,selectors:[["shop-pawns"]],features:[mn([ia]),Ht],decls:3,vars:2,consts:[[1,"shop-pawns__wrapper"],["wrapper",""],["class","shop-pawns__box",3,"ngClass","clientStoreProduct","loading","gameId","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-pawns__box",3,"ngClass","clientStoreProduct","loading","gameId","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,oLt,1,8,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-pawns__push-the-bottom-box[_ngcontent-%COMP%]{width:100%;height:8rem}@media only screen and (max-width: 1280px){.shop-pawns__push-the-bottom-box[_ngcontent-%COMP%]{height:5rem}}"]}),n})();const S2=[{path:"pawn/:game",data:{pageId:Mn.ShopPawns},component:Vye}];let zye=(()=>{var t;class n{constructor(){this.buyClicked=new ke}ngOnInit(){this.price=this.clientStoreProduct.prices[this.shopConfig.defaultCurrency],this.currency=this.shopConfig.defaultCurrency,this.value=this.clientStoreProduct.item.amount}ngOnChanges(e){e.receiver&&!e.receiver.firstChange&&(this.value=this.clientStoreProduct.item.amount)}buyClick(){this.buyClicked.next(this.clientStoreProduct)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["exchange-box"]],inputs:{shopConfig:"shopConfig",clientStoreProduct:"clientStoreProduct",receiver:"receiver"},outputs:{buyClicked:"buyClicked"},features:[it],decls:3,vars:7,consts:[["click-feedback","",3,"title","clientStoreProduct","imageUrl","buyClicked"]],template:function(e,i){1&e&&(p(0,"shop-item-container",0),Y("buyClicked",function(){return i.buyClick()}),V(1,"formatNumber"),V(2,"transformUrl"),m()),2&e&&l("title",$(1,3,i.value))("clientStoreProduct",i.clientStoreProduct)("imageUrl",$(2,5,"shop/items/"+i.clientStoreProduct.item.id+".png"))},dependencies:[po,XC,Go,uo]}),n})();const rLt=(t,n)=>n.eventParams.responseEngagementID,sLt=(t,n)=>n.data.triggerId;function aLt(t,n){if(1&t&&(p(0,"div",0),B(1,"image-message-wrapper",1),m()),2&t){const o=n.$implicit;d(),l("openedFrom","shop:promo")("params",o)}}function cLt(t,n){if(1&t&&(p(0,"div",0),B(1,"braze-tile-message",2),m()),2&t){const o=n.$implicit;d(),l("engagement",o)}}function lLt(t,n){if(1&t&&(vT(0,aLt,2,2,"div",3,rLt),vT(2,cLt,2,1,"div",3,sLt)),2&t){const o=_();bT(o.ddnaPromotions),d(2),bT(o.brazePromotions)}}const uLt=()=>({textKey:"SHOP.EMPTY_PROMO_TAB"}),dLt=t=>[t];function pLt(t,n){1&t&&B(0,"empty-content",4),2&t&&l("textArray",ne(2,dLt,pt(1,uLt)))}let jye=(()=>{var t;class n{constructor(){this.deltaEngagementManager=mt(Um),this.brazeEngagementService=mt(U_),this.destroyRef=mt(br)}ngOnInit(){this.brazeEngagementService.storeOffers.pipe(mi(this.destroyRef)).subscribe(e=>{this.brazePromotions=e}),this.deltaEngagementManager.storePromotions.pipe(mi(this.destroyRef)).subscribe(e=>{this.ddnaPromotions=e})}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["shop-promo"]],decls:2,vars:1,consts:[[1,"shop-promo__item"],[1,"shop-promo__item-content",3,"openedFrom","params"],[1,"shop-promo__item-content",3,"engagement"],["class","shop-promo__item"],[3,"textArray"]],template:function(e,i){1&e&&U(0,lLt,4,0)(1,pLt,1,4),2&e&&Qo(0,null!=i.ddnaPromotions&&i.ddnaPromotions.length||null!=i.brazePromotions&&i.brazePromotions.length?0:1)},dependencies:[bo,nM,VL],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-flow:row wrap;justify-content:center;align-content:flex-start}.shop-promo__item[_ngcontent-%COMP%]{height:0;margin:1rem;position:relative;overflow:hidden;flex:0 0 auto}.shop-promo__item-content[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}"]}),n})();const Hye=[{path:"promo",data:{pageId:Mn.Promo},component:jye}];var hLt=ve.EIcons;function mLt(t,n){if(1&t&&B(0,"currency-component",9),2&t){const o=_().$implicit,e=_();l("currency","chipPack"===o.type?e.currencyType.Chips:e.currencyType.Gems)("value",o.amount)}}function fLt(t,n){if(1&t&&(p(0,"div",10),B(1,"icon-component",11),p(2,"span",12),H(3),V(4,"timeLeft"),m()()),2&t){const o=_().$implicit,e=_();d(),l("icon",e.iconNames.CROWN),d(2),se($(4,2,o.lifeTime))}}function gLt(t,n){if(1&t&&(p(0,"div"),U(1,mLt,1,2,"currency-component",7)(2,fLt,5,4,"div",8),m()),2&t){const o=n.$implicit;d(),l("ngIf","chipPack"===o.type||"gemsPack"===o.type),d(),l("ngIf","vip"===o.type)}}function _Lt(t,n){if(1&t&&(p(0,"span",13),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se($(2,1,"LOCALE.CURRENCY_SIGNS."+o.currency.toUpperCase()))}}let qye=(()=>{var t;class n{constructor(){this.currencyType=ln,this.iconNames=hLt}ngOnInit(){this.currency=Object.keys(this.packData.prices)[0]}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["bank-pack-box"]],inputs:{packData:"packData"},decls:12,vars:9,consts:[[1,"bank-pack-box__wrapper"],[1,"bank-pack-box__container--image"],["empty-placeholder","",3,"imgSrc"],[1,"bank-pack-box__container--info"],[4,"ngFor","ngForOf"],[1,"bank-pack-box__container--price"],["class","currency",4,"ngIf"],["class","bank-pack-box__container__currency",3,"currency","value",4,"ngIf"],["class","bank-pack-box__container--vip",4,"ngIf"],[1,"bank-pack-box__container__currency",3,"currency","value"],[1,"bank-pack-box__container--vip"],[3,"icon"],[1,"bank-pack-box__container--vip__amount"],[1,"currency"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),B(2,"img",2),V(3,"transformUrl"),m(),p(4,"div",3),U(5,gLt,3,2,"div",4),m(),p(6,"div",5)(7,"p"),U(8,_Lt,3,3,"span",6),p(9,"span"),H(10),V(11,"formatNumber"),m()()()()),2&e&&(d(2),l("imgSrc",$(3,4,"shop/items/"+i.packData.item.id+".png")),d(3),l("ngForOf",i.packData.item.items),d(3),l("ngIf",i.currency),d(2),se(yt(11,6,i.packData.prices[i.currency],!0)))},dependencies:[Mt,Ne,Dn,So,$o,qe,Ps,Go,uo],styles:[".bank-pack-box__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;padding:1rem 0;min-height:inherit;display:flex;flex-flow:column nowrap}.bank-pack-box__container--image[_ngcontent-%COMP%]{width:100%;height:calc(100% - 14rem);display:flex;justify-content:center;align-items:center}.bank-pack-box__container--image[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:100%;max-width:100%}.bank-pack-box__container--info[_ngcontent-%COMP%]{width:100%;height:10rem;display:flex;flex-flow:column nowrap;justify-content:space-around;padding:0 1.8rem;font-size:1.8rem;text-align:center}@media only screen and (max-width: 568px){.bank-pack-box__container--info[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 480px){.bank-pack-box__container--info[_ngcontent-%COMP%]{font-size:1.2rem;padding:1.5rem}}.bank-pack-box__container--price[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;padding:0 25%;font-size:1.8rem}.bank-pack-box__container--price[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;margin:auto}.bank-pack-box__container--price[_ngcontent-%COMP%] > p[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{z-index:2}@media only screen and (max-width: 568px){.bank-pack-box__container--price[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 480px){.bank-pack-box__container--price[_ngcontent-%COMP%]{font-size:1.2rem}}.bank-pack-box__container--vip[_ngcontent-%COMP%]{display:flex;align-items:center}.bank-pack-box__container--vip__amount[_ngcontent-%COMP%]{margin-left:.3rem}.bank-pack-box__container__currency[_ngcontent-%COMP%]{font-size:1.8rem}@media only screen and (max-width: 568px){.bank-pack-box__container__currency[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 480px){.bank-pack-box__container__currency[_ngcontent-%COMP%]{font-size:1.2rem}}"]}),n})(),mH=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[No,xi,Yi,Io]}),n})();const vLt=(t,n)=>({"with-margin-bottom":t,popup__outlet:n});function bLt(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit;return re(_().clickHandler(r))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",cn(5,vLt,e,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup))("clientStoreProduct",o)("loading",o.loading)("isDisabled",i.isButtonDisabled(o)),Hn("data-cy",o.item.id)}}let fH=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,u,h),this.contextEnum=Wr,this.activatedComponentRoute=s}getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.EmojiSet,Fe.TG.PhraseSet])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-emojis-phrases"]],features:[Ht],decls:3,vars:2,consts:[[1,"shop-emojis-phrases__wrapper"],["wrapper",""],["class","shop-emojis-phrases__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-emojis-phrases__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,bLt,1,8,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em]}),n})();const w2=[{path:"emotions",data:{pageId:Mn.ShopEmojis},component:fH}],CLt=t=>({timeConfig:t});let Wye=(()=>{var t;class n{constructor(){this.isDisabled=!1,this.timeLeftConfig=Zu,this.buyClicked=new ke,this.disabledClick=new ke}buyClick(){this.buyClicked.next(this.clientStoreProduct)}clickDisabled(){this.disabledClick.next(this.clientStoreProduct)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["buy-booster-box"]],inputs:{clientStoreProduct:"clientStoreProduct",isDisabled:"isDisabled"},outputs:{buyClicked:"buyClicked",disabledClick:"disabledClick"},decls:4,vars:14,consts:[["click-feedback","",3,"title","secondTitle","clientStoreProduct","isDisabled","imageUrl","select","disableClick"]],template:function(e,i){1&e&&(p(0,"shop-item-container",0),Y("select",function(){return i.buyClick()})("disableClick",function(){return i.clickDisabled()}),V(1,"timeLeft"),V(2,"translate"),V(3,"transformUrl"),m()),2&e&&l("title",yt(1,5,i.clientStoreProduct.item.lifeTime,ne(12,CLt,i.timeLeftConfig)))("secondTitle",$(2,8,"SHOP.XP_BOOSTER"))("clientStoreProduct",i.clientStoreProduct)("isDisabled",i.isDisabled)("imageUrl",$(3,10,"shop/items/"+i.clientStoreProduct.item.id+".png"))},dependencies:[po,XC,qe,Ps,uo]}),n})();const $ye=t=>({popup__outlet:t}),yLt=t=>({timeConfig:t});function SLt(t,n){if(1&t&&(p(0,"div",4)(1,"p",5)(2,"span"),H(3),m(),p(4,"span"),H(5),V(6,"timeLeft"),m(),p(7,"span"),H(8),V(9,"translate"),m()()()),2&t){const o=_();l("ngClass",ne(9,$ye,o.activatedComponentRoute.outletContext.container===o.contextEnum.Popup)),d(3),se(o.timeUnderAMinute?"<":""),d(2),se(yt(6,4,o.rentTimeLeft,ne(11,yLt,o.timeLeftConfig))),d(3),ze(" ",$(9,7,"SHOP.REMAINING"),"")}}function wLt(t,n){if(1&t){const o=Ce();p(0,"buy-booster-box",6),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buyClicked",function(){const r=oe(o).$implicit;return re(_().buyItem(r))}),m()}if(2&t){const o=n.$implicit,e=_();l("clientStoreProduct",o)("ngClass",ne(4,$ye,e.activatedComponentRoute.outletContext.container===e.contextEnum.Popup))("isDisabled",e.isButtonDisabled(o)),Hn("data-cy",o.item.id)}}let Kye=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.elRef=c,this.contextEnum=Wr,this.timeUnderAMinute=!1,this.isInWaitingState=!1,this.membershipService=s,this.shopRentTimerService=r,this.shopService=e,this.store=a,this.activatedComponentRoute=i,this.toast=u}ngOnInit(){var e;const i=this.store.selectUserState().xp.xpBooster;this.timeLeftConfig=new yl(Zu).useYearsConfig({min:Rt.Months}).build(),i.isActive()&&(this.setBoostedXpTimeLeft(),this.timerTickSubscription=this.shopRentTimerService.timerTick.subscribe(r=>{"xpBooster"===r&&this.setBoostedXpTimeLeft()})),this.packs=this.sortPacks(this.shopService.getShopInventoryCollection([Fe.TG.Booster])),this.shopContentRefreshSubs=this.shopService.refreshShopContent.subscribe(()=>{this.packs=[],this.packs=this.sortPacks(this.shopService.getShopInventoryCollection([Fe.TG.Booster]))}),this.xpBoosterSubscription=this.membershipService.membershipTimeUpdate.subscribe(()=>{this.timerTickSubscription||(this.timerTickSubscription=this.shopRentTimerService.timerTick.subscribe(r=>{"xpBooster"===r&&this.setBoostedXpTimeLeft()})),this.setBoostedXpTimeLeft()}),this.isInCustomRoomWaitingStateSubscription=this.store.games.subscribeIsRoomInWaitingState().subscribe(r=>this.isInWaitingState=r),this.elRef.nativeElement.firstElementChild.classList.add(null===(e=this.activatedComponentRoute.route.snapshot.url[0])||void 0===e?void 0:e.path)}setBoostedXpTimeLeft(){let e=this.shopRentTimerService.addAndGetRentTime("xpBooster");!e||e&&e.timeLeft.total<=0?(this.rentTimeLeft=60,this.timeUnderAMinute=!0,this.timerTickSubscription&&this.timerTickSubscription.unsubscribe(),this.timerTickSubscription=null):e.timeLeft.total>60?(this.rentTimeLeft=e.timeLeft.total,this.timeUnderAMinute=!1):(this.rentTimeLeft=60,this.timeUnderAMinute=!0)}ngOnDestroy(){this.shopContentRefreshSubs&&this.shopContentRefreshSubs.unsubscribe(),this.xpBoosterSubscription&&this.xpBoosterSubscription.unsubscribe(),this.isInCustomRoomWaitingStateSubscription&&this.isInCustomRoomWaitingStateSubscription.unsubscribe()}sortPacks(e){return new ie.List(e).orderBy([i=>i.flags&&i.flags.bestValue,i=>i.flags&&i.flags.mostPopular,i=>!!i.owned],ie.ESort.Asc,ie.ESort.Asc,ie.ESort.Asc).toArray()}buyItem(e){this.shopService.openItemPopup({item:e.item,receiverProfile:this.shopService.shopReceiver.profile,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(i=>console.warn(i))}trackByFn(e,i){return i.item.id}isButtonDisabled(e){return!(!e.prices[ln.Chips]||e.owned)&&this.isInWaitingState}clickDisabled(){this.toast.warn("POPUP.DISABLED_CHIPS_USE")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(Pr),g(YI),g(v8),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-boosters"]],decls:4,vars:3,consts:[["class","shop-boosters__container--remaining-time-text",3,"ngClass",4,"ngIf"],[1,"shop-boosters__wrapper"],["wrapper",""],["class","shop-boosters__box",3,"clientStoreProduct","ngClass","isDisabled","disabledClick","buyClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-boosters__container--remaining-time-text",3,"ngClass"],[1,"booster_text--remaining-time"],[1,"shop-boosters__box",3,"clientStoreProduct","ngClass","isDisabled","disabledClick","buyClicked"]],template:function(e,i){1&e&&(U(0,SLt,10,13,"div",0),p(1,"section",1,2),U(3,wLt,1,6,"buy-booster-box",3),m()),2&e&&(l("ngIf",i.timerTickSubscription),d(3),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Ne,Wye,qe,Ps],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-boosters__container--remaining-time-text[_ngcontent-%COMP%]{width:100%;height:8rem;display:flex;justify-content:center;align-items:center;font-size:2.4rem;white-space:pre}@media only screen and (max-width: 1280px){.shop-boosters__container--remaining-time-text[_ngcontent-%COMP%]{height:6rem}}@media only screen and (max-width: 480px){.shop-boosters__container--remaining-time-text[_ngcontent-%COMP%]{height:3rem;font-size:1.8rem}}@media only screen and (max-width: 768px) and (orientation: landscape){.shop-boosters__container--remaining-time-text[_ngcontent-%COMP%]{height:3rem}}"]}),n})();const T2=[{path:"boosters",data:{pageId:Mn.ShopBoosters},component:Kye}];var TLt=Dc.EGameType;function PLt(t,n){1&t&&B(0,"span"),2&t&&ni("bg-img ",_().$implicit.type,"")}function ILt(t,n){if(1&t&&B(0,"img",13),2&t){const o=_().$implicit;l("imgSrc",_(2).cdn+o.itemViewModel.item.data.previewUrl)}}const MLt=()=>({isPriority:!0});function OLt(t,n){if(1&t&&B(0,"spritesheet-image-animation",14),2&t){const o=_().$implicit;l("spritesheet",_(2).cdn+o.itemViewModel.item.data.storeSpritesheetUrl)("animation",pt(2,MLt))}}function ELt(t,n){if(1&t){const o=Ce();p(0,"div",7),Y("click",function(){const r=oe(o).$implicit;return re(_(2).openCategory(r.type))}),p(1,"div",8),U(2,PLt,1,3,"span",9)(3,ILt,1,1,"img",10)(4,OLt,1,3,"spritesheet-image-animation",11),m(),p(5,"div",12)(6,"p"),H(7),V(8,"translate"),m()()()}if(2&t){const o=n.$implicit;d(),Hn("data-cy","inventoryContainer_"+o.type),d(),l("ngIf",!o.itemViewModel),d(),l("ngIf",o.itemViewModel&&!o.itemViewModel.item.data.storeSpritesheetUrl),d(),l("ngIf",null==o||null==o.itemViewModel?null:o.itemViewModel.item.data.storeSpritesheetUrl),d(3),se($(8,5,"SHOP.ITEMS."+o.group+".title"))}}function xLt(t,n){if(1&t&&(p(0,"div",4)(1,"p",5),H(2),V(3,"translate"),m(),U(4,ELt,9,7,"div",6),m()),2&t){const o=_();d(2),se($(3,3,"SHOP.GLOBAL_ITEMS")),d(2),l("ngForOf",o.globalItems)("ngForTrackBy",o.trackByFn)}}function ALt(t,n){if(1&t&&(p(0,"p",5),H(1),m()),2&t){const o=_(3);d(),se(o.gameSpecTitle)}}function RLt(t,n){if(1&t&&(p(0,"div",19),B(1,"img",20),V(2,"transformUrl"),B(3,"img",21),V(4,"transformUrl"),m()),2&t){const o=_(2).$implicit;d(),l("imgSrc",$(2,2,"platform-logos/"+o.id+".svg")),d(2),l("imgSrc",$(4,4,"platform-logos/"+o.id+"_stats.png"))}}function kLt(t,n){1&t&&B(0,"span"),2&t&&ni("bg-img ",_().$implicit.type,"")}function LLt(t,n){if(1&t&&B(0,"img",13),2&t){const o=_().$implicit;l("imgSrc",_(3).cdn+o.itemViewModel.item.data.previewUrl)}}function DLt(t,n){if(1&t){const o=Ce();p(0,"div",7),Y("click",function(){const r=oe(o).$implicit,s=_(2).$implicit;return re(_().openCategory(r.type,s))}),p(1,"div",8),U(2,kLt,1,3,"span",9)(3,LLt,1,1,"img",10),m(),p(4,"div",12)(5,"p"),H(6),V(7,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(2).$implicit;d(),Hn("data-cy",e.id+"_"+o.type),d(),l("ngIf",!o.itemViewModel),d(),l("ngIf",o.itemViewModel),d(3),se($(7,4,"SHOP.ITEMS."+o.group+".title"))}}function BLt(t,n){if(1&t&&(Tn(0),U(1,ALt,2,1,"p",17)(2,RLt,5,6,"div",18)(3,DLt,8,6,"div",6),Pn()),2&t){const o=_().$implicit,e=_();d(),l("ngIf",1===e.games.length),d(),l("ngIf",e.games.length>1),d(),l("ngForOf",e.gameSpecItems[o.id])("ngForTrackBy",e.trackByFn)}}function NLt(t,n){if(1&t&&(p(0,"div",15),U(1,BLt,4,4,"ng-container",16),m()),2&t){const o=n.$implicit,e=_();d(),l("ngIf",e.gameSpecItems&&e.gameSpecItems[o.id]&&e.gameSpecItems[o.id].length)}}let Zye=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.gameSpecItems={},this.cdn=Lt.CONFIG.core.cdn.url,this.gameSpecTitle="",this.contextEnum=Wr,this.shopTypes=[],this.translate=b,this.inventoryService=h,this.analyticsTrackingService=u,this.route=a,this.store=c,this.navigation=s,this.shopInventoryService=e,this.shopService=i,this.activatedComponentRoute=r,this.globalItems=[]}ngOnInit(){var e=this;return f(function*(){e.shopReceiver=e.shopService.shopReceiver,e.shop=yield e.shopService.load(),e.games=e.getGamesList(),e.buildView(),e.games&&1===e.games.length&&(e.gameSpecTitle=e.getSingleGameTitle())})()}trackByFn(e,i){return i.type}openCategory(e,i){this.navigation.navigate(i?[e,i.id]:[e],{relativeTo:this.route.parent,queryParams:{subType:e}}).then(()=>{const s=this.shopService.isCurrentUserReceiver()?"myProfile":"otherProfile",a=new aa.DefaultEvent(Nn.Navigation,"shop:".concat(s),{label:"shopTab:".concat(e)});this.analyticsTrackingService.sendEvent(a)}).catch(s=>{console.error("Shop changeCategory navigation error:",s)})}buildView(){const e=this.shopReceiver.profile.inventory.items.concat(this.shopReceiver.gameInventory.items);this.shop.products.map(r=>r.item).concat(e.map(r=>r.item)).forEach(r=>{this.inventoryService.isInventoryType(r.type)&&-1===this.shopTypes.indexOf(r.type)&&!this.inventoryService.isInventoryItemTypeInGeneralTabs(r.type)&&this.shopTypes.push(r.type)}),this.shopTypes.forEach(r=>{if(this.inventoryService.isGlobalInventoryType(r)){let s=this.shopInventoryService.getGlobalInventoryCategory(r,e);s&&this.globalItems.push(s)}else this.games.forEach(s=>{if(this.inventoryService.inventoryConfig.find(c=>c.type===r&&-1!==c.gamesAvailable.indexOf(s.id))){let c=this.shopInventoryService.getGameSpecificCategory(r,e,s);c&&(this.gameSpecItems[s.id]?this.gameSpecItems[s.id].push(c):this.gameSpecItems[s.id]=[c])}})})}getGamesList(){let e=new ie.List([]);Lt.CONFIG.content.games.list.filter(s=>s.type===TLt.Multiplayer).forEach(s=>{e.add({id:s.id,orderPriority:void 0})});const i=Lt.CONFIG.content.games.grid;i&&i.length&&e.forEach(s=>{var a;s.orderPriority=null===(a=Lt.CONFIG.content.games.grid.find(c=>c.id===s.id))||void 0===a?void 0:a.orderPriority});const r=this.store.selectSync(Ph).settings.region.toLowerCase();return new ie.List(this.orderByPriority(e.toArray(),r))}orderByPriority(e,i,r=ie.ESort.Desc){return bA()(e,[s=>s.orderPriority&&s.orderPriority[i]?s.orderPriority[i]:0],[r]).filter(s=>!s.orderPriority||-1!==s.orderPriority[i])}getSingleGameTitle(){let e="";for(let i in this.gameSpecItems)this.gameSpecItems[i].forEach((r,s)=>{let a=this.translate.instant("SHOP.ITEMS.".concat(r.type,".title"));a="".concat(a[0].toUpperCase()).concat(a.slice(1,a.length)),e+=s===this.gameSpecItems[i].length-2?"".concat(a," ").concat(this.translate.instant("WORDS.AND")," "):s===this.gameSpecItems[i].length-1?"".concat(a):"".concat(a,", ")});return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(uve),g(Ko),g(Pr),g(Yt),g(Po),g(J),g(yi),g(cc),g(ls))},t.\u0275cmp=pe({type:t,selectors:[["shop-inventory"]],features:[mn([ia])],decls:4,vars:2,consts:[[1,"shop-inventory__wrapper"],["wrapper",""],["class","shop-inventory__container--global-items",4,"ngIf"],["class","shop-inventory__container--game-spec-items",4,"ngFor","ngForOf"],[1,"shop-inventory__container--global-items"],[1,"shop-inventory__text--title"],["class","shop-inventory__container--item",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-inventory__container--item",3,"click"],[1,"shop-inventory__container--tile"],[3,"class",4,"ngIf"],["class","bg-img item","empty-placeholder","",3,"imgSrc",4,"ngIf"],["class","shop-inventory__spritesheet",3,"spritesheet","animation",4,"ngIf"],[1,"shop-inventory__container--item-text"],["empty-placeholder","",1,"bg-img","item",3,"imgSrc"],[1,"shop-inventory__spritesheet",3,"spritesheet","animation"],[1,"shop-inventory__container--game-spec-items"],[4,"ngIf"],["class","shop-inventory__text--title",4,"ngIf"],["class","shop-inventory__container--game-logo",4,"ngIf"],[1,"shop-inventory__container--game-logo"],["empty-placeholder","",1,"shop-inventory__game--logo",3,"imgSrc"],["empty-placeholder","",1,"shop-inventory__game--second-logo",3,"imgSrc"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,xLt,5,5,"div",2)(3,NLt,2,1,"div",3),m()),2&e&&(d(2),l("ngIf",i.globalItems&&i.globalItems.length),d(),l("ngForOf",i.games))},dependencies:[Mt,Ne,$o,av,qe,uo],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-inventory__wrapper[_ngcontent-%COMP%]{flex-flow:column nowrap}.shop-inventory__container--global-items[_ngcontent-%COMP%], .shop-inventory__container--game-spec-items[_ngcontent-%COMP%]{width:100%;height:max-content;display:flex;flex-flow:row wrap;align-items:center;justify-content:center}@media only screen and (max-width: 568px){.shop-inventory__container--global-items[_ngcontent-%COMP%], .shop-inventory__container--game-spec-items[_ngcontent-%COMP%]{justify-content:space-evenly}}.shop-inventory__container--game-logo[_ngcontent-%COMP%]{width:100%;height:8rem;display:flex;justify-content:center}@media only screen and (max-width: 568px){.shop-inventory__container--game-logo[_ngcontent-%COMP%]{height:5rem}}.shop-inventory__game--logo[_ngcontent-%COMP%]{height:100%;margin:0 .5rem}.shop-inventory__text--title[_ngcontent-%COMP%]{width:100%;height:4rem;font-size:2.4rem;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 568px){.shop-inventory__text--title[_ngcontent-%COMP%]{font-size:1.8rem;height:3rem}}.shop-inventory__container--item[_ngcontent-%COMP%]{position:relative;width:calc(33.33% - 3rem);height:17rem;margin:1rem 1.5rem}@media only screen and (max-width: 568px){.shop-inventory__container--item[_ngcontent-%COMP%]{width:calc(50% - 2rem);height:12rem;margin:.5rem .5rem 1rem}}.shop-inventory__container--item[_ngcontent-%COMP%]   .shop-inventory__container--tile[_ngcontent-%COMP%]{position:relative;width:100%;height:calc(100% - 3rem)}.shop-inventory__container--item[_ngcontent-%COMP%]   .shop-inventory__container--tile[_ngcontent-%COMP%]   .bg-img[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.shop-inventory__container--item[_ngcontent-%COMP%]   .shop-inventory__container--tile[_ngcontent-%COMP%]   .bg-img.item[_ngcontent-%COMP%]{height:80%}.shop-inventory__container--item[_ngcontent-%COMP%]   .shop-inventory__container--item-text[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center}.shop-inventory__container--item[_ngcontent-%COMP%]   .shop-inventory__container--item-text[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem;text-transform:uppercase;text-align:center;margin-top:.5rem}.shop-inventory__spritesheet[_ngcontent-%COMP%]{width:80%;max-width:130px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media only screen and (max-width: 568px){.shop-inventory__spritesheet[_ngcontent-%COMP%]{max-width:80px}}.shop-inventory__game--second-logo[_ngcontent-%COMP%]{display:none}"]}),n})();const P2=[{path:"inventory",data:{pageId:Mn.ShopInventory},component:Zye}],FLt=(t,n)=>({"with-margin-bottom":t,popup__outlet:n});function ULt(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit;return re(_().clickHandler(r))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",cn(5,FLt,e,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup))("clientStoreProduct",o)("loading",o.loading)("isDisabled",i.isButtonDisabled(o)),Hn("data-cy",o.item.id)}}let Qye=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,u,h),this.contextEnum=Wr,this.activatedComponentRoute=s}getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.Frame])}sortPacks(e){return new ie.List(e).orderBy([i=>{if(i.flags&&i.flags.new&&!i.owned)return!0},i=>{if(i.flags&&i.flags.promo&&!i.owned)return!0},i=>"vipFrame"===i.item.id,i=>i.owned],ie.ESort.Asc,ie.ESort.Asc,ie.ESort.Desc,ie.ESort.Asc).toArray()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-frames"]],features:[Ht],decls:3,vars:2,consts:[[1,"shop-frames__wrapper"],["wrapper",""],["class","shop-frames__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-frames__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,ULt,1,8,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em]}),n})();const gH=[{path:"frame",data:{pageId:Mn.ShopFrames},component:Qye}],GLt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),Yye=t=>[t];function VLt(t,n){1&t&&B(0,"empty-content",8),2&t&&l("textArray",ne(2,Yye,pt(1,GLt)))}function zLt(t,n){1&t&&B(0,"loader-image",9),2&t&&l("transparentBG",!0)}function jLt(t,n){if(1&t&&(p(0,"p",16),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),se(yt(2,1,"SHOP.SUBSCRIPTION_DOWNGRADE_MESSAGE",ne(4,Yye,o.getDeferredItemTranslation())))}}function HLt(t,n){1&t&&(p(0,"p",17),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.ACTIVE_SUBSCRIPTION_ALERT")))}function qLt(t,n){1&t&&(p(0,"p",17),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.ACTIVE_SUBSCRIPTION_ANOTHER_DEVICE_ALERT")))}function WLt(t,n){1&t&&(p(0,"p",16),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.PENDING_PAYMENT_COMPLETE_ALERT")))}function $Lt(t,n){if(1&t&&(p(0,"container-component",13),U(1,jLt,3,6,"p",14)(2,HLt,3,3,"p",15)(3,qLt,3,3,"p",15)(4,WLt,3,3,"p",14),m()),2&t){const o=_(2);d(),l("ngIf",!o.hasPendingSubscription()&&o.hasDefferedItem()&&!o.isSubscribedWithOtherAccount()),d(),l("ngIf",o.isSubscribedWithOtherAccount()),d(),l("ngIf",o.isSubscribedOnOtherDevice()),d(),l("ngIf",o.hasPendingSubscription())}}function KLt(t,n){if(1&t){const o=Ce();p(0,"section",10)(1,"offer-buy-item-list",11),Y("itemSelect",function(i){return oe(o),re(_().selectItem(i))}),U(2,$Lt,5,4,"container-component",12),m()()}if(2&t){const o=_();d(),l("offers",o.packs)("user",o.currentUser)("shopUsageIntent",o.shopState.usageIntent)("activeClubDonationRequests",o.activeClubDonationRequests)("activeSubscriptions",o.activeSubscriptions.items),d(),l("ngIf",o.isMobileApp()&&!o.activeSubscriptions.loadingState.isLoading&&(o.isSubscribedWithOtherAccount()||o.isSubscribedOnOtherDevice()||o.hasPendingSubscription()||o.hasDefferedItem()))}}function ZLt(t,n){if(1&t){const o=Ce();p(0,"div",18)(1,"p",19),Y("click",function(){return oe(o),re(_().manageSubscriptions())}),H(2),V(3,"translate"),m()()}2&t&&(d(2),se($(3,1,"SHOP.MANAGE_SUBSCRIPTIONS")))}function QLt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",24),Y("onClick",function(){return oe(o),re(_(2).restorePurchases())}),p(1,"span",22),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2);l("loading",null==o.restorePurchasesState?null:o.restorePurchasesState.inProgress)("bclass","shop-vip__button--benefits-bclass old-design"),d(2),se($(3,3,"SHOP.RESTORE_PURCHASES"))}}const Jye=t=>({name:t});function YLt(t,n){if(1&t&&(p(0,"div",20)(1,"button-icon-text",21)(2,"span",22),H(3),V(4,"translate"),m()(),U(5,QLt,4,5,"button-icon-text",23),m()),2&t){const o=_(),e=Kt(8);d(),l("icon",ne(9,Jye,o.EIcons.INFO_ICON))("tooltipMaxDimensions",o.tooltipMaxDimensions)("tooltipTemplate",e)("buttonModifier",o.EButtonModifier.BUTTON_TRANSPARENT)("bclass","shop-vip__button--benefits-bclass old-design"),d(2),se($(4,7,"BUTTON.VIEW_ALL_BENEFITS")),d(2),l("ngIf",o.getPlatform()===o.EAppPlatform.Ios)}}function JLt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",27),Y("onClick",function(){return oe(o),re(_(2).restorePurchases())}),p(1,"span",22),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2);l("loading",null==o.restorePurchasesState?null:o.restorePurchasesState.inProgress)("buttonModifier",o.EButtonModifier.BUTTON_ACTION)("bclass","shop-vip__button--benefits-bclass"),d(2),se($(3,4,"SHOP.RESTORE_PURCHASES"))}}function XLt(t,n){if(1&t&&(p(0,"div",25)(1,"button-icon-text",21)(2,"span",22),H(3),V(4,"translate"),m()(),U(5,JLt,4,6,"button-icon-text",26),m()),2&t){const o=_(),e=Kt(8);d(),l("icon",ne(9,Jye,o.EIcons.INFO_ICON))("tooltipMaxDimensions",o.tooltipMaxDimensions)("tooltipTemplate",e)("buttonModifier",o.EButtonModifier.BUTTON_BENEFITS)("bclass","shop-vip__button--benefits-bclass"),d(2),se($(4,7,"BUTTON.VIEW_ALL_BENEFITS")),d(2),l("ngIf",o.getPlatform()===o.EAppPlatform.Ios)}}function e2t(t,n){1&t&&(p(0,"p",31),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.SUBSCRIPTIONS_DESCRIPTION_TEXT_ANDROID")))}function t2t(t,n){1&t&&(p(0,"p",31),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"SHOP.SUBSCRIPTIONS_DESCRIPTION_TEXT_IOS")))}function n2t(t,n){if(1&t){const o=Ce();p(0,"div",28),U(1,e2t,3,3,"p",29)(2,t2t,3,3,"p",29),p(3,"p",30)(4,"span",19),Y("click",function(){return oe(o),re(_().openExternalUrl("/terms-of-use"))}),H(5),V(6,"translate"),m(),H(7," | "),p(8,"span",19),Y("click",function(){return oe(o),re(_().openExternalUrl("/privacy-policy"))}),H(9),V(10,"translate"),m()()()}if(2&t){const o=_();d(),l("ngIf",o.getPlatform()===o.EAppPlatform.Android),d(),l("ngIf",o.getPlatform()===o.EAppPlatform.Ios),d(3),se($(6,4,"LOGIN_COMPONENT.TERMS_OF_USE")),d(4),se($(10,6,"LOGIN_COMPONENT.PRIVACY_POLICY"))}}function i2t(t,n){if(1&t&&B(0,"shop-text-list",32),2&t){const o=_();l("title","VIP_BENEFITS_TITLE")("items",o.vipBenefits)("simpleStyling",!0)("modifierLocalization","VIP_BENEFITS.")}}let Xye=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.translate=i,this.navigation=u,this.appService=h,this.appLanguage=b,this.clientConfig=w,this.cdr=R,this.toaster=G,this.contextEnum=Wr,this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.packs=[],this.activeClubDonationRequests=[],this.EShopUsageIntent=ci,this.tooltipMaxDimensions={height:90,width:100,offsetHeight:0,offsetWidth:0},this.EAppPlatform=Ut,this.subscriptions=new ie.List,this.destroy=new sn,this.onAppResume=()=>{console.warn("OnResume"),this.isMyShopData&&0===this.store.payments.selectCurrentTransactions().length&&!this.store.payments.selectIsCompletingUnfinishedTransactions()&&this.getActiveDeviceSubscriptions()},this.shopService=e,this.activatedComponentRoute=r,this.store=s,this.shopState=s.shop[this.shopService.shopType].selectState(),this.clubsService=a,this.constants=c,this.vipBenefits=Object.keys(this.translate.instant("VIP_BENEFITS"))}ngOnInit(){var e=this;return f(function*(){e.currentUser=e.shopService.shopReceiver.profile,e.isMyShopData=e.shopService.isCurrentUserReceiver();const i=e.store.shop.activeDeviceSubscriptions.subscribeActiveDeviceSubscriptions();i.pipe(wn(e.destroy)).subscribe(h=>{e.activeSubscriptions=h,e.packs=e.getItems()});const r=e.store.clubs.subscribeDonationRequestsList();r.pipe(wn(e.destroy)).subscribe(h=>e.activeClubDonationRequests=h);const s=e.store.subscribeSimpleProfile(),a=e.store.subscribeVipState(),c=e.store.payments.subscribeLastTransaction();e.isMyShopData&&(s.pipe(wn(e.destroy)).subscribe(h=>e.currentUser=h),a.pipe(ws((h,b)=>{var w,R;return(null==h?void 0:h.isActiveSubscription())===(null==b?void 0:b.isActiveSubscription())&&(null==h||null===(w=h.custom)||void 0===w||null===(w=w.subscription)||void 0===w?void 0:w.item)===(null==b||null===(R=b.custom)||void 0===R||null===(R=R.subscription)||void 0===R?void 0:R.item)}),tr(1),wn(e.destroy)).subscribe(h=>{e.getActiveDeviceSubscriptions(),e.packs=e.getItems()}),c.pipe(wn(e.destroy),bt(h=>!!h),bt(h=>Qs.getInAppType(h.product.item.durability)===Ku.Subscription)).subscribe(h=>e.completedPurchase=h));const u=e.store.shop.restorePurchases.subscribeRestorePurchasesState();u.pipe(wn(e.destroy)).subscribe(h=>e.restorePurchasesState=h),Ju(i.pipe(tr(1)),a.pipe(tr(1)),r.pipe(tr(1)),s.pipe(tr(1)),c.pipe(tr(1)),u.pipe(tr(1))).pipe(wn(e.destroy)).subscribe(()=>e.cdr.detectChanges()),e.appService.isMobileApp()&&e.appService.getMobileAppService().addEventListener(Rd.Resume,e.onAppResume),yield e.getActiveDeviceSubscriptions().catch(h=>console.log(h)),e.packs=e.getItems()})()}ngOnDestroy(){this.appService.isMobileApp()&&this.appService.getMobileAppService().removeEventListener(Rd.Resume,this.onAppResume),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List,this.destroy.next(),this.destroy.complete()}getItems(){let e=this.store.shop[this.shopService.shopType].selectNonGiftableShopProducts(),i=qm.getSortedVipItems(e,this.shopState.usageIntent.type);if(this.isMyShopData&&this.shopState.usageIntent.type!==ci.RequestClubDonation&&this.appService.isMobileApp()&&!this.isSubscribedWithOtherAccount()&&!this.isSubscribedOnOtherDevice()){const r=Qs.getValidSubscriptionItems(i,this.appService.getPlatform());if(r.length)return r}return i.filter(r=>Qs.getInAppType(r.item.durability)===Ku.Consumable)}selectItem(e){switch(this.shopState.usageIntent.type){case ci.BuyItems:this.shopService.openItemPopup({item:e.item,receiverProfile:this.shopService.shopReceiver.profile,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(r=>console.warn(r));break;case ci.RequestClubDonation:this.tryRequestDonation(this.shopState.usageIntent.data,e);break;default:console.log("Unknown intent type")}}tryRequestDonation(e,i){var r=this;return f(function*(){if(!r.store.clubs.selectDonationRequestsList().length)try{yield r.clubsService.requestDonation({clubId:e.id,item:{...i.item,productId:i.productId}});const s=r.store.shop[r.shopService.shopType].selectState();s.isOpened&&s.usageIntent.type===ci.RequestClubDonation&&r.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(r.constants.defaultLoggedRoute,"/club/").concat(e.id,"/activity-feed")}}])}catch(s){console.warn(s)}})()}trackByFn(e,i){return i.item.id}getCoinShardsAmount(e){if(this.shopState.usageIntent.type===ci.RequestClubDonation)return this.shopService.getCoinShardsAmount(e.item.id)}isInActiveDonationRequests(e){return!!this.store.clubs.selectDonationRequest(e.item.id)}manageSubscriptions(){this.appService.getMobileAppService().messages().open(new Pb(wi.ENativeScreen.ManageSubscriptions))}hasPendingSubscription(){var e;return this.isMyShopData&&Qs.hasPendingSubscriptions(this.activeSubscriptions.items,$S,null===(e=this.currentUser.vip.custom)||void 0===e?void 0:e.subscription)}hasCompletedSubscriptionDownGradeOrCrossgrade(){return this.isMyShopData&&this.currentUser.vip.isActiveSubscription()&&this.completedPurchase&&this.currentUser.vip.custom.subscription.item.id!==this.completedPurchase.product.item.id&&(1===qm.compareVipItemTiers(this.currentUser.vip.custom.subscription.item,this.completedPurchase.product.item)||0===qm.compareVipItemTiers(this.currentUser.vip.custom.subscription.item,this.completedPurchase.product.item)&&0!==qm.compareVipItemsOrder(this.currentUser.vip.custom.subscription.item,this.completedPurchase.product.item))}getDeferredItemTranslation(){var e;let i;var r;return i=null!==(e=this.currentUser.vip.custom)&&void 0!==e&&e.subscription.deferredItem?null===(r=this.currentUser.vip.custom)||void 0===r?void 0:r.subscription.deferredItem:this.completedPurchase.product.item,this.getItemTranslation(i)}isSubscribedOnOtherDevice(){return this.isMyShopData&&this.currentUser.vip.isActiveSubscription()&&!this.activeSubscriptions.items.find(e=>e.item.type===Fe.TG.Vip||e.item.type===Fe.TG.Premium)}isSubscribedWithOtherAccount(){return this.isMyShopData&&!this.hasPendingSubscription()&&!this.currentUser.vip.isActiveSubscription()&&!!this.activeSubscriptions.items.find(e=>e.item.type===Fe.TG.Vip||e.item.type===Fe.TG.Premium)}isMobileApp(){return this.appService.isMobileApp()}hasSubscriptionsItems(){return this.packs.some(e=>Qs.getInAppType(e.item.durability)===Ku.Subscription)}showContent(){var e,i;return!(null!==(e=this.activeSubscriptions)&&void 0!==e&&e.loadingState.isLoading)&&(null===(i=this.activeSubscriptions)||void 0===i?void 0:i.loadingState.isLoaded)}getPlatform(){return this.appService.getPlatform()}openExternalUrl(e){this.appService.openExternalUrl("https://".concat(this.clientConfig.getConfig().platform.staticPagesDomain).concat(e,"/").concat(this.appLanguage.getAppLanguage()))}restorePurchases(){var e=this;return f(function*(){try{yield e.shopService.restorePurchases(),e.toaster.success("SHOP.RESTORE_SUCCESS")}catch(i){console.warn(i),e.toaster.error("ERRORS.SOMETHING_WRONG")}})()}hasDefferedItem(){var e;return Qs.hasDefferedItem(null===(e=this.currentUser.vip.custom)||void 0===e?void 0:e.subscription)||this.hasCompletedSubscriptionDownGradeOrCrossgrade()}getActiveDeviceSubscriptions(){var e=this;return f(function*(){try{yield e.shopService.getDeviceAccountActiveSubscriptions()}catch(i){console.warn(i)}})()}getItemTranslation(e){const i="SHOP.ITEMS.".concat(e.id,".title");return this.translate.instant(i)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(ls),g(Pr),g(J),g(ru),g(tn),g(Yt),g(Qt),g(Ma),g(Zt),g(Re),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-vip"]],hostAttrs:[1,"shop-vip-host-container"],features:[mn([ia])],decls:9,vars:7,consts:[[3,"textArray",4,"ngIf"],[3,"transparentBG",4,"ngIf"],["class","shop-vip__wrapper",4,"ngIf"],["class","shop-vip__container--vip-subscriptions-top-container",4,"ngIf"],["class","shop-vip__container--vip-bottom-text-old-design",4,"ngIf"],["class","shop-vip__container--vip-bottom-text-redesign",4,"ngIf"],["class","shop-vip__container--vip-subscriptions-bottom-container",4,"ngIf"],["tooltipBenefits",""],[3,"textArray"],[3,"transparentBG"],[1,"shop-vip__wrapper"],[1,"shop-vip__container--items",3,"offers","user","shopUsageIntent","activeClubDonationRequests","activeSubscriptions","itemSelect"],["class","shop-vip--list__hint",4,"ngIf"],[1,"shop-vip--list__hint"],["class","shop-vip--list__hint--text info",4,"ngIf"],["class","shop-vip--list__hint--text",4,"ngIf"],[1,"shop-vip--list__hint--text","info"],[1,"shop-vip--list__hint--text"],[1,"shop-vip__container--vip-subscriptions-top-container"],[1,"shop-vip__container--vip-subscriptions--text-link",3,"click"],[1,"shop-vip__container--vip-bottom-text-old-design"],["tooltip","",1,"shop-vip__button--benefits",3,"icon","tooltipMaxDimensions","tooltipTemplate","buttonModifier","bclass"],[1,"shop-vip__text--benefits"],["class","shop-vip__button--benefits shop-restore__button",3,"loading","bclass","onClick",4,"ngIf"],[1,"shop-vip__button--benefits","shop-restore__button",3,"loading","bclass","onClick"],[1,"shop-vip__container--vip-bottom-text-redesign"],["class","shop-vip__button--benefits shop-restore__button",3,"loading","buttonModifier","bclass","onClick",4,"ngIf"],[1,"shop-vip__button--benefits","shop-restore__button",3,"loading","buttonModifier","bclass","onClick"],[1,"shop-vip__container--vip-subscriptions-bottom-container"],["class","shop-vip__container--vip-subscriptions--text-bottom",4,"ngIf"],[1,"shop-vip__container--vip-subscriptions--text-bottom--links"],[1,"shop-vip__container--vip-subscriptions--text-bottom"],[3,"title","items","simpleStyling","modifierLocalization"]],template:function(e,i){1&e&&U(0,VLt,1,4,"empty-content",0)(1,zLt,1,1,"loader-image",1)(2,KLt,3,6,"section",2)(3,ZLt,4,3,"div",3)(4,YLt,6,11,"div",4)(5,XLt,6,11,"div",5)(6,n2t,11,8,"div",6)(7,i2t,1,4,"ng-template",null,7,ft),2&e&&(l("ngIf",null==i.activeSubscriptions?null:i.activeSubscriptions.loadingState.error),d(),l("ngIf",null==i.activeSubscriptions?null:i.activeSubscriptions.loadingState.isLoading),d(),l("ngIf",i.showContent()),d(),l("ngIf",i.isMyShopData&&i.isMobileApp()&&i.hasSubscriptionsItems()&&i.showContent()),d(),l("ngIf",i.vipBenefits&&i.showContent()),d(),l("ngIf",i.vipBenefits&&i.showContent()),d(),l("ngIf",i.isMyShopData&&i.isMobileApp()&&i.hasSubscriptionsItems()&&i.showContent()))},dependencies:[Ne,bo,so,Oi,Ga,Eg,ZM,YM,qe],styles:[".shop-vip__container--items[_ngcontent-%COMP%]{display:initial!important;width:100%;max-width:60rem}.shop-vip__container--vip-bottom-text[_ngcontent-%COMP%]{width:100%;padding:0 1rem}.shop-vip__container--vip-bottom-text[_ngcontent-%COMP%]   .benefits-label[_ngcontent-%COMP%]{width:100%;height:5rem;display:flex;justify-content:center;align-items:center}.shop-vip__container--vip-bottom-text[_ngcontent-%COMP%]   .benefits-label[_ngcontent-%COMP%]   .vip-benefits[_ngcontent-%COMP%]{font-size:1.8rem}.shop-vip__container--vip-bottom-text[_ngcontent-%COMP%]   .benefits-list[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap}.shop-vip__container--vip-subscriptions-top-container[_ngcontent-%COMP%], .shop-vip__container--vip-subscriptions--text-bottom[_ngcontent-%COMP%]{text-align:center}.shop-vip__container--vip-subscriptions--text-bottom--links[_ngcontent-%COMP%]{padding:2rem 0}.shop-restore__button[_ngcontent-%COMP%]{margin-top:2rem}"]}),n})();const eSe=[{path:"vip",data:{pageId:Mn.ShopVip},component:Xye}];let Z0=(()=>{var t;class n extends Jm{constructor(){super(...arguments),this.shopType=Eo.Customization}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),I2=(()=>{var t;class n{constructor(e,i){this.store=i,this.shop=e}getAllUtilityPacks(){return this.store.shop[this.shop.shopType].selectState().model.products.filter(e=>e.group===wt.Utility)}getShopConfig(){return this.store.shop[this.shop.shopType].selectState().model}buyUtilityItem(e,i){var r=this;return f(function*(){let s;if(r.store.shop[r.shop.shopType].selectState().loadingState.isLoaded)s=i?r.findUtilityPackByProps(e,i):r.getAllUtilityPacks().find(a=>a.item.type===e);else try{yield r.shop.load(),r.shop.shopReceiver={profile:r.store.selectUserState().profile,gameInventory:r.store.selectUserState().gameInventory},s=i?r.findUtilityPackByProps(e,i):r.getAllUtilityPacks().find(a=>a.item.type===e)}catch(a){console.warn("Error occured trying to buy utility item: ".concat(e),a)}s?r.shop.openItemPopup({item:s.item,receiverProfile:r.store.selectUserState().profile,store:r.store.shop[r.shop.shopType].selectState().model}).catch(a=>console.warn(a)):console.warn("Error occured trying to buy utility item: ".concat(e))})()}findUtilityPackByProps(e,i){const r=Vme()({item:{type:e}},i);return ez()(this.getAllUtilityPacks(),r)[0]}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Z0),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function o2t(t,n){if(1&t){const o=Ce();p(0,"shop-item-container",2),Y("buyClicked",function(){const r=oe(o).$implicit;return re(_().buyItem(r))}),V(1,"translate"),V(2,"transformUrl"),m()}if(2&t){const o=n.$implicit;nb("utility-item--"+o.id),l("title",$(1,6,"SHOP.ITEMS."+o.id+".title"))("clientStoreProduct",o)("description","SHOP.ITEMS."+o.id+".DESCRIPTION")("imageUrl",$(2,8,"shop/items/"+o.id+".png"))}}const r2t=(t,n)=>({"more-than-three":t,"shop-more__popup-outlet":n});let tSe=(()=>{var t;class n{constructor(e,i,r,s){this.contextEnum=Wr,this.shopService=e,this.shopMoreService=i,this.packs=[],this.shopConfig=null,this.activatedComponentRoute=r,this.store=s}ngOnInit(){this.packs=this.shopMoreService.getAllUtilityPacks().map(e=>new bI(e)),this.shopConfig=this.shopMoreService.getShopConfig()}buyItem(e){this.shopService.openItemPopup({item:e.item,receiverProfile:this.shopService.shopReceiver.profile,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(i=>console.warn(i))}trackByFn(e,i){return i.item.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(I2),g(Pr),g(J))},t.\u0275cmp=pe({type:t,selectors:[["shop-more"]],features:[mn([ia])],decls:2,vars:6,consts:[[1,"shop-more__wrapper",3,"ngClass"],["class","shop-more__box","click-feedback","",3,"title","class","clientStoreProduct","description","imageUrl","buyClicked",4,"ngFor","ngForOf","ngForTrackBy"],["click-feedback","",1,"shop-more__box",3,"title","clientStoreProduct","description","imageUrl","buyClicked"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,o2t,3,10,"shop-item-container",1),m()),2&e&&(l("ngClass",cn(3,r2t,i.packs.length>=3,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,po,XC,qe,uo],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-more__wrapper[_ngcontent-%COMP%]{overflow-x:hidden;display:flex;flex-flow:row wrap;width:100%;height:100%;margin:0 auto;max-width:80rem;position:relative;align-items:center;justify-content:center;touch-action:pan-y!important}.shop-more__wrapper.more-than-three[_ngcontent-%COMP%]{height:auto;align-content:flex-start}.shop-more__box[_ngcontent-%COMP%]{width:50%;max-height:33rem;padding:0 2rem}@media only screen and (max-width: 768px){.shop-more__box[_ngcontent-%COMP%]{width:100%;height:30rem;max-width:39rem;padding:1rem}}.shop-more__popup-outlet[_ngcontent-%COMP%]   .shop-more__box[_ngcontent-%COMP%]{width:60%;height:90%}"],changeDetection:0}),n})();const _H=[{path:"utility",data:{pageId:Mn.ShopMore},component:tSe}],s2t=()=>[50];let nSe=(()=>{var t;class n{constructor(){this.happyHourEnd=new ke}endHappyHour(){this.happyHourEnd.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["happy-hour-store-banner"]],inputs:{timeStamp:"timeStamp"},outputs:{happyHourEnd:"happyHourEnd"},decls:10,vars:14,consts:[["data-cy","happyHourContainer",1,"happy-hour-container"],[1,"happy-hour-flag",3,"customClass"],["data-cy","happyHourTimer",1,"happy-hour-timer",3,"milliseconds","onCountdownFinished"],["data-cy","happyHourTitle",1,"happy-hour__title"],["data-cy","happyHourDescription",1,"happy-hour__description",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"item-label-component",1)(2,"timer",2),Y("onCountdownFinished",function(){return i.endHappyHour()}),m()(),p(3,"p",3),H(4),V(5,"uppercase"),V(6,"translate"),m(),B(7,"p",4),V(8,"safeHtml"),V(9,"translate"),m()),2&e&&(d(),l("customClass","happy-hour-flag__container"),d(),l("milliseconds",i.timeStamp),d(2),se($(5,4,$(6,6,"SHOP.HAPPY_HOUR"))),d(3),l("innerHtml",$(8,8,yt(9,10,"SHOP.HAPPY_HOUR_DESCRIPTION_V2",pt(13,s2t))),Yn))},dependencies:[Fs,Ym,Sp,qe,Ta],changeDetection:0}),n})();function a2t(t,n){1&t&&B(0,"item-component",10),2&t&&l("item",n.$implicit)}const c2t=t=>({"first-purchase-offer--disable":t}),l2t=()=>[1];let iSe=(()=>{var t;class n{constructor(e,i,r){this.shopService=e,this.store=i,this.toasterService=r}ngOnChanges(e){e.currentUserIsVip?e.currentUserIsVip.currentValue&&this.updateChipsForVip():e.offer&&this.currentUserIsVip&&this.updateChipsForVip()}updateChipsForVip(){const e=this.store.shop.iap.selectState().model.vipBonusMultiplier,i=this.offer.item.items.map(r=>r.type===Fe.TG.ChipPack?{...r,amount:r.amount*e}:r);this.offer={...this.offer,item:{...this.offer.item,items:i}}}buy(){var e=this;return f(function*(){try{yield e.shopService.openItemPopup({item:e.offer.item,correlationId:Xb.firstInitialPurchaseCid})}catch(i){i instanceof lt.NetworkError?e.toasterService.error("ERRORS.CONNECTION_ERROR"):i instanceof Wp||e.toasterService.warn("ERRORS.SOMETHING_WRONG")}})()}itemTrackBy(e,i){return i.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Jm),g(J),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["first-bundle-offer-card"]],hostAttrs:[1,"first-bundle-offer-card"],inputs:{offer:"offer",transactionState:"transactionState",currentUserIsVip:"currentUserIsVip"},features:[it],decls:15,vars:19,consts:[["click-feedback","",1,"first-purchase-global__wrapper",3,"ngClass","click"],[1,"first-purchase-offer--container__wrapper"],[3,"customClass"],[1,"first-purchase-flag__text"],[1,"first-purchase-offer__container"],["empty-placeholder","",1,"first-purchase-offer__img",3,"imgSrc"],[1,"first-purchase-offer__title"],[1,"first-purchase-offer__items"],["class","first-purchase-offer__item",3,"item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"first-purchase-offer__button",3,"clientStoreProduct","loading"],[1,"first-purchase-offer__item",3,"item"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.buy()}),p(1,"div",1)(2,"item-label-component",2)(3,"p",3),H(4),V(5,"translate"),m()()(),p(6,"div",4),B(7,"img",5),V(8,"transformUrl"),p(9,"p",6),H(10),V(11,"translate"),m(),p(12,"div",7),U(13,a2t,1,1,"item-component",8),m(),B(14,"item-buy-button",9),m()()),2&e&&(l("ngClass",ne(16,c2t,null==i.transactionState?null:i.transactionState.inProgress)),d(2),l("customClass","first-purchase-flag__container"),d(2),ze(" ",yt(5,9,"FIRST_PURCHASE_OFFER.TOP_ELEMENT_TEXT",pt(18,l2t))," "),d(3),l("imgSrc",$(8,12,"shop/first-purchase-bundle-offer.png")),d(3),ze(" ",$(11,14,"FIRST_PURCHASE_OFFER.TITLE")," "),d(3),l("ngForOf",i.offer.item.items)("ngForTrackBy",i.itemTrackBy),d(),l("clientStoreProduct",i.offer)("loading",null==i.transactionState?null:i.transactionState.inProgress))},dependencies:[Xe,Mt,Zh,Uh,po,$o,Ym,qe,uo],styles:[".first-purchase-offer__container[_ngcontent-%COMP%]{position:relative;margin-bottom:4rem;box-sizing:border-box;overflow:hidden}.first-purchase-offer__img[_ngcontent-%COMP%]{position:absolute;pointer-events:none;width:100%;height:100%;object-fit:cover;left:0}.first-purchase-offer__title[_ngcontent-%COMP%]{text-align:center;margin:2.25rem 0 .5rem;position:relative}"],changeDetection:0}),n})();function u2t(t,n){if(1&t&&B(0,"first-bundle-offer-card",7),2&t){const o=_();l("offer",o.firstPurchaseOffer.offer.storeProduct)("transactionState",o.firstPurchaseOffer.transactionState)("currentUserIsVip",o.currentUserIsVip)}}function d2t(t,n){1&t&&B(0,"happy-hour-store-banner",8),2&t&&l("timeStamp",_().happyHourTimeRemaining)}function p2t(t,n){1&t&&B(0,"rewarded-video-item-smart",9),2&t&&l("placement",_().EAdmobVideoId.ShopChips)}const h2t=t=>[t],m2t=()=>({enabled:!0,startDelayMs:500,shineRepeatDelayMs:5e3});function f2t(t,n){if(1&t){const o=Ce();p(0,"offer-buy-item-chips",10),Y("itemSelect",function(i){return oe(o),re(_().selectItem(i))}),m()}if(2&t){const o=_();l("offers",ne(11,h2t,o.dailyDeal))("offer",o.dailyDeal)("showBlink",!0)("shine",pt(13,m2t))("shopUsageIntent",o.shopState.usageIntent)("vipBonusMultiplier",o.shopState.model.vipBonusMultiplier)("isVip",o.currentUserIsVip)("shardsAmount",o.getCoinShardsAmount(o.dailyDeal.item.id))("isLoading",o.shopState.usageIntent&&o.isInActiveDonationRequests(o.dailyDeal.item.id))("isDisabled",o.shopState.usageIntent&&o.activeClubDonationRequests.length&&!o.isInActiveDonationRequests(o.dailyDeal.item.id)),Hn("data-cy-id",o.dailyDeal.item.id)}}let oSe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.playerContext=u,this.cdr=h,this.ads=b,this.EShopUsageIntent=ci,this.contextEnum=Wr,this.activeClubDonationRequests=[],this.EAdmobVideoId=rc,this.isHappyHourActive=!1,this.subscriptions=new ie.List,this.destroy=new sn,this.router=i,this.shopService=e,this.shopState=s.shop[this.shopService.shopType].selectState(),this.store=s,this.activatedComponentRoute=r,this.clubsService=a,this.constants=c}ngOnInit(){this.currentUser=this.shopService.shopReceiver.profile,this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full),this.isMyShopData&&this.subscriptions.add(this.store.subscribeVipState().pipe(tr(1),ws((a,c)=>{var u,h;return(null==a?void 0:a.isActiveSubscription())===(null==c?void 0:c.isActiveSubscription())&&(null==a||null===(u=a.custom)||void 0===u||null===(u=u.subscription)||void 0===u?void 0:u.item)===(null==c||null===(h=c.custom)||void 0===h||null===(h=h.subscription)||void 0===h?void 0:h.item)})).subscribe(()=>{this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full),this.cdr.detectChanges()})),this.subscriptions.add(this.store.bonuses.videoShopChips.subscribeState().subscribe(a=>{this.rewardedVideo=a,this.cdr.detectChanges()}));const e=this.store.shop.firstPurchaseOffer.subscribeFirstPurchaseOfferState();this.subscriptions.add(e.subscribe(a=>{this.firstPurchaseOffer=a}));const i=this.store.shop.dailyDeal.subscribeDailyDealState();this.subscriptions.add(i.subscribe(a=>{this.dailyDeal=a.product})),this.setHappyHourTimer();const r=this.shopService.happyHourChangedState;this.subscriptions.add(r.subscribe(()=>this.setHappyHourTimer()));const s=this.router.events;this.subscriptions.add(s.subscribe(()=>{this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full)})),this.subscriptions.add(this.store.clubs.subscribeDonationRequestsList().subscribe(a=>this.activeClubDonationRequests=a)),Ju(i,e,r,s).pipe(wn(this.destroy)).subscribe(()=>this.cdr.detectChanges())}initChipList(e){const i=this.store.shop[this.shopService.shopType].selectNonGiftableShopProducts();let r=new ie.List(i).where(s=>e?s.item.type===Fe.TG.ChipPack&&s.group!==wt.PromoDeals&&s.group===wt.HappyHourChips:s.item.type===Fe.TG.ChipPack&&s.group!==wt.PromoDeals&&s.group!==wt.HappyHourChips);this.shopState.usageIntent.type===ci.RequestClubDonation&&(r=r.where(s=>{var a,c;return!(null===(a=s.productId)||void 0===a||!a.apple||null===(c=s.productId)||void 0===c||!c.google)})),this.packs=r.toArray(),this.cdr.detectChanges()}setHappyHourTimer(){let e=this.store.shop[this.shopService.shopType].selectHappyHourViewModel();this.isHappyHourActive=e.isActive(),this.happyHourTimeRemaining=this.isHappyHourActive?e.timeToNextState():void 0,this.initChipList(this.isHappyHourActive),this.cdr.detectChanges()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List,this.destroy.next(),this.destroy.complete()}selectItem(e){switch(this.shopState.usageIntent.type){case ci.BuyItems:this.shopService.openItemPopup({item:e.item,receiverProfile:this.shopService.shopReceiver.profile,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(r=>console.warn(r));break;case ci.RequestClubDonation:this.tryRequestDonation(this.shopState.usageIntent.data,e);break;default:console.log("Unknown intent type")}}tryRequestDonation(e,i){var r=this;return f(function*(){if(!r.store.clubs.selectDonationRequestsList().length)try{yield r.clubsService.requestDonation({clubId:e.id,item:{...i.item,productId:i.productId}});const s=r.store.shop[r.shopService.shopType].selectState();s.isOpened&&s.usageIntent.type===ci.RequestClubDonation&&r.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(r.constants.defaultLoggedRoute,"/club/").concat(e.id,"/activity-feed")}}])}catch(s){console.warn(s)}})()}trackByFn(e,i){return i.item.id}getCoinShardsAmount(e){if(this.shopState.usageIntent.type===ci.RequestClubDonation)return this.shopService.getCoinShardsAmount(e)}isInActiveDonationRequests(e){return!!this.store.clubs.selectDonationRequest(e)}showAdItem(){var e,i;return this.ads.hasActiveAdsAdapter()&&this.ads.isRewardedVideoEnabled()&&(null===(e=this.rewardedVideo)||void 0===e?void 0:e.isActive)&&(null===(i=this.rewardedVideo)||void 0===i?void 0:i.requirements.limit)>0&&this.shopState.usageIntent.type===ci.BuyItems&&this.shopState.receiver.profile.id===this.store.selectSimpleProfile().id&&this.playerContext.getCurrent()===ba.Idle}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(on),g(Pr),g(J),g(ru),g(tn),g(ic),g(Re),g(bc))},t.\u0275cmp=pe({type:t,selectors:[["shop-chips"]],features:[mn([ia])],decls:11,vars:11,consts:[[1,"shop-chips__wrapper"],["wrapper",""],[1,"shop-chips__container--items",3,"offers","user","vipBonusMultiplier","shopUsageIntent","isVip","isHappyHour","activeClubDonationRequests","itemSelect"],[3,"offer","transactionState","currentUserIsVip",4,"ngIf"],[3,"timeStamp",4,"ngIf"],[3,"placement",4,"ngIf"],["data-cy","promoDeals",3,"offers","offer","showBlink","shine","shopUsageIntent","vipBonusMultiplier","isVip","shardsAmount","isLoading","isDisabled","itemSelect",4,"ngIf"],[3,"offer","transactionState","currentUserIsVip"],[3,"timeStamp"],[3,"placement"],["data-cy","promoDeals",3,"offers","offer","showBlink","shine","shopUsageIntent","vipBonusMultiplier","isVip","shardsAmount","isLoading","isDisabled","itemSelect"]],template:function(e,i){1&e&&(p(0,"section",0,1)(2,"offer-buy-item-list",2),Y("itemSelect",function(s){return i.selectItem(s)}),p(3,"div"),U(4,u2t,1,3,"first-bundle-offer-card",3),m(),p(5,"div"),U(6,d2t,1,1,"happy-hour-store-banner",4),m(),p(7,"div"),U(8,p2t,1,1,"rewarded-video-item-smart",5),m(),p(9,"div"),U(10,f2t,1,14,"offer-buy-item-chips",6),m()()()),2&e&&(d(2),l("offers",i.packs)("user",i.currentUser)("vipBonusMultiplier",i.shopState.model.vipBonusMultiplier)("shopUsageIntent",i.shopState.usageIntent)("isVip",i.currentUserIsVip)("isHappyHour",i.isHappyHourActive)("activeClubDonationRequests",i.activeClubDonationRequests),d(2),l("ngIf",i.shopState.usageIntent.type===i.EShopUsageIntent.BuyItems&&i.isMyShopData&&!i.happyHourTimeRemaining&&(null==i.firstPurchaseOffer||null==i.firstPurchaseOffer.offer?null:i.firstPurchaseOffer.offer.isAvailable)&&(null==i.firstPurchaseOffer||null==i.firstPurchaseOffer.offer?null:i.firstPurchaseOffer.offer.storeProduct)),d(2),l("ngIf",i.happyHourTimeRemaining),d(2),l("ngIf",i.showAdItem()),d(2),l("ngIf",!i.isHappyHourActive&&i.dailyDeal&&i.shopState.usageIntent.type!==i.EShopUsageIntent.RequestClubDonation))},dependencies:[Ne,YM,dH,pH,nSe,iSe],styles:[".shop-chips__container--items[_ngcontent-%COMP%]{display:initial!important;width:100%;max-width:60rem}"],changeDetection:0}),n})();const rSe=[{path:"currency",data:{pageId:Mn.ShopChips},component:oSe}],g2t=t=>[t];function _2t(t,n){if(1&t&&(p(0,"div",0)(1,"p"),H(2),V(3,"translate"),m()()),2&t){const o=_();d(2),se(yt(3,1,"SHOP.SENDING_DONATION",ne(4,g2t,o.currentUser.username.currentUsername)))}}const v2t=t=>({"with-margin-bottom":t});function b2t(t,n){if(1&t){const o=Ce();p(0,"exchange-box",5),Y("buyClicked",function(){const r=oe(o).$implicit;return re(_().buyItem(r))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",ne(4,v2t,e))("shopConfig",i.shopConfig)("receiver",i.shopService.shopReceiver.profile)("clientStoreProduct",o)}}let sSe=(()=>{var t;class n{constructor(e,i,r){this.router=i,this.shopService=e,this.store=r}ngOnInit(){this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full),this.currentUser=this.shopService.shopReceiver.profile,this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.packs=new ie.List(this.store.shop[this.shopService.shopType].selectState().model.products).where(e=>e.group===wt.Exchange).orderBy([e=>e.flags&&e.flags[BV.BestValue],e=>e.flags&&e.flags[BV.MostPopular]],ie.ESort.Asc,ie.ESort.Asc).toArray(),this.shopConfig=this.store.shop[this.shopService.shopType].selectState().model,this.routeChangeSubscription=this.router.events.subscribe(()=>{this.isMyShopData=this.shopService.isCurrentUserReceiver(),this.currentUserIsVip=this.shopService.shopReceiver.profile.hasTierOrHigher(Fi.Full)})}ngOnDestroy(){this.routeChangeSubscription&&this.routeChangeSubscription.unsubscribe()}buyItem(e){this.shopService.openItemPopup({item:e.item,receiverProfile:this.shopService.shopReceiver.profile,store:this.store.shop[this.shopService.shopType].selectState().model}).catch(i=>console.warn(i))}trackByFn(e,i){return i.item.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(on),g(J))},t.\u0275cmp=pe({type:t,selectors:[["shop-exchange"]],decls:7,vars:6,consts:[[1,"shop-exchange__container--vip-bonus-text"],["class","shop-exchange__container--vip-bonus-text",4,"ngIf"],[1,"shop-exchange__wrapper"],["wrapper",""],["class","shop-exchange__box",3,"ngClass","shopConfig","receiver","clientStoreProduct","buyClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-exchange__box",3,"ngClass","shopConfig","receiver","clientStoreProduct","buyClicked"]],template:function(e,i){1&e&&(p(0,"p",0),H(1),V(2,"translate"),m(),U(3,_2t,4,6,"div",1),p(4,"section",2,3),U(6,b2t,1,6,"exchange-box",4),m()),2&e&&(d(),se($(2,4,"SHOP.EXCHANGE")),d(2),l("ngIf",!i.isMyShopData&&i.currentUser),d(3),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Ne,zye,qe],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-exchange__container--vip-bonus-text[_ngcontent-%COMP%]{width:100%;height:8rem;display:flex;justify-content:center;align-items:center;font-size:1.8rem}@media only screen and (max-width: 1280px){.shop-exchange__container--vip-bonus-text[_ngcontent-%COMP%]{height:6rem}}@media only screen and (max-width: 480px){.shop-exchange__container--vip-bonus-text[_ngcontent-%COMP%]{height:3rem}}@media only screen and (max-width: 768px) and (orientation: landscape){.shop-exchange__container--vip-bonus-text[_ngcontent-%COMP%]{height:3rem}}.shop-exchange__push-the-bottom-box[_ngcontent-%COMP%]{width:100%;height:8rem}@media only screen and (max-width: 1280px){.shop-exchange__push-the-bottom-box[_ngcontent-%COMP%]{height:5rem}}"]}),n})();const M2=[{path:"exchange",component:sSe}];function C2t(t,n){1&t&&B(0,"bank-pack-box",7),2&t&&l("packData",n.$implicit)}let aSe=(()=>{var t;class n{constructor(e,i,r){this.shop=e,this.translate=i,this.store=r,this.bankTransferTips={firstColumn:[],secondColumn:[]}}ngOnInit(){this.packs=this.store.shop[this.shop.shopType].selectState().model.products.filter(i=>i.group===wt.BankTransfer);const e=this.translate.instant("BANK_TRANSFER");this.bankTransferTips.firstColumn=Object.keys(e.FIRST_INFO_COLUMN.TIPS),this.bankTransferTips.secondColumn=Object.keys(e.SECOND_INFO_COLUMN.TIPS)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["shop-bank-transfer"]],decls:11,vars:12,consts:[[1,"shop-bank-transfer__wrapper"],[1,"shop-bank-transfer__content"],[1,"shop-bank-transfer__container--title"],[1,"shop-bank-transfer__container--packs"],["class","shop-bank-transfer__bank-pack",3,"packData",4,"ngFor","ngForOf"],[1,"shop-bank-transfer__container--info"],[1,"shop-bank-transfer__text-list",3,"title","items","oneRowItems","modifierLocalization"],[1,"shop-bank-transfer__bank-pack",3,"packData"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"p"),H(4),V(5,"translate"),m()(),p(6,"div",3),U(7,C2t,1,1,"bank-pack-box",4),m(),p(8,"div",5),B(9,"shop-text-list",6)(10,"shop-text-list",6),m()()()),2&e&&(d(4),se($(5,10,"BANK_TRANSFER.TITLE")),d(3),l("ngForOf",i.packs),d(2),l("title","BANK_TRANSFER.FIRST_INFO_COLUMN.TITLE")("items",i.bankTransferTips.firstColumn)("oneRowItems",!0)("modifierLocalization","BANK_TRANSFER.FIRST_INFO_COLUMN.TIPS."),d(),l("title","BANK_TRANSFER.SECOND_INFO_COLUMN.TITLE")("items",i.bankTransferTips.secondColumn)("oneRowItems",!0)("modifierLocalization","BANK_TRANSFER.SECOND_INFO_COLUMN.TIPS."))},dependencies:[Mt,ZM,qye,qe],styles:[".shop-bank-transfer__content[_ngcontent-%COMP%]{justify-content:center;display:flex;flex-wrap:wrap;align-items:center;position:relative;padding:0 1rem}.shop-bank-transfer__container--title[_ngcontent-%COMP%]{width:100%;min-height:6rem;display:flex;justify-content:center;align-items:center;text-align:center}.shop-bank-transfer__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem}.shop-bank-transfer__container--info[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap}.shop-bank-transfer__container--info[_ngcontent-%COMP%]   .shop-bank-transfer__text-list[_ngcontent-%COMP%]{width:100%}"]}),n})();const O2=[{path:"bank-transfer",data:{pageId:Mn.BankTransfer},component:aSe}],y2t=t=>({"with-margin-bottom":t});function S2t(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit;return re(_().clickHandler(r))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",ne(4,y2t,e))("clientStoreProduct",o)("loading",o.loading)("isDisabled",i.isButtonDisabled(o))}}let cSe=(()=>{var t;class n extends Cf{getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.MessageColor])}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["shop-message-colors"]],features:[Ht],decls:3,vars:2,consts:[[1,"shop-messages-colors__wrapper"],["wrapper",""],["class","shop-messages-colors__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-messages-colors__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,S2t,1,6,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em]}),n})();const E2=[{path:"messageColor",data:{pageId:Mn.MessageColors},component:cSe}],w2t=t=>({"with-margin-bottom":t});function T2t(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit;return re(_().clickHandler(r))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",ne(4,w2t,e))("clientStoreProduct",o)("loading",o.loading)("isDisabled",i.isButtonDisabled(o))}}let lSe=(()=>{var t;class n extends Cf{getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.NameColor])}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["shop-name-colors"]],features:[Ht],decls:3,vars:2,consts:[[1,"shop-name-colors__wrapper"],["wrapper",""],["class","shop-name-colors__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-name-colors__box",3,"ngClass","clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,T2t,1,6,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em]}),n})();const x2=[{path:"nameColor",data:{pageId:Mn.NameColors},component:lSe}];class uSe{constructor(n){this.store=n}calcChipAmount(n,o=1){const e=this.store.selectIsVip()?o:1;return n.item.amount*e}}let I2t=(()=>{var t;class n extends uSe{constructor(e,i){super(e),this.hiddenShopService=i}getSpecialOffer(e){var i=this;return f(function*(){const r=yield i.hiddenShopService.load(),s=r.products.filter(a=>a.group===wt.BuyInDeals).sort((a,c)=>i.calcChipAmount(a,r.vipBonusMultiplier)-i.calcChipAmount(c,r.vipBonusMultiplier));return{item:s.find(a=>i.calcChipAmount(a,r.vipBonusMultiplier)>=e)||s[s.length-1],store:r}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(ef))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),M2t=(()=>{var t;class n extends uSe{constructor(e,i){super(e),this.hiddenShopService=i}getSpecialOffer(e){var i=this;return f(function*(){const r=yield i.hiddenShopService.load(),s=r.products.filter(a=>a.group===wt.RebuyDeals).sort((a,c)=>i.calcChipAmount(a,r.vipBonusMultiplier)-i.calcChipAmount(c,r.vipBonusMultiplier));return{item:s.find(a=>i.calcChipAmount(a,r.vipBonusMultiplier)>=e)||s[s.length-1],store:r}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(ef))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),O2t=(()=>{var t;class n{constructor(e){this.injector=e}createOfferService(e){switch(e){case RM.GameLobby:return this.injector.get(I2t);case RM.InGame:return this.injector.get(M2t);default:throw new Error("Missing or invalid offer provider")}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(vs))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function E2t(t,n){if(1&t){const o=Ce();Tn(0),p(1,"button-text",10),Y("onClick",function(){return re(oe(o).$implicit.action())}),H(2),V(3,"translate"),m(),Pn()}if(2&t){const o=n.$implicit;d(),l("buttonModifier",o.modifier),d(),se(yt(3,2,o.text.key,o.text.params))}}function x2t(t,n){if(1&t){const o=Ce();Tn(0),p(1,"item-buy-button",11),Y("buttonClicked",function(){oe(o);const i=_(2);return re(i.buy(i.providers[0].provider))}),m(),Pn()}if(2&t){const o=_(2);d(),l("clientStoreProduct",o.item)("paymentProvider",o.providers[0])}}function A2t(t,n){if(1&t){const o=Ce();Tn(0),p(1,"provider-button",12),Y("buttonClicked",function(){const r=oe(o).$implicit;return re(_(3).buy(r.provider))}),m(),Pn()}if(2&t){const o=n.$implicit;d(),l("paymentProvider",o)}}function R2t(t,n){if(1&t&&U(0,A2t,2,1,"ng-container",8),2&t){const o=_(2);l("ngForOf",o.providers)("ngForTrackBy",o.trackByFn)}}const k2t=()=>({showPrice:!0}),L2t=t=>({visibility:t});function D2t(t,n){if(1&t&&(p(0,"div"),B(1,"shop-item-popup-info",2),p(2,"div",3)(3,"div",4)(4,"span"),H(5),V(6,"translate"),m(),B(7,"currency-component",5),m(),p(8,"div",6)(9,"span"),H(10),V(11,"translate"),m(),B(12,"currency-component",5),m()(),p(13,"div",7),U(14,E2t,4,5,"ng-container",8)(15,x2t,2,2,"ng-container",0)(16,R2t,1,2,"ng-template",null,9,ft),m()()),2&t){const o=Kt(17),e=_();d(),l("showedShopItem",e.item)("isVip",e.isVip)("shopConfig",e.storeViewModel)("paymentProviders",e.storeViewModel.paymentProviders)("options",pt(20,k2t)),d(4),ze("",$(6,16,"SHOP.YOU_HAVE"),":"),d(2),l("currency",e.currencyType.Chips)("value",e.currentFunds),d(),l("ngStyle",ne(21,L2t,e.neededFunds?"visible":"hidden")),d(2),ze("",$(11,18,"SHOP.YOU_NEED"),":"),d(2),l("currency",e.currencyType.Chips)("value",e.neededFunds),d(2),l("ngForOf",e.extraButtons)("ngForTrackBy",e.buttonsTrackBy),d(),l("ngIf",1===e.providers.length)("ngIfElse",o)}}function B2t(t,n){1&t&&B(0,"spinner-loader",13)}let dSe=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.cdr=e,this.specialOfferFactoryService=i,this.store=r,this.paymentsService=s,this.loader=a,this.shopService=c,this.onBuy=new ke,this.currencyType=ln}ngOnInit(){this.isVip=this.store.selectIsVip()}ngOnChanges(e){this.item=void 0,e.neededFunds.currentValue&&this.specialOfferFactoryService.createOfferService(this.offerProvider).getSpecialOffer(e.neededFunds.currentValue).then(i=>{this.item=i.item,this.storeViewModel=i.store,this.providers=this.shopService.getProvidersByItem(i.store,this.item),this.cdr.detectChanges()}).catch(console.error)}buy(e){var i=this;return f(function*(){try{i.loader.on(),yield i.paymentsService.buy({storeProduct:i.item,receiverId:i.store.selectUserState().profile.id,providerId:e,storeId:i.storeViewModel.id}),i.onBuy.emit()}catch(r){console.warn(r)}finally{i.loader.off()}})()}buttonsTrackBy(e,i){return e}trackByFn(e,i){return i.provider}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(O2t),g(J),g(bk),g(ro),g(Qce))},t.\u0275cmp=pe({type:t,selectors:[["offer-item"]],inputs:{offerProvider:"offerProvider",currentFunds:"currentFunds",neededFunds:"neededFunds",extraButtons:"extraButtons"},outputs:{onBuy:"onBuy"},features:[it],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loader",""],[3,"showedShopItem","isVip","shopConfig","paymentProviders","options"],[1,"offer-item__wallet--wrapper"],[1,"offer-item__balance-wrapper"],[1,"offer-item__balance-chips",3,"currency","value"],[1,"offer-item__balance-wrapper","insufficient",3,"ngStyle"],[1,"offer-item__buttons--wrapper"],[4,"ngFor","ngForOf","ngForTrackBy"],["providersTempl",""],[1,"offer-item__button",3,"buttonModifier","onClick"],[1,"offer-item__button",3,"clientStoreProduct","paymentProvider","buttonClicked"],[1,"offer-item__button",3,"paymentProvider","buttonClicked"],[1,"offer-item__loader"]],template:function(e,i){if(1&e&&U(0,D2t,18,23,"div",0)(1,B2t,1,0,"ng-template",null,1,ft),2&e){const r=Kt(2);l("ngIf",i.item)("ngIfElse",r)}},dependencies:[Mt,Ne,Cm,pn,So,vc,Uh,RV,LV,qe],styles:["[_nghost-%COMP%]{height:100%}.offer-item__loader[_ngcontent-%COMP%]{position:relative;display:block;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}.offer-item__buttons--wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-flow:row wrap;flex:1;margin:0 auto}.offer-item__button[_ngcontent-%COMP%]{height:4rem!important;width:33.33%;margin:.5em 0;padding:0 .5rem}@media only screen and (max-width: 480px){.offer-item__button[_ngcontent-%COMP%]{width:50%}}.offer-item__wallet--wrapper[_ngcontent-%COMP%]{margin:.25em}.offer-item__balance-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;font-size:.7em}.offer-item__balance-chips[_ngcontent-%COMP%]{font-size:1em;margin:0 .5em}"],changeDetection:0}),n})();ki({selectId:t=>t.product.item.id,sortComparer:!1});const pSe={isShopItemPopupOpened:!1},N2t=Sr(pSe,de(qJe,()=>pSe),de(Cue,t=>({...t,isShopItemPopupOpened:!0})),de(yue,t=>({...t,isShopItemPopupOpened:!1}))),hSe=We(Ts(Xce),t=>t.isShopItemPopupOpened);function z2t(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",2),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit;return re(_().clickHandler(r))}),m()}if(2&t){const o=n.$implicit,e=_();l("clientStoreProduct",o)("loading",o.loading)("isDisabled",e.isButtonDisabled(o)),Hn("data-cy",o.item.id)}}J.prototype.clientShop={selectBuyItemPopupState:function G2t(){return this.selectSync(hSe)}.bind(J.prototype),subscribBuyItemPopupState:function V2t(){return this.select(hSe)}.bind(J.prototype)};let mSe=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,u,h),this.contextEnum=Wr,this.activatedComponentRoute=s}getItems(){return this.shopService.getShopInventoryCollection([Fe.TG.ProfileBackground])}sortPacks(e){return new ie.List(e).orderBy([i=>{if(i.flags&&i.flags.new&&!i.owned)return!0},i=>{if(i.flags&&i.flags.promo&&!i.owned)return!0},i=>i.owned],ie.ESort.Asc,ie.ESort.Asc,ie.ESort.Desc,ie.ESort.Asc).toArray()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-profile-background"]],features:[Ht],decls:2,vars:2,consts:[[1,"shop-profile-background__wrapper"],["class","shop-profile-background__box",3,"clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-profile-background__box",3,"clientStoreProduct","loading","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,z2t,1,4,"buy-item-store-box",1),m()),2&e&&(d(),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,em]}),n})();const A2=[{path:"profileBackground",data:{pageId:Mn.ProfileBackground},component:mSe}];let vH,j2t=1;const R2={};function fSe(t){return t in R2&&(delete R2[t],!0)}const H2t={setImmediate(t){const n=j2t++;return R2[n]=!0,vH||(vH=Promise.resolve()),vH.then(()=>fSe(n)&&t()),n},clearImmediate(t){fSe(t)}},{setImmediate:q2t,clearImmediate:W2t}=H2t,k2={setImmediate(...t){const{delegate:n}=k2;return((null==n?void 0:n.setImmediate)||q2t)(...t)},clearImmediate(t){const{delegate:n}=k2;return((null==n?void 0:n.clearImmediate)||W2t)(t)},delegate:void 0},gSe=new class K2t extends RU{flush(n){this._active=!0;const o=this._scheduled;this._scheduled=void 0;const{actions:e}=this;let i;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while((n=e[0])&&n.id===o&&e.shift());if(this._active=!1,i){for(;(n=e[0])&&n.id===o&&e.shift();)n.unsubscribe();throw i}}}(class $2t extends xU{constructor(n,o){super(n,o),this.scheduler=n,this.work=o}requestAsyncId(n,o,e=0){return null!==e&&e>0?super.requestAsyncId(n,o,e):(n.actions.push(this),n._scheduled||(n._scheduled=k2.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,o,e=0){var i;if(null!=e?e>0:this.delay>0)return super.recycleAsyncId(n,o,e);const{actions:r}=n;null!=o&&(null===(i=r[r.length-1])||void 0===i?void 0:i.id)!==o&&(k2.clearImmediate(o),n._scheduled===o&&(n._scheduled=void 0))}}),Q2t=new Ot("@ngrx/component-store Initial State");let _Se=(()=>{var t;class n{constructor(e){this.destroySubject$=new zU(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new zU(1),this.isInitialized=!1,this.state$=this.select(i=>i),this.state=oG(this.stateSubject$.pipe(wn(this.destroy$)),{requireSync:!1,manualCleanup:!0}),this.\u0275hasProvider=!1,e&&this.initState(e),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(e){return i=>{let s,r=!0;const c=(Hf(i)?i:Xn(i)).pipe(OS(nG),Da(()=>this.assertStateIsInitialized()),iG(this.stateSubject$),jn(([u,h])=>e(h,u)),Da(u=>this.stateSubject$.next(u)),mh(u=>r?(s=u,Tp):Wf(u)),wn(this.destroy$)).subscribe();if(s)throw s;return r=!1,c}}initState(e){_ee([e],nG).subscribe(i=>{this.isInitialized=!0,this.stateSubject$.next(i)})}setState(e){"function"!=typeof e?this.initState(e):this.updater(e)()}patchState(e){const i="function"==typeof e?e(this.get()):e;this.updater((r,s)=>({...r,...s}))(i)}get(e){let i;return this.assertStateIsInitialized(),this.stateSubject$.pipe(Qi(1)).subscribe(r=>{i=e?e(r):r}),i}select(...e){const{observablesOrSelectorsObject:i,projector:r,config:s}=function Y2t(t){const n=Array.from(t);let e={debounce:!1,equal:(s,a)=>s===a};if(function J2t(t){return typeof t.debounce<"u"||typeof t.equal<"u"}(n[n.length-1])&&(e={...e,...n.pop()}),1===n.length&&"function"!=typeof n[0])return{observablesOrSelectorsObject:n[0],projector:void 0,config:e};const i=n.pop();return{observablesOrSelectorsObject:n,projector:i,config:e}}(e);return(function X2t(t,n){return Array.isArray(t)&&0===t.length&&n}(i,r)?this.stateSubject$:wp(i)).pipe(s.debounce?
/**
     * @license MIT License
     *
     * Copyright (c) 2017-2020 Nicholas Jamieson and contributors
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy
     * of this software and associated documentation files (the "Software"), to deal
     * in the Software without restriction, including without limitation the rights
     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     * copies of the Software, and to permit persons to whom the Software is
     * furnished to do so, subject to the following conditions:
     *
     * The above copyright notice and this permission notice shall be included in all
     * copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     * SOFTWARE.
     */
function Z2t(){return t=>new ao(n=>{let o,e;const i=new zt;return i.add(t.subscribe({complete:()=>{o&&n.next(e),n.complete()},error:r=>{n.error(r)},next:r=>{e=r,o||(o=gSe.schedule(()=>{n.next(e),o=void 0}),i.add(o))}})),i})}():t=>t,r?jn(c=>i.length>0&&Array.isArray(c)?r(...c):r(c)):t=>t,ws(s.equal),HU({refCount:!0,bufferSize:1}),wn(this.destroy$))}selectSignal(...e){const i=[...e],r="object"==typeof i[e.length-1]?i.pop():{},s=i.pop(),a=i;return nF(0===a.length?()=>s(this.state()):()=>{const u=a.map(h=>h());return s(...u)},r)}effect(e){const i=new sn;return e(i).pipe(wn(this.destroy$)).subscribe(),r=>(Hf(r)?r:Xn(r)).pipe(wn(this.destroy$)).subscribe(a=>{i.next(a)})}checkProviderForHooks(){gSe.schedule(()=>{})}assertStateIsInitialized(){if(!this.isInitialized)throw new Error("".concat(this.constructor.name," has not been initialized yet. ")+"Please make sure it is initialized before updating/getting.")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Q2t,8))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),yH=(()=>{var t;class n{constructor(e){this.http=e}updateCreatorCode(e){return this.http.post("store/creator-code",{code:e}).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var JM=function(t){return t.UpdateCreatorCode="[Creator Code] Update Creator Code",t.UpdateCreatorCodeSuccess="[Creator Code] Update Creator Code Success",t.UpdateCreatorCodeError="[Creator Code] Update Creator Code Error",t.ResetCreatorCodeState="[Creator Code] Reset Creator Code State",t}(JM||{});const bSe=he(JM.UpdateCreatorCode),CSe=he(JM.UpdateCreatorCodeSuccess,{_as:"props",_p:void 0}),ySe=he(JM.UpdateCreatorCodeError,{_as:"props",_p:void 0}),SSe=he(JM.ResetCreatorCodeState);let wSe=(()=>{var t;let n=((t=class{constructor(e,i){this.creatorCodeClientService=e,this.store=i}updateCreatorCode(e){var i=this;return f(function*(){try{i.store.dispatch(bSe());const r=yield i.creatorCodeClientService.updateCreatorCode(e);i.store.dispatch(CSe({creatorCode:new kA(r)}))}catch(r){throw i.store.dispatch(ySe({error:r})),r}})()}dispose(){this.store.dispatch(SSe())}}).\u0275fac=function(e){return new(e||t)(T(yH),T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"dispose",null),n=Qe([Wo(),ue("design:paramtypes",[yH,Jo])],n),n})();const TSe="creatorCode",SH=Ts(TSe),PSe=We(SH,t=>t.creatorCode);J.prototype.creatorCode={selectCreatorCodeState:function eDt(){return this.selectSync(SH)}.bind(J.prototype),subscribeCreatorCodeState:function tDt(){return this.select(SH)}.bind(J.prototype),selectCreatorCode:function nDt(){return this.selectSync(PSe)}.bind(J.prototype),subscribeCreatorCode:function iDt(){return this.select(PSe)}.bind(J.prototype)};const rDt=Sr(ISe(),de(cw,(t,n)=>Se(t,o=>{o.creatorCode=n.creatorCode})),de(bSe,t=>Se(t,n=>{n.loadingState.isLoading=!0})),de(CSe,(t,n)=>Se(t,o=>{o.loadingState.isLoading=!1,o.loadingState.isLoaded=!0,o.loadingState.error=void 0,o.creatorCode=n.creatorCode})),de(ySe,(t,n)=>Se(t,o=>{o.loadingState.isLoading=!1,o.loadingState.error=n.error})),de(SSe,()=>ISe()));function ISe(){return{creatorCode:new kA,loadingState:{error:void 0,isLoaded:!1,isLoading:!1}}}function sDt(t,n){return rDt(t,n)}let aDt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[wSe,yH],imports:[$r.forFeature(TSe,sDt)]}),n})(),MSe=(()=>{var t;class n extends _Se{constructor(e,i){super({error:void 0,isCreatorButtonDisabled:!1,isCreatorCodeSubmitLoading:!1,creatorCodeCooldownSeconds:2,creatorCodeCooldownSecondsRemaing:0,submitButtonTimeout:void 0,creatorCodeTTL:void 0,platformName:"",timerConfig:new yl(eg).useDaysConfig({min:Rt.Hours}).useHoursConfig({min:Rt.Minutes}).useMinutesConfig({min:Rt.Seconds}).useSecondsConfig({max:Rt.Minutes}).build(),submitButtonCooldownTimerConfig:new yl(D_).useSecondsConfig({max:Rt.Seconds,showTextPeriod:!1,showDoubleDigits:!1}).build()}),this.creatorCodeService=e,this.configService=i,this.patchState({creatorCodeTTL:this.configService.getConfig().platform.creatorCodeTTL}),this.patchState({platformName:this.configService.getConfig().platform.name})}setError(e){this.patchState({error:e})}setCreatorCodeButtonDisabled(e){this.patchState({isCreatorButtonDisabled:e})}setCreaterCodeSubmitLoading(e){this.patchState({isCreatorCodeSubmitLoading:e})}setCreatorCodeCooldownSecondsRemaing(e){this.patchState({creatorCodeCooldownSecondsRemaing:e})}setSubmitButtonTimeout(e){this.patchState({submitButtonTimeout:e})}setCreatorCodeState(e){this.setCreaterCodeSubmitLoading(e.loadingState.isLoading),this.setCooldownForSubmitButton(e.creatorCode.getRemainingTime())}setCooldownForSubmitButton(e){const i=Math.max(this.get().creatorCodeTTL-e,0);if(i<this.get().creatorCodeCooldownSeconds){const r=this.get().creatorCodeCooldownSeconds-i;this.setCreatorCodeCooldownSecondsRemaing(r),this.setCreatorCodeButtonDisabled(!0),clearTimeout(this.get().submitButtonTimeout),this.setSubmitButtonTimeout(setTimeout(()=>{this.setCreatorCodeButtonDisabled(!1)},1e3*r))}}useCreatorCode(e){var i=this;return f(function*(){try{var r;const s=null===(r=e.controls.creatorCode)||void 0===r?void 0:r.value;if(!s||!e.valid)return void i.setError({key:"ERRORS.INVALID_INPUT"});yield i.creatorCodeService.updateCreatorCode(s)}catch(s){throw s}})()}ngOnDestroy(){clearTimeout(this.get().submitButtonTimeout)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(wSe),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var cDt=ve.EButtonModifier;const wH=t=>[t];function lDt(t,n){if(1&t&&(p(0,"p",8),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",yt(2,1,"SHOP.CREATOR_CODE_LABEL_NO_CODE",ne(4,wH,o.creatorCodeComponentState.platformName))," ")}}function uDt(t,n){if(1&t&&(p(0,"p",9),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",yt(2,1,"SHOP.CREATOR_CODE_LABEL",ne(4,wH,o.creatorCodeComponentState.platformName))," ")}}function dDt(t,n){if(1&t){const o=Ce();p(0,"div",10)(1,"span",11),H(2),V(3,"translate"),m(),p(4,"timer",12),Y("onCountdownFinished",function(){return oe(o),re(_().onCreatorCodeExpire())}),m()()}if(2&t){const o=_();d(2),se($(3,3,"LABEL.EXPIRES_IN")),d(2),l("milliseconds",1e3*o.creatorCode.getRemainingTime())("timerConfig",o.creatorCodeComponentState.timerConfig)}}const pDt=()=>({color:"inherit"});function hDt(t,n){if(1&t&&(p(0,"span"),H(1," ( "),B(2,"timer",17),H(3," ) "),m()),2&t){const o=_(2);d(2),l("styleObject",pt(3,pDt))("milliseconds",1e3*o.creatorCodeComponentState.creatorCodeCooldownSecondsRemaing)("timerConfig",o.creatorCodeComponentState.submitButtonCooldownTimerConfig)}}function mDt(t,n){if(1&t){const o=Ce();p(0,"form",13),Y("submit",function(){return oe(o),re(_().useCreatorCode())}),p(1,"user-input",14),Y("onClear",function(){return oe(o),re(_().onInputChange())})("onChange",function(){return oe(o),re(_().onInputChange())}),V(2,"translate"),V(3,"translate"),m(),p(4,"button-text",15),H(5),V(6,"translate"),U(7,hDt,4,4,"span",16),m()()}if(2&t){const o=_();l("formGroup",o.creatorCodeFormGroup),d(),l("placeholder",$(2,11,"LABEL.SUBMIT_CODE"))("inputCssClass","creator-code__input")("hideClearButton",!0)("errorMessage",$(3,13,o.creatorCodeComponentState.error)),d(3),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("type","submit")("disabled",o.creatorCodeComponentState.isCreatorButtonDisabled)("loading",o.creatorCodeComponentState.isCreatorCodeSubmitLoading),d(),ze("",$(6,15,"OTHER.SUBMIT")," "),d(2),l("ngIf",o.creatorCodeComponentState.isCreatorButtonDisabled&&o.creatorCodeComponentState.creatorCodeCooldownSecondsRemaing)}}let OSe=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.creatorCodeComponentStore=e,this.store=i,this.cdr=r,this.fieldValidatorFactory=s,this.fb=a,this.toaster=c,this.buttonModifier=cDt,this.destroy$=new sn,this.setCreatorCodeComponentState=u=>{this.creatorCodeComponentState=u},this.initCreatorCode=u=>{this.creatorCodeComponentStore.setCreatorCodeState(u),this.creatorCode=u.creatorCode,this.creatorCodeFormGroup=this.createFormGroup()}}ngOnInit(){const e=this.creatorCodeComponentStore.select(r=>r);e.pipe(wn(this.destroy$)).subscribe(this.setCreatorCodeComponentState);const i=this.store.creatorCode.subscribeCreatorCodeState();i.pipe(wn(this.destroy$)).subscribe(this.initCreatorCode),Ju(e.pipe(tr(1)),i.pipe(tr(1))).pipe(wn(this.destroy$)).subscribe(()=>this.cdr.detectChanges())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onInputChange(){this.creatorCodeComponentStore.setError(this.creatorCodeFormGroup.valid?void 0:{key:"ERRORS.INVALID_INPUT"})}useCreatorCode(){var e=this;return f(function*(){try{yield e.creatorCodeComponentStore.useCreatorCode(e.creatorCodeFormGroup)}catch(i){e.toaster.error("ERRORS.SOMETHING_WRONG")}})()}onCreatorCodeExpire(){this.cdr.detectChanges()}createFormGroup(){return this.fb.group({creatorCode:[this.creatorCode?this.creatorCode.getActiveCodeValue():"",this.fieldValidatorFactory.createCreatorCodeValidator()]})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(MSe),g(Jo),g(Re),g(wa),g(td),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["creator-code"]],features:[mn([MSe])],decls:10,vars:12,consts:[[1,"creator-code__wrapper"],[1,"creator-code__container"],["data-cy","creatorCodeIcon",1,"creator-code__icon"],["class","creator-code__label","data-cy","creatorCodeLabel",4,"ngIf"],["class","creator-code__label with__creator--code",4,"ngIf"],["class","creator-code__time-left",4,"ngIf"],["class","creator-code__container--form","novalidate","",3,"formGroup","submit",4,"ngIf"],[1,"creator-code__info",3,"innerHtml"],["data-cy","creatorCodeLabel",1,"creator-code__label"],[1,"creator-code__label","with__creator--code"],[1,"creator-code__time-left"],["data-cy","creatorCodeTimeLabel",1,"creator-code__time-left__label"],["data-cy","creatorCodeTimer",1,"creator-code__timer",3,"milliseconds","timerConfig","onCountdownFinished"],["novalidate","",1,"creator-code__container--form",3,"formGroup","submit"],["formControlName","creatorCode","data-cy","creatorCodeInputField",3,"placeholder","inputCssClass","hideClearButton","errorMessage","onClear","onChange"],["data-cy","creatorCodeSubmitButton",1,"creator-code__container--form__button",3,"buttonModifier","type","disabled","loading"],[4,"ngIf"],[1,"creator-code__container--form__button__timer",3,"styleObject","milliseconds","timerConfig"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"div",2),U(3,lDt,3,6,"p",3)(4,uDt,3,6,"p",4)(5,dDt,5,5,"div",5)(6,mDt,8,17,"form",6),B(7,"p",7),V(8,"translate"),V(9,"timeLeft"),m()()),2&e&&(d(3),l("ngIf",!i.creatorCode.isActive()),d(),l("ngIf",i.creatorCode.isActive()),d(),l("ngIf",i.creatorCode.isActive()),d(),l("ngIf",i.creatorCodeFormGroup),d(),l("innerHtml",yt(8,5,"SHOP.CREATOR_CODE_DESCRIPTION",ne(10,wH,$(9,8,i.creatorCodeComponentState.creatorCodeTTL))),Yn))},dependencies:[Su,Ql,yu,wl,Yl,Ne,Fs,pn,il,qe,Ps],styles:[".creator-code__container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;background-size:cover}.creator-code__icon[_ngcontent-%COMP%]{background-position:center;background-size:contain;background-repeat:no-repeat;height:15rem;position:absolute;top:-7rem}.creator-code__label[_ngcontent-%COMP%]{font-size:2rem;text-align:center}.creator-code__info[_ngcontent-%COMP%]{text-align:center;margin-bottom:2rem}.creator-code__container--form[_ngcontent-%COMP%]{margin-bottom:2rem}.creator-code__timer[_ngcontent-%COMP%]{margin-left:.2rem}.creator-code__time-left[_ngcontent-%COMP%]{margin-bottom:2rem}.creator-code__timer[_ngcontent-%COMP%], .creator-code__time-left[_ngcontent-%COMP%]{font-size:1.4rem}.creator-code__container--form__button[_ngcontent-%COMP%]{margin-top:2rem}"],changeDetection:0}),n})();var fDt=nt.EModuleAction,gDt=nt.EPermissionModule;let _Dt=(()=>{var t;class n{constructor(e){this.permissionsService=e}canActivate(){return this.permissionsService.getActionPermission(gDt.Shop,fDt.CreatorCode).isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ti))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const ESe=[{path:"creator-code",data:{pageId:Mn.CreatorCode},component:OSe,canActivate:[_Dt]}];let TH=(()=>{var t;class n{constructor(e){this.http=e}donateTo(e,i,r){return this.http.post("/users/inventory/gift",{receiverId:e,itemId:i,gameName:r}).toPromise().then(s=>s.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var L2=function(t){return t.ResetState="[Giftable-Packs] Reset state",t.UpdateGiftableItems="[Giftable-Packs] Update giftable items",t.DonateGiftableItem="[Giftable-Packs] Donate giftable pack",t}(L2||{});const xSe=he(L2.ResetState),ASe=he(L2.UpdateGiftableItems,{_as:"props",_p:void 0}),[RSe,kSe,LSe]=ya(L2.DonateGiftableItem);let D2=(()=>{var t;let n=((t=class{constructor(e,i){this.giftablePacksClientService=e,this.store=i,this.logoutSubject=new sn}initState(){wp(this.store.subscribeUserInventory(),this.store.subscribeUserGameInventory()).pipe(bt(e=>void 0!==e[0]&&void 0!==e[1]),wn(this.logoutSubject)).subscribe(e=>{const i=this.store.giftableItems.selectGiftableItems(),r=[...e[0].items,...e[1].items].filter(a=>a.item.giftOnly);let s=new Map;r.forEach(a=>{const c=s.get(a.item.id);if(c)c.count++;else{const u=i[a.item.id];let h={donate:{inProgress:!1,error:void 0}};u&&(h=u.actions),s.set(a.item.id,{...a,count:1,actions:h})}}),this.store.dispatch(ASe({items:s}))})}resetState(){this.store.dispatch(xSe()),this.logoutSubject.next()}donateTo(e,i,r){var s=this;return f(function*(){try{s.store.dispatch(RSe({itemId:i})),yield s.giftablePacksClientService.donateTo(e,i,r),s.store.dispatch(kSe({itemId:i}))}catch(a){const c=jt.createErrorInstance(a);throw s.store.dispatch(LSe({error:a,itemId:i})),c}})()}}).\u0275fac=function(e){return new(e||t)(T(TH),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),t);return Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"initState",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"resetState",null),n=Qe([Wo(),ue("design:paramtypes",[TH,J])],n),n})();var PH=function(t){return t.featureKey="giftableItems",t}(PH||{});const ey=ki({selectId:t=>t.item.id}),DSe={items:ey.getInitialState(),loadingState:{isLoaded:!1,isLoading:!1,error:void 0}},vDt=Sr(DSe,de(xSe,t=>DSe),de(ASe,(t,n)=>Se(t,o=>{o.items=ey.setAll(Array.from(n.items.values()),o.items),o.loadingState.isLoaded=!0})),de(RSe,(t,n)=>t.items.entities[n.itemId]?Se(t,o=>{const e=Se(t.items.entities[n.itemId],i=>{i.actions.donate.inProgress=!0});o.items=ey.updateOne({id:n.itemId,changes:e},t.items)}):t),de(kSe,(t,n)=>t.items.entities[n.itemId]?Se(t,o=>{const e=Se(t.items.entities[n.itemId],i=>{i.actions.donate.inProgress=!1,i.actions.donate.error=void 0});o.items=ey.updateOne({id:n.itemId,changes:e},t.items)}):t),de(LSe,(t,n)=>t.items.entities[n.itemId]?Se(t,o=>{const e=Se(t.items.entities[n.itemId],i=>{i.actions.donate.inProgress=!1,i.actions.donate.error=n.error});o.items=ey.updateOne({id:n.itemId,changes:e},t.items)}):t));function bDt(t,n){return vDt(t,n)}const B2=Ts(PH.featureKey),BSe=We(B2,t=>ey.getSelectors().selectEntities(t.items)),NSe=We(B2,t=>0!==ey.getSelectors().selectTotal(t.items));J.prototype.giftableItems={selectState:function CDt(){return this.selectSync(B2)}.bind(J.prototype),subscribeState:function yDt(){return this.select(B2)}.bind(J.prototype),selectGiftableItems:function SDt(){return this.selectSync(BSe)}.bind(J.prototype),subscribeGiftableItems:function wDt(){return this.select(BSe)}.bind(J.prototype),selectDoesTheUserHaveGiftableItem:function TDt(){return this.selectSync(NSe)}.bind(J.prototype),subscribeDoesTheUserHaveGiftableItem:function PDt(){return this.select(NSe)}.bind(J.prototype)};let IDt=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(D2))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[TH,D2],imports:[_b.forFeature(PH.featureKey,bDt)]}),n})();class FSe{constructor(n){wr(this,n)}}class USe{constructor(n){this.actions={donate:{inProgress:!1,error:void 0}},wr(this,n)}}var N2=function(t){return t.ResetState="[Giftable-Packs-Client] Reset state",t.UpdateGiftableItems="[Giftable-Packs-Client] Update giftable items",t.LoadStores="[Giftable-Packs-Client] Load stores",t}(N2||{});const GSe=he(N2.ResetState),IH=he(N2.UpdateGiftableItems,{_as:"props",_p:void 0}),[VSe,zSe,jSe]=ya(N2.LoadStores);var ty;let Q0=((ty=class{constructor(n,o,e,i,r,s){this.clientConfigService=n,this.giftablePacksService=o,this.iapShop=e,this.customizationShop=i,this.store=r,this.shop=s,this.logoutSubject=new sn}donateGiftableItem(n,o){return this.giftablePacksService.donateTo(n,o,this.clientConfigService.getConfig().platform.id)}buildGiftableProducts(n,o){const e=Object.values(n).filter(r=>!o.get(r.item.id)).map(r=>this.createProductsFromItemsViewModel(r)),i=Array.from(o.values()).map(r=>this.createGiftableProductClientViewModel(r,r.shopType,n[r.item.id]));this.store.dispatch(IH({items:[...e,...i]}))}showBuyPopup(n){this.shop.openItemPopup({item:n.item,store:{...this.store.shop[n.shopType].selectState().model,vipBonusMultiplier:0},options:{title:{key:"SHOP.DONATION_ITEM"}}})}loadGiftableItems(){var n=this;return f(function*(){try{var o;n.storesPromise=new Jn(n.loadStores());const e=yield n.storesPromise;null===(o=n.subscription)||void 0===o||o.unsubscribe(),n.subscription=n.store.giftableItems.subscribeGiftableItems().pipe(wn(n.logoutSubject)).subscribe(i=>{n.buildGiftableProducts(i,e)})}catch(e){console.warn(e)}})()}clearState(){var n;this.store.dispatch(GSe()),this.logoutSubject.next(),null===(n=this.storesPromise)||void 0===n||n.cancel()}createProductsFromItemsViewModel(n){return new FSe({equipped:n.equipped,equippedGames:n.equippedGames,count:n.count,canDonate:!0,canBuy:!1,item:new USe({...n.item,actions:n.actions})})}createGiftableProductClientViewModel(n,o,e){return new FSe({...n,count:e?e.count:0,canDonate:!!e,equipped:!!e&&e.equipped,equippedGames:e?e.equippedGames:[],item:new USe(e?{...e.item,actions:e.actions}:n.item),shopType:o})}loadStores(){var n=this;return f(function*(){try{n.store.dispatch(VSe());const[o,e]=yield Promise.all([n.iapShop.load({useCache:!0}),n.customizationShop.load({useCache:!0})]);return n.store.dispatch(zSe()),n.updateGiftableProductsWithProductsFromStores(o,e)}catch(o){throw n.store.dispatch(jSe(o)),o}})()}updateGiftableProductsWithProductsFromStores(n,o){let e=new Map;const i=n.products.filter(s=>s.item.giftOnly).map(s=>{const a=this.createGiftableProductClientViewModel(s,Eo.Iap);return e.set(s.item.id,a),a}),r=o.products.filter(s=>s.item.giftOnly).map(s=>{const a=this.createGiftableProductClientViewModel(s,Eo.Customization);return e.set(s.item.id,a),a});return this.store.dispatch(IH({items:[...i,...r]})),e}}).\u0275fac=function(n){return new(n||ty)(T(Zt),T(D2),T(Gh),T(Z0),T(J),T(Ko))},ty.\u0275prov=be({token:ty,factory:ty.\u0275fac,providedIn:"root"}),ty);Qe([function(t,n,o){let e;const i=o.value;return o.value=function(...r){return e||(e=i.apply(this,r),e.finally(()=>e=void 0)),e},o},ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Promise)],Q0.prototype,"loadGiftableItems",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],Q0.prototype,"clearState",null),Q0=Qe([Wo(),ue("design:paramtypes",[Zt,D2,Gh,Z0,J,Object])],Q0);const MDt=["scrollableContainer"];function ODt(t,n){if(1&t){const o=Ce();p(0,"search-user-popup",2),Y("close",function(){return oe(o),re(_().closeSearchPopup())})("onUserSelect",function(i){return oe(o),re(_().selectUser(i))}),m()}}function EDt(t,n){1&t&&B(0,"loader-image",1),2&t&&l("transparentBG",!0)}const xDt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),MH=t=>[t];function ADt(t,n){1&t&&B(0,"empty-content",3),2&t&&l("textArray",ne(2,MH,pt(1,xDt)))}const RDt=()=>({textKey:"SHOP.GIFTABLE_ITEMS_NO_ITEMS"});function kDt(t,n){1&t&&B(0,"empty-content",3),2&t&&l("textArray",ne(2,MH,pt(1,RDt)))}function LDt(t,n){1&t&&(B(0,"span",11),V(1,"translate")),2&t&&l("innerHTML",$(1,1,"SHOP.DONATION_INFO_TEXT"),Yn)}const DDt=t=>({name:t});function BDt(t,n){if(1&t){const o=Ce();p(0,"button-icon",14),Y("onClick",function(){return oe(o),re(_(4).resetDonateInfoState())}),m()}if(2&t){const o=_(4);l("icon",ne(2,DDt,o.EIcons.CLOSE))("bclass","giftableProduct--close-button-bclass")}}function NDt(t,n){if(1&t&&(p(0,"span",12),H(1),V(2,"translate"),m(),U(3,BDt,1,4,"button-icon",13)),2&t){const o=_(3);d(),ze(" ",yt(2,2,"SHOP.DONATION_TO",ne(5,MH,o.receiver.username.currentUsername))," "),d(2),Qo(3,o.showXButton?3:-1)}}const FDt=t=>({type:t}),UDt=()=>({withCount:!0,showItemsValue:!0,showItemDurability:!1,withFlags:!1});function GDt(t,n){if(1&t){const o=Ce();p(0,"shop-item-container",15),Y("select",function(i){return oe(o),re(_(3).buyGiftableItem(i))}),m()}if(2&t){const o=n.$implicit,e=_(3);l("clientStoreProduct",o)("shopUsageIntent",ne(6,FDt,e.receiver&&o.canDonate?e.EShopUsageIntent.DonateItems:e.EShopUsageIntent.BuyItems))("isLoading",o.item.actions.donate.inProgress)("isDisabled",o.item.actions.donate.inProgress)("itemData",pt(8,UDt))("imageUrl",e.getItemUrl(o))}}function VDt(t,n){if(1&t){const o=Ce();B(0,"div",16),p(1,"div",17)(2,"button-text",18),Y("onClick",function(){return oe(o),re(_(3).showPopup())})("onDisabledClick",function(){return oe(o),re(_(3).onDisabledDonateButtonClick())}),H(3),V(4,"translate"),m()()}if(2&t){const o=_(3);d(2),l("buttonModifier",o.EButtonModifier.BUTTON_DONATE)("bclass","giftableProducts--donate-button-bclass")("disabled",!o.doesTheUserHaveGiftableItem),d(),ze(" ",$(4,4,"BUTTON.DONATE")," ")}}const zDt=t=>({donating:t});function jDt(t,n){if(1&t&&(p(0,"div",5),U(1,LDt,2,3,"span",6)(2,NDt,4,7),m(),p(3,"div",7)(4,"div",8,9),U(6,GDt,1,9,"shop-item-container",10),m()(),U(7,VDt,5,6)),2&t){const o=_(2);d(),Qo(1,o.receiver?2:1),d(2),l("ngClass",ne(5,zDt,o.receiver)),d(3),l("ngForOf",o.giftableProducts)("ngForTrackBy",o.trackByGiftableItem),d(),Qo(7,o.receiver?-1:7)}}function HDt(t,n){if(1&t&&U(0,kDt,1,4,"empty-content",4)(1,jDt,8,7),2&t){const o=_();Qo(0,0===(null==o.giftableProducts?null:o.giftableProducts.length)?0:(null==o.giftableProducts?null:o.giftableProducts.length)>0?1:-1)}}let F2=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.cdr=e,this.store=i,this.giftablePackService=r,this.urlService=s,this.popupService=a,this.toastService=c,this.destroyRef=u,this.translationPipe=h,this.shop=b,this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.EShopUsageIntent=ci,this.showSearchPopup=!1,this.showXButton=!0}ngOnInit(){this.giftablePackService.loadGiftableItems(),this.addSubscriptions();const e=this.store.shop[this.shop.shopType].selectState();e.receiver.profile.id!==this.store.selectSimpleProfile().id&&(this.receiver=e.receiver.profile,this.showXButton=!1),this.cdr.detectChanges()}trackByGiftableItem(e,i){return i.item.id}showPopup(){this.showSearchPopup=!0,this.cdr.detectChanges()}onDisabledDonateButtonClick(){this.toastService.warn("SHOP.DONATION_WARN_TEXT")}selectUser(e){this.showSearchPopup=!1,this.receiver=e,this.cdr.detectChanges()}resetDonateInfoState(){this.receiver=void 0,this.cdr.detectChanges()}closeSearchPopup(){this.showSearchPopup=!1,this.cdr.detectChanges()}getItemUrl(e){return this.urlService.getShopItemPreviewUrl(e.item)}buyGiftableItem(e){var r,i=this;if(e.prices||this.receiver){if(this.receiver&&e.canDonate)return void this.popupService.confirm({textParams:{translationKey:"SHOP.DONATION_CONFIRMATION",params:[this.getGiftableItemName(e.item),this.receiver.username.currentUsername]},buttons:{action:(r=f(function*(){try{yield i.giftablePackService.donateGiftableItem(i.receiver.id,e.item.id),i.toastService.success("SHOP.DONATION_SUCCESSFUL")}catch(s){i.toastService.error(s instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}}),function(){return r.apply(this,arguments)})}});this.giftablePackService.showBuyPopup(e)}}addSubscriptions(){this.store.giftableItemsClient.subscribeState().pipe(mi(this.destroyRef)).subscribe(e=>{this.giftableProductsState=e,this.cdr.detectChanges()}),this.store.giftableItemsClient.subscribeGiftableProducts().pipe(mi(this.destroyRef)).subscribe(e=>{this.giftableProducts=e,this.cdr.detectChanges()}),this.store.giftableItems.subscribeDoesTheUserHaveGiftableItem().pipe(mi(this.destroyRef)).subscribe(e=>{this.doesTheUserHaveGiftableItem=e,this.cdr.detectChanges()})}getGiftableItemName(e){return this.translationPipe.transform(e.type===Fe.TG.ChipPack?{key:"SHOP.ITEMS.CHIP_PACKS",params:[e.amount]}:e.type===Fe.TG.GemsPack?{key:"SHOP.ITEMS.GEM_PACKS",params:[e.amount]}:e.type===Fe.TG.Vip||e.type===Fe.TG.XpPack?{key:"SHOP.ITEMS.".concat(e.id,".title")}:{key:"SHOP.ITEMS.".concat(e.type,".title")})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(Q0),g(Qm),g(Cn),g(Dt),g(br),g(qe),g(Ko))},t.\u0275cmp=pe({type:t,selectors:[["giftable-packs"]],viewQuery:function(e,i){if(1&e&&$e(MDt,5),2&e){let r;je(r=He())&&(i.scrollableContainerRef=r.first)}},decls:5,vars:2,consts:[[1,"giftableProducts__content"],[3,"transparentBG"],[3,"close","onUserSelect"],[1,"giftableProducts__empty-content",3,"textArray"],["class","giftableProducts__empty-content",3,"textArray"],[1,"giftableProducts-donate-to--title-wrapper"],["class","giftableProducts--title-text",3,"innerHTML"],[1,"giftableProducts--content",3,"ngClass"],[1,"giftableProducts--wrapper"],["scrollableContainer",""],["class","giftableItem","click-feedback","",3,"clientStoreProduct","shopUsageIntent","isLoading","isDisabled","itemData","imageUrl","select",4,"ngFor","ngForOf","ngForTrackBy"],[1,"giftableProducts--title-text",3,"innerHTML"],[1,"giftableProducts--title-text"],["class","giftableProduct--close-button",3,"icon","bclass"],[1,"giftableProduct--close-button",3,"icon","bclass","onClick"],["click-feedback","",1,"giftableItem",3,"clientStoreProduct","shopUsageIntent","isLoading","isDisabled","itemData","imageUrl","select"],[1,"giftableProducts--border-bottom"],[1,"giftableProducts--donate-button-wrapper"],[1,"giftableProducts--donate-button",3,"buttonModifier","bclass","disabled","onClick","onDisabledClick"]],template:function(e,i){1&e&&(U(0,ODt,1,0,"search-user-popup"),p(1,"div",0),U(2,EDt,1,1,"loader-image",1)(3,ADt,1,4)(4,HDt,2,1),m()),2&e&&(Qo(0,i.showSearchPopup?0:-1),d(2),Qo(2,i.giftableProductsState.loadingState.isLoading?2:i.giftableProductsState.loadingState.error?3:4))},dependencies:[Xe,Mt,bo,pn,ei,Oi,po,rj,XC,qe],styles:[".giftableProducts__content[_ngcontent-%COMP%]{width:100%;height:100%}.giftableItem[_ngcontent-%COMP%]{max-width:180px;height:255px}@media screen and (max-width: 440px){.giftableItem[_ngcontent-%COMP%]{max-width:45%;height:220px}}@media screen and (max-width: 360px){.giftableItem[_ngcontent-%COMP%]{height:205px}}.giftableProducts--donate-button[_ngcontent-%COMP%]{width:180px;height:4rem}.giftableProducts--content[_ngcontent-%COMP%]{height:calc(86% - 2px)}.giftableProducts--content.donating[_ngcontent-%COMP%]{height:94%}@media screen and (max-width: 440px){.giftableProducts--content[_ngcontent-%COMP%]{max-height:calc(80% - 2px)}.giftableProducts--content.donating[_ngcontent-%COMP%]{max-height:90%}}@media screen and (max-width: 360px){.giftableProducts--content[_ngcontent-%COMP%]{max-height:calc(78% - 2px)}.giftableProducts--content.donating[_ngcontent-%COMP%]{max-height:90%}}.giftableProducts--wrapper[_ngcontent-%COMP%]{display:flex;width:100%;flex-wrap:wrap;gap:2rem;justify-content:center;max-height:100%}.giftableProducts__empty-content[_ngcontent-%COMP%]{width:100%;height:100%}.giftableProducts-donate-to--title-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;padding:0 2rem;height:6%}@media screen and (max-width: 440px){.giftableProducts-donate-to--title-wrapper[_ngcontent-%COMP%]{height:10%}}.giftableProducts--border-bottom[_ngcontent-%COMP%]{width:100%;height:2px}.giftableProducts--donate-button-wrapper[_ngcontent-%COMP%]{width:100%;height:8%;display:flex;align-items:center}@media screen and (max-width: 440px){.giftableProducts--donate-button-wrapper[_ngcontent-%COMP%]{height:10%}}@media screen and (max-width: 360px){.giftableProducts--donate-button-wrapper[_ngcontent-%COMP%]{height:12%}}"],changeDetection:0}),n})();const HSe=[{path:"giftable-packs",data:{pageId:Mn.GiftablePacksStore},component:F2}],qDt=(t,n)=>({"with-margin-bottom":t,popup__outlet:n});function WDt(t,n){if(1&t){const o=Ce();p(0,"buy-item-store-box",3),Y("disabledClick",function(){return oe(o),re(_().clickDisabled())})("buttonClicked",function(){const r=oe(o).$implicit,s=_();return re(s.clickHandler(r,s.gameId))}),m()}if(2&t){const o=n.$implicit,e=n.last,i=_();l("ngClass",cn(6,qDt,e,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup))("clientStoreProduct",o)("loading",o.loading)("gameId",i.gameId)("isDisabled",i.isButtonDisabled(o)),Hn("data-cy",o.item.id)}}let OH=(()=>{var t;class n extends Cf{constructor(e,i,r,s,a,c,u,h){super(e,i,r,a,c,u,h),this.contextEnum=Wr,this.activatedComponentRoute=s,this.type=a.snapshot.queryParams.subType||a.snapshot.params.subType}ngOnInit(){this.type?super.ngOnInit():this.router.navigate(["inventory"],{relativeTo:this.route.parent})}getItems(){return this.shopService.getShopInventoryCollection([this.type])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ko),g(cc),g(on),g(Pr),g(Po),g(J),g($t),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["shop-voiceovers"]],features:[mn([ia]),Ht],decls:3,vars:2,consts:[[1,"shop-voiceovers__wrapper"],["wrapper",""],["class","shop-voiceovers__box",3,"ngClass","clientStoreProduct","loading","gameId","isDisabled","disabledClick","buttonClicked",4,"ngFor","ngForOf","ngForTrackBy"],[1,"shop-voiceovers__box",3,"ngClass","clientStoreProduct","loading","gameId","isDisabled","disabledClick","buttonClicked"]],template:function(e,i){1&e&&(p(0,"section",0,1),U(2,WDt,1,9,"buy-item-store-box",2),m()),2&e&&(d(2),l("ngForOf",i.packs)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,em],styles:["@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.shop-voiceovers__push-the-bottom-box[_ngcontent-%COMP%]{width:100%;height:8rem}@media only screen and (max-width: 1280px){.shop-voiceovers__push-the-bottom-box[_ngcontent-%COMP%]{height:5rem}}"]}),n})();const EH=[{path:"voiceOver/:game",data:{pageId:Mn.ShopVoiceovers},component:OH},{path:"voiceOver/:game/:subType",data:{pageId:Mn.ShopVoiceovers},component:OH}],Y0=rl.defaultLoggedRoute,$Dt=[{path:"shop/:id/:path/:code",redirectTo:"".concat(Y0,"(").concat(Fn,":").concat(Ai).concat(Y0,"/shop/:id/:path/:code)")},{path:"shop/:id/:path",redirectTo:"".concat(Y0,"(").concat(Fn,":").concat(Ai).concat(Y0,"/shop/:id/:path)")},{path:"shop/:id",redirectTo:"".concat(Y0,"(").concat(Fn,":").concat(Ai).concat(Y0,"/shop/:id)")}],KDt=[{path:"shop",canActivate:[Eye],component:sH,children:[...gH,...eSe,...Hye,..._H,...rSe,...Rye,...Nye,...b2,...C2,...y2,...S2,...M2,...O2,...P2,...E2,...x2,...A2,...w2,...T2,...ESe,...HSe,{path:"klaverjasDeck",redirectTo:"deck"},{path:"skatDeck",redirectTo:"deck"},{path:"deDeck",redirectTo:"deck"},{path:"itDeck",redirectTo:"deck"},{path:"chDeck",redirectTo:"deck"},{path:"esDeck",redirectTo:"deck"},{path:"tarotDeck",redirectTo:"deck"},{path:"",redirectTo:"currency",pathMatch:"full"}]},{path:"shop/:id",canActivate:[Eye],component:sH,children:[...gH,...eSe,...Hye,..._H,...rSe,...Rye,...Nye,...b2,...C2,...y2,...S2,...M2,...O2,...E2,...x2,...A2,...P2,...w2,...T2,...ESe,...HSe,...EH,{path:"",redirectTo:"currency",pathMatch:"full"}]}],ZDt=[kb,Lb,xi,No,mH,Ls,Kce,xi,Yi,Io,Gae,bu,$r.forFeature(Xce,function F2t(t,n){return N2t(t,n)})],QDt=[{provide:Uw,useFactory:()=>({paymentsByPlatform:{browser:["epay","easypay","paypal","xsolla","xsollacc","xsollaepay","xsollapaypal","paypalcheckout","teracomm","caschips","casgems","code","fortumo","bcashy","carry1st"],facebook:["facebook","caschips","casgems","code"],android:["google","cafebazaar","caschips","casgems","code"],vivaAndroid:["teracomm","caschips","casgems","code"],cafebazaar:["cafebazaar","caschips","casgems","code"],windows:["windows","caschips","casgems","code"],ios:["apple","caschips","casgems","code"],spilgames:["epay","easypay","paypal","paypalcheckout","xsolla","xsollacc","caschips","casgems","code"]}})},{provide:Ko,useExisting:Gh}];let J0=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(JC))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...QDt],imports:[ZDt]}),n})();var U2;Wu(FV,function(){return[Xe,Mt,Ne,Bo,mv,pf,Ji,Wi,Zp,Ga,Uh,Is,X_,Jh,RV]},function(){return[qe]}),Wu(r0,function(){return[Ne,bo,so,Oi,Ga,Eg,ZM,YM]},function(){return[Sp,qe]}),function(t){class n extends Error{constructor(){super(),this.name="PhotosLimitReachedError"}}t.PhotosLimitReachedError=n}(U2||(U2={}));var YDt=U2.PhotosLimitReachedError;let G2=(()=>{var t;class n{constructor(e,i,r){this.galleryService=i,this.store=r,this.user=e}editProfile(e){return this.user.updateProfile(e)}editProfileAvatar(e){var i=this;return f(function*(){return(yield i.galleryService.requestGallery(i.store.selectUserState().profile.id)).length>=Lt.CONFIG.core.images.gallery.maxImages?Promise.reject(new YDt):i.user.updateAvatar(e)})()}storeEditProfileForm(e){this.editProfileForm=e}getEditProfileFrom(){return this.editProfileForm}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kr),T(I0),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var JDt=__webpack_require__(99577),XDt=__webpack_require__.n(JDt);let xH=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.store=a,this.loader=e,this.router=s,this.popup=i,this.editProfileService=r,this.navigation=c,this.permissions=u,this.constants=h,this.user=this.store.selectUserProfile(),this.formFields=["username","sex","age","city","country","status","phone"]}canActivate(e,i){const r=this.permissions.getActionPermission(nt.EPermissionModule.Profile,nt.EModuleAction.Edit);return!r.isPermitted&&(r.isEnabled&&this.permissions.showFailedRequirementsToUser(r),this.navigation.isFirstNavigation(this.navigation.getCurrentNavigation().previousNavigation))?this.navigation.parseUrl(this.constants.defaultLoggedRoute):r.isPermitted}canDeactivate(e,i,r,s){if(this.userInfoCollection=[],this.formInfoCollection=[],!0===this.navigation.isNavigationStoppable(s)){const a=this.editProfileService.getEditProfileFrom();return!!a.pristine||(this.getFormUserInfo(a),this.getUserInfo(),this.diffrencesManager(a,s))}return!0}diffrencesManager(e,i){return!(XDt()(this.userInfoCollection,this.formInfoCollection,Op()).length>0)||this.showConfirmPopup(e,i)}getFormUserInfo(e){for(let i=0,r=this.formFields.length;i<r;i++)e.controls[this.formFields[i]]&&this.userInfoCollection.push(e.controls[this.formFields[i]].value)}getUserInfo(){for(let e=0,i=this.formFields.length;e<i;e++)this.user.profile[this.formFields[e]]&&this.formInfoCollection.push(this.user.profile[this.formFields[e]])}showConfirmPopup(e,i){return this.popup.confirm({buttons:{action:()=>{e.markAsPristine(),this.loader.off(),this.editProfileService.storeEditProfileForm(e),this.router.navigateByUrl(i.url)}},textParams:{translationKey:"EDIT_PROFILE.UNSAVED_CONTENT"}}),this.loader.off(),!1}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ro),T(Cn),T(G2),T(on),T(J),T(Yt),T(Pi),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function eBt(t,n){if(1&t&&(p(0,"div",19)(1,"p"),H(2),V(3,"translate"),m()()),2&t){const o=_();d(2),se($(3,1,"GAME_HISTORY."+o.game.roomType))}}function tBt(t,n){1&t&&(p(0,"div",19)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"GAME_HISTORY.RANKED_GAME")))}function nBt(t,n){if(1&t&&(p(0,"p",20),H(1),m()),2&t){const o=_();d(),se(o.game.myTeamScore)}}function iBt(t,n){if(1&t&&(p(0,"p",26),H(1),m()),2&t){const o=_().$implicit;d(),ze(" ",o.score," ")}}function oBt(t,n){if(1&t&&(p(0,"div",21,22),U(2,iBt,2,1,"p",23),p(3,"div",24),B(4,"avatar",25),m()()),2&t){const o=n.$implicit,e=Kt(1),i=_();go("width",i.game.myTeamPlayerContainerWidth),d(2),l("ngIf",i.game.isFreeForAll),d(),go("height",e.clientWidth),d(),l("user",o.platformProfile)("isLink",!o.isBot)}}function rBt(t,n){1&t&&(p(0,"div",27)(1,"p"),H(2,"VS"),m()())}function sBt(t,n){if(1&t&&(p(0,"p",20),H(1),m()),2&t){const o=_();d(),se(o.game.otherTeamScore)}}function aBt(t,n){if(1&t&&(p(0,"p",26),H(1),m()),2&t){const o=_().$implicit;d(),ze(" ",o.score," ")}}function cBt(t,n){if(1&t&&(p(0,"div",21,28),U(2,aBt,2,1,"p",23),p(3,"div",24),B(4,"avatar",25),m()()),2&t){const o=n.$implicit,e=Kt(1),i=_();go("width",i.game.otherTeamPlayerContainerWidth),d(2),l("ngIf",i.game.isFreeForAll),d(),go("height",e.clientWidth),d(),l("user",o.platformProfile)("isLink",!o.isBot)}}function lBt(t,n){if(1&t&&(p(0,"p",29),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",$(2,1,"PLATFORM_IDS."+o.game.settings.name)," ")}}function uBt(t,n){1&t&&(p(0,"p",30),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"GAME_HISTORY.MY_SCORE")," "))}function dBt(t,n){1&t&&(p(0,"p",30),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"GAME_HISTORY.ELO_DELTA_TEXT")," "))}function pBt(t,n){1&t&&Un(0)}function hBt(t,n){if(1&t&&(p(0,"span",31),H(1),m(),B(2,"currency-component",32)),2&t){const o=_();d(),se(o.game.reward?"+":"-"),d(),l("currency",o.currencyType.Chips)("value",o.game.reward?o.game.reward.amount:o.game.bet)}}function mBt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se($(2,1,o.game.won?"GAME_HISTORY.WON":"GAME_HISTORY.LOST"))}}function fBt(t,n){1&t&&(p(0,"span",31),H(1,"+"),m())}function gBt(t,n){if(1&t&&(p(0,"p"),U(1,fBt,2,0,"span",34),H(2),V(3,"number"),m()),2&t){const o=_(2);d(),l("ngIf",o.eloDelta>0),d(),ze("",$(3,2,o.eloDelta)," ")}}function _Bt(t,n){if(1&t&&U(0,mBt,3,3,"p",33)(1,gBt,4,4,"p",33),2&t){const o=_();l("ngIf",!o.game.competitive||null==o.eloDelta),d(),l("ngIf",o.game.competitive&&null!=o.eloDelta)}}const vBt=t=>({"game-won":t}),bBt=(t,n,o)=>({"game-won":t,"game-lost":n,tournament:o});let qSe=(()=>{var t;class n{constructor(e,i,r){this.store=r,this.classes="",this.noScoreGame=!1,this.currencyType=ln,this.activatedComponentRoute=e,this.clientConfigService=i,this.singleGamePlatform=this.clientConfigService.singleGamePlatform()}ngOnInit(){this.myTeam=this.createPlayerViewModels(this.game.myTeam),this.otherTeam=this.createPlayerViewModels(this.game.otherTeam),this.eloDelta=this.calcMyEloDelta(this.game),null===this.game.gameResult.gameStats.playerPoints&&(this.noScoreGame=!0),this.classes+=this.activatedComponentRoute.outletContext.container===Wr.Popup?"game-history-box__popup-outlet":""}trackByFn(e,i){return i.id}createPlayerViewModels(e){return e.map(i=>({...i,platformProfile:Lo.toPlatformProfile(i.profile)}))}calcMyEloDelta(e){var i,r;if(!e.competitive)return;const s=this.store.selectSimpleProfile().id,a=null===(i=e.competitiveResult)||void 0===i||null===(i=i.newRankedStats[s])||void 0===i?void 0:i.elo,c=null===(r=e.competitiveResult)||void 0===r||null===(r=r.oldRankedStats[s])||void 0===r?void 0:r.elo;return null!=a&&null!=c?a-c:void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pr),g(Zt),g(J))},t.\u0275cmp=pe({type:t,selectors:[["game-history-box"]],hostVars:2,hostBindings:function(e,i){2&e&&nb(i.classes)},inputs:{game:"game",windowWidth:"windowWidth"},features:[mn([ia])],decls:35,vars:41,consts:[[1,"game-history-box__container--game-played",3,"ngClass"],[1,"game-history-box__container--upper-info"],[1,"game-history-box__container--time"],["class","game-history-box__container--room-type",4,"ngIf"],[1,"game-history-box__container--date"],[1,"game-history-box__container--separator"],[1,"game-history-box__container--bottom-info"],[1,"game-history-box__container--my-team"],["class","game-history-box__score-container game-history-box__text--player-score",4,"ngIf"],["class","player",3,"width",4,"ngFor","ngForOf","ngForTrackBy"],["class","game-history-box__container--middle-info",4,"ngIf"],[1,"game-history-box__container--other-team"],[1,"game-history-box__container--footer"],["class","game-history-box__container--game-name",4,"ngIf"],["class","game-history-box__text--my-score",4,"ngIf"],[1,"game-history-box__text--text-game-status",3,"ngClass"],[4,"ngIf","ngIfThen","ngIfElse"],["chips",""],["text",""],[1,"game-history-box__container--room-type"],[1,"game-history-box__score-container","game-history-box__text--player-score"],[1,"player"],["playerContainerMyTeam",""],["class","game-history-box__text--player-score",4,"ngIf"],[1,"game-history-box__container--player-avatar"],[3,"user","isLink"],[1,"game-history-box__text--player-score"],[1,"game-history-box__container--middle-info"],["playerContainerOtherTeam",""],[1,"game-history-box__container--game-name"],[1,"game-history-box__text--my-score"],[1,"game-history-box__text--sign"],[1,"game-history-box__text--chips",3,"currency","value"],[4,"ngIf"],["class","game-history-box__text--sign",4,"ngIf"]],template:function(e,i){if(1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"p"),H(4),V(5,"date"),m()(),U(6,eBt,4,3,"div",3)(7,tBt,4,3,"div",3),p(8,"div",4)(9,"p"),H(10),V(11,"date"),m()()(),B(12,"div",5),p(13,"div",6)(14,"div",7),U(15,nBt,2,1,"p",8)(16,oBt,5,7,"div",9),m(),U(17,rBt,3,0,"div",10),p(18,"div",11),U(19,sBt,2,1,"p",8)(20,cBt,5,7,"div",9),m()(),p(21,"div",12)(22,"p"),H(23),V(24,"translate"),m(),U(25,lBt,3,3,"p",13),m(),p(26,"div",12),U(27,uBt,3,3,"p",14)(28,dBt,3,3,"p",14),p(29,"p",15),U(30,pBt,1,0,"ng-container",16)(31,hBt,3,3,"ng-template",null,17,ft)(33,_Bt,2,2,"ng-template",null,18,ft),m()()()),2&e){const r=Kt(32),s=Kt(34);l("ngClass",ne(35,vBt,i.game.won)),d(4),se(yt(5,27,1e3*i.game.createdAt,"HH:mm")),d(2),l("ngIf",!i.game.competitive),d(),l("ngIf",i.game.competitive),d(3),se(yt(11,30,1e3*i.game.createdAt,"dd.MM.y")),d(4),go("width",i.game.myTeamContainerWidth),d(),l("ngIf",!i.game.isFreeForAll),d(),l("ngForOf",i.myTeam)("ngForTrackBy",i.trackByFn),d(),l("ngIf",!i.game.isFreeForAll),d(),go("width",i.game.otherTeamContainerWidth),d(),l("ngIf",!i.game.isFreeForAll),d(),l("ngForOf",i.otherTeam)("ngForTrackBy",i.trackByFn),d(2),ni("game-history-box__container--game-mode ",i.game.settings.mode,""),d(),ze(" ",$(24,33,"GAME_HISTORY."+i.game.settings.mode.toUpperCase())," "),d(2),l("ngIf",!i.singleGamePlatform),d(2),l("ngIf",!i.game.competitive),d(),l("ngIf",i.game.competitive),d(),l("ngClass",_a(37,bBt,i.game.reward,!i.game.reward||!i.game.won&&"blitzTournament"===i.game.roomType.toString(),!i.game.reward&&!i.game.bet||i.game.reward&&0===i.game.reward.amount&&i.game.bet||"blitzTournament"===i.game.roomType.toString()||"promoTournament"===i.game.roomType.toString()||"knockoutTournament"===i.game.roomType.toString())),d(),l("ngIf",!!i.game.bet&&!i.game.competitive)("ngIfThen",r)("ngIfElse",s)}},dependencies:[Xe,Mt,Ne,Bo,So,Lx,sb,qe],styles:["[_nghost-%COMP%]{position:relative;width:calc(50% - 1rem);margin:.5rem}.game-history-box__popup-outlet[_nghost-%COMP%]{width:calc(100% - 1rem)}@media only screen and (max-width: 980px){[_nghost-%COMP%]{width:calc(100% - 1rem)}}.game-history-box__container--game-played[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;border-radius:.4rem;min-height:0!important;padding-bottom:1rem}.game-history-box__container--upper-info[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;flex-flow:row wrap}.game-history-box__container--time[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;flex:1;padding-left:1rem}@media only screen and (max-width: 360px){.game-history-box__container--time[_ngcontent-%COMP%]{font-size:1rem}}.game-history-box__container--room-type[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:3;text-align:center}@media only screen and (max-width: 440px){.game-history-box__container--room-type[_ngcontent-%COMP%]{font-size:1.15rem}}.game-history-box__container--date[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;flex:1;padding-right:1rem}@media only screen and (max-width: 360px){.game-history-box__container--date[_ngcontent-%COMP%]{font-size:1rem}}.game-history-box__container--separator[_ngcontent-%COMP%]{position:relative;width:100%;height:.1rem}.game-history-box__container--bottom-info[_ngcontent-%COMP%]{position:relative;width:100%;margin:1rem .5rem;display:flex;justify-content:center;flex-flow:row wrap}.game-history-box__container--my-team[_ngcontent-%COMP%]{order:1}.game-history-box__container--other-team[_ngcontent-%COMP%]{order:3}.game-history-box__container--my-team[_ngcontent-%COMP%], .game-history-box__container--other-team[_ngcontent-%COMP%]{width:40%;height:100%;display:flex;flex-flow:row wrap;justify-content:space-around}.game-history-box__container--my-team[_ngcontent-%COMP%]   .player[_ngcontent-%COMP%], .game-history-box__container--other-team[_ngcontent-%COMP%]   .player[_ngcontent-%COMP%]{width:45%;display:flex;align-items:center;flex-flow:row wrap}.game-history-box__container--my-team[_ngcontent-%COMP%]   .player[_ngcontent-%COMP%]   .game-history-box__container--player-avatar[_ngcontent-%COMP%], .game-history-box__container--other-team[_ngcontent-%COMP%]   .player[_ngcontent-%COMP%]   .game-history-box__container--player-avatar[_ngcontent-%COMP%]{width:100%}.game-history-box__container--my-team[_ngcontent-%COMP%]   .player[_ngcontent-%COMP%]   .game-history-box__container--player-avatar[_ngcontent-%COMP%]:hover, .game-history-box__container--other-team[_ngcontent-%COMP%]   .player[_ngcontent-%COMP%]   .game-history-box__container--player-avatar[_ngcontent-%COMP%]:hover{cursor:pointer}.game-history-box__container--middle-info[_ngcontent-%COMP%]{order:2;position:relative;width:-moz-fit-content;width:fit-content;padding:2rem 1rem 0;height:100%;display:flex;justify-content:center;align-items:center}.game-history-box__container--middle-info[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{text-transform:uppercase}.game-history-box__text--text-game-status[_ngcontent-%COMP%]{font-size:1.4rem}@media only screen and (max-width: 480px){.game-history-box__text--text-game-status.tournament[_ngcontent-%COMP%]{font-size:1rem}}.game-history-box__text--player-score[_ngcontent-%COMP%], .game-history-box__score-container[_ngcontent-%COMP%]{text-align:center;width:100%;height:2rem;display:flex;justify-content:center;align-items:center}.game-history-box__container--game-mode[_ngcontent-%COMP%], .game-history-box__text--my-score[_ngcontent-%COMP%], .game-history-box__text--text-game-status[_ngcontent-%COMP%], .game-history-box__container--game-name[_ngcontent-%COMP%]{margin:0 1rem}"]}),n})(),AH=(()=>{var t;class n{constructor(e){this.games=e}getHistory(){var e=this;return f(function*(){return e.gameHistoryCache||(e.gameHistoryCache=yield e.games.requestHistory()),e.gameHistoryCache})()}clearCache(){this.gameHistoryCache=void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(T(oj))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var CBt=lt.NetworkError;function yBt(t,n){1&t&&B(0,"loader-image",8),2&t&&l("transparentBG",!0)}function SBt(t,n){1&t&&B(0,"empty-content",9),2&t&&l("textArray",_(2).emptyContentTextKeys)}function wBt(t,n){if(1&t&&B(0,"game-history-box",10),2&t){const o=n.$implicit,e=_(2);l("game",o)("windowWidth",e.windowWidth)}}const TBt=t=>({handler:t}),PBt=(t,n)=>({"no-games":t,"game-history__popup-outlet":n});function IBt(t,n){if(1&t&&(p(0,"section",1,2),U(2,yBt,1,1,"loader-image",3)(3,SBt,1,1,"empty-content",4),p(4,"div",5),U(5,wBt,1,2,"game-history-box",6),V(6,"slice"),m(),B(7,"div",7),m()),2&t){const o=Kt(1),e=_();l("list",e.gamesPlayed)("initialListCount",e.showedGamesCount)("step",10)("onScrolledToBottom",ne(13,TBt,e.triggerDetection))("ngClass",cn(15,PBt,null==e.gamesPlayed||0===e.gamesPlayed.length,e.activatedComponentRoute.outletContext.container===e.contextEnum.Popup)),d(2),l("ngIf",e.state===e.asyncComponentState.Pending),d(),l("ngIf",e.isEmptyContentVisible),d(2),l("ngForOf",u_(6,9,e.gamesPlayed,0,o.length))("ngForTrackBy",e.trackByFn)}}let WSe=(()=>{var t;class n{constructor(e,i,r,s,a){this.contextEnum=Wr,this.asyncComponentState=Jr,this.triggerDetection=()=>{this.changeDetectorRef.destroyed||this.changeDetectorRef.detectChanges()},this.onResize=()=>{this.debouncedResize()},this.state=Jr.None,this.renderer=s,this.gameHistoryService=e,this.store=i,this.changeDetectorRef=r,this.gamesPlayed=[],this.changeDetectorRef.detach(),this.activatedComponentRoute=a}ngOnInit(){var e=this;return f(function*(){let i;e.state=Jr.Pending,e.isEmptyContentVisible=!1,e.checkWindowSize(),e.resizeListener=e.renderer.listen("window","resize",e.onResize),e.debouncedResize=zse()(()=>{e.checkWindowSize()},100),e.userMe=e.store.selectUserState();try{i=yield e.gameHistoryService.getHistory();for(const r of i){let s;r.winners=[],r.losers=[];for(let a of r.gameResult.placements){let c=r.players.find(u=>u.id===a.playerId);a.isWinner?c&&r.winners.push(c.id):c&&r.losers.push(c.id),a.playerId===e.userMe.profile.id&&r.placementRewards[a.place]&&(s=r.placementRewards[a.place])}s&&(r.reward=r.settings.splitRewardForWinners?{...s,amount:Math.round(s.amount/r.winners.length)}:s),r.won=-1!==r.winners.indexOf(e.userMe.profile.id),r.isFreeForAll=1===r.settings.players.perTeam,e.getTeams(r)}e.gamesPlayed=i,e.state=Jr.Ready,e.emptyContentTextKeys=[{textKey:"GAME_HISTORY.NO_GAMES"}]}catch(r){console.warn("ERROR",r),e.state=Jr.Failed,e.emptyContentTextKeys=r instanceof CBt?[{textKey:"ERRORS.CONNECTION_ERROR"}]:[{textKey:"ERRORS.SOMETHING_WRONG"}]}e.gamesPlayed.length||(e.isEmptyContentVisible=!0),e.triggerDetection()})()}ngOnDestroy(){cancelAnimationFrame(this.rafId),this.resizeListener&&this.resizeListener()}trackByFn(e,i){return i.id}checkWindowSize(){this.rafId=requestAnimationFrame(()=>{this.windowWidth!==window.innerWidth&&(this.windowWidth=window.innerWidth);let e=0,i=0;window.innerWidth>980?(e=200,i=2):window.innerWidth<=980&&window.innerWidth>480?(e=200,i=1):window.innerWidth<=480&&(e=150,i=1),this.showedGamesCount=Math.round(window.innerHeight/e*i)+1,this.triggerDetection()})}getTeams(e){if(null!==e.gameResult.gameStats.playerPoints)for(const a of e.players)a.score=e.gameResult.gameStats.playerPoints[a.id];let i=e.won?e.winners:e.losers,r=e.won?e.losers:e.winners;var s;e.myTeam=e.players.filter(a=>-1!==i.indexOf(a.id)),e.otherTeam=e.players.filter(a=>-1!==r.indexOf(a.id)),e.myTeam.sort(a=>a.id===this.userMe.profile.id?-1:1),null!==e.gameResult.gameStats.playerPoints&&(e.myTeamScore=e.gameResult.gameStats.playerPoints[e.myTeam[0].id],e.otherTeamScore=e.gameResult.gameStats.playerPoints[null===(s=e.otherTeam[0])||void 0===s?void 0:s.id]),e.myTeamContainerWidth=(20*e.myTeam.length).toString()+"%",e.myTeamPlayerContainerWidth=(90/e.myTeam.length).toString()+"%",e.otherTeamContainerWidth=(20*e.otherTeam.length).toString()+"%",e.otherTeamPlayerContainerWidth=(90/e.otherTeam.length).toString()+"%"}}return(t=n).\u0275fac=function(e){return new(e||t)(g(AH),g(J),g(Re),g(ji),g(Pr))},t.\u0275cmp=pe({type:t,selectors:[["game-history"]],features:[mn([ia])],decls:1,vars:1,consts:[["class","game-history__wrapper","scroll-directive","",3,"list","initialListCount","step","onScrolledToBottom","ngClass",4,"ngIf"],["scroll-directive","",1,"game-history__wrapper",3,"list","initialListCount","step","onScrolledToBottom","ngClass"],["scroll","scroll"],[3,"transparentBG",4,"ngIf"],[3,"textArray",4,"ngIf"],[1,"game-history__container--games-wrapper"],[3,"game","windowWidth",4,"ngFor","ngForOf","ngForTrackBy"],[1,"game-history__push-the-bottom-box"],[3,"transparentBG"],[3,"textArray"],[3,"game","windowWidth"]],template:function(e,i){1&e&&U(0,IBt,8,18,"section",0),2&e&&l("ngIf",i.showedGamesCount)},dependencies:[Xe,Mt,Ne,bo,Oi,Is,qSe,BT],styles:[".game-history__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.game-history__wrapper.no-games[_ngcontent-%COMP%]{justify-content:center;position:relative}.game-history__container--no-games-text[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:100%;padding:0 3rem;display:flex;flex-flow:column nowrap;z-index:2}.game-history__text--no-games[_ngcontent-%COMP%]{width:100%;font-size:2.4rem;text-transform:uppercase;text-align:center;font-weight:600}@media only screen and (max-width: 768px){.game-history__text--no-games[_ngcontent-%COMP%]{font-size:1.8rem}}.game-history__image--no-games[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;height:80%;transform:translate(-50%,-50%);z-index:1}.game-history__push-the-bottom-box[_ngcontent-%COMP%]{width:100%;height:5rem}.game-history__container--games-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap;max-width:110rem;justify-content:center;align-items:center;margin:0 auto}@media only screen and (max-width: 980px){.game-history__container--games-wrapper[_ngcontent-%COMP%]{max-width:70rem}}.game-history__popup-outlet[_ngcontent-%COMP%]   .game-history__text--no-games[_ngcontent-%COMP%]{font-size:1.8rem}.game-history__popup-outlet[_ngcontent-%COMP%]   .game-history__container--games-wrapper[_ngcontent-%COMP%]{max-width:70rem}"]}),n})();const $Se=[{path:"game-history",data:{pageId:Mn.RecentGames},component:WSe}],MBt=[AH],OBt=[No,xi,Yi,Io,Ls];let EBt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...MBt],imports:[OBt]}),n})();var hd=function(t){return t.TimePlayed="time-played",t.ChipsEarned="chips-earned",t.WinsLoses="games-played",t.RegisteredOn="registered-on",t.LastVisit="last-visit",t}(hd||{});let XM=(()=>{var t;class n{constructor(){return n.instance=n.instance||this}setUser(e){this.user=e}getProfileInfo(){return this.user}transformTime(e){let i=Math.floor(e%60);e/=60;let r=Math.floor(e%60);e/=60;let s=Math.floor(e%24);return{days:Math.floor(e/24)||0,hours:s||0,minutes:r||0,seconds:i||0}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function xBt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"formatNumber"),m()),2&t){const o=_().$implicit;d(),se($(2,1,o.value))}}function ABt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"exactDate"),m()),2&t){const o=_().$implicit;d(),se(yt(2,1,o.value,"dMMMMYYYY"))}}function RBt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"timeElapsedPipe"),m()),2&t){const o=_().$implicit;d(),se($(2,1,o.value))}}function kBt(t,n){if(1&t&&(p(0,"p"),H(1),m()),2&t){const o=_().$implicit;d(),se(o.value)}}function LBt(t,n){if(1&t&&(p(0,"div",2)(1,"div",3),B(2,"p",4)(3,"icon-component",5),m(),p(4,"div",6)(5,"div",7)(6,"p"),H(7),V(8,"translate"),m()(),p(9,"div",8),U(10,xBt,3,3,"p",9)(11,ABt,3,4,"p",9)(12,RBt,3,3,"p",9)(13,kBt,2,1,"p",9),m()()()),2&t){const o=n.$implicit,e=_();d(3),l("icon",o.icon),d(4),se($(8,6,o.title)),d(3),l("ngIf",o.id===e.userStatsContainerTypes.ChipsEarned),d(),l("ngIf",o.id===e.userStatsContainerTypes.RegisteredOn),d(),l("ngIf",o.id===e.userStatsContainerTypes.LastVisit),d(),l("ngIf",o.id===e.userStatsContainerTypes.TimePlayed)}}const DBt=t=>({"statistics-panel__popup-outlet":t});let KSe=(()=>{var t;class n{constructor(e,i,r){this.contextEnum=Wr,this.userStatsContainerTypes=hd,this.userStatsArray=[],this.EIcons=ve.EIcons,this.userStatsService=e,this.translate=i,this.activatedComponentRoute=r}ngOnInit(){var e,i;const r=this.userStatsService.transformTime(this.userInfo.stats.playtime);this.userStatsArray=[{id:hd.TimePlayed,title:this.getStatsTitle(hd.TimePlayed),value:this.getTimePlayedText(r),icon:ve.EIcons.CLOCK_ICON},{id:hd.RegisteredOn,title:this.getStatsTitle(hd.RegisteredOn),value:this.userInfo.createdAt.toString(),icon:ve.EIcons.CALENDAR},{id:hd.LastVisit,title:this.getStatsTitle(hd.LastVisit),value:null!==(e=null===(i=this.userInfo.lastSeen)||void 0===i?void 0:i.toString())&&void 0!==e?e:this.userInfo.createdAt.toString(),icon:ve.EIcons.EYE},{id:hd.ChipsEarned,title:this.getStatsTitle(hd.ChipsEarned),value:this.userInfo.stats.chipsEarned.toString(),icon:ve.EIcons.CHIP}]}getStatsTitle(e){switch(e){case hd.TimePlayed:return"USER_STATS.PLAYED_TIME";case hd.ChipsEarned:return"USER_STATS.CHIPS_EARNED";case hd.RegisteredOn:return"USER_STATS.REGISTERED_ON";case hd.LastVisit:return"USER_STATS.LAST_VISIT";default:return""}}trackByFn(e,i){return i.id}getTimePlayedText(e){const i=e.days>0?"".concat(e.days).concat(this.translate.instant("TIME.DAYS_SHORT")," "):"",r=e.hours>0?"".concat(e.hours).concat(this.translate.instant("TIME.HOURS_SHORT")," "):"",s=e.minutes>0?"".concat(e.minutes).concat(this.translate.instant("TIME.MINUTES_SHORT")," "):"";return"".concat(i).concat(r).concat(s)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(XM),g(ls),g(Pr))},t.\u0275cmp=pe({type:t,selectors:[["statistics-panel"]],inputs:{userInfo:"userInfo"},features:[mn([ia])],decls:2,vars:5,consts:[[1,"statistics-panel__wrapper",3,"ngClass"],["class","statistics-panel__container--stats-box",4,"ngFor","ngForOf","ngForTrackBy"],[1,"statistics-panel__container--stats-box"],[1,"statistics-panel__container--icon"],[1,"statistics-panel__text--title-icon"],[1,"statistics-panel__container--icon--cmp",3,"icon"],[1,"statistics-panel__container--text"],[1,"statistics-panel__container--label"],[1,"statistics-panel__container--value"],[4,"ngIf"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,LBt,14,8,"div",1),m()),2&e&&(l("ngClass",ne(3,DBt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(),l("ngForOf",i.userStatsArray)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Ne,Dn,qe,Bm,kp,Go],styles:["[_nghost-%COMP%]{width:100%}.statistics-panel__wrapper[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap;padding:0 2rem;margin:1rem 0 .5rem}@media only screen and (max-width: 480px){.statistics-panel__wrapper[_ngcontent-%COMP%]{padding:0 .5rem}}.statistics-panel__container--stats-box[_ngcontent-%COMP%]{width:25%;height:10rem;display:flex;flex-flow:row wrap;justify-content:center}.statistics-panel__container--stats-box.small[_ngcontent-%COMP%]{width:50%}@media only screen and (max-width: 980px){.statistics-panel__container--stats-box[_ngcontent-%COMP%]{width:50%}}@media only screen and (max-width: 480px){.statistics-panel__container--stats-box[_ngcontent-%COMP%]{height:6rem}}.statistics-panel__container--icon[_ngcontent-%COMP%]{width:6rem;height:100%;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 480px){.statistics-panel__container--icon[_ngcontent-%COMP%]{width:4rem}}.statistics-panel__container--text[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:column nowrap;width:calc(100% - 6rem)}@media only screen and (max-width: 480px){.statistics-panel__container--text[_ngcontent-%COMP%]{width:calc(100% - 4rem)}}.statistics-panel__container--label[_ngcontent-%COMP%]{width:100%;height:50%;display:flex;align-items:flex-end;padding:0 1rem}@media only screen and (max-width: 480px){.statistics-panel__container--label[_ngcontent-%COMP%]{padding:0 .5rem}}.statistics-panel__container--label[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}@media only screen and (max-width: 480px){.statistics-panel__container--label[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.2rem}}.statistics-panel__container--value[_ngcontent-%COMP%]{width:100%;height:50%;display:flex;align-items:flex-start;padding:0 1rem}@media only screen and (max-width: 480px){.statistics-panel__container--value[_ngcontent-%COMP%]{padding:0 .5rem}}.statistics-panel__container--value[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}@media only screen and (max-width: 480px){.statistics-panel__container--value[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.2rem}}.statistics-panel__popup-outlet[_ngcontent-%COMP%]   .statistics-panel__container--stats-box[_ngcontent-%COMP%]{width:50%}@media only screen and (max-width: 480px){.statistics-panel__popup-outlet[_ngcontent-%COMP%]   .statistics-panel__container--stats-box[_ngcontent-%COMP%]{height:6rem}}"],changeDetection:0}),n})();var BBt=ve.EIcons,NBt=ve.EButtonModifier,FBt=nt.EPermissionModule,UBt=nt.EModuleAction;const GBt=t=>({name:t});function VBt(t,n){if(1&t){const o=Ce();p(0,"button-icon",8),Y("onClick",function(){return oe(o),re(_().buyResetStatsPack())}),m()}if(2&t){const o=_();l("icon",ne(4,GBt,o.iconNames.CLOSE))("bclass","wins-ration-box__button--reset")("buttonModifier",o.buttonModifier.BUTTON_TRANSPARENT)("disabled",o.actionInProgress||!o.isShopAllowed())}}function zBt(t,n){if(1&t&&(p(0,"div",13)(1,"div"),B(2,"div",14),p(3,"div",15)(4,"p"),H(5),m()()()()),2&t){const o=n.$implicit,e=_(2);d(),ni("wins-ratio-box__container--tournament-wins-info-box-inner ",e.getTournamentId(o),""),d(4),se(e.gameStats.stats.tournamentWins[o])}}function jBt(t,n){if(1&t&&(p(0,"div",9)(1,"div",10)(2,"p"),H(3),V(4,"translate"),m()(),p(5,"div",11),U(6,zBt,6,4,"div",12),m()()),2&t){const o=_();d(3),se($(4,2,"TOURNAMENTS.TOURNAMENT_WINS")),d(3),l("ngForOf",o.sortedTournaments)}}const HBt=(t,n)=>({"wins-ratio-box__popup-outlet":t,"tournament-wins":n});let ZSe=(()=>{var t;class n{constructor(e,i,r,s){this.contextEnum=Wr,this.iconNames=BBt,this.buttonModifier=NBt,this.actionInProgress=!1,this.objectKeys=Object.keys,this.shopMoreService=r,this.changeDetectorRef=e,this.changeDetectorRef.detach(),this.activatedComponentRoute=i,this.permissions=s}ngOnInit(){this.sortTournamentProps(),this.updateProgressConfig(),this.changeDetectorRef.detectChanges()}ngOnChanges(e){this.sortTournamentProps(),this.updateProgressConfig(),this.changeDetectorRef.detectChanges()}buyResetStatsPack(){var e=this;return f(function*(){if(!e.actionInProgress){e.actionInProgress=!0;try{yield e.shopMoreService.buyUtilityItem(Fe.TG.StatsReset,{item:{targetGame:e.gameStats.id}})}catch(i){console.error(i)}finally{e.actionInProgress=!1}}})()}updateProgressConfig(){const e=this.gameStats.stats.gamesWon,i=this.gameStats.stats.gamesLeft,r=this.gameStats.stats.gamesPlayed-(e+i);this.progressBarConfig={progressPartitions:[{value:e||0,widthCoefficient:e||0},{value:r||0,widthCoefficient:r||0},{value:i||0,widthCoefficient:i||0}],areValuesShown:!0}}isShopAllowed(){return this.permissions.getActionPermission(FBt.Shop,UBt.Open).isEnabled}getTournamentId(e){return-1!==e.indexOf("royal4")?"royal4":-1!==e.indexOf("royal8")?"royal8":-1!==e.indexOf("royal16")?"royal16":-1!==e.indexOf("royal32")?"royal32":-1!==e.indexOf("royal64")?"royal64":e}sortTournamentProps(){const e=new Intl.Collator("en",{numeric:!0,sensitivity:"base"}),i=[];for(let r in this.gameStats.stats.tournamentWins)i.push(r);this.sortedTournaments=i.sort((r,s)=>e.compare(r,s))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Pr),g(I2),g(Ti))},t.\u0275cmp=pe({type:t,selectors:[["wins-ratio-box"]],inputs:{gameStats:"gameStats",isMyProfile:"isMyProfile",showStatsReset:"showStatsReset"},features:[mn([ia]),it],decls:9,vars:18,consts:[[3,"ngClass"],["class","wins-ration-box__button--reset","data-cy","statsResetButton",3,"icon","bclass","buttonModifier","disabled","onClick",4,"ngIf"],[1,"wins-ratio-box__container--wins-box-game-name"],["empty-placeholder","",3,"imgSrc"],[1,"wins-ratio-box__container--game-logo",3,"ngClass"],[1,"wins-ratio-box__container--wins-box-ratio-bar"],[3,"progressBarConfig"],["class","wins-ratio-box__container--tournament-wins",4,"ngIf"],["data-cy","statsResetButton",1,"wins-ration-box__button--reset",3,"icon","bclass","buttonModifier","disabled","onClick"],[1,"wins-ratio-box__container--tournament-wins"],[1,"wins-ratio-box__container--tournament-wins-title"],[1,"wins-ratio-box__container--tournament-wins-info"],["class","wins-ratio-box__container--tournament-wins-info-box",4,"ngFor","ngForOf"],[1,"wins-ratio-box__container--tournament-wins-info-box"],[1,"icon"],[1,"wins-count"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,VBt,1,6,"button-icon",1),p(2,"div",2),B(3,"img",3),V(4,"transformUrl"),B(5,"div",4),m(),p(6,"div",5),B(7,"progress-bar",6),m(),U(8,jBt,7,4,"div",7),m()),2&e&&(ni("wins-ratio-box__wrapper ",i.gameStats.id,""),l("ngClass",cn(15,HBt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup,i.gameStats.stats&&i.gameStats.stats.tournamentWins&&i.objectKeys(i.gameStats.stats.tournamentWins).length)),Hn("data-cy",i.gameStats.id),d(),l("ngIf",i.isMyProfile&&i.showStatsReset),d(2),ni("wins-ratio-box__image--game-logo ",i.gameStats.id,""),l("imgSrc",$(4,13,"platform-logos/"+i.gameStats.id+".svg")),d(2),l("ngClass","game-id__"+i.gameStats.id),d(2),l("progressBarConfig",i.progressBarConfig),d(),l("ngIf",i.gameStats.stats&&i.gameStats.stats.tournamentWins&&i.objectKeys(i.gameStats.stats.tournamentWins).length))},dependencies:[Xe,Mt,Ne,uf,ei,$o,qe,uo],styles:[".wins-ratio-box__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:12rem;margin-bottom:.5rem;display:flex;flex-flow:column nowrap}.wins-ratio-box__wrapper.tournament-wins[_ngcontent-%COMP%]{height:22rem}@media only screen and (max-width: 480px){.wins-ratio-box__wrapper[_ngcontent-%COMP%]{height:10rem}.wins-ratio-box__wrapper.tournament-wins[_ngcontent-%COMP%]{height:20rem}}.wins-ration-box__button--reset[_ngcontent-%COMP%]{position:absolute;top:.5rem;right:.5rem;z-index:1}.wins-ratio-box__container--wins-box-game-name[_ngcontent-%COMP%]{width:100%;flex:1;margin-top:.5rem;position:relative}.wins-ratio-box__image--game-logo[_ngcontent-%COMP%]{position:absolute;height:100%;width:18rem;max-width:100%;left:50%;top:0;transform:translate(-50%);display:block}.wins-ratio-box__container--wins-box-ratio-bar[_ngcontent-%COMP%]{width:100%;padding:1.5rem}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]{width:calc(100% - 2rem);height:9rem;margin:0 1rem 1rem;overflow:hidden}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-title[_ngcontent-%COMP%]{width:100%;height:3.5rem;display:flex;justify-content:center;align-items:center}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info[_ngcontent-%COMP%]{width:100%;height:5rem;display:flex;flex-flow:row wrap}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box-inner[_ngcontent-%COMP%]{border-radius:.8rem;width:90%;height:90%;max-height:4.5rem;max-width:10rem;display:flex;flex-flow:row wrap}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box-inner[_ngcontent-%COMP%] > .icon[_ngcontent-%COMP%]{width:40%;min-width:3rem;height:100%;display:flex;justify-content:center;align-items:center}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box-inner[_ngcontent-%COMP%] > .wins-count[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box-inner[_ngcontent-%COMP%] > .wins-count[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem}@media only screen and (max-width: 480px){.wins-ratio-box__container--tournament-wins[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box[_ngcontent-%COMP%]   .wins-ratio-box__container--tournament-wins-info-box-inner[_ngcontent-%COMP%] > .wins-count[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.wins-ratio-box__container--game-logo[_ngcontent-%COMP%]{display:none}"]}),n})(),eO=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.friendsService=c,this.http=e,this.popup=i,this.userBlockService=r,this.toaster=s,this.userService=a,this.userRepository=u,this.store=h}getUserProfile(e,i={useCache:!0}){var r=this;return f(function*(){const s=r.store.selectUserState();if(e&&e===s.profile.id||!e){const a=yield r.userService.getProfile(i);return r.setCurrentUserProfile(a),a}return r.userRepository.getProfile(e).then(a=>(r.setCurrentUserProfile(a),a)).catch(a=>(console.log(a),r.setCurrentUserProfile(void 0),Promise.reject(a)))})()}setCurrentUserProfile(e){this.currentUser=e}updateUserModelModel(e){this.updateUserModelFn(e,this.currentUser)}updateUserModelFn(e,i){for(let r in e)i.hasOwnProperty(r)&&(i={...i,...e})}getCurrentUserProfile(){return this.currentUser}addLike(e){return this.http.post("social/like/"+e).toPromise()}sendFriendRequest(e){return this.friendsService.sendFriendRequest(e)}removeFriend(e){return this.friendsService.unfriend(e)}block(e){return this.userBlockService.block(e)}blockBack(e){this.popup.confirm({buttons:{action:()=>{this.block(e).then(()=>{this.toaster.success("POPUP.BLOCK_USER_SUCCESS")}).catch(r=>{console.warn(r),this.toaster.error(r instanceof et.Permissions.LimitReached?"BLOCKED.BLOCK_LIST_FULL":"ERRORS.CONNECTION_ERROR")})},buttonTextOptions:{translationKey:"BUTTON.BLOCK"}},textParams:{translationKey:"POPUP.BLOCK_BACK_DESCRIPTION"}})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Cn),T(n0),T(Dt),T(Kr),T(Tu),T(ed),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function qBt(t,n){if(1&t&&(p(0,"div",10),B(1,"wins-ratio-box",11),m()),2&t){const o=n.$implicit,e=_(3);d(),l("gameStats",o)("isMyProfile",e.isMyProfile)("showStatsReset",e.showStatsResetButtons)}}function WBt(t,n){if(1&t&&(p(0,"div",8),U(1,qBt,2,3,"div",9),m()),2&t){const o=_(2);d(),l("ngForOf",o.winsArray)}}const $Bt=()=>({textKey:"USER_STATS.NO_PLAYED_GAMES"}),KBt=t=>[t];function ZBt(t,n){1&t&&(p(0,"div",12),B(1,"empty-content",13),m()),2&t&&(d(),l("textArray",ne(2,KBt,pt(1,$Bt))))}const QBt=t=>({"user-stats__container--popup-outlet":t});function YBt(t,n){if(1&t&&(p(0,"section",1),B(1,"statistics-panel",2),p(2,"div",3)(3,"p",4),B(4,"icon-component",5),p(5,"span"),H(6),V(7,"translate"),m(),H(8,"/"),p(9,"span"),H(10),V(11,"translate"),m(),H(12,"/"),p(13,"span"),H(14),V(15,"translate"),m()()(),U(16,WBt,2,1,"div",6)(17,ZBt,2,4,"div",7),m()),2&t){const o=_();l("ngClass",ne(14,QBt,o.activatedComponentRoute.outletContext.container===o.contextEnum.Popup)),d(),l("userInfo",o.userStats),d(3),l("icon",o.EIcons.PRO_LEADERBOARDS),d(2),se($(7,8,"USER_STATS.WINS")),d(4),se($(11,10,"USER_STATS.LOSES")),d(4),se($(15,12,"USER_STATS.ABANDONS")),d(2),l("ngIf",o.winsArray.length>0),d(),l("ngIf",o.winsArray.length<=0)}}let QSe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){var w=this;this.cdr=b,this.contextEnum=Wr,this.showStatsResetButtons=!1,this.EIcons=ve.EIcons,this.onUserStateRefresh=function(){var R=f(function*(G){G&&G.stats&&(w.userStatsService.setUser(G),w.profileMainService.updateUserModelModel({stats:G.stats}),w.setUserStats(G))});return function(G){return R.apply(this,arguments)}}(),this.shop=u,this.profileMainService=s,this.userStatsService=e,this.router=i,this.route=r,this.activatedComponentRoute=a,this.store=c,this.currentUserId=this.route.snapshot.parent.params.id,this.constants=h}ngOnInit(){var e=this;return f(function*(){e.cdr.detectChanges();try{e.shopConfig=yield e.shop.load(),e.showStatsResetButtons=void 0!==e.shopConfig.products.find(i=>i.item.type===Fe.TG.StatsReset)}catch(i){console.error(i)}if(e.isMyProfile=e.currentUserId===e.store.selectUserState().profile.id,e.setUserStats(),e.isMyProfile||!e.userStats||e.userStats.profile.id!==e.currentUserId)try{const i=yield e.profileMainService.getUserProfile(e.currentUserId,{useCache:!1});e.userStatsService.setUser(i),e.setUserStats(i)}catch(i){console.error(i),yield e.router.navigate([e.constants.defaultLoggedRoute])}e.isMyProfile&&(e.userStateSubscription=e.store.subscribeUserProfile().pipe(bt(Boolean)).subscribe(e.onUserStateRefresh)),e.routerSubscription=e.route.parent.params.subscribe(i=>{e.currentUserId!==i.id&&(e.currentUserId=i.id,e.fetchDiffUsersData())}),e.cdr.detectChanges()})()}fetchDiffUsersData(){this.router.navigate(["/".concat(this.constants.defaultLoggedRoute,"/profile/").concat(this.currentUserId)]).then(()=>{this.userStats=void 0,this.setUserStats()})}ngOnDestroy(){this.routerSubscription&&this.routerSubscription.unsubscribe(),this.userStateSubscription&&this.userStateSubscription.unsubscribe()}static filterGamesArray(e){let i=[],r=Object.keys(e);for(let s=0,a=r.length;s<a;s++)i.push({id:r[s],stats:{gamesPlayed:e[r[s]].gamesPlayed,gamesWon:e[r[s]].gamesWon,gamesLeft:e[r[s]].gamesLeft,tournamentWins:e[r[s]].tournamentWins}});return i.filter(s=>s.stats.gamesPlayed>=5)}setUserStats(e){this.userStats=e||this.userStatsService.getProfileInfo(),this.userStats&&(this.winsArray=n.filterGamesArray(this.userStats.stats.games)),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(XM),g(on),g(Po),g(eO),g(Pr),g(J),g(Ko),g(tn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["user-stats"]],features:[mn([ia])],decls:1,vars:1,consts:[["class","user-stats__wrapper",3,"ngClass",4,"ngIf"],[1,"user-stats__wrapper",3,"ngClass"],[3,"userInfo"],[1,"user-stats__container--wins-label"],[1,"user-stats__text--wins-label"],[1,"user-stats__text--wins-label--icon",3,"icon"],["class","user-stats__container--wins-by-game",4,"ngIf"],["class","user-stats__container--empty-stats",4,"ngIf"],[1,"user-stats__container--wins-by-game"],["class","user-stats__container--wins-box",4,"ngFor","ngForOf"],[1,"user-stats__container--wins-box"],[3,"gameStats","isMyProfile","showStatsReset"],[1,"user-stats__container--empty-stats"],[3,"textArray"]],template:function(e,i){1&e&&U(0,YBt,18,16,"section",0),2&e&&l("ngIf",i.userStats)},dependencies:[Xe,Mt,Ne,bo,Dn,KSe,ZSe,qe],styles:[".user-stats__wrapper[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;display:flex;width:100%;height:100%;padding:0 10%;flex-flow:row wrap;align-content:flex-start}@media only screen and (max-width: 768px){.user-stats__wrapper[_ngcontent-%COMP%]{padding:0 5%}}.user-stats__container--wins-label[_ngcontent-%COMP%]{width:100%;height:5rem;min-height:5rem;display:flex;justify-content:center;margin:.5rem 0}.user-stats__text--wins-label[_ngcontent-%COMP%]{align-self:center;font-size:1.8rem;display:flex;align-items:center;white-space:pre-wrap}@media only screen and (max-width: 320px){.user-stats__text--wins-label[_ngcontent-%COMP%]{font-size:1.4rem}}.user-stats__container--wins-by-game[_ngcontent-%COMP%]{width:100%;margin:.5rem 0}.user-stats__container--wins-box[_ngcontent-%COMP%]{width:100%}.user-stats__container--empty-stats[_ngcontent-%COMP%]{position:relative;width:100%;height:calc(100% - 20rem);margin-top:2rem}@media only screen and (max-width: 980px){.user-stats__container--empty-stats[_ngcontent-%COMP%]{height:calc(100% - 30rem)}}@media only screen and (max-width: 480px){.user-stats__container--empty-stats[_ngcontent-%COMP%]{height:calc(100% - 22rem)}}.user-stats__container--popup-outlet[_ngcontent-%COMP%]{padding:0 5%}.user-stats__container--popup-outlet[_ngcontent-%COMP%]   .user-stats__container--empty-stats[_ngcontent-%COMP%]{height:calc(100% - 30rem)}@media only screen and (max-width: 480px){.user-stats__container--popup-outlet[_ngcontent-%COMP%]   .user-stats__container--empty-stats[_ngcontent-%COMP%]{height:calc(100% - 22rem)}}"],changeDetection:0}),n})();const YSe=[{path:"user-stats",data:{pageId:Mn.Stats},component:QSe}],JBt=[XM],XBt=[No,xi,Yi,Io,Ls];let JSe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...JBt],imports:[XBt]}),n})();var Xi=function(t){return t.MergeAccount="mergeAccount",t.Gifts="gifts",t.Friends="friends",t.Blocked="blocked",t.Chips="chips",t.Gems="gems",t.Like="like",t.Vip="vip",t.AddFriends="addFriends",t.RemoveFriend="removeFriend",t.AddCloseFriend="addCloseFriend",t.RemoveCloseFriend="removeCloseFriend",t.SendGifts="sendGifts",t.Chat="chat",t.Block="block",t.Boosters="boosters",t}(Xi||{});function eNt(t,n){if(1&t){const o=Ce();p(0,"button-text",4),Y("onClick",function(){return oe(o),re(_().onButtonClick())}),H(1),m()}if(2&t){const o=_();l("buttonModifier",o.buttonConfig.color)("disabled",o.buttonConfig.isDisabled()),Hn("data-cy","profile"+o.buttonConfig.type+"Button"),d(),ze(" ",o.buttonConfig.textKey," ")}}const tNt=t=>({"profile-large-button-popup-outlet":t}),nNt=t=>({"info-text__large":t}),iNt=["*"];let XSe=(()=>{var t;class n{constructor(e){this.contextEnum=Wr,this.buttonClick=new ke,this.activatedComponentRoute=e}onButtonClick(){this.shouldShowButton&&this.buttonClick.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pr))},t.\u0275cmp=pe({type:t,selectors:[["profile-large-button"]],inputs:{buttonConfig:"buttonConfig",shouldShowButton:"shouldShowButton"},outputs:{buttonClick:"buttonClick"},features:[mn([ia])],ngContentSelectors:iNt,decls:7,vars:12,consts:[[1,"profile-large-button__wrapper",3,"ngClass"],[1,"large-button__image-container"],[1,"large-button__info-text",3,"ngClass"],["class","large-button__button",3,"buttonModifier","disabled","onClick",4,"ngIf"],[1,"large-button__button",3,"buttonModifier","disabled","onClick"]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"div",1),B(2,"div"),m(),p(3,"div",2),H(4),m(),U(5,eNt,2,4,"button-text",3),yo(6),m()),2&e&&(l("ngClass",ne(8,tNt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(2),ni("large-button__image large-button__image--",i.buttonConfig.type,""),d(),l("ngClass",ne(10,nNt,!i.shouldShowButton)),Hn("data-cy","profile"+i.buttonConfig.type+"Text"),d(),se(i.buttonConfig.infoText),d(),l("ngIf",i.shouldShowButton))},dependencies:[Xe,Ne,pn],styles:[".profile-large-button__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;margin:.5rem 0;height:6rem;overflow:hidden}@media only screen and (max-width: 480px){.profile-large-button__wrapper[_ngcontent-%COMP%]{height:5rem}}.large-button__image-container[_ngcontent-%COMP%]{height:100%;min-width:10rem;flex:.5;margin:.5rem;display:flex;justify-content:center;align-items:center;overflow:hidden}@media only screen and (max-width: 1200px){.large-button__image-container[_ngcontent-%COMP%]{min-width:8rem}}@media only screen and (max-width: 1050px){.large-button__image-container[_ngcontent-%COMP%]{min-width:6rem}}@media only screen and (max-width: 480px){.large-button__image-container[_ngcontent-%COMP%]{min-width:4rem}}.large-button__image-container[_ngcontent-%COMP%]   .large-button__image[_ngcontent-%COMP%]{width:100%;height:100%}.large-button__image-container[_ngcontent-%COMP%]   .large-button__image.large-button__image--chips[_ngcontent-%COMP%]{height:100%}.large-button__image-container[_ngcontent-%COMP%]   .large-button__image.large-button__image--gems[_ngcontent-%COMP%]{height:90%}.large-button__image-container[_ngcontent-%COMP%]   .large-button__image.large-button__image--vip[_ngcontent-%COMP%]{height:60%}.large-button__info-text[_ngcontent-%COMP%]{flex:1;white-space:nowrap;min-width:8rem;font-size:2.4rem;font-weight:600}@media only screen and (max-width: 1440px){.large-button__info-text[_ngcontent-%COMP%]:not(.info-text__large){font-size:1.8rem}}@media only screen and (max-width: 480px){.large-button__info-text[_ngcontent-%COMP%]:not(.info-text__large){font-size:1.4rem}}.large-button__button[_ngcontent-%COMP%]{margin:.5rem;min-width:11rem;flex:1}@media screen and (max-height: 800px){.profile-large-button-popup-outlet[_ngcontent-%COMP%]{height:5rem}}.profile-large-button-popup-outlet[_ngcontent-%COMP%]   .large-button__image-container[_ngcontent-%COMP%]{min-width:6rem}@media only screen and (max-width: 480px){.profile-large-button-popup-outlet[_ngcontent-%COMP%]   .large-button__image-container[_ngcontent-%COMP%]{min-width:4rem}}.profile-large-button-popup-outlet[_ngcontent-%COMP%]   .large-button__info-text[_ngcontent-%COMP%]:not(.info-text__large){font-size:1.8rem}@media only screen and (max-width: 480px){.profile-large-button-popup-outlet[_ngcontent-%COMP%]   .large-button__info-text[_ngcontent-%COMP%]:not(.info-text__large){font-size:1.4rem}}@media screen and (max-height: 800px){.profile-large-button-popup-outlet[_ngcontent-%COMP%]   .large-button__button[_ngcontent-%COMP%]{height:3.5rem}}"],changeDetection:0}),n})();var md=ve.EButtonModifier,Lg=ve.EIcons,Pc=nt.EPermissionModule,Ic=nt.EModuleAction;const ewe=t=>({name:t});function oNt(t,n){if(1&t&&(Tn(0),p(1,"p",8),H(2),V(3,"translate"),m(),B(4,"button-icon",9),Pn()),2&t){const o=_(3),e=Kt(6);d(2),se($(3,4,"SHOP.SUBSCRIBED")),d(2),l("icon",ne(6,ewe,o.iconNames.INFO))("bclass","cash-back__info--button--bclass")("tooltipTemplate",e)}}function rNt(t,n){if(1&t){const o=Ce();p(0,"profile-large-button",6),Y("buttonClick",function(){oe(o);const i=_().$implicit;return re(_().buttonAction(i.type))}),U(1,oNt,5,8,"ng-container",7),m()}if(2&t){const o=_().$implicit,e=_();l("shouldShowButton",o.shouldShowButton)("buttonConfig",o),d(),l("ngIf",o.type===e.EProfileButtonType.Vip&&!o.shouldShowButton)}}function sNt(t,n){if(1&t&&(Tn(0),U(1,rNt,2,3,"profile-large-button",5),Pn()),2&t){const o=n.$implicit;d(),l("ngIf",o.isVisible())}}const aNt=t=>({"small-button":t});function cNt(t,n){if(1&t){const o=Ce();p(0,"button-icon",11),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_().buttonAction(i.type))}),m()}if(2&t){const o=_().$implicit,e=_();l("ngClass",ne(5,aNt,e.isMyProfile&&e.canMerge))("disabled",o.isDisabled())("buttonModifier",o.color)("icon",ne(7,ewe,o.icon)),Hn("data-cy","profile"+o.type+"Button")}}function lNt(t,n){if(1&t&&(Tn(0),U(1,cNt,1,9,"button-icon",10),Pn()),2&t){const o=n.$implicit,e=_();d(),l("ngIf",e.isButtonVisible(o)&&o.isVisible())}}const twe=t=>[t];function uNt(t,n){if(1&t&&(p(0,"div",12),B(1,"item-price",13),p(2,"span",14),H(3),V(4,"translate"),m()(),p(5,"p",14),H(6),V(7,"translate"),V(8,"exactDate"),m(),p(9,"p",14),H(10),V(11,"translate"),V(12,"timeLeft"),m()),2&t){const o=_();l("key","SHOP.VIP_SUBSCRIPTION_PRICE"),d(),l("item",o.userProfile.vip.custom.subscription.item),d(2),se(o.getTimePeriod(o.userProfile.vip.custom.subscription.item)+" "+$(4,5,o.getPeriodKey(o.userProfile.vip.custom.subscription.item))),d(3),se(yt(7,7,"SHOP.VIP_RENEWS",ne(18,twe,yt(8,10,o.userProfile.vip.custom.subscription.expiresAt,"dMMMMYYYY")))),d(4),se(yt(11,13,"SHOP.REMAINING_VIP",ne(20,twe,$(12,16,o.userProfile.vip.currentTier().remainingTime()))))}}const dNt=t=>({"profile-buttons__popup--outlet":t});let nwe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.contextEnum=Wr,this.iconNames=Lg,this.EProfileButtonType=Xi,this.changeGiftButtonDisableState=w=>{this.isGiftButtonDisabled=w,this.cdr.detectChanges()},this.buttonClick=new ke,this.appLanguageService=s,this.timeLeftPipe=e,this.formatNumberPipe=i,this.translateService=r,this.activatedComponentRoute=a,this.permissions=c,this.playerContext=u,this.store=h,this.cdr=b}ngOnInit(){this.appLang=this.appLanguageService.getAppLanguage(),this.buttons=this.buttonsBuilder(),this.isInCustomRoomWaitingSubscription=this.store.games.subscribeIsRoomInWaitingState().subscribe(this.changeGiftButtonDisableState),this.playerCtxListener=this.playerContext.onContextChange(e=>{this.buttons=this.buttonsBuilder(),this.cdr.detectChanges()})}ngOnChanges(e){(e.isMyProfile||e.userProps)&&(this.userProfile=this.userProps.profile,this.buttons=this.buttonsBuilder())}ngOnDestroy(){this.playerCtxListener&&this.playerCtxListener.detach(),this.isInCustomRoomWaitingSubscription&&this.isInCustomRoomWaitingSubscription.unsubscribe()}isButtonVisible(e){return!(e.type===Xi.AddFriends&&!this.canAddAsFriend||e.type===Xi.RemoveFriend&&this.canAddAsFriend||e.type===Xi.MergeAccount&&!this.canMerge)}buttonAction(e){this.buttonClick.emit(e)}getLargeButtonInfoText(e){let i;switch(e){case Xi.Vip:i=this.userProps.profile.hasTierOrHigher(Fi.Full)?this.timeLeftPipe.transform(this.userProps.profile.vip.currentTier().remainingTime()):this.translateService.instant("TEXT.NO_VIP");break;case Xi.Chips:i=this.formatNumberPipe.transform(this.userProps.wallet.chips||0);break;case Xi.Gems:i=this.formatNumberPipe.transform(this.userProps.wallet.gems||0)}return i}buttonsBuilder(){var e,i;return this.myProfileButtons={large:[{type:Xi.Chips,color:md.BUTTON_BUY_ITEM,textKey:this.translateService.instant("BUTTON.BUY_CHIPS"),infoText:this.getLargeButtonInfoText(Xi.Chips),isVisible:()=>this.isActionEnabled(Pc.Shop,Ic.Open),isDisabled:()=>!this.isAllowedByContext(Pc.Shop,Ic.Open),shouldShowButton:!0},{type:Xi.Vip,color:md.BUTTON_BUY_ITEM,textKey:this.translateService.instant("BUTTON.BUY_VIP"),infoText:this.isMyProfile&&(null===(e=this.userProfile.getCurrentSubscriptionItem())||void 0===e?void 0:e.type)===Fe.TG.Vip&&this.userProfile.vip.isActiveSubscription()?void 0:this.getLargeButtonInfoText(Xi.Vip),isVisible:()=>this.isActionEnabled(Pc.Shop,Ic.Open),isDisabled:()=>!this.isAllowedByContext(Pc.Shop,Ic.Open),shouldShowButton:!this.isMyProfile||!this.userProfile.vip.isActiveSubscription()||this.userProfile.vip.isActiveSubscription()&&(null===(i=this.userProfile.getCurrentSubscriptionItem())||void 0===i?void 0:i.type)!==Fe.TG.Vip},{type:Xi.Gems,color:md.BUTTON_BUY_ITEM,textKey:this.translateService.instant("BUTTON.BUY_GEMS"),infoText:this.getLargeButtonInfoText(Xi.Gems),isVisible:()=>this.isActionEnabled(Pc.Shop,Ic.Open),isDisabled:()=>!this.isAllowedByContext(Pc.Shop,Ic.Open),shouldShowButton:!0}],small:[{type:Xi.Friends,color:md.BUTTON_FRIENDS,icon:Lg.USERS,isVisible:()=>this.isActionEnabled(Pc.Friends,Ic.View),isDisabled:()=>!this.isAllowedByContext(Pc.Friends,Ic.View)},{type:Xi.MergeAccount,color:md.BUTTON_ACTION,icon:Lg.ACCOUNT_MERGE,isVisible:()=>this.isActionEnabled(Pc.Profile,Ic.Merge),isDisabled:()=>!this.isAllowedByContext(Pc.Profile,Ic.Merge)},{type:Xi.Blocked,color:md.BUTTON_NEGATIVE,icon:Lg.BLOCK,isVisible:()=>!0,isDisabled:()=>!1}]},this.otherProfileButtons={large:[{type:Xi.Chips,color:md.BUTTON_ACTION,textKey:this.translateService.instant("BUTTON.DONATE_CHIPS"),infoText:this.getLargeButtonInfoText(Xi.Chips),isVisible:()=>this.isActionEnabled(Pc.Shop,Ic.Open),isDisabled:()=>!this.isActionEnabled(Pc.Shop,Ic.Donate),shouldShowButton:!0},{type:Xi.Vip,color:md.BUTTON_ACTION,textKey:this.translateService.instant("BUTTON.DONATE_VIP"),infoText:this.getLargeButtonInfoText(Xi.Vip),isVisible:()=>this.isActionEnabled(Pc.Shop,Ic.Open),isDisabled:()=>!this.isActionEnabled(Pc.Shop,Ic.Donate),shouldShowButton:!0},{type:Xi.Gems,color:md.BUTTON_ACTION,textKey:this.translateService.instant("BUTTON.DONATE_GEMS"),infoText:this.getLargeButtonInfoText(Xi.Gems),isVisible:()=>this.isActionEnabled(Pc.Shop,Ic.Open),isDisabled:()=>!this.isActionEnabled(Pc.Shop,Ic.Donate),shouldShowButton:!0}],small:[{type:Xi.AddFriends,color:md.BUTTON_FRIENDS,icon:Lg.ADD_FRIEND,isVisible:()=>this.isActionEnabled(Pc.Friends,Ic.Send),isDisabled:()=>!this.isAllowedByContext(Pc.Friends,Ic.Send)},{type:Xi.RemoveFriend,color:md.BUTTON_NEGATIVE,icon:Lg.REMOVE_FRIEND,isVisible:()=>!0,isDisabled:()=>this.inviteButtonDisabled},{type:Xi.SendGifts,color:md.BUTTON_ACCENT,icon:Lg.GIFT_NEW,isVisible:()=>!0,isDisabled:()=>this.isGiftButtonDisabled},{type:Xi.Chat,color:md.BUTTON_LIGHT,icon:Lg.MESSAGE,isVisible:()=>this.isActionEnabled(Pc.PrivateChat,Ic.Open),isDisabled:()=>!this.isAllowedByContext(Pc.PrivateChat,Ic.Open)},{type:Xi.Block,color:md.BUTTON_NEGATIVE,icon:Lg.BLOCK,isVisible:()=>!0,isDisabled:()=>!1}]},this.isMyProfile?this.myProfileButtons:this.otherProfileButtons}isAllowedByContext(e,i){return this.permissions.getActionPermission(e,i).contextRequirement.isFulfilled}isActionEnabled(e,i){return this.permissions.getActionPermission(e,i).isEnabled}getPeriod(e){return Gn.getBiggestTimePeriodBySeconds(e.lifeTime,Rt.Days)}getPeriodKey(e){return Gn.getTimeKey(e.lifeTime,{period:this.getPeriod(e)})}getTimePeriod(e){return new Gn(e.lifeTime).getTotalTimeAmountByPeriod(this.getPeriod(e))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ps),g(Go),g(ls),g(Ma),g(Pr),g(Ti),g(ic),g(J),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["profile-buttons"]],inputs:{userProps:[mo.None,"user","userProps"],isMyProfile:"isMyProfile",canAddAsFriend:"canAddAsFriend",canMerge:"canMerge",inviteButtonDisabled:"inviteButtonDisabled"},outputs:{buttonClick:"buttonClick"},features:[mn([ia]),it],decls:7,vars:5,consts:[[1,"profile-buttons__container--buttons",3,"ngClass"],[1,"profile-buttons__container--large-buttons"],[4,"ngFor","ngForOf"],[1,"profile-buttons__container--small-buttons"],["subscriptionHint",""],[3,"shouldShowButton","buttonConfig","buttonClick",4,"ngIf"],[3,"shouldShowButton","buttonConfig","buttonClick"],[4,"ngIf"],[1,"profile-buttons__subscribed"],["tooltip","",1,"cash-back__info--button",3,"icon","bclass","tooltipTemplate"],["class","button",3,"ngClass","disabled","buttonModifier","icon","onClick",4,"ngIf"],[1,"button",3,"ngClass","disabled","buttonModifier","icon","onClick"],["text-with-placeholders","",1,"profile-buttons__tooltip-text",3,"key"],[1,"profile-buttons__tooltip-text",3,"item"],[1,"profile-buttons__tooltip-text"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),U(2,sNt,2,1,"ng-container",2),m(),p(3,"div",3),U(4,lNt,2,1,"ng-container",2),m()(),U(5,uNt,13,22,"ng-template",null,4,ft)),2&e&&(l("ngClass",ne(3,dNt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(2),l("ngForOf",i.buttons.large),d(2),l("ngForOf",i.buttons.small))},dependencies:[Xe,Mt,Ne,oc,ei,Eg,X_,XSe,qe,Ps,kp],styles:[".profile-buttons__container--buttons[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column;justify-content:space-around;height:100%;min-height:30rem}@media only screen and (max-width: 480px){.profile-buttons__container--buttons[_ngcontent-%COMP%]{min-height:15rem}}.profile-buttons__container--buttons[_ngcontent-%COMP%]   .profile-buttons__container--large-buttons[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column wrap;justify-content:center}.profile-buttons__container--buttons[_ngcontent-%COMP%]   .profile-buttons__container--small-buttons[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap}.profile-buttons__container--buttons[_ngcontent-%COMP%]   .profile-buttons__container--small-buttons[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{width:calc(50% - 1rem);margin:.5rem}.profile-buttons__container--buttons[_ngcontent-%COMP%]   .profile-buttons__container--small-buttons[_ngcontent-%COMP%] > .button.small-button[_ngcontent-%COMP%]{width:calc(33.33% - 1rem)}@media only screen and (max-width: 768px){.profile-buttons__container--buttons[_ngcontent-%COMP%]   .profile-buttons__container--small-buttons[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{flex:auto}}@media screen and (max-height: 800px){.profile-buttons__popup--outlet[_ngcontent-%COMP%]{padding:0 1% 1%;min-height:initial}}.profile-buttons__popup--outlet[_ngcontent-%COMP%]   .profile-buttons__container--small-buttons[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{flex:auto}"],changeDetection:0}),n})();var pNt=ve.EButtonModifier;const hNt=()=>({key:"LABEL.BUG_REPORT"}),mNt=()=>({key:"PROFILE.REPORT_PROFILE"});let iwe=(()=>{var t;class n{constructor(e,i,r,s){this.buttonModifier=pNt,this.reportReasons=[],this.select={type:rd.EControlType.Input,placeholder:{key:"PROFILE.CHOOSE_REASON"}},this.toaster=r,this.profileReportPopupService=e,this.popupTitleType=li.Static,this.popupContainerOptions={styleProperties:{maxWidth:"60rem",maxHeight:"47rem"}},this.cdr=s,s.detach()}ngOnInit(){Lt.CONFIG.core.feedback.reportReasons.forEach(e=>this.reportReasons.push({value:e,text:{key:"TEXT.".concat(e.toUpperCase())}})),this.cdr.detectChanges()}hide(){this.profileReportPopupService.closeReportPopup()}sendReport(e){this.profileReportPopupService.reportUser(this.reportedUsersId,e)}cancel(){this.profileReportPopupService.closeReportPopup()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(RH),g(Rs),g(Dt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["profile-report-popup"]],decls:3,vars:8,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[3,"reportReasons","reportText","report"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.hide()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.hide()}),m(),p(2,"report",2),Y("report",function(s){return i.sendReport(s)}),m()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleType)("text",pt(6,hNt)),d(),l("reportReasons",i.reportReasons)("reportText",pt(7,mNt)))},dependencies:[Ji,Wi,Uz],encapsulation:2,changeDetection:0}),n})();var fNt=et.Feedback.Cooldown;let RH=(()=>{var t;class n{constructor(e,i,r,s){this.toaster=e,this.feedback=i,this.rootContainerService=r,this.location=s}openReportPopup(e){this.profileReportPopupComponent=this.rootContainerService.createComponent(iwe),this.profileReportPopupComponent.instance.reportedUsersId=e,this.backButtonSubscription=this.location.subscribe(()=>this.closeReportPopup())}closeReportPopup(){var e,i;null===(e=this.backButtonSubscription)||void 0===e||e.unsubscribe(),null===(i=this.profileReportPopupComponent)||void 0===i||i.destroy()}reportUser(e,i){this.feedback.reportUser(e,i).then(()=>{this.toaster.success("POPUP.THANKYOU")}).catch(r=>{r instanceof fNt?this.toaster.success("POPUP.THANKYOU"):this.toaster.error("ERRORS.CONNECTION_ERROR")}),this.closeReportPopup()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dt),T(HI),T(Ia),T(Rs))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var gNt=ve.EButtonModifier,_Nt=ve.EIcons,owe=nt.EPermissionModule,V2=nt.EModuleAction;function vNt(t,n){if(1&t&&(p(0,"div",34)(1,"p",35),B(2,"icon-component",36),H(3),V(4,"translate"),m()()),2&t){const o=_();d(2),l("icon",o.iconNames.CROWN),d(),se($(4,2,"SHOP.SUBSCRIBED"))}}function bNt(t,n){1&t&&B(0,"div")}const z2=t=>({name:t});function CNt(t,n){if(1&t){const o=Ce();p(0,"button-icon",38),Y("onClick",function(){return oe(o),re(_(2).editProfileButtonClick())}),m()}if(2&t){const o=_(2);l("icon",ne(2,z2,o.iconNames.EDIT))("buttonModifier",o.buttonModifier.BUTTON_ACTION)}}function yNt(t,n){if(1&t&&U(0,CNt,1,4,"button-icon",37),2&t){const o=_();l("ngIf",o.isProfileActionAllowed(o.EAction.Edit))}}function SNt(t,n){if(1&t){const o=Ce();p(0,"button-icon",39),Y("onClick",function(){return oe(o),re(_().reportUser())}),m()}if(2&t){const o=_();l("icon",ne(2,z2,o.iconNames.REPORT))("buttonModifier",o.buttonModifier.BUTTON_ACTION)}}function wNt(t,n){1&t&&Un(0)}function TNt(t,n){1&t&&Un(0)}function PNt(t,n){if(1&t&&(p(0,"p",45),H(1),V(2,"translate"),B(3,"number",46),m()),2&t){const o=_(3);l("tooltipTemplate",Kt(20)),d(),ze("",$(2,3,"RANKED_GAMES.RATING"),": "),d(2),l("value",o.defaultGameStats.stats.elo)}}function INt(t,n){if(1&t&&(p(0,"p",45),H(1),V(2,"translate"),B(3,"number",46),m()),2&t){const o=_(3);l("tooltipTemplate",Kt(20)),d(),ze("",$(2,3,"RANKED_GAMES.RATING"),": "),d(2),l("value",o.userProps.elo)}}function MNt(t,n){1&t&&B(0,"spinner-loader",47)}function ONt(t,n){if(1&t&&(U(0,PNt,4,5,"p",42)(1,INt,4,5,"p",42),p(2,"div",43),U(3,MNt,1,0,"spinner-loader",44),m()),2&t){const o=_(2);l("ngIf",o.defaultGameStats.loadingState.isLoaded&&!o.defaultGameStats.loadingState.isLoading&&null!=(null==o.defaultGameStats||null==o.defaultGameStats.stats?null:o.defaultGameStats.stats.elo)),d(),l("ngIf",!o.defaultGameStats.loadingState.isLoaded&&!o.defaultGameStats.loadingState.isLoading&&null!=o.userProps.elo),d(2),l("ngIf",o.defaultGameStats.loadingState.isLoading)}}function ENt(t,n){if(1&t&&(p(0,"p",45),H(1),V(2,"translate"),B(3,"number",46),m()),2&t){const o=_(3);l("tooltipTemplate",Kt(20)),d(),ze("",$(2,3,"RANKED_GAMES.RATING"),": "),d(2),l("value",o.userProps.elo)}}function xNt(t,n){1&t&&U(0,ENt,4,5,"p",42),2&t&&l("ngIf",null!=_(2).userProps.elo)}function ANt(t,n){if(1&t&&U(0,TNt,1,0,"ng-container",11)(1,ONt,4,3,"ng-template",null,40,ft)(3,xNt,1,1,"ng-template",null,41,ft),2&t){const o=Kt(2),e=Kt(4);l("ngIf",_().isMyProfile)("ngIfThen",o)("ngIfElse",e)}}function RNt(t,n){1&t&&(p(0,"p",48),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"RANKED_GAMES.RATING_TOOLTIP")))}function kNt(t,n){if(1&t&&(p(0,"span",49),H(1),m()),2&t){const o=_();d(),se(o.userProps.profile.location.city)}}function LNt(t,n){if(1&t&&(p(0,"span",50),H(1),m()),2&t){const o=_();d(),se(o.userProps.profile.location.country)}}function DNt(t,n){if(1&t&&(p(0,"span",51),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se($(2,1,"TEXT."+o.userProps.profile.sex.toUpperCase()))}}function BNt(t,n){if(1&t&&(p(0,"span",52),H(1),m()),2&t){const o=_();d(),se(o.userProps.profile.age)}}function NNt(t,n){if(1&t&&(p(0,"span"),H(1),m()),2&t){const o=_(2);d(),ze("(",o.userProps.stats.ratingsCount,")")}}function FNt(t,n){if(1&t&&(p(0,"div",53),B(1,"icon-component",54),p(2,"p",55),H(3),U(4,NNt,2,1,"span",56),m()()),2&t){const o=_();d(),l("icon",o.iconNames.STAR),d(2),ze("",o.userProps.stats.ratingAvg,"/5 "),d(),l("ngIf",o.userProps.stats.ratingsCount)}}function UNt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",57),Y("onClick",function(){oe(o);const i=_();return re(i.buttonAction(i.EProfileButtonType.Like))}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("icon",ne(5,z2,o.iconNames.HEART_HOLLOW))("buttonModifier",o.buttonModifier.BUTTON_ACTION),d(),se($(2,3,"BUTTON.LIKE"))}}const GNt=t=>({timeConfig:t});function VNt(t,n){if(1&t&&(p(0,"div",62),B(1,"icon-component",63),p(2,"p"),H(3),V(4,"timeLeft"),m()()),2&t){const o=_(2);d(),l("icon",o.iconNames.CLOCK_ICON),d(2),se(yt(4,2,o.userProps.xp.xpBooster.remainingTime(),ne(5,GNt,o.timeLeftConfig)))}}function zNt(t,n){if(1&t){const o=Ce();p(0,"div",58),U(1,VNt,5,7,"div",59),p(2,"button-icon-text",60),Y("onClick",function(){oe(o);const i=_();return re(i.buttonAction(i.EProfileButtonType.Boosters))}),H(3),V(4,"translate"),m(),p(5,"button-text",61),Y("onClick",function(){oe(o);const i=_();return re(i.buttonAction(i.EProfileButtonType.Boosters))}),H(6),V(7,"translate"),m()()}if(2&t){const o=_();d(),l("ngIf",o.userProps.xp.xpBooster&&o.userProps.xp.xpBooster.isActive()),d(),l("icon",ne(13,z2,o.iconNames.BOOSTERS))("buttonModifier",o.buttonModifier.BUTTON_ACCENT)("disabled",!o.isShopAllowed()),d(),ze("",$(4,9,"SHOP.XP_BOOSTERS")," "),d(2),l("buttonModifier",o.buttonModifier.BUTTON_ACCENT)("bclass","user-info__button--extra-action__bclass")("disabled",!o.isShopAllowed()),d(),ze("",$(7,11,"SHOP.XP_BOOSTERS")," ")}}const jNt=t=>({"user-info__container--popup-outlet":t}),HNt=t=>({online:t}),qNt=t=>({"booster-remaining-info":t});let rwe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R){this.clientConfigService=R,this.EProfileButtonType=Xi,this.contextEnum=Wr,this.buttonModifier=gNt,this.iconNames=_Nt,this.itemTypes=Fe.TG,this.EAction=V2,this.showBoosterButton=!1,this.frameAnimation=v0,this.EVipTier=Fi,this.destroy$=new sn,this.cdr=u,this.profileReportPopupService=c,this.popup=e,this.navigation=r,this.toaster=i,this.avatarClicked=new ke,this.buttonClick=new ke,this.activatedComponentRoute=s,this.permissions=a,this.store=h,this.constants=b,this.gamesStateService=w}ngOnInit(){const e=this.store.shop.customization.selectState().model;this.showBoosterButton=void 0!==e.products.find(i=>i.item.type===Fe.TG.Booster),this.timeLeftConfig=(new yl).useYearsConfig({min:Rt.Months}).build(),this.store.rankedGames.subcribeDefaultGameStats().pipe(wn(this.destroy$)).subscribe(i=>{this.defaultGameStats=i,this.cdr.detectChanges()}),this.cdr.detectChanges(),this.updateAvatar(this.userProps.profile.avatar)}ngOnDestroy(){this.popup.hide(this.infoPopupId),this.destroy$.next(),this.destroy$.complete()}ngOnChanges(e){e.userProps&&(this.updateAvatar(e.userProps.currentValue.profile.avatar),this.userProps=e.userProps.currentValue)}updateAvatar(e){}reportUser(){this.profileReportPopupService.openReportPopup(this.userProps.profile.id)}onAvatarImageClick(){this.isProfileActionAllowed(V2.Edit)&&this.avatarClicked.emit()}editProfileButtonClick(){this.isProfileActionAllowed(V2.Edit)&&this.navigation.navigate([this.constants.defaultLoggedRoute,"edit-profile"],{outletContext:this.activatedComponentRoute.outletContext})}buttonAction(e){this.buttonClick.emit(e)}isProfileActionAllowed(e){const i=this.permissions.getActionPermission(owe.Profile,e);return i.isEnabled&&i.contextRequirement.isFulfilled}isShopAllowed(){const e=this.permissions.getActionPermission(owe.Shop,V2.Open);return e.isEnabled&&e.contextRequirement.isFulfilled}isSinglePlatform(){return!!this.clientConfigService.singleGamePlatform()&&1===this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.presets.find(r=>"default"===r.presetId).game.players.perTeam}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Dt),g(Yt),g(Pr),g(Ti),g(RH),g(Re),g(J),g(tn),g(Zn),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["user-info"]],inputs:{userProps:[mo.None,"user","userProps"],isMyProfile:"isMyProfile"},outputs:{avatarClicked:"avatarClicked",buttonClick:"buttonClick"},features:[mn([ia]),it],decls:41,vars:32,consts:[[1,"user-info__wrapper",3,"ngClass"],[1,"user-info__container--user-info"],["id","profile-avatar","click-feedback","",1,"user-info__wrapper--avatar"],[1,"user-info__container--avatar"],["data-cy","profileAvatar",1,"user-info__avatar-wrapper",3,"frameAnimation","user","isLink","hasUsername"],["data-cy","profileAvatarClicker",1,"user-info__cover--avatar",3,"click"],["class","user-info__cover--avatar--subscribed--wrapper",4,"ngIf"],[1,"user-info__container--other-info"],[1,"user-info__container--username"],[1,"user-info__text--username",3,"ngClass"],["data-cy","profileUsername",1,"user-info__username",3,"userProfile","hasVerifiedBadge"],[4,"ngIf","ngIfThen","ngIfElse"],["editButton",""],["reportButton",""],[4,"ngIf","ngIfThen"],["hasElo",""],["tooltipRating",""],[1,"user-info__container--status"],["data-cy","profileStatus",1,"user-info__text--status"],[1,"user-info__container--props"],["class","user-info__text--city","data-cy","profileCity",4,"ngIf"],["class","user-info__text--country","data-cy","profileCountry",4,"ngIf"],["class","user-info__text--gender","data-cy","profileGender",4,"ngIf"],["class","user-info__text--age","data-cy","profileAge",4,"ngIf"],[1,"user-info__container--user-props",3,"ngClass"],[1,"user-info__container--likes-rating"],["data-cy","profileLikes",1,"user-info__container--likes"],[1,"user-info__text--likes__icon",3,"icon"],[1,"user-info__text--likes"],["class","user-info__container--rating","data-cy","profileRating",4,"ngIf"],["class","user-info__button--extra-action","data-cy","profileLikeButton",3,"icon","buttonModifier","onClick",4,"ngIf"],["class","user-info__container--booster",4,"ngIf"],[1,"user-info__container--user-experience"],[3,"currentUser"],[1,"user-info__cover--avatar--subscribed--wrapper"],[1,"user-info__cover--avatar--subscribed"],[1,"user-info__cover--avatar--subscribed--icon",3,"icon"],["class","user-info__button--edit","activeCmp","","id","profile-edit-button","data-cy","profileEditButton",3,"icon","buttonModifier","onClick",4,"ngIf"],["activeCmp","","id","profile-edit-button","data-cy","profileEditButton",1,"user-info__button--edit",3,"icon","buttonModifier","onClick"],["data-cy","profileReportButton",1,"user-info__button--report",3,"icon","buttonModifier","onClick"],["myProfile",""],["otherProfile",""],["class","user-info__rating","tooltip","",3,"tooltipTemplate",4,"ngIf"],[1,"user-info__rating-loader-wrapper"],["class","user-info__rating-loader",4,"ngIf"],["tooltip","",1,"user-info__rating",3,"tooltipTemplate"],[1,"user-info__rating--number",3,"value"],[1,"user-info__rating-loader"],[1,"user-info__rating-tooltip"],["data-cy","profileCity",1,"user-info__text--city"],["data-cy","profileCountry",1,"user-info__text--country"],["data-cy","profileGender",1,"user-info__text--gender"],["data-cy","profileAge",1,"user-info__text--age"],["data-cy","profileRating",1,"user-info__container--rating"],[1,"user-info__container--rating__icon",3,"icon"],[1,"user-info__text--rating"],[4,"ngIf"],["data-cy","profileLikeButton",1,"user-info__button--extra-action",3,"icon","buttonModifier","onClick"],[1,"user-info__container--booster"],["class","user-info__container--remaining-booster","data-cy","profileBoosterDuration",4,"ngIf"],["data-cy","profileBoosterButton",1,"user-info__button--extra-action","with__icon","booster",3,"icon","buttonModifier","disabled","onClick"],["data-cy","profileBoosterButton",1,"user-info__button--extra-action","without__icon","booster",3,"buttonModifier","bclass","disabled","onClick"],["data-cy","profileBoosterDuration",1,"user-info__container--remaining-booster"],[1,"user-info__container--remaining-booster__icon",3,"icon"]],template:function(e,i){if(1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3),B(4,"avatar",4),m(),p(5,"div",5),Y("click",function(){return i.onAvatarImageClick()}),m(),U(6,vNt,5,4,"div",6),m(),p(7,"div",7)(8,"div",8)(9,"p",9),B(10,"username",10),m(),U(11,bNt,1,0,"div",11)(12,yNt,1,1,"ng-template",null,12,ft)(14,SNt,1,4,"ng-template",null,13,ft)(16,wNt,1,0,"ng-container",14)(17,ANt,5,3,"ng-template",null,15,ft)(19,RNt,3,3,"ng-template",null,16,ft),m(),p(21,"div",17)(22,"p",18),H(23),m()(),p(24,"div",19),U(25,kNt,2,1,"span",20)(26,LNt,2,1,"span",21)(27,DNt,3,3,"span",22)(28,BNt,2,1,"span",23),m()()(),p(29,"div",24)(30,"div",25)(31,"div",26),B(32,"icon-component",27),p(33,"p",28),H(34),m()(),U(35,FNt,5,3,"div",29),m(),p(36,"div"),U(37,UNt,3,7,"button-icon-text",30)(38,zNt,8,15,"div",31),m()(),p(39,"div",32),B(40,"user-experience-bar",33),m()()),2&e){const r=Kt(13),s=Kt(15),a=Kt(18);l("ngClass",ne(26,jNt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(4),l("frameAnimation",i.frameAnimation)("user",i.userProps.profile)("isLink",!1)("hasUsername",!1),d(2),l("ngIf",i.userProps.profile.vip.isActiveSubscription()&&i.userProps.profile.getCurrentSubscriptionItem().type===i.itemTypes.Vip),d(3),l("ngClass",ne(28,HNt,i.userProps.isOnline)),d(),l("userProfile",i.userProps.profile)("hasVerifiedBadge",!0),d(),l("ngIf",i.isMyProfile)("ngIfThen",r)("ngIfElse",s),d(5),l("ngIf",null!=i.userProps.elo||null!=(null==i.defaultGameStats||null==i.defaultGameStats.stats?null:i.defaultGameStats.stats.elo))("ngIfThen",a),d(7),ze("",i.userProps.profile.status," "),d(2),l("ngIf",i.userProps.profile.location.city),d(),l("ngIf",i.userProps.profile.location.country),d(),l("ngIf",i.userProps.profile.sex),d(),l("ngIf",i.userProps.profile.age),d(),l("ngClass",ne(30,qNt,i.isMyProfile&&i.showBoosterButton&&i.userProps.xp.xpBooster&&i.userProps.xp.xpBooster.isActive())),d(3),l("icon",i.iconNames.HEART),d(2),se(i.userProps.stats.likes),d(),l("ngIf",!i.isSinglePlatform()),d(2),l("ngIf",!i.isMyProfile),d(),l("ngIf",i.isMyProfile&&i.showBoosterButton),d(2),l("currentUser",i.userProps)}},dependencies:[Xe,Ne,Bo,Dn,Qr,X8,pn,ei,so,vc,Zp,Eg,po,Nm,qe,Ps],styles:['.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--age[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--gender[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--country[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__element--separator[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--city[_ngcontent-%COMP%]{font-size:1.4rem}@media only screen and (max-width: 480px){.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--age[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--gender[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--country[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__element--separator[_ngcontent-%COMP%], .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--city[_ngcontent-%COMP%]{font-size:1.2rem}}.user-info__wrapper[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.user-info__container--user-info[_ngcontent-%COMP%]{display:flex;flex-flow:row;padding:2%}@media screen and (max-height: 380px) and (orientation: landscape){.user-info__container--user-info[_ngcontent-%COMP%]{margin-bottom:1rem}}@media only screen and (max-width: 480px){.user-info__container--user-info[_ngcontent-%COMP%]{padding:0}}.user-info__container--user-info[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;align-items:center;width:16rem;overflow:hidden}@media only screen and (max-width: 480px){.user-info__container--user-info[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]{min-height:12.5rem;width:11rem}}.user-info__container--user-info[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]   .user-info__container--avatar[_ngcontent-%COMP%]{display:block;width:100%}.user-info__container--user-info[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]   .user-info__cover--avatar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.user-info__container--user-info[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]   .user-info__cover--avatar[_ngcontent-%COMP%]:hover{cursor:pointer}.user-info__avatar-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}@media only screen and (max-width: 480px){.user-info__button--report[_ngcontent-%COMP%]{width:3.8rem}}.user-info__container--other-info[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column;padding:0 0 0 2rem;width:calc(100% - 16rem)}@media only screen and (max-width: 480px){.user-info__container--other-info[_ngcontent-%COMP%]{width:calc(100% - 11rem)}}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--username[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;padding:.5rem 0}@media only screen and (max-width: 980px){.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--username[_ngcontent-%COMP%]{padding:0 0 .5rem}}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--username[_ngcontent-%COMP%]   .user-info__text--username[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;font-weight:600;flex:1;padding-left:2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--username[_ngcontent-%COMP%]   .user-info__text--username[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;width:1.4rem;height:1.4rem;border-radius:50%;transform:translateY(-50%)}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--status[_ngcontent-%COMP%]{flex:1;width:100%;padding:1rem 0 0}@media only screen and (max-width: 480px){.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--status[_ngcontent-%COMP%]{padding:0}}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--status[_ngcontent-%COMP%]   .user-info__text--status[_ngcontent-%COMP%]{font-size:1.2rem;word-wrap:break-word;line-height:12px;text-align:left}@media only screen and (max-width: 480px){.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--status[_ngcontent-%COMP%]   .user-info__text--status[_ngcontent-%COMP%]{font-size:1rem;line-height:10px}}@media only screen and (max-width: 380px){.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--status[_ngcontent-%COMP%]   .user-info__text--status[_ngcontent-%COMP%]{max-width:17rem}}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]{font-weight:600;width:100%}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--city[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;vertical-align:top;max-width:100%}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__element--separator[_ngcontent-%COMP%]{margin-right:.3rem}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%]   .user-info__text--country[_ngcontent-%COMP%]{max-width:100%;vertical-align:top;overflow:hidden;text-overflow:ellipsis}.user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--props[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(:first-child):before{content:",";margin-right:.5rem}.user-info__container--likes[_ngcontent-%COMP%], .user-info__container--rating[_ngcontent-%COMP%]{display:flex;align-items:center}.user-info__container--user-experience[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;justify-content:center;height:4rem}@media only screen and (max-width: 480px){.user-info__container--user-experience[_ngcontent-%COMP%]{height:3.5rem}}.user-info__container--user-props[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:space-between;align-items:center;min-height:6rem}.user-info__container--user-props.booster-remaining-info[_ngcontent-%COMP%]{margin-top:2rem}.user-info__container--user-props[_ngcontent-%COMP%]   .user-info__container--likes-rating[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;z-index:1}.user-info__container--user-props[_ngcontent-%COMP%]   .user-info__container--likes-rating[_ngcontent-%COMP%]   .user-info__container--likes[_ngcontent-%COMP%]{margin-right:2rem}@media only screen and (max-width: 480px){.user-info__container--user-props[_ngcontent-%COMP%]   .user-info__container--likes-rating[_ngcontent-%COMP%]   .user-info__container--likes[_ngcontent-%COMP%]{margin-right:1rem}}.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--other-info[_ngcontent-%COMP%]{width:calc(100% - 14rem);padding:.5rem;border-radius:.8rem}@media only screen and (max-height: 900px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--other-info[_ngcontent-%COMP%]{width:calc(100% - 12rem)}}@media only screen and (max-height: 800px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--other-info[_ngcontent-%COMP%]{width:calc(100% - 11rem)}}@media only screen and (max-width: 480px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--other-info[_ngcontent-%COMP%]{width:calc(100% - 11rem)}}.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--other-info[_ngcontent-%COMP%]   .user-info__container--username[_ngcontent-%COMP%]{padding:0 0 .5rem}.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__button--extra-action[_ngcontent-%COMP%]{height:3.5rem}.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--booster[_ngcontent-%COMP%]{position:relative}.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--booster[_ngcontent-%COMP%]   .user-info__container--remaining-booster[_ngcontent-%COMP%]{position:absolute;bottom:100%;left:50%;transform:translate(-50%);padding:.25rem 1rem;border-radius:.4rem .4rem 0 0;font-size:1.4rem;display:flex;align-items:center}.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--booster[_ngcontent-%COMP%]   .user-info__container--remaining-booster[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:max-content}@media screen and (max-height: 380px) and (orientation: landscape){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--user-info[_ngcontent-%COMP%]{padding:0 2% 1%}}@media only screen and (max-width: 480px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--user-info[_ngcontent-%COMP%]{padding:0}}@media screen and (max-height: 380px) and (orientation: landscape){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--user-props[_ngcontent-%COMP%]{min-height:initial}}.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]{width:13rem;padding:0 .5rem}@media only screen and (max-height: 900px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]{width:11rem}}@media only screen and (max-height: 800px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]{width:10rem}}@media only screen and (max-width: 480px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__wrapper--avatar[_ngcontent-%COMP%]{min-height:12.5rem;width:11rem}}@media only screen and (max-height: 800px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--user-experience[_ngcontent-%COMP%]{height:3rem}}@media only screen and (max-width: 480px){.user-info__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--user-experience[_ngcontent-%COMP%]{height:3.5rem}}.user-info__rating[_ngcontent-%COMP%]{width:100%}.user-info__rating-loader-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;height:32px}.user-info__rating-loader[_ngcontent-%COMP%]{width:32px;height:32px;font-size:3rem}'],changeDetection:0}),n})();const WNt=t=>({backdrop:t}),$Nt=t=>[t];let tO=(()=>{var t;class n{constructor(e){this.showBackdrop=!0,this.hostClass=!0,this.icon=ve.EIcons.CLUB_POINTS,this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-points"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("club--points__host",i.hostClass)},inputs:{points:"points",showBackdrop:"showBackdrop"},features:[it],decls:6,vars:12,consts:[[1,"club--points__wrapper",3,"ngClass"],[1,"club--points__icon",3,"icon"],[1,"club--points__value"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"icon-component",1),p(2,"p",2),H(3),V(4,"translate"),V(5,"formatNumber"),m()()),2&e&&(l("ngClass",ne(8,WNt,i.showBackdrop)),d(),l("icon",i.icon),d(2),se(yt(4,3,"CLUBS.POINTS",ne(10,$Nt,$(5,6,i.points)))))},dependencies:[Xe,Dn,qe,Go],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.club--points__wrapper[_ngcontent-%COMP%]{font-size:inherit;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.club--points__icon[_ngcontent-%COMP%]{font-size:1.3em}.club--points__value[_ngcontent-%COMP%]{margin-left:.5rem}"],changeDetection:0}),n})();function KNt(t,n){1&t&&Un(0)}const ZNt=(t,n,o,e)=>({id:t,avatar:n,level:o,frame:e});function QNt(t,n){if(1&t&&(p(0,"div",6)(1,"div",7)(2,"div",8),B(3,"club-avatar",9),m(),p(4,"div",10)(5,"p",11),H(6),m(),p(7,"p",12),H(8),V(9,"translate"),m()()(),p(10,"div",13),B(11,"club-points",14),m()()),2&t){const o=_();d(3),l("club",xd(7,ZNt,o.targetUserClubInfo.clubProfile.id,o.targetUserClubInfo.clubProfile.avatar,o.targetUserClubInfo.clubProfile.level,o.targetUserClubInfo.inventory.frame)),d(3),ze(" ",o.targetUserClubInfo.clubProfile.name," "),d(2),ze(" ",$(9,5,o.getRoleString(o.targetUserClubInfo.role))," "),d(3),l("points",o.targetUserClubInfo.inventory.coins)("showBackdrop",!1)}}function YNt(t,n){1&t&&(p(0,"p",20),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"CLUBS.NO_CLUB_INFO")," "))}function JNt(t,n){1&t&&(p(0,"p",21),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"CLUBS.NOT_IN_CLUB")," "))}function XNt(t,n){if(1&t&&(p(0,"div",10)(1,"p",22),H(2),m(),B(3,"p",23),V(4,"safeHtml"),V(5,"translate"),m()),2&t){const o=_(2);d(2),ze(" ",null==o.myClubInfo?null:o.myClubInfo.currentJoinRequest.clubName," "),d(),l("innerHtml",$(4,2,$(5,4,"CLUBS.YOU_REQUESTED")),Yn)}}function eFt(t,n){if(1&t){const o=Ce();p(0,"div",13)(1,"button-text",24),Y("onClick",function(){return oe(o),re(_(2).cancelRequest())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2);d(),l("buttonModifier",o.EButtonModifier.BUTTON_NEGATIVE)("loading",o.isLoading),d(),se($(3,3,"CLUBS.CANCEL_JOIN_REQUEST"))}}function tFt(t,n){if(1&t&&(p(0,"div",6)(1,"div",15),U(2,YNt,3,3,"p",16)(3,JNt,3,3,"p",17)(4,XNt,6,6,"div",18),m(),U(5,eFt,4,5,"div",19),m()),2&t){const o=_();d(2),l("ngIf",!o.myClubInfo),d(),l("ngIf",o.myClubInfo&&!o.myClubInfo.currentJoinRequest),d(),l("ngIf",(null==o.myClubInfo?null:o.myClubInfo.currentJoinRequest)&&(null==o.myClubInfo?null:o.myClubInfo.currentJoinRequest.clubName)),d(),l("ngIf",o.showExtraInfo())}}function nFt(t,n){1&t&&(p(0,"p",28),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"CLUBS.NO_CLUB_INFO")," "))}const iFt=t=>({"with--extra--info":t});function oFt(t,n){if(1&t&&(p(0,"p",29),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("ngClass",ne(4,iFt,o.showExtraInfo())),d(),ze(" ",$(2,2,"CLUBS.NOT_IN_CLUB")," ")}}const rFt=t=>[t];function sFt(t,n){if(1&t&&(p(0,"div",30)(1,"p",31),H(2),m(),B(3,"p",23),V(4,"translate"),m()),2&t){const o=_(2);d(2),ze(" ",null==o.myClubInfo?null:o.myClubInfo.clubProfile.name," "),d(),l("innerHtml",yt(4,2,"CLUBS.INVITED_BY",ne(5,rFt,"<span class='club--profile--info__text--username'>"+(null!=o.targetUserClubInfo&&null!=o.targetUserClubInfo.currentJoinRequest&&o.targetUserClubInfo.currentJoinRequest.handlerUsername?null==o.targetUserClubInfo||null==o.targetUserClubInfo.currentJoinRequest?null:o.targetUserClubInfo.currentJoinRequest.handlerUsername:o.myProfile.username.currentUsername)+"</span>")),Yn)}}const swe=t=>({name:t});function aFt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",36),Y("onClick",function(){return oe(o),re(_(3).invitePlayer())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(3);l("loading",o.isLoading)("disabled",o.targetUserProfile.level<(null==o.myClubInfo?null:o.myClubInfo.clubProfile.settings.requirements.minLevel))("icon",ne(7,swe,o.EIcons.CLUB_INVITE))("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION),d(),se($(2,5,"CLUBS.INVITE_TO_CLUB"))}}function cFt(t,n){if(1&t){const o=Ce();p(0,"button-text",37),Y("onClick",function(){return oe(o),re(_(3).cancelPlayerInvite())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(3);l("loading",o.isLoading)("buttonModifier",o.EButtonModifier.BUTTON_NEGATIVE),d(),se($(2,3,"CLUBS.CANCEL_INVITE"))}}function lFt(t,n){1&t&&(p(0,"p",38),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"LABEL.REJECTED")," "))}function uFt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",39),Y("onClick",function(){return oe(o),re(_(3).acceptClubJoinRequest())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(3);l("loading",o.isLoading)("icon",ne(6,swe,o.EIcons.CLUB_INVITE))("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION),d(),se($(2,4,"CLUBS.ACCEPT_JOIN_REQUEST"))}}function dFt(t,n){if(1&t&&(p(0,"div",13),U(1,aFt,3,9,"button-icon-text",32)(2,cFt,3,5,"button-text",33)(3,lFt,3,3,"p",34)(4,uFt,3,8,"button-icon-text",35),m()),2&t){const o=_(2);d(),l("ngIf",(null==o.myClubInfo?null:o.myClubInfo.clubProfile)&&(!(null!=o.targetUserClubInfo&&o.targetUserClubInfo.currentJoinRequest)||(null==o.targetUserClubInfo?null:o.targetUserClubInfo.currentJoinRequest.status)===o.EJoinRequestStatus.ClubRejected)),d(),l("ngIf",(null==o.targetUserClubInfo||null==o.targetUserClubInfo.currentJoinRequest?null:o.targetUserClubInfo.currentJoinRequest.status)===o.EJoinRequestStatus.PendingUserAccept),d(),l("ngIf",(null==o.targetUserClubInfo||null==o.targetUserClubInfo.currentJoinRequest?null:o.targetUserClubInfo.currentJoinRequest.status)===o.EJoinRequestStatus.UserRejected),d(),l("ngIf",(null==o.targetUserClubInfo||null==o.targetUserClubInfo.currentJoinRequest?null:o.targetUserClubInfo.currentJoinRequest.status)===o.EJoinRequestStatus.PendingClubAccept)}}function pFt(t,n){if(1&t&&(p(0,"div",6)(1,"div",15),U(2,nFt,3,3,"p",25)(3,oFt,3,6,"p",26)(4,sFt,5,7,"div",27),m(),U(5,dFt,5,4,"div",19),m()),2&t){const o=_();d(2),l("ngIf",!o.targetUserClubInfo),d(),l("ngIf",o.targetUserClubInfo&&(null==o.targetUserClubInfo.currentJoinRequest?null:o.targetUserClubInfo.currentJoinRequest.status)!==o.EJoinRequestStatus.PendingUserAccept),d(),l("ngIf",(null==o.targetUserClubInfo||null==o.targetUserClubInfo.currentJoinRequest?null:o.targetUserClubInfo.currentJoinRequest.status)===o.EJoinRequestStatus.PendingUserAccept),d(),l("ngIf",o.showExtraInfo())}}let kH=(()=>{var t;class n{constructor(e){this.isLoading=!1,this.invite=new ke,this.cancel=new ke,this.acceptJoinRequest=new ke,this.cancelInviteRequest=new ke,this.EClubPrivacy=Or,this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.EJoinRequestStatus=Di,this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}getRoleString(e){return $h.getMemberRoleTranslationKey(e)}invitePlayer(){this.invite.emit()}cancelPlayerInvite(){this.cancelInviteRequest.emit()}cancelRequest(){this.cancel.emit()}acceptClubJoinRequest(){this.acceptJoinRequest.emit()}isCurrentUserInfo(){return this.myProfile.id===this.targetUserProfile.id}showExtraInfo(){var e,i,r,s,a,c,u;return this.isCurrentUserInfo()&&!(null===(e=this.myClubInfo)||void 0===e||!e.currentJoinRequest)||(null===(i=this.myClubInfo)||void 0===i?void 0:i.clubProfile)&&(!(null!==(r=this.targetUserClubInfo)&&void 0!==r&&r.currentJoinRequest)||(null===(s=this.targetUserClubInfo)||void 0===s?void 0:s.currentJoinRequest.status)===Di.ClubRejected)||(null===(a=this.targetUserClubInfo)||void 0===a||null===(a=a.currentJoinRequest)||void 0===a?void 0:a.status)===Di.PendingUserAccept||(null===(c=this.targetUserClubInfo)||void 0===c||null===(c=c.currentJoinRequest)||void 0===c?void 0:c.status)===Di.UserRejected||(null===(u=this.targetUserClubInfo)||void 0===u||null===(u=u.currentJoinRequest)||void 0===u?void 0:u.status)===Di.PendingClubAccept}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-player-profile-info"]],inputs:{myClubInfo:"myClubInfo",targetUserClubInfo:"targetUserClubInfo",myProfile:"myProfile",targetUserProfile:"targetUserProfile",isLoading:"isLoading"},outputs:{invite:"invite",cancel:"cancel",acceptJoinRequest:"acceptJoinRequest",cancelInviteRequest:"cancelInviteRequest"},features:[it],decls:11,vars:6,consts:[[1,"club-player-profile-info__container"],[1,"club-player-profile-info__title"],[4,"ngIf","ngIfThen","ngIfElse"],["hasCurrentClub",""],["isCurrentUserNoClub",""],["isOtherUserNoClub",""],[1,"club--profile--info__wrapper","club--profile--info__wrapper-background"],[1,"club--profile--info__container--club-main-info"],[1,"club--profile--info__avatar--wrapper"],["data-cy","profileHasClubInfoAvatar",1,"club--profile--info__avatar",3,"club"],[1,"club--profile--info__misc"],["data-cy","profileHasClubInfoName",1,"club--profile--info__club--name"],["data-cy","profileHasClubInfoRole",1,"club--profile--info__role"],[1,"club--profile--info__container--extra-info"],["data-cy","profileHasClubInfoPoints",1,"club--profile--info__club-points","club--profile--info__container--extra-info--item",3,"points","showBackdrop"],[1,"club--profile--info__container--club-main-info","with-indent"],["class","club--profile--info__no-info","data-cy","profileNoClubStatus",4,"ngIf"],["class","club--profile--info__no-info","data-cy","profileNoClubText",4,"ngIf"],["class","club--profile--info__misc",4,"ngIf"],["class","club--profile--info__container--extra-info",4,"ngIf"],["data-cy","profileNoClubStatus",1,"club--profile--info__no-info"],["data-cy","profileNoClubText",1,"club--profile--info__no-info"],[1,"club--profile--info__club--name"],[1,"club--profile--info__role",3,"innerHtml"],[1,"club--profile--info__invite--btn",3,"buttonModifier","loading","onClick"],["class","club--profile--info__no-info",4,"ngIf"],["class","club--profile--info__no-info","data-cy","profileClubNoClub",3,"ngClass",4,"ngIf"],["class","club--profile--info__misc","data-cy","profileClubInfoContainer",4,"ngIf"],[1,"club--profile--info__no-info"],["data-cy","profileClubNoClub",1,"club--profile--info__no-info",3,"ngClass"],["data-cy","profileClubInfoContainer",1,"club--profile--info__misc"],["data-cy","profileClubInfoName",1,"club--profile--info__club--name"],["class","club--profile--info__invite--btn","data-cy","clubInviteButtonProfile",3,"loading","disabled","icon","buttonModifier","onClick",4,"ngIf"],["class","club--profile--info__invite--btn","data-cy","clubCancelInviteButtonProfile",3,"loading","buttonModifier","onClick",4,"ngIf"],["class","club--profile--info__no-info","data-cy","profileClubRejectedState",4,"ngIf"],["class","club--profile--info__invite--btn","data-cy","clubAcceptInviteButtonProfile",3,"loading","icon","buttonModifier","onClick",4,"ngIf"],["data-cy","clubInviteButtonProfile",1,"club--profile--info__invite--btn",3,"loading","disabled","icon","buttonModifier","onClick"],["data-cy","clubCancelInviteButtonProfile",1,"club--profile--info__invite--btn",3,"loading","buttonModifier","onClick"],["data-cy","profileClubRejectedState",1,"club--profile--info__no-info"],["data-cy","clubAcceptInviteButtonProfile",1,"club--profile--info__invite--btn",3,"loading","icon","buttonModifier","onClick"]],template:function(e,i){if(1&e&&(p(0,"div",0)(1,"p",1),H(2),V(3,"translate"),m(),U(4,KNt,1,0,"ng-container",2)(5,QNt,12,12,"ng-template",null,3,ft)(7,tFt,6,4,"ng-template",null,4,ft)(9,pFt,6,4,"ng-template",null,5,ft),m()),2&e){const r=Kt(6),s=Kt(8),a=Kt(10);d(2),se($(3,4,"CLUBS.CLUB")),d(2),l("ngIf",null==i.targetUserClubInfo?null:i.targetUserClubInfo.clubProfile)("ngIfThen",r)("ngIfElse",i.isCurrentUserInfo()&&s||a)}},dependencies:[Xe,Ne,pn,so,mf,tO,qe,Ta],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;min-height:7rem}@media only screen and (max-width: 568px){[_nghost-%COMP%]{min-height:5rem}}.club--profile--info__wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;padding:.5rem 0}.club--profile--info__wrapper[_ngcontent-%COMP%]   .club--profile--info__container--club-main-info[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:flex-start;flex:1}.club--profile--info__wrapper[_ngcontent-%COMP%]   .club--profile--info__container--club-main-info.with-indent[_ngcontent-%COMP%]{padding:0 2rem}.club--profile--info__wrapper[_ngcontent-%COMP%]   .club--profile--info__container--extra-info[_ngcontent-%COMP%]{padding:0 2rem;height:100%;display:flex;flex-flow:column wrap;justify-content:center}@media only screen and (max-width: 568px){.club--profile--info__wrapper[_ngcontent-%COMP%]   .club--profile--info__container--extra-info[_ngcontent-%COMP%]{padding:0 1rem}}.club--profile--info__container--extra-info--item[_ngcontent-%COMP%]{flex:1}.club--profile--info__wrapper--extra--info[_ngcontent-%COMP%]{justify-content:center;height:100%}.club--profile--info__club--name[_ngcontent-%COMP%]{font-weight:600;word-break:break-word;font-size:2rem}@media only screen and (max-width: 568px){.club--profile--info__club--name[_ngcontent-%COMP%]{font-size:1.6rem}}.club--profile--info__role[_ngcontent-%COMP%], .club--profile--info__club-points[_ngcontent-%COMP%]{height:auto;font-size:1.8rem}@media only screen and (max-width: 568px){.club--profile--info__role[_ngcontent-%COMP%], .club--profile--info__club-points[_ngcontent-%COMP%]{font-size:1.4rem}}.club--profile--info__avatar--wrapper[_ngcontent-%COMP%]{display:flex;padding:1rem;flex:0 0 7em}@media only screen and (max-width: 568px){.club--profile--info__avatar--wrapper[_ngcontent-%COMP%]{flex:0 0 6em}}.club--profile--info__avatar[_ngcontent-%COMP%]{font-size:1rem}@media only screen and (max-width: 568px){.club--profile--info__avatar[_ngcontent-%COMP%]{font-size:.8rem}}.club--profile--info__invite--btn[_ngcontent-%COMP%]{width:100%;margin:2% 0;max-width:20rem}@media screen and (max-width: 568px){.club--profile--info__invite--btn[_ngcontent-%COMP%]{max-width:13rem}}.club--profile--info__no-info[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;height:5rem;justify-content:center}.club--profile--info__no-info.with--extra--info[_ngcontent-%COMP%]{justify-content:left}.club-player-profile-info__title[_ngcontent-%COMP%]{height:5rem;font-size:2.4rem;vertical-align:middle;display:flex;align-items:center;justify-content:center}.club-player-profile-info__container[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})(),LH=(()=>{var t;class n{constructor(e,i,r,s,a){this.subscriptions=new ie.List,this.tasks=new ie.List,this.cdr=e,this.clubsService=i,this.toastService=r,this.clientPermissions=s,this.store=a}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnDestroy(){this.cancelTasks(),this.removeSubscriptions()}ngOnChanges(e){e.targetUserProfile.previousValue!==e.targetUserProfile.currentValue&&(this.cancelTasks(),this.removeSubscriptions(),this.targetUserProfile.id===this.myProfile.id?(this.subscriptions.add(this.store.clubs.subscribeCurrentClub().subscribe(i=>{var r,s,a,c;this.myClubInfo={...this.myClubInfo,clubProfile:null===(r=i.clubState)||void 0===r?void 0:r.clubProfile,role:null===(s=i.clubState)||void 0===s?void 0:s.role,inventory:i.inventory},this.targetUserClubInfo={...this.targetUserClubInfo,clubProfile:null===(a=i.clubState)||void 0===a?void 0:a.clubProfile,role:null===(c=i.clubState)||void 0===c?void 0:c.role,inventory:i.inventory},this.cdr.detectChanges()})),this.subscriptions.add(this.store.clubs.subscribeCurrentJoinRequest().subscribe(i=>{this.isLoading=!!i&&!!this.store.clubs.selectInflightJoinRequestByClubId(i.clubId),this.myClubInfo={...this.myClubInfo,currentJoinRequest:i},this.targetUserClubInfo={...this.targetUserClubInfo,currentJoinRequest:i},this.cdr.detectChanges()}))):this.subscriptions.add(this.store.clubs.subscribeUserClubJoinRequestByUserId(this.targetUserProfile.id).subscribe(i=>{this.isLoading=!!i,i&&i.result&&(this.targetUserClubInfo={...this.targetUserClubInfo,clubProfile:i.result.clubProfile,role:i.result.role,currentJoinRequest:i.result.joinRequest,inventory:i.result.inventory}),this.cdr.detectChanges()})))}invite(){var e=this;return f(function*(){if(!e.clientPermissions.getClubActionPermission(e.myClubInfo.clubProfile,nt.EModuleAction.InviteClubMember,{showFailedRequirements:!0}).isPermitted)return;const r=new Jn(e.clubsService.sendClubInviteToUser({clubId:e.myClubInfo.clubProfile.id,userId:e.targetUserProfile.id}));e.tasks.add(r);try{yield r}catch(s){console.warn(s),e.showErrorToaster(s)}finally{e.tasks.remove(r)}})()}cancel(){var e=this;return f(function*(){const i=new Jn(e.clubsService.cancelJoinRequest({clubId:e.myClubInfo.currentJoinRequest.clubId,requestId:e.myClubInfo.currentJoinRequest.id}));yield e.executeTask(i),e.cdr.detectChanges()})()}acceptJoinRequest(){var e=this;return f(function*(){const i=new Jn(e.clubsService.acceptJoinRequest({clubId:e.targetUserClubInfo.currentJoinRequest.clubId,requestId:e.targetUserClubInfo.currentJoinRequest.id,userId:e.targetUserProfile.id}));yield e.executeTask(i),e.cdr.detectChanges()})()}cancelInviteRequest(){var e=this;return f(function*(){if(!e.clientPermissions.getClubActionPermission(e.myClubInfo.clubProfile,nt.EModuleAction.InviteClubMember,{showFailedRequirements:!0}).isPermitted)return;const r=new Jn(e.clubsService.cancelClubInviteRequest({clubId:e.myClubInfo.clubProfile.id,userId:e.targetUserProfile.id,requestId:e.targetUserClubInfo.currentJoinRequest.id}));e.tasks.add(r);try{yield r}catch(s){console.warn(s),s instanceof Sh&&(e.targetUserClubInfo={...e.targetUserClubInfo,currentJoinRequest:{...e.targetUserClubInfo.currentJoinRequest,status:s.joinRequestStatus}},e.cdr.detectChanges()),e.showErrorToaster(s)}finally{e.tasks.remove(r)}})()}executeTask(e){var i=this;return f(function*(){i.tasks.add(e);try{yield e}catch(r){console.warn(r),i.showErrorToaster(r)}finally{i.tasks.remove(e)}})()}cancelTasks(){this.tasks.forEach(e=>e.cancel()),this.tasks=new ie.List}removeSubscriptions(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}showErrorToaster(e){e instanceof Cr?console.log("promise was cancelled",e):e instanceof lt.NetworkError?this.toastService.error("ERRORS.CONNECTION_ERROR"):e instanceof mb||e instanceof Sh?this.toastService.error("CLUBS.JOIN_REQUEST_PROCESS_ERROR"):e instanceof XS?this.toastService.error("CLUBS.PLAYER_ALREADY_IN_A_CLUB"):e instanceof lt.ServerUnavailableError?this.toastService.error("CLUBS.SERVICE_UNAVAILABLE"):e instanceof Mm?this.toastService.error("CLUBS.CLUB_NOT_FOUND"):e instanceof cP?this.toastService.error("CLUBS.CLUB_JOIN_FULL_ERROR"):e instanceof Mm?this.toastService.error("CLUBS.CLUB_NOT_FOUND"):e instanceof lt.ServerUnavailableError?this.toastService.error("CLUBS.SERVICE_UNAVAILABLE"):e instanceof $f?e.userId===this.store.selectUserState().profile.id?this.toastService.error("CLUBS.USER_NOT_IN_CLUB"):this.toastService.error("CLUBS.NO_LONGER_MEMBER"):this.toastService.error(e instanceof hb?"CLUBS.CLUB_ROLE_ACTION_OUTDATED":e instanceof fA?"CLUBS.CLUB_PRIVACY_SETTINGS_CHANGED_ERROR":e instanceof S_?"CLUBS.JOIN_REQUEST_ALREADY_EXISTS":"ERRORS.SOMETHING_WRONG")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ru),g(Dt),g(Pi),g(J))},t.\u0275cmp=pe({type:t,selectors:[["club-player-profile-info-smart"]],inputs:{myClubInfo:"myClubInfo",targetUserClubInfo:"targetUserClubInfo",myProfile:"myProfile",targetUserProfile:"targetUserProfile"},features:[it],decls:1,vars:5,consts:[[3,"myClubInfo","targetUserClubInfo","myProfile","targetUserProfile","isLoading","cancel","invite","acceptJoinRequest","cancelInviteRequest"]],template:function(e,i){1&e&&(p(0,"club-player-profile-info",0),Y("cancel",function(){return i.cancel()})("invite",function(){return i.invite()})("acceptJoinRequest",function(){return i.acceptJoinRequest()})("cancelInviteRequest",function(){return i.cancelInviteRequest()}),m()),2&e&&l("myClubInfo",i.myClubInfo)("targetUserClubInfo",i.targetUserClubInfo)("myProfile",i.myProfile)("targetUserProfile",i.targetUserProfile)("isLoading",i.isLoading)},dependencies:[kH],encapsulation:2,changeDetection:0}),n})();var Tv=function(t){return t[t.Open=0]="Open",t[t.Like=1]="Like",t[t.Delete=2]="Delete",t[t.Report=3]="Report",t[t.ChangeAvatar=4]="ChangeAvatar",t}(Tv||{});const DH=t=>({name:t});function hFt(t,n){if(1&t){const o=Ce();p(0,"button-icon",8),Y("onClick",function(){oe(o);const i=_(2);return re(i.emitAction(i.EPhotoAction.ChangeAvatar))}),m()}if(2&t){const o=_(2);l("icon",ne(3,DH,o.EIcons.CHANGE_AVATAR))("bclass","galery-photo__action--button-bclass")("loading",o.photo.actions.changeAsAvatar.inProgress)}}function mFt(t,n){if(1&t){const o=Ce();p(0,"button-icon",9),Y("onClick",function(){oe(o);const i=_(2);return re(i.emitAction(i.EPhotoAction.Delete))}),m()}if(2&t){const o=_(2);l("icon",ne(3,DH,o.EIcons.DELETE))("bclass","galery-photo__action--button-bclass")("loading",o.photo.actions.delete.inProgress)}}function fFt(t,n){if(1&t){const o=Ce();p(0,"button-icon",10),Y("onClick",function(){oe(o);const i=_(2);return re(i.emitAction(i.EPhotoAction.Report))}),m()}if(2&t){const o=_(2);l("icon",ne(3,DH,o.EIcons.REPORT))("loading",o.photo.actions.report.inProgress)("bclass","galery-photo__action--button-bclass")}}function gFt(t,n){if(1&t){const o=Ce();p(0,"div",3)(1,"like-component",4),Y("like",function(){oe(o);const i=_();return re(i.emitAction(i.EPhotoAction.Like))}),m(),U(2,hFt,1,5,"button-icon",5)(3,mFt,1,5,"button-icon",6)(4,fFt,1,5,"button-icon",7),m()}if(2&t){const o=_();d(),l("count",o.photo.likes)("isInteractable",!o.isMyPhoto)("isLoading",o.photo.actions.like.inProgress),d(),l("ngIf",o.isMyPhoto&&!o.photo.isAvatar),d(),l("ngIf",o.isMyPhoto),d(),l("ngIf",!o.isMyPhoto)}}const _Ft=(t,n)=>({placeholder:t,locked:n});let BH=(()=>{var t;class n{constructor(e,i){this.showActions=!0,this.action=new ke,this.EIcons=ve.EIcons,this.EPhotoAction=Tv,this.cdr=e,e.detach(),this.urlService=i}ngOnChanges(){this.url=this.photo?this.urlService.createCdnPath({url:this.photo.thumb||this.photo.url,prefix:"gallery"}):"",this.cdr.detectChanges()}emitAction(e){this.action.emit({actionType:e,photo:this.photo})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["gallery-photo"]],inputs:{photo:"photo",isMyPhoto:"isMyPhoto",showActions:"showActions",isPlaceholder:"isPlaceholder",isLocked:"isLocked"},outputs:{action:"action"},features:[it],decls:3,vars:9,consts:[[1,"gallery-photo__container--single-photo-wrapper",3,"ngClass"],[3,"url","isPlaceholder","isLocked","open"],["class","galery-photo__actions",4,"ngIf"],[1,"galery-photo__actions"],["data-cy","galleryLikeButton",1,"galery-photo__action--button",3,"count","isInteractable","isLoading","like"],["class","galery-photo__action--button","data-cy","gallerySetAvatar",3,"icon","bclass","loading","onClick",4,"ngIf"],["class","galery-photo__action--button","data-cy","galleryDeletePhoto",3,"icon","bclass","loading","onClick",4,"ngIf"],["class","galery-photo__action--button","data-cy","galleryReportPhoto",3,"icon","loading","bclass","onClick",4,"ngIf"],["data-cy","gallerySetAvatar",1,"galery-photo__action--button",3,"icon","bclass","loading","onClick"],["data-cy","galleryDeletePhoto",1,"galery-photo__action--button",3,"icon","bclass","loading","onClick"],["data-cy","galleryReportPhoto",1,"galery-photo__action--button",3,"icon","loading","bclass","onClick"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"photo-component",1),Y("open",function(){return i.emitAction(i.EPhotoAction.Open)}),U(2,gFt,5,6,"div",2),m()()),2&e&&(l("ngClass",cn(6,_Ft,i.isPlaceholder,i.isLocked)),Hn("data-cy",i.url),d(),l("url",i.url)("isPlaceholder",i.isPlaceholder)("isLocked",i.isLocked),d(),l("ngIf",!i.isPlaceholder&&i.showActions))},dependencies:[Xe,Ne,ei,xL,GC],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.gallery-photo__container--single-photo-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:.8rem}.galery-photo__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.galery-photo__action--button[_ngcontent-%COMP%]{min-width:5rem;font-size:2rem;margin:0}@media only screen and (max-width: 768px){.galery-photo__action--button[_ngcontent-%COMP%]{font-size:1.8rem}}@media only screen and (max-width: 320px){.galery-photo__action--button[_ngcontent-%COMP%]{min-width:4rem}}"],changeDetection:0}),n})();var vFt=ve.EButtonModifier;function bFt(t,n){1&t&&(p(0,"div",6),B(1,"loader-image",7),m()),2&t&&(d(),l("delay",200)("transparentBG",!0))}function CFt(t,n){1&t&&(p(0,"div",8)(1,"p"),H(2),V(3,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,1,"LABEL.GALLERY")," "))}function yFt(t,n){if(1&t){const o=Ce();p(0,"div",12)(1,"div",13)(2,"add-button",14),Y("onClick",function(){return oe(o),re(_(2).emitOpenGallery())}),V(3,"translate"),m()()()}2&t&&(d(2),l("iconClass","gallery-preview__image--gallery-add-photo__icon")("title",$(3,2,"GALLERY.ADD_PHOTO")))}const SFt=t=>({"with-hover":t});function wFt(t,n){if(1&t){const o=Ce();p(0,"div",15)(1,"div",13)(2,"gallery-photo",16),Y("action",function(i){return oe(o),re(_(2).onPhotoAction(i))}),m()()()}if(2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(6,SFt,o.photo)),d(2),l("photo",o.photo)("showActions",!1)("isPlaceholder",!o.photo)("isLocked",e.permission&&!e.permission.isPermitted),Hn("data-cy","galleryPreviewPhoto"+(e.permission&&!e.permission.isPermitted?"Locked":"")+(o.photo?"":"Placeholder"))}}function TFt(t,n){if(1&t&&(p(0,"div",9),U(1,yFt,4,4,"div",10)(2,wFt,3,8,"div",11),m()),2&t){const o=_();d(),l("ngIf",o.isMyProfile),d(),l("ngForOf",o.elements)("ngForTrackBy",o.trackByFn)}}let awe=(()=>{var t;class n{constructor(e,i,r,s){this.maxPhotosCount=9,this.open=new ke,this.elements=[],this.buttonModifier=vFt,this.cdr=e,this.cdr.detach(),this.store=i,this.gallery=r,this.permissionsService=s}ngOnChanges(e){e.userId&&this.init(),this.permission=this.isMyProfile?void 0:this.permissionsService.getActionPermission(nt.EPermissionModule.Gallery,nt.EModuleAction.View)}init(){var e=this;return f(function*(){try{e.isLoading=!0,e.elements=Array.from({length:e.maxPhotosCount},(r,s)=>({photo:void 0})),e.cdr.detectChanges();const i=yield e.gallery.requestGallery(e.userId,e.maxPhotosCount);e.elements=Array.from({length:e.maxPhotosCount},(r,s)=>({photo:i[s]}))}catch(i){console.warn(i)}finally{e.isLoading=!1,e.cdr.detectChanges()}})()}onPhotoAction(e){e.actionType===Tv.Open&&this.emitOpenGallery({photoId:e.photo.id})}emitOpenGallery(e={}){this.open.emit(e)}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(I0),g(Pi))},t.\u0275cmp=pe({type:t,selectors:[["gallery-preview"]],inputs:{userId:"userId",isMyProfile:"isMyProfile",maxPhotosCount:"maxPhotosCount"},outputs:{open:"open"},features:[it],decls:8,vars:7,consts:[[1,"gallery-preview__wrapper"],["class","gallery-preview-loader-container",4,"ngIf"],["class","gallery-preview__container--title","data-cy","galleryPreviewTitle",4,"ngIf"],["class","gallery-preview__container--gallery-images",4,"ngIf"],[1,"view-gallery__container"],["data-cy","viewGalleryButton",1,"view-gallery__button",3,"buttonModifier","click"],[1,"gallery-preview-loader-container"],[3,"delay","transparentBG"],["data-cy","galleryPreviewTitle",1,"gallery-preview__container--title"],[1,"gallery-preview__container--gallery-images"],["class","gallery-preview__container--image","click-feedback","",4,"ngIf"],["class","gallery-preview__container--image",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["click-feedback","",1,"gallery-preview__container--image"],[1,"gallery-preview__container--inner-image"],["data-cy","galleryPlusButton",1,"gallery-preview__image--gallery-add-photo",3,"iconClass","title","onClick"],[1,"gallery-preview__container--image",3,"ngClass"],[3,"photo","showActions","isPlaceholder","isLocked","action"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,bFt,2,2,"div",1)(2,CFt,4,3,"div",2)(3,TFt,3,3,"div",3),p(4,"div",4)(5,"button-text",5),Y("click",function(){return i.emitOpenGallery()}),H(6),V(7,"translate"),m()()()),2&e&&(d(),l("ngIf",i.isLoading),d(),l("ngIf",!i.isLoading),d(),l("ngIf",!i.isLoading),d(2),l("buttonModifier",i.buttonModifier.BUTTON_VIEW_GALLERY),d(),ze(" ",$(7,5,"GALLERY.VIEW_GALLERY")," "))},dependencies:[Xe,Mt,Ne,pn,Oi,_v,po,BH,qe],styles:["[_nghost-%COMP%]{position:relative;width:100%}.gallery-preview__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden}.gallery-preview-loader-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.gallery-preview__container--title[_ngcontent-%COMP%]{width:100%;height:5rem}.gallery-preview__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;text-align:center;vertical-align:middle;font-size:2.4rem}@media screen and (max-height: 900px){.gallery-preview__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:100%}}.gallery-preview__container--gallery-images[_ngcontent-%COMP%]{width:100%;height:13.5rem;overflow:hidden;display:flex;flex-flow:row wrap;justify-content:space-around;align-items:center}@media screen and (max-height: 800px){.gallery-preview__container--gallery-images[_ngcontent-%COMP%]{height:11.5rem}}@media screen and (max-width: 440px){.gallery-preview__container--gallery-images[_ngcontent-%COMP%]{height:11.5rem}}@media screen and (max-width: 386px){.gallery-preview__container--gallery-images[_ngcontent-%COMP%]{height:10rem}}@media screen and (max-width: 320px){.gallery-preview__container--gallery-images[_ngcontent-%COMP%]{height:9rem}}.gallery-preview__container--inner-image[_ngcontent-%COMP%]{width:100%;height:100%}.gallery-preview__container--image[_ngcontent-%COMP%]{position:relative;width:11.5rem;height:11.5rem;overflow:hidden;border-radius:.8rem;display:block}@media only screen and (max-width: 768px){.gallery-preview__container--image[_ngcontent-%COMP%]{width:11.5rem;height:11.5rem}}@media screen and (max-height: 800px){.gallery-preview__container--image[_ngcontent-%COMP%]{height:9.5rem;width:9.5rem}}@media screen and (max-width: 440px){.gallery-preview__container--image[_ngcontent-%COMP%]{height:9.5rem;width:9.5rem}}@media only screen and (max-width: 386px){.gallery-preview__container--image[_ngcontent-%COMP%]{width:8.5rem;height:8.5rem}.gallery-preview__container--image[_ngcontent-%COMP%]   .gallery-preview__image--gallery-add-photo[_ngcontent-%COMP%]{font-size:4rem}}@media only screen and (max-width: 320px){.gallery-preview__container--image[_ngcontent-%COMP%]{width:7.5rem;height:7.5rem}}.view-gallery__container[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center}.view-gallery__container[_ngcontent-%COMP%]   .view-gallery__button[_ngcontent-%COMP%]{width:17rem}"],changeDetection:0}),n})();var PFt=wi.EActionPoint,nO=nt.EPermissionModule,iO=nt.EModuleAction;function IFt(t,n){1&t&&B(0,"div",12),2&t&&go("background-image","url("+_().profileBackgroundUrl+")")}function MFt(t,n){1&t&&B(0,"img",13),2&t&&l("src",_().bannerUrl,Wn)}function OFt(t,n){1&t&&B(0,"div",14)}function EFt(t,n){if(1&t){const o=Ce();p(0,"section",15)(1,"user-info",16),Y("avatarClicked",function(){return oe(o),re(_().avatarClickHandler())})("buttonClick",function(i){return oe(o),re(_().handleButtonClick(i))}),m()()}if(2&t){const o=_();d(),l("user",o.currentUser)("isMyProfile",o.isMyProfile)}}function xFt(t,n){if(1&t){const o=Ce();p(0,"section",17)(1,"profile-buttons",18),Y("buttonClick",function(i){return oe(o),re(_().handleButtonClick(i))}),m()()}if(2&t){const o=_();d(),l("user",o.currentUser)("canAddAsFriend",o.canAddAsFriend)("isMyProfile",o.isMyProfile)("canMerge",o.showMergeButton)("inviteButtonDisabled",o.disableInviteButton)}}function AFt(t,n){if(1&t&&(p(0,"section",19),B(1,"club-player-profile-info-smart",20),m()),2&t){const o=_();d(),l("myClubInfo",o.clubInfo.myClubInfo)("targetUserClubInfo",o.clubInfo.targetUserClubInfo)("myProfile",o.userProps.profile)("targetUserProfile",o.currentUser.profile)}}function RFt(t,n){if(1&t){const o=Ce();p(0,"section",21)(1,"gallery-preview",22),Y("open",function(i){return oe(o),re(_().goToGallery(i))}),m()()}if(2&t){const o=_();d(),l("userId",o.currentUserId)("isMyProfile",o.isMyProfile)}}function kFt(t,n){if(1&t&&(p(0,"section",23),B(1,"completed-challenges-list-preview",24),m()),2&t){const o=_();d(),l("userId",o.currentUserId)}}function LFt(t,n){1&t&&B(0,"loader-image",25),2&t&&l("delay",200)}const DFt=t=>({"profile__container--popup-outlet":t});let NH=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke,Ee,ot,ct,Pt){this.store=i,this.inventoryService=r,this.soundService=s,this.profileMainService=a,this.route=c,this.popup=u,this.toaster=h,this.giftsShopService=b,this.chatService=w,this.appService=R,this.accountMergeService=G,this.deltaDNAService=K,this.notificationsService=te,this.router=ee,this.navigation=le,this.playerContext=me,this.analyticsTrackingService=ge,this.gamesPlayClient=Me,this.constants=Ke,this.iapShop=Ee,this.offerService=ot,this.permissions=ct,this.brazeEngagementService=Pt,this.contextEnum=Wr,this.disableInviteButton=!1,this.activatedComponentRoute=e,this.userGallery=[],this.currentUserId=this.route.snapshot.params.id,this.friendsCount=0,this.showMoreOptions=!1,this.animationRunning=!1,this.withoutGiftsSection=!0,this.userProgress=0,this.cdnConfig=Lt.CONFIG.core.cdn,this.userProps=this.store.selectUserState()}ngOnInit(){this.showGallery=this.permissions.getActionPermission(nt.EPermissionModule.Gallery,nt.EModuleAction.View).isEnabled,this.showClubs=this.permissions.getModulePermission(nt.EPermissionModule.Clubs).isPermitted,this.init(),this.routerSubscription=this.route.params.subscribe(e=>{this.currentUserId!==e.id&&this.init()})}init(){var e,i,r;this.currentUser=this.profileMainService.getCurrentUserProfile(),this.currentUser&&this.currentUser.profile&&(this.currentUserId=this.currentUser.profile.id,this.showMoreOptions=!1,this.isMyProfileCheck(this.store.selectUserState().profile.id,this.currentUser.profile.id),this.mergeState=this.accountMergeService.mergeState().subscribe(()=>{this.showMergeButton=!0}),this.clubInfo={myClubInfo:this.store.clubs.selectClubsState().currentClub.clubState||this.store.clubs.selectCurrentJoinRequest()?{clubProfile:null===(e=this.store.clubs.selectClubsState().currentClub.clubState)||void 0===e?void 0:e.clubProfile,role:null===(i=this.store.clubs.selectClubsState().currentClub.clubState)||void 0===i?void 0:i.role,inventory:this.store.clubs.selectClubsState().currentClub.inventory,currentJoinRequest:this.store.clubs.selectCurrentJoinRequest(),joinRequestsCounter:this.store.clubs.selectClubsState().currentClub.pendingJoinRequests}:void 0,targetUserClubInfo:void 0},this.clubInfo.targetUserClubInfo=this.isMyProfile?this.clubInfo.myClubInfo:null===(r=this.currentUser.club)||void 0===r?void 0:r.userClubState)}ngOnDestroy(){this.mergeState&&this.mergeState.unsubscribe(),this.routerSubscription&&this.routerSubscription.unsubscribe(),this.notificationsSubscription&&this.notificationsSubscription.unsubscribe(),this.popup.hide(this.infoPopupId)}avatarClickHandler(){if(this.isMyProfile){if(!this.permissions.getActionPermission(nO.Profile,iO.Edit).contextRequirement.isFulfilled)return;this.navigation.navigate(["".concat(this.constants.defaultLoggedRoute,"/edit-profile")],{outletContext:this.activatedComponentRoute.outletContext})}else this.goToGallery()}handleButtonClick(e){this.isMyProfile?this.doMyProfileAction(e):this.doOtherProfileAction(e)}doMyProfileAction(e){switch(e){case Xi.Boosters:this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/profile/").concat(this.store.selectUserProfile().id,"/boosters")}}]);const i=new aa.DefaultEvent(Nn.Navigation,"shop:myProfile",{label:"profile:boosters"});this.analyticsTrackingService.sendEvent(i);break;case Xi.Chips:this.goToShop("currency");break;case Xi.Gems:this.goToShop("gems");break;case Xi.Vip:this.goToShop("vip");break;case Xi.Friends:this.goToFriends();break;case Xi.Blocked:this.goToBlocked();break;case Xi.MergeAccount:this.accoutMerge()}}doOtherProfileAction(e){const i=this.permissions.getActionPermission(nO.GiftablePacks,iO.View).isPermitted;switch(e){case Xi.Chips:i?this.goToDonateStore():this.goToShop("currency");break;case Xi.Gems:i?this.goToDonateStore():this.goToShop("gems");break;case Xi.Vip:i?this.goToDonateStore():this.goToShop("vip");break;case Xi.Like:this.addLike();break;case Xi.AddFriends:this.sendFriendRequest(this.currentUser.profile);break;case Xi.RemoveFriend:this.removeFriend(this.currentUser.profile.id,this.currentUser.profile.username.currentUsername);break;case Xi.Chat:this.privateChatOpen();break;case Xi.SendGifts:const r=[this.currentUser.profile];let s=O0.Profile;if(this.playerContext.getCurrent()===ba.InGame){const a=this.gamesPlayClient.currentPlayClient;if(a&&a.activeClientModel.currentRoom&&a.activeClientModel.currentRoom.currentTable){const c=a.activeClientModel.currentRoom.currentTable.getPlayers();c.find(u=>u.id===this.currentUserId)||(s=O0.OutsideProfile),c.filter(u=>u.id!==this.currentUserId&&u.id!==this.userProps.profile.id).forEach(u=>{r.push(new Lo({id:u.profile.id,avatar:u.profile.avatar,username:{currentUsername:u.profile.username,usernamesUsed:[]}}))})}this.navigation.navigate([{outlets:{[Fn]:null}}])}this.giftsShopService.openShopGifts({receiver:this.currentUser.profile,receivers:r,from:s,outletCtx:this.activatedComponentRoute.outletContext});break;case Xi.Block:this.blockUser()}}isMyProfileCheck(e,i){return this.isMyProfile=i===e,this.isMyProfile?(this.currentUser=this.store.selectUserProfile(),this.deltaDNAService.myProfileOpenedEngage(),this.brazeEngagementService.myProfileOpenedEngage(),this.setUserActivatedItems(this.currentUser),this.appService.isMobileApp()&&this.appService.getMobileAppService().messages().actionPoint({point:PFt.MyProfile}),!0):(this.deltaDNAService.otherProfileOpenedEngage(),this.brazeEngagementService.otherProfileOpenedEngage(),this.getDifferentUser(),!1)}getDifferentUser(){var e=this;return f(function*(){e.setUserActivatedItems(e.currentUser),e.pendingFriendRequest=!1;try{e.canAddAsFriend=yield e.checkCanAddAsFriend()}catch(i){e.canAddAsFriend=!1}})()}checkCanAddAsFriend(){var e=this;return f(function*(){if(e.currentUser.friendInfo&&e.currentUser.friendInfo.state===sA.NotExists)return Promise.resolve(!0);if(e.currentUser.friendInfo&&e.currentUser.friendInfo.state===sA.Accepted)return Promise.resolve(!1);try{e.inviteNotifications=yield e.notificationsService.getNotifications().pipe($u()).toPromise().then(i=>i.toArray().filter(r=>r.notificationType===rt.FriendRequestSent)),e.pendingInviteObject=void 0;try{e.pendingInviteObject=e.inviteNotifications.find(i=>i.senderProfile.id===e.currentUser.profile.id)}catch(i){console.log(i)}return e.pendingFriendRequest=!!e.pendingInviteObject,Promise.resolve(e.pendingFriendRequest)}catch(i){return console.error(i),Promise.reject(e.pendingFriendRequest)}})()}addLike(){if(!this.permissions.getActionPermission(nO.Profile,iO.Like).isPermitted)return this.toaster.warn("POPUP.DISABLED_FROM_CONFIG");this.profileMainService.addLike(this.currentUser.profile.id).then(i=>{this.toaster.success("POPUP.SUCCESS_PROFILE_LIKE"),this.currentUser.stats.likes++,this.currentUser={...this.currentUser},this.soundService.play(dn.Like)}).catch(i=>{console.log(i),this.toaster.warn("POPUP.ALREADY_LIKED_PROFILE")})}sendFriendRequest(e){var i=this;return f(function*(){const r=i.permissions.getActionPermission(nO.Friends,iO.Send);if(r.isPermitted){if(!i.disableInviteButton){i.disableInviteButton=!0,i.loaderOn=!0;try{yield i.profileMainService.sendFriendRequest(e),i.canAddAsFriend=!1}catch(s){console.log(s),i.canAddAsFriend=!0,i.toaster.error(s instanceof lt.TargetUserBlockedError?"API_ERRORS.TargetUserBlocked":s instanceof lt.SourceUserBlockedError?"API_ERRORS.SourceUserBlocked":"POPUP.ERROR_FRIEND_REQUEST")}i.loaderOn=!1}}else r.vipRequirement.isFulfilled?r.roleRequirement.isFulfilled||i.toaster.error("POPUP.DISABLED_FROM_CONFIG"):i.infoPopupId=i.offerService.offerVip({key:"FRIENDS.AddFriendVipRequired"})})()}removeFriend(e,i){var r=this;return f(function*(){var a;r.disableInviteButton||r.popup.confirm({textParams:{translationKey:r.currentUser.friendInfo.state===sA.Pending?"POPUP.FRIEND_REQUEST_REMOVE_QUESTION":"POPUP.FRIEND_REMOVE_QUESTION",params:[i]},buttons:{action:(a=f(function*(){r.loaderOn=!0;try{yield r.profileMainService.removeFriend(e),r.canAddAsFriend=!0,r.loaderOn=!1}catch(c){console.warn("FR REMOVE ERROR",c),r.toaster.error("ERRORS.SOMETHING_WRONG"),r.canAddAsFriend=!1,r.loaderOn=!1}}),function(){return a.apply(this,arguments)})}})})()}goToGallery(e={}){const i=e.photoId?["gallery",this.currentUserId,e.photoId]:["gallery",this.currentUserId];if(!this.isMyProfile){const r=this.permissions.getActionPermission(nt.EPermissionModule.Gallery,nt.EModuleAction.View);if(!r.isPermitted)return void(r.vipRequirement.isFulfilled?this.permissions.showFailedRequirementsToUser(r):this.infoPopupId=this.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE_GALLERY"}))}this.navigation.navigate([this.constants.defaultLoggedRoute,...i],{outletContext:this.activatedComponentRoute.outletContext})}goToBlocked(){this.navigation.navigate([this.constants.defaultLoggedRoute,"blocked"],{outletContext:this.activatedComponentRoute.outletContext})}goToShop(e){const i=new aa.DefaultEvent(Nn.Navigation,"shop:{0}",{label:{value:"{0}:".concat(e),args:{userId:this.currentUser.profile.id}},typeArgs:{userId:this.currentUser.profile.id}});this.analyticsTrackingService.sendEvent(i),this.isMyProfile?this.navigation.navigate([this.constants.defaultLoggedRoute,"shop",e],{outletContext:this.activatedComponentRoute.outletContext}):this.navigation.navigate([this.constants.defaultLoggedRoute,"shop",this.currentUser.profile.id,e],{outletContext:this.activatedComponentRoute.outletContext,state:{shopReceiver:{profile:this.currentUser.profile.toJson(),gameInventory:{items:[]}}}})}goToFriends(){this.navigation.navigate([this.constants.defaultLoggedRoute,"friends"],{outletContext:this.activatedComponentRoute.outletContext})}goToDonateStore(){const e=new aa.DefaultEvent(Nn.Navigation,"shop:{0}",{label:{value:"{0}:".concat(wt.GiftablePacks),args:{userId:this.currentUser.profile.id}},typeArgs:{userId:this.currentUser.profile.id}});this.analyticsTrackingService.sendEvent(e),this.iapShop.openShop({page:"giftable-packs",usageIntent:{type:ci.DonateItems},receiver:{profile:this.currentUser.profile,gameInventory:this.currentUser.profile.inventory}})}privateChatOpen(){this.chatService.openPrivateChat({userId:this.currentUser.profile.id});const e=new aa.DefaultEvent(Nn.Navigation,ds.EAnalyticsCategory.Private,{label:"other player profile"});this.analyticsTrackingService.sendEvent(e)}blockUser(){var i,e=this;this.infoPopupId=this.popup.confirm({buttons:{action:(i=f(function*(){e.profileMainService.block(e.currentUser.profile).then(()=>{e.navigation.navigate([{outlets:{popupOutlet:null}}]),e.toaster.success("POPUP.BLOCK_USER_SUCCESS")}).catch(r=>{e.toaster.error(r instanceof et.Permissions.LimitReached?"BLOCKED.BLOCK_LIST_FULL":"ERRORS.CONNECTION_ERROR")})}),function(){return i.apply(this,arguments)})},textParams:{translationKey:"POPUP.MUTE_OR_BLOCK"}})}accoutMerge(){this.accountMergeService.askForMerge()}showCompletedChallenges(){return this.permissions.getActionPermission(nO.Challenges,iO.Open).isPermitted}setUserActivatedItems(e){this.setFrameActivatedItem(e),this.setProfileBackgroundActivatedItem(e)}setFrameActivatedItem(e){this.activatedItem=this.getActivatedInventoryItem(e,Fe.TG.Frame),this.activatedItem?this.setProfileBannerURL():this.bannerUrl=null}setProfileBackgroundActivatedItem(e){this.profileBackgroundItem=this.getActivatedInventoryItem(e,Fe.TG.ProfileBackground),this.profileBackgroundItem&&(this.profileBackgroundUrl="".concat(Lt.CONFIG.core.cdn.url).concat(this.profileBackgroundItem.item.data.backgroundUrl))}getActivatedInventoryItem(e,i){let r;return r=this.inventoryService.getActiveItem(e.profile.inventory.items,i),r}setProfileBannerURL(){this.bannerUrl=this.activatedItem.item.data.profileHeaderUrl?"".concat(Lt.CONFIG.core.cdn.url).concat(this.activatedItem.item.data.profileHeaderUrl):null}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pr),g(J),g(cc),g(Mo),g(eO),g(Po),g(Cn),g(Dt),g(hf),g(El),g(Qt),g(Jb),g(sl),g(ja),g(on),g(Yt),g(ic),g(yi),g(oo),g(tn),g(Gh),g(Sc),g(Pi),g(cl))},t.\u0275cmp=pe({type:t,selectors:[["profile-main"]],features:[mn([{provide:nn,useFactory:o=>new nn("profile-main",o),deps:[[new jo,new zo,nn]]},yi,ia])],decls:12,vars:12,consts:[[1,"profile__container",3,"ngClass"],["class","profile_bg--image","data-cy","profileBackgroundContainer",3,"background-image",4,"ngIf"],[1,"profile__container--content"],[1,"user-info__container--banner"],["alt","banner img","data-cy","profileBanner",3,"src",4,"ngIf"],["class","cp__image--logo",4,"ngIf"],["class","profile__container--user-content",4,"ngIf"],["class","profile__container--buttons",4,"ngIf"],["class","profile__container--club",4,"ngIf"],["class","profile__container--images",4,"ngIf"],["class","profile__container--completed--challenges",4,"ngIf"],[3,"delay",4,"ngIf"],["data-cy","profileBackgroundContainer",1,"profile_bg--image"],["alt","banner img","data-cy","profileBanner",3,"src"],[1,"cp__image--logo"],[1,"profile__container--user-content"],[3,"user","isMyProfile","avatarClicked","buttonClick"],[1,"profile__container--buttons"],[3,"user","canAddAsFriend","isMyProfile","canMerge","inviteButtonDisabled","buttonClick"],[1,"profile__container--club"],[3,"myClubInfo","targetUserClubInfo","myProfile","targetUserProfile"],[1,"profile__container--images"],["id","profile-gallery-preview",1,"profile-main__gallery-preview-wrapper",3,"userId","isMyProfile","open"],[1,"profile__container--completed--challenges"],[3,"userId"],[3,"delay"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,IFt,1,2,"div",1),p(2,"div",2)(3,"div",3),U(4,MFt,1,1,"img",4)(5,OFt,1,0,"div",5),m(),U(6,EFt,2,2,"section",6)(7,xFt,2,5,"section",7)(8,AFt,2,4,"section",8)(9,RFt,2,2,"section",9)(10,kFt,2,1,"section",10)(11,LFt,1,1,"loader-image",11),m()()),2&e&&(l("ngClass",ne(10,DFt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(),l("ngIf",i.profileBackgroundUrl),d(3),l("ngIf",i.bannerUrl),d(),l("ngIf",!i.bannerUrl),d(),l("ngIf",i.currentUser),d(),l("ngIf",i.currentUser),d(),l("ngIf",i.showClubs&&i.clubInfo),d(),l("ngIf",i.showGallery&&i.currentUser),d(),l("ngIf",i.currentUser&&i.showCompletedChallenges()),d(),l("ngIf",i.loaderOn))},dependencies:[Xe,Ne,Oi,tj,LH,awe,nwe,rwe],styles:[".profile__container[_ngcontent-%COMP%]{display:block;width:100%;height:100%;position:relative}.user-info__container--banner[_ngcontent-%COMP%]{width:100%;min-height:7rem;display:flex;flex-flow:row;justify-content:center;align-items:center;z-index:1}.user-info__container--banner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:6rem}.user-info__container--banner[_ngcontent-%COMP%]   .cp__image--logo[_ngcontent-%COMP%]{height:6rem;width:100%}.profile__container--content[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;width:100%}.profile-main__gallery-preview-wrapper[_ngcontent-%COMP%]{height:24rem}@media screen and (max-height: 900px){.profile-main__gallery-preview-wrapper[_ngcontent-%COMP%]{height:24rem}}@media screen and (max-height: 800px){.profile-main__gallery-preview-wrapper[_ngcontent-%COMP%]{height:22rem}}@media screen and (max-width: 440px){.profile-main__gallery-preview-wrapper[_ngcontent-%COMP%]{height:21rem}}@media screen and (max-width: 386px){.profile-main__gallery-preview-wrapper[_ngcontent-%COMP%]{height:20rem}}@media screen and (max-width: 320px){.profile-main__gallery-preview-wrapper[_ngcontent-%COMP%]{height:19rem}}.profile__container--user-content[_ngcontent-%COMP%]{width:50%;order:1;padding:0 5%;max-height:35rem}@media only screen and (max-width: 980px){.profile__container--user-content[_ngcontent-%COMP%]{padding:2% 1%}}@media only screen and (max-width: 768px){.profile__container--user-content[_ngcontent-%COMP%]{width:100%;order:1;padding:2%}}@media only screen and (max-width: 480px){.profile__container--user-content[_ngcontent-%COMP%]{padding:0 5%}}.profile__container--buttons[_ngcontent-%COMP%]{width:50%;order:2;padding:0 2%;max-height:35rem}@media only screen and (max-width: 768px){.profile__container--buttons[_ngcontent-%COMP%]{width:100%;order:3}}.profile__container--images[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;width:100%;order:3;margin:1rem 0;padding:2%}@media only screen and (max-width: 768px){.profile__container--images[_ngcontent-%COMP%]{order:2}}.profile__container--popup-outlet[_ngcontent-%COMP%]   .profile__container--user-content[_ngcontent-%COMP%]{width:100%;order:1;padding:0 2%}@media only screen and (max-width: 480px){.profile__container--popup-outlet[_ngcontent-%COMP%]   .profile__container--user-content[_ngcontent-%COMP%]{padding:0 5%}}.profile__container--popup-outlet[_ngcontent-%COMP%]   .profile__container--buttons[_ngcontent-%COMP%]{width:100%;order:4}@media only screen and (max-width: 480px){.profile__container--popup-outlet[_ngcontent-%COMP%]   .profile__container--buttons[_ngcontent-%COMP%]{padding:0 2%}}@media screen and (max-height: 900px){.profile__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--banner[_ngcontent-%COMP%]{min-height:initial}.profile__container--popup-outlet[_ngcontent-%COMP%]   .user-info__container--banner[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:5rem}}.profile__container--club[_ngcontent-%COMP%]{width:100%;order:2;padding:2%}.profile__container--completed--challenges[_ngcontent-%COMP%]{width:100%;order:3;padding:2%}.profile__container--club--title[_ngcontent-%COMP%]{text-align:center;width:100%;height:4.5rem;line-height:1}@media screen and (max-height: 900px){.profile__container--club--title[_ngcontent-%COMP%]{height:3rem}.profile__container--club--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:100%}}"]}),n})();var tm=ve.EIcons,j2=nt.EPermissionModule,H2=nt.EModuleAction;const BFt=["scrollContainer"],q2=t=>({name:t});function NFt(t,n){if(1&t&&B(0,"button-icon",10),2&t){const o=_().$implicit,e=_(2);l("icon",ne(5,q2,o.icon))("bclass","profile__top-tabs__bclass"+(o.id===e.currTabId||o.id===e.initialTab?" top-tabs__selected":""))("icon",ne(7,q2,o.icon)),Hn("data-cy","profile"+o.id+"Button")("data-cy","profile"+o.id+"Button")}}function FFt(t,n){if(1&t&&B(0,"notification-button-icon",11),2&t){const o=_().$implicit,e=_(2);l("showNotificationBorder",!0)("buttonClass","profile__top-tabs__bclass__notification__button")("icon",ne(8,q2,e.challengesButtonIcon))("bclass","profile__top-tabs__bclass profile__top-tabs__bclass__notification "+(o.id===e.currTabId||o.id===e.initialTab?" top-tabs__selected":""))("iconClass","profile__dot--icon")("notificationClass","top-bar__dot")("isNotificationShown",e.completedChallengesCount&&e.completedChallengesCount>0)("notificationValue",e.completedChallengesCount)}}function UFt(t,n){if(1&t&&B(0,"notification-button-icon",12),2&t){const o=_().$implicit,e=_(2);l("showNotificationBorder",!0)("isNotificationShown",e.doesUserHaveGiftableItems)("icon",ne(8,q2,o.icon))("iconClass","profile__dot--icon")("notificationClass","top-bar__dot")("buttonClass","profile__top-tabs__bclass__notification__button")("bclass","profile__top-tabs__bclass profile__top-tabs__bclass__notification "+(o.id===e.currTabId||o.id===e.initialTab?" top-tabs__selected":""))("notificationValue","!")}}function GFt(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",6),Y("select",function(i){return oe(o),re(_(2).changeTab(i))}),U(1,NFt,1,9,"button-icon",7)(2,FFt,1,10,"notification-button-icon",8)(3,UFt,1,10,"notification-button-icon",9),m()}if(2&t){const o=n.$implicit,e=_(2);l("tabId",o.id)("tabClass","profile-top-tabs__tab"),d(),l("ngIf",o.id!==e.ETabId.ChallengesList&&o.id!==e.ETabId.GiftablePacks),d(),l("ngIf",o.id===e.ETabId.ChallengesList),d(),l("ngIf",o.id===e.ETabId.GiftablePacks)}}function VFt(t,n){if(1&t&&(p(0,"top-tabs",4),U(1,GFt,4,5,"top-tab-item",5),m()),2&t){const o=_();l("initialOpenedTab",o.initialTab)("scrollStyleCustomClass","profile__top-tabs__scroll")("scrollBarCustomClass","profile__top-tabs__scrollbar")("showBackButton",o.isNavigationVisible),d(),l("ngForOf",o.tabs)("ngForTrackBy",o.trackById)}}const zFt=t=>({"profile__wrapper--popup-outlet":t});let sp=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.router=e,this.store=i,this.route=r,this.gameHistoryService=s,this.profileMainService=a,this.activatedComponentRoute=c,this.app=u,this.permissions=h,this.inventory=b,this.destroyRef=w,this.cdr=R,this.shop=G,this.isNavigationVisible=!0,this.contextEnum=Wr,this.ETabId=n.ETabId,this.challengesButtonIcon=tm.CHALLENGES_PENDING,this.subscriptions=new ie.List,this.onNewCompletedChallenge=K=>{this.completedChallengesCount=K},this.onUndoneChallengesStateUpdate=K=>{this.hasUndoneChallenges=K,this.challengesButtonIcon=this.hasUndoneChallenges?tm.CHALLENGES_PENDING:tm.CHALLENGES},this.myUserId=i.selectUserState().profile.id}ngOnInit(){var e=this;this.buildTabs(),this.setInitialTab(this.route.children[0].routeConfig.path),this.route.params.subscribe(function(){var i=f(function*(r){e.userId!==r.id&&(e.userId=r.id,e.buildTabs(),e.setInitialTab(e.route.children[0].routeConfig.path))});return function(r){return i.apply(this,arguments)}}()),this.subscriptions.add(this.router.events.subscribe(i=>{i instanceof as&&this.setInitialTab(this.route.children[0].routeConfig.path)})),this.userId&&this.userId===this.myUserId&&(this.subscriptions.add(this.store.challenges.subscribeCompletedChallengesCount({challengeCategory:ra.General}).subscribe(this.onNewCompletedChallenge)),this.subscriptions.add(this.store.challenges.subscribeHasUndoneChallenges({challengeCategory:ra.General}).subscribe(this.onUndoneChallengesStateUpdate))),this.store.giftableItems.subscribeDoesTheUserHaveGiftableItem().pipe(mi(this.destroyRef)).subscribe(i=>{this.doesUserHaveGiftableItems=i,this.cdr.detectChanges()})}ngOnDestroy(){this.gameHistoryService.clearCache(),this.subscriptions.forEach(e=>e.unsubscribe())}changeTab(e){this.tabs.find(i=>i.id===e)&&(this.currTabId=e),this.router.navigate(["".concat(e)],{relativeTo:this.route,replaceUrl:!0})}changeTabViaSwipe(e){const i=this.tabs.findIndex(r=>r.id===this.initialTab);switch(e){case sa.Right:if(0===i){this.changeTab(this.tabs[this.tabs.length-1].id);break}this.changeTab(this.tabs[i-1].id);break;case sa.Left:if(i===this.tabs.length-1){this.changeTab(this.tabs[0].id);break}this.changeTab(this.tabs[i+1].id)}}trackById(e,i){return i.id}buildTabs(){const e=this.inventory,i=new ie.List,r=new ie.List,s=this.store.shop[this.shop.shopType].selectState().model.products;new ie.List(s).where(b=>!e.isInventoryType(b.item.type)||e.isInventoryCategoryInGeneralTabs(b.group)).forEach(b=>{const w=b.group;r.has(w)||r.add(w)}),r.concat(new ie.List(tH)),lye.forEach((b,w)=>{const R=r.find(G=>G===b);R&&i.insertAt(w,R)});const a=new ie.UniqueList(uye);a.findById(wt.Inventory).hidden=!s.find(b=>e.isInventoryType(b.item.type));const c=this.app.getPlatform(),u=this.app.getDevicePlatform(),h=i.where(b=>{const w=a.findById(b);return!w.hidden&&(!w.permissions||this.permissions.getActionPermission(j2.Shop,H2.PromoCodes).isPermitted)&&void 0!==w.visibleInProfile.find(R=>R===(this.userId===this.myUserId?hs.Own:hs.OtherPlayer))&&void 0!==w.visibleInPlatforms.find(R=>R===c)&&(w.id===wt.Inventory||-1===tH.indexOf(w.id))&&(!u||void 0!==w.visibleInDevicePlatforms.find(R=>R===u))}).map(b=>({id:b,icon:cye[b]||ve.EIcons.CHIP,highlighted:b===wt.Promo}));this.tabs=[{id:n.ETabId.ProfileMain,icon:tm.USER},{id:n.ETabId.UserStats,icon:tm.STATISTICS},{id:n.ETabId.GameHistory,icon:tm.CLUB}],this.permissions.getActionPermission(j2.GiftablePacks,H2.View).isPermitted&&this.tabs.push({id:n.ETabId.GiftablePacks,icon:tm.GIFTABLE_ITEMS}),this.userId&&this.userId!==this.myUserId&&(this.tabs=[{id:n.ETabId.ProfileMain,icon:tm.USER},{id:n.ETabId.UserStats,icon:tm.STATISTICS}],this.permissions.getActionPermission(j2.UserNotes,H2.View).isPermitted&&this.tabs.push({id:n.ETabId.PersonalNotes,icon:tm.PersonalNotes})),this.userId&&this.userId===this.myUserId&&this.permissions.getActionPermission(j2.Challenges,H2.Open).isPermitted&&this.tabs.push({id:n.ETabId.ChallengesList,icon:tm.CHALLENGES}),this.tabs=this.tabs.concat(h.toArray())}setInitialTab(e){this.scrollContainer&&(this.scrollContainer.nativeElement.scrollTop=0),e||(this.initialTab=this.tabs[0].id),e&&this.tabs.find(i=>i.id===e)&&(this.initialTab=e),this.currTabId=this.initialTab}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(J),g(Po),g(AH),g(eO),g(Pr),g(Qt),g(Ti),g(cc),g(br),g(Re),g(Ko))},t.\u0275cmp=pe({type:t,selectors:[["profile"]],viewQuery:function(e,i){if(1&e&&$e(BFt,5),2&e){let r;je(r=He())&&(i.scrollContainer=r.first)}},features:[mn([ia,{provide:Ko,useExisting:Z0}])],decls:5,vars:4,consts:[[1,"profile__wrapper",3,"ngClass"],["class","profile__top-tabs",3,"initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass","showBackButton",4,"ngIf"],["swipe-directive","",1,"profile__container--router-outlet",3,"swipeAction"],["scrollContainer",""],[1,"profile__top-tabs",3,"initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass","showBackButton"],[3,"tabId","tabClass","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"tabId","tabClass","select"],["class","profile-top-tabs__list-item--navigation",3,"icon","bclass",4,"ngIf"],["class","profile-top-tabs__list-item--navigation","data-cy","challengesTopBar",3,"showNotificationBorder","buttonClass","icon","bclass","iconClass","notificationClass","isNotificationShown","notificationValue",4,"ngIf"],["class","profile-top-tabs__list-item--navigation",3,"showNotificationBorder","isNotificationShown","icon","iconClass","notificationClass","buttonClass","bclass","notificationValue",4,"ngIf"],[1,"profile-top-tabs__list-item--navigation",3,"icon","bclass"],["data-cy","challengesTopBar",1,"profile-top-tabs__list-item--navigation",3,"showNotificationBorder","buttonClass","icon","bclass","iconClass","notificationClass","isNotificationShown","notificationValue"],[1,"profile-top-tabs__list-item--navigation",3,"showNotificationBorder","isNotificationShown","icon","iconClass","notificationClass","buttonClass","bclass","notificationValue"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,VFt,2,6,"top-tabs",1),p(2,"div",2,3),Y("swipeAction",function(s){return i.changeTabViaSwipe(s)}),B(4,"router-outlet"),m()()),2&e&&(l("ngClass",ne(2,zFt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(),l("ngIf",i.tabs))},dependencies:[Xe,Mt,Ne,kl,dl,ei,au,wu,Ip],styles:[".profile__wrapper[_ngcontent-%COMP%]{width:100%;min-width:30rem;height:100%;display:flex;flex-direction:column}"]}),n})();!function(t){let n;var e;let o;(e=n=t.EProfileErrorReason||(t.EProfileErrorReason={}))[e.TargetBlocked=0]="TargetBlocked",e[e.MyProfileBlocked=1]="MyProfileBlocked",e[e.ConnectionError=2]="ConnectionError",function(e){e.ProfileMain="profile-main",e.UserStats="user-stats",e.GameHistory="game-history",e.GiftablePacks="giftable-packs",e.PersonalNotes="personal-notes",e.ChallengesList="challenges-list"}(o=t.ETabId||(t.ETabId={}))}(sp||(sp={}));const X0=new Ot("IRankedGamesService"),FH=new Ot("IRankedGamesClientService");let cwe=(()=>{var t;class n{constructor(e){this.rankedGamesService=e}execute(e){return this.rankedGamesService.getSeasonInfo(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(X0))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),jFt=(()=>{var t;class n{constructor(e){this.rankedGamesService=e}execute(e){return this.rankedGamesService.getAllSeasonsStats(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(X0))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),lwe=(()=>{var t;class n{constructor(e){this.rankedGamesService=e}execute(e){return this.rankedGamesService.claimSeasonalReward(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(X0))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),uwe=(()=>{var t;class n{constructor(e){this.rankedGamesService=e}execute(e){return this.rankedGamesService.getPartialSeasonInfo(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(X0))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),dwe=(()=>{var t;class n{constructor(e){this.rankedGamesService=e}execute(){return this.rankedGamesService.getDefaultGameStats()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(X0))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Nl=function(t){return t.GetSeasonInfo="[Ranked Games] Get Season Info",t.GetSeasonInfoSuccess="[Ranked Games] Get Season Info Success",t.GetSeasonInfoError="[Ranked Games] Get Season Info Error",t.GetPartialSeasonInfo="[Ranked Games] Get Partial Season Info",t.GetPartialSeasonInfoSuccess="[Ranked Games] Get Partial Season Info Success",t.GetPartialSeasonInfoError="[Ranked Games] Get Partial Season Info Error",t.GetAllSeasonStats="[Ranked Games] Get All Season Stats",t.GetAllSeasonStatsSuccess="[Ranked Games] Get All Season Stats Success",t.GetAllSeasonStatsError="[Ranked Games] Get All Season Stats Error",t.ClaimSeasonalReward="[Ranked Games] Claim Seasonal Reward",t.ClaimSeasonalRewardSuccess="[Ranked Games] Claim Seasonal Reward Success",t.ClaimSeasonalRewardError="[Ranked Games] Claim Seasonal Reward Error",t.GetDefaultGameStats="[Ranked Games] Get Default Game Stats",t.GetDefaultGameStatsSuccess="[Ranked Games] Get Default Game Stats Success",t.GetDefaultGameStatsError="[Ranked Games] Get Default Game Stats Error",t.ResetRankedGamesState="[Ranked Games] Reset State",t}(Nl||{});const pwe=he(Nl.GetSeasonInfo,{_as:"props",_p:void 0}),hwe=he(Nl.GetSeasonInfoSuccess,{_as:"props",_p:void 0}),mwe=he(Nl.GetSeasonInfoError,{_as:"props",_p:void 0}),fwe=he(Nl.GetPartialSeasonInfo,{_as:"props",_p:void 0}),gwe=he(Nl.GetPartialSeasonInfoSuccess,{_as:"props",_p:void 0}),_we=he(Nl.GetPartialSeasonInfoError,{_as:"props",_p:void 0}),vwe=he(Nl.GetAllSeasonStats,{_as:"props",_p:void 0}),bwe=he(Nl.GetAllSeasonStatsSuccess,{_as:"props",_p:void 0}),Cwe=he(Nl.GetAllSeasonStatsError,{_as:"props",_p:void 0}),ywe=he(Nl.ClaimSeasonalReward,{_as:"props",_p:void 0}),Swe=he(Nl.ClaimSeasonalRewardSuccess,{_as:"props",_p:void 0}),wwe=he(Nl.ClaimSeasonalRewardError,{_as:"props",_p:void 0}),Twe=he(Nl.GetDefaultGameStats),Pwe=he(Nl.GetDefaultGameStatsSuccess,{_as:"props",_p:void 0}),Iwe=he(Nl.GetDefaultGameStatsError),HFt=he(Nl.ResetRankedGamesState);let qFt=(()=>{var t;class n{constructor(e,i){this.rankedGamesClientService=e,this.store=i}getPartialSeasonInfo(e){var i=this;return f(function*(){try{const r=i.store.rankedGames.selectPartialSeasonInfo({gameId:e});if(r)return Promise.resolve(r.season);i.store.dispatch(fwe({gameId:e}));const s=yield i.rankedGamesClientService.getPartialSeasonInfo(e);return i.store.dispatch(gwe({season:s,gameId:e})),s}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(_we({id:e,error:s})),s}})()}getAllSeasonsStats(e){var i=this;return f(function*(){try{i.store.dispatch(vwe({gameId:e}));const r=yield i.rankedGamesClientService.getAllSeasonsStats(e);return i.store.dispatch(bwe({gameId:e,stats:r})),r}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(Cwe({id:e,error:s})),s}})()}getSeasonInfo(e){var i=this;return f(function*(){try{i.store.dispatch(pwe({gameId:e}));const r=yield i.rankedGamesClientService.getSeasonInfo(e);return r.leaderboard.records=r.leaderboard.records.filter(s=>!!s.profile),i.store.dispatch(hwe({season:r,gameId:e})),r}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(mwe({id:e,error:s})),s}})()}claimSeasonalReward(e){var i=this;return f(function*(){try{i.store.dispatch(ywe({gameId:e}));const r=yield i.rankedGamesClientService.claimSeasonalReward(e);return i.store.dispatch(Swe({reward:r,gameId:e})),r}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(wwe({id:e,error:s})),s}})()}getDefaultGameStats(){var e=this;return f(function*(){try{e.store.dispatch(Twe());const i=yield e.rankedGamesClientService.getDefaultGameStats();return e.store.dispatch(Pwe({stats:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(Iwe()),r}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(FH),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),WFt=(()=>{var t;class n{constructor(e){this.http=e}getPartialSeasonInfo(e){return this.http.get("users/seasons/ranked/".concat(e)).toPromise().then(i=>i.body)}getAllSeasonsStats(e){return this.http.get("users/seasons/ranked/".concat(e,"/stats/all")).toPromise().then(i=>i.body)}getSeasonInfo(e){return this.http.get("users/seasons/ranked/".concat(e,"/stats")).toPromise().then(i=>i.body)}claimSeasonalReward(e){return this.http.post("users/seasons/ranked/".concat(e,"/claim")).toPromise().then(i=>i.body)}getDefaultGameStats(){return this.http.get("users/seasons/ranked/stats/default").toPromise().then(e=>e.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const $Ft=()=>new qFt(mt(FH),mt(J)),KFt=()=>new WFt(mt(En)),Mwe="rankedGames";var Nr=function(t){return t[t.BeforeStart=0]="BeforeStart",t[t.InActive=1]="InActive",t[t.Active=2]="Active",t[t.BeforeEnd=3]="BeforeEnd",t[t.Ended=4]="Ended",t}(Nr||{});class Dg{constructor(n,o){this.partialModelLoadingState={isLoaded:!1,isLoading:!1},this.loadingState={isLoaded:!1,isLoading:!1},this.actions=Dg.createActions(),this.gameId=n,this.season=o}toJson(){return{gameId:this.gameId,partialModelLoadingState:this.partialModelLoadingState,loadingState:this.loadingState,season:this.season,actions:this.actions}}static createActions(){return{claimSeasonalReward:{inProgress:!1,error:null}}}static getSessionInfo(n,o){var e;let i=1e3*(n.endDate-o);if(o<n.startDate)return{timeMs:1e3*(n.startDate-o),timeToEndMs:i,sessionState:Nr.BeforeStart};if(null!==(e=n.activeHours)&&void 0!==e&&e.length){const r=this.getActiveSessions(n,o);if(r.length){const s={from:r[0].from,to:Math.min(r[0].to,n.endDate)},a=o<s.from?s.from:s.to,c=s.to===n.endDate||1===r.length;return i=c?1e3*(s.to-o):i,o<s.from?{timeMs:1e3*(a-o),timeToEndMs:i,sessionState:Nr.InActive}:{timeMs:1e3*(a-o),timeToEndMs:i,sessionState:c?Nr.BeforeEnd:Nr.Active}}return{timeMs:0,timeToEndMs:i,sessionState:Nr.Ended}}return o<n.endDate?{timeMs:i,timeToEndMs:i,sessionState:Nr.BeforeEnd}:{timeMs:0,timeToEndMs:i,sessionState:Nr.Ended}}static getActiveSessions(n,o){return n.activeHours.filter(e=>e.from<n.endDate).filter(e=>o<Math.min(e.to,n.endDate))}}const nm=ki({selectId:t=>t.gameId,sortComparer:!1}),oO=ki({selectId:t=>t.gameId,sortComparer:!1}),Owe={currentSeasons:nm.getInitialState(),stats:oO.getInitialState(),defaultGameStats:{loadingState:{isLoading:!1,isLoaded:!1,error:null},stats:null}},ZFt=Sr(Owe,de(HFt,()=>Owe),de(vwe,(t,n)=>{var o;const e=t.stats.entities[n.gameId];return{...t,stats:oO.upsertOne({gameId:n.gameId,stats:null!==(o=null==e?void 0:e.stats)&&void 0!==o?o:[],loadingState:{isLoading:!0,isLoaded:!1,error:null}},t.stats)}}),de(bwe,(t,n)=>({...t,stats:oO.updateOne({id:n.gameId,changes:{stats:n.stats,loadingState:{isLoading:!1,isLoaded:!0,error:null}}},t.stats)})),de(Cwe,(t,n)=>{const o=t.stats.entities[n.id];return o?{...t,stats:oO.updateOne({id:n.id,changes:{loadingState:{...o.loadingState,isLoading:!1,error:n.error}}},t.stats)}:t}),de(fwe,(t,n)=>{var o,e;const i=t.currentSeasons.entities[n.gameId];return{...t,currentSeasons:nm.upsertOne({season:null==i?void 0:i.season,gameId:n.gameId,actions:null!==(o=null==i?void 0:i.actions)&&void 0!==o?o:Dg.createActions(),partialModelLoadingState:{isLoading:!0,isLoaded:!1,error:null},loadingState:null!==(e=null==i?void 0:i.loadingState)&&void 0!==e?e:{isLoading:!1,isLoaded:!1,error:null}},t.currentSeasons)}}),de(gwe,(t,n)=>{const o=t.currentSeasons.entities[n.gameId];return{...t,currentSeasons:nm.updateOne({id:n.gameId,changes:{season:{...o.season,startDate:n.season.startDate,endDate:n.season.endDate,backgroundUrl:n.season.backgroundUrl,backgroundCdnUrl:n.season.backgroundCdnUrl,description:n.season.description,name:n.season.name,seasonId:n.season.seasonId,poolId:n.season.poolId},partialModelLoadingState:{isLoading:!1,isLoaded:!0,error:null}}},t.currentSeasons)}}),de(_we,(t,n)=>{const o=t.currentSeasons.entities[n.id];return o?{...t,currentSeasons:nm.updateOne({id:n.id,changes:{partialModelLoadingState:{...o.partialModelLoadingState,isLoading:!1,error:n.error}}},t.currentSeasons)}:t}),de(pwe,(t,n)=>{var o;const e=t.currentSeasons.entities[n.gameId];return{...t,currentSeasons:nm.upsertOne({season:null==e?void 0:e.season,gameId:n.gameId,actions:null!==(o=null==e?void 0:e.actions)&&void 0!==o?o:Dg.createActions(),partialModelLoadingState:{isLoading:!0,isLoaded:!1,error:null},loadingState:{isLoading:!0,isLoaded:!1,error:null}},t.currentSeasons)}}),de(hwe,(t,n)=>({...t,currentSeasons:nm.updateOne({id:n.gameId,changes:{season:n.season,partialModelLoadingState:{isLoading:!1,isLoaded:!0,error:null},loadingState:{isLoading:!1,isLoaded:!0,error:null}}},t.currentSeasons)})),de(mwe,(t,n)=>{const o=t.currentSeasons.entities[n.id];return o?{...t,currentSeasons:nm.updateOne({id:n.id,changes:{partialModelLoadingState:{...o.partialModelLoadingState,isLoading:!1,error:n.error},loadingState:{...o.loadingState,isLoading:!1,error:n.error}}},t.currentSeasons)}:t}),de(ywe,(t,n)=>{const o=t.currentSeasons.entities[n.gameId];if(!o)return t;const e=Se({...o},i=>{i.actions.claimSeasonalReward.inProgress=!0});return{...t,currentSeasons:nm.updateOne({id:n.gameId,changes:e},t.currentSeasons)}}),de(Swe,(t,n)=>{const o=t.currentSeasons.entities[n.gameId];if(!o)return t;const e=Se({...o},i=>{i.actions.claimSeasonalReward.inProgress=!1,i.season.rewards.filter(r=>!!n.reward.items.find(s=>s.id===r.item.id)).forEach(r=>{r.claimed=!0})});return{...t,currentSeasons:nm.updateOne({id:o.gameId,changes:e},t.currentSeasons)}}),de(wwe,(t,n)=>{const o=t.currentSeasons.entities[n.id];if(!o)return t;const e=Se({...o},i=>{i.actions.claimSeasonalReward.inProgress=!1,i.actions.claimSeasonalReward.error=n.error});return{...t,currentSeasons:nm.updateOne({id:n.id,changes:e},t.currentSeasons)}}),de(Twe,t=>({...t,defaultGameStats:{...t.defaultGameStats,loadingState:{...t.defaultGameStats.loadingState,isLoading:!0}}})),de(Pwe,(t,n)=>({...t,defaultGameStats:{...t.defaultGameStats,loadingState:{isLoading:!1,isLoaded:!0,error:null},stats:n.stats}})),de(Iwe,t=>({...t,defaultGameStats:{...t.defaultGameStats,loadingState:{...t.defaultGameStats.loadingState,isLoading:!1}}})));function QFt(t,n){return ZFt(t,n)}const W2=Ts(Mwe),YFt=We(W2,t=>t.currentSeasons),JFt=We(W2,t=>t.stats),Ewe=nm.getSelectors(YFt),XFt=oO.getSelectors(JFt),xwe=()=>We(Ewe.selectEntities,(t,n)=>t[n.gameId]),Awe=()=>We(XFt.selectEntities,(t,n)=>t[n.gameId]),Rwe=()=>We(W2,(t,n)=>t.currentSeasons.entities[n.gameId].season.rewards),kwe=()=>We(Ewe.selectEntities,(t,n)=>t[n.gameId]),Lwe=We(W2,t=>t.defaultGameStats);J.prototype.rankedGames={selectSeasonInfo:function e3t(t){return this.selectSync(xwe(),t)}.bind(J.prototype),subcribeSeasonInfo:function t3t(t){return this.select(xwe(),t)}.bind(J.prototype),selectAllTimeStats:function n3t(t){return this.selectSync(Awe(),t)}.bind(J.prototype),subcribeAllTimeStats:function i3t(t){return this.select(Awe(),t)}.bind(J.prototype),selectSeasonRewards:function o3t(t){return this.selectSync(Rwe(),t)}.bind(J.prototype),subcribeSeasonRewards:function r3t(t){return this.select(Rwe(),t)}.bind(J.prototype),selectPartialSeasonInfo:function s3t(t){return this.selectSync(kwe(),t)}.bind(J.prototype),subcribePartialSeasonInfo:function a3t(t){return this.select(kwe(),t)}.bind(J.prototype),selectDefaultGameStats:function c3t(){return this.selectSync(Lwe)}.bind(J.prototype),subcribeDefaultGameStats:function l3t(){return this.select(Lwe)}.bind(J.prototype)};let u3t=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[cwe,jFt,lwe,uwe,dwe,{provide:X0,useFactory:$Ft},{provide:FH,useFactory:KFt}],imports:[$r.forFeature(Mwe,QFt)]}),n})();var d3t=lt.SourceUserBlockedError,p3t=lt.TargetUserBlockedError,Dwe=lt.NetworkError,h3t=nt.EPermissionModule,m3t=nt.EModuleAction;let $2=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){var K=this;this.shop=u,this.getDefaultGameStatsUsecase=G,this.fetchUser=function(){var te=f(function*(ee){ee===K.store.selectSimpleProfile().id&&K.store.selectUserProfile()&&K.getDefaultGameStatsUsecase.execute().catch(le=>console.error(le));try{const le=yield K.profileMainService.getUserProfile(ee);return K.userStats.setUser(le),le}catch(le){throw le}});return function(ee){return te.apply(this,arguments)}}(),this.handleUserFetch=function(){var te=f(function*(ee){const le=ee.params.id;try{yield K.fetchUser(le||K.store.selectUserState().profile.id)}catch(me){throw console.error(me),K.onProfileFetchError(me,le),me}});return function(ee){return te.apply(this,arguments)}}(),this.onProfileFetchError=function(){var te=f(function*(ee,le){let ge,me=jt.createErrorInstance(ee);if(ee&&ee.error)if(me instanceof d3t||me instanceof p3t)try{if((yield K.userBlock.getBlockList()).blocked.find(Ee=>Ee.profile.id===le))ge=sp.EProfileErrorReason.TargetBlocked;else{ge=sp.EProfileErrorReason.MyProfileBlocked;const Ee=(yield K.userRepoService.getSimpleProfiles([le]))[0];K.profileMainService.blockBack(Ee)}}catch(Me){Me instanceof Dwe?ge=sp.EProfileErrorReason.ConnectionError:console.log(Me),K.navigation.navigate([K.constants.defaultLoggedRoute])}else ee instanceof Dwe&&(ge=sp.EProfileErrorReason.ConnectionError,K.navigation.navigate([K.constants.defaultLoggedRoute]));else ge=sp.EProfileErrorReason.ConnectionError,K.navigation.navigate([K.constants.defaultLoggedRoute]),console.log(ee);K.showErrorToaster(ge)});return function(ee,le){return te.apply(this,arguments)}}(),this.loader=b,this.permissionsService=h,this.userBlock=c,this.navigation=a,this.toaster=s,this.userRepoService=r,this.userStats=i,this.profileMainService=e,this.store=w,this.constants=R}canActivate(e,i){var r=this;return f(function*(){const s=r.permissionsService.getActionPermission(h3t.Profile,m3t.Open);let a=!1;if(s.isPermitted){if(!e.params.id)return r.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(r.constants.defaultLoggedRoute,"/profile/").concat(r.store.selectUserState().profile.id)}}]),!1;if("my"===e.params.id){let c="";const u=r.navigation.getCurrentNavigation().extractedUrl;return u.root.children[Fn]?u.root.children[Fn].segments.slice(1).forEach(h=>{const b="my"===h.path?r.store.selectSimpleProfile().id:h.path;c+="/".concat(b)}):u.root.children.primary.segments.forEach(h=>{const b="my"===h.path?r.store.selectSimpleProfile().id:h.path;c+="/".concat(b)}),r.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(c)}}],{queryParams:u.queryParams}),!0}try{return r.showLoader(300),yield Promise.all([r.handleUserFetch(e),r.shop.load()]),r.shop.shopReceiver={profile:r.store.selectUserState().profile,gameInventory:r.store.selectUserState().gameInventory},a=!0,!0}catch(c){console.error(c)}finally{r.hideLoader()}}return r.navigation.isFirstNavigation(r.navigation.getCurrentNavigation().previousNavigation)?r.navigation.parseUrl(r.constants.defaultLoggedRoute):s.isPermitted&&a})()}getErrorText(e){switch(e){case sp.EProfileErrorReason.MyProfileBlocked:return"API_ERRORS.SourceUserBlocked";case sp.EProfileErrorReason.TargetBlocked:return"API_ERRORS.TargetUserBlocked";default:return"ERRORS.CONNECTION_ERROR"}}showErrorToaster(e){this.toaster.error(this.getErrorText(e))}showLoader(e){if(void 0!==e)return this.loaderDelayId&&(clearTimeout(this.loaderDelayId),this.loaderDelayId=void 0),void(this.loaderDelayId=setTimeout(()=>{this.loader.on()},e));this.loader.on()}hideLoader(){this.loaderDelayId&&clearTimeout(this.loaderDelayId),this.loader.off()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(eO),T(XM),T(ed),T(Dt),T(Yt),T(n0),T(Ko),T(Ti),T(ro),T(J),T(tn),T(dwe))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Qp=(()=>{var t;class n{constructor(e,i){this.config=e,this.permissions=i}static createLocationOptions(e,i=!1){const r=[];return i&&r.push({value:void 0,text:{key:"CLUBS.ANY_LOCATION"}}),r.concat(...e.map(s=>({value:s,text:{key:"CLUBS.LOCATIONS.".concat(s)}})))}static createPrivacyOptions(e=!1){const i=[];e&&i.push({value:void 0,text:{key:"CLUBS.ANY_PRIVACY"}});const r=Ys.getNames(Or);for(let s of r)i.push({value:Or[s],text:{key:"CLUBS.".concat(Ys.parse(Or,Or[s]).toUpperCase(),"_PRIVACY_LEVEL")}});return i}static createMinLevelOptions(e,i,r=!1){const s=[],a=0!==e&&1!==e;(!a||r)&&s.push({value:null}),a||(e=i);for(let c=0,u=e+c*i;u<=99;c++,u=e+c*i)s.push({value:u});return s}static createTagOptions(e=!1){const i=[];e&&i.push({value:void 0,label:"CLUBS.ANY_TAG",text:{key:"CLUBS.ANY_TAG"}});const r=Ys.getNames(vh);for(let s of r)i.push({value:vh[s],label:"CLUBS.CLUB_TAG_".concat(Ys.parse(vh,vh[s]).toUpperCase()),text:{key:"CLUBS.CLUB_TAG_".concat(Ys.parse(vh,vh[s]).toUpperCase())}});return i}createMinLevelOptions(e=Or.Public,i=!1){const r=this.permissions.getModuleActionConfig(pv.clubPrivacyToPermissionModule(e),nt.EModuleAction.SendClubJoinRequest);return n.createMinLevelOptions(Math.max(this.config.content.clubs.defaultSettings.requirements.minLevel,r.requirements.level),this.config.content.clubs.minLevelStep,i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dr),T(Ti))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),rO=(()=>{var t;class n{constructor(e,i){this.filter=new ke,this.reset=new ke,this.fields=[],this.cdr=e,this.clubsConfig=i.content.clubs}ngOnInit(){this.fields=this.createForm(),this.cdr.detach(),this.cdr.detectChanges()}emitSelection(e){this.filter.emit({location:e.find(i=>i.id===n.EFieldId.Location).value,minLevel:e.find(i=>i.id===n.EFieldId.MinLevelRequirement).value,hideFull:e.find(i=>i.id===n.EFieldId.AvailableSlots).value,withFriends:e.find(i=>i.id===n.EFieldId.ClubsWithFriends).value,privacy:e.find(i=>i.id===n.EFieldId.Privacy).value,tag:e.find(i=>i.id===n.EFieldId.Tag).value})}resetClubFilters(){this.reset.emit()}createForm(){return[{id:n.EFieldId.Location,type:Si.FieldType.Dropdown,format:Si.EFormat.Text,label:"CLUBS.LOCATION",options:Qp.createLocationOptions(this.clubsConfig.locations,!0)},{id:n.EFieldId.MinLevelRequirement,type:Si.FieldType.Picker,format:Si.EFormat.Number,label:"CLUBS.MIN_LEVEL",options:Qp.createMinLevelOptions(this.clubsConfig.defaultSettings.requirements.minLevel,this.clubsConfig.minLevelStep)},{id:n.EFieldId.Privacy,type:Si.FieldType.Dropdown,format:Si.EFormat.LocalizedText,label:"CLUBS.PRIVACY_LEVEL",options:Qp.createPrivacyOptions(!0)},{id:n.EFieldId.Tag,type:Si.FieldType.Picker,format:Si.EFormat.LocalizedText,label:"CLUBS.CLUB_TAG",options:Qp.createTagOptions(!0)},{id:n.EFieldId.AvailableSlots,type:Si.FieldType.Toggle,format:Si.EFormat.Boolean,label:"CLUBS.AVAILABLE_SLOTS",options:[{value:!0},{value:!1}],defaultValue:{id:n.EFieldId.AvailableSlots,value:!1}},{id:n.EFieldId.ClubsWithFriends,type:Si.FieldType.Toggle,format:Si.EFormat.Boolean,label:"CLUBS.CLUBS_WITH_FRIENDS",options:[{value:!0},{value:!1}],defaultValue:{id:n.EFieldId.ClubsWithFriends,value:!1}}]}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Dr))},t.\u0275cmp=pe({type:t,selectors:[["clubs-filter"]],outputs:{filter:"filter",reset:"reset"},decls:1,vars:1,consts:[[3,"fields","filter","reset"]],template:function(e,i){1&e&&(p(0,"filter",0),Y("filter",function(s){return i.emitSelection(s)})("reset",function(){return i.resetClubFilters()}),m()),2&e&&l("fields",i.fields)},dependencies:[hM],encapsulation:2,changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EFieldId||(t.EFieldId={})).Location="location",o.AvailableSlots="availableSlots",o.MinLevelRequirement="minLevelRequirement",o.Privacy="privacy",o.ClubsWithFriends="clubsWithFriends",o.Tag="clubTag"}(rO||(rO={}));let UH=(()=>{var t;class n{get inlineStyled(){return this.inlineStyleFlag}constructor(e,i){this.inlineStyleFlag=!1,this.EIcons=ve.EIcons,this.cdr=e,this.urlService=i,this.cdr.detach()}ngOnChanges(e){this.flagUrl=this.urlService.createCdnPath({prefix:"clubsLocations",url:"".concat(this.location,".svg")}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["club-location"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("inline-style",i.inlineStyled)},inputs:{inlineStyleFlag:"inlineStyleFlag",location:"location"},features:[it],decls:2,vars:1,consts:[[1,"club--info--footer__location"],[1,"club--info--footer__location--flag",3,"src"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"img",1),m()),2&e&&(d(),l("src",i.flagUrl,Wn))},styles:[".club--info--footer__location[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.club--info--footer__location[_ngcontent-%COMP%]:not(.inline-style){flex-flow:column nowrap}.club--info--footer__location[_ngcontent-%COMP%]:not(.inline-style)   .club--info--footer__location-icon[_ngcontent-%COMP%]{font-size:2em!important;margin-bottom:.5rem}.club--info--footer__location--flag[_ngcontent-%COMP%]{height:5em}"],changeDetection:0}),n})();function f3t(t,n){1&t&&B(0,"icon-component",1),2&t&&l("icon",_().icon)}let GH=(()=>{var t;class n{constructor(e){this.showIcon=!0,this.showDescription=!1,this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.updatePrivacyLabel(),this.cdr.detectChanges()}updatePrivacyLabel(){switch(this.privacyLabel={key:"CLUBS.".concat(Ys.parse(Or,this.clubPrivacy).toUpperCase(),this.showDescription?"_PRIVACY_LEVEL_DESCRIPTION":"_PRIVACY_LEVEL")},this.clubPrivacy){case Or.Public:this.icon=ve.EIcons.PUBLIC_CLUB;break;case Or.Private:this.icon=ve.EIcons.PRIVATE_CLUB;break;case Or.Closed:this.icon=ve.EIcons.CLOSED_CLUB}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-privacy-tag"]],inputs:{clubPrivacy:"clubPrivacy",showIcon:"showIcon",showDescription:"showDescription"},features:[it],decls:4,vars:4,consts:[["class","club-privacy-tag__icon",3,"icon",4,"ngIf"],[1,"club-privacy-tag__icon",3,"icon"]],template:function(e,i){1&e&&(U(0,f3t,1,1,"icon-component",0),p(1,"p"),H(2),V(3,"translate"),m()),2&e&&(l("ngIf",i.showIcon),d(2),se($(3,2,i.privacyLabel.key)))},dependencies:[Ne,Dn,qe],styles:["[_nghost-%COMP%]{display:flex;flex-flow:row wrap;align-items:center}[_nghost-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.2em}[_nghost-%COMP%]   .club-privacy-tag__icon[_ngcontent-%COMP%]{font-size:1.4em}.club-privacy-tag__icon[_ngcontent-%COMP%]{margin:0 .5rem}"],changeDetection:0}),n})();function g3t(t,n){1&t&&B(0,"icon-component",1),2&t&&l("icon",_().icon)}let VH=(()=>{var t;class n{constructor(e){this.showIcon=!0,this.showDescription=!1,this.cdr=e,e.detach()}ngOnChanges(e){if(e.tag){switch(this.text={key:this.showDescription?"CLUBS.CLUB_TAG_".concat(Ys.parse(vh,e.tag.currentValue).toUpperCase(),"_DESCRIPTION"):"CLUBS.CLUB_TAG_".concat(Ys.parse(vh,e.tag.currentValue).toUpperCase())},this.tag){case vh.Fighting:this.icon=ve.EIcons.FIGHT_CLUB;break;case vh.Social:this.icon=ve.EIcons.SOCIAL_CLUB}this.cdr.detectChanges()}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-tag"]],inputs:{tag:"tag",showIcon:"showIcon",showDescription:"showDescription"},features:[it],decls:4,vars:4,consts:[["class","club-tag__icon",3,"icon",4,"ngIf"],[1,"club-tag__icon",3,"icon"]],template:function(e,i){1&e&&(U(0,g3t,1,1,"icon-component",0),p(1,"p"),H(2),V(3,"translate"),m()),2&e&&(l("ngIf",i.showIcon),d(2),se($(3,2,i.text.key)))},dependencies:[Ne,Dn,qe],styles:["[_nghost-%COMP%]{display:flex;flex-flow:row wrap;align-items:center}[_nghost-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.2em}[_nghost-%COMP%]   .club-tag__icon[_ngcontent-%COMP%]{font-size:1.6em}.club-tag__icon[_ngcontent-%COMP%]{margin:0 .5rem}"],changeDetection:0}),n})();function _3t(t,n){if(1&t&&(p(0,"div",10),B(1,"club-privacy-tag",11),m()),2&t){const o=_();l("tooltipTemplate",Kt(9)),d(),l("clubPrivacy",o.clubProfile.settings.privacy)}}function v3t(t,n){if(1&t&&(p(0,"div",10),B(1,"club-tag",12),m()),2&t){const o=_();l("tooltipTemplate",Kt(11)),d(),l("tag",o.clubProfile.tag)}}function b3t(t,n){1&t&&B(0,"club-location",15),2&t&&l("location",_(2).clubProfile.location)}function C3t(t,n){if(1&t&&(p(0,"div",13),U(1,b3t,1,1,"club-location",14),m()),2&t){const o=_();l("tooltipTemplate",Kt(13)),d(),l("ngIf",o.showInfo.location&&o.clubProfile.location)}}function y3t(t,n){if(1&t&&(p(0,"div",13)(1,"div",16),B(2,"icon-component",17),p(3,"div"),B(4,"number",18),H(5," / "),B(6,"number",18),m()()()),2&t){const o=_();l("tooltipTemplate",Kt(15)),d(2),l("icon",o.EIcons.CLUB_MEMBERS),d(2),l("value",o.membersCount),d(2),l("value",o.clubProfile.settings.memberLimit)}}const S3t=t=>[t];function w3t(t,n){if(1&t&&(p(0,"div",13)(1,"div",19),B(2,"icon-component",20),p(3,"p",21),H(4),V(5,"translate"),m()()()),2&t){const o=_();l("tooltipTemplate",Kt(19)),d(),Uo("club--info--footer__friends-link",o.memberFriends.length),d(),l("icon",o.EIcons.USERS),d(2),ze(" ",yt(5,5,"CLUBS.FRIENDS",ne(8,S3t,o.memberFriends.length))," ")}}function T3t(t,n){if(1&t&&(p(0,"div",13)(1,"div",22),B(2,"icon-component",20),p(3,"p",21),H(4),m()()()),2&t){const o=_();l("tooltipTemplate",Kt(17)),d(2),l("icon",o.EIcons.STAR_HOLLOW),d(2),ze(" ",o.clubProfile.settings.requirements.minLevel,"+ ")}}function P3t(t,n){1&t&&B(0,"club-privacy-tag",23),2&t&&l("clubPrivacy",_().clubProfile.settings.privacy)("showIcon",!1)("showDescription",!0)}function I3t(t,n){1&t&&B(0,"club-tag",24),2&t&&l("tag",_().clubProfile.tag)("showIcon",!1)("showDescription",!0)}function M3t(t,n){if(1&t&&(p(0,"p",25),H(1),V(2,"translate"),m()),2&t){const o=_();go("text-transform","capitalize"),d(),se($(2,3,"CLUBS.LOCATIONS."+o.clubProfile.location))}}function O3t(t,n){1&t&&(p(0,"p",25),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CLUBS.MEMBERS_COUNT_DESCRIPTION")))}function E3t(t,n){1&t&&(p(0,"p",25),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CLUBS.MIN_LEVEL_DESCRIPTION")))}const x3t=()=>({class:"club-info-footer__friends-list-avatar",isLink:!1,showUsername:!0,showLevel:!0});function A3t(t,n){if(1&t&&B(0,"friends-avatars-list",28),2&t){const o=_(2);l("avatarConfig",pt(2,x3t))("ids",o.memberFriends)}}function R3t(t,n){1&t&&(p(0,"p",25),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CLUBS.CLUB_NO_FRIENDS")))}function k3t(t,n){if(1&t&&U(0,A3t,1,3,"friends-avatars-list",26)(1,R3t,3,3,"p",27),2&t){const o=_();l("ngIf",o.memberFriends.length),d(),l("ngIf",!o.memberFriends.length)}}let K2=(()=>{var t;class n{constructor(e){this.memberFriends=[],this.showInfo={},this.EIcons=ve.EIcons,this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-info-footer"]],inputs:{clubProfile:"clubProfile",membersCount:"membersCount",memberFriends:"memberFriends",showInfo:"showInfo"},features:[it],decls:20,vars:6,consts:[[1,"club-info-footer__container--upper-info"],["class","club-info-footer__container--item","tooltip","",3,"tooltipTemplate",4,"ngIf"],[1,"club-info-footer__container--bottom-info"],["class","club-info-footer__container--item fixed-height","tooltip","",3,"tooltipTemplate",4,"ngIf"],["tooltipTmplPrivacy",""],["tooltipTmplTag",""],["tooltipTmplLocation",""],["tooltipTmplMembersCount",""],["tooltipTmplMinLevel",""],["tooltipTmplFriends",""],["tooltip","",1,"club-info-footer__container--item",3,"tooltipTemplate"],["data-cy","clubProfilePrivacyTag",1,"club--info--footer__tag",3,"clubPrivacy"],[1,"club--info--footer__tag",3,"tag"],["tooltip","",1,"club-info-footer__container--item","fixed-height",3,"tooltipTemplate"],["class","club--info--footer__location","data-cy","clubProfileLocation",3,"location",4,"ngIf"],["data-cy","clubProfileLocation",1,"club--info--footer__location",3,"location"],["data-cy","clubProfileMembersInfo",1,"club--info--footer__members"],[1,"club--info--footer__icon","members-count",3,"icon"],[1,"club--info--footer__text",3,"value"],["data-cy","clubProfileFriendsInfo",1,"club--info--footer__friends","club--info--footer__friends-link"],[1,"club--info--footer__icon",3,"icon"],[1,"club--info--footer__text"],["data-cy","clubProfileLevelRequirement",1,"club--info--footer__level"],[1,"club-info-footer__club-privacy",3,"clubPrivacy","showIcon","showDescription"],[1,"club-info-footer__club-activity",3,"tag","showIcon","showDescription"],[1,"club-info-footer__text--tooltip"],[3,"avatarConfig","ids",4,"ngIf"],["class","club-info-footer__text--tooltip",4,"ngIf"],[3,"avatarConfig","ids"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,_3t,2,2,"div",1)(2,v3t,2,2,"div",1),m(),p(3,"div",2),U(4,C3t,2,2,"div",3)(5,y3t,7,4,"div",3)(6,w3t,6,10,"div",3)(7,T3t,5,3,"div",3),m(),U(8,P3t,1,3,"ng-template",null,4,ft)(10,I3t,1,3,"ng-template",null,5,ft)(12,M3t,3,5,"ng-template",null,6,ft)(14,O3t,3,3,"ng-template",null,7,ft)(16,E3t,3,3,"ng-template",null,8,ft)(18,k3t,2,2,"ng-template",null,9,ft)),2&e&&(d(),l("ngIf",i.showInfo.privacyTag),d(),l("ngIf",i.showInfo.tag),d(2),l("ngIf",i.showInfo.location&&i.clubProfile.location),d(),l("ngIf",i.showInfo.membersCount),d(),l("ngIf",i.showInfo.friendsCount&&i.memberFriends),d(),l("ngIf",i.showInfo.levelRequirement))},dependencies:[Ne,Dn,Qr,Eg,Vz,UH,GH,VH,qe],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;margin:1rem 0}.club-info-footer__container--item[_ngcontent-%COMP%]{flex:1;margin:.5rem .25rem;padding:0 1rem;min-height:3rem;display:flex;align-items:center;border-radius:.4rem}.club-info-footer__container--item.fixed-height[_ngcontent-%COMP%]{height:8rem;justify-content:center;align-items:center}@media only screen and (max-width: 480px){.club-info-footer__container--item.fixed-height[_ngcontent-%COMP%]{height:6rem}}.club-info-footer__container--upper-info[_ngcontent-%COMP%], .club-info-footer__container--bottom-info[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap}.club--info--footer__text[_ngcontent-%COMP%]{font-size:1.2em!important;text-align:center}@media only screen and (max-width: 480px){.club--info--footer__text[_ngcontent-%COMP%]{font-size:1em!important}}.club--info--footer__members[_ngcontent-%COMP%], .club--info--footer__friends[_ngcontent-%COMP%], .club--info--footer__level[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;align-items:center;justify-content:center;flex-flow:column nowrap}.club--info--footer__icon[_ngcontent-%COMP%]{font-size:2.5em!important;margin-bottom:.5rem}.club--info--footer__icon.members-count[_ngcontent-%COMP%]{font-size:3em!important;margin-bottom:0}.club--info--footer__friends-link[_ngcontent-%COMP%]{cursor:pointer}.club--info--footer__friends-link[_ngcontent-%COMP%]   .club--info--footer__icon-text[_ngcontent-%COMP%]{text-decoration:underline}.club-info-footer__text--tooltip[_ngcontent-%COMP%]{font-size:1.2em}"],changeDetection:0}),n})(),zH=(()=>{var t;class n{constructor(e,i){this.navigation=e,this.constants=i,this.buttonModifier=ve.EButtonModifier}viewClub(){this.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/club/").concat(this.clubId)}}])}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Yt),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["club-view-button"]],inputs:{clubId:"clubId"},decls:3,vars:4,consts:[[3,"buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"button-text",0),Y("onClick",function(){return i.viewClub()}),H(1),V(2,"translate"),m()),2&e&&(l("buttonModifier",i.buttonModifier.BUTTON_ACTION),d(),ze(" ",$(2,2,"TEXT.VIEW"),""))},dependencies:[pn,qe],encapsulation:2,changeDetection:0}),n})();const L3t=(t,n)=>({rejected:t,member:n}),D3t=t=>[t];let jH=(()=>{var t;class n{constructor(e){this.EJoinRequestStatus=Di,this.text={key:""},this.iconSettings={icon:"",color:void 0},this.cdr=e}ngOnChanges(e){this.updateText(),this.cdr.detectChanges()}updateText(){if(null!=this.role)return this.iconSettings={icon:ve.EIcons.TICK_ICON,color:Z2.Positive},void(this.text={key:this.getRoleString(this.role)});if(null!=this.status)switch(this.status){case Di.UserRejected:case Di.ClubRejected:this.iconSettings={icon:ve.EIcons.CLOSE,color:Z2.Negative},this.text={key:"LABEL.REJECTED"};break;case Di.PendingClubAccept:case Di.PendingUserAccept:this.iconSettings={icon:ve.EIcons.TICK_ICON,color:Z2.Positive},this.text={key:"TEXT.REQUEST_SENT"}}}getRoleString(e){return $h.getMemberRoleTranslationKey(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-join-request-status"]],inputs:{status:"status",role:"role"},features:[it],decls:6,vars:14,consts:[[1,"club--jr--status__container"],[1,"club--jr--status__label",3,"ngClass"],[3,"icon"]],template:function(e,i){1&e&&(p(0,"container-component",0)(1,"p",1),B(2,"icon-component",2),p(3,"span"),H(4),V(5,"translate"),m()()()),2&e&&(d(),l("ngClass",cn(9,L3t,i.status===i.EJoinRequestStatus.ClubRejected,null!=i.role)),d(),ni("club--jr--status__icon--status ",i.iconSettings.color,""),l("icon",i.iconSettings.icon),d(2),se(yt(5,6,i.text.key,ne(12,D3t,i.text.params))))},dependencies:[Xe,Dn,Ga,qe],styles:["[_nghost-%COMP%]{position:relative;display:block;width:100%;height:100%}.club--jr--status__container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:center;align-items:center}.club--jr--status__label[_ngcontent-%COMP%]{height:100%;text-align:center;display:flex;justify-content:center;align-items:center;padding-right:2rem}.club--jr--status__icon--status[_ngcontent-%COMP%]{margin:auto 1rem auto 0}.club--jr--status__icon--status.positive[_ngcontent-%COMP%]{font-size:3.5rem}"],changeDetection:0}),n})();var Z2=function(t){return t.Positive="positive",t.Negative="negative",t}(Z2||{});const B3t=t=>[t];function N3t(t,n){if(1&t){const o=Ce();p(0,"button-text",2),Y("onClick",function(){return oe(o),re(_().click())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier)("loading",o.isLoading)("disabled",(null==o.joinRequest?null:o.joinRequest.status)!==o.EJoinRequestStatus.PendingClubAccept&&(o.isDisabled||o.clubPrivacy===o.EClubPrivacy.Closed&&(null==o.joinRequest?null:o.joinRequest.status)!==o.EJoinRequestStatus.PendingUserAccept)),d(),ze(" ",yt(2,4,o.text.key,ne(7,B3t,o.text.params)),"\n")}}function F3t(t,n){if(1&t&&B(0,"club-join-request-status",3),2&t){const o=_();l("status",null==o.joinRequest?null:o.joinRequest.status)("role",o.isCurrentClub()?null==o.clubState?null:o.clubState.role:void 0)}}let HH=(()=>{var t;class n{constructor(e){this.isLoading=!1,this.isDisabled=!1,this.join=new ke,this.cancel=new ke,this.accept=new ke,this.EClubPrivacy=Or,this.EJoinRequestStatus=Di,this.cdr=e}ngOnInit(){this.cdr.detach()}ngOnChanges(e){this.updateButton(),this.updatePrivacyLabel(),this.cdr.detectChanges()}click(){var e;if(null!=(null===(e=this.joinRequest)||void 0===e?void 0:e.status))switch(this.joinRequest.status){case Di.PendingClubAccept:this.cancel.emit({clubId:this.clubId});break;case Di.PendingUserAccept:this.accept.emit({clubId:this.clubId,joinRequestId:this.joinRequest.id});break;case Di.UserRejected:this.join.emit({clubId:this.clubId});break;case Di.ClubRejected:this.clubPrivacy===Or.Public&&this.join.emit({clubId:this.clubId})}else this.join.emit({clubId:this.clubId})}isCurrentClub(){var e;return this.clubId===(null===(e=this.clubState)||void 0===e||null===(e=e.clubProfile)||void 0===e?void 0:e.id)}updateButton(){var e,i,r;this.isCurrentClub()?this.text={key:this.getRoleString(this.clubState.role)}:(null===(e=this.joinRequest)||void 0===e?void 0:e.status)===Di.PendingClubAccept||(null===(i=this.joinRequest)||void 0===i?void 0:i.status)===Di.PendingUserAccept||(null===(r=this.joinRequest)||void 0===r?void 0:r.status)===Di.ClubRejected?this.updateButtonByJoinRequestStatus(this.joinRequest.status):(this.updateButtonByPrivacy(this.clubPrivacy),this.updateButtonByDisablingReasons())}updateButtonByJoinRequestStatus(e){switch(e){case Di.PendingClubAccept:this.text={key:"CLUBS.CANCEL_JOIN_REQUEST"},this.buttonModifier=ve.EButtonModifier.BUTTON_NEGATIVE;break;case Di.PendingUserAccept:this.text={key:"CLUBS.ACCEPT_INVITE"},this.buttonModifier=ve.EButtonModifier.BUTTON_ATTENTION,this.updateButtonByDisablingReasons();break;case Di.ClubRejected:this.clubPrivacy===Or.Public?(this.text={key:"CLUBS.JOIN_CLUB"},this.buttonModifier=ve.EButtonModifier.BUTTON_ATTENTION,this.updateButtonByDisablingReasons()):this.text={key:"LABEL.REJECTED"};break;default:this.updateButtonByDisablingReasons()}}updateButtonByPrivacy(e){switch(e){case Or.Public:this.text={key:"CLUBS.JOIN_CLUB"},this.buttonModifier=ve.EButtonModifier.BUTTON_ATTENTION;break;case Or.Private:this.text={key:"CLUBS.REQUEST_TO_JOIN"},this.buttonModifier=ve.EButtonModifier.BUTTON_ATTENTION;break;case Or.Closed:this.text={key:"CLUBS.".concat(Ys.parse(Or,this.clubPrivacy).toUpperCase(),"_PRIVACY_LEVEL")},this.buttonModifier=ve.EButtonModifier.BUTTON_ATTENTION}}updateButtonByDisablingReasons(){for(let e in this.disabledReasons)if(this.disabledReasons[e])switch(e){case"clubMembersLimitReached":this.text={key:"TEXT.FULL"},this.buttonModifier=ve.EButtonModifier.BUTTON_ATTENTION;break;case"levelRequirementNotMet":this.text={key:"CLUBS.LEVEL_REQUIRED"},this.buttonModifier=ve.EButtonModifier.BUTTON_ATTENTION}}updatePrivacyLabel(){this.privacyLabel={key:"CLUBS.".concat(Ys.parse(Or,this.clubPrivacy).toUpperCase(),"_PRIVACY_LEVEL")}}getRoleString(e){return $h.getMemberRoleTranslationKey(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-join-button"]],inputs:{clubId:"clubId",clubPrivacy:"clubPrivacy",isLoading:"isLoading",isDisabled:"isDisabled",clubState:"clubState",joinRequest:"joinRequest",disabledReasons:"disabledReasons"},outputs:{join:"join",cancel:"cancel",accept:"accept"},features:[it],decls:2,vars:2,consts:[[3,"buttonModifier","loading","disabled","onClick",4,"ngIf"],["class","club--join--button__request--status",3,"status","role",4,"ngIf"],[3,"buttonModifier","loading","disabled","onClick"],[1,"club--join--button__request--status",3,"status","role"]],template:function(e,i){1&e&&U(0,N3t,3,9,"button-text",0)(1,F3t,1,2,"club-join-request-status",1),2&e&&(l("ngIf",!i.isCurrentClub()&&((null==i.joinRequest?null:i.joinRequest.status)!==i.EJoinRequestStatus.ClubRejected||i.clubPrivacy===i.EClubPrivacy.Public)),d(),l("ngIf",i.isCurrentClub()||!((null==i.joinRequest?null:i.joinRequest.status)!==i.EJoinRequestStatus.ClubRejected||i.clubPrivacy===i.EClubPrivacy.Public)))},dependencies:[Ne,pn,jH,qe],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.club--join--button__request--status[_ngcontent-%COMP%]{height:4rem}@media only screen and (max-width: 768px){.club--join--button__request--status[_ngcontent-%COMP%]{height:3.5rem}}"],changeDetection:0}),n})();const U3t=(t,n)=>({clubMembersLimitReached:t,levelRequirementNotMet:n});let Q2=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.options={},this.subscriptions=new ie.List,this.cdr=e,this.store=i,this.clubsService=r,this.toast=s,this.permissions=a,this.actions=c,this.currentUserProfile=i.selectUserState().profile,this.config=this.createDefaultOptions()}ngOnInit(){this.cdr.detach(),this.clubJoinRequest=this.joinRequest,this.subscriptions.add(this.actions.pipe(ai(M8)).pipe(bt(e=>e.clubId===this.clubProfile.id)).subscribe(e=>{this.clubJoinRequest=e.currentJoinRequest?{...this.clubJoinRequest,...e.currentJoinRequest}:void 0,this.updateView()})),this.subscriptions.add(this.store.clubs.subscribeCurrentJoinRequest().subscribe(e=>{var i;(null==e?void 0:e.clubId)===this.clubProfile.id?this.clubJoinRequest=e:(null===(i=this.clubJoinRequest)||void 0===i?void 0:i.status)===Di.PendingClubAccept&&(!e||e.clubId!==this.clubProfile.id)&&(this.clubJoinRequest=void 0),this.updateView()})),this.subscriptions.add(this.store.clubs.subscribeInflightJoinRequestByClubId(this.clubProfile.id).subscribe(e=>{this.joinRequestProcessState=e,e&&e.result&&(this.clubJoinRequest=e.result.joinRequest),this.cdr.detectChanges()})),this.subscriptions.add(this.store.clubs.subscribeCurrentClubState().subscribe(e=>{this.clubState=e,this.updateView()})),this.subscriptions.add(this.store.subscribeUserState().subscribe(e=>{this.currentUserProfile=e.profile,this.updateView()})),this.updateView()}ngOnChanges(e){var i;null!==(i=e.options)&&void 0!==i&&i.currentValue&&(this.config={...this.config,...this.options}),this.updateView()}ngOnDestroy(){var e;null===(e=this.task)||void 0===e||e.cancel(),this.subscriptions.forEach(i=>i.unsubscribe()),this.subscriptions=new ie.List}acceptClubInvite(e){this.clubsService.startAcceptClubInviteProcedure(e.clubId,e.joinRequestId,()=>{this.config.navigateToClubOnAcceptInvite&&this.clubsService.openCurrentClubPage()})}joinClub(e){var i=this;return f(function*(){const r=i.getJoinRequestPermission();if(r.isPermitted)try{i.task=new Jn(i.clubsService.startJoinClubProcedure(i.clubProfile,s=>{var a;i.config.navigateToClubOnJoin&&null!==(a=s.currentClub)&&void 0!==a&&a.clubProfile&&i.clubsService.openCurrentClubPage()})),yield i.task}catch(s){if(s instanceof Cr)return void console.log(s);s instanceof fA?(i.clubProfile.settings.privacy=s.clubPrivacyStatus,i.clubProfile={...i.clubProfile},i.updateView()):s instanceof S_?(i.clubJoinRequest={...i.clubJoinRequest,...s.currentJoinRequest},i.clubsService.closeJoinClubMessagePopup(),i.updateView()):s instanceof cP&&(i.clubMembersCount=i.clubProfile.settings.memberLimit,i.updateView())}else i.permissions.showFailedRequirementsToUser(r)})()}onCancelJoinRequest(e){var i=this;return f(function*(){const r=i.store.clubs.selectJoinRequestByClubId(e.clubId);r&&i.cancelJoinRequest({requestId:r.id,clubId:r.clubId})})()}cancelJoinRequest(e){var i=this;return f(function*(){try{yield i.clubsService.cancelJoinRequest(e)}catch(r){console.warn(r),r instanceof lt.NetworkError?i.toast.error("ERRORS.CONNECTION_ERROR"):r instanceof Cr?console.log("promise was cancelled"):r instanceof mb||r instanceof Sh?i.toast.error("CLUBS.JOIN_REQUEST_PROCESS_ERROR"):r instanceof lt.ServerUnavailableError?i.toast.error("CLUBS.SERVICE_UNAVAILABLE"):r instanceof Mm?i.toast.error("CLUBS.CLUB_NOT_FOUND"):r instanceof Sh&&i.clubJoinRequest?(i.clubJoinRequest={...i.clubJoinRequest,status:r.joinRequestStatus},i.updateView()):i.toast.error("ERRORS.SOMETHING_WRONG")}})()}getJoinRequestPermission(){return this.permissions.getClubActionPermission(this.clubProfile,nt.EModuleAction.SendClubJoinRequest)}updateView(){this.cdr.detectChanges()}createDefaultOptions(){return{navigateToClubOnJoin:!1,navigateToClubOnAcceptInvite:!1}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(Au),g(Dt),g(Pi),g(yr))},t.\u0275cmp=pe({type:t,selectors:[["club-join-button-smart"]],inputs:{clubProfile:"clubProfile",clubMembersCount:"clubMembersCount",joinRequest:"joinRequest",options:"options"},features:[it],decls:1,vars:10,consts:[["data-cy","clubJoinButton",3,"clubId","clubPrivacy","isLoading","joinRequest","clubState","isDisabled","disabledReasons","join","cancel","accept"]],template:function(e,i){1&e&&(p(0,"club-join-button",0),Y("join",function(s){return i.joinClub(s)})("cancel",function(s){return i.onCancelJoinRequest(s)})("accept",function(s){return i.acceptClubInvite(s)}),m()),2&e&&l("clubId",i.clubProfile.id)("clubPrivacy",i.clubProfile.settings.privacy)("isLoading",i.joinRequestProcessState||i.clubJoinRequest&&((null==i.clubJoinRequest.actions?null:i.clubJoinRequest.actions.send.inProgress)||(null==i.clubJoinRequest.actions?null:i.clubJoinRequest.actions.cancel.inProgress)))("joinRequest",i.clubJoinRequest)("clubState",i.clubState)("isDisabled",i.clubMembersCount>=i.clubProfile.settings.memberLimit||!i.getJoinRequestPermission().minLevelRequirement.isFulfilled)("disabledReasons",cn(7,U3t,i.clubMembersCount===i.clubProfile.settings.memberLimit,!i.getJoinRequestPermission().minLevelRequirement.isFulfilled))},dependencies:[HH],encapsulation:2,changeDetection:0}),n})();const G3t=t=>[t];function V3t(t,n){if(1&t&&(p(0,"p",13),B(1,"icon-component",14),H(2),V(3,"translate"),V(4,"exactDate"),m()),2&t){const o=_();d(),l("icon",o.EIcons.CROWN),d(),ze(" ",yt(3,2,"TEXT.LAST_SEEN",ne(8,G3t,yt(4,5,o.club.leaderLastSeen,"d.MM.y")))," ")}}const z3t=t=>({highlighted:t}),j3t=(t,n,o,e)=>({id:t,avatar:n,level:o,frame:e}),H3t=()=>({privacyTag:!0,tag:!0,location:!0,membersCount:!0,friendsCount:!0,levelRequirement:!0}),q3t=()=>({navigateToClubOnJoin:!0,navigateToClubOnAcceptInvite:!0});let qH=(()=>{var t;class n{constructor(e,i){this.isApplied=!0,this.timeService=Bn.instance,this.EIcons=ve.EIcons,this.EJoinRequestStatus=Di,this.cdr=e,this.cdr.detach(),this.lastSeenShowSpan=i.content.clubs.leaderLastSeenPeriod}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Dr))},t.\u0275cmp=pe({type:t,selectors:[["club-list-item"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("clubs--list--item__cmp",i.isApplied)},inputs:{club:"club",currentClub:"currentClub"},features:[it],decls:15,vars:25,consts:[[1,"clubs--list--item__container",3,"ngClass"],[1,"clubs--list--item__container--upper-info"],[1,"clubs--list--item__avatar",3,"club"],[1,"clubs--list--item__container--club-name-and-status"],["data-cy","clubsListItemName",1,"club-name"],[1,"club-points",3,"points","showBackdrop"],[1,"club-status-"],[1,"clubs--list--item__container--bottom-info"],[1,"clubs--list--item__footer--info",3,"clubProfile","membersCount","memberFriends","showInfo"],["class","clubs--list--item__label-last-seen",4,"ngIf"],[1,"clubs--list--item__container--buttons"],["data-cy","clubListViewButton",1,"clubs--list--item__view--button",3,"clubId"],[3,"clubProfile","clubMembersCount","joinRequest","options"],[1,"clubs--list--item__label-last-seen"],[1,"clubs--list--item__icon-last-seen",3,"icon"]],template:function(e,i){1&e&&(p(0,"container-component",0)(1,"div",1),B(2,"club-avatar",2),p(3,"div",3)(4,"p",4),H(5),m(),B(6,"club-points",5),p(7,"p",6),H(8),m()()(),p(9,"div",7),B(10,"club-info-footer",8),m(),U(11,V3t,5,10,"p",9),p(12,"div",10),B(13,"club-view-button",11)(14,"club-join-button-smart",12),m()()),2&e&&(l("ngClass",ne(16,z3t,(null==i.currentClub||null==i.currentClub.clubProfile?null:i.currentClub.clubProfile.id)===i.club.clubProfile.id||(null==i.club.myRequest?null:i.club.myRequest.status)===i.EJoinRequestStatus.PendingUserAccept)),d(2),l("club",xd(18,j3t,i.club.clubProfile.id,i.club.clubProfile.avatar,i.club.clubProfile.level,i.club.inventory.frame)),d(3),se(i.club.clubProfile.name),d(),l("points",i.club.inventory.coins)("showBackdrop",!1),d(2),se(i.club.clubProfile.description),d(2),l("clubProfile",i.club.clubProfile)("membersCount",i.club.membersCount)("memberFriends",i.club.memberFriends)("showInfo",pt(23,H3t)),d(),l("ngIf",i.club.leaderLastSeen&&i.timeService.getServerTimeS()-i.club.leaderLastSeen>i.lastSeenShowSpan),d(2),l("clubId",i.club.clubProfile.id),d(),l("clubProfile",i.club.clubProfile)("clubMembersCount",i.club.membersCount)("joinRequest",i.club.myRequest)("options",pt(24,q3t)))},dependencies:[Xe,Ne,Dn,Ga,mf,tO,K2,zH,Q2,qe,kp],styles:["[_nghost-%COMP%]{display:block}.clubs--list--item__container[_ngcontent-%COMP%]{height:auto;width:auto;display:flex;flex-flow:column nowrap;padding:1.5rem}@media only screen and (max-width: 480px){.clubs--list--item__container[_ngcontent-%COMP%]{padding:1rem .5rem}}.clubs--list--item__container--upper-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-flow:row wrap}.clubs--list--item__avatar[_ngcontent-%COMP%]{font-size:1.1rem;width:8rem;height:8rem}.clubs--list--item__container--club-name-and-status[_ngcontent-%COMP%]{width:calc(100% - 8rem);padding-left:2rem;display:flex;flex-flow:column nowrap;justify-content:space-around}.clubs--list--item__container--club-name-and-status[_ngcontent-%COMP%]   .club-points[_ngcontent-%COMP%]{font-size:1.2rem;height:auto;width:-moz-fit-content;width:fit-content}.clubs--list--item__container--club-name-and-status[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clubs--list--item__container--club-name-and-status[_ngcontent-%COMP%] > p.club-name[_ngcontent-%COMP%]{font-size:1.8rem}.clubs--list--item__container--club-name-and-status[_ngcontent-%COMP%] > p.club-description[_ngcontent-%COMP%]{font-size:1.4rem}.clubs--list--item__container--bottom-info[_ngcontent-%COMP%]{flex:1}@media screen and (max-width: 568px){.clubs--list--item__footer--info[_ngcontent-%COMP%]{font-size:1rem}}.clubs--list--item__label-last-seen[_ngcontent-%COMP%]{width:100%;font-size:1.2em;font-weight:700;display:flex;justify-content:center;align-items:center}.clubs--list--item__label-last-seen[_ngcontent-%COMP%]   .clubs--list--item__icon-last-seen[_ngcontent-%COMP%]{font-size:1.2em;margin:0 .5rem}.clubs--list--item__container--buttons[_ngcontent-%COMP%]{width:100%;height:6rem;display:flex;flex-flow:row wrap;justify-content:space-around;align-items:center}@media only screen and (max-width: 480px){.clubs--list--item__container--buttons[_ngcontent-%COMP%]   .clubs--list--item__view--button[_ngcontent-%COMP%]{min-width:30%}}.clubs--list--item__container--buttons[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{min-width:35%;max-width:65%}@media only screen and (max-width: 480px){.clubs--list--item__container--buttons[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{min-width:48%}}"],changeDetection:0}),n})();function W3t(t,n){1&t&&B(0,"loader-image",10),2&t&&l("transparentBG",!0)}function $3t(t,n){1&t&&B(0,"div",11)}const K3t=()=>({textKey:"OTHER.NO_DATA"}),Z3t=t=>[t];function Q3t(t,n){1&t&&B(0,"empty-content",16),2&t&&l("textArray",ne(2,Z3t,pt(1,K3t)))}function Y3t(t,n){if(1&t&&(Tn(0),B(1,"club-list-item",17),Pn()),2&t){const o=n.$implicit,e=_(2);d(),l("id",o.clubProfile.id)("club",o)("currentClub",e.currentClub)}}function J3t(t,n){1&t&&B(0,"spinner-loader",18)}function X3t(t,n){if(1&t&&(p(0,"div",12),U(1,Q3t,1,4,"empty-content",13)(2,Y3t,2,3,"ng-container",14)(3,J3t,1,0,"spinner-loader",15),m()),2&t){const o=_();l("onScrolledToBottom",o.onListScrolledToBottom),d(),l("ngIf",0===o.clubs.length),d(),l("ngForOf",o.clubs)("ngForTrackBy",o.trackByFn),d(),l("ngIf",o.isLoadingNextPage)}}function eUt(t,n){1&t&&B(0,"div",11)}const Bwe=t=>({name:t}),tUt=()=>({key:"CLUBS.FILTER"});let WH=(()=>{var t;class n{constructor(e){this.clubs=[],this.isLoading=!1,this.isLoadingNextPage=!1,this.onListScrolledToBottom={handler:()=>{},outsideZone:!1},this.search=new ke,this.filter=new ke,this.showInfo=new ke,this.reset=new ke,this.EIcons=ve.EIcons,this.filterButton={modifier:ve.EButtonModifier.BUTTON_ATTENTION,icon:ve.EIcons.Filter,text:{key:"TEXT.FILTER"},disabled:!1,loading:!1},this.infoButton={modifier:ve.EButtonModifier.BUTTON_CLUB_INFO,icon:ve.EIcons.INFO_ICON,text:{key:"TEXT.FILTER"},disabled:!1,loading:!1},this.popupTitleTypes=li,this.filterPopup=this.createDefaultPopupModel(),this.cdr=e}ngOnInit(){this.cdr.detach(),this.updateView()}ngOnChanges(e){(e.clubs&&!e.clubs.firstChange||e.isLoading&&!e.isLoading.firstChange||e.currentJoinRequest&&!e.currentJoinRequest.firstChange||e.error&&!e.error.firstChange)&&this.updateView()}searchClub(e){this.search.emit(e.searchbarFilterValue)}resetFilters(){this.reset.emit(),this.filterPopup.isOpened=!1}openFilterPopup(){this.filterPopup.isOpened=!0,this.updateView()}hideFilterPopup(){this.filterPopup.isOpened=!1,this.updateView()}openInfo(){this.showInfo.emit()}trackByFn(e,i){return i.clubProfile.id}updateView(){this.cdr.detectChanges()}filterList(e){this.filter.emit(e),this.hideFilterPopup()}createDefaultPopupModel(){return{isOpened:!1,options:{styleProperties:{maxWidth:"38rem",minWidth:"32rem",maxHeight:"60rem"}}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["clubs-list"]],inputs:{clubs:"clubs",isLoading:"isLoading",isLoadingNextPage:"isLoadingNextPage",currentUserProfile:"currentUserProfile",currentClub:"currentClub",currentJoinRequest:"currentJoinRequest",onListScrolledToBottom:"onListScrolledToBottom",error:"error"},outputs:{search:"search",filter:"filter",showInfo:"showInfo",reset:"reset"},features:[it],decls:12,vars:20,consts:[[1,"clubs--list__component--wrapper"],[3,"transparentBG",4,"ngIf"],[1,"clubs--list__header--wrapper"],[1,"clubs--list__filter--button",3,"buttonModifier","icon","onClick"],[1,"clubs--list__search-bar",3,"searchBarPlaceholder","customInputCssClass","error","filterAction","clearFilters"],["class","clubs--list__separator",4,"ngIf"],["class","clubs--list__wrapper","scroll-directive","",3,"onScrolledToBottom",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[3,"filter","reset"],[3,"transparentBG"],[1,"clubs--list__separator"],["scroll-directive","",1,"clubs--list__wrapper",3,"onScrolledToBottom"],[3,"textArray",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","clubs--list__page--loader",4,"ngIf"],[3,"textArray"],["data-cy","clubsListItem",1,"clubs--list__item",3,"id","club","currentClub"],[1,"clubs--list__page--loader"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,W3t,1,1,"loader-image",1),p(2,"div",2)(3,"button-icon",3),Y("onClick",function(){return i.openInfo()}),m(),p(4,"search-bar",4),Y("filterAction",function(s){return i.searchClub(s)})("clearFilters",function(){return i.resetFilters()}),m(),p(5,"button-icon",3),Y("onClick",function(){return i.openFilterPopup()}),m()(),U(6,$3t,1,0,"div",5)(7,X3t,4,5,"div",6)(8,eUt,1,0,"div",5),p(9,"popup-container",7),Y("closePopup",function(){return i.hideFilterPopup()}),p(10,"popup-title-bar",8),Y("buttonCloseClicked",function(){return i.hideFilterPopup()}),m(),p(11,"clubs-filter",9),Y("filter",function(s){return i.filterList(s)})("reset",function(){return i.resetFilters()}),m()()()),2&e&&(d(),l("ngIf",i.isLoading),d(2),l("buttonModifier",i.infoButton.modifier)("icon",ne(15,Bwe,i.infoButton.icon)),d(),l("searchBarPlaceholder","LABEL.SEARCH")("customInputCssClass","clubs--list__input")("error",i.error),d(),l("buttonModifier",i.filterButton.modifier)("icon",ne(17,Bwe,i.filterButton.icon)),d(),l("ngIf",!i.isLoading),d(),l("ngIf",!i.isLoading),d(),l("ngIf",!i.isLoading),d(),l("popupContainerOpened",i.filterPopup.isOpened)("popupContainerOptions",i.filterPopup.options),d(),l("popupTitleType",i.popupTitleTypes.Static)("text",pt(19,tUt)))},dependencies:[Mt,Ne,bo,pf,ei,Ji,Wi,Oi,vc,Is,rO,qH],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:block}.clubs--list__component--wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.clubs--list__header--wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;height:6rem;padding:0 2rem}@media screen and (max-width: 768px){.clubs--list__header--wrapper[_ngcontent-%COMP%]{padding:0 .5rem}}.clubs--list__search-bar[_ngcontent-%COMP%]{display:block}.clubs--list__wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:calc(100% - 6rem)}.clubs--list__item[_ngcontent-%COMP%]{margin:1rem 0;padding:0 2rem}@media screen and (max-width: 568px){.clubs--list__item[_ngcontent-%COMP%]{padding:0 .25rem}}.clubs--list__item[_ngcontent-%COMP%]:first-child{margin-top:0}.clubs--list__item[_ngcontent-%COMP%]:last-child{margin-bottom:0}.clubs--list__separator[_ngcontent-%COMP%]{width:100%;display:flex}.clubs--list__filter--button[_ngcontent-%COMP%]{margin:0 .5rem;flex-shrink:0;width:4rem;height:4rem}.clubs--list__page--loader[_ngcontent-%COMP%]{width:5rem;display:block;margin:auto}"],changeDetection:0}),n})();function nUt(t,n){1&t&&B(0,"loader-image",3),2&t&&l("transparentBG",!0)}function iUt(t,n){if(1&t){const o=Ce();p(0,"div",4)(1,"form-builder",5),Y("onOptionSelect",function(i){return oe(o),re(_().onFilterSelect(i))}),m()()}if(2&t){const o=_();d(),l("config",o.fields)("errors",o.errors)}}const oUt=()=>({iconClass:"create--club--button-currency-icon"});function rUt(t,n){if(1&t&&(p(0,"span",9),B(1,"currency-label",12),m()),2&t){const o=_(2);d(),l("valueConfig",pt(3,oUt))("value",o.createButton.price.amount)("type",o.createButton.price.currency)}}function sUt(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"div",7)(2,"button-text",8),Y("onClick",function(){return oe(o),re(_().createClub())}),p(3,"span",9),H(4),V(5,"translate"),m(),U(6,rUt,2,4,"span",10),m()(),p(7,"div",7)(8,"button-text",11),Y("onClick",function(){return oe(o),re(_().cancelChanges())}),H(9),V(10,"translate"),m()()()}if(2&t){const o=_();d(2),l("buttonModifier",o.createButton.modifier)("loading",o.isCreating),d(2),se($(5,7,"WORDS.CREATE")),d(2),l("ngIf",o.createButton.price),d(2),l("buttonModifier",o.buttonModifier.BUTTON_NEGATIVE)("disabled",o.isCreating),d(),ze("",$(10,9,"EDIT_PROFILE.CANCEL")," ")}}let ny=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.isLoading=!1,this.isCreating=!1,this.create=new ke,this.cancel=new ke,this.buttonModifier=ve.EButtonModifier,this.fields=[],this.selected=[],this.cdr=e,this.store=i,this.popup=r,this.fieldValidatorFactory=s,this.urlService=a,this.clubsFormHelper=c}ngOnInit(){this.createButton={modifier:ve.EButtonModifier.BUTTON_ATTENTION},this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){e.errors&&!e.errors.firstChange&&this.setErrors(e.errors.currentValue),e.config&&e.config.currentValue&&(this.fields=this.createForm()),(e.config&&!e.config.firstChange||e.isLoading&&!e.isLoading.firstChange||e.isCreating&&!e.isCreating.firstChange)&&this.cdr.detectChanges()}cancelChanges(){this.cancel.emit()}createClub(){var e;const i={name:this.selected.find(r=>r.id===n.EFieldId.Name).value,description:this.selected.find(r=>r.id===n.EFieldId.Description).value,presetAvatarId:this.selected.find(r=>r.id===n.EFieldId.Avatar).value.info.id,location:this.selected.find(r=>r.id===n.EFieldId.Location).value,minLevel:null!==(e=this.selected.find(r=>r.id===n.EFieldId.MinLevelRequirement).value)&&void 0!==e?e:this.config.defaultSettings.requirements.minLevel,privacy:this.selected.find(r=>r.id===n.EFieldId.Privacy).value,tag:this.selected.find(r=>r.id===n.EFieldId.Tag).value};this.create.emit(i)}createForm(){return[{id:n.EFieldId.Name,type:Ei.FieldType.Input,format:Ei.EFormat.Text,label:"PLACEHOLDERS.NAME",placeholder:"PLACEHOLDERS.NAME",options:[],maxLength:this.fieldValidatorFactory.createClubNameValidator().maxLength},{id:n.EFieldId.Avatar,type:Ei.FieldType.Picker,format:Ei.EFormat.Image,label:"PLACEHOLDERS.AVATAR",options:this.config.avatars.map(e=>({value:{info:e,path:this.urlService.createClubPresetAvatarPath(e.id)}}))},{id:n.EFieldId.Description,type:Ei.FieldType.Input,format:Ei.EFormat.Text,label:"EDIT_PROFILE.STATUS",placeholder:"EDIT_PROFILE.STATUS",inputType:Ei.EInputType.TextArea,options:[],maxLength:this.fieldValidatorFactory.createClubStatusValidator().maxLength},{id:n.EFieldId.Location,type:Ei.FieldType.Dropdown,format:Ei.EFormat.Text,label:"CLUBS.LOCATION",options:Qp.createLocationOptions(this.config.locations,!0)},{id:n.EFieldId.MinLevelRequirement,type:Ei.FieldType.Picker,format:Ei.EFormat.Number,label:"CLUBS.MIN_LEVEL",options:this.clubsFormHelper.createMinLevelOptions()},{id:n.EFieldId.Privacy,type:Ei.FieldType.Dropdown,format:Ei.EFormat.LocalizedText,label:"CLUBS.PRIVACY_LEVEL",options:Qp.createPrivacyOptions()},{id:n.EFieldId.Tag,type:Ei.FieldType.Picker,format:Ei.EFormat.LocalizedText,label:"CLUBS.CLUB_TAG",options:Qp.createTagOptions()}]}onFilterSelect(e){this.selected=e,this.createButton.price=$h.calculateCreatePrice(e.find(i=>i.id===n.EFieldId.Privacy).value,this.config),this.resetErrors()}setErrors(e){this.errors=e,this.cdr.detectChanges()}resetErrors(){this.setErrors({})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(Cn),g(wa),g(ii),g(Qp))},t.\u0275cmp=pe({type:t,selectors:[["club-create"]],inputs:{config:"config",isLoading:"isLoading",isCreating:"isCreating",errors:"errors"},outputs:{create:"create",cancel:"cancel"},features:[it],decls:3,vars:3,consts:[[3,"transparentBG",4,"ngIf"],["class","create--club__form--wrapper",4,"ngIf"],["class","create--club__footer",4,"ngIf"],[3,"transparentBG"],[1,"create--club__form--wrapper"],[3,"config","errors","onOptionSelect"],[1,"create--club__footer"],[1,"create--club__button--container"],["data-cy","clubCreatePopupCreateButton",1,"create--club__button",3,"buttonModifier","loading","onClick"],[1,"create--club--button-text"],["class","create--club--button-text",4,"ngIf"],["data-cy","clubCreateCancelButton",1,"create--club__button",3,"buttonModifier","disabled","onClick"],[3,"valueConfig","value","type"]],template:function(e,i){1&e&&U(0,nUt,1,1,"loader-image",0)(1,iUt,2,2,"div",1)(2,sUt,11,11,"div",2),2&e&&(l("ngIf",i.isLoading),d(),l("ngIf",!i.isLoading&&i.config),d(),l("ngIf",!i.isLoading&&i.config))},dependencies:[Ne,pn,Oi,Xd,Yh,qe],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.create--club__form--wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;margin:auto;height:calc(100% - 8rem);padding:1rem 2rem}.create--club__footer[_ngcontent-%COMP%]{display:flex;height:8rem;align-items:center}.create--club__button--container[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.create--club__button[_ngcontent-%COMP%]{width:90%;height:5rem}.create--club--button-text[_ngcontent-%COMP%]{height:100%;vertical-align:middle;margin:0 .25rem}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EFieldId||(t.EFieldId={})).Name="name",o.Avatar="avatar",o.Description="description",o.Location="location",o.Privacy="privacy",o.MinLevelRequirement="minLevelRequirement",o.Tag="clubTag"}(ny||(ny={}));let $H=(()=>{var t;class n{constructor(e,i){this.isLoading=!1,this.join=new ke,this.sendButton={modifier:ve.EButtonModifier.BUTTON_ATTENTION},this.message="",this.cdr=e,this.validator=i.createClubJoinRequestMessageValidator(),this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}onInputChanged(e){this.message=e}onInputCleared(){this.message=""}sendRequest(){this.join.emit({club:this.club,message:this.message})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(wa))},t.\u0275cmp=pe({type:t,selectors:[["club-join"]],inputs:{club:"club",isLoading:"isLoading"},outputs:{join:"join"},features:[it],decls:7,vars:11,consts:[["data-cy","clubJoinRequestName",1,"club__join--name"],["data-cy","clubJoinRequestInput",1,"club__join--input",3,"placeholder","type","maxLength","onChange","onClear"],["data-cy","clubSendRequestButton",1,"club__join--button",3,"buttonModifier","loading","onClick"]],template:function(e,i){1&e&&(p(0,"p",0),H(1),m(),p(2,"user-input",1),Y("onChange",function(s){return i.onInputChanged(s)})("onClear",function(){return i.onInputCleared()}),V(3,"translate"),m(),p(4,"button-text",2),Y("onClick",function(){return i.sendRequest()}),H(5),V(6,"translate"),m()),2&e&&(d(),se(i.club.name),d(),l("placeholder",$(3,7,"CLUBS.JOIN_REQUEST_PLACEHOLDER"))("type","textarea")("maxLength",i.validator.maxLength),d(2),l("buttonModifier",i.sendButton.modifier)("loading",i.isLoading),d(),se($(6,9,"BUTTON.SEND")))},dependencies:[pn,il,qe],styles:[".club__join--name[_ngcontent-%COMP%]{width:100%;text-align:center;margin:1rem 0;overflow:hidden;text-overflow:ellipsis}.club__join--input[_ngcontent-%COMP%]{height:15rem}.club__join--button[_ngcontent-%COMP%]{width:auto;margin:1rem 0}"],changeDetection:0}),n})(),KH=(()=>{var t;class n{constructor(e){this.EIcons=ve.EIcons,this.cdr=e}ngOnInit(){this.progressBarConfig={areValuesShown:!1,progressPartitions:[{value:this.xp.currentLevelProgress,widthCoefficient:this.xp.currentLevelProgress},{value:this.xp.nextLevelAt,widthCoefficient:this.xp.nextLevelAt-this.xp.currentLevelProgress}]},this.cdr.detach(),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-info-xp-bar"]],inputs:{xp:"xp",level:"level"},decls:20,vars:13,consts:[[1,"club--info--xp--bar__container--ranking"],["data-cy","clubProfileLevelLabel",1,"label"],["data-cy","clubProfileLevelValue",1,"amount","colored"],[1,"club--info--xp--bar__wrapper"],[1,"club--info--xp--bar__level"],[1,"club--info--xp--bar__level--icon",3,"icon"],[1,"club--info--xp--bar__progress"],["data-cy","clubProfileExpBar",3,"progressBarConfig"],[1,"club--info--xp--bar__points","club--info--xp--bar__points-value"],["data-cy","clubProfileExpLabel",1,"label"],["data-cy","clubProfileExpValues",1,"amount"],[1,"club--info--xp--bar__points-value",3,"value"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"p",1),H(2),V(3,"translate"),m(),p(4,"p",2),H(5),V(6,"formatNumber"),m()(),p(7,"section",3)(8,"div",4),B(9,"icon-component",5),m(),p(10,"div",6),B(11,"progress-bar",7),m(),p(12,"div",8)(13,"p",9),H(14),V(15,"translate"),m(),p(16,"p",10),B(17,"number",11),H(18," / "),B(19,"number",11),m()()()),2&e&&(d(2),ze("",$(3,7,"CLUBS.CLUB_RANKING"),": "),d(3),se($(6,9,i.level)),d(4),l("icon",i.EIcons.CLUB_XP),d(2),l("progressBarConfig",i.progressBarConfig),d(3),ze(" ",$(15,11,"CLUBS.CLUB_EXPERIENCE"),": "),d(3),l("value",i.xp.currentLevelProgress),d(2),l("value",i.xp.nextLevelAt))},dependencies:[Dn,Qr,uf,qe,Go],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap}.club--info--xp--bar__container--ranking[_ngcontent-%COMP%], .club--info--xp--bar__points[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;padding:.5rem 0}.club--info--xp--bar__container--ranking[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%], .club--info--xp--bar__points[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-size:1.4rem}.club--info--xp--bar__container--ranking[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%], .club--info--xp--bar__points[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%]{font-size:1.6rem;font-weight:700;margin:0 .5rem}.club--info--xp--bar__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center}.club--info--xp--bar__level[_ngcontent-%COMP%]{position:relative;text-align:center;margin:0 1rem}.club--info--xp--bar__level--icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.club--info--xp--bar__progress[_ngcontent-%COMP%]{align-items:center;flex:1}"],changeDetection:0}),n})();const ZH=t=>({name:t});function aUt(t,n){if(1&t){const o=Ce();p(0,"button-icon",18),Y("onClick",function(){return oe(o),re(_().leave())}),m()}if(2&t){const o=_();l("loading",(null==o.currentClub?null:o.currentClub.actions.leave.inProgress)||(null==o.currentClub.details?null:o.currentClub.details.loadingState.isLoading))("icon",ne(3,ZH,o.EIcons.LOGOUT))("buttonModifier",o.EButtonModifier.BUTTON_CLUB_LOGOUT)}}function cUt(t,n){if(1&t){const o=Ce();p(0,"button-icon",19),Y("onClick",function(){return oe(o),re(_().edit())}),m()}if(2&t){const o=_();l("loading",null==o.currentClub?null:o.currentClub.actions.edit.inProgress)("icon",ne(3,ZH,o.EIcons.EDIT))("buttonModifier",o.EButtonModifier.BUTTON_ACTION)}}function lUt(t,n){if(1&t){const o=Ce();p(0,"button-icon",20),Y("onClick",function(){return oe(o),re(_().openReportPopup())}),m()}if(2&t){const o=_();l("icon",ne(2,ZH,o.EIcons.REPORT))("buttonModifier",o.EButtonModifier.BUTTON_ACTION)}}function uUt(t,n){if(1&t&&(p(0,"span",21),H(1),m()),2&t){const o=_();d(),se(o.info.clubProfile.description)}}function dUt(t,n){1&t&&(p(0,"span",22),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CLUBS.CLUB_EMPTY_STATUS")))}const pUt=t=>[t];function hUt(t,n){if(1&t&&(p(0,"p",23),B(1,"icon-component",24),H(2),V(3,"translate"),V(4,"exactDate"),m()),2&t){const o=_();d(),l("icon",o.EIcons.CROWN),d(),ze(" ",yt(3,2,"TEXT.LAST_SEEN",ne(8,pUt,yt(4,5,o.leaderLastSeen,"d.MM.y")))," ")}}const mUt=(t,n,o,e)=>({id:t,avatar:n,level:o,frame:e}),fUt=()=>({privacyTag:!0,tag:!0,location:!0,membersCount:!0,friendsCount:!0,levelRequirement:!0});let Y2=(()=>{var t;class n{constructor(e,i,r){this.memberFriends=[],this.leaveClub=new ke,this.reportClub=new ke,this.editClub=new ke,this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.timeService=Bn.instance,this.EMemberRole=qo,this.cdr=e,this.popup=r,this.lastSeenShowSpan=i.content.clubs.leaderLastSeenPeriod}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}ngOnDestroy(){this.hideReportPopup()}edit(){this.editClub.emit({clubId:this.info.clubProfile.id})}leave(){this.leaveClub.emit({clubId:this.info.clubProfile.id})}report(e){this.reportClub.emit({info:this.info,reason:e})}openReportPopup(){this.popupId=this.popup.confirm({buttons:{action:()=>this.report("BAD_CONTENT")},textParams:{translationKey:"CLUBS.REPORT_CLUB"}})}hideReportPopup(){this.popup.hide(this.popupId)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Dr),g(Cn))},t.\u0275cmp=pe({type:t,selectors:[["club-info"]],inputs:{info:"info",currentClubMemberInfo:"currentClubMemberInfo",currentClub:"currentClub",memberFriends:"memberFriends",leaderLastSeen:"leaderLastSeen"},outputs:{leaveClub:"leaveClub",reportClub:"reportClub",editClub:"editClub"},features:[it],decls:19,vars:22,consts:[[1,"club--info__wrapper"],[1,"club--info__model--title"],[1,"club--info__model--name--wrapper"],["data-cy","clubProfileName",1,"club--info__name"],["data-cy","clubProfileCurrency",1,"club--info__club--points",3,"points","showBackdrop"],[1,"club--info__title--buttons"],["class","club--info__button logout","data-cy","clubLeaveButton",3,"loading","icon","buttonModifier","onClick",4,"ngIf"],["class","club--info__button","data-cy","clubEditButton",3,"loading","icon","buttonModifier","onClick",4,"ngIf"],["class","club--info__button","data-cy","clubReportButton",3,"icon","buttonModifier","onClick",4,"ngIf"],[1,"club--info__avatar--wrapper"],["data-cy","clubProfileAvatar",1,"club--info__avatar",3,"club"],[1,"club--info__description--wrapper"],[1,"club--info__description"],["class","club--info__description--text","data-cy","clubProfileDescription",4,"ngIf"],["class","club--info__description--text",4,"ngIf"],[1,"club--info__description--footer",3,"clubProfile","membersCount","memberFriends","showInfo"],["class","club--info__label-last-seen",4,"ngIf"],[1,"club--info__xp--bar",3,"xp","level"],["data-cy","clubLeaveButton",1,"club--info__button","logout",3,"loading","icon","buttonModifier","onClick"],["data-cy","clubEditButton",1,"club--info__button",3,"loading","icon","buttonModifier","onClick"],["data-cy","clubReportButton",1,"club--info__button",3,"icon","buttonModifier","onClick"],["data-cy","clubProfileDescription",1,"club--info__description--text"],[1,"club--info__description--text"],[1,"club--info__label-last-seen"],[1,"club--info__icon-last-seen",3,"icon"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),H(4),m(),B(5,"club-points",4),m(),p(6,"div",5),U(7,aUt,1,5,"button-icon",6)(8,cUt,1,5,"button-icon",7)(9,lUt,1,4,"button-icon",8),m()(),p(10,"div",9),B(11,"club-avatar",10),p(12,"div",11)(13,"p",12),U(14,uUt,2,1,"span",13)(15,dUt,3,3,"span",14),m()()(),B(16,"club-info-footer",15),U(17,hUt,5,10,"p",16),B(18,"club-info-xp-bar",17),m()),2&e&&(d(4),se(i.info.clubProfile.name),d(),l("points",i.info.clubInventory.coins)("showBackdrop",!1),d(2),l("ngIf",i.currentClubMemberInfo),d(),l("ngIf",i.currentClubMemberInfo&&i.currentClubMemberInfo.role===i.EMemberRole.President),d(),l("ngIf",!i.currentClubMemberInfo),d(2),l("club",xd(16,mUt,i.info.clubProfile.id,i.info.clubProfile.avatar,i.info.clubProfile.level,i.info.clubInventory.frame)),d(3),l("ngIf",i.info.clubProfile.description),d(),l("ngIf",!i.info.clubProfile.description),d(),l("clubProfile",i.info.clubProfile)("membersCount",i.info.membersList.length)("memberFriends",i.memberFriends)("showInfo",pt(21,fUt)),d(),l("ngIf",i.leaderLastSeen&&i.timeService.getServerTimeS()-i.leaderLastSeen>i.lastSeenShowSpan),d(),l("xp",i.info.clubXp)("level",i.info.clubProfile.level))},dependencies:[Ne,Dn,ei,mf,tO,KH,K2,qe,kp],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.club--info__wrapper[_ngcontent-%COMP%]{height:100%;width:100%}.club--info__model--title[_ngcontent-%COMP%]{display:flex;width:100%;padding:5%}@media screen and (max-width: 568px){.club--info__model--title[_ngcontent-%COMP%]{padding:4%}}.club--info__model--name--wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;flex-flow:row wrap;flex:1;max-width:85%}.club--info__model--name--wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]{margin-top:.5rem}.club--info__club--points[_ngcontent-%COMP%]{width:auto;height:auto;display:inline-block}@media screen and (max-width: 568px){.club--info__club--points[_ngcontent-%COMP%]{font-size:1.6rem}}.club--info__name[_ngcontent-%COMP%]{width:100%;text-overflow:ellipsis;overflow:hidden}.club--info__title--buttons[_ngcontent-%COMP%]{display:flex;width:15%;justify-content:flex-end}.club--info__button[_ngcontent-%COMP%]{width:4rem;margin:0 .5rem}.club--info__avatar--wrapper[_ngcontent-%COMP%]{display:flex;padding:0 5%}@media screen and (max-width: 568px){.club--info__avatar--wrapper[_ngcontent-%COMP%]{padding:0 4%}}.club--info__avatar[_ngcontent-%COMP%]{width:30%;max-width:12rem;min-width:7rem;font-size:1.4rem}@media screen and (max-width: 380px){.club--info__avatar[_ngcontent-%COMP%]{font-size:1.2rem}}.club--info__description--wrapper[_ngcontent-%COMP%]{flex:1;padding-left:1rem;max-width:calc(100% - 7rem)}@media screen and (max-width: 568px){.club--info__description--wrapper[_ngcontent-%COMP%]{padding-left:.5rem}}.club--info__description[_ngcontent-%COMP%]{width:100%;height:100%}.club--info__description--footer[_ngcontent-%COMP%]{display:flex;width:100%;height:auto;margin-top:1rem;padding:0 5%}@media screen and (max-width: 568px){.club--info__description--footer[_ngcontent-%COMP%]{padding:0 4%}}.club--info__label-last-seen[_ngcontent-%COMP%]{width:100%;font-size:1.2em;font-weight:700;display:flex;justify-content:center;align-items:center}.club--info__label-last-seen[_ngcontent-%COMP%]   .club--info__icon-last-seen[_ngcontent-%COMP%]{font-size:1.2em;margin:0 .5rem}.club--info__xp--bar[_ngcontent-%COMP%]{padding:5%}@media screen and (max-width: 568px){.club--info__xp--bar[_ngcontent-%COMP%]{padding:4%}}"],changeDetection:0}),n})();const gUt=["dropdown"],_Ut=t=>[t];function vUt(t,n){if(1&t&&(p(0,"p",7),H(1),V(2,"translate"),V(3,"exactDate"),m()),2&t){const o=_().$implicit;d(),ze(" ",yt(2,1,"TEXT.LAST_SEEN",ne(7,_Ut,yt(3,4,o.onlineStatus.lastSeen,"d.MM.y")))," ")}}function bUt(t,n){if(1&t&&(p(0,"p",5),H(1),V(2,"translate"),m(),U(3,vUt,4,9,"p",6)),2&t){const o=n.$implicit,e=_();d(),ze(" ",$(2,2,e.getRoleString(e.profiles[o.profile.id].role))," "),d(2),l("ngIf",e.profiles[o.profile.id].role===e.EMemberRole.President&&e.timeService.getServerTimeS()-o.onlineStatus.lastSeen>e.lastSeenShowSpan)}}const e1=t=>({name:t});function CUt(t,n){if(1&t){const o=Ce();p(0,"menu-dropdown-item-wrapper")(1,"button-icon-text",14),Y("onClick",function(){oe(o);const i=_(2).$implicit,r=_();return re(r.promote(r.profiles[i.profile.id]))}),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2).$implicit,e=_();d(),l("bclass","club--members--list__menu--btn-bclass")("icon",ne(7,e1,e.EIcons.EDIT))("disabled",e.profiles[o.profile.id].actions.editRole.inProgress||e.profiles[o.profile.id].actions.kick.inProgress)("loading",e.profiles[o.profile.id].actions.editRole.inProgress),d(),se($(3,5,"CLUBS.PROMOTE"))}}function yUt(t,n){if(1&t){const o=Ce();p(0,"menu-dropdown-item-wrapper")(1,"button-icon-text",15),Y("onClick",function(){oe(o);const i=_(2).$implicit,r=_();return re(r.demote(r.profiles[i.profile.id]))}),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2).$implicit,e=_();d(),l("bclass","club--members--list__menu--btn-bclass")("icon",ne(7,e1,e.EIcons.EDIT))("disabled",e.profiles[o.profile.id].actions.editRole.inProgress||e.profiles[o.profile.id].actions.kick.inProgress)("loading",e.profiles[o.profile.id].actions.editRole.inProgress),d(),se($(3,5,"CLUBS.DEMOTE"))}}function SUt(t,n){if(1&t){const o=Ce();p(0,"menu-dropdown-item-wrapper")(1,"button-icon-text",16),Y("onClick",function(){oe(o);const i=_(2).$implicit,r=_();return re(r.kickMember(r.profiles[i.profile.id]))}),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2).$implicit,e=_();d(),l("bclass","club--members--list__menu--btn-bclass")("icon",ne(7,e1,e.EIcons.LOGOUT))("disabled",e.profiles[o.profile.id].actions.kick.inProgress)("loading",e.profiles[o.profile.id].actions.kick.inProgress),d(),se($(3,5,"CLUBS.KICK_OUT"))}}function wUt(t,n){if(1&t){const o=Ce();p(0,"menu-dropdown",9,10)(2,"menu-dropdown-item-wrapper")(3,"button-icon-text",11),Y("onClick",function(){oe(o);const i=_().$implicit,r=_();return re(r.addFriend(r.profiles[i.profile.id]))}),H(4),V(5,"translate"),m()(),p(6,"menu-dropdown-item-wrapper")(7,"button-icon-text",12),Y("onClick",function(){oe(o);const i=_().$implicit,r=_();return re(r.openChat(r.profiles[i.profile.id]))}),H(8),V(9,"translate"),m()(),U(10,CUt,4,9,"menu-dropdown-item-wrapper",13)(11,yUt,4,9,"menu-dropdown-item-wrapper",13)(12,SUt,4,9,"menu-dropdown-item-wrapper",13),m()}if(2&t){const o=_().$implicit,e=_();l("position",e.menuPosition)("icon",ne(18,e1,e.EIcons.UtilityVertical))("iconStyle","club--members--dropdown--btn"),d(3),l("bclass","club--members--list__menu--btn-bclass")("icon",ne(20,e1,e.EIcons.ADD_FRIEND))("disabled",e.friends[o.profile.id]||e.profiles[o.profile.id].actions.kick.inProgress),d(),se($(5,14,"CLUBS.ADD_FRIEND")),d(3),l("bclass","club--members--list__menu--btn-bclass")("icon",ne(22,e1,e.EIcons.SMALL_MESSAGE))("disabled",e.profiles[o.profile.id].actions.kick.inProgress),d(),se($(9,16,"CLUBS.SEND_MESSAGE")),d(2),l("ngIf",e.getRoleRequirement(e.EModuleAction.EditClubMemberRole).isFulfilled&&!e.isAtSameRankOrHigher(e.profiles[o.profile.id].role)&&null!=e.getOneRoleHigher(e.profiles[o.profile.id].role)),d(),l("ngIf",e.getRoleRequirement(e.EModuleAction.EditClubMemberRole).isFulfilled&&!e.isAtSameRankOrHigher(e.profiles[o.profile.id].role)&&null!=e.getOneRoleLower(e.profiles[o.profile.id].role)),d(),l("ngIf",e.getRoleRequirement(e.EModuleAction.KickClubMember).isFulfilled&&!e.isAtSameRankOrHigher(e.profiles[o.profile.id].role))}}function TUt(t,n){if(1&t&&U(0,wUt,13,24,"menu-dropdown",8),2&t){const o=n.$implicit,e=_();l("ngIf",e.currentClubMemberInfo&&e.currentClubMemberInfo.userId!==o.profile.id)}}function PUt(t,n){1&t&&(p(0,"div",17)(1,"p",18),H(2),V(3,"translate"),m()()),2&t&&(d(2),ze(" ",$(3,1,"CLUBS.CLUB_PAGE_ADD_PLAYERS_HINT")," "))}let J2=(()=>{var t;class n{constructor(e,i,r){this.friendsList=[],this.editRole=new ke,this.kick=new ke,this.sendMessage=new ke,this.sendFriendRequest=new ke,this.addMoreSlots=new ke,this.profilesList=[],this.friends={},this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.EMemberRole=qo,this.menuPosition=Og.EMenuPosition.BottomLeft,this.timeService=Bn.instance,this.EModuleAction=nt.EModuleAction,this.cdr=e,this.permissions=i,this.lastSeenShowSpan=r.content.clubs.leaderLastSeenPeriod}ngOnInit(){this.configListUsers={onlineIndication:!0,showPartOfTotal:!0,textTitle:"CLUBS.ONLINE_MEMBERS",textUserLabel:"CLUBS.CLUB_ROLE_OFFICER"},this.createProfiles(),this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){(e.info&&!e.info.firstChange||e.currentClubMemberInfo&&!e.currentClubMemberInfo.firstChange||e.friends&&!e.friends.firstChange)&&(this.createProfiles(),this.cdr.detectChanges())}showAddSlotsPopup(){this.addMoreSlots.emit()}getOneRoleHigher(e){return Om.getNextHigher(e)}getOneRoleLower(e){return Om.getNextLower(e)}promote(e){this.editRole.emit({member:e,newRole:Om.getNextHigher(e.role)})}demote(e){this.editRole.emit({member:e,newRole:Om.getNextLower(e.role)})}kickMember(e){this.kick.emit({userId:e.userId,username:e.info.profile.username.currentUsername})}openChat(e){this.sendMessage.emit({userId:e.userId})}addFriend(e){this.sendFriendRequest.emit({user:e.info.profile})}isAtSameRankOrHigher(e){return!this.currentClubMemberInfo||Om.compare(e,this.currentClubMemberInfo.role)>=0}getRoleString(e){return $h.getMemberRoleTranslationKey(e)}createProfiles(){this.profilesList=this.info.clubMembers.map(e=>e.info),this.profiles=Yie()(this.info.clubMembers,"userId"),this.friends=Yie()(this.friendsList,"id"),this.onlineMembersCount=this.profilesList.filter(e=>{var i;return!(null==e||null===(i=e.onlineStatus)||void 0===i||!i.isOnline)}).length}getRoleRequirement(e){return this.permissions.getClubActionPermission(this.info.clubProfile,e).roleRequirement}openDropdown(){var e;null===(e=this.dropdown)||void 0===e||e.open()}closeDropdown(){var e;null===(e=this.dropdown)||void 0===e||e.close()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Ti),g(Dr))},t.\u0275cmp=pe({type:t,selectors:[["club-members-list"]],viewQuery:function(e,i){if(1&e&&$e(gUt,5),2&e){let r;je(r=He())&&(i.dropdown=r.first)}},inputs:{info:"info",currentClubMemberInfo:"currentClubMemberInfo",friendsList:"friendsList",showBuyMoreSlotsButton:"showBuyMoreSlotsButton"},outputs:{editRole:"editRole",kick:"kick",sendMessage:"sendMessage",sendFriendRequest:"sendFriendRequest",addMoreSlots:"addMoreSlots"},features:[it],decls:6,vars:8,consts:[[1,"club--members--list__list--box",3,"listUsers","configListUsers","shownUsersCount","currentListLength","totalListLength","showBuyMoreSlotsButton","searchedUser","addSlotButtonClicked"],["slot","user-label"],["userLabel",""],["buttons",""],["class","club--members--list__more--players",4,"ngIf"],["data-cy","clubMembersRole",1,"club--members--list__label"],["class","club--members--list__label-last-seen",4,"ngIf"],[1,"club--members--list__label-last-seen"],["data-cy","clubMembersActionsButton",3,"position","icon","iconStyle",4,"ngIf"],["data-cy","clubMembersActionsButton",3,"position","icon","iconStyle"],["dropdown",""],["data-cy","clubMembersAddFriend",1,"club--members--list__menu--btn",3,"bclass","icon","disabled","onClick"],["data-cy","clubMembersSendMessage",1,"club--members--list__menu--btn",3,"bclass","icon","disabled","onClick"],[4,"ngIf"],["data-cy","clubMembersPromote",1,"club--members--list__menu--btn",3,"bclass","icon","disabled","loading","onClick"],["data-cy","clubMembersDemote",1,"club--members--list__menu--btn",3,"bclass","icon","disabled","loading","onClick"],["data-cy","clubMembersKick",1,"club--members--list__menu--btn",3,"bclass","icon","disabled","loading","onClick"],[1,"club--members--list__more--players"],[1,"club--members--list__hint"]],template:function(e,i){1&e&&(p(0,"list-users-box",0),Y("addSlotButtonClicked",function(){return i.showAddSlotsPopup()}),U(1,bUt,4,4,"ng-template",1,2,ft)(3,TUt,1,1,"ng-template",null,3,ft),m(),U(5,PUt,4,3,"div",4)),2&e&&(l("listUsers",i.profilesList)("configListUsers",i.configListUsers)("shownUsersCount",i.profilesList.length)("currentListLength",i.onlineMembersCount)("totalListLength",i.profilesList.length)("showBuyMoreSlotsButton",i.showBuyMoreSlotsButton)("searchedUser",""),d(5),l("ngIf",i.currentClubMemberInfo&&i.getRoleRequirement(i.EModuleAction.InviteClubMember).isFulfilled))},dependencies:[Ne,mv,so,Og,FL,qe,kp],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.club--members--list__list--box[_ngcontent-%COMP%]{margin:1rem}.club--members--list__menu--btn[_ngcontent-%COMP%]{white-space:nowrap}.club--members--list__more--players[_ngcontent-%COMP%]{text-align:center;display:flex;flex-flow:row wrap;margin:1rem;justify-content:center}.club--members--list__hint[_ngcontent-%COMP%]{width:100%;margin:1rem 0;text-align:center}.club--members--list__more--players--button[_ngcontent-%COMP%]{margin:0 1rem}"],changeDetection:0}),n})(),QH=(()=>{var t;class n{constructor(e,i,r,s,a){this.subscriptions=new is.List,this.cdr=e,this.clientClubsService=i,this.store=r,this.feedback=s,this.toaster=a,this.currentClub=this.store.clubs.selectCurrentClub()}ngOnInit(){this.leaderLastSeen=this.info.membersList.find(e=>e.role===qo.President).info.onlineStatus.lastSeen,this.subscriptions.add(this.store.clubs.subscribeCurrentClub().subscribe(e=>{this.currentClub=e,this.cdr.detectChanges()})),this.subscriptions.add(this.store.friends.subscribeFriends().subscribe(e=>{this.memberFriends=e.filter(i=>!!this.info.membersList.find(r=>r.userId===i.id)).map(i=>i.id),this.cdr.detectChanges()})),this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new is.List}editClub(e){this.clientClubsService.openEditClubScreen(this.info.clubProfile,this.info.clubInventory)}leaveClub(){this.clientClubsService.startLeaveClubProcedure(this.info.clubProfile.id).catch(e=>console.warn(e))}reportClub(e){var i=this;return f(function*(){try{var r,s;yield i.feedback.reportClub(e.info.clubProfile.id,null===(r=e.info.membersList.find(c=>c.role===qo.President))||void 0===r?void 0:r.userId,e.reason),i.toaster.success("REPORT.SUCCESSFUL_REPORT"),null===(s=i.clubInfoCmp)||void 0===s||s.hideReportPopup()}catch(c){var a;console.warn(c),c instanceof et.Feedback.Cooldown?(i.toaster.success("REPORT.SUCCESSFUL_REPORT"),null===(a=i.clubInfoCmp)||void 0===a||a.hideReportPopup()):i.toaster.error(c instanceof lt.NetworkError?"REPORT.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Au),g(J),g(HI),g(Dt))},t.\u0275cmp=pe({type:t,selectors:[["club-info-smart"]],viewQuery:function(e,i){if(1&e&&$e(Y2,5),2&e){let r;je(r=He())&&(i.clubInfoCmp=r.first)}},inputs:{info:"info",currentClubMemberInfo:"currentClubMemberInfo"},features:[it],decls:1,vars:5,consts:[[1,"club--info--smart__info--cmp",3,"info","currentClubMemberInfo","currentClub","memberFriends","leaderLastSeen","leaveClub","reportClub","editClub"]],template:function(e,i){1&e&&(p(0,"club-info",0),Y("leaveClub",function(){return i.leaveClub()})("reportClub",function(s){return i.reportClub(s)})("editClub",function(s){return i.editClub(s)}),m()),2&e&&l("info",i.info)("currentClubMemberInfo",i.currentClubMemberInfo)("currentClub",i.currentClub)("memberFriends",i.memberFriends)("leaderLastSeen",i.leaderLastSeen)},dependencies:[Y2],styles:[".club--info--smart__info--cmp[_ngcontent-%COMP%]{height:auto}"],changeDetection:0}),n})();function IUt(t,n){if(1&t){const o=Ce();p(0,"club-members-list",2),Y("editRole",function(i){return oe(o),re(_().editRole(i))})("kick",function(i){return oe(o),re(_().kick(i))})("sendMessage",function(i){return oe(o),re(_().sendMessage(i))})("sendFriendRequest",function(i){return oe(o),re(_().sendFriendRequest(i))})("addMoreSlots",function(){return oe(o),re(_().showAddSlotsPopup())}),m()}if(2&t){const o=_();l("info",o.info)("currentClubMemberInfo",o.currentClubMemberInfo)("friendsList",o.friendsList)("showBuyMoreSlotsButton",o.showBuyMoreSlotsButton)}}function MUt(t,n){1&t&&B(0,"loader-image",3),2&t&&l("delay",1e3)("transparentBG",!0)}let YH=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.promises=new ie.List,this.cdr=e,this.clubsService=i,this.chatService=c,this.friendsService=r,this.toastService=s,this.store=a,this.chatService=c,this.constants=u,this.popupService=h,this.permissionsService=b,this.shopService=w,this.shop=R,this.clientConfigService=G}ngOnInit(){var e=this;return f(function*(){e.friendsSubscription=e.store.friends.subscribeFriends().subscribe(i=>e.friendsList=i),yield e.getStore(),e.showBuyMoreSlotsButton=e.checkIfNeedToShowBuyMoreSlotsButton(),e.cdr.detectChanges()})()}ngOnChanges(e){e.info&&this.showBuyMoreSlotsButton&&(this.showBuyMoreSlotsButton=this.checkIfNeedToShowBuyMoreSlotsButton(),this.cdr.detectChanges())}ngOnDestroy(){this.friendsSubscription&&this.friendsSubscription.unsubscribe(),this.promises.forEach(e=>e.cancel()),this.popupService.hide(this.popupId)}checkIfNeedToShowBuyMoreSlotsButton(){var e;const i=this.store.clubs.selectCurrentClubState();if((null==i||null===(e=i.clubProfile)||void 0===e?void 0:e.id)!==this.info.clubProfile.id||!this.permissionsService.getClubActionPermission(this.info.clubProfile,nt.EModuleAction.EditMemberLimit).isPermitted)return!1;const s=this.clientConfigService.getConfig().content.clubs.constraints.memberMaxLimit;return this.clubModifierItem&&this.info.clubProfile.settings.memberLimit<s}getStore(){var e=this;return f(function*(){try{var i;e.loadingStore=!0,e.cdr.detectChanges();const r=yield e.shop.load({useCache:!0});e.clubModifierItem=null===(i=r.products.find(s=>s.item.type===Fe.TG.ClubExtender))||void 0===i?void 0:i.item}catch(r){console.warn(r)}finally{e.loadingStore=!1}})()}editRole(e){var i=this;return f(function*(){var r;const s=i.createTask(i.clubsService.startEditMemberRoleProcedure({userId:e.member.userId,user:e.member.info.profile,currentRole:e.member.role,newRole:e.newRole,clubId:i.info.clubProfile.id}));null===(r=i.membersList)||void 0===r||r.closeDropdown();try{yield s}catch(a){console.warn(a),i.handleError(a)}finally{i.promises.remove(s)}})()}kick(e){var r,i=this;this.popupService.confirm({textParams:{translationKey:"CLUBS.KICK_MEMBER_CONFIRM",params:[e.username]},buttons:{action:(r=f(function*(){var s;const a=i.createTask(i.clubsService.kickMember({clubId:i.info.clubProfile.id,userId:e.userId}));null===(s=i.membersList)||void 0===s||s.closeDropdown();try{yield a}catch(c){console.warn(c),i.handleError(c)}finally{i.promises.remove(a)}}),function(){return r.apply(this,arguments)})}})}sendMessage(e){var i;null===(i=this.membersList)||void 0===i||i.closeDropdown(),this.chatService.openPrivateChat({userId:e.userId})}sendFriendRequest(e){var i=this;return f(function*(){var r;const s=i.createTask(i.friendsService.sendFriendRequest(e.user));null===(r=i.membersList)||void 0===r||r.closeDropdown();try{yield s}catch(a){console.warn(a),a instanceof yh.NotValid?i.toastService.warn("POPUP.FRIEND_REQUEST_EXISTS"):i.handleError(a)}finally{i.promises.remove(s)}})()}createTask(e){const i=new Jn(e);return this.promises.add(i),i}handleError(e){e instanceof lt.NetworkError?this.toastService.error("ERRORS.CONNECTION_ERROR"):e instanceof VU?this.toastService.error("CLUBS.EDIT_ROLE_MEMBER_STATUS_OUTDATED_ERROR"):e instanceof Cr?console.log("Promise cancelled"):e instanceof et.Permissions.RequirementNotMeet?this.permissionsService.showFailedRequirementsToUser(e):e instanceof $f?e.userId===this.store.selectUserState().profile.id?this.toastService.error("CLUBS.USER_NOT_IN_CLUB"):this.toastService.error("CLUBS.NO_LONGER_MEMBER"):this.toastService.error(e instanceof hb?"CLUBS.CLUB_ROLE_ACTION_OUTDATED":e instanceof lt.ServerUnavailableError?"CLUBS.SERVICE_UNAVAILABLE":e instanceof lt.TargetUserBlockedError?"CHAT.PRIVATE_CHAT.TARGET_USER_BLOCKED":e instanceof lt.SourceUserBlockedError?"CHAT.PRIVATE_CHAT.SOURCE_USER_BLOCKED":"ERRORS.SOMETHING_WRONG")}showAddSlotsPopup(){this.shopService.openItemPopup({item:this.clubModifierItem,exchangeData:{clubId:this.info.clubProfile.id},store:this.store.shop.customization.selectState().model}).catch(e=>console.warn(e))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Au),g(Tu),g(Dt),g(J),g(El),g(tn),g(Cn),g(Pi),g(Jm),g(Ko),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["club-members-list-smart"]],viewQuery:function(e,i){if(1&e&&$e(J2,5),2&e){let r;je(r=He())&&(i.membersList=r.first)}},inputs:{info:"info",currentClubMemberInfo:"currentClubMemberInfo"},features:[it],decls:2,vars:2,consts:[["class","club--home--page__members--list",3,"info","currentClubMemberInfo","friendsList","showBuyMoreSlotsButton","editRole","kick","sendMessage","sendFriendRequest","addMoreSlots",4,"ngIf"],[3,"delay","transparentBG",4,"ngIf"],[1,"club--home--page__members--list",3,"info","currentClubMemberInfo","friendsList","showBuyMoreSlotsButton","editRole","kick","sendMessage","sendFriendRequest","addMoreSlots"],[3,"delay","transparentBG"]],template:function(e,i){1&e&&U(0,IUt,1,4,"club-members-list",0)(1,MUt,1,2,"loader-image",1),2&e&&(l("ngIf",!i.loadingStore),d(),l("ngIf",i.loadingStore))},dependencies:[Ne,Oi,J2],styles:[".club--home--page__members--list[_ngcontent-%COMP%]{height:auto}"],changeDetection:0}),n})();const OUt=t=>({name:t});function EUt(t,n){if(1&t){const o=Ce();p(0,"notification-button-icon",8),Y("onClick",function(){return oe(o),re(_().$implicit.action())}),V(1,"numberLimit"),m()}if(2&t){const o=_().$implicit,e=_(2);l("icon",ne(9,OUt,o.icon))("text",o.text)("isNotificationShown",e.unreadConversations)("notificationValue",yt(1,6,e.unreadConversations,99))("buttonModifier",o.modifier)("disabled",o.isDisabled())}}function xUt(t,n){if(1&t&&(B(0,"share-button",9),V(1,"translate")),2&t){const o=_().$implicit;l("text",yt(1,1,o.text.key,o.text.params))}}function AUt(t,n){if(1&t&&(Tn(0),U(1,EUt,2,11,"notification-button-icon",6)(2,xUt,2,4,"share-button",7),Pn()),2&t){const o=n.$implicit,e=_(2);d(),l("ngIf",o.type===e.EButtonType.ActionButton),d(),l("ngIf",o.type===e.EButtonType.ShareButton)}}function RUt(t,n){if(1&t&&(p(0,"div",4),U(1,AUt,3,2,"ng-container",5),m()),2&t){const o=_();d(),l("ngForOf",o.buttons)("ngForTrackBy",o.trackByButtons)}}const kUt=(t,n,o,e)=>({clubProfile:t,clubXp:n,clubInventory:o,membersList:e});let sO=(()=>{var t;class n{constructor(e,i,r,s,a){this.contextEnum=Wr,this.buttons=[],this.EButtonType=n.EButtonType,this.cdr=e,e.detach(),this.chatService=i,this.store=r,this.permissions=s,this.clientConfigService=a}ngOnInit(){this.currentClubMemberInfo&&(this.clubChatSubscription=this.store.subscribePublicUnreadConversationsCount().subscribe(e=>{this.unreadConversations=e.clubTotal,this.updateView()}),this.createButtons()),this.updateView()}ngOnChanges(e){this.onInputsUpdated()}ngOnDestroy(){var e;null===(e=this.clubChatSubscription)||void 0===e||e.unsubscribe()}onInputsUpdated(){this.createButtons(),this.updateView()}updateView(){this.cdr.detectChanges()}trackByButtons(e,i){return i.id}createButtons(){this.buttons=[{id:"chat",type:n.EButtonType.ActionButton,icon:ve.EIcons.CLUB_PAGE,modifier:ve.EButtonModifier.BUTTON_LIGHT,text:{key:"BUTTON.OPEN_CHAT"},isDisabled:()=>!this.permissions.getActionPermission(nt.EPermissionModule.ClubChat,nt.EModuleAction.Open).contextRequirement.isFulfilled,action:()=>this.chatService.openClubChat()}],this.club.clubProfile.settings.privacy!==Or.Closed&&this.buttons.push({id:"share",type:n.EButtonType.ShareButton,text:{key:"CLUBS.SHARE_CLUB_TEXT",params:[this.club.clubProfile.name,this.clientConfigService.getConfig().platform.name,"https://".concat(this.clientConfigService.getConfig().platform.domain,"/play/#/games(").concat(Fn,":").concat(Ai,"/games/club/").concat(this.club.clubProfile.id,")")]},isDisabled:()=>!1})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(El),g(J),g(Ti),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["club-home-page"]],inputs:{club:"club",currentClubMemberInfo:"currentClubMemberInfo"},features:[it],decls:4,vars:10,consts:[[1,"club--home--page__wrapper"],[1,"club--home--page__club--info",3,"info","currentClubMemberInfo"],["class","club--home--page__buttons-container",4,"ngIf"],[1,"club--home--page__members--list",3,"info","currentClubMemberInfo"],[1,"club--home--page__buttons-container"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","club--home--page__button","data-cy","clubProfileChatButton",3,"icon","text","isNotificationShown","notificationValue","buttonModifier","disabled","onClick",4,"ngIf"],["class","club--home--page__button","data-cy","clubProfileShareButton",3,"text",4,"ngIf"],["data-cy","clubProfileChatButton",1,"club--home--page__button",3,"icon","text","isNotificationShown","notificationValue","buttonModifier","disabled","onClick"],["data-cy","clubProfileShareButton",1,"club--home--page__button",3,"text"]],template:function(e,i){1&e&&(p(0,"section",0),B(1,"club-info-smart",1),U(2,RUt,2,2,"div",2),B(3,"club-members-list-smart",3),m()),2&e&&(d(),l("info",xd(5,kUt,i.club.clubProfile,i.club.clubXp,i.club.clubInventory,i.club.clubMembers))("currentClubMemberInfo",i.currentClubMemberInfo),d(),l("ngIf",null==i.buttons?null:i.buttons.length),d(),l("info",i.club)("currentClubMemberInfo",i.currentClubMemberInfo))},dependencies:[Mt,Ne,bM,au,QH,YH,qe,L_],styles:["[_nghost-%COMP%]{width:100%}.club--home--page__wrapper[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:100%;width:100%}.club--home--page__club--info[_ngcontent-%COMP%], .club--home--page__members--list[_ngcontent-%COMP%]{height:auto}.club--home--page__buttons-container[_ngcontent-%COMP%]{display:flex;padding:0 5%}@media only screen and (max-width: 568px){.club--home--page__buttons-container[_ngcontent-%COMP%]{padding:0 4%}}.club--home--page__button[_ngcontent-%COMP%]{display:block;width:48%;margin:auto}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EButtonType||(t.EButtonType={}))[o.ActionButton=0]="ActionButton",o[o.ShareButton=1]="ShareButton"}(sO||(sO={}));var yf=function(t){return t.DonateItem="donateItem",t.ClaimReward="claimReward",t.Accept="accept",t.Reject="reject",t.Cancel="cancel",t}(yf||{});function DUt(t,n){if(1&t&&(p(0,"div",2),B(1,"club-contribution-icon-component",3),m()),2&t){const o=_();l("key","TEXT.YOU_GET"),d(),l("value",o.coinShardsReward)}}const Nwe=t=>[t];function BUt(t,n){if(1&t){const o=Ce();p(0,"button-text",7),Y("onClick",function(){return oe(o),re(_().$implicit.action.callback())}),H(1),V(2,"translate"),m()}if(2&t){const o=_().$implicit;l("buttonModifier",o.buttonModifier)("loading",o.loading)("bclass","club--notification--button--bclass")("disabled",o.disabled),d(),ze(" ",yt(2,5,o.text.key,ne(8,Nwe,o.text.params))," ")}}const Fwe=t=>({name:t});function NUt(t,n){if(1&t){const o=Ce();p(0,"button-icon",8),Y("onClick",function(){return oe(o),re(_().$implicit.action.callback())}),m()}if(2&t){const o=_().$implicit;l("buttonModifier",o.buttonModifier)("icon",ne(5,Fwe,o.icon))("loading",o.loading)("bclass","club--notification--button--bclass")("disabled",o.disabled)}}function FUt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",9),Y("onClick",function(){return oe(o),re(_().$implicit.action.callback())}),H(1),V(2,"translate"),m()}if(2&t){const o=_().$implicit;l("buttonModifier",o.buttonModifier)("icon",ne(9,Fwe,o.icon))("loading",o.loading)("bclass","club--notification--button--bclass")("disabled",o.disabled),d(),ze(" ",yt(2,6,o.text.key,ne(11,Nwe,o.text.params))," ")}}function UUt(t,n){if(1&t&&(Tn(0),U(1,BUt,3,10,"button-text",4)(2,NUt,1,7,"button-icon",5)(3,FUt,3,13,"button-icon-text",6),Pn()),2&t){const o=n.$implicit;d(),l("ngIf",o.text&&!o.icon),d(),l("ngIf",o.icon&&!o.text),d(),l("ngIf",o.icon&&o.text)}}let X2=(()=>{var t;class n{constructor(e){this.buttons=[],this.cdr=e}ngOnInit(){this.buttons=this.notification.actions.map(e=>this.createButton(e)),this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){e.notification.firstChange||(this.buttons=this.notification.actions.map(i=>this.createButton(i)),this.cdr.detectChanges())}trackByFn(e,i){return e}createButton(e){const i={id:"",action:e,disabled:e.isDisabled(),loading:e.isLoading(),buttonModifier:ve.EButtonModifier.BUTTON_ATTENTION};switch(e.type){case yf.DonateItem:i.buttonModifier=ve.EButtonModifier.BUTTON_ACTION,this.notification.params.item.type===Fe.TG.ChipPack?(i.text={key:"BUTTON.DONATE_CHIPS"},i.icon=ve.EIcons.CHIP):this.notification.params.item.type===Fe.TG.GemsPack?(i.text={key:"BUTTON.DONATE_GEMS"},i.icon=ve.EIcons.ICON_GEMS):this.notification.params.item.type===Fe.TG.Vip&&(i.text={key:"BUTTON.DONATE_VIP"},i.icon=ve.EIcons.CROWN);break;case yf.Accept:i.icon=ve.EIcons.CHECK;break;case yf.Reject:i.buttonModifier=ve.EButtonModifier.BUTTON_NEGATIVE,i.icon=ve.EIcons.CLOSE;break;case yf.Cancel:i.buttonModifier=ve.EButtonModifier.BUTTON_NEGATIVE,i.text={key:"CLUBS.CANCEL_INVITE"};break;case yf.ClaimReward:i.text={key:"TEXT.CLAIM"}}return i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-notification-buttons"]],inputs:{notification:"notification",coinShardsReward:"coinShardsReward"},features:[it],decls:2,vars:3,consts:[["class","club--notification--coin-shard-reward","text-with-placeholders","",3,"key",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["text-with-placeholders","",1,"club--notification--coin-shard-reward",3,"key"],[3,"value"],["class","club--notification--button",3,"buttonModifier","loading","bclass","disabled","onClick",4,"ngIf"],["class","club--notification--button",3,"buttonModifier","icon","loading","bclass","disabled","onClick",4,"ngIf"],["class","club--notification--button btn-icon-text",3,"buttonModifier","icon","loading","bclass","disabled","onClick",4,"ngIf"],[1,"club--notification--button",3,"buttonModifier","loading","bclass","disabled","onClick"],[1,"club--notification--button",3,"buttonModifier","icon","loading","bclass","disabled","onClick"],[1,"club--notification--button","btn-icon-text",3,"buttonModifier","icon","loading","bclass","disabled","onClick"]],template:function(e,i){1&e&&U(0,DUt,2,2,"div",0)(1,UUt,4,3,"ng-container",1),2&e&&(l("ngIf",i.coinShardsReward&&i.buttons.length),d(),l("ngForOf",i.buttons)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,Ne,oc,pn,ei,so,D0,qe],styles:["[_nghost-%COMP%]{display:block;position:relative}.club--notification--buttons__wrapper[_ngcontent-%COMP%]{display:flex}.club--notification--button[_ngcontent-%COMP%]{margin:0 .5rem;flex:1;max-width:16rem}.club--notification--button.btn-icon-text[_ngcontent-%COMP%]{min-width:10rem!important}.club--notification--coin-shard-reward[_ngcontent-%COMP%]{position:absolute;bottom:calc(100% + 1rem);left:50%;transform:translate(-50%);font-size:1.4rem!important}@media only screen and (max-width: 768px){.club--notification--coin-shard-reward[_ngcontent-%COMP%]{bottom:calc(100% + .5rem)}}"],changeDetection:0}),n})();const GUt=t=>[t];let eD=(()=>{var t;class n{constructor(e){this.EIcons=ve.EIcons,this.text={key:""},this.iconSettings={icon:"",color:void 0},this.cdr=e}ngOnInit(){switch(this.notification.type){case Ao.InviteRequest:void 0===this.notification.params.requestStatus&&(this.iconSettings={icon:ve.EIcons.CLOSE,color:t1.Negative},this.text={key:"LABEL.CANCELED"});case Ao.JoinRequest:switch(this.notification.params.requestStatus){case Di.UserRejected:case Di.ClubRejected:this.iconSettings={icon:ve.EIcons.CLOSE,color:t1.Negative},this.text={key:"LABEL.REJECTED"};break;case Di.Accepted:this.iconSettings={icon:ve.EIcons.TICK_ICON,color:t1.Positive},this.text={key:"LABEL.ACCEPTED"}}break;default:this.notification.isHandled&&this.notification.isHandled()?(this.iconSettings={icon:ve.EIcons.TICK_ICON,color:t1.Positive},this.text={key:"CLUBS.COMPLETED"}):this.notification.hasExpired&&this.notification.hasExpired()&&(this.iconSettings={icon:ve.EIcons.CLOSE,color:t1.Negative},this.text={key:"CLUBS.EXPIRED"})}this.cdr.detach(),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-notification-result-status"]],inputs:{notification:"notification"},decls:6,vars:10,consts:[[1,"club__notification-result__container"],[1,"club__notification-result__label"],[3,"icon"]],template:function(e,i){1&e&&(p(0,"container-component",0)(1,"p",1),B(2,"icon-component",2),p(3,"span"),H(4),V(5,"translate"),m()()()),2&e&&(d(2),ni("club__notification-result__icon--status ",i.iconSettings.color,""),l("icon",i.iconSettings.icon),d(2),se(yt(5,5,i.text.key,ne(8,GUt,i.text.params))))},dependencies:[Dn,Ga,qe],styles:["[_nghost-%COMP%]{position:relative;display:block;height:4rem}@media only screen and (max-width: 768px){[_nghost-%COMP%]{height:3.5rem}}.club__notification-result__container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:center;align-items:center}.club__notification-result__label[_ngcontent-%COMP%]{height:100%;text-align:center;display:flex;justify-content:center;align-items:center;padding:0 .7em}@media only screen and (max-width: 480px){.club__notification-result__label[_ngcontent-%COMP%]{padding:0 .5em}}.club__notification-result__icon--status[_ngcontent-%COMP%]{margin:auto 1rem auto 0;max-width:2rem}.club__notification-result__icon--status.positive[_ngcontent-%COMP%]{font-size:3rem;margin:auto 0;max-width:3rem}@media only screen and (max-width: 768px){.club__notification-result__icon--status[_ngcontent-%COMP%]{font-size:2rem!important;margin:auto .5rem auto 0}}"],changeDetection:0}),n})();var t1=function(t){return t.Positive="positive",t.Negative="negative",t}(t1||{});function VUt(t,n){if(1&t&&(B(0,"span",13),V(1,"translate")),2&t){const o=_();l("innerHTML",yt(1,1,o.notification.title.key,o.notification.title.params),Yn)}}function zUt(t,n){if(1&t&&(p(0,"span"),H(1),m()),2&t){const o=_();d(),ze("",o.notification.title," ")}}function jUt(t,n){if(1&t&&(p(0,"username",14),H(1),m()),2&t){const o=_();Uo("no-title",!o.notification.title||""===o.notification.title),l("userProfile",o.notification.user)("hasVerifiedBadge",!0),d(),se(o.notification.user.username.currentUsername)}}const HUt=t=>[t];function qUt(t,n){if(1&t&&(p(0,"p"),B(1,"span",15),V(2,"translate"),m()),2&t){const o=_();d(),l("innerHTML",yt(2,1,o.notification.text.key,ne(4,HUt,o.notification.text.params)),Yn)}}function WUt(t,n){if(1&t&&(p(0,"p")(1,"span",16),H(2),m()()),2&t){const o=_();d(2),se(o.notification.text)}}const $Ut=(t,n)=>({class:t,iconClass:n});function KUt(t,n){if(1&t&&(p(0,"p")(1,"span",17),B(2,"currency-label",18),m()()),2&t){const o=_();d(),l("key",o.notification.text.key),d(),l("value",o.notification.params.item.amount)("type",o.notification.params.item.type===o.EItemType.ChipPack?o.ECurrencyType.Chips:o.ECurrencyType.Gems)("valueConfig",cn(4,$Ut,"club--notification__currency-value "+(o.notification.params.item.type===o.EItemType.ChipPack?o.ECurrencyType.Chips:o.ECurrencyType.Gems),"club--notification__currency-value "+(o.notification.params.item.type===o.EItemType.ChipPack?o.ECurrencyType.Chips:o.ECurrencyType.Gems)))}}function ZUt(t,n){if(1&t&&B(0,"club-notification-buttons",19),2&t){const o=_();l("coinShardsReward",o.notification.coinShardsReward?o.notification.coinShardsReward:void 0)("notification",o.notification)}}function QUt(t,n){1&t&&B(0,"club-notification-result-status",20),2&t&&l("notification",_().notification)}let tD=(()=>{var t;class n{constructor(e){this.EActivityFeedItemType=Ao,this.EItemType=Fe.TG,this.ECurrencyType=ln,this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}isTranslatableText(e){return"object"==typeof e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-activity-avatar-notification"]],inputs:{notification:"notification"},features:[it],decls:16,vars:13,consts:[[1,"club--notification--avatar__wrapper"],[1,"club--notification--avatar__container"],[1,"club--notification--avatar__avatar--wrapper"],[1,"club--notification--avatar__container--avatar"],[1,"club--notification--avatar",3,"user","isLink","hasUsername","hasLevel"],[1,"club--notification--avatar__text--wrapper"],[1,"club--notification--avatar__title"],[3,"innerHTML",4,"ngIf"],[4,"ngIf"],["class","highlighted club--notification__username",3,"userProfile","hasVerifiedBadge","no-title",4,"ngIf"],["class","club--notification--avatar__buttons",3,"coinShardsReward","notification",4,"ngIf"],["class","club--notification--avatar__buttons",3,"notification",4,"ngIf"],[1,"club--notification--avatar__elapsed--time",3,"timestampSeconds"],[3,"innerHTML"],[1,"highlighted","club--notification__username",3,"userProfile","hasVerifiedBadge"],[1,"club--notification--avatar__value",3,"innerHTML"],[1,"club--notification--avatar__value"],["text-with-placeholders","",1,"club--notification--avatar__value",3,"key"],[1,"club--notification__currency-value",3,"value","type","valueConfig"],[1,"club--notification--avatar__buttons",3,"coinShardsReward","notification"],[1,"club--notification--avatar__buttons",3,"notification"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"container-component",1)(2,"div",2)(3,"div",3),B(4,"avatar",4),m(),p(5,"div",5)(6,"p",6),U(7,VUt,2,4,"span",7)(8,zUt,2,1,"span",8)(9,jUt,2,5,"username",9),m(),U(10,qUt,3,6,"p",8)(11,WUt,3,1,"p",8)(12,KUt,3,7,"p",8),m(),U(13,ZUt,1,2,"club-notification-buttons",10)(14,QUt,1,1,"club-notification-result-status",11),m(),B(15,"elapsed-time",12),m()()),2&e&&(d(4),l("user",i.notification.user)("isLink",!0)("hasUsername",!1)("hasLevel",!1),d(3),l("ngIf",i.notification.title&&i.isTranslatableText(i.notification.title)),d(),l("ngIf",i.notification.title&&!i.isTranslatableText(i.notification.title)),d(),l("ngIf",!i.notification.title),d(),l("ngIf",i.notification.text&&!(i.notification.type===i.EActivityFeedItemType.DonateRequest&&(i.notification.params.item.type===i.EItemType.ChipPack||i.notification.params.item.type===i.EItemType.GemsPack))&&i.isTranslatableText(i.notification.text)),d(),l("ngIf",i.notification.text&&!(i.notification.type===i.EActivityFeedItemType.DonateRequest&&(i.notification.params.item.type===i.EItemType.ChipPack||i.notification.params.item.type===i.EItemType.GemsPack))&&!i.isTranslatableText(i.notification.text)),d(),l("ngIf",i.notification.type===i.EActivityFeedItemType.DonateRequest&&(i.notification.params.item.type===i.EItemType.ChipPack||i.notification.params.item.type===i.EItemType.GemsPack)),d(),l("ngIf",!(i.notification.isHandled&&i.notification.isHandled()||i.notification.hasExpired&&i.notification.hasExpired())),d(),l("ngIf",i.notification.isHandled&&i.notification.isHandled()||i.notification.hasExpired&&i.notification.hasExpired()),d(),l("timestampSeconds",i.notification.createdAt))},dependencies:[Ne,oc,Bo,Yh,Zp,Ga,Fz,X2,eD,qe],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.club--notification--avatar__wrapper[_ngcontent-%COMP%]{display:flex}.club--notification--avatar__avatar--wrapper[_ngcontent-%COMP%]{padding:0 1em 2em;display:flex}@media screen and (max-width: 768px){.club--notification--avatar__avatar--wrapper[_ngcontent-%COMP%]{padding:0 1em 2em}}@media only screen and (max-width: 480px){.club--notification--avatar__avatar--wrapper[_ngcontent-%COMP%]{padding:0 .5em 2em}}.club--notification--avatar__container--avatar[_ngcontent-%COMP%]{width:5em;min-width:5em;height:5em;display:block;margin-top:2em}@media only screen and (max-width: 480px){.club--notification--avatar__container--avatar[_ngcontent-%COMP%]{width:3.5em;min-width:3.5em;height:3.5em}}.club--notification--avatar__value[_ngcontent-%COMP%]{font-size:1.2em;word-break:break-word}@media only screen and (max-width: 480px){.club--notification--avatar__value[_ngcontent-%COMP%]{font-size:1em}}.club--notification--avatar__title[_ngcontent-%COMP%]{font-size:1.2em;font-weight:700;flex-wrap:wrap;margin-bottom:.5em;display:flex;align-items:center}@media screen and (max-width: 768px){.club--notification--avatar__title[_ngcontent-%COMP%]{margin-bottom:.2em}}@media only screen and (max-width: 480px){.club--notification--avatar__title[_ngcontent-%COMP%]{font-size:1em}}.club--notification--avatar__title[_ngcontent-%COMP%]   .no-title[_ngcontent-%COMP%]{font-size:1.25em}@media only screen and (max-width: 480px){.club--notification--avatar__title[_ngcontent-%COMP%]   .no-title[_ngcontent-%COMP%]{font-size:1.2em}}.club--notification--avatar__title[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:1.2em;margin:0 .25em}.club--notification--avatar__title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{word-break:break-word}.club--notification--avatar__title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not([class]){white-space:pre-wrap}.club--notification--avatar__text--wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;padding:0 .5em;flex:1;margin-top:2em}.club--notification--avatar__elapsed--time[_ngcontent-%COMP%]{position:absolute;bottom:1em;right:1em}@media screen and (max-width: 768px){.club--notification--avatar__elapsed--time[_ngcontent-%COMP%]{bottom:.5em}}.club--notification--avatar__result-status[_ngcontent-%COMP%]{position:absolute;top:.25em;right:2em}.club--notification--avatar__buttons[_ngcontent-%COMP%]{display:flex;flex-shrink:0;justify-content:center;margin-top:3em}@media only screen and (max-width: 768px){.club--notification--avatar__buttons[_ngcontent-%COMP%]{max-width:20rem}}@media only screen and (max-width: 480px){.club--notification--avatar__buttons[_ngcontent-%COMP%]{max-width:12rem;margin-top:2.5em;font-size:1rem}}.club--notification__currency-value[_ngcontent-%COMP%]{display:inline-block}"],changeDetection:0}),n})();function YUt(t,n){if(1&t&&(B(0,"p",2),V(1,"translate")),2&t){const o=_();l("innerHTML",yt(1,1,o.notification.text.key,o.notification.text.params),Yn)}}function JUt(t,n){if(1&t&&(p(0,"p",3),H(1),m()),2&t){const o=_();d(),ze(" ",o.notification.text,"\n")}}let nD=(()=>{var t;class n{constructor(e){this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}isTranslatableText(e){return"object"==typeof e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-activity-simple-text-notification"]],inputs:{notification:"notification"},decls:2,vars:2,consts:[["class","club--notification--simple--text-p",3,"innerHTML",4,"ngIf"],["class","club--notification--simple--text-p",4,"ngIf"],[1,"club--notification--simple--text-p",3,"innerHTML"],[1,"club--notification--simple--text-p"]],template:function(e,i){1&e&&U(0,YUt,2,4,"p",0)(1,JUt,2,1,"p",1),2&e&&(l("ngIf",i.isTranslatableText(i.notification.text)),d(),l("ngIf",!i.isTranslatableText(i.notification.text)))},dependencies:[Ne,qe],styles:[".club--notification--simple--text-p[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),n})();function XUt(t,n){if(1&t&&(p(0,"p",7)(1,"span"),H(2),V(3,"translate"),m()()),2&t){const o=_();d(2),se(yt(3,1,o.notification.title.key,o.notification.title.params))}}function eGt(t,n){if(1&t&&(p(0,"p",7)(1,"span"),H(2),m()()),2&t){const o=_();d(2),se(o.notification.title)}}function tGt(t,n){if(1&t&&(p(0,"p",8),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",yt(2,1,o.notification.text.key,o.notification.text.params)," ")}}function nGt(t,n){if(1&t&&(p(0,"p",8),H(1),m()),2&t){const o=_();d(),ze(" ",o.notification.text," ")}}function iGt(t,n){1&t&&B(0,"club-notification-buttons",9),2&t&&l("notification",_().notification)}function oGt(t,n){1&t&&B(0,"club-notification-result-status",9),2&t&&l("notification",_().notification)}let iD=(()=>{var t;class n{constructor(e){this.cdr=e}ngOnInit(){this.type=Ys.parse(Ao,this.notification.type),this.cdr.detach(),this.cdr.detectChanges()}isTranslatableText(e){return"object"==typeof e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-activity-text-notification"]],inputs:{notification:"notification"},decls:10,vars:7,consts:[[1,"club--notification--text__wrapper",3,"ngClass"],[1,"club--notification--text__container"],[1,"club--notification--text__content--wrapper"],[1,"club--notification--text__values--wrapper"],["class","club--notification--text__title",4,"ngIf"],["class","club--notification--text__value",4,"ngIf"],["class","club--notification--avatar__buttons",3,"notification",4,"ngIf"],[1,"club--notification--text__title"],[1,"club--notification--text__value"],[1,"club--notification--avatar__buttons",3,"notification"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"container-component",1)(2,"div",2)(3,"div",3),U(4,XUt,4,4,"p",4)(5,eGt,3,1,"p",4)(6,tGt,3,4,"p",5)(7,nGt,2,1,"p",5),m(),U(8,iGt,1,1,"club-notification-buttons",6)(9,oGt,1,1,"club-notification-result-status",6),m()()()),2&e&&(l("ngClass",i.type),d(4),l("ngIf",i.notification.title&&i.isTranslatableText(i.notification.title)),d(),l("ngIf",i.notification.title&&!i.isTranslatableText(i.notification.title)),d(),l("ngIf",i.notification.text&&i.isTranslatableText(i.notification.text)),d(),l("ngIf",i.notification.text&&!i.isTranslatableText(i.notification.text)),d(),l("ngIf",!(i.notification.isHandled&&i.notification.isHandled()||i.notification.hasExpired&&i.notification.hasExpired())),d(),l("ngIf",i.notification.isHandled&&i.notification.isHandled()||i.notification.hasExpired&&i.notification.hasExpired()))},dependencies:[Xe,Ne,Ga,X2,eD,qe],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.club--notification--text__wrapper[_ngcontent-%COMP%]{display:flex}.club--notification--text__wrapper.LevelUp[_ngcontent-%COMP%]   .club--notification--text__values--wrapper[_ngcontent-%COMP%]{align-items:center}.club--notification--text__values--wrapper[_ngcontent-%COMP%]{display:flex;flex:1;flex-flow:column}.club--notification--text__content--wrapper[_ngcontent-%COMP%]{display:flex;padding:2% 2rem}.club--notification--text__result-status[_ngcontent-%COMP%]{position:absolute;top:.25rem;right:2rem}.club--notification--text__buttons[_ngcontent-%COMP%]{display:flex;flex-shrink:0;align-items:center;justify-content:center;min-width:12rem}.club--notification--text__title[_ngcontent-%COMP%]{font-size:2.4rem}@media only screen and (max-width: 768px){.club--notification--text__title[_ngcontent-%COMP%]{font-size:1.8rem}}.club--notification--text__value[_ngcontent-%COMP%]{font-size:1.8rem}@media only screen and (max-width: 768px){.club--notification--text__value[_ngcontent-%COMP%]{font-size:1.4rem}}"],changeDetection:0}),n})(),Uwe=(()=>{var t;class n{createNotificationComponent(e,i){const r=this.getComponentCtorByType(i.type);return e.createComponent(r)}getComponentCtorByType(e){switch(e){case Ao.DonateRequest:case Ao.JoinRequest:case Ao.InviteRequest:return tD;case Ao.MemberJoined:case Ao.MemberLeft:case Ao.MemberRoleChange:case Ao.DonatedItem:return nD;case Ao.LevelUp:return iD;default:throw new Error("Missing or invalid club notification type ".concat(e))}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),n1=class{constructor(n={}){this.callback=()=>{},this.isDisabled=()=>!1,this.isLoading=()=>!1;for(let o in n)n.hasOwnProperty(o)&&(this[o]=n[o])}};n1=Qe([ko(),ue("design:paramtypes",[Object])],n1);let JH=class{constructor(n={}){this.actions=[],this.text={key:""};for(let o in n)n.hasOwnProperty(o)&&(this[o]=n[o])}};JH=Qe([ko(),ue("design:paramtypes",[Object])],JH);let XH=(()=>{var t;class n{constructor(e,i,r){this.appLanguage=r,this.translate=e,this.configService=i,this.transformNotifications=[rt.GameWon,rt.TournamentWon]}buildNotificationShareParams(e){const i=this.configService.getConfig();let r=i.platform.name,s=this.appLanguage.getAppLanguage(),a="",c="";switch(e.notificationType){case rt.GiftSent:a="".concat(i.core.cdn.url).concat(i.core.cdn.path.assets,"share/facebook/gift_sent_").concat(s,".jpg"),c=this.translate.getParsedTranslation("SHARE_NOTIFICATIONS.".concat(e.notificationType,".description"),[r]);break;case rt.UserLevelUp:a="".concat(i.core.cdn.url).concat(i.core.cdn.path.assets,"share/facebook/level_up_").concat(s,".jpg"),c=this.translate.getParsedTranslation("SHARE_NOTIFICATIONS.".concat(e.notificationType,".description"),[e.params.level,r]);break;case rt.GameWon:let u=this.gameWonTransform(e.params.stats,e.notificationType);c=this.translate.getParsedTranslation(u.message.key,u.message.params),a="".concat(i.core.cdn.url).concat(i.core.cdn.path.assets,"share/facebook/game_won_").concat(s,".jpg");break;case rt.TournamentWon:let h=this.transform(e);c=this.translate.getParsedTranslation(h.message.key,h.message.params),a="".concat(i.core.cdn.url).concat(i.core.cdn.path.assets,"share/facebook/game_won_").concat(s,".jpg");break;case rt.KnockoutTournamentWon:let b=this.transform(e);c=this.translate.getParsedTranslation(b.message.key,b.message.params),a="".concat(i.core.cdn.url).concat(i.core.cdn.path.assets,"share/facebook/game_won_").concat(s,".jpg")}return new uze(Mte.Share,Ote.Object,"",a,c)}transform(e){switch(e.notificationType){case rt.GameWon:return this.gameWonTransform(e.params.stats,e.notificationType);case rt.TournamentWon:const r=this.translate.getParsedTranslation(1===e.params.place?"TOURNAMENTS.BLITZ.FIRST":"TOURNAMENTS.BLITZ.SECOND");return{message:{key:"SHARE_NOTIFICATIONS.".concat(e.notificationType,".description"),params:[r,e.params.chips]}};case rt.KnockoutTournamentWon:return{message:{key:"SHARE_NOTIFICATIONS.KnockoutTournamentWon.description",params:[]}};default:return}}gameWonTransform(e,i){let c,u,h,r="",s="SHARE_NOTIFICATIONS.".concat(i),a=[];if(e.seats){const b={};e.seats.forEach(w=>{b[w.player.profile.id]=w.player}),h=e.gameResult.gameStats.playerPoints,c=e.gameResult.winners.map(w=>({username:b[w].profile.username,points:null!==h?h[w]:null})),u=e.gameResult.losers.map(w=>({username:b[w].profile.username,points:null!==h?h[w]:null}))}return 1===c.length&&1===u.length?(r=null!==h?"one_winner_description":"one_winner_description_no_score",a=[c[0].username,u[0].username,c[0].points,u[0].points]):1===c.length&&3===u.length?(r=null!==h?"one_winner_three_losers_description":"one_winner_three_losers_description_no_score",a=[u[0].username,u[1].username,u[2].username,c[0].points]):2===c.length&&2===u.length?(r=null!==h&&1!==e.settings.players.perTeam?"two_winners_description":"two_winners_description_no_score",a=[c[0].username,c[1].username,u[0].username,u[1].username,c[0].points,u[0].points]):(r="default",a=[]),{message:{key:"".concat(s,".").concat(r),params:a}}}getVerifiedUserLoyaltyLevelClass(e){switch(e){case Ch.Blue:return"verified blue";case Ch.Bronze:return"verified bronze";case Ch.Gold:return"verified gold";case Ch.Platinum:return"verified platinum";case Ch.Silver:return"verified silver";default:return"verified blue"}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(pi),T(Zt),T(Ma))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Gwe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.notificationsTransform=w,this.userFactory=e,this.translate=i,this.formatNumber=r,this.timeLeft=s,this.clubsService=a,this.shopService=c,this.store=u,this.toastService=h,this.clientPermissions=b}createModel(e){var i=this;const r=new JH({id:e.id,type:e.type,params:e.params,createdAt:e.createdAt});switch(e.type){case Ao.MemberLeft:const s=e.params;r.user=s.user,s.reason===N8.Leave?r.text={key:"CLUBS.NOTIFICATIONS.LEFT_CLUB",params:['<span class="club--notification__username '.concat(s.user.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(s.user.loyaltyLevel):"",'">').concat(s.user.username.currentUsername,"</span>")]}:s.reason===N8.Kick&&(r.text={key:"CLUBS.NOTIFICATIONS.KICKED_FROM_CLUB",params:['<span class="club--notification__username '.concat(s.user.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(s.user.loyaltyLevel):"",'">').concat(s.user.username.currentUsername,"</span>")]});break;case Ao.MemberRoleChange:const a=e.params;r.user=a.user;const c=Om.compare(a.newRole,a.previousRole)>=0;r.text={key:"CLUBS.NOTIFICATIONS.".concat(c?"USER_PROMOTED":"USER_DEMOTED"),params:['<span class="club--notification__username '.concat(a.user.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(a.user.loyaltyLevel):"",'">').concat(a.user.username.currentUsername,"</span>"),this.translate.instant("CLUBS.CLUB_ROLE_".concat(Ys.parse(qo,a.newRole).toUpperCase()))]};break;case Ao.MemberJoined:const u=e.params;r.user=u.user,r.text={key:"CLUBS.NOTIFICATIONS.JOINED_CLUB",params:['<span class="club--notification__username '.concat(u.user.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(u.user.loyaltyLevel):"",'">').concat(u.user.username.currentUsername,"</span>")]};break;case Ao.InviteRequest:const h=e.params;r.title={key:"CLUBS.NOTIFICATIONS.INVITE_REQUEST_TITLE",params:['<span class="club--notification__username '.concat(h.sender.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(h.sender.loyaltyLevel):"",'">').concat(h.sender.username.currentUsername,"</span>")]},r.text=h.message?h.message:{key:"CLUBS.NOTIFICATIONS.INVITE_REQUEST"},r.user=h.sender;const b={clubId:e.clubId,requestId:h.requestId,userId:h.userId};r.isHandled=()=>h.requestStatus!==Di.PendingUserAccept,r.actions=[new n1({type:yf.Cancel,isLoading:()=>{const ee=this.store.clubs.selectFeedItem(r.id);return!!ee&&ee.actions.cancel.inProgress},isDisabled:()=>{const ee=this.store.clubs.selectFeedItem(r.id);return!!ee&&ee.actions.accept.inProgress||h.requestStatus!==Di.PendingUserAccept},callback:(ee=f(function*(){if(i.clientPermissions.getClubActionPermission(i.store.clubs.selectClubProfile(),nt.EModuleAction.InviteClubMember,{showFailedRequirements:!0}).isPermitted)try{yield i.clubsService.cancelClubInviteRequest(b)}catch(me){console.warn(me),i.showJoinRequestProcessErrorToUser(me)}}),function(){return ee.apply(this,arguments)})})];break;case Ao.JoinRequest:const w=e.params;r.title={key:"CLUBS.NOTIFICATIONS.JOIN_REQUEST_TITLE",params:['<span class="club--notification__username '.concat(w.sender.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(w.sender.loyaltyLevel):"",'">').concat(w.sender.username.currentUsername,"</span>")]},r.text=w.message?w.message:{key:"CLUBS.NOTIFICATIONS.JOIN_REQUEST"},r.user=w.sender;const R={clubId:e.clubId,requestId:w.requestId,userId:w.userId};r.isHandled=()=>w.requestStatus!==Di.PendingClubAccept,r.actions=[new n1({type:yf.Accept,isLoading:()=>{const ee=this.store.clubs.selectFeedItem(r.id);return!!ee&&ee.actions.accept.inProgress},isDisabled:()=>{const ee=this.store.clubs.selectFeedItem(r.id);return!!ee&&ee.actions.reject.inProgress||w.requestStatus!==Di.PendingClubAccept},callback:function(){var ee=f(function*(){try{yield i.clubsService.acceptJoinRequest(R)}catch(le){console.warn(le),i.showJoinRequestProcessErrorToUser(le)}});return function(){return ee.apply(this,arguments)}}()}),new n1({type:yf.Reject,isLoading:()=>{const ee=this.store.clubs.selectFeedItem(r.id);return!!ee&&ee.actions.reject.inProgress},isDisabled:()=>{const ee=this.store.clubs.selectFeedItem(r.id);return!!ee&&ee.actions.accept.inProgress||w.requestStatus!==Di.PendingClubAccept},callback:function(){var ee=f(function*(){try{yield i.clubsService.rejectJoinRequest(R)}catch(le){console.warn(le),i.showJoinRequestProcessErrorToUser(le)}});return function(){return ee.apply(this,arguments)}}()})];break;case Ao.DonateRequest:const G=e.params;if(r.coinShardsReward=this.shopService.getCoinShardsAmount(G.item.id),r.user=G.user,G.item.type===Fe.TG.ChipPack)r.text={key:"CLUBS.NOTIFICATIONS.CHIPS_DONATION_REQUEST"};else if(G.item.type===Fe.TG.GemsPack)r.text={key:"CLUBS.NOTIFICATIONS.GEMS_DONATION_REQUEST"};else if(G.item.type===Fe.TG.Vip){const ee=this.timeLeft.transform(e.params.item.lifeTime,{timeConfig:Zu});r.text={key:"CLUBS.NOTIFICATIONS.VIP_DONATION_REQUEST"},r.text.params=["<span>".concat(this.translate.getParsedTranslation("SHOP.ITEMS.VIP_ITEMS",[ee]),"</span>")]}r.isHandled=()=>G.isFulfilled,r.hasExpired=()=>G.expiresAt<Bn.instance.getServerTimeS(),r.actions=[],r.user.id!==this.store.selectUserState().profile.id&&r.actions.push(new n1({type:yf.DonateItem,isDisabled:()=>G.isFulfilled,callback:()=>this.shopService.openItemPopup({item:G.item,receiverProfile:r.user,exchangeData:{donateRequestId:r.id},correlationId:r.id}).catch(ee=>console.warn(ee))}));break;case Ao.DonatedItem:const K=e.params;if(r.text={key:"CLUBS.NOTIFICATIONS.DONATED_ITEM"},K.item.type===Fe.TG.ChipPack||K.item.type===Fe.TG.GemsPack){const ee=this.formatNumber.transform(Math.round(K.item.amount),!1,!0),le=K.item.type===Fe.TG.ChipPack?"CHIP_PACKS":"GEM_PACKS";r.text.params=['<span class="club--notification__username '.concat(K.sender.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(K.sender.loyaltyLevel):"",'">').concat(K.sender.username.currentUsername,"</span>"),"<span>".concat(this.translate.getParsedTranslation("SHOP.ITEMS.".concat(le),[ee]),"</span>"),'<span class="club--notification__username '.concat(K.receiver.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(K.receiver.loyaltyLevel):"",'">').concat(K.receiver.username.currentUsername,"</span>")]}else if(K.item.type===Fe.TG.Vip){const ee=this.timeLeft.transform(K.item.lifeTime,{timeConfig:Zu});r.text.params=['<span class="club--notification__username '.concat(K.sender.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(K.sender.loyaltyLevel):"",'">').concat(K.sender.username.currentUsername,"</span>"),"<span>".concat(this.translate.getParsedTranslation("SHOP.ITEMS.VIP_ITEMS",[ee]),"</span>"),'<span class="club--notification__username '.concat(K.receiver.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(K.receiver.loyaltyLevel):"",'">').concat(K.receiver.username.currentUsername,"</span>")]}break;case Ao.LevelUp:const te=e.params;r.title={key:"LABEL.LEVEL_UP"},r.text={key:"CLUBS.NOTIFICATIONS.LEVEL_UP_REWARD",params:[te.newLevel]};break;default:console.warn("No model for notification",e)}var ee;return r}showJoinRequestProcessErrorToUser(e){this.toastService.error(e instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":e instanceof mb||e instanceof Sh?"CLUBS.JOIN_REQUEST_PROCESS_ERROR":e instanceof lt.ServerUnavailableError?"CLUBS.SERVICE_UNAVAILABLE":e instanceof hb?"CLUBS.CLUB_ROLE_ACTION_OUTDATED":e instanceof Mm?"CLUBS.CLUB_NOT_FOUND":e instanceof cP?"CLUBS.CLUB_FULL_ERROR":"ERRORS.SOMETHING_WRONG")}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Xu),T(pi),T(Go),T(Ps),T(ru),T(Gh),T(J),T(Dt),T(Pi),T(XH))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class e7{static createMemberId(n){return"user-"+n}static parseMemberId(n){return n.replace("user-","")}static isMemberId(n){return n.includes("user-")}}const rGt=["memberContainer"],sGt=["filterComponent"];function aGt(t,n){if(1&t){const o=Ce();p(0,"filter",2,3),Y("filter",function(i){return oe(o),re(_().filterSelection(i))}),m()}if(2&t){const o=_();l("fields",o.fields)("infoTexts",o.infoTexts)}}function cGt(t,n){if(1&t&&(p(0,"div",4),B(1,"avatar",5),m(),p(2,"div",6)(3,"p"),B(4,"username",7),m(),p(5,"p",8),H(6),V(7,"translate"),m()()),2&t){const o=n.$implicit,e=_();d(),l("user",o.info.profile)("isLink",!0)("hasUsername",!1),d(3),l("userProfile",o.info.profile)("hasVerifiedBadge",!0),d(2),ze(" ",$(7,6,e.getRoleString(o.role))," ")}}let Bg=(()=>{var t;class n{get filtersState(){return this.filterComponent.filtersState}constructor(e){this.pendingJoinRequestsCount=0,this.filter=new ke,this.reset=new ke,this.fields=[],this.infoTexts={},this.cdr=e}ngOnInit(){this.fields=this.createForm(),this.createInfoTexts()}ngOnChanges(e){e.pendingJoinRequestsCount&&!e.pendingJoinRequestsCount.firstChange&&this.createInfoTexts()}emitSelection(){this.filterComponent.emitSelection()}resetUnsavedFilters(){this.filterComponent.resetUnsavedFilters()}resetSavedFilters(){this.filterComponent.resetSavedFilters()}filterSelection(e){this.filter.emit(e)}createInfoTexts(){this.infoTexts={[n.EFieldId.JoinRequests]:this.pendingJoinRequestsCount?{key:"CLUBS.PENDING_JOIN_REQUESTS",params:[this.pendingJoinRequestsCount]}:void 0}}createForm(){const e=this.members.sort((i,r)=>i.role-r.role).map(i=>({id:e7.createMemberId(i.info.profile.id),type:Si.FieldType.Toggle,format:Si.EFormat.Boolean,options:[{value:!0},{value:!1}],templateData:{data:i,templateRef:this.memberContainer},defaultValue:{id:i.info.profile.id,value:!1}}));return[{id:n.EFieldId.JoinRequests,type:Si.FieldType.Toggle,format:Si.EFormat.Boolean,label:"CLUBS.JOIN_REQUESTS",options:[{value:!0},{value:!1}],defaultValue:{id:n.EFieldId.JoinRequests,value:!0}},{id:n.EFieldId.Bonuses,type:Si.FieldType.Toggle,format:Si.EFormat.Boolean,label:"CLUBS.BONUSES",options:[{value:!0},{value:!1}],defaultValue:{id:n.EFieldId.Bonuses,value:!0}},{id:n.EFieldId.Donations,type:Si.FieldType.Toggle,format:Si.EFormat.Boolean,label:"CLUBS.DONATIONS",options:[{value:!0},{value:!1}],defaultValue:{id:n.EFieldId.Donations,value:!0}},{id:n.EFieldId.MemberActivity,type:Si.FieldType.Toggle,format:Si.EFormat.Boolean,label:"CLUBS.MEMBER_ACTIVITY",options:[{value:!0},{value:!1}],defaultValue:{id:n.EFieldId.MemberActivity,value:!0}},{id:"membersListLabel",type:Si.FieldType.Info,format:Si.EFormat.LocalizedText,label:"CLUBS.MEMBERS_LIST",options:[]},...e]}getRoleString(e){return $h.getMemberRoleTranslationKey(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-activity-filter"]],viewQuery:function(e,i){if(1&e&&($e(rGt,7,Qa),$e(sGt,5)),2&e){let r;je(r=He())&&(i.memberContainer=r.first),je(r=He())&&(i.filterComponent=r.first)}},inputs:{pendingJoinRequestsCount:"pendingJoinRequestsCount",members:"members"},outputs:{filter:"filter",reset:"reset"},features:[it],decls:3,vars:1,consts:[[3,"fields","infoTexts","filter",4,"ngIf"],["memberContainer",""],[3,"fields","infoTexts","filter"],["filterComponent",""],[1,"club-activity-filter--member__avatar"],[3,"user","isLink","hasUsername"],[1,"club-activity-filter-member-info__wrapper"],[1,"club-activity-filter--member-username",3,"userProfile","hasVerifiedBadge"],[1,"club-activity-filter--member-role"]],template:function(e,i){1&e&&U(0,aGt,2,2,"filter",0)(1,cGt,8,8,"ng-template",null,1,ft),2&e&&l("ngIf",i.fields.length>0)},dependencies:[Ne,Bo,Zp,hM,qe],styles:[".club-activity-filter--member__avatar[_ngcontent-%COMP%]{width:7rem}.club-activity-filter--member-username[_ngcontent-%COMP%]{text-align:left}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EFieldId||(t.EFieldId={})).JoinRequests="joinRequests",o.Donations="donations",o.Bonuses="bonuses",o.MemberActivity="memberActivity"}(Bg||(Bg={}));const lGt=["newContent"],uGt=["listWrapper"],dGt=["filterComponent"],pGt=["placeholder"],hGt=["list"];function mGt(t,n){1&t&&B(0,"loader-image",9),2&t&&l("transparentBG",!0)}function fGt(t,n){if(1&t){const o=Ce();p(0,"p",16)(1,"span",17)(2,"timer",18),Y("onCountdownFinished",function(){return oe(o),re(_(2).onCountdownFinished())}),m()()()}if(2&t){const o=_(2);d(),l("key","CLUBS.DONATION_REQUEST_COOLDOWN_TEXT"),d(),l("milliseconds",o.donationCooldownMs)}}const Vwe=t=>({name:t}),zwe=t=>[t];function gGt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",19),Y("onClick",function(){oe(o);const i=_(2);return re(i.headerButtons[i.EButtonId.Donate].action())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(2);l("buttonModifier",o.headerButtons[o.EButtonId.Donate].modifier)("icon",ne(7,Vwe,o.headerButtons[o.EButtonId.Donate].icon))("disabled",o.headerButtons[o.EButtonId.Donate].disabled),d(),se(yt(2,4,o.headerButtons[o.EButtonId.Donate].text.key,ne(9,zwe,o.headerButtons[o.EButtonId.Donate].text.params)))}}function _Gt(t,n){if(1&t){const o=Ce();p(0,"notification-button-icon",20),Y("onClick",function(){oe(o);const i=_(2);return re(i.headerButtons[i.EButtonId.Filter].action())}),V(1,"numberLimit"),m()}if(2&t){const o=_(2);l("icon",ne(8,Vwe,o.headerButtons[o.EButtonId.Filter].icon))("text",o.headerButtons[o.EButtonId.Filter].text)("buttonModifier",o.headerButtons[o.EButtonId.Filter].modifier)("isNotificationShown",o.isFiltered||o.pendingJoinRequestsCount)("notificationValue",o.isFiltered?"!":yt(1,5,o.pendingJoinRequestsCount,99))}}const vGt=()=>({key:"TEXT.NEW_ACTIVITY"});function bGt(t,n){if(1&t){const o=Ce();p(0,"div",10),U(1,fGt,3,2,"p",11)(2,gGt,3,11,"button-icon-text",12)(3,_Gt,2,10,"notification-button-icon",13),p(4,"new-content-component",14,15),Y("onClick",function(){return oe(o),re(_().onNewContentClick())}),m()()}if(2&t){const o=_();d(),l("ngIf",o.donationCooldownMs>0),d(),l("ngIf",o.headerButtons),d(),l("ngIf",o.headerButtons),d(),l("initialState",o.newContentInitialState)("text",pt(5,vGt))}}function CGt(t,n){1&t&&B(0,"club-activity-avatar-notification",29),2&t&&l("notification",_().$implicit)}function yGt(t,n){1&t&&B(0,"club-activity-simple-text-notification",29),2&t&&l("notification",_().$implicit)}function SGt(t,n){1&t&&B(0,"club-activity-text-notification",29),2&t&&l("notification",_().$implicit)}function wGt(t,n){if(1&t&&(p(0,"div",26,27),U(2,CGt,1,1,"club-activity-avatar-notification",28)(3,yGt,1,1,"club-activity-simple-text-notification",28)(4,SGt,1,1,"club-activity-text-notification",28),m()),2&t){const o=n.$implicit,e=_(2);l("id",o.id),d(2),l("ngIf",o.type===e.EActivityFeedItemType.DonateRequest||o.type===e.EActivityFeedItemType.JoinRequest||o.type===e.EActivityFeedItemType.InviteRequest),d(),l("ngIf",o.type===e.EActivityFeedItemType.MemberJoined||o.type===e.EActivityFeedItemType.MemberLeft||o.type===e.EActivityFeedItemType.MemberRoleChange||o.type===e.EActivityFeedItemType.DonatedItem),d(),l("ngIf",o.type===e.EActivityFeedItemType.LevelUp)}}const TGt=()=>({textKey:"CLUBS.EMPTY_ACTIVITY_FEED"});function PGt(t,n){1&t&&B(0,"empty-content",30),2&t&&l("textArray",ne(2,zwe,pt(1,TGt)))}function IGt(t,n){1&t&&B(0,"spinner-loader",31)}function MGt(t,n){if(1&t){const o=Ce();p(0,"div",21,22),Y("scroll.zoneless",function(i){return oe(o),re(_().onScroll(i))}),U(2,wGt,5,4,"div",23)(3,PGt,1,4,"empty-content",24)(4,IGt,1,0,"spinner-loader",25),m()}if(2&t){const o=_();l("onScrolledToBottom",o.onListScrolledToBottom),d(2),l("ngForOf",o.notificationModels)("ngForTrackBy",o.notificationsTrackBy),d(),l("ngIf",0===o.notificationModels.length),d(),l("ngIf",o.isLoadingNextPage)}}const OGt=()=>({key:"CLUBS.ACTIVITY_FEED_FILTER"});let aO=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.destroyRef=u,this.notifications=[],this.isLoading=!1,this.isLoadingNextPage=!1,this.onListScrolledToBottom={handler:()=>{},outsideZone:!1},this.filter=new ke,this.requestDonation=new ke,this.EButtonId=n.EButtonId,this.filterButton={modifier:ve.EButtonModifier.BUTTON_ATTENTION,icon:ve.EIcons.Filter},this.donationCooldownMs=0,this.notificationModels=[],this.EActivityFeedItemType=Ao,this.newContentInitialState=ip.EState.Hide,this.popupTitleTypes=li,this.filterPopup={isOpened:!1,options:{customComponentCssClass:"club--activity--popup-container",styleProperties:{maxWidth:"41rem"}}},this.isFiltered=!1,this.cdr=e,this.cmpFactory=i,this.viewModelsFactory=r,this.store=s,this.actions=a,this.scrollHelper=c}ngAfterViewInit(){this.clubActivityFilter.filtersState.pipe(bt(e=>this.isFiltered!=e.hasAppliedFilters),mi(this.destroyRef)).subscribe(e=>{this.isFiltered=e.hasAppliedFilters})}ngOnInit(){this.notificationModels=this.notifications.map(e=>this.viewModelsFactory.createModel(e)),this.donationCooldownMs=this.calcDonationCooldown(this.currentDonationRequest),this.buildActivityFeedButtons(),this.cdr.detach(),this.cdr.detectChanges(),this.actions.pipe(ai(y8)).pipe(bt(()=>{var e;return!(null===(e=this.list)||void 0===e||!e.length)})).subscribe(e=>{var i;const r=this.listWrapper.nativeElement,s=null===(i=this.list.find(c=>c.nativeElement.id===e.item.id))||void 0===i?void 0:i.nativeElement;var a;r&&cr.isScrollable(r)&&s&&(r.scrollTop=this.lastScrollValues.scrollTop+s.clientHeight,null===(a=this.newContent)||void 0===a||a.show())}),this.list.changes.pipe(bt(()=>{var e;return!(null===(e=this.listWrapper)||void 0===e||!e.nativeElement||this.lastScrollValues)})).subscribe(e=>{const i=this.listWrapper.nativeElement;this.lastScrollValues={scrollHeight:i.scrollHeight,scrollTop:i.scrollTop}})}onScroll(e){var i;this.lastScrollValues.scrollTop=e.target.scrollTop,this.lastScrollValues.scrollHeight=e.target.scrollHeight,e.target.scrollTop<=0&&(null===(i=this.newContent)||void 0===i||i.hide())}onNewContentClick(){const e=this.listWrapper.nativeElement;e&&this.scrollHelper.scrollElement({element:e,targetScroll:0,animation:{durationMs:100,timingFunction:pM},position:Na.EScrollPosition.ScrollTop})}ngOnChanges(e){e.notifications&&!e.notifications.firstChange&&(this.notificationModels=this.notifications.map(i=>this.viewModelsFactory.createModel(i))),e.currentDonationRequest&&!e.currentDonationRequest.firstChange&&(this.donationCooldownMs=this.calcDonationCooldown(this.currentDonationRequest),this.buildActivityFeedButtons()),this.cdr.detectChanges()}createNotificationComponents(e){const i=this.placeholders.toArray();return e.map((r,s)=>{const c=this.cmpFactory.createNotificationComponent(i[s],r);return c.instance.notification=r,c})}requestItemDonation(e){this.requestDonation.emit(e)}openFilterPopup(){this.filterPopup.isOpened=!0,this.cdr.detectChanges()}hideFilterPopup(){this.filterPopup.isOpened=!1,this.cdr.detectChanges()}filterList(e){const i={groups:[],users:[]};e.find(r=>r.id===Bg.EFieldId.JoinRequests).value&&i.groups.push(qS.JoinRequests),e.find(r=>r.id===Bg.EFieldId.Donations).value&&i.groups.push(qS.DonationRequests),e.find(r=>r.id===Bg.EFieldId.MemberActivity).value&&i.groups.push(qS.MemberActivity),e.find(r=>r.id===Bg.EFieldId.Bonuses).value&&i.groups.push(qS.Bonuses),e.filter(r=>e7.isMemberId(r.id)&&r.value).map(r=>{i.users.push(e7.parseMemberId(r.id))}),this.filter.emit(i),this.hideFilterPopup()}trackByFn(e,i){return i.text.key}notificationsTrackBy(e,i){return i.id}onCountdownFinished(){this.donationCooldownMs=this.calcDonationCooldown(this.currentDonationRequest),this.buildActivityFeedButtons(),this.cdr.detectChanges()}calcDonationCooldown(e){return 1e3*(e?e.params.expiresAt-Bn.instance.getServerTimeS():this.donationCooldownMs)}buildActivityFeedButtons(){this.headerButtons={[n.EButtonId.Donate]:{modifier:ve.EButtonModifier.BUTTON_ACTION,text:{key:"CLUBS.DONATION_REQUEST"},icon:ve.EIcons.CHIP,disabled:this.donationCooldownMs>0,action:()=>this.requestItemDonation(Bc.Currency)},[n.EButtonId.Filter]:{modifier:ve.EButtonModifier.BUTTON_ATTENTION,text:{key:"TEXT.FILTER"},icon:ve.EIcons.Filter,action:()=>this.openFilterPopup()}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Uwe),g(Gwe),g(J),g(yr),g(cr),g(br))},t.\u0275cmp=pe({type:t,selectors:[["club-activity-feed"]],viewQuery:function(e,i){if(1&e&&($e(lGt,5),$e(uGt,5),$e(dGt,5),$e(pGt,5,bs),$e(hGt,5)),2&e){let r;je(r=He())&&(i.newContent=r.first),je(r=He())&&(i.listWrapper=r.first),je(r=He())&&(i.clubActivityFilter=r.first),je(r=He())&&(i.placeholders=r),je(r=He())&&(i.list=r)}},inputs:{notifications:"notifications",currentDonationRequest:"currentDonationRequest",isLoading:"isLoading",isLoadingNextPage:"isLoadingNextPage",onListScrolledToBottom:"onListScrolledToBottom",pendingJoinRequestsCount:"pendingJoinRequestsCount",members:"members"},outputs:{filter:"filter",requestDonation:"requestDonation"},features:[it],decls:9,vars:10,consts:[[1,"club--activity--feed__wrapper"],[3,"transparentBG",4,"ngIf"],["class","club--activity--feed__header--wrapper",4,"ngIf"],["class","club--activity__list","scroll-directive","",3,"onScrolledToBottom","scroll.zoneless",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],["popupTitleBar",""],[3,"pendingJoinRequestsCount","members","filter"],["filterComponent",""],[3,"transparentBG"],[1,"club--activity--feed__header--wrapper"],["class","club--activity__header--request--cooldown",4,"ngIf"],["class","club--activity__header--button",3,"buttonModifier","icon","disabled","onClick",4,"ngIf"],["class","club--activity__header--button",3,"icon","text","buttonModifier","isNotificationShown","notificationValue","onClick",4,"ngIf"],[1,"club--activity__header--new-activity",3,"initialState","text","onClick"],["newContent",""],[1,"club--activity__header--request--cooldown"],["text-with-placeholders","",3,"key"],[1,"club--activity__header--request--cooldown--timer",3,"milliseconds","onCountdownFinished"],[1,"club--activity__header--button",3,"buttonModifier","icon","disabled","onClick"],[1,"club--activity__header--button",3,"icon","text","buttonModifier","isNotificationShown","notificationValue","onClick"],["scroll-directive","",1,"club--activity__list",3,"onScrolledToBottom","scroll.zoneless"],["listWrapper",""],["class","club--activity__list--item",3,"id",4,"ngFor","ngForOf","ngForTrackBy"],[3,"textArray",4,"ngIf"],["class","club--activity--feed__spinner",4,"ngIf"],[1,"club--activity__list--item",3,"id"],["list",""],[3,"notification",4,"ngIf"],[3,"notification"],[3,"textArray"],[1,"club--activity--feed__spinner"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,mGt,1,1,"loader-image",1)(2,bGt,6,6,"div",2)(3,MGt,5,5,"div",3),p(4,"filter-popup-container",4),Y("closePopup",function(){return i.hideFilterPopup()}),p(5,"popup-title-bar",5,6),Y("buttonCloseClicked",function(){return i.hideFilterPopup()}),m(),p(7,"club-activity-filter",7,8),Y("filter",function(s){return i.filterList(s)}),m()()()),2&e&&(d(),l("ngIf",i.isLoading),d(),l("ngIf",!i.isLoading),d(),l("ngIf",!i.isLoading),d(),l("popupContainerOpened",i.filterPopup.isOpened)("popupContainerOptions",i.filterPopup.options),d(),l("popupTitleType",i.popupTitleTypes.Static)("text",pt(9,OGt)),d(2),l("pendingJoinRequestsCount",i.pendingJoinRequestsCount)("members",i.members))},dependencies:[Mt,Ne,Fs,oc,bo,so,Ji,au,Oi,vc,ip,Is,yL,iD,nD,tD,Bg,qe,L_],styles:["[_nghost-%COMP%]{height:100%;width:100%}.club--activity--feed__wrapper[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:column nowrap}.club--activity--feed__header--wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:flex-end;flex-flow:row wrap;padding:0 2rem}@media screen and (max-width: 768px){.club--activity--feed__header--wrapper[_ngcontent-%COMP%]{padding:0 .5rem}}.club--activity__header--request--cooldown[_ngcontent-%COMP%], .club--activity__header--pending-requests[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;margin-top:1rem;font-size:1.8rem;text-align:center}@media screen and (max-width: 768px){.club--activity__header--request--cooldown[_ngcontent-%COMP%], .club--activity__header--pending-requests[_ngcontent-%COMP%]{font-size:1.4rem}}.club--activity__header--pending-requests[_ngcontent-%COMP%]{margin-bottom:.5rem}.club--activity__header--new-activity[_ngcontent-%COMP%]{position:absolute;top:110%;left:50%;transform:translate(-50%);display:flex;height:5rem;justify-content:center;width:-moz-fit-content;width:fit-content;padding:0 3rem 1rem;border-radius:.8rem;z-index:2}.club--activity__header--request--cooldown--timer[_ngcontent-%COMP%]{font-size:1.8rem!important}@media screen and (max-width: 768px){.club--activity__header--request--cooldown--timer[_ngcontent-%COMP%]{font-size:1.4rem!important}}.club--activity__header--button[_ngcontent-%COMP%]{width:48%;max-width:25rem;margin:1rem auto}.club--activity--feed__filter--button[_ngcontent-%COMP%]{position:absolute;width:4rem;margin-right:0}.club--activity__list[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;flex:1}.club--activity__list--item[_ngcontent-%COMP%]{padding:1rem 2rem}@media screen and (max-width: 768px){.club--activity__list--item[_ngcontent-%COMP%]{padding:1rem .5rem}}.club--activity--feed__spinner[_ngcontent-%COMP%]{width:5rem;display:block;margin:auto}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EButtonId||(t.EButtonId={}))[o.Donate=0]="Donate",o[o.Filter=1]="Filter"}(aO||(aO={}));const EGt=t=>[t];function xGt(t,n){if(1&t&&B(0,"empty-content",2),2&t){const o=_();l("textArray",ne(1,EGt,o.error))}}let t7=(()=>{var t;class n{constructor(e,i,r,s,a,c){var u=this;this.notifications=[],this.onListScrolledToBottom={handler:()=>{},outsideZone:!0},this.subscriptions=new ie.List,this.tasks=new ie.List,this.listScrolledToBottomHandler=f(function*(){if(u.feedState.loadingState.isLoadingNext||u.feedState.meta.isLastPage)return;const h=new Jn(u.requestNextPage());try{u.cdr.detectChanges(),u.tasks.add(h),yield h}catch(b){console.warn(b),b instanceof Cr||(u.error={textKey:"ERRORS.CONNECTION_ERROR"})}finally{u.cdr.detectChanges(),u.tasks.remove(h)}}),this.cdr=e,this.clubsService=i,this.route=r,this.shop=s,this.store=a,this.actions=c,this.feedState=this.store.clubs.selectFeedState()}ngOnInit(){this.members=this.store.clubs.selectMembersList(),this.cdr.detach(),this.cdr.detectChanges(),this.clubId=this.club?this.club.clubProfile.id:this.route.snapshot.params.id,this.onListScrolledToBottom.handler=this.listScrolledToBottomHandler,this.addSubscriptions(),this.trySynchronizeFeed()}ngOnChanges(e){(e.club&&!e.club.firstChange||e.currentClubMemberInfo&&!e.currentClubMemberInfo.firstChange)&&this.onInputsUpdated()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List,this.tasks.forEach(e=>e.cancel()),this.tasks=new ie.List,this.clubsService.disconnectAndClearClubFeed()}filter(e){var i=this;return f(function*(){const r=new Jn(i.requestNextPage({...pv.createFeedFirstPageQuery(i.clubId),groups:e.groups,users:e.users}));try{i.cdr.detectChanges(),i.tasks.add(r),yield r}catch(s){console.warn(s),s instanceof Cr||(i.error={textKey:"ERRORS.CONNECTION_ERROR"})}finally{i.tasks.remove(r),i.cdr.detectChanges()}})()}requestDonation(e){this.shop.openShop({page:e,usageIntent:{type:ci.RequestClubDonation,data:this.club.clubProfile}})}onInputsUpdated(){this.updateView()}updateView(){this.cdr.detectChanges()}requestNextPage(e){var i=this;return f(function*(){const r=e||{...i.feedState.query,limit:i.feedState.query.limit,offset:i.notifications.length};yield i.clubsService.getClubFeed(r)})()}addSubscriptions(){this.subscriptions.add(this.store.clubs.subscribeFeedList().subscribe(e=>{this.notifications=e,this.cdr.detectChanges()})),this.subscriptions.add(this.store.clubs.subscribeFeedState().subscribe(e=>{this.feedState=e,this.cdr.detectChanges()})),this.subscriptions.add(this.actions.pipe(ai(O8)).subscribe(()=>{this.trySynchronizeFeed()})),this.subscriptions.add(this.store.clubs.subscribePendingJoinRequestsCount().subscribe(e=>{this.pendingJoinRequestsCount=e,this.cdr.detectChanges()}))}trySynchronizeFeed(){var e=this;return f(function*(){const i=new Jn(e.clubsService.connectAndSynchronizeClubFeed());try{e.tasks.add(i),yield i}catch(r){console.warn(r),r instanceof Cr||(e.error={textKey:"ERRORS.CONNECTION_ERROR"},e.clubsService.startTryToSynchronizeFeedCycle())}finally{e.tasks.remove(i),e.cdr.detectChanges()}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ru),g(Po),g(Ko),g(J),g(yr))},t.\u0275cmp=pe({type:t,selectors:[["club-activity-feed-page"]],inputs:{club:"club",currentClubMemberInfo:"currentClubMemberInfo"},features:[mn([{provide:Ko,useExisting:Gh}]),it],decls:2,vars:8,consts:[[3,"textArray",4,"ngIf"],[3,"notifications","currentDonationRequest","isLoading","isLoadingNextPage","onListScrolledToBottom","pendingJoinRequestsCount","members","filter","requestDonation"],[3,"textArray"]],template:function(e,i){1&e&&(U(0,xGt,1,3,"empty-content",0),p(1,"club-activity-feed",1),Y("filter",function(s){return i.filter(s)})("requestDonation",function(s){return i.requestDonation(s)}),m()),2&e&&(l("ngIf",i.feedState.loadingState.error&&i.error),d(),l("notifications",i.notifications)("currentDonationRequest",i.feedState.currentDonationRequest)("isLoading",i.feedState.loadingState.isLoading||i.feedState.synchronizeState.isSynchronizing)("isLoadingNextPage",i.feedState.loadingState.isLoadingNext)("onListScrolledToBottom",i.onListScrolledToBottom)("pendingJoinRequestsCount",i.pendingJoinRequestsCount)("members",i.members))},dependencies:[Ne,bo,aO],encapsulation:2,changeDetection:0}),n})();var cO=function(t){return t.MIN_LEVEL="minLevel",t.CLUB_FULL="clubFull",t.CLUB_CLOSED="clubClosed",t}(cO||{});function AGt(t,n){1&t&&B(0,"loader-image",5),2&t&&l("transparentBG",!0)}const n7=t=>({name:t});function RGt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",8),Y("onClick",function(){return oe(o),re(_(2).errorButton.action())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(2);l("icon",ne(6,n7,o.errorButton.icon))("buttonModifier",o.errorButton.modifier),d(),se(yt(2,3,o.errorButton.text.key,o.errorButton.text.params))}}const jwe=t=>[t];function kGt(t,n){if(1&t&&(p(0,"empty-content",6),U(1,RGt,3,8,"button-icon-text",7),m()),2&t){const o=_();l("textArray",ne(2,jwe,o.error)),d(),l("ngIf",o.errorButton)}}function LGt(t,n){if(1&t&&B(0,"button-icon",14),2&t){const o=_().$implicit,e=_(2);l("bclass","club-page__top-tabs__bclass"+(o.id===e.tabs.current?" top-tabs__selected":""))("icon",ne(3,n7,o.icon)),Hn("data-cy","clubTab"+o.id)}}function DGt(t,n){if(1&t&&B(0,"notification-button-icon",15),2&t){const o=_().$implicit,e=_(2);l("notificationValue",o.unread?o.unread():0)("buttonClass","club__top-tabs__bclass__notification__button")("isNotificationShown",o.unread&&!!o.unread())("bclass","club-page__top-tabs__bclass"+(o.id===e.tabs.current?" top-tabs__selected":""))("icon",ne(5,n7,o.icon))}}function BGt(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",11),Y("select",function(i){return oe(o),re(_(2).navigateToTab(i))}),U(1,LGt,1,5,"button-icon",12)(2,DGt,1,7,"notification-button-icon",13),m()}if(2&t){const o=n.$implicit,e=_(2);l("tabId",o.id)("tabClass","club-page__top-tabs__tab"),d(),l("ngIf",o.id!==e.clubActivityFeedUrl),d(),l("ngIf",o.id===e.clubActivityFeedUrl)}}function NGt(t,n){if(1&t&&(p(0,"top-tabs",9),U(1,BGt,3,4,"top-tab-item",10),m()),2&t){const o=_();l("initialOpenedTab",o.tabs.current)("showBackButton",!1)("scrollStyleCustomClass","club-page__top-tabs__scroll")("scrollBarCustomClass","club-page__top-tabs__scrollbar"),d(),l("ngForOf",o.tabs.list)("ngForTrackBy",o.trackByFn)}}function FGt(t,n){1&t&&(p(0,"p",27),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CLUBS.CLUB_FULL_MESSAGE")))}function UGt(t,n){1&t&&(p(0,"p",27),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CLUBS.CLUB_CLOSED_MESSAGE")))}function GGt(t,n){if(1&t&&(B(0,"p",28),V(1,"translate")),2&t){const o=_(4);l("innerHTML",yt(1,1,"POPUP.CLUB_MIN_LEVEL_NOT_MET",ne(4,jwe,o.club.clubProfile.settings.requirements.minLevel)),Yn)}}function VGt(t,n){if(1&t&&(p(0,"div",24),U(1,FGt,3,3,"p",25)(2,UGt,3,3,"p",25)(3,GGt,2,6,"p",26),m()),2&t){const o=_(3);d(),l("ngIf",o.clubJoinDisabledReason===o.clubJoinDisabledReasonType.CLUB_FULL),d(),l("ngIf",o.clubJoinDisabledReason===o.clubJoinDisabledReasonType.CLUB_CLOSED),d(),l("ngIf",o.clubJoinDisabledReason===o.clubJoinDisabledReasonType.MIN_LEVEL)}}function zGt(t,n){if(1&t&&(p(0,"div",19),B(1,"div",20),p(2,"div",21),B(3,"club-join-button-smart",22),U(4,VGt,4,3,"div",23),m()()),2&t){const o=_(2);d(3),l("clubProfile",o.club.clubProfile)("clubMembersCount",o.club.clubMembers.length)("joinRequest",o.club.myRequest),d(),l("ngIf",o.clubJoinDisabledReason)}}const jGt=t=>({"show-footer":t});function HGt(t,n){if(1&t){const o=Ce();p(0,"div",16),Y("swipeAction",function(i){return oe(o),re(_().changeTabViaSwipe(i))}),p(1,"router-outlet",17),Y("activate",function(i){return oe(o),re(_().onOutletLoaded(i))}),m(),U(2,zGt,5,4,"div",18),m()}if(2&t){const o=_();l("ngClass",ne(2,jGt,o.showFooter())),d(2),l("ngIf",!o.isLoading&&o.showFooter())}}const qGt=t=>({"club--page__wrapper--popup-outlet":t});let i7=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.permissions=b,this.contextEnum=Wr,this.tabs={current:void 0,updateTrigger:0,list:void 0},this.clubActivityFeedUrl=o1,this.clubJoinDisabledReasonType=cO,this.subscriptions=new ie.List,this.clubUpdateSubscriptions=new ie.List,this.currentClubSubscriptions=new ie.List,this.tasks=new ie.List,this.cdr=e,this.activatedComponentRoute=i,this.navigation=r,this.route=s,this.clubsService=a,this.store=c,this.actions=u,this.playerContextService=h}ngOnInit(){this.routeSubscription=this.route.params.subscribe(e=>this.reinitView()),this.cdr.detach()}ngOnDestroy(){var e;this.cancelAllActiveTasks(),null===(e=this.routeSubscription)||void 0===e||e.unsubscribe(),this.unsubscribeAllClubsSubscriptions()}updateView(){this.cdr.detectChanges()}trackByFn(e,i){return i.id}reinitView(){var e=this;return f(function*(){e.cancelAllActiveTasks(),e.unsubscribeAllClubsSubscriptions();const i=e.createAndAddTask(e.clubsService.getClubDetails(e.route.snapshot.params.id));try{e.isLoading=!0,e.updateView(),e.club={...yield i};const r=e.store.selectUserState().profile.id;e.currentClubMemberInfo=e.club.clubMembers.find(s=>s.userId===r),yield e.buildTabs(),e.addCurrentClubListener(),e.setClubJoinDisabledReasonKey()}catch(r){if(console.warn("Caught error",r),r instanceof Cr)return;r instanceof Mm?(e.error={textKey:"CLUBS.CLUB_NOT_FOUND"},e.errorButton={icon:ve.EIcons.BROWSE_CLUBS,modifier:ve.EButtonModifier.BUTTON_ATTENTION,text:{key:"CLUBS.BROWSE_CLUBS"},action:()=>e.clubsService.openClubsList()}):e.error=r instanceof lt.ServerUnavailableError?{textKey:"CLUBS.SERVICE_UNAVAILABLE"}:{textKey:"ERRORS.CONNECTION_ERROR"}}finally{e.isLoading=!1,e.updateView(),e.tasks.remove(i)}})()}unsubscribeAllClubsSubscriptions(){var e;this.subscriptions.forEach(i=>i.unsubscribe()),this.subscriptions=new ie.List,this.currentClubSubscriptions.forEach(i=>i.unsubscribe()),this.currentClubSubscriptions=new ie.List,this.clubUpdateSubscriptions.forEach(i=>i.unsubscribe()),this.clubUpdateSubscriptions=new ie.List,null===(e=this.contextChangeListener)||void 0===e||e.detach()}addCurrentClubListener(){this.currentClubSubscriptions.add(this.store.clubs.subscribeClubProfileId().pipe(aye(),jn(e=>({previousClubId:e[0],currentClubId:e[1]}))).subscribe(e=>{const i=this.club.clubProfile.id;(e.previousClubId!==i&&e.currentClubId===i||e.previousClubId===i&&!e.currentClubId)&&this.reinitView()})),this.currentClubSubscriptions.add(this.store.clubs.subscribeClubProfileId().subscribe(e=>{this.currentUserClubId=e,e===this.club.clubProfile.id&&this.addCurrentClubUpdateListeners(),this.updateView()})),this.currentClubSubscriptions.add(this.actions.pipe(ai(sge),bt(e=>e.clubId===this.club.clubProfile.id)).subscribe(e=>{this.unsubscribeAllClubsSubscriptions(),this.clubsService.openClubsList()}))}addCurrentClubUpdateListeners(){this.clubUpdateSubscriptions.add(this.store.clubs.subscribeClubProfile().pipe(bt(e=>!!e)).subscribe(e=>{this.club.clubProfile=e,this.updateChildPage({club:this.club})})),this.clubUpdateSubscriptions.add(this.store.clubs.subscribeClubXp().pipe(bt(e=>!!e)).subscribe(e=>{this.club.clubXp=e,this.updateChildPage({club:this.club})})),this.clubUpdateSubscriptions.add(this.store.clubs.subscribeMembersList().pipe(bt(e=>!!e)).subscribe(e=>{this.club.clubMembers=e,this.updateChildPage({club:this.club})})),this.clubUpdateSubscriptions.add(this.store.clubs.subscribeMyMemberInfo().pipe(bt(e=>!!e)).subscribe(e=>{this.currentClubMemberInfo=e,this.updateChildPage({currentClubMemberInfo:this.currentClubMemberInfo}),this.updateView()})),this.clubUpdateSubscriptions.add(this.store.clubs.subscribePendingJoinRequestsCount().subscribe(e=>{const i=this.tabs.list.find(r=>r.id===o1);i&&(i.unread=()=>e,this.tabs.updateTrigger++,this.updateView())}))}updateChildPage(e){this.pageCmp&&(e.club&&(this.pageCmp.club={...this.club}),e.currentClubMemberInfo&&(this.pageCmp.currentClubMemberInfo={...this.currentClubMemberInfo}),this.pageCmp.onInputsUpdated&&this.pageCmp.onInputsUpdated()),this.updateView()}buildTabs(){var e=this;return f(function*(){e.tabs.list=e.createTabs(),e.setCurrentTabOrFallback(e.route.children[0].routeConfig.path)!==e.route.children[0].routeConfig.path&&(yield e.navigateToTab(lO)),e.subscriptions.add(e.navigation.events.pipe(bt(r=>r instanceof as)).subscribe(r=>{e.setCurrentTabOrFallback(e.route.children[0].routeConfig.path)===lO&&e.reinitView()})),e.contextChangeListener=e.playerContextService.onContextChange(r=>{r.current===ba.InGame&&(e.unsubscribeAllClubsSubscriptions(),e.navigation.closeSecondaryOutlets())})})()}changeTabViaSwipe(e){const i=this.tabs.list.findIndex(r=>r.id===this.tabs.current);switch(e){case sa.Right:if(0===i){this.navigateToTab(this.tabs.list[this.tabs.list.length-1].id);break}this.navigateToTab(this.tabs.list[i-1].id);break;case sa.Left:if(i===this.tabs.list.length-1){this.navigateToTab(this.tabs.list[0].id);break}this.navigateToTab(this.tabs.list[i+1].id)}}navigateToTab(e){var i=this;return f(function*(){const r=i.getTabIfExistingOrDefault(e);i.setCurrentTabOrFallback(r),r!==i.route.children[0].routeConfig.path&&(yield i.navigation.navigate(["".concat(r)],{relativeTo:i.route,replaceUrl:!0}))})()}setCurrentTabOrFallback(e){const i=this.getTabIfExistingOrDefault(e);return i!==this.tabs.current&&(this.tabs.current=i,this.updateView()),i}createTabs(){return this.currentClubMemberInfo?[{id:lO,icon:ve.EIcons.CLUB_PAGE},{id:o1,icon:ve.EIcons.CLUB_ACTIVITY_FEED},{id:aD,icon:ve.EIcons.LEADERBOARD,hidden:!this.permissions.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardClubMembers).isPermitted},{id:r1,icon:ve.EIcons.BROWSE_CLUBS}]:[{id:lO,icon:ve.EIcons.CLUB_PAGE},{id:aD,icon:ve.EIcons.LEADERBOARD,hidden:!this.permissions.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardClubMembers).isPermitted},{id:r1,icon:ve.EIcons.BROWSE_CLUBS}]}onOutletLoaded(e){e.club=this.club,e.currentClubMemberInfo=this.currentClubMemberInfo,this.pageCmp=e,this.updateView()}showFooter(){return this.club&&this.currentUserClubId!==this.club.clubProfile.id&&this.tabs.current!==r1}isMinLevelRequirementFulfilled(){return this.store.selectSimpleProfile().level>=this.club.clubProfile.settings.requirements.minLevel}isClubFull(){return this.club.clubMembers.length===this.club.clubProfile.settings.memberLimit}isClubClosed(){return this.club.clubProfile.settings.privacy===Or.Closed}getTabIfExistingOrDefault(e){var i,r;return null!==(i=null===(r=this.tabs.list.find(s=>s.id===e))||void 0===r?void 0:r.id)&&void 0!==i?i:this.tabs.list[0].id}createAndAddTask(e){const i=new Jn(e);return this.tasks.add(i),i}cancelAllActiveTasks(){this.tasks.forEach(e=>e.cancel()),this.tasks=new ie.List}setClubJoinDisabledReasonKey(){this.clubJoinDisabledReason=void 0,this.isMinLevelRequirementFulfilled()?this.isClubClosed()?this.clubJoinDisabledReason=cO.CLUB_CLOSED:this.isClubFull()&&(this.clubJoinDisabledReason=cO.CLUB_FULL):this.clubJoinDisabledReason=cO.MIN_LEVEL}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Pr),g(Yt),g(Po),g(Au),g(J),g(yr),g(ic),g(Pi))},t.\u0275cmp=pe({type:t,selectors:[["club-page"]],features:[mn([ia])],decls:5,vars:7,consts:[[1,"club--page__wrapper",3,"ngClass"],[3,"transparentBG",4,"ngIf"],[3,"textArray",4,"ngIf"],["class","club_top--tabs",3,"initialOpenedTab","showBackButton","scrollStyleCustomClass","scrollBarCustomClass",4,"ngIf"],["class","club--page__route--wrapper","swipe-directive","",3,"ngClass","swipeAction",4,"ngIf"],[3,"transparentBG"],[3,"textArray"],["class","club--profile--info__invite--btn",3,"icon","buttonModifier","onClick",4,"ngIf"],[1,"club--profile--info__invite--btn",3,"icon","buttonModifier","onClick"],[1,"club_top--tabs",3,"initialOpenedTab","showBackButton","scrollStyleCustomClass","scrollBarCustomClass"],[3,"tabId","tabClass","select",4,"ngFor","ngForOf","ngForTrackBy"],[3,"tabId","tabClass","select"],["class","club-page__list-item--navigation",3,"bclass","icon",4,"ngIf"],["class","top-tabs__list-item--navigation",3,"notificationValue","buttonClass","isNotificationShown","bclass","icon",4,"ngIf"],[1,"club-page__list-item--navigation",3,"bclass","icon"],[1,"top-tabs__list-item--navigation",3,"notificationValue","buttonClass","isNotificationShown","bclass","icon"],["swipe-directive","",1,"club--page__route--wrapper",3,"ngClass","swipeAction"],[3,"activate"],["class","club--page__join--footer",4,"ngIf"],[1,"club--page__join--footer"],[1,"club--page__separator"],[1,"club--page__join--footer--content"],[1,"club--page__button",3,"clubProfile","clubMembersCount","joinRequest"],["class","club--page__join--footer--text__container",4,"ngIf"],[1,"club--page__join--footer--text__container"],["class","club--page__join--footer--text",4,"ngIf"],["class","club--page__join--footer--text",3,"innerHTML",4,"ngIf"],[1,"club--page__join--footer--text"],[1,"club--page__join--footer--text",3,"innerHTML"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,AGt,1,1,"loader-image",1)(2,kGt,2,4,"empty-content",2)(3,NGt,2,6,"top-tabs",3)(4,HGt,3,4,"div",4),m()),2&e&&(l("ngClass",ne(5,qGt,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(),l("ngIf",i.isLoading),d(),l("ngIf",!i.isLoading&&i.error),d(),l("ngIf",i.club),d(),l("ngIf",!i.isLoading&&i.club))},dependencies:[Xe,Mt,Ne,bo,kl,dl,ei,so,au,Oi,wu,Ip,Q2,qe],styles:[".club--page__wrapper[_ngcontent-%COMP%]{position:relative}.club--page__wrapper--popup-outlet[_ngcontent-%COMP%]{height:100%}.club_top--tabs[_ngcontent-%COMP%]{display:block;height:4.2rem}.club--page__route--wrapper[_ngcontent-%COMP%]{height:calc(100% - 4.2rem)}.club--page__route--wrapper.show-footer[_ngcontent-%COMP%]{height:calc(100% - 16.2rem)}@media screen and (max-width: 768px){.club--page__route--wrapper.show-footer[_ngcontent-%COMP%]{height:calc(100% - 14.2rem)}}@media screen and (max-width: 380px){.club--page__route--wrapper.show-footer[_ngcontent-%COMP%]{height:calc(100% - 11.2rem)}}.club--page__join--footer[_ngcontent-%COMP%]{height:12rem;padding:0 2rem}@media screen and (max-width: 768px){.club--page__join--footer[_ngcontent-%COMP%]{height:10rem}}@media screen and (max-width: 380px){.club--page__join--footer[_ngcontent-%COMP%]{height:7rem}}.club--page__join--footer--content[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;flex-flow:column}.club--page__separator[_ngcontent-%COMP%]{width:100%;display:flex}.club--page__button[_ngcontent-%COMP%]{margin:1rem 0}@media screen and (max-width: 380px){.club--page__button[_ngcontent-%COMP%]{margin:.5rem 0}}.club--page__join--footer--text[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();function WGt(t,n){1&t&&B(0,"loader-image",3),2&t&&l("transparentBG",!0)}function $Gt(t,n){if(1&t&&(p(0,"span",15),B(1,"currency-label",18),m()),2&t){const o=_(2);d(),l("value",o.price.amount)("type",o.price.currency)}}const KGt=(t,n,o,e)=>({id:t,level:n,avatar:o,frame:e}),ZGt=()=>["image/*"],QGt=t=>({accept:t}),YGt=()=>({formControlName:"avatar"});function JGt(t,n){if(1&t){const o=Ce();p(0,"div",4)(1,"div",5)(2,"div",6),B(3,"club-avatar",7),p(4,"button-text",8),H(5),V(6,"translate"),m(),p(7,"input-file",9),Y("select",function(i){return oe(o),re(_().imageUploadPreview(i))}),V(8,"translate"),m()(),p(9,"div",10)(10,"form-builder",11),Y("onOptionSelect",function(i){return oe(o),re(_().onSelect(i))}),m()()(),p(11,"div",12)(12,"div",13)(13,"button-text",14),Y("onClick",function(){return oe(o),re(_().updateClub())}),p(14,"span",15),H(15),V(16,"translate"),m(),U(17,$Gt,2,2,"span",16),m()(),p(18,"div",13)(19,"button-text",17),Y("onClick",function(){return oe(o),re(_().cancelChanges())}),H(20),V(21,"translate"),m()()()()}if(2&t){const o=_();d(3),l("club",xd(22,KGt,o.clubInfo.clubProfile.id,o.clubInfo.clubProfile.level,o.editedAvatar||o.clubInfo.clubProfile.avatar,o.clubInfo.clubInventory.frame)),d(),l("buttonModifier",o.buttonModifier.BUTTON_ACTION),d(),se($(6,14,"EDIT_PROFILE.CHANGE_AVATAR")),d(2),l("config",ne(28,QGt,pt(27,ZGt)))("nativeAttributes",pt(30,YGt))("title",$(8,16,"EDIT_PROFILE.ADD_PHOTO")),d(3),l("config",o.fields),d(3),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isSavingChanges),d(2),se($(16,18,"EDIT_PROFILE.SAVE_CHANGES")),d(2),l("ngIf",null==o.price?null:o.price.amount),d(2),l("buttonModifier",o.buttonModifier.BUTTON_NEGATIVE)("disabled",o.isSavingChanges),d(),ze("",$(21,20,"EDIT_PROFILE.CANCEL")," ")}}let o7=(()=>{var t;class n{constructor(e,i,r,s,a){this.isSavingChanges=!1,this.save=new ke,this.cancel=new ke,this.buttonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.fields=[],this.selected=[],this.cdr=e,this.config=i,this.toaster=r,this.clubsFormHelper=s,this.fieldValidatorFactory=a}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){e.club&&!e.club.firstChange&&this.cdr.detectChanges(),e.clubsConfig&&e.clubsConfig.currentValue&&(this.fields=this.createForm(),this.cdr.detectChanges()),e.isSavingChanges&&!e.isSavingChanges.firstChange&&this.cdr.detectChanges()}imageUploadPreview(e){var i=this;return f(function*(){if(e.file){if(!lf.isOfAllowedMimeType(e.file,"avatar")||!lf.isSizeInBounds(e.file,"avatar"))return void i.toaster.error("GALLERY.IMAGE_UPLOAD_ERROR",[ZC.bytesFormat(lf.getMaxSizeInBytes("avatar"))]);try{const s=yield(yield GM.process(e.file,{maxWidth:i.config.content.clubs.images.avatar.size[0],maxHeight:i.config.content.clubs.images.avatar.size[1],quality:i.config.content.clubs.images.avatar.quality,outputFormat:i.config.content.clubs.images.avatar.outputFormat})).toBase64();i.editedAvatar={...i.clubInfo.clubProfile.avatar,customAvatar:new IU({id:"",isActive:!0,url:s})},i.recalcEditPrice(),i.cdr.detectChanges()}catch(r){i.toaster.error("GALLERY.IMAGE_UPLOAD_ERROR",[ZC.bytesFormat(lf.getMaxSizeInBytes("avatar"))]),console.warn(r)}}})()}updateClub(){this.save.emit(this.formToEditArgs(this.selected))}cancelChanges(){this.cancel.emit()}onSelect(e){this.selected=e,this.recalcEditPrice(),this.cdr.detectChanges()}createForm(){const e=[],i={id:Yp.EFieldId.Description,type:Ei.FieldType.Input,format:Ei.EFormat.Text,label:"EDIT_PROFILE.STATUS",placeholder:"EDIT_PROFILE.STATUS",inputType:Ei.EInputType.TextArea,defaultValue:{id:"",value:this.clubInfo.clubProfile.description},options:[],maxLength:this.fieldValidatorFactory.createClubStatusValidator().maxLength};e.push(i);const r={id:Yp.EFieldId.Location,type:Ei.FieldType.Dropdown,format:Ei.EFormat.Text,label:"CLUBS.LOCATION",options:Qp.createLocationOptions(this.clubsConfig.locations,!0)};r.defaultValue={id:"",value:this.clubInfo.clubProfile.location},e.push(r);const s={id:Yp.EFieldId.MinLevel,type:Ei.FieldType.Picker,format:Ei.EFormat.Number,label:"CLUBS.MIN_LEVEL"},a=this.clubsFormHelper.createMinLevelOptions();s.options=a,s.defaultValue=a.find(h=>h.value===this.clubInfo.clubProfile.settings.requirements.minLevel),e.push(s);const c={id:Yp.EFieldId.Privacy,type:Ei.FieldType.Dropdown,format:Ei.EFormat.LocalizedText,label:"CLUBS.PRIVACY_LEVEL",options:Qp.createPrivacyOptions()};c.defaultValue=c.options.find(h=>h.value===this.clubInfo.clubProfile.settings.privacy),e.push(c);const u={id:Yp.EFieldId.Tag,type:Ei.FieldType.Picker,format:Ei.EFormat.LocalizedText,label:"CLUBS.CLUB_TAG",options:Qp.createTagOptions()};return u.defaultValue=u.options.find(h=>h.value===this.clubInfo.clubProfile.tag),e.push(u),e}formToEditArgs(e){var i,r,s;return{newCustomAvatarImage:null===(i=this.editedAvatar)||void 0===i||null===(i=i.customAvatar)||void 0===i?void 0:i.url,description:e.find(a=>a.id===Yp.EFieldId.Description).value,location:null!==(r=e.find(a=>a.id===Yp.EFieldId.Location).value)&&void 0!==r?r:null,minLevel:null!==(s=e.find(a=>a.id===Yp.EFieldId.MinLevel).value)&&void 0!==s?s:this.clubsConfig.defaultSettings.requirements.minLevel,privacy:e.find(a=>a.id===Yp.EFieldId.Privacy).value,tag:e.find(a=>a.id===Yp.EFieldId.Tag).value}}recalcEditPrice(){this.price=$h.calculateEditPrice(this.clubInfo.clubProfile,this.formToEditArgs(this.selected),this.clubsConfig),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Dr),g(Dt),g(Qp),g(wa))},t.\u0275cmp=pe({type:t,selectors:[["club-edit"]],inputs:{clubInfo:"clubInfo",isLoading:"isLoading",clubsConfig:"clubsConfig",isSavingChanges:"isSavingChanges"},outputs:{save:"save",cancel:"cancel"},features:[it],decls:3,vars:2,consts:[[1,"club--edit__wrapper"],[3,"transparentBG",4,"ngIf"],["class","club--edit__container",4,"ngIf"],[3,"transparentBG"],[1,"club--edit__container"],[1,"club--edit__container--inputs"],[1,"club--edit__container--avatar"],["data-cy","clubEditProfileAvatar",1,"club--edit__club-avatar",3,"club"],[3,"buttonModifier"],[1,"club--edit__input--avatar",3,"config","nativeAttributes","title","select"],[1,"club--edit__container--form"],[3,"config","onOptionSelect"],[1,"club--edit__container--buttons"],[1,"club--edit__button--container"],["data-cy","clubEditProfileSaveChangesButton",1,"club--edit__button",3,"buttonModifier","loading","onClick"],[1,"create--edit--button-text"],["class","create--edit--button-text",4,"ngIf"],["data-cy","clubEditProfileCancelChangesButton",1,"club--edit__button",3,"buttonModifier","disabled","onClick"],[3,"value","type"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,WGt,1,1,"loader-image",1)(2,JGt,22,31,"div",2),m()),2&e&&(d(),l("ngIf",i.isLoading),d(),l("ngIf",!i.isLoading))},dependencies:[Ne,pn,Oi,Xd,Yh,A0,mf,qe],styles:[".club--edit__wrapper[_ngcontent-%COMP%]{position:relative;display:block;width:100%;height:calc(100% - 6rem)}.club--edit__container[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-content:center;height:100%}.club--edit__container--inputs[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:100%;overflow-y:auto;overflow-x:hidden;width:100%;height:calc(100% - 8rem);display:flex;flex-flow:column nowrap}.club--edit__container--avatar[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;flex-flow:column nowrap;padding:2rem 0;min-height:20rem}.club--edit__club-avatar[_ngcontent-%COMP%]{width:12rem;height:12rem;margin-bottom:1rem}.club--edit__input--avatar[_ngcontent-%COMP%]{position:absolute}.club--edit__container--buttons[_ngcontent-%COMP%]{position:relative;width:100%;height:8rem;display:flex;flex-flow:row wrap}.club--edit__button--container[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.club--edit__button[_ngcontent-%COMP%]{width:90%;height:5rem}.create--edit--button-text[_ngcontent-%COMP%]{height:100%;vertical-align:middle;margin:0 .25rem}"],changeDetection:0}),n})();var Yp;!function(t){let n;var o;(o=n=t.EFieldId||(t.EFieldId={})).Description="description",o.Privacy="privacy",o.Location="location",o.MinLevel="minLevel",o.Tag="clubTag"}(Yp||(Yp={}));const r7=t=>[t];function XGt(t,n){if(1&t&&B(0,"empty-content",3),2&t){const o=_();l("textArray",ne(1,r7,o.error))}}function e4t(t,n){if(1&t){const o=Ce();p(0,"clubs-list",4),Y("search",function(i){return oe(o),re(_().search(i))})("filter",function(i){return oe(o),re(_().filter(i))})("showInfo",function(){return oe(o),re(_().showInfo())})("reset",function(){return oe(o),re(_().resetFilters())}),m()}if(2&t){const o=_();l("clubs",o.clubs)("isLoading",o.loading)("isLoadingNextPage",o.isLoadingNext)("onListScrolledToBottom",o.onListScrolledToBottom)("currentClub",o.clubsState.currentClub.clubState)("currentJoinRequest",o.clubsState.currentJoinRequest)("currentUserProfile",o.currentUserProfile)("error",o.searchError)}}const Hwe=t=>({name:t});function t4t(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",8),Y("onClick",function(){return oe(o),re(_(2).cancelCurrentJoinRequest())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(2);l("buttonModifier",o.buttonCancel.modifier)("loading",o.clubsState.currentJoinRequest&&o.clubsState.currentJoinRequest.actions.cancel.inProgress)("disabled",o.clubsState.currentJoinRequest&&o.clubsState.currentJoinRequest.actions.send.inProgress)("icon",ne(8,Hwe,o.buttonCancel.icon)),d(),ze(" ",yt(2,5,o.buttonCancel.text.key,ne(10,r7,o.buttonCancel.text.params))," ")}}function n4t(t,n){if(1&t){const o=Ce();p(0,"div",5)(1,"button-icon-text",6),Y("onClick",function(){return oe(o),re(_().openCreatePopup())}),H(2),V(3,"translate"),m(),U(4,t4t,3,12,"button-icon-text",7),m()}if(2&t){const o=_();d(),l("buttonModifier",o.buttonCreate.modifier)("loading",o.clubsState.currentClub.actions.create.inProgress)("disabled",o.buttonCreate.disabled)("icon",ne(9,Hwe,o.buttonCreate.icon)),d(),ze(" ",yt(3,6,o.buttonCreate.text.key,ne(11,r7,o.buttonCreate.text.params))," "),d(2),l("ngIf",o.clubsState.currentJoinRequest&&o.clubsState.currentJoinRequest.status===o.EJoinRequestStatus.PendingClubAccept)}}let oD=(()=>{var t;class n{constructor(e,i,r,s,a,c){var h,u=this;this.clubs=[],this.loading=!1,this.isLoadingNext=!1,this.EJoinRequestStatus=Di,this.buttonCreate={...this.createDefaultButton(),icon:ve.EIcons.PLUS,text:{key:"CLUBS.CREATE_CLUB"}},this.buttonCancel={...this.createDefaultButton(),modifier:ve.EButtonModifier.BUTTON_NEGATIVE,icon:ve.EIcons.MINUS,text:{key:"CLUBS.CANCEL_JOIN_REQUEST"}},this.onListScrolledToBottom={handler:(h=f(function*(){if(!u.isLoadingNext&&!u.currentListState.isLastPage)try{u.isLoadingNext=!0,u.cdr.detectChanges();const b=yield u.requestNextPage();u.clubs=u.clubs.concat(b)}catch(b){console.warn(b),u.toast.error("ERRORS.CONNECTION_ERROR")}finally{u.isLoadingNext=!1,u.cdr.detectChanges()}}),function(){return h.apply(this,arguments)}),outsideZone:!0},this.currentListState={query:void 0,isLastPage:!1},this.subscriptions=new ie.List,this.cdr=e,this.clubsService=i,this.toast=r,this.fieldValidatorFactory=s,this.store=a,this.actions=c}ngOnInit(){this.subscriptions.add(this.store.clubs.subscribeClubsState().subscribe(e=>{this.clubsState=e,this.cdr.detectChanges()})),this.subscriptions.add(this.store.subscribeUserState().subscribe(e=>{this.currentUserProfile=e.profile,this.cdr.detectChanges()})),this.subscriptions.add(this.actions.pipe(ai(M8)).subscribe(e=>{const i=this.clubs.findIndex(r=>r.clubProfile.id===e.clubId);-1!==i&&(this.clubs=[...this.clubs.slice(0,i),{...this.clubs[i],myRequest:e.currentJoinRequest},...this.clubs.slice(i+1)],this.cdr.detectChanges())})),this.cdr.detach(),this.initClubs()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}initClubs(){var e=this;return f(function*(){try{e.loading=!0,e.cdr.detectChanges();const i=yield e.requestNextPage({...e.createFirstPageQuery()});e.clubs=i}catch(i){console.warn(i),e.error=i instanceof lt.ServerUnavailableError?{textKey:"CLUBS.SERVICE_UNAVAILABLE"}:{textKey:"ERRORS.CONNECTION_ERROR"}}finally{e.loading=!1,e.cdr.detectChanges()}})()}search(e){var i=this;return f(function*(){const r=i.fieldValidatorFactory.createClubNameValidator();if(!i.isSameClubNameAsLastSearch(e)){if(""!==e&&!r.isValid(e))return i.searchError={key:"CLUBS.INVALID_CLUB_NAME",params:[r.minLength,r.maxLength]},void i.cdr.detectChanges();i.searchError=void 0;try{i.loading=!0,i.cdr.detectChanges();const s=yield i.requestNextPage({...i.currentListState.query,...i.createFirstPageQuery(),name:e});i.clubs=s}catch(s){console.warn(s),i.error={textKey:"ERRORS.CONNECTION_ERROR"}}finally{i.loading=!1,i.cdr.detectChanges()}}})()}filter(e){var i=this;return f(function*(){try{i.loading=!0,i.cdr.detectChanges();const r={...i.currentListState.query,...i.createFirstPageQuery(),...e},s=yield i.requestNextPage(r);i.clubs=s}catch(r){console.warn(r),i.error={textKey:"ERRORS.CONNECTION_ERROR"}}finally{i.loading=!1,i.cdr.detectChanges()}})()}showInfo(){this.clubsService.openInfoPage()}cancelCurrentJoinRequest(){const e=this.store.clubs.selectCurrentJoinRequest();e&&this.cancelJoinRequest({requestId:e.id,clubId:e.clubId})}cancelJoinRequest(e){var i=this;return f(function*(){try{yield i.clubsService.cancelJoinRequest(e)}catch(r){console.warn(r),i.showErrorToaster(r)}})()}openCreatePopup(){this.clubsService.startCreateClubProcedure()}resetFilters(){this.initClubs()}showErrorToaster(e){e instanceof lt.NetworkError?this.toast.error("ERRORS.CONNECTION_ERROR"):e instanceof Cr?console.log("promise was cancelled"):this.toast.error(e instanceof mb||e instanceof Sh?"CLUBS.JOIN_REQUEST_PROCESS_ERROR":e instanceof lt.ServerUnavailableError?"CLUBS.SERVICE_UNAVAILABLE":e instanceof Mm?"CLUBS.CLUB_NOT_FOUND":"ERRORS.SOMETHING_WRONG")}requestNextPage(e){var i=this;return f(function*(){const r=e||{...i.currentListState.query,limit:i.currentListState.query.limit,skip:i.currentListState.query.skip+i.currentListState.query.limit},s=yield i.clubsService.getList(r);return i.currentListState.query=r,i.currentListState.isLastPage=s.length<r.limit,s})()}createFirstPageQuery(){return{skip:0,limit:20}}createDefaultButton(){return{modifier:ve.EButtonModifier.BUTTON_CLUB_CREATE,disabled:!1,loading:!1}}isSameClubNameAsLastSearch(e){return this.currentListState.query.name===e||null==this.currentListState.query.name&&""===e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Au),g(Dt),g(wa),g(J),g(yr))},t.\u0275cmp=pe({type:t,selectors:[["clubs-list-page"]],decls:3,vars:3,consts:[[3,"textArray",4,"ngIf"],["class","clubs--list--page__list",3,"clubs","isLoading","isLoadingNextPage","onListScrolledToBottom","currentClub","currentJoinRequest","currentUserProfile","error","search","filter","showInfo","reset",4,"ngIf"],["class","clubs--list__create-button-wrapper",4,"ngIf"],[3,"textArray"],[1,"clubs--list--page__list",3,"clubs","isLoading","isLoadingNextPage","onListScrolledToBottom","currentClub","currentJoinRequest","currentUserProfile","error","search","filter","showInfo","reset"],[1,"clubs--list__create-button-wrapper"],["data-cy","clubCreateButton",1,"clubs-list__create-button",3,"buttonModifier","loading","disabled","icon","onClick"],["class","clubs-list__create-button",3,"buttonModifier","loading","disabled","icon","onClick",4,"ngIf"],[1,"clubs-list__create-button",3,"buttonModifier","loading","disabled","icon","onClick"]],template:function(e,i){1&e&&U(0,XGt,1,3,"empty-content",0)(1,e4t,1,8,"clubs-list",1)(2,n4t,5,13,"div",2),2&e&&(l("ngIf",i.error),d(),l("ngIf",!i.error),d(),l("ngIf",!i.loading))},dependencies:[Ne,bo,so,WH,qe],styles:["[_nghost-%COMP%]{position:relative;display:block;width:100%;height:100%}.clubs--list--page__list[_ngcontent-%COMP%], .clubs--list__club--create-component[_ngcontent-%COMP%]{height:calc(100% - 6rem)}.clubs--list__create-button-wrapper[_ngcontent-%COMP%]{height:6rem;display:flex;align-items:center}"],changeDetection:0}),n})(),s7=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.cdr=e,this.clubsService=i,this.store=r,this.toast=s,this.config=a,this.offerService=c,this.savedChanges=new ke,this.canceledChanges=new ke,this.tasks=new ie.List,this.clubsState=this.store.clubs.selectClubsState(),this.clubsConfig=this.config.content.clubs}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges(),this.clubsStateSubcription=this.store.clubs.subscribeClubsState().subscribe(e=>{this.clubsState=e,this.cdr.detectChanges()})}ngOnChanges(e){this.cdr.detectChanges()}ngOnDestroy(){this.clubsStateSubcription&&this.clubsStateSubcription.unsubscribe(),this.tasks.forEach(e=>e.cancel()),this.tasks=new ie.List}onSaveChanges(e){var i=this;return f(function*(){const r=$h.calculateEditPrice(i.clubInfo.clubProfile,e,i.clubsConfig);if(r.amount){const a=i.store.selectWallet();if(r.currency===ln.Chips&&a.chips<r.amount)return void i.offerService.offerCurrency({targetValue:r.amount,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"},action:()=>i.onCancelChanges()});if(r.currency===ln.Gems&&a.gems<r.amount)return void i.offerService.offerCurrency({targetValue:r.amount,itemType:Fe.TG.GemsPack,description:{key:"POPUP.BUY_GEMS_QUESTION"},action:()=>i.onCancelChanges()})}const s=new Jn(i.clubsService.editClubInfo({clubId:i.clubInfo.clubProfile.id,...e}));i.tasks.add(s);try{yield s,i.savedChanges.emit()}catch(a){console.warn(a),i.handleError(a)}finally{i.tasks.remove(s)}})()}onCancelChanges(){this.canceledChanges.emit()}handleError(e){e instanceof Cr||this.toast.error(e instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(ru),g(J),g(Dt),g(Dr),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["club-edit-page"]],inputs:{clubInfo:"clubInfo",clubActions:"clubActions"},outputs:{savedChanges:"savedChanges",canceledChanges:"canceledChanges"},features:[it],decls:1,vars:3,consts:[[3,"clubInfo","isSavingChanges","clubsConfig","save","cancel"]],template:function(e,i){1&e&&(p(0,"club-edit",0),Y("save",function(s){return i.onSaveChanges(s)})("cancel",function(){return i.onCancelChanges()}),m()),2&e&&l("clubInfo",i.clubInfo)("isSavingChanges",i.clubActions.edit.inProgress)("clubsConfig",i.clubsConfig)},dependencies:[o7],styles:["[_nghost-%COMP%]{position:relative;display:block;width:100%;height:100%}\n\n/*# sourceMappingURL=club-edit-page.component.ts-angular-inline--14.css.map*/"],changeDetection:0}),n})();const i4t=()=>({key:"CLUBS.JOIN_NEW_CLUB_BUTTON"});function o4t(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().close())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().close())}),m(),p(2,"div",3)(3,"p",4)(4,"span"),H(5),V(6,"translate"),m()(),p(7,"div",5)(8,"button-text",6),Y("onClick",function(){return oe(o),re(_().joinNewClub())}),H(9),V(10,"translate"),m(),p(11,"button-text",7),Y("onClick",function(){return oe(o),re(_().close())}),H(12),V(13,"translate"),m()()()()}if(2&t){const o=_();l("popupContainerOpened",o.isOpened)("popupContainerOptions",o.popupOptions),d(),l("popupTitleType",o.popupTitleTypes.Static)("text",pt(17,i4t)),d(4),se($(6,11,"CLUBS.JOIN_NEW_CLUB")),d(3),l("buttonModifier",o.buttonModifier.BUTTON_NEGATIVE)("loading",o.isLoading),d(),se($(10,13,"BUTTON.LEAVE")),d(2),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("loading",o.isLoading),d(),se($(13,15,"BUTTON.STAY"))}}let a7=(()=>{var t;class n{constructor(e){this.isOpened=!1,this.isLoading=!1,this.join=new ke,this.closePopup=new ke,this.popupTitleTypes=li,this.popupOptions=this.createPopupOptions(),this.buttonModifier=ve.EButtonModifier,this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}joinNewClub(){this.join.emit()}open(){this.isOpened=!0,this.cdr.detectChanges()}close(){this.isOpened=!1,this.closePopup.emit(),this.cdr.detectChanges()}createPopupOptions(){return{styleProperties:{height:"auto",width:"auto",maxWidth:"40rem",maxHeight:"96%"}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-join-new-popup"]],inputs:{isOpened:"isOpened",isLoading:"isLoading"},outputs:{join:"join",closePopup:"closePopup"},features:[it],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"club-join-new__content"],[1,"club-join-new__text"],[1,"club-join-new__container--buttons"],["data-cy","clubLeaveConfirmButton",1,"club-join-new__button",3,"buttonModifier","loading","onClick"],["data-cy","clubStayConfirmButton",1,"club-join-new__button",3,"buttonModifier","loading","onClick"]],template:function(e,i){1&e&&U(0,o4t,14,18,"popup-container",0),2&e&&l("ngIf",i.isOpened)},dependencies:[Ne,pn,Ji,Wi,qe],styles:[".club-join-new__content[_ngcontent-%COMP%]{padding:2rem}.club-join-new__text[_ngcontent-%COMP%]{text-align:center;font-size:1.8rem}.club-join-new__container--buttons[_ngcontent-%COMP%]{margin-top:2rem;display:flex;flex-flow:row wrap;justify-content:space-around}.club-join-new__button[_ngcontent-%COMP%]{display:block;width:15rem}@media only screen and (max-width: 480px){.club-join-new__button[_ngcontent-%COMP%]{width:10rem}}"],changeDetection:0}),n})();const r4t=()=>({key:"CLUBS.REQUEST_TO_JOIN"});function s4t(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().close())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().close())}),m(),p(2,"club-join",3),Y("join",function(i){return oe(o),re(_().onJoin(i))}),m()()}if(2&t){const o=_();l("popupContainerOpened",o.isOpened)("popupContainerOptions",o.options),d(),l("popupTitleType",o.popupTitleType)("text",pt(6,r4t)),d(),l("club",o.club)("isLoading",o.isLoading)}}let c7=(()=>{var t;class n{constructor(e){this.join=new ke,this.closePopup=new ke,this.options=this.createPopupOptions(),this.popupTitleType=li.Static,this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}open(e){this.isOpened=!0,this.club=e||this.club,this.cdr.detectChanges()}close(){this.isOpened=!1,this.cdr.detectChanges(),this.closePopup.emit()}onJoin(e){this.join.emit(e)}createPopupOptions(){return{styleProperties:{height:"auto",maxWidth:"41rem",maxHeight:"96%"}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-join-popup"]],inputs:{isOpened:"isOpened",isLoading:"isLoading",club:"club"},outputs:{join:"join",closePopup:"closePopup"},features:[it],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"clubs--list__club--join-component",3,"club","isLoading","join"]],template:function(e,i){1&e&&U(0,s4t,3,7,"popup-container",0),2&e&&l("ngIf",i.isOpened)},dependencies:[Ne,Ji,Wi,$H],styles:[".clubs--list__club--join-component[_ngcontent-%COMP%]{display:block;height:calc(100% - 6rem);width:96%;margin:auto}"],changeDetection:0}),n})();const a4t=()=>({key:"BUTTON.LEAVE"});function c4t(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().close())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().close())}),m(),p(2,"club-leader-leave-form",3),Y("leave",function(i){return oe(o),re(_().onLeave(i))}),m()()}if(2&t){const o=_();l("popupContainerOpened",o.isOpened)("popupContainerOptions",o.options),d(),l("popupTitleType",o.titleType)("text",pt(7,a4t)),d(),l("currentClubMemberInfo",o.currentClubMemberInfo)("membersList",o.membersList)("isLeaving",o.isLeaving)}}let l7=(()=>{var t;class n{constructor(e){this.isOpened=!1,this.membersList=[],this.leave=new ke,this.closePopup=new ke,this.titleType=li.Static,this.options=this.createPopupOptions(),this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}open(){this.isOpened=!0,this.cdr.detectChanges()}close(){this.isOpened=!1,this.closePopup.emit(),this.cdr.detectChanges()}onLeave(e){this.leave.emit(e)}createPopupOptions(){return{styleProperties:{height:"auto",width:"auto",maxWidth:"40rem",maxHeight:"96%"}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-leader-leave-form-popup"]],inputs:{isOpened:"isOpened",currentClubMemberInfo:"currentClubMemberInfo",membersList:"membersList",isLeaving:"isLeaving"},outputs:{leave:"leave",closePopup:"closePopup"},features:[it],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[3,"currentClubMemberInfo","membersList","isLeaving","leave"]],template:function(e,i){1&e&&U(0,c4t,3,8,"popup-container",0),2&e&&l("ngIf",i.isOpened)},dependencies:[Ne,Ji,Wi,LC],encapsulation:2,changeDetection:0}),n})();const l4t=()=>({key:"CLUBS.EDIT_CLUB"});function u4t(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().close())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().close())}),m(),p(2,"club-edit-page",3),Y("savedChanges",function(){return oe(o),re(_().onEditSavedChanges())})("canceledChanges",function(){return oe(o),re(_().onEditCanceledChanges())}),m()()}if(2&t){const o=_();l("popupContainerOpened",o.isOpened)("popupContainerOptions",o.options),d(),l("popupTitleType",o.titleType)("customComponentCssClass","popup-title-bar--platform-skinned-popup-title-bar")("text",pt(7,l4t)),d(),l("clubInfo",o.clubInfo)("clubActions",o.clubActions)}}let u7=(()=>{var t;class n{constructor(e){this.savedChanges=new ke,this.canceledChanges=new ke,this.closePopup=new ke,this.options=this.createOptions(),this.titleType=li.Static,this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}onEditSavedChanges(){this.savedChanges.emit()}onEditCanceledChanges(){this.canceledChanges.emit()}open(){this.isOpened=!0,this.cdr.detectChanges()}close(){this.isOpened=!1,this.closePopup.emit(),this.cdr.detectChanges()}createOptions(){return{customComponentCssClass:"popup-container--platform-skinned-popup",styleProperties:{maxWidth:"42rem",minWidth:"32rem",maxHeight:"75rem"}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-edit-popup"]],inputs:{isOpened:"isOpened",clubInfo:"clubInfo",clubActions:"clubActions"},outputs:{savedChanges:"savedChanges",canceledChanges:"canceledChanges",closePopup:"closePopup"},features:[it],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","customComponentCssClass","text","buttonCloseClicked"],[3,"clubInfo","clubActions","savedChanges","canceledChanges"]],template:function(e,i){1&e&&U(0,u4t,3,8,"popup-container",0),2&e&&l("ngIf",i.isOpened)},dependencies:[Ne,Ji,Wi,s7],encapsulation:2,changeDetection:0}),n})();const d4t=["clubCreateCmp"];let d7=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.cdr=e,this.store=i,this.toast=r,this.clubsService=s,this.fieldValidatorFactory=a,this.config=c,this.offerService=u,this.createdClub=new ke,this.cancelClicked=new ke,this.tasks=new ie.List,this.clubsState=this.store.clubs.selectClubsState(),this.clubsConfig=this.config.content.clubs}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges(),this.configSubscription=this.store.clubs.subscribeClubsState().subscribe(e=>{this.clubsState=e,this.cdr.detectChanges()})}ngOnDestroy(){this.configSubscription&&this.configSubscription.unsubscribe(),this.tasks.forEach(e=>e.cancel()),this.tasks=new ie.List}onCancel(){this.cancelClicked.emit()}createClub(e){var i=this;return f(function*(){const r=new Jn(i.clubsService.createClub(e));i.tasks.add(r);try{yield r,i.createdClub.emit()}catch(s){console.warn(s),i.handleError(s)}finally{i.tasks.remove(r)}})()}setErrors(e){this.clubCreateCmp&&this.clubCreateCmp.setErrors(e)}handleError(e){if(!(e instanceof Cr))if(e instanceof lt.NetworkError)this.toast.error("ERRORS.CONNECTION_ERROR");else if(e instanceof GU){const i=this.fieldValidatorFactory.createClubNameValidator();this.setErrors({[ny.EFieldId.Name]:{key:"CLUBS.INVALID_CLUB_NAME",params:[i.minLength,i.maxLength]}})}else e instanceof tne?this.setErrors({[ny.EFieldId.Name]:{key:"CLUBS.CLUB_NAME_ALREADY_EXISTS"}}):e instanceof et.NotEnoughGems?this.offerService.offerCurrency({targetValue:e.targetAmount,itemType:Fe.TG.GemsPack,description:{key:"POPUP.BUY_GEMS_QUESTION"},action:()=>this.clubsService.closeCreateClubPopup()}):e instanceof et.NotEnoughMinerals?this.offerService.offerCurrency({targetValue:e.targetAmount,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"},action:()=>this.clubsService.closeCreateClubPopup()}):this.toast.error(e instanceof XS?"CLUBS.PLAYER_ALREADY_IN_A_CLUB":"ERRORS.SOMETHING_WRONG")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(Dt),g(Au),g(wa),g(Dr),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["club-create-smart"]],viewQuery:function(e,i){if(1&e&&$e(d4t,5),2&e){let r;je(r=He())&&(i.clubCreateCmp=r.first)}},outputs:{createdClub:"createdClub",cancelClicked:"cancelClicked"},decls:2,vars:2,consts:[[3,"config","isCreating","create","cancel"],["clubCreateCmp",""]],template:function(e,i){1&e&&(p(0,"club-create",0,1),Y("create",function(s){return i.createClub(s)})("cancel",function(){return i.onCancel()}),m()),2&e&&l("config",i.clubsConfig)("isCreating",i.clubsState.currentClub.actions.create.inProgress)},dependencies:[ny],encapsulation:2,changeDetection:0}),n})();const p4t=()=>({key:"CLUBS.CREATE_CLUB"});function h4t(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().close())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().close())}),m(),p(2,"club-create-smart",3),Y("createdClub",function(){return oe(o),re(_().onCreatedClub())})("cancelClicked",function(){return oe(o),re(_().close())}),m()()}if(2&t){const o=_();l("popupContainerOpened",o.isOpened)("popupContainerOptions",o.options),d(),l("popupTitleType",o.popupTitleType)("customComponentCssClass","popup-title-bar--platform-skinned-popup-title-bar")("text",pt(5,p4t))}}let p7=(()=>{var t;class n{constructor(e){this.isOpened=!1,this.createdClub=new ke,this.closePopup=new ke,this.popupTitleType=li.Static,this.options=this.createPopupOptions(),this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}onCreatedClub(){this.isOpened&&this.createdClub.emit()}open(){this.isOpened=!0,this.cdr.detectChanges()}close(){this.isOpened=!1,this.closePopup.emit(),this.cdr.detectChanges()}createPopupOptions(){return{customComponentCssClass:"popup-container--platform-skinned-popup",styleProperties:{maxWidth:"38rem",minWidth:"32rem",maxHeight:"75rem"}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-create-popup"]],inputs:{isOpened:"isOpened"},outputs:{createdClub:"createdClub",closePopup:"closePopup"},features:[it],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","customComponentCssClass","text","buttonCloseClicked"],[1,"club--create--popup__form",3,"createdClub","cancelClicked"]],template:function(e,i){1&e&&U(0,h4t,3,6,"popup-container",0),2&e&&l("ngIf",i.isOpened)},dependencies:[Ne,Ji,Wi,d7],styles:[".club--create--popup__form[_ngcontent-%COMP%]{width:100%;height:100%;display:block;height:calc(100% - 6rem)}"],changeDetection:0}),n})();const m4t=(t,n,o)=>[t,n,o];let h7=(()=>{var t;class n{constructor(e){this.confirm=new ke,this.EButtonModifier=ve.EButtonModifier,this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}confirmAction(){this.confirm.emit()}getRoleString(e){return $h.getMemberRoleTranslationKey(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-edit-member-role"]],inputs:{memberNewRole:"memberNewRole",member:"member",myNewRole:"myNewRole",isLoading:"isLoading"},outputs:{confirm:"confirm"},features:[it],decls:11,vars:20,consts:[[1,"club--edit--role__wrapper"],[1,"club--edit--role__text","club--edit--role__item",3,"innerHTML"],[1,"club--edit--role__text","club--edit--role__item"],["data-cy","clubPromoteToLeaderConfirmButton",1,"club--edit--role__item",3,"loading","buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"p",1),V(2,"translate"),V(3,"translate"),V(4,"translate"),p(5,"p",2),H(6),V(7,"translate"),m(),p(8,"button-text",3),Y("onClick",function(){return i.confirmAction()}),H(9),V(10,"translate"),m()()),2&e&&(d(),l("innerHTML",yt(2,5,"CLUBS.EDIT_MEMBER_ROLE_TO_YOURS",_a(16,m4t,i.member.username.currentUsername,$(3,8,i.getRoleString(i.memberNewRole)),$(4,10,i.getRoleString(i.myNewRole)))),Yn),d(5),ze(" ",$(7,12,"TEXT.PLEASE_CONFIRM")," "),d(2),l("loading",i.isLoading)("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION),d(),se($(10,14,"BUTTON.CONFIRM")))},dependencies:[pn,qe],styles:[".club--edit--role__wrapper[_ngcontent-%COMP%]{padding:2rem}.club--edit--role__text[_ngcontent-%COMP%]{text-align:center;font-size:1.8rem}.club--edit--role__item[_ngcontent-%COMP%]{margin:2rem 0}.club--edit--role__item[_ngcontent-%COMP%]:first-child{margin-top:0}.club--edit--role__item[_ngcontent-%COMP%]:last-child{margin-bottom:0}"],changeDetection:0}),n})();const f4t=t=>[t],g4t=t=>({key:"CLUBS.PROMOTE_TO",params:t});function _4t(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().close())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().close())}),V(2,"translate"),m(),p(3,"club-edit-member-role",3),Y("confirm",function(){return oe(o),re(_().onConfirm())}),m()()}if(2&t){const o=_();l("popupContainerOpened",o.isOpened)("popupContainerOptions",o.options),d(),l("popupTitleType",o.titleType)("text",ne(12,g4t,ne(10,f4t,$(2,8,o.getRoleString(o.memberNewRole))))),d(2),l("memberNewRole",o.memberNewRole)("member",o.member)("myNewRole",o.myNewRole)("isLoading",o.isLoading)}}let m7=(()=>{var t;class n{constructor(e){this.isOpened=!1,this.confirm=new ke,this.closePopup=new ke,this.titleType=li.Static,this.options=this.createPopupOptions(),this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}open(){this.isOpened=!0,this.cdr.detectChanges()}close(){this.isOpened=!1,this.closePopup.emit(),this.cdr.detectChanges()}onConfirm(){this.confirm.emit()}getRoleString(e){return $h.getMemberRoleTranslationKey(e)}createPopupOptions(){return{styleProperties:{width:"auto",height:"auto",maxWidth:"45rem"}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-edit-member-role-popup"]],inputs:{isOpened:"isOpened",memberNewRole:"memberNewRole",member:"member",myNewRole:"myNewRole",isLoading:"isLoading"},outputs:{confirm:"confirm",closePopup:"closePopup"},features:[it],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[3,"memberNewRole","member","myNewRole","isLoading","confirm"]],template:function(e,i){1&e&&U(0,_4t,4,14,"popup-container",0),2&e&&l("ngIf",i.isOpened)},dependencies:[Ne,Ji,Wi,h7,qe],encapsulation:2,changeDetection:0}),n})();function v4t(t,n){if(1&t){const o=Ce();p(0,"club-join-popup",6,7),Y("join",function(i){return oe(o),re(_().joinClubMessagePopupArgs.onJoin(i))})("closePopup",function(){return oe(o),re(_().joinClubMessagePopupArgs.close())}),m()}if(2&t){const o=_();l("isOpened",o.joinClubMessagePopupArgs)("isLoading",o.clubsState.currentJoinRequest&&o.clubsState.currentJoinRequest.actions.send.inProgress)("club",o.joinClubMessagePopupArgs.clubProfile)}}function b4t(t,n){if(1&t){const o=Ce();p(0,"club-join-new-popup",8),Y("join",function(){return oe(o),re(_().joinNewClubPopupArgs.onJoin())})("closePopup",function(){return oe(o),re(_().joinNewClubPopupArgs.close())}),m()}if(2&t){const o=_();l("isOpened",o.joinNewClubPopupArgs)("isLoading",o.clubsState.currentClub.actions.leave.inProgress||o.clubsState.currentJoinRequest&&o.clubsState.currentJoinRequest.actions.send.inProgress||o.clubsState.currentClub.details.loadingState.isLoading)}}const C4t=(t,n)=>({clubProfile:t,clubInventory:n});function y4t(t,n){if(1&t){const o=Ce();p(0,"club-edit-popup",9,10),Y("savedChanges",function(){return oe(o),re(_().editClubPopupArgs.onSavedChanges())})("canceledChanges",function(){return oe(o),re(_().editClubPopupArgs.onCanceledChanges())})("closePopup",function(){return oe(o),re(_().editClubPopupArgs.close())}),m()}if(2&t){const o=_();l("isOpened",o.editClubPopupArgs)("clubInfo",cn(3,C4t,o.editClubPopupArgs.clubProfile,o.editClubPopupArgs.clubInventory))("clubActions",o.clubsState.currentClub.actions)}}function S4t(t,n){if(1&t){const o=Ce();p(0,"club-create-popup",11,12),Y("createdClub",function(){return oe(o),re(_().createClubPopupArgs.onCreateClub())})("closePopup",function(){return oe(o),re(_().createClubPopupArgs.close())}),m()}2&t&&l("isOpened",_().createClubPopupArgs)}function w4t(t,n){if(1&t){const o=Ce();p(0,"club-leader-leave-form-popup",13,14),Y("leave",function(i){return oe(o),re(_().leavePopupArgs.onLeave(i))})("closePopup",function(){return oe(o),re(_().leavePopupArgs.close())}),m()}if(2&t){const o=_();l("isOpened",o.leavePopupArgs)("currentClubMemberInfo",o.leavePopupArgs.currentUserMemberInfo)("membersList",o.leavePopupArgs.membersList)("isLeaving",o.clubsState.currentClub.actions.leave.inProgress)}}function T4t(t,n){if(1&t){const o=Ce();p(0,"club-edit-member-role-popup",15,14),Y("confirm",function(){return oe(o),re(_().editMemberRolePopupArgs.onConfirm())})("closePopup",function(){return oe(o),re(_().editMemberRolePopupArgs.close())}),m()}if(2&t){const o=_();l("isOpened",o.editMemberRolePopupArgs)("myNewRole",o.editMemberRolePopupArgs.myNewRole)("member",o.editMemberRolePopupArgs.member)("memberNewRole",o.editMemberRolePopupArgs.memberNewRole)}}let f7=(()=>{var t;class n{constructor(e,i,r){this.subscriptions=new ie.List,this.cdr=e,this.store=i,this.clientClubsService=r,this.clubsState=this.store.clubs.selectClubsState()}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges(),this.clientClubsService.leavePopupArgs.subscribe(e=>{this.leavePopupArgs=e,this.cdr.detectChanges()}),this.clientClubsService.editClubPopupArgs.subscribe(e=>{this.editClubPopupArgs=e,this.cdr.detectChanges()}),this.clientClubsService.createClubPopupArgs.subscribe(e=>{this.createClubPopupArgs=e,this.cdr.detectChanges()}),this.clientClubsService.joinClubMessagePopupArgs.subscribe(e=>{this.joinClubMessagePopupArgs=e,this.cdr.detectChanges()}),this.clientClubsService.joinNewClubPopupArgs.subscribe(e=>{this.joinNewClubPopupArgs=e,this.cdr.detectChanges()}),this.clientClubsService.editMemberRolePopupArgs.subscribe(e=>{this.editMemberRolePopupArgs=e,this.cdr.detectChanges()}),this.subscriptions.add(this.store.clubs.subscribeClubsState().subscribe(e=>{this.clubsState=e,this.cdr.detectChanges()}))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(Au))},t.\u0275cmp=pe({type:t,selectors:[["clubs-popup-wrapper"]],decls:6,vars:6,consts:[[3,"isOpened","isLoading","club","join","closePopup",4,"ngIf"],[3,"isOpened","isLoading","join","closePopup",4,"ngIf"],[3,"isOpened","clubInfo","clubActions","savedChanges","canceledChanges","closePopup",4,"ngIf"],[3,"isOpened","createdClub","closePopup",4,"ngIf"],[3,"isOpened","currentClubMemberInfo","membersList","isLeaving","leave","closePopup",4,"ngIf"],[3,"isOpened","myNewRole","member","memberNewRole","confirm","closePopup",4,"ngIf"],[3,"isOpened","isLoading","club","join","closePopup"],["clubJoinPopup",""],[3,"isOpened","isLoading","join","closePopup"],[3,"isOpened","clubInfo","clubActions","savedChanges","canceledChanges","closePopup"],["clubEditPopup",""],[3,"isOpened","createdClub","closePopup"],["clubCreatePopup",""],[3,"isOpened","currentClubMemberInfo","membersList","isLeaving","leave","closePopup"],["clubLeaderLeavePopup",""],[3,"isOpened","myNewRole","member","memberNewRole","confirm","closePopup"]],template:function(e,i){1&e&&U(0,v4t,2,3,"club-join-popup",0)(1,b4t,1,2,"club-join-new-popup",1)(2,y4t,2,6,"club-edit-popup",2)(3,S4t,2,1,"club-create-popup",3)(4,w4t,2,4,"club-leader-leave-form-popup",4)(5,T4t,2,4,"club-edit-member-role-popup",5),2&e&&(l("ngIf",i.joinClubMessagePopupArgs),d(),l("ngIf",i.joinNewClubPopupArgs),d(),l("ngIf",i.editClubPopupArgs),d(),l("ngIf",i.createClubPopupArgs),d(),l("ngIf",i.leavePopupArgs),d(),l("ngIf",i.editMemberRolePopupArgs))},dependencies:[Ne,a7,c7,l7,u7,p7,m7],encapsulation:2,changeDetection:0}),n})(),Pv=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.data={list:[]},this.loadNextPage=()=>{this.page+=1,this.loading.on(),this.tabSelect(this.containerLeaderboardConfig.selectedTab),this.detectChanges()},this.changeDetRef=i,this.leaderboardService=e,this.loading=r,this.translate=u,this.gamesStateService=c,this.appStorageService=a,this.toaster=s,this.store=h,this.leadersLastWeek=[],this.leadersThisWeek=[],this.leaders=[],this.changeDetRef.detach()}ngOnInit(){this.page=1,this.data.lastWeekList&&this.data.lastWeekList?(this.usersLastWeek=this.data.lastWeekList,this.leadersLastWeek=this.data.lastWeekList.slice(0,3),this.detectChanges()):(this.usersLastWeek=[],this.leadersLastWeek=[],this.leaders=[],this.detectChanges()),this.leadersThisWeek=this.data.list.slice(0,3),this.tabSelect(this.containerLeaderboardConfig.tabs[0].id),this.detectChanges()}tabSelect(e){let i={leaders:[],users:[]};switch(this.containerLeaderboardConfig.selectedTab=e,e){case ys.ThisWeek:case ys.Forever:i=this.getLeaderboardPage(this.page,this.leadersThisWeek,this.data.list),this.containerLeaderboardConfig.data.leadersList=i.leaders,this.containerLeaderboardConfig.data.list=i.users,this.data.myRecord&&(this.containerLeaderboardConfig.data.myLeaderboardRecord=this.data.myRecord);break;case ys.LastWeek:i=this.getLeaderboardPage(this.page,this.leadersLastWeek,this.usersLastWeek),this.containerLeaderboardConfig.data.leadersList=i.leaders,this.containerLeaderboardConfig.data.list=i.users,this.data.myRecordLastWeek&&(this.containerLeaderboardConfig.data.myLeaderboardRecord=this.data.myRecordLastWeek);break;case ys.CurrentSeries:i=this.getLeaderboardPage(this.page,this.leaders,this.data.list),this.containerLeaderboardConfig.data.leadersList=i.leaders,this.containerLeaderboardConfig.data.list=i.users,this.data.myRecordLastWeek&&(this.containerLeaderboardConfig.data.myLeaderboardRecord=this.data.myRecordLastWeek)}this.loading.off(),this.detectChanges()}trackByFn(e,i){return i.profile.id}detectChanges(){this.changeDetRef.destroyed||this.changeDetRef.detectChanges()}calculatePageLength(){return 100}getLeaderboardPage(e,i,r){return{leaders:i.slice(0,this.calculatePageLength()*e),users:r.slice(0,this.calculatePageLength()*e)}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],inputs:{data:"data",leaderboardType:"leaderboardType",game:"game"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();const P4t=t=>({handler:t}),I4t=()=>({class:"container-leaderboard__avatar--class"});let qwe=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h){super(i,e,r,s,a,c,u,h),this.cdr=e,this.containerLeaderboardConfig={tabs:[{id:ys.ThisWeek,key:"LEADERBOARDS.THIS_WEEK"},{id:ys.LastWeek,key:"LEADERBOARDS.ALL_TIME"}],selectedTab:ys.ThisWeek,data:{type:ri.ClubMembers,leadersList:[],list:[]}}}ngOnInit(){var e=()=>super.ngOnInit,i=this;return f(function*(){try{const r=yield Promise.all([i.requestLeaderboard(ri.ClubMembersWeekly),i.requestLeaderboard(ri.ClubMembers)]),s=r[0][va.ThisWeek],a=r[1][0];i.data.list=s.leaderboard.rankings,i.data.lastWeekList=a.leaderboard.rankings,i.data.myRecord=s.position,i.data.myRecordLastWeek=a.position}catch(r){console.warn(r)}e().call(i),i.cdr.detach(),i.cdr.detectChanges()})()}onInputsUpdated(){this.updateView()}updateView(){this.cdr.detectChanges()}requestLeaderboard(e){var i=this;return f(function*(){return yield i.leaderboardService.loadLeaderboard({type:e,periodModifiers:fa.getLeaderboardPeriodModifiers(e),secondId:i.club.clubProfile.id,userId:i.store.selectUserState().profile.id,cache:!1})})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(fa),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["club-players-leaderboard"]],inputs:{club:"club",currentClubMemberInfo:"currentClubMemberInfo"},features:[Ht],decls:3,vars:8,consts:[["scroll-directive","",1,"club--leaderboard__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"club--leaderboard--component-wrapper",3,"avatarConfig","tabs","selectedTab","data","tabSelected"]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2),Y("tabSelected",function(s){return i.tabSelect(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(5,P4t,i.loadNextPage)),d(2),l("avatarConfig",pt(7,I4t))("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:block}.club--leaderboard__container--list-users[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;order:2;width:100%;display:flex;justify-content:center;height:100%;touch-action:manipulation!important}.club--leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),n})();var Iv,Mv;let Ov=(Mv=Iv=class{constructor(n,o,e){this.subs=new ie.List,this.onJoinedClub=()=>{this.sendEvent(Mv.EAction.ClubJoined)},this.onAcceptedClubJoinRequest=()=>{this.sendEvent(Mv.EAction.AcceptedClubJoinRequest)},this.onSentJoinRequest=i=>{i.result.joinRequest?this.sendEvent(Mv.EAction.ClubJoinRequestSent):i.result.clubProfile&&this.onJoinedClub()},this.onSentClubInvite=()=>{this.sendEvent(Mv.EAction.ClubInvite)},this.onKickedMember=()=>{this.sendEvent(Mv.EAction.ClubKick)},this.onLeftClub=()=>{this.sendEvent(Mv.EAction.ClubLeft)},this.actions=n,this.analytics=o,this.store=e}init(){this.attachListeners()}dispose(){this.subs.forEach(n=>n.unsubscribe())}attachListeners(){this.subs.add(this.actions.pipe(ai(hL)).subscribe(this.onJoinedClub)),this.subs.add(this.actions.pipe(ai(T8)).subscribe(this.onAcceptedClubJoinRequest)),this.subs.add(this.actions.pipe(ai(pL)).subscribe(this.onSentJoinRequest)),this.subs.add(this.actions.pipe(ai(P8)).subscribe(this.onSentClubInvite)),this.subs.add(this.actions.pipe(ai(I8)).subscribe(this.onKickedMember)),this.subs.add(this.actions.pipe(ai(w8)).subscribe(this.onLeftClub))}sendEvent(n){const o=new Jc.DefaultEvent(Nn.Club,n);this.analytics.sendEvent(o)}},Iv.\u0275fac=function(n){return new(n||Iv)(T(yr),T(yi),T(J))},Iv.\u0275prov=be({token:Iv,factory:Iv.\u0275fac,providedIn:"root"}),Iv);Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],Ov.prototype,"init",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],Ov.prototype,"dispose",null),Ov=Mv=Qe([Wo(),ue("design:paramtypes",[yr,yi,J])],Ov),function(t){let n;var o;(o=n=t.EAction||(t.EAction={})).ClubJoined="player joined",o.AcceptedClubJoinRequest="accepted to club",o.ClubJoinRequestSent="join request sent",o.ClubLeft="player left",o.ClubKick="player kicked",o.ClubInvite="join request invited"}(Ov||(Ov={}));const Wwe=t=>({name:t});let rD=(()=>{var t;class n{constructor(e,i,r,s){this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.cdr=e,e.detach(),this.clubsService=i,this.store=r,this.translationService=s}ngOnInit(){this.subsription=this.store.clubs.subscribeCurrentClub().subscribe(e=>{this.currentClub=e,this.updateView()}),this.updateView()}ngOnChanges(e){this.updateView()}ngOnDestroy(){var e;null===(e=this.subsription)||void 0===e||e.unsubscribe()}updateView(){this.cdr.detectChanges()}createClub(){this.clubsService.startCreateClubProcedure()}browseClubs(){this.clubsService.openClubsList()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Au),g(J),g(pi))},t.\u0275cmp=pe({type:t,selectors:[["clubs-info-page"]],features:[it],decls:9,vars:16,consts:[[1,"clubs--info-parser-component",3,"textKey"],[1,"clubs--info__separator"],[1,"clubs--info__buttons-wrapper"],[1,"clubs-info__footer-button",3,"buttonModifier","loading","icon","onClick"],[1,"clubs-info__footer-button",3,"buttonModifier","icon","onClick"]],template:function(e,i){1&e&&(B(0,"translation-text-info-parser-component",0)(1,"div",1),p(2,"div",2)(3,"button-icon-text",3),Y("onClick",function(){return i.createClub()}),H(4),V(5,"translate"),m(),p(6,"button-icon-text",4),Y("onClick",function(){return i.browseClubs()}),H(7),V(8,"translate"),m()()),2&e&&(l("textKey","CLUBS.INFO_PAGE_SECTIONS"),d(3),l("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION)("loading",i.currentClub.actions.create.inProgress)("icon",ne(12,Wwe,i.EIcons.PLUS)),d(),ze(" ",$(5,8,"CLUBS.CREATE_CLUB")," "),d(2),l("buttonModifier",i.EButtonModifier.BUTTON_ACTION)("icon",ne(14,Wwe,i.EIcons.BROWSE_CLUBS)),d(),ze(" ",$(8,10,"CLUBS.BROWSE_CLUBS")," "))},dependencies:[so,WL,qe],styles:[".clubs--info-parser-component[_ngcontent-%COMP%]{height:calc(100% - 6rem)}.clubs--info__buttons-wrapper[_ngcontent-%COMP%]{height:6rem;display:flex;align-items:center}.clubs--info__separator[_ngcontent-%COMP%]{position:relative}.clubs--info__separator.section__separator[_ngcontent-%COMP%]{padding:1.2rem 0}@media screen and (max-width: 568px){.clubs--info__separator.section__separator[_ngcontent-%COMP%]{padding:1rem 0}}"],changeDetection:0}),n})(),sD=(()=>{var t;class n{constructor(e){this.playerCtx=e}canActivate(e,i){return this.playerCtx.getCurrent()!==ba.InGame}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ic))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const $we=rl.defaultLoggedRoute;let Kwe=(()=>{var t;class n{constructor(e,i){this.store=e,this.navigation=i}canActivate(e,i){const r=e.parent.params.id;return r===this.store.clubs.selectClubProfileId()||this.navigation.parseUrl("".concat($we,"(").concat(Fn,":").concat(Ai).concat($we,"/club/").concat(r,")"))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Yt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Sf=rl.defaultLoggedRoute,lO="main-page",o1="activity-feed",aD="leaderboard",r1="clubs-list",g7="clubs-info",M4t=[{path:"clubs-list",redirectTo:"".concat(Sf,"(").concat(Fn,":").concat(Ai).concat(Sf,"/").concat(r1,")")},{path:"club/:id/".concat(o1),redirectTo:"".concat(Sf,"(").concat(Fn,":").concat(Ai).concat(Sf,"/club/:id/").concat(o1,")")},{path:"club/:id/leaderboard",redirectTo:"".concat(Sf,"(").concat(Fn,":").concat(Ai).concat(Sf,"/club/:id/").concat(aD,")")},{path:"club/:id",redirectTo:"".concat(Sf,"(").concat(Fn,":").concat(Ai).concat(Sf,"/club/:id)")},{path:"clubs-info",redirectTo:"".concat(Sf,"(").concat(Fn,":").concat(Ai).concat(Sf,"/").concat(g7,")")}],O4t=[{path:r1,data:{pageId:Mn.ClubsList},component:oD,canActivate:[sD]},{path:g7,data:{pageId:Mn.ClubsInfoPage},component:rD,canActivate:[sD]},{path:"club/:id",canActivate:[sD],children:[{path:"",component:i7,children:[{path:"",data:{pageId:Mn.ClubProfile},component:sO},{path:lO,redirectTo:""},{path:o1,data:{pageId:Mn.AcivityFeed},component:t7,canActivate:[Kwe]},{path:aD,data:{pageId:Mn.Leaderboards},component:qwe},{path:r1,data:{pageId:Mn.ClubsList},component:oD},{path:g7,data:{pageId:Mn.ClubsInfoPage},component:rD}]}]}],E4t=[oct,xi,No,Ls,Eve,JSe,Io,Yi],x4t=[Uwe,Gwe,{provide:ru,useExisting:Au},Ov,sD,Kwe];let _7=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ov))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:x4t,imports:[E4t]}),n})();function A4t(t,n){if(1&t&&B(0,"navigation-bar",5),2&t){const o=_();l("backLink","history")("content",o.navBarContent)}}function R4t(t,n){1&t&&B(0,"loader-image",6),2&t&&l("transparentBG",!_().uploadingPhoto)}const Zwe=t=>({isNavigationVisible:t}),k4t=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),Qwe=t=>[t];function L4t(t,n){if(1&t&&(p(0,"div",7),B(1,"empty-content",8),m()),2&t){const o=_();l("ngClass",ne(2,Zwe,o.isNavigationVisible)),d(),l("textArray",ne(5,Qwe,pt(4,k4t)))}}const D4t=()=>({textKey:"GALLERY.NO_PHOTOS"});function B4t(t,n){1&t&&B(0,"empty-content",8),2&t&&l("textArray",ne(2,Qwe,pt(1,D4t)))}const N4t=t=>({hidden:t});function F4t(t,n){if(1&t){const o=Ce();p(0,"div",16)(1,"div",17)(2,"add-button",18),Y("change",function(i){return oe(o),re(_(2).imageUploadPreview(i))}),m()()()}if(2&t){const o=_(2);l("ngClass",ne(3,N4t,o.playerContext.getCurrent()===o.EPlayerContext.InGame)),d(2),l("isFileInput",!0)("iconClass","gallery__container--add-button__icon")}}function U4t(t,n){if(1&t){const o=Ce();Tn(0),p(1,"div",19)(2,"div",17)(3,"gallery-photo",20),Y("action",function(i){return oe(o),re(_(2).handlePhotoAction(i))}),m()()(),Pn()}if(2&t){const o=n.$implicit,e=_(2);d(3),l("photo",o)("isMyPhoto",e.isMyGallery)}}function G4t(t,n){if(1&t){const o=Ce();p(0,"like-component",25),Y("like",function(){oe(o);const i=_().$implicit;return re(_(3).likePhoto(i))}),m()}if(2&t){const o=_().$implicit,e=_(3);vp(e.EStyle.Light),l("count",o.likes)("showCounter",e.isMyGallery||o.likes)("isLoading",o.actions.like.inProgress)("isInteractable",!e.isMyGallery)}}const v7=t=>({name:t});function V4t(t,n){if(1&t){const o=Ce();p(0,"button-icon",29),Y("onClick",function(){oe(o);const i=_(2).$implicit;return re(_(3).changeAvatar(i))}),m()}if(2&t){const o=_(2).$implicit,e=_(3);l("icon",ne(3,v7,e.EIcons.CHANGE_AVATAR))("loading",o.actions.changeAsAvatar.inProgress)("bclass","gallery--photo__change-avatar-button")}}function z4t(t,n){if(1&t){const o=Ce();p(0,"button-icon",30),Y("onClick",function(){oe(o);const i=_(2).$implicit;return re(_(3).deletePhoto(i))}),m()}if(2&t){const o=_(2).$implicit,e=_(3);l("icon",ne(3,v7,e.EIcons.DELETE))("loading",o.actions.delete.inProgress)("bclass","gallery--photo__delete-button")}}function j4t(t,n){if(1&t){const o=Ce();p(0,"button-icon",31),Y("onClick",function(){oe(o);const i=_(2).$implicit;return re(_(3).reportImage(i))}),m()}if(2&t){const o=_(2).$implicit,e=_(3);l("icon",ne(3,v7,e.EIcons.REPORT))("loading",o.actions.report.inProgress)("bclass","gallery--photo__report-button")}}function H4t(t,n){if(1&t&&U(0,V4t,1,5,"button-icon",26)(1,z4t,1,5,"button-icon",27)(2,j4t,1,5,"button-icon",28),2&t){const o=_().$implicit,e=_(3);l("ngIf",e.isMyGallery&&!o.isAvatar),d(),l("ngIf",e.isMyGallery),d(),l("ngIf",!e.isMyGallery)}}function q4t(t,n){1&t&&(p(0,"image-preview-actions-container"),U(1,G4t,1,6,"ng-template",null,23,ft)(3,H4t,3,3,"ng-template",null,24,ft),m())}const W4t=()=>({prefix:"gallery"});function $4t(t,n){if(1&t){const o=Ce();p(0,"image-slider-wrapper")(1,"image-slider",21),Y("close",function(){return oe(o),re(_(2).closePreview())}),U(2,q4t,5,0,"ng-template",null,22,ft),m()()}if(2&t){const o=_(2);d(),l("images",o.photos)("initial",o.previewPhoto)("cdnPathConfig",pt(3,W4t))}}const K4t=t=>({"empty-gallery":t});function Z4t(t,n){if(1&t&&(p(0,"div",9,10)(2,"div",11),U(3,B4t,1,4,"empty-content",12)(4,F4t,3,5,"div",13)(5,U4t,4,2,"ng-container",14),V(6,"slice"),m(),U(7,$4t,4,4,"image-slider-wrapper",15),m()),2&t){const o=Kt(1),e=_();l("ngClass",ne(14,Zwe,e.isNavigationVisible))("list",e.photos)("initialListCount",e.showedPhotosCount)("step",10),d(2),l("ngClass",ne(16,K4t,e.showEmptyContent())),d(),l("ngIf",e.showEmptyContent()),d(),l("ngIf",e.isMyGallery&&(null==e.state?null:e.state.loadingState.isLoaded)),d(),l("ngForOf",u_(6,10,e.photos,0,o.length))("ngForTrackBy",e.trackByFn),d(2),l("ngIf",e.previewPhoto)}}const Q4t=t=>({"gallery__popup-outlet":t});let cD=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.contextEnum=Wr,this.isNavigationVisible=!0,this.photos=[],this.EPlayerContext=ba,this.navBarContent={type:Ru.EContent.Text,data:{key:"LABEL.GALLERY"}},this.subscriptions=new ie.List,this.EIcons=ve.EIcons,this.EStyle=GC.EStyle,this.galleryService=e,this.popup=i,this.toaster=r,this.activatedComponentRoute=s,this.playerContext=a,this.store=c,this.cdr=u}ngOnInit(){var e=this;return f(function*(){const i=e.activatedComponentRoute.route.snapshot.params;e.userId=i.id||e.store.selectUserState().profile.id,e.isMyGallery=e.userId===e.store.selectUserState().profile.id,e.subscriptions.add(e.store.gallery.subscribeGalleryPhotosStateByUserId(e.userId).subscribe(r=>{e.state=r,e.cdr.detectChanges()})),e.subscriptions.add(e.store.gallery.subscribeGalleryPhotosByUserId(e.userId).subscribe(r=>{e.photos=r.filter(s=>!s.actions.upload.inProgress),e.cdr.detectChanges()})),e.subscriptions.add(e.store.gallery.subscribeUploadingPhotoByUserId(e.userId).subscribe(r=>{e.uploadingPhoto=r,e.cdr.detectChanges()}));try{const r=yield e.galleryService.requestGallery(e.userId);if(i.photoId){const s=r.find(a=>a.id===i.photoId);s&&e.openPhoto(s)}}catch(r){console.warn(r)}e.cdr.detach(),e.cdr.detectChanges()})()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.popup.hide(this.infoPopupId),this.isMyGallery||this.galleryService.clearUserGalleryState(this.userId)}handlePhotoAction(e){switch(e.actionType){case Tv.Open:this.openPhoto(e.photo);break;case Tv.Like:this.likePhoto(e.photo);break;case Tv.Delete:this.deletePhoto(e.photo);break;case Tv.Report:this.reportImage(e.photo);break;case Tv.ChangeAvatar:this.changeAvatar(e.photo)}}openPhoto(e){this.previewPhoto=e,this.cdr.detectChanges()}closePreview(){this.previewPhoto=void 0,this.cdr.detectChanges()}likePhoto(e){var i=this;return f(function*(){try{yield i.galleryService.likePhoto(e.id,i.userId)}catch(r){console.warn(r),r instanceof et.ValidationError?i.toaster.warn("GALLERY.ALREADY_LIKED"):i.handleError(r)}})()}deletePhoto(e){var r,i=this;this.infoPopupId=this.popup.confirm({buttons:{action:(r=f(function*(){try{yield i.galleryService.deletePhoto(e.id),i.toaster.success("POPUP.SUCCESS_REMOVE_PHOTO"),i.store.gallery.selectGalleryPhotos().length||i.closePreview()}catch(s){console.warn(s),i.handleError(s)}}),function(){return r.apply(this,arguments)})},textParams:{translationKey:"GALLERY.DELETE_PHOTO_PROMPT"}})}reportImage(e){var r,i=this;this.infoPopupId=this.popup.confirm({buttons:{action:(r=f(function*(){try{yield i.galleryService.reportPhoto(i.userId,e.id),i.toaster.success("REPORT.SUCCESSFUL_REPORT")}catch(s){console.warn(s),s instanceof et.Feedback.Cooldown?i.toaster.success("REPORT.SUCCESSFUL_REPORT"):i.handleError(s)}}),function(){return r.apply(this,arguments)})},textParams:{translationKey:"GALLERY.REPORT_PHOTO_PROMPT"}})}changeAvatar(e){var r,i=this;this.infoPopupId=this.popup.confirm({buttons:{action:(r=f(function*(){try{yield i.galleryService.selectPhotoAsAvatar(e.id),i.toaster.success("GALLERY.AVATAR_CHANGE_SUCCESS")}catch(s){console.warn(s),i.handleError(s)}}),function(){return r.apply(this,arguments)})},textParams:{translationKey:"GALLERY.AVATAR_CHANGE_CONFIRM"}})}imageUploadPreview(e){var i=this;return f(function*(){if(e.file)try{yield i.galleryService.uploadPhoto(e.file)}catch(r){console.warn(r),i.handleError(r)}})()}handleError(e){e instanceof u_e||e instanceof d_e?this.toaster.error("GALLERY.IMAGE_UPLOAD_ERROR",[ZC.bytesFormat(lf.getMaxSizeInBytes("gallery"))]):this.toaster.error(e instanceof et.Permissions.LimitReached?"GALLERY.PHOTOS_LIMIT_REACHED":e instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}trackByFn(e,i){return i.id}showEmptyContent(){var e,i;return!this.isMyGallery&&(null===(e=this.state)||void 0===e?void 0:e.loadingState.isLoaded)&&!this.photos.length||this.playerContext.getCurrent()===ba.InGame&&this.isMyGallery&&(null===(i=this.state)||void 0===i?void 0:i.loadingState.isLoaded)&&!this.photos.length}}return(t=n).\u0275fac=function(e){return new(e||t)(g(I0),g(Cn),g(Dt),g(Pr),g(ic),g(J),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["gallery"]],features:[mn([ia])],decls:5,vars:7,consts:[[1,"gallery__wrapper",3,"ngClass"],[3,"backLink","content",4,"ngIf"],[3,"transparentBG",4,"ngIf"],["class","gallery__container--error",3,"ngClass",4,"ngIf"],["class","gallery__container--main","scroll-directive","",3,"ngClass","list","initialListCount","step",4,"ngIf"],[3,"backLink","content"],[3,"transparentBG"],[1,"gallery__container--error",3,"ngClass"],[3,"textArray"],["scroll-directive","",1,"gallery__container--main",3,"ngClass","list","initialListCount","step"],["scroll","scroll"],[1,"gallery__container--photos",3,"ngClass"],[3,"textArray",4,"ngIf"],["class","gallery__container--photo-wrapper","click-feedback","",3,"ngClass",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["click-feedback","",1,"gallery__container--photo-wrapper",3,"ngClass"],[1,"gallery__container--inner-image"],["data-cy","galleryAddPhoto",1,"gallery__container--add-button",3,"isFileInput","iconClass","change"],["click-feedback","",1,"gallery__container--photo-wrapper"],["data-cy","galleryPhoto",3,"photo","isMyPhoto","action"],[1,"image-slider-container__slider",3,"images","initial","cdnPathConfig","close"],["actions",""],["leftActions",""],["rightActions",""],[1,"image__slider-action--button",3,"count","showCounter","isLoading","isInteractable","like"],["class","image__slider-action--button","data-cy","galleryPreviewSetAvatar",3,"icon","loading","bclass","onClick",4,"ngIf"],["class","image__slider-action--button","data-cy","galleryPreviewDeleteButton",3,"icon","loading","bclass","onClick",4,"ngIf"],["class","image__slider-action--button","data-cy","galleryPreviewReportButton",3,"icon","loading","bclass","onClick",4,"ngIf"],["data-cy","galleryPreviewSetAvatar",1,"image__slider-action--button",3,"icon","loading","bclass","onClick"],["data-cy","galleryPreviewDeleteButton",1,"image__slider-action--button",3,"icon","loading","bclass","onClick"],["data-cy","galleryPreviewReportButton",1,"image__slider-action--button",3,"icon","loading","bclass","onClick"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,A4t,1,2,"navigation-bar",1)(2,R4t,1,1,"loader-image",2)(3,L4t,2,7,"div",3)(4,Z4t,8,18,"div",4),m()),2&e&&(l("ngClass",ne(5,Q4t,i.activatedComponentRoute.outletContext.container===i.contextEnum.Popup)),d(),l("ngIf",i.isNavigationVisible),d(),l("ngIf",(null==i.state?null:i.state.loadingState.isLoading)||i.uploadingPhoto),d(),l("ngIf",null==i.state?null:i.state.loadingState.error),d(),l("ngIf",(null==i.state?null:i.state.loadingState.isLoaded)&&!(null!=i.state&&i.state.loadingState.error)))},dependencies:[Xe,Mt,Ne,Kh,bo,ei,Oi,_v,SM,GC,qz,Wz,po,Is,BH,BT],styles:[".gallery__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}.gallery__container--main[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem;position:relative}.gallery__container--main.isNavigationVisible[_ngcontent-%COMP%]{height:calc(100% - 5rem)}.gallery__container--photos[_ngcontent-%COMP%]{width:100%;margin:0 auto;display:flex;flex-flow:row wrap}.gallery__container--photos.empty-gallery[_ngcontent-%COMP%]{height:100%}.gallery__container--error[_ngcontent-%COMP%]{height:100%;width:100%;padding:1rem;position:relative}.gallery__container--error.isNavigationVisible[_ngcontent-%COMP%]{height:calc(100% - 5rem)}.gallery__container--inner-image[_ngcontent-%COMP%]{width:100%}.gallery__container--photo-wrapper[_ngcontent-%COMP%]{width:20%;padding:1.5rem;height:auto;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 980px){.gallery__container--photo-wrapper[_ngcontent-%COMP%]{width:25%}}@media only screen and (max-width: 768px){.gallery__container--photo-wrapper[_ngcontent-%COMP%]{width:33.33%;padding:1rem}}@media only screen and (max-width: 480px){.gallery__container--photo-wrapper[_ngcontent-%COMP%]{width:50%}}.gallery__popup-outlet[_ngcontent-%COMP%]   .gallery__container--photo-wrapper[_ngcontent-%COMP%]{width:33.33%}@media only screen and (max-width: 480px){.gallery__popup-outlet[_ngcontent-%COMP%]   .gallery__container--photo-wrapper[_ngcontent-%COMP%]{width:50%}}.hidden[_ngcontent-%COMP%]{display:none}.image-slider-container__slider[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;z-index:10000;top:0;left:0}.image__slider-action--button[_ngcontent-%COMP%]{min-width:5rem;font-size:3rem;margin:0}@media only screen and (max-width: 768px){.image__slider-action--button[_ngcontent-%COMP%]{font-size:2.4rem}}"],changeDetection:0}),n})();var Y4t=nt.EPermissionModule,J4t=nt.EModuleAction;let lD=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.permissionsService=i,this.userService=e,this.router=r,this.store=s,this.navigation=a,this.constants=c}canActivate(e){const i=this.permissionsService.getActionPermission(Y4t.Gallery,J4t.View);if(!i.isEnabled)return!!this.navigation.isFirstNavigation(this.navigation.getCurrentNavigation().previousNavigation)&&this.navigation.parseUrl(this.constants.defaultLoggedRoute);const r=e.params.id||this.store.selectUserState().profile.id;return e.params.id?this.userService.getState().then(s=>(this.userMe=s,!(this.userMe.profile.id!==r&&!i.isPermitted&&(this.permissionsService.showFailedRequirementsToUser(i),1)))):(this.router.navigate(["/".concat(this.constants.defaultLoggedRoute,"/gallery/").concat(r)]),!1)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kr),T(Pi),T(on),T(J),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Ywe=[{path:"gallery",data:{pageId:Mn.Photos},component:cD,canActivate:[lD]},{path:"gallery/:id",data:{pageId:Mn.Photos},component:cD,canActivate:[lD]},{path:"gallery/:id/:photoId",data:{pageId:Mn.Photos},component:cD,canActivate:[lD]}],X4t=[lD],e5t=[No,xi,Yi,Io,Ls,Ect];let Jwe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t,bootstrap:[_v,xL]}),t.\u0275inj=Xt({providers:X4t,imports:[e5t]}),n})(),Xwe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["challenges-list-page"]],hostAttrs:[1,"challenges-list"],decls:2,vars:0,consts:[[1,"challenges-list-page__container"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"challenges-list"),m())},dependencies:[ej],styles:[".challenges-list-page__container[_ngcontent-%COMP%]{max-width:54rem;margin:auto;height:100%}"],changeDetection:0}),n})();const t5t=[{path:"challenges-list",data:{pageId:Mn.ChallengesList},component:Xwe}];var im=function(t){return t.InitState="[Personal-Notes Component] Init state",t.AddNote="[Personal-Notes Component] Add note",t.AddNoteSuccess="[Personal-Notes Component] Add note successs ",t.AddNoteError="[Personal-Notes Component] Add note error",t.DeleteNote="[Personal-Notes Component] Delete note",t.GetNotes="[Personal-Notes Component] Get notes",t.GetNotesSuccess="[Personal-Notes Component] Get notes success",t.GetNotesError="[Personal-Notes Component] Get notes error",t.ResendNote="[Personal-Notes Component] Resend note",t.ResetState="[Personal-Notes Component] Reset state",t}(im||{});const e0e=he(im.InitState,{_as:"props",_p:void 0}),t0e=he(im.GetNotes,{_as:"props",_p:void 0}),b7=he(im.GetNotesSuccess,{_as:"props",_p:void 0}),n0e=he(im.GetNotesError,{_as:"props",_p:void 0}),C7=he(im.AddNote,{_as:"props",_p:void 0}),y7=he(im.AddNoteSuccess,{_as:"props",_p:void 0}),uD=he(im.AddNoteError,{_as:"props",_p:void 0}),[i0e,S7,o0e]=ya(im.DeleteNote),r0e=he(im.ResendNote,{_as:"props",_p:void 0}),s0e=he(im.ResetState,{_as:"props",_p:void 0});let a0e=(()=>{var t;class n{constructor(e){this.http=e}getUserNotes(e){return this.http.get("notes/get/".concat(e)).toPromise().then(i=>i.body)}deleteNote(e,i){return this.http.delete("notes/delete/".concat(e),{body:{noteId:i}}).toPromise().then(r=>r.body)}sendNote(e,i){return this.http.post("notes/add/".concat(e),{message:i}).toPromise().then(r=>r.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),c0e=(()=>{var t;class n{constructor(e,i,r,s){this.personalNotesClientService=e,this.permissionsService=i,this.fieldValidatorFactory=r,this.analyticsTracking=s}getUserNotes(e){var i=this;return f(function*(){i.permissionsService.throwIfNotPermitted(nt.EPermissionModule.UserNotes,nt.EModuleAction.View);try{return yield i.personalNotesClientService.getUserNotes(e)}catch(r){throw jt.createErrorInstance(r)}})()}deleteNote(e,i){var r=this;return f(function*(){r.permissionsService.throwIfNotPermitted(nt.EPermissionModule.UserNotes,nt.EModuleAction.Delete);try{yield r.personalNotesClientService.deleteNote(e,i)}catch(s){throw jt.createErrorInstance(s)}})()}sendNote(e,i){var r=this;return f(function*(){const s=r.fieldValidatorFactory.createNoteValidator();if(!s.isValid(i))throw new et.FieldValidationError(s);r.permissionsService.throwIfNotPermitted(nt.EPermissionModule.UserNotes,nt.EModuleAction.Create);try{const a=yield r.personalNotesClientService.sendNote(e,i),c=new Jc.DefaultEvent(Nn.PersonalNotes,"pesonalNoteSaved");return r.analyticsTracking.sendEvent(c),a}catch(a){throw jt.createErrorInstance(a)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(a0e),T(Ti),T(wa),T(yi))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),n5t=(()=>{var t;class n{constructor(){}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[c0e,a0e]}),n})(),i5t=(()=>{var t;class n{constructor(e){this.timeService=e,this.currentId=0}createNoteActions(e){return{record:e,actions:{delete:{inProgress:!1,error:void 0},add:{inProgress:!1,error:void 0}}}}createNote(e){return{record:{id:"".concat(this.currentId++),message:e,createdAt:this.timeService.getServerTimeS()},actions:{add:{inProgress:!1,error:void 0},delete:{inProgress:!1,error:void 0}}}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Bn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),w7=(()=>{var t;class n{constructor(e,i,r,s){this.personalNotesService=e,this.personalNotesFactory=i,this.store=r,this.clientConfigService=s,this.serviceId=(0,ie.uuidV4)(),this.store.dispatch(e0e({serviceId:this.serviceId})),this.maxLimitForNotes=this.clientConfigService.getConfig().core.validations.formFields.userNotes.limit}ngOnDestroy(){this.store.dispatch(s0e({serviceId:this.serviceId}))}getNotes(e){var i=this;return f(function*(){try{i.store.dispatch(t0e({serviceId:i.serviceId}));const s=(yield i.personalNotesService.getUserNotes(e)).map(a=>i.personalNotesFactory.createNoteActions(a));i.store.dispatch(b7({notes:s,serviceId:i.serviceId}))}catch(r){throw i.store.dispatch(n0e({error:r,serviceId:i.serviceId})),r}})()}addNote(e,i){var r=this;return f(function*(){const s=r.personalNotesFactory.createNote(i);try{r.store.dispatch(C7({note:s,serviceId:r.serviceId}));const a=yield r.personalNotesService.sendNote(e,i),c=r.personalNotesFactory.createNoteActions(a);r.store.dispatch(y7({firstAddedNoteId:s.record.id,newNote:c,serviceId:r.serviceId}))}catch(a){throw r.store.dispatch(uD({noteId:s.record.id,error:a,serviceId:r.serviceId})),a}})()}resendNote(e,i){var r=this;return f(function*(){try{const s=r.store.personalNotesComponent.note.selectState({serviceId:r.serviceId,noteId:i});if(!s)return;r.store.dispatch(r0e({noteId:i,serviceId:r.serviceId}));const a=yield r.personalNotesService.sendNote(e,s.record.message),c=r.personalNotesFactory.createNoteActions(a);r.store.dispatch(y7({firstAddedNoteId:s.record.id,newNote:c,serviceId:r.serviceId}))}catch(s){throw r.store.dispatch(uD({noteId:i,error:s,serviceId:r.serviceId})),s}})()}deleteNote(e,i){var r=this;return f(function*(){try{r.store.dispatch(i0e({noteId:i,serviceId:r.serviceId})),yield r.personalNotesService.deleteNote(e,i),r.store.dispatch(S7({noteId:i,serviceId:r.serviceId}))}catch(s){throw r.store.dispatch(o0e({noteId:i,error:s,serviceId:r.serviceId})),s}})()}isMaxLimitOfNotesReached(){return this.store.personalNotesComponent.notes.selectState(this.serviceId).length>=this.maxLimitForNotes}}return(t=n).\u0275fac=function(e){return new(e||t)(T(c0e),T(i5t),T(J),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var o5t=ve.EIcons;const r5t=["scrollableContainer"],s5t=["simpleMessageInput"],a5t=["personalNote"],l0e=t=>({name:t});function c5t(t,n){if(1&t){const o=Ce();p(0,"div",17)(1,"span",18),H(2),V(3,"translate"),m(),p(4,"button-icon",19),Y("click",function(){oe(o);const i=_().$implicit;return re(_(3).resendNote(i))}),m()()}if(2&t){const o=_().$implicit,e=_(3);d(2),se($(3,3,"PERSONAL_NOTES.UNSENT_NOTE")),d(2),l("loading",null==o.actions?null:o.actions.add.inProgress)("icon",ne(5,l0e,e.EIcons.SEND))}}function l5t(t,n){if(1&t){const o=Ce();Tn(0),p(1,"personal-note",12,13),V(3,"timeElapsedPipe"),Tn(4,14),p(5,"button-icon",15),Y("onClick",function(){const r=oe(o).$implicit;return re(_(3).deleteNote(r))}),V(6,"translate"),m(),Pn(),m(),U(7,c5t,5,7,"div",16),Pn()}if(2&t){const o=n.$implicit,e=_(3);d(),l("note",o)("timeText",yt(3,8,o.record.createdAt,e.updateTimeTrigger))("id",o.record.id),d(4),l("bclass","personal-notes-action--button")("title",$(6,11,"CHAT.DELETE"))("icon",ne(13,l0e,e.EIcons.DELETE))("loading",null==o.actions?null:o.actions.delete.inProgress),d(2),l("ngIf",null==o.actions?null:o.actions.add.error)}}const u5t=t=>({handler:t});function d5t(t,n){if(1&t&&(p(0,"div",9,10),U(2,l5t,8,15,"ng-container",11),V(3,"slice"),m()),2&t){const o=_(2);l("onScrolledToTop",ne(6,u5t,o.onScrolledToTop)),d(2),l("ngForOf",yt(3,3,o.notes,-o.visibleNotesCounter))("ngForTrackBy",o.trackByFn)}}function p5t(t,n){1&t&&(p(0,"div",20),B(1,"img",21),V(2,"transformUrl"),p(3,"p",22),H(4),V(5,"translate"),m()()),2&t&&(d(),l("src",$(2,2,"personal-notes/empty-content.png"),Wn),d(3),se($(5,4,"PERSONAL_NOTES.NO_NOTES")))}function h5t(t,n){1&t&&(p(0,"p",23),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"PERSONAL_NOTES.INFO_TEXT")))}function m5t(t,n){1&t&&(p(0,"p",24),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"PERSONAL_NOTES.VIP_REQUIRED_TEXT")))}const f5t=()=>({key:"PERSONAL_NOTES.ENTER_NOTE"});function g5t(t,n){if(1&t){const o=Ce();Tn(0),U(1,d5t,4,8,"div",3)(2,p5t,6,6,"div",4)(3,h5t,3,3,"p",5)(4,m5t,3,3,"p",6),p(5,"simple-message-input",7,8),Y("onSubmit",function(i){return oe(o),re(_().sendNote(i))}),m(),Pn()}if(2&t){const o=_();d(),l("ngIf",o.notes.length>0),d(),l("ngIf",0===o.notes.length),d(),l("ngIf",!o.createPermissionVipRequirementFailed),d(),l("ngIf",o.createPermissionVipRequirementFailed),d(),l("placeholder",pt(7,f5t))("formFieldValidations",o.personalNotesValidations)("bclass","personal-notes__simple-message-input--wrapper")}}const _5t=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),v5t=t=>[t];function b5t(t,n){1&t&&B(0,"empty-content",25),2&t&&l("textArray",ne(2,v5t,pt(1,_5t)))}function C5t(t,n){1&t&&B(0,"loader-image",26),2&t&&l("transparentBG",!0)}let dD=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te){this.cdr=e,this.route=i,this.toastService=r,this.popupService=s,this.personalNotesService=a,this.ngZone=c,this.clientConfigService=u,this.clientPermissionsService=h,this.store=b,this.scrollHelper=w,this.actions=R,this.tweenFactory=G,this.destroyRef=K,this.rulerService=te,this.EIcons=o5t,this.EScrollDirection=Rm,this.EVipTier=Fi,this.updateTimeTrigger=1,this.notes=[],this.visibleNotesCounter=20,this.createPermissionVipRequirementFailed=!1,this.onScrolledToTop=()=>{if(!this.scrollableContainerRef||this.personalNoteRefList.length===this.notes.length)return;this.visibleNotesCounter=this.notes.length;const ee=this.personalNoteRefList.first;this.cdr.detectChanges(),this.scrollHelper.nativeScrollIntoView(ee.nativeElement,{block:"start",offset:-20}),requestAnimationFrame(()=>{this.scrollHelper.nativeScrollIntoView(ee.nativeElement,{block:"start",offset:-20})})}}ngOnDestroy(){clearInterval(this.updateTimeInterval)}ngOnInit(){this.listenForAppResize(),this.updateMessageTimeEveryMinute(),this.userId=this.route.parent.snapshot.params.id,this.createPermission=this.clientPermissionsService.getActionPermission(nt.EPermissionModule.UserNotes,nt.EModuleAction.Create),this.createPermission.failedRequirements.some(e=>e.type===Nc.Vip)&&(this.createPermissionVipRequirementFailed=!0),this.personalNotesService.getNotes(this.userId).catch(e=>{this.showError(e)}),this.personalNotesValidations=this.clientConfigService.getConfig().core.validations.formFields.userNotes,this.store.personalNotesComponent.subscribeState(this.personalNotesService.serviceId).pipe(mi(this.destroyRef)).subscribe(e=>{this.personalNotesState=e,this.cdr.detectChanges()}),this.store.personalNotesComponent.notes.subscribeState(this.personalNotesService.serviceId).pipe(mi(this.destroyRef)).subscribe(e=>{requestAnimationFrame(()=>{this.notes=e,this.animatingFunc?this.animatingFunc.then(()=>{this.animatingFunc=void 0,this.cdr.detectChanges()}):this.cdr.detectChanges()})}),this.subscribeForPersonalNotesActions()}deleteNote(e){this.popupService.confirm({textParams:{translationKey:"PERSONAL_NOTES.NOTE_DELETE_CONFIRMATION"},buttons:{action:()=>{this.personalNotesService.deleteNote(this.userId,e.record.id).catch(i=>{this.showError(i)})}}})}trackByFn(e,i){return i.record.id}sendNote(e){this.personalNotesService.isMaxLimitOfNotesReached()?this.toastService.error("PERSONAL_NOTES.MAX_LIMIT_REACHED"):this.createPermission.isPermitted?(this.visibleNotesCounter+=1,this.simpleMessageInputComponent.resetInputField(),this.personalNotesService.addNote(this.userId,e).catch(i=>{this.showError(i)})):this.clientPermissionsService.showFailedRequirementsToUser(this.createPermission)}resendNote(e){this.personalNotesService.resendNote(this.userId,e.record.id).catch(i=>{this.showError(i)})}scrollToBottomOfScrollableContainer(e){var i;this.scrollableContainerRef&&this.scrollHelper.scrollScrollableContainer(this.scrollableContainerRef.nativeElement,{scrollPosition:Na.EScrollScrollableContainerPosition.Bottom,smooth:null!==(i=null==e?void 0:e.smooth)&&void 0!==i&&i})}subscribeForPersonalNotesActions(){this.actions.pipe(ai(S7),mi(this.destroyRef)).subscribe(e=>{const i=this.personalNoteRefList.find(s=>s.nativeElement.id==e.noteId);if(!i)return;const r=this.tweenFactory.createAnimationTween(i.nativeElement,"delete-note");this.animatingFunc=r.play().catch(s=>console.warn(s.message))}),this.actions.pipe(ai(b7),mi(this.destroyRef)).subscribe(()=>{requestAnimationFrame(()=>{this.scrollToBottomOfScrollableContainer()})}),this.actions.pipe(ai(C7),mi(this.destroyRef)).subscribe(()=>{requestAnimationFrame(()=>{var e;this.scrollToBottomOfScrollableContainer({smooth:!0}),this.scrollableContainerOnAddNoteScrollTop=null===(e=this.scrollableContainerRef)||void 0===e?void 0:e.nativeElement.scrollTop})}),this.actions.pipe(ai(uD),mi(this.destroyRef)).subscribe(()=>{requestAnimationFrame(()=>{this.scrollableContainerRef.nativeElement.scrollTop-this.scrollableContainerOnAddNoteScrollTop<=1&&this.scrollToBottomOfScrollableContainer({smooth:!0})})})}showError(e){if(e instanceof et.Permissions.RequirementNotMeet)return void this.clientPermissionsService.showFailedRequirementsToUser(e);let i,r=[];e instanceof lt.NetworkError?i="ERRORS.CONNECTION_ERROR":e instanceof et.FieldValidationError?(i="PERSONAL_NOTES.VALIDATION_ERROR",r.push(e.validations.maxLength)):i="ERRORS.SOMETHING_WRONG",this.toastService.error(i,r)}listenForAppResize(){this.rulerService.getAppSize().pipe(tr(1),mi(this.destroyRef)).subscribe(()=>{this.scrollToBottomOfScrollableContainer()})}updateMessageTimeEveryMinute(){this.ngZone.runOutsideAngular(()=>{this.updateTimeInterval=setInterval(()=>{this.updateTimeTrigger*=-1,this.cdr.detectChanges()},6e4)})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Po),g(Dt),g(Cn),g(w7),g(an),g(Zt),g(Pi),g(J),g(cr),g(yr),g(tw),g(br),g(Ua))},t.\u0275cmp=pe({type:t,selectors:[["personal-notes"]],viewQuery:function(e,i){if(1&e&&($e(r5t,5,$t),$e(s5t,5,KL),$e(a5t,5,$t)),2&e){let r;je(r=He())&&(i.scrollableContainerRef=r.first),je(r=He())&&(i.simpleMessageInputComponent=r.first),je(r=He())&&(i.personalNoteRefList=r)}},hostAttrs:[1,"personal-notes-host"],features:[mn([w7])],decls:3,vars:3,consts:[[4,"ngIf"],["class","personal-notes__error",3,"textArray",4,"ngIf"],["class","personal-notes--loader",3,"transparentBG",4,"ngIf"],["class","personal-notes__wrapper","scroll-directive","","data-cy","personalNotesWrapper",3,"onScrolledToTop",4,"ngIf"],["class","personal-notes__no-notes",4,"ngIf"],["class","personal-notes--info-text","data-cy","personalNotesInfoText",4,"ngIf"],["class","personal-notes--info-text","data-cy","personalNotesVipRequiredText",4,"ngIf"],[1,"personal-notes__simple-message-input",3,"placeholder","formFieldValidations","bclass","onSubmit"],["simpleMessageInput",""],["scroll-directive","","data-cy","personalNotesWrapper",1,"personal-notes__wrapper",3,"onScrolledToTop"],["scrollableContainer","scroll"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"personal-notes--comments",3,"note","timeText","id"],["personalNote",""],["actions",""],["data-cy","personalNotesDeleteButton",1,"personal-notes__action",3,"bclass","title","icon","loading","onClick"],["class","pesonal-notes__add-note-error",4,"ngIf"],[1,"pesonal-notes__add-note-error"],[1,"pesonal-notes__add-note-error-text"],[1,"personal-notes-input__button-send",3,"loading","icon","click"],[1,"personal-notes__no-notes"],["data-cy","personalNotesNoNotesImg",1,"personal-notes__no-notes-img",3,"src"],[1,"personal-notes__no-notes-text"],["data-cy","personalNotesInfoText",1,"personal-notes--info-text"],["data-cy","personalNotesVipRequiredText",1,"personal-notes--info-text"],[1,"personal-notes__error",3,"textArray"],[1,"personal-notes--loader",3,"transparentBG"]],template:function(e,i){1&e&&U(0,g5t,7,8,"ng-container",0)(1,b5t,1,4,"empty-content",1)(2,C5t,1,1,"loader-image",2),2&e&&(l("ngIf",(null==i.personalNotesState?null:i.personalNotesState.isLoaded)&&!(null!=i.personalNotesState&&i.personalNotesState.error)),d(),l("ngIf",null==i.personalNotesState?null:i.personalNotesState.error),d(),l("ngIf",null==i.personalNotesState?null:i.personalNotesState.isLoading))},styles:[".personal-notes__simple-message-input[_ngcontent-%COMP%]{width:100%;height:9rem;display:block}.personal-notes--comments[_ngcontent-%COMP%]{max-width:450px}.personal-notes__wrapper[_ngcontent-%COMP%]{width:100%;height:calc(100% - 12.6rem)}@media screen and (max-width: 580px){.personal-notes__wrapper[_ngcontent-%COMP%]{height:calc(100% - 14.2rem)}}.personal-notes__action[_ngcontent-%COMP%]{width:initial;height:initial;padding:0;margin:0;min-width:auto;font-size:2rem}.pesonal-notes__add-note-error[_ngcontent-%COMP%]{max-width:450px;margin:0 auto}.personal-notes__no-notes[_ngcontent-%COMP%]{width:100%;height:calc(100% - 12.6rem)}@media screen and (max-width: 580px){.personal-notes__no-notes[_ngcontent-%COMP%]{height:calc(100% - 14.2rem)}}@media screen and (max-width: 320px){.personal-notes__no-notes[_ngcontent-%COMP%]{height:calc(100% - 15.8rem)}}.personal-notes--info-text[_ngcontent-%COMP%]{height:3.6rem;display:flex;justify-content:center;flex-direction:column;align-items:center}.personal-notes__no-notes-img[_ngcontent-%COMP%]{max-height:80%;object-fit:cover;max-width:40%!important}@media screen and (max-width: 640px){.personal-notes__no-notes-img[_ngcontent-%COMP%]{max-width:70%!important}}@media screen and (max-height: 320px){.personal-notes__no-notes-img[_ngcontent-%COMP%]{display:none}}.personal-notes--loader[_ngcontent-%COMP%]{width:100%;height:100%;display:block}"],changeDetection:0}),n})();const u0e=[{path:"personal-notes",data:{pageId:Mn.PersonalNotes},component:dD}],d0e=[{path:"giftable-packs",data:{pageId:Mn.GiftablePacks},component:F2}],pD=rl.defaultLoggedRoute,y5t=[{path:"profile/:id",redirectTo:"".concat(pD,"(").concat(Fn,":").concat(Ai).concat(pD,"/profile/:id)")},{path:"profile",redirectTo:"".concat(pD,"(").concat(Fn,":").concat(Ai).concat(pD,"/profile)")}],S5t=[{path:"profile/:id",component:sp,canActivate:[$2],children:[{path:"",data:{pageId:Mn.Profile},component:NH},{path:"profile-main",redirectTo:""},...YSe,...$Se,...t5t,..._H,...gH,...b2,...C2,...y2,...S2,...M2,...O2,...P2,...E2,...x2,...A2,...w2,...T2,...u0e,...d0e,...EH,{path:"klaverjasDeck",redirectTo:"deck"},{path:"skatDeck",redirectTo:"deck"},{path:"deDeck",redirectTo:"deck"},{path:"itDeck",redirectTo:"deck"},{path:"chDeck",redirectTo:"deck"},{path:"esDeck",redirectTo:"deck"},{path:"tarotDeck",redirectTo:"deck"},{path:"",redirectTo:"currency",pathMatch:"full"}]},{path:"profile",component:sp,canActivate:[$2],children:[{path:"",data:{pageId:Mn.Profile},component:NH,canActivate:[$2]},{path:"profile-main",redirectTo:""},...YSe,...$Se,...b2,...C2,...y2,...S2,...M2,...O2,...P2,...E2,...x2,...A2,...w2,...T2,...u0e,...d0e,...EH,{path:"klaverjasDeck",redirectTo:"deck"},{path:"skatDeck",redirectTo:"deck"},{path:"deDeck",redirectTo:"deck"},{path:"itDeck",redirectTo:"deck"},{path:"chDeck",redirectTo:"deck"},{path:"esDeck",redirectTo:"deck"},{path:"tarotDeck",redirectTo:"deck"},{path:"",redirectTo:"currency",pathMatch:"full"}]}],w5t=[eO,XM,$2,xH,G2,{provide:Ko,useExisting:Z0}],T5t=[No,Ls,EBt,JSe,Jwe,_7,Io,Yi,J0];let P5t=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...w5t],imports:[T5t]}),n})();var I5t=Dc.EGameType;const M5t=["contLeaderboard"],O5t=t=>({handler:t});let p0e=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c,u,h),this.containerLeaderboardConfig={tabs:[{id:ys.ThisWeek,key:"LEADERBOARDS.THIS_WEEK"},{id:ys.LastWeek,key:"LEADERBOARDS.LAST_WEEK"}],selectedTab:null,data:{type:ri.Matchmaking,leadersList:[],list:[]}}}ngOnInit(){if(this.usersLastWeek=[],this.leadersLastWeek=[],this.leadersThisWeek=[],this.tabSelect(this.containerLeaderboardConfig.tabs[0].id),this.game)this.contLeaderboard.choosedGame({value:this.game,text:{key:"PLATFORM_IDS.".concat(this.game)}});else{let e=new ie.List([]);Lt.CONFIG.content.games.list.filter(r=>r.type===I5t.Multiplayer).forEach(r=>{e.add({id:r.id,orderPriority:void 0})}),e.forEach(r=>{r.orderPriority=Lt.CONFIG.content.games.grid.find(s=>s.id===r.id).orderPriority});const i=e.orderBy([(r,s)=>r.orderPriority?r.orderPriority[this.translate.currentLang]:0],ie.ESort.Desc).get(0).id;this.contLeaderboard.choosedGame({value:i,text:{key:"PLATFORM_IDS.".concat(i)}})}}init(e){var i=this;return f(function*(){if(!i.containerLeaderboardConfig.data.game||!e||i.containerLeaderboardConfig.data.game!==e){i.page=1,i.containerLeaderboardConfig.data.game=i.leaderboardType===ri.Matchmaking?e:void 0;try{const r=yield i.leaderboardService.loadLeaderboard({type:ri.Matchmaking,periodModifiers:[va.ThisWeek,va.LastWeek],secondId:i.leaderboardType===ri.Matchmaking?e:void 0,cache:!0,userId:i.store.selectUserState().profile.id}),s=r[va.ThisWeek],a=r[va.LastWeek];null!=s&&s.leaderboard.rankings&&(i.data={list:s.leaderboard.rankings},i.leadersThisWeek=i.data.list.slice(0,3)),null!=a&&a.leaderboard.rankings?(i.usersLastWeek=null==a?void 0:a.leaderboard.rankings,i.leadersLastWeek=null==a?void 0:a.leaderboard.rankings.slice(0,3)):(i.usersLastWeek=[],i.leadersLastWeek=[]),i.data.myRecord=s.position,i.data.myRecordLastWeek=a.position,i.contLeaderboard.loadNextGame(),i.tabSelect(i.containerLeaderboardConfig.selectedTab)}catch(r){console.error(r),i.toaster.error("ERRORS.CONNECTION_ERROR"),i.usersLastWeek=[],i.leadersLastWeek=[],i.leadersThisWeek=[],i.contLeaderboard.failedLeaderboardFetch(),i.detectChanges()}}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["pro-leaderboard"]],viewQuery:function(e,i){if(1&e&&$e(M5t,5),2&e){let r;je(r=He())&&(i.contLeaderboard=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("matchmaking",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:4,vars:6,consts:[["scroll-directive","",1,"pro__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"pro__container-leaderboard--component-wrapper",3,"tabs","selectedTab","data","tabSelected","gameSelected"],["contLeaderboard",""]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2,3),Y("tabSelected",function(s){return i.tabSelect(s)})("gameSelected",function(s){return i.init(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(4,O5t,i.loadNextPage)),d(2),l("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:[".pro__container-leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.pro__container--list-users[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;order:2;width:100%;display:flex;justify-content:center;height:100%;touch-action:pan-y!important}"]}),n})();const E5t=t=>({handler:t});let h0e=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c,u,h),this.containerLeaderboardConfig={tabs:[{id:ys.ThisWeek,key:"LEADERBOARDS.THIS_WEEK"},{id:ys.LastWeek,key:"LEADERBOARDS.LAST_WEEK"}],selectedTab:null,data:{type:ri.Likes,leadersList:[],list:[]}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["likes-leaderboard"]],features:[mn([{provide:nn,useFactory:o=>new nn("likes",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:3,vars:6,consts:[["scroll-directive","",1,"likes__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"likes__container-leaderboard--component-wrapper",3,"tabs","selectedTab","data","tabSelected"]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2),Y("tabSelected",function(s){return i.tabSelect(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(4,E5t,i.loadNextPage)),d(2),l("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:[".likes__container-leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.likes__container--list-users[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;order:2;width:100%;display:flex;justify-content:center;height:100%;touch-action:pan-y!important}"]}),n})();const x5t=t=>({handler:t});let m0e=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c,u,h),this.containerLeaderboardConfig={tabs:[{id:ys.Forever,key:"LEADERBOARDS.ALL_TIME"}],selectedTab:null,data:{type:ri.Richest,leadersList:[],list:[]}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["richest-leaderboard"]],features:[mn([{provide:nn,useFactory:o=>new nn("richest",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:3,vars:6,consts:[["scroll-directive","",1,"richest__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"richest__container-leaderboard--component-wrapper",3,"tabs","selectedTab","data","tabSelected"]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2),Y("tabSelected",function(s){return i.tabSelect(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(4,x5t,i.loadNextPage)),d(2),l("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:[".richest__container-leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.richest__container--list-users[_ngcontent-%COMP%]{position:relative;order:2;width:100%;display:flex;justify-content:center;height:100%;touch-action:manipulation!important}"]}),n})();const A5t=t=>({handler:t});let f0e=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c,u,h),this.containerLeaderboardConfig={tabs:[{id:ys.ThisWeek,key:"LEADERBOARDS.THIS_WEEK"},{id:ys.LastWeek,key:"LEADERBOARDS.THIS_MONTH"}],selectedTab:null,data:{type:ri.EarnedChips,leadersList:[],list:[]}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["earnedchips-leaderboard"]],features:[mn([{provide:nn,useFactory:o=>new nn("earnedchips",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:3,vars:6,consts:[["scroll-directive","",1,"earnedchips__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"earnedchips__container-leaderboard--component-wrapper",3,"tabs","selectedTab","data","tabSelected"]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2),Y("tabSelected",function(s){return i.tabSelect(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(4,A5t,i.loadNextPage)),d(2),l("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:[".earnedchips__container-leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.earnedchips__container--list-users[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;order:2;width:100%;display:flex;justify-content:center;height:100%;touch-action:pan-y!important}"]}),n})();const R5t=t=>({handler:t});let g0e=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c,u,h),this.containerLeaderboardConfig={tabs:[{id:ys.Forever,key:"LEADERBOARDS.ALL_TIME"}],selectedTab:null,data:{type:ri.Gems,leadersList:[],list:[]}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["gems-leaderboard"]],features:[mn([{provide:nn,useFactory:o=>new nn("gems",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:3,vars:6,consts:[["scroll-directive","",1,"gems__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"gems__container-leaderboard--component-wrapper",3,"tabs","selectedTab","data","tabSelected"]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2),Y("tabSelected",function(s){return i.tabSelect(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(4,R5t,i.loadNextPage)),d(2),l("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:[".gems__container-leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.gems__container--list-users[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;order:2;width:100%;display:flex;justify-content:center;height:100%;touch-action:manipulation!important}"]}),n})();const k5t=t=>({handler:t});let _0e=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c,u,h),this.containerLeaderboardConfig={tabs:[{id:ys.Forever,key:"LEADERBOARDS.ALL_TIME"}],selectedTab:null,data:{type:ri.Club,leadersList:[],list:[]}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J))},t.\u0275cmp=pe({type:t,selectors:[["clubs-leaderboard"]],features:[mn([{provide:nn,useFactory:o=>new nn("clubs",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:3,vars:6,consts:[["scroll-directive","",1,"clubs__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"clubs__container-leaderboard--component-wrapper",3,"tabs","selectedTab","data","tabSelected"]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2),Y("tabSelected",function(s){return i.tabSelect(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(4,k5t,i.loadNextPage)),d(2),l("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:[".clubs__container-leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.clubs__container--list-users[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;width:100%;display:flex;justify-content:center;height:100%;touch-action:manipulation!important}"]}),n})(),v0e=(()=>{var t;class n{constructor(e){this.http=e}getRankedSeasonCurrentSeries(e){return this.http.get("users/seasons/ranked/leaderboard/".concat(e)).toPromise().then(i=>i.body)}getRankedSeasonsLeaderboardHistory(e){return this.http.get("users/seasons/ranked/leaderboard/".concat(e,"/history")).toPromise().then(i=>i.body)}getMySeasonsInfo(e){return this.http.get("users/seasons/ranked/stats/".concat(e,"/history")).toPromise().then(i=>i.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),hD=(()=>{var t;class n{createLeaderboardObjectFromRankedSeasonLeaderboardDTO(e){return{id:e.game+"-"+(0,ie.uuidV4)(),rankings:e.seasonData.leaderboard.map(i=>({profile:i.profile,position:i.position,score:i.elo})),rankedSeasonName:e.seasonData.name}}createLeaderboardObjectFromHallOfFameDTO(e){return{id:e.game+"-"+(0,ie.uuidV4)(),rankings:e.seasonData.leaderboard.map(i=>({profile:i.profile,position:i.placement,score:i.elo})),rankedSeasonName:e.seasonData.name,myPlacement:e.myPlacement}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();hD||(hD={});var Ev=function(t){return t.ResetRankedSeasonsLeaderboardsState="Reset Ranked Seasons Leaderboards State",t.GetCurrentSeriesLeaderboard="Get Current Series Leaderboard",t.GetCurrentSeriesSuccess="Get Current Series Leaderboard Success",t.GetCurrentSeriesError="Get Current Series Leaderboard Error",t.GetHallOfFameLeaderboard="Get Hall of Frame Leaderboard",t.GetHallOfFameLeaderboardSuccess="Get Hall of Frame Leaderboard Success",t.GetHallOfFameLeaderboardError="Get Hall of Frame Leaderboard Error",t}(Ev||{});const b0e=he(Ev.ResetRankedSeasonsLeaderboardsState),C0e=he(Ev.GetCurrentSeriesLeaderboard,{_as:"props",_p:void 0}),y0e=he(Ev.GetCurrentSeriesSuccess,{_as:"props",_p:void 0}),S0e=he(Ev.GetCurrentSeriesError,{_as:"props",_p:void 0}),w0e=he(Ev.GetHallOfFameLeaderboard,{_as:"props",_p:void 0}),T0e=he(Ev.GetHallOfFameLeaderboardSuccess,{_as:"props",_p:void 0}),P0e=he(Ev.GetHallOfFameLeaderboardError,{_as:"props",_p:void 0}),I0e=ki({selectId:t=>t.id}),mD=ki({selectId:t=>t.id}),fD=ki({selectId:t=>t.id}),L5t=ki({selectId:t=>t.id}),T7={currentSeries:mD.getInitialState(),hallOfFame:fD.getInitialState()},D5t=Sr(T7,de(b0e,t=>T7),de(sw,t=>T7),de(C0e,(t,n)=>Se(t,o=>{o.currentSeries=mD.addOne({id:n.game,loadingState:{isLoading:!0,isLoaded:!1,error:void 0},rankedSeasonName:void 0,rankings:void 0},t.currentSeries)})),de(y0e,(t,n)=>Se(t,o=>{o.currentSeries=mD.updateOne({id:n.game,changes:{loadingState:{isLoading:!1,isLoaded:!0,error:void 0},rankedSeasonName:n.leaderboard.rankedSeasonName,rankings:n.leaderboard.rankings}},t.currentSeries)})),de(S0e,(t,n)=>Se(t,o=>{o.currentSeries=mD.updateOne({id:n.game,changes:{loadingState:{isLoading:!1,isLoaded:!1,error:n.error}}},t.currentSeries)})),de(w0e,(t,n)=>Se(t,o=>{o.hallOfFame=fD.addOne({id:n.game,loadingState:{isLoading:!0,isLoaded:!1,error:void 0},leaderboardsData:I0e.getInitialState()},t.hallOfFame)})),de(T0e,(t,n)=>Se(t,o=>{const e=I0e.upsertMany(n.leaderboards,t.hallOfFame.entities[n.game].leaderboardsData);o.hallOfFame=fD.updateOne({id:n.game,changes:{loadingState:{isLoading:!1,isLoaded:!0,error:void 0},leaderboardsData:e}},t.hallOfFame)})),de(P0e,(t,n)=>Se(t,o=>{o.hallOfFame=fD.updateOne({id:n.game,changes:{loadingState:{isLoading:!1,isLoaded:!1,error:n.error}}},t.hallOfFame)})));function B5t(t,n){return D5t(t,n)}const M0e="rankedSeasonLeaderboard",P7=Ts(M0e),O0e=We(P7,(t,n)=>t.currentSeries.entities[n]),E0e=We(P7,(t,n)=>t.hallOfFame.entities[n]),x0e=We(P7,(t,n)=>L5t.getSelectors().selectAll(t.hallOfFame.entities[n].leaderboardsData));J.prototype.rankedSeasonsLeaderboards={selectCurrentSeriesLeaderboard:function N5t(t){return this.selectSync(O0e,t)}.bind(J.prototype),subscribeCurrentSeriesLeaderboard:function F5t(t){return this.select(O0e,t)}.bind(J.prototype),selectHallOfFameLeaderboards:function U5t(t){return this.selectSync(E0e,t)}.bind(J.prototype),subscribeHallOfFameLeaderboards:function G5t(t){return this.select(E0e,t)}.bind(J.prototype),selectHallOfFameLeaderboardsData:function V5t(t){return this.selectSync(x0e,t)}.bind(J.prototype),subscribeHallOfFameLeaderboardsData:function z5t(t){return this.select(x0e,t)}.bind(J.prototype)};let I7=(()=>{var t;class n{constructor(e,i,r){this.store=e,this.rankedSeasonsLeaderboardsFactory=i,this.rankedSeasonsLeaderboardsClientService=r}getCurrentRankedSeasonLeaderboard(e){var i=this;return f(function*(){const r=i.store.rankedSeasonsLeaderboards.selectCurrentSeriesLeaderboard(e.game);return e.cache&&null!=r&&r.loadingState.isLoaded?r:i.fetchCurrentRankedSeasonLeaderboard(e.game)})()}loadRankedSeasonsLeaderboardHistory(e){var i=this;return f(function*(){const r=i.store.rankedSeasonsLeaderboards.selectHallOfFameLeaderboards(e.game);e.cache&&null!=r&&r.loadingState.isLoaded||(yield i.fetchRankedSeasonsLeaderboardHistory(e.game))})()}resetRankedSeasonsLeaderboardsState(){this.store.dispatch(b0e())}fetchCurrentRankedSeasonLeaderboard(e){var i=this;return f(function*(){try{i.store.dispatch(C0e({game:e}));const r=yield i.rankedSeasonsLeaderboardsClientService.getRankedSeasonCurrentSeries(e),s=i.rankedSeasonsLeaderboardsFactory.createLeaderboardObjectFromRankedSeasonLeaderboardDTO({game:e,seasonData:r});return i.store.dispatch(y0e({game:e,leaderboard:s})),s}catch(r){const s=jt.createErrorInstance(r);throw i.store.dispatch(S0e({game:e,error:s})),r}})()}fetchRankedSeasonsLeaderboardHistory(e){var i=this;return f(function*(){try{i.store.dispatch(w0e({game:e}));const[s,a]=yield Promise.all([i.rankedSeasonsLeaderboardsClientService.getRankedSeasonsLeaderboardHistory(e),i.rankedSeasonsLeaderboardsClientService.getMySeasonsInfo(i.store.selectSimpleProfile().id)]),c=[];for(let u of s.seasons){var r;const h=null===(r=a.stats.find(w=>w.seasonId===u.seasonId))||void 0===r?void 0:r.performance.placement,b=i.rankedSeasonsLeaderboardsFactory.createLeaderboardObjectFromHallOfFameDTO({game:e,seasonData:u,myPlacement:h});c.push(b)}i.store.dispatch(T0e({game:e,leaderboards:c}))}catch(s){const a=jt.createErrorInstance(s);throw i.store.dispatch(P0e({game:e,error:a})),s}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(hD),T(v0e))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),j5t=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[v0e,I7,hD],imports:[bu,$r.forFeature(M0e,B5t)]}),n})();var H5t=Dc.EGameType;const q5t=["contLeaderboard"],W5t=t=>({handler:t});let A0e=(()=>{var t;class n extends Pv{constructor(e,i,r,s,a,c,u,h,b){super(e,i,r,s,a,c,u,h),this.rankedSeasonsLeaderboardsService=b,this.containerLeaderboardConfig={tabs:[{id:ys.CurrentSeries,key:"LEADERBOARDS.RANKED_SEASON_CURRENT_SERIES"},{id:ys.HallOfFame,key:"LEADERBOARDS.RANKED_SEASON_HALL_OF_FRAME"}],selectedTab:ys.CurrentSeries,data:{type:ri.RankedSeasonCurrentSeries,leadersList:[],list:[]}}}ngOnInit(){if(this.leaders=[],this.tabSelect(this.containerLeaderboardConfig.tabs[0].id),this.game)this.contLeaderboard.choosedGame({value:this.game,text:{key:"PLATFORM_IDS.".concat(this.game)}});else{let e=new ie.List([]);Lt.CONFIG.content.games.list.filter(r=>r.type===H5t.Multiplayer).forEach(r=>{e.add({id:r.id,orderPriority:void 0})}),e.forEach(r=>{r.orderPriority=Lt.CONFIG.content.games.grid.find(s=>s.id===r.id).orderPriority});const i=e.orderBy([(r,s)=>r.orderPriority?r.orderPriority[this.translate.currentLang]:0],ie.ESort.Desc).get(0).id;this.contLeaderboard.choosedGame({value:i,text:{key:"PLATFORM_IDS.".concat(i)}})}}onTabSelect(e){var i=this;return f(function*(){i.containerLeaderboardConfig.selectedTab=e,i.init(i.containerLeaderboardConfig.data.game,!1)})()}init(e,i=!0){var r=this;return f(function*(){if(r.containerLeaderboardConfig.data.game!==e||!i){r.contLeaderboard.loaderOn=!0,r.detectChanges();try{r.containerLeaderboardConfig.selectedTab===ys.CurrentSeries?yield r.getCurrentRankedSeason(e):yield r.getRankedSeasonLeaderboardHistory(e)}catch(s){r.catchError(s)}finally{r.contLeaderboard.loaderOn=!1,r.detectChanges()}}})()}catchError(e){console.error(e),this.containerLeaderboardConfig.data.list=[],this.containerLeaderboardConfig.data.leadersList=[],this.leaders=[],this.data.list=[],e instanceof lt.NetworkError&&(this.toaster.error("ERRORS.CONNECTION_ERROR"),this.contLeaderboard.failedLeaderboardFetch()),this.contLeaderboard.loadNextGame()}getCurrentRankedSeason(e){var i=this;return f(function*(){i.page=1,i.containerLeaderboardConfig.data.game=e;const r=yield i.rankedSeasonsLeaderboardsService.getCurrentRankedSeasonLeaderboard({game:e,cache:!0});r.rankings&&(i.data={list:r.rankings},i.leaders=i.data.list.slice(0,3),i.containerLeaderboardConfig.data.rankedSeasonName=r.rankedSeasonName[i.translate.currentLang],i.containerLeaderboardConfig.data.type=ri.RankedSeasonCurrentSeries,i.contLeaderboard.loadNextGame()),i.tabSelect(ys.CurrentSeries)})()}getRankedSeasonLeaderboardHistory(e){var i=this;return f(function*(){i.page=1,i.containerLeaderboardConfig.data.game=e,yield i.rankedSeasonsLeaderboardsService.loadRankedSeasonsLeaderboardHistory({game:e,cache:!0}),i.containerLeaderboardConfig.data.type=ri.RankedSeasonHallOfFame,i.contLeaderboard.loadNextGame(),i.tabSelect(ys.HallOfFame)})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Re),g(ro),g(Dt),g(Ci),g(Zn),g(ls),g(J),g(I7))},t.\u0275cmp=pe({type:t,selectors:[["ranked-season-leaderboard"]],viewQuery:function(e,i){if(1&e&&$e(q5t,5),2&e){let r;je(r=He())&&(i.contLeaderboard=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("ranked-season",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:4,vars:6,consts:[["scroll-directive","",1,"ranked-season__container--list-users",3,"onScrolledToBottom"],["scroll","scroll"],[1,"ranked-season__container-leaderboard--component-wrapper",3,"tabs","selectedTab","data","tabSelected","gameSelected"],["contLeaderboard",""]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"container-leaderboard",2,3),Y("tabSelected",function(s){return i.onTabSelect(s)})("gameSelected",function(s){return i.init(s)}),m()()),2&e&&(l("onScrolledToBottom",ne(4,W5t,i.loadNextPage)),d(2),l("tabs",i.containerLeaderboardConfig.tabs)("selectedTab",i.containerLeaderboardConfig.selectedTab)("data",i.containerLeaderboardConfig.data))},dependencies:[Is,Ag],styles:[".ranked-season__container-leaderboard--component-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.ranked-season__container--list-users[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;order:2;width:100%;display:flex;justify-content:center;height:100%;touch-action:pan-y!important}"]}),n})(),R0e=(()=>{var t;class n{createComponentFactory(e){switch(e){case ri.Matchmaking:return p0e;case ri.Likes:return h0e;case ri.Richest:return m0e;case ri.Gems:return g0e;case ri.EarnedChips:return f0e;case ri.Club:return _0e;case ri.RankedSeasonCurrentSeries:return A0e;default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),k0e=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.currentPage="/",this.includedRouteParams=["gameId"],this.store=r,this.activeRoute=i,this.analyticsTrackingService=s,this.permissions=e,this.googleAnalyticsService=c,this.excludedPageViews=["/auto-login","".concat(a.defaultLoggedRoute,"/leaderboards")]}sendPageView(e){const i=this.permissions.getActionPermission(nt.EPermissionModule.Tracking,nt.EModuleAction.Send);if(this.store.selectUserState()&&!i.isPermitted)return;let r;try{r=this.getAllRouteParams(this.activeRoute.root.snapshot.params,this.activeRoute.root)}catch(a){this.googleAnalyticsService.sendException(a)}let s=wb()(r)?e:this.stripParams(e,r);this.currentPage===s||this.isPageViewExcluded(s)||(this.currentPage=s,this.previousPageView!==s&&-1===this.excludedPageViews.indexOf(s)&&(this.analyticsTrackingService.sendPageView(s),this.previousPageView=s))}getAllRouteParams(e,i,r="primary"){let s=i.children.filter(a=>a.outlet===r);if(s.length){let a=e;return s[0].snapshot&&!wb()(s[0].snapshot.params)&&(a=gqe()({},s[0].snapshot.params,e)),this.getAllRouteParams(a,s[0],r)}return e}isPageViewExcluded(e){return oze()(this.excludedPageViews,e)}stripParams(e,i){let r=Object.keys(i),s=r.length,a=e;for(let c=0;c<s;c++)-1===this.includedRouteParams.indexOf(r[c])&&(a=a.replace("/".concat(i[r[c]]),""));return a}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ti),T(Po),T(J),T(yi),T(tn),T(ng))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();var iy=ve.EIcons;const $5t=["componentReference"],K5t=["topTabs"],Z5t=t=>({name:t});function Q5t(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",10),Y("select",function(i){return oe(o),re(_(2).changeCat(i))}),B(1,"button-icon",11),m()}if(2&t){const o=n.$implicit,e=_(2);l("tabId",o.id),d(),l("bclass","leaderboard__top-tab__button-bclass"+(o.id===e.leaderboardOpened?" leaderboard__top-tabs__selected":""))("buttonModifier",e.EButtonModifier.BUTTON_TRANSPARENT)("icon",ne(4,Z5t,o.icon))}}function Y5t(t,n){if(1&t&&(p(0,"top-tabs",8),U(1,Q5t,2,6,"top-tab-item",9),m()),2&t){const o=_();l("initialOpenedTab",o.leaderboardOpened)("scrollStyleCustomClass","leaderboards__tabs--scroll")("scrollBarCustomClass","leaderboards__tabs--scrollbar"),d(),l("ngForOf",o.tabsArray)("ngForTrackBy",o.trackById)}}const J5t=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),X5t=t=>[t];function eVt(t,n){1&t&&B(0,"empty-content",12),2&t&&l("textArray",ne(2,X5t,pt(1,J5t)))}function tVt(t,n){1&t&&B(0,"loader-image",13),2&t&&l("transparentBG",!0)}function nVt(t,n){}const iVt=t=>({hidden:t});let L0e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){var te=this;this.brazeEngagementService=G,this.rankedSeasonsLeaderboardsService=K,this.asyncComponentState=Jr,this.tabsArray=[],this.EButtonModifier=ve.EButtonModifier,this.handleLeaderboardFetch=function(){var ee=f(function*(le){try{te.fetchLeaderboardPromise&&(te.fetchLeaderboardPromise.cancel(),te.fetchLeaderboardPromise=void 0),te.state=Jr.Pending,te.detectChanges(),te.fetchLeaderboardPromise=new Jn(te.leaderboardFetch(le));const me=yield te.fetchLeaderboardPromise;te.fetchLeaderboardPromise=void 0,te.onLeaderboardFetchSuccess(le,me)}catch(me){me instanceof Cr||(me.rankings&&me.rankings.length?te.onLeaderboardFetchSuccess(le,me):(console.log("errData",me),te.onLeaderboardFetchFail(le))),te.fetchLeaderboardPromise=void 0}});return function(le){return ee.apply(this,arguments)}}(),this.leaderboardFetch=function(){var ee=f(function*(le){if(fa.isGameSpecificLeaderboard(le))return Promise.resolve({});{const me={type:le,periodModifiers:fa.getLeaderboardPeriodModifiers(le),cache:!0};return le!==ri.Club&&(me.userId=te.services.store.selectUserState().profile.id),te.services.leaderboardsService.loadLeaderboard(me)}});return function(le){return ee.apply(this,arguments)}}(),this.onLeaderboardFetchSuccess=(ee,le)=>{if(this.leaderboardList={list:[],lastWeekList:[],myRecord:void 0,myRecordLastWeek:void 0},le){const me=le[va.ThisWeek],ge=le[va.LastWeek];me&&(this.leaderboardList.list=me.leaderboard.rankings,this.leaderboardList.myRecord=me.position),ge&&(this.leaderboardList.lastWeekList=ge.leaderboard.rankings,this.leaderboardList.myRecordLastWeek=null==ge?void 0:ge.position)}this.leaderboardOpened=ee,this.state=Jr.Ready,this.loadLeaderboardComponent(),this.detectChanges()},this.onLeaderboardFetchFail=ee=>{this.state=Jr.Failed,this.fetchLeaderboardRetryablePromise=new T_(()=>this.leaderboardFetch(ee),{retryDelayMs:wP,maxRetriesCount:1/0}),this.fetchLeaderboardRetryablePromise.then(ge=>this.onLeaderboardFetchSuccess(ee,ge)).catch(ge=>{console.warn("[ERROR - onLeaderboardFetchFail]",ge),this.detectChanges()}),this.detectChanges()},this.services={deltaDNAService:h,leaderboardsService:e,soundService:i,changeDetRef:r,navigationService:s,leaderboardsFactory:a,gamesStateService:c,clientConfigService:u,pageViewService:b,store:w},this.state=Jr.None,this.leaderboardsTypes=[{type:ri.Richest,icon:iy.RICHEST_LEADERBOARDS,isEnabled:()=>R.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardRichest).isPermitted},{type:ri.Matchmaking,icon:iy.PRO_LEADERBOARDS,isEnabled:()=>R.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardMatchmaking).isPermitted},{type:ri.RankedSeasonCurrentSeries,icon:iy.RANKED_SEASON_LEADERBOARD,isEnabled:()=>R.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardRankedSeason).isPermitted},{type:ri.Likes,icon:iy.HEART_HOLLOW,isEnabled:()=>R.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardLikes).isPermitted},{type:ri.Gems,icon:iy.ICON_GEMS_FLAT,isEnabled:()=>R.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardGems).isPermitted},{type:ri.EarnedChips,icon:iy.HIGH_EARNER,isEnabled:()=>R.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardEarnedChips).isPermitted},{type:ri.Club,icon:iy.CLUB_PAGE,isEnabled:()=>R.getModulePermission(nt.EPermissionModule.Clubs).isPermitted&&R.getActionPermission(nt.EPermissionModule.Leaderboards,nt.EModuleAction.LeaderboardClubs).isPermitted}].filter(ee=>!ee.isEnabled||ee.isEnabled()),this.leaderboardList={list:[],lastWeekList:[]},this.leaderboardTypeEnum=ri,this.services.changeDetRef.detach()}ngOnInit(){var e=this;return f(function*(){const i=fa.getCategoryByGameSpecificCat(e.leaderboardsTypes[0].type);e.services.pageViewService.sendPageView("".concat(e.services.navigationService.getOutletUrl(),"/").concat(i)),e.services.deltaDNAService.leaderboardsOpenedEngage(),e.brazeEngagementService.leaderboardsOpenedEngage(),e.services.gamesStateService.getCurrentGameState()&&(e.openedGame=e.services.gamesStateService.getCurrentGameState().id),e.setTabs();const r=history.state.type;let s=Math.max(e.leaderboardsTypes.findIndex(a=>a.type===r),0);e.leaderboardOpened=e.leaderboardsTypes[s].type,yield e.handleLeaderboardFetch(e.leaderboardOpened),e.detectChanges()})()}loadLeaderboardComponent(){if(this.elementRef){this.elementRef.clear();const e=this.services.leaderboardsFactory.createComponentFactory(this.leaderboardOpened);this.compRef=this.elementRef.createComponent(e),this.compRef.instance.data=this.leaderboardList,this.compRef.instance.leaderboardType=this.leaderboardOpened,this.compRef.instance.game=this.openedGame}}ngOnDestroy(){this.services.leaderboardsService.clearCache(),this.rankedSeasonsLeaderboardsService.resetRankedSeasonsLeaderboardsState(),this.fetchLeaderboardPromise&&this.fetchLeaderboardPromise.cancel(),this.fetchLeaderboardRetryablePromise&&this.fetchLeaderboardRetryablePromise.cancel(),this.compRef&&(this.compRef.destroy(),this.compRef=void 0),this.elementRef&&this.elementRef.clear()}changeCat(e){var i=this;return f(function*(){i.services.soundService.play(dn.ClickTab),i.leaderboardOpened=e;try{yield i.loadCategory(e)}catch(s){console.error(s),i.leaderboardList.list=[]}const r=fa.getCategoryByGameSpecificCat(e);i.services.pageViewService.sendPageView("".concat(i.services.navigationService.getOutletUrl(),"/").concat(r)),i.detectChanges()})()}handleGesture(e){let i=0;switch(this.tabsArray.find((r,s)=>(r.id===this.leaderboardOpened&&(i=s),r.id===this.leaderboardOpened)),e){case sa.Right:if(0===i){this.changeCat(this.tabsArray[this.tabsArray.length-1].id);break}this.changeCat(this.tabsArray[i-1].id);break;case sa.Left:if(i===this.tabsArray.length-1){this.changeCat(this.tabsArray[0].id);break}this.changeCat(this.tabsArray[i+1].id)}}trackById(e,i){return i.id}setTabs(){this.tabsArray=this.leaderboardsTypes.filter(e=>!e.isEnabled||e.isEnabled()).map(e=>({id:e.type,icon:e.icon,key:"LEADERBOARDS.".concat(e.type.toUpperCase())})),this.tabsArray=N0()(this.tabsArray,["gameSpecific"]),this.detectChanges()}loadCategory(e){var i=this;return f(function*(){return i.handleLeaderboardFetch(e)})()}detectChanges(){this.services.changeDetRef.destroyed||this.services.changeDetRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Mo),g(Re),g(Yt),g(R0e),g(Zn),g(Zt),g(sl),g(k0e),g(J),g(Ti),g(cl),g(I7))},t.\u0275cmp=pe({type:t,selectors:[["leaderboards"]],viewQuery:function(e,i){if(1&e&&($e($5t,5,bs),$e(K5t,5,$t)),2&e){let r;je(r=He())&&(i.elementRef=r.first),je(r=He())&&(i.topTabs=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("leaderboard",o),deps:[[new jo,new zo,nn]]}])],decls:9,vars:7,consts:[[1,"leaderboards__wrapper"],[1,"leaderboards__container--main"],[3,"initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass",4,"ngIf"],[3,"textArray",4,"ngIf"],["swipe-directive","",1,"leaderboard__container",3,"ngClass","swipeAction"],[3,"transparentBG",4,"ngIf"],[1,"leaderboard__container--inner",3,"hidden"],["componentReference",""],[3,"initialOpenedTab","scrollStyleCustomClass","scrollBarCustomClass"],["class","button-container",3,"tabId","select",4,"ngFor","ngForOf","ngForTrackBy"],[1,"button-container",3,"tabId","select"],[1,"leaderboard__top-tab__button",3,"bclass","buttonModifier","icon"],[3,"textArray"],[3,"transparentBG"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),U(2,Y5t,2,5,"top-tabs",2)(3,eVt,1,4,"empty-content",3),p(4,"div",4),Y("swipeAction",function(s){return i.handleGesture(s)}),U(5,tVt,1,1,"loader-image",5),p(6,"div",6),U(7,nVt,0,0,"ng-template",null,7,ft),m()()()()),2&e&&(d(2),l("ngIf",i.tabsArray),d(),l("ngIf",i.state===i.asyncComponentState.Failed),d(),l("ngClass",ne(5,iVt,i.state===i.asyncComponentState.Failed)),d(),l("ngIf",i.state===i.asyncComponentState.Pending),d(),l("hidden",i.state!==i.asyncComponentState.Ready))},dependencies:[Xe,Mt,Ne,wu,bo,kl,dl,ei,Oi],styles:[".leaderboards__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap}.leaderboard__container[_ngcontent-%COMP%]{height:100%;width:100%;overflow-y:auto;overflow-x:none}.leaderboard__container--inner[_ngcontent-%COMP%]{width:100%;height:100%}"]}),n})();var rVt=nt.EPermissionModule,sVt=nt.EModuleAction;let D0e=(()=>{var t;class n{constructor(e,i,r){this.permissionsService=e,this.navigation=i,this.constants=r}canActivate(){return!!this.permissionsService.getActionPermission(rVt.Leaderboards,sVt.Open).isPermitted||!!this.navigation.isFirstNavigation(this.navigation.getCurrentNavigation().previousNavigation)&&this.navigation.parseUrl(this.constants.defaultLoggedRoute)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Pi),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const B0e=[{path:"leaderboards",component:L0e,canActivate:[D0e]}],aVt=[D0e,R0e],cVt=[xi,Yi,Io,No,Ls];let lVt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...aVt],imports:[cVt]}),n})();var uVt=et.Code,dVt=ve.EButtonModifier,pVt=ve.EIcons;const hVt=()=>({key:"EDIT_PROFILE.CHANGE_PASSWORD"});let N0e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.EIcons=pVt,this.popupTitleTypes=li,this.buttonModifier=dVt,this.onValueChanges=()=>{this.isFormSubmitted&&this.setErrorsInFormGroup()},this.toaster=r,this.formBuilder=i,this.translatePipe=s,this.editProfileService=a,this.fieldValidatorFactory=e,this.store=u,this.loader=c,this.close=new ke,this.popupState="active",this.isFormSubmitted=!1,this.popupContainerOptions={styleProperties:{maxWidth:"45rem",height:"auto"},customComponentCssClass:"ep__container"}}ngOnInit(){this.changePasswordForm=this.formBuilder.group({current:["",Ln.compose([Ln.required,...this.fieldValidatorFactory.createPasswordValidator().validators])],new:["",Ln.compose([Ln.required,...this.fieldValidatorFactory.createPasswordValidator().validators])],confirm:["",Ln.compose([Ln.required,...this.fieldValidatorFactory.createPasswordValidator().validators])]},{validator:gc.getSameFieldsValidatorConfig(["new","confirm"])}),this.formError={current:"",new:"",confirm:""},this.messages={current:{required:{messageKey:"EDIT_PROFILE.REQUIRED_FIELD",params:[]},minlength:{messageKey:"EDIT_PROFILE.PASSWORD_EXPLANATION",params:[this.fieldValidatorFactory.createPasswordValidator().minLength,this.fieldValidatorFactory.createPasswordValidator().maxLength]},maxlength:{messageKey:"EDIT_PROFILE.PASSWORD_EXPLANATION",params:[this.fieldValidatorFactory.createPasswordValidator().minLength,this.fieldValidatorFactory.createPasswordValidator().maxLength]}},new:{required:{messageKey:"EDIT_PROFILE.REQUIRED_FIELD",params:[]},dontmatch:{messageKey:"API_ERRORS.PasswordDontMatch",params:[]},minlength:{messageKey:"EDIT_PROFILE.PASSWORD_EXPLANATION",params:[this.fieldValidatorFactory.createPasswordValidator().minLength,this.fieldValidatorFactory.createPasswordValidator().maxLength]},maxlength:{messageKey:"EDIT_PROFILE.PASSWORD_EXPLANATION",params:[this.fieldValidatorFactory.createPasswordValidator().minLength,this.fieldValidatorFactory.createPasswordValidator().maxLength]}},confirm:{required:{messageKey:"EDIT_PROFILE.REQUIRED_FIELD",params:[]},dontmatch:{messageKey:"API_ERRORS.PasswordDontMatch",params:[]},minlength:{messageKey:"EDIT_PROFILE.PASSWORD_EXPLANATION",params:[this.fieldValidatorFactory.createPasswordValidator().minLength,this.fieldValidatorFactory.createPasswordValidator().maxLength]},maxlength:{messageKey:"EDIT_PROFILE.PASSWORD_EXPLANATION",params:[this.fieldValidatorFactory.createPasswordValidator().minLength,this.fieldValidatorFactory.createPasswordValidator().maxLength]}}},this.valueChangesSubscription=this.changePasswordForm.valueChanges.subscribe(zse()(this.onValueChanges,300))}ngOnDestroy(){this.valueChangesSubscription&&this.valueChangesSubscription.unsubscribe()}updateProfile(){var e=this;return f(function*(){if(e.isFormSubmitted=!0,e.checkFormIsValid())try{const s={password:e.formToObject(e.changePasswordForm)};e.loader.on(),e.changePasswordForm.markAsPristine(),yield e.editProfileService.editProfile(s).then(()=>{e.toaster.success("EDIT_PROFILE.PASSWORD_CHANGE_SUCCESS"),e.closePopup()}).catch(a=>{const c=a.error;c.code===uVt.NotValid&&"password"===c.property&&e.toaster.error("API_ERRORS.NotValid.Password")}),e.resetForm()}catch(i){console.error("Edit profile gg error",i)}finally{e.loader.off()}})()}closePopup(){this.close.emit(!1),this.popupState="inactive"}checkFormIsValid(){const e=this.changePasswordForm.valid;return e||this.setErrorsInFormGroup(),e}resetForm(e=this.changePasswordForm){e.markAsPristine();for(let i in e.controls)i&&e.controls[i].setValue("");this.clearErrorFields(),this.isFormSubmitted=!1}clearErrorFields(){for(let e in this.changePasswordForm.controls)e&&(this.formError[e]="")}setErrorsInFormGroup(e=this.changePasswordForm){for(let i in e.controls)i&&(e.controls[i].errors?this.setErrorText(e,i):this.formError[i]="")}setErrorText(e,i){for(let r in e.controls[i].errors)if(r&&e.controls[i].errors[r]){const s=this.translatePipe.transform(this.messages[i][r].messageKey,this.messages[i][r].params);this.formError[i]=s}}formToObject(e=this.changePasswordForm){let i={};for(let r in e.controls)r&&e.controls[r].dirty&&df()(i,{[r]:e.controls[r].value});return i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(wa),g(td),g(Dt),g(qe),g(G2),g(ro),g(J))},t.\u0275cmp=pe({type:t,selectors:[["edit-password"]],outputs:{close:"close"},decls:21,vars:32,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"ep__container--content"],["popupContainer",""],["novalidate","",1,"ep__form",3,"formGroup","submit"],["type","password",2,"display","none"],[1,"ep__container--inputs"],[1,"ep__container--input-wrapper"],["formControlName","current",1,"ep__container--input",3,"fieldId","type","icon","placeholder","errorMessage"],["formControlName","new",1,"ep__container--input",3,"fieldId","type","icon","placeholder","errorMessage"],["formControlName","confirm",1,"ep__container--input",3,"fieldId","type","icon","placeholder","errorMessage"],[1,"ep__container--buttons"],[1,"ep__button--container"],["data-cy","editProfilesavePasswordButton",3,"buttonModifier","type"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closePopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closePopup()}),m(),p(2,"div",2,3)(4,"form",4),Y("submit",function(){return i.updateProfile()}),B(5,"input",5),p(6,"div",6)(7,"div",7),B(8,"user-input",8),V(9,"translate"),m(),p(10,"div",7),B(11,"user-input",9),V(12,"translate"),m(),p(13,"div",7),B(14,"user-input",10),V(15,"translate"),m()(),p(16,"div",11)(17,"div",12)(18,"button-text",13),H(19),V(20,"translate"),m()()()()()()),2&e&&(l("popupContainerOpened","active"===i.popupState)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Static)("text",pt(31,hVt)),d(3),l("formGroup",i.changePasswordForm),d(4),l("fieldId","editProfileCurrentPassword")("type","password")("icon",i.EIcons.LOCKER)("placeholder",$(9,23,"EDIT_PROFILE.CURRENT_PASS"))("errorMessage",i.formError.current),d(3),l("fieldId","editProfileNewPassword")("type","password")("icon",i.EIcons.LOCKER)("placeholder",$(12,25,"EDIT_PROFILE.NEW_PASS"))("errorMessage",i.formError.new),d(3),l("fieldId","editProfileConfirmPassword")("type","password")("icon",i.EIcons.LOCKER)("placeholder",$(15,27,"EDIT_PROFILE.REPEAT_PASS"))("errorMessage",i.formError.confirm),d(4),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("type","submit"),d(),ze(" ",$(20,29,"EDIT_PROFILE.SAVE_CHANGES")," "))},dependencies:[pn,Ji,Wi,il,Su,Ql,yu,wl,Yl,qe],styles:[".ep__container--content[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;padding:2rem;height:calc(100% - 9rem)!important;max-height:75vh}@media only screen and (max-width: 768px){.ep__container--content[_ngcontent-%COMP%]{height:calc(100% - 5rem)!important}}.ep-input-container[_ngcontent-%COMP%]{padding:.5rem}.ep__container--buttons[_ngcontent-%COMP%]{width:100%;padding:1rem 0}.ep__container--input-wrapper[_ngcontent-%COMP%]{min-height:7.5rem}@media only screen and (max-width: 768px){.ep__container--input-wrapper[_ngcontent-%COMP%]{min-height:6.5rem}}"]}),n})();var F0e=et.Code,mVt=U2.PhotosLimitReachedError,fVt=ve.EButtonModifier,gVt=ve.EIcons;function _Vt(t,n){if(1&t&&B(0,"navigation-bar",5),2&t){const o=_();l("backLink","history")("content",o.navBarContent)}}function vVt(t,n){1&t&&B(0,"loader-image",6),2&t&&l("transparentBG",!0)}const bVt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),U0e=t=>[t];function CVt(t,n){1&t&&B(0,"empty-content",7),2&t&&l("textArray",ne(2,U0e,pt(1,bVt)))}function yVt(t,n){if(1&t){const o=Ce();p(0,"edit-password",8),Y("close",function(){oe(o);const i=_();return re(i.passwordChange=!i.passwordChange)}),m()}}function SVt(t,n){if(1&t){const o=Ce();p(0,"button-text",48),Y("onClick",function(){return oe(o),re(_(2).buyNameChange())}),H(1),V(2,"translate"),m()}2&t&&(l("buttonModifier",_(2).buttonModifier.BUTTON_ACTION),d(),ze(" ",$(2,2,"EDIT_PROFILE.BUY_NAME_CHANGE")," "))}function wVt(t,n){if(1&t&&(p(0,"div",50),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),ze(" ",$(2,1,o.selectedGender.text)," ")}}function TVt(t,n){if(1&t&&(p(0,"div",50),H(1),V(2,"translate"),m()),2&t){const o=_(3);d(),ze(" ",$(2,1,o.selectGender.placeholder)," ")}}function PVt(t,n){if(1&t&&U(0,wVt,3,3,"div",49)(1,TVt,3,3,"div",49),2&t){const o=_(2);l("ngIf",o.selectedGender),d(),l("ngIf",!o.selectedGender)}}function IVt(t,n){if(1&t){const o=Ce();p(0,"custom-select-item",52),Y("select",function(i){return oe(o),re(_(3).genderChange(i))}),p(1,"div",53)(2,"p"),H(3),V(4,"translate"),m()()()}if(2&t){const o=n.$implicit,e=_(3);l("value",o),d(),l("ngClass",e.selectedGender&&o.value===e.selectedGender.value?"edit-profile__custom-select__option__selected":""),d(2),se($(4,3,o.text.key))}}function MVt(t,n){if(1&t&&U(0,IVt,5,5,"custom-select-item",51),2&t){const o=_(2);l("ngForOf",o.genderSelectOptions)("ngForTrackBy",o.trackByFn)}}function OVt(t,n){if(1&t&&(p(0,"div",54),B(1,"user-input",55),V(2,"translate"),p(3,"p",56),H(4),V(5,"translate"),m()()),2&t){const o=_(2);d(),l("icon",o.EIcons.PHONE_CALL)("errorMessage",o.formError.phone)("placeholder",$(2,4,"EDIT_PROFILE.PHONE")),d(3),ze(" ",$(5,6,"EDIT_PROFILE.PHONE_HINT")," ")}}function EVt(t,n){if(1&t){const o=Ce();p(0,"div",44)(1,"button-text",57),Y("onClick",function(i){return oe(o),re(_(2).changePass(i))}),H(2),V(3,"translate"),m()()}if(2&t){const o=_(2);d(),l("buttonModifier",o.buttonModifier.BUTTON_ACTION),d(),ze(" ",$(3,2,"EDIT_PROFILE.CHANGE_PASSWORD")," ")}}const xVt=()=>["image/*"],AVt=t=>({accept:t}),RVt=()=>({formControlName:"avatar"}),kVt=()=>({maxlength:100}),LVt=()=>({maxlength:2,autocomplete:"off",type:"tel"}),G0e=()=>({autocomplete:"off"});function DVt(t,n){if(1&t){const o=Ce();p(0,"section",9)(1,"div",10)(2,"form",11),Y("submit",function(){return oe(o),re(_().updateProfile())}),p(3,"div",12)(4,"div",13)(5,"div",14)(6,"div",15),B(7,"avatar",16),m(),p(8,"div",17)(9,"button-text",18),H(10),V(11,"translate"),m()(),p(12,"input-file",19),Y("select",function(i){return oe(o),re(_().imageUploadPreview(i))}),V(13,"translate"),m()()(),p(14,"div",20)(15,"div",21),B(16,"user-input",22),V(17,"translate"),p(18,"p",23),H(19),V(20,"translate"),m(),p(21,"div",24),U(22,SVt,3,4,"button-text",25),m()(),p(23,"div",26),B(24,"user-input",27),V(25,"translate"),m()(),p(26,"div",28)(27,"div",29)(28,"div",30)(29,"custom-select",31),U(30,PVt,2,2,"ng-template",null,32,ft)(32,MVt,1,2,"ng-template",null,33,ft),m(),B(34,"div",34),m(),p(35,"div",35),B(36,"user-input",36),V(37,"translate"),m()(),U(38,OVt,6,8,"div",37),p(39,"div",38),B(40,"user-input",39),V(41,"translate"),m(),p(42,"div",40),B(43,"user-input",41),V(44,"translate"),m()()(),p(45,"div",42)(46,"div",43)(47,"div",44)(48,"button-text",45),H(49),V(50,"translate"),m()(),U(51,EVt,4,4,"div",46),p(52,"div",44)(53,"button-text",47),Y("onClick",function(){return oe(o),re(_().cancel())}),H(54),V(55,"translate"),m()()()()()()()}if(2&t){const o=_();d(2),l("formGroup",o.editProfileForm),d(5),l("user",o.userProps.profile)("avatarImage",o.avatarPreviewImage)("frameAnimation",o.frameAnimation)("isLink",!1)("hasUsername",!1)("hasLevel",!1),d(2),l("buttonModifier",o.buttonModifier.BUTTON_ACTION),d(),ze("",$(11,49,"EDIT_PROFILE.CHANGE_AVATAR")," "),d(2),l("config",ne(71,AVt,pt(70,xVt)))("nativeAttributes",pt(73,RVt))("title",$(13,51,"EDIT_PROFILE.ADD_PHOTO")),d(4),l("fieldId","editProfileUsername")("icon",o.EIcons.USER)("errorMessage",o.formError.username)("placeholder",$(17,53,"EDIT_PROFILE.USERNAME")),d(2),l("hidden",0===o.remainingUsernameChanges),d(),ze(" ",yt(20,55,"EDIT_PROFILE.REMAINING_NAME_CHANGES",ne(74,U0e,o.remainingUsernameChanges))," "),d(2),l("hidden",o.remainingUsernameChanges>0),d(),l("ngIf",o.showNameChangeButton),d(2),l("fieldId","editProfileStatus")("type","textarea")("nativeAttr",pt(76,kVt))("errorMessage",o.formError.status)("placeholder",$(25,58,"EDIT_PROFILE.STATUS")),d(5),l("buttonCustomCss","edit-profile__custom-select__extend--button"),d(7),l("fieldId","editProfileAge")("type","tel")("nativeAttr",pt(77,LVt))("errorMessage",o.formError.age)("placeholder",$(37,60,"EDIT_PROFILE.AGE")),d(2),l("ngIf",o.phoneFieldEnabled),d(2),l("fieldId","editProfileCountry")("nativeAttr",pt(78,G0e))("icon",o.EIcons.COUNTRY)("errorMessage",o.formError.country)("placeholder",$(41,62,"EDIT_PROFILE.COUNTRY")),d(3),l("fieldId","editProfileCity")("nativeAttr",pt(79,G0e))("icon",o.EIcons.CITY)("errorMessage",o.formError.city)("placeholder",$(44,64,"EDIT_PROFILE.CITY")),d(5),l("buttonModifier",o.buttonModifier.BUTTON_FRIENDS)("disabled",!o.editProfileForm.dirty||o.isSaveButtonDisabled)("type","submit"),d(),ze("",$(50,66,"EDIT_PROFILE.SAVE_CHANGES")," "),d(2),l("ngIf",o.isPasswordChangeAvailable),d(2),l("buttonModifier",o.buttonModifier.BUTTON_NEGATIVE),d(),ze("",$(55,68,"EDIT_PROFILE.CANCEL")," ")}}let V0e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le){var me=this;this.isNavigationVisible=!0,this.EIcons=gVt,this.buttonModifier=fVt,this.asyncComponentState=Jr,this.phoneFieldEnabled=!1,this.navBarContent={type:Ru.EContent.Text,data:{key:"LABEL.EDIT_PROFILE"}},this.selectGender={type:rd.EControlType.Input,placeholder:{key:"EDIT_PROFILE.GENDER"}},this.frameAnimation=v0,this.showNameChangeButton=!1,this.fetchUser=()=>this.userService.getProfile(),this.handleUserFetch=f(function*(){try{me.state=Jr.Pending,me.fetchEditProfilePromise=new Jn(me.fetchUser());const ge=yield me.fetchEditProfilePromise;me.onEditProfileFetchSuccess(ge)}catch(ge){console.error(ge),ge instanceof Cr||me.onProfileFetchError()}}),this.onEditProfileFetchSuccess=ge=>{this.state=Jr.Ready,this.userProps=ge,this.nameChangeCountSubscription=this.store.subscribeUserProfile().pipe(ws()).subscribe(this.setUsernameChangesRemaining),this.changePasswordManager(),this.editProfileForm=this.formBuilder.group({username:["",Ln.compose([Ln.required])],status:[""],sex:[""],phone:["",Ln.compose([...this.fieldValidatorFactory.createPhoneValidator().validators])],avatar:[""],age:["",Ln.compose([...this.fieldValidatorFactory.createAgeValidator().validators])],city:["",Ln.compose([...this.fieldValidatorFactory.createCityValidator().validators])],country:["",Ln.compose([...this.fieldValidatorFactory.createCountryValidator().validators])]}),this.avatarImg="".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.avatars).concat(this.userProps.profile.avatar,"?").concat(Date.now()),this.editProfileForm.controls.username.setValue(this.userProps.profile.username.currentUsername),this.editProfileForm.controls.status.setValue(this.userProps.profile.status),this.editProfileForm.controls.sex.setValue(this.userProps.profile.sex),this.selectedGender=this.genderSelectOptions.find(Me=>Me.value===this.userProps.profile.sex),this.editProfileForm.controls.age.setValue(this.userProps.profile.age>0?this.userProps.profile.age:""),this.editProfileForm.controls.phone.setValue(this.userProps.profile.phone),this.editProfileForm.controls.city.setValue(this.userProps.profile.location.city),this.editProfileForm.controls.country.setValue(this.userProps.profile.location.country),this.loader.off(),this.formError={username:"",status:"",sex:"",avatar:"",age:"",phone:"",city:"",country:"",snapchat:"",whatsapp:"",instagram:""},this.messages={username:{required:{messageKey:"EDIT_PROFILE.REQUIRED_FIELD",params:[]},pattern:{messageKey:"API_ERRORS.InvalidUsername",params:[this.fieldValidatorFactory.createUsernameValidator().minLength,this.fieldValidatorFactory.createUsernameValidator().maxLength]},minlength:{messageKey:"API_ERRORS.InvalidUsername",params:[this.fieldValidatorFactory.createUsernameValidator().minLength,this.fieldValidatorFactory.createUsernameValidator().maxLength]},maxlength:{messageKey:"API_ERRORS.InvalidUsername",params:[this.fieldValidatorFactory.createUsernameValidator().minLength,this.fieldValidatorFactory.createUsernameValidator().maxLength]},profanity:{messageKey:"TEXT.FORBIDDEN_WORD",params:[]}},status:{minlength:{messageKey:"EDIT_PROFILE.STATUS_TEXT_EXPLANATION",params:[this.fieldValidatorFactory.createProfileStatusValidator().minLength,this.fieldValidatorFactory.createProfileStatusValidator().maxLength]},maxlength:{messageKey:"EDIT_PROFILE.STATUS_TEXT_EXPLANATION",params:[this.fieldValidatorFactory.createProfileStatusValidator().minLength,this.fieldValidatorFactory.createProfileStatusValidator().maxLength]},pattern:{messageKey:"EDIT_PROFILE.STATUS_TEXT_EXPLANATION",params:[this.fieldValidatorFactory.createProfileStatusValidator().minLength,this.fieldValidatorFactory.createProfileStatusValidator().maxLength]},profanity:{messageKey:"TEXT.FORBIDDEN_WORD",params:[]}},age:{min:{messageKey:"EDIT_PROFILE.AGE_NOT_IN_BOUNDS",params:[Lt.CONFIG.platform.name,this.fieldValidatorFactory.createAgeValidator().minLength]},max:{messageKey:"EDIT_PROFILE.INCORRECT_AGE",params:[Lt.CONFIG.platform.name,this.fieldValidatorFactory.createAgeValidator().minLength]},pattern:{messageKey:"EDIT_PROFILE.INCORRECT_AGE",params:[this.fieldValidatorFactory.createAgeValidator().pattern]}},phone:{pattern:{messageKey:"EDIT_PROFILE.VALID_NUMBER",params:[this.fieldValidatorFactory.createPhoneValidator().pattern]},minlength:{messageKey:"EDIT_PROFILE.SOCIAL_LENGTH_ERROR",params:[this.fieldValidatorFactory.createPhoneValidator().minLength,this.fieldValidatorFactory.createPhoneValidator().maxLength]},maxlength:{messageKey:"EDIT_PROFILE.SOCIAL_LENGTH_ERROR",params:[this.fieldValidatorFactory.createPhoneValidator().minLength,this.fieldValidatorFactory.createPhoneValidator().maxLength]}},city:{minlength:{messageKey:"EDIT_PROFILE.CITY_EXPLANATION",params:[this.fieldValidatorFactory.createCityValidator().minLength,this.fieldValidatorFactory.createCityValidator().maxLength]},maxlength:{messageKey:"EDIT_PROFILE.CITY_EXPLANATION",params:[this.fieldValidatorFactory.createCityValidator().minLength,this.fieldValidatorFactory.createCityValidator().maxLength]},pattern:{messageKey:"EDIT_PROFILE.INCORRECT_CITY",params:[this.fieldValidatorFactory.createCityValidator().pattern]}},country:{minlength:{messageKey:"EDIT_PROFILE.COUNTRY_EXPLANATION",params:[this.fieldValidatorFactory.createCountryValidator().minLength,this.fieldValidatorFactory.createCountryValidator().maxLength]},maxlength:{messageKey:"EDIT_PROFILE.COUNTRY_EXPLANATION",params:[this.fieldValidatorFactory.createCountryValidator().minLength,this.fieldValidatorFactory.createCountryValidator().maxLength]},pattern:{messageKey:"EDIT_PROFILE.INCORRECT_COUNTRY",params:[this.fieldValidatorFactory.createCityValidator().pattern]}}},this.editProfileService.storeEditProfileForm(this.editProfileForm),requestAnimationFrame(()=>{this.editProfileForm.controls.username.addValidators(this.fieldValidatorFactory.createUsernameValidator().validators),this.editProfileForm.controls.status.addValidators(this.fieldValidatorFactory.createProfileStatusValidator().validators)})},this.onProfileFetchError=()=>{this.state=Jr.Failed,this.fetchEditProfileRetryablePromise=new T_(this.fetchUser,{retryDelayMs:wP,maxRetriesCount:1/0}),this.fetchEditProfileRetryablePromise.then(Me=>{this.onEditProfileFetchSuccess(Me)}).catch(Me=>{console.log(Me)})},this.setUsernameChangesRemaining=ge=>{this.remainingUsernameChanges=ge.remainingUsernameChanges},this.config=le,this.shopIap=K,this.shopCustomization=te,this.shopMoreService=R,this.phoneFieldEnabled=w.getConfig().core.feedback.userPhoneFieldEnabled,this.isSaveButtonDisabled=!1,this.navigation=i,this.loader=s,this.toaster=u,this.userService=e,this.editProfileService=r,this.userProps=null,this.passwordChange=!1,this.formBuilder=c,this.fieldValidatorFactory=a,this.translatePipe=h,this.avatarPreviewImage="",this.isPasswordChangeAvailable=!1,this.changedControlData={},this.activatedComponentRoute=b,this.store=G,this.constants=ee}getConnectedComponentUrl(){return"profile"}ngOnInit(){var e=this;return f(function*(){e.genderSelectOptions=[],e.fieldValidatorFactory.createGenderValidator().options.forEach(i=>e.genderSelectOptions.push({value:i,text:{key:"TEXT.".concat(i.toUpperCase())}}));try{const i=yield e.shopIap.load(),r=yield e.shopCustomization.load();e.showNameChangeButton=void 0!==i.products.find(s=>s.item.type===Fe.TG.NameChanger)||void 0!==r.products.find(s=>s.item.type===Fe.TG.NameChanger)}catch(i){console.error(i)}e.handleUserFetch()})()}ngOnDestroy(){this.fetchEditProfilePromise&&this.fetchEditProfilePromise.cancel(),this.fetchEditProfileRetryablePromise&&this.fetchEditProfileRetryablePromise.cancel(),this.nameChangeCountSubscription&&this.nameChangeCountSubscription.unsubscribe()}updateProfile(){var e=this;return f(function*(){if(e.resetFormErrors(),e.editProfileForm.controls.status.value&&e.editProfileForm.controls.status.setValue(e.editProfileForm.controls.status.value.replace(/\r?\n|\r/g," ")),!gc.areControlsValid(e.getDirtyFormFields(e.editProfileForm)))return e.setErrorsInFormGroup(),void e.loader.off();e.lockRequests();try{let i=e.formToObject(e.editProfileForm),r={...i};e.imageChangeFlag&&(yield e.editProfileService.editProfileAvatar(e.avatarImg).then(s=>{r.avatar=e.avatarImg,e.toaster.success("EDIT_PROFILE.EDIT_SUCCES_MSG"),e.editProfileForm.markAsPristine()}).catch(s=>{e.toaster.error(s instanceof mVt?"GALLERY.PHOTOS_LIMIT_REACHED":"EDIT_PROFILE.INVALID_IMAGE")})),wb()(i)||(yield e.editProfileService.editProfile(i).then(()=>{e.unlockRequests()}),e.toaster.success("EDIT_PROFILE.EDIT_SUCCES_MSG")),e.editProfileForm.markAsPristine(),e.editProfileForm.markAsUntouched(),e.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(e.constants.defaultLoggedRoute,"/profile/").concat(e.userProps.profile.id)}}])}catch(i){const r=i.error;if(r&&r.code)switch(r.code){case F0e.NotValid:e.toaster.error("API_ERRORS.NotValid.Username");break;case F0e.LimitReached:e.toaster.error("API_ERRORS.LimitReached.Username")}else console.error("Update profile error:",i)}finally{e.unlockRequests()}})()}changePass(e){e.stopPropagation(),this.passwordChange=!this.passwordChange}cancel(){this.editProfileForm.markAsPristine(),history.back()}cityAndCountryValidation(e){return!/\d/g.test(e.key)&&e.key}buyNameChange(){this.shopMoreService.buyUtilityItem(Fe.TG.NameChanger)}genderChange(e){this.selectedGender=e,this.editProfileForm.markAsDirty(),this.setFieldValue(this.editProfileForm,"sex",e.value),this.editProfileForm.controls.sex.markAsTouched()}imageUploadPreview(e){var i=this;return f(function*(){if(e.file)if(i.imageChangeFlag=!0,lf.isOfAllowedMimeType(e.file,"avatar")&&lf.isSizeInBounds(e.file,"avatar")){i.editProfileForm.markAsDirty();const r=yield GM.processByImageConfig(e.file,i.config.platform.baseImgConfig);i.avatarImg=yield r.toBase64(),i.avatarPreviewImage=i.avatarImg}else i.toaster.error("GALLERY.IMAGE_UPLOAD_ERROR",[ZC.bytesFormat(lf.getMaxSizeInBytes("avatar"))])})()}setFieldValue(e,i,r){e.controls[i].setValue(r),e.controls[i].markAsDirty()}setErrorsInFormGroup(e=this.editProfileForm){for(let i in e.controls)i&&(e.controls[i].touched||!e.controls[i].pristine)&&(e.controls[i].errors?this.setErrorText(e,i):this.formError[i]="")}setErrorText(e,i){for(let r in e.controls[i].errors)if(r&&e.controls[i].errors[r]&&this.messages[i][r]){const s=this.translatePipe.transform(this.messages[i][r].messageKey,this.messages[i][r].params);this.formError[i]=s}}resetFormErrors(){for(let e in this.formError)e&&(this.formError[e]="")}formToObject(e=this.editProfileForm){let i={};const r=this.userProps.profile.username.currentUsername!==e.controls.username.value;r||e.controls.username.markAsUntouched();for(let s in e.controls)s&&(e.controls[s].touched||!e.controls[s].pristine)&&(i=this.assignValueToFormControl(e,s,r));return i}getDirtyFormFields(e=this.editProfileForm){let i={};this.userProps.profile.username.currentUsername!==e.controls.username.value||e.controls.username.markAsUntouched();for(let s in e.controls)s&&(e.controls[s].touched||!e.controls[s].pristine)&&(i[s]=e.controls[s]);return i}trackByFn(e,i){return e}assignValueToFormControl(e,i,r){return e.controls[i]===e.controls.age?""===e.controls[i].value?df()(this.changedControlData,{[i]:0}):df()(this.changedControlData,{[i]:parseFloat(e.controls[i].value)}):e.controls[i]!==e.controls.username?df()(this.changedControlData,{[i]:e.controls[i].value}):r&&df()(this.changedControlData,{[i]:e.controls[i].value}),this.changedControlData}changePasswordManager(){var e=this;return f(function*(){const i=[Gt.Email,Gt.PhoneNumber];let r=e.store.selectUserState();try{r||(r=yield e.userService.getState()),e.userAuthentications=r.authentications,Ktt()(e.userAuthentications,i).length>0&&(e.isPasswordChangeAvailable=!0)}catch(s){console.warn(s)}})()}lockRequests(){this.isSaveButtonDisabled=!0,this.loader.on()}unlockRequests(){this.isSaveButtonDisabled=!1,this.loader.off()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Kr),g(Yt),g(G2),g(ro),g(wa),g(td),g(Dt),g(qe),g(Pr),g(Zt),g(I2),g(J),g(Gh),g(Z0),g(tn),g(Dr))},t.\u0275cmp=pe({type:t,selectors:[["edit-profile"]],features:[mn([ia])],decls:5,vars:5,consts:[[3,"backLink","content",4,"ngIf"],[3,"transparentBG",4,"ngIf"],[3,"textArray",4,"ngIf"],[3,"close",4,"ngIf"],["class","edit-profile__wrapper",4,"ngIf"],[3,"backLink","content"],[3,"transparentBG"],[3,"textArray"],[3,"close"],[1,"edit-profile__wrapper"],[1,"edit-profile__container"],["novalidate","",1,"edit-profile__form",3,"formGroup","submit"],[1,"edit-profile__container--inputs"],[1,"edit-profile__container--main-group","avatar"],[1,"edit-profile__container--avatar"],[1,"edit-profile__container--avatar-img"],[3,"user","avatarImage","frameAnimation","isLink","hasUsername","hasLevel"],[1,"edit-profile__container--avatar--button"],["data-cy","editProfileChangeAvatar",3,"buttonModifier"],[1,"edit-profile__input--avatar",3,"config","nativeAttributes","title","select"],[1,"edit-profile__container--main-group","status"],[1,"edit-profile__container--input","username"],["formControlName","username",1,"edit-profile__input",3,"fieldId","icon","errorMessage","placeholder"],[1,"edit-profile__text--hint",3,"hidden"],[1,"edit-profile__container--name-change",3,"hidden"],["data-cy","editProfileBuyNameChange",3,"buttonModifier","onClick",4,"ngIf"],[1,"edit-profile__container--input","status"],["formControlName","status",1,"edit-profile__input",3,"fieldId","type","nativeAttr","errorMessage","placeholder"],[1,"edit-profile__container--main-group","social"],[1,"edit-profile__container--inputs-group"],[1,"edit-profile__container--gender","edit-profile__custom-select"],["data-cy","editProfileGenderButton",1,"edit-profile__custom-select__element",3,"buttonCustomCss"],["selectedItem",""],["options",""],[1,"edit-profile__container--error","input__container--error"],[1,"edit-profile__container--input","age"],["formControlName","age",1,"edit-profile__input",3,"fieldId","type","nativeAttr","errorMessage","placeholder"],["class","edit-profile__container--input phone",4,"ngIf"],[1,"edit-profile__container--input","country"],["formControlName","country",1,"edit-profile__input",3,"fieldId","nativeAttr","icon","errorMessage","placeholder"],[1,"edit-profile__container--input","city"],["formControlName","city",1,"edit-profile__input",3,"fieldId","nativeAttr","icon","errorMessage","placeholder"],[1,"edit-profile__container--buttons"],[1,"edit-profile__container--buttons-inner"],[1,"edit-profile__button--container"],["data-cy","editProfileSaveChanges",3,"buttonModifier","disabled","type"],["class","edit-profile__button--container",4,"ngIf"],["data-cy","editProfileCancelButton",3,"buttonModifier","onClick"],["data-cy","editProfileBuyNameChange",3,"buttonModifier","onClick"],["class","edit-profile__selected-option",4,"ngIf"],[1,"edit-profile__selected-option"],["data-cy","editProfileGenderOption",3,"value","select",4,"ngFor","ngForOf","ngForTrackBy"],["data-cy","editProfileGenderOption",3,"value","select"],[1,"edit-profile__custom-select__option",3,"ngClass"],[1,"edit-profile__container--input","phone"],["formControlName","phone",1,"edit-profile__input",3,"icon","errorMessage","placeholder"],[1,"edit-profile__text--hint"],["data-cy","editProfileChangePassword",3,"buttonModifier","onClick"]],template:function(e,i){1&e&&U(0,_Vt,1,2,"navigation-bar",0)(1,vVt,1,1,"loader-image",1)(2,CVt,1,4,"empty-content",2)(3,yVt,1,0,"edit-password",3)(4,DVt,56,80,"section",4),2&e&&(l("ngIf",i.userProps&&i.isNavigationVisible),d(),l("ngIf",i.state===i.asyncComponentState.Pending),d(),l("ngIf",i.state===i.asyncComponentState.Failed),d(),l("ngIf",i.passwordChange),d(),l("ngIf",i.userProps&&i.state===i.asyncComponentState.Ready))},dependencies:[Xe,Mt,Ne,Kh,Bo,bo,Up,Vd,pn,Oi,il,A0,Su,Ql,yu,wl,Yl,N0e,qe],styles:[".edit-profile__wrapper[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;display:block;width:100%;height:100%;overflow-y:auto;overflow-x:hidden}.edit-profile__wrapper[_ngcontent-%COMP%]   .edit-profile__container[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;min-height:100%}.edit-profile__form[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column;justify-content:center;width:100%;height:auto;min-height:45rem}@media only screen and (max-width: 580px){.edit-profile__form[_ngcontent-%COMP%]{height:auto}}.edit-profile__container--inputs[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;width:100%;margin-bottom:1rem;min-height:33rem}@media only screen and (max-width: 580px){.edit-profile__container--inputs[_ngcontent-%COMP%]{height:auto;margin-bottom:.2rem}}@media only screen and (max-width: 480px){.edit-profile__container--inputs[_ngcontent-%COMP%]{display:block}}.edit-profile__container--buttons[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column wrap;align-items:flex-end;width:100%;min-height:12rem}@media only screen and (max-width: 580px){.edit-profile__container--buttons[_ngcontent-%COMP%]{justify-content:center;padding-right:0}}@media only screen and (max-height: 768px) and (orientation: landscape){.edit-profile__container--buttons[_ngcontent-%COMP%]{min-height:7rem}}@media only screen and (max-width: 580px){.edit-profile__container--buttons[_ngcontent-%COMP%]{height:auto;min-height:auto}}@media only screen and (max-width: 480px){.edit-profile__container--buttons[_ngcontent-%COMP%]{display:block;padding:0 2.7rem}}.edit-profile__container--buttons[_ngcontent-%COMP%]   .edit-profile__container--buttons-inner[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;justify-content:center;width:100%}@media only screen and (max-width: 480px){.edit-profile__container--buttons[_ngcontent-%COMP%]   .edit-profile__container--buttons-inner[_ngcontent-%COMP%]{flex-flow:column wrap;width:100%;margin:0 auto}}.edit-profile__button--container[_ngcontent-%COMP%]{padding:1rem 2%;height:4rem;margin-bottom:.6rem;flex:1}.edit-profile__button--container[_ngcontent-%COMP%]:nth-of-type(1){order:1}.edit-profile__button--container[_ngcontent-%COMP%]:nth-of-type(2){order:2}.edit-profile__button--container[_ngcontent-%COMP%]:nth-of-type(3){order:3}@media only screen and (max-width: 768px){.edit-profile__button--container[_ngcontent-%COMP%]{padding:1rem 1%}}@media only screen and (max-width: 480px){.edit-profile__button--container[_ngcontent-%COMP%]{width:100%;min-width:25rem;padding:0;min-height:4rem}.edit-profile__button--container[_ngcontent-%COMP%]:nth-of-type(1){order:2}.edit-profile__button--container[_ngcontent-%COMP%]:nth-of-type(2){order:1}.edit-profile__button--container[_ngcontent-%COMP%]:nth-of-type(3){order:3}}.edit-profile__container--avatar[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column;align-items:center}.edit-profile__container--avatar[_ngcontent-%COMP%]   .edit-profile__container--avatar-img[_ngcontent-%COMP%]{width:16rem;height:16rem;margin:2.5rem 0}@media only screen and (max-height: 530px) and (orientation: landscape){.edit-profile__container--avatar[_ngcontent-%COMP%]   .edit-profile__container--avatar-img[_ngcontent-%COMP%]{width:13rem;height:13rem;margin-top:3rem}}@media only screen and (max-width: 480px){.edit-profile__container--avatar[_ngcontent-%COMP%]   .edit-profile__container--avatar-img[_ngcontent-%COMP%]{width:8rem;height:8rem;margin:.5rem 0}}@media only screen and (min-height: 640px) and (orientation: portrait) and (max-width: 480px){.edit-profile__container--avatar[_ngcontent-%COMP%]   .edit-profile__container--avatar-img[_ngcontent-%COMP%]{width:10rem;height:10rem;margin:1rem 0}}.edit-profile__input--avatar[_ngcontent-%COMP%]{position:absolute;top:0}.edit-profile__container--gender[_ngcontent-%COMP%]{display:block;width:48%;position:relative}.edit-profile__container--inputs-group[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;justify-content:space-between}@media only screen and (max-width: 480px){.edit-profile__container--inputs-group[_ngcontent-%COMP%]{width:100%;min-width:25rem}}.edit-profile__container--main-group[_ngcontent-%COMP%]{display:flex;flex-flow:column;flex:1;padding:3rem 2%}@media only screen and (max-width: 580px){.edit-profile__container--main-group[_ngcontent-%COMP%]{min-width:50%;width:30rem;padding:0 2%}}@media only screen and (max-width: 480px){.edit-profile__container--main-group[_ngcontent-%COMP%]{min-width:100%;align-items:center}}.edit-profile__container--main-group.avatar[_ngcontent-%COMP%]{flex:1;align-items:center}@media only screen and (max-width: 580px){.edit-profile__container--main-group.avatar[_ngcontent-%COMP%]{width:24rem;padding-bottom:0}}@media only screen and (max-width: 480px){.edit-profile__container--main-group.avatar[_ngcontent-%COMP%]{width:100%;padding:0 2.7rem}}@media only screen and (max-height: 640px) and (orientation: landscape){.edit-profile__container--main-group.avatar[_ngcontent-%COMP%]{padding:0 2.7rem}}.edit-profile__container--main-group.status[_ngcontent-%COMP%]{flex:1}@media only screen and (max-height: 640px) and (orientation: landscape){.edit-profile__container--main-group.status[_ngcontent-%COMP%]{padding:1rem 2.7rem 0}}@media only screen and (max-width: 768px){.edit-profile__container--main-group.status[_ngcontent-%COMP%]{padding:0 2.7rem}}@media only screen and (max-width: 480px){.edit-profile__container--main-group.status[_ngcontent-%COMP%]{padding:0 2.7rem}}.edit-profile__container--main-group.social[_ngcontent-%COMP%]{flex:1}@media only screen and (max-height: 768px) and (orientation: landscape){.edit-profile__container--main-group.social[_ngcontent-%COMP%]{padding:3rem 2.7rem 0}}@media only screen and (max-height: 640px) and (orientation: landscape){.edit-profile__container--main-group.social[_ngcontent-%COMP%]{padding:1rem 2.7rem 0}}@media only screen and (max-width: 768px){.edit-profile__container--main-group.social[_ngcontent-%COMP%]{padding:0 2.7rem}}@media only screen and (max-width: 850px){.edit-profile__container--main-group.social[_ngcontent-%COMP%]{width:100%;flex:auto}}@media only screen and (max-width: 580px){.edit-profile__container--main-group.social[_ngcontent-%COMP%]{padding-top:0}}@media only screen and (max-width: 480px){.edit-profile__container--main-group.social[_ngcontent-%COMP%]{padding:0 2.7rem}}.edit-profile__container--name-change[_ngcontent-%COMP%]{position:relative;top:.2rem;left:0;width:100%}.edit-profile__container--input[_ngcontent-%COMP%]{min-height:9.7rem;position:relative;margin:2rem 0 0;padding:0 0 .5rem}@media only screen and (max-height: 680px){.edit-profile__container--input[_ngcontent-%COMP%]{min-height:9.7rem}}@media only screen and (max-width: 850px){.edit-profile__container--input[_ngcontent-%COMP%]{min-height:7.7rem}}@media only screen and (max-width: 580px){.edit-profile__container--input[_ngcontent-%COMP%]{min-height:5.7rem}}@media only screen and (max-width: 480px){.edit-profile__container--input[_ngcontent-%COMP%]{width:100%;min-width:25rem}}.edit-profile__container--input.username[_ngcontent-%COMP%], .edit-profile__container--input.phone[_ngcontent-%COMP%]{flex-grow:unset}@media only screen and (max-width: 580px){.edit-profile__container--input.username[_ngcontent-%COMP%], .edit-profile__container--input.phone[_ngcontent-%COMP%]{margin:0 0 1.2rem}}.edit-profile__container--input.status[_ngcontent-%COMP%]{flex-grow:1;margin-bottom:2.2rem}@media only screen and (max-height: 640px){.edit-profile__container--input.status[_ngcontent-%COMP%]{margin:2rem 0 2.2rem}}@media only screen and (max-width: 480px){.edit-profile__container--input.status[_ngcontent-%COMP%]{margin:0 0 2.2rem}}.edit-profile__container--input.status[_ngcontent-%COMP%]   .edit-profile__input[_ngcontent-%COMP%]{height:18.5rem}@media only screen and (max-height: 680px){.edit-profile__container--input.status[_ngcontent-%COMP%]   .edit-profile__input[_ngcontent-%COMP%]{height:17.5rem}}@media only screen and (max-height: 680px) and (orientation: landscape){.edit-profile__container--input.status[_ngcontent-%COMP%]   .edit-profile__input[_ngcontent-%COMP%]{height:15.5rem}}@media only screen and (max-width: 768px){.edit-profile__container--input.status[_ngcontent-%COMP%]   .edit-profile__input[_ngcontent-%COMP%]{font-size:1.4rem;height:16.5rem}}@media only screen and (max-width: 480px){.edit-profile__container--input.status[_ngcontent-%COMP%]   .edit-profile__input[_ngcontent-%COMP%]{height:8rem}}@media only screen and (max-width: 480px){.edit-profile__container--input.city[_ngcontent-%COMP%]{margin:0}}.edit-profile__container--input.age[_ngcontent-%COMP%]{width:48%;flex-grow:0}@media only screen and (max-width: 480px){.edit-profile__container--input.age[_ngcontent-%COMP%]{margin:0}}@media only screen and (max-width: 480px){.edit-profile__container--input.age[_ngcontent-%COMP%]{min-width:5rem}}@media only screen and (max-width: 480px){.edit-profile__container--input.country[_ngcontent-%COMP%]{margin:0}}.edit-profile__input[_ngcontent-%COMP%], .edit-profile__text--hint[_ngcontent-%COMP%]{position:relative}.edit-profile__container--avatar--button[_ngcontent-%COMP%]{width:18rem}@media only screen and (max-width: 480px){.edit-profile__container--avatar--button[_ngcontent-%COMP%]{width:100%;margin-bottom:2.7rem}}"]}),n})();const z0e=rl.defaultLoggedRoute,BVt=[{path:"edit-profile",redirectTo:"".concat(z0e,"(").concat(Fn,":").concat(Ai).concat(z0e,"/edit-profile)")}],NVt=[{path:"edit-profile",data:{pageId:Mn.EditProfile},component:V0e,canActivate:[xH],canDeactivate:[xH]}],FVt=[No,xi,Yi,Io,Ls];let UVt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[FVt]}),n})();var GVt=lt.NetworkError;function VVt(t,n){if(1&t&&B(0,"navigation-bar",3),2&t){const o=_();l("backLink","history")("content",o.navBarContent)}}function zVt(t,n){1&t&&B(0,"loader-image",4),2&t&&l("transparentBG",!0)("delay",200)}const jVt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),j0e=t=>[t];function HVt(t,n){1&t&&(p(0,"div",9),B(1,"empty-content",10),m()),2&t&&(d(),l("textArray",ne(2,j0e,pt(1,jVt))))}const qVt=()=>({textKey:"BLOCKED.NO_BLOCKED"});function WVt(t,n){1&t&&B(0,"empty-content",10),2&t&&l("textArray",ne(2,j0e,pt(1,qVt)))}const $Vt=t=>({name:t});function KVt(t,n){if(1&t){const o=Ce();p(0,"button-icon",17),Y("onClick",function(){const r=oe(o).$implicit;return re(_(3).unblock(r.profile))}),m()}if(2&t){const o=_(3);l("bclass","list-users-box__container--delete-button")("icon",ne(2,$Vt,o.iconsEnum.DELETE))}}const ZVt=t=>({handler:t}),QVt=()=>({textTitle:"BLOCKED.BLOCKED",textNoUsers:"BLOCKED.NO_BLOCKED",textUserLabel:"BLOCKED.BLOCKED_USER",showPartOfTotal:!0});function YVt(t,n){if(1&t){const o=Ce();p(0,"div",11)(1,"div",12)(2,"search-bar",13),Y("filterAction",function(i){return oe(o),re(_(2).searchInBlocked(i))})("clearFilters",function(){return oe(o),re(_(2).resetFilters())}),m()(),p(3,"div",14)(4,"list-users-box",15),Y("addSlotButtonClicked",function(){return oe(o),re(_(2).buyBlockSlots())}),U(5,KVt,1,4,"ng-template",null,16,ft),m()()()}if(2&t){const o=_(2);l("onScrolledToBottom",ne(10,ZVt,o.increaseVisibleUsers)),d(2),l("customInputCssClass","blocked__search--bar--input")("searchBarPlaceholder","PLACEHOLDERS.USERNAME"),d(2),l("type","blocked stroked")("listUsers",o.list.blocked)("shownUsersCount",o.visibleUsersCount)("totalListLength",o.list.limit)("searchedUser",o.searchedUser)("showBuyMoreSlotsButton",o.showBuyBlockButtons)("configListUsers",pt(12,QVt))}}function JVt(t,n){if(1&t&&(p(0,"section",5),U(1,HVt,2,4,"div",6)(2,WVt,1,4,"empty-content",7)(3,YVt,7,13,"div",8),m()),2&t){const o=_();d(),l("ngIf",o.state===o.asyncComponentState.Failed),d(),l("ngIf",o.state===o.asyncComponentState.Ready&&o.list&&0===o.list.blocked.length),d(),l("ngIf",o.state===o.asyncComponentState.Ready&&o.list&&o.list.blocked.length>0)}}let H0e=(()=>{var t;class n{constructor(e,i,r,s,a,c){var u=this;this.isNavigationVisible=!0,this.asyncComponentState=Jr,this.list={blocked:[],limit:void 0},this.iconsEnum=ve.EIcons,this.navBarContent={type:Ru.EContent.Text,data:{key:"LABEL.BLOCKED"}},this.showBuyBlockButtons=!1,this.increaseVisibleUsers=()=>{this.visibleUsersCount+this.visibleUsersStepCount>=this.totalUsersCount?this.visibleUsersCount=this.totalUsersCount:this.visibleUsersCount+=this.visibleUsersStepCount,this.updateChangeDetectorRef()},this.onBlockedFetchSuccess=()=>{this.state=Jr.Ready,this.updateChangeDetectorRef()},this.handleBlockedUsers=f(function*(){try{u.state=Jr.Pending,u.fetchBlockedPromise=new Jn(u.fetchBlockList()),yield u.fetchBlockedPromise,u.onBlockedFetchSuccess()}catch(h){console.error(h),h instanceof GVt&&u.onBlockedFetchError()}u.updateChangeDetectorRef()}),this.fetchBlockList=()=>new Promise(function(){var h=f(function*(b,w){try{const R=yield u.userBlockService.getBlockList();u.list.limit=R.limit;const G=new ie.List(R.blocked.map(K=>({profile:new Lo(K.profile),onlineStatus:new xm})));u.list.blocked=G.orderBy([K=>K.profile.username.currentUsername],ie.ESort.Asc).toArray(),u.totalUsersCount=u.list.blocked.length,u.increaseVisibleUsers(),b()}catch(R){w(R)}});return function(b,w){return h.apply(this,arguments)}}()),this.shop=c,this.changeDetectorRef=r,this.userBlockService=e,this.toaster=i,this.searchedUser="",this.visibleUsersStepCount=20,this.visibleUsersCount=0,this.totalUsersCount=0,this.state=Jr.None,this.shopMoreService=s,this.store=a,this.changeDetectorRef.detach()}ngOnInit(){var e=this;return f(function*(){e.state=Jr.Pending;try{e.shopConfig=yield e.shop.load(),e.showBuyBlockButtons=void 0!==e.shopConfig.products.find(i=>i.item.type===Fe.TG.Block)}catch(i){console.error(i)}e.handleBlockedUsers(),e.updateChangeDetectorRef(),e.blockExtensionSubscription=e.store.subscribeBlockListLimit().subscribe(e.handleBlockedUsers)})()}ngOnDestroy(){this.fetchBlockedRetryablePromise&&this.fetchBlockedRetryablePromise.cancel(),this.fetchBlockedPromise&&this.fetchBlockedPromise.cancel(),this.blockExtensionSubscription&&this.blockExtensionSubscription.unsubscribe()}getConnectedComponentUrl(){return"profile"}shiftVisibleUsers(){this.visibleUsersCount<=0||(this.visibleUsersCount-=1,this.updateChangeDetectorRef(),this.visibleUsersCount+=1,this.updateChangeDetectorRef())}onBlockedFetchError(){this.state=Jr.Failed,this.fetchBlockedRetryablePromise=new T_(this.fetchBlockList,{retryDelayMs:wP,maxRetriesCount:1/0}),this.fetchBlockedRetryablePromise.then(this.onBlockedFetchSuccess).catch(i=>{console.log(i)})}unblock(e){var i=this;return f(function*(){try{yield i.userBlockService.unblock(e);const r=yield i.userBlockService.getBlockList();i.list={blocked:r.blocked.map(s=>({profile:new Lo(s.profile),onlineStatus:new xm})),limit:r.limit},i.totalUsersCount-=1,i.shiftVisibleUsers(),i.toaster.success("POPUP.SUCCESS_REMOVE_BLOCKED")}catch(r){console.warn(r),i.toaster.error("POPUP.ERROR_REMOVE_BLOCKED"),i.updateChangeDetectorRef()}})()}searchInBlocked(e){this.searchedUser=e.searchbarFilterValue,this.updateChangeDetectorRef()}resetFilters(){this.searchedUser="",this.updateChangeDetectorRef()}buyBlockSlots(){this.shopMoreService.buyUtilityItem(Fe.TG.Block)}updateChangeDetectorRef(){this.changeDetectorRef.destroyed||this.changeDetectorRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(n0),g(Dt),g(Re),g(I2),g(J),g(Ko))},t.\u0275cmp=pe({type:t,selectors:[["blocked"]],features:[mn([{provide:nn,useFactory:o=>new nn("blocked",o),deps:[[new jo,new zo,nn]]}])],decls:3,vars:3,consts:[[3,"backLink","content",4,"ngIf"],[3,"transparentBG","delay",4,"ngIf"],["class","blocked__wrapper",4,"ngIf"],[3,"backLink","content"],[3,"transparentBG","delay"],[1,"blocked__wrapper"],["class","blocked__container--empty",4,"ngIf"],[3,"textArray",4,"ngIf"],["class","blocked__container--main","scroll-directive","",3,"onScrolledToBottom",4,"ngIf"],[1,"blocked__container--empty"],[3,"textArray"],["scroll-directive","",1,"blocked__container--main",3,"onScrolledToBottom"],[1,"blocked__container--search-outer"],["data-cy","blockedSearch",1,"blocked__search-bar-wrapper",3,"customInputCssClass","searchBarPlaceholder","filterAction","clearFilters"],[1,"blocked__container--blocked-users"],[1,"blocked__container--blocked-users__list",3,"type","listUsers","shownUsersCount","totalListLength","searchedUser","showBuyMoreSlotsButton","configListUsers","addSlotButtonClicked"],["buttons",""],["data-cy","blockedRemoveButton",3,"bclass","icon","onClick"]],template:function(e,i){1&e&&U(0,VVt,1,2,"navigation-bar",0)(1,zVt,1,2,"loader-image",1)(2,JVt,4,3,"section",2),2&e&&(l("ngIf",i.isNavigationVisible),d(),l("ngIf",i.state===i.asyncComponentState.Pending),d(),l("ngIf",i.state===i.asyncComponentState.Ready||i.state===i.asyncComponentState.Failed))},dependencies:[Ne,Kh,bo,mv,pf,ei,Oi,Is],styles:[".blocked__wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;width:100%;height:calc(100% - 4rem);display:flex;justify-content:center}.blocked__container--empty[_ngcontent-%COMP%]{width:80%;height:100%;max-width:80rem;display:flex;justify-content:center;align-items:center;flex-flow:column nowrap}.blocked__container--main[_ngcontent-%COMP%]{width:100%;height:100%;max-width:100rem;display:flex;overflow-x:hidden;flex-flow:column nowrap}.blocked__container--search-outer[_ngcontent-%COMP%]{padding:0 6rem;padding-top:4%}@media only screen and (max-width: 768px){.blocked__container--search-outer[_ngcontent-%COMP%]{padding:0 2rem;padding-top:4%}}.blocked__search-bar-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.blocked__container--blocked-users[_ngcontent-%COMP%]{flex-flow:column nowrap;height:100%}"]}),n})();const q0e=[{path:"blocked",data:{pageId:Mn.Blocked},component:H0e}],XVt=[],e6t=[No,xi,Yi,Io,Ls];let t6t=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...XVt],imports:[e6t]}),n})();var n6t=ve.EIcons,i6t=ve.EButtonModifier,o6t=lt.NetworkError;function r6t(t,n){if(1&t&&B(0,"navigation-bar",3),2&t){const o=_();l("backLink","history")("content",o.navBarContent)}}function s6t(t,n){1&t&&B(0,"loader-image",4),2&t&&l("transparentBG",!0)}const a6t=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),W0e=t=>[t];function c6t(t,n){1&t&&B(0,"empty-content",9),2&t&&l("textArray",ne(2,W0e,pt(1,a6t)))}function l6t(t,n){if(1&t&&(p(0,"div",10),B(1,"invite-friends",11),p(2,"p",12),H(3),V(4,"translate"),m()()),2&t){const o=_(2);d(3),se(yt(4,1,"FRIENDS.NO_FRIENDS",ne(4,W0e,o.siteName)))}}function u6t(t,n){1&t&&B(0,"user-list-box-current-game",28),2&t&&l("currentGame",_().$implicit.currentGameName)}function d6t(t,n){1&t&&U(0,u6t,1,1,"user-list-box-current-game",27),2&t&&l("ngIf",n.$implicit.currentGameName)}const gD=t=>({name:t});function p6t(t,n){if(1&t){const o=Ce();p(0,"button-icon",31),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_(3).addRemoveCloseFriend(i.profile))}),m()}if(2&t){const o=_().$implicit,e=_(3);l("disabled",!e.isCloseFriendButtonActive)("bclass","friends-list__close--friend-button")("icon",ne(4,gD,e.isCloseFriend(o.profile)?e.iconsEnum.ACTIVE_CLOSE_FRIEND:e.iconsEnum.INACTIVE_CLOSE_FRIEND)),Hn("data-cy2",e.isCloseFriend(o.profile)?e.iconsEnum.ACTIVE_CLOSE_FRIEND:e.iconsEnum.INACTIVE_CLOSE_FRIEND)}}function h6t(t,n){if(1&t){const o=Ce();p(0,"button-icon",32),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_(3).removeFriend(i.profile))}),m()}if(2&t){const o=_(4);l("bclass","list-users-box__container--delete-button")("icon",ne(2,gD,o.iconsEnum.DELETE))}}function m6t(t,n){if(1&t&&U(0,p6t,1,6,"button-icon",29)(1,h6t,1,4,"button-icon",30),2&t){const o=n.$implicit,e=_(3);l("ngIf",o),d(),l("ngIf",e.showDeleteButton)}}function f6t(t,n){if(1&t){const o=Ce();p(0,"button-icon",31),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_(4).addRemoveCloseFriend(i.profile))}),m()}if(2&t){const o=_().$implicit,e=_(4);l("disabled",!e.isCloseFriendButtonActive)("bclass","friends-list__close--friend-button")("icon",ne(4,gD,e.isCloseFriend(o.profile)?e.iconsEnum.ACTIVE_CLOSE_FRIEND:e.iconsEnum.INACTIVE_CLOSE_FRIEND)),Hn("data-cy2",e.isCloseFriend(o.profile)?e.iconsEnum.ACTIVE_CLOSE_FRIEND:e.iconsEnum.INACTIVE_CLOSE_FRIEND)}}function g6t(t,n){if(1&t){const o=Ce();p(0,"button-icon",32),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_(4).removeFriend(i.profile))}),m()}if(2&t){const o=_(5);l("bclass","list-users-box__container--delete-button")("icon",ne(2,gD,o.iconsEnum.DELETE))}}function _6t(t,n){if(1&t&&U(0,f6t,1,6,"button-icon",29)(1,g6t,1,4,"button-icon",30),2&t){const o=n.$implicit,e=_(4);l("ngIf",o),d(),l("ngIf",e.showDeleteButton)}}const v6t=()=>({textTitle:"FRIENDS.OFFLINE",textNoUsers:"FRIENDS.NO_FRIENDS",textUserLabel:"FRIENDS.OFFLINE",textButtonTitle:"FRIENDS.OFFLINE"});function b6t(t,n){if(1&t&&(p(0,"list-users-box",33),U(1,_6t,2,2,"ng-template",null,21,ft),p(3,"div",34)(4,"div",23)(5,"p",35),H(6),V(7,"uppercase"),V(8,"translate"),m()()()()),2&t){const o=_(3);l("type","offline")("listUsers",o.friendsOffline)("shownUsersCount",o.visibleOfflineCount)("totalListLength",o.friendsOnline.length+o.friendsOffline.length)("useCustomHeader",!0)("searchedUser",o.searchedUser)("configListUsers",pt(12,v6t)),d(6),se($(7,8,$(8,10,"FRIENDS.OFFLINE")))}}const C6t=t=>({handler:t}),y6t=()=>({textTitle:"FRIENDS.ONLINE",textNoUsers:"FRIENDS.NO_FRIENDS",textUserLabel:"FRIENDS.ONLINE"});function S6t(t,n){if(1&t){const o=Ce();p(0,"div",13),B(1,"invite-friends",11),p(2,"div",14)(3,"div",15)(4,"search-bar",16),Y("filterAction",function(i){return oe(o),re(_(2).searchInFriends(i))})("clearFilters",function(){return oe(o),re(_(2).resetFilters())}),m()()(),p(5,"div",17)(6,"list-users-box",18),U(7,d6t,1,1,"ng-template",19,20,ft)(9,m6t,2,2,"ng-template",null,21,ft),p(11,"div",22)(12,"div",23)(13,"p",24),H(14),V(15,"uppercase"),V(16,"translate"),m(),p(17,"p",25),H(18),m()()()(),U(19,b6t,9,13,"list-users-box",26),m()()}if(2&t){const o=_(2);l("onScrolledToBottom",ne(18,C6t,o.increaseVisibleFriends)),d(4),l("customInputCssClass","friends-popup__search--bar--input")("searchBarPlaceholder","PLACEHOLDERS.USERNAME"),d(2),l("type","online")("listUsers",o.friendsOnline)("shownUsersCount",o.visibleOnlineCount)("totalListLength",o.friendsOnline.length+o.friendsOffline.length)("useCustomHeader",!0)("searchedUser",o.searchedUser)("configListUsers",pt(20,y6t)),d(8),se($(15,14,$(16,16,"FRIENDS.ONLINE"))),d(4),mu(" (",o.visibleOnlineCount," / ",o.friendsOnline.length+o.friendsOffline.length,") "),d(),l("ngIf",o.visibleOfflineCount||o.visibleFriendsCount===o.friendsCount||o.searchedUser)}}function w6t(t,n){if(1&t&&(p(0,"section",5),U(1,c6t,1,4,"empty-content",6)(2,l6t,5,6,"div",7)(3,S6t,20,21,"div",8),m()),2&t){const o=_();d(),l("ngIf",o.state===o.asyncComponentState.Failed),d(),l("ngIf",o.state===o.asyncComponentState.Ready&&o.friendsCount<=0),d(),l("ngIf",o.state===o.asyncComponentState.Ready&&o.friendsCount>0)}}let $0e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){var w=this;this.isNavigationVisible=!0,this.asyncComponentState=Jr,this.iconsEnum=n6t,this.buttonType=i6t.BUTTON_ATTENTION,this.navBarContent={type:Ru.EContent.Text,data:{key:"LABEL.FRIENDS"}},this.increaseVisibleFriends=()=>{const R=this.friendsOnline.length+this.friendsOffline.length;this.visibleFriendsCount<R&&(this.visibleFriendsCount+=this.visibleFriendsStepCount,this.visibleFriendsCount>R&&(this.visibleFriendsCount=R),this.updateVisibleFriends())},this.handleFetchFriends=f(function*(){try{w.fetchFriendsPromise=new Jn(w.fetchFriends()),yield w.fetchFriendsPromise,w.onFriendFetchSuccess()}catch(R){console.error(R),R instanceof o6t&&w.onFriendFetchError()}w.updateChangeDetectorRef()}),this.onFriendFetchSuccess=()=>{this.state=Jr.Ready,this.updateChangeDetectorRef()},this.fetchFriends=()=>new Promise(function(){var R=f(function*(G,K){let te=null;try{te=(yield w.userBlock.getBlockList()).blocked.map(Ke=>Ke.profile);const me=(yield w.friendsService.requestFriends({useCache:!1})).friends.filter(Ke=>(Ke.isCloseFriend&&w.closeFriends.add(Ke.profile),!w.checkIfFriendInBlockedList(te,Ke.id))),ge=new ie.UniqueList(me.filter(Ke=>Ke.onlineStatus.isOnline)),Me=new ie.UniqueList(me.filter(Ke=>!Ke.onlineStatus.isOnline));w.friendsOnline=ge.orderBy([Ke=>Ke.profile.username.currentUsername],ie.ESort.Asc).toArray(),w.friendsOffline=Me.orderBy([Ke=>Ke.profile.username.currentUsername],ie.ESort.Asc).toArray(),w.friendsCount=me.length,w.increaseVisibleFriends(),G()}catch(ee){K(ee)}});return function(G,K){return R.apply(this,arguments)}}()),this.changeDetectorRef=c,this.userBlock=a,this.friendsService=e,this.toaster=i,this.navigation=r,this.store=s,this.visibleFriendsStepCount=20,this.visibleFriendsCount=0,this.friendsCount=0,this.friendsOnline=[],this.friendsOffline=[],this.closeFriends=new ie.UniqueList,this.openedCategory="",this.siteName=Lt.CONFIG.platform.name,this.searchedUser="",this.state=Jr.None,this.changeDetectorRef.detach(),this.activatedComponentRoute=u,this.popup=b,this.showDeleteButton=h.getActionPermission(nt.EPermissionModule.Friends,nt.EModuleAction.Edit).isPermitted,this.isCloseFriendButtonActive=h.getActionPermission(nt.EPermissionModule.Friends,nt.EModuleAction.Edit).isPermitted}ngOnInit(){this.userMe=this.store.selectUserState(),this.state=Jr.Pending,this.handleFetchFriends()}ngOnDestroy(){this.fetchFriendsRetryablePromise&&this.fetchFriendsRetryablePromise.cancel(),this.fetchFriendsPromise&&this.fetchFriendsPromise.cancel()}getConnectedComponentUrl(){return"profile"}onFriendFetchError(){this.state=Jr.Failed,this.fetchFriendsRetryablePromise=new T_(this.fetchFriends,{retryDelayMs:wP,maxRetriesCount:1/0}),this.fetchFriendsRetryablePromise.then(this.onFriendFetchSuccess).catch(i=>{console.log(i)})}updateVisibleFriends(){this.visibleFriendsCount>this.friendsCount&&(this.visibleFriendsCount=this.friendsCount),this.visibleFriendsCount<this.friendsOnline.length?(this.visibleOnlineCount=this.visibleFriendsCount,this.visibleOfflineCount=0):(this.visibleOnlineCount=this.friendsOnline.length,this.visibleOfflineCount=this.visibleFriendsCount-this.visibleOnlineCount),this.updateChangeDetectorRef()}checkIfFriendInBlockedList(e,i){return!!e.find(r=>r.id===i)}removeFriend(e){var r,i=this;this.popup.confirm({textParams:{translationKey:"POPUP.FRIEND_REMOVE_QUESTION",params:[e.username.currentUsername]},buttons:{action:(r=f(function*(){try{const s=i.store.friends.selectFriends().find(a=>a.id===e.id);yield i.friendsService.unfriend(e.id),s.onlineStatus.isOnline?i.friendsOnline=i.friendsOnline.filter(a=>a.id!==e.id):i.friendsOffline=i.friendsOffline.filter(a=>a.id!==e.id),i.friendsCount-=1,i.toaster.success("POPUP.SUCCESS_REMOVE_FRIEND"),i.updateChangeDetectorRef()}catch(s){console.warn("FR REMOVE ERROR",s),i.toaster.error("POPUP.ERROR_REMOVE_FRIEND")}}),function(){return r.apply(this,arguments)})}})}isCloseFriend(e){return e&&!!this.closeFriends.findById(e.id)}addRemoveCloseFriend(e){var i=this;return f(function*(){const r=i.store.friends.selectFriends().find(s=>s.id===e.id);i.isCloseFriend(r)?(yield i.friendsService.removeCloseFriend(r),i.closeFriends.findById(r.id)&&i.closeFriends.remove(e)):(yield i.friendsService.addCloseFriend(r),i.closeFriends.tryAdd(e));try{i.updateChangeDetectorRef()}catch(s){return console.warn("CLOSE FRIEND ACTION ERROR",s),i.toaster.error("ERRORS.CONNECTION_ERROR")}})()}searchInFriends(e){this.searchedUser=e.searchbarFilterValue,this.updateChangeDetectorRef()}resetFilters(){this.searchedUser="",this.updateChangeDetectorRef()}updateChangeDetectorRef(){this.changeDetectorRef.destroyed||this.changeDetectorRef.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Tu),g(Dt),g(Yt),g(J),g(n0),g(Re),g(Pr),g(Pi),g(Cn))},t.\u0275cmp=pe({type:t,selectors:[["friends"]],features:[mn([ia,{provide:nn,useFactory:o=>new nn("friends",o),deps:[[new jo,new zo,nn]]}])],decls:3,vars:3,consts:[[3,"backLink","content",4,"ngIf"],[3,"transparentBG",4,"ngIf"],["class","friends__wrapper",4,"ngIf"],[3,"backLink","content"],[3,"transparentBG"],[1,"friends__wrapper"],[3,"textArray",4,"ngIf"],["class","friends__container--empty",4,"ngIf"],["class","friends__container--main","scroll-directive","",3,"onScrolledToBottom",4,"ngIf"],[3,"textArray"],[1,"friends__container--empty"],["data-cy","friendsListInviteFriendsContainer",1,"friends__container--invite-fr"],["data-cy","friendsListMissingFriendsText",1,"friends__text-invite-friends"],["scroll-directive","",1,"friends__container--main",3,"onScrolledToBottom"],["data-cy","friendsListSearchContainer",1,"friends__container--search-outer"],[1,"friends__container--search"],[1,"friends__search-bar-wrapper",3,"customInputCssClass","searchBarPlaceholder","filterAction","clearFilters"],[1,"friends__container--friends-users"],["data-cy","friendsOnlineList",1,"friends__container--friends-users__list",3,"type","listUsers","shownUsersCount","totalListLength","useCustomHeader","searchedUser","configListUsers"],["slot","user-label"],["userLabel",""],["buttons",""],["header","","data-cy","friendsOnlineListHeader",1,"friends__list--header-title-container"],[1,"friends__list--header--title-left"],[1,"friends__list--header-stats","online"],[1,"friends__list--header-numbers"],["class","friends__container--friends-users__list","data-cy","friendsOfflineList",3,"type","listUsers","shownUsersCount","totalListLength","useCustomHeader","searchedUser","configListUsers",4,"ngIf"],["class","friends-list__current-game",3,"currentGame",4,"ngIf"],[1,"friends-list__current-game",3,"currentGame"],["data-cy","friendListCloseFriendButton",3,"disabled","bclass","icon","onClick",4,"ngIf"],["class","friends__list--header-action-labels","data-cy","friendListRemoveButton",3,"bclass","icon","onClick",4,"ngIf"],["data-cy","friendListCloseFriendButton",3,"disabled","bclass","icon","onClick"],["data-cy","friendListRemoveButton",1,"friends__list--header-action-labels",3,"bclass","icon","onClick"],["data-cy","friendsOfflineList",1,"friends__container--friends-users__list",3,"type","listUsers","shownUsersCount","totalListLength","useCustomHeader","searchedUser","configListUsers"],["header","","data-cy","friendsOfflineListHeader",1,"friends__list--header-title-container"],[1,"friends__list--header-stats","offline"]],template:function(e,i){1&e&&U(0,r6t,1,2,"navigation-bar",0)(1,s6t,1,1,"loader-image",1)(2,w6t,4,3,"section",2),2&e&&(l("ngIf",i.isNavigationVisible),d(),l("ngIf",i.state===i.asyncComponentState.Pending),d(),l("ngIf",i.state===i.asyncComponentState.Ready||i.state===i.asyncComponentState.Failed))},dependencies:[Ne,Is,Kh,bo,mv,R0,Bz,pf,ei,Oi,Sp,qe],styles:[".friends__wrapper[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative;width:100%;height:100%;display:flex;justify-content:center}.friends__container--empty[_ngcontent-%COMP%]{width:100%;height:100%;max-width:80rem;display:flex;align-items:center;flex-flow:column nowrap}.friends__container--main[_ngcontent-%COMP%]{width:100%;height:100%;max-width:100rem;display:flex;overflow-x:hidden;flex-flow:column nowrap}.friends__container--search-outer[_ngcontent-%COMP%]{height:11rem;min-height:11rem;display:flex;flex-flow:column nowrap;margin-top:2rem;padding:0 6.5rem}@media only screen and (max-width: 1366px){.friends__container--search-outer[_ngcontent-%COMP%]{padding:0 6rem}}@media only screen and (max-width: 768px){.friends__container--search-outer[_ngcontent-%COMP%]{padding:0 3rem}}.friends__container--friends-users[_ngcontent-%COMP%]{flex-flow:column nowrap;height:100%}.friends__container--search[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;justify-content:flex-start;height:50%;width:100%}.friends__search-bar-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.friends__container--search-bar[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-flow:row wrap;justify-content:center;align-items:center}.friends__container--search-bar[_ngcontent-%COMP%]   .friends__input--search[_ngcontent-%COMP%]{line-height:2rem!important}@media only screen and (max-width: 1366px){.friends__container--search-bar[_ngcontent-%COMP%]   .friends__input--search[_ngcontent-%COMP%]{line-height:3rem!important}}@media only screen and (max-width: 768px){.friends__container--search-bar[_ngcontent-%COMP%]   .friends__input--search[_ngcontent-%COMP%]{padding:.5rem!important}}.friends__container--search-bar[_ngcontent-%COMP%]   .friends__container--button-search[_ngcontent-%COMP%]{position:absolute;right:.1rem}.friends__container--search-bar[_ngcontent-%COMP%]   .friends__container--clear-search[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);right:6rem;height:3rem;width:3rem;display:flex;justify-content:center;align-items:center;cursor:pointer}.lang-ar[_ngcontent-%COMP%]   .friends__container--search-bar[_ngcontent-%COMP%]   .friends__container--clear-search[_ngcontent-%COMP%], .lang-fa[_ngcontent-%COMP%]   .friends__container--search-bar[_ngcontent-%COMP%]   .friends__container--clear-search[_ngcontent-%COMP%]{right:0;left:1rem}.friends__container--invite-fr[_ngcontent-%COMP%]{width:100%;padding:0 6.5rem}@media only screen and (max-width: 1366px){.friends__container--invite-fr[_ngcontent-%COMP%]{padding:0 6rem}}@media only screen and (max-width: 768px){.friends__container--invite-fr[_ngcontent-%COMP%]{padding:0 1rem}}.friends__button-invite-friends[_ngcontent-%COMP%]{padding:0;width:100%;margin:0!important}.friends__text-invite-friends[_ngcontent-%COMP%]{font-size:1.8rem;text-align:center;margin:2rem}.friends__list--header-title-container[_ngcontent-%COMP%]{order:1;width:100%;position:relative;display:flex;flex-flow:row wrap}.friends__list--header--title-left[_ngcontent-%COMP%]{display:flex;align-items:flex-end;width:calc(100% - 17rem)}@media only screen and (max-width: 380px){.friends__list--header--title-left[_ngcontent-%COMP%]{width:calc(100% - 10rem)}}.friends__list--header-stats[_ngcontent-%COMP%]{margin-right:.5rem;font-size:1.4rem;line-height:2.4rem}.friends__list--header-stats[_ngcontent-%COMP%]:before{display:inline-block;width:2rem;height:2rem;margin-right:.8rem;background-size:contain;vertical-align:middle}.lang-ar[_ngcontent-%COMP%]   .friends__list--header-stats[_ngcontent-%COMP%]:before, .lang-fa[_ngcontent-%COMP%]   .friends__list--header-stats[_ngcontent-%COMP%]:before{margin-right:0;margin-left:.8rem}.friends__list--header-numbers[_ngcontent-%COMP%]{font-size:1.4rem;line-height:2.4rem}.friends-list__current-game[_ngcontent-%COMP%]{margin-top:.5rem}"]}),n})();var T6t=nt.EPermissionModule,P6t=nt.EModuleAction;let K0e=(()=>{var t;class n{constructor(e,i,r){this.permissionsService=e,this.navigation=i,this.constants=r}canActivate(){return!!this.permissionsService.getActionPermission(T6t.Friends,P6t.View).isPermitted||!!this.navigation.isFirstNavigation(this.navigation.getCurrentNavigation().previousNavigation)&&this.navigation.parseUrl(this.constants.defaultLoggedRoute)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Pi),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Z0e=rl.defaultLoggedRoute,I6t=[{path:"friends",redirectTo:"".concat(Z0e,"(").concat(Fn,":").concat(Ai).concat(Z0e,"/friends)")}],M6t=[{path:"friends",data:{pageId:Mn.Friends},component:$0e,canActivate:[K0e]}],O6t=[K0e],E6t=[xi,Yi,Io,No,Ls];let x6t=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...O6t],imports:[E6t]}),n})();var A6t=nt.EPermissionModule,R6t=nt.EModuleAction;let Q0e=(()=>{var t;class n{constructor(e){this.permissionService=e}canActivate(){return this.permissionService.getActionPermission(A6t.Lobby,R6t.TournamentRoom).isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ti))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),s1=(()=>{var t;class n{constructor(e,i){this.http=e,this.gamesStateService=i,this.promoTournamentsData=[]}getPromoTournaments(e={}){var i;const r=this.gamesStateService.getCurrentGameState();let s=new $l;return null!==(i=e.ids)&&void 0!==i&&i.length&&e.ids.forEach(a=>{s=s.append("ids[]",a)}),s=s.append("gameId",r.id),this.http.get("games/tournaments/promo",{params:s}).pipe(jn(a=>{const c=a.body;return c.forEach((u,h)=>{const b=b_()(c,w=>u.id===w.id);null!=b&&this.promoTournamentsData.push({state:null,tournamentData:b.info.tileData})}),a.body}))}getPromoTournamentInfo(e){return b_()(this.promoTournamentsData,i=>i.tournamentData.poolSettings.id===e)}getTranslations(e,i){const r=b_()(this.promoTournamentsData,s=>s.tournamentData.poolSettings.id===e);return{title:pi.readTranslation(r.tournamentData.tournamentTitle,i),description:pi.readTranslation(r.tournamentData.description,i),prize:pi.readTranslation(r.tournamentData.rewards[0].value,i),text:pi.readTranslation(r.tournamentData.promoText,i)}}clearCache(){this.promoTournamentsData=[]}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Zn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class k6t{constructor(n,o,e,i){this.index=n,this.maxRounds=o,this.room=e,this.gameBoxes=new ie.List,i.forEach(r=>this.gameBoxes.add({round:n,maxRounds:o,room:e,table:r}))}}var L6t=lo.updateModel;class D6t{constructor(){this.updateRoomModel=o=>{this.updateModel(o,this.roomViewModel),o.tables&&o.tables.length&&this.rounds.forEach(e=>{new ie.List(this.roomViewModel.tables).where(r=>r.tournamentRound===e.index).forEach((r,s)=>{e.gameBoxes.get(s).table={...r}})})};const n=this.getInitialState();for(let o in n)o&&(this[o]=n[o])}buildWinnersBoxes(){const n=Object.keys(this.roomViewModel.settings.transactions.placementRewards).length;for(let o=0;o<n;o++)this.winners.add({place:o+1,players:void 0,room:this.roomViewModel,table:void 0})}buildRoundsView(n){for(let o=0;o<this.maxRounds;o++){const e=new ie.List(this.roomViewModel.tables).where(s=>s.tournamentRound===o+1),r=n.getGameCountByRound(o+1)-e.length;for(let s=0;s<r;s++)e.add(void 0);this.rounds.add(new k6t(o+1,this.maxRounds,this.roomViewModel,e))}}updateModel(n,o){o=L6t(n,o)}resetState(){return this.updateState(this.getInitialState()),this}updateState(n){for(let o in n)o&&(this[o]=n[o])}getInitialState(){return{viewReady:!1,winPopup:void 0,containerRoundWidthPercent:void 0,maxGameCount:void 0,maxRounds:void 0,roomViewModel:void 0,winnerBoxHeight:void 0,rounds:new ie.List,winners:new ie.List,currentRoom:void 0,bottomBar:void 0,isObserver:!1}}}class B6t{setText(n){this.text=n}show(){this.isVisible=!0}hide(){this.isVisible=!1}}class N6t{show(n){this.data=n,this.isVisible=!0}hide(){this.isVisible=!1}}function F6t(t,n){if(1&t&&B(0,"avatar",11),2&t){const o=_(),e=o.$implicit,i=o.index,r=_();l("user",e)("isLink",!r.players[i].isBot)}}function U6t(t,n){1&t&&(B(0,"img",12),V(1,"transformUrl")),2&t&&Uf("src",$(1,1,"blitz-tournament/tournament-icon-avatar.svg"),Wn)}function G6t(t,n){if(1&t&&(p(0,"div",8),U(1,F6t,1,2,"avatar",9)(2,U6t,2,3,"ng-template",null,10,ft),m()),2&t){const o=n.$implicit,e=Kt(3);d(),l("ngIf",o)("ngIfElse",e)}}function V6t(t,n){1&t&&(p(0,"p",13),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TOURNAMENTS.BLITZ.TEAM_PRIZE")," "))}function z6t(t,n){1&t&&(p(0,"p",13),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TOURNAMENTS.BLITZ.PRIZE")," "))}const j6t=(t,n)=>({first:t,second:n});let Y0e=(()=>{var t;class n{constructor(e){this.players=[],this.adaptedProfiles=[],this.clientConfigService=e}ngOnChanges(e){this.players=this.players&&this.players.length?this.players:new Array(this.viewModel.room.settings.game.players.perTeam),this.reward=this.viewModel.room.settings.transactions.placementRewards[this.viewModel.place].amount*this.players.length,this.adaptedProfiles=this.players.map(i=>Lo.toPlatformProfile(i.profile))}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["winners-box"]],inputs:{players:"players",viewModel:"viewModel"},features:[it],decls:11,vars:11,consts:[[1,"winners__box-container",3,"ngClass"],[1,"winners-ribbon"],[1,"winners-ribbon-container"],[1,"winners-avatars"],["class","winner_box-team-player",4,"ngFor","ngForOf","ngForTrackBy"],[1,"winners-prize"],["class","winners-prize-text",4,"ngIf"],[1,"winners-prize-chips"],[1,"winner_box-team-player"],[3,"user","isLink",4,"ngIf","ngIfElse"],["default",""],[3,"user","isLink"],[1,"player-avatar-image",3,"src"],[1,"winners-prize-text"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"div",2),m(),p(3,"div",3),U(4,G6t,4,2,"div",4),m(),p(5,"div",5),U(6,V6t,3,3,"p",6)(7,z6t,3,3,"p",6),p(8,"p",7),H(9),V(10,"formatNumber"),m()()()),2&e&&(l("ngClass",cn(8,j6t,1===i.viewModel.place,2===i.viewModel.place)),d(4),l("ngForOf",i.adaptedProfiles)("ngForTrackBy",i.trackByFn),d(2),l("ngIf",i.adaptedProfiles.length>1),d(),l("ngIf",1===i.adaptedProfiles.length),d(2),ze(" ",$(10,6,i.reward)," "))},dependencies:[Xe,Mt,Ne,Bo,qe,Go,uo],styles:[".winners__box-container[_ngcontent-%COMP%]{width:100%;height:100%;padding:.3rem;max-height:20rem;justify-content:center;align-items:center;display:flex;flex-flow:column nowrap}.winners-ribbon[_ngcontent-%COMP%]{position:relative;width:100%;height:3rem}.winners-ribbon-container[_ngcontent-%COMP%]{position:absolute;width:100%;height:350%;bottom:1rem;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 980px){.winners-ribbon-container[_ngcontent-%COMP%]{bottom:0}}.winner_box-team-player[_ngcontent-%COMP%]{width:calc(50% - 2rem);margin:1rem;height:auto;position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden}.winner_box-team-player[_ngcontent-%COMP%] > avatar[_ngcontent-%COMP%]{border-radius:.3rem;cursor:pointer}.player-avatar-image[_ngcontent-%COMP%]{width:100%;padding-top:.1rem}.winners__box-img[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:100%}@media only screen and (max-width: 980px){.winners__box-img[_ngcontent-%COMP%]{width:auto;max-width:30rem}}.winners__box-img.players-8[_ngcontent-%COMP%]{width:75%}.ribbon-text[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin-top:2rem;text-transform:uppercase}@media only screen and (max-width: 1280px){.ribbon-text[_ngcontent-%COMP%]{margin-top:1.6rem}}@media only screen and (max-width: 980px){.ribbon-text[_ngcontent-%COMP%]{margin-top:2.3rem!important}}@media only screen and (max-width: 480px){.ribbon-text[_ngcontent-%COMP%]{margin-top:1.8rem!important}}.ribbon-text.players-16[_ngcontent-%COMP%]{margin-top:1.7rem}@media only screen and (max-width: 1280px){.ribbon-text.players-16[_ngcontent-%COMP%]{margin-top:1.3rem}}.ribbon-text.players-32[_ngcontent-%COMP%]{margin-top:1.2rem;font-size:1rem}@media only screen and (max-width: 1280px){.ribbon-text.players-32[_ngcontent-%COMP%]{margin-top:1rem}}.ribbon-text.players-64[_ngcontent-%COMP%]{margin-top:1rem;font-size:1rem}@media only screen and (max-width: 1280px){.ribbon-text.players-64[_ngcontent-%COMP%]{margin-top:.9rem}}.winners-prize[_ngcontent-%COMP%]{width:100%;height:calc(25% - 2rem);display:flex;flex-flow:row wrap;justify-content:center;align-items:center}@media only screen and (max-width: 980px){.winners-prize[_ngcontent-%COMP%]{height:auto!important}}.winners-prize-text[_ngcontent-%COMP%]{font-size:1.4rem;text-transform:uppercase;margin-right:.5rem}.winners-prize-chips[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:1.4rem;text-transform:uppercase}.winners-footer[_ngcontent-%COMP%]{width:100%;height:3rem;display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 1280px){.winners-footer[_ngcontent-%COMP%]{font-size:1.2rem}}.winners-avatars[_ngcontent-%COMP%]{width:100%;max-width:24rem;position:relative;display:flex;flex-flow:row wrap;justify-content:center;align-items:center}"]}),n})();function H6t(t,n){1&t&&B(0,"div",6)}function q6t(t,n){if(1&t&&B(0,"avatar",7),2&t){const o=_();l("user",o.profile)("hasUsername",!1)("isLink",!1===o.user.isBot)}}function W6t(t,n){1&t&&(B(0,"img",8),V(1,"transformUrl")),2&t&&Uf("src",$(1,1,"blitz-tournament/tournament-icon-avatar.svg"),Wn)}const $6t=(t,n)=>({"result-won":t,"result-lost":n});function K6t(t,n){if(1&t&&(p(0,"div",9),H(1),m()),2&t){const o=_();l("ngClass",cn(2,$6t,o.winner,o.loser)),d(),se(o.result)}}function Z6t(t,n){1&t&&(p(0,"div",10),B(1,"img",11),V(2,"transformUrl"),m()),2&t&&(d(),Uf("src",$(2,1,"blitz-tournament/star.png"),Wn))}let J0e=(()=>{var t;class n{constructor(e){this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){e.user&&e.user.currentValue&&(this.profile=Lo.toPlatformProfile(this.user.profile)),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["blitz-lobby-avatar"]],inputs:{user:"user",loser:"loser",winner:"winner",result:"result"},features:[it],decls:7,vars:5,consts:[[1,"team-player"],["class","lost-cover",4,"ngIf"],[3,"user","hasUsername","isLink",4,"ngIf","ngIfElse"],["default",""],["class","avatar__result",3,"ngClass",4,"ngIf"],["class","won-star",4,"ngIf"],[1,"lost-cover"],[3,"user","hasUsername","isLink"],[1,"player-default-image",3,"src"],[1,"avatar__result",3,"ngClass"],[1,"won-star"],[1,"avatar-won-star",3,"src"]],template:function(e,i){if(1&e&&(p(0,"div",0),U(1,H6t,1,0,"div",1)(2,q6t,1,3,"avatar",2)(3,W6t,2,3,"ng-template",null,3,ft)(5,K6t,2,5,"div",4),m(),U(6,Z6t,3,3,"div",5)),2&e){const r=Kt(4);d(),l("ngIf",i.loser),d(),l("ngIf",null!=i.user)("ngIfElse",r),d(3),l("ngIf",null!=i.result),d(),l("ngIf",i.winner)}},dependencies:[Xe,Ne,Bo,uo],styles:[".team-player[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center;overflow:hidden}.team-player[_ngcontent-%COMP%] > avatar[_ngcontent-%COMP%]{cursor:pointer}.player-default-image[_ngcontent-%COMP%]{width:100%;padding-top:.1rem}.lost-cover[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;z-index:2;pointer-events:none}.won-star[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;z-index:4;display:flex;justify-content:center;align-items:center;pointer-events:none}.avatar-won-star[_ngcontent-%COMP%]{position:absolute;top:-1rem;right:-1rem}.avatar__result[_ngcontent-%COMP%]{width:100%;position:absolute;bottom:-2.75rem;display:flex;justify-content:center;align-items:center}.team-player[_ngcontent-%COMP%]{width:98%!important;margin:0 1%}"],changeDetection:0}),n})();function Q6t(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TOURNAMENTS.BLITZ.FINAL")))}function Y6t(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TOURNAMENTS.BLITZ.SEMI_FINAL")))}const _D=(t,n)=>({won:t,lost:n});function J6t(t,n){if(1&t&&(p(0,"div",14)(1,"span"),H(2),V(3,"formatNumber"),m()()),2&t){const o=_().$implicit,e=_();l("ngClass",cn(4,_D,e.isPlayerWinner(e.table,o.profile.id)&&e.table.state===e.tableStatesEnum.Ended,!e.isPlayerWinner(e.table,o.profile.id)&&e.table.state===e.tableStatesEnum.Ended)),d(2),se($(3,2,e.table.gameResult.gameStats?e.table.gameResult.gameStats.playerPoints[o.profile.id]:0))}}const X6t=t=>({"game-box__avatar-big":t});function e8t(t,n){if(1&t&&(p(0,"div",12),B(1,"blitz-lobby-avatar",13),U(2,J6t,4,7,"div",8),m()),2&t){const o=n.$implicit,e=_();l("ngClass",ne(5,X6t,e.rightSide.players.length>2)),d(),l("user",o?o.profile:void 0)("loser",o&&e.table.state===e.tableStatesEnum.Ended&&!1===e.isPlayerWinner(e.table,o.profile.id))("winner",o&&e.table.state===e.tableStatesEnum.Ended&&!0===e.isPlayerWinner(e.table,o.profile.id)),d(),l("ngIf",e.table&&(e.table.state===e.tableStatesEnum.Gameplay||e.table.state===e.tableStatesEnum.Ended)&&e.freeForAll)}}function t8t(t,n){if(1&t&&(p(0,"div",14)(1,"span"),H(2),V(3,"formatNumber"),m()()),2&t){const o=_();l("ngClass",cn(4,_D,o.isTeamWinner(o.table,o.table.gameInfo.teams[0])&&o.table.state===o.tableStatesEnum.Ended,!o.isTeamWinner(o.table,o.table.gameInfo.teams[0])&&o.table.state===o.tableStatesEnum.Ended)),d(2),se($(3,2,o.leftSide.score))}}const n8t=t=>({final:t});function i8t(t,n){if(1&t&&(p(0,"div",15)(1,"p"),H(2,"VS"),m()()),2&t){const o=_();l("ngClass",ne(1,n8t,o.viewModel.round===o.viewModel.maxRounds))}}function o8t(t,n){if(1&t&&(p(0,"div",14)(1,"span"),H(2),V(3,"formatNumber"),m()()),2&t){const o=_().$implicit,e=_();l("ngClass",cn(4,_D,e.isPlayerWinner(e.table,o.profile.id)&&e.table.state===e.tableStatesEnum.Ended,!e.isPlayerWinner(e.table,o.profile.id)&&e.table.state===e.tableStatesEnum.Ended)),d(2),se($(3,2,e.table.gameResult.gameStats?e.table.gameResult.gameStats.playerPoints[o.profile.id]:0))}}const r8t=t=>({"game-box__avatar-small":t});function s8t(t,n){if(1&t&&(p(0,"div",12),B(1,"blitz-lobby-avatar",13),U(2,o8t,4,7,"div",8),m()),2&t){const o=n.$implicit,e=_();l("ngClass",ne(5,r8t,e.rightSide.players.length>2)),d(),l("user",o?o.profile:void 0)("loser",o&&e.table.state===e.tableStatesEnum.Ended&&!1===e.isPlayerWinner(e.table,o.profile.id))("winner",o&&e.table.state===e.tableStatesEnum.Ended&&!0===e.isPlayerWinner(e.table,o.profile.id)),d(),l("ngIf",e.table&&(e.table.state===e.tableStatesEnum.Gameplay||e.table.state===e.tableStatesEnum.Ended)&&e.freeForAll)}}function a8t(t,n){if(1&t&&(p(0,"div",14)(1,"span"),H(2),V(3,"formatNumber"),m()()),2&t){const o=_();l("ngClass",cn(4,_D,o.isTeamWinner(o.table,o.table.gameInfo.teams[1])&&o.table.state===o.tableStatesEnum.Ended,!o.isTeamWinner(o.table,o.table.gameInfo.teams[1])&&o.table.state===o.tableStatesEnum.Ended)),d(2),se($(3,2,o.rightSide.score))}}const c8t=(t,n)=>({final:t,"semi-final":n}),l8t=t=>({"game-box__avatar-container-shortened":t}),u8t=t=>({"game-box__avatar-container-lengthened":t});let X0e=(()=>{var t;class n{constructor(e){this.tableStatesEnum=Ve.ETableState,this.translationKeys={},this.translationKeys[Ve.ETableState.Ended]="TOURNAMENTS.BLITZ.GAME_STATES.GAME_ENDED",this.translationKeys[Ve.ETableState.Gameplay]="TOURNAMENTS.BLITZ.GAME_STATES.GAME_IN_PROGRESS",this.translationKeys[Ve.ETableState.Ready]="TOURNAMENTS.BLITZ.GAME_STATES.GAME_READY_TO_LOAD",this.translationKeys[Ve.ETableState.Waiting]="TOURNAMENTS.BLITZ.GAME_STATES.GAME_READY_TO_START",this.currentPlayerId=e.selectUserState().profile.id}ngOnInit(){this.buildView(),this.table&&this.onTableUpdate(this.table)}ngOnChanges(e){e.table&&!e.table.isFirstChange()&&e.table.currentValue&&this.onTableUpdate(e.table.currentValue)}isPlayerWinner(e,i){return-1!==e.gameResult.winners.indexOf(i)}isTeamWinner(e,i){return-1!==e.gameResult.winners.indexOf(i[0])}getGameStateKey(e){return void 0===e?"TOURNAMENTS.BLITZ.GAME_STATES.NOT_STARTED":this.translationKeys[e.state]}showPlayerResult(e){return!0===this.freeForAll&&void 0!==e&&e.state===Ve.ETableState.Ended}buildView(){const e=this.viewModel.room.settings.game.players.count,i=this.viewModel.room.settings.game.players.perTeam;this.freeForAll=1===i&&e>2,!0===this.freeForAll?(this.leftSide={players:new Array(1),score:0},this.rightSide={players:new Array(e-1),score:0}):(this.leftSide={players:new Array(i),score:0},this.rightSide={players:new Array(i),score:0})}getPlayerFromSeat(e){return void 0!==e.player?e.player:e.reserved}onTableUpdate(e){if(this.freeForAll){const i=this.table.seats.find(s=>this.currentPlayerId===this.getPlayerFromSeat(s).id),r=i?this.getPlayerFromSeat(i):void 0;this.leftSide.players=[{profile:r||this.getPlayerFromSeat(this.table.seats[0]),score:0}],this.rightSide.players=[],this.table.seats.filter(s=>this.leftSide.players[0].profile.id!==this.getPlayerFromSeat(s).id).map(s=>this.getPlayerFromSeat(s)).forEach(s=>{this.rightSide.players.push({profile:s,score:0})})}else{const i=this.viewModel.room.settings.game.players.perTeam,r=e.seats.map(s=>this.getPlayerFromSeat(s));this.leftSide.players=[],r.slice(0,i).forEach(s=>{this.leftSide.players.push({profile:s,score:0})}),this.rightSide.players=[],r.slice(i).forEach(s=>{this.rightSide.players.push({profile:s,score:0})})}e.gameResult&&e.gameResult.gameStats&&e.gameResult.gameStats.playerPoints&&(this.updatePlayersScore(this.leftSide.players,e.gameResult.gameStats.playerPoints),this.updatePlayersScore(this.rightSide.players,e.gameResult.gameStats.playerPoints),this.leftSide.score=this.calculateTeamScore(this.leftSide.players),this.rightSide.score=this.calculateTeamScore(this.rightSide.players))}updatePlayersScore(e,i){e.forEach(r=>r.score=i[r.profile.id])}calculateTeamScore(e){return e[0].score}trackByFn(e,i){return i?i.profile.id:e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J))},t.\u0275cmp=pe({type:t,selectors:[["game-box"]],inputs:{viewModel:"viewModel",table:"table"},features:[it],decls:18,vars:22,consts:[[1,"game-box__container--box",3,"ngClass"],[1,"box-title"],[1,"game-box__container--separator-left"],[4,"ngIf"],[1,"game-box__container--separator-right"],[1,"box-content"],[1,"game__box-team-container",3,"ngClass"],["class","game__avatar__container",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","player_result",3,"ngClass",4,"ngIf"],["class","versus-icon",3,"ngClass",4,"ngIf"],[1,"box-footer"],[1,"box-footer-text"],[1,"game__avatar__container",3,"ngClass"],[1,"game-box__avatar",3,"user","loser","winner"],[1,"player_result",3,"ngClass"],[1,"versus-icon",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"div",2),U(3,Q6t,3,3,"p",3)(4,Y6t,3,3,"p",3),B(5,"div",4),m(),p(6,"div",5)(7,"div",6),U(8,e8t,3,7,"div",7)(9,t8t,4,7,"div",8),m(),U(10,i8t,3,3,"div",9),p(11,"div",6),U(12,s8t,3,7,"div",7)(13,a8t,4,7,"div",8),m()(),p(14,"div",10)(15,"div",11),H(16),V(17,"translate"),m()()()),2&e&&(l("ngClass",cn(15,c8t,i.viewModel.round===i.viewModel.maxRounds,i.viewModel.round===i.viewModel.maxRounds-1)),d(3),l("ngIf",i.viewModel.round===i.viewModel.maxRounds),d(),l("ngIf",i.viewModel.round===i.viewModel.maxRounds-1),d(3),l("ngClass",ne(18,l8t,i.rightSide.players.length>2)),d(),l("ngForOf",i.leftSide.players)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.table&&(i.table.state===i.tableStatesEnum.Gameplay||i.table.state===i.tableStatesEnum.Ended)&&!i.freeForAll),d(),l("ngIf",!i.freeForAll),d(),l("ngClass",ne(20,u8t,i.rightSide.players.length>2)),d(),l("ngForOf",i.rightSide.players)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.table&&(i.table.state===i.tableStatesEnum.Gameplay||i.table.state===i.tableStatesEnum.Ended)&&!i.freeForAll),d(3),ze(" ",$(17,13,i.getGameStateKey(i.table))," "))},dependencies:[Xe,Mt,Ne,J0e,qe,Go],styles:[".game-box__container--box[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column nowrap;padding:.3rem}.game-box__container--box[_ngcontent-%COMP%]:not(.final, .semi-final)[_ngcontent-%COMP%]   .box-content[_ngcontent-%COMP%]{margin-top:2rem}@media only screen and (max-width: 980px){.game-box__container--box.final[_ngcontent-%COMP%]{padding:0 3rem}}@media only screen and (max-width: 768px){.game-box__container--box[_ngcontent-%COMP%]{width:90%}.game-box__container--box.final[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 480px){.game-box__container--box.final[_ngcontent-%COMP%]{padding:.3rem}}.game-box__container--box.final[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%], .game-box__container--box.semi-final[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]{display:flex}.game-box__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]{order:1;width:calc(100% - 1rem);height:3rem;margin:.5rem;justify-content:center;align-items:center;display:none}@media only screen and (max-width: 768px) and (orientation: landscape){.game-box__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]{height:1rem}}.game-box__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{order:2;font-size:1.8rem;text-transform:uppercase}.game-box__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]   .game-box__container--separator-left[_ngcontent-%COMP%]{order:1;flex:1}.game-box__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]   .game-box__container--separator-right[_ngcontent-%COMP%]{order:3;flex:1}.game-box__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]   .game-box__container--separator-left[_ngcontent-%COMP%], .game-box__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]   .game-box__container--separator-right[_ngcontent-%COMP%]{position:relative}.game-box__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%]{order:2;width:calc(100% - 1rem);margin:.5rem;display:flex;flex-flow:row wrap}.game-box__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%] > .versus-icon[_ngcontent-%COMP%]{position:relative;width:10%;display:flex;justify-content:center;align-items:center}.game-box__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%] > .versus-icon[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-weight:900}@media only screen and (max-width: 980px){.game-box__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%] > .versus-icon[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem}}@media only screen and (max-width: 480px){.game-box__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%] > .versus-icon[_ngcontent-%COMP%]:not(.final) > p[_ngcontent-%COMP%]{font-size:1.4rem}}.game-box__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%]{order:3;width:calc(100% - 1rem);height:2rem;margin:.5rem .5rem .2rem;display:flex;flex-flow:row wrap;justify-content:space-evenly}.game-box__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .result-team-one[_ngcontent-%COMP%]{height:100%;display:flex;justify-content:center;align-items:center}.game-box__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .box-footer-text[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;padding:0 1rem;height:100%;display:flex;justify-content:center;align-items:center;text-transform:uppercase}@media only screen and (max-width: 1280px){.game-box__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .box-footer-text[_ngcontent-%COMP%]{font-size:1.2rem}}.game-box__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .box-footer-text.no-score[_ngcontent-%COMP%]{width:100%}.game-box__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .result-team-two[_ngcontent-%COMP%]{height:100%;display:flex;justify-content:center;align-items:center}.lost-cover[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;z-index:2;pointer-events:none}.game__box-team-container[_ngcontent-%COMP%]{position:relative;width:45%;display:flex;flex-flow:row wrap;justify-content:center;align-items:center}.game-box__avatar-container-lengthened[_ngcontent-%COMP%]{width:75%}.game-box__avatar-container-shortened[_ngcontent-%COMP%]{width:25%}.game-box__avatar[_ngcontent-%COMP%]{width:100%;position:relative}.game-box__avatar-big[_ngcontent-%COMP%]{width:100%!important}.game-box__avatar-small[_ngcontent-%COMP%]{width:33.3%!important}.game__avatar__container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:50%;align-items:center}"]}),n})();var d8t=ve.EButtonModifier;const p8t=t=>({"sprite-animation":!0,"first-place":t}),h8t=t=>({first:t});function m8t(t,n){if(1&t){const o=Ce();p(0,"div",3),B(1,"div",4),p(2,"div",5),B(3,"div",6),m(),p(4,"p",7)(5,"span"),H(6),V(7,"translate"),m()(),p(8,"p",8)(9,"span"),H(10),V(11,"formatNumber"),m()(),p(12,"div",9)(13,"button-text",10),Y("onClick",function(){return oe(o),re(_().onButtonClick())}),H(14),V(15,"translate"),m()()()}if(2&t){const o=_();d(),l("ngClass",ne(12,p8t,1===o.state.data.place)),d(2),l("ngClass",ne(14,h8t,1===o.state.data.place)),d(3),ze(" ",$(7,6,"TOURNAMENTS.BLITZ.PRIZE")," "),d(4),se($(11,8,o.state.data.reward)),d(3),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),se($(15,10,"TOURNAMENTS.BLITZ.CLAIM_BUTTON"))}}const f8t=t=>({key:t});let e1e=(()=>{var t;class n{constructor(e,i,r){this.popupTitleTypes=li,this.buttonModifier=d8t,this.titleBarText="",this.clientConfigService=r,this.claimPrize=new ke,this.popupContainerOptions={styleProperties:{maxWidth:"50rem",maxHeight:"42rem"}},this.state={isVisible:!1,data:void 0},this.sounds=e,i.detach(),this.cdr=i}ngOnChanges(e){this.updateState({data:void 0!==e.data?e.data.currentValue:this.state.data,isVisible:e.isVisible&&void 0!==e.isVisible.currentValue?e.isVisible.currentValue:this.state.isVisible})}onButtonClick(){this.claimPrize.emit()}show(e){this.sounds.play(dn.TournamentWon),this.updateState({data:e,isVisible:!0})}hide(){this.updateState({isVisible:!1})}updateState(e){for(const i in this.state)i&&(this.state[i]=e[i]);e.data&&(this.titleBarText=1===e.data.place?"TOURNAMENTS.BLITZ.WINNER_1ST_PLACE":"TOURNAMENTS.BLITZ.WINNER_2ND_PLACE"),this.updateView()}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mo),g(Re),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["blitz-tournament-won-popup"]],inputs:{data:"data",isVisible:"isVisible"},outputs:{claimPrize:"claimPrize"},features:[it],decls:3,vars:8,consts:[[3,"popupContainerOpened","popupContainerOptions"],[3,"popupTitleType","hideCloseButton","text"],["class","won-popup__container--content",4,"ngIf"],[1,"won-popup__container--content"],[1,"won-image",3,"ngClass"],[1,"won-popup-image__new-design"],[1,"won-popup-image__new-design--img",3,"ngClass"],[1,"won-popup__text"],[1,"won-popup__prize--amount"],[1,"won-popup__container--button"],[1,"won-popup__button--ok",3,"buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"popup-container",0),B(1,"popup-title-bar",1),U(2,m8t,16,16,"div",2),m()),2&e&&(l("popupContainerOpened",i.state.isVisible)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Static)("hideCloseButton",!0)("text",ne(6,f8t,i.titleBarText)),d(),l("ngIf",i.state.data))},dependencies:[Xe,Ne,pn,Ji,Wi,qe,Go],styles:[".won-popup__container--button[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;margin:3rem 1rem 1rem}@media screen and (max-height: 320px){.won-popup__container--button[_ngcontent-%COMP%]{margin-bottom:2rem}}.won-popup__button--ok[_ngcontent-%COMP%]{margin:0;min-width:20rem}@media only screen and (max-width: 768px){.won-popup__button--ok[_ngcontent-%COMP%]{padding:0 1rem!important}}.won-popup__container--content[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;width:100%;height:calc(100% - 6rem);border-radius:0 0 .4rem .4rem;padding:1.5rem;transform:translateZ(0);display:flex;flex-flow:column nowrap;align-items:center;overflow-y:auto;overflow-x:hidden}.won-popup__prize--amount[_ngcontent-%COMP%]{text-align:center}.won-popup__prize--amount[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:3rem}.won-popup__container--content-image[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-flow:column nowrap}@media screen and (max-width: 768px){.won-popup__container--content-image[_ngcontent-%COMP%]{max-height:60%}}@media screen and (orientation: landscape) and (max-height: 480px){.won-popup__container--content-image[_ngcontent-%COMP%]{max-height:55%}}.won-popup__text[_ngcontent-%COMP%]{font-size:2.4rem;text-align:center;width:90%;margin:2rem 1rem;line-height:1}@media screen and (max-width: 768px){.won-popup__text[_ngcontent-%COMP%]{font-size:1.8rem}}@media screen and (max-height: 320px){.won-popup__text[_ngcontent-%COMP%]{margin:1rem}}"],changeDetection:0}),n})();function g8t(t,n){if(1&t&&(p(0,"div",1),B(1,"img",2),V(2,"transformUrl"),p(3,"p",3),H(4),V(5,"translate"),m()()),2&t){const o=_();d(),l("src",$(2,2,"blitz-tournament/tournament-icon-club.svg"),Wn),d(3),se($(5,4,o.state.text))}}let t1e=(()=>{var t;class n{constructor(e){this.cdr=e,e.detach(),this.state={text:void 0,isVisible:!1}}ngOnChanges(e){this.updateState({text:e.text&&e.text.currentValue?e.text.currentValue:this.state.text,isVisible:e.isVisible&&void 0!==e.isVisible.currentValue?e.isVisible.currentValue:this.state.isVisible})}setText(e){this.updateState({text:e})}show(){this.updateState({isVisible:!0})}hide(){this.updateState({isVisible:!1})}updateState(e){for(const i in this.state)i&&(this.state[i]=e[i]);this.updateView()}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["tournament-status-bar"]],inputs:{text:"text",isVisible:"isVisible"},features:[it],decls:1,vars:1,consts:[["class","blitz-tournament__container--loader show",4,"ngIf"],[1,"blitz-tournament__container--loader","show"],[1,"loader-image",3,"src"],[1,"loader-text"]],template:function(e,i){1&e&&U(0,g8t,6,6,"div",0),2&e&&l("ngIf",i.state.isVisible)},dependencies:[Ne,qe,uo],styles:[".blitz-tournament__container--loader[_ngcontent-%COMP%]{position:absolute;width:90%;height:8rem;bottom:-8rem;z-index:4;margin:0 5%;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}.blitz-tournament__container--loader.show[_ngcontent-%COMP%]{bottom:0}.blitz-tournament__container--loader[_ngcontent-%COMP%] > .loader-text[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:300;margin:0 1rem;text-transform:uppercase;max-width:65%;text-align:center}@media only screen and (max-width: 480px){.blitz-tournament__container--loader[_ngcontent-%COMP%] > .loader-text[_ngcontent-%COMP%]{font-size:1.4rem}}.blitz-tournament__container--loader[_ngcontent-%COMP%] > .loader-image[_ngcontent-%COMP%]{width:auto;height:50%;margin:0 1rem}@media only screen and (max-width: 480px){.blitz-tournament__container--loader[_ngcontent-%COMP%] > .loader-image[_ngcontent-%COMP%]{height:40%;margin:0 .5rem}}.blitz-tournament__loader--animation[_ngcontent-%COMP%], .blitz-tournament__container--loader[_ngcontent-%COMP%] > .loader-image[_ngcontent-%COMP%]{animation-name:rotateYAnimation;animation-duration:.7s;animation-timing-function:linear;animation-iteration-count:infinite;animation-fill-mode:forwards}"],changeDetection:0}),n})();function _8t(t,n){1&t&&(p(0,"div",18),B(1,"div",9),m())}function v8t(t,n){if(1&t&&(p(0,"div",19),B(1,"div",9),m()),2&t){const o=_(2),e=o.index,i=o.$implicit;go("height",100-100/(_(2).rounds.get(e-1).gameBoxes.length/i.gameBoxes.length)+"%")}}const b8t=t=>({final:t});function C8t(t,n){if(1&t&&(p(0,"div",13),U(1,_8t,2,0,"div",14)(2,v8t,2,2,"div",15),B(3,"game-box",16),p(4,"div",17),B(5,"div",9),m()()),2&t){const o=n.$implicit,e=_(),i=e.$implicit,r=e.first,s=e.index,a=_(2);go("height",(100/i.gameBoxes.length).toString()+"%"),d(),l("ngIf",!0===r),d(),l("ngIf",!1===r),d(),l("viewModel",o)("table",o.table),d(),l("ngClass",ne(7,b8t,s===a.maxRounds-1&&a.winners.length>1))}}const y8t=(t,n)=>({final:t,"semi-final":n}),S8t=(t,n,o)=>({final:t,"semi-final":n,lastRound:o});function w8t(t,n){if(1&t&&(p(0,"div",10),U(1,C8t,6,9,"div",11),p(2,"div",12),B(3,"div",9),m()()),2&t){const o=n.$implicit,e=n.index,i=_(2);go("width",i.containerRoundWidthPercent),l("ngClass",cn(6,y8t,e===i.maxRounds-1,e===i.maxRounds-2)),d(),l("ngForOf",o.gameBoxes)("ngForTrackBy",i.trackByFn),d(),l("ngClass",_a(9,S8t,e===i.maxRounds-1,e===i.maxRounds-2,e===i.maxRounds-4))}}function T8t(t,n){if(1&t&&(p(0,"div",20)(1,"div",21),B(2,"div",9),m(),B(3,"winners-box",22),p(4,"div",23),B(5,"div",9),m()()),2&t){const o=n.$implicit;go("height",_(2).winnerBoxHeight),d(3),l("viewModel",o)("players",o.players)}}const P8t=(t,n,o)=>({"players-32":t,"players-64":n,"players-128":o}),I8t=t=>({"loader-shown":t});function M8t(t,n){if(1&t&&(p(0,"div",4),U(1,w8t,4,13,"div",5),p(2,"div",6),U(3,T8t,6,4,"div",7),p(4,"div",8),B(5,"div",9),m()()()),2&t){const o=_();l("ngClass",_a(8,P8t,o.maxGameCount>=8,o.maxGameCount>=16,o.maxGameCount>=32)),d(),l("ngForOf",o.rounds)("ngForTrackBy",o.trackByFn),d(),go("width",o.containerRoundWidthPercent),l("ngClass",ne(12,I8t,!1===o.bottomBar.isVisible)),d(),l("ngForOf",o.winners)("ngForTrackBy",o.trackByFn)}}let M7=(()=>{var t;class n extends D6t{constructor(e,i,r,s,a,c,u,h){super(),this.navBarContent={type:Ru.EContent.Text,data:{key:"TOURNAMENTS.ROYAL-8"}},this.onRoomFinalized=()=>{this.finalizedListener&&this.finalizedListener.detach();const b=new ie.UniqueList(this.roomViewModel.tables),w=this.roundsCalculator.maxRounds(),R=b.find(te=>te.tournamentRound===w&&te.state===Ve.ETableState.Ended&&void 0!==te.seats.find(ee=>ee.player.id===this.currentPlayerId)),G=Object.keys(this.roomViewModel.settings.transactions.placementRewards).length;if(R){const te=-1!==R.gameResult.winners.indexOf(this.currentPlayerId);if(te||G>1){const ee=te?1:2;this.onTournamentWon(ee,this.roomViewModel.settings.transactions.placementRewards[ee].amount)}else this.onTournamentLost()}const K=new ie.List(this.roomViewModel.tables).last();this.winners.first().players=K.seats.filter(te=>-1!==K.gameResult.winners.indexOf(te.player.id)).map(te=>te.player),G>1&&(this.winners.get(1).players=K.seats.filter(te=>-1!==K.gameResult.losers.indexOf(te.player.id)).map(te=>te.player)),this.bottomBar.hide()},this.onMyTableUpdate=b=>{this.bottomBar.show();const w=new ie.UniqueList(this.currentRoom.getViewModel().tables).findById(b.id);w&&this.updateModel(b,w),b.state!==Ve.ETableState.Ended?(this.bottomBar.setText("TOURNAMENTS.BLITZ.ROOM_STATES.ROUND_READY"),clearTimeout(this.textChangeTimerId),this.textChangeTimerId=setTimeout(()=>{this.bottomBar.setText("TOURNAMENTS.BLITZ.GAME_STATES.GAME_READY_TO_LOAD")},sR.blitzLobbyNavigationDelayMs/2)):b.gameResult&&b.gameResult.losers&&-1!==b.gameResult.losers.indexOf(this.currentPlayerId)&&this.onTournamentLost()},this.onTournamentWon=(b,w)=>{this.winPopup.show({place:b,reward:w}),this.bottomBar.hide()},this.onTournamentLost=()=>{this.isObserver=!0,this.bottomBar.hide(),this.infoPopupId=this.popup.show("TOURNAMENTS.BLITZ.ELIMINATED")},this.onGuardsCheckEnd=b=>{!1===b.shouldActivate&&this.navigation.url===this.roomPages.createRoomPage(Jt.RoomType.BlitzTournament,this.roomViewModel.settings.game.name,this.roomViewModel)&&!this.currentRoom&&(console.log("User is at the blitz lobby after route guard reject. Leave to lobby!"),this.navigation.navigateByUrl(this.constants.defaultLoggedRoute))},this.navigation=a,this.bottomBar=new B6t,this.winPopup=new N6t,this.toaster=i,this.popup=r,this.playClient=e.getPlayClient(c.getCurrentGameState().id),this.currentPlayerId=s.selectUserState().profile.id,this.winners=new ie.List,this.routerSubscription=this.navigation.events.pipe(bt(b=>b instanceof sU)).subscribe(this.onGuardsCheckEnd),this.listeners=new ie.List,this.constants=u,this.roomPages=h}ngOnInit(){this.currentRoom=this.playClient.activeClientModel.currentRoom;const e=this.currentRoom.getViewModel().settings;this.roundsCalculator=new Ve.TournamentRoundsCalculator(e.players.count,e.game.players.perTeam,e.game.players.count,e.players.qualifyingSpots),this.updateState({viewReady:!0,roomViewModel:this.currentRoom.getViewModel(),maxGameCount:this.roundsCalculator.getInitialGameCount(),maxRounds:this.roundsCalculator.maxRounds(),winnerBoxHeight:"".concat(100/Object.keys(e.transactions.placementRewards).length,"%"),containerRoundWidthPercent:"".concat(100/(this.roundsCalculator.maxRounds()+1),"%")}),this.buildRoundsView(this.roundsCalculator),this.buildWinnersBoxes(),this.addListenerToList(this.currentRoom.onUpdate(this.updateRoomModel)),this.addListenerToList(this.currentRoom.onMyTableUpdate(this.onMyTableUpdate)),this.addListenerToList(this.currentRoom.onDispose(i=>{i.data.reason===io.RoomNoActivePlayers&&this.popup.show("CUSTOM_GAMES.ROOM_DESTROYED")})),this.bottomBar.show(),this.isPlayerEliminated(this.roomViewModel.tables,this.currentPlayerId)&&this.onTournamentLost(),this.currentRoom.currentTable?this.onMyTableUpdate(this.currentRoom.currentTable.getViewModel()):this.bottomBar.setText("TOURNAMENTS.BLITZ.ROOM_STATES.IN_PROGRESS"),this.currentRoom.state.current.stateName===Ve.ERoomState.Finalize?this.onRoomFinalized():(this.finalizedListener=this.currentRoom.state.onEnter(Ve.ERoomState.Finalize,this.onRoomFinalized),this.addListenerToList(this.finalizedListener))}ngOnDestroy(){this.routerSubscription&&this.routerSubscription.unsubscribe(),this.popup.hide(this.infoPopupId),clearTimeout(this.textChangeTimerId),this.listeners.forEach(e=>e.detach())}isPlayerEliminated(e,i){return void 0!==new ie.UniqueList(e).find(r=>r.tournamentRound!==this.maxRounds&&r.gameResult&&void 0!==r.gameResult.losers.find(s=>s===i))}addListenerToList(e){this.listeners.add(e)}collectPrize(){this.winPopup.hide()}leaveRoom(){var e=this;return f(function*(){const i=function(){var s=f(function*(){try{const a=e.currentRoom;yield a.leave(),e.roomLeft=!0,a.returnPlayerToLobby()}catch(a){a instanceof et.StateError?e.toaster.warn("PLEASE_WAIT"):a instanceof lt.NetworkError?e.toaster.error("ERRORS.CONNECTION_ERROR"):e.toaster.warn("ERRORS.SOMETHING_WRONG"),console.error("Caught error",a)}});return function(){return s.apply(this,arguments)}}();e.closeLeavePopup(),e.leavePopupId=e.askLeaveConfirmation(i,()=>{e.closeLeavePopup()})})()}closeLeavePopup(){this.popup.hide(this.leavePopupId)}askLeaveConfirmation(e,i){return this.popup.confirm({buttons:{action:e,actionDecline:i},textParams:{translationKey:this.isObserver||this.currentRoom.state.current.stateName===Ve.ERoomState.Finalize?"TOURNAMENTS.LEAVE_WARNING":"TOURNAMENTS.LEAVE"}})}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oo),g(Dt),g(Cn),g(J),g(Yt),g(Zn),g(tn),g(Xf))},t.\u0275cmp=pe({type:t,selectors:[["blitz-tournament"]],features:[mn([{provide:nn,useFactory:o=>new nn("promoTournaments",o),deps:[[new jo,new zo,nn]]}]),Ht],decls:4,vars:5,consts:[[1,"blitz-tournament__wrapper"],["class","blitz-tournament__container--content",3,"ngClass",4,"ngIf"],[3,"data","isVisible","claimPrize"],[3,"text","isVisible"],[1,"blitz-tournament__container--content",3,"ngClass"],["class","blitz-tournament__container--round",3,"width","ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"blitz-tournament__container--round","winners",3,"ngClass"],["class","blitz-tournament__container--round-row winners",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"blitz-tournament__container--round-bottom-line","winners"],[1,"line-box"],[1,"blitz-tournament__container--round",3,"ngClass"],["class","blitz-tournament__container--round-row",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"blitz-tournament__container--round-bottom-line",3,"ngClass"],[1,"blitz-tournament__container--round-row"],["class","blitz-tournament__container--box-left-line first-col",4,"ngIf"],["class","blitz-tournament__container--box-left-line",3,"height",4,"ngIf"],[1,"blitz-tournament__container--box",3,"viewModel","table"],[1,"blitz-tournament__container--box-right-line",3,"ngClass"],[1,"blitz-tournament__container--box-left-line","first-col"],[1,"blitz-tournament__container--box-left-line"],[1,"blitz-tournament__container--round-row","winners"],[1,"blitz-tournament__container--box-left-line","winners"],[1,"blitz-tournament__container--box","winners",3,"viewModel","players"],[1,"blitz-tournament__container--box-right-line","winners"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,M8t,6,14,"div",1),m(),p(2,"blitz-tournament-won-popup",2),Y("claimPrize",function(){return i.collectPrize()}),m(),B(3,"tournament-status-bar",3)),2&e&&(d(),l("ngIf",!0===i.viewReady),d(),l("data",i.winPopup.data)("isVisible",i.winPopup.isVisible),d(),l("text",i.bottomBar.text)("isVisible",i.bottomBar.isVisible))},dependencies:[Xe,Mt,Ne,Y0e,X0e,e1e,t1e],styles:[".blitz-tournament__container--round[_ngcontent-%COMP%]{position:relative;height:100%;display:flex;flex-flow:column nowrap;min-width:30rem}@media only screen and (max-width: 980px){.blitz-tournament__container--round[_ngcontent-%COMP%]{height:auto!important;width:calc(100% - 1rem)!important;border-radius:.4rem;margin:1.9rem .5rem;min-width:initial}.semi-final.blitz-tournament__container--round[_ngcontent-%COMP%]{margin:1.9rem .5rem 3.9rem;border-radius:.4rem}.winners.blitz-tournament__container--round[_ngcontent-%COMP%], .final.blitz-tournament__container--round[_ngcontent-%COMP%]{margin:3.9rem .5rem;border:none}.winners.loader-shown.blitz-tournament__container--round[_ngcontent-%COMP%], .final.loader-shown.blitz-tournament__container--round[_ngcontent-%COMP%]{margin-bottom:8rem}}@media only screen and (max-width: 980px) and (max-width: 768px){.winners.loader-shown.blitz-tournament__container--round[_ngcontent-%COMP%], .final.loader-shown.blitz-tournament__container--round[_ngcontent-%COMP%]{margin-bottom:7rem}}.blitz-tournament__container--round-row[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:row wrap;justify-content:center;align-items:center}@media only screen and (max-width: 980px){.blitz-tournament__container--round-row[_ngcontent-%COMP%]{height:auto!important}.winners.blitz-tournament__container--round-row[_ngcontent-%COMP%]{margin-top:10rem}}.line-box[_ngcontent-%COMP%]{width:100%;height:50%}.blitz-tournament__wrapper[_ngcontent-%COMP%]{overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:relative!important;width:100%;height:100%;max-height:100%;overflow-y:auto;overflow-x:auto}.blitz-tournament__container--content[_ngcontent-%COMP%]{position:relative;width:100%;height:calc(100% - 10rem);display:flex;flex-flow:row nowrap;min-height:82rem}.blitz-tournament__container--content.players-32[_ngcontent-%COMP%]{min-height:87rem}.blitz-tournament__container--content.players-64[_ngcontent-%COMP%]{min-height:157rem}.blitz-tournament__container--content.players-128[_ngcontent-%COMP%]{min-height:307rem}@media only screen and (max-width: 980px){.blitz-tournament__container--content[_ngcontent-%COMP%]{flex-flow:column nowrap;height:auto;min-height:initial}}.blitz-tournament__container--box-left-line[_ngcontent-%COMP%]{position:relative;left:-.5%;height:50%;width:10%;border-left:.2rem solid white}@media only screen and (max-width: 980px){.blitz-tournament__container--box-left-line[_ngcontent-%COMP%]{display:none}}.blitz-tournament__container--box-left-line[_ngcontent-%COMP%] > .line-box[_ngcontent-%COMP%]{width:105%;top:0;border-bottom:.2rem solid white}.blitz-tournament__container--box-left-line.winners[_ngcontent-%COMP%], .blitz-tournament__container--box-left-line.first-col[_ngcontent-%COMP%]{border-left:none}.blitz-tournament__container--box-left-line.first-col[_ngcontent-%COMP%] > .line-box[_ngcontent-%COMP%]{opacity:0}.blitz-tournament__container--box[_ngcontent-%COMP%]{width:80%;display:flex;flex-flow:column nowrap}@media only screen and (max-width: 980px){.blitz-tournament__container--box[_ngcontent-%COMP%]{margin:1rem 0}}@media only screen and (max-width: 980px){.blitz-tournament__container--box.final[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 768px){.blitz-tournament__container--box[_ngcontent-%COMP%]{width:90%;justify-content:center;align-items:center}.blitz-tournament__container--box.final[_ngcontent-%COMP%]{width:100%}}@media only screen and (max-width: 480px){.blitz-tournament__container--box[_ngcontent-%COMP%]{width:100%}}.blitz-tournament__container--box.winners[_ngcontent-%COMP%]{height:100%;padding:.3rem;align-items:center;max-height:20rem}.blitz-tournament__container--box.final[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%], .blitz-tournament__container--box.semi-final[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]{display:flex}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%]{width:calc(100% - 1rem);height:3rem;margin:.5rem;justify-content:center;align-items:center;display:none}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem;text-transform:uppercase}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%]{width:calc(100% - 1rem);margin:.5rem;display:flex;flex-flow:row wrap}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%] > .versus-icon[_ngcontent-%COMP%]{position:relative;width:10%;display:flex;justify-content:center;align-items:center}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%] > .versus-icon[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-weight:900}@media only screen and (max-width: 980px){.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-content[_ngcontent-%COMP%] > .versus-icon[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.8rem}}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%]{width:calc(100% - 1rem);height:2rem;margin:.5rem .5rem .2rem;display:flex;flex-flow:row wrap}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .result-team-one[_ngcontent-%COMP%]{width:25%;height:100%;display:flex;justify-content:center;align-items:center}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .box-footer-text[_ngcontent-%COMP%]{width:50%;height:100%;display:flex;justify-content:center;align-items:center;text-transform:uppercase}@media only screen and (max-width: 1280px){.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .box-footer-text[_ngcontent-%COMP%]{font-size:1.2rem}}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .box-footer-text.no-score[_ngcontent-%COMP%]{width:100%}.blitz-tournament__container--box[_ngcontent-%COMP%] > .box-footer[_ngcontent-%COMP%] > .result-team-two[_ngcontent-%COMP%]{width:25%;height:100%;display:flex;justify-content:center;align-items:center}.team-player[_ngcontent-%COMP%]{position:relative;width:50%;height:100%;display:flex;justify-content:center;align-items:center;overflow:hidden}.team-player[_ngcontent-%COMP%] > avatar[_ngcontent-%COMP%]{border-radius:.3rem;cursor:pointer}.team-player.winner[_ngcontent-%COMP%]{width:calc(50% - 2rem);margin:1rem;height:auto}.player-avatar-image[_ngcontent-%COMP%]{width:100%;padding-top:.1rem}.blitz-tournament__container--box-right-line[_ngcontent-%COMP%]{position:relative;height:50%;width:10%}@media only screen and (max-width: 980px){.blitz-tournament__container--box-right-line[_ngcontent-%COMP%]{display:none}}.blitz-tournament__container--box-right-line.winners[_ngcontent-%COMP%]{opacity:0}.blitz-tournament__container--box-right-line.final[_ngcontent-%COMP%]{border-right:.2rem solid white}.blitz-tournament__container--box-right-line[_ngcontent-%COMP%] > .line-box[_ngcontent-%COMP%]{top:0;border-bottom:.2rem solid white}@media only screen and (max-width: 980px){.blitz-tournament__container--round-bottom-line[_ngcontent-%COMP%]{position:absolute;bottom:-4rem;height:4rem;width:100%}.blitz-tournament__container--round-bottom-line.lastRound[_ngcontent-%COMP%]{bottom:-4rem;height:4rem}.blitz-tournament__container--round-bottom-line.semi-final[_ngcontent-%COMP%]{bottom:-8rem;height:8rem}.blitz-tournament__container--round-bottom-line.final[_ngcontent-%COMP%], .blitz-tournament__container--round-bottom-line.winners[_ngcontent-%COMP%]{display:none}.blitz-tournament__container--round-bottom-line[_ngcontent-%COMP%] > .line-box[_ngcontent-%COMP%]{position:absolute;left:0;top:0;width:50%;height:100%}}.blitz-tournament__loader--animation[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_rotateYAnimation;animation-duration:.5s;animation-timing-function:linear;animation-iteration-count:infinite;animation-fill-mode:forwards}@keyframes _ngcontent-%COMP%_rotateYAnimation{0%{transform:rotateY(0)}to{transform:rotateY(360deg)}}"]}),n})();const O8t=["scrollContainer"];function E8t(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",7),Y("select",function(i){return oe(o),re(_(2).changeTab(i))}),p(1,"button-icon-text",8),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit,e=_(2);l("tabId",o.id),d(),l("bclass","tournaments__top-tab__button-bclass "+(e.currentTab&&o.id===e.currentTab?" tournaments__top-tabs__selected":"")),d(),ze(" ",$(3,3,o.text.key)," ")}}function x8t(t,n){if(1&t&&(p(0,"top-tabs",5),U(1,E8t,4,5,"top-tab-item",6),m()),2&t){const o=_();l("showBackButton",!1)("scrollStyleCustomClass","tournaments__top-tabs__scroll")("scrollBarCustomClass","tournaments__top-tabs__scrollbar")("initialOpenedTab",o.currentTab),d(),l("ngForOf",o.tabs)("ngForTrackBy",o.trackById)}}let n1e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.tournamentsService=e,this.urlService=i,this.clientConfigService=r,this.gamesStateService=s,this.router=a,this.route=c,this.permissions=u,this.EButtonModifier=ve.EButtonModifier}ngOnInit(){this.tabs=[{id:"default",paths:["default"],text:{key:"LABEL.DEFAULT"}},{id:"custom",paths:["custom","custom/blitz/:tournamentId"],text:{key:"LABEL.CUSTOM"}}],this.setNavbarContent(),this.setInitialTab(this.route.children[0].routeConfig.path),this.routeSubscription=this.router.events.pipe(bt(e=>e instanceof as)).subscribe(e=>{this.setNavbarContent(),this.setInitialTab(this.route.children[0].routeConfig.path)})}ngOnDestroy(){var e;this.tournamentsService.clearCache(),null===(e=this.routeSubscription)||void 0===e||e.unsubscribe()}changeTab(e){this.router.navigate(["".concat(e)],{relativeTo:this.route,replaceUrl:!0})}trackById(e,i){return i.id}showTabs(){return this.permissions.getModulePermission(nt.EPermissionModule.CustomBlitzTournaments).isEnabled&&!!this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.blitzTournaments&&this.route.children[0].component!==M7}setInitialTab(e){if(this.scrollContainer&&(this.scrollContainer.nativeElement.scrollTop=0),e||(this.initialTab=this.tabs[0].id),e){var i;const r=null===(i=this.tabs.find(s=>!!s.paths.find(a=>a===e)))||void 0===i?void 0:i.id;this.initialTab=r}this.currentTab=this.initialTab}setNavbarContent(){this.navBarContent=this.clientConfigService.singleGamePlatform()?{type:Ru.EContent.Text,data:{key:"TOURNAMENTS.LABEL"}}:{type:Ru.EContent.Image,data:{imgUrl:this.urlService.getImageUrl("platform-logos/".concat(this.gamesStateService.getCurrentGameState().id,".svg"))}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(s1),g(ii),g(Zt),g(Zn),g(on),g(Po),g(Ti))},t.\u0275cmp=pe({type:t,selectors:[["tournaments-lobby"]],viewQuery:function(e,i){if(1&e&&$e(O8t,5),2&e){let r;je(r=He())&&(i.scrollContainer=r.first)}},decls:6,vars:3,consts:[[1,"tournaments__content"],[3,"backLink","content"],["class","tournaments--top-tabs",3,"showBackButton","scrollStyleCustomClass","scrollBarCustomClass","initialOpenedTab",4,"ngIf"],[1,"tournaments__pages"],["scrollContainer",""],[1,"tournaments--top-tabs",3,"showBackButton","scrollStyleCustomClass","scrollBarCustomClass","initialOpenedTab"],["class","tournaments__top-tab",3,"tabId","select",4,"ngFor","ngForOf","ngForTrackBy"],[1,"tournaments__top-tab",3,"tabId","select"],[1,"tournaments__top-tab__button",3,"bclass"]],template:function(e,i){1&e&&(p(0,"section",0),B(1,"navigation-bar",1),U(2,x8t,2,6,"top-tabs",2),p(3,"section",3,4),B(5,"router-outlet"),m()()),2&e&&(d(),l("backLink","history")("content",i.navBarContent),d(),l("ngIf",i.showTabs()))},dependencies:[Mt,Ne,Kh,kl,dl,so,Ip,qe],styles:[".tournaments__content[_ngcontent-%COMP%]{height:100%;overflow:hidden;display:flex;flex-flow:column nowrap}.tournaments__top-tab[_ngcontent-%COMP%]{margin:0 .5rem}.tournaments__pages[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;margin-top:.5rem;overflow:auto;height:100%}.tournaments__pages.tabs[_ngcontent-%COMP%]{height:calc(100% - 9.5rem)}"]}),n})(),i1e=(()=>{var t;class n{constructor(e,i){this.contextTreeService=e,this.route=i}ngOnInit(){this.routeSubscription=this.route.params.subscribe(e=>{const i=e.gameId;i&&this.contextTreeService.setContext(i)})}ngOnDestroy(){this.routeSubscription&&this.routeSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(nn),g(Po))},t.\u0275cmp=pe({type:t,selectors:[["lobby"]],features:[mn([{provide:nn,useFactory:o=>new nn("",o),deps:[[new jo,new zo,nn]]}])],decls:1,vars:0,template:function(e,i){1&e&&B(0,"router-outlet")},dependencies:[Ip],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"]}),n})(),O7=(()=>{var t;class n{constructor(e,i,r,s){this.configService=e,this.gamesStateService=i,this.http=r,this.timeService=s}isSinglePlatform(){return this.configService.singleGamePlatform()}configChange(){return this.gamesStateService.getGameRelatedConfigStream()}getOnlineUsersCount(){return this.timeService.getServerTimeS()-this.lastOnlineUsersCountTimeStamp<Gn.ETime.SecondsPerMinute&&null!=this.onlineUsersCount?this.onlineUsersCount:(this.onlineUsersPromise||(this.onlineUsersPromise=this.http.get("users/online/total").toPromise().then(e=>(this.onlineUsersCount=e.body.total,this.lastOnlineUsersCountTimeStamp=this.timeService.getServerTimeS(),this.onlineUsersCount)).finally(()=>{this.onlineUsersPromise=void 0})),this.onlineUsersPromise)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zt),T(Zn),T(En),T(Bn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),o1e=(()=>{var t;class n{constructor(e,i){this.http=e,this.store=i,this.onlineUsers=[]}fetchUsers(){return this.http.get("users/online/list",{params:{count:100,page:1}}).toPromise().then(e=>{const i=this.store.selectUserState()?this.store.selectUserState().profile.id:void 0;let r=e.body.list;return i&&(r=e.body.list.filter(s=>s.id!==i)),this.onlineUsers=r,r}).catch(e=>{throw console.log("Fetch users error: ",e),e})}getUsersAvatars(){return 0===this.onlineUsers.length?this.fetchUsers():Promise.resolve(this.onlineUsers)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class A8t{constructor(n){this.maxContainerSize=8,this.gridConfig=n}getGridColumns(){return this.reduce(this.maxContainerSize/2)}reduce(n){let o=0,e=[];return this.gridConfig.reduce((i,r)=>{const s=r.size+i>n;return s&&o++,void 0===e[o]&&(e[o]=[]),e[o].push(r),s?r.size:r.size+i},0),e}}let r1e=(()=>{var t;class n{createRestrictions(e,i){if(i)return i.failedRequirements.map(r=>this.getRestrictionComponent(e,r)).filter(r=>void 0!==r)}getRestrictionComponent(e,i){switch(i.type){case Nc.MaxLevel:const r=e.createComponent(MM);return r.instance.value=i.requiredLevel,r.instance.isMaxLevelRestricted=!0,r;case Nc.MinLevel:const s=e.createComponent(MM);return s.instance.value=i.requiredLevel,s;case Nc.Vip:return e.createComponent(qL);default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const R8t=["ref"];let Lu=(()=>{var t;class n{constructor(e,i){this.restrictionsFactory=e,this.cd=i,i.detach()}ngAfterViewInit(){this.createComponents()}ngOnChanges(e){this.createComponents(),this.cd.detectChanges()}ngOnDestroy(){this.clearComponents()}createComponents(){this.clearComponents();const e=this.restrictionsFactory.createRestrictions(this.ref,this.permission);e&&(this.cmpRefs=e,this.cmpRefs.forEach(i=>{i.instance.cd.detectChanges()}))}clearComponents(){this.ref&&this.ref.clear(),this.cmpRefs&&this.cmpRefs.forEach(e=>{e.destroy()}),this.cmpRefs=void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(r1e),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["restriction-cover"]],viewQuery:function(e,i){if(1&e&&$e(R8t,7,bs),2&e){let r;je(r=He())&&(i.ref=r.first)}},inputs:{permission:"permission"},features:[it],decls:3,vars:0,consts:[[1,"restriction__container"],["ref",""]],template:function(e,i){1&e&&(p(0,"div",0),Un(1,null,1),m())},styles:["[_nghost-%COMP%]{display:block;position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer}.restriction__container[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column}"],changeDetection:0}),n})();function k8t(t,n){if(1&t&&(p(0,"p",7),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",$(2,1,"LOBBY.DESCRIPTIONS.CUSTOM_DESCRIPTION_"+o.gameId.toUpperCase())," ")}}function L8t(t,n){1&t&&(p(0,"p",7),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"LOBBY.DESCRIPTIONS.CUSTOM_DESCRIPTION")," "))}const D8t=t=>[t];let vD=(()=>{var t;class n extends JI{constructor(e,i,r,s,a,c,u,h,b){super(e,i,s,a,c,u),this.customDescriptionKey="",this.activatedRoute=r,this.cdr=h,this.translateService=b,h.detach()}onClick(){const e=this.getTilePermission({id:this.tileConfig.id});this.handleUserRestrictions(e)&&this.router.navigate([this.tileConfig.info.tileData.route],{relativeTo:this.activatedRoute}).catch(r=>{console.error("Navigation room navigate error: ",r)})}ngOnChanges(e){this.gameId=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.id,this.permission=this.getTilePermission({id:this.tileConfig.id}),this.cdr.detectChanges()}isDescriptionGameSpecific(){const e="LOBBY.DESCRIPTIONS.CUSTOM_DESCRIPTION_".concat(this.gameId.toUpperCase());return this.translateService.isKeyExisting(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Po),g(Pi),g(Zt),g(Qt),g(Zn),g(Re),g(pi))},t.\u0275cmp=pe({type:t,selectors:[["navigation-room"]],features:[Ht,it],decls:10,vars:10,consts:[[1,"room__wrapper",3,"ngClass"],[1,"box__container--room-icon"],[1,"nav--box__image--wrapper",3,"ngClass"],[1,"nav--room--box__image--icon"],["data-cy","lobbyCustomRoomTitle",1,"nav--room--box__wrapper--texts","tile__text--name",3,"innerHtml"],["class","nav--room--box__wrapper--info",4,"ngIf"],[3,"permission"],[1,"nav--room--box__wrapper--info"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2),B(3,"div",3),m()(),B(4,"p",4),V(5,"translate"),p(6,"colored-container"),U(7,k8t,3,3,"p",5)(8,L8t,3,3,"p",5),m()(),B(9,"restriction-cover",6)),2&e&&(l("ngClass",ne(8,D8t,i.tileConfig.name+" "+i.gameId+" navigation-room_"+i.tileSizeMap[i.tileConfig.size])),d(2),l("ngClass",i.tileConfig.id+" "+i.gameId),d(2),l("innerHtml",$(5,6,"LOBBY.ROOM_NAMES."+i.tileConfig.id.toUpperCase()),Yn),d(3),l("ngIf",i.isDescriptionGameSpecific()),d(),l("ngIf",!i.isDescriptionGameSpecific()),d(),l("permission",i.permission))},dependencies:[Xe,Ne,B0,Lu,qe],styles:[".room__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap}.room__wrapper[_ngcontent-%COMP%]   .nav--room--box__image--icon[_ngcontent-%COMP%]{background-size:contain}.tile__text--name[_ngcontent-%COMP%]{font-size:2rem;text-transform:uppercase;font-weight:600;word-wrap:break-word}@media only screen and (max-width: 1024px){.tile__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 980px){.tile__text--name[_ngcontent-%COMP%]{font-size:1.4rem;line-height:16px}}@media only screen and (max-width: 480px){.tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}.box__container--room-icon[_ngcontent-%COMP%]{flex:1;position:relative}.nav--box__image--wrapper[_ngcontent-%COMP%]{top:0;left:0;position:absolute;width:100%;height:100%}.nav--room--box__image--icon[_ngcontent-%COMP%]{max-height:100%;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%);position:relative;display:block;width:100%;height:100%;background-size:initial;background-position:center;background-repeat:no-repeat}@media only screen and (max-width: 768px){.nav--room--box__image--icon[_ngcontent-%COMP%]{background-size:contain}}.nav--room--box__wrapper--texts[_ngcontent-%COMP%]{width:100%;margin-bottom:1rem;text-align:center}.nav--room--box__wrapper--info[_ngcontent-%COMP%]{display:none}.room__wrapper.navigation-room_small-tile[_ngcontent-%COMP%]   .nav--box__image--wrapper[_ngcontent-%COMP%]{padding:0 25%}@media only screen and (max-width: 1366px){.room__wrapper.navigation-room_small-tile[_ngcontent-%COMP%]   .nav--box__image--wrapper[_ngcontent-%COMP%]{padding:0 20%}}@media only screen and (max-width: 680px){.room__wrapper.navigation-room_small-tile[_ngcontent-%COMP%]   .nav--box__image--wrapper[_ngcontent-%COMP%]{padding:5%}}.room__wrapper.navigation-room_medium-tile[_ngcontent-%COMP%]   .nav--box__image--wrapper[_ngcontent-%COMP%]{padding:0 35%}@media only screen and (max-width: 1366px){.room__wrapper.navigation-room_medium-tile[_ngcontent-%COMP%]   .nav--box__image--wrapper[_ngcontent-%COMP%]{padding:0 30%}}@media only screen and (max-width: 900px){.room__wrapper.navigation-room_medium-tile[_ngcontent-%COMP%]   .nav--box__image--wrapper[_ngcontent-%COMP%]{padding:5%}}"],changeDetection:0}),n})();class oy extends ov{constructor(n,o,e,i,r,s,a,c){super(o,r,i,e,c),this.findRoomHandler=u=>{this.loader.on(),this.isRoomActive=!1,this.gamesPlayClientService.currentPlayClient.findRoom(u).then(this.onCreateSuccess).catch(this.onCreateError)},this.createRoomHandler=u=>{this.loader.on(),this.isRoomActive=!1,this.gamesPlayClientService.currentPlayClient&&this.gamesPlayClientService.currentPlayClient.createRoom(u).then(this.onCreateSuccess).catch(this.onCreateError)},this.onCreateError=u=>{u instanceof et.StateError?this.toaster.warn("PLEASE_WAIT"):u instanceof lt.NetworkError?this.toaster.error("ERRORS.CONNECTION_ERROR"):this.toaster.warn("ERRORS.SOMETHING_WRONG"),this.isRoomActive=!0,this.loader.off(),console.warn(u)},this.onCreateSuccess=()=>{this.isRoomActive=!0,this.loader.off()},this.gamesPlayClientService=n,this.toaster=s,this.loader=a,this.isRoomActive=!0,this.nonGamblingStyleEnabled=rl.nonGamblingStyleEnabled}getRoomSettings(n){const o=this.gamesStateService.getCurrentGameRelatedConfig();return wb()(o.matchmaking)?[]:o.matchmaking.presets.filter(e=>-1!==n.indexOf(e.presetId))}findRoom(n,o,e){const i=!o||this.handleUserRestrictions(o);(this.isRoomActive&&i&&(e||n.pool&&n.pool.roomSettings&&n.pool.roomSettings.transactions&&n.pool.roomSettings.transactions.bet<=0)||i)&&this.findRoomHandler(n)}createRoom(n){this.isRoomActive&&this.createRoomHandler(n)}getPoolSettings(n){const o=this.gamesStateService.getCurrentGameRelatedConfig();return wb()(o.matchmaking)?[]:o.matchmaking.pools.filter(e=>-1!==n.indexOf(e.id)&&e.active)}}let E7=(()=>{var t;class n extends oy{constructor(e,i,r,s,a,c,u,h,b){super(e,a,i,r,s,c,u,h),this.cdr=b,this.gameId=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.id,b.detach()}onClick(){const e=this.getTilePermission({id:this.tileConfig.id,roomSettings:this.settings[0]});e.isPermitted?this.createRoom(this.settings[0].presetId):this.handleUserRestrictions(e)}ngOnChanges(e){this.settings=this.getRoomSettings(this.tileConfig.info.tileData.presets),this.permission=this.settings.length>0?this.getTilePermission({roomSettings:this.settings[0],id:this.tileConfig.id}):void 0,this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oo),g(Zt),g(on),g(Cn),g(Pi),g(Dt),g(ro),g(Zn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["room-tile"]],features:[Ht,it],decls:9,vars:6,consts:[[1,"room__wrapper",3,"ngClass"],[1,"box__container--room-icon"],[1,"box__image--wrapper",3,"ngClass"],[1,"room--box__image--icon"],[1,"box__wrapper--texts"],[1,"tile__text--name"],[3,"permission"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2),B(3,"div",3),m()(),p(4,"p",4)(5,"span",5),H(6),V(7,"translate"),m()()(),B(8,"restriction-cover",6)),2&e&&(l("ngClass",i.gameId+" "+i.tileSizeMap[i.tileConfig.size]),d(2),l("ngClass",i.tileSizeMap[i.tileConfig.size]+" "+i.gameId),d(4),se($(7,4,"LOBBY.ROOM_NAMES."+i.tileConfig.id.toUpperCase())),d(2),l("permission",i.permission))},dependencies:[Xe,Lu,qe],styles:[".room__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap}.tile__text--name[_ngcontent-%COMP%]{font-size:2rem;text-transform:uppercase;font-weight:600;word-wrap:break-word}@media only screen and (max-width: 1024px){.tile__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 980px){.tile__text--name[_ngcontent-%COMP%]{font-size:1.4rem;line-height:16px}}@media only screen and (max-width: 480px){.tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}.box__container--room-icon[_ngcontent-%COMP%]{flex:1;position:relative}.box__image--wrapper[_ngcontent-%COMP%]{top:0;left:0;position:absolute;width:100%;height:100%}.box__image--wrapper[_ngcontent-%COMP%]   .room--box__image--icon[_ngcontent-%COMP%]{max-height:100%;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%);position:relative;display:block;width:100%;height:100%;background-size:contain;background-position:center;background-repeat:no-repeat}@media only screen and (max-width: 768px){.box__image--wrapper[_ngcontent-%COMP%]   .room--box__image--icon[_ngcontent-%COMP%]{background-size:contain}}.box__image--icon[_ngcontent-%COMP%]{max-height:100%;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%);position:relative;display:block}.box__wrapper--texts[_ngcontent-%COMP%]{width:100%;margin-bottom:1rem;text-align:center}.room__wrapper.small-tile[_ngcontent-%COMP%]   .box__image--wrapper[_ngcontent-%COMP%]{padding:0 25%}@media only screen and (max-width: 1366px){.room__wrapper.small-tile[_ngcontent-%COMP%]   .box__image--wrapper[_ngcontent-%COMP%]{padding:0 20%}}@media only screen and (max-width: 680px){.room__wrapper.small-tile[_ngcontent-%COMP%]   .box__image--wrapper[_ngcontent-%COMP%]{padding:5%}}.room__wrapper.medium-tile[_ngcontent-%COMP%]   .box__image--wrapper[_ngcontent-%COMP%]{padding:0 35%}@media only screen and (max-width: 1366px){.room__wrapper.medium-tile[_ngcontent-%COMP%]   .box__image--wrapper[_ngcontent-%COMP%]{padding:0 30%}}@media only screen and (max-width: 900px){.room__wrapper.medium-tile[_ngcontent-%COMP%]   .box__image--wrapper[_ngcontent-%COMP%]{padding:5%}}"],changeDetection:0}),n})();var B8t=ve.EButtonModifier,N8t=ve.EIcons;const F8t=["scrollElement"],U8t=["container"],s1e=t=>[t];function G8t(t,n){if(1&t&&(p(0,"div")(1,"span",11),H(2),V(3,"translate"),m()()),2&t){const o=_();ni("custom-bet__text--label-dynamic bet ",o.selected.value.label.class,""),d(2),se(yt(3,4,o.selected.value.label.text.key,ne(7,s1e,o.selected.value.label.text.params)))}}const a1e=t=>({name:t});function V8t(t,n){if(1&t){const o=Ce();p(0,"button-icon",12),Y("onClick",function(){return oe(o),re(_().selectPrevious(!0))}),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_ACTION)("icon",ne(3,a1e,o.iconNames.MINUS))("disabled",o.selected&&0===o.selected.index)}}function z8t(t,n){1&t&&Un(0)}const c1e=t=>({"only-bet":t});function j8t(t,n){if(1&t&&(p(0,"div",14)(1,"div")(2,"span",15),H(3),V(4,"translate"),m()()()),2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(8,c1e,e.nonGamblingStyle)),d(),ni("custom-bet__text--label-dynamic bet ",o.label.class,""),d(2),se(yt(4,5,o.label.text.key,ne(10,s1e,o.label.text.params)))}}function H8t(t,n){if(1&t&&U(0,j8t,5,12,"div",13),2&t){const o=_();l("ngForOf",o.values)("ngForTrackBy",o.trackByFn)}}function q8t(t,n){if(1&t&&(p(0,"p",18)(1,"span",19),H(2),V(3,"translate"),m(),B(4,"currency-component",20),m()),2&t){const o=_().$implicit,e=_(2);d(2),ze("",$(3,3,"LABEL.REWARD"),": "),d(2),l("currency",e.currencyType.Chips)("value",o.reward.amount)}}function W8t(t,n){if(1&t&&(p(0,"div",14),B(1,"currency-component",16),U(2,q8t,5,5,"p",17),m()),2&t){const o=n.$implicit,e=_(2);l("ngClass",ne(4,c1e,e.nonGamblingStyle)),d(),l("currency",e.currencyType.Chips)("value",o.bet.amount),d(),l("ngIf",!e.nonGamblingStyle)}}function $8t(t,n){if(1&t&&U(0,W8t,3,6,"div",13),2&t){const o=_();l("ngForOf",o.values)("ngForTrackBy",o.trackByFn)}}function K8t(t,n){if(1&t){const o=Ce();p(0,"button-icon",21),Y("onClick",function(){return oe(o),re(_().selectNext(!0))}),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_ACTION)("icon",ne(3,a1e,o.iconNames.PLUS))("disabled",o.selected&&o.selected.index+1>=o.values.length)}}let x7=(()=>{var t;class n{constructor(e,i,r){this.soundService=e,this.ref=i,this.rulerService=r,this.select=new ke,this.buttonModifier=B8t,this.iconNames=N8t,this.currencyType=ln,this.ref.detach()}ngOnInit(){this.appResizeSubscription=this.rulerService.getAppSize().subscribe(()=>{this.selectValue(this.initialValue||this.values[0],!1),this.ref.detectChanges()})}ngOnChanges(e){this.ref.detectChanges()}ngOnDestroy(){var e;null===(e=this.appResizeSubscription)||void 0===e||e.unsubscribe(),cancelAnimationFrame(this.rafId)}onClick(e){e.stopPropagation(),e.preventDefault(),this.ref.detectChanges()}selectPrevious(e){const i=this.selected.index-1;i<0||this.selectValue(i,e)}selectNext(e){const i=this.selected.index+1;i>=this.values.length||this.selectValue(i,e)}selectValue(e,i){cancelAnimationFrame(this.rafId);const r="number"==typeof e?e:this.values.findIndex(s=>s===e);this.rafId=requestAnimationFrame(()=>{i&&(this.scrollElement.nativeElement.style.transition="transform .5s ease",this.soundService.play(dn.SlideOptions)),this.scrollElement.nativeElement.style.transform="translateX(-".concat(100*r,"%)"),this.ref.detectChanges()}),this.selected={index:r,value:this.values[r]},this.select.emit(this.selected)}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mo),g(Re),g(Ua))},t.\u0275cmp=pe({type:t,selectors:[["custom-bet"]],viewQuery:function(e,i){if(1&e&&($e(F8t,7),$e(U8t,7)),2&e){let r;je(r=He())&&(i.scrollElement=r.first),je(r=He())&&(i.container=r.first)}},hostAttrs:[1,"custom-bet--host"],hostBindings:function(e,i){1&e&&Y("click",function(s){return i.onClick(s)})},inputs:{values:"values",initialValue:"initialValue",nonGamblingStyle:"nonGamblingStyle"},outputs:{select:"select"},features:[it],decls:13,vars:6,consts:[[3,"class",4,"ngIf"],[1,"custom-bet__container--bet-dynamic"],["class","custom-bet__button","data-cy","customBetLeftButton",3,"buttonModifier","icon","disabled","onClick",4,"ngIf"],[1,"custom-bet__container--bet-win-dynamic","bet"],["container",""],[1,"scroll-bet__wrapper"],["scrollElement",""],[4,"ngIf","ngIfThen","ngIfElse"],["labels",""],["bets",""],["class","custom-bet__button","data-cy","customBetRightButton",3,"buttonModifier","icon","disabled","onClick",4,"ngIf"],["data-cy","matchmakingTitle"],["data-cy","customBetLeftButton",1,"custom-bet__button",3,"buttonModifier","icon","disabled","onClick"],["class","custom-bet__text--numbers-dynamic bet",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"custom-bet__text--numbers-dynamic","bet",3,"ngClass"],[1,"custom-bet__text--label-dynamic__text"],[1,"scroll-bet__value",3,"currency","value"],["class","scroll-reward__label",4,"ngIf"],[1,"scroll-reward__label"],[1,"scroll-reward__value-label"],[1,"scroll-reward__value",3,"currency","value"],["data-cy","customBetRightButton",1,"custom-bet__button",3,"buttonModifier","icon","disabled","onClick"]],template:function(e,i){if(1&e&&(U(0,G8t,4,9,"div",0),p(1,"div",1),U(2,V8t,1,5,"button-icon",2),p(3,"div",3,4)(5,"div",5,6),U(7,z8t,1,0,"ng-container",7)(8,H8t,1,2,"ng-template",null,8,ft)(10,$8t,1,2,"ng-template",null,9,ft),m()(),U(12,K8t,1,5,"button-icon",10),m()),2&e){const r=Kt(9),s=Kt(11);l("ngIf",i.selected&&i.selected.value.label&&!i.nonGamblingStyle),d(2),l("ngIf",i.values.length>1),d(5),l("ngIf",i.nonGamblingStyle)("ngIfThen",r)("ngIfElse",s),d(5),l("ngIf",i.values.length>1)}},dependencies:[Xe,Mt,Ne,ei,So,qe],styles:[".custom-bet__container--bet-dynamic[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:6rem;margin:0 auto}@media only screen and (max-width: 360px){.custom-bet__container--bet-dynamic[_ngcontent-%COMP%]{margin-bottom:2rem}}@media only screen and (max-width: 480px){.custom-bet__container--bet-dynamic[_ngcontent-%COMP%]{height:5rem;margin-bottom:0}}.custom-bet__container--bet-dynamic[_ngcontent-%COMP%]   .custom-bet__container--bet-win-dynamic[_ngcontent-%COMP%]{position:relative;overflow:hidden;height:6rem}@media only screen and (max-width: 480px){.custom-bet__container--bet-dynamic[_ngcontent-%COMP%]   .custom-bet__container--bet-win-dynamic[_ngcontent-%COMP%]{height:5rem}}.custom-bet__container--bet-dynamic[_ngcontent-%COMP%]   .custom-bet__container--bet-win-dynamic.bet[_ngcontent-%COMP%]{display:flex;flex-direction:row wrap;align-items:center;justify-content:flex-start}.custom-bet__container--bet-dynamic[_ngcontent-%COMP%]   .custom-bet__container--bet-win-dynamic.bet[_ngcontent-%COMP%]:hover{cursor:pointer}.scroll-bet__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;height:6rem;line-height:100%;width:100%}@media only screen and (max-width: 480px){.scroll-bet__wrapper[_ngcontent-%COMP%]{height:5rem}}.custom-bet__text--label-dynamic[_ngcontent-%COMP%]{margin:0 0 .5rem;text-transform:uppercase;text-align:left}.custom-bet__text--label-dynamic.bet[_ngcontent-%COMP%]{width:100%;font-size:1.8rem;font-weight:600;text-align:center;line-height:100%}@media only screen and (max-height: 580px){.custom-bet__text--label-dynamic.bet[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 480px){.custom-bet__text--label-dynamic[_ngcontent-%COMP%]{font-size:1rem;padding:.1rem 0}}@media only screen and (max-width: 480px) and (orientation: portrait){.custom-bet__text--label-dynamic[_ngcontent-%COMP%]{font-size:1.2rem}}@media only screen and (max-width: 410px) and (orientation: portrait){.custom-bet__text--label-dynamic[_ngcontent-%COMP%]{font-size:1rem}}.custom-bet__button[_ngcontent-%COMP%]{margin:.5rem}.custom-bet__text--numbers-dynamic[_ngcontent-%COMP%]{font-size:4rem}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]{position:relative;display:block;font-size:1.8rem;height:6rem;text-align:center}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]:hover{cursor:pointer}.custom-bet__text--numbers-dynamic.bet.only-bet[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 480px){.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]{height:5rem}}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-bet__value[_ngcontent-%COMP%]{position:relative;line-height:3rem}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-bet__value.simple[_ngcontent-%COMP%]{line-height:6rem}@media only screen and (max-width: 480px){.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-bet__value[_ngcontent-%COMP%]{line-height:2.4rem}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-bet__value.simple[_ngcontent-%COMP%]{line-height:5rem}}@media only screen and (max-width: 480px){.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-bet__value[_ngcontent-%COMP%]{line-height:2.4rem}}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-reward__label[_ngcontent-%COMP%]{position:relative;line-height:1.8rem;font-weight:600;padding:.3rem 0}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-reward__label.simple[_ngcontent-%COMP%]{display:none}@media only screen and (max-width: 480px){.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-reward__label[_ngcontent-%COMP%]{line-height:1.4rem}}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-reward__label[_ngcontent-%COMP%]   .scroll-reward__value-label[_ngcontent-%COMP%]{margin:0 .5rem}.custom-bet__text--numbers-dynamic.bet[_ngcontent-%COMP%]   .scroll-pool-name[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;line-height:1.8rem;font-weight:600;height:100%;display:flex;align-items:center;justify-content:center}@media only screen and (max-width: 480px){.custom-bet__text--numbers-dynamic[_ngcontent-%COMP%]{font-size:1rem;padding:.1rem 0}}@media only screen and (max-width: 480px) and (orientation: portrait){.custom-bet__text--numbers-dynamic[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 420px) and (orientation: portrait){.custom-bet__text--numbers-dynamic[_ngcontent-%COMP%]{font-size:1.4rem}}"],changeDetection:0}),n})();var Z8t=ve.EIcons,Q8t=ve.EButtonModifier;function Y8t(t,n){1&t&&B(0,"client-players-counter",6),2&t&&l("countersKeys",_().tileConfig.playersCounter.counterKeys)}function J8t(t,n){1&t&&B(0,"div")}function X8t(t,n){1&t&&(p(0,"professionals",10),H(1),V(2,"translate"),m()),2&t&&(l("leaders",_(2).professionals),d(),se($(2,2,"PROFESSIONALS.BEST_PLAYERS")))}function ezt(t,n){if(1&t){const o=Ce();p(0,"div",11),Y("click",function(){return oe(o),re(_(2).redirectTo())}),m()}}function tzt(t,n){if(1&t&&(Tn(0),U(1,J8t,1,0,"div",7)(2,X8t,3,4,"ng-template",null,8,ft)(4,ezt,1,0,"ng-template",null,9,ft),Pn()),2&t){const o=Kt(3),e=Kt(5),i=_();d(),l("ngIf",i.professionals&&i.professionals.length>0)("ngIfThen",o)("ngIfElse",e)}}function nzt(t,n){1&t&&Un(0)}const izt=t=>[t];function ozt(t,n){if(1&t&&(p(0,"button-text",15)(1,"span"),H(2),V(3,"translate"),V(4,"translate"),m()()),2&t){const o=_(2);l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(2),se(yt(3,2,"TEXT.PLAY_GAME",ne(7,izt,$(4,5,"PLATFORM_IDS."+o.gameId))))}}const rzt=()=>({url:"icons/locker3d.png"});function szt(t,n){if(1&t&&(p(0,"button-icon-text",16),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("image",pt(7,rzt))("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("disabled",!0),d(),mu("",$(2,5,o.levelRequirement.buttonText)," ",o.levelRequirement.requiredLevel,"")}}function azt(t,n){if(1&t&&(p(0,"div",12),U(1,nzt,1,0,"ng-container",7)(2,ozt,5,9,"ng-template",null,13,ft)(4,szt,3,8,"ng-template",null,14,ft),m()),2&t){const o=Kt(3),e=Kt(5),i=_();d(),l("ngIf",i.levelRequirement.isFulfilled)("ngIfThen",o)("ngIfElse",e)}}let A7=(()=>{var t;class n extends oy{constructor(e,i,r,s,a,c,u,h,b,w,R){super(u,i,r,a,c,s,h,w),this.buttonModifier=Q8t,this.iconNames=Z8t,this.leaderboardService=e,this.contants=b,this.store=R,this.selector={values:[],initial:void 0},this.nonGamblingStyleEnabled=this.contants.nonGamblingStyleEnabled}onClick(){const e=this.getTilePermission({id:this.tileConfig.id,roomSettings:this.selectedPool.roomSettings});e.isPermitted?this.findRoom({pool:this.selectedPool},e):this.handleUserRestrictions(e)}onSelect(e){this.setSelectedPool(e.value.data)}setSelectedPool(e){this.selectedPool=e,this.permission=this.getTilePermission({id:this.tileConfig.id,roomSettings:this.selectedPool.roomSettings}),this.levelRequirement=this.getLevelRequirement()}ngOnInit(){this.singleGame=this.clientConfigService.singleGamePlatform();const e=this.buildSelectorValues(),i=this.getDefaultSelectedPool(this.pools);this.selector={values:e,initial:e.find(r=>r.data===i)}}ngOnChanges(e){this.showLeaderboard=this.tileConfig.size===kd.ETileSize.Large,this.permission=this.getTilePermission({id:this.tileConfig.id}),this.gameId=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.id,this.gameIdClass="game-id__"+this.gameId,this.pools=this.getPoolSettings(this.tileConfig.info.tileData.pools),this.showLeaderboard&&this.fetchLeaderboard(this.gameId)}redirectTo(){this.router.navigate(["/".concat(this.contants.defaultLoggedRoute,"/leaderboards")]).catch(e=>{console.error("MatchmakingTileComponent navigation error",e)})}getLevelRequirement(){return this.permission.minLevelRequirement.isFulfilled?{...this.permission.maxLevelRequirement,buttonText:"LABEL.MAX_LEVEL"}:{...this.permission.minLevelRequirement,buttonText:"LABEL.LEVEL"}}fetchLeaderboard(e){this.leaderboardService.loadLeaderboard({type:ri.Matchmaking,secondId:e,periodModifiers:[0,1],cache:!1}).then(i=>{this.professionals=i[0].leaderboard.rankings&&i[0].leaderboard.rankings.length?lA()(i[0].leaderboard.rankings.slice(0,3),"profile"):[]}).catch(i=>{console.error(i),this.professionals=[]})}buildSelectorValues(){const e=this.pools.filter(i=>i.roomSettings.requirements.maxLevel>=this.store.selectUserState().profile.level).map(i=>({label:{text:{key:"LOBBY.ROOM_NAMES.".concat(i.id.toUpperCase())},class:"bet__label--".concat(i.id)},bet:{amount:i.roomSettings.transactions.bet,currencyType:ln.Chips},reward:{amount:i.roomSettings.transactions.placementRewards[1].amount,currencyType:i.roomSettings.transactions.placementRewards[1].currencyType},data:i}));return e.filter(i=>i.bet.amount<=this.store.selectWallet().chips),e}getDefaultSelectedPool(e){const i=this.store.selectUserState().profile.level;return new ie.List(e).where(r=>r.roomSettings.requirements.minLevel<=i&&i<=r.roomSettings.requirements.maxLevel).orderBy([r=>r.roomSettings.requirements.minLevel],ie.ESort.Asc).last()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(fa),g(Pi),g(Zt),g(Dt),g(on),g(Cn),g(oo),g(ro),g(tn),g(Zn),g(J))},t.\u0275cmp=pe({type:t,selectors:[["matchmaking-tile"]],features:[Ht,it],decls:6,vars:9,consts:[[1,"mr__wrapper",3,"ngClass"],["class","mr__players-counter",3,"countersKeys",4,"ngIf"],[4,"ngIf"],["click-feedback","",1,"mr__container--custom-bet",3,"scaleFactor","values","initialValue","nonGamblingStyle","select"],["class","mr__container--wrapper-play",4,"ngIf"],[3,"permission"],[1,"mr__players-counter",3,"countersKeys"],[4,"ngIf","ngIfThen","ngIfElse"],["professionalsContainer",""],["noProfessionalsContainer",""],[3,"leaders"],["click-feedback","","click-sound","",1,"mr__leaderboards",3,"click"],[1,"mr__container--wrapper-play"],["playButton",""],["disabledButton",""],["data-cy","matchmakingPlayButton",1,"button",3,"buttonModifier"],["data-cy","matchmakingLockedButton",1,"button",3,"image","buttonModifier","disabled"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,Y8t,1,1,"client-players-counter",1)(2,tzt,6,3,"ng-container",2),p(3,"custom-bet",3),Y("select",function(s){return i.onSelect(s)}),m(),U(4,azt,6,3,"div",4),m(),B(5,"restriction-cover",5)),2&e&&(l("ngClass",i.gameIdClass),d(),l("ngIf",i.tileConfig.playersCounter.enabled),d(),l("ngIf",i.showLeaderboard),d(),l("scaleFactor",1)("values",i.selector.values)("initialValue",i.selector.initial)("nonGamblingStyle",i.nonGamblingStyleEnabled),d(),l("ngIf",i.levelRequirement),d(),l("permission",i.permission))},dependencies:[Xe,Ne,po,BC,pn,so,Fd,F0,x7,Lu,qe],styles:[".mr__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;align-items:center;width:100%;height:100%}@media only screen and (min-height: 768px) and (orientation: portrait){.mr__wrapper[_ngcontent-%COMP%]{max-height:55rem}}.mr__leaderboards[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;align-items:center;justify-content:center;width:8rem;height:8rem;border-radius:50%}.mr__leaderboards[_ngcontent-%COMP%]:hover{cursor:pointer}.mr__container--custom-bet[_ngcontent-%COMP%]{margin-top:1rem}@media only screen and (max-height: 680px){.mr__container--custom-bet[_ngcontent-%COMP%]{margin-top:.5rem}}.mr__container--wrapper-play[_ngcontent-%COMP%]{width:100%;margin-top:1rem;margin-bottom:0;z-index:2}.mr__container--wrapper-play[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{width:26rem;white-space:pre-wrap}"]}),n})();var czt=ve.EIcons;function lzt(t,n){if(1&t&&(p(0,"span",38),H(1),V(2,"translate"),m()),2&t){const o=_().index;d(),ze(" ",$(2,1,o+1===1?"TOURNAMENTS.FIRST_PLACE_PRIZE":"TOURNAMENTS.SECOND_PLACE_PRIZE")," ")}}function uzt(t,n){1&t&&(p(0,"span",39),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TOURNAMENTS.BLITZ.PRIZE")," "))}function dzt(t,n){if(1&t&&B(0,"currency-component",40),2&t){const o=_().$implicit,e=_(2);l("currency",e.currencyType.Chips)("value",o.amount*e.poolSettings.roomSettings.game.players.perTeam)}}function pzt(t,n){if(1&t&&(p(0,"div",32)(1,"div",33)(2,"p",34),U(3,lzt,3,3,"span",35)(4,uzt,3,3,"span",36),m(),U(5,dzt,1,2,"currency-component",37),m()()),2&t){const o=n.$implicit,e=_(2);d(3),l("ngIf",e.poolSettings.roomSettings.game.players.perTeam>1),d(),l("ngIf",1===e.poolSettings.roomSettings.game.players.perTeam),d(),l("ngIf",o)}}function hzt(t,n){if(1&t&&(p(0,"span",44),H(1),V(2,"translate"),m()),2&t){const o=_().index;d(),ze(" ",$(2,1,o+1===1?"TOURNAMENTS.FIRST_PLACE_PRIZE":"TOURNAMENTS.SECOND_PLACE_PRIZE")," ")}}function mzt(t,n){1&t&&(p(0,"span",44),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TOURNAMENTS.BLITZ.PRIZE")," "))}function fzt(t,n){if(1&t&&(Tn(0),p(1,"p",41),U(2,hzt,3,3,"span",42)(3,mzt,3,3,"span",42),B(4,"currency-component",43),m(),Pn()),2&t){const o=n.$implicit,e=_(2);d(2),l("ngIf",e.poolSettings.roomSettings.game.players.perTeam>1),d(),l("ngIf",1===e.poolSettings.roomSettings.game.players.perTeam),d(),l("currency",e.currencyType.Chips)("value",o.amount)}}function gzt(t,n){if(1&t&&(p(0,"span",38),H(1),V(2,"translate"),m()),2&t){const o=_().index;d(),ze(" ",$(2,1,o+1===1?"TOURNAMENTS.FIRST_PLACE_PRIZE":"TOURNAMENTS.SECOND_PLACE_PRIZE")," ")}}function _zt(t,n){1&t&&(p(0,"span",38),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TOURNAMENTS.BLITZ.PRIZE")," "))}function vzt(t,n){if(1&t&&(p(0,"p",46),H(1),V(2,"formatNumber"),m()),2&t){const o=_().$implicit,e=_(2);d(),ze(" ",$(2,1,o.amount*e.poolSettings.roomSettings.game.players.perTeam)," ")}}function bzt(t,n){if(1&t&&(p(0,"div",32)(1,"div",33)(2,"p",34),U(3,gzt,3,3,"span",35)(4,_zt,3,3,"span",35),m(),U(5,vzt,3,3,"p",45),m()()),2&t){const o=n.$implicit,e=_(2);d(3),l("ngIf",e.poolSettings.roomSettings.game.players.perTeam>1),d(),l("ngIf",1===e.poolSettings.roomSettings.game.players.perTeam),d(),l("ngIf",o)}}function Czt(t,n){if(1&t&&(p(0,"button-text",47),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("bclass","btt__play--button-bclass")("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION),d(),se($(2,3,"TEXT.PLAY_NOW"))}}const yzt=()=>({url:"icons/locker3d.png"});function Szt(t,n){if(1&t&&(p(0,"button-icon-text",48),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("image",pt(8,yzt))("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION)("bclass","btt__play--button-bclass btt__button--disabled")("disabled",!0),d(),mu("",$(2,6,"LABEL.LEVEL")," ",o.levelRequirement.requiredLevel,"")}}const l1e=t=>[t];function wzt(t,n){if(1&t&&(p(0,"section",2),B(1,"div",3),p(2,"div",4)(3,"div",5),B(4,"div",6),p(5,"div",7)(6,"p",8),H(7),V(8,"translate"),m()(),p(9,"div",9),B(10,"p",10),V(11,"translate"),m(),p(12,"div",11)(13,"p",12),H(14),V(15,"translate"),m()(),p(16,"div",13)(17,"p",14),H(18),V(19,"translate"),m(),B(20,"entry-fee",15),m(),p(21,"div",16),B(22,"entry-fee",17),p(23,"div",18),U(24,pzt,6,3,"div",19),m()(),p(25,"div",20)(26,"div",21),U(27,fzt,5,4,"ng-container",22),m(),p(28,"div",23)(29,"div",24),B(30,"div",25),m(),B(31,"div",26),m()()(),p(32,"div",27),U(33,bzt,6,3,"div",19),m(),p(34,"div",28),U(35,Czt,3,5,"button-text",29)(36,Szt,3,9,"ng-template",null,30,ft),m(),B(38,"div",31),m()()),2&t){const o=Kt(37),e=_();l("ngClass","btt__"+e.tileSizeMap[e.tileConfig.size]+" "+e.tileConfig.id),d(7),se($(8,12,"TOURNAMENTS."+e.poolSettings.id.toUpperCase())),d(3),l("innerHtml",$(11,14,"TOURNAMENTS."+e.poolSettings.id.toUpperCase()+"_V6"),Yn),d(4),se(yt(15,16,"TOURNAMENTS."+e.tileConfig.description.toUpperCase(),ne(22,l1e,e.maxRounds))),d(4),ze("",yt(19,19,"TOURNAMENTS."+e.tileConfig.description.toUpperCase(),ne(24,l1e,e.maxRounds))," /"),d(2),l("amount",e.poolSettings.roomSettings.transactions.bet),d(2),l("amount",e.poolSettings.roomSettings.transactions.bet),d(2),l("ngForOf",e.rewards),d(3),l("ngForOf",e.rewards),d(6),l("ngForOf",e.rewards),d(2),l("ngIf",e.levelRequirement.isFulfilled)("ngIfElse",o)}}let R7=(()=>{var t;class n extends oy{constructor(e,i,r,s,a,c,u,h,b){super(c,e,i,r,s,a,u,h),this.EButtonModifier=ve.EButtonModifier,this.iconNames=czt,this.currencyType=ln,this.cdr=b,b.detach()}onClick(){const e=this.getTilePermission({roomSettings:this.poolSettings.roomSettings,id:this.tileConfig.id});this.findRoom({pool:this.poolSettings},e),this.cdr.detectChanges()}ngOnChanges(e){this.poolSettings=this.getPoolSettings(this.tileConfig.info.tileData.pools)[0],this.roundsCalculator=new Ve.TournamentRoundsCalculator(this.poolSettings.roomSettings.players.count,this.poolSettings.roomSettings.game.players.perTeam,this.poolSettings.roomSettings.game.players.count,this.poolSettings.roomSettings.players.qualifyingSpots),this.maxRounds=this.roundsCalculator.maxRounds(),this.permission=this.getTilePermission({roomSettings:this.poolSettings.roomSettings,id:this.tileConfig.id}),this.levelRequirement=this.permission.minLevelRequirement,this.rewards=Object.keys(this.poolSettings.roomSettings.transactions.placementRewards).map(r=>this.poolSettings.roomSettings.transactions.placementRewards[r]),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pi),g(Zt),g(on),g(Cn),g(Dt),g(oo),g(ro),g(Zn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["blitz-tournament-tile"]],features:[Ht,it],decls:2,vars:3,consts:[["class","btt__wrapper",3,"ngClass",4,"ngIf"],[3,"ngClass","permission"],[1,"btt__wrapper",3,"ngClass"],[1,"btt__image"],[1,"btt__container"],[1,"btt__container--middle"],[1,"btt__container--room-icon"],[1,"btt__container__name"],[1,"tile__text--name"],[1,"btt__container__name--new-design"],[1,"tile__text--name--new-design",3,"innerHtml"],[1,"btt__container__description"],[1,"tile__text--description"],[1,"btt__container__description--new-design"],[1,"tile__text--description--new-design"],[1,"tile__text--description--new-design-entry",3,"amount"],[1,"btt__container--bet"],[3,"amount"],[1,"btt__container--top-bar","middle"],["class","btt__container--place",4,"ngFor","ngForOf"],[1,"btt__container--img--new-design"],[1,"btt__container--img--info"],[4,"ngFor","ngForOf"],[1,"btt__container--img--icon"],[1,"btt__container--img--icon--cup__container"],[1,"btt__container--img--icon-cup"],[1,"btt__container--img--icon-bling"],[1,"btt__container--top-bar"],[1,"btt__play--button-wrapper"],["class","btt__play--button",3,"bclass","buttonModifier",4,"ngIf","ngIfElse"],["disabledButton",""],[1,"btt__marble"],[1,"btt__container--place"],[1,"btt__info-wrapper"],[1,"btt__text--place"],["class","btt__text--place-text",4,"ngIf"],["class","btt__text--place-text middle",4,"ngIf"],["class","btt__text--place-value-icon",3,"currency","value",4,"ngIf"],[1,"btt__text--place-text"],[1,"btt__text--place-text","middle"],[1,"btt__text--place-value-icon",3,"currency","value"],[1,"btt__container--img--info-place"],["class","btt__text--place-text--new-design",4,"ngIf"],[1,"btt__container--img--info-place--chip",3,"currency","value"],[1,"btt__text--place-text--new-design"],["class","btt__text--place-value",4,"ngIf"],[1,"btt__text--place-value"],[1,"btt__play--button",3,"bclass","buttonModifier"],[1,"button","btt__play--button",3,"image","buttonModifier","bclass","disabled"]],template:function(e,i){1&e&&(U(0,wzt,39,26,"section",0),B(1,"restriction-cover",1)),2&e&&(l("ngIf",i.poolSettings),d(),l("ngClass","blitz-restriction-cover "+i.tileConfig.id)("permission",i.permission))},dependencies:[Xe,Mt,Ne,gM,pn,so,So,Lu,qe,Go],styles:[".btt__container--place[_ngcontent-%COMP%]   .btt__text--place-value[_ngcontent-%COMP%], .btt__container--place[_ngcontent-%COMP%]   .btt__text--place[_ngcontent-%COMP%]{font-weight:600;font-size:1.4rem}@media only screen and (max-width: 768px){.btt__container--place[_ngcontent-%COMP%]   .btt__text--place-value[_ngcontent-%COMP%], .btt__container--place[_ngcontent-%COMP%]   .btt__text--place[_ngcontent-%COMP%]{font-size:1.2rem}}.btt__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-flow:column nowrap}.btt__info-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column}.btt__container--top-bar[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;padding:.5rem}@media only screen and (max-width: 768px){.btt__container--top-bar[_ngcontent-%COMP%]{padding:.2rem}}.btt__container--place[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap;flex:1}.btt__container--place[_ngcontent-%COMP%]   .btt__text--place-text[_ngcontent-%COMP%]{margin:0 .5rem}.btt__container--place[_ngcontent-%COMP%]:nth-of-type(1){align-items:flex-start}.btt__container--place[_ngcontent-%COMP%]:nth-of-type(2){align-items:flex-end}.btt__container--place[_ngcontent-%COMP%]:only-child{width:100%;align-items:center}.btt__container--middle[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column;align-items:center;justify-content:center;overflow:hidden;flex:1}.btt__container--room-icon[_ngcontent-%COMP%]{position:relative;height:100%;min-height:0;max-height:20rem}.btt__image--icon[_ngcontent-%COMP%]{display:block;left:50%;transform:translate(-50%);height:100%;max-height:100%;position:relative}.btt__container__name[_ngcontent-%COMP%]{position:relative;width:80%;text-align:center;padding:.5rem 0}.btt__container__name[_ngcontent-%COMP%]   .tile__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:18px;text-transform:uppercase;font-weight:600}@media only screen and (max-width: 768px){.btt__container__name[_ngcontent-%COMP%]   .tile__text--name[_ngcontent-%COMP%]{font-size:1.4rem;line-height:14px}}@media only screen and (max-width: 480px){.btt__container__name[_ngcontent-%COMP%]   .tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:12px}}.btt__container__description[_ngcontent-%COMP%]{padding:.5rem 0 0}.btt__container__description[_ngcontent-%COMP%]   .tile__text--description[_ngcontent-%COMP%]{font-size:1.2rem;line-height:12px;text-transform:uppercase}.btt__container--bet[_ngcontent-%COMP%]{position:relative;width:100%;line-height:24px}"],changeDetection:0}),n})();var ry=function(t){return t.Leaderboard="leaderboard",t.Info="info",t.Rules="rules",t}(ry||{}),Ha=function(t){return t[t.NotStarted=0]="NotStarted",t[t.InActive=1]="InActive",t[t.Active=2]="Active",t[t.Ended=3]="Ended",t}(Ha||{});let k7=(()=>{var t;class n{constructor(){this.defaultTab=ry.Info,this.popupStateBSubject=new Qn({roomInfo:null,opened:!1,tab:this.defaultTab})}openInfoPopup(e,i=this.defaultTab){console.log("OPEN POPUP",i),this.popupStateBSubject.next({roomInfo:e,opened:!0,tab:i})}closeInfoPopup(){this.popupStateBSubject.next({roomInfo:null,opened:!1,tab:this.defaultTab})}getStateObservable(){return this.popupStateBSubject.asObservable()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Tzt=__webpack_require__(92819),Pzt=__webpack_require__.n(Tzt),Izt=ve.EButtonModifier,Mzt=ve.EIcons;const Ozt=["timer"];function Ezt(t,n){1&t&&(p(0,"div",42),B(1,"div",43),p(2,"p"),H(3),V(4,"translate"),m()()),2&t&&(d(3),se($(4,1,"TOURNAMENTS.PROMO.INVITE")))}function xzt(t,n){1&t&&B(0,"img",44),2&t&&l("imgSrc",_().backgroundImage)}function Azt(t,n){if(1&t){const o=Ce();p(0,"timer",49,50),Y("onCountdownFinished",function(){return oe(o),re(_(2).onStateExpired())}),m()}if(2&t){const o=_(2);l("milliseconds",o.timeToNextState)("timerConfig",o.timerConfig)("hidden",!1)}}function Rzt(t,n){if(1&t&&(p(0,"div",45)(1,"span",46),H(2),V(3,"translate"),m(),p(4,"span",47),U(5,Azt,2,3,"timer",48),m()()),2&t){const o=_();d(2),se($(3,2,o.upperLabelTranslationKey)),d(3),l("ngIf",o.poolSettings.activeHours)}}function kzt(t,n){1&t&&B(0,"div")}function Lzt(t,n){if(1&t&&(p(0,"div",51),B(1,"img",52),V(2,"transformUrl"),m()),2&t){const o=_();d(),l("src",$(2,1,o.isInviteOnly()?"tournaments_lobby/ClosedTour-Icon.png":"tournaments_lobby/professionals_placeholder.png"),Wn)}}function Dzt(t,n){1&t&&B(0,"professionals",53),2&t&&l("leaders",_().leaderboard)}function Bzt(t,n){if(1&t&&(p(0,"p",54),H(1),V(2,"textLimit"),m()),2&t){const o=_();d(),se(yt(2,1,o.parsedTranslations.title.toUpperCase(),50))}}function Nzt(t,n){if(1&t&&(p(0,"div",55)(1,"h1",46),H(2),V(3,"translate"),m()()),2&t){const o=_();d(2),se($(3,1,o.stateTranslationKey))}}function Fzt(t,n){if(1&t){const o=Ce();p(0,"timer",58,50),Y("onCountdownFinished",function(){return oe(o),re(_(2).onStateExpired())}),m()}if(2&t){const o=_(2);l("milliseconds",o.timeToNextState)("timerConfig",o.timerConfig)("hidden",!1)}}function Uzt(t,n){if(1&t&&(p(0,"div",56)(1,"span",46),H(2),V(3,"translate"),m(),p(4,"span",47),U(5,Fzt,2,3,"timer",57),m()()),2&t){const o=_();d(2),se($(3,2,o.stateTranslationKey)),d(3),l("ngIf",o.poolSettings.activeHours)}}function Gzt(t,n){if(1&t){const o=Ce();p(0,"timer",58,50),Y("onCountdownFinished",function(){return oe(o),re(_(2).onStateExpired())}),m()}if(2&t){const o=_(2);l("milliseconds",o.timeToNextState)("timerConfig",o.timerConfig)("hidden",!1)}}function Vzt(t,n){if(1&t&&(p(0,"div",59)(1,"span",46),H(2),V(3,"translate"),m(),p(4,"span",47),U(5,Gzt,2,3,"timer",57),m()()),2&t){const o=_();d(2),se($(3,2,o.stateTranslationKey)),d(3),l("ngIf",o.poolSettings.activeHours)}}function zzt(t,n){if(1&t&&(p(0,"button-text",64),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),ze("",$(2,2,o.stateTranslationKey)," ")}}function jzt(t,n){1&t&&(p(0,"span",46),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TOURNAMENTS.PROMO.INVITE_ONLY")))}function Hzt(t,n){if(1&t){const o=Ce();p(0,"timer",65,50),Y("onCountdownFinished",function(){return oe(o),re(_(2).onStateExpired())}),m()}if(2&t){const o=_(2);l("milliseconds",o.timeToNextState)("timerConfig",o.timerConfig)("hidden",!0)}}function qzt(t,n){if(1&t&&(p(0,"div",60),U(1,zzt,3,4,"button-text",61)(2,jzt,3,3,"span",62)(3,Hzt,2,3,"timer",63),m()),2&t){const o=_();d(),l("ngIf",!o.isInviteOnly()||o.tileData.hasInvitation),d(),l("ngIf",o.isInviteOnly()&&!o.tileData.hasInvitation),d(),l("ngIf",o.poolSettings.activeHours)}}function Wzt(t,n){if(1&t&&(p(0,"p",66),H(1),m()),2&t){const o=_();d(),ze(" ",o.parsedTranslations.prize," ")}}function $zt(t,n){1&t&&B(0,"professionals",67),2&t&&l("leaders",_().leaderboard)}function Kzt(t,n){if(1&t&&(p(0,"span",68),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se($(2,1,o.upperLabelTranslationKey||o.stateTranslationKey))}}function Zzt(t,n){if(1&t){const o=Ce();p(0,"timer",72,50),Y("onCountdownFinished",function(){return oe(o),re(_(2).onStateExpired())}),m()}if(2&t){const o=_(2);l("milliseconds",o.timeToNextState)("timerConfig",o.timerConfig)("hidden",!1)}}function Qzt(t,n){if(1&t&&(p(0,"span",69),B(1,"icon-component",70),U(2,Zzt,2,3,"timer",71),m()),2&t){const o=_();d(),l("icon",o.iconNames.CalendarPromoTournament),d(),l("ngIf",o.poolSettings.activeHours)}}function Yzt(t,n){if(1&t&&(p(0,"span",73),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se($(2,1,o.stateTranslationKey))}}function Jzt(t,n){if(1&t&&(p(0,"p",66),H(1),m()),2&t){const o=_();d(),ze(" ",o.parsedTranslations.prize," ")}}function Xzt(t,n){if(1&t&&(p(0,"button-text",77),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("disabled",o.getState()===o.stateEnums.InActive||o.getState()===o.stateEnums.NotStarted)("bclass","promo-tt__play--button-bclass")("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),se($(2,4,"TEXT.PLAY_NOW"))}}function ejt(t,n){1&t&&(p(0,"span",78),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TOURNAMENTS.PROMO.INVITE_ONLY")))}function tjt(t,n){if(1&t&&(p(0,"div",74),U(1,Xzt,3,6,"button-text",75)(2,ejt,3,3,"span",76),m()),2&t){const o=_();d(),l("ngIf",!o.isInviteOnly()||o.tileData.hasInvitation),d(),l("ngIf",o.isInviteOnly()&&!o.tileData.hasInvitation)}}const L7=t=>({disabled:t});let D7=(()=>{var t;class n extends oy{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le){super(e,i,s,r,h,a,c,u),this.formatNumberPipe=b,this.infoService=w,this.settings=R,this.timeService=G,this.tournaments=K,this.store=te,this.urlService=ee,this.offerService=le,this.buttonModifier=Izt,this.iconNames=Mzt,this.currencyType=ln,this.timerConfig=new yl(D_).useMonthsConfig({min:Rt.Days,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useDaysConfig({min:Rt.Hours,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).build(),this.stateTranslationKey=null,this.timeToNextState=null,this.stateEnums=Ha,this.leaderboard=null}ngOnChanges(e){this.tileData=this.tileConfig.info.tileData,this.poolSettings=this.tileData.poolSettings,this.permission=this.tileConfig.info.tileData.registered?void 0:this.getTilePermission({roomSettings:this.poolSettings.roomSettings,id:this.tileData.roomType}),this.roomBetValue=this.poolSettings.roomSettings.transactions.bet,this.poolSettings.activeHours=N0()(this.poolSettings.activeHours,["from"]),this.determineState(),this.parsedTranslations=this.tournaments.getTranslations(this.poolSettings.id,this.settings.getLanguage()),this.leaderboard=this.tileData.leaderboard.rankings.map(i=>i.profile),this.setTournamentBackgroundImage()}ngOnDestroy(){this.popup.hide(this.offerPopupId)}onClick(){let e,i=this.getState();if(this.isInviteOnly()&&!this.tileData.hasInvitation)return e=this.convertStateToLeaderboardState(i),void this.openInfoPopup(null,e);i===Ha.Active?this.activeTournamentHandler():(e=this.convertStateToLeaderboardState(i),this.openInfoPopup(null,e))}activeTournamentHandler(){if(!this.tileConfig.info.tileData.registered){const i=this.getTilePermission({id:this.tileConfig.info.tileData.roomType,roomSettings:this.poolSettings.roomSettings});if(!i.isPermitted)return void this.handleUserRestrictions(i)}if(null==this.poolSettings.roomSettings.transactions.bet||0===this.poolSettings.roomSettings.transactions.bet||!0===this.tournaments.getPromoTournamentInfo(this.poolSettings.id).tournamentData.registered)this.enterMatchmakingQueue();else{const e=this.store.selectWallet().chips,i=this.poolSettings.roomSettings.transactions.bet;if(e<i)return void this.offerService.offerCurrency({targetValue:i,itemType:Fe.TG.ChipPack,description:{key:"TOURNAMENTS.PROMO.NOT_ENOUGH_CHIPS"}});this.showConfirmPopup(()=>{this.enterMatchmakingQueue()},r=>{this.popup.hide(r)})}}enterMatchmakingQueue(){const e=this.tileConfig.info.tileData,i=e.registered?void 0:this.getTilePermission({roomSettings:this.poolSettings.roomSettings,id:e.roomType});this.findRoom({pool:this.poolSettings},i,this.tournaments.getPromoTournamentInfo(this.poolSettings.id).tournamentData.registered)}determineState(){let e=Ha.InActive;const i=this.timeService.getServerTimeS();i<this.poolSettings.activeHours[0].from?e=Ha.NotStarted:i>=Pzt()(this.poolSettings.activeHours).to?e=Ha.Ended:!0===this.isInActiveTimeFrame(i)&&(e=Ha.Active),this.changeTranslationStateKey(e),this.timeToNextState=this.calculateTimeToNextState(e,i,this.poolSettings.activeHours),this.stopTimer(),this.setState(e),this.startTimer(this.timeToNextState)}onStateExpired(){console.log("State expired!"),this.determineState()}isInActiveTimeFrame(e){return null!=this.getTimestampActiveRange(e)}openInfoPopup(e,i){e&&e.stopPropagation(),i=this.convertStateToLeaderboardState(this.getState()),this.infoService.openInfoPopup({state:this.getState(),tournamentData:this.tileConfig.info.tileData},i)}getState(){return this.state}convertStateToLeaderboardState(e){let i;switch(e){case Ha.NotStarted:i=ry.Info;break;case Ha.Active:case Ha.Ended:i=ry.Leaderboard;break;case Ha.InActive:i=ry.Info}return i}isInviteOnly(){return this.tileData.tournamentType===kd.EPromoTournamentType.InviteOnly}startTimer(e){this.timer&&this.timer.start(e)}stopTimer(){this.timer&&this.timer.stop()}setState(e){this.state=e}changeTranslationStateKey(e){e===Ha.NotStarted?(this.stateTranslationKey="TOURNAMENTS.PROMO.STATES.BEGINS_IN",this.upperLabelTranslationKey=""):e===Ha.Active?(this.stateTranslationKey="TOURNAMENTS.PROMO.STATES.PLAY_NOW",this.upperLabelTranslationKey="TOURNAMENTS.PROMO.STATES.ENDS_IN"):e===Ha.Ended?(this.stateTranslationKey="TOURNAMENTS.PROMO.STATES.COMPLETED",this.upperLabelTranslationKey=""):(this.stateTranslationKey="TOURNAMENTS.PROMO.STATES.PLAY_IN",this.upperLabelTranslationKey="")}calculateTimeToNextState(e,i,r){let s=null;return e===Ha.NotStarted?s=r[0].from-i:e===Ha.Active?s=this.getTimestampActiveRange(i).to-i:e===Ha.InActive&&(s=this.findNextActiveTimeFrame(e,i,r).from-i),1e3*s}findNextActiveTimeFrame(e,i,r){let s=null;if(e===Ha.NotStarted)s=r[0];else if(e===Ha.InActive)for(let a=1;a<r.length;a++)r[a-1].to<=i&&i<r[a].from&&(s=r[a]);else if(e===Ha.Active){let a=this.getTimestampActiveRange(i);s=b_()(this.poolSettings.activeHours,c=>a.to<c.from)}return s}getTimestampActiveRange(e){let i=null;return this.poolSettings.activeHours.forEach(r=>{e>=r.from&&e<r.to&&(i=r)}),i}showConfirmPopup(e,i){const r=this.popup.confirm({buttons:{action:()=>e(),actionDecline:()=>i(r)},textParams:{translationKey:"TOURNAMENTS.PROMO.ENTRY_FEE",params:[this.formatNumberPipe.transform(this.poolSettings.roomSettings.transactions.bet)]}})}setTournamentBackgroundImage(){this.tileConfig.backgroundImage&&(this.backgroundImage=this.urlService.isBase64(this.tileConfig.backgroundImage)?this.tileConfig.backgroundImage:this.urlService.createCdnPath({url:"".concat(Lt.CONFIG.core.cdn.path.tournaments).concat(this.tileConfig.backgroundImage)}))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oo),g(Pi),g(on),g(Zt),g(Dt),g(ro),g(Zn),g(Cn),g(Go),g(k7),g(nc),g(Bn),g(s1),g(J),g(ii),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["promo-tournament-tile"]],viewQuery:function(e,i){if(1&e&&$e(Ozt,5),2&e){let r;je(r=He())&&(i.timer=r.first)}},features:[Ht,it],decls:57,vars:51,consts:[["class","promo-tt__invite--only-indicator",4,"ngIf"],[1,"promo-tt__wrapper"],["class","promo-tt__image--background-image","empty-placeholder","","alt","background image",3,"imgSrc",4,"ngIf"],[1,"promo-tt__container--upper"],["class","promo-tt__container--upper-label",4,"ngIf"],[1,"promo-tt__container--middle"],[4,"ngIf","ngIfThen","ngIfElse"],["placeholder",""],["professionals",""],[1,"promo-tt__container__name"],["class","promo-tt__text--title",4,"ngIf"],[1,"promo-tt__container__description"],["class","promo-tt__container--state",4,"ngIf"],["class","promo-tt__container--state inactive",4,"ngIf"],["class","promo-tt__container--state not-started",4,"ngIf"],["class","promo-tt__container--play",4,"ngIf"],[1,"options-trigger",3,"click"],[1,"options-trigger__icon",3,"icon"],[1,"promo-tt__container--top-bar"],[1,"promo-tt__container--top-item"],[1,"promo-tt__text--top-item-label"],[1,"promo-tt__text--top-item-value"],["class","promo-tt__text--top-item-value prize",4,"ngIf"],[1,"promo-tt_bottom-info"],[3,"leaders",4,"ngIf"],[1,"promo-tt__info--content"],[1,"promo-tt__info--content--timer--wrapper",3,"ngClass"],[1,"promo-tt__info--content--timer"],["class","promo-tt__info--content--timer--text",4,"ngIf"],["class","promo-tt__info--content--timer--cmp-wrapper",4,"ngIf"],["class","promo-tt__info--content--timer--value",4,"ngIf"],[1,"promo-tt__info--content--button"],[3,"bclass","buttonModifier","click"],[1,"promo-tt__info--content--entry",3,"ngClass"],[1,"promo-tt__info--content--entry--wrapper"],[1,"promo-tt__info--content--entry--text"],[1,"promo-tt__info--content--entry--value",3,"currency","value"],[1,"promo-tt__info--container",3,"ngClass"],[1,"promo-tt__info--content-prize"],["empty-placeholder","",1,"promo-tt__info--content-prize-img",3,"imgSrc"],["class","promo-tt__play--button-wrapper",4,"ngIf"],[1,"promo-tt__restriction-cover",3,"permission"],[1,"promo-tt__invite--only-indicator"],[1,"promo-tt__invite--only-indicator-dot"],["empty-placeholder","","alt","background image",1,"promo-tt__image--background-image",3,"imgSrc"],[1,"promo-tt__container--upper-label"],[1,"promo-tt__text--label"],[1,"promo-tt__timer__value"],[3,"milliseconds","timerConfig","hidden","onCountdownFinished",4,"ngIf"],[3,"milliseconds","timerConfig","hidden","onCountdownFinished"],["timer",""],[1,"promo-tt__container--placeholder"],["alt","",1,"promo-tt__image--placeholder",3,"src"],[1,"promo-tt__leaderboard",3,"leaders"],[1,"promo-tt__text--title"],[1,"promo-tt__container--state"],[1,"promo-tt__container--state","inactive"],["class","promo-tt__timer",3,"milliseconds","timerConfig","hidden","onCountdownFinished",4,"ngIf"],[1,"promo-tt__timer",3,"milliseconds","timerConfig","hidden","onCountdownFinished"],[1,"promo-tt__container--state","not-started"],[1,"promo-tt__container--play"],["class","promo-tt__button--play",3,"buttonModifier",4,"ngIf"],["class","promo-tt__text--label",4,"ngIf"],["class","promo--tt__timer",3,"milliseconds","timerConfig","hidden","onCountdownFinished",4,"ngIf"],[1,"promo-tt__button--play",3,"buttonModifier"],[1,"promo--tt__timer",3,"milliseconds","timerConfig","hidden","onCountdownFinished"],[1,"promo-tt__text--top-item-value","prize"],[3,"leaders"],[1,"promo-tt__info--content--timer--text"],[1,"promo-tt__info--content--timer--cmp-wrapper"],[3,"icon"],["class","promo-tt__info--content--timer",3,"milliseconds","timerConfig","hidden","onCountdownFinished",4,"ngIf"],[1,"promo-tt__info--content--timer",3,"milliseconds","timerConfig","hidden","onCountdownFinished"],[1,"promo-tt__info--content--timer--value"],[1,"promo-tt__play--button-wrapper"],["class","promo-tt__play--button",3,"disabled","bclass","buttonModifier",4,"ngIf"],["class","promo-tt__info--content--invite--only",4,"ngIf"],[1,"promo-tt__play--button",3,"disabled","bclass","buttonModifier"],[1,"promo-tt__info--content--invite--only"]],template:function(e,i){if(1&e&&(U(0,Ezt,5,3,"div",0),p(1,"div",1),U(2,xzt,1,1,"img",2),p(3,"div",3),U(4,Rzt,6,4,"div",4),m(),p(5,"div",5),U(6,kzt,1,0,"div",6)(7,Lzt,3,3,"ng-template",null,7,ft)(9,Dzt,1,1,"ng-template",null,8,ft),p(11,"div",9),U(12,Bzt,3,4,"p",10),m(),p(13,"div",11),U(14,Nzt,4,3,"div",12)(15,Uzt,6,4,"div",13)(16,Vzt,6,4,"div",14)(17,qzt,4,3,"div",15),m()(),p(18,"div",16),Y("click",function(s){return i.openInfoPopup(s)}),B(19,"icon-component",17),m(),p(20,"div",18)(21,"div",19)(22,"p",20),H(23),V(24,"translate"),m(),p(25,"p",21),H(26),m()(),p(27,"div",19)(28,"p",20),H(29),V(30,"translate"),m(),U(31,Wzt,2,1,"p",22),m()(),p(32,"div",23),U(33,$zt,1,1,"professionals",24),p(34,"div",25)(35,"div",26)(36,"div",27),U(37,Kzt,3,3,"span",28)(38,Qzt,3,2,"span",29)(39,Yzt,3,3,"span",30),m()(),p(40,"div",31)(41,"button-text",32),Y("click",function(s){return i.openInfoPopup(s)}),H(42),V(43,"translate"),m()(),p(44,"div",33)(45,"div",34)(46,"p",35),H(47),V(48,"translate"),m(),B(49,"currency-component",36),m()()(),p(50,"div",37)(51,"div",38),B(52,"img",39),V(53,"transformUrl"),U(54,Jzt,2,1,"p",22),m()(),U(55,tjt,3,2,"div",40),m()(),B(56,"restriction-cover",41)),2&e){const r=Kt(8),s=Kt(10);l("ngIf",i.isInviteOnly()&&!i.tileData.hasInvitation),d(),go("background-color",i.tileConfig.backgroundColor),d(),l("ngIf",i.backgroundImage),d(2),l("ngIf",i.upperLabelTranslationKey),d(2),l("ngIf",i.leaderboard&&i.leaderboard.length>0)("ngIfThen",s)("ngIfElse",r),d(6),l("ngIf",null==i.parsedTranslations?null:i.parsedTranslations.title),d(2),l("ngIf",i.getState()===i.stateEnums.Ended),d(),l("ngIf",i.getState()===i.stateEnums.InActive),d(),l("ngIf",i.getState()===i.stateEnums.NotStarted),d(),l("ngIf",i.getState()===i.stateEnums.Active),d(2),l("icon",i.iconNames.TROPHY),d(4),se($(24,35,"TOURNAMENTS.PROMO.INFO_POPUP.ENTRY")),d(3),ze(" ",i.roomBetValue," "),d(3),se($(30,37,"TOURNAMENTS.PROMO.INFO_POPUP.PRIZE")),d(2),l("ngIf",i.parsedTranslations),d(2),l("ngIf",i.leaderboard&&i.leaderboard.length>0),d(2),l("ngClass",ne(45,L7,i.getState()===i.stateEnums.Ended)),d(2),l("ngIf",i.getState()!==i.stateEnums.Ended),d(),l("ngIf",i.getState()!==i.stateEnums.Ended&&(i.upperLabelTranslationKey||i.stateTranslationKey)),d(),l("ngIf",i.getState()===i.stateEnums.Ended),d(2),l("bclass","promo-tt__play--button-bclass")("buttonModifier",i.buttonModifier.BUTTON_ACTION),d(),se($(43,39,"TOURNAMENTS.INFO")),d(2),l("ngClass",ne(47,L7,i.getState()===i.stateEnums.Ended)),d(3),se($(48,41,"LOBBY.BET")),d(2),l("currency",i.currencyType.Chips)("value",i.roomBetValue),d(),l("ngClass",ne(49,L7,i.getState()===i.stateEnums.Ended)),d(2),l("imgSrc",$(53,43,"tournaments_lobby/icon_prize.png")),d(2),l("ngIf",i.parsedTranslations),d(),l("ngIf",i.getState()!==i.stateEnums.Ended),d(),l("permission",i.permission)}},dependencies:[Xe,Ne,$o,Fs,BC,Dn,pn,So,Lu,qe,uo,CR],styles:[".promo-tt__container--top-item[_ngcontent-%COMP%]   .promo-tt__text--top-item-value[_ngcontent-%COMP%], .promo-tt__container--top-item[_ngcontent-%COMP%]   .promo-tt__text--top-item-label[_ngcontent-%COMP%]{font-weight:600;font-size:1.4rem}@media only screen and (max-width: 768px){.promo-tt__container--top-item[_ngcontent-%COMP%]   .promo-tt__text--top-item-value[_ngcontent-%COMP%], .promo-tt__container--top-item[_ngcontent-%COMP%]   .promo-tt__text--top-item-label[_ngcontent-%COMP%]{font-size:1.2rem}}.promo-tt__container__description[_ngcontent-%COMP%]   .tile__text--description[_ngcontent-%COMP%]{font-size:1.4rem;line-height:14px}.promo-tt__text--label[_ngcontent-%COMP%]{font-size:1.8rem;text-transform:uppercase}.promo-tt__container--top-bar[_ngcontent-%COMP%]{width:100%;flex-flow:row wrap;justify-content:space-between;min-height:2rem;padding:.5rem}@media only screen and (max-width: 768px){.promo-tt__container--top-bar[_ngcontent-%COMP%]{padding:.2rem}}.promo-tt__container--top-item[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;align-items:center}.promo-tt__container--top-item[_ngcontent-%COMP%]   .promo-tt__text--top-item-label[_ngcontent-%COMP%]{margin:0 .5rem}.promo-tt__container--play[_ngcontent-%COMP%]{min-width:12rem}.promo-tt__container--placeholder[_ngcontent-%COMP%]{min-height:0;max-height:20rem;height:100%;position:relative}.promo-tt__image--placeholder[_ngcontent-%COMP%]{display:block;left:50%;transform:translate(-50%);height:100%;max-height:100%;position:absolute}.promo-tt__container__name[_ngcontent-%COMP%]{position:relative;width:80%;text-align:center;padding:.5rem 0}.promo-tt__container__name[_ngcontent-%COMP%]   .promo-tt__text--title[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600}.promo-tt__container__description[_ngcontent-%COMP%]{padding:.5rem 0 0;z-index:2}.promo-tt__container__description[_ngcontent-%COMP%]   .tile__text--description[_ngcontent-%COMP%]{text-transform:uppercase}.promo-tt__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-flow:column nowrap;overflow:hidden}.promo-tt__container--middle[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column;align-items:center;justify-content:center;flex:1;overflow:hidden}.promo-tt__timer[_ngcontent-%COMP%]{font-size:1.8rem}.promo-tt__container--state[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:center}.promo-tt__container--state.not-started[_ngcontent-%COMP%]   .promo-tt__text--label[_ngcontent-%COMP%]{font-size:2.4rem}@media only screen and (max-width: 768px){.promo-tt__container--state.not-started[_ngcontent-%COMP%]   .promo-tt__text--label[_ngcontent-%COMP%]{font-size:1.4rem}}.promo-tt__container--state.not-started[_ngcontent-%COMP%]   .promo-tt__timer[_ngcontent-%COMP%]{font-size:2.4rem}@media only screen and (max-width: 768px){.promo-tt__container--state.not-started[_ngcontent-%COMP%]   .promo-tt__timer[_ngcontent-%COMP%]{font-size:1.4rem}}.promo-tt__container--state.inactive[_ngcontent-%COMP%]   .promo-tt__text--label[_ngcontent-%COMP%]{font-size:2.4rem}@media only screen and (max-width: 768px){.promo-tt__container--state.inactive[_ngcontent-%COMP%]   .promo-tt__text--label[_ngcontent-%COMP%]{font-size:1.4rem}}.promo-tt__container--state.inactive[_ngcontent-%COMP%]   .promo-tt__timer[_ngcontent-%COMP%]{font-size:2.4rem}@media only screen and (max-width: 768px){.promo-tt__container--state.inactive[_ngcontent-%COMP%]   .promo-tt__timer[_ngcontent-%COMP%]{font-size:1.4rem}}.promo-tt__timer__value[_ngcontent-%COMP%]{margin:0 .5rem}.promo-tt__container--upper[_ngcontent-%COMP%]{min-height:5rem;display:flex;justify-content:center;align-items:center;z-index:1}.promo-tt__container--upper[_ngcontent-%COMP%]   .promo-tt__container--upper-label[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:center}.promo-tt__container--upper[_ngcontent-%COMP%]   .promo-tt__container--upper-label[_ngcontent-%COMP%]   .promo-tt__text--label[_ngcontent-%COMP%]{font-size:2.4rem;padding:0 .5rem}@media only screen and (max-width: 768px){.promo-tt__container--upper[_ngcontent-%COMP%]   .promo-tt__container--upper-label[_ngcontent-%COMP%]   .promo-tt__text--label[_ngcontent-%COMP%]{font-size:1.4rem}}.options-trigger[_ngcontent-%COMP%]{width:5rem;height:5rem;border-radius:50%;margin:.5rem auto;position:relative;justify-content:center;align-items:center}@media only screen and (max-height: 850px){.options-trigger[_ngcontent-%COMP%]{width:3.5rem;height:3.5rem}}.options-trigger[_ngcontent-%COMP%]:hover{cursor:pointer}.promo-tt__invite--only-indicator[_ngcontent-%COMP%]{display:flex;align-items:center;position:absolute;right:0;margin:.5rem;padding:1rem;border-radius:2rem}@media only screen and (max-width: 768px){.promo-tt__invite--only-indicator[_ngcontent-%COMP%]{padding:.5rem}}.promo-tt__invite--only-indicator-dot[_ngcontent-%COMP%]{height:2rem;width:2rem;border-radius:50%;margin:0 .5rem}"]}),n})(),B7=(()=>{var t;class n{constructor(e,i){this.clientConfig=e,this.translations=i}createBuyInValues(e){return this.clientConfig.getConfig().content.matchmaking[e].knockoutTournaments.buyIns.map(i=>({bet:{amount:i.bet,currencyType:ln.Chips},reward:{amount:i.reward,currencyType:ln.Chips},data:i}))}createBuyInViewModel(e){return{bet:e.bet,reward:e.reward,ratio:Math.round(e.reward/e.bet*10)/10}}createDescriptions(e){const i=this.translations.instant("TOURNAMENTS.KNOCKOUT.DESCRIPTION"),r=Object.keys(i).map(c=>({key:"TOURNAMENTS.KNOCKOUT.DESCRIPTION.".concat(c),params:[]})),s=r.find(c=>"TOURNAMENTS.KNOCKOUT.DESCRIPTION.WINS_IN_ROW"===c.key);s&&(s.params=[e.streak]);const a=r.find(c=>"TOURNAMENTS.KNOCKOUT.DESCRIPTION.REWARD"===c.key);return a&&(a.params=[this.createBuyInViewModel(e).ratio]),r}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zt),T(pi))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function njt(t,n){if(1&t&&(p(0,"div",5),B(1,"number",6),p(2,"span",7),H(3,"x"),m()()),2&t){const o=_();d(),l("value",o.ratio)}}let N7=(()=>{var t;class n{constructor(e){this.containerClass="",this.cdr=e,e.detach()}ngOnInit(){this.cdr.detectChanges()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["currency-baloon"]],inputs:{value:"value",type:"type",text:"text",ratio:"ratio",containerClass:"containerClass",valueConfig:"valueConfig",textConfig:"textConfig",itemContainerConfig:"itemContainerConfig"},features:[it],decls:5,vars:8,consts:[[1,"currency__baloon--wrapper",3,"ngClass"],[1,"currency__baloon--arrow--wrapper"],[1,"currency__baloon--arrow"],[1,"currency__baloon--currency-label",3,"value","type","text","valueConfig","textConfig","itemContainerConfig"],["class","currency__baloon--ratio",4,"ngIf"],[1,"currency__baloon--ratio"],[1,"currency__baloon--ratio--number",3,"value"],[1,"currency__baloon--ratio--number-x"]],template:function(e,i){1&e&&(p(0,"container-component",0)(1,"div",1),B(2,"div",2),m(),B(3,"currency-label",3),U(4,njt,4,1,"div",4),m()),2&e&&(l("ngClass",i.containerClass),d(3),l("value",i.value)("type",i.type)("text",i.text)("valueConfig",i.valueConfig)("textConfig",i.textConfig)("itemContainerConfig",i.itemContainerConfig),d(),l("ngIf",i.ratio))},dependencies:[Xe,Ne,Qr,Yh,Ga],styles:['.currency__baloon--wrapper[_ngcontent-%COMP%]{overflow:visible;margin-top:12px;height:auto}.currency__baloon--arrow--wrapper[_ngcontent-%COMP%]{transform:translate(-50%,-100%) translateY(4px) rotate(90deg);position:absolute;left:50%;display:flex}.currency__baloon--arrow[_ngcontent-%COMP%]{display:inline-block;position:relative;overflow:hidden;padding-right:12px;height:20px}.currency__baloon--arrow[_ngcontent-%COMP%]:after{content:"";position:absolute;width:12px;height:12px;right:0;top:50%;transform:translate(50%,-50%) rotate(45deg)}.currency__baloon--currency-label[_ngcontent-%COMP%]{padding:.5rem 1rem}@media screen and (max-width: 568px),screen and (max-height: 568px){.currency__baloon--currency-label[_ngcontent-%COMP%]{padding:.25rem .5rem}}.currency__baloon--ratio[_ngcontent-%COMP%]{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;transform:translate(40%,-60%);height:5rem;width:5rem;font-weight:900;font-size:1.8rem}@media screen and (max-width: 568px),screen and (max-height: 568px){.currency__baloon--ratio[_ngcontent-%COMP%]{font-size:1rem;width:3rem;height:3rem}}.currency__baloon--ratio--number[_ngcontent-%COMP%]{font-size:1.8rem}@media screen and (max-width: 568px),screen and (max-height: 568px){.currency__baloon--ratio--number[_ngcontent-%COMP%]{font-size:1rem}}.currency__baloon--ratio--number-x[_ngcontent-%COMP%]{line-height:1}'],changeDetection:0}),n})();function ijt(t,n){1&t&&(p(0,"div",6),B(1,"div",7),m())}const ojt=(t,n)=>({selected:t,completed:n}),rjt=t=>({completed:t});let F7=(()=>{var t;class n{constructor(e){this.EIcons=ve.EIcons,this.cdr=e,e.detach()}ngOnInit(){this.isSelected=this.isCurrent,this.updateView()}ngOnChanges(e){e.isCurrent&&(this.isSelected=e.isCurrent.currentValue),this.updateView()}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["game-index"]],inputs:{value:"value",isCurrent:"isCurrent",isCompleted:"isCompleted",showRays:"showRays"},features:[it],decls:8,vars:13,consts:[[1,"game__index-wrapper",3,"ngClass"],[1,"game__index--text"],[1,"game__index--value",3,"value"],["class","games__index--rays-wrapper",4,"ngIf"],[1,"game__index--icon-wrapper",3,"ngClass"],[1,"game__index--icon",3,"icon"],[1,"games__index--rays-wrapper"],[1,"games__index--rays"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"p",1),H(2),V(3,"translate"),m(),B(4,"number",2),m(),U(5,ijt,2,0,"div",3),p(6,"div",4),B(7,"icon-component",5),m()),2&e&&(l("ngClass",cn(8,ojt,i.isSelected,i.isCompleted)),d(2),se($(3,6,"TOURNAMENTS.KNOCKOUT.GAME")),d(2),l("value",i.value),d(),l("ngIf",i.showRays),d(),l("ngClass",ne(11,rjt,i.isCompleted)),d(),l("icon",i.EIcons.TICK_ICON))},dependencies:[Xe,Ne,Dn,Qr,qe],styles:['[_nghost-%COMP%]{position:relative;display:block;width:100%}[_nghost-%COMP%]:before{display:block;content:"";width:100%;padding-top:var(--aspect-ratio, 100%)}[_nghost-%COMP%] > [_ngcontent-%COMP%]:first-child{position:absolute;top:0;left:0;right:0;bottom:0}.game__index-wrapper[_ngcontent-%COMP%]{position:relative;height:100%;width:100%;display:flex;flex-flow:column;justify-content:center;align-items:center}.game__index--icon-wrapper[_ngcontent-%COMP%]{position:absolute;width:3rem;height:3rem;border-radius:50%;display:flex;justify-content:center;align-items:center}.game__index--icon-wrapper.completed[_ngcontent-%COMP%]{transition:transform .4s ease}@keyframes _ngcontent-%COMP%_show-icon{0%{transform:scale(0)}to{transform:scale(1)}}'],changeDetection:0}),n})();const sjt=["content"],ajt=["arrow"],cjt=["gameIndexWrapper"],ljt=t=>({first:t}),ujt=t=>({filled:t});function djt(t,n){if(1&t&&(p(0,"div",11),B(1,"div",12)(2,"div",13),m()),2&t){const o=_(),e=o.first,i=o.index,r=_();l("ngClass",ne(2,ljt,e)),d(2),l("ngClass",ne(4,ujt,i+1<=r.completedGamesStep))}}function pjt(t,n){if(1&t&&(Tn(0),U(1,djt,3,6,"div",10),Pn()),2&t){const o=n.last;d(),l("ngIf",!o)}}function hjt(t,n){if(1&t&&B(0,"game-index",18),2&t){const o=_().index,e=_();l("value",o+1)("isCurrent",e.currentStep===o)}}const u1e=(t,n)=>({first:t,last:n}),mjt=t=>({last:t});function fjt(t,n){if(1&t&&(Tn(0),p(1,"div",14,15),U(3,hjt,1,2,"game-index",16),B(4,"game-index",17),m(),Pn()),2&t){const o=n.first,e=n.last,i=n.index,r=_();d(),l("ngClass",cn(7,u1e,o,e)),d(2),l("ngIf",r.currentStep===i&&i!==r.completedGamesStep),d(),l("ngClass",ne(10,mjt,e))("value",i+1)("showRays",e&&r.currentStep===i)("isCompleted",i<=r.completedGamesStep)("isCurrent",r.currentStep===i)}}const gjt=()=>({key:"LOBBY.BET"}),d1e=()=>({class:"currency__baloon--item-container-config-bclass"}),p1e=()=>({class:"currency__baloon--text-config-bclass",iconClass:"currency__baloon--text-config-bclass"}),h1e=()=>({class:"currency__baloon--value-config-bclass",iconClass:"currency__baloon--value-config-icon-bclass"});function _jt(t,n){if(1&t&&B(0,"currency-baloon",21),2&t){const o=_(2);l("containerClass","currency__baloon-cclass")("type",o.ECurrencyType.Chips)("value",o.buyInViewModel.bet)("text",pt(7,gjt))("itemContainerConfig",pt(8,d1e))("textConfig",pt(9,p1e))("valueConfig",pt(10,h1e))}}const vjt=()=>({key:"LOBBY.WIN"});function bjt(t,n){if(1&t&&B(0,"currency-baloon",22),2&t){const o=_(2);l("containerClass","currency__baloon-cclass")("type",o.ECurrencyType.Chips)("value",o.buyInViewModel.reward)("ratio",o.buyInViewModel.ratio)("text",pt(8,vjt))("itemContainerConfig",pt(9,d1e))("textConfig",pt(10,p1e))("valueConfig",pt(11,h1e))}}function Cjt(t,n){if(1&t&&(Tn(0),p(1,"div",14),U(2,_jt,1,11,"currency-baloon",19)(3,bjt,1,12,"currency-baloon",20),m(),Pn()),2&t){const o=n.first,e=n.last;d(),l("ngClass",cn(3,u1e,o,e)),d(),l("ngIf",o),d(),l("ngIf",e)}}let U7=(()=>{var t;class n{constructor(e,i){this.EIcons=ve.EIcons,this.ECurrencyType=ln,this.visibleGames=1,this.nextGameVisiblePercent=.5,this.gameWidth=25,this.cdr=e,e.detach(),this.viewModelFactory=i}ngOnInit(){this.gamesCount=new Array(this.stepsCount),this.completedGamesStep=this.completedStep,this.selectGame(this.step,!1),this.scrollTo(this.currentStep,!1),this.updateView()}ngOnChanges(e){e.stepsCount&&(this.gamesCount=new Array(this.stepsCount)),e.buyIn&&(this.buyInViewModel=this.viewModelFactory.createBuyInViewModel(this.buyIn)),this.updateView()}ngOnDestroy(){cancelAnimationFrame(this.scrollContainerRafId),cancelAnimationFrame(this.selectGameRafId)}selectGame(e,i=!0){this.currentStep=e,this.updateView(),cancelAnimationFrame(this.selectGameRafId),this.selectGameRafId=requestAnimationFrame(()=>{const r=this.arrow.nativeElement;r.style.transition=i?"transform ease 0.3s":"",r.style.transform="translateX(".concat(this.calcScroll(e),"%)")})}setCompletedGamesStep(e){this.completedGamesStep=e,this.updateView()}scrollTo(e,i=!0){cancelAnimationFrame(this.scrollContainerRafId),this.scrollContainerRafId=requestAnimationFrame(()=>{if(e!==this.stepsCount){const r=this.content.nativeElement;r.style.transition=i?"transform ease 0.5s":"",r.style.transform="translateX(-".concat(this.calcScroll(e),"%)")}})}trackGames(e,i){return e}updateView(){this.cdr.detectChanges()}calcScroll(e){return this.gameWidth*e+2*this.getMarginSide(this.visibleGames)*e}getMarginSide(e){return(100-this.gameWidth*e)/(2*(e+1))-(e<this.stepsCount?this.gameWidth*(e*this.nextGameVisiblePercent/2):0)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(B7))},t.\u0275cmp=pe({type:t,selectors:[["games-progress"]],viewQuery:function(e,i){if(1&e&&($e(sjt,7),$e(ajt,7,$t),$e(cjt,5,$t)),2&e){let r;je(r=He())&&(i.content=r.first),je(r=He())&&(i.arrow=r.first),je(r=He())&&(i.gameIndices=r)}},inputs:{stepsCount:"stepsCount",step:"step",buyIn:"buyIn",completedStep:"completedStep"},features:[it],decls:12,vars:7,consts:[[1,"game__progress--wrapper"],[1,"game__progress--content-wrapper"],["content",""],[1,"games__progress--icon__wrapper"],["arrow",""],[1,"game__index--arrow",3,"icon"],[1,"games__progress-steps-wrapper"],[1,"games__progress--line-wrapper"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"games__progress-steps-wrapper","currency"],["class","games__progress--game-line-container",3,"ngClass",4,"ngIf"],[1,"games__progress--game-line-container",3,"ngClass"],[1,"games__progress--game-line"],[1,"games__progress--game-line-completed",3,"ngClass"],[1,"games__progress--wrapper",3,"ngClass"],["gameIndexWrapper",""],["class","games__progress--game-index current",3,"value","isCurrent",4,"ngIf"],[1,"games__progress--game-index",3,"ngClass","value","showRays","isCompleted","isCurrent"],[1,"games__progress--game-index","current",3,"value","isCurrent"],["class","currency__baloon",3,"containerClass","type","value","text","itemContainerConfig","textConfig","valueConfig",4,"ngIf"],["class","currency__baloon",3,"containerClass","type","value","ratio","text","itemContainerConfig","textConfig","valueConfig",4,"ngIf"],[1,"currency__baloon",3,"containerClass","type","value","text","itemContainerConfig","textConfig","valueConfig"],[1,"currency__baloon",3,"containerClass","type","value","ratio","text","itemContainerConfig","textConfig","valueConfig"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1,2)(3,"div",3,4),B(5,"icon-component",5),m(),p(6,"div",6)(7,"div",7),U(8,pjt,2,1,"ng-container",8),m(),U(9,fjt,5,12,"ng-container",8),m(),p(10,"div",9),U(11,Cjt,4,6,"ng-container",8),m()()()),2&e&&(d(5),l("icon",i.EIcons.KnockoutArrow),d(3),l("ngForOf",i.gamesCount)("ngForTrackBy",i.trackGames),d(),l("ngForOf",i.gamesCount)("ngForTrackBy",i.trackGames),d(2),l("ngForOf",i.gamesCount)("ngForTrackBy",i.trackGames))},dependencies:[Xe,Mt,Ne,Dn,N7,F7],styles:["[_nghost-%COMP%]{width:100%}.game__progress--wrapper[_ngcontent-%COMP%]{width:100%;transform:translateZ(0)}.game__progress--content-wrapper[_ngcontent-%COMP%]{width:100%}.games__progress-steps-wrapper[_ngcontent-%COMP%]{display:flex;position:relative}.games__progress--wrapper[_ngcontent-%COMP%]{position:relative;margin:0 12.5%;flex-shrink:0;width:25%;display:flex;justify-content:center}.games__progress--wrapper.first[_ngcontent-%COMP%]{margin-left:37.5%}.games__progress--wrapper.last[_ngcontent-%COMP%]{margin-right:37.5%}.currency__baloon[_ngcontent-%COMP%]{display:inline-block;font-size:1.8rem}.games__progress--icon__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;margin-bottom:10px;left:50%;z-index:2}@media screen and (max-width: 768px),screen and (max-height: 568px){.games__progress--icon__wrapper[_ngcontent-%COMP%]{margin-bottom:2px}}.games__progress--line-wrapper[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;height:25%;width:100%}.games__progress--game-line-container[_ngcontent-%COMP%]{min-width:50%;position:relative}.games__progress--game-line-container.first[_ngcontent-%COMP%]{margin-left:50%}.games__progress--game-line[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute}.games__progress--game-line-completed[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;transform:scaleX(0);transform-origin:left}.games__progress--game-line-completed.first[_ngcontent-%COMP%]{margin-left:50%}.games__progress--game-line-completed.filled[_ngcontent-%COMP%]{transition:transform .3s ease;transform:scaleX(1)}.games__progress--game-index[_ngcontent-%COMP%]{max-width:10rem;z-index:1}@media screen and (max-width: 767px),screen and (max-height: 568px){.games__progress--game-index[_ngcontent-%COMP%]{max-width:10rem}}.games__progress--game-index.current[_ngcontent-%COMP%]{z-index:0!important;position:absolute;pointer-events:none;transform:scale(2.8);opacity:.1}"],changeDetection:0}),n})();var G7=function(t){return t.featureKey="knockoutState",t}(G7||{}),qa=function(t){return t.Initial="initial",t.SelectedBuyIn="selectedBuyIn",t.InProgress="inProgress",t.Completed="completed",t}(qa||{}),a1=function(t){return t.SetKnockoutStates="[Knockout Tournament] Set Knockout States",t.UpdateKnockoutStates="[Knockout Tournament] Update Knockout States",t.ResetKnockoutTournamentsState="[Knockout Tournament] Reset Knockout States",t.AddPendingWonGames="[Knockout Tournament] Add Pending Won Games",t.RemovePendingWonGames="[Knockout Tournament] Remove Pending Won Games",t}(a1||{});const V7=he(a1.SetKnockoutStates,{_as:"props",_p:void 0}),z7=he(a1.UpdateKnockoutStates,{_as:"props",_p:void 0}),m1e=he(a1.ResetKnockoutTournamentsState),yjt=he(a1.AddPendingWonGames,{_as:"props",_p:void 0}),f1e=he(a1.RemovePendingWonGames,{_as:"props",_p:void 0});var sy;let ay=((sy=class{constructor(n,o,e,i,r){this.listeners=new ie.List,this.onKnockoutStateUpdate=s=>{const a=this.createPendingWonGamesOnUpdate(s.current,s.gameName),c=this.createKnockoutStateOnUpdate(s.current,s.gameName,a);let u=this.createClientKnockoutStateOnUpdate(s.current,s.gameName,a);this.store.dispatch(V7({states:[{gameName:s.gameName,state:c,clientKnockoutStateModel:u,serverKnockoutStateModel:s.current,pendingWonGamesToShowUser:a}]})),this.saveStatesToStorage()},this.store=n,this.appStorage=o,this.gamesPlayClientService=e,this.clientConfig=i,this.constants=r}setPendingGamesAsSeen(n,o){this.store.dispatch(f1e({gameName:n,games:o}));const e=this.store.selectKnockoutTournament(n);if(this.isSessionActive(e.clientKnockoutStateModel)){const i=o.filter(r=>r.tournamentSessionId===e.clientKnockoutStateModel.sessionId);i.length&&this.store.dispatch(z7({updates:[{gameName:n,clientKnockoutStateModel:{...e.clientKnockoutStateModel,currentGame:i[i.length-1].index+1}}]}))}this.saveStatesToStorage()}transitionToState(n,o,e){this.store.dispatch(z7({updates:[{...e,gameName:n,state:o}]})),this.saveStatesToStorage()}onAppReady(){const n=this.readStatesFromStorage();let o;n?(o=n.list,this.deleteStatesFromStorage()):o=[];const i=Object.keys(this.clientConfig.getConfig().content.matchmaking).map(r=>({...this.buildDefaultKnockoutState(r),...o.find(s=>s.gameName===r)}));this.store.dispatch(V7({states:i})),this.subscribeForEvents()}onLogout(){this.unsubscribeFromEvents(),this.deleteStatesFromStorage(),this.store.dispatch(m1e())}subscribeForEvents(){this.listeners.add(this.gamesPlayClientService.stateEvents.onKnockoutStateUpdate(this.onKnockoutStateUpdate))}unsubscribeFromEvents(){this.listeners.forEach(n=>n.detach()),this.listeners=new ie.List}saveStatesToStorage(){this.appStorage.setItem("knockoutTournamentsState-".concat(this.store.selectUserState().profile.id),{list:this.store.selectKnockoutTournamentsList()})}readStatesFromStorage(){return this.appStorage.getItem("knockoutTournamentsState-".concat(this.store.selectUserState().profile.id))}deleteStatesFromStorage(){for(let n in localStorage)-1!==n.indexOf("knockoutTournamentsState")&&this.appStorage.removeItem(n)}buildDefaultKnockoutState(n){const o={currentGame:0,gameName:n,sessionId:"",settings:{buyIn:{bet:0,reward:0,streak:0}},tournamentWon:!1};return{gameName:n,state:qa.Initial,clientKnockoutStateModel:o,serverKnockoutStateModel:o,pendingWonGamesToShowUser:[]}}isSessionActive(n){return!!n.sessionId}createPendingWonGamesOnUpdate(n,o){const e=this.store.selectKnockoutTournament(o),i=this.isSessionActive(n);let r=e.pendingWonGamesToShowUser;if(i&&(r=r.filter(c=>c.tournamentSessionId===n.sessionId),this.isSessionActive(e.clientKnockoutStateModel)&&(!i||n.sessionId===e.clientKnockoutStateModel.sessionId))){const c=e.clientKnockoutStateModel.settings.buyIn.streak;if(n.currentGame!==e.clientKnockoutStateModel.currentGame){const h=Array.from(Array(n.currentGame-e.clientKnockoutStateModel.currentGame).keys()).map((b,w)=>{const R=e.clientKnockoutStateModel.currentGame+w;return{index:R,tournamentSessionId:e.clientKnockoutStateModel.sessionId,isLastGame:R===c}});r=bre()(r.concat(h),"index")}if(n.tournamentWon&&!r.find(u=>u.isLastGame)){const u={tournamentSessionId:e.clientKnockoutStateModel.sessionId,index:c-1,isLastGame:!0};r=bre()(r.concat(u),"index")}}return r}createKnockoutStateOnUpdate(n,o,e){const i=this.store.selectKnockoutTournament(o),r=this.isSessionActive(n);let s=i.state;return r?s=qa.InProgress:i.state===qa.InProgress&&!e.find(a=>a.isLastGame)&&(s=qa.Initial),s}createClientKnockoutStateOnUpdate(n,o,e){const i=this.store.selectKnockoutTournament(o);let r=i.clientKnockoutStateModel;const s=this.isSessionActive(n);return(s&&n.sessionId!==i.clientKnockoutStateModel.sessionId||i.state===qa.InProgress&&!s&&!e.find(c=>c.isLastGame))&&(r=n),r}}).\u0275fac=function(n){return new(n||sy)(T(J),T(Ci),T(oo),T(Zt),T(tn))},sy.\u0275prov=be({token:sy,factory:sy.\u0275fac}),sy);Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],ay.prototype,"onAppReady",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],ay.prototype,"onLogout",null),ay=Qe([Wo(),ue("design:paramtypes",[J,Ci,oo,Zt,Object])],ay);class j7 extends Do.AsyncState{onClick(){if(!this.customBet)return;if(!this.permission.isPermitted)return void this.handleUserRestrictions(this.permission);const n=this.customBet.selected.value.data,o=this.permissionsService.getChipBalanceRequirement(n.bet);if(!o.isFulfilled)return this.permissionsService.showFailedRequirementsToUser(new et.Permissions.RequirementNotMeet(oA.Wallet,o.requiredAmount));const e=this.store.selectKnockoutTournament(this.gameId).clientKnockoutStateModel;this.transitionTo(qa.SelectedBuyIn,!0,{clientKnockoutStateModel:{...e,currentGame:0,settings:{buyIn:n}}})}}j7.stateName=qa.Initial;class H7 extends Do.AsyncState{onEnter(){var n=this;return f(function*(){const o=n.stateMachine.getCurrentState(),e=n.gamesPlayClientService.getPlayClient(n.gameId);if(e){const r=e.stateEvents.onClientStateTransition(()=>o.handlePlayerStateUpdate.apply(n));n.stateListeners.add(r)}const i=n.store.subscribeWallet().pipe(bt(Boolean)).subscribe(r=>o.handlePlayerStateUpdate.apply(n));n.stateSubscriptions.add(i)})()}onExit(){var n=this;return f(function*(){n.stateListeners.forEach(o=>o.detach()),n.stateListeners=new is.List,n.stateSubscriptions.forEach(o=>o.unsubscribe()),n.stateSubscriptions=new is.List})()}onClick(){const n=this.store.selectKnockoutTournament(this.gameId).clientKnockoutStateModel;this.findRoom({pool:this.pool,buyInAmount:n.settings.buyIn.bet},void 0,!0)}handlePlayerStateUpdate(){const n=this.store.selectKnockoutTournament(this.gameId),o=this.gamesPlayClientService.getPlayClient(this.gameId),e=this.store.selectWallet();o&&o.state.current.stateName===yn.Idle&&n&&n.clientKnockoutStateModel.settings.buyIn.bet>e.chips&&this.transitionTo(qa.Initial,!0,{clientKnockoutStateModel:{currentGame:0,gameName:this.gameId,sessionId:"",settings:{buyIn:{bet:0,reward:0,streak:0}}}})}}H7.stateName=qa.SelectedBuyIn;class q7 extends Do.AsyncState{onClick(){const n=this.store.selectKnockoutTournament(this.gameId).clientKnockoutStateModel;this.findRoom({pool:this.pool,buyInAmount:n.settings.buyIn.bet},void 0,!0)}}q7.stateName=qa.InProgress;class W7 extends Do.AsyncState{onClick(){this.transitionTo(qa.Initial,!0,{clientKnockoutStateModel:{currentGame:0,gameName:this.gameId,sessionId:"",settings:{buyIn:{bet:0,reward:0,streak:0}}}})}}W7.stateName=qa.Completed;var Sjt=ve.EIcons,wjt=ve.EButtonModifier;const Tjt=["progress"],Pjt=["customBet"],Ijt=["content"],$7=t=>[t];function Mjt(t,n){if(1&t&&(Tn(0),p(1,"div",20),B(2,"icon-component",21)(3,"icon-component",22)(4,"p",23),V(5,"translate"),B(6,"icon-component",24),m(),Pn()),2&t){const o=n.$implicit,e=_(3);d(2),l("icon",e.iconNames.PlayIcon),d(),l("icon",e.iconNames.CHECK_ROUND),d(),l("innerHTML",yt(5,4,o.key,ne(7,$7,o.params)),Yn),d(2),l("icon",e.iconNames.PlayIcon)}}function Ojt(t,n){if(1&t){const o=Ce();Tn(0),p(1,"div",15),U(2,Mjt,7,9,"ng-container",16),m(),p(3,"custom-bet",17,18),Y("select",function(i){return oe(o),re(_(2).onSelect(i))}),m(),p(5,"p",19),H(6),V(7,"translate"),m(),Pn()}if(2&t){const o=_(2);d(2),l("ngForOf",o.textRows),d(),l("scaleFactor",1)("values",o.selector.values)("initialValue",o.selector.initial),d(3),se($(7,5,"TOURNAMENTS.KNOCKOUT.LOSE_RESTART_STREAK"))}}function Ejt(t,n){if(1&t&&(Tn(0),B(1,"games-progress",25,26),p(3,"div",27),B(4,"p",28),V(5,"translate"),m(),Pn()),2&t){const o=_(2);d(),l("stepsCount",o.tournament.clientKnockoutStateModel.settings.buyIn.streak)("completedStep",o.tournament.clientKnockoutStateModel.currentGame-1)("step",o.tournament.clientKnockoutStateModel.currentGame)("buyIn",o.tournament.clientKnockoutStateModel.settings.buyIn),d(3),l("innerHTML",yt(5,5,"TOURNAMENTS.KNOCKOUT.WIN_GAMES_LEFT",ne(8,$7,o.tournament.clientKnockoutStateModel.settings.buyIn.streak-o.tournament.clientKnockoutStateModel.currentGame)),Yn)}}const xjt=()=>({key:"LABEL.REWARD"}),Ajt=()=>({class:"knockout--item-container-config-bclass"}),Rjt=()=>({class:"knockout__completed--prize--value-bclass",iconClass:"knockout__completed--prize--value-iconClass"}),kjt=()=>({class:"knockout__completed--prize--text-bclass"});function Ljt(t,n){if(1&t&&(Tn(0),p(1,"p",29),H(2),V(3,"translate"),m(),B(4,"currency-label",30)(5,"fireworks",31),Pn()),2&t){const o=_(2);d(2),se($(3,7,"TOURNAMENTS.KNOCKOUT.COMPLETED")),d(2),l("type",o.ECurrencyType.Chips)("value",o.tournament.clientKnockoutStateModel.settings.buyIn.reward)("text",pt(9,xjt))("itemContainerConfig",pt(10,Ajt))("valueConfig",pt(11,Rjt))("textConfig",pt(12,kjt))}}const C1e=(t,n)=>({leave:t,enter:n}),Djt=()=>({$implicit:"bottom"});function Bjt(t,n){if(1&t&&(p(0,"section",11,12),U(2,Ojt,8,7,"ng-container",13)(3,Ejt,6,10,"ng-container",13)(4,Ljt,6,13,"ng-container",13),Un(5,14),m()),2&t){const o=_(),e=Kt(14);l("ngClass",cn(6,C1e,o.transition.isLeaving,o.transition.isEntering)),d(2),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.Initial),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.InProgress||o.stateMachine.current.stateName===o.EClientKnockoutState.SelectedBuyIn),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.Completed),d(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",pt(9,Djt))}}function Njt(t,n){1&t&&(Tn(0),p(1,"div",34)(2,"p",35),H(3),V(4,"translate"),m()(),Pn()),2&t&&(d(3),se($(4,1,"TOURNAMENTS.KNOCKOUT.LOSE_RESTART_STREAK")))}function Fjt(t,n){if(1&t&&(Tn(0),p(1,"div",34),B(2,"p",28),V(3,"translate"),m(),Pn()),2&t){const o=_(2);d(2),l("innerHTML",yt(3,1,"TOURNAMENTS.KNOCKOUT.WIN_GAMES_LEFT",ne(4,$7,o.tournament.clientKnockoutStateModel.settings.buyIn.streak-o.tournament.clientKnockoutStateModel.currentGame)),Yn)}}function Ujt(t,n){1&t&&(Tn(0),B(1,"div",34),Pn())}function Gjt(t,n){if(1&t&&(p(0,"section",32),Un(1,33),U(2,Njt,5,3,"ng-container",13)(3,Fjt,4,6,"ng-container",13)(4,Ujt,2,0,"ng-container",13),m()),2&t){const o=_(),e=Kt(14);l("ngClass",cn(5,C1e,o.transition.isLeaving,o.transition.isEntering)),d(),l("ngTemplateOutlet",e),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.Initial),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.InProgress||o.stateMachine.current.stateName===o.EClientKnockoutState.SelectedBuyIn),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.Completed)}}function Vjt(t,n){1&t&&Un(0)}function zjt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TOURNAMENTS.KNOCKOUT.BEGIN_CHALLENGE")))}function jjt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TEXT.PLAY_NOW")))}function Hjt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TOURNAMENTS.KNOCKOUT.PLAY_AGAIN")))}function qjt(t,n){if(1&t&&(p(0,"button-text",40),U(1,zjt,3,3,"span",13)(2,jjt,3,3,"span",13)(3,Hjt,3,3,"span",13),m()),2&t){const o=_(2);l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("bclass","knockout__button-play"),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.Initial),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.InProgress||o.stateMachine.current.stateName===o.EClientKnockoutState.SelectedBuyIn),d(),l("ngIf",o.stateMachine.current.stateName===o.EClientKnockoutState.Completed)}}const Wjt=()=>({url:"icons/locker3d.png"});function $jt(t,n){if(1&t&&(p(0,"button-icon-text",41),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("image",pt(8,Wjt))("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("bclass","knockout__button-play knockout__button---disabled")("disabled",!0),d(),mu("",$(2,6,"LABEL.LEVEL")," ",o.levelRequirement.requiredLevel,"")}}function Kjt(t,n){if(1&t&&(p(0,"div",36),U(1,Vjt,1,0,"ng-container",37)(2,qjt,4,5,"ng-template",null,38,ft)(4,$jt,3,9,"ng-template",null,39,ft),m()),2&t){const o=n.$implicit,e=Kt(3),i=Kt(5),r=_();l("ngClass",o),d(),l("ngIf",r.levelRequirement.isFulfilled)("ngIfThen",e)("ngIfElse",i)}}let K7=(()=>{var t;class n extends oy{constructor(e,i,r,s,a,c,u,h,b,w,R,G){super(c,e,i,s,a,r,u,h),this.buttonModifier=wjt,this.iconNames=Sjt,this.textRows=[],this.EClientKnockoutState=qa,this.transition={isLeaving:!1,isEntering:!1},this.stateListeners=new ie.List,this.stateSubscriptions=new ie.List,this.ECurrencyType=ln,this.subscriptions=new ie.List,this.animationListener=()=>{},this.onEnterSelectedBuyInState=()=>{this.domElementDelayTimerId=setTimeout(()=>{if(this.progress){const K=this.store.selectKnockoutTournament(this.gameId);this.progress.selectGame(K.clientKnockoutStateModel.currentGame),this.progress.scrollTo(K.clientKnockoutStateModel.currentGame)}})},this.onEnterInProgressState=()=>{this.domElementDelayTimerId=setTimeout(()=>{const K=()=>{if(!this.progress)return;const ee=this.store.selectKnockoutTournament(this.gameId),le=ee.pendingWonGamesToShowUser;if(le.length){const me=le[0];if(this.clientKnockoutStateService.setPendingGamesAsSeen(this.gameId,[me]),this.progress.setCompletedGamesStep(me.index),me.isLastGame)return this.progress.scrollTo(me.index),void(this.domElementDelayTimerId=setTimeout(()=>{this.clientKnockoutStateService.transitionToState(this.gameId,qa.Completed)},1500));this.progress.selectGame(me.index+1),this.progress.scrollTo(me.index+1),le.length-1>0&&(this.domElementDelayTimerId=setTimeout(()=>{K()},1e3))}else ee.clientKnockoutStateModel.currentGame+1===ee.clientKnockoutStateModel.settings.buyIn.streak&&(this.progress.setCompletedGamesStep(ee.clientKnockoutStateModel.currentGame),this.domElementDelayTimerId=setTimeout(()=>{this.clientKnockoutStateService.transitionToState(this.gameId,qa.Completed)},1e3))};this.store.selectKnockoutTournament(this.gameId).pendingWonGamesToShowUser.length&&(this.domElementDelayTimerId=setTimeout(()=>{K()},1e3))})},this.store=b,this.clientKnockoutStateService=w,this.selector={values:[],selected:void 0,initial:void 0},this.viewModelFactory=R,this.renderer=G}ngOnInit(){const e=this.viewModelFactory.createBuyInValues(this.gameId),i=this.getDefaultSelectedBuyIn(),r=e.find(a=>a.data===i);this.selector={values:e,initial:r,selected:r},this.textRows=this.viewModelFactory.createDescriptions(i);let s=!1;this.tournamentSubscription=this.store.subscribeKnockoutTournament(this.gameId).subscribe(a=>{if(!a)return this.unsubscribeListeners(),void(s=!0);a&&s&&(this.subscribeListeners(),s=!1),this.tournament=a}),this.initStateMachine()}ngAfterViewInit(){this.stateMachine.onEnter(qa.SelectedBuyIn,this.onEnterSelectedBuyInState),this.stateMachine.onEnter(qa.InProgress,this.onEnterInProgressState),this.subscribeListeners()}ngOnChanges(e){this.permission=this.getTilePermission({id:this.tileConfig.id}),this.levelRequirement=this.permission.minLevelRequirement,this.gameId=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.id,this.pool=this.getPoolSettings(this.tileConfig.info.tileData.pools)[0]}ngOnDestroy(){this.tournamentSubscription&&this.tournamentSubscription.unsubscribe(),this.unsubscribeListeners(),this.stateListeners.forEach(e=>e.detach()),this.stateListeners=new ie.List,this.stateSubscriptions.forEach(e=>e.unsubscribe()),this.stateSubscriptions=new ie.List,this.stateMachine.destroy().catch(e=>console.warn(e)),this.animationListener(),clearTimeout(this.domElementDelayTimerId)}onClick(){this.stateMachine.current.onClick.apply(this)}onSelect(e){this.selector.selected&&e.value.data.bet===this.selector.selected.data.bet||(this.selector.selected=e.value,this.textRows=this.viewModelFactory.createDescriptions(e.value.data))}subscribeListeners(){this.subscriptions.add(this.store.subscribeKnockoutState(this.gameId).subscribe(e=>this.stateMachine.to(e)))}unsubscribeListeners(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}getDefaultSelectedBuyIn(){const e=this.clientConfigService.getConfig().content.matchmaking[this.gameId].knockoutTournaments.buyIns,i=this.store.selectWallet();return new ie.List(e).where(r=>r.bet<=i.chips).orderBy([r=>r.bet],ie.ESort.Asc).last()||e[0]}transitionTo(e,i=!0,r){this.animationListener(),clearTimeout(this.domElementDelayTimerId),i&&this.content?(this.transition={isLeaving:!0,isEntering:!1},this.animationListener=this.renderer.listen(this.content.nativeElement,"animationend",()=>{this.animationListener(),this.transition={isLeaving:!1,isEntering:!0},this.clientKnockoutStateService.transitionToState(this.gameId,e,r)})):this.clientKnockoutStateService.transitionToState(this.gameId,e,r)}initStateMachine(){const e=this.store.selectKnockoutTournament(this.gameId);return this.stateMachine=(new Do.AsyncStateMachine.Builder).setAllowedStates(j7,H7,q7,W7).setInitialState(this.getStateConstructor(e.state)).fromAny().toAny().setStateContext(this).build(),this.stateMachine.start()}getStateConstructor(e){switch(e){case qa.Initial:return j7;case qa.SelectedBuyIn:return H7;case qa.InProgress:return q7;case qa.Completed:return W7}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pi),g(Zt),g(Dt),g(on),g(Cn),g(oo),g(ro),g(Zn),g(Jo),g(ay),g(B7),g(ji))},t.\u0275cmp=pe({type:t,selectors:[["knockout-tournament-tile"]],viewQuery:function(e,i){if(1&e&&($e(Tjt,5),$e(Pjt,5),$e(Ijt,5)),2&e){let r;je(r=He())&&(i.progress=r.first),je(r=He())&&(i.customBet=r.first),je(r=He())&&(i.content=r.first)}},features:[Ht,it],decls:16,vars:9,consts:[[1,"knockout__tile--wrapper"],[1,"knockout__tile--image"],[1,"knockout__tile--container"],[1,"knockout__header"],[1,"knockout__header--text"],[1,"knockout__header--text","lower"],["class","knockout__wrapper",3,"ngClass",4,"ngIf"],[1,"knockout__tile__marble"],["class","knockout__bottom-bar--new-design",3,"ngClass",4,"ngIf"],["playButtonTmpl",""],[1,"knockout__restrictions",3,"permission"],[1,"knockout__wrapper",3,"ngClass"],["content",""],[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"knockout--text-rows__wrapper"],[4,"ngFor","ngForOf"],["click-feedback","",1,"knockout__container--custom-bet",3,"scaleFactor","values","initialValue","select"],["customBet",""],[1,"knockout__tournament-tile__footer-text","knockout__old-design"],[1,"knockout__tournament--tile-info"],[1,"knockout__tournament--tile-info--icon",3,"icon"],[1,"knockout__tournament--tile-info--icon","new-design",3,"icon"],[1,"knockout__tournament--tile-info--text",3,"innerHTML"],[1,"knockout__tournament--tile-info--icon","right",3,"icon"],[3,"stepsCount","completedStep","step","buyIn"],["progress",""],[1,"knockout__tournament--footer-bar","knockout__old-design"],[1,"knockout__win--games",3,"innerHTML"],[1,"knockout__completed--text"],[1,"knockout__completed--prize",3,"type","value","text","itemContainerConfig","valueConfig","textConfig"],[1,"knockout__fireworks"],[1,"knockout__bottom-bar--new-design",3,"ngClass"],[3,"ngTemplateOutlet"],[1,"knockout__tournament--footer-bar","new-design"],[1,"knockout__tournament-tile__footer-text"],[1,"knockout__container--wrapper-play",3,"ngClass"],[4,"ngIf","ngIfThen","ngIfElse"],["playButton",""],["disabledButton",""],[1,"button",3,"buttonModifier","bclass"],[1,"button",3,"image","buttonModifier","bclass","disabled"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"div",1),p(2,"div",2)(3,"div",3)(4,"p",4),H(5),V(6,"translate"),m(),p(7,"p",5),H(8),V(9,"translate"),m()(),U(10,Bjt,6,10,"section",6),B(11,"div",7),m(),U(12,Gjt,5,8,"section",8)(13,Kjt,6,4,"ng-template",null,9,ft),m(),B(15,"restriction-cover",10)),2&e&&(d(5),se($(6,5,"TOURNAMENTS.KNOCKOUT.NAME")),d(3),se($(9,7,"TOURNAMENTS.KNOCKOUT.CHALLENGE")),d(2),l("ngIf",i.tournament),d(2),l("ngIf",i.tournament),d(3),l("permission",i.permission))},dependencies:[Xe,Mt,Ne,qr,po,Dn,pn,so,Yh,NL,x7,Lu,U7,qe],styles:[".knockout__tile--wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-flow:column}.knockout__container--custom-bet[_ngcontent-%COMP%], .knockout__bottom-bar--new-design[_ngcontent-%COMP%]{z-index:2}.knockout__header[_ngcontent-%COMP%]{margin-top:1rem}.knockout__fireworks[_ngcontent-%COMP%]{position:absolute;display:block;height:50%;width:100%;top:50%;left:0;transform:translateY(-50%)}.knockout__header--text[_ngcontent-%COMP%]{text-align:center;font-size:5rem;font-weight:900;line-height:1}.knockout__header--text.lower[_ngcontent-%COMP%]{font-size:2.5rem}@media screen and (max-width: 767px),screen and (max-height: 767px),screen and (orientation: portrait){.knockout__header--text[_ngcontent-%COMP%]{font-size:2.8rem}.knockout__header--text.lower[_ngcontent-%COMP%]{font-size:1.4rem}}.knockout__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;align-items:center;width:100%}@media only screen and (min-height: 768px) and (orientation: portrait){.knockout__wrapper[_ngcontent-%COMP%]{max-height:55rem}}.knockout__wrapper.leave[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_knockoutTransitionOut .1s ease}.knockout__wrapper.enter[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_knockoutTransitionIn .5s ease}@keyframes _ngcontent-%COMP%_knockoutTransitionOut{0%{opacity:1}to{opacity:0}}@keyframes _ngcontent-%COMP%_knockoutTransitionIn{0%{opacity:0}to{opacity:1}}.knockout__container--wrapper-play[_ngcontent-%COMP%]{width:100%;margin-top:1rem;margin-bottom:0}.knockout__container--wrapper-play[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{white-space:pre-wrap}.knockout__container--players[_ngcontent-%COMP%]{position:absolute;z-index:1;bottom:.3rem;left:50%;transform:translate(-50%)}@media only screen and (max-width: 480px){.knockout__container--players[_ngcontent-%COMP%]{bottom:.1rem}}.knockout__completed--text[_ngcontent-%COMP%]{font-size:6rem;font-weight:900}@media screen and (max-width: 768px),screen and (max-height: 568px){.knockout__completed--text[_ngcontent-%COMP%]{font-size:4rem}}.knockout__completed--prize[_ngcontent-%COMP%]{font-size:2rem}.knockout__tournament--tile-info[_ngcontent-%COMP%]{display:flex;align-items:center;margin:.125rem 0}@media screen and (max-width: 768px),screen and (max-height: 568px){.knockout__tournament--tile-info[_ngcontent-%COMP%]{margin:0}}.knockout__tournament--tile-info--icon[_ngcontent-%COMP%]{margin:0 1rem}.knockout__tournament--tile-info--icon.right[_ngcontent-%COMP%]{transform:rotateY(180deg)}.knockout__tournament--footer-bar[_ngcontent-%COMP%]{display:flex;position:absolute;bottom:0;left:0;width:100%;justify-content:center;align-items:center}@media screen and (max-width: 768px),screen and (max-height: 568px){.knockout__tournament--footer-bar[_ngcontent-%COMP%]{height:3rem}}"]}),n})();class xv extends Error{constructor(n){super(),this.name="MinLevelRequiredError",this.level=n}}class Zjt extends Error{constructor(n){super(),this.name="MaxLevelExceededError",this.level=n}}class Av extends Error{constructor(){super(),this.name="MembershipRequiredError"}}class bD extends Error{constructor(){super(),this.name="RegistrationRequiredError"}}class y1e extends Error{constructor(){super(),this.name="RoleRequiredError"}}var cy=function(t){return t.AddRooms="[Custom Games Lobby] Add Rooms",t.UpdateRoom="[Custom Games Lobby] Update Room",t.DestroyRoom="[Custom Games Lobby] Destroy Room",t.CreateRoom="[Custom Games Lobby] Create Room",t.ClearRooms="[Custom Games Lobby] Clear Rooms",t.UpdateGameLobbyFilter="[Custom Games Lobby] Update GameLobby Filter",t}(cy||{});const S1e=he(cy.AddRooms,{_as:"props",_p:void 0}),w1e=he(cy.UpdateRoom,{_as:"props",_p:void 0}),T1e=he(cy.CreateRoom,{_as:"props",_p:void 0}),P1e=he(cy.DestroyRoom,{_as:"props",_p:void 0}),Z7=he(cy.ClearRooms),Qjt=he(cy.UpdateGameLobbyFilter,{_as:"props",_p:void 0});var I1e=et.NotEnoughMinerals,Q7=nt.EPermissionModule,Y7=nt.EModuleAction;let ly=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){var b=this;this.actionInProgress=!1,this.events=new tc,this.onRoomCreate=function(){var w=f(function*(R){if(R.settings.requirements.clubId)try{let G;const K=b.store.clubs.selectClubProfile();G=(null==K?void 0:K.id)===R.settings.requirements.clubId?{clubProfile:Qu()(K),inventory:Qu()(b.store.clubs.selectCurrentClub().inventory)}:yield b.clubsService.getClubProfile(R.settings.requirements.clubId),b.events.emit(Ve.ActiveRoomProtocol.Messages.CreatedRoom,{...R,club:G})}catch(G){console.warn(G)}else b.events.emit(Ve.ActiveRoomProtocol.Messages.CreatedRoom,R)});return function(R){return w.apply(this,arguments)}}(),this.onConnectionRestore=()=>{this.store.dispatch(Z7())},this.onCustomRoomsListUpdate=function(){var w=f(function*(R){const G=R.filter(K=>K.settings.requirements.clubId).map(K=>K.settings.requirements.clubId);if(G.length)try{const K=yield b.clubsService.getClubsProfiles({clubsIds:G}),te=[];R.forEach(ee=>{if(!ee.settings.requirements.clubId)return void te.push(ee);const le=K.clubs.find(me=>me.clubProfile.id===ee.settings.requirements.clubId);le&&te.push({...ee,club:le})}),b.events.emit(Ve.MatchmakingProtocol.Messages.GetCustomRooms,te)}catch(K){console.warn(K)}else b.events.emit(Ve.MatchmakingProtocol.Messages.GetCustomRooms,R)});return function(R){return w.apply(this,arguments)}}(),this.handleRoomCreate=w=>{this.store.dispatch(T1e({room:Qu()(w)}))},this.handleRoomListUpdate=w=>{this.store.dispatch(S1e({rooms:Qu()(w)}))},this.handleRoomUpdate=w=>{this.store.dispatch(w1e({room:Qu()(w)}))},this.handleRoomDestroy=w=>{this.store.dispatch(P1e({roomId:w}))},this.gamesClientService=a,this.gamesState=c,this.communicationService=e,this.permissions=i,this.blockService=r,this.store=s,this.clubsService=u,this.friendsService=h}init(e,i){var r=this;return new Promise(function(){var s=f(function*(a,c){try{r.playClient=r.gamesClientService.getPlayClient(e),r.namespaceConnection=yield r.joinChannel(i),r.listenersAttached||(r.listenersAttached=!0,r.namespaceConnection.on(Ve.ActiveRoomProtocol.Messages.CreatedRoom,r.onRoomCreate),r.namespaceConnection.on(Ve.MatchmakingProtocol.Messages.GetCustomRooms,r.onCustomRoomsListUpdate),r.addRoomListListener(r.handleRoomListUpdate),r.addRoomCreateListener(r.handleRoomCreate),r.addRoomUpdateListener(r.handleRoomUpdate),r.addRoomDestroyListener(r.handleRoomDestroy),r.addReconnectListener(r.onConnectionRestore)),yield r.blockService.getBlockList(),yield r.friendsService.requestFriends(),a()}catch(u){c(u)}});return function(a,c){return s.apply(this,arguments)}}())}setActionInProgress(e){this.actionInProgress=e}checkIfActionInProgress(){return this.actionInProgress}joinRoom(e,i){var r=this;return new Promise(function(){var s=f(function*(a,c){const u=r.permissions.getActionPermission(Q7.CustomGames,Y7.Join);if(!u.isPermitted)return c(u.vipRequirement.isFulfilled?u.minLevelRequirement.isFulfilled?u.roleRequirement.isFulfilled?new Error:new bD:new xv(u.minLevelRequirement.requiredLevel):new Av);const h=r.permissions.getRoomPermission(e.settings);if(!h.isPermitted)return c(h.vipRequirement.isFulfilled?h.minLevelRequirement.isFulfilled?h.maxLevelRequirement.isFulfilled?h.chipsBalanceRequirement.isFulfilled?new Error:new I1e:new Zjt(h.maxLevelRequirement.requiredLevel):new xv(h.minLevelRequirement.requiredLevel):new Av);try{r.setActionInProgress(!0),yield r.playClient.joinRoom({id:e.id,type:e.settings.type},{tableId:e.tables.find(b=>void 0!==b).id,seatId:i,roomCode:e.invitationCode}),r.setActionInProgress(!1),a()}catch(b){r.setActionInProgress(!1),c(b)}});return function(a,c){return s.apply(this,arguments)}}())}spectateRoom(e){var i=this;return new Promise(function(){var r=f(function*(s,a){const c=i.permissions.getActionPermission(Q7.CustomGames,Y7.Spectate);if(!c.isPermitted)return c.vipRequirement.isFulfilled?c.minLevelRequirement.isFulfilled?c.roleRequirement.isFulfilled?a(new Error):i.store.selectUserState().roles.find(u=>u.name===kr.GUESTUSER)?a(new bD):a(new y1e):a(new xv(c.minLevelRequirement.requiredLevel)):a(new Av);try{i.setActionInProgress(!0),yield i.gamesClientService.spectateRoom({id:e.id,type:e.settings.type,game:e.settings.game.name},{tableId:e.tables[e.tables.length-1].id,roomCode:e.invitationCode}),i.setActionInProgress(!1),s()}catch(u){i.setActionInProgress(!1),a(u)}});return function(s,a){return r.apply(this,arguments)}}())}createRoom(e){var i=this;return new Promise(function(){var r=f(function*(s,a){const c=i.permissions.getActionPermission(Q7.CustomGames,Y7.Create);if(!c.isPermitted)return a(c.vipRequirement.isFulfilled?c.minLevelRequirement.isFulfilled?c.roleRequirement.isFulfilled?new Error:new bD:new xv(c.minLevelRequirement.requiredLevel):new Av);let u=i.getOptionValueById(e,"transactions.bet");if(null===u){const b=i.gamesState.getCurrentGameRelatedConfig().matchmaking.customGames.customSettings.find(R=>"transactions.bet"===R.id).options.filter(R=>!!R.value),w=N0()(b,"value",[ie.ESort.Asc])[b.length-1].value;u=Math.max(i.store.selectWallet().chips,w+1)}const h=i.permissions.getChipBalanceRequirement(u);if(!h.isFulfilled)return a(new I1e(h.requiredAmount));try{i.setActionInProgress(!0);const b=yield i.playClient.createRoom({overrideSettings:e});i.setActionInProgress(!1),s(b)}catch(b){console.log(b),i.setActionInProgress(!1),a(b)}});return function(s,a){return r.apply(this,arguments)}}())}getBlockList(){return new ie.UniqueList(this.store.selectPlayerBlockViewModel().blocked.map(e=>e.profile))}getRooms(e){return new Promise((i,r)=>{if(!this.namespaceConnection.connected)return r(new lt.NetworkError);this.playClient.getRoomList(e);let s=!1,a=!1;const c=setTimeout(()=>{s=!0,w()},2e3),u=this.addRoomListListener(()=>{a=!0,w()}),h=this.namespaceConnection.onConnectionLost(()=>{clearTimeout(c),b(),r(new lt.NetworkError)}),b=()=>{u.detach(),h.detach()},w=()=>{s&&a&&(b(),i())}})}kickPlayer(e){return this.playClient.activeClientModel.currentRoom.ban({playerId:e})}cancelInvite(e){return this.playClient.activeClientModel.currentRoom.cancelInvite({seatId:e})}leaveRoom(){var e=this;return new Promise(function(){var i=f(function*(r,s){try{e.setActionInProgress(!0),yield e.playClient.leaveCurrentRoom(),e.setActionInProgress(!1),r()}catch(a){e.setActionInProgress(!1),s(a)}});return function(r,s){return i.apply(this,arguments)}}())}startRoom(){var e=this;return f(function*(){try{e.setActionInProgress(!0),yield e.playClient.activeClientModel.currentRoom.start(),e.setActionInProgress(!1)}catch(i){e.setActionInProgress(!1)}})()}dispose(){this.leaveChannel(),this.setActionInProgress(!1),this.store.dispatch(Z7())}addRoomUpdateListener(e){return this.addNamespaceListener(Ve.ActiveRoomProtocol.Messages.RoomUpdate,e)}addRoomCreateListener(e){return this.addEventListener(Ve.ActiveRoomProtocol.Messages.CreatedRoom,e)}addRoomListListener(e){return this.addEventListener(Ve.MatchmakingProtocol.Messages.GetCustomRooms,e)}addRoomDestroyListener(e){return this.addNamespaceListener(Ve.ActiveRoomProtocol.Messages.RoomDestroyed,e)}addReconnectListener(e){return this.namespaceConnection.onReconnect(e)}removeRoomUpdateListener(e){this.removeNamespaceListener(Ve.ActiveRoomProtocol.Messages.RoomUpdate,e)}removeRoomCreateListener(e){this.removeEventListener(Ve.ActiveRoomProtocol.Messages.CreatedRoom,e)}removeRoomListListener(e){this.removeEventListener(Ve.MatchmakingProtocol.Messages.GetCustomRooms,e)}removeRoomDestroyListener(e){this.removeNamespaceListener(Ve.ActiveRoomProtocol.Messages.RoomDestroyed,e)}joinChannel(e){var i=this;return f(function*(){return yield i.playClient.connectToCustomLobby(e)})()}leaveChannel(){this.namespaceConnection&&this.namespaceConnection.dispose(),this.listenersAttached=!1}getOptionValueById(e,i){const r=e.find(s=>s.id===i);return null==r?void 0:r.value}isAnyPlayerInBlockList(e,i){try{return void 0!==i.where(r=>e.has({id:r.id})).first()}catch(r){return!1}}isIdInPlayerBlockList(e,i){return-1!==i.blocklist.indexOf(e)}addNamespaceListener(e,i){return this.namespaceConnection.on(e,i)}removeNamespaceListener(e,i){this.namespaceConnection&&this.namespaceConnection.removeListener(e,i)}addEventListener(e,i){return new ie.EventListener(this.events,e,i)}removeEventListener(e,i){this.events.removeEventListener(e,i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(Ti),T(n0),T(J),T(oo),T(Zn),T(ru),T(Tu))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function Yjt(t,n){1&t&&(p(0,"div",6),B(1,"spinner-loader"),m())}const Jjt=t=>({"casino--room__restriction-cover":t});let J7=(()=>{var t;class n extends ov{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){super(a,s,r,i,c),this.formOptions=K,this.subscriptions=new ie.List,this.gamesPlayClientService=e,this.cdr=u,u.detach(),this.customGamesService=h,this.store=b,this.toastService=w,this.buyInFactory=R,this.translate=G}ngOnInit(){this.fields=this.clientConfigService.getGameRelatedConfig(this.tileConfig.info.tileData.gameId).matchmaking.customGames.customSettings,this.cdr.detectChanges()}ngOnChanges(e){this.permission=this.getTilePermission({id:this.tileConfig.id}),this.cdr.detectChanges()}ngOnDestroy(){this.closePopup()}onClick(){var e=this;return f(function*(){if(e.isLoading)return;const i=e.getTilePermission({id:e.tileConfig.id});if(!i.isPermitted)return void e.handleUserRestrictions(i);const r=e.tileConfig.info.tileData;if(!(e.gamesPlayClientService.tasks.connect||e.gamesPlayClientService.tasks.connectAndHandleState||e.gamesPlayClientService.tasks.action))try{e.isLoading=!0,e.cdr.detectChanges();try{yield e.gamesPlayClientService.connectAndHandlePlayerState(r.gameId)}catch(s){if(!(s instanceof lt.RoomConnectReject))throw s}e.lobbyInitTask||(e.lobbyInitTask=new Jn(e.customGamesService.init(r.gameId,{autoReconnect:!0}))),yield e.lobbyInitTask,e.reconnectListener=e.customGamesService.addReconnectListener(()=>e.getRooms()),e.getRooms(),e.openPopup()}catch(s){if(console.warn(s),s instanceof Cr)return;e.toastService.warn(s instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}finally{e.lobbyInitTask=void 0,e.isLoading=!1,e.cdr.detectChanges()}})()}play(e){var i=this;return f(function*(){const s=i.store.customGamesLobby.selectGameLobbyRooms(i.tileConfig.info.tileData.gameId).find(a=>a.settings.game.buyIn[0]<=e.amount&&e.amount<=a.settings.game.buyIn[1]&&lo.getFirstFreeSeat(a.tables[a.tables.length-1]));try{i.buyInCmp&&(i.buyInCmp.isLoading=!0,i.buyInCmp.setIsClosable(!1)),s?yield i.gamesPlayClientService.joinRoom({id:s.id,type:s.settings.type,game:s.settings.game.name},{buyInAmount:e.amount,isAutoTopUpEnabled:e.isAutoTopUpEnabled,tableId:s.tables[s.tables.length-1].id,seatId:lo.getFirstFreeSeat(s.tables[s.tables.length-1]).id}):yield i.createRoom(e)}catch(a){console.warn(a),i.toastService.warn(a instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG"),i.buyInCmp&&(i.buyInCmp.isLoading=!1,i.buyInCmp.setIsClosable(!0))}})()}openPopup(){const e=this.tileConfig.info.tileData;this.buyInCmp=this.buyInFactory.createBuyInCmp(this.getBuyInField().options.map(i=>i.value[0]),{key:"PLATFORM_IDS.".concat(e.gameId)},{offerProvider:RM.GameLobby,isClosable:!0,buyInButton:{text:{key:"TEXT.PLAY_NOW_GAME",params:[this.translate.instant("PLATFORM_IDS.".concat(e.gameId))]},modifier:ve.EButtonModifier.BUTTON_ATTENTION}}),this.subscriptions.add(this.buyInCmp.onClose.subscribe(()=>this.closePopup())),this.subscriptions.add(this.buyInCmp.onBuyIn.subscribe(i=>this.play(i)))}closePopup(){var e,i;this.subscriptions.forEach(r=>r.unsubscribe()),this.subscriptions=new ie.List,null===(e=this.reconnectListener)||void 0===e||e.detach(),this.customGamesService.dispose(),this.buyInFactory.destroy(),null===(i=this.lobbyInitTask)||void 0===i||i.cancel()}createRoom(e){var i=this;return f(function*(){const r=i.getBuyInField(),s=r.options.find(b=>b.value[0]<=e.amount&&e.amount<=b.value[1]),a=new tz(i.formOptions,i.fields);a.select({id:r.id,state:s});let c=[];a.selected.pipe(Qi(1)).subscribe(b=>c=b);const u={buyInAmount:e.amount,isAutoTopUpEnabled:e.isAutoTopUpEnabled,overrideSettings:c},h=i.tileConfig.info.tileData;yield i.gamesPlayClientService.createRoom(u,h.gameId)})()}getRooms(){this.customGamesService.getRooms({startTimestamp:0,endTimestamp:9999999999999})}getBuyInField(){return this.fields.find(e=>"game.buyIn"===e.id)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oo),g(Zt),g(on),g(Cn),g(Pi),g(Zn),g(Re),g(ly),g(J),g(Dt),g(pj),g(pi),g(Ig))},t.\u0275cmp=pe({type:t,selectors:[["casino-room-tile"]],features:[Ht,it],decls:8,vars:9,consts:[[1,"casino--room__wrapper",3,"ngClass"],["class","casino--room__wait-wrapper",4,"ngIf"],[1,"casino--room__text--container"],[1,"casino--room__text"],[1,"casino--room__text--name"],[3,"ngClass","permission"],[1,"casino--room__wait-wrapper"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,Yjt,2,0,"div",1),p(2,"div",2)(3,"p",3)(4,"span",4),H(5),V(6,"translate"),m()()()(),B(7,"restriction-cover",5)),2&e&&(l("ngClass",i.tileSizeMap[i.tileConfig.size]),d(),l("ngIf",i.isLoading),d(4),se($(6,5,"PLATFORM_IDS."+i.tileConfig.info.tileData.gameId)),d(2),l("ngClass",ne(7,Jjt,!i.permission.isPermitted))("permission",i.permission))},dependencies:[Xe,Ne,vc,Lu,qe],styles:[".casino--room__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap;position:relative}.casino--room__text--container[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;justify-content:center;display:flex;flex-flow:row wrap;padding:.5rem;height:4.5rem}@media screen and (max-width: 768px),(max-height: 440px){.casino--room__text--container[_ngcontent-%COMP%]{height:3rem}}.casino--room__text[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:3.5rem}@media only screen and (max-width: 768px),(max-height: 440px){.casino--room__text[_ngcontent-%COMP%]{height:2rem}}.casino--room__text--name[_ngcontent-%COMP%]{font-size:2rem;text-transform:uppercase;font-weight:600;word-wrap:break-word}@media only screen and (max-width: 1024px){.casino--room__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 800px){.casino--room__text--name[_ngcontent-%COMP%]{font-size:1.4rem;line-height:16px}}@media only screen and (max-width: 480px){.casino--room__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}@media only screen and (max-width: 1024px){.casino--room__wrapper.extra-small-tile[_ngcontent-%COMP%]   .casino--room__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 800px){.casino--room__wrapper.extra-small-tile[_ngcontent-%COMP%]   .casino--room__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:16px}}@media only screen and (max-width: 480px){.casino--room__wrapper.extra-small-tile[_ngcontent-%COMP%]   .casino--room__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}.casino--room__wait-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.casino--room__loader[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.casino--room__text--description[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})(),M1e=(()=>{var t;class n{createRoomTileComponent(e,i){switch(i.info.tileData.roomType){case Jt.RoomType.SinglePlayer:let r=e.createComponent(E7);return r.instance.tileConfig=i,r;case Jt.RoomType.Matchmaking:let s=e.createComponent(A7);return s.instance.tileConfig=i,s;case Jt.RoomType.BlitzTournament:let a=e.createComponent(R7);return a.instance.tileConfig=i,a;case Jt.RoomType.PromoTournament:let c=e.createComponent(D7);return c.instance.tileConfig=i,c;case Jt.RoomType.KnockoutTournament:let u=e.createComponent(K7);return u.instance.tileConfig=i,u;case Jt.RoomType.Casino:let h=e.createComponent(J7);return h.instance.tileConfig=i,h;default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Xjt=ve.EButtonModifier;let X7=(()=>{var t;class n extends JI{constructor(e,i,r,s,a,c,u,h,b){super(e,i,r,s,c,h),this.buttonModifier=Xjt,this.analyticsTrackingService=a,this.constants=u,this.cdr=b,b.detach()}onClick(){this.navigateToShop()}stopPropagation(e){e.stopPropagation()}ngOnChanges(e){this.permission=this.getTilePermission({id:this.tileConfig.id}),this.cdr.detectChanges()}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}navigateToShop(){const e=this.getTilePermission({id:this.tileConfig.id});if(this.handleUserRestrictions(e)){const i=new aa.DefaultEvent(Nn.Navigation,"shop:myProfile",{label:"promoTile"});this.analyticsTrackingService.sendEvent(i),this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/shop/currency")}}])}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(yi),g(Qt),g(tn),g(Zn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["promo-tile"]],features:[mn([{provide:nn,useFactory:o=>new nn("promoTile",o),deps:[[new jo,new zo,nn]]},yi]),Ht,it],decls:10,vars:7,consts:[[3,"permission"],[1,"promo-tile__wrapper"],[1,"promo-tile__text"],[1,"promo-tile__gift"],[1,"promo-tile__coins"],[1,"promo-tile__gems"],["data-cy","storeTileRedirectButton",1,"promo-tile__buy-button",3,"bclass","buttonModifier","onClick"],[3,"maxBannersCount","click","mousedown","mouseup","touchstart","touchend"]],template:function(e,i){1&e&&(B(0,"restriction-cover",0),p(1,"div",1),B(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),p(6,"button-text",6),Y("onClick",function(){return i.navigateToShop()}),H(7),V(8,"translate"),m(),p(9,"ddna-banner-container",7),Y("click",function(s){return i.stopPropagation(s)})("mousedown",function(s){return i.stopPropagation(s)})("mouseup",function(s){return i.stopPropagation(s)})("touchstart",function(s){return i.stopPropagation(s)})("touchend",function(s){return i.stopPropagation(s)}),m()()),2&e&&(l("permission",i.permission),d(6),l("bclass","promo-tile__buy-button-bclass")("buttonModifier",i.buttonModifier.BUTTON_STORE),d(),ze("",$(8,5,"TICKET_POPUP.GO_TO_OFFERS"),"\n"),d(2),l("maxBannersCount",5))},dependencies:[pn,Kz,Lu,qe],styles:[".promo-tile__wrapper[_ngcontent-%COMP%]{height:100%;overflow:hidden}.promo-tile__buy-button[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);min-width:16rem}.promo-tile__promo[_ngcontent-%COMP%]{flex:0 0 auto;height:100%}"],changeDetection:0}),n})(),eq=(()=>{var t;class n extends JI{constructor(e,i,r,s,a,c,u){super(e,i,r,s,a,c),this.urlService=u}ngOnInit(){this.backgroundImage="url(".concat(this.urlService.getImageUrl("games/"+this.tileConfig.id+".jpg"),")")}onClick(){this.navigate().catch(e=>{console.error("Navigation error: ",e)})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Qt),g(Zn),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["external-navigation"]],features:[Ht],decls:3,vars:5,consts:[[1,"external-navigation__container"],[1,"ex-nav-title__img",3,"src"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"img",1),V(2,"transformUrl"),m()),2&e&&(go("background-image",i.backgroundImage),d(),l("src",$(2,3,"platform-logos/"+i.tileConfig.id+".svg"),Wn))},dependencies:[uo],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block}.external-navigation__container[_ngcontent-%COMP%]{height:100%;width:100%;background-size:cover;background-repeat:no-repeat}.ex-nav-title__img[_ngcontent-%COMP%]{top:50%;left:50%;transform:translate(-50%,-50%);position:relative;width:60%;height:90%}@media only screen and (max-width: 768px){.ex-nav-title__img[_ngcontent-%COMP%]{width:75%}}"]}),n})();class O1e extends ov{constructor(n,o,e,i,r,s){super(n,o,e,i,r),this.freeRewardsService=s}onClick(){const n=this.getTilePermission({id:this.tileConfig.id});n.isPermitted?this.tileConfig.info.tileData.onClick===kd.EBonusTileClickAction.OpenBonuses?this.freeRewardsService.openFreeRewards():this.claimBonus():this.permissionsService.showFailedRequirementsToUser(n)}}let eHt=(()=>{var t;class n{constructor(e){this.document=e}getWrapperElement(){const e=this.document.createElement("div");return e.id="mini-game__wrapper",e.classList.add("progressive-ads-bonus__mini-game"),this.document.getElementById("appWrapper").appendChild(e),e}removeWrapperElement(){const e=this.document.getElementById("mini-game__wrapper");e&&e.parentElement.removeChild(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function tHt(t,n){1&t&&B(0,"div",5),2&t&&go("left",n.index*(100/(_().stepsCount.length-1))+"%")}const nHt=t=>({selected:t});function iHt(t,n){if(1&t&&(p(0,"span",9),H(1),m()),2&t){const o=_().index,e=_();l("ngClass",ne(2,nHt,e.currentStep===o)),d(),se(o+1)}}function oHt(t,n){1&t&&B(0,"icon-component",10),2&t&&l("icon",_(2).EIcons.TICK_ICON)}const rHt=(t,n)=>({passed:t,selected:n});function sHt(t,n){if(1&t&&(p(0,"div",6),U(1,iHt,2,4,"span",7)(2,oHt,1,1,"icon-component",8),m()),2&t){const o=n.index,e=_();go("left",o*(100/(e.stepsCount.length-1))+"%"),l("ngClass",cn(5,rHt,e.currentStep>o,e.currentStep>=o)),d(),l("ngIf",e.currentStep<=o),d(),l("ngIf",e.currentStep>o)}}let E1e=(()=>{var t;class n{constructor(e){this.stepsCount=[],this.EIcons=ve.EIcons,this.cdr=e}ngOnInit(){this.cdr.detach(),this.cdr.detectChanges()}ngOnChanges(e){this.stepsCount=Array.from({length:this.steps},(i,r)=>r),this.cdr.detectChanges()}calcCompletedProgressBarWidth(){return"".concat(Math.min(this.currentStep*(100/(this.steps-1)),100),"%")}trackByFn(e,i){return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["progressive-ads-progress-bar"]],inputs:{steps:"steps",currentStep:"currentStep"},features:[it],decls:5,vars:6,consts:[[1,"progressive-ads__bar-wrapper"],["class","progressive-ads__outer--baloon",3,"left",4,"ngFor","ngForOf","ngForTrackBy"],[1,"progressive-ads__bar-inner"],[1,"progressive-ads__bar-inner","completed"],["class","progressive-ads__inner--baloon",3,"ngClass","left",4,"ngFor","ngForOf","ngForTrackBy"],[1,"progressive-ads__outer--baloon"],[1,"progressive-ads__inner--baloon",3,"ngClass"],["class","progressive-ads__number",3,"ngClass",4,"ngIf"],["class","progressive-ads__tick",3,"icon",4,"ngIf"],[1,"progressive-ads__number",3,"ngClass"],[1,"progressive-ads__tick",3,"icon"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,tHt,1,2,"div",1),p(2,"div",2),B(3,"div",3),U(4,sHt,3,8,"div",4),m()()),2&e&&(d(),l("ngForOf",i.stepsCount)("ngForTrackBy",i.trackByFn),d(2),go("width",i.calcCompletedProgressBarWidth()),d(),l("ngForOf",i.stepsCount)("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt,Ne,Dn],styles:["[_nghost-%COMP%]{display:block}.progressive-ads__bar-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:1em}.progressive-ads__bar-inner[_ngcontent-%COMP%]{position:absolute;height:.5em;width:100%;top:50%;transform:translateY(-50%)}.progressive-ads__bar-inner.completed[_ngcontent-%COMP%]{width:0}.progressive-ads__outer--baloon[_ngcontent-%COMP%]{position:absolute;border-radius:50%;top:50%;transform:translate(-50%,-50%);height:3em;width:3em}.progressive-ads__inner--baloon[_ngcontent-%COMP%]{position:absolute;border-radius:50%;top:50%;transform:translate(-50%,-50%);width:1.7em;height:1.7em}.progressive-ads__inner--baloon.passed[_ngcontent-%COMP%]{width:2.25em;height:2.25em}"],changeDetection:0}),n})();const x1e=t=>[t];function aHt(t,n){if(1&t){const o=Ce();p(0,"progressive-ads-reward-container",5),Y("watchVideo",function(){return oe(o),re(_().watch())}),m()}if(2&t){const o=n.$implicit,e=n.index,i=_();l("ngClass",ne(4,x1e,i.getRewardState(e)))("reward",o)("isLoading",i.isCurrent(i.getRewardState(e))&&i.isLoading)("state",i.getRewardState(e))}}function cHt(t,n){if(1&t&&(p(0,"p",6),H(1),V(2,"translate"),V(3,"timeLeft"),m()),2&t){const o=_();d(),se(yt(2,1,"FREE_REWARDS.REWARDS_RESET",ne(6,x1e,$(3,4,o.timeToNextBonus))))}}const lHt=t=>({"show-timer":t});let tq=(()=>{var t;class n{constructor(e){this.watchVideo=new ke,this.watchButton={modifier:ve.EButtonModifier.BUTTON_ATTENTION},this.cdr=e,this.cdr.detach()}ngOnChanges(e){this.cdr.detectChanges()}watch(){this.watchVideo.emit()}trackByFn(e,i){return e}getRewardState(e){return e<this.watchedVideos?ff.EState.Claimed:e===this.watchedVideos?ff.EState.Current:ff.EState.Locked}isCurrent(e){return e===ff.EState.Current}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["progressive-ads-bonus"]],inputs:{rewards:"rewards",watchedVideos:"watchedVideos",timeToNextBonus:"timeToNextBonus",isLoading:"isLoading"},outputs:{watchVideo:"watchVideo"},features:[it],decls:5,vars:8,consts:[[1,"progressive-ads-bonus__container"],[1,"progressive-ads-bonus__bar",3,"steps","currentStep"],[1,"progressive-ads-bonus__rewards--container",3,"ngClass"],["class","progressive-ads-bonus__reward-cmp",3,"ngClass","reward","isLoading","state","watchVideo",4,"ngFor","ngForOf","ngForTrackBy"],["class","progressive-ads-bonus__next-bonus",4,"ngIf"],[1,"progressive-ads-bonus__reward-cmp",3,"ngClass","reward","isLoading","state","watchVideo"],[1,"progressive-ads-bonus__next-bonus"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"progressive-ads-progress-bar",1),p(2,"div",2),U(3,aHt,1,6,"progressive-ads-reward-container",3),m(),U(4,cHt,4,8,"p",4),m()),2&e&&(d(),l("steps",i.rewards.length)("currentStep",i.watchedVideos),d(),l("ngClass",ne(6,lHt,i.timeToNextBonus)),d(),l("ngForOf",i.rewards)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.timeToNextBonus))},dependencies:[Xe,Mt,Ne,E1e,ff,qe,Ps],styles:[".progressive-ads-bonus__rewards--container[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;padding:0 1rem}@media screen and (max-width: 568px){.progressive-ads-bonus__rewards--container[_ngcontent-%COMP%]{padding:0 .25rem}}.progressive-ads-bonus__rewards--container[_ngcontent-%COMP%]:not(.show-timer){padding-bottom:3rem!important}.progressive-ads-bonus__reward-cmp[_ngcontent-%COMP%]{margin:0 1rem;width:100%;position:relative}@media screen and (max-width: 568px){.progressive-ads-bonus__reward-cmp[_ngcontent-%COMP%]{margin:0 .25rem}}.progressive-ads-bonus__bar[_ngcontent-%COMP%]{width:75%;margin:1rem auto 3rem}.progressive-ads-bonus__next-bonus[_ngcontent-%COMP%]{text-align:center;padding:2em 0}@media screen and (max-width: 568px){.progressive-ads-bonus__next-bonus[_ngcontent-%COMP%]{padding:2em 0}}"],changeDetection:0}),n})();const uHt=t=>({"mini-game-visible":t});function dHt(t,n){if(1&t){const o=Ce();p(0,"mini-game-wrapper",2),Y("onGameLoaded",function(){return oe(o),re(_().onGameLoaded())})("onGameClaim",function(){return oe(o),re(_().onGameClaim())})("onGameClose",function(){return oe(o),re(_().onGameClosed())})("onGameError",function(i){return oe(o),re(_().onGameError(i))}),m()}if(2&t){const o=_();l("gameData",o.miniGame)("ngClass",ne(2,uHt,o.miniGame))}}let nq=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.cdr=e,this.store=i,this.adsService=r,this.toaster=s,this.bonusService=a,this.animationService=c,this.cdr=e,this.cdr.detach()}ngOnInit(){this.subscription=this.store.bonuses.progressiveVideosBonus.subscribeProgressiveVideoBonus().subscribe(e=>{this.state=e,this.cdr.detectChanges()}),this.videoWatchSubscription=this.store.ads.subscribeRewardedVideo({id:rc.ProgressiveVideoBonus}).subscribe(e=>{this.isWatchingVideo=!!e,this.cdr.detectChanges()}),this.cdr.detectChanges()}ngOnDestroy(){var e,i;null===(e=this.subscription)||void 0===e||e.unsubscribe(),null===(i=this.videoWatchSubscription)||void 0===i||i.unsubscribe(),clearTimeout(this.timerId)}watchVideo(){var e=this;return f(function*(){try{const i=e.store.bonuses.progressiveVideosBonus.selectCurrentReward();if(yield e.adsService.showRewardedVideo({containerId:rc.ProgressiveVideoBonus,isRewardMiniGame:!!i.miniGame}),i.miniGame)e.miniGame=i.miniGame,e.cdr.detectChanges();else{yield e.bonusService.claimVideoBonusReward(Ba.ProgressiveRewardedVideos);const r=dr.buildCurrencyTypes(i.item);e.animationService.playAnimations(r)}}catch(i){i instanceof lt.NetworkError?e.toaster.error("ERRORS.CONNECTION_ERROR"):i instanceof Bp?e.toaster.error("BONUS.NO_VIDEOS"):i instanceof Np?e.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):i instanceof zm||(i instanceof Fp?e.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):e.toaster.warn("ERRORS.SOMETHING_WRONG")),console.log(i)}})()}onGameLoaded(){}onGameClaim(){var e=this;return f(function*(){try{const i=e.store.bonuses.progressiveVideosBonus.selectCurrentReward();yield e.bonusService.claimVideoBonusReward(Ba.ProgressiveRewardedVideos);const r=dr.buildCurrencyTypes(i.miniGame.reward);e.animationService.playAnimations(r)}catch(i){e.toaster.warn("ERRORS.SOMETHING_WRONG"),console.log(i)}})()}onGameClosed(){this.miniGame=void 0,this.cdr.detectChanges()}onGameError(e){console.log("error",e),this.toaster.error("ERRORS.CONNECTION_ERROR")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(bc),g(Dt),g(Iu),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["progressive-ads-bonus-smart"]],features:[mn([{provide:r5,useClass:eHt}])],decls:2,vars:5,consts:[[3,"rewards","watchedVideos","timeToNextBonus","isLoading","watchVideo"],["class","progressive-ads-bonus__mini-game",3,"gameData","ngClass","onGameLoaded","onGameClaim","onGameClose","onGameError",4,"ngIf"],[1,"progressive-ads-bonus__mini-game",3,"gameData","ngClass","onGameLoaded","onGameClaim","onGameClose","onGameError"]],template:function(e,i){1&e&&(p(0,"progressive-ads-bonus",0),Y("watchVideo",function(){return i.watchVideo()}),m(),U(1,dHt,1,4,"mini-game-wrapper",1)),2&e&&(l("rewards",i.state.rewards)("watchedVideos",i.state.currentProgress)("timeToNextBonus",i.state.calcTimeToNextBonus())("isLoading",i.isWatchingVideo),d(),l("ngIf",i.miniGame))},dependencies:[Xe,Ne,s5,tq],encapsulation:2,changeDetection:0}),n})();const pHt=()=>({color:"inherit"});function hHt(t,n){if(1&t&&(p(0,"colored-container"),B(1,"timer",9),m()),2&t){const o=_(2);d(),l("timerConfig",o.timerConfig)("milliseconds",1e3*o.bonus.calcTimeToNextBonus())("styleObject",pt(3,pHt))}}function mHt(t,n){if(1&t&&(p(0,"button-text",10),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("bclass","daily-bonus--tile__button-bclass")("loading",o.bonus.actions.claim.inProgress)("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION),d(),ze(" ",$(2,4,"BONUS.COLLECT")," ")}}function fHt(t,n){if(1&t&&(p(0,"div",3)(1,"div",4)(2,"p",5)(3,"span",6),H(4),V(5,"translate"),m()(),U(6,hHt,2,4,"colored-container",7)(7,mHt,3,6,"button-text",8),m()()),2&t){const o=_();l("ngClass","daily-bonus--tile__"+o.tileSizeMap[o.tileConfig.size]),d(),l("ngClass","daily-bonus--tile__"+o.tileSizeMap[o.tileConfig.size]),d(),l("ngClass",o.bonus||o.isBonusReady()?"daily-bonus--tile__text__bonus-ready":""),d(2),se($(5,6,"DAILY_BONUS.TITLE")),d(2),l("ngIf",o.bonus&&!o.isBonusReady()),d(),l("ngIf",o.isBonusReady())}}function gHt(t,n){if(1&t&&(p(0,"div",11)(1,"div",12)(2,"p",13)(3,"span",14),H(4),V(5,"translate"),m()()(),B(6,"div",15),m()),2&t){const o=_();l("ngClass","daily-bonus--tile__"+o.tileSizeMap[o.tileConfig.size]),d(),l("ngClass","daily-bonus--tile__"+o.tileSizeMap[o.tileConfig.size]),d(3),se($(5,3,"LOBBY.FREE_BONUS"))}}const _Ht=t=>({"daily-bonus-tile__restriction-cover":t});let iq=(()=>{var t;class n extends O1e{constructor(e,i,r,s,a,c,u,h,b,w,R){super(r,i,e,s,a,c),this.ads=R,this.EButtonModifier=ve.EButtonModifier,this.subscriptions=new ie.List,this.bonusService=h,this.timerConfig=eg,u.detach(),this.cdr=u,this.toaster=b,this.store=w}ngOnInit(){let e;this.store.bonuses.dailyBonus.selectState().isActive?e=this.store.bonuses.dailyBonus.subscribeState():this.store.bonuses.adventCalendar.selectState().isActive&&(e=this.store.bonuses.adventCalendar.subscribeState()),this.subscriptions.add(e.subscribe(i=>{this.bonus=i,this.cdr.detectChanges()})),this.subscriptions.add(this.store.bonuses.progressiveVideosBonus.subscribeProgressiveVideoBonus().subscribe(i=>{this.progressiveVideo=i,this.cdr.detectChanges()}))}ngOnChanges(e){this.permission=this.getTilePermission({id:this.tileConfig.id}),this.cdr.detectChanges()}onClick(){this.showProgressiveAds()?this.popup.dynamicPopupContent({component:nq,popupOptions:{type:Bs.ProgressiveAds,componentData:{},title:"LABEL.FREE_REWARDS"}}):super.onClick()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}claimBonus(){var e=this;return f(function*(){try{yield e.bonusService.claimDailyBonus()}catch(i){i instanceof lt.NetworkError?e.toaster.error("ERRORS.CONNECTION_ERROR"):e.toaster.warn("ERRORS.SOMETHING_WRONG")}})()}showProgressiveAds(){var e;return this.ads.hasActiveAdsAdapter()&&this.ads.isRewardedVideoEnabled()&&(null===(e=this.progressiveVideo)||void 0===e?void 0:e.isBonusAvailable)}isBonusReady(){var e,i;return(null===(e=this.bonus)||void 0===e?void 0:e.isReady)||(null===(i=this.bonus)||void 0===i?void 0:i.isBonusAvailable)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Zn),g(Mu),g(Re),g(Iu),g(Dt),g(J),g(bc))},t.\u0275cmp=pe({type:t,selectors:[["daily-bonus-tile"]],features:[mn([{provide:nn,useFactory:o=>new nn("bonusTile",o),deps:[[new jo,new zo,nn]]},yi]),Ht,it],decls:3,vars:6,consts:[["class","daily-bonus--tile__content--container",3,"ngClass",4,"ngIf"],["class","daily-bonus--tile__content--container progressive-videos",3,"ngClass",4,"ngIf"],[3,"ngClass","permission"],[1,"daily-bonus--tile__content--container",3,"ngClass"],[1,"daily-bonus--tile__text--container",3,"ngClass"],[1,"daily-bonus--tile__text",3,"ngClass"],[1,"daily-bonus--tile__text--name"],[4,"ngIf"],["class","daily-bonus--tile__button","data-cy","dailyBonusTileButton",3,"bclass","loading","buttonModifier",4,"ngIf"],[1,"daily-bonus--tile__timer",3,"timerConfig","milliseconds","styleObject"],["data-cy","dailyBonusTileButton",1,"daily-bonus--tile__button",3,"bclass","loading","buttonModifier"],[1,"daily-bonus--tile__content--container","progressive-videos",3,"ngClass"],[1,"daily-bonus--tile__text--container","pogressive",3,"ngClass"],[1,"daily-bonus--tile__text"],[1,"daily-bonus--tile__text--name","progressive-videos"],[1,"daily-bonus--tile__icon"]],template:function(e,i){1&e&&(U(0,fHt,8,8,"div",0)(1,gHt,7,5,"div",1),B(2,"restriction-cover",2)),2&e&&(l("ngIf",!i.showProgressiveAds()),d(),l("ngIf",i.showProgressiveAds()),d(),l("ngClass",ne(4,_Ht,!i.permission.isPermitted))("permission",i.permission))},dependencies:[Xe,Ne,Fs,pn,B0,Lu,qe],styles:[".daily-bonus--tile__content--container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.daily-bonus--tile__text--container[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;justify-content:center;display:flex;flex-flow:row wrap;padding:.5rem}.daily-bonus--tile__timer[_ngcontent-%COMP%]{height:3.5rem;display:flex;align-items:center}@media only screen and (max-width: 768px),(max-height: 440px){.daily-bonus--tile__timer[_ngcontent-%COMP%]{height:1.5rem}}.daily-bonus--tile__button[_ngcontent-%COMP%]{height:3.5rem;min-width:12rem}@media only screen and (max-width: 768px),(max-height: 440px){.daily-bonus--tile__button[_ngcontent-%COMP%]{min-height:initial;height:2rem}}.daily-bonus--tile__text[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:3.5rem}@media only screen and (max-width: 768px),(max-height: 440px){.daily-bonus--tile__text[_ngcontent-%COMP%]{height:2rem}}.daily-bonus--tile__text.daily-bonus--tile__text__bonus-ready[_ngcontent-%COMP%]{display:none}.daily-bonus--tile__text--name[_ngcontent-%COMP%]{font-size:2rem;text-transform:uppercase;font-weight:600;word-wrap:break-word}@media only screen and (max-width: 1024px){.daily-bonus--tile__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 800px){.daily-bonus--tile__text--name[_ngcontent-%COMP%]{font-size:1.4rem;line-height:16px}}@media only screen and (max-width: 480px){.daily-bonus--tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}@media only screen and (max-width: 1024px){.daily-bonus--tile__text--container.extra-small-tile[_ngcontent-%COMP%]   .daily-bonus--tile__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 800px){.daily-bonus--tile__text--container.extra-small-tile[_ngcontent-%COMP%]   .daily-bonus--tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:16px}}@media only screen and (max-width: 480px){.daily-bonus--tile__text--container.extra-small-tile[_ngcontent-%COMP%]   .daily-bonus--tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}.daily-bonus--tile__icon[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})();const vHt=t=>({name:t});let A1e=(()=>{var t;class n{constructor(e,i){this.cdr=e,this.elRef=i,this.claimRegular=new ke,this.doubleUp=new ke,this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.currencyType=ln}onDoubleUp(){this.doubleUp.emit()}onClaimRegular(){this.claimRegular.emit()}setClaimInProgress(e){this.claimInProgress=e,this.cdr.detectChanges()}setDoubleUpClaimInProgress(e){this.doubleUpClaimInProgress=e,this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g($t))},t.\u0275cmp=pe({type:t,selectors:[["mini-game-double-up"]],inputs:{reward:"reward",claimInProgress:"claimInProgress",doubleUpClaimInProgress:"doubleUpClaimInProgress"},outputs:{claimRegular:"claimRegular",doubleUp:"doubleUp"},decls:14,vars:20,consts:[[1,"mini-game-double-up__container"],[1,"mini-game-double-up__won--text"],[1,"mini-game-double-up__reward"],[1,"mini-game-double-up__image"],[1,"mini-game-double-up__reward__amount",3,"currency","value"],[1,"mini-game-double-up__buttons--wrapper"],[1,"mini-game-double-up__button",3,"icon","loading","disabled","buttonModifier","onClick"],[1,"mini-game-double-up__button",3,"loading","disabled","buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"container-component",0)(1,"p",1),H(2),V(3,"translate"),m(),p(4,"div",2),B(5,"div",3)(6,"currency-component",4),m(),p(7,"div",5)(8,"button-icon-text",6),Y("onClick",function(){return i.onDoubleUp()}),H(9),V(10,"translate"),m(),p(11,"button-text",7),Y("onClick",function(){return i.onClaimRegular()}),H(12),V(13,"translate"),m()()()),2&e&&(d(2),se($(3,12,"TOURNAMENTS.BLITZ.YOU_WON")),d(4),l("currency",i.currencyType.Chips)("value",i.reward),d(2),l("icon",ne(18,vHt,i.EIcons.WATCH_VIDEO))("loading",i.doubleUpClaimInProgress)("disabled",i.claimInProgress)("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION),d(),se($(10,14,"MINI_GAMES.DOUBLE_UP")),d(2),l("loading",i.claimInProgress)("disabled",i.doubleUpClaimInProgress)("buttonModifier",i.EButtonModifier.BUTTON_DOUBLE_UP),d(),se($(13,16,"MINI_GAMES.CLAIM")))},dependencies:[pn,so,So,Ga,qe],styles:[".mini-game-double-up__won--text[_ngcontent-%COMP%]{text-align:center}.mini-game-double-up__reward[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap;width:100%;text-align:center;align-items:center}.mini-game-double-up__image[_ngcontent-%COMP%]{width:10em;height:10em;margin:0 auto;background-position:center;background-repeat:no-repeat}.mini-game-double-up__buttons--wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column wrap;width:100%;text-align:center;margin:2rem 0;padding:0 3rem}.mini-game-double-up__button[_ngcontent-%COMP%]{margin:.5rem auto;width:inherit!important}.mini-game-double-up__won--text[_ngcontent-%COMP%]{margin-top:2rem}"],changeDetection:0}),n})(),R1e=(()=>{var t;class n{constructor(e){this.cdr=e,this.claimRegular=new ke,this.doubleUp=new ke}ngOnInit(){this.doubleUpOptions={closeDisabled:!0,disableBackdrop:!1,componentZIndex:"10003",styleProperties:{width:"30rem",height:"auto",maxHeight:"90%"},customComponentCssClass:"double-up-popup__custom-class"}}onDoubleUp(){this.doubleUp.emit()}onClaimRegular(){this.claimRegular.emit()}setClaimInProgress(e){this.claimInProgress=e,this.cdr.detectChanges()}setDoubleUpClaimInProgress(e){this.doubleUpClaimInProgress=e,this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["mini-game-double-up-popup"]],inputs:{reward:"reward",claimInProgress:"claimInProgress",doubleUpClaimInProgress:"doubleUpClaimInProgress"},outputs:{claimRegular:"claimRegular",doubleUp:"doubleUp"},decls:2,vars:5,consts:[[3,"popupContainerOpened","popupContainerOptions"],[3,"reward","claimInProgress","doubleUpClaimInProgress","claimRegular","doubleUp"]],template:function(e,i){1&e&&(p(0,"popup-container",0)(1,"mini-game-double-up",1),Y("claimRegular",function(){return i.onClaimRegular()})("doubleUp",function(){return i.onDoubleUp()}),m()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.doubleUpOptions),d(),l("reward",i.reward)("claimInProgress",i.claimInProgress)("doubleUpClaimInProgress",i.doubleUpClaimInProgress))},dependencies:[Wi,A1e],encapsulation:2,changeDetection:0}),n})(),oq=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.ads=e,this.miniGamesBuilderFactory=i,this.rootContainerService=r,this.bonuses=s,this.toaster=a,this.clientConfigService=c,this.loader=u,this.animationService=h}execute(e){var i=this;return f(function*(){try{i.rewardedGameInfo=yield i.getGameInfo(e);const r=i.miniGamesBuilderFactory.createBuilder().withGameInfo(i.rewardedGameInfo).withDefaultDestroyConditions().withRetry().build();let s;r.error.pipe(Qi(1)).subscribe(()=>r.destroy()),r.close.pipe(Qi(1)).subscribe(()=>{s||r.destroy()}),r.claim.pipe(Qi(1)).subscribe(f(function*(){if(yield i.showDoubleUp(e))return s=!0,i.openDoubleUp(r);i.claimRewardedGame(r.gameInfo,{showInterstitial:!0,doubleUp:!1}).pipe(wn(r.onDestroy)).subscribe({next:()=>{let c=dr.buildCurrencyTypesFromRewards(i.rewardedGameInfo.rewards);i.animationService.playAnimations(c)},error:c=>i.logError(c)})})),r.start()}catch(r){i.logError(r)}})()}openDoubleUp(e){var i=this;return f(function*(){const r=i.rootContainerService.createComponent(R1e,{},!0);e.onDestroy.pipe(Qi(1)).subscribe(()=>r.destroy()),r.instance.reward=e.gameInfo.reward.chips,r.changeDetectorRef.detectChanges(),r.instance.claimRegular.pipe(wn(e.onDestroy)).subscribe(f(function*(){r.instance.setClaimInProgress(!0),i.claimRewardedGame(e.gameInfo,{showInterstitial:!0,doubleUp:!1}).pipe(wn(e.onDestroy)).subscribe({next:()=>{let s=dr.buildCurrencyTypesFromRewards(i.rewardedGameInfo.rewards);i.animationService.playAnimations(s)},error:s=>i.logError(s),complete:()=>{r.instance.setClaimInProgress(!1),e.destroy()}})})),r.instance.doubleUp.pipe(wn(e.onDestroy)).subscribe(f(function*(){r.instance.setDoubleUpClaimInProgress(!0),yield i.ads.showRewardedVideo({containerId:rc.MiniGame}).then(()=>{i.claimRewardedGame(e.gameInfo,{showInterstitial:!1,doubleUp:!0}).pipe(wn(e.onDestroy)).subscribe({next:()=>{let s=dr.buildCurrencyTypesFromRewards(i.rewardedGameInfo.rewards);i.animationService.playAnimations(s)},error:s=>{i.logError(s),r.instance.setDoubleUpClaimInProgress(!1),e.destroy()},complete:()=>{console.warn("complete"),r.instance.setDoubleUpClaimInProgress(!1),e.destroy()}})}).catch(s=>{if(s instanceof zm)return r.instance.setDoubleUpClaimInProgress(!1);s instanceof lt.NetworkError?i.toaster.error("ERRORS.CONNECTION_ERROR"):s instanceof Bp?i.toaster.error("BONUS.NO_VIDEOS"):s instanceof Np?i.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):s instanceof Fp?i.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):i.toaster.warn("ERRORS.SOMETHING_WRONG"),i.claimRewardedGame(e.gameInfo,{showInterstitial:!1,doubleUp:!1}).pipe(wn(e.onDestroy)).subscribe({next:()=>{let a=dr.buildCurrencyTypesFromRewards(i.rewardedGameInfo.rewards);i.animationService.playAnimations(a)},error:a=>{i.logError(a),r.instance.setDoubleUpClaimInProgress(!1),e.destroy()},complete:()=>{console.warn("complete"),r.instance.setDoubleUpClaimInProgress(!1),e.destroy()}})})}))})()}claimRewardedGame(e,i){const r=f_(()=>Ks(this.bonuses.claimRewardedGameBonus({type:e.gameType,source:Tk.RewardedGame,containerId:rc.MiniGame,isRewardedVideoWatched:null==i?void 0:i.doubleUp})));return null!=i&&i.showInterstitial&&this.interstitialFallback(e.id)?f_(()=>Ks(this.ads.showInterstitial({tag:Kb.RejectDoubleUpInterstitial}).catch(a=>console.warn(a)))).pipe(jn(()=>r),Y3()):r}logError(e){e instanceof lt.NetworkError?this.toaster.error("ERRORS.CONNECTION_ERROR"):e instanceof Bp?this.toaster.error("BONUS.NO_VIDEOS"):e instanceof Np?this.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):e instanceof zm||(e instanceof Fp?this.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):this.toaster.warn("ERRORS.SOMETHING_WRONG")),console.warn(e)}showDoubleUp(e){var i=this;return f(function*(){var r,s;const a=null!==(r=null===(s=i.clientConfigService.getConfig().content.ads.rewardedVideoAfterGame)||void 0===s?void 0:s.miniGames)&&void 0!==r?r:[];return i.ads.isRewardedVideoEnabled()&&!!a.find(u=>u===e)&&(yield i.ads.isRewardedVideoReady(rc.MiniGame))})()}interstitialFallback(e){var i,r;return!!(null!==(i=null===(r=this.clientConfigService.getConfig().content.ads.rewardedVideoAfterGame)||void 0===r?void 0:r.miniGamesFallback)&&void 0!==i?i:[]).find(a=>a.id===e)}getGameInfo(e){var i=this;return f(function*(){try{return i.loader.on(),(yield i.bonuses.requestRewardedGames()).find(s=>s.gameType===e)}finally{i.loader.off()}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(bc),T(dI),T(Ia),T(Iu),T(Dt),T(Zt),T(ro),T(Fc))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const bHt=()=>({color:"inherit"});function CHt(t,n){if(1&t&&(p(0,"colored-container"),B(1,"timer",8),m()),2&t){const o=_();d(),l("timerConfig",o.timerConfig)("milliseconds",1e3*o.bonus.calcTimeToNextBonus())("styleObject",pt(3,bHt))}}function yHt(t,n){if(1&t&&(p(0,"button-text",9),H(1),V(2,"translate"),m()),2&t){const o=_();l("loading",o.bonus.actions.claim.inProgress)("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION)("bclass","rewarded-game-bonus--tile__button-bclass"),d(),ze(" ",$(2,4,"TEXT.PLAY")," ")}}const SHt=t=>[t],wHt=t=>({"rewarded-game-tile__restriction-cover":t});let rq=(()=>{var t;class n extends O1e{constructor(e,i,r,s,a,c,u,h,b){super(r,i,e,s,a,c),this.playRewardedGameUsecase=b,this.EButtonModifier=ve.EButtonModifier,this.timerConfig=eg,this.cdr=u,this.store=h,u.detach()}ngOnInit(){this.subscription=this.store.bonuses.games.subscribeGameStateByType(this.tileConfig.info.tileData.gameId).subscribe(i=>{this.bonus=i,this.cdr.detectChanges()})}ngOnChanges(e){this.permission=this.getTilePermission({id:this.tileConfig.id}),this.cdr.detectChanges()}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}claimBonus(){this.bonus.isReady?this.playRewardedGameUsecase.execute(this.bonus.gameType):this.freeRewardsService.openFreeRewards()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Zn),g(Mu),g(Re),g(J),g(oq))},t.\u0275cmp=pe({type:t,selectors:[["rewarded-game-tile"]],features:[mn([{provide:nn,useFactory:o=>new nn("bonusTile",o),deps:[[new jo,new zo,nn]]},yi]),Ht,it],decls:10,vars:15,consts:[[1,"rewarded-game-bonus--tile__content--container",3,"ngClass"],[1,"rewarded-game-bonus--tile__text--container"],[1,"rewarded-game-bonus--title__container"],[1,"rewarded-game-bonus__text",3,"innerHtml"],[1,"rewarded-game-bonus__text--name",3,"innerHtml"],[4,"ngIf"],["class","rewarded-game-bonus--tile__button","data-cy","rewardedGameTileButton",3,"loading","buttonModifier","bclass",4,"ngIf"],[3,"ngClass","permission"],[1,"rewarded-game-bonus--tile__timer",3,"timerConfig","milliseconds","styleObject"],["data-cy","rewardedGameTileButton",1,"rewarded-game-bonus--tile__button",3,"loading","buttonModifier","bclass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),V(4,"translate"),B(5,"span",4),V(6,"translate"),m()(),U(7,CHt,2,4,"colored-container",5)(8,yHt,3,6,"button-text",6),m()(),B(9,"restriction-cover",7)),2&e&&(l("ngClass",ne(11,SHt,i.tileConfig.info.tileData.gameId)),d(3),l("innerHtml",$(4,7,"PLATFORM_IDS."+i.tileConfig.info.tileData.gameId),Yn),d(2),l("innerHtml",$(6,9,"PLATFORM_IDS."+i.tileConfig.info.tileData.gameId),Yn),d(2),l("ngIf",i.bonus&&!i.bonus.isReady),d(),l("ngIf",null==i.bonus?null:i.bonus.isReady),d(),l("ngClass",ne(13,wHt,!i.permission.isPermitted))("permission",i.permission))},dependencies:[Xe,Ne,Fs,pn,B0,Lu,qe],styles:[".rewarded-game-bonus--tile__content--container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.rewarded-game-bonus--tile__text--container[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;justify-content:center;display:flex;flex-flow:row wrap;padding:.5rem;height:4.5rem}@media screen and (max-width: 768px),(max-height: 440px){.rewarded-game-bonus--tile__text--container[_ngcontent-%COMP%]{height:3rem}}.rewarded-game-bonus--tile__timer[_ngcontent-%COMP%]{height:3.5rem;display:flex;align-items:center}@media only screen and (max-width: 768px),(max-height: 440px){.rewarded-game-bonus--tile__timer[_ngcontent-%COMP%]{height:1.5rem}}.rewarded-game-bonus--tile__button[_ngcontent-%COMP%]{height:3.5rem;min-width:12rem}@media only screen and (max-width: 768px),(max-height: 440px){.rewarded-game-bonus--tile__button[_ngcontent-%COMP%]{min-height:initial;height:2rem}}.rewarded-game-bonus__text[_ngcontent-%COMP%], .rewarded-game-bonus--title__container[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})(),k1e=(()=>{var t;class n{createBonusTileComponent(e,i){switch(i.info.tileData.bonusType){case kd.EBonusTileType.DailyBonus:let s=e.createComponent(iq);return s.instance.tileConfig=i,s;case kd.EBonusTileType.RewardedGame:let a=e.createComponent(rq);return a.instance.tileConfig=i,a;default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var THt=ve.EIcons,PHt=ve.EButtonModifier;const c1=t=>[t];function IHt(t,n){if(1&t&&B(0,"client-players-counter",19),2&t){const o=_();l("ngClass",ne(2,c1,o.getTierId(o.pool)))("countersKeys",o.tileConfig.playersCounter.counterKeys)}}function MHt(t,n){1&t&&B(0,"div",20)}function OHt(t,n){if(1&t&&(p(0,"p",21)(1,"span",22),H(2),V(3,"uppercase"),V(4,"translate"),m(),B(5,"currency-component",23),m()),2&t){const o=_();d(2),ze("",$(3,3,$(4,5,"LOBBY.WIN")),": "),d(3),l("currency",o.currencyType.Chips)("value",o.pool.roomSettings.transactions.placementRewards[1].amount)}}function EHt(t,n){if(1&t&&(p(0,"p",24)(1,"span",25),H(2),V(3,"translate"),m(),B(4,"currency-component",26),m()),2&t){const o=_();d(2),ze("",$(3,3,"LOBBY.BET"),": "),d(2),l("currency",o.currencyType.Chips)("value",o.pool.roomSettings.transactions.bet)}}function xHt(t,n){if(1&t&&(p(0,"p",28),B(1,"icon-component",29),p(2,"span",30),H(3),m()()),2&t){const o=_(2);d(),l("icon","icons/clubpage.svg"),d(2),ze("+",o.pool.roomSettings.transactions.placementRewards[1].clubContribution,"")}}function AHt(t,n){if(1&t&&(p(0,"div",27)(1,"p",28),B(2,"icon-component",29),p(3,"span",30),H(4),m()(),U(5,xHt,4,2,"p",31),p(6,"p",28),B(7,"icon-component",29),p(8,"span",30),H(9),m()()()),2&t){const o=_();d(2),l("icon","icons/leaderboard-icon.svg"),d(2),mu("+",o.pool.roomSettings.leaderboard.pointsPerWin,"/",o.pool.roomSettings.leaderboard.pointsPerLoss,""),d(),l("ngIf",o.pool.roomSettings.transactions.placementRewards[1].clubContribution),d(2),l("icon","icons/stars.svg"),d(2),mu("",o.pool.roomSettings.game.xpTable.gameWon,"/",o.pool.roomSettings.game.xpTable.gameLost,"")}}function RHt(t,n){1&t&&Un(0)}function kHt(t,n){if(1&t&&(p(0,"button-text",32)(1,"span"),H(2),V(3,"translate"),V(4,"translate"),m()()),2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_PLAY)("bclass","mr--scroll__button-bclass "+o.getTierId(o.pool)),d(2),se(yt(3,3,"TEXT.PLAY_GAME",ne(8,c1,$(4,6,"PLATFORM_IDS."+o.gameId))))}}const LHt=()=>({url:"icons/locker3d.png"});function DHt(t,n){if(1&t&&(p(0,"button-icon-text",33),H(1),V(2,"translate"),m()),2&t){const o=_();l("bclass","mr--scroll__button-bclass")("image",pt(8,LHt))("buttonModifier",o.buttonModifier.BUTTON_PLAY)("disabled",!0),d(),mu("",$(2,6,o.levelRequirement.buttonText)," ",o.levelRequirement.requiredLevel,"")}}const BHt=(t,n,o)=>[t,n,o],NHt=t=>({"mr--scroll__restriction--cover__container__not-permitted":t});let sq=(()=>{var t;class n extends oy{constructor(e,i,r,s,a,c,u,h,b,w){super(c,e,i,s,a,r,u,b),this.buttonModifier=PHt,this.iconNames=THt,this.currencyType=ln,this.contants=h,this.store=w,this.nonGamblingStyleEnabled=this.contants.nonGamblingStyleEnabled}onClick(){const e=this.getTilePermission({id:this.tileConfig.id,roomSettings:this.pool.roomSettings});e.isPermitted?this.findRoom({pool:this.pool},e):this.handleUserRestrictions(e)}ngOnInit(){this.singleGame=this.clientConfigService.singleGamePlatform()}ngOnChanges(e){this.gameId=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.id,this.pool=this.getPoolSettings(this.tileConfig.info.tileData.pools)[0],this.permission=this.getTilePermission({id:this.tileConfig.id,roomSettings:this.pool.roomSettings}),this.levelRequirement=this.getLevelRequirement()}redirectTo(){this.router.navigate(["/".concat(this.contants.defaultLoggedRoute,"/leaderboards")]).catch(e=>{console.error("MatchmakingTileComponent navigation error",e)})}getTierId(e){var i;return e.roomSettings?null==e||null===(i=e.roomSettings)||void 0===i?void 0:i.trackingId.replace(".","-"):""}getLevelRequirement(){return this.permission.minLevelRequirement.isFulfilled?{...this.permission.maxLevelRequirement,buttonText:"LABEL.MAX_LEVEL"}:{...this.permission.minLevelRequirement,buttonText:"LABEL.LEVEL"}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Pi),g(Zt),g(Dt),g(on),g(Cn),g(oo),g(ro),g(tn),g(Zn),g(J))},t.\u0275cmp=pe({type:t,selectors:[["matchmaking-scroll-tile"]],features:[Ht,it],decls:25,vars:35,consts:[[1,"mr--scroll__wrapper",3,"ngClass"],["class","mr--scroll__players-counter",3,"ngClass","countersKeys",4,"ngIf"],[1,"mr--scroll__room-name"],[1,"mr--scroll__room-name-p",3,"innerHtml"],[1,"mr--scroll__room-separator",3,"ngClass"],[1,"mr--scroll__room-separator__dot"],[1,"mr--scroll__room-separator__svg",3,"icon"],[1,"mr--scroll_room-second-separator",3,"ngClass"],[1,"mr--scroll__transactions",3,"ngClass"],["class","mr--scroll__transactions--image",4,"ngIf"],["class","mr--scroll-reward__label",4,"ngIf"],["class","mr--scroll-bet__label",4,"ngIf"],[1,"mr--scroll__container--wrapper-play"],["class","mr--scroll__room--info",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["playButton",""],["disabledButton",""],[1,"mr--scroll__restriction--cover__container",3,"ngClass"],[1,"mr--scroll__restriction--cover",3,"ngClass","permission"],[1,"mr--scroll__players-counter",3,"ngClass","countersKeys"],[1,"mr--scroll__transactions--image"],[1,"mr--scroll-reward__label"],[1,"mr--scroll-reward__value-label"],[1,"mr--scroll-reward__value",3,"currency","value"],[1,"mr--scroll-bet__label"],[1,"mr--scroll-bet__value-label"],[1,"mr--scroll-bet__value",3,"currency","value"],[1,"mr--scroll__room--info"],[1,"mr--scroll__room--info--p"],[1,"mr--scroll__room--info--icon",3,"icon"],[1,"mr--scroll__room--info--span"],["class","mr--scroll__room--info--p",4,"ngIf"],[1,"mr--scroll__button",3,"buttonModifier","bclass"],[1,"mr--scroll__button",3,"bclass","image","buttonModifier","disabled"]],template:function(e,i){if(1&e&&(p(0,"section",0),U(1,IHt,1,4,"client-players-counter",1),p(2,"div",2),B(3,"p",3),V(4,"safeHtml"),V(5,"translate"),m(),p(6,"div",4),B(7,"div",5)(8,"div",5)(9,"div",5)(10,"icon-component",6),m(),B(11,"div",7),p(12,"div",8),U(13,MHt,1,0,"div",9)(14,OHt,6,7,"p",10)(15,EHt,5,5,"p",11),m(),p(16,"div",12),U(17,AHt,10,7,"div",13)(18,RHt,1,0,"ng-container",14)(19,kHt,5,10,"ng-template",null,15,ft)(21,DHt,3,9,"ng-template",null,16,ft),m()(),p(23,"div",17),B(24,"restriction-cover",18),m()),2&e){const r=Kt(20),s=Kt(22);l("ngClass",_a(21,BHt,i.getTierId(i.pool)||"",i.tileConfig.playersCounter.enabled?"mr--scroll__wrapper__counter-show":"",i.gameId)),d(),l("ngIf",i.tileConfig.playersCounter.enabled),d(2),l("innerHtml",$(4,17,$(5,19,"LOBBY.ROOM_NAMES."+(null==i.pool?null:i.pool.id.toUpperCase()))),Yn),d(3),l("ngClass",ne(25,c1,i.getTierId(i.pool)||"")),d(4),l("icon","icons/matchmakingSeparator.svg"),d(),l("ngClass",ne(27,c1,i.getTierId(i.pool)||"")),d(),l("ngClass",ne(29,c1,i.getTierId(i.pool)||"")),d(),l("ngIf",i.nonGamblingStyleEnabled),d(),l("ngIf",!i.nonGamblingStyleEnabled),d(),l("ngIf",!i.nonGamblingStyleEnabled),d(2),l("ngIf",!i.nonGamblingStyleEnabled),d(),l("ngIf",i.levelRequirement.isFulfilled)("ngIfThen",r)("ngIfElse",s),d(5),l("ngClass",ne(31,NHt,!(i.permission.isPermitted||1===i.permission.failedRequirements.length&&!i.permission.chipsBalanceRequirement.isFulfilled))),d(),l("ngClass",ne(33,c1,(null==i.pool||null==i.pool.roomSettings?null:i.pool.roomSettings.trackingId)||""))("permission",i.permission)}},dependencies:[Xe,Ne,Dn,pn,so,So,F0,Lu,Sp,qe,Ta],styles:[".mr--scroll__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;align-items:center;width:100%;height:100%}@media only screen and (min-height: 768px) and (orientation: portrait){.mr--scroll__wrapper[_ngcontent-%COMP%]{max-height:55rem}}.mr--scroll-bet__label[_ngcontent-%COMP%]{display:flex}.mr--scroll__container--wrapper-play[_ngcontent-%COMP%]{width:100%;margin-top:2rem;margin-bottom:0}.mr--scroll__container--wrapper-play[_ngcontent-%COMP%]   .mr--scroll__button[_ngcontent-%COMP%]{width:80%;white-space:pre-wrap}.mr--scroll__room-name[_ngcontent-%COMP%]{display:flex!important;position:absolute;top:0;height:18%;font-weight:700;font-size:2rem;text-align:center;align-items:center;width:50%;left:50%;transform:translate(-50%)}.mr--scroll__room-name-p[_ngcontent-%COMP%]{word-break:break-word;line-height:1;width:100%}.mr--scroll__room--info[_ngcontent-%COMP%]{display:flex;justify-content:center}.mr--scroll__tile-counter[_ngcontent-%COMP%]{position:absolute;right:0;top:0}.mr--scroll-bet__value[_ngcontent-%COMP%]{position:relative;font-size:1.6rem}.mr--scroll-reward__label[_ngcontent-%COMP%]{position:relative;font-size:1.4rem;text-align:center;font-weight:400;padding:.3rem 0}.mr--scroll-reward__label.simple[_ngcontent-%COMP%]{display:none}.mr--scroll-reward__label[_ngcontent-%COMP%]   .mr--scroll-reward__value-label[_ngcontent-%COMP%]{margin:0 .5rem}.mr--scroll__transactions[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-flow:column;align-items:center}.mr--scroll__room-separator__svg[_ngcontent-%COMP%], .mr--scroll_room-second-separator[_ngcontent-%COMP%]{display:none}"]}),n})();const FHt=(t,n,o)=>({first:t,second:n,third:o});function UHt(t,n){if(1&t&&B(0,"div",13),2&t){const o=n.index;l("ngClass",_a(1,FHt,0===o,1===o,2===o))}}function GHt(t,n){if(1&t&&(p(0,"div",5)(1,"div",6)(2,"p",7),H(3),V(4,"translate"),m()(),p(5,"div",8)(6,"div",9),U(7,UHt,1,5,"div",10),m(),B(8,"professionals",11),m(),B(9,"div",12),m()),2&t){const o=_();d(3),ze(" ",$(4,6,"LEADERBOARDS."+o.leaderboardType.toUpperCase())," "),d(4),l("ngForOf",o.profiles),d(),l("leaders",o.profiles)("showUsername",o.tileConfig.size!==o.tileSize.ExtraSmall&&o.isLeaderboardSet)("showLevel",!0)("bclass","rankings-scroll-tile-bclass")}}function VHt(t,n){1&t&&B(0,"spinner-loader",14)}function zHt(t,n){1&t&&(p(0,"p",18),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"LEADERBOARDS.EMPTY_LEADERBOARD")))}function jHt(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"LEADERBOARDS.EMPTY")))}const HHt=t=>({matchmaking:t});function qHt(t,n){if(1&t&&(p(0,"div",15),U(1,zHt,3,3,"p",16)(2,jHt,3,3,"p",17),m()),2&t){const o=_();l("ngClass",ne(3,HHt,o.leaderboardType===o.leaderboardTypes.Matchmaking)),d(),l("ngIf",o.leaderboardType===o.leaderboardTypes.Matchmaking),d(),l("ngIf",o.leaderboardType!==o.leaderboardTypes.Matchmaking)}}const WHt=(t,n)=>[t,n],$Ht=t=>({empty__leaderboard:t});let CD=(()=>{var t;class n extends ov{constructor(e,i,r,s,a,c,u,h,b){super(r,i,e,s,a),this.profiles=[],this.leaderboardTypes=ri,this.cdr=c,c.detach(),this.constants=h,this.leaderboards=u,this.navigationSevice=b}ngOnInit(){var e=this;return f(function*(){e.leaderboardType=e.tileConfig.info.tileData.leaderboardId;let r={type:e.leaderboardType,periodModifiers:[va.ThisWeek,va.LastWeek],cache:!0};e.leaderboardType===ri.Matchmaking&&(r.secondId=e.gamesStateService.getCurrentGameState().id);try{const s=yield e.leaderboards.loadLeaderboard(r);s[va.ThisWeek].leaderboard&&(e.profiles=s[va.ThisWeek].leaderboard.rankings.map(a=>a.profile).slice(0,3)),e.isLeaderboardSet=!0,e.cdr.detectChanges()}catch(s){console.log(s)}})()}onClick(){this.tileClick()}ngOnChanges(e){this.gameId=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.id,this.cdr.detectChanges()}tileClick(){this.navigationSevice.navigateByUrl("/".concat(this.constants.defaultLoggedRoute,"/leaderboards"),{state:{type:this.leaderboardType}}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Zn),g(Re),g(fa),g(tn),g(Yt))},t.\u0275cmp=pe({type:t,selectors:[["rankings-scroll-tile"]],features:[Ht,it],decls:9,vars:15,consts:[[1,"rankings-scroll-tile__wrapper",3,"ngClass"],["data-cy","leaderboardsTileTitle",1,"rankings-scroll-tile__title-container",3,"ngClass"],["class","rankings-scroll-tile__leaders",4,"ngIf"],["class","rankings-scroll-tile__loader",4,"ngIf"],["class","rankings__empty--content",3,"ngClass",4,"ngIf"],[1,"rankings-scroll-tile__leaders"],[1,"rankings-scroll-tile__leaders--top"],[1,"rankings-scroll-tile__leaderboards--name"],[1,"rankings-scroll-tile__professionals__wrapper"],[1,"rankings-scroll-tile__leaders__rankings-icons"],["class","rankings-scroll-tile__leaders__rankings-icons__icon",3,"ngClass",4,"ngFor","ngForOf"],[1,"rankings-scroll-tile__professionals",3,"leaders","showUsername","showLevel","bclass"],[1,"rankings-scroll-tile__leaders--images"],[1,"rankings-scroll-tile__leaders__rankings-icons__icon",3,"ngClass"],[1,"rankings-scroll-tile__loader"],[1,"rankings__empty--content",3,"ngClass"],["data-cy","leaderboardsTileDescription",4,"ngIf"],[4,"ngIf"],["data-cy","leaderboardsTileDescription"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"p"),H(3),V(4,"uppercase"),V(5,"translate"),m()(),U(6,GHt,10,8,"div",2)(7,VHt,1,0,"spinner-loader",3)(8,qHt,3,5,"div",4),m()),2&e&&(l("ngClass",cn(10,WHt,"rankings-scroll-tile__"+i.tileSizeMap[i.tileConfig.size],i.gameId)),d(),l("ngClass",ne(13,$Ht,0===i.profiles.length)),d(2),ze(" ",$(4,6,$(5,8,"LOBBY.ROOM_NAMES.RANKINGS"))," "),d(3),l("ngIf",i.profiles.length>0),d(),l("ngIf",!i.isLeaderboardSet),d(),l("ngIf",0===i.profiles.length&&i.isLeaderboardSet))},dependencies:[Xe,Mt,Ne,BC,vc,Sp,qe],styles:[".rankings-scroll-tile__wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.rankings-scroll-tile__title-container[_ngcontent-%COMP%]{display:flex!important;height:18%;font-weight:700;font-size:2rem;text-align:center;align-items:center;width:100%}.rankings-scroll-tile__title-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;text-align:center}.rankings-scroll-tile__leaders[_ngcontent-%COMP%]{margin-top:2rem}.rankings-scroll-tile__leaders[_ngcontent-%COMP%]   .rankings-scroll-tile__leaders--top[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;text-align:center;font-size:2.4rem;font-weight:700}.rankings__empty--content[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:80%;transform:translate(-50%,-50%)}.rankings__empty--content[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;text-align:center;font-size:2.4rem;font-weight:700}"],changeDetection:0}),n})();const KHt=(t,n)=>[t,n];let aq=(()=>{var t;class n extends CD{constructor(e,i,r,s,a,c,u,h,b,w,R){super(e,i,r,s,a,c,u,h,b),this.ngZone=w,this.elRef=R,this.profiles=[],this.flip=!1,this.cdr=c,c.detach(),this.constants=h,this.leaderboards=u}ngOnInit(){var e=()=>super.ngOnInit,i=this;return f(function*(){yield e().call(i),i.profiles.length>0&&i.ngZone.runOutsideAngular(()=>{i.addObserver(),i.timer=setInterval(()=>{!i.entry||!i.entry.isIntersecting||A4().measure(()=>{const r=i.elRef.nativeElement.getBoundingClientRect(),s=document.elementFromPoint(r.x+r.width/2,r.y+r.height/2);s!==i.elRef.nativeElement&&!i.elRef.nativeElement.contains(s)||(i.flip=!i.flip,i.cdr.detectChanges())})},4e3)})})()}ngOnDestroy(){var e;clearInterval(this.timer),null===(e=this.intersectionObserver)||void 0===e||e.disconnect()}onClick(){super.tileClick()}ngOnChanges(e){this.cdr.detectChanges()}addObserver(){this.intersectionObserver=new IntersectionObserver((i,r)=>{this.entry=i[0]},{root:null,rootMargin:"0px",threshold:.5}),this.intersectionObserver.observe(this.elRef.nativeElement)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Zn),g(Re),g(fa),g(tn),g(Yt),g(an),g($t))},t.\u0275cmp=pe({type:t,selectors:[["rankings-tile"]],features:[Ht,it],decls:12,vars:17,consts:[[1,"rankings-tile__wrapper",3,"ngClass"],[1,"rankings-tile__initial"],["empty-placeholder","",1,"rankings-tile__image--icon",3,"imgSrc"],[1,"rankings-tile__wrapper--texts","rankings-tile__text--name",3,"innerHtml"],[1,"rankings-tile__leaders"],[1,"rankings-tile__leaders--top"],[1,"rankings-tile__leaderboards--name"],[1,"rankings-tile__professionals",3,"leaders","showUsername","showLevel","bclass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"img",2),V(3,"transformUrl"),B(4,"p",3),V(5,"translate"),m(),p(6,"div",4)(7,"div",5)(8,"p",6),H(9),V(10,"translate"),m()(),B(11,"professionals",7),m()()),2&e&&(l("ngClass",cn(14,KHt,"rankings--tile__"+i.tileSizeMap[i.tileConfig.size],i.flip?"flip":"")),d(2),l("imgSrc",$(3,8,"lobby/rankings.png")),d(2),l("innerHtml",$(5,10,"LOBBY.ROOM_NAMES."+i.tileConfig.id.toUpperCase()),Yn),d(5),ze(" ",$(10,12,"LEADERBOARDS."+i.tileConfig.info.tileData.leaderboardId.toString().toUpperCase())," "),d(2),l("leaders",i.profiles)("showUsername",!1)("showLevel",!1)("bclass","rankings-tile-bclass"))},dependencies:[Xe,$o,BC,qe,uo],styles:[".rankings-tile__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;perspective:1000px;display:flex;justify-content:center;align-items:center;transition:transform .8s;transform-style:preserve-3d}.rankings-tile__wrapper.flip[_ngcontent-%COMP%]{transform:rotateX(180deg)}.rankings-tile__initial[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:rotateX(0);overflow:hidden}.rankings-tile__leaders[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:rotateX(180deg);flex-flow:column nowrap}.rankings-tile__image--icon[_ngcontent-%COMP%]{position:absolute;max-height:100%}.rankings-tile__text--name[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600;word-wrap:break-word}.rankings-tile__professionals[_ngcontent-%COMP%]{height:calc(100% - 2.5rem);position:absolute;width:-moz-fit-content;width:fit-content;bottom:0;left:50%;transform:translate(-50%)}"],changeDetection:0}),n})(),cq=(()=>{var t;class n extends ov{constructor(e,i,r,s,a,c,u){super(r,i,e,s,a),this.constants=c,this.cdr=u,u.detach()}onClick(){this.tileClick()}ngOnChanges(e){this.cdr.detectChanges()}tileClick(){this.router.navigate(["/".concat(this.constants.defaultLoggedRoute,"/").concat(this.gamesStateService.getCurrentGameState().id,"/lobby/tournaments")]),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Zn),g(tn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["events-tile"]],features:[Ht,it],decls:5,vars:4,consts:[[1,"events-tile__wrapper"],[1,"events-tile__initial"],[1,"events-tile__initial__img",3,"ngClass"],[1,"events-tile__wrapper--texts","events-tile__text--name",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"div",2)(3,"p",3),V(4,"translate"),m()()),2&e&&(d(2),l("ngClass","events-tile__"+i.tileSizeMap[i.tileConfig.size]),d(),l("innerHtml",$(4,2,"LOBBY.ROOM_NAMES."+i.tileConfig.id.toUpperCase()),Yn))},dependencies:[Xe,qe],styles:[".events-tile__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.events-tile__initial[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;overflow:hidden}.events-tile__leaders[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0}.events-tile__image--icon[_ngcontent-%COMP%]{position:absolute}.events-tile__text--name[_ngcontent-%COMP%]{text-transform:uppercase;font-weight:600;word-wrap:break-word}"],changeDetection:0}),n})(),uO=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w){this.store=e,this.http=i,this.soundService=r,this.settings=s,this.userService=a,this.clientShopService=c,this.communicationService=u,this.paymentsService=h,this.urlService=b,this.bonus=w}getCashBackWidgetViewModel(){return this.store.bonuses.cashback.subscribeState().pipe(bt(e=>void 0!==e),jn(e=>{const i=e;return{edges:[0,i.reward.current.chips],accumulatedAmount:i.custom.accumulatedAmount,requirements:i.requirements,isCollected:i.custom.lastCollected>0,decayLevel:i.getDecayLevel(),timeToNextState:()=>i.calcTimeToNextStateUpdate(),isReady:i.isReady,customData:i.custom,isInResetCooldownInterval:()=>i.isInResetCooldownInterval()}}))}getCashBackViewModel(){const e=this.communicationService.onReconnect(()=>{this.userService.getState({useCache:!1}).catch(i=>console.error(i))});return this.store.bonuses.cashback.subscribeState().pipe(bt(i=>void 0!==i),jn(i=>{const r=i,a={isReady:r.isReady,edges:[0,r.reward.current.chips],accumulatedAmount:r.custom.accumulatedAmount,requirements:r.requirements,current:{level:r.custom.currentBonusLevel,amount:r.reward.current.chips},customData:r.custom,isCollected:r.custom.lastCollected>0,timeToNextState:()=>r.calcTimeToNextStateUpdate(),decayLevel:r.getDecayLevel(),isInResetCooldownInterval:()=>r.isInResetCooldownInterval()};return r.reward.all?Object.assign(a,{next:{level:r.custom.nextBonusLevel,amount:r.reward.current.chips}}):a}),g_(()=>{e.detach()}))}buy(e){var i=this;return f(function*(){return i.clientShopService.openItemPopup({item:e.item,receiverProfile:i.store.selectUserState().profile,shopItemType:eC.WithProviders}).then(()=>{i.store.dispatch(DA({isReady:!0}))})})()}getUnLockerItems(){var e=this;return f(function*(){let i;e.getCashBackViewModel().pipe(Qi(1)).subscribe(s=>i=s);const r=yield e.clientShopService.load();return{default:r.products.find(s=>s.item.id===i.customData.cashbackUnlockers.defaultUnlockerItemId),decay:r.products.find(s=>s.item.id===i.customData.cashbackUnlockers.decayUnlockerItemId)}})()}claim(){return this.bonus.claimCashbackBonus().then(e=>{})}playSound(e,i){if(this.settings.getSounds())try{this.soundService.createSound({type:Dp.ClientSound,src:this.urlService.getSoundsUrl("cash-back/".concat(e,".mp3")),loop:i}).play()}catch(r){console.error(r)}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(En),T(Mo),T(nc),T(Kr),T(Gh),T(Ri),T(bk),T(ii),T(Iu))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var lq;!function(t){t.CashBackWidgetEmpty=class n{constructor(){this.accumulatedAmount=0,this.edges=[0,1/0],this.requirements={timeToNextBonus:0}}}}(lq||(lq={}));var dO=function(t){return t.InProgress="inProgress",t.Completed="completed",t.ReadyToCollect="readyToCollect",t.Collected="collected",t}(dO||{});class pO extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.completed=!0,n.cdr.detectChanges()})()}onAnimationEnd(){}updateProgress(){0===this.viewModel.accumulatedAmount&&(this.lastSeenProgress=0,this.state.to(hO))}}class hO extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.completed=!1,n.cdr.detectChanges()})()}onAnimationEnd(){this.lastSeenProgress=this.viewModel.accumulatedAmount,this.lastSeenProgress>=this.viewModel.edges[1]&&this.state.to(pO)}updateProgress(){this.lastSeenProgress!==this.viewModel.accumulatedAmount&&(this.isInViewport()&&(this.animate=!0),this.cdr.detectChanges())}}const ZHt=["progress"],QHt=["progressMeter"];let L1e=(()=>{var t;class n{constructor(e,i){this.ngZone=e,this.cdr=i,this.edges=[0,0],this.complete=new ke}ngOnChanges(e){this.updateProgress()}ngOnDestroy(){this.tween&&this.tween.kill()}updateProgress(){const e=100-(this.currentProgress-this.edges[0])/(this.edges[1]-this.edges[0])*100;if(this.animate){let r=(Math.max(this.lastSeenProgress,this.edges[0])-this.edges[0])/(this.edges[1]-this.edges[0])*100;(this.lastSeenProgress>this.currentProgress||0===r)&&(r=-100),this.progress.nativeElement.style.transform="translateX(".concat(r,"%)"),this.progressMeter.nativeElement.style.transform="translate(".concat(100+r,"%, -50%)"),this.ngZone.runOutsideAngular(()=>{this.tween=Uc.fromTo(this.progress.nativeElement,2,{translateX:"".concat(r,"%")},{translateX:"".concat(-e,"%"),onComplete:()=>{}}),Uc.fromTo(this.progressMeter.nativeElement,2,{translateX:"".concat(this.getMeterValue(100+r),"%")},{translateX:"".concat(this.getMeterValue(100-e),"%"),onComplete:()=>{}}),this.percent=Math.floor(100+r);const s={amount:this.percent},a=()=>{this.percent=Math.floor(s.amount),this.cdr.detectChanges()};Uc.to(s,{duration:2,amount:100-e,onUpdate:a,onComplete:a})})}else this.progress.nativeElement.style.transform="translateX(".concat(-e,"%)"),this.percent=Math.floor(100-e),this.progressMeter.nativeElement.style.transform="translate(".concat(this.getMeterValue(this.percent),"%, -50%)"),this.complete.emit()}getMeterValue(e){return Math.min(Math.max(e,5),95)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(an),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&($e(ZHt,7),$e(QHt,7)),2&e){let r;je(r=He())&&(i.progress=r.first),je(r=He())&&(i.progressMeter=r.first)}},inputs:{lastSeenProgress:"lastSeenProgress",currentProgress:"currentProgress",animate:"animate",edges:"edges"},outputs:{complete:"complete"},features:[it],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),uq=(()=>{var t;class n extends L1e{}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["cash-back-progress"]],features:[Ht],decls:12,vars:1,consts:[[1,"progress__container"],[1,"progress__partition--container"],[1,"progress__partition--wrapper"],[1,"progress__partition-img"],["progress",""],[1,"progress__meter--wrapper"],["progressMeter",""],[1,"progress__meter"],[1,"progress__meter--inner"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2),B(3,"div",3,4),m()(),p(5,"div",5,6)(7,"div",7)(8,"div",8)(9,"p"),H(10),m(),B(11,"div"),m()()()()),2&e&&(d(10),ze("",i.percent,"%"))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;width:100%}.progress__container[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}.progress__partition[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;display:block}.progress__partition--wrapper[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden}.progress__meter--wrapper[_ngcontent-%COMP%]{width:100%;position:absolute;top:50%;transform:translateY(-50%)}.progress__partition-img[_ngcontent-%COMP%]{width:100%;height:100%;display:block}.progress__meter[_ngcontent-%COMP%]{width:3em;height:2.25em;display:flex;align-items:center;justify-content:center;transform:translate(-50%)}.progress__meter--inner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}"],changeDetection:0}),n})();function YHt(t,n){if(1&t&&(p(0,"p",3),H(1),V(2,"translate"),m()),2&t){const o=_();d(),se(yt(2,1,o.text.key,o.text.params))}}let dq=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["tile-badge"]],inputs:{text:"text"},decls:3,vars:1,consts:[[1,"tile-badge__outer"],[1,"tile-badge__inner"],["class","tile-badge__text",4,"ngIf"],[1,"tile-badge__text"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),U(2,YHt,3,4,"p",2),m()()),2&e&&(d(2),l("ngIf",i.text))},dependencies:[Ne,qe],styles:["[_nghost-%COMP%]{width:5em}.tile-badge__outer[_ngcontent-%COMP%]{border-radius:50%;width:100%;height:100%}.tile-badge__inner[_ngcontent-%COMP%]{margin:auto;border-radius:50%;width:88%;height:88%}.tile-badge__text[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}"],changeDetection:0}),n})();const JHt=()=>({color:"inherit"});function XHt(t,n){if(1&t){const o=Ce();p(0,"colored-container",8)(1,"timer",9),Y("onCountdownFinished",function(){return oe(o),re(_().onCountdownFinished())}),m()()}if(2&t){const o=_();d(),l("timerConfig",o.timerConfig)("milliseconds",1e3*o.getTimeRemaining())("styleObject",pt(3,JHt))}}function e7t(t,n){if(1&t){const o=Ce();p(0,"cash-back-progress",10),Y("complete",function(){return oe(o),re(_().animationEnd())}),m()}if(2&t){const o=_();l("edges",o.viewModel.edges)("currentProgress",o.viewModel.accumulatedAmount)("lastSeenProgress",o.lastSeenProgress)("animate",o.animate)}}const t7t=()=>({key:"LOBBY.PROMO"});function n7t(t,n){1&t&&B(0,"tile-badge",11),2&t&&l("text",pt(1,t7t))}const i7t=t=>({"cashback--tile__text__not-shown":t}),o7t=t=>({"cash-back__restriction-cover":t});let pq=(()=>{var t;class n extends ov{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){super(r,i,e,s,a),this.cashBackService=h,this.navigationService=b,this.appStorageService=w,this.ngZone=R,this.time=G,this.elementRef=K,this.viewModel=new lq.CashBackWidgetEmpty,this.completed=!1,this.animate=!1,this.constants=c,this.cdr=u,this.timerConfig=eg}onClick(){this.tileClick()}tileClick(){this.router.navigate(["/".concat(this.constants.defaultLoggedRoute,"/cash-back")])}get currentState(){return this.state.getCurrentState()}ngOnChanges(e){this.permission=this.getTilePermission({id:this.tileConfig.id})}getTimeRemaining(){return 1!==this.viewModel.decayLevel||this.viewModel.isInResetCooldownInterval()?this.viewModel.timeToNextState():this.viewModel.customData.timers.purchaseCooldownStartsAt-this.time.getServerTimeS()+1}initStateMachine(){return this.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(hO,pO).setInitialState(this.getInitialState()).from(hO).to(pO).from(pO).to(hO).setStateContext(this).build(),this.state.logger.isEnabled=!1,this.state.start()}getBonus(){this.navigationService.navigate(["home/cash-back"]).catch(e=>console.error(e))}animationEnd(){this.currentState.onAnimationEnd&&this.currentState.onAnimationEnd.apply(this),this.appStorageService.setItem("cash-back",this.viewModel.accumulatedAmount)}isInViewport(){const e=this.elementRef.nativeElement;if(!e)return!1;const i=cr.findScrollableContainer(e);return!!i&&cr.isInViewPort(e,i.getBoundingClientRect())}showProgress(){return this.permission.isPermitted&&!this.viewModel.isCollected&&(this.viewModel.isReady||!this.viewModel.isInResetCooldownInterval())}ngOnInit(){var e=this;return f(function*(){yield e.ngZone.runOutsideAngular(()=>{e.subscription=e.cashBackService.getCashBackWidgetViewModel().subscribe(function(){var i=f(function*(r){e.viewModel=r,yield e.initStateMachine(),e.currentState.updateProgress.apply(e),e.cdr.detectChanges()});return function(r){return i.apply(this,arguments)}}())})})()}getInitialState(){return this.lastSeenProgress=this.appStorageService.getItem("cash-back",0),this.lastSeenProgress>=this.viewModel.edges[1]?pO:hO}ngOnDestroy(){var e;this.subscription&&this.subscription.unsubscribe(),null===(e=this.state)||void 0===e||e.destroy().catch(i=>console.warn("Cashback tile state machine destroy error",i))}onCountdownFinished(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Zn),g(tn),g(Re),g(uO),g(Yt),g(Ci),g(an),g(Bn),g($t))},t.\u0275cmp=pe({type:t,selectors:[["cashback-tile"]],features:[Ht,it],decls:10,vars:15,consts:[[1,"cashback--tile__content--container",3,"ngClass"],[1,"cashback--tile__text--container",3,"ngClass"],["data-cy","lobbyTileDescription",1,"cashback--tile__text",3,"ngClass"],[1,"cashback--tile__text--name"],["class","cashback-tile__timer__container",4,"ngIf"],["class","cashback--tile__progress",3,"edges","currentProgress","lastSeenProgress","animate","complete",4,"ngIf"],["class","cashback--tile__badge",3,"text",4,"ngIf"],[3,"ngClass","permission"],[1,"cashback-tile__timer__container"],[1,"cashback--tile__timer",3,"timerConfig","milliseconds","styleObject","onCountdownFinished"],[1,"cashback--tile__progress",3,"edges","currentProgress","lastSeenProgress","animate","complete"],[1,"cashback--tile__badge",3,"text"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"p",2)(3,"span",3),H(4),V(5,"translate"),m()(),U(6,XHt,2,4,"colored-container",4),m(),U(7,e7t,1,4,"cash-back-progress",5)(8,n7t,1,2,"tile-badge",6),m(),B(9,"restriction-cover",7)),2&e&&(l("ngClass","cashback__"+i.tileSizeMap[i.tileConfig.size]),d(),l("ngClass",(i.showProgress()?"with__progress-bar":"")+" cashback_text_"+i.tileSizeMap[i.tileConfig.size]),d(),l("ngClass",ne(11,i7t,i.permission.isPermitted)),d(2),se($(5,9,"LOBBY.ROOM_NAMES.CASHBACK")),d(2),l("ngIf",i.getTimeRemaining()>0&&!i.viewModel.isReady),d(),l("ngIf",i.showProgress()),d(),l("ngIf",0===i.viewModel.decayLevel&&!i.viewModel.isReady),d(),l("ngClass",ne(13,o7t,!i.permission.isPermitted))("permission",i.permission))},dependencies:[Xe,Ne,Fs,B0,uq,Lu,dq,qe],styles:[".cashback--tile__content--container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;display:flex;flex-flow:column}.cashback--tile__text--container[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;justify-content:center;flex-flow:row wrap;padding:.5rem}.cashback--tile__timer[_ngcontent-%COMP%]{height:3.5rem;display:flex;align-items:center;justify-content:center}@media only screen and (max-width: 768px),(max-height: 440px){.cashback--tile__timer[_ngcontent-%COMP%]{height:2rem}}.cashback--tile__button[_ngcontent-%COMP%]{height:3.5rem;min-width:12rem}@media only screen and (max-width: 768px),(max-height: 440px){.cashback--tile__button[_ngcontent-%COMP%]{min-height:initial;height:2rem}}.cashback--tile__text[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:3.5rem}@media only screen and (max-width: 768px),(max-height: 440px){.cashback--tile__text[_ngcontent-%COMP%]{height:2rem}}.cashback--tile__text--name[_ngcontent-%COMP%]{font-size:2rem;text-transform:uppercase;font-weight:600;word-wrap:break-word}@media only screen and (max-width: 1024px){.cashback--tile__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 800px){.cashback--tile__text--name[_ngcontent-%COMP%]{font-size:1.4rem;line-height:16px}}@media only screen and (max-width: 480px){.cashback--tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}@media only screen and (max-width: 1024px){.cashback--tile__text--container.cashback_text_extra-small-tile[_ngcontent-%COMP%]   .cashback--tile__text--name[_ngcontent-%COMP%]{font-size:1.8rem;line-height:20px}}@media only screen and (max-width: 800px){.cashback--tile__text--container.cashback_text_extra-small-tile[_ngcontent-%COMP%]   .cashback--tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:16px}}@media only screen and (max-width: 480px){.cashback--tile__text--container.cashback_text_extra-small-tile[_ngcontent-%COMP%]   .cashback--tile__text--name[_ngcontent-%COMP%]{font-size:1.2rem;line-height:14px}}.cashback--tile__text__not-shown[_ngcontent-%COMP%]{display:none}.cashback--tile__badge[_ngcontent-%COMP%]{position:absolute;top:0;right:0;transform:translate(12%,-12%) rotate(20deg)}"],changeDetection:0}),n})();var r7t=ve.EButtonModifier;function s7t(t,n){if(1&t){const o=Ce();p(0,"div",5)(1,"button-text",6),Y("onClick",function(){return oe(o),re(_().onClick())}),H(2),V(3,"translate"),m()()}if(2&t){const o=_();d(),l("bclass","betting-game-tile__button-bclass")("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),ze(" ",$(3,3,"TEXT.PLAY")," ")}}const a7t=t=>[t],c7t=t=>({"betting-game-tile__restriction-cover":t});let hq=(()=>{var t;class n extends JI{constructor(e,i,r,s,a,c,u,h){super(e,i,r,s,a,c),this.buttonModifier=r7t,this.cdr=u,u.detach(),this.navigated=new ke,this.urlService=h}ngOnInit(){this.gameId=this.tileConfig.info.tileData.gameId,this.cdr.detectChanges()}ngOnChanges(){this.permission=this.getTilePermission({id:this.tileConfig.id}),this.cdr.detectChanges()}onClick(){this.permission.isPermitted?this.router.navigate(["betting-game/".concat(this.gameId)]):this.handleUserRestrictions(this.permission)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Pi),g(Zt),g(Qt),g(Zn),g(Re),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["betting-game-tile"]],inputs:{tileConfig:"tileConfig"},outputs:{navigated:"navigated"},features:[Ht,it],decls:7,vars:11,consts:[[1,"betting-game-tile__container",3,"ngClass"],[1,"betting-game-tile__logo"],[1,"betting-game-tile__title"],["class","betting-game-tile__button__container",4,"ngIf"],[3,"ngClass","permission"],[1,"betting-game-tile__button__container"],[1,"betting-game-tile__button",3,"bclass","buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"section",0),B(1,"div",1),p(2,"div",2),H(3),V(4,"translate"),m(),U(5,s7t,4,5,"div",3),m(),B(6,"restriction-cover",4)),2&e&&(l("ngClass",ne(7,a7t,i.tileConfig.name+" "+i.gameId)),d(3),se($(4,5,"LOBBY.ROOM_NAMES."+i.gameId)),d(2),l("ngIf",i.permission.isPermitted),d(),l("ngClass",ne(9,c7t,!i.permission.isPermitted))("permission",i.permission))},dependencies:[Xe,Ne,pn,Lu,qe],styles:[".betting-game-tile__container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;height:100%}.betting-game-tile__logo[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:90%;width:90%;background-repeat:no-repeat}.betting-game-tile__button__container[_ngcontent-%COMP%]{width:100%;padding:.5rem;z-index:1}"],changeDetection:0}),n})();function l7t(t,n){if(1&t){const o=Ce();p(0,"timer",3,4),Y("onCountdownFinished",function(){return oe(o),re(_().onTimerExpire())}),m()}if(2&t){const o=_();l("milliseconds",o.state.timeMs)("timerConfig",o.timerConfig)}}let yD=(()=>{var t;class n{constructor(e,i){this.time=e,this.cdr=i,this.onCountdownFinished=new ke,this.timerConfig=new yl(D_).useYearsConfig({showDoubleDigits:!1,timeFormat:qi.Normal,showTextPeriod:!0,showNullValue:!1}).useMonthsConfig({showDoubleDigits:!1,timeFormat:qi.Normal,showTextPeriod:!0,showNullValue:!1}).useDaysConfig({showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal}).build()}ngOnInit(){this.calcTimeToNextState()}ngOnChanges(e){var i,r;e.timeSpan&&!e.timeSpan.firstChange&&(this.calcTimeToNextState(),null===(i=this.timer)||void 0===i||i.stop(),null===(r=this.timer)||void 0===r||r.start())}onTimerExpire(){var e,i;this.calcTimeToNextState(),null===(e=this.timer)||void 0===e||e.stop(),null===(i=this.timer)||void 0===i||i.start(),this.onCountdownFinished.emit(),this.cdr.detectChanges()}getStateText(){let e;switch(this.state.sessionState){case Nr.BeforeStart:e={key:"RANKED_GAMES.TILE_TIMER_TEXT_SEASON_NOT_STARTED_STATE"};break;case Nr.Active:e={key:"RANKED_GAMES.TILE_TIMER_TEXT_ACTIVE_SESSION_STATE"};break;case Nr.InActive:e={key:"RANKED_GAMES.TILE_TIMER_TEXT_INACTIVE_SESSION_STATE"};break;case Nr.BeforeEnd:e={key:"RANKED_GAMES.TILE_TIMER_TEXT_BEFORE_END_SESSION_STATE"};break;case Nr.Ended:e={key:"RANKED_GAMES.TILE_TIMER_TEXT_SEASON_ENDED_STATE"};break;default:e={key:""}}return e}calcTimeToNextState(){this.state=Dg.getSessionInfo(this.timeSpan,this.time.getServerTimeS())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Bn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ranked-session-info"]],viewQuery:function(e,i){if(1&e&&$e(Fs,5),2&e){let r;je(r=He())&&(i.timer=r.first)}},inputs:{timeSpan:"timeSpan"},outputs:{onCountdownFinished:"onCountdownFinished"},features:[it],decls:5,vars:4,consts:[[1,"ranked-season-tile-timer-wrapper"],[1,"ranked-season-tile-state__text"],["class","ranked-season-tile-timer",3,"milliseconds","timerConfig","onCountdownFinished",4,"ngIf"],[1,"ranked-season-tile-timer",3,"milliseconds","timerConfig","onCountdownFinished"],["timer",""]],template:function(e,i){1&e&&(p(0,"div",0)(1,"p",1),H(2),V(3,"translate"),m(),U(4,l7t,2,2,"timer",2),m()),2&e&&(d(2),se($(3,2,i.getStateText().key)),d(2),l("ngIf",i.state.timeMs>0))},dependencies:[Ne,Fs,qe],styles:[".ranked-season-tile-timer-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-flow:column;padding:1rem 2rem}"],changeDetection:0}),n})();var u7t=ve.EButtonModifier;function d7t(t,n){1&t&&Un(0)}function p7t(t,n){1&t&&B(0,"loader-image")}function h7t(t,n){1&t&&Un(0)}function m7t(t,n){if(1&t&&U(0,h7t,1,0,"ng-container",2),2&t){_();const o=Kt(9),e=Kt(7);l("ngIf",_().seasonInfo.partialModelLoadingState.isLoaded)("ngIfThen",o)("ngIfElse",e)}}const f7t=()=>({textKey:"RANKED_GAMES.ERROR_LOADING_SEASON"}),g7t=t=>[t];function _7t(t,n){1&t&&B(0,"empty-content",7),2&t&&l("textArray",ne(3,g7t,pt(2,f7t)))("noImgFlag",!0)}const v7t=(t,n,o)=>({startDate:t,endDate:n,activeHours:o});function b7t(t,n){if(1&t){const o=Ce();p(0,"p",8),H(1),m(),p(2,"ranked-session-info",9),Y("onCountdownFinished",function(){return oe(o),re(_(2).onTimerExpire())}),m(),p(3,"button-text",10),H(4),V(5,"translate"),m()}if(2&t){const o=_(2);d(),se(o.getTitle(o.seasonInfo)),d(),l("timeSpan",_a(7,v7t,o.seasonInfo.season.startDate,o.seasonInfo.season.endDate,o.poolSettings.activeHours)),d(),l("bclass","ranked-season-tile__button-bclass")("buttonModifier",o.buttonModifier.BUTTON_ATTENTION),d(),ze(" ",$(5,5,o.getButtonText().key)," ")}}function C7t(t,n){if(1&t&&(p(0,"section",1),U(1,d7t,1,0,"ng-container",2)(2,p7t,1,0,"ng-template",null,3,ft)(4,m7t,1,3,"ng-template",null,4,ft)(6,_7t,1,5,"ng-template",null,5,ft)(8,b7t,6,11,"ng-template",null,6,ft),m()),2&t){const o=Kt(3),e=Kt(5),i=_();go("background-image","url("+i.backgroundImage+")"),d(),l("ngIf",i.seasonInfo.partialModelLoadingState.isLoading)("ngIfThen",o)("ngIfElse",e)}}let mq=(()=>{var t;class n extends vD{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){super(e,i,r,s,a,c,u,h,w),this.store=R,this.getPartialSeasonInfoUsecase=G,this.timeService=K,this.buttonModifier=u7t,this.destroy$=new sn,h.detach(),this.navigated=new ke,this.urlService=b}ngOnInit(){var e=this;return f(function*(){e.store.rankedGames.subcribePartialSeasonInfo({gameId:e.gameId}).pipe(wn(e.destroy$)).subscribe(i=>{e.seasonInfo=i,null!=i&&i.season&&(e.poolSettings=e.getPoolSettings([i.season.poolId])[0],e.setBackgroundImage(null==i?void 0:i.season)),e.cdr.detectChanges()});try{yield e.getPartialSeasonInfoUsecase.execute(e.gameId)}catch(i){console.error("Ranked season tile init error: ",i)}e.cdr.detectChanges()})()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}getTitle(e){return e.season.name[this.translateService.getCurrentLang()]}getButtonText(){var e,i;const r={startDate:null===(e=this.seasonInfo)||void 0===e||null===(e=e.season)||void 0===e?void 0:e.startDate,endDate:null===(i=this.seasonInfo)||void 0===i||null===(i=i.season)||void 0===i?void 0:i.endDate,activeHours:this.poolSettings.activeHours};switch(Dg.getSessionInfo(r,this.timeService.getServerTimeS()).sessionState){case Nr.BeforeStart:return{key:"RANKED_GAMES.TILE_BUTTON_INACTIVE_SESSION_STATE"};case Nr.Active:return{key:"RANKED_GAMES.TILE_BUTTON_ACTIVE_SESSION_STATE"};case Nr.InActive:return{key:"RANKED_GAMES.TILE_BUTTON_INACTIVE_SESSION_STATE"};case Nr.BeforeEnd:return{key:"RANKED_GAMES.TILE_BUTTON_ACTIVE_SESSION_STATE"};case Nr.Ended:return{key:"RANKED_GAMES.TILE_BUTTON_COMPLETED_STATE"}}}onTimerExpire(){this.cdr.detectChanges()}getPoolSettings(e){const i=this.gamesStateService.getCurrentGameRelatedConfig();return wb()(i.matchmaking)?[]:i.matchmaking.pools.filter(r=>-1!==e.indexOf(r.id)&&r.active)}setBackgroundImage(e){e.backgroundUrl&&(this.backgroundImage=this.urlService.getImageUrl(e.backgroundUrl)),e.backgroundCdnUrl&&(this.backgroundImage=this.urlService.createCdnPath({url:"".concat(Lt.CONFIG.core.cdn.path.rankedGames).concat(e.backgroundCdnUrl)}))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(Cn),g(Po),g(Pi),g(Zt),g(Qt),g(Zn),g(Re),g(ii),g(pi),g(J),g(uwe),g(Bn))},t.\u0275cmp=pe({type:t,selectors:[["ranked-season-tile"]],inputs:{tileConfig:"tileConfig"},outputs:{navigated:"navigated"},features:[Ht],decls:1,vars:1,consts:[["class","ranked-season-tile__container",3,"backgroundImage",4,"ngIf"],[1,"ranked-season-tile__container"],[4,"ngIf","ngIfThen","ngIfElse"],["loading",""],["loaded",""],["loadedError",""],["loadedSuccess",""],[3,"textArray","noImgFlag"],[1,"ranked-season-tile__name"],[1,"ranked-season-tile__info",3,"timeSpan","onCountdownFinished"],[1,"ranked-season-tile__button",3,"bclass","buttonModifier"]],template:function(e,i){1&e&&U(0,C7t,10,5,"section",0),2&e&&l("ngIf",i.seasonInfo&&i.backgroundImage)},dependencies:[Ne,bo,pn,Oi,yD,qe],styles:[".ranked-season-tile__container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;height:100%}.ranked-season-tile__name[_ngcontent-%COMP%]{width:95%;margin:0 auto;text-align:center}.ranked-season-tile__button[_ngcontent-%COMP%]{max-width:85%;width:25rem}"],changeDetection:0}),n})();var fd=kd.ETileType,D1e=kd.EScrollTileType;let B1e=(()=>{var t;class n{constructor(e,i){this.roomTileFactory=e,this.bonusTileFactory=i}createTileComponent(e,i){switch(i.info.tileType){case fd.Room:return this.roomTileFactory.createRoomTileComponent(e,i);case fd.Navigation:let r=e.createComponent(vD);return r.instance.tileConfig=i,r;case fd.ExternalNavigation:let s=e.createComponent(eq);return s.instance.tileConfig=i,s;case fd.Game:let a=e.createComponent(Kk);return a.instance.tileConfig=i,a;case fd.Promo:let c=e.createComponent(X7);return c.instance.tileConfig=i,c;case fd.Bonus:return this.bonusTileFactory.createBonusTileComponent(e,i);case fd.Scroll:switch(i.info.tileData.type){case D1e.Basic:let te=e.createComponent(XI);return te.instance.tileConfig=i,te;case D1e.Matchmaking:let ee=e.createComponent(eM);return ee.instance.tileConfig=i,ee;default:return}case fd.RoomScroll:let u=e.createComponent(sq);return u.instance.tileConfig=i,u;case fd.Rankings:let h=e.createComponent(aq);return h.instance.tileConfig=i,h;case fd.Events:let b=e.createComponent(cq);return b.instance.tileConfig=i,b;case fd.RankingsScroll:let w=e.createComponent(CD);return w.instance.tileConfig=i,w;case fd.CashBack:let R=e.createComponent(pq);return R.instance.tileConfig=i,R;case fd.BettingGame:let G=e.createComponent(hq);return G.instance.tileConfig=i,G;case fd.RankedSeason:let K=e.createComponent(mq);return K.instance.tileConfig=i,K;default:return}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(M1e),T(k1e))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var y7t=ve.EButtonModifier;const S7t=["tileRef"],N1e=(t,n)=>[t,n];function w7t(t,n){if(1&t&&B(0,"client-players-counter",4),2&t){const o=_();l("ngClass",cn(2,N1e,o.tileConfig.id+"--tile "+o.tileConfig.info.tileType+"--tile","counterContainer "+o.tileConfig.id+"--tile "+o.tileConfig.info.tileType+"--tile"))("countersKeys",o.tileConfig.playersCounter.counterKeys)}}let mO=(()=>{var t;class n{constructor(e){this.buttonModifier=y7t,this.sound="click",this.tileFactory=e}ngOnDestroy(){this.tileRef&&this.tileRef.clear(),this.dynamicTile&&this.dynamicTile.destroy(),this.dynamicTile=void 0}tileClick(){this.dynamicTile&&this.dynamicTile.instance.onClick()}ngOnChanges(e){this.isHighlighted=void 0===this.tileConfig.highlighted||this.tileConfig.highlighted,this.dynamicTile?(this.dynamicTile.instance.tileConfig=e.tileConfig.currentValue,this.dynamicTile.instance.ngOnChanges(e)):(this.dynamicTile=this.tileFactory.createTileComponent(this.tileRef,this.tileConfig),this.dynamicTile.instance.ngOnChanges(e))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(B1e))},t.\u0275cmp=pe({type:t,selectors:[["tile-component"]],viewQuery:function(e,i){if(1&e&&$e(S7t,7,bs),2&e){let r;je(r=He())&&(i.tileRef=r.first)}},inputs:{tileConfig:"tileConfig"},features:[it],decls:5,vars:8,consts:[["click-feedback","","click-sound","",1,"tile__wrapper",3,"ngClass","scaleFactor","sound","click"],[1,"tile-dynamic__wrapper"],["tileRef",""],["class","tile-counter",3,"ngClass","countersKeys",4,"ngIf"],[1,"tile-counter",3,"ngClass","countersKeys"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.tileClick()}),p(1,"div",1),Un(2,null,2),m(),U(4,w7t,1,5,"client-players-counter",3),m()),2&e&&(l("ngClass",cn(5,N1e,i.isHighlighted?"highlighted":"",i.tileConfig.info.tileData.roomType||""))("scaleFactor",.99)("sound",i.sound),d(),Hn("data-cy","lobbyTile"+i.tileConfig.id),d(3),l("ngIf",i.tileConfig.playersCounter.enabled))},dependencies:[Xe,Ne,po,Fd,F0],styles:[".tile__wrapper[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-flow:column nowrap;position:relative;background-size:cover;background-position:center;background-repeat:no-repeat}.tile__wrapper.knockoutTournament[_ngcontent-%COMP%]{background-repeat:repeat;background-size:25%}.tile-counter[_ngcontent-%COMP%]{position:absolute}.tile-counter.matchmaking--tile[_ngcontent-%COMP%]{display:none}.tile-dynamic__wrapper[_ngcontent-%COMP%]{height:100%}"]}),n})();function T7t(t,n){if(1&t&&(p(0,"div",3),B(1,"tile-component",4),m()),2&t){const o=n.$implicit;l("ngClass",_(2).tileSizeMap[o.size]),d(),l("tileConfig",o)("id",o.id)}}const P7t=(t,n)=>({cover:t,"keep-columns":n});function I7t(t,n){if(1&t&&(p(0,"div",1),U(1,T7t,2,3,"div",2),m()),2&t){const o=n.$implicit,e=_();l("ngClass",cn(3,P7t,e.coverContainer,e.keepLargeColumns)),d(),l("ngForOf",o)("ngForTrackBy",e.trackById)}}let fO=(()=>{var t;class n{constructor(){this.coverContainer=!1,this.active=!0,this.tileSizeMap={4:"large-tile",2.5:"extra-medium-tile",2:"medium-tile",1.5:"small-medium-tile",1:"small-tile",.5:"extra-small-tile"},this.columns=[]}ngOnChanges(e){this.columns=this.createColumns()}trackById(e,i){return i.id}trackByIndex(e){return e}updateGrid(e){this.config=this.config.map(i=>e.id!==i.id?i:e),this.columns=this.createColumns()}createColumns(){const e=new A8t(this.config);let i=0;return this.config.forEach(r=>{i+=r.size}),i>0&&i<=8&&!this.coverContainer&&(this.coverContainer=!0),e.getGridColumns()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["grid"]],hostAttrs:[1,"grid__wrapper"],hostVars:2,hostBindings:function(e,i){2&e&&Uo("grid__host",i.active)},inputs:{config:"config",coverContainer:"coverContainer",keepLargeColumns:"keepLargeColumns"},features:[it],decls:1,vars:2,consts:[["class","grid-column",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"grid-column",3,"ngClass"],["class","grid-tile",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"grid-tile",3,"ngClass"],["activeCmp","",1,"grid-tile__wrapper",3,"tileConfig","id"]],template:function(e,i){1&e&&U(0,I7t,2,6,"div",0),2&e&&l("ngForOf",i.columns)("ngForTrackBy",i.trackByIndex)},dependencies:[Xe,Mt,Nm,mO],styles:['[_nghost-%COMP%]{display:block;height:100%;width:100%;min-height:40rem}@media only screen and (orientation: portrait){[_nghost-%COMP%]{min-height:75rem}}[_nghost-%COMP%]:after{display:block;content:"";clear:both}.grid-column[_ngcontent-%COMP%]{width:50%;height:94%;float:left}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3){width:100%;height:48%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .large-tile[_ngcontent-%COMP%], .grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .medium-tile[_ngcontent-%COMP%]{width:50%;height:100%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .extra-medium-tile[_ngcontent-%COMP%]{width:67%;height:100%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .small-medium-tile[_ngcontent-%COMP%]{width:33%;height:100%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .small-tile[_ngcontent-%COMP%]{width:25%;height:100%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .extra-small-tile[_ngcontent-%COMP%]{width:25%;height:50%}.grid-column.cover[_ngcontent-%COMP%]{height:100%}.grid-column.cover[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3){height:50%}.grid-tile[_ngcontent-%COMP%]{background-size:cover;background-repeat:no-repeat;background-position:bottom;float:left;position:relative;padding:.25rem}.grid-tile__wrapper[_ngcontent-%COMP%]{overflow:hidden;position:relative;height:100%}.large-tile[_ngcontent-%COMP%]{width:100%;height:100%}.extra-medium-tile[_ngcontent-%COMP%]{width:100%;height:67%}.small-medium-tile[_ngcontent-%COMP%]{width:100%;height:33%}.medium-tile[_ngcontent-%COMP%]{width:100%;height:50%}.small-tile[_ngcontent-%COMP%]{width:50%;height:50%}.extra-small-tile[_ngcontent-%COMP%]{width:50%;height:25%}@media only screen and (orientation: portrait){.grid-column[_ngcontent-%COMP%]{width:100%;height:48%;float:left}.grid-column.cover[_ngcontent-%COMP%]{height:50%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .large-tile[_ngcontent-%COMP%], .grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .medium-tile[_ngcontent-%COMP%]{width:100%;height:50%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .extra-medium-tile[_ngcontent-%COMP%]{width:100%;height:67%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .small-medium-tile[_ngcontent-%COMP%]{width:100%;height:33%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .small-tile[_ngcontent-%COMP%]{width:50%;height:50%}.grid-column[_ngcontent-%COMP%]:not(.keep-columns):nth-of-type(n+3)   .extra-small-tile[_ngcontent-%COMP%]{width:50%;height:25%}}']}),n})();var M7t=ve.EIcons;const O7t=["grid"];function E7t(t,n){if(1&t&&(p(0,"div",9),B(1,"img",10),V(2,"transformUrl"),B(3,"div",11),m()),2&t){const o=_();d(),l("imgSrc",$(2,2,"platform-logos/"+o.gameId+".svg")),d(2),l("ngClass",o.gameId)}}function x7t(t,n){1&t&&B(0,"avatar-lobby-layout",12),2&t&&l("users",_().users)}let F1e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.rulerService=a,this.elementRef=c,this.brazeEngagementService=u,this.EIcons=M7t,this.lobbyGridService=e,this.deltaDNAService=r,this.avatarService=i,this.tutorials=s,this.gridTiles=[],this.users=[],this.flags={lobbyRendered:!1,avatarsResolved:!1}}ngOnInit(){var e=this;return f(function*(){e.showGameName=!1===e.lobbyGridService.isSinglePlatform(),e.configSubscription=e.lobbyGridService.configChange().subscribe(i=>{var r,s;e.gameId=i.gameConfig.id,e.gridTiles=null!==(r=null===(s=i.gameConfig)||void 0===s||null===(s=s.grid)||void 0===s?void 0:s.lobby)&&void 0!==r?r:[],e.deltaDNAService.gameLobbyOpenedEngage(i.gameConfig.id),e.deltaDNAService.gameLobbyOpenedEngage2(i.gameConfig.id),e.brazeEngagementService.gameLobbyOpenedEngage(i.gameConfig.id),e.brazeEngagementService.gameLobbyOpenedEngage2(i.gameConfig.id),e.updateFlags({lobbyRendered:!0})},i=>{console.error("Lobby config error: ",i)}),e.tryToGetOnlineUsersCount();try{const i=yield e.avatarService.getUsersAvatars();e.users=i.slice(0,50)}catch(i){console.error("LobbyGridComponent getUsersAvatars error:",i)}finally{e.updateFlags({avatarsResolved:!0})}})()}ngAfterViewInit(){this.rafId=requestAnimationFrame(()=>{this.requestTutorialIfReady()}),this.resizeSubscription=this.rulerService.getElementDimension(this.grid.nativeElement).subscribe(e=>{if(!this.grid||!this.grid.nativeElement)return;const i=8*Math.round(e.height/8);this.grid.nativeElement.style.height="".concat(i,"px")})}ngOnDestroy(){var e,i;this.configSubscription&&this.configSubscription.unsubscribe(),null===(e=this.resizeSubscription)||void 0===e||e.unsubscribe(),clearTimeout(this.getOnlineUserRetryTimeout),cancelAnimationFrame(this.rafId),null===(i=this.getOnlineUserPromise)||void 0===i||i.cancel(),this.tutorials.onTutorialComponentDestroy(this,Ms.GameLobby)}setOnlinePlayersCountValue(e){this.onlinePlayersCount=Math.max(e,1)}tryToGetOnlineUsersCount(){var e=this;return f(function*(){try{e.getOnlineUserPromise=new Jn(new Promise((i,r)=>{e.getOnlineUsersCount().then(s=>i(s)).catch(s=>r(s))})),yield e.getOnlineUserPromise}catch(i){if(console.log(i),i instanceof Cr)return;e.onlinePlayersCount=Math.max(e.lobbyGridService.onlineUsersCount,1),e.getOnlineUserRetryTimeout=setTimeout(()=>{e.tryToGetOnlineUsersCount()},Gn.ETime.SecondsPerMinute*Gn.ETime.MsPerSecond)}})()}getOnlineUsersCount(){var e=this;return f(function*(){const i=yield e.lobbyGridService.getOnlineUsersCount();e.setOnlinePlayersCountValue(i)})()}updateFlags(e){for(let i in e)e.hasOwnProperty(i)&&(this.flags[i]=e[i])}requestTutorialIfReady(){this.flags.lobbyRendered&&(this.tutorials.requestTutorial({cmp:this,group:Ms.Game,replaceExisting:!0,payload:{gameId:this.gameId}}),this.tutorials.requestTutorial({cmp:this,group:Ms.GameLobby,payload:{gameId:this.gameId}}))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(O7),g(o1e),g(sl),g(sv),g(Ua),g($t),g(cl))},t.\u0275cmp=pe({type:t,selectors:[["lobby-grid"]],viewQuery:function(e,i){if(1&e&&$e(O7t,7,$t),2&e){let r;je(r=He())&&(i.grid=r.first)}},hostAttrs:[1,"lobby__grid"],features:[mn([{provide:nn,useFactory:o=>new nn("lobby",o),deps:[[new jo,new zo,nn]]}])],decls:11,vars:8,consts:[["class","lobby__game",4,"ngIf"],[1,"grid__wrapper--main-grid",3,"config"],["grid",""],[1,"avatar-layout__online-users-count__container"],[1,"avatar-layout__online-users-count__label"],[1,"avatar-layout__online-users-count__wrapper"],[1,"avatar-layout__online-users-count__icon",3,"icon"],[1,"avatar-layout__online-users-count__number",3,"value"],["class","avatar-layout--container",3,"users",4,"ngIf"],[1,"lobby__game"],["empty-placeholder","",1,"lobby__game--logo",3,"imgSrc"],["empty-placeholder","",1,"lobby__game--second-logo",3,"ngClass"],[1,"avatar-layout--container",3,"users"]],template:function(e,i){1&e&&(U(0,E7t,4,4,"div",0),B(1,"grid",1,2),p(3,"div",3)(4,"span",4),H(5),V(6,"translate"),m(),p(7,"div",5),B(8,"icon-component",6)(9,"number",7),m()(),U(10,x7t,1,1,"avatar-lobby-layout",8)),2&e&&(l("ngIf",i.showGameName),d(),l("config",i.gridTiles),d(4),ze("",$(6,6,"HOME_COMPONENT.PLAYERS_ONLINE"),": "),d(3),l("icon",i.EIcons.USER),d(),l("value",i.onlinePlayersCount),d(),l("ngIf",i.users.length>0))},dependencies:[Xe,Ne,$o,Dn,Qr,Mz,fO,qe,uo],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:block}.lobby__game[_ngcontent-%COMP%]{padding:.25rem;height:5rem;display:flex;justify-content:center}.lobby__game--logo[_ngcontent-%COMP%]{height:100%;margin:0 .5rem}.grid__wrapper--main-grid[_ngcontent-%COMP%]{height:90%;will-change:transform}.avatar-layout__online-users-count__container[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:center;padding:.5rem 0;align-items:center}.avatar-layout__online-users-count__wrapper[_ngcontent-%COMP%]{display:flex;direction:ltr}.lobby__game--second-logo[_ngcontent-%COMP%]{display:none}"]}),n})();var Mc=function(t){return t[t.Default=0]="Default",t[t.Informative=1]="Informative",t}(Mc||{}),wf=function(t){return t.TranslatableString="translatableString",t.Boolean="boolean",t.String="string",t.Number="number",t.Points="points",t.Chips="chips",t.Image="image",t.Time="time",t.FreeText="freeText",t}(wf||{});class l1{constructor(n){this.gamesStateService=n}parse(n){let o=[];o=n.game.mode?ez()(this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.customGames.customSettings,i=>!i.linkedTo||"game.mode"!==i.linkedTo.id||n.game.mode===i.linkedTo.value):this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.customGames.customSettings;const e=[];return o.forEach(i=>{if(n.game.inventory&&"game.inventory.deck"===i.id){const r=this.getInventoryItemByType(n.game.inventory,i.customTag);r&&e.push({id:i.id,value:r,format:l1.getOptionFormat(i.id),url:r.data.previewUrl})}else if(n.game.inventory&&"game.inventory.table"===i.id){const r=this.getInventoryItemByType(n.game.inventory,Jt.PlayerItemType.Table);r&&e.push({id:i.id,value:r,format:l1.getOptionFormat(i.id),url:r.data.previewUrl})}else if("transactions.bet"!==i.id&&"transactions.reward"!==i.id){const r=_2()(n,i.id),s=this.checkForOptionLabel(r,i);s?e.push({id:i.id,value:s,format:wf.FreeText}):null!=r&&e.push({id:i.id,value:r,format:l1.getOptionFormat(i.id)})}}),e}checkForOptionLabel(n,o){let e;if(o.options)return o.options.forEach(i=>{i.value===n&&i.label&&(e=i.label)}),e}getInventoryItemByType(n,o){return n.find(e=>e.type===o)}static getOptionFormat(n){switch(n){case"game.timers.move":return wf.Time;case"game.maxScore":case"game.jackDiamondsRule":return wf.Points;case"game.shootingTheMoonType":case"game.gameEndType":case"game.moveDirection":case"game.acePosition":case"game.firstTile":case"game.playingAlone":case"game.mode":case"game.mostSevens":case"game.bennyCardType":return wf.TranslatableString;case"players.shuffle":case"game.declarations":case"game.manualDeclarations":case"game.forceAnnounce":case"game.enableEmoji":case"game.enableVoiceMessaging":case"game.wildCard":case"game.jokers":case"game.passing":case"game.canadianLoner":case"game.stickTheDealer":case"game.showRoundScore":case"locked":case"game.escobaInDealing":case"game.escobaInHand":case"game.renuncio":case"game.allowTute":case"game.followTrump":case"game.blackHand":case"game.swapping":case"game.allNoTrumps":case"requirements.clubRoom":case"game.bennyRuleActive":case"manualStart":return wf.Boolean;case"game.inventory.table":case"game.inventory.deck":return wf.Image;default:return wf.Number}}}var fl=function(t){return t[t.Available=0]="Available",t[t.Unavailable=1]="Unavailable",t[t.Invitable=2]="Invitable",t[t.Locked=3]="Locked",t[t.MinLevelNotMet=4]="MinLevelNotMet",t}(fl||{});const SD=(t,n)=>{let o=n;for(let e in t)t.hasOwnProperty(e)&&(o[e]=t[e]);return o};var Kc=function(t){return t.Initial="initial",t.Running="running",t.Cleared="cleared",t.Paused="paused",t}(Kc||{});class fq{constructor(n,o){this.callback=n,this.timeMs=o,this.timeLeft=o,this.state=Kc.Initial}start(){(this.getState()===Kc.Initial||this.getState()===Kc.Cleared)&&this.startInterval(this.timeMs)}restart(){this.clear(),this.start()}pause(){this.getState()===Kc.Running&&(this.timeLeft=this.timeLeft-(Date.now()-this.timerStartedTimestamp),this.clear(),this.setState(Kc.Paused))}resume(){this.getState()===Kc.Paused&&this.startInterval(this.timeLeft)}clear(){clearTimeout(this.internalTimerId),this.setState(Kc.Cleared)}getState(){return this.state}startInterval(n){this.timerStartedTimestamp=Date.now(),this.timeLeft=n,this.internalTimerId=setInterval(this.callback,n),this.setState(Kc.Running)}setState(n){this.state=n}}class A7t{constructor(n){this.timeService=n,this.onTimerTick=()=>{this.timeRemainingSeconds--,this.timerTick.next(this.timeRemainingSeconds)},this.interval=new fq(this.onTimerTick,1e3),this.timerTick=new sn}restartTimer(n){const o=(n.settings.timers.waitingStateEndTimer+n.settings.timers.readyStateStartTimer)/1e3;this.timeRemainingSeconds=Math.min(n.stateData.stateTransitionTimestamp+n.settings.timers.readyStateStartTimer/1e3-this.timeService.getServerTimeS(),o),this.interval.restart()}stopTimer(){this.interval.clear()}getState(){return this.interval.getState()}}function R7t(t,n){1&t&&(p(0,"p",2)(1,"span"),H(2),V(3,"translate"),m()()),2&t&&(l("ngClass",_().className),d(2),se($(3,2,"NONE")))}function k7t(t,n){if(1&t&&(p(0,"p",2)(1,"span"),H(2),V(3,"translate"),m()()),2&t){const o=_();l("ngClass",o.className),d(2),se($(3,2,o.option.value))}}function L7t(t,n){if(1&t&&(p(0,"p",2)(1,"span"),H(2),V(3,"yesNo"),m()()),2&t){const o=_();l("ngClass",o.className),d(2),se($(3,2,o.option.value))}}function D7t(t,n){if(1&t&&(p(0,"p",2)(1,"span"),H(2),m()()),2&t){const o=_();l("ngClass",o.className),d(2),se(o.option.value)}}function B7t(t,n){if(1&t&&(p(0,"p",2)(1,"span",3),H(2),m(),p(3,"span"),H(4),V(5,"translate"),m()()),2&t){const o=_();l("ngClass",o.className),d(2),se(o.option.value),d(2),se($(5,3,"LOCALE.POINTS"))}}function N7t(t,n){if(1&t&&(p(0,"p",2)(1,"span"),H(2),V(3,"formatSeconds"),m(),p(4,"span"),H(5),V(6,"translate"),m()()),2&t){const o=_();l("ngClass",o.className),d(2),se($(3,3,o.option.value)),d(3),se($(6,5,"LOCALE.SECONDS"))}}function F7t(t,n){if(1&t&&(p(0,"p",2)(1,"span"),H(2),V(3,"translate"),m()()),2&t){const o=_();l("ngClass",o.className),d(2),se($(3,2,"CUSTOM_GAMES.VALUES."+o.option.value))}}function U7t(t,n){1&t&&B(0,"img",7),2&t&&l("src",_(2).optionUrl,Wn)}function G7t(t,n){if(1&t&&(p(0,"div",4),B(1,"p",2),p(2,"div",5),U(3,U7t,1,1,"img",6),m()()),2&t){const o=_();d(),l("ngClass",o.className),d(2),l("ngIf",o.optionUrl)}}let U1e=(()=>{var t;class n{constructor(){this.formats=wf}ngOnInit(){this.option.url&&(this.optionUrl="".concat(Lt.CONFIG.core.cdn.url).concat(this.option.url)),this.className=this.option.id.split(".").join("-")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["room-option"]],inputs:{option:"option"},decls:8,vars:8,consts:[["class","cgr__text--value",3,"ngClass",4,"ngIf"],["class","cgr__container--image-option",4,"ngIf"],[1,"cgr__text--value",3,"ngClass"],[1,"cgr_text--numerical_value"],[1,"cgr__container--image-option"],[1,"cgr__container--image-option-image"],["class","cgr__image--option","alt","option image",3,"src",4,"ngIf"],["alt","option image",1,"cgr__image--option",3,"src"]],template:function(e,i){1&e&&U(0,R7t,4,4,"p",0)(1,k7t,4,4,"p",0)(2,L7t,4,4,"p",0)(3,D7t,3,2,"p",0)(4,B7t,6,5,"p",0)(5,N7t,7,7,"p",0)(6,F7t,4,4,"p",0)(7,G7t,4,2,"div",1),2&e&&(l("ngIf",null===i.option.value),d(),l("ngIf",i.option.format===i.formats.FreeText),d(),l("ngIf",i.option.format===i.formats.Boolean),d(),l("ngIf",i.option.format===i.formats.Number||i.option.format===i.formats.String),d(),l("ngIf",i.option.format===i.formats.Points),d(),l("ngIf",i.option.format===i.formats.Time),d(),l("ngIf",i.option.format===i.formats.TranslatableString),d(),l("ngIf",i.option.format===i.formats.Image&&i.option.value))},dependencies:[Xe,Ne,qe,Pw,yR],styles:[".cgr__text--value[_ngcontent-%COMP%]{position:relative;margin-left:3rem;line-height:100%}.cgr__text--value[_ngcontent-%COMP%]   .cgr_text--numerical_value[_ngcontent-%COMP%]{margin:0 .3rem}.cgr__container--image-option-image[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:center;width:7rem;height:7rem;overflow:hidden}.cgr__container--image-option-image[_ngcontent-%COMP%] > .cgr__image--option[_ngcontent-%COMP%]{height:100%;width:auto}.cgr__text--value.game-inventory-table[_ngcontent-%COMP%], .cgr__text--value.game-inventory-deck[_ngcontent-%COMP%]{height:2rem;margin-left:4.5rem;margin-bottom:.5rem}"],changeDetection:0}),n})();var V7t=ve.EButtonModifier,gq=ve.EIcons;const z7t=t=>({name:t});function j7t(t,n){if(1&t){const o=Ce();p(0,"button-icon",4),Y("onClick",function(){return oe(o),re(_().kickPlayer())}),m()}if(2&t){const o=_();l("flatButton",!0)("rounded",!0)("buttonModifier",o.buttonModifier)("icon",ne(5,z7t,o.kickButtonIcon)),Hn("data-cy","customRoomLeaveButton"+o.kickButtonIcon)}}function H7t(t,n){if(1&t){const o=Ce();p(0,"add-button",5),Y("onClick",function(){return oe(o),re(_().sitClick())}),m()}}function q7t(t,n){1&t&&B(0,"icon-component",8),2&t&&l("icon",_(2).EIcons.BOT)}function W7t(t,n){if(1&t&&(p(0,"div",6),U(1,q7t,1,1,"icon-component",7),m()),2&t){const o=_();d(),l("ngIf",o.player.state===o.state.Inactive)}}let G1e=(()=>{var t;class n{constructor(){this.state=Ve.EPlayerState,this.EIcons=ve.EIcons,this.kickButtonIcon=gq.CLOSE,this.kick=new ke,this.sit=new ke,this.buttonModifier=V7t.BUTTON_NEGATIVE}ngOnInit(){this.kickButtonIcon=this.isCurrentUser?gq.MINUS:gq.CLOSE}ngOnChanges(e){e.player&&(this.adaptedProfile=Lo.toPlatformProfile(this.player.profile))}kickPlayer(){this.kick.emit(this.player)}sitClick(){this.sit.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["custom-room-avatar"]],inputs:{player:"player",showKickButton:"showKickButton",kickButtonIcon:"kickButtonIcon",isCurrentUser:"isCurrentUser",showBackdrop:"showBackdrop",showJoin:"showJoin"},outputs:{kick:"kick",sit:"sit"},features:[it],decls:4,vars:6,consts:[[3,"user","hasUsername","isLink"],["class","cgr__button--clear",3,"flatButton","rounded","buttonModifier","icon","onClick",4,"ngIf"],["class","cgr__room-avatar--add-button","data-cy","customRoomJoinAfterInviteButton",3,"onClick",4,"ngIf"],["class","cgr__cover--x","data-cy","customRoomAvatarFade",4,"ngIf"],[1,"cgr__button--clear",3,"flatButton","rounded","buttonModifier","icon","onClick"],["data-cy","customRoomJoinAfterInviteButton",1,"cgr__room-avatar--add-button",3,"onClick"],["data-cy","customRoomAvatarFade",1,"cgr__cover--x"],["class","cgr__room--bot",3,"icon",4,"ngIf"],[1,"cgr__room--bot",3,"icon"]],template:function(e,i){1&e&&(B(0,"avatar",0),U(1,j7t,1,7,"button-icon",1)(2,H7t,1,0,"add-button",2)(3,W7t,2,1,"div",3)),2&e&&(l("user",i.adaptedProfile)("hasUsername",!0)("isLink",!0),d(),l("ngIf",i.showKickButton),d(),l("ngIf",i.showJoin),d(),l("ngIf",!i.showJoin&&(i.player.state===i.state.Inactive||i.showBackdrop)))},dependencies:[Ne,Bo,Dn,ei,_v],styles:["[_nghost-%COMP%]{width:100%;height:100%}.cgr__button--clear[_ngcontent-%COMP%]{position:absolute;top:.2rem;right:-.5rem;z-index:1;min-width:3rem;height:3rem;width:3rem;min-height:3rem;font-size:1.4rem;z-index:4}@media only screen and (max-width: 480px){.cgr__button--clear[_ngcontent-%COMP%]{font-size:1.2rem;min-width:2.4rem;height:2.4rem;width:2.4rem;min-height:2.4rem;top:.1rem}}.cgr__room-avatar--add-button[_ngcontent-%COMP%]{position:absolute;top:0;left:0;font-size:5rem;z-index:4}@media screen and (max-width: 768px){.cgr__room-avatar--add-button[_ngcontent-%COMP%]{font-size:4rem}}"]}),n})();function $7t(t,n){if(1&t){const o=Ce();p(0,"add-button",2),Y("onClick",function(){return oe(o),re(_().onSitClick())}),m()}}const _q=t=>({name:t});function K7t(t,n){if(1&t){const o=Ce();p(0,"button-icon",7),Y("onClick",function(){return oe(o),re(_(2).onInviteClick())}),m()}if(2&t){const o=_(2);l("bclass","cgr__seat--button")("icon",ne(2,_q,o.EIcons.ADD_FRIEND))}}function Z7t(t,n){if(1&t&&B(0,"button-icon",8),2&t){const o=_(2);l("bclass","cgr__seat--button")("icon",ne(2,_q,o.EIcons.LOCKER))}}function Q7t(t,n){if(1&t&&B(0,"button-icon",9),2&t){const o=_(2);l("bclass","cgr__seat--button")("icon",ne(2,_q,o.EIcons.MIN_LEVEL_STAR_LOCKED))}}const Y7t=t=>({"cgr__seat--container__allIn":t});function J7t(t,n){if(1&t&&(p(0,"div",3),U(1,K7t,1,4,"button-icon",4)(2,Z7t,1,4,"button-icon",5)(3,Q7t,1,4,"button-icon",6),m()),2&t){const o=_();l("ngClass",ne(4,Y7t,o.isAllIn)),d(),l("ngIf",o.state===o.statesEnum.Invitable),d(),l("ngIf",o.state===o.statesEnum.Locked),d(),l("ngIf",o.state===o.statesEnum.MinLevelNotMet)}}let V1e=(()=>{var t;class n{constructor(){this.EIcons=ve.EIcons,this.state=fl.Available,this.sit=new ke,this.invite=new ke,this.statesEnum=fl}onSitClick(){this.sit.emit()}onInviteClick(){this.invite.emit()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["custom-room-seat"]],inputs:{state:"state",isAllIn:"isAllIn"},outputs:{sit:"sit",invite:"invite"},decls:2,vars:2,consts:[["class","cgr__add--button","data-cy","customRoomJoinButton",3,"onClick",4,"ngIf"],["class","cgr__seat--container","data-cy","customRoomDisabledSeat",3,"ngClass",4,"ngIf"],["data-cy","customRoomJoinButton",1,"cgr__add--button",3,"onClick"],["data-cy","customRoomDisabledSeat",1,"cgr__seat--container",3,"ngClass"],["class","cgr__seat-action-button","data-cy","customRoomInviteButton",3,"bclass","icon","onClick",4,"ngIf"],["class","cgr__seat-action-button","data-cy","customRoomLockedButton",3,"bclass","icon",4,"ngIf"],["class","cgr__seat-action-button","data-cy","customRoomLevelLockedButton",3,"bclass","icon",4,"ngIf"],["data-cy","customRoomInviteButton",1,"cgr__seat-action-button",3,"bclass","icon","onClick"],["data-cy","customRoomLockedButton",1,"cgr__seat-action-button",3,"bclass","icon"],["data-cy","customRoomLevelLockedButton",1,"cgr__seat-action-button",3,"bclass","icon"]],template:function(e,i){1&e&&U(0,$7t,1,0,"add-button",0)(1,J7t,4,6,"div",1),2&e&&(l("ngIf",i.state===i.statesEnum.Available),d(),l("ngIf",i.state!==i.statesEnum.Available))},dependencies:[Xe,Ne,ei,_v],styles:["[_nghost-%COMP%]{width:100%;height:100%}.cgr__add--button[_ngcontent-%COMP%]{font-size:5rem;border-radius:.8rem;overflow:hidden;display:block}@media screen and (max-width: 768px){.cgr__add--button[_ngcontent-%COMP%]{font-size:4rem}}.cgr__seat--container[_ngcontent-%COMP%]{width:100%;height:100%}.cgr__seat-action-button[_ngcontent-%COMP%]{width:100%;height:100%;font-size:3rem}"],changeDetection:0}),n})();const X7t=t=>({animated:t});let z1e=(()=>{var t;class n{constructor(e,i){this.icon=ve.EIcons.Score,this.animated=!1,this.cdr=e,e.detach(),this.ngZone=i}ngOnChanges(e){e.result.firstChange||(this.animated||this.ngZone.runOutsideAngular(()=>{this.timeoutId=setTimeout(()=>{this.animated=!1,this.cdr.detectChanges()},600)}),this.animated=!0),this.cdr.detectChanges()}ngOnDestroy(){clearTimeout(this.timeoutId)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(an))},t.\u0275cmp=pe({type:t,selectors:[["result-label"]],inputs:{result:"result"},features:[it],decls:3,vars:5,consts:[[1,"cgr__game--result--item-container",3,"ngClass"],[1,"cgr__game--result--icon",3,"icon"],[1,"cgr__game--result--icon-value",3,"value"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"icon-component",1)(2,"number",2),m()),2&e&&(l("ngClass",ne(3,X7t,i.animated)),d(),l("icon",i.icon),d(),l("value",i.result))},dependencies:[Xe,Dn,Qr],styles:[".cgr__game--result--item-container[_ngcontent-%COMP%]{display:flex;align-items:center}.cgr__game--result--icon-value[_ngcontent-%COMP%]{margin-left:.5rem}.cgr__game--result--icon[_ngcontent-%COMP%]{font-size:1.8rem}.animated[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_animated .6s ease alternate}@keyframes _ngcontent-%COMP%_animated{50%{transform:scale(1.2)}to{transform:scale(1)}}"],changeDetection:0}),n})();var eqt=ve.EIcons,j1e=ve.EButtonModifier;function tqt(t,n){if(1&t){const o=Ce();p(0,"div",21),Y("click",function(){return oe(o),re(_().onBackdropClick())}),m()}}const nqt=(t,n,o,e)=>({id:t,avatar:n,level:o,frame:e});function iqt(t,n){if(1&t&&B(0,"club-avatar",22),2&t){const o=_();l("club",xd(1,nqt,o.roomModel.club.clubProfile.id,o.roomModel.club.clubProfile.avatar,o.roomModel.club.clubProfile.level,o.roomModel.club.inventory.frame))}}const oqt=t=>({freeForAll:t});function rqt(t,n){if(1&t&&B(0,"result-label",25),2&t){const o=n.$implicit,e=_(2);go("width","calc("+100/e.seats.length+"% - 0.5rem)"),l("ngClass",ne(4,oqt,e.gameResultModel.freeForAll))("result",o)}}const sqt=(t,n)=>({freeForAll:t,display:n});function aqt(t,n){if(1&t&&(p(0,"div",23),U(1,rqt,1,6,"result-label",24),m()),2&t){const o=_();l("ngClass",cn(3,sqt,o.gameResultModel.freeForAll,o.gameResultModel.display)),d(),l("ngForOf",o.gameResultModel.results)("ngForTrackBy",o.resultTrackBy)}}function cqt(t,n){if(1&t){const o=Ce();p(0,"custom-room-seat",30),Y("sit",function(){oe(o);const i=_().$implicit;return re(_().joinRoom(i.id))})("invite",function(){oe(o);const i=_().$implicit;return re(_().invitePlayer(i))}),m()}if(2&t){const o=_().$implicit,e=_();l("state",e.isLocked?e.ECustomRoomSeatState.Locked:o.state)("isAllIn",e.isAllIn)}}function lqt(t,n){if(1&t){const o=Ce();p(0,"custom-room-avatar",31),Y("sit",function(){oe(o);const i=_().$implicit;return re(_().joinRoom(i.id))})("kick",function(){oe(o);const i=_().$implicit;return re(_().kickPlayer(i))}),m()}if(2&t){const o=_().$implicit,e=_();l("player",o.player||o.reserved)("isCurrentUser",o.player?e.userMe.profile.id===o.player.id:e.userMe.profile.id===o.reserved.id)("showKickButton",o.showKickButton)("showBackdrop",o.showBackdrop)("showJoin",o.showJoin),Hn("data-cy2",null==(o.player||o.reserved)?null:(o.player||o.reserved).id)}}function uqt(t,n){1&t&&B(0,"div",32)}function dqt(t,n){if(1&t&&(p(0,"div",26),U(1,cqt,1,2,"custom-room-seat",27)(2,lqt,1,6,"custom-room-avatar",28)(3,uqt,1,0,"div",29),m()),2&t){const o=n.$implicit,e=_();go("width","calc("+100/e.seats.length+"% - 0.5rem)"),d(),l("ngIf",!o.player&&!o.reserved),d(),l("ngIf",o.player||o.reserved),d(),l("ngIf",o.player&&o.player.id===e.roomModel.hostId&&e.isAllIn)}}const pqt=t=>({goDown:t}),hqt=t=>({timer:t});function mqt(t,n){if(1&t&&(p(0,"div",33)(1,"div",34)(2,"span",35),H(3),V(4,"translate"),m(),p(5,"span",36),H(6),m()()()),2&t){const o=_();l("ngClass",ne(6,pqt,o.showGameLoading)),d(3),ze("",$(4,4,"CUSTOM_GAMES.TIME_TO_START"),":"),d(2),l("ngClass",ne(8,hqt,o.countdownTimer&&o.countdownTimer.getState()===o.intervalState.Running)),d(),se(o.timeRemainingSeconds)}}const vq=t=>({name:t});function fqt(t,n){if(1&t){const o=Ce();p(0,"div",37)(1,"div",38)(2,"div",39),B(3,"icon-component",40)(4,"number",41),m(),p(5,"div",39),B(6,"icon-component",42),p(7,"p",43),H(8),V(9,"timeLeft"),m()()(),p(10,"button-text",44),Y("onClick",function(){return oe(o),re(_().spectateModel.button.onClick())}),H(11),V(12,"translate"),m(),p(13,"div",45)(14,"button-icon",46),Y("onClick",function(){return oe(o),re(_().onInformativeButtonClick())}),m()()()}if(2&t){const o=_();d(3),l("icon",o.spectateModel.eyeIcon),d(),l("value",o.spectateModel.spectatorsCount),d(2),l("icon",o.spectateModel.clockIcon),d(2),ze(" ",$(9,7,o.lastModifiedTimeDiffSeconds),""),d(2),l("buttonModifier",o.spectateModel.button.type),d(),ze(" ",$(12,9,o.spectateModel.button.text.key)," "),d(3),l("icon",ne(11,vq,o.uiState===o.uiStates.Informative?o.iconNames.UNZOOM:o.iconNames.EXPAND))}}function gqt(t,n){1&t&&(p(0,"div",48)(1,"p",55),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"CUSTOM_GAMES.WAITING_FOR_START")))}function _qt(t,n){if(1&t){const o=Ce();p(0,"button-text",44),Y("onClick",function(){return oe(o),re(_(2).startRoom())}),H(1),V(2,"translate"),m()}2&t&&(l("buttonModifier",_(2).buttonModifier.BUTTON_ATTENTION),d(),ze(" ",$(2,2,"CUSTOM_GAMES.START_ROOM")," "))}const vqt=t=>({"waiting-for-host":t});function bqt(t,n){if(1&t){const o=Ce();p(0,"div",47)(1,"div",48)(2,"div",49)(3,"span",50),H(4),V(5,"translate"),m()(),p(6,"div",49),B(7,"icon-component",51)(8,"timer",52),m()(),U(9,gqt,4,3,"div",53)(10,_qt,3,4,"button-text",54),p(11,"div",45)(12,"button-icon",46),Y("onClick",function(){return oe(o),re(_().onInformativeButtonClick())}),m()()()}if(2&t){const o=_();l("ngClass",ne(10,vqt,o.userMe.profile.id!==o.roomModel.hostId)),d(4),se($(5,8,"TOURNAMENTS.BLITZ.EXPIRES_AFTER")),d(3),l("icon",o.spectateModel.clockIcon),d(),l("styleObject",o.timerStyleObject)("milliseconds",o.timeToTimeout),d(),l("ngIf",o.userMe.profile.id!==o.roomModel.hostId),d(),l("ngIf",o.userMe.profile.id===o.roomModel.hostId),d(2),l("icon",ne(12,vq,o.uiState===o.uiStates.Informative?o.iconNames.UNZOOM:o.iconNames.EXPAND))}}function Cqt(t,n){if(1&t&&(p(0,"div",58),B(1,"room-option",59),m()),2&t){const o=n.$implicit;d(),l("option",o)}}function yqt(t,n){if(1&t&&(p(0,"div",56),U(1,Cqt,2,1,"div",57),m()),2&t){const o=_();d(),l("ngForOf",o.footerRoomOptions)("ngForTrackBy",o.roomOptionsTrackBy)}}function Sqt(t,n){1&t&&(p(0,"div",60)(1,"div",61)(2,"p",62),H(3),V(4,"translate"),m()()()),2&t&&(d(3),se($(4,1,"LOADING")))}function wqt(t,n){if(1&t){const o=Ce();p(0,"div",63)(1,"button-icon",64),Y("onClick",function(){return oe(o),re(_().onInformativeButtonClick())}),m()()}if(2&t){const o=_();d(),l("icon",ne(1,vq,o.uiState===o.uiStates.Informative?o.iconNames.UNZOOM:o.iconNames.EXPAND))}}function Tqt(t,n){if(1&t&&(p(0,"div",58),B(1,"room-option",59),m()),2&t){const o=n.$implicit;d(),l("option",o)}}function Pqt(t,n){if(1&t&&(p(0,"div",58),B(1,"room-option",59),m()),2&t){const o=n.$implicit;d(),l("option",o)}}function Iqt(t,n){if(1&t&&(p(0,"div",65)(1,"div",66),U(2,Tqt,2,1,"div",57),m(),p(3,"div",67),U(4,Pqt,2,1,"div",57),m()()),2&t){const o=_();d(2),l("ngForOf",o.restOfRoomOptions)("ngForTrackBy",o.roomOptionsTrackBy),d(2),l("ngForOf",o.inventoryRoomOptions)("ngForTrackBy",o.roomOptionsTrackBy)}}const Mqt=t=>[t],Oqt=(t,n,o)=>({expanded:t,blur:n,cgr__wrapper__allIn:o}),Eqt=()=>({key:"CUSTOM_GAMES.OPTIONS.bet"}),xqt=()=>({key:"CUSTOM_GAMES.OPTIONS.reward"}),Aqt=(t,n)=>({goDown:t,watch:n});let H1e=(()=>{var t;class n extends Dh{constructor(e,i,r,s,a,c,u,h){super(),this.isLocked=!1,this.isInteractable=!0,this.start=new ke,this.uiStates=Mc,this.iconNames=eqt,this.buttonModifier=j1e,this.intervalState=Kc,this.currencyTypes=ln,this.ECustomRoomSeatState=fl,this.timerStyleObject={color:"#ffffff"},this.onWatchClick=()=>{this.spectate.emit({room:this.roomModel})},this.onEscKeyPress=()=>{this.isOnFocus&&this.changeUIState(Mc.Default)},this.onTimerTick=b=>{this.timeRemainingSeconds=b,this.soundService.play(dn.TimeTick),this.timerTick.emit(b)},this.filterOptionsByDefaultLogic=b=>{let w;return this.configService.getGameRelatedConfig(this.roomModel.settings.game.name).matchmaking.customGames.customSettings.forEach(R=>{R.id===b.id&&(w=R)}),!this.isInventoryItem(b)&&"transactions"!==b.id&&w&&(!w.hasOwnProperty("isVisible")||w.isVisible)},this.isInventoryItem=b=>l1.getOptionFormat(b.id)===wf.Image,this.focusable=!1,this.countdownTimer=new A7t(a),this.soundService=i,this.time=a,this.ngZone=c,this.cdr=u,this.select=new ke,this.join=new ke,this.spectate=new ke,this.invite=new ke,this.kick=new ke,this.timerTick=new ke,this.userMe=e.selectUserState(),this.keyPressListener=s.listen("window","keyup.esc",this.onEscKeyPress),this.showCountdownTimer=!1,this.showGameLoading=!1,this.uiState=Mc.Default,this.optionsParser=new l1(h),this.seats=new ie.List,this.moreOptionsViewEnabled=!0,this.configService=r,this.spectateModel={enabled:void 0,eyeIcon:ve.EIcons.Spectators,clockIcon:ve.EIcons.CLOCK_ICON,spectatorsCount:0,button:{type:j1e.BUTTON_ACTION,show:!1,text:{key:"TEXT.WATCH"},onClick:this.onWatchClick}}}ngOnInit(){super.ngOnInit(),this.showResult=this.configService.getGameRelatedConfig(this.roomModel.settings.game.name).matchmaking.customGames.score,this.isAllIn=this.isRoomAllIn(this.roomModel.settings.transactions.bet),this.spectateModel.enabled=this.roomModel.settings.spectators,this.gameResultModel={tableId:void 0,enabled:!0,freeForAll:1===this.roomModel.settings.game.players.perTeam,results:new Array(this.roomModel.settings.game.players.count/this.roomModel.settings.game.players.perTeam),display:!1,icon:ve.EIcons.EYE},this.countdownSubscription=this.countdownTimer.timerTick.subscribe(this.onTimerTick);const e=new ie.List(this.optionsParser.parse(this.roomModel.settings));this.footerRoomOptions=new ie.List(e.where(this.filterOptionsByDefaultLogic).toArray().slice(0,3)),this.restOfRoomOptions=e.where(i=>this.filterOptionsByDefaultLogic(i)&&-1===this.footerRoomOptions.toArray().indexOf(i)),this.inventoryRoomOptions=e.where(this.isInventoryItem),this.seats=this.buildSeats(this.roomModel.tables[this.roomModel.tables.length-1]),this.onRoomUpdate(this.roomModel)}ngOnDestroy(){super.ngOnDestroy(),this.keyPressListener&&this.keyPressListener(),this.uiState===Mc.Informative&&this.changeUIState(Mc.Default),this.stopTimer(),this.stopUpdateTimer(),this.countdownSubscription&&this.countdownSubscription.unsubscribe()}joinRoom(e){this.join.emit({room:this.roomModel,seatId:e})}invitePlayer(e){this.invite.emit({room:this.roomModel,seat:e})}kickPlayer(e){this.kick.emit({room:this.roomModel,seat:e})}restartTimer(){this.countdownTimer.getState()!==this.intervalState.Running&&(this.countdownTimer.restartTimer(this.roomModel),this.timeRemainingSeconds=this.countdownTimer.timeRemainingSeconds,this.showCountdownTimer=!0,this.setMoreOptionsViewEnabled(!1))}onInformativeButtonClick(){this.changeUIState(this.uiState===Mc.Default?Mc.Informative:Mc.Default)}onBackdropClick(){this.changeUIState(Mc.Default)}changeUIState(e,i){this.uiState=e,this.setFocusable(e===Mc.Informative),i||this.select.emit(e===Mc.Informative)}updateSeat(e,i){SD(e,this.seats.find(r=>r.id===i))}hideAllSeatsKickButtons(){this.seats.forEach(e=>e.showKickButton=!1)}showAllSeatsKickButtons(){this.seats.forEach(e=>e.showKickButton=!0)}setWatchButtonVisibility(e){this.spectateModel.button.show=e}setAllSeatsAs(e){this.seats.forEach(i=>i.state=e)}resultTrackBy(e,i){return e}playerSeatsTrackBy(e,i){return e}roomOptionsTrackBy(e,i){return i.id}onRoomUpdate(e){var i;this.roomModel=SD(e,this.roomModel);const r=this.roomModel.tables[this.roomModel.tables.length-1];this.updatePlayerSeats(r),this.updateSpectatorsCount(),this.updateLastModifiedTimeDiff(),this.updateGameResult(r),this.timeToTimeout=1e3*Math.max((null===(i=this.roomModel.stateData)||void 0===i?void 0:i.stateEndTimestamp)-this.time.getServerTimeS(),0),this.roomModel.state===Ve.ERoomState.Ready?(!this.updateTimer||this.updateTimer.getState()!==Kc.Running)&&this.startLastModifiedDiffTimer():this.stopUpdateTimer(),this.updateView()}stopTimer(){this.countdownTimer.stopTimer(),this.showCountdownTimer=!1}showGameLoadingBar(){this.showGameLoading=!0}hideGameLoadingBar(){this.showGameLoading=!1}setMoreOptionsViewEnabled(e){this.moreOptionsViewEnabled=e}updateSpectatorsCount(){const e=this.roomModel.tables.find(i=>i.state===Ve.ETableState.Gameplay);e&&(this.spectateModel.spectatorsCount=e.spectators.length)}updateLastModifiedTimeDiff(){const e=this.roomModel.tables[this.roomModel.tables.length-1];e&&(this.lastModifiedTimeDiffSeconds=Math.max(this.time.getServerTimeS()-e.lastModified,60))}updateGameResult(e){e.id!==this.gameResultModel.tableId&&(this.gameResultModel.tableId=e.id,this.gameResultModel.results=[]);const i=new ie.UniqueList;this.seats.forEach(s=>{s.player&&i.tryAdd({id:s.teamId,playerId:s.player.id})});let r={};e.gameResult&&e.gameResult.gameStats?r=e.gameResult.gameStats.playerPoints:this.seats.forEach(s=>{s.player&&(r[s.player.id]=0)}),this.gameResultModel.results?i.forEach((s,a)=>this.gameResultModel.results[a]=r[s.playerId]):(this.gameResultModel.results=[],i.forEach(s=>this.gameResultModel.results.push(r[s.playerId]))),this.gameResultModel.display=e.state!==Ve.ETableState.Waiting}sortTeams(e){const i=this.roomModel.tables[this.roomModel.tables.length-1];if(i&&(i.state===Ve.ETableState.Gameplay||i.state===Ve.ETableState.Ended)){const r=e||{iterators:[(s,a)=>s&&s.teamId?s.teamId:a],order:[ie.ESort.Asc]};this.seats.orderBy(r.iterators,...r.order),this.updateGameResult(i)}}startRoom(){this.start.emit()}showManualStart(){return this.roomModel.settings.manualStart&&this.roomModel.state===Ve.ERoomState.Waiting&&this.isCurrent&&!this.showCountdownTimer&&this.roomModel.tables[0].seats.every(e=>null!=e.player)}startLastModifiedDiffTimer(){this.stopUpdateTimer(),this.ngZone.runOutsideAngular(()=>{this.updateTimer=new fq(()=>{this.updateLastModifiedTimeDiff(),this.updateView()},6e4),this.updateTimer.start()})}stopUpdateTimer(){this.updateTimer&&this.updateTimer.clear()}isRoomAllIn(e){return e>Math.max(...this.configService.getGameRelatedConfig(this.roomModel.settings.game.name).matchmaking.customGames.customSettings.find(r=>"transactions.bet"===r.id).options.map(r=>r.value))}buildSeats(e){const i=new ie.List;for(let r=0;r<this.roomModel.settings.players.count;r++){const s=e.seats[r],a={id:e.seats[r].id,tableId:e.id,teamId:s.teamId,state:this.getSeatState(),showKickButton:!1,showBackdrop:null!==s.reserved,showJoin:!1};a.player=s.player,a.reserved=s.reserved,(s.player||s.reserved)&&(a.state=fl.Unavailable),i.add(a)}return i}getSeatState(){return this.roomModel.settings.requirements.minLevel&&this.userMe.profile.level<this.roomModel.settings.requirements.minLevel?fl.MinLevelNotMet:this.isOpenedForJoin?fl.Available:fl.Unavailable}updatePlayerSeats(e){this.seats.get(0).tableId!==e.id?this.seats=this.buildSeats(e):this.seats.forEach((i,r)=>{const s=e.seats.find(a=>a.id===i.id);i.player=s.player,i.reserved=s.reserved,i.showBackdrop=null!==s.reserved})}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Mo),g(Zt),g(ji),g(Bn),g(an),g(Re),g(Zn))},t.\u0275cmp=pe({type:t,selectors:[["custom-game-room"]],inputs:{roomModel:"roomModel",isLocked:"isLocked",isOpenedForJoin:"isOpenedForJoin",isInteractable:"isInteractable",uiState:"uiState",isCurrent:"isCurrent"},outputs:{join:"join",spectate:"spectate",invite:"invite",kick:"kick",select:"select",timerTick:"timerTick",start:"start"},features:[Ht],decls:21,vars:33,consts:[["data-cy","customGameRoom",1,"cgr__container",3,"ngClass"],[1,"cgr__container-outer"],["class","cgr__backdrop",3,"click",4,"ngIf"],["data-cy","customRoomBlur",1,"cgr__wrapper",3,"ngClass"],["wrapper",""],[1,"cgr__wrapper--header"],[1,"cgr__header-item","bet",3,"value","type","text"],["class","cgr__club--avatar",3,"club",4,"ngIf"],[1,"cgr__header-item","reward",3,"type","value","text"],[1,"cgr__container--users"],["class","cgr__game--result-container",3,"ngClass",4,"ngIf"],[1,"cgr__container--avatars"],["class","cgr__countainer--single-avatar","data-cy","customRoomSeatContainer",3,"width",4,"ngFor","ngForOf","ngForTrackBy"],[1,"cgr__container--options",3,"ngClass"],["class","cgr__container--countdown",3,"ngClass",4,"ngIf"],["class","cgr__container--watch-btn",4,"ngIf"],["class","cgr__container--start-btn",3,"ngClass",4,"ngIf"],["class","cgr__wrapper--footer",4,"ngIf"],["class","cgr__container--countdown",4,"ngIf"],["class","cgr__container--zoom",4,"ngIf"],["class","cgr__wrapper--more-options",4,"ngIf"],[1,"cgr__backdrop",3,"click"],[1,"cgr__club--avatar",3,"club"],[1,"cgr__game--result-container",3,"ngClass"],["class","cgr__game--result-label",3,"ngClass","width","result",4,"ngFor","ngForOf","ngForTrackBy"],[1,"cgr__game--result-label",3,"ngClass","result"],["data-cy","customRoomSeatContainer",1,"cgr__countainer--single-avatar"],[3,"state","isAllIn","sit","invite",4,"ngIf"],["data-cy","customRoomAvatar",3,"player","isCurrentUser","showKickButton","showBackdrop","showJoin","sit","kick",4,"ngIf"],["class","cgr__all-in__label","data-cy","customRoomAllInLabel",4,"ngIf"],[3,"state","isAllIn","sit","invite"],["data-cy","customRoomAvatar",3,"player","isCurrentUser","showKickButton","showBackdrop","showJoin","sit","kick"],["data-cy","customRoomAllInLabel",1,"cgr__all-in__label"],[1,"cgr__container--countdown",3,"ngClass"],[1,"cgr__container--timer"],[1,"cgr__timer--text-label"],[1,"cgr__text--timer-value",3,"ngClass"],[1,"cgr__container--watch-btn"],[1,"cgr__watch-info--container"],[1,"cgr__watch--icon-container"],[1,"cgr__watch-info--icon","eye",3,"icon"],[1,"cgr__watch-info--icon-value",3,"value"],[1,"cgr__watch-info--icon",3,"icon"],[1,"cgr__watch-info--icon-value"],[1,"cgr__watch--button",3,"buttonModifier","onClick"],[1,"cgr__watch-info--options-icon"],[1,"cgr__button--zoom","watch-options",3,"icon","onClick"],[1,"cgr__container--start-btn",3,"ngClass"],[1,"cgr__start-info--container"],[1,"cgr__timer-container"],[1,"cgr__timer-expires"],[1,"cgr__timer-info--icon",3,"icon"],[1,"cgr__timer",3,"styleObject","milliseconds"],["class","cgr__start-info--container",4,"ngIf"],["class","cgr__watch--button",3,"buttonModifier","onClick",4,"ngIf"],[1,"cgr__start-info--wait-text"],[1,"cgr__wrapper--footer"],["class","cgr__container--single-option",4,"ngFor","ngForOf","ngForTrackBy"],[1,"cgr__container--single-option"],[3,"option"],[1,"cgr__container--countdown"],[1,"crg__container--game-load","upDown"],[1,"crg__text--game-load"],[1,"cgr__container--zoom"],[1,"cgr__button--zoom",3,"icon","onClick"],[1,"cgr__wrapper--more-options"],[1,"cgr__container--options-below-non-image"],[1,"cgr__container--options-below"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),U(2,tqt,1,0,"div",2),p(3,"section",3,4)(5,"div",5),B(6,"currency-label",6),U(7,iqt,1,6,"club-avatar",7),B(8,"currency-label",8),m(),p(9,"div",9),U(10,aqt,2,6,"div",10),p(11,"div",11),U(12,dqt,4,5,"div",12),m()(),p(13,"div",13),U(14,mqt,7,10,"div",14)(15,fqt,15,13,"div",15)(16,bqt,13,14,"div",16)(17,yqt,2,2,"div",17)(18,Sqt,5,3,"div",18)(19,wqt,2,3,"div",19)(20,Iqt,5,4,"div",20),m()()()()),2&e&&(l("ngClass",ne(22,Mqt,i.uiState===i.uiStates.Informative?"expanded ":""+i.isAllIn?"isAllIn ":"")),Hn("data-cy2",i.roomModel.id),d(2),l("ngIf",i.uiState===i.uiStates.Informative),d(),l("ngClass",_a(24,Oqt,i.uiState===i.uiStates.Informative,!1===i.isInteractable,i.isAllIn)),d(3),l("value",i.roomModel.settings.transactions.bet)("type",i.currencyTypes.Chips)("text",pt(28,Eqt)),d(),l("ngIf",i.roomModel.club),d(),l("type",i.currencyTypes.Chips)("value",i.roomModel.settings.transactions.placementRewards[1].amount)("text",pt(29,xqt)),d(2),l("ngIf",i.showResult),d(2),l("ngForOf",i.seats)("ngForTrackBy",i.playerSeatsTrackBy),d(),l("ngClass",cn(30,Aqt,i.showGameLoading,i.spectateModel.enabled&&i.spectateModel.button.show||i.showManualStart())),d(),l("ngIf",i.showCountdownTimer||i.showGameLoading),d(),l("ngIf",i.spectateModel.enabled&&i.spectateModel.button.show),d(),l("ngIf",i.showManualStart()),d(),l("ngIf",!i.showCountdownTimer&&!i.showGameLoading),d(),l("ngIf",i.showGameLoading),d(),l("ngIf",i.moreOptionsViewEnabled&&(0!==i.inventoryRoomOptions.length||0!==i.restOfRoomOptions.length)&&!(i.spectateModel.enabled&&i.spectateModel.button.show)&&!i.showManualStart()),d(),l("ngIf",i.moreOptionsViewEnabled&&(0!==i.inventoryRoomOptions.length||0!==i.restOfRoomOptions.length)))},dependencies:[Xe,Mt,Ne,Fs,Dn,Qr,pn,ei,Yh,mf,U1e,G1e,V1e,z1e,qe,Ps],styles:['.cgr__container[_ngcontent-%COMP%]{position:relative;margin:.5rem;max-width:100%}.cgr__container.expanded[_ngcontent-%COMP%]   .cgr__container-outer[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000}.cgr__container.expanded[_ngcontent-%COMP%]   .cgr__container-outer[_ngcontent-%COMP%]   .cgr__wrapper[_ngcontent-%COMP%]{position:absolute;height:auto;top:50%;left:50%;transform:translate(-50%,-50%);animation:_ngcontent-%COMP%_scale .3s ease-in-out}@keyframes _ngcontent-%COMP%_scale{0%{opacity:0;transform:translate(-50%,-50%) scale(0)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@media only screen and (max-height: 380px){.cgr__container.expanded[_ngcontent-%COMP%]   .cgr__container-outer[_ngcontent-%COMP%]   .cgr__wrapper[_ngcontent-%COMP%]{top:0;left:50%;transform:translate(-50%)}@keyframes scale{0%{opacity:0;transform:translate(-50%) scale(0)}to{opacity:1;transform:translate(-50%) scale(1)}}}.cgr__container.expanded[_ngcontent-%COMP%]   .cgr__container-outer[_ngcontent-%COMP%]   .cgr__wrapper[_ngcontent-%COMP%]   .cgr__container--options[_ngcontent-%COMP%]{min-height:17rem;height:auto;align-items:flex-start}.cgr__backdrop[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100%;width:100%;cursor:pointer}.cgr__wrapper[_ngcontent-%COMP%]{position:relative;max-width:100%;overflow:hidden;z-index:0;width:40rem}@media only screen and (min-width: 1681px){.cgr__container[_ngcontent-%COMP%], .cgr__wrapper[_ngcontent-%COMP%]{width:50rem;min-height:24rem}}@media only screen and (max-width: 1680px){.cgr__container[_ngcontent-%COMP%], .cgr__wrapper[_ngcontent-%COMP%]{width:40rem;min-height:21rem}}@media only screen and (max-width: 850px){.cgr__container[_ngcontent-%COMP%], .cgr__wrapper[_ngcontent-%COMP%]{width:32rem;min-height:18rem}}@media only screen and (max-width: 360px){.cgr__container[_ngcontent-%COMP%], .cgr__wrapper[_ngcontent-%COMP%]{width:31rem}}.cgr__wrapper--header[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;min-height:7rem;padding:0 .5rem}.cgr__container--users[_ngcontent-%COMP%]{position:relative;width:100%;margin:0 auto;padding:3% 0}.cgr__container--avatars[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;align-items:center;justify-content:center;width:100%;height:100%;min-height:10rem}.cgr__countainer--single-avatar[_ngcontent-%COMP%]{position:relative;align-items:center;margin:.25rem;width:calc(25% - .5rem);min-width:5.5rem;max-width:9rem}.cgr__countainer--single-avatar[_ngcontent-%COMP%]:before{display:block;content:"";width:100%;padding-top:var(--aspect-ratio, 100%)}.cgr__countainer--single-avatar[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{position:absolute;top:0;left:0;right:0;bottom:0}@media only screen and (max-width: 360px){.cgr__countainer--single-avatar[_ngcontent-%COMP%]{width:9%}}@media only screen and (max-height: 580px) and (orientation: landscape){.cgr__countainer--single-avatar[_ngcontent-%COMP%]{width:9%}}.cgr__game--result-label[_ngcontent-%COMP%]{width:23%;min-width:5.5rem;max-width:9rem;display:flex;flex:1 1 0;justify-content:center;margin:.25rem 0}@media only screen and (max-width: 360px){.cgr__game--result-label[_ngcontent-%COMP%]{width:9%}}@media only screen and (max-height: 580px) and (orientation: landscape){.cgr__game--result-label[_ngcontent-%COMP%]{width:9%}}.cgr__game--result-label.freeForAll[_ngcontent-%COMP%]{flex:initial;justify-content:center;margin-left:.25rem;margin-right:.25rem}.cgr__button--zoom[_ngcontent-%COMP%]{height:3rem;font-size:1.8rem}.cgr__button--zoom.watch-options[_ngcontent-%COMP%]{position:absolute;top:50%;right:0;transform:translateY(-50%)}.cgr__header-item[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column;align-items:center;justify-content:center;padding:.1rem;text-align:center;flex:1;min-width:7rem}.cgr__header-item.bet[_ngcontent-%COMP%]{align-items:flex-start}.cgr__header-item.reward[_ngcontent-%COMP%]{align-items:flex-end}.cgr__wrapper--more-options[_ngcontent-%COMP%]{width:calc(100% - 4rem)}.cgr__container--countdown[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:3rem;text-align:center;padding:.2rem;overflow:hidden}.crg__container--game-load[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;transform:translate3d(0,-100%,0)}.crg__text--game-load[_ngcontent-%COMP%]{line-height:3rem;font-size:1.8rem;font-weight:900;min-width:6rem;margin:0 2rem}.cgr__wrapper--footer[_ngcontent-%COMP%]{display:flex;align-items:center}.cgr__container--options[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;width:100%;align-items:center;min-height:3rem;overflow:hidden}.cgr__container--single-option[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:center;align-items:center;min-height:3rem;margin:0rem .1rem .1rem;padding:.2rem}@media only screen and (max-width: 768px){.cgr__container--single-option[_ngcontent-%COMP%]{margin:.1rem}}.cgr__container--zoom[_ngcontent-%COMP%]{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4rem;height:3rem;z-index:1}.cgr__container--options-below[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:center;align-items:center;width:100%;padding:.5rem 0}.cgr__container--options-below-non-image[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-around;align-items:center;width:100%}.cgr__container--timer[_ngcontent-%COMP%]{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0;width:100%;height:100%}.cgr__timer--text-label[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:400}.cgr__text--timer-value[_ngcontent-%COMP%]{font-size:2.4rem;font-weight:900;min-width:6rem;margin:0 2rem}@keyframes _ngcontent-%COMP%_timer{0%{transform:translate3d(-1rem,0,0%);opacity:0}20%{transform:translateZ(0%);opacity:1}80%{transform:translateZ(0%);opacity:1}90%{transform:translate3d(3rem,0,0%);opacity:0}to{transform:translate3d(3rem,0,0%);opacity:0}}.goDown[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_goDown .3s ease-in-out forwards;animation-delay:.5s}.watch[_ngcontent-%COMP%]{height:5rem}.cgr__start-info--wait-text[_ngcontent-%COMP%]{text-align:center}.upDown[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_upDown .3s ease-in-out forwards,blink .8s .4s ease-in-out infinite;animation-delay:.5s}.blink[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink .8s .4s ease-in-out infinite;animation-delay:.5s}.timer[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_timer 1s ease-in-out infinite}.cgr__container--watch-btn[_ngcontent-%COMP%], .cgr__container--start-btn[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center}.cgr__watch-info--container[_ngcontent-%COMP%]{display:flex;height:100%;flex-flow:column nowrap;flex:1 1 0}.cgr__timer[_ngcontent-%COMP%]{margin-left:.5rem;display:flex}.cgr__start-info--container[_ngcontent-%COMP%]{display:flex;height:100%;flex-flow:column nowrap;justify-content:center;flex:1 1 0}.cgr__watch-info--options-icon[_ngcontent-%COMP%]{display:flex;position:relative;height:100%;flex:1 1 0}.cgr__watch-info--icon[_ngcontent-%COMP%]{font-size:2rem}.cgr__watch-info--icon-value[_ngcontent-%COMP%]{display:inline-block;line-height:1;margin:.5rem;font-size:1.4rem;font-weight:600}.cgr__watch--icon-container[_ngcontent-%COMP%], .cgr__timer-container[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;margin-left:1rem;height:2.4rem}.cgr__watch--button[_ngcontent-%COMP%], .cgr__start--button[_ngcontent-%COMP%]{margin:.5rem 0;font-size:4rem;min-width:12rem;flex:1 1 0}.cgr__game--result-container[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;visibility:hidden}.cgr__game--result-container.freeForAll[_ngcontent-%COMP%]{justify-content:center}.cgr__game--result-container.display[_ngcontent-%COMP%]{visibility:visible}.cgr__game--result--icon-value[_ngcontent-%COMP%]{margin-left:.5rem}.cgr__club--avatar[_ngcontent-%COMP%]{display:block;width:5rem;padding:1rem 0;font-size:.8rem}@keyframes _ngcontent-%COMP%_goDown{0%{transform:translateZ(0)}to{transform:translate3d(0,100%,0);opacity:0}}@keyframes _ngcontent-%COMP%_upDown{0%{transform:translate3d(0,-100%,0)}to{transform:translateZ(0)}}@keyframes _ngcontent-%COMP%_blink{0%{color:#eee}to{color:rgba(238,238,238,.5)}}']}),n})();const Rqt=["room"];let q1e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){var w=this;this.uiState=Mc.Default,this.tryJoinRoom=function(){var R=f(function*(G){const K=G.room,te=G.seatId;try{yield w.services.customGames.joinRoom(K,te)}catch(ee){console.warn(ee),ee instanceof et.NotEnoughMinerals?w.services.offerService.offerCurrency({targetValue:K.settings.transactions.bet,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}}):ee instanceof Av?w.objectIds.infoPopup=w.services.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]}):ee instanceof xv?w.objectIds.infoPopup=w.services.popup.show("POPUP.RESTRICT_LEVEL_MESSAGE",[ee.level]):ee instanceof et.RoomSeatTaken?w.services.toast.warn("ERRORS.SEAT_TAKEN"):ee instanceof et.Timeout?w.services.toast.warn("ERRORS.SOMETHING_WRONG"):ee instanceof et.Duplication?console.log("Seat taken"):ee instanceof lt.NetworkError?w.services.toast.error("ERRORS.CONNECTION_ERROR"):w.services.toast.warn("ERRORS.SOMETHING_WRONG")}});return function(G){return R.apply(this,arguments)}}(),this.onConnectionLost=()=>{this.closeLeavePopup()},this.onPlayStateChange=R=>{this.currentPlayRoom=R.data.currentRoom,this.updateView()},this.services={appState:e,sound:r,customGames:s,toast:a,popup:c,gamesClientService:u,cdr:h,playClient:void 0,store:i,offerService:b},this.flags={locked:!1,current:!1,starting:!1,openedForJoin:!1,interactable:!0},this.select=new ke,this.invite=new ke,this.currentUserProfile=i.selectUserState().profile,this.listeners=new ie.List,this.objectIds={leavePopup:void 0,joinPopup:void 0,infoPopup:void 0}}ngOnInit(){this.services.playClient=this.services.gamesClientService.getPlayClient(this.roomModel.settings.game.name),this.currentPlayRoom=this.services.playClient.activeClientModel.currentRoom,this.flags.locked=this.roomModel.settings.locked,this.flags.openedForJoin=this.getIsOpenedForJoin(),this.services.appState.subscribe(co.ConnectionLost,this.onConnectionLost)}ngAfterViewInit(){this.updateView(),this.onRoomUpdate(this.roomModel),this.listeners.add(this.services.playClient.stateEvents.onStateTransition(this.onPlayStateChange)),this.services.cdr.detectChanges()}ngOnDestroy(){this.listeners.forEach(e=>e.detach()),this.closeJoinRoomPopup(),this.closeLeavePopup(),this.services.popup.hide(this.objectIds.infoPopup),this.currentPlayRoom&&this.currentPlayRoom.getViewModel().id===this.roomModel.id&&this.flags.starting&&this.setRoomStarting(!1),this.services.appState.unsubscribe(co.ConnectionLost,this.onConnectionLost)}onTimerTick(e){e<=this.roomModel.settings.timers.readyStateStartTimer/1e3&&(this.setRoomStarting(!0),this.room.changeUIState(Mc.Default),this.room.hideAllSeatsKickButtons()),e<=0&&(this.room.changeUIState(Mc.Default),this.room.showGameLoadingBar(),this.room.stopTimer(),this.services.sound.play(dn.GameFound))}onRoomUpdate(e){var i;this.room.onRoomUpdate(e),this.flags.current&&(e.state===Ve.ERoomState.Waiting&&null!==(i=e.stateData)&&void 0!==i&&i.stateTransitionTimestamp?this.flags.starting||(this.room.changeUIState(Mc.Default),this.room.restartTimer(),this.updateSeatKickButtons()):e.state===Ve.ERoomState.Waiting&&this.onEnterWaitingForPlayersState()),this.room.sortTeams(),this.updateView()}joinRoom(e){if(this.currentPlayRoom||this.services.customGames.checkIfActionInProgress())return void this.services.toast.warn("CUSTOM_GAMES.WAIT");if(this.isOtherClubRoom())return void this.services.toast.warn("CLUBS.USER_NOT_IN_CLUB");const i=new ie.UniqueList(this.getPlayers(e.room.tables[e.room.tables.length-1])),s=()=>{this.tryJoinRoom(e)};this.services.customGames.isAnyPlayerInBlockList(this.services.customGames.getBlockList(),i)?this.openJoinRoomPopup(s,{key:"CUSTOM_GAMES.BLOCKED_PLAYERS"}):s()}spectateRoom(e){var i=this;return f(function*(){if(i.currentPlayRoom||i.services.customGames.checkIfActionInProgress())i.services.toast.warn("CUSTOM_GAMES.WAIT");else try{yield i.services.customGames.spectateRoom(e.room)}catch(s){s instanceof et.Timeout?i.services.toast.warn("ERRORS.SOMETHING_WRONG"):s instanceof xv?i.objectIds.infoPopup=i.services.popup.show("POPUP.RESTRICT_LEVEL_MESSAGE",[s.level]):s instanceof Av?i.objectIds.infoPopup=i.services.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]}):i.services.toast.error("ERRORS.CONNECTION_ERROR")}})()}kick(e){e.seat.player?e.seat.player.id===this.currentUserProfile.id?this.leave(e.room):this.kickPlayer(e):e.seat.reserved&&this.cancelInvite(e)}cancelInvite(e){var i=this;return f(function*(){try{yield i.services.customGames.cancelInvite(e.seat.id)}catch(r){r instanceof et.ItemNotFound||r instanceof et.Timeout||i.services.toast.warn("ERRORS.SOMETHING_WRONG"),console.log("Cancel invite error",r)}})()}onRoomSelect(e){this.select.emit(e)}invitePlayer(e){this.invite.emit(e)}startRoom(){var e=this;return f(function*(){const i=e.roomModel.state===Ve.ERoomState.Ready;if(e.services.customGames.checkIfActionInProgress()||i)e.services.toast.warn("CUSTOM_GAMES.WAIT");else try{yield e.services.customGames.startRoom()}catch(r){console.log("Start game error",r),r instanceof lt.NetworkError?e.services.toast.error("ERRORS.CONNECTION_ERROR"):e.services.toast.warn("ERRORS.SOMETHING_WRONG")}})()}openInformativeView(){this.room.changeUIState(Mc.Informative)}closeInformativeView(){this.room.changeUIState(Mc.Default)}setInteractable(e){this.flags.interactable=e}closeRoomForJoin(){this.room.setAllSeatsAs(fl.Unavailable),this.room.seats.forEach(e=>e.showJoin=!1)}unlockRoom(){this.flags.locked=!1;const e=this.getReservedSeat(this.currentUserProfile.id);this.roomModel.settings.requirements.minLevel&&this.currentUserProfile.level<this.roomModel.settings.requirements.minLevel?this.room.setAllSeatsAs(fl.MinLevelNotMet):e?this.room.seats.where(i=>i.id!==e.id).forEach(i=>i.showJoin=!1):this.setAllSeatsToUnlocked(),this.updateWatchButton()}setAllSeatsToUnlocked(){this.room.setAllSeatsAs(fl.Available)}isOtherClubRoom(){if(this.flags.current)return!1;const e=this.services.store.clubs.selectClubProfile();return this.roomModel.settings.requirements.clubId&&(!e||this.roomModel.settings.requirements.clubId!==e.id)}kickPlayer(e){var i=this;return f(function*(){try{yield i.services.customGames.kickPlayer(e.seat.player.id)}catch(r){r instanceof et.ItemNotFound||r instanceof et.Timeout||i.services.toast.warn("ERRORS.SOMETHING_WRONG"),console.log("Kick player error",r)}})()}leave(e){var i=this;if(this.services.customGames.checkIfActionInProgress())return void this.services.toast.warn("CUSTOM_GAMES.WAIT");const r=function(){var a=f(function*(){try{i.currentPlayRoom&&i.currentPlayRoom.getViewModel().state!==Ve.ERoomState.Ready&&i.currentPlayRoom.getViewModel().state!==Ve.ERoomState.Rematch&&(yield i.services.customGames.leaveRoom(),i.updateAsNotCurrentRoom(),i.updateSeatsState())}catch(c){c instanceof et.Timeout&&i.services.toast.error("ERRORS.CONNECTION_ERROR")}});return function(){return a.apply(this,arguments)}}();this.openLeaveRoomPopup(r,{key:"CUSTOM_GAMES.".concat(e.hostId===this.currentUserProfile.id?"DESTROY_ROOM":"LEAVE_ROOM")})}updateSeatKickButtons(){if(!1===this.flags.starting)if(this.isCurrentPlayerHost())this.room.showAllSeatsKickButtons();else{const e=this.room.seats.where(i=>i.player&&i.player.id===this.currentUserProfile.id).first();e&&this.room.updateSeat({showKickButton:!0},e.id)}else this.room.hideAllSeatsKickButtons()}isCurrentPlayerHost(){return this.currentPlayRoom&&this.currentPlayRoom.getViewModel().id===this.roomModel.id&&this.currentPlayRoom.getViewModel().hostId===this.currentUserProfile.id}onEnterWaitingForPlayersState(){this.room.stopTimer(),this.room.hideGameLoadingBar(),this.flags.starting&&this.setRoomStarting(!1),this.room.setMoreOptionsViewEnabled(!0),this.updateSeatKickButtons()}updateAsNotCurrentRoom(){this.flags.current=!1,this.room.stopTimer(),this.room.hideAllSeatsKickButtons(),this.flags.locked?this.room.setAllSeatsAs(fl.Locked):this.roomModel.settings.requirements.minLevel&&this.currentUserProfile.level<this.roomModel.settings.requirements.minLevel&&this.room.setAllSeatsAs(fl.MinLevelNotMet),this.room.hideGameLoadingBar(),this.room.setMoreOptionsViewEnabled(!0),this.flags.starting&&this.setRoomStarting(!1)}updateView(){this.currentPlayRoom?this.flags.current?this.currentPlayRoom.id!==this.roomModel.id&&this.updateOnJoinedAnotherRoom():this.currentPlayRoom.id===this.roomModel.id?this.updateRoomAsCurrent():this.updateOnJoinedAnotherRoom():(this.flags.current&&this.updateAsNotCurrentRoom(),this.updateSeatsState()),this.updateWatchButton()}updateRoomAsCurrent(){this.flags.current=!0,this.isCurrentPlayerHost()?(this.room.seats.forEach(e=>e.showJoin=!1),this.room.setAllSeatsAs(fl.Invitable)):this.closeRoomForJoin(),this.updateSeatKickButtons()}updateOnJoinedAnotherRoom(){this.flags.current=!1,this.closeRoomForJoin(),this.room.stopTimer(),this.room.hideAllSeatsKickButtons(),this.room.hideGameLoadingBar(),this.flags.starting&&this.setRoomStarting(!1)}openJoinRoomPopup(e,i,r){this.closeJoinRoomPopup(),this.objectIds.joinPopup=this.services.popup.confirm({buttons:{action:e,actionDecline:r},textParams:{translationKey:i.key,params:i.params}})}closeJoinRoomPopup(){this.services.popup.hide(this.objectIds.joinPopup)}openLeaveRoomPopup(e,i,r){this.closeLeavePopup(),this.objectIds.leavePopup=this.services.popup.confirm({buttons:{action:e,actionDecline:r},textParams:{translationKey:i.key,params:i.params}})}closeLeavePopup(){this.services.popup.hide(this.objectIds.leavePopup)}setRoomStarting(e){e&&this.closeLeavePopup(),this.flags.starting=e}updateSeatsState(){const e=this.getReservedSeat(this.currentUserProfile.id);e?(this.room.setAllSeatsAs(fl.Unavailable),this.currentPlayRoom||this.room.updateSeat({showJoin:!0},e.id)):(this.room.setAllSeatsAs(this.flags.locked?fl.Locked:this.roomModel.settings.requirements.minLevel&&this.currentUserProfile.level<this.roomModel.settings.requirements.minLevel?fl.MinLevelNotMet:fl.Available),this.room.seats.forEach(i=>i.showJoin=!1))}getReservedSeat(e){let i;return this.roomModel.tables.find(r=>{const s=r.seats.find(a=>a.reserved&&a.reserved.id===e);return s&&(i=s),void 0!==s}),i}getIsOpenedForJoin(){return this.currentPlayRoom?this.currentPlayRoom.getViewModel().id!==this.roomModel.id:!this.getReservedSeat(this.currentUserProfile.id)}getPlayers(e){const i=[];return e.seats.filter(r=>{r&&(r.player||r.reserved)&&i.push(r.player||r.reserved)}),i}updateWatchButton(){this.room.setWatchButtonVisibility(!this.currentPlayRoom&&!this.flags.locked&&this.roomModel.state===Ve.ERoomState.Ready&&void 0!==this.roomModel.tables.find(e=>e.state===Ve.ETableState.Gameplay))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Sa),g(J),g(Mo),g(ly),g(Dt),g(Cn),g(oo),g(Re),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["custom-games-lobby-room"]],viewQuery:function(e,i){if(1&e&&$e(Rqt,5),2&e){let r;je(r=He())&&(i.room=r.first)}},inputs:{roomModel:"roomModel",uiState:"uiState"},outputs:{select:"select",invite:"invite"},decls:2,vars:6,consts:[[3,"roomModel","isCurrent","isLocked","isOpenedForJoin","isInteractable","uiState","join","start","spectate","invite","select","kick","timerTick"],["room",""]],template:function(e,i){1&e&&(p(0,"custom-game-room",0,1),Y("join",function(s){return i.joinRoom(s)})("start",function(){return i.startRoom()})("spectate",function(s){return i.spectateRoom(s)})("invite",function(s){return i.invitePlayer(s)})("select",function(s){return i.onRoomSelect(s)})("kick",function(s){return i.kick(s)})("timerTick",function(s){return i.onTimerTick(s)}),m()),2&e&&l("roomModel",i.roomModel)("isCurrent",i.flags.current)("isLocked",i.isOtherClubRoom())("isOpenedForJoin",i.flags.openedForJoin)("isInteractable",i.flags.interactable)("uiState",i.uiState)},dependencies:[H1e],styles:["[_nghost-%COMP%]{display:block;flex-shrink:0}\n\n/*# sourceMappingURL=custom-games-lobby-room.component.ts-angular-inline--15.css.map*/"]}),n})();class kqt{constructor(n){this.page=1,this.stepSeconds=n,this.time=new Bn,this.startTimestamp=this.time.getServerTimeS()-n,this.endTimeStamp=this.time.getServerTimeS()+5}get currentPage(){return this.page}set isRequestingPage(n){this.requestingPage=n}get isRequestingPage(){return this.requestingPage}set stepSecondsTime(n){this.stepSeconds=n}setNextPageAsCurrent(){this.page++,this.endTimeStamp=this.startTimestamp,this.startTimestamp-=this.stepSeconds}toRequestArgs(){return{startTimestamp:this.startTimestamp,endTimestamp:this.endTimeStamp}}reset(){this.page=1,this.isRequestingPage=!1,this.startTimestamp=this.time.getServerTimeS()-this.stepSeconds,this.endTimeStamp=this.time.getServerTimeS()+5}}var u1=function(t){return t.All="CUSTOM_GAMES.SELECT.ALL",t.NotFull="CUSTOM_GAMES.SELECT.HIDE_FULL",t.Full="CUSTOM_GAMES.SELECT.SHOW_FULL",t}(u1||{}),uy=function(t){return t.All="CUSTOM_GAMES.FRIENDS_ROOM_SELECT.ALL",t.FriendHostsOnly="CUSTOM_GAMES.FRIENDS_ROOM_SELECT.ONLY_HOST_FRIENDS",t.OnlyWithFriends="CUSTOM_GAMES.FRIENDS_ROOM_SELECT.ONLY_FRIENDS",t}(uy||{}),wD=function(t){return t.ShowAll="CUSTOM_GAMES.CLUB_ROOM_SELECT.ALL",t.ShowMine="CUSTOM_GAMES.CLUB_ROOM_SELECT.SHOW_MINE",t.HideAll="CUSTOM_GAMES.CLUB_ROOM_SELECT.HIDE_ALL",t}(wD||{});class Fr{constructor(n,o){this.listUpdateStrategy=n,this.roomList=o||new ie.UniqueList}processUpdate(n){return this.roomList=this.listUpdateStrategy.processUpdate(n,this.roomList),this.roomList}setFilters(n,o){this.listUpdateStrategy.setFilters(n,o)}checkIfRoomFiltered(n){return this.listUpdateStrategy.checkIfRoomFiltered(n)}clear(){this.list=new ie.UniqueList}set updateStrategy(n){this.listUpdateStrategy=n}get list(){return this.roomList}set list(n){this.roomList=n}}!function(t){let n;var e;let o;(e=n=t.EUpdate||(t.EUpdate={})).ItemModelUpdate="imupd",e.ItemDeleted="idel",e.ItemAdded="iadd",e.PlayerJoined="pjoin",e.PlayerKicked="pkick",e.Refresh="rfsh",e.RoomsReceived="rrec",e.AddNextPageRooms="anextp",function(e){e[e.All=0]="All",e[e.NotStarted=1]="NotStarted"}(o=t.EShowRooms||(t.EShowRooms={}))}(Fr||(Fr={}));class Dqt{constructor(n){this.store=n}setFilters(n,o){this.filters=n,this.myId=o}checkIfRoomFiltered(n){return this.applyFilters(n,this.filters,this.myId)}getPlayerModelInRoom(n,o){let e;return o.tables.forEach(i=>{e=this.getPlayerSeat(n,i.seats)}),e}hasEmptySeat(n){return void 0!==n.tables[n.tables.length-1].seats.find(o=>null==o.player&&null==o.reserved)}hasPlayers(n){return!(1===n.tables.length&&!n.tables[0].seats.find(o=>null!=o.player||null!=o.reserved))}hasFriends(n){const o=n.tables[n.tables.length-1];return!!o.seats.find(e=>{var i;return this.store.friends.selectFriend(null===(i=e.player)||void 0===i?void 0:i.id)})||!!o.seats.find(e=>{var i;return this.store.friends.selectFriend(null===(i=e.reserved)||void 0===i?void 0:i.id)})}isFriendHost(n){return!!this.store.friends.selectFriend(n.hostId)}isMeInTheRoom(n,o){return!!o&&!!n.tables[n.tables.length-1].seats.find(e=>e.player&&e.player.id===o||e.reserved&&e.reserved.id===o)}shouldFilterState(n,o){switch(o){case u1.NotFull:return!this.hasEmptySeat(n);case u1.Full:return this.hasEmptySeat(n);default:return!1}}shouldFilterByFriends(n,o){switch(o){case uy.FriendHostsOnly:return!this.isFriendHost(n);case uy.OnlyWithFriends:return!this.hasFriends(n);default:return!1}}shouldFilterClubRoom(n,o){switch(o){case wD.HideAll:return null!=n.settings.requirements.clubId;case wD.ShowMine:if(!n.settings.requirements.clubId)return!0;const e=this.store.clubs.selectClubProfile();return!e||e.id!==n.settings.requirements.clubId;default:return!1}}applyFilters(n,o,e){let i=!1;return!o||this.isMeInTheRoom(n,e)||o.forEach(r=>{if(null!==r.value&&!i)if("roomState"===r.id)i=this.shouldFilterState(n,r.value);else if("requirements.clubRoom"===r.id)i=this.shouldFilterClubRoom(n,r.value);else if("friends"===r.id)i=this.shouldFilterByFriends(n,r.value);else{let a;r.id.split(".").forEach(c=>{a=a?a[c]:n.settings[c]}),i=this.filterOptionsHandler(r,a)}}),i}filterOptionsHandler(n,o){switch(n.id){case"transactions.bet":case"requirements.minLevel":return o<n.value;default:return o!==n.value}}getPlayerSeat(n,o){const e=o.find(i=>i&&(i.player&&i.player.id===n||i.reserved&&i.reserved.id===n));if(e)return e.player?e.player:e.reserved}}class W1e extends Dqt{processUpdate(n,o){switch(n.type){case Fr.EUpdate.Refresh:return this.updateOnRefresh(n,o);case Fr.EUpdate.RoomsReceived:return this.updateOnRoomsReceived(n,o);case Fr.EUpdate.AddNextPageRooms:return this.updateOnAddNextPageRooms(n,o);case Fr.EUpdate.ItemModelUpdate:return this.updateOnItemModelUpdate(n,o);case Fr.EUpdate.ItemAdded:return this.updateOnItemAdded(n,o);case Fr.EUpdate.PlayerJoined:return this.updateOnPlayerJoined(n,o);case Fr.EUpdate.PlayerKicked:return this.updateOnPlayerKicked(n,o);case Fr.EUpdate.ItemDeleted:return this.updateOnItemDeleted(n,o);default:return o}}updateOnRefresh(n,o){return this.updateWholeList(n,o)}updateOnRoomsReceived(n,o){return n.rooms.forEach(e=>o.tryAdd(e)),this.updateWholeList(n,o)}updateOnAddNextPageRooms(n,o){return n.rooms.forEach(e=>o.tryAdd(e)),this.updateWholeList(n,o.concat(new ie.UniqueList(n.rooms)))}updateOnItemDeleted(n,o){return n.item&&o.remove({id:n.item.id}),o}updateOnPlayerKicked(n,o){return n.item&&o.remove({id:n.item.id}),o}updateOnItemAdded(n,o){if(n.item&&!this.checkIfRoomFiltered(n.item)){if(this.getPlayerModelInRoom(n.currentPlayerId,n.item))try{o.addFirst(n.item)}catch(e){console.warn(e)}else o.tryAdd(n.item);return this.updateWholeList(n,o)}return o}updateOnPlayerJoined(n,o){o.tryAdd(n.item);let e=0;return o.find(r=>r.id===n.item.id||(e++,!1))&&o.first()&&([o.toArray()[0],o.toArray()[e]]=[o.toArray()[e],o.toArray()[0]]),o}updateOnItemModelUpdate(n,o){if(n.item&&n.change){const e=n.change.previousValue,i=n.change.currentValue;if(e&&i&&i.state!==e.state)return this.updateWholeList(n,o)}return o}updateWholeList(n,o){const e=[r=>r.state!==Ve.ERoomState.Finalize],i=[ie.ESort.Desc];return n.item&&(e.push(s=>s.id===n.item.id),i.push(ie.ESort.Desc)),o.orderBy(e,...i)}}class Bqt extends W1e{constructor(n,o){super(n),this.filters=o}processUpdate(n,o){switch(n.type){case Fr.EUpdate.Refresh:return this.updateOnRefresh(n,o);case Fr.EUpdate.ItemAdded:return this.updateOnItemAdded(n,o);case Fr.EUpdate.RoomsReceived:return this.updateOnRoomsReceived(n,o);case Fr.EUpdate.AddNextPageRooms:return this.updateOnAddNextPageRooms(n,o);case Fr.EUpdate.ItemDeleted:return this.updateOnItemDeleted(n,o);case Fr.EUpdate.PlayerKicked:return this.updateOnPlayerKicked(n,o);case Fr.EUpdate.PlayerJoined:return super.updateOnPlayerJoined(n,o);default:return o}}updateOnRefresh(n,o){return this.updateWholeList(n,o)}updateOnRoomsReceived(n,o){return n.rooms.forEach(e=>o.tryAdd(e)),this.updateWholeList(n,o)}updateOnAddNextPageRooms(n,o){return n.rooms.forEach(e=>o.tryAdd(e)),this.updateWholeList(n,o)}updateOnItemDeleted(n,o){return n.item&&this.getPlayerModelInRoom(n.currentPlayerId,n.item)&&o.remove({id:n.item.id}),o}updateWholeList(n,o){o=o.where(i=>!this.checkIfRoomFiltered(i)&&this.hasPlayers(i));const e=[];return n.currentPlayerRoom&&e.push(i=>i.id===n.currentPlayerRoom.id),o.orderBy(e,ie.ESort.Desc)}updateOnItemAdded(n,o){return n.item&&this.hasPlayers(n.item)&&(!o.length||!this.checkIfRoomFiltered(n.item)&&this.getPlayerModelInRoom(n.currentPlayerId,n.item))?(o.addFirst(n.item),this.updateWholeList(n,o)):o}}class $1e{constructor(n,o){this.userLevel=n,this.betOptions=o}getSuggestedBet(){let n=this.betOptions[0];return Nqt.forEach((o,e)=>{this.userLevel>=o.minLevel&&this.userLevel<=o.maxLevel&&(n=this.betOptions[e])}),n||this.betOptions[this.betOptions.length-1]}}const Nqt=[{minLevel:1,maxLevel:10},{minLevel:11,maxLevel:20},{minLevel:21,maxLevel:30},{minLevel:31,maxLevel:40},{minLevel:41,maxLevel:50},{minLevel:51,maxLevel:99}];var Fqt=__webpack_require__(36493),Uqt=ve.EButtonModifier;function Gqt(t,n){1&t&&Un(0)}function Vqt(t,n){if(1&t&&(p(0,"div",10),U(1,Gqt,1,0,"ng-container",11),m()),2&t){_(3);const o=Kt(8);d(),l("ngTemplateOutlet",o)}}function zqt(t,n){if(1&t&&U(0,Vqt,2,1,"div",9),2&t){const o=n.$implicit,e=_(2);l("ngIf",e.isOptionBet(o)&&e.isAllInSelected(e.options)&&!e.hasEnoughChipsForAllIn())}}function jqt(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"form-builder",7),Y("onOptionSelect",function(i){return oe(o),re(_().onSettingSelect(i))}),U(2,zqt,1,1,"ng-template",null,8,ft),m()()}if(2&t){const o=_();d(),l("config",o.optionsConfig)("disabledFields",o.disabledFields)}}function Hqt(t,n){if(1&t&&(p(0,"div",12)(1,"p"),H(2),V(3,"translate"),m()(),p(4,"div",13)(5,"div",14),B(6,"currency-component",15),m()(),p(7,"div",16)(8,"div",17)(9,"span"),H(10),V(11,"translate"),m(),B(12,"currency-component",18),m(),p(13,"div",17)(14,"span"),H(15),V(16,"translate"),m(),B(17,"currency-component",18),m()()),2&t){const o=_();d(2),se($(3,10,"CUSTOM_GAMES.NOT_ENOUGH_CHIPS")),d(3),l("key","CUSTOM_GAMES.ALL_IN_FUNDS_REQUIRED"),d(),l("currency",o.currencyType.Chips)("value",o.getMinAllInBet()),d(4),ze("",$(11,12,"SHOP.YOU_HAVE"),":"),d(2),l("currency",o.currencyType.Chips)("value",o.wallet.chips),d(3),ze("",$(16,14,"SHOP.YOU_NEED"),":"),d(2),l("currency",o.currencyType.Chips)("value",o.getMinAllInBet()-o.wallet.chips)}}const qqt=()=>({key:"BUTTON.CREATE_GAME"});let K1e=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.buttonModifier=Uqt,this.popupTitleTypes=li,this.customFormValidators={},this.disabledFields={},this.currencyType=ln,this.dismissClick=u=>{u.target.classList.contains("cg__wrapper--settings")&&this.closeOptionsPopup()},this.validateUserLevel=()=>{let u=this.options.findIndex(h=>"requirements.minLevel"===h.id);return-1!==u&&this.userMe.profile.level>=this.options[u].value||(this.toast.warn("POPUP.ROOM_MIN_LEVEL_NOT_MET",[this.options[u].value]),!1)},this.appStorage=a,this.store=s,this.customGamesService=i,this.toast=r,this.formValidator=new Si.FormValidator,this.optionsService=e,this.close=new ke,this.create=new ke,this.gameModeChanged=!1,this.userMe=this.store.selectUserState(),this.currentGameId=c.getCurrentGameRelatedConfig().gameConfig.id,this.gameRelatedConfig=c.getCurrentGameRelatedConfig(),this.checkOptionsHash(Qu()(c.getCurrentGameRelatedConfig().matchmaking.customGames.customSettings)),this.currentMode="",this.popupContainerOptions={styleProperties:{width:"38rem",maxHeight:"55rem",minHeight:"18rem"}},this.options=[]}ngOnInit(){this.userMe=this.store.selectUserState();let e=this.optionsConfig.findIndex(r=>"requirements.minLevel"===r.id);-1!==e&&(this.optionsConfig[e].options=this.filterOptionsBySpecificType(this.optionsConfig[e]),this.customFormValidators={"requirements.minLevel":this.validateUserLevel});let i=this.optionsConfig.findIndex(r=>"transactions.bet"===r.id);-1!==i&&(this.optionsConfig[i].defaultValue=new $1e(this.userMe.profile.level,this.optionsConfig[i].options).getSuggestedBet()),this.optionsConfig=this.optionsService.getInventoryItemOptions(this.optionsConfig),this.store.clubs.selectClubProfile()||(this.optionsConfig=this.optionsConfig.filter(r=>"requirements.clubRoom"!==r.id)),this.addDismissClickListener()}ngOnDestroy(){this.close.unsubscribe(),this.create.unsubscribe(),window.removeEventListener("click",this.dismissClick)}closeOptionsPopup(){this.close.emit(!1)}onSettingSelect(e){var i,r;this.isAllInSelected(e)&&!this.hasEnoughChipsForAllIn()?(this.optionsConfig.filter(h=>"transactions.bet"!==h.id).forEach(h=>this.disabledFields[h.id]=!0),this.wallet=this.store.selectWallet()):this.disabledFields={},this.options=e;const s=this.optionsConfig.findIndex(h=>"transactions.reward"===h.id);let a=null===(i=this.optionsConfig[s])||void 0===i?void 0:i.options.findIndex(h=>null===h.linkedTo.value);if(a>=0){const h=this.gameRelatedConfig.matchmaking.presets.find(G=>"default"===G.presetId),b=e.find(G=>"players.count"===G.id),R=(b?b.value:h.game.players.count)*this.store.selectWallet().chips/h.game.players.perTeam;this.optionsConfig[s].options[a].value=Math.round(R-R*this.gameRelatedConfig.matchmaking.customGames.allInRoomRake)}const c=this.optionsConfig.findIndex(h=>"transactions.placementRewards.1.clubContribution"===h.id);let u=null===(r=this.optionsConfig[c])||void 0===r?void 0:r.options.findIndex(h=>null===h.linkedTo.value);u>=0&&(this.optionsConfig[c].options[u].value=Math.round(this.store.selectWallet().chips*this.gameRelatedConfig.matchmaking.customGames.clubContributionPercentage))}isDisabled(){return Object.keys(this.disabledFields).length>0}addDismissClickListener(){window.addEventListener("click",this.dismissClick)}createRoom(){if(this.formValidator.validate(this.optionsConfig,this.options)){if(!(new Fqt.m).validate(this.customFormValidators))return;const i=this.appStorage.getItem("customOptions");if(i){const s=i[this.userMe.profile.id]?i[this.userMe.profile.id]:void 0;s?(df()(s,{[this.currentGameId]:this.stripInventoryOptions(this.options)}),df()(i,{[this.userMe.profile.id]:s})):df()(i,{[this.userMe.profile.id]:{[this.currentGameId]:this.stripInventoryOptions(this.options)}}),this.appStorage.setItem("customOptions",i)}else this.appStorage.setItem("customOptions",{[this.userMe.profile.id]:{[this.currentGameId]:this.stripInventoryOptions(this.options)}});if(this.isAllInSelected(this.options)){const s=this.options.findIndex(c=>"transactions.reward"===c.id);-1!==s&&(this.options[s].value=null);const a=this.options.findIndex(c=>"transactions.placementRewards.1.clubContribution"===c.id);-1!==a&&(this.options[a].value=null)}this.create.emit(this.options),this.closeOptionsPopup()}else this.toast.error("ERRORS.SOMETHING_WRONG"),console.warn("Custom game options validation results: ",this.formValidator.getValidationResults())}isOptionBet(e){return"transactions.bet"===e.id}isAllInSelected(e){return!!e.find(i=>"transactions.bet"===i.id&&null===i.value)}hasEnoughChipsForAllIn(){return this.store.selectWallet().chips>this.getMinAllInBet()}getMinAllInBet(){const e=this.gameRelatedConfig.matchmaking.customGames.customSettings.find(i=>"transactions.bet"===i.id).options.filter(i=>!!i.value);return N0()(e,"value",[ie.ESort.Asc])[e.length-1].value+1}stripInventoryOptions(e){return e.filter(i=>void 0!==i.value&&(null===i.value||!i.value.group||"inventory"!==i.value.group))}filterOptionsBySpecificType(e){return"requirements.minLevel"===e.id?e.masterFieldId&&null===e.options[0].value&&this.userMe.profile.level<e.options[1].value?[e.options[0],e.options[1]]:e.options.filter(i=>i.value<=this.userMe.profile.level):e.options}checkOptionsHash(e){let i=[];e.forEach(c=>{i.push(c.id),c.options&&c.options.forEach(u=>{i.push(u.value)})});let r=r$e()(i.join(" ")).toString();const s=this.appStorage.getItem("customOptionsHash"),a=this.appStorage.getItem("customOptions");if(s&&s[this.currentGameId]&&s[this.currentGameId]===r){let c=a?a[this.userMe.profile.id]:void 0;c&&c[this.currentGameId]&&e.forEach(u=>{let h=c[this.currentGameId].find(b=>b.id===u.id);h&&(u.defaultValue={value:h.value})})}else{const c=s&&"string"!=typeof s?df()(s,{[this.currentGameId]:r}):{[this.currentGameId]:r};this.appStorage.setItem("customOptionsHash",c),a&&a[this.userMe.profile.id]&&a[this.userMe.profile.id][this.currentGameId]&&(a[this.userMe.profile.id][this.currentGameId]=void 0),this.appStorage.setItem("customOptions",a)}this.optionsConfig=e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ig),g(ly),g(Dt),g(J),g(Ci),g(Zn))},t.\u0275cmp=pe({type:t,selectors:[["game-options"]],outputs:{close:"close",create:"create"},decls:9,vars:12,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","popupId","text","buttonCloseClicked"],["class","cg__container--options",4,"ngIf"],[1,"cg__container--button-play"],["activeCmp","","id","cg-play-button","data-cy","customRoomPlayButton",1,"cg__button--play",3,"buttonModifier","disabled","onClick"],["allInNotEnoughChips",""],[1,"cg__container--options"],[3,"config","disabledFields","onOptionSelect"],["fieldInfo",""],["class","cg__container--form-info",4,"ngIf"],[1,"cg__container--form-info"],[4,"ngTemplateOutlet"],[1,"cg__container--options--info-title"],[1,"cg__container--options--info-desc"],["text-with-placeholders","",3,"key"],[1,"cg__container--options--chip",3,"currency","value"],[1,"cg__container--options--info-bottom"],[1,"cg__container--options--info--balance--wrapper"],[1,"cg__container--options--info--balance",3,"currency","value"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closeOptionsPopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closeOptionsPopup()}),m(),U(2,jqt,4,2,"div",2),p(3,"div",3)(4,"button-text",4),Y("onClick",function(){return i.createRoom()}),H(5),V(6,"translate"),m()()(),U(7,Hqt,18,16,"ng-template",null,5,ft)),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Static)("popupId","gameOptions")("text",pt(11,qqt)),d(),l("ngIf",i.optionsConfig),d(2),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("disabled",i.isDisabled()),d(),ze("",$(6,9,"TEXT.PLAY")," "))},dependencies:[Ne,qr,oc,pn,So,Ji,Wi,Xd,Nm,qe],styles:[".cg__container--reward[_ngcontent-%COMP%]{width:100%;text-align:center;padding:.5rem}.cg__container--reward[_ngcontent-%COMP%]   .cg__text--reward-value[_ngcontent-%COMP%]{position:relative;display:inline-block;font-size:2.4rem;font-weight:600;margin-left:2.4rem;line-height:26px}@media only screen and (max-width: 768px){.cg__container--reward[_ngcontent-%COMP%]   .cg__text--reward-value[_ngcontent-%COMP%]{font-size:2.4rem}}.cg__container--reward[_ngcontent-%COMP%]   .cg__text--reward-label[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-transform:uppercase;text-align:center;line-height:2rem}.cg__container--options[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;margin:0 auto;padding:.5rem;width:96%;height:calc(100% - 13rem)}@media only screen and (max-height: 768px){.cg__container--options[_ngcontent-%COMP%]{height:calc(100% - 11rem)}}@media only screen and (max-height: 480px){.cg__container--options[_ngcontent-%COMP%]{padding:0 .5rem}}@media only screen and (max-height: 360px){.cg__container--options[_ngcontent-%COMP%]{height:calc(100% - 11rem)}}.cg__container--options[_ngcontent-%COMP%]   .cg__container--options-scroll[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;height:auto;min-height:100%}.cg__container--options[_ngcontent-%COMP%]   .cg__container--options-scroll[_ngcontent-%COMP%]   .cg__container--single-option[_ngcontent-%COMP%]{position:relative;margin-top:3%}@media only screen and (max-height: 480px){.cg__container--options[_ngcontent-%COMP%]   .cg__container--options-scroll[_ngcontent-%COMP%]   .cg__container--single-option[_ngcontent-%COMP%]{margin-top:0}}.cg__container--options[_ngcontent-%COMP%]   .cg__container--options-scroll[_ngcontent-%COMP%]   .cg__container--single-option[_ngcontent-%COMP%]   .cg__cover--inactive-option[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.cg__container--button-play[_ngcontent-%COMP%]{padding:2rem 0}@media only screen and (max-height: 768px){.cg__container--button-play[_ngcontent-%COMP%]{padding:.5rem 0}}@media only screen and (max-height: 360px){.cg__container--button-play[_ngcontent-%COMP%]{padding:0}}@media only screen and (max-height: 360px){.cg__container--button-play[_ngcontent-%COMP%]{padding:.5rem 0}}.cg__button--play[_ngcontent-%COMP%]{width:80%}.cg__container--close[_ngcontent-%COMP%]{position:absolute;top:.5rem;right:.5rem}.cg__container--toggle[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;margin:0 0 0 .5rem;padding:.5rem 0}.cg__container--toggle[_ngcontent-%COMP%]   .cg__text--toggle-label[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;font-weight:600;text-transform:uppercase;margin-left:3rem}@media only screen and (max-width: 768px){.cg__container--toggle[_ngcontent-%COMP%]   .cg__text--toggle-label[_ngcontent-%COMP%]{font-size:1.4rem;width:13rem}}.cg__container--toggle-label[_ngcontent-%COMP%]{flex:1}.cr__container--toggle-button[_ngcontent-%COMP%]{width:7rem}.disabledOption[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;filter:blur(1px)}.cg__container--form-info[_ngcontent-%COMP%]{padding:1rem;text-align:center}.cg__container--options--info-title[_ngcontent-%COMP%]{font-size:2.4rem}.cg__container--options--info-desc[_ngcontent-%COMP%]{font-size:1.4rem;padding:2rem 0}.cg__container--options--info-bottom[_ngcontent-%COMP%]{font-size:1.4rem}.cg__container--options--info--balance--wrapper[_ngcontent-%COMP%]{font-size:1.4rem;padding:.25rem 0}.cg__container--options--info--balance[_ngcontent-%COMP%]{font-size:1.4rem}.cg__container--options--chip[_ngcontent-%COMP%]{display:block;padding:1rem 0}"]}),n})();var Ng;!function(t){let n;var o;(o=n=t.ETabId||(t.ETabId={})).RecentlyPlayed="recentlyPlayed",o.ClubMembers="clubMembers",o.Friends="friends",o.Share="share",o.ClubShare="clubShare"}(Ng||(Ng={}));var Wqt=ve.EButtonModifier,bq=nt.EPermissionModule,Cq=nt.EModuleAction;function $qt(t,n){if(1&t){const o=Ce();p(0,"top-tab-item",6),Y("select",function(){const r=oe(o).$implicit;return re(_().selectTab(r))}),B(1,"button-icon",7),m()}if(2&t){const o=n.$implicit,e=_();ni("",o.id," button-icon-tab"),l("tabId",o.id),d(),l("bclass","invite-page__top-tabs__bclass "+(o.id===e.tabs.current.id?" top-tabs__selected":""))("flatButton",!0)("icon",o.icon)("buttonModifier",e.enums.buttons.EButtonModifier.BUTTON_TRANSPARENT)}}function Kqt(t,n){1&t&&B(0,"loader-image",15),2&t&&l("transparentBG",!0)}function Zqt(t,n){if(1&t&&B(0,"user-list-box-current-game",21),2&t){const o=_().$implicit;l("currentGame",_(3).users.playStates[o.profile.id].gameName)}}function Qqt(t,n){if(1&t&&U(0,Zqt,1,1,"user-list-box-current-game",20),2&t){const o=n.$implicit,e=_(3);l("ngIf",null==e.users.playStates[o.profile.id]?null:e.users.playStates[o.profile.id].gameName)}}const yq=t=>({name:t});function Yqt(t,n){if(1&t){const o=Ce();p(0,"button-icon",24),Y("onClick",function(){oe(o);const i=_().$implicit;return re(_(3).invite(i.profile))}),m()}if(2&t){const o=_().$implicit,e=_(3);l("buttonModifier",e.enums.buttons.EButtonModifier.BUTTON_ACTION)("disabled",e.tasks.invite&&e.tasks.invite.playerId!==o.profile.id)("loading",e.tasks.invite&&e.tasks.invite.playerId===o.profile.id)("icon",ne(4,yq,e.enums.buttons.EIcons.PLUS))}}function Jqt(t,n){1&t&&B(0,"icon-component",25),2&t&&l("icon",_(4).enums.buttons.EIcons.Joystick)}function Xqt(t,n){1&t&&B(0,"icon-component",25),2&t&&l("icon",_(4).enums.buttons.EIcons.MIN_LEVEL_STAR_LOCKED)}function eWt(t,n){if(1&t&&U(0,Yqt,1,6,"button-icon",22)(1,Jqt,1,1,"icon-component",23)(2,Xqt,1,1,"icon-component",23),2&t){const o=n.$implicit,e=_(3);l("ngIf",!e.users.playStates[o.profile.id].currentRoomId&&(!e.viewModel.room.settings.requirements.minLevel||o.profile.level>=e.viewModel.room.settings.requirements.minLevel)),d(),l("ngIf",o.profile.online&&e.users.playStates[o.profile.id].currentRoomId),d(),l("ngIf",e.viewModel.room.settings.requirements.minLevel&&o.profile.level<e.viewModel.room.settings.requirements.minLevel)}}const tWt=t=>({textNoUsers:t,textUserLabel:"FRIENDS.ONLINE",showPartOfTotal:!1,onlineIndication:!0});function nWt(t,n){if(1&t&&(p(0,"list-users-box",16),U(1,Qqt,1,1,"ng-template",17,18,ft)(3,eWt,3,3,"ng-template",null,19,ft),m()),2&t){const o=_(2);l("type","online")("listUsers",o.users.list)("shownUsersCount",200)("totalListLength",o.users.list.length)("searchedUser",o.users.usernameFilter)("configListUsers",ne(6,tWt,o.users.emptyListText.key))}}function iWt(t,n){if(1&t){const o=Ce();p(0,"button-text",26),Y("onClick",function(){return oe(o),re(_(2).openClubs())}),p(1,"p"),H(2),V(3,"translate"),m()()}2&t&&(l("buttonModifier",_(2).enums.buttons.EButtonModifier.BUTTON_ACTION),d(2),se($(3,2,"CLUBS.BROWSE_CLUBS")))}function oWt(t,n){if(1&t){const o=Ce();p(0,"div",8)(1,"div",9)(2,"search-bar",10),Y("clearFilters",function(){return oe(o),re(_().resetFilters())})("filterAction",function(i){return oe(o),re(_().searchUser(i))}),m()(),p(3,"div",11),U(4,Kqt,1,1,"loader-image",12)(5,nWt,5,8,"list-users-box",13)(6,iWt,4,4,"button-text",14),m()()}if(2&t){const o=_();d(2),l("customInputCssClass","invite-popup__searchbar--input")("searchBarPlaceholder","PLACEHOLDERS.USERNAME"),d(2),l("ngIf",o.viewFlags.showLoader),d(),l("ngIf",o.viewFlags.showList),d(),l("ngIf",o.viewFlags.showButtonToClubsList)}}const rWt=t=>({readonly:!0,value:t});function sWt(t,n){if(1&t){const o=Ce();p(0,"div",27)(1,"div",28),B(2,"p",29),V(3,"safeHtml"),V(4,"translate"),p(5,"div",30)(6,"p",31),H(7),V(8,"translate"),m(),B(9,"user-input",32),m(),p(10,"div",33),B(11,"share-button",34),p(12,"button-icon-text",35),Y("onClick",function(){return oe(o),re(_().shareInChat())}),H(13),V(14,"translate"),m()()()()}if(2&t){const o=_();d(2),l("innerHtml",$(3,11,$(4,13,"CUSTOM_GAMES.INVITE_POPUP_SHARE")),Yn),d(5),se($(8,15,"CUSTOM_GAMES.ROOM_CODE")),d(2),l("nativeAttr",ne(19,rWt,o.viewModel.room.invitationCode))("placeholder",""),d(2),l("copy-color",o.copyColor)("text",o.shareText)("shareMethod",o.shareEnum.Copy),d(),l("bclass","cg-invite-popup__share-button-bclass")("icon",ne(21,yq,o.enums.buttons.EIcons.GLOBAL_CHAT))("buttonModifier",o.enums.buttons.EButtonModifier.BUTTON_LIGHT),d(),ze("",$(14,17,"TEXT.SHARE_CHAT")," ")}}function aWt(t,n){if(1&t){const o=Ce();p(0,"div",27)(1,"div",28),B(2,"p",29),V(3,"safeHtml"),V(4,"translate"),p(5,"div",33)(6,"button-icon-text",35),Y("onClick",function(){return oe(o),re(_().shareInClubChat())}),H(7),V(8,"translate"),m()()()()}if(2&t){const o=_();d(2),l("innerHtml",$(3,5,$(4,7,"CLUBS.CLUB_SHARE_ROOM_IN_CHAT")),Yn),d(4),l("bclass","cg-invite-popup__share-button-bclass")("icon",ne(11,yq,o.enums.buttons.EIcons.GLOBAL_CHAT))("buttonModifier",o.enums.buttons.EButtonModifier.BUTTON_LIGHT),d(),ze("",$(8,9,"TEXT.SHARE_CHAT")," ")}}let Sq=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R){var G=this;this.cdr=R,this.copyColor=Wqt.BUTTON_ACTION,this.shareEnum=yv,this.onFriendsTabSelect=f(function*(){try{G.users.list=[],G.users.playStates={},G.viewFlags.showList=!1,G.showPlayersLoader(300);const K=new Jn(G.services.games.requestFriends());G.tasks.users={promise:K};const te=yield K;G.users.playStates=te.playStates;const ee=G.services.permissions.getModuleActionConfig(G.getModuleByRoomType(G.viewModel.room.settings.type),Cq.Join),le=!!ee.requirements.level;G.users.list=new ie.List(te.profiles.map(me=>({profile:Lo.toPlatformProfile(me),onlineStatus:new xm({isOnline:me.online,lastSeen:void 0,userId:me.id})}))).where(me=>new Fb(me.profile,ee.requirements.membership).isFulfilled&&(!le||me.profile.level>=ee.requirements.level)&&!te.playStates[me.profile.id].currentRoomId&&!G.getPlayerIds(G.viewModel.room).has(me.profile.id)&&void 0===G.viewModel.room.blocklist.find(ge=>ge===me.profile.id)&&void 0===G.viewModel.room.declinedInvitations.find(ge=>ge===me.profile.id)).orderBy([me=>{var ge;return null===(ge=me.onlineStatus)||void 0===ge?void 0:ge.isOnline}],ie.ESort.Desc).toArray(),G.users.list.length||(G.users.emptyListText={key:"FRIENDS.NO_FRIENDS"}),G.viewFlags.showList=!0}catch(K){K instanceof Cr?console.warn(K):(G.viewFlags.showList=!0,G.users.emptyListText=K instanceof lt.NetworkError?{key:"ERRORS.CONNECTION_ERROR"}:{key:"ERRORS.SOMETHING_WRONG"}),console.warn(K)}finally{G.hidePlayersLoader()}}),this.onRecentPlayersTabSelect=f(function*(){try{G.users.list=[],G.users.playStates={},G.viewFlags.showList=!1,G.showPlayersLoader(300);const K=new Jn(G.services.games.requestRecentPlayers());G.tasks.users={promise:K};const te=yield K,ee=G.services.permissions.getModuleActionConfig(G.getModuleByRoomType(G.viewModel.room.settings.type),Cq.Join),le=!!ee.requirements.level;G.users.playStates=te.playStates,G.users.list=new ie.List(te.profiles.map(me=>({profile:Lo.toPlatformProfile(me),onlineStatus:new xm({isOnline:me.online,lastSeen:void 0,userId:me.id})}))).where(me=>new Fb(me.profile,ee.requirements.membership).isFulfilled&&(!le||me.profile.level>=ee.requirements.level)&&!G.getPlayerIds(G.viewModel.room).has(me.profile.id)&&void 0===G.viewModel.room.blocklist.find(ge=>ge===me.profile.id)&&void 0===G.viewModel.room.declinedInvitations.find(ge=>ge===me.profile.id)).orderBy([me=>{var ge;return null===(ge=me.onlineStatus)||void 0===ge?void 0:ge.isOnline}],ie.ESort.Desc).toArray(),G.users.list.length||(G.users.emptyListText={key:"ERRORS.NO_USERS_FOUND"}),G.viewFlags.showList=!0}catch(K){K instanceof Cr?console.warn(K):(G.viewFlags.showList=!0,G.users.emptyListText=K instanceof lt.NetworkError?{key:"ERRORS.CONNECTION_ERROR"}:{key:"ERRORS.SOMETHING_WRONG"}),console.warn(K)}finally{G.hidePlayersLoader()}}),this.onClubMembersTabSelect=f(function*(){try{var K;null===(K=G.clubSubscription)||void 0===K||K.unsubscribe(),G.clubSubscription=G.services.store.clubs.subscribeCurrentClub().pipe(tr(1)).subscribe(G.onClubMembersTabSelect),G.users.list=[],G.users.playStates={},G.viewFlags.showList=!1,G.showPlayersLoader(300);const te=new Jn(G.services.games.requestClubMembers());G.tasks.users={promise:te};const ee=yield te;G.users.playStates=ee.playStates;const le=G.services.permissions.getModuleActionConfig(G.getModuleByRoomType(G.viewModel.room.settings.type),Cq.Join),me=!!le.requirements.level;G.users.list=new ie.List(ee.profiles.map(ge=>({profile:Lo.toPlatformProfile(ge),onlineStatus:new xm({isOnline:ge.online,lastSeen:void 0,userId:ge.id})}))).where(ge=>new Fb(ge.profile,le.requirements.membership).isFulfilled&&(!me||ge.profile.level>=le.requirements.level)&&!G.getPlayerIds(G.viewModel.room).has(ge.profile.id)&&void 0===G.viewModel.room.blocklist.find(Me=>Me===ge.profile.id)&&void 0===G.viewModel.room.declinedInvitations.find(Me=>Me===ge.profile.id)).orderBy([ge=>{var Me;return null===(Me=ge.onlineStatus)||void 0===Me?void 0:Me.isOnline}],ie.ESort.Desc).toArray(),G.users.list.length||(G.users.emptyListText={key:"ERRORS.NO_USERS_FOUND"}),G.viewFlags.showList=!0}catch(te){te instanceof Cr?console.warn(te):(G.viewFlags.showList=!0,te instanceof lt.NetworkError?G.users.emptyListText={key:"ERRORS.CONNECTION_ERROR"}:te instanceof Mm?G.users.emptyListText={key:"CLUBS.CLUB_NOT_FOUND"}:te instanceof $f?(G.users.emptyListText={key:"CLUBS.GAME_INVITE_NO_CLUB"},G.viewFlags.showButtonToClubsList=!0):G.users.emptyListText={key:"ERRORS.SOMETHING_WRONG"}),console.warn(te)}finally{G.hidePlayersLoader()}}),this.services={games:e,playClient:r,toaster:a,translate:s,config:c,appService:u,chats:h,permissions:b,store:i,clubsService:w},this.close=new ke,this.users={list:[],playStates:{},usernameFilter:"",emptyListText:{key:"ERRORS.SOMETHING_WRONG"},current:{id:i.selectUserState().profile.id}},this.popup={titleType:li.Static,containerOptions:{styleProperties:{maxWidth:"50rem",height:"auto",maxHeight:"98%"},customBackdropCssClass:"cg-invite-popup__backdrop",customComponentCssClass:"cg-invite-popup__content"}},this.tabs={current:void 0,list:void 0},this.viewFlags={showList:!1,showLoader:!1,showButtonToClubsList:!1},this.isMobileApp=this.services.appService.isMobileApp(),this.enums={tabs:{ETabId:Ng.ETabId},buttons:{EIcons:ve.EIcons,EButtonModifier:ve.EButtonModifier}},this.tasks={users:void 0,invite:void 0}}ngOnInit(){this.tabs.list=this.buildTabs(),this.selectTab(this.tabs.list[0]),this.shareText=this.services.translate.getParsedTranslation("CUSTOM_GAMES.SHARE_INVITE_TEXT",[this.viewModel.room.settings.game.name,this.services.config.getConfig().platform.name,"'".concat(this.viewModel.room.invitationCode,"'")])}ngOnDestroy(){var e;clearTimeout(this.delayId),this.cancelActiveTasks(),null===(e=this.clubSubscription)||void 0===e||e.unsubscribe()}closePopup(){if(this.services.store.chatComponent.selectIsOpened()){const e=this.services.store.chatComponent.selectTabsState().selectedId;this.services.chats.open({tab:e,intent:{type:zc.General,data:void 0},interactableTabsSubset:void 0,data:void 0})}this.close.emit()}selectTab(e){this.tabs.current&&this.tabs.current.id===e.id||(this.viewFlags.showButtonToClubsList=!1,this.cancelUsersTask(),this.tabs.current=e,this.users.usernameFilter="",this.users.playStates={},e.onSelect&&e.onSelect.apply(this))}invite(e){var i=this;return f(function*(){const r=i.services.playClient.getPlayClient(i.viewModel.room.settings.game.name);if(r)try{const s=new Jn(r.invite({playerId:e.id,seatId:i.viewModel.seatId,tableId:i.viewModel.tableId}));i.tasks.invite={promise:s,playerId:e.id},yield s,i.closePopup()}catch(s){s instanceof Cr?console.warn(s):s instanceof lt.NetworkError?i.services.toaster.warn("ERRORS.CONNECTION_ERROR"):s instanceof et.Duplication?(i.getPlayerIds(i.viewModel.room).has(e.id)?i.services.toaster.warn("CUSTOM_GAMES.PLAYER_ALREADY_IN_ROOM"):i.services.toaster.warn("ERRORS.SEAT_TAKEN"),i.closePopup()):i.services.toaster.warn("ERRORS.SOMETHING_WRONG"),i.closePopup()}})()}searchUser(e){this.users.usernameFilter=e.searchbarFilterValue,this.cdr.detectChanges()}resetFilters(){this.users.usernameFilter="",this.cdr.detectChanges()}shareInChat(){this.services.chats.open({intent:Yde.createShareRoomUsageIntent({room:this.viewModel.room,table:this.viewModel.room.tables.find(e=>e.state!==Ve.ETableState.Ended)})})}shareInClubChat(){this.services.chats.open({tab:Br.Club,interactableTabsSubset:[Br.Club],intent:Yde.createShareRoomUsageIntent({room:this.viewModel.room,table:this.viewModel.room.tables.find(e=>e.state!==Ve.ETableState.Ended)})})}buildTabs(){if(this.viewModel.room.settings.requirements.clubRoom)return[{id:Ng.ETabId.ClubMembers,icon:{name:ve.EIcons.ADD_FRIEND},text:{key:"CUSTOM_GAMES.INVITE_CLUB_MEMBERS"},onSelect:this.onClubMembersTabSelect},{id:Ng.ETabId.ClubShare,icon:{name:ve.EIcons.SHARE},text:{key:"TEXT.SHARE_CHAT"}}];{let e=[{id:Ng.ETabId.Friends,icon:{name:ve.EIcons.ADD_FRIEND},text:{key:"CUSTOM_GAMES.INVITE_FRIENDS"},onSelect:this.onFriendsTabSelect},{id:Ng.ETabId.RecentlyPlayed,icon:{name:ve.EIcons.USERS},text:{key:"CUSTOM_GAMES.RECENTLY_PLAYED"},onSelect:this.onRecentPlayersTabSelect},{id:Ng.ETabId.Share,icon:{name:ve.EIcons.SHARE},text:{key:"CUSTOM_GAMES.CODE_INVITE"}}];return this.services.permissions.getModulePermission(nt.EPermissionModule.Clubs).isPermitted&&e.splice(e.length-1,0,{id:Ng.ETabId.ClubMembers,icon:{name:ve.EIcons.CLUB_PAGE},text:{key:"CUSTOM_GAMES.INVITE_CLUB_MEMBERS"},onSelect:this.onClubMembersTabSelect}),e}}openClubs(){this.services.clubsService.openCurrentClubPage(!0),this.close.emit()}showPlayersLoader(e){e?this.delayId=setTimeout(()=>{this.viewFlags.showLoader=!0},300):this.viewFlags.showLoader=!0}hidePlayersLoader(){clearTimeout(this.delayId),this.viewFlags.showLoader=!1}cancelUsersTask(){this.tasks.users&&this.tasks.users.promise.cancel()}cancelActiveTasks(){for(let e in this.tasks)this.tasks.hasOwnProperty(e)}getPlayerIds(e){const i=new ie.List,r=e.tables.filter(s=>s.state!==Ve.ETableState.Ended);return r.length&&r.forEach(s=>s.seats.forEach(a=>{a.player?i.add(a.player.id):a.reserved&&i.add(a.reserved.id)})),i}getModuleByRoomType(e){switch(e){case Jt.RoomType.Custom:return bq.CustomGames;case Jt.RoomType.BlitzTournament:return bq.CustomBlitzTournaments;default:return bq.CustomGames}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oj),g(J),g(oo),g(pi),g(Dt),g(Zt),g(Qt),g(El),g(Pi),g(Au),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["custom-games-invite-popup"]],inputs:{viewModel:"viewModel"},outputs:{close:"close"},decls:7,vars:12,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"cg-invite-popup__tab-container",3,"initialOpenedTab","showBackButton","scrollStyleCustomClass","scrollBarCustomClass"],[3,"tabId","class","select",4,"ngFor","ngForOf"],["class","cg-invite-popup__content-section",4,"ngIf"],["class","cg-invite-popup__content-section share",4,"ngIf"],[3,"tabId","select"],[1,"invite-page__list-item--navigation",3,"bclass","flatButton","icon","buttonModifier"],[1,"cg-invite-popup__content-section"],[1,"cg-invite-popup__search-bar"],[3,"customInputCssClass","searchBarPlaceholder","clearFilters","filterAction"],[1,"cg-invite-popup__player-section"],[3,"transparentBG",4,"ngIf"],["class","cg-invite-popup__users-list",3,"type","listUsers","shownUsersCount","totalListLength","searchedUser","configListUsers",4,"ngIf"],["class","cg-invite-popup__browse--clubs",3,"buttonModifier","onClick",4,"ngIf"],[3,"transparentBG"],[1,"cg-invite-popup__users-list",3,"type","listUsers","shownUsersCount","totalListLength","searchedUser","configListUsers"],["slot","user-label"],["userLabel",""],["buttons",""],["class","cg-invite-popup__current-game",3,"currentGame",4,"ngIf"],[1,"cg-invite-popup__current-game",3,"currentGame"],["class","cg-invite-popup__add-button",3,"buttonModifier","disabled","loading","icon","onClick",4,"ngIf"],["class","cg-invite-popup__play-icon",3,"icon",4,"ngIf"],[1,"cg-invite-popup__add-button",3,"buttonModifier","disabled","loading","icon","onClick"],[1,"cg-invite-popup__play-icon",3,"icon"],[1,"cg-invite-popup__browse--clubs",3,"buttonModifier","onClick"],[1,"cg-invite-popup__content-section","share"],[1,"cg-invite-popup__content-share-inner"],[1,"cg-invite-popup__share-text",3,"innerHtml"],[1,"cg-invite-popup__room-code-section"],[1,"cg-invite-popup__room-code-label"],[1,"cg-invite-popup__room-code-input",3,"nativeAttr","placeholder"],[1,"cg-invite-popup__share-buttons"],[1,"cg-invite-popup__share-button",3,"copy-color","text","shareMethod"],[1,"cg-invite-popup__share-button",3,"bclass","icon","buttonModifier","onClick"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closePopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closePopup()}),m(),p(2,"top-tabs",2),U(3,$qt,2,8,"top-tab-item",3),m(),U(4,oWt,7,5,"div",4)(5,sWt,15,23,"div",5)(6,aWt,9,13,"div",5),m()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popup.containerOptions),d(),l("popupTitleType",i.popup.titleType)("text",i.tabs.current.text),d(),l("initialOpenedTab",i.tabs.current.id)("showBackButton",!1)("scrollStyleCustomClass","invite-page__top-tabs__scroll")("scrollBarCustomClass","invite-page__top-tabs__scrollbar"),d(),l("ngForOf",i.tabs.list),d(),l("ngIf",i.tabs.current.id===i.enums.tabs.ETabId.RecentlyPlayed||i.tabs.current.id===i.enums.tabs.ETabId.Friends||i.tabs.current.id===i.enums.tabs.ETabId.ClubMembers),d(),l("ngIf",i.tabs.current.id===i.enums.tabs.ETabId.Share),d(),l("ngIf",i.tabs.current.id===i.enums.tabs.ETabId.ClubShare))},dependencies:[Mt,Ne,kl,dl,Dn,mv,R0,bM,pf,pn,ei,so,Ji,Wi,Oi,il,qe,Ta],styles:[".cg-invite-popup__tab-container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;width:100%;height:4rem;margin:0 auto;margin-top:1rem}.cg-invite-popup__icon-tab[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:30%;height:100%}.cg-invite-popup__add-button[_ngcontent-%COMP%]{min-width:7rem}.cg-invite-popup__play-icon[_ngcontent-%COMP%]{font-size:3rem}.cg-invite-popup__content-section[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:55vh}.cg-invite-popup__content-section.share[_ngcontent-%COMP%]{height:auto}.cg-invite-popup__content-share-inner[_ngcontent-%COMP%]{width:80%;margin:0 auto;text-align:center}@media screen and (max-width: 320px){.cg-invite-popup__content-share-inner[_ngcontent-%COMP%]{width:90%}}@media screen and (max-height: 568px) and (orientation: landscape){.cg-invite-popup__content-share-inner[_ngcontent-%COMP%]{height:55vh}}.cg-invite-popup__share-text[_ngcontent-%COMP%]{padding-top:10%;font-size:2.2rem;font-weight:400;text-align:center}@media screen and (max-width: 568px){.cg-invite-popup__share-text[_ngcontent-%COMP%]{font-size:2rem}}.cg-invite-popup__room-code-label[_ngcontent-%COMP%]{font-size:2.2rem;font-weight:600;text-align:center;width:100%;padding-bottom:5%}@media screen and (max-width: 568px){.cg-invite-popup__room-code-label[_ngcontent-%COMP%]{font-size:2rem}}.cg-invite-popup__room-code-section[_ngcontent-%COMP%]{padding-top:10%}.cg-invite-popup__room-code-input[_ngcontent-%COMP%]{font-weight:600;text-align:center}@media only screen and (max-width: 768px){.cg-invite-popup__room-code-input[_ngcontent-%COMP%]{height:4rem!important}}.cg-invite-popup__share-buttons[_ngcontent-%COMP%]{padding-top:5%;padding-bottom:10%;display:flex;justify-content:space-between}@media screen and (max-width: 568px){.cg-invite-popup__share-buttons[_ngcontent-%COMP%]{display:inline-flex;flex-flow:column;align-items:center;min-width:60%}.cg-invite-popup__share-buttons[_ngcontent-%COMP%]   .cg-invite-popup__share-button[_ngcontent-%COMP%]{width:100%;min-width:60%;margin:0}.cg-invite-popup__share-buttons[_ngcontent-%COMP%]   .cg-invite-popup__share-button[_ngcontent-%COMP%]:not(:first-child){margin-top:5%}}.cg-invite-popup__share-button[_ngcontent-%COMP%]{margin:0 .5rem;flex:1}.cg-invite-popup__users-list[_ngcontent-%COMP%]{margin:0;width:100%}.cg-invite-popup__search-bar[_ngcontent-%COMP%]{height:4rem;width:90%;margin:2rem auto 0}.cg-invite-popup__player-section[_ngcontent-%COMP%]{width:100%;margin:0;position:relative;height:calc(100% - 6rem)}.cg-invite-popup__current-game[_ngcontent-%COMP%]{margin-top:.5rem}.cg-invite-popup__browse--clubs[_ngcontent-%COMP%]{padding:0 2rem;position:absolute;bottom:2rem;width:100%}@media only screen and (max-width: 320px){.cg-invite-popup__browse--clubs[_ngcontent-%COMP%]{padding:0 .5rem}}"]}),n})();const cWt=()=>({key:"CUSTOM_GAMES.JOIN_GAME"});let Z1e=(()=>{var t;class n{constructor(e,i){this.EPopupTitleType=li,this.playClientService=e,this.close=new ke,this.response=new ke,this.popupContainerOptions={styleProperties:{maxWidth:"40rem",height:"auto",maxHeight:"98%"},customComponentCssClass:"cg-join-popup__popup-container"},this.joinButton={type:ve.EButtonModifier.BUTTON_ATTENTION,loading:!1},this.form=i.group({roomCodeInput:["",Ln.required]}),this.input=this.form.controls.roomCodeInput,this.error={key:""}}ngOnDestroy(){this.cancelAsyncTask()}cancelAsyncTask(){this.asyncTask&&this.asyncTask.cancel()}closePopup(){this.close.emit(),this.cancelAsyncTask()}join(){var e=this;return f(function*(){const i=e.input.value;if(!i||""===i)return;const r=e.playClientService.getPlayClient(e.game);if(r)try{e.asyncTask=new Jn(r.getRoomByCode({roomCode:i},1e4)),e.joinButton.loading=!0;const s=yield e.asyncTask;e.response.emit({room:s,roomCode:i}),e.closePopup()}catch(s){s instanceof lt.NetworkError?e.error={key:"ERRORS.CONNECTION_ERROR"}:s instanceof Cr||(e.error={key:"CUSTOM_GAMES.ROOM_CODE_ERROR"}),console.warn(s)}finally{e.joinButton.loading=!1}})()}onInputChange(){this.error.key=""}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oo),g(td))},t.\u0275cmp=pe({type:t,selectors:[["join-room-popup"]],inputs:{game:"game"},outputs:{close:"close",response:"response"},decls:13,vars:19,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"cg-join-popup__content-section"],[1,"cg-join-popup__room-code-label"],["novalidate","",3,"formGroup","submit"],[1,"cg-join-popup__input-wrapper"],["formControlName","roomCodeInput",1,"cg-join-popup__room-code-input",3,"placeholder","errorMessage","onClear","onChange"],[1,"cg-join-popup__join-button",3,"type","buttonModifier","loading"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closePopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closePopup()}),m(),p(2,"div",2)(3,"p",3),H(4),V(5,"translate"),m(),p(6,"form",4),Y("submit",function(){return i.join()}),p(7,"div",5)(8,"user-input",6),Y("onClear",function(){return i.onInputChange()})("onChange",function(){return i.onInputChange()}),V(9,"translate"),m()(),p(10,"button-text",7),H(11),V(12,"translate"),m()()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.EPopupTitleType.Static)("text",pt(18,cWt)),d(3),se($(5,12,"CUSTOM_GAMES.ENTER_ROOM_CODE")),d(2),l("formGroup",i.form),d(2),l("placeholder","")("errorMessage",$(9,14,i.error.key)),d(2),l("type","submit")("buttonModifier",i.joinButton.type)("loading",i.joinButton.loading),d(),ze(" ",$(12,16,"CUSTOM_GAMES.JOIN")," "))},dependencies:[pn,Ji,Wi,il,Su,Ql,yu,wl,Yl,qe],styles:[".cg-join-popup__room-code-label[_ngcontent-%COMP%]{font-size:2.2rem;font-weight:600;text-align:center;width:100%;padding:5% 0}@media screen and (max-width: 568px){.cg-join-popup__room-code-label[_ngcontent-%COMP%]{font-size:2rem}}.cg-join-popup__room-code-input[_ngcontent-%COMP%]{font-weight:600;text-align:center}.cg-join-popup__join-button[_ngcontent-%COMP%]{margin:10% auto;width:45%}.cg-join-popup__input-wrapper[_ngcontent-%COMP%]{width:80%;margin:auto}"]}),n})();var lWt=ve.EButtonModifier;function uWt(t,n){if(1&t){const o=Ce();p(0,"div",4)(1,"form-builder",5),Y("onOptionSelect",function(i){return oe(o),re(_().onSettingSelect(i))}),m()()}if(2&t){const o=_();d(),l("config",o.filterOptions)}}function dWt(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"div",7)(2,"button-text",8),Y("onClick",function(){return oe(o),re(_().filterRooms())}),H(3),V(4,"translate"),m()(),p(5,"div",7)(6,"button-text",9),Y("onClick",function(){return oe(o),re(_().resetFilters())}),H(7),V(8,"translate"),m()()()}if(2&t){const o=_();d(2),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("disabled",!o.filtersState.dirtyForm),d(),ze("",$(4,6,"TEXT.FILTER")," "),d(3),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("disabled",!o.filtersState.dirtyForm&&!o.filtersState.appliedFilters),d(),ze("",$(8,8,"TEXT.RESET")," ")}}const pWt=()=>({key:"TEXT.FILTER"});let Q1e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.gamesStateService=e,this.deviceService=u,this.appService=h,this.popupTitleTypes=li,this.buttonModifier=lWt,this.dismissClick=b=>{b.target.classList.contains("cg__wrapper--settings")&&this.closeOptionsPopup()},this.translate=a,this.optionsService=r,this.toast=i,this.formValidator=new Si.FormValidator,this.close=new ke,this.filter=new ke,this.popupContainerOptions={styleProperties:{width:"38rem",minHeight:"18rem"},customComponentCssClass:"filter--popup--cmp-class"+(this.deviceService.browser===ha.SAFARI||this.appService.getPlatform()===Ut.Ios?" ios":"")},this.optionsConfig=Qu()(e.getCurrentGameRelatedConfig().matchmaking.customGames.customSettings),this.filterOptions=Qu()(e.getCurrentGameRelatedConfig().matchmaking.customGames.customSettingsFilter),this.cdr=s,this.store=c}ngOnInit(){this.selectedFilters?(this.options=this.selectedFilters,this.filtersState={dirtyForm:!0,appliedFilters:!0}):(this.options=[],this.filtersState={dirtyForm:!1,appliedFilters:!1}),this.optionsConfig=this.optionsService.excludeInventoryItemOptions(this.optionsConfig),this.buildFilterOptions(),this.addDismissClickListener()}ngOnDestroy(){this.close.unsubscribe(),this.filter.unsubscribe(),window.removeEventListener("click",this.dismissClick)}closeOptionsPopup(){this.close.emit(!1)}buildFilterOptions(){const e=this.translate.instant("CUSTOM_GAMES.FILTER_OPTIONS");this.filterOptions=Qu()(this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.customGames.customSettingsFilter),this.filterOptions.forEach(a=>{if(a.type!==Si.FieldType.Info){let c=this.options.find(h=>h.id===a.id);!a.options.find(h=>null===h.value)&&!a.masterFieldId&&a.options.unshift({value:null}),a.defaultValue=c?{value:c.value}:{value:null}}e.hasOwnProperty(a.id)&&(a.label="CUSTOM_GAMES.FILTER_OPTIONS.".concat(a.id))});let i={id:"friends",label:"CUSTOM_GAMES.OPTIONS.requirements.onlyFriends",type:Si.FieldType.Picker,format:Si.EFormat.Text,order:0,options:[{value:uy.All},{value:uy.FriendHostsOnly},{value:uy.OnlyWithFriends}]},r=this.options.find(a=>"friends"===a.id);r&&(i.defaultValue={value:r.value});const s=this.filterOptions.find(a=>"requirements.clubRoom"===a.id);if(s){const a=s.options.findIndex(c=>c.value===wD.ShowMine);!this.store.clubs.selectClubProfile()&&a&&s.options.splice(a,1)}this.filterOptions.push(i)}onSettingSelect(e){this.options=e.filter(r=>!!this.filterOptions.find(s=>s.id===r.id&&!1!==s.isVisible));let i=!0;e.forEach(r=>{"roomState"===r.id?r.value!==u1.All&&(i=!1):null!==r.value&&(i=!1)}),this.filtersState.dirtyForm=!i}addDismissClickListener(){window.addEventListener("click",this.dismissClick)}filterRooms(){this.filtersState={dirtyForm:!0,appliedFilters:!0},this.filter.emit(this.options),this.closeOptionsPopup()}resetFilters(){this.options=[],this.filterOptions=void 0,this.filtersState={dirtyForm:!1,appliedFilters:!1},this.cdr.detectChanges(),this.buildFilterOptions(),this.filter.emit(this.options)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Zn),g(Dt),g(Ig),g(Re),g(ls),g(J),g(Kl),g(Qt))},t.\u0275cmp=pe({type:t,selectors:[["filters-popup"]],inputs:{selectedFilters:"selectedFilters"},outputs:{close:"close",filter:"filter"},decls:4,vars:7,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],["class","filter-popup__container--options",4,"ngIf"],["class","filter-popup__container--buttons",4,"ngIf"],[1,"filter-popup__container--options"],[3,"config","onOptionSelect"],[1,"filter-popup__container--buttons"],[1,"filter-popup__container--button"],[1,"filter-popup__button--play",3,"buttonModifier","disabled","onClick"],[1,"filter-popup__button--reset",3,"buttonModifier","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closeOptionsPopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closeOptionsPopup()}),m(),U(2,uWt,2,1,"div",2)(3,dWt,9,10,"div",3),m()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Static)("text",pt(6,pWt)),d(),l("ngIf",i.filterOptions),d(),l("ngIf",i.filtersState))},dependencies:[Ne,pn,Ji,Wi,Xd,qe],styles:[".filter-popup__container--reward[_ngcontent-%COMP%]{width:100%;text-align:center;padding:.5rem}.filter-popup__container--reward[_ngcontent-%COMP%]   .filter-popup__text--reward-value[_ngcontent-%COMP%]{position:relative;display:inline-block;font-size:2.4rem;font-weight:600;margin-left:2.4rem;line-height:26px}@media only screen and (max-width: 768px){.filter-popup__container--reward[_ngcontent-%COMP%]   .filter-popup__text--reward-value[_ngcontent-%COMP%]{font-size:2.4rem}}.filter-popup__container--reward[_ngcontent-%COMP%]   .filter-popup__text--reward-label[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-transform:uppercase;text-align:center;line-height:2rem}.filter-popup__container--options[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;margin:0 auto;padding:.5rem;width:96%;height:calc(100% - 13rem)}@media only screen and (max-height: 768px){.filter-popup__container--options[_ngcontent-%COMP%]{height:calc(100% - 11rem)}}@media only screen and (max-height: 480px){.filter-popup__container--options[_ngcontent-%COMP%]{padding:0 .5rem}}@media only screen and (max-height: 360px){.filter-popup__container--options[_ngcontent-%COMP%]{height:calc(100% - 11rem)}}.filter-popup__container--options[_ngcontent-%COMP%]   .filter-popup__container--options-scroll[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;height:auto;min-height:100%}.filter-popup__container--options[_ngcontent-%COMP%]   .filter-popup__container--options-scroll[_ngcontent-%COMP%]   .filter-popup__container--single-option[_ngcontent-%COMP%]{position:relative;margin-top:3%}@media only screen and (max-height: 480px){.filter-popup__container--options[_ngcontent-%COMP%]   .filter-popup__container--options-scroll[_ngcontent-%COMP%]   .filter-popup__container--single-option[_ngcontent-%COMP%]{margin-top:0}}.filter-popup__container--options[_ngcontent-%COMP%]   .filter-popup__container--options-scroll[_ngcontent-%COMP%]   .filter-popup__container--single-option[_ngcontent-%COMP%]   .filter-popup__cover--inactive-option[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.filter-popup__container--buttons[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.filter-popup__container--button[_ngcontent-%COMP%]{flex:1;padding:2rem 0}@media only screen and (max-height: 768px){.filter-popup__container--button[_ngcontent-%COMP%]{padding:.5rem 0}}@media only screen and (max-height: 360px){.filter-popup__container--button[_ngcontent-%COMP%]{padding:0}}@media only screen and (max-height: 360px){.filter-popup__container--button[_ngcontent-%COMP%]{padding:.5rem 0}}.filter-popup__button--play[_ngcontent-%COMP%], .filter-popup__button--reset[_ngcontent-%COMP%]{width:80%}.filter-popup__container--close[_ngcontent-%COMP%]{position:absolute;top:.5rem;right:.5rem}.filter-popup__container--toggle[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;margin:0 0 0 .5rem;padding:.5rem 0}.filter-popup__container--toggle[_ngcontent-%COMP%]   .filter-popup__text--toggle-label[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;font-weight:600;text-transform:uppercase;margin-left:3rem}@media only screen and (max-width: 768px){.filter-popup__container--toggle[_ngcontent-%COMP%]   .filter-popup__text--toggle-label[_ngcontent-%COMP%]{font-size:1.4rem;width:13rem}}.filter-popup__container--toggle-label[_ngcontent-%COMP%]{flex:1}.cr__container--toggle-button[_ngcontent-%COMP%]{width:7rem}.disabledOption[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;filter:blur(1px)}"]}),n})();var gO=ve.EIcons,dy=ve.EButtonModifier,hWt=et.NotEnoughMinerals,Y1e=et.Timeout;const mWt=["roomsContainer"],fWt=["pullRefresh"],gWt=["newRooms"],_Wt=["selectedRoomComponent"],vWt=["customRoomsQueryList"],Rv=t=>({name:t});function bWt(t,n){if(1&t){const o=Ce();p(0,"button-icon",28),Y("onClick",function(){return oe(o),re(_().clearFilters())}),m()}if(2&t){const o=_();l("buttonModifier",o.buttons.clearFilter.type)("icon",ne(2,Rv,o.buttons.clearFilter.icon))}}const CWt=t=>({expanded:t});function yWt(t,n){if(1&t){const o=Ce();p(0,"custom-games-lobby-room",29,30),Y("select",function(i){const s=oe(o).$implicit;return re(_().showRoomInformation(i,s))})("invite",function(i){return oe(o),re(_().invite(i))}),m()}if(2&t){const o=n.$implicit,e=_();l("ngClass",ne(2,CWt,o===e.selectedRoom))("roomModel",o)}}const SWt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),wWt=t=>[t],TWt=()=>({textKey:"CUSTOM_GAMES.NO_ROOMS"}),PWt=()=>({textKey:"CUSTOM_GAMES.CREATE_FIRST"}),IWt=(t,n)=>[t,n];function MWt(t,n){1&t&&B(0,"empty-content",31),2&t&&l("textArray",_().lobbyViewFlags.hasInitError?ne(2,wWt,pt(1,SWt)):cn(6,IWt,pt(4,TWt),pt(5,PWt)))}const OWt=t=>({centered:t});function EWt(t,n){if(1&t&&(p(0,"div",32),B(1,"spinner-loader",33),m()),2&t){const o=_();l("ngClass",ne(1,OWt,!o.lobbyViewFlags.hasInitError&&o.rooms.list&&0===o.rooms.list.length))}}function xWt(t,n){if(1&t){const o=Ce();p(0,"custom-games-lobby-room",34,35),Y("select",function(i){return oe(o),re(_().showRoomInformation(i))})("invite",function(i){return oe(o),re(_().invite(i))}),m()}if(2&t){const o=_();l("uiState",o.uiStates.Informative)("roomModel",o.selectedRoom)}}function AWt(t,n){if(1&t){const o=Ce();p(0,"game-options",36),Y("close",function(i){return oe(o),re(_().updatePopup("createGame",{visible:i}))})("create",function(i){return oe(o),re(_().createRoom(i))}),m()}}function RWt(t,n){if(1&t){const o=Ce();p(0,"custom-games-invite-popup",37),Y("close",function(){return oe(o),re(_().closeInvite())}),m()}2&t&&l("viewModel",_().popups.invite.viewModel)}function kWt(t,n){if(1&t){const o=Ce();p(0,"filters-popup",38),Y("close",function(i){return oe(o),re(_().updatePopup("filters",{visible:i}))})("filter",function(i){return oe(o),re(_().filterRooms(i))}),m()}2&t&&l("selectedFilters",_().selectedFilters)}function LWt(t,n){if(1&t){const o=Ce();p(0,"join-room-popup",39),Y("close",function(){return oe(o),re(_().updatePopup("join",{visible:!1}))})("response",function(i){return oe(o),re(_().onRoomGetByCode(i))}),m()}2&t&&l("game",_().game)}const DWt=t=>({handler:t}),BWt=t=>({handler:t,outsideZone:!0}),NWt=()=>({key:"CUSTOM_GAMES.NEW_ROOMS"});let J1e=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke){var Ee=this;this.chatService=Me,this.brazeEngagementService=Ke,this.uiStates=Mc,this.onConnectionRestore=f(function*(){try{Ee.showLoader(300),yield Ee.services.customGames.init(Ee.game),Ee.lobbyViewFlags.inited||(Ee.addEventListeners(),Ee.lobbyViewFlags.inited=!0),Ee.lobbyViewFlags.hasInitError=!1,Ee.removeCountdownSubscription(),Ee.pagingState.reset(),Ee.rooms.clear(),Ee.fullList.clear(),Ee.fetchNextRoomsPage(),Ee.hideLoader()}catch(ot){console.log("Custom rooms on connection restore init error",ot),Ee.rooms.clear(),Ee.fullList.clear(),Ee.services.playClient.activeClientModel.currentRoom&&Ee.services.playClient.activeClientModel.currentRoom.type===Jt.RoomType.Custom?Ee.lobbyViewFlags.inited||Ee.tryLeaveRoom():(Ee.hideLoader(),Ee.lobbyViewFlags.inited||(Ee.lobbyViewFlags.hasInitError=!0))}}),this.scrolledToBottomCb=()=>{this.fetchNextRoomsPage()},this.onScrollUp=()=>{this.hideLoader()},this.onRoomListUpdate=ot=>{const ct=this.createListUpdCmd({type:Fr.EUpdate.RoomsReceived,rooms:ot});this.rooms.processUpdate(ct),this.fullList.processUpdate(ct),this.customRoomsQueryList&&this.rooms.list.forEach(Pt=>{const gn=this.findRoomComponent(Pt.id);gn&&gn.onRoomUpdate(Pt)})},this.onRoomCreate=ot=>{if(this.rooms.list.findById(ot.id))this.onRoomUpdate(ot);else if(ot.state!==Ve.ERoomState.Rematch&&!this.services.customGames.isIdInPlayerBlockList(this.userMeId,ot)){const gn=this.rooms.list.length;if(this.rooms.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemAdded,item:ot})),this.isPlayerInRoom(this.userMeId,ot)){this.scrollToTop();const Je=this.findRoomComponent(ot.id);Je&&this.addCountdownListener(Je)}else gn&&!this.rooms.checkIfRoomFiltered(ot)&&(this.newRooms.show(),this.notification.currentState=ip.EState.Show)}this.fullList.list.findById(ot.id)?this.onRoomUpdate(ot):this.services.customGames.isIdInPlayerBlockList(this.userMeId,ot)||this.fullList.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemAdded,item:ot}))},this.onRoomUpdate=ot=>{const ct=this.rooms.list.findById(ot.id);if(ct){const gn=this.findRoomComponent(ot.id),qt=lo.updateModel(ot,ct);gn&&(gn.onRoomUpdate(qt),this.isPlayerInRoom(this.userMeId,qt)&&this.addCountdownListener(gn)),this.rooms.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemModelUpdate,item:ot,change:{previousValue:ct,currentValue:qt}}))}const Pt=this.fullList.list.findById(ot.id);if(Pt){const gn=void 0!==Pt.tables[0].seats.find(qt=>null!=qt.player);this.fullList.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemModelUpdate,item:ot,change:{previousValue:Pt,currentValue:lo.updateModel(ot,Pt)}})),!ct&&!gn&&void 0!==Pt.tables[0].seats.find(qt=>null!=qt.player)&&this.onRoomCreate(Pt)}this.selectedRoomComponent&&this.selectedRoom&&this.selectedRoom===ct&&this.selectedRoomComponent.onRoomUpdate(this.selectedRoom)},this.timerTickHandler=ot=>{ot<=4&&this.closeLeavePopup()},this.onPlayerKicked=ot=>{this.removeCountdownSubscription(),this.objectIds.infoPopup=this.services.popup.show("CUSTOM_GAMES.OWNER_REMOVED_YOU"),this.showRoomInformation(!1);const ct=this.createListUpdCmd({type:Fr.EUpdate.PlayerKicked,item:{id:ot}});this.rooms.processUpdate(ct),this.fullList.processUpdate(ct)},this.onRoomDestroy=ot=>{const ct=this.rooms.list.findById(ot);if(ct){if(this.isPlayerInRoom(this.userMeId,ct))this.removeCountdownSubscription(),this.showRoomInformation(!1),this.currentPlayerRoom&&this.currentPlayerRoom.id===ct.id&&this.currentPlayerRoom.getViewModel().hostId!==this.userMeId&&(this.objectIds.infoPopup=this.services.popup.show("CUSTOM_GAMES.ROOM_DESTROYED"));else{const gn=this.findRoomComponent(ct.id);gn&&gn.setInteractable(!1)}this.rooms.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemDeleted,item:ct}))}const Pt=this.fullList.list.findById(ot);Pt&&this.fullList.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemDeleted,item:Pt})),this.selectedRoomComponent&&this.selectedRoom&&this.selectedRoom===ct&&(this.selectedRoomComponent.setInteractable(!1),this.selectedRoomComponent.onRoomUpdate(this.selectedRoom))},this.onStateChange=ot=>{this.currentPlayerRoom?ot.data.currentRoom&&ot.data.currentRoom.type===Jt.RoomType.Custom?this.currentPlayerRoom.id!==ot.data.currentRoom.id&&this.onPlayerNewRoom(ot.data.currentRoom):(this.currentPlayerRoom=void 0,this.closeInvite()):ot.data.currentRoom&&ot.data.currentRoom.type===Jt.RoomType.Custom&&this.onPlayerNewRoom(ot.data.currentRoom)},this.onClientRoomDispose=(ot,ct)=>{if(ct.reason===io.ActionTimeout){const Pt=this.rooms.list.findById(ot);Pt&&this.rooms.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemDeleted,item:Pt}));const gn=this.fullList.list.findById(ot);gn&&this.fullList.processUpdate(this.createListUpdCmd({type:Fr.EUpdate.ItemDeleted,item:gn}))}ct.reason===io.WaitingTimeout&&this.services.popup.show("CUSTOM_GAMES.ROOM_DESTROYED")},this.services={appState:r,deltaDNAService:le,customGames:i,navigation:u,play:h,playClient:void 0,popup:c,toaster:s,gamesState:b,route:w,time:R,url:G,lobbyGrid:K,store:a,offerService:ge},this.tutorials=e,this.analyticsTrackingService=te,this.contextTreeService=ee,this.popups={createGame:{visible:!1},join:{visible:!1},invite:{visible:!1,viewModel:void 0},filters:{visible:!1,appliedFilters:!1}},this.buttons={createGame:{type:dy.BUTTON_ATTENTION,icon:gO.PLUS},joinGame:{type:dy.BUTTON_ACTION,icon:gO.JOIN_GAME},refresh:{type:dy.BUTTON_SORT,icon:gO.SORT},filter:{type:dy.BUTTON_ACTION,icon:gO.Filter},clearFilter:{type:dy.BUTTON_NEGATIVE,icon:gO.CLOSE}},this.userMeId=a.selectUserState().profile.id,this.listeners=new ie.List,this.lobbyViewFlags={inited:!1,hasInitError:!1,loaderVisible:!1,isRoomSelected:!1},this.objectIds={},this.pagingState=new kqt(me.getCurrentGameRelatedConfig().matchmaking.customGames.nextPageTimeInterval/1e3),this.notification={currentState:ip.EState.Hide},this.rooms=new Fr(new Bqt(this.services.store,[{id:"roomState",value:u1.All}])),this.fullList=new Fr(new W1e(this.services.store))}ngOnInit(){this.services.deltaDNAService.customLobbyOpenedEngage(this.services.gamesState.getCurrentGameState().id),this.brazeEngagementService.customLobbyOpenedEngage(this.services.gamesState.getCurrentGameState().id),this.init(),this.routeChangeSubscription=this.services.route.parent.params.subscribe(e=>{this.game!==e.gameId&&(this.dispose(),this.init())})}init(){var e=this;return f(function*(){e.pagingState.reset(),e.game=e.services.gamesState.getCurrentGameState().id,e.navBarContent=e.services.lobbyGrid.isSinglePlatform()?{type:Ru.EContent.Text,data:{key:"LOBBY.ROOM_NAMES.CUSTOM_V6"}}:{type:Ru.EContent.Image,data:{imgUrl:e.services.url.getImageUrl("platform-logos/".concat(e.game,".svg"))}},e.services.playClient=e.services.play.getPlayClient(e.game),e.listeners.add(e.services.play.stateEvents.onStateTransition(e.onStateChange));try{e.showLoader(300),e.services.appState.subscribe(co.ConnectionRestored,e.onConnectionRestore),yield e.services.customGames.init(e.game),e.addEventListeners(),e.fetchNextRoomsPage(),e.lobbyViewFlags.inited=!0,e.lobbyViewFlags.hasInitError=!1,e.hideLoader(),e.requestTutorialIfReady()}catch(i){console.error("Custom games init error",i),e.services.playClient.activeClientModel.currentRoom&&e.services.playClient.activeClientModel.currentRoom.type===Jt.RoomType.Custom?e.tryLeaveRoom():(e.hideLoader(),e.lobbyViewFlags.hasInitError=!0)}})()}ngOnDestroy(){this.routeChangeSubscription&&this.routeChangeSubscription.unsubscribe(),this.dispose(),this.tutorials.onTutorialComponentDestroy(this,Ms.CustomRoom)}dispose(){this.rooms.clear(),this.fullList.clear(),this.listeners.forEach(e=>e.detach()),this.listeners=new ie.List,cancelAnimationFrame(this.objectIds.scrollToTopRaf),this.removeCountdownSubscription(),this.removeEventListeners(),this.services.customGames.dispose(),this.closeLeavePopup(),this.services.popup.hide(this.objectIds.infoPopup),clearTimeout(this.objectIds.roomAddDelay)}requestTutorialIfReady(){this.lobbyViewFlags.inited&&!this.lobbyViewFlags.hasInitError&&this.tutorials.requestTutorial({cmp:this,group:Ms.CustomRoom})}createRoom(e){var i=this;return f(function*(){const r=i.services.playClient.activeClientModel.currentRoom,s=r&&r.getViewModel().state===Ve.ERoomState.Ready;if(i.services.customGames.checkIfActionInProgress()||s)i.services.toaster.warn("CUSTOM_GAMES.WAIT");else if(i.lobbyViewFlags.hasInitError&&i.services.toaster.error("ERRORS.CONNECTION_ERROR"),r){const a=function(){var u=f(function*(){try{const h=i.services.playClient.activeClientModel.currentRoom;h&&h.getViewModel().state!==Ve.ERoomState.Ready&&h.getViewModel().state!==Ve.ERoomState.Rematch&&(yield i.services.customGames.leaveRoom(),i.tryCreateRoom(e))}catch(h){console.log("Create game error",h)}});return function(){return u.apply(this,arguments)}}(),c=r.getViewModel().hostId===i.userMeId?"DESTROY_ROOM":"LEAVE_ROOM";i.openLeaveRoomPopup(a,{key:"CUSTOM_GAMES.".concat(c)})}else i.tryCreateRoom(e)})()}tryCreateRoom(e){var i=this;return f(function*(){try{i.onRoomCreate(yield i.services.customGames.createRoom(e));const r=new Jc.DefaultEvent(Nn.Game,i.services.customGames.getOptionValueById(e,"requirements.clubRoom")?"host club":"hosted",i.contextTreeService.getContext());i.analyticsTrackingService.sendEvent(r)}catch(r){r instanceof hWt?i.services.offerService.offerCurrency({targetValue:r.targetAmount,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}}):r instanceof Av?i.objectIds.infoPopup=i.services.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]}):r instanceof xv?i.objectIds.infoPopup=i.services.popup.show("POPUP.RESTRICT_LEVEL_MESSAGE",[r.level]):r instanceof Y1e?i.services.toaster.warn("ERRORS.SOMETHING_WRONG"):r instanceof lt.NetworkError?i.services.toaster.error("ERRORS.CONNECTION_ERROR"):i.services.toaster.warn("ERRORS.SOMETHING_WRONG"),console.log("Create game error",r)}})()}leave(e,i){var r=this;const s=function(){var c=f(function*(){try{const u=r.services.playClient.activeClientModel.currentRoom&&r.services.playClient.activeClientModel.currentRoom.type===Jt.RoomType.Custom?r.services.playClient.activeClientModel.currentRoom:void 0;u&&u.getViewModel().state!==Ve.ERoomState.Ready&&u.getViewModel().state!==Ve.ERoomState.Rematch&&(yield r.services.customGames.leaveRoom(),r.removeCountdownSubscription(),i&&r.services.navigation.navigate([i]))}catch(u){u instanceof Y1e&&r.services.toaster.error("ERRORS.CONNECTION_ERROR")}});return function(){return c.apply(this,arguments)}}();this.openLeaveRoomPopup(s,{key:"CUSTOM_GAMES.".concat(e.hostId===this.userMeId?"DESTROY_ROOM":"LEAVE_ROOM")})}openFilters(){this.popups.filters={visible:!0,appliedFilters:this.popups.filters.appliedFilters}}clearFilters(){this.popups.filters={visible:!1,appliedFilters:!1},this.filterRooms([])}filterRooms(e){if(this.selectedFilters=e.length>0?e:void 0,this.popups.filters.appliedFilters=e.length>0,this.buttons.filter.type=this.popups.filters.appliedFilters?dy.BUTTON_ATTENTION:dy.BUTTON_ACTION,this.rooms.setFilters(e,this.userMeId),this.lobbyViewFlags.inited){const i=this.createListUpdCmd({type:Fr.EUpdate.Refresh});this.fullList.processUpdate(i),this.rooms.clear(),this.rooms.list=new ie.UniqueList(this.fullList.list.toArray()),this.rooms.processUpdate(i),this.newRooms.hide(),this.notification.currentState=ip.EState.Hide}}invite(e){this.updatePopup("invite",{visible:!0,viewModel:{room:e.room,seatId:e.seat.id}})}closeInvite(){this.updatePopup("invite",{visible:!1,viewModel:void 0})}start(){var e=this;return f(function*(){const i=e.services.playClient.activeClientModel.currentRoom,r=i&&i.getViewModel().state===Ve.ERoomState.Ready;if(e.services.customGames.checkIfActionInProgress()||r)e.services.toaster.warn("CUSTOM_GAMES.WAIT");else try{yield e.services.customGames.startRoom()}catch(s){console.log("Start game error",s),s instanceof lt.NetworkError?e.services.toaster.error("ERRORS.CONNECTION_ERROR"):e.services.toaster.warn("ERRORS.SOMETHING_WRONG")}})()}onComponentLeaveUrl(e){const i=this.services.playClient.activeClientModel.currentRoom&&this.services.playClient.activeClientModel.currentRoom.type===Jt.RoomType.Custom?this.services.playClient.activeClientModel.currentRoom:void 0,r=i&&i.getViewModel().state===Ve.ERoomState.Ready;return i?!(e!=="/".concat(Xs.gameRoute)||!i.currentTable||!i.currentTable.state||!i.currentTable.state.is(Ve.ETableState.Ready)&&!i.currentTable.state.is(Ve.ETableState.Gameplay))||(this.services.customGames.checkIfActionInProgress()||r?(this.services.toaster.warn("CUSTOM_GAMES.WAIT"),!1):(this.leave(i.getViewModel(),e),!1)):!this.services.customGames.checkIfActionInProgress()&&!r||(this.services.toaster.warn("CUSTOM_GAMES.WAIT"),!1)}tryLeaveRoom(){var e=this;return f(function*(){try{e.showLoader(),yield e.services.customGames.leaveRoom(),e.removeCountdownSubscription(),e.lobbyViewFlags.hasInitError=!1===e.lobbyViewFlags.inited}catch(i){console.log("Try leave room error",i)}finally{e.hideLoader()}})()}updatePopup(e,i){for(let r in i)i.hasOwnProperty(r)&&(this.popups[e][r]=i[r],"createGame"===e&&"visible"===r&&!1===this.popups.createGame.visible&&this.tutorials.onTutorialComponentDestroy(this,Ms.CustomRoom),"visible"===r&&i[r]&&this.chatService.closeIfOverlapping())}showRoomInformation(e,i){if(this.lobbyViewFlags.isRoomSelected=e,e)this.selectedRoom=i;else if(this.selectedRoom){const r=this.findRoomComponent(this.selectedRoom.id);r&&r.room.changeUIState(Mc.Default,!0),this.selectedRoom=void 0}}roomsTrackBy(e,i){return i.id}refresh(){const e=this.createListUpdCmd({type:Fr.EUpdate.Refresh});this.fullList.processUpdate(e),this.rooms.clear(),this.rooms.list=new ie.UniqueList(this.fullList.list.toArray()),this.rooms.processUpdate(e),this.newRooms.hide(),this.notification.currentState=ip.EState.Hide,this.pullRefresh.setRefreshing(!1)}onRoomGetByCode(e){const i={...e.room,invitationCode:e.roomCode};this.rooms.list.tryAdd(i),this.onRoomCreate(i),this.onRoomUpdate(i),this.objectIds.roomAddDelay=setTimeout(()=>{let r=this.findRoomComponent(e.room.id);r&&(r.openInformativeView(),r.unlockRoom(),this.objectIds.roomAddDelay=setTimeout(()=>{this.selectedRoomComponent&&this.selectedRoom&&this.selectedRoom.id===i.id&&this.selectedRoomComponent.unlockRoom()}))})}fetchNextRoomsPage(){var e=this;return f(function*(){if(!e.pagingState.isRequestingPage)try{e.pagingState.isRequestingPage=!0,yield e.services.customGames.getRooms(e.pagingState.toRequestArgs()),e.pagingState.setNextPageAsCurrent()}catch(i){console.warn("Get next page error",i)}finally{e.pagingState.isRequestingPage=!1}})()}scrollToTop(){this.objectIds.scrollToTopRaf=requestAnimationFrame(()=>{this.roomsContainer&&this.roomsContainer.nativeElement&&(this.roomsContainer.nativeElement.scrollTop=0)})}addEventListeners(){this.services.customGames.addRoomUpdateListener(this.onRoomUpdate),this.services.customGames.addRoomCreateListener(this.onRoomCreate),this.services.customGames.addRoomDestroyListener(this.onRoomDestroy),this.services.customGames.addRoomListListener(this.onRoomListUpdate)}removeEventListeners(){this.services.appState.unsubscribe(co.ConnectionRestored,this.onConnectionRestore),this.services.customGames.removeRoomUpdateListener(this.onRoomUpdate),this.services.customGames.removeRoomCreateListener(this.onRoomCreate),this.services.customGames.removeRoomDestroyListener(this.onRoomDestroy),this.services.customGames.removeRoomListListener(this.onRoomListUpdate)}addCountdownListener(e){this.countdownSubscription||(this.countdownSubscription=e.room.countdownTimer.timerTick.subscribe(this.timerTickHandler))}removeCountdownSubscription(){this.countdownSubscription&&(this.countdownSubscription.unsubscribe(),this.countdownSubscription=void 0)}onPlayerNewRoom(e){this.currentPlayerRoom=e;const i=this.currentPlayerRoom.onKicked(a=>{a===Ve.ActiveRoomProtocol.EPlayerDisconnectReason.HostBan&&this.onPlayerKicked(e.id)}),r=this.currentPlayerRoom.onDispose(a=>{i.detach(),r.detach(),this.onClientRoomDispose(e.id,a.data)});if(this.listeners.add(i),this.listeners.add(r),this.services.customGames.isIdInPlayerBlockList(this.userMeId,e.getViewModel()))return;const s=this.createListUpdCmd({type:Fr.EUpdate.PlayerJoined,item:e.getViewModel()});this.rooms.processUpdate(s),this.fullList.processUpdate(s),this.scrollToTop()}findRoomComponent(e){if(this.customRoomsQueryList)return this.customRoomsQueryList.find(i=>i.roomModel.id===e)}isPlayerInRoom(e,i){return void 0!==this.getPlayerModelInRoom(e,i)}getPlayerModelInRoom(e,i){let r;return i.tables.forEach(s=>{let a=this.getPlayerSeat(e,s.seats);r=a?a.player?a.player:a.reserved:void 0}),r}getPlayerSeat(e,i){return i.find(r=>r&&(r.player&&r.player.id===e||r.reserved&&r.reserved.id===e))}getCreateButtonDisabled(){return this.services.customGames.checkIfActionInProgress()||void 0!==this.currentPlayerRoom}getJoinButtonDisabled(){return this.services.customGames.checkIfActionInProgress()||void 0!==this.currentPlayerRoom}openLeaveRoomPopup(e,i,r){this.closeLeavePopup(),this.objectIds.leavePopup=this.services.popup.confirm({buttons:{action:e,actionDecline:r},textParams:{translationKey:i.key,params:i.params}})}closeLeavePopup(){this.services.popup.hide(this.objectIds.leavePopup)}createListUpdCmd(e){const i=this.services.playClient.activeClientModel.currentRoom&&this.services.playClient.activeClientModel.currentRoom.type===Jt.RoomType.Custom?this.services.playClient.activeClientModel.currentRoom.getViewModel():void 0;return{type:e.type,currentPlayerId:this.userMeId,currentPlayerRoom:i,...e}}showLoader(e){clearTimeout(this.objectIds.loaderDelay),void 0!==e?this.objectIds.loaderDelay=setTimeout(()=>{this.lobbyViewFlags.loaderVisible=!0},e):this.lobbyViewFlags.loaderVisible=!0}hideLoader(){clearTimeout(this.objectIds.loaderDelay),this.lobbyViewFlags.loaderVisible=!1}}return(t=n).\u0275fac=function(e){return new(e||t)(g(sv),g(ly),g(Sa),g(Dt),g(J),g(Cn),g(Yt),g(oo),g(Zn),g(Po),g(Bn),g(ii),g(O7),g(yi),g(nn),g(sl),g(Zn),g(Sc),g(El),g(cl))},t.\u0275cmp=pe({type:t,selectors:[["custom-games"]],viewQuery:function(e,i){if(1&e&&($e(mWt,5),$e(fWt,5),$e(gWt,5),$e(_Wt,5),$e(vWt,5)),2&e){let r;je(r=He())&&(i.roomsContainer=r.first),je(r=He())&&(i.pullRefresh=r.first),je(r=He())&&(i.newRooms=r.first),je(r=He())&&(i.selectedRoomComponent=r.first),je(r=He())&&(i.customRoomsQueryList=r)}},features:[mn([{provide:nn,useFactory:o=>new nn("customRoom",o),deps:[[new jo,new zo,nn]]},yi])],decls:32,vars:61,consts:[[1,"cg__wrapper"],[3,"content","backLink"],["class","cg__room-filter-clear",3,"buttonModifier","icon","onClick",4,"ngIf"],[1,"cg__room-filter",3,"buttonModifier","icon","onClick"],[1,"cg__container--content"],[3,"refresh"],["pullRefresh",""],["scroll-directive","",1,"cg__container--rooms",3,"onScrolledToBottom","onScrollUp"],["roomsContainer",""],[1,"cg__new-rooms-container"],[3,"initialState","text","onClick"],["newRooms",""],[3,"ngClass","roomModel","select","invite",4,"ngFor","ngForOf","ngForTrackBy"],["class","cg__empty-content",3,"textArray",4,"ngIf"],["class","cg__container-rooms--loader",3,"ngClass",4,"ngIf"],[1,"cg__container-rooms--bottom-element"],[1,"cg__wrapper--create"],["activeCmp","","id","createGameBtn-normal","data-cy","customRoomCreateButton",1,"cg__button",3,"buttonModifier","icon","disabled","onClick"],["activeCmp","","id","createGameBtn-small",1,"cg__button","small",3,"buttonModifier","icon","disabled","onClick"],["activeCmp","","id","joinGameBtn-normal","data-cy","customRoomUnlockButton",1,"cg__button",3,"buttonModifier","icon","disabled","onClick"],["activeCmp","","id","joinGameBtn-small",1,"cg__button","small",3,"buttonModifier","icon","disabled","onClick"],["activeCmp","","id","refreshBtn-normal","data-cy","customRoomRefreshButton",1,"cg__button","refresh",3,"buttonModifier","icon","disabled","onClick"],["activeCmp","","id","refreshBtn-small",1,"cg__button","refresh","small",3,"buttonModifier","icon","disabled","onClick"],["class","expanded",3,"uiState","roomModel","select","invite",4,"ngIf"],[3,"close","create",4,"ngIf"],[3,"viewModel","close",4,"ngIf"],[3,"selectedFilters","close","filter",4,"ngIf"],[3,"game","close","response",4,"ngIf"],[1,"cg__room-filter-clear",3,"buttonModifier","icon","onClick"],[3,"ngClass","roomModel","select","invite"],["customRoomsQueryList",""],[1,"cg__empty-content",3,"textArray"],[1,"cg__container-rooms--loader",3,"ngClass"],[1,"cg__container-rooms--spinner"],[1,"expanded",3,"uiState","roomModel","select","invite"],["selectedRoomComponent",""],[3,"close","create"],[3,"viewModel","close"],[3,"selectedFilters","close","filter"],[3,"game","close","response"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"navigation-bar",1),U(2,bWt,1,4,"button-icon",2),p(3,"button-icon",3),Y("onClick",function(){return i.openFilters()}),m()(),p(4,"div",4)(5,"pull-refresh-component",5,6),Y("refresh",function(){return i.refresh()}),p(7,"div",7,8)(9,"div",9)(10,"new-content-component",10,11),Y("onClick",function(){return i.refresh()}),m()(),U(12,yWt,2,4,"custom-games-lobby-room",12)(13,MWt,1,9,"empty-content",13)(14,EWt,2,3,"div",14),B(15,"div",15),m()(),p(16,"div",16)(17,"button-icon-text",17),Y("onClick",function(){return i.updatePopup("createGame",{visible:!0})}),H(18),V(19,"translate"),m(),p(20,"button-icon",18),Y("onClick",function(){return i.updatePopup("createGame",{visible:!0})}),m(),p(21,"button-icon-text",19),Y("onClick",function(){return i.updatePopup("join",{visible:!0})}),H(22),V(23,"translate"),m(),p(24,"button-icon",20),Y("onClick",function(){return i.updatePopup("join",{visible:!0})}),m(),p(25,"button-icon",21),Y("onClick",function(){return i.refresh()}),m(),p(26,"button-icon",22),Y("onClick",function(){return i.refresh()}),m()()(),U(27,xWt,2,2,"custom-games-lobby-room",23)(28,AWt,1,0,"game-options",24)(29,RWt,1,1,"custom-games-invite-popup",25)(30,kWt,1,1,"filters-popup",26)(31,LWt,1,1,"join-room-popup",27),m()),2&e&&(d(),l("content",i.navBarContent)("backLink","history"),d(),l("ngIf",i.popups.filters.appliedFilters),d(),l("buttonModifier",i.buttons.filter.type)("icon",ne(42,Rv,i.buttons.filter.icon)),d(4),l("onScrolledToBottom",ne(44,DWt,i.scrolledToBottomCb))("onScrollUp",ne(46,BWt,i.onScrollUp)),d(3),l("initialState",i.notification.currentState)("text",pt(48,NWt)),d(2),l("ngForOf",i.rooms.list)("ngForTrackBy",i.roomsTrackBy),d(),l("ngIf",(i.lobbyViewFlags.inited||i.lobbyViewFlags.hasInitError)&&i.rooms.list&&0===i.rooms.list.length&&!i.pagingState.isRequestingPage&&!i.lobbyViewFlags.loaderVisible),d(),l("ngIf",i.lobbyViewFlags.loaderVisible||i.pagingState.isRequestingPage),d(3),l("buttonModifier",i.buttons.createGame.type)("icon",ne(49,Rv,i.buttons.createGame.icon))("disabled",i.getCreateButtonDisabled()||i.lobbyViewFlags.hasInitError),d(),ze(" ",$(19,38,"BUTTON.CREATE_GAME")," "),d(2),l("buttonModifier",i.buttons.createGame.type)("icon",ne(51,Rv,i.buttons.createGame.icon))("disabled",i.getCreateButtonDisabled()||i.lobbyViewFlags.hasInitError),d(),l("buttonModifier",i.buttons.joinGame.type)("icon",ne(53,Rv,i.buttons.joinGame.icon))("disabled",i.getJoinButtonDisabled()||i.lobbyViewFlags.hasInitError),d(),ze(" ",$(23,40,"CUSTOM_GAMES.JOIN_GAME")," "),d(2),l("buttonModifier",i.buttons.joinGame.type)("icon",ne(55,Rv,i.buttons.joinGame.icon))("disabled",i.getJoinButtonDisabled()||i.lobbyViewFlags.hasInitError),d(),l("buttonModifier",i.buttons.refresh.type)("icon",ne(57,Rv,i.buttons.refresh.icon))("disabled",i.lobbyViewFlags.hasInitError),d(),l("buttonModifier",i.buttons.refresh.type)("icon",ne(59,Rv,i.buttons.refresh.icon))("disabled",i.lobbyViewFlags.hasInitError),d(),l("ngIf",i.selectedRoom),d(),l("ngIf",i.popups.createGame.visible),d(),l("ngIf",i.popups.invite.visible),d(),l("ngIf",i.popups.filters.visible),d(),l("ngIf",i.popups.join.visible))},dependencies:[Xe,Mt,Ne,Kh,bo,ei,so,vc,yM,ip,Is,Nm,K1e,q1e,Sq,Z1e,Q1e,qe],styles:[".cg__wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;flex-flow:column nowrap;min-width:32rem}@media only screen and (orientation: portrait){custom-game-room.expanded[_ngcontent-%COMP%]:nth-of-type(1){padding-top:5rem}}navigation-bar[_ngcontent-%COMP%]{transition:transform .3s cubic-bezier(0,.86,.46,1.03);display:block}.cg__container--content[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column nowrap;justify-content:flex-start;align-items:flex-start;height:calc(100% - 5rem)}.cg__container--content[_ngcontent-%COMP%]   .cg__container--rooms[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;display:flex;flex-flow:row wrap;justify-content:center;align-content:flex-start;width:100%;padding-top:1rem;height:100%}.cg__container--content[_ngcontent-%COMP%]   .cg__container--rooms[_ngcontent-%COMP%]   .expanded[_ngcontent-%COMP%]{visibility:hidden}@media only screen and (max-width: 768px) and (min-height: 580px){.cg__container--content[_ngcontent-%COMP%]   .cg__container--rooms[_ngcontent-%COMP%]{flex-flow:column;justify-content:flex-start;align-items:center}}@media only screen and (max-height: 440px){.cg__container--content[_ngcontent-%COMP%]   .cg__container--rooms[_ngcontent-%COMP%]{margin-bottom:0rem}}.cg__wrapper--create[_ngcontent-%COMP%]{position:absolute;display:flex;flex-flow:row wrap;align-items:center;justify-content:center;bottom:0;left:0;width:100%;height:5rem}@media only screen and (max-height: 480px){.cg__wrapper--create[_ngcontent-%COMP%]{height:auto}}@media only screen and (max-width: 568px){.cg__wrapper--create[_ngcontent-%COMP%]{justify-content:space-evenly}}@media only screen and (max-height: 440px){.cg__wrapper--create[_ngcontent-%COMP%]{width:4rem;left:auto;right:0rem}}.cg__empty-content[_ngcontent-%COMP%]{height:calc(100% - 9rem)}@media screen and (max-height: 440px) and (orientation: landscape){.cg__empty-content[_ngcontent-%COMP%]{width:80%;margin:0 auto;display:block;position:relative}}.small-button[_ngcontent-%COMP%], .cg__button.small[_ngcontent-%COMP%], .cg__button.refresh.small[_ngcontent-%COMP%]{display:none;width:3.5rem;min-width:3.5rem;height:3.5rem;margin:.5rem 0;padding:0;font-size:1.8rem}@media only screen and (max-height: 440px){.small-button[_ngcontent-%COMP%], .cg__button.small[_ngcontent-%COMP%], .cg__button.refresh.small[_ngcontent-%COMP%]{display:initial}}.cg__button[_ngcontent-%COMP%]{margin:0 .5rem;min-width:30rem}.cg__button.refresh[_ngcontent-%COMP%]{min-width:5rem;width:5rem}@media screen and (max-width: 568px){.cg__button.refresh[_ngcontent-%COMP%]{flex:initial;min-width:3.5rem}}@media only screen and (max-width: 768px){.cg__button[_ngcontent-%COMP%]{min-width:20rem;margin:-.5rem .25rem 0}}@media screen and (max-width: 568px){.cg__button[_ngcontent-%COMP%]{width:auto;min-width:auto;flex:1 1 0}}@media only screen and (max-height: 440px) and (max-width: 768px) and (orientation: landscape){.cg__button[_ngcontent-%COMP%]{margin:-.8rem 0 1.5rem}}@media only screen and (max-height: 568px){.cg__button[_ngcontent-%COMP%]{margin-top:-1rem}}@media only screen and (max-height: 440px){.cg__button[_ngcontent-%COMP%]{display:none}}.cg__container-rooms--bottom-element[_ngcontent-%COMP%]{height:5rem;min-height:5rem;width:100%}@media only screen and (max-height: 440px){.cg__container-rooms--bottom-element[_ngcontent-%COMP%]{display:none}}.cg__room-filter[_ngcontent-%COMP%]{padding:.25rem;right:.25rem;position:absolute;align-self:center}.cg__room-filter-clear[_ngcontent-%COMP%]{padding:.25rem;right:4.5rem;position:absolute;align-self:center}.cg__new-rooms-container[_ngcontent-%COMP%]{width:100%;height:4rem;flex-shrink:0;display:flex;justify-content:center}.cg__no-rooms-container[_ngcontent-%COMP%]{width:100%;height:100%}.cg__container-rooms--loader[_ngcontent-%COMP%]{height:5rem;display:flex;width:100%;align-items:center;justify-content:center;flex-shrink:0}.cg__container-rooms--loader.centered[_ngcontent-%COMP%]{height:calc(100% - 9rem)}.cg__container-rooms--spinner[_ngcontent-%COMP%]{height:auto;width:4rem;font-size:2rem}"]}),n})(),wq=(()=>{var t;class n{constructor(e,i,r){this.navigation=e,this.permissionsService=i,this.constants=r}canActivate(){return!!this.permissionsService.getActionPermission(nt.EPermissionModule.CustomGames,nt.EModuleAction.Open).isPermitted||!!this.navigation.isFirstNavigation(this.navigation.getCurrentNavigation().previousNavigation)&&this.navigation.parseUrl(this.constants.defaultLoggedRoute)}canDeactivate(e,i,r,s){return!1===this.navigation.isNavigationStoppable(s)||e.onComponentLeaveUrl(this.navigation.getOutletUrl(s))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Yt),T(Ti),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Tq=function(t){return t.featureKey="customGamesLobby",t}(Tq||{}),UWt=lo.updateModel;const py=ki({selectId:t=>t.id,sortComparer:(t,n)=>n.createdAt-t.createdAt}),VWt=Sr({rooms:py.getInitialState(),filters:{}},de(S1e,(t,n)=>({...t,rooms:py.upsertMany(n.rooms,t.rooms)})),de(P1e,(t,n)=>({...t,rooms:py.removeOne(n.roomId,t.rooms)})),de(T1e,(t,n)=>({...t,rooms:py.addOne(n.room,t.rooms)})),de(w1e,(t,n)=>{const o=t.rooms.entities[n.room.id];return o?{...t,rooms:py.updateOne({id:n.room.id,changes:Se(o,e=>{e=UWt(n.room,e)})},t.rooms)}:t}),de(Z7,t=>({...t,rooms:py.removeAll(t.rooms)})),de(Qjt,(t,n)=>({...t,filters:n.filters}))),X1e=Ts(Tq.featureKey),jWt=py.getSelectors(We(X1e,t=>t.rooms)),HWt=We(X1e,t=>t.filters),eTe=()=>We(jWt.selectAll,Ph,(t,n,o)=>{const e=t.filter(i=>i.settings.game.name===o);return e.length>0&&n?e.filter(i=>-1===i.blocklist.indexOf(n.profile.id)):e});J.prototype.customGamesLobby={selectGameLobbyRooms:function qWt(t){return this.selectSync(eTe(),t)}.bind(J.prototype),subscribeGameLobbyRooms:function WWt(t){return this.select(eTe(),t)}.bind(J.prototype),subscribeGameLobbyFilters:function $Wt(){return this.select(HWt)}.bind(J.prototype)};const KWt=[{path:"custom-games",component:J1e,canActivate:[wq],canDeactivate:[wq],data:{wideLobby:!0}}],ZWt=[No,_7,xi,Yi,Io,Ls,$r.forFeature(Tq.featureKey,function zWt(t,n){return VWt(t,n)})],QWt=[ly,wq];let YWt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[QWt],imports:[ZWt]}),n})();var hy=kd.ETileSize;class tTe{constructor(n){this.minGridSpots=8|n}getOrderedAndResizedGrid(n,o,e=ie.ESort.Desc){return this.handleTileSize(this.orderByPriority(n,o,e))}orderByPriority(n,o,e=ie.ESort.Desc){return bA()(n,[i=>i.orderPriority&&i.orderPriority[o]?i.orderPriority[o]:0],[e]).filter(i=>!i.orderPriority||-1!==i.orderPriority[o])}handleTileSize(n){return n.forEach((o,e)=>{o.size===hy.Auto&&(o.size=0===e?hy.Large:e<4?hy.Medium:this.getTileSize(n,e))}),n}getTileSize(n,o){let e=0;n.forEach(a=>{e+=a.size});let i=e<this.minGridSpots?this.minGridSpots:Math.ceil((e-this.minGridSpots)/(this.minGridSpots/2))*(this.minGridSpots/2)+this.minGridSpots;i===e&&(i+=this.minGridSpots/2);let r=Lt.CONFIG.content.games.grid.findIndex(a=>a.id===n[o-1].id);const s=Lt.CONFIG.content.games.grid[r].size%1?.5:Math.abs(Math.ceil((i-e)/(n.length-o)));return s>=4?hy.Large:s>=2?hy.Medium:s>=1?hy.Small:hy.ExtraSmall}}let nTe=(()=>{var t;class n{constructor(e,i,r,s,a){this.cs=a,this.appLangService=s,this.gridOrderSizeCalculator=new tTe,this.tournaments=i,this.gamesStateService=e,this.store=r}getConfigStream(){const e=new sn,i=this.cs.on(pC.SOCKET_MESSAGE,s=>{s.notificationType===rt.PromoTournamentInviteSent&&e.next([s.params.id])}),r=e.pipe(es(s=>this.tournaments.getPromoTournaments({ids:s})));return this.gamesStateService.getGameRelatedConfigStream().pipe(es(s=>m_(this.tournaments.getPromoTournaments(),r).pipe(zx((a,c)=>a.concat(c)),jn(a=>({...s,gameConfig:{...s.gameConfig,grid:{...s.gameConfig.grid,tournament:this.orderByPriority(s.gameConfig.grid.tournament.concat(a))}}})),g_(()=>{null==i||i.detach()}))))}orderByPriority(e){const i=this.store.selectSync(Ph).settings.region.toLowerCase();return this.gridOrderSizeCalculator.orderByPriority(e,i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zn),T(s1),T(J),T(Ma),T(Ri))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();function JWt(t,n){1&t&&B(0,"loader-image",3),2&t&&l("transparentBG",!0)}let iTe=(()=>{var t;class n{constructor(e,i,r,s,a){this.clientConfigService=s,this.brazeEngagementService=a,this.tournamentsGridService=i,this.deltaDNAService=r,this.route=e,this.loader=!0,this.gridTiles=[]}ngOnInit(){this.subscription=this.tournamentsGridService.getConfigStream().subscribe(e=>{this.loader=!1,this.deltaDNAService.tournamentLobbyOpenedEngage(e.gameConfig.id),this.brazeEngagementService.tournamentLobbyOpenedEngage(e.gameConfig.id),this.gridTiles=e.gameConfig.grid.tournament},e=>{console.error(e)})}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Po),g(nTe),g(sl),g(Zt),g(cl))},t.\u0275cmp=pe({type:t,selectors:[["tournaments-grid"]],decls:3,vars:3,consts:[[1,"tournament__grid--wrapper"],[3,"config","keepLargeColumns"],[3,"transparentBG",4,"ngIf"],[3,"transparentBG"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"grid",1),m(),U(2,JWt,1,1,"loader-image",2)),2&e&&(d(),l("config",i.gridTiles)("keepLargeColumns",!0),d(),l("ngIf",!0===i.loader))},dependencies:[fO,Ne,Oi],styles:[".tournament__grid--wrapper[_ngcontent-%COMP%]{width:100%;height:100%}"]}),n})(),oTe=(()=>{var t;class n{constructor(e){this.http=e}getLeaderboard(e,i){var r=this;return new Promise(function(){var s=f(function*(a,c){try{const u=yield r.requestLeaderboard(e,i),h=[];u[0].rankings.forEach(b=>{h.push({user:b.profile,score:b.score})}),a({id:e,secondId:u[0].secondId,duration:u[0].duration,items:h})}catch(u){console.error("Leaderboard get gg error","id:",e,"params",i,u),c(u)}});return function(a,c){return s.apply(this,arguments)}}())}requestLeaderboard(e,i){return this.http.get("leaderboard/".concat(e),{params:i}).toPromise().then(r=>r.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Pq=(()=>{var t;class n{constructor(e,i,r,s){this.gamesPlayClient=e,this.navigation=i,this.gameState=r,this.roomsPages=s}canActivate(e,i){const r=this.gameState.getCurrentGameState().id;return void 0!==this.gamesPlayClient.getPlayClient(r).activeClientModel.currentRoom||(this.navigation.navigateTo(this.roomsPages.createGameLobbyPage(r)),!1)}canDeactivate(e,i,r,s){if(!0===this.navigation.isNavigationStoppable(s)){const a=this.gamesPlayClient.getPlayClient(this.gameState.getCurrentGameState().id);return!(a.activeClientModel.currentRoom&&!e.roomLeft&&!(s&&this.navigation.getOutletUrl(s)==="/".concat(Xs.gameRoute)||a.activeClientModel.currentRoom.destroyed)&&(e.leaveRoom(),1))}return!0}}return(t=n).\u0275fac=function(e){return new(e||t)(T(oo),T(Yt),T(Zn),T(Xf))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class TD extends Do.AsyncState{constructor(){super(...arguments),this.loopSound=!0}onEnter(){var n=this;return f(function*(){const o=n.getCurrentState();if(o.loopSound){const e=()=>n.playSound(o.sound,!1);n.armature.display.addDBEventListener("loopComplete",e);const i=n.animationState.onExit(o.stateName,()=>{n.armature.display.removeDBEventListener("loopComplete",e),i.detach()})}n.playAnimation(o.animationName,!1),n.playSound(o.sound,!1)})()}hit(){this.animationState.getCurrentState().requestComplete()}}class _O extends TD{onEnter(){var n=this;return f(function*(){const o=n.getCurrentState();let e=0;o.onCompleteListener=()=>{++e,o.playIdleAnimation.apply(n,[e])},n.armature.display.addDBEventListener("complete",o.onCompleteListener),o.playIdleAnimation.apply(n,[e])})()}onExit(){var n=this;return f(function*(){n.armature.display.removeDBEventListener("complete",n.animationState.current.onCompleteListener)})()}playIdleAnimation(n){const o=n%2+1;this.playAnimation("idle_".concat(o)),this.playSound("idle_".concat(o),!1)}}class om extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.stateName=om.stateName,n.showStatusWidget=!0,n.titleTemplate=n.inProgressTitleTemplate,n.hintTemplate=n.inProgressTemplate,n.checkCashBackTutorial()||n.showCashBackTutorial(),n.animationComponent.to(_O),n.hostClick$.pipe(wn(n.destroyState$)).subscribe(n.onLockedHostClick,n.onError),n.cdr.detectChanges()})()}onBuy(){}onExit(){var n=this;return f(function*(){n.destroyState$.next()})()}updateProgress(){}}om.stateName=dO.InProgress;class Fg extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.stateName=Fg.stateName,n.showNextBonusTimer=!0,n.titleTemplate=n.claimedTitleTemplate;const o=()=>{var i;null===(i=n.animationComponent.armature)||void 0===i||i.display.removeDBEventListener("complete",o),n.animationComponent.goToLastState()},e=n.state.onExit(Fg.stateName,()=>{var i;null===(i=n.animationComponent.armature)||void 0===i||i.display.removeDBEventListener("complete",o),e.detach()});n.animationComponent.armature&&!n.animationComponent.armature.animation.isCompleted?n.animationComponent.armature.display.addDBEventListener("complete",o):o(),n.cdr.detectChanges()})()}onExit(){var n=this;return f(function*(){n.showNextBonusTimer=!1,n.destroyState$.next()})()}onBuy(){}updateProgress(){this.viewModel.accumulatedAmount<this.viewModel.current.amount&&this.state.to(om)}}Fg.stateName=dO.Collected;class Ug extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.stateName=Ug.stateName,n.showClickTutorial=!0,n.titleTemplate=n.completedTitleTemplate,n.hostClick$.pipe(wn(n.destroyState$)).subscribe(()=>{n.animationComponent.hit(),n.cdr.detectChanges()},n.onError),n.animationComponent.onComplete().pipe(wn(n.destroyState$)).subscribe(()=>{n.showClickTutorial=!1,n.cdr.detectChanges(),n.claim()}),n.showStatusWidget=!1,n.cdr.detectChanges()})()}onExit(){var n=this;return f(function*(){n.destroyState$.next()})()}onBuy(){}updateProgress(){this.viewModel.isCollected&&this.state.to(Fg)}}Ug.stateName=dO.ReadyToCollect;class kv extends Do.AsyncState{onEnter(){var n=this;return f(function*(){n.stateName=kv.stateName;try{n.showStatusWidget=!0,n.titleTemplate=n.inProgressTitleTemplate,n.items=yield n.cashBackService.getUnLockerItems(),n.hintTemplate=n.completedTemplate,n.hostClick$.pipe(wn(n.destroyState$)).subscribe(n.onLockedHostClick,n.onError),n.cdr.detectChanges()}catch(o){console.error(o)}})()}onExit(){var n=this;return f(function*(){n.destroyState$.next()})()}onBuy(){this.loaderService.on(),this.cashBackService.buy(this.getCurrentUnlockerItem()).then(()=>{this.loaderService.off()}).catch(n=>{console.error(n),this.loaderService.off()})}updateProgress(){this.viewModel.isReady?this.state.to(Ug):this.viewModel.customData.accumulatedAmount<this.viewModel.current.amount&&this.state.to(om)}}kv.stateName=dO.Completed;const XWt=["addListener","removeListener"],e9t=["addEventListener","removeEventListener"],t9t=["on","off"];function Iq(t,n,o,e){if(ut(o)&&(e=o,o=void 0),e)return Iq(t,n,o).pipe(Q3(e));const[i,r]=function o9t(t){return ut(t.addEventListener)&&ut(t.removeEventListener)}(t)?e9t.map(s=>a=>t[s](n,a,o)):function n9t(t){return ut(t.addListener)&&ut(t.removeListener)}(t)?XWt.map(lTe(t,n)):function i9t(t){return ut(t.on)&&ut(t.off)}(t)?t9t.map(lTe(t,n)):[];if(!i&&$3(t))return Yc(s=>Iq(s,n,o))(Qc(t));if(!i)throw new TypeError("Invalid event target");return new ao(s=>{const a=(...c)=>s.next(1<c.length?c:c[0]);return i(a),()=>r(a)})}function lTe(t,n){return o=>e=>t[o](n,e)}var Tf=function(t){return t.Hit1="hit1",t.Hit1Loop="hit1Loop",t.Hit2="hit2",t.Hit2Loop="hit2Loop",t.Hit3="hit3",t.Hit3Loop="hit3Loop",t.Hit4="hit4",t.Broken="broken",t}(Tf||{});class vO extends Do.AsyncState{constructor(){super(...arguments),this.loopSound=!1}onEnter(){var n=this;return f(function*(){const o=n.getCurrentState(),e=()=>n.animationState.getCurrentState().requestComplete();n.armature.display.addDBEventListener("complete",e);const i=n.animationState.onExit(o.stateName,()=>{n.armature.display.removeDBEventListener("complete",e),i.detach()});n.playAnimation(o.animationName),n.playSound(o.sound,!1)})()}hit(){}}class PD extends vO{constructor(){super(...arguments),this.animationName="hit_2",this.sound="pig_hit_2"}}PD.stateName=Tf.Hit2;class ID extends TD{constructor(){super(...arguments),this.animationName="hit2_loop",this.sound="pig_hit2Loop"}}ID.stateName=Tf.Hit2Loop;class MD extends vO{constructor(){super(...arguments),this.animationName="hit_1",this.sound="pig_hit_1"}}MD.stateName=Tf.Hit1;class OD extends vO{constructor(){super(...arguments),this.animationName="hit_3",this.sound="pig_hit_3"}}OD.stateName=Tf.Hit3;class ED extends TD{constructor(){super(...arguments),this.animationName="hit1_loop",this.sound="pig_hit1Loop",this.loopSound=!1}}ED.stateName=Tf.Hit1Loop;class xD extends vO{constructor(){super(...arguments),this.animationName="hit_4",this.sound="pig_hit_4"}}xD.stateName=Tf.Hit4;class AD extends TD{constructor(){super(...arguments),this.animationName="hit3_loop",this.sound="pig_hit3Loop"}}AD.stateName=Tf.Hit3Loop;class bO extends vO{constructor(){super(...arguments),this.animationName="broken",this.sound="pig_hit_4"}}bO.stateName=Tf.Broken;let vTe=(()=>{var t;class n extends qR{constructor(e,i,r,s,a,c,u,h){super(c,a,"piggy_bank",s,u,h),this.rulerService=e,this.soundService=i,this.cashBackService=r,this.width=1100,this.height=1100,this.complete$=new sn,this.backgroundAspectRatio=9/16,this.initialState=_O}ngOnInit(){var e=this;super.ngOnInit(),this.initStateMachine(),this.onAnimationLoad.subscribe(f(function*(){yield e.startStateMachine(),requestAnimationFrame(()=>{e.renderer.setStyle(e.pixiAppRef.canvas,"display","initial")})}))}onComplete(){return this.complete$.asObservable()}getCurrentState(){return this.animationState.getCurrentState()}createPixiApp(){super.createPixiApp(),this.renderer.setStyle(this.pixiAppRef.canvas,"height","100%"),this.renderer.setStyle(this.pixiAppRef.canvas,"width","auto"),this.renderer.setStyle(this.pixiAppRef.canvas,"position","absolute"),this.renderer.setStyle(this.pixiAppRef.canvas,"top","50%"),this.renderer.setStyle(this.pixiAppRef.canvas,"max-height","90rem"),this.renderer.setStyle(this.pixiAppRef.canvas,"max-width","100%"),this.renderer.setStyle(this.pixiAppRef.canvas,"left","50%"),this.renderer.setStyle(this.pixiAppRef.canvas,"transform","translate(-50%, -50%)"),this.renderer.setStyle(this.pixiAppRef.canvas,"display","none")}initStateMachine(){this.animationState=(new Do.AsyncStateMachine.Builder).setAllowedStates(_O,MD,ED,PD,ID,OD,AD,xD,bO).setInitialState(this.initialState).from(_O).to(MD).from(MD).to(ED).from(ED).to(PD).from(PD).to(ID).from(ID).to(OD).from(OD).to(AD).from(AD).to(xD).fromAny().to(xD).fromAny().to(bO).fromAny().to(_O).setStateContext(this).build(),this.animationState.onEnter(Tf.Hit4,()=>this.complete$.next()),this.animationState.logger.isEnabled=!1}startStateMachine(){return this.animationState.start()}hit(){this.getCurrentState().hit.apply(this)}goToLastState(){this.animationState?this.animationState.to(bO):this.initialState=bO}to(e){this.animationState?this.animationState.to(e):this.initialState=e}playSound(e,i){this.cashBackService.playSound(e,i)}ngOnDestroy(){var e;super.ngOnDestroy(),this.renderer.removeStyle(this.pixiAppRef.canvas,"height"),this.renderer.removeStyle(this.pixiAppRef.canvas,"width"),this.renderer.removeStyle(this.pixiAppRef.canvas,"position"),this.renderer.removeStyle(this.pixiAppRef.canvas,"top"),this.renderer.removeStyle(this.pixiAppRef.canvas,"max-height"),this.renderer.removeStyle(this.pixiAppRef.canvas,"max-width"),this.renderer.removeStyle(this.pixiAppRef.canvas,"left"),this.renderer.removeStyle(this.pixiAppRef.canvas,"transform"),this.renderer.removeStyle(this.pixiAppRef.canvas,"display"),null===(e=this.animationState)||void 0===e||e.destroy().catch(i=>console.warn("Cashback animation state machine destroy error",i))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ua),g(Mo),g(uO),g(j_),g(an),g(Bw),g($t),g(ji))},t.\u0275cmp=pe({type:t,selectors:[["cash-back-animation"]],features:[Ht],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})();var Mq=function(t){return t.Click="click",t}(Mq||{});let Oq=(()=>{var t;class n{constructor(e,i,r){this.elementRef=e,this.renderer=i,this.cashBackService=r,this.renderer.setStyle(this.elementRef.nativeElement,"opacity",0)}playSound(e,i){this.cashBackService.playSound(e,i)}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(ji),g(uO))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})();const r9t=t=>[t];let bTe=(()=>{var t;class n extends Oq{constructor(){super(...arguments),this.animationDuration=.35}animate(){return new Promise((e,i)=>{Zr.fromTo(this.elementRef.nativeElement,this.animationDuration,{opacity:0,scale:2,onComplete:()=>{this.playSound("tutorial_down",!1)}},{opacity:1,scale:1,ease:"back.out",onComplete:()=>{this.playSound("tutorial_front",!1),e()}})})}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["cash-back-tutorial-image"]],inputs:{imageSrc:"imageSrc",imageText:"imageText",hintPosition:"hintPosition",step:"step"},features:[Ht],decls:6,vars:9,consts:[[1,"cbti__step"],[1,"cbti__hint",3,"ngClass"],[1,"cbti__circle",3,"src"]],template:function(e,i){1&e&&(p(0,"p",0),H(1),m(),p(2,"p",1),H(3),V(4,"translate"),m(),B(5,"img",2)),2&e&&(d(),se(i.step),d(),l("ngClass",i.hintPosition),d(),se(yt(4,4,i.imageText.key,ne(7,r9t,i.imageText.params))),d(2),l("src",i.imageSrc,Wn))},dependencies:[Xe,qe],styles:["[_nghost-%COMP%]{display:flex;align-items:center;position:relative;border:2px dashed;border-radius:1.5rem}.cbti__hint[_ngcontent-%COMP%]{width:8em;text-align:center;flex:1}.cbti__hint.left[_ngcontent-%COMP%]{text-align:center}.cbti__circle[_ngcontent-%COMP%]{height:100%}.cbti__step[_ngcontent-%COMP%]{height:100%;padding:0 1rem}"],changeDetection:0}),n})();const s9t=["path"];let CTe=(()=>{var t;class n extends Oq{constructor(){super(...arguments),this.strokeAnimationDurationS=.35,this.fillAnimationDurationS=.2}animate(){return this.renderer.setStyle(this.elementRef.nativeElement,"opacity",1),new Promise(e=>{const i=this.path.nativeElement.getTotalLength();Zr.set(this.path.nativeElement,{strokeDasharray:i,strokeDashoffset:i,stroke:"#FFFFFF"}),Zr.fromTo(this.path.nativeElement,this.strokeAnimationDurationS,{strokeDashoffset:i},{strokeDashoffset:0,ease:"power1.in",onComplete:()=>{Zr.to(this.path.nativeElement,{fill:"#FFFFFF",duration:this.fillAnimationDurationS,onComplete:e})}})})}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["cash-back-tutorial-arrow"]],viewQuery:function(e,i){if(1&e&&$e(s9t,5),2&e){let r;je(r=He())&&(i.path=r.first)}},features:[Ht],decls:6,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","width","32","height","32","viewBox","0 0 32 32"],["d","M16.4152,22.9987V0.4152C16.4152,0.1857,16.2295,0,16,0c-0.2295,0-0.4152,0.1857-0.4152,0.4152v22.5835h-1.9971\n\tL16,32l2.4123-9.0013H16.4152z",1,"cbt-1"],["path",""]],template:function(e,i){1&e&&(Df(),p(0,"svg",0)(1,"defs")(2,"style"),H(3," .cbt-1 { fill: none; stroke: transparent; stroke-width: 2px; fill-rule: evenodd; } "),m()(),B(4,"path",1,2),m())},styles:["svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%}\n\n/*# sourceMappingURL=cash-back-tutorial-arrow.component.ts-angular-inline--16.css.map*/"],changeDetection:0}),n})();const a9t=["*"];let yTe=(()=>{var t;class n extends Oq{constructor(){super(...arguments),this.animationDuration=.35}animate(){return new Promise((e,i)=>{Zr.fromTo(this.elementRef.nativeElement,this.animationDuration,{opacity:0,scale:2,onComplete:()=>{this.playSound("tutorial_down",!1)}},{opacity:1,scale:1,ease:"back.out",onComplete:()=>{this.playSound("tutorial_front",!1),e()}})})}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["cash-back-tutorial-content"]],features:[Ht],ngContentSelectors:a9t,decls:1,vars:0,template:function(e,i){1&e&&(Co(),yo(0))},encapsulation:2,changeDetection:0}),n})();const c9t=["cbt__tutorial"],l9t=()=>({key:"CASH_BACK.TUTORIAL.PLAY_GAME"}),u9t=()=>({key:"CASH_BACK.TUTORIAL.SAVE"}),d9t=()=>({key:"CASH_BACK.TUTORIAL.BREAK"}),p9t=()=>({key:"CASH_BACK.TUTORIAL.PROFIT"});let STe=(()=>{var t;class n{constructor(){this.isSet=!0,this.EButtonModifier=ve.EButtonModifier}ngAfterViewInit(){var e=this;return f(function*(){for(const i of e.steps)yield i.animate()})()}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["cash-back-tutorial"]],viewQuery:function(e,i){if(1&e&&$e(c9t,5),2&e){let r;je(r=He())&&(i.steps=r)}},hostVars:2,hostBindings:function(e,i){2&e&&Uo("cbt__tutorial--host",i.isSet)},decls:25,vars:30,consts:[[1,"cbt__tutorial-wrapper"],[1,"cbt__tutorial-content"],[1,"cbt__tutorial","cbt__tutorial-step","step-1",3,"imageSrc","hintPosition","step","imageText"],["cbt__tutorial",""],[1,"cbt__tutorial","cbt__tutorial-arrow","arrow-1"],[1,"cbt__tutorial","cbt__tutorial-step","step-2",3,"imageSrc","step","imageText"],[1,"cbt__tutorial","cbt__tutorial-arrow","arrow-2"],[1,"cbt__tutorial","cbt__tutorial-step","step-3",3,"imageSrc","hintPosition","step","imageText"],[1,"cbt__tutorial","cbt__tutorial-arrow","arrow-3"],[1,"cbt__tutorial","cbt__tutorial-step","step-4",3,"imageSrc","step","imageText"],[1,"cbt__tutorial-bottom"],[1,"cbt__tutorial-button",3,"buttonModifier"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"cash-back-tutorial-image",2,3),V(4,"transformUrl"),B(5,"cash-back-tutorial-arrow",4,3)(7,"cash-back-tutorial-image",5,3),V(9,"transformUrl"),B(10,"cash-back-tutorial-arrow",6,3)(12,"cash-back-tutorial-image",7,3),V(14,"transformUrl"),B(15,"cash-back-tutorial-arrow",8,3)(17,"cash-back-tutorial-image",9,3),V(19,"transformUrl"),p(20,"cash-back-tutorial-content",10,3)(22,"button-text",11),H(23),V(24,"translate"),m()()()()),2&e&&(d(2),l("imageSrc",$(4,16,"cash-back/icon_1_play.svg"))("hintPosition","left")("step",1)("imageText",pt(26,l9t)),d(5),l("imageSrc",$(9,18,"cash-back/icon_2_collect.svg"))("step",2)("imageText",pt(27,u9t)),d(5),l("imageSrc",$(14,20,"cash-back/icon_3_brake.svg"))("hintPosition","left")("step",3)("imageText",pt(28,d9t)),d(5),l("imageSrc",$(19,22,"cash-back/icon_4_profit.svg"))("step",4)("imageText",pt(29,p9t)),d(5),l("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION),d(),se($(24,24,"BUTTON.GOT_IT")))},dependencies:[pn,bTe,CTe,yTe,qe,uo],styles:[".cbt__tutorial-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;display:inline-block;position:relative}.cbt__aspect-ratio-holder[_ngcontent-%COMP%]{height:100%}.cbt__tutorial-content[_ngcontent-%COMP%]{position:relative;overflow:auto;height:100%;width:100%;left:0;top:0;display:flex;flex-flow:row wrap;justify-content:center;align-items:center}.cbt__tutorial-arrow[_ngcontent-%COMP%]{position:absolute;height:5%}.cbt__tutorial-arrow.arrow-1[_ngcontent-%COMP%]{top:16%}.cbt__tutorial-arrow.arrow-2[_ngcontent-%COMP%]{top:37%}.cbt__tutorial-arrow.arrow-3[_ngcontent-%COMP%]{top:58%}.cbt__tutorial-arrow.arrow-4[_ngcontent-%COMP%]{top:72%}.cbt__tutorial-step[_ngcontent-%COMP%]{height:15%;font-size:1.5em;min-width:55%;justify-content:flex-end;padding:1rem;margin:1%}.cbt__tutorial-step.step-1[_ngcontent-%COMP%], .cbt__tutorial-step.step-3[_ngcontent-%COMP%]{flex-direction:row-reverse}.cbt__tutorial-button[_ngcontent-%COMP%]{max-width:20rem;height:100%;max-height:5rem}.cbt__tutorial-bottom[_ngcontent-%COMP%]{width:100%;height:10%;margin:1%}"],changeDetection:0}),n})();function h9t(t,n){}function m9t(t,n){if(1&t&&B(0,"cash-back-progress",3),2&t){const o=_();l("lastSeenProgress",o.accumulatedAmount)("currentProgress",o.accumulatedAmount)("edges",o.edges)}}function f9t(t,n){if(1&t&&(p(0,"p",4),B(1,"currency-component",5),H(2," / "),p(3,"span",6),H(4),V(5,"formatNumber"),m()()),2&t){const o=_();d(),l("currency",o.currencyType.Chips)("value",o.accumulatedAmount),d(3),se($(5,3,o.edges[1]))}}let wTe=(()=>{var t;class n{constructor(){this.showProgress=!0,this.currencyType=ln}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["cash-back-status-widget"]],inputs:{edges:"edges",accumulatedAmount:"accumulatedAmount",hintTemplate:"hintTemplate",showProgress:"showProgress"},decls:3,vars:3,consts:[[3,"ngTemplateOutlet"],["class","cbsw__progress",3,"lastSeenProgress","currentProgress","edges",4,"ngIf"],["class","cbsw__progress-text",4,"ngIf"],[1,"cbsw__progress",3,"lastSeenProgress","currentProgress","edges"],[1,"cbsw__progress-text"],[1,"cbsw__progress-text-chip",3,"currency","value"],[1,"cbsw__progress-text-chip-edge"]],template:function(e,i){1&e&&U(0,h9t,0,0,"ng-template",0)(1,m9t,1,3,"cash-back-progress",1)(2,f9t,6,5,"p",2),2&e&&(l("ngTemplateOutlet",i.hintTemplate),d(),l("ngIf",i.showProgress),d(),l("ngIf",i.showProgress))},dependencies:[Ne,qr,So,uq,Go],styles:["[_nghost-%COMP%]{display:flex;flex-flow:row wrap;justify-content:center;padding:0 1em}.cbsw__progress[_ngcontent-%COMP%]{width:80%;height:2.5rem;font-size:1.4rem;margin:.8em auto}.cbsw__progress-text[_ngcontent-%COMP%]{width:100%;text-align:center;font-size:1.5em}.cbsw__progress-text-chip[_ngcontent-%COMP%]{font-size:1em}"],changeDetection:0}),n})();var g9t=ve.EButtonModifier;const _9t=["inProgress"],v9t=["completed"],b9t=["inProgressTitle"],C9t=["completedTitle"],y9t=["claimedTitle"],S9t=["animationComponent"];function w9t(t,n){}function T9t(t,n){1&t&&(p(0,"p",17),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CASH_BACK.TITLE_IN_PROGRESS")))}function P9t(t,n){1&t&&(p(0,"p",17),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"CASH_BACK.BREAK_THE_PIGGY")))}const TTe=t=>[t];function I9t(t,n){if(1&t&&(B(0,"p",18),V(1,"translate")),2&t){const o=_();l("innerHtml",yt(1,1,"CASH_BACK.YOU_RECEIVED",ne(4,TTe,o.viewModel.accumulatedAmount)),Yn)}}function M9t(t,n){if(1&t&&B(0,"cash-back-status-widget",19),2&t){const o=_();l("edges",o.viewModel.edges)("accumulatedAmount",o.viewModel.accumulatedAmount)("hintTemplate",o.hintTemplate)("showProgress",!o.viewModel.isInResetCooldownInterval())}}function O9t(t,n){if(1&t){const o=Ce();p(0,"cash-back-tutorial",20),Y("click",function(i){return oe(o),re(_().toggleCashBackTutorial(i))}),m()}}function E9t(t,n){if(1&t){const o=Ce();p(0,"p",21),Y("@shake.done",function(){return oe(o),re(_().shakeTrigger=!1)}),p(1,"span"),H(2),V(3,"uppercase"),V(4,"translate"),m(),B(5,"currency-component",22),m()}if(2&t){const o=_();l("@shake",o.shakeTrigger),d(2),se($(3,4,$(4,6,"CASH_BACK.YOU_SAVED"))),d(3),l("currency",o.currencyType.Chips)("value",o.viewModel.accumulatedAmount)}}function x9t(t,n){if(1&t&&(p(0,"p",26),H(1),V(2,"translate"),B(3,"currency-component",22),m()),2&t){const o=_(2);d(),se($(2,3,"CASH_BACK.YOU_SAVED")),d(2),l("currency",o.currencyType.Chips)("value",o.viewModel.accumulatedAmount)}}function A9t(t,n){1&t&&B(0,"item-price",33),2&t&&l("item",_(3).items.decay)("isCrossed",!0)}function R9t(t,n){1&t&&B(0,"item-price",34),2&t&&l("item",_(3).items.default)}const k9t=t=>({timeConfig:t}),RD=t=>({$implicit:t});function L9t(t,n){if(1&t&&(p(0,"div",27),B(1,"p",28),V(2,"translate"),V(3,"timeLeft"),p(4,"div",29),U(5,A9t,1,2,"item-price",30)(6,R9t,1,1,"item-price",31),m(),Un(7,32),m()),2&t){const o=_(2),e=Kt(22);d(),l("innerHTML",yt(2,5,"CASH_BACK.FIRST_DECAY_TEXT",ne(13,TTe,yt(3,8,o.viewModel.customData.timers.tierLevelChangeInterval,ne(11,k9t,o.timeLeftConfig)))),Yn),d(4),l("ngIf",o.items.decay),d(),l("ngIf",o.items.default),d(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",ne(15,RD,o.viewModel.timeToNextState()))}}function D9t(t,n){if(1&t&&(B(0,"p",28),V(1,"translate"),Un(2,32)),2&t){const o=_(3),e=Kt(22);l("innerHTML",$(1,3,"CASH_BACK.SECOND_DECAY_TEXT"),Yn),d(2),l("ngTemplateOutlet",e)("ngTemplateOutletContext",ne(5,RD,o.getTimeRemaining(o.viewModel.customData.timers.purchaseCooldownStartsAt)))}}function B9t(t,n){if(1&t&&(B(0,"p",38),V(1,"translate"),B(2,"p",39),V(3,"translate"),Un(4,32)),2&t){const o=_(3),e=Kt(22);l("innerHTML",$(1,4,"CASH_BACK.DECAY_EXPIRED"),Yn),d(2),l("innerHTML",$(3,6,"CASH_BACK.NEW_PIGGY"),Yn),d(2),l("ngTemplateOutlet",e)("ngTemplateOutletContext",ne(8,RD,o.viewModel.timeToNextState()))}}function N9t(t,n){1&t&&Un(0)}function F9t(t,n){if(1&t&&(p(0,"div",27),U(1,D9t,3,7,"ng-template",null,35,ft)(3,B9t,5,10,"ng-template",null,36,ft)(5,N9t,1,0,"ng-container",37),m()),2&t){const o=Kt(2),e=Kt(4),i=_(2);d(5),l("ngIf",!i.viewModel.isInResetCooldownInterval())("ngIfThen",o)("ngIfElse",e)}}function U9t(t,n){if(1&t){const o=Ce();p(0,"item-buy-button",40),Y("@shake.done",function(){return oe(o),re(_(2).shakeTrigger=!1)})("click",function(i){return oe(o),re(_(2).onBuy(i))}),m()}if(2&t){const o=_(2);l("bclass","cash-back__hint-button")("clientStoreProduct",o.getCurrentUnlockerItem())("@shake",o.shakeTrigger)}}function G9t(t,n){if(1&t&&U(0,x9t,4,5,"p",23)(1,L9t,8,17,"div",24)(2,F9t,6,3,"div",24)(3,U9t,1,3,"item-buy-button",25),2&t){const o=_();l("ngIf",!o.viewModel.isInResetCooldownInterval()),d(),l("ngIf",0===o.getDecayLevel()),d(),l("ngIf",1===o.getDecayLevel()),d(),l("ngIf",!o.viewModel.isInResetCooldownInterval())}}function V9t(t,n){1&t&&(p(0,"div",41),B(1,"img",42),V(2,"transformUrl"),p(3,"p",43),H(4),V(5,"translate"),m()()),2&t&&(d(),l("imgSrc",$(2,2,"cash-back/tap-hint.png")),d(3),se($(5,4,"CASH_BACK.TAP_PIGGY")))}function z9t(t,n){if(1&t&&(p(0,"div",44)(1,"p",43),H(2),V(3,"translate"),m(),Un(4,32),m()),2&t){const o=_(),e=Kt(22);d(2),se($(3,3,"CASH_BACK.NEW_PIGGY_IN")),d(2),l("ngTemplateOutlet",e)("ngTemplateOutletContext",ne(5,RD,o.viewModel.timeToNextState()))}}function j9t(t,n){if(1&t){const o=Ce();p(0,"div",45),B(1,"icon-component",46),p(2,"timer",47),Y("onCountdownFinished",function(){return oe(o),re(_().onCountdownFinished())}),m()()}if(2&t){const o=n.$implicit,e=_();d(),l("icon",e.EIcons.CLOCK_ICON),d(),l("milliseconds",1e3*o)}}const H9t=t=>({name:t}),q9t=t=>({isDecay:t});let PTe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.appStorage=e,this.cashBackService=i,this.soundService=r,this.loaderService=s,this.cdr=a,this.host=c,this.time=u,this.timeLeft=h,this.showTutorial=!1,this.showClickTutorial=!1,this.showStatusWidget=!1,this.showNextBonusTimer=!1,this.buttonModifier=g9t,this.tutorialAction=Mq,this.shakeTrigger=!1,this.stateName="",this.navBarContent={type:Ru.EContent.Text,data:{key:"CASH_BACK.CASH_BACK_BONUS"}},this.currencyType=ln,this.EIcons=ve.EIcons,this.hostClick$=Iq(this.host.nativeElement,"click"),this.destroyState$=new sn,this.isSet=!0,this.onLockedHostClick=()=>{this.shakeTrigger=!0,this.cashBackService.playSound("button_shakes",!1),this.cdr.detectChanges()},this.onError=b=>{console.error("Cashback component error:",b)}}get currentState(){return this.state.getCurrentState()}ngOnInit(){this.timeLeftConfig=Zu,this.subscription=this.cashBackService.getCashBackViewModel().subscribe(e=>{void 0===this.viewModel&&e?(this.viewModel=e,this.initStateMachine().catch(i=>console.error(i))):(this.viewModel=e,this.currentState.updateProgress.apply(this)),this.cdr.detectChanges()},this.onError)}ngOnDestroy(){var e;this.subscription&&this.subscription.unsubscribe(),null===(e=this.state)||void 0===e||e.destroy().catch(i=>console.warn("Cashback state machine destroy error",i))}initStateMachine(){return this.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(om,kv,Ug,Fg).setInitialState(this.getInitialState()).from(om).to(kv).from(kv).to(Ug).from(Ug).to(om).from(Ug).to(Fg).from(Fg).to(om).from(kv).to(om).setStateContext(this).build(),this.state.logger.isEnabled=!1,this.state.start()}getTimeRemaining(e){return e-this.time.getServerTimeS()}toggleCashBackTutorial(e){null==e||e.stopPropagation(),this.showTutorial=!this.showTutorial}showCashBackTutorial(){this.showTutorial=!0,this.appStorage.setItem("cashBackTutorial",!0)}onCountdownFinished(){this.cdr.detectChanges()}onBuy(e){e.stopPropagation(),this.currentState.onBuy.apply(this)}claim(){this.cashBackService.claim().then(()=>{}).catch(e=>console.error(e))}getDecayLevel(){return this.viewModel.decayLevel}getCurrentUnlockerItem(){return this.getDecayLevel()?this.items.decay:this.items.default}getInitialState(){return this.viewModel.customData.lastCollected?Fg:this.viewModel.isReady?Ug:this.viewModel.accumulatedAmount<this.viewModel.current.amount?om:kv}checkCashBackTutorial(){return this.appStorage.checkItem("cashBackTutorial")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ci),g(uO),g(Mo),g(ro),g(Re),g($t),g(Bn),g(Ps))},t.\u0275cmp=pe({type:t,selectors:[["cash-back"]],viewQuery:function(e,i){if(1&e&&($e(_9t,7),$e(v9t,7),$e(b9t,7),$e(C9t,7),$e(y9t,7),$e(S9t,7)),2&e){let r;je(r=He())&&(i.inProgressTemplate=r.first),je(r=He())&&(i.completedTemplate=r.first),je(r=He())&&(i.inProgressTitleTemplate=r.first),je(r=He())&&(i.completedTitleTemplate=r.first),je(r=He())&&(i.claimedTitleTemplate=r.first),je(r=He())&&(i.animationComponent=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Uo("cash-back-cmp",i.isSet)},decls:23,vars:14,consts:[[1,"cash-back__container"],[1,"cash-back__navigation-bar",3,"backLink","content"],[1,"cash-back__info--button",3,"icon","onClick"],[1,"cash-back__navigation--content",3,"ngClass"],[3,"ngTemplateOutlet"],["inProgressTitle",""],["completedTitle",""],["claimedTitle",""],[1,"cash-back__animation",3,"ngClass"],["animationComponent",""],["class","cash-back__status-widget",3,"edges","accumulatedAmount","hintTemplate","showProgress",4,"ngIf"],["class","cash-back__tutorial",3,"click",4,"ngIf"],["inProgress",""],["completed",""],["class","cash-back__click-tutorial",4,"ngIf"],["class","cash-back__time-to-next-bonus",4,"ngIf"],["timerImpl",""],[1,"cash-back__title"],[1,"cash-back__title",3,"innerHtml"],[1,"cash-back__status-widget",3,"edges","accumulatedAmount","hintTemplate","showProgress"],[1,"cash-back__tutorial",3,"click"],[1,"cash-back__hint","cash-back__hint-inProgress"],[1,"cash-back__hint-chips",3,"currency","value"],["class","cash-back__hint cash-back__hint-completed-text",4,"ngIf"],["class","cash-back__hint-decay--text--wrapper",4,"ngIf"],["class","cash-back__hint-completed",3,"bclass","clientStoreProduct","click",4,"ngIf"],[1,"cash-back__hint","cash-back__hint-completed-text"],[1,"cash-back__hint-decay--text--wrapper"],[1,"cash-back__hint","cash-back__hint-decay--text",3,"innerHTML"],[1,"cash-back__prices"],["class","cash-back__price",3,"item","isCrossed",4,"ngIf"],["class","cash-back__price",3,"item",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cash-back__price",3,"item","isCrossed"],[1,"cash-back__price",3,"item"],["completedSecondDecay",""],["completedSecondDecayCooldown",""],[4,"ngIf","ngIfThen","ngIfElse"],[1,"cash-back__hint","cash-back__hint-decay--expired",3,"innerHTML"],[1,"cash-back__hint","cash-back__hint-decay--new-piggy",3,"innerHTML"],[1,"cash-back__hint-completed",3,"bclass","clientStoreProduct","click"],[1,"cash-back__click-tutorial"],["empty-placeholder","",1,"cash-back__click-tutorial--image",3,"imgSrc"],[1,"cash-back__click-tutorial--text"],[1,"cash-back__time-to-next-bonus"],[1,"cash-back__timer--wrapper"],[1,"cash-back__timer--icon",3,"icon"],[1,"cash-back__timer",3,"milliseconds","onCountdownFinished"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"navigation-bar",1)(2,"button-icon",2),Y("onClick",function(s){return i.toggleCashBackTutorial(s)}),m()(),p(3,"div",3),U(4,w9t,0,0,"ng-template",4)(5,T9t,3,3,"ng-template",null,5,ft)(7,P9t,3,3,"ng-template",null,6,ft)(9,I9t,2,6,"ng-template",null,7,ft),B(11,"cash-back-animation",8,9),U(13,M9t,1,4,"cash-back-status-widget",10)(14,O9t,1,0,"cash-back-tutorial",11)(15,E9t,6,8,"ng-template",null,12,ft)(17,G9t,4,4,"ng-template",null,13,ft)(19,V9t,6,6,"div",14)(20,z9t,5,7,"div",15),m()(),U(21,j9t,3,2,"ng-template",null,16,ft)),2&e&&(d(),l("backLink","history")("content",i.navBarContent),d(),l("icon",ne(10,H9t,i.EIcons.INFO)),d(),l("ngClass",ne(12,q9t,0===i.getDecayLevel()||1===i.getDecayLevel())),d(),l("ngTemplateOutlet",i.titleTemplate),d(7),l("ngClass",0===i.getDecayLevel()||1===i.getDecayLevel()?i.stateName+" isDecay":i.stateName),d(2),l("ngIf",i.showStatusWidget),d(),l("ngIf",i.showTutorial),d(5),l("ngIf",i.showClickTutorial),d(),l("ngIf",i.showNextBonusTimer))},dependencies:[Xe,Ne,qr,Fs,Kh,Dn,ei,So,Uh,$o,X_,STe,wTe,vTe,qe,Ps,uo,Sp],styles:['[_nghost-%COMP%]{height:100%;font-size:1vw}.cash-back__animation[_ngcontent-%COMP%]{display:flex;position:relative;justify-content:center;width:100%;top:2vh;min-height:50%}.cash-back__tutorial[_ngcontent-%COMP%]{position:absolute;top:0;left:0;font-size:1em;z-index:3}.cash-back__status-widget[_ngcontent-%COMP%]{width:25%;min-width:35em;border-radius:10px;position:relative;top:2vh}.cash-back__tell-me-more[_ngcontent-%COMP%]{position:absolute;display:flex;align-items:center;right:2%;font-size:2em;text-decoration:underline}.cash-back__tell-me-more[_ngcontent-%COMP%]:before{content:"";display:inline-flex;background-size:contain;background-repeat:no-repeat;width:1.5em;height:1.5em;margin-right:5px}.cash-back__hint-completed[_ngcontent-%COMP%]{min-width:40%;order:2;margin-top:.5em;font-size:2em;height:1.8em;width:80%}.cash-back__hint-decay--text--wrapper[_ngcontent-%COMP%]{order:1;text-align:center;margin-top:1rem}.cash-back__hint-inProgress[_ngcontent-%COMP%]{display:flex;font-size:1.8em;font-weight:700;transition:transform .3s}.cash-back__hint-completed-text[_ngcontent-%COMP%]{font-size:2em;text-align:center}.cash-back__hint-chips[_ngcontent-%COMP%]{color:#eea118;margin:0 .5em;font-size:1em}.cash-back__click-tutorial[_ngcontent-%COMP%]{position:relative;text-align:center}.cash-back__navigation-bar[_ngcontent-%COMP%]{width:100%;height:5rem}.cash-back__info--button[_ngcontent-%COMP%]{position:absolute;width:4rem;top:50%;right:0;transform:translateY(-50%)}.cash-back__navigation--content[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;justify-content:center;height:calc(100% - 5rem);min-height:40rem}.cash-back__prices[_ngcontent-%COMP%]{display:flex;justify-content:center}.cash-back__price[_ngcontent-%COMP%]{margin:0 1rem}'],data:{animation:[r2("shake",[z0("false => true",[V0("1.2s",Qwt([Wc({transform:"translate3d(-5px, 0, 0)",offset:.1}),Wc({transform:"translate3d(10px, 0, 0)",offset:.2}),Wc({transform:"translate3d(-20px, 0, 0)",offset:.3}),Wc({transform:"translate3d(20px, 0, 0)",offset:.4}),Wc({transform:"translate3d(-20px, 0, 0)",offset:.5}),Wc({transform:"translate3d(20px, 0, 0)",offset:.6}),Wc({transform:"translate3d(-20px, 0, 0)",offset:.7}),Wc({transform:"translate3d(10px, 0, 0)",offset:.8}),Wc({transform:"translate3d(-5px, 0, 0)",offset:.9})]))])])]},changeDetection:0}),n})();const Z9t=[Yi,Io];let Q9t=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[Z9t]}),n})(),OTe=(()=>{var t;class n{constructor(e,i,r){this.router=e,this.permissions=i,this.constants=r}canActivate(e,i){var r=this;return f(function*(){return!!r.permissions.getActionPermission(nt.EPermissionModule.CashBack,nt.EModuleAction.View,{showFailedRequirements:!0}).isPermitted||(r.router.navigate([r.constants.defaultLoggedRoute]),!1)})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(Pi),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const Y9t=[uO,OTe],J9t=[Yi,Q9t,No,J0];let ETe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:Y9t,imports:[J9t]}),n})(),X9t=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b){this.router=e,this.playClient=i,this.cdr=r,this.engagementService=s,this.destroyRef=a,this.forwardingService=c,this.viewContainerRef=u,this.hiddenShopService=h,this.appService=b,this.close=new ke,this.timerConfig=new yl(D_).useYearsConfig({min:Rt.Months,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useMonthsConfig({min:Rt.Days,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).useDaysConfig({min:Rt.Hours,showDoubleDigits:!1,showTextPeriod:!0,timeFormat:qi.Normal,showNullValue:!1}).build()}ngOnInit(){this.attachListeners();const e=this.cloneInAppMessage(this.engagement.data);this.inAppMessage=e,e.animateIn=!1,e.animateOut=!1,this.brazeLocation=new Wve(this.engagement.id),e.message=this.brazeLocation.patchLocation(e.message);const i=document.getElementById("appWrapper");this.engagementService.getInitedBrazeSdk().showInAppMessage(e,i,()=>this.onShown());const r=this.brazeLocation.onUrlChange(s=>{var a;null==r||r.detach(),null===(a=this.brazeLocation)||void 0===a||a.destroy(),ef.isHiddenShopLink(s)?this.hiddenShopService.openShop({openedFrom:"brazeImageMessage",value:s,brazeEngagementId:this.engagement.id,parameters:{giftable:this.engagement.args.giftable}}):(0,ie.isAbsoluteLink)(s)?this.appService.openExternalUrl(s):this.forwardingService.forward(s)});e.subscribeToDismissedEvent(()=>this.destroy())}ngOnDestroy(){var e;null===(e=this.clientTransitionListener)||void 0===e||e.detach(),this.destroy()}destroy(){var e;this.inAppMessage.removeAllSubscriptions(),this.inAppMessage.closeMessage(),null===(e=this.brazeLocation)||void 0===e||e.destroy(),this.close.emit()}updateView(){this.cdr.detectChanges()}attachListeners(){this.router.events.pipe(bt(e=>e instanceof as),Qi(1),mi(this.destroyRef)).subscribe(e=>this.destroy()),this.clientTransitionListener=this.playClient.stateEvents.onClientStateTransition(e=>{e.to!==yn.Idle&&this.destroy()})}onShown(){const e=this.getIframeElement();if(!e)return;const i=this.getModalElement(e);i&&(i.style.boxShadow="none",this.engagement.isExpirable()&&this.addTimerComponent(e))}getIframeElement(){return document.getElementsByClassName("ab-in-app-message")[0]}getModalElement(e){return e.contentDocument.getElementsByClassName("bz-modal")[0]}addTimerComponent(e){const i=this.getModalElement(e);if(!i)return;const r=this.viewContainerRef.createComponent(Fs);r.instance.timerConfig=this.timerConfig,r.instance.milliseconds=1e3*this.engagement.getTimeLeft();const s=r.hostView.rootNodes[0];s.classList.add("braze-banner__timer"),e.contentDocument.head.insertAdjacentHTML("beforeend","\n            <style>\n                .braze-banner__timer {\n                    position: absolute;\n                    bottom: 8%;\n                    right: 3%;\n                    color: white;\n                    font-size: 28px;\n                    font-weight: bold;\n\n                    @media only screen and (max-width: 568px) and (orientation: portrait) {\n                        font-size: 20px;\n                    }\n\n                    @media only screen and (max-width: 980px) and (orientation: landscape) {\n                        font-size: 18px;\n                    }\n                }\n            </style>"),i.appendChild(s),r.instance.start()}cloneInAppMessage(e){return Object.assign(Object.create(Object.getPrototypeOf(e)),e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(oo),g(Re),g(U_),g(br),g($d),g(bs),g(ef),g(Qt))},t.\u0275cmp=pe({type:t,selectors:[["braze-banner"]],inputs:{engagement:"engagement"},outputs:{close:"close"},decls:0,vars:0,template:function(e,i){},changeDetection:0}),n})();var my;let d1=((my=class{constructor(n,o,e,i,r,s,a,c){this.store=n,this.engagementService=o,this.navigation=e,this.overlayManager=i,this.rootContainerService=r,this.playClient=s,this.appRef=a,this.developerService=c,this.destroy$=new sn,this.engagementsQueue=new ie.List,this.onEngage=u=>{if(this.developerService.brazeLoggingEnabled()&&console.warn("onEngage",u),!this.canShow())return void this.engagementService.handleEngagementClosed(u);if(this.engagementsQueue.has(u))return;this.engagementsQueue.add(u);const h=new Lw;let b,w;h.execute=()=>{if(!this.canShow())return this.engagementService.handleEngagementClosed(u),void h.complete();if(u.data.isControl)return this.engagementService.handleControlMessage(u),void h.complete();try{b=this.rootContainerService.createComponent(X9t),b.instance.engagement=u,b.instance.updateView(),w=requestAnimationFrame(()=>{this.appRef.tick()}),this.component=b,b.instance.close.pipe(Qi(1)).subscribe(()=>{var G;this.engagementService.handleEngagementClosed(u),cancelAnimationFrame(w),null===(G=b)||void 0===G||G.destroy(),h.complete(),this.engagementsQueue.remove(u)})}catch(G){h.complete()}},h.onDestroy=()=>{cancelAnimationFrame(w),h.complete(),this.engagementService.handleEngagementClosed(u),this.engagementsQueue.remove(u)},this.overlayManager.queueItem(h)}}ngOnDestroy(){this.destroy(),this.destroy$.complete()}onLogin(){this.init()}onLogout(){this.destroy()}init(){this.engagementService.engagement.pipe(bt(n=>!!n),wn(this.destroy$)).subscribe(this.onEngage),this.engagementService.engagement.pipe(bt(n=>null==n&&null!=this.component),wn(this.destroy$)).subscribe(n=>{this.component.destroy()})}destroy(){this.destroy$.next(),this.engagementsQueue=new ie.List}canShow(){const n=this.playClient.currentPlayClient,o=n&&n.state.current?n.state.getCurrentState().stateName:void 0;return this.store.selectUserState()&&(!o||o===yn.Idle)&&this.navigation.url!=="/".concat(Xs.gameRoute)}}).\u0275fac=function(n){return new(n||my)(T(J),T(U_),T(Yt),T(Bh),T(Ia),T(oo),T(bp),T(tg))},my.\u0275prov=be({token:my,factory:my.\u0275fac}),my);Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],d1.prototype,"onLogin",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],d1.prototype,"onLogout",null),d1=Qe([Wo(),ue("design:paramtypes",[J,U_,Yt,Bh,Ia,oo,bp,tg])],d1);let e$t=(()=>{var t;class n extends yae{constructor(e,i,r,s){super(e),this.config=e,this.gamesPlayClient=i,this.store=r,this.permissions=s,this.gamesPlayClient=i,this.store=r,this.permissions=s}preventEngage(){if(super.preventEngage())return!0;const e=this.gamesPlayClient.currentPlayClient;return this.preventCollect()||e&&e.state&&e.state.current&&e.state.current.stateName!==yn.Idle&&!this.currentTutorial}setCurrentTutorial(e){this.currentTutorial=e}preventCollect(){if(super.preventCollect())return!0;const e=this.permissions.getActionPermission(nt.EPermissionModule.Tracking,nt.EModuleAction.Send);return void 0!==this.store.selectUserState()&&!e.isPermitted}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zt),T(oo),T(J),T(Ti))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),xTe=(()=>{var t;class n{constructor(e){this.brazeListener=e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(d1))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[d1,cl,{provide:J4,useClass:e$t}],imports:[wae,Mw]}),n})();const t$t=[xi,Yi,Io,No,ETe,xTe],n$t=[B1e,M1e,k1e,r1e,B7];let CO=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...n$t],imports:[t$t]}),n})();Wu(XI,[Mt,Ne,ei,Fm,Hb,mO],[]),Wu(eM,[Mt,Ne,ei,Fm,Hb,mO],[]);let Eq=(()=>{var t;class n{constructor(e,i,r){this.cs=e,this.playClientService=i,this.store=r,this.channels=new ie.UniqueList,this.events=new tc,this.listeners=new ie.List,this.currentRoomListeners=new ie.List}connect(e){var i=this;return f(function*(){if(i.getLobbyClient(e))return;const r=yield i.cs.connectToNamespace(e),s=new dse(i.store);s.useNamespace(r),i.channels.add({id:e,nsp:s}),i.addListeners(e)})()}disconnect(e){const i=this.getLobbyClient(e);i&&(i.unsubscribeAll(),i.getCommunication().dispose(),this.channels.remove({id:e})),this.listeners.where(r=>r.channel===e).forEach(r=>r.listener.detach()),this.listeners=this.listeners.where(r=>r.channel!==e),this.removeRoomListeners(e)}disconnectAll(){this.channels.forEach(e=>e.nsp.unsubscribeAll()),this.channels=new ie.UniqueList,this.listeners.forEach(e=>e.listener.detach()),this.listeners=new ie.List,this.currentRoomListeners.forEach(e=>e.listener.detach()),this.currentRoomListeners=new ie.List}getRoomByCode(e,i){return this.getLobbyClient(e).getRoomByCode({roomCode:i})}getRooms(e,i){return this.getLobbyClient(e).getRoomList(i)}createRoom(e){var i=this;return f(function*(){yield i.playClientService.currentPlayClient.createRoom({overrideSettings:e.settings,roomType:e.roomType})})()}joinRoom(e){var i=this;return f(function*(){yield i.playClientService.currentPlayClient.joinRoom({id:e.roomId,type:e.type},{seatId:e.seatId,roomCode:e.roomCode})})()}spectateRoom(e){var i=this;return f(function*(){yield i.playClientService.currentPlayClient.spectateRoom({id:e.roomId,type:e.type},{roomCode:e.roomCode})})()}kickPlayer(e){var i=this;return f(function*(){yield i.playClientService.currentPlayClient.activeClientModel.currentRoom.ban({playerId:e.playerId})})()}invitePlayer(e){var i=this;return f(function*(){yield i.playClientService.currentPlayClient.activeClientModel.currentRoom.invite({playerId:e.playerId,seatId:e.seatId})})()}cancelInvite(e){var i=this;return f(function*(){yield i.playClientService.currentPlayClient.activeClientModel.currentRoom.cancelInvite({seatId:e.seatId})})()}leaveRoom(){return this.playClientService.currentPlayClient.leaveCurrentRoom()}onRoomCreate(e,i){return new ie.EventListener(this.getLobbyClient(e).getCommunication(),Ve.ActiveRoomProtocol.Messages.CreatedRoom,i)}onRoomUpdate(e,i){return new ie.EventListener(this.getLobbyClient(e).getCommunication(),Ve.ActiveRoomProtocol.Messages.RoomUpdate,i)}onRoomsListUpdate(e,i){return new ie.EventListener(this.getLobbyClient(e).getCommunication(),Ve.MatchmakingProtocol.Messages.GetCustomRooms,i)}onRoomDestroy(e,i){return new ie.EventListener(this.getLobbyClient(e).getCommunication(),Ve.ActiveRoomProtocol.Messages.RoomDestroyed,i)}onCurrentRoomUpdate(e,i){return new ie.EventListener(this.events,"currentRoomUpdate-".concat(e),i)}onKickedFromRoom(e,i){return new ie.EventListener(this.events,"kickedFromRoom-".concat(e),i)}onReconnect(e,i){return this.getLobbyClient(e).getCommunication().onReconnect(i)}addListeners(e){const i=this.playClientService.currentPlayClient.activeClientModel.currentRoom;i&&(this.emitCurrentRoomUpdate(e,i.getViewModel()),this.addRoomListeners(e,i));const r=this.playClientService.currentPlayClient.stateEvents.onNewRoom(s=>{this.emitCurrentRoomUpdate(e,s.getViewModel()),this.addRoomListeners(e,s)});this.listeners.add({channel:e,listener:r})}addRoomListeners(e,i){this.currentRoomListeners.add({channel:e,listener:i.onKicked(()=>this.emitKicked(e,i.id))}),this.currentRoomListeners.add({channel:e,listener:i.onDispose(()=>{this.emitCurrentRoomUpdate(e,void 0),this.removeRoomListeners(e)})})}removeRoomListeners(e){this.currentRoomListeners.where(i=>i.channel===e).forEach(i=>i.listener.detach()),this.currentRoomListeners=this.currentRoomListeners.where(i=>i.channel!==e)}getLobbyClient(e){var i;return null===(i=this.channels.find(r=>r.id===e))||void 0===i?void 0:i.nsp}emitCurrentRoomUpdate(e,i){this.events.emit("currentRoomUpdate-".concat(e),i)}emitKicked(e,i){this.events.emit("kickedFromRoom-".concat(e),{roomId:i})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(oo),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var Zo=function(t){return t.InitLobby="[Room Lobby] Init lobby",t.GetNextPage="[Room Lobby] Get next page",t.UpdateCurrentRoom="[Room Lobby] Upate current room",t.UpdateRoomList="[Room Lobby] Update room list",t.UpdateRoom="[Room Lobby] Update Room",t.RoomCreated="[Room Lobby] Room Created",t.RoomDestroyed="[Room Lobby] Room Destroyed",t.KickedFromRoom="[Room Lobby] Kicked From Room",t.CreateRoom="[Room Lobby] Create Room",t.CreateRoomSuccess="[Room Lobby] Create Room Success",t.CreateRoomError="[Room Lobby] Create Room Error",t.GetRoom="[Room Lobby] Get Room",t.GetRoomSuccess="[Room Lobby] Get Room Success",t.GetRoomError="[Room Lobby] Get Room Error",t.JoinRoom="[Room Lobby] Join Room",t.JoinRoomSuccess="[Room Lobby] Join Room Success",t.JoinRoomError="[Room Lobby] Join Room Error",t.LeaveRoom="[Room Lobby] Leave Room",t.LeaveRoomSuccess="[Room Lobby] Leave Room Success",t.LeaveRoomError="[Room Lobby] Leave Room Error",t.InvitePlayer="[Room Lobby] Invite Player",t.InvitePlayerSuccess="[Room Lobby] Invite Player Success",t.InvitePlayerError="[Room Lobby] Invite Player Error",t.CancelInvitePlayer="[Room Lobby] Cancel Invite Player",t.CancelInvitePlayerSuccess="[Room Lobby] Cancel Invite Player Success",t.CancelInvitePlayerError="[Room Lobby] Cancel Invite Player Error",t.KickPlayer="[Room Lobby] Kick Player",t.KickPlayerSuccess="[Room Lobby] Kick Player Success",t.KickPlayerError="[Room Lobby] Kick Player Error",t.SpectateRoom="[Room Lobby] Spectate Room",t.SpectateRoomSuccess="[Room Lobby] Spectate Room Success",t.SpectateRoomError="[Room Lobby] Spectate Room Error",t.Disconnect="[Room Lobby] Disconnect",t.Reconnect="[Room Lobby] Reconnect",t.ResetGameLobbiesState="[Room Lobby] Reset game lobbies state",t.ClearDestroyedRooms="[Room Lobby] Clear Destroyed Rooms",t.ResetGameLobby="[Room Lobby] Reset game lobby",t}(Zo||{});const xq=he(Zo.InitLobby,{_as:"props",_p:void 0}),ATe=he(Zo.UpdateRoom,{_as:"props",_p:void 0}),RTe=he(Zo.RoomCreated,{_as:"props",_p:void 0}),kTe=he(Zo.RoomDestroyed,{_as:"props",_p:void 0}),LTe=he(Zo.KickedFromRoom,{_as:"props",_p:void 0}),DTe=he(Zo.UpdateCurrentRoom,{_as:"props",_p:void 0}),BTe=he(Zo.GetNextPage,{_as:"props",_p:void 0}),Aq=he(Zo.UpdateRoomList,{_as:"props",_p:void 0}),NTe=he(Zo.CreateRoom,{_as:"props",_p:void 0}),FTe=he(Zo.CreateRoomSuccess,{_as:"props",_p:void 0}),UTe=he(Zo.CreateRoomError,{_as:"props",_p:void 0}),GTe=he(Zo.GetRoom,{_as:"props",_p:void 0}),VTe=he(Zo.GetRoomSuccess,{_as:"props",_p:void 0}),zTe=he(Zo.GetRoomError,{_as:"props",_p:void 0}),jTe=he(Zo.JoinRoom,{_as:"props",_p:void 0}),HTe=he(Zo.JoinRoomSuccess,{_as:"props",_p:void 0}),qTe=he(Zo.JoinRoomError,{_as:"props",_p:void 0}),WTe=he(Zo.LeaveRoom,{_as:"props",_p:void 0}),$Te=he(Zo.LeaveRoomSuccess,{_as:"props",_p:void 0}),KTe=he(Zo.LeaveRoomError,{_as:"props",_p:void 0}),ZTe=he(Zo.InvitePlayer,{_as:"props",_p:void 0}),QTe=he(Zo.InvitePlayerSuccess,{_as:"props",_p:void 0}),YTe=he(Zo.InvitePlayerError,{_as:"props",_p:void 0}),JTe=he(Zo.CancelInvitePlayer,{_as:"props",_p:void 0}),XTe=he(Zo.CancelInvitePlayerSuccess,{_as:"props",_p:void 0}),ePe=he(Zo.CancelInvitePlayerError,{_as:"props",_p:void 0}),tPe=he(Zo.KickPlayer,{_as:"props",_p:void 0}),nPe=he(Zo.KickPlayerSuccess,{_as:"props",_p:void 0}),iPe=he(Zo.KickPlayerError,{_as:"props",_p:void 0}),oPe=he(Zo.SpectateRoom,{_as:"props",_p:void 0}),rPe=he(Zo.SpectateRoomSuccess,{_as:"props",_p:void 0}),sPe=he(Zo.SpectateRoomError,{_as:"props",_p:void 0}),aPe=he(Zo.Reconnect,{_as:"props",_p:void 0}),cPe=he(Zo.ClearDestroyedRooms,{_as:"props",_p:void 0}),lPe=he(Zo.ResetGameLobbiesState),uPe=he(Zo.ResetGameLobby,{_as:"props",_p:void 0}),Wa=ki({selectId:t=>t.id}),Os=ki({selectId:t=>t.model.id}),dPe={gameLobbies:Wa.getInitialState(),rooms:Os.getInitialState()},i$t=Sr(dPe,de(xq,(t,n)=>({...t,gameLobbies:Wa.upsertOne(n.lobby,t.gameLobbies)})),de(ATe,(t,n)=>{const o=t.rooms.entities[n.room.id];return o?{...t,rooms:Os.updateOne({id:n.room.id,changes:Se(o,e=>{e.model=lo.updateModel(n.room,e.model),e.startsAt=n.startsAt,e.isLocked=n.isLocked})},t.rooms)}:t}),de(Aq,(t,n)=>({...t,gameLobbies:Wa.updateOne({id:n.channel,changes:{loadingState:{isLoaded:!0,isLoading:!1,error:void 0}}},t.gameLobbies),rooms:Os.upsertMany(n.rooms,t.rooms)})),de(DTe,(t,n)=>({...t,gameLobbies:Wa.updateOne({id:n.channel,changes:{currentRoomId:n.roomId}},t.gameLobbies)})),de(BTe,(t,n)=>{const o=t.gameLobbies.entities[n.channel];return o?{...t,gameLobbies:Wa.updateOne({id:o.id,changes:Se(o,e=>{e.loadingState.isLoading=!0,e.loadingState.error=void 0,e.currentPage=n.args})},t.gameLobbies)}:t}),de(RTe,(t,n)=>({...t,rooms:Os.upsertOne(n.room,t.rooms)})),de(kTe,(t,n)=>{const o=t.rooms.entities[n.roomId];return o?{...t,rooms:Os.updateOne({id:n.roomId,changes:Se(o,e=>{e.destroyedState.isDestroyed=!0})},t.rooms)}:t}),de(LTe,(t,n)=>({...t,rooms:Os.removeOne(n.roomId,t.rooms)})),de(NTe,(t,n)=>{const o=t.gameLobbies.entities[n.channel];return o?{...t,gameLobbies:Wa.updateOne({id:o.id,changes:Se(o,e=>{e.actions.create.inProgress=!0})},t.gameLobbies)}:t}),de(FTe,(t,n)=>{const o=t.gameLobbies.entities[n.channel];return o?{...t,gameLobbies:Wa.updateOne({id:o.id,changes:Se(o,e=>{e.actions.create.inProgress=!1})},t.gameLobbies)}:t}),de(UTe,(t,n)=>{const o=t.gameLobbies.entities[n.channel];return o?{...t,gameLobbies:Wa.updateOne({id:o.id,changes:Se(o,e=>{e.actions.create.inProgress=!1})},t.gameLobbies)}:t}),de(GTe,(t,n)=>{const o=t.gameLobbies.entities[n.channel];return o?{...t,gameLobbies:Wa.updateOne({id:o.id,changes:Se(o,e=>{e.actions.getRoom.inProgress=!0})},t.gameLobbies)}:t}),de(VTe,(t,n)=>{const o=t.gameLobbies.entities[n.channel];return o?{...t,gameLobbies:Wa.updateOne({id:o.id,changes:Se(o,e=>{e.actions.getRoom.inProgress=!1})},t.gameLobbies)}:t}),de(zTe,(t,n)=>{const o=t.gameLobbies.entities[n.channel];return o?{...t,gameLobbies:Wa.updateOne({id:o.id,changes:Se(o,e=>{e.actions.getRoom.inProgress=!1})},t.gameLobbies)}:t}),de(jTe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.joinRoom.inProgress=!0})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.join.inProgress=!0})},t.rooms)}:t}),de(HTe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.joinRoom.inProgress=!1})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.join.inProgress=!1})},t.rooms)}:t}),de(qTe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.joinRoom.inProgress=!1})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.join.inProgress=!1})},t.rooms)}:t}),de(ZTe,(t,n)=>{const o=t.rooms.entities[n.args.roomId];return o?{...t,rooms:Os.updateOne({id:n.args.roomId,changes:Se(o,e=>{e.actions.invitePlayer.inProgress=!0})},t.rooms)}:t}),de(QTe,(t,n)=>{const o=t.rooms.entities[n.roomId];return o?{...t,rooms:Os.updateOne({id:n.roomId,changes:Se(o,e=>{e.actions.invitePlayer.inProgress=!1})},t.rooms)}:t}),de(YTe,(t,n)=>{const o=t.rooms.entities[n.roomId];return o?{...t,rooms:Os.updateOne({id:n.roomId,changes:Se(o,e=>{e.actions.invitePlayer.inProgress=!1})},t.rooms)}:t}),de(WTe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.leaveRoom.inProgress=!0})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.leave.inProgress=!0})},t.rooms)}:t}),de($Te,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.leaveRoom.inProgress=!1})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.leave.inProgress=!1})},t.rooms)}:t}),de(KTe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.leaveRoom.inProgress=!1})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.leave.inProgress=!1})},t.rooms)}:t}),de(tPe,(t,n)=>{const o=t.rooms.entities[n.args.roomId];return o?{...t,rooms:Os.updateOne({id:n.args.roomId,changes:Se(o,e=>{e.actions.kickPlayer.inProgress=!0})},t.rooms)}:t}),de(nPe,(t,n)=>{const o=t.rooms.entities[n.args.roomId];return o?{...t,rooms:Os.updateOne({id:n.args.roomId,changes:Se(o,e=>{e.actions.kickPlayer.inProgress=!1})},t.rooms)}:t}),de(iPe,(t,n)=>{const o=t.rooms.entities[n.args.roomId];return o?{...t,rooms:Os.updateOne({id:n.args.roomId,changes:Se(o,e=>{e.actions.kickPlayer.inProgress=!1})},t.rooms)}:t}),de(JTe,(t,n)=>{const o=t.rooms.entities[n.roomId];return o?{...t,rooms:Os.updateOne({id:n.roomId,changes:Se(o,e=>{e.actions.cancelInvite.inProgress=!0})},t.rooms)}:t}),de(XTe,(t,n)=>{const o=t.rooms.entities[n.roomId];return o?{...t,rooms:Os.updateOne({id:n.roomId,changes:Se(o,e=>{e.actions.cancelInvite.inProgress=!1})},t.rooms)}:t}),de(ePe,(t,n)=>{const o=t.rooms.entities[n.roomId];return o?{...t,rooms:Os.updateOne({id:n.roomId,changes:Se(o,e=>{e.actions.cancelInvite.inProgress=!1})},t.rooms)}:t}),de(oPe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.spectateRoom.inProgress=!0})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.spectate.inProgress=!0})},t.rooms)}:t}),de(rPe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.spectateRoom.inProgress=!1})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.spectate.inProgress=!1})},t.rooms)}:t}),de(sPe,(t,n)=>{const o=t.rooms.entities[n.roomId];if(!o)return t;const e=t.gameLobbies.entities[o.lobbyId];return e?{...t,gameLobbies:Wa.updateOne({id:e.id,changes:Se(e,i=>{i.actions.spectateRoom.inProgress=!1})},t.gameLobbies),rooms:Os.updateOne({id:n.roomId,changes:Se(o,i=>{i.actions.spectate.inProgress=!1})},t.rooms)}:t}),de(aPe,(t,n)=>({...t,rooms:Os.removeMany(o=>o.lobbyId===n.channelId,t.rooms)})),de(cPe,(t,n)=>({...t,rooms:Os.removeMany(o=>o.lobbyId===n.channel&&o.destroyedState.isDestroyed,t.rooms)})),de(lPe,t=>dPe),de(uPe,(t,n)=>({...t,gameLobbies:Wa.removeOne(n.channel,t.gameLobbies),rooms:Os.removeMany(o=>o.lobbyId===n.channel,t.rooms)})));function o$t(t,n){return i$t(t,n)}class hPe extends Error{constructor(){super(),this.name="InvalidBlitzNameError"}}function mPe(t){return t.gameLobby}const r$t=We(mPe,t=>t.gameLobbies),s$t=We(mPe,t=>t.rooms),Rq=Wa.getSelectors(r$t),kq=Os.getSelectors(s$t),fPe=()=>We(Rq.selectEntities,(t,n)=>t[n]),gPe=()=>We(kq.selectAll,(t,n)=>t.filter(o=>o.lobbyId===n.lobbyId)),_Pe=()=>We(kq.selectEntities,(t,n)=>t[n.roomId]),vPe=()=>We(Rq.selectEntities,(t,n)=>t[n].currentPage),bPe=()=>We(Rq.selectEntities,kq.selectEntities,(t,n,o)=>n[t[o].currentRoomId]);J.prototype.gameLobbies={selectGameLobbyState:function a$t(t){return this.selectSync(fPe(),t)}.bind(J.prototype),subscribeGameLobbyState:function c$t(t){return this.select(fPe(),t)}.bind(J.prototype),selectGameLobbyRooms:function l$t(t){return this.selectSync(gPe(),t)}.bind(J.prototype),subscribeGameLobbyRooms:function u$t(t){return this.select(gPe(),t)}.bind(J.prototype),selectGameLobbyRoomById:function d$t(t){return this.selectSync(_Pe(),t)}.bind(J.prototype),subscribeGameLobbyRoomById:function p$t(t){return this.select(_Pe(),t)}.bind(J.prototype),selectCurrentGameLobbyRoom:function h$t(t){return this.selectSync(bPe(),t)}.bind(J.prototype),subscribeCurrentGameLobbyRoom:function m$t(t){return this.select(bPe(),t)}.bind(J.prototype),selectCurrentPage:function f$t(t){return this.selectSync(vPe(),t)}.bind(J.prototype),subscribeCurrentPage:function g$t(t){return this.select(vPe(),t)}.bind(J.prototype)};let kD=(()=>{let t=class{constructor(o,e){this.destroyedState={isDestroyed:!1},this.actions={leave:{inProgress:!1},spectate:{inProgress:!1},join:{inProgress:!1},kickPlayer:{inProgress:!1},invitePlayer:{inProgress:!1},cancelInvite:{inProgress:!1}};for(let i in o)o.hasOwnProperty(i)&&(this[i]=o[i]);this.selectSimpleProfile=()=>e.selectSimpleProfile()}getPlayersCount(){return Oh.getPlayersCount(this.model)}isCurrentUserHost(){return this.selectSimpleProfile().id===this.model.hostId}hasActiveInvite(){return!!lo.hasReservedSeat(this.selectSimpleProfile().id,this.model.tables.filter(o=>0===o.tournamentRound))}isStarting(){return this.model.state===Ve.ERoomState.Waiting&&this.getPlayersCount()===this.model.settings.players.count}};return Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Number)],t.prototype,"getPlayersCount",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isCurrentUserHost",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"hasActiveInvite",null),Qe([un(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Boolean)],t.prototype,"isStarting",null),t=Qe([ko(),ue("design:paramtypes",[Object,J])],t),t})(),CPe=(()=>{let t=class{constructor(o){this.currentPage={startTimestamp:0,endTimestamp:0},this.loadingState={isLoading:!1,isLoaded:!1,error:void 0},this.actions={leaveRoom:{inProgress:!1},spectateRoom:{inProgress:!1},create:{inProgress:!1},getRoom:{inProgress:!1},joinRoom:{inProgress:!1}};for(let e in o)o.hasOwnProperty(e)&&(this[e]=o[e])}};return t=Qe([ko(),ue("design:paramtypes",[Object])],t),t})(),yPe=(()=>{var t;let n=((t=class{constructor(e,i,r,s){this.store=e,this.clientService=i,this.clubsService=r,this.time=s,this.listeners=new ie.List,this.getRoomTimers={}}connect(e){var i=this;return f(function*(){try{yield i.clientService.connect(e),i.store.dispatch(xq({lobby:new CPe({id:e})})),i.addListeners(e)}catch(r){throw jt.createErrorInstance(r)}})()}disconnect(e){var i;this.clientService.disconnect(e),this.listeners.where(r=>r.channel===e).forEach(r=>r.listener.detach()),this.listeners=this.listeners.where(r=>r.channel!==e),null===(i=this.unlockedPrivateRoomsSubscription)||void 0===i||i.unsubscribe(),this.clearGetRoomTimer(e),this.store.dispatch(uPe({channel:e}))}getRooms(e,i){this.clientService.getRooms(e,i),this.store.dispatch(BTe({channel:e,args:i})),this.addGetRoomsTimer(e)}getNextRooms(e,i={olderBySeconds:0}){const r=this.store.gameLobbies.selectCurrentPage(e);this.getRooms(e,{startTimestamp:r.startTimestamp?r.startTimestamp-i.olderBySeconds:this.time.getServerTimeS()-i.olderBySeconds,endTimestamp:r.endTimestamp?r.startTimestamp:this.time.getServerTimeS()})}getRoom(e,i){var r=this;return f(function*(){try{r.store.dispatch(GTe({channel:e}));const s=yield r.clientService.getRoomByCode(e,i.roomCode),a=new kD({lobbyId:e,model:s,host:r.getHostProfile(s),isLocked:!!s.settings.locked&&!1===r.store.games.selectIsUnlockedPrivateRoom(s.id),startsAt:Oh.isFull(s)?r.time.getServerTimeS()+Gn.toSeconds(s.settings.timers.waitingStateEndTimer):void 0,club:s.settings.requirements.clubId?yield r.getClubProfile(s.settings.requirements.clubId):void 0},r.store);return r.store.dispatch(VTe({channel:e,room:a})),s}catch(s){const a=jt.createErrorInstance(s);throw console.warn(a),r.store.dispatch(zTe({channel:e})),a}})()}joinRoom(e){var i=this;return f(function*(){try{i.store.dispatch(jTe({roomId:e.roomId})),yield i.clientService.joinRoom(e),i.store.dispatch(HTe({roomId:e.roomId}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(qTe({roomId:e.roomId})),s}})()}spectateRoom(e){var i=this;return f(function*(){try{i.store.dispatch(oPe({roomId:e.roomId})),yield i.clientService.spectateRoom(e),i.store.dispatch(rPe({roomId:e.roomId}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(sPe({roomId:e.roomId})),s}})()}createRoom(e,i){var r=this;return f(function*(){try{r.store.dispatch(NTe({channel:e})),yield r.clientService.createRoom(i),r.store.dispatch(FTe({channel:e}))}catch(s){const a=jt.createErrorInstance(s);throw console.warn(a),r.store.dispatch(UTe({channel:e})),a}})()}leaveRoom(e){var i=this;return f(function*(){try{i.store.dispatch(WTe({roomId:e})),yield i.clientService.leaveRoom(),i.store.dispatch($Te({roomId:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(KTe({roomId:e})),s}})()}invitePlayer(e){var i=this;return f(function*(){try{i.store.dispatch(ZTe({args:e})),yield i.clientService.invitePlayer(e),i.store.dispatch(QTe({roomId:e.roomId}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(YTe({roomId:e.roomId})),s}})()}cancelInvite(e){var i=this;return f(function*(){try{i.store.dispatch(JTe(e)),yield i.clientService.cancelInvite(e),i.store.dispatch(XTe(e))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(ePe(e)),s}})()}kickPlayer(e){var i=this;return f(function*(){try{i.store.dispatch(tPe({args:e})),yield i.clientService.kickPlayer(e),i.store.dispatch(nPe({args:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(iPe({args:e})),s}})()}clearDestroyedRooms(e){this.store.dispatch(cPe({channel:e}))}onRoomCreate(e,i){var r=this;return f(function*(){const s=new kD({lobbyId:e,model:i,isLocked:!!i.settings.locked&&!1===r.store.games.selectIsUnlockedPrivateRoom(i.id),host:r.getHostProfile(i),startsAt:Oh.isFull(i)?r.time.getServerTimeS()+Gn.toSeconds(i.settings.timers.waitingStateEndTimer):void 0,club:i.settings.requirements.clubId?yield r.getClubProfile(i.settings.requirements.clubId):void 0},r.store);r.store.dispatch(RTe({room:s}))})()}onRoomUpdate(e){const i=this.store.gameLobbies.selectGameLobbyRoomById({roomId:e.id});i&&this.store.dispatch(ATe({room:e,startsAt:i&&Oh.isFull(i.model)?this.time.getServerTimeS()+Gn.toSeconds(i.model.settings.timers.waitingStateEndTimer):void 0,isLocked:!!i.model.settings.locked&&!1===this.store.games.selectIsUnlockedPrivateRoom(e.id)}))}onRoomsListUpdate(e,i){var r=this;return f(function*(){const s=yield r.getClubsProfiles(i.filter(a=>a.settings.requirements.clubId).map(a=>a.settings.requirements.clubId));r.store.dispatch(Aq({channel:e,rooms:i.map(a=>new kD({lobbyId:e,model:a,isLocked:!!a.settings.locked&&!1===r.store.games.selectIsUnlockedPrivateRoom(a.id),startsAt:Oh.isFull(a)?r.time.getServerTimeS()+Gn.toSeconds(a.settings.timers.waitingStateEndTimer):void 0,host:r.getHostProfile(a),club:s.clubs.find(c=>c.clubProfile.id===a.settings.requirements.clubId)},r.store))}))})()}onRoomDestroy(e){this.store.dispatch(kTe({roomId:e}))}onKicked(e,i){this.store.dispatch(LTe({channel:e,roomId:i}))}onCurrentRoomUpdate(e,i){this.store.dispatch(DTe({channel:e,roomId:i}))}onReconnect(e){this.clearGetRoomTimer(e);const i=this.store.gameLobbies.selectCurrentPage(e);this.store.dispatch(aPe({channelId:e})),this.store.dispatch(xq({lobby:new CPe({id:e})})),this.getNextRooms(e,{olderBySeconds:i.endTimestamp-i.startTimestamp})}addListeners(e){this.addChannelListener(e,this.clientService.onRoomCreate(e,i=>this.onRoomCreate(e,i))),this.addChannelListener(e,this.clientService.onRoomUpdate(e,i=>this.onRoomUpdate(i))),this.addChannelListener(e,this.clientService.onRoomsListUpdate(e,i=>this.onRoomsListUpdate(e,i))),this.addChannelListener(e,this.clientService.onRoomDestroy(e,i=>this.onRoomDestroy(i))),this.addChannelListener(e,this.clientService.onReconnect(e,()=>this.onReconnect(e))),this.addChannelListener(e,this.clientService.onKickedFromRoom(e,i=>this.onKicked(e,i))),this.addChannelListener(e,this.clientService.onCurrentRoomUpdate(e,i=>this.onCurrentRoomUpdate(e,null==i?void 0:i.id))),this.unlockedPrivateRoomsSubscription=this.store.games.subscribeUnlockedPrivateRooms().subscribe(i=>{i.forEach(r=>{this.onRoomUpdate({id:r.id})})})}addChannelListener(e,i){this.listeners.add({channel:e,listener:i})}getClubProfile(e){var i=this;return f(function*(){var r;let s;const a=i.store.clubs.selectCurrentClub();if((null==a||null===(r=a.clubState)||void 0===r||null===(r=r.clubProfile)||void 0===r?void 0:r.id)===e)s={clubProfile:a.clubState.clubProfile,inventory:a.inventory};else try{s=yield i.clubsService.getClubProfile(e)}catch(c){console.log("Game lobby get club error",c)}return s})()}getClubsProfiles(e){var i=this;return f(function*(){let r={clubs:[]};if(!e.length)return r;if(e.length>1)try{r=yield i.clubsService.getClubsProfiles({clubsIds:e})}catch(s){console.log("Game lobby service get clubs error",s)}else{const s=yield i.getClubProfile(e[0]);s&&r.clubs.push(s)}return r})()}addGetRoomsTimer(e){this.clearGetRoomTimer(e);const i=setTimeout(()=>{this.store.dispatch(Aq({channel:e,rooms:[]}))},1e4);this.getRoomTimers[e]=i}clearGetRoomTimer(e){clearTimeout(this.getRoomTimers[e])}getHostProfile(e){if(!e.hostId)return;const i=lo.findMostRecentPlayerProfile(e.hostId,e.tables);return Lo.toPlatformProfile(null==i?void 0:i.profile)}clearTimers(){Object.keys(this.getRoomTimers).forEach(e=>clearTimeout(this.getRoomTimers[e]))}onLogout(){var e;this.store.dispatch(lPe()),this.listeners.forEach(i=>i.listener.detach()),null===(e=this.unlockedPrivateRoomsSubscription)||void 0===e||e.unsubscribe(),this.listeners=new ie.List,this.clientService.disconnectAll(),this.clearTimers()}}).\u0275fac=function(e){return new(e||t)(T(J),T(Eq),T(ru),T(Bn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"onLogout",null),n=Qe([Wo(),ue("design:paramtypes",[J,Eq,ru,Bn])],n),n})(),_$t=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[yPe,Eq],imports:[$r.forFeature("gameLobby",o$t)]}),n})();class yO{static calculatePriceByFields(n,o,e){const i={chips:0,gems:0};return o.filter(s=>!!e.find(a=>a===s.id)&&n.find(a=>a.id===s.id)).map(s=>({...n.find(a=>a.id===s.id),...s})).forEach(s=>{var a,c;s.format===Si.EFormat.Chips||s.format===Si.EFormat.Currency&&(null===(a=s.value)||void 0===a?void 0:a.currencyType)===ln.Chips?i.chips+=yO.getValueFromField(s):(s.format===Si.EFormat.Gems||s.format===Si.EFormat.Currency&&(null===(c=s.value)||void 0===c?void 0:c.currencyType)===ln.Gems)&&(i.gems+=yO.getValueFromField(s))}),i}static getValueFromField(n){return n.format===Si.EFormat.Currency?n.value.amount:n.value}}const v$t=()=>({key:"CUSTOM_GAMES.JOIN_GAME"});let SPe=(()=>{var t;class n{constructor(e,i){this.cdr=i,this.close=new ke,this.join=new ke,this.EPopupTitleType=li,this.EButtonModifier=ve.EButtonModifier,this.popupContainerOptions={styleProperties:{maxWidth:"40rem",height:"auto",maxHeight:"98%"},customComponentCssClass:"cg-join-popup__popup-container"},this.form=e.group({roomCodeInput:["",Ln.required]}),this.input=this.form.controls.roomCodeInput,this.error={key:""}}closePopup(){this.close.emit()}joinRoom(){const e=this.input.value;!e||""===e||this.join.emit({roomCode:e})}onInputChange(){this.error.key=""}setIsLoading(e){this.isLoading=e,this.cdr.detectChanges()}setError(e){this.error=e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(td),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["game-lobby-join-room-popup"]],inputs:{isLoading:"isLoading",error:"error"},outputs:{close:"close",join:"join"},decls:13,vars:19,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],[1,"cg-join-popup__content-section"],[1,"cg-join-popup__room-code-label"],["novalidate","",3,"formGroup","submit"],[1,"cg-join-popup__input-wrapper"],["formControlName","roomCodeInput",1,"cg-join-popup__room-code-input",3,"placeholder","errorMessage","onClear","onChange"],[1,"cg-join-popup__join-button",3,"type","buttonModifier","loading"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closePopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closePopup()}),m(),p(2,"div",2)(3,"p",3),H(4),V(5,"translate"),m(),p(6,"form",4),Y("submit",function(){return i.joinRoom()}),p(7,"div",5)(8,"user-input",6),Y("onClear",function(){return i.onInputChange()})("onChange",function(){return i.onInputChange()}),V(9,"translate"),m()(),p(10,"button-text",7),H(11),V(12,"translate"),m()()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.EPopupTitleType.Static)("text",pt(18,v$t)),d(3),se($(5,12,"CUSTOM_GAMES.ENTER_ROOM_CODE")),d(2),l("formGroup",i.form),d(2),l("placeholder","")("errorMessage",$(9,14,i.error.key)),d(2),l("type","submit")("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION)("loading",i.isLoading),d(),ze(" ",$(12,16,"CUSTOM_GAMES.JOIN")," "))},dependencies:[pn,Ji,Wi,il,Su,Ql,yu,wl,Yl,qe],styles:[".cg-join-popup__room-code-label[_ngcontent-%COMP%]{font-size:2.2rem;font-weight:600;text-align:center;width:100%;padding:5% 0}@media screen and (max-width: 568px){.cg-join-popup__room-code-label[_ngcontent-%COMP%]{font-size:2rem}}.cg-join-popup__room-code-input[_ngcontent-%COMP%]{font-weight:600;text-align:center}.cg-join-popup__join-button[_ngcontent-%COMP%]{margin:10% auto;width:45%}.cg-join-popup__input-wrapper[_ngcontent-%COMP%]{width:80%;margin:auto}"],changeDetection:0}),n})();var wPe=nt.EPermissionModule,TPe=nt.EModuleAction,b$t=ve.EIcons;const C$t=["formBuilder"];function y$t(t,n){if(1&t&&(p(0,"div",11)(1,"span"),H(2),V(3,"translate"),m()()),2&t){const o=_().$implicit,e=_(2);d(2),se($(3,1,e.getInfoFieldKey(o)))}}function S$t(t,n){if(1&t&&U(0,y$t,4,3,"div",10),2&t){const o=n.$implicit;l("ngIf",_(2).getInfoFieldKey(o))}}function w$t(t,n){if(1&t){const o=Ce();p(0,"div",6)(1,"form-builder",7,8),Y("onOptionSelect",function(i){return oe(o),re(_().onSettingSelect(i))}),U(3,S$t,1,1,"ng-template",null,9,ft),m()()}if(2&t){const o=_();d(),l("config",o.formFields)("errors",o.errors)}}const PPe=()=>({iconClass:"create--club--button-currency-icon"});function T$t(t,n){if(1&t&&B(0,"currency-label",15),2&t){const o=_(3);l("valueConfig",pt(3,PPe))("value",o.price.chips)("type",o.ECurrencyType.Chips)}}function P$t(t,n){if(1&t&&B(0,"currency-label",15),2&t){const o=_(3);l("valueConfig",pt(3,PPe))("value",o.price.gems)("type",o.ECurrencyType.Gems)}}function I$t(t,n){if(1&t&&(p(0,"span",13),U(1,T$t,1,4,"currency-label",14)(2,P$t,1,4,"currency-label",14),m()),2&t){const o=_(2);d(),l("ngIf",o.price.chips),d(),l("ngIf",o.price.gems)}}function M$t(t,n){if(1&t&&(p(0,"span")(1,"span"),H(2),V(3,"translate"),m(),U(4,I$t,3,2,"span",12),m()),2&t){const o=_();d(2),se($(3,2,"WORDS.CREATE")),d(2),l("ngIf",o.price)}}const O$t=t=>[t];function E$t(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",yt(2,1,"TEXT.LEVEL",ne(4,O$t,o.getMinLevelRequirement()))," ")}}const x$t=()=>({key:"CUSTOM_GAMES.JOIN_GAME"}),A$t=t=>({name:t});let IPe=(()=>{var t;class n{set config(e){this._config=e,this.formFields=this.transformOptions(e.customSettings),this.cdr.detectChanges()}set isLoading(e){this._isLoading=e,this.cdr.detectChanges()}set errors(e){this._errors={...e},this.cdr.detectChanges()}get isLoading(){return this._isLoading}get config(){return this._config}get errors(){return this._errors}get selected(){return this._selected||this.formBuilder.form.currentSelected}set selected(e){this._selected=e}constructor(e,i,r,s){this.cdr=e,this.store=i,this.optionsService=r,this.permissions=s,this.close=new ke,this.change=new ke,this.create=new ke,this.EPopupTitleType=li,this.EButtonModifier=ve.EButtonModifier,this.ECurrencyType=ln,this.formFields=[],this.iconNames=b$t,this._selected=[],this._errors={},this.popupContainerOptions={styleProperties:{maxWidth:"40rem",height:"calc(100% - 4rem)",maxHeight:"70rem"},customComponentCssClass:"cg-join-popup__popup-container"}}closePopup(){this.close.emit()}createRoom(){this.create.emit(this.selected)}setIsLoading(e){this.isLoading=e,this.cdr.detectChanges()}onSettingSelect(e){this.selected=e,this.change.emit(e),this.cdr.detectChanges()}setPrice(e){this.price=e,this.cdr.detectChanges()}updateField(e){const i=this.formFields.findIndex(r=>r.id===e.id);this.formFields[i]=SD(e,this.formFields[i]),this.formFields=[...this.formFields],this.formBuilder.fieldSelectValue({id:e.id,state:e.defaultValue},!1),this.cdr.detectChanges()}isCreateDisabled(){const e=this.permissions.getActionPermission(wPe.CustomBlitzTournaments,TPe.Create);return!e.isPermitted&&!e.minLevelRequirement.isFulfilled}getMinLevelRequirement(){return this.permissions.getActionPermission(wPe.CustomBlitzTournaments,TPe.Create).minLevelRequirement.requiredLevel}getInfoFieldKey(e){switch(e.id){case"transactions.bet":case"transactions.hostProvidedReward.amount":return"TOURNAMENTS.BLITZ.AMOUNT_WILL_BE_TAKEN_WHEN_TORUNAMENT_STARTS";default:return}}transformOptions(e){let i=this.optionsService.getInventoryItemOptions(e);const r=i.findIndex(a=>"requirements.minLevel"===a.id);if(-1!==r){const a=i[r];i[r].options=a.masterFieldId&&null===a.options[0].value&&this.store.selectSimpleProfile().level<a.options[1].value?[a.options[0],a.options[1]]:a.options.filter(c=>c.value<=this.store.selectSimpleProfile().level)}this.store.clubs.selectClubProfile()||(i=i.filter(a=>"requirements.clubRoom"!==a.id&&"transactions.placementRewards.1.clubContribution"!==a.id));const s=i.findIndex(a=>"transactions.bet"===a.id);return-1!==s&&(i[s].defaultValue=new $1e(this.store.selectSimpleProfile().level,i[s].options).getSuggestedBet()),i=this.transformToChipsField("totalPool",i),i=this.transformToChipsField("prizePoolMultiplier.1.place",i),i=this.transformToChipsField("prizePoolMultiplier.2.place",i),i=this.transformToChipsField("hostPayout",i),i}transformToChipsField(e,i){const r=i.findIndex(s=>s.id===e);return-1!==r&&(i[r]={...i[r],format:Ei.EFormat.Chips,defaultValue:{label:"NONE",value:null},options:[{label:"NONE",value:null}]}),i}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(J),g(Ig),g(Ti))},t.\u0275cmp=pe({type:t,selectors:[["game-lobby-create-room-popup"]],viewQuery:function(e,i){if(1&e&&$e(C$t,5),2&e){let r;je(r=He())&&(i.formBuilder=r.first)}},inputs:{config:"config",isLoading:"isLoading",errors:"errors"},outputs:{close:"close",change:"change",create:"create"},decls:7,vars:14,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],["class","custom-blitz-create__content-section",4,"ngIf"],[1,"custom-blitz-create__container--button-play"],[1,"custom-blitz-create__button--play",3,"buttonModifier","loading","icon","disabled","onClick"],[4,"ngIf"],[1,"custom-blitz-create__content-section"],[3,"config","errors","onOptionSelect"],["formBuilder",""],["fieldInfo",""],["class","custom-blitz-create__container--field-info",4,"ngIf"],[1,"custom-blitz-create__container--field-info"],["class","custom-blitz--price",4,"ngIf"],[1,"custom-blitz--price"],["class","custom-blitz--price--currency",3,"valueConfig","value","type",4,"ngIf"],[1,"custom-blitz--price--currency",3,"valueConfig","value","type"]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closePopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closePopup()}),m(),U(2,w$t,5,2,"div",2),p(3,"div",3)(4,"button-icon-text",4),Y("onClick",function(){return i.createRoom()}),U(5,M$t,5,4,"span",5)(6,E$t,3,6,"span",5),m()()()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.EPopupTitleType.Static)("text",pt(11,x$t)),d(),l("ngIf",i.config),d(2),l("buttonModifier",i.EButtonModifier.BUTTON_ATTENTION)("loading",i.isLoading)("icon",ne(12,A$t,i.isCreateDisabled()?i.iconNames.LOCKER:void 0))("disabled",i.isCreateDisabled()),d(),l("ngIf",!i.isCreateDisabled()),d(),l("ngIf",i.isCreateDisabled()))},dependencies:[Ne,so,Ji,Wi,Xd,Yh,qe],styles:[".custom-blitz-create__content-section[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;margin:0 auto;padding:.5rem;width:96%;height:calc(100% - 13rem)}@media only screen and (max-height: 768px){.custom-blitz-create__content-section[_ngcontent-%COMP%]{height:calc(100% - 11rem)}}@media only screen and (max-height: 480px){.custom-blitz-create__content-section[_ngcontent-%COMP%]{padding:0 .5rem}}@media only screen and (max-height: 360px){.custom-blitz-create__content-section[_ngcontent-%COMP%]{height:calc(100% - 11rem)}}.custom-blitz-create__container--button-play[_ngcontent-%COMP%]{padding:2rem 0}@media only screen and (max-height: 768px){.custom-blitz-create__container--button-play[_ngcontent-%COMP%]{padding:.5rem 0}}@media only screen and (max-height: 360px){.custom-blitz-create__container--button-play[_ngcontent-%COMP%]{padding:0}}@media only screen and (max-height: 360px){.custom-blitz-create__container--button-play[_ngcontent-%COMP%]{padding:.5rem 0}}.custom-blitz-create__button--play[_ngcontent-%COMP%]{width:80%}.custom-blitz--price--currency[_ngcontent-%COMP%]{margin:0 .5rem}.custom-blitz-create__container--field-info[_ngcontent-%COMP%]{text-align:center;padding:1rem 0}"],changeDetection:0}),n})();var fy=__webpack_require__(43024);let LD=(()=>{var t;class n{constructor(e,i){this.gamePage=Xs.gameRoute,this.constants=e,this.config=i}createGameLobbyPage(e){var i;return null!==(i=this.config.getGameRelatedConfig(e).gameConfig.grid)&&void 0!==i&&null!==(i=i.lobby)&&void 0!==i&&i.length?"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(e),"/lobby"):this.constants.defaultLoggedRoute}createRoomPage(e,i,r){switch(e){case fy.RoomType.Custom:return"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/custom-games");case fy.RoomType.BlitzTournament:return null!=r&&r.hostId?"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/tournaments/custom/blitz/").concat(r.id):"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/tournaments/blitz");default:return}}createRoomReturnPage(e,i,r){var s;switch(e){case fy.RoomType.Custom:return"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/custom-games");case fy.RoomType.KnockoutTournament:return"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/tournaments");case fy.RoomType.BlitzTournament:return null!=r&&r.hostId?"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/tournaments/custom"):"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/tournaments");case fy.RoomType.PromoTournament:return"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/tournaments");case fy.RoomType.Matchmaking:return null!=r&&null!==(s=r.settings)&&void 0!==s&&s.competitive?"".concat(this.constants.defaultLoggedRoute).concat(n.buildGameIdUrlParam(i),"/lobby/ranked"):this.createGameLobbyPage(i);default:return this.createGameLobbyPage(i)}}static buildGameIdUrlParam(e){return e?"/".concat(e):""}}return(t=n).\u0275fac=function(e){return new(e||t)(T(tn),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),MPe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){this.store=e,this.gamesStateService=i,this.gameLobbyService=r,this.rootContainerService=s,this.popupService=a,this.toastService=c,this.fieldValidatorFactory=u,this.profanityFilterService=h,this.navigation=b,this.roomsPages=w,this.blockService=R,this.languageService=G,this.offerService=K,this.nsp="".concat(this.gamesStateService.getCurrentGameState().id,"-blitz-custom-lobby")}ngOnDestroy(){var e,i;null===(e=this.joinPopup)||void 0===e||e.destroy(),null===(i=this.createPopup)||void 0===i||i.destroy(),this.gameLobbyService.disconnect(this.nsp)}connect(){return Promise.all([this.blockService.getBlockList(),this.gameLobbyService.connect(this.nsp)])}createRoom(){const e=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.blitzTournaments;this.createPopup=this.rootContainerService.createComponent(IPe),this.createPopup.instance.config=e,this.updateCreateForm(this.createPopup.instance.selected),this.createPopup.instance.change.subscribe(i=>this.updateCreateForm(i)),this.createPopup.instance.close.subscribe(()=>{var i;return null===(i=this.createPopup)||void 0===i?void 0:i.destroy()}),this.createPopup.instance.create.subscribe(i=>{this.tryCreateRoom(i)})}joinRoom(){var e=this;this.joinPopup=this.rootContainerService.createComponent(SPe),this.joinPopup.instance.join.subscribe(function(){var i=f(function*(r){try{var s;e.joinPopup.instance.setIsLoading(!0);const a=yield e.gameLobbyService.getRoom(e.nsp,{roomCode:r.roomCode});e.navigation.navigateByUrl(e.roomsPages.createRoomPage(a.settings.type,a.settings.game.name,a),{state:{roomCode:r.roomCode}}),null===(s=e.joinPopup)||void 0===s||s.destroy()}catch(a){let c;console.log(a),c=a instanceof lt.NetworkError?{key:"ERRORS.CONNECTION_ERROR"}:c instanceof Cr?{key:"ERRORS.SOMETHING_WRONG"}:{key:"CUSTOM_GAMES.ROOM_CODE_ERROR"},e.joinPopup.instance.setError(c)}finally{e.joinPopup.instance.setIsLoading(!1)}});return function(r){return i.apply(this,arguments)}}()),this.joinPopup.instance.close.subscribe(()=>{var i;null===(i=this.joinPopup)||void 0===i||i.destroy()})}clearDestroyedRooms(){this.gameLobbyService.clearDestroyedRooms(this.nsp)}getNextRooms(){this.gameLobbyService.getNextRooms(this.nsp,{olderBySeconds:this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.blitzTournaments.nextPageTimeInterval/1e3})}throwIfRequirementsNotMet(e){const i=this.calcTournamentPrice(e);if(this.store.selectWallet().chips<i.chips)throw new et.NotEnoughMinerals;if(this.store.selectWallet().gems<i.gems)throw new et.NotEnoughGems;const r=e.find(a=>"description"===a.id).value;if(this.profanityFilterService.containsBadWord(r,this.languageService.getAppLanguage()))throw new et.ForbiddenWord;const s=this.fieldValidatorFactory.createBlitzTournamentNameValidator();if(!s.isValid(r))throw s.forbiddenValues.find(a=>a==r)?new et.ForbiddenWord:new hPe}calcCreatePrice(e){const i=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.blitzTournaments;return yO.calculatePriceByFields(i.customSettings,e,["transactions.hostFee","transactions.hostProvidedReward.amount"])}calcTournamentPrice(e){const i=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.blitzTournaments;return yO.calculatePriceByFields(i.customSettings,e,["transactions.hostFee","transactions.hostProvidedReward.amount","transactions.bet"])}calcPlaceReward(e,i){const s=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.presets.find(a=>"customRoyal"===a.presetId).transactions.placementRewards[e].prizePoolMultiplier;return this.calcTotalPool(i)*s}calcHostCut(e){const i=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.presets.find(r=>"customRoyal"===r.presetId);return this.calcTotalPool(e)*i.transactions.hostCut.prizePoolMultiplier}calcTotalPool(e){return e.find(a=>"transactions.bet"===a.id).value*e.find(a=>"players.count"===a.id).value+e.find(a=>"transactions.hostProvidedReward.amount"===a.id).value}updateTotalPool(e){const i=this.createPopup.instance.formFields.find(r=>"totalPool"===r.id);i&&(i.defaultValue={value:this.calcTotalPool(e)},this.createPopup.instance.updateField(i))}updatePlaceRewards(e){const i=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.presets.find(r=>"customRoyal"===r.presetId);Object.keys(i.transactions.placementRewards).forEach((r,s)=>{const a=s+1,c=this.createPopup.instance.formFields.find(u=>u.id==="prizePoolMultiplier.".concat(a,".place"));c&&(c.defaultValue={value:this.calcPlaceReward(a,e)},this.createPopup.instance.updateField(c))})}updateHostCut(e){const i=this.createPopup.instance.formFields.find(r=>"hostPayout"===r.id);i.defaultValue={value:this.calcHostCut(e)},this.createPopup.instance.updateField(i)}filterOptions(e,...i){return e.filter(r=>!i.find(s=>r.id===s))}updateCreateForm(e){this.createPopup.instance.setPrice(this.calcCreatePrice(e)),this.updateTotalPool(e),this.updateHostCut(e),this.updatePlaceRewards(e)}tryCreateRoom(e){var i=this;return f(function*(){try{i.throwIfRequirementsNotMet(e),i.createPopup.instance.setIsLoading(!0),i.createPopup.instance.errors={},i.popupService.confirm({textParams:{translationKey:"TOURNAMENTS.CONFIRM_CREATE"},buttons:{action:(s=f(function*(){try{var a;yield i.gameLobbyService.createRoom(i.nsp,{roomType:Jt.RoomType.BlitzTournament,settings:i.filterOptions(e,"totalPool","hostPayout","prizePoolMultiplier.1.place","prizePoolMultiplier.2.place")}),null===(a=i.createPopup)||void 0===a||a.destroy()}catch(c){console.log(c),i.toastService.error(c instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}}),function(){return s.apply(this,arguments)})}})}catch(s){if(console.log(s),s instanceof et.NotEnoughMinerals)i.offerService.offerCurrency({targetValue:i.calcTournamentPrice(e).chips,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"},action:()=>{var a;return null===(a=i.createPopup)||void 0===a?void 0:a.destroy()}});else if(s instanceof et.NotEnoughGems)i.offerService.offerCurrency({targetValue:i.calcTournamentPrice(e).gems,itemType:Fe.TG.GemsPack,description:{key:"POPUP.BUY_GEMS_QUESTION"},action:()=>{var a;return null===(a=i.createPopup)||void 0===a?void 0:a.destroy()}});else if(s instanceof et.ForbiddenWord)i.createPopup.instance.errors={description:{key:"TEXT.FORBIDDEN_WORD"}};else if(s instanceof hPe){const a=i.fieldValidatorFactory.createBlitzTournamentNameValidator();i.createPopup.instance.errors={description:{key:"TOURNAMENTS.INVALID_TOURNAMENT_NAME",params:[a.minLength,a.maxLength]}}}else i.toastService.error("ERRORS.SOMETHING_WRONG")}finally{var r;null===(r=i.createPopup)||void 0===r||r.instance.setIsLoading(!1)}var s})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Zn),T(yPe),T(Ia),T(Cn),T(Dt),T(wa),T(JA),T(Yt),T(LD),T(t0),T(Ma),T(Sc))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const R$t=["formBuilder"];function k$t(t,n){if(1&t&&(p(0,"div",3),B(1,"form-builder",4,5),m()),2&t){const o=_();d(),l("config",o.formFields)}}const L$t=()=>({key:"LABEL.RULES"});let OPe=(()=>{var t;class n{constructor(e,i,r){this.cdr=e,this.optionsService=i,this.gamesStateService=r,this.close=new ke,this.EPopupTitleType=li,this.EButtonModifier=ve.EButtonModifier,this.formFields=[],this.popupContainerOptions={styleProperties:{maxWidth:"40rem",height:"calc(100% - 4rem)",maxHeight:"70rem"},customComponentCssClass:"cg-join-popup__popup-container"}}ngOnInit(){const e=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.blitzTournaments;this.formFields=this.transformOptions(e.customSettings,this.roomSettings),this.cdr.detectChanges()}closePopup(){this.close.emit()}transformOptions(e,i){let r=this.optionsService.getInventoryItemOptions(e);return r=this.mapCustomFields(r,i),r=r.map(s=>{var a;let u,c=_2()(i,s.id);const h=null===(a=s.options)||void 0===a?void 0:a.find(b=>b.label&&b.value===c);return h&&(u=h.label),(s.customTag===Jt.PlayerItemType.Deck||s.customTag===Jt.PlayerItemType.Table)&&(c=i.game.inventory.find(b=>b.type===s.customTag)),this.optionsService.transformFieldToInfo(s,c,u)}),r}transformCustomField(e,i){return"totalPool"===e.id?{...e,id:"transactions.prizePool",format:Ei.EFormat.Chips}:"prizePoolMultiplier.1.place"===e.id?{...e,id:"transactions.placementRewards.1.amount",format:(null===(r=i.transactions.placementRewards[1])||void 0===r?void 0:r.currencyType)===ln.Chips?Ei.EFormat.Chips:Ei.EFormat.Gems}:"prizePoolMultiplier.2.place"===e.id?{...e,id:"transactions.placementRewards.2.amount",format:(null===(s=i.transactions.placementRewards[2])||void 0===s?void 0:s.currencyType)===ln.Chips?Ei.EFormat.Chips:Ei.EFormat.Gems}:"hostPayout"===e.id?{...e,id:"transactions.hostCut.amount",format:i.transactions.hostCut.currencyType===ln.Chips?Ei.EFormat.Chips:Ei.EFormat.Gems}:e;var r,s}mapCustomFields(e,i){return e.map(r=>this.transformCustomField(r,i))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Ig),g(Zn))},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-room-rules-popup"]],viewQuery:function(e,i){if(1&e&&$e(R$t,5),2&e){let r;je(r=He())&&(i.formBuilder=r.first)}},outputs:{close:"close"},decls:3,vars:6,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],["class","custom-blitz-rules__content-section",4,"ngIf"],[1,"custom-blitz-rules__content-section"],[3,"config"],["formBuilder",""]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closePopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closePopup()}),m(),U(2,k$t,3,1,"div",2),m()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.EPopupTitleType.Static)("text",pt(5,L$t)),d(),l("ngIf",i.formFields))},dependencies:[Ne,Ji,Wi,Xd],styles:[".custom-blitz-rules__content-section[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;margin:0 auto;padding:.5rem;width:96%;height:calc(100% - 6rem)}"],changeDetection:0}),n})();var D$t=ve.EButtonModifier;const B$t=["startTimer"],N$t=["expireTimer"],EPe=()=>({color:"white"});function F$t(t,n){if(1&t){const o=Ce();p(0,"timer",30,31),Y("onCountdownFinished",function(){return oe(o),re(_(4).onExpireTimerEnd())}),m()}2&t&&l("milliseconds",_(4).getExpiresIn())("styleObject",pt(2,EPe))}function U$t(t,n){if(1&t&&(Tn(0),p(1,"span"),H(2),V(3,"translate"),m(),U(4,F$t,2,3,"timer",29),Pn()),2&t){const o=_(3);d(2),se($(3,2,"TOURNAMENTS.BLITZ.EXPIRES_AFTER")),d(2),l("ngIf",!o.roomState.destroyedState.isDestroyed)}}function G$t(t,n){if(1&t){const o=Ce();p(0,"timer",30,32),Y("onCountdownFinished",function(){return oe(o),re(_(4).onStartTimerEnd())}),m()}2&t&&l("milliseconds",_(4).getStartsIn())("styleObject",pt(2,EPe))}function V$t(t,n){if(1&t&&(Tn(0),p(1,"span"),H(2),V(3,"translate"),m(),U(4,G$t,2,3,"timer",29),Pn()),2&t){const o=_(3);d(2),se($(3,2,"CUSTOM_GAMES.TIME_TO_START")),d(2),l("ngIf",!o.roomState.destroyedState.isDestroyed)}}function z$t(t,n){1&t&&(Tn(0),p(1,"span"),H(2),V(3,"translate"),m(),Pn()),2&t&&(d(2),se($(3,1,"TOURNAMENTS.BLITZ.ROOM_STATES.ROUND_READY")))}function j$t(t,n){1&t&&(Tn(0),p(1,"span"),H(2),V(3,"translate"),m(),Pn()),2&t&&(d(2),se($(3,1,"TOURNAMENTS.BLITZ.GAME_STATES.GAME_IN_PROGRESS")))}function H$t(t,n){if(1&t&&(p(0,"div",27),U(1,U$t,5,4,"ng-container",28)(2,V$t,5,4,"ng-container",28)(3,z$t,4,3,"ng-container",28)(4,j$t,4,3,"ng-container",28),m()),2&t){const o=_(2);d(),l("ngIf",!o.roomState.isStarting()&&o.roomState.model.state===o.ERoomState.Waiting),d(),l("ngIf",o.roomState.isStarting()&&o.roomState.model.state===o.ERoomState.Waiting&&!o.isInWaitingWithFinishedTimer()),d(),l("ngIf",o.roomState.isStarting()&&o.isInWaitingWithFinishedTimer()),d(),l("ngIf",o.roomState.model.state===o.ERoomState.Ready)}}function q$t(t,n){if(1&t&&(p(0,"div",33)(1,"span"),H(2),V(3,"translate"),m(),H(4),V(5,"translate"),m()),2&t){const o=_(2);d(2),se($(3,2,"CLUBS.FOR_CLUB")),d(2),ze(" ",o.roomState.club?o.roomState.club.clubProfile.name:$(5,4,"CLUBS.CLUB_DESTROYED"),"")}}function W$t(t,n){if(1&t&&(p(0,"div",34)(1,"div",35),H(2),m(),B(3,"currency-component",36),m()),2&t){const o=n.$implicit,e=n.index;d(),l("ngClass",e+1===1?"first":"second"),d(),se(e+1),d(),l("currency",o.currencyType)("value",o.amount)}}function $$t(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TEXT.VIEW")," "))}function K$t(t,n){1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"CUSTOM_GAMES.OPTIONS.locked")," "))}const Z$t=t=>({name:t});function Q$t(t,n){if(1&t){const o=Ce();p(0,"div",37)(1,"button-icon-text",38),Y("onClick",function(){return oe(o),re(_(2).navigateToRoomLobby())}),U(2,$$t,3,3,"p",28)(3,K$t,3,3,"p",28),m()()}if(2&t){const o=_(2);d(),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("disabled",o.roomState.destroyedState.isDestroyed||o.roomState.isLocked)("icon",ne(5,Z$t,o.roomState.isLocked?o.EIcons.LOCKER:void 0)),d(),l("ngIf",!o.roomState.isLocked),d(),l("ngIf",o.roomState.isLocked)}}function Y$t(t,n){if(1&t){const o=Ce();p(0,"div",37)(1,"button-text",39),Y("onClick",function(){return oe(o),re(_(2).leaveRoom())}),p(2,"p"),H(3),V(4,"translate"),m()()()}if(2&t){const o=_(2);d(),l("buttonModifier",o.buttonModifier.BUTTON_NEGATIVE)("loading",o.roomState.actions.leave.inProgress)("disabled",o.roomState.destroyedState.isDestroyed||o.lockdown),d(2),ze(" ",$(4,4,"BUTTON.LEAVE")," ")}}function J$t(t,n){1&t&&B(0,"div",40)}const X$t=t=>({isDestroyed:t}),eKt=t=>[t];function tKt(t,n){if(1&t){const o=Ce();p(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),B(4,"avatar",5),m()(),p(5,"div",6)(6,"div",7),H(7),m(),B(8,"div",8),V(9,"safeHtml"),V(10,"translate"),U(11,H$t,5,4,"div",9)(12,q$t,6,6,"div",10),m(),p(13,"div",11)(14,"span",12),B(15,"icon-component",13),H(16),m()()(),p(17,"div",14)(18,"div",15),U(19,W$t,4,4,"div",16),m(),B(20,"div",17),p(21,"div",18)(22,"div",19),H(23),V(24,"translate"),m(),p(25,"div",20),B(26,"currency-component",21),m()()(),p(27,"div",22)(28,"div",23)(29,"button-text",24),Y("onClick",function(){return oe(o),re(_().openRulesPopup())}),p(30,"p"),H(31),V(32,"translate"),m()()(),U(33,Q$t,4,7,"div",25)(34,Y$t,5,6,"div",25),m(),U(35,J$t,1,0,"div",26),m()}if(2&t){const o=_();l("ngClass",ne(32,X$t,o.roomState.destroyedState.isDestroyed)),d(4),l("hasLevel",!1)("isLink",!0)("hasUsername",!1)("user",o.roomState.host),d(3),se(o.roomState.model.settings.description),d(),l("innerHtml",$(9,23,yt(10,25,"TOURNAMENTS.BLITZ.TOURNAMENT_HOST",ne(34,eKt,o.roomState.host.username.currentUsername))),Yn),d(3),l("ngIf",!o.roomState.destroyedState.isDestroyed),d(),l("ngIf",o.roomState.model.settings.requirements.clubId),d(3),l("icon",o.EIcons.USERS),d(),mu(" ",o.activePlayersCounter,"/",o.roomState.model.settings.players.count," "),d(3),l("ngForOf",o.rewards)("ngForTrackBy",o.trackByFn),d(4),se($(24,28,"TOURNAMENTS.OPTIONS.transactions.bet")),d(3),l("currency",o.currencyType.Chips)("value",o.roomState.model.settings.transactions.bet),d(3),l("buttonModifier",o.buttonModifier.BUTTON_ACTION)("disabled",o.roomState.destroyedState.isDestroyed),d(2),ze(" ",$(32,30,"LABEL.RULES")," "),d(2),l("ngIf",!o.isInRoom),d(),l("ngIf",o.isInRoom),d(),l("ngIf",o.roomState.destroyedState.isDestroyed)}}let Lq=(()=>{var t;class n{constructor(e,i,r,s,a){this.constants=r,this.roomsPages=s,this.leave=new ke,this.rewards=[],this.currencyType=ln,this.buttonModifier=D$t,this.EIcons=ve.EIcons,this.ERoomState=Ve.ERoomState,this.activePlayersCounter=1,this.timeService=e,this.rootContainerService=i,this.navigation=a}ngOnInit(){const e=this.roomState.model.settings.transactions.placementRewards;Object.keys(e).forEach(i=>this.rewards.push(e[i]))}ngOnDestroy(){var e,i;null===(e=this.rulesPopup)||void 0===e||e.destroy(),null===(i=this.closeRulesPopupSubscription)||void 0===i||i.unsubscribe()}ngOnChanges(e){e.roomState&&(this.activePlayersCounter=this.roomState.getPlayersCount())}navigateToRoomLobby(){this.navigation.navigateByUrl(this.roomsPages.createRoomPage(this.roomState.model.settings.type,this.roomState.model.settings.game.name,this.roomState.model))}trackByFn(e,i){return e}openRulesPopup(){this.rulesPopup=this.rootContainerService.createComponent(OPe),this.rulesPopup.instance.roomSettings=this.roomState.model.settings,this.closeRulesPopupSubscription=this.rulesPopup.instance.close.subscribe(()=>this.rulesPopup.destroy())}leaveRoom(){this.leave.emit()}getExpiresIn(){if(this.roomState.model.stateData)return Math.max(1e3*this.roomState.model.stateData.stateEndTimestamp-this.timeService.getServerTimeMs(),0)}getStartsIn(){if(this.roomState.model.stateData)return Math.max(1e3*this.roomState.model.stateData.stateTransitionTimestamp-this.timeService.getServerTimeMs(),0)}onExpireTimerEnd(){var e;null===(e=this.expireTimer)||void 0===e||e.stop()}onStartTimerEnd(){var e;null===(e=this.startTimer)||void 0===e||e.stop()}isInWaitingWithFinishedTimer(){return this.getStartsIn()<=0&&this.roomState.model.state===Ve.ERoomState.Waiting}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Bn),g(Ia),g(tn),g(LD),g(Yt))},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-room"]],viewQuery:function(e,i){if(1&e&&($e(B$t,5),$e(N$t,5)),2&e){let r;je(r=He())&&(i.startTimer=r.first),je(r=He())&&(i.expireTimer=r.first)}},inputs:{roomState:"roomState",isInRoom:"isInRoom",lockdown:"lockdown"},outputs:{leave:"leave"},features:[it],decls:1,vars:1,consts:[["class","custom-blitz-room__container",3,"ngClass",4,"ngIf"],[1,"custom-blitz-room__container",3,"ngClass"],[1,"custom-blitz-room__info__container"],[1,"custom-blitz-room__img__container"],[1,"custom-blitz-room__img"],[3,"hasLevel","isLink","hasUsername","user"],[1,"custom-blitz-room__main-info"],[1,"custom-blitz-room__tournament--name"],[1,"custom-blitz-room__tournament--creator",3,"innerHtml"],["class","custom-blitz-room__tournament--expiry--date",4,"ngIf"],["class","custom-blitz-room__tournament--club__name",4,"ngIf"],[1,"custom-blitz-room__tournament--counter__container"],[1,"custom-blitz-room__tournament--counter"],[1,"custom-blitz-room__tournament--counter__icon",3,"icon"],[1,"custom-blitz-room__transaction--container"],[1,"custom-blitz-room__rewards--container"],["class","custom-blitz-room__reward",4,"ngFor","ngForOf","ngForTrackBy"],[1,"custom-blitz-room__transaction--separator"],[1,"custom-blitz-room__entry--fee"],[1,"custom-blitz-room__entry--fee__text"],[1,"custom-blitz-room__entry--fee__value"],[3,"currency","value"],[1,"custom-blitz-room__controls"],[1,"custom-blitz-room__control--rules"],[3,"buttonModifier","disabled","onClick"],["class","custom-blitz-room__control--view",4,"ngIf"],["class","custom-blitz-room__container__destroyed--overlay",4,"ngIf"],[1,"custom-blitz-room__tournament--expiry--date"],[4,"ngIf"],["class","button-timer__timer",3,"milliseconds","styleObject","onCountdownFinished",4,"ngIf"],[1,"button-timer__timer",3,"milliseconds","styleObject","onCountdownFinished"],["expireTimer",""],["startTimer",""],[1,"custom-blitz-room__tournament--club__name"],[1,"custom-blitz-room__reward"],[1,"custom-blitz-room__place",3,"ngClass"],[1,"custom-blitz-room__reward--value",3,"currency","value"],[1,"custom-blitz-room__control--view"],[3,"buttonModifier","disabled","icon","onClick"],[3,"buttonModifier","loading","disabled","onClick"],[1,"custom-blitz-room__container__destroyed--overlay"]],template:function(e,i){1&e&&U(0,tKt,36,36,"div",0),2&e&&l("ngIf",i.roomState)},dependencies:[Xe,Mt,Ne,Fs,Bo,Dn,pn,so,So,qe,Ta],styles:[".custom-blitz-room__tournament--name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.custom-blitz-room__tournament--counter__icon[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})();const nKt=["newRooms"],iKt=["pullRefresh"];function oKt(t,n){1&t&&B(0,"custom-blitz-room",12),2&t&&l("roomState",n.$implicit)}const rKt=()=>({textKey:"ERRORS.CONNECTION_ERROR"}),sKt=t=>[t],aKt=()=>({textKey:"CUSTOM_GAMES.NO_ROOMS"}),cKt=()=>({textKey:"CUSTOM_GAMES.CREATE_FIRST"}),lKt=(t,n)=>[t,n];function uKt(t,n){1&t&&B(0,"empty-content",13),2&t&&l("textArray",_().state.loadingState.error?ne(2,sKt,pt(1,rKt)):cn(6,lKt,pt(4,aKt),pt(5,cKt)))}const dKt=t=>({centered:t});function pKt(t,n){if(1&t&&(p(0,"div",14),B(1,"spinner-loader",15),m()),2&t){const o=_();l("ngClass",ne(1,dKt,o.state&&!o.state.loadingState.error&&!o.rooms.length))}}const p1=t=>({name:t});function hKt(t,n){if(1&t){const o=Ce();p(0,"div",16)(1,"button-icon-text",17),Y("onClick",function(){return oe(o),re(_().createRoom())}),H(2),V(3,"translate"),m(),p(4,"button-icon",18),Y("onClick",function(){return oe(o),re(_().createRoom())}),m(),p(5,"button-icon-text",17),Y("onClick",function(){return oe(o),re(_().joinRoom())}),H(6),V(7,"translate"),m(),p(8,"button-icon",18),Y("onClick",function(){return oe(o),re(_().joinRoom())}),m(),p(9,"button-icon",19),Y("onClick",function(){return oe(o),re(_().refreshLobby())}),m(),p(10,"button-icon",20),Y("onClick",function(){return oe(o),re(_().refreshLobby())}),m()()}if(2&t){const o=_();d(),l("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION)("icon",ne(28,p1,o.EIcons.PLUS))("loading",o.state.actions.create.inProgress)("disabled",o.shouldDisableButtons()),d(),ze(" ",$(3,24,"BUTTON.CREATE_GAME")," "),d(2),l("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION)("icon",ne(30,p1,o.EIcons.PLUS))("loading",o.state.actions.create.inProgress)("disabled",o.shouldDisableButtons()),d(),l("buttonModifier",o.EButtonModifier.BUTTON_ACTION)("icon",ne(32,p1,o.EIcons.JOIN_GAME))("loading",o.state.actions.joinRoom.inProgress)("disabled",o.shouldDisableButtons()),d(),ze(" ",$(7,26,"CUSTOM_GAMES.JOIN_GAME")," "),d(2),l("buttonModifier",o.EButtonModifier.BUTTON_ACTION)("icon",ne(34,p1,o.EIcons.JOIN_GAME))("loading",o.state.actions.joinRoom.inProgress)("disabled",o.shouldDisableButtons()),d(),l("buttonModifier",o.EButtonModifier.BUTTON_SORT)("icon",ne(36,p1,o.EIcons.SORT))("disabled",o.shouldDisableButtons()),d(),l("buttonModifier",o.EButtonModifier.BUTTON_SORT)("icon",ne(38,p1,o.EIcons.SORT))("disabled",o.shouldDisableButtons())}}const mKt=t=>({handler:t}),fKt=()=>({key:"CUSTOM_GAMES.NEW_ROOMS"});let xPe=(()=>{var t;class n{constructor(e,i,r,s){this.store=e,this.cdr=i,this.time=r,this.lobbyService=s,this.rooms=[],this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.EState=ip.EState,this.subscriptions=new ie.List,this.refresh=new Qn(void 0),this.scrolledToBottomCb=()=>{this.store.gameLobbies.selectGameLobbyState(this.nsp).loadingState.isLoading||this.lobbyService.getNextRooms()},this.lobbyRefreshTimestamp=this.time.getServerTimeS(),this.nsp=this.lobbyService.nsp}ngOnInit(){this.lobbyService.connect().then(()=>this.lobbyService.getNextRooms()).catch(e=>console.error(e)),this.subscriptions.add(this.store.gameLobbies.subscribeGameLobbyState(this.nsp).pipe(bt(e=>!!e)).subscribe(e=>{this.state=e,this.cdr.detectChanges()})),this.subscriptions.add(wp(this.store.gameLobbies.subscribeGameLobbyRooms({lobbyId:this.nsp}),this.refresh).pipe(bt(()=>!!this.store.gameLobbies.selectGameLobbyState(this.nsp))).subscribe(e=>{const i=this.store.selectPlayerBlockViewModel().blocked,r=this.store.selectSimpleProfile().id,s=bA()(e[0].filter(c=>!i.find(u=>u.profile.id===c.model.hostId)&&!c.model.blocklist.find(u=>u===r)),[c=>c.model.createdAt],[ie.ESort.Desc]);if(this.rooms.length){if(this.rooms=s.filter(c=>c.model.createdAt<=this.lobbyRefreshTimestamp),s.length>this.lobbyRefreshRoomsCount){var a;null===(a=this.newRooms)||void 0===a||a.show()}}else this.rooms=s,this.setRefreshLobbyData(s.length,Math.max(...s.map(c=>c.model.createdAt)));this.cdr.detectChanges()}))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}createRoom(){this.lobbyService.createRoom()}joinRoom(){this.lobbyService.joinRoom()}refreshLobby(){var e,i;this.lobbyService.clearDestroyedRooms(),this.setRefreshLobbyData(this.store.gameLobbies.selectGameLobbyRooms({lobbyId:this.nsp}).length,this.time.getServerTimeS()),null===(e=this.newRooms)||void 0===e||e.hide(),null===(i=this.pullRefresh)||void 0===i||i.setRefreshing(!1),this.refresh.next()}setRefreshLobbyData(e,i){this.lobbyRefreshTimestamp=i,this.lobbyRefreshRoomsCount=e}shouldDisableButtons(){return this.state.actions.create.inProgress||this.state.actions.joinRoom.inProgress||this.state.actions.leaveRoom.inProgress||this.state.actions.spectateRoom.inProgress}roomsTrackBy(e,i){return i.model.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Re),g(Bn),g(MPe))},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-lobby"]],viewQuery:function(e,i){if(1&e&&($e(nKt,5),$e(iKt,5)),2&e){let r;je(r=He())&&(i.newRooms=r.first),je(r=He())&&(i.pullRefresh=r.first)}},features:[mn([MPe])],decls:12,vars:11,consts:[[1,"custom-blitz-lobby__wrapper"],[3,"refresh"],["pullRefresh",""],["scroll-directive","",1,"custom-blitz-lobby__rooms",3,"onScrolledToBottom"],[1,"custom-blitz-lobby__new-rooms-container"],[3,"initialState","text","onClick"],["newRooms",""],["class","custom-blitz-lobby__room--container",3,"roomState",4,"ngFor","ngForOf","ngForTrackBy"],["class","custom-blitz-lobby__empty-content",3,"textArray",4,"ngIf"],["class","custom-blitz-lobby__container-rooms--loader",3,"ngClass",4,"ngIf"],[1,"custom-blitz-lobby__container-rooms--bottom-element"],["class","custom-blitz-lobby__bottom--buttons",4,"ngIf"],[1,"custom-blitz-lobby__room--container",3,"roomState"],[1,"custom-blitz-lobby__empty-content",3,"textArray"],[1,"custom-blitz-lobby__container-rooms--loader",3,"ngClass"],[1,"custom-blitz-lobby__container-rooms--spinner"],[1,"custom-blitz-lobby__bottom--buttons"],[1,"custom-blitz-lobby__cg__button",3,"buttonModifier","icon","loading","disabled","onClick"],[1,"custom-blitz-lobby__cg__button","small",3,"buttonModifier","icon","loading","disabled","onClick"],[1,"custom-blitz-lobby__cg__button","refresh",3,"buttonModifier","icon","disabled","onClick"],[1,"custom-blitz-lobby__cg__button","refresh","small",3,"buttonModifier","icon","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"pull-refresh-component",1,2),Y("refresh",function(){return i.refreshLobby()}),p(3,"div",3)(4,"div",4)(5,"new-content-component",5,6),Y("onClick",function(){return i.refreshLobby()}),m()(),U(7,oKt,1,1,"custom-blitz-room",7)(8,uKt,1,9,"empty-content",8)(9,pKt,2,3,"div",9),B(10,"div",10),m()(),U(11,hKt,11,40,"div",11),m()),2&e&&(d(3),l("onScrolledToBottom",ne(8,mKt,i.scrolledToBottomCb)),d(2),l("initialState",i.EState.Hide)("text",pt(10,fKt)),d(2),l("ngForOf",i.rooms)("ngForTrackBy",i.roomsTrackBy),d(),l("ngIf",i.state&&!i.state.loadingState.isLoading&&(i.state.loadingState.error||!i.rooms.length)),d(),l("ngIf",null==i.state?null:i.state.loadingState.isLoading),d(2),l("ngIf",i.state))},dependencies:[Xe,Mt,Ne,bo,ei,so,vc,yM,ip,Is,Lq,qe],styles:[".custom-blitz-lobby__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;display:flex;flex-flow:column nowrap;justify-content:flex-start;align-items:flex-start}.custom-blitz-lobby__bottom--buttons[_ngcontent-%COMP%]{position:absolute;display:flex;flex-flow:row wrap;align-items:center;justify-content:center;bottom:0;left:0;width:100%;height:5rem}@media only screen and (max-height: 480px){.custom-blitz-lobby__bottom--buttons[_ngcontent-%COMP%]{height:auto}}@media only screen and (max-width: 568px){.custom-blitz-lobby__bottom--buttons[_ngcontent-%COMP%]{justify-content:space-evenly}}@media only screen and (max-height: 440px){.custom-blitz-lobby__bottom--buttons[_ngcontent-%COMP%]{width:4rem;left:auto;right:0rem}}.custom-blitz-lobby__small-button[_ngcontent-%COMP%], .custom-blitz-lobby__cg__button.small[_ngcontent-%COMP%], .custom-blitz-lobby__cg__button.refresh.small[_ngcontent-%COMP%]{display:none;width:3.5rem;min-width:3.5rem;height:3.5rem;margin:.5rem 0;padding:0;font-size:1.8rem}@media only screen and (max-height: 440px){.custom-blitz-lobby__small-button[_ngcontent-%COMP%], .custom-blitz-lobby__cg__button.small[_ngcontent-%COMP%], .custom-blitz-lobby__cg__button.refresh.small[_ngcontent-%COMP%]{display:initial}}.custom-blitz-lobby__cg__button[_ngcontent-%COMP%]{margin:0 .5rem;min-width:30rem}.custom-blitz-lobby__cg__button.refresh[_ngcontent-%COMP%]{min-width:5rem;width:5rem}@media screen and (max-width: 568px){.custom-blitz-lobby__cg__button.refresh[_ngcontent-%COMP%]{flex:initial;min-width:3.5rem}}@media only screen and (max-width: 768px){.custom-blitz-lobby__cg__button[_ngcontent-%COMP%]{min-width:20rem;margin:0 .25rem}}@media screen and (max-width: 568px){.custom-blitz-lobby__cg__button[_ngcontent-%COMP%]{width:auto;min-width:auto;flex:1 1 0}}@media only screen and (max-height: 440px) and (max-width: 768px) and (orientation: landscape){.custom-blitz-lobby__cg__button[_ngcontent-%COMP%]{margin:0 0 1.5rem}}@media only screen and (max-height: 568px){.custom-blitz-lobby__cg__button[_ngcontent-%COMP%]{margin-top:0rem}}@media only screen and (max-height: 440px){.custom-blitz-lobby__cg__button[_ngcontent-%COMP%]{display:none}}.custom-blitz-lobby__rooms[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;display:flex;flex-flow:row wrap;justify-content:center;align-content:flex-start;width:100%;padding-top:1rem;height:100%}.custom-blitz-lobby__rooms[_ngcontent-%COMP%]   .expanded[_ngcontent-%COMP%]{visibility:hidden}@media only screen and (max-width: 768px) and (min-height: 580px){.custom-blitz-lobby__rooms[_ngcontent-%COMP%]{flex-flow:column;justify-content:flex-start;align-items:center}}@media only screen and (max-height: 440px){.custom-blitz-lobby__rooms[_ngcontent-%COMP%]{margin-bottom:0rem}}.custom-blitz-lobby__new-rooms-container[_ngcontent-%COMP%]{width:100%;height:4rem;flex-shrink:0;display:flex;justify-content:center}.custom-blitz-lobby__empty-content[_ngcontent-%COMP%]{height:calc(100% - 9rem)}@media screen and (max-height: 440px) and (orientation: landscape){.custom-blitz-lobby__empty-content[_ngcontent-%COMP%]{width:80%;margin:0 auto;display:block;position:relative}}.custom-blitz-lobby__container-rooms--loader[_ngcontent-%COMP%]{height:5rem;display:flex;width:100%;align-items:center;justify-content:center;flex-shrink:0}.custom-blitz-lobby__container-rooms--loader.centered[_ngcontent-%COMP%]{height:calc(100% - 9rem)}.custom-blitz-lobby__container-rooms--spinner[_ngcontent-%COMP%]{height:auto;width:4rem;font-size:2rem}.custom-blitz-lobby__container-rooms--bottom-element[_ngcontent-%COMP%]{height:5rem;min-height:5rem;width:100%}@media only screen and (max-height: 440px){.custom-blitz-lobby__container-rooms--bottom-element[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),n})();var rr=function(t){return t.Connect="[Custom Room Lobby] Connect Room",t.ConnectSuccess="[Custom Room Lobby] Connect Room Success",t.ConnectError="[Custom Room Lobby] Connect Room Error",t.SetRoom="[Custom Room Lobby] Set Room",t.SetTable="[Custom Room Lobby] Set Table",t.UpdateRoom="[Custom Room Lobby] Update Room",t.UpdateLockActions="[Custom Room Lobby] Update Lock Actions",t.KickedFromRoom="[Custom Room Lobby] Kicked From Room",t.RoomDestroyed="[Custom Room Lobby] Room Destroyed",t.SpectatorStateChange="[Custom Room Lobby] Spectator State Change",t.JoinRoom="[Custom Room Lobby] Join Room",t.JoinRoomSuccess="[Custom Room Lobby] Join Room Success",t.JoinRoomError="[Custom Room Lobby] Join Room Error",t.AcceptInvite="[Custom Room Lobby] Accept Invite",t.AcceptInviteSuccess="[Custom Room Lobby] Accept Invite Success",t.AcceptInviteError="[Custom Room Lobby] Accept Invite Error",t.LeaveRoom="[Custom Room Lobby] Leave Room",t.LeaveRoomSuccess="[Custom Room Lobby] Leave Room Success",t.LeaveRoomError="[Custom Room Lobby] Leave Room Error",t.LeaveTable="[Custom Room Lobby] Leave Table",t.LeaveTableSuccess="[Custom Room Lobby] Leave Table Success",t.LeaveTableError="[Custom Room Lobby] Leave Table Error",t.InvitePlayer="[Custom Room Lobby] Invite Player",t.InvitePlayerSuccess="[Custom Room Lobby] Invite Player Success",t.InvitePlayerError="[Custom Room Lobby] Invite Player Error",t.CancelInvitePlayer="[Custom Room Lobby] Cancel Invite Player",t.CancelInvitePlayerSuccess="[Custom Room Lobby] Cancel Invite Player Success",t.CancelInvitePlayerError="[Custom Room Lobby] Cancel Invite Player Error",t.KickPlayer="[Custom Room Lobby] Kick Player",t.KickPlayerSuccess="[Custom Room Lobby] Kick Player Success",t.KickPlayerError="[Custom Room Lobby] Kick Player Error",t.SpectateRoom="[Custom Room Lobby] Spectate Room",t.SpectateRoomSuccess="[Custom Room Lobby] Spectate Room Success",t.SpectateRoomError="[Custom Room Lobby] Spectate Room Error",t.ResetGameLobby="[Custom Room Lobby] Reset game lobby",t}(rr||{});const APe=he(rr.SetRoom,{_as:"props",_p:void 0}),RPe=he(rr.SetTable,{_as:"props",_p:void 0}),kPe=he(rr.UpdateRoom,{_as:"props",_p:void 0}),Dq=he(rr.UpdateLockActions,{_as:"props",_p:void 0}),Bq=he(rr.RoomDestroyed,{_as:"props",_p:void 0}),LPe=he(rr.SpectatorStateChange,{_as:"props",_p:void 0}),Nq=he(rr.KickedFromRoom,{_as:"props",_p:void 0}),DPe=he(rr.Connect,{_as:"props",_p:void 0}),BPe=he(rr.ConnectSuccess,{_as:"props",_p:void 0}),Fq=he(rr.ConnectError,{_as:"props",_p:void 0}),NPe=he(rr.JoinRoom,{_as:"props",_p:void 0}),FPe=he(rr.JoinRoomSuccess,{_as:"props",_p:void 0}),UPe=he(rr.JoinRoomError,{_as:"props",_p:void 0}),GPe=he(rr.AcceptInvite,{_as:"props",_p:void 0}),VPe=he(rr.AcceptInviteSuccess,{_as:"props",_p:void 0}),zPe=he(rr.AcceptInviteError,{_as:"props",_p:void 0}),jPe=he(rr.LeaveRoom,{_as:"props",_p:void 0}),Uq=he(rr.LeaveRoomSuccess,{_as:"props",_p:void 0}),HPe=he(rr.LeaveRoomError,{_as:"props",_p:void 0}),qPe=he(rr.LeaveTable,{_as:"props",_p:void 0}),WPe=he(rr.LeaveTableSuccess,{_as:"props",_p:void 0}),$Pe=he(rr.LeaveTableError,{_as:"props",_p:void 0}),gKt=he(rr.InvitePlayer,{_as:"props",_p:void 0}),_Kt=he(rr.InvitePlayerSuccess,{_as:"props",_p:void 0}),vKt=he(rr.InvitePlayerError,{_as:"props",_p:void 0}),KPe=he(rr.CancelInvitePlayer,{_as:"props",_p:void 0}),ZPe=he(rr.CancelInvitePlayerSuccess,{_as:"props",_p:void 0}),QPe=he(rr.CancelInvitePlayerError,{_as:"props",_p:void 0}),YPe=he(rr.KickPlayer,{_as:"props",_p:void 0}),JPe=he(rr.KickPlayerSuccess,{_as:"props",_p:void 0}),XPe=he(rr.KickPlayerError,{_as:"props",_p:void 0}),eIe=he(rr.SpectateRoom),tIe=he(rr.SpectateRoomSuccess),nIe=he(rr.SpectateRoomError),iIe=he(rr.ResetGameLobby);let oIe=(()=>{var t;class n{constructor(e,i,r,s,a){this.store=e,this.gamesPlayClientService=i,this.clubsService=r,this.rootContainerService=s,this.time=a,this.listeners=new ie.List,this.subscriptions=new ie.List,this.tasks=new ie.List}connect(e){var i=this;return f(function*(){try{if(i.store.dispatch(DPe({roomId:e.roomId})),!i.gamesPlayClientService.currentPlayClient.activeClientModel.currentRoom){const c=i.gamesPlayClientService.currentPlayClient.spectateRoom({id:e.roomId,type:e.roomType},{roomCode:e.roomCode}),u=new Jn(c);i.tasks.add(u),i.connectTask=u,yield u}const s=Qu()(i.gamesPlayClientService.currentPlayClient.activeClientModel.currentRoom.getViewModel());let a;s.settings.requirements.clubId&&(i.getClubTask=new Jn(i.getClubProfile(s.settings.requirements.clubId)),i.tasks.add(i.getClubTask),a=yield i.getClubTask),i.store.dispatch(APe({room:new kD({lobbyId:s.settings.game.name,model:s,host:i.getHostProfile(s),startsAt:Oh.isFull(s)?i.time.getServerTimeS()+Gn.toSeconds(s.settings.timers.waitingStateEndTimer):void 0,club:a},i.store)})),i.addListeners(),i.store.dispatch(BPe({roomId:e.roomId}))}catch(r){const s=jt.createErrorInstance(r);console.warn(s),i.store.dispatch(Fq({roomId:e.roomId,error:s}))}})()}ngOnDestroy(){var e;this.tasks.forEach(i=>i.cancel()),this.listeners.forEach(i=>i.listener.detach()),this.subscriptions.forEach(i=>i.subscription.unsubscribe()),null===(e=this.invitePopup)||void 0===e||e.destroy(),this.clearLockdownTimeout(),this.store.dispatch(iIe())}joinRoom(e){var i=this;return f(function*(){try{i.store.dispatch(NPe({roomId:e.roomId}));const r=i.gamesPlayClientService.currentPlayClient.activeClientModel.currentRoom.join({tableId:e.tableId,seatId:e.seatId,roomCode:e.roomCode}),s=new Jn(r);i.tasks.add(s),yield s,i.store.dispatch(FPe({roomId:e.roomId}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(UPe({roomId:e.roomId})),s}})()}acceptInvite(e){var i=this;return f(function*(){try{i.store.dispatch(GPe({roomId:e.roomId}));const r=i.gamesPlayClientService.currentPlayClient.activeClientModel.currentRoom.acceptInvite({tableId:e.tableId,seatId:e.seatId,inviteAccepted:!0}),s=new Jn(r);i.tasks.add(s),yield s,i.store.dispatch(VPe({roomId:e.roomId}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(zPe({roomId:e.roomId})),s}})()}spectateRoom(e){var i=this;return f(function*(){try{i.store.dispatch(eIe());const r=i.gamesPlayClientService.currentPlayClient.activeClientModel.currentRoom.spectate(e),s=new Jn(r);i.tasks.add(s),yield s,i.store.dispatch(tIe())}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(nIe()),s}})()}leaveRoom(e={}){var i=this;return f(function*(){var r,s;const a=null===(r=i.gamesPlayClientService.currentPlayClient)||void 0===r||null===(r=r.activeClientModel)||void 0===r?void 0:r.currentRoom;if(null===(s=i.getClubTask)||void 0===s||s.cancel(),!a)return i.store.dispatch(Uq({roomId:void 0})),Promise.resolve();try{var c;i.store.dispatch(jPe({roomId:a.id})),a.state.current.stateName===Ve.ERoomState.Init?(null===(c=i.connectTask)||void 0===c||c.cancel(),yield a.dispose()):a&&(e.onlyLeaveTable?yield a.leaveGame():yield a.leave()),i.store.dispatch(Uq({roomId:a.id}))}catch(u){const h=jt.createErrorInstance(u);throw console.warn(h),i.store.dispatch(HPe({roomId:a.id})),h}})()}leaveTable(){var e=this;return f(function*(){var i;const r=null===(i=e.gamesPlayClientService.currentPlayClient)||void 0===i||null===(i=i.activeClientModel)||void 0===i?void 0:i.currentRoom;try{var s;r.state.current.stateName===Ve.ERoomState.Init?(null===(s=e.connectTask)||void 0===s||s.cancel(),yield r.dispose()):r&&(e.store.dispatch(qPe({roomId:r.id})),yield r.leaveGame(),e.store.dispatch(WPe({roomId:r.id})))}catch(a){const c=jt.createErrorInstance(a);throw e.store.dispatch($Pe({roomId:r.id})),console.warn(c),c}})()}invitePlayer(e){var i=this;return f(function*(){try{var r;null===(r=i.invitePopup)||void 0===r||r.destroy(),i.invitePopup=i.rootContainerService.createComponent(Sq),i.invitePopup.instance.viewModel={room:i.store.customRoomLobby.selectCurrentGameLobbyRoom().model,seatId:e.seatId,tableId:e.tableId},i.invitePopup.instance.close.subscribe(()=>i.invitePopup.destroy())}catch(s){const a=jt.createErrorInstance(s);throw console.warn(a),a}})()}cancelInvite(e){var i=this;return f(function*(){try{i.store.dispatch(KPe(e));const r=i.gamesPlayClientService.currentPlayClient.activeClientModel.currentRoom.cancelInvite(e),s=new Jn(r);i.tasks.add(s),yield s,i.store.dispatch(ZPe(e))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(QPe(e)),s}})()}kickPlayer(e){var i=this;return f(function*(){try{i.store.dispatch(YPe({args:e}));const r=i.gamesPlayClientService.currentPlayClient.activeClientModel.currentRoom.ban({...e}),s=new Jn(r);i.tasks.add(s),yield s,i.store.dispatch(JPe({args:e}))}catch(r){const s=jt.createErrorInstance(r);throw console.warn(s),i.store.dispatch(XPe({args:e})),s}})()}onRoomUpdate(e){this.store.dispatch(kPe({room:Qu()(e),startsAt:Oh.isFull(e)?this.time.getServerTimeS()+Gn.toSeconds(e.settings.timers.waitingStateEndTimer):void 0}));const i=this.store.customRoomLobby.selectCurrentGameLobbyRoom();!i.isSpectating&&!this.lockdownTimeout&&i.isStarting()&&this.setLockdownTimeout(i),this.lockdownTimeout&&!i.isStarting()&&this.clearLockdownTimeout()}onRoomDestroy(e){this.listeners.where(i=>i.roomId===e.id).forEach(i=>i.listener.detach()),this.subscriptions.where(i=>i.roomId===e.id).forEach(i=>i.subscription.unsubscribe()),this.clearLockdownTimeout(),this.store.dispatch(Bq({reason:e.reason}))}onSpectatorStateChange(e){this.store.dispatch(LPe({isSpectator:e}))}onCurrentTableChange(e){this.store.dispatch(RPe({table:e}))}onKicked(e){e!==Ve.ActiveRoomProtocol.EPlayerDisconnectReason.RoomDestroy&&this.store.dispatch(Nq({reason:e}))}getClubProfile(e){var i=this;return f(function*(){var r;let s;const a=i.store.clubs.selectCurrentClub();if(null!=a&&a.clubState&&(null==a||null===(r=a.clubState)||void 0===r||null===(r=r.clubProfile)||void 0===r?void 0:r.id)===e)s={clubProfile:a.clubState.clubProfile,inventory:a.inventory};else try{s=yield i.clubsService.getClubProfile(e)}catch(c){console.log("Game lobby get club error",c)}return s})()}getHostProfile(e){if(!e.hostId)return;const i=lo.findMostRecentPlayerProfile(e.hostId,e.tables);return Lo.toPlatformProfile(null==i?void 0:i.profile)}addListeners(){var e;const i=null===(e=this.gamesPlayClientService)||void 0===e||null===(e=e.currentPlayClient)||void 0===e||null===(e=e.activeClientModel)||void 0===e?void 0:e.currentRoom;i&&(this.listeners.add({roomId:i.id,listener:i.onUpdate((r,s)=>this.onRoomUpdate(s))}),this.listeners.add({roomId:i.id,listener:i.onKicked(r=>this.onKicked(r))}),this.listeners.add({roomId:i.id,listener:i.onDispose(r=>this.onRoomDestroy(r.data))}),this.subscriptions.add({roomId:i.id,subscription:this.store.games.subscribeIsSpectator(i.getViewModel().settings.game.name).subscribe(r=>this.onSpectatorStateChange(r))}),this.subscriptions.add({roomId:i.id,subscription:this.store.games.subscribeCurrentTable(i.getViewModel().settings.game.name).subscribe(r=>this.onCurrentTableChange(r))}))}setLockdownTimeout(e){this.clearLockdownTimeout();const i=1e3*e.startsAt-this.time.getServerTimeMs()-3e3;this.lockdownTimeout=setTimeout(()=>{this.store.dispatch(Dq({lockActions:!0}))},Math.max(i,0))}clearLockdownTimeout(){clearTimeout(this.lockdownTimeout),this.lockdownTimeout=void 0,this.store.dispatch(Dq({lockActions:!1}))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(oo),T(ru),T(Ia),T(Bn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var bKt=__webpack_require__(62871),rIe=__webpack_require__.n(bKt);const h1=t=>({name:t});function CKt(t,n){if(1&t){const o=Ce();p(0,"button-icon",14),Y("onClick",function(){return oe(o),re(_().onClick())}),m()}if(2&t){const o=_();l("bclass","custom-blitz-seat__locker__bclass")("icon",ne(2,h1,o.EIcons.LOCKER))}}function yKt(t,n){if(1&t){const o=Ce();p(0,"add-button",15),Y("onClick",function(){return oe(o),re(_().onClick())}),m()}}function SKt(t,n){if(1&t){const o=Ce();p(0,"button-icon",16),Y("onClick",function(){return oe(o),re(_().onClick())}),m()}if(2&t){const o=_();l("bclass","custom-blitz-seat__invite--icon")("icon",ne(2,h1,o.EIcons.ADD_FRIEND))}}function wKt(t,n){1&t&&(B(0,"img",17),V(1,"transformUrl")),2&t&&Uf("src",$(1,1,"blitz-tournament/tournament-icon-avatar.svg"),Wn)}function TKt(t,n){1&t&&B(0,"div",18)}function PKt(t,n){1&t&&B(0,"avatar",19),2&t&&l("user",_().player)("isLink",!0)}function IKt(t,n){if(1&t){const o=Ce();p(0,"add-button",20),Y("onClick",function(){return oe(o),re(_().onClick())}),m()}}function MKt(t,n){if(1&t){const o=Ce();p(0,"add-button",21),Y("onClick",function(){return oe(o),re(_().acceptPlayerInvite())}),m()}}function OKt(t,n){if(1&t){const o=Ce();p(0,"button-icon",22),Y("onClick",function(){return oe(o),re(_().cancelPlayerAction())}),m()}if(2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_NEGATIVE)("loading",o.cancelAction.isLoading)("flatButton",!0)("rounded",!0)("icon",ne(5,h1,o.EIcons.CLOSE))}}function EKt(t,n){if(1&t){const o=Ce();p(0,"button-icon",23),Y("onClick",function(){return oe(o),re(_().declinePlayerInvite())}),m()}if(2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_NEGATIVE)("flatButton",!0)("rounded",!0)("icon",ne(4,h1,o.EIcons.CLOSE))}}function xKt(t,n){if(1&t){const o=Ce();p(0,"button-icon",23),Y("onClick",function(){return oe(o),re(_().cancelPlayerInvite())}),m()}if(2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_NEGATIVE)("flatButton",!0)("rounded",!0)("icon",ne(4,h1,o.EIcons.CLOSE))}}function AKt(t,n){if(1&t){const o=Ce();p(0,"button-icon",24),Y("onClick",function(){return oe(o),re(_().handleLockedSeat())}),m()}if(2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_TRANSPARENT)("ngClass",o.disabledReason)("flatButton",!0)("rounded",!0)("bclass","custom-blitz-seat--locked__with--reason__icon")("icon",ne(6,h1,o.lockedIcon))}}function RKt(t,n){if(1&t&&(p(0,"div",25),B(1,"icon-component",26),m()),2&t){const o=_();d(),l("icon",o.EIcons.BOT)}}function kKt(t,n){1&t&&B(0,"div",27)}const LKt=(t,n)=>({showBackdrop:t,isInFinalTable:n});let DD=(()=>{var t;class n{constructor(e,i,r){this.popup=e,this.permission=i,this.offerService=r,this.requirements={clubRoom:!1,maxLevel:1/0,minLevel:0,requiresVip:!1},this.joinAction={isEnabled:!1},this.cancelAction={isEnabled:!1},this.cancelInviteAction={isEnabled:!1},this.invitePlayerAction={isEnabled:!1},this.acceptInviteAction={isEnabled:!1},this.declineInviteAction={isEnabled:!1},this.join=new ke,this.invite=new ke,this.cancel=new ke,this.cancelInvite=new ke,this.acceptInvite=new ke,this.declineInvite=new ke,this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.lockedIcon=ve.EIcons.LOCKER}ngOnChanges(e){e.seat&&(this.player=this.getPlayer()),this.configureSeatJoinPermission()}ngOnDestroy(){this.popup.hide(this.offerPopupId)}onClick(){this.joinAction.isEnabled?this.join.emit(this.seat.id):this.invitePlayerAction.isEnabled&&this.invite.emit(this.seat.id)}cancelPlayerAction(){this.cancel.emit(this.player.id)}cancelPlayerInvite(){this.cancelInvite.emit(this.seat.id)}acceptPlayerInvite(){this.acceptInvite.emit(this.seat.id)}declinePlayerInvite(){this.declineInvite.emit()}getPlayer(){var e;if(!this.seat||!this.seat.player&&!this.seat.reserved)return;const i=null!==(e=this.seat.player)&&void 0!==e?e:this.seat.reserved;return Lo.toPlatformProfile(i.profile)}isReserved(){var e;return!(null===(e=this.seat)||void 0===e||!e.reserved)}isPlaceholder(){return!(this.player||this.joinAction.isEnabled||this.invitePlayerAction.isEnabled||this.cancelAction.isEnabled)}isBot(){return this.seat&&this.seat.player&&(this.seat.player.isBot||this.seat.player.state===Ve.EPlayerState.Inactive)}handleLockedSeat(){switch(this.disabledReason){case n.EJoinDisabledReason.ClubOnly:break;case n.EJoinDisabledReason.MinLevel:this.popup.show("POPUP.ROOM_MIN_LEVEL_NOT_MET",[this.requirements.minLevel]);break;case n.EJoinDisabledReason.MaxLevel:this.popup.show("POPUP.ROOM_MAX_LEVEL_NOT_MET",[this.requirements.maxLevel]);break;case n.EJoinDisabledReason.VipRequired:this.offerPopupId=this.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]});break;case n.EJoinDisabledReason.NotEnoughChips:this.offerService.offerCurrency({targetValue:this.bet,itemType:Fe.TG.ChipPack,description:{key:"TOURNAMENTS.PROMO.NOT_ENOUGH_CHIPS"}})}}configureSeatJoinPermission(){if((this.player&&this.isReserved()||!this.player)&&(this.joinAction.isEnabled||this.acceptInviteAction.isEnabled)){if(this.isOtherClubRoom())return this.disabledReason=n.EJoinDisabledReason.ClubOnly,void(this.isLocked=!0);if(this.requirements.minLevel>this.currentPlayer.level)return this.disabledReason=n.EJoinDisabledReason.MinLevel,this.isLocked=!0,void(this.lockedIcon=this.EIcons.MIN_LEVEL_STAR_LOCKED);if(this.currentPlayer.level>=this.requirements.maxLevel)return this.disabledReason=n.EJoinDisabledReason.MaxLevel,this.isLocked=!0,void(this.lockedIcon=this.EIcons.MIN_LEVEL_STAR_LOCKED);if(this.requirements.requiresVip&&!this.currentPlayer.hasTierOrHigher(Fi.Full))return this.disabledReason=n.EJoinDisabledReason.VipRequired,this.isLocked=!0,void(this.lockedIcon=this.EIcons.LOCKER);if(!this.permission.getChipBalanceRequirement(this.bet).isFulfilled)return this.disabledReason=n.EJoinDisabledReason.NotEnoughChips,this.isLocked=!0,void(this.lockedIcon=this.EIcons.PLUS);this.isLocked=!1}else this.disabledReason=void 0,this.isLocked=!1}isOtherClubRoom(){return this.requirements.clubId&&this.requirements.clubId!==this.currentUserClubId}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Ti),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-seat"]],hostAttrs:[1,"custom-blitz-seat"],inputs:{seat:"seat",requirements:"requirements",bet:"bet",joinAction:"joinAction",cancelAction:"cancelAction",cancelInviteAction:"cancelInviteAction",invitePlayerAction:"invitePlayerAction",acceptInviteAction:"acceptInviteAction",declineInviteAction:"declineInviteAction",isLocked:"isLocked",isInLosersTeam:"isInLosersTeam",currentPlayer:"currentPlayer",currentUserClubId:"currentUserClubId",isFinalTable:"isFinalTable"},outputs:{join:"join",invite:"invite",cancel:"cancel",cancelInvite:"cancelInvite",acceptInvite:"acceptInvite",declineInvite:"declineInvite"},features:[it],decls:15,vars:18,consts:[[1,"custom-blitz-seat--wrapper",3,"ngClass"],["class","custom-blitz-seat__locker",3,"bclass","icon","onClick",4,"ngIf"],["class","custom-blitz-seat__add--icon",3,"onClick",4,"ngIf"],["class","custom-blitz-seat__invite--button",3,"bclass","icon","onClick",4,"ngIf"],["class","custom-blitz-seat__default-avatar",3,"src",4,"ngIf"],["class","custom-blitz-seat--reserved-backdrop",4,"ngIf"],["class","custom-blitz-seat--avatar",3,"user","isLink",4,"ngIf"],["class","custom-blitz-seat__add--icon reserved",3,"onClick",4,"ngIf"],["class","custom-blitz-seat__add--icon reserved accept",3,"onClick",4,"ngIf"],["class","custom-blitz-seat--icon",3,"buttonModifier","loading","flatButton","rounded","icon","onClick",4,"ngIf"],["class","custom-blitz-seat--icon",3,"buttonModifier","flatButton","rounded","icon","onClick",4,"ngIf"],["class","custom-blitz-seat--locked__with--reason",3,"buttonModifier","ngClass","flatButton","rounded","bclass","icon","onClick",4,"ngIf"],["class","custom-blitz-seat__bot-container",4,"ngIf"],["class","custom-blitz-seat__losers--overlay",4,"ngIf"],[1,"custom-blitz-seat__locker",3,"bclass","icon","onClick"],[1,"custom-blitz-seat__add--icon",3,"onClick"],[1,"custom-blitz-seat__invite--button",3,"bclass","icon","onClick"],[1,"custom-blitz-seat__default-avatar",3,"src"],[1,"custom-blitz-seat--reserved-backdrop"],[1,"custom-blitz-seat--avatar",3,"user","isLink"],[1,"custom-blitz-seat__add--icon","reserved",3,"onClick"],[1,"custom-blitz-seat__add--icon","reserved","accept",3,"onClick"],[1,"custom-blitz-seat--icon",3,"buttonModifier","loading","flatButton","rounded","icon","onClick"],[1,"custom-blitz-seat--icon",3,"buttonModifier","flatButton","rounded","icon","onClick"],[1,"custom-blitz-seat--locked__with--reason",3,"buttonModifier","ngClass","flatButton","rounded","bclass","icon","onClick"],[1,"custom-blitz-seat__bot-container"],[1,"custom-blitz-seat--bot",3,"icon"],[1,"custom-blitz-seat__losers--overlay"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,CKt,1,4,"button-icon",1)(2,yKt,1,0,"add-button",2)(3,SKt,1,4,"button-icon",3)(4,wKt,2,3,"img",4)(5,TKt,1,0,"div",5)(6,PKt,1,2,"avatar",6)(7,IKt,1,0,"add-button",7)(8,MKt,1,0,"add-button",8)(9,OKt,1,7,"button-icon",9)(10,EKt,1,6,"button-icon",10)(11,xKt,1,6,"button-icon",10)(12,AKt,1,8,"button-icon",11)(13,RKt,2,1,"div",12)(14,kKt,1,0,"div",13),m()),2&e&&(l("ngClass",cn(15,LKt,i.isPlaceholder()||i.invitePlayerAction.isEnabled||i.isLocked,i.isFinalTable)),d(),l("ngIf",i.isLocked&&!i.disabledReason),d(),l("ngIf",!i.player&&i.joinAction.isEnabled&&!i.isLocked),d(),l("ngIf",!i.player&&i.invitePlayerAction.isEnabled&&!i.isLocked),d(),l("ngIf",i.isPlaceholder()),d(),l("ngIf",i.isReserved()),d(),l("ngIf",i.player),d(),l("ngIf",i.isReserved()&&i.joinAction.isEnabled&&!i.acceptInviteAction.isEnabled&&!i.isLocked),d(),l("ngIf",i.isReserved()&&i.acceptInviteAction.isEnabled&&!i.isLocked),d(),l("ngIf",i.player&&i.cancelAction.isEnabled&&!i.declineInviteAction.isEnabled),d(),l("ngIf",i.player&&!i.cancelAction.isEnabled&&i.declineInviteAction.isEnabled),d(),l("ngIf",i.player&&!i.cancelAction.isEnabled&&i.cancelInviteAction.isEnabled),d(),l("ngIf",i.isLocked&&i.disabledReason),d(),l("ngIf",i.isBot()),d(),l("ngIf",i.isInLosersTeam))},dependencies:[Xe,Ne,Bo,Dn,ei,_v,uo],styles:[".custom-blitz-seat--wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.custom-blitz-seat--icon[_ngcontent-%COMP%]{position:absolute;top:0;right:0;transform:translate(40%,-40%);width:2.5rem;height:2.5rem;min-width:0;min-height:0;font-size:1.5rem;z-index:5}.custom-blitz-seat__default-avatar[_ngcontent-%COMP%]{width:100%;max-width:65%}.custom-blitz-seat--reserved-backdrop[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EJoinDisabledReason||(t.EJoinDisabledReason={})).MinLevel="minLevel",o.MaxLevel="maxLevel",o.VipRequired="vipRequired",o.ClubOnly="clubOnly",o.NotEnoughChips="notEnoughChips"}(DD||(DD={}));const DKt=t=>({"with--footer":t});function BKt(t,n){if(1&t&&B(0,"div",10),2&t){const o=_();l("ngClass",ne(1,DKt,o.showBlitzRoomFooter()))}}function NKt(t,n){1&t&&B(0,"div",11)}function FKt(t,n){1&t&&(p(0,"div",20),B(1,"img",21),V(2,"transformUrl"),m()),2&t&&(d(),Uf("src",$(2,1,"blitz-tournament/star.png"),Wn))}function UKt(t,n){if(1&t){const o=Ce();p(0,"div",17)(1,"custom-blitz-seat",18),Y("join",function(i){return oe(o),re(_(2).joinRoom(i))})("cancel",function(i){return oe(o),re(_(2).cancelPlayer(i))})("invite",function(i){return oe(o),re(_(2).invitePlayer(i))})("cancelInvite",function(i){return oe(o),re(_(2).cancelPlayerInvite(i))})("acceptInvite",function(i){return oe(o),re(_(2).acceptPlayerInvite(i))})("declinePlayerInvite",function(){return oe(o),re(_(2).declinePlayerInvite())}),m(),U(2,FKt,3,3,"div",19),m()}if(2&t){const o=n.$implicit,e=_().$implicit,i=_();d(),l("seat",o)("isLocked",i.roomState.isLocked)("joinAction",i.getJoinAction(o))("cancelAction",i.getCancelAction(o))("invitePlayerAction",i.getInvitePlayerAction(o))("acceptInviteAction",i.getAcceptInviteAction(o))("declineInviteAction",i.getDeclineInviteAction(o))("cancelInviteAction",i.getCancelInviteAction(o))("requirements",i.roomState.model.settings.requirements)("bet",i.roomState.model.settings.transactions.bet)("isInLosersTeam",i.isTeamLosers(e))("currentPlayer",i.currentPlayer)("currentUserClubId",i.currentUserClubId)("isFinalTable",i.isFinalTable),d(),l("ngIf",i.isTeamWinners(e))}}function GKt(t,n){if(1&t&&(p(0,"div",22),H(1),m()),2&t){const o=_().$implicit,e=_();d(),se(e.getTeamResult(o))}}const VKt=t=>({freeForAll:t});function zKt(t,n){if(1&t&&(p(0,"div",12)(1,"div",13)(2,"div",14),U(3,UKt,3,15,"div",15),m(),U(4,GKt,2,1,"div",16),m()()),2&t){const o=n.$implicit,e=_();d(),l("ngClass",ne(4,VKt,e.isFreeForAll)),d(2),l("ngForOf",o)("ngForTrackBy",e.trackBySeats),d(),l("ngIf",e.table&&(e.table.state===e.tableState.Gameplay||e.table.state===e.tableState.Ended))}}function jKt(t,n){1&t&&B(0,"icon-component",23),2&t&&l("icon",_().EIcons.COLON)}const HKt=t=>({name:t});function qKt(t,n){if(1&t){const o=Ce();p(0,"button-icon-text",24),Y("onClick",function(){return oe(o),re(_().spectateRoom())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("loading",o.getSpectateAction().isLoading)("buttonModifier",o.EButtonModifier.BUTTON_ACTION)("icon",ne(6,HKt,o.EIcons.EYE)),d(),ze("",$(2,4,"TEXT.WATCH")," ")}}const WKt=t=>[t];function $Kt(t,n){if(1&t&&(B(0,"div",25),V(1,"translate")),2&t){const o=_();l("innerHtml",yt(1,1,"TOURNAMENTS.BLITZ.WINNERS_TABLES_FROM_PREV_ROUND_V2",ne(4,WKt,o.getWinnersPreviousTablesIndexesString())),Yn)}}const KKt=(t,n)=>({"custom-blitz-table__with--footer":t,finalTable:n});let BD=(()=>{var t;class n{constructor(){this.join=new ke,this.spectate=new ke,this.invite=new ke,this.cancel=new ke,this.cancelInvite=new ke,this.acceptInvite=new ke,this.declineInvite=new ke,this.isActive=!0,this.currencyType=ln,this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.tableState=Ve.ETableState,this.tableRound=1,this.previousWinnersTables=[]}ngOnInit(){this.isFreeForAll=1===this.roomState.model.settings.game.players.perTeam,this.table&&(this.tableRound=Nd.getTournamentRound(this.table.tournamentRound))}getTeams(){if(!this.table)return Array.from({length:this.playerSettings.count/this.playerSettings.perTeam},()=>Array.from({length:this.playerSettings.perTeam},()=>{}));if(this.table.state===Ve.ETableState.Gameplay||this.table.state===Ve.ETableState.Ended){const e=new ie.List(this.table.seats).groupBy("teamId");return Object.keys(e).map(i=>e[i])}return rIe()(this.table.seats,this.playerSettings.perTeam)}getWinnersPreviousTablesIndexes(){const e=[],i=this.getTeams();return i.find(r=>r.forEach(s=>!s))?[]:(i.forEach(r=>{r.forEach(s=>{this.roomState.model.tables.filter(a=>Nd.getTournamentRound(a.tournamentRound)===Nd.getTournamentRound(this.table.tournamentRound)-1).find((a,c)=>!(a.state!==Ve.ETableState.Ended||!r[0].player||!a.gameResult.winners.find(u=>u===s.player.id)||(e.find(u=>u===c+1)||e.push(c+1),0)))})}),e)}getWinnersPreviousTablesIndexesString(){const e=this.getWinnersPreviousTablesIndexes();let i="";return e.forEach((r,s)=>{i+=s<e.length-1?" ".concat(r," &"):" ".concat(r)}),i}showBlitzRoomFooter(){return this.table&&1!==Nd.getTournamentRound(this.table.tournamentRound)&&this.getWinnersPreviousTablesIndexes().length===this.playerSettings.count/this.playerSettings.perTeam}getTeamResult(e){var i,r;return null!==(i=null===(r=this.table.gameResult.gameStats)||void 0===r?void 0:r.playerPoints[e[0].player.id])&&void 0!==i?i:0}isTeamWinners(e){return this.table&&!!this.table.gameResult.winners.find(i=>i===e[0].player.id)}isTeamLosers(e){return this.table&&!!this.table.gameResult.losers.find(i=>i===e[0].player.id)}trackBySeats(e,i){return e}trackByTeams(e,i){return e}joinRoom(e){this.join.emit({tableId:this.table.id,seatId:e})}spectateRoom(){this.spectate.emit({tableId:this.table.id})}invitePlayer(e){this.invite.emit({tableId:this.table.id,seatId:e})}cancelPlayer(e){this.cancel.emit({tableId:this.table.id,playerId:e})}cancelPlayerInvite(e){this.cancelInvite.emit({tableId:this.table.id,seatId:e})}acceptPlayerInvite(e){this.acceptInvite.emit({tableId:this.table.id,seatId:e})}declinePlayerInvite(){this.declineInvite.emit()}getTitle(){return this.presetStyle===n.EPresetStyle.Final?{key:"TOURNAMENTS.BLITZ.FINAL"}:{key:"TOURNAMENTS.BLITZ.TABLE_INDEX",params:[this.index]}}getJoinAction(e){var i;return{isEnabled:this.roomState.model.state===Ve.ERoomState.Waiting&&1===Nd.getTournamentRound(null===(i=this.table)||void 0===i?void 0:i.tournamentRound)&&this.roomState.isSpectating&&!this.roomState.hasActiveInvite()&&!(null!=e&&e.reserved)}}getCancelAction(e){var i,r,s;return{isEnabled:!this.lockdown&&this.roomState.model.state===Ve.ERoomState.Waiting&&1===Nd.getTournamentRound(null===(i=this.table)||void 0===i?void 0:i.tournamentRound)&&(this.roomState.isCurrentUserHost()||(null===(r=lo.getPlayerFromSeat(e))||void 0===r?void 0:r.id)===this.currentPlayer.id)&&!e.reserved,isLoading:(null===(s=lo.getPlayerFromSeat(e))||void 0===s?void 0:s.id)===this.currentPlayer.id&&this.roomState.actions.leave.inProgress}}getInvitePlayerAction(e){var i;return{isEnabled:this.roomState.model.state===Ve.ERoomState.Waiting&&1===Nd.getTournamentRound(null===(i=this.table)||void 0===i?void 0:i.tournamentRound)&&this.roomState.isCurrentUserHost()}}getAcceptInviteAction(e){var i;return{isEnabled:this.roomState.model.state===Ve.ERoomState.Waiting&&(null==e||null===(i=e.reserved)||void 0===i?void 0:i.profile.id)===this.currentPlayer.id}}getDeclineInviteAction(e){return{isEnabled:!1}}getCancelInviteAction(e){var i;return{isEnabled:this.roomState.model.state===Ve.ERoomState.Waiting&&1===Nd.getTournamentRound(null===(i=this.table)||void 0===i?void 0:i.tournamentRound)&&this.roomState.isCurrentUserHost()&&!(null==e||!e.reserved)}}getSpectateAction(){var e,i;return{isEnabled:(null===(e=this.table)||void 0===e?void 0:e.state)===Ve.ETableState.Gameplay&&this.roomState.isSpectating&&this.roomState.model.settings.spectators&&this.roomState.model.state!==Ve.ERoomState.Finalize&&(!this.roomState.club||(null===(i=this.roomState.club)||void 0===i?void 0:i.clubProfile.id)===this.currentUserClubId),isLoading:this.roomState.actions.spectate.inProgress||this.currentTable&&this.currentTable.state!==Ve.ETableState.Ended}}getGameStateKey(){if(!this.table)return"TOURNAMENTS.BLITZ.GAME_STATES.NOT_STARTED";if(this.table.state!==Ve.ETableState.Ended&&this.roomState.model.state===Ve.ERoomState.Finalize)return"TOURNAMENTS.BLITZ.GAME_STATES.FAILED";switch(this.table.state){case Ve.ETableState.Waiting:return"TOURNAMENTS.BLITZ.GAME_STATES.GAME_READY_TO_START";case Ve.ETableState.Gameplay:return"TOURNAMENTS.BLITZ.GAME_STATES.GAME_IN_PROGRESS";case Ve.ETableState.Ready:return"TOURNAMENTS.BLITZ.GAME_STATES.GAME_READY_TO_LOAD";case Ve.ETableState.Ended:return"TOURNAMENTS.BLITZ.GAME_STATES.GAME_ENDED";default:return"TOURNAMENTS.BLITZ.GAME_STATES.NOT_STARTED"}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-table"]],hostVars:2,hostBindings:function(e,i){2&e&&Uo("custom-blitz-table--wrapper-host",i.isActive)},inputs:{roomState:"roomState",table:"table",currentTable:"currentTable",index:"index",currentPlayer:"currentPlayer",currentUserClubId:"currentUserClubId",playerSettings:"playerSettings",isPlayerInCurrentRoom:"isPlayerInCurrentRoom",lockdown:"lockdown",presetStyle:"presetStyle",isFinalTable:"isFinalTable"},outputs:{join:"join",spectate:"spectate",invite:"invite",cancel:"cancel",cancelInvite:"cancelInvite",acceptInvite:"acceptInvite",declineInvite:"declineInvite"},decls:14,vars:18,consts:[["class","custom-blitz-table__laurel",3,"ngClass",4,"ngIf"],["class","custom-blitz-table__particles",4,"ngIf"],[1,"custom-blitz-table--container",3,"ngClass"],[1,"custom-blitz-table--header"],[1,"custom-blitz-table--teams__container"],["class","custom-blitz-table--team__container",4,"ngFor","ngForOf","ngForTrackBy"],["class","custom-blitz-table--team__colon",3,"icon",4,"ngIf"],[1,"custom-blitz-table__state"],["class","custom-blitz-table__spectate-btn",3,"loading","buttonModifier","icon","onClick",4,"ngIf"],["class","custom-blitz-table__winners-info__footer",3,"innerHtml",4,"ngIf"],[1,"custom-blitz-table__laurel",3,"ngClass"],[1,"custom-blitz-table__particles"],[1,"custom-blitz-table--team__container"],[1,"custom-blitz-table--team",3,"ngClass"],[1,"custom-blitz-table--seats__container"],["class","custom-bliz-table--seat__container",4,"ngFor","ngForOf","ngForTrackBy"],["class","custom-blitz-table--avatar__result",4,"ngIf"],[1,"custom-bliz-table--seat__container"],[1,"custom-blitz-table--seat",3,"seat","isLocked","joinAction","cancelAction","invitePlayerAction","acceptInviteAction","declineInviteAction","cancelInviteAction","requirements","bet","isInLosersTeam","currentPlayer","currentUserClubId","isFinalTable","join","cancel","invite","cancelInvite","acceptInvite","declinePlayerInvite"],["class","custom-bliz-table--seat__won--star",4,"ngIf"],[1,"custom-bliz-table--seat__won--star"],[1,"avatar-won-star",3,"src"],[1,"custom-blitz-table--avatar__result"],[1,"custom-blitz-table--team__colon",3,"icon"],[1,"custom-blitz-table__spectate-btn",3,"loading","buttonModifier","icon","onClick"],[1,"custom-blitz-table__winners-info__footer",3,"innerHtml"]],template:function(e,i){1&e&&(U(0,BKt,1,3,"div",0)(1,NKt,1,0,"div",1),p(2,"container-component",2)(3,"div",3),H(4),V(5,"translate"),m(),p(6,"div",4),U(7,zKt,5,6,"div",5)(8,jKt,1,1,"icon-component",6),m(),p(9,"span",7),H(10),V(11,"translate"),m(),U(12,qKt,3,8,"button-icon-text",8)(13,$Kt,2,6,"div",9),m()),2&e&&(l("ngIf",i.isFinalTable),d(),l("ngIf",i.isFinalTable),d(),l("ngClass",cn(15,KKt,i.showBlitzRoomFooter(),i.isFinalTable)),d(2),se(yt(5,10,i.getTitle().key,i.getTitle().params)),d(3),l("ngForOf",i.getTeams())("ngForTrackBy",i.trackByTeams),d(),l("ngIf",!i.isFreeForAll),d(2),se($(11,13,i.getGameStateKey())),d(2),l("ngIf",i.getSpectateAction().isEnabled),d(),l("ngIf",i.showBlitzRoomFooter()))},dependencies:[Xe,Mt,Ne,Dn,so,Ga,DD,qe,uo],styles:[".custom-blitz-table--container[_ngcontent-%COMP%]{height:calc(100% - 2rem);width:inherit;margin:1rem auto}.custom-blitz-table--header[_ngcontent-%COMP%]{width:100%;text-align:center;font-size:1.2em}.custom-blitz-table--teams__container[_ngcontent-%COMP%]{display:flex;width:100%;padding:1rem;flex-flow:row nowrap;justify-content:space-around;position:relative}.custom-blitz-table--team__container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center}.custom-blitz-table--team[_ngcontent-%COMP%]{width:100%;height:unset;display:flex;flex-direction:column;align-items:center;margin:.5rem 1rem}.custom-blitz-table--team.freeForAll[_ngcontent-%COMP%]{margin:0rem!important}.custom-blitz-table--seat[_ngcontent-%COMP%]{width:100%;max-width:10rem;font-size:5rem;height:initial;display:block;margin:auto}.custom-blitz-table--seats__container[_ngcontent-%COMP%]{display:flex;width:100%;height:unset;justify-content:center}.custom-blitz-table--team__colon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.custom-bliz-table--seat__container[_ngcontent-%COMP%]{width:100%;height:unset;margin:.5rem;position:relative}.custom-bliz-table--seat__won--star[_ngcontent-%COMP%]{position:absolute;top:-1rem;right:-1rem}.custom-blitz-table__spectate-btn[_ngcontent-%COMP%]{margin:1rem 0 2rem}.custom-blitz-table__winners-info__footer[_ngcontent-%COMP%]{width:90%;text-align:center;position:absolute;bottom:-3rem;height:3rem;display:flex;justify-content:center;align-items:center}.custom-blitz-table--avatar__result[_ngcontent-%COMP%]{position:absolute;bottom:-1rem}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EPresetStyle||(t.EPresetStyle={})).Final="final",o.SemiFinal="semiFinal"}(BD||(BD={}));var ZKt=ve.EIcons;function QKt(t,n){if(1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t){const o=_();d(),ze(" ",$(2,1,o.winnersBoxPreset===o.winnersBoxPresetType.First?"TOURNAMENTS.BLITZ.FIRST":"TOURNAMENTS.BLITZ.SECOND")," ")}}function YKt(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"TOURNAMENTS.BLITZ.HOST")," "))}function JKt(t,n){if(1&t&&B(0,"avatar",13),2&t){const o=_().$implicit;l("user",_().getPlayerProfile(o))("hasLevel",!0)("isLink",!0)("hasUsername",!0)}}function XKt(t,n){if(1&t&&(p(0,"div",14),B(1,"icon-component",15),m()),2&t){const o=_(2);d(),l("icon",o.EIcons.BOT)}}function eZt(t,n){1&t&&(B(0,"img",16),V(1,"transformUrl")),2&t&&Uf("src",$(1,1,"blitz-tournament/tournament-icon-avatar.svg"),Wn)}function tZt(t,n){if(1&t&&(p(0,"div",5)(1,"div",6),U(2,JKt,1,4,"avatar",7)(3,XKt,2,1,"div",8)(4,eZt,2,3,"img",9),m(),p(5,"div",10)(6,"div",11),H(7),V(8,"translate"),m(),B(9,"currency-component",12),m()()),2&t){const o=n.$implicit,e=_();d(2),l("ngIf",o),d(),l("ngIf",e.isBot(o)),d(),l("ngIf",!o),d(3),ze(" ",$(8,6,"TOURNAMENTS.BLITZ.REWARD")," "),d(2),l("currency",e.reward.currencyType)("value",e.reward.amount)}}let SO=(()=>{var t;class n{constructor(){this.players=[],this.currencyType=ln,this.EIcons=ZKt,this.winnersBoxPresetType=n.EWinnersBoxPreset}getPlayersSpots(){return this.players.length?this.players:Array.from({length:this.playersCount},(e,i)=>{})}getPlayerProfile(e){return Lo.toPlatformProfile(e.profile)}isBot(e){return e&&(e.isBot||e.state===Ve.EPlayerState.Inactive)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-winners-box"]],inputs:{winnersBoxPreset:"winnersBoxPreset",reward:"reward",players:"players",playersCount:"playersCount"},decls:6,vars:5,consts:[[1,"custom-blitz-winner-box__container",3,"ngClass"],[1,"custom-blitz-winner-box__place--label",3,"ngClass"],[4,"ngIf"],[1,"custom-blitz-winner-box__players-container"],["class","custom-blitz-winner-box__player",4,"ngFor","ngForOf"],[1,"custom-blitz-winner-box__player"],[1,"custom-blitz-winner-box__player-avatar"],["class","custom-blitz-winner-box__player-avatar__img",3,"user","hasLevel","isLink","hasUsername",4,"ngIf"],["class","custom-blitz-winner-box__bot-container",4,"ngIf"],["class","custom-blitz-winner-box__player-avatar__img",3,"src",4,"ngIf"],[1,"custom-blitz-winner-box__player--reward"],[1,"custom-blitz-winner-box__player--reward__label"],[1,"custom-blitz-winner-box__player--reward__value",3,"currency","value"],[1,"custom-blitz-winner-box__player-avatar__img",3,"user","hasLevel","isLink","hasUsername"],[1,"custom-blitz-winner-box__bot-container"],[1,"custom-blitz-winner-box__bot--icon",3,"icon"],[1,"custom-blitz-winner-box__player-avatar__img",3,"src"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),U(2,QKt,3,3,"span",2)(3,YKt,3,3,"span",2),m(),p(4,"div",3),U(5,tZt,10,8,"div",4),m()()),2&e&&(l("ngClass",i.winnersBoxPreset),d(),l("ngClass",i.winnersBoxPreset),d(),l("ngIf",i.winnersBoxPreset===i.winnersBoxPresetType.First||i.winnersBoxPreset===i.winnersBoxPresetType.Second),d(),l("ngIf",i.winnersBoxPreset===i.winnersBoxPresetType.Host),d(2),l("ngForOf",i.getPlayersSpots()))},dependencies:[Xe,Mt,Ne,Bo,Dn,So,qe,uo],styles:[".custom-blitz-winner-box__players-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.custom-blitz-winner-box__player[_ngcontent-%COMP%]{padding:0 1rem;display:flex;flex-direction:column;justify-content:center;align-items:center}.custom-blitz-winner-box__player-avatar[_ngcontent-%COMP%]{height:7rem;width:7rem;position:relative}.custom-blitz-winner-box__player-avatar__img[_ngcontent-%COMP%]{width:7rem;height:7rem}.custom-blitz-winner-box__player--reward[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center}.custom-blitz-winner-box__player--reward__value[_ngcontent-%COMP%], .custom-blitz-winner-box__player--reward__label[_ngcontent-%COMP%], .custom-blitz-winner-box__place--label[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),n})();function nZt(t,n){if(1&t&&(p(0,"div",11),B(1,"custom-blitz-winners-box",12),m()),2&t){const o=n.$implicit,e=n.index,i=_();d(),l("reward",o)("winnersBoxPreset",e+1===1?i.winnersBoxPreset.First:i.winnersBoxPreset.Second)("players",i.getPlayersByResult(0===e))("playersCount",i.roomState.model.settings.players.qualifyingSpots)}}!function(t){let n;var o;(o=n=t.EWinnersBoxPreset||(t.EWinnersBoxPreset={})).First="first",o.Second="second",o.Host="host"}(SO||(SO={}));const iZt=t=>[t];function oZt(t,n){if(1&t&&B(0,"custom-blitz-winners-box",14),2&t){const o=_(2);l("reward",o.roomState.model.settings.transactions.hostCut)("winnersBoxPreset",o.winnersBoxPreset.Host)("playersCount",1)("players",ne(4,iZt,o.getHostPlayer()))}}function rZt(t,n){if(1&t&&(p(0,"div",11),U(1,oZt,1,6,"custom-blitz-winners-box",13),m()),2&t){const o=_();d(),l("ngIf",o.getHostPlayer())}}let sIe=(()=>{var t;class n{constructor(){this.rewards=[],this.currencyType=ln,this.winnersBoxPreset=SO.EWinnersBoxPreset}ngOnInit(){const e=this.roomState.model.settings.transactions.placementRewards;this.calculator=new Ve.TournamentRoundsCalculator(this.roomState.model.settings.players.count,this.roomState.model.settings.game.players.perTeam,this.roomState.model.settings.game.players.count,this.roomState.model.settings.players.qualifyingSpots),Object.keys(e).forEach(i=>this.rewards.push(e[i]))}getPlayersByResult(e){const i=this.roomState.model.tables[this.roomState.model.tables.length-1];return this.calculator.isLastRound(i.tournamentRound)?e?lo.getWinnersFromTable(i):lo.getLosersFromTable(i):[]}trackByFn(e,i){return e}getHostPlayer(){return lo.findMostRecentPlayerProfile(this.roomState.host.id,this.roomState.model.tables)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-winners-info"]],inputs:{roomState:"roomState"},decls:16,vars:12,consts:[[1,"custom-blitz-winners-info__container"],[1,"custom-blitz-winners-info--header"],[1,"custom-blitz-winners-info"],[1,"custom-blitz-winners-info__tournament-name"],[1,"custom-blitz-winner-info__prize-pool__container"],[1,"custom-blitz-winner-info__prize-pool__label"],[1,"custom-blitz-winner-info__prize-pool"],[1,"custom-blitz-winner-info__prize-pool__currency",3,"currency","value"],[1,"custom-blitz-winners__boxes"],["class","custom-blitz-winners__box",4,"ngFor","ngForOf","ngForTrackBy"],["class","custom-blitz-winners__box",4,"ngIf"],[1,"custom-blitz-winners__box"],[3,"reward","winnersBoxPreset","players","playersCount"],[3,"reward","winnersBoxPreset","playersCount","players",4,"ngIf"],[3,"reward","winnersBoxPreset","playersCount","players"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),H(2),V(3,"translate"),m(),p(4,"div",2)(5,"div",3),H(6),m(),p(7,"div",4)(8,"div",5),H(9),V(10,"translate"),m(),p(11,"div",6),B(12,"currency-component",7),m()()(),p(13,"div",8),U(14,nZt,2,4,"div",9)(15,rZt,2,1,"div",10),m()()),2&e&&(d(2),se($(3,8,"GAME_HISTORY.RESULT")),d(4),se(i.roomState.model.settings.description),d(3),se($(10,10,"TOURNAMENTS.OPTIONS.totalPool")),d(3),l("currency",i.currencyType.Chips)("value",i.roomState.model.settings.transactions.prizePool),d(2),l("ngForOf",i.rewards)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.roomState.model.settings.transactions.hostCut))},dependencies:[Mt,Ne,So,SO,qe],styles:[".custom-blitz-winners-info__container[_ngcontent-%COMP%]{overflow:hidden;padding:.2rem 0;width:100%;max-width:50rem;margin:1rem auto;width:calc(100% - 2rem)}@media screen and (max-width: 900px){.custom-blitz-winners-info__container[_ngcontent-%COMP%]{width:calc(100% - 1rem)}}.custom-blitz-winners-info--header[_ngcontent-%COMP%]{text-align:center;text-transform:uppercase}.custom-blitz-winner-info__prize-pool__label[_ngcontent-%COMP%], .custom-blitz-winner-info__prize-pool[_ngcontent-%COMP%]{text-align:center}.custom-blitz-winners-info__tournament-name[_ngcontent-%COMP%]{text-align:center;padding:0 3rem}.custom-blitz-winners__box[_ngcontent-%COMP%]{width:calc(100% - 8rem);margin:1rem 4rem}@media screen and (max-width: 1440px){.custom-blitz-winners__box[_ngcontent-%COMP%]{width:calc(100% - 4rem);margin:1rem 2rem}}"],changeDetection:0}),n})();const sZt=["customBlitzLobbyContainer"],aZt=["scrollButtonControlComponent"];function cZt(t,n){1&t&&B(0,"spinner-loader",6)}const lZt=()=>({textKey:"MATCHMAKING.ROOM_DESTROYED"}),aIe=t=>[t];function uZt(t,n){1&t&&B(0,"empty-content",7),2&t&&l("textArray",ne(2,aIe,pt(1,lZt)))}function dZt(t,n){if(1&t){const o=Ce();p(0,"custom-blitz-table",16),Y("join",function(i){return oe(o),re(_(3).join(i))})("cancel",function(i){return oe(o),re(_(3).cancel(i))})("cancelInvite",function(i){return oe(o),re(_(3).cancelInvite(i))})("spectate",function(i){return oe(o),re(_(3).spectate(i))})("invite",function(i){return oe(o),re(_(3).invite(i))})("acceptInvite",function(i){return oe(o),re(_(3).acceptInvite(i))}),m()}if(2&t){const o=n.index,e=_().index,i=_(2);l("roomState",i.room)("table",i.getTablesByRound(e+1)[o])("currentTable",i.currentTable)("index",o+1)("currentPlayer",i.currentPlayer)("currentUserClubId",i.currentUserClubId)("playerSettings",i.room.model.settings.game.players)("lockdown",i.lockdown)("isFinalTable",e===i.getRounds().length-1)}}function pZt(t,n){1&t&&B(0,"custom-blitz-winners-info",17),2&t&&l("roomState",_(3).room)}function hZt(t,n){if(1&t&&(p(0,"div",12)(1,"div",13),H(2),V(3,"translate"),m(),U(4,dZt,1,9,"custom-blitz-table",14)(5,pZt,1,1,"custom-blitz-winners-info",15),m()),2&t){const o=n.index,e=_(2);d(2),ze(" ",yt(3,3,"TOURNAMENTS.BLITZ.ROUND_INDEX",ne(6,aIe,o+1))," "),d(2),l("ngForOf",e.getGamesPerRound(o+1)),d(),l("ngIf",o===e.getRounds().length-1)}}function mZt(t,n){if(1&t){const o=Ce();p(0,"div",8)(1,"custom-blitz-room",9),Y("leave",function(){return oe(o),re(_().leave())}),m(),p(2,"div",10),U(3,hZt,6,8,"div",11),m()()}if(2&t){const o=_();d(),l("roomState",o.room)("lockdown",o.lockdown)("isInRoom",!0),d(2),l("ngForOf",o.getRounds())}}function fZt(t,n){if(1&t){const o=Ce();p(0,"scroll-button-control",23,24),Y("changeRound",function(i){return oe(o),re(_(2).scrollToRound(i))}),m()}if(2&t){const o=_(2);l("fragments",o.scrollButtonRoundsTextArray)("initialIndex",o.initialRoundIndex)}}function gZt(t,n){if(1&t){const o=Ce();p(0,"custom-blitz-table",28),Y("join",function(i){return oe(o),re(_(5).join(i))})("cancel",function(i){return oe(o),re(_(5).cancel(i))})("cancelInvite",function(i){return oe(o),re(_(5).cancelInvite(i))})("spectate",function(i){return oe(o),re(_(5).spectate(i))})("invite",function(i){return oe(o),re(_(5).invite(i))})("acceptInvite",function(i){return oe(o),re(_(5).acceptInvite(i))}),m()}if(2&t){const o=n.index,e=_(2).index,i=_(3);l("roomState",i.room)("table",i.getTablesByRound(e+1)[o])("currentTable",i.currentTable)("playerSettings",i.room.model.settings.game.players)("index",o+1)("currentPlayer",i.currentPlayer)("currentUserClubId",i.currentUserClubId)("lockdown",i.lockdown)("isFinalTable",e===i.getRounds().length-1)}}function _Zt(t,n){1&t&&B(0,"custom-blitz-winners-info",17),2&t&&l("roomState",_(5).room)}function vZt(t,n){if(1&t&&U(0,gZt,1,9,"custom-blitz-table",27)(1,_Zt,1,1,"custom-blitz-winners-info",15),2&t){const o=_().index,e=_(3);l("ngForOf",e.getGamesPerRound(o+1)),d(),l("ngIf",o===e.getRounds().length-1)}}function bZt(t,n){1&t&&U(0,vZt,2,2,"ng-template",26),2&t&&l("contentFragmentWidth",_(3).fragmentWidth)("contentFragmentClass","custom-blitz-room-lobby__fragment-table")}function CZt(t,n){if(1&t&&(Tn(0),U(1,bZt,1,2,null,25),Pn()),2&t){const o=_(2);d(),l("ngForOf",o.getRounds())("ngForTrackBy",o.trackByIndex)}}function yZt(t,n){if(1&t){const o=Ce();p(0,"div",18)(1,"custom-blitz-room",9),Y("leave",function(){return oe(o),re(_().leave())}),m(),p(2,"div",19),U(3,fZt,2,2,"scroll-button-control",20),m(),p(4,"div",10)(5,"fragmented-view-controller",21),Y("fragmentSnap",function(i){return oe(o),re(_().setCurrentFramentId(i))}),U(6,CZt,2,2,"ng-container",22),m()()()}if(2&t){const o=_();d(),l("roomState",o.room)("lockdown",o.lockdown)("isInRoom",!0),d(2),l("ngIf",o.scrollButtonRoundsTextArray.length>0),d(2),l("vsEnabled",!1)("snapToIndex",o.currentFragmentIndex),d(),l("ngIf",o.fragmentWidth)}}let cIe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){this.route=e,this.store=i,this.cdr=r,this.blitzRoomLobbyService=s,this.popupService=a,this.toast=c,this.navigation=u,this.pages=h,this.rulerService=b,this.actions=w,this.gameState=R,this.blockService=G,this.constants=K,this.currentFragmentIndex=0,this.initialRoundIndex=0,this.scrollButtonRoundsTextArray=[],this.subscriptions=new ie.List}ngOnInit(){this.subscriptions.add(this.route.params.pipe(bt(e=>(null==e?void 0:e.tournamentId)&&this.roomId!==e.tournamentId)).subscribe(e=>{var i,r;this.roomId=e.tournamentId,this.subscriptions.add(this.store.subscribeSimpleProfile().subscribe(s=>{this.currentPlayer=s,this.cdr.detectChanges()})),this.subscriptions.add(null===(i=this.store.clubs)||void 0===i?void 0:i.subscribeClubProfileId().subscribe(s=>{this.currentUserClubId=s,this.cdr.detectChanges()})),this.blockService.getBlockList().catch(s=>console.warn(s)),this.blitzRoomLobbyService.connect({roomId:this.roomId,roomType:Jt.RoomType.BlitzTournament,roomCode:null===(r=this.store.games.selectUnlockedPrivateRoom(this.roomId))||void 0===r?void 0:r.roomCode}),this.subscriptions.add(this.store.customRoomLobby.subscribeLoadingState().subscribe(s=>{this.loadingState=s,this.cdr.detectChanges()})),this.subscriptions.add(this.store.customRoomLobby.subscribeLockdown().subscribe(s=>{this.lockdown=s,this.cdr.detectChanges()})),this.subscriptions.add(this.store.customRoomLobby.subscribeCurrentTable().subscribe(s=>{this.currentTable=s,this.cdr.detectChanges()})),this.subscriptions.add(this.store.customRoomLobby.subscribeCurrentGameLobbyRoom().pipe(bt(s=>!!s)).subscribe(s=>{if(this.room=s,this.scrollButtonRoundsTextArray=[],this.calculator=new Ve.TournamentRoundsCalculator(s.model.settings.players.count,s.model.settings.game.players.perTeam,s.model.settings.game.players.count,s.model.settings.players.qualifyingSpots),this.getRounds().forEach(c=>{this.scrollButtonRoundsTextArray.push({textKey:{key:"TOURNAMENTS.BLITZ.ROUND_INDEX",params:[c]}})}),history.state.tableId){var a;const c=s.model.tables.find(u=>u.id===history.state.tableId);c&&!this.calculator.isLastRound(c.tournamentRound)&&null!=c&&null!==(a=c.gameResult)&&void 0!==a&&a.losers.find(u=>u===this.currentPlayer.id)&&(this.popupService.show("TOURNAMENTS.BLITZ.ELIMINATED"),history.state.tableId=void 0)}this.cdr.detectChanges()}))})),this.subscriptions.add(this.actions.pipe(ai(Nq)).subscribe(e=>this.onKicked(e))),this.subscriptions.add(this.actions.pipe(ai(Bq)).subscribe(e=>this.onRoomDestroyed(e))),this.subscriptions.add(this.actions.pipe(ai(Fq)).subscribe(e=>this.onConnectError(e)))}ngAfterViewInit(){this.subscriptions.add(this.rulerService.getAppSize().subscribe(e=>{this.fragmentWidth=this.customBlitzLobbyContainer.nativeElement.clientWidth,this.showScollableTournamentLayout=e.width<=900&&e.height<=1024,this.cdr.detectChanges()}))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=new ie.List}getRounds(){return this.calculator?Array.from({length:this.calculator.maxRounds()},(e,i)=>i+1):[]}getGamesPerRound(e){return this.calculator?Array.from({length:this.calculator.getGameCountByRound(e)},(i,r)=>r):[]}getTablesByRound(e){return this.room.model.tables.filter(i=>Nd.getTournamentRound(i.tournamentRound)===Nd.getTournamentRound(e))}leave(e={}){var i=this;if(this.store.customRoomLobby.selectLockdown())return void this.toast.warn("CUSTOM_GAMES.WAIT");const r=function(){var a=f(function*(){try{if(i.store.customRoomLobby.selectLockdown())return void i.toast.warn("CUSTOM_GAMES.WAIT");let u=e.url;var c;u||(u=i.pages.createRoomReturnPage(Jt.RoomType.BlitzTournament,i.gameState.getCurrentGameState().id,null===(c=i.room)||void 0===c?void 0:c.model)),e.onlyLeaveTable&&!i.room.isCurrentUserHost()?i.blitzRoomLobbyService.leaveTable():(yield i.blitzRoomLobbyService.leaveRoom(e),i.navigation.navigateByUrl(u))}catch(u){i.toast.error(u instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}});return function(){return a.apply(this,arguments)}}();if(!this.room)return void r();if((this.room.destroyedState.isDestroyed||this.room.isSpectating)&&(this.room.model.state!==Ve.ERoomState.Finalize||this.store.games.selectActions().acceptInvite||this.room.destroyedState.reason===io.NoLongerInRoom))return void r();let s;s=this.room.model.state===Ve.ERoomState.Waiting?this.room.isCurrentUserHost()?"CUSTOM_GAMES.DESTROY_ROOM":"TOURNAMENTS.LEAVE_WARNING":this.room.model.state===Ve.ERoomState.Finalize?"TOURNAMENTS.LEAVE_WARNING":"TOURNAMENTS.LEAVE_CUSTOM_TOURNAMENT",this.popupService.confirm({textParams:{translationKey:s},buttons:{action:()=>r()}})}join(e){var i;const r=Oh.getPlayers(this.room.model);this.store.selectBlockListState().loadingState.isLoaded&&this.store.selectPlayerBlockViewModel().blocked.find(s=>!!r.find(a=>a.id===s.profile.id))?this.popupService.confirm({textParams:{translationKey:"CUSTOM_GAMES.BLOCKED_PLAYERS"},buttons:{action:()=>{var s;return this.blitzRoomLobbyService.joinRoom({roomId:this.roomId,type:Jt.RoomType.BlitzTournament,seatId:e.seatId,tableId:e.tableId,roomCode:null===(s=this.store.games.selectUnlockedPrivateRoom(this.roomId))||void 0===s?void 0:s.roomCode})}}}):this.blitzRoomLobbyService.joinRoom({roomId:this.roomId,type:Jt.RoomType.BlitzTournament,seatId:e.seatId,tableId:e.tableId,roomCode:null===(i=this.store.games.selectUnlockedPrivateRoom(this.roomId))||void 0===i?void 0:i.roomCode})}invite(e){this.blitzRoomLobbyService.invitePlayer(e)}acceptInvite(e){var i=this;return f(function*(){try{yield i.blitzRoomLobbyService.acceptInvite({roomId:i.roomId,type:Jt.RoomType.BlitzTournament,seatId:e.seatId,tableId:e.tableId})}catch(r){i.toast.error(r instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}})()}cancelInvite(e){var i=this;return f(function*(){try{yield i.blitzRoomLobbyService.cancelInvite({seatId:e.seatId,tableId:e.tableId})}catch(r){i.toast.error(r instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}})()}cancel(e){e.playerId===this.currentPlayer.id?this.leave({onlyLeaveTable:!0}):this.blitzRoomLobbyService.kickPlayer({roomId:this.roomId,playerId:e.playerId})}spectate(e){var i=this;return f(function*(){try{yield i.blitzRoomLobbyService.spectateRoom({tableId:e.tableId,roomCode:history.state.roomCode})}catch(r){i.toast.error(r instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}})()}setCurrentFramentId(e){this.currentFragmentIndex!==e&&(this.currentFragmentIndex=e,this.scrollButtonControl.scrollToIndex(e),this.cdr.detectChanges())}trackByIndex(e){return e}scrollToRound(e){this.currentFragmentIndex!==e&&(this.currentFragmentIndex=e,this.cdr.detectChanges())}onRoomDestroyed(e){const i=this.store.customRoomLobby.selectCurrentGameLobbyRoom();if(i&&!i.actions.leave.inProgress&&e.reason!==io.LeaveRoom&&i.model.state!==Ve.ERoomState.Finalize){let r="CUSTOM_GAMES.ROOM_DESTROYED";e.reason===io.RoomNoActivePlayers&&(r="TOURNAMENTS.DESTROY_NO_ACTIVE_PLAYERS"),this.popupService.show(r)}}onKicked(e){e.reason===Ve.ActiveRoomProtocol.EPlayerDisconnectReason.HostBan&&this.popupService.show("CUSTOM_GAMES.OWNER_REMOVED_YOU")}onConnectError(e){(e.error instanceof lt.ForceDisconnect||e.error instanceof lt.RoomConnectReject)&&(this.leave({url:"".concat(this.constants.defaultLoggedRoute,"/").concat(this.gameState.getCurrentGameState().id,"/lobby/tournaments/custom")}),this.toast.warn("CUSTOM_GAMES.ROOM_DESTROYED"))}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Po),g(J),g(Re),g(oIe),g(Cn),g(Dt),g(Yt),g(LD),g(Ua),g(yr),g(Zn),g(t0),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["custom-blitz-room-lobby"]],viewQuery:function(e,i){if(1&e&&($e(sZt,7),$e(aZt,5,zL)),2&e){let r;je(r=He())&&(i.customBlitzLobbyContainer=r.first),je(r=He())&&(i.scrollButtonControl=r.first)}},inputs:{roomId:"roomId"},features:[mn([oIe,{provide:jb,useFactory:()=>({showArrows:!1,showScrollbar:!1})}])],decls:6,vars:4,consts:[[1,"custom-blitz-room-lobby"],["customBlitzLobbyContainer",""],["class","custom-blitz-room-lobby-loader",4,"ngIf"],[3,"textArray",4,"ngIf"],["class","custom-blitz-room-lobby-desktop",4,"ngIf"],["class","custom-blitz-room-lobby-mobile",4,"ngIf"],[1,"custom-blitz-room-lobby-loader"],[3,"textArray"],[1,"custom-blitz-room-lobby-desktop"],[1,"custom-blitz-room-lobby__blitz--main--card",3,"roomState","lockdown","isInRoom","leave"],[1,"custom-blitz-room-lobby__rounds--container"],["class","custom-blitz-room-lobby-desktop-column",4,"ngFor","ngForOf"],[1,"custom-blitz-room-lobby-desktop-column"],[1,"custom-blitz-room-lobby__scroll--controller"],["class","custom-blitz-room-lobby-table",3,"roomState","table","currentTable","index","currentPlayer","currentUserClubId","playerSettings","lockdown","isFinalTable","join","cancel","cancelInvite","spectate","invite","acceptInvite",4,"ngFor","ngForOf"],["class","custom-blitz-room-lobby__winner--info",3,"roomState",4,"ngIf"],[1,"custom-blitz-room-lobby-table",3,"roomState","table","currentTable","index","currentPlayer","currentUserClubId","playerSettings","lockdown","isFinalTable","join","cancel","cancelInvite","spectate","invite","acceptInvite"],[1,"custom-blitz-room-lobby__winner--info",3,"roomState"],[1,"custom-blitz-room-lobby-mobile"],[1,"custom-blitz-room-lobby__scroll--controller__container"],["class","custom-blitz-room-lobby__scroll--controller",3,"fragments","initialIndex","changeRound",4,"ngIf"],[1,"custom-blitz__fvc",3,"vsEnabled","snapToIndex","fragmentSnap"],[4,"ngIf"],[1,"custom-blitz-room-lobby__scroll--controller",3,"fragments","initialIndex","changeRound"],["scrollButtonControlComponent",""],[4,"ngFor","ngForOf","ngForTrackBy"],["class","custom-blitz-room-lobby-mobile-column","contentFragment","",3,"contentFragmentWidth","contentFragmentClass"],["class","custom-blitz-room-lobby-table",3,"roomState","table","currentTable","playerSettings","index","currentPlayer","currentUserClubId","lockdown","isFinalTable","join","cancel","cancelInvite","spectate","invite","acceptInvite",4,"ngFor","ngForOf"],[1,"custom-blitz-room-lobby-table",3,"roomState","table","currentTable","playerSettings","index","currentPlayer","currentUserClubId","lockdown","isFinalTable","join","cancel","cancelInvite","spectate","invite","acceptInvite"]],template:function(e,i){1&e&&(p(0,"div",0,1),U(2,cZt,1,0,"spinner-loader",2)(3,uZt,1,4,"empty-content",3)(4,mZt,4,4,"div",4)(5,yZt,7,7,"div",5),m()),2&e&&(d(2),l("ngIf",null==i.loadingState?null:i.loadingState.isLoading),d(),l("ngIf",null==i.loadingState?null:i.loadingState.error),d(),l("ngIf",i.room&&i.currentPlayer&&!i.showScollableTournamentLayout),d(),l("ngIf",i.room&&i.currentPlayer&&i.showScollableTournamentLayout))},dependencies:[Mt,Ne,bo,vc,Fm,Hb,zL,Lq,BD,sIe,qe],styles:[".custom-blitz-room-lobby[_ngcontent-%COMP%]{height:100%;width:100%}.custom-blitz-room-lobby-desktop[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:column}.custom-blitz-room-lobby-loader[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.custom-blitz-room-lobby__rounds--container[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:row;margin-top:5rem}.custom-blitz-room-lobby-desktop-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;justify-content:flex-start;align-items:center}.custom-blitz-room-lobby__blitz--main--card[_ngcontent-%COMP%]{margin:0 auto;padding-top:1rem}.custom-blitz-room-lobby-table[_ngcontent-%COMP%]{width:calc(100% - 1rem)}.custom-blitz-room-lobby__fragment-table[_ngcontent-%COMP%]{height:15rem}.custom-blitz-room-lobby__winner--info[_ngcontent-%COMP%]{flex:1;width:100%}"],changeDetection:0}),n})(),Gq=(()=>{var t;class n{constructor(e,i,r,s){this.permissions=e,this.gamesStateService=i,this.navigation=r,this.constants=s}canActivate(){return!(!this.permissions.getModulePermission(nt.EPermissionModule.CustomBlitzTournaments).isEnabled||!this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.blitzTournaments)||this.navigation.parseUrl("".concat(this.constants.defaultLoggedRoute,"/").concat(this.gamesStateService.getCurrentGameState().id,"/lobby/tournaments"))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ti),T(Zn),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const lIe="customRoomLobby",uIe={room:void 0,table:void 0,loadingState:{roomId:void 0,isLoading:!1,error:void 0},lockdown:!1},SZt=Sr(uIe,de(APe,(t,n)=>({...t,room:n.room})),de(RPe,(t,n)=>({...t,table:n.table})),de(kPe,(t,n)=>({...t,room:Se(t.room,o=>{o.model=n.room,o.startsAt=n.startsAt})})),de(Dq,(t,n)=>({...t,lockdown:n.lockActions})),de(Bq,(t,n)=>t.room?{...t,room:Se(t.room,o=>{o.destroyedState.isDestroyed=!0,o.destroyedState.reason=n.reason})}:t),de(LPe,(t,n)=>t.room?{...t,room:Se(t.room,o=>{o.isSpectating=n.isSpectator})}:t),de(Nq,t=>({...t,room:void 0})),de(DPe,(t,n)=>({...t,loadingState:{roomId:n.roomId,isLoading:!0,error:void 0}})),de(BPe,(t,n)=>t.loadingState.roomId!==n.roomId?t:{...t,loadingState:{roomId:t.loadingState.roomId,isLoading:!1,error:void 0}}),de(Fq,(t,n)=>t.loadingState.roomId!==n.roomId?t:{...t,loadingState:{roomId:void 0,isLoading:!1,error:n.error}}),de(GPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.join.inProgress=!0})}:t),de(VPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.join.inProgress=!1})}:t),de(zPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.join.inProgress=!1})}:t),de(NPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.join.inProgress=!0})}:t),de(FPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.join.inProgress=!1})}:t),de(UPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.join.inProgress=!1})}:t),de(gKt,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.invitePlayer.inProgress=!0})}:t),de(_Kt,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.invitePlayer.inProgress=!1})}:t),de(vKt,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.invitePlayer.inProgress=!1})}:t),de(jPe,(t,n)=>!t.room||n.roomId&&t.room.model.id!==n.roomId?t:{...t,room:Se(t.room,o=>{o.actions.leave.inProgress=!0})}),de(Uq,(t,n)=>t.room&&n.roomId&&t.room.model.id!==n.roomId?t:{...t,room:void 0,loadingState:n.roomId!==t.loadingState.roomId?t.loadingState:{roomId:void 0,isLoading:!1,error:void 0}}),de(HPe,(t,n)=>!t.room||n.roomId&&t.room.model.id!==n.roomId?t:{...t,room:Se(t.room,o=>{o.actions.leave.inProgress=!1})}),de(qPe,(t,n)=>!t.room||n.roomId&&t.room.model.id!==n.roomId?t:{...t,room:Se(t.room,o=>{o.actions.leave.inProgress=!0})}),de(WPe,(t,n)=>t.room&&n.roomId&&t.room.model.id!==n.roomId?t:{...t,room:Se(t.room,o=>{o.actions.leave.inProgress=!1})}),de($Pe,(t,n)=>!t.room||n.roomId&&t.room.model.id!==n.roomId?t:{...t,room:Se(t.room,o=>{o.actions.leave.inProgress=!1})}),de(YPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.kickPlayer.inProgress=!0})}:t),de(JPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.kickPlayer.inProgress=!1})}:t),de(XPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.kickPlayer.inProgress=!1})}:t),de(KPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.cancelInvite.inProgress=!0})}:t),de(ZPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.cancelInvite.inProgress=!1})}:t),de(QPe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.cancelInvite.inProgress=!1})}:t),de(eIe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.spectate.inProgress=!0})}:t),de(tIe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.spectate.inProgress=!1})}:t),de(nIe,t=>t.room?{...t,room:Se(t.room,n=>{n.actions.spectate.inProgress=!1})}:t),de(iIe,t=>uIe));function ND(t){return t[lIe]}const dIe=We(ND,t=>t.room),pIe=We(ND,t=>t.table),hIe=We(ND,t=>t.loadingState),mIe=We(ND,t=>t.lockdown);J.prototype.customRoomLobby={selectCurrentGameLobbyRoom:function TZt(){return this.selectSync(dIe)}.bind(J.prototype),subscribeCurrentGameLobbyRoom:function PZt(){return this.select(dIe)}.bind(J.prototype),selectLoadingState:function IZt(){return this.selectSync(hIe)}.bind(J.prototype),subscribeLoadingState:function MZt(){return this.select(hIe)}.bind(J.prototype),selectLockdown:function OZt(){return this.selectSync(mIe)}.bind(J.prototype),subscribeLockdown:function EZt(){return this.select(mIe)}.bind(J.prototype),selectCurrentTable:function xZt(){return this.selectSync(pIe)}.bind(J.prototype),subscribeCurrentTable:function AZt(){return this.select(pIe)}.bind(J.prototype)};let fIe=(()=>{var t;class n{constructor(e,i,r){this.navigation=e,this.store=i,this.gamesPlayClient=r}canDeactivate(e,i,r,s){if(!this.navigation.isNavigationStoppable(s))return!0;const a=this.store.customRoomLobby.selectCurrentGameLobbyRoom(),c=this.store.customRoomLobby.selectLoadingState();return a?s&&this.navigation.getOutletUrl(s)==="/".concat(Xs.gameRoute)?!!this.hasTable()||(e.leave(),!1):(e.leave({url:s.url}),!1):!c.isLoading||(e.leave({url:s.url}),!1)}hasTable(){const e=this.gamesPlayClient.currentPlayClient.activeClientModel.currentRoom;return void 0!==e&&void 0!==e.currentTable}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Yt),T(J),T(oo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const RZt=[{path:"tournaments",component:n1e,canActivate:[Q0e],children:[{path:"",component:iTe},{path:"default",redirectTo:""},{path:"custom",canActivate:[Gq],component:xPe},{path:"custom/blitz/:tournamentId",canActivate:[Gq],canDeactivate:[fIe],component:cIe,data:{wideLobby:!0}},{path:"blitz",component:M7,canActivate:[Pq],canDeactivate:[Pq],data:{wideLobby:!0}}]}],kZt=[CO,No,Ls,Yi,Io,$r.forFeature(lIe,function wZt(t,n){return SZt(t,n)})],LZt=[k7,Q0e,Pq,oTe,nTe,Gq,fIe];let DZt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...LZt],imports:[kZt]}),n})(),gIe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.appService=c,this.popupService=u,this.gaService=h,this.gamesStateService=e,this.router=i,this.gamesClientService=r,this.toaster=s,this.constants=a}canActivate(e,i){var r=this;return f(function*(){const s=e.params.gameId;if(r.gamesClientService.tasks.connect||r.gamesClientService.tasks.connectAndHandleState||r.gamesClientService.tasks.action&&r.gamesClientService.tasks.action.gameId!==s)return!1;const a=r.gamesStateService.getGamesState().find(u=>u.id===s),c=r.gamesClientService.getPlayClient(s);if(a&&a.currentState===_g.Ready){if(c.initialized)return r.gamesStateService.setCurrentGame(s),r.hideSplash(),!0;try{try{yield r.gamesClientService.connectAndHandlePlayerState(s)}catch(u){if(!(u instanceof lt.RoomConnectReject))throw u}return r.gamesStateService.setCurrentGame(s),r.hideSplash(),!0}catch(u){u instanceof et.Timeout||u instanceof lt.NetworkError?r.toaster.warn("ERRORS.SOMETHING_WRONG"):u instanceof lt.UnknownError&&(r.popupService.blocker({textParams:{translationKey:"GAME.GAME_EXCEPTION_UNKNOWN"},withRefreshButton:!0}),r.gaService.sendException("Room nsp disconnect unknown",!0)),console.log("Connect to games namespace error",u),r.hideSplash()}}return r.hideSplash(),r.router.navigate([r.constants.defaultLoggedRoute]),!1})()}hideSplash(){ll.hideLoader(),this.appService.isMobileApp()&&this.appService.getMobileAppService().hideSplash()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zn),T(on),T(oo),T(Dt),T(tn),T(Qt),T(Cn),T(ng))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const BZt=["popupContainer"],NZt=()=>({key:"RANKED_GAMES.RANKED_SEASON_INFO_TITLE"});function FZt(t,n){if(1&t){const o=Ce();p(0,"popup-container",6,7),Y("closePopup",function(){return oe(o),re(_().closePopup())}),p(2,"popup-title-bar",8),Y("buttonCloseClicked",function(){return oe(o),re(_().closePopup())}),m(),B(3,"translation-text-info-parser-component",9),m()}if(2&t){const o=_();l("popupContainerOpened",!0)("popupContainerOptions",o.popupContainerOptions),d(2),l("popupTitleType",o.popupTitleTypes.Static)("text",pt(5,NZt)),d(),l("textKey","RANKED_GAMES.INFO_PAGE_SECTIONS")}}const UZt=t=>({name:t});let _Ie=(()=>{var t;class n{constructor(e,i,r){this.urlService=e,this.gamesStateService=i,this.rootContainer=r,this.EIcons=ve.EIcons,this.EButtonModifier=ve.EButtonModifier,this.popupTitleTypes=li}ngOnInit(){this.setNavbarContent(),this.popupContainerOptions={componentZIndex:"99999",customComponentCssClass:"ranked-games__text-parser"}}ngOnDestroy(){this.closePopup()}showInfo(){this.closePopup(),this.popupRef=this.rootContainer.addTemplate(this.popupContainer)}closePopup(){var e;null===(e=this.popupRef)||void 0===e||e.destroy()}setNavbarContent(){this.navBarContent={type:Ru.EContent.Image,data:{imgUrl:this.urlService.getImageUrl("platform-logos/".concat(this.gamesStateService.getCurrentGameState().id,".svg"))}}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Zn),g(Ia))},t.\u0275cmp=pe({type:t,selectors:[["app-ranked-games"]],viewQuery:function(e,i){if(1&e&&$e(BZt,5,Qa),2&e){let r;je(r=He())&&(i.popupContainer=r.first)}},decls:8,vars:5,consts:[[1,"ranked--lobby__content"],[3,"backLink","content"],[1,"ranked--lobby__info-btn",3,"icon","onClick"],[1,"ranked--lobby__pages"],["scrollContainer",""],["popupContainer",""],[3,"popupContainerOpened","popupContainerOptions","closePopup"],["infoPopup",""],[3,"popupTitleType","text","buttonCloseClicked"],[1,"ranked-translation-text-info-parser-component",3,"textKey"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"navigation-bar",1)(2,"button-icon",2),Y("onClick",function(){return i.showInfo()}),m()(),p(3,"section",3,4),B(5,"router-outlet"),m(),U(6,FZt,4,6,"ng-template",null,5,ft),m()),2&e&&(d(),l("backLink","history")("content",i.navBarContent),d(),l("icon",ne(3,UZt,i.EIcons.INFO_ICON_COIN_LIKE)))},dependencies:[Kh,ei,Ji,Wi,WL,Ip],styles:[".ranked--lobby__content[_ngcontent-%COMP%]{height:100%;overflow:hidden;display:flex;flex-flow:column nowrap}.ranked--lobby__pages[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;overflow:auto;height:100%;position:relative}.ranked--lobby__info-btn[_ngcontent-%COMP%]{position:absolute;right:10px;font-size:3rem}.ranked-translation-text-info-parser-component[_ngcontent-%COMP%]{height:calc(100% - 6rem)}"],changeDetection:0}),n})(),vIe=(()=>{var t;class n{constructor(e){this.translate=e}ngOnChanges(e){if(e.season){const i=this.translate.getCurrentLang();this.title=this.season.name[i],this.description=this.season.description[i]}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(pi))},t.\u0275cmp=pe({type:t,selectors:[["ranked-lobby-info"]],inputs:{season:"season"},features:[it],decls:4,vars:2,consts:[[1,"ranked-lobby__title"],[1,"ranked-lobby__description"]],template:function(e,i){1&e&&(p(0,"p",0),H(1),m(),p(2,"p",1),H(3),m()),2&e&&(d(),se(i.title),d(2),se(i.description))},styles:["[_nghost-%COMP%]{display:flex;flex-flow:column nowrap;width:100%}.ranked-lobby__description[_ngcontent-%COMP%]{margin-top:1rem}"],changeDetection:0}),n})(),bIe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["curved-container-component"]],decls:6,vars:0,consts:[[1,"curved-container__wrapper"],["preserveAspectRatio","none","xmlns","http://www.w3.org/2000/svg","width","394.4","height","24.5","viewBox","0 0 394.4 24.5",1,"curved-container__svg"],["id","Layer_2","data-name","Layer 2"],["id","Layer_1-2","data-name","Layer 1"],["d","M384.6,24.5H9.8A54.4,54.4,0,0,0,15.2,23,60.7,60.7,0,0,0,31,15.9a44,44,0,0,0,6.7-5.4C44.1,4.1,51,1.6,59.9,1.6l137.3.3,137.4-.3c8.9,0,15.7,2.5,22,8.9a48.8,48.8,0,0,0,7.3,5.6A54.1,54.1,0,0,0,379.2,23a52.6,52.6,0,0,0,5.3,1.5Z",1,"curved-container-path__class","background"],["d","M394.4,24.5h-9.9l-5-1.1a60.2,60.2,0,0,1-15.8-6.9,43.8,43.8,0,0,1-7.1-5.6C350.2,4.5,343.3,2,334.4,2H59.9C51,2,44.1,4.5,37.8,10.9a54.6,54.6,0,0,1-7.1,5.6,60.2,60.2,0,0,1-15.8,6.9L9.8,24.5H0a53.9,53.9,0,0,0,25.9-7.4,55.4,55.4,0,0,0,9.8-7.7A32.2,32.2,0,0,1,59.2,0h276a32.5,32.5,0,0,1,23.5,9.4,49,49,0,0,0,9.8,7.7A53.3,53.3,0,0,0,394.4,24.5Z",1,"curved-container-path__class","border"]],template:function(e,i){1&e&&(p(0,"div",0),Df(),p(1,"svg",1)(2,"g",2)(3,"g",3),B(4,"path",4)(5,"path",5),m()()()())},styles:["[_nghost-%COMP%]{display:flex}.curved-container__wrapper[_ngcontent-%COMP%]{display:block;position:relative;width:100%;height:100%}.curved-container__svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.curved-container-path__class[_ngcontent-%COMP%]{fill:#fff}"],changeDetection:0}),n})();const GZt=["curvedContainerContent"],VZt=["*"];let Vq=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-tiles-container"]],contentQueries:function(e,i,r){if(1&e&&Ho(r,GZt,7),2&e){let s;je(s=He())&&(i.curvedContainerContent=s.first)}},hostAttrs:[1,"ranked-tiles-container"],ngContentSelectors:VZt,decls:6,vars:1,consts:[[1,"ranked--tiles__wrapper"],[1,"ranked--tiles__timer-container"],[1,"ranked--tiles__curved-container"],[1,"ranked-tiles__flag"],[3,"ngTemplateOutlet"]],template:function(e,i){1&e&&(Co(),p(0,"div",0)(1,"div",1),B(2,"curved-container-component",2),p(3,"div",3),Un(4,4),m()(),yo(5),m()),2&e&&(d(4),l("ngTemplateOutlet",i.curvedContainerContent))},dependencies:[qr,bIe],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;padding-top:10px}.ranked--tiles__wrapper[_ngcontent-%COMP%]{width:100%;border-radius:inherit;position:relative;text-align:center}.ranked-tiles__flag[_ngcontent-%COMP%]{position:relative}.ranked--tiles__curved-container[_ngcontent-%COMP%]{position:absolute;width:122%;height:16px;top:0;left:50%;transform:translate(-50%,-6px)}@media screen and (max-width: 568px){.ranked--tiles__curved-container[_ngcontent-%COMP%]{height:15px;transform:translate(-50%,-5px)}}.ranked--tiles__timer-container[_ngcontent-%COMP%]{display:inline-block;position:relative;top:-10px;position:absolute;left:50%;transform:translate(-50%);z-index:1}"],changeDetection:0}),n})();const zZt=(t,n)=>({isCompleted:t,isCurrent:n});function jZt(t,n){if(1&t&&B(0,"div",7),2&t){const o=n.index,e=_();go("left",e.getOffset(o+1)+"%"),l("ngClass",cn(3,zZt,e.currentStep>=o+1,e.currentStep===o+1))}}let CIe=(()=>{var t;class n{constructor(){this.milestones=[],this.offsetX=0,this.currentStep=0,this.steps=0,this.margin=0,this.elementWidth=20}ngOnChanges(e){this.steps=this.milestones.length,this.current=Math.min(this.current,this.max),this.currentStep=this.milestones.findIndex(i=>this.current<i),this.currentStep=-1===this.currentStep?this.steps:this.currentStep,this.margin=(100-this.steps*this.elementWidth)/(this.steps-1)}trackByFn(e,i){return i}getOffset(e){const i=e*this.elementWidth;let r=e*this.margin-this.margin/2;return 0===e&&(r+=this.margin/2),e===this.steps&&(r=i-this.margin/2),Math.min(i+r,100)}getSliderValueOffset(e){const i=this.getOffset(e);return Math.max(5,Math.min(i,95))}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-progress-bar"]],hostAttrs:[1,"ranked-games-progress-bar"],inputs:{current:"current",max:"max",milestones:"milestones"},features:[it],decls:8,vars:7,consts:[[1,"ranked-games-progress-bar-wrapper"],[1,"ranked-games-progress-bar-container"],[1,"ranked-games-progress-bar-completed"],[1,"ranked-games-progress-bar-count-wrapper--outer"],[1,"ranked-games-progress-bar-count-wrapper"],[1,"ranked-games-progress-bar-count"],["class","ranked-games-progress-bar-delimiter",3,"ngClass","left",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ranked-games-progress-bar-delimiter",3,"ngClass"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"div",2),m(),p(3,"div",3)(4,"div",4)(5,"div",5),H(6),m()()(),U(7,jZt,1,6,"div",6),m()),2&e&&(d(2),go("transform","translateX("+(i.getOffset(i.currentStep)-100)+"%)"),d(),go("transform","translate("+i.getSliderValueOffset(i.currentStep)+"%,-50%)"),d(3),se(i.current),d(),l("ngForOf",i.milestones.slice(1))("ngForTrackBy",i.trackByFn))},dependencies:[Xe,Mt],styles:["[_nghost-%COMP%]{display:block}.ranked-games-progress-bar-wrapper[_ngcontent-%COMP%]{position:relative;height:100%;width:100%;border-radius:inherit;padding:2px}.ranked-games-progress-bar-container[_ngcontent-%COMP%]{border-radius:inherit;overflow:hidden;width:100%;height:100%}.ranked-games-progress-bar-completed[_ngcontent-%COMP%]{border-radius:inherit;width:100%;height:100%;transition:transform .25s ease-in-out}.ranked-games-progress-bar-count-wrapper--outer[_ngcontent-%COMP%]{position:absolute;display:flex;left:0;top:50%;width:100%;transition:transform .25s ease-in-out}.ranked-games-progress-bar-count-wrapper[_ngcontent-%COMP%]{transform:translate(-50%);border-radius:3rem}.ranked-games-progress-bar-delimiter.isCurrent[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})();function HZt(t,n){1&t&&B(0,"icon-component",8),2&t&&l("icon",_(2).EIcons.CheckIconEmpty)}const yIe=(t,n)=>({isCompleted:t,isClaimed:n});function qZt(t,n){if(1&t&&(p(0,"div",5),B(1,"avatar",6),U(2,HZt,1,1,"icon-component",7),m()),2&t){const o=n.$implicit,e=_();l("ngClass",cn(9,yIe,e.info.season.myStats.gamesWon>=o.winsRequired,o.claimed))("@checkBox",o.claimed?"claimed":"notClaimed"),d(),l("user",e.user)("frame",o)("frameAnimation",e.frameAnimation)("hasUsername",!1)("hasLevel",!1)("isLink",!1),d(),l("ngIf",o.claimed)}}function WZt(t,n){if(1&t&&(p(0,"div",5)(1,"p",9),B(2,"number",10),p(3,"span",11),H(4,"/"),m(),B(5,"number",12),m()()),2&t){const o=n.$implicit,e=_();l("ngClass",cn(3,yIe,e.info.season.myStats.gamesWon>=o.winsRequired,o.claimed)),d(2),l("value",e.getRewardProgressValue(o)),d(3),l("value",o.winsRequired)}}let SIe=(()=>{var t;class n{constructor(e){this.store=e,this.frameAnimation=v0,this.currentWins=0,this.maxWinsRequired=0,this.rewardsMilestones=[],this.EIcons=ve.EIcons}ngOnInit(){this.user=this.store.selectSimpleProfile()}ngOnChanges(e){this.currentWins=this.info.season.myStats.gamesWon,this.maxWinsRequired=this.info.season.rewards[this.info.season.rewards.length-1].winsRequired,this.rewardsMilestones=this.info.season.rewards.map(i=>i.winsRequired)}getRewardProgressValue(e){return Math.min(this.info.season.myStats.gamesWon,e.winsRequired)}trackByReward(e,i){return i.item.id}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J))},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-progress-info"]],hostAttrs:[1,"ranked-games-progress-info"],inputs:{info:"info"},features:[it],decls:8,vars:10,consts:[[1,"ranked-games-progress-info__wrapper"],[1,"ranked-games-progress-info--title",3,"innerHtml"],[1,"ranked-games-progress-info"],["class","ranked-games-progress-avatar-wrapper",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ranked-games-progress-info-games-progress",3,"current","max","milestones"],[1,"ranked-games-progress-avatar-wrapper",3,"ngClass"],[1,"ranked-games-progress-info--avatar",3,"user","frame","frameAnimation","hasUsername","hasLevel","isLink"],["class","ranked-games-progress-info--avatar-check",3,"icon",4,"ngIf"],[1,"ranked-games-progress-info--avatar-check",3,"icon"],[1,"ranked-games-progress-info-games"],[1,"ranked-games-progress-info-games--current",3,"value"],[1,"ranked-games-progress-info-games--divider"],[1,"ranked-games-progress-info-games--required",3,"value"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"p",1),V(2,"translate"),p(3,"div",2),U(4,qZt,3,12,"div",3),p(5,"div",2),U(6,WZt,6,6,"div",3),m(),B(7,"ranked-games-progress-bar",4),m()()),2&e&&(d(),l("innerHtml",$(2,8,"RANKED_GAMES.REWARDS_TITLE"),Yn),d(3),l("ngForOf",i.info.season.rewards)("ngForTrackBy",i.trackByReward),d(2),l("ngForOf",i.info.season.rewards)("ngForTrackBy",i.trackByReward),d(),l("current",i.currentWins)("max",i.maxWinsRequired)("milestones",i.rewardsMilestones))},dependencies:[Xe,Mt,Ne,Bo,Dn,Qr,CIe,qe],styles:["[_nghost-%COMP%]{display:inline-block}.ranked-games-progress-info__wrapper[_ngcontent-%COMP%]{display:flex;border-radius:inherit;flex-flow:column nowrap}.ranked-games-progress-avatar-wrapper[_ngcontent-%COMP%]{position:relative}.ranked-games-progress-info--avatar-check[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#54ff00}.ranked-games-progress-info[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;width:100%}.ranked-games-progress-info--avatar[_ngcontent-%COMP%]{height:auto;display:block}.ranked-games-progress-info-games-progress[_ngcontent-%COMP%]{width:100%}"],data:{animation:[r2("checkBox",[z0("notClaimed => claimed",[Ywt(".ranked-games-progress-info--avatar-check",[Wc({opacity:0,transform:"translate(-50%, -50%) scale(0.4)"}),V0("0.3s cubic-bezier(0.69, 0, 0, 1)",Wc({opacity:1,transform:"translate(-50%, -50%) scale(1)"}))],{optional:!0})])])]},changeDetection:0}),n})();function $Zt(t,n){if(1&t){const o=Ce();p(0,"button-text",5),Y("onClick",function(){return oe(o),re(_().claimRewards())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("bclass","ranked-games__button-claim-bclass")("buttonModifier",o.EButtonModifier.BUTTON_ACTION)("disabled",!o.hasRewardsForClaim())("loading",o.info.actions.claimSeasonalReward.inProgress),d(),ze("",$(2,5,"TEXT.CLAIM_ALL")," ")}}function KZt(t,n){1&t&&(p(0,"p",6),H(1),V(2,"translate"),m()),2&t&&(d(),ze(" ",$(2,1,"RANKED_GAMES.ALL_REWARDS_CLAIMED")," "))}let wIe=(()=>{var t;class n{constructor(e,i,r,s,a){this.store=e,this.cdr=i,this.claimSeasonalRewardUsecase=r,this.toaster=s,this.urlService=a,this.EButtonModifier=ve.EButtonModifier,this.destroy$=new sn}ngOnInit(){this.store.subscribeSimpleProfile().pipe(wn(this.destroy$)).subscribe(e=>{this.user=e,this.cdr.detectChanges()}),this.setBackgroundImage(this.info.season)}claimRewards(){var e=this;return f(function*(){try{yield e.claimSeasonalRewardUsecase.execute(e.info.gameId)}catch(i){e.toaster.error(i instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}})()}hasRewardsForClaim(){const e=this.info.season.rewards.filter(i=>!i.claimed);return e.length&&e.some(i=>i.winsRequired<=this.info.season.myStats.gamesWon)}hasClaimedAllRewards(){return this.info.season.rewards.every(e=>e.claimed)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setBackgroundImage(e){e.backgroundUrl&&(this.backgroundImage=this.urlService.getImageUrl(e.backgroundUrl)),e.backgroundCdnUrl&&(this.backgroundImage=this.urlService.createCdnPath({url:"".concat(Lt.CONFIG.core.cdn.path.rankedGames).concat(e.backgroundCdnUrl)})),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Re),g(lwe),g(Dt),g(ii))},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-progress"]],hostAttrs:[1,"ranked-games-progress"],inputs:{info:"info"},decls:5,vars:5,consts:[[1,"ranked-games-progress__wrapper"],[1,"ranked-games-progress__backdrop"],[1,"ranked-games-progress__info",3,"info"],["class","ranked-games__button-claim",3,"bclass","buttonModifier","disabled","loading","onClick",4,"ngIf"],["class","ranked-games__all-claimed-text",4,"ngIf"],[1,"ranked-games__button-claim",3,"bclass","buttonModifier","disabled","loading","onClick"],[1,"ranked-games__all-claimed-text"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"ranked-games-progress-info",2),U(3,$Zt,3,7,"button-text",3)(4,KZt,3,3,"p",4),m()()),2&e&&(go("background-image","url("+i.backgroundImage+")"),d(2),l("info",i.info),d(),l("ngIf",!i.hasClaimedAllRewards()),d(),l("ngIf",i.hasClaimedAllRewards()))},dependencies:[Ne,pn,SIe,qe],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}.ranked-games-progress__wrapper[_ngcontent-%COMP%]{position:relative;background-position:center}.ranked-games-progress__backdrop[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;width:100%}.ranked-games-progress__bg[_ngcontent-%COMP%]{width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.ranked-games-progress__avatar-preview[_ngcontent-%COMP%]{flex:1;max-width:15rem}@media screen and (max-width: 568px){.ranked-games-progress__avatar-preview[_ngcontent-%COMP%]{max-width:7rem}}.ranked-games-progress__info[_ngcontent-%COMP%]{position:relative;flex:1;width:100%}.ranked-games__button-claim[_ngcontent-%COMP%]{max-width:85%;width:25rem;height:5rem;margin-bottom:1.75rem}@media screen and (max-width: 568px){.ranked-games__button-claim[_ngcontent-%COMP%]{height:4rem;margin:.75rem 0 1.25rem}}.ranked-games__all-claimed-text[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"],changeDetection:0}),n})();const ZZt=["formBuilder"];function QZt(t,n){if(1&t&&(p(0,"div",3),B(1,"form-builder",4,5),m()),2&t){const o=_();d(),l("config",o.formFields)}}const YZt=()=>({key:"LABEL.RULES"});let TIe=(()=>{var t;class n{constructor(e,i,r,s){this.cdr=e,this.optionsService=i,this.gamesStateService=r,this.formOptions=s,this.close=new ke,this.EPopupTitleType=li,this.EButtonModifier=ve.EButtonModifier,this.formFields=[],this.popupContainerOptions={styleProperties:{maxWidth:"40rem",height:"calc(100% - 4rem)",maxHeight:"75rem"},customComponentCssClass:"cg-join-popup__popup-container"}}ngOnInit(){const e=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.customGames;this.formFields=this.transformOptions(e.customSettings,this.roomSettings),this.cdr.detectChanges()}closePopup(){this.close.emit()}transformOptions(e,i){let r=this.optionsService.getInventoryItemOptions(e);const s=new tz(this.formOptions,r);return r=r.filter(a=>{const c=s.formFields.find(u=>u.id===a.id);return null==c?void 0:c.isVisible}).map(a=>{var c;let h,u=_2()(i,a.id);const b=null===(c=a.options)||void 0===c?void 0:c.find(w=>w.label&&w.value===u);return b&&(h=b.label),(a.customTag===Jt.PlayerItemType.Deck||a.customTag===Jt.PlayerItemType.Table)&&(u=i.game.inventory.find(w=>w.type===a.customTag)),this.optionsService.transformFieldToInfo(a,u,h)}).filter(a=>!this.shouldFilterField(a)),r}shouldFilterField(e){return!((e.customTag!==Jt.PlayerItemType.Deck&&e.customTag!==Jt.PlayerItemType.Table||!e.options[0].value.isDefaultItem)&&"transactions.reward"!==e.id&&"locked"!==e.id&&"players.shuffle"!==e.id&&"requirements.clubRoom"!==e.id&&"transactions.placementRewards.1.clubContribution"!==e.id)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Ig),g(Zn),g(Ig))},t.\u0275cmp=pe({type:t,selectors:[["ranked-room-rules-popup"]],viewQuery:function(e,i){if(1&e&&$e(ZZt,5),2&e){let r;je(r=He())&&(i.formBuilder=r.first)}},outputs:{close:"close"},decls:3,vars:6,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","text","buttonCloseClicked"],["class","custom-blitz-rules__content-section",4,"ngIf"],[1,"custom-blitz-rules__content-section"],[3,"config"],["formBuilder",""]],template:function(e,i){1&e&&(p(0,"popup-container",0),Y("closePopup",function(){return i.closePopup()}),p(1,"popup-title-bar",1),Y("buttonCloseClicked",function(){return i.closePopup()}),m(),U(2,QZt,3,1,"div",2),m()),2&e&&(l("popupContainerOpened",!0)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.EPopupTitleType.Static)("text",pt(5,YZt)),d(),l("ngIf",i.formFields))},dependencies:[Ne,Ji,Wi,Xd],styles:[".custom-blitz-rules__content-section[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;margin:0 auto;padding:.5rem;width:96%;height:calc(100% - 6rem)}"],changeDetection:0}),n})();function JZt(t,n){1&t&&B(0,"client-players-counter",20),2&t&&l("countersKeys",_().counterKeys)}const XZt=t=>({visible:t});let PIe=(()=>{var t;class n{constructor(e,i){this.store=e,this.cdr=i,this.requirements={clubRoom:!1,maxLevel:99,minLevel:0,requiresVip:!1},this.counterKeys=[],this.destroy$=new sn}ngOnInit(){this.store.subscribeSimpleProfile().pipe(wn(this.destroy$),bt(e=>!!e)).subscribe(e=>{this.currentUser=e,this.cdr.detectChanges()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["ranked-room-tile-top-bar"]],hostAttrs:[1,"ranked-room-tile-top-bar"],inputs:{requirements:"requirements",playersOnline:"playersOnline",counterKeys:"counterKeys"},decls:29,vars:6,consts:[[1,"ranked-tile-top-bar__element","level",3,"ngClass","value","isMaxLevelRestricted"],["class","ranked-tile-top-bar__element visible counter",3,"countersKeys",4,"ngIf"],["height","0","width","0","preserveAspectRatio","none","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 587.1 77.7",1,"ranked-tile-top-bar-curved__svg-mask"],["id","top-bar-mask","clipPathUnits","objectBoundingBox"],["d","M1,0 V1 H0.733 a0.04,0.299,0,0,0,-0.006,-0.006 l-0.005,-0.004 h-0.004 l-0.003,-0.003 a0.063,0.475,0,0,1,-0.021,-0.037 A0.033,0.247,0,0,1,0.69,0.927 l-0.003,-0.019,-0.003,-0.015 c-0.002,-0.013,-0.006,-0.036,-0.007,-0.042 l-0.005,-0.03,-0.004,-0.027 c-0.01,-0.073,-0.022,-0.1,-0.036,-0.104 H0.368 c-0.014,0.004,-0.026,0.031,-0.036,0.104 l-0.004,0.027 L0.323,0.849 c-0.001,0.006,-0.005,0.03,-0.007,0.042 L0.313,0.907,0.31,0.927 a0.033,0.247,0,0,1,-0.005,0.023 a0.062,0.47,0,0,1,-0.021,0.033 l-0.003,0.003 h-0.004 l-0.005,0.004 a0.04,0.299,0,0,0,-0.006,0.006 H0 V0",1,"cls-1"],["d","M1,3 H1 c-0.001,-0.004,-0.007,-0.013,-0.018,-0.046 c-0.017,-0.054,-0.032,-0.205,-0.04,-0.285 s-0.019,-0.172,-0.025,-0.238 c-0.023,-0.259,-0.049,-0.364,-0.081,-0.364 l-0.093,0.008 H1 l-0.377,-0.008 c-0.032,0,-0.058,0.105,-0.081,0.364 c-0.006,0.067,-0.015,0.138,-0.025,0.238 s-0.023,0.23,-0.04,0.285 c-0.011,0.033,-0.016,0.042,-0.018,0.046 H0.571 a0.085,0.971,0,0,1,0.014,-0.021 l0.01,-0.013 h0.008 l0.006,-0.008 A0.133,1,0,0,0,0.653,3 a0.07,0.803,0,0,0,0.011,-0.075 l0.007,-0.063,0.005,-0.05 c0.005,-0.042,0.012,-0.117,0.015,-0.138 l0.01,-0.096,0.009,-0.088 c0.022,-0.238,0.046,-0.326,0.077,-0.339 H1 c0.03,0.013,0.055,0.1,0.077,0.339 l0.009,0.088,0.01,0.096 c0.003,0.021,0.01,0.096,0.015,0.138 l0.005,0.05,0.007,0.063 a0.07,0.803,0,0,0,0.011,0.075 a0.133,1,0,0,0,0.045,0.109 l0.006,0.008 H1 l0.01,0.013 a0.085,0.971,0,0,1,0.014,0.021",1,"cls-1"],["d","M1,0 V1 H0.8 a0.048,0.366,0,0,0,-0.006,-0.006 l-0.005,-0.004 h-0.004 l-0.003,-0.003 A0.063,0.474,0,0,1,0.761,0.95 a0.034,0.254,0,0,1,-0.005,-0.023 L0.753,0.907 l-0.003,-0.015 c-0.002,-0.013,-0.006,-0.036,-0.007,-0.042 l-0.005,-0.03,-0.004,-0.027 c-0.01,-0.073,-0.022,-0.1,-0.036,-0.104 H0.301 c-0.014,0.004,-0.026,0.031,-0.036,0.104 l-0.004,0.027 L0.257,0.849 c-0.001,0.006,-0.005,0.03,-0.007,0.042 l-0.002,0.015 L0.244,0.927 a0.034,0.254,0,0,1,-0.005,0.023 a0.063,0.474,0,0,1,-0.021,0.033 l-0.003,0.003 h-0.004 l-0.005,0.004 a0.048,0.366,0,0,0,-0.006,0.006 H0 V0",1,"cls-1","desktop"],["d","M1,3 H1 c-0.001,-0.004,-0.006,-0.013,-0.014,-0.046 c-0.013,-0.054,-0.025,-0.205,-0.032,-0.285 s-0.014,-0.172,-0.019,-0.238 c-0.018,-0.259,-0.038,-0.364,-0.063,-0.364 l-0.293,0.008 H0.803 l-0.294,-0.008 c-0.025,0,-0.045,0.105,-0.063,0.364 c-0.005,0.067,-0.011,0.138,-0.019,0.238 s-0.018,0.23,-0.032,0.285 c-0.008,0.033,-0.013,0.042,-0.014,0.046 H0.334 a0.081,1,0,0,1,0.011,-0.021 l0.008,-0.013 h0.006 l0.005,-0.008 a0.105,1,0,0,0,0.035,-0.109 a0.056,0.824,0,0,0,0.009,-0.075 l0.005,-0.063,0.004,-0.05 c0.004,-0.042,0.01,-0.117,0.012,-0.138 l0.008,-0.096,0.007,-0.088 c0.017,-0.238,0.036,-0.326,0.06,-0.339 H1 c0.024,0.013,0.043,0.1,0.06,0.339 l0.007,0.088,0.008,0.096 c0.002,0.021,0.008,0.096,0.012,0.138 l0.004,0.05,0.005,0.063 a0.056,0.824,0,0,0,0.009,0.075 a0.105,1,0,0,0,0.035,0.109 l0.005,0.008 h0.006 l0.008,0.013 a0.081,1,0,0,1,0.011,0.021",1,"cls-1","desktop"],[1,"ranked-tile-top-bar-curved__border"],["preserveAspectRatio","none","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 587.1 77.7",1,"ranked-tile-top-bar-curved__svg"],["id","header-shape-gradient","x1","89.39","y1","65.58","x2","497.71","y2","65.58","gradientUnits","userSpaceOnUse"],["offset","0",1,"stop-1"],["offset","0.5",1,"stop-2"],["offset","1",1,"stop-3"],["id","Layer_2","data-name","Layer 2"],["id","Layer_1-2","data-name","Layer 1"],["d","M430.6,77.7H414.1c-.4-.1-2-.3-4.9-1.1-4.7-1.3-8.7-4.9-11.1-6.8s-5.1-4.1-6.8-5.7c-6.4-6.2-13.4-8.7-22.3-8.7l-25.4.2H321.4l-103.3-.2c-8.9,0-15.9,2.5-22.3,8.7-1.7,1.6-4,3.3-6.8,5.7s-6.4,5.5-11.1,6.8c-2.9.8-4.5,1-4.9,1.1H156.5a23.2,23.2,0,0,1,3.8-.5l2.8-.3h2.1l1.6-.2A36.5,36.5,0,0,0,179,74.1a19.2,19.2,0,0,0,3.1-1.8l1.9-1.5,1.4-1.2c1.5-1,3.4-2.8,4.2-3.3l2.7-2.3,2.5-2.1c6-5.7,12.7-7.8,21-8.1H371.3c8.3.3,15,2.4,21,8.1l2.5,2.1,2.7,2.3c.8.5,2.7,2.3,4.1,3.3l1.5,1.2,1.9,1.5a19.2,19.2,0,0,0,3.1,1.8,36.5,36.5,0,0,0,12.2,2.6l1.6.2H424l2.8.3a23.2,23.2,0,0,1,3.8.5Z",1,"ranked-tile-top-bar-curved-path-border__class"],[1,"ranked-tile-top-bar-curved__border","desktop"],["id","header-shape-gradient-desktop","x1","117.55","y1","65.59","x2","469.55","y2","65.59","gradientUnits","userSpaceOnUse"],["d","M469.5,77.7H453c-.4-.1-2-.3-4.9-1.1-4.7-1.3-8.7-4.9-11.1-6.8s-5.1-4.1-6.8-5.7c-6.4-6.2-13.4-8.7-22.3-8.7l-103.2.2H282.5l-103.3-.2c-8.9,0-15.9,2.5-22.3,8.7-1.7,1.6-4,3.3-6.8,5.7s-6.4,5.5-11.1,6.8c-2.9.8-4.5,1-4.9,1.1H117.6a28.4,28.4,0,0,1,3.8-.5l2.8-.3h2.1l1.6-.2a36.8,36.8,0,0,0,12.2-2.6,19.7,19.7,0,0,0,3.1-1.8l1.9-1.5,1.4-1.2c1.5-1,3.4-2.8,4.2-3.3l2.7-2.3,2.5-2.1c6-5.7,12.7-7.8,21-8.1H410.2c8.3.3,15,2.4,21,8.1l2.5,2.1,2.7,2.3c.8.5,2.7,2.3,4.1,3.3l1.5,1.2,1.9,1.5a19.7,19.7,0,0,0,3.1,1.8,36.8,36.8,0,0,0,12.2,2.6l1.6.2h2.1l2.8.3a28.4,28.4,0,0,1,3.8.5Z",1,"ranked-tile-top-bar-curved-path-border__class","desktop"],[1,"ranked-tile-top-bar__element","visible","counter",3,"countersKeys"]],template:function(e,i){1&e&&(B(0,"restriction-level",0),U(1,JZt,1,1,"client-players-counter",1),Df(),p(2,"svg",2)(3,"defs")(4,"clipPath",3),B(5,"path",4)(6,"path",5)(7,"path",6)(8,"path",7),m()()(),jO(),p(9,"div",8),Df(),p(10,"svg",9)(11,"defs")(12,"linearGradient",10),B(13,"stop",11)(14,"stop",12)(15,"stop",13),m()(),p(16,"g",14)(17,"g",15),B(18,"path",16),m()()()(),jO(),p(19,"div",17),Df(),p(20,"svg",9)(21,"defs")(22,"linearGradient",18),B(23,"stop",11)(24,"stop",12)(25,"stop",13),m()(),p(26,"g",14)(27,"g",15),B(28,"path",19),m()()()()),2&e&&(l("ngClass",ne(4,XZt,i.currentUser.level<i.requirements.minLevel))("value",i.requirements.minLevel)("isMaxLevelRestricted",!1),d(),l("ngIf",(null==i.counterKeys?null:i.counterKeys.length)>0))},dependencies:[Xe,Ne,MM,F0],styles:["[_nghost-%COMP%]{display:flex;width:100%;justify-content:space-between;position:relative;clip-path:url(#top-bar-mask);-webkit-clip-path:url(#top-bar-mask);border-top-left-radius:inherit;border-top-right-radius:inherit}.ranked-tile-top-bar__element[_ngcontent-%COMP%]{visibility:hidden}.ranked-tile-top-bar__element.visible[_ngcontent-%COMP%]{visibility:visible}.ranked-tile-top-bar__element.level[_ngcontent-%COMP%]{align-self:flex-start}.ranked-tile-top-bar__element.counter[_ngcontent-%COMP%]{align-self:flex-end}.ranked-tile-top-bar-curved__border[_ngcontent-%COMP%]{position:absolute;width:calc(100% + 5px);height:calc(100% + 2px);bottom:0;left:50%;transform:translate(-50%,-1px);display:none}@media screen and (max-width: 568px){.ranked-tile-top-bar-curved__border[_ngcontent-%COMP%]{display:flex}}.ranked-tile-top-bar-curved__border.desktop[_ngcontent-%COMP%]{width:calc(100% + 6px);height:calc(100% + 1px);display:flex}@media screen and (max-width: 568px){.ranked-tile-top-bar-curved__border.desktop[_ngcontent-%COMP%]{display:none}}.ranked-tile-top-bar-curved__svg[_ngcontent-%COMP%]{width:100%}.ranked-tile-top-bar-curved__svg-mask[_ngcontent-%COMP%]{position:absolute;width:100%}.cls-1[_ngcontent-%COMP%]{display:none}@media screen and (max-width: 568px){.cls-1[_ngcontent-%COMP%]{display:initial}}.cls-1.desktop[_ngcontent-%COMP%]{display:initial}@media screen and (max-width: 568px){.cls-1.desktop[_ngcontent-%COMP%]{display:none}}.ranked-tile-top-bar-curved-path-border__class[_ngcontent-%COMP%]{display:none}@media screen and (max-width: 568px){.ranked-tile-top-bar-curved-path-border__class[_ngcontent-%COMP%]{display:initial}}.ranked-tile-top-bar-curved-path-border__class.desktop[_ngcontent-%COMP%]{display:initial}@media screen and (max-width: 568px){.ranked-tile-top-bar-curved-path-border__class.desktop[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),n})();function eQt(t,n){1&t&&Un(0)}function tQt(t,n){if(1&t&&(p(0,"button-text",12),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("bclass","ranked-room-tile__play-bclass")("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION),d(),se($(2,3,"RANKED_GAMES.PLAY_NOW"))}}const nQt=()=>({url:"icons/locker3d.png"});function iQt(t,n){if(1&t&&(p(0,"button-icon-text",13),H(1),V(2,"translate"),m()),2&t){const o=_(2);l("image",pt(7,nQt))("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION)("bclass","ranked-room-tile__play-bclass")("disabled",!0),d(),se($(2,5,"RANKED_GAMES.PLAY_NOW"))}}function oQt(t,n){if(1&t&&(p(0,"div",8),U(1,eQt,1,0,"ng-container",9)(2,tQt,3,5,"ng-template",null,10,ft)(4,iQt,3,8,"ng-template",null,11,ft),m()),2&t){const o=Kt(3),e=Kt(5),i=_();d(),l("ngIf",i.permission.isPermitted)("ngIfThen",o)("ngIfElse",e)}}function rQt(t,n){1&t&&B(0,"restriction-vip",14)}const sQt=t=>({visible:t}),aQt=(t,n,o)=>({startDate:t,endDate:n,activeHours:o}),cQt=t=>({name:t});let IIe=(()=>{var t;class n extends oy{constructor(e,i,r,s,a,c,u,h,b,w,R,G){super(i,r,s,a,c,u,h,b),this.rootContainerService=e,this.time=w,this.cdr=R,this.store=G,this.EButtonModifier=ve.EButtonModifier,this.EIcons=ve.EIcons,this.ESessionState=Nr,this.destroy$=new sn}ngOnInit(){wp([this.store.subscribeWallet(),this.store.subscribeSimpleProfile()]).pipe(wn(this.destroy$),bt(e=>null!=e[0]&&null!=e[1]),tr(1)).subscribe(()=>{this.permission=this.getTilePermission({roomSettings:this.poolSettings.roomSettings,id:"rankedTile"}),this.cdr.detectChanges()})}openRulesPopup(e){null==e||e.stopPropagation(),this.rulesPopup=this.rootContainerService.createComponent(TIe),this.rulesPopup.instance.roomSettings=this.gamesStateService.getCurrentGameRelatedConfig().matchmaking.presets.find(i=>i.competitive),this.closeRulesPopupSubscription=this.rulesPopup.instance.close.subscribe(()=>this.rulesPopup.destroy())}onClick(){if(this.sessionInfo.sessionState!==Nr.Active&&this.sessionInfo.sessionState!==Nr.BeforeEnd)return this.openRulesPopup();this.findRoom({pool:this.poolSettings},this.permission)}onTimerExpire(){this.updateSessionInfo(),this.cdr.detectChanges()}ngOnChanges(e){this.tileConfig=this.gamesStateService.getCurrentGameRelatedConfig().gameConfig.grid.ranked.find(i=>"rankedTile"===i.id),this.poolSettings=this.getPoolSettings([this.poolId])[0],this.permission=this.getTilePermission({roomSettings:this.poolSettings.roomSettings,id:"rankedTile"}),this.updateSessionInfo(),this.cdr.detectChanges()}ngOnDestroy(){var e,i;null===(e=this.rulesPopup)||void 0===e||e.destroy(),null===(i=this.closeRulesPopupSubscription)||void 0===i||i.unsubscribe(),this.destroy$.next(),this.destroy$.complete()}updateSessionInfo(){this.sessionInfo=Dg.getSessionInfo({startDate:this.info.season.startDate,endDate:this.info.season.endDate,activeHours:this.poolSettings.activeHours},this.time.getServerTimeS())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ia),g(oo),g(Pi),g(Zt),g(on),g(Cn),g(Dt),g(ro),g(Zn),g(Bn),g(Re),g(J))},t.\u0275cmp=pe({type:t,selectors:[["ranked-tile-component"]],hostAttrs:[1,"ranked-tile-component"],inputs:{poolId:"poolId",info:"info"},features:[Ht,it],decls:10,vars:23,consts:[[1,"ranked-room-tile__wrapper",3,"click"],[3,"requirements","counterKeys"],[1,"ranked-room-tile__entry",3,"amount","entryTextClass","entryCurrencyClass"],[1,"ranked-room-tile__sessions-info",3,"ngClass","timeSpan","onCountdownFinished"],["class","ranked-room-tile__play-btn--wrapper",4,"ngIf"],[1,"ranked-room-tile__info-btn",3,"bclass","buttonModifier","icon","onClick"],[1,"ranked-room-tile__inner-glow"],["class","ranked-tile-top-bar__vip",4,"ngIf"],[1,"ranked-room-tile__play-btn--wrapper"],[4,"ngIf","ngIfThen","ngIfElse"],["playButton",""],["disabledButton",""],[1,"ranked-room-tile__play-btn",3,"bclass","buttonModifier"],[1,"ranked-room-tile__play-btn",3,"image","buttonModifier","bclass","disabled"],[1,"ranked-tile-top-bar__vip"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.onClick()}),B(1,"ranked-room-tile-top-bar",1)(2,"entry-fee",2),p(3,"ranked-session-info",3),Y("onCountdownFinished",function(){return i.onTimerExpire()}),m(),U(4,oQt,6,3,"div",4),p(5,"button-icon-text",5),Y("onClick",function(s){return i.openRulesPopup(s)}),H(6),V(7,"translate"),m(),B(8,"div",6),U(9,rQt,1,0,"restriction-vip",7),m()),2&e&&(d(),l("requirements",i.poolSettings.roomSettings.requirements)("counterKeys",i.tileConfig.playersCounter.counterKeys),d(),l("amount",i.poolSettings.roomSettings.transactions.bet)("entryTextClass","ranked-room-tile__entry--text-class")("entryCurrencyClass","ranked-room-tile__entry--currency-class"),d(),l("ngClass",ne(15,sQt,i.sessionInfo.sessionState!==i.ESessionState.Active&&i.sessionInfo.sessionState!==i.ESessionState.BeforeEnd))("timeSpan",_a(17,aQt,i.info.season.startDate,i.info.season.endDate,i.poolSettings.activeHours)),d(),l("ngIf",i.sessionInfo.sessionState===i.ESessionState.Active||i.sessionInfo.sessionState===i.ESessionState.BeforeEnd),d(),l("bclass","ranked-room-tile__info-bclass")("buttonModifier",i.EButtonModifier.BUTTON_TRANSPARENT)("icon",ne(21,cQt,i.EIcons.INFO_ICON)),d(),se($(7,13,"RANKED_GAMES.SHOW_RULES")),d(3),l("ngIf",!i.permission.vipRequirement.isFulfilled))},dependencies:[yD,Xe,Ne,gM,pn,so,qL,PIe,qe],styles:["[_nghost-%COMP%]{display:inline-block}.ranked-room-tile__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;width:100%;border-radius:inherit;position:relative}.ranked-room-tile__entry[_ngcontent-%COMP%]{margin-top:1.75rem}.ranked-room-tile__sessions-info[_ngcontent-%COMP%]{margin-top:1.75rem;display:none}.ranked-room-tile__sessions-info.visible[_ngcontent-%COMP%]{display:block}.ranked-room-tile__play-btn--wrapper[_ngcontent-%COMP%]{margin-top:1.75rem;display:flex;justify-content:center;align-items:center}.ranked-room-tile__play-btn[_ngcontent-%COMP%]{height:100%;width:100%}.ranked-room-tile__info-btn[_ngcontent-%COMP%]{margin:1.75rem auto}.ranked-room-tile__inner-glow[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;pointer-events:none}.ranked-tile-top-bar__vip[_ngcontent-%COMP%]{position:absolute;top:0;left:50%;transform:translate(-50%,-50%)}"],changeDetection:0}),n})();function lQt(t,n){1&t&&Un(0)}function uQt(t,n){if(1&t&&(p(0,"p",9),H(1),V(2,"formatNumber"),m()),2&t){const o=_();d(),se($(2,1,o.value))}}function dQt(t,n){if(1&t&&(p(0,"p",9),H(1),m()),2&t){const o=_();d(),se(o.value)}}const pQt=t=>[t];let MIe=(()=>{var t;class n{isNumber(){return"number"==typeof this.value}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-leaderboard-info-box"]],hostAttrs:[1,"ranked-games-leaderboard-info-box"],inputs:{title:"title",value:"value"},decls:13,vars:9,consts:[[1,"ranked-games-leaderboard-info-box__wrapper"],[1,"ranked-games-leaderboard-info-box__title"],[1,"ranked-games-leaderboard-info-box__title--text"],[1,"ranked-games-leaderboard-info-box__delimiter"],[1,"ranked-games-leaderboard-info-box__value"],[4,"ngIf","ngIfThen","ngIfElse"],["number",""],["text",""],[1,"ranked-games-leaderboard-info-box__inner-glow"],[1,"ranked-games-leaderboard-info-box__value--text"]],template:function(e,i){if(1&e&&(p(0,"div",0)(1,"div",1)(2,"p",2),H(3),V(4,"translate"),m()(),B(5,"div",3),p(6,"div",4),U(7,lQt,1,0,"ng-container",5)(8,uQt,3,3,"ng-template",null,6,ft)(10,dQt,2,1,"ng-template",null,7,ft),m(),B(12,"div",8),m()),2&e){const r=Kt(9),s=Kt(11);d(3),se(yt(4,4,i.title.key,ne(7,pQt,i.title.params))),d(4),l("ngIf",i.isNumber())("ngIfThen",r)("ngIfElse",s)}},dependencies:[Ne,qe,Go],styles:[".ranked-games-leaderboard-info-box__wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;align-items:center;justify-content:center;overflow:hidden;border-radius:inherit}.ranked-games-leaderboard-info-box__inner-glow[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;border-radius:inherit}.ranked-games-leaderboard-info-box__title[_ngcontent-%COMP%], .ranked-games-leaderboard-info-box__delimiter[_ngcontent-%COMP%], .ranked-games-leaderboard-info-box__value[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();const hQt=()=>({key:"RANKED_GAMES.WIN_RATE"}),mQt=()=>({key:"RANKED_GAMES.RATING"}),fQt=()=>({key:"RANKED_GAMES.GAMES_PLAYED"});let OIe=(()=>{var t;class n{constructor(){this.EIcons=ve.EIcons}ngOnChanges(e){this.winPercentage="".concat((this.stats.gamesWon?this.stats.gamesWon/this.stats.gamesPlayed*100:0).toFixed(1),"%")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-leaderboard-stats"]],hostAttrs:[1,"ranked-games-leaderboard-stats"],inputs:{stats:"stats"},features:[it],decls:9,vars:13,consts:[[1,"ranked-games-leaderboard__title"],[1,"ranked-games-leaderboard__title-icon",3,"icon"],[1,"ranked-games-leaderboard-stats__info-wrapper"],[3,"title","value"]],template:function(e,i){1&e&&(p(0,"p",0),B(1,"icon-component",1),p(2,"span"),H(3),V(4,"translate"),m()(),p(5,"div",2),B(6,"ranked-games-leaderboard-info-box",3)(7,"ranked-games-leaderboard-info-box",3)(8,"ranked-games-leaderboard-info-box",3),m()),2&e&&(d(),l("icon",i.EIcons.STATISTICS),d(2),se($(4,8,"RANKED_GAMES.MY_STATS")),d(3),l("title",pt(10,hQt))("value",i.winPercentage),d(),l("title",pt(11,mQt))("value",i.stats.elo),d(),l("title",pt(12,fQt))("value",i.stats.gamesPlayed))},dependencies:[Dn,MIe,qe],styles:["[_nghost-%COMP%]{display:flex;flex-flow:row wrap}.ranked-games-leaderboard__title-icon[_ngcontent-%COMP%]{margin:0 5px}.ranked-games-leaderboard__title[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center;padding-top:1.25rem;border-top-left-radius:inherit;border-top-right-radius:inherit}.ranked-games-leaderboard-stats__info-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-evenly;margin-top:1.25rem;padding:2.5rem 1.25rem 5rem}@media screen and (max-width: 568px){.ranked-games-leaderboard-stats__info-wrapper[_ngcontent-%COMP%]{padding:2.5rem .625rem 3.75rem}}"],changeDetection:0}),n})(),Pf=(()=>{var t;class n{constructor(){this.type=n.EStyle.Generic}ngOnChanges(e){this.class=this.type}calculateWinRate(e,i){return 0===i?"0%":"".concat((e/i*100).toFixed(1),"%")}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-leaderboard-item"]],hostAttrs:[1,"ranked-games-leaderboard-item"],hostVars:2,hostBindings:function(e,i){2&e&&nb(i.class)},inputs:{record:"record",type:"type"},features:[it],decls:11,vars:8,consts:[[1,"ranked-games-leaderboard__item-rank"],[1,"ranked-games-leaderboard__item-rank-span"],[1,"ranked-games-leaderboard__item-name"],[1,"ranked-games-leaderboard__avatar-container"],[1,"ranked-games-leaderboard__avatar",3,"user","hasUsername","hasLevel","isLink"],[1,"ranked-games-leaderboard__item-name-text"],[1,"ranked-games-leaderboard__item-win-rate"],[1,"ranked-games-leaderboard__item-score",3,"value"]],template:function(e,i){1&e&&(p(0,"p",0)(1,"span",1),H(2),m()(),p(3,"div",2)(4,"div",3),B(5,"avatar",4),m(),p(6,"p",5),H(7),m()(),p(8,"p",6),H(9),m(),B(10,"number",7)),2&e&&(d(2),se(i.record.position),d(3),l("user",i.record.profile)("hasUsername",!1)("hasLevel",!1)("isLink",!0),d(2),se(i.record.profile.username.currentUsername),d(2),se(i.calculateWinRate(i.record.gamesWon,i.record.gamesPlayed)),d(),l("value",i.record.elo))},dependencies:[Bo,Qr],styles:["[_nghost-%COMP%]{display:flex;flex-flow:row nowrap;text-align:left;align-items:center}.ranked-games__tiles--container[_ngcontent-%COMP%]{margin:2rem auto 0}.ranked-games-leaderboard__container[_ngcontent-%COMP%]{padding:0;border-radius:initial}.ranked-games-leaderboard[_ngcontent-%COMP%]{width:100%;padding:4rem 0 0}.ranked-games-leaderboard__avatar-container[_ngcontent-%COMP%]{width:2.25em;height:2.25em;flex-shrink:0}.ranked-games-leaderboard__item-rank[_ngcontent-%COMP%]{flex:1}.ranked-games-leaderboard__item-rank-span[_ngcontent-%COMP%]{margin-left:35%}.ranked-games-leaderboard__item-name[_ngcontent-%COMP%]{flex:2;display:flex;flex-flow:row nowrap;align-items:center;overflow:hidden}.ranked-games-leaderboard__item-win-rate[_ngcontent-%COMP%], .ranked-games-leaderboard__item-score[_ngcontent-%COMP%]{flex:1}.ranked-games-leaderboard__item-name-text[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.EStyle||(t.EStyle={})).Generic="generic",o.CurrentPlayer="current-player",o.Sticky="sticky",o.Golden="golden",o.Silver="silver",o.Bronze="bronze"}(Pf||(Pf={}));const gQt=["list"],_Qt=["item"];function vQt(t,n){1&t&&(p(0,"div",16)(1,"p",17),H(2),V(3,"translate"),m()()),2&t&&(d(2),se($(3,1,"RANKED_GAMES.CURRENT_RANKINGS")))}const bQt=()=>({textKey:"LEADERBOARDS.EMPTY"}),CQt=t=>[t];function yQt(t,n){1&t&&B(0,"empty-content",18),2&t&&l("noImgFlag",!0)("textArray",ne(3,CQt,pt(2,bQt)))}const SQt=(t,n)=>({isFirst:t,isLast:n});function wQt(t,n){if(1&t){const o=Ce();p(0,"ranked-games-leaderboard-item",19,20),Y("click",function(){const r=oe(o).$implicit;return re(_().openProfile(r))}),m()}if(2&t){const o=n.$implicit,e=n.first,i=n.last,r=_();l("ngClass",cn(4,SQt,e,i))("type",r.getType(o))("record",o),Hn("myProfile",o.userId===(null==r.myRecord?null:r.myRecord.userId))}}function TQt(t,n){if(1&t){const o=Ce();p(0,"ranked-games-leaderboard-item",21),Y("click",function(){return oe(o),re(_().scrollToMyPlaceInLeaderboard())}),m()}if(2&t){const o=_();go("bottom",o.myLeaderboardItemPosition),l("type",o.EStyle.Sticky)("record",o.myRecord)}}let FD=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.store=e,this.ngZone=i,this.scrollHelper=r,this.renderer=s,this.cdr=a,this.elRef=c,this.navigation=u,this.constants=h,this.EStyle=Pf.EStyle,this.startFromIndex=0,this.records=[],this.scrollAnimation={durationMs:100,timingFunction:S6e},this.myLeaderboardRecordPosition={marginFromTop:5,marginFromBottom:10},this.scrollDetectionThrottleMs=50,this.onScroll=k7e()(b=>{this.myUserLeaderboardItem&&(this.myRecord.position<=this.startFromIndex?this.showMyLeaderboardItem=b.target.scrollTop>0:this.setMyRecordVisibility())},this.scrollDetectionThrottleMs),this.scrollToMyPlaceInLeaderboard=()=>{const b=this.getOffsetToElement(this.myUserLeaderboardItem.nativeElement,this.el);this.myUserLeaderboardItem&&this.scrollHelper.scrollElement({element:this.el,targetScroll:b+this.myUserLeaderboardItem.nativeElement.offsetHeight/2-this.el.offsetHeight/2,animation:this.scrollAnimation,position:Na.EScrollPosition.ScrollTop})}}trackByFn(e,i){return i.profile.id}ngOnChanges(e){this.myUserId=this.store.selectUserState().profile.id,this.records=this.leaderboard.records,this.leaderboard.myRecord&&(this.myRecord={...this.leaderboard.myRecord,profile:this.store.selectSimpleProfile()}),this.myRecord&&!this.records.find(i=>i.userId===this.myRecord.userId)&&(this.records=[...this.records,this.myRecord])}ngAfterViewInit(){this.el=cr.isScrollable(this.list.nativeElement)?this.list.nativeElement:cr.findScrollableContainer(this.elRef.nativeElement),this.ngZone.runOutsideAngular(()=>this.el.addEventListener("scroll",this.onScroll,{passive:!0})),this.leaderboardItemChangesSubs=this.leaderboardItems.changes.subscribe(()=>this.setMyRecordElement()),this.setMyRecordElement()}openProfile(e){this.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/profile/").concat(e.profile.id)}}])}ngOnDestroy(){this.leaderboardItemChangesSubs.unsubscribe(),this.ngZone.runOutsideAngular(()=>this.el.removeEventListener("scroll",this.onScroll))}setMyRecordElement(){const e=this.leaderboardItems.find((i,r)=>(this.myUserLeaderboardItemIndex=r,"true"===i.nativeElement.getAttribute("myProfile")));e&&(this.myUserLeaderboardItem=e,this.myRecord.position<=this.startFromIndex&&(this.showMyLeaderboardItem=!1),this.myUserLeaderboardItem?this.setMyRecordVisibility():this.showMyLeaderboardItem=!1)}getType(e){switch(e.position){case 1:return Pf.EStyle.Golden;case 2:return Pf.EStyle.Silver;case 3:return Pf.EStyle.Bronze;default:return e.profile.id===this.myUserId?Pf.EStyle.CurrentPlayer:Pf.EStyle.Generic}}myRecordElPosition(){if(!this.myUserLeaderboardItem)return;const e=this.getOffsetToElement(this.myUserLeaderboardItem.nativeElement,this.el);return this.el.scrollTop>e-this.myLeaderboardRecordPosition.marginFromTop?n.MyRecordPositionEnum.isBelow:this.el.scrollTop<e-this.el.offsetHeight+(this.leaderboardItems.length===this.myUserLeaderboardItemIndex+1?0:this.myLeaderboardRecordPosition.marginFromBottom)+this.myUserLeaderboardItem.nativeElement.offsetHeight?n.MyRecordPositionEnum.IsAbove:this.el.scrollTop>e+this.myUserLeaderboardItem.nativeElement.offsetHeight-this.el.offsetHeight?n.MyRecordPositionEnum.OnScreen:void 0}getOffsetToElement(e,i){let r=0;for(;e&&e!==i;)r+=e.offsetTop,e=e.offsetParent;return r}setMyRecordVisibility(){A4().measure(()=>{const e=this.showMyLeaderboardItem;switch(this.myRecordElPosition()){case n.MyRecordPositionEnum.isBelow:this.myLeaderboardItemPosition="".concat(this.el.offsetHeight-this.myUserLeaderboardItem.nativeElement.offsetHeight-this.myLeaderboardRecordPosition.marginFromTop,"px"),this.showMyLeaderboardItem=!0,this.renderer.setStyle(this.myUserLeaderboardItem.nativeElement,"opacity","0");break;case n.MyRecordPositionEnum.IsAbove:this.myLeaderboardItemPosition="".concat(this.myLeaderboardRecordPosition.marginFromBottom,"px"),this.showMyLeaderboardItem=!0,this.renderer.setStyle(this.myUserLeaderboardItem.nativeElement,"opacity","0");break;case n.MyRecordPositionEnum.OnScreen:this.showMyLeaderboardItem=!1,this.renderer.setStyle(this.myUserLeaderboardItem.nativeElement,"opacity","1")}e!==this.showMyLeaderboardItem&&this.cdr.detectChanges()})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(an),g(cr),g(ji),g(Re),g($t),g(Yt),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-leaderboard-list"]],viewQuery:function(e,i){if(1&e&&($e(gQt,5,$t),$e(_Qt,5,$t)),2&e){let r;je(r=He())&&(i.list=r.first),je(r=He())&&(i.leaderboardItems=r)}},inputs:{leaderboard:"leaderboard"},features:[it],decls:26,vars:16,consts:[[1,"ranked-games-leaderboard-list__container"],["curvedContainerContent",""],[1,"ranked-games-leaderboard-list"],[1,"ranked-games-leaderboard-list__title-text","in-leaderboard"],[1,"ranked-games-leaderboard-list__item"],[1,"ranked-games-leaderboard-list__item--content"],[1,"ranked-games-leaderboard-list__item-rank"],[1,"ranked-games-leaderboard-list__item-rank-span"],[1,"ranked-games-leaderboard-list__item-name"],[1,"ranked-games-leaderboard-list__item-win-rate"],[1,"ranked-games-leaderboard-list__item-score"],[1,"ranked-games-leaderboard-list-items"],["list",""],[3,"noImgFlag","textArray",4,"ngIf"],["class","ranked-games-leaderboard-item","click-feedback","",3,"ngClass","type","record","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","ranked-games-leaderboard-item my","click-feedback","",3,"bottom","type","record","click",4,"ngIf"],[1,"ranked-games-leaderboard-list__title"],[1,"ranked-games-leaderboard-list__title-text"],[3,"noImgFlag","textArray"],["click-feedback","",1,"ranked-games-leaderboard-item",3,"ngClass","type","record","click"],["item",""],["click-feedback","",1,"ranked-games-leaderboard-item","my",3,"type","record","click"]],template:function(e,i){1&e&&(p(0,"ranked-tiles-container",0),U(1,vQt,4,3,"ng-template",null,1,ft),p(3,"div",2)(4,"p",3),H(5),V(6,"translate"),m(),p(7,"div",4)(8,"div",5)(9,"p",6)(10,"span",7),H(11,"#"),m()(),p(12,"div",8),H(13),V(14,"translate"),m(),p(15,"p",9),H(16),V(17,"translate"),m(),p(18,"p",10),H(19),V(20,"translate"),m()()(),p(21,"div",11,12),U(23,yQt,1,5,"empty-content",13)(24,wQt,2,7,"ranked-games-leaderboard-item",14)(25,TQt,1,4,"ranked-games-leaderboard-item",15),m()()()),2&e&&(d(5),se($(6,8,"RANKED_GAMES.CURRENT_RANKINGS")),d(8),se($(14,10,"WORDS.PLAYER")),d(3),se($(17,12,"RANKED_GAMES.WIN_RATE")),d(3),se($(20,14,"RANKED_GAMES.RATING")),d(4),l("ngIf",!i.records.length),d(),l("ngForOf",i.records)("ngForTrackBy",i.trackByFn),d(),l("ngIf",i.showMyLeaderboardItem))},dependencies:[Xe,Mt,Ne,bo,po,Vq,Pf,qe],styles:["[_nghost-%COMP%]{height:100%;display:block}.ranked-games__tiles--container[_ngcontent-%COMP%]{margin:2rem auto 0}.ranked-games-leaderboard-list__container[_ngcontent-%COMP%]{padding:0;height:100%}.ranked-games-leaderboard-list[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ranked-games-leaderboard-list-items[_ngcontent-%COMP%]{position:relative;width:100%;max-height:calc(100% - 4.5rem)}.ranked-games-leaderboard-list__item--content[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;text-align:left;align-items:center;height:4.5rem}.ranked-games-leaderboard-list__item-rank[_ngcontent-%COMP%]{flex:1}.ranked-games-leaderboard-list__item-rank-span[_ngcontent-%COMP%]{margin-left:35%}.ranked-games-leaderboard-list__item-name[_ngcontent-%COMP%]{flex:2;display:flex;flex-flow:row nowrap;align-items:center}.ranked-games-leaderboard-list__item-win-rate[_ngcontent-%COMP%], .ranked-games-leaderboard-list__item-score[_ngcontent-%COMP%]{flex:1}.ranked-games-leaderboard-item[_ngcontent-%COMP%]{cursor:pointer}.ranked-games-leaderboard-item.isFirst[_ngcontent-%COMP%]{margin-top:0}.ranked-games-leaderboard-item.my[_ngcontent-%COMP%]{position:-webkit-sticky;position:-webkit-sticky;position:sticky;margin-top:0;width:100%;bottom:10px;transform:translateZ(0)}"],changeDetection:0}),n})();!function(t){let n;var o;(o=n=t.MyRecordPositionEnum||(t.MyRecordPositionEnum={}))[o.IsAbove=0]="IsAbove",o[o.isBelow=1]="isBelow",o[o.OnScreen=2]="OnScreen"}(FD||(FD={}));let EIe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-leaderboard"]],hostAttrs:[1,"ranked-games-leaderboard"],inputs:{title:"title",leaderboard:"leaderboard",myStats:"myStats"},decls:2,vars:2,consts:[[1,"ranked-leaderboard-stats",3,"stats"],[1,"ranked-leaderboard-list",3,"leaderboard"]],template:function(e,i){1&e&&B(0,"ranked-games-leaderboard-stats",0)(1,"ranked-games-leaderboard-list",1),2&e&&(l("stats",i.myStats),d(),l("leaderboard",i.leaderboard))},dependencies:[OIe,FD],styles:["[_nghost-%COMP%]{display:inline-block;height:100%}"],changeDetection:0}),n})(),xIe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-leaderboard-smart"]],inputs:{title:"title",season:"season"},decls:1,vars:3,consts:[[1,"ranked-games-leaderboard",3,"title","myStats","leaderboard"]],template:function(e,i){1&e&&B(0,"ranked-games-leaderboard",0),2&e&&l("title",i.title)("myStats",i.season.myStats)("leaderboard",i.season.leaderboard)},dependencies:[EIe],styles:["[_nghost-%COMP%]{display:inline-block;height:100%}.ranked-games-leaderboard[_ngcontent-%COMP%]{width:100%;max-height:inherit}\n\n/*# sourceMappingURL=ranked-games-leaderboard-smart.component.ts-angular-inline--17.css.map*/"],changeDetection:0}),n})();function PQt(t,n){1&t&&B(0,"loader-image",2),2&t&&l("transparentBG",!0)}function IQt(t,n){if(1&t){const o=Ce();p(0,"timer",13),Y("onCountdownFinished",function(){return oe(o),re(_(3).onTimerExpire())}),m()}if(2&t){const o=_(3);l("timerConfig",o.timerConfiguration)("milliseconds",o.getTimeToNextState())}}function MQt(t,n){if(1&t&&(p(0,"item-label-component",9)(1,"div",10)(2,"p",11),H(3),V(4,"translate"),U(5,IQt,1,2,"timer",12),m()()()),2&t){const o=_(2);l("customClass","ranked-tiles-flag__container"),d(3),ze("",$(4,3,o.getItemLabelText().key)," "),d(2),l("ngIf",o.session.sessionState!==o.ESessionState.Ended)}}function OQt(t,n){if(1&t&&(Tn(0),B(1,"ranked-lobby-info",3),p(2,"ranked-tiles-container",4),U(3,MQt,6,5,"ng-template",null,5,ft),B(5,"ranked-games-progress",6)(6,"ranked-tile-component",7)(7,"ranked-games-leaderboard-smart",8),m(),Pn()),2&t){const o=_();d(),l("season",o.info.season),d(4),l("info",o.info),d(),l("poolId",o.info.season.poolId)("info",o.info),d(),l("season",o.info.season)}}const EQt=()=>({textKey:"RANKED_GAMES.ERROR_LOADING_SEASON"}),xQt=t=>[t];function AQt(t,n){1&t&&(Tn(0),B(1,"empty-content",14),Pn()),2&t&&(d(),l("textArray",ne(2,xQt,pt(1,EQt))))}let AIe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.getSeasonInfoUsecase=e,this.store=i,this.gameStateService=r,this.cdr=s,this.time=a,this.deltaDNAService=c,this.brazeEngagementService=u,this.ESessionState=Nr,this.destroy$=new sn}ngOnInit(){this.timerConfiguration=new yl(eg).useYearsConfig({timeFormat:qi.Normal,showTextPeriod:!0,showNullValue:!1}).useMonthsConfig({timeFormat:qi.Normal,showTextPeriod:!0,showNullValue:!1}).useDaysConfig({timeFormat:qi.Normal}).build();const e=this.gameStateService.getCurrentGameRelatedConfig();this.getSeasonInfoUsecase.execute(e.gameConfig.id).catch(i=>{console.error(i),this.scheduleRetryInterval()}),this.store.rankedGames.subcribeSeasonInfo({gameId:e.gameConfig.id}).pipe(wn(this.destroy$)).subscribe(i=>{this.info=i,i.season&&(this.session=Dg.getSessionInfo({startDate:i.season.startDate,endDate:i.season.endDate,activeHours:this.getPoolActiveHours(i)},this.time.getServerTimeS())),this.cdr.detectChanges()}),this.deltaDNAService.rankedLobbyOpenEngage(e.gameConfig.id),this.brazeEngagementService.rankedLobbyOpenEngage(e.gameConfig.id)}getItemLabelText(){switch(this.session.sessionState){case Nr.BeforeStart:return{key:"RANKED_GAMES.TILE_TIMER_TEXT_SEASON_NOT_STARTED_STATE"};case Nr.InActive:case Nr.Active:case Nr.BeforeEnd:return{key:"RANKED_GAMES.TILE_TIMER_TEXT_BEFORE_END_SESSION_STATE"};case Nr.Ended:return{key:"RANKED_GAMES.TILE_TIMER_TEXT_SEASON_ENDED_STATE"}}}ngOnDestroy(){clearInterval(this.interval),this.destroy$.next(),this.destroy$.complete()}scheduleRetryInterval(){clearInterval(this.interval),this.interval=setInterval(()=>{const e=this.gameStateService.getCurrentGameRelatedConfig();this.getSeasonInfoUsecase.execute(e.gameConfig.id).then(()=>clearInterval(this.interval)).catch(i=>console.error(i))},3e4)}getTimeToNextState(){switch(this.session.sessionState){case Nr.BeforeStart:return this.session.timeMs;case Nr.InActive:case Nr.Active:case Nr.BeforeEnd:case Nr.Ended:return this.session.timeToEndMs}}onTimerExpire(){this.info&&(this.session=Dg.getSessionInfo({startDate:this.info.season.startDate,endDate:this.info.season.endDate,activeHours:this.getPoolActiveHours(this.info)},this.time.getServerTimeS()),this.cdr.detectChanges())}getPoolActiveHours(e){return this.gameStateService.getCurrentGameRelatedConfig().matchmaking.pools.find(r=>r.id===e.season.poolId).activeHours}}return(t=n).\u0275fac=function(e){return new(e||t)(g(cwe),g(J),g(Zn),g(Re),g(Bn),g(sl),g(cl))},t.\u0275cmp=pe({type:t,selectors:[["ranked-games-grid"]],hostAttrs:[1,"ranked-games-grid"],decls:3,vars:3,consts:[[3,"transparentBG",4,"ngIf"],[4,"ngIf"],[3,"transparentBG"],[1,"ranked-games__info",3,"season"],[1,"ranked-games__tiles--container"],["curvedContainerContent",""],[1,"ranked-games__tiles--progress",3,"info"],[1,"ranked-games__tiles--tile",3,"poolId","info"],[1,"ranked-games__tiles--leaderboard",3,"season"],[3,"customClass"],[1,"ranked--tiles__top-element-wrapper"],[1,"ranked--tiles__timer-text"],["class","ranked-tiles__timer",3,"timerConfig","milliseconds","onCountdownFinished",4,"ngIf"],[1,"ranked-tiles__timer",3,"timerConfig","milliseconds","onCountdownFinished"],[3,"textArray"]],template:function(e,i){1&e&&U(0,PQt,1,1,"loader-image",0)(1,OQt,8,5,"ng-container",1)(2,AQt,2,4,"ng-container",1),2&e&&(l("ngIf",null==i.info?null:i.info.loadingState.isLoading),d(),l("ngIf",(null==i.info?null:i.info.loadingState.isLoaded)&&!(null!=i.info&&i.info.loadingState.isLoading)&&!(null!=i.info&&i.info.loadingState.error)),d(),l("ngIf",!(null!=i.info&&i.info.loadingState.isLoading)&&(null==i.info?null:i.info.loadingState.error)))},dependencies:[Ne,Fs,bo,Oi,Ym,vIe,Vq,wIe,IIe,xIe,qe],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.ranked-games__info[_ngcontent-%COMP%]{max-width:90%;margin:auto}@media screen and (max-width: 568px){.ranked-games__info[_ngcontent-%COMP%]{max-width:98%}}.ranked-games__tiles--container[_ngcontent-%COMP%]{margin:2rem auto 0;max-width:768px}.ranked-games__tiles--progress[_ngcontent-%COMP%], .ranked-games__tiles--tile[_ngcontent-%COMP%], .ranked-games__tiles--leaderboard[_ngcontent-%COMP%]{width:100%}.ranked-games__tiles--tile[_ngcontent-%COMP%]{margin-top:1.6rem;transform:translateZ(0)}.ranked-games__tiles--leaderboard[_ngcontent-%COMP%]{margin-top:1.6rem}.ranked--tiles__top-element-wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;padding:.5rem 1rem}@media screen and (max-width: 568px){.ranked--tiles__top-element-wrapper[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0}),n})();const RQt=[{path:"ranked",component:_Ie,children:[{path:"",component:AIe}],data:{wideLobby:!0}}],kQt=[CO,No,Ls,Yi,Io,u3t];let LQt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[kQt]}),n})();const RIe=[{path:":gameId/lobby",component:i1e,canActivate:[gIe],children:[{path:"",component:F1e},...RZt,...KWt,...RQt]}],DQt=[xi,Yi,Io,No,CO,Ls,YWt,DZt],BQt=[s1,gIe,O7,ly];let NQt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...BQt],imports:[DQt]}),n})(),kIe=(()=>{var t;class n{constructor(e,i,r){this.gridOrderSizeCalculator=new tTe,this.appLangService=r,this.store=i,this.gamesStateService=e,this.gridConfig=Qu()(Lt.CONFIG.content.games.grid),this.cachedConfig=this.gridConfig}getUpdateStream(){return this.gamesStateService.gameStateUpdateEvents.pipe(bt(e=>e instanceof $6),jn(e=>{let i;return this.cachedConfig.forEach(r=>{r.id===e.updatedState.id&&(i={...r,info:{...r.info,tileData:{...r.info.tileData,gameData:e.updatedState}}})}),i}))}getConfig(){let e=[];return this.gridConfig.forEach(i=>{i.info.tileType===kd.ETileType.Game?this.gamesStateService.getGamesState().forEach(r=>{i.id===r.id&&e.push({...i,info:{...i.info,tileData:{...i.info.tileData,gameData:r}}})}):e.push(i)}),this.cachedConfig=this.orderByPriority(e),this.cachedConfig}orderByPriority(e){const i=this.store.selectSync(Ph).settings.region.toLowerCase();return this.gridOrderSizeCalculator.getOrderedAndResizedGrid(e,i)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Zn),T(J),T(Ma))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),zq=(()=>{var t;class n{constructor(e,i,r){this.homeLobbyConfigService=i,this.gamesStateService=e,this.tutorials=r,this.gridTiles=[]}ngOnInit(){this.gamesStateService.removeCurrentGame(),this.gridTiles=this.homeLobbyConfigService.getConfig(),this.subscription=this.homeLobbyConfigService.getUpdateStream().subscribe(e=>{this.gridTiles=this.gridTiles.map(i=>e.id!==i.id?i:e)}),this.tutorials.requestTutorial({cmp:this,group:Ms.Lobby})}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe(),this.tutorials.onTutorialComponentDestroy(this,Ms.Lobby)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Zn),g(kIe),g(sv))},t.\u0275cmp=pe({type:t,selectors:[["home-lobby-grid"]],hostAttrs:[1,"home-lobby-grid__wrapper"],features:[mn([{provide:nn,useFactory:o=>new nn("games:lobby",o),deps:[[new jo,new zo,nn]]}])],decls:1,vars:1,consts:[[3,"config"]],template:function(e,i){1&e&&B(0,"grid",0),2&e&&l("config",i.gridTiles)},dependencies:[fO],styles:["[_nghost-%COMP%]{height:100%;overflow:hidden;overflow-y:auto;display:block}"]}),n})(),jq=(()=>{var t;class n{constructor(e,i,r,s){this.router=e,this.loader=i,this.userService=r,this.constants=s}canActivate(){return this.userService.getState().then(f(function*(){return!0})).catch(e=>(e&&e&&401===e.status&&this.activationFail(),this.loader.off(),!1))}activationFail(){this.router.navigate([this.constants.defaultNotLoggedRoute])}}return(t=n).\u0275fac=function(e){return new(e||t)(T(on),T(ro),T(Kr),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Hq=(()=>{var t;class n{constructor(e,i,r,s){this.location=s,this.navigation=e,this.clientConfigService=i,this.constants=r}canActivate(){return!this.clientConfigService.singleGamePlatform()||(this.singleGameNavigate(this.clientConfigService.getMultiplayerGames()[0].id),!1)}singleGameNavigate(e){var i,r;let s="".concat(this.constants.defaultLoggedRoute,"/").concat(e,"/lobby");const a=null!==(i=this.location.path().split("(".concat(Fn,":").concat(Ai))[1])&&void 0!==i?i:"",c=null!==(r=this.navigation.serializeUrl(this.navigation.getCurrentNavigation().finalUrl).split("(".concat(Fn,":").concat(Ai))[1])&&void 0!==r?r:"";a?s+="(".concat(Fn,":").concat(Ai).concat(a):c&&(s+="(".concat(Fn,":").concat(Ai).concat(c)),this.navigation.navigateByUrl(s).catch(u=>{console.error("HomeLobbyGridRouteGuard error:",u)})}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Yt),T(Zt),T(tn),T(Rs))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class FQt{constructor(n){this.fieldValidatorFactory=n}getConfig(){return[{id:"gender",label:"EDIT_PROFILE.GENDER",type:Si.FieldType.Picker,format:Si.EFormat.Text,options:[{value:null,label:"TEXT.SHOW_ALL"},{value:"male",label:"TEXT.MALE"},{value:"female",label:"TEXT.FEMALE"}]},{id:"years",label:"EDIT_PROFILE.AGE",type:Si.FieldType.Picker,format:Si.EFormat.NumberRange,options:[{value:null,label:"TEXT.SHOW_ALL"},{value:[18,25],label:"18-25"},{value:[26,50],label:"26-50"},{value:[51,75],label:"51-75"},{value:[76,100],label:"76-100"}]},{id:"level",label:"LABEL.LEVEL",type:Si.FieldType.Picker,format:Si.EFormat.NumberRange,options:[{value:null,label:"TEXT.SHOW_ALL"},{value:[1,10],label:"1-10"},{value:[10,20],label:"10-20"},{value:[20,35],label:"20-35"},{value:[35,50],label:"35-50"},{value:[50,100],label:"50+"}]},{id:"vip",label:"VIP",type:Si.FieldType.Picker,format:Si.EFormat.Boolean,options:[{value:null,label:"TEXT.SHOW_ALL"},{value:!1,label:"TEXT.NO_VIP"},{value:!0,label:"TEXT.VIP"}]},{id:"online",label:"TEXT.ONLINE",type:Si.FieldType.Picker,format:Si.EFormat.Boolean,options:[{value:null,label:"TEXT.SHOW_ALL"},{value:!0,label:"TEXT.ONLINE"},{value:!1,label:"TEXT.OFFLINE"}]},{id:"location",type:Si.FieldType.Input,format:Si.EFormat.Text,placeholder:"EDIT_PROFILE.LOCATION",label:"EDIT_PROFILE.LOCATION",options:[],maxLength:this.fieldValidatorFactory.createCountryValidator().maxLength}]}}let LIe=(()=>{var t;class n{constructor(e){this.socialService=e}execute(e){return this.socialService.getUsers(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(QL))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const UQt=["avatarsListComponent"],GQt=()=>({showUsername:!0,class:"social-layout__avatar",isLink:!0,showLevel:!0});function VQt(t,n){if(1&t){const o=Ce();p(0,"div",7),Tn(1),p(2,"avatars-list",8,9),Y("onScrolledToBottom",function(){return oe(o),re(_().loadMoreUsers())}),m(),Pn(),m()}if(2&t){const o=_();d(2),l("users",o.usersList)("avatarConfig",pt(2,GQt))}}const zQt=()=>({textKey:"ERRORS.NO_USERS_FOUND"}),jQt=t=>[t];function HQt(t,n){1&t&&B(0,"empty-content",10),2&t&&l("textArray",ne(2,jQt,pt(1,zQt)))}function qQt(t,n){1&t&&B(0,"loader-image")}let DIe=(()=>{var t;class n{constructor(e,i,r,s,a){this.fieldValidatorFactory=e,this.toaster=i,this.getUsersUseCase=r,this.cdr=s,this.destroyRef=a,this.navBarContent={type:Ru.EContent.Text,data:{key:"SOCIAL_PAGE.TITLE"}},this.loadUsersState$=new Qn(OM.OnlineUsers),this.limit$=new sn}ngOnInit(){this.filterConfig=new FQt(this.fieldValidatorFactory).getConfig(),this.loadUsersState$.pipe(mi(this.destroyRef),es(e=>this.getUsers(e))).subscribe(e=>{this.usersListState=e,e.loadingState.isLoading||(this.usersList=this.usersListState.list),this.cdr.detectChanges()}),this.limit$.next(gf),this.usernameValidator=this.fieldValidatorFactory.createUsernameValidator()}searchWithFilters(e){var i;this.searchBarError=void 0,!e.searchbarFilterValue||this.usernameValidator.isValid(e.searchbarFilterValue)?(null===(i=this.avatarsListComponent)||void 0===i||i.scrollToTop(),this.filters=e,this.loadUsersState$.next(OM.FilteredUsers),this.limit$.next(gf)):this.handleNotValidUsername()}resetFilters(){var e;null===(e=this.avatarsListComponent)||void 0===e||e.scrollToTop(),this.filters=void 0,this.loadUsersState$.next(OM.OnlineUsers),this.limit$.next(gf)}loadMoreUsers(){this.usersListState.loadingState.isLoading||!this.usersListState.hasMoreRecords||this.limit$.next(this.usersList.length+gf)}handleRequestErr(e){console.warn(e),this.toaster.error("ERRORS.CONNECTION_ERROR")}trackByFn(e,i){return i.id}getUsers(e){return e===OM.OnlineUsers?this.getOnlineUsersObservable():this.getFilteredUsersObservable()}handleNotValidUsername(){this.searchBarError={key:"API_ERRORS.InvalidUsername",params:[this.usernameValidator.minLength,this.usernameValidator.maxLength]}}getOnlineUsersObservable(){return this.onlineUsersObservable||(this.onlineUsersObservable=this.limit$.pipe(mi(this.destroyRef),bt(()=>!this.filters),es(e=>this.getUsersUseCase.execute({limit:e})))),this.onlineUsersObservable}getFilteredUsersObservable(){return this.filteredUsersObservable||(this.filteredUsersObservable=this.limit$.pipe(bt(()=>!!this.filters),es(e=>this.getUsersUseCase.execute({limit:e,filters:this.filters})))),this.filteredUsersObservable}}return(t=n).\u0275fac=function(e){return new(e||t)(g(wa),g(Dt),g(LIe),g(Re),g(br))},t.\u0275cmp=pe({type:t,selectors:[["social"]],viewQuery:function(e,i){if(1&e&&$e(UQt,5,NC),2&e){let r;je(r=He())&&(i.avatarsListComponent=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("social",o),deps:[[new jo,new zo,nn]]},LIe,QL])],decls:7,vars:11,consts:[[3,"backLink","content"],[1,"social__container--search"],[1,"social__container--search-bar"],[1,"social__search-bar-wrapper",3,"userMe","error","customInputCssClass","showSearchHistory","filterConfig","searchBarPlaceholder","filterAction","clearFilters"],["class","social__container",4,"ngIf"],["class","social__empty-content",3,"textArray",4,"ngIf"],[4,"ngIf"],[1,"social__container"],[1,"social-layout__container--layout__avatar",3,"users","avatarConfig","onScrolledToBottom"],["avatarsListComponent",""],[1,"social__empty-content",3,"textArray"]],template:function(e,i){1&e&&(B(0,"navigation-bar",0),p(1,"div",1)(2,"div",2)(3,"search-bar",3),Y("filterAction",function(s){return i.searchWithFilters(s)})("clearFilters",function(){return i.resetFilters()}),m()()(),U(4,VQt,4,3,"div",4)(5,HQt,1,4,"empty-content",5)(6,qQt,1,0,"loader-image",6)),2&e&&(l("backLink","history")("content",i.navBarContent),d(3),l("userMe",i.userMe)("error",i.searchBarError)("customInputCssClass","social__searchbar-input")("showSearchHistory",!0)("filterConfig",i.filterConfig)("searchBarPlaceholder","PLACEHOLDERS.USERNAME"),d(),l("ngIf",i.usersList&&i.usersList.length>0),d(),l("ngIf",!(i.usersList&&0!==i.usersList.length||null!=i.usersListState&&i.usersListState.loadingState.isLoading)),d(),l("ngIf",null==i.usersListState?null:i.usersListState.loadingState.isLoading))},dependencies:[Ne,Kh,bo,pf,Oi,NC],styles:[".social__container--search[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;height:7rem;width:100%;margin:0 auto;padding:2rem 0;justify-content:center}.social__container--search-bar[_ngcontent-%COMP%]{position:relative;width:92%;max-width:80rem}@media only screen and (max-width: 768px){.social__container--search-bar[_ngcontent-%COMP%]{width:calc(100% - 5rem)}}@media only screen and (max-width: 480px){.social__container--search-bar[_ngcontent-%COMP%]{width:calc(100% - 3rem)}}.social__search-bar-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.social__container[_ngcontent-%COMP%]{height:calc(100% - 12rem);transform:translateZ(0);max-width:1400px;margin:0 auto}.social__empty-content[_ngcontent-%COMP%]{height:calc(100% - 12rem)}"]}),n})();var WQt=nt.EPermissionModule;let BIe=(()=>{var t;class n{constructor(e,i,r){this.permissionsService=e,this.navigation=i,this.constants=r}canActivate(){return!!this.permissionsService.getModulePermission(WQt.Social).isEnabled||!!this.navigation.isFirstNavigation(this.navigation.getCurrentNavigation().previousNavigation)&&this.navigation.parseUrl(this.constants.defaultLoggedRoute)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Pi),T(Yt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const NIe=[{path:"social",component:DIe,canActivate:[BIe]}],$Qt=[{path:"cash-back",component:PTe,canActivate:[OTe]}],KQt=["*"];let UD=(()=>{var t;class n{constructor(e){this.cdr=e,e.detach()}ngOnChanges(e){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["free-reward-container"]],inputs:{title:"title"},features:[it],ngContentSelectors:KQt,decls:7,vars:1,consts:[[1,"free-reward-box__wrapper"],[1,"free-reward-box__container--main"],[1,"free-reward-box__container--title"],[1,"free-reward-box__container--content"]],template:function(e,i){1&e&&(Co(),p(0,"section",0)(1,"div",1)(2,"div",2)(3,"p"),H(4),m()(),p(5,"div",3),yo(6),m()()()),2&e&&(d(4),se(i.title))},styles:["@keyframes _ngcontent-%COMP%_pulse{0%{transform:scaleZ(1)}30%{transform:scale3d(.8,.8,.8)}50%{transform:scale3d(1.05,1.05,1.05)}70%{transform:scale3d(.9,.9,.9)}to{transform:scaleZ(1)}}@keyframes _ngcontent-%COMP%_tada{0%{transform:scaleZ(1)}10%,20%{transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{transform:scaleZ(1)}}.free-reward-box__wrapper[_ngcontent-%COMP%]{width:100%;padding:.5rem;min-width:100%;transform:translateZ(0)}.free-reward-box__container--main[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:row wrap}.free-reward-box__container--title[_ngcontent-%COMP%]{order:1;width:100%;height:2rem;display:flex;justify-content:center;align-items:flex-end;font-size:1.4rem}.free-reward-box__container--title[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:100%}.free-reward-box__container--content[_ngcontent-%COMP%]{order:2;width:100%;min-height:10rem;display:flex;flex-flow:row wrap;justify-content:center;align-items:center}"],changeDetection:0}),n})();var ZQt=ve.EButtonModifier;let qq=(()=>{var t;class n{constructor(e,i,r,s){this.urlService=e,this.accountMergeService=i,this.store=r,this.cdr=s,this.bonusAction=()=>{this.accountMergeService.askForMerge(),this.cdr.detectChanges()},s.detach()}ngOnInit(){const e=this.store.selectUserState();e&&(this.mergeAccountReward=e.bonuses.accountMerge.reward.current,this.viewModel={imageUrl:this.urlService.getImageUrl("free-rewards/accountMerge.png"),title:"FREE_REWARDS.accountMerge",rewards:this.mergeAccountReward,buttons:[{textKey:"BUTTON.CONNECT",buttonModifier:ZQt.BUTTON_BONUSES,action:this.bonusAction}]}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Jb),g(J),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["account-merge-reward-box"]],decls:3,vars:3,consts:[[3,"data"],["text-with-placeholders","",1,"amrb__text--description",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"progress-info-box",0)(1,"span",1),B(2,"reward-component",2),m()()),2&e&&(l("data",i.viewModel),d(),l("key","BONUS.BONUS_LOGIN_TEXT"),d(),l("reward",i.mergeAccountReward))},dependencies:[oc,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.amrb__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();var QQt=ve.EButtonModifier;let Wq=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){var h=this;this.urlService=e,this.freeRewardsService=i,this.appLanguage=r,this.translate=s,this.store=a,this.cdr=c,this.animationService=u,this.bonusAction=f(function*(){h.disableButton||(h.disableButton=!0,yield h.freeRewardsService.claimAdminBonus().then(b=>{const w=dr.buildCurrencyTypesFromRewards(b.reward.current);h.animationService.playAnimations(w)}).catch(b=>{console.log("claimAntiChurnBonus error:",b)}),h.disableButton=!1,h.cdr.detectChanges())}),c.detach()}ngOnInit(){const e=this.store.selectUserState(),i=this.appLanguage.getAppLanguage();if(e){this.adminReward=e.bonuses.adminBonus.reward.current;const r=e.bonuses.adminBonus.reward.current.customTitle,s=e.bonuses.adminBonus.reward.current.customText;this.viewModel={imageUrl:this.urlService.getImageUrl("free-rewards/adminBonus.png"),title:r&&Object.keys(r).length&&r[i]?r[i]:this.translate.transform("FREE_REWARDS.antiChurn"),description:s&&Object.keys(s).length&&s[i]?s[i]:this.translate.transform("BONUS.ADMIN_BONUS"),rewards:this.adminReward,buttons:[{textKey:"BONUS.COLLECT",buttonModifier:QQt.BUTTON_BONUSES,action:this.bonusAction,disabled:this.disableButton}]}}this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Mu),g(Ma),g(qe),g(J),g(Re),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["admin-reward-box"]],decls:1,vars:1,consts:[[3,"data"]],template:function(e,i){1&e&&B(0,"admin-progress-info-box",0),2&e&&l("data",i.viewModel)},dependencies:[Jz],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.items__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:center;align-items:center;padding:0 .5rem;box-sizing:border-box}"],changeDetection:0}),n})();function YQt(t,n){if(1&t&&(p(0,"div",2),B(1,"daily-reward-component",3),m()),2&t){const o=n.$implicit,e=_();d(),l("reward",e.adaptReward(o))("state",e.getRewardState(o))}}let $q=(()=>{var t;class n{constructor(e){this.cdr=e}ngOnChanges(e){this.cdr.detectChanges()}trackByFn(e){return e}getRewardState(e){return this.adventCalendarState.loggedInDaysCount>e.day-1?op.Claimed:this.adventCalendarState.loggedInDaysCount===e.day-1?op.Current:op.Next}adaptReward(e){return{day:e.day,items:[e.item],miniGame:e.miniGame}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["advent-calendar"]],inputs:{adventCalendarState:"adventCalendarState"},features:[it],decls:2,vars:2,consts:[[1,"advent-calendar-rewards--container"],["class","advent-calendar-daily-reward--container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"advent-calendar-daily-reward--container"],[1,"advent-calendar-daily-reward",3,"reward","state"]],template:function(e,i){1&e&&(p(0,"div",0),U(1,YQt,2,2,"div",1),m()),2&e&&(d(),l("ngForOf",i.adventCalendarState.rewards)("ngForTrackBy",i.trackByFn))},dependencies:[Mt,xg],styles:["[_nghost-%COMP%]{flex:1;width:100%;display:flex;flex-flow:column;justify-content:center;align-items:center}.advent-calendar-rewards--container[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:center;flex-flow:row wrap}.advent-calendar-daily-reward--container[_ngcontent-%COMP%]{position:relative;width:22%;max-width:8rem;margin:.6rem 1.5%;height:9rem;display:flex;justify-content:center;align-items:center;flex-flow:column nowrap}"],changeDetection:0}),n})();var JQt=ve.EButtonModifier;const XQt=["element"];function eYt(t,n){1&t&&B(0,"advent-calendar",8),2&t&&l("adventCalendarState",_().adventCalendar)}const tYt=()=>({color:"white"});function nYt(t,n){if(1&t&&B(0,"timer",9),2&t){const o=_();l("timerConfig",o.timerConfig)("milliseconds",1e3*o.adventCalendar.calcTimeToNextBonus())("styleObject",pt(3,tYt))}}function iYt(t,n){if(1&t){const o=Ce();p(0,"button-text",10),Y("onClick",function(){return oe(o),re(_().bonusAction())}),p(1,"p",11),H(2),V(3,"translate"),m()()}if(2&t){const o=_();l("loading",o.adventCalendar.actions.claim.inProgress)("buttonModifier",o.EButtonModifier.BUTTON_BONUSES),d(2),se($(3,3,"BONUS.COLLECT"))}}let Kq=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.bonusService=e,this.store=i,this.cdr=r,this.toaster=s,this.animationService=a,this.adsService=c,this.EButtonModifier=JQt,this.timerConfig=eg,r.detach()}ngOnInit(){this.subscription=this.store.bonuses.adventCalendar.subscribeState().subscribe(e=>{this.adventCalendar=e,this.cdr.detectChanges()})}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}bonusAction(){var e=this;return f(function*(){try{yield e.adsService.showInterstitial({tag:Kb.BeforeClaimDailyBonusInterstitial}).catch(a=>console.warn("Interstitial ad was not shown",a));const i=yield e.bonusService.claimAdventCalendarBonus(),r=dr.buildBoundingRect(e.element.nativeElement),s=dr.buildCurrencyTypesFromRewards(i.reward.current);e.animationService.playAnimations(s,r)}catch(i){e.toaster.error(i instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG"),console.error(i)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Iu),g(J),g(Re),g(Dt),g(Fc),g(bc))},t.\u0275cmp=pe({type:t,selectors:[["advent-calendar-reward-box"]],viewQuery:function(e,i){if(1&e&&$e(XQt,7),2&e){let r;je(r=He())&&(i.element=r.first)}},decls:9,vars:6,consts:[[3,"title"],[1,"advent-calendar-reward--box__container"],[3,"adventCalendarState",4,"ngIf"],[1,"free-reward-box__container--button-action"],["element",""],[1,"advent-calendar-timer__container--button"],["class","button-timer__timer",3,"timerConfig","milliseconds","styleObject",4,"ngIf"],["class","free-reward-box__button-text",3,"loading","buttonModifier","onClick",4,"ngIf"],[3,"adventCalendarState"],[1,"button-timer__timer",3,"timerConfig","milliseconds","styleObject"],[1,"free-reward-box__button-text",3,"loading","buttonModifier","onClick"],["data-cy","bonusPopupClaimButton",1,"free-reward-box__text--button-text"]],template:function(e,i){1&e&&(p(0,"free-reward-container",0),V(1,"translate"),p(2,"div",1),U(3,eYt,1,1,"advent-calendar",2),m(),p(4,"div",3,4)(6,"div",5),U(7,nYt,1,4,"timer",6),m(),U(8,iYt,4,5,"button-text",7),m()()),2&e&&(l("title",$(1,4,"DAILY_BONUS.TITLE")),d(3),l("ngIf",i.adventCalendar.rewards.length),d(4),l("ngIf",!i.adventCalendar.isBonusAvailable),d(),l("ngIf",i.adventCalendar.isBonusAvailable))},dependencies:[Ne,Fs,pn,UD,$q,qe],styles:[".advent-calendar-reward--box__container[_ngcontent-%COMP%]{width:100%;margin-top:1rem}.advent-calendar-timer__container--button[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;justify-content:center;align-items:center}"],changeDetection:0}),n})();var oYt=ve.EButtonModifier;let wO=(()=>{var t;class n{constructor(e,i,r,s,a){var c=this;this.urlService=e,this.freeRewardsService=i,this.store=r,this.cdr=s,this.animationService=a,this.bonusAction=f(function*(){c.disableButton||(c.disableButton=!0,yield c.freeRewardsService.claimAntiChurnBonus().then(u=>{const h=dr.buildCurrencyTypesFromRewards(u.reward.current);c.animationService.playAnimations(h)}).catch(u=>{console.log("claimAntiChurnBonus error:",u)}),c.disableButton=!1,c.cdr.detectChanges())}),s.detach()}ngOnInit(){const e=this.store.selectUserState();e&&(this.antiChurnReward=e.bonuses.antiChurn.reward.current,this.viewModel={imageUrl:this.urlService.getImageUrl("free-rewards/antiChurn.png"),title:"FREE_REWARDS.antiChurn",rewards:this.antiChurnReward,buttons:[{textKey:"BONUS.COLLECT",buttonModifier:oYt.BUTTON_BONUSES,action:this.bonusAction,disabled:this.disableButton}]}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Mu),g(J),g(Re),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["anti-churn-reward-box"]],decls:3,vars:3,consts:[[3,"data"],["text-with-placeholders","",1,"acrb__text--description",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"progress-info-box",0)(1,"span",1),B(2,"reward-component",2),m()()),2&e&&(l("data",i.viewModel),d(),l("key","BONUS.ANTI_CHURN"),d(),l("reward",i.antiChurnReward))},dependencies:[oc,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.acrb__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();var rYt=ve.EButtonModifier,sYt=ve.EIcons;function aYt(t,n){if(1&t&&B(0,"daily-reward-component",8),2&t){const o=n.$implicit,e=n.index,i=_();l("reward",o)("state",i.getRewardState(e))}}const cYt=()=>({color:"white"});function lYt(t,n){if(1&t&&B(0,"timer",9),2&t){const o=_();l("timerConfig",o.timerConfig)("milliseconds",1e3*o.bonus.calcTimeToNextBonus())("styleObject",pt(3,cYt))}}function uYt(t,n){if(1&t){const o=Ce();p(0,"button-text",10),Y("onClick",function(){return oe(o),re(_().claimBonus())}),p(1,"p",11),H(2),V(3,"translate"),m()()}if(2&t){const o=_();l("loading",o.bonus.actions.claim.inProgress)("buttonModifier",o.buttonType.BUTTON_BONUSES),d(2),se($(3,3,"BONUS.COLLECT"))}}let Zq=(()=>{var t;class n{constructor(e,i,r,s,a){this.animationService=a,this.buttonType=rYt,this.icons=sYt,this.EDailyRewardState=op,this.store=r,this.toastService=e,this.bonusService=i,this.rewards=[],this.cdr=s,s.detach(),this.timerConfig=eg}ngOnInit(){this.subscription=this.store.bonuses.dailyBonus.subscribeState().pipe(bt(e=>!!e)).subscribe(e=>{this.bonus=e,this.rewards=this.buildRewards(e.reward.all),this.cdr.detectChanges()}),this.cdr.detectChanges()}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}trackByFn(e){return e}claimBonus(){var e=this;return f(function*(){try{const i=e.bonus.reward.current;yield e.bonusService.claimDailyBonus();const r=dr.buildCurrencyTypesFromRewards(i);e.animationService.playAnimations(r)}catch(i){i instanceof lt.NetworkError?e.toastService.error("ERRORS.CONNECTION_ERROR"):e.toastService.warn("ERRORS.SOMETHING_WRONG")}})()}buildRewards(e){return e.map((i,r)=>({day:r+1,items:i.items,previewUrl:"free-rewards/daily/".concat(r+1,".png")}))}getRewardState(e){return this.bonus.returnDaysCount>e?op.Claimed:this.bonus.returnDaysCount===e?op.Current:op.Next}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Dt),g(Iu),g(J),g(Re),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["daily-bonus-reward-box"]],decls:9,vars:7,consts:[[3,"title"],[1,"daily-bonus-box__container--all-days"],["class","daily-bonus-box__container--day-container",3,"reward","state",4,"ngFor","ngForOf","ngForTrackBy"],[1,"free-reward-box__container--button-action"],[1,"button-timer__wrapper"],[1,"button-timer__container--button"],["class","button-timer__timer",3,"timerConfig","milliseconds","styleObject",4,"ngIf"],["class","free-reward-box__button-text",3,"loading","buttonModifier","onClick",4,"ngIf"],[1,"daily-bonus-box__container--day-container",3,"reward","state"],[1,"button-timer__timer",3,"timerConfig","milliseconds","styleObject"],[1,"free-reward-box__button-text",3,"loading","buttonModifier","onClick"],[1,"free-reward-box__text--button-text"]],template:function(e,i){1&e&&(p(0,"free-reward-container",0),V(1,"translate"),p(2,"div",1),U(3,aYt,1,2,"daily-reward-component",2),m(),p(4,"div",3)(5,"section",4)(6,"div",5),U(7,lYt,1,4,"timer",6),m(),U(8,uYt,4,5,"button-text",7),m()()()),2&e&&(l("title",$(1,5,"DAILY_BONUS.TITLE")),d(3),l("ngForOf",i.rewards)("ngForTrackBy",i.trackByFn),d(4),l("ngIf",!i.bonus.isReady),d(),l("ngIf",i.bonus.isReady))},dependencies:[Mt,Ne,Fs,pn,xg,UD,qe],styles:[".daily-bonus-box__container--all-days[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:center;align-items:center;flex-flow:row wrap}.daily-bonus-box__container--day-container[_ngcontent-%COMP%]{position:relative;width:22%;max-width:8rem;margin:.6rem 1.5%;height:9rem;display:flex;justify-content:center;align-items:center;flex-flow:column nowrap}.day-container__reward[_ngcontent-%COMP%]{text-align:center}.day-container__reward--value[_ngcontent-%COMP%]{font-size:inherit}.day-container__collected-overlay-wrapper[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center}.button-timer__wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.button-timer__container--button[_ngcontent-%COMP%]{width:100%;height:4rem;display:flex;justify-content:center;align-items:center}.button-timer__container--button[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{min-width:100%}.button-timer__container--button[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;border-radius:.8rem;font-size:1.4rem;text-align:center}"],changeDetection:0}),n})();var dYt=ve.EButtonModifier;let Qq=(()=>{var t;class n{constructor(e,i,r,s,a){this.urlService=e,this.freeRewardsService=i,this.store=r,this.toast=s,this.cdr=a,this.bonusAction=()=>{this.freeRewardsService.sendVerificationEmail().catch(c=>{console.warn("Send verification email error: ",c)}),this.toast.info("VERIFICATION.VERIFICATION_EMAIL_SENT",[Lt.CONFIG.platform.support]),this.cdr.detectChanges()},a.detach()}ngOnInit(){const e=this.store.selectUserState();e&&(this.verificationReward=e.bonuses.verification.reward.current,this.viewModel={imageUrl:this.urlService.getImageUrl("free-rewards/verifyAccount.png"),title:"FREE_REWARDS.accountVerify",rewards:this.verificationReward,buttons:[{textKey:"BUTTON.SEND_AGAIN",buttonModifier:dYt.BUTTON_BONUSES,action:this.bonusAction}]}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Mu),g(J),g(Dt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["email-verification-reward-box"]],decls:3,vars:3,consts:[[3,"data"],["text-with-placeholders","",1,"evrb__text--description",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"progress-info-box",0)(1,"span",1),B(2,"reward-component",2),m()()),2&e&&(l("data",i.viewModel),d(),l("key","BONUS.VERIFY_EMAIL"),d(),l("reward",i.verificationReward))},dependencies:[oc,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.evrb__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();var pYt=ve.EButtonModifier;let Yq=(()=>{var t;class n{constructor(e,i,r,s,a){var c=this;this.store=e,this.urlService=i,this.freeRewardsService=r,this.cdr=s,this.animationService=a,this.bonusAction=f(function*(){if(!c.disableButton){c.disableButton=!0,c.cdr.detectChanges();try{const u=yield c.freeRewardsService.claimFirstLostGameBonus(),h=dr.buildCurrencyTypesFromRewards(u.reward.current);c.animationService.playAnimations(h)}catch(u){console.warn("claimFirstLostGameBonus error:",u)}finally{c.disableButton=!1,c.cdr.detectChanges()}}}),s.detach()}ngOnInit(){const e=this.store.selectUserState();e&&(this.reward=e.bonuses.firstLostGame.reward.current,this.viewModel={imageUrl:this.urlService.getImageUrl("free-rewards/firstLostGame.png"),title:"BONUS.FIRST_LOST_GAME",rewards:this.reward,buttons:[{textKey:"BONUS.COLLECT",buttonModifier:pYt.BUTTON_BONUSES,action:this.bonusAction,disabled:this.disableButton}]}),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(ii),g(Mu),g(Re),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["first-lost-game-reward-box"]],decls:3,vars:3,consts:[[3,"data"],["text-with-placeholders","",1,"flgrb__text--description",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"progress-info-box",0)(1,"span",1),B(2,"reward-component",2),m()()),2&e&&(l("data",i.viewModel),d(),l("key","BONUS.FIRST_LOST_GAME_DESC"),d(),l("reward",i.reward))},dependencies:[oc,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.flgrb__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();var hYt=ve.EButtonModifier;let Jq=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.urlService=e,this.freeRewardsPopupService=i,this.configService=r,this.store=s,this.router=a,this.constants=c,this.cdr=u,this.bonusAction=()=>{this.router.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/friends")}}]),this.freeRewardsPopupService.closeFreeRewards()},u.detach()}ngOnInit(){if(this.store.selectUserState()){let i={chips:0,gems:0,items:[],customText:{},banners:[]},r=this.configService.getConfig().transactions.bonus.invitation.accept;i=this.modifyBonusData(i,r);let s=this.configService.getConfig().transactions.bonus.invitation.levelUp;i=this.modifyBonusData(i,s),this.inviteFrReward=i,this.viewModel={imageUrl:this.urlService.getImageUrl("free-rewards/inviteFriendsLetter.png"),title:"FREE_REWARDS.inviteFriends",rewards:this.inviteFrReward,buttons:[{textKey:"BUTTON.INVITE_FRIEND",buttonModifier:hYt.BUTTON_BONUSES,action:this.bonusAction}]}}this.cdr.detectChanges()}modifyBonusData(e,i){if(i.isActive){e.chips=i.chips?i.chips+e.chips:e.chips,e.gems=i.gems?i.gems+e.gems:e.gems;for(let r of i.items)r.type===Fe.TG.ChipPack?e.chips+=r.amount:r.type===Fe.TG.GemsPack&&(e.gems+=r.amount)}return e}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Mu),g(Zt),g(J),g(on),g(tn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["invite-friends-reward-box"]],decls:3,vars:3,consts:[[3,"data"],["text-with-placeholders","",1,"ifrb__text--description",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"progress-info-box",0)(1,"span",1),B(2,"reward-component",2),m()()),2&e&&(l("data",i.viewModel),d(),l("key","BONUS.FOR_EVERY_INVITE"),d(),l("reward",i.inviteFrReward))},dependencies:[oc,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.ifrb__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();var GD=ve.EButtonModifier;const mYt=["btnUnlockTemplateRef"],fYt=["timerTemplateRef"];function gYt(t,n){1&t&&B(0,"progress-info-box",3),2&t&&l("data",_().viewModel)}function _Yt(t,n){if(1&t&&(p(0,"p",4),B(1,"reward-component",5),m()),2&t){const o=_();d(),l("reward",o.game.config.unlock)}}const vYt=()=>({color:"white"});function bYt(t,n){if(1&t&&B(0,"timer",8),2&t){const o=_(2);l("timerConfig",o.timerConfig)("milliseconds",1e3*o.game.calcTimeToNextBonus())("styleObject",pt(3,vYt))}}function CYt(t,n){if(1&t&&(p(0,"div",6),U(1,bYt,1,4,"timer",7),m()),2&t){const o=_();d(),l("ngIf",!o.game.isReady&&o.game.calcTimeToNextBonus())}}let Xq=(()=>{var t;class n{constructor(e,i,r,s,a,c){var u=this;this.urlService=e,this.freeRewardsPopupService=i,this.store=r,this.cdr=s,this.toastService=a,this.playRewardedGameUsecase=c,this.buttonType=GD.BUTTON_BONUSES,this.objectKeys=Object.keys,this.destroy$=new sn,this.claimBonus=()=>{this.playRewardedGameUsecase.execute(this.gameType)},this.unlockMiniGame=function(){var h=f(function*(b,w){try{yield u.freeRewardsPopupService.unlockMiniGame(u.game.gameType,b,w)}catch(R){R instanceof lt.NetworkError?u.toastService.error("ERRORS.CONNECTION_ERROR"):u.toastService.warn("ERRORS.SOMETHING_WRONG")}});return function(b,w){return h.apply(this,arguments)}}(),this.changeBuyButtonDisableState=h=>{this.isBuyButtonDisabled=h,this.cdr.detectChanges()},this.timerConfig=eg}ngAfterViewInit(){this.store.bonuses.games.subscribeGameStateByType(this.gameType).pipe(bt(e=>!!e),wn(this.destroy$)).subscribe(e=>{this.game=e,this.setGameData()}),this.store.games.subscribeIsRoomInWaitingState().pipe(wn(this.destroy$)).subscribe(this.changeBuyButtonDisableState)}ngOnChanges(e){e.gameType.firstChange||(this.setButtons(),this.cdr.detectChanges())}setGameData(){this.viewModel={imageUrl:this.urlService.getImageUrl("free-rewards/".concat(this.game.gameType,".png")),title:"FREE_REWARDS.".concat(this.game.gameType),description:"FREE_REWARDS.".concat(this.game.gameType,"_").concat(this.game.isReady?"READY_STATE_DESC":"WAITING_STATE_DESC"),progressBarData:{goalAmount:this.game.config.requirements.timeInterval,currentProgress:this.calcTimeToNextBonus(),starsAnimationEnabled:!0,hideAmountText:!0}},this.setButtons(),this.cdr.detectChanges()}setButtons(){if(this.game.isReady)this.viewModel.buttons=[{textKey:"TEXT.PLAY",buttonModifier:GD.BUTTON_BONUSES,action:this.claimBonus,disabled:!this.game.isReady||this.game.actions.claim.inProgress}];else if(!this.game.isReady)if(this.game.config.unlock){this.viewModel.buttons=[];for(let e in this.game.config.unlock)this.game.config.unlock[e]>0&&this.viewModel.buttons.push({templateRef:this.btnUnlockTemplateRef,buttonModifier:GD.BUTTON_BONUSES,action:()=>{this.unlockMiniGame(this.game.config.unlock.chips?Bc.Currency:Bc.Gems,this.game.config.unlock.chips?this.game.config.unlock.chips:this.game.config.unlock.gems)},disabled:this.game.actions.unlock.inProgress||this.game.actions.claim.inProgress})}else this.viewModel.buttons=[{templateRef:this.timerTemplateRef,buttonModifier:GD.BUTTON_TRANSPARENT,scaleFactor:1,bclass:"mgrb__button--bclass",action:()=>{}}]}ngOnDestroy(){this.destroy$.next()}showToaster(){this.toastService.warn("POPUP.DISABLED_CHIPS_USE")}calcTimeToNextBonus(){return Math.max(0,this.game.config.requirements.timeInterval-this.game.calcTimeToNextBonus())}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Mu),g(J),g(Re),g(Dt),g(oq))},t.\u0275cmp=pe({type:t,selectors:[["mini-game-reward-box"]],viewQuery:function(e,i){if(1&e&&($e(mYt,5,Qa),$e(fYt,5,Qa)),2&e){let r;je(r=He())&&(i.btnUnlockTemplateRef=r.first),je(r=He())&&(i.timerTemplateRef=r.first)}},inputs:{gameType:"gameType"},features:[it],decls:5,vars:1,consts:[[3,"data",4,"ngIf"],["btnUnlockTemplateRef",""],["timerTemplateRef",""],[3,"data"],[1,"free-reward-box__text--button-text","free-reward-box__button-text"],[3,"reward"],[1,"free-reward-box__container--timer","mgrb__timer"],["class","free-reward-box__timer",3,"timerConfig","milliseconds","styleObject",4,"ngIf"],[1,"free-reward-box__timer",3,"timerConfig","milliseconds","styleObject"]],template:function(e,i){1&e&&U(0,gYt,1,1,"progress-info-box",0)(1,_Yt,2,1,"ng-template",null,1,ft)(3,CYt,2,1,"ng-template",null,2,ft),2&e&&l("ngIf",i.viewModel)},dependencies:[Ne,Fs,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}"],changeDetection:0}),n})();var FIe=ve.EButtonModifier;function yYt(t,n){if(1&t&&(p(0,"div",2),B(1,"reward-component",3),m()),2&t){const o=_();l("key","BONUS.ENABLE_PUSH_NOTIFICATIONS"),d(),l("reward",o.pushNotificationsReward)}}let eW=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.urlService=e,this.store=i,this.appService=r,this.freeRewardsService=s,this.cdr=a,this.animationService=c,this.bonusAction=()=>{const u=dr.buildBoundingRect(this.progressInfoBox.nativeElement);this.pushNotificationEnabled?this.freeRewardsService.claimPushNotificationBonus().then(h=>{const b=dr.buildCurrencyTypesFromRewards(h.reward.current);this.animationService.playAnimations(b,u)}).catch(h=>{console.log("claimPushNotificationBonus error:",h)}):this.mobileAppService.messages().enableNotifications(()=>{this.freeRewardsService.claimPushNotificationBonus().then(h=>{const b=dr.buildCurrencyTypesFromRewards(h.reward.current);this.animationService.playAnimations(b,u)}).catch(h=>{console.log("claimPushNotificationBonus error:",h)})},h=>{console.log(h)},{openSettings:!0}),this.cdr.detectChanges()},this.mobileAppService=this.appService.getMobileAppService(),this.cdr=a,a.detach()}ngOnInit(){var e=this;return f(function*(){const i=yield e.mobileAppService.getCachedMobileUser();i&&i.notifications&&e.updatePushNotificationsStatus(i.notifications.enabled);const r=e.store.selectUserState();r&&(e.pushNotificationsReward=r.bonuses.pushNotifications.reward.current,e.viewModel={imageUrl:e.urlService.getImageUrl("free-rewards/pushNotification.png"),title:"FREE_REWARDS.pushNotifications",rewards:e.pushNotificationsReward,buttons:[{textKey:e.buttonTextKey,buttonModifier:FIe.BUTTON_BONUSES,action:e.bonusAction}]},e.mobileUserSubscription=e.mobileAppService.getMobileUserStream().subscribe(s=>{e.updatePushNotificationsStatus(s.notifications.enabled),e.viewModel.buttons=[{textKey:e.buttonTextKey,buttonModifier:FIe.BUTTON_BONUSES,action:e.bonusAction}]})),e.cdr.detectChanges()})()}ngOnDestroy(){this.mobileUserSubscription&&this.mobileUserSubscription.unsubscribe()}updatePushNotificationsStatus(e){this.pushNotificationEnabled=e,this.buttonTextKey=this.pushNotificationEnabled?"BONUS.COLLECT":"BUTTON.ALLOW",this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(J),g(Qt),g(Mu),g(Re),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["push-notifications-reward-box"]],viewQuery:function(e,i){if(1&e&&$e(pd,5,$t),2&e){let r;je(r=He())&&(i.progressInfoBox=r.first)}},decls:2,vars:2,consts:[[3,"data"],["class","pnrb__text--description","text-with-placeholders","",3,"key",4,"ngIf"],["text-with-placeholders","",1,"pnrb__text--description",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"progress-info-box",0),U(1,yYt,2,2,"div",1),m()),2&e&&(l("data",i.viewModel),d(),l("ngIf",i.pushNotificationsReward))},dependencies:[Ne,oc,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.pnrb__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();var UIe=ve.EButtonModifier;function SYt(t,n){if(1&t&&(p(0,"progress-info-box",1)(1,"div",2),B(2,"reward-component",3),m()()),2&t){const o=_();l("data",o.viewModel),d(),l("key","BONUS.WATCH_VIDEO"),d(),l("reward",o.maxReward)}}let tW=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){var b=this;this.urlService=e,this.cdr=i,this.toaster=r,this.bonusService=s,this.adsService=a,this.animationService=c,this.store=u,this.destroyRef=h,this.bonusAction=f(function*(){b.isAdmobVideoReady=b.adsService.isRewardedVideoEnabled()&&(yield b.isRewardedVideoReady()),b.isAdmobVideoReady?b.onRewardedVideoReady():b.isAdmobVideoReady=!1,b.cdr.detectChanges()}),this.videoChange=new ke,this.isAdmobVideoReady=!1,i.detach()}ngOnInit(){var e=this;this.reloadVideo().then(f(function*(){e.isAdmobVideoReady=e.adsService.isRewardedVideoEnabled()&&(yield e.isRewardedVideoReady()),e.cdr.detectChanges()})),this.store.ads.subscribeRewardedVideo({id:rc.BonusPopup}).pipe(mi(this.destroyRef)).subscribe(i=>{this.viewModel={...this.viewModel,buttons:[{textKey:"TEXT.WATCH",buttonModifier:UIe.BUTTON_BONUSES,action:this.bonusAction,loading:!!i}]},this.cdr.detectChanges()}),this.cdr.detectChanges()}ngOnChanges(){this.cdr.detectChanges()}isRewardedVideoReady(){return this.adsService.isRewardedVideoReady(rc.BonusPopup)}onRewardedVideoReady(){var e=this;return f(function*(){try{const i=e.video.reward;yield e.adsService.showRewardedVideo({containerId:rc.BonusPopup,video:e.video,isRewardMiniGame:!!e.video.gameMode}),yield e.bonusService.claimVideoBonusReward(Ba.RewardedVideo);const r=dr.buildCurrencyTypesFromRewards(i);e.animationService.playAnimations(r),e.onRewardedVideoFinished()}catch(i){i instanceof lt.NetworkError?e.toaster.error("ERRORS.CONNECTION_ERROR"):i instanceof Bp?e.toaster.error("BONUS.NO_VIDEOS"):i instanceof Np?e.toaster.warn("FREE_REWARDS.WATCH_WHOLE_VIDEO"):i instanceof zm||(i instanceof Fp?e.toaster.error("BONUS.AD_PROVIDER_INIT_FAIL"):e.toaster.warn("ERRORS.SOMETHING_WRONG")),console.warn("Failed admob video, error callback response:",i)}})()}onRewardedVideoFinished(){var e=this;return f(function*(){console.warn("admob video end"),yield e.reloadVideo(),e.cdr.detectChanges()})()}reloadVideo(){var e=this;return f(function*(){try{const i=yield e.bonusService.getVideoBonusReward(Ba.RewardedVideo);e.video=i,e.reloadMaxReward(),e.videoChange.emit(e.video),e.viewModel={imageUrl:e.urlService.getImageUrl("free-rewards/rewardedVideo.png"),title:"FREE_REWARDS.rewardedVideo",rewards:e.maxReward,rewardText:{key:"LABEL.GET_UP_TO"},buttons:[{textKey:"TEXT.WATCH",buttonModifier:UIe.BUTTON_BONUSES,action:e.bonusAction}]},e.cdr.detectChanges()}catch(i){return console.error(i),e.toaster.error("ERRORS.SOMETHING_WRONG"),!1}return!0})()}reloadMaxReward(){this.maxReward={chips:Math.max(...this.video.rewards.map(e=>e.chips))||0,gems:Math.max(...this.video.rewards.map(e=>e.gems))||0,items:this.video.reward.items,customText:this.video.reward.customText,banners:[]},this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Re),g(Dt),g(Iu),g(bc),g(Fc),g(Jo),g(br))},t.\u0275cmp=pe({type:t,selectors:[["rewarded-video-reward-box"]],inputs:{video:"video"},outputs:{videoChange:"videoChange"},features:[it],decls:1,vars:1,consts:[[3,"data",4,"ngIf"],[3,"data"],["text-with-placeholders","",1,"rvrb__text--description",3,"key"],[3,"reward"]],template:function(e,i){1&e&&U(0,SYt,3,3,"progress-info-box",0),2&e&&l("ngIf",i.isAdmobVideoReady&&i.video&&i.video.isReady)},dependencies:[Ne,oc,cu,pd],styles:["[_nghost-%COMP%]{padding:.5rem;display:block}.rvrb__text--description[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),n})();const wYt=["containerWrapper"],TYt=["container"],PYt=["overlay"],IYt=["icon"],MYt=["shine"],GIe=["itemComponent"];function OYt(t,n){if(1&t&&B(0,"item-component",11,12),2&t){const o=n.$implicit,e=_();l("item",o)("showBling",!1)("stylePreset",e.EStyle.WithElevatedPrice)}}function EYt(t,n){1&t&&B(0,"div",13,14)}function xYt(t,n){if(1&t&&B(0,"shine-component",15,16),2&t){const o=_();l("startDelayMs",0)("shineAnimationType",o.EShineAnimationTypes.WithScale)}}const AYt=(t,n)=>({claimed:t,"ready-for-claim":n}),RYt=t=>({"ready-for-claim":t}),kYt=t=>({hidden:t}),VIe=(t,n)=>({lock:t,claimed:n});let VD=(()=>{var t;class n{constructor(e,i,r,s){this.cdr=e,this.walletAnimationsService=i,this.tweenFactory=r,this.destroyRef=s,this.EIcons=ve.EIcons,this.EStyle=Zh.EStyle,this.EState=rm.EState,this.EShineAnimationTypes=Xz,this.showShine=!1}trackByReward(e,i){return i.id}playUnlockAnimation(){const e=this.tweenFactory.createTransitionTween(this.overlayContainerRef.nativeElement,"level-up-rewards-container--transition"),i=this.tweenFactory.createTransitionTween(this.iconRef.nativeElement,"level-up-rewards-container__icon-animation");return Promise.all([e.play(),i.play()]).then(()=>{this.state=this.EState.Unlocked,this.cdr.detectChanges()})}playLevelUpAnimation(){const e=this.tweenFactory.createAnimationTween(this.containerWrapper.nativeElement,"level-up-rewards-container--wrapper-animation"),i=this.tweenFactory.createAnimationTween(this.container.nativeElement,"level-up-rewards-container--animation");return Promise.all([e.play(),i.play()]).then(()=>{this.state=this.EState.ReadyForClaim,this.cdr.detectChanges()})}playClaimAnimation(){var e=this;return new Promise(function(){var i=f(function*(r,s){e.showShine=!0,e.cdr.detectChanges(),e.tweenFactory.createAnimationTween(e.containerWrapper.nativeElement,"level-up-rewards-container-wrapper__claim-animation").play().catch(c=>{s(c)}),e.shineComponent.animationIteration.pipe(Qi(1),mi(e.destroyRef)).subscribe(()=>{e.playCanvasAnimation().then(()=>{r()}),e.showShine=!1,e.cdr.detectChanges()})});return function(r,s){return i.apply(this,arguments)}}())}playCanvasAnimation(){const e=this.rewards.items.map(i=>dr.checkItem(i));if(e.length>0){const i=dr.buildBoundingRect(this.containerWrapper.nativeElement);return this.walletAnimationsService.playAnimations(e,i)}return Promise.resolve()}playFadeOutAnimation(){var e=this;return f(function*(){const i=e.tweenFactory.createAnimationTween(e.containerWrapper.nativeElement,"fade-out-animation"),r=e.tweenFactory.createAnimationTween(e.container.nativeElement,"fade-out-animation");return yield Promise.all([i.play(),r.play()]),e.state=e.EState.Claimed,e.cdr.detectChanges(),e.playIconClaimedAnimation()})()}playIconClaimedAnimation(){return this.tweenFactory.createAnimationTween(this.iconRef.nativeElement,"claimed-animation").play()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(Fc),g(tw),g(br))},t.\u0275cmp=pe({type:t,selectors:[["level-up-rewards-container"]],viewQuery:function(e,i){if(1&e&&($e(wYt,7,$t),$e(TYt,5,$t),$e(PYt,5,$t),$e(IYt,5,$t),$e(MYt,5,IM),$e(GIe,5,$t),$e(GIe,5,Zh)),2&e){let r;je(r=He())&&(i.containerWrapper=r.first),je(r=He())&&(i.container=r.first),je(r=He())&&(i.overlayContainerRef=r.first),je(r=He())&&(i.iconRef=r.first),je(r=He())&&(i.shineComponent=r.first),je(r=He())&&(i.itemComponentsRef=r),je(r=He())&&(i.itemComponents=r)}},inputs:{rewards:"rewards",state:"state"},decls:11,vars:23,consts:[[1,"level-up-rewards-container--wrapper",3,"ngClass"],["containerWrapper",""],[1,"level-up-rewards--container",3,"ngClass"],["container",""],["class","level-up-rewards__item",3,"item","showBling","stylePreset",4,"ngFor","ngForOf","ngForTrackBy"],["class","level-up-rewards-container--overlay",4,"ngIf"],[1,"level-up-rewards-icon--wrapper",3,"ngClass"],["icon",""],[1,"level-up-rewards-icon--wrapper-secondary",3,"ngClass"],[1,"level-up-rewards-icon",3,"ngClass","icon"],["class","level-up-rewards-container__shine",3,"startDelayMs","shineAnimationType",4,"ngIf"],[1,"level-up-rewards__item",3,"item","showBling","stylePreset"],["itemComponent",""],[1,"level-up-rewards-container--overlay"],["overlay",""],[1,"level-up-rewards-container__shine",3,"startDelayMs","shineAnimationType"],["shine",""]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"div",2,3),U(4,OYt,2,3,"item-component",4),m(),U(5,EYt,2,0,"div",5),p(6,"div",6,7)(8,"div",8),B(9,"icon-component",9),m()(),U(10,xYt,2,2,"shine-component",10),m()),2&e&&(l("ngClass",cn(10,AYt,i.state===i.EState.Claimed,i.state===i.EState.ReadyForClaim)),d(2),l("ngClass",ne(13,RYt,i.state===i.EState.ReadyForClaim)),d(2),l("ngForOf",i.rewards.items)("ngForTrackBy",i.trackByReward),d(),l("ngIf",i.state===i.EState.Locked),d(),l("ngClass",ne(15,kYt,i.state===i.EState.ReadyForClaim||i.state===i.EState.Unlocked)),d(2),l("ngClass",cn(17,VIe,i.state===i.EState.Locked,i.state===i.EState.Claimed)),d(),l("ngClass",cn(20,VIe,i.state===i.EState.Locked,i.state===i.EState.Claimed))("icon",i.state===i.EState.Claimed?i.EIcons.TICK_ICON:i.EIcons.LOCKER),d(),l("ngIf",i.showShine))},dependencies:[Xe,Mt,Ne,Zh,Dn,IM],styles:[".level-up-rewards--container[_ngcontent-%COMP%], .level-up-rewards-container--overlay[_ngcontent-%COMP%]{width:100%;height:100%}.level-up-rewards__item[_ngcontent-%COMP%]{max-width:50%;flex:1}.level-up-rewards-container__shine[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;top:0;left:0}.level-up-rewards-icon.lock[_ngcontent-%COMP%]{width:22px;height:22px}@media screen and (max-width: 440px){.level-up-rewards-icon.lock[_ngcontent-%COMP%]{width:20px;height:20px}}@media screen and (max-width: 380px){.level-up-rewards-icon.lock[_ngcontent-%COMP%]{width:18px;height:18px}}.level-up-rewards-icon.claimed[_ngcontent-%COMP%]{width:30px;height:30px}@media screen and (max-width: 440px){.level-up-rewards-icon.claimed[_ngcontent-%COMP%]{width:27px;height:27px}}@media screen and (max-width: 380px){.level-up-rewards-icon.claimed[_ngcontent-%COMP%]{width:25px;height:25px}}"],changeDetection:0}),n})();var m1=function(t){return t.Bronze="bronze",t.Silver="silver",t.Gold="gold",t.Diamond="diamond",t.Amethyst="amethyst",t}(m1||{});const LYt=["levelUpRewardsImgWrapper"],DYt=["claimBorder"];function BYt(t,n){1&t&&B(0,"img",5,6),2&t&&l("src",_().claimBorderImg,Wn)}const NYt=t=>({"level-up-rewards-img__overlay":t});let zD=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.renderer=e,this.pixiAppFactory=i,this.cdr=r,this.soundService=s,this.urlService=a,this.tweenFactory=c,this.pixiLoader=u,this.EState=rm.EState}ngOnInit(){const e=this.getTier();this.levelImgUrl=this.urlService.getImageUrl("level-up-rewards-icons/badges/".concat(e,".png")),this.underLevelImg=this.urlService.getImageUrl("level-up-rewards-icons/under/".concat(e,".png")),this.claimBorderImg=this.urlService.getImageUrl("level-up-rewards-icons/claim-borders/".concat(e,".png")),this.cdr.detectChanges()}getTier(){return this.level<=20?m1.Bronze:this.level<=40?m1.Silver:this.level<=60?m1.Gold:this.level<=80?m1.Diamond:m1.Amethyst}unlockAnimation(){var e=this;return f(function*(){yield e.tweenFactory.createTransitionTween(e.levelUpRewardsImgWrapperRef.nativeElement,"level-up-rewards-img--animation").play(),e.cdr.detectChanges()})()}addClaimBorder(){this.state=this.EState.ReadyForClaim,this.cdr.detectChanges()}playLevelUpAnimation(){return this.addClaimBorder(),this.tweenFactory.createAnimationTween(this.levelUpRewardsImgWrapperRef.nativeElement,"level-up-rewards-img-wrapper-scale").play()}playClaimAnimation(){return this.tweenFactory.createAnimationTween(this.levelUpRewardsImgWrapperRef.nativeElement,"claim-animation").play()}fadeOutClaimBorder(){var e=this;return f(function*(){yield e.tweenFactory.createAnimationTween(e.claimBorderRef.nativeElement,"fade-out-animation").play(),e.state=e.EState.Claimed,e.cdr.detectChanges()})()}createParticle(e,i){const r=new PixiClient.Sprite(this.pixiLoader.resources["white-particle"].texture);return r.anchor.set(.5),r.visible=!1,r.tint=i,r.position.set(e.x,e.y),r}playParticleExplosionAnimation(){var e=this;return f(function*(){e.pixiApp=e.pixiAppFactory.getApp({height:200,width:200,sharedTicker:!0,transparent:!0});const i=new PixiClient.particles.ParticleContainer(2e3,{tint:!0});e.renderer.addClass(e.pixiApp.canvas,"particle-animation-canvas"),e.renderer.appendChild(e.levelUpRewardsImgWrapperRef.nativeElement,e.pixiApp.canvas),e.pixiApp.app.stage.addChild(i);const s=[],a=[],c=e.pixiApp.canvas.height/2,u=e.pixiApp.canvas.width/2;for(let h=0;h<610;h++){const b=e.createParticle({x:c,y:u},16745728),w=e.createParticle({x:c,y:u},1048575);s.push(b),a.push(w)}i.addChild(...s,...a),e.pixiApp.app.ticker.start(),yield e.animate(s,a),e.pixiApp.app.ticker.stop(),e.pixiApp.app.stage.removeChildren(),e.renderer.removeChild(e.levelUpRewardsImgWrapperRef.nativeElement,e.pixiApp.canvas),e.pixiApp.destroy()})()}animate(e,i){return this.soundService.play(dn.AchievementEarned),this.createExplosion({sprites:e,duration:1,delay:.2,ease:"power2.out"}),this.fadeOut({sprites:e,duration:.4,delay:.7}),this.createExplosion({sprites:i,duration:1,delay:.4,ease:"power3.out"}),this.fadeOut({sprites:i,duration:.6,delay:.7})}fadeOut(e){return new Promise(i=>{let r=0;e.sprites.forEach(s=>{Zr.to(s,{alpha:0,duration:e.duration,delay:e.delay,onComplete:()=>{++r===e.sprites.length&&i()}})})})}createExplosion(e){let a=0;for(let c=1;c<41;c++){const u=1.875*c,h=c<20?c:20;this.animateParticle({sprites:e.sprites.slice(a,a+h),delay:e.delay,duration:e.duration,ease:e.ease},u),a+=h}}animateParticle(e,i){for(let r=0;r<e.sprites.length;r++){const s=e.sprites[r],a=i*Math.cos(2*Math.PI*r/e.sprites.length),c=i*Math.sin(2*Math.PI*r/e.sprites.length),u=s.x+a-(0,ie.randomFloat)(3*-s.width,3*s.width),h=s.y+c+(0,ie.randomFloat)(3*-s.width,3*s.width),b=Zr.timeline();Zr.set(s,{visible:!0,delay:.1,alpha:1}),b.to(s,{x:u,y:h,duration:e.duration,delay:e.delay,ease:e.ease}).to(s.scale,{x:0,y:0,duration:.3},"-=0.5")}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ji),g(Bw),g(Re),g(Mo),g(Qm),g(tw),g(j_))},t.\u0275cmp=pe({type:t,selectors:[["level-up-rewards-img"]],viewQuery:function(e,i){if(1&e&&($e(LYt,5,$t),$e(DYt,5,$t)),2&e){let r;je(r=He())&&(i.levelUpRewardsImgWrapperRef=r.first),je(r=He())&&(i.claimBorderRef=r.first)}},inputs:{level:"level",state:"state"},decls:8,vars:16,consts:[[1,"level-up-rewards-img--wrapper",3,"ngClass"],["levelUpRewardsImgWrapper",""],["alt","",3,"src"],["class","level-up-rewards-img__claim-border","alt","",3,"src",4,"ngIf"],[1,"level-up-rewards__readyForClaim-border"],["alt","",1,"level-up-rewards-img__claim-border",3,"src"],["claimBorder",""]],template:function(e,i){1&e&&(p(0,"div",0,1),B(2,"img",2)(3,"img",2),U(4,BYt,2,1,"img",3),p(5,"span"),H(6),m(),B(7,"div",4),m()),2&e&&(l("ngClass",ne(14,NYt,i.state===i.EState.Locked)),d(2),ni("level-up-rewards-img__under-level level-up-rewards--under-",i.getTier(),""),l("src",i.underLevelImg,Wn),d(),ni("level-up-rewards-img level-up-rewards--img-",i.getTier(),""),l("src",i.levelImgUrl,Wn),d(),l("ngIf",i.state===i.EState.ReadyForClaim),d(),ni("level-up-rewards-img__level level-up-rewards--level-",i.getTier(),""),d(),se(i.level))},dependencies:[Xe,Ne],styles:[".level-up-rewards-img--wrapper[_ngcontent-%COMP%]{width:inherit;height:inherit}.level-up-rewards-img--overlay[_ngcontent-%COMP%]{width:100%;height:100%}.level-up-rewards-img__under-level[_ngcontent-%COMP%]{width:104%;height:104%}.level-up-rewards-img__claim-border[_ngcontent-%COMP%]{width:118%;height:119%}.level-up-rewards-img[_ngcontent-%COMP%]{width:100%;height:100%}.level-up-rewards--under-silver[_ngcontent-%COMP%]{width:105%;height:106%}"],changeDetection:0}),n})();const zIe=["levelUpRewardsContainer"],FYt=["levelUpRewardsImg"],UYt=["dot"],GYt=t=>({overlay:t});let f1=(()=>{var t;class n{constructor(e){this.cdr=e,this.EState=rm.EState}playClaimAnimation(){var e=this;return f(function*(){return yield Promise.all([e.levelUpRewardsImgComponent.playClaimAnimation(),e.levelUpRewardsContainerComponent.playClaimAnimation()]),Promise.all([e.levelUpRewardsImgComponent.fadeOutClaimBorder(),e.levelUpRewardsContainerComponent.playFadeOutAnimation()]).then(()=>{e.state=e.EState.Claimed,e.cdr.detectChanges()})})()}playLevelUpAnimation(){return Promise.all([this.levelUpRewardsImgComponent.playLevelUpAnimation(),this.levelUpRewardsContainerComponent.playLevelUpAnimation(),this.levelUpRewardsImgComponent.playParticleExplosionAnimation()]).then(()=>{this.state=this.EState.ReadyForClaim,this.cdr.detectChanges()})}unlockReward(){return this.dotRef.nativeElement.classList.add("animate"),Promise.all([this.levelUpRewardsImgComponent.unlockAnimation(),this.levelUpRewardsContainerComponent.playUnlockAnimation()]).then(()=>{this.state=this.EState.Unlocked,this.cdr.detectChanges()})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re))},t.\u0275cmp=pe({type:t,selectors:[["level-rewards"]],viewQuery:function(e,i){if(1&e&&($e(zIe,5,$t),$e(zIe,5,VD),$e(FYt,5,zD),$e(UYt,5,$t)),2&e){let r;je(r=He())&&(i.levelRewardsContainerRef=r.first),je(r=He())&&(i.levelUpRewardsContainerComponent=r.first),je(r=He())&&(i.levelUpRewardsImgComponent=r.first),je(r=He())&&(i.dotRef=r.first)}},inputs:{levelRewards:"levelRewards",state:"state"},decls:8,vars:7,consts:[[1,"level-rewards--wrapper"],["levelRewardsWrapper",""],[1,"level-rewards__level-up-rewards-img",3,"level","state"],["levelUpRewardsImg",""],[1,"level-rewards-dot",3,"ngClass"],["dot",""],[1,"level-rewards__level-up-rewards-container",3,"rewards","state"],["levelUpRewardsContainer",""]],template:function(e,i){1&e&&(p(0,"div",0,1),B(2,"level-up-rewards-img",2,3)(4,"div",4,5)(6,"level-up-rewards-container",6,7),m()),2&e&&(d(2),l("level",i.levelRewards.level)("state",i.state),d(2),l("ngClass",ne(5,GYt,i.state===i.EState.Locked)),d(2),l("rewards",i.levelRewards)("state",i.state))},styles:[".level-rewards--wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;justify-content:space-between}.level-rewards-dot[_ngcontent-%COMP%]{width:8px;height:8px}.level-rewards__level-up-rewards-container[_ngcontent-%COMP%]{flex:2;max-width:26rem;position:relative}.level-rewards__level-up-rewards-img[_ngcontent-%COMP%]{flex:1;max-width:10.7rem}"],changeDetection:0}),n})();const VYt=["progressBar"],zYt=["progressBarWrapper"];let TO=(()=>{var t;class n{constructor(e){this.tweenFactory=e,this.userExperiencePercent=0}ngOnInit(){this.userExperiencePercent=RA.getUserExperiencePercent(this.previousLevelAtExperience,this.userExperience,this.nextLevelAtExperience)}playLevelUpAnimation(e,i){if(!i)return Promise.resolve();this.returnProgressBarToPreviousReward(i);const r=this.getElementDiff(e.nativeElement);return this.tweenFactory.createTransitionTween(this.progressBarRef.nativeElement,"level-up-progress-bar-transition",{transform:"translate(-50%, calc(100% - ".concat(r,"px))")}).play()}returnProgressBarToPreviousReward(e){const i=this.getElementDiff(e.nativeElement);this.transformProgressBar(i)}animateProgress(e,i,r){const s=this.getElementDiff(i.nativeElement),u=s+(this.getElementDiff(e.nativeElement)-s)*(this.userExperiencePercent/100);return r&&0!==this.userExperiencePercent?this.tweenFactory.createTransitionTween(this.progressBarRef.nativeElement,"level-up-progress-bar-transition",{transform:"translate(-50%, calc(100% - ".concat(u,"px))")}).play():(this.transformProgressBar(u),Promise.resolve())}getElementDiff(e){return this.progressBarRef.nativeElement.offsetHeight+this.progressBarWrapperRef.nativeElement.parentElement.offsetTop+Math.abs(this.progressBarRef.nativeElement.offsetTop)-e.offsetTop-e.offsetHeight/2}animateToElementWithoutTransition(e){const i=this.getElementDiff(e);this.transformProgressBar(i)}transformProgressBar(e){this.progressBarRef.nativeElement.style.transform="translate(-50%, calc(100% - ".concat(e,"px))")}}return(t=n).\u0275fac=function(e){return new(e||t)(g(tw))},t.\u0275cmp=pe({type:t,selectors:[["level-up-progress-bar"]],viewQuery:function(e,i){if(1&e&&($e(VYt,7,$t),$e(zYt,5,$t)),2&e){let r;je(r=He())&&(i.progressBarRef=r.first),je(r=He())&&(i.progressBarWrapperRef=r.first)}},inputs:{userExperience:"userExperience",nextLevelAtExperience:"nextLevelAtExperience",previousLevelAtExperience:"previousLevelAtExperience"},decls:6,vars:0,consts:[[1,"level-up-progress-bar--initial-wrapper"],["progressBarWrapper",""],[1,"level-up-progress-bar--secondary-wrapper"],[1,"level-up-progress-bar--container"],[1,"level-up-progress-bar"],["progressBar",""]],template:function(e,i){1&e&&(p(0,"div",0,1)(2,"div",2)(3,"div",3),B(4,"div",4,5),m()()())},styles:[".level-up-progress-bar--initial-wrapper[_ngcontent-%COMP%]{width:3rem;height:100%}.level-up-progress-bar--secondary-wrapper[_ngcontent-%COMP%]{width:calc(100% - 5px);height:100%;margin:0 auto}.level-up-progress-bar--container[_ngcontent-%COMP%]{width:65%;height:100%;margin:0 auto}.level-up-progress-bar[_ngcontent-%COMP%]{width:50%;height:100%}"],changeDetection:0}),n})();var jYt=ve.EButtonModifier;const HYt=["claimAllButton"],qYt=["levelUpProgressBar"],WYt=["levelUpProgressBarWrapper"],$Yt=["content"],KYt=["levelRewards"],ZYt=t=>({last:t});function QYt(t,n){if(1&t&&B(0,"level-rewards",10,11),2&t){const o=n.$implicit,e=n.last,i=_();l("id",o.level)("ngClass",ne(4,ZYt,e))("levelRewards",o)("state",i.getState(o.level))}}let rm=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h){this.scrollHelper=e,this.cdr=i,this.store=r,this.appStorage=s,this.rulerService=a,this.destroyRef=c,this.deviceService=u,this.appService=h,this.claimAll=new ke,this.readyForClaimRewards=!1,this.EButtonModifier=jYt,this.scrollListeners=[]}ngOnChanges(e){this.playingAnimation||this.setLevelUpRewardsState()}ngOnDestroy(){this.scrollListeners.forEach(e=>e())}ngOnInit(){var e;this.setLevelUpRewardsState();const i=this.appStorage.getItem("levelUpRewards-".concat(this.store.selectUserState().profile.id));this.lastWatchedLevel=null!=i&&i.lastWatchedLevel?Math.max(i.lastWatchedLevel,this.levelUpRewardsState.lastClaimedLevel):this.levelUpRewardsState.lastClaimedLevel,this.reversedRewards=new is.List([...this.levelUpRewardsState.levelUpRewards.rewards].reverse()),this.rewardsToDraw=new is.List(this.getFirstRewardsToDraw(this.reversedRewards,this.levelUpRewardsState.userLevel,this.lastWatchedLevel,this.levelUpRewardsState.lastClaimedLevel)),this.needToWatchLevelUpAnimation=this.checkNeedToWatchLevelUpAnimation(this.levelUpRewardsState.userLevel),this.levelUpRewardsState.userLevel=this.lastWatchedLevel,this.levelUpRewardsState.nextRewardLevel=null===(e=this.levelUpRewardsState.levelUpRewards.nextReward(this.levelUpRewardsState.userLevel))||void 0===e?void 0:e.level,this.cdr.detectChanges()}ngAfterViewInit(){var e=this;return f(function*(){try{(e.deviceService.browser===ha.SAFARI||e.appService.getPlatform()===Ut.Ios)&&(e.contentRef.nativeElement.style.transform="translateY(0)"),e.setProgressBarHeight(),e.rewardsForClaim=e.levelRewardsList.filter(i=>e.isRewardForClaim(i.levelRewards.level,e.userLevel)),e.scrollableContainer=cr.findScrollableContainer(e.levelRewardsRefList.first.nativeElement),e.needToWatchLevelUpAnimation?yield e.watchLevelUpAnimation():yield e.animateScrollToRewardAndProgressBar(),e.setProgressBarHeight(),e.rulerService.getAppSize().pipe(tr(1),mi(e.destroyRef)).subscribe(()=>{e.setProgressBarHeight(),e.animateUserProgress()})}catch(i){console.warn(i.message)}})()}setProgressBarHeight(){this.levelUpProgressBarWrapperRef.nativeElement.style.height="calc(100% - ".concat(this.levelRewardsRefList.last.nativeElement.offsetHeight/2,"px)"),this.levelUpProgressBarRef.nativeElement.style.height="calc(100% - ".concat(this.levelRewardsRefList.first.nativeElement.offsetHeight/2,"px)")}setLevelUpRewardsState(){var e;this.levelUpRewardsState={levelUpRewards:this.levelUpRewards,userLevel:this.userLevel,userExperience:this.userExperience,nextLevelAtExperience:this.nextLevelAtExperience,previousLevelAtExperience:this.previousLevelAtExperience,nextRewardLevel:this.nextRewardLevel,lastClaimedLevel:this.lastClaimedLevel},this.checkNeedToWatchLevelUpAnimation(this.userLevel)&&this.rewardsToDraw&&(this.levelUpRewardsState.userLevel=this.lastWatchedLevel,this.levelUpRewardsState.nextRewardLevel=null===(e=this.levelUpRewardsState.levelUpRewards.nextReward(this.levelUpRewardsState.userLevel))||void 0===e?void 0:e.level,this.rewardsForClaim=this.levelRewardsList.filter(i=>this.isRewardForClaim(i.levelRewards.level,this.userLevel)),this.watchLevelUpAnimation({scrollSmooth:!0})),this.cdr.detectChanges()}animateScrollToRewardAndProgressBar(){var e=this;return f(function*(){let i;return i=e.levelUpRewardsState.userLevel>=e.reversedRewards.first().level?e.levelRewardsRefList.find(r=>r.nativeElement.id==e.reversedRewards.first().level):new is.List(e.levelRewardsRefList.filter(r=>r.nativeElement.id>=e.levelUpRewardsState.nextRewardLevel)).last(),yield Promise.all([e.scrollHelper.nativeScrollIntoView(i.nativeElement,{block:"center"}),e.animateUserProgress()]),e.scrollHelper.disableScroll(e.scrollableContainer),e.rewardsForClaim.length>0&&(yield e.playClaimAllButtonAnimation(.5)),yield _u(0).toPromise(),e.rewardsToDraw=e.reversedRewards,e.cdr.detectChanges(),yield Promise.all([e.scrollHelper.nativeScrollIntoView(i.nativeElement,{block:"center"}),e.animateUserProgress()]).then(),e.scrollHelper.enableScroll(e.scrollableContainer),Promise.resolve()})()}watchLevelUpAnimation(e){var i=this;return f(function*(){i.playingAnimation=!0,i.rewardsToAnimate=new is.List(i.levelRewardsList.filter(s=>i.isRewardForAnimation(s.levelRewards.level,i.userLevel)).reverse()),yield i.startLevelUpAnimation(e),yield _u(0).toPromise(),i.rewardsToDraw=i.reversedRewards,i.cdr.detectChanges();const r=i.levelRewardsRefList.find(s=>s.nativeElement.id==i.rewardsToAnimate.last().levelRewards.level);return Promise.all([i.scrollHelper.nativeScrollIntoView(r.nativeElement,{block:"center"}),i.animateUserProgress()]).finally(()=>i.onAnimationEnd()).then()})()}isRewardForAnimation(e,i){return e>this.lastWatchedLevel&&e<=i}isRewardForClaim(e,i){return e>this.levelUpRewardsState.lastClaimedLevel&&e<=i}getFirstRewardsToDraw(e,i,r,s){const a=e.find(ee=>ee.level<=r),c=e.where(ee=>ee.level>s&&ee.level<=i),b=a?a.level:r,w=c.length>0?c.first().level:b,R=c.length>0?c.last().level:b,G=e.where(ee=>ee.level<R).toArray().slice(0,4),K=e.where(ee=>ee.level>w).toArray().slice(-4);let te;return te=c.length>0?[...K,...c,...G]:a?[...K,a,...G]:K,te}animateUserProgress(e){if(this.levelUpRewardsState.userLevel>=this.reversedRewards.first().level){const c=this.levelRewardsRefList.find(u=>u.nativeElement.id==this.levelUpRewardsState.userLevel);return this.progressBarComponent.animateToElementWithoutTransition(c.nativeElement),Promise.resolve()}if(this.levelUpRewardsState.userLevel<this.reversedRewards.last().level)return Promise.resolve();const i=this.levelUpRewardsState.levelUpRewards.nextReward(this.levelUpRewardsState.userLevel),r=this.levelRewardsRefList.find(c=>c.nativeElement.id==i.level),s=this.levelUpRewardsState.levelUpRewards.getCurrentReward(this.levelUpRewardsState.userLevel).level,a=this.levelRewardsRefList.find(c=>c.nativeElement.id==s);return this.progressBarComponent.animateProgress(r,a,null==e?void 0:e.transition)}trackByRewards(e,i){return i.level}playClaimAnimation(){var e=this;return f(function*(){try{e.playingAnimation=!0,e.scrollHelper.disableScroll(e.scrollableContainer),e.hideClaimAllButton();for(let i of e.rewardsForClaim.reverse()){const r=e.levelRewardsRefList.find(s=>s.nativeElement.id==i.levelRewards.level);yield e.scrollHelper.nativeScrollIntoView(r.nativeElement,{block:"center",behavior:"smooth",preventScroll:!0}),yield i.playClaimAnimation(),e.levelUpRewardsState.lastClaimedLevel=i.levelRewards.level,e.cdr.detectChanges()}e.rewardsForClaim=[],e.readyForClaimRewards=!1,e.cdr.detectChanges()}catch(i){console.warn(i.message)}finally{e.scrollHelper.enableScroll(e.scrollableContainer),e.onAnimationEnd()}})()}startLevelUpAnimation(e){var i=this;return f(function*(){if(i.scrollHelper.disableScroll(i.scrollableContainer),i.levelUpRewardsState.userLevel>i.reversedRewards.last().level){const s=i.levelUpRewardsState.levelUpRewards.previousReward(i.rewardsToAnimate.first().levelRewards.level),a=i.levelRewardsRefList.find(c=>c.nativeElement.id==s.level);i.progressBarComponent.returnProgressBarToPreviousReward(a)}const r=i.levelRewardsRefList.find(s=>s.nativeElement.id==i.levelUpRewardsState.nextRewardLevel).nativeElement;yield i.scrollHelper.nativeScrollIntoView(r,{block:"center",behavior:null!=e&&e.scrollSmooth?"smooth":"auto"}),yield _u(500).toPromise(),yield i.playLevelUpAnimation(),i.levelUpRewardsState.userLevel=i.userLevel,i.levelUpRewardsState.nextRewardLevel=i.nextRewardLevel,i.scrollHelper.enableScroll(i.scrollableContainer)})()}playLevelUpAnimation(){var e=this;return f(function*(){for(let r of e.rewardsToAnimate){var i;const s=e.levelRewardsRefList.find(u=>u.nativeElement.id==r.levelRewards.level);let a;if(s.nativeElement.id>e.reversedRewards.last().level){const u=e.levelUpRewardsState.levelUpRewards.previousReward(r.levelRewards.level).level;a=e.levelRewardsRefList.find(h=>h.nativeElement.id==u)}e.scrollHelper.nativeScrollIntoView(s.nativeElement,{block:"center",behavior:"smooth"}),yield e.progressBarComponent.playLevelUpAnimation(s,a),yield r.playLevelUpAnimation(),e.levelUpRewardsState.userLevel=r.levelRewards.level;const c=null===(i=e.levelUpRewardsState.levelUpRewards.nextReward(e.levelUpRewardsState.userLevel))||void 0===i?void 0:i.level;c&&(yield e.levelRewardsList.find(h=>h.levelRewards.level===c).unlockReward(),e.levelUpRewardsState.nextRewardLevel=c),e.rewardsToAnimate.last()===r&&!e.readyForClaimRewards&&(yield e.animateUserProgress({transition:!0}),yield e.playClaimAllButtonAnimation()),e.cdr.detectChanges(),e.appStorage.setItem("levelUpRewards-".concat(e.store.selectUserState().profile.id),{lastWatchedLevel:e.levelUpRewardsState.userLevel}),e.lastWatchedLevel=e.levelUpRewardsState.userLevel}})()}playClaimAllButtonAnimation(e=0){return new Promise(i=>{Zr.to(this.claimAllButton.nativeElement,{keyframes:{"0%":{transform:"translate(-50%, -50%) scale(0.9)"},"33%":{transform:"translate(-50%, -50%) scale(1.1)"},"66%":{transform:"translate(-50%, -50%) scale(0.9)"},"100%":{transform:"translate(-50%, -50%) scale(1)"}},visibility:"visible",duration:.4,delay:e,onComplete:()=>{this.readyForClaimRewards=!0,this.cdr.detectChanges(),i()}})})}hideClaimAllButton(){Zr.to(this.claimAllButton.nativeElement,{visibility:"hidden"})}showClaimAllButton(){Zr.to(this.claimAllButton.nativeElement,{visibility:"visible"})}onClick(){this.claimAll.emit()}checkNeedToWatchLevelUpAnimation(e){return e>this.lastWatchedLevel&&this.reversedRewards.toArray().some(i=>this.isRewardForAnimation(i.level,e))}onAnimationEnd(){this.playingAnimation=!1,this.setLevelUpRewardsState()}getState(e){return this.levelUpRewardsState.nextRewardLevel<e?n.EState.Locked:this.levelUpRewardsState.lastClaimedLevel>=e?n.EState.Claimed:this.levelUpRewardsState.lastClaimedLevel<e&&this.levelUpRewardsState.userLevel>=e?n.EState.ReadyForClaim:n.EState.Unlocked}}return(t=n).\u0275fac=function(e){return new(e||t)(g(cr),g(Re),g(J),g(Ci),g(Ua),g(br),g(Kl),g(Qt))},t.\u0275cmp=pe({type:t,selectors:[["level-up-rewards"]],viewQuery:function(e,i){if(1&e&&($e(TO,5,TO),$e(HYt,5,$t),$e(qYt,5,$t),$e(WYt,5,$t),$e($Yt,5,$t),$e(f1,5,f1),$e(KYt,5,$t)),2&e){let r;je(r=He())&&(i.progressBarComponent=r.first),je(r=He())&&(i.claimAllButton=r.first),je(r=He())&&(i.levelUpProgressBarRef=r.first),je(r=He())&&(i.levelUpProgressBarWrapperRef=r.first),je(r=He())&&(i.contentRef=r.first),je(r=He())&&(i.levelRewardsList=r),je(r=He())&&(i.levelRewardsRefList=r)}},inputs:{levelUpRewards:"levelUpRewards",userLevel:"userLevel",userExperience:"userExperience",nextLevelAtExperience:"nextLevelAtExperience",previousLevelAtExperience:"previousLevelAtExperience",nextRewardLevel:"nextRewardLevel",lastClaimedLevel:"lastClaimedLevel"},outputs:{claimAll:"claimAll"},features:[it],decls:12,vars:11,consts:[[1,"level-up-rewards--wrapper"],["content",""],[1,"level-up-progress-bar__wrapper"],["levelUpProgressBarWrapper",""],[1,"level-up-rewards-progress-bar",3,"nextLevelAtExperience","userExperience","previousLevelAtExperience"],["levelUpProgressBar",""],["class","level-up-rewards__level-rewards",3,"id","ngClass","levelRewards","state",4,"ngFor","ngForOf","ngForTrackBy"],[1,"free-rewards__claim-all",3,"bclass","buttonModifier","loading","click"],["claimAllButton",""],[1,"free-rewards__claim-all-text"],[1,"level-up-rewards__level-rewards",3,"id","ngClass","levelRewards","state"],["levelRewards",""]],template:function(e,i){1&e&&(p(0,"section",0,1)(2,"div",2,3),B(4,"level-up-progress-bar",4,5),m(),U(6,QYt,2,6,"level-rewards",6),m(),p(7,"button-text",7,8),Y("click",function(){return i.onClick()}),p(9,"span",9),H(10),V(11,"translate"),m()()),2&e&&(d(4),l("nextLevelAtExperience",i.nextLevelAtExperience)("userExperience",i.userExperience)("previousLevelAtExperience",i.previousLevelAtExperience),d(2),l("ngForOf",i.rewardsToDraw)("ngForTrackBy",i.trackByRewards),d(),l("bclass","free-rewards__claim-all--bclass")("buttonModifier",i.EButtonModifier.BUTTON_BONUSES)("loading",i.levelUpRewards.actions.claim.inProgress),d(3),se($(11,9,"TEXT.CLAIM_ALL")))},styles:[".level-up-rewards--wrapper[_ngcontent-%COMP%]{width:100%;position:relative}.level-up-rewards-progress-bar[_ngcontent-%COMP%]{height:calc(100% - 133px);position:absolute;bottom:0}.free-rewards__claim-all[_ngcontent-%COMP%]{width:70%;height:5rem}.level-up-rewards__level-rewards[_ngcontent-%COMP%]{display:block}.level-up-rewards__level-rewards.last[_ngcontent-%COMP%]{margin-bottom:10rem}.level-up-progress-bar__wrapper[_ngcontent-%COMP%]{width:calc(33% - 11px);max-width:10.7rem;height:100%;position:absolute;display:flex;align-items:center;justify-content:center}@media screen and (max-width: 320px){.free-rewards__claim-all[_ngcontent-%COMP%]{height:4.2rem}}"],changeDetection:0}),n})();function YYt(t,n){if(1&t){const o=Ce();p(0,"level-up-rewards",3),Y("claimAll",function(){return oe(o),re(_().claimAllRewards())}),m()}if(2&t){const o=_();l("levelUpRewards",o.levelUpRewards)("userLevel",o.userLevel)("nextRewardLevel",o.nextRewardLevel)("lastClaimedLevel",o.lastClaimedLevel)("userExperience",o.userExperience)("nextLevelAtExperience",o.nextLevelAtExperience)("previousLevelAtExperience",o.previousLevelAtExperience)}}function JYt(t,n){1&t&&B(0,"loader-image",4),2&t&&l("transparentBG",!0)}!function(t){let n;var o;(o=n=t.EState||(t.EState={})).Claimed="claimed",o.Locked="lock",o.Unlocked="unlocked",o.ReadyForClaim="readyForClaim"}(rm||(rm={}));const XYt=t=>({textKey:t}),eJt=t=>[t];function tJt(t,n){if(1&t&&B(0,"empty-content",5),2&t){const o=_();l("textArray",ne(3,eJt,ne(1,XYt,o.error)))}}let nW=(()=>{var t;class n{constructor(e,i,r,s,a,c,u){this.store=e,this.destroyRef=i,this.cdr=r,this.bonusesService=s,this.toastService=a,this.deltaDNA=c,this.brazeEngagementService=u,this.playingAnimation=!1}ngOnInit(){var e=this;return f(function*(){try{e.deltaDNA.levelUpRewardsOpenedEngage(),e.brazeEngagementService.levelUpRewardsOpenedEngage(),e.xpTable=yield e.bonusesService.getXpTable(),e.store.bonuses.levelUpRewards.subscribeState().pipe(mi(e.destroyRef)).subscribe(i=>{e.levelUpRewards=i,e.playingAnimation||e.updateState(i),e.cdr.detectChanges()})}catch(i){e.error=i instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG",e.cdr.detectChanges()}})()}updateState(e){var i,r;const s=this.store.selectUserState();this.userLevel=s.profile.level,this.userExperience=s.xp.currentXp,this.lastClaimedLevel=e.reward.level,this.nextRewardLevel=null===(i=this.levelUpRewards.nextReward(this.userLevel))||void 0===i?void 0:i.level,this.currentRewardLevel=null===(r=this.levelUpRewards.getCurrentReward(this.userLevel))||void 0===r?void 0:r.level,this.nextRewardLevel&&(this.nextLevelAtExperience=this.xpTable[this.nextRewardLevel-1]),this.currentRewardLevel&&(this.previousLevelAtExperience=this.xpTable[this.currentRewardLevel-1]),this.cdr.detectChanges()}claimAllRewards(){var e=this;return f(function*(){try{e.playingAnimation=!0,yield e.bonusesService.claimLevelUpRewards(),yield e.levelUpRewardsComponent.playClaimAnimation()}catch(i){let r;r=i instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG",e.toastService.error(r)}finally{e.playingAnimation=!1,e.updateState(e.levelUpRewards)}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(br),g(Re),g(Iu),g(Dt),g(sl),g(cl))},t.\u0275cmp=pe({type:t,selectors:[["level-up-rewards-smart-component"]],viewQuery:function(e,i){if(1&e&&$e(rm,5,rm),2&e){let r;je(r=He())&&(i.levelUpRewardsComponent=r.first)}},decls:3,vars:3,consts:[["class","level-up-rewards--content",3,"levelUpRewards","userLevel","nextRewardLevel","lastClaimedLevel","userExperience","nextLevelAtExperience","previousLevelAtExperience","claimAll",4,"ngIf"],[3,"transparentBG",4,"ngIf"],[3,"textArray",4,"ngIf"],[1,"level-up-rewards--content",3,"levelUpRewards","userLevel","nextRewardLevel","lastClaimedLevel","userExperience","nextLevelAtExperience","previousLevelAtExperience","claimAll"],[3,"transparentBG"],[3,"textArray"]],template:function(e,i){1&e&&U(0,YYt,1,7,"level-up-rewards",0)(1,JYt,1,1,"loader-image",1)(2,tJt,1,5,"empty-content",2),2&e&&(l("ngIf",i.xpTable),d(),l("ngIf",!i.xpTable),d(),l("ngIf",i.error))},dependencies:[Ne,bo,Oi,rm],styles:[".level-up-rewards--content[_ngcontent-%COMP%]{width:100%;height:100%;display:block}.level-up-rewards--overlay[_ngcontent-%COMP%]{height:100%;width:100%;position:absolute}"],changeDetection:0}),n})();const nJt=[xi,Yi,Io,No];let jIe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[nJt]}),n})();Wu(rm,[Xe,Mt,pn,TO,f1],[qe]),Wu(f1,[Xe,zD,VD],[]);const HIe="registerBonus",iW=Ts(HIe),iJt=We(iW,t=>{var n;return!(null===(n=t.model)||void 0===n||null===(n=n.registrationAdventBonusModel)||void 0===n||!n.isReady)});J.prototype.registerBonus={selectRegisterBonusState:function oJt(){return this.selectSync(iW)}.bind(J.prototype),subscribeRegisterBonusState:function rJt(){return this.select(iW)}.bind(J.prototype),subscribeIsReadyForClaim:function sJt(){return this.select(iJt)}.bind(J.prototype)};var Lv=function(t){return t.GetRegisterBonus="[Register Bonus] Get Register Bonus",t.GetRegisterBonusSuccess="[Register Bonus] Get Register Bonus Success",t.GetRegisterBonusError="[Register Bonus] Get Register Bonus Error",t.ClaimRegisterBonus="[Register Bonus] Claim Register Bonus",t.ClaimRegisterBonusSuccess="[Register Bonus] Claim Register Bonus Success",t.ClaimRegisterBonusError="[Register Bonus] Claim Register Bonus Error",t.ResetRegisterBonusState="[Register Bonus] Reset Register Bonus State",t}(Lv||{});const qIe=he(Lv.ClaimRegisterBonus),WIe=he(Lv.ClaimRegisterBonusSuccess,{_as:"props",_p:void 0}),$Ie=he(Lv.ClaimRegisterBonusError,{_as:"props",_p:void 0}),KIe=he(Lv.GetRegisterBonus),ZIe=he(Lv.GetRegisterBonusSuccess,{_as:"props",_p:void 0}),QIe=he(Lv.GetRegisterBonusError,{_as:"props",_p:void 0}),YIe=he(Lv.ResetRegisterBonusState),JIe=new $p,aJt=Sr(JIe,de(Ik,(t,n)=>Se(t,o=>{o.model=n.registerBonus,o.loadingState.isLoaded=!0,o.loadingState.isLoading=!1,o.loadingState.error=void 0})),de(Mk,(t,n)=>n.bonuses.registrationAdventBonus?Se(t,o=>{o.model=n.bonuses.registrationAdventBonus,o.loadingState.isLoaded=!0,o.loadingState.isLoading=!1,o.loadingState.error=void 0}):t),de(KIe,t=>Se(t,n=>{n.loadingState.isLoading=!0})),de(ZIe,(t,n)=>t.model.registrationAdventBonusModel?Se(t,o=>{o.model=n.bonus,o.loadingState.isLoaded=!0,o.loadingState.isLoading=!1,o.loadingState.error=void 0}):t),de(QIe,(t,n)=>t.model.registrationAdventBonusModel?Se(t,o=>{o.loadingState.error=n.error,o.loadingState.isLoading=!1}):t),de(qIe,t=>Se(t,n=>{n.actions.claim.inProgress=!0})),de(WIe,(t,n)=>t.model.registrationAdventBonusModel?Se(t,o=>{o.model.registrationAdventBonusModel={...o.model.registrationAdventBonusModel,...n.claimResult.currentBonusState},o.model.registrationAdventBonusModel.isReady=!1,o.actions.claim.inProgress=!1,o.actions.claim.error=void 0}):t),de($Ie,(t,n)=>t.model.registrationAdventBonusModel?Se(t,o=>{o.actions.claim.inProgress=!1,o.actions.claim.error=n.error}):t),de(YIe,()=>JIe));function cJt(t,n){return aJt(t,n)}let oW=(()=>{var t;class n{constructor(e){this.http=e}getRegisterBonus(){return this.http.get("bonus/registrationAdventBonus").toPromise().then(e=>e.body)}claimReward(){return this.http.post("bonus/registrationAdventBonus/claim").toPromise().then(e=>e.body)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),rW=(()=>{var t;let n=((t=class{constructor(e,i){this.clientService=e,this.store=i,this.logoutSubject=new sn}getRegisterBonus(){const e=this.store.registerBonus.selectRegisterBonusState().loadingState;(!e.isLoaded||e.error)&&this.refreshBonus()}claimReward(){var e=this;return f(function*(){try{e.store.dispatch(qIe());const i=yield e.clientService.claimReward();return e.store.dispatch(WIe({claimResult:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch($Ie({error:r})),r}})()}refreshBonus(){var e=this;return f(function*(){try{e.store.dispatch(KIe());const i=yield e.clientService.getRegisterBonus();return e.store.dispatch(ZIe({bonus:i})),i}catch(i){const r=jt.createErrorInstance(i);throw e.store.dispatch(QIe({error:r})),r}})()}init(){this.store.registerBonus.subscribeRegisterBonusState().pipe(bt(e=>{var i;return(null===(i=e.model)||void 0===i?void 0:i.isActive)&&!e.isExpired()}),jn(e=>{let i;return i=!e.isCompleted()&&e.calcTimeToNextBonus()>0?Math.min(e.calcTimeToNextBonus()+5,e.getTimeToExpire()):e.getTimeToExpire(),i}),bt(e=>e>0),es(e=>_u(1e3*e)),wn(this.logoutSubject)).subscribe(()=>this.refreshBonus().catch(e=>console.warn(e)))}resetRegisterBonusState(){this.logoutSubject.next(),this.store.dispatch(YIe())}}).\u0275fac=function(e){return new(e||t)(T(oW),T(Jo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),t);return Qe([function(t,n,o){let e;const i=o.value;return o.value=function(...r){return e||(e=i.apply(this,r),e.finally(()=>e=void 0)),e},o},ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Promise)],n.prototype,"claimReward",null),Qe([function(t,n,o){let e;const i=o.value;return o.value=function(...r){return e||(e=i.apply(this,r),e.finally(()=>e=void 0)),e},o},ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",Promise)],n.prototype,"refreshBonus",null),Qe([vu(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"init",null),Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],n.prototype,"resetRegisterBonusState",null),n=Qe([Wo(),ue("design:paramtypes",[oW,Jo])],n),n})(),XIe=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(rW))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[rW,oW],imports:[_b.forFeature(HIe,cJt),kk]}),n})();const lJt=[No,xi,XIe];let uJt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[lJt]}),n})();function dJt(t,n){1&t&&B(0,"loader-image",1),2&t&&l("transparentBG",!0)}const pJt=t=>({textKey:t}),hJt=t=>[t];function mJt(t,n){if(1&t&&B(0,"empty-content",2),2&t){const o=_();l("textArray",ne(3,hJt,ne(1,pJt,o.getErrorText(o.state.loadingState.error))))}}function fJt(t,n){if(1&t&&(p(0,"div",7)(1,"item-label-component",8),B(2,"timer",9),m()()),2&t){const o=_(2);d(),l("customClass","register-bonus-daily-reward--timer-container"),d(),l("showLessThanTimeUnit",o.ETimeType.Minutes)("timerConfig",o.timerConfiguration)("milliseconds",1e3*o.state.getTimeToExpire())}}const gJt=t=>({"register-bonus-daily-reward-highlighted":t}),_Jt=t=>({isHighlighted:t});function vJt(t,n){if(1&t&&B(0,"daily-reward-component",10),2&t){const o=n.$implicit,e=_(2);l("id",e.createRewardElementId(o.day))("ngClass",ne(7,gJt,o.isHighlighted))("stylePreset",e.EStylePreset.RegisterAdvent)("rewardStyles",ne(9,_Jt,o.isHighlighted))("reward",o)("showBling",e.getRewardState(o)!==e.EDailyRewardState.Claimed)("state",e.getRewardState(o))}}function bJt(t,n){1&t&&(H(0),V(1,"translate")),2&t&&ze(" ",$(1,1,"BONUS.COLLECT")," ")}function CJt(t,n){if(1&t&&B(0,"timer",13),2&t){const o=_(3);l("showLessThanTimeUnit",o.ETimeType.Minutes)("milliseconds",1e3*o.state.calcTimeToNextBonus())}}function yJt(t,n){if(1&t){const o=Ce();p(0,"div",11)(1,"button-text",12),Y("onClick",function(){return oe(o),re(_(2).claim())}),U(2,bJt,2,3)(3,CJt,1,2),m()()}if(2&t){const o=_(2);d(),l("bclass","register-bonus-rewards-claim-button-bclass")("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION)("loading",o.state.actions.claim.inProgress)("disabled",!o.state.model.registrationAdventBonusModel.isReady),d(),Qo(2,o.state.model.registrationAdventBonusModel.isReady?2:3)}}const SJt=t=>({animate:t}),wJt=()=>({key:"SHOP.STAMP_CARD.CLAIMED"});function TJt(t,n){if(1&t&&B(0,"stamp-bordered-text",14),2&t){const o=_(2);l("ngClass",ne(2,SJt,o.shouldAnimateComplete))("text",pt(4,wJt))}}const PJt=t=>({completed:t});function IJt(t,n){if(1&t&&(U(0,fJt,3,4,"div",3),p(1,"div",4),U(2,vJt,1,11,"daily-reward-component",5),m(),U(3,yJt,4,5,"div",6)(4,TJt,1,5)),2&t){const o=_();Qo(0,o.state.isCompleted()?-1:0),d(),l("ngClass",ne(5,PJt,o.state.isCompleted())),d(),l("ngForOf",o.state.model.registrationAdventBonusModel.rewardConfig)("ngForTrackBy",o.trackByFn),d(),Qo(3,o.state.isCompleted()?4:3)}}let eMe=(()=>{var t;class n{constructor(e,i){this.scrollHelper=e,this.walletAnimationsService=i,this.claimReward=new ke,this.EButtonModifier=ve.EButtonModifier,this.EDailyRewardState=op,this.EStylePreset=xg.EStylePreset,this.EClaimState=bl,this.ETimeType=Rt,this.shouldAnimateComplete=!1}ngOnInit(){this.timerConfiguration=new yl(eg).useDaysConfig({period:Rt.Days,showTextPeriod:!0,timeFormat:qi.Normal,min:Rt.Hours}).useHoursConfig({period:Rt.Hours,showTextPeriod:!1,timeFormat:qi.Normal,min:Rt.Seconds,showDoubleDigits:!0,showNullValue:!0}).useMinutesConfig({period:Rt.Minutes,showTextPeriod:!1,timeFormat:qi.Normal,max:Rt.Hours,min:Rt.Seconds,showDoubleDigits:!0,showNullValue:!0}).build(),this.shouldAnimateComplete=!this.state.isCompleted()}ngAfterViewInit(){if(this.state.isCompleted()){const e=this.state.getRewardByDay(this.state.model.registrationAdventBonusModel.totalDays);this.scrollToReward(e.day)}else this.scrollToCurrentReward()}ngOnChanges(e){e.state&&e.state.previousValue&&e.state.currentValue&&e.state.previousValue.loadingState.isLoading&&!e.state.currentValue.loadingState.isLoading&&(cancelAnimationFrame(this.raf),this.raf=requestAnimationFrame(()=>{this.scrollToCurrentReward()}))}ngOnDestroy(){cancelAnimationFrame(this.raf)}claim(){this.claimReward.emit()}playClaimRewardAnimation(e){const i=this.state.getRewardByDay(e);if(!i)return Promise.resolve();const r=this.getElementByRewardDay(i.day);if(!r)return Promise.resolve();const s=dr.buildCurrencyTypesFromRewards(i.items?i:i.miniGame.reward);let a;return i.miniGame||(a=dr.buildBoundingRect(r.nativeElement)),this.walletAnimationsService.playAnimations(s,a)}scrollToCurrentReward(e="instant"){const i=this.state.getCurrentRewardForClaim();return i?this.scrollToReward(i.day,e):Promise.resolve()}scrollToReward(e,i="instant"){const r=this.getElementByRewardDay(e);return r?this.scrollHelper.nativeScrollIntoView(r.nativeElement,{behavior:i,block:"center",preventScroll:!0}):Promise.resolve()}trackByFn(e){return e}getRewardState(e){return this.state.model.registrationAdventBonusModel.daysCollected>e.day-1?op.Claimed:this.state.model.registrationAdventBonusModel.daysCollected===e.day-1?op.Current:op.Next}createRewardElementId(e){return"registerBonusRewardDay-".concat(e)}getElementByRewardDay(e){return this.dailyRewards.find(i=>i.nativeElement.id===this.createRewardElementId(e))}getErrorText(e){return e instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG"}}return(t=n).\u0275fac=function(e){return new(e||t)(g(cr),g(Fc))},t.\u0275cmp=pe({type:t,selectors:[["register-bonus-component"]],viewQuery:function(e,i){if(1&e&&$e(xg,5,$t),2&e){let r;je(r=He())&&(i.dailyRewards=r)}},hostAttrs:[1,"register-bonus--host"],inputs:{state:"state"},outputs:{claimReward:"claimReward"},features:[it],decls:3,vars:1,consts:[["class","register-bonus-loader",3,"transparentBG"],[1,"register-bonus-loader",3,"transparentBG"],[3,"textArray"],["class","register-bonus-timer-wrapper"],[1,"register-bonus-rewards",3,"ngClass"],["class","register-bonus-daily-reward",3,"id","ngClass","stylePreset","rewardStyles","reward","showBling","state",4,"ngFor","ngForOf","ngForTrackBy"],["class","register-bonus-rewards-footer"],[1,"register-bonus-timer-wrapper"],[1,"register-bonus-daily-reward--item-label",3,"customClass"],[1,"register-bonus__timer",3,"showLessThanTimeUnit","timerConfig","milliseconds"],[1,"register-bonus-daily-reward",3,"id","ngClass","stylePreset","rewardStyles","reward","showBling","state"],[1,"register-bonus-rewards-footer"],[1,"register-bonus-rewards-claim-button",3,"bclass","buttonModifier","loading","disabled","onClick"],[1,"register-bonus-rewards-claim-button-timer",3,"showLessThanTimeUnit","milliseconds"],[1,"register-bonus-rewards-stamp--completed",3,"ngClass","text"]],template:function(e,i){1&e&&U(0,dJt,1,1,"loader-image",0)(1,mJt,1,5)(2,IJt,5,7),2&e&&Qo(0,i.state.loadingState.isLoading?0:i.state.loadingState.error?1:i.state.loadingState.isLoaded?2:-1)},dependencies:[Xe,Mt,Fs,bo,pn,Oi,Ym,$L,xg,qe],styles:[".register-bonus-timer-wrapper[_ngcontent-%COMP%]{width:100%;padding-bottom:.5rem;display:flex;justify-content:center;align-items:center;height:4rem}.register-bonus-rewards[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;flex-flow:row wrap;position:relative;padding:1rem;max-height:calc(100% - 11rem);height:auto}@media screen and (max-width: 568px){.register-bonus-rewards[_ngcontent-%COMP%]{padding:1rem .5rem}}.register-bonus-rewards.completed[_ngcontent-%COMP%]{height:100%}.register-bonus-daily-reward[_ngcontent-%COMP%]{width:calc(33% - 1.5rem);font-size:1.6rem;height:15rem;flex-grow:1;margin:.75rem}.register-bonus-daily-reward.register-bonus-daily-reward-highlighted[_ngcontent-%COMP%]{width:97%;max-width:500px}@media screen and (max-width: 440px){.register-bonus-daily-reward[_ngcontent-%COMP%]{margin:.5rem}}.register-bonus-rewards-footer[_ngcontent-%COMP%]{height:7rem;display:flex;align-items:center;justify-content:center;padding:0 2rem;position:absolute;bottom:0;width:100%}.register-bonus-rewards-claim-button[_ngcontent-%COMP%]{margin:auto;height:4.5rem;width:100%}.register-bonus-rewards-stamp--completed[_ngcontent-%COMP%]{font-size:4.5rem!important;font-weight:700!important;left:50%;opacity:.7;top:50%;transform:rotate(-8deg) translate(-50%,-50%);z-index:3;padding:.5rem;position:absolute}.register-bonus-rewards-stamp--completed.animate[_ngcontent-%COMP%]{animation:.25s _ngcontent-%COMP%_add-completed ease forwards}@media screen and (max-width: 568px){.register-bonus-rewards-stamp--completed[_ngcontent-%COMP%]{font-size:3.5rem!important}}@keyframes _ngcontent-%COMP%_add-completed{0%{transform:rotate(-8deg) translate(-50%,-50%) scale(1.5)}to{transform:rotate(-8deg) translate(-50%,-50%) scale(1)}}"],changeDetection:0}),n})(),MJt=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.store=e,this.destroyRef=i,this.cdr=r,this.registerBonusService=s,this.toasterService=a,this.miniGamesBuilderFactory=c}ngOnInit(){this.registerBonusService.getRegisterBonus(),this.store.registerBonus.subscribeRegisterBonusState().pipe(mi(this.destroyRef)).subscribe(e=>{this.state=e,this.cdr.detectChanges()})}ngOnDestroy(){var e;null===(e=this.miniGame)||void 0===e||e.destroy()}claim(){const e=this.state.getCurrentRewardForClaim();e.miniGame?this.playMiniGameThenClaim(e.miniGame):this.claimReward()}claimReward(){var e=this;return f(function*(){try{const i=e.state.getCurrentDayForClaim();yield e.registerBonusService.claimReward(),yield e.registerBonusComponent.scrollToCurrentReward("smooth"),e.registerBonusComponent.playClaimRewardAnimation(i)}catch(i){console.error(i),e.toasterService.error(i instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG")}})()}playMiniGameThenClaim(e){var i=this;return f(function*(){i.miniGame=i.miniGamesBuilderFactory.createBuilder().withGameInfo(e).withDefaultDestroyConditions().withRetry().build(),Ju(i.miniGame.error,i.miniGame.close).pipe(Qi(1),mi(i.destroyRef)).subscribe(s=>i.miniGame.destroy()),i.miniGame.claim.pipe(Qi(1),mi(i.destroyRef)).subscribe(s=>i.claimReward()),i.miniGame.start()})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(br),g(Re),g(rW),g(Dt),g(dI))},t.\u0275cmp=pe({type:t,selectors:[["register-bonus-smart-component"]],viewQuery:function(e,i){if(1&e&&$e(eMe,7),2&e){let r;je(r=He())&&(i.registerBonusComponent=r.first)}},decls:1,vars:1,consts:[[3,"state","claimReward"]],template:function(e,i){1&e&&(p(0,"register-bonus-component",0),Y("claimReward",function(){return i.claim()}),m()),2&e&&l("state",i.state)},dependencies:[eMe],encapsulation:2,changeDetection:0}),n})();const OJt=[xi,Yi,Io,No,jIe,uJt];let tMe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[OJt]}),n})();Wu(Kp,[Mt,Ne,kl,dl,pn,Ji,Wi,fv,Oi,nW,MJt,qq,Wq,Kq,wO,Zq,Qq,Yq,Jq,Xq,eW,tW],[qe]);const EJt=[{path:"games",data:{redirectOptions:{skipRedirect:!0,relativeUrl:"games/",onlyLogged:!0}},canActivate:[jq],component:XCe,children:[{path:"",component:zq,canActivate:[Hq]},...RIe,...$Dt,...y5t,...BVt,...q0e,...NIe,...I6t,...Ywe,...B0e,...M4t,...$Qt]}],xJt=[kIe,wk,jq,Hq,eye],AJt=[txt,mH,Axt,Ls,CO,P5t,lVt,BPt,UVt,t6t,x6t,Jwe,J0,No,xi,Yi,Io,tMe];let RJt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...xJt],imports:[AJt]}),n})();const kJt=[{path:"games",data:{redirectOptions:{skipRedirect:!0,relativeUrl:"games/",onlyLogged:!0}},canActivate:[jq],children:[{path:"",component:zq,canActivate:[Hq]},...RIe,...KDt,...S5t,...q0e,...NIe,...M6t,...Ywe,...B0e,...NVt,...O4t]}],LJt=[{path:Ai,component:Uve,outlet:Fn,children:[{path:"",children:[...ove,...kJt,...vCe,...W_e,...rve,...Zae,...ave,...Vae,{path:"",redirectTo:"games",pathMatch:"full"},{path:"",children:[...tve,...jae],canActivate:[Q8]}]},{path:"**",redirectTo:"",pathMatch:"full"}]}];class DJt{constructor(){const n=this.getInitialState();for(let o in n)o&&(this[o]=n[o])}resetState(){return this.updateState(this.getInitialState()),this}updateState(n){for(let o in n)o&&(this[o]=n[o])}getInitialState(){return{drawerOpened:!1,showDeviceRotateHint:!1,preventBottomDrawerClose:!1,loaderVisible:!1,settingOpened:!1,lockedOrientation:void 0,hideMenuButtons:!1,selectedBackground:void 0}}}var NJt=wi.EOrientationMessageValue,nMe=pw.EResizeEvent,FJt=ve.EButtonModifier,UJt=ve.EIcons;const GJt=["bottomDrawerComponent"],VJt=["bettingGameMenuButtons"];function zJt(t,n){if(1&t&&(p(0,"div",10)(1,"div",11),B(2,"icon-component",12),p(3,"p",13),H(4),V(5,"translate"),m()()()),2&t){const o=_();d(2),l("icon",o.EIcons.ROTATE_DEVICE),d(2),se($(5,2,"GAME.ROTATE_DEVICE"))}}function jJt(t,n){1&t&&B(0,"loader-image",14)}const iMe=t=>({up:t}),oMe=t=>({name:t}),HJt=t=>({"drawer-shown":t});let rMe=(()=>{var t;class n extends DJt{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K){var te;super(),te=this,this.changeDetectorRef=e,this.autoDisconnectService=i,this.navigation=r,this.appService=s,this.popup=c,this.toaster=u,this.configService=h,this.buyCurrencyService=w,this.shopService=R,this.bettingGameService=G,this._activatedRoute=K,this.EIcons=UJt,this.buttonModifier=FJt,this.onBuyCurrency=function(){var ee=f(function*(le,me,ge){const Me=le.currency===Jt.EInGameBuyCurrency.Chips?ln.Chips:ln.Gems;try{const Ke=yield te.buyCurrencyService.getSpecialOffer(Me,le.amount);yield te.shopService.openItemPopup({item:Ke.item.item,receiverProfile:te.store.selectSimpleProfile(),store:Ke.store,options:{alwaysShowPreview:!0,title:{key:"HIDDEN_SHOP.SPECIAL_OFFER"}}}),me({amount:Ke.item.item.amount})}catch(Ke){console.log(Ke),Ke instanceof lt.NetworkError?(te.toaster.error("ERRORS.CONNECTION_ERROR"),ge({reason:Jt.EInGameBuyError.Error})):Ke instanceof Wp?ge({reason:Jt.EInGameBuyError.Cancelled}):(te.toaster.error("ERRORS.SOMETHING_WRONG"),ge({reason:Jt.EInGameBuyError.Error}))}});return function(le,me,ge){return ee.apply(this,arguments)}}(),this.onSettingChanged=ee=>{console.warn("Ingame setting changed",ee),this.bettingGameService.changeInGameSettings(ee)},this.onScreenOrientationChange=ee=>{this.checkScreenOrientation(ee.data)},this.onClick=ee=>{ee&&ee.target&&ee.target.tagName&&(-1!==ee.target.tagName.toLowerCase().indexOf("canvas")||"hintOverlay"===ee.target.id||"betting-game-wrapper"===ee.target.id)&&!this.preventBottomDrawerClose&&(this.closeDrawer(),this.gameMenuButtons.toggleButtons(!1),this.autoDisconnectService.restartDisconnectTimeout())},this.errorHandler=ee=>{this.bettingGameService.onGameException(ee)},this.onGameException=()=>{this.exceptionPopupId=this.popup.blocker({textParams:{translationKey:"GAME.GameException"},withRefreshButton:!0})},this.onGameLoadTimeout=()=>{this.gameTimeoutPopupId=this.popup.blocker({textParams:{translationKey:"GAME.GAME_LOAD_ERROR"},withRefreshButton:!0})},this.popup=c,this.store=a,this.constants=b,this.listeners=new ie.List,this.changeDetectorRef.detach()}ngOnInit(){this.init(),this.bettingGameService.startGame(this.gameId),this.changeDetectorRef.detectChanges()}ngOnDestroy(){console.warn("Betting game component onDestroy"),this.dispose()}init(){this.gameId=this._activatedRoute.snapshot.params.gameId,this.listeners.add(this.bettingGameService.subscribe(_i.GameException,this.onGameException)),this.listeners.add(this.bettingGameService.subscribe(_i.GameLoadTimeout,this.onGameLoadTimeout)),window.addEventListener("error",this.errorHandler),this.gameElement=window.document.getElementById(TP.domElementId),this.gameElement.addEventListener("touchstart",this.onClick);const e=this.configService.getGameRelatedConfig(this.gameId),i=this.bettingGameService.gameState===_o.Initial||this.bettingGameService.gameState===_o.LoadingResources;if(i){const r=this.bettingGameService.subscribe(_i.ClientGameStateChange,s=>{(s.current!==_o.LoadingResources||s.current!==_o.LoadingResources)&&(this.hideLoader(),r.detach())});this.listeners.add(r)}this.updateState({loaderVisible:i,selectedBackground:this.bettingGameService.getBackgroundUrl(e.gameConfig)}),this.setGameResizing(),this.listeners.add(this.bettingGameService.subscribeOnBuyCurrency(this.onBuyCurrency))}dispose(){this.listeners.forEach(e=>e.detach()),this.hideLoader(),this.closeLeavePopup(),this.closeGameExceptionPopup(),this.closeGameTimeoutPopup(),this.appService.isMobileApp()&&this.appService.getMobileAppService().setOrientation(NJt.Default),window.removeEventListener("error",this.errorHandler),this.gameResizeStrategy&&(this.gameResizeStrategy.removeEventListener(nMe.ScreenOrientationChange,this.onScreenOrientationChange),this.gameResizeStrategy.dispose()),void 0!==this.gameElement&&this.gameElement.removeEventListener("touchstart",this.onClick),clearTimeout(this.preventDrawerCloseTimeout),this.resetState()}clickHome(){this.closeDrawer(),this.gameMenuButtons.toggleButtons(!1),this.showLeavePopup()}openSettings(){this.bottomDrawerComponent.state===this.bottomDrawerComponent.drawerStateType.Opened?(this.closeDrawer(),this.gameMenuButtons.toggleButtons(!1)):(this.bottomDrawerComponent.open(),this.updateState({drawerOpened:!0,settingOpened:!0}),this.gameMenuButtons.menuButtonsOpened=!1,this.preventDrawerCloseTimeout=setTimeout(()=>{this.updateState({preventBottomDrawerClose:!1})},500))}closeDrawer(){var e;this.updateState({drawerOpened:!1,settingOpened:!1}),null===(e=this.bottomDrawerComponent)||void 0===e||e.close(),this.changeDetectorRef.detectChanges()}showLeavePopup(){this.closeLeavePopup(),this.leavePopupId=this.askLeaveConfirmation(()=>{try{this.showLoader(300),this.navigation.navigate([this.constants.defaultLoggedRoute])}catch(r){r instanceof et.StateError?this.toaster.warn("PLEASE_WAIT"):r instanceof lt.NetworkError?this.toaster.error("ERRORS.CONNECTION_ERROR"):this.toaster.warn("ERRORS.SOMETHING_WRONG"),console.warn("Caught error",r)}finally{this.hideLoader()}},()=>{this.closeLeavePopup()})}closeLeavePopup(){this.popup.hide(this.leavePopupId)}closeGameExceptionPopup(){this.popup.hide(this.exceptionPopupId)}closeGameTimeoutPopup(){this.popup.hide(this.gameTimeoutPopupId)}askLeaveConfirmation(e,i){return this.popup.confirm({buttons:{action:e,actionDecline:i},textParams:{translationKey:"GAME.LEAVE_GAME_WARNING"}})}setGameResizing(){const i=this.configService.getGameRelatedConfig(this.gameId).gameConfig.aspectRatio;if(i&&(i.portrait||i.landscape)&&(this.gameResizeStrategy=new JG(this.gameElement,i),i.hasOwnProperty("lockOrientation"))){const r=i.lockOrientation;(r===cs.Portrait||r===cs.Landscape)&&(this.updateState({lockedOrientation:r}),this.appService.isMobileApp()?this.appService.getMobileAppService().setOrientation(this.lockedOrientation):(this.checkScreenOrientation(this.gameResizeStrategy.getCurrentOrientation()),this.gameResizeStrategy.addEventListener(nMe.ScreenOrientationChange,this.onScreenOrientationChange)))}}checkScreenOrientation(e){this.gameMenuButtons.toggleButtons(!1),this.updateState(this.lockedOrientation!==e?{showDeviceRotateHint:!0}:{showDeviceRotateHint:!1})}updateState(e){super.updateState(e),this.changeDetectorRef.destroyed||this.changeDetectorRef.detectChanges()}showLoader(e=void 0){void 0!==e?this.leaveLoaderDelayId=setTimeout(()=>{this.updateState({loaderVisible:!0})},e):this.updateState({loaderVisible:!0})}hideLoader(){clearTimeout(this.leaveLoaderDelayId),this.updateState({loaderVisible:!1})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Re),g(h0),g(Yt),g(Qt),g(J),g(Cn),g(Dt),g(Zt),g(tn),g(fj),g(Jm),g(xse),g(Po))},t.\u0275cmp=pe({type:t,selectors:[["betting-game"]],viewQuery:function(e,i){if(1&e&&($e(GJt,5,Sv),$e(VJt,5,NM)),2&e){let r;je(r=He())&&(i.bottomDrawerComponent=r.first),je(r=He())&&(i.gameMenuButtons=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("betting-game",o),deps:[[new jo,new zo,nn]]},xse]),Ht],decls:14,vars:25,consts:[[1,"betting-game",3,"ngClass","click"],["id","betting-game-wrapper",1,"betting-game-wrapper"],["id","bettingGame",1,"betting-game-wrapper"],["class","betting-game__rotate","id","hintOverlay",4,"ngIf"],["class","betting-game__loader",4,"ngIf"],[1,"betting-game__menu-buttons",3,"ngClass"],["bettingGameMenuButtons",""],[1,"betting-game-menu-buttons__button",3,"buttonModifier","rounded","flatButton","icon","onClick"],["bottomDrawerComponent",""],[1,"drawer-hidden",3,"ngClass","onSettingChanged"],["id","hintOverlay",1,"betting-game__rotate"],[1,"betting0game__rotate--info"],[1,"game__rotate--icon",3,"icon"],[1,"betting-game__rotate--text"],[1,"betting-game__loader"]],template:function(e,i){1&e&&(p(0,"section",0),Y("click",function(s){return i.onClick(s)}),p(1,"div",1),B(2,"div",2),m(),U(3,zJt,6,4,"div",3)(4,jJt,1,0,"loader-image",4),m(),p(5,"game-menu-buttons",5,6)(7,"game-menu-button-wrapper")(8,"button-icon",7),Y("onClick",function(){return i.clickHome()}),m()(),p(9,"game-menu-button-wrapper")(10,"button-icon",7),Y("onClick",function(){return i.openSettings()}),m()()(),p(11,"bottom-drawer-component",null,8)(13,"settings-drawer",9),Y("onSettingChanged",function(s){return i.onSettingChanged(s)}),m()()),2&e&&(go("background-image","url("+i.selectedBackground+")"),l("ngClass",ne(15,iMe,i.drawerOpened)),d(3),l("ngIf",!0===i.showDeviceRotateHint),d(),l("ngIf",i.loaderVisible),d(),l("ngClass",ne(17,iMe,i.drawerOpened)),d(3),l("buttonModifier",i.buttonModifier.BUTTON_INGAME)("rounded",!0)("flatButton",!0)("icon",ne(19,oMe,i.EIcons.HOME)),d(2),l("buttonModifier",i.settingOpened?i.buttonModifier.BUTTON_DARK:i.buttonModifier.BUTTON_INGAME)("rounded",!0)("flatButton",!0)("icon",ne(21,oMe,i.EIcons.CORG)),d(3),l("ngClass",ne(23,HJt,i.settingOpened)))},dependencies:[Xe,Ne,Dn,ei,Oi,Sv,PM,NM,c2,qe],styles:[".betting-game[_ngcontent-%COMP%]{font-size:1.4rem;position:relative;overflow:hidden;display:block;width:100%;height:100%;top:0;left:0;bottom:0;right:0;transition:transform .5s ease;background-position:center center;background-size:cover}@media screen and (min-width: 569px){.betting-game[_ngcontent-%COMP%]{font-size:1.6rem}}@media screen and (min-width: 1025px){.betting-game[_ngcontent-%COMP%]{font-size:1.8rem}}@media screen and (min-width: 1367px){.betting-game[_ngcontent-%COMP%]{font-size:2rem}}@media screen and (min-width: 1921px){.betting-game[_ngcontent-%COMP%]{font-size:2rem}}.betting-game.up[_ngcontent-%COMP%]{transform:translateY(-35vh);transition:transform .5s ease}@media screen and (max-width: 1366px){.betting-game.up[_ngcontent-%COMP%]{transform:translateY(-45vh)}}.betting-game__loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.betting-game-wrapper[_ngcontent-%COMP%]{position:absolute;overflow:hidden;display:block;width:100%;height:100%;top:0;left:0;bottom:0;right:0;margin:auto}.betting-game__rotate--icon[_ngcontent-%COMP%]{display:block;margin:auto}.betting-game__rotate--info[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:100%;transform:translate(-50%,-50%)}.betting-game__rotate--text[_ngcontent-%COMP%]{display:block;width:100%;text-align:center;font-size:2.4rem}.drawer-shown[_ngcontent-%COMP%]{display:initial!important}.drawer-hidden[_ngcontent-%COMP%]{display:none}.betting-game__menu-buttons[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;transition:transform .5s ease}.betting-game__menu-buttons.up[_ngcontent-%COMP%]{transform:translateY(-35vh)}@media screen and (max-width: 1366px){.betting-game__menu-buttons.up[_ngcontent-%COMP%]{transform:translateY(-45vh)}}.betting-game-menu-buttons__button[_ngcontent-%COMP%]{height:5rem;width:5rem}"],changeDetection:0}),n})(),sMe=(()=>{var t;class n{constructor(e,i,r,s){this.store=e,this.navigation=i,this.appService=r,this.constants=s}canActivate(e,i){var r=this;return f(function*(){return null!=r.store.selectUserState()||(r.navigation.navigate([r.constants.defaultNotLoggedRoute]),r.hideSplash(),!1)})()}hideSplash(){ll.hideLoader(),this.appService.isMobileApp()&&this.appService.getMobileAppService().hideSplash()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Yt),T(Qt),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const qJt=[{path:TP.gameRoute,canActivate:[sMe],component:rMe,data:{redirectOptions:{skipRedirect:!0,onlyLogged:!0,relativeUrl:TP.gameRoute}}}],WJt=[No,xi,Yi,Io,Ls,pR,Ej],$Jt=[sMe];let KJt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:$Jt,imports:[WJt]}),n})(),sW=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.gameWrapperBuilderFactory=e,this.gameClientFactoryBuilder=i,this.mockProfileBuilder=r,this.configService=s,this.store=a,this.urlService=c}createGame(e){const i=this.configService.getGameRelatedConfig(e),r=this.configService.getGameRelatedConfig(e).matchmaking.presets.find(h=>"default"===h.presetId),s=this.buildMockProfiles(r),a={...r.game,enableGifts:!1,enableSlots:!1},c=this.gameClientFactoryBuilder.createGameClientFactoryBuilder().useConfig({containerId:Qk,basePath:i.gameConfig.path,cdnPath:new mw(Ih.Default),isSpectator:new mw(Ih.Default),localizationsEndpoint:new mw(Ih.Default),myPlayerId:new mw(Ih.Default),players:s,gameInfo:{bet:r.transactions.bet,gameId:e,reward:r.transactions.placementRewards[1].amount,roomId:"1",roomType:r.type,configuration:a,teams:rIe()(s.map(h=>h.id),r.game.players.perTeam)}}).build();return this.gameWrapperBuilderFactory.createGameWrapperBuilder().useGameConfig({id:e,class:i.gameConfig.class,elementId:Qk,loadingTimeoutMs:9e4,background:{url:this.urlService.getImageUrl(i.gameConfig.backgroundImage),elementId:"scriptedGameWrapper"},path:i.gameConfig.path,resources:{main:i.gameConfig.sources.tutorial,vendor:i.gameConfig.sources.vendor}}).useGameClientFactory(c).build()}buildMockProfiles(e){let i=this.mockProfileBuilder.createRandomProfiles(e.players.count-1,{isBot:!0});return i.push(Lo.toGDKProfile(this.store.selectSimpleProfile())),i}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Cje),T(pje),T(v7e),T(Zt),T(J),T(ii))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),aMe=(()=>{var t;class n extends _Se{constructor(){super({drawerOpened:!1,exceptionPopupId:void 0,gameId:void 0,gameTimeoutPopupId:void 0,leavePopupId:void 0,lockedOrientation:void 0,settingsOpened:!1,showDeviceRotateHint:!1,showLoader:!1,showGameSummary:!1,canLeaveComponent:!1})}setLoader(e){this.patchState({showLoader:e})}setGameId(e){this.patchState({gameId:e})}setLeavePopupId(e){this.patchState({leavePopupId:e})}setExceptionPopupId(e){this.patchState({exceptionPopupId:e})}setGameTimeoutPopupId(e){this.patchState({gameTimeoutPopupId:e})}setDrawerOpened(e){this.patchState({drawerOpened:e})}setSettingsOpened(e){this.patchState({settingsOpened:e})}setDeviceRotateHint(e){this.patchState({showDeviceRotateHint:e})}setLockedOrientation(e){this.patchState({lockedOrientation:e})}setShowGameSummery(e){this.patchState({showGameSummary:e})}setCanLeaveComponent(e){this.patchState({canLeaveComponent:e})}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var ZJt=wi.EOrientationMessageValue,cMe=pw.EResizeEvent;const QJt=["bottomDrawerComponent"],YJt=["gameMenuButtons"];function JJt(t,n){if(1&t&&(p(0,"div",10)(1,"div",11),B(2,"icon-component",12),p(3,"p",13),H(4),V(5,"translate"),m()()()),2&t){const o=_();d(2),l("icon",o.EIcons.ROTATE_DEVICE),d(2),se($(5,2,"GAME.ROTATE_DEVICE"))}}function XJt(t,n){1&t&&B(0,"loader-image",14)}function eXt(t,n){if(1&t){const o=Ce();p(0,"scripted-game-summary",15),Y("leave",function(){return oe(o),re(_().leaveWithoutConfirmation())})("timerExpire",function(){return oe(o),re(_().leaveWithoutConfirmation())}),m()}}const lMe=t=>({up:t}),uMe=t=>({name:t}),tXt=t=>({"drawer-shown":t});let dMe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te){this.componentStore=e,this.cdr=i,this.autoDisconnectService=r,this.navigation=s,this.appService=a,this.popup=c,this._activatedRoute=u,this.scriptedGameService=h,this.configService=b,this.exceptionTracker=w,this.activeComponentService=R,this.tutorialsManager=G,this.roomsPages=K,this.constants=te,this.domElementId=Qk,this.EIcons=ve.EIcons,this.buttonModifier=ve.EButtonModifier,this.completeTutorial$=new sn,this.onSettingChanged=ee=>{console.warn("Ingame setting changed",ee),this.gameWrapper.changeSettings(ee)},this.onScreenOrientationChange=ee=>{this.checkScreenOrientation(ee.data)},this.onClick=ee=>{ee&&ee.target&&ee.target.tagName&&(-1!==ee.target.tagName.toLowerCase().indexOf("canvas")||"hintOverlay"===ee.target.id||"scriptedGame"===ee.target.id)&&(this.closeDrawer(),this.gameMenuButtons.toggleButtons(!1),this.autoDisconnectService.restartDisconnectTimeout())},this.errorHandler=ee=>{this.exceptionTracker.captureException(null==ee?void 0:ee.error),this.onGameException()},this.onGameException=()=>{const ee=this.popup.blocker({textParams:{translationKey:"GAME.GameException"},withRefreshButton:!0});this.componentStore.setExceptionPopupId(ee)}}ngOnInit(){const e=this._activatedRoute.snapshot.params.gameId;this.tutorialsManager.requestTutorial({cmp:this,group:Ms.Game,replaceExisting:!1,payload:{gameId:e}}),this.activeComponentService.add({id:"scripted-game",instance:this}),this.componentStore.setGameId(e),window.addEventListener("error",this.errorHandler),this.gameElement=window.document.getElementById(Qk),this.gameElement.addEventListener("touchstart",this.onClick);const i=this.scriptedGameService.createGame(e);i.events.error$.subscribe(this.onGameException),i.events.ended$.subscribe(()=>this.componentStore.setShowGameSummery(!0)),i.events.loadStart$.subscribe(()=>this.showLoader()),i.events.loaded$.subscribe(()=>this.hideLoader()),this.gameWrapper=i,i.start(),this.componentStore.select(r=>r).subscribe(r=>{this.componentState=r,this.cdr.detectChanges()}),this.setGameResizing()}ngOnDestroy(){var e;console.warn("Scripted game component onDestroy"),this.activeComponentService.remove({id:"scripted-game"}),null===(e=this.gameWrapper)||void 0===e||e.destroy(),this.hideLoader(),this.closeLeavePopup(),this.closeGameExceptionPopup(),this.closeGameTimeoutPopup(),this.appService.isMobileApp()&&this.appService.getMobileAppService().setOrientation(ZJt.Default),window.removeEventListener("error",this.errorHandler),this.gameResizeStrategy&&(this.gameResizeStrategy.removeEventListener(cMe.ScreenOrientationChange,this.onScreenOrientationChange),this.gameResizeStrategy.dispose()),void 0!==this.gameElement&&this.gameElement.removeEventListener("touchstart",this.onClick),this.completeTutorial$.next(),this.completeTutorial$.complete()}clickHome(){this.closeDrawer(),this.gameMenuButtons.toggleButtons(!1),this.showLeavePopup()}openSettings(){this.bottomDrawerComponent.state===this.bottomDrawerComponent.drawerStateType.Opened?(this.closeDrawer(),this.gameMenuButtons.toggleButtons(!1)):(this.bottomDrawerComponent.open(),this.componentStore.setDrawerOpened(!0),this.componentStore.setSettingsOpened(!0),this.gameMenuButtons.menuButtonsOpened=!1)}closeDrawer(){var e;this.componentStore.setDrawerOpened(!1),this.componentStore.setSettingsOpened(!1),null===(e=this.bottomDrawerComponent)||void 0===e||e.close()}leaveWithoutConfirmation(){this.componentStore.setCanLeaveComponent(!0),this.navigation.navigateTo(this.roomsPages.createRoomReturnPage(Jt.RoomType.Matchmaking,this.componentState.gameId))}showLeavePopup(){this.closeLeavePopup();const r=this.askLeaveConfirmation(()=>{this.componentStore.setCanLeaveComponent(!0),this.navigation.navigateTo(this.roomsPages.createRoomReturnPage(Jt.RoomType.Matchmaking,this.componentState.gameId))},()=>{this.closeLeavePopup()});this.componentStore.setLeavePopupId(r)}closeLeavePopup(){this.popup.hide(this.componentState.leavePopupId)}closeGameExceptionPopup(){this.popup.hide(this.componentState.exceptionPopupId)}closeGameTimeoutPopup(){this.popup.hide(this.componentState.gameTimeoutPopupId)}askLeaveConfirmation(e,i){return this.popup.confirm({buttons:{action:e,actionDecline:i},textParams:{translationKey:"GAME.LEAVE_GAME_WARNING"}})}setGameResizing(){const i=this.configService.getGameRelatedConfig(this.componentState.gameId).gameConfig.aspectRatio;if(i&&(i.portrait||i.landscape)&&(this.gameResizeStrategy=new JG(this.gameElement,i),i.hasOwnProperty("lockOrientation"))){const r=i.lockOrientation;(r===cs.Portrait||r===cs.Landscape)&&(this.componentStore.setLockedOrientation(r),this.appService.isMobileApp()?this.appService.getMobileAppService().setOrientation(this.componentState.lockedOrientation):(this.checkScreenOrientation(this.gameResizeStrategy.getCurrentOrientation()),this.gameResizeStrategy.addEventListener(cMe.ScreenOrientationChange,this.onScreenOrientationChange)))}}checkScreenOrientation(e){var i;null===(i=this.gameMenuButtons)||void 0===i||i.toggleButtons(!1),this.componentStore.setDeviceRotateHint(this.componentState.lockedOrientation!==e)}showLoader(){this.componentStore.setLoader(!0)}hideLoader(){this.componentStore.setLoader(!1)}canLeaveComponent(){return this.componentState.canLeaveComponent}}return(t=n).\u0275fac=function(e){return new(e||t)(g(aMe),g(Re),g(h0),g(Yt),g(Qt),g(Cn),g(Po),g(sW),g(Zt),g(uv),g(Iw),g(sv),g(Xf),g(tn))},t.\u0275cmp=pe({type:t,selectors:[["scripted-game"]],viewQuery:function(e,i){if(1&e&&($e(QJt,5,Sv),$e(YJt,5,NM)),2&e){let r;je(r=He())&&(i.bottomDrawerComponent=r.first),je(r=He())&&(i.gameMenuButtons=r.first)}},features:[mn([{provide:nn,useFactory:o=>new nn("scripted-game",o),deps:[[new jo,new zo,nn]]},sW,aMe])],decls:14,vars:24,consts:[["id","scriptedGameWrapper",1,"scripted-game",3,"ngClass","click"],["id","scriptedGame",1,"scripted-game-wrapper"],["class","game__rotate","id","hintOverlay",4,"ngIf"],["class","scripted-game__loader",4,"ngIf"],[1,"game__menu-buttons",3,"ngClass"],["gameMenuButtons",""],[1,"game-menu-buttons__button",3,"buttonModifier","rounded","flatButton","icon","onClick"],["bottomDrawerComponent",""],[1,"drawer-hidden",3,"ngClass","onSettingChanged"],[3,"leave","timerExpire",4,"ngIf"],["id","hintOverlay",1,"game__rotate"],[1,"game__rotate--info"],[1,"game__rotate--icon",3,"icon"],[1,"game__rotate--text"],[1,"scripted-game__loader"],[3,"leave","timerExpire"]],template:function(e,i){1&e&&(p(0,"section",0),Y("click",function(s){return i.onClick(s)}),B(1,"div",1),U(2,JJt,6,4,"div",2)(3,XJt,1,0,"loader-image",3),m(),p(4,"game-menu-buttons",4,5)(6,"game-menu-button-wrapper")(7,"button-icon",6),Y("onClick",function(){return i.clickHome()}),m()(),p(8,"game-menu-button-wrapper")(9,"button-icon",6),Y("onClick",function(){return i.openSettings()}),m()()(),p(10,"bottom-drawer-component",null,7)(12,"settings-drawer",8),Y("onSettingChanged",function(s){return i.onSettingChanged(s)}),m()(),U(13,eXt,1,0,"scripted-game-summary",9)),2&e&&(l("ngClass",ne(14,lMe,i.componentState.drawerOpened)),d(2),l("ngIf",i.componentState.showDeviceRotateHint),d(),l("ngIf",i.componentState.showLoader),d(),l("ngClass",ne(16,lMe,i.componentState.drawerOpened)),d(3),l("buttonModifier",i.buttonModifier.BUTTON_INGAME)("rounded",!0)("flatButton",!0)("icon",ne(18,uMe,i.EIcons.HOME)),d(2),l("buttonModifier",i.componentState.settingsOpened?i.buttonModifier.BUTTON_DARK:i.buttonModifier.BUTTON_INGAME)("rounded",!0)("flatButton",!0)("icon",ne(20,uMe,i.EIcons.CORG)),d(3),l("ngClass",ne(22,tXt,i.componentState.settingsOpened)),d(),l("ngIf",i.componentState.showGameSummary))},dependencies:[Xe,Ne,Dn,ei,Oi,Sv,PM,_Ce,NM,c2,qe],styles:[".scripted-game[_ngcontent-%COMP%]{font-size:1.4rem;position:relative;overflow:hidden;display:block;width:100%;height:100%;top:0;left:0;bottom:0;right:0;transition:transform .5s ease;background-position:center center;background-size:cover}@media screen and (min-width: 569px){.scripted-game[_ngcontent-%COMP%]{font-size:1.6rem}}@media screen and (min-width: 1025px){.scripted-game[_ngcontent-%COMP%]{font-size:1.8rem}}@media screen and (min-width: 1367px){.scripted-game[_ngcontent-%COMP%]{font-size:2rem}}@media screen and (min-width: 1921px){.scripted-game[_ngcontent-%COMP%]{font-size:2rem}}.scripted-game.up[_ngcontent-%COMP%]{transform:translateY(-35vh);transition:transform .5s ease}@media screen and (max-width: 1366px){.scripted-game.up[_ngcontent-%COMP%]{transform:translateY(-45vh)}}.scripted-game__loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.scripted-game-wrapper[_ngcontent-%COMP%]{position:absolute;overflow:hidden;display:block;width:100%;height:100%;top:0;left:0;bottom:0;right:0;margin:auto}.game__rotate--icon[_ngcontent-%COMP%]{display:block;margin:auto}.game__rotate--info[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:100%;transform:translate(-50%,-50%)}.game__rotate--text[_ngcontent-%COMP%]{display:block;width:100%;text-align:center;font-size:2.4rem}.drawer-shown[_ngcontent-%COMP%]{display:initial!important}.drawer-hidden[_ngcontent-%COMP%]{display:none}.game__menu-buttons[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;transition:transform .5s ease}.game__menu-buttons.up[_ngcontent-%COMP%]{transform:translateY(-35vh)}@media screen and (max-width: 1366px){.game__menu-buttons.up[_ngcontent-%COMP%]{transform:translateY(-45vh)}}.game-menu-buttons__button[_ngcontent-%COMP%]{height:5rem;width:5rem}"],changeDetection:0}),n})(),aW=(()=>{var t;class n{constructor(e,i,r,s,a,c){this.tutorialService=a,this.playClientService=c,this.store=e,this.navigation=i,this.appService=r,this.constants=s}canActivate(e,i){var r=this;return f(function*(){return r.store.selectUserState()?(r.hideSplash(),!!r.tutorialService.selectTutorialByRequirements({group:Ms.Game,payload:{gameId:e.params.gameId}})||(r.navigation.navigate([r.constants.defaultLoggedRoute]),!1)):(r.navigation.navigate([r.constants.defaultNotLoggedRoute]),r.hideSplash(),!1)})()}hideSplash(){ll.hideLoader(),this.appService.isMobileApp()&&this.appService.getMobileAppService().hideSplash()}canDeactivate(e,i,r,s){var a=this;return f(function*(){var c;return console.warn("Navigating away from scripted game!"),!a.navigation.isNavigationStoppable(s)||e.canLeaveComponent()||null!==(c=a.playClientService.currentPlayClient)&&void 0!==c&&null!==(c=c.activeClientModel)&&void 0!==c&&c.acceptInviteModel?Promise.resolve(!0):(e.showLeavePopup(),Promise.resolve(!1))})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(J),T(Yt),T(Qt),T(tn),T(sv),T(oo))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const nXt=[{path:"scripted/:gameId",component:dMe,canActivate:[aW],canDeactivate:[aW],data:{redirectOptions:{skipRedirect:!0,onlyLogged:!0,relativeUrl:"scripted"}}}],iXt=[No,xi,Yi,Io,Ls,Oj,pR,Ej],oXt=[sW,aW];let rXt=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:oXt,imports:[iXt]}),n})();const sXt=[{path:"",children:[...rKe,...ove,...EJt,...vCe,...nXt,...qJt,...W_e,...rve,...Zae,...ave,...Vae,{path:"",redirectTo:"games",pathMatch:"full"},{path:"",children:[...tve,...jae],canActivate:[Q8]}]},{path:"**",redirectTo:"games",pathMatch:"full"},...LJt],aXt=["rootViewContainerRef"];function cXt(t,n){1&t&&B(0,"section",7)}const lXt=t=>({"resize-for-banner":t});let cW=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R){this.bannerListenerService=w,this.destroyRef=R,this.onMobileBackButton=()=>{history.back()},this.onDocumentClick=()=>{document.eventListeners&&"function"==typeof document.eventListeners&&document.eventListeners("click").length>=2&&document.removeAllListeners("click")},this.checkRotationChange=()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const G=this.orientation;if(this.orientation=window.innerWidth<window.innerHeight?cs.Portrait:cs.Landscape,this.orientation!==G){const K=new aa.DefaultEvent(Nn.Orientation,"change",{label:this.orientation,nonInteraction:!0});this.analyticsTrackingService.sendEvent(K)}},3e3)},this.defaultAvatarsService=b,this.appStateService=c,this.ngZone=h,this.navigationService=r,this.renderer=i,this.router=e,this.analyticsTrackingService=s,this.pageViewService=a,this.app=u}ngOnInit(){console.log("Current angular version: ".concat(sNe.full)),wh||this.renderer.addClass(document.body,"no-touch"),this.defaultAvatarsService.defaultAvatarsList=Lt.CONFIG.platform.defaultAvatarsList,this.routerChangeDetector(),this.router.navigate(["/auto-login"],{skipLocationChange:!0}),this.app.getMobileAppService().addEventListener(Rd.BackButton,this.onMobileBackButton);const e=window.innerWidth<window.innerHeight?cs.Portrait:cs.Landscape,i=new aa.DefaultEvent(Nn.Orientation,"start",{label:e,nonInteraction:!0});this.analyticsTrackingService.sendEvent(i),this.ngZone.runOutsideAngular(()=>{document.addEventListener("click",this.onDocumentClick),window.addEventListener("resize",this.checkRotationChange)}),this.bannerListenerService.shouldResizeForBannerSubject.pipe(mi(this.destroyRef)).subscribe(r=>{this.shouldResizeForBanner=r})}routerChangeDetector(){this.router.events.pipe(bt(e=>e instanceof as)).subscribe(e=>{this.pageViewService.sendPageView(this.navigationService.getOutletUrl()),this.appStateService.setPreviousRoute(e.url)})}}return(t=n).\u0275fac=function(e){return new(e||t)(g(on),g(ji),g(Yt),g(yi),g(k0e),g(Sa),g(Qt),g(an),g(Rp),g(og),g(br))},t.\u0275cmp=pe({type:t,selectors:[["app"]],viewQuery:function(e,i){if(1&e&&$e(aXt,7,bs),2&e){let r;je(r=He())&&(i.rootViewContainerRef=r.first)}},decls:18,vars:4,consts:[["id","appWrapper",1,"app__wrapper",3,"ngClass"],["id","tutorialCanvas"],["name","popupOutlet"],["root-container",""],["rootViewContainerRef",""],["activeCmp","","id","popups"],["class","app__banner",4,"ngIf"],[1,"app__banner"]],template:function(e,i){1&e&&(p(0,"section",0),B(1,"tutorial-canvas",1)(2,"router-outlet")(3,"router-outlet",2)(4,"matchmaking")(5,"account-merge")(6,"top-bar-notifications")(7,"game-invite-drop-notification")(8,"promo-tournament-options")(9,"gifts-shop")(10,"clubs-popup-wrapper")(11,"image-slider-container"),Un(12,3,4),B(14,"popup-cmp",5)(15,"toast")(16,"loader"),m(),U(17,cXt,1,0,"section",6)),2&e&&(l("ngClass",ne(2,lXt,i.shouldResizeForBanner)),d(17),l("ngIf",i.shouldResizeForBanner))},styles:["[_nghost-%COMP%]{height:100%;width:100%;display:block}.app__wrapper[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;position:absolute;position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;min-width:28rem;overflow:hidden}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:.2rem;height:.2rem}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-button{width:.2rem;height:.2rem}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2);border:none;border-radius:0;width:.2rem}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:rgba(230,230,230,.2)}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:active{background:rgba(230,230,230,.2)}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:rgba(0,0,0,.2);border:none;border-radius:0}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-track:hover{background:rgba(0,0,0,.2)}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-track:active{background:rgba(0,0,0,.2)}.app__wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background:transparent;scrollbar-highlight-color:rgba(255,255,255,.2);scrollbar-face-color:rgba(255,255,255,.2);scrollbar-3dlight-color:rgba(255,255,255,.2);scrollbar-shadow-color:rgba(255,255,255,.2);scrollbar-darkshadow-color:rgba(0,0,0,.2);scrollbar-track-color:rgba(0,0,0,.2);scrollbar-arrow-color:rgba(0,0,0,.2)}.app__wrapper.resize-for-banner[_ngcontent-%COMP%]{height:calc(100% - 100px)}.placeholder-small[_ngcontent-%COMP%]{width:3rem!important;height:3rem!important}.placeholder-medium[_ngcontent-%COMP%]{width:5rem!important;height:5rem!important}.placeholder-large[_ngcontent-%COMP%]{width:10rem!important;height:10rem!important}.app__banner[_ngcontent-%COMP%]{height:100px;width:100%;background-color:#000;position:fixed;bottom:0}"]}),n})(),pMe=(()=>{var t;class n{constructor(e,i){this.preloadImages=(r,s)=>{for(let a=0,c=r.length;a<c;a++){const u=-1===r[a].indexOf("assets")?"".concat(this.urlService.getImageUrl(r[a])):r[a];let h=s.createElement("img");s.appendChild(this.mainElement,h),h.setAttribute("src",u),h.setAttribute("id","cachedImage".concat(a)),s.setStyle(h,"opacity",0),s.setStyle(h,"position","absolute"),s.setStyle(h,"top","-1000px"),s.setStyle(h,"left","-1000px");let b=()=>{h.removeEventListener("load",b),s.removeChild(this.mainElement,h)};this.ngZone.runOutsideAngular(()=>{h.addEventListener("load",b)})}},this.preloadSingleImage=(r,s)=>{const a=-1===r.indexOf("assets")?"".concat(this.urlService.getImageUrl(r)):r;let c=s.createElement("img");return s.appendChild(this.mainElement,c),c.setAttribute("src",a),c.setAttribute("id","cachedSingleImage"),s.setStyle(c,"opacity",0),s.setStyle(c,"position","absolute"),s.setStyle(c,"top","-1000px"),s.setStyle(c,"left","-1000px"),new Promise((u,h)=>{let b=()=>{document.getElementById("cachedSingleImage").removeEventListener("load",b),s.removeChild(this.mainElement,document.getElementById("cachedSingleImage")),u(!0)};document.getElementById("cachedSingleImage").addEventListener("load",b)})},this.urlService=e,this.ngZone=i,this.mainElement=document.getElementsByTagName("body")[0]}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ii),T(an))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function uXt(t,n){1&t&&(p(0,"div",1)(1,"div",2),B(2,"loader-image",3),m()()),2&t&&(d(2),l("transparentBG",!0))}let hMe=(()=>{var t;class n{constructor(e,i){this.loader=e,this.cdr=i,i.detach()}ngOnInit(){this.loaderSubscription=this.loader.state().subscribe(e=>{this.isVisible=e.visible,this.cdr.detectChanges()}),this.cdr.detectChanges()}ngOnDestroy(){this.loaderSubscription&&this.loaderSubscription.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ro),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["loader"]],decls:1,vars:1,consts:[["class","loader__wrapper",4,"ngIf"],[1,"loader__wrapper"],[1,"loader__container"],[3,"transparentBG"]],template:function(e,i){1&e&&U(0,uXt,3,1,"div",0),2&e&&l("ngIf",i.isVisible)},dependencies:[Ne,Oi],styles:[".loader__wrapper[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100vh;display:flex;flex-flow:row wrap;justify-content:center;align-items:center;animation:_ngcontent-%COMP%_setDimmer .2s .5s linear forwards}.loader__wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{display:block;width:4rem;height:4rem;margin:0 auto}@keyframes _ngcontent-%COMP%_setDimmer{0%{background-color:none}to{background-color:rgba(0,0,0,.5)}}"],changeDetection:0}),n})();var dXt=lt.NetworkError,pXt=lt.AppDependeciesLoadError;let mMe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.pixiLoader=R,this.pixiAppFactory=G,this.appLanguage=c,this.appService=e,this.googleService=i,this.twitterService=r,this.facebookService=a,this.appleService=s,this.translationService=h,this.gamesStateService=u,this.analyticsTrackingService=b,this.title=w,this.pixiAppFactory.prePopulatePool(1,{height:220,width:220,sharedTicker:!0,transparent:!0})}resolve(){!this.appLanguage.getLocalStorageLanguage()&&this.appService.getUrlLang()&&(this.appLanguage.setLocalStorageLanguage(this.appService.getUrlLang()),this.appService.consumeUrlParam("lang"));const e=[this.facebookService.init().then(()=>console.log("Facebook SDK loaded")).catch(i=>console.warn("FB ERROR",i)),this.googleService.init().then(()=>console.log("Google API loaded")).catch(i=>console.warn("GOOGLE API ERROR",i)),this.twitterService.init().then(()=>console.log("Twitter API loaded")).catch(i=>console.warn("TWITTER API ERROR",i)),this.appleService.init().then(()=>console.log("Apple API loaded")).catch(i=>console.warn("APPLE API ERROR",i)),this.translationService.init(this.appLanguage.getAppLanguage()).then(()=>{this.appLanguage.setLanguage(this.appLanguage.getAppLanguage()),this.title.setTitle(this.translationService.instant("TITLE"))}),this.gamesStateService.init(),new Promise((i,r)=>{PixiClient.settings.TARGET_FPMS=.03,PixiClient.ticker.shared.autoStart=!1,PixiClient.ticker.shared.stop(),this.pixiLoader.add("piggy_bank_ske.json","cash-back/piggy_bank_ske.json"),this.pixiLoader.add("piggy_bank_tex.json","cash-back/piggy_bank_tex.json"),this.pixiLoader.add("piggy_bank_tex.png","cash-back/piggy_bank_tex.png"),this.pixiLoader.add("chip","chips-animation/spriteSheetCoin.png"),this.pixiLoader.add("gem","chips-animation/spriteSheetDiamond.png"),this.pixiLoader.add("white-particle","chips-animation/explosion/white-particle.png"),this.pixiLoader.add("challenges_badge_ske.json","challenges/challenges_badge_ske.json"),this.pixiLoader.add("challenges_badge_tex.json","challenges/challenges_badge_tex.json"),this.pixiLoader.add("challenges_badge_tex.png","challenges/challenges_badge_tex.png"),this.pixiLoader.load(()=>{const s=dragonBones.PixiFactory.factory;s.parseDragonBonesData(this.pixiLoader.resources["piggy_bank_ske.json"].data),s.parseDragonBonesData(this.pixiLoader.resources["challenges_badge_ske.json"].data),s.parseTextureAtlasData(this.pixiLoader.resources["piggy_bank_tex.json"].data,this.pixiLoader.resources["piggy_bank_tex.png"].texture),s.parseTextureAtlasData(this.pixiLoader.resources["challenges_badge_tex.json"].data,this.pixiLoader.resources["challenges_badge_tex.png"].texture),i()}),this.pixiLoader.onError.add(s=>{console.error(s),r("PixiLoadError")})})];return Promise.all(e).then(()=>(window.PhaserGlobal={},navigator.getGamepads=null,Promise.resolve())).catch(i=>(ll.loadResourcesFail(),Promise.reject(i instanceof dXt?new pXt:i)))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Qt),T(ZR),T(hI),T(mI),T(km),T(Ma),T(Zn),T(pi),T(yi),T(XX),T(j_),T(Bw))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class g1 extends CC{constructor(n,o,e){super(o,e),this.topBarNotifications=n}close(n,o){var e=this;return f(function*(){o&&o.deleteOnActionDone&&e.delete(e.notificationData,!1),e.topBarNotifications.closeNotification()})()}}var mXt=ve.EButtonModifier,fXt=ve.EIcons;function gXt(t,n){if(1&t&&(p(0,"div",7)(1,"span"),H(2),m(),p(3,"span"),H(4),m(),B(5,"reward-component",8),m()),2&t){const o=_();l("key",o.text.key),d(2),se(o.notificationData.notificationData.username),d(2),se(o.notificationData.notificationData.level),d(),l("reward",o.notificationData.notificationData.reward)}}function _Xt(t,n){if(1&t&&(p(0,"div",7)(1,"span"),H(2),m(),B(3,"reward-component",8),m()),2&t){const o=_();l("key",o.text.key),d(2),se(o.notificationData.notificationData.username),d(),l("reward",o.notificationData.notificationData.reward)}}let lW=(()=>{var t;class n extends g1{constructor(e,i,r,s,a,c,u){super(a,c,u),this.notificationTypes=rt,this.buttonModifier=mXt,this.iconNames=fXt}ngOnInit(){this.text=this.notificationData.text,this.notificationImage=this.notificationData.image?this.notificationData.image:void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ro),g(ii),g(ja),g(Tu),g(bg),g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["invites-notification"]],features:[Ht],decls:8,vars:3,consts:[[1,"top-bar__container--notification"],[1,"top-bar-notif__container--sender-avatar"],[1,"top-bar__image--replace-avatar",3,"src"],[1,"top-bar-notif__container--content"],["class","top-bar-notif__container--text","text-with-placeholders","",3,"key",4,"ngIf"],[1,"top-bar-notif__container--actions","invites-notifications"],[1,"top-bar-notif__container--button","close",3,"onClick"],["text-with-placeholders","",1,"top-bar-notif__container--text",3,"key"],[3,"reward"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"img",2),m(),p(3,"div",3),U(4,gXt,6,4,"div",4)(5,_Xt,4,3,"div",4),m(),p(6,"div",5)(7,"button-close",6),Y("onClick",function(){return i.close()}),m()()()),2&e&&(d(2),l("src",i.notificationImage,Wn),d(2),l("ngIf",i.notificationData.notificationType===i.notificationTypes.InvitationLevelUp),d(),l("ngIf",i.notificationData.notificationType===i.notificationTypes.ReceiverInviteAccepted))},dependencies:[Ne,oc,cu,Ud],encapsulation:2}),n})();function vXt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se(yt(2,1,o.notificationData.text.title.key,o.notificationData.text.title.params))}}function bXt(t,n){1&t&&(B(0,"p",13),V(1,"safeHtml")),2&t&&l("innerHTML",$(1,1,_(2).notificationData.text.title),Yn)}function CXt(t,n){if(1&t&&(p(0,"div",10),U(1,vXt,3,4,"p",11)(2,bXt,2,3,"p",12),m()),2&t){const o=_();d(),l("ngIf",o.isTranslatableText(o.notificationData.text.title)),d(),l("ngIf",!o.isTranslatableText(o.notificationData.text.title))}}function yXt(t,n){if(1&t&&(p(0,"div",14),B(1,"div",15),V(2,"safeHtml"),V(3,"translate"),m()),2&t){const o=_();d(),l("innerHTML",$(2,1,yt(3,3,o.notificationData.text.key,o.notificationData.text.params)),Yn)}}function SXt(t,n){if(1&t&&B(0,"currency-component",18),2&t){const o=_(2);l("currency",o.currencyType.Chips)("value",o.notificationData.notificationData.reward.chips)}}function wXt(t,n){if(1&t&&B(0,"currency-component",18),2&t){const o=_(2);l("currency",o.currencyType.Gems)("value",o.notificationData.notificationData.reward.gems)}}function TXt(t,n){if(1&t&&(p(0,"div",16)(1,"span"),H(2),m(),p(3,"span"),H(4),m(),p(5,"span"),U(6,SXt,1,2,"currency-component",17)(7,wXt,1,2,"currency-component",17),m()()),2&t){const o=_();l("key",o.notificationData.text.key),d(2),se(o.getNotificationTitle(o.notificationData.notificationData.title)),d(2),se(o.notificationData.notificationData.reward.place),d(2),l("ngIf",o.notificationData.notificationData.reward.chips),d(),l("ngIf",o.notificationData.notificationData.reward.gems)}}let Es=(()=>{var t;class n extends g1{constructor(e,i,r,s){super(e,i,r),this.translationService=s,this.ETypes=rt,this.currencyType=ln}getNotificationTitle(e){return this.translationService.readTranslation(e.title)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bg),g(ja),g(Re),g(pi))},t.\u0275cmp=pe({type:t,selectors:[["image-text-notification"]],features:[Ht],decls:10,vars:5,consts:[["data-cy","imageNotificationContainer",1,"top-bar__container--notification"],["data-cy","imageNotificationAsset",1,"top-bar-notif__container--sender-avatar"],[1,"top-bar__image--replace-avatar",3,"src"],[1,"top-bar-notif__container--content"],["class","top-bar-notif__container--title","data-cy","imageNotificationTitle",4,"ngIf"],["class","top-bar-notif__container--text",4,"ngIf"],["text-with-placeholders","",3,"key",4,"ngIf"],[1,"top-bar-notif__container--actions"],[3,"notification","actionDone"],["data-cy","imageNotificationClose",1,"top-bar-notif__container--button","close",3,"onClick"],["data-cy","imageNotificationTitle",1,"top-bar-notif__container--title"],[4,"ngIf"],["data-cy","imageNotificationUsername",3,"innerHTML",4,"ngIf"],["data-cy","imageNotificationUsername",3,"innerHTML"],[1,"top-bar-notif__container--text"],["data-cy","imageNotificationText",1,"top-bar__text",3,"innerHTML"],["text-with-placeholders","",3,"key"],["class","image-notification__reward",3,"currency","value",4,"ngIf"],[1,"image-notification__reward",3,"currency","value"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"img",2),m(),p(3,"div",3),U(4,CXt,3,2,"div",4)(5,yXt,4,6,"div",5)(6,TXt,8,5,"div",6),m(),p(7,"div",7)(8,"notifications-buttons",8),Y("actionDone",function(s){return i.close(!1,s)}),m(),p(9,"button-close",9),Y("onClick",function(){return i.close()}),m()()()),2&e&&(d(2),l("src",i.notificationData.image,Wn),d(2),l("ngIf",i.notificationData.text.title),d(),l("ngIf",i.notificationData.notificationType!==i.ETypes.PromoTournamentRewardAvailable),d(),l("ngIf",i.notificationData.notificationType===i.ETypes.PromoTournamentRewardAvailable),d(2),l("notification",i.notificationData))},dependencies:[Ne,oc,FC,Ud,So,qe,Ta],encapsulation:2}),n})();function PXt(t,n){if(1&t&&(p(0,"p",13),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se(yt(2,1,o.notificationData.text.title.key,o.notificationData.text.title.params))}}function IXt(t,n){1&t&&(B(0,"p",14),V(1,"safeHtml")),2&t&&l("innerHTML",$(1,1,_(2).notificationData.text.title),Yn)}function MXt(t,n){if(1&t&&(p(0,"div",10),U(1,PXt,3,4,"p",11)(2,IXt,2,3,"p",12),m()),2&t){const o=_();d(),l("ngIf",o.isTranslatableText(o.notificationData.text.title)),d(),l("ngIf",!o.isTranslatableText(o.notificationData.text.title))}}let If=(()=>{var t;class n extends g1{constructor(e,i,r){super(e,i,r)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bg),g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["avatar-text-notification"]],features:[Ht],decls:12,vars:11,consts:[["data-cy","avatarTextNotification",1,"top-bar__container--notification"],[1,"top-bar-notif__container--sender-avatar"],["data-cy","avatarNotificationAvatar",3,"user","isLink","hasUsername"],[1,"top-bar-notif__container--content"],["class","top-bar-notif__container--title",4,"ngIf"],[1,"top-bar-notif__container--text"],["data-cy","avatarNotificationText",1,"top-bar__text",3,"innerHTML"],[1,"top-bar-notif__container--actions"],[3,"notification","actionDone"],["data-cy","avatarNotificationClose",1,"top-bar-notif__container--button","close",3,"onClick"],[1,"top-bar-notif__container--title"],["data-cy","avatarNotificationTitle",4,"ngIf"],["data-cy","avatarNotificationUsername",3,"innerHTML",4,"ngIf"],["data-cy","avatarNotificationTitle"],["data-cy","avatarNotificationUsername",3,"innerHTML"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"avatar",2),m(),p(3,"div",3),U(4,MXt,3,2,"div",4),p(5,"div",5),B(6,"div",6),V(7,"safeHtml"),V(8,"translate"),m()(),p(9,"div",7)(10,"notifications-buttons",8),Y("actionDone",function(s){return i.close(!1,s)}),m(),p(11,"button-close",9),Y("onClick",function(){return i.close()}),m()()()),2&e&&(d(2),l("user",i.notificationData.senderProfile)("isLink",!0)("hasUsername",!1),d(2),l("ngIf",i.notificationData.text.title),d(2),l("innerHTML",$(7,6,yt(8,8,i.notificationData.text.key,i.notificationData.text.params)),Yn),d(4),l("notification",i.notificationData))},dependencies:[Ne,Bo,FC,Ud,qe,Ta],encapsulation:2}),n})();function OXt(t,n){if(1&t&&(p(0,"div")(1,"span",12)(2,"span",13),H(3),V(4,"translate"),m(),p(5,"span",14),B(6,"currency-component",15),m()()()),2&t){const o=_();d(3),ze("",$(4,3,"CUSTOM_GAMES.OPTIONS.bet"),":"),d(3),l("currency",o.currencyType.Chips)("value",o.bet)}}function EXt(t,n){if(1&t&&B(0,"avatar",19),2&t){const o=n.$implicit;l("hasUsername",!1)("user",o)}}function xXt(t,n){1&t&&(p(0,"span",20),H(1,"vs"),m())}function AXt(t,n){if(1&t&&(p(0,"div",16),U(1,EXt,1,2,"avatar",17)(2,xXt,2,0,"span",18),m()),2&t){const o=n.$implicit,e=n.index,i=_();d(),l("ngForOf",o),d(),l("ngIf",e!==i.teams.length-1)}}let fMe=(()=>{var t;class n extends g1{constructor(e,i,r){super(e,i,r),this.currencyType=ln,this.teams=[]}ngOnInit(){this.room=this.notificationData.notificationData.room,this.gameId=this.notificationData.notificationData.room.settings.game.name,this.tableId=this.notificationData.notificationData.tableId,this.teams=this.notificationData.notificationData.teams.map(e=>e.map(i=>Lo.toPlatformProfile(i))),this.bet=this.notificationData.notificationData.bet}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bg),g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["spectate-game-notification"]],features:[Ht],decls:19,vars:12,consts:[[1,"top-bar__container--notification"],[1,"top-bar-notif__container--spectate-notification"],[1,"top-bar__container--info"],[1,"top-bar__container--spectate-type"],[4,"ngIf"],[1,"top-bar__container--game-name-wrapper"],[1,"top-bar__container--game-name"],[1,"top-bar__container--teams-container"],["class","top-bar__container--team-wrapper",4,"ngFor","ngForOf"],[1,"top-bar-notif__container--actions"],[3,"notification","actionDone"],[1,"top-bar-notif__container--button","close",3,"onClick"],[1,"top-bar__container--game-bet-wrapper"],[1,"top-bar__container--game-bet"],[1,"top-bar__text--bet"],[1,"top-bar__container--game-bet",3,"currency","value"],[1,"top-bar__container--team-wrapper"],["class","top-bar__container--player-avatar",3,"hasUsername","user",4,"ngFor","ngForOf"],["class","top-bar__container--team-vs",4,"ngIf"],[1,"top-bar__container--player-avatar",3,"hasUsername","user"],[1,"top-bar__container--team-vs"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),H(4),V(5,"translate"),m(),U(6,OXt,7,5,"div",4),p(7,"span",5)(8,"span",6),H(9),V(10,"translate"),m(),p(11,"span",6),H(12),V(13,"translate"),m()()(),p(14,"div",7),U(15,AXt,3,2,"div",8),m()(),p(16,"div",9)(17,"notifications-buttons",10),Y("actionDone",function(s){return i.close(!1,s)}),m(),p(18,"button-close",11),Y("onClick",function(){return i.close()}),m()()()),2&e&&(d(4),ze(" ",$(5,6,"SPECTATE_NOTIFICATIONS.TYPE.HighStakes")," "),d(2),l("ngIf",i.bet),d(3),ze("",$(10,8,"GAME.GAME"),":"),d(3),se($(13,10,"PLATFORM_IDS."+i.gameId)),d(3),l("ngForOf",i.teams),d(2),l("notification",i.notificationData))},dependencies:[Mt,Ne,Bo,FC,Ud,So,qe],styles:[".top-bar-notif__container--spectate-notification[_ngcontent-%COMP%]{justify-content:flex-start;flex-flow:row wrap;display:flex}.top-bar__container--info[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-content:center;margin:0 .5rem}.top-bar__text--bet[_ngcontent-%COMP%]{direction:ltr!important}.top-bar__container--spectate-type[_ngcontent-%COMP%], .top-bar__container--game-bet[_ngcontent-%COMP%], .top-bar__container--game-name[_ngcontent-%COMP%]{margin:.2rem .4rem;font-size:1.8rem}.top-bar__container--teams-container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;margin:0 .5rem}.top-bar__container--team-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin-bottom:.5rem}.top-bar__container--team-vs[_ngcontent-%COMP%]{font-size:1.8rem;margin:.2rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]{display:flex;width:5rem;height:5rem;margin:0 .2rem}.top-bar-notif__container--actions[_ngcontent-%COMP%]{flex-flow:row}@media only screen and (max-width: 768px){.top-bar__container--spectate-type[_ngcontent-%COMP%], .top-bar__container--game-bet[_ngcontent-%COMP%], .top-bar__container--game-name[_ngcontent-%COMP%]{font-size:1.6rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]{width:4rem;height:4rem}}@media only screen and (max-width: 380px){.top-bar__container--spectate-type[_ngcontent-%COMP%], .top-bar__container--game-bet[_ngcontent-%COMP%], .top-bar__container--game-name[_ngcontent-%COMP%]{font-size:1.4rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]{width:3.5rem;height:3.5rem}.top-bar__container--team-vs[_ngcontent-%COMP%]{font-size:1.6rem;margin:.1rem}}"]}),n})();const RXt=(t,n,o,e)=>({id:t,avatar:n,level:o,frame:e});function kXt(t,n){if(1&t&&B(0,"club-avatar",10),2&t){const o=_();l("club",xd(1,RXt,o.notificationData.notificationData.club.id,o.notificationData.notificationData.club.avatar,o.notificationData.notificationData.club.level,null==o.notificationData.notificationData.inventory?null:o.notificationData.notificationData.inventory.frame))}}function LXt(t,n){if(1&t&&(p(0,"p"),H(1),V(2,"translate"),m()),2&t){const o=_(2);d(),se(yt(2,1,o.notificationData.text.title.key,o.notificationData.text.title.params))}}function DXt(t,n){if(1&t&&(p(0,"p"),H(1),m()),2&t){const o=_(2);d(),se(o.notificationData.text.title)}}function BXt(t,n){if(1&t&&(p(0,"div",11),U(1,LXt,3,4,"p",12)(2,DXt,2,1,"p",12),m()),2&t){const o=_();d(),l("ngIf",o.isTranslatableText(o.notificationData.text.title)),d(),l("ngIf",!o.isTranslatableText(o.notificationData.text.title))}}let uW=(()=>{var t;class n extends g1{constructor(e,i,r){super(e,i,r)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bg),g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["club-avatar-notification"]],features:[Ht],decls:12,vars:9,consts:[[1,"top-bar__container--notification"],[1,"top-bar-notif__container--club-avatar"],["data-cy","clubNotificationAvatar",3,"club",4,"ngIf"],["data-cy","clubNotificationContent",1,"top-bar-notif__container--content"],["class","top-bar-notif__container--title","data-cy","clubNotificationTitle",4,"ngIf"],["data-cy","clubNotificationText",1,"top-bar-notif__container--text"],[1,"top-bar__text",3,"innerHTML"],[1,"top-bar-notif__container--actions"],[3,"notification","actionDone"],["data-cy","clubNotificationCloseButton",1,"top-bar-notif__container--button","close",3,"onClick"],["data-cy","clubNotificationAvatar",3,"club"],["data-cy","clubNotificationTitle",1,"top-bar-notif__container--title"],[4,"ngIf"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),U(2,kXt,1,6,"club-avatar",2),m(),p(3,"div",3),U(4,BXt,3,2,"div",4),p(5,"div",5),B(6,"div",6),V(7,"safeHtml"),V(8,"translate"),m()(),p(9,"div",7)(10,"notifications-buttons",8),Y("actionDone",function(s){return i.close(!1,s)}),m(),p(11,"button-close",9),Y("onClick",function(){return i.close()}),m()()()),2&e&&(d(2),l("ngIf",i.notificationData.notificationData&&i.notificationData.notificationData.club),d(2),l("ngIf",i.notificationData.text.title),d(2),l("innerHTML",$(7,4,yt(8,6,i.notificationData.text.key,i.notificationData.text.params)),Yn),d(4),l("notification",i.notificationData))},dependencies:[Ne,FC,Ud,mf,qe,Ta],encapsulation:2}),n})();function NXt(t,n){if(1&t&&(p(0,"div",4)(1,"div",5),B(2,"avatar",6),p(3,"div",7)(4,"p"),H(5),m()()(),p(6,"div",8),B(7,"img",9),m(),p(8,"div",10)(9,"div",11)(10,"p"),H(11),m()(),B(12,"avatar",12),m()()),2&t){const o=_();d(2),l("user",o.notificationData.notificationData.senderProfile)("hasUsername",!1)("allowClickPropagation",!0),d(3),se(o.notificationData.notificationData.senderProfile.username.currentUsername),d(2),l("customPlaceholderSize","placeholder-small")("customPlaceholder","placeholders/placeholder.svg")("imgSrc",o.cdnUrlImages+o.notificationData.notificationData.item.item.id+".png"),d(4),se(o.notificationData.notificationData.receiverProfile.username.currentUsername),d(),l("user",o.notificationData.notificationData.receiverProfile)("hasUsername",!1)("allowClickPropagation",!0)}}let gMe=(()=>{var t;class n extends g1{constructor(e,i,r){super(e,i,r),this.cdnUrlImages="".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.store)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bg),g(ja),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["premium-gift-notification"]],features:[Ht],decls:4,vars:1,consts:[[1,"top-bar__container--notification","premium-gift",3,"click"],["class","top-bar-notif__container--premium-gift",4,"ngIf"],[1,"top-bar-notif__container--actions","premium-gift"],[1,"top-bar-notif__container--button","close"],[1,"top-bar-notif__container--premium-gift"],[1,"top-bar__container--player-avatar"],["data-cy","premiumGiftSenderAvatar",1,"avatar",3,"user","hasUsername","allowClickPropagation"],["data-cy","premiumGiftSenderUsername",1,"username-container"],[1,"top-bar__container--gift"],["empty-placeholder","","click-feedback","","data-cy","preimiumGiftImage",3,"customPlaceholderSize","customPlaceholder","imgSrc"],[1,"top-bar__container--player-avatar","bottom"],["data-cy","premiumGiftReceiverUsername",1,"username-container"],["data-cy","premiumGiftReceiverAvatar",1,"avatar",3,"user","hasUsername","allowClickPropagation"]],template:function(e,i){1&e&&(p(0,"div",0),Y("click",function(){return i.close()}),U(1,NXt,13,11,"div",1),p(2,"div",2),B(3,"button-close",3),m()()),2&e&&(d(),l("ngIf",i.notificationData&&i.notificationData.notificationData))},dependencies:[Ne,Bo,Ud,po,$o],styles:[".top-bar-notif__container--premium-gift[_ngcontent-%COMP%]{justify-content:flex-start;flex-flow:row wrap;display:flex;width:100%;height:calc(100% - 1rem);margin:.5rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;justify-content:flex-start;width:10rem;height:100%;margin:0 .2rem}.top-bar__container--player-avatar.bottom[_ngcontent-%COMP%]{justify-content:flex-end}.top-bar__container--player-avatar[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{height:10rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]   .username-container[_ngcontent-%COMP%]{width:100%;margin:.5rem 0;text-align:center}.top-bar__container--player-avatar[_ngcontent-%COMP%]   .username-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.top-bar__container--gift[_ngcontent-%COMP%]{width:calc(100% - 21rem);height:100%;max-height:100%;display:flex;justify-content:center;align-items:center}.top-bar__container--gift[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}@media only screen and (max-width: 480px){.top-bar__container--gift[_ngcontent-%COMP%]{width:calc(100% - 15rem)}.top-bar__container--player-avatar[_ngcontent-%COMP%]{width:7rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{height:7rem}}@media only screen and (max-width: 320px){.top-bar__container--gift[_ngcontent-%COMP%]{width:calc(100% - 11rem)}.top-bar__container--player-avatar[_ngcontent-%COMP%]{width:5rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]{height:5rem}.top-bar__container--player-avatar[_ngcontent-%COMP%]   .username-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1rem}}"],changeDetection:0}),n})();const FXt={[rt.ReceiverInviteAccepted]:lW,[rt.InvitationLevelUp]:lW,[rt.GiftSent]:Es,[rt.GiftPackageSent]:Es,[rt.GiftPackageRecieved]:Es,[rt.SenderInviteAccepted]:Es,[rt.UserLevelUp]:Es,[rt.GameWon]:Es,[rt.TournamentWon]:Es,[rt.AntiChurnReceived]:Es,[rt.RefundTournament]:Es,[rt.RefundUnclaimedPot]:Es,[rt.ItemPurchase]:Es,[rt.VipFrameUpdate]:Es,VipExpires:Es,XpBoosterExpires:Es,ReconnectAttempt:Es,CashbackDecay:Es,Reconnected:Es,[rt.KnockoutTournamentWon]:Es,[rt.SocialPlatformFriendRegistered]:Es,[rt.AdminBonusReceived]:Es,[rt.ClubJoinSuccess]:uW,[rt.ClubMemberRoleChange]:If,[rt.ClubDisband]:If,[rt.ClubKicked]:If,[rt.ClubJoinRequestAccepted]:If,[rt.ClubInvite]:If,[rt.ClubLevelUpReward]:uW,[rt.LikeRecieved]:If,[rt.RatingReceived]:If,[rt.FriendRequestAccepted]:If,[rt.FriendRequestSent]:If,SpectateGameNotification:fMe,PremiumGiftNotification:gMe,[rt.FirstLostGameBonus]:Es,[rt.PromoTournamentInviteSent]:Es,[rt.CashbackGenerated]:Es,[rt.HostRewardReceived]:Es,[rt.PromoTournamentRewardAvailable]:Es,StampCardCompleted:Es,StampCardStampCollected:Es};let _Me=(()=>{var t;class n{createComponentFactory(e){const i=FXt[e.notificationType];if(i)return i;throw new Error("Missing or invalid notification type ".concat(e.notificationType))}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const UXt=["reference"];function GXt(t,n){}const VXt=t=>({show:t});let vMe=(()=>{var t;class n{constructor(e,i,r,s){this.onStateChange=a=>{!0===a.opened?(this.showNotification=!0,this.elementRef.clear(),this.componentRef=this.elementRef.createComponent(this.notificationsComponentFactory.createComponentFactory(a.data)),this.componentRef.instance.notificationData=a.data,this.topBarNotifications.setCurrentNotification(this.componentRef.instance)):!1===a.opened&&(this.showNotification=!1,this.elementRef.clear(),this.componentRef&&(this.componentRef.destroy(),this.topBarNotifications.setCurrentNotification(void 0))),this.cdr.detectChanges()},this.onLogin=()=>{this.topBarNotifications.init(),this.stateSubscription=this.topBarNotifications.showNotificationSubject.subscribe(this.onStateChange)},this.onLogout=()=>{this.topBarNotifications.destroy(),this.stateSubscription&&this.stateSubscription.unsubscribe(),this.componentRef&&this.componentRef.destroy(),this.elementRef&&this.elementRef.clear(),this.cdr.detectChanges()},this.topBarNotifications=e,this.notificationsComponentFactory=i,this.authListenerService=r,this.cdr=s,this.showNotification=!1,s.detach()}ngOnInit(){this.authSubscriptionLogin=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Login)).subscribe(this.onLogin),this.authSubscriptionLogout=this.authListenerService.authStatusChangeEvent.pipe(bt(e=>e===er.Logout)).subscribe(this.onLogout),this.cdr.detectChanges()}ngOnDestroy(){this.authSubscriptionLogin&&this.authSubscriptionLogin.unsubscribe(),this.authSubscriptionLogout&&this.authSubscriptionLogout.unsubscribe(),this.onLogout()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(bg),g(_Me),g(xr),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["top-bar-notifications"]],viewQuery:function(e,i){if(1&e&&$e(UXt,5,bs),2&e){let r;je(r=He())&&(i.elementRef=r.first)}},decls:3,vars:3,consts:[[1,"top-bar__container--notification-popup",3,"ngClass"],["reference",""]],template:function(e,i){1&e&&(p(0,"div",0),U(1,GXt,0,0,"ng-template",null,1,ft),m()),2&e&&l("ngClass",ne(1,VXt,i.showNotification))},dependencies:[Xe],styles:[".top-bar__container--notification-popup{position:absolute;top:0;transform:translateY(-100%);left:0;width:100%;transition:transform .2s ease;overflow:hidden}.top-bar__container--notification-popup.show{transform:translateY(0)}.top-bar__container--notification{position:relative;top:0;height:100%;width:100%;min-height:7rem;display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between}.top-bar-notif__container--sender-avatar,.top-bar-notif__container--club-avatar{width:7rem;height:100%;padding:1rem;display:flex;align-items:center}@media only screen and (max-width: 480px){.top-bar-notif__container--sender-avatar:not(.rate),.top-bar-notif__container--club-avatar:not(.rate){width:5rem;padding:.5rem}}.top-bar-notif__container--sender-avatar .top-bar__image--replace-avatar,.top-bar-notif__container--club-avatar .top-bar__image--replace-avatar{width:100%}.top-bar-notif__container--title{font-size:1.8rem}@media only screen and (max-width: 768px){.top-bar-notif__container--title{font-size:1.4rem}}.top-bar-notif__container--content{height:100%;display:flex;justify-content:center;flex-flow:column nowrap;flex:1;text-align:left}.top-bar-notif__container--text .top-bar__text{font-size:1.4rem;text-transform:uppercase}@media only screen and (max-width: 768px){.top-bar-notif__container--text .top-bar__text{font-size:1.2rem}}@media only screen and (max-width: 480px){.top-bar-notif__container--text .top-bar__text{font-size:1rem}}.top-bar-notif__container--actions{height:100%;display:flex;flex-flow:row wrap;justify-content:center;align-items:center;padding:0 1rem}@media only screen and (max-width: 480px){.top-bar-notif__container--actions{padding:0 .5rem}}.top-bar-notif__container--actions .top-bar-notif__container--button{height:auto}.top-bar-notif__container--actions .top-bar-notif__container--button:not(.close){margin-right:.5rem}@media only screen and (min-width: 769px){.top-bar-notif__container--actions .top-bar-notif__container--button:not(.close){min-width:12rem}}\n"],encapsulation:2,changeDetection:0}),n})(),zXt=(()=>{var t;class n{constructor(e,i){this.auth=e,this.clientConfigService=i}intercept(e,i){if(!e.url.startsWith(this.clientConfigService.getConfig().platform.endPoints.api)&&!e.url.startsWith(Tb.buildData.apiUrl))return i.handle(e);const r=this.auth.getToken();if(r){const s=e.clone({headers:e.headers.set("Authorization",r)});return i.handle(s)}return i.handle(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Kd),T(Zt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();var jXt=lt.NetworkError;const HXt=[{provide:FU,useClass:(()=>{var t;class n{constructor(e){this.httpEvents=e}intercept(e,i){return i.handle(e).pipe(mh(r=>(this.httpEvents.onRequestErrorResponse(r),Wf(r&&0===r.status?new jXt:r&&r.error&&"expiredOrWrongToken"===r.error.code?new et.General.ExpiredOrWrongToken(""):r))))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(j6))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),multi:!0},{provide:FU,useClass:zXt,multi:!0}];function qXt(t,n){1&t&&(B(0,"p",3),V(1,"safeHtml")),2&t&&l("innerHtml",$(1,1,_().rulesText),Yn)}let bMe=(()=>{var t;class n{constructor(e,i){this.rulesText=null,this.tournaments=e,this.translate=i}ngOnInit(){this.translations=this.translate.onLangChange.asObservable().subscribe(e=>{this.rulesText=pi.readTranslation(this.rules,e.lang)}),this.rulesText=pi.readTranslation(this.rules,this.translate.currentLang)}ngOnDestroy(){this.translations&&this.translations.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(s1),g(ls))},t.\u0275cmp=pe({type:t,selectors:[["promo-rules"]],inputs:{rules:"rules"},decls:3,vars:1,consts:[[1,"pr__wrapper"],[1,"pr__container"],["class","pr__text",3,"innerHtml",4,"ngIf"],[1,"pr__text",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1),U(2,qXt,2,3,"p",2),m()()),2&e&&(d(2),l("ngIf",null!=i.rulesText))},dependencies:[Ne,Ta],styles:[".pr__wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:55vh;padding:3%}.pr__text[_ngcontent-%COMP%]{text-indent:1rem;font-size:1.4rem;font-weight:600;text-align:left}"]}),n})();function WXt(t,n){1&t&&B(0,"loader-image",11),2&t&&l("transparentBG",!0)}const $Xt=(t,n)=>({showUsername:!0,score:t,index:n,scoreType:"best"});function KXt(t,n){if(1&t&&B(0,"user-list-item",12),2&t){const o=n.$implicit,e=n.index;l("user",o.user)("config",cn(2,$Xt,o.score,e+1))}}function ZXt(t,n){if(1&t&&(p(0,"div",5)(1,"div",6)(2,"professionals",7),H(3),V(4,"translate"),m()(),p(5,"div",8),U(6,WXt,1,1,"loader-image",9)(7,KXt,1,5,"user-list-item",10),m()()),2&t){const o=_(2);d(2),l("leaders",o.topPlayers)("elementSize","medium"),d(),se($(4,6,o.titleTextKey)),d(3),l("ngIf",!0===o.loader),d(),l("ngForOf",o.leaderboard.items)("ngForTrackBy",o.trackByFunction)}}function QXt(t,n){if(1&t&&(p(0,"section",1,2)(2,"div",3),U(3,ZXt,8,8,"div",4),m()()),2&t){const o=_();l("list",o.leaderboard.items)("initialListCount",o.initialListCount)("step",o.scrollStep),d(3),l("ngIf",o.leaderboard)}}let CMe=(()=>{var t;class n{constructor(e,i){this.initialListCount=20,this.scrollStep=10,this.leaderboardsService=e,this.leaderboard={id:null,secondId:null,duration:null,items:[]},this.topPlayers=[],this.loader=!1,this.leadersLength=new ke,this.cdr=i,i.detach()}ngOnInit(){var e=this;return f(function*(){e.titleTextKey=e.info.state===Ha.Ended?"TOURNAMENTS.PROMO.INFO_POPUP.WINNERS":"TOURNAMENTS.PROMO.INFO_POPUP.CONTENDERS";try{e.showLoader(),e.cdr.detectChanges(),e.leaderboard=yield e.leaderboardsService.getLeaderboard("tournament",{secondId:e.info.tournamentData.poolSettings.id,limit:100}),e.topPlayers=lA()(e.leaderboard.items.slice(0,3),"user"),e.leadersLength.emit(e.topPlayers.length)}catch(i){e.leadersLength.emit(0),console.error("Promo tournament info popup get leaderboards gg error",i)}finally{e.hideLoader(),e.cdr.detectChanges()}})()}ngOnDestroy(){this.info=null}trackByFunction(e,i){return i.user.id}showLoader(){this.loader=!0}hideLoader(){this.loader=!1}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oTe),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["promo-leaderboards"]],inputs:{info:"info"},outputs:{leadersLength:"leadersLength"},decls:1,vars:1,consts:[["class","pl__wrapper","scroll-directive","",3,"list","initialListCount","step",4,"ngIf"],["scroll-directive","",1,"pl__wrapper",3,"list","initialListCount","step"],["scroll","scroll"],[1,"pl__container--main"],["class","pl__container--other-players",4,"ngIf"],[1,"pl__container--other-players"],[1,"pl__container--professionals"],[3,"leaders","elementSize"],[1,"pl__container--avatars"],[3,"transparentBG",4,"ngIf"],[3,"user","config",4,"ngFor","ngForOf","ngForTrackBy"],[3,"transparentBG"],[3,"user","config"]],template:function(e,i){1&e&&U(0,QXt,4,4,"section",0),2&e&&l("ngIf",i.leaderboard)},dependencies:[Mt,Ne,BC,uz,Oi,Is,qe],styles:[".pl__wrapper[_ngcontent-%COMP%]{height:100%;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;width:100%;height:55vh;overflow-y:auto;box-sizing:content-box!important}.pl__container--main[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.pl__container--other-players[_ngcontent-%COMP%]{order:2;flex-flow:column nowrap;justify-content:center;width:90%;margin:0 auto}@media only screen and (max-height: 580px) and (orientation: landscape){.pl__container--other-players[_ngcontent-%COMP%]{min-height:35rem}}.pl__container--professionals[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;align-items:flex-end;justify-content:center;min-height:15rem;padding-bottom:1rem}@media only screen and (max-height: 580px){.pl__container--professionals[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 440px){.pl__container--professionals[_ngcontent-%COMP%]{margin-top:0;margin-bottom:1rem;min-height:12rem}}.pl__container--avatars[_ngcontent-%COMP%]{position:relative;width:calc(100% - 2rem);margin:1rem;display:flex;flex-flow:row wrap;justify-content:flex-start}.pl__container--avatars[_ngcontent-%COMP%] > user-list-item[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();function YXt(t,n){1&t&&B(0,"img",16),2&t&&l("imgSrc",_().sponsorLogoUrl)}function JXt(t,n){if(1&t&&(p(0,"div",17)(1,"p",10),H(2),V(3,"translate"),m(),p(4,"p",18),H(5),V(6,"formatNumber"),m()()),2&t){const o=_();d(2),se($(3,2,"TOURNAMENTS.PROMO.INFO_POPUP.ENTRY")),d(3),se($(6,4,o.entry))}}function XXt(t,n){1&t&&(B(0,"p",19),V(1,"safeHtml")),2&t&&l("innerHtml",$(1,1,_().text),Yn)}let yMe=(()=>{var t;class n{constructor(e,i,r,s,a){this.clientConfigService=a,this.urlService=s,this.datePipe=e,this.translate=r,this.settings=i,this.dateFormat="dd.M.yyyy",this.activeRange=null,this.prize=null,this.text=null,this.tournamentTitle=null}ngOnInit(){this.translations=this.translate.onLangChange.asObservable().subscribe(e=>{this.readTranslations(e.lang)}),this.readTranslations(this.settings.getLanguage()),this.activeRange={from:this.datePipe.transform(1e3*this.activeHours[0].from,this.dateFormat),to:this.datePipe.transform(1e3*this.activeHours[this.activeHours.length-1].to,this.dateFormat)},this.sponsorLogoUrl=null!=this.sponsorLogo?"".concat(Lt.CONFIG.core.cdn.url).concat(Lt.CONFIG.core.cdn.path.tournaments).concat(this.sponsorLogo):this.urlService.getImageUrl("tournaments_lobby/classic_icon.png")}ngOnDestroy(){this.translations&&this.translations.unsubscribe()}readTranslations(e){this.prize=pi.readTranslation(this.prizes[0].value,e),this.text=pi.readTranslation(this.promotionalText,e),this.tournamentTitle=pi.readTranslation(this.title,e)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(sb),g(nc),g(ls),g(ii),g(Zt))},t.\u0275cmp=pe({type:t,selectors:[["promo-info"]],inputs:{sponsorLogo:"sponsorLogo",activeHours:"activeHours",entry:"entry",prizes:"prizes",title:"title",promotionalText:"promotionalText"},decls:26,vars:13,consts:[[1,"pi__wrapper"],[1,"pi__container"],[1,"pi__container--prize"],[1,"pi__text--prize"],[1,"pi__container--sponsor-logo"],["class","pi__image--sponsor-logo","empty-placeholder","","alt","sponsor logo",3,"imgSrc",4,"ngIf"],[1,"pi__container--duration"],[1,"pi__container--name"],[1,"pi__text--name"],[1,"pi__container--from"],[1,"pi__label"],[1,"pi__value"],[1,"pi__container--to"],["class","pi__container--entry",4,"ngIf"],[1,"pi__container--text"],["class","pi__text--promo",3,"innerHtml",4,"ngIf"],["empty-placeholder","","alt","sponsor logo",1,"pi__image--sponsor-logo",3,"imgSrc"],[1,"pi__container--entry"],[1,"pi__text--entry","pi__value"],[1,"pi__text--promo",3,"innerHtml"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2)(3,"p",3),H(4),m()(),p(5,"div",4),U(6,YXt,1,1,"img",5),m(),p(7,"div",6)(8,"div",7)(9,"p",8),H(10),m()(),p(11,"div",9)(12,"p",10),H(13),V(14,"translate"),m(),p(15,"p",11),H(16),m()(),p(17,"div",12)(18,"p",10),H(19),V(20,"translate"),m(),p(21,"p",11),H(22),m()(),U(23,JXt,7,6,"div",13),m(),p(24,"div",14),U(25,XXt,2,3,"p",15),m()()()),2&e&&(d(4),se(i.prize),d(2),l("ngIf",i.sponsorLogoUrl),d(4),se(i.tournamentTitle),d(3),se($(14,9,"TOURNAMENTS.PROMO.INFO_POPUP.STARTS")),d(3),se(i.activeRange.from),d(3),se($(20,11,"TOURNAMENTS.PROMO.INFO_POPUP.ENDS")),d(3),se(i.activeRange.to),d(),l("ngIf",null!=i.entry&&0!==i.entry),d(2),l("ngIf",null!=i.text))},dependencies:[Ne,$o,qe,Go,Ta],styles:[".pi__wrapper[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:55vh}.pi__container[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:100%}.pi__container--prize[_ngcontent-%COMP%]{display:block;padding:.5rem;width:90%;margin:1rem auto}.pi__container--prize[_ngcontent-%COMP%]   .pi__text--prize[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:600;text-align:center;text-transform:uppercase}.pi__container--sponsor-logo[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;align-items:center;min-height:10rem;flex:1}.pi__container--sponsor-logo[_ngcontent-%COMP%]   .pi__image--sponsor-logo[_ngcontent-%COMP%]{display:block;flex:none;max-width:90%;max-height:100%}.pi__container--name[_ngcontent-%COMP%]{position:relative;display:block;width:80%;padding:.5rem;margin:0 auto 1rem}.pi__container--name[_ngcontent-%COMP%]   .pi__text--name[_ngcontent-%COMP%]{font-size:1.8rem;text-transform:uppercase;font-weight:600;text-align:center}.pi__container--duration[_ngcontent-%COMP%]{display:block;margin:0 0 5%}.pi__container--from[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:flex-start;padding-left:25%;padding-right:25%}.pi__container--from[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;text-transform:uppercase;font-weight:600}@media only screen and (max-width: 480px){.pi__container--from[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.pi__container--from[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:nth-of-type(2){font-weight:400;flex:3}@media only screen and (max-width: 480px){.pi__container--from[_ngcontent-%COMP%]{padding-left:20%;padding-right:20%}}@media only screen and (max-width: 440px){.pi__container--from[_ngcontent-%COMP%]{padding-left:15%;padding-right:15%}}.pi__container--to[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:flex-start;padding-left:25%;padding-right:25%}.pi__container--to[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;text-transform:uppercase;font-weight:600}@media only screen and (max-width: 480px){.pi__container--to[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.pi__container--to[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:nth-of-type(2){font-weight:400;flex:3}@media only screen and (max-width: 480px){.pi__container--to[_ngcontent-%COMP%]{padding-left:20%;padding-right:20%}}@media only screen and (max-width: 440px){.pi__container--to[_ngcontent-%COMP%]{padding-left:15%;padding-right:15%}}.pi__label[_ngcontent-%COMP%]{flex:4}.pi__container--entry[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:flex-start;padding-left:25%;padding-right:25%}.pi__container--entry[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{position:relative;font-size:1.8rem;text-transform:uppercase;font-weight:600}@media only screen and (max-width: 480px){.pi__container--entry[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{font-size:1.4rem}}.pi__container--entry[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:nth-of-type(2){font-weight:400;flex:3}@media only screen and (max-width: 480px){.pi__container--entry[_ngcontent-%COMP%]{padding-left:20%;padding-right:20%}}@media only screen and (max-width: 440px){.pi__container--entry[_ngcontent-%COMP%]{padding-left:15%;padding-right:15%}}.pi__container--text[_ngcontent-%COMP%]{width:90%;margin:0 auto}.pi__text--promo[_ngcontent-%COMP%]{text-indent:1rem;font-size:1.4rem;text-align:left;font-weight:600;padding-bottom:1.5rem}"]}),n})();var Gg=ve.EIcons;const een=t=>({name:t});function ten(t,n){if(1&t){const o=Ce();p(0,"div",12)(1,"top-tab-item",13),Y("select",function(i){return oe(o),re(_(2).changeTab(i))}),B(2,"button-icon",14),m()()}if(2&t){const o=n.$implicit,e=_(2);d(),l("tabId",o.id),d(),l("bclass","promo-tournaments-options__top-tabs__bclass "+(o.id===e.currentTab?" top-tabs__selected":""))("icon",ne(3,een,o.icon))}}function nen(t,n){1&t&&B(0,"div")}function ien(t,n){1&t&&B(0,"div")}function oen(t,n){if(1&t&&U(0,ien,1,0,"div",7),2&t){_();const o=Kt(12),e=Kt(14);l("ngIf","info"===_().currentTab)("ngIfThen",o)("ngIfElse",e)}}function ren(t,n){if(1&t){const o=Ce();p(0,"promo-leaderboards",15),Y("leadersLength",function(i){return oe(o),re(_(2).handleLeaderboardTabVisibility(i))}),m()}2&t&&l("info",_(2).roomInfo)}function sen(t,n){if(1&t&&B(0,"promo-info",16),2&t){const o=_(2);l("activeHours",o.activeHours)("entry",o.entry)("prizes",o.prizes)("sponsorLogo",o.sponsorLogo)("title",o.title)("promotionalText",o.promotionalText)}}function aen(t,n){1&t&&B(0,"promo-rules",17),2&t&&l("rules",_(2).description)}function cen(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().closeDialog())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(i){return oe(o),re(_().closeDialog(i))}),m(),p(2,"div",3)(3,"top-tabs",4),U(4,ten,3,5,"div",5),m()(),p(5,"div",6),Y("swipeAction",function(i){return oe(o),re(_().changeTabViaSwipe(i))}),U(6,nen,1,0,"div",7)(7,oen,1,3,"ng-template",null,8,ft)(9,ren,1,1,"ng-template",null,9,ft)(11,sen,1,6,"ng-template",null,10,ft)(13,aen,1,1,"ng-template",null,11,ft),m()()}if(2&t){const o=Kt(8),e=Kt(10),i=_();l("popupContainerOpened",i.currentState&&i.currentState.opened)("popupContainerOptions",i.popupContainerOptions),d(),l("popupTitleType",i.popupTitleTypes.Blank)("customComponentCssClass","blank-header"),d(2),l("showBackButton",!1)("initialOpenedTab",i.currentTab)("scrollBarCustomClass","promo-tournaments-options__top-tabs__scrollbar")("scrollStyleCustomClass","promo-tournaments-options__top-tabs__scroll"),d(),l("ngForOf",i.tabs),d(),ni("pto__container--content ",i.currentTab,""),d(),l("ngIf","leaderboard"===i.currentTab)("ngIfThen",e)("ngIfElse",o)}}let SMe=(()=>{var t;class n{constructor(e,i){this.popupTitleTypes=li,this.onClick=r=>{this.closeDialog()},this.onStateChanged=r=>{this.currentState=r,this.tabs=[{id:"info",icon:Gg.BUG},{id:"rules",icon:Gg.RULES}],!0===r.opened&&(this.currentTab=r.tab.toString(),this.roomInfo=r.roomInfo,this.activeHours=r.roomInfo.tournamentData.poolSettings.activeHours,this.entry=r.roomInfo.tournamentData.poolSettings.roomSettings.transactions.bet,this.prizes=r.roomInfo.tournamentData.rewards,this.title=r.roomInfo.tournamentData.tournamentTitle,this.sponsorLogo=r.roomInfo.tournamentData.sponsorLogo,this.promotionalText=r.roomInfo.tournamentData.promoText,this.description=r.roomInfo.tournamentData.description),this.cdr.detectChanges()},this.tabs=[{id:"info",icon:Gg.BUG},{id:"rules",icon:Gg.RULES}],this.infoService=e,this.isLeaderboardsVisible=!0,this.tournamentState=Ha,this.popupContainerOptions={styleProperties:{maxWidth:"50rem",height:"auto",maxHeight:"initial"},customComponentCssClass:"pto__container--contents",customBackdropCssClass:"pto__wrapper"},this.cdr=i,i.detach()}ngOnInit(){this.popupStateSubscription=this.infoService.getStateObservable().subscribe(this.onStateChanged),this.cdr.detectChanges()}ngOnDestroy(){this.popupStateSubscription&&this.popupStateSubscription.unsubscribe(),this.infoService.closeInfoPopup()}changeTab(e,i){i&&i.stopPropagation();const r=this.tabs.findIndex(s=>s.id===e);r>=0&&r<=this.tabs.length-1&&(this.currentTab=this.tabs[r].id,this.cdr.detectChanges())}changeTabViaSwipe(e){const i=this.tabs.findIndex(r=>r.id===this.currentTab);switch(e){case sa.Right:if(0===i){this.changeTab(this.tabs[this.tabs.length-1].id);break}this.changeTab(this.tabs[i-1].id);break;case sa.Left:if(i===this.tabs.length-1){this.changeTab(this.tabs[0].id);break}this.changeTab(this.tabs[i+1].id)}}closeDialog(e){e&&e.stopPropagation(),this.infoService.closeInfoPopup(),this.cdr.detectChanges()}handleLeaderboardTabVisibility(e){e>0?(this.isLeaderboardsVisible=!0,this.tabs=[{id:"leaderboard",icon:Gg.LEADERBOARD},{id:"info",icon:Gg.BUG},{id:"rules",icon:Gg.RULES}]):(this.isLeaderboardsVisible=!1,this.tabs=[{id:"info",icon:Gg.BUG},{id:"rules",icon:Gg.RULES}],this.infoService.openInfoPopup(this.currentState.roomInfo,ry.Info)),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(k7),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["promo-tournament-options"]],features:[mn([{provide:nn,useFactory:o=>new nn("promoTournaments",o),deps:[[new jo,new zo,nn]]}])],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","customComponentCssClass","buttonCloseClicked"],[1,"promo-tournaments-options__top-tabs__container"],[3,"showBackButton","initialOpenedTab","scrollBarCustomClass","scrollStyleCustomClass"],["class","promo-tournaments-options__tabs-style ",4,"ngFor","ngForOf"],["swipe-directive","",3,"swipeAction"],[4,"ngIf","ngIfThen","ngIfElse"],["secondary",""],["leaders",""],["info",""],["rules",""],[1,"promo-tournaments-options__tabs-style"],[3,"tabId","select"],[1,"promo--tournaments__top-tabs__list-item--navigation",3,"bclass","icon"],[3,"info","leadersLength"],[3,"activeHours","entry","prizes","sponsorLogo","title","promotionalText"],[3,"rules"]],template:function(e,i){1&e&&U(0,cen,15,15,"popup-container",0),2&e&&l("ngIf",i.currentState&&i.currentState.opened)},dependencies:[Mt,Ne,kl,dl,ei,Ji,Wi,wu,bMe,CMe,yMe],styles:[".pto__container--contents[_ngcontent-%COMP%]{position:relative}.pto__container--tabs[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;flex-grow:1;align-items:center;width:100%;height:5rem;margin-bottom:1rem;padding:0 .5rem;border-radius:.8rem}@media only screen and (max-width: 360px){.pto__container--tabs[_ngcontent-%COMP%]{height:4rem}}.pto__wrappr--tab[_ngcontent-%COMP%]{display:flex;flex:1}.pto__wrappr--tab.pto__tab--hidden[_ngcontent-%COMP%]{display:none}.pto__container--tab[_ngcontent-%COMP%]{width:100%}.pto__container--tab[_ngcontent-%COMP%]   .pto__text--tab-name[_ngcontent-%COMP%]{font-size:1.8rem;text-align:center;text-transform:uppercase;line-height:3rem}@media only screen and (max-width: 530px){.pto__container--tab[_ngcontent-%COMP%]   .pto__text--tab-name[_ngcontent-%COMP%]{font-size:1.4rem}}@media only screen and (max-width: 360px){.pto__container--tab[_ngcontent-%COMP%]   .pto__text--tab-name[_ngcontent-%COMP%]{font-size:1.2rem}}"],changeDetection:0}),n})();const len=[Kte,xi,Yi,Io],uen=[H6,Z8];let den=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...uen],imports:[len]}),n})();var pen=ve.EButtonModifier;let wMe=(()=>{var t;class n{constructor(e,i){this.buttonModifier=pen,this.popupService=e,this.cdr=i,i.detach(),this.accept=new ke,this.decline=new ke,this.buttonConfirmTypes=dW,this.buttonYesDisabled=!1,this.buttonNoDisabled=!1}ngOnChanges(){this.buttonYesDisabled=!1,this.buttonNoDisabled=!1,this.cdr.detectChanges()}buttonClickAction(e){e===dW.ButtonYes?this.emitAccept():this.emitDecline(),this.popupService.hide(this.popupOptions.id),this.cdr.detectChanges()}emitAccept(){this.accept.emit(!0),this.buttonYesDisabled=!0}emitDecline(){this.decline.emit(!0),this.buttonNoDisabled=!0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["buttons-confirm"]],inputs:{popupOptions:"popupOptions"},outputs:{accept:"accept",decline:"decline"},features:[it],decls:7,vars:10,consts:[[1,"pbc__wrapper"],["data-cy","popupButtonAccept",1,"button",3,"buttonModifier","disabled","onClick"],["data-cy","popupButtonDecline",1,"button",3,"buttonModifier","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"button-text",1),Y("onClick",function(){return i.buttonClickAction(i.buttonConfirmTypes.ButtonYes)}),H(2),V(3,"translate"),m(),p(4,"button-text",2),Y("onClick",function(){return i.buttonClickAction(i.buttonConfirmTypes.ButtonNo)}),H(5),V(6,"translate"),m()()),2&e&&(d(),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("disabled",i.buttonYesDisabled),d(),ze(" ",$(3,6,"BUTTON.YES"),""),d(2),l("buttonModifier",i.buttonModifier.BUTTON_DECLINE)("disabled",i.buttonNoDisabled),d(),ze(" ",$(6,8,"BUTTON.NO"),""))},dependencies:[pn,qe],styles:[".pbc__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.pbc__wrapper[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{margin:0 .5rem;min-width:12rem}"],changeDetection:0}),n})();var dW=function(t){return t.ButtonYes="buttonYes",t.ButtonNo="buttonNo",t}(dW||{}),hen=ve.EButtonModifier;let TMe=(()=>{var t;class n{constructor(e,i){this.buttonModifier=hen,this.popupService=e,this.cdr=i,i.detach(),this.actionOne=new ke,this.actionTwo=new ke,this.buttonDecisionTypes=pW,this.buttonOneDisabled=!1,this.buttonTwoDisabled=!1}ngOnChanges(){this.buttonOneDisabled=!1,this.buttonTwoDisabled=!1,this.cdr.detectChanges()}buttonClickAction(e){e===pW.ButtonActionOne?this.emitAccept():this.emitDecline(),this.popupService.hide(this.popupOptions.id),this.cdr.detectChanges()}emitAccept(){this.actionOne.emit(!0),this.buttonOneDisabled=!0}emitDecline(){this.actionTwo.emit(!0),this.buttonTwoDisabled=!0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["buttons-decision"]],inputs:{popupOptions:"popupOptions"},outputs:{actionOne:"actionOne",actionTwo:"actionTwo"},features:[it],decls:5,vars:6,consts:[[1,"pbd__wrapper"],["data-cy","popupButtonDecisionFirst",1,"button",3,"buttonModifier","disabled","onClick"],["data-cy","popupButtonDecisionSecond",1,"button",3,"buttonModifier","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"button-text",1),Y("onClick",function(){return i.buttonClickAction(i.buttonDecisionTypes.ButtonActionOne)}),H(2),m(),p(3,"button-text",2),Y("onClick",function(){return i.buttonClickAction(i.buttonDecisionTypes.ButtonActionTwo)}),H(4),m()()),2&e&&(d(),l("buttonModifier",i.popupOptions.state.firstOption.modifier)("disabled",i.buttonOneDisabled),d(),ze(" ",i.popupOptions.state.firstButtonText,""),d(),l("buttonModifier",i.popupOptions.state.secondOption.modifier)("disabled",i.buttonTwoDisabled),d(),ze(" ",i.popupOptions.state.secondButtonText,""))},dependencies:[pn],styles:[".pbd__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.pbd__wrapper[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{margin:0 .5rem;min-width:12rem}"],changeDetection:0}),n})();var pW=function(t){return t.ButtonActionOne="actionOne",t.ButtonActionTwo="actionTwo",t}(pW||{}),men=ve.EButtonModifier;function fen(t,n){if(1&t){const o=Ce();p(0,"button-text",2),Y("onClick",function(){oe(o);const i=_();return re(i.buttonClickAction(i.popupBlockerButtons.Refresh))}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("disabled",o.buttonRefreshDisabled),d(),ze(" ",$(2,3,"BUTTON.REFRESH")," ")}}function gen(t,n){if(1&t){const o=Ce();p(0,"button-text",2),Y("onClick",function(){oe(o);const i=_();return re(i.buttonClickAction(i.popupBlockerButtons.Reload))}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("disabled",o.buttonReloadDisabled),d(),ze(" ",$(2,3,"BUTTON.REFRESH")," ")}}function _en(t,n){if(1&t){const o=Ce();p(0,"button-text",2),Y("onClick",function(){oe(o);const i=_();return re(i.buttonClickAction(i.popupBlockerButtons.OtherBlockerAction))}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("disabled",o.buttonReloadDisabled),d(),ze(" ",$(2,3,o.popupOptions.state.firstButtonText)," ")}}let PMe=(()=>{var t;class n{constructor(e,i){this.buttonModifier=men,this.popupService=e,this.cdr=i,i.detach(),this.actionRefresh=new ke,this.actionReload=new ke,this.actionOtherBlockerAction=new ke,this.buttonRefreshDisabled=!1,this.buttonReloadDisabled=!1,this.popupBlockerButtons=PO}ngOnChanges(){this.buttonRefreshDisabled=!1,this.buttonReloadDisabled=!1,this.cdr.detectChanges()}buttonClickAction(e){switch(e){case PO.Refresh:this.emitRefresh();break;case PO.Reload:this.emitReload();break;case PO.OtherBlockerAction:this.emitOtherBlockerAction()}this.popupService.hide(this.popupOptions.id),this.cdr.detectChanges()}emitRefresh(){this.actionRefresh.emit(!0),this.buttonRefreshDisabled=!0,this.cdr.detectChanges()}emitReload(){this.popupOptions.state.action&&this.popupOptions.state.action instanceof Function?(this.actionReload.emit(!0),this.buttonReloadDisabled=!0):(this.actionRefresh.emit(!0),this.buttonReloadDisabled=!0),this.cdr.detectChanges()}emitOtherBlockerAction(){this.popupOptions.state.action&&this.popupOptions.state.action instanceof Function?(this.actionOtherBlockerAction.emit(!0),this.buttonReloadDisabled=!0):(this.actionRefresh.emit(!0),this.buttonReloadDisabled=!0),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["buttons-blocker"]],inputs:{popupOptions:"popupOptions"},outputs:{actionRefresh:"actionRefresh",actionReload:"actionReload",actionOtherBlockerAction:"actionOtherBlockerAction"},features:[it],decls:4,vars:3,consts:[[1,"pbb__wrapper"],["class","pbb__button--refresh button","data-cy","popupButtonAccept",3,"buttonModifier","disabled","onClick",4,"ngIf"],["data-cy","popupButtonAccept",1,"pbb__button--refresh","button",3,"buttonModifier","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,fen,3,5,"button-text",1)(2,gen,3,5,"button-text",1)(3,_en,3,5,"button-text",1),m()),2&e&&(d(),l("ngIf",i.popupOptions.state.withRefreshButton&&!i.popupOptions.state.action&&!i.popupOptions.state.firstButtonText),d(),l("ngIf",!i.popupOptions.state.withRefreshButton&&i.popupOptions.state.action&&!i.popupOptions.state.firstButtonText),d(),l("ngIf",i.popupOptions.state.firstButtonText&&i.popupOptions.state.action))},dependencies:[Ne,pn,qe],styles:[".pbb__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.pbb__wrapper[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{margin:0 .5rem;min-width:12rem}"],changeDetection:0}),n})();var PO=function(t){return t.Refresh="refresh",t.Reload="reload",t.OtherBlockerAction="other-action",t}(PO||{}),ven=ve.EButtonModifier;function ben(t,n){1&t&&(p(0,"span"),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"TEXT.OK")))}function Cen(t,n){if(1&t&&(p(0,"span"),H(1),m()),2&t){const o=_();d(),se(o.popupOptions.state.firstButtonText)}}let IMe=(()=>{var t;class n{constructor(e,i){this.buttonModifier=ven,this.popupTypes=Bs,this.popupService=e,this.cdr=i,i.detach(),this.action=new ke,this.buttonDisabled=!1}ngOnChanges(){this.buttonDisabled=!1,this.cdr.detectChanges()}buttonClickAction(){this.emitAction(),this.popupService.hide(this.popupOptions.id),this.cdr.detectChanges()}emitAction(){this.action.emit(!0),this.buttonDisabled=!0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["buttons-basic"]],inputs:{popupOptions:"popupOptions"},outputs:{action:"action"},features:[it],decls:5,vars:4,consts:[[1,"pbbs__wrapper"],["data-cy","popupButtonAccept",1,"pbbs__button--action","button",3,"buttonModifier","disabled","onClick"],[4,"ngIf","ngIfElse"],["text",""]],template:function(e,i){if(1&e&&(p(0,"section",0)(1,"button-text",1),Y("onClick",function(){return i.buttonClickAction()}),U(2,ben,3,3,"span",2)(3,Cen,2,1,"ng-template",null,3,ft),m()()),2&e){const r=Kt(4);d(),l("buttonModifier",i.buttonModifier.BUTTON_ATTENTION)("disabled",i.buttonDisabled),d(),l("ngIf",i.popupOptions.state.type===i.popupTypes.Notification)("ngIfElse",r)}},dependencies:[Ne,pn,qe],styles:[".pbbs__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.pbbs__wrapper[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{margin:0 .5rem;min-width:12rem}"],changeDetection:0}),n})();const yen=t=>({name:t});function Sen(t,n){if(1&t){const o=Ce();p(0,"div",2)(1,"button-icon-text",3),Y("onClick",function(){const r=oe(o).$implicit;return re(_().buttonClickAction(r.action))}),H(2),V(3,"translate"),m()()}if(2&t){const o=n.$implicit;d(),l("bclass","pbm__button__bclass")("ngClass",o.provider)("buttonModifier",o.buttonModifier)("icon",ne(8,yen,o.icon))("disabled",!1),d(),ze(" ",$(3,6,o.text)," ")}}let MMe=(()=>{var t;class n{constructor(e,i){this.popupService=e,this.cdr=i}buttonClickAction(e){e(),this.popupService.hide(this.popupOptions.id),this.cdr.detectChanges()}trackByFn(e,i){return i.provider}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Cn),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["buttons-merge"]],inputs:{popupOptions:"popupOptions"},decls:2,vars:1,consts:[[1,"pbm__wrapper"],["class","pbm__button--container",4,"ngFor","ngForOf"],[1,"pbm__button--container"],["data-cy","popupButtonMergeFacebook",1,"pbm__button",3,"bclass","ngClass","buttonModifier","icon","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,Sen,4,10,"div",1),m()),2&e&&(d(),l("ngForOf",i.popupOptions.state.buttons))},dependencies:[Xe,Mt,so,qe],styles:[".pbm__button[_ngcontent-%COMP%]{width:26rem;margin-bottom:1rem}@media only screen and (max-width: 768px){.pbm__button[_ngcontent-%COMP%]{width:23rem!important}}@media only screen and (max-width: 320px){.pbm__button[_ngcontent-%COMP%]{width:20rem!important}}"],changeDetection:0}),n})();const Ten=[xi,Yi,Io,No],Pen=[];let Ien=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[...Pen],imports:[Ten]}),n})();Wu(e5,[Xe,Ne,Ji,Wi,IMe,wMe,TMe,PMe,MMe],[Ta]);class Men{constructor(n,o,e="",i=""){this.http=n,this.reCaptchaVerificationService=o,this.prefix=e,this.suffix=i}getTranslation(n){return this.reCaptchaVerificationService.isCaptchaEnabled()?Ks(this.reCaptchaVerificationService.verifyCaptcha("lgSt")).pipe(es(o=>this.fetchTranslations(n,o))):this.fetchTranslations(n)}fetchTranslations(n,o){let e=new Cl;return o&&(e=e.set("csec",o)),this.http.get(this.prefix+n+this.suffix,{headers:e})}}var Oen=ve.EButtonModifier,Een=ve.EIcons;function xen(t,n){if(1&t){const o=Ce();p(0,"popup-container",1),Y("closePopup",function(){return oe(o),re(_().hide())}),p(1,"popup-title-bar",2),Y("buttonCloseClicked",function(){return oe(o),re(_().hide())}),m(),p(2,"div",3)(3,"form",4),Y("submit",function(){return oe(o),re(_().sendEmailData())}),p(4,"div",5),B(5,"user-input",6),V(6,"translate"),m(),p(7,"div",5),B(8,"user-input",7),V(9,"translate"),m(),p(10,"div",5),B(11,"user-input",8),V(12,"translate"),m(),p(13,"button-text",9),H(14),V(15,"translate"),m()()()()}if(2&t){const o=_();l("popupContainerOpened",o.showPopup)("popupContainerOptions",o.popupContainerOptions),d(),l("popupTitleType",o.popupTitleTypes.Logo)("customComponentCssClass","account-merge__title-container"),d(2),l("formGroup",o.registerForm),d(2),l("icon",o.EIcons.MESSAGE)("type","email")("errorMessage",o.formErrors.email)("placeholder",$(6,20,"PLACEHOLDERS.EMAIL")),d(3),l("icon",o.EIcons.LOCKER)("type","password")("errorMessage",o.formErrors.password)("placeholder",$(9,22,"PLACEHOLDERS.PASSWORD")),d(3),l("icon",o.EIcons.LOCKER)("type","password")("errorMessage",o.formErrors.password_repeat)("placeholder",$(12,24,"PLACEHOLDERS.REPEAT_PASS")),d(2),l("buttonModifier",o.buttonModifier.BUTTON_ATTENTION)("type","submit"),d(),ze(" ",$(15,26,"EDIT_PROFILE.SAVE_CHANGES")," ")}}let OMe=(()=>{var t;class n{constructor(e,i,r,s,a){this.EIcons=Een,this.popupTitleTypes=li,this.buttonModifier=Oen,this.accountMergeService=e,this.fieldValidatorFactory=r,this.formBuilder=i,this.translation=s,this.formFieldsConfig=Lt.CONFIG.core.validations.formFields,this.formErrors={email:"",password:"",password_repeat:""},this.messages={email:{required:"",maxlength:"",pattern:""},password:{required:"",minlength:"",maxlength:"",dontmatch:""},password_repeat:{required:"",minlength:"",maxlength:"",dontmatch:""}},this.cdr=a,a.detach()}ngOnInit(){this.accountMergeSubscription=this.accountMergeService.get().subscribe(e=>{this.showPopup=e,this.cdr.detectChanges()}),this.getTranslations(),this.buildForm(),this.cdr.detectChanges()}ngOnDestroy(){this.accountMergeSubscription&&this.accountMergeSubscription.unsubscribe()}sendEmailData(){if(this.formErrors={email:"",password:"",password_repeat:""},!0===gc.isFormValid(this.registerForm))this.accountMergeService.sendEmailMergeData(this.registerForm.value.email,this.registerForm.value.password),this.reset();else for(let e in gc.getFormErroredFields(this.registerForm))if(e)for(let i in this.registerForm.controls[e].errors)i&&this.registerForm.controls[e].errors[i]&&(this.formErrors[e]=this.messages[e][i]);this.cdr.detectChanges()}hide(){this.accountMergeService.closeEmailPopup(),this.reset(),this.cdr.detectChanges()}reset(){this.registerForm.reset(),this.formErrors={email:"",password:"",password_repeat:""}}buildForm(){this.registerForm=this.formBuilder.group({email:["",Ln.compose([...this.fieldValidatorFactory.createEmailValidator().validators,Ln.required])],password:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])],password_repeat:["",Ln.compose([...this.fieldValidatorFactory.createPasswordValidator().validators,Ln.required])]},{validator:gc.getSameFieldsValidatorConfig(["password","password_repeat"])})}getTranslations(){let e=this.translation.getParsedTranslation("API_ERRORS.EmailNotValid"),i=this.translation.getParsedTranslation("API_ERRORS.PasswordLength",[this.formFieldsConfig.password.minLength,this.formFieldsConfig.password.maxLength]),r=this.translation.getParsedTranslation("API_ERRORS.PasswordDontMatch");""!==e&&""!==i&&(this.messages.email.required=e,this.messages.email.maxlength=e,this.messages.email.pattern=e,this.messages.password.required=i,this.messages.password.minlength=i,this.messages.password.maxlength=i,this.messages.password.dontmatch=r,this.messages.password_repeat.required=i,this.messages.password_repeat.minlength=i,this.messages.password_repeat.maxlength=i,this.messages.password_repeat.dontmatch=r,this.messages.password_repeat.dontmatch=r)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Jb),g(td),g(wa),g(pi),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["account-merge"]],decls:1,vars:1,consts:[[3,"popupContainerOpened","popupContainerOptions","closePopup",4,"ngIf"],[3,"popupContainerOpened","popupContainerOptions","closePopup"],[3,"popupTitleType","customComponentCssClass","buttonCloseClicked"],[1,"account-merge__container--form","form__content"],["novalidate","",3,"formGroup","submit"],[1,"account-merge__input--container"],["formControlName","email",3,"icon","type","errorMessage","placeholder"],["formControlName","password",3,"icon","type","errorMessage","placeholder"],["formControlName","password_repeat",3,"icon","type","errorMessage","placeholder"],[3,"buttonModifier","type"]],template:function(e,i){1&e&&U(0,xen,16,28,"popup-container",0),2&e&&l("ngIf",i.showPopup)},dependencies:[Ne,pn,Ji,Wi,il,Su,Ql,yu,wl,Yl,qe],styles:[".account-merge__container--form[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;max-width:50rem;margin:0 auto;padding:2rem;max-height:80vh}@media only screen and (max-width: 768px){.account-merge__container--form[_ngcontent-%COMP%]{padding:1rem}}.account-merge__input--container[_ngcontent-%COMP%]{min-height:7.7rem}@media only screen and (max-width: 768px){.account-merge__input--container[_ngcontent-%COMP%]{min-height:6.7rem}}"],changeDetection:0}),n})(),Aen=(()=>{var t;class n extends M_{constructor(e,i,r,s,a){super(e,i),this.appLanguage=a,this.toast=r,this.userService=s}setLanguage(e=Lt.CONFIG.platform.languages.default){const i=this.appLanguage.validateLanguage(e);this.userService.updateSettings({lang:i}).then(()=>{super.setLanguage(e),window.location.reload()}).catch(r=>{console.error("Set language error: ",r),this.toast.error("API_ERRORS.ServerError")})}getLanguage(){return this.appLanguage.getAppLanguage()}setCountry(e="XX"){this.userService.updateSettings({country:e}).then(()=>{super.setCountry(e)}).catch(i=>{console.error("Set country error: ",i),this.toast.error("API_ERRORS.ServerError")})}getCountry(){return this.store.selectUserState().settings.country}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ci),T(J),T(Dt),T(Kr),T(Ma))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function Ren(t,n){if(1&t&&(p(0,"p",16),H(1),m()),2&t){const o=_();d(),se(o.invite.description)}}const jD=t=>[t];function ken(t,n){if(1&t){const o=Ce();p(0,"button-text",17),Y("onClick",function(){return oe(o),re(_().onDownloadClick())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_ACTION)("loading",o.buttons.download.loading)("disabled",o.buttons.download.disabled),d(),ze(" ",yt(2,4,o.buttons.download.text.key,ne(7,jD,o.buttons.download.text.params))," ")}}function Len(t,n){if(1&t){const o=Ce();p(0,"button-text",18),Y("onClick",function(){return oe(o),re(_().onAcceptClick())}),H(1),V(2,"translate"),m()}if(2&t){const o=_();l("buttonModifier",o.EButtonModifier.BUTTON_ATTENTION)("loading",o.buttons.accept.loading)("disabled",o.buttons.accept.disabled),d(),ze(" ",yt(2,4,o.buttons.accept.text.key,ne(7,jD,o.buttons.accept.text.params))," ")}}const Den=()=>({key:"CUSTOM_GAMES.OPTIONS.bet"}),Ben=()=>({key:"CUSTOM_GAMES.OPTIONS.reward"});let EMe=(()=>{var t;class n extends Dh{constructor(e,i){super(),this.ECurrencyType=ln,this.EGameState=_g,this.EButtonModifier=ve.EButtonModifier,this.download=new ke,this.accept=new ke,this.decline=new ke,this.cdr=i,this.cdr.detach(),this.buttons={accept:{visible:!0,disabled:!1,loading:!1,text:{key:"CUSTOM_GAMES.JOIN"}},download:{visible:!1,disabled:!1,loading:!1,text:{key:"CUSTOM_GAMES.DOWNLOAD"}},decline:{visible:!0,disabled:!1,loading:!1,text:{key:"CUSTOM_GAMES.DECLINE"}}}}ngOnInit(){super.ngOnInit()}ngOnChanges(e){this.updateView()}onAcceptClick(){this.accept.emit()}onDeclineClick(){this.decline.emit()}onDownloadClick(){this.download.emit()}updateView(){this.invite&&(this.profile=Lo.toPlatformProfile(this.invite.profile)),this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Zt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["game-invite-notification"]],inputs:{buttons:"buttons",invite:"invite"},outputs:{download:"download",accept:"accept",decline:"decline"},features:[Ht,it],decls:22,vars:32,consts:[[1,"game-invite__container"],[1,"game-invite__player-section"],[1,"game-invite__container--avatar"],[3,"user","isLink","hasUsername"],[1,"game-invite__container-player-info"],["data-cy","customRoomNotificationSenderUsername",1,"game-invite__player-username"],["data-cy","customRoomNotificationText",1,"game-invite__invite-text"],[1,"game-invite__room-info-section"],["class","game-invite__description",4,"ngIf"],[1,"game-invite__room-info-section--transactions"],["data-cy","customRoomNotificationBet",1,"game-invite__currency-label",3,"value","type","text"],["data-cy","customRoomNotificationReward",1,"game-invite__currency-label",3,"value","type","text"],[1,"game-invite__actions-section"],["class","game-invite__actions-button",3,"buttonModifier","loading","disabled","onClick",4,"ngIf"],["class","game-invite__actions-button","data-cy","customRoomNotificationAcceptButton",3,"buttonModifier","loading","disabled","onClick",4,"ngIf"],["data-cy","customRoomNotificationDeclineButton",1,"game-invite__actions-button",3,"buttonModifier","loading","disabled","onClick"],[1,"game-invite__description"],[1,"game-invite__actions-button",3,"buttonModifier","loading","disabled","onClick"],["data-cy","customRoomNotificationAcceptButton",1,"game-invite__actions-button",3,"buttonModifier","loading","disabled","onClick"]],template:function(e,i){1&e&&(p(0,"section",0)(1,"div",1)(2,"div",2),B(3,"avatar",3),m(),p(4,"div",4)(5,"p",5),H(6),m(),p(7,"p",6),H(8),V(9,"translate"),V(10,"translate"),m()()(),p(11,"div",7),U(12,Ren,2,1,"p",8),p(13,"div",9),B(14,"currency-label",10)(15,"currency-label",11),m()(),p(16,"div",12),U(17,ken,3,9,"button-text",13)(18,Len,3,9,"button-text",14),p(19,"button-text",15),Y("onClick",function(){return i.onDeclineClick()}),H(20),V(21,"translate"),m()()()),2&e&&(d(3),l("user",i.profile)("isLink",!0)("hasUsername",!1),d(3),se(i.invite.profile.username),d(2),ze(" ",yt(9,18,"GAME_INVITE.INVITE_TEXT",ne(26,jD,$(10,21,"PLATFORM_IDS."+i.invite.gameName).toLowerCase())),""),d(4),l("ngIf",i.invite.description),d(2),l("value",i.invite.bet)("type",i.ECurrencyType.Chips)("text",pt(28,Den)),d(),l("value",i.invite.reward.amount)("type",i.invite.reward.currencyType)("text",pt(29,Ben)),d(2),l("ngIf",i.buttons.download.visible),d(),l("ngIf",i.buttons.accept.visible),d(),l("buttonModifier",i.EButtonModifier.BUTTON_NEGATIVE)("loading",i.buttons.decline.loading)("disabled",i.buttons.decline.disabled),d(),ze(" ",yt(21,23,i.buttons.decline.text.key,ne(30,jD,i.buttons.decline.text.params))," "))},dependencies:[Ne,Bo,pn,Yh,qe],styles:[".game-invite__container[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-around}.game-invite__player-section[_ngcontent-%COMP%]{display:flex;width:33.333%;min-width:25rem;justify-content:center;padding:1rem;flex-grow:1}.game-invite__room-info-section[_ngcontent-%COMP%]{width:33.333%;min-width:25rem;display:flex;padding:1rem;flex-grow:1;align-items:center;flex-flow:column;justify-content:center}.game-invite__room-info-section--transactions[_ngcontent-%COMP%]{display:flex;align-items:center}.game-invite__actions-section[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:25rem;padding:1rem;width:33.333%;flex-grow:1}.game-invite__container--avatar[_ngcontent-%COMP%]{width:8rem;height:8rem;align-self:center;margin:0 5%;flex-shrink:0}.game-invite__container-player-info[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-content:center;justify-content:center}.game-invite__player-username[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;padding:1% 0}.game-invite__invite-text[_ngcontent-%COMP%]{font-size:1.8rem;width:100%;padding:1% 0}.game-invite__currency-label[_ngcontent-%COMP%]{width:45%;margin:0 auto;font-size:1.6rem}@media only screen and (max-width: 440px){.game-invite__currency-label[_ngcontent-%COMP%]{font-size:1.4rem}}.game-invite__actions-button[_ngcontent-%COMP%]{width:45%;max-width:20rem}"],changeDetection:0}),n})();var hW=nt.EPermissionModule,Nen=nt.EModuleAction;const Fen=(t,n)=>({show:t,hide:n});function Uen(t,n){if(1&t){const o=Ce();p(0,"game-invite-notification",2),Y("accept",function(){oe(o);const i=_();return re(i.onAccept(i.currentInvite))})("decline",function(){oe(o);const i=_();return re(i.onDecline(i.currentInvite))}),m()}if(2&t){const o=_();l("ngClass",cn(3,Fen,o.showAnimation,!o.showAnimation))("invite",o.currentInvite)("buttons",o.buttons)}}let xMe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G){this.showAnimation=!1,this.subscriptions=new ie.List,this.onInvite=K=>{this.services.soundService.play(dn.OpponentFound),this.queue.add(new Lm(()=>{const te=this.services.gamesState.getGamesState().find(ee=>ee.id===K.gameName).currentState;this.buttons=this.createButtons(),this.updateButtonsByGameState(te),this.currentInvite=K,this.showAnimation=!0,this.services.cdr.detectChanges()}))},this.onClose=()=>{this.showAnimation=!1,this.services.cdr.detectChanges(),this.messageProcessDelay=setTimeout(()=>{this.currentInvite=void 0,this.queue.messageProcessed(),this.services.cdr.detectChanges()},300)},this.onGameStateUpdate=K=>{this.currentInvite&&this.currentInvite.gameName===K.updatedState.id&&this.updateButtonsByGameState(K.updatedState.currentState)},this.onPlayClientStateTransition=K=>{this.services.dropNotification.shouldShow(K.to,K.data)||(!K.data.acceptInviteModel||this.currentInvite&&K.data.acceptInviteModel.viewModel.id!==this.currentInvite.roomId)&&(this.queue.clear(),this.closeCurrentInvite())},this.onCurrentGameLobbyRoom=K=>{this.currentInvite&&K&&K.model.id===this.currentInvite.roomId&&!K.isSpectating&&(this.queue.clear(),this.closeCurrentInvite())},this.services={popup:u,gamesState:r,communication:i,playClient:e,toast:s,navigation:a,dropNotification:c,soundService:h,store:b,permissions:w,cdr:R,offerService:G},this.queue=new S4,this.listeners=new ie.List,R.detach()}ngOnInit(){this.services.dropNotification.initialized&&this.init(),this.initListener=this.services.dropNotification.onInit(()=>this.init()),this.disposeListener=this.services.dropNotification.onDispose(()=>this.dispose()),this.services.cdr.detectChanges()}init(){this.buttons=this.createButtons(),this.services.dropNotification.inviteList.forEach(e=>this.onInvite(e)),this.gameUpdateSubscription=this.services.gamesState.gameStateUpdateEvents.pipe(bt(e=>e instanceof $6)).subscribe(this.onGameStateUpdate),this.listeners.add(this.services.dropNotification.onInvite(this.onInvite)),this.listeners.add(this.services.dropNotification.onClose(this.onClose)),this.listeners.add(this.services.playClient.stateEvents.onClientStateTransition(this.onPlayClientStateTransition)),this.subscriptions.add(this.services.store.customRoomLobby.subscribeCurrentGameLobbyRoom().subscribe(this.onCurrentGameLobbyRoom)),this.services.cdr.detectChanges()}ngOnDestroy(){this.initListener&&this.initListener.detach(),this.disposeListener&&this.disposeListener.detach(),this.dispose()}onAccept(e){var i=this;return f(function*(){var r,s,a;if(i.services.store.selectWallet().chips<e.bet)i.services.offerService.offerCurrency({targetValue:e.bet,itemType:Fe.TG.ChipPack,description:{key:"POPUP.BUY_CHIPS_QUESTION"}});else{if(!i.services.permissions.getActionPermission(i.getModuleByRoomType(e.roomType),Nen.Join).isPermitted)return i.services.toast.warn("POPUP.DISABLED_FROM_CONFIG");if(null!==(r=e.payload)&&void 0!==r&&r.clubId&&(null===(s=e.payload)||void 0===s?void 0:s.clubId)!==(null===(a=i.services.store.clubs.selectCurrentClub())||void 0===a||null===(a=a.clubState)||void 0===a||null===(a=a.clubProfile)||void 0===a?void 0:a.id))return i.closeCurrentInvite(),i.services.toast.warn("CLUBS.USER_NOT_IN_CLUB");try{i.updateButton("accept",{loading:!0}),i.updateButton("decline",{disabled:!0}),i.services.cdr.detectChanges(),yield i.services.dropNotification.accept(e),i.queue.clear(),i.closeCurrentInvite()}catch(u){u instanceof lt.NetworkError?i.services.toast.error("ERRORS.CONNECTION_ERROR"):u===Ds.ServerDisconnect||u instanceof et.Timeout||u instanceof lt.RoomConnectReject||u instanceof et.StateError?(i.services.toast.warn("CUSTOM_GAMES.ROOM_DESTROYED"),i.closeCurrentInvite()):u instanceof et.Duplication?(i.closeCurrentInvite(),i.services.toast.warn("ERRORS.SEAT_TAKEN")):u instanceof lt.GenericError?(i.closeCurrentInvite(),i.services.toast.warn("CUSTOM_GAMES.OWNER_REMOVED_YOU")):u instanceof lt.ActionInProgress?i.services.toast.warn("PLEASE_WAIT"):u instanceof Cr?console.warn("Accept promise cancelled"):i.services.toast.warn("ERRORS.SOMETHING_WRONG"),console.warn(u)}finally{i.updateButton("accept",{loading:!1}),i.updateButton("decline",{disabled:!1}),i.services.cdr.detectChanges()}}})()}onDecline(e){this.services.dropNotification.decline(e),this.closeCurrentInvite()}closeCurrentInvite(){this.services.dropNotification.close()}dispose(){clearTimeout(this.messageProcessDelay),this.gameUpdateSubscription&&this.gameUpdateSubscription.unsubscribe(),this.listeners.forEach(e=>e.detach()),this.subscriptions.forEach(e=>e.unsubscribe()),this.showAnimation=!1,this.currentInvite=void 0,this.queue=new S4,this.services.cdr.detectChanges()}createButtons(){return{accept:{visible:!0,disabled:!1,loading:!1,text:{key:"CUSTOM_GAMES.JOIN"}},download:{visible:!1,disabled:!1,loading:!1,text:{key:"CUSTOM_GAMES.DOWNLOAD"}},decline:{visible:!0,disabled:!1,loading:!1,text:{key:"CUSTOM_GAMES.DECLINE"}}}}updateButton(e,i){this.buttons[e]=SD(i,this.buttons[e]),this.buttons={...this.buttons}}updateButtonsByGameState(e){this.updateButton("accept",{visible:e===_g.Ready});const i={key:""};e===_g.Download?i.key="CUSTOM_GAMES.DOWNLOAD":e===_g.Update&&(i.key="CUSTOM_GAMES.UPDATE"),this.updateButton("download",{visible:!this.buttons.accept.visible,loading:e===_g.Downloading,text:{key:i.key||this.buttons.download.text.key}}),this.services.cdr.detectChanges()}getModuleByRoomType(e){switch(e){case Jt.RoomType.Custom:return hW.CustomGames;case Jt.RoomType.BlitzTournament:return hW.CustomBlitzTournaments;default:return hW.CustomGames}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(oo),g(Ri),g(Zn),g(Dt),g(Yt),g(o6),g(Cn),g(Mo),g(J),g(Ti),g(Re),g(Sc))},t.\u0275cmp=pe({type:t,selectors:[["game-invite-drop-notification"]],decls:2,vars:1,consts:[[1,"game-invite__drop--notification-container"],["class","game-invite__drop--notification",3,"ngClass","invite","buttons","accept","decline",4,"ngIf"],[1,"game-invite__drop--notification",3,"ngClass","invite","buttons","accept","decline"]],template:function(e,i){1&e&&(p(0,"section",0),U(1,Uen,1,6,"game-invite-notification",1),m()),2&e&&(d(),l("ngIf",i.currentInvite))},dependencies:[Xe,Ne,EMe],styles:["[_nghost-%COMP%]{display:block;position:absolute;top:0;width:100%}.game-invite__drop--notification-container[_ngcontent-%COMP%]{display:flex;justify-content:center;min-height:inherit}.game-invite__drop--notification[_ngcontent-%COMP%]{transform:translateY(-100%);overflow:hidden;z-index:10002;min-width:60%;min-height:15rem}@media screen and (max-width: 768px){.game-invite__drop--notification[_ngcontent-%COMP%]{width:90%}}.game-invite__drop--notification.show[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_drop .2s forwards}.game-invite__drop--notification.hide[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_lift .2s forwards}@keyframes _ngcontent-%COMP%_lift{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes _ngcontent-%COMP%_drop{to{transform:translateY(0)}}"],changeDetection:0}),n})();var Gen=__webpack_require__(48265),Ven=__webpack_require__.n(Gen);const zen=(t,n)=>({"spin-players":t,"stop-players-spin":n});let AMe=(()=>{var t;class n{constructor(e,i){this.urlService=e,this.cdr=i,i.detach()}ngOnInit(){this.startAnimation()}startAnimation(){this.player={avatarUrl:this.urlService.getImageUrl("matching/fake_spin.jpg"),spinning:!0},this.updateView()}stopAnimation(e,i){e=e.filter((s,a)=>-1===i.indexOf(a));const r=this.randomIndexGenerator(e.length);return this.player={avatarUrl:this.urlService.getImageUrl(e[r]),spinning:!1},this.updateView(),r}randomIndexGenerator(e){return Math.floor(Math.random()*e)}updateView(){this.cdr.detectChanges()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(ii),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["spining-avatar"]],decls:5,vars:9,consts:[[1,"spining-avatar__matching__container--motion"],[1,"spining-avatar__spin__image",3,"ngClass"],["empty-placeholder","",1,"spining-avatar__matching__image--spinner",3,"imgSrc","src"],["empty-placeholder","",1,"spining-avatar__matching__cover__image",3,"imgSrc"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1),B(2,"img",2),m(),B(3,"img",3),V(4,"transformUrl"),m()),2&e&&(d(),l("ngClass",cn(6,zen,!0===i.player.spinning,!1===i.player.spinning)),d(),l("imgSrc",i.player.avatarUrl)("src",i.player.avatarUrl,Wn),d(),l("imgSrc",$(4,4,"matching/cover.png")))},dependencies:[Xe,$o,uo],styles:[".spining-avatar__matching__container--motion[_ngcontent-%COMP%]{position:relative;width:12rem;height:12rem;overflow:hidden;margin:.2rem;transform:translateZ(0);padding:.1rem}.spining-avatar__matching__container--motion[_ngcontent-%COMP%]:nth-of-type(3){margin-left:.2rem}@media only screen and (max-width: 768px){.spining-avatar__matching__container--motion[_ngcontent-%COMP%]{width:10rem;height:10rem}}@media only screen and (max-width: 480px){.spining-avatar__matching__container--motion[_ngcontent-%COMP%]{width:8rem;height:8rem}}@media only screen and (max-height: 480px){.spining-avatar__matching__container--motion[_ngcontent-%COMP%]{width:8rem;height:8rem}}.spining-avatar__matching__image--spinner[_ngcontent-%COMP%]{margin-top:-.5rem;width:100%}.spining-avatar__spin__image[_ngcontent-%COMP%]{width:100%}.spining-avatar__matching__cover__image[_ngcontent-%COMP%]{position:absolute;top:-2px;left:0;width:13rem;height:12.2rem;transform:translateZ(0);z-index:2}"],changeDetection:0}),n})();var jen=ve.EIcons;const Hen=["avatars"];function qen(t,n){1&t&&B(0,"spining-avatar",16,17)}function Wen(t,n){if(1&t&&(p(0,"p",18)(1,"span",19),H(2),V(3,"translate"),m(),B(4,"icon-component",20),p(5,"span",21),H(6),V(7,"formatNumber"),m()()),2&t){const o=_();l("ngClass",o.customClass),d(2),ze("",$(3,4,"LOBBY.BET")," "),d(2),l("icon",o.iconNames.CHIP),d(2),se($(7,6,o.poolSettings.roomSettings.transactions.bet))}}function $en(t,n){if(1&t&&(p(0,"p",22)(1,"span",23),H(2),V(3,"translate"),m()()),2&t){const o=_();d(2),se($(3,1,"LOBBY.ROOM_NAMES."+o.poolSettings.id.toUpperCase()))}}function Ken(t,n){if(1&t&&(p(0,"span",15),H(1),V(2,"date"),m()),2&t){const o=_();d(),se(yt(2,1,o.averageWaitTimeSeconds,"HH:mm:ss"))}}function Zen(t,n){1&t&&(p(0,"span",15),H(1),V(2,"translate"),m()),2&t&&(d(),se($(2,1,"MATCHMAKING.ESTIMATING_AVERAGE_TIME")))}let RMe=(()=>{var t;class n{constructor(e,i,r,s){this.choosedAvatarIndexes=[],this.iconNames=jen,this.customClass="",this.onSearchTimerTick=()=>{this.timeElapsedInMatchmaking+=1e3,this.cdr.detectChanges()},this.nonGamblingStyleEnabled=rl.nonGamblingStyleEnabled,this.otherPlayersArray=[],this.soundService=e,this.titleTranslationKey="HINTS.SEARCH_OPPONENTS",this.urlService=i,this.toaster=r,this.averageWaitTimeSeconds=0,this.cdr=s,s.detach()}ngOnChanges(e){e.popupState&&e.popupState.currentValue&&(this.customClass="".concat(this.poolSettings.roomSettings.trackingId.replace(".","-")),(this.popupState.to===yn.Searching||this.popupState.to===Ve.ERoomState.Waiting)&&(this.restartAnimation(),this.popupState.to===yn.Searching&&this.popupState.from!==yn.RoomFound&&this.resetSearchTimer()),this.popupState.to===Ve.ERoomState.Ready&&this.onGameFound()),e.poolStats&&e.poolStats.currentValue&&(this.averageWaitTimeSeconds=e.poolStats.currentValue.avgSessionLifetime>0?new Date(1970,0,1).setMilliseconds(1e3*e.poolStats.currentValue.avgSessionLifetime):0),this.cdr.detectChanges()}ngOnDestroy(){this.clearSearchTimer(),clearInterval(this.spinInterval),this.soundService.stop(this.loopSoundId)}trackByFunction(e){return e}restartAnimation(){this.otherPlayersArray=Array(this.poolSettings.roomSettings.players.count-1),this.loopSoundId=this.soundService.play(dn.MatchmakingRoll,{loop:!0}),this.changeTitle("HINTS.SEARCH_OPPONENTS")}stopAnimation(){const e=Ven()([800,1e3,500]);let i=0;this.spinInterval=setInterval(()=>{if(this.avatarsComponents&&this.avatarsComponents.toArray()[i]){const r=this.avatarsComponents.toArray()[i].stopAnimation(this.avatarsAssets,this.choosedAvatarIndexes);this.choosedAvatarIndexes.push(r),this.soundService.play(dn.OpponentFound),i++,i===this.otherPlayersArray.length&&this.clearAvatarAnimation()}else this.clearAvatarAnimation();this.cdr.detectChanges()},e[i])}clearAvatarAnimation(){clearInterval(this.spinInterval),this.changeTitle("MATCHMAKING.GAME_FOUND"),this.clearSearchTimer(),this.soundService.play(dn.GameFound),this.cdr.detectChanges()}onGameFound(){this.stopAnimation(),this.clearSearchTimer(),this.soundService.stop(this.loopSoundId)}changeTitle(e){this.titleTranslationKey=e}resetSearchTimer(){this.clearSearchTimer(),this.timeElapsedInMatchmaking=new Date(1970,0,1).setMilliseconds(0),this.searchTimer=setInterval(this.onSearchTimerTick,1e3)}clearSearchTimer(){clearInterval(this.searchTimer)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Mo),g(ii),g(Dt),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["matchmaking-avatars-animation"]],viewQuery:function(e,i){if(1&e&&$e(Hen,5),2&e){let r;je(r=He())&&(i.avatarsComponents=r)}},inputs:{poolSettings:"poolSettings",popupState:"popupState",poolStats:"poolStats",myProfile:"myProfile",avatarsAssets:"avatarsAssets"},features:[it],decls:26,vars:25,consts:[[1,"avatars__matching__wrapper"],["data-cy","matchmakingPopupAnimation",1,"avatars__matching__container--avatars"],["data-cy","matchmakingPopupAvatar",1,"avatars__matching__container--my-avatar"],[3,"hasUsername","user","isLink"],["data-cy","matchmakingPopupSpinningAvatar",4,"ngFor","ngForOf","ngForTrackBy"],[1,"avatars__matching__container--middle",3,"ngClass"],[1,"avatars__matching__text--middle","avatars__matching__text--middle__text"],[1,"avatars__matching__text--middle","avatars__matching__text--middle__svg",3,"ngClass"],[1,"avatars__matching__text--middle__vs--icon",3,"ngClass","icon"],["class","avatars__matching__text--hint-paragraph matching__label--bet","data-cy","matchmakingPopupBetTitle",3,"ngClass",4,"ngIf"],["class","avatars__matching__text--hint-paragraph matching__label--bet",4,"ngIf"],[1,"avatars__matching__text--hint-paragraph__container"],[1,"avatars__matching__text--hint-paragraph",3,"ngClass"],[1,"avatars__matching__text-hint-text","avatars__matching__text-hint-text__label"],["class","avatars__matching__text-hint-text avatars__matching__text-hint-text__seconds",4,"ngIf"],[1,"avatars__matching__text-hint-text","avatars__matching__text-hint-text__seconds"],["data-cy","matchmakingPopupSpinningAvatar"],["avatars",""],["data-cy","matchmakingPopupBetTitle",1,"avatars__matching__text--hint-paragraph","matching__label--bet",3,"ngClass"],[1,"avatars__text--bet"],[1,"avatars__matching__bet__icon",3,"icon"],["data-cy","matchmakingPopupBetNumber",1,"avatars__matching__bet"],[1,"avatars__matching__text--hint-paragraph","matching__label--bet"],["data-cy","matchmakingPopupRoomName",1,"avatars__matching__bet","pool-name"]],template:function(e,i){1&e&&(p(0,"div",0)(1,"div",1)(2,"div",2),B(3,"avatar",3),m(),U(4,qen,2,0,"spining-avatar",4),p(5,"div",5)(6,"p",6),H(7,"VS"),m(),p(8,"div",7),B(9,"icon-component",8),m()()(),U(10,Wen,8,8,"p",9)(11,$en,4,3,"p",10),p(12,"div",11)(13,"p",12)(14,"span",13),H(15),V(16,"translate"),m(),U(17,Ken,3,4,"span",14)(18,Zen,3,3,"span",14),m(),p(19,"p",12)(20,"span",13),H(21),V(22,"translate"),m(),p(23,"span",15),H(24),V(25,"date"),m()()()()),2&e&&(d(3),l("hasUsername",!1)("user",i.myProfile)("isLink",!1),d(),l("ngForOf",i.otherPlayersArray)("ngForTrackBy",i.trackByFunction),d(),l("ngClass",i.customClass),d(3),l("ngClass",i.customClass),d(),l("ngClass",i.customClass)("icon",i.iconNames.VS),d(),l("ngIf",i.poolSettings&&i.poolSettings.roomSettings.transactions.bet&&!i.nonGamblingStyleEnabled),d(),l("ngIf",i.poolSettings&&i.nonGamblingStyleEnabled),d(2),l("ngClass",i.customClass),d(2),se($(16,18,"MATCHMAKING.AVERAGE_WAIT_TIME")),d(2),l("ngIf",0!==i.averageWaitTimeSeconds),d(),l("ngIf",0===i.averageWaitTimeSeconds),d(),l("ngClass",i.customClass),d(2),se($(22,20,"MATCHMAKING.TIME_IN_MATCHMAKING")),d(3),se(yt(25,22,i.timeElapsedInMatchmaking,"HH:mm:ss")))},dependencies:[Xe,Mt,Ne,Bo,Dn,AMe,sb,qe,Go],styles:[".avatars__matching__wrapper[_ngcontent-%COMP%]{padding:1rem 0 0}@media only screen and (max-height: 380px){.avatars__matching__wrapper[_ngcontent-%COMP%]{-webkit-overflow-scrolling:touch;overflow-scrolling:touch;height:18em;overflow-y:scroll}}@media only screen and (max-height: 320px){.avatars__matching__wrapper[_ngcontent-%COMP%]{height:100%}}.avatars__matching__image--spinner[_ngcontent-%COMP%]{margin-top:-.5rem;width:100%}.avatars__spin__image[_ngcontent-%COMP%]{width:100%}.avatars__matching__cover__image[_ngcontent-%COMP%]{position:absolute;top:-2px;left:0;width:13rem;height:12.2rem;z-index:2}.avatars__matching__text--hint-paragraph[_ngcontent-%COMP%]{position:relative;display:inline-block;text-align:center;vertical-align:baseline;font-weight:600;padding:1rem 0;text-transform:uppercase;width:100%;margin:0;font-size:1.4rem}@media only screen and (max-height: 480px){.avatars__matching__text--hint-paragraph[_ngcontent-%COMP%]{font-size:1rem;padding:.5rem 0}}.avatars__matching__text--hint-paragraph__container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.matching__label--bet[_ngcontent-%COMP%]   .avatars__text--bet[_ngcontent-%COMP%]{font-size:2.4rem}@media only screen and (max-height: 480px){.matching__label--bet[_ngcontent-%COMP%]   .avatars__text--bet[_ngcontent-%COMP%]{font-size:1.8rem}}.matching__label--bet[_ngcontent-%COMP%]   .avatars__matching__bet[_ngcontent-%COMP%]{font-size:2.4rem}@media only screen and (max-height: 480px){.matching__label--bet[_ngcontent-%COMP%]   .avatars__matching__bet[_ngcontent-%COMP%]{font-size:1.8rem}}.avatars__matching__text-hint-text[_ngcontent-%COMP%]{display:block}.avatars__matching__container--middle[_ngcontent-%COMP%]{position:absolute;width:6rem;height:6rem;top:50%;left:50%;font-size:2.4rem;font-weight:600;display:flex;align-items:center;justify-content:center;z-index:10;transform:translate(-50%) translateY(-50%) translateZ(0)}@media only screen and (max-height: 480px){.avatars__matching__container--middle[_ngcontent-%COMP%]{font-size:1.8rem}}.avatars__matching__container--middle[_ngcontent-%COMP%]   .avatars__matching__text--middle[_ngcontent-%COMP%]{width:6rem;height:6rem;display:flex;align-items:center;justify-content:center;font-size:2.4rem}@media only screen and (max-height: 480px){.avatars__matching__container--middle[_ngcontent-%COMP%]   .avatars__matching__text--middle[_ngcontent-%COMP%]{font-size:1.8rem}}.avatars__matching__image--my-avatar[_ngcontent-%COMP%]{position:relative;width:100%;overflow:hidden}.avatars__matching__container--my-avatar[_ngcontent-%COMP%]{position:relative;margin:.2rem;padding:0;overflow:hidden;width:12rem;height:12rem}@media only screen and (max-width: 768px){.avatars__matching__container--my-avatar[_ngcontent-%COMP%]{width:10rem;height:10rem}}@media only screen and (max-width: 480px){.avatars__matching__container--my-avatar[_ngcontent-%COMP%]{width:8rem;height:8rem}}@media only screen and (max-height: 480px){.avatars__matching__container--my-avatar[_ngcontent-%COMP%]{width:8rem;height:8rem}}.avatars__matching__container--motion[_ngcontent-%COMP%]{position:relative;width:12rem;height:12rem;overflow:hidden;margin:.2rem;transform:translateZ(0);padding:.1rem}.avatars__matching__container--motion[_ngcontent-%COMP%]:nth-of-type(3){margin-left:.2rem}@media only screen and (max-width: 768px){.avatars__matching__container--motion[_ngcontent-%COMP%]{width:10rem;height:10rem}}@media only screen and (max-width: 480px){.avatars__matching__container--motion[_ngcontent-%COMP%]{width:8rem;height:8rem}}@media only screen and (max-height: 480px){.avatars__matching__container--motion[_ngcontent-%COMP%]{width:8rem;height:8rem}}.avatars__matching__container--avatars[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row wrap;justify-content:center;width:90%;margin:0 auto}@media only screen and (max-width: 480px){.avatars__matching__container--avatars[_ngcontent-%COMP%]{width:70%}}.avatars__animation--matching-title[_ngcontent-%COMP%]{font-weight:600;font-size:2.4rem;text-transform:uppercase}"],changeDetection:0}),n})();var Qen=ve.EButtonModifier;let kMe=(()=>{var t;class n{constructor(e,i,r,s){this.buttonModifier=Qen,this.EIcons=ve.EIcons,this.toaster=e,this.animationTrigger=!1,this.tournaments=r,this.settings=i,this.cdr=s,s.detach()}ngOnInit(){this.currentPoolSize=1,this.restartAnimation(),this.cdr.detectChanges()}ngOnDestroy(){this.stopAnimation()}ngOnChanges(e){if(e.popupState&&e.popupState.currentValue&&((this.popupState.to===yn.Searching||this.popupState.to===Ve.ERoomState.Waiting)&&(this.roomTextKey=this.poolSettings.roomSettings.type===Jt.RoomType.PromoTournament?this.tournaments.getTranslations(this.poolSettings.id,this.settings.getLanguage()).title:"TOURNAMENTS.".concat(this.poolSettings.id.toUpperCase())),this.popupState.to===Ve.ERoomState.Ready&&this.onRoomFound()),e.poolStats&&e.poolStats.currentValue&&e.poolStats&&e.poolStats.currentValue){const i=e.poolStats.currentValue.currentSize;this.currentPoolSize=i>=this.poolSettings.roomSettings.players.count?this.poolSettings.roomSettings.players.count-1:i}this.cdr.detectChanges()}onRoomFound(){this.currentPoolSize=this.poolSettings.roomSettings.players.count}restartAnimation(){this.triggerAnimation(),this.stopAnimationAfterDelay(),this.interval=setInterval(()=>{this.triggerAnimation(),this.stopAnimationAfterDelay()},2e3)}stopAnimation(){clearInterval(this.interval),clearTimeout(this.timeout)}triggerAnimation(){this.animationTrigger=!0,this.cdr.detectChanges()}stopAnimationAfterDelay(){clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.animationTrigger=!1,this.cdr.detectChanges()},700)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Dt),g(nc),g(s1),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["blitz-tournament-matchmaking"]],inputs:{poolSettings:"poolSettings",popupState:"popupState",poolStats:"poolStats"},features:[it],decls:16,vars:7,consts:[[1,"blitz-matching__wrapper--content"],[1,"blitz__animation__cup"],[1,"blitz__animation__cup--new-design"],[1,"blitz__animation__cup--new-design-cup"],[1,"blitz-matching__container--name"],[1,"blitz-matching__text--hint-paragraph"],[1,"blitz-matching__text--name"],[1,"blitz-matching__container--players"],[1,"blitz-matching__text--players--icon",3,"icon"],[1,"blitz-matching__text--players"],[1,"blitz-matching__container--bet"],[3,"amount"]],template:function(e,i){1&e&&(p(0,"div",0),B(1,"div",1),p(2,"div",2),B(3,"div",3),m(),p(4,"div",4)(5,"p",5)(6,"span",6),H(7),V(8,"translate"),m()()(),p(9,"div",7)(10,"p",5),B(11,"icon-component",8),p(12,"span",9),H(13),m()()(),p(14,"div",10),B(15,"entry-fee",11),m()()),2&e&&(d(7),se($(8,5,i.roomTextKey)),d(4),l("icon",i.EIcons.USER),d(2),mu("",i.currentPoolSize," / ",i.poolSettings.roomSettings.players.count,""),d(2),l("amount",i.poolSettings.roomSettings.transactions.bet))},dependencies:[Dn,gM,qe],styles:[".blitz-matching-title[_ngcontent-%COMP%]{font-weight:600;font-size:2.4rem;padding:0 0 .5rem;text-align:center;text-transform:uppercase}.blitz-matching__cup[_ngcontent-%COMP%]{display:flex;justify-content:center}.blitz-matching__wrapper--content[_ngcontent-%COMP%]{padding:5% .5rem 3%}.blitz-matching__container--name[_ngcontent-%COMP%]{position:relative}.blitz-matching__container--name[_ngcontent-%COMP%]   .blitz-matching__text--name[_ngcontent-%COMP%]{display:block;font-size:1.8rem;font-weight:600}.blitz-matching__text--hint-paragraph[_ngcontent-%COMP%]{position:relative;display:flex;font-weight:400;padding:1rem 0;text-transform:uppercase;justify-content:center;width:100%;margin:0;align-items:center;font-size:1.4rem}@media only screen and (max-height: 480px){.blitz-matching__text--hint-paragraph[_ngcontent-%COMP%]{font-size:1rem;padding:.5rem 0}}.blitz-matching__text--players[_ngcontent-%COMP%]{position:relative;display:block;font-size:2.4rem;font-weight:600}.blitz-matching__container--bet[_ngcontent-%COMP%]{margin-bottom:10%}"],changeDetection:0}),n})();var Yen=ve.EButtonModifier;const Jen=()=>["matching/avatar_0.png","matching/avatar_1.png","matching/avatar_2.png","matching/avatar_3.png","matching/avatar_4.png","matching/avatar_5.png"];function Xen(t,n){if(1&t&&B(0,"matchmaking-avatars-animation",6),2&t){const o=_();l("popupState",o.popupState)("myProfile",o.userProfile.profile)("poolSettings",o.currentPool)("poolStats",o.poolStats)("avatarsAssets",pt(5,Jen))}}function etn(t,n){if(1&t&&B(0,"blitz-tournament-matchmaking",7),2&t){const o=_();l("popupState",o.popupState)("poolSettings",o.currentPool)("poolStats",o.poolStats)}}const ttn=()=>({key:"LABEL.SEARCH"});let LMe=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R){this.roomType=Jt.RoomType,this.currentRoomTier="",this.handleNavigation=G=>{this.navigation.getOutletUrl()==="/".concat(Xs.gameRoute)&&(this.popupViewModel.opened=!1,this.cdr.detectChanges())},this.popStateHandler=()=>{this.popupState&&(this.popupState.to===yn.Searching&&this.currentPool?this.cancelSearch(this.currentPool.id):this.popupViewModel.opened&&this.popupState.to!==yn.Searching&&this.location.forward())},this.handleStateChange=G=>{this.currentPool=void 0!==G.data.roomSearchModel?G.data.roomSearchModel.pool:void 0,this.popupState=G,G.data.roomSearchModel?(this.currentRoomTier=this.currentPool.roomSettings.trackingId.replace(".","-"),this.popupViewModel={...this.popupViewModel,containerOptions:{...this.popupViewModel.containerOptions,customComponentCssClass:"matching__container ".concat(this.currentRoomTier)}},this.userProfile=this.store.selectUserState(),G.object===vw.Client&&this.onClientTransition(G),G.data.roomSearchModel.pool&&(this.poolStats=G.data.roomSearchModel.poolStats)):(this.currentRoomTier="",this.popupViewModel={...this.popupViewModel,opened:!1,containerOptions:{...this.popupViewModel.containerOptions,customComponentCssClass:"matching__container ".concat(this.currentRoomTier)}},this.matchmakingService.detachStatsUpdateListener()),this.updateCancelButton(G),this.cdr.detectChanges()},this.handleStatsUpdate=G=>{this.poolStats=G,this.cdr.detectChanges()},this.navigation=b,this.router=h,this.matchmakingService=i,this.store=w,this.popupViewModel={titleType:li.Static,containerOptions:{customComponentCssClass:"matching__container"},opened:!1},this.cancelButton={modifier:Yen.BUTTON_NEGATIVE,disabled:!1},r.preloadImages(["matching/fake_spin.jpg","matching/cover.png"],s),this.subscriptions=new zt,this.location=e,this.addSubscription(e.subscribe(this.popStateHandler)),this.addSubscription(this.matchmakingService.stateTransition.subscribe(this.handleStateChange)),this.addSubscription(this.matchmakingService.statsUpdate.subscribe(this.handleStatsUpdate)),this.cdr=a,this.toaster=c,this.matchmakingEvents=u,this.roomPages=R,a.detach()}ngOnInit(){this.matchmakingService.attachListeners(),this.addSubscription(this.router.events.pipe(bt(e=>e instanceof as)).subscribe(this.handleNavigation)),this.cdr.detectChanges()}ngOnDestroy(){this.matchmakingService.detachListeners(),this.subscriptions.unsubscribe()}onClientTransition(e){const i=e.data.roomSearchModel.pool;i&&(e.to===yn.Searching||e.to===yn.RoomFound||(e.from===yn.Searching||e.from===yn.RoomFound)&&e.to===yn.Active)&&(this.popupViewModel.opened=(e.to!==yn.Active||!e.data.acceptInviteModel&&this.navigation.getOutletUrl()!=="/".concat(Xs.gameRoute))&&(i.roomSettings.type!==Jt.RoomType.BlitzTournament||e.to!==yn.Active),this.popupViewModel.opened?(this.nonGamblingStyleEnabled=rl.nonGamblingStyleEnabled,this.matchmakingService.attachStatsUpdateListener()):this.matchmakingService.detachStatsUpdateListener(),this.cdr.detectChanges())}cancelSearch(e){var i=this;return f(function*(){i.cancelButton.disabled=!0;const r=i.popupState.data;try{i.cdr.detectChanges(),yield i.matchmakingService.cancelSearch(e);try{r&&r.roomSearchModel&&i.matchmakingEvents.emit(Db.MMCancelSearch,{roomType:r.roomSearchModel.pool.roomSettings.type,poolId:r.roomSearchModel.pool.id,gameName:r.roomSearchModel.pool.roomSettings.game.name})}catch(s){console.warn("Analytics track gg error",s)}i.resetPopupState()}catch(s){i.toaster.warn(s instanceof et.StateError?"PLEASE_WAIT":s instanceof lt.NetworkError?"ERRORS.CONNECTION_ERROR":"ERRORS.SOMETHING_WRONG"),console.error(s)}finally{if(i.cancelButton.disabled=!1,i.navigation.getOutletUrl()==="/".concat(Xs.gameRoute)){let s;r&&r.roomSearchModel&&(s=r.roomSearchModel.pool.roomSettings.game.name),i.navigation.navigateTo(i.roomPages.createGameLobbyPage(s))}i.cdr.detectChanges()}})()}resetPopupState(){this.popupState=void 0,this.poolStats=void 0,this.cancelButton.disabled=!1,this.popupViewModel.opened=!1}addSubscription(e){this.subscriptions.add(e)}updateCancelButton(e){e.to===Ve.ERoomState.Ready||e.to===Ve.ERoomState.Rematch?this.cancelButton.disabled=!0:e.to===yn.Idle&&(this.cancelButton.disabled=!1)}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Rs),g(eye),g(pMe),g(ji),g(Re),g(Dt),g(nd),g(on),g(Yt),g(J),g(Xf))},t.\u0275cmp=pe({type:t,selectors:[["matchmaking"]],decls:11,vars:19,consts:[[3,"popupContainerOpened","popupContainerOptions"],[1,"matchmaking__title-bar",3,"popupTitleType","hideCloseButton","text"],[1,"matchmaking__title",3,"ngClass"],[3,"popupState","myProfile","poolSettings","poolStats","avatarsAssets",4,"ngIf"],[3,"popupState","poolSettings","poolStats",4,"ngIf"],["data-cy","matchmakingPopupCancelButton",1,"matchmaking-popup__button__cancel",3,"buttonModifier","disabled","onClick"],[3,"popupState","myProfile","poolSettings","poolStats","avatarsAssets"],[3,"popupState","poolSettings","poolStats"]],template:function(e,i){1&e&&(p(0,"popup-container",0),B(1,"popup-title-bar",1),p(2,"p",2),H(3),V(4,"uppercase"),V(5,"translate"),m(),U(6,Xen,1,6,"matchmaking-avatars-animation",3)(7,etn,1,3,"blitz-tournament-matchmaking",4),p(8,"button-text",5),Y("onClick",function(){return i.cancelSearch(i.currentPool.id)}),H(9),V(10,"translate"),m()()),2&e&&(l("popupContainerOpened",i.popupViewModel.opened)("popupContainerOptions",i.popupViewModel.containerOptions),d(),l("popupTitleType",i.popupViewModel.titleType)("hideCloseButton",!0)("text",pt(18,ttn)),d(),l("ngClass",i.currentRoomTier),d(),se($(4,12,$(5,14,"LABEL.SEARCH"))),d(3),l("ngIf",i.currentPool&&i.currentPool.roomSettings.type!==i.roomType.BlitzTournament&&(!i.nonGamblingStyleEnabled||i.currentPool.roomSettings.type!==i.roomType.PromoTournament)&&i.userProfile),d(),l("ngIf",i.currentPool&&(i.currentPool.roomSettings.type===i.roomType.BlitzTournament||i.currentPool.roomSettings.type===i.roomType.PromoTournament&&i.nonGamblingStyleEnabled)),d(),l("buttonModifier",i.cancelButton.modifier)("disabled",i.cancelButton.disabled),d(),ze("",$(10,16,"BUTTON.CANCEL")," "))},dependencies:[Xe,Ne,pn,Ji,Wi,RMe,kMe,Sp,qe],styles:[".matching__wrapper[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .3s linear}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}30%{opacity:.2}60%{opacity:.5}80%{opacity:.7}90%{opacity:.9}to{opacity:1}}.matching__wrapper[_ngcontent-%COMP%]{position:absolute;display:flex;flex-flow:row wrap;align-items:center;justify-content:center;top:0;left:0;width:100%;height:100%}.matchmaking-popup__button__cancel[_ngcontent-%COMP%]{width:20rem;margin:0 auto 1rem}@media only screen and (max-height: 480px){.matchmaking-popup__button__cancel[_ngcontent-%COMP%]{width:18rem}}.matchmaking__title[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),n})();const ntn=[No,Lme,Io,Yi],itn=[{provide:Cot,useClass:Bme}];let otn=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:itn,imports:[ntn,Lme]}),n})();class mW{constructor(n,o,e,i){this.store=n,this.formatNumberPipe=o,this.translate=e,this.timeLeft=i}getTextParams(n){const o={title:n.senderProfile?'<span class="avatar-image-notification__username '.concat(n.senderProfile.isIdentityVerified?"verified":"",'">').concat(n.senderProfile.username.currentUsername,"</span>"):void 0,key:"LOCAL_NOTIFICATIONS.".concat(n.notificationType,".message"),params:[]};switch(n.params.productV5.item.type){case Fe.TG.ChipPack:{const i=this.formatNumberPipe.transform(Math.round(n.params.productV5.item.amount),!1,!0);o.params=[this.translate.getParsedTranslation("SHOP.ITEMS.CHIP_PACKS",[i])];break}case Fe.TG.GemsPack:{const i=this.formatNumberPipe.transform(Math.round(n.params.productV5.item.amount),!1,!0);o.params=[this.translate.getParsedTranslation("SHOP.ITEMS.GEM_PACKS",[i])];break}case Fe.TG.Vip:{const e=this.timeLeft.transform(n.params.productV5.item.lifeTime,{timeConfig:Zu});o.params=[this.translate.getParsedTranslation("SHOP.ITEMS.VIP_ITEMS",[e])];break}case Fe.TG.Bundle:o.params=["SHOP.ITEMS.promo.title"];break;default:o.params=["SHOP.ITEMS.".concat(n.params.productV5.item.id,".title")]}return o}}class fW{constructor(n){this.urlService=n,this.giftsImagePath=Lt.CONFIG.core.cdn.url+Lt.CONFIG.core.cdn.path.store}getImageUrl(n){switch(n.notificationType){case rt.GiftSent:return"".concat(this.giftsImagePath).concat(n.params.productV5.item.id,".png");case rt.GiftPackageSent:case rt.GiftPackageRecieved:return V6.isPromoItem(n.params.productV5.item.id)?this.urlService.getImageUrl("shop/items/promo.png"):this.urlService.getShopItemPreviewUrl(n.params.productV5.item);default:return this.urlService.getShopItemPreviewUrl(n.params.productV5.item)}}}let DMe=(()=>{var t;class n{constructor(e,i){this.http=e,this.toaster=i}like(e){var i=this;return f(function*(){try{yield i.http.post("social/like/"+e).toPromise(),i.toaster.success("POPUP.SUCCESS_PROFILE_LIKE")}catch(r){r&&r instanceof Mp&&r.error?i.toaster.error("requirementNotMeet"===r.error.code?"POPUP.DISABLED_FROM_CONFIG":"blocked"===r.error.code?"API_ERRORS.SourceUserBlocked":"API_ERRORS.TargetUserBlocked"):i.toaster.warn("POPUP.ALREADY_LIKED_PROFILE")}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(En),T(Dt))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class HD{constructor(){}getTextParams(n){var o,e;const r=(n&&n.params&&n.params.reward&&n.params.reward.items&&n.params.reward.items.length?n.params.reward.items:[]).find(c=>c.type===Fe.TG.ChipPack),s=r?r.amount:0,a={key:"LOCAL_NOTIFICATIONS.".concat(n.notificationType,".message"),params:[]};switch(n.notificationType){case rt.SenderInviteAccepted:a.title="".concat(n.params.username),a.params=[n.params.username];break;case rt.ReceiverInviteAccepted:a.title="".concat(n.params.username),a.params={username:n.params.username,reward:s};break;case rt.InvitationLevelUp:a.title="".concat(n.params.username),a.params={username:n.params.username,level:n.params.level,reward:s};break;case rt.FriendRequestAccepted:case rt.FriendRequestSent:case rt.SocialPlatformFriendRegistered:a.title='<span class="avatar-image-notification__username '.concat(null!==(o=n.senderProfile)&&void 0!==o&&o.isIdentityVerified?"verified":"",'">').concat(null===(e=n.senderProfile)||void 0===e?void 0:e.username.currentUsername,"</span>");break;default:a.params=[]}return a}}class qD{constructor(n){this.urlService=n}getImageUrl(n){switch(n.notificationType){case rt.InvitationLevelUp:return this.urlService.getImageUrl("notifications/invite-levelup.png");case rt.ReceiverInviteAccepted:case rt.SenderInviteAccepted:return this.urlService.getImageUrl("notifications/invite-register.png");case rt.HostRewardReceived:return this.urlService.getImageUrl("notifications/host-reward-received.png");default:return this.urlService.getImageUrl("notifications/notification-friend-icon.png")}}}class sm{constructor(n){this.urlService=n}getImageUrl(n){switch(n.notificationType){case rt.VipFrameUpdate:return"".concat(Lt.CONFIG.core.cdn.url).concat(n.params.storeUrl);case rt.ItemPurchase:case rt.AdminBonusReceived:return this.buildItemUrl(n);case rt.UserLevelUp:return this.urlService.getImageUrl("notifications/level-up.png");case rt.AntiChurnReceived:return this.urlService.getImageUrl("free-rewards/antiChurn.png");case rt.InvitationLevelUp:return this.urlService.getImageUrl("notifications/facebook-invite-levelup.png");case rt.SenderInviteAccepted:return this.urlService.getImageUrl("notifications/facebook-invite-register.png");case rt.RefundTournament:case rt.RefundUnclaimedPot:return this.urlService.getImageUrl("notifications/system.png");case rt.GameWon:return this.buildGameNameUrl(n.params.stats.settings.name);case rt.TournamentWon:case rt.KnockoutTournamentWon:return this.buildGameNameUrl(n.params.gameName);case rt.AccountMigrated:return this.urlService.getImageUrl("notifications/system.png");case rt.FirstLostGameBonus:return this.urlService.getImageUrl("notifications/firstLostGame.png");case rt.PromoTournamentInviteSent:return this.urlService.getImageUrl("notifications/inviteOnlyTournament.png");case rt.CashbackGenerated:return this.urlService.getImageUrl("shop/items/cashbackUnlocker-default.png");case rt.HostRewardReceived:return this.buildGameNameUrl(n.params.gameName);case rt.PromoTournamentRewardAvailable:return this.urlService.getImageUrl("notifications/game-won.png");default:return}}buildItemUrl(n){var o;return n.notificationType===rt.AdminBonusReceived||V6.isPromoItem(n.params.productV5.item.id)?this.urlService.getImageUrl("shop/items/promo.png"):n.notificationType===rt.ItemPurchase&&(null===(o=n.params)||void 0===o||null===(o=o.productV5)||void 0===o||null===(o=o.item)||void 0===o?void 0:o.type)===Fe.TG.CashbackUnlocker?this.urlService.getImageUrl("shop/items/cashbackUnlocker-default.png"):this.urlService.getShopItemPreviewUrl(n.params.productV5.item)}buildGameNameUrl(n){return this.urlService.getImageUrl("platform-logos/"+n+".svg")}}class Jp{constructor(n,o,e,i){this.store=n,this.formatNumberPipe=o,this.translate=e,this.timeLeft=i}getTextParams(n){var o;let e={key:"LOCAL_NOTIFICATIONS.".concat(n.notificationType,".message"),params:[]};switch(n.notificationType){case rt.VipFrameUpdate:e.key=n.params&&n.params.oldLevel<n.params.newLevel?"LOCAL_NOTIFICATIONS.VipFrameUpdate_increased.message":"LOCAL_NOTIFICATIONS.VipFrameUpdate_decreased.message";break;case rt.AchievementCompleted:e.params=[n.params.message.toString()];break;case rt.RefundUnclaimedPot:e.key="LOCAL_NOTIFICATIONS.".concat(n.notificationType,"V7.message"),e.params=[n.params.bet.toString(),null===(o=n.params.currencyType)||void 0===o?void 0:o.toString()];break;case rt.RefundTournament:e.params=[n.params.bet.toString()];break;case rt.UserLevelUp:e.params=[n.params.level.toString()];break;case rt.AdminBonusReceived:e.key="BONUS.ADMIN_BONUS";break;case rt.ItemPurchase:n.params.productV5.item.giftOnly&&(e.key="LOCAL_NOTIFICATIONS.GiftableItemPurchase.message"),e.params=this.getItemPurchaseParams(n);break;case rt.GameWon:return this.gameWonTransform(n.params.stats,n.notificationType);case rt.TournamentWon:const r=this.translate.getParsedTranslation(1===n.params.place?"TOURNAMENTS.BLITZ.FIRST":"TOURNAMENTS.BLITZ.SECOND");return{key:"SHARE_NOTIFICATIONS.".concat(n.notificationType,".description"),params:[r,n.params.chips]};case rt.KnockoutTournamentWon:return{key:"SHARE_NOTIFICATIONS.KnockoutTournamentWon.description",params:[]};case rt.FirstLostGameBonus:e.key="LOCAL_NOTIFICATIONS.FirstLostGameBonus.message";break;case rt.PromoTournamentInviteSent:e.title={key:"TOURNAMENTS.PROMO.INVITED_NOTIFICATION_TITLE"},e.key="TOURNAMENTS.PROMO.INVITED_NOTIFICATION",e.params=[n.params.title];break;case rt.CashbackGenerated:e.key="CASH_BACK.READY_NOTIFICATION";break;case rt.HostRewardReceived:return{key:"SHARE_NOTIFICATIONS.".concat(n.notificationType,".description"),params:[n.params.amount]};case rt.PromoTournamentRewardAvailable:e.key="TOURNAMENTS.PROMO.PROMO_TOURNAMENT_REWARD_AVAILABLE";break;default:e.params=[]}return e}gameWonTransform(n,o){let s,a,c,e="",i="SHARE_NOTIFICATIONS.".concat(o),r=[];if(n.seats){const u={};n.seats.forEach(h=>{u[h.player.profile.id]=h.player}),c=n.gameResult.gameStats.playerPoints,s=n.gameResult.winners.map(h=>({username:u[h].profile.username,points:null!==c?c[h]:null})),a=n.gameResult.losers.map(h=>({username:u[h].profile.username,points:null!==c?c[h]:null}))}return 1===s.length&&1===a.length?(e=null!==c?"one_winner_description":"one_winner_description_no_score",r=[s[0].username,a[0].username,s[0].points,a[0].points]):1===s.length&&3===a.length?(e=null!==c?"one_winner_three_losers_description":"one_winner_three_losers_description_no_score",r=[a[0].username,a[1].username,a[2].username,s[0].points]):2===s.length&&2===a.length?(e=null!==c?"two_winners_description":"two_winners_description_no_score",r=[s[0].username,s[1].username,a[0].username,a[1].username,s[0].points,a[0].points]):(e="default",r=[]),{key:"".concat(i,".").concat(e),params:r}}getItemPurchaseParams(n){if(V6.isPromoItem(n.params.productV5.item.id))return["SHOP.ITEMS.promo.title"];if(!n.params.productV5.item)return["SHOP.ITEMS.".concat(n.params.productV5.item.id.toString(),".title")];switch(n.params.productV5.item.type){case Fe.TG.ChipPack:return this.buildChipPackParams(n);case Fe.TG.GemsPack:return this.buildGemsPackParams(n);case Fe.TG.Vip:return this.buildVipItemParams(n);case Fe.TG.Deck:case Fe.TG.SkatDeck:case Fe.TG.KlaverjasDeck:case Fe.TG.DeDeck:case Fe.TG.ItDeck:case Fe.TG.ChDeck:case Fe.TG.EsDeck:case Fe.TG.TarotDeck:return["SHOP.ITEMS.deck.title"];case Fe.TG.Frame:case Fe.TG.Table:case Fe.TG.EmojiSet:case Fe.TG.PhraseSet:case Fe.TG.Booster:case Fe.TG.StatsReset:case Fe.TG.NameColor:case Fe.TG.MessageColor:case Fe.TG.CashbackUnlocker:case Fe.TG.ProfileBackground:return["SHOP.ITEMS.".concat(n.params.productV5.item.type,".title")];default:return["SHOP.ITEMS.".concat(n.params.productV5.item.id.toString(),".title")]}}buildChipPackParams(n){const e=this.formatNumberPipe.transform(Math.round(n.params.productV5.item.amount),!1,!0);return[this.translate.getParsedTranslation("SHOP.ITEMS.CHIP_PACKS",[e])]}buildGemsPackParams(n){const e=this.formatNumberPipe.transform(Math.round(n.params.productV5.item.amount),!1,!0);return[this.translate.getParsedTranslation("SHOP.ITEMS.GEM_PACKS",[e])]}buildVipItemParams(n){const o=this.timeLeft.transform(n.params.productV5.item.lifeTime,{timeConfig:Zu});return[this.translate.getParsedTranslation("SHOP.ITEMS.VIP_ITEMS",[o])]}}class IO{constructor(n){this.urlService=n}getImageUrl(n){switch(n.notificationType){case hr.VipExpires:case hr.XpBoosterExpires:case hr.StampCardCompleted:case hr.StampCardStampCollected:return this.urlService.getImageUrl("notifications/system.png");case hr.ReconnectAttempt:return"data:image/png;base64,R0lGODlhyADIAPcAAKwAGGEADrYMI2YADowBFKQAF7EAGoUAFIoAFJQBFacAGLIBG5gAFn8CFIEAEqkBGY8BFXYBEZ4AF3sAEXkAErAAGXQAEKcBGW8AEGsAD1oBDXQBEXsFFZ0CGWQBDpIAFcAvRXgdLJ4mOLQcM4QgLrwuQ2waJo4jM7IMI4QIGq4LIpIJHJ8LIIsiMXQIF7gsQGkHFVgSHHMQHo0iMWYJFmMaJFkADagLIaopPIo4RJU8Sb5caqwyQ6xQXYNASqFOWsFQYNBldas/T8ZGWKZEU8pUZchSY49FT9+VnsmOlpYlNeKep+exutSQmdOhqd+rs6uDio9jaZh0erZ9hZdpcMaHkHxYXad0e7uEjL9FVpZJU7VIV2owOGMKFnsxPMlebX44Qp9ATcOfpOvU14p/gPHZ3KSfobiPlcOqrum+xOzAxs7DxMWaoKaVmPTd4IZzdtSorrWipZmLjtO6veHLzsaytKyeoKiPkpp+gqJvdoZhZoRbYFwGEpIKHIMKGubg4L25udLOzo2JivHs63x3ePfu77atrpqVle/j5Pzz9OPX2Mm5uq2pqdvW1/75+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/i1DcmVhdGVkIHdpdGggZXpnaWYuY29tIHZpZGVvIHRvIEdJRiBjb252ZXJ0ZXIAIfkEBQoAAAAsAAAAAMgAyAAACP8AAQgcSLCgwYMIEypcyLChw4cQI0qcSLGixYsYM2rcyLGjx48gQ4ocSbKkyZMoU6pcybKly5cwY8qcSbOmzZs4c+rcybOnz59AgwodSrSo0aNIkypdyrSp06dQo0qdSrWq1atYs2rdyrWr169gw4odS7as2bNo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0ueTLmy5cuYM2vezLmz58+gQ4seTbq06dOoU6tezbq169ewY8ueTbu27du4c+vezbu379/AgwsfTry48ePIgQfZwXxKEOfO8+yIcmR2ECRLsjNhUqaMm+7fv4P/d6Nm+xImS5AE+WEaSBXt4924KUQ/USH79O/fty+/v/zy6K3nWRHn+ZdfIggmqOCCDC5YiH/lLREEZjoUON9+DDqSiCMcdujhhxpq2CB/5AU4GRBMyFdfgiC26OKLHW6o4IMlLvEYEWpcqCCMPPbo4ow19rAYEmqs6OORSIKYII3lIRYEdxgmKeWUM5aHRGFEzofglFxyieCD5QEhWJZbdmmmlEuS18RfRKR435lwUvmlGjbypYOOcXY4SCOBAAIII4z4uUYjheTJ4ZxM8JVimVwOAsghFBG5YZdz1okXEmXsJyUijHRURCCTJjnnhHcFUSSjPf4hB0lLuBFqj3Pi/7Xoqy8m0mlKKR6JYBmyutrjIIK4FMSbPCbC612LwphIsDHtQOyPx9rVKq0eAmLTsNQemqisz+qpExLdHqpXEL56GEhPTHTbFxK+FmLGT+RuuEZy9NZr77345qvvvvz26++/Q4FgRBAEFxyEDrwVgcTC2DG8cMG4DRFEeg47nJ16QRhR23UUV1xxehKSGtt1HpfMcHoEj2zyygujLDJrQ3TMcskuuzbxzCyj3BrJOOP8Mmo898zyz6YFLfTQqhl9tMlEk3bz0kijJoTMUHucXmo6VD1z06JVqHXUpmX99cqpgTE200lTffaVqT299sNJv+0w16IRITfDrLl9Nt2j/UzQhNw2v813aXpDvSZshQt9+Mhqz7y4bImvPPjOjTtcBW9KI9GEkAB37vnnoIcu+uikl2766ainrvrqrLfu+uuwxy777LTXbvvtfAUEACH5BAUKAAAALCMAQgCCAGYAAAj/AAEIHEiwoMGDCBMqNBikx46HEKn8WEixosWLGDNSLLKjCpIlIEEyKUOyzJiSZdQwCQkSSZAdGmPKnJnRSJCPS0aidMOTZ6GfQH/2HMoz5UqQQWgqXZoxiEiSQwu5CQo0UdVCVhNppSp0qNGWPZiKZUrEaU41Palqtfoz69q3a7HClctWak+SKpckHcvX4s2RUbluhRuXsGG3h4EOzYsEZt/HA50yQTu16uHLmDO/pRvXLs+8jiEvlQy1LWLOmlOrNqy4p0okYUVrJJ2W9erbuAfP9fxadsUsOaFO3Zy7uHHide3m3eu7YBDAPpEfn049a1c3vZvrCF5ZevXv1Ftj/18Zu28WJmnbov5eKNAiM4IIIQwC5ZChNX/WG0d9XSWQsUWgV5l+0/0BiCB8IfEEIgTm1ppKzMkUYHTeObgGgs0NhEQZDaYW1GdMRHiREQLS1WFqgWCYYUJBjHFiZl1BeJEOJWL1ImaFALKiRhveyJpyS1QURBndTVeIITsqFcRwDkqlUhMKIYFWdWskydeSq5n4WZAHSekGYrj9oaKVfS3xJW5OhliQl8fpSGZzWHq41WdIRDalj3G18WaSRDDpoZOxoYenVoiQseebOuSXJXYADHmmaoocKqlA6KlWiBqN+pnZH5N2CgAQml5Wxg5LvoiIp6hmCqMbEoUK1yCGpv+aqpk4UvooYWbIqisAPdwKVxkCNeFqlbsWSythU0R26yDFNitQnGstcpCIzjbbhIuBVKvtttx26+234IYrWhBAOLRDES+9tEMPP0wk7ptB3CRvTkzUa++99rqkb7zlvSvWEPPia68aBKtkcMEC27uES/G6669GRSCBRMIDF2zxxRbfqxK+C8f7cEVCSIYvxiSXbPLFCjP88UFG0FvxyTDHjPLGK7m0skBD0CvzzjzPnPJLDz83Wc9EF03zStRyK7LRTBM9Wc1JOyv00E1XzXO9C4dWrdBWd92zwlGjmnO9Xpd9NdLN0kh12Uw4IcYZbUAh9xliOJGG2QSjvevEVjP/cYYUMgXxxNpG650q10UzAUVfO7Bxd+F6HU7211Rk+FziXHo6MeEnJ0sm3zvXm+rmMTNRuaSXy5x5p6mffLqnO3CO8eqTkl5yFcXGfnKdo8vOhLatZ6xrgBg70S3oBTebuuLfPnc3GzdHL/301Fdv/fXYZ6/99tx37/334Icv/vjkOysCCEMMUUQR6YPgRflMpS///PODAL9M6NOv//w43I9R/vsL4BDs5z+KCPCA8iugQkDAPgQKkIAKLAgAHShAHkSwIBR0IAQvmMEMXhBnHXTgBycYwgBu0H8kLOH+OKhCBEZQBC10oQJbEMMDRjAENXygAnGYwxXusIc+VGAKQXvIQiDO74JDrOEJ70cCIyZwhE5cov9O4MQPDiSJIZSiEHOYBStisIZeNEgLtehFLO7PgmFMCAXJmEaCJPEE3AoIACH5BAUKABoALCMAQgCCAGYAAAf/gBqCg4SFhoeIiYqGQ0SOj0Q6PouUlZaXmJmUIERGQZ+gSEyjpKRLoKhFRJqsra6ZnKBLpqOzpbe4trWpr72+mUWfurq4xca5tUynoKu/zr4iRJ9Is8TH19jIysqgz96XQ0HW2eTl17NIoD3f7ITBS+Pm8vOluulBQO3O0/H0/v/bmNz7oY9VMGoAEypEtqxgJR7i+i2cCHDJvSIODxWRSLHjwnsZNZyI6LGkSXSfmn3jIcpksSVNsEiJYgVRECpUoGBx4rLeqHTrnIHguHDJlCjegiR50hPkqyFEAVZBGlKQuI4og7AaarIJ1ao2eRYVGASjpRwtO04Bm+lqQpSV/4p4vML2VRCxAJ3apIil7rMgTP3BPeQWoJOvfpP+g/epUBCFfRM7fCw43aDC9KhIBvsj8DwkBDVQnvek5ua6RzybQyKanpPTsEeTYy3X3GvYuHeovoZkR49yT3ALv7z75Q8i2UoPX241myCExqQwn67hxzmr8SJTpy671I5BO24F305eQ/hb2glpLc/eKs8q7ePLn0+/vv37+HuBCEGixYn/AJJAQggh5JcYCCOMAMKCIAggAAoqoCChChROKACDC47AQoEGPiOCCAw6KKKDC5Ro4oknjriAiBmOYEKHrJRQQoIoiLgiiigaoKMBOOIowIo/CpCgEjBSkgOCI0iIQv+PPe7opI5M+jgiCCwUaYgQNELIJJQ5PvlklD2OmKCVGoiQpQpbOmmil2zyCGaYDjbYQocIPohml23mmWeaXKY4In4LkoinnoQW2maUDo5QX4OClmjoo5AeiuKIKcjH6KCRZgopnAKswN4Jl66p6aijhqkCeSY0KiqpBjzAAAQIODDBBA4cAIEED7DaZ4oobDfCj5gW+sABA7SyAAOl7liiAKcy1yCOjyoQwTcNJMBqiZUOdwKwJxZaQLEZlVrictyu2iYFiZlL6ALkAkvoAwHAhqyhK5KrrpMAgCvcBIXWO5y7bTqwnQN6jmuvo04+0J4EbBq8HAII7/jBfADrSF7rATsCMC19CACgIwFkhizyyCSXbPLJKKes8sost+zyyzDHLPPMNGeEQAFAilhBBjX78maJBfTMCs4/mwiB0JcUjaMCSFNSrtIlVtB0Ik9HLOqaJko9dSEANElviQhsTUjVo4otCNmaOjy1qgukrTbSfEZaItNre52po1tX3XbaPE4Nsd1pT21B3HKz2/Tg0JK6YtBIY6Crl2/XHMDjavrbdMW6Wo40t5RrLnS3mS9Ad9MZUA6lAWZHnLnZA5iOutkaYPw447Df++gFsI9tu54A5F4I59H6bsjuXh4t/CHAs0n78Yjs/SQAE8gXCAAh+QQFCgAVACwjAEIAggA5AAAH/4AVgoOEhYaHiImKhiAhJyKPjyEhi5WWl5iZmpUjJzggQ0WiQaSlpkFFpaJFICAnm7CxspoiIqCjp7m6u6ioRUMls8LDmq24vMjJuqmirsTPxCGfx8rV1rmrINDbmCMgqdfh4suoQyLc6IS34+zt2L/n6cTr7vX2pKJDr/Kb9Pf/95rxs3TiG8CDB5nhGHgIFMKHD/MxrBDCIMSLCFPpS1cQoy4jP3SA8YJoiBcfWnrs8HgKHjQcQ1gWIeJj25At4CCK4iFsRMyLW8BMHBQqYhGem2BCNFJzaCIQKwHuxBTi50EiTjVZtffLEgiEWLPK+vpPW6Kc9nqIhUbWnShE//++NF3LDS07s4PsjlNLd2AWt0OI1pvbl2GOL+yK5BDkjkvhtV6ihgvc9tqXx5jFFalQWdllzKCFILZGRMc10KgHCbGWw0s1kqljV9CbSxDtUjpk666QA9lmzrv47t691VTYCqtPDV8uiEiu44SyMJ8+KMtK4dSza9/Ovbv37+BjjQiRIsWMFSxIrCCRIoQMGeHpjhghwBsIAfgFqFigQgUK/gvwh9999wnAggnxbSMCC97k56AAAUYooYQP4reAgyrUkCAs89H34IQghijihRUKsMKGlZwwX34jgmjAizDG2CKFDrKAoiE4jIACChDO6GKMQPpIo4M3ViCCjv0JGSLWkEz6+OKQ+KWQYIEiwhigjBEyqeWITUIpAHge9jihlmSWueWVZhoAYn7dUZllmnDGKaeaUEqZ3X0/zqnnnlauucCJzK3AooR8FmpoiDcs14WFeRb6AAMQIODABBM4cAAEEjxgaJATqjAco42m+cABA8SyAAObPhlgorKBOmaaCkTATQMJHBpgA7EJWmWZBZTKUKERxiYmoWVSQNebcS4g7KtaPhAAZqgm+2VqYpYJgK+oTQDnhbEhy6QDwzlg5gIGtOqtAQ9QJ0GZuhGAJowfbNdjjNAEAgAh+QQFCgAcACwMAB8AsABcAAAH/4AcgoOEhYaHiImKi4tBRDs7QUFNSJWWl5WSQT0/jJ6foKGio6SkRUVBmEtqrK2ur7BqY0xLmEE7PqW6u7y9o5KWTLFqZWVux8jFxW7Lys3Fw7S1t77V1teMqZWrr8jHxt7h4uPJ3uDMrrSZPdjt7qNDQbXcrM7i5+Th+PnM3/dl6aaxe0ewYBZ5wlo5W+aPn8OHEPsla6UuSKeCGHmlSkgMn8eIIEPy80ix1sCMKBcJQSiMobmGImPKfAhQjboiKXMOEoKEoz2JM4MKHfmtpjojOgvqCJJw39CnUGkyM1qLSNJrTDsaA+c0qtev/qDZXBLk6q4sPVkBBcu27b2pY/+RADEbKmvHl27FjaEzB00cO23ayBlM2E6cOHXm0MlLTuzYsnQT5UirZupasGOe2MHzLgibOmMYf4sbuZCQpl2jqokjpXQQMYvZUkVile6QlmG9prlTehGQOKG91hx7MmUR3JeFwmnd+xcx4cRRGmm5FSoTMs2rBakslGv0d6fvPi3DJvu7ImtSS1U2tjZWrclBljljHiWR9EGhlWGCxFpWlzLNV99VRNChHk2P8XKcWjCF9MSAvW2XX4KkbMfdgfmMwRyE2SHBnXxw0SLKf/E9xASHKEooEjS0QJaNMCU6VB6KNHJQIIbjAERLcYbc9lxMZUBR45CDrAIiQPu5WMj/dgBGFCSRUA7i4Yr7LXHRIExW56SQUXYpyJROIsmEi1ni6A19Xqb55YcQ6VgWEeJF5ISadBbJJk0nGgmSGnX2KUgPY5hZDH960rShn33uENxDY91JDhyIRiqlo+PQQqk5kmZaJIaW8vOgpqCCSY4aoopzaJ8oyOBCCquuCgMNkS6RWhMcFIrMGGneEAILKgggAAi/+rrAsMQO6+uxx67ggpelfmOnNzPWyAIJKCArrLUCFGvAtgYYa623x6ZA5A5slkHnCN8iW+y62nJbbLbrCruAujDQ2IMZcbzRZQgrYAsvuwCvy223AQN87Ly+rgBqUiNUK4DD8hbsLsADE1zw/8XgCrDswu+ge/DFE1dscbsDY2zytb5uzHEvHn8MssgVCwzztibX7C0K9a48SssuDzsxsTMHLXTJ7dpscAc6e9ICthQTPfTTQi9AM9E+j4xxskkfwjPGUHft9dc0Ax32uxdkzUEI6poM9tpse83usTmDurTDYkvcNgAMIBCBBzYgooAHGDQAQQFtB32xxpk2rAK7McvcdQEHDHDNAggoULjVb4vbp+Ikz1z10AAQIHlKC1i+9tWaeynCw4uLfTkDcdPVQQenS/3zvKkPecIIKqDgONsHoAgAAJevSyQIKrTuOtgAOBAlAxe0TayvN9AI7L+2r01AnQxUwPa7HF6/vP/XCsAa6fhRTy9A2eaJj/7QCHCcwNfsIt2c++/DDMAGWWPwQNfsih1depa9oClAA2YbRABMN7R1AaA3BCygyAqQQET8y3Du6s0NsPc5kSmggopwAPGgtoAGlGYFTavYB0HICAg8bVijo4sLUrgtAASAhaDoIMyaw8GKWQCHoshA1JrTgc5tD4ikkCDNTNgcBBTwAUjcxQREdsT6MCCK1ZBAAfCGxS568YtgDKMYxyi8CEzAAQhAAATS6AAHTCADNyQjihZQAIRFTInu+tYHYijHnKyAAWlD2O+IRkBhFSCOfXRHByLGQRpS7WQLqGIieZGCOxrNc0bzVgImWQoWZNLRkY/MZLY4CQoIpPCShvskuJxHykT0EGZqS6Uq2dVKQ8xrkBjU4QtD1jiDjbKWHGgkHi8nvYIJgJWctOQwiVm4i20ykRNQ5jKZ+b2LPVCOGngZ2x7AgDW68YwHgIAE/lc8islRmPkT2QMiV4oFMABsFFvANcOITl2qMALYaMD8qrkAZHrRlAETWgH4+I7LhTGgQaPAVdIpsgUctHPqRKRZ3klCAdCTcRUDAEEjM8UGWhSMEOWWP83jgKgZQIwXHBgUaySBoI0RoBX7QJTgNTDzBAIAIfkEBQoAEgAsDAAfALAAQAAAB/+AEoKDhIWGh4iJiouLQzpEQllGRUGVlpeVRUNERDmMn6ChoqOkpaUgQkOYSEutrq+wsa1ImEFFRF6muru8vaRDqpWsssTFxrG0lkS+zM3OjEWUQcPH1dbXyZU6z9zdpCXB1Nfj5NiW297p6jiq4uLl8PHE2T7q9r3t8vr75MnL9wAZicjHr6DBasmABFw4SEQRJO8OSpwIKyFDdSeGDItIsWNHfxedPeTosaRJWkVC7sIxjaTJl/JczqrUQ6Woh7NgGkPSpMqUK3moCI1CNIrQK1ewVGlyUCaymSltJgrREp7TYkiq7NDjLUgeLEyb7qwktRAOplf5NdlhpWyQK2H/Py4BaRME2pJVqJRd1AMuwn4z/y0EAdHjFC17SwWJa5AVLcHqCKclV+VHYmZBdloNgq7b2cnX8lz2tqNKwY1B6j3L3FT06Hs/sJyeG6RZVX5IXL9m+MP0Pohkd0kuWGX33iKnbZli/XuP8dfMy6EepZFf8efPp8VMBip6vCvYwwvqbTWwohKgZekVz16Qd2y0EQ3ZF6W9/UHvrQGHLAG5vPr3BeheeUgoJMh88egm4IL5VdNESjnEM8WCFBbS4DxLNCHBhcRoWOGHg/QgXSXjIOEciCgKskOJtFwzYYowDmgNidXEaCN+CHG4xHU33qhji8VYBuMIJoRg5JEymABj/4O0bCgLEguOEIIII1QJwpUCZInCAlxyqUKWV4IgQJUrhCBggzi+Ah57IpxgZZYCqLAAnHR2aeecdGaJpwBijrBCeyu+AiWFIFQJ5553JqroolzWCeaYSmL3Qx55qGbfCW6KWSejjBrgqaec3uloliz0eFGVI6CAwqGcftrpp6CGuiidIwggg6npFFqrALKCCmusif5qgKyc5pmlmbj6guWmrwr7653ODkusrLxqeWuypIygKatdutpttOCG6y20wD6raJykYvuJm7vyGqy48MYrb7RcAmsnnH+qa0ih3L47778AByztngLcoK8EIRjqbrMCN+wwvaJmeW2PbvY7sP+dDxsAAAMIROCBDYgo4AEGDUBQQMbOJlotChOniEOtcmL8bMMFHDCAMwsgoADK9jYqQAoovizAljI/DAABNwe0wM48d5kl0AsKTfS3DjMAw14ddICy0z/fl0OqKMRMdcAHYAcAAA9z3V6hKkxdb8AAOHAfAxc47LPB2PFLLsAEfMhABQKrbdy2Y8urAA0xFh7uvQKUOhqWRcuLAK4J/CtqB5cR/na8AGygLwYPzHvn1XtpGjm4Cmhw8CABMA3vArHuVau/0RawOiILx7vAXiwsrPinCtyuiANo695AWSso6mzwwjMCwesLJG2TDHvDCkAAzYeyebSJ5S6sBdmPksEQ4omxUHjf4ZcCu7ALHM9LIAAh+QQFCgAUACwMAB8AsABBAAAH/4AUgoOEhYaHiImKi4sjJCciOC8lIJUgQ5eWlSU4IichjKGio6SlpqenI5GVQ0NFrkWxRkWzsbZFQbeyr7atlSc1qMLDxMWmICOXrbrMzc7PzMqYJ8bV1teMlsvQ3N3euq2+JNjk5aYiydvf6+zr4SCg5vLzJ+nt9/jt7/Hz/cOs+QIKZJeJmr+DjEKMUDewoUNo4UQgnDiIRKWHGDNy8yWRojwZFzWKHNnMl0GP1UKSXMmy15ASKIeduNSyps2IMUmptOnMSJYtRHToyJHDS1GjXoSGIbIFCE9nrXDkVAQS1lMhYbyYA6GDSK2avqYWmnkzq1iuRr6SHHISpQgQLP+z5BC7SIQOpyN/eUxGUohWuseAqB2Ya9rBtyKz/AVcDG5Gw+bIZgzD2JyILRgx8bNm1aGOygdPEGE2+BsmazQ9g0Z5QvBAVyCILXS4ZTVdHA2jouqcz8hi24AdB2xVKnXALMCTlyjdLnYo4fk+J59OwUsWWrvcDemI6G2ufHOpixfEm93pQyMEth0/vrzpIZspQG/3m719+fmGSBUEgnk36fcFOIh73QzBAwUh+AeNEAI2WAiBEOFnnoMUEpKDglBB2Ex9FVIognka3sJghyQSAkIQGLZT4oqFmMbNiCzGSEGIvDzDoYMqyOBCCjLwmIILXZQITWw9CXhDCiyoIMD/kkwuucCTUCrZJJMruBAggYMwA+B0LKyAwpQqLDClk1CWKeaUT065wngf3mKEgyM0+WWTZp5Z55MGQOmkAGUyeeaSKsAwHVE6cHFfCCyMSaaYUBqQ5514OvoopHX6SaWMezEp5aJ3SkqppI5SKmqfTFqJqTlx+jlqqKCG2mmro45q6ZKmnlpMqqqu2iqsZe7qaazApikACoLaagquuUY6aaO+Nuvsrr26GqyeArBgbCgzKFonrws86+234Eor6qXXGoKsruGmqy643ULb5wXlIkhnrOvWa2+6lS5ZrIzZJivqvQYAwAACEXhgAyIKeIBBAxAUAHCzo9ZKYpxhTttu8bgFHDDANQsgoMDDy1Z6QIcUvwpqtN4CQMDGCC3w8b2iItCgCMOigDLADOybUwcd1KvssgKMzF49KNh8c71C2wYAAADXOV7JR6cLgAP2MXABzMLCmxwInN5LAIUMVGCvmcBxzefP6SpAw4rMskttAaCZHbW3MmOagLp1MsCYv+ECsEG5GDwQbp0YAMYp2r4qoEG8gwTwsre9AkDX4YiDCjfjh5x98bML0FUApM0qgLkiDjDN7gRiQQB6q6KPzggE3z7Jck4WrO4oAAG4PkrloBoetQW6l5IB54BJgPjXwZ+yuacNMIZAqw8kP8wEuyJPTCAAIfkEBQoAHwAsDAAfALAAQQAABv/Aj3BILBqPyKRyuUTJUjPWaDoFjUBWK5XVSsmY4LB4TC6bzSrS7Yptu9/wOHyaip3v+Ly+PJLK/4CBgCMpe4aHiExVgoyNjm4jX4mTlGQri4+Zmo2RlZ6fHyk3m6SljyM0oKp4mKaur4OFq7NKorC3uIIrtLyhrbnAwW0ju72VLr/CysqdxobJy9HLI853l9LY2W6y1WBs2oA4OCInLSQkIenqLScnIuLgfyzdSTDf4OQhlSPuJfHU9IakuLfsxQkT9Pi9yMbNmJ9lOEgEVFJuIbOGqx4GE4FwIpkROISN0KdKIy4cJD3mIQirGaWBwE6opHQiJC6Xh4C1mKlKhs3/V1Ny4trJk1eIn64A3lFxS0RReixuzTMD60XKpwFZbvr4CgfWp1GThnkl8+vXo64wFlnh6qpZs1odKS3CtJTbt3hdSRoSl9FdvIA/9A3Uhy+pGYETHynlVMYmp4ojG9lEbXCcF5IzG0nhL9pezaCFzFAGObRpw7hKnF5dpCnr16hLdTR9AQaH27g3pDI96IMczIovHOjwQIDx4wIWKF++wADy4wsgbFD8ZwicsmY7QFgAnTn37soNiDeg/Ply5NHxknijWnJy48yTe5+/fDx5+ufPH6+Q4WyLFjUklgIE6OFnoHf2HTgffOUJwABsvZSXn4IU2ncfhQYiFwGEnoCH/yGCBlp44YcL5kcBh4YUSCKC49En4ogrZrhAfyiW8Z18MTb3YoI7JpijggJIUCMYBOL4Y49IJkmehfUtCWOGAhAw5BEMfuijjkpmqeWL+D3J3QNTfsBBlVa2iOWWaKbZoogLJkcjbNsdqSYADCAQgQc2IKGABxg0AEEBaiap4HSr3fBjeFkWcMAAiCyAgAKBmnngAaHdgKN4JCYJAAGMzrIApGq6yBwCkrFg5JVXInrmeAzAEFAHHUQq6XKUApbCqbKOV2tRAAAg63x4MZireAA4EBgDF0Qa3wVfVZmrlJkxUEGg3j0FXqAK7GZak1nGJ0ABM6mYJqkQJoDmfA9O5HMhopoSWiMGD2g5HwbqkrnqiwpoEOYQAYAqaH0ABMSdiz2Cuy+V3CK5QEASdInvwUo44Gu3E9BDgMP2KQAxkUoq12k1GDxpIQABbCwGuzuqO599FphMRgYKTyTBfRZC67KNXDbgEQLTjhfwzXdMIKLNeAQBACH5BAUKACAALAwAHwCwAEAAAAf/gCCCg4SFhoeIiYqLixcYHCkMHTc3CwKXmJcLFx0rKRwwjKKjpKWmp6ioHZEqma6vsLGuHRx8qbe4ubqnCyuyv8DBsA8uu8bHyIwCD8LNzs8CC6HJ1NWmCB3Q2tvN0tbf4CAN2dzl5sEPtuHrt5bn7/C/Cxvs9Ysb5PH6+7AI9v8gKLTiR7CgqwYAvw24YLChQ0wYEh5z97Ciww4Sbx2wyJHjgYykOgJDcYNFnxR+OLhYydIFBz8p+rC4ITIWRpCIPNQUoMLTNGooUvgSuQAnoQYcb6T4KZFFioEP6WWE8JAFB6OKUjx1GPFfPoIrmGIddYFmwa7hqBJkIXZsqgVQ/+N5s4Z0n4oUbqulYLFvQQBq+1AgzBsOA994N47pU3GV8L8NZt8VxfXV3ArHOD+ggPchFTwVbTFnjGeKYjkWojGv2Hxu1Du8qVPDiMwtgiIE54rF3i3o3E1DlZ+h0M27OIhzGQqZhhba+O7lzyAMYrjNj/PrhcpdhrHtMvbvhLYVhQ4sMfjzgzawbtgcPfaNBfu4n688MP372eF5x88fBPln7V2nQAYRTGCggRh4QN8vFxwHiwrYFeAAAwAst8CFCxigoYbQLQABWsXJMsgr1u2WAAEVaoLhhZismOGGLLa4YosE8FYXJiiAF6OLPPaIIYw+9ogJAMmJtoEffqhT3P8EELgT5JMubmgAlC5Gg2E0DPQH0ANUdsmjlF4+qYltWlrjZJhRPinllGhSSWaZupzZ5oVrshllnXN2WSScpamYZ51g0glooHTm2WMBfIqCgKE/Duroo5CuCCSV0dSYqCFzBgrpppyCCeicAFwKQgSWtNnpqahG2uiUk864wJ78IWAnmqlqCAADCETggQ2IKOABBg1AUECtqgZpAX4FGHpqAQcMgMwCCChALKE+foTeBZJymOasLzoKAAHO1rOAtLVS6Q92LNypabecMhAgOx10kCq73C5gLW8poJDttBveSxgAAPDLI2+a8CslAA4Yx8AF086oQGp+GmzpdwxUQKyGi5jJSG+nCtBw36qbVomoWxpvDOm5/SWAKo9ZYpWJuo8CIBWfGDxwqosgjmYlzIAqoIGogwRAbsgbhopTqT06OjLQhuzM6WQgSRBkz0wr4kDAT0+AEwE+1vlw1YxAEPIC4WaEQb3sAvAX2KMI6qjLSWt4LNulZPAo1FHbKeXEdJf26WC4BAIAIfkEBQoAIAAsDAAfALAAJwAABv9AkHBILBqPyKRyuSxkKAeIpKAwLK6C6xVQYHwOlAxzTC6bz+h0WuL4PBaCeFZLr9vr8vhCYtGo/4CBgmgAHwZydoh3i4t5eFkKFoOTlJVMCwpwc4ycnZ6NcgBilqSlZwcJmlqbn62urXEKo6a0tA6pm6yvu7yfcQV+tcKBVr3Gx8gVGMPMYxYMesjS069ZDs3YQxYA1N3e1QvX2bQDEt/n6L4Ls+OD6e/wngntgA1w8fj5dFkT9Gb6nyp0gXCgwQQKGDZgwGABw4QDBz4wKACQ0wd/SgJU1FIhgQN2lS5w+MANoIAKGIs0qKCvwIEBKTscuBBPzzJ/CPAVoJBySYP/mfFADkv17gPMnmgKmEt3UxiEdAyOIhVU4c05oZTsfTMgbiqpAx22BiClK1k/r8MyMPBWgJIiZAbOos22geK0k4HCUps3N+UHltIEEFBTltcFrH39dTtTofArvon7QijWK44BMo5dNYjMWcgAu8eaHjmQ2ZOBDZ1TD5HGAIneXgZEq1YtDSTlXQYQz059exeCIaB3yd1NnMgxCCAy9PpdvLmR0oxAAHbV1rn1IhhKvjPg4br3Ig52QdeC/Lt5ItM9RWOE8rx7IuPXL7r4vr6Q9HegS/0uK8KE//9h0J15mUkAgnxbNFeAAwxwkwcrBkQYoSaOQCBbatEJoctmqSVAJYCDZb11hYTFOLKPHoOlNkEdAFiHxXiMSFhNHKJwZsEEDYwlRBAAOw==";case hr.Reconnected:return"data:image/gif;base64,R0lGODlhWAJYAvAAAAAAAAAAACH5BA0KAAAAIf8LTkVUU0NBUEUyLjADAQAAACH+LUNyZWF0ZWQgd2l0aCBlemdpZi5jb20gdmlkZW8gdG8gR0lGIGNvbnZlcnRlcgAsAAAAAFgCWAIAAv6Ej6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqbnJ2en5CRoqOkpaanqKmqq6ytrq+gobKztLW2t7i5uru8vb6/sLHCw8TFxsfIycrLzM3Oz8DB0tPU1dbX2Nna29zd3t/Q0eLj5OXm5+jp6uvs7e7v4OHy8/T19vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxv6NHDt6/AgypMiRJEuaPIkypcqVLFu6fAkzpsyZNGvavIkzp86dPHv6/Ak0qNChRIsaPYo0qdKlTJs6fQo1qtSpVKtavYo1q9atXLt6/Qo2rNixZMuaPYs2rdq1bNu6fQs3rty5dOvavYs3r969fPv6/Qs4sODBhAsbPow4seLFjBs7fgw5suTJlCtbvow5s+bNnDt7/gw6tOjRpEubPo06terVrFu7fg07tuzZtGvbvo07t+7dvHv7/g08uPDhxIsbP448ufLlzJs7fw49uvTp1Ktbv449u/bt3Lt7/w4+vPjx5MubP48+vfr17Nu7fw8/vvz59Ovbv48/v/79/P77+/8PYIACDkhggQYeiGCCCi7IYIMOPghhhBJOSGGFFl6IYYYabshhhx5+CGKIIo5IYokmnohiiiquyGKLLr4IY4wyzkhjjTbeiGOOOu7IY48+/ghkkEIOSWSRRh6JZJJKLslkk04+CWWUUk5JZZVWXollllpuyWWXXn4JZphijklmmWaeiWaaaq7JZptuvglnnHLOSWeddt6JZ5567slnn37+CWiggg5KaKGGHopoooouymijjj4KaaSSTkpppZZeimmmmm7KaaeefgpqqKKOSmqppp6Kaqqqrspqq66+Cmusss5Ka6223oprrrruymuvvv4KbLDCDktsscYei7Nsssouy2yzzj4LbbTSTktttdZei2222m7LbbfefgtuuOKOS2655p6Lbrrqrstuu+6+C2+88s5Lb7323otvvvruy2+//v4LcMACD0xwwQYfjHDCCi/McMMOPwxxxBJPTHHFFl+MccYab8xxxx5/DHLIIo9Mcskmn4xyyiqvzHLLLr8Mc8wyz0xzzTbfjHPOOu/Mc88+/wx00EIPTXTRRh+NdNJKL810004/DXXUUk9NNQcFAAAh+QQNCgAAACwAAAAAWAJYAgAC/oSPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvcLDovH5LL5jE6r1+y2+w2Py+f0uv2Oz+v3/L7/DxgoOEhYaHiImKi4yNjo+AgZKTlJWWl5iZmpucnZ6fkJGio6SlpqeoqaqrrK2ur6ChsrO0tba3uLm6u7y9vr+wscLDxMXGx8jJysvMzc7PwMHS09TV1tfY2drb3N3e39DR4uPk5ebn6Onq6+zt7u/g4fLz9PX29/j5+vv8/f7/8PMKDAgQQLGjyIMKHChQwbOnwIMaLEiRQrWryIMaPG/o0cO3r8CDKkyJEkS5o8iTKlypUsW7p8CTOmzJk0a9q8iTOnzp08e/r8CTSo0KFEixo9ijSp0qVMmzp9CjWq1KlUq1q9ijWr1q1cu3r9Cjas2LFky5o9izat2rVs27p9Czeu3Ll069q9izev3r18+/r9Cziw4MGECxs+jDix4sWMGzt+DDmy5MmUK1u+jDmz5s2cO3v+DDq06NGkS5s+jTq16tWsW7t+DTu27Nm0a9u+jTu37t28e/v+DTy48OHEixs/jjy58uXMmzt/Dj269OnUq1u/jj279u3cu3v/Dj68+PHky5s/jz69+vXs27t/Dz++/Pn069u/jz+//v38/vv7/w9ggAIOSGCBBh6IYIIKLshggw4+CGGEEk5IYYUWXohhhhpuyGGHHn4IYogijkhiiSaeiGKKKq7IYosuvghjjDLOSGONNt6IY4467shjjz7+CGSQQg5JZJFGHolkkkouyWSTTj4JZZRSTklllVZeiWWWWm7JZZdefglmmGKOSWaZZp6JZppqrslmm26+CWeccs5JZ5123olnnnruyWeffv4JaKCCDkpooYYeimiiii7KaKOOPgpppJJOSmmlll6Kaaaabsppp55+Cmqooo5Kaqmmnopqqqquymqrrr4Ka6yyzkprrbbeimuuuu7Ka6++/gpssMIOS2yxxh6Ls2yyyi7LbLPOPgtttNJOS2211l6Lbbbabsttt95+C2644o5Lbrnmnotuuuquy2677r4Lb7zyzktvvfbei2+++u7Lb7/+/gtwwAIPTHDBBh+McMIKL8xwww4/DHHEEk9MccUWX4xxxhpvzHHHHn8Mcsgij0xyySafjHLKKq/McssuvwxzzDLPTHPNNt+Mc84678xzzz7/DHTQQg9NdNFGH4100kovzXTTTj8NddRST001BwUAACH5BA0KAAAALAAAAABYAlgChAAAADNmGTNnGTNoGjNpGjRpGjRqGjVrGjVrGzVsGzZsGzZtGzZuGzduGzdvGzdvHDdwHDhwHDhxHDhyHDlyHDlzHDlzHTp0HTp1HQAAAAAAAAAAAAAAAAAAAAAAAAAAAAX+ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq/b7/i8fs/v+/+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyj+U6pcybKly5cwY8qcSbOmzZs4c+rcybOnz59AgwodSrSo0aNIkypdyrSp06dQo0qdSrWq1atYs2rdyrWr169gw4odS7as2bNo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEytezLix48eQI0ueTLmy5cuYM2vezLmz58+gQ4seTbq06dOoU6tezbq169ewY8ueTbu27du4c+vezbu379/AgwsfTry48ePIkytfzry58+fQo0ufTr269evYs2vfzr279+/gw4sfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCb+qOCCDDbo4IMQRijhhBRWaOGFGGao4YYcdujhhyCGKOKIJJZo4okopqjiiiy26OKLMMYo44w01mjjjTjmqOOOPPbo449ABinkkEQWaeSRSCap5JJMNunkk1BGKeWUVFZp5ZVYZqnlllx26eWXYIYp5phklmnmmWimqeaabLbp5ptwxinnnHTWaeedeOap55589unnn4AGKuighBZq6KGIJqrooow26uijkEYq6aSUVmrppZhmqummnHbq6aeghirqqKSWauqpqKaq6qqsturqq7DGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNT+Vmvttdhmu4QBBXTrrQFpIlCBBBA84AAD6KarrgMPQCBBBQh4aQAFFEDAwAL45qvvvvsyAAG94FrJQAQRNMDvwQgf3ADBDESZgAT3JizxxP1KoACTC1QQMcUcc8xABQsgyQDEHZdc8sgND6kABCa33DIEFwMpgcEu19xxAxL4uADLNvfcMcs72uvz0B5DkKMERCfNcc41FoC00lBLLEHAMSbgQNRYJ+xAzC86QHPWYO/bgAMvKvBA2Gjv+wDXKhZwdtpw4/tAASu6HffdC8ytYgR44x1BihP03fcEJz4tON5Mj8jz4X0bLaIBVzPetwNUf2i45IiHeDnmmXtYwMb+nOPNAN0dbh763Ylr2ADop9/NANkbmt563KlfuPjsgjuO4du4C/5Ahqz3LjqGsgsPd+0T8m483r9bSMHyjFNgYfHQo438gwsEX33a91IY+PaCE548+L5PaID25IfNQOUOJpC+4AlIiP77YKcM4e30p637g9TnH/X1C+Kb/+C2Pwcpb4Bga96DBhA5BIbNAQOAUALm50CiMSB+DzpXBdUHOwdhYINowwCELgDCsF1ghCUE2wkfRMIUYm2FDmqhC6EGwwbJcIZJqyGDLIBDqEkPexTsYce69yAEfE2INmNAvB4UgAYisWYOEECEDvhEkynwQQKsosv+FqH+aTFhAFT+EP6+yLECNiiIZOSX/R7kvjSWDIMQ+pwbPUYhKs6RX1eEkBfvKD4JZe+OCVtfhfaYxj5O6HmAPJghx5dIfeVxQoTUIhcthMYvrrFCdnSjGSk0xjl2kHiNXOSFNHjHBhygdIAMY4Xk6MZLxm6OqrxQJEEYywsJIJMzfKSHSIlEdJWoky6s5Ya+10NhcmiW7zMmKoPZImRWT5kgcqbxoKm5ClJTRNJs3TVHVDD6LexGDMBl7x7gyhkRIIvQiwDpdCQBcWLuAdtkkdOENzUhOcCJmLunkSCATsFFYJNDkkA2eyZQJzlAaGjz1yeddICRIdSC7mLAKa+UgApM4KEng8B8BCoAxy4tgALkgsA9R0rSg7rredpKqUpXytKWuvSlMI2pTGdK05ra9KY4zalOd8rTnvr0p0ANqlCHStSiGvWoSE2qUpfK1KY69alQjapUp0rVqlr1qljNqla3ytWuevWrYA2rWMdK1rKa9axoTata18rWtrr1rXCNa45CAAAh+QQNCgAAACwAAAAAWAJYAoYAAAAzZhozZxo0Zxo0aBo0aRo1aRo0aho1aho3bxw3cBs5dBw6dB06dR07dh07dx49eh49ex4+fB8/fyBAfx9BgiFChSFFiiJFiyJFiyNFjCJGjCNGjSNHjyNJkSRJkiRKlCVKlSVLlyVLlyZMmCZMmSZMmiZNmiZNmyZOnSdPnSdPnidPnydPoChQoChQoShRoShRoilRpClSpClSpSlSpilTpilTpypUqClUqCpUqSpVqSpVqipVqytWrCtWrStYsCxYsSxYsixatC1atS1bti1bti5cty5cuS5duS5dui5euy9evC9fvi9fvjBfvzBgwDBgwTBhwjBhwjFixDFixTFjxTFjxjFjxzFjxjJkxzJkyTJlyjJlyzJlyjNlyzNmyzNmzDNmzTNnzTNnzjNnzjRnzzRozzRo0DRo0TRp0TRp0jRp0jVp0zVq0zVq1DVq1TVr1TVr1jVr1zZs1zZs2DZt2jZt2jcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oAAgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAMKHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOqXMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUKNKnUq1qtWrWLNq3cq1q9evYMOKHUu2rNmzaNOqXcu2rdu3/nDjyp1Lt67du3jz6t3Lt6/fv4ADCx5MuLDhw4gTK17MuLHjx5AjS55MubLly5gza97MubPnz6BDix5NurTp06hTq17NurXr17Bjy55Nu7bt27hz697Nu7fv38CDCx9OvLjx48iTK1/OvLnz59CjS59Ovbr169iza9/Ovbv37+DDix9Pvrz58+jTq1/Pvr379/Djy59Pv779+/jz69/Pv7///wAGKOCABBZo4IEIJqjgggw26OCDEEYo4YQUVmjhhRhmqOGGHHbo4YcghijiiCSWaOKJKKao4oostujiizDGKOOMNNZo44045qjjjjz26OOPQAYp5JBEFmnkkUgm/qnkkkw26eSTUEYp5ZRUVmnllVhmqeWWXHbp5ZdghinmmGSWaeaZaKap5ppstunmm3DGKeecdNZp55145qnnnnz26eefgAYq6KCEFmrooYgmquiijDbq6KOQRirppJRWaumlmGaq6aacdurpp6CGKuqopJZq6qmopqrqqqy26uqrsMYq66y01mrrrbjmquuuvPbq66/ABivssMQWa+yxyCar7LLMNuvss9BGK+201FZr7bXYZqvtttx26+234IYr7rjklmvuueimq+667Lbr7rvwxivvvPTWa++9+Oar77789uvvvwAHLPDABBds8MEIJ6zwwgw37PDDEEcs8cQU/lds8cUYZ6zxxhx37PHHIIcs8sgkl2zyySinrPLKLLfs8sswxyzzzDTXbPPNOOd8CgUlyMDEFVUELfQVTMhQAgXDZpDDFnO4oQYaZ5QxxtRUT13GGWio4cYcW+SQga4bAGGFHHKsQUYYaKet9tprk7EG2VcAwcGsEDghBhtsmMH23nzvbQbeYzgRgasfdNEGGWL0rfjiaotBRhtdfKDqDGHMMQbjmGcexhhzhDGDqSWQ8UYZmpeOeRlvkFGCqA18kUbipsfOuBhpfNHApzq4obfsvDNuxhs7cBpBGGvA3vvxfYuxRhiDY2oCG2cjL73iZLBxwqVEvDH99ou/UUSl/lW4wf34fbthhaQHfLE7+eyvbcYXCDx6ABqkt2+/2mWgEX+jX6Bx//9pQwMYGkUF/wHwgGigwqKqYMADIrAKiVoCGxxIwTCwgQmH0oH2KkjBN+igUCDYIAc7GIJBFaB4I6yg8gogqCs0MIUORAMWAnUDEcKwgzf4kwNseMMOPsBPVLhcDzk4BgXy6QRtGGIK24ACPpmhfkqsYBnMsKcW8DCKDnyDC/SUBizCUA15ysELvUhBNOQAT2IwHhkpmMY7hSCJaxxhG0pYpyaMMY4IbEKdDCAHPKZQDvuT0wrE50cOumEFdAKDEAtJwTEMcE5wYOQI4TCnEtxRkv9Dw+ri/nSFRWLygGLIgpy8oMZP/k8MXpAT4kzpQMfFyQITZKUD2WABOM2AkLIEoBtoACcfxDKX/2PDD+CEhEsCc3xoQAKcpLC+Y7bPDFOA0xeg6Ez2leELcEKDJ6s5vjGg4U0CuAM373eHAbzJDuO0nx0CcM50tm+d7XQn+eDpJnTKc3z0ZFMAxHlP7pXzTXXo5/bEIAc4OU6g0iMdnLZATYTKrgxcgBMUzuDQ450BCnBKgjErijk0KAFOPfglR03HBh7AKQZXHCnm3vACOMFSpbFTwwTitEqYZs6VceJCKW2avFTGqQrb5CnfyKDHOHlgo0INoOTklNKkqo2Sc1KkU/lW/oYr0GmQU90bHEZAJwT0MauNgyqd7AjWtKXho3V6Y1nRxoYO3CmNZW3jncRY1jTAIE9qAKsYvpknFzRVpXKgY56i5lQzbIFPJICjUN+ggT5RIXo2LcMT/KSAvwpUDG8A1Asse883CNZPUejiSD06KG1ydAxlIFQFludQMbRBAoVCQSQR2gYRZJCzwHQDDhKFhDaAwZ1gaIMQFnUEXHLTDUdoVBAU68w2BOFRODBuLnUbqRrgFo9vsMGkWMCGhjKyDGxgQaUWMAbRSjINY2AApqggUjyywYiZgsEbkHpDNLzhrpyCwBXesNMbYvYKzfNUCtDQzBuaAQ0qIBUR0sCG2/4C8G5pIMKpCjCEN7TBwexz7RuGwMJUEUCMr8Mw8tKYBjTogACvIoEWRJcG7/KuDGlInRZIUKsRFKELdIgDemNX3jjQoQtG4KquErABH4RBDm1YQxrOwOQmOzkNa2hDH33AgQQQCwIXeIELtszlLb8AAxDQmZjHTOYym/nMaE6zmtfM5ja7+c1wjrOc50znOtv5znjOs573zOc++/nPgA60oAdN6EIb+tCITrSiF83oRjv60ZCOtKQnTelKW/rSmM60pjfN6U57+tOgDrWoR03qUpv61KhOtZsDAQAh+QQNCgAAACwAAAAAWAJYAocAAAAzZxkzZhozZxo0Zxo0aBo0aRo1aRo0aho1aho2axs2bBo2bBs2bRs3bhs3bxw3cBs4cBw4cRw5chw5cxw5cx05dBw6dB06dR06dh07dh07dx48eB49eh49ex49ex8+ex4+fB8+fR8/fR8+fh8/fh8/fyBAfx9AfyA/gCBAgCBAgSBAgiBBgiBBgyBBgiFBgyFChCBChCFChSFDhiFDhyFEiCFEiCJEiSJFiiJFiyJFiyNGiyNFjCJGjCNGjSNHjiNHjyNIkCRIkSRJkSRJkiRJkyVKkyVKlCVKlSVLliVLlyVLliZLlyZMmCZMmSZMmiZNmiZNmyZNmidNmydOmydOnCdOnSdPnSdPnidPnydPnyhPoChQoChQoShRoShQoihRoihRoyhRoilRpClSpClSpSlSpilTpilTpylTpypUpypUqClUqCpUqSpVqSpVqipVqypVqytWqytWrCtWrStWritXritXrytXryxXsCxYsCxYsSxZsSxYsixZsixZsyxZsy1atC1atS1btS1bti1bty1bti5bty5cty5cuC5cuS5duS5cui5dui5duy5duy9euy9evC9evS9fvS9fvi9fvy9fvjBfvzBgwDBgwTBgwjBhwjBhwjFhwzFiwzFixDFixTFjxTFjxjFjxzFjxjJjxzJkxzJkyDJkyTJlyTJlyjJlyzJlyjNlyzNmyzNmzDNmzTNnzTNnzjNnzzNnzjRnzzRozzRo0DRo0TRp0TRp0jRp0jVp0zVq0zVq1DVq1TVr1TVr1jVr1jZr1zZs1zZs2DZs2TZt2TZt2jZt2jcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gABCBxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LtqzZs2jTql3Ltq3bt3Djyp1Lt67du3jz6t3Lt6/fv4ADCx5MuLDhw4gTK17MuLHjx5AjS55MubLly5gza97MubPnz6BDix5NurTp06hTq17NurXr17Bjy55Nu7bt27hz697Nu7fv38CDCx9OvLjx48iTK1/OvLnz59CjS59Ovbr169iza9/Ovbv37+DD/osfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDTWaOONOOao44489ujjj0AGKeSQRBZp5JFIJqnkkkw26eSTUEYp5ZRUVmnllVhmqeWWXHbp5ZdghinmmGSWaeaZaKap5ppstunmm3DGKeecdNZp55145qnnnnz26eefgAYq6KCEFmrooYgmquiijDbq6KOQRirppJRWaumlmGaq6aacdurpp6CGKuqopJZq6qmopqrqqqy26uqr/rDGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNRWa+212Gar7bbcduvtt+CGK+645JZr7rnopqvuuuy26+678MYr77z01mvvvfjmq+++/Pbr778AByzwwAQXbPDBCCes8MIMN+zwwxBHLPHEFFds8cUYZ6zxxhx37PHHIIcs8sgkl2zyySinrPLKLLfs8sswxyzzzDTXbPPNOOes88489+zzz0AHLfTQRBdt9NFIJ6300kw37fTTUEct9dRUV2311VgPzYALK/ygBRZvQOIIK8QMY/bZaKedNjGhLAKJGVhQQUMLHxRAMgxUmPGH/iOOeBKLMcocYzYwvfSiyy23yALL4ow37vjjsNSCOC+FCzMMMcgo88sqlDiCiBxhAJEAxQbIUMYlqMCyyy+G44KLLbNALvvstNceSy2u58IL67aoIsoeQ3ig8AZHwMHKML3kcsssscRS+/PQR/98LLLYgssuwPyyiBU0AKyBFXVIYosxv+iiuPTop6/+7Lj0Mowwofxhhg73NmBG6rj8wgsu56/v//8AtEUufMGLWbhCEjB4lwGE4Ilg9MIWzQOgBCc4webNIhfB4IUZOIAuIOzBFcYARi0oSMISUjAWvCCfI8owgXCJIRWz4MUuRmjCGtrwf7FoHy5aMYkLbMsI/pkQxi0ieMMiGnF9sZiFL2ABhw5UKwuY+AUwbHHEKlpRfbHYxTBSgYcWPKsJp7BFL3DhvCua8YzQq4UMX6GHCCSrAoAYYxnRSMc60i4WtgBGKYRArAS0IRTDyIUdB0nI2dViioUIwq9KoIn2UbGQkIwk42SRi164Igy7EsIqehE7SXrykzkExhwaYKs22EIY/fukKj3JC2FMQgWyUsQtCrjKWq4SF7xAhSJZ1QFJEIOGtgymKlGYCyekygOPMMYthMnMWsYCGLDwQqkusIlc4KKZ2KylGm0RhVBJYBK9AGY2xwlKXeQiCZ4iBDCuSc52rjIWwliFEjRVCFzkYo7u/synJ8WYChtY6gq7WKY+B/pOXmiCg5GawSigSdCGrvIWwRjEoxoAToE69KKfnKEbGJWHX4gToyCNZA5x8QNEscAVvwipSlUpi2AYwlDg/OhKZ1pIe3ZBUEp4HU13+slcOtFPkvgFPnlKVEIekg58esIuBFnUpkIShauAJZ400QunWlWkvdhonYhwwat6FZK9MEUK5rQIYHTyq2i1oy1+odU3gYKpaY2rHX0BCTclABcWlate0agLU7CJAbZ45F4He8Zc+FVNtZApYRdrRFxwIk2cEOxgZ4E7XFLuF5h1nWY3y1nNrg6zvOCFLvBai1TulRd4OJMVUipXW+jiF8NI/oYxYmEKSTiCDnQwgxWsMAUOaGADwA2ucIWbgRns1gpxkAMfHJGJVeRCGcYQhi9wodir/sIEZprFWYvaPFncopLZswQcjLACu50kAjWIQiBMQYxf7OJ1siBiU3HxiTJFQRhErd7urokKUHgBBwqwSQeGsAdRtGIWq8tFLYa60mKIgEwQpOktekEMXHiCDlHAgFBkEAZBtMJ9tJypLTIxJhTwIqTUswUvfOGILoSAKTsoQyqCQV0GNzQYY6LEdgeaxV7IAhRw8OJUgiAIV+Biuhi9xRbEBAsbk7MW+uvDELbSgCxUohi8cPI4Y3EKMS1Yn7G4BTA4YUywdMAMa/1y/j5j4Yow1eDE7RQjLlKBSbNMoBCq24WWbXm7MFWBtdnERTFOUYYFsGUGf8BedW2Jiw2AyQxVbWYOfaEIEshFCaUQ4Z492QsggIkOcA5mLnYRzbs4QBHbZOYvsgAmOYR6lbkAhiRwwJcupGIYi4bkL64AJjVEGpRQHoSG//IDVGS5lr44ApiuAOhIqvEWiijMDUyBC11sGo25+KmX3izJZ66C14iJwB9C2+1aiEmyg7QFLebZGD7wwrR1jMUrxLSKaxtRF7pYRGRqYGx0o3EWlhDTIHJtxFsIYxDmlUwORjEMe9swF3wMEwOafcVY9KISw7bMELpKx1+QSRN5PWIM/lNB6824IRdwtWIv4ECmDuDXijYFTSEabkVZ7MJMk0i5DWPxi0qMJgezYKcRebGGM93zhiishadLs4cxFtEWbT5TDn5dwlrs4g6p2QBVbTgLWagpDBSXoPWkqpo1CLWEz3ywmtjAUAmqURCvoYBzHU47Ne6gTWk4+/+oq3bYqAEY8Ebf8lDwJh7oFIu78DltYoA7/+l5TppYqvSsfouS3sYOuzg29IjZhjqtABLC8GjdzVqG3RRAENjzd+NuMQxf/CFPAZACKBz4XsQhLhfDKAUTgIMESwTDF7sIvvDd14iS98kAIxiCF7rQBTDI4Dgh8ID0QaDtrFn/+tjPvva3/s/97nv/++APv/jHT/7ym//86E+/+tfP/va7//3wj7/8JXKCJ5BBEqMIhf73PwpJkOEJJzA0O9AGqUAMvjBat1BasrCADCgLklNtvkAMqdAGd5czPlBgwiAMu7Bj0oNgGTgKe2B5MdMBl4BCvKB6/6Ni73YJwtMyRcAKnER3SDQLvcAKRaAyZQALxBB4RiQLxAALpVcyTzALomdHUDYLTyAyGOAKR/dUueAKGccxbuALKJhuv/AGHOMBqiODZpRFsNCCFwMFIRZMMdRNFjMIYRdMv1AIFRMKS0ROviAKEoMArlCFwgR1o+MwCEBdA4U7ecgwRtZQuDBvDAMKQkdQ/rgACgsTCocoiKGQMJHwahfFC5JwMG6Qhg7FVgWDBJh4Ub+ATgJjAHq2U1lkAAIzCo24UrhACgGjBp0YUr+gBv+iAa+oUr/gaP0CCjw4Uz/WL1FAdU3VC1LAL7ZAcCtVC7awL1xQizT1CzeVLzp3VbqQL22QilaFC513L/L1Vc1zL0kAjF/VC6BIL5VgjVeFC4o3LwfwcnolDH8YL1nwhnrlC6w2L6+wi1clC4QoL223V8AwL09gjmiFC0kYL6OAj14VC6UgL63AhTwVC60gL8yzWEkULzMgiac1A/BSBvJIWL5gBvACaowFC7xQB/CyCAKZVrigb+8SWSNpC50A/i+uYIxeVQtR5y78M5KygAvvMgDKMJKLowwE8C7JAJSwkAwCQJRGiZRKCZRM6S5F6ZRJ2S4C8JNAKZTvYgxACU/wkkQjOULwkgo0eVW1sArwkgkht1e3QGLvwggpOZCOAC+uNpK8wHLvMgbM6FW/IE3vcpEjqQvYBS8TSVgVGS/1RpERGS+hgJBXNQvp+C5E8JbneIPykpdO9Y/2yJhNVQujQC/xOFjA0AT0kgDsGFfPZC/lqFe5EJf18o16xQu7VC/bmJCxgC/VGFe58AX5ogtplUP60gWWqVLCMI74koBeZQupwC9OAI5E9Qs9kIscuFO1gAn+AgHB2VA8BzBe/nCdA/WJAaMJ0ahSuMCaAZOTNOWABPMCpDZTFvdiBCMF/QhSvbAElsidzeQLbJAwi9ALr3BRr9ALfrAwidCRA+ULidAwfMCc5NQLfPAwbECgcJifEHMG9hlJv4AGE6MFvDCWzsYLWlAxFkBJ2JQLsuBDFwMKGKlKvKCIGvMFvyCZdZQ/uskxHTAKeidSvzAKYNgxV3B4hWQ9WEAyg6A7DllBvJALEmUyBiAIrFOkSNQLvyAIppgyBVCN9+Sk0xML1uQGCccyTnAKRKhgJFQLufALs3AKZTYzTVAIrFAMwUCi6kNJwVAMrHAIoqkzD+ADdAALwtALS2V7gGp7o9YLkPhFBz/wAETTATmwfMzXqMznBTpQffM3qZRaqZZ6qZiaqZq6qZzaqZ76qaAaqqI6qqRaqqZ6qqiaqqq6qqzaqq76qrAaq7I6q7Raq7Z6q7iaq7q6q7zaq776q8AarMI6rMRarMZ6rMiarMq6rMzarM76rNAardI6rdRardZ6rdiardq6rdzard76reAarqQaEAAh+QQNCgAAACwAAAAAWAJYAocAAAAzZhkzZxkzZhozZxo0Zxo0aBo0aRo1aRo0aho1aho1axo1ahs1axs2axs2bBo2bBs2bRs3bRs3bhs3bxs3bhw3bxw4bxs4bxw3cBs4cBw4cRw5cRw5chw5cxw5ch05cx06cx05dBw6dB06dR07dR06dh07dh07dx07dh47dx48dx48eB48eR49eR49eh49ex49eh89ex8+ex4+ex8+fB8+fR8/fR8+fh8/fh8/fiA/fyBAfx9AfyA/gCBAgCBAgSBBgSBAgiBBgiBBgyBBgiFBgyFCgyBCgyFChCBChCFChSFDhSFDhiFDhyFDhiJDhyJEhyJEiCFEiCJEiSJFiSJFiiJFiyJFiyNGiyNFjCJGjCNGjSNHjSNHjiNHjyNHjiRHjyRIjyRIkCRIkSRJkSRJkiRJkiVJkyVKkyVKlCVKlSVLlSVLliVLlyVLliZLlyZMlyZMmCZMmSZNmSZMmiZNmiZNmyZNmidNmydOmydOnCdOnSdPnSdPnidPnydPnihPnyhQnyhPoChQoChQoShRoShQoihRoihRoyhRoilRoylSoylRpClSpClSpSlTpSlSpilTpilTpylTpipTpypUpypUqClUqCpUqSpVqSpVqipVqypVqitVqytWqytWrCtWrStWritXritXrytXryxXsCxYsCxYsSxZsSxYsixZsixZsyxZsy1atC1atS1btS1bti1bty1bti5bty5cty5cuC5cuS5duS5cui5dui5duy5duy9euy9evC9evS9fvS9fvi9fvy9fvjBfvzBgwDBgwTBgwjBhwjBhwjFhwzFiwzFixDFixTFjxTFjxjFjxzFjxjJjxzJkxzJkyDJkyTJlyTJlyjJlyzJlyjNlyzNmyzNmzDNmzTNnzTNnzjNnzzNnzjRnzzRozzRo0DRo0TRp0TRp0jRp0jVp0zVq0zVq1DVq1TVr1TVr1jVr1jZr1zZs1zZs2DZs2TZt2TZt2jZt2jcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gABCBxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LtqzZs2jTql3Ltq3bt3Djyp1Lt67du3jz6t3Lt6/fv4ADCx5MuLDhw4gTK17MuLHjx5AjS55MubLly5gza97MubPnz6BDix5NurTp06hTq17NurXr17Bjy55Nu7bt27hz697Nu7fv38CDCx9OvLjx48iTK1/OvLnz59CjS59Ovbr169iza9/Ovbv37+DD/osfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDTWaOONOOao44489ujjj0AGKeSQRBZp5JFIJqnkkkw26eSTUEYp5ZRUVmnllVhmqeWWXHbp5ZdghinmmGSWaeaZaKap5ppstunmm3DGKeecdNZp55145qnnnnz26eefgAYq6KCEFmrooYgmquiijDbq6KOQRirppJRWaumlmGaq6aacdurpp6CGKuqopJZq6qmopqrqqqy26uqr/rDGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNRWa+212Gar7bbcduvtt+CGK+64kaagww3opqvuuuzekMMG5C6lggxbWIJJJZTkS8kjjvT7CCOLBCzwwAQXLDAj/fYLib6UVKJJIT/QYEG8Lx3wwhBQlAEHIJh40gkmmFACCSOElGzyySinrPLKLJ9cyCOQVAKyJ5440gcbYkDxQwsUc9TBEnj0EUghizwi8r+LINLy0kw37TTKhSCyiCOPSEKJI4oQAggfdvwwcc8MaVBFGws7wogihaT99Npst8122mlP/Ugli6ihxAQ9GwCE/hdq+JFJJpVg7fbghBf+tiKOOIwJHWdM8QK3DkyxRyCIVO1I0oZnrvnmTCvCiOWE+IFHDNPWoAe+WKvN+eqst54y3EVX8sgYEST7Qhh4OAyJ0q737vvvJi9iSSeOrMGEAcAqwUcgi1yNNvDQR9870ZA8UgggZEiAqwdwZAIJ2oVIL/74vkeduCNTBAArC1XkYUklWZMv//zTO5KJJGY0UUGqTxCySPXxo58AB7i6QjCieoXwgwxGZQVISOJ5BIygBAtItEoIYgecOoEXJJEJR0zwgyAs4CM0IQgrfG1SG7CDIiThiPCF8IUwNJwhYFaINxzgUSNoQ+BcGMMe+nBw/oUwhCMoMQYGJKoFaJAE/H7IxCYObhGYWMQY4CWoDuRBESPjoRO3yEWmFYJqhoADAvrUgDFAooVdTKManTbDR2ABTwqwAiGiuMY62nFp9tNDFOZEhEA84hGGuKMgB5kyLDpiDwtkEwTkQAkIEvKRkCREBcmQpiUIAhMBjKQmIQnFPfRgTBfgQ9F4t8lSRhKLinDDl5SAMC2a8pWRNAQkDOECLYWhEpCApS5fWYh9vZFKK+gDv3ZJTF7yKw8QgFIPWlnMZsLyi4I4AZO2YDVnWlOXhbDEIpiApDj0y5XXDKcmCzEyMRBpDrMUpzp3iQgi/iiFmFynPHfJCEusYUcd/nhZJufJT1N+jg83ggAf0NjPgmITEnCYUQTokIlAGvShulREJtQAIz48YhEQzSg9HyEHFtmBEuDUqEg3aYhKmPNEZ7DEPkfK0lJSLQskIoPZWkpTbPZrCSD6QSVIWdPMwe2nQA2qUIXa080tghEl4BAIAiGJojYtaohgBML+2LCRLUKLgeiDVrfK1a56VWgnM4RUY7YvfgEMEYgIqVNdVok5aIgP31tryqYmM0x0ghGAAAQa0JCFJzChBjTQgEk0IAMbQOEJXTjDGvIqiY+FTHByPdn/3FqhMIB0rUGcmhIxYQk0KOEDA/gJAQZwAijIwV64vJzqijpDnEaIBv2q/iniyqYIP6yhllAxQA3wAAjE7etsNYVEITDgIA68zKEa/SIlPraHMCiBZ1vRwRLMwAdMaOJqau0n4gLBIDhcFqJxg4QlAvGEEaBFBVZghOzAl9FCSOKkBgJCPAsqVklYDxB0qIFclNAHQCACEpC4qkH75YEC+cF6/WzeJhBRBiPULi8aWMIa7PfAfs7QDgIagySyW8y0MSJfaCABYWDABkkEmMPFNAQllOAfGExNnUQb5hykuZgXyOGLJ1YnJASRTP3MgRLItaYjMMEINgyBMkhYwyM6KE5FUMIM+PkBIK9ZCCdXogrqywwCqGA1RzYTcR+ozx4o4UwDbjgQLA6N/hIoJwlGoFiTlaBofJYQ4C9bAn9JPc0JyqDElb6SatBtTyA8SEwDUqINgm1NB+bQ5jc/EhIdXc8RHuFnTf5PEXdgAW1eQLk66xJgND6PRR19R0lgog1F0M0Q4oCJR+hSxfcsjw2m/MoZOuKTv2GlI4K8ScThTTx5qMQrUdkG5A2HAm5QBKVfiYkxhEcSGHUpJuyQSOQEwQ+aIJlLCeEdFQh7kwasRBOeIwAwwI/UXewld1TwXUhSjQ+ans6aoa3JkmqnAO0mZMzIsADsoAAOliD0I1WcnaY+8ouMQIJ3uhDXgxfiOm3QtiBj+7jwUEHZlU6jI9BQHQtgYpCO0MQa/m5YHhT4LeNcxEQDqBMIXqdxhb9MjwHokG81GoK70gGBq9coRCnCRw4zreMjQiAdP6A7hA98An3MUAmJp9sP0kF5D6f2A/yQQRIub6IiovMCMm8R4VbgD9Cd3kRJVNw5Vdh5E4cIBQDFIRNSB+EjqgCdNkT7h//dAoFofnQBLqIN0OkDT2GIMFUaiAB+jDsBEdEH6NQchIjAhJwTBAJCfDuGX4SOJ3r4iD0owEE1AFgPPaH5F35RETqQEBdi+0LSP6cTIfywESx0hp2GMBPQcfMEyRkHDQ36g4GEDh0UDzxZEkJ7G7JB5fruukX0/jlgEDj9LmcDEFHhogR0hN6f/pODXApwdiSyg9rnBwncPofs4jPbr0mUA9bLbxHS4QPzDacITCg9RbccPPQKQVnojED60INQLrIHAAg8kkAdhKB/roMwGPQiU4B90LMIkSYdB3B5vlMJzycjdmAJwJNN1iEGBcg5KpYCNlIDWOc7jwAE11FlrTNDeKAjeIBgrON82YE5nDM1pLMjMdBIq6MIiLAdPrg5HAUkMbg5PtgdQUc4WJRmQKIEDUc4UvUdwUY4mCAIRhIIHzc4lJAH4aFTCtgyTqYCSFIDu8M2KsZN4zEGi8BCWRc8LMQFTDJhT7gy/+MI/VceLDAGhPAxJgZgC5MJkld1T2IEc7AJmNCH/n5ICSATB0y4HgggAzUQiTawAleiAC8QiZK4AsYGNpzYiZ74iaAYiqI4iqQIIRBABEDABX/QB5rAC7qADfDwDrI4i7RYi7UID81wC7zwCH2QB00wBDKwiaX4EkaQB4+wCrqgC8rQDfJgD/Mgi+yQDulgDuMwDt7ADdiYjdq4jdzIDeFQjeggje7wDvBAD/awDtcADLpAC56ACF7wecMIEgegBI4wDNTADeewDtNIDuQgDt/QjQAZkAI5kN0QDvxYDuigj+JgDc5wCmQAA/FoESqQBpuADe+QDuUwDt/QDd0wkB75kSDpkd3gDeJADufADutwC3swbhGpECewB6Hg/gviIA/rYA7XGJI4mZM6GZDkkA7v4A7NsAqPcAUtCQAR8Aj3SA7rgA7kcJM7+ZRQGZXiUA7qgA7foA2+MHuheABjoAztkA7iwJFROZZkSZYc+Q3l0A7o8AjxRjFecAraIA/sEA5lWZd2WZbdgA40qQuO0AHhkgjV8A3ocA50eZeGeZhQ2Q09SQ7Z8AvmpS1oUAzuMA5iiZiWeZk72Q3foA7csAlnJy1+QAzrwA7igJmmeZo62Q3n8A7VQApH5ixwMA3ikA7k0JGoeZu4+ZHhMJjbYAqJdiwgwAq0aZu5WZzGKZDdIA7sEA3ONiwKgAnN8A7lcJzUWZ0BGQ6kGQtf/vArOWAMPVma1hme4pmN3lAO6aANP6grY3AN6fCP4/me8KmY7PAJD0YrmCAO7uCU8Lmf74kO7vALgggrtjAOVsmfBsqf5IAO1LCdrPICvgAPhXmgErqfeVkOE2gqMLAL8jAOE9qhBtoN7MAND0cqI3AM5UAOHpqiBrqb4oBhoLIBv5AOEaqiNBqf5lAOscYpsMAOKFqjPsqf3eAO1wB4mRIL5FAOxPmjSvqes1kNUmApfHAOHLqkVAqk6GAMbfkoS/AMIVqlXsqf49AOr/AoERCjU/qlaAqfhIl7i1IK6zCjaRqn4qmY5ACHhyIE2rAOcrqn++kN7SALhhKjcMqn/oRqnUfKbYHSBv1YqIwKnwr6mXviC+uQpI1aqdWJnaDAJ3NwDtNpqZ4annl5DQFqJ8aQDp96qnOaDmxKJ2WAlqj6quGZDtLgA3NyC+zgnrCaq8cpDuuwqm7CDJ2qq8J6nOrAC26iAORwpsO6rLlpDtKgSOIAnsw6rbhZDs+qJuEwqNS6rZdJDsiQJsggrdP6DQaZoOG4DujKj+q6ruyqrvmIruiADuaQrOGgn8yKDqRwJnugp8MqDuawDu9QD/LQDdLgC7oACqDQeXuAByxwAirwsBAbsRFrAkuwBxbLCZ6ACrpQDNdQDvYgD+6gDuSgrai6Dg1IJt+Aq5bKkd4w/g7miZLCsAloAATCSBIa4AR20ArSAA/rcA796A2V6anksAxlYgfuUKkkmZAoSg3MUAhU4AA28QJkcArOkA3fkI/lEA6UyqfxUH1jEpaFOg7pAA/koAygYAciFhRKgAiukA0+WaCEKg7FMCY9gA5yOpLigA7qoAuEoF9LgQWOUA3tMLJb66XtMCbAoLJUqprp4A3MsAmvKRVf4AraQA4im6bjgHNgwg2FW6PhsJSpQElaEQF+EAzxgA6dS6PdMA1iorVL2g3jwA7IcKFd8QKPwKuuq6TdoA1h4gR266OzSQ7VkJ5l0QGxgI/nkLoHWpBhogf8qqLkEA/T4AgPwBZL/rAKJ0myB0oOYvglj2CqHqqY6mALOCAXbRANc6m875kOXgAmoPC7EloO5yCidzEBtsCiHboOUPclngC//FkO7OALVMAXhFAN76C94bkOAPUllQC+8fm5r5C2fsEF1IC6BqoOaQAmfPC84rmb42ALhTEF0kAO5qC+uVkOkLolvjueIHoNC3wYGrAK8crC4SAm4kqd4gAORMoYqIAO9mqc3bANYnINJnyZ5mAOtxAZTlDBN5yb3yAMYvIKCHyZ4+AOr1Czj2EFz/AORXyY5dCcYAIBHIya3ZAOwSDBlUEGrlqc60AmxqCsmCmY1TDAm5EJ5RCsp5kOm0AmL3C0p3mo/qARC1x8mt5wDmbyC3h8mN2wDsEwGlbwDT16mehgCWeCpIiZl+HQvqVxCrRpmeLAu2diBQ5sl+FwDqOQGipQqof5Dd6gJogwxmNZkqOKGpYwqXYJol6bJpfQpWO5m67wGh7QsV0skLsZc2oyCbYMlSOby69RCezwwzipkbjWJlmwqKl5Do1MG0lgkE+ZvHNiDJwakqU8DnZqG6JwDhb8kRWKCXUCBLzgDm9KzLfqCLthAK5wkk2sjePwDuqwCnkiAHfADF/ps9VYjeXwDtHwBsChBsLQDupwDhAd0T6ZC3TcJwdwA2TgQofQiMNRAzDw0TOQwkU50iRd0iZ90iid/tIqvdIs3dIu/dIwHdMyPdM0XdM2fdM4ndM6vdM83dM+/dNAHdRCPdREjSE8MAeN4AvP0AxM3dTP4AuNMAc8UNQpgQWYUA3woA7zOg716g1e/dXe8I0krA7wUA2YYMxUvRFbQLXu4A7noLghebVt/QynUM5pTREvMAx5iQ75DJV568PDAJF3DRFmgA3tOcyZ+Q3pgA1QNtgL4QjcAA/QfJneAA/cQM+ObRBz8A3xfJyf+w13ONgkoA2WDKrloA1oTNWZoA59jcProAlpDQP4iNi3qZrcINhCXQdwK6GC6aJA/QqwLKHrEAtA3QycWaPq4Aw9nQDa0NoT+snwiNMJ/jCyVGqQ0W3Tleul5CDEN80MkVyl5MAMNt0M363dzUDTveC/aIoOviDTmRDcX9qrMK0G8I2m65CjK30AycuoqklyK/0M5c2n5AANLF0J9S2n61AJKn0CB76n69C9J80Mk02ojovSdjDKnpoOd3DS4jDFfBoO4mDSg9DghboOiDrSiYyq5kDSmBDgp0oO7FyUQQurHFmUa4DhsJoO+F2KweDiqEoO2TyMCODHy+oO1z2KfnDcy6oO+1uK2zDhqOoN3F2KvMys7DCMc+DjuUoOoQ2KzwDlr9oN0VCK2UDbjdoN2VCKG7mtmkmKS6De9+paoegISk6t6vAIo/i+3MoN/ugQCqN4C1quq+SQxKIYrnsuDskwitrg4a8aDqAcik25595ADqJIAPaw59hoDwUgivWA6dxQD6EVip2O6aDO6Z5e6qJ+6qH+iQNw6Ziu6aIoD5gepKOomXtOl6NYDYyOquFwDaNYDHDMrOMwt6KIC4G+5bowiv275+iwx6KoCCT+quswoqH45ntuDicbimtOrW1OikTM5mlOis0A5qj6DUEuimVw7D/e2KQY7Z965cP45NMaDs8Qj0k+reyQUMOoAEQurCDakj2+rOWQ7BF548uKDgwakTMe5t0w0i0urOVgCCRtDrqqmCVNCO6+p+6w4y3J1a8qDtVw0nKA45W6/g5agNLMANeMGg7EkNIZkPFeusgrXQgwT6X3zdLGkOJ7Sg4Ez9KRXqhh/dJFML+EWsZ+69J3UOVxmg6GB9PvvafqcAk0fQvpsA1oug3poAo2XQt1TqXqUAs4jQokX6PpgAo6fQldj9xSv9ORUPPjuQ4H2NN/gA673sHo8AdALQLlmaLl4A2PGdTMAOf7iQ7iXdSGsA7qbpxKKfFp/QLPkMxzug7PgNt3zQfWbJ0l2XiZPRCvgJBmbpboUA5juvkFcQCuoI+fn5npsA6u4N+kXxAG0OJImvoi2Q0nmglY/PoGIQfTwNlZW5fhUA7r8A3TQLu6zxBwEAvYEA/t0Pc6/lme7RAP2DAL+n78FGEBWwAK3OAO6cCpBf39BS2/6XC0oMAFJ2T9G/ECVqBWhXAFIo3+8B//8j//9F//9n//+J//+r///N///v//AAFA4ECCBQ0eRJhQ4UKGDR0+hBhR4kSKFS1exJhR40aOHT1+BBlS5EiSJU2eRJlS5UqWLV2+hBlT5kyaNW3exJlT506ePX3+BBpU6FCiRY0eRZpU6VKmTZ0+hRpV6lSqVa1exZpV61auXb1+BRtW7FiyZc2eRZtW7Vq2bd2+hRtX7ly6de3exZtX716+ff3+BRxY8GDChQ0fRpxY8WLGjR0/hhxZ8mTKlS1fxpxZ82bOnT1/pQYdWvRo0qVNn0adWvVq1q1dv4YdW/Zs2rVt38adW/du3r19/wYeXPhw4sWNH0eeXPly5s2dP4ceXfp06tWtX8eeXft27t29fwcfXvx48uXNn0efXv169u3dv4cfX/58+vXt38efX/9+/v39/wcwQAEHJLBAAw9EMEEFF2SwQQcfhDBCCSeksEILL8QwQw035LBDDz8EMUQRRySxRBNPRDFFFdELCAAh+QQNCgAAACwAAAAAWAJYAocAAAAzZxkzZhozZxo0Zxo0aBo0aRo1aRo0aho1aho1axo1axs2axs2bBo2bBs2bRs3bRs2bhs3bhs3bxs3bxw3cBs3cBw4cBs4cBw4cRw4chw5chw5cxw5cx06cx05dBw6dB06dR07dR06dh07dh07dx47eB48eB48eR49eR49eh49ex49ex8+ex4+ex89fB8+fB8+fR8/fR8+fh8/fh8/fx8/fyBAfx9AfyA/gCBAgCBAgSBBgSBAgiBBgiBBgyBBgiFBgyFBhCFChCBChCFChSFDhSFDhiFDhyFDhyJDiCJEiCFEiCJEiSJFiiJFiyJFiyNGiyNFjCJGjCNGjSNHjiNHjyNHjyRIjyRHkCNIkCNIkCRIkSRJkSRJkiRJkyRJkyVKkyVKlCVKlSVLliVLlyVLliZLlyZMlyZMmCZMmSZNmSZMmiZNmiZNmyZNmidNmydOmydNnCdOnCdOnSdPnSdOnidPnidPnydPnihPnyhQnyhPoChQoChQoShRoShQoihRoihRoyhRoilRoylSoylRpClSpClSpSlTpSlSpilTpilTpylTpypUpypTqClTqCpUqClUqCpUqSpVqSpVqipVqypVqytWqytWrCtWrStWritXritXrytXryxYryxXsCxYsCxYsSxZsSxYsixZsixZsyxZsi1Zsy1atC1atS1btS1ati1bti1bty1bti5bty5cty5cuC5cuS5duS5cui5dui5duy5dui9duy9euy9evC9evS9fvS9fvi9fvy9fvjBfvzBgvzBgwDBgwTBgwjBhwjBhwzBhwjFhwzFiwzFhxDFixDFixTFjxTFixjFjxjFjxzFjxjJjxzJkxzJjyDJkyDJkyTJlyTJlyjJlyzJlyjNlyzNmyzNmzDNmzTNnzTNnzjNnzzNnzjRnzzRozzRo0DRo0TRp0TRp0jRp0zRp0jVp0zVq0zVq1DVq1TVr1TVr1jVr1jZr1zZs1zZs2DZs2TZt2TZt2jZt2jcAAAAAAAAAAAAAAAAAAAAAAAAI/gABCBxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6fPn0CDCh1KtKjRo0iTKl3KtKnTp1CjSp1KtarVq1izat3KtavXr2DDih1LtqzZs2jTql3Ltq3bt3Djyp1Lt67du3jz6t3Lt6/fv4ADCx5MuLDhw4gTK17MuLHjx5AjS55MubLly5gza97MubPnz6BDix5NurTp06hTq17NurXr17Bjy55Nu7bt27hz697Nu7fv38CDCx9OvLjx48iTK1/OvLnz59CjS59Ovbr169iza9/Ovbv37+DD/osfT768+fPo06tfz769+/fw48ufT7++/fv48+vfz7+///8ABijggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDTWaOONOOao44489ujjj0AGKeSQRBZp5JFIJqnkkkw26eSTUEYp5ZRUVmnllVhmqeWWXHbp5ZdghinmmGSWaeaZaKap5ppstunmm3DGKeecdNZp55145qnnnnz26eefgAYq6KCEFmrooYgmquiijDbq6KOQRirppJRWaumlmGaq6aacdurpp6CGKuqopJZq6qmopqrqqqy26uqr/rDGKuustNZq66245qrrrrz26uuvwAYr7LDEFmvsscgmq+yyzDbr7LPQRivttNRWa+212Gar7bbcduvtt+CGK+64jG7QwgoroFCGH3y06+678MbLRx9bpIAuDOQS5cAOO5wxRynwyOPOwAOvk87B65hTzsIMN+zwwwybc/DB7BDszjv1fCMIHVTwO8AA+aq0QRFxIJLJLMNkE08+9sgjMDvmeCPzzDTXbPPNOOdM8zfrsPOOy/fkc441vsCSCSFt5FBAyBm1wMUkzVzDzTcSu8NOwuWMo/PWXHftdc3gjGPOOeu04w465HizjTXMEELFCUwvpIMVngTDTjvpmEMO/jjf9P3134AH/nff34BTDtnvlMOLJFO4EDIRh6TCSzbzzPPOOWkLrvnmnA9OTjoYz8NMLprAscK2TXAiDTfjlH2OOVp3LvvstG9Njjmue4NNM3OIEC0Md0DzjjuYE1778cgnb3Pf4OD+zjqwOJHAsRHI0Uoz7tTDTuzKd+/99zKbA4895/RSSRG/JiCJNdyUQzw534Av//zdN3/1N9jI8sStB3xBzDzsgF/86EfAAiqvb+M4x+Uy4YNXJWANnmgGPN6ROQNa8IIHPAc92GGLSlABVQ6whDfIcbUKYvCEKKwd1e53DTqIigehuBv8UkjDGiKvb+Z4hzb+ADdNkUEV/uyYxzlsSMQiHg8c66gHNz7xQUppgRnkaMc5BmjEKlqRc61jxzeEYYRHgeEXlwPHFcdIRs59IxzpcIcskpAoNuTiYiYsoxzn+DdzyMMcssDCoLbwDBKag4p0DKQguQYOsoVjGEfoExNiwY5z8G2QkIwk1864jnWIAl92SkIovHFHSXryk1vToDQ0gQI5LSIblQwHKFfJSpuR8BzTmEObmkAMd5QDkK3MZS6p9o5ZqOBMEphEN+YRR10aU5fmiMc0AjGmKlgDd9w7pjSPSUJyDGMHXTKAJMyBDlxO85vGPKMW35AlHbTCat4EpzrD6Y50iGICVEqDNdLRzXXaU508/jtHM5oApUCMLZ33DOgxwZEObZBhSRlARcUAKtCGGhMc8TBHJY4UA2KcIx0MdahGdQkOmMFiekGqgTHYocqNmvSe43AHLDDgoywwIx7FPKlMvyk+XmAzR15AYjlmytOA4s4aN6WRE+aZ0Z4aNZzsGAYmYeQEZdCjpEeNqj3JMQ9e9JBFOqjGOnYq1a7eU2LGQICKPMAMdxTVq2jVZTjc0YoTKQAX8IhpWuc6TXSsgxQkmkXe6MrXe34DHemgBIgC8Y5o9rVzhEusYhfL2Mae9bBeM4c5xsAhL2SjHZD1WtjExs1KDgxm5hDjzLZxjdKa9rSoTe01tkGzcEi2Yu6o/uTrYDeOx0L2G+5IRlArpANrbC+zOCsHOtwhj3nYwxzZyEYucjGKS1QiD3Soggk4IBISlKAKdNhDJi6Rilz4IrnsaJnAzmFY4IaPHckA6YRUYVbg9s216GjHz+CRi0l04Qc6WABPIPCDH5AhE8WIx8te90jgjiMdE40QHc6BjsOS4xwVIy82eNEGHECFCHZgRjbIMdyElRetWqyCg7bwjXSIFq3gGK495gGNVkyiDUu1ygFy4IdK2MIa8qgH8Wxr0gNzI8YGusAw2itV5pmDHfDQRiXE0AGzqAANocjhOgTIY4Hitq0HOgRMo9q8dmgRG8u4gwPgsgFJXCMb4WAH/sxO3NNznMMLBNLBNdZRZXW6rx7kmEUjoKCXK0zCFxpsh1w1Go51MMMAAYKFFmdaOHMM7BZjyIBgSDAHX3g5tHWWJjjcIQn/0OFzJ21ewryRjIMqZgJuMEaKYZZpXbKDG/zMTwKS4Q42N/QcdwRGIkggGR1AwhfpEGKP3WEL/BgiHR/G5zfIMbBO9EAzR+DEwATo0AdzgT4wmAZmrXxkcHCj06GRBDfS/Ecrv2MX8pkEzARKDniwgxaUPQ0ZaOGzZE/zomxwDwa40eB7Ns8dv7CCa7hA6z+2OpLsIAZ7GIFsex6ZHM1IA23csI1xsIOr6pSsqc1jAWvQGZ/skEcw/hahm0T87+Pg3LQvzKMHE4OTkucIxJh7A4JtpiMcB6fjg6cwHuyBk4Tj+MUQiEOFYZBjyt/8xjxgAR4YrHua65gH75SDiGvUI2Z19YakuVMGIofT0ZW46nKCwIrE5ZyMuAWydbp+dit+g2zWUAN1HsGNp6vVHc/GjhC8zspv+EwWSsBOGYYBjyFy1B2lvA47dPl2c4B7OxtIhTpm2Mq+XecXWF8lg70BB/F04uiDHiQ6blEdKsiDleeoBy/QV54zXGMe9hbkPJhAnW1AVZIkFAUI1FMEWtsakuHgxnS+sA5PotEcTHePSF/3yXV8QTrXaPsJ2zGOS8xnBbd4R+YH/vmNa0gn9GMcmyHuE4JZuCP2YyRHdOCwbTr+1Ryh2E8IirFXQbaj88/xRPHpeI52ZOI/OvA/6FdE6+AJ0IF5c2RxpTAgNUBr0jc/5hAM0HENA5hCEjMMAWAgP8AN61CBKDQO1gAdfGdE41BVv5QgYOANI1hEhfQcA5APV8Qz05BIDVIHCjNG+bA0zSEA+FBFJUYOfSAhpjA2VpQPBPAc92BEjkZyFYILhWVE8wAdoWVDfkcMOmghOpANU2RDqgQdyQB+89NR3rA/G4IHhfaAnVMOCvccrWB4J5QO5IAHIOIJ6YBxGIQOpwAdfbB4GMQzyRciD8AM6YBC7NAG0PEA/ttHQO/HcyXiB26GQeYgHdaAhl9DDvFgfSlyTh5YO+CQDNIhBv1GP0m1dSqyAtPghvPTDi8wHd2wiZwzNsz0IpswavJjDmsoHUbwDvLzDrcIIxPADLr4Pd8ADyxFHa6AisizVmVgI3TQDreHPOtACNfxDa7oNYXGDDliAMywDr8nO7aIHQUAO8dzOLK0I3HgDmD4N+QQDtoRAuRQjTmzDr24IwXQDPsnO+MQDuqFHSMgWZ1DQpMgJJIQQJ0jWSHgHc0QjIIzD9ywAUSiAdtweprjDs0QHoRVjcwmcUdyB7/1N2uVYOIBC+XQSLFnDu2ADqiwJA7AC+hAkDnzDSN5/g7HcAHnoQax4A33IA9qtpPuQA/ywAuF8CQS0AjJUA86uZNq5g7zEA/EMAkSwB4JcARzgAd3cAd6kAY6YCVSSZVVeZWsFzdgGZZiOZZkWZZmeZZoCSEO8AM7QAV4UAeUkAu2oA3z4DJ2eZd4mZdSNwu5gAh1AAdH4AMscIVp+RJBAAeIUAq2YAvJ8A31wDIu8w5qhg4L041fMw4L0zPsIGDzEDTukA29YAuwcAmBUAX7WJgdYQCQAwzW4A1pxA7oIFnreELUKFlkYzXkgA3OEApccDqoWRElEAaVoA06eQ7lgHOUCD6Fczug4w6zMAc0+JsJQWmasAvkoGPoYJmS/nRk8hAPzVAKiECGv/kAiNCajpYw2plLD9YO6xB8uxAEZmkAW5AM7kZtG/Ve5wAP64AIYkcuVRAK3FAPT1hkSURsh+CQ4CII11BoDUdXK2QO28ALu6ctYDAM8XBLyWll4YBZlXCC03IHwQBH5oUzJSYP19AJDeQsZ0ANfpShRtU66dANoFCMx9IBpsBqIyo4y/YO0rAFxKI+zSAPyJijgjMOFNQKAucrNEAMD0eknAhh3BCLubIF2UBSTto9vIQJD2ArkmCJ6XmltLMO8cALWRkrslAO7QmmBPRTSboqKrALsKemF5RPGnkq2FcPdiinFvQNuugHpQICxcB8ekpD/q1DDoYIKhnACx05qFSIDucQb5yyCtrHqG4XD9mwcZfSCv9EqenHDtewBJZCB3XIqXPEM8TQn41SBMJDqoJUDvCgCo/yAIqap6w6R8gWkIviCedXq5JENebQRIbSA9zgDrwKSuAAD65gKIoKj8VqRWMThIFCBnrTrLq0DtbgoXyyCytIraBkpP+3J2qQDkPKrX23DtlQpndCDHxIrtPkd7hKJ10QDuPKrsbEDtOQA3MyC+/wjPQ6Tcz2rm7CDPPar9PUDrngJglwgwQrUOgwDWziAOSQjgtrTLC0JuPArBO7SuZgDGliDBJrT+HAWZUEW+4gWSZ7sihrsmlUMOsQ/ptZ86UCtQ6dcCZzQKwmxWHEhQ8ZMw27YAuZkAmIMAdz8AYnYF0lcLRIm7RIOwJFILRzYAmXIAq2kDLnkA/1EA/tII4m5Q42YCbhwK/tWjiH4zMAVwlgsAOESRIYgARtgArTMA/tpDd846JXZA7KUCZtEA8pd3Ql6w1s4wdNwAA2oQJcEArOYHtpRF50S0T0EANkQnnGNJLzYA7JkAltcJBBQQSBkArbEHJpSk3DMCY4cI+rtJxlYwt9oHZGAQWHcA3wADuLi0HwMCa9ALbclw7sAA7MUAkpKhVWkArcYJKJKEnloAdi4g2xOz8ptQ6jcG1a8QB34Av0gHK9Sg1i/lJbkQST72AMdeoVKoAIzIa9kPQNwgcmSEC6c+RH1yClZLEBreCaGCVI1Bgm5xhI5kAP1HAIDcAWRVAKoIOxF2QOJQAmiLCuY0Q17SALMyAXZCANhZW8tMMOIvYlmYC+RnRR3uCndiEBslCoZOQOdwAml2DBNqRAuxBretEH1yAPAAw+7uBCX9IIBlxD1OgOqoC5fkEFHgfBgtMOYQAmdGCzNdQ65SALhcEE08BNPPw154CtXHK+NPwO2QDDh4EBpVBJNDwOYvKx3kMO4oCpiiEK3JhC39ANYpINS4wz6IAOsxAZSOBxXJyMvyAmqtDCm1MO8aAKafsYTgAN8pDG/jVzDj4aJg4gxPTjd76Aw5XBBfJqQe5AJsRAq91TaNeAwpkxCY8oiiAZJiqgt7V4DtDqGa3wx/JDUGbCCwM7O7i1cqLhBK4FPuvgCGeyhcnDM+MwwaQRQ8NLO+RQvmbiBDM8OwfGCalRAuqaPOEADmoSCIYsO7eDrqnhCNuqOXzquGoSCQqJReuQCq/BAVoofa3DZ2zCCNMcWeNgzbDRCO8AszpznBbmJlEwrYFTYqw8G0MgNpqDUXNCDOJ6mXUIrLWxCelAvVuTT48nJzuQC/GwqzljpOFwCLtRAKkAOqFXDvLQDguIJwHgBszgbnnTMLgmDWYAHGLwC/CANxND/jHyUAuWvCcGIANc4Ad90AeAQATHAQPosgIt4MTS2dM+/dNAHdRCPdREXdRGfdRIndRKvdRM3dRO/dRQHdVSPdVUXdVWfdVYndVavdVc3dVezSM3oAaGsAvQ0AxmfdbQsAuGoAY38NUqAQVmNg8nqTDjAA52fdd2jZnc1A7zcA2SIM5u7RFTYLjxEA83pzloVNjQEAoAHdgUoQLAwDNIVztHx43A4JuODRFeoA0klbzipA1wltkMcQjeMA/szInz4A0QLdoHoQZrZcebk1LhIHesLRAhwA20jEJvxw2KHNiTIGhFxGyCFdgr4JqA/DUl5g2YzdVs8LlXVGiHutXs/kVHbLXVzdB+c9QOzoDVCMANcVxDvXyaUI0AWgtJYiPeTh28n2QOZizVzLDLg2QO2AjVzQDfkGQOFenUukDCnrQO6MbUk9DMrOQOAHvUYiDgreQOkGrUBhC/0lRiiHbU0GDfrGQO0XDUjYDgxuQOjVDUJKDhx+QOAzzUzHDaq6S7Q90GwQxO7OAGQv2OAjUO6gfUfADi3+QOodzTqQxO6PDT27RRjufTfqNRliedY7DiAcUOC56WvkDh62QO9ZyWB+DJJxUP6E2Wd4DdG9UOIVyY3WDi3wQO7Z2W2XxS71CYauDkPkXbZwkNYP5y0pCW23DcaLcNaYlzPXVGaFkE/vy9UevwlWR5CFouU+2ACGdZwUe1DppwlrOg5gJlDm1slh57VOSADGfJOkc1Dr5MllNoVM1jli8oVUZolj0YVfggAKQuVaee6qaO6mVZ6ke16mQpADAYVaNelvUQVd8QD2d5RpnuDWdJgZmeDWc5DJJsUuUQumZJC47uU8VmliOc6Js8loNg4w7lDhpclnx+VOjQtWeJ5zyl52iJxnlu52jZDG/+TeEQ5WXZBc3+5KGNltYeUGfu5el+TOMADaiZ5TP1DmeAmglA5fdZ76jZ5Cd1Ds+Omkd+UuvQpqg55A5V5NL54xp1Dn/w06HIbUDdB/N+TPGw5NKZNezmfUGd/gZIPk3uIAUkbrv4LoFDXQEdX7qPXNR+EPOfpOBHbVHgZA4Jb9SdPlBanNRAMIjH5HeqS9RuUOasxA7LCOA2n92R8NSzwA7dsErdwA54BdWxMOiQ1A6xMNWicPJzxA6iUNWRwPVQf9WK8PQ25A5MeNV40IF01DpyqNUfUEhy5EgTytXbSEaGFth/0LdK6A4X79gqAA3lbEC4BQ3L7dh0IM8odDt1UNsEoQpkQ+fIuw7nAKuUXxAGkArodMgVkwoR3vkGUQDbNEWL2zevMwl7bPoGkQbUsFbkRTsJ5A7hQA3dC/sNcQatoA30UHjpXkjwQA/a8Ar/zvsVQQFTkAne/hAP7CCuEMMwF7WZ3pAJVEAByu8RKuAEMj3T4D/TfvAEPL395n/+6J/+6r/+7N/+7v/+8B//8j//9F//9n//+J//+r///N///v//AAFA4ECCBQ0eRJhQ4UKGDR0+hBhR4kSKFS1exJhR40aOHT1+BBlS5EiSJU2eRJlS5UqWLV2+hBlT5kyaNW3exJlT506ePX3+BBpU6FCiRY0eRZpU6VKmTZ0+hRpV6lSqVa1exZpV61auXb1+BRtW7FiyZc2eRZtW7Vq2bd2+hRtX7ly6de3exZtX716+ff3+BRxY8GDChQ0fRpxY8WLGjR0/hhxZ8mTKlS1fxpxZ82bOnT1/jAYdWvRo0qVNn0adWvVq1q1dv4YdW/Zs2rVt38adW/du3r19/wYeXPhw4sWNH0eeXPly5s2dP4ceXfp06tWtX8eeXft27t29fwcfXvx48uXNn0efXv169u3dv4cfX/58+vXt38efX/9+/v39/wcwQAEHJLBAAw9EMEEFF2SwQQcfhDBCCSeksEILLQwIACH5BA0KAAAALAAAAABYAlgChwAAADJmGTNmGTNnGTNmGjNnGjRnGjNoGTRoGTRpGTRoGjRpGjVpGjRqGjVqGjVrGjVrGzZrGzZsGjZsGzZtGzdtGzZuGzduGzdvGzdvHDdwGzdwHDhwGzhwHDhxHDhyHDlyHDlzHDlzHTpzHTl0HDp0HTp1HTt1HTp2HTt2HTt3Hjt4Hjx4Hjx5Hj15Hj16Hj17Hj17Hz57Hj57Hz18Hz58Hz59Hz99Hz5+Hz9+Hz9/Hz9/IEB/H0B/ID+AIECAIECBIEGBIECCIEGCIEGDIEGCIUGDIUGEIUKEIEKEIUKFIUOFIUOGIUOHIUOHIkOIIkSIIUSIIkSJIkWKIkWLIkWLI0aLI0WMIkaMI0aNI0eOI0ePI0ePJEiPJEeQI0iQI0iQJEiRJEmRJEmSJEmTJEmTJUqTJUqUJUqVJUuWJUuXJUuWJkuXJkyXJkyYJkyZJk2ZJkyaJk2aJk2bJk2aJ02bJ06bJ02cJ06cJ06dJ0+dJ06eJ0+eJ0+fJ0+eKE+fKFCfKE+gKFCgKFChKFGhKFCiKFGiKFGjKFGiKVGjKVKjKVGkKVKkKVKlKVOlKVKmKVOmKVOnKVOnKlSnKlOoKVOoKlSoKVSoKlSpKlWpKlWqKlWrKlWrK1arK1asK1atK1auK1euK1evK1evLFivLFewLFiwLFixLFmxLFiyLFmyLFmzLFmyLVmzLVq0LVq1LVu1LVq2LVu2LVu3LVu2Llu3Lly3Lly4Lly5Ll25Lly6Ll26Ll27Ll26L127L167L168L169L1+9L1++L1+/L1++MF+/MGC/MGDAMGDBMGDCMGHCMGHDMGHCMWHDMWLDMWHEMWLEMWLFMWPFMWLGMWPGMWPHMWPGMmPHMmTHMmPIMmTIMmTJMmXJMmXKMmXLMmXKM2XLM2bLM2bMM2bNM2fNM2fOM2fPM2fONGfPNGjPNGjQNGjRNGnRNGnSNGnTNGnSNWnTNWrTNWrUNWrVNWvVNWvWNWvWNmvXNmzXNmzYNmzZNm3ZNm3aNm3aNwAAAAj+AAEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOqXMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUKNKnUq1qtWrWLNq3cq1q9evYMOKHUu2rNmzaNOqXcu2rdu3cOPKnUu3rt27ePPq3cu3r9+/gAMLHky4sOHDiBMrXsy4sePHkCNLnky5suXLmDNr3sy5s+fPoEOLHk26tOnTqFOrXs26tevXsGPLnk27tu3buHPr3s27t+/fwIMLH068uPHjyJMrX868ufPn0KNLn069uvXr2LNr3869u/fv4MP+ix9Pvrz58+jTq1/Pvr379/Djy59Pv779+/jz69/Pv7///wAGKOCABBZo4IEIJqjgggw26OCDEEYo4YQUVmjhhRhmqOGGHHbo4YcghijiiCSWaOKJKKao4oostujiizDGKOOMNNZo44045qjjjjz26OOPQAYp5JBEFmnkkUgmqeR/BzTZ5ABQQnmSAFFC6SQCSy7nQAIDCBBUAAIc0ACWWd4WAJQBVAWmlGWGhkCXb505QAJtOhZAAgcMkBeVB5BZZ2BgIqbnn3TBeVmYhJqVAAJeenbmAmkmupUAjaI2QKSSOhXobYNmOtSile42wAKe9tQpcVSWKtMBmD53qqr+JXGJ3QAHwBpSqNzhautEr5ZX664N0fqeAHQCe1Cv8LUKq7L56dqmsALeWaez0VILJLIL/vpjnhayyiOzFlrbIrYcastiqicWm6K4IwYAbofknvuhuTV6myG7M+KL4Ls9xlsgvURCi6C+QfLLn8FK+lufwlkCbOx9BKcXsaQM+/pwQuquh/DFAGzc3cQcd0xexY2tWSVMVV7qsWMkR7dyYWc2uYDDPy2A5wEgC/byxVRmPFWYlz6Ws3Et24VuW1TubBfNzA39FrFFp4UAzjq7GpjAgAVANWBR42YoXkdDdqbSaTHtm7t3zdl1YjM7Pdbar5mNtJ+h2VsX3Kq5zdX+mbHxHRfepumtVZ+4LQB4VmSXdjhWi5vGpoiNR+U3coJXFXlllUvVJHRvqpV5f0FXR2lalzMm91abevd5U6djlrhUYYsXOoGvR1X6c6snVXtiuRt1u3W/D0W3Zb0TZffCrVO1e9ZhLX9e8lM5rxf0qhYPVPDOUc+f9kxJP5f3Q4G/cFfYDyf+wVqVT5b1Oj2eoc+WC8Z+Tur7V79N98s2/4H715R/a7NL0fCkcr6t/O8l/XPQARWnvBslMCYLTEoEVcK9FAXwKQUM3I8mmBIOXo+AIRsfkir4kwwexYMkMWGLSCiaB65EhTGCoUtQKBMahsSGJmKhxHaFQ4/08C7+MvyWprASxA6GUCA/3EgRjziYJeoliRhxoZGceLelQFFHV7RIFi0iRSbShIoj2eJEuhgSMHqxJmQEiRgfssYg6XAmbWRIGs+Ikzl2JI50dIsZxbJHjfSRh86xYx7/8seKFHKQOxGkVfCYqTe25pBnZKRAHIkS+NURkS9hJCVPskmRdBKTF4mjIiUySlB+sDalNKVBUnk1VeYEkoR0ZftkqR5YEsWWrKSlYHBoS10+JJW5bIglURJMX0LkkJ9MoUt6eRkQyAAGMGiBGgYRiGpa85rYzGYgBAEGF0CzBstBITNf+ZsJAAEIbMCDKupxj3m4053wcIc84bEOddjznvj+zKc+77kOecozHu+cBz30QY5D5CEL5yxAAVo0TtaAQAl2aIQncIEMb9jDH/u4RzvjsY5xePSjIA2pSEdK0pKClBzwiAc9NMoPf7BjG8OohScSIQcfKCA8DfVfbGQQBkxIgxvhIEc/5xEPeqoDHSZNqlKXytSQlgMd62AHPOQxj3akYxzg2EY0EpEFFsSmmF7JaV1+sIVRGCMe8nDHOtJRDnK4talwjatc4epWcpRDHVKlhzqCcQkszIA1kmRJ/cAqlyQwwhXB8AY+8EEPdlx1rpCNrGTpmg53DBQf0fDFJ+oAA9QkMJkoAS1BxMoWKYTiGuFAx1TZsQ6kTva1sI3+bVLTsY7VjqMb0sDDCUizP9GqpwZ8qAY95uHYusr2uMhNrkjdWo7a0gMetZiCA1JEWrJY4A6ykMY89BEP1yr3u+ANr0fXUY99sEMYmlCCo0DkgEtsIxzqIG46yCHe+tr3u80tKjm6cQsqGJMoDCBDMvARj/nS974ITrBy3YoOdjTWE0MQkN6quxUHwGEU0qgHPR6r4A57eMHsyEc8dqGJLFhmd4TdSNQCS5UJbGIc6Sgqhz9M4xrLVqj65UYeKhM1tI2FwlgJginQOl8bG/nIyHXrOujxDUJ4VTIRA7JHwMSsFG8lDa+IBz7YgeQue/m45YCHPsJBChNPRmXuclf+7ObzhWikQx7sOPCX50xnyao2HuQ4xhL+u5EyEKOx5aizoActWXKYwx3zuIUT+EyROPhCoDMmtKQnDdd13GMdt+gCoxsCBmrEeB1yprSoR63UckjVHMhgwqYNEgVbxIMdbSW1rGetVEPDAx6nACejnWCKcVya1sAOdlJDfI1PtMCXkPDGrc0h7GY7W6QxZgc28KBKKSRjHuoI9bO3vW2h0gMXL8jjBTAhDnxEmtvo5vY67IENQzBRC9uorXfTTe90xzgdyADCwxZwiXW0Q9v1Dji6DY1nOtjqB7IgKsAFzvCBz8Mdp8BAptywDXf8u+EYZzhK2SENKfzJEFFdeMb+R57ucrjjG2lYkgdaAVCRk/zl6C6HPdahiSPZIBnscIfLYc5zbpeDo7WYbpB0sIx4MLvnSM84OuZRiw74yAvRsMe5k071gJM3GPrO0RjCrI6qe33ktd1G1mk0hYrv/OtoH3g8kKFrGE3hGfk4etrnjvF04CMYT2bRD7QBj67T/e8Z7+cyGqCiEURjHmcHvOK5bY55yOJED+hFPaa++MrXux3wSAWJcKFWy3s+4+RohzsyASJD0GPen59sXVfP+ta7/vWJTz1T17EONHBoDN6Qh+yZ+lSo+vvW7uToOgL9UXBw4/jIT77yl88NcIDUHLQH6DxuzdrWoiP2sifHPJz+MfYK/WAb3d09SdXRjnncAx/7WIc3vOELX6CCE5rwQx60sIIQiCQFKtBCHgDhCU64whfDsH7xkFHtxA6oJ37jFQ/OIHQT8gqIJ35uBX3tIA8rVQ++gAliQAQ/AAE8UQFEQARp4AnKYA8bxVqxJn7o4A41FyF5wA7tkHrpwA4AZYDdEAxy0ANQkQR7EA3ekA7lR08HqHh4pgUOAgbk4A7Ep3jlUH77gA/VIAuYIAdtZxUM4AODoAm7sA33oA/EhX1Il4LhMIUGwgHI8IB0x1zrEA/18A2acAYiYBYv0AamsGTwYGBeSHLa93gHwghSN3fNJQ941g3QwAcTABcgcAn+3OAN5hAPHJWEX8cO7DAGBPID3AAPd8hw8aUP6YALklAFesEFmDAMISYPlMdz5gAP0UAqAFILeFZ1drUO7sQLaOABgpECeDAMgDh8l0hv5TAPl+AfeVBZSddc9DQOzpByioEBc7AMS8hRu8ht8RAOHpcfDuAM8+CIL8cOl1YMjpACkvEDlTAM7rBlXzgPu4Afi+AOQahx5JAO7iQKQqAZTBAK7mRgMBeDYUAfNYANuoeHaVgO4fCLoXEJ4bCIoIaH9AAM8oEJHEVy6VAP8ZALtncaaZALKrWO9ZZzceAeHRAOL5hxzTUPxLAFrhEG1ghqzzhr8ZAM7BEJ6ohxaZj+DtLgBrQxB+CADvHgdwxHe8hoHhuwDZaocfFwD8YACbrhCAMWlALXi8NgHn+AhAJna+xgCIXYGyXQb+5gDilJaTGIBeOhXQIXY+hADEhAHFmADOlQhwFHDvhQC+BRAw1Zb/CAD7mlHI3ADfrQUZc3DrTIHWpghgMHi5qQd8thBLGgV1s5aNonhtbxl4lJZ+QgVdvwBtRBCeEQl4w3D/GIHUcAmM5GDip1C0+AHWqADPXAZT43D8d2HfHAbZG5DgK5HSDgCu9QZM/mVtdBDHrZbC44DnUgHqKQlqVIau3AC9WRBffgbOygD8GgXuXBBtyADxg5avgQBdQBDnJHazH+dgoloB5KYI3YKGvmEA7TQQbwAGyHtg5u6R5Ex1rBBg9kIB3c8Jg0Jg/owAnzAQO8QA+7SWrkwA3SMZyCFlWLcB8mgAvzMJ2Clg7RUQf9SGmhtw6msB8moAydN2ry8JvPMQrnSWnsIA+e8B8/MGAK6mXwMArQoZuThpOqMCA6YI30aV/rYAzQwQ0lamP9hAwsVhxEEA7wcKM1hg7bAB2e+WXocHfhliBlMA5F6mWm9hwF4A91hlLYoGoNogf1JGj+cFPNQQD9MGdHmA6CICGrEFV05g8G8Bz88GWwaJQV0gun92X4AB3Dh2SgmQxcaiE/4A1xhmTMBh3OIKD29XP+4+BfG9IHpxijk6UOLPkcsoCaNOYO6dAHIDIK7qCTH9YOrAAdgtCaH4ZS6xkiFBAN7lBj8SAH0EEB/YlgEeqVJTIIkPhh6yAd26CoTZUO9oCfKZJwQCpb5eAM0nEGH3lfa9eXKgID2ACp9iUPNDAd4tCrkhVV7vYioFCM9bUOjSodS0AP9UUP2QojGBAN3Bpe5FAPTkcds6CsyNV4amAjeSAP2Ylc8JAI10EO0MpUpxgNObIA0QAP4fla2IodCtBax4VX1LYjdjAPggpX6WAO2mEC6XCvJQUP37ojCiANHfpa6GAODIgdKEB7kxVjmCAkl1Bgk0V7JuAd0jCuc4X+D+EAAkTyAeCQnJA1D9IQHqZ3r+5Ik0fCB+EHV423guJRC+rwatO5DvLQDq2wJBMQDO1gsiVFDkXLDszAAefxBrYwDvxwD4zYtfOQD/cQDIpQJxcgCc6gD1zbtYw4D/hgD8mACRfAHg7ABHjQB3zAB3/gBj9QKnRrt3ebt865aoI7uIRbuIZ7uIibuIq7uIzbuOcxAUQABFnQB3qQCb6wC9+ADxq1uZzbuZ5Ll7jgC42gB3XABEMQA3nquJxhBHXQCKqwC7vgDOSgDxilUfTAiO1gT//aVOhgTykVDySIDy01D94gDLtQC5xgCFrQsaqrGAtgWMWwDeOAaPHQDrT+17A0Zq+0J1VElQ7dMA2mEAad1byCoQJmoAnfwLXsoA5aaaviZVe0ZVnzgAt4YKXkaxe2+AnAkA5c2A67S2tpeA/2IA2q0AiGer9sQQGNIL2wSE//u20xKA/wMJ7AYAQIXBYLAAbOAJH22HMRyA71AA+NQJgXnBVaYArhoA9xeoZiZo6MALMlTBWHwA2n+JKWh2PrAA7B0J0x3BRlgAz2kG3ui4fmoHuakKQ9XBR8YAyQhoAkdYT3wA2iEGFJ/BNskA2fNsRop1ruIA6lcK5VfBMisArO6MRz1Y70cA1gEMYz0V7ScA/qasZzhQ4bJgskycYskQPJEJNy7KsyGA7+04rHJgEG3mB0ffxd3tYJFCDIInEJuPrAhxxb8GAPwbC3jMwRt6AOExzJCBZ2d3zJFfECwCCdnOxhG8ezoAwR+qkPmFrKHUYO3DoIqdwQJaAM7unKRqZa6YCqs3wQHhAMP4vLdtoO7DCRvSwQsMCfwgyZ9uANPQnKshByy7yg8cANUHDJeXCp0zxpKJUMJBzDSiBc2zxq6lAPr5DEFADMrTzOk6aOI3vBo5Cg7ExrQrUOZqa6QhAO8zDPwlYO9TALqgvMEsvPdBZVY6q4abBWBM1t8LANSFy4wNCkCy1sdByihPsG7hDHE/2Z8OANlrxpyeCpG11voPnO/yUG5qD+0SONbvGADT5gTLhAD/G60vXmjibtStGg0jRdb/LgC67kAFm60yTXDthgShOQDgsr1OgmbaCEDgOt1M22DsuASMuQ1BhnDr53a9I3D7TX1V791V2NaPAED9Z7VJBMcvAgCnmEB/uMdD5ofv1AUNgADLvgCZ7QCHiAB3TAAvinAn7914D91yigBHmNB5vACaewCxXFDv6gD/YgDwSLdPOwA3RkDjNN0naFVyolkppQBkCQuiTRAU0gB62ADfjwcGvVVlpcZ+vwDGckB/awlGnJ1eOgVYMgBRFgEy8QBqYwDdiJaAa42l2WDzbgRbaJbkWLD+vgDJ4gBykbFElgCK7+AA5Ducn2hgxM1AMZ22zwO1W7IAiMaRRVwAjcUA+tJdwfVg9MJAyX7Z/uEA/lEA2aQMVSsQWuEA5Iu6q0pg5/cETjgN72tXTwgAr5qBUUwAfDkA9KSc/ZcETXN2tSSw/LgMpe8QKN4I4PLmvkQJ4h0wTbPWmfxg2BTBYgIAvTq3OjZq8hlLCitg75kA2MIAFsoQSqYFlP7WHroAIh0wgiLWhCJQ+3gANykQbXcHoAHlvxQIQc4wkf/mU5Nw6ybBcXcAu6PGjzwAchwwlNjmQOBgzTqBeCwA33cOPiNQ87xjGS0ONHZq/z8ArP7RdZAJRHPlfyYAYhkwdtfWSqpQ7+t1AYUYAN/jbnTcUOD20sHr7m9OANZ34YHaAKt7bm6HBEVg1e6XAOz6wYp+CvNkYO4nBE3iDoJNUO7YALkdEEQDnp60oMR/QKZB5Z6mAPrwDajzEF1XAPoB5S7LDGITQBeX5foDkMb14ZYZDSHTYPXpQM6/xdp8gNX54ZmBCrxCq0IfQCsX2t7HDQniELtl5fJkdHwaDTsKV9TSkaUwB94gUPk5BHfZpcKIUOSk4aQ6bfsZUOHE5HU6DmsJWCoZAaKhDSyWUO5YBJhtDrr0VbH50akyDRkAXLxY1JlsCydgYPrvAaIcCn9KlanmhKkaDws4cODQ8bkkAPZ21S7Iv+g65kBQotV0c47rOBBFAFWTpnTMmQ0bx7qfdcG6DgDgueVBsXm74EBL5gD/JcUnRsDoywGwrgCpY1nOpwD/LQoqs2AHMQDRCpVvikjdewBsBxBsRQD2nlT/90D7rQ7IS7ADcQBoMgCIJQCElwHDUATTAgA4V+zHRf93Z/93if93q/93zf937/94Af+II/+IRf+IZ/+Iif+Iq/+Izf+I7/+JAf+ZI/+ZRf+ZZ/+Zif+Zq/+ZxPRzzwBosADNUgDaRf+tUADIvwBjzQ+X5RBYiID0lbT+hQDrRf+7Tfu/4mD/jADZeQ8awvF1jQ2/ZgD1kJWYc2/NVgCjf/+2jxAsX+gFJqKVtp6a/FML7MTxZj8A1GB+AE9w2SeP1gwQjjgA8j76v4MA5HD/5b8QaN1+qRtXTmQJnqbxUmEA7rXmORGQ7BPv9PgQmk6GUAkW5eJgAFDR5EmFDhQoYNHT6EGFHiRIoVLV7EmFHjRo4dPX4EGVLkyIcwxrkjN07lSpYtXb6EGTMmOXfjYJDEmVPnTp49ff4EGlTo0JBx4JmTmVTpUqXm4MkhGlXqVKpVrV7FmjXkq3lMvX4FO0+WVrJlzZ5Fm1YtWWnywL6FK1PetLV17d7Fm1cv2gbh0sUFHHhlunAO9h5GnFjxYsYMG6xDJ1gyYHTrDDfGnFnzZs5Aw63+mxwa7jpxnU2fRp1adcJooEW//rou2mratW3fVivNNWzeS9dJwx1c+HDiOn/B6518KTxgxZ0/hx6dIaauyq3LnIdJ+nbu3WmfqX5d/Mt5aLyfR58e8QKU4923pLlA/Xz69bVW2/1e/zpr9v3/B7AnScLTr8B5JAkwQQUXxCgFAgs0UAUGJ6SwwoOiKQdCDccpZzYLPwTRPzni2XDDeOYIMUUVvUsnshIhRCedFWekkbhAHnzxvXkEqbFHH1VjJ8cS2/mxSCMxuyQ/Ife75Egnn8yLnJSWhFBKKK/E0iw0SKRSw3jMyzJMMaUaRsku3VtnmDHXZLMnBuw5c0N7Lmv+s047PeLDrTghlIePO/8E9CJxMtyzwHJKCzRRRRuip1AN6Vk0UkkBeMNMR8Vb541JNwW0GkIvfY+cazgltU5wpgTVPXLAKbXVMc1BNVXxyDHHVVuvVAI5Wd+DR4lbfzWSET13HU+eRoBFtkdPdCVWPHg+STbaFXGxtFne1sFFWm1BXOYva69Lp5ltx6UwHBe/VQ6dcMhlV8F1PkW3t3LWabde/wrwJ97r/DHAXn/n60df6/oh4F+DzwtY4OQIPrjh7RJWmDeGHabYOYgjfm3iijfGjYB8MYaNX45Hvk0fkF8jxx6SV6aN1pNDi4xlmVHj5tyXA0PHm5l35gwZdW7+lkwdZHgmGrNcqgXaq3V2KbppxThhNmm44NHEaav3QgRHqb2aZ5Crv74r163jamcHsM9eC9axwaIVbbfR8ibWtZVa9W272YJ37qTMUfNuv60SA2m9W1pnjL8Pp0rrwV2CFHHHiRp0cZnQqeZxy4PKU/KY6GHjcs97cgBOzV0ip/HPT8+pzNFbYodp1F8facvVWYJnC9hvD0nK2cexEnffO0pyd3YI+b34jdqZnRx6jWf+IkEUX9seMJunfiJ1bNY7HW6q514iN7hcfJ4ruif/oWiQGhwdY8pnnyENoL+ZnHnap1+hQeA/ubz69z8omSDHXhr/BFiQd22tHOgY4AD+i1CTpJEjHjVI4ADn0CigxUMNEUwgdW4mD0tgMIK4iIc4MCaOeKTCgxi0xbAEJg9bnNCDpwBfvOJxChee0BIqtBYHa+jCR+CvUPOAxA5r2Ad4YO9S6IBHH4S4QxKU43+gYkc5SrDEJUYjanuCh4eouERCzENwG1rHPIi3xS2+oBrzkFuJ5FeNm5DRjXlYh7delI516MGNdzTIK9gBjzTOCh7seAUeBVmQBbhiHvHoY28cOA9XyGeQj1RAktihO0WSgx3rwIQCHrnJg7ghG+aYBzuMGBd0sGMe5siGGzi5yoSwQRbfyEc9ovgWJ9YjH9+gRedYuUuFZAALnhiHPeL24Q52qMOYx0QmO9wRDzh5IgsZ4GU0IfKCKQxCENfE5jUHQYUXSNOb3wRnOMU5TnKW05znRGc61blOdrbTne+EZzzlOU961tOe98RnPvW5T37205//BGhABTpQghbUoAdFaEIVulCGNtShD4VoRCU6UYpW1KIXxWhGNbpRjnbUox8FaUhFOlKSltSkJ0VpSlW6Upa21KUvhWlMZTpTmtbUpjfFaU51ulOe9tSnPwVqUIU6VKIW1ahHRWpSlbpUpjbVqU+FalSlOlWqVtWqV8VqVrW6Va521atfBWtYxTpWspbVrGdFa1rVula2ttWtb4VrXOUK04AAACH5BA0KAAAALAAAAABYAlgChQAAADNnGjVrGjdwGzp0HT17Hj9/IEB/H0B/ID+AHz+AIEKEIUSJIkiPJEeQJEmTJE6cJ0+fKFCfKE+gKFGjKVWqKlivLFewLFq0LV67L1+/MGC/MGLEMWbMM2jPNGnTNW3ZNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+QIBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq/b7/i8fs/v+/+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6f+z59AgwodSrSo0aNIkypdyrSp06dQo0qdSrWq1atYs2rdyrWr169gw4odS7as2bNo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEwtYzLix48eQBST2GEAAgQILGjjY3KCz588NGIQOzaA0adKiS5tWnRo16M+bNzMoUGDxZH+LB1zGLJozatbAgwsfTlz1guLAj4vuHLv0AtoEBAS4rW6AggXKl4NGzt149+/gkY/ezgB7berYAgxY4ODzatbZw3v/Hl++/fuqPTtYIBk9MgEFXKeZZ/gVaOCBCBbHnAPlGRCdf7oMUJ5ppyWHYH3cYThhgsj+aZhgfL8xYEB/EK5i2XIcppiih8KxKJ+L9nXGX4miDFAAA5ypOJ+OPPboY36alXcejZUYAOSPHxoII3xM2rekhSp25hwBRC4CIIH3YfhkcVuq2GVwX3p532dUVgmIbuy1tyGSa+LnYpj0FQhni0gy10ABA5h5hwDHYcnmn4D2qOGccgon5Wx6uhEAe4cG6qSOgzrKI6EFepZnomQMYKSakvpI6Y6dThqqZguUiekWRqLoJqR0/vjpgXCy+OWr3B1awKlUEKAqlLC26muoScYJbJbDESojibgiEUABORI7bIfCrurstM/2GKSpyQLAW4jVgkpcpN2G212YtIYn5QL+l+pJQKPR8tpkhs++2auYnZY7Z3ZBIovejZxKau+8HJZb7KMDw8vmp9fe1ie34jZsMMAOX/irjucWlhnD7UYMnsDjalztq1t2dmtfASjQL7SuUgsox2Bm3Ca9EsdsoMh4CbArwQeHy7LM4e08McSFDlexXJm1vPLL9Xr6s8daduxxjHeytWyQwvrsrsugNm20yjg/vfXTWnfHILZi8Xmzo1b/mTbSXD58tddY+yilAmGtizHczhUcb88aZ7f211eTq6R4DHDF58n+4q143sDe++3itUZd1aLsBlqfh8f9/fjbGy+tNOCQ84wyfqElEBWzrHoe7N6gc635io2jbe7+AtMpdfjdbnsNI7ihx/0i051bThzNRimAI8O89668qKK3/nCXrzufYmjp/lS07KFHn7K42qcObANk42Q3ktAHr/e7wybPOOef/95t+cKTvl9OfXLNNuSZL+/t+rAzn3P8FEPUTK6HP92dD2z66x78HNUAA7zEZgwaHNAAKK3R6Y9/zQtYqP4VNwc4UCX1k+AGD9i12F3QgCeMEQPCBxICcq57KfQY7mKoQen1j00fbOEM/Ye+ttUwaKob02tSwyvlZC5/G0JiEp1THym9xjWr8yH72pc7vh2ogR0JABHJR8NA6ac5QhrAAKQTgDLCYTFlFIAY8+ebypkwgyTEoP3+5GgcGWVEAG7cXxVvGEQbOg1BsHnOkBoRgMsowD0V7KH5urg54DRgARWR0A4ZWUL3AQlL2FGAvjgBIOxccpJc9GMUNcegiIxPhD9U5CJBZq4BMSAB0dmkKtRIgOO0B5Tc019oZFmQAeAylaocIYcINEZfXAlxvgum/dRXrQYk5JRzpCMMgykwRCaAl8JYD4X8REnRJa8z1QPIuhqpvGn25pF4qoZl+IXMCf7vWaGpnT+gucekiVJumhnZN7TYTkFRcIqVciY/JNk3Ks6MNM9JhwAMsLBuvjM0+aAnEJcmuG55RgEPioeNjifFONqzj2NigDzjEYBfLo6ZAQ2nPab+dqgt7W6RHrXiPVkDUXhoEZeEMmcijyTAgCyKQgaNqcMaQLd2uBCgDi3OZkq1kGWlyaTCHJXk0HFUVMo0mVGaakQKkMe2+ayiMCuNA/Q5jqpe1Z8g/aMjSYPNrTb0n+lTZQPaig2uQnWiR5OPjFTKEX6ZFKXbm6mCCucNX2IVe+SEGgPo2hFf3lVxlKppNmz22PsJlW3dC82MWlLLsyUVPGPFxhZ5WM9AtccAI4WJAA45yUjFKq5NIp40uHpWGipHtjlJQD/hiFTLpjU4DUjtMhxb2+JqD0NSMl1QQvixw8YIksy4KRw5BtjvSImFQeFqBD/bnQYoFxlH1SlpDaX+VaVcrJK+DWyMhAuMcXJXQaEh61PMVtmOulOwooGuMEbrXLjhtioQhCrmfhU208p3F5nRHDOrSzqResW97zWUA9hbi5JaUK3q1aMjexqW86YQsETVhVkTm73l5NAs69luVJV5xQbw9RWG1bAlX+jFubplxNEUl2RjgeNudqaocdFVV3lLZEMdWBUxLnJUx4YXu1rwU+qjFYgIy4qdhrK3NKWyXpKcQHiVtxS0xXDoQgNkvwj5sWurppZJwV+HMujFfgkzMNX2tRCPAsJRvCxMDeXgxMg5qOkd5po7UdWdPYnB8NUvdYSs5ytX6siX4PIeYRgySN/mcI2WcXEbzIn+Hqfwy0TyNJb5SMf5ZAa7keBuZ1BdJdZ6b1g7lkQCMIZo+8qxwLVaYbaK4GRA/wl8kyB1qeesml0nAc/vDKtzIIFH4N2TesZeQq/3PNRBI+LPbwTkYqPtBAL0E6zohROwFYHt0lrU2txeArIzbC1LA6LcF4R2uqdwSPyaW8xCc3cfmr3T17aORfGc9xWmbetlwmrchGhtnq1sY4FnAd7iJV0h7H1ufTtcCh6mNrsdOQgLazrHLbb4xakg6kAPC855cFnETSPykVuh5JleuEABUd9Ra9vlZSAuoGkVXECsG7HSzDLO0fDzTWt8eGXmA7F/K7SGDx0NMH+1uQChYor+D5t0CH+6GqJucrlR/X3cmZ/WFdVm41KMsXLweH91NHY5SDpxnGs5HIqubINlve1wmLWvzSX3N9zIqkbPL97vwF/ASpk4fvj70mM0+DzQffHISbyMM9v3xq+B64CqfBskDe4Lb9jy+0ZzjzTfBlBqDu2glwO8C54gCt+h6qNSdOr9UPa6c/wPd3WpeFC/DxvRpgAQoAAEJkD84hd/+MZPfvDH+nuFrH7GU/+D4u39pUfiBjsPgAAGPsD9D3gABN3vvgfGP37vk//86E9/+NfPfRB0QPjl0aTr6VF2WSXIu4BQ+8o6Y4/1BN8CGcABHfABIAB+4tcBCJiACriADNj+gA74gAvoAeFXgB7QARqAARYgfCNSD/wmKT1Hcx4oe+vALBUggAgogeI3fglYgRDYgi74ghDIgidYfgeIgBxAAaCWDpjXaJkhCLqCb8LidFTlABagAeEngzCYhEq4hEzYgDToARmAg6SHDY+HV6XBanlwN/JiXSIYDgtAARiQAQNYg01YhmZ4hkqIgtzHARlgARAwhdNQe77VJTMnCDW3e+PAABZggkfYAUiIhoAYiIK4gn5Igx9ggxCAhVR4hwpiCM83M12YDQUwARzAfSo4iJiYiZrYguGHAdv2DQsnGoq4ByzTJ3B4DAOgfZVogJvYiq74igrYfh+QARUQidX+8IgFkghYoyHaIAAVcILmB4vCOIyviIIImAHoFoeMKHiKsIPAlXTSIAAPsAGWSIzWeI3CSIMWYIvPUG8J0gi4KB7zpwwCAAEXUIneh43quI7F6H20WIfRUFJaKB7caAgyolffBQ2+6IfVyI7++I+aaIwdAAHU8GchM46HgEe/AXDJmAwLsH3pCJASOZGbKIHvd4q8IIdrNYrNqB0E8hn1aAwPAJGHSJEmeZKYyH0dYAHwyAzGMx6H4hnowkm78XscOQwOwAECiZI82ZNoaIwcEJLFYBkEUJQEIEY2MY0q6ZNM2ZSAyH0ZIJSzlwQQkAH96JRYmZVM2H0Z0JJTmQT+ObmTWjmWZAmDKhmUX4kEDACRZdmWbqmE3IcBGJluD9kBIPCHb5mXesmAa2gBc5ksFHCCezmYhOmEa0iQbccAlViYjNmYfDmLf+kf+xiRjlmZjrmGFOBwDTCGeGmZnkmYEugBaLlrvmiRn3map3mIiIkpD7mUqPman8l9F4BykwEBYwibuImaa9iQhkEBnZmbwGmZh/gAtzEAbBmcyImbFXAYBYCOyfmcsHmIGMB7c9GcJQmd2PmaEogBtDkXOQl+2Rme0QkCUakXDjCAvyme6nmZh4gAdsEAA7ie8pmbH8ABkYkViul+87mfsCmBGXCfU7EA6MmfBNqf9UmdWjH+AItZoAyKmx+AAWchAFZ5nQ1aoan5oGRhlRa6oQ76Acv5FRRAoRwqiOkZgSN6jRJInFtxniJ6og9IfuKXggwogDRqgzZqgjjaASaogDB6hOZXoi6agPUplUpxAAMapBE4gSyYARmAgRUwARAwVjc5BbTRABAgARZQAWEohgMIfgYog0DKoBLIAQhKFNuHpAi4fuRZAfuxWXrAJwvwACXIfmgqgR8KFRDgmhWqhumYARDgno+wABAggGp4iRZ6iF55FJvZovzZfiDAARhQAW+YCatFARUghgTIqI3aAQDqEgqqqevZfR1QAQ8wpZYAfBZAhgQ6i0gRomGKnKKqoxL+UKaeMAC/mKZ6qp7c5wBEIaCgmpwSCH5RyJuv4ACXqqrheaBBoaGhOosP0J22QACDGqvi6aE+AQGmCZ2iygEqmgzlKIDU+pyHSKwuIQALKq7cpwEUYKrBsADHCp7P6Z844arxyn3bqA0LkKq/iprjx6szYZ2wWpJ3+g23mqvRmQEyUQFXqZ1Q2a3l8AAT+qqMyX2ruRIDEJ+56Z/+yg45abCpyQEsQa8MK5oVCw+2KZafmaIocbH7WpjctwEDaw8U4JyvyaolMQEtS5jcRwG0ug4EEKI5u5fcl6gbca6WGZobQKT10AAa4Ie6CaEfUQAe67L1WbIFEZj66ZmHCK3+EPEAQeuWdtqp8dCaX9uWHyC2/ZCnwqmaFPGLlNmYH6C0CbEAZauVUCm3B/EANAu37GoQdYuVdtpY2yexWlmBF7EBhOuUKmm1HHEBoemyCEsRDfC3PXm3JmGbd6mz5HoQoPmgfXsRC2C0b3mIE+G1ehmXL2GdlEuRErixD3G6HhCzLlEAVpm4KAmyEWG7rPsBmWkTBFC7YBsRakuW3ge1OUEA1Li6/vgBjJsQqTqWEmgB1lOJuru80vsQzOqU2zkUAJuVHqABEKGT2vsBGoCQOiGghtqUEKG82eifaLsSLKq9DxEAWcuT9bm5QJGn7AuLH9Cz+kC/lesBvQsVGJD+rSb5feYrEPU7kTtrFdlrkh+wvieprFfhqygZvtWriePKFROAsQD5vRBxpv/ofc2LFRfwtuuIoQ8RoiMcuWFhrvuLhswLEQKQwU/5Afh7Fb5pwzIsETtqjYGbFiKMjbjbtTEMlxvAtV7RvcR4thPhtMLYwG9xwkfsgh6wARTBAFUMgfU5F58axUpsEBnAwy74AQ4rF8Pbirx7EVCciV1cM6IriG9sEQGQvoBYgSU8F3lKxiaqEQRgx2Y4x3wBwyTaAf5rEH+8v0EMGApLxtz3uQoRx0m4tYQxAAa8hILcESKbhBKYx36xx1t5vSIxxuRnosCIupMhAEYYjILZyqH+yQFhfBFVaZfsx5UDTB0DMLMGWMv1WQGHbBE2c6UQMMwQgLeEwQDDR8xQasxp2czO/MzQHM3SPM3UXM3WfM3YrFoLYABWCgEVcIFj6KVe2n27LM5eyobqOszYsYHZDA6CCoZMirgEWIC73KJgSogvaoiOCp5MGqkTIITtzAx8QgFNO4aWWMqAHIP4/IIsCKZ8mo6QGloBTQwEIKcGzcfraIh+yswTbQrSCoDfN7V5KYuQioMdDQsCEJgGfYgJzZhqeIwcfdKSIAAdi8LaurPvK9O4ZwG0jNHCKawUEMs6bQgqvbAMKqoZAMlDvQd6K9IceogVkNNLjQYQkLxbXK3+h3ivUx0ID8CPPs2fxjibW70HxunUaBqD9em6Yx0Hvri3Z12GKIgBRLvWZtCcj/vWcnyIt0zXZhC/eK3GHvrLfN0ECnvVf+2ABJgBgDrYXTDGhn3YaM0Bc83YT0C7Ng3Zw9jJlE0FtLvAmK2OhzgBm/0EBEC9ny2RoenJmz0AwHvaEGzGo30Ex3nWP8yUwxnbQjDbrt2TFpnDEw3Ku52V9SnVlhe6jx3c7Wi8Sy2hRo3cWOl9sjvRqfrVzg3aHjDZ02zB1S20yo3Nrb3de6nZ1/wALQ3eo8up1fzA5l2Yi/zM+rveWtsBMe1wkgzfcBvdjXee1G3fvF2f0Ih36s3+3ylrrZZX3wKutS48dgJw2Qd+mqLZdjW83w0u3B0wduUdnipYgRKurUXscuK7nqHJfudnfgf9hLx84cn5AaJ8cWmMrvSso0yapcI3zAVglDV+GUVZ4w5y44I6zBVQAQAIrgWIrMH5AScmcMDqfVDJprSDBv6HAejY3Pza4fPW4kfbjzf4iXTALFDOjwfdxo4JAsQdGBs+kWrIAW6o1GzwhRhw0a3M3lQebQhw3AAJlRQw5mjAAIEp5afrcFw6mGdZi5TgAFB+1+Gt2okymHGN3Y9QjhqQuYMpcGXexByA6JRQAL7J4Fo5b1psthW41zXS5nQOix5Q5aO+iXot2JT+QLbEq+aJwcLPDZmyMK2nPogfwOhV8ry2rde3IKGGXrmizW0K65NQ6dursOeTLsOWTiSwfpLb6eqo0AAGPsJnnC1W/o8omODBoJiXXOd4vhedzsADmQxlXeucLOnJztAdUO3IMMQAieQjbLPP4KvmDoHabmwFnNEPmsDGkJ/s6AFqbWwLDtpJjQ36jY0SeHEfPowbvA2FbY0ELnBSy/Az/A3u/ooRPHJjzL/33g0MgOJPid/cNuneh+vYcPGYaLg4F+4pr+LpUNqaboal/nTNTqJHfg41H4hGPnbDfscq3A4sG4gSaOzZ0vOB7AHfzgxGX4aHON+nMrmB3PHusAD+3W6WFZ561Ei4oWny6aCvcBnxqbcAGQCvL8rr+iAAJMnFqNzMAUDrJY6ClQ4QEMvLxV7NAOIAEyABFEABTv8Ov9d8uB34gj/4hF/4hn/4iJ/4ir/4jN/4jv/4kB/5kj/5lF/5ln/5mJ/5mr/5nN/5nv/5oB/6oj/6pF/6pn/6qJ/6pX8AwSeGHECjr8+GwncAqg8MDOC2JR6LK8ino0r0tT8KDQDlmXqGwQqpXP/7nlAAG3CbKa+C/4n8qODX2dgBAQ/9nbDn6uh+oG79mGCbrIzwbMv9mEAAHlznHQDt4s8HS2/mYJ/+4Fj+E4ze7s8I126/yz7/e4DyxN7d+C/+CNNuv0DAAQyJReMRmVQumU3nExqVTqlV6xWb1W65Xe8XHB4GOp7OGZ1Wr9lt9xv+6QjEdfsdn9fv+X3/H7BK4MMMzvAQMfHMw4Mu8BEyUnKSstLysqpDTpGzs9MMM1R0lLTU9DSSY9OTtfXtQwhVdpa21va2kqPQlbcXzSMWV3iYuNj4GCBj1ZfZ9SMDOVp6mrr6rmK5Wdvzo8L6GzxcPPwhe/tc8eNhnL3d/Z10EH2e2xH+Hj9fP0yV3j8R1j6BAwkWTELB3D+FbLoZdPgQ4jgCCRdWTPOBQESNGzkK02URZJtgHUmWNEkJAsWQFj9AOPkSZsw8jFbW/OVBZk7+nTutILT5UxMFnkOJFi2iEujCD0aZNoVZYVfSlQ2dVrUKUarUq1u56iuX9ae6rmPJilMG1uazsmvZIhMAAu1PEPba1rUrK2XctC7v9vUrSm/Sv4MJS0Ia2N/SwosZ68mLeCrfxpMpd+EA2ebIyps5S8H8s3No0U0+2xx9GvWQBYdLn/uwIHXszj5bsxQqG/dkC6xrN/tgIXfwxRl6s4QmHLnfy8Urak7+vKze5VqhVy/Lm7kvxda5X32bfSGIAN3JV4UL/p/48uuNnkdPTz17+Tvdv0cXf35+mPXtb8OvH8COAuBPm+my+y/ABCMisD9mtlMQwocapCfCCh2acB7+CzUc6CMMmzluwxDvySAqD50BUcQU2dnNRO28URFGcWhr0ZkJYrzxm9Vo5OUDBXD8kZodecEJyCKREZIXI5UsxkAkFdlgyShxcQC7rJrc5gMHpNyyliqdPONBLsUs5UtFgBkTzVIeKzMOydJ80xJ52IwDzjov6WfONjxA0c4+H/kqT4Ya8JNQSAJ1o9BEAaGgxEA/uE3RSPfwssUwJb20jhkDBWEdTD21g6bmpDrz01LDWHPODwY1lVUvrvxSg1Zl5WIASu2zdNZcqZjAVvDE0hVYKzbotTi1gj2WikYrRZZZKXQU8oMCmp32CVQ9/JXabJfAptIXtf02ibMw/AD+A3DNTQIDYuMi99x2j0gXqFfTKdfdeongFj2q7N1X09703XdfXpVFzIOWAD54CAI0ac2MjBB+GE/IAnqYYgAQUpeeDx6tmOMCIs4KFmk5HhmCUIHS2M2RR04XY2fYVRlmIgRgGSSNMaAr5pgDwKblQwipAOechQYAAjAJaaZgM1IemmkiHsCgAxCO9sQDqTvAoNOmtU5CAAYsiFpjORgZm+yw4aqggQG2XhuKAhiYQAIK4pZ7bgZEZhvvvPXem+++/f4b8MAFH5zwwg0/HPHEFV+c8cYdfxzyyCWfnPLKLb8c88w135zzzj3/HPTQRR+d9NJNPx311FVfnfXWXX97HfbYZZ+d9tptvx333HXfnffeff8d+OCFH5744o0/HvnklV+e+eadfx766KWfnvrqrb8e++y135777r3/HvzwxR+f/PLNPx/99NVfn/323X8f/vjln5/++u2/H//89d+f//79/x+AARTgAAlYQAMeEIEJVOACGdhAagQBACH5BA0KAAAALAAAAABYAlgChQAAADNnGTVrGjhvGzdwHDp0HT57Hj9/IEB/H0B/ID+AIECAH0GDIEaMIkiPI0eQI0qUJU6bJk+fKFCfJ1CfKE+gKFCgJ1OmKVWrKlivK1ewLFmzLV67L1+/MGC/MGLEMWbMM2jPNGnTNW3ZNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+QIBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq/b7/i8fs/v+/+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6f+z59AgwodSrSo0aNIkypdyrSp06dQo0qdSrWq1atYs2rdyrWr169gw4odS7as2bNo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOIEQtQwKCx48eQI0dOgCBxRwMMGkCIkKGzZwydQWMQjeFC6dOnL5hGPXq0adWtV7cWnQG0Zw0XIEBoLMAyvwGNGzzYbMEChg0aartWzby58+fQo0uf/hx1hg0ZLliIoLsBAwMGAvg+Z6CBhOKylc8uTb29+/fwpa/3rFx18d0ExlsbUP5C6NjxBSjggAS2x95qnkXAQAG96VcMcA9EYNxnBVZo4YUYNjeaZ9r+ReAAAw7mUh56pB2Y4YkophjgbLUxNwEDA4S4SgALNOAfgCrmmKKJOhK44YsFyAhKeRBckFyLPSap5JID2oYBBQ/AKCQlBUTAXGhMZmmgllxuyJ4FDcQ4JSICMBCBaFymqeaa8HnZQJBj+lFmhMnxyOadeOYJW2gRNGBAnHY0YIFp9elpKJN2HqohaNpBkB+gbCDA2XKKvlbppXh66QCckIYRgGYXbEAppqSWmmlnEjzwZ6daGGAlmqbGKit0ieqI5gOsTkHAA7PN6uuveW54wQK5LmEABFgCK2utyqqJAW4PPFqsAEXi2CyKzF6r7aKlgQmpAA2Mami225araGn+2YEY4rHJmuvuu2s+e8EDnBpmwKBIwqvvvlradkEEYgbmar78FmxwlqBBELBeB3CW3cEQR7ykbRDUOxcDsmFKrsQc97ixc61ZsOpbBVhAcMcop5xjwuKpxQCyD6t87ccyIwyttGItMCHNNffMJs+ZthZBWA2c7PO+QB+NYnYWW8WABRokrfTUVLvXGQQjS5XAalV37XWGjA79lAC8Sv312WhXd0HWRz1tdNpwYytzZw8sHNQAZ74NrNlx9+1xdg0EdW/MU/Pt3saG+71tBoHzFC7hlyaueOG+ghYB2zIJYJzkk3vcZec9ZgfBTAX4B/rpsKG+Ygaju4Sx3qrHLnv+dRtEgLNJEog7++68g1yaAyVpDnnvxBcPGwa4glSABLDH2zVrtn2mu3bUV1/9oINezxz20blGX32cG19dBslvtADX4vsYfQbJ2fdAA36CpwDmafCnwPyZNWCladj9F37vrZlAyyzCgOmlTz4bYp8FdLMgATSITPzRX97Wg7QT/W86pbndQx5nrgt6LIFf2s6CPjEn9BCqV7v7GNMgUrYDasgz2/GOAh64CgJkJkL+KdSdPFgpRqlLIQxo3uxaA7jw8MKGEHCSC1WTAfoFpGg89BkR2aOgARajAIJionqIV5vGCSRcUZTZaJJjgfc5cRnAAVWdepedM94DikPc0OX+vgGcG6VGdk3kBxhR5yXVRAsdCdgfaVDXRnzsEXS26ROx4GHDB+SQj2ujhwGEKLdyiaYBGpSkw8J4sNLYbR0GMF3fABQBGvrDVUw0oAUtiYEIWBEdg+PkuxLpADcChAEPMNnwZoU4DFkuHQOwFNzo9kmGsGuXXiOfOSaAzHHFi1EX+OFFHDnIr4FGmt44kyy11Zk+NU0jBsglJS20TRWN5pvXCNfZfHiST1mLap7UBsbK+SvRWACbKRHUO4+WAbFVI5jNRJieKJYAmpipM1UbDfCmkUTPVQ4DCtNJlcYpsdHYshhwPJprAAaUe91Iadl55TEMoEqOMaoBphRcEin+arBWKsM4UhzNA1JqlJKxlF+guaguDqmyjdJ0KQjYHD0jZ4Fi7iKYQ61UN40KFYyJSoysAwZnapadynDlUzedZR53QdIoJnVFpSkfWAgwAWiirJ+6EGZFa4M1tAgqq9sajRdnoc6zYgCfZwnApFBWmp+uAqYVHY0r5WIjuF5Lma/IqI9mBbi7uKqk8IrnjCA7ywswdS6KhVhUU/GAgM6ylSLVS2G/6qwLoNMTAqBsuRpLmAEgi7TmRKA/Q1G0iBUyMcgqFefOGQrAFsw1mTxM2WCbpc1yIojEnRjrLosYnRl2WZbdhG+RhlhA4c2z1Emu1RZqiQKoVlm14S6r9Pr+3b1ZILSOmCq/WFusIbj2ubrFwFwfodbK6rRTLUTabBlRQO2aszTzbS8StIk0DJyWELlVUlKrKmAodNa/KmLcIhJs3wZPwQHYBZZxDUHhDt7VwlYg8CxbV4ggvis7CgBxFh48S/EKIsOxGg1eVVyFDi8uuHyor7JGQ2IabyEA6IvrICYZ1+r62AsDs2SAc7y4Hh8ZDATQcT0DMQAIN6k0Tz4DTzVsVT/wCryRzDIaMsvL/e5hxxmYsZjJIGJfZQAQuOEl8tb8BpP9KgPMncMAYKyhNPUTvXRGAwLKu0M114HIphpNngOtZSsbSKx6qKvG5MtoO5R1m4aDqB+KRCr+tFb6DqF0dHQs4IczRQ4D9/00G2obuQtsuoeaVnWOv0vPWPNB0nnKQFFl7Yf+HmrOfSgAn5OUgUXy+g+mHqih6RCAYedI18ceRJSdHeFFy8G/Mk4IAcADHghYoALgDre4JSDucoO7jNxO9T46i6c3Izu50O7HABgDAQlsQAT4xvcI8p3vEPj73wAPuMABzu+C6xsE2/kQAwIA6HkIQMrvybSZ9UDSNPGWHja0UgY48AEQiGAE++43CEZO8pKb/OQoT7nKTZ7vfYNcBCDoAHa2o4CGrwPXCFN3HEjraXeEEwMdH3kI+B0CEBR95UhPutKXfvKh87vkH7hAAw4ADzv+90sQNkLYssGBywx8gOhMD7vYx072puM7BB3AgAOorg5WT2zJfKC2gOJdDqd2wOMiL7ve9873pet7BB/oQD/ZXg6IL40QiF7Zh8VRtKDnve+Qj7zkVZ7vkX8gAgfOBpmXlnk9fNmcpP5Gw76O78mb/vSop3y+N4BScBi+QsAuxOsFxGNuDMDeX9/30VPP+97zXt8iSPvWo9FQuSVi9m2KLjaq3PGz79730I8+6p0+8g7AXRpIBZurFTFdH00cGtQi/fOlT/7y897pi7eGemG//QlnGtXUEEAENCB+89t/7EG/v9I/LgJRuRgaXVUgPccI3kVtA/gMVTZyZ6d/DNj+gKlXeiAgAdRgY4eTfo/ga1ZzATiGDAxwbzDngCAYgr+HcDoHDNPWJtfXCKEkG67hJRhQASXoCxDggeMngjZ4g333cSCQAf+nDHhDKOqBLq6RgpFgQ5rBHdyhKtDwAKT3gTj4hFCYgzDnAcM3DGUCP1joHTEoEkwIgVH4hWC4d07HAVUYbUoQAR3ghWG4hmw4dvnGAZBmhkzAhHjXhnZ4h2JXeh9QhrLWgWqIh4AYiEmHbxuwhUfWgSCwb4K4iIyIdPj2AVt1bBZQh41YiZZodiJwearWAF9Xg5f4iaAoAhxgiFOSgE4IiqiYinUYejTmAEZ3iqoYi6EIc3vYYA/+94eymIupCHPfJyQMwAG4qIvCiIqEuIGWEQGkN4zKqIuPSISFYQFDt4y9l3/S6IAw52SGQQAeWI3cOIwiEAIYcBgGkIzdWI7C+I0b4Fd5MY6waI7uKItDtwHGOBdMOAKe+I74uIsjQIZ68QBDd4/5GJCoOHS1WBec2I4CmZCymImkyBWcOAIKGZHKGAL72HliwQAeB5ASuZGgSJDqOFZfx5EiuYz9dxYCAIwIOZIquYslORbAuJIwqYz4Fo5fYQEpGZM4mYpDh41W8QAex3vUWI5OZ3DjF3RBaXlh528FR305yXSZyIdIgZE32ZT8poggwAEcgB0YIAHeNI9WUAD+WHQetbEBHHB3HhdyC9iUJ/eI1nYU96aWJDeUH5d2UcIAHxkHwPEyQGdwcKmANAkVERCMHPl0MacgkMAAEuB4lReTMOeMQuGKUymQwAcCojJHmLAYxsEBZymYCglzDTkTBBCSI1l6EGWRmXAsHhiZ+diSRmGTErmYHyABbRkKBIABJLeYCYlvPNkTUpmbHxcCHCB1usAraWiVkvkBd1kTwKiR0jiGjiIMy4OSqkmSf7kTEvCT7lh5H7Cbw4A3zceZMgkCjtkSAiCa5ZhvHWBa0oAxaQie58gBOHEB07mQIpBm8pQBadmNIhCHLnEA5kmSH1id3mCblCiNoigTGOD+nizZAdz5DQ/QnsxJjCLQiyVBANhJkh/Qg+fQhfN5iZnIEvIpk7RIoeoQAQoYoUh3lFD4jQ3qERbaoYz4iO13DxfwAcYJjwdaEhIAo4uIb7vWD1GmoJYoAuNZEf+pirQIlfPgAB5wobE4AhsAEgYgpIL4iBKYEDUKkQsJAl4JERDAo3c4dBhAeAvhh2BqhyJAphcRmEjKixRxAQUaikp6EAxwpmGIb/x4ERBAjqGophNhp18oph2hjd+YiheholUKc1cKEhoQjR7aARXhAIB6g/jWAXM6ERCQiB5apAXhoRtgmhzBAEe6iJg6qSBIiC/BjqZqjfy5EDG6gzNhACj+yYgSIYj+NqOk85KCGBFseofouBMFwKdtOKEQgZ92OHTu1hP+qaXDmqwNwQEoGoKs2VGjGoUh4AEQMawfYHM7IZXR2oAfABGr6nui+Jky4ZPj2nsh8BABwKxPmImc6hM7+q32NwLJGRDtuqIhwIpPsQH+BoUjwK0D4a4iKAK4GhVp+K7iSqnIiRW9eYMQgaj215hcUQFOyoBoBxFv2YAwVwFgYazWGKUP4ZoMmKNhMQDVSn7E+hADkK5uSKRmAY0um4e1an+CmhYba37hGhEPMLOD+AFd6hXsWH5pOhEqKwL8yhb4Sa9696ETUafQ57RxEZo+i3IiELQGoasP2KL+a7GjvYe0F/F7O3sX5Vm1Hje2FREAVbuyetGrpqcRBeCyUssXZTt599oQcbuqIiCgfZGgUgiqD5GySgeRWEsXL9q0aNsRIeqGJNoXXuuGfOsR0umIqGoZAwChSPePQHsSEKCZL1dw+9YBSWu5WWpw/PYBGDCbHFEmXBkBEsCVlyoY5lEBXPm6himHuJu7uru7vNu7vvu7wBu8wju8aQEcB+AAr3sBMod3Lsd/LvdyIBe90Rt46RkBCsIAB3C3xFsNZhIqWNlx0ouWM1uV0QtzHZCVuuYA2ru9Vvg0Zkl0Zjt2SgmbG6CE7HsMBZBEeFeogTiUHCABsXu/qFAlGHD+dyEnofv2ARsgnAIsC8GkgI+Xi4tpqQ2sCgHgAML6jvl2AX5awZzgABuQiASbm6FrAYXrwYkwiXGqkqXXAYCLwoPAoX15myAAfzC8CBJQnDNstTBnnzeMYAq4w4MIcxpwwj/MBgdwb0wrxKXXqkcMBwEAdPYoxHsHc/X7xHLgn5pKxZCng6OLxWeArlyMejOpumBsBQnKv2NMxsFXUGccBpoZv2tscgSpoW9MBQaQsHNsfkPXuHdsLBwwxXt8fzD3xX+8BMEqx4PslCDgx4dMAHq8yNIqAlx7x9soyZQKApX8xJeMye8qnocsBDuqyJ7cxR9grr0rqqRcypFXuU/+fLkjzMpgCHOR28AgK8t4OHR2PLwPi8uBOK3sG8m+bKshsKjDm6nD7KEggMpZJszJXIn1CbyBucrPbH4wl2K868zV/Il7q7s+ucTbjKYfgM3RprXhvJC1HGiCe86hCKmqJgDUzM4FCwKfNgAXK88SnLhihs9hJ7F4qM9Hts76KZf91m9D+YrfSNARHJDRLGaP+4X+3MUfB3IgEHgc0CKuGwEHAJYcXQAb7dFg+dEFgJiuOxpk2XzlG89fWLRZdp5OR5cLhwbAEQEbYKO4iaFZ5rb0+YEfACYCmwYH8AA1rYA3+qTMnBgqzcf5BomYJwhPE8L8J4sALWAJkNTQV3T+lUoBHVwINrLCQ3pkmjmktGiBkADCQgfOT1jMPibWV6wJA0ABHiDIjehjaB2CBOnIk3AAMjvXKtYAVt3FRWfIn6CNXs2GNKbTYUiRPW3GmtCBjjqsLxwii3unwbfVqrCnVGqNuwwpt7yihXwLl3vPOCgCFKBifuvZFLwLkxjLBWvMAjbZlPqpwNAAon2qmzwlDz3J7jwMB/nXKycCR00YUCutEZgMhOrbKbfWdn3bv5CzDqjcJWuyzuCtDbjbIBbC+td/P20MD5ndTpwrLTuxLowN3zyxTxbRpkex24ABjx216dxeUxp9PgoOG8DapycCYtYBde131v0NtL3f+3f+sDQmxzC32dvQyaZXdHTm12TsrOWQyKen4IFGspInAm6sDrDdxZbtY6edgyLbDofbxfH62qYKcxuODh1edt944Z8mqU3b3/DQy3lIz2bYiWH3jQbODvgJozOZuwzQnoMIAgJODwKQmivndB+uu3pl0wn9b6XH3PDQuWdnuhww4qoWAEFdHMURwPGQbuARymAe5mI+5mRe5mZ+5mie5mq+5mze5m7+5nAe53I+53Re53Z+53ie53q+53ze537+54Ae6II+6IRe6IZ+6Iie6OggKRegmR/w6JAeeP8S3IpuCuGyv/8qdGd91vqGulZe6aYAwrk3qZ3OeqAeC7KKdwD+TsfR2AGUfuqNIMbRV3TfDeucAKdqLH0QOeS2ngkmitxBjNe93ggFUNsTCwKRPeyGkMaj/d7KrggGYOzWCAIn/uyFgNgrKuzW3gfOPctJvu2GINCjPdXgLidVCgLrW+5xAM+rXrLpru5uIO1rCHPw7gfiPu/kXu9ygN7Hmu/67gbmDM0w/u9vkOIe6uwEfwZfGouUnPBvAM8SvN0O7wX3rnf8/rU0PvFpkOFIivAazwVxK5PJ/vFTcPGX6O8knwXYLsHanvJRUI4uDwYVAOwlK9gxXwU0z7E3zwUGT507rwX4+PNYsPDm2PBCXwUVz/ADf/RNoLb4KALvfvQUkPP+0lraTP/yAnn1UUD1Bav1T7Dy+tnyQv8B7X7yXt8EEXn2TJD2ap8Ew83QXE7yFI56Jn96dX+bNn/2nf30Dt72Q2CWAgmcfn8Edz+MKK/1Gzn4RlD2nzh0ik8E+aqQAfv4Q2Df5jj5lA8All+OmE/5m9+Nnf/4n8+NoT/4kZ+QpT/4o1+N+J35AJD4rg/7mU/2Fs+Ahb901+r6ABDwGgyfrt/z2enxVz/3T5/3Xv/2q0nOma+Q66r7r6+Qzg8AtB+Qh+/1PcvQtd72XC+t0S8ERheQ3Q8AxK+fUH71Tq/B4S8EHrD92e374U/0+Dekn371QZ/+QsDxMmn8lM/+1mz+/0Qw/kAAEg6JReMRmVQumUYRBBCVTqlV6xWb1W65Xe8XHBaPyWXzGZ1Wr9lttzbUlM/pxk/9GH/v+X3/HzBQcJCw0LArQgRvkbFRSaThUHKSstLyEjNTs+vO0fMTr2NzlLTU9BQ1lZBAEdT19UhEdZa21vYW17KiFbYX9Ck3WHiYuNg46oPXdxlPhOMYOlp6mhowjhmbLqSau9v7G1yKQTm7PPYgPF19nT010Ry+CLidvt7+HhCDPB5bBAMfYECBA79w2Mevl4gNBBk2dBhww0GEvxY+tHgRo7eIExNWzPgRZMhgFyRybPZPZEqVK0uRNOlJxAWWM2nWPCSh5Mv+JSIi2PT5E6ibAiBy6pQHokBQpUuZhklmlImID02pVrVKxYKIoia1Wrj6FezSA0+hEpFqIGxatTZxXjOqtedauXNVRtzKTKtHunv5XgxgF2FeAX0JF3YYQN9dmCEwDDb8GLJACEK0wgohIk7cyJs534OwAcSIyotCiAaxAUpn1avrDXCQgajWELNp176sdQQIDA4GsPb9296BBhQsFDduvAFa4MuZN3f+HHp06dOpV7d+HXt27du5d/f+HXx48ePJlzd/Hn169evZt3f/Hn58+fPp17d/H39+/fv59/f/H8AABRyQwAINPBDBBBVckMEGHXwQwgglnJDCCi28EMOfDDXckMMOPfwQxBBFHJHEEk08EcUUVVyRxRZdfBHGGGWckcYabbwRxxx13JHHHn38EcgghRySyCKNPBLJJJVckskmnXwSyiilnJLKKq28EssstdySyy69/BLMMMUck8wyzTwTzTTVXJPNNt18E8445ZyTzjrtvBPPPPXck88+/fwT0EAFHZTQQg09FNFEFV2U0UYdfRTSSCWdlNJK6wwCACH5BA0KAAAALAAAAABYAlgChQAAADNnGjVrGjdwHDp0HT17Hj9/IEB/H0B/ID+AIEGDIEaMI0iPJEeQI0qUJU6cJ0+fKFCfKE+gKFGjKVWrKlivK1ewLFq0LV68L1+/MGC/L2C/MGDAL2HCMGbMM2jPNGnTNW3ZNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb+QIBwSCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq/b7/i8fs/v+/+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wADChxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzatzIsaPHjyBDihxJsqTJkyhTqlzJsqXLlzBjypxJs6bNmzhz6tzJs6f+z59AgwodSrSo0aNIkypdyrSp06dQo0qdSrWq1atYs2rdyrWr169gw4odS7as2bNo06pdy7at27dw48qdS7eu3bt48+rdy7ev37+AAwseTLiw4cOICRNYTMDAgwcOHkd+TLny5MmUMTdgXCBA4osBGjigYOGChw8eUqtW3SF1h9ewY8ueTTu2h9erW6v+0MFChccGPu8ToADyBNIXOLQGgfp2bOW1o0ufTr327Q/YO2TIcOHCBMgMDAgQXo5AgwkXMGSwzRo2B+jvq8ufT3sDfevtX2//rWA8+WkEFHCebq7Vplx89yWo4ILSQRfdahc8sEBn/xETQAIPVJDearf+IUidgwyGaOB0IIr4GnzK5YaBBRQ4QECFtwSwwAQYQFegiQ3SVmJ90tkX3Y44+vgcfc7BZsEDCsC4SgEOTKAbjkDiOKKUVM4nZAdREhjhAi8q2YmME1hAYIdZVmnmkLJleeWHCq6JI4S/FeDlJDImh9uNWMLm5pkL7snnfWX+KVuBGEyQ5JyIFPDABa2xqaOgeVYXKKQKThpioK5RwCWifihKwQXNUSrqo1L6OSp9luLX2wQOcFoHARBggNuptNZqq60FWnCoq2oQ4IBpRd7qaJrCnuholhqY6GCqytp42wQL8DpGARBYwAFq8gEJH62mTtftrd/yGe6wg3pwQQX+DUi7xQKMNlosqu+aymyfgFI5L7HuVtClulAoQIG77+YYcHTjylcwqbbeS1tqGDywL79GhGZBfgPrWe+Psn1bZokKR5otwgN3/JxrhkIsRAEVzCqiyPi6dyrLUsIs6MF83laof4gW4GSw1NHc5rs7+uxydUKbGO6OMkvpAQcOw9jAxM4xm7SyUxpbMblXTzq1iJlGi1gDsuIJ8suQbm31mVfOC+Kayd5qNn4cXLArYOwW+DbGZ19c691o3lf0z3+CmGWgZXpQwdx4CdAAsFdj3bPjBDdO5d98J8hyahV4XRcEKV4q+edVdnxv5aAv3AEGmru1AAY8lx56vEP3vfL+a+EW/HfGtI9tps+Gy6nWA1C/brHHDNJ89+1Vx+am2UiLSvqpt2lalgNhQ1mbnzCXuefzkvbouq3rUZr0bRc8vJUAE4gNtIjfIq+797O5P6rWOcrffa23pW6VAA9okBr3IbJfpSwHORyFb33fm59uKsCAqjhAZcTLkZoCp6MDJlBUy7tg3pRXtg3ORmE26kD5noKy1p3pePfjE+H0pkDnBYx0afvggzrQKqU8gHXJux6PNOi5yVFtdgV8YexkKLkUeYACCSiKAhhlwtL5iHtt46EHDbYgGApsPgA8020eEBSwLU2K4oogGEH4uCESDYzi4xoFzGeTAOxsiglr2ej+ZoZFDgJRg1HCnpVSiLAsMihFF2igTQ5QvR/WEX4uFNSkbuczlglwh39EY4huU4GZLIADTRRRFOkIKT1SUIz0qpW8WCisVCVNYR6wABtR8sYAhtGMtPLjpVrnIR3JUpIkumIQc0ibD1xAfyQhABPhFUpY4hJvpMSih5aVy2OO6pEEVOZsKFCSJWbye9A0U/ZseaIsBWtZtIxaig5ULFMes5aRq5LhQlK3NEbTkM10W5pKxCHXtG4729FPPvHJz3zqs58cyECU6knLgTUSlLts3BFxlpEHAEyR70soL7UlO11OcjUg+CIGKPAdB3jUAZtZJRkWwySPNuABE0DP6Tr+0ByKxdJeyLxauDyQgeBcxKEDVKE2K4bOcv3PNxIqAIUOESAFnKc7uTEQGS3qTIQuKAOIe0grP9lUQ65GOerZkkgrIQAmUQAD6pmV+g75ucEVz0Qf4AAwFfIvREZ0d1W9E00t0FHfsWIBKP3qk3DJsrXRiosLicA1LcjUt1LRdeQsVwdYZddcFCdlYkPR27JpTLI9KF0HSd81q0RZ4m2MgrmJ2wMaS4wZYSBZSXXPLWEaMN5AgCBTdWUcD/un05iLowtgqDMUFaYMtGepGeurZStbndvU0B/pc2qQRFnFBaXmApvxRnEwudkiErOiOR3UWusR25ARsZzEUg0HNED+gaiGQwC/ss9Y+QhHzkrURLfBrD26a9CYYreMCnouq7Z6juL8a709pKoOBRVfejSguvG8L2KPpZqS4UNxwTthXKdj3nQ8EMGRLKx1XcMBC5C2H9SDoIBX+937mOvD5lhdc9+7ydI9V3oICYADKsA6DBO3vQoulYatcwHdjkMBmMSdtyD6QgelprwSWUCEL/hZH8JmneQQgGmkuKatxfBJDfPMRQjQVhunc48tG/KoPABYcEw5kVLU73Yx0oAKUHfCfFpzNZLLyTNWzDUPGIBJdPZQ1Wa3aitUrjZvg+JpONTLcKZOw1rixvUUqafJxKDnlONLH0MjAStmr/Ui7bL+1FjguDFZlGvWQ2LJHXkaAZhYxRiptMPpZHX/0/SfP/ZJD8i3GXS+I3sP5qMql/hBS5MbUMDWZwknkKaFJoYDEJ07InNvnBNIdk/aXGzWnjGxaTRXMgKAw0QnCHPSFgqsjVnqBAktRaAWRq7DjGNcki/cR3GAozVYtMF5AAMV1kUBqi08U6cy3095wJvLXaxUAmPK2E6wO9VJw67oDMBwzGALnXtrXCx70/1mk6UoqWWwWJOsZ/01pMzV8Vpwm9kxu1Uq5dyVRvPGyeyr7QRskT6F+brd7zJuWwrQ7RxXVmovfQ28TUGAntencqt97tDLsrOoyVTXT67kK9YtxNr+LvYudftizIns3A4kcUnP5CnA5UL1qsu201JHBQVQHh3C8pLdkxTh0snObwHTiuWb2LfWx6jLpc2cMApQNdTd+0dtjyK5qWqxzzltKQQtLd2ECUAFmA2kNR3MrBsclwfGXomT41htIfsf5wXz34B1Fjdp38QDMEw6xYu8A6NM5dwHQz22W5d4t/l6JmQ1vEQfseRz+ri3sfSeI2JiAXW3bzFhemqIFQBYNn+9sAhdiXZ18J3fvrrJhhB427dMSASnZiQIsPWFz6fi2xdCANaOc7QRz1QHuwAkVh92Wv09/UgIwDB3/OVZE6kDeBcIk5dA96Jz+NcE7OdHIsMsHnD+f4gwgNdFaxgzPh2AfgeoBOtne1szNZhkAYkgJgcFOrchARdIBftXVoBicIYgAcx2eu03KA1XglWQgaBEcOxlfIRAAEVyJS74dvNRZjJoBalmYwtoR+o0endgWNinRb0RhFxQAEG2TeA1CAfWSSNXAZbmhFfQTsrnfpXSgIJQVSqohWCAfNZGK4GgAKzHU7PCX2SoBfRHfFW3cZCnB22lcEzlIE+0eLQRgG+oBZoFcrJmIvL3B5AGOjYChH9YBvrnfZHjSNYBCC9nbl3INTi4iL3SbdsSYIP4QZvnB2oYH4E2YDVzAbOHiV5wYTaYQ2TmB8tGOluDhKg4BmWHND3+OB3ixwdlZ2oOOItvIEyOSB+844F9YH3S50Ik54t1wADJB2ZVggF+ICacSCUe4IfKqAa7eIw+CHewAY19II1uNSqpd412EACuQ4x8sHqQJjrOxQGnSI5rcHGSM455sAAdgkCKCI96MDGH+F7yUYd3UAB7t4T5xQHAp497oACt0WSZ9iCyCAfBOEn5OBABIlRMMgEQIAEauZEc2ZEeOQENYJHviA8QWHCAAI7894UYkIX1QBwK4ADVEgIhAAI0WZM2iR04mZM6uZM6aZM+SZMh8AEYuQAKoAABcJD2sG/bqI0PUoiuGJEmZo3mQADFMQEa4lsgIJM+uRun0VIE9ZX+YBmWXImTNSmTqMEdFfAdBoCU7sCCnEYkAJkHUClBreGU7SAg/5UaH/CTLYUdYvmXgBmY9dSXZFmTLbVYE/IOAmB0GFcbguAkg6cjragORmUBGXCTgmlbmbmZnLkafhmYe0mTH5AB0GJT6VBzp9KLfjCQlVhcGMCW0oUeWGmYnVmbtnmbm4kdNilCcTKVC0kpHkAI9jhyE8kNCwBZoSmamombzNmczskhOWmTeOaG2JCNSiOVdZAyKSkdGQCb1mAAENABopmTz1meBOWV5pmZ6MkhNvlL3lkN5OdZ/kePgfAn9FkNAgABjJKVzLGe6fmfAMqc64kaoRmUGOBq3CD+eJ04G4nQjHz4kNu2dqfRn1wZoBZ6oReakyKEncmglDcmH4tgjFVkeNUgY+LJHGDpnxi6oixqmwSqmzRZAbpXDWeWTI1QkvVia9QQAMBzoir6nz/KmUHaohkKnbo5mjA2DRdHRvf2CMiHYCCSSu95DAIweclJpFiapVkKo6nxWtIwhAXYAcWpCIeWY7cBocAQeMqppWzaplpKkw04kr6gkDyzLVGqmpDQAEZ0G87BpyJkgcnwKzXppoQaoEOKm4f6lXBqARw6p+3ip3xaIHhKCQoQAWFiAaXBIoCKDA3AUnBKpIlaqKLamaE6oRnVAWjqC7yVUqwqITUhb5+6nKP+Oqu0mqE0KWwIWQWLkpWfWau++qu2CgIYsKm5agSdGpqyCqzKuqzleaSoWqxIwC4oWqrMmqLVqp6F2hw0aQGmmauBt5fUeq2EGq7nKa7QmZUdUAFyin/ps6bm+q7w2qwoOqZOiHwUKqSDWaHlKqDx+pelSq6ieqvrOicCsHb32q8Im7DPCaeTajIM4AHuqrAtCrASC5gUO6G8kaqfsX44qZcVq68fS6sXm5kZRa8wskQRG7JtOrIqW57bqmeIsmwo2rLMyrI0u5k0CYBKMgEze7M++7O2mVFxKRgEYAGxCrRIm7SgGZS5SBj7drTNabNKO7XWaqHMcQFTaheYllH+oPqVQSq1VBu2FgsCI9QXD9SzYruvaRu11ZqV+KYXB4a2ggm2axuvdDuqe+kBMyoX9si1YtuXdRu4iroB3ao6HRACguuiIXu3EruXGTCwWGEAEMu4iSuqgFu5QrqXHZC1XUF+cou5oBu6e+mNZSEAl0m5CIu6odus+Iqb20oWF3CwVKu6q4u0NNm0XMGzKkq7iEqzBNqy5Mq7ALqXQysVcVuz5kqYP0mbHPIkBDUmzWukyTmeHeuxntm7gQsCXocVavi5FSu852mTQZka3OEbFAABEDAh1GkFQoVXVqkhYJUa/Mm8vVq7gZmznHsUsWu/OOuTG9UARZm/beCSM3b+ouMJnV7ruwIKAvdpQ1B7m+A7rsmJGg2jsXygAOHZlQfMv4qqo03xsH7Lvy0FlNp7LqOVCRdilaYxvxGssHkLuTMxAOKJvG46qC2yvpnAJBYQmi2csGSLFLrLv7Qppix5CgSgWRALpz18rTRZvDnRvUVqriR8AUl6Cw1AAZeZsomruQIcExgQwhCMrQhMqgJamBfgIsJAADc0qEusrCCAuznxAHlbtUgLrrzhxL/AP8vhvTTsnBnVqCdhjmDssz9ak6SJw8RgAFjMn4I7ujjBs4MMrIwbmgiKDQpQAYNat9hBrCohkJEMtKihnHDMDWtnx/WLpW0srDJBAXyMt+b+GZpnjA4NkMVtTKg0abIjMQAQu7ITS6DCysnjoKf9Wctsqr0sEcSv7KvgKqb0sHp2rLTMgccbocufTLM0yQENGw9OMpPEjKWqXBISUM0fG50TUMT0cMTP/LO6CcgPMcOgzBxQRRDIB67vbJccUQBaHLI566UI0a7o+aPdHLQegMgO4QCtzLZsupcUAMP2gLLi7MIgULgW8QAPrbhtCqe4jBAGW9G5ma0gsLcUoQAH3a+3ys4DcbYc/a57SdAIkdLJ+wGjbBHCNNLwih0XcS36XLIiUQH0PM4ZUBEL4NIYerFua8ERsWzjm55tHAIm7Q+nDLLLupeqpBIKKdSSHJz+EtEAVl2r2EG6LPG0Wy2ywGwQCsscDdzJF5DUdovVEDHJK7qX2dwSRUfTv/oBEUHRV01QMboTnhvWNZzRA4HJUszAP1HVTw2shP0Qp1utUj0UTyuuIPDT7RzQ9xvZXVwT3fuvWsobEEHXzhmuo8vQMeEAczy8iAoCDxEAiIvYn9gUFO2flK0aIXDZ/KDawXuhzBHX+vvA2TrbD6HWAQsCuq0UsRvb59rWxq0a2kvbSrTLtAoRLJXALfrHuevc49oBEAEqtvwBgC0VRhvbIICODRHONezVXyEA7lzM3R0QAtDNNNnUTzEBh72iqB0Rm/3GalHcqIzdR+3XtQkCHAD+s2rhyUQKAqKdD6VttcINF5gcwZw9ESKNocYsFzLs2UHL0gSxv0BKvHYBAf6dr+w53AqRrP7qrw9+F4JMuSdeEQFg4RbL3Xzh4XTrlxpBAPPNmRPeFymutqD5Acx9EDb+4boZ03rByiy70h6R3jg+0Iph3TjO3x+BzBY7oeuNFzI+t6FM5BuBAeTptaEp3odhuhH7mS/KHB2A4RVxQx4wk8sb2SIeGAV7uG1+zRRgziEhIyj1GBCAJLyCV3v+GBLA59A66IRe6IZ+6Iie6Iq+6Ize6I4uFMRhAAuAvliMlWyulWyelZguk5guQqS550W5lo8eDhgcJhcgUGvO6Sz+XL3LGargKr6qfm/dkZYL8OOjvgsBoAAT4FvTO8xdaagpury3YQEheevF4CsbfeNRnZwRYtTGTgqwUgEZ8AHcrNnKCqMyuSrw/eyYgD4sxcOs3rjniaw05ezcDgmKwwHUi7k1OQESfe6ZoGRJrOw87srmyZ/egebwTgjpw8NdSe+NjKxlu++OcLbhjrmJWuZHdOAE7wYQQMsAz8F6nVGV3PB/8EDpLPH1HuwZZQECbvF4ULSyq/HPqbljDfJoEOdKrNL9OqBXe/IoHwb7Rs/JvcWi+eYxvwXHS/Ire7t2nvNYwMqrPbE8r6iRjQBA/wWx++Gzi7e6WY1JnwUFsNj+RT+33gwCVR71Q/B8M1n1TAyGWu8EBKDuTM/LTT+3zJH1ID8AX1zzXo/jICDNKL/0Fk3ybi+0YT8EdE/HW/r2UO21GWXuiv7afn+z2svw0GrYhU/IP2zxAQDxfa+ybu+6ME3wDd66qLz4p73t1wjFCF/TBW7PjU71mo/Q1wrXjk7av1v6dZtRiC+DpM/6gavQiE74sg+6qPHu+qjut1+7tF+sDRDxHDz5Tq+5IO2L+t37w4/f5KjkyQzifWz1Et/4sxgACb7Zys/EUL6I7X3w2c/BGYWKwt/0zeGVxJ+wmruI0T37evmiPUm9dgz/zDH/fPnU4y/uGHXW6efh2Mv+8mXOn0Dw8WQulcoE8ngUCE0m4ck0PAmKJIRivHQ8oFAIBPqMPWXzGZ1Wr9lt9xteBhkAdfsdn9fv+X3/HzBQcJCw0PAQMVFxkbFRTyguEjKSslJtbCwMJIOiQUHAEbDqwaJDk4zMY9KS1XK19aMjdJa21vYWN1d31/YhpBU4WLJM6CNsrKNjYgGUV9CgoVT1lFjY+nptznmbu9v7Gzx88BW7HNj4uKPigUDcUGHioguM3NyeMtZdf5+/378fAQhz9e6xwRTmAgQ6/xAtmNBFDMGCE88YY3gRY0aNG/tgoPhRTToKCTgqaiDPmER8IC9VhFASZkyZM3GZUckyGDr+Cw1oLhIAIUOImzityep5FGlSpXaGEh2myliHB0sXGZiQsmnOlXE+UPX6FSy/BQKd2jwXxsOEsIwIXECX1Q1ca13X1rV7l9YDsmXPhVDWDK8iBRaO8T3bLnBixYv5TNhLUW42EBcKMG7kwFQqw5RALLD8GfTdCo83u0GrNnSjtilLxwGBOnVs2T0pkG6dJgwGz7MdPRR6uw2IqbyJF8foGPilyYiNN1rQQXNyMyAcNLd+PRwE263RXcA+67kxVxRBVP5+Hv0tBds3Cxye3hEBwuwN04V/H3+i6JvHvM/viDCoJsrqvwIN/EMVgz5CB4MDwcvstgYdnHBCt/ibLAD+Ch8Uoz2eNPwwPwE4LAsEDJgD0ZEGMOELBBRdhI+DyIIRaLcXZ6lNRmBAoMDGHq8rgL6BPoDNx1kuGHHBFotckrgMcuRMQiZpWUC8j3aUEsvYIssqpRqznIWwFdd4UogvzbRsrHuMqeBMWwrgAElz2pwzMeTKGWMhOmmxExtjzNMT0LBqu8YY7wKthYAuqjnLy0MdVYrPVsT489Ebg4RDIAQq3VSpsXI0JkpOZ1GgypUEEhVVpEy5tKIwGk3VkdFYPUMMHmG9VSYFMCiMjWOIxDWUAI5Eq9cwLAAW2ZgCeKADMI45CIQOqkv2Fsw0uVaTC16lltuMAiigAQkgmGD+AgW65WWKAtSl9Nx23X0X3njlnZfeeu29F9989d2X3379/RfggAUemOCCDT4Y4YQVXpjhhh1+GOKIJZ6Y4ootvhjjjDXemOOOPf4Y5JBFHpnkkk0+GeWUVV6Z5ZZdfhnmmGWemeaabb4Z55x13pnnnn3+GeighR6a6E0ReCAeLpJZeogJHsiz6KiXWoACiCLaD5NMvOiAgm2l/vqiBUr5Ik4F0UBHIAu8Bpvtbwpwktc+0coA6rbtdqYBRVkSz8O7/b7Ft3Na+eXXvw1P5IEunpzLvcMdN4SA/Uoj48THLd8Dx0oWh8MYWy//3I4C9JYODYHYBf1wvUg3SDjUHz/+cvMEWZrMdcNNkX31Xo2qne0AcM/97IqEyJB3qQOQHPiWxiC+eKJHTz6uBJsn+nboOdt9ep+rt16SaLP3+cituKf9e51Hg2V8z8uv2YFZuQ9u2vVnDqDsN2LvE1Pm5Yd5+9zvl8MD+4vZoN53jdcI0GUE2M7/gFceBLKMCwXsUz4emDK9MFCCxvBPBUmGPAnab0z24eDIJOC+D3LlgCMcGQad8j8lqRBkBEwDC6E3JBiC7IQfuaHHVJfDe1BnhxyD0+SkAwINBFFj9PNhQYyhPyRSTDtLLEjrnmix30lRTlWsmAmxyBktUqyHGQQJFb8IsQh2sSBljBhkuqhGiNH+8H1NcaPD1lPD0oDAXHNcWKTQWI4U6jFh5+ujPa4EyISFb5ADCZUhCwadRA4Ee4wkmAcfyYoySdJgcFyUFC2CSYIF4BeVLEcInOjJf4XSkqJEAylNOTBU9pGFrGxlwF6pyjbcRJazPKUmgQeXD+RSl/wCpQ95ucpSBjNfXLRlr5D5LztyJ4DN7NcVl6m5aEpzX46sSDUlsQFs8gt23GQF+b6ZL0GKsxKFLCe++Ci4MZVlc39cp73quMRigoAk88RXMbH4Qn3aC52t+Ce+tBnQOGRgoPdqgDLFCYK+JZReCzQobiB6r4lyLpIVjVcJLxqcDWoUXkqUjowY6E+Qyiv+Rh0NiaFOOq/2qRQ38WupvCg50ZnW6yownU7hbvouhrqTdCbtKbzaiRN+vgGIQ6VXTa1ZwEsqdV5hnGhnoFqvgnaRSwitKr0G8FNOCnWr8OIoOo0h07DKq3/LJOdZl3pU7oiQrfOqp1pPF9d4SbWSZLRrvWT4SHXu1V4Z8GryQHAswOYLkX1c62HvFSD+GNCwjNVXX334V8nmyzFMbaD6LquvErpVbh/tbL4iB1phCKFyo+VXWhuYUdX2yzH1A04YePrafhUAQkH1QF1t+y8IaHZveu1twdwSEcMgZLgLE8CwIOFWhBwzuQYLAAWyBplaQTe6CcMMVibIIdFm92HjD3DLF4A7wy944ALfBe/EBLCACniAHlmTL7R+QQEGDGC9IzPAAiQQgQn497/+lcAC6pZfAx8YwQlW8IIZ3GAHPxjCEZbwhClcYQtfGMMZ1vCGOdxhD38YxCEW8YhJXGITnxjFKVbxilncYhe/GMYxlvGMaVxjG98YxznW8Y553GMf/xjIQRbykIlcZCMfGclJVvKSmdxkJz8ZylGW8pSpXGUrXxnLWdbylrncZS9/GcxhFvOYyVxmM58ZzWlW85rZ3GY3vxnOcZbznOlcZzvfGc951vOe+dxnP/8Z0IEW9KA1EgQAOw==";case hr.CashbackDecay:return this.urlService.getImageUrl("shop/items/cashbackUnlocker.png");default:return}}}class MO{constructor(n,o,e,i){this.store=n,this.formatNumberPipe=o,this.translate=e,this.timeLeftPipe=i}getTextParams(n){return{key:"LOCAL_NOTIFICATIONS.".concat(n.notificationType,".message"),params:this.getNotificationParams(n)}}getNotificationParams(n){if(null==n.params)return[];switch(n.notificationType){case hr.VipExpires:case hr.XpBoosterExpires:return[this.timeLeftPipe.transform(n.params.remainingTime)];case hr.ReconnectAttempt:return[n.params.reconnectAttempt,n.params.reconnectionAttemptsCount];default:return[]}}}class rtn{constructor(n){this.urlService=n}getImageUrl(n){return this.urlService.getImageUrl("notifications/notification-heart-icon.png")}}class BMe{constructor(){}getTextParams(n){const o={title:'<span class="avatar-image-notification__username '.concat(n.senderProfile.isIdentityVerified?"verified":"",'">').concat(n.senderProfile.username.currentUsername,"</span>"),key:"LOCAL_NOTIFICATIONS.".concat(n.notificationType,".message"),params:[]};return o.params=n.notificationType===rt.RatingReceived?[n.params.rating]:[],o}}let stn=(()=>{var t;class n{constructor(e,i,r,s,a){this.toastService=e,this.popupService=i,this.customGamesService=r,this.router=s,this.offerService=a}spectateRoom(e){var i=this;return f(function*(){try{yield i.customGamesService.spectateRoom(e)}catch(r){if(r instanceof et.Timeout)i.toastService.warn("ERRORS.SOMETHING_WRONG");else if(r instanceof bD){const s={action:()=>{i.router.navigate(["/home"])},buttonTextOptions:{translationKey:"LOGIN"}},a={action:()=>{i.router.navigate(["/home"])},buttonTextOptions:{translationKey:"BUTTON.REGISTER"}};i.popupService.decision({buttons:{firstOption:s,secondOption:a},textParams:{translationKey:"POPUP.RESTRICT_GUEST_MESSAGE"}})}else r instanceof xv?i.popupService.show("POPUP.RESTRICT_LEVEL_MESSAGE",[r.level]):r instanceof Av?i.offerService.offerVip({key:"POPUP.RESTRICT_MEMBERSHIP_MESSAGE",params:["VIP"]}):i.toastService.error(r instanceof y1e?"POPUP.DISABLED_FROM_CONFIG":"ERRORS.CONNECTION_ERROR")}})()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Dt),T(Cn),T(ly),T(on),T(Sc))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();class gy{constructor(n,o){this.translate=n,this.notificationsTransform=o}getTextParams(n){let o={key:"LOCAL_NOTIFICATIONS.".concat(n.notificationType,".message"),params:[]};switch(n.notificationType){case rt.ClubDisband:return{title:'<span class="avatar-image-notification__username '.concat(n.senderProfile.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(n.senderProfile.loyaltyLevel):"",'">').concat(n.senderProfile.username.currentUsername,"</span>"),key:"CLUBS.CLUB_DISBANDED_NOTIFICATION",params:[n.params.club.name]};case rt.ClubMemberRoleChange:const e=Ys.parse(qo,n.params.currentRole);return{title:'<span class="avatar-image-notification__username '.concat(n.senderProfile.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(n.senderProfile.loyaltyLevel):"",'">').concat(n.senderProfile.username.currentUsername,"</span>"),key:"CLUBS.CLUB_PROMOTED_TO_LEADER_NOTIFICATION",params:[this.translate.getParsedTranslation("CLUBS.CLUB_ROLE_".concat(e.toUpperCase()))]};case rt.ClubKicked:return{title:'<span class="avatar-image-notification__username '.concat(n.senderProfile.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(n.senderProfile.loyaltyLevel):"",'">').concat(n.senderProfile.username.currentUsername,"</span>"),key:"CLUBS.CLUB_KICKED_NOTIFICATION",params:[n.params.club.name]};case rt.ClubJoinRequestAccepted:return{title:'<span class="avatar-image-notification__username '.concat(n.senderProfile.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(n.senderProfile.loyaltyLevel):"",'">').concat(n.senderProfile.username.currentUsername,"</span>"),key:"CLUBS.CLUB_ACCEPTED_JOIN_REQUEST_NOTIFICATION",params:[n.params.club.name]};case rt.ClubJoinSuccess:return{key:"CLUBS.CLUB_JOIN_SUCCESS",params:["<span>".concat(n.params.club.name,"</span>")]};case rt.ClubInvite:return{title:'<span class="avatar-image-notification__username '.concat(n.senderProfile.isIdentityVerified?this.notificationsTransform.getVerifiedUserLoyaltyLevelClass(n.senderProfile.loyaltyLevel):"",'">').concat(n.senderProfile.username.currentUsername,"</span>"),key:"CLUBS.CLUB_INVITE_NOTIFICATION",params:[n.params.club.name]};case rt.ClubLevelUpReward:return{title:{key:"CLUBS.CLUB_LEVEL_UP_NOTIFICATION_TITLE"},key:"CLUBS.CLUB_LEVEL_UP_NOTIFICATION",params:["<span>".concat(n.params.totalReward.chips,"</span>")]};default:o.params=[]}return o}}let atn=(()=>{var t;class n{constructor(e,i,r,s,a,c,u,h,b,w,R,G,K,te,ee,le,me,ge,Me,Ke){this.fbService=e,this.store=i,this.formatNumberPipe=r,this.translate=s,this.timeLeft=a,this.urlService=c,this.giftsShopService=u,this.friendsService=h,this.likesService=b,this.freeRewardsService=w,this.spectatorService=R,this.navigation=G,this.userFactory=K,this.toaster=te,this.permissions=ee,this.chatService=le,this.playerContext=me,this.clientClubsService=ge,this.notificationsTransform=Me,this.constants=Ke}createNotification(e){var s,i=this;switch(this.patchMissingUser(e),e.notificationType){case rt.VipFrameUpdate:return this.constructNotificationViewModel({id:e.id,createdAt:e.createdAt,notificationType:e.notificationType,read:e.read,group:ti.System,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e)});case rt.LikeRecieved:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.LikesAndRatings,text:(new BMe).getTextParams(e),image:new rtn(this.urlService).getImageUrl(e),read:e.read,actions:[{type:ir.LikeBack,action:(s=f(function*(){return yield i.likesService.like(e.senderProfile.id)}),function(){return s.apply(this,arguments)})},{type:ir.GiftBack,action:()=>this.giftsShopService.openShopGifts({receiver:e.senderProfile}),disabledCheck:()=>Promise.resolve(this.store.games.selectIsRoomInWaitingState()),disabledClick:()=>{this.toaster.warn("POPUP.DISABLED_CHIPS_USE")}},{type:ir.InviteFriend,action:function(){var s=f(function*(){try{yield i.friendsService.sendFriendRequest(e.senderProfile)}catch(a){a instanceof lt.TargetUserBlockedError?i.toaster.error("API_ERRORS.TargetUserBlocked"):a instanceof lt.SourceUserBlockedError?i.toaster.error("API_ERRORS.SourceUserBlocked"):a instanceof et.Permissions.RequirementNotMeet?i.permissions.showFailedRequirementsToUser(a):i.toaster.error(a instanceof yh.NotValid?"POPUP.FRIEND_REQUEST_EXISTS":"POPUP.ERROR_FRIEND_REQUEST")}});return function(){return s.apply(this,arguments)}}(),disabledCheck:function(){var s=f(function*(){return void 0!==i.store.friends.selectFriends().find(a=>a.id===e.senderProfile.id)});return function(){return s.apply(this,arguments)}}()}]});case rt.RatingReceived:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,read:e.read,group:ti.LikesAndRatings,text:(new BMe).getTextParams(e)});case rt.GiftSent:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.Gifts,read:e.read,text:new mW(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),image:new fW(this.urlService).getImageUrl(e),actions:[{type:ir.GiftBack,action:()=>this.giftsShopService.openShopGifts({receiver:e.senderProfile}),disabledCheck:()=>Promise.resolve(this.store.games.selectIsRoomInWaitingState()),disabledClick:()=>{this.toaster.warn("POPUP.DISABLED_CHIPS_USE")}},{type:ir.Share,action:()=>this.fbService.ui(new bie("https://".concat(Lt.CONFIG.platform.domain,"/")))},{type:ir.InviteFriend,action:function(){var s=f(function*(){try{yield i.friendsService.sendFriendRequest(e.senderProfile)}catch(a){a instanceof lt.TargetUserBlockedError?i.toaster.error("API_ERRORS.TargetUserBlocked"):a instanceof lt.SourceUserBlockedError?i.toaster.error("API_ERRORS.SourceUserBlocked"):a instanceof et.Permissions.RequirementNotMeet?i.permissions.showFailedRequirementsToUser(a):i.toaster.error(a instanceof yh.NotValid?"POPUP.FRIEND_REQUEST_EXISTS":"POPUP.ERROR_FRIEND_REQUEST")}});return function(){return s.apply(this,arguments)}}(),disabledCheck:function(){var s=f(function*(){return void 0!==i.store.friends.selectFriends().find(a=>a.id===e.senderProfile.id)});return function(){return s.apply(this,arguments)}}()}]});case rt.GiftPackageSent:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,read:e.read,group:ti.Gifts,text:new mW(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),image:new fW(this.urlService).getImageUrl(e)});case rt.GiftPackageRecieved:const r=this.permissions.getActionPermission(nt.EPermissionModule.GiftablePacks,nt.EModuleAction.View);return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,read:e.read,group:ti.Gifts,text:new mW(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),image:new fW(this.urlService).getImageUrl(e),actions:this.store.giftableItems.selectDoesTheUserHaveGiftableItem()&&r.isPermitted?[{type:ir.GiftBack,action:()=>{this.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(this.constants.defaultLoggedRoute,"/profile/").concat(this.store.selectSimpleProfile().id,"/giftable-packs")}}],{state:{receiver:{profile:e.senderProfile}}})}}]:[]});case rt.FriendRequestAccepted:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,read:e.read,group:ti.Invites,image:new qD(this.urlService).getImageUrl(e),text:(new HD).getTextParams(e)});case rt.FriendRequestSent:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.Invites,read:e.read,image:new qD(this.urlService).getImageUrl(e),text:(new HD).getTextParams(e),actions:[{type:ir.AcceptFriendRequest,action:function(){var s=f(function*(){try{yield i.friendsService.acceptFriendRequest(e.senderProfile)}catch(a){a instanceof lt.TargetUserBlockedError?i.toaster.error("API_ERRORS.TargetUserBlocked"):a instanceof lt.SourceUserBlockedError?i.toaster.error("API_ERRORS.SourceUserBlocked"):a instanceof et.Permissions.RequirementNotMeet?i.permissions.showFailedRequirementsToUser(a):i.toaster.error("POPUP.ERROR_FRIEND_REQUEST")}});return function(){return s.apply(this,arguments)}}(),deleteOnActionDone:!0,disabledCheck:function(){var s=f(function*(){return void 0!==i.store.friends.selectFriends().find(a=>a.id===e.senderProfile.id)});return function(){return s.apply(this,arguments)}}()}],deleteExtraAction:function(){var s=f(function*(){try{yield i.friendsService.declineFriendRequest(e.senderProfile.id)}catch(a){i.toaster.error("ERRORS.SOMETHING_WRONG")}});return function(){return s.apply(this,arguments)}}()});case rt.SenderInviteAccepted:case rt.ReceiverInviteAccepted:case rt.InvitationLevelUp:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,notificationData:e.params,group:ti.Invites,read:e.read,image:new qD(this.urlService).getImageUrl(e),text:(new HD).getTextParams(e)});case rt.UserLevelUp:case rt.GameWon:case rt.TournamentWon:case rt.KnockoutTournamentWon:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.Share,action:()=>this.fbService.ui(new bie("https://".concat(Lt.CONFIG.platform.domain,"/")))}]});case rt.AntiChurnReceived:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.OpenFreeRewards,action:()=>this.freeRewardsService.openFreeRewards()}],onReceiveAction:()=>{const s=this.store.selectUserState();s&&(!s.bonuses.antiChurn||!s.bonuses.antiChurn.isActive||!s.bonuses.antiChurn.isReady)&&this.freeRewardsService.updateFreeRewards()}});case rt.RefundTournament:case rt.RefundUnclaimedPot:case rt.ItemPurchase:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e)});case rt.AdminBonusReceived:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.OpenFreeRewards,action:()=>this.freeRewardsService.openFreeRewards(),deleteOnActionDone:!0,disabledCheck:()=>Promise.resolve(this.playerContext.getCurrent()===ba.InGame)}],onReceiveAction:()=>{const s=this.store.selectUserState();s&&(!s.bonuses.adminBonus||!s.bonuses.adminBonus.isActive||!s.bonuses.adminBonus.isReady)&&this.freeRewardsService.updateFreeRewards()}});case hr.SpectateGameNotification:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,notificationData:e.params,group:ti.Invites,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.SpectateGame,action:()=>this.spectatorService.spectateRoom(e.params.room)}]});case hr.PremiumGiftNotification:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,notificationData:e.params,group:ti.Gifts,read:e.read,text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e)});case hr.VipExpires:case hr.XpBoosterExpires:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new IO(this.urlService).getImageUrl(e),text:new MO(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.NavigateToShop,action:()=>this.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(e.params.actionUrl)}}])}]});case hr.StampCardCompleted:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new IO(this.urlService).getImageUrl(e),text:new MO(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.NavigateToShop,action:()=>this.navigation.navigate([{outlets:{[Fn]:"".concat(Ai).concat(e.params.actionUrl)}}])}]});case hr.StampCardStampCollected:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new IO(this.urlService).getImageUrl(e),text:new MO(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e)});case hr.ReconnectAttempt:case hr.Reconnected:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationData:e.params,notificationType:e.notificationType,group:ti.System,read:e.read,image:new IO(this.urlService).getImageUrl(e),text:new MO(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e)});case hr.CashbackDecay:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new IO(this.urlService).getImageUrl(e),text:new MO(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.NavigateToShop,action:()=>this.navigation.navigate(["/".concat(this.constants.defaultLoggedRoute,"/cash-back")])}]});case rt.SocialPlatformFriendRegistered:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,read:e.read,group:ti.Invites,image:new qD(this.urlService).getImageUrl(e),text:(new HD).getTextParams(e),actions:[{type:ir.PrivateChat,action:()=>this.chatService.openPrivateChat({userId:e.senderProfile.id})},{type:ir.GiftBack,action:()=>this.giftsShopService.openShopGifts({receiver:e.senderProfile}),disabledCheck:()=>Promise.resolve(this.store.games.selectIsRoomInWaitingState()),disabledClick:()=>{this.toaster.warn("POPUP.DISABLED_CHIPS_USE")}}],onReceiveAction:()=>{this.store.dispatch(GV({user:this.userFactory.createClientFriendProfile(e.senderProfile)}))}});case rt.FirstLostGameBonus:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.OpenFreeRewards,action:()=>this.freeRewardsService.openFreeRewards(),deleteOnActionDone:!0,disabledCheck:()=>Promise.resolve(this.playerContext.getCurrent()===ba.InGame)}],onReceiveAction:()=>{const s=this.store.selectUserState();s&&(!s.bonuses.firstLostGame||!s.bonuses.firstLostGame.isActive||!s.bonuses.firstLostGame.isReady)&&this.freeRewardsService.updateFreeRewards()}});case rt.ClubInvite:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,notificationData:e.params,group:ti.Club,read:e.read,text:new gy(this.translate,this.notificationsTransform).getTextParams(e),actions:[{type:ir.AcceptClubInvite,deleteOnActionDone:!0,action:()=>{const s=e.params;this.clientClubsService.startAcceptClubInviteProcedure(s.club.id,s.joinRequestId)}},{type:ir.RejectClubInvite,deleteOnActionDone:!0,action:function(){var s=f(function*(){const a=e.params;try{yield i.clientClubsService.rejectClubInviteRequest({clubId:a.club.id,requestId:a.joinRequestId})}catch(c){console.warn(c)}});return function(){return s.apply(this,arguments)}}()}]});case rt.ClubDisband:case rt.ClubMemberRoleChange:case rt.ClubKicked:case rt.ClubJoinRequestAccepted:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,notificationData:e.params,group:ti.Club,read:e.read,text:new gy(this.translate,this.notificationsTransform).getTextParams(e)});case rt.ClubJoinSuccess:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,notificationData:e.params,group:ti.Club,read:e.read,text:new gy(this.translate,this.notificationsTransform).getTextParams(e),actions:[{type:ir.ClubChat,disabledCheck:()=>Promise.resolve(!this.permissions.getActionPermission(nt.EPermissionModule.ClubChat,nt.EModuleAction.Open).contextRequirement.isFulfilled),action:()=>{this.chatService.openClubChat()}}]});case rt.ClubLevelUpReward:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,notificationData:e.params,group:ti.Club,read:e.read,text:new gy(this.translate,this.notificationsTransform).getTextParams(e)});case rt.PromoTournamentInviteSent:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.AcceptClubInvite,action:function(){var s=f(function*(){const a=e.params;yield i.navigation.closeSecondaryOutlets({ignoreGuards:!0}),i.navigation.navigate(["/".concat(i.constants.defaultLoggedRoute,"/").concat(a.gameId,"/lobby/tournaments")])});return function(){return s.apply(this,arguments)}}(),disabledCheck:()=>Promise.resolve(this.playerContext.getCurrent()===ba.InGame)}]});case rt.CashbackGenerated:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),actions:[{type:ir.AcceptClubInvite,action:()=>{this.navigation.navigate(["/".concat(this.constants.defaultLoggedRoute,"/cash-back")])},disabledCheck:()=>Promise.resolve(this.playerContext.getCurrent()===ba.InGame)}]});case rt.HostRewardReceived:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e)});case rt.PromoTournamentRewardAvailable:return this.constructNotificationViewModel({id:e.id,senderProfile:e.senderProfile,createdAt:e.createdAt,notificationType:e.notificationType,group:ti.System,read:e.read,image:new sm(this.urlService).getImageUrl(e),text:new Jp(this.store,this.formatNumberPipe,this.translate,this.timeLeft).getTextParams(e),notificationData:e.params});default:return}}constructNotificationViewModel(e){const i=new dot;for(let r in e)i[r]=e[r];return i}patchMissingUser(e){e.senderId&&!e.senderProfile&&(e.senderProfile=this.userFactory.createFallbackSimpleProfile({id:void 0}))}}return(t=n).\u0275fac=function(e){return new(e||t)(T(km),T(J),T(Go),T(pi),T(Ps),T(Qm),T(hf),T(Tu),T(DMe),T(Mu),T(stn),T(Yt),T(Xu),T(Dt),T(Pi),T(El),T(ic),T(Au),T(XH),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function ctn(t,n){if(1&t&&(p(0,"div"),B(1,"div"),p(2,"p",2),H(3),m()()),2&t){const o=_();ni("toaster__container ",o.currentToast.type,""),d(),ni("toaster__image ",o.currentToast.type,""),d(2),se(o.currentToast.message)}}const ltn=t=>({shown:t});let NMe=(()=>{var t;class n{constructor(e,i,r,s){this.showToast=()=>{this.currentToast||(this.currentToast=this.toastQueue.first(),this.triggerToastSound(this.currentToast),this.triggerToastHideAnimTimer(),this.ngZone.runOutsideAngular(()=>{this.showTimeout=setTimeout(()=>{this.currentToast=void 0,this.toastQueue.isEmpty()?clearTimeout(this.showTimeout):this.showToast(),this.cdr.detectChanges()},3e3)}),this.cdr.detectChanges())},this.toaster=e,this.soundService=i,this.toastQueue=new w_,this.cdr=r,r.detach(),this.ngZone=s}ngOnInit(){this.toasterSubscription=this.toaster.toastSubject.subscribe(e=>{this.fillToastQueue(e)}),this.cdr.detectChanges()}ngOnDestroy(){this.toasterSubscription&&this.toasterSubscription.unsubscribe(),clearTimeout(this.hideTimeout),clearTimeout(this.showTimeout),clearTimeout(this.forceHideTimeout)}fillToastQueue(e){this.isDuplicate(e)||(this.toastQueue.add(e),this.showToast())}isDuplicate(e){const i=this.toastQueue.isEmpty()?this.currentToast:this.toastQueue.peek();return!!i&&e.message===i.message}forceHideToaster(){this.currentToast&&(this.currentToast.hidden=!0,this.ngZone.runOutsideAngular(()=>{this.forceHideTimeout=setTimeout(()=>{clearTimeout(this.hideTimeout),clearTimeout(this.showTimeout),this.currentToast=void 0,this.toastQueue.isEmpty()||this.showToast(),clearTimeout(this.forceHideTimeout),this.cdr.detectChanges()},300)}),this.cdr.detectChanges())}triggerToastHideAnimTimer(){this.currentToast&&this.ngZone.runOutsideAngular(()=>{this.hideTimeout=setTimeout(()=>{this.currentToast.hidden=!0,this.cdr.detectChanges()},2700)})}triggerToastSound(e){switch(e.type){case ig.Error:this.soundService.play(dn.ToastError);break;case ig.Success:this.soundService.play(dn.ToastSuccess);break;case ig.Info:this.soundService.play(dn.ToastInfo);break;case ig.Warning:this.soundService.play(dn.ToastWarn)}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Dt),g(Mo),g(Re),g(an))},t.\u0275cmp=pe({type:t,selectors:[["toast"]],decls:2,vars:6,consts:[["click-feedback","",1,"toaster__wrapper",3,"scaleFactor","ngClass","click"],[3,"class",4,"ngIf"],[1,"toaster__text--message"]],template:function(e,i){1&e&&(p(0,"section",0),Y("click",function(){return i.forceHideToaster()}),U(1,ctn,4,7,"div",1),m()),2&e&&(l("scaleFactor",.96)("ngClass",ne(4,ltn,i.currentToast&&!i.currentToast.hidden)),Hn("data-cy","toaster"+(i.currentToast?i.currentToast.type:"")),d(),l("ngIf",i.currentToast))},dependencies:[Xe,Ne,po],styles:[".toaster__wrapper[_ngcontent-%COMP%]{transition:transform .2s ease;position:absolute;top:10rem;right:-1rem;width:29rem;min-height:10rem;display:flex;flex-flow:row wrap;align-items:center;transform:translate(100%) translateZ(0)}.toaster__wrapper[_ngcontent-%COMP%]:hover{cursor:pointer}.toaster__wrapper.shown[_ngcontent-%COMP%]{transform:translate(0) translateZ(0)}.toaster__container[_ngcontent-%COMP%]{transition:box-shadow .4s linear;position:relative;display:flex;flex-flow:row wrap;align-items:center;width:100%;height:100%;padding:2rem 1rem 2rem 0;border-radius:.8rem 0 0 .8rem}.toaster__image[_ngcontent-%COMP%]{width:7rem;height:7rem}.toaster__text--message[_ngcontent-%COMP%]{width:20rem;font-size:1.4rem;padding:0 1rem}@media only screen and (max-width: 1366px){.toaster__text--message[_ngcontent-%COMP%]{font-size:1.2rem}}"],changeDetection:0}),n})(),FMe=(()=>{var t;class n{constructor(e,i,r,s){this.touch=()=>{this.store.selectUserState()&&this.communicationService.emit("sscmd.touch")},this.onUserLogin=()=>{this.startUserPresenceTouchInterval()},this.onUserLogout=()=>{this.stopUserPresenceTouchInterval()},this.ngZone=i,this.communicationService=r,this.store=s,e.authStatusChangeEvent.pipe(bt(a=>a===er.Login)).subscribe(this.onUserLogin),e.authStatusChangeEvent.pipe(bt(a=>a===er.Logout)).subscribe(this.onUserLogout)}startUserPresenceTouchInterval(){this.stopUserPresenceTouchInterval(),this.ngZone.runOutsideAngular(()=>{this.interval=setInterval(this.touch,24e4)})}stopUserPresenceTouchInterval(){clearInterval(this.interval)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(xr),T(an),T(Ri),T(J))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),utn=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(FMe))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[FMe],imports:[bu]}),n})();const UMe=Ts(jz.featureKey);J.prototype.selectImageSliderContainer=function dtn(){return this.selectSync(UMe)},J.prototype.subscribeImageSliderContainer=function ptn(){return this.select(UMe)};const GMe={isOpened:!1,data:{images:[],initial:void 0}},htn=Sr(GMe,de(Hve,(t,n)=>({...t,isOpened:!0,data:n.data})),de(qve,t=>GMe));function mtn(t,n){return htn(t,n)}let ftn=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(wM))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[wM],imports:[$r.forFeature(jz.featureKey,mtn),No]}),n})(),gtn=(()=>{var t;class n{constructor(e){this.setLogEnabled=i=>{this.logEnabled=i,!0===i?this.enableLog():this.disableLog()},this.consoleLog=console.log,this.consoleInfo=console.info,this.consoleError=console.error,this.consoleWarn=console.warn,this.consoleDebug=console.debug,this.developerService=e,this.logEnabled=this.developerService.consoleEnabled(),this.setConsoleListener()}error(e,i){!0===this.isLogEnabled()&&console.error(e,i)}isLogEnabled(){return this.logEnabled}setConsoleListener(){this.logEnabledSubscription=this.developerService.consoleStatusBSubject.asObservable().subscribe(this.setLogEnabled)}enableLog(){console.log=this.consoleLog,console.info=this.consoleInfo,console.error=this.consoleError,console.warn=this.consoleWarn,console.debug=this.consoleDebug}disableLog(){console.log=()=>{},console.info=()=>{},console.warn=()=>{},console.debug=()=>{}}}return(t=n).\u0275fac=function(e){return new(e||t)(T(tg))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})(),_tn=(()=>{var t;class n{constructor(e,i,r,s,a){this.constants=a,this.logger=e,this.settings=i,this.translateService=r,this.socketService=s}createInstance(e,i,r,s,a,c){return new tje(i,b_()(Lt.CONFIG.content.games.list,{id:e}).path,Lt.CONFIG.core.cdn.url,"".concat(this.constants.translationsPath,"games/").concat(this.translateService.getCurrentLang(),"/"),r,s,a,c,this.settings,this.logger)}createBettingGameClient(e,i,r,s){return new Xie(i,b_()(Lt.CONFIG.content.games.list,{id:e}).path,Lt.CONFIG.core.cdn.url,"".concat(this.constants.translationsPath,"games/").concat(this.translateService.getCurrentLang(),"/"),e,this.socketService,r,this.settings,s)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(gtn),T(nc),T(pi),T(Ri),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();const Mf=ki({selectId:t=>t.gameName,sortComparer:!1}),btn=Sr({tournaments:Mf.getInitialState()},de(V7,(t,n)=>({...t,tournaments:Mf.upsertMany(n.states,t.tournaments)})),de(z7,(t,n)=>{const o=n.updates.map(e=>({id:e.gameName,changes:{...Mf.getSelectors().selectEntities(t.tournaments)[e.gameName],...e}}));return{...t,tournaments:Mf.updateMany(o,t.tournaments)}}),de(m1e,t=>({...t,tournaments:Mf.removeAll(t.tournaments)})),de(yjt,(t,n)=>{const o=Mf.getSelectors().selectEntities(t.tournaments)[n.gameName];if(!o)return t;const e={id:n.gameName,changes:{pendingWonGamesToShowUser:o.pendingWonGamesToShowUser.concat(n.games)}};return{...t,tournaments:Mf.updateOne(e,t.tournaments)}}),de(f1e,(t,n)=>{const o=Mf.getSelectors().selectEntities(t.tournaments)[n.gameName];if(!o)return t;const e={id:n.gameName,changes:{pendingWonGamesToShowUser:o.pendingWonGamesToShowUser.filter(i=>n.games.find(r=>r.index!==i.index))}};return{...t,tournaments:Mf.updateOne(e,t.tournaments)}}));function Ctn(t,n){return btn(t,n)}const Stn=We(Ts(G7.featureKey),t=>t.tournaments),VMe=Mf.getSelectors(Stn),wtn=We(VMe.selectAll,t=>t),_1=()=>We(VMe.selectEntities,(t,n)=>t[n]),zMe=()=>We(_1(),t=>t?t.state:void 0),jMe=()=>We(_1(),t=>t?t.pendingWonGamesToShowUser:void 0),HMe=()=>We(_1(),t=>t?t.clientKnockoutStateModel:void 0),qMe=()=>We(_1(),t=>t?t.serverKnockoutStateModel:void 0);J.prototype.selectKnockoutTournamentsList=function Ttn(){return this.selectSync(wtn)},J.prototype.selectKnockoutTournament=function Ptn(t){return this.selectSync(_1(),t)},J.prototype.subscribeKnockoutTournament=function Itn(t){return this.select(_1(),t)},J.prototype.selectKnockoutState=function Mtn(t){return this.selectSync(zMe(),t)},J.prototype.subscribeKnockoutState=function Otn(t){return this.select(zMe(),t)},J.prototype.selectKnockoutPendingWonGames=function Etn(t){return this.selectSync(jMe(),t)},J.prototype.subscribeKnockoutPendingWonGames=function xtn(t){return this.select(jMe(),t)},J.prototype.selectClientKnockoutModel=function Atn(t){return this.selectSync(HMe(),t)},J.prototype.subscribeClientKnockoutModel=function Rtn(t){return this.select(HMe(),t)},J.prototype.selectServerKnockoutModel=function ktn(t){return this.selectSync(qMe(),t)},J.prototype.subscribeServerKnockoutModel=function Ltn(t){return this.select(qMe(),t)};let Dtn=(()=>{var t;class n{constructor(e){}}return(t=n).\u0275fac=function(e){return new(e||t)(T(ay))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[ay],imports:[$r.forFeature(G7.featureKey,Ctn)]}),n})(),Btn=(()=>{var t;class n{supports(e){return e.endsWith(".zoneless")}addEventListener(e,i,r){const[s]=i.split(".zoneless");return this.manager.getZone().runOutsideAngular(()=>{e.addEventListener(s,r)}),()=>e.removeEventListener(s,r)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class gW extends Eh{onEnter(){var n=this;return f(function*(){const o=n.state.getCurrentState();if(o.gameLoadedReconnectData=void 0,n.currentTable){let e;if(e=n.isSpectating?n.getViewModel().tables.find(i=>i.id===n.currentTable.id):lo.findLastPlayerTable(n.playerId,n.getViewModel().tables),yield n.currentTable.onTableUpdate(e),n.currentTable.gameState===_o.LoadingResources||n.currentTable.gameState===_o.GameLoading)o.gameLoadedReconnectData={tableId:n.currentTable.id,isSpectating:n.isSpectating},n.currentTable.reloadGame(n.getViewModel(),n.currentTable.getViewModel());else if(n.currentTable.gameState===_o.Ready)try{n.reconnecting&&n.isSpectating&&(yield n.spectate({tableId:n.currentTable.id,roomCode:n.getViewModel().invitationCode})),e.state!==Ve.ETableState.Ended&&(yield n.ready())}catch(i){console.warn(i),(i instanceof et.Timeout||i instanceof et.UnsupportedOperation)&&n.dispose(i instanceof et.Timeout?io.ActionTimeout:io.UnsupportedOperation).then(()=>n.returnPlayerToLobby())}else n.startGame(n.currentTable)}else{const e=lo.findLastPlayerTable(n.playerId,n.getViewModel().tables);if(e)switch(n.currentTable=yield n.createTable(e,e.state),e.state){case Ve.ETableState.Ready:case Ve.ETableState.Gameplay:n.startGame(n.currentTable);break;case Ve.ETableState.Ended:n.reconnecting&&(yield n.navigationService.navigateTo(Xs.gameRoute));break;default:yield n.navigationService.navigateTo(Xs.gameRoute)}}})()}join(n){var o=this;return f(function*(){const e=yield o.sdk.join(n),i=o.getViewModel().tables.find(r=>r.id===n.tableId);return o.currentTable=yield o.createTable(i,i.state),o.updateViewModel(e),o.startGame(o.currentTable),e})()}}gW.stateName=Ve.ERoomState.Ready;let Ntn=(()=>{var t;class n extends bse{constructor(e,i,r,s,a){super(e,i,r,s,a)}configureForCasinoRoom(e){e.state=(new Do.AsyncStateMachine.Builder).setAllowedStates(_c,gW,Fa).setInitialState(_c).from(_c).toAny().from(gW).toAny().fromAny().to(Fa).from(Fa).toAny().setStateContext(e).build()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(Ri),T(uR),T(Yt),T(Xf),T(tn))},t.\u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"}),n})();function Ftn(t,n){if(1&t){const o=Ce();p(0,"form-builder",10),Y("onOptionSelect",function(i){return oe(o),re(_(2).onOptionSelect(i))}),m()}2&t&&l("config",_(2).fields)}function Utn(t,n){if(1&t&&(p(0,"div")(1,"p",11),B(2,"currency-component",5),m()()),2&t){const o=_(2);d(),l("key","CUSTOM_GAMES.REBUY_TEXT"),d(),l("currency",o.currencyType.Chips)("value",o.selectedValue)}}function Gtn(t,n){if(1&t){const o=Ce();Tn(0),p(1,"button-text",12),Y("onClick",function(){return re(oe(o).$implicit.action())}),H(2),V(3,"translate"),m(),Pn()}if(2&t){const o=n.$implicit;d(),l("buttonModifier",o.modifier),d(),se(yt(3,2,o.text.key,o.text.params))}}function Vtn(t,n){if(1&t){const o=Ce();p(0,"button-text",13),Y("onClick",function(){return oe(o),re(_(2).buyIn())}),H(1),V(2,"translate"),m()}if(2&t){const o=_(2);l("buttonModifier",o.button.modifier)("loading",o.isLoading),d(),se(yt(2,3,o.button.text.key,o.button.text.params))}}function ztn(t,n){if(1&t){const o=Ce();p(0,"button-text",12),Y("onClick",function(){return oe(o),re(_(2).insufficientAmount())}),H(1),V(2,"translate"),m()}2&t&&(l("buttonModifier",_(2).buttonModifier.BUTTON_ATTENTION),d(),se($(2,2,"SHOP.GET_OFFER")))}const jtn=t=>({hidden:t});function Htn(t,n){if(1&t&&(p(0,"div",1),U(1,Ftn,1,1,"form-builder",2)(2,Utn,3,3,"div",3),p(3,"div",4)(4,"span"),H(5),V(6,"translate"),m(),B(7,"currency-component",5),m(),p(8,"div",6)(9,"span"),H(10),V(11,"translate"),m(),B(12,"currency-component",5),m(),U(13,Gtn,4,5,"ng-container",7)(14,Vtn,3,6,"button-text",8)(15,ztn,3,4,"ng-template",null,9,ft),m()),2&t){const o=Kt(16),e=_();d(),l("ngIf",!e.isRebuying),d(),l("ngIf",e.isRebuying),d(3),ze("",$(6,13,"SHOP.YOU_HAVE"),":"),d(2),l("currency",e.currencyType.Chips)("value",e.userChips),d(),l("ngClass",ne(17,jtn,!e.areFundsInsufficent())),d(2),ze("",$(11,15,"SHOP.YOU_NEED"),":"),d(2),l("currency",e.currencyType.Chips)("value",e.neededFunds()),d(),l("ngForOf",e.extraButtons)("ngForTrackBy",e.buttonsTrackBy),d(),l("ngIf",!e.areFundsInsufficent())("ngIfElse",o)}}let $Me=(()=>{var t;class n{constructor(e,i){this.store=e,this.cdr=i,this.buyInConfig=[],this.currentStack=0,this.onBuyIn=new ke,this.onInsufficientAmount=new ke,this.buttonModifier=ve.EButtonModifier,this.fields=[],this.currencyType=ln}ngOnInit(){this.fields=[{id:"game.buyIn",type:Ei.FieldType.Picker,format:Ei.EFormat.Chips,label:"CUSTOM_GAMES.CHOOSE_BUY_IN",customTag:"buyIn",defaultValue:{value:this.buyInConfig[0]},options:this.buyInConfig.map(e=>({value:e}))}],this.button=this.createButton(),this.subscription=this.store.subscribeWallet().pipe(jn(e=>e.chips)).subscribe(e=>{this.userChips=e,this.cdr.detectChanges()})}onOptionSelect(e){this.selectedValue=e[0].value,this.cdr.detectChanges()}areFundsInsufficent(){return this.userChips<this.buyInValue()}neededFunds(){return this.buyInValue()-this.userChips}buyInValue(){var e;return this.selectedValue-(null!==(e=this.currentStack)&&void 0!==e?e:0)}buyIn(){this.onBuyIn.emit({amount:this.selectedValue,isAutoTopUpEnabled:!1,totalWallet:this.userChips})}insufficientAmount(){this.onInsufficientAmount.emit({currentFunds:this.userChips,neededFunds:this.neededFunds()})}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}buttonsTrackBy(e,i){return e}createButton(){var e;return null!==(e=this.button)&&void 0!==e?e:{text:{key:this.isRebuying?"CUSTOM_GAMES.REBUY":"CUSTOM_GAMES.BUYIN"},modifier:ve.EButtonModifier.BUTTON_ATTENTION}}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["buy-in"]],inputs:{buyInConfig:"buyInConfig",selectedValue:"selectedValue",currentStack:"currentStack",isRebuying:"isRebuying",isLoading:"isLoading",extraButtons:"extraButtons",button:"button"},outputs:{onBuyIn:"onBuyIn",onInsufficientAmount:"onInsufficientAmount"},decls:1,vars:1,consts:[["class","buy-in__content",4,"ngIf"],[1,"buy-in__content"],[3,"config","onOptionSelect",4,"ngIf"],[4,"ngIf"],[1,"buy-in__balance-wrapper"],[1,"buy-in__balance-chips",3,"currency","value"],[1,"buy-in__balance-wrapper","insufficient",3,"ngClass"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","buy-in__button",3,"buttonModifier","loading","onClick",4,"ngIf","ngIfElse"],["buy",""],[3,"config","onOptionSelect"],["text-with-placeholders","",1,"buy-in__text",3,"key"],[1,"buy-in__button",3,"buttonModifier","onClick"],[1,"buy-in__button",3,"buttonModifier","loading","onClick"]],template:function(e,i){1&e&&U(0,Htn,17,19,"div",0),2&e&&l("ngIf",void 0!==i.userChips)},dependencies:[Xe,Mt,Ne,oc,pn,So,Xd,qe],styles:[".buy-in__balance-wrapper[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;align-items:center;font-size:1.2em;margin-bottom:.5em}.buy-in__balance-chips[_ngcontent-%COMP%]{font-size:1.2em;margin:0 .5em;direction:ltr!important}.buy-in__text[_ngcontent-%COMP%]   .buy-in__balance-chips[_ngcontent-%COMP%]{font-size:1em;margin:0}.buy-in__content[_ngcontent-%COMP%]{height:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;flex:1;margin:0 auto}.buy-in__button[_ngcontent-%COMP%]{margin:2rem .5em 0;min-width:150px}"],changeDetection:0}),n})();const qtn=[xi,Yi,Io,J0,No];let Wtn=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t,bootstrap:[JL]}),t.\u0275inj=Xt({imports:[qtn]}),n})();function QMe(t){return new vt(3e3,!1)}function Dv(t){switch(t.length){case 0:return new DM;case 1:return t[0];default:return new qbe(t)}}function YMe(t,n,o=new Map,e=new Map){const i=[],r=[];let s=-1,a=null;if(n.forEach(c=>{const u=c.get("offset"),h=u==s,b=h&&a||new Map;c.forEach((w,R)=>{let G=R,K=w;if("offset"!==R)switch(G=t.normalizePropertyName(G,i),K){case"!":K=o.get(R);break;case Rg:K=e.get(R);break;default:K=t.normalizeStyleValue(R,G,K,i)}b.set(G,K)}),h||r.push(b),a=b,s=u}),i.length)throw function fnn(t){return new vt(3502,!1)}();return r}function _W(t,n,o,e){switch(n){case"start":t.onStart(()=>e(o&&vW(o,"start",t)));break;case"done":t.onDone(()=>e(o&&vW(o,"done",t)));break;case"destroy":t.onDestroy(()=>e(o&&vW(o,"destroy",t)))}}function vW(t,n,o){const e=o.totalTime,r=bW(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,null==e?t.totalTime:e,!!o.disabled),s=t._data;return null!=s&&(r._data=s),r}function bW(t,n,o,e,i="",r=0,s){return{element:t,triggerName:n,fromState:o,toState:e,phaseName:i,totalTime:r,disabled:!!s}}function ap(t,n,o){let e=t.get(n);return e||t.set(n,e=o),e}function JMe(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}Wu(JL,[Xe,dSe,Ji,Wi,$Me],[]);const Mnn=(()=>typeof document>"u"?null:document.documentElement)();function CW(t){const n=t.parentNode||t.host||null;return n===Mnn?null:n}let _y=null,XMe=!1;function eOe(t,n){for(;n;){if(n===t)return!0;n=CW(n)}return!1}function tOe(t,n,o){if(o)return Array.from(t.querySelectorAll(n));const e=t.querySelector(n);return e?[e]:[]}let yW=(()=>{var t;class n{validateStyleProperty(e){return function Enn(t){_y||(_y=function xnn(){return typeof document<"u"?document.body:null}()||{},XMe=!!_y.style&&"WebkitAppearance"in _y.style);let n=!0;return _y.style&&!function Onn(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in _y.style,!n&&XMe&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in _y.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return eOe(e,i)}getParentElement(e){return CW(e)}query(e,i,r){return tOe(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,s,a,c=[],u){return new DM(r,s)}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();class WD{}WD.NOOP=new yW;class SW{}const Rnn=1e3,wW="ng-enter",$D="ng-leave",KD="ng-trigger",ZD=".ng-trigger",iOe="ng-animating",TW=".ng-animating";function Vg(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:PW(parseFloat(n[1]),n[2])}function PW(t,n){return"s"===n?t*Rnn:t}function QD(t,n,o){return t.hasOwnProperty("duration")?t:function Lnn(t,n,o){let i,r=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(QMe()),{duration:0,delay:0,easing:""};i=PW(parseFloat(a[1]),a[2]);const c=a[3];null!=c&&(r=PW(parseFloat(c),a[4]));const u=a[5];u&&(s=u)}else i=t;if(!o){let a=!1,c=n.length;i<0&&(n.push(function $tn(){return new vt(3100,!1)}()),a=!0),r<0&&(n.push(function Ktn(){return new vt(3101,!1)}()),a=!0),a&&n.splice(c,0,QMe())}return{duration:i,delay:r,easing:s}}(t,n,o)}function Of(t,n,o){n.forEach((e,i)=>{const r=MW(i);o&&!o.has(i)&&o.set(i,t.style[r]),t.style[r]=e})}function vy(t,n){n.forEach((o,e)=>{const i=MW(e);t.style[i]=""})}function OO(t){return Array.isArray(t)?1==t.length?t[0]:function Zwt(t,n=null){return{type:Vi.Sequence,steps:t,options:n}}(t):t}const IW=new RegExp("".concat("{{","\\s*(.+?)\\s*").concat("}}"),"g");function rOe(t){let n=[];if("string"==typeof t){let o;for(;o=IW.exec(t);)n.push(o[1]);IW.lastIndex=0}return n}function EO(t,n,o){const e="".concat(t),i=e.replace(IW,(r,s)=>{let a=n[s];return null==a&&(o.push(function Qtn(t){return new vt(3003,!1)}()),a=""),a.toString()});return i==e?t:i}const Nnn=/-+([a-z0-9])/g;function MW(t){return t.replace(Nnn,(...n)=>n[1].toUpperCase())}function cp(t,n,o){switch(n.type){case Vi.Trigger:return t.visitTrigger(n,o);case Vi.State:return t.visitState(n,o);case Vi.Transition:return t.visitTransition(n,o);case Vi.Sequence:return t.visitSequence(n,o);case Vi.Group:return t.visitGroup(n,o);case Vi.Animate:return t.visitAnimate(n,o);case Vi.Keyframes:return t.visitKeyframes(n,o);case Vi.Style:return t.visitStyle(n,o);case Vi.Reference:return t.visitReference(n,o);case Vi.AnimateChild:return t.visitAnimateChild(n,o);case Vi.AnimateRef:return t.visitAnimateRef(n,o);case Vi.Query:return t.visitQuery(n,o);case Vi.Stagger:return t.visitStagger(n,o);default:throw function Ytn(t){return new vt(3004,!1)}()}}function OW(t,n){return window.getComputedStyle(t)[n]}const Gnn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class sOe extends SW{normalizePropertyName(n,o){return MW(n)}normalizeStyleValue(n,o,e,i){let r="";const s=e.toString().trim();if(Gnn.has(o)&&0!==e&&"0"!==e)if("number"==typeof e)r="px";else{const a=e.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&i.push(function Jtn(t,n){return new vt(3005,!1)}())}return s+r}}const YD="*";const JD=new Set(["true","1"]),XD=new Set(["false","0"]);function aOe(t,n){const o=JD.has(t)||XD.has(t),e=JD.has(n)||XD.has(n);return(i,r)=>{let s=t==YD||t==i,a=n==YD||n==r;return!s&&o&&"boolean"==typeof i&&(s=i?JD.has(t):XD.has(t)),!a&&e&&"boolean"==typeof r&&(a=r?JD.has(n):XD.has(n)),s&&a}}const Hnn=new RegExp("s*".concat(":self","s*,?"),"g");function EW(t,n,o,e){return new qnn(t).build(n,o,e)}class qnn{constructor(n){this._driver=n}build(n,o,e){const i=new Knn(o);return this._resetContextStyleTimingState(i),cp(this,OO(n),i)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,o){let e=o.queryCount=0,i=o.depCount=0;const r=[],s=[];return"@"==n.name.charAt(0)&&o.errors.push(function Xtn(){return new vt(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(o),a.type==Vi.State){const c=a,u=c.name;u.toString().split(/\s*,\s*/).forEach(h=>{c.name=h,r.push(this.visitState(c,o))}),c.name=u}else if(a.type==Vi.Transition){const c=this.visitTransition(a,o);e+=c.queryCount,i+=c.depCount,s.push(c)}else o.errors.push(function enn(){return new vt(3007,!1)}())}),{type:Vi.Trigger,name:n.name,states:r,transitions:s,queryCount:e,depCount:i,options:null}}visitState(n,o){const e=this.visitStyle(n.styles,o),i=n.options&&n.options.params||null;if(e.containsDynamicStyles){const r=new Set,s=i||{};e.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{rOe(c).forEach(u=>{s.hasOwnProperty(u)||r.add(u)})})}),r.size&&o.errors.push(function tnn(t,n){return new vt(3008,!1)}(0,r.values()))}return{type:Vi.State,name:n.name,style:e,options:i?{params:i}:null}}visitTransition(n,o){o.queryCount=0,o.depCount=0;const e=cp(this,OO(n.animation),o),i=function Vnn(t,n){const o=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(e=>function znn(t,n,o){if(":"==t[0]){const c=function jnn(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(o,e)=>parseFloat(e)>parseFloat(o);case":decrement":return(o,e)=>parseFloat(e)<parseFloat(o);default:return n.push(function dnn(t){return new vt(3016,!1)}()),"* => *"}}(t,o);if("function"==typeof c)return void n.push(c);t=c}const e=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==e||e.length<4)return o.push(function unn(t){return new vt(3015,!1)}()),n;const i=e[1],r=e[2],s=e[3];n.push(aOe(i,s)),"<"==r[0]&&(i!=YD||s!=YD)&&n.push(aOe(s,i))}(e,o,n)):o.push(t),o}(n.expr,o.errors);return{type:Vi.Transition,matchers:i,animation:e,queryCount:o.queryCount,depCount:o.depCount,options:by(n.options)}}visitSequence(n,o){return{type:Vi.Sequence,steps:n.steps.map(e=>cp(this,e,o)),options:by(n.options)}}visitGroup(n,o){const e=o.currentTime;let i=0;const r=n.steps.map(s=>{o.currentTime=e;const a=cp(this,s,o);return i=Math.max(i,o.currentTime),a});return o.currentTime=i,{type:Vi.Group,steps:r,options:by(n.options)}}visitAnimate(n,o){const e=function Qnn(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return xW(QD(t,n).duration,0,"");const o=t;if(o.split(/\s+/).some(r=>"{"==r.charAt(0)&&"{"==r.charAt(1))){const r=xW(0,0,"");return r.dynamic=!0,r.strValue=o,r}const i=QD(o,n);return xW(i.duration,i.delay,i.easing)}(n.timings,o.errors);o.currentAnimateTimings=e;let i,r=n.styles?n.styles:Wc({});if(r.type==Vi.Keyframes)i=this.visitKeyframes(r,o);else{let s=n.styles,a=!1;if(!s){a=!0;const u={};e.easing&&(u.easing=e.easing),s=Wc(u)}o.currentTime+=e.duration+e.delay;const c=this.visitStyle(s,o);c.isEmptyStep=a,i=c}return o.currentAnimateTimings=null,{type:Vi.Animate,timings:e,style:i,options:null}}visitStyle(n,o){const e=this._makeStyleAst(n,o);return this._validateStyleAst(e,o),e}_makeStyleAst(n,o){const e=[],i=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of i)"string"==typeof a?a===Rg?e.push(a):o.errors.push(new vt(3002,!1)):e.push(new Map(Object.entries(a)));let r=!1,s=null;return e.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!r))for(let c of a.values())if(c.toString().indexOf("{{")>=0){r=!0;break}}),{type:Vi.Style,styles:e,easing:s,offset:n.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(n,o){const e=o.currentAnimateTimings;let i=o.currentTime,r=o.currentTime;e&&r>0&&(r-=e.duration+e.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,c)=>{const u=o.collectedStyles.get(o.currentQuerySelector),h=u.get(c);let b=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(o.errors.push(function inn(t,n,o,e,i){return new vt(3010,!1)}()),b=!1),r=h.startTime),b&&u.set(c,{startTime:r,endTime:i}),o.options&&function Bnn(t,n,o){const e=n.params||{},i=rOe(t);i.length&&i.forEach(r=>{e.hasOwnProperty(r)||o.push(function Ztn(t){return new vt(3001,!1)}())})}(a,o.options,o.errors)})})}visitKeyframes(n,o){const e={type:Vi.Keyframes,styles:[],options:null};if(!o.currentAnimateTimings)return o.errors.push(function onn(){return new vt(3011,!1)}()),e;let r=0;const s=[];let a=!1,c=!1,u=0;const h=n.steps.map(ee=>{const le=this._makeStyleAst(ee,o);let me=null!=le.offset?le.offset:function Znn(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(o=>{if(o instanceof Map&&o.has("offset")){const e=o;n=parseFloat(e.get("offset")),e.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const o=t;n=parseFloat(o.get("offset")),o.delete("offset")}return n}(le.styles),ge=0;return null!=me&&(r++,ge=le.offset=me),c=c||ge<0||ge>1,a=a||ge<u,u=ge,s.push(ge),le});c&&o.errors.push(function rnn(){return new vt(3012,!1)}()),a&&o.errors.push(function snn(){return new vt(3200,!1)}());const b=n.steps.length;let w=0;r>0&&r<b?o.errors.push(function ann(){return new vt(3202,!1)}()):0==r&&(w=1/(b-1));const R=b-1,G=o.currentTime,K=o.currentAnimateTimings,te=K.duration;return h.forEach((ee,le)=>{const me=w>0?le==R?1:w*le:s[le],ge=me*te;o.currentTime=G+K.delay+ge,K.duration=ge,this._validateStyleAst(ee,o),ee.offset=me,e.styles.push(ee)}),e}visitReference(n,o){return{type:Vi.Reference,animation:cp(this,OO(n.animation),o),options:by(n.options)}}visitAnimateChild(n,o){return o.depCount++,{type:Vi.AnimateChild,options:by(n.options)}}visitAnimateRef(n,o){return{type:Vi.AnimateRef,animation:this.visitReference(n.animation,o),options:by(n.options)}}visitQuery(n,o){const e=o.currentQuerySelector,i=n.options||{};o.queryCount++,o.currentQuery=n;const[r,s]=function Wnn(t){const n=!!t.split(/\s*,\s*/).find(o=>":self"==o);return n&&(t=t.replace(Hnn,"")),t=t.replace(/@\*/g,ZD).replace(/@\w+/g,o=>ZD+"-"+o.slice(1)).replace(/:animating/g,TW),[t,n]}(n.selector);o.currentQuerySelector=e.length?e+" "+r:r,ap(o.collectedStyles,o.currentQuerySelector,new Map);const a=cp(this,OO(n.animation),o);return o.currentQuery=null,o.currentQuerySelector=e,{type:Vi.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:by(n.options)}}visitStagger(n,o){o.currentQuery||o.errors.push(function cnn(){return new vt(3013,!1)}());const e="full"===n.timings?{duration:0,delay:0,easing:"full"}:QD(n.timings,o.errors,!0);return{type:Vi.Stagger,animation:cp(this,OO(n.animation),o),timings:e,options:null}}}class Knn{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function by(t){return t?(t={...t}).params&&(t.params=function $nn(t){return t?{...t}:null}(t.params)):t={},t}function xW(t,n,o){return{duration:t,delay:n,easing:o}}function AW(t,n,o,e,i,r,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:o,postStyleProps:e,duration:i,delay:r,totalTime:i+r,easing:s,subTimeline:a}}class eB{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,o){let e=this._map.get(n);e||this._map.set(n,e=[]),e.push(...o)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const Xnn=new RegExp(":enter","g"),tin=new RegExp(":leave","g");function RW(t,n,o,e,i,r=new Map,s=new Map,a,c,u=[]){return(new nin).buildKeyframes(t,n,o,e,i,r,s,a,c,u)}class nin{buildKeyframes(n,o,e,i,r,s,a,c,u,h=[]){u=u||new eB;const b=new kW(n,o,u,i,r,h,[]);b.options=c;const w=c.delay?Vg(c.delay):0;b.currentTimeline.delayNextStep(w),b.currentTimeline.setStyles([s],null,b.errors,c),cp(this,e,b);const R=b.timelines.filter(G=>G.containsAnimation());if(R.length&&a.size){let G;for(let K=R.length-1;K>=0;K--){const te=R[K];if(te.element===o){G=te;break}}G&&!G.allowOnlyTimelineStyles()&&G.setStyles([a],null,b.errors,c)}return R.length?R.map(G=>G.buildKeyframes()):[AW(o,[],[],[],0,w,"",!1)]}visitTrigger(n,o){}visitState(n,o){}visitTransition(n,o){}visitAnimateChild(n,o){const e=o.subInstructions.get(o.element);if(e){const i=o.createSubContext(n.options),r=o.currentTimeline.currentTime,s=this._visitSubInstructions(e,i,i.options);r!=s&&o.transformIntoNewTimeline(s)}o.previousNode=n}visitAnimateRef(n,o){const e=o.createSubContext(n.options);e.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],o,e),this.visitReference(n.animation,e),o.transformIntoNewTimeline(e.currentTimeline.currentTime),o.previousNode=n}_applyAnimationRefDelays(n,o,e){for(const r of n){const s=null==r?void 0:r.delay;if(s){var i;const a="number"==typeof s?s:Vg(EO(s,null!==(i=null==r?void 0:r.params)&&void 0!==i?i:{},o.errors));e.delayNextStep(a)}}}_visitSubInstructions(n,o,e){let r=o.currentTimeline.currentTime;const s=null!=e.duration?Vg(e.duration):null,a=null!=e.delay?Vg(e.delay):null;return 0!==s&&n.forEach(c=>{const u=o.appendInstructionToTimeline(c,s,a);r=Math.max(r,u.duration+u.delay)}),r}visitReference(n,o){o.updateOptions(n.options,!0),cp(this,n.animation,o),o.previousNode=n}visitSequence(n,o){const e=o.subContextCount;let i=o;const r=n.options;if(r&&(r.params||r.delay)&&(i=o.createSubContext(r),i.transformIntoNewTimeline(),null!=r.delay)){i.previousNode.type==Vi.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=tB);const s=Vg(r.delay);i.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>cp(this,s,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>e&&i.transformIntoNewTimeline()),o.previousNode=n}visitGroup(n,o){const e=[];let i=o.currentTimeline.currentTime;const r=n.options&&n.options.delay?Vg(n.options.delay):0;n.steps.forEach(s=>{const a=o.createSubContext(n.options);r&&a.delayNextStep(r),cp(this,s,a),i=Math.max(i,a.currentTimeline.currentTime),e.push(a.currentTimeline)}),e.forEach(s=>o.currentTimeline.mergeTimelineCollectedStyles(s)),o.transformIntoNewTimeline(i),o.previousNode=n}_visitTiming(n,o){if(n.dynamic){const e=n.strValue;return QD(o.params?EO(e,o.params,o.errors):e,o.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,o){const e=o.currentAnimateTimings=this._visitTiming(n.timings,o),i=o.currentTimeline;e.delay&&(o.incrementTime(e.delay),i.snapshotCurrentStyles());const r=n.style;r.type==Vi.Keyframes?this.visitKeyframes(r,o):(o.incrementTime(e.duration),this.visitStyle(r,o),i.applyStylesToKeyframe()),o.currentAnimateTimings=null,o.previousNode=n}visitStyle(n,o){const e=o.currentTimeline,i=o.currentAnimateTimings;!i&&e.hasCurrentStyleProperties()&&e.forwardFrame();const r=i&&i.easing||n.easing;n.isEmptyStep?e.applyEmptyStep(r):e.setStyles(n.styles,r,o.errors,o.options),o.previousNode=n}visitKeyframes(n,o){const e=o.currentAnimateTimings,i=o.currentTimeline.duration,r=e.duration,a=o.createSubContext().currentTimeline;a.easing=e.easing,n.styles.forEach(c=>{a.forwardTime((c.offset||0)*r),a.setStyles(c.styles,c.easing,o.errors,o.options),a.applyStylesToKeyframe()}),o.currentTimeline.mergeTimelineCollectedStyles(a),o.transformIntoNewTimeline(i+r),o.previousNode=n}visitQuery(n,o){const e=o.currentTimeline.currentTime,i=n.options||{},r=i.delay?Vg(i.delay):0;r&&(o.previousNode.type===Vi.Style||0==e&&o.currentTimeline.hasCurrentStyleProperties())&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=tB);let s=e;const a=o.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!i.optional,o.errors);o.currentQueryTotal=a.length;let c=null;a.forEach((u,h)=>{o.currentQueryIndex=h;const b=o.createSubContext(n.options,u);r&&b.delayNextStep(r),u===o.element&&(c=b.currentTimeline),cp(this,n.animation,b),b.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,b.currentTimeline.currentTime)}),o.currentQueryIndex=0,o.currentQueryTotal=0,o.transformIntoNewTimeline(s),c&&(o.currentTimeline.mergeTimelineCollectedStyles(c),o.currentTimeline.snapshotCurrentStyles()),o.previousNode=n}visitStagger(n,o){const e=o.parentContext,i=o.currentTimeline,r=n.timings,s=Math.abs(r.duration),a=s*(o.currentQueryTotal-1);let c=s*o.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":c=a-c;break;case"full":c=e.currentStaggerTime}const h=o.currentTimeline;c&&h.delayNextStep(c);const b=h.currentTime;cp(this,n.animation,o),o.previousNode=n,e.currentStaggerTime=i.currentTime-b+(i.startTime-e.currentTimeline.startTime)}}const tB={};class kW{constructor(n,o,e,i,r,s,a,c){this._driver=n,this.element=o,this.subInstructions=e,this._enterClassName=i,this._leaveClassName=r,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=tB,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new nB(this._driver,o,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,o){if(!n)return;const e=n;let i=this.options;null!=e.duration&&(i.duration=Vg(e.duration)),null!=e.delay&&(i.delay=Vg(e.delay));const r=e.params;if(r){let s=i.params;s||(s=this.options.params={}),Object.keys(r).forEach(a=>{(!o||!s.hasOwnProperty(a))&&(s[a]=EO(r[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const o=this.options.params;if(o){const e=n.params={};Object.keys(o).forEach(i=>{e[i]=o[i]})}}return n}createSubContext(n=null,o,e){const i=o||this.element,r=new kW(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,e||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(n),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(n){return this.previousNode=tB,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,o,e){const i={duration:null!=o?o:n.duration,delay:this.currentTimeline.currentTime+(null!=e?e:0)+n.delay,easing:""},r=new iin(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,i,n.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,o,e,i,r,s){let a=[];if(i&&a.push(this.element),n.length>0){n=(n=n.replace(Xnn,"."+this._enterClassName)).replace(tin,"."+this._leaveClassName);let u=this._driver.query(this.element,n,1!=e);0!==e&&(u=e<0?u.slice(u.length+e,u.length):u.slice(0,e)),a.push(...u)}return!r&&0==a.length&&s.push(function lnn(t){return new vt(3014,!1)}()),a}}class nB{constructor(n,o,e,i){this._driver=n,this.element=o,this.startTime=e,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(o),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(o,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const o=1===this._keyframes.size&&this._pendingStyles.size;this.duration||o?(this.forwardTime(this.currentTime+n),o&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,o){return this.applyStylesToKeyframe(),new nB(this._driver,n,o||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,o){this._localTimelineStyles.set(n,o),this._globalTimelineStyles.set(n,o),this._styleSummary.set(n,{time:this.currentTime,value:o})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[o,e]of this._globalTimelineStyles)this._backFill.set(o,e||Rg),this._currentKeyframe.set(o,Rg);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,o,e,i){o&&this._previousKeyframe.set("easing",o);const r=i&&i.params||{},s=function oin(t,n){const o=new Map;let e;return t.forEach(i=>{if("*"===i){var r;null!==(r=e)&&void 0!==r||(e=n.keys());for(let s of e)o.set(s,Rg)}else for(let[s,a]of i)o.set(s,a)}),o}(n,this._globalTimelineStyles);for(let[c,u]of s){const h=EO(u,r,e);var a;this._pendingStyles.set(c,h),this._localTimelineStyles.has(c)||this._backFill.set(c,null!==(a=this._globalTimelineStyles.get(c))&&void 0!==a?a:Rg),this._updateStyle(c,h)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,o)=>{this._currentKeyframe.set(o,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,o)=>{this._currentKeyframe.has(o)||this._currentKeyframe.set(o,n)}))}snapshotCurrentStyles(){for(let[n,o]of this._localTimelineStyles)this._pendingStyles.set(n,o),this._updateStyle(n,o)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let o in this._currentKeyframe)n.push(o);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((o,e)=>{const i=this._styleSummary.get(e);(!i||o.time>i.time)&&this._updateStyle(e,o.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,o=new Set,e=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((a,c)=>{const u=new Map([...this._backFill,...a]);u.forEach((h,b)=>{"!"===h?n.add(b):h===Rg&&o.add(b)}),e||u.set("offset",c/this.duration),i.push(u)});const r=[...n.values()],s=[...o.values()];if(e){const a=i[0],c=new Map(a);a.set("offset",0),c.set("offset",1),i=[a,c]}return AW(this.element,i,r,s,this.duration,this.startTime,this.easing,!1)}}class iin extends nB{constructor(n,o,e,i,r,s,a=!1){super(n,o,s.delay),this.keyframes=e,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:o,duration:e,easing:i}=this.timings;if(this._stretchStartingKeyframe&&o){const r=[],s=e+o,a=o/s,c=new Map(n[0]);c.set("offset",0),r.push(c);const u=new Map(n[0]);u.set("offset",uOe(a)),r.push(u);const h=n.length-1;for(let b=1;b<=h;b++){let w=new Map(n[b]);const R=w.get("offset");w.set("offset",uOe((o+R*e)/s)),r.push(w)}e=s,o=0,i="",n=r}return AW(this.element,n,this.preStyleProps,this.postStyleProps,e,o,i,!0)}}function uOe(t,n=3){const o=Math.pow(10,n-1);return Math.round(t*o)/o}function dOe(t,n,o,e,i,r,s,a,c,u,h,b,w){return{type:0,element:t,triggerName:n,isRemovalTransition:i,fromState:o,fromStyles:r,toState:e,toStyles:s,timelines:a,queriedElements:c,preStyleProps:u,postStyleProps:h,totalTime:b,errors:w}}const LW={};class pOe{constructor(n,o,e){this._triggerName=n,this.ast=o,this._stateStyles=e}match(n,o,e,i){return function rin(t,n,o,e,i){return t.some(r=>r(n,o,e,i))}(this.ast.matchers,n,o,e,i)}buildStyles(n,o,e){let i=this._stateStyles.get("*");return void 0!==n&&(i=this._stateStyles.get(null==n?void 0:n.toString())||i),i?i.buildStyles(o,e):new Map}build(n,o,e,i,r,s,a,c,u,h){var b;const w=[],R=this.ast.options&&this.ast.options.params||LW,K=this.buildStyles(e,a&&a.params||LW,w),te=c&&c.params||LW,ee=this.buildStyles(i,te,w),le=new Set,me=new Map,ge=new Map,Me="void"===i,Ke={params:hOe(te,R),delay:null===(b=this.ast.options)||void 0===b?void 0:b.delay},Ee=h?[]:RW(n,o,this.ast.animation,r,s,K,ee,Ke,u,w);let ot=0;return Ee.forEach(ct=>{ot=Math.max(ct.duration+ct.delay,ot)}),w.length?dOe(o,this._triggerName,e,i,Me,K,ee,[],[],me,ge,ot,w):(Ee.forEach(ct=>{const Pt=ct.element,gn=ap(me,Pt,new Set);ct.preStyleProps.forEach(Je=>gn.add(Je));const qt=ap(ge,Pt,new Set);ct.postStyleProps.forEach(Je=>qt.add(Je)),Pt!==o&&le.add(Pt)}),dOe(o,this._triggerName,e,i,Me,K,ee,Ee,[...le.values()],me,ge,ot))}}function hOe(t,n){const o={...n};return Object.entries(t).forEach(([e,i])=>{null!=i&&(o[e]=i)}),o}class sin{constructor(n,o,e){this.styles=n,this.defaultParams=o,this.normalizer=e}buildStyles(n,o){const e=new Map,i=hOe(n,this.defaultParams);return this.styles.styles.forEach(r=>{"string"!=typeof r&&r.forEach((s,a)=>{s&&(s=EO(s,i,o));const c=this.normalizer.normalizePropertyName(a,o);s=this.normalizer.normalizeStyleValue(a,c,s,o),e.set(a,s)})}),e}}class cin{constructor(n,o,e){this.name=n,this.ast=o,this._normalizer=e,this.transitionFactories=[],this.states=new Map,o.states.forEach(i=>{this.states.set(i.name,new sin(i.style,i.options&&i.options.params||{},e))}),mOe(this.states,"true","1"),mOe(this.states,"false","0"),o.transitions.forEach(i=>{this.transitionFactories.push(new pOe(n,i,this.states))}),this.fallbackTransition=function lin(t,n,o){return new pOe(t,{type:Vi.Transition,animation:{type:Vi.Sequence,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,o,e,i){return this.transitionFactories.find(s=>s.match(n,o,e,i))||null}matchStyles(n,o,e){return this.fallbackTransition.buildStyles(n,o,e)}}function mOe(t,n,o){t.has(n)?t.has(o)||t.set(o,t.get(n)):t.has(o)&&t.set(n,t.get(o))}const uin=new eB;class din{constructor(n,o,e){this.bodyNode=n,this._driver=o,this._normalizer=e,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,o){const e=[],r=EW(this._driver,o,e,[]);if(e.length)throw function gnn(t){return new vt(3503,!1)}();this._animations.set(n,r)}_buildPlayer(n,o,e){const i=n.element,r=YMe(this._normalizer,n.keyframes,o,e);return this._driver.animate(i,r,n.duration,n.delay,n.easing,[],!0)}create(n,o,e={}){const i=[],r=this._animations.get(n);let s;const a=new Map;if(r?(s=RW(this._driver,o,r,wW,$D,new Map,new Map,e,uin,i),s.forEach(h=>{const b=ap(a,h.element,new Map);h.postStyleProps.forEach(w=>b.set(w,null))})):(i.push(function _nn(){return new vt(3300,!1)}()),s=[]),i.length)throw function vnn(t){return new vt(3504,!1)}();a.forEach((h,b)=>{h.forEach((w,R)=>{h.set(R,this._driver.computeStyle(b,R,Rg))})});const u=Dv(s.map(h=>{const b=a.get(h.element);return this._buildPlayer(h,new Map,b)}));return this._playersById.set(n,u),u.onDestroy(()=>this.destroy(n)),this.players.push(u),u}destroy(n){const o=this._getPlayer(n);o.destroy(),this._playersById.delete(n);const e=this.players.indexOf(o);e>=0&&this.players.splice(e,1)}_getPlayer(n){const o=this._playersById.get(n);if(!o)throw function bnn(t){return new vt(3301,!1)}();return o}listen(n,o,e,i){const r=bW(o,"","","");return _W(this._getPlayer(n),e,r,i),()=>{}}command(n,o,e,i){if("register"==e)return void this.register(n,i[0]);if("create"==e)return void this.create(n,o,i[0]||{});const r=this._getPlayer(n);switch(e){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(n)}}}const fOe="ng-animate-queued",DW="ng-animate-disabled",gin=[],gOe={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},_in={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},am="__ng_removed";class BW{get params(){return this.options.params}constructor(n,o=""){this.namespaceId=o;const e=n&&n.hasOwnProperty("value");if(this.value=function yin(t){return null!=t?t:null}(e?n.value:n),e){const{value:r,...s}=n;this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const o=n.params;if(o){const e=this.options.params;Object.keys(o).forEach(i=>{null==e[i]&&(e[i]=o[i])})}}}const xO="void",NW=new BW(xO);class vin{constructor(n,o,e){this.id=n,this.hostElement=o,this._engine=e,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Xp(o,this._hostClassName)}listen(n,o,e,i){if(!this._triggers.has(o))throw function Cnn(t,n){return new vt(3302,!1)}();if(null==e||0==e.length)throw function ynn(t){return new vt(3303,!1)}();if(!function Sin(t){return"start"==t||"done"==t}(e))throw function Snn(t,n){return new vt(3400,!1)}();const r=ap(this._elementListeners,n,[]),s={name:o,phase:e,callback:i};r.push(s);const a=ap(this._engine.statesByElement,n,new Map);return a.has(o)||(Xp(n,KD),Xp(n,KD+"-"+o),a.set(o,NW)),()=>{this._engine.afterFlush(()=>{const c=r.indexOf(s);c>=0&&r.splice(c,1),this._triggers.has(o)||a.delete(o)})}}register(n,o){return!this._triggers.has(n)&&(this._triggers.set(n,o),!0)}_getTrigger(n){const o=this._triggers.get(n);if(!o)throw function wnn(t){return new vt(3401,!1)}();return o}trigger(n,o,e,i=!0){const r=this._getTrigger(o),s=new FW(this.id,o,n);let a=this._engine.statesByElement.get(n);a||(Xp(n,KD),Xp(n,KD+"-"+o),this._engine.statesByElement.set(n,a=new Map));let c=a.get(o);const u=new BW(e,this.id);if(!(e&&e.hasOwnProperty("value"))&&c&&u.absorbOptions(c.options),a.set(o,u),c||(c=NW),u.value!==xO&&c.value===u.value){if(!function Pin(t,n){const o=Object.keys(t),e=Object.keys(n);if(o.length!=e.length)return!1;for(let i=0;i<o.length;i++){const r=o[i];if(!n.hasOwnProperty(r)||t[r]!==n[r])return!1}return!0}(c.params,u.params)){const K=[],te=r.matchStyles(c.value,c.params,K),ee=r.matchStyles(u.value,u.params,K);K.length?this._engine.reportError(K):this._engine.afterFlush(()=>{vy(n,te),Of(n,ee)})}return}const w=ap(this._engine.playersByElement,n,[]);w.forEach(K=>{K.namespaceId==this.id&&K.triggerName==o&&K.queued&&K.destroy()});let R=r.matchTransition(c.value,u.value,n,u.params),G=!1;if(!R){if(!i)return;R=r.fallbackTransition,G=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:o,transition:R,fromState:c,toState:u,player:s,isFallbackTransition:G}),G||(Xp(n,fOe),s.onStart(()=>{v1(n,fOe)})),s.onDone(()=>{let K=this.players.indexOf(s);K>=0&&this.players.splice(K,1);const te=this._engine.playersByElement.get(n);if(te){let ee=te.indexOf(s);ee>=0&&te.splice(ee,1)}}),this.players.push(s),w.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(o=>o.delete(n)),this._elementListeners.forEach((o,e)=>{this._elementListeners.set(e,o.filter(i=>i.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const o=this._engine.playersByElement.get(n);o&&(o.forEach(e=>e.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,o){const e=this._engine.driver.query(n,ZD,!0);e.forEach(i=>{if(i[am])return;const r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(s=>s.triggerLeaveAnimation(i,o,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>e.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(n,o,e,i){const r=this._engine.statesByElement.get(n),s=new Map;if(r){const a=[];if(r.forEach((c,u)=>{if(s.set(u,c.value),this._triggers.has(u)){const h=this.trigger(n,u,xO,i);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,o,s),e&&Dv(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const o=this._elementListeners.get(n),e=this._engine.statesByElement.get(n);if(o&&e){const i=new Set;o.forEach(r=>{const s=r.name;if(i.has(s))return;i.add(s);const c=this._triggers.get(s).fallbackTransition,u=e.get(s)||NW,h=new BW(xO),b=new FW(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:c,fromState:u,toState:h,player:b,isFallbackTransition:!0})})}}removeNode(n,o){const e=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,o),this.triggerLeaveAnimation(n,o,!0))return;let i=!1;if(e.totalAnimations){const r=e.players.length?e.playersByQueriedElement.get(n):[];if(r&&r.length)i=!0;else{let s=n;for(;s=s.parentNode;)if(e.statesByElement.get(s)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(n),i)e.markElementAsRemoved(this.id,n,!1,o);else{const r=n[am];(!r||r===gOe)&&(e.afterFlush(()=>this.clearElementCache(n)),e.destroyInnerAnimations(n),e._onRemovalComplete(n,o))}}insertNode(n,o){Xp(n,this._hostClassName)}drainQueuedTransitions(n){const o=[];return this._queue.forEach(e=>{const i=e.player;if(i.destroyed)return;const r=e.element,s=this._elementListeners.get(r);s&&s.forEach(a=>{if(a.name==e.triggerName){const c=bW(r,e.triggerName,e.fromState.value,e.toState.value);c._data=n,_W(e.player,a.phase,c,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):o.push(e)}),this._queue=[],o.sort((e,i)=>{const r=e.transition.ast.depCount,s=i.transition.ast.depCount;return 0==r||0==s?r-s:this._engine.driver.containsElement(e.element,i.element)?1:-1})}destroy(n){this.players.forEach(o=>o.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}}class bin{_onRemovalComplete(n,o){this.onRemovalComplete(n,o)}constructor(n,o,e,i){this.bodyNode=n,this.driver=o,this._normalizer=e,this.scheduler=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(o=>{o.players.forEach(e=>{e.queued&&n.push(e)})}),n}createNamespace(n,o){const e=new vin(n,o,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,o)?this._balanceNamespaceList(e,o):(this.newHostElements.set(o,e),this.collectEnterElement(o)),this._namespaceLookup[n]=e}_balanceNamespaceList(n,o){const e=this._namespaceList,i=this.namespacesByHostElement;if(e.length-1>=0){let s=!1,a=this.driver.getParentElement(o);for(;a;){const c=i.get(a);if(c){const u=e.indexOf(c);e.splice(u+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||e.unshift(n)}else e.push(n);return i.set(o,n),n}register(n,o){let e=this._namespaceLookup[n];return e||(e=this.createNamespace(n,o)),e}registerTrigger(n,o,e){let i=this._namespaceLookup[n];i&&i.register(o,e)&&this.totalAnimations++}destroy(n,o){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const e=this._fetchNamespace(n);this.namespacesByHostElement.delete(e.hostElement);const i=this._namespaceList.indexOf(e);i>=0&&this._namespaceList.splice(i,1),e.destroy(o),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const o=new Set,e=this.statesByElement.get(n);if(e)for(let i of e.values())if(i.namespaceId){const r=this._fetchNamespace(i.namespaceId);r&&o.add(r)}return o}trigger(n,o,e,i){if(iB(o)){const r=this._fetchNamespace(n);if(r)return r.trigger(o,e,i),!0}return!1}insertNode(n,o,e,i){if(!iB(o))return;const r=o[am];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const s=this.collectedLeaveElements.indexOf(o);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(o,e)}i&&this.collectEnterElement(o)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,o){o?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Xp(n,DW)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),v1(n,DW))}removeNode(n,o,e){if(iB(o)){var i;null===(i=this.scheduler)||void 0===i||i.notify();const r=n?this._fetchNamespace(n):null;r?r.removeNode(o,e):this.markElementAsRemoved(n,o,!1,e);const s=this.namespacesByHostElement.get(o);s&&s.id!==n&&s.removeNode(o,e)}else this._onRemovalComplete(o,e)}markElementAsRemoved(n,o,e,i,r){this.collectedLeaveElements.push(o),o[am]={namespaceId:n,setForRemoval:i,hasAnimation:e,removedBeforeQueried:!1,previousTriggersValues:r}}listen(n,o,e,i,r){return iB(o)?this._fetchNamespace(n).listen(o,e,i,r):()=>{}}_buildInstruction(n,o,e,i,r){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,e,i,n.fromState.options,n.toState.options,o,r)}destroyInnerAnimations(n){let o=this.driver.query(n,ZD,!0);o.forEach(e=>this.destroyActiveAnimationsForElement(e)),0!=this.playersByQueriedElement.size&&(o=this.driver.query(n,TW,!0),o.forEach(e=>this.finishActiveQueriedAnimationOnElement(e)))}destroyActiveAnimationsForElement(n){const o=this.playersByElement.get(n);o&&o.forEach(e=>{e.queued?e.markedForDestroy=!0:e.destroy()})}finishActiveQueriedAnimationOnElement(n){const o=this.playersByQueriedElement.get(n);o&&o.forEach(e=>e.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return Dv(this.players).onDone(()=>n());n()})}processLeaveNode(n){var o;const e=n[am];if(e&&e.setForRemoval){if(n[am]=gOe,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}null!==(o=n.classList)&&void 0!==o&&o.contains(DW)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let o=[];if(this.newHostElements.size&&(this.newHostElements.forEach((e,i)=>this._balanceNamespaceList(e,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let e=0;e<this.collectedEnterElements.length;e++)Xp(this.collectedEnterElements[e],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const e=[];try{o=this._flushAnimations(e,n)}finally{for(let i=0;i<e.length;i++)e[i]()}}else for(let e=0;e<this.collectedLeaveElements.length;e++)this.processLeaveNode(this.collectedLeaveElements[e]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(e=>e()),this._flushFns=[],this._whenQuietFns.length){const e=this._whenQuietFns;this._whenQuietFns=[],o.length?Dv(o).onDone(()=>{e.forEach(i=>i())}):e.forEach(i=>i())}}reportError(n){throw function Tnn(t){return new vt(3402,!1)}()}_flushAnimations(n,o){const e=new eB,i=[],r=new Map,s=[],a=new Map,c=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(rn=>{h.add(rn);const vn=this.driver.query(rn,".ng-animate-queued",!0);for(let Vn=0;Vn<vn.length;Vn++)h.add(vn[Vn])});const b=this.bodyNode,w=Array.from(this.statesByElement.keys()),R=bOe(w,this.collectedEnterElements),G=new Map;let K=0;R.forEach((rn,vn)=>{const Vn=wW+K++;G.set(vn,Vn),rn.forEach(An=>Xp(An,Vn))});const te=[],ee=new Set,le=new Set;for(let rn=0;rn<this.collectedLeaveElements.length;rn++){const vn=this.collectedLeaveElements[rn],Vn=vn[am];Vn&&Vn.setForRemoval&&(te.push(vn),ee.add(vn),Vn.hasAnimation?this.driver.query(vn,".ng-star-inserted",!0).forEach(An=>ee.add(An)):le.add(vn))}const me=new Map,ge=bOe(w,Array.from(ee));ge.forEach((rn,vn)=>{const Vn=$D+K++;me.set(vn,Vn),rn.forEach(An=>Xp(An,Vn))}),n.push(()=>{R.forEach((rn,vn)=>{const Vn=G.get(vn);rn.forEach(An=>v1(An,Vn))}),ge.forEach((rn,vn)=>{const Vn=me.get(vn);rn.forEach(An=>v1(An,Vn))}),te.forEach(rn=>{this.processLeaveNode(rn)})});const Me=[],Ke=[];for(let rn=this._namespaceList.length-1;rn>=0;rn--)this._namespaceList[rn].drainQueuedTransitions(o).forEach(Vn=>{const An=Vn.player,zi=Vn.element;if(Me.push(An),this.collectedEnterElements.length){const gl=zi[am];if(gl&&gl.setForMove){if(gl.previousTriggersValues&&gl.previousTriggersValues.has(Vn.triggerName)){const zg=gl.previousTriggersValues.get(Vn.triggerName),gd=this.statesByElement.get(Vn.element);if(gd&&gd.has(Vn.triggerName)){const S1=gd.get(Vn.triggerName);S1.value=zg,gd.set(Vn.triggerName,S1)}}return void An.destroy()}}const Ir=!b||!this.driver.containsElement(b,zi),Ur=me.get(zi),up=G.get(zi),fr=this._buildInstruction(Vn,e,up,Ur,Ir);if(fr.errors&&fr.errors.length)return void Ke.push(fr);if(Ir)return An.onStart(()=>vy(zi,fr.fromStyles)),An.onDestroy(()=>Of(zi,fr.toStyles)),void i.push(An);if(Vn.isFallbackTransition)return An.onStart(()=>vy(zi,fr.fromStyles)),An.onDestroy(()=>Of(zi,fr.toStyles)),void i.push(An);const eh=[];fr.timelines.forEach(gl=>{gl.stretchStartingKeyframe=!0,this.disabledNodes.has(gl.element)||eh.push(gl)}),fr.timelines=eh,e.append(zi,fr.timelines),s.push({instruction:fr,player:An,element:zi}),fr.queriedElements.forEach(gl=>ap(a,gl,[]).push(An)),fr.preStyleProps.forEach((gl,zg)=>{if(gl.size){let gd=c.get(zg);gd||c.set(zg,gd=new Set),gl.forEach((S1,kO)=>gd.add(kO))}}),fr.postStyleProps.forEach((gl,zg)=>{let gd=u.get(zg);gd||u.set(zg,gd=new Set),gl.forEach((S1,kO)=>gd.add(kO))})});if(Ke.length){const rn=[];Ke.forEach(vn=>{rn.push(function Pnn(t,n){return new vt(3505,!1)}())}),Me.forEach(vn=>vn.destroy()),this.reportError(rn)}const Ee=new Map,ot=new Map;s.forEach(rn=>{const vn=rn.element;e.has(vn)&&(ot.set(vn,vn),this._beforeAnimationBuild(rn.player.namespaceId,rn.instruction,Ee))}),i.forEach(rn=>{const vn=rn.element;this._getPreviousPlayers(vn,!1,rn.namespaceId,rn.triggerName,null).forEach(An=>{ap(Ee,vn,[]).push(An),An.destroy()})});const ct=te.filter(rn=>yOe(rn,c,u)),Pt=new Map;vOe(Pt,this.driver,le,u,Rg).forEach(rn=>{yOe(rn,c,u)&&ct.push(rn)});const qt=new Map;R.forEach((rn,vn)=>{vOe(qt,this.driver,new Set(rn),c,"!")}),ct.forEach(rn=>{var vn,Vn;const An=Pt.get(rn),zi=qt.get(rn);Pt.set(rn,new Map([...null!==(vn=null==An?void 0:An.entries())&&void 0!==vn?vn:[],...null!==(Vn=null==zi?void 0:zi.entries())&&void 0!==Vn?Vn:[]]))});const Je=[],xn=[],bi={};s.forEach(rn=>{const{element:vn,player:Vn,instruction:An}=rn;if(e.has(vn)){if(h.has(vn))return Vn.onDestroy(()=>Of(vn,An.toStyles)),Vn.disabled=!0,Vn.overrideTotalTime(An.totalTime),void i.push(Vn);let zi=bi;if(ot.size>1){let Ur=vn;const up=[];for(;Ur=Ur.parentNode;){const fr=ot.get(Ur);if(fr){zi=fr;break}up.push(Ur)}up.forEach(fr=>ot.set(fr,zi))}const Ir=this._buildAnimation(Vn.namespaceId,An,Ee,r,qt,Pt);if(Vn.setRealPlayer(Ir),zi===bi)Je.push(Vn);else{const Ur=this.playersByElement.get(zi);Ur&&Ur.length&&(Vn.parentPlayer=Dv(Ur)),i.push(Vn)}}else vy(vn,An.fromStyles),Vn.onDestroy(()=>Of(vn,An.toStyles)),xn.push(Vn),h.has(vn)&&i.push(Vn)}),xn.forEach(rn=>{const vn=r.get(rn.element);if(vn&&vn.length){const Vn=Dv(vn);rn.setRealPlayer(Vn)}}),i.forEach(rn=>{rn.parentPlayer?rn.syncPlayerEvents(rn.parentPlayer):rn.destroy()});for(let rn=0;rn<te.length;rn++){const vn=te[rn],Vn=vn[am];if(v1(vn,$D),Vn&&Vn.hasAnimation)continue;let An=[];if(a.size){let Ir=a.get(vn);Ir&&Ir.length&&An.push(...Ir);let Ur=this.driver.query(vn,TW,!0);for(let up=0;up<Ur.length;up++){let fr=a.get(Ur[up]);fr&&fr.length&&An.push(...fr)}}const zi=An.filter(Ir=>!Ir.destroyed);zi.length?win(this,vn,zi):this.processLeaveNode(vn)}return te.length=0,Je.forEach(rn=>{this.players.push(rn),rn.onDone(()=>{rn.destroy();const vn=this.players.indexOf(rn);this.players.splice(vn,1)}),rn.play()}),Je}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,o,e,i,r){let s=[];if(o){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const c=!r||r==xO;a.forEach(u=>{u.queued||!c&&u.triggerName!=i||s.push(u)})}}return(e||i)&&(s=s.filter(a=>!(e&&e!=a.namespaceId||i&&i!=a.triggerName))),s}_beforeAnimationBuild(n,o,e){const r=o.element,s=o.isRemovalTransition?void 0:n,a=o.isRemovalTransition?void 0:o.triggerName;for(const c of o.timelines){const u=c.element,h=u!==r,b=ap(e,u,[]);this._getPreviousPlayers(u,h,s,a,o.toState).forEach(R=>{const G=R.getRealPlayer();G.beforeDestroy&&G.beforeDestroy(),R.destroy(),b.push(R)})}vy(r,o.fromStyles)}_buildAnimation(n,o,e,i,r,s){const a=o.triggerName,c=o.element,u=[],h=new Set,b=new Set,w=o.timelines.map(G=>{const K=G.element;h.add(K);const te=K[am];if(te&&te.removedBeforeQueried)return new DM(G.duration,G.delay);const ee=K!==c,le=function Tin(t){const n=[];return COe(t,n),n}((e.get(K)||gin).map(Ee=>Ee.getRealPlayer())).filter(Ee=>!!Ee.element&&Ee.element===K),me=r.get(K),ge=s.get(K),Me=YMe(this._normalizer,G.keyframes,me,ge),Ke=this._buildPlayer(G,Me,le);if(G.subTimeline&&i&&b.add(K),ee){const Ee=new FW(n,a,K);Ee.setRealPlayer(Ke),u.push(Ee)}return Ke});u.forEach(G=>{ap(this.playersByQueriedElement,G.element,[]).push(G),G.onDone(()=>function Cin(t,n,o){let e=t.get(n);if(e){if(e.length){const i=e.indexOf(o);e.splice(i,1)}0==e.length&&t.delete(n)}return e}(this.playersByQueriedElement,G.element,G))}),h.forEach(G=>Xp(G,iOe));const R=Dv(w);return R.onDestroy(()=>{h.forEach(G=>v1(G,iOe)),Of(c,o.toStyles)}),b.forEach(G=>{ap(i,G,[]).push(R)}),R}_buildPlayer(n,o,e){return o.length>0?this.driver.animate(n.element,o,n.duration,n.delay,n.easing,e):new DM(n.duration,n.delay)}}class FW{constructor(n,o,e){this.namespaceId=n,this.triggerName=o,this.element=e,this._player=new DM,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((o,e)=>{o.forEach(i=>_W(n,e,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const o=this._player;o.triggerCallback&&n.onStart(()=>o.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,o){ap(this._queuedCallbacks,n,[]).push(o)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const o=this._player;o.triggerCallback&&o.triggerCallback(n)}}function iB(t){return t&&1===t.nodeType}function _Oe(t,n){const o=t.style.display;return t.style.display=null!=n?n:"none",o}function vOe(t,n,o,e,i){const r=[];o.forEach(c=>r.push(_Oe(c)));const s=[];e.forEach((c,u)=>{const h=new Map;c.forEach(b=>{const w=n.computeStyle(u,b,i);h.set(b,w),(!w||0==w.length)&&(u[am]=_in,s.push(u))}),t.set(u,h)});let a=0;return o.forEach(c=>_Oe(c,r[a++])),s}function bOe(t,n){const o=new Map;if(t.forEach(a=>o.set(a,[])),0==n.length)return o;const i=new Set(n),r=new Map;function s(a){if(!a)return 1;let c=r.get(a);if(c)return c;const u=a.parentNode;return c=o.has(u)?u:i.has(u)?1:s(u),r.set(a,c),c}return n.forEach(a=>{const c=s(a);1!==c&&o.get(c).push(a)}),o}function Xp(t,n){var o;null===(o=t.classList)||void 0===o||o.add(n)}function v1(t,n){var o;null===(o=t.classList)||void 0===o||o.remove(n)}function win(t,n,o){Dv(o).onDone(()=>t.processLeaveNode(n))}function COe(t,n){for(let o=0;o<t.length;o++){const e=t[o];e instanceof qbe?COe(e.players,n):n.push(e)}}function yOe(t,n,o){const e=o.get(t);if(!e)return!1;let i=n.get(t);return i?e.forEach(r=>i.add(r)):n.set(t,e),o.delete(t),!0}class AO{constructor(n,o,e,i){this._driver=o,this._normalizer=e,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new bin(n.body,o,e,i),this._timelineEngine=new din(n.body,o,e),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(n,o,e,i,r){const s=n+"-"+i;let a=this._triggerCache[s];if(!a){const c=[],h=EW(this._driver,r,c,[]);if(c.length)throw function mnn(t,n){return new vt(3404,!1)}();a=function ain(t,n,o){return new cin(t,n,o)}(i,h,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(o,i,a)}register(n,o){this._transitionEngine.register(n,o)}destroy(n,o){this._transitionEngine.destroy(n,o)}onInsert(n,o,e,i){this._transitionEngine.insertNode(n,o,e,i)}onRemove(n,o,e){this._transitionEngine.removeNode(n,o,e)}disableAnimations(n,o){this._transitionEngine.markElementAsDisabled(n,o)}process(n,o,e,i){if("@"==e.charAt(0)){const[r,s]=JMe(e);this._timelineEngine.command(r,o,s,i)}else this._transitionEngine.trigger(n,o,e,i)}listen(n,o,e,i,r){if("@"==e.charAt(0)){const[s,a]=JMe(e);return this._timelineEngine.listen(s,o,a,r)}return this._transitionEngine.listen(n,o,e,i,r)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}}class b1{constructor(n,o,e){this._element=n,this._startStyles=o,this._endStyles=e,this._state=0;let i=b1.initialStylesByElement.get(n);i||b1.initialStylesByElement.set(n,i=new Map),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&Of(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Of(this._element,this._initialStyles),this._endStyles&&(Of(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(b1.initialStylesByElement.delete(this._element),this._startStyles&&(vy(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(vy(this._element,this._endStyles),this._endStyles=null),Of(this._element,this._initialStyles),this._state=3)}}function UW(t){let n=null;return t.forEach((o,e)=>{(function Min(t){return"display"===t||"position"===t})(e)&&(n=n||new Map,n.set(e,o))}),n}b1.initialStylesByElement=new WeakMap;class SOe{constructor(n,o,e,i){this.element=n,this.keyframes=o,this.options=e,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=e.duration,this._delay=e.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map;const o=()=>this._onFinish();this.domPlayer.addEventListener("finish",o),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",o)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const o=[];return n.forEach(e=>{o.push(Object.fromEntries(e))}),o}_triggerWebAnimation(n,o,e){return n.animate(this._convertKeyframesToObject(o),e)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){var n;return+(null!==(n=this.domPlayer.currentTime)&&void 0!==n?n:0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((e,i)=>{"offset"!==i&&n.set(i,this._finished?e:OW(this.element,i))}),this.currentSnapshot=n}triggerCallback(n){const o="start"===n?this._onStartFns:this._onDoneFns;o.forEach(e=>e()),o.length=0}}class wOe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,o){return!1}containsElement(n,o){return eOe(n,o)}getParentElement(n){return CW(n)}query(n,o,e){return tOe(n,o,e)}computeStyle(n,o,e){return OW(n,o)}animate(n,o,e,i,r,s=[]){const c={duration:e,delay:i,fill:0==i?"both":"forwards"};r&&(c.easing=r);const u=new Map,h=s.filter(R=>R instanceof SOe);(function Fnn(t,n){return 0===t||0===n})(e,i)&&h.forEach(R=>{R.currentSnapshot.forEach((G,K)=>u.set(K,G))});let b=function Dnn(t){return t.length?t[0]instanceof Map?t:t.map(n=>new Map(Object.entries(n))):[]}(o).map(R=>new Map(R));b=function Unn(t,n,o){if(o.size&&n.length){let e=n[0],i=[];if(o.forEach((r,s)=>{e.has(s)||i.push(s),e.set(s,r)}),i.length)for(let r=1;r<n.length;r++){let s=n[r];i.forEach(a=>s.set(a,OW(t,a)))}}return n}(n,b,u);const w=function Iin(t,n){let o=null,e=null;return Array.isArray(n)&&n.length?(o=UW(n[0]),n.length>1&&(e=UW(n[n.length-1]))):n instanceof Map&&(o=UW(n)),o||e?new b1(t,o,e):null}(n,b);return new SOe(n,b,c,w)}}const TOe="@.disabled";class POe{constructor(n,o,e,i){this.namespaceId=n,this.delegate=o,this.engine=e,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(n){var o,e;null===(o=(e=this.delegate).destroyNode)||void 0===o||o.call(e,n)}destroy(){var n;this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),null===(n=this._onDestroy)||void 0===n||n.call(this)}createElement(n,o){return this.delegate.createElement(n,o)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,o){this.delegate.appendChild(n,o),this.engine.onInsert(this.namespaceId,o,n,!1)}insertBefore(n,o,e,i=!0){this.delegate.insertBefore(n,o,e),this.engine.onInsert(this.namespaceId,o,n,i)}removeChild(n,o,e){this.engine.onRemove(this.namespaceId,o,this.delegate)}selectRootElement(n,o){return this.delegate.selectRootElement(n,o)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,o,e,i){this.delegate.setAttribute(n,o,e,i)}removeAttribute(n,o,e){this.delegate.removeAttribute(n,o,e)}addClass(n,o){this.delegate.addClass(n,o)}removeClass(n,o){this.delegate.removeClass(n,o)}setStyle(n,o,e,i){this.delegate.setStyle(n,o,e,i)}removeStyle(n,o,e){this.delegate.removeStyle(n,o,e)}setProperty(n,o,e){"@"==o.charAt(0)&&o==TOe?this.disableAnimations(n,!!e):this.delegate.setProperty(n,o,e)}setValue(n,o){this.delegate.setValue(n,o)}listen(n,o,e){return this.delegate.listen(n,o,e)}disableAnimations(n,o){this.engine.disableAnimations(n,o)}}class Oin extends POe{constructor(n,o,e,i,r){super(o,e,i,r),this.factory=n,this.namespaceId=o}setProperty(n,o,e){"@"==o.charAt(0)?"."==o.charAt(1)&&o==TOe?this.disableAnimations(n,e=void 0===e||!!e):this.engine.process(this.namespaceId,n,o.slice(1),e):this.delegate.setProperty(n,o,e)}listen(n,o,e){if("@"==o.charAt(0)){const i=function Ein(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let r=o.slice(1),s="";return"@"!=r.charAt(0)&&([r,s]=function xin(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(r)),this.engine.listen(this.namespaceId,i,r,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,e,a)})}return this.delegate.listen(n,o,e)}}class Ain{constructor(n,o,e){this.delegate=n,this.engine=o,this._zone=e,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,o.onRemovalComplete=(i,r)=>{const s=null==r?void 0:r.parentNode(i);s&&r.removeChild(s,i)}}createRenderer(n,o){var e;const r=this.delegate.createRenderer(n,o);if(!n||null==o||null===(e=o.data)||void 0===e||!e.animation){const h=this._rendererCache;let b=h.get(r);return b||(b=new POe("",r,this.engine,()=>h.delete(r)),h.set(r,b)),b}const s=o.id,a=o.id+"-"+this._currentId;this._currentId++,this.engine.register(a,n);const c=h=>{Array.isArray(h)?h.forEach(c):this.engine.registerTrigger(s,a,n,h.name,h)};return o.data.animation.forEach(c),new Oin(this,a,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,o,e){if(n>=0&&n<this._microtaskId)return void this._zone.run(()=>o(e));const i=this._animationCallbacksBuffer;0==i.length&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{const[s,a]=r;s(a)}),this._animationCallbacksBuffer=[]})}),i.push([o,e])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}
/**
     * @license Angular v17.2.1
     * (c) 2010-2022 Google LLC. https://angular.io/
     * License: MIT
     */let Rin=(()=>{var t;class n extends AO{constructor(e,i,r){super(e,i,r,mt(XN,{optional:!0}))}ngOnDestroy(){this.flush()}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La),T(WD),T(SW))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})();const IOe=[{provide:SW,useFactory:function kin(){return new sOe}},{provide:AO,useClass:Rin},{provide:eF,useFactory:function Lin(t,n,o){return new Ain(t,n,o)},deps:[U3,AO,an]}],GW=[{provide:WD,useFactory:()=>new wOe},{provide:A9,useValue:"BrowserAnimations"},...IOe],MOe=[{provide:WD,useClass:yW},{provide:A9,useValue:"NoopAnimations"},...IOe];let Din=(()=>{var t;class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?MOe:GW}}}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:GW,imports:[JX]}),n})();const Bin=[Yi,kk,No,Gae];let OOe=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({imports:[Bin]}),n})();Wu(ff,[Xe,Ne,Dn,pn,Ga,Jh],[qe]);let Nin=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[oq],imports:[OOe,OOe]}),n})();var Cy=function(t){return t.Bar="bar",t.Seven="seven",t.Bell="bell",t.Clover="clover",t.Dice="dice",t.Cherry="cherry",t}(Cy||{}),C1=function(t){return t.Idle="idle",t.GameStarted="gameStarted",t.ClaimBonus="collectBonus",t}(C1||{});let EOe=(()=>{var t;class n extends qR{constructor(){super(...arguments),this.armatureName="slot"}createPixiApp(){this.pixiApp=this.pixiAppFactory.createApp({height:this.height,width:this.width,sharedTicker:!0,transparent:!0}),this.renderer.insertBefore(this.host.nativeElement,this.pixiApp.view,this.host.nativeElement.childNodes[0]),this.renderer.setStyle(this.pixiApp.view,"width","100%"),this.renderer.setStyle(this.pixiApp.view,"pointerEvents","none"),this.armature=this.createArmature(this.armatureName)}ngOnDestroy(){this.armature&&this.armature.dispose(),this.pixiApp&&this.pixiApp.destroy(),cancelAnimationFrame(this.animationLoadAnimFrame)}}return(t=n).\u0275fac=(()=>{let o;return function(i){return(o||(o=fo(t)))(i||t)}})(),t.\u0275cmp=pe({type:t,selectors:[["slot-machine"]],features:[Ht],decls:0,vars:0,template:function(e,i){},styles:["canvas[_ngcontent-%COMP%]{height:100%}"],changeDetection:0}),n})();const Fin=["slotMachine"],Uin=["wrapper"],Gin=["rewardsRows"],xOe=t=>({"reward-active":t});function Vin(t,n){if(1&t&&(B(0,"img",19),V(1,"transformUrl")),2&t){const o=_().index,e=_(2);l("ngClass",ne(4,xOe,e.currentState===e.slotmlotStates.ClaimBonus&&o===e.rewardIndex))("imgSrc",$(1,2,"assets/images/custom-mini-games/slotmlot/padwin.png"))}}const AOe=t=>({"animation-delay":t});function zin(t,n){if(1&t&&(p(0,"div",10,11),B(2,"img",12),V(3,"transformUrl"),U(4,Vin,2,6,"img",13),p(5,"div",14)(6,"div",15)(7,"span",16),H(8,"x 3"),m(),B(9,"img",17),V(10,"transformUrl"),m(),B(11,"currency-component",18),m()()),2&t){const o=n.$implicit,e=n.index,i=_(2);l("ngStyle",ne(10,AOe,300*e+500+"ms")),d(2),l("imgSrc",$(3,6,"custom-mini-games/slotmlot/padnormal.png")),d(2),l("ngIf",e===i.rewardIndex),d(5),l("imgSrc",$(10,8,"custom-mini-games/slotmlot/symbol_"+o.animation+".png")),d(2),l("currency",i.currencyType.Chips)("value",o.item.amount)}}function jin(t,n){if(1&t&&(B(0,"img",19),V(1,"transformUrl")),2&t){const o=_().index,e=_(2);l("ngClass",ne(4,xOe,e.currentState===e.slotmlotStates.ClaimBonus&&o+3===e.rewardIndex))("imgSrc",$(1,2,"custom-mini-games/slotmlot/padwin.png"))}}function Hin(t,n){if(1&t&&(p(0,"div",10),B(1,"img",12),V(2,"transformUrl"),U(3,jin,2,6,"img",13),p(4,"div",14)(5,"div",15)(6,"span",16),H(7,"3 x"),m(),B(8,"img",17),V(9,"transformUrl"),m(),B(10,"currency-component",18),m()()),2&t){const o=n.$implicit,e=n.index,i=_(2);l("ngStyle",ne(10,AOe,300*e+500+"ms")),d(),l("imgSrc",$(2,6,"custom-mini-games/slotmlot/padnormal.png")),d(2),l("ngIf",e+3===i.rewardIndex),d(5),l("imgSrc",$(9,8,"custom-mini-games/slotmlot/symbol_"+o.animation+".png")),d(2),l("currency",i.currencyType.Chips)("value",o.value.chips)}}function qin(t,n){if(1&t&&(p(0,"div",20),B(1,"currency-component",18),m()),2&t){const o=_(2);d(),l("currency",o.currencyType.Chips)("value",o.currentReward)}}function Win(t,n){if(1&t){const o=Ce();p(0,"div",1,2),Y("click",function(){return oe(o),re(_().onClick())}),p(2,"div",3)(3,"div",4),U(4,zin,12,12,"div",5),m(),B(5,"slot-machine",6,7),p(7,"div",8),U(8,Hin,11,12,"div",5),m(),U(9,qin,2,2,"div",9),m()()}if(2&t){const o=_();d(4),l("ngForOf",o.rewards.slice(0,3)),d(),l("width",1380)("height",1380),d(3),l("ngForOf",o.rewards.slice(3,6)),d(),l("ngIf",o.currentReward)}}let ROe=(()=>{var t;class n extends m$e{constructor(e,i,r,s,a){var c;super(e.nativeElement,s),c=this,this.elementRef=e,this.cdr=i,this.soundService=r,this.pixiLoader=s,this.rulerService=a,this.slotmlotStates=C1,this.rewardsAnimations=[Cy.Bar,Cy.Seven,Cy.Bell,Cy.Clover,Cy.Dice,Cy.Cherry],this.currencyType=ln,this.currentReward=0,this.timeouts=[],this.startGame=f(function*(){c.cdr.detectChanges();try{yield c.slotMachine.onAnimationLoad.toPromise(),c.rewardsRows.toArray().forEach(u=>{u.nativeElement.addEventListener("animationstart",c.startSwipeSound)}),c.rewardsRows.last.nativeElement.addEventListener("animationend",()=>{c.rewardsRows.toArray().forEach(u=>{u.nativeElement.removeEventListener("animationstart",c.startSwipeSound)})}),c.idleState(),c.setGameSize()}catch(u){console.warn(u)}}),this.startSwipeSound=()=>{this.soundService.play(dn.SlotmlotTableSwipe)},this.idleState=()=>{this.currentState=C1.Idle,this.animationState=this.slotMachine.playAnimation("idle",!1),this.idleSound=this.soundService.play(dn.SlotmlotIdle,{loop:!0,interruptable:!1}),this.cdr.detectChanges()},this.gameStartedState=()=>{this.animationState.stop(),this.currentState=C1.GameStarted,this.soundService.stop(this.idleSound),this.soundService.play(0===this.rewardIndex?dn.SlotmlotBigWin:dn.SlotmlotWin,{interruptable:!1}),this.animationState=this.slotMachine.playAnimation("".concat(this.rewards[this.rewardIndex].animation,"_win")),this.timeouts.push(setTimeout(()=>{this.claimBonus(),this.timeouts.push(setTimeout(f(function*(){c.startChangeValueAnimation(),c.timeouts.push(setTimeout(()=>{c.currentReward=0,c.cdr.detectChanges(),c.onCollectAnimationEnd()},5e3))}),1e3))},4500)),this.cdr.detectChanges()},this.claimBonus=()=>{this.currentState=C1.ClaimBonus,this.cdr.detectChanges(),this.claimEmitter.emit()},this.onCollectAnimationEnd=()=>{this.closeEmitter.emit()},this.assets={slotMachine:new c$e("custom-mini-games/slotmlot/slot")},this.cdr.detach()}ngOnInit(){this.resizeSubscription=this.rulerService.change().subscribe(()=>{this.setGameSize()}),this.createPayTable(),this.loaded?this.startGame():this.loaderSubscription=this.loadedEmitter.subscribe(this.startGame)}destroy(){super.destroy(),this.resizeSubscription&&this.resizeSubscription.unsubscribe(),this.loaderSubscription&&this.loaderSubscription.unsubscribe(),this.slotMachine&&(this.slotMachine.armature.display.removeDBEventListener("complete",this.idleState),this.slotMachine.armature.display.removeDBEventListener("complete",this.claimBonus)),this.timeouts&&this.timeouts.forEach(e=>clearTimeout(e))}onClick(){this.currentState===C1.Idle&&this.gameStartedState()}setGameSize(){if(!this.wrapper)return;const e=this.wrapper.nativeElement.offsetWidth,i=this.wrapper.nativeElement.offsetHeight,s=e/i>1.75;this.wrapper.nativeElement.style.fontSize=(s?i:e)/100*(s?1.75:1)+"px"}createPayTable(){const e=[...this.gameData.rewards].sort((i,r)=>i.chips<r.chips?1:-1);this.rewards=this.rewardsAnimations.map((i,r)=>({animation:i,value:e[r]})),this.rewardIndex=this.rewards.findIndex(i=>i.value.chips===this.gameData.reward.chips)}startChangeValueAnimation(){var e=this;return f(function*(){const i=e.rewards[e.rewardIndex].value.chips;return new Promise(r=>{if(0===i)return void r();let s={var:0};e.currentRewardAnimation=Zr.to(s,{duration:2,var:i,ease:mk.easeOut,onUpdate:()=>{e.currentReward=Math.floor(s.var),e.cdr.detectChanges()},onComplete:()=>{e.currentReward=Math.floor(s.var),e.cdr.detectChanges(),r()}})})})()}}return(t=n).\u0275fac=function(e){return new(e||t)(g($t),g(Re),g(Mo),g(j_),g(Ua))},t.\u0275cmp=pe({type:t,selectors:[["slotmlot"]],viewQuery:function(e,i){if(1&e&&($e(Fin,5),$e(Uin,5),$e(Gin,5)),2&e){let r;je(r=He())&&(i.slotMachine=r.first),je(r=He())&&(i.wrapper=r.first),je(r=He())&&(i.rewardsRows=r)}},features:[Ht],decls:1,vars:1,consts:[["class","slotmlot--wrapper",3,"click",4,"ngIf"],[1,"slotmlot--wrapper",3,"click"],["wrapper",""],[1,"dragonbons--slot--wrapper"],[1,"slotmlot--paytable_wrapper","paytable-left"],["class","slotmlot--paytable_reward-row",3,"ngStyle",4,"ngFor","ngForOf"],[1,"dragonbons--slot",3,"width","height"],["slotMachine",""],[1,"slotmlot--paytable_wrapper","paytable-right"],["class","slotmlot--reward_wrapper",4,"ngIf"],[1,"slotmlot--paytable_reward-row",3,"ngStyle"],["rewardsRows",""],["empty-placeholder","",1,"row-pad","row-pad_normal",3,"imgSrc"],["class","row-pad row-pad_win","empty-placeholder","",3,"ngClass","imgSrc",4,"ngIf"],[1,"slotmlot--paytable_reward-row_content"],[1,"slotmlot--paytable_row-icons"],[1,"slotmlot--paytable_row-info"],["empty-placeholder","",1,"slotmlot--paytable_row-icon",3,"imgSrc"],[1,"slotmlot--paytable_row-value",3,"currency","value"],["empty-placeholder","",1,"row-pad","row-pad_win",3,"ngClass","imgSrc"],[1,"slotmlot--reward_wrapper"]],template:function(e,i){1&e&&U(0,Win,10,5,"div",0),2&e&&l("ngIf",i.loaded)},dependencies:[Xe,Mt,Ne,Cm,So,$o,EOe,uo],styles:["[_nghost-%COMP%]{position:absolute;width:100%;height:100%}.slotmlot--wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;font-weight:700;color:#fff;background-color:rgba(0,0,0,.8)}.slotmlot--paytable_wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:column nowrap}.slotmlot--paytable_wrapper.paytable-left[_ngcontent-%COMP%]   .slotmlot--paytable_reward-row_content[_ngcontent-%COMP%]{flex-flow:row-reverse}.slotmlot--paytable_wrapper.paytable-left[_ngcontent-%COMP%]   .slotmlot--paytable_row-icons[_ngcontent-%COMP%]{flex-flow:row-reverse;margin:0 25% 0 0}.slotmlot--paytable_wrapper.paytable-right[_ngcontent-%COMP%]   .row-pad[_ngcontent-%COMP%]{transform:scaleX(-1)}.slotmlot--paytable_reward-row[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;margin:-5% 0;opacity:0}.row-pad[_ngcontent-%COMP%]{position:relative;height:10em;transition:opacity 1s}.row-pad_win[_ngcontent-%COMP%]{position:absolute;opacity:0}.row-pad_win.reward-active[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_reward-row-highlight 1s infinite}.slotmlot--paytable_reward-row_content[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;padding:5%;display:flex;justify-content:space-between;align-items:center}.slotmlot--paytable_row-icons[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 0 0 25%}.slotmlot--paytable_row-info[_ngcontent-%COMP%]{font-size:2em;margin:0 .5em;white-space:nowrap}.slotmlot--paytable_row-icon[_ngcontent-%COMP%]{flex:1;width:4em}.slotmlot--paytable_row-value[_ngcontent-%COMP%]{font-size:2.2em;margin:0 .5em}.dragonbons--slot--wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:45em;position:relative;font-size:1.2em;transform:translateY(-5%)}.slotmlot--paytable_wrapper[_ngcontent-%COMP%]{position:relative;margin-top:9em}.slotmlot--paytable_wrapper.paytable-left[_ngcontent-%COMP%]{margin-right:6.5em}.slotmlot--paytable_wrapper.paytable-left[_ngcontent-%COMP%]   .slotmlot--paytable_reward-row[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_translateLeft .5s;animation-timing-function:cubic-bezier(.555,.61,.1,1.305);animation-fill-mode:forwards;transform:translate(50%)}.slotmlot--paytable_wrapper.paytable-right[_ngcontent-%COMP%]{margin-left:6.5em}.slotmlot--paytable_wrapper.paytable-right[_ngcontent-%COMP%]   .slotmlot--paytable_reward-row[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_translateRight .5s;animation-timing-function:cubic-bezier(.555,.61,.1,1.305);animation-fill-mode:forwards;transform:translate(-50%)}.dragonbons--slot[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:42em;width:42em;z-index:1}.slotmlot--reward_wrapper[_ngcontent-%COMP%]{position:absolute;z-index:2;padding:1em;font-size:2em;background-color:rgba(0,0,0,.8);border-radius:.5em;animation-timing-function:ease-in-out;animation:_ngcontent-%COMP%_reward-value-show 5s;animation-fill-mode:forwards}@keyframes _ngcontent-%COMP%_reward-row-highlight{0%{opacity:0}50%{opacity:1}to{opacity:0}}@keyframes _ngcontent-%COMP%_translateLeft{0%{transform:translate(50%);opacity:0}30%{opacity:1}to{transform:translate(0);opacity:1}}@keyframes _ngcontent-%COMP%_translateRight{0%{transform:translate(-50%);opacity:0}30%{opacity:1}to{transform:translate(0);opacity:1}}@keyframes _ngcontent-%COMP%_reward-value-show{0%{opacity:0;transform:scale(0)}18%{transform:scale(1.05)}20%{opacity:1;transform:scale(1)}55%{transform:scale(1)}60%{transform:scale(1.1)}65%{transform:scale(1)}80%{opacity:1;transform:scale(1)}82%{transform:scale(1.05)}to{opacity:0;transform:scale(0)}}"]}),n})();const $in=[{type:Pte.Slotmlot,constructor:ROe}];let Qin=(()=>{var t;class n{constructor(e){this.document=e}getWrapperElement(){const e=this.document.createElement("div");return e.id="mini-game__wrapper",e.classList.add("mini-game--wrapper"),this.document.getElementById("appWrapper").appendChild(e),e}removeWrapperElement(){const e=this.document.getElementById("mini-game__wrapper");e&&e.parentElement.removeChild(e)}}return(t=n).\u0275fac=function(e){return new(e||t)(T(La))},t.\u0275prov=be({token:t,factory:t.\u0275fac}),n})(),Yin=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[Ia]}),n})(),Jin=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[Bh]}),n})(),Xin=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[bc]}),n})();const y1=ki({selectId:t=>t.clientTransactionId,sortComparer:!1}),kOe={activeTransactions:y1.getInitialState()},eon=Sr(kOe,de(dg,(t,n)=>Se(t,o=>{o.activeTransactions=y1.addOne(n.transaction,o.activeTransactions)})),de(vk,(t,n)=>Se(t,o=>{o.activeTransactions=y1.removeOne(n.clientTransactionId,o.activeTransactions)})),de(Xw,(t,n)=>Se(t,o=>{o.activeTransactions=y1.removeOne(n.clientTransactionId,o.activeTransactions)})),de(Xm,(t,n)=>Se(t,o=>{o.activeTransactions=y1.removeOne(n.clientTransactionId,o.activeTransactions)})),de(Sue,()=>kOe));function ton(t,n){return eon(t,n)}const LOe="paymentClient",ion=We(Ts(LOe),t=>t.activeTransactions),DOe=We(y1.getSelectors(ion).selectAll,t=>t);var yy;J.prototype.paymentsClient={selectActiveTransactions:function ron(){return this.selectSync(DOe)}.bind(J.prototype),subscribeActiveTransactions:function son(){return this.select(DOe)}.bind(J.prototype)};let RO=((yy=class{constructor(n){this.store=n}resetPaymentsClientState(){this.store.dispatch(Sue())}}).\u0275fac=function(n){return new(n||yy)(T(J))},yy.\u0275prov=be({token:yy,factory:yy.\u0275fac}),yy);Qe([Lr(),ue("design:type",Function),ue("design:paramtypes",[]),ue("design:returntype",void 0)],RO.prototype,"resetPaymentsClientState",null),RO=Qe([Wo(),ue("design:paramtypes",[J])],RO);let aon=(()=>{var t;class n{constructor(e){this.paymentsListenerService=e}}return(t=n).\u0275fac=function(e){return new(e||t)(T(RO))},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:[RO],imports:[uZe,$r.forFeature(LOe,ton)]}),n})();const con=[xi,No,xi],lon=[dI];let uon=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:lon,imports:[con]}),n})();const VW=ki({selectId:t=>t.id}),rB=ki({selectId:t=>t.id}),pon=Sr({stores:VW.getInitialState()},de(Yve,(t,n)=>Se(t,o=>{o.stores=VW.upsertOne({id:n.serviceId,onlineUsersState:{usersList:rB.getInitialState(),isLastPage:!1},filteredUsersState:{usersList:rB.getInitialState(),filters:void 0,isLastPage:!1}},t.stores)})),de(Jve,(t,n)=>t.stores.entities[n.serviceId]?Se(t,e=>{const i=n.filters?t.stores.entities[n.serviceId].filteredUsersState:t.stores.entities[n.serviceId].onlineUsersState;let r;r=n.filters&&!Op()(t.stores.entities[n.serviceId].filteredUsersState.filters,n.filters)?rB.setAll(n.users,i.usersList):rB.upsertMany(n.users,i.usersList);const s={usersList:r,isLastPage:n.isLastPage,filters:n.filters};n.filters?e.stores.entities[n.serviceId].filteredUsersState=s:e.stores.entities[n.serviceId].onlineUsersState=s}):t),de(Xve,(t,n)=>Se(t,o=>{o.stores=VW.removeOne(n.serviceId,t.stores)}))),BOe=Ts("social");J.prototype.social={selectUsers:function gon(t){return this.selectSync(We(BOe,(t,n)=>{const o=n.filters?t.stores.entities[n.serviceId].filteredUsersState:t.stores.entities[n.serviceId].onlineUsersState;if(n.filters&&!Op()(n.filters,o.filters))return{hits:[],misses:n.limit,hasMoreRecords:!0,isLastPage:o.isLastPage};const e=o.usersList.ids.slice(0,n.limit).map(i=>o.usersList.entities[i]);return{hits:e,misses:n.limit-e.length,hasMoreRecords:n.limit<=o.usersList.ids.length,isLastPage:o.isLastPage}}),t)}.bind(J.prototype),selectIsLastPage:function _on(t){return this.selectSync(We(BOe,(t,n)=>{const o=n.filters?t.stores.entities[n.serviceId].filteredUsersState:t.stores.entities[n.serviceId].onlineUsersState;return!(n.filters&&!Op()(n.filters,o.filters))&&o.isLastPage}),t)}.bind(J.prototype)};const von=[xi,Yi,Io,No,CO,Ls,_b.forFeature("social",function hon(t,n){return pon(t,n)})],bon=[ebe,BIe];let Con=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:bon,imports:[von]}),n})();function yon(t,n){if(1&t&&(p(0,"div",5),H(1),m()),2&t){const o=_();d(),ze("",o.note.record.message," ")}}function Son(t,n){if(1&t&&(p(0,"p",6),H(1),m()),2&t){const o=_();d(),se(o.timeText)}}const won=[[["","actions",""]]],Ton=["[actions]"];let zW=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["personal-note"]],hostAttrs:[1,"personal-note-host"],inputs:{timeText:"timeText",note:"note"},ngContentSelectors:Ton,decls:7,vars:2,consts:[[1,"personal-note--container"],[1,"personal-note--single-container"],[1,"personal-note-container--user-opts","personal-note--user-opts"],["class","personal-note--content-preview","data-cy","personalNoteText",4,"ngIf"],["class","personal-note-text--conv-time","data-cy","personalNoteConvTime",4,"ngIf"],["data-cy","personalNoteText",1,"personal-note--content-preview"],["data-cy","personalNoteConvTime",1,"personal-note-text--conv-time"]],template:function(e,i){1&e&&(Co(won),p(0,"div",0)(1,"div",1)(2,"div",2),U(3,yon,2,1,"div",3),p(4,"div"),yo(5),m()()()(),U(6,Son,2,1,"p",4)),2&e&&(d(3),l("ngIf",i.note.record.message),d(3),l("ngIf",i.timeText))},dependencies:[Ne],styles:["[_nghost-%COMP%]{display:block}.personal-note--container[_ngcontent-%COMP%]{display:flex;background-color:transparent}.personal-note--single-container[_ngcontent-%COMP%]{width:100%}.personal-note-container--user-opts[_ngcontent-%COMP%]{position:relative;display:flex;flex-flow:row nowrap;justify-content:space-between;gap:3rem}.personal-note-text--conv-time[_ngcontent-%COMP%]{bottom:.5rem;right:1rem;font-size:1rem;text-align:right;white-space:nowrap}.personal-note--content-preview[_ngcontent-%COMP%]{max-width:90%}.personal-note--user-opts[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();var jW=function(t){return t.featureKey="personalNotes",t}(jW||{});const lp=ki({selectId:t=>t.id}),Ef=ki({selectId:t=>t.record.id}),Ion=Sr({stores:lp.getInitialState()},de(e0e,(t,n)=>Se(t,o=>{const e={id:n.serviceId,notes:Ef.getInitialState(),error:void 0,isLoading:!1,isLoaded:!1};o.stores=lp.addOne(e,t.stores)})),de(s0e,(t,n)=>Se(t,o=>{o.stores=lp.removeOne(n.serviceId,t.stores)})),de(t0e,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId],i=>{i.isLoading=!0});o.stores=lp.updateOne({id:n.serviceId,changes:e},o.stores)}):t),de(b7,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId],i=>{i.isLoading=!1,i.isLoaded=!0,i.error=void 0,i.notes=Ef.upsertMany(n.notes,i.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:e},o.stores)}):t),de(n0e,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId],i=>{i.isLoading=!1,i.error=n.error});o.stores=lp.updateOne({id:n.serviceId,changes:e},o.stores)}):t),de(C7,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(n.note,r=>{r.actions.add.inProgress=!0}),i=Se(t.stores.entities[n.serviceId],r=>{r.notes=Ef.addOne(e,r.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:i},o.stores)}):t),de(y7,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId],i=>{i.notes=Ef.updateOne({id:n.firstAddedNoteId,changes:n.newNote},i.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:e},o.stores)}):t),de(uD,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId].notes.entities[n.noteId],r=>{r.actions.add.inProgress=!1,r.actions.add.error=n.error}),i=Se(t.stores.entities[n.serviceId],r=>{r.notes=Ef.updateOne({id:n.noteId,changes:e},r.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:i},o.stores)}):t),de(i0e,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId].notes.entities[n.noteId],r=>{r.actions.delete.inProgress=!0}),i=Se(t.stores.entities[n.serviceId],r=>{r.notes=Ef.updateOne({id:n.noteId,changes:e},r.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:i},o.stores)}):t),de(S7,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId],i=>{i.notes=Ef.removeOne(n.noteId,i.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:e},o.stores)}):t),de(o0e,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId].notes.entities[n.noteId],r=>{r.actions.delete.inProgress=!1,r.actions.delete.error=n.error}),i=Se(t.stores.entities[n.serviceId],r=>{r.notes=Ef.updateOne({id:n.noteId,changes:e},r.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:i},o.stores)}):t),de(r0e,(t,n)=>t.stores.entities[n.serviceId]?Se(t,o=>{const e=Se(t.stores.entities[n.serviceId].notes.entities[n.noteId],r=>{r.actions.add.inProgress=!0}),i=Se(t.stores.entities[n.serviceId],r=>{r.notes=Ef.updateOne({id:n.noteId,changes:e},r.notes)});o.stores=lp.updateOne({id:n.serviceId,changes:i},o.stores)}):t)),NOe=Ts(jW.featureKey),HW=()=>We(NOe,(t,n)=>t.stores.entities[n]),FOe=()=>We(We(HW(),t=>null==t?void 0:t.notes),t=>t?Ef.getSelectors().selectAll(t):[]),UOe=()=>We(NOe,(t,n)=>{var o;return null===(o=t.stores.entities[n.serviceId])||void 0===o?void 0:o.notes.entities[n.noteId]});J.prototype.personalNotesComponent={selectState:function Eon(t){return this.selectSync(HW(),t)}.bind(J.prototype),subscribeState:function xon(t){return this.select(HW(),t)}.bind(J.prototype),notes:{selectState:function Aon(t){return this.selectSync(FOe(),t)}.bind(J.prototype),subscribeState:function Ron(t){return this.select(FOe(),t)}.bind(J.prototype)},note:{selectState:function kon(t){return this.selectSync(UOe(),t)}.bind(J.prototype),subscribeState:function Lon(t){return this.select(UOe(),t)}.bind(J.prototype)}};const Don=[xi,No,$r.forFeature(jW.featureKey,function Mon(t,n){return Ion(t,n)}),n5t],Bon=[w7];let Non=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:Bon,imports:[Don]}),n})();Wu(dD,function(){return[Mt,Ne,bo,ei,Oi,Is,KL,zW]},function(){return[BT,qe,Bm,uo]});var qW=function(t){return t.featureKey="giftableItemsClient",t}(qW||{});const GOe={[Fe.TG.ChipPack]:0,[Fe.TG.GemsPack]:1,[Fe.TG.Vip]:2,[Fe.TG.XpPack]:3,[Fe.TG.Frame]:4,[Fe.TG.Deck]:5,[Fe.TG.Table]:6},VOe={[ln.Gems]:0,[ln.Chips]:1},WW=ki({selectId:t=>t.item.id,sortComparer:(t,n)=>{const o=GOe[t.item.type],e=GOe[n.item.type];if(o===e&&t.prices&&n.prices){const i=Object.keys(t.prices)[0];if(!n.prices[i]){const r=Object.keys(n.prices)[0];return VOe[i]-VOe[r]}return t.prices[i]-n.prices[i]}return o-e}}),zOe={loadingState:{isLoaded:!1,isLoading:!1,error:void 0},giftableProducts:WW.getInitialState()},Fon=Sr(zOe,de(GSe,t=>zOe),de(IH,(t,n)=>Se(t,o=>{o.giftableProducts=WW.setAll(n.items,o.giftableProducts)})),de(VSe,t=>Se(t,n=>{n.loadingState.isLoading=!0})),de(zSe,t=>Se(t,n=>{n.loadingState.isLoaded=!0,n.loadingState.isLoading=!1,n.loadingState.error=void 0})),de(jSe,(t,n)=>Se(t,o=>{o.loadingState.isLoading=!1,o.loadingState.error=n}))),$W=Ts(qW.featureKey),jOe=We($W,t=>WW.getSelectors().selectAll(t.giftableProducts));J.prototype.giftableItemsClient={selectState:function Gon(){return this.selectSync($W)}.bind(J.prototype),subscribeState:function Von(){return this.select($W)}.bind(J.prototype),selectGiftableProducts:function zon(){return this.selectSync(jOe)}.bind(J.prototype),subscribeGiftableProducts:function jon(){return this.select(jOe)}.bind(J.prototype)};const Hon=[No,xi,Yi,Io,Ls,J0,IDt,$r.forFeature(qW.featureKey,function Uon(t,n){return Fon(t,n)})],qon=[Q0];let Won=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Xt({providers:qon,imports:[Hon]}),n})();function $on(t,n){if(1&t){const o=Ce();p(0,"image-slider",2),Y("close",function(){return oe(o),re(_().close())}),m()}if(2&t){const o=_();l("images",o.state.data.images)("initial",o.state.data.initial)}}function Kon(t,n){if(1&t&&(p(0,"div",3),Un(1,4),m()),2&t){const o=_();d(),l("ngTemplateOutlet",o.imageSlider.templateRef)}}let Zon=(()=>{var t;class n extends Dh{constructor(e,i,r){super(),this.store=e,this.service=i,this.cdr=r}ngOnInit(){super.ngOnInit(),this.stateSubscription=this.store.subscribeImageSliderContainer().subscribe(e=>{(!this.state||this.state.isOpened!==e.isOpened)&&this.setFocusable(e.isOpened),this.state=e,this.cdr.detectChanges()}),this.templateSubscription=this.service.imageSliderTemplate$.subscribe(e=>{var i,r;null===(i=this.templateCloseSubscription)||void 0===i||i.unsubscribe(),null===(r=this.onTemplateDestroy)||void 0===r||r.detach(),this.imageSlider=e,this.templateCloseSubscription=null==e?void 0:e.cmp.close.subscribe(()=>this.close()),this.onTemplateDestroy=null==e?void 0:e.onDestroy(()=>this.close()),this.cdr.detectChanges()}),this.cdr.detectChanges()}close(){this.service.close()}ngOnDestroy(){var e,i,r,s;super.ngOnDestroy(),null===(e=this.stateSubscription)||void 0===e||e.unsubscribe(),null===(i=this.templateCloseSubscription)||void 0===i||i.unsubscribe(),null===(r=this.onTemplateDestroy)||void 0===r||r.detach(),null===(s=this.templateSubscription)||void 0===s||s.unsubscribe()}}return(t=n).\u0275fac=function(e){return new(e||t)(g(J),g(wM),g(Re))},t.\u0275cmp=pe({type:t,selectors:[["image-slider-container"]],features:[Ht],decls:2,vars:2,consts:[["class","image-slider-container__slider",3,"images","initial","close",4,"ngIf"],["class","image-slider-container__slider",4,"ngIf"],[1,"image-slider-container__slider",3,"images","initial","close"],[1,"image-slider-container__slider"],[3,"ngTemplateOutlet"]],template:function(e,i){1&e&&U(0,$on,1,2,"image-slider",0)(1,Kon,2,1,"div",1),2&e&&(l("ngIf",i.state.isOpened),d(),l("ngIf",i.imageSlider))},dependencies:[Ne,qr,SM],styles:[".image-slider-container__slider[_ngcontent-%COMP%]{position:fixed;top:0;left:0;z-index:10000;width:100%;height:100%}"],changeDetection:0}),n})(),Qon=(()=>{var t;class n{constructor(e,i){this.rootContainerService=e,this.viewContainerRef=i}ngOnInit(){this.rootContainerService.currentContextRootContainer=this.viewContainerRef}ngOnDestroy(){this.rootContainerService.currentContextRootContainer=void 0}}return(t=n).\u0275fac=function(e){return new(e||t)(g(Ia),g(bs))},t.\u0275dir=qn({type:t,selectors:[["","root-container",""]]}),n})();const Jon=[JX,Kte,RJt,Ls.forRoot(sXt,{useHash:!0}),v6e.forRoot({loader:{provide:uP,useFactory:function Yon(t,n,o){return new Men(t,n,o.translationsPath)},deps:[YS,p0,tn]}}),No,Pfe,aSt,tae.forRoot({engageSettingsService:jme}),JWe.forRoot(jS.analyticsTrackingEventsConfig),UR.forRoot(),LTt,NQt,Con,mH,den,Jit,Ien,otn,uot,Eve.forRoot(),$r.forRoot({},{runtimeChecks:{strictStateImmutability:!0,strictActionImmutability:!0,strictActionTypeUniqueness:!0}}),J0,goe,bu,Lue,utn,Unt,$it,ftn,ece,Dtn,jXe,_7,kk,Wtn,kb,Lb,ETe,Din,Nin,o$e,Yin,Jin,Xin,aon,_$t,KJt,uon,rXt,tat,LQt,aDt,SAt,jIe,tMe,Non,XIe,Won,xTe,j5t],Xon=[{provide:mx,useFactory:function hXt(t){return()=>t.resolve()},deps:[mMe,Sme],multi:!0},{provide:Nx,useClass:Btn,multi:!0},HXt,ro,j6,Cn,Dt,u5,{provide:ZG,useClass:_tn},{provide:z6,useClass:atn},kve,DMe,Zn,Tg,Wae,Kae,z_e,q_e,{provide:nc,useExisting:Aen},xj,sb,W8,KI,gme,G8,Lj,Q8,o1e,Wfe,Nve,Um,pI,Rme,YI,nve,dme,ume,pme,mme,af,cme,lme,hme,Jb,mMe,_Me,bg,g0,rbe,XH,pMe,G_e,QI,yme,Cme,W6,cf,wme,Mme,Ome,Pme,Zde,RH,v8,Ma,Eme,Kde,cc,$d,nd,Ame,X6,GR,l5,{provide:Cse,useExisting:hf},{provide:tn,useClass:rl},{provide:Xf,useExisting:LD},{provide:yse,useExisting:Ntn},fme,JA,iM,og,C0,S0,{provide:j_,deps:[tn],useFactory:t=>new PixiClient.loaders.Loader("".concat(t.imagesPath))},{provide:ii,useExisting:Qm},{provide:Fae,useValue:$in},{provide:r5,useClass:Qin},Tme,JC];let ern=(()=>{var t;class n{}return(t=n).\u0275fac=function(e){return new(e||t)},t.\u0275mod=en({type:t,bootstrap:[cW]}),t.\u0275inj=Xt({providers:Xon,imports:[Jon]}),n})();Wu(cW,function(){return[Xe,Ne,Ip,mz,Nm,e5,K6,Zon,f7,Qon,NMe,hMe,vMe,OMe,SMe,xMe,LMe]},[]);const HOe=t=>{Lt.fetchManifest({apiUrl:t.detail.config.apiUrl,apiVersion:t.detail.config.apiVersion,socketServer:t.detail.config.socketServer,configEndpoint:"".concat("config","?gridVersion=").concat(Zme[t.detail.config.game])}).then(function(){var n=f(function*(o){const e=new tG;if(!1===e.localStorageSupported())e.handleLocalStorageSupportError();else if(!1===e.websocketSupported())e.handleWebSocketSupportError();else try{yield Th.loadScript("libs/pixi/pixi.min.js"),yield Th.loadScript("libs/dragonbones-out/dragonbones.js"),yield Qt.getInstance.init(),yield HUe().bootstrapModule(ern,{ngZoneEventCoalescing:!1})}catch(i){console.error(i),ll.loadResourcesFail()}});return function(o){return n.apply(this,arguments)}}()).catch(n=>{console.log(n),ll.loadResourcesFail()}),window.removeEventListener("scriptsState",HOe)};window.addEventListener("scriptsState",HOe)})()})();
//# sourceMappingURL=main.ca6dbfffee619ffd.bundle.js.map