@everymatrix/casino-search 1.1.6 → 1.2.0

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.
@@ -15180,11 +15180,11 @@
15180
15180
 
15181
15181
  function get_each_context(ctx, list, i) {
15182
15182
  const child_ctx = ctx.slice();
15183
- child_ctx[37] = list[i];
15183
+ child_ctx[44] = list[i];
15184
15184
  return child_ctx;
15185
15185
  }
15186
15186
 
15187
- // (223:4) {:else}
15187
+ // (266:4) {:else}
15188
15188
  function create_else_block(ctx) {
15189
15189
  let t0;
15190
15190
  let div;
@@ -15192,14 +15192,14 @@
15192
15192
  let div_class_value;
15193
15193
 
15194
15194
  function select_block_type_1(ctx, dirty) {
15195
- if (/*searchActive*/ ctx[11] == true && /*searchValue*/ ctx[6].length < 2) return create_if_block_3;
15196
- if (/*searchArray*/ ctx[9].length != 0) return create_if_block_5;
15195
+ if (/*searchActive*/ ctx[12] == true && /*searchValue*/ ctx[7].length < 2) return create_if_block_3;
15196
+ if (/*searchArray*/ ctx[10].length != 0) return create_if_block_5;
15197
15197
  }
15198
15198
 
15199
15199
  let current_block_type = select_block_type_1(ctx);
15200
15200
  let if_block0 = current_block_type && current_block_type(ctx);
15201
- let if_block1 = /*searchCancelled*/ ctx[7] === false && create_if_block_2(ctx);
15202
- let if_block2 = /*searchValue*/ ctx[6].length >= 2 && /*searchArray*/ ctx[9].length == 0 && create_if_block_1(ctx);
15201
+ let if_block1 = /*searchCancelled*/ ctx[8] === false && create_if_block_2(ctx);
15202
+ let if_block2 = /*searchValue*/ ctx[7].length >= 2 && /*searchArray*/ ctx[10].length == 0 && create_if_block_1(ctx);
15203
15203
 
15204
15204
  const block = {
15205
15205
  c: function create() {
@@ -15209,8 +15209,8 @@
15209
15209
  if (if_block1) if_block1.c();
15210
15210
  t1 = space();
15211
15211
  if (if_block2) if_block2.c();
15212
- attr_dev(div, "class", div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[11] == true ? '' : 'NotVisible'));
15213
- add_location(div, file, 233, 6, 8214);
15212
+ attr_dev(div, "class", div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[12] == true ? '' : 'NotVisible'));
15213
+ add_location(div, file, 276, 6, 9500);
15214
15214
  },
15215
15215
  m: function mount(target, anchor) {
15216
15216
  if (if_block0) if_block0.m(target, anchor);
@@ -15233,7 +15233,7 @@
15233
15233
  }
15234
15234
  }
15235
15235
 
15236
- if (/*searchCancelled*/ ctx[7] === false) {
15236
+ if (/*searchCancelled*/ ctx[8] === false) {
15237
15237
  if (if_block1) {
15238
15238
  if_block1.p(ctx, dirty);
15239
15239
  } else {
@@ -15246,7 +15246,7 @@
15246
15246
  if_block1 = null;
15247
15247
  }
15248
15248
 
15249
- if (/*searchValue*/ ctx[6].length >= 2 && /*searchArray*/ ctx[9].length == 0) {
15249
+ if (/*searchValue*/ ctx[7].length >= 2 && /*searchArray*/ ctx[10].length == 0) {
15250
15250
  if (if_block2) {
15251
15251
  if_block2.p(ctx, dirty);
15252
15252
  } else {
@@ -15259,7 +15259,7 @@
15259
15259
  if_block2 = null;
15260
15260
  }
15261
15261
 
15262
- if (dirty[0] & /*searchActive*/ 2048 && div_class_value !== (div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[11] == true ? '' : 'NotVisible'))) {
15262
+ if (dirty[0] & /*searchActive*/ 4096 && div_class_value !== (div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[12] == true ? '' : 'NotVisible'))) {
15263
15263
  attr_dev(div, "class", div_class_value);
15264
15264
  }
15265
15265
  },
@@ -15279,31 +15279,31 @@
15279
15279
  block,
15280
15280
  id: create_else_block.name,
15281
15281
  type: "else",
15282
- source: "(223:4) {:else}",
15282
+ source: "(266:4) {:else}",
15283
15283
  ctx
15284
15284
  });
15285
15285
 
15286
15286
  return block;
15287
15287
  }
15288
15288
 
15289
- // (221:4) {#if isLoading}
15289
+ // (264:4) {#if isLoading}
15290
15290
  function create_if_block(ctx) {
15291
15291
  let p;
15292
- let t_value = /*$_*/ ctx[13]('Translations.loading') + "";
15292
+ let t_value = /*$_*/ ctx[14]('Translations.loading') + "";
15293
15293
  let t;
15294
15294
 
15295
15295
  const block = {
15296
15296
  c: function create() {
15297
15297
  p = element("p");
15298
15298
  t = text(t_value);
15299
- add_location(p, file, 221, 6, 7706);
15299
+ add_location(p, file, 264, 6, 8992);
15300
15300
  },
15301
15301
  m: function mount(target, anchor) {
15302
15302
  insert_dev(target, p, anchor);
15303
15303
  append_dev(p, t);
15304
15304
  },
15305
15305
  p: function update(ctx, dirty) {
15306
- if (dirty[0] & /*$_*/ 8192 && t_value !== (t_value = /*$_*/ ctx[13]('Translations.loading') + "")) set_data_dev(t, t_value);
15306
+ if (dirty[0] & /*$_*/ 16384 && t_value !== (t_value = /*$_*/ ctx[14]('Translations.loading') + "")) set_data_dev(t, t_value);
15307
15307
  },
15308
15308
  d: function destroy(detaching) {
15309
15309
  if (detaching) detach_dev(p);
@@ -15314,17 +15314,17 @@
15314
15314
  block,
15315
15315
  id: create_if_block.name,
15316
15316
  type: "if",
15317
- source: "(221:4) {#if isLoading}",
15317
+ source: "(264:4) {#if isLoading}",
15318
15318
  ctx
15319
15319
  });
15320
15320
 
15321
15321
  return block;
15322
15322
  }
15323
15323
 
15324
- // (231:40)
15324
+ // (274:40)
15325
15325
  function create_if_block_5(ctx) {
15326
15326
  let p;
15327
- let t_value = /*$_*/ ctx[13]('Translations.searchResult') + "";
15327
+ let t_value = /*$_*/ ctx[14]('Translations.searchResult') + "";
15328
15328
  let t;
15329
15329
 
15330
15330
  const block = {
@@ -15332,14 +15332,14 @@
15332
15332
  p = element("p");
15333
15333
  t = text(t_value);
15334
15334
  attr_dev(p, "class", "SearchMessage");
15335
- add_location(p, file, 231, 8, 8132);
15335
+ add_location(p, file, 274, 8, 9418);
15336
15336
  },
15337
15337
  m: function mount(target, anchor) {
15338
15338
  insert_dev(target, p, anchor);
15339
15339
  append_dev(p, t);
15340
15340
  },
15341
15341
  p: function update(ctx, dirty) {
15342
- if (dirty[0] & /*$_*/ 8192 && t_value !== (t_value = /*$_*/ ctx[13]('Translations.searchResult') + "")) set_data_dev(t, t_value);
15342
+ if (dirty[0] & /*$_*/ 16384 && t_value !== (t_value = /*$_*/ ctx[14]('Translations.searchResult') + "")) set_data_dev(t, t_value);
15343
15343
  },
15344
15344
  d: function destroy(detaching) {
15345
15345
  if (detaching) detach_dev(p);
@@ -15350,21 +15350,21 @@
15350
15350
  block,
15351
15351
  id: create_if_block_5.name,
15352
15352
  type: "if",
15353
- source: "(231:40) ",
15353
+ source: "(274:40) ",
15354
15354
  ctx
15355
15355
  });
15356
15356
 
15357
15357
  return block;
15358
15358
  }
15359
15359
 
15360
- // (224:6) {#if searchActive == true && searchValue.length < 2}
15360
+ // (267:6) {#if searchActive == true && searchValue.length < 2}
15361
15361
  function create_if_block_3(ctx) {
15362
15362
  let p;
15363
- let t0_value = /*$_*/ ctx[13]('Translations.recentSearch') + "";
15363
+ let t0_value = /*$_*/ ctx[14]('Translations.recentSearch') + "";
15364
15364
  let t0;
15365
15365
  let t1;
15366
15366
  let if_block_anchor;
15367
- let if_block = /*searchArray*/ ctx[9].length == 0 && create_if_block_4(ctx);
15367
+ let if_block = /*searchArray*/ ctx[10].length == 0 && create_if_block_4(ctx);
15368
15368
 
15369
15369
  const block = {
15370
15370
  c: function create() {
@@ -15374,7 +15374,7 @@
15374
15374
  if (if_block) if_block.c();
15375
15375
  if_block_anchor = empty();
15376
15376
  attr_dev(p, "class", "SearchMessage");
15377
- add_location(p, file, 224, 8, 7821);
15377
+ add_location(p, file, 267, 8, 9107);
15378
15378
  },
15379
15379
  m: function mount(target, anchor) {
15380
15380
  insert_dev(target, p, anchor);
@@ -15384,9 +15384,9 @@
15384
15384
  insert_dev(target, if_block_anchor, anchor);
15385
15385
  },
15386
15386
  p: function update(ctx, dirty) {
15387
- if (dirty[0] & /*$_*/ 8192 && t0_value !== (t0_value = /*$_*/ ctx[13]('Translations.recentSearch') + "")) set_data_dev(t0, t0_value);
15387
+ if (dirty[0] & /*$_*/ 16384 && t0_value !== (t0_value = /*$_*/ ctx[14]('Translations.recentSearch') + "")) set_data_dev(t0, t0_value);
15388
15388
 
15389
- if (/*searchArray*/ ctx[9].length == 0) {
15389
+ if (/*searchArray*/ ctx[10].length == 0) {
15390
15390
  if (if_block) {
15391
15391
  if_block.p(ctx, dirty);
15392
15392
  } else {
@@ -15411,18 +15411,18 @@
15411
15411
  block,
15412
15412
  id: create_if_block_3.name,
15413
15413
  type: "if",
15414
- source: "(224:6) {#if searchActive == true && searchValue.length < 2}",
15414
+ source: "(267:6) {#if searchActive == true && searchValue.length < 2}",
15415
15415
  ctx
15416
15416
  });
15417
15417
 
15418
15418
  return block;
15419
15419
  }
15420
15420
 
15421
- // (226:10) {#if searchArray.length == 0}
15421
+ // (269:10) {#if searchArray.length == 0}
15422
15422
  function create_if_block_4(ctx) {
15423
15423
  let div;
15424
15424
  let p;
15425
- let t_value = /*$_*/ ctx[13]('Translations.noRecentSearches') + "";
15425
+ let t_value = /*$_*/ ctx[14]('Translations.noRecentSearches') + "";
15426
15426
  let t;
15427
15427
 
15428
15428
  const block = {
@@ -15431,9 +15431,9 @@
15431
15431
  p = element("p");
15432
15432
  t = text(t_value);
15433
15433
  attr_dev(p, "class", "SearchMessage");
15434
- add_location(p, file, 227, 12, 7982);
15434
+ add_location(p, file, 270, 12, 9268);
15435
15435
  attr_dev(div, "class", "ResultsContainerError");
15436
- add_location(div, file, 226, 10, 7934);
15436
+ add_location(div, file, 269, 10, 9220);
15437
15437
  },
15438
15438
  m: function mount(target, anchor) {
15439
15439
  insert_dev(target, div, anchor);
@@ -15441,7 +15441,7 @@
15441
15441
  append_dev(p, t);
15442
15442
  },
15443
15443
  p: function update(ctx, dirty) {
15444
- if (dirty[0] & /*$_*/ 8192 && t_value !== (t_value = /*$_*/ ctx[13]('Translations.noRecentSearches') + "")) set_data_dev(t, t_value);
15444
+ if (dirty[0] & /*$_*/ 16384 && t_value !== (t_value = /*$_*/ ctx[14]('Translations.noRecentSearches') + "")) set_data_dev(t, t_value);
15445
15445
  },
15446
15446
  d: function destroy(detaching) {
15447
15447
  if (detaching) detach_dev(div);
@@ -15452,17 +15452,17 @@
15452
15452
  block,
15453
15453
  id: create_if_block_4.name,
15454
15454
  type: "if",
15455
- source: "(226:10) {#if searchArray.length == 0}",
15455
+ source: "(269:10) {#if searchArray.length == 0}",
15456
15456
  ctx
15457
15457
  });
15458
15458
 
15459
15459
  return block;
15460
15460
  }
15461
15461
 
15462
- // (235:8) {#if searchCancelled === false}
15462
+ // (278:8) {#if searchCancelled === false}
15463
15463
  function create_if_block_2(ctx) {
15464
15464
  let each_1_anchor;
15465
- let each_value = /*searchArray*/ ctx[9];
15465
+ let each_value = /*searchArray*/ ctx[10];
15466
15466
  validate_each_argument(each_value);
15467
15467
  let each_blocks = [];
15468
15468
 
@@ -15486,8 +15486,8 @@
15486
15486
  insert_dev(target, each_1_anchor, anchor);
15487
15487
  },
15488
15488
  p: function update(ctx, dirty) {
15489
- if (dirty[0] & /*lang, searchArray, endpoint, integratedgameframedesktop, integratedgameframemobile, clientstyling, clientstylingurl*/ 575) {
15490
- each_value = /*searchArray*/ ctx[9];
15489
+ if (dirty[0] & /*endpoint, showfavorites, lang, searchArray, integratedgameframedesktop, integratedgameframemobile, clientstyling, clientstylingurl*/ 1151) {
15490
+ each_value = /*searchArray*/ ctx[10];
15491
15491
  validate_each_argument(each_value);
15492
15492
  let i;
15493
15493
 
@@ -15520,14 +15520,14 @@
15520
15520
  block,
15521
15521
  id: create_if_block_2.name,
15522
15522
  type: "if",
15523
- source: "(235:8) {#if searchCancelled === false}",
15523
+ source: "(278:8) {#if searchCancelled === false}",
15524
15524
  ctx
15525
15525
  });
15526
15526
 
15527
15527
  return block;
15528
15528
  }
15529
15529
 
15530
- // (236:10) {#each searchArray as game}
15530
+ // (279:10) {#each searchArray as game}
15531
15531
  function create_each_block(ctx) {
15532
15532
  let casino_game_thumbnail;
15533
15533
  let casino_game_thumbnail_gamethumbnail_value;
@@ -15544,82 +15544,87 @@
15544
15544
  const block = {
15545
15545
  c: function create() {
15546
15546
  casino_game_thumbnail = element("casino-game-thumbnail");
15547
+ set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15548
+ set_custom_element_data(casino_game_thumbnail, "favorites", /*showfavorites*/ ctx[6]);
15547
15549
  set_custom_element_data(casino_game_thumbnail, "lang", /*lang*/ ctx[1]);
15548
- set_custom_element_data(casino_game_thumbnail, "gamethumbnail", casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[37].thumbnail);
15549
- set_custom_element_data(casino_game_thumbnail, "gamename", casino_game_thumbnail_gamename_value = /*game*/ ctx[37].name);
15550
- set_custom_element_data(casino_game_thumbnail, "gamevendor", casino_game_thumbnail_gamevendor_value = /*game*/ ctx[37].vendor.name);
15551
- set_custom_element_data(casino_game_thumbnail, "gameisnew", casino_game_thumbnail_gameisnew_value = /*game*/ ctx[37].isNew);
15552
- set_custom_element_data(casino_game_thumbnail, "gamepopularity", casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[37].popularity);
15553
- set_custom_element_data(casino_game_thumbnail, "gamecellsize", casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[37].cellSize);
15554
- set_custom_element_data(casino_game_thumbnail, "gameid", casino_game_thumbnail_gameid_value = /*game*/ ctx[37].id);
15555
- set_custom_element_data(casino_game_thumbnail, "gamefunmode", casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[37].hasFunMode);
15556
- set_custom_element_data(casino_game_thumbnail, "gamefavorite", casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[37].isFavorite);
15557
-
15558
- set_custom_element_data(casino_game_thumbnail, "livelobbyendpoint", casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[37].details
15559
- ? /*game*/ ctx[37].launchUrl
15550
+ set_custom_element_data(casino_game_thumbnail, "gamethumbnail", casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[44].thumbnail);
15551
+ set_custom_element_data(casino_game_thumbnail, "gamename", casino_game_thumbnail_gamename_value = /*game*/ ctx[44].name);
15552
+ set_custom_element_data(casino_game_thumbnail, "gamevendor", casino_game_thumbnail_gamevendor_value = /*game*/ ctx[44].vendor.name);
15553
+ set_custom_element_data(casino_game_thumbnail, "gameisnew", casino_game_thumbnail_gameisnew_value = /*game*/ ctx[44].isNew);
15554
+ set_custom_element_data(casino_game_thumbnail, "gamepopularity", casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[44].popularity);
15555
+ set_custom_element_data(casino_game_thumbnail, "gamecellsize", casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[44].cellSize);
15556
+ set_custom_element_data(casino_game_thumbnail, "gameid", casino_game_thumbnail_gameid_value = /*game*/ ctx[44].id);
15557
+ set_custom_element_data(casino_game_thumbnail, "gamefunmode", casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[44].hasFunMode);
15558
+ set_custom_element_data(casino_game_thumbnail, "gamefavorite", casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[44].isFavorite);
15559
+
15560
+ set_custom_element_data(casino_game_thumbnail, "livelobbyendpoint", casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[44].details
15561
+ ? /*game*/ ctx[44].launchUrl
15560
15562
  : '');
15561
15563
 
15562
- set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15563
15564
  set_custom_element_data(casino_game_thumbnail, "integratedgameframedesktop", /*integratedgameframedesktop*/ ctx[4]);
15564
15565
  set_custom_element_data(casino_game_thumbnail, "integratedgameframemobile", /*integratedgameframemobile*/ ctx[5]);
15565
15566
  set_custom_element_data(casino_game_thumbnail, "clientstyling", /*clientstyling*/ ctx[2]);
15566
15567
  set_custom_element_data(casino_game_thumbnail, "clientstylingurl", /*clientstylingurl*/ ctx[3]);
15567
- add_location(casino_game_thumbnail, file, 236, 12, 8383);
15568
+ add_location(casino_game_thumbnail, file, 279, 12, 9669);
15568
15569
  },
15569
15570
  m: function mount(target, anchor) {
15570
15571
  insert_dev(target, casino_game_thumbnail, anchor);
15571
15572
  },
15572
15573
  p: function update(ctx, dirty) {
15574
+ if (dirty[0] & /*endpoint*/ 1) {
15575
+ set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15576
+ }
15577
+
15578
+ if (dirty[0] & /*showfavorites*/ 64) {
15579
+ set_custom_element_data(casino_game_thumbnail, "favorites", /*showfavorites*/ ctx[6]);
15580
+ }
15581
+
15573
15582
  if (dirty[0] & /*lang*/ 2) {
15574
15583
  set_custom_element_data(casino_game_thumbnail, "lang", /*lang*/ ctx[1]);
15575
15584
  }
15576
15585
 
15577
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamethumbnail_value !== (casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[37].thumbnail)) {
15586
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gamethumbnail_value !== (casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[44].thumbnail)) {
15578
15587
  set_custom_element_data(casino_game_thumbnail, "gamethumbnail", casino_game_thumbnail_gamethumbnail_value);
15579
15588
  }
15580
15589
 
15581
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamename_value !== (casino_game_thumbnail_gamename_value = /*game*/ ctx[37].name)) {
15590
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gamename_value !== (casino_game_thumbnail_gamename_value = /*game*/ ctx[44].name)) {
15582
15591
  set_custom_element_data(casino_game_thumbnail, "gamename", casino_game_thumbnail_gamename_value);
15583
15592
  }
15584
15593
 
15585
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamevendor_value !== (casino_game_thumbnail_gamevendor_value = /*game*/ ctx[37].vendor.name)) {
15594
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gamevendor_value !== (casino_game_thumbnail_gamevendor_value = /*game*/ ctx[44].vendor.name)) {
15586
15595
  set_custom_element_data(casino_game_thumbnail, "gamevendor", casino_game_thumbnail_gamevendor_value);
15587
15596
  }
15588
15597
 
15589
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gameisnew_value !== (casino_game_thumbnail_gameisnew_value = /*game*/ ctx[37].isNew)) {
15598
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gameisnew_value !== (casino_game_thumbnail_gameisnew_value = /*game*/ ctx[44].isNew)) {
15590
15599
  set_custom_element_data(casino_game_thumbnail, "gameisnew", casino_game_thumbnail_gameisnew_value);
15591
15600
  }
15592
15601
 
15593
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamepopularity_value !== (casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[37].popularity)) {
15602
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gamepopularity_value !== (casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[44].popularity)) {
15594
15603
  set_custom_element_data(casino_game_thumbnail, "gamepopularity", casino_game_thumbnail_gamepopularity_value);
15595
15604
  }
15596
15605
 
15597
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamecellsize_value !== (casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[37].cellSize)) {
15606
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gamecellsize_value !== (casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[44].cellSize)) {
15598
15607
  set_custom_element_data(casino_game_thumbnail, "gamecellsize", casino_game_thumbnail_gamecellsize_value);
15599
15608
  }
15600
15609
 
15601
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gameid_value !== (casino_game_thumbnail_gameid_value = /*game*/ ctx[37].id)) {
15610
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gameid_value !== (casino_game_thumbnail_gameid_value = /*game*/ ctx[44].id)) {
15602
15611
  set_custom_element_data(casino_game_thumbnail, "gameid", casino_game_thumbnail_gameid_value);
15603
15612
  }
15604
15613
 
15605
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamefunmode_value !== (casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[37].hasFunMode)) {
15614
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gamefunmode_value !== (casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[44].hasFunMode)) {
15606
15615
  set_custom_element_data(casino_game_thumbnail, "gamefunmode", casino_game_thumbnail_gamefunmode_value);
15607
15616
  }
15608
15617
 
15609
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamefavorite_value !== (casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[37].isFavorite)) {
15618
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_gamefavorite_value !== (casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[44].isFavorite)) {
15610
15619
  set_custom_element_data(casino_game_thumbnail, "gamefavorite", casino_game_thumbnail_gamefavorite_value);
15611
15620
  }
15612
15621
 
15613
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_livelobbyendpoint_value !== (casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[37].details
15614
- ? /*game*/ ctx[37].launchUrl
15622
+ if (dirty[0] & /*searchArray*/ 1024 && casino_game_thumbnail_livelobbyendpoint_value !== (casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[44].details
15623
+ ? /*game*/ ctx[44].launchUrl
15615
15624
  : '')) {
15616
15625
  set_custom_element_data(casino_game_thumbnail, "livelobbyendpoint", casino_game_thumbnail_livelobbyendpoint_value);
15617
15626
  }
15618
15627
 
15619
- if (dirty[0] & /*endpoint*/ 1) {
15620
- set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15621
- }
15622
-
15623
15628
  if (dirty[0] & /*integratedgameframedesktop*/ 16) {
15624
15629
  set_custom_element_data(casino_game_thumbnail, "integratedgameframedesktop", /*integratedgameframedesktop*/ ctx[4]);
15625
15630
  }
@@ -15645,22 +15650,22 @@
15645
15650
  block,
15646
15651
  id: create_each_block.name,
15647
15652
  type: "each",
15648
- source: "(236:10) {#each searchArray as game}",
15653
+ source: "(279:10) {#each searchArray as game}",
15649
15654
  ctx
15650
15655
  });
15651
15656
 
15652
15657
  return block;
15653
15658
  }
15654
15659
 
15655
- // (257:8) {#if searchValue.length >= 2 && searchArray.length == 0}
15660
+ // (301:8) {#if searchValue.length >= 2 && searchArray.length == 0}
15656
15661
  function create_if_block_1(ctx) {
15657
15662
  let div;
15658
15663
  let p0;
15659
- let t0_value = /*$_*/ ctx[13]('Translations.notFound') + "";
15664
+ let t0_value = /*$_*/ ctx[14]('Translations.notFound') + "";
15660
15665
  let t0;
15661
15666
  let t1;
15662
15667
  let p1;
15663
- let t2_value = /*$_*/ ctx[13]('Translations.notFoundText') + "";
15668
+ let t2_value = /*$_*/ ctx[14]('Translations.notFoundText') + "";
15664
15669
  let t2;
15665
15670
 
15666
15671
  const block = {
@@ -15672,10 +15677,10 @@
15672
15677
  p1 = element("p");
15673
15678
  t2 = text(t2_value);
15674
15679
  attr_dev(p0, "class", "SearchMessage");
15675
- add_location(p0, file, 258, 12, 9247);
15676
- add_location(p1, file, 259, 12, 9318);
15680
+ add_location(p0, file, 302, 12, 10575);
15681
+ add_location(p1, file, 303, 12, 10646);
15677
15682
  attr_dev(div, "class", "ResultsContainerError");
15678
- add_location(div, file, 257, 10, 9199);
15683
+ add_location(div, file, 301, 10, 10527);
15679
15684
  },
15680
15685
  m: function mount(target, anchor) {
15681
15686
  insert_dev(target, div, anchor);
@@ -15686,8 +15691,8 @@
15686
15691
  append_dev(p1, t2);
15687
15692
  },
15688
15693
  p: function update(ctx, dirty) {
15689
- if (dirty[0] & /*$_*/ 8192 && t0_value !== (t0_value = /*$_*/ ctx[13]('Translations.notFound') + "")) set_data_dev(t0, t0_value);
15690
- if (dirty[0] & /*$_*/ 8192 && t2_value !== (t2_value = /*$_*/ ctx[13]('Translations.notFoundText') + "")) set_data_dev(t2, t2_value);
15694
+ if (dirty[0] & /*$_*/ 16384 && t0_value !== (t0_value = /*$_*/ ctx[14]('Translations.notFound') + "")) set_data_dev(t0, t0_value);
15695
+ if (dirty[0] & /*$_*/ 16384 && t2_value !== (t2_value = /*$_*/ ctx[14]('Translations.notFoundText') + "")) set_data_dev(t2, t2_value);
15691
15696
  },
15692
15697
  d: function destroy(detaching) {
15693
15698
  if (detaching) detach_dev(div);
@@ -15698,7 +15703,7 @@
15698
15703
  block,
15699
15704
  id: create_if_block_1.name,
15700
15705
  type: "if",
15701
- source: "(257:8) {#if searchValue.length >= 2 && searchArray.length == 0}",
15706
+ source: "(301:8) {#if searchValue.length >= 2 && searchArray.length == 0}",
15702
15707
  ctx
15703
15708
  });
15704
15709
 
@@ -15723,7 +15728,7 @@
15723
15728
  let span_class_value;
15724
15729
  let t2;
15725
15730
  let small;
15726
- let t3_value = /*$_*/ ctx[13]('Translations.cancel') + "";
15731
+ let t3_value = /*$_*/ ctx[14]('Translations.cancel') + "";
15727
15732
  let t3;
15728
15733
  let small_class_value;
15729
15734
  let t4;
@@ -15731,7 +15736,7 @@
15731
15736
  let dispose;
15732
15737
 
15733
15738
  function select_block_type(ctx, dirty) {
15734
- if (/*isLoading*/ ctx[12]) return create_if_block;
15739
+ if (/*isLoading*/ ctx[13]) return create_if_block;
15735
15740
  return create_else_block;
15736
15741
  }
15737
15742
 
@@ -15764,45 +15769,45 @@
15764
15769
  attr_dev(path0, "stroke-linecap", "round");
15765
15770
  attr_dev(path0, "stroke-linejoin", "round");
15766
15771
  attr_dev(path0, "d", "m10.48 10.985 2.21 2.373");
15767
- add_location(path0, file, 204, 10, 6677);
15772
+ add_location(path0, file, 247, 10, 7963);
15768
15773
  attr_dev(circle, "cx", "6.5");
15769
15774
  attr_dev(circle, "cy", "6.5");
15770
15775
  attr_dev(circle, "r", "5.75");
15771
15776
  attr_dev(circle, "stroke", "#212121");
15772
15777
  attr_dev(circle, "stroke-width", "1.5");
15773
- add_location(circle, file, 205, 10, 6805);
15778
+ add_location(circle, file, 248, 10, 8091);
15774
15779
  attr_dev(svg0, "width", "14");
15775
15780
  attr_dev(svg0, "height", "15");
15776
15781
  attr_dev(svg0, "fill", "none");
15777
15782
  attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg");
15778
- add_location(svg0, file, 203, 8, 6591);
15783
+ add_location(svg0, file, 246, 8, 7877);
15779
15784
  attr_dev(div0, "class", "SearchIcon");
15780
- add_location(div0, file, 202, 6, 6558);
15785
+ add_location(div0, file, 245, 6, 7844);
15781
15786
  attr_dev(input, "class", "SearchInput");
15782
15787
  attr_dev(input, "type", "search");
15783
- attr_dev(input, "placeholder", input_placeholder_value = /*$_*/ ctx[13]('Translations.placeHolderSearchGames'));
15784
- add_location(input, file, 209, 8, 6950);
15788
+ attr_dev(input, "placeholder", input_placeholder_value = /*$_*/ ctx[14]('Translations.placeHolderSearchGames'));
15789
+ add_location(input, file, 252, 8, 8236);
15785
15790
  attr_dev(path1, "d", "m1.45 1.5 8.1 8M1.45 9.5l8.1-8");
15786
15791
  attr_dev(path1, "stroke", "#717171");
15787
15792
  attr_dev(path1, "stroke-width", "2");
15788
15793
  attr_dev(path1, "stroke-linecap", "round");
15789
15794
  attr_dev(path1, "stroke-linejoin", "round");
15790
- add_location(path1, file, 212, 12, 7337);
15795
+ add_location(path1, file, 255, 12, 8623);
15791
15796
  attr_dev(svg1, "width", "11");
15792
15797
  attr_dev(svg1, "height", "11");
15793
15798
  attr_dev(svg1, "fill", "none");
15794
15799
  attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg");
15795
- add_location(svg1, file, 211, 10, 7249);
15796
- attr_dev(span, "class", span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[6].length != 0 ? '' : 'NotVisible'));
15797
- add_location(span, file, 210, 8, 7128);
15800
+ add_location(svg1, file, 254, 10, 8535);
15801
+ attr_dev(span, "class", span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[7].length != 0 ? '' : 'NotVisible'));
15802
+ add_location(span, file, 253, 8, 8414);
15798
15803
  attr_dev(div1, "class", "SearchContainer");
15799
- add_location(div1, file, 208, 6, 6912);
15800
- attr_dev(small, "class", small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[7] ? 'NotVisible' : ''));
15801
- add_location(small, file, 216, 6, 7513);
15804
+ add_location(div1, file, 251, 6, 8198);
15805
+ attr_dev(small, "class", small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[8] ? 'NotVisible' : ''));
15806
+ add_location(small, file, 259, 6, 8799);
15802
15807
  attr_dev(div2, "class", "Search");
15803
- add_location(div2, file, 201, 4, 6531);
15808
+ add_location(div2, file, 244, 4, 7817);
15804
15809
  attr_dev(div3, "class", "CasinoSearch");
15805
- add_location(div3, file, 200, 2, 6465);
15810
+ add_location(div3, file, 243, 2, 7751);
15806
15811
  },
15807
15812
  l: function claim(nodes) {
15808
15813
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -15817,8 +15822,8 @@
15817
15822
  append_dev(div2, t0);
15818
15823
  append_dev(div2, div1);
15819
15824
  append_dev(div1, input);
15820
- set_input_value(input, /*searchValue*/ ctx[6]);
15821
- /*input_binding*/ ctx[20](input);
15825
+ set_input_value(input, /*searchValue*/ ctx[7]);
15826
+ /*input_binding*/ ctx[22](input);
15822
15827
  append_dev(div1, t1);
15823
15828
  append_dev(div1, span);
15824
15829
  append_dev(span, svg1);
@@ -15828,35 +15833,35 @@
15828
15833
  append_dev(small, t3);
15829
15834
  append_dev(div3, t4);
15830
15835
  if_block.m(div3, null);
15831
- /*div3_binding*/ ctx[23](div3);
15836
+ /*div3_binding*/ ctx[25](div3);
15832
15837
 
15833
15838
  if (!mounted) {
15834
15839
  dispose = [
15835
- listen_dev(input, "input", /*input_input_handler*/ ctx[19]),
15836
- listen_dev(input, "focus", /*onFocus*/ ctx[14], false, false, false),
15837
- listen_dev(span, "click", /*click_handler*/ ctx[21], false, false, false),
15838
- listen_dev(small, "click", /*click_handler_1*/ ctx[22], false, false, false)
15840
+ listen_dev(input, "input", /*input_input_handler*/ ctx[21]),
15841
+ listen_dev(input, "focus", /*onFocus*/ ctx[15], false, false, false),
15842
+ listen_dev(span, "click", /*click_handler*/ ctx[23], false, false, false),
15843
+ listen_dev(small, "click", /*click_handler_1*/ ctx[24], false, false, false)
15839
15844
  ];
15840
15845
 
15841
15846
  mounted = true;
15842
15847
  }
15843
15848
  },
15844
15849
  p: function update(ctx, dirty) {
15845
- if (dirty[0] & /*$_*/ 8192 && input_placeholder_value !== (input_placeholder_value = /*$_*/ ctx[13]('Translations.placeHolderSearchGames'))) {
15850
+ if (dirty[0] & /*$_*/ 16384 && input_placeholder_value !== (input_placeholder_value = /*$_*/ ctx[14]('Translations.placeHolderSearchGames'))) {
15846
15851
  attr_dev(input, "placeholder", input_placeholder_value);
15847
15852
  }
15848
15853
 
15849
- if (dirty[0] & /*searchValue*/ 64) {
15850
- set_input_value(input, /*searchValue*/ ctx[6]);
15854
+ if (dirty[0] & /*searchValue*/ 128) {
15855
+ set_input_value(input, /*searchValue*/ ctx[7]);
15851
15856
  }
15852
15857
 
15853
- if (dirty[0] & /*searchValue*/ 64 && span_class_value !== (span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[6].length != 0 ? '' : 'NotVisible'))) {
15858
+ if (dirty[0] & /*searchValue*/ 128 && span_class_value !== (span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[7].length != 0 ? '' : 'NotVisible'))) {
15854
15859
  attr_dev(span, "class", span_class_value);
15855
15860
  }
15856
15861
 
15857
- if (dirty[0] & /*$_*/ 8192 && t3_value !== (t3_value = /*$_*/ ctx[13]('Translations.cancel') + "")) set_data_dev(t3, t3_value);
15862
+ if (dirty[0] & /*$_*/ 16384 && t3_value !== (t3_value = /*$_*/ ctx[14]('Translations.cancel') + "")) set_data_dev(t3, t3_value);
15858
15863
 
15859
- if (dirty[0] & /*searchCancelled*/ 128 && small_class_value !== (small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[7] ? 'NotVisible' : ''))) {
15864
+ if (dirty[0] & /*searchCancelled*/ 256 && small_class_value !== (small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[8] ? 'NotVisible' : ''))) {
15860
15865
  attr_dev(small, "class", small_class_value);
15861
15866
  }
15862
15867
 
@@ -15876,9 +15881,9 @@
15876
15881
  o: noop$1,
15877
15882
  d: function destroy(detaching) {
15878
15883
  if (detaching) detach_dev(div3);
15879
- /*input_binding*/ ctx[20](null);
15884
+ /*input_binding*/ ctx[22](null);
15880
15885
  if_block.d();
15881
- /*div3_binding*/ ctx[23](null);
15886
+ /*div3_binding*/ ctx[25](null);
15882
15887
  mounted = false;
15883
15888
  run_all(dispose);
15884
15889
  }
@@ -15898,7 +15903,7 @@
15898
15903
  function instance($$self, $$props, $$invalidate) {
15899
15904
  let $_;
15900
15905
  validate_store(Y, '_');
15901
- component_subscribe($$self, Y, $$value => $$invalidate(13, $_ = $$value));
15906
+ component_subscribe($$self, Y, $$value => $$invalidate(14, $_ = $$value));
15902
15907
  let { $$slots: slots = {}, $$scope } = $$props;
15903
15908
  validate_slots('undefined', slots, []);
15904
15909
  let { endpoint = '' } = $$props;
@@ -15909,6 +15914,7 @@
15909
15914
  let { integratedgameframedesktop = 'false' } = $$props;
15910
15915
  let { integratedgameframemobile = 'false' } = $$props;
15911
15916
  let { translationUrl = '' } = $$props;
15917
+ let { showfavorites = '' } = $$props;
15912
15918
  let userAgent = window.navigator.userAgent;
15913
15919
  let searchArray = [];
15914
15920
  let searchedValues = [];
@@ -15919,6 +15925,10 @@
15919
15925
  let searchActive = false;
15920
15926
  let isLoading = false;
15921
15927
  let customStylingContainer;
15928
+ let isLoggedIn = false;
15929
+ let sessionID;
15930
+ let playerID;
15931
+ let favoriteGamesIds = [];
15922
15932
 
15923
15933
  const setTranslationUrl = () => {
15924
15934
  let url = translationUrl;
@@ -15940,11 +15950,21 @@
15940
15950
  if (e.data && e.data.type == 'OpenGameFrame') {
15941
15951
  addSearchedItem(e.data.gameId);
15942
15952
  }
15953
+
15954
+ if (e.data && e.data.type == 'ShowGameModal') {
15955
+ addSearchedItem(e.data.gameId);
15956
+ }
15957
+
15958
+ if (e.data.type === 'UserSessionID') {
15959
+ sessionID = e.data.session;
15960
+ playerID = e.data.userid;
15961
+ $$invalidate(20, isLoggedIn = true);
15962
+ }
15943
15963
  };
15944
15964
 
15945
15965
  const onFocus = () => {
15946
- $$invalidate(7, searchCancelled = false);
15947
- $$invalidate(11, searchActive = true);
15966
+ $$invalidate(8, searchCancelled = false);
15967
+ $$invalidate(12, searchActive = true);
15948
15968
 
15949
15969
  if (endpoint && datasource && lang) {
15950
15970
  if (searchValue.length < 2) {
@@ -15969,7 +15989,10 @@
15969
15989
  }
15970
15990
 
15971
15991
  Promise.all(promises).then(res => {
15972
- $$invalidate(9, searchArray = res);
15992
+ $$invalidate(10, searchArray = res.map(item => {
15993
+ item.isFavorite = checkFavorite(item.id);
15994
+ return item;
15995
+ }));
15973
15996
  });
15974
15997
  }
15975
15998
  }
@@ -15985,13 +16008,13 @@
15985
16008
 
15986
16009
  const getGames = url => {
15987
16010
  return new Promise((resolve, reject) => {
15988
- $$invalidate(12, isLoading = true);
16011
+ $$invalidate(13, isLoading = true);
15989
16012
 
15990
16013
  fetch(url.href).then(res => res.json()).then(games => {
15991
- $$invalidate(12, isLoading = false);
16014
+ $$invalidate(13, isLoading = false);
15992
16015
  resolve(games);
15993
16016
  }).catch(err => {
15994
- $$invalidate(12, isLoading = false);
16017
+ $$invalidate(13, isLoading = false);
15995
16018
  console.error(err);
15996
16019
  reject(err);
15997
16020
  });
@@ -16000,18 +16023,18 @@
16000
16023
 
16001
16024
  const getGame = (url, gameId) => {
16002
16025
  return new Promise((resolve, reject) => {
16003
- $$invalidate(12, isLoading = true);
16026
+ $$invalidate(13, isLoading = true);
16004
16027
 
16005
16028
  if (gameId && Object.keys(gamesCache).indexOf(gameId) >= 0) {
16006
- $$invalidate(12, isLoading = false);
16029
+ $$invalidate(13, isLoading = false);
16007
16030
  resolve(gamesCache[gameId]);
16008
16031
  } else {
16009
16032
  fetch(url).then(fetchRes => fetchRes.json()).then(gameData => {
16010
- $$invalidate(12, isLoading = false);
16033
+ $$invalidate(13, isLoading = false);
16011
16034
  gamesCache[gameData[0].gameId] = gameData[0];
16012
16035
  resolve(gameData[0]);
16013
16036
  }).catch(err => {
16014
- $$invalidate(12, isLoading = false);
16037
+ $$invalidate(13, isLoading = false);
16015
16038
  console.error(err);
16016
16039
  reject(err);
16017
16040
  });
@@ -16019,6 +16042,29 @@
16019
16042
  });
16020
16043
  };
16021
16044
 
16045
+ const getFavoriteGames = () => {
16046
+ const url = new URL(`${endpoint}/player/${playerID}/favorites/`);
16047
+ $$invalidate(13, isLoading = true);
16048
+
16049
+ let options = {
16050
+ method: "GET",
16051
+ headers: { 'X-SessionID': sessionID }
16052
+ };
16053
+
16054
+ fetch(url.href, options).then(res => res.json()).then(favoriteGames => {
16055
+ $$invalidate(13, isLoading = false);
16056
+ favoriteGamesIds = favoriteGames.items.map(favoriteGame => favoriteGame.id);
16057
+ });
16058
+ };
16059
+
16060
+ const checkFavorite = gameId => {
16061
+ if (favoriteGamesIds.findIndex(favGameId => favGameId == gameId) !== -1) {
16062
+ return true;
16063
+ } else {
16064
+ return false;
16065
+ }
16066
+ };
16067
+
16022
16068
  const addSearchedItem = gameID => {
16023
16069
  searchedValues = getCookieValue(`searchedGamesWds_casino`);
16024
16070
 
@@ -16045,16 +16091,16 @@
16045
16091
  };
16046
16092
 
16047
16093
  const cancelSearch = () => {
16048
- $$invalidate(6, searchValue = '');
16049
- $$invalidate(7, searchCancelled = true);
16050
- $$invalidate(12, isLoading = false);
16051
- $$invalidate(9, searchArray = []);
16052
- $$invalidate(11, searchActive = false);
16094
+ $$invalidate(7, searchValue = '');
16095
+ $$invalidate(8, searchCancelled = true);
16096
+ $$invalidate(13, isLoading = false);
16097
+ $$invalidate(10, searchArray = []);
16098
+ $$invalidate(12, searchActive = false);
16053
16099
  sendSearchStatus(searchActive);
16054
16100
  };
16055
16101
 
16056
16102
  const clearSearch = () => {
16057
- $$invalidate(6, searchValue = '');
16103
+ $$invalidate(7, searchValue = '');
16058
16104
  searchElement.focus();
16059
16105
  };
16060
16106
 
@@ -16110,7 +16156,8 @@
16110
16156
  'clientstylingurl',
16111
16157
  'integratedgameframedesktop',
16112
16158
  'integratedgameframemobile',
16113
- 'translationUrl'
16159
+ 'translationUrl',
16160
+ 'showfavorites'
16114
16161
  ];
16115
16162
 
16116
16163
  Object_1.keys($$props).forEach(key => {
@@ -16119,13 +16166,13 @@
16119
16166
 
16120
16167
  function input_input_handler() {
16121
16168
  searchValue = this.value;
16122
- $$invalidate(6, searchValue);
16169
+ $$invalidate(7, searchValue);
16123
16170
  }
16124
16171
 
16125
16172
  function input_binding($$value) {
16126
16173
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
16127
16174
  searchElement = $$value;
16128
- $$invalidate(10, searchElement);
16175
+ $$invalidate(11, searchElement);
16129
16176
  });
16130
16177
  }
16131
16178
 
@@ -16135,19 +16182,20 @@
16135
16182
  function div3_binding($$value) {
16136
16183
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
16137
16184
  customStylingContainer = $$value;
16138
- $$invalidate(8, customStylingContainer);
16185
+ $$invalidate(9, customStylingContainer);
16139
16186
  });
16140
16187
  }
16141
16188
 
16142
16189
  $$self.$$set = $$props => {
16143
16190
  if ('endpoint' in $$props) $$invalidate(0, endpoint = $$props.endpoint);
16144
- if ('datasource' in $$props) $$invalidate(17, datasource = $$props.datasource);
16191
+ if ('datasource' in $$props) $$invalidate(18, datasource = $$props.datasource);
16145
16192
  if ('lang' in $$props) $$invalidate(1, lang = $$props.lang);
16146
16193
  if ('clientstyling' in $$props) $$invalidate(2, clientstyling = $$props.clientstyling);
16147
16194
  if ('clientstylingurl' in $$props) $$invalidate(3, clientstylingurl = $$props.clientstylingurl);
16148
16195
  if ('integratedgameframedesktop' in $$props) $$invalidate(4, integratedgameframedesktop = $$props.integratedgameframedesktop);
16149
16196
  if ('integratedgameframemobile' in $$props) $$invalidate(5, integratedgameframemobile = $$props.integratedgameframemobile);
16150
- if ('translationUrl' in $$props) $$invalidate(18, translationUrl = $$props.translationUrl);
16197
+ if ('translationUrl' in $$props) $$invalidate(19, translationUrl = $$props.translationUrl);
16198
+ if ('showfavorites' in $$props) $$invalidate(6, showfavorites = $$props.showfavorites);
16151
16199
  };
16152
16200
 
16153
16201
  $$self.$capture_state = () => ({
@@ -16165,6 +16213,7 @@
16165
16213
  integratedgameframedesktop,
16166
16214
  integratedgameframemobile,
16167
16215
  translationUrl,
16216
+ showfavorites,
16168
16217
  userAgent,
16169
16218
  searchArray,
16170
16219
  searchedValues,
@@ -16175,11 +16224,17 @@
16175
16224
  searchActive,
16176
16225
  isLoading,
16177
16226
  customStylingContainer,
16227
+ isLoggedIn,
16228
+ sessionID,
16229
+ playerID,
16230
+ favoriteGamesIds,
16178
16231
  setTranslationUrl,
16179
16232
  messageHandler,
16180
16233
  onFocus,
16181
16234
  getGames,
16182
16235
  getGame,
16236
+ getFavoriteGames,
16237
+ checkFavorite,
16183
16238
  addSearchedItem,
16184
16239
  getCookieValue,
16185
16240
  cancelSearch,
@@ -16193,23 +16248,28 @@
16193
16248
 
16194
16249
  $$self.$inject_state = $$props => {
16195
16250
  if ('endpoint' in $$props) $$invalidate(0, endpoint = $$props.endpoint);
16196
- if ('datasource' in $$props) $$invalidate(17, datasource = $$props.datasource);
16251
+ if ('datasource' in $$props) $$invalidate(18, datasource = $$props.datasource);
16197
16252
  if ('lang' in $$props) $$invalidate(1, lang = $$props.lang);
16198
16253
  if ('clientstyling' in $$props) $$invalidate(2, clientstyling = $$props.clientstyling);
16199
16254
  if ('clientstylingurl' in $$props) $$invalidate(3, clientstylingurl = $$props.clientstylingurl);
16200
16255
  if ('integratedgameframedesktop' in $$props) $$invalidate(4, integratedgameframedesktop = $$props.integratedgameframedesktop);
16201
16256
  if ('integratedgameframemobile' in $$props) $$invalidate(5, integratedgameframemobile = $$props.integratedgameframemobile);
16202
- if ('translationUrl' in $$props) $$invalidate(18, translationUrl = $$props.translationUrl);
16203
- if ('userAgent' in $$props) $$invalidate(26, userAgent = $$props.userAgent);
16204
- if ('searchArray' in $$props) $$invalidate(9, searchArray = $$props.searchArray);
16257
+ if ('translationUrl' in $$props) $$invalidate(19, translationUrl = $$props.translationUrl);
16258
+ if ('showfavorites' in $$props) $$invalidate(6, showfavorites = $$props.showfavorites);
16259
+ if ('userAgent' in $$props) $$invalidate(31, userAgent = $$props.userAgent);
16260
+ if ('searchArray' in $$props) $$invalidate(10, searchArray = $$props.searchArray);
16205
16261
  if ('searchedValues' in $$props) searchedValues = $$props.searchedValues;
16206
16262
  if ('gamesCache' in $$props) gamesCache = $$props.gamesCache;
16207
- if ('searchValue' in $$props) $$invalidate(6, searchValue = $$props.searchValue);
16208
- if ('searchElement' in $$props) $$invalidate(10, searchElement = $$props.searchElement);
16209
- if ('searchCancelled' in $$props) $$invalidate(7, searchCancelled = $$props.searchCancelled);
16210
- if ('searchActive' in $$props) $$invalidate(11, searchActive = $$props.searchActive);
16211
- if ('isLoading' in $$props) $$invalidate(12, isLoading = $$props.isLoading);
16212
- if ('customStylingContainer' in $$props) $$invalidate(8, customStylingContainer = $$props.customStylingContainer);
16263
+ if ('searchValue' in $$props) $$invalidate(7, searchValue = $$props.searchValue);
16264
+ if ('searchElement' in $$props) $$invalidate(11, searchElement = $$props.searchElement);
16265
+ if ('searchCancelled' in $$props) $$invalidate(8, searchCancelled = $$props.searchCancelled);
16266
+ if ('searchActive' in $$props) $$invalidate(12, searchActive = $$props.searchActive);
16267
+ if ('isLoading' in $$props) $$invalidate(13, isLoading = $$props.isLoading);
16268
+ if ('customStylingContainer' in $$props) $$invalidate(9, customStylingContainer = $$props.customStylingContainer);
16269
+ if ('isLoggedIn' in $$props) $$invalidate(20, isLoggedIn = $$props.isLoggedIn);
16270
+ if ('sessionID' in $$props) sessionID = $$props.sessionID;
16271
+ if ('playerID' in $$props) playerID = $$props.playerID;
16272
+ if ('favoriteGamesIds' in $$props) favoriteGamesIds = $$props.favoriteGamesIds;
16213
16273
  };
16214
16274
 
16215
16275
  if ($$props && "$$inject" in $$props) {
@@ -16217,7 +16277,7 @@
16217
16277
  }
16218
16278
 
16219
16279
  $$self.$$.update = () => {
16220
- if ($$self.$$.dirty[0] & /*searchValue, endpoint, datasource, lang, searchCancelled*/ 131267) {
16280
+ if ($$self.$$.dirty[0] & /*searchValue, endpoint, datasource, lang, searchCancelled*/ 262531) {
16221
16281
  if (searchValue.length >= 2) {
16222
16282
  const searchUrl = new URL(`${endpoint}/casino/games`);
16223
16283
  searchUrl.searchParams.append("datasource", datasource);
@@ -16228,7 +16288,10 @@
16228
16288
  searchUrl.searchParams.append("filter", `name=${searchValue}`);
16229
16289
 
16230
16290
  getGames(searchUrl).then(searchData => {
16231
- $$invalidate(9, searchArray = searchData.items.map(item => item));
16291
+ $$invalidate(10, searchArray = searchData.items.map(item => {
16292
+ item.isFavorite = checkFavorite(item.id);
16293
+ return item;
16294
+ }));
16232
16295
  });
16233
16296
  } else {
16234
16297
  if (!searchCancelled) {
@@ -16241,15 +16304,19 @@
16241
16304
  lang && setActiveLanguage();
16242
16305
  }
16243
16306
 
16244
- if ($$self.$$.dirty[0] & /*translationUrl*/ 262144) {
16307
+ if ($$self.$$.dirty[0] & /*translationUrl*/ 524288) {
16245
16308
  translationUrl && setTranslationUrl();
16246
16309
  }
16247
16310
 
16248
- if ($$self.$$.dirty[0] & /*clientstyling, customStylingContainer*/ 260) {
16311
+ if ($$self.$$.dirty[0] & /*showfavorites, isLoggedIn*/ 1048640) {
16312
+ showfavorites && isLoggedIn && getFavoriteGames();
16313
+ }
16314
+
16315
+ if ($$self.$$.dirty[0] & /*clientstyling, customStylingContainer*/ 516) {
16249
16316
  clientstyling && customStylingContainer && setClientStyling();
16250
16317
  }
16251
16318
 
16252
- if ($$self.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/ 264) {
16319
+ if ($$self.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/ 520) {
16253
16320
  clientstylingurl && customStylingContainer && setClientStylingURL();
16254
16321
  }
16255
16322
  };
@@ -16261,6 +16328,7 @@
16261
16328
  clientstylingurl,
16262
16329
  integratedgameframedesktop,
16263
16330
  integratedgameframemobile,
16331
+ showfavorites,
16264
16332
  searchValue,
16265
16333
  searchCancelled,
16266
16334
  customStylingContainer,
@@ -16274,6 +16342,7 @@
16274
16342
  clearSearch,
16275
16343
  datasource,
16276
16344
  translationUrl,
16345
+ isLoggedIn,
16277
16346
  input_input_handler,
16278
16347
  input_binding,
16279
16348
  click_handler,
@@ -16299,13 +16368,14 @@
16299
16368
  safe_not_equal,
16300
16369
  {
16301
16370
  endpoint: 0,
16302
- datasource: 17,
16371
+ datasource: 18,
16303
16372
  lang: 1,
16304
16373
  clientstyling: 2,
16305
16374
  clientstylingurl: 3,
16306
16375
  integratedgameframedesktop: 4,
16307
16376
  integratedgameframemobile: 5,
16308
- translationUrl: 18
16377
+ translationUrl: 19,
16378
+ showfavorites: 6
16309
16379
  },
16310
16380
  null,
16311
16381
  [-1, -1]
@@ -16332,7 +16402,8 @@
16332
16402
  "clientstylingurl",
16333
16403
  "integratedgameframedesktop",
16334
16404
  "integratedgameframemobile",
16335
- "translationUrl"
16405
+ "translationUrl",
16406
+ "showfavorites"
16336
16407
  ];
16337
16408
  }
16338
16409
 
@@ -16346,7 +16417,7 @@
16346
16417
  }
16347
16418
 
16348
16419
  get datasource() {
16349
- return this.$$.ctx[17];
16420
+ return this.$$.ctx[18];
16350
16421
  }
16351
16422
 
16352
16423
  set datasource(datasource) {
@@ -16400,13 +16471,22 @@
16400
16471
  }
16401
16472
 
16402
16473
  get translationUrl() {
16403
- return this.$$.ctx[18];
16474
+ return this.$$.ctx[19];
16404
16475
  }
16405
16476
 
16406
16477
  set translationUrl(translationUrl) {
16407
16478
  this.$$set({ translationUrl });
16408
16479
  flush();
16409
16480
  }
16481
+
16482
+ get showfavorites() {
16483
+ return this.$$.ctx[6];
16484
+ }
16485
+
16486
+ set showfavorites(showfavorites) {
16487
+ this.$$set({ showfavorites });
16488
+ flush();
16489
+ }
16410
16490
  }
16411
16491
 
16412
16492
  !customElements.get('casino-search') && customElements.define('casino-search', CasinoSearch);