@everymatrix/casino-lobby 0.0.172 → 0.0.176

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.
@@ -295,6 +295,10 @@
295
295
  resolved_promise.then(flush);
296
296
  }
297
297
  }
298
+ function tick() {
299
+ schedule_update();
300
+ return resolved_promise;
301
+ }
298
302
  function add_render_callback(fn) {
299
303
  render_callbacks.push(fn);
300
304
  }
@@ -5700,9 +5704,9 @@
5700
5704
  set_custom_element_data(casino_slider, "clientstylingurl", /*clientstylingurl*/ ctx[1]);
5701
5705
  set_custom_element_data(casino_slider, "containermaxwidth", /*containermaxwidth*/ ctx[2]);
5702
5706
  set_custom_element_data(casino_slider, "onclickeventname", "CategoryChange");
5703
- add_location(casino_slider, file$8, 225, 8, 7246);
5707
+ add_location(casino_slider, file$8, 225, 8, 7254);
5704
5708
  attr_dev(div, "class", "CasinoCategoriesContainer");
5705
- add_location(div, file$8, 224, 6, 7198);
5709
+ add_location(div, file$8, 224, 6, 7206);
5706
5710
  },
5707
5711
  m: function mount(target, anchor) {
5708
5712
  insert_dev(target, div, anchor);
@@ -5754,7 +5758,7 @@
5754
5758
  p = element("p");
5755
5759
  p.textContent = "500 Error - Internal Server Error.";
5756
5760
  attr_dev(p, "class", "SearchLoading");
5757
- add_location(p, file$8, 222, 6, 7116);
5761
+ add_location(p, file$8, 222, 6, 7124);
5758
5762
  },
5759
5763
  m: function mount(target, anchor) {
5760
5764
  insert_dev(target, p, anchor);
@@ -5776,7 +5780,7 @@
5776
5780
  return block;
5777
5781
  }
5778
5782
 
5779
- // (219:2) {#if isLoading}
5783
+ // (219:2) {#if isLoading || isLoadingMostPlayed}
5780
5784
  function create_if_block$8(ctx) {
5781
5785
  let p;
5782
5786
 
@@ -5784,7 +5788,7 @@
5784
5788
  c: function create() {
5785
5789
  p = element("p");
5786
5790
  p.textContent = "Please wait ...";
5787
- add_location(p, file$8, 219, 4, 7057);
5791
+ add_location(p, file$8, 219, 4, 7065);
5788
5792
  },
5789
5793
  m: function mount(target, anchor) {
5790
5794
  insert_dev(target, p, anchor);
@@ -5799,7 +5803,7 @@
5799
5803
  block,
5800
5804
  id: create_if_block$8.name,
5801
5805
  type: "if",
5802
- source: "(219:2) {#if isLoading}",
5806
+ source: "(219:2) {#if isLoading || isLoadingMostPlayed}",
5803
5807
  ctx
5804
5808
  });
5805
5809
 
@@ -5810,7 +5814,7 @@
5810
5814
  let div;
5811
5815
 
5812
5816
  function select_block_type(ctx, dirty) {
5813
- if (/*isLoading*/ ctx[3]) return create_if_block$8;
5817
+ if (/*isLoading*/ ctx[3] || /*isLoadingMostPlayed*/ ctx[8]) return create_if_block$8;
5814
5818
  if (/*hasErrors*/ ctx[5]) return create_if_block_1$5;
5815
5819
  return create_else_block$5;
5816
5820
  }
@@ -5823,7 +5827,7 @@
5823
5827
  div = element("div");
5824
5828
  if_block.c();
5825
5829
  this.c = noop$1;
5826
- add_location(div, file$8, 217, 0, 6994);
5830
+ add_location(div, file$8, 217, 0, 6979);
5827
5831
  },
5828
5832
  l: function claim(nodes) {
5829
5833
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -5831,7 +5835,7 @@
5831
5835
  m: function mount(target, anchor) {
5832
5836
  insert_dev(target, div, anchor);
5833
5837
  if_block.m(div, null);
5834
- /*div_binding*/ ctx[18](div);
5838
+ /*div_binding*/ ctx[16](div);
5835
5839
  },
5836
5840
  p: function update(ctx, dirty) {
5837
5841
  if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
@@ -5851,7 +5855,7 @@
5851
5855
  d: function destroy(detaching) {
5852
5856
  if (detaching) detach_dev(div);
5853
5857
  if_block.d();
5854
- /*div_binding*/ ctx[18](null);
5858
+ /*div_binding*/ ctx[16](null);
5855
5859
  }
5856
5860
  };
5857
5861
 
@@ -5924,8 +5928,7 @@
5924
5928
  isLoggedIn = true;
5925
5929
  }
5926
5930
  break;
5927
- } // sessionID = session;
5928
- // playerID = userID;
5931
+ }
5929
5932
  }
5930
5933
  };
5931
5934
 
@@ -5970,10 +5973,14 @@
5970
5973
  }
5971
5974
 
5972
5975
  favoritesAdded = true;
5973
- $$invalidate(15, favoritesLoaded = true);
5976
+ favoritesLoaded = true;
5974
5977
  };
5975
5978
 
5979
+ let isLoadingMostPlayed = false;
5980
+
5976
5981
  const addMostPlayedCategory = () => {
5982
+ $$invalidate(8, isLoadingMostPlayed = true);
5983
+
5977
5984
  getMostPlayedGames().then(display => {
5978
5985
  if (mostPlayedAdded == false && mostplayed == "true" && display) {
5979
5986
  categories.splice(2, 0, {
@@ -5985,8 +5992,10 @@
5985
5992
  });
5986
5993
  }
5987
5994
 
5995
+ $$invalidate(8, isLoadingMostPlayed = false);
5996
+ tick();
5988
5997
  mostPlayedAdded = true;
5989
- $$invalidate(16, mostPlayedLoaded = true);
5998
+ mostPlayedLoaded = true;
5990
5999
  });
5991
6000
  };
5992
6001
 
@@ -6043,7 +6052,7 @@
6043
6052
  games: []
6044
6053
  });
6045
6054
 
6046
- $$invalidate(17, categoriesLoaded = true);
6055
+ $$invalidate(3, isLoading = false);
6047
6056
  window.postMessage({ type: "CategoriesLoadedForSlider" }, window.location.href);
6048
6057
  },
6049
6058
  err => {
@@ -6079,8 +6088,9 @@
6079
6088
 
6080
6089
  const setClientStylingURL = () => {
6081
6090
  let cssFile = document.createElement("style");
6091
+ let url = new URL(clientstylingurl);
6082
6092
 
6083
- fetch(new URL(clientstylingurl)).then(res => res.text()).then(data => {
6093
+ fetch(url.href).then(res => res.text()).then(data => {
6084
6094
  cssFile.innerHTML = data;
6085
6095
 
6086
6096
  setTimeout(
@@ -6125,13 +6135,13 @@
6125
6135
  }
6126
6136
 
6127
6137
  $$self.$$set = $$props => {
6128
- if ("endpoint" in $$props) $$invalidate(8, endpoint = $$props.endpoint);
6129
- if ("datasource" in $$props) $$invalidate(9, datasource = $$props.datasource);
6130
- if ("lang" in $$props) $$invalidate(10, lang = $$props.lang);
6131
- if ("userid" in $$props) $$invalidate(11, userid = $$props.userid);
6132
- if ("session" in $$props) $$invalidate(12, session = $$props.session);
6133
- if ("mostplayed" in $$props) $$invalidate(13, mostplayed = $$props.mostplayed);
6134
- if ("favorites" in $$props) $$invalidate(14, favorites = $$props.favorites);
6138
+ if ("endpoint" in $$props) $$invalidate(9, endpoint = $$props.endpoint);
6139
+ if ("datasource" in $$props) $$invalidate(10, datasource = $$props.datasource);
6140
+ if ("lang" in $$props) $$invalidate(11, lang = $$props.lang);
6141
+ if ("userid" in $$props) $$invalidate(12, userid = $$props.userid);
6142
+ if ("session" in $$props) $$invalidate(13, session = $$props.session);
6143
+ if ("mostplayed" in $$props) $$invalidate(14, mostplayed = $$props.mostplayed);
6144
+ if ("favorites" in $$props) $$invalidate(15, favorites = $$props.favorites);
6135
6145
  if ("clientstyling" in $$props) $$invalidate(0, clientstyling = $$props.clientstyling);
6136
6146
  if ("clientstylingurl" in $$props) $$invalidate(1, clientstylingurl = $$props.clientstylingurl);
6137
6147
  if ("containermaxwidth" in $$props) $$invalidate(2, containermaxwidth = $$props.containermaxwidth);
@@ -6139,6 +6149,7 @@
6139
6149
 
6140
6150
  $$self.$capture_state = () => ({
6141
6151
  onMount,
6152
+ tick,
6142
6153
  getDevice,
6143
6154
  checkSession,
6144
6155
  endpoint,
@@ -6170,6 +6181,7 @@
6170
6181
  messageHandler,
6171
6182
  getMostPlayedGames,
6172
6183
  addFavoritesCategory,
6184
+ isLoadingMostPlayed,
6173
6185
  addMostPlayedCategory,
6174
6186
  checkAttrs,
6175
6187
  checkIfLoaded,
@@ -6180,13 +6192,13 @@
6180
6192
  });
6181
6193
 
6182
6194
  $$self.$inject_state = $$props => {
6183
- if ("endpoint" in $$props) $$invalidate(8, endpoint = $$props.endpoint);
6184
- if ("datasource" in $$props) $$invalidate(9, datasource = $$props.datasource);
6185
- if ("lang" in $$props) $$invalidate(10, lang = $$props.lang);
6186
- if ("userid" in $$props) $$invalidate(11, userid = $$props.userid);
6187
- if ("session" in $$props) $$invalidate(12, session = $$props.session);
6188
- if ("mostplayed" in $$props) $$invalidate(13, mostplayed = $$props.mostplayed);
6189
- if ("favorites" in $$props) $$invalidate(14, favorites = $$props.favorites);
6195
+ if ("endpoint" in $$props) $$invalidate(9, endpoint = $$props.endpoint);
6196
+ if ("datasource" in $$props) $$invalidate(10, datasource = $$props.datasource);
6197
+ if ("lang" in $$props) $$invalidate(11, lang = $$props.lang);
6198
+ if ("userid" in $$props) $$invalidate(12, userid = $$props.userid);
6199
+ if ("session" in $$props) $$invalidate(13, session = $$props.session);
6200
+ if ("mostplayed" in $$props) $$invalidate(14, mostplayed = $$props.mostplayed);
6201
+ if ("favorites" in $$props) $$invalidate(15, favorites = $$props.favorites);
6190
6202
  if ("clientstyling" in $$props) $$invalidate(0, clientstyling = $$props.clientstyling);
6191
6203
  if ("clientstylingurl" in $$props) $$invalidate(1, clientstylingurl = $$props.clientstylingurl);
6192
6204
  if ("containermaxwidth" in $$props) $$invalidate(2, containermaxwidth = $$props.containermaxwidth);
@@ -6203,9 +6215,10 @@
6203
6215
  if ("numberOfFavoredGames" in $$props) $$invalidate(7, numberOfFavoredGames = $$props.numberOfFavoredGames);
6204
6216
  if ("favoritesAdded" in $$props) favoritesAdded = $$props.favoritesAdded;
6205
6217
  if ("mostPlayedAdded" in $$props) mostPlayedAdded = $$props.mostPlayedAdded;
6206
- if ("favoritesLoaded" in $$props) $$invalidate(15, favoritesLoaded = $$props.favoritesLoaded);
6207
- if ("mostPlayedLoaded" in $$props) $$invalidate(16, mostPlayedLoaded = $$props.mostPlayedLoaded);
6208
- if ("categoriesLoaded" in $$props) $$invalidate(17, categoriesLoaded = $$props.categoriesLoaded);
6218
+ if ("favoritesLoaded" in $$props) favoritesLoaded = $$props.favoritesLoaded;
6219
+ if ("mostPlayedLoaded" in $$props) mostPlayedLoaded = $$props.mostPlayedLoaded;
6220
+ if ("categoriesLoaded" in $$props) categoriesLoaded = $$props.categoriesLoaded;
6221
+ if ("isLoadingMostPlayed" in $$props) $$invalidate(8, isLoadingMostPlayed = $$props.isLoadingMostPlayed);
6209
6222
  };
6210
6223
 
6211
6224
  if ($$props && "$$inject" in $$props) {
@@ -6213,23 +6226,20 @@
6213
6226
  }
6214
6227
 
6215
6228
  $$self.$$.update = () => {
6216
- if ($$self.$$.dirty[0] & /*favoritesLoaded, mostPlayedLoaded, categoriesLoaded*/ 229376) {
6217
- favoritesLoaded && mostPlayedLoaded && categoriesLoaded && checkIfLoaded();
6218
- }
6219
-
6220
- if ($$self.$$.dirty[0] & /*endpoint, datasource, lang*/ 1792) {
6229
+ if ($$self.$$.dirty[0] & /*endpoint, datasource, lang*/ 3584) {
6230
+ // $: favoritesLoaded && mostPlayedLoaded && categoriesLoaded && checkIfLoaded();
6221
6231
  endpoint && datasource && lang && initialLoad();
6222
6232
  }
6223
6233
 
6224
- if ($$self.$$.dirty[0] & /*session, endpoint*/ 4352) {
6234
+ if ($$self.$$.dirty[0] & /*session, endpoint*/ 8704) {
6225
6235
  session && endpoint && setSession();
6226
6236
  }
6227
6237
 
6228
- if ($$self.$$.dirty[0] & /*session, favorites*/ 20480) {
6238
+ if ($$self.$$.dirty[0] & /*session, favorites*/ 40960) {
6229
6239
  session && favorites && addFavoritesCategory();
6230
6240
  }
6231
6241
 
6232
- if ($$self.$$.dirty[0] & /*session, userid, mostplayed*/ 14336) {
6242
+ if ($$self.$$.dirty[0] & /*session, userid, mostplayed*/ 28672) {
6233
6243
  session && userid && mostplayed && addMostPlayedCategory();
6234
6244
  }
6235
6245
 
@@ -6253,6 +6263,7 @@
6253
6263
  hasErrors,
6254
6264
  customStylingContainer,
6255
6265
  numberOfFavoredGames,
6266
+ isLoadingMostPlayed,
6256
6267
  endpoint,
6257
6268
  datasource,
6258
6269
  lang,
@@ -6260,9 +6271,6 @@
6260
6271
  session,
6261
6272
  mostplayed,
6262
6273
  favorites,
6263
- favoritesLoaded,
6264
- mostPlayedLoaded,
6265
- categoriesLoaded,
6266
6274
  div_binding
6267
6275
  ];
6268
6276
  }
@@ -6283,13 +6291,13 @@
6283
6291
  create_fragment$8,
6284
6292
  safe_not_equal,
6285
6293
  {
6286
- endpoint: 8,
6287
- datasource: 9,
6288
- lang: 10,
6289
- userid: 11,
6290
- session: 12,
6291
- mostplayed: 13,
6292
- favorites: 14,
6294
+ endpoint: 9,
6295
+ datasource: 10,
6296
+ lang: 11,
6297
+ userid: 12,
6298
+ session: 13,
6299
+ mostplayed: 14,
6300
+ favorites: 15,
6293
6301
  clientstyling: 0,
6294
6302
  clientstylingurl: 1,
6295
6303
  containermaxwidth: 2
@@ -6325,7 +6333,7 @@
6325
6333
  }
6326
6334
 
6327
6335
  get endpoint() {
6328
- return this.$$.ctx[8];
6336
+ return this.$$.ctx[9];
6329
6337
  }
6330
6338
 
6331
6339
  set endpoint(endpoint) {
@@ -6334,7 +6342,7 @@
6334
6342
  }
6335
6343
 
6336
6344
  get datasource() {
6337
- return this.$$.ctx[9];
6345
+ return this.$$.ctx[10];
6338
6346
  }
6339
6347
 
6340
6348
  set datasource(datasource) {
@@ -6343,7 +6351,7 @@
6343
6351
  }
6344
6352
 
6345
6353
  get lang() {
6346
- return this.$$.ctx[10];
6354
+ return this.$$.ctx[11];
6347
6355
  }
6348
6356
 
6349
6357
  set lang(lang) {
@@ -6352,7 +6360,7 @@
6352
6360
  }
6353
6361
 
6354
6362
  get userid() {
6355
- return this.$$.ctx[11];
6363
+ return this.$$.ctx[12];
6356
6364
  }
6357
6365
 
6358
6366
  set userid(userid) {
@@ -6361,7 +6369,7 @@
6361
6369
  }
6362
6370
 
6363
6371
  get session() {
6364
- return this.$$.ctx[12];
6372
+ return this.$$.ctx[13];
6365
6373
  }
6366
6374
 
6367
6375
  set session(session) {
@@ -6370,7 +6378,7 @@
6370
6378
  }
6371
6379
 
6372
6380
  get mostplayed() {
6373
- return this.$$.ctx[13];
6381
+ return this.$$.ctx[14];
6374
6382
  }
6375
6383
 
6376
6384
  set mostplayed(mostplayed) {
@@ -6379,7 +6387,7 @@
6379
6387
  }
6380
6388
 
6381
6389
  get favorites() {
6382
- return this.$$.ctx[14];
6390
+ return this.$$.ctx[15];
6383
6391
  }
6384
6392
 
6385
6393
  set favorites(favorites) {