lwc 2.31.7 → 2.31.8

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 (35) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +144 -113
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +144 -113
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +98 -4
  5. package/dist/engine-dom/iife/es5/engine-dom.js +272 -175
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +201 -77
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +144 -113
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +98 -4
  11. package/dist/engine-dom/umd/es5/engine-dom.js +272 -175
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +201 -77
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +105 -65
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +105 -65
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  26. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  27. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  28. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  29. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  30. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  31. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  34. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  35. package/package.json +7 -7
@@ -346,9 +346,9 @@ var LWC = (function (exports) {
346
346
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
347
347
  */
348
348
  // Increment whenever the LWC template compiler changes
349
- var LWC_VERSION = "2.31.7";
349
+ var LWC_VERSION = "2.31.8";
350
350
  var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
351
- /** version: 2.31.7 */
351
+ /** version: 2.31.8 */
352
352
 
353
353
  /**
354
354
  * Copyright (C) 2018 salesforce.com, inc.
@@ -429,7 +429,7 @@ var LWC = (function (exports) {
429
429
  patch$1(propName);
430
430
  }
431
431
  }
432
- /** version: 2.31.7 */
432
+ /** version: 2.31.8 */
433
433
 
434
434
  /**
435
435
  * Copyright (C) 2018 salesforce.com, inc.
@@ -511,7 +511,7 @@ var LWC = (function (exports) {
511
511
  setFeatureFlag(name, value);
512
512
  }
513
513
  }
514
- /** version: 2.31.7 */
514
+ /** version: 2.31.8 */
515
515
 
516
516
  /*
517
517
  * Copyright (c) 2018, salesforce.com, inc.
@@ -3187,6 +3187,123 @@ var LWC = (function (exports) {
3187
3187
  freeze(BaseBridgeElement);
3188
3188
  seal(BaseBridgeElement.prototype);
3189
3189
 
3190
+ /*
3191
+ * Copyright (c) 2023, salesforce.com, inc.
3192
+ * All rights reserved.
3193
+ * SPDX-License-Identifier: MIT
3194
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3195
+ */
3196
+ var supportsWeakRefs = typeof WeakRef === 'function' && typeof FinalizationRegistry === 'function';
3197
+ // In browsers that doesn't support WeakRefs, the values will still leak, but at least the keys won't
3198
+ var LegacyWeakMultiMap = /*#__PURE__*/function () {
3199
+ function LegacyWeakMultiMap() {
3200
+ _classCallCheck(this, LegacyWeakMultiMap);
3201
+ this._map = new WeakMap();
3202
+ }
3203
+ _createClass(LegacyWeakMultiMap, [{
3204
+ key: "_getValues",
3205
+ value: function _getValues(key) {
3206
+ var values = this._map.get(key);
3207
+ if (isUndefined$1(values)) {
3208
+ values = new Set();
3209
+ this._map.set(key, values);
3210
+ }
3211
+ return values;
3212
+ }
3213
+ }, {
3214
+ key: "get",
3215
+ value: function get(key) {
3216
+ return this._getValues(key);
3217
+ }
3218
+ }, {
3219
+ key: "add",
3220
+ value: function add(key, vm) {
3221
+ var set = this._getValues(key);
3222
+ set.add(vm);
3223
+ }
3224
+ }, {
3225
+ key: "delete",
3226
+ value: function _delete(key) {
3227
+ this._map.delete(key);
3228
+ }
3229
+ }]);
3230
+ return LegacyWeakMultiMap;
3231
+ }(); // This implementation relies on the WeakRef/FinalizationRegistry proposal.
3232
+ // For some background, see: https://github.com/tc39/proposal-weakrefs
3233
+ var ModernWeakMultiMap = /*#__PURE__*/function () {
3234
+ function ModernWeakMultiMap() {
3235
+ _classCallCheck(this, ModernWeakMultiMap);
3236
+ this._map = new WeakMap();
3237
+ this._registry = new FinalizationRegistry(function (weakRefs) {
3238
+ // This should be considered an optional cleanup method to remove GC'ed values from their respective arrays.
3239
+ // JS VMs are not obligated to call FinalizationRegistry callbacks.
3240
+ // Work backwards, removing stale VMs
3241
+ for (var _i11 = weakRefs.length - 1; _i11 >= 0; _i11--) {
3242
+ var vm = weakRefs[_i11].deref();
3243
+ if (isUndefined$1(vm)) {
3244
+ ArraySplice.call(weakRefs, _i11, 1); // remove
3245
+ }
3246
+ }
3247
+ });
3248
+ }
3249
+ _createClass(ModernWeakMultiMap, [{
3250
+ key: "_getWeakRefs",
3251
+ value: function _getWeakRefs(key) {
3252
+ var weakRefs = this._map.get(key);
3253
+ if (isUndefined$1(weakRefs)) {
3254
+ weakRefs = [];
3255
+ this._map.set(key, weakRefs);
3256
+ }
3257
+ return weakRefs;
3258
+ }
3259
+ }, {
3260
+ key: "get",
3261
+ value: function get(key) {
3262
+ var weakRefs = this._getWeakRefs(key);
3263
+ var result = new Set();
3264
+ var _iterator4 = _createForOfIteratorHelper(weakRefs),
3265
+ _step4;
3266
+ try {
3267
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
3268
+ var weakRef = _step4.value;
3269
+ var vm = weakRef.deref();
3270
+ if (!isUndefined$1(vm)) {
3271
+ result.add(vm);
3272
+ }
3273
+ }
3274
+ } catch (err) {
3275
+ _iterator4.e(err);
3276
+ } finally {
3277
+ _iterator4.f();
3278
+ }
3279
+ return result;
3280
+ }
3281
+ }, {
3282
+ key: "add",
3283
+ value: function add(key, value) {
3284
+ var weakRefs = this._getWeakRefs(key);
3285
+ // We could check for duplicate values here, but it doesn't seem worth it.
3286
+ // We transform the output into a Set anyway
3287
+ ArrayPush$1.call(weakRefs, new WeakRef(value));
3288
+ // It's important here not to leak the second argument, which is the "held value." The FinalizationRegistry
3289
+ // effectively creates a strong reference between the first argument (the "target") and the held value. When
3290
+ // the target is GC'ed, the callback is called, and then the held value is GC'ed.
3291
+ // Putting the key here would mean the key is not GC'ed until the value is GC'ed, which defeats the purpose
3292
+ // of the WeakMap. Whereas putting the weakRefs array here is fine, because it doesn't have a strong reference
3293
+ // to anything. See also this example:
3294
+ // https://gist.github.com/nolanlawson/79a3d36e8e6cc25c5048bb17c1795aea
3295
+ this._registry.register(value, weakRefs);
3296
+ }
3297
+ }, {
3298
+ key: "delete",
3299
+ value: function _delete(key) {
3300
+ this._map.delete(key);
3301
+ }
3302
+ }]);
3303
+ return ModernWeakMultiMap;
3304
+ }();
3305
+ var WeakMultiMap = supportsWeakRefs ? ModernWeakMultiMap : LegacyWeakMultiMap;
3306
+
3190
3307
  /*
3191
3308
  * Copyright (c) 2020, salesforce.com, inc.
3192
3309
  * All rights reserved.
@@ -3196,46 +3313,65 @@ var LWC = (function (exports) {
3196
3313
  var swappedTemplateMap = new WeakMap();
3197
3314
  var swappedComponentMap = new WeakMap();
3198
3315
  var swappedStyleMap = new WeakMap();
3199
- var activeTemplates = new WeakMap();
3200
- var activeComponents = new WeakMap();
3201
- var activeStyles = new WeakMap();
3316
+ // The important thing here is the weak values – VMs are transient (one per component instance) and should be GC'ed,
3317
+ // so we don't want to create strong references to them.
3318
+ // The weak keys are kind of useless, because Templates, LightningElementConstructors, and StylesheetFactories are
3319
+ // never GC'ed. But maybe they will be someday, so we may as well use weak keys too.
3320
+ var activeTemplates = new WeakMultiMap();
3321
+ var activeComponents = new WeakMultiMap();
3322
+ var activeStyles = new WeakMultiMap();
3202
3323
  function rehydrateHotTemplate(tpl) {
3203
3324
  var list = activeTemplates.get(tpl);
3204
- if (!isUndefined$1(list)) {
3205
- list.forEach(function (vm) {
3325
+ var _iterator5 = _createForOfIteratorHelper(list),
3326
+ _step5;
3327
+ try {
3328
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
3329
+ var vm = _step5.value;
3206
3330
  if (isFalse(vm.isDirty)) {
3207
3331
  // forcing the vm to rehydrate in the micro-task:
3208
3332
  markComponentAsDirty(vm);
3209
3333
  scheduleRehydration(vm);
3210
3334
  }
3211
- });
3212
- // resetting the Set to release the memory of those vm references
3213
- // since they are not longer related to this template, instead
3335
+ }
3336
+ // Resetting the Set since these VMs are no longer related to this template, instead
3214
3337
  // they will get re-associated once these instances are rehydrated.
3215
- list.clear();
3338
+ } catch (err) {
3339
+ _iterator5.e(err);
3340
+ } finally {
3341
+ _iterator5.f();
3216
3342
  }
3343
+ activeTemplates.delete(tpl);
3217
3344
  return true;
3218
3345
  }
3219
3346
  function rehydrateHotStyle(style) {
3220
3347
  var list = activeStyles.get(style);
3221
- if (!isUndefined$1(list)) {
3222
- list.forEach(function (vm) {
3348
+ var _iterator6 = _createForOfIteratorHelper(list),
3349
+ _step6;
3350
+ try {
3351
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
3352
+ var vm = _step6.value;
3223
3353
  // if a style definition is swapped, we must reset
3224
3354
  // vm's template content in the next micro-task:
3225
3355
  forceRehydration(vm);
3226
- });
3227
- // resetting the Set to release the memory of those vm references
3228
- // since they are not longer related to this style, instead
3356
+ }
3357
+ // Resetting the Set since these VMs are no longer related to this style, instead
3229
3358
  // they will get re-associated once these instances are rehydrated.
3230
- list.clear();
3359
+ } catch (err) {
3360
+ _iterator6.e(err);
3361
+ } finally {
3362
+ _iterator6.f();
3231
3363
  }
3364
+ activeStyles.delete(style);
3232
3365
  return true;
3233
3366
  }
3234
3367
  function rehydrateHotComponent(Ctor) {
3235
3368
  var list = activeComponents.get(Ctor);
3236
3369
  var canRefreshAllInstances = true;
3237
- if (!isUndefined$1(list)) {
3238
- list.forEach(function (vm) {
3370
+ var _iterator7 = _createForOfIteratorHelper(list),
3371
+ _step7;
3372
+ try {
3373
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
3374
+ var vm = _step7.value;
3239
3375
  var owner = vm.owner;
3240
3376
  if (!isNull(owner)) {
3241
3377
  // if a component class definition is swapped, we must reset
@@ -3250,12 +3386,15 @@ var LWC = (function (exports) {
3250
3386
  // for example: reload the entire page.
3251
3387
  canRefreshAllInstances = false;
3252
3388
  }
3253
- });
3254
- // resetting the Set to release the memory of those vm references
3255
- // since they are not longer related to this constructor, instead
3389
+ }
3390
+ // resetting the Set since these VMs are no longer related to this constructor, instead
3256
3391
  // they will get re-associated once these instances are rehydrated.
3257
- list.clear();
3392
+ } catch (err) {
3393
+ _iterator7.e(err);
3394
+ } finally {
3395
+ _iterator7.f();
3258
3396
  }
3397
+ activeComponents.delete(Ctor);
3259
3398
  return canRefreshAllInstances;
3260
3399
  }
3261
3400
  function getTemplateOrSwappedTemplate(tpl) {
@@ -3301,75 +3440,36 @@ var LWC = (function (exports) {
3301
3440
  }
3302
3441
  // tracking active component
3303
3442
  var Ctor = vm.def.ctor;
3304
- var componentVMs = activeComponents.get(Ctor);
3305
- if (isUndefined$1(componentVMs)) {
3306
- componentVMs = new Set();
3307
- activeComponents.set(Ctor, componentVMs);
3308
- }
3309
3443
  // this will allow us to keep track of the hot components
3310
- componentVMs.add(vm);
3444
+ activeComponents.add(Ctor, vm);
3311
3445
  // tracking active template
3312
3446
  var tpl = vm.cmpTemplate;
3313
3447
  if (tpl) {
3314
- var templateVMs = activeTemplates.get(tpl);
3315
- if (isUndefined$1(templateVMs)) {
3316
- templateVMs = new Set();
3317
- activeTemplates.set(tpl, templateVMs);
3318
- }
3319
3448
  // this will allow us to keep track of the templates that are
3320
3449
  // being used by a hot component
3321
- templateVMs.add(vm);
3450
+ activeTemplates.add(tpl, vm);
3322
3451
  // tracking active styles associated to template
3323
3452
  var stylesheets = tpl.stylesheets;
3324
3453
  if (!isUndefined$1(stylesheets)) {
3325
- flattenStylesheets(stylesheets).forEach(function (stylesheet) {
3326
- // this is necessary because we don't hold the list of styles
3327
- // in the vm, we only hold the selected (already swapped template)
3328
- // but the styles attached to the template might not be the actual
3329
- // active ones, but the swapped versions of those.
3330
- stylesheet = getStyleOrSwappedStyle(stylesheet);
3331
- var stylesheetVMs = activeStyles.get(stylesheet);
3332
- if (isUndefined$1(stylesheetVMs)) {
3333
- stylesheetVMs = new Set();
3334
- activeStyles.set(stylesheet, stylesheetVMs);
3335
- }
3336
- // this will allow us to keep track of the stylesheet that are
3337
- // being used by a hot component
3338
- stylesheetVMs.add(vm);
3339
- });
3340
- }
3341
- }
3342
- }
3343
- function removeActiveVM(vm) {
3344
- if (process.env.NODE_ENV === 'production') {
3345
- // this method should never leak to prod
3346
- throw new ReferenceError();
3347
- }
3348
- // tracking inactive component
3349
- var Ctor = vm.def.ctor;
3350
- var list = activeComponents.get(Ctor);
3351
- if (!isUndefined$1(list)) {
3352
- // deleting the vm from the set to avoid leaking memory
3353
- list.delete(vm);
3354
- }
3355
- // removing inactive template
3356
- var tpl = vm.cmpTemplate;
3357
- if (tpl) {
3358
- list = activeTemplates.get(tpl);
3359
- if (!isUndefined$1(list)) {
3360
- // deleting the vm from the set to avoid leaking memory
3361
- list.delete(vm);
3362
- }
3363
- // removing active styles associated to template
3364
- var styles = tpl.stylesheets;
3365
- if (!isUndefined$1(styles)) {
3366
- flattenStylesheets(styles).forEach(function (style) {
3367
- list = activeStyles.get(style);
3368
- if (!isUndefined$1(list)) {
3369
- // deleting the vm from the set to avoid leaking memory
3370
- list.delete(vm);
3454
+ var _iterator8 = _createForOfIteratorHelper(flattenStylesheets(stylesheets)),
3455
+ _step8;
3456
+ try {
3457
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
3458
+ var stylesheet = _step8.value;
3459
+ // this is necessary because we don't hold the list of styles
3460
+ // in the vm, we only hold the selected (already swapped template)
3461
+ // but the styles attached to the template might not be the actual
3462
+ // active ones, but the swapped versions of those.
3463
+ var swappedStylesheet = getStyleOrSwappedStyle(stylesheet);
3464
+ // this will allow us to keep track of the stylesheet that are
3465
+ // being used by a hot component
3466
+ activeStyles.add(swappedStylesheet, vm);
3371
3467
  }
3372
- });
3468
+ } catch (err) {
3469
+ _iterator8.e(err);
3470
+ } finally {
3471
+ _iterator8.f();
3472
+ }
3373
3473
  }
3374
3474
  }
3375
3475
  }
@@ -3686,8 +3786,8 @@ var LWC = (function (exports) {
3686
3786
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3687
3787
  var content = [];
3688
3788
  var root;
3689
- for (var _i11 = 0; _i11 < stylesheets.length; _i11++) {
3690
- var stylesheet = stylesheets[_i11];
3789
+ for (var _i12 = 0; _i12 < stylesheets.length; _i12++) {
3790
+ var stylesheet = stylesheets[_i12];
3691
3791
  if (isArray$1(stylesheet)) {
3692
3792
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
3693
3793
  } else {
@@ -3789,8 +3889,8 @@ var LWC = (function (exports) {
3789
3889
  shadowMode = vm.shadowMode,
3790
3890
  insertStylesheet = vm.renderer.insertStylesheet;
3791
3891
  if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
3792
- for (var _i12 = 0; _i12 < stylesheets.length; _i12++) {
3793
- insertStylesheet(stylesheets[_i12]);
3892
+ for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
3893
+ insertStylesheet(stylesheets[_i13]);
3794
3894
  }
3795
3895
  } else if (vm.hydrated) {
3796
3896
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
@@ -3803,8 +3903,8 @@ var LWC = (function (exports) {
3803
3903
  var root = getNearestNativeShadowComponent(vm);
3804
3904
  // null root means a global style
3805
3905
  var target = isNull(root) ? undefined : root.shadowRoot;
3806
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
3807
- insertStylesheet(stylesheets[_i13], target);
3906
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
3907
+ insertStylesheet(stylesheets[_i14], target);
3808
3908
  }
3809
3909
  }
3810
3910
  return null;
@@ -4118,8 +4218,8 @@ var LWC = (function (exports) {
4118
4218
  return;
4119
4219
  }
4120
4220
  var setCSSStyleProperty = renderer.setCSSStyleProperty;
4121
- for (var _i14 = 0; _i14 < styleDecls.length; _i14++) {
4122
- var _styleDecls$_i = _slicedToArray(styleDecls[_i14], 3),
4221
+ for (var _i15 = 0; _i15 < styleDecls.length; _i15++) {
4222
+ var _styleDecls$_i = _slicedToArray(styleDecls[_i15], 3),
4123
4223
  prop = _styleDecls$_i[0],
4124
4224
  value = _styleDecls$_i[1],
4125
4225
  important = _styleDecls$_i[2];
@@ -4587,8 +4687,8 @@ var LWC = (function (exports) {
4587
4687
  */
4588
4688
  function collectSlots(vm, children, cmpSlotsMapping) {
4589
4689
  var _a, _b;
4590
- for (var _i15 = 0, len = children.length; _i15 < len; _i15 += 1) {
4591
- var vnode = children[_i15];
4690
+ for (var _i16 = 0, len = children.length; _i16 < len; _i16 += 1) {
4691
+ var vnode = children[_i16];
4592
4692
  if (isNull(vnode)) {
4593
4693
  continue;
4594
4694
  }
@@ -4624,8 +4724,8 @@ var LWC = (function (exports) {
4624
4724
  markComponentAsDirty(vm);
4625
4725
  return;
4626
4726
  }
4627
- for (var _i16 = 0, len = oldKeys.length; _i16 < len; _i16 += 1) {
4628
- var key = oldKeys[_i16];
4727
+ for (var _i17 = 0, len = oldKeys.length; _i17 < len; _i17 += 1) {
4728
+ var key = oldKeys[_i17];
4629
4729
  if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
4630
4730
  markComponentAsDirty(vm);
4631
4731
  return;
@@ -4748,11 +4848,11 @@ var LWC = (function (exports) {
4748
4848
  if (oldStartIdx > oldEndIdx) {
4749
4849
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
4750
4850
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
4751
- var _i17 = newEndIdx;
4851
+ var _i18 = newEndIdx;
4752
4852
  var n;
4753
4853
  do {
4754
- n = newCh[++_i17];
4755
- } while (!isVNode(n) && _i17 < newChEnd);
4854
+ n = newCh[++_i18];
4855
+ } while (!isVNode(n) && _i18 < newChEnd);
4756
4856
  before = isVNode(n) ? n.elm : null;
4757
4857
  mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
4758
4858
  } else {
@@ -4777,9 +4877,9 @@ var LWC = (function (exports) {
4777
4877
  // if the old list is not empty, the new list MUST have the same
4778
4878
  // amount of nodes, that's why we call this static children
4779
4879
  var anchor = null;
4780
- for (var _i18 = c2Length - 1; _i18 >= 0; _i18 -= 1) {
4781
- var n1 = c1[_i18];
4782
- var n2 = c2[_i18];
4880
+ for (var _i19 = c2Length - 1; _i19 >= 0; _i19 -= 1) {
4881
+ var n1 = c1[_i19];
4882
+ var n2 = c2[_i19];
4783
4883
  if (n2 !== n1) {
4784
4884
  if (isVNode(n1)) {
4785
4885
  if (isVNode(n2)) {
@@ -4904,8 +5004,8 @@ var LWC = (function (exports) {
4904
5004
  if (!isUndefined$1(slotset) && !isUndefined$1(slotset.slotAssignments) && !isUndefined$1(slotset.slotAssignments[slotName]) && slotset.slotAssignments[slotName].length !== 0) {
4905
5005
  var newChildren = [];
4906
5006
  var slotAssignments = slotset.slotAssignments[slotName];
4907
- for (var _i19 = 0; _i19 < slotAssignments.length; _i19++) {
4908
- var vnode = slotAssignments[_i19];
5007
+ for (var _i20 = 0; _i20 < slotAssignments.length; _i20++) {
5008
+ var vnode = slotAssignments[_i20];
4909
5009
  if (!isNull(vnode)) {
4910
5010
  var assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
4911
5011
  // The only sniff test for a scoped <slot> element is the presence of `slotData`
@@ -5430,23 +5530,23 @@ var LWC = (function (exports) {
5430
5530
  var classAttrToken = hasScopedStyles && hasStyleToken ? " class=\"".concat(stylesheetToken, "\"") : '';
5431
5531
  var attrToken = hasStyleToken && isSyntheticShadow ? ' ' + stylesheetToken : '';
5432
5532
  var htmlFragment = '';
5433
- for (var _i20 = 0, n = keys.length; _i20 < n; _i20++) {
5434
- switch (keys[_i20]) {
5533
+ for (var _i21 = 0, n = keys.length; _i21 < n; _i21++) {
5534
+ switch (keys[_i21]) {
5435
5535
  case 0:
5436
5536
  // styleToken in existing class attr
5437
- htmlFragment += strings[_i20] + classToken;
5537
+ htmlFragment += strings[_i21] + classToken;
5438
5538
  break;
5439
5539
  case 1:
5440
5540
  // styleToken for added class attr
5441
- htmlFragment += strings[_i20] + classAttrToken;
5541
+ htmlFragment += strings[_i21] + classAttrToken;
5442
5542
  break;
5443
5543
  case 2:
5444
5544
  // styleToken as attr
5445
- htmlFragment += strings[_i20] + attrToken;
5545
+ htmlFragment += strings[_i21] + attrToken;
5446
5546
  break;
5447
5547
  case 3:
5448
5548
  // ${1}${2}
5449
- htmlFragment += strings[_i20] + classAttrToken + attrToken;
5549
+ htmlFragment += strings[_i21] + classAttrToken + attrToken;
5450
5550
  break;
5451
5551
  }
5452
5552
  }
@@ -5554,8 +5654,8 @@ var LWC = (function (exports) {
5554
5654
  function computeHasScopedStyles(template) {
5555
5655
  var stylesheets = template.stylesheets;
5556
5656
  if (!isUndefined$1(stylesheets)) {
5557
- for (var _i21 = 0; _i21 < stylesheets.length; _i21++) {
5558
- if (isTrue(stylesheets[_i21][KEY__SCOPED_CSS])) {
5657
+ for (var _i22 = 0; _i22 < stylesheets.length; _i22++) {
5658
+ if (isTrue(stylesheets[_i22][KEY__SCOPED_CSS])) {
5559
5659
  return true;
5560
5660
  }
5561
5661
  }
@@ -5743,8 +5843,8 @@ var LWC = (function (exports) {
5743
5843
  if (process.env.NODE_ENV !== 'production') {
5744
5844
  assert.isTrue(isObject(service), "Invalid service declaration, ".concat(service, ": service must be an object"));
5745
5845
  }
5746
- for (var _i22 = 0; _i22 < hooks.length; ++_i22) {
5747
- var hookName = hooks[_i22];
5846
+ for (var _i23 = 0; _i23 < hooks.length; ++_i23) {
5847
+ var hookName = hooks[_i23];
5748
5848
  if (hookName in service) {
5749
5849
  var l = Services[hookName];
5750
5850
  if (isUndefined$1(l)) {
@@ -5761,8 +5861,8 @@ var LWC = (function (exports) {
5761
5861
  var component = vm.component,
5762
5862
  def = vm.def,
5763
5863
  context = vm.context;
5764
- for (var _i23 = 0, len = cbs.length; _i23 < len; ++_i23) {
5765
- cbs[_i23].call(undefined, component, {}, def, context);
5864
+ for (var _i24 = 0, len = cbs.length; _i24 < len; ++_i24) {
5865
+ cbs[_i24].call(undefined, component, {}, def, context);
5766
5866
  }
5767
5867
  }
5768
5868
 
@@ -5825,9 +5925,6 @@ var LWC = (function (exports) {
5825
5925
  runChildNodesDisconnectedCallback(vm);
5826
5926
  runLightChildNodesDisconnectedCallback(vm);
5827
5927
  }
5828
- if (process.env.NODE_ENV !== 'production') {
5829
- removeActiveVM(vm);
5830
- }
5831
5928
  }
5832
5929
  // this method is triggered by the diffing algo only when a vnode from the
5833
5930
  // old vnode.children is removed from the DOM.
@@ -6041,17 +6138,17 @@ var LWC = (function (exports) {
6041
6138
  return a.idx - b.idx;
6042
6139
  });
6043
6140
  rehydrateQueue = []; // reset to a new queue
6044
- for (var _i24 = 0, len = vms.length; _i24 < len; _i24 += 1) {
6045
- var vm = vms[_i24];
6141
+ for (var _i25 = 0, len = vms.length; _i25 < len; _i25 += 1) {
6142
+ var vm = vms[_i25];
6046
6143
  try {
6047
6144
  rehydrate(vm);
6048
6145
  } catch (error) {
6049
- if (_i24 + 1 < len) {
6146
+ if (_i25 + 1 < len) {
6050
6147
  // pieces of the queue are still pending to be rehydrated, those should have priority
6051
6148
  if (rehydrateQueue.length === 0) {
6052
6149
  addCallbackToNextTick(flushRehydrationQueue);
6053
6150
  }
6054
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i24 + 1));
6151
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i25 + 1));
6055
6152
  }
6056
6153
  // we need to end the measure before throwing.
6057
6154
  logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
@@ -6120,8 +6217,8 @@ var LWC = (function (exports) {
6120
6217
  var vCustomElementCollection = vm.velements;
6121
6218
  // Reporting disconnection for every child in inverse order since they are
6122
6219
  // inserted in reserved order.
6123
- for (var _i25 = vCustomElementCollection.length - 1; _i25 >= 0; _i25 -= 1) {
6124
- var elm = vCustomElementCollection[_i25].elm;
6220
+ for (var _i26 = vCustomElementCollection.length - 1; _i26 >= 0; _i26 -= 1) {
6221
+ var elm = vCustomElementCollection[_i26].elm;
6125
6222
  // There are two cases where the element could be undefined:
6126
6223
  // * when there is an error during the construction phase, and an error
6127
6224
  // boundary picks it, there is a possibility that the VCustomElement
@@ -6152,8 +6249,8 @@ var LWC = (function (exports) {
6152
6249
  * defined on its shadow.
6153
6250
  */
6154
6251
  function recursivelyDisconnectChildren(vnodes) {
6155
- for (var _i26 = 0, len = vnodes.length; _i26 < len; _i26 += 1) {
6156
- var vnode = vnodes[_i26];
6252
+ for (var _i27 = 0, len = vnodes.length; _i27 < len; _i27 += 1) {
6253
+ var vnode = vnodes[_i27];
6157
6254
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
6158
6255
  switch (vnode.type) {
6159
6256
  case 2 /* VNodeType.Element */:
@@ -6186,8 +6283,8 @@ var LWC = (function (exports) {
6186
6283
  function recursivelyRemoveChildren(vnodes, vm) {
6187
6284
  var renderRoot = vm.renderRoot,
6188
6285
  remove = vm.renderer.remove;
6189
- for (var _i27 = 0, len = vnodes.length; _i27 < len; _i27 += 1) {
6190
- var vnode = vnodes[_i27];
6286
+ for (var _i28 = 0, len = vnodes.length; _i28 < len; _i28 += 1) {
6287
+ var vnode = vnodes[_i28];
6191
6288
  if (!isNull(vnode)) {
6192
6289
  // VFragments are special; their .elm property does not point to the root element since they have no single root.
6193
6290
  if (isVFragment(vnode)) {
@@ -6527,16 +6624,16 @@ var LWC = (function (exports) {
6527
6624
  }
6528
6625
  function connectWireAdapters(vm) {
6529
6626
  var wiredConnecting = vm.context.wiredConnecting;
6530
- for (var _i28 = 0, len = wiredConnecting.length; _i28 < len; _i28 += 1) {
6531
- wiredConnecting[_i28]();
6627
+ for (var _i29 = 0, len = wiredConnecting.length; _i29 < len; _i29 += 1) {
6628
+ wiredConnecting[_i29]();
6532
6629
  }
6533
6630
  }
6534
6631
  function disconnectWireAdapters(vm) {
6535
6632
  var wiredDisconnecting = vm.context.wiredDisconnecting;
6536
6633
  runWithBoundaryProtection(vm, vm, noop, function () {
6537
6634
  // job
6538
- for (var _i29 = 0, len = wiredDisconnecting.length; _i29 < len; _i29 += 1) {
6539
- wiredDisconnecting[_i29]();
6635
+ for (var _i30 = 0, len = wiredDisconnecting.length; _i30 < len; _i30 += 1) {
6636
+ wiredDisconnecting[_i30]();
6540
6637
  }
6541
6638
  }, noop);
6542
6639
  }
@@ -6775,8 +6872,8 @@ var LWC = (function (exports) {
6775
6872
  var nextNode = node;
6776
6873
  var anchor = null;
6777
6874
  var renderer = owner.renderer;
6778
- for (var _i30 = 0; _i30 < children.length; _i30++) {
6779
- var childVnode = children[_i30];
6875
+ for (var _i31 = 0; _i31 < children.length; _i31++) {
6876
+ var childVnode = children[_i31];
6780
6877
  if (!isNull(childVnode)) {
6781
6878
  if (nextNode) {
6782
6879
  nextNode = hydrateNode(nextNode, childVnode, renderer);
@@ -6854,8 +6951,8 @@ var LWC = (function (exports) {
6854
6951
  var nodesAreCompatible = true;
6855
6952
  // Validate attributes, though we could always recovery from those by running the update mods.
6856
6953
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
6857
- for (var _i31 = 0, _Object$entries = Object.entries(attrs); _i31 < _Object$entries.length; _i31++) {
6858
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i31], 2),
6954
+ for (var _i32 = 0, _Object$entries = Object.entries(attrs); _i32 < _Object$entries.length; _i32++) {
6955
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i32], 2),
6859
6956
  attrName = _Object$entries$_i[0],
6860
6957
  attrValue = _Object$entries$_i[1];
6861
6958
  var owner = vnode.owner;
@@ -6956,8 +7053,8 @@ var LWC = (function (exports) {
6956
7053
  var parsedVnodeStyle = parseStyleText(elmStyle);
6957
7054
  var expectedStyle = [];
6958
7055
  // styleMap is used when style is set to static value.
6959
- for (var _i32 = 0, n = styleDecls.length; _i32 < n; _i32++) {
6960
- var _styleDecls$_i2 = _slicedToArray(styleDecls[_i32], 3),
7056
+ for (var _i33 = 0, n = styleDecls.length; _i33 < n; _i33++) {
7057
+ var _styleDecls$_i2 = _slicedToArray(styleDecls[_i33], 3),
6961
7058
  prop = _styleDecls$_i2[0],
6962
7059
  value = _styleDecls$_i2[1],
6963
7060
  important = _styleDecls$_i2[2];
@@ -7070,11 +7167,11 @@ var LWC = (function (exports) {
7070
7167
  function warnOnArrayMutation(stylesheets) {
7071
7168
  // We can't handle users calling Array.prototype.slice.call(tmpl.stylesheets), but
7072
7169
  // we can at least warn when they use the most common mutation methods.
7073
- var _iterator4 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
7074
- _step4;
7170
+ var _iterator9 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
7171
+ _step9;
7075
7172
  try {
7076
7173
  var _loop2 = function _loop2() {
7077
- var prop = _step4.value;
7174
+ var prop = _step9.value;
7078
7175
  var originalArrayMethod = getOriginalArrayMethod(prop);
7079
7176
  stylesheets[prop] = function arrayMutationWarningWrapper() {
7080
7177
  logError("Mutating the \"stylesheets\" array on a template function " + "is deprecated and may be removed in a future version of LWC.");
@@ -7082,13 +7179,13 @@ var LWC = (function (exports) {
7082
7179
  return originalArrayMethod.apply(this, arguments);
7083
7180
  };
7084
7181
  };
7085
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
7182
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
7086
7183
  _loop2();
7087
7184
  }
7088
7185
  } catch (err) {
7089
- _iterator4.e(err);
7186
+ _iterator9.e(err);
7090
7187
  } finally {
7091
- _iterator4.f();
7188
+ _iterator9.f();
7092
7189
  }
7093
7190
  }
7094
7191
  // TODO [#2782]: eventually freezeTemplate() will _actually_ freeze the tmpl object. Today it
@@ -7098,11 +7195,11 @@ var LWC = (function (exports) {
7098
7195
  if (!isUndefined$1(tmpl.stylesheets)) {
7099
7196
  warnOnArrayMutation(tmpl.stylesheets);
7100
7197
  }
7101
- var _iterator5 = _createForOfIteratorHelper(TEMPLATE_PROPS),
7102
- _step5;
7198
+ var _iterator10 = _createForOfIteratorHelper(TEMPLATE_PROPS),
7199
+ _step10;
7103
7200
  try {
7104
7201
  var _loop3 = function _loop3() {
7105
- var prop = _step5.value;
7202
+ var prop = _step10.value;
7106
7203
  var value = tmpl[prop];
7107
7204
  defineProperty(tmpl, prop, {
7108
7205
  enumerable: true,
@@ -7118,13 +7215,13 @@ var LWC = (function (exports) {
7118
7215
  }
7119
7216
  });
7120
7217
  };
7121
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
7218
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
7122
7219
  _loop3();
7123
7220
  }
7124
7221
  } catch (err) {
7125
- _iterator5.e(err);
7222
+ _iterator10.e(err);
7126
7223
  } finally {
7127
- _iterator5.f();
7224
+ _iterator10.f();
7128
7225
  }
7129
7226
  var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
7130
7227
  defineProperty(tmpl, 'stylesheetTokens', {
@@ -7164,7 +7261,7 @@ var LWC = (function (exports) {
7164
7261
  }
7165
7262
  return ctor;
7166
7263
  }
7167
- /* version: 2.31.7 */
7264
+ /* version: 2.31.8 */
7168
7265
 
7169
7266
  /*
7170
7267
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7846,17 +7943,17 @@ var LWC = (function (exports) {
7846
7943
  function flushPendingWhenDefinedCallbacks(tagName, ctor) {
7847
7944
  var resolvers = pendingWhenDefinedCallbacks.get(tagName);
7848
7945
  if (!isUndefined$1(resolvers)) {
7849
- var _iterator6 = _createForOfIteratorHelper(resolvers),
7850
- _step6;
7946
+ var _iterator11 = _createForOfIteratorHelper(resolvers),
7947
+ _step11;
7851
7948
  try {
7852
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
7853
- var resolver = _step6.value;
7949
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
7950
+ var resolver = _step11.value;
7854
7951
  resolver(ctor);
7855
7952
  }
7856
7953
  } catch (err) {
7857
- _iterator6.e(err);
7954
+ _iterator11.e(err);
7858
7955
  } finally {
7859
- _iterator6.f();
7956
+ _iterator11.f();
7860
7957
  }
7861
7958
  }
7862
7959
  pendingWhenDefinedCallbacks.delete(tagName);
@@ -7906,11 +8003,11 @@ var LWC = (function (exports) {
7906
8003
  var awaiting = awaitingUpgrade.get(tagName);
7907
8004
  if (!isUndefined$1(awaiting)) {
7908
8005
  awaitingUpgrade.delete(tagName);
7909
- var _iterator7 = _createForOfIteratorHelper(awaiting),
7910
- _step7;
8006
+ var _iterator12 = _createForOfIteratorHelper(awaiting),
8007
+ _step12;
7911
8008
  try {
7912
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
7913
- var element = _step7.value;
8009
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
8010
+ var element = _step12.value;
7914
8011
  var registeredDefinition = pendingRegistryForElement.get(element);
7915
8012
  // At this point, registeredDefinition should never be undefined because awaitingUpgrade
7916
8013
  // is only populated when we haven't run internalUpgrade yet, and we only populate
@@ -7922,9 +8019,9 @@ var LWC = (function (exports) {
7922
8019
  }
7923
8020
  }
7924
8021
  } catch (err) {
7925
- _iterator7.e(err);
8022
+ _iterator12.e(err);
7926
8023
  } finally {
7927
- _iterator7.f();
8024
+ _iterator12.f();
7928
8025
  }
7929
8026
  }
7930
8027
  // If anyone called customElements.whenDefined() and is still waiting for a promise resolution, resolve now
@@ -8195,7 +8292,7 @@ var LWC = (function (exports) {
8195
8292
  function isNull(obj) {
8196
8293
  return obj === null;
8197
8294
  }
8198
- /** version: 2.31.7 */
8295
+ /** version: 2.31.8 */
8199
8296
 
8200
8297
  /*
8201
8298
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8254,17 +8351,17 @@ var LWC = (function (exports) {
8254
8351
  exports.createFragment = function (html) {
8255
8352
  var wrapperTags = topLevelWrappingMap[getTagName(html)];
8256
8353
  if (!isUndefined(wrapperTags)) {
8257
- var _iterator8 = _createForOfIteratorHelper(wrapperTags),
8258
- _step8;
8354
+ var _iterator13 = _createForOfIteratorHelper(wrapperTags),
8355
+ _step13;
8259
8356
  try {
8260
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
8261
- var wrapperTag = _step8.value;
8357
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
8358
+ var wrapperTag = _step13.value;
8262
8359
  html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
8263
8360
  }
8264
8361
  } catch (err) {
8265
- _iterator8.e(err);
8362
+ _iterator13.e(err);
8266
8363
  } finally {
8267
- _iterator8.f();
8364
+ _iterator13.f();
8268
8365
  }
8269
8366
  }
8270
8367
  // For IE11, the document title must not be undefined, but it can be an empty string
@@ -8273,7 +8370,7 @@ var LWC = (function (exports) {
8273
8370
  doc.body.innerHTML = html;
8274
8371
  var content = doc.body;
8275
8372
  if (!isUndefined(wrapperTags)) {
8276
- for (var _i33 = 0; _i33 < wrapperTags.length; _i33++) {
8373
+ for (var _i34 = 0; _i34 < wrapperTags.length; _i34++) {
8277
8374
  content = content.firstChild;
8278
8375
  }
8279
8376
  }
@@ -8466,8 +8563,8 @@ var LWC = (function (exports) {
8466
8563
  tagName: element.tagName.toLowerCase(),
8467
8564
  hydrated: true
8468
8565
  });
8469
- for (var _i34 = 0, _Object$entries2 = Object.entries(props); _i34 < _Object$entries2.length; _i34++) {
8470
- var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i34], 2),
8566
+ for (var _i35 = 0, _Object$entries2 = Object.entries(props); _i35 < _Object$entries2.length; _i35++) {
8567
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i35], 2),
8471
8568
  key = _Object$entries2$_i[0],
8472
8569
  value = _Object$entries2$_i[1];
8473
8570
  element[key] = value;
@@ -8761,7 +8858,7 @@ var LWC = (function (exports) {
8761
8858
  });
8762
8859
  freeze(LightningElement);
8763
8860
  seal(LightningElement.prototype);
8764
- /* version: 2.31.7 */
8861
+ /* version: 2.31.8 */
8765
8862
 
8766
8863
  exports.LightningElement = LightningElement;
8767
8864
  exports.__unstable__ProfilerControl = profilerControl;