lwc 2.35.0 → 2.35.2

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 (39) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +61 -134
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +61 -134
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +100 -74
  5. package/dist/engine-dom/iife/es5/engine-dom.js +249 -327
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +266 -244
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +61 -134
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +100 -74
  11. package/dist/engine-dom/umd/es5/engine-dom.js +249 -327
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +266 -244
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +47 -136
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +47 -136
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +11 -42
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +11 -42
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +8 -38
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +15 -44
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +12 -40
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +11 -42
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +8 -38
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +15 -44
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +12 -40
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  34. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  35. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  36. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  37. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  39. package/package.json +7 -7
@@ -29,10 +29,10 @@ function fail(msg) {
29
29
 
30
30
  var assert = /*#__PURE__*/Object.freeze({
31
31
  __proto__: null,
32
+ fail: fail,
32
33
  invariant: invariant,
33
- isTrue: isTrue$1,
34
34
  isFalse: isFalse$1,
35
- fail: fail
35
+ isTrue: isTrue$1
36
36
  });
37
37
 
38
38
  /*
@@ -192,47 +192,15 @@ function isAriaAttribute(attrName) {
192
192
  * SPDX-License-Identifier: MIT
193
193
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
194
194
  */
195
- // Inspired from: https://mathiasbynens.be/notes/globalthis
196
- const _globalThis = /*@__PURE__*/ (function () {
197
- // On recent browsers, `globalThis` is already defined. In this case return it directly.
198
- if (typeof globalThis === 'object') {
199
- return globalThis;
200
- }
201
- let _globalThis;
202
- try {
203
- // eslint-disable-next-line no-extend-native
204
- Object.defineProperty(Object.prototype, '__magic__', {
205
- get: function () {
206
- return this;
207
- },
208
- configurable: true,
209
- });
210
- // __magic__ is undefined in Safari 10 and IE10 and older.
211
- // @ts-ignore
212
- // eslint-disable-next-line no-undef
213
- _globalThis = __magic__;
214
- // @ts-ignore
215
- delete Object.prototype.__magic__;
216
- }
217
- catch (ex) {
218
- // In IE8, Object.defineProperty only works on DOM objects.
219
- }
220
- finally {
221
- // If the magic above fails for some reason we assume that we are in a legacy browser.
222
- // Assume `window` exists in this case.
223
- if (typeof _globalThis === 'undefined') {
224
- // @ts-ignore
225
- _globalThis = window;
226
- }
227
- }
228
- return _globalThis;
229
- })();
195
+ // See browser support for globalThis:
196
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility
197
+ /* istanbul ignore next */
198
+ // @ts-ignore
199
+ const _globalThis = typeof globalThis === 'object' ? globalThis : window;
230
200
  const KEY__SHADOW_RESOLVER = '$shadowResolver$';
231
201
  const KEY__SHADOW_STATIC = '$shadowStaticNode$';
232
202
  const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
233
203
  const KEY__SCOPED_CSS = '$scoped$';
234
- const KEY__NATIVE_GET_ELEMENT_BY_ID = '$nativeGetElementById$';
235
- const KEY__NATIVE_QUERY_SELECTOR_ALL = '$nativeQuerySelectorAll$';
236
204
 
237
205
  /*
238
206
  * Copyright (c) 2022, salesforce.com, inc.
@@ -472,9 +440,9 @@ function htmlEscape(str, attrMode = false) {
472
440
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
473
441
  */
474
442
  // Increment whenever the LWC template compiler changes
475
- const LWC_VERSION = "2.35.0";
443
+ const LWC_VERSION = "2.35.2";
476
444
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
477
- /** version: 2.35.0 */
445
+ /** version: 2.35.2 */
478
446
 
479
447
  /*
480
448
  * Copyright (c) 2020, salesforce.com, inc.
@@ -559,7 +527,8 @@ function setFeatureFlag(name, value) {
559
527
  console.warn(`Failed to set the value "${value}" for the runtime feature flag "${name}" because it is undefined. Available flags: ${availableFlags}.`);
560
528
  return;
561
529
  }
562
- if (process.env.NODE_ENV !== 'production') {
530
+ // This may seem redundant, but `process.env.NODE_ENV === 'test-karma-lwc'` is replaced by Karma tests
531
+ if (process.env.NODE_ENV === 'test-karma-lwc' || process.env.NODE_ENV !== 'production') {
563
532
  // Allow the same flag to be set more than once outside of production to enable testing
564
533
  lwcRuntimeFlags[name] = value;
565
534
  }
@@ -579,11 +548,12 @@ function setFeatureFlag(name, value) {
579
548
  * purposes. It is a no-op when invoked in production mode.
580
549
  */
581
550
  function setFeatureFlagForTest(name, value) {
582
- if (process.env.NODE_ENV !== 'production') {
551
+ // This may seem redundant, but `process.env.NODE_ENV === 'test-karma-lwc'` is replaced by Karma tests
552
+ if (process.env.NODE_ENV === 'test-karma-lwc' || process.env.NODE_ENV !== 'production') {
583
553
  setFeatureFlag(name, value);
584
554
  }
585
555
  }
586
- /** version: 2.35.0 */
556
+ /** version: 2.35.2 */
587
557
 
588
558
  /**
589
559
  * Copyright (C) 2018 salesforce.com, inc.
@@ -647,7 +617,7 @@ function applyAriaReflection(prototype = Element.prototype) {
647
617
  }
648
618
  }
649
619
  }
650
- /** version: 2.35.0 */
620
+ /** version: 2.35.2 */
651
621
 
652
622
  /* proxy-compat-disable */
653
623
 
@@ -658,8 +628,7 @@ function applyAriaReflection(prototype = Element.prototype) {
658
628
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
659
629
  */
660
630
  // Only used in LWC's Karma tests
661
- // @ts-ignore
662
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
631
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
663
632
  window.addEventListener('test-dummy-flag', () => {
664
633
  let hasFlag = false;
665
634
  if (lwcRuntimeFlags.DUMMY_TEST_FLAG) {
@@ -728,8 +697,8 @@ function addErrorComponentStack(vm, error) {
728
697
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
729
698
  */
730
699
  const alreadyLoggedMessages = new Set();
731
- // @ts-ignore
732
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
700
+ // Only used in LWC's Karma tests
701
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
733
702
  // @ts-ignore
734
703
  window.__lwcResetAlreadyLoggedMessages = () => {
735
704
  alreadyLoggedMessages.clear();
@@ -844,6 +813,14 @@ function setRefVNode(vm, ref, vnode) {
844
813
  refVNodes[ref] = vnode;
845
814
  }
846
815
  }
816
+ // Throw an error if we're running in prod mode. Ensures code is truly removed from prod mode.
817
+ function assertNotProd() {
818
+ /* istanbul ignore if */
819
+ if (process.env.NODE_ENV === 'production') {
820
+ // this method should never leak to prod
821
+ throw new ReferenceError();
822
+ }
823
+ }
847
824
 
848
825
  /*
849
826
  * Copyright (c) 2020, salesforce.com, inc.
@@ -1049,27 +1026,18 @@ function generateAccessorDescriptor(options) {
1049
1026
  }
1050
1027
  let isDomMutationAllowed = false;
1051
1028
  function unlockDomMutation() {
1052
- if (process.env.NODE_ENV === 'production') {
1053
- // this method should never leak to prod
1054
- throw new ReferenceError();
1055
- }
1029
+ assertNotProd(); // this method should never leak to prod
1056
1030
  isDomMutationAllowed = true;
1057
1031
  }
1058
1032
  function lockDomMutation() {
1059
- if (process.env.NODE_ENV === 'production') {
1060
- // this method should never leak to prod
1061
- throw new ReferenceError();
1062
- }
1033
+ assertNotProd(); // this method should never leak to prod
1063
1034
  isDomMutationAllowed = false;
1064
1035
  }
1065
1036
  function logMissingPortalError(name, type) {
1066
1037
  return logError(`The \`${name}\` ${type} is available only on elements that use the \`lwc:dom="manual"\` directive.`);
1067
1038
  }
1068
1039
  function patchElementWithRestrictions(elm, options) {
1069
- if (process.env.NODE_ENV === 'production') {
1070
- // this method should never leak to prod
1071
- throw new ReferenceError();
1072
- }
1040
+ assertNotProd(); // this method should never leak to prod
1073
1041
  const originalOuterHTMLDescriptor = getPropertyDescriptor(elm, 'outerHTML');
1074
1042
  const descriptors = {
1075
1043
  outerHTML: generateAccessorDescriptor({
@@ -1150,10 +1118,7 @@ function patchElementWithRestrictions(elm, options) {
1150
1118
  defineProperties(elm, descriptors);
1151
1119
  }
1152
1120
  function getShadowRootRestrictionsDescriptors(sr) {
1153
- if (process.env.NODE_ENV === 'production') {
1154
- // this method should never leak to prod
1155
- throw new ReferenceError();
1156
- }
1121
+ assertNotProd(); // this method should never leak to prod
1157
1122
  // Disallowing properties in dev mode only to avoid people doing the wrong
1158
1123
  // thing when using the real shadow root, because if that's the case,
1159
1124
  // the component will not work when running with synthetic shadow.
@@ -1194,10 +1159,7 @@ function getShadowRootRestrictionsDescriptors(sr) {
1194
1159
  // Custom Elements Restrictions:
1195
1160
  // -----------------------------
1196
1161
  function getCustomElementRestrictionsDescriptors(elm) {
1197
- if (process.env.NODE_ENV === 'production') {
1198
- // this method should never leak to prod
1199
- throw new ReferenceError();
1200
- }
1162
+ assertNotProd(); // this method should never leak to prod
1201
1163
  const originalAddEventListener = elm.addEventListener;
1202
1164
  const originalInnerHTMLDescriptor = getPropertyDescriptor(elm, 'innerHTML');
1203
1165
  const originalOuterHTMLDescriptor = getPropertyDescriptor(elm, 'outerHTML');
@@ -1242,10 +1204,7 @@ function getCustomElementRestrictionsDescriptors(elm) {
1242
1204
  };
1243
1205
  }
1244
1206
  function getComponentRestrictionsDescriptors() {
1245
- if (process.env.NODE_ENV === 'production') {
1246
- // this method should never leak to prod
1247
- throw new ReferenceError();
1248
- }
1207
+ assertNotProd(); // this method should never leak to prod
1249
1208
  return {
1250
1209
  tagName: generateAccessorDescriptor({
1251
1210
  get() {
@@ -1259,10 +1218,7 @@ function getComponentRestrictionsDescriptors() {
1259
1218
  };
1260
1219
  }
1261
1220
  function getLightningElementPrototypeRestrictionsDescriptors(proto) {
1262
- if (process.env.NODE_ENV === 'production') {
1263
- // this method should never leak to prod
1264
- throw new ReferenceError();
1265
- }
1221
+ assertNotProd(); // this method should never leak to prod
1266
1222
  const originalDispatchEvent = proto.dispatchEvent;
1267
1223
  const descriptors = {
1268
1224
  dispatchEvent: generateDataDescriptor({
@@ -1967,7 +1923,6 @@ function createBridgeToElementDescriptor(propName, descriptor) {
1967
1923
  }
1968
1924
  };
1969
1925
  }
1970
- const EMPTY_REFS = freeze(create(null));
1971
1926
  const refsCache = new WeakMap();
1972
1927
  /**
1973
1928
  * This class is the base class for any LWC element.
@@ -2254,7 +2209,6 @@ LightningElement.prototype = {
2254
2209
  }
2255
2210
  const {
2256
2211
  refVNodes,
2257
- hasRefVNodes,
2258
2212
  cmpTemplate
2259
2213
  } = vm;
2260
2214
  // If the `cmpTemplate` is null, that means that the template has not been rendered yet. Most likely this occurs
@@ -2268,15 +2222,9 @@ LightningElement.prototype = {
2268
2222
  // were introduced, we return undefined if the template has no refs defined
2269
2223
  // anywhere. This fixes components that may want to add an expando called `refs`
2270
2224
  // and are checking if it exists with `if (this.refs)` before adding it.
2271
- // Note it is not sufficient to just check if `refVNodes` is null or empty,
2272
- // because a template may have `lwc:ref` defined within a falsy `if:true` block.
2273
- if (!hasRefVNodes) {
2274
- return;
2275
- }
2276
- // For templates that are using `lwc:ref`, if there are no refs currently available
2277
- // (e.g. refs inside of a falsy `if:true` block), we return an empty object.
2225
+ // Note we use a null refVNodes to indicate that the template has no refs defined.
2278
2226
  if (isNull(refVNodes)) {
2279
- return EMPTY_REFS;
2227
+ return;
2280
2228
  }
2281
2229
  // The refNodes can be cached based on the refVNodes, since the refVNodes
2282
2230
  // are recreated from scratch every time the template is rendered.
@@ -3075,8 +3023,8 @@ function getDecoratorsMeta(Ctor) {
3075
3023
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3076
3024
  */
3077
3025
  let warned = false;
3078
- // @ts-ignore
3079
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
3026
+ // Only used in LWC's Karma tests
3027
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
3080
3028
  // @ts-ignore
3081
3029
  window.__lwcResetWarnedOnVersionMismatch = () => {
3082
3030
  warned = false;
@@ -3298,10 +3246,7 @@ const activeTemplates = new WeakMap();
3298
3246
  const activeComponents = new WeakMap();
3299
3247
  const activeStyles = new WeakMap();
3300
3248
  function getTemplateOrSwappedTemplate(tpl) {
3301
- if (process.env.NODE_ENV === 'production') {
3302
- // this method should never leak to prod
3303
- throw new ReferenceError();
3304
- }
3249
+ assertNotProd(); // this method should never leak to prod
3305
3250
  const visited = new Set();
3306
3251
  while (swappedTemplateMap.has(tpl) && !visited.has(tpl)) {
3307
3252
  visited.add(tpl);
@@ -3310,10 +3255,7 @@ function getTemplateOrSwappedTemplate(tpl) {
3310
3255
  return tpl;
3311
3256
  }
3312
3257
  function getComponentOrSwappedComponent(Ctor) {
3313
- if (process.env.NODE_ENV === 'production') {
3314
- // this method should never leak to prod
3315
- throw new ReferenceError();
3316
- }
3258
+ assertNotProd(); // this method should never leak to prod
3317
3259
  const visited = new Set();
3318
3260
  while (swappedComponentMap.has(Ctor) && !visited.has(Ctor)) {
3319
3261
  visited.add(Ctor);
@@ -3322,10 +3264,7 @@ function getComponentOrSwappedComponent(Ctor) {
3322
3264
  return Ctor;
3323
3265
  }
3324
3266
  function getStyleOrSwappedStyle(style) {
3325
- if (process.env.NODE_ENV === 'production') {
3326
- // this method should never leak to prod
3327
- throw new ReferenceError();
3328
- }
3267
+ assertNotProd(); // this method should never leak to prod
3329
3268
  const visited = new Set();
3330
3269
  while (swappedStyleMap.has(style) && !visited.has(style)) {
3331
3270
  visited.add(style);
@@ -3334,10 +3273,7 @@ function getStyleOrSwappedStyle(style) {
3334
3273
  return style;
3335
3274
  }
3336
3275
  function setActiveVM(vm) {
3337
- if (process.env.NODE_ENV === 'production') {
3338
- // this method should never leak to prod
3339
- throw new ReferenceError();
3340
- }
3276
+ assertNotProd(); // this method should never leak to prod
3341
3277
  // tracking active component
3342
3278
  const Ctor = vm.def.ctor;
3343
3279
  let componentVMs = activeComponents.get(Ctor);
@@ -3380,10 +3316,7 @@ function setActiveVM(vm) {
3380
3316
  }
3381
3317
  }
3382
3318
  function removeActiveVM(vm) {
3383
- if (process.env.NODE_ENV === 'production') {
3384
- // this method should never leak to prod
3385
- throw new ReferenceError();
3386
- }
3319
+ assertNotProd(); // this method should never leak to prod
3387
3320
  // tracking inactive component
3388
3321
  const Ctor = vm.def.ctor;
3389
3322
  let list = activeComponents.get(Ctor);
@@ -5434,10 +5367,7 @@ function setVMBeingRendered(vm) {
5434
5367
  vmBeingRendered = vm;
5435
5368
  }
5436
5369
  function validateSlots(vm, html) {
5437
- if (process.env.NODE_ENV === 'production') {
5438
- // this method should never leak to prod
5439
- throw new ReferenceError();
5440
- }
5370
+ assertNotProd(); // this method should never leak to prod
5441
5371
  const { cmpSlots } = vm;
5442
5372
  const { slots = EmptyArray } = html;
5443
5373
  for (const slotName in cmpSlots.slotAssignments) {
@@ -5566,9 +5496,7 @@ function evaluateTemplate(vm, html) {
5566
5496
  setActiveVM(vm);
5567
5497
  }
5568
5498
  // reset the refs; they will be set during the tmpl() instantiation
5569
- const hasRefVNodes = Boolean(html.hasRefs);
5570
- vm.hasRefVNodes = hasRefVNodes;
5571
- vm.refVNodes = hasRefVNodes ? create(null) : null;
5499
+ vm.refVNodes = html.hasRefs ? create(null) : null;
5572
5500
  // right before producing the vnodes, we clear up all internal references
5573
5501
  // to custom elements from the template.
5574
5502
  vm.velements = [];
@@ -5749,7 +5677,7 @@ function markComponentAsDirty(vm) {
5749
5677
  const cmpEventListenerMap = new WeakMap();
5750
5678
  function getWrappedComponentsListener(vm, listener) {
5751
5679
  if (!isFunction$1(listener)) {
5752
- throw new TypeError(); // avoiding problems with non-valid listeners
5680
+ throw new TypeError('Expected an EventListener but received ' + typeof listener); // avoiding problems with non-valid listeners
5753
5681
  }
5754
5682
  let wrappedListener = cmpEventListenerMap.get(listener);
5755
5683
  if (isUndefined$1(wrappedListener)) {
@@ -5894,7 +5822,6 @@ function createVM(elm, ctor, renderer, options) {
5894
5822
  mode,
5895
5823
  owner,
5896
5824
  refVNodes: null,
5897
- hasRefVNodes: false,
5898
5825
  children: EmptyArray,
5899
5826
  aChildren: EmptyArray,
5900
5827
  velements: EmptyArray,
@@ -6268,22 +6195,6 @@ function runWithBoundaryProtection(vm, owner, pre, job, post) {
6268
6195
  }
6269
6196
  }
6270
6197
 
6271
- /*
6272
- * Copyright (c) 2018, salesforce.com, inc.
6273
- * All rights reserved.
6274
- * SPDX-License-Identifier: MIT
6275
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6276
- */
6277
- //
6278
- // The goal of this code is to detect invalid cross-root ARIA references in synthetic shadow DOM.
6279
- // These invalid references should be fixed before the offending components can be migrated to native shadow DOM.
6280
- // When invalid usage is detected, we warn in dev mode and call the reporting API if enabled.
6281
- // See: https://lwc.dev/guide/accessibility#link-ids-and-aria-attributes-from-different-templates
6282
- //
6283
- // Use the unpatched native getElementById/querySelectorAll rather than the synthetic one
6284
- _globalThis[KEY__NATIVE_GET_ELEMENT_BY_ID];
6285
- _globalThis[KEY__NATIVE_QUERY_SELECTOR_ALL];
6286
-
6287
6198
  /*
6288
6199
  * Copyright (c) 2018, salesforce.com, inc.
6289
6200
  * All rights reserved.
@@ -6528,7 +6439,7 @@ function freezeTemplate(tmpl) {
6528
6439
  }
6529
6440
  }
6530
6441
  }
6531
- /* version: 2.35.0 */
6442
+ /* version: 2.35.2 */
6532
6443
 
6533
6444
  /*
6534
6445
  * Copyright (c) 2020, salesforce.com, inc.
@@ -6999,6 +6910,6 @@ function renderComponent(tagName, Ctor, props = {}) {
6999
6910
  */
7000
6911
  freeze(LightningElement);
7001
6912
  seal(LightningElement.prototype);
7002
- /* version: 2.35.0 */
6913
+ /* version: 2.35.2 */
7003
6914
 
7004
6915
  export { LightningElement, api$1 as api, createContextProvider, freezeTemplate, getComponentDef, isComponentConstructor, parseFragment, parseFragment as parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderComponent, renderer, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, track, unwrap, wire };
@@ -29,10 +29,10 @@ function fail(msg) {
29
29
 
30
30
  var assert = /*#__PURE__*/Object.freeze({
31
31
  __proto__: null,
32
+ fail: fail,
32
33
  invariant: invariant,
33
- isTrue: isTrue$1,
34
34
  isFalse: isFalse$1,
35
- fail: fail
35
+ isTrue: isTrue$1
36
36
  });
37
37
 
38
38
  /*
@@ -88,41 +88,11 @@ function toString(obj) {
88
88
  * SPDX-License-Identifier: MIT
89
89
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
90
90
  */
91
- // Inspired from: https://mathiasbynens.be/notes/globalthis
92
- const _globalThis = /*@__PURE__*/ (function () {
93
- // On recent browsers, `globalThis` is already defined. In this case return it directly.
94
- if (typeof globalThis === 'object') {
95
- return globalThis;
96
- }
97
- let _globalThis;
98
- try {
99
- // eslint-disable-next-line no-extend-native
100
- Object.defineProperty(Object.prototype, '__magic__', {
101
- get: function () {
102
- return this;
103
- },
104
- configurable: true,
105
- });
106
- // __magic__ is undefined in Safari 10 and IE10 and older.
107
- // @ts-ignore
108
- // eslint-disable-next-line no-undef
109
- _globalThis = __magic__;
110
- // @ts-ignore
111
- delete Object.prototype.__magic__;
112
- }
113
- catch (ex) {
114
- // In IE8, Object.defineProperty only works on DOM objects.
115
- }
116
- finally {
117
- // If the magic above fails for some reason we assume that we are in a legacy browser.
118
- // Assume `window` exists in this case.
119
- if (typeof _globalThis === 'undefined') {
120
- // @ts-ignore
121
- _globalThis = window;
122
- }
123
- }
124
- return _globalThis;
125
- })();
91
+ // See browser support for globalThis:
92
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility
93
+ /* istanbul ignore next */
94
+ // @ts-ignore
95
+ const _globalThis = typeof globalThis === 'object' ? globalThis : window;
126
96
 
127
97
  /*
128
98
  * Copyright (c) 2018, salesforce.com, inc.
@@ -150,7 +120,7 @@ const KEY__NATIVE_QUERY_SELECTOR_ALL = '$nativeQuerySelectorAll$';
150
120
  // We use this to detect symbol support in order to avoid the expensive symbol polyfill. Note that
151
121
  // we can't use typeof since it will fail when transpiling.
152
122
  const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === 'Symbol(x)')();
153
- /** version: 2.35.0 */
123
+ /** version: 2.35.2 */
154
124
 
155
125
  /*
156
126
  * Copyright (c) 2018, salesforce.com, inc.
@@ -465,7 +435,7 @@ if (!_globalThis.lwcRuntimeFlags) {
465
435
  Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
466
436
  }
467
437
  const lwcRuntimeFlags = _globalThis.lwcRuntimeFlags;
468
- /** version: 2.35.0 */
438
+ /** version: 2.35.2 */
469
439
 
470
440
  /*
471
441
  * Copyright (c) 2018, salesforce.com, inc.
@@ -4712,8 +4682,7 @@ defineProperty(Element.prototype, '$domManual$', {
4712
4682
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4713
4683
  */
4714
4684
  // Only used in LWC's Karma tests
4715
- // @ts-ignore
4716
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
4685
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
4717
4686
  window.addEventListener('test-dummy-flag', () => {
4718
4687
  let hasFlag = false;
4719
4688
  if (lwcRuntimeFlags.DUMMY_TEST_FLAG) {
@@ -4727,4 +4696,4 @@ if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
4727
4696
  }));
4728
4697
  });
4729
4698
  }
4730
- /** version: 2.35.0 */
4699
+ /** version: 2.35.2 */
@@ -32,10 +32,10 @@
32
32
 
33
33
  var assert = /*#__PURE__*/Object.freeze({
34
34
  __proto__: null,
35
+ fail: fail,
35
36
  invariant: invariant,
36
- isTrue: isTrue$1,
37
37
  isFalse: isFalse$1,
38
- fail: fail
38
+ isTrue: isTrue$1
39
39
  });
40
40
 
41
41
  /*
@@ -91,41 +91,11 @@
91
91
  * SPDX-License-Identifier: MIT
92
92
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
93
93
  */
94
- // Inspired from: https://mathiasbynens.be/notes/globalthis
95
- const _globalThis = /*@__PURE__*/ (function () {
96
- // On recent browsers, `globalThis` is already defined. In this case return it directly.
97
- if (typeof globalThis === 'object') {
98
- return globalThis;
99
- }
100
- let _globalThis;
101
- try {
102
- // eslint-disable-next-line no-extend-native
103
- Object.defineProperty(Object.prototype, '__magic__', {
104
- get: function () {
105
- return this;
106
- },
107
- configurable: true,
108
- });
109
- // __magic__ is undefined in Safari 10 and IE10 and older.
110
- // @ts-ignore
111
- // eslint-disable-next-line no-undef
112
- _globalThis = __magic__;
113
- // @ts-ignore
114
- delete Object.prototype.__magic__;
115
- }
116
- catch (ex) {
117
- // In IE8, Object.defineProperty only works on DOM objects.
118
- }
119
- finally {
120
- // If the magic above fails for some reason we assume that we are in a legacy browser.
121
- // Assume `window` exists in this case.
122
- if (typeof _globalThis === 'undefined') {
123
- // @ts-ignore
124
- _globalThis = window;
125
- }
126
- }
127
- return _globalThis;
128
- })();
94
+ // See browser support for globalThis:
95
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility
96
+ /* istanbul ignore next */
97
+ // @ts-ignore
98
+ const _globalThis = typeof globalThis === 'object' ? globalThis : window;
129
99
 
130
100
  /*
131
101
  * Copyright (c) 2018, salesforce.com, inc.
@@ -153,7 +123,7 @@
153
123
  // We use this to detect symbol support in order to avoid the expensive symbol polyfill. Note that
154
124
  // we can't use typeof since it will fail when transpiling.
155
125
  const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === 'Symbol(x)')();
156
- /** version: 2.35.0 */
126
+ /** version: 2.35.2 */
157
127
 
158
128
  /*
159
129
  * Copyright (c) 2018, salesforce.com, inc.
@@ -468,7 +438,7 @@
468
438
  Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
469
439
  }
470
440
  const lwcRuntimeFlags = _globalThis.lwcRuntimeFlags;
471
- /** version: 2.35.0 */
441
+ /** version: 2.35.2 */
472
442
 
473
443
  /*
474
444
  * Copyright (c) 2018, salesforce.com, inc.
@@ -4715,8 +4685,7 @@
4715
4685
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4716
4686
  */
4717
4687
  // Only used in LWC's Karma tests
4718
- // @ts-ignore
4719
- if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
4688
+ if (process.env.NODE_ENV === 'test-karma-lwc') {
4720
4689
  window.addEventListener('test-dummy-flag', () => {
4721
4690
  let hasFlag = false;
4722
4691
  if (lwcRuntimeFlags.DUMMY_TEST_FLAG) {
@@ -4730,6 +4699,6 @@
4730
4699
  }));
4731
4700
  });
4732
4701
  }
4733
- /** version: 2.35.0 */
4702
+ /** version: 2.35.2 */
4734
4703
 
4735
4704
  })();