@blockspark/chat-widget 1.0.10 → 1.0.11

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.
@@ -1783,9 +1783,6 @@ class ChatService {
1783
1783
  function createChatService(config) {
1784
1784
  return new ChatService(config);
1785
1785
  }
1786
- function getDefaultExportFromCjs(x) {
1787
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1788
- }
1789
1786
  /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
1790
1787
  var purify_cjs;
1791
1788
  var hasRequiredPurify_cjs;
@@ -2021,12 +2018,12 @@ function requirePurify_cjs() {
2021
2018
  };
2022
2019
  function createDOMPurify() {
2023
2020
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
2024
- const DOMPurify2 = (root) => createDOMPurify(root);
2025
- DOMPurify2.version = "3.3.1";
2026
- DOMPurify2.removed = [];
2021
+ const DOMPurify = (root) => createDOMPurify(root);
2022
+ DOMPurify.version = "3.3.1";
2023
+ DOMPurify.removed = [];
2027
2024
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
2028
- DOMPurify2.isSupported = false;
2029
- return DOMPurify2;
2025
+ DOMPurify.isSupported = false;
2026
+ return DOMPurify;
2030
2027
  }
2031
2028
  let {
2032
2029
  document
@@ -2068,7 +2065,7 @@ function requirePurify_cjs() {
2068
2065
  importNode
2069
2066
  } = originalDocument;
2070
2067
  let hooks = _createHooksMap();
2071
- DOMPurify2.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
2068
+ DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
2072
2069
  const {
2073
2070
  MUSTACHE_EXPR: MUSTACHE_EXPR2,
2074
2071
  ERB_EXPR: ERB_EXPR2,
@@ -2359,7 +2356,7 @@ function requirePurify_cjs() {
2359
2356
  return false;
2360
2357
  };
2361
2358
  const _forceRemove = function _forceRemove2(node) {
2362
- arrayPush(DOMPurify2.removed, {
2359
+ arrayPush(DOMPurify.removed, {
2363
2360
  element: node
2364
2361
  });
2365
2362
  try {
@@ -2370,12 +2367,12 @@ function requirePurify_cjs() {
2370
2367
  };
2371
2368
  const _removeAttribute = function _removeAttribute2(name, element) {
2372
2369
  try {
2373
- arrayPush(DOMPurify2.removed, {
2370
+ arrayPush(DOMPurify.removed, {
2374
2371
  attribute: element.getAttributeNode(name),
2375
2372
  from: element
2376
2373
  });
2377
2374
  } catch (_) {
2378
- arrayPush(DOMPurify2.removed, {
2375
+ arrayPush(DOMPurify.removed, {
2379
2376
  attribute: null,
2380
2377
  from: element
2381
2378
  });
@@ -2447,7 +2444,7 @@ function requirePurify_cjs() {
2447
2444
  };
2448
2445
  function _executeHooks(hooks2, currentNode, data) {
2449
2446
  arrayForEach(hooks2, (hook) => {
2450
- hook.call(DOMPurify2, currentNode, data, CONFIG);
2447
+ hook.call(DOMPurify, currentNode, data, CONFIG);
2451
2448
  });
2452
2449
  }
2453
2450
  const _sanitizeElements = function _sanitizeElements2(currentNode) {
@@ -2512,7 +2509,7 @@ function requirePurify_cjs() {
2512
2509
  content = stringReplace(content, expr, " ");
2513
2510
  });
2514
2511
  if (currentNode.textContent !== content) {
2515
- arrayPush(DOMPurify2.removed, {
2512
+ arrayPush(DOMPurify.removed, {
2516
2513
  element: currentNode.cloneNode()
2517
2514
  });
2518
2515
  currentNode.textContent = content;
@@ -2642,7 +2639,7 @@ function requirePurify_cjs() {
2642
2639
  if (_isClobbered(currentNode)) {
2643
2640
  _forceRemove(currentNode);
2644
2641
  } else {
2645
- arrayPop(DOMPurify2.removed);
2642
+ arrayPop(DOMPurify.removed);
2646
2643
  }
2647
2644
  } catch (_) {
2648
2645
  _removeAttribute(name, currentNode);
@@ -2665,7 +2662,7 @@ function requirePurify_cjs() {
2665
2662
  }
2666
2663
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
2667
2664
  };
2668
- DOMPurify2.sanitize = function(dirty) {
2665
+ DOMPurify.sanitize = function(dirty) {
2669
2666
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2670
2667
  let body = null;
2671
2668
  let importedNode = null;
@@ -2685,13 +2682,13 @@ function requirePurify_cjs() {
2685
2682
  throw typeErrorCreate("toString is not a function");
2686
2683
  }
2687
2684
  }
2688
- if (!DOMPurify2.isSupported) {
2685
+ if (!DOMPurify.isSupported) {
2689
2686
  return dirty;
2690
2687
  }
2691
2688
  if (!SET_CONFIG) {
2692
2689
  _parseConfig(cfg);
2693
2690
  }
2694
- DOMPurify2.removed = [];
2691
+ DOMPurify.removed = [];
2695
2692
  if (typeof dirty === "string") {
2696
2693
  IN_PLACE = false;
2697
2694
  }
@@ -2761,16 +2758,16 @@ function requirePurify_cjs() {
2761
2758
  }
2762
2759
  return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
2763
2760
  };
2764
- DOMPurify2.setConfig = function() {
2761
+ DOMPurify.setConfig = function() {
2765
2762
  let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2766
2763
  _parseConfig(cfg);
2767
2764
  SET_CONFIG = true;
2768
2765
  };
2769
- DOMPurify2.clearConfig = function() {
2766
+ DOMPurify.clearConfig = function() {
2770
2767
  CONFIG = null;
2771
2768
  SET_CONFIG = false;
2772
2769
  };
2773
- DOMPurify2.isValidAttribute = function(tag2, attr, value) {
2770
+ DOMPurify.isValidAttribute = function(tag2, attr, value) {
2774
2771
  if (!CONFIG) {
2775
2772
  _parseConfig({});
2776
2773
  }
@@ -2778,33 +2775,32 @@ function requirePurify_cjs() {
2778
2775
  const lcName = transformCaseFunc(attr);
2779
2776
  return _isValidAttribute(lcTag, lcName, value);
2780
2777
  };
2781
- DOMPurify2.addHook = function(entryPoint, hookFunction) {
2778
+ DOMPurify.addHook = function(entryPoint, hookFunction) {
2782
2779
  if (typeof hookFunction !== "function") {
2783
2780
  return;
2784
2781
  }
2785
2782
  arrayPush(hooks[entryPoint], hookFunction);
2786
2783
  };
2787
- DOMPurify2.removeHook = function(entryPoint, hookFunction) {
2784
+ DOMPurify.removeHook = function(entryPoint, hookFunction) {
2788
2785
  if (hookFunction !== void 0) {
2789
2786
  const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
2790
2787
  return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
2791
2788
  }
2792
2789
  return arrayPop(hooks[entryPoint]);
2793
2790
  };
2794
- DOMPurify2.removeHooks = function(entryPoint) {
2791
+ DOMPurify.removeHooks = function(entryPoint) {
2795
2792
  hooks[entryPoint] = [];
2796
2793
  };
2797
- DOMPurify2.removeAllHooks = function() {
2794
+ DOMPurify.removeAllHooks = function() {
2798
2795
  hooks = _createHooksMap();
2799
2796
  };
2800
- return DOMPurify2;
2797
+ return DOMPurify;
2801
2798
  }
2802
2799
  var purify = createDOMPurify();
2803
2800
  purify_cjs = purify;
2804
2801
  return purify_cjs;
2805
2802
  }
2806
2803
  var browser = window.DOMPurify || (window.DOMPurify = requirePurify_cjs().default || requirePurify_cjs());
2807
- const DOMPurify = /* @__PURE__ */ getDefaultExportFromCjs(browser);
2808
2804
  function sanitizeHtml(html, options) {
2809
2805
  const defaultOptions = {
2810
2806
  ALLOWED_TAGS: ["a", "b", "strong", "i", "em", "u", "br", "p", "span"],
@@ -2820,7 +2816,7 @@ function sanitizeHtml(html, options) {
2820
2816
  )
2821
2817
  }
2822
2818
  };
2823
- return String(DOMPurify.sanitize(html, config));
2819
+ return String(browser.sanitize(html, config));
2824
2820
  }
2825
2821
  function linkifyText(text) {
2826
2822
  const urlRegex = /(https?:\/\/[^\s]+)/g;
@@ -2844,4 +2840,4 @@ export {
2844
2840
  linkifyText as l,
2845
2841
  sendDialogflowMessage as s
2846
2842
  };
2847
- //# sourceMappingURL=sanitize-BNRb-K3t.mjs.map
2843
+ //# sourceMappingURL=sanitize-KZRn4tR6.mjs.map