@lwrjs/client-modules 0.8.12 → 0.8.14
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.
|
@@ -209,18 +209,20 @@ undefined;
|
|
|
209
209
|
const {
|
|
210
210
|
valueOf: BooleanProtoValueOf$LWS
|
|
211
211
|
} = Boolean.prototype;
|
|
212
|
-
const LOCKER_IDENTIFIER_MARKER$LWS
|
|
212
|
+
const LOCKER_IDENTIFIER_MARKER$LWS = '$LWS'; // This package is bundled by third-parties that have their own build time
|
|
213
213
|
// replacement logic. Instead of customizing each build system to be aware
|
|
214
214
|
// of this package we implement a two phase debug mode by performing small
|
|
215
215
|
// runtime checks to determine phase one, our code is unminified, and
|
|
216
216
|
// phase two, the user opted-in to custom devtools formatters. Phase one
|
|
217
217
|
// is used for light weight initialization time debug while phase two is
|
|
218
|
-
// reserved for post initialization runtime
|
|
219
|
-
|
|
218
|
+
// reserved for post initialization runtime
|
|
219
|
+
|
|
220
|
+
const LOCKER_UNMINIFIED_FLAG$LWS$1 = // eslint-disable-next-line @typescript-eslint/naming-convention
|
|
220
221
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
/* istanbul ignore next */
|
|
223
|
+
`${function LOCKER_UNMINIFIED_FLAG$LWS() {
|
|
224
|
+
return LOCKER_UNMINIFIED_FLAG$LWS.name;
|
|
225
|
+
}()}`.includes('LOCKER_UNMINIFIED_FLAG');
|
|
224
226
|
const CHAR_QUOTE_DOUBLE$LWS = '"';
|
|
225
227
|
const CHAR_QUOTE_SINGLE$LWS = "'";
|
|
226
228
|
const SANDBOX_EVAL_CONTEXT_NAME$LWS = '$lockerEvalContext$';
|
|
@@ -242,8 +244,8 @@ const TO_STRING_BRAND_SYMBOL$LWS$1 = '[object Symbol]';
|
|
|
242
244
|
const TO_STRING_BRAND_UNDEFINED$LWS = '[object Undefined]';
|
|
243
245
|
const TO_STRING_BRAND_WEAK_MAP$LWS = '[object WeakMap]';
|
|
244
246
|
const TO_STRING_BRAND_WEAK_SET$LWS = '[object WeakSet]';
|
|
245
|
-
const UNCOMPILED_LOCATION_NAME$LWS = `uncompiledLocation${LOCKER_IDENTIFIER_MARKER$LWS
|
|
246
|
-
const UNCOMPILED_TOP_NAME$LWS = `uncompiledTop${LOCKER_IDENTIFIER_MARKER$LWS
|
|
247
|
+
const UNCOMPILED_LOCATION_NAME$LWS = `uncompiledLocation${LOCKER_IDENTIFIER_MARKER$LWS}`;
|
|
248
|
+
const UNCOMPILED_TOP_NAME$LWS = `uncompiledTop${LOCKER_IDENTIFIER_MARKER$LWS}`;
|
|
247
249
|
const WEBPACK_REQUIRE_NAME$LWS = '__webpack_require__';
|
|
248
250
|
const DateCtor$LWS = Date;
|
|
249
251
|
const {
|
|
@@ -1160,9 +1162,6 @@ function consoleWarn$LWS(...args$LWS) {
|
|
|
1160
1162
|
ReflectApply$LWS$1(consoleWarnRef$LWS, consoleRef$LWS, args$LWS);
|
|
1161
1163
|
} // Used by '@locker/near-membrane-base'
|
|
1162
1164
|
|
|
1163
|
-
|
|
1164
|
-
const ErrorCtor$LWS$1 = Error; // Used by '@locker/near-membrane-' packages.
|
|
1165
|
-
|
|
1166
1165
|
class LockerSecurityError$LWS extends Error {
|
|
1167
1166
|
constructor(message$LWS) {
|
|
1168
1167
|
super(`Lightning Web Security: ${message$LWS}`);
|
|
@@ -1318,7 +1317,7 @@ function createRevokedProxy$LWS(object$LWS) {
|
|
|
1318
1317
|
revocable$LWS.revoke();
|
|
1319
1318
|
return revocable$LWS.proxy;
|
|
1320
1319
|
}
|
|
1321
|
-
/*! version: 0.17.
|
|
1320
|
+
/*! version: 0.17.25 */
|
|
1322
1321
|
|
|
1323
1322
|
/*!
|
|
1324
1323
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -1363,6 +1362,7 @@ const {
|
|
|
1363
1362
|
hasAttribute: ElementProtoHasAttribute$LWS,
|
|
1364
1363
|
querySelector: ElementProtoQuerySelector$LWS,
|
|
1365
1364
|
removeAttributeNode: ElementProtoRemoveAttributeNode$LWS,
|
|
1365
|
+
removeAttributeNS: ElementProtoRemoveAttributeNS$LWS,
|
|
1366
1366
|
setAttribute: ElementProtoSetAttribute$LWS$1,
|
|
1367
1367
|
setAttributeNS: ElementProtoSetAttributeNS$LWS
|
|
1368
1368
|
} = ElementProto$LWS;
|
|
@@ -1384,7 +1384,8 @@ const {
|
|
|
1384
1384
|
isEqualNode: NodeProtoIsEqualNode$LWS
|
|
1385
1385
|
} = NodeProto$LWS$1;
|
|
1386
1386
|
const NodeProtoChildNodesGetter$LWS = ObjectLookupOwnGetter$LWS$1(NodeProto$LWS$1, 'childNodes');
|
|
1387
|
-
const NodeProtoFirstChildGetter$LWS = ObjectLookupOwnGetter$LWS$1(NodeProto$LWS$1, 'firstChild');
|
|
1387
|
+
const NodeProtoFirstChildGetter$LWS = ObjectLookupOwnGetter$LWS$1(NodeProto$LWS$1, 'firstChild');
|
|
1388
|
+
ObjectLookupOwnGetter$LWS$1(NodeProto$LWS$1, 'isConnected'); // Used by '@locker/near-membrane-dom'.
|
|
1388
1389
|
|
|
1389
1390
|
ObjectLookupOwnGetter$LWS$1(NodeProto$LWS$1, 'lastChild');
|
|
1390
1391
|
const NodeProtoNodeNameGetter$LWS = ObjectLookupOwnGetter$LWS$1(NodeProto$LWS$1, 'nodeName');
|
|
@@ -1400,7 +1401,6 @@ const {
|
|
|
1400
1401
|
clearInterval: WindowClearInterval$LWS,
|
|
1401
1402
|
decodeURIComponent: WindowDecodeURIComponent$LWS,
|
|
1402
1403
|
encodeURIComponent: WindowEncodeURIComponent$LWS,
|
|
1403
|
-
fetch: WindowFetch$LWS,
|
|
1404
1404
|
setInterval: WindowSetInterval$LWS,
|
|
1405
1405
|
top: topWindow$LWS
|
|
1406
1406
|
} = rootWindow$LWS$1;
|
|
@@ -1598,11 +1598,10 @@ const {
|
|
|
1598
1598
|
} = DOMImplementation.prototype;
|
|
1599
1599
|
const DOMTokenListProtoValueGetter$LWS = ObjectLookupOwnGetter$LWS$1(DOMTokenList.prototype, 'value');
|
|
1600
1600
|
const EventCtor$LWS = Event;
|
|
1601
|
-
const ErrorEventCtor$LWS = ErrorEvent;
|
|
1602
1601
|
const EventProtoCurrentTargetGetter$LWS = ObjectLookupOwnGetter$LWS$1(EventCtor$LWS.prototype, 'currentTarget');
|
|
1603
1602
|
const {
|
|
1604
1603
|
addEventListener: EventTargetProtoAddEventListener$LWS,
|
|
1605
|
-
|
|
1604
|
+
removeEventListener: EventTargetProtoRemoveEventListener$LWS
|
|
1606
1605
|
} = EventTarget.prototype;
|
|
1607
1606
|
const HTMLAnchorElementProtoHostnameGetter$LWS = ObjectLookupOwnGetter$LWS$1(HTMLAnchorElement.prototype, 'hostname');
|
|
1608
1607
|
const {
|
|
@@ -1623,19 +1622,15 @@ const {
|
|
|
1623
1622
|
|
|
1624
1623
|
ObjectLookupOwnGetter$LWS$1(HTMLIFrameElementProto$LWS, 'contentWindow');
|
|
1625
1624
|
const HTMLIFrameElementProtoSrcSetter$LWS = ObjectLookupOwnSetter$LWS(HTMLIFrameElementProto$LWS, 'src');
|
|
1626
|
-
|
|
1625
|
+
const {
|
|
1626
|
+
get: HTMLScriptElementProtoSrcGetter$LWS,
|
|
1627
|
+
set: HTMLScriptElementProtoSrcSetter$LWS
|
|
1628
|
+
} = ReflectGetOwnPropertyDescriptor$LWS(HTMLScriptElement.prototype, 'src');
|
|
1627
1629
|
const NAMESPACE_DEFAULT$LWS = 'default';
|
|
1628
1630
|
const NAMESPACE_SVG$LWS = 'http://www.w3.org/2000/svg';
|
|
1629
1631
|
const NAMESPACE_XHTML$LWS = 'http://www.w3.org/1999/xhtml';
|
|
1630
1632
|
const NAMESPACE_XLINK$LWS = 'http://www.w3.org/1999/xlink';
|
|
1631
1633
|
const RequestProtoURLGetter$LWS = ObjectLookupOwnGetter$LWS$1(Request.prototype, 'url');
|
|
1632
|
-
const ResponseCtor$LWS = Response;
|
|
1633
|
-
const ResponseProto$LWS = ResponseCtor$LWS.prototype;
|
|
1634
|
-
const {
|
|
1635
|
-
text: ResponseProtoText$LWS
|
|
1636
|
-
} = ResponseProto$LWS;
|
|
1637
|
-
const ResponseProtoStatus$LWS = ObjectLookupOwnGetter$LWS$1(ResponseProto$LWS, 'status');
|
|
1638
|
-
const ResponseProtoStatusText$LWS = ObjectLookupOwnGetter$LWS$1(ResponseProto$LWS, 'statusText');
|
|
1639
1634
|
const documentPattern$LWS = 'document';
|
|
1640
1635
|
const windowPattern$LWS = 'document\\.defaultView|frames|globalThis|self|window';
|
|
1641
1636
|
const webpackGlobalPattern$LWS = `${windowPattern$LWS}|global`;
|
|
@@ -1750,17 +1745,87 @@ function transformSourceText$LWS(sourceText$LWS) {
|
|
|
1750
1745
|
return ReflectApply$LWS$1(StringProtoSlice$LWS$1, code$LWS, [0, afterPragmaIndex$LWS]) + prefix$LWS + ReflectApply$LWS$1(StringProtoSlice$LWS$1, code$LWS, [afterPragmaIndex$LWS]);
|
|
1751
1746
|
}
|
|
1752
1747
|
|
|
1748
|
+
const {
|
|
1749
|
+
createObjectURL: URLCreateObjectURL$LWS,
|
|
1750
|
+
revokeObjectURL: URLRevokeObjectURL$LWS
|
|
1751
|
+
} = URL;
|
|
1752
|
+
const BLOB_SCRIPT_OPTIONS$LWS = {
|
|
1753
|
+
__proto__: null,
|
|
1754
|
+
type: 'text/javascript'
|
|
1755
|
+
};
|
|
1756
|
+
const SCRIPT_EVALUATOR_PROPERTY_NAME$LWS = '$evaluator$';
|
|
1757
|
+
const SCRIPT_PAYLOAD_TOKEN$LWS = '$payload$';
|
|
1758
|
+
const SCRIPT_HOOK_SRC_SOURCE_TEXT$LWS = `document.currentScript.${SCRIPT_EVALUATOR_PROPERTY_NAME$LWS}("${SCRIPT_PAYLOAD_TOKEN$LWS}")`;
|
|
1759
|
+
const SCRIPT_HOOK_TEXT_CONTENT_SOURCE_TEXT$LWS = `document.currentScript.${SCRIPT_EVALUATOR_PROPERTY_NAME$LWS}()`;
|
|
1760
|
+
const seenNodesThatSetTextContent$LWS = toSafeWeakSet$LWS(new WeakSetCtor$LWS());
|
|
1761
|
+
|
|
1762
|
+
function defineEvaluatorProperty$LWS(script$LWS, callback$LWS) {
|
|
1763
|
+
if (!ReflectDefineProperty$LWS$1(script$LWS, SCRIPT_EVALUATOR_PROPERTY_NAME$LWS, {
|
|
1764
|
+
__proto__: null,
|
|
1765
|
+
configurable: true,
|
|
1766
|
+
// Create a bound function to obscure the getter source as "[native code]".
|
|
1767
|
+
get: ReflectApply$LWS$1(FunctionProtoBind$LWS, () => {
|
|
1768
|
+
deleteScriptEvaluatorProperty$LWS(script$LWS);
|
|
1769
|
+
const ownerDoc$LWS = ReflectApply$LWS$1(NodeProtoOwnerDocumentGetter$LWS, script$LWS, []);
|
|
1770
|
+
const defaultView$LWS = ReflectApply$LWS$1(DocumentProtoDefaultViewGetter$LWS, ownerDoc$LWS, []); // We don't need to use something like `WindowLocationGetter()`
|
|
1771
|
+
// because the 'location' and 'top' property are non-configurable.
|
|
1772
|
+
|
|
1773
|
+
const context$LWS = {
|
|
1774
|
+
[UNCOMPILED_LOCATION_NAME$LWS]: defaultView$LWS.location,
|
|
1775
|
+
[UNCOMPILED_TOP_NAME$LWS]: defaultView$LWS.top
|
|
1776
|
+
};
|
|
1777
|
+
return (...args$LWS) => {
|
|
1778
|
+
callback$LWS(context$LWS, defaultView$LWS, ownerDoc$LWS, args$LWS);
|
|
1779
|
+
};
|
|
1780
|
+
}, [])
|
|
1781
|
+
})) {
|
|
1782
|
+
// istanbul ignore next: require a test to get the evaluator in a bad state. Like code that tried to access it in between. This is mostly a "the universe is not as expected error"
|
|
1783
|
+
throw new LockerSecurityError$LWS(`Cannot evaluate ${ReflectApply$LWS$1(NodeProtoNodeNameGetter$LWS, script$LWS, [])}`);
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
function defineSrcEvaluatorProperty$LWS(script$LWS, sandboxEvaluator$LWS) {
|
|
1788
|
+
defineEvaluatorProperty$LWS(script$LWS, (context$LWS, defaultView$LWS, ownerDoc$LWS, {
|
|
1789
|
+
0: encodedPayload$LWS
|
|
1790
|
+
}) => {
|
|
1791
|
+
sandboxEvaluator$LWS(transformSourceText$LWS(WindowDecodeURIComponent$LWS(toString$LWS(encodedPayload$LWS))), context$LWS, defaultView$LWS, ownerDoc$LWS);
|
|
1792
|
+
});
|
|
1793
|
+
return true;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
function defineTextContentEvaluatorProperty$LWS(script$LWS, textContent$LWS, sandboxEvaluator$LWS) {
|
|
1797
|
+
// The textContent of a script element is only evaluated on the first set.
|
|
1798
|
+
// Subsequent sets change the textContent value but are not evaluated.
|
|
1799
|
+
if (seenNodesThatSetTextContent$LWS.has(script$LWS)) {
|
|
1800
|
+
return false;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
seenNodesThatSetTextContent$LWS.add(script$LWS); // prettier-ignore
|
|
1804
|
+
|
|
1805
|
+
defineEvaluatorProperty$LWS(script$LWS, (context$LWS, defaultView$LWS, ownerDoc$LWS) => {
|
|
1806
|
+
sandboxEvaluator$LWS(transformSourceText$LWS(textContent$LWS), context$LWS, defaultView$LWS, ownerDoc$LWS);
|
|
1807
|
+
});
|
|
1808
|
+
return true;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
function deleteScriptEvaluatorProperty$LWS(script$LWS) {
|
|
1812
|
+
ReflectDeleteProperty$LWS$1(script$LWS, SCRIPT_EVALUATOR_PROPERTY_NAME$LWS);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
function getSrcEvaluatorHookSourceText$LWS(sourceText$LWS) {
|
|
1816
|
+
// Creates a blob URL to invoke the evaluator hook with encoded source text.
|
|
1817
|
+
return URLCreateObjectURL$LWS(new BlobCtor$LWS([ReflectApply$LWS$1(StringProtoReplace$LWS, SCRIPT_HOOK_SRC_SOURCE_TEXT$LWS, [SCRIPT_PAYLOAD_TOKEN$LWS, WindowEncodeURIComponent$LWS(sourceText$LWS)])], BLOB_SCRIPT_OPTIONS$LWS));
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
const getTextContentEvaluatorHookSourceText$LWS = () => SCRIPT_HOOK_TEXT_CONTENT_SOURCE_TEXT$LWS;
|
|
1821
|
+
|
|
1753
1822
|
const {
|
|
1754
1823
|
key: StorageProtoKey$LWS,
|
|
1755
1824
|
getItem: StorageProtoGetItem$LWS,
|
|
1756
1825
|
removeItem: StorageProtoRemoveItem$LWS,
|
|
1757
1826
|
setItem: StorageProtoSetItem$LWS
|
|
1758
1827
|
} = Storage.prototype;
|
|
1759
|
-
const SVGElementProtoDatasetGetter$LWS = ObjectLookupOwnGetter$LWS$1(SVGElement.prototype, 'dataset');
|
|
1760
|
-
const {
|
|
1761
|
-
createObjectURL: URLCreateObjectURL$LWS,
|
|
1762
|
-
revokeObjectURL: URLRevokeObjectURL$LWS
|
|
1763
|
-
} = URL; // This has to be done 1-by-1 because putting a full file ignore in this file
|
|
1828
|
+
const SVGElementProtoDatasetGetter$LWS = ObjectLookupOwnGetter$LWS$1(SVGElement.prototype, 'dataset'); // This has to be done 1-by-1 because putting a full file ignore in this file
|
|
1764
1829
|
// will result in dist/index.mjs.js containing the directive and subsequently being
|
|
1765
1830
|
// ignored.
|
|
1766
1831
|
// istanbul ignore next
|
|
@@ -1770,13 +1835,14 @@ const {
|
|
|
1770
1835
|
prototype: XhrProto$LWS
|
|
1771
1836
|
} = XhrCtor$LWS;
|
|
1772
1837
|
const {
|
|
1838
|
+
abort: XhrProtoAbort$LWS,
|
|
1773
1839
|
open: XhrProtoOpen$LWS,
|
|
1774
1840
|
send: XhrProtoSend$LWS
|
|
1775
1841
|
} = XhrProto$LWS;
|
|
1776
1842
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
1777
1843
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
1778
1844
|
const XhrProtoWithCredentialsSetter$LWS = ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
1779
|
-
/*! version: 0.17.
|
|
1845
|
+
/*! version: 0.17.25 */
|
|
1780
1846
|
|
|
1781
1847
|
/*!
|
|
1782
1848
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -1848,7 +1914,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
1848
1914
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
1849
1915
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
1850
1916
|
}
|
|
1851
|
-
/*! version: 0.17.
|
|
1917
|
+
/*! version: 0.17.25 */
|
|
1852
1918
|
|
|
1853
1919
|
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */
|
|
1854
1920
|
|
|
@@ -3787,7 +3853,7 @@ function sanitizeSvgTextReturnDOM$LWS(dirty$LWS) {
|
|
|
3787
3853
|
const sanitizer$LWS = svgSanitizer$LWS();
|
|
3788
3854
|
return sanitizer$LWS.sanitize(dirty$LWS);
|
|
3789
3855
|
}
|
|
3790
|
-
/*! version: 0.17.
|
|
3856
|
+
/*! version: 0.17.25 */
|
|
3791
3857
|
|
|
3792
3858
|
/*!
|
|
3793
3859
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -5894,73 +5960,6 @@ function initDistortionHTMLScriptElementSrcGetter$LWS({
|
|
|
5894
5960
|
};
|
|
5895
5961
|
}
|
|
5896
5962
|
|
|
5897
|
-
const BLOB_SCRIPT_OPTIONS$LWS = {
|
|
5898
|
-
__proto__: null,
|
|
5899
|
-
type: 'text/javascript'
|
|
5900
|
-
};
|
|
5901
|
-
const SCRIPT_EVALUATOR_PROPERTY_NAME$LWS = '$evaluator$';
|
|
5902
|
-
const SCRIPT_PAYLOAD_TOKEN$LWS = '$payload$';
|
|
5903
|
-
const SCRIPT_HOOK_SRC_SOURCE_TEXT$LWS = `document.currentScript.${SCRIPT_EVALUATOR_PROPERTY_NAME$LWS}("${SCRIPT_PAYLOAD_TOKEN$LWS}")`;
|
|
5904
|
-
const SCRIPT_HOOK_TEXT_CONTENT_SOURCE_TEXT$LWS = `document.currentScript.${SCRIPT_EVALUATOR_PROPERTY_NAME$LWS}()`;
|
|
5905
|
-
const seenNodesThatSetTextContent$LWS = toSafeWeakSet$LWS(new WeakSetCtor$LWS());
|
|
5906
|
-
|
|
5907
|
-
function defineEvaluatorProperty$LWS(host$LWS, callback$LWS) {
|
|
5908
|
-
if (!ReflectDefineProperty$LWS$1(host$LWS, SCRIPT_EVALUATOR_PROPERTY_NAME$LWS, {
|
|
5909
|
-
__proto__: null,
|
|
5910
|
-
configurable: true,
|
|
5911
|
-
// Create a bound function to obscure the getter source as "[native code]".
|
|
5912
|
-
get: ReflectApply$LWS$1(FunctionProtoBind$LWS, () => {
|
|
5913
|
-
ReflectDeleteProperty$LWS$1(host$LWS, SCRIPT_EVALUATOR_PROPERTY_NAME$LWS);
|
|
5914
|
-
const ownerDoc$LWS = ReflectApply$LWS$1(NodeProtoOwnerDocumentGetter$LWS, host$LWS, []);
|
|
5915
|
-
const defaultView$LWS = ReflectApply$LWS$1(DocumentProtoDefaultViewGetter$LWS, ownerDoc$LWS, []); // We don't need to use something like `WindowLocationGetter()`
|
|
5916
|
-
// because the 'location' and 'top' property are non-configurable.
|
|
5917
|
-
|
|
5918
|
-
const context$LWS = {
|
|
5919
|
-
[UNCOMPILED_LOCATION_NAME$LWS]: defaultView$LWS.location,
|
|
5920
|
-
[UNCOMPILED_TOP_NAME$LWS]: defaultView$LWS.top
|
|
5921
|
-
};
|
|
5922
|
-
return (...args$LWS) => {
|
|
5923
|
-
callback$LWS(context$LWS, defaultView$LWS, ownerDoc$LWS, args$LWS);
|
|
5924
|
-
};
|
|
5925
|
-
}, [])
|
|
5926
|
-
})) {
|
|
5927
|
-
// istanbul ignore next: require a test to get the evaluator in a bad state. Like code that tried to access it in between. This is mostly a "the universe is not as expected error"
|
|
5928
|
-
throw new LockerSecurityError$LWS(`Cannot evaluate ${ReflectApply$LWS$1(NodeProtoNodeNameGetter$LWS, host$LWS, [])}`);
|
|
5929
|
-
}
|
|
5930
|
-
}
|
|
5931
|
-
|
|
5932
|
-
function defineSrcEvaluatorProperty$LWS(host$LWS, sandboxEvaluator$LWS) {
|
|
5933
|
-
// prettier-ignore
|
|
5934
|
-
defineEvaluatorProperty$LWS(host$LWS, (context$LWS, defaultView$LWS, ownerDoc$LWS, {
|
|
5935
|
-
0: encodedPayload$LWS
|
|
5936
|
-
}) => {
|
|
5937
|
-
sandboxEvaluator$LWS(transformSourceText$LWS(WindowDecodeURIComponent$LWS(toString$LWS(encodedPayload$LWS))), context$LWS, defaultView$LWS, ownerDoc$LWS);
|
|
5938
|
-
});
|
|
5939
|
-
return true;
|
|
5940
|
-
}
|
|
5941
|
-
|
|
5942
|
-
function defineTextContentEvaluatorProperty$LWS(host$LWS, textContent$LWS, sandboxEvaluator$LWS) {
|
|
5943
|
-
// The textContent of a script element is only evaluated on the first set.
|
|
5944
|
-
// Subsequent sets change the textContent value but are not evaluated.
|
|
5945
|
-
if (seenNodesThatSetTextContent$LWS.has(host$LWS)) {
|
|
5946
|
-
return false;
|
|
5947
|
-
}
|
|
5948
|
-
|
|
5949
|
-
seenNodesThatSetTextContent$LWS.add(host$LWS); // prettier-ignore
|
|
5950
|
-
|
|
5951
|
-
defineEvaluatorProperty$LWS(host$LWS, (context$LWS, defaultView$LWS, ownerDoc$LWS) => {
|
|
5952
|
-
sandboxEvaluator$LWS(transformSourceText$LWS(textContent$LWS), context$LWS, defaultView$LWS, ownerDoc$LWS);
|
|
5953
|
-
});
|
|
5954
|
-
return true;
|
|
5955
|
-
}
|
|
5956
|
-
|
|
5957
|
-
function getSrcEvaluatorHookSourceText$LWS(sourceText$LWS) {
|
|
5958
|
-
// Creates a blob URL to invoke the evaluator hook with encoded source text.
|
|
5959
|
-
return URLCreateObjectURL$LWS(new BlobCtor$LWS([ReflectApply$LWS$1(StringProtoReplace$LWS, SCRIPT_HOOK_SRC_SOURCE_TEXT$LWS, [SCRIPT_PAYLOAD_TOKEN$LWS, WindowEncodeURIComponent$LWS(sourceText$LWS)])], BLOB_SCRIPT_OPTIONS$LWS));
|
|
5960
|
-
}
|
|
5961
|
-
|
|
5962
|
-
const getTextContentEvaluatorHookSourceText$LWS = () => SCRIPT_HOOK_TEXT_CONTENT_SOURCE_TEXT$LWS;
|
|
5963
|
-
|
|
5964
5963
|
const documentToPropertyDescriptorRegistryMap$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
5965
5964
|
|
|
5966
5965
|
function createBlockedAttributeDistortionFactoryInitializer$LWS(Ctor$LWS, ctorName$LWS, attributeName$LWS) {
|
|
@@ -6133,19 +6132,19 @@ function createScriptDistortion$LWS({
|
|
|
6133
6132
|
const {
|
|
6134
6133
|
[distortionName$LWS]: distortion$LWS
|
|
6135
6134
|
} = {
|
|
6136
|
-
[distortionName$LWS](
|
|
6137
|
-
const originalValue$LWS =
|
|
6135
|
+
[distortionName$LWS](url$LWS) {
|
|
6136
|
+
const originalValue$LWS = url$LWS;
|
|
6138
6137
|
const elementNamespaceURI$LWS = ReflectApply$LWS$1(ElementProtoNamespaceURIGetter$LWS, this, []);
|
|
6139
6138
|
const attributeNamespaceURI$LWS = elementNamespaceURI$LWS === NAMESPACE_XHTML$LWS ? '' : NAMESPACE_XLINK$LWS;
|
|
6140
6139
|
|
|
6141
|
-
if (
|
|
6142
|
-
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, this, [attributeNamespaceURI$LWS, attributeName$LWS,
|
|
6140
|
+
if (url$LWS === '') {
|
|
6141
|
+
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, this, [attributeNamespaceURI$LWS, attributeName$LWS, url$LWS]);
|
|
6143
6142
|
return;
|
|
6144
6143
|
} // Normalize the URL.
|
|
6145
6144
|
|
|
6146
6145
|
|
|
6147
|
-
ReflectApply$LWS$1(HTMLAnchorElementProtoHrefSetter$LWS, normalizerAnchor$LWS$1, [
|
|
6148
|
-
|
|
6146
|
+
ReflectApply$LWS$1(HTMLAnchorElementProtoHrefSetter$LWS, normalizerAnchor$LWS$1, [url$LWS]);
|
|
6147
|
+
const resolvedURL$LWS = ReflectApply$LWS$1(HTMLAnchorElementProtoHrefGetter$LWS, normalizerAnchor$LWS$1, []); // Create a dataset attribute to expose the undistorted attribute value.
|
|
6149
6148
|
|
|
6150
6149
|
const dataset$LWS = ReflectApply$LWS$1(datasetGetter$LWS, this, []);
|
|
6151
6150
|
dataset$LWS[`distorted${capitalizeFirstChar$LWS(attributeName$LWS)}`] = originalValue$LWS; // Create XHR.
|
|
@@ -6177,7 +6176,7 @@ function createScriptDistortion$LWS({
|
|
|
6177
6176
|
}
|
|
6178
6177
|
}
|
|
6179
6178
|
}]);
|
|
6180
|
-
ReflectApply$LWS$1(XhrProtoOpen$LWS, xhr$LWS, ['GET',
|
|
6179
|
+
ReflectApply$LWS$1(XhrProtoOpen$LWS, xhr$LWS, ['GET', resolvedURL$LWS]);
|
|
6181
6180
|
ReflectApply$LWS$1(XhrProtoSend$LWS, xhr$LWS, []);
|
|
6182
6181
|
}
|
|
6183
6182
|
|
|
@@ -7457,6 +7456,20 @@ function initDistortionSVGElementDatasetGetter$LWS({
|
|
|
7457
7456
|
};
|
|
7458
7457
|
}
|
|
7459
7458
|
|
|
7459
|
+
function initDistortionSVGElementStyleGetter$LWS({
|
|
7460
|
+
globalObject: {
|
|
7461
|
+
SVGElement: SVGElement$LWS
|
|
7462
|
+
}
|
|
7463
|
+
}) {
|
|
7464
|
+
const originalStyleGetter$LWS = ObjectLookupOwnGetter$LWS$1(SVGElement$LWS.prototype, 'style');
|
|
7465
|
+
const distortionEntry$LWS = [originalStyleGetter$LWS, function style$LWS() {
|
|
7466
|
+
return trackTargetAsLive$LWS(ReflectApply$LWS$1(originalStyleGetter$LWS, this, []));
|
|
7467
|
+
}];
|
|
7468
|
+
return function distortionSVGElementStyleGetter$LWS() {
|
|
7469
|
+
return distortionEntry$LWS;
|
|
7470
|
+
};
|
|
7471
|
+
}
|
|
7472
|
+
|
|
7460
7473
|
function initDistortionSVGScriptElementHrefAttribute$LWS({
|
|
7461
7474
|
globalObject: {
|
|
7462
7475
|
SVGScriptElement: SVGScriptElement$LWS
|
|
@@ -8275,7 +8288,7 @@ initDistortionShadowRootInnerHTMLSetter$LWS, initDistortionShadowRootModeGetter$
|
|
|
8275
8288
|
initDistortionSharedWorkerCtor$LWS, initDistortionSharedWorkerProto$LWS, // Storage
|
|
8276
8289
|
initDistortionStorageLength$LWS, initDistortionStorageGetItem$LWS, initDistortionStorageSetItem$LWS, initDistortionStorageKey$LWS, initDistortionStorageRemoveItem$LWS, initDistortionStorageClear$LWS, initDistortionStorage$LWS, // SVGAnimateElement
|
|
8277
8290
|
initDistortionSVGAnimateElementFromAttribute$LWS, initDistortionSVGAnimateElementToAttribute$LWS, initDistortionSVGAnimateElementValuesAttribute$LWS, // SVGElement
|
|
8278
|
-
initDistortionSVGElementDatasetGetter$LWS, // SVGSetElement
|
|
8291
|
+
initDistortionSVGElementDatasetGetter$LWS, initDistortionSVGElementStyleGetter$LWS, // SVGSetElement
|
|
8279
8292
|
initDistortionSVGSetElementToAttribute$LWS, // SVGUseElement
|
|
8280
8293
|
initDistortionSVGUseElementHrefAttribute$LWS, initDistortionSVGUseElementXlinkHrefAttribute$LWS, // TrustedTypePolicyFactory
|
|
8281
8294
|
initDistortionTrustedTypePolicyFactoryCreatePolicy$LWS, // URL
|
|
@@ -8475,19 +8488,19 @@ function toSafeArray$LWS(array$LWS) {
|
|
|
8475
8488
|
}
|
|
8476
8489
|
|
|
8477
8490
|
ObjectLookupOwnGetter$LWS(ArrayBuffer.prototype, 'byteLength'); // https://caniuse.com/bigint
|
|
8478
|
-
|
|
8479
|
-
const LOCKER_IDENTIFIER_MARKER$LWS = '$LWS'; // This package is bundled by third-parties that have their own build time
|
|
8480
8491
|
// replacement logic. Instead of customizing each build system to be aware
|
|
8481
8492
|
// of this package we implement a two phase debug mode by performing small
|
|
8482
8493
|
// runtime checks to determine phase one, our code is unminified, and
|
|
8483
8494
|
// phase two, the user opted-in to custom devtools formatters. Phase one
|
|
8484
8495
|
// is used for light weight initialization time debug while phase two is
|
|
8485
8496
|
// reserved for post initialization runtime.
|
|
8486
|
-
// istanbul ignore next
|
|
8487
8497
|
|
|
8488
|
-
const LOCKER_UNMINIFIED_FLAG$LWS =
|
|
8489
|
-
|
|
8490
|
-
|
|
8498
|
+
const LOCKER_UNMINIFIED_FLAG$LWS = // eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8499
|
+
|
|
8500
|
+
/* istanbul ignore next */
|
|
8501
|
+
`${function LOCKER_UNMINIFIED_FLAG$LWS() {
|
|
8502
|
+
return LOCKER_UNMINIFIED_FLAG$LWS.name;
|
|
8503
|
+
}()}`.includes('LOCKER_UNMINIFIED_FLAG');
|
|
8491
8504
|
const CHAR_ELLIPSIS$LWS = '\u2026';
|
|
8492
8505
|
const TO_STRING_BRAND_BIG_INT$LWS = '[object BigInt]';
|
|
8493
8506
|
const TO_STRING_BRAND_BOOLEAN$LWS = '[object Boolean]';
|
|
@@ -8654,6 +8667,9 @@ ArrayIsArray$LWS(brands$LWS) && brands$LWS.length ? // Use user-agent client hin
|
|
|
8654
8667
|
ReflectApply$LWS(ArrayProtoFind$LWS, brands$LWS, [// prettier-ignore
|
|
8655
8668
|
item$LWS => (item$LWS == null ? void 0 : item$LWS.brand) === 'Chromium']) !== undefined : // Fallback to a standard user-agent string sniff.
|
|
8656
8669
|
ReflectApply$LWS(RegExpProtoTest$LWS, chromiumUserAgentRegExp$LWS, [getUserAgent$LWS()]);
|
|
8670
|
+
const IS_OLD_CHROMIUM_BROWSER$LWS = IS_CHROMIUM_BROWSER$LWS && // Chromium added support for `navigator.userAgentData` in v90.
|
|
8671
|
+
// https://caniuse.com/mdn-api_navigator_useragentdata
|
|
8672
|
+
userAgentData$LWS === undefined;
|
|
8657
8673
|
const {
|
|
8658
8674
|
prototype: DocumentProto$LWS
|
|
8659
8675
|
} = Document;
|
|
@@ -9092,10 +9108,11 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
9092
9108
|
// phase two, the user opted-in to custom devtools formatters. Phase one
|
|
9093
9109
|
// is used for light weight initialization time debug while phase two is
|
|
9094
9110
|
// reserved for post initialization runtime.
|
|
9111
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9095
9112
|
|
|
9096
|
-
const LOCKER_UNMINIFIED_FLAG$LWS = `${()
|
|
9097
|
-
|
|
9098
|
-
|
|
9113
|
+
const LOCKER_UNMINIFIED_FLAG$LWS = `${function LOCKER_UNMINIFIED_FLAG$LWS() {
|
|
9114
|
+
return LOCKER_UNMINIFIED_FLAG$LWS.name;
|
|
9115
|
+
}()}`.includes('LOCKER_UNMINIFIED_FLAG'); // Indicate whether debug support is available.
|
|
9099
9116
|
|
|
9100
9117
|
const LOCKER_DEBUGGABLE_FLAG$LWS = LOCKER_UNMINIFIED_FLAG$LWS && !IS_IN_SHADOW_REALM$LWS; // BigInt is not supported in Safari 13.1.
|
|
9101
9118
|
// https://caniuse.com/bigint
|
|
@@ -11014,9 +11031,6 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11014
11031
|
if (foreignTargetTraits$LWS & 64
|
|
11015
11032
|
/* TargetTraits.Revoked */
|
|
11016
11033
|
) {
|
|
11017
|
-
// Future optimization: Hoping proxies with frozen handlers
|
|
11018
|
-
// can be faster.
|
|
11019
|
-
ObjectFreeze$LWS(this);
|
|
11020
11034
|
this.revoke();
|
|
11021
11035
|
} else if (IS_IN_SHADOW_REALM$LWS) {
|
|
11022
11036
|
if (isForeignTargetArray$LWS || foreignTargetTraits$LWS & 2
|
|
@@ -11051,13 +11065,7 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11051
11065
|
|
|
11052
11066
|
return cachedSerializedValue$LWS;
|
|
11053
11067
|
}]);
|
|
11054
|
-
}
|
|
11055
|
-
// can be faster. If local mutations are not trapped, then
|
|
11056
|
-
// freezing the handler is ok because it is not expecting to
|
|
11057
|
-
// change in the future.
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
ObjectFreeze$LWS(this);
|
|
11068
|
+
}
|
|
11061
11069
|
}
|
|
11062
11070
|
} // Internal shadow realm side utilities:
|
|
11063
11071
|
|
|
@@ -11069,10 +11077,7 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11069
11077
|
this.defineProperty = BoundaryProxyHandler$LWS.passthruDefinePropertyTrap;
|
|
11070
11078
|
this.preventExtensions = BoundaryProxyHandler$LWS.passthruPreventExtensionsTrap;
|
|
11071
11079
|
this.set = BoundaryProxyHandler$LWS.passthruSetTrap;
|
|
11072
|
-
this.setPrototypeOf = BoundaryProxyHandler$LWS.passthruSetPrototypeOfTrap;
|
|
11073
|
-
// be faster.
|
|
11074
|
-
|
|
11075
|
-
ObjectFreeze$LWS(this);
|
|
11080
|
+
this.setPrototypeOf = BoundaryProxyHandler$LWS.passthruSetPrototypeOfTrap;
|
|
11076
11081
|
}
|
|
11077
11082
|
|
|
11078
11083
|
makeProxyStatic() {
|
|
@@ -11107,11 +11112,8 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11107
11112
|
if (targetIntegrityTraits$LWS & 8
|
|
11108
11113
|
/* TargetIntegrityTraits.Revoked */
|
|
11109
11114
|
) {
|
|
11110
|
-
//
|
|
11111
|
-
// handlers can be faster.
|
|
11112
|
-
ObjectFreeze$LWS(this); // the target is a revoked proxy, in which case we revoke
|
|
11115
|
+
// the target is a revoked proxy, in which case we revoke
|
|
11113
11116
|
// this proxy as well.
|
|
11114
|
-
|
|
11115
11117
|
this.revoke();
|
|
11116
11118
|
return;
|
|
11117
11119
|
} // A proxy can revoke itself when traps are triggered and break
|
|
@@ -11124,9 +11126,6 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11124
11126
|
// We don't wrap `foreignCallableIsTargetRevoked()` in a
|
|
11125
11127
|
// try-catch because it cannot throw.
|
|
11126
11128
|
if (foreignCallableIsTargetRevoked$LWS(foreignTargetPointer$LWS)) {
|
|
11127
|
-
// Future optimization: Hoping proxies with frozen
|
|
11128
|
-
// handlers can be faster.
|
|
11129
|
-
ObjectFreeze$LWS(this);
|
|
11130
11129
|
this.revoke();
|
|
11131
11130
|
return;
|
|
11132
11131
|
}
|
|
@@ -11165,11 +11164,7 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11165
11164
|
// because it cannot throw.
|
|
11166
11165
|
foreignCallableDebugInfo$LWS('Mutations on the membrane of an object originating ' + 'outside of the sandbox will not be reflected on ' + 'the object itself:', foreignTargetPointer$LWS);
|
|
11167
11166
|
}
|
|
11168
|
-
}
|
|
11169
|
-
// be faster.
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
ObjectFreeze$LWS(this);
|
|
11167
|
+
}
|
|
11173
11168
|
} // Passthru traps:
|
|
11174
11169
|
|
|
11175
11170
|
|
|
@@ -11774,8 +11769,10 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11774
11769
|
let _result$LWS;
|
|
11775
11770
|
|
|
11776
11771
|
if (useFastPath$LWS) {
|
|
11772
|
+
let pointerOrPrimitive$LWS;
|
|
11773
|
+
|
|
11777
11774
|
try {
|
|
11778
|
-
|
|
11775
|
+
pointerOrPrimitive$LWS = foreignCallableGetPropertyValue$LWS(foreignTargetPointer$LWS, __key$LWS);
|
|
11779
11776
|
} catch (error) {
|
|
11780
11777
|
var _selectedTarget24$LWS;
|
|
11781
11778
|
|
|
@@ -11788,6 +11785,14 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
11788
11785
|
|
|
11789
11786
|
throw errorToThrow$LWS;
|
|
11790
11787
|
}
|
|
11788
|
+
|
|
11789
|
+
if (typeof pointerOrPrimitive$LWS === 'function') {
|
|
11790
|
+
pointerOrPrimitive$LWS();
|
|
11791
|
+
_result$LWS = selectedTarget$LWS;
|
|
11792
|
+
selectedTarget$LWS = undefined;
|
|
11793
|
+
} else {
|
|
11794
|
+
_result$LWS = pointerOrPrimitive$LWS;
|
|
11795
|
+
}
|
|
11791
11796
|
} else {
|
|
11792
11797
|
const _safeDesc$LWS = lookupForeignDescriptor$LWS(foreignTargetPointer$LWS, shadowTarget$LWS, __key$LWS);
|
|
11793
11798
|
|
|
@@ -12616,16 +12621,19 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
12616
12621
|
const state$LWS = proxyTargetToLazyPropertyDescriptorStateMap$LWS.get(__target$LWS);
|
|
12617
12622
|
return state$LWS ? getTransferablePointer$LWS(state$LWS) : state$LWS;
|
|
12618
12623
|
} : noop$LWS, // callableGetPropertyValue
|
|
12619
|
-
!IS_IN_SHADOW_REALM$LWS ? (targetPointer$LWS,
|
|
12624
|
+
!IS_IN_SHADOW_REALM$LWS ? (targetPointer$LWS, __key$LWS) => {
|
|
12620
12625
|
targetPointer$LWS();
|
|
12621
12626
|
const __target$LWS = selectedTarget$LWS;
|
|
12622
12627
|
selectedTarget$LWS = undefined;
|
|
12628
|
+
let __value$LWS;
|
|
12623
12629
|
|
|
12624
12630
|
try {
|
|
12625
|
-
|
|
12631
|
+
__value$LWS = __target$LWS[__key$LWS];
|
|
12626
12632
|
} catch (error) {
|
|
12627
12633
|
throw pushErrorAcrossBoundary$LWS(error);
|
|
12628
12634
|
}
|
|
12635
|
+
|
|
12636
|
+
return typeof __value$LWS === 'object' && __value$LWS !== null || typeof __value$LWS === 'function' ? getTransferablePointer$LWS(__value$LWS) : __value$LWS;
|
|
12629
12637
|
} : noop$LWS, // callableGetTargetIntegrityTraits
|
|
12630
12638
|
!IS_IN_SHADOW_REALM$LWS ? targetPointer$LWS => {
|
|
12631
12639
|
targetPointer$LWS();
|
|
@@ -13074,9 +13082,7 @@ function createMembraneMarshall$LWS(_globalObject$LWS) {
|
|
|
13074
13082
|
BoundaryProxyHandlerProto$LWS[arityToConstructTrapNameRegistry$LWS[4]] = constructTrapForFourOrMoreArgs$LWS;
|
|
13075
13083
|
BoundaryProxyHandlerProto$LWS[arityToConstructTrapNameRegistry$LWS[5]] = constructTrapForFiveOrMoreArgs$LWS;
|
|
13076
13084
|
BoundaryProxyHandlerProto$LWS[arityToConstructTrapNameRegistry$LWS.n] = constructTrapForAnyNumberOfArgs$LWS;
|
|
13077
|
-
ReflectSetPrototypeOf$LWS(BoundaryProxyHandlerProto$LWS, null);
|
|
13078
|
-
|
|
13079
|
-
ObjectFreeze$LWS(BoundaryProxyHandlerProto$LWS);
|
|
13085
|
+
ReflectSetPrototypeOf$LWS(BoundaryProxyHandlerProto$LWS, null);
|
|
13080
13086
|
};
|
|
13081
13087
|
};
|
|
13082
13088
|
/* eslint-enable prefer-object-spread */
|
|
@@ -13647,12 +13653,15 @@ function createIframeVirtualEnvironment$LWS(_globalObject$LWS, options$LWS) {
|
|
|
13647
13653
|
blueDocumentToBlueCreateHooksCallbackMap$LWS.set(blueRefs$LWS.document, blueConnector$LWS);
|
|
13648
13654
|
}
|
|
13649
13655
|
|
|
13656
|
+
const {
|
|
13657
|
+
eval: redIndirectEval$LWS
|
|
13658
|
+
} = redWindow$LWS;
|
|
13650
13659
|
const env$LWS = new VirtualEnvironment$LWS({
|
|
13651
13660
|
blueConnector: blueConnector$LWS,
|
|
13652
13661
|
distortionCallback: distortionCallback$LWS,
|
|
13653
13662
|
instrumentation: instrumentation$LWS,
|
|
13654
13663
|
liveTargetCallback: liveTargetCallback$LWS,
|
|
13655
|
-
redConnector: createRedConnector$LWS(
|
|
13664
|
+
redConnector: createRedConnector$LWS(redIndirectEval$LWS)
|
|
13656
13665
|
});
|
|
13657
13666
|
linkIntrinsics$LWS(env$LWS, _globalObject$LWS); // window
|
|
13658
13667
|
// window.document
|
|
@@ -13702,6 +13711,13 @@ function createIframeVirtualEnvironment$LWS(_globalObject$LWS, options$LWS) {
|
|
|
13702
13711
|
ReflectApply$LWS(DocumentProtoOpen$LWS, redDocument$LWS, []);
|
|
13703
13712
|
ReflectApply$LWS(DocumentProtoClose$LWS, redDocument$LWS, []);
|
|
13704
13713
|
} else {
|
|
13714
|
+
if (IS_OLD_CHROMIUM_BROWSER$LWS) {
|
|
13715
|
+
// For Chromium < v86 browsers we evaluate the `window` object to
|
|
13716
|
+
// kickstart the realm so that `window` persists when the iframe is
|
|
13717
|
+
// removed from the document.
|
|
13718
|
+
redIndirectEval$LWS('window');
|
|
13719
|
+
}
|
|
13720
|
+
|
|
13705
13721
|
ReflectApply$LWS(ElementProtoRemove$LWS, iframe$LWS, []);
|
|
13706
13722
|
}
|
|
13707
13723
|
|
|
@@ -14041,23 +14057,21 @@ const HELPERS_SOURCE_TEXT$LWS = `'use strict';
|
|
|
14041
14057
|
super: superApplyOrGet$LWS
|
|
14042
14058
|
};
|
|
14043
14059
|
}})`; // Options must be an object.
|
|
14044
|
-
// And must define at a minimum an `
|
|
14045
|
-
|
|
14046
|
-
function parseOptions$LWS(options$LWS) {
|
|
14047
|
-
if (options$LWS === null || typeof options$LWS !== 'object') {
|
|
14048
|
-
return undefined;
|
|
14049
|
-
}
|
|
14050
|
-
|
|
14051
|
-
const {
|
|
14052
|
-
evaluator: evaluator$LWS,
|
|
14053
|
-
targetElement: targetElement$LWS
|
|
14054
|
-
} = options$LWS;
|
|
14060
|
+
// And must define at a minimum an `lwsKey` property.
|
|
14055
14061
|
|
|
14056
|
-
|
|
14057
|
-
|
|
14062
|
+
function parseOptions$LWS(providedOptions$LWS) {
|
|
14063
|
+
if (typeof providedOptions$LWS === 'object' && providedOptions$LWS !== null) {
|
|
14064
|
+
const {
|
|
14058
14065
|
evaluator: evaluator$LWS,
|
|
14059
14066
|
targetElement: targetElement$LWS
|
|
14060
|
-
};
|
|
14067
|
+
} = providedOptions$LWS;
|
|
14068
|
+
|
|
14069
|
+
if (typeof evaluator$LWS === 'function') {
|
|
14070
|
+
return {
|
|
14071
|
+
evaluator: evaluator$LWS,
|
|
14072
|
+
targetElement: targetElement$LWS
|
|
14073
|
+
};
|
|
14074
|
+
}
|
|
14061
14075
|
}
|
|
14062
14076
|
|
|
14063
14077
|
return undefined;
|
|
@@ -14066,83 +14080,72 @@ function parseOptions$LWS(options$LWS) {
|
|
|
14066
14080
|
const policyOptions$LWS = {
|
|
14067
14081
|
__proto__: null,
|
|
14068
14082
|
// Reject anything for createHTML until further requirements.
|
|
14069
|
-
createHTML: (
|
|
14083
|
+
createHTML: (_content$LWS, _providedOptions$LWS) => new StringCtor$LWS$1(''),
|
|
14070
14084
|
// Defines the createScriptURL hook.
|
|
14071
|
-
createScriptURL: (
|
|
14072
|
-
const
|
|
14085
|
+
createScriptURL: (_url$LWS, providedOptions$LWS) => {
|
|
14086
|
+
const options$LWS = parseOptions$LWS(providedOptions$LWS);
|
|
14073
14087
|
|
|
14074
|
-
if (
|
|
14088
|
+
if (options$LWS) {
|
|
14075
14089
|
const {
|
|
14076
14090
|
evaluator: evaluator$LWS,
|
|
14077
14091
|
targetElement: targetElement$LWS
|
|
14078
|
-
} =
|
|
14092
|
+
} = options$LWS;
|
|
14093
|
+
const _xhr$LWS = new XhrCtor$LWS();
|
|
14079
14094
|
|
|
14080
|
-
|
|
14081
|
-
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
}
|
|
14085
|
-
|
|
14086
|
-
const _url$LWS = normalizeUrl$LWS(unsafe$LWS);
|
|
14087
|
-
ReflectDefineProperty$LWS$1(targetElement$LWS, 'runScript', {
|
|
14088
|
-
// @ts-ignore
|
|
14089
|
-
__proto__: null,
|
|
14090
|
-
configurable: true,
|
|
14091
|
-
get: async () => {
|
|
14092
|
-
ReflectDeleteProperty$LWS$1(targetElement$LWS, 'runScript');
|
|
14093
|
-
let _event$LWS;
|
|
14095
|
+
const cleanup$LWS = () => {
|
|
14096
|
+
ReflectDeleteProperty$LWS$1(targetElement$LWS, 'src');
|
|
14097
|
+
ReflectDeleteProperty$LWS$1(targetElement$LWS, SCRIPT_EVALUATOR_PROPERTY_NAME$LWS);
|
|
14098
|
+
ReflectApply$LWS$1(HTMLScriptElementProtoSrcSetter$LWS, targetElement$LWS, [_url$LWS]);
|
|
14099
|
+
};
|
|
14094
14100
|
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
|
|
14099
|
-
const _response$LWS = await WindowFetch$LWS(_url$LWS, {
|
|
14100
|
-
__proto__: null,
|
|
14101
|
-
credentials: 'include'
|
|
14102
|
-
});
|
|
14103
|
-
const _status$LWS = ReflectApply$LWS$1(ResponseProtoStatus$LWS, _response$LWS, []);
|
|
14104
|
-
|
|
14105
|
-
if (_status$LWS !== 200) {
|
|
14106
|
-
const text$LWS = ReflectApply$LWS$1(ResponseProtoStatusText$LWS, _response$LWS, []);
|
|
14107
|
-
throw new ErrorCtor$LWS$1(text$LWS);
|
|
14108
|
-
}
|
|
14101
|
+
const onerror$LWS = () => {
|
|
14102
|
+
ReflectApply$LWS$1(EventTargetProtoRemoveEventListener$LWS, targetElement$LWS, ['error', onerror$LWS]);
|
|
14103
|
+
cleanup$LWS();
|
|
14104
|
+
};
|
|
14109
14105
|
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14106
|
+
ReflectApply$LWS$1(XhrProtoWithCredentialsSetter$LWS, _xhr$LWS, [true]);
|
|
14107
|
+
ReflectApply$LWS$1(EventTargetProtoAddEventListener$LWS, _xhr$LWS, ['load', () => {
|
|
14108
|
+
if (ReflectApply$LWS$1(XhrProtoStatusGetter$LWS, _xhr$LWS, []) === 200) {
|
|
14109
|
+
const _responseText$LWS = ReflectApply$LWS$1(XhrProtoResponseTextGetter$LWS, _xhr$LWS, []);
|
|
14110
|
+
const evaluatorDesc$LWS = {
|
|
14111
|
+
configurable: true,
|
|
14112
|
+
enumerable: false,
|
|
14113
|
+
get: function () {
|
|
14114
|
+
cleanup$LWS();
|
|
14115
|
+
return () => evaluator$LWS(_responseText$LWS);
|
|
14116
|
+
},
|
|
14117
|
+
set: noop$LWS$1
|
|
14118
|
+
};
|
|
14119
|
+
ReflectDefineProperty$LWS$1(targetElement$LWS, SCRIPT_EVALUATOR_PROPERTY_NAME$LWS, evaluatorDesc$LWS);
|
|
14120
|
+
const safeUrl$LWS = URLCreateObjectURL$LWS(new BlobCtor$LWS([`document.currentScript.${SCRIPT_EVALUATOR_PROPERTY_NAME$LWS}()`], {
|
|
14121
|
+
__proto__: null,
|
|
14122
|
+
type: 'text/javascript'
|
|
14123
|
+
}));
|
|
14124
|
+
ReflectApply$LWS$1(HTMLScriptElementProtoSrcSetter$LWS, targetElement$LWS, [safeUrl$LWS]);
|
|
14125
|
+
} else {
|
|
14126
|
+
ReflectApply$LWS$1(EventTargetProtoAddEventListener$LWS, targetElement$LWS, ['error', onerror$LWS]);
|
|
14127
|
+
ReflectApply$LWS$1(HTMLScriptElementProtoSrcSetter$LWS, targetElement$LWS, ['blob:http://localhost/not-found']);
|
|
14124
14128
|
}
|
|
14125
|
-
});
|
|
14126
|
-
|
|
14129
|
+
}]);
|
|
14130
|
+
const _resolvedURL$LWS = normalizeUrl$LWS(_url$LWS);
|
|
14131
|
+
ReflectApply$LWS$1(XhrProtoOpen$LWS, _xhr$LWS, ['GET', _resolvedURL$LWS]);
|
|
14132
|
+
ReflectApply$LWS$1(XhrProtoSend$LWS, _xhr$LWS, []); // We shadow the native HTMLScript.src property by defining a
|
|
14133
|
+
// "frozen" property 'src' on the element itself.
|
|
14127
14134
|
|
|
14128
14135
|
ReflectDefineProperty$LWS$1(targetElement$LWS, 'src', {
|
|
14129
|
-
// @ts-ignore
|
|
14130
14136
|
__proto__: null,
|
|
14131
14137
|
configurable: true,
|
|
14132
14138
|
enumerable: true,
|
|
14133
14139
|
set: () => noop$LWS$1,
|
|
14134
|
-
get: () =>
|
|
14140
|
+
get: () => _resolvedURL$LWS
|
|
14135
14141
|
});
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
// `undefined` will never be set and it will not trigger a TT validation on the browser.
|
|
14139
|
-
|
|
14142
|
+
return new StringCtor$LWS$1(_url$LWS);
|
|
14143
|
+
}
|
|
14140
14144
|
|
|
14141
|
-
return
|
|
14145
|
+
return new StringCtor$LWS$1('');
|
|
14142
14146
|
},
|
|
14143
14147
|
// Reject anything for createScript until further requirements.
|
|
14144
|
-
createScript: (
|
|
14145
|
-
undefined
|
|
14148
|
+
createScript: (_sourceText$LWS, _providedOptions$LWS) => new StringCtor$LWS$1('')
|
|
14146
14149
|
}; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types
|
|
14147
14150
|
|
|
14148
14151
|
const lwsPolicy$LWS = // @ts-ignore typeof check above, ignore `undefined` ts check
|
|
@@ -14224,15 +14227,60 @@ function clearEvalHelpers$LWS() {
|
|
|
14224
14227
|
return evalHelpers$LWS;
|
|
14225
14228
|
}
|
|
14226
14229
|
|
|
14227
|
-
function
|
|
14230
|
+
function createDistortionEntries$LWS(_record$LWS, _factories$LWS, entries$LWS = []) {
|
|
14231
|
+
let {
|
|
14232
|
+
length: entriesOffset$LWS
|
|
14233
|
+
} = entries$LWS;
|
|
14234
|
+
|
|
14235
|
+
for (let _i$LWS = 0, {
|
|
14236
|
+
length: _length$LWS
|
|
14237
|
+
} = _factories$LWS; _i$LWS < _length$LWS; _i$LWS += 1) {
|
|
14238
|
+
const factory$LWS = _factories$LWS[_i$LWS];
|
|
14239
|
+
const entry$LWS = factory$LWS(_record$LWS);
|
|
14240
|
+
|
|
14241
|
+
if (entry$LWS) {
|
|
14242
|
+
const {
|
|
14243
|
+
0: proxyTarget$LWS,
|
|
14244
|
+
1: distortedValue$LWS
|
|
14245
|
+
} = entry$LWS;
|
|
14246
|
+
|
|
14247
|
+
if (typeof proxyTarget$LWS === 'function') {
|
|
14248
|
+
entries$LWS[entriesOffset$LWS++] = [proxyTarget$LWS, proxyWrapFunctionDistortion$LWS(_record$LWS, factory$LWS.name, proxyTarget$LWS, distortedValue$LWS)];
|
|
14249
|
+
} else {
|
|
14250
|
+
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
14251
|
+
if (typeof proxyTarget$LWS === 'object' && proxyTarget$LWS !== null) {
|
|
14252
|
+
entries$LWS[entriesOffset$LWS++] = entry$LWS;
|
|
14253
|
+
}
|
|
14254
|
+
}
|
|
14255
|
+
}
|
|
14256
|
+
}
|
|
14257
|
+
|
|
14258
|
+
return entries$LWS;
|
|
14259
|
+
}
|
|
14260
|
+
|
|
14261
|
+
function createDistortionMap$LWS(entries$LWS) {
|
|
14262
|
+
return SUPPORTS_DISTORTIONS_WEAK_MAP$LWS ? toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1(entries$LWS)) : // istanbul ignore next: this code is not reachable in the coverage run.
|
|
14263
|
+
toSafeMap$LWS$1(new MapCtor$LWS$1(entries$LWS));
|
|
14264
|
+
}
|
|
14265
|
+
|
|
14266
|
+
function createGetVirtualEnvironment$LWS(_record$LWS) {
|
|
14267
|
+
let virtualEnvironment$LWS;
|
|
14268
|
+
return () => {
|
|
14269
|
+
if (virtualEnvironment$LWS === undefined) {
|
|
14270
|
+
virtualEnvironment$LWS = createVirtualEnvironment$LWS(_record$LWS);
|
|
14271
|
+
}
|
|
14272
|
+
|
|
14273
|
+
return virtualEnvironment$LWS;
|
|
14274
|
+
};
|
|
14275
|
+
}
|
|
14276
|
+
|
|
14277
|
+
function createOpaqueSecondaryWindowSandboxRecord$LWS({
|
|
14228
14278
|
globalObject: _globalObject$LWS,
|
|
14229
|
-
document: _document$LWS,
|
|
14230
|
-
context: _context$LWS,
|
|
14231
14279
|
key: __key$LWS,
|
|
14232
|
-
type: _type$LWS
|
|
14280
|
+
type: _type$LWS = getDefaultType$LWS(__key$LWS)
|
|
14233
14281
|
}, root$LWS) {
|
|
14234
|
-
const sandboxRegistry$LWS =
|
|
14235
|
-
let _record$LWS = sandboxRegistry$LWS[__key$LWS];
|
|
14282
|
+
const sandboxRegistry$LWS = getOpaqueSandboxRegistry$LWS(_globalObject$LWS);
|
|
14283
|
+
let _record$LWS = sandboxRegistry$LWS[__key$LWS]; // istanbul ignore if: calls that would evaluate to true here ARE tested (see packages/integration-karma/test/distortions/HTMLIFrameElement/untrusted/snippets.js, "doesNotThrowOnCreationOrAccessOfCrossOriginIframeContentWindow"), but reported as uncovered
|
|
14236
14284
|
|
|
14237
14285
|
if (_record$LWS) {
|
|
14238
14286
|
return _record$LWS;
|
|
@@ -14245,7 +14293,77 @@ function createSecondaryWindowSandboxRecord$LWS({
|
|
|
14245
14293
|
distortions: distortions$LWS,
|
|
14246
14294
|
instrumentation: instrumentation$LWS
|
|
14247
14295
|
} = root$LWS;
|
|
14248
|
-
|
|
14296
|
+
_record$LWS = {
|
|
14297
|
+
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
14298
|
+
LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14299
|
+
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14300
|
+
UNCOMPILED_CONTEXT: EMPTY_OBJECT$LWS,
|
|
14301
|
+
context: EMPTY_OBJECT$LWS,
|
|
14302
|
+
document,
|
|
14303
|
+
distortions: EMPTY_DISTORTIONS_MAP$LWS,
|
|
14304
|
+
endowments: EMPTY_OBJECT$LWS,
|
|
14305
|
+
globalObject: _globalObject$LWS,
|
|
14306
|
+
helpers: EMPTY_HELPERS$LWS,
|
|
14307
|
+
instrumentation: instrumentation$LWS,
|
|
14308
|
+
key: __key$LWS,
|
|
14309
|
+
root: root$LWS,
|
|
14310
|
+
sandboxEvaluator: noop$LWS$1,
|
|
14311
|
+
trackAsFastTarget: noop$LWS$1,
|
|
14312
|
+
type: _type$LWS,
|
|
14313
|
+
virtualEnvironmentEvaluator: noop$LWS$1
|
|
14314
|
+
}; // Fast path non-configurable location and window objects in the virtual
|
|
14315
|
+
// environment distortion callback by adding them to the root window's
|
|
14316
|
+
// distortion map.
|
|
14317
|
+
|
|
14318
|
+
const {
|
|
14319
|
+
location: location$LWS
|
|
14320
|
+
} = _globalObject$LWS;
|
|
14321
|
+
distortions$LWS.set(location$LWS, location$LWS); // istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
14322
|
+
|
|
14323
|
+
if (!seenGlobalObjects$LWS.has(_globalObject$LWS)) {
|
|
14324
|
+
distortions$LWS.set(_globalObject$LWS, _globalObject$LWS);
|
|
14325
|
+
}
|
|
14326
|
+
|
|
14327
|
+
const opaqueEntries$LWS = createDistortionEntries$LWS(_record$LWS, getOpaqueDistortionFactories$LWS(_record$LWS));
|
|
14328
|
+
|
|
14329
|
+
for (let _i$LWS = 0, {
|
|
14330
|
+
length: _length$LWS
|
|
14331
|
+
} = opaqueEntries$LWS; _i$LWS < _length$LWS; _i$LWS += 1) {
|
|
14332
|
+
const {
|
|
14333
|
+
0: entryKey$LWS,
|
|
14334
|
+
1: entryValue$LWS
|
|
14335
|
+
} = opaqueEntries$LWS[_i$LWS]; // Add opaque distortion for the child window to the root window's
|
|
14336
|
+
// distortion map.
|
|
14337
|
+
|
|
14338
|
+
distortions$LWS.set(entryKey$LWS, entryValue$LWS);
|
|
14339
|
+
}
|
|
14340
|
+
|
|
14341
|
+
sandboxRegistry$LWS[__key$LWS] = _record$LWS;
|
|
14342
|
+
return _record$LWS;
|
|
14343
|
+
}
|
|
14344
|
+
|
|
14345
|
+
function createSecondaryWindowSandboxRecord$LWS({
|
|
14346
|
+
globalObject: _globalObject$LWS,
|
|
14347
|
+
document: _document$LWS,
|
|
14348
|
+
context: _context$LWS = EMPTY_OBJECT$LWS,
|
|
14349
|
+
key: __key$LWS,
|
|
14350
|
+
type: _type$LWS = getDefaultType$LWS(__key$LWS)
|
|
14351
|
+
}, root$LWS) {
|
|
14352
|
+
const sandboxRegistry$LWS = getSandboxRegistry$LWS(_document$LWS);
|
|
14353
|
+
let _record$LWS = sandboxRegistry$LWS[__key$LWS];
|
|
14354
|
+
|
|
14355
|
+
if (_record$LWS) {
|
|
14356
|
+
return _record$LWS;
|
|
14357
|
+
}
|
|
14358
|
+
|
|
14359
|
+
const {
|
|
14360
|
+
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
14361
|
+
LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14362
|
+
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14363
|
+
distortions: distortions$LWS,
|
|
14364
|
+
instrumentation: instrumentation$LWS
|
|
14365
|
+
} = root$LWS;
|
|
14366
|
+
const {
|
|
14249
14367
|
location: location$LWS
|
|
14250
14368
|
} = _globalObject$LWS;
|
|
14251
14369
|
const overrideDistortions$LWS = createDistortionMap$LWS();
|
|
@@ -14403,53 +14521,6 @@ function createSecondaryWindowSandboxRecord$LWS({
|
|
|
14403
14521
|
return _record$LWS;
|
|
14404
14522
|
}
|
|
14405
14523
|
|
|
14406
|
-
function createDistortionEntries$LWS(_record$LWS, _factories$LWS, entries$LWS = []) {
|
|
14407
|
-
let {
|
|
14408
|
-
length: entriesOffset$LWS
|
|
14409
|
-
} = entries$LWS;
|
|
14410
|
-
|
|
14411
|
-
for (let _i$LWS = 0, {
|
|
14412
|
-
length: _length$LWS
|
|
14413
|
-
} = _factories$LWS; _i$LWS < _length$LWS; _i$LWS += 1) {
|
|
14414
|
-
const factory$LWS = _factories$LWS[_i$LWS];
|
|
14415
|
-
const entry$LWS = factory$LWS(_record$LWS);
|
|
14416
|
-
|
|
14417
|
-
if (entry$LWS) {
|
|
14418
|
-
const {
|
|
14419
|
-
0: proxyTarget$LWS,
|
|
14420
|
-
1: distortedValue$LWS
|
|
14421
|
-
} = entry$LWS;
|
|
14422
|
-
|
|
14423
|
-
if (typeof proxyTarget$LWS === 'function') {
|
|
14424
|
-
entries$LWS[entriesOffset$LWS++] = [proxyTarget$LWS, proxyWrapFunctionDistortion$LWS(_record$LWS, factory$LWS.name, proxyTarget$LWS, distortedValue$LWS)];
|
|
14425
|
-
} else {
|
|
14426
|
-
// istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
14427
|
-
if (typeof proxyTarget$LWS === 'object' && proxyTarget$LWS !== null) {
|
|
14428
|
-
entries$LWS[entriesOffset$LWS++] = entry$LWS;
|
|
14429
|
-
}
|
|
14430
|
-
}
|
|
14431
|
-
}
|
|
14432
|
-
}
|
|
14433
|
-
|
|
14434
|
-
return entries$LWS;
|
|
14435
|
-
}
|
|
14436
|
-
|
|
14437
|
-
function createDistortionMap$LWS(entries$LWS) {
|
|
14438
|
-
return SUPPORTS_DISTORTIONS_WEAK_MAP$LWS ? toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1(entries$LWS)) : // istanbul ignore next: this code is not reachable in the coverage run.
|
|
14439
|
-
toSafeMap$LWS$1(new MapCtor$LWS$1(entries$LWS));
|
|
14440
|
-
}
|
|
14441
|
-
|
|
14442
|
-
function createGetVirtualEnvironment$LWS(_record$LWS) {
|
|
14443
|
-
let virtualEnvironment$LWS;
|
|
14444
|
-
return () => {
|
|
14445
|
-
if (virtualEnvironment$LWS === undefined) {
|
|
14446
|
-
virtualEnvironment$LWS = createVirtualEnvironment$LWS(_record$LWS);
|
|
14447
|
-
}
|
|
14448
|
-
|
|
14449
|
-
return virtualEnvironment$LWS;
|
|
14450
|
-
};
|
|
14451
|
-
}
|
|
14452
|
-
|
|
14453
14524
|
function createTrackAsFastTarget$LWS(getVirtualEnvironment$LWS) {
|
|
14454
14525
|
let virtualEnvironment$LWS;
|
|
14455
14526
|
return __target$LWS => {
|
|
@@ -14504,74 +14575,6 @@ function createVirtualEnvironmentEvaluator$LWS(_record$LWS, getVirtualEnvironmen
|
|
|
14504
14575
|
};
|
|
14505
14576
|
}
|
|
14506
14577
|
|
|
14507
|
-
function createOpaqueSecondaryWindowSandboxRecord$LWS({
|
|
14508
|
-
globalObject: _globalObject$LWS,
|
|
14509
|
-
key: __key$LWS,
|
|
14510
|
-
type: _type$LWS
|
|
14511
|
-
}, root$LWS) {
|
|
14512
|
-
const sandboxRegistry$LWS = getOpaqueSandboxRegistry$LWS(_globalObject$LWS);
|
|
14513
|
-
let _record$LWS = sandboxRegistry$LWS[__key$LWS]; // istanbul ignore if: calls that would evaluate to true here ARE tested (see packages/integration-karma/test/distortions/HTMLIFrameElement/untrusted/snippets.js, "doesNotThrowOnCreationOrAccessOfCrossOriginIframeContentWindow"), but reported as uncovered
|
|
14514
|
-
|
|
14515
|
-
if (_record$LWS) {
|
|
14516
|
-
return _record$LWS;
|
|
14517
|
-
}
|
|
14518
|
-
|
|
14519
|
-
const {
|
|
14520
|
-
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
14521
|
-
LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14522
|
-
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14523
|
-
distortions: distortions$LWS,
|
|
14524
|
-
instrumentation: instrumentation$LWS
|
|
14525
|
-
} = root$LWS;
|
|
14526
|
-
_record$LWS = {
|
|
14527
|
-
BASIC_INSTRUMENTATION_DATA: BASIC_INSTRUMENTATION_DATA$LWS,
|
|
14528
|
-
LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14529
|
-
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14530
|
-
UNCOMPILED_CONTEXT: EMPTY_OBJECT$LWS,
|
|
14531
|
-
context: EMPTY_OBJECT$LWS,
|
|
14532
|
-
document,
|
|
14533
|
-
distortions: EMPTY_DISTORTIONS_MAP$LWS,
|
|
14534
|
-
endowments: EMPTY_OBJECT$LWS,
|
|
14535
|
-
globalObject: _globalObject$LWS,
|
|
14536
|
-
helpers: EMPTY_HELPERS$LWS,
|
|
14537
|
-
instrumentation: instrumentation$LWS,
|
|
14538
|
-
key: __key$LWS,
|
|
14539
|
-
root: root$LWS,
|
|
14540
|
-
sandboxEvaluator: noop$LWS$1,
|
|
14541
|
-
trackAsFastTarget: noop$LWS$1,
|
|
14542
|
-
type: _type$LWS,
|
|
14543
|
-
virtualEnvironmentEvaluator: noop$LWS$1
|
|
14544
|
-
}; // Fast path non-configurable location and window objects in the virtual
|
|
14545
|
-
// environment distortion callback by adding them to the root window's
|
|
14546
|
-
// distortion map.
|
|
14547
|
-
|
|
14548
|
-
const {
|
|
14549
|
-
location: location$LWS
|
|
14550
|
-
} = _globalObject$LWS;
|
|
14551
|
-
distortions$LWS.set(location$LWS, location$LWS); // istanbul ignore else: current tests have no way of expressing a state that would cause this condition to evaluate false
|
|
14552
|
-
|
|
14553
|
-
if (!seenGlobalObjects$LWS.has(_globalObject$LWS)) {
|
|
14554
|
-
distortions$LWS.set(_globalObject$LWS, _globalObject$LWS);
|
|
14555
|
-
}
|
|
14556
|
-
|
|
14557
|
-
const opaqueEntries$LWS = createDistortionEntries$LWS(_record$LWS, getOpaqueDistortionFactories$LWS(_record$LWS));
|
|
14558
|
-
|
|
14559
|
-
for (let _i$LWS = 0, {
|
|
14560
|
-
length: _length$LWS
|
|
14561
|
-
} = opaqueEntries$LWS; _i$LWS < _length$LWS; _i$LWS += 1) {
|
|
14562
|
-
const {
|
|
14563
|
-
0: entryKey$LWS,
|
|
14564
|
-
1: entryValue$LWS
|
|
14565
|
-
} = opaqueEntries$LWS[_i$LWS]; // Add opaque distortion for the child window to the root window's
|
|
14566
|
-
// distortion map.
|
|
14567
|
-
|
|
14568
|
-
distortions$LWS.set(entryKey$LWS, entryValue$LWS);
|
|
14569
|
-
}
|
|
14570
|
-
|
|
14571
|
-
sandboxRegistry$LWS[__key$LWS] = _record$LWS;
|
|
14572
|
-
return _record$LWS;
|
|
14573
|
-
}
|
|
14574
|
-
|
|
14575
14578
|
function createSandboxEvaluator$LWS({
|
|
14576
14579
|
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: verboseInstrumentation$LWS,
|
|
14577
14580
|
document: _document$LWS,
|
|
@@ -14596,73 +14599,6 @@ function createSandboxEvaluator$LWS({
|
|
|
14596
14599
|
});
|
|
14597
14600
|
}
|
|
14598
14601
|
|
|
14599
|
-
function createRootWindowSandboxRecord$LWS({
|
|
14600
|
-
context: _context$LWS,
|
|
14601
|
-
endowments: endowments$LWS,
|
|
14602
|
-
instrumentation: instrumentation$LWS,
|
|
14603
|
-
key: __key$LWS,
|
|
14604
|
-
type: _type$LWS,
|
|
14605
|
-
verboseInstrumentation: verboseInstrumentation$LWS
|
|
14606
|
-
}) {
|
|
14607
|
-
let _record$LWS = rootSandboxRegistry$LWS[__key$LWS];
|
|
14608
|
-
|
|
14609
|
-
if (_record$LWS) {
|
|
14610
|
-
return _record$LWS;
|
|
14611
|
-
}
|
|
14612
|
-
|
|
14613
|
-
const LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS = // In the future we can preface the LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG
|
|
14614
|
-
// definition with a LOCKER_UNMINIFIED_FLAG check to have instrumentation
|
|
14615
|
-
// removed in minified production builds.
|
|
14616
|
-
instrumentation$LWS !== EMPTY_OBJECT$LWS && typeof instrumentation$LWS === 'object' && instrumentation$LWS !== null;
|
|
14617
|
-
const distortions$LWS = createDistortionMap$LWS(rootDistortionMapSeedEntries$LWS);
|
|
14618
|
-
_record$LWS = {
|
|
14619
|
-
BASIC_INSTRUMENTATION_DATA: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS ? {
|
|
14620
|
-
sandboxKey: __key$LWS
|
|
14621
|
-
} : EMPTY_OBJECT$LWS,
|
|
14622
|
-
LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14623
|
-
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: // In the future we can preface the LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG
|
|
14624
|
-
// definition with a LOCKER_UNMINIFIED_FLAG check to have instrumentation
|
|
14625
|
-
// removed in minified production builds.
|
|
14626
|
-
verboseInstrumentation$LWS && LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
14627
|
-
UNCOMPILED_CONTEXT: ROOT_UNCOMPILED_CONTEXT$LWS,
|
|
14628
|
-
context: _context$LWS,
|
|
14629
|
-
document: rootDocument$LWS,
|
|
14630
|
-
distortions: distortions$LWS,
|
|
14631
|
-
endowments: endowments$LWS,
|
|
14632
|
-
globalObject: rootWindow$LWS$1,
|
|
14633
|
-
helpers: EMPTY_HELPERS$LWS,
|
|
14634
|
-
instrumentation: instrumentation$LWS,
|
|
14635
|
-
key: __key$LWS,
|
|
14636
|
-
root: EMPTY_OBJECT$LWS,
|
|
14637
|
-
sandboxEvaluator: noop$LWS$1,
|
|
14638
|
-
trackAsFastTarget: noop$LWS$1,
|
|
14639
|
-
type: _type$LWS,
|
|
14640
|
-
virtualEnvironmentEvaluator: noop$LWS$1
|
|
14641
|
-
};
|
|
14642
|
-
const getVirtualEnvironment$LWS = createGetVirtualEnvironment$LWS(_record$LWS);
|
|
14643
|
-
_record$LWS.root = _record$LWS;
|
|
14644
|
-
_record$LWS.sandboxEvaluator = createSandboxEvaluator$LWS(_record$LWS);
|
|
14645
|
-
_record$LWS.trackAsFastTarget = createTrackAsFastTarget$LWS(getVirtualEnvironment$LWS);
|
|
14646
|
-
_record$LWS.virtualEnvironmentEvaluator = createVirtualEnvironmentEvaluator$LWS(_record$LWS, getVirtualEnvironment$LWS);
|
|
14647
|
-
const entries$LWS = createDistortionEntries$LWS(_record$LWS, getDistortionFactories$LWS(_record$LWS)); // Call `createAttributeDistortionFactories()` last because its factories
|
|
14648
|
-
// are populated by the other distortion factories.
|
|
14649
|
-
|
|
14650
|
-
createDistortionEntries$LWS(_record$LWS, createAttributeDistortionFactories$LWS(_record$LWS), entries$LWS); // Add distortions to the root window's distortion map.
|
|
14651
|
-
|
|
14652
|
-
for (let _i$LWS = 0, {
|
|
14653
|
-
length: _length$LWS
|
|
14654
|
-
} = entries$LWS; _i$LWS < _length$LWS; _i$LWS += 1) {
|
|
14655
|
-
const {
|
|
14656
|
-
0: entryKey$LWS,
|
|
14657
|
-
1: entryValue$LWS
|
|
14658
|
-
} = entries$LWS[_i$LWS];
|
|
14659
|
-
distortions$LWS.set(entryKey$LWS, entryValue$LWS);
|
|
14660
|
-
}
|
|
14661
|
-
|
|
14662
|
-
rootSandboxRegistry$LWS[__key$LWS] = _record$LWS;
|
|
14663
|
-
return _record$LWS;
|
|
14664
|
-
}
|
|
14665
|
-
|
|
14666
14602
|
function createVirtualEnvironment$LWS(_record$LWS) {
|
|
14667
14603
|
const {
|
|
14668
14604
|
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: verboseInstrumentation$LWS,
|
|
@@ -14738,16 +14674,16 @@ function createVirtualEnvironment$LWS(_record$LWS) {
|
|
|
14738
14674
|
// haven't seen yet, but can safely check non-cross-origin-safe
|
|
14739
14675
|
// properties of, specifically `defaultView` which will give us
|
|
14740
14676
|
// a window if one exists.
|
|
14741
|
-
let
|
|
14677
|
+
let defaultView$LWS;
|
|
14742
14678
|
|
|
14743
14679
|
try {
|
|
14744
14680
|
// This will throw if `originalTarget` is not a document object.
|
|
14745
|
-
|
|
14681
|
+
defaultView$LWS = ReflectApply$LWS$1(DocumentProtoDefaultViewGetter$LWS, originalTarget$LWS, []); // eslint-disable-next-line no-empty
|
|
14746
14682
|
} catch (_unused41$LWS) {}
|
|
14747
14683
|
|
|
14748
|
-
if (
|
|
14684
|
+
if (defaultView$LWS) {
|
|
14749
14685
|
originalTargetDocument$LWS = originalTarget$LWS;
|
|
14750
|
-
originalTargetWindow$LWS =
|
|
14686
|
+
originalTargetWindow$LWS = defaultView$LWS;
|
|
14751
14687
|
}
|
|
14752
14688
|
}
|
|
14753
14689
|
|
|
@@ -14774,6 +14710,14 @@ function createVirtualEnvironment$LWS(_record$LWS) {
|
|
|
14774
14710
|
});
|
|
14775
14711
|
}
|
|
14776
14712
|
|
|
14713
|
+
function getDefaultType$LWS(__key$LWS) {
|
|
14714
|
+
return __key$LWS === CORE_SANDBOX_KEY$LWS ? 1
|
|
14715
|
+
/* SandboxType.Internal */
|
|
14716
|
+
: 0
|
|
14717
|
+
/* SandboxType.External */
|
|
14718
|
+
;
|
|
14719
|
+
}
|
|
14720
|
+
|
|
14777
14721
|
function getDistortionFactories$LWS(_record$LWS) {
|
|
14778
14722
|
// @TODO: Revert @W-11759694 removal of `documentToDistortionFactoriesMap`
|
|
14779
14723
|
// cache once system mode initialization order is resolved with LWC.
|
|
@@ -15005,7 +14949,7 @@ function proxyWrapFunctionDistortion$LWS({
|
|
|
15005
14949
|
instrumentation: instrumentation$LWS,
|
|
15006
14950
|
key: __key$LWS
|
|
15007
14951
|
}, factoryName$LWS, originalFunc$LWS, distortedFunc$LWS) {
|
|
15008
|
-
const activityName$LWS = LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS ? factoryName$LWS ? ReflectApply$LWS$1(StringProtoReplace$LWS, factoryName$LWS, [LOCKER_IDENTIFIER_MARKER$LWS
|
|
14952
|
+
const activityName$LWS = LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS ? factoryName$LWS ? ReflectApply$LWS$1(StringProtoReplace$LWS, factoryName$LWS, [LOCKER_IDENTIFIER_MARKER$LWS, '']) :
|
|
15009
14953
|
/* istanbul ignore next: currently unreachable via tests */
|
|
15010
14954
|
'<unknown>' : undefined;
|
|
15011
14955
|
const startActivity$LWS = LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS ? instrumentation$LWS.startActivity : undefined;
|
|
@@ -15102,6 +15046,73 @@ function toSourceText$LWS(__value$LWS, sourceType$LWS) {
|
|
|
15102
15046
|
`'use strict';${_sourceText$LWS}` : _sourceText$LWS;
|
|
15103
15047
|
}
|
|
15104
15048
|
|
|
15049
|
+
function createRootWindowSandboxRecord$LWS({
|
|
15050
|
+
context: _context$LWS = EMPTY_OBJECT$LWS,
|
|
15051
|
+
endowments: endowments$LWS = EMPTY_OBJECT$LWS,
|
|
15052
|
+
instrumentation: instrumentation$LWS = EMPTY_OBJECT$LWS,
|
|
15053
|
+
key: __key$LWS,
|
|
15054
|
+
type: _type$LWS = getDefaultType$LWS(__key$LWS),
|
|
15055
|
+
verboseInstrumentation: verboseInstrumentation$LWS = false
|
|
15056
|
+
}) {
|
|
15057
|
+
let _record$LWS = rootSandboxRegistry$LWS[__key$LWS];
|
|
15058
|
+
|
|
15059
|
+
if (_record$LWS) {
|
|
15060
|
+
return _record$LWS;
|
|
15061
|
+
}
|
|
15062
|
+
|
|
15063
|
+
const LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS = // In the future we can preface the LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG
|
|
15064
|
+
// definition with a LOCKER_UNMINIFIED_FLAG check to have instrumentation
|
|
15065
|
+
// removed in minified production builds.
|
|
15066
|
+
instrumentation$LWS !== EMPTY_OBJECT$LWS && typeof instrumentation$LWS === 'object' && instrumentation$LWS !== null;
|
|
15067
|
+
const distortions$LWS = createDistortionMap$LWS(rootDistortionMapSeedEntries$LWS);
|
|
15068
|
+
_record$LWS = {
|
|
15069
|
+
BASIC_INSTRUMENTATION_DATA: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS ? {
|
|
15070
|
+
sandboxKey: __key$LWS
|
|
15071
|
+
} : EMPTY_OBJECT$LWS,
|
|
15072
|
+
LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG: LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
15073
|
+
LOCKER_VERBOSE_DEBUG_MODE_INSTRUMENTATION_FLAG: // In the future we can preface the LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG
|
|
15074
|
+
// definition with a LOCKER_UNMINIFIED_FLAG check to have instrumentation
|
|
15075
|
+
// removed in minified production builds.
|
|
15076
|
+
verboseInstrumentation$LWS && LOCKER_DEBUG_MODE_INSTRUMENTATION_FLAG$LWS,
|
|
15077
|
+
UNCOMPILED_CONTEXT: ROOT_UNCOMPILED_CONTEXT$LWS,
|
|
15078
|
+
context: _context$LWS,
|
|
15079
|
+
document: rootDocument$LWS,
|
|
15080
|
+
distortions: distortions$LWS,
|
|
15081
|
+
endowments: endowments$LWS,
|
|
15082
|
+
globalObject: rootWindow$LWS$1,
|
|
15083
|
+
helpers: EMPTY_HELPERS$LWS,
|
|
15084
|
+
instrumentation: instrumentation$LWS,
|
|
15085
|
+
key: __key$LWS,
|
|
15086
|
+
root: EMPTY_OBJECT$LWS,
|
|
15087
|
+
sandboxEvaluator: noop$LWS$1,
|
|
15088
|
+
trackAsFastTarget: noop$LWS$1,
|
|
15089
|
+
type: _type$LWS,
|
|
15090
|
+
virtualEnvironmentEvaluator: noop$LWS$1
|
|
15091
|
+
};
|
|
15092
|
+
const getVirtualEnvironment$LWS = createGetVirtualEnvironment$LWS(_record$LWS);
|
|
15093
|
+
_record$LWS.root = _record$LWS;
|
|
15094
|
+
_record$LWS.sandboxEvaluator = createSandboxEvaluator$LWS(_record$LWS);
|
|
15095
|
+
_record$LWS.trackAsFastTarget = createTrackAsFastTarget$LWS(getVirtualEnvironment$LWS);
|
|
15096
|
+
_record$LWS.virtualEnvironmentEvaluator = createVirtualEnvironmentEvaluator$LWS(_record$LWS, getVirtualEnvironment$LWS);
|
|
15097
|
+
const entries$LWS = createDistortionEntries$LWS(_record$LWS, getDistortionFactories$LWS(_record$LWS)); // Call `createAttributeDistortionFactories()` last because its factories
|
|
15098
|
+
// are populated by the other distortion factories.
|
|
15099
|
+
|
|
15100
|
+
createDistortionEntries$LWS(_record$LWS, createAttributeDistortionFactories$LWS(_record$LWS), entries$LWS); // Add distortions to the root window's distortion map.
|
|
15101
|
+
|
|
15102
|
+
for (let _i$LWS = 0, {
|
|
15103
|
+
length: _length$LWS
|
|
15104
|
+
} = entries$LWS; _i$LWS < _length$LWS; _i$LWS += 1) {
|
|
15105
|
+
const {
|
|
15106
|
+
0: entryKey$LWS,
|
|
15107
|
+
1: entryValue$LWS
|
|
15108
|
+
} = entries$LWS[_i$LWS];
|
|
15109
|
+
distortions$LWS.set(entryKey$LWS, entryValue$LWS);
|
|
15110
|
+
}
|
|
15111
|
+
|
|
15112
|
+
rootSandboxRegistry$LWS[__key$LWS] = _record$LWS;
|
|
15113
|
+
return _record$LWS;
|
|
15114
|
+
}
|
|
15115
|
+
|
|
15105
15116
|
function evaluateInCoreSandbox$LWS(__key$LWS, source$LWS, _context$LWS = EMPTY_OBJECT$LWS, endowments$LWS = EMPTY_OBJECT$LWS, instrumentation$LWS = EMPTY_OBJECT$LWS, verboseInstrumentation$LWS = false) {
|
|
15106
15117
|
return internalEvaluateInSandbox$LWS({
|
|
15107
15118
|
context: _context$LWS,
|
|
@@ -15140,4 +15151,4 @@ function evaluateInSandbox$LWS(__key$LWS, source$LWS, _context$LWS = EMPTY_OBJEC
|
|
|
15140
15151
|
});
|
|
15141
15152
|
}
|
|
15142
15153
|
|
|
15143
|
-
export { CORE_SANDBOX_KEY$LWS as CORE_SANDBOX_KEY, evaluateInCoreSandbox$LWS as evaluateInCoreSandbox, evaluateInSandbox$LWS as evaluateInSandbox, lwsPolicy$LWS as lwsPolicy };
|
|
15154
|
+
export { CORE_SANDBOX_KEY$LWS as CORE_SANDBOX_KEY, createRootWindowSandboxRecord$LWS as createRootWindowSandboxRecord, evaluateInCoreSandbox$LWS as evaluateInCoreSandbox, evaluateInSandbox$LWS as evaluateInSandbox, lwsPolicy$LWS as lwsPolicy };
|