@everymatrix/player-elevate-points-history 1.36.0 → 1.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-974f5239.js');
6
6
  const playerElevateCardItems = require('./player-elevate-card-items-67656c5f.js');
7
- require('@everymatrix/general-animation-loading');
8
7
 
9
8
  const DEFAULT_LANGUAGE$1 = 'en';
10
9
  const SUPPORTED_LANGUAGES$1 = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
@@ -695,7 +694,7 @@ const PlayerElevateCardData = class {
695
694
  : (this.playerElevateLevel.loyaltyPoints -
696
695
  this.playerElevateLevel.entryPoints) /
697
696
  (this.playerElevateLevel.nextLevel.entryPoints -
698
- this.playerElevateLevel.loyaltyPoints));
697
+ this.playerElevateLevel.entryPoints));
699
698
  this.params['playerElevateLevel'] = this.playerElevateLevel;
700
699
  }, 80);
701
700
  }
@@ -966,6 +965,99 @@ const renderTabs = (locale, type, onChangeTab) => index.h("div", { class: "Tabs
966
965
  index.h("div", { class: `TabBorderBottom ${cssActive}` })));
967
966
  }));
968
967
 
968
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
969
+
970
+ function createCommonjsModule(fn, basedir, module) {
971
+ return module = {
972
+ path: basedir,
973
+ exports: {},
974
+ require: function (path, base) {
975
+ return commonjsRequire();
976
+ }
977
+ }, fn(module, module.exports), module.exports;
978
+ }
979
+
980
+ function commonjsRequire () {
981
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
982
+ }
983
+
984
+ createCommonjsModule(function (module, exports) {
985
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e);}function s(t){return "function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e,n){t.insertBefore(e,n||null);}function r(t){t.parentNode&&t.parentNode.removeChild(t);}function c(t){const e={};for(const n of t)e[n.name]=n.value;return e}let a;function d(t){a=t;}const u=[],f=[];let p=[];const h=[],$=Promise.resolve();let m=!1;function g(t){p.push(t);}
986
+ // flush() calls callbacks in this order:
987
+ // 1. All beforeUpdate callbacks, in order: parents before children
988
+ // 2. All bind:this callbacks, in reverse order: children before parents.
989
+ // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
990
+ // for afterUpdates called during the initial onMount, which are called in
991
+ // reverse order: children before parents.
992
+ // Since callbacks might update component values, which could trigger another
993
+ // call to flush(), the following steps guard against this:
994
+ // 1. During beforeUpdate, any updated components will be added to the
995
+ // dirty_components array and will cause a reentrant call to flush(). Because
996
+ // the flush index is kept outside the function, the reentrant call will pick
997
+ // up where the earlier call left off and go through all dirty components. The
998
+ // current_component value is saved and restored so that the reentrant call will
999
+ // not interfere with the "parent" flush() call.
1000
+ // 2. bind:this callbacks cannot trigger new flush() calls.
1001
+ // 3. During afterUpdate, any updated components will NOT have their afterUpdate
1002
+ // callback called a second time; the seen_callbacks set, outside the flush()
1003
+ // function, guarantees this behavior.
1004
+ const y=new Set;let b=0;// Do *not* move this inside the flush() function
1005
+ function x(){
1006
+ // Do not reenter flush while dirty components are updated, as this can
1007
+ // result in an infinite loop. Instead, let the inner flush handle it.
1008
+ // Reentrancy is ok afterwards for bindings etc.
1009
+ if(0!==b)return;const t=a;do{
1010
+ // first, call beforeUpdate functions
1011
+ // and update components
1012
+ try{for(;b<u.length;){const t=u[b];b++,d(t),v(t.$$);}}catch(t){
1013
+ // reset dirty state to not end up in a deadlocked state and then rethrow
1014
+ throw u.length=0,b=0,t}for(d(null),u.length=0,b=0;f.length;)f.pop()();
1015
+ // then, once components are updated, call
1016
+ // afterUpdate functions. This may cause
1017
+ // subsequent updates...
1018
+ for(let t=0;t<p.length;t+=1){const e=p[t];y.has(e)||(
1019
+ // ...so guard against infinite loops
1020
+ y.add(e),e());}p.length=0;}while(u.length);for(;h.length;)h.pop()();m=!1,y.clear(),d(t);}function v(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(g);}}
1021
+ /**
1022
+ * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
1023
+ */const _=new Set;function k(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];p.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),p=e;}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
1024
+ // TODO null out other refs, including component.$$ (but need to
1025
+ // preserve final state?)
1026
+ n.on_destroy=n.fragment=null,n.ctx=[]);}function E(t,e){-1===t.$$.dirty[0]&&(u.push(t),m||(m=!0,$.then(x)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31;}function C(o,l,c,u,f,p,h,$=[-1]){const m=a;d(o);const y=o.$$={fragment:null,ctx:[],
1027
+ // state
1028
+ props:p,update:t,not_equal:f,bound:n(),
1029
+ // lifecycle
1030
+ on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(m?m.$$.context:[])),
1031
+ // everything else
1032
+ callbacks:n(),dirty:$,skip_bound:!1,root:l.target||m.$$.root};h&&h(y.root);let b=!1;if(y.ctx=c?c(o,l.props||{},((t,e,...n)=>{const i=n.length?n[0]:e;return y.ctx&&f(y.ctx[t],y.ctx[t]=i)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](i),b&&E(o,t)),e})):[],y.update(),b=!0,i(y.before_update),
1033
+ // `false` as a special case of no DOM component
1034
+ y.fragment=!!u&&u(y.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);
1035
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1036
+ y.fragment&&y.fragment.l(t),t.forEach(r);}else
1037
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1038
+ y.fragment&&y.fragment.c();l.intro&&((v=o.$$.fragment)&&v.i&&(_.delete(v),v.i(k))),function(t,n,o,l){const{fragment:r,after_update:c}=t.$$;r&&r.m(n,o),l||
1039
+ // onMount happens before the initial afterUpdate
1040
+ g((()=>{const n=t.$$.on_mount.map(e).filter(s);
1041
+ // if the component was destroyed immediately
1042
+ // it will update the `$$.on_destroy` reference to `null`.
1043
+ // the destructured on_destroy may still reference to the old array
1044
+ t.$$.on_destroy?t.$$.on_destroy.push(...n):
1045
+ // Edge case - component was destroyed immediately,
1046
+ // most likely as a result of a binding initialising
1047
+ i(n),t.$$.on_mount=[];})),c.forEach(g);}(o,l.target,l.anchor,l.customElement),x();}var v,k;d(m);}let w;
1048
+ /* src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
1049
+ function L(e){let n;return {c(){var e;e="div",n=document.createElement(e),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=t;},m(t,i){l(t,n,i),
1050
+ /*div5_binding*/e[3](n);},p:t,i:t,o:t,d(t){t&&r(n)
1051
+ /*div5_binding*/,e[3](null);}}}function T(t,e,n){let i,{clientstyling:s=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,s=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl);},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&s&&i&&(()=>{let t=document.createElement("style");t.innerHTML=s,i.appendChild(t);})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&i&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e);}),1),setTimeout((()=>{}),500);}));})();},[i,s,o,function(t){f[t?"unshift":"push"]((()=>{i=t,n(0,i);}));}]}"function"==typeof HTMLElement&&(w=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(s);
1052
+ // @ts-ignore todo: improve typings
1053
+ for(const t in this.$$.slotted)
1054
+ // @ts-ignore todo: improve typings
1055
+ this.appendChild(this.$$.slotted[t]);}attributeChangedCallback(t,e,n){this[t]=n;}disconnectedCallback(){i(this.$$.on_disconnect);}$destroy(){k(this,1),this.$destroy=t;}$on(e,n){
1056
+ // TODO should this delegate to addEventListener?
1057
+ if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1);}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}});class M extends w{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),C(this,{target:this.shadowRoot,props:c(this.attributes),customElement:!0},T,L,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),x()));}static get observedAttributes(){return ["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),x();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x();}}return !customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",M),M}));
1058
+ //# sourceMappingURL=general-animation-loading.js.map
1059
+ });
1060
+
969
1061
  const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px #00000040;border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px #8A959E33;display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px #0000001A;border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px #00000040}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
970
1062
 
971
1063
  const PlayerElevatePointsHistory = class {
@@ -562,7 +562,7 @@ const PlayerElevateCardData = /*@__PURE__*/ proxyCustomElement(class extends HTM
562
562
  : (this.playerElevateLevel.loyaltyPoints -
563
563
  this.playerElevateLevel.entryPoints) /
564
564
  (this.playerElevateLevel.nextLevel.entryPoints -
565
- this.playerElevateLevel.loyaltyPoints));
565
+ this.playerElevateLevel.entryPoints));
566
566
  this.params['playerElevateLevel'] = this.playerElevateLevel;
567
567
  }, 80);
568
568
  }
@@ -1,5 +1,4 @@
1
- import { h, Fragment, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
- import '@everymatrix/general-animation-loading';
1
+ import { h, Fragment, proxyCustomElement, HTMLElement as HTMLElement$1, createEvent } from '@stencil/core/internal/client';
3
2
  import { d as defineCustomElement$6 } from './bonus-pagination-limits2.js';
4
3
  import { d as defineCustomElement$5 } from './bonus-pagination-nav2.js';
5
4
  import { d as defineCustomElement$4 } from './general-styling-wrapper2.js';
@@ -159,9 +158,102 @@ const renderTabs = (locale, type, onChangeTab) => h("div", { class: "Tabs Row" }
159
158
  h("div", { class: `TabBorderBottom ${cssActive}` })));
160
159
  }));
161
160
 
161
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
162
+
163
+ function createCommonjsModule(fn, basedir, module) {
164
+ return module = {
165
+ path: basedir,
166
+ exports: {},
167
+ require: function (path, base) {
168
+ return commonjsRequire();
169
+ }
170
+ }, fn(module, module.exports), module.exports;
171
+ }
172
+
173
+ function commonjsRequire () {
174
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
175
+ }
176
+
177
+ createCommonjsModule(function (module, exports) {
178
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e);}function s(t){return "function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e,n){t.insertBefore(e,n||null);}function r(t){t.parentNode&&t.parentNode.removeChild(t);}function c(t){const e={};for(const n of t)e[n.name]=n.value;return e}let a;function d(t){a=t;}const u=[],f=[];let p=[];const h=[],$=Promise.resolve();let m=!1;function g(t){p.push(t);}
179
+ // flush() calls callbacks in this order:
180
+ // 1. All beforeUpdate callbacks, in order: parents before children
181
+ // 2. All bind:this callbacks, in reverse order: children before parents.
182
+ // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
183
+ // for afterUpdates called during the initial onMount, which are called in
184
+ // reverse order: children before parents.
185
+ // Since callbacks might update component values, which could trigger another
186
+ // call to flush(), the following steps guard against this:
187
+ // 1. During beforeUpdate, any updated components will be added to the
188
+ // dirty_components array and will cause a reentrant call to flush(). Because
189
+ // the flush index is kept outside the function, the reentrant call will pick
190
+ // up where the earlier call left off and go through all dirty components. The
191
+ // current_component value is saved and restored so that the reentrant call will
192
+ // not interfere with the "parent" flush() call.
193
+ // 2. bind:this callbacks cannot trigger new flush() calls.
194
+ // 3. During afterUpdate, any updated components will NOT have their afterUpdate
195
+ // callback called a second time; the seen_callbacks set, outside the flush()
196
+ // function, guarantees this behavior.
197
+ const y=new Set;let b=0;// Do *not* move this inside the flush() function
198
+ function x(){
199
+ // Do not reenter flush while dirty components are updated, as this can
200
+ // result in an infinite loop. Instead, let the inner flush handle it.
201
+ // Reentrancy is ok afterwards for bindings etc.
202
+ if(0!==b)return;const t=a;do{
203
+ // first, call beforeUpdate functions
204
+ // and update components
205
+ try{for(;b<u.length;){const t=u[b];b++,d(t),v(t.$$);}}catch(t){
206
+ // reset dirty state to not end up in a deadlocked state and then rethrow
207
+ throw u.length=0,b=0,t}for(d(null),u.length=0,b=0;f.length;)f.pop()();
208
+ // then, once components are updated, call
209
+ // afterUpdate functions. This may cause
210
+ // subsequent updates...
211
+ for(let t=0;t<p.length;t+=1){const e=p[t];y.has(e)||(
212
+ // ...so guard against infinite loops
213
+ y.add(e),e());}p.length=0;}while(u.length);for(;h.length;)h.pop()();m=!1,y.clear(),d(t);}function v(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(g);}}
214
+ /**
215
+ * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
216
+ */const _=new Set;function k(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];p.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),p=e;}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
217
+ // TODO null out other refs, including component.$$ (but need to
218
+ // preserve final state?)
219
+ n.on_destroy=n.fragment=null,n.ctx=[]);}function E(t,e){-1===t.$$.dirty[0]&&(u.push(t),m||(m=!0,$.then(x)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31;}function C(o,l,c,u,f,p,h,$=[-1]){const m=a;d(o);const y=o.$$={fragment:null,ctx:[],
220
+ // state
221
+ props:p,update:t,not_equal:f,bound:n(),
222
+ // lifecycle
223
+ on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(m?m.$$.context:[])),
224
+ // everything else
225
+ callbacks:n(),dirty:$,skip_bound:!1,root:l.target||m.$$.root};h&&h(y.root);let b=!1;if(y.ctx=c?c(o,l.props||{},((t,e,...n)=>{const i=n.length?n[0]:e;return y.ctx&&f(y.ctx[t],y.ctx[t]=i)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](i),b&&E(o,t)),e})):[],y.update(),b=!0,i(y.before_update),
226
+ // `false` as a special case of no DOM component
227
+ y.fragment=!!u&&u(y.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);
228
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
229
+ y.fragment&&y.fragment.l(t),t.forEach(r);}else
230
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
231
+ y.fragment&&y.fragment.c();l.intro&&((v=o.$$.fragment)&&v.i&&(_.delete(v),v.i(k))),function(t,n,o,l){const{fragment:r,after_update:c}=t.$$;r&&r.m(n,o),l||
232
+ // onMount happens before the initial afterUpdate
233
+ g((()=>{const n=t.$$.on_mount.map(e).filter(s);
234
+ // if the component was destroyed immediately
235
+ // it will update the `$$.on_destroy` reference to `null`.
236
+ // the destructured on_destroy may still reference to the old array
237
+ t.$$.on_destroy?t.$$.on_destroy.push(...n):
238
+ // Edge case - component was destroyed immediately,
239
+ // most likely as a result of a binding initialising
240
+ i(n),t.$$.on_mount=[];})),c.forEach(g);}(o,l.target,l.anchor,l.customElement),x();}var v,k;d(m);}let w;
241
+ /* src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
242
+ function L(e){let n;return {c(){var e;e="div",n=document.createElement(e),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=t;},m(t,i){l(t,n,i),
243
+ /*div5_binding*/e[3](n);},p:t,i:t,o:t,d(t){t&&r(n)
244
+ /*div5_binding*/,e[3](null);}}}function T(t,e,n){let i,{clientstyling:s=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,s=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl);},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&s&&i&&(()=>{let t=document.createElement("style");t.innerHTML=s,i.appendChild(t);})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&i&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e);}),1),setTimeout((()=>{}),500);}));})();},[i,s,o,function(t){f[t?"unshift":"push"]((()=>{i=t,n(0,i);}));}]}"function"==typeof HTMLElement&&(w=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(s);
245
+ // @ts-ignore todo: improve typings
246
+ for(const t in this.$$.slotted)
247
+ // @ts-ignore todo: improve typings
248
+ this.appendChild(this.$$.slotted[t]);}attributeChangedCallback(t,e,n){this[t]=n;}disconnectedCallback(){i(this.$$.on_disconnect);}$destroy(){k(this,1),this.$destroy=t;}$on(e,n){
249
+ // TODO should this delegate to addEventListener?
250
+ if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1);}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}});class M extends w{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),C(this,{target:this.shadowRoot,props:c(this.attributes),customElement:!0},T,L,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),x()));}static get observedAttributes(){return ["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),x();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x();}}return !customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",M),M}));
251
+ //# sourceMappingURL=general-animation-loading.js.map
252
+ });
253
+
162
254
  const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px #00000040;border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px #8A959E33;display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px #0000001A;border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px #00000040}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
163
255
 
164
- const PlayerElevatePointsHistory$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
256
+ const PlayerElevatePointsHistory$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
165
257
  constructor() {
166
258
  super();
167
259
  this.__registerHost();
@@ -1,6 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement, a as getAssetPath, F as Fragment } from './index-18159ab2.js';
2
2
  import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, a as translateWithParams, T as TRANSLATIONS$2, P as PlayerAvatar, b as translate$2, c as PlayerPoints } from './player-elevate-card-items-96ed621b.js';
3
- import '@everymatrix/general-animation-loading';
4
3
 
5
4
  const DEFAULT_LANGUAGE$1 = 'en';
6
5
  const SUPPORTED_LANGUAGES$1 = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
@@ -691,7 +690,7 @@ const PlayerElevateCardData = class {
691
690
  : (this.playerElevateLevel.loyaltyPoints -
692
691
  this.playerElevateLevel.entryPoints) /
693
692
  (this.playerElevateLevel.nextLevel.entryPoints -
694
- this.playerElevateLevel.loyaltyPoints));
693
+ this.playerElevateLevel.entryPoints));
695
694
  this.params['playerElevateLevel'] = this.playerElevateLevel;
696
695
  }, 80);
697
696
  }
@@ -962,6 +961,99 @@ const renderTabs = (locale, type, onChangeTab) => h("div", { class: "Tabs Row" }
962
961
  h("div", { class: `TabBorderBottom ${cssActive}` })));
963
962
  }));
964
963
 
964
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
965
+
966
+ function createCommonjsModule(fn, basedir, module) {
967
+ return module = {
968
+ path: basedir,
969
+ exports: {},
970
+ require: function (path, base) {
971
+ return commonjsRequire();
972
+ }
973
+ }, fn(module, module.exports), module.exports;
974
+ }
975
+
976
+ function commonjsRequire () {
977
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
978
+ }
979
+
980
+ createCommonjsModule(function (module, exports) {
981
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e);}function s(t){return "function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e,n){t.insertBefore(e,n||null);}function r(t){t.parentNode&&t.parentNode.removeChild(t);}function c(t){const e={};for(const n of t)e[n.name]=n.value;return e}let a;function d(t){a=t;}const u=[],f=[];let p=[];const h=[],$=Promise.resolve();let m=!1;function g(t){p.push(t);}
982
+ // flush() calls callbacks in this order:
983
+ // 1. All beforeUpdate callbacks, in order: parents before children
984
+ // 2. All bind:this callbacks, in reverse order: children before parents.
985
+ // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
986
+ // for afterUpdates called during the initial onMount, which are called in
987
+ // reverse order: children before parents.
988
+ // Since callbacks might update component values, which could trigger another
989
+ // call to flush(), the following steps guard against this:
990
+ // 1. During beforeUpdate, any updated components will be added to the
991
+ // dirty_components array and will cause a reentrant call to flush(). Because
992
+ // the flush index is kept outside the function, the reentrant call will pick
993
+ // up where the earlier call left off and go through all dirty components. The
994
+ // current_component value is saved and restored so that the reentrant call will
995
+ // not interfere with the "parent" flush() call.
996
+ // 2. bind:this callbacks cannot trigger new flush() calls.
997
+ // 3. During afterUpdate, any updated components will NOT have their afterUpdate
998
+ // callback called a second time; the seen_callbacks set, outside the flush()
999
+ // function, guarantees this behavior.
1000
+ const y=new Set;let b=0;// Do *not* move this inside the flush() function
1001
+ function x(){
1002
+ // Do not reenter flush while dirty components are updated, as this can
1003
+ // result in an infinite loop. Instead, let the inner flush handle it.
1004
+ // Reentrancy is ok afterwards for bindings etc.
1005
+ if(0!==b)return;const t=a;do{
1006
+ // first, call beforeUpdate functions
1007
+ // and update components
1008
+ try{for(;b<u.length;){const t=u[b];b++,d(t),v(t.$$);}}catch(t){
1009
+ // reset dirty state to not end up in a deadlocked state and then rethrow
1010
+ throw u.length=0,b=0,t}for(d(null),u.length=0,b=0;f.length;)f.pop()();
1011
+ // then, once components are updated, call
1012
+ // afterUpdate functions. This may cause
1013
+ // subsequent updates...
1014
+ for(let t=0;t<p.length;t+=1){const e=p[t];y.has(e)||(
1015
+ // ...so guard against infinite loops
1016
+ y.add(e),e());}p.length=0;}while(u.length);for(;h.length;)h.pop()();m=!1,y.clear(),d(t);}function v(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(g);}}
1017
+ /**
1018
+ * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
1019
+ */const _=new Set;function k(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];p.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),p=e;}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
1020
+ // TODO null out other refs, including component.$$ (but need to
1021
+ // preserve final state?)
1022
+ n.on_destroy=n.fragment=null,n.ctx=[]);}function E(t,e){-1===t.$$.dirty[0]&&(u.push(t),m||(m=!0,$.then(x)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31;}function C(o,l,c,u,f,p,h,$=[-1]){const m=a;d(o);const y=o.$$={fragment:null,ctx:[],
1023
+ // state
1024
+ props:p,update:t,not_equal:f,bound:n(),
1025
+ // lifecycle
1026
+ on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(m?m.$$.context:[])),
1027
+ // everything else
1028
+ callbacks:n(),dirty:$,skip_bound:!1,root:l.target||m.$$.root};h&&h(y.root);let b=!1;if(y.ctx=c?c(o,l.props||{},((t,e,...n)=>{const i=n.length?n[0]:e;return y.ctx&&f(y.ctx[t],y.ctx[t]=i)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](i),b&&E(o,t)),e})):[],y.update(),b=!0,i(y.before_update),
1029
+ // `false` as a special case of no DOM component
1030
+ y.fragment=!!u&&u(y.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);
1031
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1032
+ y.fragment&&y.fragment.l(t),t.forEach(r);}else
1033
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1034
+ y.fragment&&y.fragment.c();l.intro&&((v=o.$$.fragment)&&v.i&&(_.delete(v),v.i(k))),function(t,n,o,l){const{fragment:r,after_update:c}=t.$$;r&&r.m(n,o),l||
1035
+ // onMount happens before the initial afterUpdate
1036
+ g((()=>{const n=t.$$.on_mount.map(e).filter(s);
1037
+ // if the component was destroyed immediately
1038
+ // it will update the `$$.on_destroy` reference to `null`.
1039
+ // the destructured on_destroy may still reference to the old array
1040
+ t.$$.on_destroy?t.$$.on_destroy.push(...n):
1041
+ // Edge case - component was destroyed immediately,
1042
+ // most likely as a result of a binding initialising
1043
+ i(n),t.$$.on_mount=[];})),c.forEach(g);}(o,l.target,l.anchor,l.customElement),x();}var v,k;d(m);}let w;
1044
+ /* src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
1045
+ function L(e){let n;return {c(){var e;e="div",n=document.createElement(e),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=t;},m(t,i){l(t,n,i),
1046
+ /*div5_binding*/e[3](n);},p:t,i:t,o:t,d(t){t&&r(n)
1047
+ /*div5_binding*/,e[3](null);}}}function T(t,e,n){let i,{clientstyling:s=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,s=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl);},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&s&&i&&(()=>{let t=document.createElement("style");t.innerHTML=s,i.appendChild(t);})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&i&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e);}),1),setTimeout((()=>{}),500);}));})();},[i,s,o,function(t){f[t?"unshift":"push"]((()=>{i=t,n(0,i);}));}]}"function"==typeof HTMLElement&&(w=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(s);
1048
+ // @ts-ignore todo: improve typings
1049
+ for(const t in this.$$.slotted)
1050
+ // @ts-ignore todo: improve typings
1051
+ this.appendChild(this.$$.slotted[t]);}attributeChangedCallback(t,e,n){this[t]=n;}disconnectedCallback(){i(this.$$.on_disconnect);}$destroy(){k(this,1),this.$destroy=t;}$on(e,n){
1052
+ // TODO should this delegate to addEventListener?
1053
+ if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1);}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}});class M extends w{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),C(this,{target:this.shadowRoot,props:c(this.attributes),customElement:!0},T,L,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),x()));}static get observedAttributes(){return ["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),x();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x();}}return !customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",M),M}));
1054
+ //# sourceMappingURL=general-animation-loading.js.map
1055
+ });
1056
+
965
1057
  const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px #00000040;border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px #8A959E33;display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px #0000001A;border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px #00000040}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
966
1058
 
967
1059
  const PlayerElevatePointsHistory = class {
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as n,g as i,a,F as s}from"./p-3073cebd.js";import{r,t as o,g as l,a as h,T as d,P as c,b as p,c as g}from"./p-a937ac54.js";const u=["pt-br","en","es-mx","hu","hr"],v={en:{pageLimitLabel:"Show"},hu:{pageLimitLabel:"Show"},hr:{pageLimitLabel:"Show"},"pt-br":{pageLimitLabel:"Show"},"es-mx":{pageLimitLabel:"Show"}},f=class{constructor(n){e(this,n),this.pageLimitChanged=t(this,"pageLimitChanged",7),this.language="en",this.translationUrl="",this.limit=10,this.pageLimits=[10,25,50]}onPageLimitClicked(e){this.limit=e,this.pageLimitChanged.emit({limit:this.limit})}componentWillLoad(){if(this.pageLimitOptions)try{this.pageLimits=this.pageLimitOptions.split(",").map((e=>parseInt(e))),this.pageLimits.includes(this.limit)||(this.limit=this.pageLimits[0])}catch(e){console.error("Error when parse PageLimitOptions",e)}}renderStylingWrapper(){return n("general-styling-wrapper",{targetTranslations:v,translationUrl:this.translationUrl})}render(){return n("div",{class:"PaginationWrapper"},n("span",{class:"NoOfItemsToDisplayMessage"},(()=>{const e=this.language;return v[void 0!==e&&u.includes(e)?e:"en"].pageLimitLabel})()),n("ul",{class:"PaginationArea"},this.pageLimits.map((e=>n("li",{class:(this.limit==e?"Active":"")+" PageSize Item",onClick:()=>{this.onPageLimitClicked(e)}},e)))),n("general-styling-wrapper",{targetTranslations:v,translationUrl:this.translationUrl}),this.renderStylingWrapper())}};f.style=":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emfe-w-color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emfe-w-color-primary, #eaefea);background-color:var(--emfe-w-color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emfe-w-color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";const x=["pt-br","en","es-mx","hu","hr"],m={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},w=(e,t,n)=>{const i=t;let a=m[void 0!==i&&x.includes(i)?i:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");a=a.replace(n,t)}return a},y=class{constructor(n){e(this,n),this.reloadPageEmitter=t(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.endPageIndex=0,this.currentPage=1}pageLimitChangedHandler(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||e>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return n("ul",{class:"PaginationArea"},this.pagesArray.map((e=>n("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return n("general-styling-wrapper",{targetTranslations:m,translationUrl:this.translationUrl})}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=[],this.endPageIndex<5?this.pagesArray=Array.from({length:this.endPageIndex+1},((e,t)=>t+1)):1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((e,t)=>t+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endPageIndex-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((e,t)=>this.currentPage+t-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endPageIndex-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((e,t)=>this.endPageIndex-2+t)),this.pagesArray.unshift("..."))}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return n("div",{class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&n("span",{class:"PageOfMessage"},w("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),n("div",{class:"PageNavigation"},this.arrowsActive&&n("div",{class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},w("firstPage",this.language)),this.secondaryArrowsActive&&n("span",{class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},w("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&n("span",{class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},w("nextPage",this.language)),this.arrowsActive&&n("div",{class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",w("lastPage",this.language)," "),this.renderStylingWrapper()))}};y.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emfe-w-color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emfe-w-color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emfe-w-color-primary, #f5f1f1);background-color:var(--emfe-w-color-secondary, #8c8989);border-radius:0.3rem}";const b=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const i=(t=this.translationUrl,n=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{n[e]=n[e]?n[e]:{};for(let i in t[e])n[e][i]=t[e][i]})),e(!0)}))})));e.push(i)}var t,n;return await Promise.all(e)}render(){return n("div",{class:"StyleShell"},n("slot",{name:"mainContent"}))}get el(){return i(this)}};function P(e){r(1,arguments);var t=o(e);return t.setHours(0,0,0,0),t}function C(e,t){return r(2,arguments),o(e).getTime()-o(t).getTime()}b.style=":host{display:block}";var L={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function I(e){return e?L[e]:L.trunc}const T=class{constructor(n){e(this,n),this.playerElevateLeveLoaded=t(this,"playerElevateLeveLoaded",7)}handleWindowResizs(){this.initLevelProgressbar()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{n(e)}))))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort(((e,t)=>function(e,t){r(2,arguments);var n=o(e),i=o(t);return n.getTime()<i.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const n=e.aboutToExpire[0],i=function(e,t){r(2,arguments);var n=P(e),i=P(t),a=n.getTime()-l(n),s=i.getTime()-l(i);return Math.round((a-s)/864e5)}(new Date(n.expireTime),new Date);let a=0,s=0===i?"pointsToBeExpiredDay":"pointsToBeExpired";return 0==i&&(a=function(e,t,n){r(2,arguments);var i=C(e,t)/36e5;return I(null==n?void 0:n.roundingMethod)(i)}(new Date(n.expireTime),new Date),s=a>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour"),t=h(s,{expirationPoints:n.points,expireDay:i}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var i,a,s;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void n(!0);let r=e.data;this.playerElevateLevel=r.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(i=r.spendableWallet)||void 0===i?void 0:i.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(a=e.data.spendableWallet)||void 0===a?void 0:a.total,l=null===(s=e.data.loyaltyWallet)||void 0===s?void 0:s.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:l});let h=this.calcuatePointsToBeExpired(o),d=this.calcuatePointsToBeExpired(l);(h||d)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:d}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),n(!0)}))))}setLoyaltyProgress(e){!function(e,t){const n=e.querySelector("#total_level"),i=n.getBBox().width,a=t*i-15<0?0:t*i-15,s=e.querySelector("#current_level"),r=e.querySelector("#filter_current_level"),o=e.querySelector("#circle_current_level");n.setAttribute("viewbox",`0 0 ${a} 28`),s.setAttribute("width",`${a}`),o.setAttribute("cx",`${a+3}`),r.setAttribute("x",""+(a-4));const l=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),d=e.querySelector("#filter_ball"),c=e.querySelector("#filter_heart"),p=e.querySelector("#filter_lock"),g=e.querySelector("#paint0_linear_ball"),u=e.querySelector("#paint1_linear_lock"),v=e.querySelector("#lock_box"),f=e.querySelector("#heart_box"),x=i-10;l.setAttribute("cx",`${x}`),u.setAttribute("x1",`${x}`),u.setAttribute("x2",`${x}`),g.setAttribute("x1",""+(x-6)),g.setAttribute("x2",""+(x-6+11.2)),p.setAttribute("x",""+(x-6)),c.setAttribute("x",""+(x-6-2)),d.setAttribute("x",""+(x-6-2-2)),h.setAttribute("x",""+(x-6-2-2-4)),v.setAttribute("x",""+(x-6)),f.setAttribute("x",""+(x-6))}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?(this.playerElevateLevel.loyaltyPoints-this.playerElevateLevel.entryPoints)/(this.playerElevateLevel.nextLevel.entryPoints-this.playerElevateLevel.entryPoints):1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentWillRender(){}componentDidRender(){this.initLevelProgressbar()}componentWillLoad(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach(((e,i)=>{t>e.firstEntryPoints&&(n=i)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})}))}get elevateCardRef(){return i(this)}};T.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px #00000040;\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}';const k=class{constructor(t){e(this,t),this.theme="Dark",this.language="en",this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isPointDetailCard="earningRule"===this.buttonType}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=a("../static/card-ground.svg"),t=a("../static/card-ground-over.svg");return n("div",{class:`ElevateCardWrapper ${this.theme}`},n("div",{class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},n("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:d,translationUrl:this.translationUrl}),n("player-elevate-card-data",{params:this.paramProxy}),n("div",{class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},n("div",{class:"Content Row"},this.playerElevateLevel&&n(s,null,n("div",{class:"PlayerImg"},n(c,{onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),n("div",{class:`LevelInfo ${this.playerElevateLevel.name}`},n("div",{class:"PointsTxt Label"},this.cardTitle?this.cardTitle:p("spendablePoints")),n("div",{class:"PointsTxt SPPoints"},n(g,{spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),n("a",{class:"TC",onClick:()=>{this.onDetailsClick()}},p("termAndConditions",this.language))),this.pointExpireString&&n("div",{class:"ExpirationPoints"},this.pointExpireString," ")))))))}};var R;k.style=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}",function(e){e.spendable="spendable",e.loyalty="loyalty",e.history="history"}(R||(R={}));const B={en:{tabTitle:{[R.spendable]:"Coins",[R.loyalty]:"XP",[R.history]:"Conversion History"},barTitle:{[R.spendable]:"Coins History",[R.loyalty]:"Experience Points History",[R.history]:"Conversion History"},bonus:"Bonus",noContent:"No Content",redeem:"Redeem",reload:"Reload",reloadMsgWhenError:"Network Problem, please ",pointType:{registration:"Registration",cancelledRegistration:"Cancelled Registration",expiredRegistration:"Expired Registration",manual:"Manual",cancelledManual:"Cancelled Manual",expiredManual:"Expired Manual",wageringByRealMoney:"Real Money Wager",wageringByBonusMoney:"Bonus Money Wager",cancelledWageringByRealMoney:"Cancelled Real Money Wager",cancelledWageringByBonusMoney:"Cancelled Bonus Money Wager",expiredWageringByRealMoney:"Expired Real Money Wager",expiredWageringByBonusMoney:"Expired Bonus Money Wager",levelExpired:"Level Expiration",bonus:"Bonus Redeem"}}},E=e=>"/v1/elevate/"+(e==R.history?"redeemHistory":"pointsHistory"),A=(e,t,i)=>t&&n(s,null,n("div",{class:"Records"},t.map((t=>n("div",{class:"RecordContainer"},n("div",{class:"Row"},n("div",{class:"Title"},e.pointType[t.pointType]||t.pointType),n("div",{class:`Amount ${D(t.points).class}`},D(t.points).symbol,t.points)),t.payload&&t.payload.displayName&&n("div",{class:"Row Desc",innerHTML:t.payload.displayName["*"]}),n("div",{class:"Row"},n("div",{class:"DateTime"},_(new Date(t.modified)))))))),n("div",{class:"PaginationContainer"},n("bonus-pagination-nav",{offset:i.offset,limit:i.limit,displayPageNumbers:i.displayPageNumbers,tableId:i.tableId,secondaryArrowsActive:i.secondaryArrowsActive,total:i.total}))),D=e=>e>0?{class:"Positive",symbol:"+"}:{class:"Negative",symbol:""},M=e=>e.toString().padStart(2,"0"),_=e=>[e.getFullYear(),M(e.getMonth()+1),M(e.getDate())].join("-")+" "+[M(e.getHours()),M(e.getMinutes()),M(e.getSeconds())].join(":"),W=(e,t,i)=>n("div",{class:"TopBarContainer"},n("div",{class:"BackImageContainer"},n("span",{class:"BackImage",innerHTML:'<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'})),n("div",{class:"TitleContainer"},n("div",{class:"Title",title:e.barTitle[t]},e.barTitle[t]),n("div",{class:"Limits"},n("bonus-pagination-limits",{pageLimitOptions:i.pageLimitOptions,limit:i.limit}))),n("div",null,n("span",{class:"MenuImage",innerHTML:'<svg width="30" height="8" viewBox="0 0 30 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="4" cy="4" r="4" fill="black"/>\n<circle cx="15" cy="4" r="4" fill="black"/>\n<circle cx="26" cy="4" r="4" fill="black"/>\n</svg>\n'})));"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,function(e){e.exports=function(){function e(){}function t(e){return e()}function n(){return Object.create(null)}function i(e){e.forEach(t)}function a(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function r(e,t,n){e.insertBefore(t,n||null)}function o(e){e.parentNode&&e.parentNode.removeChild(e)}function l(e){const t={};for(const n of e)t[n.name]=n.value;return t}let h;function d(e){h=e}const c=[],p=[];let g=[];const u=[],v=Promise.resolve();let f=!1;function x(e){g.push(e)}const m=new Set;let w=0;function y(){if(0!==w)return;const e=h;do{try{for(;w<c.length;){const e=c[w];w++,d(e),b(e.$$)}}catch(e){throw c.length=0,w=0,e}for(d(null),c.length=0,w=0;p.length;)p.pop()();for(let e=0;e<g.length;e+=1){const t=g[e];m.has(t)||(m.add(t),t())}g.length=0}while(c.length);for(;u.length;)u.pop()();f=!1,m.clear(),d(e)}function b(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(x)}}const P=new Set;function C(e,t){-1===e.$$.dirty[0]&&(c.push(e),f||(f=!0,v.then(y)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function L(s,r,l,c,p,g,u,v=[-1]){const f=h;d(s);const m=s.$$={fragment:null,ctx:[],props:g,update:e,not_equal:p,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(f?f.$$.context:[])),callbacks:n(),dirty:v,skip_bound:!1,root:r.target||f.$$.root};u&&u(m.root);let w=!1;if(m.ctx=l?l(s,r.props||{},((e,t,...n)=>{const i=n.length?n[0]:t;return m.ctx&&p(m.ctx[e],m.ctx[e]=i)&&(!m.skip_bound&&m.bound[e]&&m.bound[e](i),w&&C(s,e)),t})):[],m.update(),w=!0,i(m.before_update),m.fragment=!!c&&c(m.ctx),r.target){if(r.hydrate){const e=function(e){return Array.from(e.childNodes)}(r.target);m.fragment&&m.fragment.l(e),e.forEach(o)}else m.fragment&&m.fragment.c();r.intro&&(b=s.$$.fragment)&&b.i&&(P.delete(b),b.i(undefined)),function(e,n,s,r){const{fragment:o,after_update:l}=e.$$;o&&o.m(n,s),r||x((()=>{const n=e.$$.on_mount.map(t).filter(a);e.$$.on_destroy?e.$$.on_destroy.push(...n):i(n),e.$$.on_mount=[]})),l.forEach(x)}(s,r.target,r.anchor,r.customElement),y()}var b;d(f)}let I;function T(t){let n;return{c(){n=document.createElement("div"),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=e},m(e,i){r(e,n,i),t[3](n)},p:e,i:e,o:e,d(e){e&&o(n),t[3](null)}}}function k(e,t,n){let i,{clientstyling:a=""}=t,{clientstylingurl:s=""}=t;return e.$$set=e=>{"clientstyling"in e&&n(1,a=e.clientstyling),"clientstylingurl"in e&&n(2,s=e.clientstylingurl)},e.$$.update=()=>{3&e.$$.dirty&&a&&i&&(()=>{let e=document.createElement("style");e.innerHTML=a,i.appendChild(e)})(),5&e.$$.dirty&&s&&i&&(()=>{let e=new URL(s),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{i.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[i,a,s,function(e){p[e?"unshift":"push"]((()=>{i=e,n(0,i)}))}]}"function"==typeof HTMLElement&&(I=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(a);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){(function(e,t){const n=e.$$;null!==n.fragment&&(function(e){const t=[],n=[];g.forEach((i=>-1===e.indexOf(i)?t.push(i):n.push(i))),n.forEach((e=>e())),g=t}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])})(this,1),this.$destroy=e}$on(t,n){if(!a(n))return e;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const e=i.indexOf(n);-1!==e&&i.splice(e,1)}}$set(e){this.$$set&&0!==Object.keys(e).length&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class R extends I{constructor(e){super();const t=document.createElement("style");t.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(t),L(this,{target:this.shadowRoot,props:l(this.attributes),customElement:!0},k,T,s,{clientstyling:1,clientstylingurl:2},null),e&&(e.target&&r(e.target,this,e.anchor),e.props&&(this.$set(e.props),y()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),y()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),y()}}return!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",R),R}()}({path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}});const O=class{constructor(n){e(this,n),this.paginationReset=t(this,"paginationReset",7),this.secondaryArrowsActive=!0,this.displayPageNumbers=!1,this.pageLimitOptions="10,25,50",this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.locale=B.en,this.type=R.spendable,this.pointsWallets={}}switchTab(e){var t,n;this.type=e,!this.pointsWallets[e]&&(null===(t=this.pointsWallets[e])||void 0===t?void 0:t.isLoadFailed)&&this.paginationReset.emit({limit:(null===(n=this.pointsWallets[e])||void 0===n?void 0:n.pageSetting.limit)||this.limit,tableId:this.type})}getPageSettingByType(e){return this.pointsWallets[e]?this.pointsWallets[e].pageSetting:{limit:this.limit,total:0,offset:0,tableId:e,secondaryArrowsActive:this.secondaryArrowsActive,displayPageNumbers:this.displayPageNumbers,pageLimitOptions:this.pageLimitOptions||void 0}}loadWallets(e){return!this.pointsWallets[this.type]||this.pointsWallets[this.type].isLoading?n("general-animation-loading",null):0===this.pointsWallets[this.type].wallets.length?n("div",{class:"NoContent"},this.locale.noContent):e()}render(){var e,t;const i=this.getPageSettingByType(this.type);return n("main",null,n("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:B,translationUrl:this.translationUrl}),n("player-elevate-pointcard",{playerAvatarUrl:this.playerAvatarUrl,endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),n("div",{class:"PlayerElevatePointsDetaisContainer"},[W(this.locale,this.type,i),(a=this.locale,s=this.type,r=e=>this.switchTab(e),n("div",{class:"Tabs Row"},Object.keys(R).map((e=>{const t=e===s?"active":"";return n("div",null,n("div",{class:`TabText ${t}`,onClick:()=>{r(e)}},a.tabTitle[e]),n("div",{class:`TabBorderBottom ${t}`}))})))),(null===(e=this.pointsWallets[this.type])||void 0===e?void 0:e.isLoadFailed)?n("div",{class:"ReloadMsg"},this.locale.reloadMsgWhenError,n("a",{class:"Reload",onClick:()=>{this.updateWallets()}},this.locale.reload)):this.loadWallets(A.bind(this,this.locale,(null===(t=this.pointsWallets[this.type])||void 0===t?void 0:t.wallets)||[],i))]));var a,s,r}walletTypeChangedHandler(){this.pointsWallets[this.type]||this.updateWallets()}async updateWallets(){let e=this.pointsWallets[this.type]?this.pointsWallets[this.type].pageSetting:this.getPageSettingByType(this.type);try{const t=await(async(e,t,n,i,a)=>{const s={type:n,language:t,pagination:`offset=${a.offset},limit=${a.limit}`},r=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(e+E(s.type),s);return await(async(e,t={})=>{let n;n=await fetch(e,t),n=await n.text();try{n=JSON.parse(n)}catch(e){throw console.error(e),e}return n})(r,{headers:{"x-SessionId":i}})})(this.endpoint,this.language,this.type,this.session,e),n=t.data||[];t.success?(e.total=t.total,this.pointsWallets[this.type]=Object.assign(Object.assign({},this.pointsWallets[this.type]),{wallets:n,pageSetting:e}),this.pointsWallets=Object.assign({},this.pointsWallets)):(console.error(t),this.pointsWallets[this.type].isLoadFailed=!0)}catch(e){console.error(e),this.pointsWallets[this.type].isLoadFailed=!0}}reloadPageByTypeHandler(e){if(e.detail.tableId==this.type){if(this.limit!=e.detail.limit)this.pointsWallets={},this.limit=e.detail.limit;else{let t=this.pointsWallets[this.type].pageSetting||this.getPageSettingByType(this.type);t.offset=e.detail.offset,this.pointsWallets[this.type].pageSetting=t}this.updateWallets()}}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}async componentWillLoad(){this.setLimit(),this.updateWallets()}static get assetsDirs(){return["static"]}static get watchers(){return{type:["walletTypeChangedHandler"],endpoint:["updateWallets"],language:["updateWallets"],session:["updateWallets"]}}};O.style=":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px #00000040;border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px #8A959E33;display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px #0000001A;border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px #00000040}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";export{f as bonus_pagination_limits,y as bonus_pagination_nav,b as general_styling_wrapper,T as player_elevate_card_data,k as player_elevate_pointcard,O as player_elevate_points_history}
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-3073cebd.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-3545a763",[[1,"player-elevate-points-history",{playerAvatarUrl:[513,"player-avatar-url"],session:[513],endpoint:[513],limit:[1538],secondaryArrowsActive:[1540,"secondary-arrows-active"],displayPageNumbers:[1540,"display-page-numbers"],pageLimitOptions:[1537,"page-limit-options"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],locale:[32],type:[32],pageSetting:[32],pointsWallets:[32]},[[0,"reloadPageByType","reloadPageByTypeHandler"]]],[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]]],[0,"bonus-pagination-limits",{language:[513],translationUrl:[513,"translation-url"],pageLimitOptions:[513,"page-limit-options"],limit:[1538],pageLimits:[32]}],[0,"bonus-pagination-nav",{total:[1538],limit:[1538],offset:[1538],tableId:[1537,"table-id"],language:[1537],translationUrl:[513,"translation-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],displayPageNumbers:[1540,"display-page-numbers"],displayRangeOfTotal:[1540,"display-range-of-total"],endPageIndex:[32],pagesArray:[32],currentPage:[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"]]],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]],["p-b0fd409d",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]]]]],["p-50a08f34",[[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]]]]]],e)));
1
+ import{p as e,b as a}from"./p-3073cebd.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-7561780b",[[1,"player-elevate-points-history",{playerAvatarUrl:[513,"player-avatar-url"],session:[513],endpoint:[513],limit:[1538],secondaryArrowsActive:[1540,"secondary-arrows-active"],displayPageNumbers:[1540,"display-page-numbers"],pageLimitOptions:[1537,"page-limit-options"],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],locale:[32],type:[32],pageSetting:[32],pointsWallets:[32]},[[0,"reloadPageByType","reloadPageByTypeHandler"]]],[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]]],[0,"bonus-pagination-limits",{language:[513],translationUrl:[513,"translation-url"],pageLimitOptions:[513,"page-limit-options"],limit:[1538],pageLimits:[32]}],[0,"bonus-pagination-nav",{total:[1538],limit:[1538],offset:[1538],tableId:[1537,"table-id"],language:[1537],translationUrl:[513,"translation-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],displayPageNumbers:[1540,"display-page-numbers"],displayRangeOfTotal:[1540,"display-range-of-total"],endPageIndex:[32],pagesArray:[32],currentPage:[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"]]],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]],["p-b0fd409d",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]]]]],["p-50a08f34",[[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]]]]]],e)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-elevate-points-history",
3
- "version": "1.36.0",
3
+ "version": "1.36.1",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,g as n,a,F as r}from"./p-3073cebd.js";import{r as s,t as o,g as l,a as h,T as d,P as p,b as g,c}from"./p-a937ac54.js";import"@everymatrix/general-animation-loading";const v=["pt-br","en","es-mx","hu","hr"],x={en:{pageLimitLabel:"Show"},hu:{pageLimitLabel:"Show"},hr:{pageLimitLabel:"Show"},"pt-br":{pageLimitLabel:"Show"},"es-mx":{pageLimitLabel:"Show"}},u=class{constructor(i){e(this,i),this.pageLimitChanged=t(this,"pageLimitChanged",7),this.language="en",this.translationUrl="",this.limit=10,this.pageLimits=[10,25,50]}onPageLimitClicked(e){this.limit=e,this.pageLimitChanged.emit({limit:this.limit})}componentWillLoad(){if(this.pageLimitOptions)try{this.pageLimits=this.pageLimitOptions.split(",").map((e=>parseInt(e))),this.pageLimits.includes(this.limit)||(this.limit=this.pageLimits[0])}catch(e){console.error("Error when parse PageLimitOptions",e)}}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:x,translationUrl:this.translationUrl})}render(){return i("div",{class:"PaginationWrapper"},i("span",{class:"NoOfItemsToDisplayMessage"},(()=>{const e=this.language;return x[void 0!==e&&v.includes(e)?e:"en"].pageLimitLabel})()),i("ul",{class:"PaginationArea"},this.pageLimits.map((e=>i("li",{class:(this.limit==e?"Active":"")+" PageSize Item",onClick:()=>{this.onPageLimitClicked(e)}},e)))),i("general-styling-wrapper",{targetTranslations:x,translationUrl:this.translationUrl}),this.renderStylingWrapper())}};u.style=":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emfe-w-color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emfe-w-color-primary, #eaefea);background-color:var(--emfe-w-color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emfe-w-color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";const f=["pt-br","en","es-mx","hu","hr"],m={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},w=(e,t,i)=>{const n=t;let a=m[void 0!==n&&f.includes(n)?n:"en"][e];if(void 0!==i)for(const[e,t]of Object.entries(i.values)){const i=new RegExp(`{${e}}`,"g");a=a.replace(i,t)}return a},b=class{constructor(i){e(this,i),this.reloadPageEmitter=t(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.endPageIndex=0,this.currentPage=1}pageLimitChangedHandler(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||e>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return i("ul",{class:"PaginationArea"},this.pagesArray.map((e=>i("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:m,translationUrl:this.translationUrl})}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=[],this.endPageIndex<5?this.pagesArray=Array.from({length:this.endPageIndex+1},((e,t)=>t+1)):1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((e,t)=>t+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endPageIndex-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((e,t)=>this.currentPage+t-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endPageIndex-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((e,t)=>this.endPageIndex-2+t)),this.pagesArray.unshift("..."))}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return i("div",{class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&i("span",{class:"PageOfMessage"},w("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),i("div",{class:"PageNavigation"},this.arrowsActive&&i("div",{class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},w("firstPage",this.language)),this.secondaryArrowsActive&&i("span",{class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},w("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&i("span",{class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},w("nextPage",this.language)),this.arrowsActive&&i("div",{class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",w("lastPage",this.language)," "),this.renderStylingWrapper()))}};b.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emfe-w-color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emfe-w-color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emfe-w-color-primary, #f5f1f1);background-color:var(--emfe-w-color-secondary, #8c8989);border-radius:0.3rem}";const y=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let n in t[e])i[e][n]=t[e][n]})),e(!0)}))})));e.push(n)}var t,i;return await Promise.all(e)}render(){return i("div",{class:"StyleShell"},i("slot",{name:"mainContent"}))}get el(){return n(this)}};function P(e){s(1,arguments);var t=o(e);return t.setHours(0,0,0,0),t}function C(e,t){return s(2,arguments),o(e).getTime()-o(t).getTime()}y.style=":host{display:block}";var I={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function L(e){return e?I[e]:I.trunc}const T=class{constructor(i){e(this,i),this.playerElevateLeveLoaded=t(this,"playerElevateLeveLoaded",7)}handleWindowResizs(){this.initLevelProgressbar()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,i)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{i(e)}))))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort(((e,t)=>function(e,t){s(2,arguments);var i=o(e),n=o(t);return i.getTime()<n.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const i=e.aboutToExpire[0],n=function(e,t){s(2,arguments);var i=P(e),n=P(t),a=i.getTime()-l(i),r=n.getTime()-l(n);return Math.round((a-r)/864e5)}(new Date(i.expireTime),new Date);let a=0,r=0===n?"pointsToBeExpiredDay":"pointsToBeExpired";return 0==n&&(a=function(e,t,i){s(2,arguments);var n=C(e,t)/36e5;return L(null==i?void 0:i.roundingMethod)(n)}(new Date(i.expireTime),new Date),r=a>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour"),t=h(r,{expirationPoints:i.points,expireDay:n}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,i)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var n,a,r;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void i(!0);let s=e.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(n=s.spendableWallet)||void 0===n?void 0:n.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(a=e.data.spendableWallet)||void 0===a?void 0:a.total,l=null===(r=e.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:l});let h=this.calcuatePointsToBeExpired(o),d=this.calcuatePointsToBeExpired(l);(h||d)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:d}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),i(!0)}))))}setLoyaltyProgress(e){!function(e,t){const i=e.querySelector("#total_level"),n=i.getBBox().width,a=t*n-15<0?0:t*n-15,r=e.querySelector("#current_level"),s=e.querySelector("#filter_current_level"),o=e.querySelector("#circle_current_level");i.setAttribute("viewbox",`0 0 ${a} 28`),r.setAttribute("width",`${a}`),o.setAttribute("cx",`${a+3}`),s.setAttribute("x",""+(a-4));const l=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),d=e.querySelector("#filter_ball"),p=e.querySelector("#filter_heart"),g=e.querySelector("#filter_lock"),c=e.querySelector("#paint0_linear_ball"),v=e.querySelector("#paint1_linear_lock"),x=e.querySelector("#lock_box"),u=e.querySelector("#heart_box"),f=n-10;l.setAttribute("cx",`${f}`),v.setAttribute("x1",`${f}`),v.setAttribute("x2",`${f}`),c.setAttribute("x1",""+(f-6)),c.setAttribute("x2",""+(f-6+11.2)),g.setAttribute("x",""+(f-6)),p.setAttribute("x",""+(f-6-2)),d.setAttribute("x",""+(f-6-2-2)),h.setAttribute("x",""+(f-6-2-2-4)),x.setAttribute("x",""+(f-6)),u.setAttribute("x",""+(f-6))}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?(this.playerElevateLevel.loyaltyPoints-this.playerElevateLevel.entryPoints)/(this.playerElevateLevel.nextLevel.entryPoints-this.playerElevateLevel.loyaltyPoints):1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentWillRender(){}componentDidRender(){this.initLevelProgressbar()}componentWillLoad(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let i=0;this.levels.forEach(((e,n)=>{t>e.firstEntryPoints&&(i=n)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:i})}))}get elevateCardRef(){return n(this)}};T.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px #00000040;\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}';const R=class{constructor(t){e(this,t),this.theme="Dark",this.language="en",this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isPointDetailCard="earningRule"===this.buttonType}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=a("../static/card-ground.svg"),t=a("../static/card-ground-over.svg");return i("div",{class:`ElevateCardWrapper ${this.theme}`},i("div",{class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},i("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:d,translationUrl:this.translationUrl}),i("player-elevate-card-data",{params:this.paramProxy}),i("div",{class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},i("div",{class:"Content Row"},this.playerElevateLevel&&i(r,null,i("div",{class:"PlayerImg"},i(p,{onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i("div",{class:`LevelInfo ${this.playerElevateLevel.name}`},i("div",{class:"PointsTxt Label"},this.cardTitle?this.cardTitle:g("spendablePoints")),i("div",{class:"PointsTxt SPPoints"},i(c,{spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),i("a",{class:"TC",onClick:()=>{this.onDetailsClick()}},g("termAndConditions",this.language))),this.pointExpireString&&i("div",{class:"ExpirationPoints"},this.pointExpireString," ")))))))}};var k;R.style=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}",function(e){e.spendable="spendable",e.loyalty="loyalty",e.history="history"}(k||(k={}));const B={en:{tabTitle:{[k.spendable]:"Coins",[k.loyalty]:"XP",[k.history]:"Conversion History"},barTitle:{[k.spendable]:"Coins History",[k.loyalty]:"Experience Points History",[k.history]:"Conversion History"},bonus:"Bonus",noContent:"No Content",redeem:"Redeem",reload:"Reload",reloadMsgWhenError:"Network Problem, please ",pointType:{registration:"Registration",cancelledRegistration:"Cancelled Registration",expiredRegistration:"Expired Registration",manual:"Manual",cancelledManual:"Cancelled Manual",expiredManual:"Expired Manual",wageringByRealMoney:"Real Money Wager",wageringByBonusMoney:"Bonus Money Wager",cancelledWageringByRealMoney:"Cancelled Real Money Wager",cancelledWageringByBonusMoney:"Cancelled Bonus Money Wager",expiredWageringByRealMoney:"Expired Real Money Wager",expiredWageringByBonusMoney:"Expired Bonus Money Wager",levelExpired:"Level Expiration",bonus:"Bonus Redeem"}}},A=e=>"/v1/elevate/"+(e==k.history?"redeemHistory":"pointsHistory"),E=(e,t,n)=>t&&i(r,null,i("div",{class:"Records"},t.map((t=>i("div",{class:"RecordContainer"},i("div",{class:"Row"},i("div",{class:"Title"},e.pointType[t.pointType]||t.pointType),i("div",{class:`Amount ${D(t.points).class}`},D(t.points).symbol,t.points)),t.payload&&t.payload.displayName&&i("div",{class:"Row Desc",innerHTML:t.payload.displayName["*"]}),i("div",{class:"Row"},i("div",{class:"DateTime"},W(new Date(t.modified)))))))),i("div",{class:"PaginationContainer"},i("bonus-pagination-nav",{offset:n.offset,limit:n.limit,displayPageNumbers:n.displayPageNumbers,tableId:n.tableId,secondaryArrowsActive:n.secondaryArrowsActive,total:n.total}))),D=e=>e>0?{class:"Positive",symbol:"+"}:{class:"Negative",symbol:""},M=e=>e.toString().padStart(2,"0"),W=e=>[e.getFullYear(),M(e.getMonth()+1),M(e.getDate())].join("-")+" "+[M(e.getHours()),M(e.getMinutes()),M(e.getSeconds())].join(":"),_=(e,t,n)=>i("div",{class:"TopBarContainer"},i("div",{class:"BackImageContainer"},i("span",{class:"BackImage",innerHTML:'<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'})),i("div",{class:"TitleContainer"},i("div",{class:"Title",title:e.barTitle[t]},e.barTitle[t]),i("div",{class:"Limits"},i("bonus-pagination-limits",{pageLimitOptions:n.pageLimitOptions,limit:n.limit}))),i("div",null,i("span",{class:"MenuImage",innerHTML:'<svg width="30" height="8" viewBox="0 0 30 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="4" cy="4" r="4" fill="black"/>\n<circle cx="15" cy="4" r="4" fill="black"/>\n<circle cx="26" cy="4" r="4" fill="black"/>\n</svg>\n'}))),O=class{constructor(i){e(this,i),this.paginationReset=t(this,"paginationReset",7),this.secondaryArrowsActive=!0,this.displayPageNumbers=!1,this.pageLimitOptions="10,25,50",this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.locale=B.en,this.type=k.spendable,this.pointsWallets={}}switchTab(e){var t,i;this.type=e,!this.pointsWallets[e]&&(null===(t=this.pointsWallets[e])||void 0===t?void 0:t.isLoadFailed)&&this.paginationReset.emit({limit:(null===(i=this.pointsWallets[e])||void 0===i?void 0:i.pageSetting.limit)||this.limit,tableId:this.type})}getPageSettingByType(e){return this.pointsWallets[e]?this.pointsWallets[e].pageSetting:{limit:this.limit,total:0,offset:0,tableId:e,secondaryArrowsActive:this.secondaryArrowsActive,displayPageNumbers:this.displayPageNumbers,pageLimitOptions:this.pageLimitOptions||void 0}}loadWallets(e){return!this.pointsWallets[this.type]||this.pointsWallets[this.type].isLoading?i("general-animation-loading",null):0===this.pointsWallets[this.type].wallets.length?i("div",{class:"NoContent"},this.locale.noContent):e()}render(){var e,t;const n=this.getPageSettingByType(this.type);return i("main",null,i("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:B,translationUrl:this.translationUrl}),i("player-elevate-pointcard",{playerAvatarUrl:this.playerAvatarUrl,endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),i("div",{class:"PlayerElevatePointsDetaisContainer"},[_(this.locale,this.type,n),(a=this.locale,r=this.type,s=e=>this.switchTab(e),i("div",{class:"Tabs Row"},Object.keys(k).map((e=>{const t=e===r?"active":"";return i("div",null,i("div",{class:`TabText ${t}`,onClick:()=>{s(e)}},a.tabTitle[e]),i("div",{class:`TabBorderBottom ${t}`}))})))),(null===(e=this.pointsWallets[this.type])||void 0===e?void 0:e.isLoadFailed)?i("div",{class:"ReloadMsg"},this.locale.reloadMsgWhenError,i("a",{class:"Reload",onClick:()=>{this.updateWallets()}},this.locale.reload)):this.loadWallets(E.bind(this,this.locale,(null===(t=this.pointsWallets[this.type])||void 0===t?void 0:t.wallets)||[],n))]));var a,r,s}walletTypeChangedHandler(){this.pointsWallets[this.type]||this.updateWallets()}async updateWallets(){let e=this.pointsWallets[this.type]?this.pointsWallets[this.type].pageSetting:this.getPageSettingByType(this.type);try{const t=await(async(e,t,i,n,a)=>{const r={type:i,language:t,pagination:`offset=${a.offset},limit=${a.limit}`},s=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(e+A(r.type),r);return await(async(e,t={})=>{let i;i=await fetch(e,t),i=await i.text();try{i=JSON.parse(i)}catch(e){throw console.error(e),e}return i})(s,{headers:{"x-SessionId":n}})})(this.endpoint,this.language,this.type,this.session,e),i=t.data||[];t.success?(e.total=t.total,this.pointsWallets[this.type]=Object.assign(Object.assign({},this.pointsWallets[this.type]),{wallets:i,pageSetting:e}),this.pointsWallets=Object.assign({},this.pointsWallets)):(console.error(t),this.pointsWallets[this.type].isLoadFailed=!0)}catch(e){console.error(e),this.pointsWallets[this.type].isLoadFailed=!0}}reloadPageByTypeHandler(e){if(e.detail.tableId==this.type){if(this.limit!=e.detail.limit)this.pointsWallets={},this.limit=e.detail.limit;else{let t=this.pointsWallets[this.type].pageSetting||this.getPageSettingByType(this.type);t.offset=e.detail.offset,this.pointsWallets[this.type].pageSetting=t}this.updateWallets()}}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}async componentWillLoad(){this.setLimit(),this.updateWallets()}static get assetsDirs(){return["static"]}static get watchers(){return{type:["walletTypeChangedHandler"],endpoint:["updateWallets"],language:["updateWallets"],session:["updateWallets"]}}};O.style=":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px #00000040;border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px #8A959E33;display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px #0000001A;border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px #00000040}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";export{u as bonus_pagination_limits,b as bonus_pagination_nav,y as general_styling_wrapper,T as player_elevate_card_data,R as player_elevate_pointcard,O as player_elevate_points_history}