@everymatrix/player-account-timeout 0.0.104 → 0.0.108

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.
@@ -4441,11 +4441,12 @@
4441
4441
 
4442
4442
  function get_each_context(ctx, list, i) {
4443
4443
  const child_ctx = ctx.slice();
4444
- child_ctx[9] = list[i];
4444
+ child_ctx[9] = list[i].value;
4445
+ child_ctx[10] = list[i].text;
4445
4446
  return child_ctx;
4446
4447
  }
4447
4448
 
4448
- // (16:2) {#if isMobile}
4449
+ // (21:2) {#if isMobile}
4449
4450
  function create_if_block(ctx) {
4450
4451
  let div;
4451
4452
  let svg;
@@ -4467,8 +4468,8 @@
4467
4468
  span.textContent = "Return to menu";
4468
4469
  attr_dev(path, "id", "Chevron_Right");
4469
4470
  attr_dev(path, "d", "M57.633,129.007L165.93,237.268c4.752,4.74,12.451,4.74,17.215,0c4.752-4.74,4.752-12.439,0-17.179\n l-99.707-99.671l99.695-99.671c4.752-4.74,4.752-12.439,0-17.191c-4.752-4.74-12.463-4.74-17.215,0L57.621,111.816\n C52.942,116.507,52.942,124.327,57.633,129.007z");
4470
- add_location(path, file, 20, 10, 992);
4471
- add_location(g, file, 19, 8, 978);
4471
+ add_location(path, file, 25, 10, 1178);
4472
+ add_location(g, file, 24, 8, 1164);
4472
4473
  attr_dev(svg, "version", "1.1");
4473
4474
  attr_dev(svg, "id", "Capa_1");
4474
4475
  attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg");
@@ -4480,10 +4481,10 @@
4480
4481
  attr_dev(svg, "xml:space", "preserve");
4481
4482
  attr_dev(svg, "width", "18px");
4482
4483
  attr_dev(svg, "fill", "#58586B");
4483
- add_location(svg, file, 17, 6, 703);
4484
- add_location(span, file, 25, 6, 1333);
4484
+ add_location(svg, file, 22, 6, 889);
4485
+ add_location(span, file, 30, 6, 1519);
4485
4486
  attr_dev(div, "class", "MenuReturnButton");
4486
- add_location(div, file, 16, 4, 634);
4487
+ add_location(div, file, 21, 4, 820);
4487
4488
  },
4488
4489
  m: function mount(target, anchor) {
4489
4490
  insert_dev(target, div, anchor);
@@ -4510,26 +4511,26 @@
4510
4511
  block,
4511
4512
  id: create_if_block.name,
4512
4513
  type: "if",
4513
- source: "(16:2) {#if isMobile}",
4514
+ source: "(21:2) {#if isMobile}",
4514
4515
  ctx
4515
4516
  });
4516
4517
 
4517
4518
  return block;
4518
4519
  }
4519
4520
 
4520
- // (36:6) {#each timeoutOptions as timeoutOption}
4521
+ // (41:6) {#each timeoutOptions as {value, text}}
4521
4522
  function create_each_block(ctx) {
4522
4523
  let option;
4523
- let t_value = /*timeoutOption*/ ctx[9] + "";
4524
+ let t_value = /*text*/ ctx[10] + "";
4524
4525
  let t;
4525
4526
 
4526
4527
  const block = {
4527
4528
  c: function create() {
4528
4529
  option = element("option");
4529
4530
  t = text(t_value);
4530
- option.__value = /*timeoutOption*/ ctx[9];
4531
+ option.__value = /*value*/ ctx[9];
4531
4532
  option.value = option.__value;
4532
- add_location(option, file, 36, 8, 2249);
4533
+ add_location(option, file, 41, 8, 2435);
4533
4534
  },
4534
4535
  m: function mount(target, anchor) {
4535
4536
  insert_dev(target, option, anchor);
@@ -4545,7 +4546,7 @@
4545
4546
  block,
4546
4547
  id: create_each_block.name,
4547
4548
  type: "each",
4548
- source: "(36:6) {#each timeoutOptions as timeoutOption}",
4549
+ source: "(41:6) {#each timeoutOptions as {value, text}}",
4549
4550
  ctx
4550
4551
  });
4551
4552
 
@@ -4607,22 +4608,22 @@
4607
4608
  button.textContent = "Save";
4608
4609
  this.c = noop$1;
4609
4610
  attr_dev(h2, "class", "TimeoutTitle " + (/*isMobile*/ ctx[1] ? "TimeoutTitleMobile" : ""));
4610
- add_location(h2, file, 28, 2, 1382);
4611
- add_location(p0, file, 30, 4, 1543);
4612
- add_location(p1, file, 31, 4, 1765);
4611
+ add_location(h2, file, 33, 2, 1568);
4612
+ add_location(p0, file, 35, 4, 1729);
4613
+ add_location(p1, file, 36, 4, 1951);
4613
4614
  attr_dev(div0, "class", "TimeoutDescription " + (/*isMobile*/ ctx[1] ? "TimeoutDescriptionMobile" : ""));
4614
- add_location(div0, file, 29, 2, 1461);
4615
+ add_location(div0, file, 34, 2, 1647);
4615
4616
  attr_dev(select, "class", "TimeoutSelect " + (/*isMobile*/ ctx[1] ? "TimeoutSelectMobile" : ""));
4616
4617
  if (/*timeoutSelected*/ ctx[0] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[6].call(select));
4617
- add_location(select, file, 34, 4, 2095);
4618
+ add_location(select, file, 39, 4, 2281);
4618
4619
  attr_dev(div1, "class", "TimeoutSelectWrapper");
4619
- add_location(div1, file, 33, 2, 2056);
4620
+ add_location(div1, file, 38, 2, 2242);
4620
4621
  attr_dev(button, "class", "TimeoutSave");
4621
- add_location(button, file, 41, 4, 2429);
4622
+ add_location(button, file, 46, 4, 2598);
4622
4623
  attr_dev(div2, "class", "TimeoutActionButtons " + (/*isMobile*/ ctx[1] ? "TimeoutActionButtonsMobile" : ""));
4623
- add_location(div2, file, 40, 2, 2343);
4624
+ add_location(div2, file, 45, 2, 2512);
4624
4625
  attr_dev(div3, "class", "TimeoutWrapper " + (/*isMobile*/ ctx[1] ? "TimeoutWrapperMobile" : ""));
4625
- add_location(div3, file, 14, 0, 543);
4626
+ add_location(div3, file, 19, 0, 729);
4626
4627
  },
4627
4628
  l: function claim(nodes) {
4628
4629
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -4718,11 +4719,33 @@
4718
4719
  validate_slots("undefined", slots, []);
4719
4720
  let userAgent = window.navigator.userAgent;
4720
4721
  let isMobile = getDevice(userAgent) === "PC" ? false : true;
4721
- let timeoutOptions = ["24 hours", "7 days", "30 days", "3 months"];
4722
- let timeoutSelected = timeoutOptions[0];
4722
+
4723
+ let timeoutOptions = [
4724
+ {
4725
+ value: "CoolOffFor24Hours",
4726
+ text: "24 hours"
4727
+ },
4728
+ { value: "CoolOffFor7Days", text: "7 days" },
4729
+ {
4730
+ value: "CoolOffFor30Days",
4731
+ text: "30 days"
4732
+ },
4733
+ {
4734
+ value: "CoolOffFor3Months",
4735
+ text: "3 months"
4736
+ }
4737
+ ];
4738
+
4739
+ let timeoutSelected = timeoutOptions[0].value;
4723
4740
 
4724
4741
  const saveTimeout = () => {
4725
- window.postMessage({ type: "SetTimeout", timeoutSelected }, window.location.href);
4742
+ window.postMessage(
4743
+ {
4744
+ type: "SetPlayerAccountTimeout",
4745
+ timeoutSelected
4746
+ },
4747
+ window.location.href
4748
+ );
4726
4749
  };
4727
4750
 
4728
4751
  const toggleScreen = () => {