@algolia/autocomplete-js 1.19.4 → 1.19.5

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.
@@ -27,7 +27,8 @@ function setStyle(style, key, value) {
27
27
  * Proxy an event to hooked event handlers
28
28
  */
29
29
  function eventProxy(event) {
30
- this._listeners[event.type](event);
30
+ var _this$_listeners;
31
+ this === null || this === void 0 ? void 0 : (_this$_listeners = this._listeners) === null || _this$_listeners === void 0 ? void 0 : _this$_listeners[event.type](event);
31
32
  }
32
33
 
33
34
  /**
@@ -1,4 +1,4 @@
1
- /*! @algolia/autocomplete-js 1.19.4 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
1
+ /*! @algolia/autocomplete-js 1.19.5 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -347,7 +347,7 @@
347
347
  return undefined;
348
348
  }
349
349
 
350
- var version = '1.19.4';
350
+ var version = '1.19.5';
351
351
 
352
352
  var userAgents$1 = [{
353
353
  segment: 'autocomplete-core',
@@ -3707,7 +3707,8 @@
3707
3707
  * Proxy an event to hooked event handlers
3708
3708
  */
3709
3709
  function eventProxy(event) {
3710
- this._listeners[event.type](event);
3710
+ var _this$_listeners;
3711
+ this === null || this === void 0 ? void 0 : (_this$_listeners = this._listeners) === null || _this$_listeners === void 0 ? void 0 : _this$_listeners[event.type](event);
3711
3712
  }
3712
3713
 
3713
3714
  /**
@@ -4201,7 +4202,13 @@
4201
4202
  '"': '"',
4202
4203
  ''': "'"
4203
4204
  };
4204
- var hasAlphanumeric = new RegExp(/\w/i);
4205
+ var hasLetterOrNumber = function () {
4206
+ try {
4207
+ return new RegExp('[\\p{L}\\p{N}_]', 'u');
4208
+ } catch (_unused) {
4209
+ return new RegExp(/\w/i);
4210
+ }
4211
+ }();
4205
4212
  var regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g;
4206
4213
  var regexHasEscapedHtml = RegExp(regexEscapedHtml.source);
4207
4214
  function unescape(value) {
@@ -4214,7 +4221,7 @@
4214
4221
  var current = parts[i];
4215
4222
  var isNextHighlighted = ((_parts = parts[i + 1]) === null || _parts === void 0 ? void 0 : _parts.isHighlighted) || true;
4216
4223
  var isPreviousHighlighted = ((_parts2 = parts[i - 1]) === null || _parts2 === void 0 ? void 0 : _parts2.isHighlighted) || true;
4217
- if (!hasAlphanumeric.test(unescape(current.value)) && isPreviousHighlighted === isNextHighlighted) {
4224
+ if (!hasLetterOrNumber.test(unescape(current.value)) && isPreviousHighlighted === isNextHighlighted) {
4218
4225
  return isPreviousHighlighted;
4219
4226
  }
4220
4227
  return current.isHighlighted;