fix(es/minifier): Don't inline a callable expression if it's used as a reference (#5118)

This commit is contained in:
Donny/강동윤 2022-07-06 12:53:11 +09:00 committed by GitHub
parent 9f64f5d8a0
commit 0e4a03ccc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 90322 additions and 2148 deletions

View File

@ -1,8 +1,8 @@
var a; var a, b = function() {};
module.exports = ((a = function() { module.exports = ((a = function() {
"use strict"; "use strict";
function a() {} function a() {}
return a.prototype.it = function() { return a.prototype.it = function() {
this.bb = new a.MyA(); this.bb = new a.MyA();
}, a; }, a;
}()).MyA = function() {}, a); }()).MyA = b, a);

View File

@ -6,6 +6,9 @@ var clodule = function() {
} }
return clodule.fn = function(id) {}, clodule; return clodule.fn = function(id) {}, clodule;
}(); }();
(clodule || (clodule = {})).fn = function(x, y) { !function(clodule) {
var fn = function(x, y) {
return x; return x;
}; };
clodule.fn = fn;
}(clodule || (clodule = {}));

View File

@ -6,6 +6,9 @@ var clodule = function() {
} }
return clodule.fn = function(id) {}, clodule; return clodule.fn = function(id) {}, clodule;
}(); }();
(clodule || (clodule = {})).fn = function(x, y) { !function(clodule) {
var fn = function(x, y) {
return x; return x;
}; };
clodule.fn = fn;
}(clodule || (clodule = {}));

View File

@ -11,9 +11,12 @@ var A, Point = function() {
}; };
}, Point; }, Point;
}(); }();
(Point || (Point = {})).Origin = function() { !function(Point) {
var Origin = function() {
return null; return null;
}, function(A) { };
Point.Origin = Origin;
}(Point || (Point = {})), function(A) {
var Point = function() { var Point = function() {
"use strict"; "use strict";
function Point(x, y) { function Point(x, y) {

View File

@ -1,19 +1,19 @@
var A; var A;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(A) { !function(A) {
var Point = function() { var fromOrigin = function(p) {
"use strict";
_class_call_check(this, Point);
};
A.Point = Point;
var Line = function(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = function(p) {
return new Line({ return new Line({
x: 0, x: 0,
y: 0 y: 0
}, p); }, p);
}, Point = function() {
"use strict";
_class_call_check(this, Point);
}; };
A.Point = Point;
var Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = fromOrigin;
}(A || (A = {})); }(A || (A = {}));

View File

@ -1,17 +1,17 @@
var A; var A;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(A) { !function(A) {
var Point = function() { var fromOrigin = function(p) {
"use strict";
_class_call_check(this, Point);
}, Line = function(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = function(p) {
return new Line({ return new Line({
x: 0, x: 0,
y: 0 y: 0
}, p); }, p);
}, Point = function() {
"use strict";
_class_call_check(this, Point);
}, Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
}; };
A.Line = Line, A.fromOrigin = fromOrigin;
}(A || (A = {})); }(A || (A = {}));

View File

@ -1,19 +1,19 @@
var A; var A;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(A) { !function(A) {
var Point = function() { var fromOrigin = function(p) {
"use strict";
_class_call_check(this, Point);
};
A.Point = Point;
var Line = function(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.fromOrigin = function(p) {
return new Line({ return new Line({
x: 0, x: 0,
y: 0 y: 0
}, p); }, p);
}, Point = function() {
"use strict";
_class_call_check(this, Point);
}; };
A.Point = Point;
var Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.fromOrigin = fromOrigin;
}(A || (A = {})); }(A || (A = {}));

View File

@ -1,10 +1,13 @@
var A, B; var A, B;
(A || (A = {})).Point = function() { !function(A) {
var Point = function() {
return { return {
x: 0, x: 0,
y: 0 y: 0
}; };
}, function(A) { };
A.Point = Point;
}(A || (A = {})), function(A) {
(A.Point || (A.Point = {})).Origin = { (A.Point || (A.Point = {})).Origin = {
x: 0, x: 0,
y: 0 y: 0

View File

@ -1,10 +1,13 @@
var A, B; var A, B;
(A || (A = {})).Point = function() { !function(A) {
var Point = function() {
return { return {
x: 0, x: 0,
y: 0 y: 0
}; };
}, function(B) { };
A.Point = Point;
}(A || (A = {})), function(B) {
(B.Point || (B.Point = {})).Origin = { (B.Point || (B.Point = {})).Origin = {
x: 0, x: 0,
y: 0 y: 0

View File

@ -4,12 +4,15 @@ var A, B;
x: 0, x: 0,
y: 0 y: 0
}; };
}(A || (A = {})), (A || (A = {})).Point = function() { }(A || (A = {})), function(A) {
var Point = function() {
return { return {
x: 0, x: 0,
y: 0 y: 0
}; };
}, function(B) { };
A.Point = Point;
}(A || (A = {})), function(B) {
var Point = function() { var Point = function() {
return { return {
x: 0, x: 0,

View File

@ -1,8 +1,9 @@
var A; var A;
!function(A) { !function(A) {
A.fn = function(s) { var fn = function(s) {
return !0; return !0;
}, A.fng = function(s) { }, fng = function(s) {
return null; return null;
}; };
A.fn = fn, A.fng = fng;
}(A || (A = {})), A.fn, A.fng, A.fn2, A.fng2; }(A || (A = {})), A.fn, A.fng, A.fn2, A.fng2;

View File

@ -1,8 +1,9 @@
var donkey = function(ast) {
return ast;
};
function funky(declaration) { function funky(declaration) {
return !1; return !1;
} }
module.exports = function(ast) { module.exports = donkey, module.exports.funky = funky;
return ast;
}, module.exports.funky = funky;
var funky = require("./commonJSAliasedExport").funky; var funky = require("./commonJSAliasedExport").funky;
funky(1); funky(1);

View File

@ -7,11 +7,11 @@ var M, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
!function(M) { !function(M) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = F2;
return x.toString();
};
}(M || (M = {})), new C(), new C(), new D(), new C(), new M.A(); }(M || (M = {})), new C(), new C(), new D(), new C(), new M.A();

View File

@ -7,19 +7,19 @@ var M, N, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
!function(M) { !function(M) {
var A = function() { var _$F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = _$F2;
return x.toString();
};
}(M || (M = {})), function(N) { }(M || (M = {})), function(N) {
var A = function() { var _$F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
N.A = A, N.F2 = function(x) { N.A = A, N.F2 = _$F2;
return x.toString();
};
}(N || (N = {})), new D(), new D(), new C(), new C(), new N.A(); }(N || (N = {})), new D(), new D(), new C(), new C(), new N.A();

View File

@ -7,11 +7,11 @@ var M, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
!function(M) { !function(M) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = F2;
return x.toString();
};
}(M || (M = {})), new C(), new C(), new D(), new M.A(), M.F2; }(M || (M = {})), new C(), new C(), new D(), new M.A(), M.F2;

View File

@ -1,11 +1,13 @@
!function(Foo) { !function(Foo) {
Foo.a = function() { var a = function() {
return 5; return 5;
}, Foo.b = !0; };
Foo.a = a, Foo.b = !0;
}(Foo || (Foo = {})), function(Foo) { }(Foo || (Foo = {})), function(Foo) {
Foo.c = function(a) { var c = function(a) {
return a; return a;
}, (Foo.Test || (Foo.Test = {})).answer = 42; };
Foo.c = c, (Foo.Test || (Foo.Test = {})).answer = 42;
}(Foo || (Foo = {})); }(Foo || (Foo = {}));
var Foo, foo = require("./foo_0"); var Foo, foo = require("./foo_0");
foo.a(), foo.b && (foo.Test.answer = foo.c(42)), module.exports = Foo; foo.a(), foo.b && (foo.Test.answer = foo.c(42)), module.exports = Foo;

View File

@ -1,10 +1,14 @@
var A, B, C, D, E, F; var A, B, C, D, E, F;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
(A || (A = {})).x = 12, B || (B = {}), C || (C = {}), (D || (D = {})).yes = function() { (A || (A = {})).x = 12, B || (B = {}), C || (C = {}), function(D) {
var yes = function() {
return !0; return !0;
}, function(E) { };
(Color = E.Color || (E.Color = {}))[Color.Red = 0] = "Red", E.fn = function() {}; D.yes = yes;
var Color, C = function() { }(D || (D = {})), function(E) {
var Color, fn = function() {};
(Color = E.Color || (E.Color = {}))[Color.Red = 0] = "Red", E.fn = fn;
var C = function() {
"use strict"; "use strict";
_class_call_check(this, C); _class_call_check(this, C);
}; };

View File

@ -17,13 +17,13 @@ var M, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
for(!function(M) { for(!function(M) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = F2;
return x.toString();
};
}(M || (M = {}));;); }(M || (M = {}));;);
for(;;); for(;;);
for(;;); for(;;);

View File

@ -7,13 +7,13 @@ var M, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
for(!function(M) { for(!function(M) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = F2;
return x.toString();
};
}(M || (M = {}));;); }(M || (M = {}));;);
for(;;); for(;;);
for(;;); for(;;);

View File

@ -17,21 +17,21 @@ var M, N, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
for(!function(M) { for(!function(M) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = F2;
return x.toString();
};
}(M || (M = {})), function(N) { }(M || (M = {})), function(N) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
N.A = A, N.F2 = function(x) { N.A = A, N.F2 = F2;
return x.toString();
};
}(N || (N = {}));;); }(N || (N = {}));;);
for(;;); for(;;);
for(;;); for(;;);

View File

@ -1,4 +1,7 @@
var C, D, E; var C, D, E;
C || (C = {}), D || (D = {}), (E || (E = {})).xDist = function(x) { C || (C = {}), D || (D = {}), function(E) {
var xDist = function(x) {
return 0 - x.x; return 0 - x.x;
}; };
E.xDist = xDist;
}(E || (E = {}));

View File

@ -7,8 +7,8 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
}; };
A.Point = Point, A.Origin = new Point(0, 0); A.Point = Point, A.Origin = new Point(0, 0);
}(A || (A = {})), C || (C = {}), D || (D = {}), new A.Point(1, 1), function(E) { }(A || (A = {})), C || (C = {}), D || (D = {}), new A.Point(1, 1), function(E) {
var a = A; var xDist = function(x) {
E.xDist = function(x) {
return a.Origin.x - x.x; return a.Origin.x - x.x;
}; }, a = A;
E.xDist = xDist;
}(E || (E = {})); }(E || (E = {}));

View File

@ -17,11 +17,11 @@ var M, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
!function(M) { !function(M) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = F2;
return x.toString();
};
}(M || (M = {})), new C(), new D(), new C(), new C2(), new C(), new C2(), new D(), new D(), M.A; }(M || (M = {})), new C(), new D(), new C(), new C2(), new C(), new C2(), new D(), new D(), M.A;

View File

@ -31,7 +31,9 @@ import _create_super from "@swc/helpers/src/_create_super.mjs";
_class_call_check(this, A1); _class_call_check(this, A1);
}, (Color1 = Color || (Color = {}))[Color1.Blue = 0] = "Blue", Color1[Color1.Red = 1] = "Red"; }, (Color1 = Color || (Color = {}))[Color1.Blue = 0] = "Blue", Color1[Color1.Red = 1] = "Red";
}(A || (A = {})), function(Y) { }(A || (A = {})), function(Y) {
var A = function() { var F = function(s) {
return 2;
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
@ -63,9 +65,7 @@ import _create_super from "@swc/helpers/src/_create_super.mjs";
Y.BB = BB, Y.Module || (Y.Module = {}), A1 = function() { Y.BB = BB, Y.Module || (Y.Module = {}), A1 = function() {
"use strict"; "use strict";
_class_call_check(this, A1); _class_call_check(this, A1);
}, (Color = Y.Color || (Y.Color = {}))[Color.Blue = 0] = "Blue", Color[Color.Red = 1] = "Red", Y.x = 12, Y.F = function(s) { }, (Color = Y.Color || (Y.Color = {}))[Color.Blue = 0] = "Blue", Color[Color.Red = 1] = "Red", Y.x = 12, Y.F = F, Y.array = null, Y.fn = function(s) {
return 2;
}, Y.array = null, Y.fn = function(s) {
return "hello " + s; return "hello " + s;
}, Y.ol = { }, Y.ol = {
s: "hello", s: "hello",

View File

@ -9,6 +9,4 @@ function error(message) {
cb(); cb();
}(()=>{ }(()=>{
throw Error(); throw Error();
}), function(cb) { }), error("Error callback");
cb();
}(()=>error("Error callback"));

View File

@ -30,8 +30,4 @@ var C = function() {
cb(); cb();
}(function() { }(function() {
throw Error(); throw Error();
}), function(cb) { }), error("Error callback");
cb();
}(function() {
return error("Error callback");
});

View File

@ -3,9 +3,9 @@ function foo(f) {
} }
var g = function(x) { var g = function(x) {
return x + "blah"; return x + "blah";
}, x = function() {
return g;
}; };
foo(g), foo(function() { foo(g), foo(function() {
return g; return g;
}), foo(function() { }), foo(x);
return g;
});

View File

@ -2,10 +2,10 @@ export var CompilerDiagnostics;
!function(CompilerDiagnostics) { !function(CompilerDiagnostics) {
var Alert = function(output) { var Alert = function(output) {
diagnosticWriter && diagnosticWriter.Alert(output); diagnosticWriter && diagnosticWriter.Alert(output);
}, debug = CompilerDiagnostics.debug = !1, diagnosticWriter = CompilerDiagnostics.diagnosticWriter = null; }, debugPrint = function(s) {
CompilerDiagnostics.analysisPass = 0, CompilerDiagnostics.Alert = Alert, CompilerDiagnostics.debugPrint = function(s) {
debug && Alert(s); debug && Alert(s);
}, CompilerDiagnostics.assert = function(condition, s) { }, assert = function(condition, s) {
debug && !condition && Alert(s); debug && !condition && Alert(s);
}; }, debug = CompilerDiagnostics.debug = !1, diagnosticWriter = CompilerDiagnostics.diagnosticWriter = null;
CompilerDiagnostics.analysisPass = 0, CompilerDiagnostics.Alert = Alert, CompilerDiagnostics.debugPrint = debugPrint, CompilerDiagnostics.assert = assert;
}(CompilerDiagnostics || (CompilerDiagnostics = {})); }(CompilerDiagnostics || (CompilerDiagnostics = {}));

View File

@ -239,12 +239,12 @@ var TypeScript;
var bestOffset = 0, pre = (cur, parent, walker)=>(TypeScript.isValidAstNode(cur) && (cur.minChar <= position && (bestOffset = max(bestOffset, cur.minChar)), (cur.minChar > position || cur.limChar < bestOffset) && (walker.options.goChildren = !1)), cur); var bestOffset = 0, pre = (cur, parent, walker)=>(TypeScript.isValidAstNode(cur) && (cur.minChar <= position && (bestOffset = max(bestOffset, cur.minChar)), (cur.minChar > position || cur.limChar < bestOffset) && (walker.options.goChildren = !1)), cur);
return TypeScript.getAstWalkerFactory().walk(script, pre), bestOffset; return TypeScript.getAstWalkerFactory().walk(script, pre), bestOffset;
}, TypeScript1.walkAST = function(ast, callback) { }, TypeScript1.walkAST = function(ast, callback) {
var path = new AstPath(); var pre = function(cur, parent, walker) {
TypeScript.getAstWalkerFactory().walk(ast, function(cur, parent, walker) {
var path = walker.state; var path = walker.state;
return path.push(cur), callback(path, walker), cur; return path.push(cur), callback(path, walker), cur;
}, function(cur, parent, walker) { }, post = function(cur, parent, walker) {
return walker.state.pop(), cur; return walker.state.pop(), cur;
}, null, path); }, path = new AstPath();
TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path);
}; };
}(TypeScript || (TypeScript = {})); }(TypeScript || (TypeScript = {}));

View File

@ -5,6 +5,8 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
return null === items || 0 === items.length ? null : items[items.length - 1]; return null === items || 0 === items.length ? null : items[items.length - 1];
}, max = function(a, b) { }, max = function(a, b) {
return a >= b ? a : b; return a >= b ? a : b;
}, min = function(a, b) {
return a <= b ? a : b;
}, isValidAstNode = function(ast) { }, isValidAstNode = function(ast) {
return null !== ast && -1 !== ast.minChar && -1 !== ast.limChar; return null !== ast && -1 !== ast.minChar && -1 !== ast.limChar;
}, getAstPathToPosition = function(script, pos) { }, getAstPathToPosition = function(script, pos) {
@ -31,17 +33,15 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
}; };
return TypeScript.getAstWalkerFactory().walk(script, pre), bestOffset; return TypeScript.getAstWalkerFactory().walk(script, pre), bestOffset;
}, walkAST = function(ast, callback) { }, walkAST = function(ast, callback) {
var path = new AstPath(); var pre = function(cur, parent, walker) {
TypeScript.getAstWalkerFactory().walk(ast, function(cur, parent, walker) {
var path = walker.state; var path = walker.state;
return path.push(cur), callback(path, walker), cur; return path.push(cur), callback(path, walker), cur;
}, function(cur, parent, walker) { }, post = function(cur, parent, walker) {
return walker.state.pop(), cur; return walker.state.pop(), cur;
}, null, path); }, path = new AstPath();
}; TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path);
TypeScript1.lastOf = lastOf, TypeScript1.max = max, TypeScript1.min = function(a, b) {
return a <= b ? a : b;
}; };
TypeScript1.lastOf = lastOf, TypeScript1.max = max, TypeScript1.min = min;
var AstPath = function() { var AstPath = function() {
"use strict"; "use strict";
function AstPath() { function AstPath() {

View File

@ -1,6 +1,51 @@
var TypeScript; var TypeScript;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(TypeScript) { !function(TypeScript) {
var timeFunction = function(logger, funcDescription, func) {
var start = +new Date(), result = func(), end = +new Date();
return logger.log(funcDescription + " completed in " + (end - start) + " msec"), result;
}, stringToLiteral = function(value, length) {
var result = "", addChar = function(index) {
var ch = value.charCodeAt(index);
switch(ch){
case 0x09:
result += "\\t";
break;
case 0x0a:
result += "\\n";
break;
case 0x0b:
result += "\\v";
break;
case 0x0c:
result += "\\f";
break;
case 0x0d:
result += "\\r";
break;
case 0x22:
result += '\\"';
break;
case 0x27:
result += "\\'";
break;
case 0x5c:
result += "\\";
break;
default:
result += value.charAt(index);
}
};
if (value.length > length) {
for(var mid = length >> 1, i = 0; i < mid; i++)addChar(i);
result += "(...)";
for(var i = value.length - mid; i < value.length; i++)addChar(i);
} else {
length = value.length;
for(var i = 0; i < length; i++)addChar(i);
}
return result;
};
!function(CompilerDiagnostics) { !function(CompilerDiagnostics) {
var debug = CompilerDiagnostics.debug = !1, diagnosticWriter = CompilerDiagnostics.diagnosticWriter = null; var debug = CompilerDiagnostics.debug = !1, diagnosticWriter = CompilerDiagnostics.diagnosticWriter = null;
function Alert(output) { function Alert(output) {
@ -72,49 +117,5 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
this.logContents.push(s); this.logContents.push(s);
}, BufferedLogger; }, BufferedLogger;
}(); }();
TypeScript.BufferedLogger = BufferedLogger, TypeScript.timeFunction = function(logger, funcDescription, func) { TypeScript.BufferedLogger = BufferedLogger, TypeScript.timeFunction = timeFunction, TypeScript.stringToLiteral = stringToLiteral;
var start = +new Date(), result = func(), end = +new Date();
return logger.log(funcDescription + " completed in " + (end - start) + " msec"), result;
}, TypeScript.stringToLiteral = function(value, length) {
var result = "", addChar = function(index) {
var ch = value.charCodeAt(index);
switch(ch){
case 0x09:
result += "\\t";
break;
case 0x0a:
result += "\\n";
break;
case 0x0b:
result += "\\v";
break;
case 0x0c:
result += "\\f";
break;
case 0x0d:
result += "\\r";
break;
case 0x22:
result += '\\"';
break;
case 0x27:
result += "\\'";
break;
case 0x5c:
result += "\\";
break;
default:
result += value.charAt(index);
}
};
if (value.length > length) {
for(var mid = length >> 1, i = 0; i < mid; i++)addChar(i);
result += "(...)";
for(var i = value.length - mid; i < value.length; i++)addChar(i);
} else {
length = value.length;
for(var i = 0; i < length; i++)addChar(i);
}
return result;
};
}(TypeScript || (TypeScript = {})); }(TypeScript || (TypeScript = {}));

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,12 @@
var TypeScript; var TypeScript;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs"; import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
!function(TypeScript) { !function(TypeScript) {
var PrintContext = function() { var prePrintAST = function(ast, parent, walker) {
var pc = walker.state;
return ast.print(pc), pc.increaseIndent(), ast;
}, postPrintAST = function(ast, parent, walker) {
return walker.state.decreaseIndent(), ast;
}, PrintContext = function() {
"use strict"; "use strict";
function PrintContext(outfile, parser) { function PrintContext(outfile, parser) {
_class_call_check(this, PrintContext), this.outfile = outfile, this.parser = parser, this.builder = "", this.indent1 = " ", this.indentStrings = [], this.indentAmt = 0; _class_call_check(this, PrintContext), this.outfile = outfile, this.parser = parser, this.builder = "", this.indent1 = " ", this.indentStrings = [], this.indentAmt = 0;
@ -26,10 +31,5 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
this.builder += s, this.outfile.WriteLine(this.builder), this.builder = ""; this.builder += s, this.outfile.WriteLine(this.builder), this.builder = "";
}, PrintContext; }, PrintContext;
}(); }();
TypeScript.PrintContext = PrintContext, TypeScript.prePrintAST = function(ast, parent, walker) { TypeScript.PrintContext = PrintContext, TypeScript.prePrintAST = prePrintAST, TypeScript.postPrintAST = postPrintAST;
var pc = walker.state;
return ast.print(pc), pc.increaseIndent(), ast;
}, TypeScript.postPrintAST = function(ast, parent, walker) {
return walker.state.decreaseIndent(), ast;
};
}(TypeScript || (TypeScript = {})); }(TypeScript || (TypeScript = {}));

View File

@ -4,6 +4,11 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
var preFindMemberScope = function(ast, parent, walker) { var preFindMemberScope = function(ast, parent, walker) {
var memScope = walker.state; var memScope = walker.state;
return hasFlag(ast.flags, memScope.matchFlag) && (memScope.pos < 0 || memScope.pos == ast.limChar) && (memScope.ast = ast, null == ast.type && memScope.pos >= 0 && memScope.flow.inScopeTypeCheck(ast, memScope.scope), memScope.type = ast.type, memScope.options.stopWalk()), ast; return hasFlag(ast.flags, memScope.matchFlag) && (memScope.pos < 0 || memScope.pos == ast.limChar) && (memScope.ast = ast, null == ast.type && memScope.pos >= 0 && memScope.flow.inScopeTypeCheck(ast, memScope.scope), memScope.type = ast.type, memScope.options.stopWalk()), ast;
}, pushTypeCollectionScope = function(container, valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, context, thisType, classType, moduleDecl) {
var builder = new SymbolScopeBuilder(valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, null, container), chain = new ScopeChain(container, context.scopeChain, builder);
chain.thisType = thisType, chain.classType = classType, chain.moduleDecl = moduleDecl, context.scopeChain = chain;
}, popTypeCollectionScope = function(context) {
context.scopeChain = context.scopeChain.previous;
}, preFindEnclosingScope = function(ast, parent, walker) { }, preFindEnclosingScope = function(ast, parent, walker) {
var context = walker.state, minChar = ast.minChar, limChar = ast.limChar; var context = walker.state, minChar = ast.minChar, limChar = ast.limChar;
if (ast.nodeType == NodeType.Script && context.pos > limChar && (limChar = context.pos), minChar <= context.pos && limChar >= context.pos) { if (ast.nodeType == NodeType.Script && context.pos > limChar && (limChar = context.pos), minChar <= context.pos && limChar >= context.pos) {
@ -85,10 +90,5 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
return this.scriptFragment; return this.scriptFragment;
}, EnclosingScopeContext; }, EnclosingScopeContext;
}(); }();
TypeScript1.EnclosingScopeContext = EnclosingScopeContext, TypeScript1.preFindMemberScope = preFindMemberScope, TypeScript1.pushTypeCollectionScope = function(container, valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, context, thisType, classType, moduleDecl) { TypeScript1.EnclosingScopeContext = EnclosingScopeContext, TypeScript1.preFindMemberScope = preFindMemberScope, TypeScript1.pushTypeCollectionScope = pushTypeCollectionScope, TypeScript1.popTypeCollectionScope = popTypeCollectionScope, TypeScript1.preFindEnclosingScope = preFindEnclosingScope, TypeScript1.findEnclosingScopeAt = findEnclosingScopeAt;
var builder = new SymbolScopeBuilder(valueMembers, ambientValueMembers, enclosedTypes, ambientEnclosedTypes, null, container), chain = new ScopeChain(container, context.scopeChain, builder);
chain.thisType = thisType, chain.classType = classType, chain.moduleDecl = moduleDecl, context.scopeChain = chain;
}, TypeScript1.popTypeCollectionScope = function(context) {
context.scopeChain = context.scopeChain.previous;
}, TypeScript1.preFindEnclosingScope = preFindEnclosingScope, TypeScript1.findEnclosingScopeAt = findEnclosingScopeAt;
}(TypeScript || (TypeScript = {})); }(TypeScript || (TypeScript = {}));

View File

@ -2,9 +2,12 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
import _inherits from "@swc/helpers/src/_inherits.mjs"; import _inherits from "@swc/helpers/src/_inherits.mjs";
import _type_of from "@swc/helpers/src/_type_of.mjs"; import _type_of from "@swc/helpers/src/_type_of.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs"; import _create_super from "@swc/helpers/src/_create_super.mjs";
(M || (M = {})).fn = function(x) { !function(M) {
var fn = function(x) {
return ""; return "";
}, void 0 === x || _type_of(x), void 0 === M || _type_of(M), M.fn(1); };
M.fn = fn;
}(M || (M = {})), void 0 === x || _type_of(x), void 0 === M || _type_of(M), M.fn(1);
var M, x, C = function() { var M, x, C = function() {
"use strict"; "use strict";
_class_call_check(this, C); _class_call_check(this, C);

View File

@ -8,11 +8,11 @@ var M, C = function() {
_class_call_check(this, D); _class_call_check(this, D);
}; };
throw !function(M) { throw !function(M) {
var A = function() { var F2 = function(x) {
return x.toString();
}, A = function() {
"use strict"; "use strict";
_class_call_check(this, A); _class_call_check(this, A);
}; };
M.A = A, M.F2 = function(x) { M.A = A, M.F2 = F2;
return x.toString();
};
}(M || (M = {})), 9.9; }(M || (M = {})), 9.9;

View File

@ -29,10 +29,10 @@ ExpandoArrow.prop = 2, ExpandoArrow.m = function(n) {
}; };
return nested.total = n + 1000000, nested; return nested.total = n + 1000000, nested;
}).also = -1, ExpandoMerge.p1 = 111, (ExpandoMerge || (ExpandoMerge = {})).p2 = 222, (ExpandoMerge || (ExpandoMerge = {})).p3 = 333, ExpandoMerge.p1, ExpandoMerge.p2, ExpandoMerge.p3, ExpandoMerge(1), function(Ns) { }).also = -1, ExpandoMerge.p1 = 111, (ExpandoMerge || (ExpandoMerge = {})).p2 = 222, (ExpandoMerge || (ExpandoMerge = {})).p3 = 333, ExpandoMerge.p1, ExpandoMerge.p2, ExpandoMerge.p3, ExpandoMerge(1), function(Ns) {
var ExpandoNamespace = function() {}; var ExpandoNamespace = function() {}, foo = function() {
ExpandoNamespace.p6 = 42, Ns.foo = function() {
return ExpandoNamespace; return ExpandoNamespace;
}; };
ExpandoNamespace.p6 = 42, Ns.foo = foo;
}(Ns || (Ns = {})); }(Ns || (Ns = {}));
var ExpandoExpr2 = function(n) { var ExpandoExpr2 = function(n) {
return n.toString(); return n.toString();

View File

@ -1,6 +1,8 @@
var y = void 0; var y = void 0;
!function(something, haveValue, haveY) { !function(something, haveValue, haveY) {
return something === y ? haveY(y) : haveValue(something); return something === y ? haveY(y) : haveValue(something);
}(Math.random() > 0.5 ? 'hey!' : void 0, (text)=>'string', (y)=>'other one'), null.toUpperCase(), pigify(mbp).oinks, pigify(mbp).walks, f1('a'), f2('a', 'b'), Object.assign(()=>{}, { }(Math.random() > 0.5 ? 'hey!' : void 0, (text)=>'string', (y)=>'other one'), null.toUpperCase(), pigify(mbp).oinks, pigify(mbp).walks, f1('a'), f2('a', 'b');
func () {} const func = ()=>{};
Object.assign(()=>{}, {
func
}); });

View File

@ -48,23 +48,60 @@ export default function o(c) {
for(var e, f, g = 0, h = b.length, i = c.length; g < h;){ for(var e, f, g = 0, h = b.length, i = c.length; g < h;){
if (d >= i) return -1; if (d >= i) return -1;
if (37 === (e = b.charCodeAt(g++))) { if (37 === (e = b.charCodeAt(g++))) {
if (!(f = aQ[(e = b.charAt(g++)) in p ? b.charAt(g++) : e]) || (d = f(a, c, d)) < 0) return -1; if (!(f = a8[(e = b.charAt(g++)) in p ? b.charAt(g++) : e]) || (d = f(a, c, d)) < 0) return -1;
} else if (e != c.charCodeAt(d++)) return -1; } else if (e != c.charCodeAt(d++)) return -1;
} }
return d; return d;
}, j = c.dateTime, k = c.date, o = c.time, q = c.periods, r = c.days, s = c.shortDays, t = c.months, u = c.shortMonths, aa = v(q), au = w(q), aG = v(r), aH = w(r), aI = v(s), aJ = w(s), aK = v(t), aL = w(t), aM = v(u), aN = w(u), aO = { }, j = function(a, b, c) {
a: function(a) { var d = aY.exec(b.slice(c));
return s[a.getDay()]; return d ? (a.p = aZ.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, }, k = function(a, b, c) {
A: function(a) { var d = a0.exec(b.slice(c));
return r[a.getDay()]; return d ? (a.w = a1.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, }, o = function(a, b, c) {
b: function(a) { var d = a$.exec(b.slice(c));
return u[a.getMonth()]; return d ? (a.w = a_.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, }, q = function(a, b, c) {
B: function(a) { var d = a4.exec(b.slice(c));
return t[a.getMonth()]; return d ? (a.m = a5.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, }, r = function(a, b, c) {
var d = a2.exec(b.slice(c));
return d ? (a.m = a3.get(d[0].toLowerCase()), c + d[0].length) : -1;
}, s = function(a, b, c) {
return h(a, aQ, b, c);
}, t = function(a, b, c) {
return h(a, aR, b, c);
}, u = function(a, b, c) {
return h(a, aS, b, c);
}, aa = function(a) {
return aV[a.getDay()];
}, au = function(a) {
return aU[a.getDay()];
}, aG = function(a) {
return aX[a.getMonth()];
}, aH = function(a) {
return aW[a.getMonth()];
}, aI = function(a) {
return aT[+(a.getHours() >= 12)];
}, aJ = function(a) {
return 1 + ~~(a.getMonth() / 3);
}, aK = function(a) {
return aV[a.getUTCDay()];
}, aL = function(a) {
return aU[a.getUTCDay()];
}, aM = function(a) {
return aX[a.getUTCMonth()];
}, aN = function(a) {
return aW[a.getUTCMonth()];
}, aO = function(a) {
return aT[+(a.getUTCHours() >= 12)];
}, aP = function(a) {
return 1 + ~~(a.getUTCMonth() / 3);
}, aQ = c.dateTime, aR = c.date, aS = c.time, aT = c.periods, aU = c.days, aV = c.shortDays, aW = c.months, aX = c.shortMonths, aY = v(aT), aZ = w(aT), a$ = v(aU), a_ = w(aU), a0 = v(aV), a1 = w(aV), a2 = v(aW), a3 = w(aW), a4 = v(aX), a5 = w(aX), a6 = {
a: aa,
A: au,
b: aG,
B: aH,
c: null, c: null,
d: R, d: R,
e: R, e: R,
@ -77,12 +114,8 @@ export default function o(c) {
L: V, L: V,
m: X, m: X,
M: Y, M: Y,
p: function(a) { p: aI,
return q[+(a.getHours() >= 12)]; q: aJ,
},
q: function(a) {
return 1 + ~~(a.getMonth() / 3);
},
Q: aE, Q: aE,
s: aF, s: aF,
S: Z, S: Z,
@ -97,19 +130,11 @@ export default function o(c) {
Y: ag, Y: ag,
Z: ai, Z: ai,
"%": aD "%": aD
}, aP = { }, a7 = {
a: function(a) { a: aK,
return s[a.getUTCDay()]; A: aL,
}, b: aM,
A: function(a) { B: aN,
return r[a.getUTCDay()];
},
b: function(a) {
return u[a.getUTCMonth()];
},
B: function(a) {
return t[a.getUTCMonth()];
},
c: null, c: null,
d: aj, d: aj,
e: aj, e: aj,
@ -122,12 +147,8 @@ export default function o(c) {
L: an, L: an,
m: ap, m: ap,
M: aq, M: aq,
p: function(a) { p: aO,
return q[+(a.getUTCHours() >= 12)]; q: aP,
},
q: function(a) {
return 1 + ~~(a.getUTCMonth() / 3);
},
Q: aE, Q: aE,
s: aF, s: aF,
S: ar, S: ar,
@ -142,26 +163,12 @@ export default function o(c) {
Y: aA, Y: aA,
Z: aC, Z: aC,
"%": aD "%": aD
}, aQ = { }, a8 = {
a: function(a, b, c) { a: k,
var d = aI.exec(b.slice(c)); A: o,
return d ? (a.w = aJ.get(d[0].toLowerCase()), c + d[0].length) : -1; b: q,
}, B: r,
A: function(a, b, c) { c: s,
var d = aG.exec(b.slice(c));
return d ? (a.w = aH.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
b: function(a, b, c) {
var d = aM.exec(b.slice(c));
return d ? (a.m = aN.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
B: function(a, b, c) {
var d = aK.exec(b.slice(c));
return d ? (a.m = aL.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
c: function(a, b, c) {
return h(a, j, b, c);
},
d: H, d: H,
e: H, e: H,
f: N, f: N,
@ -173,10 +180,7 @@ export default function o(c) {
L: M, L: M,
m: G, m: G,
M: K, M: K,
p: function(a, b, c) { p: j,
var d = aa.exec(b.slice(c));
return d ? (a.p = au.get(d[0].toLowerCase()), c + d[0].length) : -1;
},
q: F, q: F,
Q: P, Q: P,
s: Q, s: Q,
@ -186,20 +190,16 @@ export default function o(c) {
V: A, V: A,
w: x, w: x,
W: B, W: B,
x: function(a, b, c) { x: t,
return h(a, k, b, c); X: u,
},
X: function(a, b, c) {
return h(a, o, b, c);
},
y: D, y: D,
Y: C, Y: C,
Z: E, Z: E,
"%": O "%": O
}; };
return aO.x = e(k, aO), aO.X = e(o, aO), aO.c = e(j, aO), aP.x = e(k, aP), aP.X = e(o, aP), aP.c = e(j, aP), { return a6.x = e(aR, a6), a6.X = e(aS, a6), a6.c = e(aQ, a6), a7.x = e(aR, a7), a7.X = e(aS, a7), a7.c = e(aQ, a7), {
format: function(a) { format: function(a) {
var b = e(a += "", aO); var b = e(a += "", a6);
return b.toString = function() { return b.toString = function() {
return a; return a;
}, b; }, b;
@ -211,7 +211,7 @@ export default function o(c) {
}, b; }, b;
}, },
utcFormat: function(a) { utcFormat: function(a) {
var b = e(a += "", aP); var b = e(a += "", a7);
return b.toString = function() { return b.toString = function() {
return a; return a;
}, b; }, b;

View File

@ -69,67 +69,67 @@ var a, b = require("@firebase/util"), c = require("tslib"), d = require("@fireba
}, a; }, a;
}(), i = ((a = {})["no-app"] = "No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()", a["invalid-app-argument"] = "firebase.{$appName}() takes either no argument or a Firebase App instance.", a), j = new b.ErrorFactory("app-compat", "Firebase", i); }(), i = ((a = {})["no-app"] = "No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()", a["invalid-app-argument"] = "firebase.{$appName}() takes either no argument or a Firebase App instance.", a), j = new b.ErrorFactory("app-compat", "Firebase", i);
function k() { function k() {
var a, d, e, f, i = (a = h, d = function(a) { var a, d, e, f, i, l, m, n, o = function(a) {
if (a = a || g._DEFAULT_ENTRY_NAME, !b.contains(e, a)) throw j.create("no-app", { b.deepExtend(p, a);
}, p = (a = h, d = function(a) {
delete m[a];
}, e = function(a) {
if (a = a || g._DEFAULT_ENTRY_NAME, !b.contains(m, a)) throw j.create("no-app", {
appName: a appName: a
}); });
return e[a]; return m[a];
}, e = {}, (f = { }, f = function() {
return Object.keys(m).map(function(a) {
return m[a];
});
}, i = function(c) {
var d = c.name, f = d.replace("-compat", "");
if (g._registerComponent(c) && "PUBLIC" === c.type) {
var h = function(a) {
if (void 0 === a && (a = e()), "function" != typeof a[f]) throw j.create("invalid-app-argument", {
appName: d
});
return a[f]();
};
void 0 !== c.serviceProps && b.deepExtend(h, c.serviceProps), n[f] = h, a.prototype[f] = function() {
for(var a = [], b = 0; b < arguments.length; b++)a[b] = arguments[b];
return this._getService.bind(this, d).apply(this, c.multipleInstances ? a : []);
};
}
return "PUBLIC" === c.type ? n[f] : null;
}, l = function(a, b) {
return "serverAuth" === b ? null : b;
}, m = {}, (n = {
__esModule: !0, __esModule: !0,
initializeApp: function(c, d) { initializeApp: function(c, d) {
void 0 === d && (d = {}); void 0 === d && (d = {});
var h = g.initializeApp(c, d); var e = g.initializeApp(c, d);
if (b.contains(e, h.name)) return e[h.name]; if (b.contains(m, e.name)) return m[e.name];
var i = new a(h, f); var f = new a(e, n);
return e[h.name] = i, i; return m[e.name] = f, f;
}, },
app: d, app: e,
registerVersion: g.registerVersion, registerVersion: g.registerVersion,
setLogLevel: g.setLogLevel, setLogLevel: g.setLogLevel,
onLog: g.onLog, onLog: g.onLog,
apps: null, apps: null,
SDK_VERSION: g.SDK_VERSION, SDK_VERSION: g.SDK_VERSION,
INTERNAL: { INTERNAL: {
registerComponent: function(c) { registerComponent: i,
var e = c.name, h = e.replace("-compat", ""); removeApp: d,
if (g._registerComponent(c) && "PUBLIC" === c.type) { useAsService: l,
var i = function(a) {
if (void 0 === a && (a = d()), "function" != typeof a[h]) throw j.create("invalid-app-argument", {
appName: e
});
return a[h]();
};
void 0 !== c.serviceProps && b.deepExtend(i, c.serviceProps), f[h] = i, a.prototype[h] = function() {
for(var a = [], b = 0; b < arguments.length; b++)a[b] = arguments[b];
return this._getService.bind(this, e).apply(this, c.multipleInstances ? a : []);
};
}
return "PUBLIC" === c.type ? f[h] : null;
},
removeApp: function(a) {
delete e[a];
},
useAsService: function(a, b) {
return "serverAuth" === b ? null : b;
},
modularAPIs: g modularAPIs: g
} }
}).default = f, Object.defineProperty(f, "apps", { }).default = n, Object.defineProperty(n, "apps", {
get: function() { get: f
return Object.keys(e).map(function(a) { }), e.App = a, n);
return e[a]; return p.INTERNAL = c.__assign(c.__assign({}, p.INTERNAL), {
});
}
}), d.App = a, f);
return i.INTERNAL = c.__assign(c.__assign({}, i.INTERNAL), {
createFirebaseNamespace: k, createFirebaseNamespace: k,
extendNamespace: function(a) { extendNamespace: o,
b.deepExtend(i, a);
},
createSubscribe: b.createSubscribe, createSubscribe: b.createSubscribe,
ErrorFactory: b.ErrorFactory, ErrorFactory: b.ErrorFactory,
deepExtend: b.deepExtend deepExtend: b.deepExtend
}), i; }), p;
} }
var l = k(), m = new f.Logger("@firebase/app-compat"); var l = k(), m = new f.Logger("@firebase/app-compat");
if (b.isBrowser() && void 0 !== self.firebase) { if (b.isBrowser() && void 0 !== self.firebase) {

View File

@ -28,27 +28,33 @@ var m = function(a) {
return c && !d ? -1 : !c && d ? 1 : 0; return c && !d ? -1 : !c && d ? 1 : 0;
}; };
export default function r(i) { export default function r(i) {
var j = i.indexName, k = i.initialState, r = i.searchClient, t = i.resultsState, u = i.stalledSearchDelay, v = function(a) { var j = i.indexName, k = i.initialState, r = i.searchClient, t = i.resultsState, u = i.stalledSearchDelay, v = function() {
return K.getWidgets().filter(function(a) { R = !0;
}, w = function(a) {
l(a), M.setClient(a), A();
}, x = function() {
M.clearCache(), A();
}, y = function(a) {
return U.getWidgets().filter(function(a) {
return Boolean(a.getMetadata); return Boolean(a.getMetadata);
}).map(function(b) { }).map(function(b) {
return b.getMetadata(a); return b.getMetadata(a);
}); });
}, w = function() { }, z = function() {
var d = K.getWidgets().filter(function(a) { var d = U.getWidgets().filter(function(a) {
return Boolean(a.getSearchParameters); return Boolean(a.getSearchParameters);
}).filter(function(a) { }).filter(function(a) {
return !m(a) && !o(a); return !m(a) && !o(a);
}).reduce(function(a, b) { }).reduce(function(a, b) {
return b.getSearchParameters(a); return b.getSearchParameters(a);
}, J), e = K.getWidgets().filter(function(a) { }, T), e = U.getWidgets().filter(function(a) {
return Boolean(a.getSearchParameters); return Boolean(a.getSearchParameters);
}).filter(function(a) { }).filter(function(a) {
var b = m(a) && n(a, j), c = o(a) && p(a, j); var b = m(a) && n(a, j), c = o(a) && p(a, j);
return b || c; return b || c;
}).sort(q).reduce(function(a, b) { }).sort(q).reduce(function(a, b) {
return b.getSearchParameters(a); return b.getSearchParameters(a);
}, d), f = K.getWidgets().filter(function(a) { }, d), f = U.getWidgets().filter(function(a) {
return Boolean(a.getSearchParameters); return Boolean(a.getSearchParameters);
}).filter(function(a) { }).filter(function(a) {
var b = m(a) && !n(a, j), c = o(a) && !p(a, j); var b = m(a) && !n(a, j), c = o(a) && !p(a, j);
@ -68,49 +74,61 @@ export default function r(i) {
mainParameters: e, mainParameters: e,
derivedParameters: g derivedParameters: g
}; };
}, x = function() { }, A = function() {
if (!H) { if (!R) {
var a = w(C.state), b = a.mainParameters, c = a.derivedParameters; var a = z(M.state), b = a.mainParameters, c = a.derivedParameters;
C.derivedHelpers.slice().forEach(function(a) { M.derivedHelpers.slice().forEach(function(a) {
a.detach(); a.detach();
}), c.forEach(function(a) { }), c.forEach(function(a) {
var b = a.indexId, c = a.parameters, d = C.derive(function() { var b = a.indexId, c = a.parameters, d = M.derive(function() {
return c; return c;
}); });
d.on("result", y({ d.on("result", B({
indexId: b indexId: b
})).on("error", z); })).on("error", C);
}), C.setState(b), C.search(); }), M.setState(b), M.search();
} }
}, y = function(e) { }, B = function(e) {
var f = e.indexId; var f = e.indexId;
return function(e) { return function(e) {
var g = L.getState(), h = !C.derivedHelpers.length, i = g.results ? g.results : {}; var g = V.getState(), h = !M.derivedHelpers.length, i = g.results ? g.results : {};
i = !h && i.getFacetByName ? {} : i, i = h ? e.results : c(b({}, i), a({}, f, e.results)); i = !h && i.getFacetByName ? {} : i, i = h ? e.results : c(b({}, i), a({}, f, e.results));
var j = L.getState(), k = j.isSearchStalled; var j = V.getState(), k = j.isSearchStalled;
C.hasPendingRequests() || (clearTimeout(I), I = null, k = !1), j.resultsFacetValues; M.hasPendingRequests() || (clearTimeout(S), S = null, k = !1), j.resultsFacetValues;
var l = d(j, [ var l = d(j, [
"resultsFacetValues" "resultsFacetValues"
]); ]);
L.setState(c(b({}, l), { V.setState(c(b({}, l), {
results: i, results: i,
isSearchStalled: k, isSearchStalled: k,
searching: !1, searching: !1,
error: null error: null
})); }));
}; };
}, z = function(a) { }, C = function(a) {
var e = a.error, f = L.getState(), g = f.isSearchStalled; var e = a.error, f = V.getState(), g = f.isSearchStalled;
C.hasPendingRequests() || (clearTimeout(I), g = !1), f.resultsFacetValues; M.hasPendingRequests() || (clearTimeout(S), g = !1), f.resultsFacetValues;
var h = d(f, [ var h = d(f, [
"resultsFacetValues" "resultsFacetValues"
]); ]);
L.setState(c(b({}, h), { V.setState(c(b({}, h), {
isSearchStalled: g, isSearchStalled: g,
error: e, error: e,
searching: !1 searching: !1
})); }));
}, A = function(d, e) { }, D = function() {
if (!S) {
var a;
S = setTimeout(function() {
var a = V.getState(), e = (a.resultsFacetValues, d(a, [
"resultsFacetValues"
]));
V.setState(c(b({}, e), {
isSearchStalled: !0
}));
}, u);
}
}, E = function(d, e) {
if (d.transporter) { if (d.transporter) {
d.transporter.responsesCache.set({ d.transporter.responsesCache.set({
method: "search", method: "search",
@ -146,7 +164,7 @@ export default function r(i) {
return a.concat(b.rawResults); return a.concat(b.rawResults);
}, []) }, [])
}))); })));
}, B = function(d, e) { }, F = function(d, e) {
if (d.transporter) { if (d.transporter) {
d.transporter.responsesCache.set({ d.transporter.responsesCache.set({
method: "search", method: "search",
@ -174,29 +192,58 @@ export default function r(i) {
d.cache = c(b({}, d.cache), a({}, f, JSON.stringify({ d.cache = c(b({}, d.cache), a({}, f, JSON.stringify({
results: e.rawResults results: e.rawResults
}))); })));
}, C = f(r, j, b({}, h)); }, G = function() {
l(r), C.on("search", function() { var a = y(V.getState().widgets);
if (!I) { V.setState(c(b({}, V.getState()), {
var a;
I = setTimeout(function() {
var a = L.getState(), e = (a.resultsFacetValues, d(a, [
"resultsFacetValues"
]));
L.setState(c(b({}, e), {
isSearchStalled: !0
}));
}, u);
}
}).on("result", y({
indexId: j
})).on("error", z);
var D, E, F, G, H = !1, I = null, J = C.state, K = g(function() {
var a = v(L.getState().widgets);
L.setState(c(b({}, L.getState()), {
metadata: a, metadata: a,
searching: !0 searching: !0
})), x(); })), A();
}, H = function(a) {
var b = V.getState().widgets;
return U.getWidgets().filter(function(a) {
return Boolean(a.transitionState);
}).reduce(function(a, c) {
return c.transitionState(b, a);
}, a);
}, I = function(a) {
var d = y(a);
V.setState(c(b({}, V.getState()), {
widgets: a,
metadata: d,
searching: !0
})), A();
}, J = function(d) {
var e = d.facetName, f = d.query, g = d.maxFacetHits;
V.setState(c(b({}, V.getState()), {
searchingForFacetValues: !0
})), M.searchForFacetValues(e, f, Math.max(1, Math.min(void 0 === g ? 10 : g, 100))).then(function(d) {
var g;
V.setState(c(b({}, V.getState()), {
error: null,
searchingForFacetValues: !1,
resultsFacetValues: c(b({}, V.getState().resultsFacetValues), (a(g = {}, e, d.facetHits), a(g, "query", f), g))
}));
}, function(a) {
V.setState(c(b({}, V.getState()), {
searchingForFacetValues: !1,
error: a
}));
}).catch(function(a) {
setTimeout(function() {
throw a;
}); });
});
}, K = function(a) {
T = T.setIndex(a);
}, L = function() {
return V.getState().metadata.reduce(function(a, b) {
return void 0 !== b.id ? a.concat(b.id) : a;
}, []);
}, M = f(r, j, b({}, h));
l(r), M.on("search", D).on("result", B({
indexId: j
})).on("error", C);
var N, O, P, Q, R = !1, S = null, T = M.state, U = g(G);
!function(a, d) { !function(a, d) {
if (d && (a.transporter && !a._cacheHydrated || a._useCache && "function" == typeof a.addAlgoliaAgent)) { if (d && (a.transporter && !a._cacheHydrated || a._useCache && "function" == typeof a.addAlgoliaAgent)) {
if (a.transporter && !a._cacheHydrated) { if (a.transporter && !a._cacheHydrated) {
@ -232,96 +279,49 @@ export default function r(i) {
}; };
} }
if (Array.isArray(d.results)) { if (Array.isArray(d.results)) {
A(a, d.results); E(a, d.results);
return; return;
} }
B(a, d); F(a, d);
} }
}(r, t); }(r, t);
var L = (F = E = { var V = (P = O = {
widgets: void 0 === k ? {} : k, widgets: void 0 === k ? {} : k,
metadata: s(t), metadata: s(t),
results: (D = t) ? Array.isArray(D.results) ? D.results.reduce(function(d, e) { results: (N = t) ? Array.isArray(N.results) ? N.results.reduce(function(d, e) {
return c(b({}, d), a({}, e._internalIndexId, new f.SearchResults(new f.SearchParameters(e.state), e.rawResults))); return c(b({}, d), a({}, e._internalIndexId, new f.SearchResults(new f.SearchParameters(e.state), e.rawResults)));
}, {}) : new f.SearchResults(new f.SearchParameters(D.state), D.rawResults) : null, }, {}) : new f.SearchResults(new f.SearchParameters(N.state), N.rawResults) : null,
error: null, error: null,
searching: !1, searching: !1,
isSearchStalled: !0, isSearchStalled: !0,
searchingForFacetValues: !1 searchingForFacetValues: !1
}, G = [], { }, Q = [], {
getState: function() { getState: function() {
return F; return P;
}, },
setState: function(a) { setState: function(a) {
F = a, G.forEach(function(a) { P = a, Q.forEach(function(a) {
return a(); return a();
}); });
}, },
subscribe: function(a) { subscribe: function(a) {
return G.push(a), function() { return Q.push(a), function() {
G.splice(G.indexOf(a), 1); Q.splice(Q.indexOf(a), 1);
}; };
} }
}); });
return { return {
store: L, store: V,
widgetsManager: K, widgetsManager: U,
getWidgetsIds: function() { getWidgetsIds: L,
return L.getState().metadata.reduce(function(a, b) { getSearchParameters: z,
return void 0 !== b.id ? a.concat(b.id) : a; onSearchForFacetValues: J,
}, []); onExternalStateUpdate: I,
}, transitionState: H,
getSearchParameters: w, updateClient: w,
onSearchForFacetValues: function(d) { updateIndex: K,
var e = d.facetName, f = d.query, g = d.maxFacetHits; clearCache: x,
L.setState(c(b({}, L.getState()), { skipSearch: v
searchingForFacetValues: !0
})), C.searchForFacetValues(e, f, Math.max(1, Math.min(void 0 === g ? 10 : g, 100))).then(function(d) {
var g;
L.setState(c(b({}, L.getState()), {
error: null,
searchingForFacetValues: !1,
resultsFacetValues: c(b({}, L.getState().resultsFacetValues), (a(g = {}, e, d.facetHits), a(g, "query", f), g))
}));
}, function(a) {
L.setState(c(b({}, L.getState()), {
searchingForFacetValues: !1,
error: a
}));
}).catch(function(a) {
setTimeout(function() {
throw a;
});
});
},
onExternalStateUpdate: function(a) {
var d = v(a);
L.setState(c(b({}, L.getState()), {
widgets: a,
metadata: d,
searching: !0
})), x();
},
transitionState: function(a) {
var b = L.getState().widgets;
return K.getWidgets().filter(function(a) {
return Boolean(a.transitionState);
}).reduce(function(a, c) {
return c.transitionState(b, a);
}, a);
},
updateClient: function(a) {
l(a), C.setClient(a), x();
},
updateIndex: function(a) {
J = J.setIndex(a);
},
clearCache: function() {
C.clearCache(), x();
},
skipSearch: function() {
H = !0;
}
}; };
}; };
function s(a) { function s(a) {

View File

@ -258,6 +258,8 @@ where
if v_usage.reassigned() { if v_usage.reassigned() {
return; return;
} }
} else {
return;
} }
} }
} }
@ -272,6 +274,8 @@ where
if v_usage.reassigned() { if v_usage.reassigned() {
return; return;
} }
} else {
return;
} }
} }
} }
@ -297,6 +301,12 @@ where
} }
} }
if !usage.used_as_callee {
if let Expr::Fn(..) | Expr::Arrow(..) = &**init {
return;
}
}
if usage.used_as_arg && !usage.is_fn_local { if usage.used_as_arg && !usage.is_fn_local {
if let Expr::Fn(..) | Expr::Arrow(..) = &**init { if let Expr::Fn(..) | Expr::Arrow(..) = &**init {
return; return;

View File

@ -9,6 +9,7 @@ createCommonjsModule(function(module, exports) {
}), createCommonjsModule(function(module) { }), createCommonjsModule(function(module) {
module.exports = { module.exports = {
findConfig: function(from) { findConfig: function(from) {
var resolved;
return function(dir) { return function(dir) {
throw Error(""); throw Error("");
}; };

View File

@ -67,8 +67,7 @@
alignItems: "center", alignItems: "center",
margin: "100px 0", margin: "100px 0",
color: "#ed3131" color: "#ed3131"
}; }, ErrorBoundaryFallback = function(param) {
exports.default = function(param) {
var error, componentStack, componentStack1 = param.componentStack, error1 = param.error; var error, componentStack, componentStack1 = param.componentStack, error1 = param.error;
return _jsxRuntime.jsxs("div", { return _jsxRuntime.jsxs("div", {
style: style, style: style,
@ -100,6 +99,7 @@
] ]
}); });
}; };
exports.default = ErrorBoundaryFallback;
}, },
11179: function(__unused_webpack_module, exports, __webpack_require__) { 11179: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
@ -164,22 +164,22 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0; }), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _runtime = swcHelpers.interopRequireDefault(__webpack_require__(66902)), _runtime1 = swcHelpers.interopRequireDefault(__webpack_require__(2526)), _runtime2 = swcHelpers.interopRequireDefault(__webpack_require__(8900)); var swcHelpers = __webpack_require__(547), _runtime = swcHelpers.interopRequireDefault(__webpack_require__(66902)), _runtime1 = swcHelpers.interopRequireDefault(__webpack_require__(2526)), _runtime2 = swcHelpers.interopRequireDefault(__webpack_require__(8900)), _default = function(runtime) {
exports.default = function(runtime) {
runtime.loadModule(_runtime.default), runtime.loadModule(_runtime1.default), runtime.loadModule(_runtime2.default); runtime.loadModule(_runtime.default), runtime.loadModule(_runtime1.default), runtime.loadModule(_runtime2.default);
}; };
exports.default = _default;
}, },
98565: function(__unused_webpack_module, exports, __webpack_require__) { 98565: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0; }), exports.default = void 0;
var _runtime = __webpack_require__(547).interopRequireDefault(__webpack_require__(53380)); var _runtime = __webpack_require__(547).interopRequireDefault(__webpack_require__(53380)), _default = function(appConfig) {
exports.default = function(appConfig) {
_runtime.default({ _runtime.default({
appConfig: appConfig appConfig: appConfig
}); });
}; };
exports.default = _default;
}, },
8000: function(__unused_webpack_module, exports, __webpack_require__) { 8000: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
@ -219,17 +219,30 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0, exports.default = function(param) { }), exports.default = void 0;
var module = function(param) {
var addProvider = param.addProvider, appConfig = param.appConfig; var addProvider = param.addProvider, appConfig = param.appConfig;
appConfig.app && appConfig.app.addProvider && addProvider(appConfig.app.addProvider); appConfig.app && appConfig.app.addProvider && addProvider(appConfig.app.addProvider);
}; };
exports.default = module;
}, },
45440: function(__unused_webpack_module, exports, __webpack_require__) { 45440: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.Provider = exports.withAuth = exports.useAuth = void 0; }), exports.Provider = exports.withAuth = exports.useAuth = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _react = __webpack_require__(59301), Context = _react.createContext(null), useAuth = function() { var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _react = __webpack_require__(59301), Context = _react.createContext(null), Provider = function(param) {
var _value = param.value, children = param.children, ref = _react.useState(void 0 === _value ? {} : _value), state = ref[0], setState = ref[1], updateState = function(param) {
setState(swcHelpers.objectSpread({}, state, void 0 === param ? {} : param));
};
return _jsxRuntime.jsx(Context.Provider, {
value: [
state,
updateState
],
children: children
});
}, useAuth = function() {
return _react.useContext(Context); return _react.useContext(Context);
}; };
exports.useAuth = useAuth, exports.withAuth = function(Component) { exports.useAuth = useAuth, exports.withAuth = function(Component) {
@ -240,36 +253,23 @@
setAuth: setAuth setAuth: setAuth
})); }));
}; };
}, exports.Provider = function(param) { }, exports.Provider = Provider;
var _value = param.value, children = param.children, ref = _react.useState(void 0 === _value ? {} : _value), state = ref[0], setState = ref[1];
return _jsxRuntime.jsx(Context.Provider, {
value: [
state,
function(param) {
setState(swcHelpers.objectSpread({}, state, void 0 === param ? {} : param));
}
],
children: children
});
};
}, },
8900: function(__unused_webpack_module, exports, __webpack_require__) { 8900: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0; }), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _auth = __webpack_require__(45440); var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _auth = __webpack_require__(45440), _default = function(param) {
exports.default = function(param) { var authConfig, context = param.context, appConfig = param.appConfig, addProvider = param.addProvider, wrapperPageComponent = param.wrapperPageComponent, initialData = context && context.initialData ? context.initialData : {}, initialAuth = initialData.auth || {}, authConfig1 = appConfig.auth || {}, AuthStoreProvider = function(param) {
var authConfig, context = param.context, appConfig = param.appConfig, addProvider = param.addProvider, wrapperPageComponent = param.wrapperPageComponent, initialData = context && context.initialData ? context.initialData : {}, initialAuth = initialData.auth || {}, authConfig1 = appConfig.auth || {};
addProvider(function(param) {
var children = param.children; var children = param.children;
return _jsxRuntime.jsx(_auth.Provider, { return _jsxRuntime.jsx(_auth.Provider, {
value: initialAuth, value: initialAuth,
children: children children: children
}); });
}), wrapperPageComponent((authConfig = authConfig1, function(PageComponent) { };
var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig; addProvider(AuthStoreProvider), wrapperPageComponent((authConfig = authConfig1, function(PageComponent) {
return _auth.withAuth(function(props) { var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig, AuthWrappedComponent = function(props) {
var auth = props.auth, rest = (props.setAuth, swcHelpers.objectWithoutProperties(props, [ var auth = props.auth, rest = (props.setAuth, swcHelpers.objectWithoutProperties(props, [
"auth", "auth",
"setAuth", "setAuth",
@ -278,9 +278,11 @@
return Array.isArray(pageConfigAuth) && pageConfigAuth.length && !Object.keys(auth).filter(function(item) { return Array.isArray(pageConfigAuth) && pageConfigAuth.length && !Object.keys(auth).filter(function(item) {
return !!pageConfigAuth.includes(item) && auth[item]; return !!pageConfigAuth.includes(item) && auth[item];
}).length ? authConfig.NoAuthFallback ? "function" == typeof authConfig.NoAuthFallback ? _jsxRuntime.jsx(authConfig.NoAuthFallback, {}) : authConfig.NoAuthFallback : null : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, rest)); }).length ? authConfig.NoAuthFallback ? "function" == typeof authConfig.NoAuthFallback ? _jsxRuntime.jsx(authConfig.NoAuthFallback, {}) : authConfig.NoAuthFallback : null : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, rest));
}); };
return _auth.withAuth(AuthWrappedComponent);
})); }));
}; };
exports.default = _default;
}, },
1481: function(__unused_webpack_module, exports, __webpack_require__) { 1481: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
@ -289,21 +291,33 @@
}), exports.default = void 0; }), exports.default = void 0;
var _runtime = __webpack_require__(56128), DEFAULE_CONFIG = {}, axiosInstance = { var _runtime = __webpack_require__(56128), DEFAULE_CONFIG = {}, axiosInstance = {
default: _runtime.axios.create(DEFAULE_CONFIG) default: _runtime.axios.create(DEFAULE_CONFIG)
}; }, _default = function(instanceName) {
exports.default = function(instanceName) {
if (instanceName) { if (instanceName) {
if (axiosInstance[instanceName]) return axiosInstance; if (axiosInstance[instanceName]) return axiosInstance;
axiosInstance[instanceName] = _runtime.axios.create(DEFAULE_CONFIG); axiosInstance[instanceName] = _runtime.axios.create(DEFAULE_CONFIG);
} }
return axiosInstance; return axiosInstance;
}; };
exports.default = _default;
}, },
53380: function(__unused_webpack_module, exports, __webpack_require__) { 53380: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0; }), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _createAxiosInstance = swcHelpers.interopRequireDefault(__webpack_require__(1481)); var swcHelpers = __webpack_require__(547), _createAxiosInstance = swcHelpers.interopRequireDefault(__webpack_require__(1481)), module = function(param) {
var appConfig = param.appConfig;
if (appConfig.request) {
var tmp = appConfig.request, requestConfig = void 0 === tmp ? {} : tmp;
"[object Array]" === Object.prototype.toString.call(requestConfig) ? requestConfig.forEach(function(requestItem) {
var instanceName = requestItem.instanceName ? requestItem.instanceName : "default";
if (instanceName) {
var axiosInstance = _createAxiosInstance.default(instanceName)[instanceName];
setAxiosInstance(requestItem, axiosInstance);
}
}) : setAxiosInstance(requestConfig, _createAxiosInstance.default().default);
}
};
function setAxiosInstance(requestConfig, axiosInstance) { function setAxiosInstance(requestConfig, axiosInstance) {
var _interceptors = requestConfig.interceptors, interceptors = void 0 === _interceptors ? {} : _interceptors, requestOptions = swcHelpers.objectWithoutProperties(requestConfig, [ var _interceptors = requestConfig.interceptors, interceptors = void 0 === _interceptors ? {} : _interceptors, requestOptions = swcHelpers.objectWithoutProperties(requestConfig, [
"interceptors" "interceptors"
@ -320,19 +334,7 @@
return Promise.reject(error); return Promise.reject(error);
}); });
} }
exports.default = function(param) { exports.default = module;
var appConfig = param.appConfig;
if (appConfig.request) {
var tmp = appConfig.request, requestConfig = void 0 === tmp ? {} : tmp;
"[object Array]" === Object.prototype.toString.call(requestConfig) ? requestConfig.forEach(function(requestItem) {
var instanceName = requestItem.instanceName ? requestItem.instanceName : "default";
if (instanceName) {
var axiosInstance = _createAxiosInstance.default(instanceName)[instanceName];
setAxiosInstance(requestItem, axiosInstance);
}
}) : setAxiosInstance(requestConfig, _createAxiosInstance.default().default);
}
};
}, },
2526: function(__unused_webpack_module, exports, __webpack_require__) { 2526: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
@ -340,23 +342,21 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0; }), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _errorBoundary = swcHelpers.interopRequireDefault(__webpack_require__(11179)), _routes = swcHelpers.interopRequireDefault(__webpack_require__(72791)), _router = __webpack_require__(37447), _formatRoutes = swcHelpers.interopRequireWildcard(__webpack_require__(14710)); var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _errorBoundary = swcHelpers.interopRequireDefault(__webpack_require__(11179)), _routes = swcHelpers.interopRequireDefault(__webpack_require__(72791)), _router = __webpack_require__(37447), _formatRoutes = swcHelpers.interopRequireWildcard(__webpack_require__(14710)), module = function(param) {
exports.default = function(param) { var setRenderApp = param.setRenderApp, appConfig = param.appConfig, modifyRoutes = param.modifyRoutes, wrapperPageComponent = param.wrapperPageComponent, modifyRoutesComponent = param.modifyRoutesComponent, buildConfig = param.buildConfig, context = param.context, applyRuntimeAPI = param.applyRuntimeAPI, tmp = appConfig.router, appConfigRouter = void 0 === tmp ? {} : tmp, _app = appConfig.app, app = void 0 === _app ? {} : _app, ErrorBoundaryFallback = app.ErrorBoundaryFallback, onErrorBoundaryHandler = app.onErrorBoundaryHandler, _parseSearchParams = app.parseSearchParams, parseSearchParams = void 0 === _parseSearchParams || _parseSearchParams, WrappedPageComponent = function(PageComponent) {
var setRenderApp = param.setRenderApp, appConfig = param.appConfig, modifyRoutes = param.modifyRoutes, wrapperPageComponent = param.wrapperPageComponent, modifyRoutesComponent = param.modifyRoutesComponent, buildConfig = param.buildConfig, context = param.context, applyRuntimeAPI = param.applyRuntimeAPI, tmp = appConfig.router, appConfigRouter = void 0 === tmp ? {} : tmp, _app = appConfig.app, app = void 0 === _app ? {} : _app, ErrorBoundaryFallback = app.ErrorBoundaryFallback, onErrorBoundaryHandler = app.onErrorBoundaryHandler, _parseSearchParams = app.parseSearchParams, parseSearchParams = void 0 === _parseSearchParams || _parseSearchParams;
wrapperPageComponent(function(PageComponent) {
return function(props) { return function(props) {
var searchParams = parseSearchParams && applyRuntimeAPI("getSearchParams"); var searchParams = parseSearchParams && applyRuntimeAPI("getSearchParams");
return _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, { return _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, {
searchParams: searchParams searchParams: searchParams
}))); })));
}; };
}), modifyRoutes(function() { };
wrapperPageComponent(WrappedPageComponent), modifyRoutes(function() {
return _formatRoutes.default(appConfigRouter.routes || _routes.default, ""); return _formatRoutes.default(appConfigRouter.routes || _routes.default, "");
}), modifyRoutesComponent(function() { }), modifyRoutesComponent(function() {
return _router.Routes; return _router.Routes;
}); });
var wrapperPageFn = process.env.__IS_SERVER__ ? _formatRoutes.wrapperPageWithSSR(context) : _formatRoutes.wrapperPageWithCSR(); var wrapperPageErrorBoundary = function(PageComponent) {
wrapperPageComponent(wrapperPageFn), wrapperPageComponent(function(PageComponent) {
var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig; var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig;
return function(props) { return function(props) {
return pageConfig.errorBoundary ? _jsxRuntime.jsx(_errorBoundary.default, { return pageConfig.errorBoundary ? _jsxRuntime.jsx(_errorBoundary.default, {
@ -365,9 +365,9 @@
children: _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props)) children: _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props))
}) : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props)); }) : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props));
}; };
}), appConfigRouter.modifyRoutes && modifyRoutes(appConfigRouter.modifyRoutes); }, wrapperPageFn = process.env.__IS_SERVER__ ? _formatRoutes.wrapperPageWithSSR(context) : _formatRoutes.wrapperPageWithCSR();
var lazy = buildConfig && buildConfig.router && buildConfig.router.lazy; wrapperPageComponent(wrapperPageFn), wrapperPageComponent(wrapperPageErrorBoundary), appConfigRouter.modifyRoutes && modifyRoutes(appConfigRouter.modifyRoutes);
setRenderApp(function(routes, RoutesComponent, param) { var lazy = buildConfig && buildConfig.router && buildConfig.router.lazy, renderRouter = function(routes, RoutesComponent, param) {
var customRouterProps = void 0 === param ? {} : param; var customRouterProps = void 0 === param ? {} : param;
return function() { return function() {
var routerProps = swcHelpers.objectSpread({}, appConfigRouter, { var routerProps = swcHelpers.objectSpread({}, appConfigRouter, {
@ -393,8 +393,10 @@
}) : null }) : null
})); }));
}; };
});
}; };
setRenderApp(renderRouter);
};
exports.default = module;
}, },
37447: function(__unused_webpack_module, exports, __webpack_require__) { 37447: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
@ -576,7 +578,8 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0, exports.default = function() { }), exports.default = void 0;
var _default = function() {
for(var _len = arguments.length, strArray = Array(_len), _key = 0; _key < _len; _key++)strArray[_key] = arguments[_key]; for(var _len = arguments.length, strArray = Array(_len), _key = 0; _key < _len; _key++)strArray[_key] = arguments[_key];
if (0 === strArray.length) return ""; if (0 === strArray.length) return "";
var resultArray = [], filterStrArray = strArray.filter(function(str) { var resultArray = [], filterStrArray = strArray.filter(function(str) {
@ -588,14 +591,14 @@
index > 0 && (routePath = routePath.replace(/^[/]+/, "")), routePath = index < filterStrArray.length - 1 ? routePath.replace(/[/]+$/, "") : routePath.replace(/[/]+$/, "/"), resultArray.push(routePath); index > 0 && (routePath = routePath.replace(/^[/]+/, "")), routePath = index < filterStrArray.length - 1 ? routePath.replace(/[/]+$/, "") : routePath.replace(/[/]+$/, "/"), resultArray.push(routePath);
}), resultArray.join("/"); }), resultArray.join("/");
}; };
exports.default = _default;
}, },
56905: function(__unused_webpack_module, exports, __webpack_require__) { 56905: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0; }), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _indexModuleScss = swcHelpers.interopRequireDefault(__webpack_require__(89704)); var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _indexModuleScss = swcHelpers.interopRequireDefault(__webpack_require__(89704)), Guide = function() {
exports.default = function() {
return _jsxRuntime.jsxs("div", { return _jsxRuntime.jsxs("div", {
className: _indexModuleScss.default.container, className: _indexModuleScss.default.container,
children: [ children: [
@ -630,16 +633,17 @@
] ]
}); });
}; };
exports.default = Guide;
}, },
43361: function(__unused_webpack_module, exports, __webpack_require__) { 43361: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: !0 value: !0
}), exports.default = void 0; }), exports.default = void 0;
var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _guide = swcHelpers.interopRequireDefault(__webpack_require__(56905)); var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _guide = swcHelpers.interopRequireDefault(__webpack_require__(56905)), Home = function() {
exports.default = function() {
return console.log(1), _jsxRuntime.jsx(_guide.default, {}); return console.log(1), _jsxRuntime.jsx(_guide.default, {});
}; };
exports.default = Home;
}, },
72791: function(__unused_webpack_module, exports, __webpack_require__) { 72791: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";
@ -742,11 +746,11 @@
}); });
}; };
return Component.displayName && (LoadableWithChunkExtractor.displayName = Component.displayName + "WithChunkExtractor"), LoadableWithChunkExtractor; return Component.displayName && (LoadableWithChunkExtractor.displayName = Component.displayName + "WithChunkExtractor"), LoadableWithChunkExtractor;
}, identity = function(v) {
return v;
}; };
function createLoadable(_ref) { function createLoadable(_ref) {
var _ref$defaultResolveCo = _ref.defaultResolveComponent, defaultResolveComponent = void 0 === _ref$defaultResolveCo ? function(v) { var _ref$defaultResolveCo = _ref.defaultResolveComponent, defaultResolveComponent = void 0 === _ref$defaultResolveCo ? identity : _ref$defaultResolveCo, _render = _ref.render, onLoad = _ref.onLoad;
return v;
} : _ref$defaultResolveCo, _render = _ref.render, onLoad = _ref.onLoad;
function loadable(loadableConstructor, options) { function loadable(loadableConstructor, options) {
void 0 === options && (options = {}); void 0 === options && (options = {});
var ctor, ctor1 = "function" == typeof (ctor = loadableConstructor) ? { var ctor, ctor1 = "function" == typeof (ctor = loadableConstructor) ? {
@ -1208,11 +1212,11 @@
void 0 !== element.descriptor.get ? other.descriptor.get = element.descriptor.get : other.descriptor.set = element.descriptor.set; void 0 !== element.descriptor.get ? other.descriptor.get = element.descriptor.get : other.descriptor.set = element.descriptor.set;
} }
function _coalesceClassElements(elements) { function _coalesceClassElements(elements) {
for(var newElements = [], i = 0; i < elements.length; i++){ for(var newElements = [], isSameElement = function(other) {
var other, element = elements[i];
if ("method" === element.kind && (other = newElements.find(function(other) {
return "method" === other.kind && other.key === element.key && other.placement === element.placement; return "method" === other.kind && other.key === element.key && other.placement === element.placement;
}))) { }, i = 0; i < elements.length; i++){
var other, element = elements[i];
if ("method" === element.kind && (other = newElements.find(isSameElement))) {
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) { if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
if (_hasDecorators(element) || _hasDecorators(other)) throw ReferenceError("Duplicated methods (" + element.key + ") can't be decorated."); if (_hasDecorators(element) || _hasDecorators(other)) throw ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
other.descriptor = element.descriptor; other.descriptor = element.descriptor;
@ -2693,10 +2697,46 @@
}, BigIntArrayConstructorsList = { }, BigIntArrayConstructorsList = {
BigInt64Array: 8, BigInt64Array: 8,
BigUint64Array: 8 BigUint64Array: 8
}, isView = function(it) {
if (!isObject(it)) return !1;
var klass = classof(it);
return "DataView" === klass || has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass);
}, isTypedArray = function(it) { }, isTypedArray = function(it) {
if (!isObject(it)) return !1; if (!isObject(it)) return !1;
var klass = classof(it); var klass = classof(it);
return has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass); return has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass);
}, aTypedArray = function(it) {
if (isTypedArray(it)) return it;
throw TypeError("Target is not a typed array");
}, aTypedArrayConstructor = function(C) {
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;
throw TypeError(tryToString(C) + " is not a typed array constructor");
}, exportTypedArrayMethod = function(KEY, property, forced) {
if (DESCRIPTORS) {
if (forced) for(var ARRAY in TypedArrayConstructorsList){
var TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {
delete TypedArrayConstructor.prototype[KEY];
} catch (error) {}
}
(!TypedArrayPrototype[KEY] || forced) && redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
}
}, exportTypedArrayStaticMethod = function(KEY, property, forced) {
var ARRAY, TypedArrayConstructor;
if (DESCRIPTORS) {
if (setPrototypeOf) {
if (forced) {
for(ARRAY in TypedArrayConstructorsList)if ((TypedArrayConstructor = global[ARRAY]) && has(TypedArrayConstructor, KEY)) try {
delete TypedArrayConstructor[KEY];
} catch (error) {}
}
if (TypedArray[KEY] && !forced) return;
try {
return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
} catch (error1) {}
}
for(ARRAY in TypedArrayConstructorsList)(TypedArrayConstructor = global[ARRAY]) && (!TypedArrayConstructor[KEY] || forced) && redefine(TypedArrayConstructor, KEY, property);
}
}; };
for(NAME in TypedArrayConstructorsList)(Prototype = (Constructor = global[NAME]) && Constructor.prototype) ? createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor) : NATIVE_ARRAY_BUFFER_VIEWS = !1; for(NAME in TypedArrayConstructorsList)(Prototype = (Constructor = global[NAME]) && Constructor.prototype) ? createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor) : NATIVE_ARRAY_BUFFER_VIEWS = !1;
for(NAME in BigIntArrayConstructorsList)(Prototype = (Constructor = global[NAME]) && Constructor.prototype) && createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor); for(NAME in BigIntArrayConstructorsList)(Prototype = (Constructor = global[NAME]) && Constructor.prototype) && createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
@ -2713,47 +2753,11 @@
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS, NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR, TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG, TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
aTypedArray: function(it) { aTypedArray: aTypedArray,
if (isTypedArray(it)) return it; aTypedArrayConstructor: aTypedArrayConstructor,
throw TypeError("Target is not a typed array"); exportTypedArrayMethod: exportTypedArrayMethod,
}, exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
aTypedArrayConstructor: function(C) { isView: isView,
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;
throw TypeError(tryToString(C) + " is not a typed array constructor");
},
exportTypedArrayMethod: function(KEY, property, forced) {
if (DESCRIPTORS) {
if (forced) for(var ARRAY in TypedArrayConstructorsList){
var TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {
delete TypedArrayConstructor.prototype[KEY];
} catch (error) {}
}
(!TypedArrayPrototype[KEY] || forced) && redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
}
},
exportTypedArrayStaticMethod: function(KEY, property, forced) {
var ARRAY, TypedArrayConstructor;
if (DESCRIPTORS) {
if (setPrototypeOf) {
if (forced) {
for(ARRAY in TypedArrayConstructorsList)if ((TypedArrayConstructor = global[ARRAY]) && has(TypedArrayConstructor, KEY)) try {
delete TypedArrayConstructor[KEY];
} catch (error) {}
}
if (TypedArray[KEY] && !forced) return;
try {
return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
} catch (error1) {}
}
for(ARRAY in TypedArrayConstructorsList)(TypedArrayConstructor = global[ARRAY]) && (!TypedArrayConstructor[KEY] || forced) && redefine(TypedArrayConstructor, KEY, property);
}
},
isView: function(it) {
if (!isObject(it)) return !1;
var klass = classof(it);
return "DataView" === klass || has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass);
},
isTypedArray: isTypedArray, isTypedArray: isTypedArray,
TypedArray: TypedArray, TypedArray: TypedArray,
TypedArrayPrototype: TypedArrayPrototype TypedArrayPrototype: TypedArrayPrototype
@ -3412,14 +3416,14 @@
}, },
10536: function(module, __unused_webpack_exports, __webpack_require__) { 10536: function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
var IteratorPrototype = __webpack_require__(65400).IteratorPrototype, create = __webpack_require__(18255), createPropertyDescriptor = __webpack_require__(93608), setToStringTag = __webpack_require__(77875), Iterators = __webpack_require__(25463); var IteratorPrototype = __webpack_require__(65400).IteratorPrototype, create = __webpack_require__(18255), createPropertyDescriptor = __webpack_require__(93608), setToStringTag = __webpack_require__(77875), Iterators = __webpack_require__(25463), returnThis = function() {
return this;
};
module.exports = function(IteratorConstructor, NAME, next) { module.exports = function(IteratorConstructor, NAME, next) {
var TO_STRING_TAG = NAME + " Iterator"; var TO_STRING_TAG = NAME + " Iterator";
return IteratorConstructor.prototype = create(IteratorPrototype, { return IteratorConstructor.prototype = create(IteratorPrototype, {
next: createPropertyDescriptor(1, next) next: createPropertyDescriptor(1, next)
}), setToStringTag(IteratorConstructor, TO_STRING_TAG, !1, !0), Iterators[TO_STRING_TAG] = function() { }), setToStringTag(IteratorConstructor, TO_STRING_TAG, !1, !0), Iterators[TO_STRING_TAG] = returnThis, IteratorConstructor;
return this;
}, IteratorConstructor;
}; };
}, },
48181: function(module, __unused_webpack_exports, __webpack_require__) { 48181: function(module, __unused_webpack_exports, __webpack_require__) {
@ -3859,15 +3863,12 @@
}); });
}, },
43571: function(module) { 43571: function(module) {
var abs = Math.abs, pow = Math.pow, floor = Math.floor, log = Math.log, LN2 = Math.LN2; var abs = Math.abs, pow = Math.pow, floor = Math.floor, log = Math.log, LN2 = Math.LN2, pack = function(number, mantissaLength, bytes) {
module.exports = {
pack: function(number, mantissaLength, bytes) {
var exponent, mantissa, c, buffer = Array(bytes), exponentLength = 8 * bytes - mantissaLength - 1, eMax = (1 << exponentLength) - 1, eBias = eMax >> 1, rt = 23 === mantissaLength ? pow(2, -24) - pow(2, -77) : 0, sign = number < 0 || 0 === number && 1 / number < 0 ? 1 : 0, index = 0; var exponent, mantissa, c, buffer = Array(bytes), exponentLength = 8 * bytes - mantissaLength - 1, eMax = (1 << exponentLength) - 1, eBias = eMax >> 1, rt = 23 === mantissaLength ? pow(2, -24) - pow(2, -77) : 0, sign = number < 0 || 0 === number && 1 / number < 0 ? 1 : 0, index = 0;
for((number = abs(number)) != number || number === 1 / 0 ? (mantissa = number != number ? 1 : 0, exponent = eMax) : (exponent = floor(log(number) / LN2), number * (c = pow(2, -exponent)) < 1 && (exponent--, c *= 2), exponent + eBias >= 1 ? number += rt / c : number += rt * pow(2, 1 - eBias), number * c >= 2 && (exponent++, c /= 2), exponent + eBias >= eMax ? (mantissa = 0, exponent = eMax) : exponent + eBias >= 1 ? (mantissa = (number * c - 1) * pow(2, mantissaLength), exponent += eBias) : (mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength), exponent = 0)); mantissaLength >= 8; buffer[index++] = 255 & mantissa, mantissa /= 256, mantissaLength -= 8); for((number = abs(number)) != number || number === 1 / 0 ? (mantissa = number != number ? 1 : 0, exponent = eMax) : (exponent = floor(log(number) / LN2), number * (c = pow(2, -exponent)) < 1 && (exponent--, c *= 2), exponent + eBias >= 1 ? number += rt / c : number += rt * pow(2, 1 - eBias), number * c >= 2 && (exponent++, c /= 2), exponent + eBias >= eMax ? (mantissa = 0, exponent = eMax) : exponent + eBias >= 1 ? (mantissa = (number * c - 1) * pow(2, mantissaLength), exponent += eBias) : (mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength), exponent = 0)); mantissaLength >= 8; buffer[index++] = 255 & mantissa, mantissa /= 256, mantissaLength -= 8);
for(exponent = exponent << mantissaLength | mantissa, exponentLength += mantissaLength; exponentLength > 0; buffer[index++] = 255 & exponent, exponent /= 256, exponentLength -= 8); for(exponent = exponent << mantissaLength | mantissa, exponentLength += mantissaLength; exponentLength > 0; buffer[index++] = 255 & exponent, exponent /= 256, exponentLength -= 8);
return buffer[--index] |= 128 * sign, buffer; return buffer[--index] |= 128 * sign, buffer;
}, }, unpack = function(buffer, mantissaLength) {
unpack: function(buffer, mantissaLength) {
var mantissa, bytes = buffer.length, exponentLength = 8 * bytes - mantissaLength - 1, eMax = (1 << exponentLength) - 1, eBias = eMax >> 1, nBits = exponentLength - 7, index = bytes - 1, sign = buffer[index--], exponent = 127 & sign; var mantissa, bytes = buffer.length, exponentLength = 8 * bytes - mantissaLength - 1, eMax = (1 << exponentLength) - 1, eBias = eMax >> 1, nBits = exponentLength - 7, index = bytes - 1, sign = buffer[index--], exponent = 127 & sign;
for(sign >>= 7; nBits > 0; exponent = 256 * exponent + buffer[index], index--, nBits -= 8); for(sign >>= 7; nBits > 0; exponent = 256 * exponent + buffer[index], index--, nBits -= 8);
for(mantissa = exponent & (1 << -nBits) - 1, exponent >>= -nBits, nBits += mantissaLength; nBits > 0; mantissa = 256 * mantissa + buffer[index], index--, nBits -= 8); for(mantissa = exponent & (1 << -nBits) - 1, exponent >>= -nBits, nBits += mantissaLength; nBits > 0; mantissa = 256 * mantissa + buffer[index], index--, nBits -= 8);
@ -3877,7 +3878,10 @@
mantissa += pow(2, mantissaLength), exponent -= eBias; mantissa += pow(2, mantissaLength), exponent -= eBias;
} }
return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
} };
module.exports = {
pack: pack,
unpack: unpack
}; };
}, },
51478: function(module, __unused_webpack_exports, __webpack_require__) { 51478: function(module, __unused_webpack_exports, __webpack_require__) {
@ -3911,8 +3915,24 @@
weakData: {} weakData: {}
} }
}); });
}, meta = module.exports = { }, fastKey = function(it, create) {
enable: function() { if (!isObject(it)) return "symbol" == typeof it ? it : ("string" == typeof it ? "S" : "P") + it;
if (!has(it, METADATA)) {
if (!isExtensible(it)) return "F";
if (!create) return "E";
setMetadata(it);
}
return it[METADATA].objectID;
}, getWeakData = function(it, create) {
if (!has(it, METADATA)) {
if (!isExtensible(it)) return !0;
if (!create) return !1;
setMetadata(it);
}
return it[METADATA].weakData;
}, onFreeze = function(it) {
return FREEZING && REQUIRED && isExtensible(it) && !has(it, METADATA) && setMetadata(it), it;
}, enable = function() {
meta.enable = function() {}, REQUIRED = !0; meta.enable = function() {}, REQUIRED = !0;
var getOwnPropertyNames = getOwnPropertyNamesModule.f, splice = [].splice, test = {}; var getOwnPropertyNames = getOwnPropertyNamesModule.f, splice = [].splice, test = {};
test[METADATA] = 1, getOwnPropertyNames(test).length && (getOwnPropertyNamesModule.f = function(it) { test[METADATA] = 1, getOwnPropertyNames(test).length && (getOwnPropertyNamesModule.f = function(it) {
@ -3928,32 +3948,24 @@
}, { }, {
getOwnPropertyNames: getOwnPropertyNamesExternalModule.f getOwnPropertyNames: getOwnPropertyNamesExternalModule.f
})); }));
}, }, meta = module.exports = {
fastKey: function(it, create) { enable: enable,
if (!isObject(it)) return "symbol" == typeof it ? it : ("string" == typeof it ? "S" : "P") + it; fastKey: fastKey,
if (!has(it, METADATA)) { getWeakData: getWeakData,
if (!isExtensible(it)) return "F"; onFreeze: onFreeze
if (!create) return "E";
setMetadata(it);
}
return it[METADATA].objectID;
},
getWeakData: function(it, create) {
if (!has(it, METADATA)) {
if (!isExtensible(it)) return !0;
if (!create) return !1;
setMetadata(it);
}
return it[METADATA].weakData;
},
onFreeze: function(it) {
return FREEZING && REQUIRED && isExtensible(it) && !has(it, METADATA) && setMetadata(it), it;
}
}; };
hiddenKeys[METADATA] = !0; hiddenKeys[METADATA] = !0;
}, },
44670: function(module, __unused_webpack_exports, __webpack_require__) { 44670: function(module, __unused_webpack_exports, __webpack_require__) {
var set, get, has, NATIVE_WEAK_MAP = __webpack_require__(83165), global = __webpack_require__(19514), isObject = __webpack_require__(39817), createNonEnumerableProperty = __webpack_require__(48181), objectHas = __webpack_require__(1521), shared = __webpack_require__(88986), sharedKey = __webpack_require__(16735), hiddenKeys = __webpack_require__(38276), OBJECT_ALREADY_INITIALIZED = "Object already initialized", WeakMap1 = global.WeakMap; var set, get, has, NATIVE_WEAK_MAP = __webpack_require__(83165), global = __webpack_require__(19514), isObject = __webpack_require__(39817), createNonEnumerableProperty = __webpack_require__(48181), objectHas = __webpack_require__(1521), shared = __webpack_require__(88986), sharedKey = __webpack_require__(16735), hiddenKeys = __webpack_require__(38276), OBJECT_ALREADY_INITIALIZED = "Object already initialized", WeakMap1 = global.WeakMap, enforce = function(it) {
return has(it) ? get(it) : set(it, {});
}, getterFor = function(TYPE) {
return function(it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) throw TypeError("Incompatible receiver, " + TYPE + " required");
return state;
};
};
if (NATIVE_WEAK_MAP || shared.state) { if (NATIVE_WEAK_MAP || shared.state) {
var store = shared.state || (shared.state = new WeakMap1()), wmget = store.get, wmhas = store.has, wmset = store.set; var store = shared.state || (shared.state = new WeakMap1()), wmget = store.get, wmhas = store.has, wmset = store.set;
set = function(it, metadata) { set = function(it, metadata) {
@ -3979,16 +3991,8 @@
set: set, set: set,
get: get, get: get,
has: has, has: has,
enforce: function(it) { enforce: enforce,
return has(it) ? get(it) : set(it, {}); getterFor: getterFor
},
getterFor: function(TYPE) {
return function(it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) throw TypeError("Incompatible receiver, " + TYPE + " required");
return state;
};
}
}; };
}, },
58011: function(module, __unused_webpack_exports, __webpack_require__) { 58011: function(module, __unused_webpack_exports, __webpack_require__) {
@ -4016,13 +4020,7 @@
} catch (error) { } catch (error) {
return !1; return !1;
} }
}; }, isConstructorLegacy = function(argument) {
module.exports = !construct || fails(function() {
var called;
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
called = !0;
}) || called;
}) ? function(argument) {
if (!isCallable(argument)) return !1; if (!isCallable(argument)) return !1;
switch(classof(argument)){ switch(classof(argument)){
case "AsyncFunction": case "AsyncFunction":
@ -4031,7 +4029,13 @@
return !1; return !1;
} }
return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument)); return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));
} : isConstructorModern; };
module.exports = !construct || fails(function() {
var called;
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
called = !0;
}) || called;
}) ? isConstructorLegacy : isConstructorModern;
}, },
69518: function(module, __unused_webpack_exports, __webpack_require__) { 69518: function(module, __unused_webpack_exports, __webpack_require__) {
var has = __webpack_require__(1521); var has = __webpack_require__(1521);
@ -7779,6 +7783,8 @@
return $forEach(keys, function(key) { return $forEach(keys, function(key) {
(!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) && $defineProperty(O, key, properties[key]); (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) && $defineProperty(O, key, properties[key]);
}), O; }), O;
}, $create = function(O, Properties) {
return void 0 === Properties ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
}, $propertyIsEnumerable = function(V) { }, $propertyIsEnumerable = function(V) {
var P = toPropertyKey(V), enumerable = nativePropertyIsEnumerable.call(this, P); var P = toPropertyKey(V), enumerable = nativePropertyIsEnumerable.call(this, P);
return (!(this === ObjectPrototype && has(AllSymbols, P)) || !!has(ObjectPrototypeSymbols, P)) && (!(enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P]) || enumerable); return (!(this === ObjectPrototype && has(AllSymbols, P)) || !!has(ObjectPrototypeSymbols, P)) && (!(enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P]) || enumerable);
@ -7857,9 +7863,7 @@
forced: !NATIVE_SYMBOL, forced: !NATIVE_SYMBOL,
sham: !DESCRIPTORS sham: !DESCRIPTORS
}, { }, {
create: function(O, Properties) { create: $create,
return void 0 === Properties ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
},
defineProperty: $defineProperty, defineProperty: $defineProperty,
defineProperties: $defineProperties, defineProperties: $defineProperties,
getOwnPropertyDescriptor: $getOwnPropertyDescriptor getOwnPropertyDescriptor: $getOwnPropertyDescriptor

View File

@ -1,4 +1,4 @@
export default ((adler, buf, len, pos)=>{ const adler32 = (adler, buf, len, pos)=>{
let s1 = 0xffff & adler | 0, s2 = adler >>> 16 & 0xffff | 0, n = 0; let s1 = 0xffff & adler | 0, s2 = adler >>> 16 & 0xffff | 0, n = 0;
for(; 0 !== len;){ for(; 0 !== len;){
n = len > 2000 ? 2000 : len, len -= n; n = len > 2000 ? 2000 : len, len -= n;
@ -7,4 +7,5 @@ export default ((adler, buf, len, pos)=>{
s1 %= 65521, s2 %= 65521; s1 %= 65521, s2 %= 65521;
} }
return s1 | s2 << 16 | 0; return s1 | s2 << 16 | 0;
}); };
export default adler32;

View File

@ -817,7 +817,7 @@
prefetched[href + "%" + as + (curLocale ? "%" + curLocale : "")] = !0; prefetched[href + "%" + as + (curLocale ? "%" + curLocale : "")] = !0;
} }
} }
exports.default = function(props) { var _default = function(props) {
var child, p = !1 !== props.prefetch, router = _router1.useRouter(), ref2 = _react.default.useMemo(function() { var child, p = !1 !== props.prefetch, router = _router1.useRouter(), ref2 = _react.default.useMemo(function() {
var ref = _slicedToArray(_router.resolveHref(router, props.href, !0), 2), resolvedHref = ref[0], resolvedAs = ref[1]; var ref = _slicedToArray(_router.resolveHref(router, props.href, !0), 2), resolvedHref = ref[0], resolvedAs = ref[1];
return { return {
@ -872,6 +872,7 @@
} }
return _react.default.cloneElement(child, childProps); return _react.default.cloneElement(child, childProps);
}; };
exports.default = _default;
}, },
7190: function(__unused_webpack_module, exports, __webpack_require__) { 7190: function(__unused_webpack_module, exports, __webpack_require__) {
"use strict"; "use strict";

View File

@ -2414,15 +2414,15 @@
[LogLevel.INFO]: "info", [LogLevel.INFO]: "info",
[LogLevel.WARN]: "warn", [LogLevel.WARN]: "warn",
[LogLevel.ERROR]: "error" [LogLevel.ERROR]: "error"
}; }, defaultLogHandler = (instance, logType, ...args)=>{
class Logger {
constructor(name){
this.name = name, this._logLevel = defaultLogLevel, this._logHandler = (instance, logType, ...args)=>{
if (logType < instance.logLevel) return; if (logType < instance.logLevel) return;
const now = new Date().toISOString(), method = ConsoleMethod[logType]; const now = new Date().toISOString(), method = ConsoleMethod[logType];
if (method) console[method](`[${now}] ${instance.name}:`, ...args); if (method) console[method](`[${now}] ${instance.name}:`, ...args);
else throw Error(`Attempted to log a message with an invalid logType (value: ${logType})`); else throw Error(`Attempted to log a message with an invalid logType (value: ${logType})`);
}, this._userLogHandler = null, [].push(this); };
class Logger {
constructor(name){
this.name = name, this._logLevel = defaultLogLevel, this._logHandler = defaultLogHandler, this._userLogHandler = null, [].push(this);
} }
get logLevel() { get logLevel() {
return this._logLevel; return this._logLevel;

View File

@ -878,7 +878,9 @@
for(i = 1, res = moments[0]; i < moments.length; ++i)(!moments[i].isValid() || moments[i][fn](res)) && (res = moments[i]); for(i = 1, res = moments[0]; i < moments.length; ++i)(!moments[i].isValid() || moments[i][fn](res)) && (res = moments[i]);
return res; return res;
} }
var ordering = [ var now = function() {
return Date.now ? Date.now() : +new Date();
}, ordering = [
"year", "year",
"quarter", "quarter",
"month", "month",
@ -1837,9 +1839,7 @@
}, hooks.max = function() { }, hooks.max = function() {
var args = [].slice.call(arguments, 0); var args = [].slice.call(arguments, 0);
return pickBy("isAfter", args); return pickBy("isAfter", args);
}, hooks.now = function() { }, hooks.now = now, hooks.utc = createUTC, hooks.unix = function(input) {
return Date.now ? Date.now() : +new Date();
}, hooks.utc = createUTC, hooks.unix = function(input) {
return createLocal(1000 * input); return createLocal(1000 * input);
}, hooks.months = function(format, index) { }, hooks.months = function(format, index) {
return listMonthsImpl(format, index, "months"); return listMonthsImpl(format, index, "months");

View File

@ -772,8 +772,7 @@
"containerProps", "containerProps",
"children", "children",
"style", "style",
]; ], CountUp = function(props) {
exports.ZP = function(props) {
var className = props.className, redraw = props.redraw, containerProps = props.containerProps, children = props.children, style = props.style, useCountUpProps = _objectWithoutProperties(props, _excluded), containerRef = React__default.default.useRef(null), isInitializedRef = React__default.default.useRef(!1), _useCountUp = useCountUp(_objectSpread2(_objectSpread2({}, useCountUpProps), {}, { var className = props.className, redraw = props.redraw, containerProps = props.containerProps, children = props.children, style = props.style, useCountUpProps = _objectWithoutProperties(props, _excluded), containerRef = React__default.default.useRef(null), isInitializedRef = React__default.default.useRef(!1), _useCountUp = useCountUp(_objectSpread2(_objectSpread2({}, useCountUpProps), {}, {
ref: containerRef, ref: containerRef,
startOnMount: "function" != typeof children || 0 === props.delay, startOnMount: "function" != typeof children || 0 === props.delay,
@ -833,6 +832,7 @@
style: style style: style
}, containerProps)); }, containerProps));
}; };
exports.ZP = CountUp;
} }
}, },
]); ]);

View File

@ -24,7 +24,13 @@ var _obj, isMultiIndexContext = function(widget) {
return isFirstWidgetIndex && !isSecondWidgetIndex ? -1 : !isFirstWidgetIndex && isSecondWidgetIndex ? 1 : 0; return isFirstWidgetIndex && !isSecondWidgetIndex ? -1 : !isFirstWidgetIndex && isSecondWidgetIndex ? 1 : 0;
}; };
export default function createInstantSearchManager(param) { export default function createInstantSearchManager(param) {
var indexName = param.indexName, _initialState = param.initialState, searchClient = param.searchClient, resultsState = param.resultsState, stalledSearchDelay = param.stalledSearchDelay, getMetadata = function(state) { var indexName = param.indexName, _initialState = param.initialState, searchClient = param.searchClient, resultsState = param.resultsState, stalledSearchDelay = param.stalledSearchDelay, skipSearch = function() {
skip = !0;
}, updateClient = function(client) {
addAlgoliaAgents(client), helper.setClient(client), search();
}, clearCache = function() {
helper.clearCache(), search();
}, getMetadata = function(state) {
return widgetsManager.getWidgets().filter(function(widget) { return widgetsManager.getWidgets().filter(function(widget) {
return Boolean(widget.getMetadata); return Boolean(widget.getMetadata);
}).map(function(widget) { }).map(function(widget) {
@ -106,6 +112,15 @@ export default function createInstantSearchManager(param) {
error: error, error: error,
searching: !1 searching: !1
})); }));
}, handleNewSearch = function() {
stalledSearchTimer || (stalledSearchTimer = setTimeout(function() {
var _ref = store.getState(), partialState = (_ref.resultsFacetValues, swcHelpers.objectWithoutProperties(_ref, [
"resultsFacetValues",
]));
store.setState(swcHelpers.objectSpread({}, partialState, {
isSearchStalled: !0
}));
}, stalledSearchDelay));
}, hydrateSearchClientWithMultiIndexRequest = function(client, results) { }, hydrateSearchClientWithMultiIndexRequest = function(client, results) {
if (client.transporter) { if (client.transporter) {
client.transporter.responsesCache.set({ client.transporter.responsesCache.set({
@ -170,26 +185,57 @@ export default function createInstantSearchManager(param) {
client.cache = swcHelpers.objectSpread({}, client.cache, swcHelpers.defineProperty({}, key, JSON.stringify({ client.cache = swcHelpers.objectSpread({}, client.cache, swcHelpers.defineProperty({}, key, JSON.stringify({
results: results.rawResults results: results.rawResults
}))); })));
}, helper = algoliasearchHelper(searchClient, indexName, swcHelpers.objectSpread({}, HIGHLIGHT_TAGS)); }, onWidgetsUpdate = function() {
addAlgoliaAgents(searchClient), helper.on("search", function() {
stalledSearchTimer || (stalledSearchTimer = setTimeout(function() {
var _ref = store.getState(), partialState = (_ref.resultsFacetValues, swcHelpers.objectWithoutProperties(_ref, [
"resultsFacetValues",
]));
store.setState(swcHelpers.objectSpread({}, partialState, {
isSearchStalled: !0
}));
}, stalledSearchDelay));
}).on("result", handleSearchSuccess({
indexId: indexName
})).on("error", handleSearchError);
var results, state, listeners, skip = !1, stalledSearchTimer = null, initialSearchParameters = helper.state, widgetsManager = createWidgetsManager(function() {
var metadata = getMetadata(store.getState().widgets); var metadata = getMetadata(store.getState().widgets);
store.setState(swcHelpers.objectSpread({}, store.getState(), { store.setState(swcHelpers.objectSpread({}, store.getState(), {
metadata: metadata, metadata: metadata,
searching: !0 searching: !0
})), search(); })), search();
}, transitionState = function(nextSearchState) {
var searchState = store.getState().widgets;
return widgetsManager.getWidgets().filter(function(widget) {
return Boolean(widget.transitionState);
}).reduce(function(res, widget) {
return widget.transitionState(searchState, res);
}, nextSearchState);
}, onExternalStateUpdate = function(nextSearchState) {
var metadata = getMetadata(nextSearchState);
store.setState(swcHelpers.objectSpread({}, store.getState(), {
widgets: nextSearchState,
metadata: metadata,
searching: !0
})), search();
}, onSearchForFacetValues = function(param) {
var facetName = param.facetName, query = param.query, _maxFacetHits = param.maxFacetHits;
store.setState(swcHelpers.objectSpread({}, store.getState(), {
searchingForFacetValues: !0
})), helper.searchForFacetValues(facetName, query, Math.max(1, Math.min(void 0 === _maxFacetHits ? 10 : _maxFacetHits, 100))).then(function(content) {
store.setState(swcHelpers.objectSpread({}, store.getState(), {
error: null,
searchingForFacetValues: !1,
resultsFacetValues: swcHelpers.objectSpread({}, store.getState().resultsFacetValues, (_obj = {}, swcHelpers.defineProperty(_obj, facetName, content.facetHits), swcHelpers.defineProperty(_obj, "query", query), _obj))
}));
}, function(error) {
store.setState(swcHelpers.objectSpread({}, store.getState(), {
searchingForFacetValues: !1,
error: error
}));
}).catch(function(error) {
setTimeout(function() {
throw error;
}); });
});
}, updateIndex = function(newIndex) {
initialSearchParameters = initialSearchParameters.setIndex(newIndex);
}, getWidgetsIds = function() {
return store.getState().metadata.reduce(function(res, meta) {
return void 0 !== meta.id ? res.concat(meta.id) : res;
}, []);
}, helper = algoliasearchHelper(searchClient, indexName, swcHelpers.objectSpread({}, HIGHLIGHT_TAGS));
addAlgoliaAgents(searchClient), helper.on("search", handleNewSearch).on("result", handleSearchSuccess({
indexId: indexName
})).on("error", handleSearchError);
var results, state, listeners, skip = !1, stalledSearchTimer = null, initialSearchParameters = helper.state, widgetsManager = createWidgetsManager(onWidgetsUpdate);
!function(client, results) { !function(client, results) {
if (results && (client.transporter && !client._cacheHydrated || client._useCache && "function" == typeof client.addAlgoliaAgent)) { if (results && (client.transporter && !client._cacheHydrated || client._useCache && "function" == typeof client.addAlgoliaAgent)) {
if (client.transporter && !client._cacheHydrated) { if (client.transporter && !client._cacheHydrated) {
@ -259,61 +305,15 @@ export default function createInstantSearchManager(param) {
return { return {
store: store, store: store,
widgetsManager: widgetsManager, widgetsManager: widgetsManager,
getWidgetsIds: function() { getWidgetsIds: getWidgetsIds,
return store.getState().metadata.reduce(function(res, meta) {
return void 0 !== meta.id ? res.concat(meta.id) : res;
}, []);
},
getSearchParameters: getSearchParameters, getSearchParameters: getSearchParameters,
onSearchForFacetValues: function(param) { onSearchForFacetValues: onSearchForFacetValues,
var facetName = param.facetName, query = param.query, _maxFacetHits = param.maxFacetHits; onExternalStateUpdate: onExternalStateUpdate,
store.setState(swcHelpers.objectSpread({}, store.getState(), { transitionState: transitionState,
searchingForFacetValues: !0 updateClient: updateClient,
})), helper.searchForFacetValues(facetName, query, Math.max(1, Math.min(void 0 === _maxFacetHits ? 10 : _maxFacetHits, 100))).then(function(content) { updateIndex: updateIndex,
store.setState(swcHelpers.objectSpread({}, store.getState(), { clearCache: clearCache,
error: null, skipSearch: skipSearch
searchingForFacetValues: !1,
resultsFacetValues: swcHelpers.objectSpread({}, store.getState().resultsFacetValues, (_obj = {}, swcHelpers.defineProperty(_obj, facetName, content.facetHits), swcHelpers.defineProperty(_obj, "query", query), _obj))
}));
}, function(error) {
store.setState(swcHelpers.objectSpread({}, store.getState(), {
searchingForFacetValues: !1,
error: error
}));
}).catch(function(error) {
setTimeout(function() {
throw error;
});
});
},
onExternalStateUpdate: function(nextSearchState) {
var metadata = getMetadata(nextSearchState);
store.setState(swcHelpers.objectSpread({}, store.getState(), {
widgets: nextSearchState,
metadata: metadata,
searching: !0
})), search();
},
transitionState: function(nextSearchState) {
var searchState = store.getState().widgets;
return widgetsManager.getWidgets().filter(function(widget) {
return Boolean(widget.transitionState);
}).reduce(function(res, widget) {
return widget.transitionState(searchState, res);
}, nextSearchState);
},
updateClient: function(client) {
addAlgoliaAgents(client), helper.setClient(client), search();
},
updateIndex: function(newIndex) {
initialSearchParameters = initialSearchParameters.setIndex(newIndex);
},
clearCache: function() {
helper.clearCache(), search();
},
skipSearch: function() {
skip = !0;
}
}; };
}; };
function hydrateMetadata(resultsState) { function hydrateMetadata(resultsState) {

View File

@ -2148,12 +2148,12 @@
this.members = members; this.members = members;
}; };
function mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) { function mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {
for(var children = oldChildren.slice(), i = 0; i < mapping.maps.length; i++)mapping.maps[i].forEach(function(oldStart, oldEnd, newStart, newEnd) { for(var children = oldChildren.slice(), shift = function(oldStart, oldEnd, newStart, newEnd) {
for(var i = 0; i < children.length; i += 3){ for(var i = 0; i < children.length; i += 3){
var end = children[i + 1], dSize = void 0; var end = children[i + 1], dSize = void 0;
-1 != end && !(oldStart > end + oldOffset) && (oldEnd >= children[i] + oldOffset ? children[i + 1] = -1 : newStart >= offset && (dSize = newEnd - newStart - (oldEnd - oldStart)) && (children[i] += dSize, children[i + 1] += dSize)); -1 != end && !(oldStart > end + oldOffset) && (oldEnd >= children[i] + oldOffset ? children[i + 1] = -1 : newStart >= offset && (dSize = newEnd - newStart - (oldEnd - oldStart)) && (children[i] += dSize, children[i + 1] += dSize));
} }
}); }, i = 0; i < mapping.maps.length; i++)mapping.maps[i].forEach(shift);
for(var mustRebuild = !1, i$1 = 0; i$1 < children.length; i$1 += 3)if (-1 == children[i$1 + 1]) { for(var mustRebuild = !1, i$1 = 0; i$1 < children.length; i$1 += 3)if (-1 == children[i$1 + 1]) {
var from = mapping.map(oldChildren[i$1] + oldOffset), fromLocal = from - offset; var from = mapping.map(oldChildren[i$1] + oldOffset), fromLocal = from - offset;
if (fromLocal < 0 || fromLocal >= node.content.size) { if (fromLocal < 0 || fromLocal >= node.content.size) {

View File

@ -7,9 +7,17 @@
5215: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 5215: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
for(var browserApi, videojs$1, FakeWeakMap, _supportsPassive, EVENT_MAP, canPlayType, Vhs$1, global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8908), global_window__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__), global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9144), global_document__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__), _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(7462), _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(7326), _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(4578), safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5974), safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2__), keycode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7537), keycode__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(keycode__WEBPACK_IMPORTED_MODULE_3__), _videojs_xhr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9603), _videojs_xhr__WEBPACK_IMPORTED_MODULE_4___default = __webpack_require__.n(_videojs_xhr__WEBPACK_IMPORTED_MODULE_4__), videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3407), videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__), _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(8852), _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(136), _videojs_vhs_utils_es_resolve_url_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(779), m3u8_parser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9323), _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2260), _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(8485), mpd_parser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(973), mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4221), mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10___default = __webpack_require__.n(mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10__), _videojs_vhs_utils_es_id3_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8925), _videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6185), _videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(562), mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(1489), version$5 = "7.17.0", hooks_ = {}, hooks = function(type, fn) { for(var browserApi, videojs$1, FakeWeakMap, _supportsPassive, EVENT_MAP, canPlayType, Vhs$1, global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8908), global_window__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__), global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9144), global_document__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__), _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(7462), _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(7326), _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(4578), safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5974), safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_2__), keycode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7537), keycode__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(keycode__WEBPACK_IMPORTED_MODULE_3__), _videojs_xhr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9603), _videojs_xhr__WEBPACK_IMPORTED_MODULE_4___default = __webpack_require__.n(_videojs_xhr__WEBPACK_IMPORTED_MODULE_4__), videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3407), videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_5__), _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(8852), _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(136), _videojs_vhs_utils_es_resolve_url_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(779), m3u8_parser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9323), _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2260), _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(8485), mpd_parser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(973), mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4221), mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10___default = __webpack_require__.n(mux_js_lib_tools_parse_sidx__WEBPACK_IMPORTED_MODULE_10__), _videojs_vhs_utils_es_id3_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8925), _videojs_vhs_utils_es_containers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6185), _videojs_vhs_utils_es_byte_helpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(562), mux_js_lib_utils_clock__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(1489), version$5 = "7.17.0", hooks_ = {}, hooks = function(type, fn) {
return hooks_[type] = hooks_[type] || [], fn && (hooks_[type] = hooks_[type].concat(fn)), hooks_[type]; return hooks_[type] = hooks_[type] || [], fn && (hooks_[type] = hooks_[type].concat(fn)), hooks_[type];
}, hook = function(type, fn) {
hooks(type, fn);
}, removeHook = function(type, fn) { }, removeHook = function(type, fn) {
var index = hooks(type).indexOf(fn); var index = hooks(type).indexOf(fn);
return !(index <= -1) && (hooks_[type] = hooks_[type].slice(), hooks_[type].splice(index, 1), !0); return !(index <= -1) && (hooks_[type] = hooks_[type].slice(), hooks_[type].splice(index, 1), !0);
}, hookOnce = function(type, fn) {
hooks(type, [].concat(fn).map(function(original) {
return function wrapper() {
return removeHook(type, wrapper), original.apply(void 0, arguments);
};
}));
}, FullscreenApi = { }, FullscreenApi = {
prefixed: !0 prefixed: !0
}, apiMap = [ }, apiMap = [
@ -568,15 +576,15 @@
}; };
}, debounce = function(func, wait, immediate, context) { }, debounce = function(func, wait, immediate, context) {
void 0 === context && (context = global_window__WEBPACK_IMPORTED_MODULE_0___default()); void 0 === context && (context = global_window__WEBPACK_IMPORTED_MODULE_0___default());
var timeout, debounced = function() { var timeout, cancel = function() {
context.clearTimeout(timeout), timeout = null;
}, debounced = function() {
var self1 = this, args = arguments, _later = function() { var self1 = this, args = arguments, _later = function() {
timeout = null, _later = null, immediate || func.apply(self1, args); timeout = null, _later = null, immediate || func.apply(self1, args);
}; };
!timeout && immediate && func.apply(self1, args), context.clearTimeout(timeout), timeout = context.setTimeout(_later, wait); !timeout && immediate && func.apply(self1, args), context.clearTimeout(timeout), timeout = context.setTimeout(_later, wait);
}; };
return debounced.cancel = function() { return debounced.cancel = cancel, debounced;
context.clearTimeout(timeout), timeout = null;
}, debounced;
}, EventTarget$2 = function() {}; }, EventTarget$2 = function() {};
EventTarget$2.prototype.allowedEvents_ = {}, EventTarget$2.prototype.on = function(type, fn) { EventTarget$2.prototype.allowedEvents_ = {}, EventTarget$2.prototype.on = function(type, fn) {
var ael = this.addEventListener; var ael = this.addEventListener;
@ -1600,10 +1608,10 @@
("metadata" === settings.kind || "chapters" === settings.kind) && (mode = "hidden"), (_this = _Track.call(this, settings) || this).tech_ = settings.tech, _this.cues_ = [], _this.activeCues_ = [], _this.preload_ = !1 !== _this.tech_.preloadTextTracks; ("metadata" === settings.kind || "chapters" === settings.kind) && (mode = "hidden"), (_this = _Track.call(this, settings) || this).tech_ = settings.tech, _this.cues_ = [], _this.activeCues_ = [], _this.preload_ = !1 !== _this.tech_.preloadTextTracks;
var cues = new TextTrackCueList(_this.cues_), activeCues = new TextTrackCueList(_this.activeCues_), changed = !1, timeupdateHandler = bind((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), function() { var cues = new TextTrackCueList(_this.cues_), activeCues = new TextTrackCueList(_this.activeCues_), changed = !1, timeupdateHandler = bind((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), function() {
!(!this.tech_.isReady_ || this.tech_.isDisposed()) && (this.activeCues = this.activeCues, changed && (this.trigger("cuechange"), changed = !1)); !(!this.tech_.isReady_ || this.tech_.isDisposed()) && (this.activeCues = this.activeCues, changed && (this.trigger("cuechange"), changed = !1));
}); }), disposeHandler = function() {
return _this.tech_.one("dispose", function() {
_this.tech_.off("timeupdate", timeupdateHandler); _this.tech_.off("timeupdate", timeupdateHandler);
}), "disabled" !== mode && _this.tech_.on("timeupdate", timeupdateHandler), Object.defineProperties((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), { };
return _this.tech_.one("dispose", disposeHandler), "disabled" !== mode && _this.tech_.on("timeupdate", timeupdateHandler), Object.defineProperties((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), {
default: { default: {
get: function() { get: function() {
return default_; return default_;
@ -5517,10 +5525,10 @@
}, _proto.handleTechWaiting_ = function() { }, _proto.handleTechWaiting_ = function() {
var _this8 = this; var _this8 = this;
this.addClass("vjs-waiting"), this.trigger("waiting"); this.addClass("vjs-waiting"), this.trigger("waiting");
var timeWhenWaiting = this.currentTime(); var timeWhenWaiting = this.currentTime(), timeUpdateListener = function timeUpdateListener() {
this.on("timeupdate", function timeUpdateListener() {
timeWhenWaiting !== _this8.currentTime() && (_this8.removeClass("vjs-waiting"), _this8.off("timeupdate", timeUpdateListener)); timeWhenWaiting !== _this8.currentTime() && (_this8.removeClass("vjs-waiting"), _this8.off("timeupdate", timeUpdateListener));
}); };
this.on("timeupdate", timeUpdateListener);
}, _proto.handleTechCanPlay_ = function() { }, _proto.handleTechCanPlay_ = function() {
this.removeClass("vjs-waiting"), this.trigger("canplay"); this.removeClass("vjs-waiting"), this.trigger("canplay");
}, _proto.handleTechCanPlayThrough_ = function() { }, _proto.handleTechCanPlayThrough_ = function() {
@ -6020,14 +6028,14 @@
}), this.userActivity_ = !1, this.removeClass("vjs-user-active"), this.addClass("vjs-user-inactive"), this.trigger("userinactive"); }), this.userActivity_ = !1, this.removeClass("vjs-user-active"), this.addClass("vjs-user-inactive"), this.trigger("userinactive");
} }
}, _proto.listenForUserActivity_ = function() { }, _proto.listenForUserActivity_ = function() {
var mouseInProgress, lastMoveX, lastMoveY, inactivityTimeout, handleActivity = bind(this, this.reportUserActivity), handleMouseUpAndMouseLeave = function(event) { var mouseInProgress, lastMoveX, lastMoveY, inactivityTimeout, handleActivity = bind(this, this.reportUserActivity), handleMouseMove = function(e) {
(e.screenX !== lastMoveX || e.screenY !== lastMoveY) && (lastMoveX = e.screenX, lastMoveY = e.screenY, handleActivity());
}, handleMouseDown = function() {
handleActivity(), this.clearInterval(mouseInProgress), mouseInProgress = this.setInterval(handleActivity, 250);
}, handleMouseUpAndMouseLeave = function(event) {
handleActivity(), this.clearInterval(mouseInProgress); handleActivity(), this.clearInterval(mouseInProgress);
}; };
this.on("mousedown", function() { this.on("mousedown", handleMouseDown), this.on("mousemove", handleMouseMove), this.on("mouseup", handleMouseUpAndMouseLeave), this.on("mouseleave", handleMouseUpAndMouseLeave);
handleActivity(), this.clearInterval(mouseInProgress), mouseInProgress = this.setInterval(handleActivity, 250);
}), this.on("mousemove", function(e) {
(e.screenX !== lastMoveX || e.screenY !== lastMoveY) && (lastMoveX = e.screenX, lastMoveY = e.screenY, handleActivity());
}), this.on("mouseup", handleMouseUpAndMouseLeave), this.on("mouseleave", handleMouseUpAndMouseLeave);
var controlBar = this.getChild("controlBar"); var controlBar = this.getChild("controlBar");
!controlBar || IS_IOS || IS_ANDROID || (controlBar.on("mouseenter", function(event) { !controlBar || IS_IOS || IS_ANDROID || (controlBar.on("mouseenter", function(event) {
0 !== this.player().options_.inactivityTimeout && (this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout), this.player().options_.inactivityTimeout = 0; 0 !== this.player().options_.inactivityTimeout && (this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout), this.player().options_.inactivityTimeout = 0;
@ -6307,7 +6315,14 @@
}, Player.prototype.hasPlugin = function(name) { }, Player.prototype.hasPlugin = function(name) {
return !!pluginExists(name); return !!pluginExists(name);
}; };
var normalizeId = function(id) { var extend = function(superClass, subClassMethods) {
void 0 === subClassMethods && (subClassMethods = {});
var subClass = function() {
superClass.apply(this, arguments);
}, methods = {};
for(var name in "object" == typeof subClassMethods ? (subClassMethods.constructor !== Object.prototype.constructor && (subClass = subClassMethods.constructor), methods = subClassMethods) : "function" == typeof subClassMethods && (subClass = subClassMethods), (0, _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_19__.Z)(subClass, superClass), superClass && (subClass.super_ = superClass), methods)methods.hasOwnProperty(name) && (subClass.prototype[name] = methods[name]);
return subClass;
}, normalizeId = function(id) {
return 0 === id.indexOf("#") ? id.slice(1) : id; return 0 === id.indexOf("#") ? id.slice(1) : id;
}; };
function videojs(id, options, ready) { function videojs(id, options, ready) {
@ -6326,15 +6341,7 @@
return hookFunction(player); return hookFunction(player);
}), player; }), player;
} }
if (videojs.hooks_ = hooks_, videojs.hooks = hooks, videojs.hook = function(type, fn) { if (videojs.hooks_ = hooks_, videojs.hooks = hooks, videojs.hook = hook, videojs.hookOnce = hookOnce, videojs.removeHook = removeHook, !0 !== global_window__WEBPACK_IMPORTED_MODULE_0___default().VIDEOJS_NO_DYNAMIC_STYLE && isReal()) {
hooks(type, fn);
}, videojs.hookOnce = function(type, fn) {
hooks(type, [].concat(fn).map(function(original) {
return function wrapper() {
return removeHook(type, wrapper), original.apply(void 0, arguments);
};
}));
}, videojs.removeHook = removeHook, !0 !== global_window__WEBPACK_IMPORTED_MODULE_0___default().VIDEOJS_NO_DYNAMIC_STYLE && isReal()) {
var style = $(".vjs-styles-defaults"); var style = $(".vjs-styles-defaults");
if (!style) { if (!style) {
style = createStyleElement("vjs-styles-defaults"); style = createStyleElement("vjs-styles-defaults");
@ -6371,14 +6378,7 @@
value: TERMINATOR, value: TERMINATOR,
writeable: !1, writeable: !1,
enumerable: !0 enumerable: !0
}), videojs.browser = browser, videojs.TOUCH_ENABLED = TOUCH_ENABLED, videojs.extend = function(superClass, subClassMethods) { }), videojs.browser = browser, videojs.TOUCH_ENABLED = TOUCH_ENABLED, videojs.extend = extend, videojs.mergeOptions = mergeOptions$3, videojs.bind = bind, videojs.registerPlugin = Plugin.registerPlugin, videojs.deregisterPlugin = Plugin.deregisterPlugin, videojs.plugin = function(name, plugin) {
void 0 === subClassMethods && (subClassMethods = {});
var subClass = function() {
superClass.apply(this, arguments);
}, methods = {};
for(var name in "object" == typeof subClassMethods ? (subClassMethods.constructor !== Object.prototype.constructor && (subClass = subClassMethods.constructor), methods = subClassMethods) : "function" == typeof subClassMethods && (subClass = subClassMethods), (0, _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_19__.Z)(subClass, superClass), superClass && (subClass.super_ = superClass), methods)methods.hasOwnProperty(name) && (subClass.prototype[name] = methods[name]);
return subClass;
}, videojs.mergeOptions = mergeOptions$3, videojs.bind = bind, videojs.registerPlugin = Plugin.registerPlugin, videojs.deregisterPlugin = Plugin.deregisterPlugin, videojs.plugin = function(name, plugin) {
return log$1.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"), Plugin.registerPlugin(name, plugin); return log$1.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"), Plugin.registerPlugin(name, plugin);
}, videojs.getPlugins = Plugin.getPlugins, videojs.getPlugin = Plugin.getPlugin, videojs.getPluginVersion = Plugin.getPluginVersion, videojs.addLanguage = function(code, data) { }, videojs.getPlugins = Plugin.getPlugins, videojs.getPlugin = Plugin.getPlugin, videojs.getPluginVersion = Plugin.getPluginVersion, videojs.addLanguage = function(code, data) {
var _mergeOptions; var _mergeOptions;
@ -6608,56 +6608,10 @@
expired = expired || 0; expired = expired || 0;
var lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired); var lastSegmentEndTime = intervalDuration(playlist, playlist.mediaSequence + playlist.segments.length, expired);
return useSafeLiveEnd && (liveEdgePadding = "number" == typeof liveEdgePadding ? liveEdgePadding : liveEdgeDelay(null, playlist), lastSegmentEndTime -= liveEdgePadding), Math.max(0, lastSegmentEndTime); return useSafeLiveEnd && (liveEdgePadding = "number" == typeof liveEdgePadding ? liveEdgePadding : liveEdgeDelay(null, playlist), lastSegmentEndTime -= liveEdgePadding), Math.max(0, lastSegmentEndTime);
}, isBlacklisted = function(playlist) { }, seekable = function(playlist, expired, liveEdgePadding) {
return playlist.excludeUntil && playlist.excludeUntil > Date.now();
}, isIncompatible = function(playlist) {
return playlist.excludeUntil && playlist.excludeUntil === 1 / 0;
}, isEnabled = function(playlist) {
var blacklisted = isBlacklisted(playlist);
return !playlist.disabled && !blacklisted;
}, hasAttribute = function(attr, playlist) {
return playlist.attributes && playlist.attributes[attr];
}, isLowestEnabledRendition = function(master, media) {
if (1 === master.playlists.length) return !0;
var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;
return 0 === master.playlists.filter(function(playlist) {
return !!isEnabled(playlist) && (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;
}).length;
}, playlistMatch = function(a, b) {
return (!!a || !!b) && (!!a || !b) && (!a || !!b) && (a === b || !!a.id && !!b.id && a.id === b.id || !!a.resolvedUri && !!b.resolvedUri && a.resolvedUri === b.resolvedUri || !!a.uri && !!b.uri && a.uri === b.uri);
}, someAudioVariant = function(master, callback) {
var AUDIO = master && master.mediaGroups && master.mediaGroups.AUDIO || {}, found = !1;
for(var groupName in AUDIO){
for(var label in AUDIO[groupName])if (found = callback(AUDIO[groupName][label])) break;
if (found) break;
}
return !!found;
}, isAudioOnly = function(master) {
if (!master || !master.playlists || !master.playlists.length) return someAudioVariant(master, function(variant) {
return variant.playlists && variant.playlists.length || variant.uri;
});
for(var i = 0; i < master.playlists.length; i++){
var _ret = function(i) {
var playlist = master.playlists[i], CODECS = playlist.attributes && playlist.attributes.CODECS;
return CODECS && CODECS.split(",").every(function(c) {
return (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.KL)(c);
}) ? "continue" : someAudioVariant(master, function(variant) {
return playlistMatch(playlist, variant);
}) ? "continue" : {
v: !1
};
}(i);
if ("continue" !== _ret && "object" == typeof _ret) return _ret.v;
}
return !0;
}, Playlist = {
liveEdgeDelay: liveEdgeDelay,
duration: duration,
seekable: function(playlist, expired, liveEdgePadding) {
var seekableEnd = playlistEnd(playlist, expired, !0, liveEdgePadding); var seekableEnd = playlistEnd(playlist, expired, !0, liveEdgePadding);
return null === seekableEnd ? createTimeRange() : createTimeRange(expired || 0, seekableEnd); return null === seekableEnd ? createTimeRange() : createTimeRange(expired || 0, seekableEnd);
}, }, getMediaInfoForTime = function(_ref4) {
getMediaInfoForTime: function(_ref4) {
for(var playlist = _ref4.playlist, currentTime = _ref4.currentTime, startingSegmentIndex = _ref4.startingSegmentIndex, startingPartIndex = _ref4.startingPartIndex, startTime = _ref4.startTime, experimentalExactManifestTimings = _ref4.experimentalExactManifestTimings, time = currentTime - startTime, partsAndSegments = getPartsAndSegments(playlist), startIndex = 0, i = 0; i < partsAndSegments.length; i++){ for(var playlist = _ref4.playlist, currentTime = _ref4.currentTime, startingSegmentIndex = _ref4.startingSegmentIndex, startingPartIndex = _ref4.startingPartIndex, startTime = _ref4.startTime, experimentalExactManifestTimings = _ref4.experimentalExactManifestTimings, time = currentTime - startTime, partsAndSegments = getPartsAndSegments(playlist), startIndex = 0, i = 0; i < partsAndSegments.length; i++){
var partAndSegment = partsAndSegments[i]; var partAndSegment = partsAndSegments[i];
if (startingSegmentIndex === partAndSegment.segmentIndex && ("number" != typeof startingPartIndex || "number" != typeof partAndSegment.partIndex || startingPartIndex === partAndSegment.partIndex)) { if (startingSegmentIndex === partAndSegment.segmentIndex && ("number" != typeof startingPartIndex || "number" != typeof partAndSegment.partIndex || startingPartIndex === partAndSegment.partIndex)) {
@ -6717,7 +6671,55 @@
partIndex: partsAndSegments[partsAndSegments.length - 1].partIndex, partIndex: partsAndSegments[partsAndSegments.length - 1].partIndex,
startTime: currentTime startTime: currentTime
}; };
}, }, isBlacklisted = function(playlist) {
return playlist.excludeUntil && playlist.excludeUntil > Date.now();
}, isIncompatible = function(playlist) {
return playlist.excludeUntil && playlist.excludeUntil === 1 / 0;
}, isEnabled = function(playlist) {
var blacklisted = isBlacklisted(playlist);
return !playlist.disabled && !blacklisted;
}, hasAttribute = function(attr, playlist) {
return playlist.attributes && playlist.attributes[attr];
}, estimateSegmentRequestTime = function(segmentDuration, bandwidth, playlist, bytesReceived) {
return (void 0 === bytesReceived && (bytesReceived = 0), hasAttribute("BANDWIDTH", playlist)) ? (segmentDuration * playlist.attributes.BANDWIDTH - 8 * bytesReceived) / bandwidth : NaN;
}, isLowestEnabledRendition = function(master, media) {
if (1 === master.playlists.length) return !0;
var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;
return 0 === master.playlists.filter(function(playlist) {
return !!isEnabled(playlist) && (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;
}).length;
}, playlistMatch = function(a, b) {
return (!!a || !!b) && (!!a || !b) && (!a || !!b) && (a === b || !!a.id && !!b.id && a.id === b.id || !!a.resolvedUri && !!b.resolvedUri && a.resolvedUri === b.resolvedUri || !!a.uri && !!b.uri && a.uri === b.uri);
}, someAudioVariant = function(master, callback) {
var AUDIO = master && master.mediaGroups && master.mediaGroups.AUDIO || {}, found = !1;
for(var groupName in AUDIO){
for(var label in AUDIO[groupName])if (found = callback(AUDIO[groupName][label])) break;
if (found) break;
}
return !!found;
}, isAudioOnly = function(master) {
if (!master || !master.playlists || !master.playlists.length) return someAudioVariant(master, function(variant) {
return variant.playlists && variant.playlists.length || variant.uri;
});
for(var i = 0; i < master.playlists.length; i++){
var _ret = function(i) {
var playlist = master.playlists[i], CODECS = playlist.attributes && playlist.attributes.CODECS;
return CODECS && CODECS.split(",").every(function(c) {
return (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.KL)(c);
}) ? "continue" : someAudioVariant(master, function(variant) {
return playlistMatch(playlist, variant);
}) ? "continue" : {
v: !1
};
}(i);
if ("continue" !== _ret && "object" == typeof _ret) return _ret.v;
}
return !0;
}, Playlist = {
liveEdgeDelay: liveEdgeDelay,
duration: duration,
seekable: seekable,
getMediaInfoForTime: getMediaInfoForTime,
isEnabled: isEnabled, isEnabled: isEnabled,
isDisabled: function(playlist) { isDisabled: function(playlist) {
return playlist.disabled; return playlist.disabled;
@ -6730,9 +6732,7 @@
return !1; return !1;
}, },
hasAttribute: hasAttribute, hasAttribute: hasAttribute,
estimateSegmentRequestTime: function(segmentDuration, bandwidth, playlist, bytesReceived) { estimateSegmentRequestTime: estimateSegmentRequestTime,
return (void 0 === bytesReceived && (bytesReceived = 0), hasAttribute("BANDWIDTH", playlist)) ? (segmentDuration * playlist.attributes.BANDWIDTH - 8 * bytesReceived) / bandwidth : NaN;
},
isLowestEnabledRendition: isLowestEnabledRendition, isLowestEnabledRendition: isLowestEnabledRendition,
isAudioOnly: isAudioOnly, isAudioOnly: isAudioOnly,
playlistMatch: playlistMatch, playlistMatch: playlistMatch,
@ -7157,15 +7157,15 @@
}, hexDump = function(data) { }, hexDump = function(data) {
for(var hex, ascii, bytes = Array.prototype.slice.call(data), result = "", j = 0; j < bytes.length / 16; j++)hex = bytes.slice(16 * j, 16 * j + 16).map(formatHexString).join(""), ascii = bytes.slice(16 * j, 16 * j + 16).map(formatAsciiString).join(""), result += hex + " " + ascii + "\n"; for(var hex, ascii, bytes = Array.prototype.slice.call(data), result = "", j = 0; j < bytes.length / 16; j++)hex = bytes.slice(16 * j, 16 * j + 16).map(formatHexString).join(""), ascii = bytes.slice(16 * j, 16 * j + 16).map(formatAsciiString).join(""), result += hex + " " + ascii + "\n";
return result; return result;
}, tagDump = function(_ref) {
return hexDump(_ref.bytes);
}, utils = Object.freeze({ }, utils = Object.freeze({
__proto__: null, __proto__: null,
createTransferableMessage: createTransferableMessage, createTransferableMessage: createTransferableMessage,
initSegmentId: initSegmentId, initSegmentId: initSegmentId,
segmentKeyId: segmentKeyId, segmentKeyId: segmentKeyId,
hexDump: hexDump, hexDump: hexDump,
tagDump: function(_ref) { tagDump: tagDump,
return hexDump(_ref.bytes);
},
textRanges: function(ranges) { textRanges: function(ranges) {
var range, i, i1, result = ""; var range, i, i1, result = "";
for(i1 = 0; i1 < ranges.length; i1++)result += (range = ranges, i = i1, range.start(i) + "-" + range.end(i) + " "); for(i1 = 0; i1 < ranges.length; i1++)result += (range = ranges, i = i1, range.start(i) + "-" + range.end(i) + " ");
@ -7267,10 +7267,10 @@
callback: callback callback: callback
}); });
})); }));
var seekToTime = segment.start + mediaOffset; var seekToTime = segment.start + mediaOffset, seekedCallback = function() {
tech.one("seeked", function() {
return callback(null, tech.currentTime()); return callback(null, tech.currentTime());
}), pauseAfterSeek && tech.pause(), seekTo(seekToTime); };
tech.one("seeked", seekedCallback), pauseAfterSeek && tech.pause(), seekTo(seekToTime);
}, callbackOnCompleted = function(request, cb) { }, callbackOnCompleted = function(request, cb) {
if (4 === request.readyState) return cb(); if (4 === request.readyState) return cb();
}, containerRequest = function(uri, xhr, cb) { }, containerRequest = function(uri, xhr, cb) {
@ -9930,6 +9930,24 @@
var i, result = ""; var i, result = "";
for(i = start; i < end; i++)result += "%" + ("00" + bytes[i].toString(16)).slice(-2); for(i = start; i < end; i++)result += "%" + ("00" + bytes[i].toString(16)).slice(-2);
return result; return result;
}, parseAacTimestamp = function(packet) {
var frameStart, frameSize, frame;
frameStart = 10, 0x40 & packet[5] && (frameStart += 4, frameStart += parseSyncSafeInteger(packet.subarray(10, 14)));
do {
if ((frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8))) < 1) break;
if ("PRIV" === String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3])) {
frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);
for(var i = 0; i < frame.byteLength; i++)if (0 === frame[i]) {
if ("com.apple.streaming.transportStreamTimestamp" === unescape(percentEncode(frame, 0, i))) {
var d = frame.subarray(i + 1), size = (0x01 & d[3]) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;
return size *= 4, size += 0x03 & d[7];
}
break;
}
}
frameStart += 10, frameStart += frameSize;
}while (frameStart < packet.byteLength)
return null;
}, utils = { }, utils = {
isLikelyAacData: function(data) { isLikelyAacData: function(data) {
var offset = function getId3Offset(data, offset) { var offset = function getId3Offset(data, offset) {
@ -9955,25 +9973,7 @@
} }
return null; return null;
}, },
parseAacTimestamp: function(packet) { parseAacTimestamp: parseAacTimestamp
var frameStart, frameSize, frame;
frameStart = 10, 0x40 & packet[5] && (frameStart += 4, frameStart += parseSyncSafeInteger(packet.subarray(10, 14)));
do {
if ((frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8))) < 1) break;
if ("PRIV" === String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3])) {
frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);
for(var i = 0; i < frame.byteLength; i++)if (0 === frame[i]) {
if ("com.apple.streaming.transportStreamTimestamp" === unescape(percentEncode(frame, 0, i))) {
var d = frame.subarray(i + 1), size = (0x01 & d[3]) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;
return size *= 4, size += 0x03 & d[7];
}
break;
}
}
frameStart += 10, frameStart += frameSize;
}while (frameStart < packet.byteLength)
return null;
}
}; };
(_AacStream = function() { (_AacStream = function() {
var everything = new Uint8Array(), timeStamp = 0; var everything = new Uint8Array(), timeStamp = 0;
@ -10572,6 +10572,40 @@
}, parseAdaptionField = function(packet) { }, parseAdaptionField = function(packet) {
var offset = 0; var offset = 0;
return (0x30 & packet[3]) >>> 4 > 0x01 && (offset += packet[4] + 1), offset; return (0x30 & packet[3]) >>> 4 > 0x01 && (offset += packet[4] + 1), offset;
}, parseType = function(packet, pmtPid) {
var pid = parsePid(packet);
return 0 === pid ? "pat" : pid === pmtPid ? "pmt" : pmtPid ? "pes" : null;
}, parsePat = function(packet) {
var pusi = parsePayloadUnitStartIndicator(packet), offset = 4 + parseAdaptionField(packet);
return pusi && (offset += packet[offset] + 1), (0x1f & packet[offset + 10]) << 8 | packet[offset + 11];
}, parsePmt = function(packet) {
var tableEnd, programInfoLength, programMapTable = {}, pusi = parsePayloadUnitStartIndicator(packet), payloadOffset = 4 + parseAdaptionField(packet);
if (pusi && (payloadOffset += packet[payloadOffset] + 1), 0x01 & packet[payloadOffset + 5]) {
tableEnd = 3 + ((0x0f & packet[payloadOffset + 1]) << 8 | packet[payloadOffset + 2]) - 4, programInfoLength = (0x0f & packet[payloadOffset + 10]) << 8 | packet[payloadOffset + 11];
for(var offset = 12 + programInfoLength; offset < tableEnd;){
var i = payloadOffset + offset;
programMapTable[(0x1f & packet[i + 1]) << 8 | packet[i + 2]] = packet[i], offset += ((0x0f & packet[i + 3]) << 8 | packet[i + 4]) + 5;
}
return programMapTable;
}
}, parsePesType = function(packet, programMapTable) {
var type = programMapTable[parsePid(packet)];
switch(type){
case streamTypes.H264_STREAM_TYPE:
return "video";
case streamTypes.ADTS_STREAM_TYPE:
return "audio";
case streamTypes.METADATA_STREAM_TYPE:
return "timed-metadata";
default:
return null;
}
}, parsePesTime = function(packet) {
if (!parsePayloadUnitStartIndicator(packet)) return null;
var ptsDtsFlags, offset = 4 + parseAdaptionField(packet);
if (offset >= packet.byteLength) return null;
var pes = null;
return 0xc0 & (ptsDtsFlags = packet[offset + 7]) && ((pes = {}).pts = (0x0e & packet[offset + 9]) << 27 | (0xff & packet[offset + 10]) << 20 | (0xfe & packet[offset + 11]) << 12 | (0xff & packet[offset + 12]) << 5 | (0xfe & packet[offset + 13]) >>> 3, pes.pts *= 4, pes.pts += (0x06 & packet[offset + 13]) >>> 1, pes.dts = pes.pts, 0x40 & ptsDtsFlags && (pes.dts = (0x0e & packet[offset + 14]) << 27 | (0xff & packet[offset + 15]) << 20 | (0xfe & packet[offset + 16]) << 12 | (0xff & packet[offset + 17]) << 5 | (0xfe & packet[offset + 18]) >>> 3, pes.dts *= 4, pes.dts += (0x06 & packet[offset + 18]) >>> 1)), pes;
}, parseNalUnitType = function(type) { }, parseNalUnitType = function(type) {
switch(type){ switch(type){
case 0x05: case 0x05:
@ -10587,49 +10621,7 @@
default: default:
return null; return null;
} }
}, handleRollover = timestampRolloverStream.handleRollover, probe = {}; }, videoPacketContainsKeyFrame = function(packet) {
probe.ts = {
parseType: function(packet, pmtPid) {
var pid = parsePid(packet);
return 0 === pid ? "pat" : pid === pmtPid ? "pmt" : pmtPid ? "pes" : null;
},
parsePat: function(packet) {
var pusi = parsePayloadUnitStartIndicator(packet), offset = 4 + parseAdaptionField(packet);
return pusi && (offset += packet[offset] + 1), (0x1f & packet[offset + 10]) << 8 | packet[offset + 11];
},
parsePmt: function(packet) {
var tableEnd, programInfoLength, programMapTable = {}, pusi = parsePayloadUnitStartIndicator(packet), payloadOffset = 4 + parseAdaptionField(packet);
if (pusi && (payloadOffset += packet[payloadOffset] + 1), 0x01 & packet[payloadOffset + 5]) {
tableEnd = 3 + ((0x0f & packet[payloadOffset + 1]) << 8 | packet[payloadOffset + 2]) - 4, programInfoLength = (0x0f & packet[payloadOffset + 10]) << 8 | packet[payloadOffset + 11];
for(var offset = 12 + programInfoLength; offset < tableEnd;){
var i = payloadOffset + offset;
programMapTable[(0x1f & packet[i + 1]) << 8 | packet[i + 2]] = packet[i], offset += ((0x0f & packet[i + 3]) << 8 | packet[i + 4]) + 5;
}
return programMapTable;
}
},
parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,
parsePesType: function(packet, programMapTable) {
var type = programMapTable[parsePid(packet)];
switch(type){
case streamTypes.H264_STREAM_TYPE:
return "video";
case streamTypes.ADTS_STREAM_TYPE:
return "audio";
case streamTypes.METADATA_STREAM_TYPE:
return "timed-metadata";
default:
return null;
}
},
parsePesTime: function(packet) {
if (!parsePayloadUnitStartIndicator(packet)) return null;
var ptsDtsFlags, offset = 4 + parseAdaptionField(packet);
if (offset >= packet.byteLength) return null;
var pes = null;
return 0xc0 & (ptsDtsFlags = packet[offset + 7]) && ((pes = {}).pts = (0x0e & packet[offset + 9]) << 27 | (0xff & packet[offset + 10]) << 20 | (0xfe & packet[offset + 11]) << 12 | (0xff & packet[offset + 12]) << 5 | (0xfe & packet[offset + 13]) >>> 3, pes.pts *= 4, pes.pts += (0x06 & packet[offset + 13]) >>> 1, pes.dts = pes.pts, 0x40 & ptsDtsFlags && (pes.dts = (0x0e & packet[offset + 14]) << 27 | (0xff & packet[offset + 15]) << 20 | (0xfe & packet[offset + 16]) << 12 | (0xff & packet[offset + 17]) << 5 | (0xfe & packet[offset + 18]) >>> 3, pes.dts *= 4, pes.dts += (0x06 & packet[offset + 18]) >>> 1)), pes;
},
videoPacketContainsKeyFrame: function(packet) {
for(var offset = 4 + parseAdaptionField(packet), frameBuffer = packet.subarray(offset), frameI = 0, frameSyncPoint = 0, foundKeyFrame = !1; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++)if (1 === frameBuffer[frameSyncPoint + 2]) { for(var offset = 4 + parseAdaptionField(packet), frameBuffer = packet.subarray(offset), frameI = 0, frameSyncPoint = 0, foundKeyFrame = !1; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++)if (1 === frameBuffer[frameSyncPoint + 2]) {
frameI = frameSyncPoint + 5; frameI = frameSyncPoint + 5;
break; break;
@ -10660,7 +10652,15 @@
frameI += 3; frameI += 3;
} }
return frameBuffer = frameBuffer.subarray(frameSyncPoint), frameI -= frameSyncPoint, frameSyncPoint = 0, frameBuffer && frameBuffer.byteLength > 3 && "slice_layer_without_partitioning_rbsp_idr" === parseNalUnitType(0x1f & frameBuffer[frameSyncPoint + 3]) && (foundKeyFrame = !0), foundKeyFrame; return frameBuffer = frameBuffer.subarray(frameSyncPoint), frameI -= frameSyncPoint, frameSyncPoint = 0, frameBuffer && frameBuffer.byteLength > 3 && "slice_layer_without_partitioning_rbsp_idr" === parseNalUnitType(0x1f & frameBuffer[frameSyncPoint + 3]) && (foundKeyFrame = !0), foundKeyFrame;
} }, handleRollover = timestampRolloverStream.handleRollover, probe = {};
probe.ts = {
parseType: parseType,
parsePat: parsePat,
parsePmt: parsePmt,
parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,
parsePesType: parsePesType,
parsePesTime: parsePesTime,
videoPacketContainsKeyFrame: videoPacketContainsKeyFrame
}, probe.aac = utils; }, probe.aac = utils;
var ONE_SECOND_IN_TS = clock.ONE_SECOND_IN_TS, MP2T_PACKET_LENGTH = 188, parsePsi_ = function(bytes, pmt) { var ONE_SECOND_IN_TS = clock.ONE_SECOND_IN_TS, MP2T_PACKET_LENGTH = 188, parsePsi_ = function(bytes, pmt) {
for(var packet, startIndex = 0, endIndex = MP2T_PACKET_LENGTH; endIndex < bytes.byteLength;){ for(var packet, startIndex = 0, endIndex = MP2T_PACKET_LENGTH; endIndex < bytes.byteLength;){
@ -11008,15 +11008,15 @@
}, processTransmux = function(options) { }, processTransmux = function(options) {
var transmuxer = options.transmuxer, bytes = options.bytes, audioAppendStart = options.audioAppendStart, gopsToAlignWith = options.gopsToAlignWith, remux = options.remux, onData = options.onData, onTrackInfo = options.onTrackInfo, onAudioTimingInfo = options.onAudioTimingInfo, onVideoTimingInfo = options.onVideoTimingInfo, onVideoSegmentTimingInfo = options.onVideoSegmentTimingInfo, onAudioSegmentTimingInfo = options.onAudioSegmentTimingInfo, onId3 = options.onId3, onCaptions = options.onCaptions, onDone = options.onDone, onEndedTimeline = options.onEndedTimeline, onTransmuxerLog = options.onTransmuxerLog, isEndOfTimeline = options.isEndOfTimeline, transmuxedData = { var transmuxer = options.transmuxer, bytes = options.bytes, audioAppendStart = options.audioAppendStart, gopsToAlignWith = options.gopsToAlignWith, remux = options.remux, onData = options.onData, onTrackInfo = options.onTrackInfo, onAudioTimingInfo = options.onAudioTimingInfo, onVideoTimingInfo = options.onVideoTimingInfo, onVideoSegmentTimingInfo = options.onVideoSegmentTimingInfo, onAudioSegmentTimingInfo = options.onAudioSegmentTimingInfo, onId3 = options.onId3, onCaptions = options.onCaptions, onDone = options.onDone, onEndedTimeline = options.onEndedTimeline, onTransmuxerLog = options.onTransmuxerLog, isEndOfTimeline = options.isEndOfTimeline, transmuxedData = {
buffer: [] buffer: []
}, waitForEndedTimelineEvent = isEndOfTimeline; }, waitForEndedTimelineEvent = isEndOfTimeline, handleMessage = function(event) {
if (transmuxer.onmessage = function(event) {
transmuxer.currentTransmux === options && ("data" === event.data.action && handleData_(event, transmuxedData, onData), "trackinfo" === event.data.action && onTrackInfo(event.data.trackInfo), "gopInfo" === event.data.action && handleGopInfo_(event, transmuxedData), "audioTimingInfo" === event.data.action && onAudioTimingInfo(event.data.audioTimingInfo), "videoTimingInfo" === event.data.action && onVideoTimingInfo(event.data.videoTimingInfo), "videoSegmentTimingInfo" === event.data.action && onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo), "audioSegmentTimingInfo" === event.data.action && onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo), "id3Frame" === event.data.action && onId3([ transmuxer.currentTransmux === options && ("data" === event.data.action && handleData_(event, transmuxedData, onData), "trackinfo" === event.data.action && onTrackInfo(event.data.trackInfo), "gopInfo" === event.data.action && handleGopInfo_(event, transmuxedData), "audioTimingInfo" === event.data.action && onAudioTimingInfo(event.data.audioTimingInfo), "videoTimingInfo" === event.data.action && onVideoTimingInfo(event.data.videoTimingInfo), "videoSegmentTimingInfo" === event.data.action && onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo), "audioSegmentTimingInfo" === event.data.action && onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo), "id3Frame" === event.data.action && onId3([
event.data.id3Frame event.data.id3Frame
], event.data.id3Frame.dispatchType), "caption" === event.data.action && onCaptions(event.data.caption), "endedtimeline" === event.data.action && (waitForEndedTimelineEvent = !1, onEndedTimeline()), "log" === event.data.action && onTransmuxerLog(event.data.log), "transmuxed" !== event.data.type || waitForEndedTimelineEvent || (transmuxer.onmessage = null, handleDone_({ ], event.data.id3Frame.dispatchType), "caption" === event.data.action && onCaptions(event.data.caption), "endedtimeline" === event.data.action && (waitForEndedTimelineEvent = !1, onEndedTimeline()), "log" === event.data.action && onTransmuxerLog(event.data.log), "transmuxed" !== event.data.type || waitForEndedTimelineEvent || (transmuxer.onmessage = null, handleDone_({
transmuxedData: transmuxedData, transmuxedData: transmuxedData,
callback: onDone callback: onDone
}), dequeue(transmuxer))); }), dequeue(transmuxer)));
}, audioAppendStart && transmuxer.postMessage({ };
if (transmuxer.onmessage = handleMessage, audioAppendStart && transmuxer.postMessage({
action: "setAudioAppendStart", action: "setAudioAppendStart",
appendStart: audioAppendStart appendStart: audioAppendStart
}), Array.isArray(gopsToAlignWith) && transmuxer.postMessage({ }), Array.isArray(gopsToAlignWith) && transmuxer.postMessage({
@ -11053,21 +11053,17 @@
return; return;
} }
transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action)); transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));
}, reset = function(transmuxer) {
enqueueAction("reset", transmuxer);
}, endTimeline = function(transmuxer) {
enqueueAction("endTimeline", transmuxer);
}, transmux = function(options) { }, transmux = function(options) {
if (!options.transmuxer.currentTransmux) { if (!options.transmuxer.currentTransmux) {
options.transmuxer.currentTransmux = options, processTransmux(options); options.transmuxer.currentTransmux = options, processTransmux(options);
return; return;
} }
options.transmuxer.transmuxQueue.push(options); options.transmuxer.transmuxQueue.push(options);
}, segmentTransmuxer = { }, createTransmuxer = function(options) {
reset: function(transmuxer) {
enqueueAction("reset", transmuxer);
},
endTimeline: function(transmuxer) {
enqueueAction("endTimeline", transmuxer);
},
transmux: transmux,
createTransmuxer: function(options) {
var transmuxer = new TransmuxWorker(); var transmuxer = new TransmuxWorker();
transmuxer.currentTransmux = null, transmuxer.transmuxQueue = []; transmuxer.currentTransmux = null, transmuxer.transmuxQueue = [];
var term = transmuxer.terminate; var term = transmuxer.terminate;
@ -11077,16 +11073,20 @@
action: "init", action: "init",
options: options options: options
}), transmuxer; }), transmuxer;
} }, segmentTransmuxer = {
reset: reset,
endTimeline: endTimeline,
transmux: transmux,
createTransmuxer: createTransmuxer
}, workerCallback = function(options) { }, workerCallback = function(options) {
var transmuxer = options.transmuxer, endAction = options.endAction || options.action, callback = options.callback, message = (0, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_15__.Z)({}, options, { var transmuxer = options.transmuxer, endAction = options.endAction || options.action, callback = options.callback, message = (0, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_15__.Z)({}, options, {
endAction: null, endAction: null,
transmuxer: null, transmuxer: null,
callback: null callback: null
}); }), listenForEndEvent = function listenForEndEvent(event) {
if (transmuxer.addEventListener("message", function listenForEndEvent(event) {
event.data.action === endAction && (transmuxer.removeEventListener("message", listenForEndEvent), event.data.data && (event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength), options.data && (options.data = event.data.data)), callback(event.data)); event.data.action === endAction && (transmuxer.removeEventListener("message", listenForEndEvent), event.data.data && (event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength), options.data && (options.data = event.data.data)), callback(event.data));
}), options.data) { };
if (transmuxer.addEventListener("message", listenForEndEvent), options.data) {
var isArrayBuffer = options.data instanceof ArrayBuffer; var isArrayBuffer = options.data instanceof ArrayBuffer;
message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset, message.byteLength = options.data.byteLength; message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset, message.byteLength = options.data.byteLength;
var transfers = [ var transfers = [
@ -11323,14 +11323,14 @@
onTransmuxerLog: onTransmuxerLog onTransmuxerLog: onTransmuxerLog
}); });
}, decrypt = function(_ref7, callback) { }, decrypt = function(_ref7, callback) {
var keyBytes, id = _ref7.id, key = _ref7.key, encryptedBytes = _ref7.encryptedBytes, decryptionWorker = _ref7.decryptionWorker; var keyBytes, id = _ref7.id, key = _ref7.key, encryptedBytes = _ref7.encryptedBytes, decryptionWorker = _ref7.decryptionWorker, decryptionHandler = function decryptionHandler(event) {
decryptionWorker.addEventListener("message", function decryptionHandler(event) {
if (event.data.source === id) { if (event.data.source === id) {
decryptionWorker.removeEventListener("message", decryptionHandler); decryptionWorker.removeEventListener("message", decryptionHandler);
var decrypted = event.data.decrypted; var decrypted = event.data.decrypted;
callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength)); callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));
} }
}), keyBytes = key.bytes.slice ? key.bytes.slice() : new Uint32Array(Array.prototype.slice.call(key.bytes)), decryptionWorker.postMessage(createTransferableMessage({ };
decryptionWorker.addEventListener("message", decryptionHandler), keyBytes = key.bytes.slice ? key.bytes.slice() : new Uint32Array(Array.prototype.slice.call(key.bytes)), decryptionWorker.postMessage(createTransferableMessage({
source: id, source: id,
encrypted: encryptedBytes, encrypted: encryptedBytes,
key: keyBytes, key: keyBytes,
@ -11561,6 +11561,9 @@
}, comparePlaylistBandwidth = function(left, right) { }, comparePlaylistBandwidth = function(left, right) {
var leftBandwidth, rightBandwidth; var leftBandwidth, rightBandwidth;
return left.attributes.BANDWIDTH && (leftBandwidth = left.attributes.BANDWIDTH), leftBandwidth = leftBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, right.attributes.BANDWIDTH && (rightBandwidth = right.attributes.BANDWIDTH), rightBandwidth = rightBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, leftBandwidth - rightBandwidth; return left.attributes.BANDWIDTH && (leftBandwidth = left.attributes.BANDWIDTH), leftBandwidth = leftBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, right.attributes.BANDWIDTH && (rightBandwidth = right.attributes.BANDWIDTH), rightBandwidth = rightBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, leftBandwidth - rightBandwidth;
}, comparePlaylistResolution = function(left, right) {
var leftWidth, rightWidth;
return (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width && (leftWidth = left.attributes.RESOLUTION.width), leftWidth = leftWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, right.attributes.RESOLUTION && right.attributes.RESOLUTION.width && (rightWidth = right.attributes.RESOLUTION.width), rightWidth = rightWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) ? left.attributes.BANDWIDTH - right.attributes.BANDWIDTH : leftWidth - rightWidth;
}, simpleSelector = function(master, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, masterPlaylistController) { }, simpleSelector = function(master, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, masterPlaylistController) {
if (master) { if (master) {
var resolutionPlusOneList, resolutionPlusOneSmallest, resolutionPlusOneRep, leastPixelDiffRep, options = { var resolutionPlusOneList, resolutionPlusOneSmallest, resolutionPlusOneRep, leastPixelDiffRep, options = {
@ -11640,6 +11643,13 @@
}, lastBandwidthSelector = function() { }, lastBandwidthSelector = function() {
var pixelRatio = this.useDevicePixelRatio && global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio || 1; var pixelRatio = this.useDevicePixelRatio && global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio || 1;
return simpleSelector(this.playlists.master, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), "width"), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), "height"), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_); return simpleSelector(this.playlists.master, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), "width"), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), "height"), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);
}, movingAverageBandwidthSelector = function(decay) {
var average = -1, lastSystemBandwidth = -1;
if (decay < 0 || decay > 1) throw Error("Moving average bandwidth decay must be between 0 and 1.");
return function() {
var pixelRatio = this.useDevicePixelRatio && global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio || 1;
return average < 0 && (average = this.systemBandwidth, lastSystemBandwidth = this.systemBandwidth), this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth && (average = decay * this.systemBandwidth + (1 - decay) * average, lastSystemBandwidth = this.systemBandwidth), simpleSelector(this.playlists.master, average, parseInt(safeGetComputedStyle(this.tech_.el(), "width"), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), "height"), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);
};
}, minRebufferMaxBandwidthSelector = function(settings) { }, minRebufferMaxBandwidthSelector = function(settings) {
var master = settings.master, currentTime = settings.currentTime, bandwidth = settings.bandwidth, duration = settings.duration, segmentDuration = settings.segmentDuration, timeUntilRebuffer = settings.timeUntilRebuffer, currentTimeline = settings.currentTimeline, syncController = settings.syncController, compatiblePlaylists = master.playlists.filter(function(playlist) { var master = settings.master, currentTime = settings.currentTime, bandwidth = settings.bandwidth, duration = settings.duration, segmentDuration = settings.segmentDuration, timeUntilRebuffer = settings.timeUntilRebuffer, currentTimeline = settings.currentTimeline, syncController = settings.syncController, compatiblePlaylists = master.playlists.filter(function(playlist) {
return !Playlist.isIncompatible(playlist); return !Playlist.isIncompatible(playlist);
@ -11661,6 +11671,13 @@
}), noRebufferingPlaylists.length) ? noRebufferingPlaylists[0] : (stableSort(rebufferingEstimates, function(a, b) { }), noRebufferingPlaylists.length) ? noRebufferingPlaylists[0] : (stableSort(rebufferingEstimates, function(a, b) {
return a.rebufferingImpact - b.rebufferingImpact; return a.rebufferingImpact - b.rebufferingImpact;
}), rebufferingEstimates[0] || null); }), rebufferingEstimates[0] || null);
}, lowestBitrateCompatibleVariantSelector = function() {
var _this = this, playlists = this.playlists.master.playlists.filter(Playlist.isEnabled);
return stableSort(playlists, function(a, b) {
return comparePlaylistBandwidth(a, b);
}), playlists.filter(function(playlist) {
return !!codecsForPlaylist(_this.playlists.master, playlist).video;
})[0] || null;
}, concatSegments = function(segmentObj) { }, concatSegments = function(segmentObj) {
var tempBuffer, offset = 0; var tempBuffer, offset = 0;
return segmentObj.bytes && (tempBuffer = new Uint8Array(segmentObj.bytes), segmentObj.segments.forEach(function(segment) { return segmentObj.bytes && (tempBuffer = new Uint8Array(segmentObj.bytes), segmentObj.segments.forEach(function(segment) {
@ -13774,7 +13791,9 @@
"mediaTransferDuration", "mediaTransferDuration",
"mediaBytesTransferred", "mediaBytesTransferred",
"mediaAppends", "mediaAppends",
], shouldSwitchToMedia = function(_ref) { ], sumLoaderStat = function(stat) {
return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];
}, shouldSwitchToMedia = function(_ref) {
var currentPlaylist = _ref.currentPlaylist, buffered = _ref.buffered, currentTime = _ref.currentTime, nextPlaylist = _ref.nextPlaylist, bufferLowWaterLine = _ref.bufferLowWaterLine, bufferHighWaterLine = _ref.bufferHighWaterLine, duration = _ref.duration, experimentalBufferBasedABR = _ref.experimentalBufferBasedABR, log = _ref.log; var currentPlaylist = _ref.currentPlaylist, buffered = _ref.buffered, currentTime = _ref.currentTime, nextPlaylist = _ref.nextPlaylist, bufferLowWaterLine = _ref.bufferLowWaterLine, bufferHighWaterLine = _ref.bufferHighWaterLine, duration = _ref.duration, experimentalBufferBasedABR = _ref.experimentalBufferBasedABR, log = _ref.log;
if (!nextPlaylist) return videojs.log.warn("We received no playlist to switch to. Please check your stream."), !1; if (!nextPlaylist) return videojs.log.warn("We received no playlist to switch to. Please check your stream."), !1;
var sharedLogLine = "allowing switch " + (currentPlaylist && currentPlaylist.id || "null") + " -> " + nextPlaylist.id; var sharedLogLine = "allowing switch " + (currentPlaylist && currentPlaylist.id || "null") + " -> " + nextPlaylist.id;
@ -13855,9 +13874,7 @@
}), _this.tech_.on("play", function() { }), _this.tech_.on("play", function() {
return _this.startABRTimer_(); return _this.startABRTimer_();
})), loaderStats.forEach(function(stat) { })), loaderStats.forEach(function(stat) {
_this[stat + "_"] = (function(stat) { _this[stat + "_"] = sumLoaderStat.bind((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), stat);
return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];
}).bind((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), stat);
}), _this.logger_ = logger("MPC"), _this.triggeredFmp4Usage = !1, "none" === _this.tech_.preload() ? (_this.loadOnPlay_ = function() { }), _this.logger_ = logger("MPC"), _this.triggeredFmp4Usage = !1, "none" === _this.tech_.preload() ? (_this.loadOnPlay_ = function() {
_this.loadOnPlay_ = null, _this.masterPlaylistLoader_.load(); _this.loadOnPlay_ = null, _this.masterPlaylistLoader_.load();
}, _this.tech_.one("play", _this.loadOnPlay_)) : _this.masterPlaylistLoader_.load(), _this.timeToLoadedData__ = -1, _this.mainAppendsToLoadedData__ = -1, _this.audioAppendsToLoadedData__ = -1; }, _this.tech_.one("play", _this.loadOnPlay_)) : _this.masterPlaylistLoader_.load(), _this.timeToLoadedData__ = -1, _this.mainAppendsToLoadedData__ = -1, _this.audioAppendsToLoadedData__ = -1;
@ -14640,37 +14657,22 @@
return lastCalled = Date.now(), localOptions.getSource.call(player, setSource); return lastCalled = Date.now(), localOptions.getSource.call(player, setSource);
}, cleanupEvents = function cleanupEvents() { }, cleanupEvents = function cleanupEvents() {
player.off("loadedmetadata", loadedMetadataHandler), player.off("error", errorHandler), player.off("dispose", cleanupEvents); player.off("loadedmetadata", loadedMetadataHandler), player.off("error", errorHandler), player.off("dispose", cleanupEvents);
}; }, reinitPlugin = function(newOptions) {
player.on("error", errorHandler), player.on("dispose", cleanupEvents), player.reloadSourceOnError = function(newOptions) {
cleanupEvents(), initPlugin(player, newOptions); cleanupEvents(), initPlugin(player, newOptions);
}; };
player.on("error", errorHandler), player.on("dispose", cleanupEvents), player.reloadSourceOnError = reinitPlugin;
}, reloadSourceOnError = function(options) {
initPlugin(this, options);
}, version$4 = "2.12.0", Vhs = { }, version$4 = "2.12.0", Vhs = {
PlaylistLoader: PlaylistLoader, PlaylistLoader: PlaylistLoader,
Playlist: Playlist, Playlist: Playlist,
utils: utils, utils: utils,
STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector, STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,
INITIAL_PLAYLIST_SELECTOR: function() { INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,
var _this = this, playlists = this.playlists.master.playlists.filter(Playlist.isEnabled);
return stableSort(playlists, function(a, b) {
return comparePlaylistBandwidth(a, b);
}), playlists.filter(function(playlist) {
return !!codecsForPlaylist(_this.playlists.master, playlist).video;
})[0] || null;
},
lastBandwidthSelector: lastBandwidthSelector, lastBandwidthSelector: lastBandwidthSelector,
movingAverageBandwidthSelector: function(decay) { movingAverageBandwidthSelector: movingAverageBandwidthSelector,
var average = -1, lastSystemBandwidth = -1;
if (decay < 0 || decay > 1) throw Error("Moving average bandwidth decay must be between 0 and 1.");
return function() {
var pixelRatio = this.useDevicePixelRatio && global_window__WEBPACK_IMPORTED_MODULE_0___default().devicePixelRatio || 1;
return average < 0 && (average = this.systemBandwidth, lastSystemBandwidth = this.systemBandwidth), this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth && (average = decay * this.systemBandwidth + (1 - decay) * average, lastSystemBandwidth = this.systemBandwidth), simpleSelector(this.playlists.master, average, parseInt(safeGetComputedStyle(this.tech_.el(), "width"), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), "height"), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.masterPlaylistController_);
};
},
comparePlaylistBandwidth: comparePlaylistBandwidth, comparePlaylistBandwidth: comparePlaylistBandwidth,
comparePlaylistResolution: function(left, right) { comparePlaylistResolution: comparePlaylistResolution,
var leftWidth, rightWidth;
return (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width && (leftWidth = left.attributes.RESOLUTION.width), leftWidth = leftWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, right.attributes.RESOLUTION && right.attributes.RESOLUTION.width && (rightWidth = right.attributes.RESOLUTION.width), rightWidth = rightWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default().Number.MAX_VALUE, leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) ? left.attributes.BANDWIDTH - right.attributes.BANDWIDTH : leftWidth - rightWidth;
},
xhr: xhrFactory() xhr: xhrFactory()
}; };
Object.keys(Config).forEach(function(prop) { Object.keys(Config).forEach(function(prop) {
@ -15210,9 +15212,7 @@
return videojs.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."), Vhs; return videojs.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."), Vhs;
}, },
configurable: !0 configurable: !0
}), videojs.use || (videojs.registerComponent("Hls", Vhs), videojs.registerComponent("Vhs", Vhs)), videojs.options.vhs = videojs.options.vhs || {}, videojs.options.hls = videojs.options.hls || {}, videojs.getPlugin && videojs.getPlugin("reloadSourceOnError") || (videojs.registerPlugin || videojs.plugin)("reloadSourceOnError", function(options) { }), videojs.use || (videojs.registerComponent("Hls", Vhs), videojs.registerComponent("Vhs", Vhs)), videojs.options.vhs = videojs.options.vhs || {}, videojs.options.hls = videojs.options.hls || {}, videojs.getPlugin && videojs.getPlugin("reloadSourceOnError") || (videojs.registerPlugin || videojs.plugin)("reloadSourceOnError", reloadSourceOnError), __webpack_exports__.Z = videojs;
initPlugin(this, options);
}), __webpack_exports__.Z = videojs;
} }
}, },
]); ]);

View File

@ -774,8 +774,7 @@
}, },
779: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 779: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9945), url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__), global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8908), global_window__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__), DEFAULT_LOCATION = "http://example.com"; var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9945), url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__), global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8908), global_window__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__), DEFAULT_LOCATION = "http://example.com", resolveUrl = function(baseUrl, relativeUrl) {
__webpack_exports__.Z = function(baseUrl, relativeUrl) {
if (/^[a-z]+:/i.test(relativeUrl)) return relativeUrl; if (/^[a-z]+:/i.test(relativeUrl)) return relativeUrl;
/^data:/.test(baseUrl) && (baseUrl = global_window__WEBPACK_IMPORTED_MODULE_1___default().location && global_window__WEBPACK_IMPORTED_MODULE_1___default().location.href || ""); /^data:/.test(baseUrl) && (baseUrl = global_window__WEBPACK_IMPORTED_MODULE_1___default().location && global_window__WEBPACK_IMPORTED_MODULE_1___default().location.href || "");
var nativeURL = "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_1___default().URL, protocolLess = /^\/\//.test(baseUrl), removeLocation = !global_window__WEBPACK_IMPORTED_MODULE_1___default().location && !/\/\//i.test(baseUrl); var nativeURL = "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_1___default().URL, protocolLess = /^\/\//.test(baseUrl), removeLocation = !global_window__WEBPACK_IMPORTED_MODULE_1___default().location && !/\/\//i.test(baseUrl);
@ -785,11 +784,11 @@
} }
return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl); return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl);
}; };
__webpack_exports__.Z = resolveUrl;
}, },
3490: function(module, __unused_webpack_exports, __webpack_require__) { 3490: function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
var window1 = __webpack_require__(8908); var window1 = __webpack_require__(8908), httpResponseHandler = function(callback, decodeResponseBody) {
module.exports = function(callback, decodeResponseBody) {
return void 0 === decodeResponseBody && (decodeResponseBody = !1), function(err, response, responseBody) { return void 0 === decodeResponseBody && (decodeResponseBody = !1), function(err, response, responseBody) {
if (err) { if (err) {
callback(err); callback(err);
@ -799,10 +798,7 @@
var cause = responseBody; var cause = responseBody;
if (decodeResponseBody) { if (decodeResponseBody) {
if (window1.TextDecoder) { if (window1.TextDecoder) {
var contentTypeHeader, charset = (void 0 === (contentTypeHeader = response.headers && response.headers["content-type"]) && (contentTypeHeader = ""), contentTypeHeader.toLowerCase().split(";").reduce(function(charset, contentType) { var charset = getCharset(response.headers && response.headers["content-type"]);
var _contentType$split = contentType.split("="), type = _contentType$split[0], value = _contentType$split[1];
return "charset" === type.trim() ? value.trim() : charset;
}, "utf-8"));
try { try {
cause = new TextDecoder(charset).decode(responseBody); cause = new TextDecoder(charset).decode(responseBody);
} catch (e) {} } catch (e) {}
@ -816,6 +812,13 @@
callback(null, responseBody); callback(null, responseBody);
}; };
}; };
function getCharset(contentTypeHeader) {
return void 0 === contentTypeHeader && (contentTypeHeader = ""), contentTypeHeader.toLowerCase().split(";").reduce(function(charset, contentType) {
var _contentType$split = contentType.split("="), type = _contentType$split[0], value = _contentType$split[1];
return "charset" === type.trim() ? value.trim() : charset;
}, "utf-8");
}
module.exports = httpResponseHandler;
}, },
9603: function(module, __unused_webpack_exports, __webpack_require__) { 9603: function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
@ -2679,10 +2682,10 @@
}), !0; }), !0;
}); });
}, _proto.addTagMapper = function(_ref2) { }, _proto.addTagMapper = function(_ref2) {
var expression = _ref2.expression, map = _ref2.map; var expression = _ref2.expression, map = _ref2.map, mapFn = function(line) {
this.tagMappers.push(function(line) {
return expression.test(line) ? map(line) : line; return expression.test(line) ? map(line) : line;
}); };
this.tagMappers.push(mapFn);
}, ParseStream; }, ParseStream;
}(Stream), camelCase = function(str) { }(Stream), camelCase = function(str) {
return str.toLowerCase().replace(/-(\w)/g, function(a) { return str.toLowerCase().replace(/-(\w)/g, function(a) {
@ -3634,7 +3637,7 @@
}; };
}, },
4221: function(module) { 4221: function(module) {
module.exports = function(data) { var parseSidx = function(data) {
var view = new DataView(data.buffer, data.byteOffset, data.byteLength), result = { var view = new DataView(data.buffer, data.byteOffset, data.byteLength), result = {
version: data[0], version: data[0],
flags: new Uint8Array(data.subarray(1, 4)), flags: new Uint8Array(data.subarray(1, 4)),
@ -3654,6 +3657,7 @@
}); });
return result; return result;
}; };
module.exports = parseSidx;
}, },
1489: function(module) { 1489: function(module) {
var secondsToVideoTs, secondsToAudioTs, videoTsToSeconds, audioTsToSeconds, audioTsToVideoTs, videoTsToAudioTs, metadataTsToSeconds; var secondsToVideoTs, secondsToAudioTs, videoTsToSeconds, audioTsToSeconds, audioTsToVideoTs, videoTsToAudioTs, metadataTsToSeconds;
@ -3699,7 +3703,7 @@
}); });
var jsx_runtime = __webpack_require__(5893), react = __webpack_require__(7294), Home_module = __webpack_require__(214), Home_module_default = __webpack_require__.n(Home_module), video_es = __webpack_require__(5215); var jsx_runtime = __webpack_require__(5893), react = __webpack_require__(7294), Home_module = __webpack_require__(214), Home_module_default = __webpack_require__.n(Home_module), video_es = __webpack_require__(5215);
__webpack_require__(3512); __webpack_require__(3512);
var components_VideoJS = function(props) { var VideoJS = function(props) {
var videoRef = react.useRef(null), playerRef = react.useRef(null), options = props.options, onReady = props.onReady; var videoRef = react.useRef(null), playerRef = react.useRef(null), options = props.options, onReady = props.onReady;
return react.useEffect(function() { return react.useEffect(function() {
if (!playerRef.current) { if (!playerRef.current) {
@ -3726,9 +3730,15 @@
className: "video-js vjs-big-play-centered" className: "video-js vjs-big-play-centered"
}) })
}); });
}; }, components_VideoJS = VideoJS;
function Home() { function Home() {
var playerRef = (0, react.useRef)(null); var playerRef = (0, react.useRef)(null), handlePlayerReady = function(player) {
playerRef.current = player, player.on("waiting", function() {
console.log("player is waiting");
}), player.on("dispose", function() {
console.log("player will dispose");
});
};
return (0, jsx_runtime.jsx)("div", { return (0, jsx_runtime.jsx)("div", {
className: Home_module_default().container, className: Home_module_default().container,
children: (0, jsx_runtime.jsx)("main", { children: (0, jsx_runtime.jsx)("main", {
@ -3746,13 +3756,7 @@
}, },
] ]
}, },
onReady: function(player) { onReady: handlePlayerReady
playerRef.current = player, player.on("waiting", function() {
console.log("player is waiting");
}), player.on("dispose", function() {
console.log("player will dispose");
});
}
}) })
}) })
}); });

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -546,7 +546,9 @@
"module" "module"
], function(require, exports, module) { ], function(require, exports, module) {
"use strict"; "use strict";
var Range = function(startRow, startColumn, endRow, endColumn) { var comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column;
}, Range = function(startRow, startColumn, endRow, endColumn) {
this.start = { this.start = {
row: startRow, row: startRow,
column: startColumn column: startColumn
@ -640,9 +642,7 @@
}; };
}).call(Range.prototype), Range.fromPoints = function(start, end) { }).call(Range.prototype), Range.fromPoints = function(start, end) {
return new Range(start.row, start.column, end.row, end.column); return new Range(start.row, start.column, end.row, end.column);
}, Range.comparePoints = function(p1, p2) { }, Range.comparePoints = comparePoints, Range.comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column;
}, Range.comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column; return p1.row - p2.row || p1.column - p2.column;
}, exports.Range = Range; }, exports.Range = Range;
}), ace.define("ace/lib/lang", [ }), ace.define("ace/lib/lang", [
@ -759,8 +759,7 @@
"ace/lib/keys", "ace/lib/keys",
], function(require, exports, module) { ], function(require, exports, module) {
"use strict"; "use strict";
var event = require("../lib/event"), useragent = require("../lib/useragent"), dom = require("../lib/dom"), lang = require("../lib/lang"), clipboard = require("../clipboard"), BROKEN_SETDATA = useragent.isChrome < 18, USE_IE_MIME_TYPE = useragent.isIE, HAS_FOCUS_ARGS = useragent.isChrome > 63, KEYS = require("../lib/keys"), MODS = KEYS.KEY_MODS, isIOS = useragent.isIOS, valueResetRegex = isIOS ? /\s/ : /\n/, isMobile = useragent.isMobile; var event = require("../lib/event"), useragent = require("../lib/useragent"), dom = require("../lib/dom"), lang = require("../lib/lang"), clipboard = require("../clipboard"), BROKEN_SETDATA = useragent.isChrome < 18, USE_IE_MIME_TYPE = useragent.isIE, HAS_FOCUS_ARGS = useragent.isChrome > 63, KEYS = require("../lib/keys"), MODS = KEYS.KEY_MODS, isIOS = useragent.isIOS, valueResetRegex = isIOS ? /\s/ : /\n/, isMobile = useragent.isMobile, TextInput = function(parentNode, host) {
exports.TextInput = function(parentNode, host) {
var closeTimeout, text = dom.createElement("textarea"); var closeTimeout, text = dom.createElement("textarea");
text.className = "ace_text-input", text.setAttribute("wrap", "off"), text.setAttribute("autocorrect", "off"), text.setAttribute("autocapitalize", "off"), text.setAttribute("spellcheck", !1), text.style.opacity = "0", parentNode.insertBefore(text, parentNode.firstChild); text.className = "ace_text-input", text.setAttribute("wrap", "off"), text.setAttribute("autocorrect", "off"), text.setAttribute("autocapitalize", "off"), text.setAttribute("spellcheck", !1), text.style.opacity = "0", parentNode.insertBefore(text, parentNode.firstChild);
var copied = !1, pasted = !1, inComposition = !1, sendingText = !1, tempStyle = ""; var copied = !1, pasted = !1, inComposition = !1, sendingText = !1, tempStyle = "";
@ -840,7 +839,15 @@
} }
}; };
this.resetSelection = resetSelection, isFocused && host.onFocus(); this.resetSelection = resetSelection, isFocused && host.onFocus();
var inputHandler = null; var onSelect = function(e) {
if (!inComposition) {
if (copied) copied = !1;
else {
var text1;
0 === (text1 = text).selectionStart && text1.selectionEnd >= lastValue.length && text1.value === lastValue && lastValue && text1.selectionEnd !== lastSelectionEnd ? (host.selectAll(), resetSelection()) : isMobile && text.selectionStart != lastSelectionStart && resetSelection();
}
}
}, inputHandler = null;
this.setInputHandler = function(cb) { this.setInputHandler = function(cb) {
inputHandler = cb; inputHandler = cb;
}, this.getInputHandler = function() { }, this.getInputHandler = function() {
@ -896,15 +903,7 @@
var data = handleClipboardData(e); var data = handleClipboardData(e);
clipboard.pasteCancelled() || ("string" == typeof data ? (data && host.onPaste(data, e), useragent.isIE && setTimeout(resetSelection), event.preventDefault(e)) : (text.value = "", pasted = !0)); clipboard.pasteCancelled() || ("string" == typeof data ? (data && host.onPaste(data, e), useragent.isIE && setTimeout(resetSelection), event.preventDefault(e)) : (text.value = "", pasted = !0));
}; };
event.addCommandKeyListener(text, host.onCommandKey.bind(host), host), event.addListener(text, "select", function(e) { event.addCommandKeyListener(text, host.onCommandKey.bind(host), host), event.addListener(text, "select", onSelect, host), event.addListener(text, "input", onInput, host), event.addListener(text, "cut", onCut, host), event.addListener(text, "copy", onCopy, host), event.addListener(text, "paste", onPaste, host), "oncut" in text && "oncopy" in text && "onpaste" in text || event.addListener(parentNode, "keydown", function(e) {
if (!inComposition) {
if (copied) copied = !1;
else {
var text1;
0 === (text1 = text).selectionStart && text1.selectionEnd >= lastValue.length && text1.value === lastValue && lastValue && text1.selectionEnd !== lastSelectionEnd ? (host.selectAll(), resetSelection()) : isMobile && text.selectionStart != lastSelectionStart && resetSelection();
}
}
}, host), event.addListener(text, "input", onInput, host), event.addListener(text, "cut", onCut, host), event.addListener(text, "copy", onCopy, host), event.addListener(text, "paste", onPaste, host), "oncut" in text && "oncopy" in text && "onpaste" in text || event.addListener(parentNode, "keydown", function(e) {
if ((!useragent.isMac || e.metaKey) && e.ctrlKey) switch(e.keyCode){ if ((!useragent.isMac || e.metaKey) && e.ctrlKey) switch(e.keyCode){
case 67: case 67:
onCopy(e); onCopy(e);
@ -916,7 +915,13 @@
onCut(e); onCut(e);
} }
}, host); }, host);
var onCompositionUpdate = function() { var onCompositionStart = function(e) {
if (!inComposition && host.onCompositionStart && !host.$readOnly && (inComposition = {}, !commandMode)) {
e.data && (inComposition.useTextareaForIME = !1), setTimeout(onCompositionUpdate, 0), host._signal("compositionStart"), host.on("mousedown", cancelComposition);
var range = host.getSelectionRange();
range.end.row = range.start.row, range.end.column = range.start.column, inComposition.markerRange = range, inComposition.selectionStart = lastSelectionStart, host.onCompositionStart(inComposition), inComposition.useTextareaForIME ? (lastValue = text.value = "", lastSelectionStart = 0, lastSelectionEnd = 0) : (text.msGetInputContext && (inComposition.context = text.msGetInputContext()), text.getInputContext && (inComposition.context = text.getInputContext()));
}
}, onCompositionUpdate = function() {
if (inComposition && host.onCompositionUpdate && !host.$readOnly) { if (inComposition && host.onCompositionUpdate && !host.$readOnly) {
if (commandMode) return cancelComposition(); if (commandMode) return cancelComposition();
inComposition.useTextareaForIME ? host.onCompositionUpdate(text.value) : (sendText(text.value), inComposition.markerRange && (inComposition.context && (inComposition.markerRange.start.column = inComposition.selectionStart = inComposition.context.compositionStartOffset), inComposition.markerRange.end.column = inComposition.markerRange.start.column + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd)); inComposition.useTextareaForIME ? host.onCompositionUpdate(text.value) : (sendText(text.value), inComposition.markerRange && (inComposition.context && (inComposition.markerRange.start.column = inComposition.selectionStart = inComposition.context.compositionStartOffset), inComposition.markerRange.end.column = inComposition.markerRange.start.column + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd));
@ -933,13 +938,7 @@
tempStyle && (text.style.cssText = tempStyle, tempStyle = ""), host.renderer.$isMousePressed = !1, host.renderer.$keepTextAreaAtCursor && host.renderer.$moveTextAreaToCursor(); tempStyle && (text.style.cssText = tempStyle, tempStyle = ""), host.renderer.$isMousePressed = !1, host.renderer.$keepTextAreaAtCursor && host.renderer.$moveTextAreaToCursor();
}, 0); }, 0);
} }
event.addListener(text, "compositionstart", function(e) { event.addListener(text, "compositionstart", onCompositionStart, host), event.addListener(text, "compositionupdate", onCompositionUpdate, host), event.addListener(text, "keyup", function(e) {
if (!inComposition && host.onCompositionStart && !host.$readOnly && (inComposition = {}, !commandMode)) {
e.data && (inComposition.useTextareaForIME = !1), setTimeout(onCompositionUpdate, 0), host._signal("compositionStart"), host.on("mousedown", cancelComposition);
var range = host.getSelectionRange();
range.end.row = range.start.row, range.end.column = range.start.column, inComposition.markerRange = range, inComposition.selectionStart = lastSelectionStart, host.onCompositionStart(inComposition), inComposition.useTextareaForIME ? (lastValue = text.value = "", lastSelectionStart = 0, lastSelectionEnd = 0) : (text.msGetInputContext && (inComposition.context = text.msGetInputContext()), text.getInputContext && (inComposition.context = text.getInputContext()));
}
}, host), event.addListener(text, "compositionupdate", onCompositionUpdate, host), event.addListener(text, "keyup", function(e) {
27 == e.keyCode && text.value.length < text.selectionStart && (inComposition || (lastValue = text.value), lastSelectionStart = lastSelectionEnd = -1, resetSelection()), syncComposition(); 27 == e.keyCode && text.value.length < text.selectionStart && (inComposition || (lastValue = text.value), lastSelectionStart = lastSelectionEnd = -1, resetSelection()), syncComposition();
}, host), event.addListener(text, "keydown", syncComposition, host), event.addListener(text, "compositionend", onCompositionEnd, host), this.getElement = function() { }, host), event.addListener(text, "keydown", syncComposition, host), event.addListener(text, "compositionend", onCompositionEnd, host), this.getElement = function() {
return text; return text;
@ -985,7 +984,8 @@
}, document.addEventListener("selectionchange", detectArrowKeys), host1.on("destroy", function() { }, document.addEventListener("selectionchange", detectArrowKeys), host1.on("destroy", function() {
document.removeEventListener("selectionchange", detectArrowKeys); document.removeEventListener("selectionchange", detectArrowKeys);
})); }));
}, exports.$setUserAgentForTests = function(_isMobile, _isIOS) { };
exports.TextInput = TextInput, exports.$setUserAgentForTests = function(_isMobile, _isIOS) {
isMobile = _isMobile, isIOS = _isIOS; isMobile = _isMobile, isIOS = _isIOS;
}; };
}), ace.define("ace/mouse/default_handlers", [ }), ace.define("ace/mouse/default_handlers", [
@ -3073,7 +3073,13 @@
this.$embeds || (this.$embeds = []), this.$embeds.push(prefix); this.$embeds || (this.$embeds = []), this.$embeds.push(prefix);
}, this.getEmbeds = function() { }, this.getEmbeds = function() {
return this.$embeds; return this.$embeds;
}, this.normalizeRules = function() { };
var pushState = function(currentState, stack) {
return ("start" != currentState || stack.length) && stack.unshift(this.nextState, currentState), this.nextState;
}, popState = function(currentState, stack) {
return stack.shift(), stack.shift() || "start";
};
this.normalizeRules = function() {
var id = 0, rules = this.$rules; var id = 0, rules = this.$rules;
function processState(key) { function processState(key) {
var state = rules[key]; var state = rules[key];
@ -3091,12 +3097,8 @@
if (next && Array.isArray(next)) { if (next && Array.isArray(next)) {
var stateName = rule.stateName; var stateName = rule.stateName;
!stateName && ("string" != typeof (stateName = rule.token) && (stateName = stateName[0] || ""), rules[stateName] && (stateName += id++)), rules[stateName] = next, rule.next = stateName, processState(stateName); !stateName && ("string" != typeof (stateName = rule.token) && (stateName = stateName[0] || ""), rules[stateName] && (stateName += id++)), rules[stateName] = next, rule.next = stateName, processState(stateName);
} else "pop" == next && (rule.next = function(currentState, stack) { } else "pop" == next && (rule.next = popState);
return stack.shift(), stack.shift() || "start"; if (rule.push && (rule.nextState = rule.next || rule.push, rule.next = pushState, delete rule.push), rule.rules) for(var r in rule.rules)rules[r] ? rules[r].push && rules[r].push.apply(rules[r], rule.rules[r]) : rules[r] = rule.rules[r];
});
if (rule.push && (rule.nextState = rule.next || rule.push, rule.next = function(currentState, stack) {
return ("start" != currentState || stack.length) && stack.unshift(this.nextState, currentState), this.nextState;
}, delete rule.push), rule.rules) for(var r in rule.rules)rules[r] ? rules[r].push && rules[r].push.apply(rules[r], rule.rules[r]) : rules[r] = rule.rules[r];
var includeName = "string" == typeof rule ? rule : rule.include; var includeName = "string" == typeof rule ? rule : rule.include;
if (includeName && (toInsert = Array.isArray(includeName) ? includeName.map(function(x) { if (includeName && (toInsert = Array.isArray(includeName) ? includeName.map(function(x) {
return rules[x]; return rules[x];
@ -11167,7 +11169,8 @@ margin: 0 10px;\
data: q data: q
})); }));
}; };
}).call(WorkerClient.prototype), exports.UIWorkerClient = function(topLevelNamespaces, mod, classname) { }).call(WorkerClient.prototype);
var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
var main = null, emitSync = !1, sender = Object.create(EventEmitter), messageBuffer = [], workerClient = new WorkerClient({ var main = null, emitSync = !1, sender = Object.create(EventEmitter), messageBuffer = [], workerClient = new WorkerClient({
messageBuffer: messageBuffer, messageBuffer: messageBuffer,
terminate: function() {}, terminate: function() {},
@ -11204,7 +11207,8 @@ margin: 0 10px;\
], function(Main) { ], function(Main) {
for(main = new Main[classname](sender); messageBuffer.length;)processNext(); for(main = new Main[classname](sender); messageBuffer.length;)processNext();
}), workerClient; }), workerClient;
}, exports.WorkerClient = WorkerClient, exports.createWorker = createWorker; };
exports.UIWorkerClient = UIWorkerClient, exports.WorkerClient = WorkerClient, exports.createWorker = createWorker;
}), ace.define("ace/placeholder", [ }), ace.define("ace/placeholder", [
"require", "require",
"exports", "exports",

File diff suppressed because it is too large Load Diff

View File

@ -3457,7 +3457,20 @@
}, },
9996: function(module) { 9996: function(module) {
"use strict"; "use strict";
var isMergeableObject = function(value) {
return isNonNullObject(value) && !isSpecial(value);
};
function isNonNullObject(value) {
return !!value && "object" == typeof value;
}
function isSpecial(value) {
var stringValue = Object.prototype.toString.call(value);
return "[object RegExp]" === stringValue || "[object Date]" === stringValue || isReactElement(value);
}
var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 0xeac7; var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 0xeac7;
function isReactElement(value) {
return value.$$typeof === REACT_ELEMENT_TYPE;
}
function cloneUnlessOtherwiseSpecified(value, options) { function cloneUnlessOtherwiseSpecified(value, options) {
return !1 !== options.clone && options.isMergeableObject(value) ? deepmerge(Array.isArray(value) ? [] : {}, value, options) : value; return !1 !== options.clone && options.isMergeableObject(value) ? deepmerge(Array.isArray(value) ? [] : {}, value, options) : value;
} }
@ -3480,10 +3493,7 @@
} }
} }
function deepmerge(target, source, options) { function deepmerge(target, source, options) {
(options = options || {}).arrayMerge = options.arrayMerge || defaultArrayMerge, options.isMergeableObject = options.isMergeableObject || function(value) { (options = options || {}).arrayMerge = options.arrayMerge || defaultArrayMerge, options.isMergeableObject = options.isMergeableObject || isMergeableObject, options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
var value1, value2, stringValue;
return !!(value1 = value) && "object" == typeof value1 && (value2 = value, !("[object RegExp]" === (stringValue = Object.prototype.toString.call(value2)) || "[object Date]" === stringValue || value2.$$typeof === REACT_ELEMENT_TYPE));
}, options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
var target1, source1, options1, destination, sourceIsArray = Array.isArray(source), targetIsArray = Array.isArray(target); var target1, source1, options1, destination, sourceIsArray = Array.isArray(source), targetIsArray = Array.isArray(target);
return sourceIsArray !== targetIsArray ? cloneUnlessOtherwiseSpecified(source, options) : sourceIsArray ? options.arrayMerge(target, source, options) : (target1 = target, source1 = source, destination = {}, (options1 = options).isMergeableObject(target1) && getKeys(target1).forEach(function(key) { return sourceIsArray !== targetIsArray ? cloneUnlessOtherwiseSpecified(source, options) : sourceIsArray ? options.arrayMerge(target, source, options) : (target1 = target, source1 = source, destination = {}, (options1 = options).isMergeableObject(target1) && getKeys(target1).forEach(function(key) {
destination[key] = cloneUnlessOtherwiseSpecified(target1[key], options1); destination[key] = cloneUnlessOtherwiseSpecified(target1[key], options1);
@ -5237,14 +5247,14 @@
return parsers.forEach(function(parser) { return parsers.forEach(function(parser) {
parser && parser.config && object_assign_default()(config, parser.config); parser && parser.config && object_assign_default()(config, parser.config);
}), createParser(config); }), createParser(config);
}, getWidth = function(n, scale) {
var n1;
return get(scale, n, "number" != typeof (n1 = n) || isNaN(n1) || n > 1 ? n : 100 * n + "%");
}, layout = system({ }, layout = system({
width: { width: {
property: "width", property: "width",
scale: "sizes", scale: "sizes",
transform: function(n, scale) { transform: getWidth
var n1;
return get(scale, n, "number" != typeof (n1 = n) || isNaN(n1) || n > 1 ? n : 100 * n + "%");
}
}, },
height: { height: {
property: "height", property: "height",
@ -5902,7 +5912,9 @@
}), alias && (config[alias] = config[prop]); }), alias && (config[alias] = config[prop]);
var parse = createParser(config); var parse = createParser(config);
return parse; return parse;
}, cjs = __webpack_require__(9996), cjs_default = __webpack_require__.n(cjs), lib_esm_sx = (props)=>css_dist_index_esm(props.sx); }, cjs = __webpack_require__(9996), cjs_default = __webpack_require__.n(cjs);
const sx = (props)=>css_dist_index_esm(props.sx);
var lib_esm_sx = sx;
const Box = styled_components_browser_esm.div.withConfig({ const Box = styled_components_browser_esm.div.withConfig({
displayName: "Box", displayName: "Box",
componentId: "sc-1gh2r6s-0" componentId: "sc-1gh2r6s-0"
@ -6359,7 +6371,11 @@
} }
}), TYPOGRAPHY = constants_compose(typography, whiteSpace); }), TYPOGRAPHY = constants_compose(typography, whiteSpace);
constants_compose(border, shadow); constants_compose(border, shadow);
const CounterLabel = styled_components_browser_esm.span.withConfig({ const colorStyles = ({ scheme , ...props })=>({
color: "secondary" === scheme ? constants_get("colors.fg.default")(props) : "primary" === scheme ? constants_get("colors.fg.onEmphasis")(props) : constants_get("colors.fg.default")(props)
}), bgStyles = ({ scheme , ...props })=>({
backgroundColor: "secondary" === scheme ? constants_get("colors.neutral.muted")(props) : "primary" === scheme ? constants_get("colors.neutral.emphasis")(props) : constants_get("colors.neutral.muted")(props)
}), CounterLabel = styled_components_browser_esm.span.withConfig({
displayName: "CounterLabel", displayName: "CounterLabel",
componentId: "sc-13ceqbg-0" componentId: "sc-13ceqbg-0"
})([ })([
@ -6370,11 +6386,7 @@
";", ";",
";&:empty{display:none;}", ";&:empty{display:none;}",
";", ";",
], constants_get("fontSizes.0"), constants_get("fontWeights.bold"), constants_get("lineHeights.condensedUltra"), ({ scheme , ...props })=>({ ], constants_get("fontSizes.0"), constants_get("fontWeights.bold"), constants_get("lineHeights.condensedUltra"), colorStyles, bgStyles, lib_esm_sx);
color: "secondary" === scheme ? constants_get("colors.fg.default")(props) : "primary" === scheme ? constants_get("colors.fg.onEmphasis")(props) : constants_get("colors.fg.default")(props)
}), ({ scheme , ...props })=>({
backgroundColor: "secondary" === scheme ? constants_get("colors.neutral.muted")(props) : "primary" === scheme ? constants_get("colors.neutral.emphasis")(props) : constants_get("colors.neutral.muted")(props)
}), lib_esm_sx);
var lib_esm_CounterLabel = CounterLabel; var lib_esm_CounterLabel = CounterLabel;
function ButtonCounter_extends() { function ButtonCounter_extends() {
return (ButtonCounter_extends = Object.assign || function(target) { return (ButtonCounter_extends = Object.assign || function(target) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return c(5075)},])},5075:function(a,b,c){"use strict";c.r(b);var d=c(5893),e=c(7294),f=c(6785),g=c(214),h=c.n(g);function i(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}b.default=function(){var a=(0,e.useState)({width:800,height:600,latitude:37.7577,longitude:-122.4376,zoom:8})[0];return(0,d.jsx)("div",{className:h().container,children:(0,d.jsx)(f.ZP,function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))),d.forEach(function(b){i(a,b,c[b])})}return a}({},a,{mapStyle:"mapbox://styles/mapbox/dark-v10",mapboxApiAccessToken:"pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg"}))})}},214:function(a){a.exports={container:"Home_container__bCOhY",main:"Home_main__nLjiQ",footer:"Home_footer____T7K",title:"Home_title__T09hD",description:"Home_description__41Owk",code:"Home_code__suPER",grid:"Home_grid__GxQ85",card:"Home_card___LpL1",logo:"Home_logo__27_tb"}}},function(a){a.O(0,[634,785,774,888,179],function(){return a(a.s=5301)}),_N_E=a.O()},]) (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return c(5075)},])},5075:function(a,b,c){"use strict";c.r(b);var d=c(5893),e=c(7294),f=c(6785),g=c(214),h=c.n(g);function i(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var j=function(){var a=(0,e.useState)({width:800,height:600,latitude:37.7577,longitude:-122.4376,zoom:8})[0];return(0,d.jsx)("div",{className:h().container,children:(0,d.jsx)(f.ZP,function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))),d.forEach(function(b){i(a,b,c[b])})}return a}({},a,{mapStyle:"mapbox://styles/mapbox/dark-v10",mapboxApiAccessToken:"pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg"}))})};b.default=j},214:function(a){a.exports={container:"Home_container__bCOhY",main:"Home_main__nLjiQ",footer:"Home_footer____T7K",title:"Home_title__T09hD",description:"Home_description__41Owk",code:"Home_code__suPER",grid:"Home_grid__GxQ85",card:"Home_card___LpL1",logo:"Home_logo__27_tb"}}},function(a){a.O(0,[634,785,774,888,179],function(){return a(a.s=5301)}),_N_E=a.O()},])

View File

@ -2666,17 +2666,7 @@
}), result.promise; }), result.promise;
} }
}; };
}; }, when = function(value, callback, errback, progressback) {
function defaultCallback(value) {
return value;
}
function defaultErrback(reason) {
return reject(reason);
}
return {
defer: defer,
reject: reject,
when: function(value, callback, errback, progressback) {
var done, result = defer(), wrappedCallback = function(value) { var done, result = defer(), wrappedCallback = function(value) {
try { try {
return (isFunction(callback) ? callback : defaultCallback)(value); return (isFunction(callback) ? callback : defaultCallback)(value);
@ -2705,7 +2695,17 @@
done || result.notify(wrappedProgressback(progress)); done || result.notify(wrappedProgressback(progress));
}); });
}), result.promise; }), result.promise;
}, };
function defaultCallback(value) {
return value;
}
function defaultErrback(reason) {
return reject(reason);
}
return {
defer: defer,
reject: reject,
when: when,
all: function(promises) { all: function(promises) {
var deferred = defer(), counter = 0, results = isArray(promises) ? [] : {}; var deferred = defer(), counter = 0, results = isArray(promises) ? [] : {};
return forEach(promises, function(promise, key) { return forEach(promises, function(promise, key) {
@ -3747,22 +3747,35 @@
return { return {
require: "ngModel", require: "ngModel",
link: function(scope, element, attr, ctrl) { link: function(scope, element, attr, ctrl) {
var match = /\/(.*)\//.exec(attr.ngList), separator = match && RegExp(match[1]) || attr.ngList || ","; var match = /\/(.*)\//.exec(attr.ngList), separator = match && RegExp(match[1]) || attr.ngList || ",", parse = function(viewValue) {
ctrl.$parsers.push(function(viewValue) {
if (!isUndefined(viewValue)) { if (!isUndefined(viewValue)) {
var list = []; var list = [];
return viewValue && forEach(viewValue.split(separator), function(value) { return viewValue && forEach(viewValue.split(separator), function(value) {
value && list.push(trim(value)); value && list.push(trim(value));
}), list; }), list;
} }
}), ctrl.$formatters.push(function(value) { };
ctrl.$parsers.push(parse), ctrl.$formatters.push(function(value) {
if (isArray(value)) return value.join(", "); if (isArray(value)) return value.join(", ");
}), ctrl.$isEmpty = function(value) { }), ctrl.$isEmpty = function(value) {
return !value || !value.length; return !value || !value.length;
}; };
} }
}; };
}, CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/, ngBindDirective = ngDirective(function(scope, element, attr) { }, CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/, ngValueDirective = function() {
return {
priority: 100,
compile: function(tpl, tplAttr) {
return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue) ? function(scope, elm, attr) {
attr.$set("value", scope.$eval(attr.ngValue));
} : function(scope, elm, attr) {
scope.$watch(attr.ngValue, function(value) {
attr.$set("value", value);
});
};
}
};
}, ngBindDirective = ngDirective(function(scope, element, attr) {
element.addClass("ng-binding").data("$binding", attr.ngBind), scope.$watch(attr.ngBind, function(value) { element.addClass("ng-binding").data("$binding", attr.ngBind), scope.$watch(attr.ngBind, function(value) {
element.text(value == undefined ? "" : value); element.text(value == undefined ? "" : value);
}); });
@ -4459,20 +4472,7 @@
ngChange: ngChangeDirective, ngChange: ngChangeDirective,
required: requiredDirective, required: requiredDirective,
ngRequired: requiredDirective, ngRequired: requiredDirective,
ngValue: function() { ngValue: ngValueDirective
return {
priority: 100,
compile: function(tpl, tplAttr) {
return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue) ? function(scope, elm, attr) {
attr.$set("value", scope.$eval(attr.ngValue));
} : function(scope, elm, attr) {
scope.$watch(attr.ngValue, function(value) {
attr.$set("value", value);
});
};
}
};
}
}).directive({ }).directive({
ngInclude: ngIncludeFillContentDirective ngInclude: ngIncludeFillContentDirective
}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives), $provide.provider({ }).directive(ngAttributeAliasDirectives).directive(ngEventDirectives), $provide.provider({

View File

@ -645,7 +645,8 @@
location.replace(href + "#" + fragment); location.replace(href + "#" + fragment);
} else location.hash = "#" + fragment; } else location.hash = "#" + fragment;
} }
}), Backbone.history = new History(), Model.extend = Collection.extend = Router.extend = View.extend = History.extend = function(protoProps, staticProps) { }), Backbone.history = new History();
var extend = function(protoProps, staticProps) {
var child, parent = this; var child, parent = this;
child = protoProps && _.has(protoProps, "constructor") ? protoProps.constructor : function() { child = protoProps && _.has(protoProps, "constructor") ? protoProps.constructor : function() {
return parent.apply(this, arguments); return parent.apply(this, arguments);
@ -655,6 +656,7 @@
}; };
return Surrogate.prototype = parent.prototype, child.prototype = new Surrogate(), protoProps && _.extend(child.prototype, protoProps), child.__super__ = parent.prototype, child; return Surrogate.prototype = parent.prototype, child.prototype = new Surrogate(), protoProps && _.extend(child.prototype, protoProps), child.__super__ = parent.prototype, child;
}; };
Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
var urlError = function() { var urlError = function() {
throw Error('A "url" property or function must be specified'); throw Error('A "url" property or function must be specified');
}, wrapError = function(model, options) { }, wrapError = function(model, options) {

View File

@ -533,10 +533,10 @@
}, },
dequeue: function(elem, type) { dequeue: function(elem, type) {
type = type || "fx"; type = type || "fx";
var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type); var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() {
"inprogress" === fn && (fn = queue.shift(), startLength--), hooks.cur = fn, fn && ("fx" === type && queue.unshift("inprogress"), delete hooks.stop, fn.call(elem, function() {
jQuery.dequeue(elem, type); jQuery.dequeue(elem, type);
}, hooks)), !startLength && hooks && hooks.empty.fire(); };
"inprogress" === fn && (fn = queue.shift(), startLength--), hooks.cur = fn, fn && ("fx" === type && queue.unshift("inprogress"), delete hooks.stop, fn.call(elem, next, hooks)), !startLength && hooks && hooks.empty.fire();
}, },
_queueHooks: function(elem, type) { _queueHooks: function(elem, type) {
var key = type + "queueHooks"; var key = type + "queueHooks";

View File

@ -5,7 +5,7 @@
return factory($, root, doc), $.mobile; return factory($, root, doc), $.mobile;
}) : factory(root.jQuery, root, doc); }) : factory(root.jQuery, root, doc);
}(this, document, function(jQuery, window, document1, undefined) { }(this, document, function(jQuery, window, document1, undefined) {
var $, $1, nsNormalizeDict, oldFind, rbrace, jqmDataRE, $2, window1, compensateToolbars, $3, undefined1, uuid, slice, _cleanData, $4, rcapitals, replaceFunction, $5, doc, bool, docElem, refNode, fakeBody, div, $6, support, $7, self, $win, dummyFnToInitNavigate, $8, undefined2, path, $base, dialogHashKey, $9, undefined3, $10, path1, initialHref, $11, loc, $12, undefined4, props, testElement, vendorPrefixes, $13, heldCall, curr, diff, handler, lastCall, $14, baseElement, base, $15, undefined5, originalWidget, keepNativeFactoryDefault, orig, $16, undefined6, pageTransitionQueue, isPageTransitioning, $17, window2, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, undefined7, rInitialLetter, iconposClass, $31, $32, $33, $34, $35, $36, meta, initialContent, disabledZoom, enabledZoom, disabledInitially, $37, $38, undefined8, rDividerListItem, origDefaultFilterCallback; var $, $1, nsNormalizeDict, oldFind, rbrace, jqmDataRE, $2, window1, compensateToolbars, $3, undefined1, uuid, slice, _cleanData, $4, rcapitals, replaceFunction, $5, doc, bool, docElem, refNode, fakeBody, div, $6, support, $7, self, $win, dummyFnToInitNavigate, $8, undefined2, path, $base, dialogHashKey, $9, undefined3, $10, path1, initialHref, $11, loc, $12, undefined4, props, testElement, vendorPrefixes, $13, heldCall, curr, diff, handler, lastCall, $14, baseElement, base, $15, undefined5, originalWidget, keepNativeFactoryDefault, orig, $16, undefined6, pageTransitionQueue, isPageTransitioning, $17, window2, $18, $19, $20, defaultGetMaxScrollForTransition, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, undefined7, rInitialLetter, iconposClass, $31, $32, $33, $34, $35, $36, meta, initialContent, disabledZoom, enabledZoom, disabledInitially, $37, $38, undefined8, rDividerListItem, origDefaultFilterCallback;
jQuery.mobile = {}, function($, window, undefined) { jQuery.mobile = {}, function($, window, undefined) {
$.extend($.mobile, { $.extend($.mobile, {
version: "1.4.2", version: "1.4.2",
@ -323,18 +323,19 @@
_proto: $3.extend({}, prototype), _proto: $3.extend({}, prototype),
_childConstructors: [] _childConstructors: []
}), basePrototype = new base(), basePrototype.options = $3.widget.extend({}, basePrototype.options), $3.each(prototype, function(prop, value) { }), basePrototype = new base(), basePrototype.options = $3.widget.extend({}, basePrototype.options), $3.each(prototype, function(prop, value) {
var _super, _superApply;
if (!$3.isFunction(value)) { if (!$3.isFunction(value)) {
proxiedPrototype[prop] = value; proxiedPrototype[prop] = value;
return; return;
} }
proxiedPrototype[prop] = function() { proxiedPrototype[prop] = (_super = function() {
var returnValue, __super = this._super, __superApply = this._superApply;
return this._super = function() {
return base.prototype[prop].apply(this, arguments); return base.prototype[prop].apply(this, arguments);
}, this._superApply = function(args) { }, _superApply = function(args) {
return base.prototype[prop].apply(this, args); return base.prototype[prop].apply(this, args);
}, returnValue = value.apply(this, arguments), this._super = __super, this._superApply = __superApply, returnValue; }, function() {
}; var returnValue, __super = this._super, __superApply = this._superApply;
return this._super = _super, this._superApply = _superApply, returnValue = value.apply(this, arguments), this._super = __super, this._superApply = __superApply, returnValue;
});
}), constructor.prototype = $3.widget.extend(basePrototype, { }), constructor.prototype = $3.widget.extend(basePrototype, {
widgetEventPrefix: existingConstructor && basePrototype.widgetEventPrefix || name widgetEventPrefix: existingConstructor && basePrototype.widgetEventPrefix || name
}, proxiedPrototype, { }, proxiedPrototype, {
@ -1804,14 +1805,14 @@
beforeStartOut: function(screenHeight, reverseClass, none) { beforeStartOut: function(screenHeight, reverseClass, none) {
this.doneOut(screenHeight, reverseClass, none); this.doneOut(screenHeight, reverseClass, none);
} }
}), $20 = jQuery, $20.mobile.transitionHandlers = { }), $20 = jQuery, defaultGetMaxScrollForTransition = function() {
return 3 * $20.mobile.getScreenHeight();
}, $20.mobile.transitionHandlers = {
sequential: $20.mobile.SerialTransition, sequential: $20.mobile.SerialTransition,
simultaneous: $20.mobile.ConcurrentTransition simultaneous: $20.mobile.ConcurrentTransition
}, $20.mobile.defaultTransitionHandler = $20.mobile.transitionHandlers.sequential, $20.mobile.transitionFallbacks = {}, $20.mobile._maybeDegradeTransition = function(transition) { }, $20.mobile.defaultTransitionHandler = $20.mobile.transitionHandlers.sequential, $20.mobile.transitionFallbacks = {}, $20.mobile._maybeDegradeTransition = function(transition) {
return transition && !$20.support.cssTransform3d && $20.mobile.transitionFallbacks[transition] && (transition = $20.mobile.transitionFallbacks[transition]), transition; return transition && !$20.support.cssTransform3d && $20.mobile.transitionFallbacks[transition] && (transition = $20.mobile.transitionFallbacks[transition]), transition;
}, $20.mobile.getMaxScrollForTransition = $20.mobile.getMaxScrollForTransition || function() { }, $20.mobile.getMaxScrollForTransition = $20.mobile.getMaxScrollForTransition || defaultGetMaxScrollForTransition, $21 = jQuery, $21.mobile.transitionFallbacks.flip = "fade", $22 = jQuery, $22.mobile.transitionFallbacks.flow = "fade", $23 = jQuery, $23.mobile.transitionFallbacks.pop = "fade", $24 = jQuery, $24.mobile.transitionHandlers.slide = $24.mobile.transitionHandlers.simultaneous, $24.mobile.transitionFallbacks.slide = "fade", $25 = jQuery, $25.mobile.transitionFallbacks.slidedown = "fade", $26 = jQuery, $26.mobile.transitionFallbacks.slidefade = "fade", $27 = jQuery, $27.mobile.transitionFallbacks.slideup = "fade", $28 = jQuery, $28.mobile.transitionFallbacks.turn = "fade", $29 = jQuery, $29.mobile.degradeInputs = {
return 3 * $20.mobile.getScreenHeight();
}, $21 = jQuery, $21.mobile.transitionFallbacks.flip = "fade", $22 = jQuery, $22.mobile.transitionFallbacks.flow = "fade", $23 = jQuery, $23.mobile.transitionFallbacks.pop = "fade", $24 = jQuery, $24.mobile.transitionHandlers.slide = $24.mobile.transitionHandlers.simultaneous, $24.mobile.transitionFallbacks.slide = "fade", $25 = jQuery, $25.mobile.transitionFallbacks.slidedown = "fade", $26 = jQuery, $26.mobile.transitionFallbacks.slidefade = "fade", $27 = jQuery, $27.mobile.transitionFallbacks.slideup = "fade", $28 = jQuery, $28.mobile.transitionFallbacks.turn = "fade", $29 = jQuery, $29.mobile.degradeInputs = {
color: !1, color: !1,
date: !1, date: !1,
datetime: !1, datetime: !1,

View File

@ -607,6 +607,20 @@
try { try {
Object.freeze({}); Object.freeze({});
} catch (e) {} } catch (e) {}
var cloneElement$1 = function(element, props, children) {
for(var newElement = cloneElement.apply(this, arguments), i = 2; i < arguments.length; i++)validateChildKeys(arguments[i], newElement.type);
return validatePropTypes(newElement), newElement;
}, createFactory = function(type) {
var validatedFactory = createElementWithValidation.bind(null, type);
return validatedFactory.type = type, didWarnAboutDeprecatedCreateFactory || (didWarnAboutDeprecatedCreateFactory = !0, warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(validatedFactory, "type", {
enumerable: !1,
get: function() {
return warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
value: type
}), type;
}
}), validatedFactory;
};
exports.Children = { exports.Children = {
map: mapChildren, map: mapChildren,
forEach: function(children, forEachFunc, forEachContext) { forEach: function(children, forEachFunc, forEachContext) {
@ -629,10 +643,7 @@
if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child."); if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child.");
return children; return children;
} }
}, exports.Component = Component, exports.PureComponent = PureComponent, exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals, exports.cloneElement = function(element, props, children) { }, exports.Component = Component, exports.PureComponent = PureComponent, exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals, exports.cloneElement = cloneElement$1, exports.createContext = function(defaultValue, calculateChangedBits) {
for(var newElement = cloneElement.apply(this, arguments), i = 2; i < arguments.length; i++)validateChildKeys(arguments[i], newElement.type);
return validatePropTypes(newElement), newElement;
}, exports.createContext = function(defaultValue, calculateChangedBits) {
void 0 === calculateChangedBits ? calculateChangedBits = null : null !== calculateChangedBits && "function" != typeof calculateChangedBits && error("createContext: Expected the optional second argument to be a function. Instead received: %s", calculateChangedBits); void 0 === calculateChangedBits ? calculateChangedBits = null : null !== calculateChangedBits && "function" != typeof calculateChangedBits && error("createContext: Expected the optional second argument to be a function. Instead received: %s", calculateChangedBits);
var context = { var context = {
$$typeof: REACT_CONTEXT_TYPE, $$typeof: REACT_CONTEXT_TYPE,
@ -699,17 +710,7 @@
} }
} }
}), context.Consumer = Consumer, context._currentRenderer = null, context._currentRenderer2 = null, context; }), context.Consumer = Consumer, context._currentRenderer = null, context._currentRenderer2 = null, context;
}, exports.createElement = createElementWithValidation, exports.createFactory = function(type) { }, exports.createElement = createElementWithValidation, exports.createFactory = createFactory, exports.createRef = function() {
var validatedFactory = createElementWithValidation.bind(null, type);
return validatedFactory.type = type, didWarnAboutDeprecatedCreateFactory || (didWarnAboutDeprecatedCreateFactory = !0, warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(validatedFactory, "type", {
enumerable: !1,
get: function() {
return warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
value: type
}), type;
}
}), validatedFactory;
}, exports.createRef = function() {
var refObject = { var refObject = {
current: null current: null
}; };

View File

@ -4270,7 +4270,7 @@
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) { ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
!didWarnAboutUnsafeLifecycles.has(fiber.type) && ("function" == typeof instance.componentWillMount && !0 !== instance.componentWillMount.__suppressDeprecationWarning && pendingComponentWillMountWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillMount && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), "function" == typeof instance.componentWillReceiveProps && !0 !== instance.componentWillReceiveProps.__suppressDeprecationWarning && pendingComponentWillReceivePropsWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillReceiveProps && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), "function" == typeof instance.componentWillUpdate && !0 !== instance.componentWillUpdate.__suppressDeprecationWarning && pendingComponentWillUpdateWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillUpdate && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber)); !didWarnAboutUnsafeLifecycles.has(fiber.type) && ("function" == typeof instance.componentWillMount && !0 !== instance.componentWillMount.__suppressDeprecationWarning && pendingComponentWillMountWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillMount && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), "function" == typeof instance.componentWillReceiveProps && !0 !== instance.componentWillReceiveProps.__suppressDeprecationWarning && pendingComponentWillReceivePropsWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillReceiveProps && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), "function" == typeof instance.componentWillUpdate && !0 !== instance.componentWillUpdate.__suppressDeprecationWarning && pendingComponentWillUpdateWarnings.push(fiber), 1 & fiber.mode && "function" == typeof instance.UNSAFE_componentWillUpdate && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
}, ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() { }, ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
var sortedNames, _sortedNames, _sortedNames2, _sortedNames3, _sortedNames4, _sortedNames5, componentWillMountUniqueNames = new Set(); var componentWillMountUniqueNames = new Set();
pendingComponentWillMountWarnings.length > 0 && (pendingComponentWillMountWarnings.forEach(function(fiber) { pendingComponentWillMountWarnings.length > 0 && (pendingComponentWillMountWarnings.forEach(function(fiber) {
componentWillMountUniqueNames.add(getComponentName(fiber.type) || "Component"), didWarnAboutUnsafeLifecycles.add(fiber.type); componentWillMountUniqueNames.add(getComponentName(fiber.type) || "Component"), didWarnAboutUnsafeLifecycles.add(fiber.type);
}), pendingComponentWillMountWarnings = []); }), pendingComponentWillMountWarnings = []);
@ -4294,22 +4294,28 @@
if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0 && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) { if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0 && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || "Component"), didWarnAboutUnsafeLifecycles.add(fiber.type); UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || "Component"), didWarnAboutUnsafeLifecycles.add(fiber.type);
}), pendingUNSAFE_ComponentWillUpdateWarnings = []), UNSAFE_componentWillMountUniqueNames.size > 0) { }), pendingUNSAFE_ComponentWillUpdateWarnings = []), UNSAFE_componentWillMountUniqueNames.size > 0) {
error("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s", setToSortedString(UNSAFE_componentWillMountUniqueNames)); var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
error("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s", sortedNames);
} }
if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) { if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
error("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s", setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames)); var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
error("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s", _sortedNames);
} }
if (UNSAFE_componentWillUpdateUniqueNames.size > 0) { if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
error("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s", setToSortedString(UNSAFE_componentWillUpdateUniqueNames)); var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
error("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s", _sortedNames2);
} }
if (componentWillMountUniqueNames.size > 0) { if (componentWillMountUniqueNames.size > 0) {
warn("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", setToSortedString(componentWillMountUniqueNames)); var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
warn("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames3);
} }
if (componentWillReceivePropsUniqueNames.size > 0) { if (componentWillReceivePropsUniqueNames.size > 0) {
warn("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", setToSortedString(componentWillReceivePropsUniqueNames)); var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
warn("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames4);
} }
if (componentWillUpdateUniqueNames.size > 0) { if (componentWillUpdateUniqueNames.size > 0) {
warn("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", setToSortedString(componentWillUpdateUniqueNames)); var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
warn("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames5);
} }
}; };
var pendingLegacyContextWarning = new Map(), didWarnAboutLegacyContext = new Set(); var pendingLegacyContextWarning = new Map(), didWarnAboutLegacyContext = new Set();
@ -5475,7 +5481,7 @@
source, source,
subscribe subscribe
]), dispatcher.useEffect(function() { ]), dispatcher.useEffect(function() {
var unsubscribe = subscribe(source._source, function() { var handleChange = function() {
var latestGetSnapshot = refs.getSnapshot, latestSetSnapshot = refs.setSnapshot; var latestGetSnapshot = refs.getSnapshot, latestSetSnapshot = refs.setSnapshot;
try { try {
latestSetSnapshot(latestGetSnapshot(source._source)); latestSetSnapshot(latestGetSnapshot(source._source));
@ -5486,7 +5492,7 @@
throw error; throw error;
}); });
} }
}); }, unsubscribe = subscribe(source._source, handleChange);
return "function" != typeof unsubscribe && error("Mutable source subscribe function must return an unsubscribe function."), unsubscribe; return "function" != typeof unsubscribe && error("Mutable source subscribe function must return an unsubscribe function."), unsubscribe;
}, [ }, [
source, source,
@ -8882,7 +8888,9 @@
function detachFiberAfterEffects(fiber) { function detachFiberAfterEffects(fiber) {
fiber.sibling = null, fiber.stateNode = null; fiber.sibling = null, fiber.stateNode = null;
} }
var resolveFamily = null, failedBoundaries = null; var resolveFamily = null, failedBoundaries = null, setRefreshHandler = function(handler) {
resolveFamily = handler;
};
function resolveFunctionForHotReloading(type) { function resolveFunctionForHotReloading(type) {
if (null === resolveFamily) return type; if (null === resolveFamily) return type;
var family = resolveFamily(type); var family = resolveFamily(type);
@ -8938,6 +8946,18 @@
function markFailedErrorBoundaryForHotReloading(fiber) { function markFailedErrorBoundaryForHotReloading(fiber) {
null !== resolveFamily && "function" == typeof WeakSet && (null === failedBoundaries && (failedBoundaries = new WeakSet()), failedBoundaries.add(fiber)); null !== resolveFamily && "function" == typeof WeakSet && (null === failedBoundaries && (failedBoundaries = new WeakSet()), failedBoundaries.add(fiber));
} }
var scheduleRefresh = function(root, update) {
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies, updatedFamilies = update.updatedFamilies;
flushPassiveEffects(), flushSync(function() {
scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
});
}
}, scheduleRoot = function(root, element) {
root.context === emptyContextObject && (flushPassiveEffects(), flushSync(function() {
updateContainer(element, root, null, null);
}));
};
function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) { function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
var alternate = fiber.alternate, child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type, candidateType = null; var alternate = fiber.alternate, child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type, candidateType = null;
switch(tag){ switch(tag){
@ -8957,6 +8977,12 @@
} }
null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (needsRemount = !0), needsRemount && (fiber._debugNeedsRemount = !0), (needsRemount || needsRender) && scheduleUpdateOnFiber(fiber, SyncLane, -1), null === child || needsRemount || scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies), null !== sibling && scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies); null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (needsRemount = !0), needsRemount && (fiber._debugNeedsRemount = !0), (needsRemount || needsRender) && scheduleUpdateOnFiber(fiber, SyncLane, -1), null === child || needsRemount || scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies), null !== sibling && scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
} }
var findHostInstancesForRefresh = function(root, families) {
var hostInstances = new Set(), types = new Set(families.map(function(family) {
return family.current;
}));
return findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances), hostInstances;
};
function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) { function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
var child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type, candidateType = null; var child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type, candidateType = null;
switch(tag){ switch(tag){
@ -9545,28 +9571,10 @@
return null === hostFiber ? null : hostFiber.stateNode; return null === hostFiber ? null : hostFiber.stateNode;
}, },
findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
findHostInstancesForRefresh: function(root, families) { findHostInstancesForRefresh: findHostInstancesForRefresh,
var hostInstances = new Set(), types = new Set(families.map(function(family) { scheduleRefresh: scheduleRefresh,
return family.current; scheduleRoot: scheduleRoot,
})); setRefreshHandler: setRefreshHandler,
return findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances), hostInstances;
},
scheduleRefresh: function(root, update) {
if (null !== resolveFamily) {
var staleFamilies = update.staleFamilies, updatedFamilies = update.updatedFamilies;
flushPassiveEffects(), flushSync(function() {
scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
});
}
},
scheduleRoot: function(root, element) {
root.context === emptyContextObject && (flushPassiveEffects(), flushSync(function() {
updateContainer(element, root, null, null);
}));
},
setRefreshHandler: function(handler) {
resolveFamily = handler;
},
getCurrentFiber: getCurrentFiberForDevTools getCurrentFiber: getCurrentFiberForDevTools
}) && canUseDOM && window.top === window.self && (navigator.userAgent.indexOf("Chrome") > -1 && -1 === navigator.userAgent.indexOf("Edge") || navigator.userAgent.indexOf("Firefox") > -1)) { }) && canUseDOM && window.top === window.self && (navigator.userAgent.indexOf("Chrome") > -1 && -1 === navigator.userAgent.indexOf("Edge") || navigator.userAgent.indexOf("Firefox") > -1)) {
var protocol = window.location.protocol; var protocol = window.location.protocol;

15
scripts/cargo/patch-section.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eu
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
function toLine {
arr=(${1//\\\t/ })
dir="$(dirname ${arr[1]})"
echo "${arr[0]} = { path = '$dir' }"
}
export -f toLine
$SCRIPT_DIR/list-crates.sh | jq '[.name, .manifest_path] | @tsv' | xargs -L 1 -I {} bash -c 'toLine "$@"' _ {}