@frontegg/js 6.79.0 → 6.81.0-alpha.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.
@@ -25,9 +25,17 @@ export var AdminPortalRenderer = /*#__PURE__*/function () {
25
25
  var contextOptions = {
26
26
  baseUrl: 'preview'
27
27
  };
28
- this.store = store != null ? store : createFronteggStore({
29
- context: contextOptions
30
- }, this, true, undefined, undefined, true);
28
+ if (store) {
29
+ this.store = store;
30
+ if (store.getState().root.appName !== name) {
31
+ throw Error('Mismatch in store names');
32
+ }
33
+ } else {
34
+ this.store = createFronteggStore({
35
+ context: contextOptions,
36
+ appName: name
37
+ }, this, true, undefined, undefined, true);
38
+ }
31
39
  this.options = _extends({
32
40
  themeOptions: themeOptions,
33
41
  iframeRendering: true,
@@ -15,10 +15,7 @@ import { mockFlagsList } from '../utils/mockFlagsList';
15
15
  export var FronteggApp = /*#__PURE__*/function () {
16
16
  function FronteggApp(_options, name) {
17
17
  var _this = this,
18
- _this$options$authOpt,
19
- _this$options$store,
20
- _this$options$authOpt2,
21
- _this$options$auditsO;
18
+ _this$options$authOpt;
22
19
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
23
20
  _classCallCheck(this, FronteggApp);
24
21
  this.name = void 0;
@@ -96,9 +93,7 @@ export var FronteggApp = /*#__PURE__*/function () {
96
93
  _context3.next = 4;
97
94
  break;
98
95
  }
99
- FronteggRestApi.FeatureFlags.set({
100
- flags: mockFlagsList
101
- });
96
+ FronteggRestApi.FeatureFlags.set(mockFlagsList, _this.name);
102
97
  _context3.next = 14;
103
98
  break;
104
99
  case 4:
@@ -107,9 +102,7 @@ export var FronteggApp = /*#__PURE__*/function () {
107
102
  return FronteggRestApi.loadFeatureFlags();
108
103
  case 7:
109
104
  flags = _context3.sent;
110
- FronteggRestApi.FeatureFlags.set({
111
- flags: flags
112
- });
105
+ FronteggRestApi.FeatureFlags.set(flags, _this.name);
113
106
  _context3.next = 14;
114
107
  break;
115
108
  case 11:
@@ -144,12 +137,21 @@ export var FronteggApp = /*#__PURE__*/function () {
144
137
  hostedLoginBox: this.options.hostedLoginBox
145
138
  };
146
139
  authOptions.disableSilentRefresh = (_this$options$authOpt = this.options.authOptions) == null ? void 0 : _this$options$authOpt.disableSilentRefresh;
147
- this.store = (_this$options$store = this.options.store) != null ? _this$options$store : createFronteggStore({
148
- context: this.options.contextOptions
149
- }, this, this.options.previewMode, authOptions, {
150
- auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
151
- audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
152
- }, false, this.options.urlStrategy);
140
+ if (this.options.store) {
141
+ this.store = this.options.store;
142
+ if (this.options.store.getState().root.appName !== name) {
143
+ throw Error('Mismatch in store names');
144
+ }
145
+ } else {
146
+ var _this$options$authOpt2, _this$options$auditsO;
147
+ this.store = createFronteggStore({
148
+ context: this.options.contextOptions,
149
+ appName: this.name
150
+ }, this, this.options.previewMode, authOptions, {
151
+ auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
152
+ audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
153
+ }, false, this.options.urlStrategy);
154
+ }
153
155
  AppHolder.setInstance(appName, this);
154
156
  }
155
157
  _createClass(FronteggApp, [{
@@ -1,5 +1,4 @@
1
- var _window;
2
1
  import { FronteggIdleSessionHelper } from './FrontegggIdleSession';
3
- if ((_window = window) != null && _window.customElements) {
2
+ if (typeof window !== 'undefined' && window.customElements) {
4
3
  customElements.define('fe-idle-session-plugin', FronteggIdleSessionHelper);
5
4
  }
@@ -27,9 +27,17 @@ export var LoginBoxRenderer = /*#__PURE__*/function () {
27
27
  var contextOptions = {
28
28
  baseUrl: 'preview'
29
29
  };
30
- this.store = store != null ? store : createFronteggStore({
31
- context: contextOptions
32
- }, this, true, undefined, undefined, true);
30
+ if (store) {
31
+ this.store = store;
32
+ if (store.getState().root.appName !== name) {
33
+ throw Error('Mismatch in store names');
34
+ }
35
+ } else {
36
+ this.store = createFronteggStore({
37
+ context: contextOptions,
38
+ appName: name
39
+ }, this, true, undefined, undefined, true);
40
+ }
33
41
  this.options = _extends({
34
42
  themeOptions: themeOptions,
35
43
  iframeRendering: true,
package/index.d.ts CHANGED
@@ -3,7 +3,6 @@ export * from './FronteggApp';
3
3
  export * from './HostedLogin';
4
4
  export * from './AdminPortal';
5
5
  export * from './CheckoutDialog';
6
- export * from './FronteggHelpers';
7
6
  export * from './AdminPortalRenderer';
8
7
  export * from './LoginBoxRenderer';
9
8
  export * from './initialize';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.79.0
1
+ /** @license Frontegg v6.81.0-alpha.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -8,7 +8,6 @@ export * from './FronteggApp';
8
8
  export * from './HostedLogin';
9
9
  export * from './AdminPortal';
10
10
  export * from './CheckoutDialog';
11
- export * from './FronteggHelpers';
12
11
  export * from './AdminPortalRenderer';
13
12
  export * from './LoginBoxRenderer';
14
13
  export * from './initialize';
@@ -33,9 +33,17 @@ var AdminPortalRenderer = /*#__PURE__*/function () {
33
33
  var contextOptions = {
34
34
  baseUrl: 'preview'
35
35
  };
36
- this.store = store != null ? store : (0, _reduxStore.createFronteggStore)({
37
- context: contextOptions
38
- }, this, true, undefined, undefined, true);
36
+ if (store) {
37
+ this.store = store;
38
+ if (store.getState().root.appName !== name) {
39
+ throw Error('Mismatch in store names');
40
+ }
41
+ } else {
42
+ this.store = (0, _reduxStore.createFronteggStore)({
43
+ context: contextOptions,
44
+ appName: name
45
+ }, this, true, undefined, undefined, true);
46
+ }
39
47
  this.options = (0, _extends2["default"])({
40
48
  themeOptions: themeOptions,
41
49
  iframeRendering: true,
@@ -23,10 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
23
  var FronteggApp = /*#__PURE__*/function () {
24
24
  function FronteggApp(_options, name) {
25
25
  var _this = this,
26
- _this$options$authOpt,
27
- _this$options$store,
28
- _this$options$authOpt2,
29
- _this$options$auditsO;
26
+ _this$options$authOpt;
30
27
  var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
31
28
  (0, _classCallCheck2["default"])(this, FronteggApp);
32
29
  this.name = void 0;
@@ -104,9 +101,7 @@ var FronteggApp = /*#__PURE__*/function () {
104
101
  _context3.next = 4;
105
102
  break;
106
103
  }
107
- FronteggRestApi.FeatureFlags.set({
108
- flags: _mockFlagsList.mockFlagsList
109
- });
104
+ FronteggRestApi.FeatureFlags.set(_mockFlagsList.mockFlagsList, _this.name);
110
105
  _context3.next = 14;
111
106
  break;
112
107
  case 4:
@@ -115,9 +110,7 @@ var FronteggApp = /*#__PURE__*/function () {
115
110
  return FronteggRestApi.loadFeatureFlags();
116
111
  case 7:
117
112
  flags = _context3.sent;
118
- FronteggRestApi.FeatureFlags.set({
119
- flags: flags
120
- });
113
+ FronteggRestApi.FeatureFlags.set(flags, _this.name);
121
114
  _context3.next = 14;
122
115
  break;
123
116
  case 11:
@@ -152,12 +145,21 @@ var FronteggApp = /*#__PURE__*/function () {
152
145
  hostedLoginBox: this.options.hostedLoginBox
153
146
  };
154
147
  authOptions.disableSilentRefresh = (_this$options$authOpt = this.options.authOptions) == null ? void 0 : _this$options$authOpt.disableSilentRefresh;
155
- this.store = (_this$options$store = this.options.store) != null ? _this$options$store : (0, _reduxStore.createFronteggStore)({
156
- context: this.options.contextOptions
157
- }, this, this.options.previewMode, authOptions, {
158
- auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
159
- audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
160
- }, false, this.options.urlStrategy);
148
+ if (this.options.store) {
149
+ this.store = this.options.store;
150
+ if (this.options.store.getState().root.appName !== name) {
151
+ throw Error('Mismatch in store names');
152
+ }
153
+ } else {
154
+ var _this$options$authOpt2, _this$options$auditsO;
155
+ this.store = (0, _reduxStore.createFronteggStore)({
156
+ context: this.options.contextOptions,
157
+ appName: this.name
158
+ }, this, this.options.previewMode, authOptions, {
159
+ auth: (_this$options$authOpt2 = this.options.authOptions) != null ? _this$options$authOpt2 : {},
160
+ audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
161
+ }, false, this.options.urlStrategy);
162
+ }
161
163
  _AppHolder.AppHolder.setInstance(appName, this);
162
164
  }
163
165
  (0, _createClass2["default"])(FronteggApp, [{
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _FrontegggIdleSession = require("./FrontegggIdleSession");
4
- var _window;
5
- if ((_window = window) != null && _window.customElements) {
4
+ if (typeof window !== 'undefined' && window.customElements) {
6
5
  customElements.define('fe-idle-session-plugin', _FrontegggIdleSession.FronteggIdleSessionHelper);
7
6
  }
@@ -35,9 +35,17 @@ var LoginBoxRenderer = /*#__PURE__*/function () {
35
35
  var contextOptions = {
36
36
  baseUrl: 'preview'
37
37
  };
38
- this.store = store != null ? store : (0, _reduxStore.createFronteggStore)({
39
- context: contextOptions
40
- }, this, true, undefined, undefined, true);
38
+ if (store) {
39
+ this.store = store;
40
+ if (store.getState().root.appName !== name) {
41
+ throw Error('Mismatch in store names');
42
+ }
43
+ } else {
44
+ this.store = (0, _reduxStore.createFronteggStore)({
45
+ context: contextOptions,
46
+ appName: name
47
+ }, this, true, undefined, undefined, true);
48
+ }
41
49
  this.options = (0, _extends2["default"])({
42
50
  themeOptions: themeOptions,
43
51
  iframeRendering: true,
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.79.0
1
+ /** @license Frontegg v6.81.0-alpha.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -63,17 +63,6 @@ Object.keys(_CheckoutDialog).forEach(function (key) {
63
63
  }
64
64
  });
65
65
  });
66
- var _FronteggHelpers = require("./FronteggHelpers");
67
- Object.keys(_FronteggHelpers).forEach(function (key) {
68
- if (key === "default" || key === "__esModule") return;
69
- if (key in exports && exports[key] === _FronteggHelpers[key]) return;
70
- Object.defineProperty(exports, key, {
71
- enumerable: true,
72
- get: function get() {
73
- return _FronteggHelpers[key];
74
- }
75
- });
76
- });
77
66
  var _AdminPortalRenderer = require("./AdminPortalRenderer");
78
67
  Object.keys(_AdminPortalRenderer).forEach(function (key) {
79
68
  if (key === "default" || key === "__esModule") return;
@@ -7,6 +7,7 @@ exports.mockFlagsList = void 0;
7
7
  var mockFlagsList = {
8
8
  admin_portal_ip_restrictions: 'on',
9
9
  admin_portal_domain_restrictions: 'on',
10
- 'new-mfa-pages': 'on'
10
+ 'new-mfa-pages': 'on',
11
+ 'show-passkeys': 'off'
11
12
  };
12
13
  exports.mockFlagsList = mockFlagsList;
package/node/version.js CHANGED
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- cdnVersion: '6.79.0'
8
+ "cdnVersion": "6.81.0-alpha.0"
9
9
  };
10
10
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "6.79.0",
3
+ "version": "6.81.0-alpha.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.18.6",
9
- "@frontegg/types": "6.79.0"
9
+ "@frontegg/types": "6.81.0-alpha.0"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -523,9 +523,8 @@ var __webpack_exports__ = {};
523
523
  \********************************************************/
524
524
  __webpack_require__.r(__webpack_exports__);
525
525
  /* harmony import */ var _FrontegggIdleSession__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FrontegggIdleSession */ "../../dist/@frontegg/js/FronteggHelpers/FrontegggIdleSession.js");
526
- var _window;
527
526
 
528
- if ((_window = window) != null && _window.customElements) {
527
+ if (typeof window !== 'undefined' && window.customElements) {
529
528
  customElements.define('fe-idle-session-plugin', _FrontegggIdleSession__WEBPACK_IMPORTED_MODULE_0__.FronteggIdleSessionHelper);
530
529
  }
531
530
  })();
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Frontegg=t():e.Frontegg=t()}(window,(function(){return function(){"use strict";var e={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(i=o.key,u=void 0,u=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n);if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i,"string"),"symbol"===t(u)?u:String(u)),o)}var i,u}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return r(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return s=c()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i},s.apply(null,arguments)}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)},f(e)}(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var a,l="app-url",p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(p,e);var t,c,s,f,a=(s=p,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(s);if(f){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function p(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=a.call(this)).appUrl=null,e.events=["mousemove","scroll","keydown"],e.postMessageId="FE_CLEAR_IDLE_TIMEOUT",e.sendPostMessage=e.sendPostMessage.bind(r(e)),e}return t=p,c=[{key:"sendPostMessage",value:function(){var e;this.appUrl&&null!=(e=window)&&e.parent&&window.parent.postMessage(this.postMessageId,this.appUrl)}},{key:"addEventListeners",value:function(){var e=this;this.events.forEach((function(t){window.addEventListener(t,e.sendPostMessage)}))}},{key:"removeEventListeners",value:function(){var e=this;this.events.forEach((function(t){window.removeEventListener(t,e.sendPostMessage)}))}},{key:"connectedCallback",value:function(){var e;this.appUrl=this.getAttribute(l),this.postMessageId=null!=(e=this.getAttribute("message-id"))?e:this.postMessageId,this.addEventListeners()}},{key:"disconnectedCallback",value:function(){this.removeEventListeners()}},{key:"attributeChangedCallback",value:function(e,t,n){e===l&&t!==n&&(this.appUrl=n,this.removeEventListeners(),this.addEventListeners())}}],c&&n(t.prototype,c),Object.defineProperty(t,"prototype",{writable:!1}),p}(f(HTMLElement));return null!=(a=window)&&a.customElements&&customElements.define("fe-idle-session-plugin",p),e}()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Frontegg=t():e.Frontegg=t()}(window,(function(){return function(){"use strict";var e={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,u=void 0,u=function(e,n){if("object"!==t(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,n);if("object"!==t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i,"string"),"symbol"===t(u)?u:String(u)),r)}var i,u}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return o(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return s=c()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},s.apply(null,arguments)}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return s(e,arguments,u(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r(o,e)},f(e)}(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var a="app-url",l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(p,e);var t,c,s,f,l=(s=p,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(s);if(f){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function p(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=l.call(this)).appUrl=null,e.events=["mousemove","scroll","keydown"],e.postMessageId="FE_CLEAR_IDLE_TIMEOUT",e.sendPostMessage=e.sendPostMessage.bind(o(e)),e}return t=p,(c=[{key:"sendPostMessage",value:function(){var e;this.appUrl&&null!=(e=window)&&e.parent&&window.parent.postMessage(this.postMessageId,this.appUrl)}},{key:"addEventListeners",value:function(){var e=this;this.events.forEach((function(t){window.addEventListener(t,e.sendPostMessage)}))}},{key:"removeEventListeners",value:function(){var e=this;this.events.forEach((function(t){window.removeEventListener(t,e.sendPostMessage)}))}},{key:"connectedCallback",value:function(){var e;this.appUrl=this.getAttribute(a),this.postMessageId=null!=(e=this.getAttribute("message-id"))?e:this.postMessageId,this.addEventListeners()}},{key:"disconnectedCallback",value:function(){this.removeEventListeners()}},{key:"attributeChangedCallback",value:function(e,t,n){e===a&&t!==n&&(this.appUrl=n,this.removeEventListeners(),this.addEventListeners())}}])&&n(t.prototype,c),Object.defineProperty(t,"prototype",{writable:!1}),p}(f(HTMLElement));return"undefined"!=typeof window&&window.customElements&&customElements.define("fe-idle-session-plugin",l),e}()}));