@ably/ui 8.6.0 → 8.7.0-dev.28a63f9

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 (92) hide show
  1. package/README.md +1 -1
  2. package/core/Code/component.css +3 -3
  3. package/core/Code/component.js +1 -1
  4. package/core/Code.jsx +353 -7273
  5. package/core/CompanyAutocomplete/component.js +1 -1
  6. package/core/ConnectStateWrapper.jsx +13 -4
  7. package/core/ContactFooter.jsx +13 -119
  8. package/core/CookieMessage.jsx +21 -293
  9. package/core/CustomerLogos.jsx +15 -117
  10. package/core/DropdownMenu/component.js +1 -0
  11. package/core/DropdownMenu.jsx +313 -0
  12. package/core/FeaturedLink.jsx +10 -116
  13. package/core/Flash.jsx +155 -1536
  14. package/core/Footer.jsx +17 -123
  15. package/core/Icon.jsx +9 -114
  16. package/core/Loader.jsx +9 -114
  17. package/core/Logo.jsx +36 -226
  18. package/core/Meganav/component.js +1 -2
  19. package/core/Meganav.jsx +2837 -10168
  20. package/core/MeganavBlogPostsList/component.js +1 -1
  21. package/core/MeganavBlogPostsList.jsx +11 -118
  22. package/core/MeganavContentCompany.jsx +31 -124
  23. package/core/MeganavContentDevelopers.jsx +32 -126
  24. package/core/MeganavContentPlatform.jsx +11 -118
  25. package/core/MeganavContentUseCases.jsx +24 -118
  26. package/core/MeganavContentWhyAbly/component.js +22 -0
  27. package/core/MeganavContentWhyAbly.jsx +3279 -0
  28. package/core/MeganavControl.jsx +10 -116
  29. package/core/MeganavControlMobileDropdown/component.js +1 -1
  30. package/core/MeganavControlMobileDropdown.jsx +10 -116
  31. package/core/MeganavControlMobilePanelClose.jsx +10 -116
  32. package/core/MeganavControlMobilePanelOpen.jsx +10 -116
  33. package/core/MeganavItemsDesktop.jsx +13 -121
  34. package/core/MeganavItemsMobile.jsx +18 -132
  35. package/core/MeganavItemsSignedIn.jsx +16 -129
  36. package/core/MeganavSearch.jsx +13 -123
  37. package/core/MeganavSearchAutocomplete/component.js +1 -2
  38. package/core/MeganavSearchPanel.jsx +12 -121
  39. package/core/MeganavSearchSuggestions.jsx +11 -118
  40. package/core/Notice/component.js +1 -2
  41. package/core/Notice.jsx +189 -2190
  42. package/core/SignOutLink.jsx +9 -114
  43. package/core/Slider/component.js +1 -1
  44. package/core/Slider.jsx +25 -582
  45. package/core/Uptime.jsx +15 -118
  46. package/core/images/ably-logo.png +0 -0
  47. package/core/scripts.js +1 -1
  48. package/core/sprites.svg +57 -1
  49. package/core/styles.css +6 -5
  50. package/package.json +4 -4
  51. package/src/core/Code/component.css +1 -67
  52. package/src/core/Code/component.js +11 -46
  53. package/src/core/Code/component.jsx +7 -3
  54. package/src/core/CustomerLogos/component.html.erb +2 -2
  55. package/src/core/CustomerLogos/component.jsx +3 -2
  56. package/src/core/CustomerLogos/component.rb +2 -1
  57. package/src/core/DropdownMenu/component.js +0 -0
  58. package/src/core/DropdownMenu/component.jsx +112 -0
  59. package/src/core/FeatureFooter/component.html.erb +4 -4
  60. package/src/core/Flash/component.jsx +42 -18
  61. package/src/core/Logo/component.html.erb +2 -27
  62. package/src/core/Logo/component.jsx +7 -40
  63. package/src/core/Logo/component.rb +15 -6
  64. package/src/core/Meganav/component.html.erb +1 -1
  65. package/src/core/Meganav/component.jsx +1 -1
  66. package/src/core/Meganav/component.rb +1 -0
  67. package/src/core/MeganavContentDevelopers/component.html.erb +14 -5
  68. package/src/core/MeganavContentDevelopers/component.jsx +18 -9
  69. package/src/core/MeganavContentUseCases/component.html.erb +10 -1
  70. package/src/core/MeganavContentUseCases/component.jsx +10 -1
  71. package/src/core/MeganavSearchSuggestions/component.html.erb +1 -1
  72. package/src/core/core.rb +4 -0
  73. package/src/core/icons/github.svg +1 -1
  74. package/src/core/icons/google.svg +3 -0
  75. package/src/core/icons/icon-display-chat-col.svg +4 -0
  76. package/src/core/icons/icon-display-integrations-col.svg +8 -0
  77. package/src/core/icons/icon-gui-check-circled-fill-black.svg +4 -0
  78. package/src/core/icons/icon-gui-filter-flow-step-1.svg +5 -0
  79. package/src/core/icons/icon-gui-filter-flow-step-2.svg +5 -0
  80. package/src/core/icons/icon-gui-filter-flow-step-3.svg +5 -0
  81. package/src/core/icons/icon-gui-link.svg +4 -0
  82. package/src/core/icons/icon-gui-resources.svg +3 -0
  83. package/src/core/icons/icon-multi-user-spaces-col.svg +13 -0
  84. package/src/core/icons/stackoverflow.svg +3 -0
  85. package/src/core/icons/youtube.svg +11 -0
  86. package/src/core/images/ably-logo.png +0 -0
  87. package/src/core/styles/properties.css +2 -0
  88. package/src/core/styles/text.css +4 -5
  89. package/src/core/utils/syntax-highlighter-registry.js +61 -0
  90. package/src/core/utils/syntax-highlighter.css +69 -0
  91. package/src/core/utils/syntax-highlighter.js +98 -0
  92. package/tailwind.config.js +1 -0
package/core/Notice.jsx CHANGED
@@ -1,20 +1,20 @@
1
1
  (function webpackUniversalModuleDefinition(root, factory) {
2
2
  if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("react"));
3
+ module.exports = factory(require("react"), require("prop-types"), require("js-cookie"), require("lodash.throttle"), require("dompurify"), require("redux"));
4
4
  else if(typeof define === 'function' && define.amd)
5
- define([], factory);
5
+ define([, , , , , ], factory);
6
6
  else {
7
- var a = typeof exports === 'object' ? factory(require("react")) : factory(root[undefined]);
7
+ var a = typeof exports === 'object' ? factory(require("react"), require("prop-types"), require("js-cookie"), require("lodash.throttle"), require("dompurify"), require("redux")) : factory(root[undefined], root[undefined], root[undefined], root[undefined], root[undefined], root[undefined]);
8
8
  for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
9
  }
10
- })(this, function(__WEBPACK_EXTERNAL_MODULE__9281__) {
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE__9281__, __WEBPACK_EXTERNAL_MODULE__3474__, __WEBPACK_EXTERNAL_MODULE__9349__, __WEBPACK_EXTERNAL_MODULE__2040__, __WEBPACK_EXTERNAL_MODULE__6357__, __WEBPACK_EXTERNAL_MODULE__5044__) {
11
11
  return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
12
13
  /******/ var __webpack_modules__ = ({
13
14
 
14
15
  /***/ 9787:
15
16
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16
17
 
17
- "use strict";
18
18
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
19
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
20
20
  /* harmony export */ });
@@ -92,23 +92,55 @@ var ConnectStateWrapper = function ConnectStateWrapper(Component, selectors) {
92
92
 
93
93
  /***/ }),
94
94
 
95
- /***/ 4935:
95
+ /***/ 8696:
96
96
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
97
97
 
98
- "use strict";
99
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
100
- /* harmony export */ "FLASH_DATA_ID": () => (/* binding */ FLASH_DATA_ID)
101
- /* harmony export */ });
102
- /* unused harmony exports reducerFlashes, Flashes */
103
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
104
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
105
- /* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7856);
106
- /* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_1__);
107
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5697);
108
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
109
- /* harmony import */ var _remote_data_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3511);
110
- /* harmony import */ var _ConnectStateWrapper_component_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9787);
111
- /* harmony import */ var _Icon_component_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9008);
98
+
99
+ // EXPORTS
100
+ __webpack_require__.d(__webpack_exports__, {
101
+ "FLASH_DATA_ID": () => (/* binding */ FLASH_DATA_ID)
102
+ });
103
+
104
+ // UNUSED EXPORTS: Flashes, default, reducerFlashes
105
+
106
+ // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react"}
107
+ var external_commonjs_react_commonjs2_react_ = __webpack_require__(9281);
108
+ var external_commonjs_react_commonjs2_react_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_);
109
+ // EXTERNAL MODULE: external {"commonjs":"dompurify","commonjs2":"dompurify"}
110
+ var external_commonjs_dompurify_commonjs2_dompurify_ = __webpack_require__(6357);
111
+ var external_commonjs_dompurify_commonjs2_dompurify_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_dompurify_commonjs2_dompurify_);
112
+ // EXTERNAL MODULE: external {"commonjs":"prop-types","commonjs2":"prop-types"}
113
+ var external_commonjs_prop_types_commonjs2_prop_types_ = __webpack_require__(3474);
114
+ var external_commonjs_prop_types_commonjs2_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_prop_types_commonjs2_prop_types_);
115
+ ;// CONCATENATED MODULE: ./node_modules/nanoid/non-secure/index.js
116
+ let urlAlphabet =
117
+ 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
118
+ let customAlphabet = (alphabet, defaultSize = 21) => {
119
+ return (size = defaultSize) => {
120
+ let id = ''
121
+ let i = size
122
+ while (i--) {
123
+ id += alphabet[(Math.random() * alphabet.length) | 0]
124
+ }
125
+ return id
126
+ }
127
+ }
128
+ let nanoid = (size = 21) => {
129
+ let id = ''
130
+ let i = size
131
+ while (i--) {
132
+ id += urlAlphabet[(Math.random() * 64) | 0]
133
+ }
134
+ return id
135
+ }
136
+
137
+ // EXTERNAL MODULE: ./src/core/remote-data-store.js
138
+ var remote_data_store = __webpack_require__(3511);
139
+ // EXTERNAL MODULE: ./src/core/ConnectStateWrapper/component.jsx
140
+ var component = __webpack_require__(9787);
141
+ // EXTERNAL MODULE: ./src/core/Icon/component.jsx
142
+ var Icon_component = __webpack_require__(9008);
143
+ ;// CONCATENATED MODULE: ./src/core/Flash/component.jsx
112
144
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
113
145
 
114
146
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -143,6 +175,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
143
175
 
144
176
 
145
177
 
178
+
146
179
  var REDUCER_KEY = "flashes";
147
180
  var FLASH_DATA_ID = "ui-flashes";
148
181
  var initialState = {
@@ -172,8 +205,8 @@ var selectFlashes = function selectFlashes(store) {
172
205
  };
173
206
 
174
207
  var FlashT = {
175
- type: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(["error", "success", "notice", "info", "alert"]),
176
- content: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)
208
+ type: external_commonjs_prop_types_commonjs2_prop_types_default().oneOf(["error", "success", "notice", "info", "alert"]),
209
+ content: (external_commonjs_prop_types_commonjs2_prop_types_default()).string
177
210
  };
178
211
  var FLASH_BG_COLOR = {
179
212
  error: "bg-gui-error",
@@ -192,48 +225,60 @@ var FLASH_TEXT_COLOR = {
192
225
  var AUTO_HIDE = ["success", "info", "notice"];
193
226
  var AUTO_HIDE_TIME = 8000;
194
227
 
228
+ var useAutoHide = function useAutoHide(type, closeFlash) {
229
+ var timeoutId = (0,external_commonjs_react_commonjs2_react_.useRef)(null);
230
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
231
+ if (AUTO_HIDE.includes(type)) {
232
+ timeoutId.current = setTimeout(function () {
233
+ closeFlash();
234
+ }, AUTO_HIDE_TIME);
235
+ }
236
+
237
+ return function () {
238
+ if (timeoutId.current) {
239
+ clearTimeout(timeoutId.current);
240
+ }
241
+ };
242
+ }, []);
243
+ };
244
+
195
245
  var Flash = function Flash(_ref) {
196
- var type = _ref.type,
197
- content = _ref.content;
198
- var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
246
+ var id = _ref.id,
247
+ type = _ref.type,
248
+ content = _ref.content,
249
+ removeFlash = _ref.removeFlash;
250
+ var ref = (0,external_commonjs_react_commonjs2_react_.useRef)(null);
199
251
 
200
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
252
+ var _useState = (0,external_commonjs_react_commonjs2_react_.useState)(false),
201
253
  _useState2 = _slicedToArray(_useState, 2),
202
254
  closed = _useState2[0],
203
255
  setClosed = _useState2[1];
204
256
 
205
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
257
+ var _useState3 = (0,external_commonjs_react_commonjs2_react_.useState)(0),
206
258
  _useState4 = _slicedToArray(_useState3, 2),
207
259
  flashHeight = _useState4[0],
208
260
  setFlashHeight = _useState4[1];
209
261
 
210
- var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
262
+ var _useState5 = (0,external_commonjs_react_commonjs2_react_.useState)(false),
211
263
  _useState6 = _slicedToArray(_useState5, 2),
212
264
  triggerEntryAnimation = _useState6[0],
213
265
  setTriggerEntryAnimation = _useState6[1];
214
266
 
215
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
216
- return setTriggerEntryAnimation(true);
217
- }, []);
218
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
219
- if (AUTO_HIDE.includes(type)) {
220
- setTimeout(function () {
221
- // closeFlash is idempotent, we can call it even if the flash has been already closed
222
- closeFlash();
223
- }, AUTO_HIDE_TIME);
224
- }
225
- }, [closed]);
226
-
227
267
  var closeFlash = function closeFlash() {
228
268
  if (ref.current) {
229
269
  setFlashHeight(ref.current.getBoundingClientRect().height);
230
270
  }
231
271
 
272
+ setClosed(true);
232
273
  setTimeout(function () {
233
- return setClosed(true);
234
- }, 0);
274
+ removeFlash(id);
275
+ }, 100);
235
276
  };
236
277
 
278
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
279
+ return setTriggerEntryAnimation(true);
280
+ }, []);
281
+ useAutoHide(type, closeFlash);
237
282
  var animateEntry = triggerEntryAnimation && !closed;
238
283
  var style;
239
284
 
@@ -251,7 +296,7 @@ var Flash = function Flash(_ref) {
251
296
  style = {};
252
297
  }
253
298
 
254
- var safeContent = dompurify__WEBPACK_IMPORTED_MODULE_1___default().sanitize(content, {
299
+ var safeContent = external_commonjs_dompurify_commonjs2_dompurify_default().sanitize(content, {
255
300
  ALLOWED_TAGS: ["a"],
256
301
  ALLOWED_ATTR: ["href", "data-method", "rel"]
257
302
  });
@@ -267,58 +312,85 @@ var Flash = function Flash(_ref) {
267
312
  error: "text-white",
268
313
  alert: "text-white"
269
314
  };
270
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
315
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
271
316
  className: "ui-flash-message ui-grid-px ".concat(animateEntry ? "ui-flash-message-enter" : ""),
272
317
  style: style,
273
318
  ref: ref,
274
319
  "data-id": "ui-flash"
275
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
320
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
276
321
  className: "".concat(FLASH_BG_COLOR[type], " p-32 flex align-center rounded shadow-container-subtle")
277
- }, withIcons[type] && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon_component_jsx__WEBPACK_IMPORTED_MODULE_4__.default, {
322
+ }, withIcons[type] && /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(Icon_component.default, {
278
323
  name: withIcons[type],
279
324
  color: iconColor[type],
280
325
  size: "1.5rem",
281
326
  additionalCSS: "mr-16 self-baseline"
282
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
327
+ }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("p", {
283
328
  className: "ui-flash-text ".concat(FLASH_TEXT_COLOR[type]),
284
329
  dangerouslySetInnerHTML: {
285
330
  __html: safeContent
286
331
  }
287
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
332
+ }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("button", {
288
333
  type: "button",
289
- className: "p-0 ml-auto self-start",
334
+ className: "p-0 ml-auto self-start focus:outline-none",
290
335
  onClick: closeFlash
291
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
292
- className: "h-24 w-24 transition-colors ui-icon-cool-black"
293
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", {
294
- xlinkHref: "#sprite-close"
295
- })))));
336
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(Icon_component.default, {
337
+ name: "icon-gui-close",
338
+ color: iconColor[type],
339
+ size: "1.5rem",
340
+ additionalCSS: "transition-colors"
341
+ }))));
296
342
  };
297
343
 
298
344
  Flash.propTypes = _objectSpread({}, FlashT);
299
345
 
300
346
  var Flashes = function Flashes(_ref2) {
301
347
  var flashes = _ref2.flashes;
302
- var items = (flashes === null || flashes === void 0 ? void 0 : flashes.items) || [];
303
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
348
+
349
+ var _useState7 = (0,external_commonjs_react_commonjs2_react_.useState)([]),
350
+ _useState8 = _slicedToArray(_useState7, 2),
351
+ flashesWithIds = _useState8[0],
352
+ setFlashesWithIds = _useState8[1];
353
+
354
+ var removeFlash = function removeFlash(flashId) {
355
+ return setFlashesWithIds(function (items) {
356
+ return items.filter(function (item) {
357
+ return item.id !== flashId;
358
+ });
359
+ });
360
+ };
361
+
362
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
363
+ setFlashesWithIds(function (state) {
364
+ return [].concat(_toConsumableArray(state), _toConsumableArray(((flashes === null || flashes === void 0 ? void 0 : flashes.items) || []).map(function (flash) {
365
+ return _objectSpread(_objectSpread({}, flash), {}, {
366
+ id: nanoid(),
367
+ removed: false
368
+ });
369
+ })));
370
+ });
371
+ }, [flashes]);
372
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
304
373
  className: "ui-flash",
305
374
  "data-id": FLASH_DATA_ID
306
- }, items.map(function (flash) {
307
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Flash, _extends({
308
- key: flash.type
375
+ }, flashesWithIds.filter(function (item) {
376
+ return !item.removed;
377
+ }).map(function (flash) {
378
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(Flash, _extends({
379
+ removeFlash: removeFlash,
380
+ key: flash.id
309
381
  }, flash));
310
382
  }));
311
383
  };
312
384
 
313
385
  Flashes.propTypes = {
314
- flashes: prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape({
315
- items: prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape(FlashT))
386
+ flashes: external_commonjs_prop_types_commonjs2_prop_types_default().shape({
387
+ items: external_commonjs_prop_types_commonjs2_prop_types_default().arrayOf(external_commonjs_prop_types_commonjs2_prop_types_default().shape(FlashT))
316
388
  })
317
389
  };
318
390
 
319
391
  var BackendFlashes = function BackendFlashes(_ref3) {
320
392
  var flashes = _ref3.flashes;
321
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
393
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
322
394
  var transformedFlashes = flashes.map(function (flash) {
323
395
  var _flash = _slicedToArray(flash, 2),
324
396
  type = _flash[0],
@@ -331,37 +403,36 @@ var BackendFlashes = function BackendFlashes(_ref3) {
331
403
  }) || [];
332
404
 
333
405
  if (transformedFlashes.length > 0) {
334
- var store = (0,_remote_data_store__WEBPACK_IMPORTED_MODULE_5__/* .getRemoteDataStore */ .cO)();
406
+ var store = (0,remote_data_store/* getRemoteDataStore */.cO)();
335
407
  store.dispatch({
336
408
  type: "flash/push",
337
409
  payload: transformedFlashes
338
410
  });
339
411
  }
340
412
  }, []);
341
- var WrappedFlashes = (0,_ConnectStateWrapper_component_jsx__WEBPACK_IMPORTED_MODULE_3__.default)(Flashes, {
413
+ var WrappedFlashes = (0,component.default)(Flashes, {
342
414
  flashes: selectFlashes
343
415
  });
344
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(WrappedFlashes, null);
416
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(WrappedFlashes, null);
345
417
  };
346
418
 
347
419
  BackendFlashes.propTypes = {
348
- flashes: prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)))
420
+ flashes: external_commonjs_prop_types_commonjs2_prop_types_default().arrayOf(external_commonjs_prop_types_commonjs2_prop_types_default().arrayOf((external_commonjs_prop_types_commonjs2_prop_types_default()).string))
349
421
  };
350
422
 
351
- /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (BackendFlashes)));
423
+ /* harmony default export */ const Flash_component = ((/* unused pure expression or super */ null && (BackendFlashes)));
352
424
 
353
425
  /***/ }),
354
426
 
355
427
  /***/ 9008:
356
428
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
357
429
 
358
- "use strict";
359
430
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
360
431
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
361
432
  /* harmony export */ });
362
433
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
363
434
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
364
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5697);
435
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3474);
365
436
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
366
437
  var _excluded = ["name", "size", "color", "additionalCSS"];
367
438
 
@@ -408,7 +479,6 @@ Icon.propTypes = {
408
479
  /***/ 9581:
409
480
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
410
481
 
411
- "use strict";
412
482
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
413
483
  /* harmony export */ "A": () => (/* binding */ queryId)
414
484
  /* harmony export */ });
@@ -427,12 +497,13 @@ var queryIdAll = function queryIdAll(val) {
427
497
  /***/ 3511:
428
498
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
429
499
 
430
- "use strict";
431
500
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
432
501
  /* harmony export */ "cO": () => (/* binding */ getRemoteDataStore),
433
502
  /* harmony export */ "kZ": () => (/* binding */ connectState)
434
503
  /* harmony export */ });
435
504
  /* unused harmony exports attachStoreToWindow, createRemoteDataStore */
505
+ /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5044);
506
+ /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(redux__WEBPACK_IMPORTED_MODULE_0__);
436
507
 
437
508
  var attachStoreToWindow = function attachStoreToWindow(store) {
438
509
  window.AblyUi = window.AblyUi || {};
@@ -465,2104 +536,45 @@ var createRemoteDataStore = function createRemoteDataStore(reducers) {
465
536
 
466
537
  /***/ }),
467
538
 
468
- /***/ 7856:
469
- /***/ (function(module) {
470
-
471
- /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
472
-
473
- (function (global, factory) {
474
- true ? module.exports = factory() :
475
- 0;
476
- }(this, function () { 'use strict';
477
-
478
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
479
-
480
- var hasOwnProperty = Object.hasOwnProperty,
481
- setPrototypeOf = Object.setPrototypeOf,
482
- isFrozen = Object.isFrozen,
483
- getPrototypeOf = Object.getPrototypeOf,
484
- getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
485
- var freeze = Object.freeze,
486
- seal = Object.seal,
487
- create = Object.create; // eslint-disable-line import/no-mutable-exports
488
-
489
- var _ref = typeof Reflect !== 'undefined' && Reflect,
490
- apply = _ref.apply,
491
- construct = _ref.construct;
492
-
493
- if (!apply) {
494
- apply = function apply(fun, thisValue, args) {
495
- return fun.apply(thisValue, args);
496
- };
497
- }
498
-
499
- if (!freeze) {
500
- freeze = function freeze(x) {
501
- return x;
502
- };
503
- }
504
-
505
- if (!seal) {
506
- seal = function seal(x) {
507
- return x;
508
- };
509
- }
510
-
511
- if (!construct) {
512
- construct = function construct(Func, args) {
513
- return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();
514
- };
515
- }
516
-
517
- var arrayForEach = unapply(Array.prototype.forEach);
518
- var arrayPop = unapply(Array.prototype.pop);
519
- var arrayPush = unapply(Array.prototype.push);
520
-
521
- var stringToLowerCase = unapply(String.prototype.toLowerCase);
522
- var stringMatch = unapply(String.prototype.match);
523
- var stringReplace = unapply(String.prototype.replace);
524
- var stringIndexOf = unapply(String.prototype.indexOf);
525
- var stringTrim = unapply(String.prototype.trim);
526
-
527
- var regExpTest = unapply(RegExp.prototype.test);
528
-
529
- var typeErrorCreate = unconstruct(TypeError);
530
-
531
- function unapply(func) {
532
- return function (thisArg) {
533
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
534
- args[_key - 1] = arguments[_key];
535
- }
536
-
537
- return apply(func, thisArg, args);
538
- };
539
- }
540
-
541
- function unconstruct(func) {
542
- return function () {
543
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
544
- args[_key2] = arguments[_key2];
545
- }
546
-
547
- return construct(func, args);
548
- };
549
- }
550
-
551
- /* Add properties to a lookup table */
552
- function addToSet(set, array) {
553
- if (setPrototypeOf) {
554
- // Make 'in' and truthy checks like Boolean(set.constructor)
555
- // independent of any properties defined on Object.prototype.
556
- // Prevent prototype setters from intercepting set as a this value.
557
- setPrototypeOf(set, null);
558
- }
559
-
560
- var l = array.length;
561
- while (l--) {
562
- var element = array[l];
563
- if (typeof element === 'string') {
564
- var lcElement = stringToLowerCase(element);
565
- if (lcElement !== element) {
566
- // Config presets (e.g. tags.js, attrs.js) are immutable.
567
- if (!isFrozen(array)) {
568
- array[l] = lcElement;
569
- }
570
-
571
- element = lcElement;
572
- }
573
- }
574
-
575
- set[element] = true;
576
- }
577
-
578
- return set;
579
- }
580
-
581
- /* Shallow clone an object */
582
- function clone(object) {
583
- var newObject = create(null);
584
-
585
- var property = void 0;
586
- for (property in object) {
587
- if (apply(hasOwnProperty, object, [property])) {
588
- newObject[property] = object[property];
589
- }
590
- }
591
-
592
- return newObject;
593
- }
594
-
595
- /* IE10 doesn't support __lookupGetter__ so lets'
596
- * simulate it. It also automatically checks
597
- * if the prop is function or getter and behaves
598
- * accordingly. */
599
- function lookupGetter(object, prop) {
600
- while (object !== null) {
601
- var desc = getOwnPropertyDescriptor(object, prop);
602
- if (desc) {
603
- if (desc.get) {
604
- return unapply(desc.get);
605
- }
606
-
607
- if (typeof desc.value === 'function') {
608
- return unapply(desc.value);
609
- }
610
- }
611
-
612
- object = getPrototypeOf(object);
613
- }
614
-
615
- function fallbackValue(element) {
616
- console.warn('fallback value for', element);
617
- return null;
618
- }
619
-
620
- return fallbackValue;
621
- }
622
-
623
- var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
624
-
625
- // SVG
626
- var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
627
-
628
- var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
629
-
630
- // List of SVG elements that are disallowed by default.
631
- // We still need to know them so that we can do namespace
632
- // checks properly in case one wants to add them to
633
- // allow-list.
634
- var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
635
-
636
- var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);
637
-
638
- // Similarly to SVG, we want to know all MathML elements,
639
- // even those that we disallow by default.
640
- var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
641
-
642
- var text = freeze(['#text']);
643
-
644
- var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);
645
-
646
- var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
647
-
648
- var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
649
-
650
- var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
651
-
652
- // eslint-disable-next-line unicorn/better-regex
653
- var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
654
- var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm);
655
- var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
656
- var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
657
- var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
658
- );
659
- var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
660
- var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
661
- );
662
-
663
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
664
-
665
- function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
666
-
667
- var getGlobal = function getGlobal() {
668
- return typeof window === 'undefined' ? null : window;
669
- };
670
-
671
- /**
672
- * Creates a no-op policy for internal use only.
673
- * Don't export this function outside this module!
674
- * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
675
- * @param {Document} document The document object (to determine policy name suffix)
676
- * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
677
- * are not supported).
678
- */
679
- var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
680
- if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
681
- return null;
682
- }
683
-
684
- // Allow the callers to control the unique policy name
685
- // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
686
- // Policy creation with duplicate names throws in Trusted Types.
687
- var suffix = null;
688
- var ATTR_NAME = 'data-tt-policy-suffix';
689
- if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
690
- suffix = document.currentScript.getAttribute(ATTR_NAME);
691
- }
692
-
693
- var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
694
-
695
- try {
696
- return trustedTypes.createPolicy(policyName, {
697
- createHTML: function createHTML(html$$1) {
698
- return html$$1;
699
- }
700
- });
701
- } catch (_) {
702
- // Policy creation failed (most likely another DOMPurify script has
703
- // already run). Skip creating the policy, as this will only cause errors
704
- // if TT are enforced.
705
- console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
706
- return null;
707
- }
708
- };
709
-
710
- function createDOMPurify() {
711
- var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
712
-
713
- var DOMPurify = function DOMPurify(root) {
714
- return createDOMPurify(root);
715
- };
716
-
717
- /**
718
- * Version label, exposed for easier checks
719
- * if DOMPurify is up to date or not
720
- */
721
- DOMPurify.version = '2.2.9';
722
-
723
- /**
724
- * Array of elements that DOMPurify removed during sanitation.
725
- * Empty if nothing was removed.
726
- */
727
- DOMPurify.removed = [];
728
-
729
- if (!window || !window.document || window.document.nodeType !== 9) {
730
- // Not running in a browser, provide a factory function
731
- // so that you can pass your own Window
732
- DOMPurify.isSupported = false;
733
-
734
- return DOMPurify;
735
- }
736
-
737
- var originalDocument = window.document;
738
-
739
- var document = window.document;
740
- var DocumentFragment = window.DocumentFragment,
741
- HTMLTemplateElement = window.HTMLTemplateElement,
742
- Node = window.Node,
743
- Element = window.Element,
744
- NodeFilter = window.NodeFilter,
745
- _window$NamedNodeMap = window.NamedNodeMap,
746
- NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
747
- Text = window.Text,
748
- Comment = window.Comment,
749
- DOMParser = window.DOMParser,
750
- trustedTypes = window.trustedTypes;
751
-
752
-
753
- var ElementPrototype = Element.prototype;
754
-
755
- var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
756
- var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
757
- var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
758
- var getParentNode = lookupGetter(ElementPrototype, 'parentNode');
759
-
760
- // As per issue #47, the web-components registry is inherited by a
761
- // new document created via createHTMLDocument. As per the spec
762
- // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
763
- // a new empty registry is used when creating a template contents owner
764
- // document, so we use that as our parent document to ensure nothing
765
- // is inherited.
766
- if (typeof HTMLTemplateElement === 'function') {
767
- var template = document.createElement('template');
768
- if (template.content && template.content.ownerDocument) {
769
- document = template.content.ownerDocument;
770
- }
771
- }
772
-
773
- var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
774
- var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';
775
-
776
- var _document = document,
777
- implementation = _document.implementation,
778
- createNodeIterator = _document.createNodeIterator,
779
- createDocumentFragment = _document.createDocumentFragment;
780
- var importNode = originalDocument.importNode;
781
-
782
-
783
- var documentMode = {};
784
- try {
785
- documentMode = clone(document).documentMode ? document.documentMode : {};
786
- } catch (_) {}
787
-
788
- var hooks = {};
789
-
790
- /**
791
- * Expose whether this browser supports running the full DOMPurify.
792
- */
793
- DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;
794
-
795
- var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,
796
- ERB_EXPR$$1 = ERB_EXPR,
797
- DATA_ATTR$$1 = DATA_ATTR,
798
- ARIA_ATTR$$1 = ARIA_ATTR,
799
- IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,
800
- ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;
801
- var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;
802
-
803
- /**
804
- * We consider the elements and attributes below to be safe. Ideally
805
- * don't add any new ones but feel free to remove unwanted ones.
806
- */
807
-
808
- /* allowed element names */
809
-
810
- var ALLOWED_TAGS = null;
811
- var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));
812
-
813
- /* Allowed attribute names */
814
- var ALLOWED_ATTR = null;
815
- var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));
816
-
817
- /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
818
- var FORBID_TAGS = null;
819
-
820
- /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
821
- var FORBID_ATTR = null;
822
-
823
- /* Decide if ARIA attributes are okay */
824
- var ALLOW_ARIA_ATTR = true;
825
-
826
- /* Decide if custom data attributes are okay */
827
- var ALLOW_DATA_ATTR = true;
828
-
829
- /* Decide if unknown protocols are okay */
830
- var ALLOW_UNKNOWN_PROTOCOLS = false;
831
-
832
- /* Output should be safe for common template engines.
833
- * This means, DOMPurify removes data attributes, mustaches and ERB
834
- */
835
- var SAFE_FOR_TEMPLATES = false;
836
-
837
- /* Decide if document with <html>... should be returned */
838
- var WHOLE_DOCUMENT = false;
839
-
840
- /* Track whether config is already set on this instance of DOMPurify. */
841
- var SET_CONFIG = false;
842
-
843
- /* Decide if all elements (e.g. style, script) must be children of
844
- * document.body. By default, browsers might move them to document.head */
845
- var FORCE_BODY = false;
846
-
847
- /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
848
- * string (or a TrustedHTML object if Trusted Types are supported).
849
- * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
850
- */
851
- var RETURN_DOM = false;
852
-
853
- /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
854
- * string (or a TrustedHTML object if Trusted Types are supported) */
855
- var RETURN_DOM_FRAGMENT = false;
856
-
857
- /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM
858
- * `Node` is imported into the current `Document`. If this flag is not enabled the
859
- * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by
860
- * DOMPurify.
861
- *
862
- * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`
863
- * might cause XSS from attacks hidden in closed shadowroots in case the browser
864
- * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/
865
- */
866
- var RETURN_DOM_IMPORT = true;
867
-
868
- /* Try to return a Trusted Type object instead of a string, return a string in
869
- * case Trusted Types are not supported */
870
- var RETURN_TRUSTED_TYPE = false;
871
-
872
- /* Output should be free from DOM clobbering attacks? */
873
- var SANITIZE_DOM = true;
874
-
875
- /* Keep element content when removing element? */
876
- var KEEP_CONTENT = true;
877
-
878
- /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
879
- * of importing it into a new Document and returning a sanitized copy */
880
- var IN_PLACE = false;
881
-
882
- /* Allow usage of profiles like html, svg and mathMl */
883
- var USE_PROFILES = {};
884
-
885
- /* Tags to ignore content of when KEEP_CONTENT is true */
886
- var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
887
-
888
- /* Tags that are safe for data: URIs */
889
- var DATA_URI_TAGS = null;
890
- var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
891
-
892
- /* Attributes safe for values like "javascript:" */
893
- var URI_SAFE_ATTRIBUTES = null;
894
- var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);
895
-
896
- var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
897
- var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
898
- var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
899
- /* Document namespace */
900
- var NAMESPACE = HTML_NAMESPACE;
901
- var IS_EMPTY_INPUT = false;
902
-
903
- /* Keep a reference to config to pass to hooks */
904
- var CONFIG = null;
905
-
906
- /* Ideally, do not touch anything below this line */
907
- /* ______________________________________________ */
908
-
909
- var formElement = document.createElement('form');
910
-
911
- /**
912
- * _parseConfig
913
- *
914
- * @param {Object} cfg optional config literal
915
- */
916
- // eslint-disable-next-line complexity
917
- var _parseConfig = function _parseConfig(cfg) {
918
- if (CONFIG && CONFIG === cfg) {
919
- return;
920
- }
921
-
922
- /* Shield configuration object from tampering */
923
- if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {
924
- cfg = {};
925
- }
926
-
927
- /* Shield configuration object from prototype pollution */
928
- cfg = clone(cfg);
929
-
930
- /* Set configuration parameters */
931
- ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;
932
- ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;
933
- URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;
934
- DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;
935
- FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};
936
- FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};
937
- USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
938
- ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
939
- ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
940
- ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
941
- SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
942
- WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
943
- RETURN_DOM = cfg.RETURN_DOM || false; // Default false
944
- RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
945
- RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true
946
- RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
947
- FORCE_BODY = cfg.FORCE_BODY || false; // Default false
948
- SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
949
- KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
950
- IN_PLACE = cfg.IN_PLACE || false; // Default false
951
- IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;
952
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
953
- if (SAFE_FOR_TEMPLATES) {
954
- ALLOW_DATA_ATTR = false;
955
- }
956
-
957
- if (RETURN_DOM_FRAGMENT) {
958
- RETURN_DOM = true;
959
- }
960
-
961
- /* Parse profile info */
962
- if (USE_PROFILES) {
963
- ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));
964
- ALLOWED_ATTR = [];
965
- if (USE_PROFILES.html === true) {
966
- addToSet(ALLOWED_TAGS, html);
967
- addToSet(ALLOWED_ATTR, html$1);
968
- }
969
-
970
- if (USE_PROFILES.svg === true) {
971
- addToSet(ALLOWED_TAGS, svg);
972
- addToSet(ALLOWED_ATTR, svg$1);
973
- addToSet(ALLOWED_ATTR, xml);
974
- }
975
-
976
- if (USE_PROFILES.svgFilters === true) {
977
- addToSet(ALLOWED_TAGS, svgFilters);
978
- addToSet(ALLOWED_ATTR, svg$1);
979
- addToSet(ALLOWED_ATTR, xml);
980
- }
981
-
982
- if (USE_PROFILES.mathMl === true) {
983
- addToSet(ALLOWED_TAGS, mathMl);
984
- addToSet(ALLOWED_ATTR, mathMl$1);
985
- addToSet(ALLOWED_ATTR, xml);
986
- }
987
- }
988
-
989
- /* Merge configuration parameters */
990
- if (cfg.ADD_TAGS) {
991
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
992
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
993
- }
994
-
995
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);
996
- }
997
-
998
- if (cfg.ADD_ATTR) {
999
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
1000
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
1001
- }
1002
-
1003
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);
1004
- }
1005
-
1006
- if (cfg.ADD_URI_SAFE_ATTR) {
1007
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);
1008
- }
1009
-
1010
- /* Add #text in case KEEP_CONTENT is set to true */
1011
- if (KEEP_CONTENT) {
1012
- ALLOWED_TAGS['#text'] = true;
1013
- }
1014
-
1015
- /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
1016
- if (WHOLE_DOCUMENT) {
1017
- addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
1018
- }
1019
-
1020
- /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
1021
- if (ALLOWED_TAGS.table) {
1022
- addToSet(ALLOWED_TAGS, ['tbody']);
1023
- delete FORBID_TAGS.tbody;
1024
- }
1025
-
1026
- // Prevent further manipulation of configuration.
1027
- // Not available in IE8, Safari 5, etc.
1028
- if (freeze) {
1029
- freeze(cfg);
1030
- }
1031
-
1032
- CONFIG = cfg;
1033
- };
1034
-
1035
- var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
1036
-
1037
- var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);
1038
-
1039
- /* Keep track of all possible SVG and MathML tags
1040
- * so that we can perform the namespace checks
1041
- * correctly. */
1042
- var ALL_SVG_TAGS = addToSet({}, svg);
1043
- addToSet(ALL_SVG_TAGS, svgFilters);
1044
- addToSet(ALL_SVG_TAGS, svgDisallowed);
1045
-
1046
- var ALL_MATHML_TAGS = addToSet({}, mathMl);
1047
- addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
1048
-
1049
- /**
1050
- *
1051
- *
1052
- * @param {Element} element a DOM element whose namespace is being checked
1053
- * @returns {boolean} Return false if the element has a
1054
- * namespace that a spec-compliant parser would never
1055
- * return. Return true otherwise.
1056
- */
1057
- var _checkValidNamespace = function _checkValidNamespace(element) {
1058
- var parent = getParentNode(element);
1059
-
1060
- // In JSDOM, if we're inside shadow DOM, then parentNode
1061
- // can be null. We just simulate parent in this case.
1062
- if (!parent || !parent.tagName) {
1063
- parent = {
1064
- namespaceURI: HTML_NAMESPACE,
1065
- tagName: 'template'
1066
- };
1067
- }
1068
-
1069
- var tagName = stringToLowerCase(element.tagName);
1070
- var parentTagName = stringToLowerCase(parent.tagName);
1071
-
1072
- if (element.namespaceURI === SVG_NAMESPACE) {
1073
- // The only way to switch from HTML namespace to SVG
1074
- // is via <svg>. If it happens via any other tag, then
1075
- // it should be killed.
1076
- if (parent.namespaceURI === HTML_NAMESPACE) {
1077
- return tagName === 'svg';
1078
- }
1079
-
1080
- // The only way to switch from MathML to SVG is via
1081
- // svg if parent is either <annotation-xml> or MathML
1082
- // text integration points.
1083
- if (parent.namespaceURI === MATHML_NAMESPACE) {
1084
- return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
1085
- }
1086
-
1087
- // We only allow elements that are defined in SVG
1088
- // spec. All others are disallowed in SVG namespace.
1089
- return Boolean(ALL_SVG_TAGS[tagName]);
1090
- }
1091
-
1092
- if (element.namespaceURI === MATHML_NAMESPACE) {
1093
- // The only way to switch from HTML namespace to MathML
1094
- // is via <math>. If it happens via any other tag, then
1095
- // it should be killed.
1096
- if (parent.namespaceURI === HTML_NAMESPACE) {
1097
- return tagName === 'math';
1098
- }
1099
-
1100
- // The only way to switch from SVG to MathML is via
1101
- // <math> and HTML integration points
1102
- if (parent.namespaceURI === SVG_NAMESPACE) {
1103
- return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
1104
- }
1105
-
1106
- // We only allow elements that are defined in MathML
1107
- // spec. All others are disallowed in MathML namespace.
1108
- return Boolean(ALL_MATHML_TAGS[tagName]);
1109
- }
1110
-
1111
- if (element.namespaceURI === HTML_NAMESPACE) {
1112
- // The only way to switch from SVG to HTML is via
1113
- // HTML integration points, and from MathML to HTML
1114
- // is via MathML text integration points
1115
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
1116
- return false;
1117
- }
1118
-
1119
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
1120
- return false;
1121
- }
1122
-
1123
- // Certain elements are allowed in both SVG and HTML
1124
- // namespace. We need to specify them explicitly
1125
- // so that they don't get erronously deleted from
1126
- // HTML namespace.
1127
- var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
1128
-
1129
- // We disallow tags that are specific for MathML
1130
- // or SVG and should never appear in HTML namespace
1131
- return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);
1132
- }
1133
-
1134
- // The code should never reach this place (this means
1135
- // that the element somehow got namespace that is not
1136
- // HTML, SVG or MathML). Return false just in case.
1137
- return false;
1138
- };
1139
-
1140
- /**
1141
- * _forceRemove
1142
- *
1143
- * @param {Node} node a DOM node
1144
- */
1145
- var _forceRemove = function _forceRemove(node) {
1146
- arrayPush(DOMPurify.removed, { element: node });
1147
- try {
1148
- // eslint-disable-next-line unicorn/prefer-dom-node-remove
1149
- node.parentNode.removeChild(node);
1150
- } catch (_) {
1151
- try {
1152
- node.outerHTML = emptyHTML;
1153
- } catch (_) {
1154
- node.remove();
1155
- }
1156
- }
1157
- };
1158
-
1159
- /**
1160
- * _removeAttribute
1161
- *
1162
- * @param {String} name an Attribute name
1163
- * @param {Node} node a DOM node
1164
- */
1165
- var _removeAttribute = function _removeAttribute(name, node) {
1166
- try {
1167
- arrayPush(DOMPurify.removed, {
1168
- attribute: node.getAttributeNode(name),
1169
- from: node
1170
- });
1171
- } catch (_) {
1172
- arrayPush(DOMPurify.removed, {
1173
- attribute: null,
1174
- from: node
1175
- });
1176
- }
1177
-
1178
- node.removeAttribute(name);
1179
-
1180
- // We void attribute values for unremovable "is"" attributes
1181
- if (name === 'is' && !ALLOWED_ATTR[name]) {
1182
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
1183
- try {
1184
- _forceRemove(node);
1185
- } catch (_) {}
1186
- } else {
1187
- try {
1188
- node.setAttribute(name, '');
1189
- } catch (_) {}
1190
- }
1191
- }
1192
- };
1193
-
1194
- /**
1195
- * _initDocument
1196
- *
1197
- * @param {String} dirty a string of dirty markup
1198
- * @return {Document} a DOM, filled with the dirty markup
1199
- */
1200
- var _initDocument = function _initDocument(dirty) {
1201
- /* Create a HTML document */
1202
- var doc = void 0;
1203
- var leadingWhitespace = void 0;
1204
-
1205
- if (FORCE_BODY) {
1206
- dirty = '<remove></remove>' + dirty;
1207
- } else {
1208
- /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
1209
- var matches = stringMatch(dirty, /^[\r\n\t ]+/);
1210
- leadingWhitespace = matches && matches[0];
1211
- }
1212
-
1213
- var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
1214
- /*
1215
- * Use the DOMParser API by default, fallback later if needs be
1216
- * DOMParser not work for svg when has multiple root element.
1217
- */
1218
- if (NAMESPACE === HTML_NAMESPACE) {
1219
- try {
1220
- doc = new DOMParser().parseFromString(dirtyPayload, 'text/html');
1221
- } catch (_) {}
1222
- }
1223
-
1224
- /* Use createHTMLDocument in case DOMParser is not available */
1225
- if (!doc || !doc.documentElement) {
1226
- doc = implementation.createDocument(NAMESPACE, 'template', null);
1227
- try {
1228
- doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;
1229
- } catch (_) {
1230
- // Syntax error if dirtyPayload is invalid xml
1231
- }
1232
- }
1233
-
1234
- var body = doc.body || doc.documentElement;
1235
-
1236
- if (dirty && leadingWhitespace) {
1237
- body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
1238
- }
1239
-
1240
- /* Work on whole document or just its body */
1241
- return WHOLE_DOCUMENT ? doc.documentElement : body;
1242
- };
1243
-
1244
- /**
1245
- * _createIterator
1246
- *
1247
- * @param {Document} root document/fragment to create iterator for
1248
- * @return {Iterator} iterator instance
1249
- */
1250
- var _createIterator = function _createIterator(root) {
1251
- return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);
1252
- };
1253
-
1254
- /**
1255
- * _isClobbered
1256
- *
1257
- * @param {Node} elm element to check for clobbering attacks
1258
- * @return {Boolean} true if clobbered, false if safe
1259
- */
1260
- var _isClobbered = function _isClobbered(elm) {
1261
- if (elm instanceof Text || elm instanceof Comment) {
1262
- return false;
1263
- }
1264
-
1265
- if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function') {
1266
- return true;
1267
- }
1268
-
1269
- return false;
1270
- };
1271
-
1272
- /**
1273
- * _isNode
1274
- *
1275
- * @param {Node} obj object to check whether it's a DOM node
1276
- * @return {Boolean} true is object is a DOM node
1277
- */
1278
- var _isNode = function _isNode(object) {
1279
- return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
1280
- };
1281
-
1282
- /**
1283
- * _executeHook
1284
- * Execute user configurable hooks
1285
- *
1286
- * @param {String} entryPoint Name of the hook's entry point
1287
- * @param {Node} currentNode node to work on with the hook
1288
- * @param {Object} data additional hook parameters
1289
- */
1290
- var _executeHook = function _executeHook(entryPoint, currentNode, data) {
1291
- if (!hooks[entryPoint]) {
1292
- return;
1293
- }
1294
-
1295
- arrayForEach(hooks[entryPoint], function (hook) {
1296
- hook.call(DOMPurify, currentNode, data, CONFIG);
1297
- });
1298
- };
1299
-
1300
- /**
1301
- * _sanitizeElements
1302
- *
1303
- * @protect nodeName
1304
- * @protect textContent
1305
- * @protect removeChild
1306
- *
1307
- * @param {Node} currentNode to check for permission to exist
1308
- * @return {Boolean} true if node was killed, false if left alive
1309
- */
1310
- var _sanitizeElements = function _sanitizeElements(currentNode) {
1311
- var content = void 0;
1312
-
1313
- /* Execute a hook if present */
1314
- _executeHook('beforeSanitizeElements', currentNode, null);
1315
-
1316
- /* Check if element is clobbered or can clobber */
1317
- if (_isClobbered(currentNode)) {
1318
- _forceRemove(currentNode);
1319
- return true;
1320
- }
1321
-
1322
- /* Check if tagname contains Unicode */
1323
- if (stringMatch(currentNode.nodeName, /[\u0080-\uFFFF]/)) {
1324
- _forceRemove(currentNode);
1325
- return true;
1326
- }
1327
-
1328
- /* Now let's check the element's type and name */
1329
- var tagName = stringToLowerCase(currentNode.nodeName);
1330
-
1331
- /* Execute a hook if present */
1332
- _executeHook('uponSanitizeElement', currentNode, {
1333
- tagName: tagName,
1334
- allowedTags: ALLOWED_TAGS
1335
- });
1336
-
1337
- /* Detect mXSS attempts abusing namespace confusion */
1338
- if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
1339
- _forceRemove(currentNode);
1340
- return true;
1341
- }
1342
-
1343
- /* Remove element if anything forbids its presence */
1344
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1345
- /* Keep content except for bad-listed elements */
1346
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
1347
- var parentNode = getParentNode(currentNode) || currentNode.parentNode;
1348
- var childNodes = getChildNodes(currentNode) || currentNode.childNodes;
1349
-
1350
- if (childNodes && parentNode) {
1351
- var childCount = childNodes.length;
1352
-
1353
- for (var i = childCount - 1; i >= 0; --i) {
1354
- parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
1355
- }
1356
- }
1357
- }
1358
-
1359
- _forceRemove(currentNode);
1360
- return true;
1361
- }
1362
-
1363
- /* Check whether element has a valid namespace */
1364
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
1365
- _forceRemove(currentNode);
1366
- return true;
1367
- }
1368
-
1369
- if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) {
1370
- _forceRemove(currentNode);
1371
- return true;
1372
- }
1373
-
1374
- /* Sanitize element content to be template-safe */
1375
- if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
1376
- /* Get the element's text content */
1377
- content = currentNode.textContent;
1378
- content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');
1379
- content = stringReplace(content, ERB_EXPR$$1, ' ');
1380
- if (currentNode.textContent !== content) {
1381
- arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
1382
- currentNode.textContent = content;
1383
- }
1384
- }
1385
-
1386
- /* Execute a hook if present */
1387
- _executeHook('afterSanitizeElements', currentNode, null);
1388
-
1389
- return false;
1390
- };
1391
-
1392
- /**
1393
- * _isValidAttribute
1394
- *
1395
- * @param {string} lcTag Lowercase tag name of containing element.
1396
- * @param {string} lcName Lowercase attribute name.
1397
- * @param {string} value Attribute value.
1398
- * @return {Boolean} Returns true if `value` is valid, otherwise false.
1399
- */
1400
- // eslint-disable-next-line complexity
1401
- var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1402
- /* Make sure attribute cannot clobber */
1403
- if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1404
- return false;
1405
- }
1406
-
1407
- /* Allow valid data-* attributes: At least one character after "-"
1408
- (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1409
- XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1410
- We don't need to check the value; it's always URI safe. */
1411
- if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1412
- return false;
1413
-
1414
- /* Check value is safe. First, is attr inert? If so, is safe */
1415
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else {
1416
- return false;
1417
- }
1418
-
1419
- return true;
1420
- };
1421
-
1422
- /**
1423
- * _sanitizeAttributes
1424
- *
1425
- * @protect attributes
1426
- * @protect nodeName
1427
- * @protect removeAttribute
1428
- * @protect setAttribute
1429
- *
1430
- * @param {Node} currentNode to sanitize
1431
- */
1432
- var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1433
- var attr = void 0;
1434
- var value = void 0;
1435
- var lcName = void 0;
1436
- var l = void 0;
1437
- /* Execute a hook if present */
1438
- _executeHook('beforeSanitizeAttributes', currentNode, null);
1439
-
1440
- var attributes = currentNode.attributes;
1441
-
1442
- /* Check if we have attributes; if not we might have a text node */
1443
-
1444
- if (!attributes) {
1445
- return;
1446
- }
1447
-
1448
- var hookEvent = {
1449
- attrName: '',
1450
- attrValue: '',
1451
- keepAttr: true,
1452
- allowedAttributes: ALLOWED_ATTR
1453
- };
1454
- l = attributes.length;
1455
-
1456
- /* Go backwards over all attributes; safely remove bad ones */
1457
- while (l--) {
1458
- attr = attributes[l];
1459
- var _attr = attr,
1460
- name = _attr.name,
1461
- namespaceURI = _attr.namespaceURI;
1462
-
1463
- value = stringTrim(attr.value);
1464
- lcName = stringToLowerCase(name);
1465
-
1466
- /* Execute a hook if present */
1467
- hookEvent.attrName = lcName;
1468
- hookEvent.attrValue = value;
1469
- hookEvent.keepAttr = true;
1470
- hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1471
- _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
1472
- value = hookEvent.attrValue;
1473
- /* Did the hooks approve of the attribute? */
1474
- if (hookEvent.forceKeepAttr) {
1475
- continue;
1476
- }
1477
-
1478
- /* Remove attribute */
1479
- _removeAttribute(name, currentNode);
1480
-
1481
- /* Did the hooks approve of the attribute? */
1482
- if (!hookEvent.keepAttr) {
1483
- continue;
1484
- }
1485
-
1486
- /* Work around a security issue in jQuery 3.0 */
1487
- if (regExpTest(/\/>/i, value)) {
1488
- _removeAttribute(name, currentNode);
1489
- continue;
1490
- }
1491
-
1492
- /* Sanitize attribute content to be template-safe */
1493
- if (SAFE_FOR_TEMPLATES) {
1494
- value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');
1495
- value = stringReplace(value, ERB_EXPR$$1, ' ');
1496
- }
1497
-
1498
- /* Is `value` valid for this attribute? */
1499
- var lcTag = currentNode.nodeName.toLowerCase();
1500
- if (!_isValidAttribute(lcTag, lcName, value)) {
1501
- continue;
1502
- }
1503
-
1504
- /* Handle invalid data-* attribute set by try-catching it */
1505
- try {
1506
- if (namespaceURI) {
1507
- currentNode.setAttributeNS(namespaceURI, name, value);
1508
- } else {
1509
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1510
- currentNode.setAttribute(name, value);
1511
- }
1512
-
1513
- arrayPop(DOMPurify.removed);
1514
- } catch (_) {}
1515
- }
1516
-
1517
- /* Execute a hook if present */
1518
- _executeHook('afterSanitizeAttributes', currentNode, null);
1519
- };
1520
-
1521
- /**
1522
- * _sanitizeShadowDOM
1523
- *
1524
- * @param {DocumentFragment} fragment to iterate over recursively
1525
- */
1526
- var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1527
- var shadowNode = void 0;
1528
- var shadowIterator = _createIterator(fragment);
1529
-
1530
- /* Execute a hook if present */
1531
- _executeHook('beforeSanitizeShadowDOM', fragment, null);
1532
-
1533
- while (shadowNode = shadowIterator.nextNode()) {
1534
- /* Execute a hook if present */
1535
- _executeHook('uponSanitizeShadowNode', shadowNode, null);
1536
-
1537
- /* Sanitize tags and elements */
1538
- if (_sanitizeElements(shadowNode)) {
1539
- continue;
1540
- }
1541
-
1542
- /* Deep shadow DOM detected */
1543
- if (shadowNode.content instanceof DocumentFragment) {
1544
- _sanitizeShadowDOM(shadowNode.content);
1545
- }
1546
-
1547
- /* Check attributes, sanitize if necessary */
1548
- _sanitizeAttributes(shadowNode);
1549
- }
1550
-
1551
- /* Execute a hook if present */
1552
- _executeHook('afterSanitizeShadowDOM', fragment, null);
1553
- };
1554
-
1555
- /**
1556
- * Sanitize
1557
- * Public method providing core sanitation functionality
1558
- *
1559
- * @param {String|Node} dirty string or DOM node
1560
- * @param {Object} configuration object
1561
- */
1562
- // eslint-disable-next-line complexity
1563
- DOMPurify.sanitize = function (dirty, cfg) {
1564
- var body = void 0;
1565
- var importedNode = void 0;
1566
- var currentNode = void 0;
1567
- var oldNode = void 0;
1568
- var returnNode = void 0;
1569
- /* Make sure we have a string to sanitize.
1570
- DO NOT return early, as this will return the wrong type if
1571
- the user has requested a DOM object rather than a string */
1572
- IS_EMPTY_INPUT = !dirty;
1573
- if (IS_EMPTY_INPUT) {
1574
- dirty = '<!-->';
1575
- }
1576
-
1577
- /* Stringify, in case dirty is an object */
1578
- if (typeof dirty !== 'string' && !_isNode(dirty)) {
1579
- // eslint-disable-next-line no-negated-condition
1580
- if (typeof dirty.toString !== 'function') {
1581
- throw typeErrorCreate('toString is not a function');
1582
- } else {
1583
- dirty = dirty.toString();
1584
- if (typeof dirty !== 'string') {
1585
- throw typeErrorCreate('dirty is not a string, aborting');
1586
- }
1587
- }
1588
- }
1589
-
1590
- /* Check we can run. Otherwise fall back or ignore */
1591
- if (!DOMPurify.isSupported) {
1592
- if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {
1593
- if (typeof dirty === 'string') {
1594
- return window.toStaticHTML(dirty);
1595
- }
1596
-
1597
- if (_isNode(dirty)) {
1598
- return window.toStaticHTML(dirty.outerHTML);
1599
- }
1600
- }
1601
-
1602
- return dirty;
1603
- }
1604
-
1605
- /* Assign config vars */
1606
- if (!SET_CONFIG) {
1607
- _parseConfig(cfg);
1608
- }
1609
-
1610
- /* Clean up removed elements */
1611
- DOMPurify.removed = [];
1612
-
1613
- /* Check if dirty is correctly typed for IN_PLACE */
1614
- if (typeof dirty === 'string') {
1615
- IN_PLACE = false;
1616
- }
1617
-
1618
- if (IN_PLACE) ; else if (dirty instanceof Node) {
1619
- /* If dirty is a DOM element, append to an empty document to avoid
1620
- elements being stripped by the parser */
1621
- body = _initDocument('<!---->');
1622
- importedNode = body.ownerDocument.importNode(dirty, true);
1623
- if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
1624
- /* Node is already a body, use as is */
1625
- body = importedNode;
1626
- } else if (importedNode.nodeName === 'HTML') {
1627
- body = importedNode;
1628
- } else {
1629
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1630
- body.appendChild(importedNode);
1631
- }
1632
- } else {
1633
- /* Exit directly if we have nothing to do */
1634
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1635
- // eslint-disable-next-line unicorn/prefer-includes
1636
- dirty.indexOf('<') === -1) {
1637
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1638
- }
1639
-
1640
- /* Initialize the document to work on */
1641
- body = _initDocument(dirty);
1642
-
1643
- /* Check we have a DOM node from the data */
1644
- if (!body) {
1645
- return RETURN_DOM ? null : emptyHTML;
1646
- }
1647
- }
1648
-
1649
- /* Remove first element node (ours) if FORCE_BODY is set */
1650
- if (body && FORCE_BODY) {
1651
- _forceRemove(body.firstChild);
1652
- }
1653
-
1654
- /* Get node iterator */
1655
- var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
1656
-
1657
- /* Now start iterating over the created document */
1658
- while (currentNode = nodeIterator.nextNode()) {
1659
- /* Fix IE's strange behavior with manipulated textNodes #89 */
1660
- if (currentNode.nodeType === 3 && currentNode === oldNode) {
1661
- continue;
1662
- }
1663
-
1664
- /* Sanitize tags and elements */
1665
- if (_sanitizeElements(currentNode)) {
1666
- continue;
1667
- }
1668
-
1669
- /* Shadow DOM detected, sanitize it */
1670
- if (currentNode.content instanceof DocumentFragment) {
1671
- _sanitizeShadowDOM(currentNode.content);
1672
- }
1673
-
1674
- /* Check attributes, sanitize if necessary */
1675
- _sanitizeAttributes(currentNode);
1676
-
1677
- oldNode = currentNode;
1678
- }
1679
-
1680
- oldNode = null;
1681
-
1682
- /* If we sanitized `dirty` in-place, return it. */
1683
- if (IN_PLACE) {
1684
- return dirty;
1685
- }
1686
-
1687
- /* Return sanitized string or DOM */
1688
- if (RETURN_DOM) {
1689
- if (RETURN_DOM_FRAGMENT) {
1690
- returnNode = createDocumentFragment.call(body.ownerDocument);
1691
-
1692
- while (body.firstChild) {
1693
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1694
- returnNode.appendChild(body.firstChild);
1695
- }
1696
- } else {
1697
- returnNode = body;
1698
- }
1699
-
1700
- if (RETURN_DOM_IMPORT) {
1701
- /*
1702
- AdoptNode() is not used because internal state is not reset
1703
- (e.g. the past names map of a HTMLFormElement), this is safe
1704
- in theory but we would rather not risk another attack vector.
1705
- The state that is cloned by importNode() is explicitly defined
1706
- by the specs.
1707
- */
1708
- returnNode = importNode.call(originalDocument, returnNode, true);
1709
- }
1710
-
1711
- return returnNode;
1712
- }
1713
-
1714
- var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1715
-
1716
- /* Sanitize final string template-safe */
1717
- if (SAFE_FOR_TEMPLATES) {
1718
- serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');
1719
- serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');
1720
- }
1721
-
1722
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1723
- };
1724
-
1725
- /**
1726
- * Public method to set the configuration once
1727
- * setConfig
1728
- *
1729
- * @param {Object} cfg configuration object
1730
- */
1731
- DOMPurify.setConfig = function (cfg) {
1732
- _parseConfig(cfg);
1733
- SET_CONFIG = true;
1734
- };
1735
-
1736
- /**
1737
- * Public method to remove the configuration
1738
- * clearConfig
1739
- *
1740
- */
1741
- DOMPurify.clearConfig = function () {
1742
- CONFIG = null;
1743
- SET_CONFIG = false;
1744
- };
1745
-
1746
- /**
1747
- * Public method to check if an attribute value is valid.
1748
- * Uses last set config, if any. Otherwise, uses config defaults.
1749
- * isValidAttribute
1750
- *
1751
- * @param {string} tag Tag name of containing element.
1752
- * @param {string} attr Attribute name.
1753
- * @param {string} value Attribute value.
1754
- * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
1755
- */
1756
- DOMPurify.isValidAttribute = function (tag, attr, value) {
1757
- /* Initialize shared config vars if necessary. */
1758
- if (!CONFIG) {
1759
- _parseConfig({});
1760
- }
1761
-
1762
- var lcTag = stringToLowerCase(tag);
1763
- var lcName = stringToLowerCase(attr);
1764
- return _isValidAttribute(lcTag, lcName, value);
1765
- };
1766
-
1767
- /**
1768
- * AddHook
1769
- * Public method to add DOMPurify hooks
1770
- *
1771
- * @param {String} entryPoint entry point for the hook to add
1772
- * @param {Function} hookFunction function to execute
1773
- */
1774
- DOMPurify.addHook = function (entryPoint, hookFunction) {
1775
- if (typeof hookFunction !== 'function') {
1776
- return;
1777
- }
1778
-
1779
- hooks[entryPoint] = hooks[entryPoint] || [];
1780
- arrayPush(hooks[entryPoint], hookFunction);
1781
- };
1782
-
1783
- /**
1784
- * RemoveHook
1785
- * Public method to remove a DOMPurify hook at a given entryPoint
1786
- * (pops it from the stack of hooks if more are present)
1787
- *
1788
- * @param {String} entryPoint entry point for the hook to remove
1789
- */
1790
- DOMPurify.removeHook = function (entryPoint) {
1791
- if (hooks[entryPoint]) {
1792
- arrayPop(hooks[entryPoint]);
1793
- }
1794
- };
1795
-
1796
- /**
1797
- * RemoveHooks
1798
- * Public method to remove all DOMPurify hooks at a given entryPoint
1799
- *
1800
- * @param {String} entryPoint entry point for the hooks to remove
1801
- */
1802
- DOMPurify.removeHooks = function (entryPoint) {
1803
- if (hooks[entryPoint]) {
1804
- hooks[entryPoint] = [];
1805
- }
1806
- };
1807
-
1808
- /**
1809
- * RemoveAllHooks
1810
- * Public method to remove all DOMPurify hooks
1811
- *
1812
- */
1813
- DOMPurify.removeAllHooks = function () {
1814
- hooks = {};
1815
- };
1816
-
1817
- return DOMPurify;
1818
- }
1819
-
1820
- var purify = createDOMPurify();
1821
-
1822
- return purify;
1823
-
1824
- }));
1825
- //# sourceMappingURL=purify.js.map
1826
-
1827
-
1828
- /***/ }),
1829
-
1830
- /***/ 6808:
1831
- /***/ ((module, exports, __webpack_require__) => {
1832
-
1833
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1834
- * JavaScript Cookie v2.2.1
1835
- * https://github.com/js-cookie/js-cookie
1836
- *
1837
- * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
1838
- * Released under the MIT license
1839
- */
1840
- ;(function (factory) {
1841
- var registeredInModuleLoader;
1842
- if (true) {
1843
- !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1844
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1845
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
1846
- __WEBPACK_AMD_DEFINE_FACTORY__),
1847
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1848
- registeredInModuleLoader = true;
1849
- }
1850
- if (true) {
1851
- module.exports = factory();
1852
- registeredInModuleLoader = true;
1853
- }
1854
- if (!registeredInModuleLoader) {
1855
- var OldCookies = window.Cookies;
1856
- var api = window.Cookies = factory();
1857
- api.noConflict = function () {
1858
- window.Cookies = OldCookies;
1859
- return api;
1860
- };
1861
- }
1862
- }(function () {
1863
- function extend () {
1864
- var i = 0;
1865
- var result = {};
1866
- for (; i < arguments.length; i++) {
1867
- var attributes = arguments[ i ];
1868
- for (var key in attributes) {
1869
- result[key] = attributes[key];
1870
- }
1871
- }
1872
- return result;
1873
- }
1874
-
1875
- function decode (s) {
1876
- return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
1877
- }
1878
-
1879
- function init (converter) {
1880
- function api() {}
1881
-
1882
- function set (key, value, attributes) {
1883
- if (typeof document === 'undefined') {
1884
- return;
1885
- }
1886
-
1887
- attributes = extend({
1888
- path: '/'
1889
- }, api.defaults, attributes);
1890
-
1891
- if (typeof attributes.expires === 'number') {
1892
- attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
1893
- }
1894
-
1895
- // We're using "expires" because "max-age" is not supported by IE
1896
- attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
1897
-
1898
- try {
1899
- var result = JSON.stringify(value);
1900
- if (/^[\{\[]/.test(result)) {
1901
- value = result;
1902
- }
1903
- } catch (e) {}
1904
-
1905
- value = converter.write ?
1906
- converter.write(value, key) :
1907
- encodeURIComponent(String(value))
1908
- .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
1909
-
1910
- key = encodeURIComponent(String(key))
1911
- .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
1912
- .replace(/[\(\)]/g, escape);
1913
-
1914
- var stringifiedAttributes = '';
1915
- for (var attributeName in attributes) {
1916
- if (!attributes[attributeName]) {
1917
- continue;
1918
- }
1919
- stringifiedAttributes += '; ' + attributeName;
1920
- if (attributes[attributeName] === true) {
1921
- continue;
1922
- }
1923
-
1924
- // Considers RFC 6265 section 5.2:
1925
- // ...
1926
- // 3. If the remaining unparsed-attributes contains a %x3B (";")
1927
- // character:
1928
- // Consume the characters of the unparsed-attributes up to,
1929
- // not including, the first %x3B (";") character.
1930
- // ...
1931
- stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
1932
- }
1933
-
1934
- return (document.cookie = key + '=' + value + stringifiedAttributes);
1935
- }
1936
-
1937
- function get (key, json) {
1938
- if (typeof document === 'undefined') {
1939
- return;
1940
- }
1941
-
1942
- var jar = {};
1943
- // To prevent the for loop in the first place assign an empty array
1944
- // in case there are no cookies at all.
1945
- var cookies = document.cookie ? document.cookie.split('; ') : [];
1946
- var i = 0;
1947
-
1948
- for (; i < cookies.length; i++) {
1949
- var parts = cookies[i].split('=');
1950
- var cookie = parts.slice(1).join('=');
1951
-
1952
- if (!json && cookie.charAt(0) === '"') {
1953
- cookie = cookie.slice(1, -1);
1954
- }
1955
-
1956
- try {
1957
- var name = decode(parts[0]);
1958
- cookie = (converter.read || converter)(cookie, name) ||
1959
- decode(cookie);
1960
-
1961
- if (json) {
1962
- try {
1963
- cookie = JSON.parse(cookie);
1964
- } catch (e) {}
1965
- }
1966
-
1967
- jar[name] = cookie;
1968
-
1969
- if (key === name) {
1970
- break;
1971
- }
1972
- } catch (e) {}
1973
- }
1974
-
1975
- return key ? jar[key] : jar;
1976
- }
1977
-
1978
- api.set = set;
1979
- api.get = function (key) {
1980
- return get(key, false /* read as raw */);
1981
- };
1982
- api.getJSON = function (key) {
1983
- return get(key, true /* read as json */);
1984
- };
1985
- api.remove = function (key, attributes) {
1986
- set(key, '', extend(attributes, {
1987
- expires: -1
1988
- }));
1989
- };
1990
-
1991
- api.defaults = {};
1992
-
1993
- api.withConverter = init;
1994
-
1995
- return api;
1996
- }
1997
-
1998
- return init(function () {});
1999
- }));
539
+ /***/ 6357:
540
+ /***/ ((module) => {
2000
541
 
542
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6357__;
2001
543
 
2002
544
  /***/ }),
2003
545
 
2004
- /***/ 3096:
2005
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2006
-
2007
- /**
2008
- * lodash (Custom Build) <https://lodash.com/>
2009
- * Build: `lodash modularize exports="npm" -o ./`
2010
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
2011
- * Released under MIT license <https://lodash.com/license>
2012
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
2013
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2014
- */
2015
-
2016
- /** Used as the `TypeError` message for "Functions" methods. */
2017
- var FUNC_ERROR_TEXT = 'Expected a function';
2018
-
2019
- /** Used as references for various `Number` constants. */
2020
- var NAN = 0 / 0;
2021
-
2022
- /** `Object#toString` result references. */
2023
- var symbolTag = '[object Symbol]';
2024
-
2025
- /** Used to match leading and trailing whitespace. */
2026
- var reTrim = /^\s+|\s+$/g;
2027
-
2028
- /** Used to detect bad signed hexadecimal string values. */
2029
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
2030
-
2031
- /** Used to detect binary string values. */
2032
- var reIsBinary = /^0b[01]+$/i;
2033
-
2034
- /** Used to detect octal string values. */
2035
- var reIsOctal = /^0o[0-7]+$/i;
2036
-
2037
- /** Built-in method references without a dependency on `root`. */
2038
- var freeParseInt = parseInt;
2039
-
2040
- /** Detect free variable `global` from Node.js. */
2041
- var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
2042
-
2043
- /** Detect free variable `self`. */
2044
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
2045
-
2046
- /** Used as a reference to the global object. */
2047
- var root = freeGlobal || freeSelf || Function('return this')();
2048
-
2049
- /** Used for built-in method references. */
2050
- var objectProto = Object.prototype;
2051
-
2052
- /**
2053
- * Used to resolve the
2054
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2055
- * of values.
2056
- */
2057
- var objectToString = objectProto.toString;
2058
-
2059
- /* Built-in method references for those with the same name as other `lodash` methods. */
2060
- var nativeMax = Math.max,
2061
- nativeMin = Math.min;
2062
-
2063
- /**
2064
- * Gets the timestamp of the number of milliseconds that have elapsed since
2065
- * the Unix epoch (1 January 1970 00:00:00 UTC).
2066
- *
2067
- * @static
2068
- * @memberOf _
2069
- * @since 2.4.0
2070
- * @category Date
2071
- * @returns {number} Returns the timestamp.
2072
- * @example
2073
- *
2074
- * _.defer(function(stamp) {
2075
- * console.log(_.now() - stamp);
2076
- * }, _.now());
2077
- * // => Logs the number of milliseconds it took for the deferred invocation.
2078
- */
2079
- var now = function() {
2080
- return root.Date.now();
2081
- };
2082
-
2083
- /**
2084
- * Creates a debounced function that delays invoking `func` until after `wait`
2085
- * milliseconds have elapsed since the last time the debounced function was
2086
- * invoked. The debounced function comes with a `cancel` method to cancel
2087
- * delayed `func` invocations and a `flush` method to immediately invoke them.
2088
- * Provide `options` to indicate whether `func` should be invoked on the
2089
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
2090
- * with the last arguments provided to the debounced function. Subsequent
2091
- * calls to the debounced function return the result of the last `func`
2092
- * invocation.
2093
- *
2094
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
2095
- * invoked on the trailing edge of the timeout only if the debounced function
2096
- * is invoked more than once during the `wait` timeout.
2097
- *
2098
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
2099
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
2100
- *
2101
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
2102
- * for details over the differences between `_.debounce` and `_.throttle`.
2103
- *
2104
- * @static
2105
- * @memberOf _
2106
- * @since 0.1.0
2107
- * @category Function
2108
- * @param {Function} func The function to debounce.
2109
- * @param {number} [wait=0] The number of milliseconds to delay.
2110
- * @param {Object} [options={}] The options object.
2111
- * @param {boolean} [options.leading=false]
2112
- * Specify invoking on the leading edge of the timeout.
2113
- * @param {number} [options.maxWait]
2114
- * The maximum time `func` is allowed to be delayed before it's invoked.
2115
- * @param {boolean} [options.trailing=true]
2116
- * Specify invoking on the trailing edge of the timeout.
2117
- * @returns {Function} Returns the new debounced function.
2118
- * @example
2119
- *
2120
- * // Avoid costly calculations while the window size is in flux.
2121
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
2122
- *
2123
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
2124
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
2125
- * 'leading': true,
2126
- * 'trailing': false
2127
- * }));
2128
- *
2129
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
2130
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
2131
- * var source = new EventSource('/stream');
2132
- * jQuery(source).on('message', debounced);
2133
- *
2134
- * // Cancel the trailing debounced invocation.
2135
- * jQuery(window).on('popstate', debounced.cancel);
2136
- */
2137
- function debounce(func, wait, options) {
2138
- var lastArgs,
2139
- lastThis,
2140
- maxWait,
2141
- result,
2142
- timerId,
2143
- lastCallTime,
2144
- lastInvokeTime = 0,
2145
- leading = false,
2146
- maxing = false,
2147
- trailing = true;
2148
-
2149
- if (typeof func != 'function') {
2150
- throw new TypeError(FUNC_ERROR_TEXT);
2151
- }
2152
- wait = toNumber(wait) || 0;
2153
- if (isObject(options)) {
2154
- leading = !!options.leading;
2155
- maxing = 'maxWait' in options;
2156
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
2157
- trailing = 'trailing' in options ? !!options.trailing : trailing;
2158
- }
2159
-
2160
- function invokeFunc(time) {
2161
- var args = lastArgs,
2162
- thisArg = lastThis;
2163
-
2164
- lastArgs = lastThis = undefined;
2165
- lastInvokeTime = time;
2166
- result = func.apply(thisArg, args);
2167
- return result;
2168
- }
2169
-
2170
- function leadingEdge(time) {
2171
- // Reset any `maxWait` timer.
2172
- lastInvokeTime = time;
2173
- // Start the timer for the trailing edge.
2174
- timerId = setTimeout(timerExpired, wait);
2175
- // Invoke the leading edge.
2176
- return leading ? invokeFunc(time) : result;
2177
- }
2178
-
2179
- function remainingWait(time) {
2180
- var timeSinceLastCall = time - lastCallTime,
2181
- timeSinceLastInvoke = time - lastInvokeTime,
2182
- result = wait - timeSinceLastCall;
2183
-
2184
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
2185
- }
2186
-
2187
- function shouldInvoke(time) {
2188
- var timeSinceLastCall = time - lastCallTime,
2189
- timeSinceLastInvoke = time - lastInvokeTime;
2190
-
2191
- // Either this is the first call, activity has stopped and we're at the
2192
- // trailing edge, the system time has gone backwards and we're treating
2193
- // it as the trailing edge, or we've hit the `maxWait` limit.
2194
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
2195
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
2196
- }
2197
-
2198
- function timerExpired() {
2199
- var time = now();
2200
- if (shouldInvoke(time)) {
2201
- return trailingEdge(time);
2202
- }
2203
- // Restart the timer.
2204
- timerId = setTimeout(timerExpired, remainingWait(time));
2205
- }
2206
-
2207
- function trailingEdge(time) {
2208
- timerId = undefined;
2209
-
2210
- // Only invoke if we have `lastArgs` which means `func` has been
2211
- // debounced at least once.
2212
- if (trailing && lastArgs) {
2213
- return invokeFunc(time);
2214
- }
2215
- lastArgs = lastThis = undefined;
2216
- return result;
2217
- }
2218
-
2219
- function cancel() {
2220
- if (timerId !== undefined) {
2221
- clearTimeout(timerId);
2222
- }
2223
- lastInvokeTime = 0;
2224
- lastArgs = lastCallTime = lastThis = timerId = undefined;
2225
- }
2226
-
2227
- function flush() {
2228
- return timerId === undefined ? result : trailingEdge(now());
2229
- }
2230
-
2231
- function debounced() {
2232
- var time = now(),
2233
- isInvoking = shouldInvoke(time);
2234
-
2235
- lastArgs = arguments;
2236
- lastThis = this;
2237
- lastCallTime = time;
2238
-
2239
- if (isInvoking) {
2240
- if (timerId === undefined) {
2241
- return leadingEdge(lastCallTime);
2242
- }
2243
- if (maxing) {
2244
- // Handle invocations in a tight loop.
2245
- timerId = setTimeout(timerExpired, wait);
2246
- return invokeFunc(lastCallTime);
2247
- }
2248
- }
2249
- if (timerId === undefined) {
2250
- timerId = setTimeout(timerExpired, wait);
2251
- }
2252
- return result;
2253
- }
2254
- debounced.cancel = cancel;
2255
- debounced.flush = flush;
2256
- return debounced;
2257
- }
2258
-
2259
- /**
2260
- * Creates a throttled function that only invokes `func` at most once per
2261
- * every `wait` milliseconds. The throttled function comes with a `cancel`
2262
- * method to cancel delayed `func` invocations and a `flush` method to
2263
- * immediately invoke them. Provide `options` to indicate whether `func`
2264
- * should be invoked on the leading and/or trailing edge of the `wait`
2265
- * timeout. The `func` is invoked with the last arguments provided to the
2266
- * throttled function. Subsequent calls to the throttled function return the
2267
- * result of the last `func` invocation.
2268
- *
2269
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
2270
- * invoked on the trailing edge of the timeout only if the throttled function
2271
- * is invoked more than once during the `wait` timeout.
2272
- *
2273
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
2274
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
2275
- *
2276
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
2277
- * for details over the differences between `_.throttle` and `_.debounce`.
2278
- *
2279
- * @static
2280
- * @memberOf _
2281
- * @since 0.1.0
2282
- * @category Function
2283
- * @param {Function} func The function to throttle.
2284
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
2285
- * @param {Object} [options={}] The options object.
2286
- * @param {boolean} [options.leading=true]
2287
- * Specify invoking on the leading edge of the timeout.
2288
- * @param {boolean} [options.trailing=true]
2289
- * Specify invoking on the trailing edge of the timeout.
2290
- * @returns {Function} Returns the new throttled function.
2291
- * @example
2292
- *
2293
- * // Avoid excessively updating the position while scrolling.
2294
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
2295
- *
2296
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
2297
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
2298
- * jQuery(element).on('click', throttled);
2299
- *
2300
- * // Cancel the trailing throttled invocation.
2301
- * jQuery(window).on('popstate', throttled.cancel);
2302
- */
2303
- function throttle(func, wait, options) {
2304
- var leading = true,
2305
- trailing = true;
2306
-
2307
- if (typeof func != 'function') {
2308
- throw new TypeError(FUNC_ERROR_TEXT);
2309
- }
2310
- if (isObject(options)) {
2311
- leading = 'leading' in options ? !!options.leading : leading;
2312
- trailing = 'trailing' in options ? !!options.trailing : trailing;
2313
- }
2314
- return debounce(func, wait, {
2315
- 'leading': leading,
2316
- 'maxWait': wait,
2317
- 'trailing': trailing
2318
- });
2319
- }
2320
-
2321
- /**
2322
- * Checks if `value` is the
2323
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
2324
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
2325
- *
2326
- * @static
2327
- * @memberOf _
2328
- * @since 0.1.0
2329
- * @category Lang
2330
- * @param {*} value The value to check.
2331
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
2332
- * @example
2333
- *
2334
- * _.isObject({});
2335
- * // => true
2336
- *
2337
- * _.isObject([1, 2, 3]);
2338
- * // => true
2339
- *
2340
- * _.isObject(_.noop);
2341
- * // => true
2342
- *
2343
- * _.isObject(null);
2344
- * // => false
2345
- */
2346
- function isObject(value) {
2347
- var type = typeof value;
2348
- return !!value && (type == 'object' || type == 'function');
2349
- }
2350
-
2351
- /**
2352
- * Checks if `value` is object-like. A value is object-like if it's not `null`
2353
- * and has a `typeof` result of "object".
2354
- *
2355
- * @static
2356
- * @memberOf _
2357
- * @since 4.0.0
2358
- * @category Lang
2359
- * @param {*} value The value to check.
2360
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2361
- * @example
2362
- *
2363
- * _.isObjectLike({});
2364
- * // => true
2365
- *
2366
- * _.isObjectLike([1, 2, 3]);
2367
- * // => true
2368
- *
2369
- * _.isObjectLike(_.noop);
2370
- * // => false
2371
- *
2372
- * _.isObjectLike(null);
2373
- * // => false
2374
- */
2375
- function isObjectLike(value) {
2376
- return !!value && typeof value == 'object';
2377
- }
2378
-
2379
- /**
2380
- * Checks if `value` is classified as a `Symbol` primitive or object.
2381
- *
2382
- * @static
2383
- * @memberOf _
2384
- * @since 4.0.0
2385
- * @category Lang
2386
- * @param {*} value The value to check.
2387
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2388
- * @example
2389
- *
2390
- * _.isSymbol(Symbol.iterator);
2391
- * // => true
2392
- *
2393
- * _.isSymbol('abc');
2394
- * // => false
2395
- */
2396
- function isSymbol(value) {
2397
- return typeof value == 'symbol' ||
2398
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
2399
- }
2400
-
2401
- /**
2402
- * Converts `value` to a number.
2403
- *
2404
- * @static
2405
- * @memberOf _
2406
- * @since 4.0.0
2407
- * @category Lang
2408
- * @param {*} value The value to process.
2409
- * @returns {number} Returns the number.
2410
- * @example
2411
- *
2412
- * _.toNumber(3.2);
2413
- * // => 3.2
2414
- *
2415
- * _.toNumber(Number.MIN_VALUE);
2416
- * // => 5e-324
2417
- *
2418
- * _.toNumber(Infinity);
2419
- * // => Infinity
2420
- *
2421
- * _.toNumber('3.2');
2422
- * // => 3.2
2423
- */
2424
- function toNumber(value) {
2425
- if (typeof value == 'number') {
2426
- return value;
2427
- }
2428
- if (isSymbol(value)) {
2429
- return NAN;
2430
- }
2431
- if (isObject(value)) {
2432
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
2433
- value = isObject(other) ? (other + '') : other;
2434
- }
2435
- if (typeof value != 'string') {
2436
- return value === 0 ? value : +value;
2437
- }
2438
- value = value.replace(reTrim, '');
2439
- var isBinary = reIsBinary.test(value);
2440
- return (isBinary || reIsOctal.test(value))
2441
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
2442
- : (reIsBadHex.test(value) ? NAN : +value);
2443
- }
2444
-
2445
- module.exports = throttle;
546
+ /***/ 9349:
547
+ /***/ ((module) => {
2446
548
 
549
+ module.exports = __WEBPACK_EXTERNAL_MODULE__9349__;
2447
550
 
2448
551
  /***/ }),
2449
552
 
2450
- /***/ 2703:
2451
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2452
-
2453
- "use strict";
2454
- /**
2455
- * Copyright (c) 2013-present, Facebook, Inc.
2456
- *
2457
- * This source code is licensed under the MIT license found in the
2458
- * LICENSE file in the root directory of this source tree.
2459
- */
2460
-
2461
-
2462
-
2463
- var ReactPropTypesSecret = __webpack_require__(414);
2464
-
2465
- function emptyFunction() {}
2466
- function emptyFunctionWithReset() {}
2467
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
2468
-
2469
- module.exports = function() {
2470
- function shim(props, propName, componentName, location, propFullName, secret) {
2471
- if (secret === ReactPropTypesSecret) {
2472
- // It is still safe when called from React.
2473
- return;
2474
- }
2475
- var err = new Error(
2476
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
2477
- 'Use PropTypes.checkPropTypes() to call them. ' +
2478
- 'Read more at http://fb.me/use-check-prop-types'
2479
- );
2480
- err.name = 'Invariant Violation';
2481
- throw err;
2482
- };
2483
- shim.isRequired = shim;
2484
- function getShim() {
2485
- return shim;
2486
- };
2487
- // Important!
2488
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
2489
- var ReactPropTypes = {
2490
- array: shim,
2491
- bool: shim,
2492
- func: shim,
2493
- number: shim,
2494
- object: shim,
2495
- string: shim,
2496
- symbol: shim,
2497
-
2498
- any: shim,
2499
- arrayOf: getShim,
2500
- element: shim,
2501
- elementType: shim,
2502
- instanceOf: getShim,
2503
- node: shim,
2504
- objectOf: getShim,
2505
- oneOf: getShim,
2506
- oneOfType: getShim,
2507
- shape: getShim,
2508
- exact: getShim,
2509
-
2510
- checkPropTypes: emptyFunctionWithReset,
2511
- resetWarningCache: emptyFunction
2512
- };
2513
-
2514
- ReactPropTypes.PropTypes = ReactPropTypes;
2515
-
2516
- return ReactPropTypes;
2517
- };
553
+ /***/ 2040:
554
+ /***/ ((module) => {
2518
555
 
556
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2040__;
2519
557
 
2520
558
  /***/ }),
2521
559
 
2522
- /***/ 5697:
2523
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2524
-
2525
- /**
2526
- * Copyright (c) 2013-present, Facebook, Inc.
2527
- *
2528
- * This source code is licensed under the MIT license found in the
2529
- * LICENSE file in the root directory of this source tree.
2530
- */
2531
-
2532
- if (false) { var throwOnDirectAccess, ReactIs; } else {
2533
- // By explicitly using `prop-types` you are opting into new production behavior.
2534
- // http://fb.me/prop-types-in-prod
2535
- module.exports = __webpack_require__(2703)();
2536
- }
560
+ /***/ 3474:
561
+ /***/ ((module) => {
2537
562
 
563
+ module.exports = __WEBPACK_EXTERNAL_MODULE__3474__;
2538
564
 
2539
565
  /***/ }),
2540
566
 
2541
- /***/ 414:
567
+ /***/ 9281:
2542
568
  /***/ ((module) => {
2543
569
 
2544
- "use strict";
2545
- /**
2546
- * Copyright (c) 2013-present, Facebook, Inc.
2547
- *
2548
- * This source code is licensed under the MIT license found in the
2549
- * LICENSE file in the root directory of this source tree.
2550
- */
2551
-
2552
-
2553
-
2554
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2555
-
2556
- module.exports = ReactPropTypesSecret;
2557
-
570
+ module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
2558
571
 
2559
572
  /***/ }),
2560
573
 
2561
- /***/ 9281:
574
+ /***/ 5044:
2562
575
  /***/ ((module) => {
2563
576
 
2564
- "use strict";
2565
- module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
577
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5044__;
2566
578
 
2567
579
  /***/ })
2568
580
 
@@ -2586,7 +598,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
2586
598
  /******/ };
2587
599
  /******/
2588
600
  /******/ // Execute the module function
2589
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
601
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2590
602
  /******/
2591
603
  /******/ // Return the exports of the module
2592
604
  /******/ return module.exports;
@@ -2617,18 +629,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
2617
629
  /******/ };
2618
630
  /******/ })();
2619
631
  /******/
2620
- /******/ /* webpack/runtime/global */
2621
- /******/ (() => {
2622
- /******/ __webpack_require__.g = (function() {
2623
- /******/ if (typeof globalThis === 'object') return globalThis;
2624
- /******/ try {
2625
- /******/ return this || new Function('return this')();
2626
- /******/ } catch (e) {
2627
- /******/ if (typeof window === 'object') return window;
2628
- /******/ }
2629
- /******/ })();
2630
- /******/ })();
2631
- /******/
2632
632
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
2633
633
  /******/ (() => {
2634
634
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
@@ -2647,9 +647,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
2647
647
  /******/
2648
648
  /************************************************************************/
2649
649
  var __webpack_exports__ = {};
2650
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
650
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
2651
651
  (() => {
2652
- "use strict";
2653
652
  // ESM COMPAT FLAG
2654
653
  __webpack_require__.r(__webpack_exports__);
2655
654
 
@@ -2661,19 +660,19 @@ __webpack_require__.d(__webpack_exports__, {
2661
660
  // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react"}
2662
661
  var external_commonjs_react_commonjs2_react_ = __webpack_require__(9281);
2663
662
  var external_commonjs_react_commonjs2_react_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_);
2664
- // EXTERNAL MODULE: ./node_modules/prop-types/index.js
2665
- var prop_types = __webpack_require__(5697);
2666
- var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
2667
- // EXTERNAL MODULE: ./node_modules/js-cookie/src/js.cookie.js
2668
- var js_cookie = __webpack_require__(6808);
2669
- var js_cookie_default = /*#__PURE__*/__webpack_require__.n(js_cookie);
2670
- // EXTERNAL MODULE: ./node_modules/lodash.throttle/index.js
2671
- var lodash_throttle = __webpack_require__(3096);
2672
- var lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(lodash_throttle);
663
+ // EXTERNAL MODULE: external {"commonjs":"prop-types","commonjs2":"prop-types"}
664
+ var external_commonjs_prop_types_commonjs2_prop_types_ = __webpack_require__(3474);
665
+ var external_commonjs_prop_types_commonjs2_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_prop_types_commonjs2_prop_types_);
666
+ // EXTERNAL MODULE: external {"commonjs":"js-cookie","commonjs2":"js-cookie"}
667
+ var external_commonjs_js_cookie_commonjs2_js_cookie_ = __webpack_require__(9349);
668
+ var external_commonjs_js_cookie_commonjs2_js_cookie_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_js_cookie_commonjs2_js_cookie_);
669
+ // EXTERNAL MODULE: external {"commonjs":"lodash.throttle","commonjs2":"lodash.throttle"}
670
+ var external_commonjs_lodash_throttle_commonjs2_lodash_throttle_ = __webpack_require__(2040);
671
+ var external_commonjs_lodash_throttle_commonjs2_lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_lodash_throttle_commonjs2_lodash_throttle_);
2673
672
  // EXTERNAL MODULE: ./src/core/dom-query.js
2674
673
  var dom_query = __webpack_require__(9581);
2675
- // EXTERNAL MODULE: ./src/core/Flash/component.jsx
2676
- var component = __webpack_require__(4935);
674
+ // EXTERNAL MODULE: ./src/core/Flash/component.jsx + 1 modules
675
+ var component = __webpack_require__(8696);
2677
676
  ;// CONCATENATED MODULE: ./src/core/Notice/component.js
2678
677
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
2679
678
 
@@ -2729,14 +728,14 @@ var showNotice = function showNotice(bannerContainer) {
2729
728
  };
2730
729
 
2731
730
  var setupRememberClosed = function setupRememberClosed(cookieId, noticeId) {
2732
- var cookie = js_cookie_default().get(cookieId) || "";
2733
- js_cookie_default().set(cookieId, "".concat(cookie.replace("".concat(noticeId, ","), "") + noticeId, ","), {
731
+ var cookie = external_commonjs_js_cookie_commonjs2_js_cookie_default().get(cookieId) || "";
732
+ external_commonjs_js_cookie_commonjs2_js_cookie_default().set(cookieId, "".concat(cookie.replace("".concat(noticeId, ","), "") + noticeId, ","), {
2734
733
  expires: COOKIE_EXPIRY
2735
734
  });
2736
735
  };
2737
736
 
2738
737
  var hasBeenClosedBefore = function hasBeenClosedBefore(cookieId, noticeId) {
2739
- return (js_cookie_default().get(cookieId) || "").includes(noticeId);
738
+ return (external_commonjs_js_cookie_commonjs2_js_cookie_default().get(cookieId) || "").includes(noticeId);
2740
739
  };
2741
740
 
2742
741
  var setupNoticeCollapse = function setupNoticeCollapse(bannerContainer) {
@@ -2746,7 +745,7 @@ var setupNoticeCollapse = function setupNoticeCollapse(bannerContainer) {
2746
745
  hideNotice(bannerContainer);
2747
746
  }
2748
747
 
2749
- var listener = lodash_throttle_default()(function () {
748
+ var listener = external_commonjs_lodash_throttle_commonjs2_lodash_throttle_default()(function () {
2750
749
  var scrollTop = window.scrollY;
2751
750
 
2752
751
  if (scrollTop > COLLAPSE_TRIGGER_DISTANCE) {
@@ -2778,7 +777,7 @@ var setupCloseBtn = function setupCloseBtn(bannerContainer, cookieId, noticeId,
2778
777
  };
2779
778
 
2780
779
  var resizeHandler = function resizeHandler(bannerContainer) {
2781
- var handler = lodash_throttle_default()(function () {
780
+ var handler = external_commonjs_lodash_throttle_commonjs2_lodash_throttle_default()(function () {
2782
781
  hideOnMobile(bannerContainer);
2783
782
  }, RESIZE_LISTENER_THROTTLE);
2784
783
  window.addEventListener("resize", handler);
@@ -2839,8 +838,8 @@ var ContentWrapper = function ContentWrapper(_ref) {
2839
838
  };
2840
839
 
2841
840
  ContentWrapper.propTypes = {
2842
- buttonLink: (prop_types_default()).string,
2843
- children: (prop_types_default()).node
841
+ buttonLink: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
842
+ children: (external_commonjs_prop_types_commonjs2_prop_types_default()).node
2844
843
  };
2845
844
 
2846
845
  var component_Notice = function Notice(_ref2) {
@@ -2893,18 +892,18 @@ var component_Notice = function Notice(_ref2) {
2893
892
  };
2894
893
 
2895
894
  component_Notice.propTypes = {
2896
- buttonLink: (prop_types_default()).string,
2897
- buttonLabel: (prop_types_default()).string,
2898
- bodyText: (prop_types_default()).string,
2899
- title: (prop_types_default()).string,
2900
- closeBtn: (prop_types_default()).bool,
2901
- config: prop_types_default().shape({
2902
- collapse: (prop_types_default()).bool,
2903
- noticeId: (prop_types_default()).string,
2904
- cookieId: (prop_types_default()).string
895
+ buttonLink: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
896
+ buttonLabel: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
897
+ bodyText: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
898
+ title: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
899
+ closeBtn: (external_commonjs_prop_types_commonjs2_prop_types_default()).bool,
900
+ config: external_commonjs_prop_types_commonjs2_prop_types_default().shape({
901
+ collapse: (external_commonjs_prop_types_commonjs2_prop_types_default()).bool,
902
+ noticeId: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
903
+ cookieId: (external_commonjs_prop_types_commonjs2_prop_types_default()).string
2905
904
  }),
2906
- bgColor: (prop_types_default()).string,
2907
- textColor: (prop_types_default()).string
905
+ bgColor: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
906
+ textColor: (external_commonjs_prop_types_commonjs2_prop_types_default()).string
2908
907
  };
2909
908
  /* harmony default export */ const core_Notice_component = (component_Notice);
2910
909
  })();