mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
feat(es/minifier): Implement more rules (#2039)
swc_ecma_minifier: - Remove useless `0` in sequence expressions. - `analyzer`: Don't treat fn decl as fn expr. - `sequences`: Use sequence expressions in front of `b`. - `if_return`: Drop else token within same pass. (#2044) - Fix counting logic for `pass`. (#2044) - `analyzer`: Fix `ref_count`. - `hygiene`: Implement `visit_prop_name`. - `ignore_return_value`: Property access to function parameters may have side effects. - `inline`: Treat `!0` as literal. - Remove some dead codes if `unused` is enabled. swc_ecma_utils: - Fix `may_have_side_effects`.
This commit is contained in:
parent
2151366b93
commit
71080dbd26
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -2409,7 +2409,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_minifier"
|
||||
version = "0.19.0"
|
||||
version = "0.19.1"
|
||||
dependencies = [
|
||||
"ansi_term 0.12.1",
|
||||
"anyhow",
|
||||
@ -2723,7 +2723,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_utils"
|
||||
version = "0.41.0"
|
||||
version = "0.41.1"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"scoped-tls",
|
||||
|
@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"]
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_ecma_minifier"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.19.0"
|
||||
version = "0.19.1"
|
||||
|
||||
[features]
|
||||
debug = []
|
||||
|
@ -289,7 +289,9 @@ impl UsageAnalyzer {
|
||||
|
||||
e.inline_prevented |= self.ctx.inline_prevented;
|
||||
|
||||
e.ref_count += 1;
|
||||
if is_first {
|
||||
e.ref_count += 1;
|
||||
}
|
||||
e.reassigned |= is_first && is_modify && self.ctx.is_exact_reassignment;
|
||||
// Passing object as a argument is possibly modification.
|
||||
e.mutated |= is_modify || (self.ctx.in_call_arg && self.ctx.is_exact_arg);
|
||||
@ -319,7 +321,7 @@ impl UsageAnalyzer {
|
||||
i: &Ident,
|
||||
has_init: bool,
|
||||
kind: Option<VarDeclKind>,
|
||||
is_fn_decl: bool,
|
||||
_is_fn_decl: bool,
|
||||
) -> &mut VarUsageInfo {
|
||||
// log::trace!("declare_decl({}{:?})", i.sym, i.span.ctxt);
|
||||
|
||||
@ -362,8 +364,6 @@ impl UsageAnalyzer {
|
||||
}
|
||||
v.declared_as_catch_param |= self.ctx.in_catch_param;
|
||||
|
||||
v.declared_as_fn_expr |= is_fn_decl;
|
||||
|
||||
v
|
||||
}
|
||||
}
|
||||
|
@ -202,6 +202,7 @@ impl Compressor<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
self.pass = 0;
|
||||
// let last_mark = n.remove_mark();
|
||||
// assert!(
|
||||
// N::is_module() || last_mark == self.marks.standalone,
|
||||
|
@ -1,5 +1,6 @@
|
||||
use super::Optimizer;
|
||||
use crate::compress::optimize::Ctx;
|
||||
use crate::compress::util::always_terminates;
|
||||
use crate::compress::util::negate_cost;
|
||||
use crate::util::SpanExt;
|
||||
use crate::DISABLE_BUGGY_PASSES;
|
||||
@ -783,15 +784,3 @@ fn is_simple_lhs(l: &PatOrExpr) -> bool {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn always_terminates(s: &Stmt) -> bool {
|
||||
match s {
|
||||
Stmt::Return(..) | Stmt::Throw(..) | Stmt::Break(..) | Stmt::Continue(..) => true,
|
||||
Stmt::If(IfStmt { cons, alt, .. }) => {
|
||||
always_terminates(&cons) && alt.as_deref().map(always_terminates).unwrap_or(false)
|
||||
}
|
||||
Stmt::Block(s) => s.stmts.iter().any(always_terminates),
|
||||
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +88,14 @@ impl Optimizer<'_> {
|
||||
if !usage.is_fn_local {
|
||||
match &**init {
|
||||
Expr::Lit(..) => {}
|
||||
|
||||
Expr::Unary(UnaryExpr {
|
||||
op: op!("!"), arg, ..
|
||||
}) if match &**arg {
|
||||
Expr::Lit(..) => true,
|
||||
_ => false,
|
||||
} => {}
|
||||
|
||||
Expr::Fn(FnExpr {
|
||||
function:
|
||||
Function {
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::analyzer::ProgramData;
|
||||
use crate::analyzer::UsageAnalyzer;
|
||||
use crate::compress::util::is_pure_undefined;
|
||||
use crate::debug::dump;
|
||||
use crate::marks::Marks;
|
||||
use crate::option::CompressOptions;
|
||||
use crate::util::contains_leaping_yield;
|
||||
@ -873,7 +874,7 @@ impl Optimizer<'_> {
|
||||
.as_ref()
|
||||
.and_then(|data| data.vars.get(&obj.to_id()))
|
||||
{
|
||||
if usage.var_kind.is_none() {
|
||||
if !usage.declared_as_fn_param && usage.var_kind.is_none() {
|
||||
return None;
|
||||
}
|
||||
|
||||
@ -1912,6 +1913,7 @@ impl VisitMut for Optimizer<'_> {
|
||||
|
||||
if let Some(body) = &mut n.body {
|
||||
self.merge_if_returns(&mut body.stmts);
|
||||
self.drop_else_token(&mut body.stmts);
|
||||
}
|
||||
|
||||
{
|
||||
@ -2079,6 +2081,15 @@ impl VisitMut for Optimizer<'_> {
|
||||
self.shift_assignment(n);
|
||||
|
||||
{
|
||||
let should_preserve_zero = match n.exprs.last().map(|v| &**v) {
|
||||
Some(Expr::Member(..)) => true,
|
||||
Some(Expr::Ident(Ident {
|
||||
sym: js_word!("eval"),
|
||||
..
|
||||
})) => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
let exprs = n
|
||||
.exprs
|
||||
.iter_mut()
|
||||
@ -2090,8 +2101,11 @@ impl VisitMut for Optimizer<'_> {
|
||||
_ => false,
|
||||
};
|
||||
|
||||
let can_remove =
|
||||
!last && (idx != 0 || !is_injected_zero || !self.ctx.is_this_aware_callee);
|
||||
let can_remove = !last
|
||||
&& (idx != 0
|
||||
|| !is_injected_zero
|
||||
|| !self.ctx.is_this_aware_callee
|
||||
|| !should_preserve_zero);
|
||||
|
||||
if can_remove {
|
||||
// If negate_iife is true, it's already handled by
|
||||
@ -2157,7 +2171,10 @@ impl VisitMut for Optimizer<'_> {
|
||||
|
||||
if can_be_removed {
|
||||
self.changed = true;
|
||||
log::debug!("Dropping an expression without side effect");
|
||||
log::debug!("unused: Dropping an expression without side effect");
|
||||
if cfg!(feature = "debug") {
|
||||
log::trace!("unused: [Change] Dropping \n{}\n", dump(&*expr));
|
||||
}
|
||||
*s = Stmt::Empty(EmptyStmt { span: DUMMY_SP });
|
||||
return;
|
||||
}
|
||||
|
@ -819,6 +819,27 @@ impl Optimizer<'_> {
|
||||
|
||||
/// Returns true if something is modified.
|
||||
fn merge_sequential_expr(&mut self, a: &mut Mergable, b: &mut Expr) -> bool {
|
||||
match a {
|
||||
Mergable::Var(..) => {}
|
||||
Mergable::Expr(a) => match a {
|
||||
Expr::Seq(a) => {
|
||||
//
|
||||
for a in a.exprs.iter_mut().rev() {
|
||||
if self.merge_sequential_expr(&mut Mergable::Expr(a), b) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if !self.is_skippable_for_seq(&a) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
}
|
||||
|
||||
match b {
|
||||
Expr::Update(..) => return false,
|
||||
|
||||
@ -1153,7 +1174,6 @@ impl Optimizer<'_> {
|
||||
Some(v) => v,
|
||||
None => {
|
||||
log::trace!("[X] sequences: Aborting because lhs is not an id");
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@ -1164,6 +1184,11 @@ impl Optimizer<'_> {
|
||||
.and_then(|data| data.vars.get(&left_id.to_id()))
|
||||
{
|
||||
if usage.declared_as_fn_expr {
|
||||
log::trace!(
|
||||
"sequences: [X] Declared as fn expr ({}, {:?})",
|
||||
left_id.sym,
|
||||
left_id.span.ctxt
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
use super::Pure;
|
||||
use crate::compress::util::always_terminates;
|
||||
use swc_atoms::js_word;
|
||||
use swc_common::DUMMY_SP;
|
||||
use swc_ecma_ast::*;
|
||||
use swc_ecma_transforms_base::ext::MapWithMut;
|
||||
use swc_ecma_utils::StmtLike;
|
||||
use swc_ecma_utils::{ExprExt, StmtLike, Value};
|
||||
|
||||
/// Methods related to option `dead_code`.
|
||||
impl Pure<'_> {
|
||||
@ -82,4 +84,102 @@ impl Pure<'_> {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn remove_dead_branch<T>(&mut self, stmts: &mut Vec<T>)
|
||||
where
|
||||
T: StmtLike,
|
||||
{
|
||||
if !self.options.unused {
|
||||
return;
|
||||
}
|
||||
|
||||
if !stmts.iter().any(|stmt| match stmt.as_stmt() {
|
||||
Some(Stmt::If(s)) => s.test.as_bool().1.is_known(),
|
||||
_ => false,
|
||||
}) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.changed = true;
|
||||
log::debug!("dead_code: Removing dead codes");
|
||||
|
||||
let mut new = vec![];
|
||||
|
||||
for stmt in stmts.take() {
|
||||
match stmt.try_into_stmt() {
|
||||
Ok(stmt) => match stmt {
|
||||
Stmt::If(mut s) => {
|
||||
if let Value::Known(v) = s.test.as_bool().1 {
|
||||
new.push(T::from_stmt(Stmt::Expr(ExprStmt {
|
||||
span: DUMMY_SP,
|
||||
expr: s.test.take(),
|
||||
})));
|
||||
|
||||
if v {
|
||||
new.push(T::from_stmt(*s.cons.take()));
|
||||
} else {
|
||||
if let Some(alt) = s.alt.take() {
|
||||
new.push(T::from_stmt(*alt));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
new.push(T::from_stmt(Stmt::If(s)))
|
||||
}
|
||||
}
|
||||
_ => new.push(T::from_stmt(stmt)),
|
||||
},
|
||||
Err(stmt) => new.push(stmt),
|
||||
}
|
||||
}
|
||||
|
||||
*stmts = new;
|
||||
}
|
||||
|
||||
pub(super) fn remove_unreachable_stmts<T>(&mut self, stmts: &mut Vec<T>)
|
||||
where
|
||||
T: StmtLike,
|
||||
{
|
||||
if !self.options.side_effects {
|
||||
return;
|
||||
}
|
||||
|
||||
let mut last = None;
|
||||
let mut terminated = false;
|
||||
for (idx, stmt) in stmts.iter().enumerate() {
|
||||
match stmt.as_stmt() {
|
||||
Some(stmt) if always_terminates(&stmt) => {
|
||||
terminated = true;
|
||||
}
|
||||
_ => {
|
||||
if terminated {
|
||||
last = Some(idx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(last) = last {
|
||||
if stmts[last..].iter().all(|stmt| match stmt.as_stmt() {
|
||||
Some(Stmt::Decl(..)) | None => true,
|
||||
_ => false,
|
||||
}) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.changed = true;
|
||||
log::debug!("dead_code: Removing unreachable statements");
|
||||
|
||||
let extras = stmts.drain(last..).collect::<Vec<_>>();
|
||||
|
||||
for extra in extras {
|
||||
match extra.as_stmt() {
|
||||
Some(Stmt::Decl(..)) | None => {
|
||||
stmts.push(extra);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,10 @@ impl Pure<'_> {
|
||||
+ VisitMutWith<self::vars::VarPrepender>
|
||||
+ VisitMutWith<self::vars::VarMover>,
|
||||
{
|
||||
self.remove_dead_branch(stmts);
|
||||
|
||||
self.remove_unreachable_stmts(stmts);
|
||||
|
||||
self.drop_useless_blocks(stmts);
|
||||
|
||||
self.collapse_vars_without_init(stmts);
|
||||
|
@ -529,6 +529,18 @@ pub(crate) fn eval_as_number(e: &Expr) -> Option<f64> {
|
||||
None
|
||||
}
|
||||
|
||||
pub(crate) fn always_terminates(s: &Stmt) -> bool {
|
||||
match s {
|
||||
Stmt::Return(..) | Stmt::Throw(..) | Stmt::Break(..) | Stmt::Continue(..) => true,
|
||||
Stmt::If(IfStmt { cons, alt, .. }) => {
|
||||
always_terminates(&cons) && alt.as_deref().map(always_terminates).unwrap_or(false)
|
||||
}
|
||||
Stmt::Block(s) => s.stmts.iter().any(always_terminates),
|
||||
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::negate_cost;
|
||||
|
@ -130,4 +130,13 @@ impl Visit for HygieneAnalyzer<'_> {
|
||||
n.prop.visit_with(n, self);
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_prop_name(&mut self, n: &PropName, _: &dyn Node) {
|
||||
match n {
|
||||
PropName::Computed(..) => {
|
||||
n.visit_children_with(self);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,87 @@
|
||||
function createCommonjsModule(fn) {
|
||||
return fn();
|
||||
}
|
||||
const isFile = config => true;
|
||||
const pkgBrowserslist = {};
|
||||
const config = {};
|
||||
createCommonjsModule(function (module, exports) {
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
createCommonjsModule(function (module) {
|
||||
module.exports = {
|
||||
findConfig: function findConfig(from) {
|
||||
var resolved = function (dir) {
|
||||
if (2) {
|
||||
throw new Error('');
|
||||
} else if (pkgBrowserslist) {
|
||||
throw new Error('');
|
||||
} else if (1) {
|
||||
throw new Error('');
|
||||
} else if (true) {
|
||||
return module.exports.findConfig(null);
|
||||
} else if (true) {
|
||||
return module.exports.findConfig(null);
|
||||
}
|
||||
};
|
||||
return resolved;
|
||||
}
|
||||
};
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
_interopRequireDefault();
|
||||
|
||||
var _node = _interopRequireDefault();
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = null;
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
});
|
||||
var namespace$1 = createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
exports.default = String;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
var Pseudo = null;
|
||||
|
||||
exports.default = String;
|
||||
});
|
||||
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
@ -0,0 +1,51 @@
|
||||
function createCommonjsModule(fn) {
|
||||
return fn();
|
||||
}
|
||||
const isFile = (config)=>!0
|
||||
, pkgBrowserslist = {
|
||||
}, config = {
|
||||
};
|
||||
createCommonjsModule(function(module, exports) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
}), createCommonjsModule(function(module) {
|
||||
module.exports = {
|
||||
findConfig: function(from) {
|
||||
return function(dir) {
|
||||
throw new Error("");
|
||||
};
|
||||
}
|
||||
};
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
_interopRequireDefault(), _interopRequireDefault();
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = null, module.exports = exports.default;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0;
|
||||
});
|
||||
var namespace$1 = createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, module.exports = exports.default;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, exports.default = String;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, exports.default = String;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
});
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"defaults": true,
|
||||
"passes": 1
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
function createCommonjsModule(fn) {
|
||||
return fn();
|
||||
}
|
||||
const isFile = config => true;
|
||||
const pkgBrowserslist = {};
|
||||
const config = {};
|
||||
createCommonjsModule(function (module, exports) {
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
createCommonjsModule(function (module) {
|
||||
module.exports = {
|
||||
findConfig: function findConfig(from) {
|
||||
var resolved = function (dir) {
|
||||
if (2) {
|
||||
throw new Error('');
|
||||
} else if (pkgBrowserslist) {
|
||||
throw new Error('');
|
||||
} else if (1) {
|
||||
throw new Error('');
|
||||
} else if (true) {
|
||||
return module.exports.findConfig(null);
|
||||
} else if (true) {
|
||||
return module.exports.findConfig(null);
|
||||
}
|
||||
};
|
||||
return resolved;
|
||||
}
|
||||
};
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
_interopRequireDefault();
|
||||
|
||||
var _node = _interopRequireDefault();
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = null;
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
});
|
||||
var namespace$1 = createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
exports.default = String;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
var Pseudo = null;
|
||||
|
||||
exports.default = String;
|
||||
});
|
||||
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
@ -0,0 +1,51 @@
|
||||
function createCommonjsModule(fn) {
|
||||
return fn();
|
||||
}
|
||||
const isFile = (config)=>!0
|
||||
, pkgBrowserslist = {
|
||||
}, config = {
|
||||
};
|
||||
createCommonjsModule(function(module, exports) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
}), createCommonjsModule(function(module) {
|
||||
module.exports = {
|
||||
findConfig: function(from) {
|
||||
return function(dir) {
|
||||
throw new Error("");
|
||||
};
|
||||
}
|
||||
};
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
_interopRequireDefault(), _interopRequireDefault();
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = null, module.exports = exports.default;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0;
|
||||
});
|
||||
var namespace$1 = createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, module.exports = exports.default;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, exports.default = String;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, exports.default = String;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
});
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"defaults": true,
|
||||
"passes": 10
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
function createCommonjsModule(fn) {
|
||||
return fn();
|
||||
}
|
||||
const isFile = config => true;
|
||||
const pkgBrowserslist = {};
|
||||
const config = {};
|
||||
createCommonjsModule(function (module, exports) {
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
createCommonjsModule(function (module) {
|
||||
module.exports = {
|
||||
findConfig: function findConfig(from) {
|
||||
var resolved = function (dir) {
|
||||
if (2) {
|
||||
throw new Error('');
|
||||
} else if (pkgBrowserslist) {
|
||||
throw new Error('');
|
||||
} else if (1) {
|
||||
throw new Error('');
|
||||
} else if (true) {
|
||||
return module.exports.findConfig(null);
|
||||
} else if (true) {
|
||||
return module.exports.findConfig(null);
|
||||
}
|
||||
};
|
||||
return resolved;
|
||||
}
|
||||
};
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
_interopRequireDefault();
|
||||
|
||||
var _node = _interopRequireDefault();
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = null;
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
});
|
||||
var namespace$1 = createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
exports.default = String;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.default = void 0;
|
||||
|
||||
var Pseudo = null;
|
||||
|
||||
exports.default = String;
|
||||
});
|
||||
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
||||
createCommonjsModule(function (module, exports) {
|
||||
exports.__esModule = true;
|
||||
});
|
@ -0,0 +1,51 @@
|
||||
function createCommonjsModule(fn) {
|
||||
return fn();
|
||||
}
|
||||
const isFile = (config)=>!0
|
||||
, pkgBrowserslist = {
|
||||
}, config = {
|
||||
};
|
||||
createCommonjsModule(function(module, exports) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
}), createCommonjsModule(function(module) {
|
||||
module.exports = {
|
||||
findConfig: function(from) {
|
||||
return function(dir) {
|
||||
throw new Error("");
|
||||
};
|
||||
}
|
||||
};
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
_interopRequireDefault(), _interopRequireDefault();
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = null, module.exports = exports.default;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0;
|
||||
});
|
||||
var namespace$1 = createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, module.exports = exports.default;
|
||||
});
|
||||
createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, module.exports = exports.default;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, exports.default = String;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.default = void 0, exports.default = String;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
}), createCommonjsModule(function(module, exports) {
|
||||
exports.__esModule = !0;
|
||||
});
|
@ -1,52 +0,0 @@
|
||||
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push(
|
||||
[
|
||||
[820,],
|
||||
{
|
||||
/***/ 4243: /***/ function (
|
||||
__unused_webpack_module,
|
||||
__unused_webpack_exports,
|
||||
__webpack_require__
|
||||
) {
|
||||
(window.__NEXT_P = window.__NEXT_P || []).push(
|
||||
[
|
||||
"/_error",
|
||||
function (
|
||||
) {
|
||||
return __webpack_require__(
|
||||
4956
|
||||
);
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
/***/
|
||||
},
|
||||
},
|
||||
/******/ function (
|
||||
__webpack_require__
|
||||
) {
|
||||
// webpackRuntimeModules
|
||||
/******/ var __webpack_exec__ = function (
|
||||
moduleId
|
||||
) {
|
||||
return __webpack_require__(
|
||||
(__webpack_require__.s = moduleId)
|
||||
);
|
||||
};
|
||||
/******/ __webpack_require__.O(
|
||||
0,
|
||||
[888, 774, 179,],
|
||||
function (
|
||||
) {
|
||||
return __webpack_exec__(
|
||||
4243
|
||||
);
|
||||
}
|
||||
);
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O(
|
||||
);
|
||||
/******/ _N_E = __webpack_exports__;
|
||||
/******/
|
||||
},
|
||||
]
|
||||
);
|
@ -1,20 +0,0 @@
|
||||
(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
|
||||
[
|
||||
820,
|
||||
],
|
||||
{
|
||||
4243: function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
||||
(window.__NEXT_P = window.__NEXT_P || []).push([
|
||||
"/_error", function() {
|
||||
return __webpack_require__(4956);
|
||||
}, ]);
|
||||
}
|
||||
}, function(__webpack_require__) {
|
||||
__webpack_require__.O(0, [
|
||||
888,
|
||||
774,
|
||||
179,
|
||||
], function() {
|
||||
return __webpack_require__(__webpack_require__.s = 4243);
|
||||
}), _N_E = __webpack_require__.O();
|
||||
}, ]);
|
@ -121,7 +121,7 @@
|
||||
function isFile(obj) {
|
||||
return "[object File]" === toString.call(obj);
|
||||
}
|
||||
isNaN(msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1])) && (msie = int((/trident\/.*; rv:(\d+)/.exec(lowercase(navigator.userAgent)) || [])[1])), noop.$inject = [], identity.$inject = [];
|
||||
window.angular, isNaN(msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1])) && (msie = int((/trident\/.*; rv:(\d+)/.exec(lowercase(navigator.userAgent)) || [])[1])), noop.$inject = [], identity.$inject = [];
|
||||
var trim = String.prototype.trim ? function(value) {
|
||||
return isString(value) ? value.trim() : value;
|
||||
} : function(value) {
|
||||
@ -832,19 +832,19 @@
|
||||
$provide: {
|
||||
provider: supportObject(provider),
|
||||
factory: supportObject(factory),
|
||||
service: supportObject(function service(name, constructor) {
|
||||
service: supportObject(function(name, constructor) {
|
||||
return factory(name, [
|
||||
"$injector", function($injector) {
|
||||
return $injector.instantiate(constructor);
|
||||
}]);
|
||||
}),
|
||||
value: supportObject(function value(name, val) {
|
||||
value: supportObject(function(name, val) {
|
||||
return factory(name, valueFn(val));
|
||||
}),
|
||||
constant: supportObject(function constant(name, value1) {
|
||||
assertNotHasOwnProperty(name, "constant"), providerCache[name] = value1, instanceCache[name] = value1;
|
||||
constant: supportObject(function(name, value) {
|
||||
assertNotHasOwnProperty(name, "constant"), providerCache[name] = value, instanceCache[name] = value;
|
||||
}),
|
||||
decorator: function decorator(serviceName, decorFn) {
|
||||
decorator: function(serviceName, decorFn) {
|
||||
var origProvider = providerInjector.get(serviceName + "Provider"), orig$get = origProvider.$get;
|
||||
origProvider.$get = function() {
|
||||
var origInstance = instanceInjector.invoke(orig$get, origProvider);
|
||||
@ -1627,7 +1627,7 @@
|
||||
var config = {
|
||||
transformRequest: defaults.transformRequest,
|
||||
transformResponse: defaults.transformResponse
|
||||
}, headers = function mergeHeaders(config) {
|
||||
}, headers = function(config) {
|
||||
var defHeaderName, lowercaseDefHeaderName, reqHeaderName, defHeaders = defaults.headers, reqHeaders = extend({
|
||||
}, config.headers);
|
||||
execHeaders(defHeaders = extend({
|
||||
@ -2695,7 +2695,7 @@
|
||||
if (pending) {
|
||||
var callbacks = pending;
|
||||
pending.length && nextTick(function() {
|
||||
for(var callback, i = 0, ii = callbacks.length; i < ii; i++)callbacks[i][2](progress);
|
||||
for(var i = 0, ii = callbacks.length; i < ii; i++)callbacks[i][2](progress);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -3436,10 +3436,10 @@
|
||||
sss: dateGetter("Milliseconds", 3),
|
||||
EEEE: dateStrGetter("Day"),
|
||||
EEE: dateStrGetter("Day", !0),
|
||||
a: function ampmGetter(date, formats) {
|
||||
a: function(date, formats) {
|
||||
return 12 > date.getHours() ? formats.AMPMS[0] : formats.AMPMS[1];
|
||||
},
|
||||
Z: function timeZoneGetter(date) {
|
||||
Z: function(date) {
|
||||
var zone = -1 * date.getTimezoneOffset(), paddedZone = zone >= 0 ? "+" : "";
|
||||
return paddedZone += padNumber(Math[zone > 0 ? "floor" : "ceil"](zone / 60), 2) + padNumber(Math.abs(zone % 60), 2);
|
||||
}
|
||||
@ -3610,7 +3610,6 @@
|
||||
var formDirectiveFactory = function(isNgForm) {
|
||||
return [
|
||||
"$timeout", function($timeout) {
|
||||
var formDirective;
|
||||
return {
|
||||
name: "form",
|
||||
restrict: isNgForm ? "EAC" : "E",
|
||||
@ -3639,7 +3638,7 @@
|
||||
}];
|
||||
}, formDirective = formDirectiveFactory(), ngFormDirective = formDirectiveFactory(!0), URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/, EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/, NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/, inputType = {
|
||||
text: textInputType,
|
||||
number: function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
number: function(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
if (textInputType(scope, element, attr, ctrl, $sniffer, $browser), ctrl.$parsers.push(function(value) {
|
||||
var empty = ctrl.$isEmpty(value);
|
||||
return empty || NUMBER_REGEXP.test(value) ? (ctrl.$setValidity("number", !0), "" === value ? null : empty ? value : parseFloat(value)) : void ctrl.$setValidity("number", !1);
|
||||
@ -3663,21 +3662,21 @@
|
||||
return ctrl.$isEmpty(value) || isNumber(value) ? (ctrl.$setValidity("number", !0), value) : void ctrl.$setValidity("number", !1);
|
||||
});
|
||||
},
|
||||
url: function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
url: function(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
|
||||
var urlValidator = function(value) {
|
||||
return ctrl.$isEmpty(value) || URL_REGEXP.test(value) ? (ctrl.$setValidity("url", !0), value) : void ctrl.$setValidity("url", !1);
|
||||
};
|
||||
ctrl.$formatters.push(urlValidator), ctrl.$parsers.push(urlValidator);
|
||||
},
|
||||
email: function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
email: function(scope, element, attr, ctrl, $sniffer, $browser) {
|
||||
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
|
||||
var emailValidator = function(value) {
|
||||
return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value) ? (ctrl.$setValidity("email", !0), value) : void ctrl.$setValidity("email", !1);
|
||||
};
|
||||
ctrl.$formatters.push(emailValidator), ctrl.$parsers.push(emailValidator);
|
||||
},
|
||||
radio: function radioInputType(scope, element, attr, ctrl) {
|
||||
radio: function(scope, element, attr, ctrl) {
|
||||
isUndefined(attr.name) && element.attr("name", nextUid()), element.on("click", function() {
|
||||
element[0].checked && scope.$apply(function() {
|
||||
ctrl.$setViewValue(attr.value);
|
||||
@ -3687,7 +3686,7 @@
|
||||
element[0].checked = value == ctrl.$viewValue;
|
||||
}, attr.$observe("value", ctrl.$render);
|
||||
},
|
||||
checkbox: function checkboxInputType(scope, element, attr, ctrl) {
|
||||
checkbox: function(scope, element, attr, ctrl) {
|
||||
var trueValue = attr.ngTrueValue, falseValue = attr.ngFalseValue;
|
||||
isString(trueValue) || (trueValue = !0), isString(falseValue) || (falseValue = !1), element.on("click", function() {
|
||||
scope.$apply(function() {
|
||||
@ -4253,7 +4252,7 @@
|
||||
}],
|
||||
link: function(scope, element, attr, ctrls) {
|
||||
if (ctrls[1]) {
|
||||
for(var scope1, selectElement, ctrl, lastView, scope2, selectElement1, ngModelCtrl, selectCtrl, emptyOption, selectCtrl1 = ctrls[0], ngModelCtrl1 = ctrls[1], multiple = attr.multiple, optionsExp = attr.ngOptions, nullOption = !1, optionTemplate = jqLite(document.createElement("option")), optGroupTemplate = jqLite(document.createElement("optgroup")), unknownOption = optionTemplate.clone(), i = 0, children = element.children(), ii = children.length; i < ii; i++)if ("" === children[i].value) {
|
||||
for(var scope1, selectElement, ctrl, lastView, selectElement1, ngModelCtrl, selectCtrl, emptyOption, selectCtrl1 = ctrls[0], ngModelCtrl1 = ctrls[1], multiple = attr.multiple, optionsExp = attr.ngOptions, nullOption = !1, optionTemplate = jqLite(document.createElement("option")), optGroupTemplate = jqLite(document.createElement("optgroup")), unknownOption = optionTemplate.clone(), i = 0, children = element.children(), ii = children.length; i < ii; i++)if ("" === children[i].value) {
|
||||
emptyOption = nullOption = children.eq(i);
|
||||
break;
|
||||
}
|
||||
@ -4265,9 +4264,9 @@
|
||||
requiredValidator(ngModelCtrl1.$viewValue);
|
||||
});
|
||||
}
|
||||
optionsExp ? (function setupAsOptions(scope3, selectElement2, ctrl1) {
|
||||
optionsExp ? (function(scope2, selectElement2, ctrl1) {
|
||||
if (!(match = optionsExp.match(NG_OPTIONS_REGEXP))) throw ngOptionsMinErr("iexp", "Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}", optionsExp, startingTag(selectElement2));
|
||||
var match, track, displayFn = $parse(match[2] || match[1]), valueName = match[4] || match[6], keyName = match[5], groupByFn = $parse(match[3] || ""), valueFn = $parse(match[2] ? match[1] : valueName), valuesFn = $parse(match[7]), trackFn = match[8] ? $parse(match[8]) : null, optionGroupsCache = [
|
||||
var match, displayFn = $parse(match[2] || match[1]), valueName = match[4] || match[6], keyName = match[5], groupByFn = $parse(match[3] || ""), valueFn = $parse(match[2] ? match[1] : valueName), valuesFn = $parse(match[7]), trackFn = match[8] ? $parse(match[8]) : null, optionGroupsCache = [
|
||||
[
|
||||
{
|
||||
element: selectElement2,
|
||||
@ -4280,28 +4279,28 @@
|
||||
"": []
|
||||
}, optionGroupNames = [
|
||||
""
|
||||
], modelValue = ctrl1.$modelValue, values = valuesFn(scope3) || [], keys = keyName ? sortedKeys(values) : values, locals = {
|
||||
], modelValue = ctrl1.$modelValue, values = valuesFn(scope2) || [], keys = keyName ? sortedKeys(values) : values, locals = {
|
||||
}, selectedSet = !1;
|
||||
if (multiple) if (trackFn && isArray(modelValue)) {
|
||||
selectedSet = new HashMap([]);
|
||||
for(var trackIndex = 0; trackIndex < modelValue.length; trackIndex++)locals[valueName] = modelValue[trackIndex], selectedSet.put(trackFn(scope3, locals), modelValue[trackIndex]);
|
||||
for(var trackIndex = 0; trackIndex < modelValue.length; trackIndex++)locals[valueName] = modelValue[trackIndex], selectedSet.put(trackFn(scope2, locals), modelValue[trackIndex]);
|
||||
} else selectedSet = new HashMap(modelValue);
|
||||
for(index = 0; index < (length = keys.length); index++){
|
||||
if (key = index, keyName) {
|
||||
if ("$" === (key = keys[index]).charAt(0)) continue;
|
||||
locals[keyName] = key;
|
||||
}
|
||||
if (locals[valueName] = values[key], (optionGroup = optionGroups[optionGroupName = groupByFn(scope3, locals) || ""]) || (optionGroup = optionGroups[optionGroupName] = [], optionGroupNames.push(optionGroupName)), multiple) selected = isDefined(selectedSet.remove(trackFn ? trackFn(scope3, locals) : valueFn(scope3, locals)));
|
||||
if (locals[valueName] = values[key], (optionGroup = optionGroups[optionGroupName = groupByFn(scope2, locals) || ""]) || (optionGroup = optionGroups[optionGroupName] = [], optionGroupNames.push(optionGroupName)), multiple) selected = isDefined(selectedSet.remove(trackFn ? trackFn(scope2, locals) : valueFn(scope2, locals)));
|
||||
else {
|
||||
if (trackFn) {
|
||||
var modelCast = {
|
||||
};
|
||||
modelCast[valueName] = modelValue, selected = trackFn(scope3, modelCast) === trackFn(scope3, locals);
|
||||
} else selected = modelValue === valueFn(scope3, locals);
|
||||
modelCast[valueName] = modelValue, selected = trackFn(scope2, modelCast) === trackFn(scope2, locals);
|
||||
} else selected = modelValue === valueFn(scope2, locals);
|
||||
selectedSet = selectedSet || selected;
|
||||
}
|
||||
label = isDefined(label = displayFn(scope3, locals)) ? label : "", optionGroup.push({
|
||||
id: trackFn ? trackFn(scope3, locals) : keyName ? keys[index] : index,
|
||||
label = isDefined(label = displayFn(scope2, locals)) ? label : "", optionGroup.push({
|
||||
id: trackFn ? trackFn(scope2, locals) : keyName ? keys[index] : index,
|
||||
label: label,
|
||||
selected: selected
|
||||
});
|
||||
@ -4330,27 +4329,27 @@
|
||||
}
|
||||
for(; optionGroupsCache.length > groupIndex;)optionGroupsCache.pop()[0].element.remove();
|
||||
}
|
||||
nullOption && ($compile(nullOption)(scope3), nullOption.removeClass("ng-scope"), nullOption.remove()), selectElement2.empty(), selectElement2.on("change", function() {
|
||||
scope3.$apply(function() {
|
||||
var optionGroup, key, value, optionElement, index, groupIndex, length, groupLength, trackIndex, collection = valuesFn(scope3) || [], locals = {
|
||||
nullOption && ($compile(nullOption)(scope2), nullOption.removeClass("ng-scope"), nullOption.remove()), selectElement2.empty(), selectElement2.on("change", function() {
|
||||
scope2.$apply(function() {
|
||||
var optionGroup, key, value, optionElement, index, groupIndex, length, groupLength, trackIndex, collection = valuesFn(scope2) || [], locals = {
|
||||
};
|
||||
if (multiple) {
|
||||
for(groupIndex = 0, value = [], groupLength = optionGroupsCache.length; groupIndex < groupLength; groupIndex++)for(index = 1, length = (optionGroup = optionGroupsCache[groupIndex]).length; index < length; index++)if ((optionElement = optionGroup[index].element)[0].selected) {
|
||||
if (key = optionElement.val(), keyName && (locals[keyName] = key), trackFn) for(trackIndex = 0; trackIndex < collection.length && (locals[valueName] = collection[trackIndex], trackFn(scope3, locals) != key); trackIndex++);
|
||||
if (key = optionElement.val(), keyName && (locals[keyName] = key), trackFn) for(trackIndex = 0; trackIndex < collection.length && (locals[valueName] = collection[trackIndex], trackFn(scope2, locals) != key); trackIndex++);
|
||||
else locals[valueName] = collection[key];
|
||||
value.push(valueFn(scope3, locals));
|
||||
value.push(valueFn(scope2, locals));
|
||||
}
|
||||
} else if ("?" == (key = selectElement2.val())) value = undefined;
|
||||
else if ("" === key) value = null;
|
||||
else if (trackFn) {
|
||||
for(trackIndex = 0; trackIndex < collection.length; trackIndex++)if (locals[valueName] = collection[trackIndex], trackFn(scope3, locals) == key) {
|
||||
value = valueFn(scope3, locals);
|
||||
for(trackIndex = 0; trackIndex < collection.length; trackIndex++)if (locals[valueName] = collection[trackIndex], trackFn(scope2, locals) == key) {
|
||||
value = valueFn(scope2, locals);
|
||||
break;
|
||||
}
|
||||
} else locals[valueName] = collection[key], keyName && (locals[keyName] = key), value = valueFn(scope3, locals);
|
||||
} else locals[valueName] = collection[key], keyName && (locals[keyName] = key), value = valueFn(scope2, locals);
|
||||
ctrl1.$setViewValue(value);
|
||||
});
|
||||
}), ctrl1.$render = render, scope3.$watch(render);
|
||||
}), ctrl1.$render = render, scope2.$watch(render);
|
||||
})(scope, element, ngModelCtrl1) : multiple ? (scope1 = scope, selectElement = element, (ctrl = ngModelCtrl1).$render = function() {
|
||||
var items = new HashMap(ctrl.$viewValue);
|
||||
forEach(selectElement.find("option"), function(option) {
|
||||
@ -4365,11 +4364,11 @@
|
||||
option.selected && array.push(option.value);
|
||||
}), ctrl.$setViewValue(array);
|
||||
});
|
||||
})) : (scope2 = scope, selectElement1 = element, ngModelCtrl = ngModelCtrl1, selectCtrl = selectCtrl1, ngModelCtrl.$render = function() {
|
||||
})) : (selectElement1 = element, ngModelCtrl = ngModelCtrl1, selectCtrl = selectCtrl1, ngModelCtrl.$render = function() {
|
||||
var viewValue = ngModelCtrl.$viewValue;
|
||||
selectCtrl.hasOption(viewValue) ? (unknownOption.parent() && unknownOption.remove(), selectElement1.val(viewValue), "" === viewValue && emptyOption.prop("selected", !0)) : isUndefined(viewValue) && emptyOption ? selectElement1.val("") : selectCtrl.renderUnknownOption(viewValue);
|
||||
}, selectElement1.on("change", function() {
|
||||
scope2.$apply(function() {
|
||||
scope.$apply(function() {
|
||||
unknownOption.parent() && unknownOption.remove(), ngModelCtrl.$setViewValue(selectElement1.val());
|
||||
});
|
||||
}));
|
||||
@ -4390,9 +4389,9 @@
|
||||
var interpolateFn = $interpolate(element.text(), !0);
|
||||
interpolateFn || attr.$set("value", element.text());
|
||||
}
|
||||
return function(scope9, element, attr) {
|
||||
return function(scope5, element, attr) {
|
||||
var parent = element.parent(), selectCtrl1 = parent.data("$selectController") || parent.parent().data("$selectController");
|
||||
selectCtrl1 && selectCtrl1.databound ? element.prop("selected", !1) : selectCtrl1 = nullSelectCtrl, interpolateFn ? scope9.$watch(interpolateFn, function(newVal, oldVal) {
|
||||
selectCtrl1 && selectCtrl1.databound ? element.prop("selected", !1) : selectCtrl1 = nullSelectCtrl, interpolateFn ? scope5.$watch(interpolateFn, function(newVal, oldVal) {
|
||||
attr.$set("value", newVal), newVal !== oldVal && selectCtrl1.removeOption(oldVal), selectCtrl1.addOption(newVal);
|
||||
}) : selectCtrl1.addOption(attr.value), element.on("$destroy", function() {
|
||||
selectCtrl1.removeOption(attr.value);
|
||||
@ -4494,10 +4493,10 @@
|
||||
return {
|
||||
priority: 100,
|
||||
compile: function(tpl, tplAttr) {
|
||||
return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue) ? function(scope9, elm, attr) {
|
||||
attr.$set("value", scope9.$eval(attr.ngValue));
|
||||
} : function(scope9, elm, attr) {
|
||||
scope9.$watch(attr.ngValue, function(value) {
|
||||
return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue) ? function(scope5, elm, attr) {
|
||||
attr.$set("value", scope5.$eval(attr.ngValue));
|
||||
} : function(scope5, elm, attr) {
|
||||
scope5.$watch(attr.ngValue, function(value) {
|
||||
attr.$set("value", value);
|
||||
});
|
||||
};
|
||||
|
@ -1133,7 +1133,7 @@
|
||||
}, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), arr = [], pop = arr.pop, push = arr.push, slice = arr.slice, indexOf = arr.indexOf || function(elem) {
|
||||
for(var i = 0, len = this.length; i < len; i++)if (this[i] === elem) return i;
|
||||
return -1;
|
||||
}, whitespace = "[\\x20\\t\\r\\n\\f]", characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", identifier = characterEncoding.replace("w", "w#"), operators = "([*^$|!~]?=)", attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace(3, 8) + ")*)|.*)\\)|)", rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rcombinators = new RegExp("^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
|
||||
}, whitespace = "[\\x20\\t\\r\\n\\f]", characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", identifier = characterEncoding.replace("w", "w#"), attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace(3, 8) + ")*)|.*)\\)|)", rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rcombinators = new RegExp("^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
|
||||
ID: new RegExp("^#(" + characterEncoding + ")"),
|
||||
CLASS: new RegExp("^\\.(" + characterEncoding + ")"),
|
||||
NAME: new RegExp("^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]"),
|
||||
|
@ -1461,7 +1461,7 @@
|
||||
},
|
||||
_handleDialog: function(changePageOptions, data) {
|
||||
var active, activeContent = this.getActivePage();
|
||||
return activeContent && !activeContent.hasClass("ui-dialog") ? ("back" === data.direction ? this.back() : this.forward(), !1) : (active = this._getActiveHistory(), $17.extend(changePageOptions, {
|
||||
return activeContent && !activeContent.hasClass("ui-dialog") ? ("back" === data.direction ? this.back() : this.forward(), !1) : (data.pageUrl, active = this._getActiveHistory(), $17.extend(changePageOptions, {
|
||||
role: active.role,
|
||||
transition: active.transition,
|
||||
reverse: "back" === data.direction
|
||||
|
@ -2292,8 +2292,7 @@ Elements.prototype = {
|
||||
if (!supportsHTML5Elements) for(var tags = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "), fragment = document.createDocumentFragment(), l = tags.length; l--;)fragment.createElement(tags[l]);
|
||||
div1 = null;
|
||||
var supportsTableInnerHTML = Function.attempt(function() {
|
||||
var table = document.createElement("table");
|
||||
return table.innerHTML = "<tr><td></td></tr>", !0;
|
||||
return document.createElement("table").innerHTML = "<tr><td></td></tr>", !0;
|
||||
}), tr = document.createElement("tr"), html = "<td></td>";
|
||||
tr.innerHTML = html;
|
||||
var supportsTRInnerHTML = tr.innerHTML == html;
|
||||
|
@ -375,9 +375,8 @@
|
||||
if (1 === payload._status) return payload._result;
|
||||
throw payload._result;
|
||||
}
|
||||
var enableScopeAPI = !1;
|
||||
function isValidElementType(type) {
|
||||
return "string" == typeof type || "function" == typeof type || type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || !!enableScopeAPI || "object" == typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE);
|
||||
return "string" == typeof type || "function" == typeof type || type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || "object" == typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE);
|
||||
}
|
||||
function resolveDispatcher() {
|
||||
var dispatcher = ReactCurrentDispatcher.current;
|
||||
@ -667,7 +666,7 @@
|
||||
if (validType) for(var i = 2; i < arguments.length; i++)validateChildKeys(arguments[i], type);
|
||||
return type === exports.Fragment ? validateFragmentProps(element) : validatePropTypes(element), element;
|
||||
}
|
||||
var didWarnAboutDeprecatedCreateFactory = !1, enableSchedulerDebugging = !1, enableProfiling = !1;
|
||||
var didWarnAboutDeprecatedCreateFactory = !1, enableSchedulerDebugging = !1;
|
||||
if ("object" == typeof performance && "function" == typeof performance.now) {
|
||||
var localPerformance = performance;
|
||||
getCurrentTime = function() {
|
||||
@ -769,8 +768,6 @@
|
||||
var diff = a.sortIndex - b.sortIndex;
|
||||
return 0 !== diff ? diff : a.id - b.id;
|
||||
}
|
||||
function markTaskErrored(task, ms) {
|
||||
}
|
||||
var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, isHostCallbackScheduled = !1, isHostTimeoutScheduled = !1;
|
||||
function advanceTimers(currentTime) {
|
||||
for(var timer = peek(timerQueue); null !== timer;){
|
||||
@ -792,16 +789,7 @@
|
||||
function flushWork(hasTimeRemaining, initialTime) {
|
||||
isHostCallbackScheduled = !1, isHostTimeoutScheduled && (isHostTimeoutScheduled = !1, cancelHostTimeout()), isPerformingWork = !0;
|
||||
try {
|
||||
if (!enableProfiling) return workLoop(hasTimeRemaining, initialTime);
|
||||
try {
|
||||
return workLoop(hasTimeRemaining, initialTime);
|
||||
} catch (error) {
|
||||
if (null !== currentTask) {
|
||||
var currentTime = getCurrentTime();
|
||||
markTaskErrored(currentTask, currentTime), currentTask.isQueued = !1;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
return workLoop(hasTimeRemaining, initialTime);
|
||||
} finally{
|
||||
currentTask = null, currentPriorityLevel = currentPriorityLevel, isPerformingWork = !1;
|
||||
}
|
||||
@ -813,7 +801,7 @@
|
||||
var callback = currentTask.callback;
|
||||
if ("function" == typeof callback) {
|
||||
currentTask.callback = null, currentPriorityLevel = currentTask.priorityLevel;
|
||||
var didUserCallbackTimeout = currentTask.expirationTime <= currentTime, continuationCallback = callback(didUserCallbackTimeout);
|
||||
var continuationCallback = callback(currentTask.expirationTime <= currentTime);
|
||||
currentTime = getCurrentTime(), "function" == typeof continuationCallback ? currentTask.callback = continuationCallback : currentTask === peek(taskQueue) && pop(taskQueue), advanceTimers(currentTime);
|
||||
} else pop(taskQueue);
|
||||
currentTask = peek(taskQueue);
|
||||
|
@ -26,7 +26,7 @@
|
||||
argsWithFormat.unshift("Warning: " + format), Function.prototype.apply.call(console[level], console, argsWithFormat);
|
||||
}
|
||||
if (!React) throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");
|
||||
var enableProfilerTimer = !0, enableFundamentalAPI = !1, enableNewReconciler = !1, warnAboutStringRefs = !1, allNativeEvents = new Set(), registrationNameDependencies = {
|
||||
var enableProfilerTimer = !0, enableFundamentalAPI = !1, enableNewReconciler = !1, allNativeEvents = new Set(), registrationNameDependencies = {
|
||||
}, possibleRegistrationNames = {
|
||||
};
|
||||
function registerTwoPhaseEvent(registrationName, dependencies) {
|
||||
@ -521,7 +521,7 @@
|
||||
return "";
|
||||
}
|
||||
function describeFiber(fiber) {
|
||||
switch(fiber._debugOwner && fiber._debugOwner.type, fiber.tag){
|
||||
switch(fiber._debugOwner && fiber._debugOwner.type, fiber._debugSource, fiber.tag){
|
||||
case 5:
|
||||
return describeBuiltInComponentFrame(fiber.type);
|
||||
case 16:
|
||||
@ -1285,12 +1285,9 @@
|
||||
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/, msPattern$1 = /^-ms-/, hyphenPattern = /-(.)/g, badStyleValueWithSemicolonPattern = /;\s*$/, warnedStyleNames = {
|
||||
}, warnedStyleValues = {
|
||||
}, warnedForNaNValue = !1, warnedForInfinityValue = !1, warnHyphenatedStyleName = function(name) {
|
||||
if (!warnedStyleNames.hasOwnProperty(name) || !warnedStyleNames[name]) {
|
||||
var string;
|
||||
warnedStyleNames[name] = !0, error("Unsupported style property %s. Did you mean %s?", name, name.replace(msPattern$1, "ms-").replace(hyphenPattern, function(_, character) {
|
||||
return character.toUpperCase();
|
||||
}));
|
||||
}
|
||||
warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name] || (warnedStyleNames[name] = !0, error("Unsupported style property %s. Did you mean %s?", name, name.replace(msPattern$1, "ms-").replace(hyphenPattern, function(_, character) {
|
||||
return character.toUpperCase();
|
||||
})));
|
||||
}, warnBadVendoredStyleName = function(name) {
|
||||
warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name] || (warnedStyleNames[name] = !0, error("Unsupported vendor-prefixed style property %s. Did you mean %s?", name, name.charAt(0).toUpperCase() + name.slice(1)));
|
||||
}, warnStyleValueWithSemicolon = function(name, value) {
|
||||
@ -1957,7 +1954,7 @@
|
||||
var validateProperty$1 = function() {
|
||||
}, warnedProperties$1 = {
|
||||
}, _hasOwnProperty = Object.prototype.hasOwnProperty, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA$1 = new RegExp("^(aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$"), rARIACamel$1 = new RegExp("^(aria)[A-Z][" + ATTRIBUTE_NAME_CHAR + "]*$"), warnUnknownProperties = function(type, props, eventRegistry) {
|
||||
var isValid, unknownProps = [];
|
||||
var unknownProps = [];
|
||||
for(var key in props)(validateProperty$1 = function(tagName, name, value, eventRegistry) {
|
||||
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) return !0;
|
||||
var lowerCasedName = name.toLowerCase();
|
||||
@ -2157,10 +2154,7 @@
|
||||
return hasError;
|
||||
}
|
||||
function clearCaughtError() {
|
||||
if (hasError) {
|
||||
var error = caughtError;
|
||||
return hasError = !1, caughtError = null, error;
|
||||
}
|
||||
if (hasError) return hasError = !1, caughtError = null;
|
||||
throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.");
|
||||
}
|
||||
var _ReactInternals$Sched = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler, unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback, unstable_now = _ReactInternals$Sched.unstable_now, unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback, unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield, unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint, unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority, unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel, unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority, unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority, unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority, unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority, unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority, unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting;
|
||||
@ -2781,7 +2775,7 @@
|
||||
entanglements[index] |= entangledLanes, lanes &= ~lane;
|
||||
}
|
||||
}
|
||||
var clz32 = Math.clz32 ? Math.clz32 : function clz32Fallback(lanes) {
|
||||
var clz32 = Math.clz32 ? Math.clz32 : function(lanes) {
|
||||
return 0 === lanes ? 32 : 31 - (log(lanes) / LN2 | 0) | 0;
|
||||
}, log = Math.log, LN2 = Math.LN2, UserBlockingPriority$1 = unstable_UserBlockingPriority, runWithPriority = unstable_runWithPriority, _enabled = !0;
|
||||
function setEnabled(enabled) {
|
||||
@ -3039,7 +3033,7 @@
|
||||
}
|
||||
var SyntheticKeyboardEvent = createSyntheticEvent(_assign({
|
||||
}, UIEventInterface, {
|
||||
key: function getEventKey(nativeEvent) {
|
||||
key: function(nativeEvent) {
|
||||
if (nativeEvent.key) {
|
||||
var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
||||
if ("Unidentified" !== key) return key;
|
||||
@ -3347,7 +3341,7 @@
|
||||
}
|
||||
return isSupported;
|
||||
})("input") && (!document.documentMode || document.documentMode > 9));
|
||||
var objectIs = "function" == typeof Object.is ? Object.is : function is(x, y) {
|
||||
var objectIs = "function" == typeof Object.is ? Object.is : function(x, y) {
|
||||
return x === y && (0 !== x || 1 / x == 1 / y) || x != x && y != y;
|
||||
}, hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
||||
function shallowEqual(objA, objB) {
|
||||
@ -3953,10 +3947,7 @@
|
||||
if (isMatchingRootContainer(container, targetContainerNode)) break;
|
||||
if (4 === nodeTag) for(var grandNode = node.return; null !== grandNode;){
|
||||
var grandTag = grandNode.tag;
|
||||
if (3 === grandTag || 4 === grandTag) {
|
||||
var grandContainer = grandNode.stateNode.containerInfo;
|
||||
if (isMatchingRootContainer(grandContainer, targetContainerNode)) return;
|
||||
}
|
||||
if ((3 === grandTag || 4 === grandTag) && isMatchingRootContainer(grandNode.stateNode.containerInfo, targetContainerNode)) return;
|
||||
grandNode = grandNode.return;
|
||||
}
|
||||
for(; null !== container;){
|
||||
@ -3987,8 +3978,8 @@
|
||||
}
|
||||
function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
|
||||
for(var reactEventName = inCapturePhase ? null !== reactName ? reactName + "Capture" : null : reactName, listeners = [], instance = targetFiber, lastHostComponent = null; null !== instance;){
|
||||
var _instance2 = instance, stateNode = _instance2.stateNode, tag = _instance2.tag;
|
||||
if (5 === tag && null !== stateNode && (lastHostComponent = stateNode, null !== reactEventName)) {
|
||||
var _instance2 = instance, stateNode = _instance2.stateNode;
|
||||
if (5 === _instance2.tag && null !== stateNode && (lastHostComponent = stateNode, null !== reactEventName)) {
|
||||
var listener = getListener(instance, reactEventName);
|
||||
null != listener && listeners.push(createDispatchListener(instance, listener, lastHostComponent));
|
||||
}
|
||||
@ -3999,8 +3990,8 @@
|
||||
}
|
||||
function accumulateTwoPhaseListeners(targetFiber, reactName) {
|
||||
for(var captureName = reactName + "Capture", listeners = [], instance = targetFiber; null !== instance;){
|
||||
var _instance3 = instance, stateNode = _instance3.stateNode, tag = _instance3.tag;
|
||||
if (5 === tag && null !== stateNode) {
|
||||
var _instance3 = instance, stateNode = _instance3.stateNode;
|
||||
if (5 === _instance3.tag && null !== stateNode) {
|
||||
var currentTarget = stateNode, captureListener = getListener(instance, captureName);
|
||||
null != captureListener && listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
|
||||
var bubbleListener = getListener(instance, reactName);
|
||||
@ -5038,8 +5029,7 @@
|
||||
case 3:
|
||||
return node.stateNode.context;
|
||||
case 1:
|
||||
var Component = node.type;
|
||||
if (isContextProvider(Component)) return node.stateNode.__reactInternalMemoizedMergedChildContext;
|
||||
if (isContextProvider(node.type)) return node.stateNode.__reactInternalMemoizedMergedChildContext;
|
||||
break;
|
||||
}
|
||||
node = node.return;
|
||||
@ -5072,7 +5062,7 @@
|
||||
var Scheduler_runWithPriority = unstable_runWithPriority, Scheduler_scheduleCallback = unstable_scheduleCallback, Scheduler_cancelCallback = unstable_cancelCallback, Scheduler_requestPaint = unstable_requestPaint, Scheduler_now$1 = unstable_now, Scheduler_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel, Scheduler_ImmediatePriority = unstable_ImmediatePriority, Scheduler_UserBlockingPriority = unstable_UserBlockingPriority, Scheduler_NormalPriority = unstable_NormalPriority, Scheduler_LowPriority = unstable_LowPriority, Scheduler_IdlePriority = unstable_IdlePriority;
|
||||
if (!(null != __interactionsRef && null != __interactionsRef.current)) throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling");
|
||||
var fakeCallbackNode = {
|
||||
}, NormalPriority$1 = 97, shouldYield = unstable_shouldYield, requestPaint = void 0 !== Scheduler_requestPaint ? Scheduler_requestPaint : function() {
|
||||
}, shouldYield = unstable_shouldYield, requestPaint = void 0 !== Scheduler_requestPaint ? Scheduler_requestPaint : function() {
|
||||
}, syncQueue = null, immediateQueueCallbackNode = null, isFlushingSyncQueue = !1, initialTimeMs$1 = Scheduler_now$1(), now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function() {
|
||||
return Scheduler_now$1() - initialTimeMs$1;
|
||||
};
|
||||
@ -5083,7 +5073,7 @@
|
||||
case Scheduler_UserBlockingPriority:
|
||||
return 98;
|
||||
case Scheduler_NormalPriority:
|
||||
return NormalPriority$1;
|
||||
return 97;
|
||||
case Scheduler_LowPriority:
|
||||
return 96;
|
||||
case Scheduler_IdlePriority:
|
||||
@ -5098,7 +5088,7 @@
|
||||
return Scheduler_ImmediatePriority;
|
||||
case 98:
|
||||
return Scheduler_UserBlockingPriority;
|
||||
case NormalPriority$1:
|
||||
case 97:
|
||||
return Scheduler_NormalPriority;
|
||||
case 96:
|
||||
return Scheduler_LowPriority;
|
||||
@ -5123,11 +5113,7 @@
|
||||
callbackNode !== fakeCallbackNode && Scheduler_cancelCallback(callbackNode);
|
||||
}
|
||||
function flushSyncCallbackQueue() {
|
||||
if (null !== immediateQueueCallbackNode) {
|
||||
var node = immediateQueueCallbackNode;
|
||||
immediateQueueCallbackNode = null, Scheduler_cancelCallback(node);
|
||||
}
|
||||
flushSyncCallbackQueueImpl();
|
||||
null !== immediateQueueCallbackNode && Scheduler_cancelCallback(immediateQueueCallbackNode = null), flushSyncCallbackQueueImpl();
|
||||
}
|
||||
function flushSyncCallbackQueueImpl() {
|
||||
if (!isFlushingSyncQueue && null !== syncQueue) {
|
||||
@ -5480,9 +5466,7 @@
|
||||
};
|
||||
newLastBaseUpdate = newLastBaseUpdate.next = _clone;
|
||||
}
|
||||
newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
|
||||
var callback = update.callback;
|
||||
if (null !== callback) {
|
||||
if (newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance), null !== update.callback) {
|
||||
workInProgress.flags |= 32;
|
||||
var effects = queue.effects;
|
||||
null === effects ? queue.effects = [
|
||||
@ -5676,11 +5660,7 @@
|
||||
var instance = workInProgress.stateNode, oldProps = workInProgress.memoizedProps;
|
||||
instance.props = oldProps;
|
||||
var oldContext = instance.context, contextType = ctor.contextType, nextContext = emptyContextObject;
|
||||
if ("object" == typeof contextType && null !== contextType) nextContext = readContext(contextType);
|
||||
else {
|
||||
var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, !0);
|
||||
nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
|
||||
}
|
||||
nextContext = "object" == typeof contextType && null !== contextType ? readContext(contextType) : getMaskedContext(workInProgress, getUnmaskedContext(workInProgress, ctor, !0));
|
||||
var getDerivedStateFromProps = ctor.getDerivedStateFromProps, hasNewLifecycles = "function" == typeof getDerivedStateFromProps || "function" == typeof instance.getSnapshotBeforeUpdate;
|
||||
hasNewLifecycles || "function" != typeof instance.UNSAFE_componentWillReceiveProps && "function" != typeof instance.componentWillReceiveProps || (oldProps !== newProps || oldContext !== nextContext) && callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext), resetHasForceUpdateBeforeProcessing();
|
||||
var oldState = workInProgress.memoizedState, newState = instance.state = oldState;
|
||||
@ -5695,11 +5675,7 @@
|
||||
var unresolvedOldProps = workInProgress.memoizedProps, oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
|
||||
instance.props = oldProps;
|
||||
var unresolvedNewProps = workInProgress.pendingProps, oldContext = instance.context, contextType = ctor.contextType, nextContext = emptyContextObject;
|
||||
if ("object" == typeof contextType && null !== contextType) nextContext = readContext(contextType);
|
||||
else {
|
||||
var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, !0);
|
||||
nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
|
||||
}
|
||||
nextContext = "object" == typeof contextType && null !== contextType ? readContext(contextType) : getMaskedContext(workInProgress, getUnmaskedContext(workInProgress, ctor, !0));
|
||||
var getDerivedStateFromProps = ctor.getDerivedStateFromProps, hasNewLifecycles = "function" == typeof getDerivedStateFromProps || "function" == typeof instance.getSnapshotBeforeUpdate;
|
||||
hasNewLifecycles || "function" != typeof instance.UNSAFE_componentWillReceiveProps && "function" != typeof instance.componentWillReceiveProps || (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) && callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext), resetHasForceUpdateBeforeProcessing();
|
||||
var oldState = workInProgress.memoizedState, newState = instance.state = oldState;
|
||||
@ -5725,7 +5701,7 @@
|
||||
function coerceRef(returnFiber, current, element) {
|
||||
var mixedRef = element.ref;
|
||||
if (null !== mixedRef && "function" != typeof mixedRef && "object" != typeof mixedRef) {
|
||||
if ((1 & returnFiber.mode || warnAboutStringRefs) && !(element._owner && element._self && element._owner.stateNode !== element._self)) {
|
||||
if ((1 & returnFiber.mode || 0) && !(element._owner && element._self && element._owner.stateNode !== element._self)) {
|
||||
var componentName = getComponentName(returnFiber.type) || "Component";
|
||||
didWarnAboutStringRefs[componentName] || (error("A string ref, \"%s\", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", mixedRef), didWarnAboutStringRefs[componentName] = !0);
|
||||
}
|
||||
@ -5898,10 +5874,7 @@
|
||||
return knownKeys;
|
||||
}
|
||||
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
|
||||
for(var knownKeys = null, i = 0; i < newChildren.length; i++){
|
||||
var child = newChildren[i];
|
||||
knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
|
||||
}
|
||||
for(var knownKeys = null, i = 0; i < newChildren.length; i++)knownKeys = warnOnInvalidKey(newChildren[i], knownKeys, returnFiber);
|
||||
for(var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, lastPlacedIndex = 0, newIdx = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++){
|
||||
oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
|
||||
var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
|
||||
@ -5932,10 +5905,7 @@
|
||||
if ("function" != typeof iteratorFn) throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");
|
||||
"function" == typeof Symbol && "Generator" === newChildrenIterable[Symbol.toStringTag] && (didWarnAboutGenerators || error("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."), didWarnAboutGenerators = !0), newChildrenIterable.entries === iteratorFn && (didWarnAboutMaps || error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0);
|
||||
var _newChildren = iteratorFn.call(newChildrenIterable);
|
||||
if (_newChildren) for(var knownKeys = null, _step = _newChildren.next(); !_step.done; _step = _newChildren.next()){
|
||||
var child = _step.value;
|
||||
knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
|
||||
}
|
||||
if (_newChildren) for(var knownKeys = null, _step = _newChildren.next(); !_step.done; _step = _newChildren.next())knownKeys = warnOnInvalidKey(_step.value, knownKeys, returnFiber);
|
||||
var newChildren = iteratorFn.call(newChildrenIterable);
|
||||
if (!(null != newChildren)) throw Error("An iterable object provided no iterator.");
|
||||
for(var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, lastPlacedIndex = 0, newIdx = 0, nextOldFiber = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()){
|
||||
@ -6120,8 +6090,7 @@
|
||||
if (null === dehydrated || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) return node;
|
||||
}
|
||||
} else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
|
||||
var didSuspend = (node.flags & DidCapture) !== NoFlags;
|
||||
if (didSuspend) return node;
|
||||
if ((node.flags & DidCapture) !== NoFlags) return node;
|
||||
} else if (null !== node.child) {
|
||||
node.child.return = node, node = node.child;
|
||||
continue;
|
||||
@ -6157,7 +6126,8 @@
|
||||
var parentContainer = returnFiber.stateNode.containerInfo;
|
||||
switch(fiber.tag){
|
||||
case 5:
|
||||
didNotFindHydratableContainerInstance(parentContainer, fiber.type);
|
||||
var type = fiber.type;
|
||||
fiber.pendingProps, didNotFindHydratableContainerInstance(parentContainer, type);
|
||||
break;
|
||||
case 6:
|
||||
didNotFindHydratableContainerTextInstance(parentContainer, fiber.pendingProps);
|
||||
@ -6168,7 +6138,8 @@
|
||||
var parentType = returnFiber.type, parentProps = returnFiber.memoizedProps, parentInstance = returnFiber.stateNode;
|
||||
switch(fiber.tag){
|
||||
case 5:
|
||||
didNotFindHydratableInstance(parentType, parentProps, parentInstance, fiber.type);
|
||||
var _type = fiber.type;
|
||||
fiber.pendingProps, didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
|
||||
break;
|
||||
case 6:
|
||||
didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, fiber.pendingProps);
|
||||
@ -6185,7 +6156,9 @@
|
||||
function tryHydrate(fiber, nextInstance) {
|
||||
switch(fiber.tag){
|
||||
case 5:
|
||||
var instance = canHydrateInstance(nextInstance, fiber.type);
|
||||
var type = fiber.type;
|
||||
fiber.pendingProps;
|
||||
var instance = canHydrateInstance(nextInstance, type);
|
||||
if (null !== instance) return fiber.stateNode = instance, !0;
|
||||
return !1;
|
||||
case 6:
|
||||
@ -6413,11 +6386,7 @@
|
||||
};
|
||||
newBaseQueueLast = newBaseQueueLast.next = _clone;
|
||||
}
|
||||
if (update.eagerReducer === reducer) newState = update.eagerState;
|
||||
else {
|
||||
var action = update.action;
|
||||
newState = reducer(newState, action);
|
||||
}
|
||||
newState = update.eagerReducer === reducer ? update.eagerState : reducer(newState, update.action);
|
||||
} else {
|
||||
var clone = {
|
||||
lane: updateLane,
|
||||
@ -6446,10 +6415,8 @@
|
||||
if (null !== lastRenderPhaseUpdate) {
|
||||
queue.pending = null;
|
||||
var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next, update = firstRenderPhaseUpdate;
|
||||
do {
|
||||
var action = update.action;
|
||||
newState = reducer(newState, action), update = update.next;
|
||||
}while (update !== firstRenderPhaseUpdate)
|
||||
do newState = reducer(newState, update.action), update = update.next;
|
||||
while (update !== firstRenderPhaseUpdate)
|
||||
objectIs(newState, hook.memoizedState) || markWorkInProgressReceivedUpdate(), hook.memoizedState = newState, null === hook.baseQueue && (hook.baseState = newState), queue.lastRenderedState = newState;
|
||||
}
|
||||
return [
|
||||
@ -6707,7 +6674,7 @@
|
||||
var priorityLevel = getCurrentPriorityLevel();
|
||||
runWithPriority$1(priorityLevel < 98 ? 98 : priorityLevel, function() {
|
||||
setPending(!0);
|
||||
}), runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function() {
|
||||
}), runWithPriority$1(priorityLevel > 97 ? 97 : priorityLevel, function() {
|
||||
var prevTransition = ReactCurrentBatchConfig$1.transition;
|
||||
ReactCurrentBatchConfig$1.transition = 1;
|
||||
try {
|
||||
@ -7664,10 +7631,8 @@
|
||||
}
|
||||
function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
|
||||
for(var node = firstChild; null !== node;){
|
||||
if (13 === node.tag) {
|
||||
var state = node.memoizedState;
|
||||
null !== state && scheduleWorkOnFiber(node, renderLanes);
|
||||
} else if (19 === node.tag) scheduleWorkOnFiber(node, renderLanes);
|
||||
if (13 === node.tag) null !== node.memoizedState && scheduleWorkOnFiber(node, renderLanes);
|
||||
else if (19 === node.tag) scheduleWorkOnFiber(node, renderLanes);
|
||||
else if (null !== node.child) {
|
||||
node.child.return = node, node = node.child;
|
||||
continue;
|
||||
@ -7821,58 +7786,56 @@
|
||||
function beginWork(current, workInProgress, renderLanes) {
|
||||
var updateLanes = workInProgress.lanes;
|
||||
if (workInProgress._debugNeedsRemount && null !== current) return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
|
||||
if (null !== current) {
|
||||
var oldProps = current.memoizedProps;
|
||||
if (oldProps !== workInProgress.pendingProps || hasContextChanged() || workInProgress.type !== current.type) didReceiveUpdate = !0;
|
||||
else if (includesSomeLane(renderLanes, updateLanes)) didReceiveUpdate = (16384 & current.flags) !== NoFlags;
|
||||
else {
|
||||
switch(didReceiveUpdate = !1, workInProgress.tag){
|
||||
case 3:
|
||||
pushHostRootContext(workInProgress), resetHydrationState();
|
||||
break;
|
||||
case 5:
|
||||
pushHostContext(workInProgress);
|
||||
break;
|
||||
case 1:
|
||||
isContextProvider(workInProgress.type) && pushContextProvider(workInProgress);
|
||||
break;
|
||||
case 4:
|
||||
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
||||
break;
|
||||
case 10:
|
||||
pushProvider(workInProgress, workInProgress.memoizedProps.value);
|
||||
break;
|
||||
case 12:
|
||||
includesSomeLane(renderLanes, workInProgress.childLanes) && (workInProgress.flags |= Update);
|
||||
var stateNode = workInProgress.stateNode;
|
||||
stateNode.effectDuration = 0, stateNode.passiveEffectDuration = 0;
|
||||
break;
|
||||
case 13:
|
||||
if (null !== workInProgress.memoizedState) {
|
||||
if (includesSomeLane(renderLanes, workInProgress.child.childLanes)) return updateSuspenseComponent(current, workInProgress, renderLanes);
|
||||
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
|
||||
var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
||||
if (null !== child) return child.sibling;
|
||||
return null;
|
||||
}
|
||||
if (null !== current) if (current.memoizedProps !== workInProgress.pendingProps || hasContextChanged() || workInProgress.type !== current.type) didReceiveUpdate = !0;
|
||||
else if (includesSomeLane(renderLanes, updateLanes)) didReceiveUpdate = (16384 & current.flags) !== NoFlags;
|
||||
else {
|
||||
switch(didReceiveUpdate = !1, workInProgress.tag){
|
||||
case 3:
|
||||
pushHostRootContext(workInProgress), resetHydrationState();
|
||||
break;
|
||||
case 5:
|
||||
pushHostContext(workInProgress);
|
||||
break;
|
||||
case 1:
|
||||
isContextProvider(workInProgress.type) && pushContextProvider(workInProgress);
|
||||
break;
|
||||
case 4:
|
||||
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
||||
break;
|
||||
case 10:
|
||||
pushProvider(workInProgress, workInProgress.memoizedProps.value);
|
||||
break;
|
||||
case 12:
|
||||
includesSomeLane(renderLanes, workInProgress.childLanes) && (workInProgress.flags |= Update);
|
||||
var stateNode = workInProgress.stateNode;
|
||||
stateNode.effectDuration = 0, stateNode.passiveEffectDuration = 0;
|
||||
break;
|
||||
case 13:
|
||||
if (null !== workInProgress.memoizedState) {
|
||||
if (includesSomeLane(renderLanes, workInProgress.child.childLanes)) return updateSuspenseComponent(current, workInProgress, renderLanes);
|
||||
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
|
||||
break;
|
||||
case 19:
|
||||
var didSuspendBefore = (current.flags & DidCapture) !== NoFlags, _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
|
||||
if (didSuspendBefore) {
|
||||
if (_hasChildWork) return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
||||
workInProgress.flags |= DidCapture;
|
||||
}
|
||||
var renderState = workInProgress.memoizedState;
|
||||
if (null !== renderState && (renderState.rendering = null, renderState.tail = null, renderState.lastEffect = null), pushSuspenseContext(workInProgress, suspenseStackCursor.current), !_hasChildWork) return null;
|
||||
break;
|
||||
case 23:
|
||||
case 24:
|
||||
return workInProgress.lanes = NoLanes, updateOffscreenComponent(current, workInProgress, renderLanes);
|
||||
}
|
||||
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
||||
var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
||||
if (null !== child) return child.sibling;
|
||||
return null;
|
||||
}
|
||||
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
|
||||
break;
|
||||
case 19:
|
||||
var didSuspendBefore = (current.flags & DidCapture) !== NoFlags, _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
|
||||
if (didSuspendBefore) {
|
||||
if (_hasChildWork) return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
||||
workInProgress.flags |= DidCapture;
|
||||
}
|
||||
var renderState = workInProgress.memoizedState;
|
||||
if (null !== renderState && (renderState.rendering = null, renderState.tail = null, renderState.lastEffect = null), pushSuspenseContext(workInProgress, suspenseStackCursor.current), !_hasChildWork) return null;
|
||||
break;
|
||||
case 23:
|
||||
case 24:
|
||||
return workInProgress.lanes = NoLanes, updateOffscreenComponent(current, workInProgress, renderLanes);
|
||||
}
|
||||
} else didReceiveUpdate = !1;
|
||||
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
||||
}
|
||||
else didReceiveUpdate = !1;
|
||||
switch(workInProgress.lanes = NoLanes, workInProgress.tag){
|
||||
case 2:
|
||||
return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
|
||||
@ -7908,7 +7871,7 @@
|
||||
case 9:
|
||||
return updateContextConsumer(current, workInProgress, renderLanes);
|
||||
case 14:
|
||||
var _type2 = workInProgress.type, _unresolvedProps3 = workInProgress.pendingProps, _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
|
||||
var _type2 = workInProgress.type, _resolvedProps3 = resolveDefaultProps(_type2, workInProgress.pendingProps);
|
||||
if (workInProgress.type !== workInProgress.elementType) {
|
||||
var outerPropTypes = _type2.propTypes;
|
||||
outerPropTypes && checkPropTypes(outerPropTypes, _resolvedProps3, "prop", getComponentName(_type2));
|
||||
@ -8145,19 +8108,15 @@
|
||||
try {
|
||||
var logError = showErrorDialog(boundary, errorInfo);
|
||||
if (!1 === logError) return;
|
||||
var error = errorInfo.value;
|
||||
if (0) console.error(error);
|
||||
else {
|
||||
var errorBoundaryMessage, source = errorInfo.source, stack = errorInfo.stack, componentStack = null !== stack ? stack : "";
|
||||
if (null != error && error._suppressLogging) {
|
||||
if (1 === boundary.tag) return;
|
||||
console.error(error);
|
||||
}
|
||||
var componentName = source ? getComponentName(source.type) : null, componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : "The above error occurred in one of your React components:", errorBoundaryName = getComponentName(boundary.type);
|
||||
errorBoundaryMessage = errorBoundaryName ? "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".") : "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.";
|
||||
var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage);
|
||||
console.error(combinedMessage);
|
||||
var errorBoundaryMessage, error = errorInfo.value, source = errorInfo.source, stack = errorInfo.stack, componentStack = null !== stack ? stack : "";
|
||||
if (null != error && error._suppressLogging) {
|
||||
if (1 === boundary.tag) return;
|
||||
console.error(error);
|
||||
}
|
||||
var componentName = source ? getComponentName(source.type) : null, componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : "The above error occurred in one of your React components:", errorBoundaryName = getComponentName(boundary.type);
|
||||
errorBoundaryMessage = errorBoundaryName ? "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".") : "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.";
|
||||
var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage);
|
||||
console.error(combinedMessage);
|
||||
} catch (e) {
|
||||
setTimeout(function() {
|
||||
throw e;
|
||||
@ -8266,17 +8225,13 @@
|
||||
var _errorInfo = value;
|
||||
workInProgress.flags |= 4096;
|
||||
var lane = pickArbitraryLane(rootRenderLanes);
|
||||
workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
|
||||
var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
|
||||
return void enqueueCapturedUpdate(workInProgress, _update);
|
||||
return workInProgress.lanes = mergeLanes(workInProgress.lanes, lane), void enqueueCapturedUpdate(workInProgress, createRootErrorUpdate(workInProgress, _errorInfo, lane));
|
||||
case 1:
|
||||
var errorInfo = value, ctor = workInProgress.type, instance = workInProgress.stateNode;
|
||||
if ((workInProgress.flags & DidCapture) === NoFlags && ("function" == typeof ctor.getDerivedStateFromError || null !== instance && "function" == typeof instance.componentDidCatch && !isAlreadyFailedLegacyErrorBoundary(instance))) {
|
||||
workInProgress.flags |= 4096;
|
||||
var _lane = pickArbitraryLane(rootRenderLanes);
|
||||
workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane);
|
||||
var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);
|
||||
return void enqueueCapturedUpdate(workInProgress, _update2);
|
||||
return workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane), void enqueueCapturedUpdate(workInProgress, createClassErrorUpdate(workInProgress, errorInfo, _lane));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -8839,13 +8794,9 @@
|
||||
return root.finishedWork = finishedWork, root.finishedLanes = lanes, commitRoot(root), ensureRootIsScheduled(root, now()), null;
|
||||
}
|
||||
function flushPendingDiscreteUpdates() {
|
||||
if (null !== rootsWithPendingDiscreteUpdates) {
|
||||
var roots = rootsWithPendingDiscreteUpdates;
|
||||
rootsWithPendingDiscreteUpdates = null, roots.forEach(function(root) {
|
||||
markDiscreteUpdatesExpired(root), ensureRootIsScheduled(root, now());
|
||||
});
|
||||
}
|
||||
flushSyncCallbackQueue();
|
||||
null !== rootsWithPendingDiscreteUpdates && (rootsWithPendingDiscreteUpdates = null).forEach(function(root) {
|
||||
markDiscreteUpdatesExpired(root), ensureRootIsScheduled(root, now());
|
||||
}), flushSyncCallbackQueue();
|
||||
}
|
||||
function batchedUpdates$1(fn, a) {
|
||||
var prevExecutionContext = executionContext;
|
||||
@ -8978,11 +8929,7 @@
|
||||
setCurrentFiber(completedWork);
|
||||
var next = void 0;
|
||||
if ((8 & completedWork.mode) == 0 ? next = completeWork(current, completedWork, subtreeRenderLanes) : (startProfilerTimer(completedWork), next = completeWork(current, completedWork, subtreeRenderLanes), stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1)), resetCurrentFiber(), null !== next) return void (workInProgress = next);
|
||||
if (resetChildLanes(completedWork), null !== returnFiber && (2048 & returnFiber.flags) === NoFlags) {
|
||||
null === returnFiber.firstEffect && (returnFiber.firstEffect = completedWork.firstEffect), null !== completedWork.lastEffect && (null !== returnFiber.lastEffect && (returnFiber.lastEffect.nextEffect = completedWork.firstEffect), returnFiber.lastEffect = completedWork.lastEffect);
|
||||
var flags = completedWork.flags;
|
||||
flags > 1 && (null !== returnFiber.lastEffect ? returnFiber.lastEffect.nextEffect = completedWork : returnFiber.firstEffect = completedWork, returnFiber.lastEffect = completedWork);
|
||||
}
|
||||
resetChildLanes(completedWork), null !== returnFiber && (2048 & returnFiber.flags) === NoFlags && (null === returnFiber.firstEffect && (returnFiber.firstEffect = completedWork.firstEffect), null !== completedWork.lastEffect && (null !== returnFiber.lastEffect && (returnFiber.lastEffect.nextEffect = completedWork.firstEffect), returnFiber.lastEffect = completedWork.lastEffect), completedWork.flags > 1 && (null !== returnFiber.lastEffect ? returnFiber.lastEffect.nextEffect = completedWork : returnFiber.firstEffect = completedWork, returnFiber.lastEffect = completedWork));
|
||||
} else {
|
||||
var _next = unwindWork(completedWork);
|
||||
if (null !== _next) return _next.flags &= 2047, void (workInProgress = _next);
|
||||
@ -9075,7 +9022,7 @@
|
||||
var current = nextEffect.alternate;
|
||||
!shouldFireAfterActiveInstanceBlur && null !== focusedInstanceHandle && ((nextEffect.flags & Deletion) !== NoFlags ? doesFiberContain(nextEffect, focusedInstanceHandle) && (shouldFireAfterActiveInstanceBlur = !0) : 13 === nextEffect.tag && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle) && (shouldFireAfterActiveInstanceBlur = !0));
|
||||
var flags = nextEffect.flags;
|
||||
(256 & flags) !== NoFlags && (setCurrentFiber(nextEffect), commitBeforeMutationLifeCycles(current, nextEffect), resetCurrentFiber()), (512 & flags) === NoFlags || rootDoesHavePassiveEffects || (rootDoesHavePassiveEffects = !0, scheduleCallback(NormalPriority$1, function() {
|
||||
(256 & flags) !== NoFlags && (setCurrentFiber(nextEffect), commitBeforeMutationLifeCycles(current, nextEffect), resetCurrentFiber()), (512 & flags) === NoFlags || rootDoesHavePassiveEffects || (rootDoesHavePassiveEffects = !0, scheduleCallback(97, function() {
|
||||
return flushPassiveEffects(), null;
|
||||
})), nextEffect = nextEffect.nextEffect;
|
||||
}
|
||||
@ -9094,21 +9041,16 @@
|
||||
commitPlacement(nextEffect), nextEffect.flags &= ~Placement;
|
||||
break;
|
||||
case 6:
|
||||
commitPlacement(nextEffect), nextEffect.flags &= ~Placement;
|
||||
var _current = nextEffect.alternate;
|
||||
commitWork(_current, nextEffect);
|
||||
commitPlacement(nextEffect), nextEffect.flags &= ~Placement, commitWork(nextEffect.alternate, nextEffect);
|
||||
break;
|
||||
case Hydrating:
|
||||
nextEffect.flags &= ~Hydrating;
|
||||
break;
|
||||
case 1028:
|
||||
nextEffect.flags &= ~Hydrating;
|
||||
var _current2 = nextEffect.alternate;
|
||||
commitWork(_current2, nextEffect);
|
||||
nextEffect.flags &= ~Hydrating, commitWork(nextEffect.alternate, nextEffect);
|
||||
break;
|
||||
case Update:
|
||||
var _current3 = nextEffect.alternate;
|
||||
commitWork(_current3, nextEffect);
|
||||
commitWork(nextEffect.alternate, nextEffect);
|
||||
break;
|
||||
case Deletion:
|
||||
commitDeletion(root, nextEffect);
|
||||
@ -9121,29 +9063,21 @@
|
||||
for(; null !== nextEffect;){
|
||||
setCurrentFiber(nextEffect);
|
||||
var flags = nextEffect.flags;
|
||||
if (flags & (32 | Update)) {
|
||||
var current = nextEffect.alternate;
|
||||
commitLifeCycles(root, current, nextEffect);
|
||||
}
|
||||
128 & flags && commitAttachRef(nextEffect), resetCurrentFiber(), nextEffect = nextEffect.nextEffect;
|
||||
flags & (32 | Update) && commitLifeCycles(root, nextEffect.alternate, nextEffect), 128 & flags && commitAttachRef(nextEffect), resetCurrentFiber(), nextEffect = nextEffect.nextEffect;
|
||||
}
|
||||
}
|
||||
function flushPassiveEffects() {
|
||||
if (90 !== pendingPassiveEffectsRenderPriority) {
|
||||
var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;
|
||||
return pendingPassiveEffectsRenderPriority = 90, runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
|
||||
}
|
||||
return !1;
|
||||
return 90 !== pendingPassiveEffectsRenderPriority && runWithPriority$1((pendingPassiveEffectsRenderPriority = 90) > 97 ? 97 : pendingPassiveEffectsRenderPriority, flushPassiveEffectsImpl);
|
||||
}
|
||||
function enqueuePendingPassiveHookEffectMount(fiber, effect) {
|
||||
pendingPassiveHookEffectsMount.push(effect, fiber), rootDoesHavePassiveEffects || (rootDoesHavePassiveEffects = !0, scheduleCallback(NormalPriority$1, function() {
|
||||
pendingPassiveHookEffectsMount.push(effect, fiber), rootDoesHavePassiveEffects || (rootDoesHavePassiveEffects = !0, scheduleCallback(97, function() {
|
||||
return flushPassiveEffects(), null;
|
||||
}));
|
||||
}
|
||||
function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {
|
||||
pendingPassiveHookEffectsUnmount.push(effect, fiber), fiber.flags |= 8192;
|
||||
var alternate = fiber.alternate;
|
||||
null !== alternate && (alternate.flags |= 8192), rootDoesHavePassiveEffects || (rootDoesHavePassiveEffects = !0, scheduleCallback(NormalPriority$1, function() {
|
||||
null !== alternate && (alternate.flags |= 8192), rootDoesHavePassiveEffects || (rootDoesHavePassiveEffects = !0, scheduleCallback(97, function() {
|
||||
return flushPassiveEffects(), null;
|
||||
}));
|
||||
}
|
||||
@ -9211,8 +9145,8 @@
|
||||
if (1 === fiber.tag) {
|
||||
var ctor = fiber.type, instance = fiber.stateNode;
|
||||
if ("function" == typeof ctor.getDerivedStateFromError || "function" == typeof instance.componentDidCatch && !isAlreadyFailedLegacyErrorBoundary(instance)) {
|
||||
var errorInfo = createCapturedValue(error, sourceFiber), update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
|
||||
enqueueUpdate(fiber, update);
|
||||
var errorInfo = createCapturedValue(error, sourceFiber);
|
||||
enqueueUpdate(fiber, createClassErrorUpdate(fiber, errorInfo, SyncLane));
|
||||
var eventTime = requestEventTime(), root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
|
||||
if (null !== root) markRootUpdated(root, SyncLane, eventTime), ensureRootIsScheduled(root, eventTime), schedulePendingInteractions(root, SyncLane);
|
||||
else if ("function" == typeof instance.componentDidCatch && !isAlreadyFailedLegacyErrorBoundary(instance)) try {
|
||||
@ -9673,6 +9607,7 @@
|
||||
return fiber.elementType = type, fiber.type = resolvedType, fiber.lanes = lanes, fiber._debugOwner = owner, fiber;
|
||||
}
|
||||
function createFiberFromElement(element, mode, lanes) {
|
||||
element._owner;
|
||||
var fiber = createFiberFromTypeAndProps(element.type, element.key, element.props, element._owner, mode, lanes);
|
||||
return fiber._debugSource = element._source, fiber._debugOwner = element._owner, fiber;
|
||||
}
|
||||
@ -9865,8 +9800,10 @@
|
||||
this._internalRoot = createRootImpl(container, tag, options);
|
||||
}
|
||||
function createRootImpl(container, tag, options) {
|
||||
var hydrate = null != options && !0 === options.hydrate, mutableSources = null != options && null != options.hydrationOptions && options.hydrationOptions.mutableSources || null, root = createContainer(container, tag, hydrate);
|
||||
if (markContainerAsRoot(root.current, container), listenToAllSupportedEvents(8 === container.nodeType ? container.parentNode : container), mutableSources) for(var i = 0; i < mutableSources.length; i++)registerMutableSourceForHydration(root, mutableSources[i]);
|
||||
var hydrate = null != options && !0 === options.hydrate;
|
||||
null != options && options.hydrationOptions;
|
||||
var mutableSources = null != options && null != options.hydrationOptions && options.hydrationOptions.mutableSources || null, root = createContainer(container, tag, hydrate);
|
||||
if (markContainerAsRoot(root.current, container), container.nodeType, listenToAllSupportedEvents(8 === container.nodeType ? container.parentNode : container), mutableSources) for(var i = 0; i < mutableSources.length; i++)registerMutableSourceForHydration(root, mutableSources[i]);
|
||||
return root;
|
||||
}
|
||||
function createLegacyRoot(container, options) {
|
||||
|
@ -27,7 +27,7 @@ var YUI = function() {
|
||||
}, handleLoad = function() {
|
||||
YUI.Env.windowLoaded = !0, YUI.Env.DOMReady = !0, hasWin && remove(window, "load", handleLoad);
|
||||
}, getLoader = function(Y, o) {
|
||||
var G_ENV, loader = Y.Env._loader, lCore = [
|
||||
var loader = Y.Env._loader, lCore = [
|
||||
"loader-base"
|
||||
], mods = YUI.Env.mods;
|
||||
return loader ? (loader.ignoreRegistered = !1, loader.onEnd = null, loader.data = null, loader.required = [], loader.loadType = null) : (loader = new Y.Loader(Y.config), Y.Env._loader = loader), mods && mods.loader && (lCore = [].concat(lCore, YUI.Env.loaderExtras)), YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, lCore)), loader;
|
||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_ecma_utils"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.41.0"
|
||||
version = "0.41.1"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
@ -1101,8 +1101,11 @@ pub trait ExprExt {
|
||||
|
||||
Expr::Call(CallExpr {
|
||||
callee: ExprOrSuper::Expr(ref callee),
|
||||
ref args,
|
||||
..
|
||||
}) if callee.is_pure_callee() => false,
|
||||
}) if callee.is_pure_callee() => {
|
||||
args.iter().any(|arg| arg.expr.may_have_side_effects())
|
||||
}
|
||||
Expr::Call(_) => true,
|
||||
|
||||
Expr::Seq(SeqExpr { ref exprs, .. }) => exprs.iter().any(|e| e.may_have_side_effects()),
|
||||
|
Loading…
Reference in New Issue
Block a user