dialogshift-webchat-sdk 2.3.17-develop.0 → 2.9.3-develop.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.
Files changed (112) hide show
  1. package/README.md +20 -18
  2. package/bundles/dialogshift-webchat-sdk.min.css +1 -3
  3. package/bundles/dialogshift-webchat-sdk.min.css.map +1 -31
  4. package/bundles/dialogshift-webchat-sdk.umd.js +967 -592
  5. package/bundles/dialogshift-webchat-sdk.umd.js.map +1 -1
  6. package/dist/config/config.d.ts +2 -0
  7. package/dist/config/config.js +4 -2
  8. package/dist/config/config.js.map +1 -1
  9. package/dist/config/env.dev.js +2 -2
  10. package/dist/config/env.dev.js.map +1 -1
  11. package/dist/config/env.js +2 -2
  12. package/dist/config/env.js.map +1 -1
  13. package/dist/config/env.prod.js +2 -2
  14. package/dist/config/env.stage.js +2 -2
  15. package/dist/consts.d.ts +1 -0
  16. package/dist/consts.js +5 -0
  17. package/dist/consts.js.map +1 -0
  18. package/dist/core/app.d.ts +10 -1
  19. package/dist/core/app.js +102 -46
  20. package/dist/core/app.js.map +1 -1
  21. package/dist/core/base-widget.d.ts +1 -1
  22. package/dist/core/base-widget.js +19 -15
  23. package/dist/core/base-widget.js.map +1 -1
  24. package/dist/core/event-emitter.d.ts +1 -1
  25. package/dist/core/event-emitter.js +1 -1
  26. package/dist/core/event-emitter.js.map +1 -1
  27. package/dist/core/facade.d.ts +1 -0
  28. package/dist/core/facade.js +11 -3
  29. package/dist/core/facade.js.map +1 -1
  30. package/dist/core/observable.js +4 -2
  31. package/dist/core/observable.js.map +1 -1
  32. package/dist/core/utils.d.ts +1 -1
  33. package/dist/core/utils.js +29 -27
  34. package/dist/core/utils.js.map +1 -1
  35. package/dist/core/widget-manager.d.ts +8 -3
  36. package/dist/core/widget-manager.js +122 -59
  37. package/dist/core/widget-manager.js.map +1 -1
  38. package/dist/enums.d.ts +4 -0
  39. package/dist/enums.js +9 -0
  40. package/dist/enums.js.map +1 -0
  41. package/dist/index.js +2 -2
  42. package/dist/index.js.map +1 -1
  43. package/dist/models/action-button.js +4 -4
  44. package/dist/models/action-button.js.map +1 -1
  45. package/dist/models/index.js +7 -3
  46. package/dist/models/index.js.map +1 -1
  47. package/dist/services/api.service.d.ts +1 -1
  48. package/dist/services/api.service.js +24 -18
  49. package/dist/services/api.service.js.map +1 -1
  50. package/dist/services/audio.service.js +3 -3
  51. package/dist/services/audio.service.js.map +1 -1
  52. package/dist/services/cookie.service.js +6 -6
  53. package/dist/services/cookie.service.js.map +1 -1
  54. package/dist/services/ga.service.d.ts +3 -0
  55. package/dist/services/ga.service.js +20 -0
  56. package/dist/services/ga.service.js.map +1 -0
  57. package/dist/services/http.service.js +4 -4
  58. package/dist/services/http.service.js.map +1 -1
  59. package/dist/services/index.js +7 -3
  60. package/dist/services/index.js.map +1 -1
  61. package/dist/services/token.service.js +7 -8
  62. package/dist/services/token.service.js.map +1 -1
  63. package/dist/services/user.service.d.ts +8 -0
  64. package/dist/services/user.service.js +107 -15
  65. package/dist/services/user.service.js.map +1 -1
  66. package/dist/services/webchat.service.js +3 -3
  67. package/dist/services/webchat.service.js.map +1 -1
  68. package/dist/types.js +1 -1
  69. package/dist/widgets/action-button-group.widget.d.ts +2 -0
  70. package/dist/widgets/action-button-group.widget.js +8 -3
  71. package/dist/widgets/action-button-group.widget.js.map +1 -1
  72. package/dist/widgets/action-button.widget.d.ts +1 -0
  73. package/dist/widgets/action-button.widget.js +14 -8
  74. package/dist/widgets/action-button.widget.js.map +1 -1
  75. package/dist/widgets/chat-button.widget.js +10 -3
  76. package/dist/widgets/chat-button.widget.js.map +1 -1
  77. package/dist/widgets/chatbox.widget.d.ts +1 -1
  78. package/dist/widgets/chatbox.widget.js +4 -2
  79. package/dist/widgets/chatbox.widget.js.map +1 -1
  80. package/dist/widgets/content-wrapper.widget.js +4 -2
  81. package/dist/widgets/content-wrapper.widget.js.map +1 -1
  82. package/dist/widgets/footer.widget.d.ts +5 -0
  83. package/dist/widgets/footer.widget.js +34 -0
  84. package/dist/widgets/footer.widget.js.map +1 -0
  85. package/dist/widgets/header/header-close-button.widget.d.ts +6 -1
  86. package/dist/widgets/header/header-close-button.widget.js +12 -4
  87. package/dist/widgets/header/header-close-button.widget.js.map +1 -1
  88. package/dist/widgets/header/header.widget.d.ts +6 -1
  89. package/dist/widgets/header/header.widget.js +9 -4
  90. package/dist/widgets/header/header.widget.js.map +1 -1
  91. package/dist/widgets/iframe-box.widget.js +9 -10
  92. package/dist/widgets/iframe-box.widget.js.map +1 -1
  93. package/dist/widgets/iframe.widget.d.ts +3 -2
  94. package/dist/widgets/iframe.widget.js +12 -8
  95. package/dist/widgets/iframe.widget.js.map +1 -1
  96. package/dist/widgets/index.d.ts +1 -0
  97. package/dist/widgets/index.js +8 -3
  98. package/dist/widgets/index.js.map +1 -1
  99. package/dist/widgets/teaser.widget.d.ts +4 -1
  100. package/dist/widgets/teaser.widget.js +46 -9
  101. package/dist/widgets/teaser.widget.js.map +1 -1
  102. package/dist/widgets/unread.widget.js +4 -2
  103. package/dist/widgets/unread.widget.js.map +1 -1
  104. package/dist/widgets/whatsapp-button.widget.d.ts +8 -1
  105. package/dist/widgets/whatsapp-button.widget.js +18 -4
  106. package/dist/widgets/whatsapp-button.widget.js.map +1 -1
  107. package/dist/widgets/whatsapp-window.widget.d.ts +1 -3
  108. package/dist/widgets/whatsapp-window.widget.js +22 -28
  109. package/dist/widgets/whatsapp-window.widget.js.map +1 -1
  110. package/dist/widgets/wrapper.widget.js +5 -3
  111. package/dist/widgets/wrapper.widget.js.map +1 -1
  112. package/package.json +26 -22
@@ -1,103 +1,17 @@
1
- // [AIV_SHORT] Build version: 2.3.15-develop.0 Environment: undefined
2
- window["Dialogshift"] =
3
- /******/ (function(modules) { // webpackBootstrap
4
- /******/ // The module cache
5
- /******/ var installedModules = {};
6
- /******/
7
- /******/ // The require function
8
- /******/ function __webpack_require__(moduleId) {
9
- /******/
10
- /******/ // Check if module is in cache
11
- /******/ if(installedModules[moduleId]) {
12
- /******/ return installedModules[moduleId].exports;
13
- /******/ }
14
- /******/ // Create a new module (and put it into the cache)
15
- /******/ var module = installedModules[moduleId] = {
16
- /******/ i: moduleId,
17
- /******/ l: false,
18
- /******/ exports: {}
19
- /******/ };
20
- /******/
21
- /******/ // Execute the module function
22
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
23
- /******/
24
- /******/ // Flag the module as loaded
25
- /******/ module.l = true;
26
- /******/
27
- /******/ // Return the exports of the module
28
- /******/ return module.exports;
29
- /******/ }
30
- /******/
31
- /******/
32
- /******/ // expose the modules object (__webpack_modules__)
33
- /******/ __webpack_require__.m = modules;
34
- /******/
35
- /******/ // expose the module cache
36
- /******/ __webpack_require__.c = installedModules;
37
- /******/
38
- /******/ // define getter function for harmony exports
39
- /******/ __webpack_require__.d = function(exports, name, getter) {
40
- /******/ if(!__webpack_require__.o(exports, name)) {
41
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
42
- /******/ }
43
- /******/ };
44
- /******/
45
- /******/ // define __esModule on exports
46
- /******/ __webpack_require__.r = function(exports) {
47
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
48
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
49
- /******/ }
50
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
51
- /******/ };
52
- /******/
53
- /******/ // create a fake namespace object
54
- /******/ // mode & 1: value is a module id, require it
55
- /******/ // mode & 2: merge all properties of value into the ns
56
- /******/ // mode & 4: return value when already ns object
57
- /******/ // mode & 8|1: behave like require
58
- /******/ __webpack_require__.t = function(value, mode) {
59
- /******/ if(mode & 1) value = __webpack_require__(value);
60
- /******/ if(mode & 8) return value;
61
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
62
- /******/ var ns = Object.create(null);
63
- /******/ __webpack_require__.r(ns);
64
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
65
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
66
- /******/ return ns;
67
- /******/ };
68
- /******/
69
- /******/ // getDefaultExport function for compatibility with non-harmony modules
70
- /******/ __webpack_require__.n = function(module) {
71
- /******/ var getter = module && module.__esModule ?
72
- /******/ function getDefault() { return module['default']; } :
73
- /******/ function getModuleExports() { return module; };
74
- /******/ __webpack_require__.d(getter, 'a', getter);
75
- /******/ return getter;
76
- /******/ };
77
- /******/
78
- /******/ // Object.prototype.hasOwnProperty.call
79
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
80
- /******/
81
- /******/ // __webpack_public_path__
82
- /******/ __webpack_require__.p = "";
83
- /******/
84
- /******/
85
- /******/ // Load entry module and return exports
86
- /******/ return __webpack_require__(__webpack_require__.s = "./src/scripts/index.ts");
87
- /******/ })
88
- /************************************************************************/
89
- /******/ ({
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ var __webpack_modules__ = ({
90
4
 
91
5
  /***/ "./src/scripts/config/config.ts":
92
6
  /*!**************************************!*\
93
7
  !*** ./src/scripts/config/config.ts ***!
94
8
  \**************************************/
95
- /*! exports provided: config */
96
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
9
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
97
10
 
98
- "use strict";
99
11
  __webpack_require__.r(__webpack_exports__);
100
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
12
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13
+ /* harmony export */ config: () => (/* binding */ config)
14
+ /* harmony export */ });
101
15
  /* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./env */ "./src/scripts/config/env.ts");
102
16
 
103
17
  var config = {
@@ -113,6 +27,7 @@ var config = {
113
27
  contentWrapperCls: 'ds-content-wrapper',
114
28
  buttonCls: 'ds-button',
115
29
  buttonLogoCls: 'ds-button--logo',
30
+ buttonIconContainerCls: 'ds-button--icon-container',
116
31
  buttonWithTextCls: 'ds-button--with-text',
117
32
  buttonActiveCls: 'ds-button--active',
118
33
  buttonHiddenCls: 'ds-button--hidden',
@@ -133,7 +48,8 @@ var config = {
133
48
  actionButtonCls: 'ds-action-button',
134
49
  headerCls: 'ds-header',
135
50
  headerCloseButtonCls: 'ds-header-close-button',
136
- env: _env__WEBPACK_IMPORTED_MODULE_0__["environment"],
51
+ headerCloseButtonLeftCls: 'ds-header-close-button--left',
52
+ env: _env__WEBPACK_IMPORTED_MODULE_0__.environment,
137
53
  };
138
54
 
139
55
 
@@ -143,40 +59,56 @@ var config = {
143
59
  /*!***********************************!*\
144
60
  !*** ./src/scripts/config/env.ts ***!
145
61
  \***********************************/
146
- /*! exports provided: environment */
147
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
62
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
148
63
 
149
- "use strict";
150
64
  __webpack_require__.r(__webpack_exports__);
151
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
65
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
66
+ /* harmony export */ environment: () => (/* binding */ environment)
67
+ /* harmony export */ });
152
68
  var environment = {
153
69
  coreApiEndpoint: 'https://core.dev.co25.net',
154
70
  ibeApiEndpoint: 'https://ibe.dev.co25.net',
155
- iframeHost: 'https://webchat.dev.co25.net',
71
+ iframeHost: 'https://webchat.dev.dialogshift.com',
156
72
  };
157
73
 
158
74
 
75
+ /***/ }),
76
+
77
+ /***/ "./src/scripts/consts.ts":
78
+ /*!*******************************!*\
79
+ !*** ./src/scripts/consts.ts ***!
80
+ \*******************************/
81
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
82
+
83
+ __webpack_require__.r(__webpack_exports__);
84
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
85
+ /* harmony export */ iconSvg: () => (/* binding */ iconSvg)
86
+ /* harmony export */ });
87
+ var iconSvg = '<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" stroke="currentColor" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.549805 10.8695C0.549805 5.16744 5.84902 0.549988 12.3568 0.549988C18.8646 0.549988 24.1329 5.16744 24.1329 10.9005C24.1329 16.6336 18.8646 21.251 12.3568 21.251C10.0016 21.251 7.80137 20.6312 5.94199 19.5776C4.26855 20.5693 2.47116 20.5383 1.4485 20.3833C1.13861 20.3523 1.07663 19.9495 1.32454 19.7945C2.3472 19.1437 2.87402 18.2141 3.18392 17.3773C1.54147 15.6109 0.549805 13.3487 0.549805 10.8695ZM29.4631 28.5646C29.711 28.5336 29.773 28.2237 29.5561 28.0687C28.6883 27.5109 28.2235 26.7362 27.9756 26.0544C29.3391 24.5669 30.1449 22.7075 30.1449 20.6622C30.1449 17.7182 28.4404 15.0841 25.8373 13.5346C24.5048 19.0818 18.9576 23.2654 12.3568 23.2654C11.892 23.2654 11.4271 23.2344 10.9933 23.2034C12.2329 26.7052 15.9516 29.2773 20.3831 29.2773C22.3355 29.2773 24.1639 28.7815 25.7133 27.8828C27.1079 28.7195 28.5954 28.6885 29.4631 28.5646Z"/><mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="31" height="30"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.549805 10.8695C0.549805 5.16744 5.84902 0.549988 12.3568 0.549988C18.8646 0.549988 24.1329 5.16744 24.1329 10.9005C24.1329 16.6336 18.8646 21.251 12.3568 21.251C10.0016 21.251 7.80137 20.6312 5.94199 19.5776C4.26855 20.5693 2.47116 20.5383 1.4485 20.3833C1.13861 20.3523 1.07663 19.9495 1.32454 19.7945C2.3472 19.1437 2.87402 18.2141 3.18392 17.3773C1.54147 15.6109 0.549805 13.3487 0.549805 10.8695ZM29.4631 28.5646C29.711 28.5336 29.773 28.2237 29.5561 28.0687C28.6883 27.5109 28.2235 26.7362 27.9756 26.0544C29.3391 24.5669 30.1449 22.7075 30.1449 20.6622C30.1449 17.7182 28.4404 15.0841 25.8373 13.5346C24.5048 19.0818 18.9576 23.2654 12.3568 23.2654C11.892 23.2654 11.4271 23.2344 10.9933 23.2034C12.2329 26.7052 15.9516 29.2773 20.3831 29.2773C22.3355 29.2773 24.1639 28.7815 25.7133 27.8828C27.1079 28.7195 28.5954 28.6885 29.4631 28.5646Z"/></mask><g mask="url(#mask0)"/></svg>';
88
+
89
+
159
90
  /***/ }),
160
91
 
161
92
  /***/ "./src/scripts/core/app.ts":
162
93
  /*!*********************************!*\
163
94
  !*** ./src/scripts/core/app.ts ***!
164
95
  \*********************************/
165
- /*! exports provided: ChatPosition, AppTheme, ActionEventType, ActionEventName, App */
166
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
96
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
167
97
 
168
- "use strict";
169
98
  __webpack_require__.r(__webpack_exports__);
170
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChatPosition", function() { return ChatPosition; });
171
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppTheme", function() { return AppTheme; });
172
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionEventType", function() { return ActionEventType; });
173
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionEventName", function() { return ActionEventName; });
174
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "App", function() { return App; });
99
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
100
+ /* harmony export */ ActionEventName: () => (/* binding */ ActionEventName),
101
+ /* harmony export */ ActionEventType: () => (/* binding */ ActionEventType),
102
+ /* harmony export */ App: () => (/* binding */ App),
103
+ /* harmony export */ AppTheme: () => (/* binding */ AppTheme),
104
+ /* harmony export */ ChatPosition: () => (/* binding */ ChatPosition)
105
+ /* harmony export */ });
175
106
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
176
107
  /* harmony import */ var _event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event-emitter */ "./src/scripts/core/event-emitter.ts");
177
108
  /* harmony import */ var _widget_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./widget-manager */ "./src/scripts/core/widget-manager.ts");
178
109
  /* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services */ "./src/scripts/services/index.ts");
179
110
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/scripts/core/utils.ts");
111
+ /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../enums */ "./src/scripts/enums.ts");
180
112
  var __assign = (undefined && undefined.__assign) || function () {
181
113
  __assign = Object.assign || function(t) {
182
114
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -193,6 +125,7 @@ var __assign = (undefined && undefined.__assign) || function () {
193
125
 
194
126
 
195
127
 
128
+
196
129
  var ChatPosition;
197
130
  (function (ChatPosition) {
198
131
  ChatPosition["left"] = "left";
@@ -220,6 +153,10 @@ var appOptionsDefault = {
220
153
  unreadCounter: 0,
221
154
  context: {},
222
155
  direction: 'ltr',
156
+ showInIframe: false,
157
+ custidStoreMode: _enums__WEBPACK_IMPORTED_MODULE_5__.CustidStoreMode.cookie,
158
+ loadGaContext: false,
159
+ leftCloseButton: false,
223
160
  };
224
161
  var ActionEventType;
225
162
  (function (ActionEventType) {
@@ -234,6 +171,7 @@ var ActionEventName;
234
171
  ActionEventName["setTeaserText"] = "set.teaser.text";
235
172
  ActionEventName["showChatbox"] = "show.chatbox";
236
173
  ActionEventName["hideChatbox"] = "hide.chatbox";
174
+ ActionEventName["showWhatsApp"] = "show.whatsApp";
237
175
  })(ActionEventName || (ActionEventName = {}));
238
176
  var App = /** @class */ (function () {
239
177
  function App(options) {
@@ -246,21 +184,22 @@ var App = /** @class */ (function () {
246
184
  if (!options.id) {
247
185
  throw Error('Dialogshift app id is undefined.');
248
186
  }
249
- this.options = Object(_utils__WEBPACK_IMPORTED_MODULE_4__["mergeDeep"])(appOptionsDefault, options);
250
- this.broadcast = new _event_emitter__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
251
- this.widgetManager = new _widget_manager__WEBPACK_IMPORTED_MODULE_2__["WidgetManager"](this);
187
+ this.options = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.mergeDeep)(appOptionsDefault, options);
188
+ this.broadcast = new _event_emitter__WEBPACK_IMPORTED_MODULE_1__.EventEmitter();
189
+ this.widgetManager = new _widget_manager__WEBPACK_IMPORTED_MODULE_2__.WidgetManager(this);
252
190
  this.init();
253
191
  }
254
192
  App.prototype.init = function () {
255
193
  var _this = this;
256
- if (Object(_utils__WEBPACK_IMPORTED_MODULE_4__["parseUrlParam"])(window.location.href, 'ctrl') === 'forcenew') {
257
- _services__WEBPACK_IMPORTED_MODULE_3__["UserService"].deleteUser();
258
- _services__WEBPACK_IMPORTED_MODULE_3__["TokenService"].deleteToken();
259
- _services__WEBPACK_IMPORTED_MODULE_3__["CookieService"]["delete"]('keep-chat-open');
260
- Object(_utils__WEBPACK_IMPORTED_MODULE_4__["removeURLParameters"])(['ctrl']);
261
- }
262
- var openUrlParam = Object(_utils__WEBPACK_IMPORTED_MODULE_4__["parseUrlParam"])(window.location.href, 'dschat');
263
- if (openUrlParam === 'open') {
194
+ this.options.context['hostUrl'] = encodeURI(window.location.href);
195
+ if ((0,_utils__WEBPACK_IMPORTED_MODULE_4__.parseUrlParam)(window.location.href, 'ctrl') === 'forcenew') {
196
+ _services__WEBPACK_IMPORTED_MODULE_3__.UserService.deleteUser();
197
+ _services__WEBPACK_IMPORTED_MODULE_3__.TokenService.deleteToken();
198
+ // CookieService.delete('ds-keep-chat-open')
199
+ (0,_utils__WEBPACK_IMPORTED_MODULE_4__.removeURLParameters)(['ctrl']);
200
+ }
201
+ var openUrlParam = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.parseUrlParam)(window.location.href, 'dschat');
202
+ if (openUrlParam === 'open' && window.innerWidth > 576) {
264
203
  this.options.isChatboxVisible = true;
265
204
  }
266
205
  this.loadConfig().then(function () {
@@ -272,7 +211,7 @@ var App = /** @class */ (function () {
272
211
  if (_this.chatConfig.csrfAfter) {
273
212
  csrfAfter = _this.chatConfig.csrfAfter;
274
213
  }
275
- _services__WEBPACK_IMPORTED_MODULE_3__["TokenService"].touchToken(_this.options.id, csrfAfter).then(function (token) {
214
+ _services__WEBPACK_IMPORTED_MODULE_3__.TokenService.touchToken(_this.options.id, csrfAfter).then(function (token) {
276
215
  _this.csrfToken = token;
277
216
  });
278
217
  _this.afterInit();
@@ -292,16 +231,22 @@ var App = /** @class */ (function () {
292
231
  }, 20);
293
232
  };
294
233
  App.prototype.initWebchatService = function () {
295
- this.webchatService = new _services__WEBPACK_IMPORTED_MODULE_3__["WebchatService"]({
234
+ this.webchatService = new _services__WEBPACK_IMPORTED_MODULE_3__.WebchatService({
296
235
  targetWindow: this.widgetManager.getIframeWidget().getBoxElem(),
297
236
  });
298
237
  };
299
238
  App.prototype.render = function () {
300
239
  var _this = this;
240
+ var isWidgetManagerVisible = this.options.showInIframe
241
+ ? true
242
+ : (0,_utils__WEBPACK_IMPORTED_MODULE_4__.inIframe)()
243
+ ? false
244
+ : true;
301
245
  this.widgetManager.renderWrapper(Object.assign({}, this.options, {
302
- visible: !Object(_utils__WEBPACK_IMPORTED_MODULE_4__["inIframe"])(),
246
+ visible: isWidgetManagerVisible,
303
247
  }));
304
248
  this.widgetManager.renderContentWrapper();
249
+ this.widgetManager.renderFooter();
305
250
  if (this.options.renderButton) {
306
251
  this.widgetManager.renderChatButton(this.options, this.chatConfig);
307
252
  }
@@ -310,7 +255,7 @@ var App = /** @class */ (function () {
310
255
  this.widgetManager.renderChatboxWidget(this.options, function () {
311
256
  _this.loadChat();
312
257
  });
313
- this.widgetManager.renderHeader();
258
+ this.widgetManager.renderHeader(this.options);
314
259
  this.widgetManager.renderUnreadWidget(this.options, this.chatConfig);
315
260
  if (this.options.renderWaButton) {
316
261
  this.widgetManager.renderWhatsappButtonWidget(this.chatConfig);
@@ -337,22 +282,23 @@ var App = /** @class */ (function () {
337
282
  _this.widgetManager.getTeaserWidget().hide();
338
283
  }, hideTeaserAfter * 1000);
339
284
  }
340
- if (_services__WEBPACK_IMPORTED_MODULE_3__["CookieService"].get('keep-chat-open') === 'true') {
341
- this.setInitialElement({
342
- suppress: true,
343
- });
344
- this.loadChat();
345
- this.getBroadcast().once('ready', function () {
346
- setTimeout(function () {
347
- _this.webchatService.setMinimized(true);
348
- }, 250);
349
- });
350
- }
285
+ /* if (CookieService.get('keep-chat-open') === 'true') {
286
+ this.setInitialElement({
287
+ suppress: true,
288
+ })
289
+ this.loadChat()
290
+
291
+ this.getBroadcast().once('ready', () => {
292
+ setTimeout(() => {
293
+ this.webchatService.setMinimized(true)
294
+ }, 250)
295
+ })
296
+ } */
351
297
  };
352
298
  App.prototype.bindEvents = function () {
353
299
  var _this = this;
354
300
  window.addEventListener('message', function (event) {
355
- if (event.origin === _config_config__WEBPACK_IMPORTED_MODULE_0__["config"].env.iframeHost) {
301
+ if (event.origin === _config_config__WEBPACK_IMPORTED_MODULE_0__.config.env.iframeHost) {
356
302
  var message_1 = event.data;
357
303
  if (message_1.type === ActionEventType.message) {
358
304
  _this.broadcast.fire(message_1.name, message_1.payload);
@@ -387,23 +333,31 @@ var App = /** @class */ (function () {
387
333
  });
388
334
  this.broadcast.on('command.receive', function (event) {
389
335
  var commandModel = event.data;
390
- if (commandModel.commandType === 'livechat') {
391
- if (commandModel.action === 'start' &&
392
- _this.chatConfig.keepChatOpenDuringLivechat) {
393
- _services__WEBPACK_IMPORTED_MODULE_3__["CookieService"].set('keep-chat-open', 'true');
394
- }
395
- if (commandModel.action === 'end') {
396
- _services__WEBPACK_IMPORTED_MODULE_3__["CookieService"].set('keep-chat-open', 'false');
397
- }
336
+ if (commandModel.commandType === 'receivedCookieConsent') {
337
+ _services__WEBPACK_IMPORTED_MODULE_3__.UserService.switchToCookieModeAfterConsent();
398
338
  }
339
+ else if (commandModel.commandType === 'dismissCookieConsent') {
340
+ _services__WEBPACK_IMPORTED_MODULE_3__.UserService.switchToSessionModeAfterConsentDismiss();
341
+ } /* else if (commandModel.commandType === 'livechat') {
342
+ if (
343
+ commandModel.action === 'start' &&
344
+ this.chatConfig.keepChatOpenDuringLivechat
345
+ ) {
346
+ CookieService.set('keep-chat-open', 'true')
347
+ }
348
+
349
+ if (commandModel.action === 'end') {
350
+ CookieService.set('keep-chat-open', 'false')
351
+ }
352
+ } */
399
353
  });
400
354
  };
401
355
  App.prototype.proceedActionEvent = function (message) {
402
356
  if (message.name === ActionEventName.tabOpen) {
403
357
  var url = message.payload.targetUrl;
404
358
  if (message.payload.urlType === 'openSameTab') {
405
- if (!Object(_utils__WEBPACK_IMPORTED_MODULE_4__["isExternalUrl"])(url)) {
406
- url += (url.split('?')[1] ? '&' : '?') + "dschat=open";
359
+ if (!(0,_utils__WEBPACK_IMPORTED_MODULE_4__.isExternalUrl)(url)) {
360
+ url += "".concat(url.split('?')[1] ? '&' : '?', "dschat=open");
407
361
  }
408
362
  window.open(url, '_self');
409
363
  }
@@ -423,27 +377,33 @@ var App = /** @class */ (function () {
423
377
  if (message.name === ActionEventName.hideChatbox) {
424
378
  this.widgetManager.getChatboxWidget().hide();
425
379
  }
380
+ if (message.name === ActionEventName.showWhatsApp) {
381
+ this.widgetManager.getWhatsappWindowWidget().show();
382
+ }
426
383
  };
427
384
  App.prototype.loadConfig = function () {
428
385
  var _this = this;
429
386
  var channel = this.options.context.channel
430
387
  ? this.options.context.channel
431
388
  : 'pwa-embed';
432
- return _services__WEBPACK_IMPORTED_MODULE_3__["ApiService"].getConfig(this.options.id, _services__WEBPACK_IMPORTED_MODULE_3__["UserService"].getCustomerId(), channel).then(function (data) {
389
+ return _services__WEBPACK_IMPORTED_MODULE_3__.ApiService.getConfig(this.options.id, _services__WEBPACK_IMPORTED_MODULE_3__.UserService.getCustomerId(), window.location.host, window.location.pathname, channel).then(function (data) {
433
390
  _this.chatConfig = data;
434
391
  if (data.websiteElementCss) {
435
- Object(_utils__WEBPACK_IMPORTED_MODULE_4__["injectCss"])(data.websiteElementCss);
392
+ (0,_utils__WEBPACK_IMPORTED_MODULE_4__.injectCss)(data.websiteElementCss);
436
393
  }
437
394
  if (_this.chatConfig.defaultLg) {
438
395
  _this.chatConfig.defaultLocale = _this.chatConfig.defaultLg;
439
396
  delete _this.chatConfig.defaultLg;
440
397
  }
398
+ if (_this.chatConfig.channelOverride) {
399
+ _this.options.context.channel = _this.chatConfig.channelOverride;
400
+ }
441
401
  _this.applyConfig();
442
402
  return _this.chatConfig;
443
403
  });
444
404
  };
445
405
  App.prototype.applyConfig = function () {
446
- var _a = this.chatConfig, setUnreadCounter = _a.setUnreadCounter, showTeaserAfter = _a.showTeaserAfter, hideTeaserAfter = _a.hideTeaserAfter, theme = _a.theme, noCookieModeSdk = _a.noCookieModeSdk, forgetCustomerAfterHours = _a.forgetCustomerAfterHours, isChatboxVisible = _a.isChatboxVisible, renderWaButton = _a.renderWaButton, extendedWidth = _a.extendedWidth;
406
+ var _a = this.chatConfig, setUnreadCounter = _a.setUnreadCounter, showTeaserAfter = _a.showTeaserAfter, hideTeaserAfter = _a.hideTeaserAfter, theme = _a.theme, noCookieModeSdk = _a.noCookieModeSdk, forgetCustomerAfterHours = _a.forgetCustomerAfterHours, isChatboxVisible = _a.isChatboxVisible, renderWaButton = _a.renderWaButton, extendedWidth = _a.extendedWidth, bwWaButton = _a.bwWaButton, custidStoreMode = _a.custidStoreMode, loadGaContext = _a.loadGaContext, leftCloseButton = _a.leftCloseButton;
447
407
  if (setUnreadCounter) {
448
408
  this.options.unreadCounter = setUnreadCounter;
449
409
  }
@@ -460,10 +420,10 @@ var App = /** @class */ (function () {
460
420
  this.options.theme = theme;
461
421
  }
462
422
  if (noCookieModeSdk === true) {
463
- _services__WEBPACK_IMPORTED_MODULE_3__["CookieService"].noCookieMode = true;
423
+ _services__WEBPACK_IMPORTED_MODULE_3__.CookieService.noCookieMode = true;
464
424
  }
465
425
  if (forgetCustomerAfterHours) {
466
- _services__WEBPACK_IMPORTED_MODULE_3__["UserService"].updateCookieLifetime(forgetCustomerAfterHours);
426
+ _services__WEBPACK_IMPORTED_MODULE_3__.UserService.updateCookieLifetime(forgetCustomerAfterHours);
467
427
  }
468
428
  if (renderWaButton) {
469
429
  this.options.renderWaButton = renderWaButton;
@@ -471,6 +431,20 @@ var App = /** @class */ (function () {
471
431
  if (extendedWidth) {
472
432
  this.options.extendedWidth = extendedWidth;
473
433
  }
434
+ if (bwWaButton) {
435
+ this.options.bwWaButton = bwWaButton;
436
+ }
437
+ if (custidStoreMode) {
438
+ this.options.custidStoreMode = custidStoreMode;
439
+ _services__WEBPACK_IMPORTED_MODULE_3__.UserService.custidStoreMode = custidStoreMode;
440
+ }
441
+ if (loadGaContext) {
442
+ this.options.loadGaContext = loadGaContext;
443
+ _services__WEBPACK_IMPORTED_MODULE_3__.UserService.loadGaContext = loadGaContext;
444
+ }
445
+ if (leftCloseButton) {
446
+ this.options.leftCloseButton = leftCloseButton;
447
+ }
474
448
  };
475
449
  App.prototype.getWebchatService = function () {
476
450
  return this.webchatService;
@@ -483,8 +457,8 @@ var App = /** @class */ (function () {
483
457
  };
484
458
  App.prototype.getContext = function (key) {
485
459
  return new Promise(function (resolve, reject) {
486
- if (_services__WEBPACK_IMPORTED_MODULE_3__["UserService"].getCustomerId()) {
487
- _services__WEBPACK_IMPORTED_MODULE_3__["ApiService"].getContext(_services__WEBPACK_IMPORTED_MODULE_3__["UserService"].getCustomerId(), key).then(resolve, reject);
460
+ if (_services__WEBPACK_IMPORTED_MODULE_3__.UserService.getCustomerId()) {
461
+ _services__WEBPACK_IMPORTED_MODULE_3__.ApiService.getContext(_services__WEBPACK_IMPORTED_MODULE_3__.UserService.getCustomerId(), key).then(resolve, reject);
488
462
  }
489
463
  else {
490
464
  reject('Can not load context. Customer is not created.');
@@ -494,8 +468,8 @@ var App = /** @class */ (function () {
494
468
  App.prototype.setContext = function (key, value) {
495
469
  var _this = this;
496
470
  return new Promise(function (resolve, reject) {
497
- if (_services__WEBPACK_IMPORTED_MODULE_3__["UserService"].getCustomerId()) {
498
- _services__WEBPACK_IMPORTED_MODULE_3__["ApiService"].setContext(_services__WEBPACK_IMPORTED_MODULE_3__["UserService"].getCustomerId(), key, value).then(resolve, reject);
471
+ if (_services__WEBPACK_IMPORTED_MODULE_3__.UserService.getCustomerId()) {
472
+ _services__WEBPACK_IMPORTED_MODULE_3__.ApiService.setContext(_services__WEBPACK_IMPORTED_MODULE_3__.UserService.getCustomerId(), key, value).then(resolve, reject);
499
473
  }
500
474
  else {
501
475
  _this.options.context[key] = value;
@@ -506,7 +480,7 @@ var App = /** @class */ (function () {
506
480
  return this.chatConfig;
507
481
  };
508
482
  App.prototype.setInitialElement = function (initialElement) {
509
- var mergedInitialElement = Object(_utils__WEBPACK_IMPORTED_MODULE_4__["mergeDeep"])(this.options.initialElement, initialElement);
483
+ var mergedInitialElement = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.mergeDeep)(this.options.initialElement, initialElement);
510
484
  this.options.initialElement = mergedInitialElement;
511
485
  if (this.widgetManager.getIframeWidget()) {
512
486
  this.widgetManager
@@ -573,7 +547,7 @@ var App = /** @class */ (function () {
573
547
  var iframeWidget = _this.widgetManager.getIframeWidget();
574
548
  if (!iframeWidget.isLoaded()) {
575
549
  iframeWidget.setLoaded(true);
576
- _services__WEBPACK_IMPORTED_MODULE_3__["UserService"].touchUser(_this.options.id, _this.options.locale, _this.csrfToken, _this.options.context).then(function (customerId) {
550
+ _services__WEBPACK_IMPORTED_MODULE_3__.UserService.touchUser(_this.options.id, _this.options.locale, _this.csrfToken, _this.options.context).then(function (customerId) {
577
551
  // Debug interval
578
552
  setTimeout(function () {
579
553
  iframeWidget.load(customerId);
@@ -583,7 +557,17 @@ var App = /** @class */ (function () {
583
557
  };
584
558
  var iframeWidget = this.widgetManager.getIframeWidget();
585
559
  if (!iframeWidget || !iframeWidget.isRendered()) {
586
- this.widgetManager.renderIframeWidget(this.options, function () {
560
+ var channel = this.options.context.channel
561
+ ? this.options.context.channel
562
+ : 'pwa-embed';
563
+ var _a = this.options, id = _a.id, initialElement = _a.initialElement, locale = _a.locale;
564
+ this.widgetManager.renderIframeWidget({
565
+ id: id,
566
+ initialElement: initialElement,
567
+ locale: locale,
568
+ channel: channel,
569
+ host: _config_config__WEBPACK_IMPORTED_MODULE_0__.config.env.iframeHost,
570
+ }, function () {
587
571
  // For a separate thread. @todo refactor render flow.
588
572
  setTimeout(function () {
589
573
  _this.initWebchatService();
@@ -599,6 +583,10 @@ var App = /** @class */ (function () {
599
583
  _this.widgetManager.getActionButtonGroupWidget().addButton(__assign(__assign({}, item), { locale: _this.options.locale, app: _this }));
600
584
  });
601
585
  };
586
+ App.prototype.setLocale = function (locale) {
587
+ this.options.locale = locale;
588
+ this.widgetManager.setLocale(locale, this.chatConfig);
589
+ };
602
590
  return App;
603
591
  }());
604
592
 
@@ -610,34 +598,38 @@ var App = /** @class */ (function () {
610
598
  /*!*****************************************!*\
611
599
  !*** ./src/scripts/core/base-widget.ts ***!
612
600
  \*****************************************/
613
- /*! exports provided: config, BaseWidget */
614
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
601
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
615
602
 
616
- "use strict";
617
603
  __webpack_require__.r(__webpack_exports__);
618
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
619
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseWidget", function() { return BaseWidget; });
604
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
605
+ /* harmony export */ BaseWidget: () => (/* binding */ BaseWidget),
606
+ /* harmony export */ config: () => (/* binding */ config)
607
+ /* harmony export */ });
620
608
  /* harmony import */ var _observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./observable */ "./src/scripts/core/observable.ts");
621
609
  /* harmony import */ var _services_audio_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/audio.service */ "./src/scripts/services/audio.service.ts");
622
610
  var __extends = (undefined && undefined.__extends) || (function () {
623
611
  var extendStatics = function (d, b) {
624
612
  extendStatics = Object.setPrototypeOf ||
625
613
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
626
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
614
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
627
615
  return extendStatics(d, b);
628
616
  };
629
617
  return function (d, b) {
618
+ if (typeof b !== "function" && b !== null)
619
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
630
620
  extendStatics(d, b);
631
621
  function __() { this.constructor = d; }
632
622
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
633
623
  };
634
624
  })();
635
- var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
636
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
637
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
638
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
639
- r[k] = a[j];
640
- return r;
625
+ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
626
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
627
+ if (ar || !(i in from)) {
628
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
629
+ ar[i] = from[i];
630
+ }
631
+ }
632
+ return to.concat(ar || Array.prototype.slice.call(from));
641
633
  };
642
634
 
643
635
 
@@ -689,7 +681,7 @@ var BaseWidget = /** @class */ (function (_super) {
689
681
  setTimeout(function () {
690
682
  boxElem.classList.add(config.visibleCls);
691
683
  if (_this.effects.sound) {
692
- _services_audio_service__WEBPACK_IMPORTED_MODULE_1__["AudioService"].playSound(_this.effects.sound);
684
+ _services_audio_service__WEBPACK_IMPORTED_MODULE_1__.AudioService.playSound(_this.effects.sound);
693
685
  }
694
686
  }, 10);
695
687
  }
@@ -723,7 +715,7 @@ var BaseWidget = /** @class */ (function (_super) {
723
715
  boxElem.addEventListener('animationend', handler);
724
716
  boxElem.classList.add(config.fxCls[_this.effects.appear]);
725
717
  if (_this.effects.sound) {
726
- _services_audio_service__WEBPACK_IMPORTED_MODULE_1__["AudioService"].playSound(_this.effects.sound);
718
+ _services_audio_service__WEBPACK_IMPORTED_MODULE_1__.AudioService.playSound(_this.effects.sound);
727
719
  }
728
720
  }, this.effects.delay);
729
721
  };
@@ -770,12 +762,12 @@ var BaseWidget = /** @class */ (function (_super) {
770
762
  var baseCls = this.getBaseCls();
771
763
  var classes = [config.rootCls];
772
764
  if (typeof baseCls === 'string') {
773
- classes = __spreadArrays(classes, (baseCls.indexOf(' ') < 0
765
+ classes = __spreadArray(__spreadArray([], classes, true), (baseCls.indexOf(' ') < 0
774
766
  ? [baseCls]
775
- : baseCls.replace(/^\s+|\s+$/g, '').split(/\s+/)));
767
+ : baseCls.replace(/^\s+|\s+$/g, '').split(/\s+/)), true);
776
768
  }
777
769
  else {
778
- classes = __spreadArrays(classes, baseCls);
770
+ classes = __spreadArray(__spreadArray([], classes, true), baseCls, true);
779
771
  }
780
772
  classes.forEach(function (item) { return _this.boxElem.classList.add(item); });
781
773
  }
@@ -785,7 +777,7 @@ var BaseWidget = /** @class */ (function (_super) {
785
777
  if (!this.contentElem) {
786
778
  this.contentElem = this.createNode();
787
779
  if (this.getBaseCls()) {
788
- this.contentElem.classList.add(this.getBaseCls() + "__content");
780
+ this.contentElem.classList.add("".concat(this.getBaseCls(), "__content"));
789
781
  }
790
782
  this.getBoxElem().appendChild(this.contentElem);
791
783
  }
@@ -872,7 +864,7 @@ var BaseWidget = /** @class */ (function (_super) {
872
864
  this.fire('destroy');
873
865
  };
874
866
  return BaseWidget;
875
- }(_observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]));
867
+ }(_observable__WEBPACK_IMPORTED_MODULE_0__.Observable));
876
868
 
877
869
 
878
870
 
@@ -882,12 +874,12 @@ var BaseWidget = /** @class */ (function (_super) {
882
874
  /*!*******************************************!*\
883
875
  !*** ./src/scripts/core/event-emitter.ts ***!
884
876
  \*******************************************/
885
- /*! exports provided: EventEmitter */
886
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
877
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
887
878
 
888
- "use strict";
889
879
  __webpack_require__.r(__webpack_exports__);
890
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventEmitter", function() { return EventEmitter; });
880
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
881
+ /* harmony export */ EventEmitter: () => (/* binding */ EventEmitter)
882
+ /* harmony export */ });
891
883
  /**
892
884
  * A simple and lightweight EventEmitter by TypeScript for Node.js or Browsers.
893
885
  *
@@ -1152,12 +1144,12 @@ var EventEmitter = /** @class */ (function () {
1152
1144
  /*!************************************!*\
1153
1145
  !*** ./src/scripts/core/facade.ts ***!
1154
1146
  \************************************/
1155
- /*! exports provided: createFacade */
1156
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1147
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1157
1148
 
1158
- "use strict";
1159
1149
  __webpack_require__.r(__webpack_exports__);
1160
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFacade", function() { return createFacade; });
1150
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1151
+ /* harmony export */ createFacade: () => (/* binding */ createFacade)
1152
+ /* harmony export */ });
1161
1153
  var c2o = [
1162
1154
  'pro110d',
1163
1155
  'pro1130',
@@ -1194,9 +1186,13 @@ var createFacade = function (instance) {
1194
1186
  },
1195
1187
  showButton: function () {
1196
1188
  instance.getWidgetManager().getChatButtonWidget().show();
1189
+ instance.getWidgetManager().getWhatsappButtonWidget().show();
1190
+ instance.getWidgetManager().getUnreadWidget().show();
1197
1191
  },
1198
1192
  hideButton: function () {
1199
1193
  instance.getWidgetManager().getChatButtonWidget().hide();
1194
+ instance.getWidgetManager().getWhatsappButtonWidget().hide();
1195
+ instance.getWidgetManager().getUnreadWidget().hide();
1200
1196
  },
1201
1197
  setButtonText: function (text) {
1202
1198
  instance.getWidgetManager().getChatButtonWidget().setContent(text);
@@ -1262,6 +1258,9 @@ var createFacade = function (instance) {
1262
1258
  isReady: function () {
1263
1259
  return instance.isReady();
1264
1260
  },
1261
+ setLocale: function (locale) {
1262
+ instance.setLocale(locale);
1263
+ },
1265
1264
  };
1266
1265
  };
1267
1266
 
@@ -1272,21 +1271,23 @@ var createFacade = function (instance) {
1272
1271
  /*!****************************************!*\
1273
1272
  !*** ./src/scripts/core/observable.ts ***!
1274
1273
  \****************************************/
1275
- /*! exports provided: Observable */
1276
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1274
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1277
1275
 
1278
- "use strict";
1279
1276
  __webpack_require__.r(__webpack_exports__);
1280
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
1277
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1278
+ /* harmony export */ Observable: () => (/* binding */ Observable)
1279
+ /* harmony export */ });
1281
1280
  /* harmony import */ var _event_emitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event-emitter */ "./src/scripts/core/event-emitter.ts");
1282
1281
  var __extends = (undefined && undefined.__extends) || (function () {
1283
1282
  var extendStatics = function (d, b) {
1284
1283
  extendStatics = Object.setPrototypeOf ||
1285
1284
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1286
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
1285
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1287
1286
  return extendStatics(d, b);
1288
1287
  };
1289
1288
  return function (d, b) {
1289
+ if (typeof b !== "function" && b !== null)
1290
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1290
1291
  extendStatics(d, b);
1291
1292
  function __() { this.constructor = d; }
1292
1293
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -1312,7 +1313,7 @@ var Observable = /** @class */ (function (_super) {
1312
1313
  this.offAll();
1313
1314
  };
1314
1315
  return Observable;
1315
- }(_event_emitter__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]));
1316
+ }(_event_emitter__WEBPACK_IMPORTED_MODULE_0__.EventEmitter));
1316
1317
 
1317
1318
 
1318
1319
 
@@ -1322,21 +1323,21 @@ var Observable = /** @class */ (function (_super) {
1322
1323
  /*!***********************************!*\
1323
1324
  !*** ./src/scripts/core/utils.ts ***!
1324
1325
  \***********************************/
1325
- /*! exports provided: parseUrlParam, isExternalUrl, injectCss, isFontLoaded, loadOpenSans, isObject, mergeDeep, removeURLParameters, isCrawler, inIframe */
1326
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1326
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1327
1327
 
1328
- "use strict";
1329
1328
  __webpack_require__.r(__webpack_exports__);
1330
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseUrlParam", function() { return parseUrlParam; });
1331
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isExternalUrl", function() { return isExternalUrl; });
1332
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "injectCss", function() { return injectCss; });
1333
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFontLoaded", function() { return isFontLoaded; });
1334
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadOpenSans", function() { return loadOpenSans; });
1335
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
1336
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeDeep", function() { return mergeDeep; });
1337
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeURLParameters", function() { return removeURLParameters; });
1338
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCrawler", function() { return isCrawler; });
1339
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inIframe", function() { return inIframe; });
1329
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1330
+ /* harmony export */ inIframe: () => (/* binding */ inIframe),
1331
+ /* harmony export */ injectCss: () => (/* binding */ injectCss),
1332
+ /* harmony export */ isCrawler: () => (/* binding */ isCrawler),
1333
+ /* harmony export */ isExternalUrl: () => (/* binding */ isExternalUrl),
1334
+ /* harmony export */ isFontLoaded: () => (/* binding */ isFontLoaded),
1335
+ /* harmony export */ isObject: () => (/* binding */ isObject),
1336
+ /* harmony export */ loadOpenSans: () => (/* binding */ loadOpenSans),
1337
+ /* harmony export */ mergeDeep: () => (/* binding */ mergeDeep),
1338
+ /* harmony export */ parseUrlParam: () => (/* binding */ parseUrlParam),
1339
+ /* harmony export */ removeURLParameters: () => (/* binding */ removeURLParameters)
1340
+ /* harmony export */ });
1340
1341
  var parseUrlParam = function (source, name, defaultReturn) {
1341
1342
  if (defaultReturn === void 0) { defaultReturn = null; }
1342
1343
  var url = new URL(source);
@@ -1357,7 +1358,7 @@ var isExternalUrl = function (url) {
1357
1358
  if (match != null &&
1358
1359
  typeof match[2] === 'string' &&
1359
1360
  match[2].length > 0 &&
1360
- match[2].replace(new RegExp(":( + { 'http:': 80, 'https:': 443 }[" + location.protocol + "] + )?$"), '') !== location.host) {
1361
+ match[2].replace(new RegExp(":( + { 'http:': 80, 'https:': 443 }[".concat(location.protocol, "] + )?$")), '') !== location.host) {
1361
1362
  return true;
1362
1363
  }
1363
1364
  return false;
@@ -1377,7 +1378,7 @@ var isFontLoaded = function (fontName) {
1377
1378
  var text = 'abcdefghijklmnopqrstuvwxyz0123456789';
1378
1379
  context.font = '72px monospace';
1379
1380
  var baselineSize = context.measureText(text).width;
1380
- context.font = "72px " + fontName + ", monospace";
1381
+ context.font = "72px ".concat(fontName, ", monospace");
1381
1382
  var newSize = context.measureText(text).width;
1382
1383
  canvas = null;
1383
1384
  if (newSize === baselineSize) {
@@ -1385,15 +1386,7 @@ var isFontLoaded = function (fontName) {
1385
1386
  }
1386
1387
  return true;
1387
1388
  };
1388
- var loadOpenSans = function () {
1389
- var style = document.createElement('link');
1390
- var head = document.querySelector('head');
1391
- style.rel = 'stylesheet';
1392
- style.href = 'https://fonts.googleapis.com/css?family=Open+Sans:400';
1393
- if (head !== null) {
1394
- head.appendChild(style);
1395
- }
1396
- };
1389
+ var loadOpenSans = function () { };
1397
1390
  var isObject = function (item) {
1398
1391
  return item && typeof item === 'object' && !Array.isArray(item);
1399
1392
  };
@@ -1416,7 +1409,7 @@ var mergeDeep = function (target, source) {
1416
1409
  return output;
1417
1410
  };
1418
1411
  var removeURLParameters = function (removeParams) {
1419
- var deleteRegex = new RegExp(removeParams.join('=|') + "=");
1412
+ var deleteRegex = new RegExp("".concat(removeParams.join('=|'), "="));
1420
1413
  var params = location.search.slice(1).split('&');
1421
1414
  var search = [];
1422
1415
  for (var i = 0; i < params.length; i++) {
@@ -1424,8 +1417,8 @@ var removeURLParameters = function (removeParams) {
1424
1417
  search.push(params[i]);
1425
1418
  }
1426
1419
  }
1427
- var searchString = search.length ? "?" + search.join('&') : '';
1428
- var redirectUrl = "" + location.pathname + searchString + location.hash;
1420
+ var searchString = search.length ? "?".concat(search.join('&')) : '';
1421
+ var redirectUrl = "".concat(location.pathname).concat(searchString).concat(location.hash);
1429
1422
  window.history.replaceState({}, document.title, redirectUrl);
1430
1423
  };
1431
1424
  var isCrawler = function () {
@@ -1447,12 +1440,12 @@ var inIframe = function () {
1447
1440
  /*!********************************************!*\
1448
1441
  !*** ./src/scripts/core/widget-manager.ts ***!
1449
1442
  \********************************************/
1450
- /*! exports provided: WidgetManager */
1451
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1443
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1452
1444
 
1453
- "use strict";
1454
1445
  __webpack_require__.r(__webpack_exports__);
1455
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WidgetManager", function() { return WidgetManager; });
1446
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1447
+ /* harmony export */ WidgetManager: () => (/* binding */ WidgetManager)
1448
+ /* harmony export */ });
1456
1449
  /* harmony import */ var _widgets_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../widgets/index */ "./src/scripts/widgets/index.ts");
1457
1450
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
1458
1451
  var __assign = (undefined && undefined.__assign) || function () {
@@ -1468,6 +1461,19 @@ var __assign = (undefined && undefined.__assign) || function () {
1468
1461
  };
1469
1462
 
1470
1463
 
1464
+ var getTeaserText = function (_a) {
1465
+ var teaserText = _a.teaserText, locale = _a.locale, defaultLocale = _a.defaultLocale;
1466
+ var content = 'Can I help you?';
1467
+ if (teaserText) {
1468
+ if (teaserText[locale]) {
1469
+ content = teaserText[locale];
1470
+ }
1471
+ else if (defaultLocale && teaserText[defaultLocale]) {
1472
+ content = teaserText[defaultLocale];
1473
+ }
1474
+ }
1475
+ return content;
1476
+ };
1471
1477
  var WidgetManager = /** @class */ (function () {
1472
1478
  function WidgetManager(app) {
1473
1479
  this.app = app;
@@ -1481,23 +1487,34 @@ var WidgetManager = /** @class */ (function () {
1481
1487
  WidgetManager.prototype.isAppReady = function () {
1482
1488
  return this.app.isReady();
1483
1489
  };
1484
- WidgetManager.prototype.renderHeader = function () {
1490
+ WidgetManager.prototype.renderHeader = function (options) {
1485
1491
  var _this = this;
1486
- this.headerWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["HeaderWidget"]({
1492
+ this.headerWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.HeaderWidget({
1487
1493
  renderTo: this.chatboxWidget.getBoxElem(),
1494
+ leftCloseButton: options.leftCloseButton,
1488
1495
  });
1489
1496
  this.headerWidget.getCloseButton().on('click', function () {
1490
- _this.chatboxWidget.hide();
1497
+ if (_this.whatsappWindowWidget && _this.whatsappWindowWidget.isVisible()) {
1498
+ _this.whatsappWindowWidget.hide();
1499
+ }
1500
+ else {
1501
+ _this.chatboxWidget.hide();
1502
+ }
1491
1503
  });
1492
1504
  };
1493
1505
  WidgetManager.prototype.renderIframeBox = function () {
1494
- this.iframeBoxWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["IframeBoxWidget"]({
1506
+ this.iframeBoxWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.IframeBoxWidget({
1495
1507
  visible: false,
1496
1508
  renderTo: this.wrapperWidget.getBoxElem(),
1497
1509
  });
1498
1510
  };
1511
+ WidgetManager.prototype.renderFooter = function () {
1512
+ this.footerWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.FooterWidget({
1513
+ renderTo: this.wrapperWidget.getBoxElem(),
1514
+ });
1515
+ };
1499
1516
  WidgetManager.prototype.renderWrapper = function (options) {
1500
- this.wrapperWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["WrapperWidget"]({
1517
+ this.wrapperWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.WrapperWidget({
1501
1518
  renderTo: document.body,
1502
1519
  position: options.position,
1503
1520
  theme: options.theme,
@@ -1506,11 +1523,11 @@ var WidgetManager = /** @class */ (function () {
1506
1523
  visible: options.visible,
1507
1524
  });
1508
1525
  if (!options.renderButton) {
1509
- this.wrapperWidget.addCls(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].wrapperNoButtonCls);
1526
+ this.wrapperWidget.addCls(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.wrapperNoButtonCls);
1510
1527
  }
1511
1528
  };
1512
1529
  WidgetManager.prototype.renderContentWrapper = function () {
1513
- this.contentWrapperWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["ContentWrapperWidget"]({
1530
+ this.contentWrapperWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.ContentWrapperWidget({
1514
1531
  renderTo: this.wrapperWidget.getBoxElem(),
1515
1532
  });
1516
1533
  };
@@ -1527,9 +1544,9 @@ var WidgetManager = /** @class */ (function () {
1527
1544
  content = buttonText[defaultLocale];
1528
1545
  }
1529
1546
  }
1530
- this.chatButtonWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["ChatButtonWidget"]({
1547
+ this.chatButtonWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.ChatButtonWidget({
1531
1548
  content: content,
1532
- renderTo: this.wrapperWidget.getBoxElem(),
1549
+ renderTo: this.footerWidget.getBoxElem(),
1533
1550
  visible: options.isButtonVisible,
1534
1551
  effects: effects === null || effects === void 0 ? void 0 : effects.chatButton,
1535
1552
  events: [
@@ -1567,12 +1584,13 @@ var WidgetManager = /** @class */ (function () {
1567
1584
  });
1568
1585
  };
1569
1586
  WidgetManager.prototype.renderIframeWidget = function (options, afterRender) {
1570
- this.iframeWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["IframeWidget"]({
1571
- host: _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].env.iframeHost,
1587
+ this.iframeWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.IframeWidget({
1588
+ host: options.host,
1572
1589
  id: options.id,
1573
1590
  initialElement: options.initialElement,
1574
1591
  locale: options.locale,
1575
1592
  renderTo: this.getChatboxWidget().getBoxElem(),
1593
+ channel: options.channel,
1576
1594
  events: [
1577
1595
  {
1578
1596
  type: 'render',
@@ -1587,22 +1605,15 @@ var WidgetManager = /** @class */ (function () {
1587
1605
  var _this = this;
1588
1606
  var locale = options.locale;
1589
1607
  var teaserText = chatConfig.teaserText, defaultLocale = chatConfig.defaultLocale, effects = chatConfig.effects;
1590
- var content = 'Can I help you?';
1591
- if (teaserText) {
1592
- if (teaserText[locale]) {
1593
- content = teaserText[locale];
1594
- }
1595
- else if (defaultLocale && teaserText[defaultLocale]) {
1596
- content = teaserText[defaultLocale];
1597
- }
1598
- }
1599
- this.teaserWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["TeaserWidget"]({
1608
+ var content = getTeaserText({ teaserText: teaserText, locale: locale, defaultLocale: defaultLocale });
1609
+ this.teaserWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.TeaserWidget({
1600
1610
  content: content,
1601
1611
  showTeaserOnce: chatConfig.showTeaserOnce,
1602
1612
  hideTeaserAfterTimes: chatConfig.hideTeaserAfterTimes,
1603
1613
  renderTo: this.contentWrapperWidget.getBoxElem(),
1604
1614
  visible: isTeaserVisible,
1605
1615
  effects: effects === null || effects === void 0 ? void 0 : effects.teaser,
1616
+ custidStoreMode: options.custidStoreMode,
1606
1617
  events: [
1607
1618
  {
1608
1619
  type: 'before:show',
@@ -1611,7 +1622,7 @@ var WidgetManager = /** @class */ (function () {
1611
1622
  if (_this.actionButtonGroupWidget) {
1612
1623
  _this.actionButtonGroupWidget.show();
1613
1624
  }
1614
- _this.wrapperWidget.addCls(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].wrapperTeaserIsOpenCls);
1625
+ _this.wrapperWidget.addCls(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.wrapperTeaserIsOpenCls);
1615
1626
  },
1616
1627
  },
1617
1628
  {
@@ -1621,7 +1632,7 @@ var WidgetManager = /** @class */ (function () {
1621
1632
  {
1622
1633
  type: 'before:hide',
1623
1634
  callback: function () {
1624
- _this.wrapperWidget.removeCls(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].wrapperTeaserIsOpenCls);
1635
+ _this.wrapperWidget.removeCls(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.wrapperTeaserIsOpenCls);
1625
1636
  if (_this.actionButtonGroupWidget) {
1626
1637
  _this.actionButtonGroupWidget.hide();
1627
1638
  }
@@ -1641,7 +1652,7 @@ var WidgetManager = /** @class */ (function () {
1641
1652
  };
1642
1653
  WidgetManager.prototype.renderUnreadWidget = function (options, chatConfig) {
1643
1654
  var effects = chatConfig.effects;
1644
- this.unreadWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["UnreadWidget"]({
1655
+ this.unreadWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.UnreadWidget({
1645
1656
  visible: options.unreadCounter > 0 ? true : false,
1646
1657
  renderTo: this.wrapperWidget.getBoxElem(),
1647
1658
  unreadCounter: options.unreadCounter,
@@ -1650,7 +1661,7 @@ var WidgetManager = /** @class */ (function () {
1650
1661
  };
1651
1662
  WidgetManager.prototype.renderChatboxWidget = function (options, beforeShowCallback) {
1652
1663
  var _this = this;
1653
- this.chatboxWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["ChatboxWidget"]({
1664
+ this.chatboxWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.ChatboxWidget({
1654
1665
  visible: options.isChatboxVisible,
1655
1666
  hasExtendedWidth: options.extendedWidth,
1656
1667
  events: [
@@ -1707,7 +1718,7 @@ var WidgetManager = /** @class */ (function () {
1707
1718
  WidgetManager.prototype.renderActionButtonGroupWidget = function (app, options, chatConfig) {
1708
1719
  var _this = this;
1709
1720
  var actionButtons = chatConfig.actionButtons, effects = chatConfig.effects;
1710
- this.actionButtonGroupWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["ActionButtonGroupWidget"]({
1721
+ this.actionButtonGroupWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.ActionButtonGroupWidget({
1711
1722
  renderTo: this.contentWrapperWidget.getBoxElem(),
1712
1723
  effects: effects === null || effects === void 0 ? void 0 : effects.actionButtons,
1713
1724
  visible: actionButtons &&
@@ -1722,10 +1733,12 @@ var WidgetManager = /** @class */ (function () {
1722
1733
  };
1723
1734
  WidgetManager.prototype.renderWhatsappButtonWidget = function (chatConfig) {
1724
1735
  var _this = this;
1725
- var effects = chatConfig.effects;
1726
- this.whatsappButtonWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["WhatsappButtonWidget"]({
1727
- renderTo: this.wrapperWidget.getBoxElem(),
1736
+ var effects = chatConfig.effects, bwWaButton = chatConfig.bwWaButton, slideWaButton = chatConfig.slideWaButton;
1737
+ this.whatsappButtonWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.WhatsappButtonWidget({
1738
+ slideWaButton: slideWaButton,
1739
+ renderTo: this.footerWidget.getBoxElem(),
1728
1740
  effects: effects === null || effects === void 0 ? void 0 : effects.whatsappButton,
1741
+ blackWhiteStyle: bwWaButton,
1729
1742
  events: [
1730
1743
  {
1731
1744
  type: 'toggle',
@@ -1733,17 +1746,23 @@ var WidgetManager = /** @class */ (function () {
1733
1746
  if (event.data.isPressed) {
1734
1747
  if (!_this.isAppReady()) {
1735
1748
  _this.getBroadcast().once('ready', function () {
1736
- _this.whatsappWindowWidget.show();
1749
+ if (_this.whatsappWindowWidget) {
1750
+ _this.whatsappWindowWidget.show();
1751
+ }
1737
1752
  });
1738
1753
  }
1739
1754
  else {
1740
- _this.whatsappWindowWidget.show();
1755
+ if (_this.whatsappWindowWidget) {
1756
+ _this.whatsappWindowWidget.show();
1757
+ }
1741
1758
  }
1742
1759
  _this.chatButtonWidget.toggle(true);
1743
1760
  _this.wrapperWidget.addCls('ds-whatsapp--opened');
1744
1761
  }
1745
1762
  else {
1746
- _this.whatsappWindowWidget.hide();
1763
+ if (_this.whatsappWindowWidget) {
1764
+ _this.whatsappWindowWidget.hide();
1765
+ }
1747
1766
  _this.wrapperWidget.removeCls('ds-whatsapp--opened');
1748
1767
  }
1749
1768
  },
@@ -1756,7 +1775,7 @@ var WidgetManager = /** @class */ (function () {
1756
1775
  };
1757
1776
  WidgetManager.prototype.renderWhatsappWindowWidget = function (options) {
1758
1777
  var _this = this;
1759
- this.whatsappWindowWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__["WhatsappWindowWidget"]({
1778
+ this.whatsappWindowWidget = new _widgets_index__WEBPACK_IMPORTED_MODULE_0__.WhatsappWindowWidget({
1760
1779
  renderTo: this.chatboxWidget.getBoxElem(),
1761
1780
  visible: false,
1762
1781
  clientId: options.id,
@@ -1778,7 +1797,9 @@ var WidgetManager = /** @class */ (function () {
1778
1797
  ],
1779
1798
  });
1780
1799
  this.chatboxWidget.on('before:hide', function () {
1781
- _this.whatsappWindowWidget.hide();
1800
+ if (_this.whatsappWindowWidget) {
1801
+ _this.whatsappWindowWidget.hide();
1802
+ }
1782
1803
  });
1783
1804
  };
1784
1805
  WidgetManager.prototype.getChatButtonWidget = function () {
@@ -1811,16 +1832,51 @@ var WidgetManager = /** @class */ (function () {
1811
1832
  WidgetManager.prototype.getIframeBoxWidget = function () {
1812
1833
  return this.iframeBoxWidget;
1813
1834
  };
1835
+ WidgetManager.prototype.setLocale = function (locale, chatConfig) {
1836
+ var teaserText = chatConfig.teaserText, defaultLocale = chatConfig.defaultLocale;
1837
+ if (this.teaserWidget) {
1838
+ var teaserContent = getTeaserText({ teaserText: teaserText, locale: locale, defaultLocale: defaultLocale });
1839
+ this.teaserWidget.setContent(teaserContent);
1840
+ }
1841
+ if (this.actionButtonGroupWidget) {
1842
+ var buttons = this.actionButtonGroupWidget.getButtons();
1843
+ buttons.forEach(function (button) { return button.setLocale(locale); });
1844
+ }
1845
+ if (this.whatsappWindowWidget) {
1846
+ this.whatsappWindowWidget.setLocale(locale);
1847
+ }
1848
+ };
1814
1849
  WidgetManager.prototype.destroy = function () {
1815
- this.unreadWidget.destroy();
1816
- this.teaserWidget.destroy();
1817
- this.chatButtonWidget.destroy();
1818
- this.iframeWidget.destroy();
1819
- this.chatboxWidget.destroy();
1820
- this.wrapperWidget.destroy();
1821
- this.actionButtonGroupWidget.destroy();
1822
- this.iframeBoxWidget.destroy();
1823
- this.headerWidget.destroy();
1850
+ if (this.unreadWidget) {
1851
+ this.unreadWidget.destroy();
1852
+ }
1853
+ if (this.teaserWidget) {
1854
+ this.teaserWidget.destroy();
1855
+ }
1856
+ if (this.chatButtonWidget) {
1857
+ this.chatButtonWidget.destroy();
1858
+ }
1859
+ if (this.iframeWidget) {
1860
+ this.iframeWidget.destroy();
1861
+ }
1862
+ if (this.chatboxWidget) {
1863
+ this.chatboxWidget.destroy();
1864
+ }
1865
+ if (this.wrapperWidget) {
1866
+ this.wrapperWidget.destroy();
1867
+ }
1868
+ if (this.actionButtonGroupWidget) {
1869
+ this.actionButtonGroupWidget.destroy();
1870
+ }
1871
+ if (this.iframeBoxWidget) {
1872
+ this.iframeBoxWidget.destroy();
1873
+ }
1874
+ if (this.headerWidget) {
1875
+ this.headerWidget.destroy();
1876
+ }
1877
+ if (this.footerWidget) {
1878
+ this.footerWidget.destroy();
1879
+ }
1824
1880
  if (this.whatsappButtonWidget) {
1825
1881
  this.whatsappButtonWidget.destroy();
1826
1882
  }
@@ -1835,29 +1891,21 @@ var WidgetManager = /** @class */ (function () {
1835
1891
 
1836
1892
  /***/ }),
1837
1893
 
1838
- /***/ "./src/scripts/index.ts":
1894
+ /***/ "./src/scripts/enums.ts":
1839
1895
  /*!******************************!*\
1840
- !*** ./src/scripts/index.ts ***!
1896
+ !*** ./src/scripts/enums.ts ***!
1841
1897
  \******************************/
1842
- /*! exports provided: instance */
1843
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1898
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1844
1899
 
1845
- "use strict";
1846
1900
  __webpack_require__.r(__webpack_exports__);
1847
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instance", function() { return instance; });
1848
- /* harmony import */ var _core_facade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/facade */ "./src/scripts/core/facade.ts");
1849
- /* harmony import */ var _core_app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core/app */ "./src/scripts/core/app.ts");
1850
-
1851
-
1852
- var facade = null;
1853
- var instance = function (options) {
1854
- if (facade && !facade.isDestroyed()) {
1855
- return facade;
1856
- }
1857
- facade = Object(_core_facade__WEBPACK_IMPORTED_MODULE_0__["createFacade"])(new _core_app__WEBPACK_IMPORTED_MODULE_1__["App"](options));
1858
- return facade;
1859
- };
1860
-
1901
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1902
+ /* harmony export */ CustidStoreMode: () => (/* binding */ CustidStoreMode)
1903
+ /* harmony export */ });
1904
+ var CustidStoreMode;
1905
+ (function (CustidStoreMode) {
1906
+ CustidStoreMode["cookie"] = "cookie";
1907
+ CustidStoreMode["session"] = "session";
1908
+ })(CustidStoreMode || (CustidStoreMode = {}));
1861
1909
 
1862
1910
 
1863
1911
  /***/ }),
@@ -1866,14 +1914,14 @@ var instance = function (options) {
1866
1914
  /*!*********************************************!*\
1867
1915
  !*** ./src/scripts/models/action-button.ts ***!
1868
1916
  \*********************************************/
1869
- /*! exports provided: ActionButtonType, ActionButton, ActionButtonNormalizer */
1870
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1917
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1871
1918
 
1872
- "use strict";
1873
1919
  __webpack_require__.r(__webpack_exports__);
1874
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionButtonType", function() { return ActionButtonType; });
1875
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionButton", function() { return ActionButton; });
1876
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionButtonNormalizer", function() { return ActionButtonNormalizer; });
1920
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1921
+ /* harmony export */ ActionButton: () => (/* binding */ ActionButton),
1922
+ /* harmony export */ ActionButtonNormalizer: () => (/* binding */ ActionButtonNormalizer),
1923
+ /* harmony export */ ActionButtonType: () => (/* binding */ ActionButtonType)
1924
+ /* harmony export */ });
1877
1925
  var ActionButtonType;
1878
1926
  (function (ActionButtonType) {
1879
1927
  ActionButtonType["quickreply"] = "quickreply";
@@ -1920,7 +1968,7 @@ var ActionButtonNormalizer = /** @class */ (function () {
1920
1968
  function ActionButtonNormalizer() {
1921
1969
  }
1922
1970
  ActionButtonNormalizer.normalize = function (data) {
1923
- var locales = ['en', 'de', 'fr', 'it', 'ru', 'ar'];
1971
+ var locales = ['en', 'de', 'fr', 'it', 'ru', 'ar', 'nl', 'cz', 'hu', 'ro', 'es', 'da'];
1924
1972
  var result = {
1925
1973
  type: data.type,
1926
1974
  successor: data.successor,
@@ -1950,18 +1998,15 @@ var ActionButtonNormalizer = /** @class */ (function () {
1950
1998
  /*!*************************************!*\
1951
1999
  !*** ./src/scripts/models/index.ts ***!
1952
2000
  \*************************************/
1953
- /*! exports provided: ActionButtonType, ActionButton, ActionButtonNormalizer */
1954
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2001
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1955
2002
 
1956
- "use strict";
1957
2003
  __webpack_require__.r(__webpack_exports__);
2004
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2005
+ /* harmony export */ ActionButton: () => (/* reexport safe */ _action_button__WEBPACK_IMPORTED_MODULE_0__.ActionButton),
2006
+ /* harmony export */ ActionButtonNormalizer: () => (/* reexport safe */ _action_button__WEBPACK_IMPORTED_MODULE_0__.ActionButtonNormalizer),
2007
+ /* harmony export */ ActionButtonType: () => (/* reexport safe */ _action_button__WEBPACK_IMPORTED_MODULE_0__.ActionButtonType)
2008
+ /* harmony export */ });
1958
2009
  /* harmony import */ var _action_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./action-button */ "./src/scripts/models/action-button.ts");
1959
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionButtonType", function() { return _action_button__WEBPACK_IMPORTED_MODULE_0__["ActionButtonType"]; });
1960
-
1961
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionButton", function() { return _action_button__WEBPACK_IMPORTED_MODULE_0__["ActionButton"]; });
1962
-
1963
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionButtonNormalizer", function() { return _action_button__WEBPACK_IMPORTED_MODULE_0__["ActionButtonNormalizer"]; });
1964
-
1965
2010
 
1966
2011
 
1967
2012
 
@@ -1971,12 +2016,12 @@ __webpack_require__.r(__webpack_exports__);
1971
2016
  /*!*********************************************!*\
1972
2017
  !*** ./src/scripts/services/api.service.ts ***!
1973
2018
  \*********************************************/
1974
- /*! exports provided: ApiService */
1975
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2019
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1976
2020
 
1977
- "use strict";
1978
2021
  __webpack_require__.r(__webpack_exports__);
1979
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApiService", function() { return ApiService; });
2022
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2023
+ /* harmony export */ ApiService: () => (/* binding */ ApiService)
2024
+ /* harmony export */ });
1980
2025
  /* harmony import */ var _http_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.service */ "./src/scripts/services/http.service.ts");
1981
2026
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
1982
2027
 
@@ -1985,13 +2030,13 @@ var ApiService = /** @class */ (function () {
1985
2030
  function ApiService() {
1986
2031
  }
1987
2032
  ApiService.getTransport = function () {
1988
- return _http_service__WEBPACK_IMPORTED_MODULE_0__["HttpService"];
2033
+ return _http_service__WEBPACK_IMPORTED_MODULE_0__.HttpService;
1989
2034
  };
1990
2035
  ApiService.getCoreEndpoint = function () {
1991
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].env.coreApiEndpoint;
2036
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.env.coreApiEndpoint;
1992
2037
  };
1993
2038
  ApiService.getIbeEndpoint = function () {
1994
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].env.ibeApiEndpoint;
2039
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.env.ibeApiEndpoint;
1995
2040
  };
1996
2041
  ApiService.setContext = function (customerId, key, value) {
1997
2042
  var context = {};
@@ -2000,36 +2045,42 @@ var ApiService = /** @class */ (function () {
2000
2045
  custid: customerId,
2001
2046
  context: JSON.stringify(context),
2002
2047
  };
2003
- return ApiService.getTransport().postRequest(ApiService.getCoreEndpoint() + "/config/context", data);
2048
+ return ApiService.getTransport().postRequest("".concat(ApiService.getCoreEndpoint(), "/config/context"), data);
2004
2049
  };
2005
2050
  ApiService.getContext = function (customerId, variable) {
2006
2051
  return ApiService.getTransport()
2007
- .getRequest(ApiService.getCoreEndpoint() + "/config/context/" + customerId + "/" + variable)
2052
+ .getRequest("".concat(ApiService.getCoreEndpoint(), "/config/context/").concat(customerId, "/").concat(variable))
2008
2053
  .then(function (response) {
2009
2054
  return response[variable] ? response[variable] : null;
2010
2055
  });
2011
2056
  };
2012
- ApiService.getConfig = function (clientId, customerId, channel) {
2057
+ ApiService.getConfig = function (clientId, customerId, host, path, channel) {
2013
2058
  if (customerId === void 0) { customerId = 'none'; }
2014
- var url = ApiService.getCoreEndpoint() + "/config/webapp/" + clientId + "/" + customerId;
2059
+ var url = "".concat(ApiService.getCoreEndpoint(), "/config/webapp/").concat(clientId, "/").concat(customerId);
2060
+ var queryData = {
2061
+ host: host,
2062
+ path: path,
2063
+ };
2015
2064
  if (channel) {
2016
- url += "?channel=" + channel;
2065
+ queryData['channel'] = channel;
2017
2066
  }
2067
+ var queryString = new URLSearchParams(queryData);
2068
+ url += "?".concat(queryString.toString());
2018
2069
  return ApiService.getTransport().getRequest(url);
2019
2070
  };
2020
2071
  ApiService.createUser = function (options) {
2021
- var url = ApiService.getCoreEndpoint() + "/customer/v2/createnew/" + options.source + "/" + options.clientId + "/" + options.locale;
2072
+ var url = "".concat(ApiService.getCoreEndpoint(), "/customer/v2/createnew/").concat(options.source, "/").concat(options.clientId, "/").concat(options.locale);
2022
2073
  if (options.csrfToken) {
2023
- url += "?csrftoken=" + options.csrfToken;
2074
+ url += "?csrftoken=".concat(options.csrfToken);
2024
2075
  }
2025
2076
  if (options.context) {
2026
2077
  options.csrfToken ? (url += '&') : (url += '?');
2027
- url += "context=" + encodeURIComponent(JSON.stringify(options.context));
2078
+ url += "context=".concat(encodeURIComponent(JSON.stringify(options.context)));
2028
2079
  }
2029
2080
  url.indexOf('?') === -1 ? (url += '?origin=sdk') : (url += '&origin=sdk');
2030
- url += '&v=2.3.15';
2081
+ url += '&v=2.3.16';
2031
2082
  if (options.debug) {
2032
- url += "&debug=" + options.debug;
2083
+ url += "&debug=".concat(options.debug);
2033
2084
  }
2034
2085
  return ApiService.getTransport().getRequest(url);
2035
2086
  };
@@ -2042,7 +2093,7 @@ var ApiService = /** @class */ (function () {
2042
2093
  if (options.context) {
2043
2094
  data.context = JSON.stringify(options.context);
2044
2095
  }
2045
- return ApiService.getTransport().postRequest(ApiService.getCoreEndpoint() + "/customer/validate", data);
2096
+ return ApiService.getTransport().postRequest("".concat(ApiService.getCoreEndpoint(), "/customer/validate"), data);
2046
2097
  };
2047
2098
  ApiService.createToken = function (options) {
2048
2099
  var data = {
@@ -2053,10 +2104,10 @@ var ApiService = /** @class */ (function () {
2053
2104
  if (options.csrftoken) {
2054
2105
  data.csrftoken = options.csrftoken;
2055
2106
  }
2056
- return ApiService.getTransport().getRequest(ApiService.getCoreEndpoint() + "/customer/csrf", data);
2107
+ return ApiService.getTransport().getRequest("".concat(ApiService.getCoreEndpoint(), "/customer/csrf"), data);
2057
2108
  };
2058
2109
  ApiService.getWhatsappLink = function (clientid, custid) {
2059
- return ApiService.getTransport().getRequest(ApiService.getIbeEndpoint() + "/whatsapp/onboard", {
2110
+ return ApiService.getTransport().getRequest("".concat(ApiService.getIbeEndpoint(), "/whatsapp/onboard"), {
2060
2111
  clientid: clientid,
2061
2112
  custid: custid,
2062
2113
  });
@@ -2072,13 +2123,13 @@ var ApiService = /** @class */ (function () {
2072
2123
  /*!***********************************************!*\
2073
2124
  !*** ./src/scripts/services/audio.service.ts ***!
2074
2125
  \***********************************************/
2075
- /*! exports provided: AudioSound, AudioService */
2076
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2126
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2077
2127
 
2078
- "use strict";
2079
2128
  __webpack_require__.r(__webpack_exports__);
2080
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AudioSound", function() { return AudioSound; });
2081
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AudioService", function() { return AudioService; });
2129
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2130
+ /* harmony export */ AudioService: () => (/* binding */ AudioService),
2131
+ /* harmony export */ AudioSound: () => (/* binding */ AudioSound)
2132
+ /* harmony export */ });
2082
2133
  var AudioSound;
2083
2134
  (function (AudioSound) {
2084
2135
  AudioSound["appear"] = "appear";
@@ -2108,12 +2159,12 @@ var AudioService = /** @class */ (function () {
2108
2159
  /*!************************************************!*\
2109
2160
  !*** ./src/scripts/services/cookie.service.ts ***!
2110
2161
  \************************************************/
2111
- /*! exports provided: CookieService */
2112
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2162
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2113
2163
 
2114
- "use strict";
2115
2164
  __webpack_require__.r(__webpack_exports__);
2116
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CookieService", function() { return CookieService; });
2165
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2166
+ /* harmony export */ CookieService: () => (/* binding */ CookieService)
2167
+ /* harmony export */ });
2117
2168
  var __assign = (undefined && undefined.__assign) || function () {
2118
2169
  __assign = Object.assign || function(t) {
2119
2170
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -2156,17 +2207,17 @@ var CookieService = /** @class */ (function () {
2156
2207
  params.expires = expires.toUTCString();
2157
2208
  }
2158
2209
  var encodedValue = encodeURIComponent(value);
2159
- var updatedCookie = name + "=" + encodedValue;
2210
+ var updatedCookie = "".concat(name, "=").concat(encodedValue);
2160
2211
  for (var propName in params) {
2161
- updatedCookie = updatedCookie + "; " + propName;
2212
+ updatedCookie = "".concat(updatedCookie, "; ").concat(propName);
2162
2213
  var propValue = params[propName];
2163
2214
  if (propValue !== true) {
2164
- updatedCookie = updatedCookie + "=" + propValue;
2215
+ updatedCookie = "".concat(updatedCookie, "=").concat(propValue);
2165
2216
  }
2166
2217
  }
2167
2218
  document.cookie = updatedCookie;
2168
2219
  };
2169
- CookieService["delete"] = function (name) {
2220
+ CookieService.delete = function (name) {
2170
2221
  CookieService.set(name, '', {
2171
2222
  'max-age': -1,
2172
2223
  });
@@ -2177,18 +2228,48 @@ var CookieService = /** @class */ (function () {
2177
2228
 
2178
2229
 
2179
2230
 
2231
+ /***/ }),
2232
+
2233
+ /***/ "./src/scripts/services/ga.service.ts":
2234
+ /*!********************************************!*\
2235
+ !*** ./src/scripts/services/ga.service.ts ***!
2236
+ \********************************************/
2237
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2238
+
2239
+ __webpack_require__.r(__webpack_exports__);
2240
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2241
+ /* harmony export */ GaService: () => (/* binding */ GaService)
2242
+ /* harmony export */ });
2243
+ var GaService = /** @class */ (function () {
2244
+ function GaService() {
2245
+ }
2246
+ GaService.getGaValue = function () {
2247
+ for (var _i = 0, _a = document.cookie.split(';'); _i < _a.length; _i++) {
2248
+ var c = _a[_i];
2249
+ var d = c.trim();
2250
+ if (d.startsWith('_ga=')) {
2251
+ return d.split('=', 2)[1];
2252
+ }
2253
+ }
2254
+ return null;
2255
+ };
2256
+ return GaService;
2257
+ }());
2258
+
2259
+
2260
+
2180
2261
  /***/ }),
2181
2262
 
2182
2263
  /***/ "./src/scripts/services/http.service.ts":
2183
2264
  /*!**********************************************!*\
2184
2265
  !*** ./src/scripts/services/http.service.ts ***!
2185
2266
  \**********************************************/
2186
- /*! exports provided: HttpService */
2187
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2267
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2188
2268
 
2189
- "use strict";
2190
2269
  __webpack_require__.r(__webpack_exports__);
2191
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpService", function() { return HttpService; });
2270
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2271
+ /* harmony export */ HttpService: () => (/* binding */ HttpService)
2272
+ /* harmony export */ });
2192
2273
  var HttpService = /** @class */ (function () {
2193
2274
  function HttpService() {
2194
2275
  }
@@ -2203,7 +2284,7 @@ var HttpService = /** @class */ (function () {
2203
2284
  };
2204
2285
  HttpService.getRequest = function (url, options) {
2205
2286
  var queryString = options
2206
- ? url + "?" + new URLSearchParams(options).toString()
2287
+ ? "".concat(url, "?").concat(new URLSearchParams(options).toString())
2207
2288
  : url;
2208
2289
  return fetch(queryString).then(this.processError).then(this.processJson);
2209
2290
  };
@@ -2229,29 +2310,23 @@ var HttpService = /** @class */ (function () {
2229
2310
  /*!***************************************!*\
2230
2311
  !*** ./src/scripts/services/index.ts ***!
2231
2312
  \***************************************/
2232
- /*! exports provided: ApiService, HttpService, WebchatService, CookieService, UserService, TokenService */
2233
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2313
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2234
2314
 
2235
- "use strict";
2236
2315
  __webpack_require__.r(__webpack_exports__);
2316
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2317
+ /* harmony export */ ApiService: () => (/* reexport safe */ _api_service__WEBPACK_IMPORTED_MODULE_0__.ApiService),
2318
+ /* harmony export */ CookieService: () => (/* reexport safe */ _cookie_service__WEBPACK_IMPORTED_MODULE_3__.CookieService),
2319
+ /* harmony export */ HttpService: () => (/* reexport safe */ _http_service__WEBPACK_IMPORTED_MODULE_1__.HttpService),
2320
+ /* harmony export */ TokenService: () => (/* reexport safe */ _token_service__WEBPACK_IMPORTED_MODULE_5__.TokenService),
2321
+ /* harmony export */ UserService: () => (/* reexport safe */ _user_service__WEBPACK_IMPORTED_MODULE_4__.UserService),
2322
+ /* harmony export */ WebchatService: () => (/* reexport safe */ _webchat_service__WEBPACK_IMPORTED_MODULE_2__.WebchatService)
2323
+ /* harmony export */ });
2237
2324
  /* harmony import */ var _api_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./api.service */ "./src/scripts/services/api.service.ts");
2238
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ApiService", function() { return _api_service__WEBPACK_IMPORTED_MODULE_0__["ApiService"]; });
2239
-
2240
2325
  /* harmony import */ var _http_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./http.service */ "./src/scripts/services/http.service.ts");
2241
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HttpService", function() { return _http_service__WEBPACK_IMPORTED_MODULE_1__["HttpService"]; });
2242
-
2243
2326
  /* harmony import */ var _webchat_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./webchat.service */ "./src/scripts/services/webchat.service.ts");
2244
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WebchatService", function() { return _webchat_service__WEBPACK_IMPORTED_MODULE_2__["WebchatService"]; });
2245
-
2246
2327
  /* harmony import */ var _cookie_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cookie.service */ "./src/scripts/services/cookie.service.ts");
2247
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CookieService", function() { return _cookie_service__WEBPACK_IMPORTED_MODULE_3__["CookieService"]; });
2248
-
2249
2328
  /* harmony import */ var _user_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./user.service */ "./src/scripts/services/user.service.ts");
2250
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserService", function() { return _user_service__WEBPACK_IMPORTED_MODULE_4__["UserService"]; });
2251
-
2252
2329
  /* harmony import */ var _token_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./token.service */ "./src/scripts/services/token.service.ts");
2253
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TokenService", function() { return _token_service__WEBPACK_IMPORTED_MODULE_5__["TokenService"]; });
2254
-
2255
2330
 
2256
2331
 
2257
2332
 
@@ -2266,27 +2341,26 @@ __webpack_require__.r(__webpack_exports__);
2266
2341
  /*!***********************************************!*\
2267
2342
  !*** ./src/scripts/services/token.service.ts ***!
2268
2343
  \***********************************************/
2269
- /*! exports provided: TokenService */
2270
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2344
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2271
2345
 
2272
- "use strict";
2273
2346
  __webpack_require__.r(__webpack_exports__);
2274
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenService", function() { return TokenService; });
2347
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2348
+ /* harmony export */ TokenService: () => (/* binding */ TokenService)
2349
+ /* harmony export */ });
2275
2350
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! . */ "./src/scripts/services/index.ts");
2276
2351
  /* harmony import */ var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils */ "./src/scripts/core/utils.ts");
2277
2352
 
2278
2353
 
2279
2354
  var csrfCookieName = 'ds-csrf';
2280
- var customerIdCookieName = 'ds-custid';
2281
2355
  var TokenService = /** @class */ (function () {
2282
2356
  function TokenService() {
2283
2357
  }
2284
2358
  TokenService.touchToken = function (clientId, csrfAfter) {
2285
2359
  return new Promise(function (resolve) {
2286
- var customerId = ___WEBPACK_IMPORTED_MODULE_0__["CookieService"].get(customerIdCookieName);
2287
- var csrftoken = ___WEBPACK_IMPORTED_MODULE_0__["CookieService"].get(csrfCookieName);
2360
+ var customerId = ___WEBPACK_IMPORTED_MODULE_0__.UserService.getCustomerId();
2361
+ var csrftoken = ___WEBPACK_IMPORTED_MODULE_0__.CookieService.get(csrfCookieName);
2288
2362
  var sec = btoa(window.screen.width.toString());
2289
- var realUserScore = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__["isCrawler"])() ? 0 : 100;
2363
+ var realUserScore = (0,_core_utils__WEBPACK_IMPORTED_MODULE_1__.isCrawler)() ? 0 : 100;
2290
2364
  if (customerId) {
2291
2365
  resolve(customerId);
2292
2366
  }
@@ -2295,18 +2369,18 @@ var TokenService = /** @class */ (function () {
2295
2369
  }
2296
2370
  else {
2297
2371
  setTimeout(function () {
2298
- if (___WEBPACK_IMPORTED_MODULE_0__["CookieService"].get(customerIdCookieName)) {
2372
+ if (___WEBPACK_IMPORTED_MODULE_0__.UserService.getCustomerId()) {
2299
2373
  return;
2300
2374
  }
2301
- ___WEBPACK_IMPORTED_MODULE_0__["ApiService"].createToken({
2375
+ ___WEBPACK_IMPORTED_MODULE_0__.ApiService.createToken({
2302
2376
  clientId: clientId,
2303
2377
  csrftoken: csrftoken,
2304
2378
  sec: sec,
2305
2379
  realUserScore: realUserScore,
2306
2380
  }).then(function (response) {
2307
2381
  if (!csrftoken) {
2308
- ___WEBPACK_IMPORTED_MODULE_0__["CookieService"].set(csrfCookieName, response.csrftoken, {
2309
- expires: 86400 * 7,
2382
+ ___WEBPACK_IMPORTED_MODULE_0__.CookieService.set(csrfCookieName, response.csrftoken, {
2383
+ expires: 86400 * 7, // 7 days
2310
2384
  });
2311
2385
  resolve(response.csrftoken);
2312
2386
  }
@@ -2316,7 +2390,7 @@ var TokenService = /** @class */ (function () {
2316
2390
  });
2317
2391
  };
2318
2392
  TokenService.deleteToken = function () {
2319
- ___WEBPACK_IMPORTED_MODULE_0__["CookieService"]["delete"](csrfCookieName);
2393
+ ___WEBPACK_IMPORTED_MODULE_0__.CookieService.delete(csrfCookieName);
2320
2394
  };
2321
2395
  return TokenService;
2322
2396
  }());
@@ -2329,14 +2403,18 @@ var TokenService = /** @class */ (function () {
2329
2403
  /*!**********************************************!*\
2330
2404
  !*** ./src/scripts/services/user.service.ts ***!
2331
2405
  \**********************************************/
2332
- /*! exports provided: UserService */
2333
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2406
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2334
2407
 
2335
- "use strict";
2336
2408
  __webpack_require__.r(__webpack_exports__);
2337
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserService", function() { return UserService; });
2409
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2410
+ /* harmony export */ UserService: () => (/* binding */ UserService)
2411
+ /* harmony export */ });
2338
2412
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ */ "./src/scripts/services/index.ts");
2339
2413
  /* harmony import */ var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/utils */ "./src/scripts/core/utils.ts");
2414
+ /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enums */ "./src/scripts/enums.ts");
2415
+ /* harmony import */ var _ga_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ga.service */ "./src/scripts/services/ga.service.ts");
2416
+
2417
+
2340
2418
 
2341
2419
 
2342
2420
  var customerIdCookieName = 'ds-custid';
@@ -2344,32 +2422,114 @@ var UserService = /** @class */ (function () {
2344
2422
  function UserService() {
2345
2423
  }
2346
2424
  UserService.getCustomerId = function () {
2347
- return ___WEBPACK_IMPORTED_MODULE_0__["CookieService"].get(customerIdCookieName);
2425
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie) {
2426
+ return ___WEBPACK_IMPORTED_MODULE_0__.CookieService.get(customerIdCookieName);
2427
+ }
2428
+ else {
2429
+ var customerId = this.customerId;
2430
+ /* let customerId: string | null = null
2431
+ try {
2432
+ customerId = sessionStorage.getItem(customerIdCookieName)
2433
+ } catch (e) {
2434
+ console.log('Session storage blocked.')
2435
+ }*/
2436
+ if (customerId === null) {
2437
+ customerId = ___WEBPACK_IMPORTED_MODULE_0__.CookieService.get(customerIdCookieName);
2438
+ }
2439
+ return customerId;
2440
+ }
2348
2441
  };
2349
2442
  UserService.setCustomerId = function (id, expires) {
2350
- ___WEBPACK_IMPORTED_MODULE_0__["CookieService"].set(customerIdCookieName, id, {
2351
- expires: expires ? expires : 86400 * 90,
2352
- });
2353
- ___WEBPACK_IMPORTED_MODULE_0__["TokenService"].deleteToken();
2443
+ this.saveCustomerId(id, expires);
2444
+ ___WEBPACK_IMPORTED_MODULE_0__.TokenService.deleteToken();
2445
+ };
2446
+ UserService.saveCustomerId = function (id, expires) {
2447
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie) {
2448
+ ___WEBPACK_IMPORTED_MODULE_0__.CookieService.set(customerIdCookieName, id, {
2449
+ expires: expires ? expires : 86400 * 90, // 90 days
2450
+ });
2451
+ }
2452
+ else {
2453
+ this.customerId = id;
2454
+ /* try {
2455
+ sessionStorage.setItem(customerIdCookieName, id)
2456
+ } catch (e) {
2457
+ console.log('Session storage blocked.')
2458
+ }*/
2459
+ }
2460
+ };
2461
+ UserService.deleteCustomerId = function () {
2462
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie) {
2463
+ ___WEBPACK_IMPORTED_MODULE_0__.CookieService.delete(customerIdCookieName);
2464
+ }
2465
+ else {
2466
+ this.customerId = null;
2467
+ /* try {
2468
+ sessionStorage.removeItem(customerIdCookieName)
2469
+ } catch (e) {
2470
+ console.log('Session storage blocked.')
2471
+ }
2472
+ if (CookieService.get(customerIdCookieName) !== null) {
2473
+ CookieService.delete(customerIdCookieName)
2474
+ }*/
2475
+ }
2354
2476
  };
2355
2477
  UserService.updateCookieLifetime = function (forgetCustomerAfterHours) {
2356
- if (UserService.getCustomerId()) {
2478
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie && UserService.getCustomerId()) {
2357
2479
  UserService.setCustomerId(UserService.getCustomerId(), 3600 * forgetCustomerAfterHours);
2358
2480
  }
2359
2481
  };
2482
+ UserService.switchToCookieModeAfterConsent = function () {
2483
+ this.custidStoreMode = _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie;
2484
+ var customerId = this.customerId;
2485
+ /* let customerId = null
2486
+ try {
2487
+ customerId = sessionStorage.getItem(customerIdCookieName)
2488
+ } catch (e) {
2489
+ console.log('Session storage blocked.')
2490
+ }*/
2491
+ if (customerId !== null) {
2492
+ UserService.saveCustomerId(customerId);
2493
+ /* try {
2494
+ sessionStorage.removeItem(customerIdCookieName)
2495
+ } catch (e) {
2496
+ console.log('Session storage blocked.')
2497
+ }*/
2498
+ }
2499
+ };
2500
+ UserService.switchToSessionModeAfterConsentDismiss = function () {
2501
+ var customerId = ___WEBPACK_IMPORTED_MODULE_0__.CookieService.get(customerIdCookieName);
2502
+ UserService.deleteCustomerId();
2503
+ this.custidStoreMode = _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.session;
2504
+ if (customerId !== null) {
2505
+ this.customerId = customerId;
2506
+ /* try {
2507
+ sessionStorage.setItem(customerIdCookieName, customerId)
2508
+ } catch (e) {
2509
+ console.log('Session storage blocked.');
2510
+ }*/
2511
+ }
2512
+ };
2360
2513
  UserService.touchUser = function (clientId, locale, csrfToken, context) {
2514
+ var _this = this;
2361
2515
  return new Promise(function (resolve) {
2362
2516
  var source = 'pwa-embed';
2363
- var customerId = ___WEBPACK_IMPORTED_MODULE_0__["CookieService"].get(customerIdCookieName);
2517
+ var customerId = _this.getCustomerId();
2364
2518
  if (!clientId) {
2365
2519
  throw new Error('Client ID is undefined');
2366
2520
  }
2367
2521
  if (location.pathname.indexOf('/g/') !== -1) {
2368
2522
  source = 'pwa-c2o';
2369
2523
  }
2524
+ if (_this.loadGaContext) {
2525
+ var ga = _ga_service__WEBPACK_IMPORTED_MODULE_3__.GaService.getGaValue();
2526
+ if (ga !== null) {
2527
+ context['_ga'] = ga;
2528
+ }
2529
+ }
2370
2530
  // remove one month later 03.03.2021
2371
2531
  if (!customerId && customerId !== 'null') {
2372
- ___WEBPACK_IMPORTED_MODULE_0__["ApiService"].createUser({
2532
+ ___WEBPACK_IMPORTED_MODULE_0__.ApiService.createUser({
2373
2533
  clientId: clientId,
2374
2534
  source: source,
2375
2535
  locale: locale,
@@ -2382,8 +2542,8 @@ var UserService = /** @class */ (function () {
2382
2542
  });
2383
2543
  }
2384
2544
  else {
2385
- var currentURL = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__["parseUrlParam"])(window.location.href, 'curl');
2386
- ___WEBPACK_IMPORTED_MODULE_0__["ApiService"].validateUser({
2545
+ var currentURL = (0,_core_utils__WEBPACK_IMPORTED_MODULE_1__.parseUrlParam)(window.location.href, 'curl');
2546
+ ___WEBPACK_IMPORTED_MODULE_0__.ApiService.validateUser({
2387
2547
  clientId: clientId,
2388
2548
  customerId: customerId,
2389
2549
  currentURL: currentURL,
@@ -2391,8 +2551,9 @@ var UserService = /** @class */ (function () {
2391
2551
  })
2392
2552
  .then(function () {
2393
2553
  resolve(customerId);
2394
- })["catch"](function () {
2395
- ___WEBPACK_IMPORTED_MODULE_0__["ApiService"].createUser({
2554
+ })
2555
+ .catch(function () {
2556
+ ___WEBPACK_IMPORTED_MODULE_0__.ApiService.createUser({
2396
2557
  clientId: clientId,
2397
2558
  source: source,
2398
2559
  locale: locale,
@@ -2407,10 +2568,17 @@ var UserService = /** @class */ (function () {
2407
2568
  });
2408
2569
  };
2409
2570
  UserService.deleteUser = function () {
2410
- ___WEBPACK_IMPORTED_MODULE_0__["CookieService"]["delete"](customerIdCookieName);
2411
- ___WEBPACK_IMPORTED_MODULE_0__["CookieService"]["delete"]('times-counter');
2412
- ___WEBPACK_IMPORTED_MODULE_0__["CookieService"]["delete"]('teaser-display');
2413
- };
2571
+ this.deleteCustomerId();
2572
+ /* try {
2573
+ sessionStorage.removeItem('ds-times-counter')
2574
+ sessionStorage.removeItem('ds-teaser-display')
2575
+ } catch (e) {
2576
+ console.log('Session storage blocked.')
2577
+ }*/
2578
+ };
2579
+ UserService.custidStoreMode = _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie;
2580
+ UserService.loadGaContext = false;
2581
+ UserService.customerId = null;
2414
2582
  return UserService;
2415
2583
  }());
2416
2584
 
@@ -2422,12 +2590,12 @@ var UserService = /** @class */ (function () {
2422
2590
  /*!*************************************************!*\
2423
2591
  !*** ./src/scripts/services/webchat.service.ts ***!
2424
2592
  \*************************************************/
2425
- /*! exports provided: WebchatService */
2426
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2593
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2427
2594
 
2428
- "use strict";
2429
2595
  __webpack_require__.r(__webpack_exports__);
2430
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WebchatService", function() { return WebchatService; });
2596
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2597
+ /* harmony export */ WebchatService: () => (/* binding */ WebchatService)
2598
+ /* harmony export */ });
2431
2599
  var WebchatService = /** @class */ (function () {
2432
2600
  function WebchatService(options) {
2433
2601
  this.targetWindow = options.targetWindow;
@@ -2460,12 +2628,12 @@ var WebchatService = /** @class */ (function () {
2460
2628
  /*!***********************************************************!*\
2461
2629
  !*** ./src/scripts/widgets/action-button-group.widget.ts ***!
2462
2630
  \***********************************************************/
2463
- /*! exports provided: ActionButtonGroupWidget */
2464
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2631
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2465
2632
 
2466
- "use strict";
2467
2633
  __webpack_require__.r(__webpack_exports__);
2468
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionButtonGroupWidget", function() { return ActionButtonGroupWidget; });
2634
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2635
+ /* harmony export */ ActionButtonGroupWidget: () => (/* binding */ ActionButtonGroupWidget)
2636
+ /* harmony export */ });
2469
2637
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
2470
2638
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
2471
2639
  /* harmony import */ var _action_button_widget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./action-button.widget */ "./src/scripts/widgets/action-button.widget.ts");
@@ -2474,10 +2642,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
2474
2642
  var extendStatics = function (d, b) {
2475
2643
  extendStatics = Object.setPrototypeOf ||
2476
2644
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2477
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2645
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2478
2646
  return extendStatics(d, b);
2479
2647
  };
2480
2648
  return function (d, b) {
2649
+ if (typeof b !== "function" && b !== null)
2650
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2481
2651
  extendStatics(d, b);
2482
2652
  function __() { this.constructor = d; }
2483
2653
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2495,20 +2665,23 @@ var ActionButtonGroupWidget = /** @class */ (function (_super) {
2495
2665
  return _this;
2496
2666
  }
2497
2667
  ActionButtonGroupWidget.prototype.getBaseCls = function () {
2498
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].actionButtonGroupCls;
2668
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.actionButtonGroupCls;
2499
2669
  };
2500
2670
  ActionButtonGroupWidget.prototype.getDisplayMode = function () {
2501
2671
  return 'flex';
2502
2672
  };
2503
2673
  ActionButtonGroupWidget.prototype.addButton = function (options) {
2504
- var button = new _action_button_widget__WEBPACK_IMPORTED_MODULE_2__["ActionButtonWidget"]({
2674
+ var button = new _action_button_widget__WEBPACK_IMPORTED_MODULE_2__.ActionButtonWidget({
2505
2675
  locale: options.locale,
2506
- actionButton: _models__WEBPACK_IMPORTED_MODULE_3__["ActionButton"].fromJson(options),
2676
+ actionButton: _models__WEBPACK_IMPORTED_MODULE_3__.ActionButton.fromJson(options),
2507
2677
  renderTo: this.getBoxElem(),
2508
2678
  app: options.app,
2509
2679
  });
2510
2680
  this.buttons.push(button);
2511
2681
  };
2682
+ ActionButtonGroupWidget.prototype.getButtons = function () {
2683
+ return this.buttons;
2684
+ };
2512
2685
  ActionButtonGroupWidget.prototype.clearButtons = function () {
2513
2686
  this.buttons.forEach(function (item) { return item.destroy(); });
2514
2687
  };
@@ -2530,7 +2703,7 @@ var ActionButtonGroupWidget = /** @class */ (function (_super) {
2530
2703
  _super.prototype.hideNode.call(this);
2531
2704
  };
2532
2705
  return ActionButtonGroupWidget;
2533
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
2706
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
2534
2707
 
2535
2708
 
2536
2709
 
@@ -2540,12 +2713,12 @@ var ActionButtonGroupWidget = /** @class */ (function (_super) {
2540
2713
  /*!*****************************************************!*\
2541
2714
  !*** ./src/scripts/widgets/action-button.widget.ts ***!
2542
2715
  \*****************************************************/
2543
- /*! exports provided: ActionButtonWidget */
2544
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2716
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2545
2717
 
2546
- "use strict";
2547
2718
  __webpack_require__.r(__webpack_exports__);
2548
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionButtonWidget", function() { return ActionButtonWidget; });
2719
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2720
+ /* harmony export */ ActionButtonWidget: () => (/* binding */ ActionButtonWidget)
2721
+ /* harmony export */ });
2549
2722
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
2550
2723
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
2551
2724
  /* harmony import */ var _models__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../models */ "./src/scripts/models/index.ts");
@@ -2553,10 +2726,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
2553
2726
  var extendStatics = function (d, b) {
2554
2727
  extendStatics = Object.setPrototypeOf ||
2555
2728
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2556
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2729
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2557
2730
  return extendStatics(d, b);
2558
2731
  };
2559
2732
  return function (d, b) {
2733
+ if (typeof b !== "function" && b !== null)
2734
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2560
2735
  extendStatics(d, b);
2561
2736
  function __() { this.constructor = d; }
2562
2737
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2569,16 +2744,12 @@ var ActionButtonWidget = /** @class */ (function (_super) {
2569
2744
  __extends(ActionButtonWidget, _super);
2570
2745
  function ActionButtonWidget(options) {
2571
2746
  var _this = _super.call(this, options) || this;
2572
- var title = _this.actionButton.getTitle(_this.locale);
2573
- if (!title) {
2574
- title = 'Button';
2575
- }
2576
- _this.setContent(title);
2747
+ _this.setLocale(_this.locale);
2577
2748
  return _this;
2578
2749
  }
2579
2750
  ActionButtonWidget.prototype.bindEvents = function () {
2580
2751
  var _this = this;
2581
- if (this.actionButton.getType() === _models__WEBPACK_IMPORTED_MODULE_2__["ActionButtonType"].quickreply) {
2752
+ if (this.actionButton.getType() === _models__WEBPACK_IMPORTED_MODULE_2__.ActionButtonType.quickreply) {
2582
2753
  this.getBoxElem().addEventListener('click', function () {
2583
2754
  _this.app.triggerElement({
2584
2755
  successor: _this.actionButton.getSuccessor(),
@@ -2586,7 +2757,7 @@ var ActionButtonWidget = /** @class */ (function (_super) {
2586
2757
  });
2587
2758
  });
2588
2759
  }
2589
- if (this.actionButton.getType() === _models__WEBPACK_IMPORTED_MODULE_2__["ActionButtonType"].callback) {
2760
+ if (this.actionButton.getType() === _models__WEBPACK_IMPORTED_MODULE_2__.ActionButtonType.callback) {
2590
2761
  this.getBoxElem().addEventListener('click', function () {
2591
2762
  var callback = _this.actionButton.getCallback();
2592
2763
  callback();
@@ -2598,10 +2769,18 @@ var ActionButtonWidget = /** @class */ (function (_super) {
2598
2769
  this.bindEvents();
2599
2770
  };
2600
2771
  ActionButtonWidget.prototype.getBaseCls = function () {
2601
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].actionButtonCls;
2772
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.actionButtonCls;
2773
+ };
2774
+ ActionButtonWidget.prototype.setLocale = function (locale) {
2775
+ this.locale = locale;
2776
+ var title = this.actionButton.getTitle(this.locale);
2777
+ if (!title) {
2778
+ title = 'Press me';
2779
+ }
2780
+ this.setContent(title);
2602
2781
  };
2603
2782
  return ActionButtonWidget;
2604
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
2783
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
2605
2784
 
2606
2785
 
2607
2786
 
@@ -2611,22 +2790,25 @@ var ActionButtonWidget = /** @class */ (function (_super) {
2611
2790
  /*!***************************************************!*\
2612
2791
  !*** ./src/scripts/widgets/chat-button.widget.ts ***!
2613
2792
  \***************************************************/
2614
- /*! exports provided: ChatButtonWidget */
2615
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2793
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2616
2794
 
2617
- "use strict";
2618
2795
  __webpack_require__.r(__webpack_exports__);
2619
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChatButtonWidget", function() { return ChatButtonWidget; });
2796
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2797
+ /* harmony export */ ChatButtonWidget: () => (/* binding */ ChatButtonWidget)
2798
+ /* harmony export */ });
2620
2799
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
2621
2800
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
2801
+ /* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../consts */ "./src/scripts/consts.ts");
2622
2802
  var __extends = (undefined && undefined.__extends) || (function () {
2623
2803
  var extendStatics = function (d, b) {
2624
2804
  extendStatics = Object.setPrototypeOf ||
2625
2805
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2626
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2806
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2627
2807
  return extendStatics(d, b);
2628
2808
  };
2629
2809
  return function (d, b) {
2810
+ if (typeof b !== "function" && b !== null)
2811
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2630
2812
  extendStatics(d, b);
2631
2813
  function __() { this.constructor = d; }
2632
2814
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2634,6 +2816,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
2634
2816
  })();
2635
2817
 
2636
2818
 
2819
+
2637
2820
  var ChatButtonWidget = /** @class */ (function (_super) {
2638
2821
  __extends(ChatButtonWidget, _super);
2639
2822
  function ChatButtonWidget(options) {
@@ -2648,11 +2831,15 @@ var ChatButtonWidget = /** @class */ (function (_super) {
2648
2831
  });
2649
2832
  };
2650
2833
  ChatButtonWidget.prototype.getBaseCls = function () {
2651
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].buttonCls;
2834
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonCls;
2652
2835
  };
2653
2836
  ChatButtonWidget.prototype.render = function () {
2654
2837
  var boxElem = this.getBoxElem();
2655
- boxElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].buttonLogoCls);
2838
+ var iconContainer = document.createElement('div');
2839
+ iconContainer.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonIconContainerCls);
2840
+ iconContainer.innerHTML = _consts__WEBPACK_IMPORTED_MODULE_2__.iconSvg;
2841
+ boxElem.appendChild(iconContainer);
2842
+ boxElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonLogoCls);
2656
2843
  this.bindEvents();
2657
2844
  _super.prototype.render.call(this);
2658
2845
  };
@@ -2666,11 +2853,11 @@ var ChatButtonWidget = /** @class */ (function (_super) {
2666
2853
  }
2667
2854
  this.isPressed = isPressed;
2668
2855
  if (isPressed) {
2669
- this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].buttonHiddenCls);
2856
+ this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonHiddenCls);
2670
2857
  }
2671
2858
  else {
2672
2859
  setTimeout(function () {
2673
- _this.getBoxElem().classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].buttonHiddenCls);
2860
+ _this.getBoxElem().classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonHiddenCls);
2674
2861
  }, timeout);
2675
2862
  }
2676
2863
  if (!suppressEvent) {
@@ -2682,14 +2869,14 @@ var ChatButtonWidget = /** @class */ (function (_super) {
2682
2869
  ChatButtonWidget.prototype.setContent = function (text) {
2683
2870
  _super.prototype.setContent.call(this, text);
2684
2871
  if (text) {
2685
- this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].buttonWithTextCls);
2872
+ this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonWithTextCls);
2686
2873
  }
2687
2874
  else {
2688
- this.getBoxElem().classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].buttonWithTextCls);
2875
+ this.getBoxElem().classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.buttonWithTextCls);
2689
2876
  }
2690
2877
  };
2691
2878
  return ChatButtonWidget;
2692
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
2879
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
2693
2880
 
2694
2881
 
2695
2882
 
@@ -2699,22 +2886,24 @@ var ChatButtonWidget = /** @class */ (function (_super) {
2699
2886
  /*!***********************************************!*\
2700
2887
  !*** ./src/scripts/widgets/chatbox.widget.ts ***!
2701
2888
  \***********************************************/
2702
- /*! exports provided: ChatboxWidget */
2703
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2889
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2704
2890
 
2705
- "use strict";
2706
2891
  __webpack_require__.r(__webpack_exports__);
2707
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChatboxWidget", function() { return ChatboxWidget; });
2892
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2893
+ /* harmony export */ ChatboxWidget: () => (/* binding */ ChatboxWidget)
2894
+ /* harmony export */ });
2708
2895
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
2709
2896
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
2710
2897
  var __extends = (undefined && undefined.__extends) || (function () {
2711
2898
  var extendStatics = function (d, b) {
2712
2899
  extendStatics = Object.setPrototypeOf ||
2713
2900
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2714
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2901
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2715
2902
  return extendStatics(d, b);
2716
2903
  };
2717
2904
  return function (d, b) {
2905
+ if (typeof b !== "function" && b !== null)
2906
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2718
2907
  extendStatics(d, b);
2719
2908
  function __() { this.constructor = d; }
2720
2909
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2730,11 +2919,11 @@ var ChatboxWidget = /** @class */ (function (_super) {
2730
2919
  _this.setState('loading');
2731
2920
  if (options.hasExtendedWidth) {
2732
2921
  _this.hasExtendedWidth = true;
2733
- _this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatHasExtendedWidth);
2922
+ _this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatHasExtendedWidth);
2734
2923
  }
2735
- _this.on('before:show', function () { return document.body.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatIsOpen); });
2924
+ _this.on('before:show', function () { return document.body.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatIsOpen); });
2736
2925
  _this.on('before:hide', function () {
2737
- return document.body.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatIsOpen);
2926
+ return document.body.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatIsOpen);
2738
2927
  });
2739
2928
  return _this;
2740
2929
  }
@@ -2757,34 +2946,34 @@ var ChatboxWidget = /** @class */ (function (_super) {
2757
2946
  }, 100);
2758
2947
  };
2759
2948
  ChatboxWidget.prototype.getBaseCls = function () {
2760
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatCls;
2949
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatCls;
2761
2950
  };
2762
2951
  ChatboxWidget.prototype.setState = function (state) {
2763
2952
  if (state === 'loading') {
2764
- this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatLoadingCls);
2953
+ this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatLoadingCls);
2765
2954
  }
2766
2955
  if (state === 'ready') {
2767
- this.getBoxElem().classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatLoadingCls);
2956
+ this.getBoxElem().classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatLoadingCls);
2768
2957
  }
2769
2958
  };
2770
2959
  ChatboxWidget.prototype.renderLoader = function () {
2771
2960
  var loaderAnimation = '<svg xmlns="http://www.w3.org/2000/svg" width="64px" height="64px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><g transform="rotate(0 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(30 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(60 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(90 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(120 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(150 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(180 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(210 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(240 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(270 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(300 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"></animate></rect></g><g transform="rotate(330 50 50)"><rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="#6a6a6a"><animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate></rect></g></svg>';
2772
2961
  var loader = document.createElement('div');
2773
- loader.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatLoaderCls);
2962
+ loader.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatLoaderCls);
2774
2963
  var loaderImage = document.createElement('div');
2775
- loaderImage.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatLoaderImageCls);
2964
+ loaderImage.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatLoaderImageCls);
2776
2965
  loaderImage.innerHTML = loaderAnimation;
2777
2966
  loader.appendChild(loaderImage);
2778
2967
  return loader;
2779
2968
  };
2780
2969
  ChatboxWidget.prototype.render = function (renderTo) {
2781
2970
  var boxElem = this.getBoxElem();
2782
- boxElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].chatCls);
2971
+ boxElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.chatCls);
2783
2972
  boxElem.appendChild(this.renderLoader());
2784
2973
  _super.prototype.render.call(this, renderTo);
2785
2974
  };
2786
2975
  return ChatboxWidget;
2787
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
2976
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
2788
2977
 
2789
2978
 
2790
2979
 
@@ -2794,22 +2983,24 @@ var ChatboxWidget = /** @class */ (function (_super) {
2794
2983
  /*!*******************************************************!*\
2795
2984
  !*** ./src/scripts/widgets/content-wrapper.widget.ts ***!
2796
2985
  \*******************************************************/
2797
- /*! exports provided: ContentWrapperWidget */
2798
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2986
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2799
2987
 
2800
- "use strict";
2801
2988
  __webpack_require__.r(__webpack_exports__);
2802
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentWrapperWidget", function() { return ContentWrapperWidget; });
2989
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2990
+ /* harmony export */ ContentWrapperWidget: () => (/* binding */ ContentWrapperWidget)
2991
+ /* harmony export */ });
2803
2992
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
2804
2993
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
2805
2994
  var __extends = (undefined && undefined.__extends) || (function () {
2806
2995
  var extendStatics = function (d, b) {
2807
2996
  extendStatics = Object.setPrototypeOf ||
2808
2997
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2809
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2998
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2810
2999
  return extendStatics(d, b);
2811
3000
  };
2812
3001
  return function (d, b) {
3002
+ if (typeof b !== "function" && b !== null)
3003
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2813
3004
  extendStatics(d, b);
2814
3005
  function __() { this.constructor = d; }
2815
3006
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2825,10 +3016,55 @@ var ContentWrapperWidget = /** @class */ (function (_super) {
2825
3016
  return _this;
2826
3017
  }
2827
3018
  ContentWrapperWidget.prototype.getBaseCls = function () {
2828
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].contentWrapperCls;
3019
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.contentWrapperCls;
2829
3020
  };
2830
3021
  return ContentWrapperWidget;
2831
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3022
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
3023
+
3024
+
3025
+
3026
+ /***/ }),
3027
+
3028
+ /***/ "./src/scripts/widgets/footer.widget.ts":
3029
+ /*!**********************************************!*\
3030
+ !*** ./src/scripts/widgets/footer.widget.ts ***!
3031
+ \**********************************************/
3032
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3033
+
3034
+ __webpack_require__.r(__webpack_exports__);
3035
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3036
+ /* harmony export */ FooterWidget: () => (/* binding */ FooterWidget)
3037
+ /* harmony export */ });
3038
+ /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
3039
+ var __extends = (undefined && undefined.__extends) || (function () {
3040
+ var extendStatics = function (d, b) {
3041
+ extendStatics = Object.setPrototypeOf ||
3042
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3043
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3044
+ return extendStatics(d, b);
3045
+ };
3046
+ return function (d, b) {
3047
+ if (typeof b !== "function" && b !== null)
3048
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3049
+ extendStatics(d, b);
3050
+ function __() { this.constructor = d; }
3051
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3052
+ };
3053
+ })();
3054
+
3055
+ var config = {
3056
+ baseCls: 'ds-footer',
3057
+ };
3058
+ var FooterWidget = /** @class */ (function (_super) {
3059
+ __extends(FooterWidget, _super);
3060
+ function FooterWidget(options) {
3061
+ return _super.call(this, options) || this;
3062
+ }
3063
+ FooterWidget.prototype.getBaseCls = function () {
3064
+ return config.baseCls;
3065
+ };
3066
+ return FooterWidget;
3067
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
2832
3068
 
2833
3069
 
2834
3070
 
@@ -2838,22 +3074,24 @@ var ContentWrapperWidget = /** @class */ (function (_super) {
2838
3074
  /*!******************************************************************!*\
2839
3075
  !*** ./src/scripts/widgets/header/header-close-button.widget.ts ***!
2840
3076
  \******************************************************************/
2841
- /*! exports provided: HeaderCloseButtonWidget */
2842
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3077
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2843
3078
 
2844
- "use strict";
2845
3079
  __webpack_require__.r(__webpack_exports__);
2846
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderCloseButtonWidget", function() { return HeaderCloseButtonWidget; });
3080
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3081
+ /* harmony export */ HeaderCloseButtonWidget: () => (/* binding */ HeaderCloseButtonWidget)
3082
+ /* harmony export */ });
2847
3083
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/base-widget */ "./src/scripts/core/base-widget.ts");
2848
3084
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config/config */ "./src/scripts/config/config.ts");
2849
3085
  var __extends = (undefined && undefined.__extends) || (function () {
2850
3086
  var extendStatics = function (d, b) {
2851
3087
  extendStatics = Object.setPrototypeOf ||
2852
3088
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2853
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3089
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2854
3090
  return extendStatics(d, b);
2855
3091
  };
2856
3092
  return function (d, b) {
3093
+ if (typeof b !== "function" && b !== null)
3094
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2857
3095
  extendStatics(d, b);
2858
3096
  function __() { this.constructor = d; }
2859
3097
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2864,7 +3102,9 @@ var __extends = (undefined && undefined.__extends) || (function () {
2864
3102
  var HeaderCloseButtonWidget = /** @class */ (function (_super) {
2865
3103
  __extends(HeaderCloseButtonWidget, _super);
2866
3104
  function HeaderCloseButtonWidget(options) {
2867
- return _super.call(this, options) || this;
3105
+ var _this = _super.call(this, options) || this;
3106
+ _this.leftCloseButton = options.leftCloseButton;
3107
+ return _this;
2868
3108
  }
2869
3109
  HeaderCloseButtonWidget.prototype.bindEvents = function () {
2870
3110
  var _this = this;
@@ -2877,10 +3117,14 @@ var HeaderCloseButtonWidget = /** @class */ (function (_super) {
2877
3117
  this.bindEvents();
2878
3118
  };
2879
3119
  HeaderCloseButtonWidget.prototype.getBaseCls = function () {
2880
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].headerCloseButtonCls;
3120
+ var cls = _config_config__WEBPACK_IMPORTED_MODULE_1__.config.headerCloseButtonCls;
3121
+ if (this.leftCloseButton) {
3122
+ cls += " ".concat(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.headerCloseButtonLeftCls);
3123
+ }
3124
+ return cls;
2881
3125
  };
2882
3126
  return HeaderCloseButtonWidget;
2883
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3127
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
2884
3128
 
2885
3129
 
2886
3130
 
@@ -2890,12 +3134,12 @@ var HeaderCloseButtonWidget = /** @class */ (function (_super) {
2890
3134
  /*!*****************************************************!*\
2891
3135
  !*** ./src/scripts/widgets/header/header.widget.ts ***!
2892
3136
  \*****************************************************/
2893
- /*! exports provided: HeaderWidget */
2894
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3137
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2895
3138
 
2896
- "use strict";
2897
3139
  __webpack_require__.r(__webpack_exports__);
2898
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderWidget", function() { return HeaderWidget; });
3140
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3141
+ /* harmony export */ HeaderWidget: () => (/* binding */ HeaderWidget)
3142
+ /* harmony export */ });
2899
3143
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/base-widget */ "./src/scripts/core/base-widget.ts");
2900
3144
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config/config */ "./src/scripts/config/config.ts");
2901
3145
  /* harmony import */ var _header_close_button_widget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./header-close-button.widget */ "./src/scripts/widgets/header/header-close-button.widget.ts");
@@ -2903,10 +3147,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
2903
3147
  var extendStatics = function (d, b) {
2904
3148
  extendStatics = Object.setPrototypeOf ||
2905
3149
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2906
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3150
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2907
3151
  return extendStatics(d, b);
2908
3152
  };
2909
3153
  return function (d, b) {
3154
+ if (typeof b !== "function" && b !== null)
3155
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2910
3156
  extendStatics(d, b);
2911
3157
  function __() { this.constructor = d; }
2912
3158
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2918,17 +3164,20 @@ var __extends = (undefined && undefined.__extends) || (function () {
2918
3164
  var HeaderWidget = /** @class */ (function (_super) {
2919
3165
  __extends(HeaderWidget, _super);
2920
3166
  function HeaderWidget(options) {
2921
- return _super.call(this, options) || this;
3167
+ var _this = _super.call(this, options) || this;
3168
+ _this.leftCloseButton = options.leftCloseButton;
3169
+ return _this;
2922
3170
  }
2923
3171
  HeaderWidget.prototype.getBaseCls = function () {
2924
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].headerCls;
3172
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.headerCls;
2925
3173
  };
2926
3174
  HeaderWidget.prototype.getDisplayMode = function () {
2927
3175
  return 'flex';
2928
3176
  };
2929
3177
  HeaderWidget.prototype.renderCloseButton = function () {
2930
- this.closeButton = new _header_close_button_widget__WEBPACK_IMPORTED_MODULE_2__["HeaderCloseButtonWidget"]({
3178
+ this.closeButton = new _header_close_button_widget__WEBPACK_IMPORTED_MODULE_2__.HeaderCloseButtonWidget({
2931
3179
  renderTo: this.getBoxElem(),
3180
+ leftCloseButton: this.leftCloseButton,
2932
3181
  });
2933
3182
  };
2934
3183
  HeaderWidget.prototype.getCloseButton = function () {
@@ -2939,7 +3188,7 @@ var HeaderWidget = /** @class */ (function (_super) {
2939
3188
  this.renderCloseButton();
2940
3189
  };
2941
3190
  return HeaderWidget;
2942
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3191
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
2943
3192
 
2944
3193
 
2945
3194
 
@@ -2949,21 +3198,23 @@ var HeaderWidget = /** @class */ (function (_super) {
2949
3198
  /*!**************************************************!*\
2950
3199
  !*** ./src/scripts/widgets/iframe-box.widget.ts ***!
2951
3200
  \**************************************************/
2952
- /*! exports provided: IframeBoxWidget */
2953
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3201
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2954
3202
 
2955
- "use strict";
2956
3203
  __webpack_require__.r(__webpack_exports__);
2957
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IframeBoxWidget", function() { return IframeBoxWidget; });
3204
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3205
+ /* harmony export */ IframeBoxWidget: () => (/* binding */ IframeBoxWidget)
3206
+ /* harmony export */ });
2958
3207
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
2959
3208
  var __extends = (undefined && undefined.__extends) || (function () {
2960
3209
  var extendStatics = function (d, b) {
2961
3210
  extendStatics = Object.setPrototypeOf ||
2962
3211
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2963
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3212
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2964
3213
  return extendStatics(d, b);
2965
3214
  };
2966
3215
  return function (d, b) {
3216
+ if (typeof b !== "function" && b !== null)
3217
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2967
3218
  extendStatics(d, b);
2968
3219
  function __() { this.constructor = d; }
2969
3220
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -2987,21 +3238,18 @@ var IframeBoxWidget = /** @class */ (function (_super) {
2987
3238
  IframeBoxWidget.prototype.getBaseCls = function () {
2988
3239
  return config.baseCls;
2989
3240
  };
2990
- // getBoxElem(): HTMLIFrameElement {
2991
- // return super.getBoxElem() as HTMLIFrameElement
2992
- // }
2993
3241
  IframeBoxWidget.prototype.isLoaded = function () {
2994
3242
  return this.loaded;
2995
3243
  };
2996
- // createNode(): HTMLIFrameElement {
2997
- // return document.createElement('iframe')
2998
- // }
2999
3244
  IframeBoxWidget.prototype.load = function (url) {
3000
3245
  if (!this.iframe) {
3001
3246
  this.iframe = document.createElement('iframe');
3002
3247
  this.iframe.src = url;
3003
3248
  this.iframe.scrolling = 'yes';
3004
3249
  this.iframe.frameBorder = '0';
3250
+ this.iframe.sandbox.add('allow-same-origin');
3251
+ this.iframe.sandbox.add('allow-scripts');
3252
+ this.iframe.sandbox.add('allow-forms');
3005
3253
  this.getBoxElem().appendChild(this.iframe);
3006
3254
  }
3007
3255
  else {
@@ -3032,10 +3280,10 @@ var IframeBoxWidget = /** @class */ (function (_super) {
3032
3280
  });
3033
3281
  };
3034
3282
  IframeBoxWidget.prototype.setWidth = function (width) {
3035
- this.getBoxElem().style.width = width + "px";
3283
+ this.getBoxElem().style.width = "".concat(width, "px");
3036
3284
  };
3037
3285
  return IframeBoxWidget;
3038
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3286
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
3039
3287
 
3040
3288
 
3041
3289
 
@@ -3045,22 +3293,24 @@ var IframeBoxWidget = /** @class */ (function (_super) {
3045
3293
  /*!**********************************************!*\
3046
3294
  !*** ./src/scripts/widgets/iframe.widget.ts ***!
3047
3295
  \**********************************************/
3048
- /*! exports provided: IframeWidget */
3049
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3296
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3050
3297
 
3051
- "use strict";
3052
3298
  __webpack_require__.r(__webpack_exports__);
3053
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IframeWidget", function() { return IframeWidget; });
3299
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3300
+ /* harmony export */ IframeWidget: () => (/* binding */ IframeWidget)
3301
+ /* harmony export */ });
3054
3302
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
3055
3303
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
3056
3304
  var __extends = (undefined && undefined.__extends) || (function () {
3057
3305
  var extendStatics = function (d, b) {
3058
3306
  extendStatics = Object.setPrototypeOf ||
3059
3307
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3060
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3308
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3061
3309
  return extendStatics(d, b);
3062
3310
  };
3063
3311
  return function (d, b) {
3312
+ if (typeof b !== "function" && b !== null)
3313
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3064
3314
  extendStatics(d, b);
3065
3315
  function __() { this.constructor = d; }
3066
3316
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3078,10 +3328,11 @@ var IframeWidget = /** @class */ (function (_super) {
3078
3328
  suppress: false,
3079
3329
  };
3080
3330
  _this.initialElement = options.initialElement;
3331
+ _this.channel = options.channel || 'pwa-embed';
3081
3332
  return _this;
3082
3333
  }
3083
3334
  IframeWidget.prototype.getBaseCls = function () {
3084
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].iframeCls;
3335
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.iframeCls;
3085
3336
  };
3086
3337
  IframeWidget.prototype.getBoxElem = function () {
3087
3338
  return _super.prototype.getBoxElem.call(this);
@@ -3099,18 +3350,19 @@ var IframeWidget = /** @class */ (function (_super) {
3099
3350
  return Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
3100
3351
  };
3101
3352
  IframeWidget.prototype.buildUrl = function () {
3102
- var iframeUrl = this.host + "?clid=" + this.id + "&cid=" + this.customerId + "&source=pwa-embed";
3353
+ var iframeUrl = "".concat(this.host, "?clid=").concat(this.id, "&cid=").concat(this.customerId);
3103
3354
  if (this.initialElement.suppress) {
3104
3355
  iframeUrl += '&init=suppress';
3105
3356
  }
3106
3357
  else if (this.initialElement.successor) {
3107
- iframeUrl += "&init=" + this.initialElement.successor;
3358
+ iframeUrl += "&init=".concat(this.initialElement.successor);
3108
3359
  }
3109
3360
  if (this.locale) {
3110
- iframeUrl += "&lg=" + this.locale;
3361
+ iframeUrl += "&lg=".concat(this.locale);
3111
3362
  }
3112
- iframeUrl += "&viewport=" + this.getViewportWidth();
3113
- iframeUrl += "&curl=" + (location.origin + location.pathname);
3363
+ iframeUrl += "&source=".concat(this.channel);
3364
+ iframeUrl += "&viewport=".concat(this.getViewportWidth());
3365
+ iframeUrl += "&curl=".concat(location.origin + location.pathname);
3114
3366
  return iframeUrl;
3115
3367
  };
3116
3368
  IframeWidget.prototype.load = function (customerId) {
@@ -3132,7 +3384,7 @@ var IframeWidget = /** @class */ (function (_super) {
3132
3384
  this.initialElement = initialElement;
3133
3385
  };
3134
3386
  return IframeWidget;
3135
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3387
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
3136
3388
 
3137
3389
 
3138
3390
 
@@ -3142,49 +3394,39 @@ var IframeWidget = /** @class */ (function (_super) {
3142
3394
  /*!**************************************!*\
3143
3395
  !*** ./src/scripts/widgets/index.ts ***!
3144
3396
  \**************************************/
3145
- /*! exports provided: WrapperWidget, ChatboxWidget, ChatButtonWidget, IframeWidget, TeaserWidget, UnreadWidget, ContentWrapperWidget, ActionButtonWidget, ActionButtonGroupWidget, WhatsappButtonWidget, WhatsappWindowWidget, IframeBoxWidget, HeaderWidget */
3146
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3397
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3147
3398
 
3148
- "use strict";
3149
3399
  __webpack_require__.r(__webpack_exports__);
3400
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3401
+ /* harmony export */ ActionButtonGroupWidget: () => (/* reexport safe */ _action_button_group_widget__WEBPACK_IMPORTED_MODULE_8__.ActionButtonGroupWidget),
3402
+ /* harmony export */ ActionButtonWidget: () => (/* reexport safe */ _action_button_widget__WEBPACK_IMPORTED_MODULE_7__.ActionButtonWidget),
3403
+ /* harmony export */ ChatButtonWidget: () => (/* reexport safe */ _chat_button_widget__WEBPACK_IMPORTED_MODULE_2__.ChatButtonWidget),
3404
+ /* harmony export */ ChatboxWidget: () => (/* reexport safe */ _chatbox_widget__WEBPACK_IMPORTED_MODULE_1__.ChatboxWidget),
3405
+ /* harmony export */ ContentWrapperWidget: () => (/* reexport safe */ _content_wrapper_widget__WEBPACK_IMPORTED_MODULE_6__.ContentWrapperWidget),
3406
+ /* harmony export */ FooterWidget: () => (/* reexport safe */ _footer_widget__WEBPACK_IMPORTED_MODULE_13__.FooterWidget),
3407
+ /* harmony export */ HeaderWidget: () => (/* reexport safe */ _header_header_widget__WEBPACK_IMPORTED_MODULE_12__.HeaderWidget),
3408
+ /* harmony export */ IframeBoxWidget: () => (/* reexport safe */ _iframe_box_widget__WEBPACK_IMPORTED_MODULE_11__.IframeBoxWidget),
3409
+ /* harmony export */ IframeWidget: () => (/* reexport safe */ _iframe_widget__WEBPACK_IMPORTED_MODULE_3__.IframeWidget),
3410
+ /* harmony export */ TeaserWidget: () => (/* reexport safe */ _teaser_widget__WEBPACK_IMPORTED_MODULE_4__.TeaserWidget),
3411
+ /* harmony export */ UnreadWidget: () => (/* reexport safe */ _unread_widget__WEBPACK_IMPORTED_MODULE_5__.UnreadWidget),
3412
+ /* harmony export */ WhatsappButtonWidget: () => (/* reexport safe */ _whatsapp_button_widget__WEBPACK_IMPORTED_MODULE_9__.WhatsappButtonWidget),
3413
+ /* harmony export */ WhatsappWindowWidget: () => (/* reexport safe */ _whatsapp_window_widget__WEBPACK_IMPORTED_MODULE_10__.WhatsappWindowWidget),
3414
+ /* harmony export */ WrapperWidget: () => (/* reexport safe */ _wrapper_widget__WEBPACK_IMPORTED_MODULE_0__.WrapperWidget)
3415
+ /* harmony export */ });
3150
3416
  /* harmony import */ var _wrapper_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wrapper.widget */ "./src/scripts/widgets/wrapper.widget.ts");
3151
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WrapperWidget", function() { return _wrapper_widget__WEBPACK_IMPORTED_MODULE_0__["WrapperWidget"]; });
3152
-
3153
3417
  /* harmony import */ var _chatbox_widget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chatbox.widget */ "./src/scripts/widgets/chatbox.widget.ts");
3154
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChatboxWidget", function() { return _chatbox_widget__WEBPACK_IMPORTED_MODULE_1__["ChatboxWidget"]; });
3155
-
3156
3418
  /* harmony import */ var _chat_button_widget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chat-button.widget */ "./src/scripts/widgets/chat-button.widget.ts");
3157
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ChatButtonWidget", function() { return _chat_button_widget__WEBPACK_IMPORTED_MODULE_2__["ChatButtonWidget"]; });
3158
-
3159
3419
  /* harmony import */ var _iframe_widget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./iframe.widget */ "./src/scripts/widgets/iframe.widget.ts");
3160
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IframeWidget", function() { return _iframe_widget__WEBPACK_IMPORTED_MODULE_3__["IframeWidget"]; });
3161
-
3162
3420
  /* harmony import */ var _teaser_widget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./teaser.widget */ "./src/scripts/widgets/teaser.widget.ts");
3163
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TeaserWidget", function() { return _teaser_widget__WEBPACK_IMPORTED_MODULE_4__["TeaserWidget"]; });
3164
-
3165
3421
  /* harmony import */ var _unread_widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./unread.widget */ "./src/scripts/widgets/unread.widget.ts");
3166
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnreadWidget", function() { return _unread_widget__WEBPACK_IMPORTED_MODULE_5__["UnreadWidget"]; });
3167
-
3168
3422
  /* harmony import */ var _content_wrapper_widget__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./content-wrapper.widget */ "./src/scripts/widgets/content-wrapper.widget.ts");
3169
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ContentWrapperWidget", function() { return _content_wrapper_widget__WEBPACK_IMPORTED_MODULE_6__["ContentWrapperWidget"]; });
3170
-
3171
3423
  /* harmony import */ var _action_button_widget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./action-button.widget */ "./src/scripts/widgets/action-button.widget.ts");
3172
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionButtonWidget", function() { return _action_button_widget__WEBPACK_IMPORTED_MODULE_7__["ActionButtonWidget"]; });
3173
-
3174
3424
  /* harmony import */ var _action_button_group_widget__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./action-button-group.widget */ "./src/scripts/widgets/action-button-group.widget.ts");
3175
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionButtonGroupWidget", function() { return _action_button_group_widget__WEBPACK_IMPORTED_MODULE_8__["ActionButtonGroupWidget"]; });
3176
-
3177
3425
  /* harmony import */ var _whatsapp_button_widget__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./whatsapp-button.widget */ "./src/scripts/widgets/whatsapp-button.widget.ts");
3178
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WhatsappButtonWidget", function() { return _whatsapp_button_widget__WEBPACK_IMPORTED_MODULE_9__["WhatsappButtonWidget"]; });
3179
-
3180
3426
  /* harmony import */ var _whatsapp_window_widget__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./whatsapp-window.widget */ "./src/scripts/widgets/whatsapp-window.widget.ts");
3181
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WhatsappWindowWidget", function() { return _whatsapp_window_widget__WEBPACK_IMPORTED_MODULE_10__["WhatsappWindowWidget"]; });
3182
-
3183
3427
  /* harmony import */ var _iframe_box_widget__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./iframe-box.widget */ "./src/scripts/widgets/iframe-box.widget.ts");
3184
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IframeBoxWidget", function() { return _iframe_box_widget__WEBPACK_IMPORTED_MODULE_11__["IframeBoxWidget"]; });
3185
-
3186
3428
  /* harmony import */ var _header_header_widget__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./header/header.widget */ "./src/scripts/widgets/header/header.widget.ts");
3187
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderWidget", function() { return _header_header_widget__WEBPACK_IMPORTED_MODULE_12__["HeaderWidget"]; });
3429
+ /* harmony import */ var _footer_widget__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./footer.widget */ "./src/scripts/widgets/footer.widget.ts");
3188
3430
 
3189
3431
 
3190
3432
 
@@ -3207,23 +3449,25 @@ __webpack_require__.r(__webpack_exports__);
3207
3449
  /*!**********************************************!*\
3208
3450
  !*** ./src/scripts/widgets/teaser.widget.ts ***!
3209
3451
  \**********************************************/
3210
- /*! exports provided: TeaserWidget */
3211
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3452
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3212
3453
 
3213
- "use strict";
3214
3454
  __webpack_require__.r(__webpack_exports__);
3215
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TeaserWidget", function() { return TeaserWidget; });
3455
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3456
+ /* harmony export */ TeaserWidget: () => (/* binding */ TeaserWidget)
3457
+ /* harmony export */ });
3216
3458
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
3217
3459
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
3218
- /* harmony import */ var _services_cookie_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/cookie.service */ "./src/scripts/services/cookie.service.ts");
3460
+ /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enums */ "./src/scripts/enums.ts");
3219
3461
  var __extends = (undefined && undefined.__extends) || (function () {
3220
3462
  var extendStatics = function (d, b) {
3221
3463
  extendStatics = Object.setPrototypeOf ||
3222
3464
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3223
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3465
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3224
3466
  return extendStatics(d, b);
3225
3467
  };
3226
3468
  return function (d, b) {
3469
+ if (typeof b !== "function" && b !== null)
3470
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3227
3471
  extendStatics(d, b);
3228
3472
  function __() { this.constructor = d; }
3229
3473
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3235,14 +3479,16 @@ var __extends = (undefined && undefined.__extends) || (function () {
3235
3479
  var TeaserWidget = /** @class */ (function (_super) {
3236
3480
  __extends(TeaserWidget, _super);
3237
3481
  function TeaserWidget(options) {
3238
- return _super.call(this, options) || this;
3482
+ var _this = _super.call(this, options) || this;
3483
+ _this.custidStoreMode = options.custidStoreMode;
3484
+ return _this;
3239
3485
  }
3240
3486
  TeaserWidget.prototype.getBaseCls = function () {
3241
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].teaserCls;
3487
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.teaserCls;
3242
3488
  };
3243
3489
  TeaserWidget.prototype.render = function () {
3244
3490
  this.crossElem = this.createNode();
3245
- this.crossElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__["config"].teaserCrossCls);
3491
+ this.crossElem.classList.add(_config_config__WEBPACK_IMPORTED_MODULE_1__.config.teaserCrossCls);
3246
3492
  this.bindEvents();
3247
3493
  this.getBoxElem().appendChild(this.crossElem);
3248
3494
  _super.prototype.render.call(this);
@@ -3252,14 +3498,30 @@ var TeaserWidget = /** @class */ (function (_super) {
3252
3498
  return true;
3253
3499
  }
3254
3500
  var timesCounter = 0;
3255
- if (_services_cookie_service__WEBPACK_IMPORTED_MODULE_2__["CookieService"].get('times-counter') !== null) {
3256
- timesCounter = parseInt(_services_cookie_service__WEBPACK_IMPORTED_MODULE_2__["CookieService"].get('times-counter'), 10);
3501
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie) {
3502
+ var storedTimesCounter = null;
3503
+ try {
3504
+ storedTimesCounter = sessionStorage.getItem('ds-times-counter');
3505
+ }
3506
+ catch (e) {
3507
+ console.log('Session storage blocked.');
3508
+ }
3509
+ if (storedTimesCounter !== null) {
3510
+ timesCounter = parseInt(storedTimesCounter, 10);
3511
+ }
3257
3512
  }
3258
3513
  timesCounter += 1;
3259
3514
  if (timesCounter > this.hideTeaserAfterTimes) {
3260
3515
  return false;
3261
3516
  }
3262
- _services_cookie_service__WEBPACK_IMPORTED_MODULE_2__["CookieService"].set('times-counter', timesCounter);
3517
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie) {
3518
+ try {
3519
+ sessionStorage.setItem('ds-times-counter', timesCounter.toString());
3520
+ }
3521
+ catch (e) {
3522
+ console.log('Session storage blocked.');
3523
+ }
3524
+ }
3263
3525
  return true;
3264
3526
  };
3265
3527
  TeaserWidget.prototype.show = function (options) {
@@ -3269,13 +3531,30 @@ var TeaserWidget = /** @class */ (function (_super) {
3269
3531
  return;
3270
3532
  }
3271
3533
  if (!this.checkTimes()) {
3534
+ this.hideNode();
3272
3535
  return;
3273
3536
  }
3274
- if (this.showTeaserOnce && _services_cookie_service__WEBPACK_IMPORTED_MODULE_2__["CookieService"].get('teaser-display') !== null) {
3537
+ var teaserDisplay = null;
3538
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie) {
3539
+ try {
3540
+ teaserDisplay = sessionStorage.getItem('ds-teaser-display');
3541
+ }
3542
+ catch (e) {
3543
+ console.log('Session storage blocked.');
3544
+ }
3545
+ }
3546
+ if (this.showTeaserOnce && teaserDisplay !== null) {
3275
3547
  return;
3276
3548
  }
3277
3549
  _super.prototype.show.call(this);
3278
- _services_cookie_service__WEBPACK_IMPORTED_MODULE_2__["CookieService"].set('teaser-display', 'true');
3550
+ if (this.custidStoreMode === _enums__WEBPACK_IMPORTED_MODULE_2__.CustidStoreMode.cookie) {
3551
+ try {
3552
+ sessionStorage.setItem('ds-teaser-display', 'true');
3553
+ }
3554
+ catch (e) {
3555
+ console.log('Session storage blocked.');
3556
+ }
3557
+ }
3279
3558
  };
3280
3559
  TeaserWidget.prototype.bindEvents = function () {
3281
3560
  var _this = this;
@@ -3286,7 +3565,7 @@ var TeaserWidget = /** @class */ (function (_super) {
3286
3565
  this.getBoxElem().addEventListener('click', function () { return _this.fire('click'); });
3287
3566
  };
3288
3567
  return TeaserWidget;
3289
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3568
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
3290
3569
 
3291
3570
 
3292
3571
 
@@ -3296,22 +3575,24 @@ var TeaserWidget = /** @class */ (function (_super) {
3296
3575
  /*!**********************************************!*\
3297
3576
  !*** ./src/scripts/widgets/unread.widget.ts ***!
3298
3577
  \**********************************************/
3299
- /*! exports provided: UnreadWidget */
3300
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3578
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3301
3579
 
3302
- "use strict";
3303
3580
  __webpack_require__.r(__webpack_exports__);
3304
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnreadWidget", function() { return UnreadWidget; });
3581
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3582
+ /* harmony export */ UnreadWidget: () => (/* binding */ UnreadWidget)
3583
+ /* harmony export */ });
3305
3584
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
3306
3585
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
3307
3586
  var __extends = (undefined && undefined.__extends) || (function () {
3308
3587
  var extendStatics = function (d, b) {
3309
3588
  extendStatics = Object.setPrototypeOf ||
3310
3589
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3311
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3590
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3312
3591
  return extendStatics(d, b);
3313
3592
  };
3314
3593
  return function (d, b) {
3594
+ if (typeof b !== "function" && b !== null)
3595
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3315
3596
  extendStatics(d, b);
3316
3597
  function __() { this.constructor = d; }
3317
3598
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3330,7 +3611,7 @@ var UnreadWidget = /** @class */ (function (_super) {
3330
3611
  return _this;
3331
3612
  }
3332
3613
  UnreadWidget.prototype.getBaseCls = function () {
3333
- return _config_config__WEBPACK_IMPORTED_MODULE_1__["config"].unreadCls;
3614
+ return _config_config__WEBPACK_IMPORTED_MODULE_1__.config.unreadCls;
3334
3615
  };
3335
3616
  UnreadWidget.prototype.setCounter = function (amount) {
3336
3617
  if (amount < 1) {
@@ -3364,7 +3645,7 @@ var UnreadWidget = /** @class */ (function (_super) {
3364
3645
  }
3365
3646
  };
3366
3647
  return UnreadWidget;
3367
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3648
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
3368
3649
 
3369
3650
 
3370
3651
 
@@ -3374,21 +3655,23 @@ var UnreadWidget = /** @class */ (function (_super) {
3374
3655
  /*!*******************************************************!*\
3375
3656
  !*** ./src/scripts/widgets/whatsapp-button.widget.ts ***!
3376
3657
  \*******************************************************/
3377
- /*! exports provided: WhatsappButtonWidget */
3378
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3658
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3379
3659
 
3380
- "use strict";
3381
3660
  __webpack_require__.r(__webpack_exports__);
3382
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WhatsappButtonWidget", function() { return WhatsappButtonWidget; });
3661
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3662
+ /* harmony export */ WhatsappButtonWidget: () => (/* binding */ WhatsappButtonWidget)
3663
+ /* harmony export */ });
3383
3664
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
3384
3665
  var __extends = (undefined && undefined.__extends) || (function () {
3385
3666
  var extendStatics = function (d, b) {
3386
3667
  extendStatics = Object.setPrototypeOf ||
3387
3668
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3388
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3669
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3389
3670
  return extendStatics(d, b);
3390
3671
  };
3391
3672
  return function (d, b) {
3673
+ if (typeof b !== "function" && b !== null)
3674
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3392
3675
  extendStatics(d, b);
3393
3676
  function __() { this.constructor = d; }
3394
3677
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3398,12 +3681,16 @@ var __extends = (undefined && undefined.__extends) || (function () {
3398
3681
  var config = {
3399
3682
  baseCls: 'ds-whatsapp-button',
3400
3683
  activeCls: 'ds-whatsapp-button--active',
3684
+ bwCls: 'ds-whatsapp-button--bw',
3685
+ slideCls: 'ds-whatsapp-button--slide',
3401
3686
  };
3402
3687
  var WhatsappButtonWidget = /** @class */ (function (_super) {
3403
3688
  __extends(WhatsappButtonWidget, _super);
3404
3689
  function WhatsappButtonWidget(options) {
3405
3690
  var _this = _super.call(this, options) || this;
3406
3691
  _this.isPressed = false;
3692
+ _this.blackWhiteStyle = false;
3693
+ _this.slideWaButton = false;
3407
3694
  return _this;
3408
3695
  }
3409
3696
  WhatsappButtonWidget.prototype.bindEvents = function () {
@@ -3413,6 +3700,14 @@ var WhatsappButtonWidget = /** @class */ (function (_super) {
3413
3700
  });
3414
3701
  };
3415
3702
  WhatsappButtonWidget.prototype.render = function () {
3703
+ if (this.blackWhiteStyle) {
3704
+ var boxElem = this.getBoxElem();
3705
+ boxElem.classList.add(config.bwCls);
3706
+ }
3707
+ if (this.slideWaButton) {
3708
+ var boxElem = this.getBoxElem();
3709
+ boxElem.classList.add(config.slideCls);
3710
+ }
3416
3711
  _super.prototype.render.call(this);
3417
3712
  this.bindEvents();
3418
3713
  };
@@ -3439,7 +3734,7 @@ var WhatsappButtonWidget = /** @class */ (function (_super) {
3439
3734
  return config.baseCls;
3440
3735
  };
3441
3736
  return WhatsappButtonWidget;
3442
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3737
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
3443
3738
 
3444
3739
 
3445
3740
 
@@ -3449,22 +3744,24 @@ var WhatsappButtonWidget = /** @class */ (function (_super) {
3449
3744
  /*!*******************************************************!*\
3450
3745
  !*** ./src/scripts/widgets/whatsapp-window.widget.ts ***!
3451
3746
  \*******************************************************/
3452
- /*! exports provided: WhatsappWindowWidget */
3453
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3747
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3454
3748
 
3455
- "use strict";
3456
3749
  __webpack_require__.r(__webpack_exports__);
3457
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WhatsappWindowWidget", function() { return WhatsappWindowWidget; });
3750
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3751
+ /* harmony export */ WhatsappWindowWidget: () => (/* binding */ WhatsappWindowWidget)
3752
+ /* harmony export */ });
3458
3753
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
3459
3754
  /* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services */ "./src/scripts/services/index.ts");
3460
3755
  var __extends = (undefined && undefined.__extends) || (function () {
3461
3756
  var extendStatics = function (d, b) {
3462
3757
  extendStatics = Object.setPrototypeOf ||
3463
3758
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3464
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3759
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3465
3760
  return extendStatics(d, b);
3466
3761
  };
3467
3762
  return function (d, b) {
3763
+ if (typeof b !== "function" && b !== null)
3764
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3468
3765
  extendStatics(d, b);
3469
3766
  function __() { this.constructor = d; }
3470
3767
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3482,7 +3779,7 @@ var config = {
3482
3779
  textLinkMobileCls: 'ds-whatsapp-window__text-link-mobile',
3483
3780
  qr: 'ds-whatsapp-window__qr',
3484
3781
  linkCls: 'ds-whatsapp-window__link',
3485
- crossCls: 'ds-whatsapp-window__cross',
3782
+ linkTestCls: 'ds-whatsapp-window__link-text',
3486
3783
  };
3487
3784
  var texts = {
3488
3785
  en: {
@@ -3493,9 +3790,9 @@ var texts = {
3493
3790
  link: 'Open WhatsApp',
3494
3791
  },
3495
3792
  de: {
3496
- title: 'Benutze WhatsApp',
3497
- description: 'Scanne den QR Code mit Deinem Smartphone',
3498
- linkText: 'oder klicke diesen Link an',
3793
+ title: 'WhatsApp',
3794
+ description: 'QR-Code mit dem Smartphone scannen',
3795
+ linkText: 'auf dem Computer auch mit diesem Link',
3499
3796
  linkMobileText: 'Klicke den Button um WhatsApp zu öffnen',
3500
3797
  link: 'WhatsApp öffnen',
3501
3798
  },
@@ -3526,7 +3823,7 @@ var WhatsappWindowWidget = /** @class */ (function (_super) {
3526
3823
  var _this = this;
3527
3824
  if (!this.isLoaded) {
3528
3825
  this.isLoaded = true;
3529
- _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].getWhatsappLink(this.clientId, _services__WEBPACK_IMPORTED_MODULE_1__["UserService"].getCustomerId()).then(function (response) {
3826
+ _services__WEBPACK_IMPORTED_MODULE_1__.ApiService.getWhatsappLink(this.clientId, _services__WEBPACK_IMPORTED_MODULE_1__.UserService.getCustomerId()).then(function (response) {
3530
3827
  _this.waLink = response.waLink;
3531
3828
  _this.waSvg = response.waSvg;
3532
3829
  _this.renderContent();
@@ -3539,33 +3836,25 @@ var WhatsappWindowWidget = /** @class */ (function (_super) {
3539
3836
  }
3540
3837
  };
3541
3838
  WhatsappWindowWidget.prototype.renderContent = function () {
3542
- var title = "<div class=\"" + config.titleCls + "\">" + getText(this.locale, 'title') + "</div>";
3543
- var description = "<div class=\"" + config.textCls + "\">" + getText(this.locale, 'description') + "</div>";
3544
- var qr = "<div class=\"" + config.qr + "\">" + this.waSvg + "</div>";
3545
- var linkText = "<div class=\"" + config.textLinkCls + "\">" + getText(this.locale, 'linkText') + "</div>";
3546
- var linkMobileText = "<div class=\"" + config.textLinkMobileCls + "\">" + getText(this.locale, 'linkMobileText') + "</div>";
3547
- var link = "<a class=\"" + config.linkCls + "\" href=\"" + this.waLink + "\" target=\"_blank\">" + getText(this.locale, 'link') + "</a>";
3839
+ var title = "<div class=\"".concat(config.titleCls, "\">").concat(getText(this.locale, 'title'), "</div>");
3840
+ var description = "<div class=\"".concat(config.textCls, "\">").concat(getText(this.locale, 'description'), "</div>");
3841
+ var qr = "<div class=\"".concat(config.qr, "\">").concat(this.waSvg, "</div>");
3842
+ var linkText = "<div class=\"".concat(config.textLinkCls, "\">").concat(getText(this.locale, 'linkText'), "</div>");
3843
+ var linkMobileText = "<div class=\"".concat(config.textLinkMobileCls, "\">").concat(getText(this.locale, 'linkMobileText'), "</div>");
3844
+ var link = "<a class=\"".concat(config.linkCls, "\" href=\"").concat(this.waLink, "\" target=\"_blank\">\n <span class=\"").concat(config.linkTestCls, "\">").concat(getText(this.locale, 'link'), "</span>\n </a>");
3548
3845
  this.setContent(title + description + qr + linkText + linkMobileText + link);
3549
3846
  };
3550
3847
  WhatsappWindowWidget.prototype.getBaseCls = function () {
3551
3848
  return config.baseCls;
3552
3849
  };
3553
- WhatsappWindowWidget.prototype.render = function () {
3554
- this.crossElem = this.createNode();
3555
- this.crossElem.classList.add(config.crossCls);
3556
- this.bindEvents();
3557
- this.getBoxElem().appendChild(this.crossElem);
3558
- _super.prototype.render.call(this);
3559
- };
3560
- WhatsappWindowWidget.prototype.bindEvents = function () {
3561
- var _this = this;
3562
- this.crossElem.addEventListener('click', function (event) {
3563
- event.stopPropagation();
3564
- _this.hide();
3565
- });
3850
+ WhatsappWindowWidget.prototype.setLocale = function (locale) {
3851
+ this.locale = locale;
3852
+ if (this.isLoaded) {
3853
+ this.renderContent();
3854
+ }
3566
3855
  };
3567
3856
  return WhatsappWindowWidget;
3568
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__["BaseWidget"]));
3857
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_0__.BaseWidget));
3569
3858
 
3570
3859
 
3571
3860
 
@@ -3575,12 +3864,12 @@ var WhatsappWindowWidget = /** @class */ (function (_super) {
3575
3864
  /*!***********************************************!*\
3576
3865
  !*** ./src/scripts/widgets/wrapper.widget.ts ***!
3577
3866
  \***********************************************/
3578
- /*! exports provided: WrapperWidget */
3579
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3867
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3580
3868
 
3581
- "use strict";
3582
3869
  __webpack_require__.r(__webpack_exports__);
3583
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WrapperWidget", function() { return WrapperWidget; });
3870
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3871
+ /* harmony export */ WrapperWidget: () => (/* binding */ WrapperWidget)
3872
+ /* harmony export */ });
3584
3873
  /* harmony import */ var _core_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/app */ "./src/scripts/core/app.ts");
3585
3874
  /* harmony import */ var _core_base_widget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/base-widget */ "./src/scripts/core/base-widget.ts");
3586
3875
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config/config */ "./src/scripts/config/config.ts");
@@ -3588,10 +3877,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
3588
3877
  var extendStatics = function (d, b) {
3589
3878
  extendStatics = Object.setPrototypeOf ||
3590
3879
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3591
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3880
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3592
3881
  return extendStatics(d, b);
3593
3882
  };
3594
3883
  return function (d, b) {
3884
+ if (typeof b !== "function" && b !== null)
3885
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3595
3886
  extendStatics(d, b);
3596
3887
  function __() { this.constructor = d; }
3597
3888
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3608,33 +3899,33 @@ var WrapperWidget = /** @class */ (function (_super) {
3608
3899
  return _this;
3609
3900
  }
3610
3901
  WrapperWidget.prototype.getBaseCls = function () {
3611
- return _config_config__WEBPACK_IMPORTED_MODULE_2__["config"].wrapperCls;
3902
+ return _config_config__WEBPACK_IMPORTED_MODULE_2__.config.wrapperCls;
3612
3903
  };
3613
3904
  WrapperWidget.prototype.setPosition = function (position) {
3614
3905
  this.position = position;
3615
3906
  var boxElem = this.getBoxElem();
3616
- boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__["config"].wrapperPositionLeftCls);
3617
- boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__["config"].wrapperPositionRightCls);
3618
- boxElem.classList.add(position === _core_app__WEBPACK_IMPORTED_MODULE_0__["ChatPosition"].left
3619
- ? _config_config__WEBPACK_IMPORTED_MODULE_2__["config"].wrapperPositionLeftCls
3620
- : _config_config__WEBPACK_IMPORTED_MODULE_2__["config"].wrapperPositionRightCls);
3907
+ boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__.config.wrapperPositionLeftCls);
3908
+ boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__.config.wrapperPositionRightCls);
3909
+ boxElem.classList.add(position === _core_app__WEBPACK_IMPORTED_MODULE_0__.ChatPosition.left
3910
+ ? _config_config__WEBPACK_IMPORTED_MODULE_2__.config.wrapperPositionLeftCls
3911
+ : _config_config__WEBPACK_IMPORTED_MODULE_2__.config.wrapperPositionRightCls);
3621
3912
  };
3622
3913
  WrapperWidget.prototype.setTheme = function (theme) {
3623
- if (!(theme in _core_app__WEBPACK_IMPORTED_MODULE_0__["AppTheme"])) {
3914
+ if (!(theme in _core_app__WEBPACK_IMPORTED_MODULE_0__.AppTheme)) {
3624
3915
  return;
3625
3916
  }
3626
3917
  this.theme = theme;
3627
3918
  var boxElem = this.getBoxElem();
3628
- var themeCls = _config_config__WEBPACK_IMPORTED_MODULE_2__["config"]["theme" + (theme.charAt(0).toUpperCase() + theme.slice(1))];
3629
- boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__["config"].themeRound);
3630
- boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__["config"].themeTile);
3919
+ var themeCls = _config_config__WEBPACK_IMPORTED_MODULE_2__.config["theme".concat(theme.charAt(0).toUpperCase() + theme.slice(1))];
3920
+ boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__.config.themeRound);
3921
+ boxElem.classList.remove(_config_config__WEBPACK_IMPORTED_MODULE_2__.config.themeTile);
3631
3922
  boxElem.classList.add(themeCls);
3632
3923
  };
3633
3924
  WrapperWidget.prototype.render = function () {
3634
3925
  this.setPosition(this.position);
3635
3926
  this.setTheme(this.theme);
3636
3927
  if (this.direction === 'rtl') {
3637
- this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_2__["config"].wrapperDirectionRtlCls);
3928
+ this.getBoxElem().classList.add(_config_config__WEBPACK_IMPORTED_MODULE_2__.config.wrapperDirectionRtlCls);
3638
3929
  }
3639
3930
  if (this.baseCustomCls) {
3640
3931
  this.getBoxElem().classList.add(this.baseCustomCls);
@@ -3642,11 +3933,95 @@ var WrapperWidget = /** @class */ (function (_super) {
3642
3933
  _super.prototype.render.call(this);
3643
3934
  };
3644
3935
  return WrapperWidget;
3645
- }(_core_base_widget__WEBPACK_IMPORTED_MODULE_1__["BaseWidget"]));
3936
+ }(_core_base_widget__WEBPACK_IMPORTED_MODULE_1__.BaseWidget));
3646
3937
 
3647
3938
 
3648
3939
 
3649
3940
  /***/ })
3650
3941
 
3651
- /******/ });
3652
- //# sourceMappingURL=dialogshift-webchat-sdk.umd.js.map
3942
+ /******/ });
3943
+ /************************************************************************/
3944
+ /******/ // The module cache
3945
+ /******/ var __webpack_module_cache__ = {};
3946
+ /******/
3947
+ /******/ // The require function
3948
+ /******/ function __webpack_require__(moduleId) {
3949
+ /******/ // Check if module is in cache
3950
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
3951
+ /******/ if (cachedModule !== undefined) {
3952
+ /******/ return cachedModule.exports;
3953
+ /******/ }
3954
+ /******/ // Create a new module (and put it into the cache)
3955
+ /******/ var module = __webpack_module_cache__[moduleId] = {
3956
+ /******/ // no module.id needed
3957
+ /******/ // no module.loaded needed
3958
+ /******/ exports: {}
3959
+ /******/ };
3960
+ /******/
3961
+ /******/ // Execute the module function
3962
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3963
+ /******/
3964
+ /******/ // Return the exports of the module
3965
+ /******/ return module.exports;
3966
+ /******/ }
3967
+ /******/
3968
+ /************************************************************************/
3969
+ /******/ /* webpack/runtime/define property getters */
3970
+ /******/ (() => {
3971
+ /******/ // define getter functions for harmony exports
3972
+ /******/ __webpack_require__.d = (exports, definition) => {
3973
+ /******/ for(var key in definition) {
3974
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3975
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3976
+ /******/ }
3977
+ /******/ }
3978
+ /******/ };
3979
+ /******/ })();
3980
+ /******/
3981
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
3982
+ /******/ (() => {
3983
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3984
+ /******/ })();
3985
+ /******/
3986
+ /******/ /* webpack/runtime/make namespace object */
3987
+ /******/ (() => {
3988
+ /******/ // define __esModule on exports
3989
+ /******/ __webpack_require__.r = (exports) => {
3990
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3991
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3992
+ /******/ }
3993
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
3994
+ /******/ };
3995
+ /******/ })();
3996
+ /******/
3997
+ /************************************************************************/
3998
+ var __webpack_exports__ = {};
3999
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
4000
+ (() => {
4001
+ /*!******************************!*\
4002
+ !*** ./src/scripts/index.ts ***!
4003
+ \******************************/
4004
+ __webpack_require__.r(__webpack_exports__);
4005
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4006
+ /* harmony export */ instance: () => (/* binding */ instance)
4007
+ /* harmony export */ });
4008
+ /* harmony import */ var _core_facade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/facade */ "./src/scripts/core/facade.ts");
4009
+ /* harmony import */ var _core_app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core/app */ "./src/scripts/core/app.ts");
4010
+
4011
+
4012
+ var facade = null;
4013
+ var instance = function (options) {
4014
+ if (facade && !facade.isDestroyed()) {
4015
+ return facade;
4016
+ }
4017
+ facade = (0,_core_facade__WEBPACK_IMPORTED_MODULE_0__.createFacade)(new _core_app__WEBPACK_IMPORTED_MODULE_1__.App(options));
4018
+ return facade;
4019
+ };
4020
+
4021
+
4022
+ })();
4023
+
4024
+ window.Dialogshift = __webpack_exports__;
4025
+ /******/ })()
4026
+ ;
4027
+ //# sourceMappingURL=dialogshift-webchat-sdk.umd.js.map