1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e38a511d-ac3a-5a2e-bee0-320e84e02a48")}catch(e){}}(); 3import{a as pn}from"./chunk-PVX3FMMW.js";import{a as cn}from"./chunk-RKGOUZWK.js";import{a as mn}from"./chunk-K6H755EE.js";import{a as fn}from"./chunk-TOCMZZTV.js";import{a as dn}from"./chunk-QTCCPTZ6.js";import{a as _n}from"./chunk-V2NA3UTW.js";import{a as ve}from"./chunk-WBXHHTGW.js";import{a as on,i as nn,j as rn,m as an,o as sn,s as ln}from"./chunk-KH2OPDW7.js";import{a as so}from"./chunk-EEFKQ6Y2.js";import{a as ao}from"./chunk-ZPM45NLY.js";import{g as lo,i as fo,j as mo,k as co,l as po}from"./chunk-SBQO6PTH.js";import"./chunk-IRRZF7VX.js";import{b as _o}from"./chunk-HM63XTKN.js";import{a as So}from"./chunk-4X3QUOCT.js";import"./chunk-5XJ2A37Y.js";import{a as _t}from"./chunk-NVM76FME.js";import{a as Ji}from"./chunk-X53L5IGM.js";import{a as ji}from"./chunk-DR6N6DM2.js";import{a as Ae}from"./chunk-DULFLUKU.js";import{a as ro}from"./chunk-VAESOVPR.js";import{a as no}from"./chunk-TIRS2AQU.js";import"./chunk-M5V23R72.js";import{a as io}from"./chunk-76QVAMLB.js";import{b as oo}from"./chunk-CB2T6HA6.js";import{a as h}from"./chunk-SCKKPWGD.js";import"./chunk-7SCCCBYQ.js";import{a as Dt}from"./chunk-LC4GL6BY.js";import{c as eo,e as to}from"./chunk-2ICD3D72.js";import"./chunk-I44XM4VS.js";import{j as Wi,l as qi}from"./chunk-JUY5NYFX.js";import"./chunk-SO3LBWBU.js";import{a as Ki}from"./chunk-QH5HQCXU.js";import"./chunk-FGOKLG34.js";import{i as Zi}from"./chunk-UHMKYJG2.js";import{A as ko,B as Uo,C as Vo,D as zo,E as Yo,F as Xo,H as Qo,I as jo,J as Ko,K as Wo,M as qo,N as Zo,R as Jo,S as en,T as Te,b as uo,c as Eo,d as Co,e as go,f as ho,g as Oo,h as Ao,i as To,j as Do,k as Ro,l as Mo,m as Fo,n as bo,o as yo,p as xo,q as Io,r as No,s as Lo,t as vo,u as Go,v as Po,w as Bo,x as wo,y as Ho,z as $o}from"./chunk-44NGRC4M.js";import{j as Rt,q as tn}from"./chunk-H3X33PHS.js";import{a as zi}from"./chunk-XPHCNJIZ.js";import{d as wi}from"./chunk-DT7ECMIS.js";import"./chunk-SFPRU7VJ.js";import{c as Mi,d as Fi,e as bi}from"./chunk-NCFVXXCT.js";import{w as Ri}from"./chunk-V6MPAE46.js";import{a as Hi,b as Tt,c as $i}from"./chunk-LNJURUA7.js";import{e as it,j as ot}from"./chunk-WBWFC5I2.js";import{f as vi}from"./chunk-ZXOXIVDX.js";import{a as Li}from"./chunk-JARYQ55D.js";import"./chunk-SVCKQJI6.js";import"./chunk-WSR2LQXJ.js";import"./chunk-WCIZTYXA.js";import{c as F}from"./chunk-7W4XMHUP.js";import{a as Ot}from"./chunk-IFE2GPQA.js";import{e as be,h as nt}from"./chunk-DB2EWK5V.js";import{b as Gi}from"./chunk-KZCV2X3U.js";import"./chunk-N5I6IL56.js";import"./chunk-5PGIH6PG.js";import{a as Qi}from"./chunk-A5MRUSUO.js";import{a as Yi}from"./chunk-DGBMBKOA.js";import"./chunk-PKFQHFDT.js";import{c as Pi}from"./chunk-OE5HBOUP.js";import"./chunk-4HIOK7IU.js";import{b as ki}from"./chunk-RUXLPNST.js";import"./chunk-SOH3N7R2.js";import{a as ee}from"./chunk-UTIYQGSG.js";import"./chunk-SEYW75FS.js";import{a as st,b as lt}from"./chunk-URCHDJUK.js";import{a as at}from"./chunk-XD6BBOOK.js";import{b as rt}from"./chunk-V7KFNQFG.js";import{a as H}from"./chunk-L6V3QX4D.js";import{a as Ct}from"./chunk-UCWNRO56.js";import"./chunk-IPHVRA3S.js";import"./chunk-PXSA72QB.js";import"./chunk-MC32HPIJ.js";import{a as Ui,c as Vi}from"./chunk-WFSHCAYZ.js";import"./chunk-LM6YNNWJ.js";import{a as Xi,b as Y}from"./chunk-PGDKNYNP.js";import"./chunk-K43FAQHA.js";import"./chunk-FLXVTRWX.js";import"./chunk-SAVWZB3V.js";import{a as w}from"./chunk-MJQPGXQA.js";import{c as $}from"./chunk-UP7JJ5CQ.js";import{e as xi}from"./chunk-5OIQMPTD.js";import{a as ht}from"./chunk-WK7JGA4O.js";import"./chunk-LQ4VKUEJ.js";import"./chunk-BEUPFSZF.js";import{c as Se}from"./chunk-WYHHUQGQ.js";import{a as L}from"./chunk-ASX35LZ3.js";import"./chunk-5CMGDIGY.js";import{d as et,e as k,f as q,j as Oe,l as se,o as Ni,r as Z,s as J,w as le,y as tt,z as U}from"./chunk-3I3QRXE3.js";import"./chunk-KP4ZWBAU.js";import{i as Je}from"./chunk-LENXEETP.js";import{b as yi}from"./chunk-QYZK7QCM.js";import{a as Ze}from"./chunk-IB7PDLZR.js";import"./chunk-VCEBYPVT.js";import"./chunk-RUVMA635.js";import"./chunk-QY63XGLG.js";import"./chunk-JP3J2EIG.js";import{c as Di}from"./chunk-B4OJV77W.js";import"./chunk-TJLDHIGF.js";import"./chunk-TUAUSIH7.js";import{a as At}from"./chunk-H5VGPPNX.js";import{T as hi}from"./chunk-IJME5RCK.js";import"./chunk-VVHXKJVC.js";import"./chunk-53LEKQ6W.js";import"./chunk-TBDJQ7TF.js";import"./chunk-GHFNDSJY.js";import"./chunk-EIJYTSSU.js";import{f as Ii}from"./chunk-YSIK6MXW.js";import"./chunk-JSFO5J2A.js";import{c as Bi}from"./chunk-W46QXR7J.js";import"./chunk-7JZBFRBC.js";import{m as ui,n as Ei}from"./chunk-VEE7FFD6.js";import{b as Si}from"./chunk-Y3BOGZA4.js";import"./chunk-R6OQSG5T.js";import"./chunk-RFGDW4TP.js";import"./chunk-HW4GJV3L.js";import"./chunk-E4PRIN5E.js";import"./chunk-VYMYI5JX.js";import"./chunk-XSGLK73N.js";import"./chunk-2FDBDQC5.js";import"./chunk-QRUNXDIJ.js";import{a as Oi}from"./chunk-UBZAA23F.js";import"./chunk-IKI4AKGO.js";import"./chunk-AYDJY52V.js";import"./chunk-J62MJSSO.js";import{a as b}from"./chunk-J77BE44H.js";import"./chunk-QZXYJUOV.js";import"./chunk-EDGYPARL.js";import{D as Ai,E as Ti,m as he,n as ie}from"./chunk-HHMEJT5Q.js";import"./chunk-G3UAL5O7.js";import{a as ge,c as Ci}from"./chunk-RE4Z5UYO.js";import{D as fi,J as qe,N as mi,O as ci,W as pi,da as gi}from"./chunk-UHERDYYU.js";import{B as li,D as _i,F as ae,m as We,v as Le}from"./chunk-AI7XZROF.js";import{b as gt}from"./chunk-QYBPOF7X.js";import"./chunk-ZRIFOCYK.js";import{a as di}from"./chunk-U4TDMDM3.js";import{$c as ei,Aa as M,Ac as E,Bc as xe,Bd as ri,Cb as jt,Cc as Ee,Cd as ai,Db as s,Dc as qt,Ec as mt,Fc as ct,Ha as p,Hc as Zt,I as ft,Ia as S,Ic as Jt,Id as T,Ja as Xt,Jd as D,Kc as A,Kd as Et,L as Ut,Na as ze,Pa as I,Qc as Qe,Rc as je,Sc as R,Ta as me,Tc as pt,Uc as ce,Ud as P,V as Vt,Vb as g,Vc as pe,Wc as St,Xc as u,Y as zt,Ya as re,Yb as Q,Z as Yt,Za as Qt,Zd as Ne,_b as Kt,_c as _,_d as B,ad as ti,cd as ii,ce as Ke,dd as oi,ed as ni,f as Ue,he as si,id as Me,ka as Ve,kd as Ie,ma as fe,nd as O,oc as ye,od as N,p as z,pd as v,qc as m,qd as ut,rc as Wt,rd as He,sc as c,sd as $e,tc as Ye,td as ke,uc as Xe,ud as Ce,v as Re,vc as j,vd as Fe,wc as K,wd as W,xc as f,yc as a,zc as l}from"./chunk-P7PFFTQP.js";import{a as V,b as we}from"./chunk-CHCY4HII.js";function Mn(o,n){if(o&1&&(a(0,"div",2)(1,"div",3),E(2,"eld-icon",4),a(3,"span"),O(4),l()()()),o&2){let r=n.$implicit;s(2),f("name",r.icon),s(2),N(r.label);}}var Mt=(()=>{let n=class n{constructor(){this.placeholder=B.required(),this.offersStatusCount=B.required(),this.offerState=B.required(),this.canShowBulkActions=B(!1),this.isAutomatedDeliveryFilterActive=B(!1),this.resumeAllOffers=Ne(),this.pauseAllOffers=Ne(),this.deleteAllOffers=Ne(),this.changeDeliveryTime=Ne(),this.changePrice=Ne(),this.options=P(()=>this.buildBulkActionOptions(this.offersStatusCount(),this.canShowBulkActions(),this.offerState(),this.isAutomatedDeliveryFilterActive()));}buildBulkActionOptions(e,t,i,d){let C=[];return t&&i===h.Paused&&e.pausedOffers&&C.push({label:"Resume",icon:"chevron-right",value:"resume"}),t&&i===h.Active&&e.activeOffers&&C.push({label:"Pause",icon:"pause",value:"pause"}),t&&!d&&C.push({label:"Delivery time",icon:"clock",value:"deliveryTime"}),t&&C.push({label:"Change price",icon:"dollar",value:"changePrice"}),(!i&&(e.activeOffers||e.pausedOffers||e.closedOffers)||e.activeOffers&&i===h.Active||e.pausedOffers&&i===h.Paused||e.closedOffers&&i===h.Closed)&&C.push({label:"Delete",icon:"delete",value:"delete"}),C;}onOptionSelected(e){if(this.dropdown?.blur(),!!e){switch(e.value){case"resume":this.resumeAllOffers.emit();break;case"pause":this.pauseAllOffers.emit();break;case"deliveryTime":this.changeDeliveryTime.emit();break;case"changePrice":this.changePrice.emit();break;case"delete":this.deleteAllOffers.emit();break;}this.dropdown?.clearAll();}}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-action-dropdown"]],viewQuery:function(t,i){if(t&1&&ii(Y,5),t&2){let d;oi(d=ni())&&(i.dropdown=d.first);}},inputs:{placeholder:[1,"placeholder"],offersStatusCount:[1,"offersStatusCount"],offerState:[1,"offerState"],canShowBulkActions:[1,"canShowBulkActions"],isAutomatedDeliveryFilterActive:[1,"isAutomatedDeliveryFilterActive"]},outputs:{resumeAllOffers:"resumeAllOffers",pauseAllOffers:"pauseAllOffers",deleteAllOffers:"deleteAllOffers",changeDeliveryTime:"changeDeliveryTime",changePrice:"changePrice"},decls:2,vars:4,consts:[[3,"selectionChange","clearable","options","placeholder","searchable"],["eldDropdownTemplate","listItem"],[1,"flex","min-h-10","items-center","px-4","py-2.5"],[1,"flex","flex-1","items-center","gap-2","text-base"],[3,"name"]],template:function(t,i){t&1&&(a(0,"eld-dropdown",0),u("selectionChange",function(C){return i.onOptionSelected(C);}),Kt(1,Mn,5,2,"ng-template",1),l()),t&2&&f("clearable",!1)("options",i.options())("placeholder",i.placeholder())("searchable",!1);},dependencies:[Y,Xi,Je],encapsulation:2,changeDetection:0});let o=n;return o;})();
3var oe=function(o){return o.GameId="gameId",o.Environment="environment",o;}(oe||{});function bn(o,n){if(o&1){let r=A();a(0,"eld-dropdown",2),T(1,"async"),u("selectionChange",function(t){p(r);let i=_(2);return S(i.selectionChanged(t));}),l();}if(o&2){let r=_(2);f("bindLabel",r.bindLabel)("clearable",!1)("formControlName",r.controlName)("notFoundText",r.notFoundText)("options",r.sortedSelectionValues)("placeholder",r.placeholder)("searchable",D(1,7,r.isSelectSearchable$)??!1);}}function yn(o,n){if(o&1&&(a(0,"div",0),m(1,bn,2,9,"eld-dropdown",1),l()),o&2){let r=_();f("formGroup",r.augmentedGameForm),s(),c(r.sortedSelectionValues?1:-1);}}var Sn=(()=>{let n=class n{constructor(){this.showDefaultAllValue=!1,this.itemSelect=new I(),this.isSelectSearchable$=z(!1),this.destroyRef=M(ze),this.breakpointObserver=M(ht);}set selectionValues(e){this.sortedSelectionValues=Ae.sortSelectionValues(e);}ngOnInit(){this.addControlToAugmentedGameForm(),this.initBreakpointObserver();}ngOnChanges(e){e.selectionValues&&e.selectionValues.currentValue&&this.showDefaultAllValue&&(this.sortedSelectionValues=[{name:Dt,value:Dt,attributeValueId:-1,attributeId:e.selectionValues.currentValue[0].attributeId},...this.sortedSelectionValues],e.selectionValues.currentValue[0].id&&(this.sortedSelectionValues[0].id=nt(e.selectionValues.currentValue[0].id)));}selectionChanged(e){this.itemSelect.emit({item:e,collection:this.sortedSelectionValues});}addControlToAugmentedGameForm(){this.augmentedGameForm&&this.controlName&&this.augmentedGameForm.addControl(this.controlName,new Oe(this.initialValue??null));}initBreakpointObserver(){this.isSelectSearchable$=this.breakpointObserver.observe([`(min-width: ${Ze.SM}px)`]).pipe(Ve({matches:!1}),Re(e=>e.matches),ge(this.destroyRef));}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-augmented-game-picker-select-container"]],inputs:{augmentedGameForm:"augmentedGameForm",controlName:"controlName",bindLabel:"bindLabel",initialValue:"initialValue",selectionValues:"selectionValues",notFoundText:"notFoundText",placeholder:"placeholder",showDefaultAllValue:"showDefaultAllValue"},outputs:{itemSelect:"itemSelect"},features:[re],decls:1,vars:1,consts:[[1,"select-container",3,"formGroup"],[3,"bindLabel","clearable","formControlName","notFoundText","options","placeholder","searchable"],[3,"selectionChange","bindLabel","clearable","formControlName","notFoundText","options","placeholder","searchable"]],template:function(t,i){t&1&&m(0,yn,2,2,"div",0),t&2&&c(i.augmentedGameForm?0:-1);},dependencies:[ae,U,k,q,J,Z,Y,Le],encapsulation:2,changeDetection:0});let o=n;return o;})();function xn(o,n){if(o&1){let r=A();a(0,"div",2)(1,"span",3),O(2),l(),a(3,"eld-dashboard-augmented-game-picker-select-container",4),u("itemSelect",function(t){p(r);let i=_(2);return S(i.selectionChanged(t));}),pt(4,1),l()();}if(o&2){let r=_().$implicit,e=_();s(2),v("",r.childTradeEnvironments[0].name,":"),s(),ce(r.childTradeEnvironments[0].name)(r.childTradeEnvironments[0].name),pe(4),f("augmentedGameForm",e.augmentedGameForm)("bindLabel","value")("controlName",e.gameId+"_"+r.id)("initialValue",e.getDefaultValue(r.childTradeEnvironments))("selectionValues",r.childTradeEnvironments)("showDefaultAllValue",e.showDefaultAllValue);}}function In(o,n){if(o&1&&m(0,xn,5,9,"div",2),o&2){let r=n.$implicit;c(r&&r.childTradeEnvironments?0:-1);}}var un=(()=>{let n=class n{constructor(){this.showHeadersAndFooters=!1,this.showDefaultAllValue=!1,this.environmentValues=new I(),this.controlName=oe,this.options=[];}set initialEnvValues(e){e&&(this.options=e);}selectionChanged(e){e&&e.item?(this.options=this.formOptions(e.item.id),this.environmentValues.emit(this.options)):this.itemClear(e.collection);}itemClear(e){let t=nt(e[0].id);this.options=this.formOptions(t),this.environmentValues.emit(this.options);}getDefaultValue(e){return e.find(t=>this.options.find(i=>i.id===t.id));}formOptions(e){return be(e,this.tradeEnvironments);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-augmented-game-picker-environment-section"]],inputs:{gameId:"gameId",tradeEnvironments:"tradeEnvironments",augmentedGameForm:"augmentedGameForm",initialEnvValues:"initialEnvValues",showHeadersAndFooters:"showHeadersAndFooters",showDefaultAllValue:"showDefaultAllValue"},outputs:{environmentValues:"environmentValues"},decls:7,vars:9,consts:()=>{let e;e="No "+"\uFFFD0\uFFFD"+" Found";let t;t="Select "+"\uFFFD0\uFFFD"+"";let i;i="No "+"\uFFFD0\uFFFD"+" Found";let d;return d="Select "+"\uFFFD0\uFFFD"+"",[["notFoundText",e,"placeholder",t],["notFoundText",i,"placeholder",d],[1,"find-item-group"],[1,"picker-select-label"],[3,"itemSelect","augmentedGameForm","bindLabel","controlName","initialValue","selectionValues","showDefaultAllValue",6,"notFoundText","placeholder"]];},template:function(t,i){t&1&&(a(0,"div",2)(1,"span",3),O(2),l(),a(3,"eld-dashboard-augmented-game-picker-select-container",4),u("itemSelect",function(C){return i.selectionChanged(C);}),pt(4,0),l()(),j(5,In,1,1,null,null,Xe)),t&2&&(s(2),v("",i.tradeEnvironments[0].name,":"),s(),ce(i.tradeEnvironments[0].name)(i.tradeEnvironments[0].name),pe(4),f("augmentedGameForm",i.augmentedGameForm)("bindLabel","value")("controlName",i.controlName.Environment)("initialValue",i.getDefaultValue(i.tradeEnvironments))("selectionValues",i.tradeEnvironments)("showDefaultAllValue",i.showDefaultAllValue),s(2),K(i.options));},dependencies:[Sn],styles:[".inline-layout[_nghost-%COMP%] .picker-select-label[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] .picker-select-label[_ngcontent-%COMP%], .inline-layout[_nghost-%COMP%] eld-dashboard-aug-item-picker-section-header[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] eld-dashboard-aug-item-picker-section-header[_ngcontent-%COMP%], .inline-layout[_nghost-%COMP%] eld-admin-aug-item-picker-section-header[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] eld-admin-aug-item-picker-section-header[_ngcontent-%COMP%]{display:none}.inline-layout[_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%]{flex-basis:100%;margin-right:10px;margin-bottom:10px}.inline-layout[_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-dashboard-augmented-game-picker-select-container[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-dashboard-augmented-game-picker-select-container[_ngcontent-%COMP%], .inline-layout[_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-admin-aug-item-picker-select-container[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-admin-aug-item-picker-select-container[_ngcontent-%COMP%]{display:inline-block;width:100%}@media(min-width:601px){.inline-layout[_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%]{flex-basis:auto}.inline-layout[_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-dashboard-augmented-game-picker-select-container[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-dashboard-augmented-game-picker-select-container[_ngcontent-%COMP%], .inline-layout[_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-admin-aug-item-picker-select-container[_ngcontent-%COMP%], .inline-layout [_nghost-%COMP%] .find-item-group[_ngcontent-%COMP%] > eld-admin-aug-item-picker-select-container[_ngcontent-%COMP%]{width:160px}}.find-item-group[_ngcontent-%COMP%]{display:flex;flex-basis:100%;align-items:flex-start}.find-item-group[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{margin-bottom:6px;color:var(--text-primary)}.find-item-group[_ngcontent-%COMP%] > eld-augmented-game-picker-sell-page-select-container[_ngcontent-%COMP%]{width:100%;max-width:640px}.find-item-group[_ngcontent-%COMP%]{margin-right:0!important}@media(min-width:601px){.find-item-group[_ngcontent-%COMP%]{margin-right:10px!important}}"],changeDetection:0});let o=n;return o;})();var Nn=(o,n)=>n.id;function Ln(o,n){if(o&1){let r=A();a(0,"eld-attribute-dropdown-filter",1),u("attributeChange",function(t){p(r);let i=_();return S(i.updateAttribute(t));}),l();}if(o&2){let r=n.$implicit;f("attribute",r);}}var En=(()=>{let n=class n{constructor(){this.attributes=Ke.required(),this.category=B.required(),this.sortedAttributes=P(()=>{let e=this.attributes();return this.category()!==b.TopUp?e:e.map(t=>t.type==="Select"?we(V({},t),{values:Ae.sortSelectionValues(t.values)}):t);});}updateAttribute(e){this.attributes.update(t=>{let i=t.findIndex(C=>C.id===e.id),d=[...t];return d[i]=e,d;});}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-game-attributes-picker"]],inputs:{attributes:[1,"attributes"],category:[1,"category"]},outputs:{attributes:"attributesChange"},decls:2,vars:0,consts:[[1,"mb-2.5","w-full","sm:mr-2.5","sm:w-auto","md:w-4
30",3,"attribute"],[1,"mb-2.5","w-full","sm:mr-2.5","sm:w-auto","md:w-40",3,"attributeChange","attribute"]],template:function(t,i){t&1&&j(0,Ln,1,1,"eld-attribute-dropdown-filter",0,Nn),t&2&&K(i.sortedAttributes());},dependencies:[tt,lo],encapsulation:2,changeDetection:0});let o=n;return o;})();function vn(o,n){if(o&1&&(a(0,"form",1),E(1,"eld-dropdown",2),l()),o&2){let r=_();f("formGroup",r.augmentedGameForm),s(),f("clearable",!0)("formControlName",r.controlName.GameId)("options",r.gamesCategories)("optionsListWidth",r.optionsListWidth())("searchFn",r.doesGameCategoryContainSynonym)("trackByFn",r.trackByGameCategory)("virtualScrolling",!0);}}function Gn(o,n){if(o&1){let r=A();a(0,"eld-game-attributes-picker",5),ke("attributesChange",function(t){p(r);let i=_(2);return $e(i.attributes,t)||(i.attributes=t),S(t);}),l();}if(o&2){let r=_(2);f("category",r.category),He("attributes",r.attributes);}}function Pn(o,n){if(o&1){let r=A();a(0,"eld-dashboard-augmented-game-picker-environment-section",6),u("environmentValues",function(t){p(r);let i=_(2);return S(i.onEnvironmentValuesChange(t));}),l();}if(o&2){let r=_(2);f("augmentedGameForm",r.augmentedGameForm)("gameId",r.gameCategory.gameId)("initialEnvValues",r.environmentOptions)("showDefaultAllValue",r.showDefaultAllValue)("showHeadersAndFooters",r.showHeadersAndFooters)("tradeEnvironments",r.gameCategory.tradeEnvironments);}}function Bn(o,n){if(o&1&&(m(0,Gn,1,2,"eld-game-attributes-picker",3),m(1,Pn,1,6,"eld-dashboard-augmented-game-picker-environment-section",4)),o&2){let r=_();c(r.attributes().length?0:-1),s(),c(r.gameCategory.tradeEnvironments.length&&!r.attributesLoading?1:-1);}}var bt=(()=>{let n=class n{constructor(){this.showHeadersAndFooters=!1,this.showDefaultAllValue=!1,this.showDefaultNoneValues=!1,this.defaultIsNull=!1,this.attributesLoading=!1,this.attributes=Ke([]),this.gameIdChange=new I(),this.augmentedGameChange=new I(),this.environmentOptions=[],this.multiselectEnvironmentOptions=null,this.doesGameCategoryContainSynonym=(e,t)=>this.filterGamesService.doesGameCategoryContainSynonym(t,e),this.trackByGameCategory=Zi,this.controlName=oe,this._unsubscribe$=new Ue(),this.fb=M(le),this.filterGamesService=M(Ki),this.store=M(he),this.screenType=this.store.selectSignal(yi),this.optionsListWidth=P(()=>(this.screenType()??0)>Ze.SM?285:void 0);}ngOnInit(){this.subscribeToGameFilter();}ngOnChanges(e){e.gameCategory&&(e.gameCategory.isFirstChange()?this.initializeAugmentedGameForm(this.gameId):(this.augmentedGameForm&&Object.keys(this.augmentedGameForm.controls).forEach(t=>{t!==oe.GameId&&t!==oe.Environment&&this.augmentedGameForm.removeControl(t);}),this.augmentedGameForm.controls[oe.Environment]?.patchValue(void 0))),e.gameId&&this.augmentedGameForm.controls[oe.GameId].patchValue(this.gameId),e.augmentedGame?.currentValue&&(this.environmentOptions=this.augmentedGame.environmentOptions||[]);}ngOnDestroy(){this._unsubscribe$.next(),this._unsubscribe$.complete();}onEnvironmentValuesChange(e){this.environmentOptions=e,this.multiselectEnvironmentOptions=null,this.createNewAugmentedGame(),this.augmentedGameChange.emit(this.newAugmentedGame);}initializeAugmentedGameForm(e){this.augmentedGameForm=this.fb.group({}),this.augmentedGameForm.addControl(oe.GameId,new Oe(e));}createNewAugmentedGame(){this.newAugmentedGame={gameCategory:this.gameCategory,environmentOptions:this.environmentOptions,multiselectEnvironmentOptions:this.multiselectEnvironmentOptions};}subscribeToGameFilter(){this.augmentedGameForm.controls[oe.GameId].valueChanges.pipe(fe(this._unsubscribe$)).subscribe(e=>{this.gameIdChange.emit(e);});}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-augmented-game-picker"]],inputs:{gameId:"gameId",category:"category",gameCategory:"gameCategory",gamesCategories:"gamesCategories",augmentedGame:"augmentedGame",showHeadersAndFooters:"showHeadersAndFooters",showDefaultAllValue:"showDefaultAllValue",showDefaultNoneValues:"showDefaultNoneValues",defaultIsNull:"defaultIsNull",attributesLoading:"attributesLoading",attributes:[1,"attributes"]},outputs:{attributes:"attributesChange",gameIdChange:"gameIdChange",augmentedGameChange:"augmentedGameChange"},features:[re],decls:3,vars:2,consts:()=>{let e;e="No game found";let t;return t="Select Game",[[1,"aug-item-picker","inline-layout","flex","flex-wrap","items-center"],[1,"mb-[10px]","w-full","sm:mr-[10px]","sm:w-auto",3,"formGroup"],["bindLabel","gameName","bindValue","gameId","notFoundText",e,"placeholder",t,1,"block","w-full","sm:w-37",3,"clearable","formControlName","options","optionsListWidth","searchFn","trackByFn","virtualScrolling"],[1,"contents",3,"category","attributes"],[1,"contents",3,"augmentedGameForm","gameId","initialEnvValues","showDefaultAllValue","showHeadersAndFooters","tradeEnvironments"],[1,"contents",3,"attributesChange","category","attributes"],[1,"contents",3,"environmentValues","augmentedGameForm","gameId","initialEnvValues","showDefaultAllValue","showHeadersAndFooters","tradeEnvironments"]];},template:function(t,i){t&1&&(a(0,"div",0),m(1,vn,2,8,"form",1),m(2,Bn,2,2),l()),t&2&&(s(),c(i.augmentedGameForm&&i.gamesCategories?1:-1),s(),c(i.gameCategory?2:-1));},dependencies:[un,U,se,k,q,J,Z,Y,tt,ae,En],encapsulation:2,changeDetection:0});let o=n;return o;})();var yt=(()=>{let n=class n{constructor(){this.deliveryMethodControl=B.required(),this.filterOptions=[{label:"Automated delivery",value:ee.Automated}];}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-delivery-method-filter"]],inputs:{deliveryMethodControl:[1,"deliveryMethodControl"]},decls:1,vars:3,consts:()=>{let e;e="Delivery method filter";let t;return t="Delivery method",[["bindLabel","label","bindValue","value","aria-label",e,"placeholder",t,1,"block","w-full",3,"formControl","options","searchable"]];},template:function(t,i){t&1&&E(0,"eld-dropdown",0),t&2&&f("formControl",i.deliveryMethodControl())("options",i.filterOptions)("searchable",!1);},dependencies:[U,k,Ni,Y],encapsulation:2,changeDetection:0});let o=n;return o;})();var xt=o=>n=>{let r=n.value.quantity??0,e=n.value.unitPrice??0;return Pi(r*e,5)<o?{minTotalPrice:{message:"The price per unit is below the minimum allowed for this game. Please increase your price per unit to continue."}}:null;};var wn=["*"],Hn=o=>({open:o});function $n(o,n){if(o&1){let r=A();a(0,"div",4),u("click",function(t){p(r);let i=_();return S(i.onDropdownClick(t));}),ti(1),l();}}var Cn=(()=>{let n=class n{constructor(){this.dropdownOpen=!1,this.wasClickedInside=!1;}clickInside(){this.wasClickedInside=!0;}clickout(){this.wasClickedInside||(this.dropdownOpen=!1),this.wasClickedInside=!1;}onDropdownClick(e){e.target.id!=="dropdown"&&(this.dropdownOpen=!this.dropdownOpen);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-dot-dropdown"]],hostBindings:function(t,i){t&1&&u("click",function(){return i.clickInside();})("click",function(){return i.clickout();},jt);},ngContentSelectors:wn,decls:4,vars:4,consts:[[1,"dropdown-button",3,"click","ngClass"],["fill","none","height","6","viewBox","0 0 20 6","width","20","xmlns","http://www.w3.org/2000/svg"],["d","M2.875 0.578125C2.875 0.578125 2.86719 0.578125 2.85156 0.578125C2.17969 0.578125 1.60156 0.820312 1.11719 1.30469C0.648438 1.77344 0.414062 2.34375 0.414062 3.01562C0.414062 3.6875 0.648438 4.26562 1.11719 4.75C1.60156 5.21875 2.17969 5.45312 2.85156 5.45312C3.53906 5.45312 4.11719 5.21875 4.58594 4.75C5.07031 4.26562 5.3125 3.6875 5.3125 3.01562C5.3125 3 5.3125 2.99219 5.3125 2.99219C5.29688 2.32031 5.05469 1.75 4.58594 1.28125C4.11719 0.8125 3.54688 0.578125 2.875 0.578125ZM17.5 0.578125C17.5 0.578125 17.4922 0.578125 17.4766 0.578125C16.8047 0.578125 16.2266 0.820312 15.7422 1.30469C15.2734 1.77344 15.0391 2.34375 15.0391 3.01562C15.0391 3.6875 15.2734 4.26562 15.7422 4.75C16.2266 5.21875 16.8047 5.45312 17.4766 5.45312C18.1641 5.45312 18.7422 5.21875 19.2109 4.75C19.6953 4.26562 19.9375 3.6875 19.9375 3.01562C19.9375 3 19.9375 2.99219 19.9375 2.99219C19.9219 2.32031 19.6797 1.75 19.2109 1.28125C18.7422 0.8125 18.1719 0.578125 17.5 0.578125ZM10.1875 0.578125C9.5 0.578125 8.91406 0.820312 8.42969 1.30469C7.96094
31.77344 7.72656 2.34375 7.72656 3.01562C7.72656 3.6875 7.96094 4.26562 8.42969 4.75C8.91406 5.21875 9.5 5.45312 10.1875 5.45312C10.8594 5.45312 11.4297 5.21875 11.8984 4.75C12.3828 4.26562 12.625 3.6875 12.625 3.01562C12.625 3 12.625 2.99219 12.625 2.99219C12.625 2.32031 12.3828 1.75 11.8984 1.28125C11.4297 0.8125 10.8594 0.578125 10.1875 0.578125Z","fill","#2D2E3F"],["id","dropdown",1,"dropdown-list"],["id","dropdown",1,"dropdown-list",3,"click"]],template:function(t,i){t&1&&(ei(),a(0,"div",0),u("click",function(C){return i.onDropdownClick(C);}),Xt(),a(1,"svg",1),E(2,"path",2),l()(),m(3,$n,2,0,"div",3)),t&2&&(f("ngClass",ai(2,Hn,i.dropdownOpen)),s(3),c(i.dropdownOpen?3:-1));},dependencies:[ae,We],styles:[".dropdown-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:16px 17px;cursor:pointer;border-radius:4px;transition:all .2s ease}.dropdown-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:24px;color:var(--text-primary)}.dropdown-button.open[_ngcontent-%COMP%], .dropdown-button.open[_ngcontent-%COMP%]:hover{background-color:var(--brand-yellow-1)}.dropdown-button[_ngcontent-%COMP%]:hover{background-color:var(--background-base-3)}.dropdown-button[_ngcontent-%COMP%] path{fill:var(--text-primary)}.dropdown-list[_ngcontent-%COMP%]{position:absolute;z-index:9999;background-color:var(--background-base-1);min-width:230px;right:0;padding:10px 0;border-radius:3px;box-shadow:var(--shadow-raised)}"],changeDetection:0});let o=n;return o;})();var gn=(()=>{let n=class n{transform(e,t=!1){let i=new Date(),d=new Date(Ei(e));return Si(d,i)<=0?null:ui(i,d,t?2:void 0);}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=Q({name:"expiresIn",type:n,pure:!0});let o=n;return o;})();var hn=(()=>{let n=class n extends _i{transform(e){return e?super.transform(0,String(e),void 0,"1.0-2")?.replace(/[0-9]/g,"")??null:null;}};n.ɵfac=(()=>{let e;return function(i){return(e||(e=Qt(n)))(i||n);};})(),n.ɵpipe=Q({name:"extractCurrencySymbol",type:n,pure:!0});let o=n;return o;})();var On=(()=>{let n=class n{transform(e){return e===h.Paused||e===h.Offline;}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=Q({name:"isOfferDisabled",type:n,pure:!0});let o=n;return o;})();var An=(()=>{let n=class n{transform(e){switch(e){case h.Active:return"Active";case h.Paused:return"Paused";case h.Closed:return"Closed";case h.Deleted:return"Deleted";case h.Offline:return"Offline";default:throw new Error("Invalid offer status: "+e+"");}}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=Q({name:"offerStateLabel",type:n,pure:!0});let o=n;return o;})();var Tn=(()=>{let n=class n{transform(e){switch(e){case h.Active:return"green";case h.Paused:return"blue";case h.Closed:return"red";case h.Deleted:case h.Offline:return"red";default:return"grey";}}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=Q({name:"offerStatusColor",type:n,pure:!0});let o=n;return o;})();var kn=(o,n)=>n.id;function Un(o,n){o&1&&O(0," : ");}function Vn(o,n){if(o&1&&(a(0,"p",19),R(1,7),T(2,"expiresIn"),l()),o&2){let r=_();s(2),ce(Et(2,1,r.expireDate,!0)),pe(1);}}function zn(o,n){o&1&&(a(0,"p",19),R(1,8),l());}function Yn(o,n){o&1&&E(0,"eld-automated-delivery-indicator",49)(1,"eld-automated-delivery-indicator",50);}function Xn(o,n){if(o&1){let r=A();a(0,"eld-button",51),u("buttonClick",function(){p(r);let t=_();return S(t.onPauseOffer());}),l();}if(o&2){let r=_(),e=Me(62);ye("aria-label",r.pauseTooltipText),f("eldTooltip",e)("iconSize",24);}}function Qn(o,n){if(o&1){let r=A();a(0,"eld-button",52),u("buttonClick",function(){p(r);let t=_();return S(t.onResumeOffer());}),l();}if(o&2){let r=_(),e=Me(65),t=W(0);ye("aria-label",r.resumeTooltipText),f("eldTooltip",e)("iconSize",24)("isDisabled",!t);}}function jn(o,n){if(o&1){let r=A();a(0,"eld-button",53),u("buttonClick",function(){p(r);let t=_();return S(t.onPauseOffer());}),l();}}function Kn(o,n){if(o&1){let r=A();a(0,"eld-button",54),u("buttonClick",function(){p(r);let t=_();return S(t.onResumeOffer());}),l();}if(o&2){_();let r=W(0);f("isDisabled",!r);}}function Wn(o,n){if(o&1&&(a(0,"a",55),E(1,"eld-image",57),l()),o&2){let r=_(),e=_();f("routerLink","/"+r),s(),f("alt",e.offer.gameCategoryTitle)("filePath",e.offerImageUrl)("height",58)("rounded",!0)("width",58);}}function qn(o,n){if(o&1){let r=A();a(0,"a",58),u("click",function(){p(r);let t=_(2);return S(t.onClickOffer());}),E(1,"eld-image",57),l();}if(o&2){let r=_(2);s(),f("alt",r.offer.gameCategoryTitle)("filePath",r.offerImageUrl)("height",58)("rounded",!0)("width",58);}}function Zn(o,n){if(o&1&&(a(0,"div",37),m(1,Wn,2,6,"a",55),T(2,"isOfferDisabled"),m(3,qn,2,5,"a",56),T(4,"isOfferDisabled"),l()),o&2){let r=_();s(),c(D(2,2,r.offerState)?-1:1),s(2),c(D(4,4,r.offerState)?3:-1);}}function Jn(o,n){if(o&1&&(a(0,"a",59)(1,"h5",60),O(2),T(3,"offerTitle"),l()()),o&2){let r=_(),e=_();f("routerLink","/"+r),s(2),N(D(3,2,e.offer));}}function er(o,n){if(o&1){let r=A();a(0,"a",61),u("click",function(){p(r);let t=_(2);return S(t.onClickOffer());}),a(1,"h5",62),O(2),T(3,"offerTitle"),l()();}if(o&2){let r=_(2);s(2),N(D(3,1,r.offer));}}function tr(o,n){if(o&1&&(m(0,Jn,4,4,"a",59),T(1,"isOfferDisabled"),m(2,er,4,3,"a"),T(3,"isOfferDisabled")),o&2){let r=_();c(D(1,2,r.offerState)?-1:0),s(2),c(D(3,4,r.offerState)?2:-1);}}function ir(o,n){if(o&1&&E(0,"eld-attribute-value",63),o&2){let r=_().$implicit;f("attribute",r);}}function or(o,n){if(o&1&&m(0,ir,1,1,"eld-attribute-value",63),o&2){let r=n.$implicit,e=_();c(r.id!==e.SAB_MS_NUMERIC?0:-1);}}function nr(o,n){if(o&1&&(a(0,"div",41)(1,"p"),R(2,9),l(),a(3,"span")(4,"strong"),O(5),T(6,"deliveryMethodLabel"),l()()()),o&2){let r=_();s(5),v(" ",D(6,1,r.offer.deliveryMethod)," ");}}function rr(o,n){if(o&1&&(a(0,"div",41)(1,"p"),R(2,10),l(),a(3,"span"),mt(4),a(5,"strong"),O(6),T(7,"number"),T(8,"unitsLetter"),l(),ct(),l()()),o&2){let r=_();s(6),ut("",D(7,2,r.offerQuantity)," ",D(8,4,r.offerUnitSystem));}}function ar(o,n){if(o&1&&(a(0,"div",41)(1,"p"),R(2,11),l(),a(3,"span"),mt(4),a(5,"strong"),O(6),T(7,"number"),T(8,"unitsLetter"),l(),ct(),l()()),o&2){let r=_();s(6),ut("",D(7,2,r.offer.minQuantity)," ",D(8,4,r.offerUnitSystem));}}function sr(o,n){if(o&1&&(a(0,"div",43),E(1,"eld-icon",64),l()),o&2){_();let r=Me(59);f("eldTooltip",r);}}function lr(o,n){if(o&1){let r=A();a(0,"form",45)(1,"eld-numeric-input",65),T(2,"extractCurrencySymbol"),T(3,"unitsLetter"),u("blurTriggered",function(){p(r);let t=_();return S(t.onPriceInputBlur());})("check",function(){p(r);let t=_();return S(t.onSubmitPrice(t.offer.id));})("escape",function(){p(r);let t=_();return S(t.onPriceInputEscape());})("valueChange",function(){p(r);let t=_();return S(t.onPriceValueChange());}),l()();}if(o&2){let r=_(),e=W(0);f("formGroup",r.priceFormGroup),s(),f("blurOnEscape",!0)("checkButtonDisabled",r.priceInputButtonDisabled)("decimals",r.unitPriceDecimals())("disabled",!e)("label",D(2,7,r.offer.pricePerUnit.currency)+"/"+Et(3,9,r.offerUnitSystem?r.offerUnitSystem:r.LOCALIZED_UNIT,!0))("withCheckButton",!0);}}var Dn=(()=>{let n=class n{constructor(){this.appConstants=null,this.highlighted=B(!1),this.delete=new I(),this.viewLoaded=new I(),this.pauseOffer=new I(),this.resumeOffer=new I(),this.copyPrivateLink=new I(),this.priceChange=new I(),this.showOfferToaster=new I(),this.CATEGORY=b,this.OFFER_STATUS=h,this.DELIVERY_TIME=ee,this.LOCALIZED_UNIT=Li,this.BASE_DELIVERY_METHOD=ki,this.SAB_MS_NUMERIC=zi,this.priceInputButtonDisabled=!0,this.offerDiscounts=[],this.inHighRiskCategory=!1,this.pauseTooltipText="Pause",this.resumeTooltipText="Resume",this.editTooltipText="Edit",this.copyTooltipText="Share offer",this.deleteTooltipText="Delete",this.noPermissionToSellTooltipText="You don\u2019t have permission to sell in this category",this.activatedRoute=M(qe),this.store=M(he),this.formBuilder=M(le),this.offerEditUrl="",this.unitPriceDecimals=P(()=>this.category()===b.Account?2:this.category()===b.CustomItem?ve(this.priceValue()):5),this.category=me(null),this.priceValue=me(null);}get flexibleOffer(){return this.offer;}get offerPublic(){return this.offer;}get offerPrice(){return this.offer.pricePerUnit.amount;}get priceInput(){return this.priceFormGroup.get("unitPrice");}ngOnChanges(e){if(e.offer?.currentValue){this.category.set(this.offer.category),this.expireDate=this.flexibleOffer.expireDate,this.offerState=this.flexibleOffer.offerState,this.offerQuantity=this.flexibleOffer.quantity,this.offerGuaranteedDeliveryTime=this.flexibleOffer.guaranteedDeliveryTime,this.offerDiscounts=this.offerPublic.volumeDiscounts,this.offerUnitSystem=this.offerPublic.unitSystem;let{gameSeoAlias:t,category:i,id:d}=this.offer;this.offerUrl=Oi.getOfferUrl(t,i,d),this.offerEditUrl=`/dashboard/offers/${i}/edit/${d}`;}}ngOnInit(){this.offer&&(this.offerImageUrl=this.getOfferImageUrl(),this.isFlexible=F.isFlexible(this.offer.category),this.initPriceForm(),this.gameName=this.library.getFirstByGameId(this.offer.gameId)?.gameName,this.inHighRiskCategory=this.library.getByGameIdAndCategory(this.offer.gameId,this.offer.category)?.isHighRisk??!1,this.allowHighRiskOffers$=this.store.select(hi));}onClickOffer(){this.offerState===h.Paused?this.showOfferToaster.emit("Offer is paused"):this.offerState===h.Offline&&this.showOfferToaster.emit("Shop is offline");}onDeleteOffer(){this.delete.emit(this.offer.id);}onPauseOffer(){this.pauseOffer.emit(this.offer.id);}onResumeOffer(){this.resumeOffer.emit(this.offer.id);}onCopyPrivateLink(){if(this.offer.gameSeoAlias){let e=`${location.origin}/${this.offerUrl}?private=true`;this.copyPrivateLink.emit(e);}}onPriceInputBlur(){this.priceInput?.valid||this.priceInput?.setValue(this.offerPrice);}onPriceInputEscape(){this.priceInput?.setValue(this.offerPrice),this.priceInputButtonDisabled=!0;}onPriceValueChange(){this.roundUnitPrice(),this.priceValue.set(this.priceInput?.value??null),this.priceInputButtonDisabled=this.priceFormGroup.invalid||this.priceInput?.value===this.offerPrice;}onSubmitPrice(e){this.priceChange.emit({offerId:e,pricePerUnit:{amount:this.priceInput?.value,currency:this.offer.pricePerUnit?.currency}});}initPriceForm(){this.appConstants&&(this.priceFormGroup=this.formBuilder.group({unitPrice:[this.offerPrice,[et.required,et.min(this.appConstants.offerConstants.minUnitPrice),et.max(this.appConstants.offerConstants.maxUnitPrice)]],quantity:this.offer.quantity??1,minQuantity:this.offer.minQuantity??1},{validator:this.offer.category===b.CustomItem?[xt(this.appConstants.offerConstants.minimalOfferValue.amount)]:[sn(this.appConstants.offerConstants.minimalOfferValue.amount),rn(this.appConstants.offerConstants.maxUnitPrice)]}),this.priceValue.set(this.offerPrice));}roundUnitPrice(){if(this.offer.category!==b.CustomItem||!this.priceInput)return;let e=this.priceInput.value,t=it(e,ve(e));t!==null&&t!==e&&this.priceInput.setValue(t,{emitEvent:!1});}getOfferImageUrl(){if(F.isPredefined(this.offer.category)){let e=F.getImageLocation(this.offer),t=F.getAttributeId(this.offer);if(e&&t)return gt.getAttributeImageUrl(e,t);}return this.offer.imageLocation?gt.getPredefinedOfferImageUrl(this.offer.gameId,this.offer.imageLocation,!0):this.offer.mainOfferImage&&this.offer.mainOfferImage.smallImage?this.offerImagePath+this.offer.mainOfferImage.smallImage:"";}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-list-item"]],inputs:{offer:"offer",appConstants:"appConstants",offerImagePath:"offerImagePath",library:"library",highlighted:[1,"highlighted"]},outputs:{delete:"delete",viewLoaded:"viewLoaded",pauseOffer:"pauseOffer",resumeOffer:"resumeOffer",copyPrivateLink:"copyPrivateLink",priceChange:"priceChange",showOfferToaster:"showOfferToaster"},features:[re],decls:76,vars:60,consts:()=>{let e;e="Pause";let t;t="Resume";let i;i="Edit";let d;d="Delete";let C;C="Copy link";let x;x="Delivery time:";let G;G="Expires in "+"\uFFFD0\uFFFD"+"";let De;De="Expired";let te;te="Delivery method:";let ue;ue="Quantity:";let X;return X="Min qty.:",[["discountTooltip",""],["pauseOfferTooltip",""],["resumeOfferTooltip",""],["editOfferTooltip",""],["copyPrivateLinkTooltip",""],["deleteOfferTooltip",""],x,G,De,te,ue,X,[1,"offer-list-item"],[1,"offer-info"],[1,"offer-top-bar"],[1,"offer-bar-left"],[1,"max-h-[1.5em]","overflow-hidden","text-base",3,"tradeEnvs"],[1,"offer-bar-right"],[1,"status-expiration-info"],[1,"expiration-date"],[3,"color","dataTestId","text"],[1,"desktop--xs","offer-bar-actions-wrapper"],[1,"offer-bar-actions"],["iconBeforeText","pause","theme","ghost",3,"aria-label","eldTooltip","iconSize"],["iconBeforeText","chevron-right","theme","ghost",3,"aria-label","eldTooltip","iconSize","isDisabled"],["iconBeforeText","edit","theme","ghost",3,"aria-label","eldTooltip","iconSize","isDisabled","link","state"],["iconBeforeText","link","theme","ghost",3,"buttonClick","aria-label","eldTooltip","iconSize"],["iconBeforeText","delete","theme","ghost",3,"buttonClick","aria-label","eldTooltip","iconSize"],[1,"mobile--xs"],[1,"flex","flex-col"],["contentAlign","left","iconBeforeText","pause","padding","0","size","xs","text",e,"theme","ghost",1,"p-1"],["contentAlign","left","iconBeforeText","chevron-right","padding","0","size","xs","text",t,"theme","ghost",1,"p-1",3,"isDisabled"],["contentAlign","left","iconBeforeText","edit","padding","0","size","xs","text",i,"theme","ghost",1,"p-1",3,"isDisabled","link","state"],["name","delete","contentAlign","left","iconBeforeText","delete","padding","0","size","xs","text",d,"theme","ghost",1,"p-1",3,"buttonClick"],["contentAlign","left","iconBeforeText","link","padding","0","size","xs","text",C,"theme","ghost",1,"p-1",3,"buttonClick","isDisabled"],[1,"offer-item-bottom"],[1,"offer-item-bottom-top",3,"ngClass"],[1,"offer-image"],[1,"offer-name-params"],[1,"flex","flex-wrap","gap-x-2.5","gap-y-1"],[1,"offer-extra-info"],[1,"extra-info-row"],[1,"offer-price"],[1,"offer-discount",3,"eldTooltip"],[1,"w-full"],[1,"offer-price-input","not-submitted",3,"formGroup"],["placement","right","tooltipStyle","plain"],[3,"discounts","unitSystem"],["placement","top","tooltipStyle","plain"],["mode","icon",1,"smd:inline-flex","order-1","ml-1.5","hidden"],["mode","chip",1,"smd:hidden","order-1","mr-1.5","inline-flex"],["iconBeforeText","pause","theme","ghost",3,"buttonClick","aria-label","eldTooltip","iconSize"],["iconBeforeText","chevron-right","theme","ghost",3,"buttonClick","aria-label","eldTooltip","iconSize","isDisabled"],["contentAlign","left","iconBeforeText","pause","padding","0","size","xs","text",e,"theme","ghost",1,"p-1",3,"buttonClick"],["contentAlign","left","iconBeforeText","chevron-right","padding","0","size","xs","text",t,"theme","ghost",1,"p-1",3,"buttonClick","isDisabled"],["rel","nofollow",3,"routerLink"],["rel","nofollow"],[3,"alt","filePath","height","rounded","width"],["rel","nofollow",3,"click"],[3,"routerLink"],["data-testid","offer-page-item-offer-title-MnW5",1,"font-bold","wrap-anywhere","hyphens-auto"],[3,"click"],[1,"font-bold","wrap-anywhere","hyphens-auto"],[1,"text-primary","bg-alt-1","hover:bg-alt-2","h-6.25","cursor-default","items-center","rounded-sm","p-1.25","pb-0.75","text-xs","ease-in-out",3,"attribute"],["name","discount",1,"discount-icon"],["format","0,0.[00000]","formControlName","unitPrice",1,"w-full",3,"blurTriggered","check","escape","valueChange","blurOnEscape","checkButtonDisabled","decimals","disabled","label","withCheckButton"]];},template:function(t,i){if(t&1&&(Ce(0),T(1,"async"),a(2,"div",12)(3,"div",13)(4,"div",14)(5,"div",15)(6,"p"),O(7),m(8,Un,1,0),l(),E(9,"eld-acc-offer-item-label",16),l(),a(10,"div",17)(11,"div",18),m(12,Vn,3,4,"p",19),T(13,"expires
3In"),m(14,zn,2,0,"p",19),T(15,"expiresIn"),E(16,"eld-chip",20),T(17,"offerStatusColor"),T(18,"offerStateLabel"),m(19,Yn,2,0),l(),a(20,"div",21)(21,"div",22),m(22,Xn,1,3,"eld-button",23),m(23,Qn,1,4,"eld-button",24),E(24,"eld-button-link",25),a(25,"eld-button",26),u("buttonClick",function(){return i.onCopyPrivateLink();}),l(),a(26,"eld-button",27),u("buttonClick",function(){return i.onDeleteOffer();}),l()()(),a(27,"div",28)(28,"eld-dashboard-dot-dropdown")(29,"div",29),m(30,jn,1,0,"eld-button",30),m(31,Kn,1,1,"eld-button",31),E(32,"eld-button-link",32),a(33,"eld-button",33),u("buttonClick",function(){return i.onDeleteOffer();}),l(),a(34,"eld-button",34),u("buttonClick",function(){return i.onCopyPrivateLink();}),l()()()()()(),a(35,"div",35)(36,"div",36),m(37,Zn,5,6,"div",37),a(38,"div",38),m(39,tr,4,6),a(40,"p",39),j(41,or,1,1,null,null,kn),l()()(),a(43,"div",40),m(44,nr,7,3,"div",41),m(45,rr,9,6,"div",41),m(46,ar,9,6,"div",41),a(47,"div",41)(48,"p"),R(49,6),l(),a(50,"span")(51,"strong"),O(52),T(53,"deliveryTimeLabel"),l()()()(),a(54,"div",42),m(55,sr,2,1,"div",43),a(56,"div",44),m(57,lr,4,12,"form",45),l()()()()(),a(58,"eld-tooltip",46,0),E(60,"eld-discounts-tooltip-content",47),l(),a(61,"eld-tooltip",48,1),O(63),l(),a(64,"eld-tooltip",48,2),O(66),l(),a(67,"eld-tooltip",48,3),O(69),l(),a(70,"eld-tooltip",48,4),O(72),l(),a(73,"eld-tooltip",48,5),O(75),l()),t&2){let d,C,x=Me(68),G=Me(71),De=Me(74),te=Fe(D(1,47,i.allowHighRiskOffers$)||!i.inHighRiskCategory);s(2),Ie("offer-list-item--highlighted",i.highlighted()),s(5),v("",i.gameName," "),s(),c(i.offer.tradeEnvironmentValues.length>0?8:-1),s(),f("tradeEnvs",i.offer.tradeEnvironmentValues),s(3),c(D(13,50,i.expireDate)?12:-1),s(2),c(D(15,52,i.expireDate)?-1:14),s(2),f("color",D(17,54,i.offerState))("dataTestId","offer-list-offer-state-"+i.offerState+"-chip-syUS")("text",D(18,56,i.offerState)),s(3),c(i.offerGuaranteedDeliveryTime===i.DELIVERY_TIME.Automated?19:-1),s(3),c(i.offerState===i.OFFER_STATUS.Active?22:-1),s(),c(i.offerState===i.OFFER_STATUS.Paused||i.offerState===i.OFFER_STATUS.Closed?23:-1),s(),ye("aria-label",i.editTooltipText),f("eldTooltip",x)("iconSize",24)("isDisabled",!te)("link",i.offerEditUrl)("state",i.activatedRoute.snapshot.queryParams),s(),ye("aria-label",i.copyTooltipText),f("eldTooltip",G)("iconSize",24),s(),ye("aria-label",i.deleteTooltipText),f("eldTooltip",De)("iconSize",24),s(4),c(i.offerState===i.OFFER_STATUS.Active?30:-1),s(),c(i.offerState===i.OFFER_STATUS.Paused||i.offerState===i.OFFER_STATUS.Closed?31:-1),s(),f("isDisabled",!te)("link",i.offerEditUrl)("state",i.activatedRoute.snapshot.queryParams),s(2),f("isDisabled",!te);let ue=i.offer.deliveryMethod&&i.offer.deliveryMethod!==i.BASE_DELIVERY_METHOD.Unspecified;s(2),f("ngClass",ue?"min-w-[20%] xl:min-w-[30%]":"min-w-[35%] xl:min-w-[40%]"),s(),c((d=i.offerUrl)?37:-1,d),s(2),c((C=i.offerUrl)?39:-1,C),s(2),K(i.offer.attributes),s(3),c(ue&&i.offer.deliveryMethod?44:-1),s(),c(i.offerQuantity?45:-1),s(),c(i.offer.minQuantity&&i.offer.category!==i.CATEGORY.TopUp?46:-1),s(6),v(" ",D(53,58,i.offerGuaranteedDeliveryTime)," "),s(3),c(i.offerDiscounts&&i.offerDiscounts.length>0?55:-1),s(2),c(i.priceFormGroup?57:-1),s(3),f("discounts",i.offerDiscounts)("unitSystem",i.offerUnitSystem),s(3),v(" ",i.pauseTooltipText,` 4`),s(3),v(" ",te?i.resumeTooltipText:i.noPermissionToSellTooltipText,` 5`),s(3),v(" ",te?i.editTooltipText:i.noPermissionToSellTooltipText,` 6`),s(3),v(" ",i.copyTooltipText,` 7`),s(3),v(" ",i.deleteTooltipText,` 8`);}},dependencies:[ae,We,no,Ii,Qi,ot,Je,pi,ci,Vi,Ui,U,se,k,q,J,Z,_n,Cn,eo,to,L,oo,at,cn,Le,li,Tn,An,qi,hn,vi,gn,On,ro,so],styles:["[_nghost-%COMP%]{position:relative}.offer-list-item[_ngcontent-%COMP%]{display:flex;min-height:110px;background:var(--background-base-1);box-shadow:var(--shadow-base)}.offer-list-item--highlighted[_ngcontent-%COMP%]{outline:2px solid var(--alert-success-border-color);outline-offset:-2px}.offer-image[_ngcontent-%COMP%]{margin-right:11px}.offer-image[_ngcontent-%COMP%] eld-image[_ngcontent-%COMP%]{cursor:pointer}.offer-top-bar[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-direction:column;padding:10px;
8border-bottom:1px solid var(--divider-border)}@media(min-width:841px){.offer-top-bar[_ngcontent-%COMP%]{flex-direction:row;padding:10px 24px 8px}}.offer-info[_ngcontent-%COMP%]{width:100%}.offer-bar-left[_ngcontent-%COMP%]{display:flex;align-items:center;order:2}.offer-bar-left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{flex-shrink:0;color:var(--text-primary);margin-right:8px;font-size:14px;line-height:16.8px}@media(min-width:841px){.offer-bar-left[_ngcontent-%COMP%]{order:unset}}.offer-bar-actions-wrapper[_ngcontent-%COMP%]{min-width:161px;display:flex;justify-content:flex-end}.offer-bar-actions[_ngcontent-%COMP%]{display:flex;margin-left:24px}eld-dashboard-dot-dropdown[_ngcontent-%COMP%] .dropdown-list{width:118px;min-width:0;margin-right:20px;padding:0}.status-expiration-info[_ngcontent-%COMP%]{display:flex;align-items:center}.status-expiration-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px;color:var(--text-secondary);line-height:14.4px;order:2}@media(min-width:841px){.status-expiration-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{order:unset}}.status-expiration-info[_ngcontent-%COMP%] eld-chip[_ngcontent-%COMP%]{order:1;margin-right:6px;margin-left:0}@media(min-width:841px){.status-expiration-info[_ngcontent-%COMP%] eld-chip[_ngcontent-%COMP%]{order:unset;margin-right:0;margin-left:15px}}.offer-item-bottom[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%;padding:0}.offer-item-bottom[_ngcontent-%COMP%] .offer-item-bottom-top[_ngcontent-%COMP%]{display:flex;align-items:center}.offer-item-bottom[_ngcontent-%COMP%] .offer-item-bottom-top[_ngcontent-%COMP%] .offer-image[_ngcontent-%COMP%]{margin:10px}@media(min-width:841px){.offer-item-bottom[_ngcontent-%COMP%]{flex-wrap:nowrap;width:auto;padding:10px 24px}.offer-item-bottom[_ngcontent-%COMP%] .offer-item-bottom-top[_ngcontent-%COMP%] .offer-image[_ngcontent-%COMP%]{margin:0 11px 0 0}}.offer-bar-right[_ngcontent-%COMP%]{flex-shrink:0;display:flex;justify-content:space-between;align-items:flex-start;width:100%;order:1}@media(min-width:841px){.offer-bar-right[_ngcontent-%COMP%]{align-items:center;width:auto;order:unset}}eld-chip[_ngcontent-%COMP%]{margin-left:15px}.offer-name-params[_ngcontent-%COMP%]{width:100%;margin-right:20px;max-width:420px}.offer-name-params[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:inherit}.offer-name-params[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{color:var(--text-primary);max-width:585px;font-size:14px;margin-bottom:3px;line-height:normal;cursor:pointer;font-weight:700}.offer-name-params[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]:hover{text-decoration:underline}@media(min-width:841px){.offer-name-params[_ngcontent-%COMP%]{width:auto}}.offer-extra-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;width:100%;flex-wrap:wrap;padding:8px 10px 0}.offer-extra-info[_ngcontent-%COMP%] .extra-info-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.offer-extra-info[_ngcontent-%COMP%] .extra-info-row[_ngcontent-%COMP%]:not(:last-child){margin-bottom:10px}@media(min-width:841px){.offer-extra-info[_ngcontent-%COMP%] .extra-info-row[_ngcontent-%COMP%]:not(:last-child){margin-bottom:0}}.offer-extra-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .offer-extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px;line-height:16.8px;color:var(--text-secondary)}.offer-extra-info[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-primary)}@media(min-width:841px){.offer-extra-info[_ngcontent-%COMP%]{flex-direction:row;width:60%;flex-wrap:nowrap;padding:0}.offer-extra-info[_ngcontent-%COMP%] .extra-info-row[_ngcontent-%COMP%]{display:block}}.offer-price[_ngcontent-%COMP%]{width:100%;margin-left:0;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;font-size:14px;color:var(--text-primary);padding:15px 10px 7px}@media(min-width:841px){.offer-price[_ngcontent-%COMP%]{width:27%;max-height:34px;margin-left:20px;padding:0}}.offer-price[_ngcontent-%COMP%] .offer-discount[_ngcontent-%COMP%]{display:flex;align-items:flex-end;font-size:12px;color:var(--text-primary);margin-bottom:3px;margin-right:8px;
8cursor:pointer}.offer-price[_ngcontent-%COMP%] .offer-discount[_ngcontent-%COMP%] eld-icon[_ngcontent-%COMP%] .icon-discount:before, .offer-price[_ngcontent-%COMP%] .offer-discount[_ngcontent-%COMP%] eld-icon[_ngcontent-%COMP%] ng-icon[_ngcontent-%COMP%]{color:var(--brand-yellow-1)}@media(min-width:841px){.offer-price[_ngcontent-%COMP%] .offer-discount[_ngcontent-%COMP%]{align-items:center}}.offer-price[_ngcontent-%COMP%] .offer-price-input[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;width:auto}@media(min-width:841px){.offer-price[_ngcontent-%COMP%] .offer-price-input[_ngcontent-%COMP%]{width:200px}}@media(min-width:1025px){.offer-price[_ngcontent-%COMP%] .offer-price-input[_ngcontent-%COMP%]{width:220px}}@media(min-width:1281px){.offer-price[_ngcontent-%COMP%] .offer-price-input[_ngcontent-%COMP%]{width:240px}}.offer-price[_ngcontent-%COMP%] .offer-price-input[_ngcontent-%COMP%] eld-numeric-input[_ngcontent-%COMP%] input{color:var(--text-primary);font-weight:700}"],changeDetection:0});let o=n;return o;})();function _r(o,n){if(o&1){let r=A();a(0,"eld-dashboard-offers-list-item",2),u("copyPrivateLink",function(t){p(r);let i=_(2);return S(i.onCopyPrivateLink(t));})("delete",function(t){p(r);let i=_(2);return S(i.onDeleteOffer(t));})("pauseOffer",function(t){p(r);let i=_(2);return S(i.onPauseOffer(t));})("priceChange",function(t){p(r);let i=_(2);return S(i.onOfferPriceChange(t));})("resumeOffer",function(t){p(r);let i=_(2);return S(i.onResumeOffer(t));})("showOfferToaster",function(t){p(r);let i=_(2);return S(i.showOfferToaster.emit(t));}),l();}if(o&2){let r=n.$implicit,e=_(2);f("appConstants",e.appConstants)("highlighted",e.uploadedOfferIdSet().has(r.id))("library",e.library)("offer",r)("offerImagePath",e.offerImagePath);}}function dr(o,n){if(o&1&&(a(0,"div",0),j(1,_r,1,5,"eld-dashboard-offers-list-item",1,Xe),l()),o&2){let r=_();s(),K(r.offers);}}var It=(()=>{let n=class n{constructor(){this.appConstants=null,this.uploadedOfferIds=B([]),this.delete=new I(),this.pauseOffer=new I(),this.resumeOffer=new I(),this.copyPrivateLink=new I(),this.priceChange=new I(),this.showOfferToaster=new I(),this.uploadedOfferIdSet=P(()=>new Set(this.uploadedOfferIds()));}onDeleteOffer(e){this.delete.emit(e);}onPauseOffer(e){this.pauseOffer.emit(e);}onResumeOffer(e){this.resumeOffer.emit(e);}onCopyPrivateLink(e){this.copyPrivateLink.emit(e);}onOfferPriceChange(e){this.priceChange.emit(e);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-list"]],inputs:{offers:"offers",appConstants:"appConstants",offerImagePath:"offerImagePath",library:"library",uploadedOfferIds:[1,"uploadedOfferIds"]},outputs:{delete:"delete",pauseOffer:"pauseOffer",resumeOffer:"resumeOffer",copyPrivateLink:"copyPrivateLink",priceChange:"priceChange",showOfferToaster:"showOfferToaster"},decls:1,vars:1,consts:[[1,"offers-list"],[3,"appConstants","highlighted","library","offer","offerImagePath"],[3,"copyPrivateLink","delete","pauseOffer","priceChange","resumeOffer","showOfferToaster","appConstants","highlighted","library","offer","offerImagePath"]],template:function(t,i){t&1&&m(0,dr,3,0,"div",0),t&2&&c(i.offers&&i.appConstants?0:-1);},dependencies:[Dn],styles:["eld-dashboard-offers-list-item[_ngcontent-%COMP%]{display:block;margin-bottom:10px}"],changeDetection:0});let o=n;return o;})();function fr(o,n){if(o&1&&(xe(0,"p")(1,"span"),R(2,0),Ee(),O(3),Ee()),o&2){let r=_();s(3),v("\xA0\xA0",r.filters," ");}}var _e=(()=>{let n=class n{constructor(){this.offersFilter=null,this.attributes=[],this.tradeEnvOptions=null,this.filters=null;}ngOnInit(){this.collectData();}ngOnChanges(){this.filters=null,this.tradeEnvOptions=null,this.collectData();}collectData(){this.offersFilter&&this.gameCategory&&this.offersFilter.tradeEnvironmentId&&this.gameCategory.tradeEnvironments&&(this.tradeEnvOptions=be(this.offersFilter.tradeEnvironmentId,this.gameCategory.tradeEnvironments)),this.buildFilter();}buildFilter(){this.filtersArray=[];let e=null;this.offersFilter?.category&&(e=At(this.offersFilter.category)),e&&this.offersFilter?.category&&this.filtersArray.push(At(this.offersFilter.category)),this.filtersArray.push(this.gameCategory?this.gameCategory.gameName:"All Games"),this.gameCategory&&this.gameCategory.menuGameTitle!==e&&this.filtersArray.push(this.gameCategory.menuGameTitle),this.tradeEnvOptions&&this.tradeEnvOptions?.length>0&&this.tradeEnvOptions.map(t=>{this.filtersArray.push(t.value);}),this.offersFilter?.deliveryTime===ee.Automated&&this.filtersArray.push("Automated delivery"),this.attributes.length>0&&this.attributes.filter(t=>t.type==="Select").map(t=>t.value).filter(t=>t!=null).forEach(t=>this.filtersArray.push(t.name)),this.filters=this.filtersArray.join(" / ");}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-modal-filters"]],inputs:{gameCategory:"gameCategory",offersFilter:"offersFilter",attributes:"attributes"},features:[re],decls:1,vars:1,consts:()=>{let e;return e="Offer filters:",[e];},template:function(t,i){t&1&&m(0,fr,4,1,"p"),t&2&&c(i.filters?0:-1);},styles:["span[_ngcontent-%COMP%]{color:var(--text-grey)}p[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:21px;color:var(--text-primary)}"],changeDetection:0});let o=n;return o;})();var de=(()=>{let n=class n{constructor(){this.text="If you applied any filters on Offers page, the changes will affect only filtered results.";}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-modal-note"]],inputs:{text:"text"},decls:4,vars:1,consts:()=>{let e;return e=""+"\uFFFD#3\uFFFD"+"Note:"+"\uFFFD/#3\uFFFD"+" "+"\uFFFD0\uFFFD"+"",[e,[1,"dashboard-offers-modal-note"]];},template:function(t,i){t&1&&(xe(0,"p",1),Zt(1),Qe(2,0),qt(3,"strong"),je(),Jt(),Ee()),t&2&&(s(3),ce(i.text),pe(2));},styles:[".dashboard-offers-modal-note[_ngcontent-%COMP%]{padding:20px;background:var(--background-alt-1);box-shadow:var(--shadow-base);font-size:14px;line-height:20px;color:var(--text-primary)}p[_ngcontent-%COMP%]{margin:0}"],changeDetection:0});let o=n;return o;})();var Rn=(()=>{let n=class n{transform(e){switch(e){case h.Active:return"Active";case h.Paused:return"Paused";
8case h.Closed:return"Closed";case h.Deleted:return"Deleted";case h.Offline:return"Offline";default:return"All";}}};n.ɵfac=function(t){return new(t||n)();},n.ɵpipe=Q({name:"offerStatusFilterLabel",type:n,pure:!0});let o=n;return o;})();var Pe=(()=>{let n=class n{};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-modal-state"]],inputs:{offerState:"offerState"},decls:5,vars:3,consts:()=>{let e;return e="Offer state:",[e];},template:function(t,i){t&1&&(xe(0,"p")(1,"span"),R(2,0),Ee(),O(3),T(4,"offerStatusFilterLabel"),Ee()),t&2&&(s(3),v("\xA0\xA0 ",D(4,1,i.offerState),` 9`));},dependencies:[Rn],styles:["span[_ngcontent-%COMP%]{color:var(--text-grey)}p[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:21px;color:var(--text-primary)}"],changeDetection:0});let o=n;return o;})();function Be(o,n){if(!o)return null;switch(n){case"Active":return o.activeOffers;case"Closed":return o.closedOffers;case"Paused":return o.pausedOffers;default:return o.activeOffers+o.closedOffers+o.pausedOffers;}}var dt="Unit Price";function mr(o,n){if(o&1&&(a(0,"eld-error-message"),O(1),l()),o&2){let r=n.$implicit;s(),N(r);}}function cr(o,n){if(o&1&&(j(0,mr,2,1,"eld-error-message",null,Ye),T(2,"validationMessages")),o&2){_(2);let r=W(0);K(D(2,0,r.errors));}}function pr(o,n){if(o&1&&(a(0,"form",9)(1,"h6",13),R(2,0),l(),a(3,"div",14),E(4,"eld-numeric-input",15),a(5,"p"),O(6,"USD $"),l()(),m(7,cr,3,2),a(8,"p",16),R(9,1),l()()),o&2){let r=_(),e=W(0);f("formGroup",r.priceChangeFormGroup),s(4),f("decimals",r.unitPriceDecimals()),s(3),c(e.touched&&e.invalid?7:-1);}}function Sr(o,n){o&1&&(a(0,"div",10)(1,"h5"),R(2,2),l()());}function ur(o,n){if(o&1){let r=A();a(0,"eld-button",17),u("buttonClick",function(){p(r);let t=_();return S(t.onSaveChanges());}),l();}if(o&2){_();let r=W(0);f("isDisabled",r.invalid);}}var Nt=(()=>{let n=class n{constructor(){this.gameCategory=null,this.offersFilter=null,this.offersStatusCount=null,this.attributes=[],this.areAllGameFiltersFullySelected=!1,this.modalTitle="",this.CATEGORY=b,this.formBuilder=M(le),this.store=M(he),this.minUnitPrice=this.store.selectSignal(bi),this.maxUnitPrice=this.store.selectSignal(Fi),this.priceChangeFormGroup=this.formBuilder.group({price:new Oe(null,[ln(dt),e=>an(dt,this.minUnitPrice())(e),e=>nn(dt,this.maxUnitPrice())(e)])}),this.unitPriceDecimals=P(()=>this.category()===b.Account?2:this.category()===b.CustomItem?ve(this.priceValue()):5),this.dismiss=()=>{},this.category=me(null),this.priceValue=Ci(this.priceChangeFormGroup.controls.price.valueChanges.pipe(Re(e=>this.roundPrice(e))),{initialValue:null});}registerDismiss(e){this.dismiss=e;}setData(e){this.gameCategory=e.gameCategory,this.category.set(e.gameCategory?.category??null),this.offerState=e.offerState,this.offersFilter=e.offersFilter,this.offersStatusCount=e.offersStatusCount,this.attributes=e.attributes,this.offersFilter?.category&&(this.areAllGameFiltersFullySelected=this.gameCategory!==null);let t=Be(this.offersStatusCount,this.offerState);this.modalTitle="Change price for ("+t+") offers";}onSaveChanges(){this.priceChangeFormGroup.valid&&this.dismiss(this.priceChangeFormGroup.get("price")?.value??void 0);}roundPrice(e){if(this.category()!==b.CustomItem)return e;let t=it(e,ve(e));return t!==null&&t!==e?(this.priceChangeFormGroup.controls.price.setValue(t,{emitEvent:!1}),t):e;}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-change-price-modal"]],decls:16,vars:9,consts:()=>{let e;e="Close";let t;t="Save";let i;i="Price";let d;d=" Price is set per item Units. For example, WoW has K (thousands) and OSRS has M (millions). You can check item Units in your Offer list. ";let C;return C="To use this bulk action, close this window and select desired Game and Attributes in the filter section",[i,d,C,[3,"closeClick"],[1,"text-primary","text-2xl","font-bold"],[1,"flex","flex-col","gap-3"],[3,"offerState"],[3,"attributes","gameCategory","offersFilter"],[1,"separator"],[3,"formGroup"],[1,"no-game"],["text",e,"theme","secondary",3,"buttonClick"],["text",t,"theme","primary",3,"isDisabled"],[1,"mb-4"],[1,"price-input"],["format","0,0.[00000]","formControlName","price",3,"decimals"],[1,"price-note"],["text",t,"theme","primary",3,"buttonClick","isDisabled"]];},template:function(t,i){t&1&&(Ce(0),a(1,"eld-small-modal-layout")(2,"eld-modal-title",3),u("closeClick",function(){return i.dismiss();}),a(3,"span",4),O(4),l()(),a(5,"eld-scroller")(6,"div",5),E(7,"eld-dashboard-offers-modal-note")(8,"eld-dashboard-offers-modal-state",6)(9,"eld-dashboard-offers-modal-filters",7)(10,"hr",8),m(11,pr,10,3,"form",9),m(12,Sr,3,0,"div",10),l()(),a(13,"eld-modal-actions")(14,"eld-button",11),u("buttonClick",function(){return i.dismiss();}),l(),m(15,ur,1,1,"eld-button",12),l()()),t&2&&(Fe(i.priceChangeFormGroup.controls.price),s(4),N(i.modalTitle),s(4),f("offerState",i.offerState),s(),f("attributes",i.attributes)("gameCategory",i.gameCategory)("offersFilter",i.offersFilter),s(2),c(i.gameCategory&&i.areAllGameFiltersFullySelected&&i.priceChangeFormGroup?11:-1),s(),c(i.areAllGameFiltersFullySelected?-1:12),s(3),c(i.gameCategory&&i.areAllGameFiltersFullySelected?15:-1));},dependencies:[de,Pe,_e,U,se,k,q,J,Z,ot,$,w,H,L,rt,ao,on],styles:["h4[_ngcontent-%COMP%]{font-size:18px;line-height:25px;color:var(--text-primary);
9border-bottom:1px solid var(--divider-border)}.offer-modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex-wrap:wrap;margin-top:24px}.dashboard-separator[_ngcontent-%COMP%]{margin-bottom:20px}.no-game[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center}.no-game[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:700;font-size:18px;line-height:25px;text-align:center;color:var(--text-primary)}h6[_ngcontent-%COMP%]{font-weight:700;font-size:14px;line-height:20px;text-transform:uppercase}.price-note[_ngcontent-%COMP%]{margin-top:15px;padding:15px;background:var(--yellow-light-transparent)}.price-input[_ngcontent-%COMP%]{display:flex;align-items:center}.price-input[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 0 12px}"],changeDetection:0});let o=n;return o;})();function Er(o,n){o&1&&(a(0,"div",3),E(1,"hr",8),a(2,"div",9)(3,"h5"),R(4,0),l()()());}function Cr(o,n){if(o&1){let r=A();a(0,"eld-button",10),u("buttonClick",function(){p(r);let t=_();return S(t.onDeleteAllOffers());}),l();}}var Lt=(()=>{let n=class n{constructor(){this.gameCategory=null,this.offersFilter=null,this.offersStatusCount=null,this.attributes=[],this.areAllGameFiltersFullySelected=!1,this.modalTitle="",this.dismiss=()=>{};}registerDismiss(e){this.dismiss=e;}setData(e){if(this.gameCategory=e.gameCategory,this.offerState=e.offerState,this.offersFilter=e.offersFilter,this.offersStatusCount=e.offersStatusCount,this.attributes=e.attributes,this.gameCategory?.category)if(F.isPredefined(this.gameCategory?.category))this.areAllGameFiltersFullySelected=!0;else{let i=Ae.isDeepestTEFilterLevelSelected(this.gameCategory,this.offersFilter),d=this.attributes.every(C=>C.value!=null);this.areAllGameFiltersFullySelected=i&&d;}let t=Be(this.offersStatusCount,this.offerState);this.modalTitle="Delete ("+t+") offers";}onDeleteAllOffers(){this.dismiss(!0);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-delete-all-modal"]],decls:12,vars:7,consts:()=>{let e;e="Close";let t;t="Delete";let i;return i="To use this bulk action, close this window and select desired Game and Attributes in the filter section",[i,[3,"closeClick"],[1,"text-primary","text-2xl","font-bold"],[1,"flex","flex-col","gap-5"],[3,"offerState"],[3,"attributes","gameCategory","offersFilter"],["text",e,"theme","secondary",3,"buttonClick"],["text",t,"theme","primary"],[1,"separator"],[1,"no-game"],["text",t,"theme","primary",3,"buttonClick"]];},template:function(t,i){t&1&&(a(0,"eld-small-modal-layout")(1,"eld-modal-title",1),u("closeClick",function(){return i.dismiss();}),a(2,"span",2),O(3),l()(),a(4,"div",3),E(5,"eld-dashboard-offers-modal-note")(6,"eld-dashboard-offers-modal-state",4)(7,"eld-dashboard-offers-modal-filters",5),m(8,Er,5,0,"div",3),l(),a(9,"eld-modal-actions")(10,"eld-button",6),u("buttonClick",function(){return i.dismiss();}),l(),m(11,Cr,1,0,"eld-button",7),l()()),t&2&&(s(3),N(i.modalTitle),s(3),f("offerState",i.offerState),s(),f("attributes",i.attributes)("gameCategory",i.gameCategory)("offersFilter",i.offersFilter),s(),c(i.areAllGameFiltersFullySelected?-1:8),s(3),c(i.areAllGameFiltersFullySelected?11:-1));},dependencies:[de,Pe,_e,$,w,H,L],styles:["h4[_ngcontent-%COMP%]{font-size:18px;line-height:25px;color:var(--text-primary);border-bottom:1px solid var(--divider-border)}.offer-modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex-wrap:wrap;margin-top:24px}
9.dashboard-separator[_ngcontent-%COMP%]{margin-bottom:20px}.no-game[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center}.no-game[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:700;font-size:18px;line-height:25px;text-align:center;color:var(--text-primary)}"],changeDetection:0});let o=n;return o;})();var vt=(()=>{let n=class n{constructor(){this.offerId=null,this.modalTitle="Delete offer",this.dismiss=()=>{};}registerDismiss(e){this.dismiss=e;}setData(e){this.offerId=e.offerId;}onDeleteOffer(){this.dismiss(!0);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-delete-modal"]],decls:9,vars:1,consts:()=>{let e;e="Close";let t;t="Delete";let i;return i="Are you sure you want to delete this offer?",[i,[3,"closeClick"],[1,"text-primary","text-2xl","font-bold"],["text",e,"theme","secondary",3,"buttonClick"],["text",t,"theme","primary",3,"buttonClick"]];},template:function(t,i){t&1&&(a(0,"eld-small-modal-layout")(1,"eld-modal-title",1),u("closeClick",function(){return i.dismiss();}),a(2,"span",2),O(3),l()(),a(4,"p"),R(5,0),l(),a(6,"eld-modal-actions")(7,"eld-button",3),u("buttonClick",function(){return i.dismiss();}),l(),a(8,"eld-button",4),u("buttonClick",function(){return i.onDeleteOffer();}),l()()()),t&2&&(s(3),N(i.modalTitle));},dependencies:[$,w,H,L],encapsulation:2,changeDetection:0});let o=n;return o;})();function gr(o,n){o&1&&(a(0,"eld-alert",5),R(1,0),l());}function hr(o,n){if(o&1&&E(0,"eld-dashboard-offers-modal-note"),o&2){let r=_();Ie("smaller-margin",r.category===r.categoryEnum.Account);}}function Or(o,n){o&1&&E(0,"eld-dashboard-offers-modal-note",7);}function Ar(o,n){o&1&&(a(0,"div",11)(1,"h5"),R(2,1),l()());}function Tr(o,n){if(o&1&&(a(0,"form",12),E(1,"eld-dropdown",15),l()),o&2){let r=_();f("formGroup",r.deliveryTimeChangeFormGroup),s(),f("clearable",!1)("options",r.deliveryTimeOptions)("searchable",!1);}}function Dr(o,n){if(o&1){let r=A();a(0,"eld-button",16),u("buttonClick",function(){p(r);let t=_();return S(t.onSaveChanges());}),l();}}var Gt=(()=>{let n=class n{constructor(){this.gameCategory=null,this.offersFilter=null,this.offersStatusCount=null,this.attributes=[],this.categoryEnum=b,this.deliveryTimeOptions=[],this.areAllGameFiltersFullySelected=!1,this.modalTitle="",this.formBuilder=M(le),this.deliveryTimeChangeFormGroup=this.formBuilder.group({deliveryTimeOption:ee.Minute20}),this.dismiss=()=>{};}registerDismiss(e){this.dismiss=e;}setData(e){this.gameCategory=e.gameCategory,this.offerState=e.offerState,this.offersFilter=e.offersFilter,this.offersStatusCount=e.offersStatusCount,this.category=e.category,this.attributes=e.attributes,this.offersFilter?.category&&(this.areAllGameFiltersFullySelected=this.gameCategory!==null),this.getDeliveryTimeOptions();let t=Be(this.offersStatusCount,this.offerState);this.modalTitle="Change delivery time for ("+t+") offers";}onSaveChanges(){let e=this.deliveryTimeChangeFormGroup.get("deliveryTimeOption")?.value;e&&this.dismiss(e);}getDeliveryTimeOptions(){this.gameCategory&&this.category&&(this.deliveryTimeOptions=Wi(this.category,this.gameCategory?.gameId));}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-delivery-time-modal"]],decls:17,vars:10,consts:()=>{let e;e="Accounts with instant delivery time will not be affected.";let t;t="Close";let i;i="Save";let d;d=" These changes only apply to manual delivery orders, not automated ones. If you\u2019ve applied filters on the Offers page, only the filtered results will change. ";let C;C="To use this bulk action, close this window and select desired Game and Attributes in the filter section";let x;return x="Select delivery time",[d,C,[3,"closeClick"],[1,"text-primary","text-2xl","font-bold"],[1,"flex","flex-col","gap-5"],["type","info"],[3,"smaller-margin"],["text",e],[3,"offerState"],[3,"attributes","gameCategory","offersFilter"],[1,"separator"],[1,"no-game"],[3,"formGroup"],["text",t,"theme","secondary",3,"buttonClick"],["text",i,"theme","primary"],["bindLabel","label","bindValue","value","formControlName","deliveryTimeOption","label",x,1,"block","w-full",3,"clearable","options","searchable"],["text",i,"theme","primary",3,"buttonClick"]];},template:function(t,i){t&1&&(a(0,"eld-small-modal-layout")(1,"eld-modal-title",2),u("closeClick",function(){return i.dismiss();}),a(2,"span",3),O(3),l()(),a(4,"eld-scroller")(5,"div",4),m(6,gr,2,0,"eld-alert",5)(7,hr,1,2,"eld-dashboard-offers-modal-note",6),m(8,Or,1,0,"eld-dashboard-offers-modal-note",7),E(9,"eld-dashboard-offers-modal-state",8)(10,"eld-dashboard-offers-modal-filters",9),l()(),E(11,"hr",10),m(12,Ar,3,0,"div",11),m(13,Tr,2,4,"form",12),a(14,"eld-modal-actions")(15,"eld-button",13),u("buttonClick",function(){return i.dismiss();}),l(),m(16,Dr,1,0,"eld-button",14),l()()),t&2&&(s(3),N(i.modalTitle),s(3),c(i.category===i.categoryEnum.CustomItem?6:7),s(2),c(i.category===i.categoryEnum.Account?8:-1),s(),f("offerState",i.offerState),s(),f("attributes",i.attributes)("gameCategory",i.gameCategory)("offersFilter",i.offersFilter),s(2),c(i.areAllGameFiltersFullySelected?-1:12),s(),c(i.gameCategory&&i.areAllGameFiltersFullySelected&&i.deliveryTimeChangeFormGroup?13:-1),s(3),c(i.gameCategory&&i.areAllGameFiltersFullySelected?16:-1));},dependencies:[_t,de,Pe,_e,U,se,k,q,J,Z,Y,$,w,H,L,rt],styles:["h4[_ngcontent-%COMP%]{font-size:18px;line-height:25px;color:var(--text-primary);
9border-bottom:1px solid var(--divider-border)}.offer-modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex-wrap:wrap;margin-top:24px}.dashboard-separator[_ngcontent-%COMP%]{margin-bottom:20px}.no-game[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center}.no-game[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:700;font-size:18px;line-height:25px;text-align:center;color:var(--text-primary)}.smaller-margin[_ngcontent-%COMP%] p{margin-bottom:5px}"],changeDetection:0});let o=n;return o;})();function Rr(o,n){o&1&&(a(0,"div",3),E(1,"hr",7),a(2,"div",8)(3,"h5"),R(4,0),l()()());}function Mr(o,n){if(o&1){let r=A();a(0,"eld-button",9),u("buttonClick",function(){p(r);let t=_();return S(t.dismiss(!0));}),l();}}var Pt=(()=>{let n=class n{constructor(){this.gameCategory=null,this.offersFilter=null,this.offersStatusCount=null,this.attributes=[],this.areAllGameFiltersFullySelected=!1,this.modalTitle="",this.dismiss=()=>{};}registerDismiss(e){this.dismiss=e;}setData(e){this.gameCategory=e.gameCategory,this.offersFilter=e.offersFilter,this.offersStatusCount=e.offersStatusCount,this.attributes=e.attributes,this.offersFilter?.category&&(this.areAllGameFiltersFullySelected=this.gameCategory!==null),this.offersStatusCount&&(this.modalTitle="Pause ("+this.offersStatusCount.activeOffers+") active offers");}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-pause-all-modal"]],decls:11,vars:6,consts:()=>{let e;e="Close";let t;t="Pause";let i;return i="To use this bulk action, close this window and select desired Game and Attributes in the filter section",[i,[3,"closeClick"],[1,"text-primary","text-2xl","font-bold"],[1,"flex","flex-col","gap-5"],[3,"attributes","gameCategory","offersFilter"],["text",e,"theme","secondary",3,"buttonClick"],["text",t,"theme","primary"],[1,"separator"],[1,"no-game"],["text",t,"theme","primary",3,"buttonClick"]];},template:function(t,i){t&1&&(a(0,"eld-small-modal-layout")(1,"eld-modal-title",1),u("closeClick",function(){return i.dismiss();}),a(2,"span",2),O(3),l()(),a(4,"div",3),E(5,"eld-dashboard-offers-modal-note")(6,"eld-dashboard-offers-modal-filters",4),m(7,Rr,5,0,"div",3),l(),a(8,"eld-modal-actions")(9,"eld-button",5),u("buttonClick",function(){return i.dismiss();}),l(),m(10,Mr,1,0,"eld-button",6),l()()),t&2&&(s(3),N(i.modalTitle),s(3),f("attributes",i.attributes)("gameCategory",i.gameCategory)("offersFilter",i.offersFilter),s(),c(i.areAllGameFiltersFullySelected?-1:7),s(3),c(i.areAllGameFiltersFullySelected?10:-1));},dependencies:[de,_e,$,w,H,L],styles:["h4[_ngcontent-%COMP%]{font-size:18px;line-height:25px;color:var(--text-primary);border-bottom:1px solid var(--divider-border)}.offer-modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex-wrap:wrap;margin-top:24px}
9.dashboard-separator[_ngcontent-%COMP%]{margin-bottom:20px}.no-game[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center}.no-game[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:700;font-size:18px;line-height:25px;text-align:center;color:var(--text-primary)}"],changeDetection:0});let o=n;return o;})();function Fr(o,n){o&1&&(a(0,"div",3),E(1,"hr",7),a(2,"div",8)(3,"h5"),R(4,0),l()()());}function br(o,n){if(o&1){let r=A();a(0,"eld-button",9),u("buttonClick",function(){p(r);let t=_();return S(t.dismiss(!0));}),l();}}var Bt=(()=>{let n=class n{constructor(){this.gameCategory=null,this.offersFilter=null,this.offersStatusCount=null,this.attributes=[],this.areAllGameFiltersFullySelected=!1,this.modalTitle="",this.dismiss=()=>{};}registerDismiss(e){this.dismiss=e;}setData(e){this.gameCategory=e.gameCategory,this.offersFilter=e.offersFilter,this.offersStatusCount=e.offersStatusCount,this.attributes=e.attributes,this.offersFilter?.category&&(this.areAllGameFiltersFullySelected=this.gameCategory!==null),this.offersStatusCount&&(this.modalTitle="Resume ("+this.offersStatusCount.pausedOffers+") paused offers");}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-resume-all-modal"]],decls:11,vars:6,consts:()=>{let e;e="Close";let t;t="Resume";let i;return i="To use this bulk action, close this window and select desired Game and Attributes in the filter section",[i,[3,"closeClick"],[1,"text-primary","text-2xl","font-bold"],[1,"flex","flex-col","gap-5"],[3,"attributes","gameCategory","offersFilter"],["text",e,"theme","secondary",3,"buttonClick"],["text",t,"theme","primary"],[1,"separator"],[1,"no-game"],["text",t,"theme","primary",3,"buttonClick"]];},template:function(t,i){t&1&&(a(0,"eld-small-modal-layout")(1,"eld-modal-title",1),u("closeClick",function(){return i.dismiss();}),a(2,"span",2),O(3),l()(),a(4,"div",3),E(5,"eld-dashboard-offers-modal-note")(6,"eld-dashboard-offers-modal-filters",4),m(7,Fr,5,0,"div",3),l(),a(8,"eld-modal-actions")(9,"eld-button",5),u("buttonClick",function(){return i.dismiss();}),l(),m(10,br,1,0,"eld-button",6),l()()),t&2&&(s(3),N(i.modalTitle),s(3),f("attributes",i.attributes)("gameCategory",i.gameCategory)("offersFilter",i.offersFilter),s(),c(i.areAllGameFiltersFullySelected?-1:7),s(3),c(i.areAllGameFiltersFullySelected?10:-1));},dependencies:[de,_e,$,w,H,L],styles:["h4[_ngcontent-%COMP%]{font-size:18px;line-height:25px;color:var(--text-primary);border-bottom:1px solid var(--divider-border)}.offer-modal-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex-wrap:wrap;margin-top:24px}
9.dashboard-separator[_ngcontent-%COMP%]{margin-bottom:20px}.no-game[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;text-align:center}.no-game[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:700;font-size:18px;line-height:25px;text-align:center;color:var(--text-primary)}"],changeDetection:0});let o=n;return o;})();var wt=(()=>{let n=class n{constructor(){this.modalTitle="Export offers",this.dismiss=()=>{};}registerDismiss(e){this.dismiss=e;}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-export-csv-modal"]],decls:10,vars:1,consts:()=>{let e;e="Close";let t;return t="Offer creation year",[t,[3,"closeClick"],[1,"text-primary","text-2xl","font-bold"],[1,"flex","flex-col","items-start","gap-3"],["timeRange","yearly",3,"export"],["text",e,"theme","secondary",3,"buttonClick"]];},template:function(t,i){t&1&&(a(0,"eld-small-modal-layout")(1,"eld-modal-title",1),u("closeClick",function(){return i.dismiss();}),a(2,"span",2),O(3),l()(),a(4,"div",3)(5,"p"),R(6,0),l(),a(7,"eld-dashboard-export-csv",4),u("export",function(C){return i.dismiss(C);}),l()(),a(8,"eld-modal-actions")(9,"eld-button",5),u("buttonClick",function(){return i.dismiss();}),l()()()),t&2&&(s(3),N(i.modalTitle));},dependencies:[$,w,H,L,pn],encapsulation:2,changeDetection:0});let o=n;return o;})();var Ht=(()=>{let n=class n{constructor(){this.offersFilterSelectSkeleton={width:"100%",height:"42px",margin:0};}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-filter-skeleton"]],decls:1,vars:2,consts:[[3,"count","theme"]],template:function(t,i){t&1&&E(0,"ngx-skeleton-loader",0),t&2&&f("count",3)("theme",i.offersFilterSelectSkeleton);},dependencies:[lt,st],styles:["ngx-skeleton-loader[_ngcontent-%COMP%]{display:flex;gap:10px;width:100%;flex-direction:column}@media(min-width:601px){ngx-skeleton-loader[_ngcontent-%COMP%]{flex-direction:row}}[_nghost-%COMP%] ngx-skeleton-loader>div{max-width:100%}@media(min-width:601px){[_nghost-%COMP%] ngx-skeleton-loader>div{max-width:160px}}"],changeDetection:0});let o=n;return o;})();var xr=()=>[1,2,3,4,5,6,7,8];function Ir(o,n){if(o&1&&(a(0,"div",1)(1,"div",4),E(2,"ngx-skeleton-loader",5),l(),a(3,"div",6)(4,"div",7),E(5,"ngx-skeleton-loader",5)(6,"ngx-skeleton-loader",5),l(),E(7,"ngx-skeleton-loader",8),l()()),o&2){let r=_();s(2),f("theme",r.offerHeaderSkeleton),s(3),f("theme",r.offerImageSkeleton),s(),f("theme",r.offerTitleSkeleton),s(),f("theme",r.offerQuantityInputSkeleton);}}var $t=(()=>{let n=class n{constructor(){this.offerHeaderSkeleton={width:"115px",height:"16px",margin:0},this.offerImageSkeleton={width:"58px",height:"58px",margin:0},this.offerTitleSkeleton={width:"87px",height:"17px",margin:"0 0 3px 0"},this.offerQuantityInputSkeleton={width:"220px",height:"44px",margin:0},this.loadingSkeletonTheme={width:"7px",height:"7px",margin:"13px 5px"};}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-list-skeleton"]],decls:5,vars:2,consts:[[1,"offers-list"],[1,"offer"],[1,"offers-loading"],["appearance","circle","count","3",3,"theme"],[1,"offer__top"],[3,"theme"],[1,"offer__bottom"],[1,"offer-details"],[1,"offer-quantity",3,"theme"]],template:function(t,i){t&1&&(a(0,"div",0),j(1,Ir,8,4,"div",1,Ye),a(3,"div",2),E(4,"ngx-skeleton-loader",3),l()()),t&2&&(s(),K(ri(1,xr)),s(3),f("theme",i.loadingSkeletonTheme));},dependencies:[lt,st],styles:[".offers-list[_ngcontent-%COMP%]{margin-top:20px;display:flex;flex-direction:column;gap:10px}.offer[_ngcontent-%COMP%]{position:relative;height:295px;background:var(--background-base-1);box-shadow:var(--shadow-base)}@media(min-width:841px){.offer[_ngcontent-%COMP%]{height:132px}}.offer__top[_ngcontent-%COMP%]{height:70px;display:flex;align-items:center;padding:8px 10px;border-bottom:1px solid var(--divider-border)}@media(min-width:841px){.offer__top[_ngcontent-%COMP%]{height:51px;padding:10px 24px 8px}}.offer__bottom[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:11px;padding:8px 10px}@media(min-width:841px){.offer__bottom[_ngcontent-%COMP%]{padding:10px 24px}}.offer-details[_ngcontent-%COMP%]{display:flex;align-items:center;gap:11px}.offers-loading[_ngcontent-%COMP%]{display:flex;justify-content:center}.offer-quantity[_ngcontent-%COMP%]{position:absolute;bottom:8px;right:32px}@media(min-width:841px){.offer-quantity[_ngcontent-%COMP%]{position:static;bottom:unset;right:unset}}"],changeDetection:0});let o=n;return o;})();var kt=(()=>{let n=class n{constructor(){this.offersStatusCount=null,this.offerStatusEnum=h,this.filterOptions=[];}ngOnInit(){this.updateFilterOptions();}
9ngOnChanges(e){e.offersStatusCount&&this.updateFilterOptions();}updateFilterOptions(){this.filterOptions=[{label:"All",value:"ALL_STATUS"},{label:"Active offers ("+(this.offersStatusCount?.activeOffers??0)+")",value:h[h.Active]},{label:"Paused offers ("+(this.offersStatusCount?.pausedOffers??0)+")",value:h[h.Paused]},{label:"Closed offers ("+(this.offersStatusCount?.closedOffers??0)+")",value:h[h.Closed]}];}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-state-filter"]],inputs:{offerStatusFormGroup:"offerStatusFormGroup",offersStatusCount:"offersStatusCount"},features:[re],decls:2,vars:4,consts:[[1,"w-full",3,"formGroup"],["bindLabel","label","bindValue","value","formControlName","offersFilter",3,"clearable","options","searchable"]],template:function(t,i){t&1&&(a(0,"form",0),E(1,"eld-dropdown",1),l()),t&2&&(f("formGroup",i.offerStatusFormGroup),s(),f("clearable",!1)("options",i.filterOptions)("searchable",!1));},dependencies:[U,se,k,q,J,Z,Y],encapsulation:2,changeDetection:0});let o=n;return o;})();function Nr(o,n){if(o&1){let r=A();a(0,"eld-button",9),u("buttonClick",function(){p(r);let t=_();return S(t.openExportCsvModal());}),l();}}function Lr(o,n){o&1&&E(0,"eld-dashboard-offers-filter-skeleton")(1,"eld-dashboard-offers-list-skeleton");}function vr(o,n){if(o&1&&(a(0,"eld-alert",10)(1,"strong"),R(2,1),l(),a(3,"span"),R(4,2),l()()),o&2){_();let r=W(0);s(2),ce(r.length)(r.length),pe(2);}}function Gr(o,n){if(o&1){let r=A();a(0,"eld-dashboard-augmented-game-picker",18),u("attributesChange",function(t){p(r);let i=_(3);return S(i.updateAttributeQueryParams(t));})("augmentedGameChange",function(t){p(r);let i=_(3);return S(i.updateUrlQueryParams(t));})("gameIdChange",function(t){let i=p(r),d=_(3);return S(d.onGameIdChange(t,i));}),l();}if(o&2){let r=_(3);f("attributes",r.attributes)("attributesLoading",r.attributesLoading)("augmentedGame",r.augmentedGame)("category",r.category)("defaultIsNull",!0)("gameCategory",r.gameCategory)("gameId",r.gameId)("gamesCategories",n)("showDefaultAllValue",!0);}}function Pr(o,n){if(o&1&&(a(0,"div",13),E(1,"eld-dashboard-offers-state-filter",19),l()),o&2){let r=_(3),e=W(6);s(),f("offersStatusCount",e)("offerStatusFormGroup",r.offerStatusFormGroup);}}function Br(o,n){if(o&1&&E(0,"eld-dashboard-offers-delivery-method-filter",14),o&2){let r=_(3);f("deliveryMethodControl",r.deliveryTimeControl);}}function wr(o,n){if(o&1){let r=A();a(0,"div",15)(1,"eld-dashboard-action-dropdown",20),T(2,"async"),u("changeDeliveryTime",function(){p(r);let t=_(3);return S(t.openOffersDeliveryTimeModal());})("changePrice",function(){p(r);let t=_(3);return S(t.openOffersChangePriceModal());})("deleteAllOffers",function(){p(r);let t=_(3);return S(t.openDeleteAllOffersModal());})("pauseAllOffers",function(){p(r);let t=_(3);return S(t.openPauseAllOffersModal());})("resumeAllOffers",function(){p(r);let t=_(3);return S(t.openResumeAllOffersModal());}),l()();}if(o&2){let r=_(3),e=W(6);s(),f("canShowBulkActions",D(2,4,r.canShowBulkActions$)??!1)("isAutomatedDeliveryFilterActive",r.isAutomatedDeliveryFilterActive())("offersStatusCount",e)("offerState",r.offerState);}}function Hr(o,n){if(o&1&&(a(0,"div",16),E(1,"eld-search",21),l()),o&2){let r=_(3);s(),f("searchQuery",r.searchQuery||null);}}function $r(o,n){if(o&1){let r=A();a(0,"eld-game-offer-sort",22),u("sortTypeChange",function(t){p(r);let i=_(3);return i.updateSortQueryParams(t),S(i.scrollToTop());}),l();}if(o&2){let r=_(3);f("sortType",r.sortType);}}function kr(o,n){if(o&1&&(a(0,"div",11),m(1,Gr,1,9,"eld-dashboard-augmented-game-picker",12),m(2,Pr,2,2,"div",13),m(3,Br,1,1,"eld-dashboard-offers-delivery-method-filter",14),m(4,wr,3,6,"div",15),m(5,Hr,2,1,"div",16),m(6,$r,1,1,"eld-game-offer-sort",17),T(7,"isFlexible"),l()),o&2){let r,e=_(),t=_();s(),c((r=e.getByCategorySorted(t.category))?1:-1,r),s(),c(t.hasAnyOffers?2:-1),s(),c(t.showDeliveryMethodFilter()?3:-1),s(),c(t.hasAnyOffers?4:-1),s(),c(t.isFlexibleOffer()?5:-1),s(),c(D(7,6,t.category)?6:-1);}}function Ur(o,n){if(o&1&&E(0,"eld-no-results",24),o&2){let r=_(3);f("texts",r.noItemsTexts);}}function Vr(o,n){if(o&1){let r=A();a(0,"eld-dashboard-offers-list",23),T(1,"async"),u("copyPrivateLink",function(t){p(r);let i=_(2);return S(i.copyOfferPrivateLink(t));})("delete",function(t){p(r);let i=_(2);return S(i.openDeleteOfferModal(t));})("pauseOffer",function(t){p(r);let i=_(2);return S(i.pauseOffer(t));})("priceChange",function(t){p(r);let i=_(2);return S(i.changeSingleOfferPrice(t));})("resumeOffer",function(t){p(r);let i=_(2);return S(i.resumeOffer(t));})("showOfferToaster",function(t){p(r);let i=_(2);return S(i.onShowOfferToaster(t));}),l(),m(2,Ur,1,1,"eld-no-results",24),a(3,"eld-pagination",25),ke("activePageChange",function(t){p(r);let i=_(2);return $e(i.pageIndex,t)||(i.pageIndex=t),S(t);}),u("activePageChange",function(t){p(r);let i=_(2);return S(i.onPageChange(t));}),l();}if(o&2){let r=n,e=_(),t=_();f("appConstants",D(1,9,t.appConstants$))("library",e)("offerImagePath",t.offerImagePath)("offers",r.results)("uploadedOfferIds",t.uploadedOfferIds()),s(2),c(r.recordCount===0?2:-1),s(),f("pageSize",t.pageSize)("recordCount",r.recordCount),He("activePage",t.pageIndex);}}function zr(o,n){if(o&1&&E(0,"eld-no-results",24),o&2){let r=_(3);f("texts",r.noItemsTexts);}}function Yr(o,n){if(o&1){let r=A();a(0,"eld-dashboard-offers-list",26),T(1,"async"),u("copyPrivateLink",function(t){p(r);let i=_(2);return S(i.copyOfferPrivateLink(t));})("delete",function(t){p(r);let i=_(2);return S(i.openDeleteOfferModal(t));})("pauseOffer",function(t){p(r);let i=_(2);return S(i.pauseOffer(t));})("priceChange",function(t){p(r);let i=_(2);return S(i.changeSingleOfferPrice(t));})("resumeOffer",function(t){p(r);let i=_(2);return S(i.resumeOffer(t));})("showOfferToaster",function(t){p(r);let i=_(2);return S(i.onShowOfferToaster(t));}),l(),m(2,zr,1,1,"eld-no-results",24),a(3,"eld-pagination",25),ke("activePageChange",function(t){p(r);let i=_(2);return $e(i.pageIndex,t)||(i.pageIndex=t),S(t);}),u("activePageChange",function(t){p(r);let i=_(2);return S(i.onPageChange(t));}),l();}if(o&2){let r=n,e=_(),t=_();f("appConstants",D(1,8,t.appConstants$))("library",e)("offerImagePath",t.offerImagePath)("offers",r.results),s(2),c(r.recordCount===0?2:-1),s(),f("pageSize",t.pageSize)("recordCount",r.recordCount),He("activePage",t.pageIndex);}}function Xr(o,n){if(o&1&&(Ce(0),m(1,vr,5,2,"eld-alert",10),m(2,kr,8,8,"div",11),m(3,Vr,4,11),T(4,"async"),m(5,Yr,4,10),T(6,"async")),o&2){let r,e,t=_(),i=Fe(t.uploadedOfferIds());
9s(),c(i.length?1:-1),s(),c(t.isFirstPageLoad?-1:2),s(),c((r=D(4,5,t.offers$))?3:-1,r),s(2),c((e=D(6,7,t.flexibleOffers$))?5:-1,e);}}var Xf=(()=>{let n=class n{constructor(){this.overlay=null,this.gameCategory=null,this.gameId=null,this.offersFilter=null,this.offersStatusCount=null,this.hasAnyOffers=!1,this.hasLastOfferInPage=!1,this.isFirstPageLoad=!0,this.isAscending=null,this.offerSortingCriterion=null,this.offerImagePath=di.offerImagePath.fullPath,this.offerStatusEnum=h,this.pageIndex=Te.pageIndex,this.pageSize=Te.pageSize,this.noItemsTexts={heading:"Nothing found",bottomText:"Try to adjust filters to find what you are looking for or create a new offer"},this.appConstants$=z(null),this.userProfile$=z(null),this.flexibleOffers$=z(null),this.gameCategory$=z(null),this.isOffersLoaded$=z(!1),this.offers$=z(null),this.offersStatusCount$=z(null),this.library$=z(null),this.gameCategoriesFiltered=[],this.offlineMode$=z(null),this.sortType=fo.Recommended,this.attributes=[],this.attributesLoading=!1,this.deliveryTime=me(null),this.deliveryTimeControl=new Oe(null),this.showDeliveryMethodFilter=P(()=>{let e=this.currentGameId();return this.currentCategory()===b.CustomItem&&(!e||Ji.includes(e));}),this.isAutomatedDeliveryFilterActive=P(()=>this.deliveryTime()===ee.Automated),this._unsubscribe$=new Ue(),this.platform=M(gi),this.destroyRef=M(ze),this.activatedRoute=M(qe),this.store=M(he),this.seoTagService=M(Bi),this.navigateService=M(Di),this.router=M(mi),this.fb=M(le),this.clipboard=M(fn),this.attributesMetadataApi=M(Yi),this.attributeSerializer=M(_o),this.overlays=M(xi),this.cdr=M(si),this.uploadedOfferIds=this.store.selectSignal(tn),this.currentCategory=me(null),this.currentGameId=me(null);}get attributesParams(){return this.attributeSerializer.serializeToParams(this.attributes);}ngOnInit(){this.setSeoTags(),this.initSelectors(),this.platform.browser&&(this.initAndSubscribeOfferStatusFormGroup(),this.subscribeDeliveryTimeControl(),this.subscribeRouteChanges(),this.subscribeOffersStatusCount(),this.subscribeGame(),this.subscribeLoadedOffers(),this.subscribeOffers(),this.subscribeOfflineModeStatus(),this.subscribeOffersFilter()),this.activatedRoute.queryParams.pipe(ge(this.destroyRef)).subscribe(e=>{let t=e.offerSortingCriterion??null,i=Ct(e.isAscending);this.sortType=po(t,i??!1),this.cdr.markForCheck();});}ngOnDestroy(){this.seoTagService.removeNoIndexTag(),this.store.dispatch(new uo()),this.store.dispatch(new Tt()),this.store.dispatch(new Rt()),this._unsubscribe$.next(),this._unsubscribe$.complete(),this.overlay?.dismiss();}onGameIdChange(e,t){let i=t?.find(C=>C.gameId===e),d={pageIndex:this.isFirstPageLoad?this.pageIndex:Te.pageIndex,gameId:null,tradeEnvironmentId:null,deliveryTime:null};for(let C of this.attributes)d[C.id]=null;this.attributes=[],i&&(d.gameId=i.gameId,this.gameId===i.gameId&&(d.tradeEnvironmentId=this.currentTradeEnvIds)),this.navigateService.updateQueryParams(d);}updateUrlQueryParams(e){this.navigateService.updateQueryParams({gameId:e.gameCategory.gameId,tradeEnvironmentId:e.environmentOptions?Ae.getDeepestChildId(e.environmentOptions.map(t=>t.id)):null,pageIndex:this.isFirstPageLoad?this.pageIndex:Te.pageIndex});}updateAttributeQueryParams(e){this.attributes=e;let t={};for(let i of this.attributes){let d=this.attributeSerializer.serializeAttributeValue(i);t[i.id]=d||null;}this.navigateService.updateQueryParams(t);}onShowOfferToaster(e){this.store.dispatch(Ti({payload:e}));}deleteOffer(e){let t={id:e,hasLastOfferInPage:this.hasLastOfferInPage};F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new wo(t)):this.store.dispatch(new ho(t)):F.isPredefined(this.category)&&this.store.dispatch(new go(t)),Se.scrollToTop();}resumeAllOffers(){if(!this.gameId)return;let e=V({gameId:this.gameId,category:this.category,tradeEnvironmentId:this.currentTradeEnvIds,deliveryTime:this.deliveryTime()},this.attributesParams);F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new Vo(e)):this.store.dispatch(new Ao(e)):F.isPredefined(this.category)&&this.store.dispatch(new Oo(e)),Se.scrollToTop();}pauseAllOffers(){if(!this.gameId)return;let e=V({gameId:this.gameId,category:this.category,tradeEnvironmentId:this.currentTradeEnvIds,deliveryTime:this.deliveryTime()},this.attributesParams);F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new Uo(e)):this.store.dispatch(new Do(e)):F.isPredefined(this.category)&&this.store.dispatch(new To(e)),Se.scrollToTop();}deleteAllOffers(){if(!this.gameId)return;let e=V({gameId:this.gameId,category:this.category,tradeEnvironmentId:this.currentTradeEnvIds,offerState:this.offerState??null,deliveryTime:this.deliveryTime()},this.attributesParams);F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new zo(e)):this.store.dispatch(new No(e)):F.isPredefined(this.category)&&this.store.dispatch(new Io(e)),Se.scrollToTop();}pauseOffer(e){let t={id:e,hasLastOfferInPage:this.hasLastOfferInPage};F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new Ho(t)):this.store.dispatch(new bo(t)):F.isPredefined(this.category)&&this.store.dispatch(new Fo(t));}resumeOffer(e){let t={id:e,hasLastOfferInPage:this.hasLastOfferInPage};F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new $o(t)):this.store.dispatch(new Mo(t)):F.isPredefined(this.category)&&this.store.dispatch(new Ro(t));}changeAllDeliveryTimes(e){if(!this.gameId)return;let t=V({gameId:this.gameId,category:this.category,tradeEnvironmentId:this.currentTradeEnvIds,deliveryTime:e||null,offerState:this.offerState??null},this.attributesParams);F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new Yo(t)):this.store.dispatch(new vo(t)):F.isPredefined(this.category)&&this.store.dispatch(new Lo(t)),Se.scrollToTop();}changeOffersPrice(e){if(!this.gameId)return;let t=V({gameId:this.gameId,category:this.category,tradeEnvironmentId:this.currentTradeEnvIds,amount:e??null,currency:"USD",offerState:this.offerState,deliveryTime:this.deliveryTime()},this.attributesParams);F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new Xo(t)):this.store.dispatch(new Po(t)):F.isPredefined(this.category)&&this.store.dispatch(new Go(t)),Se.scrollToTop();}changeSingleOfferPrice(e){if(F.isFlexible(this.category)){let t=!!this.offerSortingCriterion||this.category===b.CustomItem,i=V({offerPrice:e}
9,t&&{params:this.currentParams});this.category===b.CustomItem?this.store.dispatch(new ko(i)):this.store.dispatch(new xo(i));}else F.isPredefined(this.category)&&this.store.dispatch(new yo(e));}copyOfferPrivateLink(e){this.clipboard.copy(e),this.store.dispatch(Ai({payload:"Copied to clipboard"}));}exportCsv(e){this.gameId&&this.store.dispatch(new Qo(V(V({gameId:this.gameId,category:this.category,tradeEnvironmentId:this.currentTradeEnvIds,offerState:this.offerState?this.offerState:null,deliveryTime:this.deliveryTime()},this.attributesParams),e)));}openDeleteOfferModal(e){e&&(this.overlay=this.overlays.displayResponsiveModal({content:vt,data:{offerId:e},onDismiss:t=>{t&&this.deleteOffer(e);}}));}openDeleteAllOffersModal(){this.overlay=this.overlays.displayResponsiveModal({content:Lt,data:{gameCategory:this.gameCategory,offerState:this.offerState,offersFilter:this.offersFilter,offersStatusCount:this.offersStatusCount,attributes:this.attributes},onDismiss:e=>{e&&this.deleteAllOffers();}});}openPauseAllOffersModal(){this.overlay=this.overlays.displayResponsiveModal({content:Pt,data:{gameCategory:this.gameCategory,offersFilter:this.offersFilter,offersStatusCount:this.offersStatusCount,attributes:this.attributes},onDismiss:e=>{e&&this.pauseAllOffers();}});}openResumeAllOffersModal(){this.overlay=this.overlays.displayResponsiveModal({content:Bt,data:{gameCategory:this.gameCategory,offersFilter:this.offersFilter,offersStatusCount:this.offersStatusCount,attributes:this.attributes},onDismiss:e=>{e&&this.resumeAllOffers();}});}openOffersDeliveryTimeModal(){this.overlay=this.overlays.displayResponsiveModal({content:Gt,data:{gameCategory:this.gameCategory,offerState:this.offerState,offersFilter:this.offersFilter,offersStatusCount:this.offersStatusCount,category:this.category,attributes:this.attributes},onDismiss:e=>{e&&this.changeAllDeliveryTimes(e);}});}openOffersChangePriceModal(){this.overlay=this.overlays.displayResponsiveModal({content:Nt,data:{gameCategory:this.gameCategory,offerState:this.offerState,offersFilter:this.offersFilter,offersStatusCount:this.offersStatusCount,attributes:this.attributes},onDismiss:e=>{e!==void 0&&this.changeOffersPrice(e);}});}openExportCsvModal(){this.overlay=this.overlays.displayDialog({content:wt,onDismiss:e=>{e&&this.exportCsv(e);}});}filterOffers(e){let t=this.activatedRoute.snapshot.queryParams.offerState??null;e!==t&&this.navigateService.updateQueryParams({offerState:e,pageIndex:this.isFirstPageLoad?this.pageIndex:Te.pageIndex});}onPageChange(e){this.navigateService.updateQueryParams({pageIndex:e}),Se.scrollToTop(void 0,700);}isPredefinedOffer(){return F.isPredefined(this.category);}isFlexibleOffer(){return F.isFlexible(this.category);}updateSortQueryParams(e){let t={gamePageOfferIndex:null,gamePageOfferSize:null},{offerSortingCriterion:i,isAscending:d}=co(e);this.navigateService.updateQueryParams(we(V({},t),{offerSortingCriterion:i,isAscending:d}));}scrollToTop(){Se.scrollToTop();}subscribeLoadedOffers(){this.isOffersLoaded$.pipe(fe(this._unsubscribe$)).subscribe(e=>{e&&(this.isFirstPageLoad=!1,this.cdr.markForCheck());});}initAndSubscribeOfferStatusFormGroup(){this.offerStatusFormGroup=this.fb.group({offersFilter:"ALL_STATUS"}),this.offerStatusFormGroup.controls.offersFilter.valueChanges.pipe(fe(this._unsubscribe$),Vt()).subscribe(e=>{this.filterOffers(e!=="ALL_STATUS"?e:null);});}subscribeDeliveryTimeControl(){this.deliveryTimeControl.valueChanges.pipe(ge(this.destroyRef)).subscribe(e=>this.filterOffersByDeliveryTime(e));}parseDeliveryTimeParam(e){return e===ee.Automated?ee.Automated:null;}filterOffersByDeliveryTime(e){let t=this.parseDeliveryTimeParam(this.activatedRoute.snapshot.queryParams.deliveryTime);e!==t&&this.navigateService.updateQueryParams({deliveryTime:e,pageIndex:Te.pageIndex});}subscribeOffers(){this.offers$.pipe(fe(this._unsubscribe$)).subscribe(e=>{this.hasLastOfferInPage=e?.results?.length===1;});}subscribeRouteChanges(){this.router.events.pipe(ft(e=>e instanceof fi),Ve(null),Re(()=>this.activatedRoute.snapshot),ge(this.destroyRef)).subscribe(({params:e,queryParams:t})=>{let i=t.gameId,d=e.category,C=this.category!==d||this.gameId!==i;this.category&&this.category!==d&&this.store.dispatch(new Rt()),(C||!t.offerState)&&this.offerStatusFormGroup.controls.offersFilter.setValue("ALL_STATUS");let x=this.parseDeliveryTimeParam(t.deliveryTime);this.deliveryTimeControl.value!==x&&this.deliveryTimeControl.setValue(x,{emitEvent:!1}),i&&d?C&&this.store.dispatch(new Hi({category:d,gameId:i})):this.store.dispatch(new Tt()),this.updateOfferVariables(we(V({},t),{category:d})),this.updateAugmentedGame(),this.resolveMetadataAndLoadOffers(t,C),this.cdr.markForCheck();});}resolveMetadataAndLoadOffers(e,t){if(this.gameId&&this.category&&(t||!this.attributes.length)){this.attributes=[],this.attributesLoading=!0,this.attributesMetadataApi.getFilterAttributesMetadataAsObservable(this.gameId,this.category).pipe(Re(i=>i.filter(d=>
9d.type==="Select")),ge(this.destroyRef),Ut(()=>z([])),zt(()=>{this.attributesLoading=!1,this.cdr.markForCheck();})).subscribe(i=>{this.attributes=this.attributeSerializer.parseFromParams(e,i),this.loadOffersByCategory();});return;}this.loadOffersByCategory();}loadOffersByCategory(){this.currentParams=this.getCurrentQueryParams(),F.isFlexible(this.category)?this.category===b.CustomItem?this.store.dispatch(new Bo(this.currentParams)):this.store.dispatch(new Co(this.currentParams)):F.isPredefined(this.category)&&this.store.dispatch(new Eo(this.currentParams));}updateAugmentedGame(){this.gameCategory&&(this.augmentedGame={gameCategory:this.gameCategory,environmentOptions:be(this.currentTradeEnvIds,this.gameCategory.tradeEnvironments??null)});}updateOfferVariables(e){this.gameId=e.gameId,this.category=e.category,this.offerSortingCriterion=e.offerSortingCriterion,this.isAscending=Ct(e.isAscending),this.searchQuery=e.searchQuery,this.offerState=e.offerState,this.deliveryTime.set(this.parseDeliveryTimeParam(e.deliveryTime)),this.pageIndex=e.pageIndex?+e.pageIndex:Te.pageIndex,this.currentTradeEnvIds=e.tradeEnvironmentId,this.currentCategory.set(this.category),this.currentGameId.set(this.gameId??null),this.updateGameCategoriesFiltered();}updateGameCategoriesFiltered(){if(!this.category){this.gameCategoriesFiltered=[];return;}this.library$.pipe(Yt()).subscribe(e=>{this.gameCategoriesFiltered=e?e.getByCategorySorted(this.category):[];});}getCurrentQueryParams(){return{pageIndex:this.pageIndex,pageSize:this.pageSize,offerState:this.offerState,deliveryTime:this.deliveryTime(),gameId:this.gameId,category:this.category,tradeEnvironmentId:this.currentTradeEnvIds,searchQuery:this.searchQuery,offerSortingCriterion:this.offerSortingCriterion,isAscending:this.isAscending,attributes:this.attributesParams};}subscribeGame(){this.gameCategory$.pipe(fe(this._unsubscribe$)).subscribe(e=>{if(this.gameCategory=e,!this.gameCategory){this.cdr.markForCheck();return;}this.augmentedGame={gameCategory:this.gameCategory,environmentOptions:be(this.currentTradeEnvIds,this.gameCategory.tradeEnvironments??null)},this.cdr.markForCheck();});}subscribeOffersStatusCount(){this.offersStatusCount$.pipe(fe(this._unsubscribe$)).subscribe(e=>{this.offersStatusCount=e,this.hasAnyOffers=e?e.activeOffers>0||e.closedOffers>0||e.pausedOffers>0:!1,this.cdr.markForCheck();});}subscribeOffersFilter(){this.offersFilter$.pipe(ge(this.destroyRef)).subscribe(e=>{this.offersFilter=e;});}subscribeOfflineModeStatus(){this.offlineMode$.pipe(fe(this._unsubscribe$),ft(e=>!Ot(e))).subscribe(e=>{let t=e.isOffline();!Ot(this.isOffline)&&t!==this.isOffline&&window.location.reload(),this.isOffline=t;});}setSeoTags(){this.seoTagService.setNoIndexTag();}initSelectors(){this.gameCategory$=this.store.pipe(ie($i)),this.offers$=this.store.pipe(ie(jo)),this.offersFilter$=this.store.pipe(ie(Wo)),this.predefinedAndFlexibleOffers$=this.store.pipe(ie(Jo)),this.offersStatusCount$=this.store.pipe(ie(Zo)),this.userProfile$=this.store.select(Ri),this.isOffersLoaded$=this.store.pipe(ie(qo)),this.appConstants$=this.store.pipe(ie(Mi)),this.library$=this.store.pipe(ie(Gi)),this.offlineMode$=this.store.pipe(ie(wi)),this.flexibleOffers$=this.store.pipe(ie(Ko)),this.canShowBulkActions$=this.store.select(en);}};n.ɵfac=function(t){return new(t||n)();},n.ɵcmp=g({type:n,selectors:[["eld-dashboard-offers-page"]],decls:16,vars:15,consts:()=>{let e;e="Offers";let t;t="Export";let i;i="New Offer";let d;d="Want to pause all your offers?";let C;C=" Toggle on "+"[\uFFFD#11\uFFFD|\uFFFD#12\uFFFD]"+"Offline mode"+"[\uFFFD/#11\uFFFD|\uFFFD/#12\uFFFD]"+" under your "+"[\uFFFD#11\uFFFD|\uFFFD#12\uFFFD]"+"Account settings"+"[\uFFFD/#11\uFFFD|\uFFFD/#12\uFFFD]"+". That way there\u2019s no need to pause each offer one by one. ",C=St(C);let x;x="{VAR_PLURAL, plural, =1 {1 offer uploaded successfully.} other {{INTERPOLATION} offers uploaded successfully.}}",x=St(x,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let G;G=""+x+" ";let De;De="They are now live and visible to buyers.";let te;te="Bulk actions";let ue;return ue="Search offers",[C,G,De,["header",e,"icon","boosting",1,"block","max-w-262","2xl:pr-6"],[1,"mt-4","grid","w-full","gap-4","sm:w-auto","md:mt-0"],["
9iconAfterText","download","text",t,"theme","secondary"],["dataTestId","order-page-create-new-offer-button-Nax2","text",i,1,"create-offer-button",3,"isDisabled","link"],[1,"dashboard-container"],["title",d,"type","info",1,"mb-5","block"],["iconAfterText","download","text",t,"theme","secondary",3,"buttonClick"],["type","success",1,"mb-5","block"],[1,"mb-2.5","flex","flex-wrap"],[3,"attributes","attributesLoading","augmentedGame","category","defaultIsNull","gameCategory","gameId","gamesCategories","showDefaultAllValue"],[1,"offer-status-and-bulk-actions-row"],[1,"mb-2.5","block","w-full","sm:mr-2.5","sm:mb-0","sm:w-45",3,"deliveryMethodControl"],[1,"offers-filter-bulk-actions"],[1,"offer-search"],[3,"sortType"],[3,"attributesChange","augmentedGameChange","gameIdChange","attributes","attributesLoading","augmentedGame","category","defaultIsNull","gameCategory","gameId","gamesCategories","showDefaultAllValue"],[3,"offersStatusCount","offerStatusFormGroup"],["placeholder",te,3,"changeDeliveryTime","changePrice","deleteAllOffers","pauseAllOffers","resumeAllOffers","canShowBulkActions","isAutomatedDeliveryFilterActive","offersStatusCount","offerState"],["placeholder",ue,1,"block","w-full","sm:w-50",3,"searchQuery"],[3,"sortTypeChange","sortType"],[3,"copyPrivateLink","delete","pauseOffer","priceChange","resumeOffer","showOfferToaster","appConstants","library","offerImagePath","offers","uploadedOfferIds"],[1,"px-[30px]","pt-[40px]",3,"texts"],[3,"activePageChange","pageSize","recordCount","activePage"],[3,"copyPrivateLink","delete","pauseOffer","priceChange","resumeOffer","showOfferToaster","appConstants","library","offerImagePath","offers"]];},template:function(t,i){if(t&1&&(Ce(0),T(1,"async"),a(2,"eld-dashboard-header",3)(3,"div",4),m(4,Nr,1,0,"eld-button",5),E(5,"eld-button-link",6),l()(),Ce(6),T(7,"async"),a(8,"div",7)(9,"eld-alert",8),Qe(10,0),E(11,"em")(12,"em"),je(),l(),m(13,Lr,2,0),T(14,"async"),Wt(15,Xr,7,9),l()),t&2){let d,C,x=(d=D(1,8,i.userProfile$))==null?null:d.isVerifiedSeller;s(3),Ie("grid-cols-[1fr_1fr]",i.isPredefinedOffer())("grid-cols-1",!i.isPredefinedOffer()),s(),c(i.isPredefinedOffer()&&i.platform.browser?4:-1),s(),f("isDisabled",i.platform.ssg)("link",x?"/sell":"/become-seller"),s();let G=Fe(D(7,10,i.offersStatusCount$));s(7),c(i.platform.ssg||i.isFirstPageLoad||!G?13:(C=D(14,13,i.library$))?15:-1,C);}},dependencies:[_t,ae,dn,L,at,bt,kt,yt,Mt,mn,It,So,Ht,$t,mo,ji,Le,io],styles:[".dashboard-container[_ngcontent-%COMP%]{margin-top:32px;position:relative;max-width:1048px;padding:0 14px 50px}@media(min-width:1025px){.dashboard-container[_ngcontent-%COMP%]{padding:0 24px 50px}}.dashboard-text[_ngcontent-%COMP%]{max-width:1048px;padding-left:14px;padding-right:14px}@media(min-width:1025px){.dashboard-text[_ngcontent-%COMP%]{padding-left:24px;padding-right:24px}}.dashboard-tabs-container[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:0}
9.dashboard-separator[_ngcontent-%COMP%]{margin-bottom:20px}@media(min-width:1025px){.dashboard-separator[_ngcontent-%COMP%]{margin-bottom:0}}.offer-status-and-bulk-actions-row[_ngcontent-%COMP%]{width:100%;margin-right:0;display:flex}.offer-status-and-bulk-actions-row[_ngcontent-%COMP%] eld-dashboard-offers-state-filter[_ngcontent-%COMP%]{margin-bottom:10px;width:100%}@media(min-width:601px){.offer-status-and-bulk-actions-row[_ngcontent-%COMP%]{width:5rem;margin-right:10px}.offer-status-and-bulk-actions-row[_ngcontent-%COMP%] eld-dashboard-offers-state-filter[_ngcontent-%COMP%]{margin-bottom:0}}.dashboard-container[_ngcontent-%COMP%]{margin-top:10px}@media(min-width:841px){.dashboard-container[_ngcontent-%COMP%]{margin-top:0}}@media(min-width:1025px){.dashboard-container[_ngcontent-%COMP%]{margin-top:4px}}.offers-filter-bulk-actions[_ngcontent-%COMP%]{width:100%;height:36px;margin-right:0;margin-bottom:18px;position:relative}@media(min-width:601px){.offers-filter-bulk-actions[_ngcontent-%COMP%]{width:9.5rem;margin-right:10px;margin-bottom:10px;position:static}}eld-dashboard-augmented-game-picker[_ngcontent-%COMP%]{width:100%}@media(min-width:601px){eld-dashboard-augmented-game-picker[_ngcontent-%COMP%]{width:auto}}.offer-search[_ngcontent-%COMP%]{width:100%}@media(min-width:601px){.offer-search[_ngcontent-%COMP%]{width:auto}}eld-game-offer-sort[_ngcontent-%COMP%]{margin-left:auto}"],changeDetection:0});let o=n;return o;})();export{Xf as DashboardOffersPageComponent};/**i18n:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855*/ 10//# debugId=e38a511d-ac3a-5a2e-bee0-320e84e02a48
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.