fix(es/minifier): Disable inlining of expressions from collapse_vars (#3200)

swc_ecma_minifier:
 - `collapse_vars`: Disable for member expressions. (Closes #2614)
 - `sequences`: Respect `inline_prevented`.
This commit is contained in:
Donny/강동윤 2022-01-06 20:49:10 +09:00 committed by GitHub
parent 6892f27ad7
commit 69b5f799f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 207 additions and 168 deletions

View File

@ -0,0 +1,10 @@
{
"jsc": {
"minify": {
"mangle": false,
"compress": true,
"toplevel": true,
"module": true
}
}
}

View File

@ -0,0 +1,7 @@
expose(() => export_default);
var foo = require("70jDX");
var Value;
Value = foo.default;
var export_default = Value;

View File

@ -0,0 +1,4 @@
expose(function() {
return export_default;
});
var export_default = require("70jDX").default;

View File

@ -4,4 +4,4 @@ export var E1, E1, i, z, C1 = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C1), this.m1 = 42;
};
C1.s1 = !0, (E1 = E1 || (E1 = {}))[E1.A = 0] = "A", E1[E1.B = 1] = "B", E1[E1.C = 2] = "C", require("./foo_0");
C1.s1 = !0, E1 = E1 || (E1 = {}), E1[E1.A = 0] = "A", E1[E1.B = 1] = "B", E1[E1.C = 2] = "C", require("./foo_0");

View File

@ -4,4 +4,4 @@ export var E1, E1, i, z, C1 = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C1), this.m1 = 42;
};
C1.s1 = !0, (E1 = E1 || (E1 = {}))[E1.A = 0] = "A", E1[E1.B = 1] = "B", E1[E1.C = 2] = "C", require("./foo_0");
C1.s1 = !0, E1 = E1 || (E1 = {}), E1[E1.A = 0] = "A", E1[E1.B = 1] = "B", E1[E1.C = 2] = "C", require("./foo_0");

View File

@ -1,4 +1,4 @@
var _c;
var _c, d;
(function(source, excluded) {
if (null == source) return {};
var key, i, target = function(source, excluded) {
@ -18,4 +18,4 @@ var _c;
}
}).x, [
"a"
]), (void 0 === _c.x, _c.x).a;
]), (void 0 === (d = _c.x), d).a;

View File

@ -4,6 +4,6 @@ export var E, E, E, C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(C || (C = {})).x = 1, (E = E || (E = {}))[E.w = 1] = "w", (E = E || (E = {}))[E.x = 2] = "x", (E || (E = {})).y = 1, (E || (E = {})).z = 1, (N || (N = {})).x = 1;
(C || (C = {})).x = 1, E = E || (E = {}), E[E.w = 1] = "w", E = E || (E = {}), E[E.x = 2] = "x", (E || (E = {})).y = 1, (E || (E = {})).z = 1, (N || (N = {})).x = 1;
export function F() {}
(F || (F = {})).x = 1;

View File

@ -4,6 +4,6 @@ export var E, E, E, C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(C || (C = {})).x = 1, (E = E || (E = {}))[E.w = 1] = "w", (E = E || (E = {}))[E.x = 2] = "x", (E || (E = {})).y = 1, (E || (E = {})).z = 1, (N || (N = {})).x = 1;
(C || (C = {})).x = 1, E = E || (E = {}), E[E.w = 1] = "w", E = E || (E = {}), E[E.x = 2] = "x", (E || (E = {})).y = 1, (E || (E = {})).z = 1, (N || (N = {})).x = 1;
export function F() {}
(F || (F = {})).x = 1;

View File

@ -3,7 +3,7 @@ var E, D, E, D, M, v = 1;
function f() {}
class C {
}
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -7,7 +7,7 @@ var E, C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -3,7 +3,7 @@ var E, D, E, D, M, v = 1;
function f() {}
class C {
}
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -7,7 +7,7 @@ var E, C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -3,7 +3,7 @@ var E, D, E, D, M, v = 1;
function f() {}
class C {
}
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -7,7 +7,7 @@ var E, C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -3,7 +3,7 @@ export var E, D, E, D, M, v = 1;
export function f() {}
export class C {
}
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -7,7 +7,7 @@ export var C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -3,7 +3,7 @@ export var E, D, E, D, M, v = 1;
export function f() {}
export class C {
}
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -7,7 +7,7 @@ export var C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -3,7 +3,7 @@ export var E, D, E, D, M, v = 1;
export function f() {}
export class C {
}
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -7,7 +7,7 @@ export var C = function() {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C);
};
(E = E || (E = {}))[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", (D = D || (D = {}))[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
E = E || (E = {}), E[E.A = 0] = "A", E[E.B = 1] = "B", E[E.C = 2] = "C", D = D || (D = {}), D[D.A = 0] = "A", D[D.B = 1] = "B", D[D.C = 2] = "C", (function(M1) {
var x;
M1.x = x;
})(M || (M = {}));

View File

@ -1,5 +1,6 @@
const MixedBase = class extends class {
} {
var baseClass;
const MixedBase = (baseClass = class {
}, class extends baseClass {
mixinMethod() {}
};
});
new MixedBase();

View File

@ -41,5 +41,5 @@ export const b = g`
`;
export let c = obj.prop`${(input)=>_objectSpread({}, input)
}`;
c.returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z, (c = obj.prop`${(input)=>_objectSpread({}, input)
}`).returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z;
c.returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z, c = obj.prop`${(input)=>_objectSpread({}, input)
}`, c.returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z;

View File

@ -81,6 +81,6 @@ export var b = g(_templateObject1(), function(stuff) {
export var c = obj.prop(_templateObject2(), function(input) {
return _objectSpread({}, input);
});
c.returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z, (c = obj.prop(_templateObject3(), function(input) {
c.returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z, c = obj.prop(_templateObject3(), function(input) {
return _objectSpread({}, input);
})).returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z;
}), c.returnedObjProp.x, c.returnedObjProp.y, c.returnedObjProp.z;

View File

@ -8,7 +8,7 @@ export class C {
(M = M1 || (M1 = {})).foo = "", M.C = class {
};
export var Z = M1;
(E = E || (E = {}))[E.A = 0] = "A";
E = E || (E = {}), E[E.A = 0] = "A";
function foo1() {}
export { foo1 as foo };
(foo = foo1 || (foo1 = {})).y = 1, foo.C = class {

View File

@ -18,7 +18,7 @@ export var C = function() {
M1.C = C1;
}(M || (M = {}));
export var Z = M;
(E = E || (E = {}))[E.A = 0] = "A";
E = E || (E = {}), E[E.A = 0] = "A";
export function foo() {}
!function(foo1) {
foo1.y = 1;

View File

@ -371,7 +371,7 @@ where
let mut visitor = optimizer(
self.marks,
self.options,
self.data.as_ref().unwrap(),
self.data.as_mut().unwrap(),
self.mode,
!self.dump_for_infinite_loop.is_empty(),
);

View File

@ -58,10 +58,7 @@ where
let value = match &*assign.right {
Expr::Lit(Lit::Str(s)) if s.value.len() > 3 => return,
Expr::Lit(..)
| Expr::Member(MemberExpr {
computed: false, ..
}) => assign.right.clone(),
Expr::Lit(..) => assign.right.clone(),
_ => return,
};

View File

@ -51,7 +51,7 @@ mod util;
pub(super) fn optimizer<'a, M>(
marks: Marks,
options: &'a CompressOptions,
data: &'a ProgramData,
data: &'a mut ProgramData,
mode: &'a M,
debug_infinite_loop: bool,
) -> impl 'a + VisitMut + Repeated
@ -209,7 +209,7 @@ struct Optimizer<'a, M> {
///
/// This is calculated multiple time, but only once per one
/// `visit_mut_module`.
data: Option<&'a ProgramData>,
data: Option<&'a mut ProgramData>,
ctx: Ctx,
/// In future: This will be used to `mark` node as done.
done: Mark,

View File

@ -1331,6 +1331,10 @@ where
.as_ref()
.and_then(|data| data.vars.get(&left_id.to_id()))
{
if usage.inline_prevented {
return Ok(false);
}
if usage.declared_as_fn_expr {
tracing::trace!(
"sequences: [X] Declared as fn expr ({}, {:?})",
@ -1364,6 +1368,10 @@ where
if usage.reassigned || !usage.is_fn_local {
return Ok(false);
}
if usage.inline_prevented {
return Ok(false);
}
match &mut a.init {
Some(v) => (left, v),
None => {

View File

@ -12962,7 +12962,7 @@
return "object" == typeof f && null !== f ? f = vg(f) : (e = Ff(b) ? Df : M.current, d = b.contextTypes, f = (d = null != d) ? Ef(a, e) : Cf), b = new b(c, f), a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null, b.updater = Kg, a.stateNode = b, b._reactInternals = a, d && ((a = a.stateNode).__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f), b;
}
function Ng(a, b, c, d) {
b.state, "function" == typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d), "function" == typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d), b.state != b.state && Kg.enqueueReplaceState(b, b.state, null);
a = b.state, "function" == typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d), "function" == typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d), b.state !== a && Kg.enqueueReplaceState(b, b.state, null);
}
function Og(a, b, c, d) {
var e = a.stateNode;

View File

@ -0,0 +1,7 @@
expose(() => export_default);
var foo = require("70jDX");
var Value;
Value = foo.default;
var export_default = Value;

View File

@ -0,0 +1,3 @@
expose(()=>export_default
);
var export_default = require("70jDX").default;

View File

@ -464,7 +464,7 @@
return new _t(e5);
}
toBase64() {
return this.binaryString, btoa(this.binaryString);
return btoa(this.binaryString);
}
toUint8Array() {
return (function(t) {
@ -5377,8 +5377,8 @@
return null;
}
Xo(t) {
var e;
return this.persistence, e = new cr, t.initialUser, this.N, new ar(this.persistence, e, t.initialUser, this.N);
var t220, e, n, s;
return t220 = this.persistence, e = new cr, n = t.initialUser, s = this.N, new ar(t220, e, n, s);
}
Jo(t) {
return new Cr(xr.Ns, this.N);
@ -5391,28 +5391,28 @@
}
}
class Fc {
async initialize(t220, e) {
this.localStore || (this.localStore = t220.localStore, this.sharedClientState = t220.sharedClientState, this.datastore = this.createDatastore(e), this.remoteStore = this.createRemoteStore(e), this.eventManager = this.createEventManager(e), this.syncEngine = this.createSyncEngine(e, !t220.synchronizeTabs), this.sharedClientState.onlineStateHandler = (t)=>cc(this.syncEngine, t, 1)
async initialize(t221, e) {
this.localStore || (this.localStore = t221.localStore, this.sharedClientState = t221.sharedClientState, this.datastore = this.createDatastore(e), this.remoteStore = this.createRemoteStore(e), this.eventManager = this.createEventManager(e), this.syncEngine = this.createSyncEngine(e, !t221.synchronizeTabs), this.sharedClientState.onlineStateHandler = (t)=>cc(this.syncEngine, t, 1)
, this.remoteStore.remoteSyncer.handleCredentialChange = Tc.bind(null, this.syncEngine), await Do(this.remoteStore, this.syncEngine.isPrimaryClient));
}
createEventManager(t) {
return new Lo;
}
createDatastore(t) {
var e, n;
const e125 = Yr(t.databaseInfo.databaseId), n47 = (t.databaseInfo, new zr(t.databaseInfo));
return t.credentials, e = n47, n = e125, new no(t.credentials, e, n);
var s, t222, e, n;
const e125 = Yr(t.databaseInfo.databaseId), n47 = (s = t.databaseInfo, new zr(s));
return t222 = t.credentials, e = n47, n = e125, new no(t222, e, n);
}
createRemoteStore(t221) {
var i, r;
return this.localStore, this.datastore, t221.asyncQueue, i = (t)=>cc(this.syncEngine, t, 0)
, r = Qr.bt() ? new Qr : new jr, new io(this.localStore, this.datastore, t221.asyncQueue, i, r);
createRemoteStore(t223) {
var e, n, s, i, r;
return e = this.localStore, n = this.datastore, s = t223.asyncQueue, i = (t)=>cc(this.syncEngine, t, 0)
, r = Qr.bt() ? new Qr : new jr, new io(e, n, s, i, r);
}
createSyncEngine(t222, e126) {
createSyncEngine(t224, e126) {
return (function(t, e, n, s, i, r, o) {
const c = new ec(t, e, n, s, i, r);
return o && (c.Qo = !0), c;
})(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, t222.initialUser, t222.maxConcurrentLimboResolutions, e126);
})(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, t224.initialUser, t224.maxConcurrentLimboResolutions, e126);
}
terminate() {
return (async function(t) {
@ -5441,8 +5441,8 @@
}
}
class Kc {
constructor(t223, e127, n48){
this.credentials = t223, this.asyncQueue = e127, this.databaseInfo = n48, this.user = D.UNAUTHENTICATED, this.clientId = (class {
constructor(t225, e127, n48){
this.credentials = t225, this.asyncQueue = e127, this.databaseInfo = n48, this.user = D.UNAUTHENTICATED, this.clientId = (class {
static I() {
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = Math.floor(256 / t.length) * t.length;
let n = "";
@ -5486,28 +5486,28 @@
}), t.promise;
}
}
async function jc(t224, e) {
t224.asyncQueue.verifyOperationInProgress(), $("FirestoreClient", "Initializing OfflineComponentProvider");
const n = await t224.getConfiguration();
async function jc(t226, e) {
t226.asyncQueue.verifyOperationInProgress(), $("FirestoreClient", "Initializing OfflineComponentProvider");
const n = await t226.getConfiguration();
await e.initialize(n);
let s = n.initialUser;
t224.setCredentialChangeListener(async (t)=>{
t226.setCredentialChangeListener(async (t)=>{
s.isEqual(t) || (await hr(e.localStore, t), s = t);
}), e.persistence.setDatabaseDeletedListener(()=>t224.terminate()
), t224.offlineComponents = e;
}), e.persistence.setDatabaseDeletedListener(()=>t226.terminate()
), t226.offlineComponents = e;
}
async function Qc(t225, e128) {
t225.asyncQueue.verifyOperationInProgress();
const n49 = await Wc(t225);
async function Qc(t227, e128) {
t227.asyncQueue.verifyOperationInProgress();
const n49 = await Wc(t227);
$("FirestoreClient", "Initializing OnlineComponentProvider");
const s22 = await t225.getConfiguration();
await e128.initialize(n49, s22), t225.setCredentialChangeListener((t226)=>(async function(t, e) {
const s22 = await t227.getConfiguration();
await e128.initialize(n49, s22), t227.setCredentialChangeListener((t228)=>(async function(t, e) {
const n = q(t);
n.asyncQueue.verifyOperationInProgress(), $("RemoteStore", "RemoteStore received new credentials");
const s = wo(n);
n.Wr.add(3), await oo(n), s && n.Hr.set("Unknown"), await n.remoteSyncer.handleCredentialChange(e), n.Wr.delete(3), await ro(n);
})(e128.remoteStore, t226)
), t225.onlineComponents = e128;
})(e128.remoteStore, t228)
), t227.onlineComponents = e128;
}
async function Wc(t) {
return t.offlineComponents || ($("FirestoreClient", "Using default OfflineComponentProvider"), await jc(t, new kc)), t.offlineComponents;
@ -5547,8 +5547,8 @@
if ("object" == typeof t) {
if (t instanceof Array) return "an array";
{
var t227;
const e = (t227 = t).constructor ? t227.constructor.name : null;
var t229;
const e = (t229 = t).constructor ? t229.constructor.name : null;
return e ? `a custom ${e} object` : "an object";
}
}
@ -5565,33 +5565,33 @@
return t;
}
class pa {
constructor(t228){
constructor(t230){
var e129;
if (void 0 === t228.host) {
if (void 0 !== t228.ssl) throw new j(K.INVALID_ARGUMENT, "Can't provide ssl option if host option is not set");
if (void 0 === t230.host) {
if (void 0 !== t230.ssl) throw new j(K.INVALID_ARGUMENT, "Can't provide ssl option if host option is not set");
this.host = "firestore.googleapis.com", this.ssl = !0;
} else this.host = t228.host, this.ssl = null === (e129 = t228.ssl) || void 0 === e129 || e129;
if (this.credentials = t228.credentials, this.ignoreUndefinedProperties = !!t228.ignoreUndefinedProperties, void 0 === t228.cacheSizeBytes) this.cacheSizeBytes = 41943040;
} else this.host = t230.host, this.ssl = null === (e129 = t230.ssl) || void 0 === e129 || e129;
if (this.credentials = t230.credentials, this.ignoreUndefinedProperties = !!t230.ignoreUndefinedProperties, void 0 === t230.cacheSizeBytes) this.cacheSizeBytes = 41943040;
else {
if (-1 !== t228.cacheSizeBytes && t228.cacheSizeBytes < 1048576) throw new j(K.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
this.cacheSizeBytes = t228.cacheSizeBytes;
if (-1 !== t230.cacheSizeBytes && t230.cacheSizeBytes < 1048576) throw new j(K.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
this.cacheSizeBytes = t230.cacheSizeBytes;
}
this.experimentalForceLongPolling = !!t228.experimentalForceLongPolling, this.experimentalAutoDetectLongPolling = !!t228.experimentalAutoDetectLongPolling, this.useFetchStreams = !!t228.useFetchStreams, (function(t, e, n, s) {
this.experimentalForceLongPolling = !!t230.experimentalForceLongPolling, this.experimentalAutoDetectLongPolling = !!t230.experimentalAutoDetectLongPolling, this.useFetchStreams = !!t230.useFetchStreams, (function(t, e, n, s) {
if (!0 === e && !0 === s) throw new j(K.INVALID_ARGUMENT, `${t} and ${n} cannot be used together.`);
})("experimentalForceLongPolling", t228.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t228.experimentalAutoDetectLongPolling);
})("experimentalForceLongPolling", t230.experimentalForceLongPolling, "experimentalAutoDetectLongPolling", t230.experimentalAutoDetectLongPolling);
}
isEqual(t) {
return this.host === t.host && this.ssl === t.ssl && this.credentials === t.credentials && this.cacheSizeBytes === t.cacheSizeBytes && this.experimentalForceLongPolling === t.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === t.experimentalAutoDetectLongPolling && this.ignoreUndefinedProperties === t.ignoreUndefinedProperties && this.useFetchStreams === t.useFetchStreams;
}
}
class Ta {
constructor(t229, e){
this._credentials = e, this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new pa({}), this._settingsFrozen = !1, t229 instanceof ha ? this._databaseId = t229 : (this._app = t229, this._databaseId = (function(t) {
constructor(t231, e){
this._credentials = e, this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new pa({}), this._settingsFrozen = !1, t231 instanceof ha ? this._databaseId = t231 : (this._app = t231, this._databaseId = (function(t) {
if (!Object.prototype.hasOwnProperty.apply(t.options, [
"projectId"
])) throw new j(K.INVALID_ARGUMENT, "\"projectId\" not provided in firebase.initializeApp.");
return new ha(t.options.projectId);
})(t229));
})(t231));
}
get app() {
if (!this._app) throw new j(K.FAILED_PRECONDITION, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
@ -5603,9 +5603,9 @@
get _terminated() {
return void 0 !== this._terminateTask;
}
_setSettings(t230) {
_setSettings(t232) {
if (this._settingsFrozen) throw new j(K.FAILED_PRECONDITION, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
this._settings = new pa(t230), void 0 !== t230.credentials && (this._credentials = (function(t) {
this._settings = new pa(t232), void 0 !== t232.credentials && (this._credentials = (function(t) {
if (!t) return new G;
switch(t.type){
case "gapi":
@ -5616,7 +5616,7 @@
default:
throw new j(K.INVALID_ARGUMENT, "makeCredentialsProvider failed due to invalid credential type");
}
})(t230.credentials));
})(t232.credentials));
}
_getSettings() {
return this._settings;
@ -5687,29 +5687,29 @@
return new Ra(this.firestore, t, this._path);
}
}
function ba(t231, e130, ...n50) {
if (t231 = (0, _firebase_util__WEBPACK_IMPORTED_MODULE_3__.m9)(t231), (function(t, e, n) {
function ba(t233, e130, ...n50) {
if (t233 = (0, _firebase_util__WEBPACK_IMPORTED_MODULE_3__.m9)(t233), (function(t, e, n) {
if (!n) throw new j(K.INVALID_ARGUMENT, `Function ${t}() cannot be called with an empty ${e}.`);
})("collection", "path", e130), t231 instanceof Ta) {
})("collection", "path", e130), t233 instanceof Ta) {
const s = ht.fromString(e130, ...n50);
return _a(s), new Ra(t231, null, s);
return _a(s), new Ra(t233, null, s);
}
{
if (!(t231 instanceof Ia || t231 instanceof Ra)) throw new j(K.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
const s = t231._path.child(ht.fromString(e130, ...n50));
return _a(s), new Ra(t231.firestore, null, s);
if (!(t233 instanceof Ia || t233 instanceof Ra)) throw new j(K.INVALID_ARGUMENT, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
const s = t233._path.child(ht.fromString(e130, ...n50));
return _a(s), new Ra(t233.firestore, null, s);
}
}
class ka extends Ta {
constructor(t232, e131){
super(t232, e131), this.type = "firestore", this._queue = new class {
constructor(t234, e131){
super(t234, e131), this.type = "firestore", this._queue = new class {
constructor(){
this._c = Promise.resolve(), this.mc = [], this.gc = !1, this.yc = [], this.Tc = null, this.Ec = !1, this.Ic = !1, this.Ac = [], this.ar = new Xr(this, "async_queue_retry"), this.Rc = ()=>{
const t = Jr();
t && $("AsyncQueue", "Visibility state changed to " + t.visibilityState), this.ar.tr();
};
const t233 = Jr();
t233 && "function" == typeof t233.addEventListener && t233.addEventListener("visibilitychange", this.Rc);
const t235 = Jr();
t235 && "function" == typeof t235.addEventListener && t235.addEventListener("visibilitychange", this.Rc);
}
get isShuttingDown() {
return this.gc;
@ -5750,21 +5750,21 @@
);
}
}
Pc(t235) {
const e133 = this._c.then(()=>(this.Ec = !0, t235().catch((t)=>{
var t234;
Pc(t237) {
const e133 = this._c.then(()=>(this.Ec = !0, t237().catch((t)=>{
var t236;
this.Tc = t, this.Ec = !1;
let e;
const e132 = (e = (t234 = t).message || "", t234.stack && (e = t234.stack.includes(t234.message) ? t234.stack : t234.message + "\n" + t234.stack), e);
const e132 = (e = (t236 = t).message || "", t236.stack && (e = t236.stack.includes(t236.message) ? t236.stack : t236.message + "\n" + t236.stack), e);
throw O("INTERNAL UNHANDLED ERROR: ", e132), t;
}).then((t)=>(this.Ec = !1, t)
))
);
return this._c = e133, e133;
}
enqueueAfterDelay(t236, e, n) {
this.bc(), this.Ac.indexOf(t236) > -1 && (e = 0);
const s = xo.createAndSchedule(this, t236, e, n, (t)=>this.Vc(t)
enqueueAfterDelay(t238, e, n) {
this.bc(), this.Ac.indexOf(t238) > -1 && (e = 0);
const s = xo.createAndSchedule(this, t238, e, n, (t)=>this.Vc(t)
);
return this.yc.push(s), s;
}
@ -5781,10 +5781,10 @@
for (const e of this.yc)if (e.timerId === t) return !0;
return !1;
}
Cc(t237) {
Cc(t239) {
return this.Sc().then(()=>{
for (const e134 of (this.yc.sort((t, e)=>t.targetTimeMs - e.targetTimeMs
), this.yc))if (e134.skipDelay(), "all" !== t237 && e134.timerId === t237) break;
), this.yc))if (e134.skipDelay(), "all" !== t239 && e134.timerId === t239) break;
return this.Sc();
});
}
@ -5795,15 +5795,15 @@
const e = this.yc.indexOf(t);
this.yc.splice(e, 1);
}
}, this._persistenceKey = "name" in t232 ? t232.name : "[DEFAULT]";
}, this._persistenceKey = "name" in t234 ? t234.name : "[DEFAULT]";
}
_terminate() {
return this._firestoreClient || Ma(this), this._firestoreClient.terminate();
}
}
function Ma(t) {
var e, e135, s;
const n = t._freezeSettings(), s23 = (t._databaseId, e135 = (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || "", t._persistenceKey, s = n, new ua(t._databaseId, e135, t._persistenceKey, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams));
var e, t240, e135, n, s;
const n51 = t._freezeSettings(), s23 = (t240 = t._databaseId, e135 = (null === (e = t._app) || void 0 === e ? void 0 : e.options.appId) || "", n = t._persistenceKey, s = n51, new ua(t240, e135, n, s.host, s.ssl, s.experimentalForceLongPolling, s.experimentalAutoDetectLongPolling, s.useFetchStreams));
t._firestoreClient = new Kc(t._credentials, t._queue, s23);
}
class Ja {
@ -5822,8 +5822,8 @@
static fromBase64String(t) {
try {
return new Xa(_t.fromBase64String(t));
} catch (t238) {
throw new j(K.INVALID_ARGUMENT, "Failed to construct data from Base64 string: " + t238);
} catch (t241) {
throw new j(K.INVALID_ARGUMENT, "Failed to construct data from Base64 string: " + t241);
}
}
static fromUint8Array(t) {
@ -5954,16 +5954,16 @@
return t instanceof lu;
}
}
function yu(t239, e136) {
if (Tu(t239 = getModularInstance(t239))) return Eu("Unsupported field value:", e136, t239), pu(t239, e136);
if (t239 instanceof Za) return (function(t, e) {
function yu(t242, e136) {
if (Tu(t242 = getModularInstance(t242))) return Eu("Unsupported field value:", e136, t242), pu(t242, e136);
if (t242 instanceof Za) return (function(t, e) {
if (!iu(e.kc)) throw e.Uc(`${t._methodName}() can only be used with update() and set()`);
if (!e.path) throw e.Uc(`${t._methodName}() is not currently supported inside arrays`);
const n = t._toFieldTransform(e);
n && e.fieldTransforms.push(n);
})(t239, e136), null;
if (void 0 === t239 && e136.ignoreUndefinedProperties) return null;
if (e136.path && e136.fieldMask.push(e136.path), t239 instanceof Array) {
})(t242, e136), null;
if (void 0 === t242 && e136.ignoreUndefinedProperties) return null;
if (e136.path && e136.fieldMask.push(e136.path), t242 instanceof Array) {
if (e136.settings.Fc && 4 !== e136.kc) throw e136.Uc("Nested arrays are not supported");
return (function(t, e) {
const n = [];
@ -5979,14 +5979,14 @@
values: n
}
};
})(t239, e136);
})(t242, e136);
}
return (function(t, e) {
var t240, e137;
var t243, e137;
if (null === (t = getModularInstance(t))) return {
nullValue: "NULL_VALUE"
};
if ("number" == typeof t) return t240 = e.N, bt(e137 = t) ? De(e137) : Se(t240, e137);
if ("number" == typeof t) return t243 = e.N, bt(e137 = t) ? De(e137) : Se(t243, e137);
if ("boolean" == typeof t) return {
booleanValue: t
};
@ -6022,11 +6022,11 @@
};
}
throw e.Uc(`Unsupported field value: ${ma(t)}`);
})(t239, e136);
})(t242, e136);
}
function pu(t241, e) {
function pu(t244, e) {
const n = {};
return at(t241) ? e.path && e.path.length > 0 && e.fieldMask.push(e.path) : ct(t241, (t, s)=>{
return at(t244) ? e.path && e.path.length > 0 && e.fieldMask.push(e.path) : ct(t244, (t, s)=>{
const i = yu(s, e.Oc(t));
null != i && (n[t] = i);
}), {
@ -6039,8 +6039,8 @@
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof it || t instanceof tu || t instanceof Xa || t instanceof Ia || t instanceof Za);
}
function Eu(t, e, n) {
var t242;
if (!Tu(n) || "object" != typeof (t242 = n) || null === t242 || Object.getPrototypeOf(t242) !== Object.prototype && null !== Object.getPrototypeOf(t242)) {
var t245;
if (!Tu(n) || "object" != typeof (t245 = n) || null === t245 || Object.getPrototypeOf(t245) !== Object.prototype && null !== Object.getPrototypeOf(t245)) {
const s = ma(n);
throw "an object" === s ? e.Uc(t + " a custom object") : e.Uc(t + " " + s);
}
@ -6087,7 +6087,7 @@
return super.data();
}
}
function Su(t243, e138) {
function Su(t246, e138) {
return "string" == typeof e138 ? (function(t, e, n) {
if (e.search(Au) >= 0) throw bu(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`, t, !1, void 0, n);
try {
@ -6095,7 +6095,7 @@
} catch (s) {
throw bu(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, t, !1, void 0, n);
}
})(t243, e138) : e138 instanceof Ja ? e138._internalPath : e138._delegate._internalPath;
})(t246, e138) : e138 instanceof Ja ? e138._internalPath : e138._delegate._internalPath;
}
class Du {
constructor(t, e){
@ -6153,25 +6153,25 @@
t.call(e, new Nu(this._firestore, this._userDataWriter, n.key, n, new Du(this._snapshot.mutatedKeys.has(n.key), this._snapshot.fromCache), this.query.converter));
});
}
docChanges(t244 = {}) {
const e139 = !!t244.includeMetadataChanges;
docChanges(t247 = {}) {
const e139 = !!t247.includeMetadataChanges;
if (e139 && this._snapshot.excludesMetadataChanges) throw new j(K.INVALID_ARGUMENT, "To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");
return this._cachedChanges && this._cachedChangesIncludeMetadataChanges === e139 || (this._cachedChanges = (function(t245, e140) {
if (t245._snapshot.oldDocs.isEmpty()) {
return this._cachedChanges && this._cachedChangesIncludeMetadataChanges === e139 || (this._cachedChanges = (function(t248, e140) {
if (t248._snapshot.oldDocs.isEmpty()) {
let e = 0;
return t245._snapshot.docChanges.map((n)=>({
return t248._snapshot.docChanges.map((n)=>({
type: "added",
doc: new Nu(t245._firestore, t245._userDataWriter, n.doc.key, n.doc, new Du(t245._snapshot.mutatedKeys.has(n.doc.key), t245._snapshot.fromCache), t245.query.converter),
doc: new Nu(t248._firestore, t248._userDataWriter, n.doc.key, n.doc, new Du(t248._snapshot.mutatedKeys.has(n.doc.key), t248._snapshot.fromCache), t248.query.converter),
oldIndex: -1,
newIndex: e++
})
);
}
{
let n = t245._snapshot.oldDocs;
return t245._snapshot.docChanges.filter((t)=>e140 || 3 !== t.type
let n = t248._snapshot.oldDocs;
return t248._snapshot.docChanges.filter((t)=>e140 || 3 !== t.type
).map((e)=>{
const s = new Nu(t245._firestore, t245._userDataWriter, e.doc.key, e.doc, new Du(t245._snapshot.mutatedKeys.has(e.doc.key), t245._snapshot.fromCache), t245.query.converter);
const s = new Nu(t248._firestore, t248._userDataWriter, e.doc.key, e.doc, new Du(t248._snapshot.mutatedKeys.has(e.doc.key), t248._snapshot.fromCache), t248.query.converter);
let i = -1, r = -1;
return 0 !== e.type && (i = n.indexOf(e.doc.key), n = n.delete(e.doc.key)), 1 !== e.type && (r = (n = n.add(e.doc)).indexOf(e.doc.key)), {
type: ku(e.type),
@ -6235,8 +6235,8 @@
convertGeoPoint(t) {
return new tu(yt(t.latitude), yt(t.longitude));
}
convertArray(t246, e) {
return (t246.values || []).map((t)=>this.convertValue(t, e)
convertArray(t249, e) {
return (t249.values || []).map((t)=>this.convertValue(t, e)
);
}
convertServerTimestamp(t, e) {
@ -6273,32 +6273,32 @@
return new Ia(this.firestore, null, e);
}
}
function lh(t248) {
var t247;
t248 = ga(t248, Aa);
const e141 = ga(t248.firestore, ka), n51 = ((t247 = e141)._firestoreClient || Ma(t247), t247._firestoreClient.verifyNotTerminated(), t247._firestoreClient), s24 = new ah(e141);
function lh(t251) {
var t250;
t251 = ga(t251, Aa);
const e141 = ga(t251.firestore, ka), n52 = ((t250 = e141)._firestoreClient || Ma(t250), t250._firestoreClient.verifyNotTerminated(), t250._firestoreClient), s24 = new ah(e141);
return (function(t) {
if (me(t) && 0 === t.explicitOrderBy.length) throw new j(K.UNIMPLEMENTED, "limitToLast() queries require specifying at least one orderBy() clause");
})(t248._query), (function(t249, e142, n52 = {}) {
})(t251._query), (function(t252, e142, n53 = {}) {
const s25 = new Q;
return t249.asyncQueue.enqueueAndForget(async ()=>(function(t250, e, n53, s, i) {
return t252.asyncQueue.enqueueAndForget(async ()=>(function(t253, e, n54, s, i) {
const r = new Lc({
next: (n)=>{
e.enqueueAndForget(()=>Uo(t250, o)
e.enqueueAndForget(()=>Uo(t253, o)
), n.fromCache && "server" === s.source ? i.reject(new j(K.UNAVAILABLE, "Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to \"server\" to retrieve the cached documents.)")) : i.resolve(n);
},
error: (t)=>i.reject(t)
}), o = new Qo(n53, r, {
}), o = new Qo(n54, r, {
includeMetadataChanges: !0,
fo: !0
});
return Bo(t250, o);
})(await Xc(t249), t249.asyncQueue, e142, n52, s25)
return Bo(t253, o);
})(await Xc(t252), t252.asyncQueue, e142, n53, s25)
), s25.promise;
})(n51, t248._query).then((n)=>new xu(e141, s24, t248, n)
})(n52, t251._query).then((n)=>new xu(e141, s24, t251, n)
);
}
!function(t251, e = !0) {
!function(t254, e = !0) {
C = _firebase_app__WEBPACK_IMPORTED_MODULE_0__.Jn, (0, _firebase_app__WEBPACK_IMPORTED_MODULE_0__.Xd)(new _firebase_component__WEBPACK_IMPORTED_MODULE_1__.wA("firestore", (t, { options: n })=>{
const s = t.getProvider("app").getImmediate(), i = new ka(s, new H(t.getProvider("auth-internal")));
return n = Object.assign({

View File

@ -751,7 +751,7 @@
} else config._isValid = !1;
}
function configFromRFC2822(config) {
var year, weekdayStr, parsedInput, config1, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr, result, parsedArray, match = rfc2822.exec((config._i, config._i.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "")));
var year, weekdayStr, parsedInput, config1, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr, result, parsedArray, match = rfc2822.exec(config._i.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""));
if (match) {
if (yearStr = match[4], monthStr = match[3], dayStr = match[2], hourStr = match[5], minuteStr = match[6], secondStr = match[7], result = [
(year = parseInt(yearStr, 10)) <= 49 ? 2000 + year : year <= 999 ? 1900 + year : year,

View File

@ -532,8 +532,8 @@
this.element.html($(this.defaultHtml).html());
},
show: function(theme, msgText, textonly) {
var message, loadSettings;
this.resetHtml(), "object" === $.type(theme) ? theme = (loadSettings = $.extend({}, this.options, theme)).theme : (loadSettings = this.options, theme = theme || loadSettings.theme), message = msgText || (!1 === loadSettings.text ? "" : loadSettings.text), $html.addClass("ui-loading"), loadSettings.textVisible, this.element.attr("class", loaderClass + " ui-corner-all ui-body-" + theme + " ui-loader-" + (loadSettings.textVisible || msgText || theme.text ? "verbose" : "default") + (loadSettings.textonly || textonly ? " ui-loader-textonly" : "")), loadSettings.html ? this.element.html(loadSettings.html) : this.element.find("h1").text(message), this.element.appendTo($.mobile.pageContainer), this.checkLoaderPosition(), this.window.bind("scroll", $.proxy(this.checkLoaderPosition, this));
var textVisible, message, loadSettings;
this.resetHtml(), "object" === $.type(theme) ? theme = (loadSettings = $.extend({}, this.options, theme)).theme : (loadSettings = this.options, theme = theme || loadSettings.theme), message = msgText || (!1 === loadSettings.text ? "" : loadSettings.text), $html.addClass("ui-loading"), textVisible = loadSettings.textVisible, this.element.attr("class", loaderClass + " ui-corner-all ui-body-" + theme + " ui-loader-" + (textVisible || msgText || theme.text ? "verbose" : "default") + (loadSettings.textonly || textonly ? " ui-loader-textonly" : "")), loadSettings.html ? this.element.html(loadSettings.html) : this.element.find("h1").text(message), this.element.appendTo($.mobile.pageContainer), this.checkLoaderPosition(), this.window.bind("scroll", $.proxy(this.checkLoaderPosition, this));
},
hide: function() {
$html.removeClass("ui-loading"), this.options.text && this.element.removeClass("ui-loader-fakefix"), $.mobile.window.unbind("scroll", this.fakeFixLoader), $.mobile.window.unbind("scroll", this.checkLoaderPosition);
@ -601,7 +601,7 @@
var v, uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1), props = (prop + " " + vendors.join(uc_prop + " ") + uc_prop).split(" ");
for(v in props)if (undefined !== fbCSS[props[v]]) return !0;
}
var nokiaLTE7_3, w1, ua, platform, wkmatch, wkversion, ffmatch, ffversion, operammobilematch, omversion, link, fauxBase, base, supports, element, documentElement, getComputedStyle, ua1, fakeBody = $("<body>").prependTo("html"), fbCSS = fakeBody[0].style, vendors = [
var nokiaLTE7_3, w1, ua, platform, wkmatch, wkversion, ffmatch, ffversion, operammobilematch, omversion, rebase, fauxBase, base, supports, element, documentElement, getComputedStyle, ua1, fakeBody = $("<body>").prependTo("html"), fbCSS = fakeBody[0].style, vendors = [
"Webkit",
"Moz",
"O"
@ -632,7 +632,7 @@
scrollTop: ("pageXOffset" in window1 || "scrollTop" in document1.documentElement || "scrollTop" in fakeBody[0]) && !("palmGetResource" in window1) && !operamini,
dynamicBaseTag: (fauxBase = location.protocol + "//" + location.host + location.pathname + "ui-dir/", (base = $("head base")).length ? base.attr("href") : base = $("<base>", {
href: fauxBase
}).appendTo("head"), (link = $("<a href='testurl' />").prependTo(fakeBody))[0].href, base[0].href = location.pathname, 0 === link[0].href.indexOf(fauxBase)),
}).appendTo("head"), rebase = $("<a href='testurl' />").prependTo(fakeBody)[0].href, base[0].href = location.pathname, 0 === rebase.indexOf(fauxBase)),
cssPointerEvents: (element = document1.createElement("x"), documentElement = document1.documentElement, getComputedStyle = window1.getComputedStyle, "pointerEvents" in element.style && (element.style.pointerEvents = "auto", element.style.pointerEvents = "x", documentElement.appendChild(element), supports = getComputedStyle && "auto" === getComputedStyle(element, "").pointerEvents, documentElement.removeChild(element), !!supports)),
boundingRect: void 0 !== document1.createElement("div").getBoundingClientRect,
inlineSVG: function() {
@ -2957,12 +2957,12 @@
this._prepareHeightUpdate(this.options.keyupTimeoutBuffer);
},
_updateHeight: function() {
var paddingTop, paddingBottom, paddingHeight, borderTop, borderBottom, borderHeight, height, scrollTop = this.window.scrollTop();
var paddingTop, paddingBottom, paddingHeight, scrollHeight, clientHeight, borderTop, borderBottom, borderHeight, height, scrollTop = this.window.scrollTop();
this.keyupTimeout = 0, "onpage" in this.element[0] || this.element.css({
height: 0,
"min-height": 0,
"max-height": 0
}), this.element[0].scrollHeight, this.element[0].clientHeight, borderTop = parseFloat(this.element.css("border-top-width")), borderBottom = parseFloat(this.element.css("border-bottom-width")), borderHeight = borderTop + borderBottom, height = this.element[0].scrollHeight + borderHeight + 15, 0 === this.element[0].clientHeight && (paddingTop = parseFloat(this.element.css("padding-top")), paddingBottom = parseFloat(this.element.css("padding-bottom")), paddingHeight = paddingTop + paddingBottom, height += paddingHeight), this.element.css({
}), scrollHeight = this.element[0].scrollHeight, clientHeight = this.element[0].clientHeight, borderTop = parseFloat(this.element.css("border-top-width")), borderBottom = parseFloat(this.element.css("border-bottom-width")), borderHeight = borderTop + borderBottom, height = scrollHeight + borderHeight + 15, 0 === clientHeight && (paddingTop = parseFloat(this.element.css("padding-top")), paddingBottom = parseFloat(this.element.css("padding-bottom")), paddingHeight = paddingTop + paddingBottom, height += paddingHeight), this.element.css({
height: height,
"min-height": "",
"max-height": ""

View File

@ -5,7 +5,7 @@
], factory) : factory((global = global || self).ReactDOM = {}, global.React);
}(this, function(exports, React) {
"use strict";
var devToolsConfig, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd, prefix1, componentFrameCache, didWarnValueDefaultValue$1, reusableSVGContainer, attemptUserBlockingHydration, attemptContinuousHydration, attemptHydrationAtCurrentPriority, attemptHydrationAtPriority, lastMovementX, lastMovementY, lastMouseEvent, warnedUnknownTags, suppressHydrationWarning, validatePropertiesInDevelopment, warnForTextDifference, warnForPropDifference, warnForExtraAttributes, warnForInvalidEventListener, canDiffStyleForHydrationWarning, normalizeMarkupForTextOrAttribute, normalizeHTML, SUPPRESS_HYDRATION_WARNING$1, fiberStack, warnedAboutMissingGetChildContext, rendererSigil, didWarnUpdateInsideUpdate, currentlyProcessingQueue, didWarnAboutStateAssignmentForComponent, didWarnAboutUninitializedState, didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate, didWarnAboutLegacyLifecyclesAndDerivedState, didWarnAboutUndefinedDerivedState, warnOnUndefinedDerivedState, warnOnInvalidCallback, didWarnAboutDirectlyAssigningPropsToState, didWarnAboutContextTypeAndContextTypes, didWarnAboutInvalidateContextType, didWarnAboutMaps, didWarnAboutGenerators, didWarnAboutStringRefs, ownerHasKeyUseWarning, ownerHasFunctionTypeWarning, rendererSigil$1, didWarnAboutMismatchedHooksForComponent, didWarnAboutUseOpaqueIdentifier, didWarnAboutBadClass, didWarnAboutModulePatternComponent, didWarnAboutContextTypeOnFunctionComponent, didWarnAboutGetDerivedStateOnFunctionComponent, didWarnAboutFunctionRefs, didWarnAboutReassigningProps, didWarnAboutRevealOrder, didWarnAboutTailOptions, appendAllChildren, updateHostContainer, updateHostComponent$1, updateHostText$1, beginWork$1, didWarnAboutUpdateInRenderForAnotherComponent, hasBadMapPolyfill, didWarnAboutNestedUpdates, didWarnAboutFindNodeInStrictMode, topLevelUpdateWarnings, ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var devToolsConfig, findFiberByHostInstance, ReactCurrentDispatcher, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd, prefix1, componentFrameCache, didWarnValueDefaultValue$1, reusableSVGContainer, attemptUserBlockingHydration, attemptContinuousHydration, attemptHydrationAtCurrentPriority, attemptHydrationAtPriority, lastMovementX, lastMovementY, lastMouseEvent, warnedUnknownTags, suppressHydrationWarning, validatePropertiesInDevelopment, warnForTextDifference, warnForPropDifference, warnForExtraAttributes, warnForInvalidEventListener, canDiffStyleForHydrationWarning, normalizeMarkupForTextOrAttribute, normalizeHTML, SUPPRESS_HYDRATION_WARNING$1, fiberStack, warnedAboutMissingGetChildContext, rendererSigil, didWarnUpdateInsideUpdate, currentlyProcessingQueue, didWarnAboutStateAssignmentForComponent, didWarnAboutUninitializedState, didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate, didWarnAboutLegacyLifecyclesAndDerivedState, didWarnAboutUndefinedDerivedState, warnOnUndefinedDerivedState, warnOnInvalidCallback, didWarnAboutDirectlyAssigningPropsToState, didWarnAboutContextTypeAndContextTypes, didWarnAboutInvalidateContextType, didWarnAboutMaps, didWarnAboutGenerators, didWarnAboutStringRefs, ownerHasKeyUseWarning, ownerHasFunctionTypeWarning, rendererSigil$1, didWarnAboutMismatchedHooksForComponent, didWarnAboutUseOpaqueIdentifier, didWarnAboutBadClass, didWarnAboutModulePatternComponent, didWarnAboutContextTypeOnFunctionComponent, didWarnAboutGetDerivedStateOnFunctionComponent, didWarnAboutFunctionRefs, didWarnAboutReassigningProps, didWarnAboutRevealOrder, didWarnAboutTailOptions, appendAllChildren, updateHostContainer, updateHostComponent$1, updateHostText$1, beginWork$1, didWarnAboutUpdateInRenderForAnotherComponent, hasBadMapPolyfill, didWarnAboutNestedUpdates, didWarnAboutFindNodeInStrictMode, topLevelUpdateWarnings, ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function warn(format) {
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)args[_key - 1] = arguments[_key];
printWarning("warn", format, args);
@ -406,7 +406,7 @@
disabledDepth < 0 && error1("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
disabledLog.__reactDisabledLog = !0;
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
var ReactCurrentDispatcher1 = ReactSharedInternals.ReactCurrentDispatcher;
function describeBuiltInComponentFrame(name, source, ownerFn) {
if (void 0 === prefix1) try {
throw Error();
@ -423,7 +423,7 @@
if (void 0 !== frame) return frame;
reentry = !0;
var previousPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0, previousDispatcher = ReactCurrentDispatcher.current, ReactCurrentDispatcher.current = null, disableLogs();
Error.prepareStackTrace = void 0, previousDispatcher = ReactCurrentDispatcher1.current, ReactCurrentDispatcher1.current = null, disableLogs();
try {
if (construct) {
var Fake = function() {
@ -469,7 +469,7 @@
}
}
} finally{
reentry = !1, ReactCurrentDispatcher.current = previousDispatcher, reenableLogs(), Error.prepareStackTrace = previousPrepareStackTrace;
reentry = !1, ReactCurrentDispatcher1.current = previousDispatcher, reenableLogs(), Error.prepareStackTrace = previousPrepareStackTrace;
}
var name = fn ? fn.displayName || fn.name : "", syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
return "function" == typeof fn && componentFrameCache.set(fn, syntheticFrame), syntheticFrame;
@ -736,9 +736,9 @@
}), null == props.selected || didWarnSelectedSetOnOption || (error1("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."), didWarnSelectedSetOnOption = !0);
}
function getHostProps$1(element, props) {
var content, hostProps = _assign({
var children, content, hostProps = _assign({
children: void 0
}, props), content1 = (props.children, content = "", React.Children.forEach(props.children, function(child) {
}, props), content1 = (children = props.children, content = "", React.Children.forEach(children, function(child) {
null != child && (content += child);
}), content);
return content1 && (hostProps.children = content1), hostProps;
@ -7122,7 +7122,7 @@
return updatePayload;
})(instance, type9, props7, hostContext2.namespace), fiber.updateQueue = updatePayload1, null !== updatePayload1 && markUpdate(workInProgress);
else {
var type8, props9, rootContainerInstance1, hostContext, internalInstanceHandle, hostContextDev, domElement1, fiber, hostContext1, instance, type9, props7, hostContext2, internalInstanceHandle1, updatePayload1, type10, props8, instance7 = (type8 = type11, props9 = newProps, rootContainerInstance1 = rootContainerInstance, hostContext = currentHostContext, internalInstanceHandle = workInProgress, validateDOMNesting(type8, null, (hostContextDev = hostContext).ancestorInfo), ("string" == typeof props9.children || "number" == typeof props9.children) && validateDOMNesting(null, "" + props9.children, updatedAncestorInfo(hostContextDev.ancestorInfo, type8)), hostContextDev.namespace, precacheFiberNode(internalInstanceHandle, domElement1 = function(type, props, rootContainerElement, parentNamespace) {
var type8, props9, rootContainerInstance1, hostContext, internalInstanceHandle, hostContextDev, domElement1, fiber, hostContext1, instance, type9, props7, hostContext2, internalInstanceHandle1, updatePayload1, type10, props8, instance7 = (type8 = type11, props9 = newProps, rootContainerInstance1 = rootContainerInstance, hostContext = currentHostContext, internalInstanceHandle = workInProgress, validateDOMNesting(type8, null, (hostContextDev = hostContext).ancestorInfo), ("string" == typeof props9.children || "number" == typeof props9.children) && validateDOMNesting(null, "" + props9.children, updatedAncestorInfo(hostContextDev.ancestorInfo, type8)), precacheFiberNode(internalInstanceHandle, domElement1 = function(type, props, rootContainerElement, parentNamespace) {
var isCustomComponentTag, domElement, ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement), namespaceURI = parentNamespace;
if (namespaceURI === HTML_NAMESPACE$1 && (namespaceURI = getIntrinsicNamespace(type)), namespaceURI === HTML_NAMESPACE$1) {
if ((isCustomComponentTag = isCustomComponent(type, props)) || type === type.toLowerCase() || error1("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.", type), "script" === type) {
@ -9129,8 +9129,9 @@
return fiber.elementType = type, fiber.type = resolvedType, fiber.lanes = lanes, fiber._debugOwner = owner, fiber;
}
function createFiberFromElement(element, mode, lanes) {
element._owner;
var type = element.type, key = element.key, pendingProps = element.props, fiber = createFiberFromTypeAndProps(type, key, pendingProps, element._owner, mode, lanes);
var owner = null;
owner = element._owner;
var type = element.type, key = element.key, pendingProps = element.props, fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);
return fiber._debugSource = element._source, fiber._debugOwner = element._owner, fiber;
}
function createFiberFromFragment(elements, mode, lanes, key) {
@ -9323,8 +9324,8 @@
function createRootImpl(container, tag, options) {
var hydrate = null != options && !0 === options.hydrate;
null != options && options.hydrationOptions;
var containerInfo, tag2, hydrate1, containerInfo1, tag3, hydrate2, root, tag4, mode, uninitializedFiber, mutableSources = null != options && null != options.hydrationOptions && options.hydrationOptions.mutableSources || null, root7 = (containerInfo = container, tag2 = tag, hydrate1 = hydrate, containerInfo1 = containerInfo, tag3 = tag2, hydrate2 = hydrate1, root = new FiberRootNode(containerInfo1, tag3, hydrate2), mode = 2 === (tag4 = tag3) ? 7 : 1 === tag4 ? 3 : 0, isDevToolsPresent && (mode |= 8), uninitializedFiber = createFiber(3, null, null, mode), root.current = uninitializedFiber, uninitializedFiber.stateNode = root, initializeUpdateQueue(uninitializedFiber), root);
if (root7.current, container[internalContainerInstanceKey] = root7.current, container.nodeType, listenToAllSupportedEvents(8 === container.nodeType ? container.parentNode : container), mutableSources) for(var i = 0; i < mutableSources.length; i++)registerMutableSourceForHydration(root7, mutableSources[i]);
var containerInfo, tag2, hydrate1, containerInfo1, tag3, hydrate2, root, tag4, mode, uninitializedFiber, hostRoot, mutableSources = null != options && null != options.hydrationOptions && options.hydrationOptions.mutableSources || null, root7 = (containerInfo = container, tag2 = tag, hydrate1 = hydrate, containerInfo1 = containerInfo, tag3 = tag2, hydrate2 = hydrate1, root = new FiberRootNode(containerInfo1, tag3, hydrate2), mode = 2 === (tag4 = tag3) ? 7 : 1 === tag4 ? 3 : 0, isDevToolsPresent && (mode |= 8), uninitializedFiber = createFiber(3, null, null, mode), root.current = uninitializedFiber, uninitializedFiber.stateNode = root, initializeUpdateQueue(uninitializedFiber), root);
if (hostRoot = root7.current, container[internalContainerInstanceKey] = hostRoot, container.nodeType, listenToAllSupportedEvents(8 === container.nodeType ? container.parentNode : container), mutableSources) for(var i = 0; i < mutableSources.length; i++)registerMutableSourceForHydration(root7, mutableSources[i]);
return root7;
}
function isValidContainer(node) {
@ -9516,12 +9517,12 @@
} finally{
0 === (executionContext = prevExecutionContext) && (resetRenderTimer(), flushSyncCallbackQueue());
}
}), (devToolsConfig = {
}), findFiberByHostInstance = (devToolsConfig = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: ReactVersion,
rendererPackageName: "react-dom"
}).findFiberByHostInstance, ReactSharedInternals.ReactCurrentDispatcher, !function(internals) {
}).findFiberByHostInstance, ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, !function(internals) {
if ("undefined" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled) return !0;
@ -9545,12 +9546,12 @@
overridePropsRenamePath: overridePropsRenamePath,
setSuspenseHandler: setSuspenseHandler,
scheduleUpdate: scheduleUpdate,
currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
currentDispatcherRef: ReactCurrentDispatcher,
findHostInstanceByFiber: function(fiber) {
var hostFiber = findCurrentHostFiber(fiber);
return null === hostFiber ? null : hostFiber.stateNode;
},
findFiberByHostInstance: devToolsConfig.findFiberByHostInstance || function(instance) {
findFiberByHostInstance: findFiberByHostInstance || function(instance) {
return null;
},
findHostInstancesForRefresh: function(root, families) {

View File

@ -1,3 +1,4 @@
function f() {
(0, f.g)();
var a;
a = f.g, a();
}