@everymatrix/player-account-controller-nd 1.50.0 → 1.50.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.
Files changed (62) hide show
  1. package/components/GeneralLogout-BBoBE1Lx.cjs +8 -0
  2. package/components/{GeneralLogout-ATgFK7sR.js → GeneralLogout-CpfJL45A.js} +323 -317
  3. package/components/{PlayerAccountBettingHistory-Cy59ufCv.cjs → PlayerAccountBettingHistory-BhFyAw7S.cjs} +1 -1
  4. package/components/{PlayerAccountBettingHistory-CFtSVoji.js → PlayerAccountBettingHistory-C6Jnecgm.js} +1 -1
  5. package/components/{PlayerAccountBiometrics-C6v6jJ9w.js → PlayerAccountBiometrics-CbgGBdjA.js} +1 -1
  6. package/components/{PlayerAccountBiometrics-BZ8i34dM.cjs → PlayerAccountBiometrics-U1ab8cUd.cjs} +1 -1
  7. package/components/{PlayerAccountClosureNd-COHgZ9-G.cjs → PlayerAccountClosureNd-CLRXe1KM.cjs} +1 -1
  8. package/components/{PlayerAccountClosureNd-DUcdQzUc.js → PlayerAccountClosureNd-CQa6GJ-9.js} +1 -1
  9. package/components/{PlayerAccountControllerNd-D5w3Kg-r.js → PlayerAccountControllerNd-BSVMbuxt.js} +20 -20
  10. package/components/{PlayerAccountControllerNd-CV9vO5ca.cjs → PlayerAccountControllerNd-CuHyqivG.cjs} +1 -1
  11. package/components/{PlayerAccountGamingLimits-qXOqPPkw.js → PlayerAccountGamingLimits-BysIpKq_.js} +2 -2
  12. package/components/{PlayerAccountGamingLimits-CV_NoRFx.cjs → PlayerAccountGamingLimits-ImaSq8Bu.cjs} +1 -1
  13. package/components/{PlayerAccountGamingLimitsConfirmationModal-Dzxus6A7.cjs → PlayerAccountGamingLimitsConfirmationModal-B1H9kGBj.cjs} +1 -1
  14. package/components/{PlayerAccountGamingLimitsConfirmationModal-DbcnBHRs.js → PlayerAccountGamingLimitsConfirmationModal-C1JaSEj9.js} +1 -1
  15. package/components/{PlayerAccountGamingLimitsGroupEdit-V_JV0LSw.js → PlayerAccountGamingLimitsGroupEdit-DvbllfiB.js} +4 -4
  16. package/components/{PlayerAccountGamingLimitsGroupEdit-CZNV2Pxd.cjs → PlayerAccountGamingLimitsGroupEdit-mkhXUxp2.cjs} +2 -2
  17. package/components/{PlayerAccountGamingLimitsHistory2Nd-BsiYLKxc.js → PlayerAccountGamingLimitsHistory2Nd-5utMOF-c.js} +1 -1
  18. package/components/{PlayerAccountGamingLimitsHistory2Nd-g_nVdqz_.cjs → PlayerAccountGamingLimitsHistory2Nd-PWXwK3xR.cjs} +1 -1
  19. package/components/{PlayerAccountGamingLimitsInfoCard-BjLZ3MaL.cjs → PlayerAccountGamingLimitsInfoCard-CcdNEm3s.cjs} +1 -1
  20. package/components/{PlayerAccountGamingLimitsInfoCard-C7DHDazS.js → PlayerAccountGamingLimitsInfoCard-Cf-_Q_Il.js} +3 -3
  21. package/components/{PlayerAccountGamingLimitsPage2Gm16Nd-CA2a3x6-.cjs → PlayerAccountGamingLimitsPage2Gm16Nd-Cd5sgo9y.cjs} +1 -1
  22. package/components/{PlayerAccountGamingLimitsPage2Gm16Nd-BCXkwI8L.js → PlayerAccountGamingLimitsPage2Gm16Nd-Dgj11XWr.js} +1 -1
  23. package/components/{PlayerAccountGamingLimitsPopup-DXmjH-pQ.js → PlayerAccountGamingLimitsPopup-BGVFSakv.js} +1 -1
  24. package/components/{PlayerAccountGamingLimitsPopup-Dz_qQuDe.cjs → PlayerAccountGamingLimitsPopup-C47JGdE1.cjs} +1 -1
  25. package/components/{PlayerAccountGamingLimitsWrapper2Nd-W0XSHSmQ.cjs → PlayerAccountGamingLimitsWrapper2Nd-B1d5eGWo.cjs} +1 -1
  26. package/components/{PlayerAccountGamingLimitsWrapper2Nd-Cqbi6OIR.js → PlayerAccountGamingLimitsWrapper2Nd-D2CBz_5K.js} +3 -3
  27. package/components/{PlayerAccountMenuNd-D1msRHN7.js → PlayerAccountMenuNd-Cy1yKfxC.js} +2 -2
  28. package/components/{PlayerAccountMenuNd-DHfc8luf.cjs → PlayerAccountMenuNd-T9fpXE8-.cjs} +1 -1
  29. package/components/{PlayerAccountModal-DEtLb1RB.cjs → PlayerAccountModal-CUdeZ6ZD.cjs} +1 -1
  30. package/components/{PlayerAccountModal-BCywDW8T.js → PlayerAccountModal-CcuAGQY1.js} +1 -1
  31. package/components/{PlayerAccountNotifications-DEqB-PVw.cjs → PlayerAccountNotifications-B5y5G3E_.cjs} +1 -1
  32. package/components/{PlayerAccountNotifications-CmsfuwvE.js → PlayerAccountNotifications-BS8gXEjF.js} +1 -1
  33. package/components/{PlayerAccountSelfExclusionNd-7TYKpU1_.js → PlayerAccountSelfExclusionNd-DJdimTeI.js} +481 -2
  34. package/components/{PlayerAccountSelfExclusionNd-LiHqUC3T.cjs → PlayerAccountSelfExclusionNd-uHrwQnpT.cjs} +481 -3
  35. package/components/{PlayerAccountTimeout-CXeEUwpu.cjs → PlayerAccountTimeout-CNtkqjo7.cjs} +1 -1
  36. package/components/{PlayerAccountTimeout-DPrx1P_i.js → PlayerAccountTimeout-CoL4r8kh.js} +1 -1
  37. package/components/{PlayerActiveBonuses-DA6p75G4.cjs → PlayerActiveBonuses-DOOKCxQp.cjs} +1 -1
  38. package/components/{PlayerActiveBonuses-27KndevJ.js → PlayerActiveBonuses-Dm8oJ-8E.js} +2 -2
  39. package/components/{PlayerBonusCard-DCNIGmVp.cjs → PlayerBonusCard-Bt-n3Mxi.cjs} +1 -1
  40. package/components/{PlayerBonusCard-DA08N08o.js → PlayerBonusCard-y6Mmy7BC.js} +2 -2
  41. package/components/{PlayerBonusHistory-BB5sG7OY.js → PlayerBonusHistory-BAqio45G.js} +4 -4
  42. package/components/{PlayerBonusHistory-DTgZPGWC.cjs → PlayerBonusHistory-CwcvkOns.cjs} +1 -1
  43. package/components/{PlayerChangePassword-BxwRqAxy.cjs → PlayerChangePassword-C-8QN3hH.cjs} +1 -1
  44. package/components/{PlayerChangePassword-BP_oFQvT.js → PlayerChangePassword-CU9ISaq8.js} +1 -1
  45. package/components/{PlayerDeposit-bjlqIdhX.cjs → PlayerDeposit-BLymLH97.cjs} +1 -1
  46. package/components/{PlayerDeposit-CHF20-Fa.js → PlayerDeposit-BO3gHJ2M.js} +1 -1
  47. package/components/{PlayerGamingHistory-B_w-qsoF.cjs → PlayerGamingHistory-Bsrdosmr.cjs} +1 -1
  48. package/components/{PlayerGamingHistory-B4_0pXmI.js → PlayerGamingHistory-dHWr4quw.js} +4 -4
  49. package/components/{PlayerPendingWithdrawals-BgExjLDb.js → PlayerPendingWithdrawals-CSQvhjqu.js} +1 -1
  50. package/components/{PlayerPendingWithdrawals-C0HSC7tm.cjs → PlayerPendingWithdrawals-CUpLO6X3.cjs} +1 -1
  51. package/components/{PlayerProfileInfo-CNKIiMA-.cjs → PlayerProfileInfo-8LQ0QT94.cjs} +1 -1
  52. package/components/{PlayerProfileInfo-Dmpc8_7w.js → PlayerProfileInfo-CFjLZ0AP.js} +1 -1
  53. package/components/{PlayerRealityCheck-CtU2sJN0.cjs → PlayerRealityCheck-B--KgOX7.cjs} +1 -1
  54. package/components/{PlayerRealityCheck-supovOsg.js → PlayerRealityCheck-CKMxPxsj.js} +1 -1
  55. package/components/{PlayerTransactionHistory-n-Knh2Ex.js → PlayerTransactionHistory-1P_fFQ9M.js} +1 -1
  56. package/components/{PlayerTransactionHistory-Dg7CD0Zs.cjs → PlayerTransactionHistory-KkAMcV0S.cjs} +1 -1
  57. package/components/{PlayerWithdrawal-YdjDSwtZ.js → PlayerWithdrawal-Bho97r_v.js} +1 -1
  58. package/components/{PlayerWithdrawal-CGpOe7ya.cjs → PlayerWithdrawal-Bt2B8luj.cjs} +1 -1
  59. package/es2015/player-account-controller-nd.cjs +1 -1
  60. package/es2015/player-account-controller-nd.js +1 -1
  61. package/package.json +1 -1
  62. package/components/GeneralLogout-CnBIvtF1.cjs +0 -8
@@ -26,7 +26,7 @@ var At = (s, t, e) => new Promise((o, i) => {
26
26
  }, a = (l) => l.done ? o(l.value) : Promise.resolve(l.value).then(r, n);
27
27
  a((e = e.apply(s, t)).next());
28
28
  });
29
- import { a1 as Hr, a2 as jr, a as Yr, $ as Vr, S as Ur, i as Wr, f as we, c as qr, s as Kr, b as Gr, K as vs, e as T, d as q, t as K, w as ye, g as A, h as He, k as Ne, l as g, m as Nt, n as X, o as bs, p as Fe, L as Jr, r as Xr, q as Zr, u as Qr, v as en, j as je, x as xs, y as tn } from "./GeneralLogout-ATgFK7sR.js";
29
+ import { a1 as Hr, a2 as jr, a as Yr, $ as Vr, S as Ur, i as Wr, f as we, c as qr, s as Kr, b as Gr, K as vs, e as T, d as q, t as K, w as ye, g as A, h as He, k as Ne, l as g, m as Nt, n as X, o as bs, p as Fe, L as Jr, r as Xr, q as Zr, u as Qr, v as en, j as je, x as xs, y as tn } from "./GeneralLogout-CpfJL45A.js";
30
30
  var mi = { exports: {} };
31
31
  (function(s, t) {
32
32
  (function(e, o) {
@@ -5286,7 +5286,7 @@ const Ja = U((s) => {
5286
5286
  * Google as part of the polymer project is also subject to an additional IP
5287
5287
  * rights grant found at http://polymer.github.io/PATENTS.txt
5288
5288
  */
5289
- const Xa = "3.5.1", Zs = window.ShadyCSS && window.ShadyCSS.cssBuild, Za = U((s) => {
5289
+ const Xa = "3.5.2", Zs = window.ShadyCSS && window.ShadyCSS.cssBuild, Za = U((s) => {
5290
5290
  const t = Ja(es(s));
5291
5291
  function e(l) {
5292
5292
  if (!l.hasOwnProperty(
@@ -7438,6 +7438,485 @@ const ei = function(s, t) {
7438
7438
  };
7439
7439
  window.Vaadin.developmentMode === void 0 && (window.Vaadin.developmentMode = Sl());
7440
7440
  function Pl() {
7441
+ /*! vaadin-dev-mode:start
7442
+ (function () {
7443
+ 'use strict';
7444
+
7445
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
7446
+ return typeof obj;
7447
+ } : function (obj) {
7448
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
7449
+ };
7450
+
7451
+ var classCallCheck = function (instance, Constructor) {
7452
+ if (!(instance instanceof Constructor)) {
7453
+ throw new TypeError("Cannot call a class as a function");
7454
+ }
7455
+ };
7456
+
7457
+ var createClass = function () {
7458
+ function defineProperties(target, props) {
7459
+ for (var i = 0; i < props.length; i++) {
7460
+ var descriptor = props[i];
7461
+ descriptor.enumerable = descriptor.enumerable || false;
7462
+ descriptor.configurable = true;
7463
+ if ("value" in descriptor) descriptor.writable = true;
7464
+ Object.defineProperty(target, descriptor.key, descriptor);
7465
+ }
7466
+ }
7467
+
7468
+ return function (Constructor, protoProps, staticProps) {
7469
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
7470
+ if (staticProps) defineProperties(Constructor, staticProps);
7471
+ return Constructor;
7472
+ };
7473
+ }();
7474
+
7475
+ var getPolymerVersion = function getPolymerVersion() {
7476
+ return window.Polymer && window.Polymer.version;
7477
+ };
7478
+
7479
+ var StatisticsGatherer = function () {
7480
+ function StatisticsGatherer(logger) {
7481
+ classCallCheck(this, StatisticsGatherer);
7482
+
7483
+ this.now = new Date().getTime();
7484
+ this.logger = logger;
7485
+ }
7486
+
7487
+ createClass(StatisticsGatherer, [{
7488
+ key: 'frameworkVersionDetectors',
7489
+ value: function frameworkVersionDetectors() {
7490
+ return {
7491
+ 'Flow': function Flow() {
7492
+ if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
7493
+ var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
7494
+ return window.Vaadin.Flow.clients[key];
7495
+ }).filter(function (client) {
7496
+ return client.getVersionInfo;
7497
+ }).map(function (client) {
7498
+ return client.getVersionInfo().flow;
7499
+ });
7500
+ if (flowVersions.length > 0) {
7501
+ return flowVersions[0];
7502
+ }
7503
+ }
7504
+ },
7505
+ 'Vaadin Framework': function VaadinFramework() {
7506
+ if (window.vaadin && window.vaadin.clients) {
7507
+ var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
7508
+ return client.getVersionInfo;
7509
+ }).map(function (client) {
7510
+ return client.getVersionInfo().vaadinVersion;
7511
+ });
7512
+ if (frameworkVersions.length > 0) {
7513
+ return frameworkVersions[0];
7514
+ }
7515
+ }
7516
+ },
7517
+ 'AngularJs': function AngularJs() {
7518
+ if (window.angular && window.angular.version && window.angular.version) {
7519
+ return window.angular.version.full;
7520
+ }
7521
+ },
7522
+ 'Angular': function Angular() {
7523
+ if (window.ng) {
7524
+ var tags = document.querySelectorAll("[ng-version]");
7525
+ if (tags.length > 0) {
7526
+ return tags[0].getAttribute("ng-version");
7527
+ }
7528
+ return "Unknown";
7529
+ }
7530
+ },
7531
+ 'Backbone.js': function BackboneJs() {
7532
+ if (window.Backbone) {
7533
+ return window.Backbone.VERSION;
7534
+ }
7535
+ },
7536
+ 'React': function React() {
7537
+ var reactSelector = '[data-reactroot], [data-reactid]';
7538
+ if (!!document.querySelector(reactSelector)) {
7539
+ // React does not publish the version by default
7540
+ return "unknown";
7541
+ }
7542
+ },
7543
+ 'Ember': function Ember() {
7544
+ if (window.Em && window.Em.VERSION) {
7545
+ return window.Em.VERSION;
7546
+ } else if (window.Ember && window.Ember.VERSION) {
7547
+ return window.Ember.VERSION;
7548
+ }
7549
+ },
7550
+ 'jQuery': function (_jQuery) {
7551
+ function jQuery() {
7552
+ return _jQuery.apply(this, arguments);
7553
+ }
7554
+
7555
+ jQuery.toString = function () {
7556
+ return _jQuery.toString();
7557
+ };
7558
+
7559
+ return jQuery;
7560
+ }(function () {
7561
+ if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
7562
+ return jQuery.prototype.jquery;
7563
+ }
7564
+ }),
7565
+ 'Polymer': function Polymer() {
7566
+ var version = getPolymerVersion();
7567
+ if (version) {
7568
+ return version;
7569
+ }
7570
+ },
7571
+ 'LitElement': function LitElement() {
7572
+ var version = window.litElementVersions && window.litElementVersions[0];
7573
+ if (version) {
7574
+ return version;
7575
+ }
7576
+ },
7577
+ 'LitHtml': function LitHtml() {
7578
+ var version = window.litHtmlVersions && window.litHtmlVersions[0];
7579
+ if (version) {
7580
+ return version;
7581
+ }
7582
+ },
7583
+ 'Vue.js': function VueJs() {
7584
+ if (window.Vue) {
7585
+ return window.Vue.version;
7586
+ }
7587
+ }
7588
+ };
7589
+ }
7590
+ }, {
7591
+ key: 'getUsedVaadinElements',
7592
+ value: function getUsedVaadinElements(elements) {
7593
+ var version = getPolymerVersion();
7594
+ var elementClasses = void 0;
7595
+ // NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
7596
+ // Check all locations calling the method getEntries() in
7597
+ // https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
7598
+ // Currently it is only used by BootstrapHandler.
7599
+ if (version && version.indexOf('2') === 0) {
7600
+ // Polymer 2: components classes are stored in window.Vaadin
7601
+ elementClasses = Object.keys(window.Vaadin).map(function (c) {
7602
+ return window.Vaadin[c];
7603
+ }).filter(function (c) {
7604
+ return c.is;
7605
+ });
7606
+ } else {
7607
+ // Polymer 3: components classes are stored in window.Vaadin.registrations
7608
+ elementClasses = window.Vaadin.registrations || [];
7609
+ }
7610
+ elementClasses.forEach(function (klass) {
7611
+ var version = klass.version ? klass.version : "0.0.0";
7612
+ elements[klass.is] = { version: version };
7613
+ });
7614
+ }
7615
+ }, {
7616
+ key: 'getUsedVaadinThemes',
7617
+ value: function getUsedVaadinThemes(themes) {
7618
+ ['Lumo', 'Material'].forEach(function (themeName) {
7619
+ var theme;
7620
+ var version = getPolymerVersion();
7621
+ if (version && version.indexOf('2') === 0) {
7622
+ // Polymer 2: themes are stored in window.Vaadin
7623
+ theme = window.Vaadin[themeName];
7624
+ } else {
7625
+ // Polymer 3: themes are stored in custom element registry
7626
+ theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
7627
+ }
7628
+ if (theme && theme.version) {
7629
+ themes[themeName] = { version: theme.version };
7630
+ }
7631
+ });
7632
+ }
7633
+ }, {
7634
+ key: 'getFrameworks',
7635
+ value: function getFrameworks(frameworks) {
7636
+ var detectors = this.frameworkVersionDetectors();
7637
+ Object.keys(detectors).forEach(function (framework) {
7638
+ var detector = detectors[framework];
7639
+ try {
7640
+ var version = detector();
7641
+ if (version) {
7642
+ frameworks[framework] = { version: version };
7643
+ }
7644
+ } catch (e) {}
7645
+ });
7646
+ }
7647
+ }, {
7648
+ key: 'gather',
7649
+ value: function gather(storage) {
7650
+ var storedStats = storage.read();
7651
+ var gatheredStats = {};
7652
+ var types = ["elements", "frameworks", "themes"];
7653
+
7654
+ types.forEach(function (type) {
7655
+ gatheredStats[type] = {};
7656
+ if (!storedStats[type]) {
7657
+ storedStats[type] = {};
7658
+ }
7659
+ });
7660
+
7661
+ var previousStats = JSON.stringify(storedStats);
7662
+
7663
+ this.getUsedVaadinElements(gatheredStats.elements);
7664
+ this.getFrameworks(gatheredStats.frameworks);
7665
+ this.getUsedVaadinThemes(gatheredStats.themes);
7666
+
7667
+ var now = this.now;
7668
+ types.forEach(function (type) {
7669
+ var keys = Object.keys(gatheredStats[type]);
7670
+ keys.forEach(function (key) {
7671
+ if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
7672
+ storedStats[type][key] = { firstUsed: now };
7673
+ }
7674
+ // Discards any previously logged version number
7675
+ storedStats[type][key].version = gatheredStats[type][key].version;
7676
+ storedStats[type][key].lastUsed = now;
7677
+ });
7678
+ });
7679
+
7680
+ var newStats = JSON.stringify(storedStats);
7681
+ storage.write(newStats);
7682
+ if (newStats != previousStats && Object.keys(storedStats).length > 0) {
7683
+ this.logger.debug("New stats: " + newStats);
7684
+ }
7685
+ }
7686
+ }]);
7687
+ return StatisticsGatherer;
7688
+ }();
7689
+
7690
+ var StatisticsStorage = function () {
7691
+ function StatisticsStorage(key) {
7692
+ classCallCheck(this, StatisticsStorage);
7693
+
7694
+ this.key = key;
7695
+ }
7696
+
7697
+ createClass(StatisticsStorage, [{
7698
+ key: 'read',
7699
+ value: function read() {
7700
+ var localStorageStatsString = localStorage.getItem(this.key);
7701
+ try {
7702
+ return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
7703
+ } catch (e) {
7704
+ return {};
7705
+ }
7706
+ }
7707
+ }, {
7708
+ key: 'write',
7709
+ value: function write(data) {
7710
+ localStorage.setItem(this.key, data);
7711
+ }
7712
+ }, {
7713
+ key: 'clear',
7714
+ value: function clear() {
7715
+ localStorage.removeItem(this.key);
7716
+ }
7717
+ }, {
7718
+ key: 'isEmpty',
7719
+ value: function isEmpty() {
7720
+ var storedStats = this.read();
7721
+ var empty = true;
7722
+ Object.keys(storedStats).forEach(function (key) {
7723
+ if (Object.keys(storedStats[key]).length > 0) {
7724
+ empty = false;
7725
+ }
7726
+ });
7727
+
7728
+ return empty;
7729
+ }
7730
+ }]);
7731
+ return StatisticsStorage;
7732
+ }();
7733
+
7734
+ var StatisticsSender = function () {
7735
+ function StatisticsSender(url, logger) {
7736
+ classCallCheck(this, StatisticsSender);
7737
+
7738
+ this.url = url;
7739
+ this.logger = logger;
7740
+ }
7741
+
7742
+ createClass(StatisticsSender, [{
7743
+ key: 'send',
7744
+ value: function send(data, errorHandler) {
7745
+ var logger = this.logger;
7746
+
7747
+ if (navigator.onLine === false) {
7748
+ logger.debug("Offline, can't send");
7749
+ errorHandler();
7750
+ return;
7751
+ }
7752
+ logger.debug("Sending data to " + this.url);
7753
+
7754
+ var req = new XMLHttpRequest();
7755
+ req.withCredentials = true;
7756
+ req.addEventListener("load", function () {
7757
+ // Stats sent, nothing more to do
7758
+ logger.debug("Response: " + req.responseText);
7759
+ });
7760
+ req.addEventListener("error", function () {
7761
+ logger.debug("Send failed");
7762
+ errorHandler();
7763
+ });
7764
+ req.addEventListener("abort", function () {
7765
+ logger.debug("Send aborted");
7766
+ errorHandler();
7767
+ });
7768
+ req.open("POST", this.url);
7769
+ req.setRequestHeader("Content-Type", "application/json");
7770
+ req.send(data);
7771
+ }
7772
+ }]);
7773
+ return StatisticsSender;
7774
+ }();
7775
+
7776
+ var StatisticsLogger = function () {
7777
+ function StatisticsLogger(id) {
7778
+ classCallCheck(this, StatisticsLogger);
7779
+
7780
+ this.id = id;
7781
+ }
7782
+
7783
+ createClass(StatisticsLogger, [{
7784
+ key: '_isDebug',
7785
+ value: function _isDebug() {
7786
+ return localStorage.getItem("vaadin." + this.id + ".debug");
7787
+ }
7788
+ }, {
7789
+ key: 'debug',
7790
+ value: function debug(msg) {
7791
+ if (this._isDebug()) {
7792
+ console.info(this.id + ": " + msg);
7793
+ }
7794
+ }
7795
+ }]);
7796
+ return StatisticsLogger;
7797
+ }();
7798
+
7799
+ var UsageStatistics = function () {
7800
+ function UsageStatistics() {
7801
+ classCallCheck(this, UsageStatistics);
7802
+
7803
+ this.now = new Date();
7804
+ this.timeNow = this.now.getTime();
7805
+ this.gatherDelay = 10; // Delay between loading this file and gathering stats
7806
+ this.initialDelay = 24 * 60 * 60;
7807
+
7808
+ this.logger = new StatisticsLogger("statistics");
7809
+ this.storage = new StatisticsStorage("vaadin.statistics.basket");
7810
+ this.gatherer = new StatisticsGatherer(this.logger);
7811
+ this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
7812
+ }
7813
+
7814
+ createClass(UsageStatistics, [{
7815
+ key: 'maybeGatherAndSend',
7816
+ value: function maybeGatherAndSend() {
7817
+ var _this = this;
7818
+
7819
+ if (localStorage.getItem(UsageStatistics.optOutKey)) {
7820
+ return;
7821
+ }
7822
+ this.gatherer.gather(this.storage);
7823
+ setTimeout(function () {
7824
+ _this.maybeSend();
7825
+ }, this.gatherDelay * 1000);
7826
+ }
7827
+ }, {
7828
+ key: 'lottery',
7829
+ value: function lottery() {
7830
+ return true;
7831
+ }
7832
+ }, {
7833
+ key: 'currentMonth',
7834
+ value: function currentMonth() {
7835
+ return this.now.getYear() * 12 + this.now.getMonth();
7836
+ }
7837
+ }, {
7838
+ key: 'maybeSend',
7839
+ value: function maybeSend() {
7840
+ var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
7841
+ var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
7842
+
7843
+ if (!firstUse) {
7844
+ // Use a grace period to avoid interfering with tests, incognito mode etc
7845
+ firstUse = this.timeNow;
7846
+ localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
7847
+ }
7848
+
7849
+ if (this.timeNow < firstUse + this.initialDelay * 1000) {
7850
+ this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
7851
+ return;
7852
+ }
7853
+ if (this.currentMonth() <= monthProcessed) {
7854
+ this.logger.debug("This month has already been processed");
7855
+ return;
7856
+ }
7857
+ localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
7858
+ // Use random sampling
7859
+ if (this.lottery()) {
7860
+ this.logger.debug("Congratulations, we have a winner!");
7861
+ } else {
7862
+ this.logger.debug("Sorry, no stats from you this time");
7863
+ return;
7864
+ }
7865
+
7866
+ this.send();
7867
+ }
7868
+ }, {
7869
+ key: 'send',
7870
+ value: function send() {
7871
+ // Ensure we have the latest data
7872
+ this.gatherer.gather(this.storage);
7873
+
7874
+ // Read, send and clean up
7875
+ var data = this.storage.read();
7876
+ data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
7877
+ data["usageStatisticsVersion"] = UsageStatistics.version;
7878
+ var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
7879
+ var self = this;
7880
+ this.sender.send(info + JSON.stringify(data), function () {
7881
+ // Revert the 'month processed' flag
7882
+ localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
7883
+ });
7884
+ }
7885
+ }], [{
7886
+ key: 'version',
7887
+ get: function get$1() {
7888
+ return '2.1.2';
7889
+ }
7890
+ }, {
7891
+ key: 'firstUseKey',
7892
+ get: function get$1() {
7893
+ return 'vaadin.statistics.firstuse';
7894
+ }
7895
+ }, {
7896
+ key: 'monthProcessedKey',
7897
+ get: function get$1() {
7898
+ return 'vaadin.statistics.monthProcessed';
7899
+ }
7900
+ }, {
7901
+ key: 'optOutKey',
7902
+ get: function get$1() {
7903
+ return 'vaadin.statistics.optout';
7904
+ }
7905
+ }]);
7906
+ return UsageStatistics;
7907
+ }();
7908
+
7909
+ try {
7910
+ window.Vaadin = window.Vaadin || {};
7911
+ window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
7912
+ window.Vaadin.usageStatsChecker.maybeGatherAndSend();
7913
+ } catch (e) {
7914
+ // Intentionally ignored as this is not a problem in the app being developed
7915
+ }
7916
+
7917
+ }());
7918
+
7919
+ vaadin-dev-mode:end **/
7441
7920
  }
7442
7921
  const Dl = function() {
7443
7922
  if (typeof ei == "function")