file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
crates/swc_ecma_minifier/tests/fixture/reduced/2/output.js | JavaScript | export const def = {
code (cxt) {
const { gen, schema, parentSchema, data, it } = cxt;
"all" === it.opts.removeAdditional && void 0 === parentSchema.additionalProperties && additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
const allProps = (0, code_1.allSchemaProperties)(schema);
for (const prop of allProps)it.definedProperties.add(prop);
it.opts.unevaluated && allProps.length && !0 !== it.props && (it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props));
const properties = allProps.filter((p)=>!(0, util_1.alwaysValidSchema)(it, schema[p]));
if (0 === properties.length) return;
const valid = gen.name("valid");
for (const prop of properties)it.opts.useDefaults && !it.compositeRule && void 0 !== schema[prop].default ? applyPropertySchema(prop) : (gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties)), applyPropertySchema(prop), it.allErrors || gen.else().var(valid, !0), gen.endIf()), cxt.it.definedProperties.add(prop), cxt.ok(valid);
function applyPropertySchema(prop) {
cxt.subschema({
keyword: "properties",
schemaProp: prop,
dataProp: prop
}, valid);
}
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/reduced/3/input.js | JavaScript | var element = jqLite(element);
if (element.injector()) {
var tag = element[0] === document ? "document" : startingTag(element);
throw ngMinErr(
"btstrpd",
"App Already Bootstrapped with this Element '{0}'",
tag
);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/reduced/3/output.js | JavaScript | var element = jqLite(element);
if (element.injector()) throw ngMinErr("btstrpd", "App Already Bootstrapped with this Element '{0}'", element[0] === document ? "document" : startingTag(element));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/block/.0001/input.js | JavaScript | do {
if ((g--, h--, 0 > h || e[g] !== f[h]))
return "\n" + e[g].replace(" at new ", " at ");
} while (1 <= g && 0 <= h);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/block/.0001/output.js | JavaScript | do
if ((g--, h--, 0 > h || e[g] !== f[h]))
return (
"\n" +
e[g].replace(
" at new ",
" at "
)
);
while (1 <= g && 0 <= h); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/if/block/1/input.js | JavaScript | if (a) {
var _ = console.log("foo");
if (b) {
var _2 = console.log("bar");
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/if/block/1/output.js | JavaScript | if (a) {
var _ = console.log("foo");
if (b) var _2 = console.log("bar");
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/if/var/input.js | JavaScript | if (false) {
var a = 123;
} else {
console.log(a);
}
if (true) {
console.log(b);
} else {
var b = 123;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/if/var/output.js | JavaScript | var a, b;
console.log(a), console.log(b);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/1/input.js | JavaScript | const A = 10,
B = 5;
function mod(dividend, divisor) {
return ((dividend % divisor) + divisor) % divisor;
}
console.log(mod(A, A + B));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/1/output.js | JavaScript | console.log(10);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/2/input.js | JavaScript | var a = 1;
h();
function h() {
(function g() {
a-- && g();
})();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/2/output.js | JavaScript | var a = 1;
!function g() {
a-- && g();
}();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/3/input.js | JavaScript | function foo(x) {
bar(x);
}
function bar(x) {
if (x === 1) {
throw new Error();
}
}
foo(3);
foo(2);
foo(1);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/3/output.js | JavaScript | function bar(x) {
if (1 === x) throw Error();
}
bar(3), bar(2), bar(1);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/4/input.js | JavaScript | function $parcel$export(a, b, c) {
a[b] = c;
}
$parcel$export(module.exports, "A", function () {
return A;
});
$parcel$export(module.exports, "B", function () {
return B;
});
$parcel$export(module.exports, "C", function () {
return C;
});
const A = "A",
B = "B",
C = "C";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/4/output.js | JavaScript | module.exports.A = function() {
return A;
}, module.exports.B = function() {
return B;
}, module.exports.C = function() {
return C;
};
const A = "A", B = "B", C = "C";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/5/input.js | JavaScript | export function foo() {
b = 1;
console.log(2);
console.log(b);
for (var b, c = 0; c < 10; c++) {
console.log(c);
}
}
export function bar() {
function x() {
b = 1;
}
for (var b = 10, c = 0; c < 10; c++) {
/*#__NOINLINE__*/ x();
console.log(b, c);
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/5/output.js | JavaScript | export function foo() {
console.log(2), console.log(1);
for(var c = 0; c < 10; c++)console.log(c);
}
export function bar() {
function x() {
b = 1;
}
for(var b = 10, c = 0; c < 10; c++)/*#__NOINLINE__*/ x(), console.log(b, c);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/6/input.js | JavaScript | export function endOf(units) {
var time, dividend, dividend1;
switch ((this._isUTC, units)) {
case "hour":
(time = v()),
(time +=
3600000 -
((dividend = time + 3600000),
((dividend % 3600000) + 3600000) % 3600000) -
1);
break;
case "minute":
(time = v()),
(time +=
60000 -
((dividend1 = time),
((dividend1 % 60000) + 60000) % 60000) -
1);
break;
case "second":
(time = v()), (time += 1000 - (((time % 1000) + 1000) % 1000) - 1);
}
return time;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/inline/6/output.js | JavaScript | export function endOf(units) {
var time;
switch(this._isUTC, units){
case "hour":
time = v(), time += 3600000 - ((time + 3600000) % 3600000 + 3600000) % 3600000 - 1;
break;
case "minute":
time = v(), time += 60000 - (time % 60000 + 60000) % 60000 - 1;
break;
case "second":
time = v(), time += 1000 - (time % 1000 + 1000) % 1000 - 1;
}
return time;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/issues/2007/1/input.js | JavaScript | const obj = {};
for (let key in obj) {
obj[key] = obj[key].trim();
}
let arr = ["foo"];
arr.forEach(() => {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/issues/2007/1/output.js | JavaScript | const obj = {};
for(let key in obj)obj[key] = obj[key].trim();
let arr = [
"foo"
];
arr.forEach(()=>{});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/issues/2007/2/input.js | JavaScript | function func() {
(async () => {
await this.foo();
this.bar();
})();
}
func();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/issues/2007/2/output.js | JavaScript | function func() {
(async ()=>{
await this.foo(), this.bar();
})();
}
func();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/order/fn/1/input.js | JavaScript | function foo() {}
console.log("foo");
function bar() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/order/fn/1/output.js | JavaScript | function foo() {}
function bar() {}
console.log("foo");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/sequences/.0001/input.js | JavaScript | h--, 0 > h;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/sequences/.0001/output.js | JavaScript | 0 > --h | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/super/computed/input.js | JavaScript | class A extends B {
foo() {
console.log(super["dsaas"]);
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/super/computed/output.js | JavaScript | class A extends B {
foo() {
console.log(super.dsaas);
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/const/call/input.js | JavaScript | switch (a()) {
case a():
console.log(123);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/const/call/output.js | JavaScript | a() === a() && console.log(123);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/const/default/input.js | JavaScript | switch (1) {
case 2:
console.log(111);
break;
case 3:
console.log(222);
break;
default:
console.log(333);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/const/default/output.js | JavaScript | console.log(333);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/const/order/input.js | JavaScript | switch (1) {
case a():
console.log(111);
break;
case 1:
console.log(222);
break;
case 2:
console.log(333);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/const/order/output.js | JavaScript | 1 === a() ? console.log(111) : console.log(222);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/merge/non-const/input.js | JavaScript | switch (a) {
case 1:
console.log(1);
break;
case 2:
console.log(2);
break;
case a():
case 3:
console.log(1);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/merge/non-const/output.js | JavaScript | switch(a){
case 1:
console.log(1);
break;
case 2:
console.log(2);
break;
case a():
case 3:
console.log(1);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/merge/simple/input.js | JavaScript | switch (a) {
case 1:
console.log(1);
break;
case 2:
console.log(2);
break;
default:
console.log(1);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/simple/switch/merge/simple/output.js | JavaScript | switch(a){
case 1:
default:
console.log(1);
break;
case 2:
console.log(2);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/1/input.js | JavaScript | if (true || x()) y();
if (true && x()) y();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/1/output.js | JavaScript | y();
x() && y();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/2/input.js | JavaScript | if (x() || true) y();
if (x() && true) y();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/2/output.js | JavaScript | x(), y();
x() && y();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/3/input.js | JavaScript | if (false || x()) y();
if (false && x()) y();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/3/output.js | JavaScript | x() && y();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/4/input.js | JavaScript | if (x() || false) y();
if (x() && false) y();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2435-1/4/output.js | JavaScript | x() && y();
x();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/1/input.js | JavaScript | console.log(x() || true || y());
console.log(y() || true || x());
console.log((x() || true) && y());
console.log((y() || true) && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/1/output.js | JavaScript | console.log(x() || !0);
console.log(y() || !0);
console.log((x(), y()));
console.log((y(), x()));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/2-1/input.js | JavaScript | console.log((x() && true) || y());
console.log((y() && true) || x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/2-1/output.js | JavaScript | console.log(x() && !0 || y());
console.log(y() && !0 || x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/2/input.js | JavaScript | console.log((x() && true) || y());
console.log((y() && true) || x());
console.log(x() && true && y());
console.log(y() && true && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/2/output.js | JavaScript | console.log(x() && !0 || y());
console.log(y() && !0 || x());
console.log(x() && y());
console.log(y() && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/3-1/input.js | JavaScript | console.log((x() || false) && y());
console.log((y() || false) && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/3-1/output.js | JavaScript | console.log((x() || !1) && y());
console.log((y() || !1) && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/3/input.js | JavaScript | console.log(x() || false || y());
console.log(y() || false || x());
console.log((x() || false) && y());
console.log((y() || false) && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/3/output.js | JavaScript | console.log(x() || y());
console.log(y() || x());
console.log((x() || !1) && y());
console.log((y() || !1) && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/4/input.js | JavaScript | console.log((x() && false) || y());
console.log((y() && false) || x());
console.log(x() && false && y());
console.log(y() && false && x());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/fixture/terser/issue-2535-2/4/output.js | JavaScript | console.log((x(), y()));
console.log((y(), x()));
console.log(x() && !1);
console.log(y() && !1);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/format.rs | Rust | use swc_common::{sync::Lrc, FileName, Mark, SourceMap};
use swc_ecma_ast::*;
use swc_ecma_codegen::{
text_writer::{omit_trailing_semi, JsWriter, WriteJs},
Config, Emitter,
};
use swc_ecma_minifier::{optimize, option::ExtraOptions};
use swc_ecma_parser::{parse_file_as_module, Syntax};
use testing::NormalizedOutput;
fn print(cm: Lrc<SourceMap>, m: &Module, config: Config) -> String {
let mut buf = Vec::new();
{
let mut wr = Box::new(JsWriter::new(cm.clone(), "\n", &mut buf, None)) as Box<dyn WriteJs>;
if config.minify {
wr = Box::new(omit_trailing_semi(wr));
}
let mut emitter = Emitter {
cfg: config,
cm,
comments: None,
wr,
};
emitter.emit_module(m).unwrap();
}
String::from_utf8(buf).unwrap()
}
fn assert_format(src: &str, expected: &str, opts: Config) {
testing::run_test2(false, |cm, _| {
let fm = cm.new_source_file(FileName::Anon.into(), src.into());
let program = parse_file_as_module(
&fm,
Syntax::Es(Default::default()),
Default::default(),
None,
&mut Vec::new(),
)
.unwrap();
let unresolved_mark = Mark::new();
let top_level_mark = Mark::new();
let m = optimize(
program.into(),
cm.clone(),
None,
None,
&Default::default(),
&ExtraOptions {
unresolved_mark,
top_level_mark,
mangle_name_cache: None,
},
)
.expect_module();
let actual = print(cm, &m, opts);
assert_eq!(
NormalizedOutput::from(actual),
NormalizedOutput::from(expected.to_owned())
);
Ok(())
})
.unwrap()
}
#[test]
fn inline_script() {
let src = r#"
console.log("</sCrIpT>");
foo("/-->/");
"#;
let expected = r#"console.log("<\/sCrIpT>");foo("/--\x3e/");"#;
assert_format(
src,
expected,
Config::default().with_inline_script(true).with_minify(true),
)
}
#[test]
fn rspack_issue_4797() {
let src = r#"
obj = {
𝒩: "a",
"𝒩": "a",
𝒩: "𝒩"
}
"#;
assert_format(
src,
r#"obj = {
"\uD835\uDCA9": "a",
"\uD835\uDCA9": "a",
"\uD835\uDCA9": "\uD835\uDCA9"
};"#,
Config::default()
.with_ascii_only(true)
.with_target(EsVersion::Es5),
)
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/feedback-mapbox/785-e1932cc99ac3bb67/input.js | JavaScript | (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[785],
{
/***/ 840: /***/ function (module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;
/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */
(function (window, document, exportName, undefined) {
"use strict";
var VENDOR_PREFIXES = ["", "webkit", "Moz", "MS", "ms", "o"];
var TEST_ELEMENT = document.createElement("div");
var TYPE_FUNCTION = "function";
var round = Math.round;
var abs = Math.abs;
var now = Date.now;
/**
* set a timeout with a given scope
* @param {Function} fn
* @param {Number} timeout
* @param {Object} context
* @returns {number}
*/
function setTimeoutContext(fn, timeout, context) {
return setTimeout(bindFn(fn, context), timeout);
}
/**
* if the argument is an array, we want to execute the fn on each entry
* if it aint an array we don't want to do a thing.
* this is used by all the methods that accept a single and array argument.
* @param {*|Array} arg
* @param {String} fn
* @param {Object} [context]
* @returns {Boolean}
*/
function invokeArrayArg(arg, fn, context) {
if (Array.isArray(arg)) {
each(arg, context[fn], context);
return true;
}
return false;
}
/**
* walk objects and arrays
* @param {Object} obj
* @param {Function} iterator
* @param {Object} context
*/
function each(obj, iterator, context) {
var i;
if (!obj) {
return;
}
if (obj.forEach) {
obj.forEach(iterator, context);
} else if (obj.length !== undefined) {
i = 0;
while (i < obj.length) {
iterator.call(context, obj[i], i, obj);
i++;
}
} else {
for (i in obj) {
obj.hasOwnProperty(i) &&
iterator.call(context, obj[i], i, obj);
}
}
}
/**
* wrap a method with a deprecation warning and stack trace
* @param {Function} method
* @param {String} name
* @param {String} message
* @returns {Function} A new function wrapping the supplied method.
*/
function deprecate(method, name, message) {
var deprecationMessage =
"DEPRECATED METHOD: " +
name +
"\n" +
message +
" AT \n";
return function () {
var e = new Error("get-stack-trace");
var stack =
e && e.stack
? e.stack
.replace(/^[^\(]+?[\n$]/gm, "")
.replace(/^\s+at\s+/gm, "")
.replace(
/^Object.<anonymous>\s*\(/gm,
"{anonymous}()@"
)
: "Unknown Stack Trace";
var log =
window.console &&
(window.console.warn || window.console.log);
if (log) {
log.call(window.console, deprecationMessage, stack);
}
return method.apply(this, arguments);
};
}
/**
* extend object.
* means that properties in dest will be overwritten by the ones in src.
* @param {Object} target
* @param {...Object} objects_to_assign
* @returns {Object} target
*/
var assign;
if (typeof Object.assign !== "function") {
assign = function assign(target) {
if (target === undefined || target === null) {
throw new TypeError(
"Cannot convert undefined or null to object"
);
}
var output = Object(target);
for (var index = 1; index < arguments.length; index++) {
var source = arguments[index];
if (source !== undefined && source !== null) {
for (var nextKey in source) {
if (source.hasOwnProperty(nextKey)) {
output[nextKey] = source[nextKey];
}
}
}
}
return output;
};
} else {
assign = Object.assign;
}
/**
* extend object.
* means that properties in dest will be overwritten by the ones in src.
* @param {Object} dest
* @param {Object} src
* @param {Boolean} [merge=false]
* @returns {Object} dest
*/
var extend = deprecate(
function extend(dest, src, merge) {
var keys = Object.keys(src);
var i = 0;
while (i < keys.length) {
if (
!merge ||
(merge && dest[keys[i]] === undefined)
) {
dest[keys[i]] = src[keys[i]];
}
i++;
}
return dest;
},
"extend",
"Use `assign`."
);
/**
* merge the values from src in the dest.
* means that properties that exist in dest will not be overwritten by src
* @param {Object} dest
* @param {Object} src
* @returns {Object} dest
*/
var merge = deprecate(
function merge(dest, src) {
return extend(dest, src, true);
},
"merge",
"Use `assign`."
);
/**
* simple class inheritance
* @param {Function} child
* @param {Function} base
* @param {Object} [properties]
*/
function inherit(child, base, properties) {
var baseP = base.prototype,
childP;
childP = child.prototype = Object.create(baseP);
childP.constructor = child;
childP._super = baseP;
if (properties) {
assign(childP, properties);
}
}
/**
* simple function bind
* @param {Function} fn
* @param {Object} context
* @returns {Function}
*/
function bindFn(fn, context) {
return function boundFn() {
return fn.apply(context, arguments);
};
}
/**
* let a boolean value also be a function that must return a boolean
* this first item in args will be used as the context
* @param {Boolean|Function} val
* @param {Array} [args]
* @returns {Boolean}
*/
function boolOrFn(val, args) {
if (typeof val == TYPE_FUNCTION) {
return val.apply(
args ? args[0] || undefined : undefined,
args
);
}
return val;
}
/**
* use the val2 when val1 is undefined
* @param {*} val1
* @param {*} val2
* @returns {*}
*/
function ifUndefined(val1, val2) {
return val1 === undefined ? val2 : val1;
}
/**
* addEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/
function addEventListeners(target, types, handler) {
each(splitStr(types), function (type) {
target.addEventListener(type, handler, false);
});
}
/**
* removeEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/
function removeEventListeners(target, types, handler) {
each(splitStr(types), function (type) {
target.removeEventListener(type, handler, false);
});
}
/**
* find if a node is in the given parent
* @method hasParent
* @param {HTMLElement} node
* @param {HTMLElement} parent
* @return {Boolean} found
*/
function hasParent(node, parent) {
while (node) {
if (node == parent) {
return true;
}
node = node.parentNode;
}
return false;
}
/**
* small indexOf wrapper
* @param {String} str
* @param {String} find
* @returns {Boolean} found
*/
function inStr(str, find) {
return str.indexOf(find) > -1;
}
/**
* split string on whitespace
* @param {String} str
* @returns {Array} words
*/
function splitStr(str) {
return str.trim().split(/\s+/g);
}
/**
* find if a array contains the object using indexOf or a simple polyFill
* @param {Array} src
* @param {String} find
* @param {String} [findByKey]
* @return {Boolean|Number} false when not found, or the index
*/
function inArray(src, find, findByKey) {
if (src.indexOf && !findByKey) {
return src.indexOf(find);
} else {
var i = 0;
while (i < src.length) {
if (
(findByKey && src[i][findByKey] == find) ||
(!findByKey && src[i] === find)
) {
return i;
}
i++;
}
return -1;
}
}
/**
* convert array-like objects to real arrays
* @param {Object} obj
* @returns {Array}
*/
function toArray(obj) {
return Array.prototype.slice.call(obj, 0);
}
/**
* unique array with objects based on a key (like 'id') or just by the array's value
* @param {Array} src [{id:1},{id:2},{id:1}]
* @param {String} [key]
* @param {Boolean} [sort=False]
* @returns {Array} [{id:1},{id:2}]
*/
function uniqueArray(src, key, sort) {
var results = [];
var values = [];
var i = 0;
while (i < src.length) {
var val = key ? src[i][key] : src[i];
if (inArray(values, val) < 0) {
results.push(src[i]);
}
values[i] = val;
i++;
}
if (sort) {
if (!key) {
results = results.sort();
} else {
results = results.sort(function sortUniqueArray(
a,
b
) {
return a[key] > b[key];
});
}
}
return results;
}
/**
* get the prefixed property
* @param {Object} obj
* @param {String} property
* @returns {String|Undefined} prefixed
*/
function prefixed(obj, property) {
var prefix, prop;
var camelProp =
property[0].toUpperCase() + property.slice(1);
var i = 0;
while (i < VENDOR_PREFIXES.length) {
prefix = VENDOR_PREFIXES[i];
prop = prefix ? prefix + camelProp : property;
if (prop in obj) {
return prop;
}
i++;
}
return undefined;
}
/**
* get a unique id
* @returns {number} uniqueId
*/
var _uniqueId = 1;
function uniqueId() {
return _uniqueId++;
}
/**
* get the window object of an element
* @param {HTMLElement} element
* @returns {DocumentView|Window}
*/
function getWindowForElement(element) {
var doc = element.ownerDocument || element;
return doc.defaultView || doc.parentWindow || window;
}
var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
var SUPPORT_TOUCH = "ontouchstart" in window;
var SUPPORT_POINTER_EVENTS =
prefixed(window, "PointerEvent") !== undefined;
var SUPPORT_ONLY_TOUCH =
SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);
var INPUT_TYPE_TOUCH = "touch";
var INPUT_TYPE_PEN = "pen";
var INPUT_TYPE_MOUSE = "mouse";
var INPUT_TYPE_KINECT = "kinect";
var COMPUTE_INTERVAL = 25;
var INPUT_START = 1;
var INPUT_MOVE = 2;
var INPUT_END = 4;
var INPUT_CANCEL = 8;
var DIRECTION_NONE = 1;
var DIRECTION_LEFT = 2;
var DIRECTION_RIGHT = 4;
var DIRECTION_UP = 8;
var DIRECTION_DOWN = 16;
var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;
var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;
var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;
var PROPS_XY = ["x", "y"];
var PROPS_CLIENT_XY = ["clientX", "clientY"];
/**
* create new input type manager
* @param {Manager} manager
* @param {Function} callback
* @returns {Input}
* @constructor
*/
function Input(manager, callback) {
var self = this;
this.manager = manager;
this.callback = callback;
this.element = manager.element;
this.target = manager.options.inputTarget;
// smaller wrapper around the handler, for the scope and the enabled state of the manager,
// so when disabled the input events are completely bypassed.
this.domHandler = function (ev) {
if (boolOrFn(manager.options.enable, [manager])) {
self.handler(ev);
}
};
this.init();
}
Input.prototype = {
/**
* should handle the inputEvent data and trigger the callback
* @virtual
*/
handler: function () {},
/**
* bind the events
*/
init: function () {
this.evEl &&
addEventListeners(
this.element,
this.evEl,
this.domHandler
);
this.evTarget &&
addEventListeners(
this.target,
this.evTarget,
this.domHandler
);
this.evWin &&
addEventListeners(
getWindowForElement(this.element),
this.evWin,
this.domHandler
);
},
/**
* unbind the events
*/
destroy: function () {
this.evEl &&
removeEventListeners(
this.element,
this.evEl,
this.domHandler
);
this.evTarget &&
removeEventListeners(
this.target,
this.evTarget,
this.domHandler
);
this.evWin &&
removeEventListeners(
getWindowForElement(this.element),
this.evWin,
this.domHandler
);
},
};
/**
* create new input type manager
* called by the Manager constructor
* @param {Hammer} manager
* @returns {Input}
*/
function createInputInstance(manager) {
var Type;
var inputClass = manager.options.inputClass;
if (inputClass) {
Type = inputClass;
} else if (SUPPORT_POINTER_EVENTS) {
Type = PointerEventInput;
} else if (SUPPORT_ONLY_TOUCH) {
Type = TouchInput;
} else if (!SUPPORT_TOUCH) {
Type = MouseInput;
} else {
Type = TouchMouseInput;
}
return new Type(manager, inputHandler);
}
/**
* handle input events
* @param {Manager} manager
* @param {String} eventType
* @param {Object} input
*/
function inputHandler(manager, eventType, input) {
var pointersLen = input.pointers.length;
var changedPointersLen = input.changedPointers.length;
var isFirst =
eventType & INPUT_START &&
pointersLen - changedPointersLen === 0;
var isFinal =
eventType & (INPUT_END | INPUT_CANCEL) &&
pointersLen - changedPointersLen === 0;
input.isFirst = !!isFirst;
input.isFinal = !!isFinal;
if (isFirst) {
manager.session = {};
}
// source event is the normalized value of the domEvents
// like 'touchstart, mouseup, pointerdown'
input.eventType = eventType;
// compute scale, rotation etc
computeInputData(manager, input);
// emit secret event
manager.emit("hammer.input", input);
manager.recognize(input);
manager.session.prevInput = input;
}
/**
* extend the data with some usable properties like scale, rotate, velocity etc
* @param {Object} manager
* @param {Object} input
*/
function computeInputData(manager, input) {
var session = manager.session;
var pointers = input.pointers;
var pointersLength = pointers.length;
// store the first input to calculate the distance and direction
if (!session.firstInput) {
session.firstInput = simpleCloneInputData(input);
}
// to compute scale and rotation we need to store the multiple touches
if (pointersLength > 1 && !session.firstMultiple) {
session.firstMultiple = simpleCloneInputData(input);
} else if (pointersLength === 1) {
session.firstMultiple = false;
}
var firstInput = session.firstInput;
var firstMultiple = session.firstMultiple;
var offsetCenter = firstMultiple
? firstMultiple.center
: firstInput.center;
var center = (input.center = getCenter(pointers));
input.timeStamp = now();
input.deltaTime = input.timeStamp - firstInput.timeStamp;
input.angle = getAngle(offsetCenter, center);
input.distance = getDistance(offsetCenter, center);
computeDeltaXY(session, input);
input.offsetDirection = getDirection(
input.deltaX,
input.deltaY
);
var overallVelocity = getVelocity(
input.deltaTime,
input.deltaX,
input.deltaY
);
input.overallVelocityX = overallVelocity.x;
input.overallVelocityY = overallVelocity.y;
input.overallVelocity =
abs(overallVelocity.x) > abs(overallVelocity.y)
? overallVelocity.x
: overallVelocity.y;
input.scale = firstMultiple
? getScale(firstMultiple.pointers, pointers)
: 1;
input.rotation = firstMultiple
? getRotation(firstMultiple.pointers, pointers)
: 0;
input.maxPointers = !session.prevInput
? input.pointers.length
: input.pointers.length > session.prevInput.maxPointers
? input.pointers.length
: session.prevInput.maxPointers;
computeIntervalInputData(session, input);
// find the correct target
var target = manager.element;
if (hasParent(input.srcEvent.target, target)) {
target = input.srcEvent.target;
}
input.target = target;
}
function computeDeltaXY(session, input) {
var center = input.center;
var offset = session.offsetDelta || {};
var prevDelta = session.prevDelta || {};
var prevInput = session.prevInput || {};
if (
input.eventType === INPUT_START ||
prevInput.eventType === INPUT_END
) {
prevDelta = session.prevDelta = {
x: prevInput.deltaX || 0,
y: prevInput.deltaY || 0,
};
offset = session.offsetDelta = {
x: center.x,
y: center.y,
};
}
input.deltaX = prevDelta.x + (center.x - offset.x);
input.deltaY = prevDelta.y + (center.y - offset.y);
}
/**
* velocity is calculated every x ms
* @param {Object} session
* @param {Object} input
*/
function computeIntervalInputData(session, input) {
var last = session.lastInterval || input,
deltaTime = input.timeStamp - last.timeStamp,
velocity,
velocityX,
velocityY,
direction;
if (
input.eventType != INPUT_CANCEL &&
(deltaTime > COMPUTE_INTERVAL ||
last.velocity === undefined)
) {
var deltaX = input.deltaX - last.deltaX;
var deltaY = input.deltaY - last.deltaY;
var v = getVelocity(deltaTime, deltaX, deltaY);
velocityX = v.x;
velocityY = v.y;
velocity = abs(v.x) > abs(v.y) ? v.x : v.y;
direction = getDirection(deltaX, deltaY);
session.lastInterval = input;
} else {
// use latest velocity info if it doesn't overtake a minimum period
velocity = last.velocity;
velocityX = last.velocityX;
velocityY = last.velocityY;
direction = last.direction;
}
input.velocity = velocity;
input.velocityX = velocityX;
input.velocityY = velocityY;
input.direction = direction;
}
/**
* create a simple clone from the input used for storage of firstInput and firstMultiple
* @param {Object} input
* @returns {Object} clonedInputData
*/
function simpleCloneInputData(input) {
// make a simple copy of the pointers because we will get a reference if we don't
// we only need clientXY for the calculations
var pointers = [];
var i = 0;
while (i < input.pointers.length) {
pointers[i] = {
clientX: round(input.pointers[i].clientX),
clientY: round(input.pointers[i].clientY),
};
i++;
}
return {
timeStamp: now(),
pointers: pointers,
center: getCenter(pointers),
deltaX: input.deltaX,
deltaY: input.deltaY,
};
}
/**
* get the center of all the pointers
* @param {Array} pointers
* @return {Object} center contains `x` and `y` properties
*/
function getCenter(pointers) {
var pointersLength = pointers.length;
// no need to loop when only one touch
if (pointersLength === 1) {
return {
x: round(pointers[0].clientX),
y: round(pointers[0].clientY),
};
}
var x = 0,
y = 0,
i = 0;
while (i < pointersLength) {
x += pointers[i].clientX;
y += pointers[i].clientY;
i++;
}
return {
x: round(x / pointersLength),
y: round(y / pointersLength),
};
}
/**
* calculate the velocity between two points. unit is in px per ms.
* @param {Number} deltaTime
* @param {Number} x
* @param {Number} y
* @return {Object} velocity `x` and `y`
*/
function getVelocity(deltaTime, x, y) {
return {
x: x / deltaTime || 0,
y: y / deltaTime || 0,
};
}
/**
* get the direction between two points
* @param {Number} x
* @param {Number} y
* @return {Number} direction
*/
function getDirection(x, y) {
if (x === y) {
return DIRECTION_NONE;
}
if (abs(x) >= abs(y)) {
return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
}
return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;
}
/**
* calculate the absolute distance between two points
* @param {Object} p1 {x, y}
* @param {Object} p2 {x, y}
* @param {Array} [props] containing x and y keys
* @return {Number} distance
*/
function getDistance(p1, p2, props) {
if (!props) {
props = PROPS_XY;
}
var x = p2[props[0]] - p1[props[0]],
y = p2[props[1]] - p1[props[1]];
return Math.sqrt(x * x + y * y);
}
/**
* calculate the angle between two coordinates
* @param {Object} p1
* @param {Object} p2
* @param {Array} [props] containing x and y keys
* @return {Number} angle
*/
function getAngle(p1, p2, props) {
if (!props) {
props = PROPS_XY;
}
var x = p2[props[0]] - p1[props[0]],
y = p2[props[1]] - p1[props[1]];
return (Math.atan2(y, x) * 180) / Math.PI;
}
/**
* calculate the rotation degrees between two pointersets
* @param {Array} start array of pointers
* @param {Array} end array of pointers
* @return {Number} rotation
*/
function getRotation(start, end) {
return (
getAngle(end[1], end[0], PROPS_CLIENT_XY) +
getAngle(start[1], start[0], PROPS_CLIENT_XY)
);
}
/**
* calculate the scale factor between two pointersets
* no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
* @param {Array} start array of pointers
* @param {Array} end array of pointers
* @return {Number} scale
*/
function getScale(start, end) {
return (
getDistance(end[0], end[1], PROPS_CLIENT_XY) /
getDistance(start[0], start[1], PROPS_CLIENT_XY)
);
}
var MOUSE_INPUT_MAP = {
mousedown: INPUT_START,
mousemove: INPUT_MOVE,
mouseup: INPUT_END,
};
var MOUSE_ELEMENT_EVENTS = "mousedown";
var MOUSE_WINDOW_EVENTS = "mousemove mouseup";
/**
* Mouse events input
* @constructor
* @extends Input
*/
function MouseInput() {
this.evEl = MOUSE_ELEMENT_EVENTS;
this.evWin = MOUSE_WINDOW_EVENTS;
this.pressed = false; // mousedown state
Input.apply(this, arguments);
}
inherit(MouseInput, Input, {
/**
* handle mouse events
* @param {Object} ev
*/
handler: function MEhandler(ev) {
var eventType = MOUSE_INPUT_MAP[ev.type];
// on start we want to have the left mouse button down
if (eventType & INPUT_START && ev.button === 0) {
this.pressed = true;
}
if (eventType & INPUT_MOVE && ev.which !== 1) {
eventType = INPUT_END;
}
// mouse must be down
if (!this.pressed) {
return;
}
if (eventType & INPUT_END) {
this.pressed = false;
}
this.callback(this.manager, eventType, {
pointers: [ev],
changedPointers: [ev],
pointerType: INPUT_TYPE_MOUSE,
srcEvent: ev,
});
},
});
var POINTER_INPUT_MAP = {
pointerdown: INPUT_START,
pointermove: INPUT_MOVE,
pointerup: INPUT_END,
pointercancel: INPUT_CANCEL,
pointerout: INPUT_CANCEL,
};
// in IE10 the pointer types is defined as an enum
var IE10_POINTER_TYPE_ENUM = {
2: INPUT_TYPE_TOUCH,
3: INPUT_TYPE_PEN,
4: INPUT_TYPE_MOUSE,
5: INPUT_TYPE_KINECT, // see https://twitter.com/jacobrossi/status/480596438489890816
};
var POINTER_ELEMENT_EVENTS = "pointerdown";
var POINTER_WINDOW_EVENTS =
"pointermove pointerup pointercancel";
// IE10 has prefixed support, and case-sensitive
if (window.MSPointerEvent && !window.PointerEvent) {
POINTER_ELEMENT_EVENTS = "MSPointerDown";
POINTER_WINDOW_EVENTS =
"MSPointerMove MSPointerUp MSPointerCancel";
}
/**
* Pointer events input
* @constructor
* @extends Input
*/
function PointerEventInput() {
this.evEl = POINTER_ELEMENT_EVENTS;
this.evWin = POINTER_WINDOW_EVENTS;
Input.apply(this, arguments);
this.store = this.manager.session.pointerEvents = [];
}
inherit(PointerEventInput, Input, {
/**
* handle mouse events
* @param {Object} ev
*/
handler: function PEhandler(ev) {
var store = this.store;
var removePointer = false;
var eventTypeNormalized = ev.type
.toLowerCase()
.replace("ms", "");
var eventType = POINTER_INPUT_MAP[eventTypeNormalized];
var pointerType =
IE10_POINTER_TYPE_ENUM[ev.pointerType] ||
ev.pointerType;
var isTouch = pointerType == INPUT_TYPE_TOUCH;
// get index of the event in the store
var storeIndex = inArray(
store,
ev.pointerId,
"pointerId"
);
// start and mouse must be down
if (
eventType & INPUT_START &&
(ev.button === 0 || isTouch)
) {
if (storeIndex < 0) {
store.push(ev);
storeIndex = store.length - 1;
}
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
removePointer = true;
}
// it not found, so the pointer hasn't been down (so it's probably a hover)
if (storeIndex < 0) {
return;
}
// update the event in the store
store[storeIndex] = ev;
this.callback(this.manager, eventType, {
pointers: store,
changedPointers: [ev],
pointerType: pointerType,
srcEvent: ev,
});
if (removePointer) {
// remove from the store
store.splice(storeIndex, 1);
}
},
});
var SINGLE_TOUCH_INPUT_MAP = {
touchstart: INPUT_START,
touchmove: INPUT_MOVE,
touchend: INPUT_END,
touchcancel: INPUT_CANCEL,
};
var SINGLE_TOUCH_TARGET_EVENTS = "touchstart";
var SINGLE_TOUCH_WINDOW_EVENTS =
"touchstart touchmove touchend touchcancel";
/**
* Touch events input
* @constructor
* @extends Input
*/
function SingleTouchInput() {
this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;
this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;
this.started = false;
Input.apply(this, arguments);
}
inherit(SingleTouchInput, Input, {
handler: function TEhandler(ev) {
var type = SINGLE_TOUCH_INPUT_MAP[ev.type];
// should we handle the touch events?
if (type === INPUT_START) {
this.started = true;
}
if (!this.started) {
return;
}
var touches = normalizeSingleTouches.call(
this,
ev,
type
);
// when done, reset the started state
if (
type & (INPUT_END | INPUT_CANCEL) &&
touches[0].length - touches[1].length === 0
) {
this.started = false;
}
this.callback(this.manager, type, {
pointers: touches[0],
changedPointers: touches[1],
pointerType: INPUT_TYPE_TOUCH,
srcEvent: ev,
});
},
});
/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/
function normalizeSingleTouches(ev, type) {
var all = toArray(ev.touches);
var changed = toArray(ev.changedTouches);
if (type & (INPUT_END | INPUT_CANCEL)) {
all = uniqueArray(
all.concat(changed),
"identifier",
true
);
}
return [all, changed];
}
var TOUCH_INPUT_MAP = {
touchstart: INPUT_START,
touchmove: INPUT_MOVE,
touchend: INPUT_END,
touchcancel: INPUT_CANCEL,
};
var TOUCH_TARGET_EVENTS =
"touchstart touchmove touchend touchcancel";
/**
* Multi-user touch events input
* @constructor
* @extends Input
*/
function TouchInput() {
this.evTarget = TOUCH_TARGET_EVENTS;
this.targetIds = {};
Input.apply(this, arguments);
}
inherit(TouchInput, Input, {
handler: function MTEhandler(ev) {
var type = TOUCH_INPUT_MAP[ev.type];
var touches = getTouches.call(this, ev, type);
if (!touches) {
return;
}
this.callback(this.manager, type, {
pointers: touches[0],
changedPointers: touches[1],
pointerType: INPUT_TYPE_TOUCH,
srcEvent: ev,
});
},
});
/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/
function getTouches(ev, type) {
var allTouches = toArray(ev.touches);
var targetIds = this.targetIds;
// when there is only one touch, the process can be simplified
if (
type & (INPUT_START | INPUT_MOVE) &&
allTouches.length === 1
) {
targetIds[allTouches[0].identifier] = true;
return [allTouches, allTouches];
}
var i,
targetTouches,
changedTouches = toArray(ev.changedTouches),
changedTargetTouches = [],
target = this.target;
// get target touches from touches
targetTouches = allTouches.filter(function (touch) {
return hasParent(touch.target, target);
});
// collect touches
if (type === INPUT_START) {
i = 0;
while (i < targetTouches.length) {
targetIds[targetTouches[i].identifier] = true;
i++;
}
}
// filter changed touches to only contain touches that exist in the collected target ids
i = 0;
while (i < changedTouches.length) {
if (targetIds[changedTouches[i].identifier]) {
changedTargetTouches.push(changedTouches[i]);
}
// cleanup removed touches
if (type & (INPUT_END | INPUT_CANCEL)) {
delete targetIds[changedTouches[i].identifier];
}
i++;
}
if (!changedTargetTouches.length) {
return;
}
return [
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
uniqueArray(
targetTouches.concat(changedTargetTouches),
"identifier",
true
),
changedTargetTouches,
];
}
/**
* Combined touch and mouse input
*
* Touch has a higher priority then mouse, and while touching no mouse events are allowed.
* This because touch devices also emit mouse events while doing a touch.
*
* @constructor
* @extends Input
*/
var DEDUP_TIMEOUT = 2500;
var DEDUP_DISTANCE = 25;
function TouchMouseInput() {
Input.apply(this, arguments);
var handler = bindFn(this.handler, this);
this.touch = new TouchInput(this.manager, handler);
this.mouse = new MouseInput(this.manager, handler);
this.primaryTouch = null;
this.lastTouches = [];
}
inherit(TouchMouseInput, Input, {
/**
* handle mouse and touch events
* @param {Hammer} manager
* @param {String} inputEvent
* @param {Object} inputData
*/
handler: function TMEhandler(
manager,
inputEvent,
inputData
) {
var isTouch = inputData.pointerType == INPUT_TYPE_TOUCH,
isMouse = inputData.pointerType == INPUT_TYPE_MOUSE;
if (
isMouse &&
inputData.sourceCapabilities &&
inputData.sourceCapabilities.firesTouchEvents
) {
return;
}
// when we're in a touch event, record touches to de-dupe synthetic mouse event
if (isTouch) {
recordTouches.call(this, inputEvent, inputData);
} else if (
isMouse &&
isSyntheticEvent.call(this, inputData)
) {
return;
}
this.callback(manager, inputEvent, inputData);
},
/**
* remove the event listeners
*/
destroy: function destroy() {
this.touch.destroy();
this.mouse.destroy();
},
});
function recordTouches(eventType, eventData) {
if (eventType & INPUT_START) {
this.primaryTouch =
eventData.changedPointers[0].identifier;
setLastTouch.call(this, eventData);
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
setLastTouch.call(this, eventData);
}
}
function setLastTouch(eventData) {
var touch = eventData.changedPointers[0];
if (touch.identifier === this.primaryTouch) {
var lastTouch = { x: touch.clientX, y: touch.clientY };
this.lastTouches.push(lastTouch);
var lts = this.lastTouches;
var removeLastTouch = function () {
var i = lts.indexOf(lastTouch);
if (i > -1) {
lts.splice(i, 1);
}
};
setTimeout(removeLastTouch, DEDUP_TIMEOUT);
}
}
function isSyntheticEvent(eventData) {
var x = eventData.srcEvent.clientX,
y = eventData.srcEvent.clientY;
for (var i = 0; i < this.lastTouches.length; i++) {
var t = this.lastTouches[i];
var dx = Math.abs(x - t.x),
dy = Math.abs(y - t.y);
if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {
return true;
}
}
return false;
}
var PREFIXED_TOUCH_ACTION = prefixed(
TEST_ELEMENT.style,
"touchAction"
);
var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;
// magical touchAction value
var TOUCH_ACTION_COMPUTE = "compute";
var TOUCH_ACTION_AUTO = "auto";
var TOUCH_ACTION_MANIPULATION = "manipulation"; // not implemented
var TOUCH_ACTION_NONE = "none";
var TOUCH_ACTION_PAN_X = "pan-x";
var TOUCH_ACTION_PAN_Y = "pan-y";
var TOUCH_ACTION_MAP = getTouchActionProps();
/**
* Touch Action
* sets the touchAction property or uses the js alternative
* @param {Manager} manager
* @param {String} value
* @constructor
*/
function TouchAction(manager, value) {
this.manager = manager;
this.set(value);
}
TouchAction.prototype = {
/**
* set the touchAction value on the element or enable the polyfill
* @param {String} value
*/
set: function (value) {
// find out the touch-action by the event handlers
if (value == TOUCH_ACTION_COMPUTE) {
value = this.compute();
}
if (
NATIVE_TOUCH_ACTION &&
this.manager.element.style &&
TOUCH_ACTION_MAP[value]
) {
this.manager.element.style[PREFIXED_TOUCH_ACTION] =
value;
}
this.actions = value.toLowerCase().trim();
},
/**
* just re-set the touchAction value
*/
update: function () {
this.set(this.manager.options.touchAction);
},
/**
* compute the value for the touchAction property based on the recognizer's settings
* @returns {String} value
*/
compute: function () {
var actions = [];
each(this.manager.recognizers, function (recognizer) {
if (
boolOrFn(recognizer.options.enable, [
recognizer,
])
) {
actions = actions.concat(
recognizer.getTouchAction()
);
}
});
return cleanTouchActions(actions.join(" "));
},
/**
* this method is called on each input cycle and provides the preventing of the browser behavior
* @param {Object} input
*/
preventDefaults: function (input) {
var srcEvent = input.srcEvent;
var direction = input.offsetDirection;
// if the touch action did prevented once this session
if (this.manager.session.prevented) {
srcEvent.preventDefault();
return;
}
var actions = this.actions;
var hasNone =
inStr(actions, TOUCH_ACTION_NONE) &&
!TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];
var hasPanY =
inStr(actions, TOUCH_ACTION_PAN_Y) &&
!TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];
var hasPanX =
inStr(actions, TOUCH_ACTION_PAN_X) &&
!TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];
if (hasNone) {
//do not prevent defaults if this is a tap gesture
var isTapPointer = input.pointers.length === 1;
var isTapMovement = input.distance < 2;
var isTapTouchTime = input.deltaTime < 250;
if (
isTapPointer &&
isTapMovement &&
isTapTouchTime
) {
return;
}
}
if (hasPanX && hasPanY) {
// `pan-x pan-y` means browser handles all scrolling/panning, do not prevent
return;
}
if (
hasNone ||
(hasPanY && direction & DIRECTION_HORIZONTAL) ||
(hasPanX && direction & DIRECTION_VERTICAL)
) {
return this.preventSrc(srcEvent);
}
},
/**
* call preventDefault to prevent the browser's default behavior (scrolling in most cases)
* @param {Object} srcEvent
*/
preventSrc: function (srcEvent) {
this.manager.session.prevented = true;
srcEvent.preventDefault();
},
};
/**
* when the touchActions are collected they are not a valid value, so we need to clean things up. *
* @param {String} actions
* @returns {*}
*/
function cleanTouchActions(actions) {
// none
if (inStr(actions, TOUCH_ACTION_NONE)) {
return TOUCH_ACTION_NONE;
}
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
// if both pan-x and pan-y are set (different recognizers
// for different directions, e.g. horizontal pan but vertical swipe?)
// we need none (as otherwise with pan-x pan-y combined none of these
// recognizers will work, since the browser would handle all panning
if (hasPanX && hasPanY) {
return TOUCH_ACTION_NONE;
}
// pan-x OR pan-y
if (hasPanX || hasPanY) {
return hasPanX
? TOUCH_ACTION_PAN_X
: TOUCH_ACTION_PAN_Y;
}
// manipulation
if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {
return TOUCH_ACTION_MANIPULATION;
}
return TOUCH_ACTION_AUTO;
}
function getTouchActionProps() {
if (!NATIVE_TOUCH_ACTION) {
return false;
}
var touchMap = {};
var cssSupports = window.CSS && window.CSS.supports;
[
"auto",
"manipulation",
"pan-y",
"pan-x",
"pan-x pan-y",
"none",
].forEach(function (val) {
// If css.supports is not supported but there is native touch-action assume it supports
// all values. This is the case for IE 10 and 11.
touchMap[val] = cssSupports
? window.CSS.supports("touch-action", val)
: true;
});
return touchMap;
}
/**
* Recognizer flow explained; *
* All recognizers have the initial state of POSSIBLE when a input session starts.
* The definition of a input session is from the first input until the last input, with all it's movement in it. *
* Example session for mouse-input: mousedown -> mousemove -> mouseup
*
* On each recognizing cycle (see Manager.recognize) the .recognize() method is executed
* which determines with state it should be.
*
* If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to
* POSSIBLE to give it another change on the next cycle.
*
* Possible
* |
* +-----+---------------+
* | |
* +-----+-----+ |
* | | |
* Failed Cancelled |
* +-------+------+
* | |
* Recognized Began
* |
* Changed
* |
* Ended/Recognized
*/
var STATE_POSSIBLE = 1;
var STATE_BEGAN = 2;
var STATE_CHANGED = 4;
var STATE_ENDED = 8;
var STATE_RECOGNIZED = STATE_ENDED;
var STATE_CANCELLED = 16;
var STATE_FAILED = 32;
/**
* Recognizer
* Every recognizer needs to extend from this class.
* @constructor
* @param {Object} options
*/
function Recognizer(options) {
this.options = assign({}, this.defaults, options || {});
this.id = uniqueId();
this.manager = null;
// default is enable true
this.options.enable = ifUndefined(
this.options.enable,
true
);
this.state = STATE_POSSIBLE;
this.simultaneous = {};
this.requireFail = [];
}
Recognizer.prototype = {
/**
* @virtual
* @type {Object}
*/
defaults: {},
/**
* set options
* @param {Object} options
* @return {Recognizer}
*/
set: function (options) {
assign(this.options, options);
// also update the touchAction, in case something changed about the directions/enabled state
this.manager && this.manager.touchAction.update();
return this;
},
/**
* recognize simultaneous with an other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
recognizeWith: function (otherRecognizer) {
if (
invokeArrayArg(
otherRecognizer,
"recognizeWith",
this
)
) {
return this;
}
var simultaneous = this.simultaneous;
otherRecognizer = getRecognizerByNameIfManager(
otherRecognizer,
this
);
if (!simultaneous[otherRecognizer.id]) {
simultaneous[otherRecognizer.id] = otherRecognizer;
otherRecognizer.recognizeWith(this);
}
return this;
},
/**
* drop the simultaneous link. it doesnt remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
dropRecognizeWith: function (otherRecognizer) {
if (
invokeArrayArg(
otherRecognizer,
"dropRecognizeWith",
this
)
) {
return this;
}
otherRecognizer = getRecognizerByNameIfManager(
otherRecognizer,
this
);
delete this.simultaneous[otherRecognizer.id];
return this;
},
/**
* recognizer can only run when an other is failing
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
requireFailure: function (otherRecognizer) {
if (
invokeArrayArg(
otherRecognizer,
"requireFailure",
this
)
) {
return this;
}
var requireFail = this.requireFail;
otherRecognizer = getRecognizerByNameIfManager(
otherRecognizer,
this
);
if (inArray(requireFail, otherRecognizer) === -1) {
requireFail.push(otherRecognizer);
otherRecognizer.requireFailure(this);
}
return this;
},
/**
* drop the requireFailure link. it does not remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
dropRequireFailure: function (otherRecognizer) {
if (
invokeArrayArg(
otherRecognizer,
"dropRequireFailure",
this
)
) {
return this;
}
otherRecognizer = getRecognizerByNameIfManager(
otherRecognizer,
this
);
var index = inArray(this.requireFail, otherRecognizer);
if (index > -1) {
this.requireFail.splice(index, 1);
}
return this;
},
/**
* has require failures boolean
* @returns {boolean}
*/
hasRequireFailures: function () {
return this.requireFail.length > 0;
},
/**
* if the recognizer can recognize simultaneous with an other recognizer
* @param {Recognizer} otherRecognizer
* @returns {Boolean}
*/
canRecognizeWith: function (otherRecognizer) {
return !!this.simultaneous[otherRecognizer.id];
},
/**
* You should use `tryEmit` instead of `emit` directly to check
* that all the needed recognizers has failed before emitting.
* @param {Object} input
*/
emit: function (input) {
var self = this;
var state = this.state;
function emit(event) {
self.manager.emit(event, input);
}
// 'panstart' and 'panmove'
if (state < STATE_ENDED) {
emit(self.options.event + stateStr(state));
}
emit(self.options.event); // simple 'eventName' events
if (input.additionalEvent) {
// additional event(panleft, panright, pinchin, pinchout...)
emit(input.additionalEvent);
}
// panend and pancancel
if (state >= STATE_ENDED) {
emit(self.options.event + stateStr(state));
}
},
/**
* Check that all the require failure recognizers has failed,
* if true, it emits a gesture event,
* otherwise, setup the state to FAILED.
* @param {Object} input
*/
tryEmit: function (input) {
if (this.canEmit()) {
return this.emit(input);
}
// it's failing anyway
this.state = STATE_FAILED;
},
/**
* can we emit?
* @returns {boolean}
*/
canEmit: function () {
var i = 0;
while (i < this.requireFail.length) {
if (
!(
this.requireFail[i].state &
(STATE_FAILED | STATE_POSSIBLE)
)
) {
return false;
}
i++;
}
return true;
},
/**
* update the recognizer
* @param {Object} inputData
*/
recognize: function (inputData) {
// make a new copy of the inputData
// so we can change the inputData without messing up the other recognizers
var inputDataClone = assign({}, inputData);
// is is enabled and allow recognizing?
if (
!boolOrFn(this.options.enable, [
this,
inputDataClone,
])
) {
this.reset();
this.state = STATE_FAILED;
return;
}
// reset when we've reached the end
if (
this.state &
(STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)
) {
this.state = STATE_POSSIBLE;
}
this.state = this.process(inputDataClone);
// the recognizer has recognized a gesture
// so trigger an event
if (
this.state &
(STATE_BEGAN |
STATE_CHANGED |
STATE_ENDED |
STATE_CANCELLED)
) {
this.tryEmit(inputDataClone);
}
},
/**
* return the state of the recognizer
* the actual recognizing happens in this method
* @virtual
* @param {Object} inputData
* @returns {Const} STATE
*/
process: function (inputData) {}, // jshint ignore:line
/**
* return the preferred touch-action
* @virtual
* @returns {Array}
*/
getTouchAction: function () {},
/**
* called when the gesture isn't allowed to recognize
* like when another is being recognized or it is disabled
* @virtual
*/
reset: function () {},
};
/**
* get a usable string, used as event postfix
* @param {Const} state
* @returns {String} state
*/
function stateStr(state) {
if (state & STATE_CANCELLED) {
return "cancel";
} else if (state & STATE_ENDED) {
return "end";
} else if (state & STATE_CHANGED) {
return "move";
} else if (state & STATE_BEGAN) {
return "start";
}
return "";
}
/**
* direction cons to string
* @param {Const} direction
* @returns {String}
*/
function directionStr(direction) {
if (direction == DIRECTION_DOWN) {
return "down";
} else if (direction == DIRECTION_UP) {
return "up";
} else if (direction == DIRECTION_LEFT) {
return "left";
} else if (direction == DIRECTION_RIGHT) {
return "right";
}
return "";
}
/**
* get a recognizer by name if it is bound to a manager
* @param {Recognizer|String} otherRecognizer
* @param {Recognizer} recognizer
* @returns {Recognizer}
*/
function getRecognizerByNameIfManager(
otherRecognizer,
recognizer
) {
var manager = recognizer.manager;
if (manager) {
return manager.get(otherRecognizer);
}
return otherRecognizer;
}
/**
* This recognizer is just used as a base for the simple attribute recognizers.
* @constructor
* @extends Recognizer
*/
function AttrRecognizer() {
Recognizer.apply(this, arguments);
}
inherit(AttrRecognizer, Recognizer, {
/**
* @namespace
* @memberof AttrRecognizer
*/
defaults: {
/**
* @type {Number}
* @default 1
*/
pointers: 1,
},
/**
* Used to check if it the recognizer receives valid input, like input.distance > 10.
* @memberof AttrRecognizer
* @param {Object} input
* @returns {Boolean} recognized
*/
attrTest: function (input) {
var optionPointers = this.options.pointers;
return (
optionPointers === 0 ||
input.pointers.length === optionPointers
);
},
/**
* Process the input and return the state for the recognizer
* @memberof AttrRecognizer
* @param {Object} input
* @returns {*} State
*/
process: function (input) {
var state = this.state;
var eventType = input.eventType;
var isRecognized =
state & (STATE_BEGAN | STATE_CHANGED);
var isValid = this.attrTest(input);
// on cancel input and we've recognized before, return STATE_CANCELLED
if (
isRecognized &&
(eventType & INPUT_CANCEL || !isValid)
) {
return state | STATE_CANCELLED;
} else if (isRecognized || isValid) {
if (eventType & INPUT_END) {
return state | STATE_ENDED;
} else if (!(state & STATE_BEGAN)) {
return STATE_BEGAN;
}
return state | STATE_CHANGED;
}
return STATE_FAILED;
},
});
/**
* Pan
* Recognized when the pointer is down and moved in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/
function PanRecognizer() {
AttrRecognizer.apply(this, arguments);
this.pX = null;
this.pY = null;
}
inherit(PanRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof PanRecognizer
*/
defaults: {
event: "pan",
threshold: 10,
pointers: 1,
direction: DIRECTION_ALL,
},
getTouchAction: function () {
var direction = this.options.direction;
var actions = [];
if (direction & DIRECTION_HORIZONTAL) {
actions.push(TOUCH_ACTION_PAN_Y);
}
if (direction & DIRECTION_VERTICAL) {
actions.push(TOUCH_ACTION_PAN_X);
}
return actions;
},
directionTest: function (input) {
var options = this.options;
var hasMoved = true;
var distance = input.distance;
var direction = input.direction;
var x = input.deltaX;
var y = input.deltaY;
// lock to axis?
if (!(direction & options.direction)) {
if (options.direction & DIRECTION_HORIZONTAL) {
direction =
x === 0
? DIRECTION_NONE
: x < 0
? DIRECTION_LEFT
: DIRECTION_RIGHT;
hasMoved = x != this.pX;
distance = Math.abs(input.deltaX);
} else {
direction =
y === 0
? DIRECTION_NONE
: y < 0
? DIRECTION_UP
: DIRECTION_DOWN;
hasMoved = y != this.pY;
distance = Math.abs(input.deltaY);
}
}
input.direction = direction;
return (
hasMoved &&
distance > options.threshold &&
direction & options.direction
);
},
attrTest: function (input) {
return (
AttrRecognizer.prototype.attrTest.call(
this,
input
) &&
(this.state & STATE_BEGAN ||
(!(this.state & STATE_BEGAN) &&
this.directionTest(input)))
);
},
emit: function (input) {
this.pX = input.deltaX;
this.pY = input.deltaY;
var direction = directionStr(input.direction);
if (direction) {
input.additionalEvent =
this.options.event + direction;
}
this._super.emit.call(this, input);
},
});
/**
* Pinch
* Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).
* @constructor
* @extends AttrRecognizer
*/
function PinchRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(PinchRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof PinchRecognizer
*/
defaults: {
event: "pinch",
threshold: 0,
pointers: 2,
},
getTouchAction: function () {
return [TOUCH_ACTION_NONE];
},
attrTest: function (input) {
return (
this._super.attrTest.call(this, input) &&
(Math.abs(input.scale - 1) >
this.options.threshold ||
this.state & STATE_BEGAN)
);
},
emit: function (input) {
if (input.scale !== 1) {
var inOut = input.scale < 1 ? "in" : "out";
input.additionalEvent = this.options.event + inOut;
}
this._super.emit.call(this, input);
},
});
/**
* Press
* Recognized when the pointer is down for x ms without any movement.
* @constructor
* @extends Recognizer
*/
function PressRecognizer() {
Recognizer.apply(this, arguments);
this._timer = null;
this._input = null;
}
inherit(PressRecognizer, Recognizer, {
/**
* @namespace
* @memberof PressRecognizer
*/
defaults: {
event: "press",
pointers: 1,
time: 251, // minimal time of the pointer to be pressed
threshold: 9, // a minimal movement is ok, but keep it low
},
getTouchAction: function () {
return [TOUCH_ACTION_AUTO];
},
process: function (input) {
var options = this.options;
var validPointers =
input.pointers.length === options.pointers;
var validMovement = input.distance < options.threshold;
var validTime = input.deltaTime > options.time;
this._input = input;
// we only allow little movement
// and we've reached an end event, so a tap is possible
if (
!validMovement ||
!validPointers ||
(input.eventType & (INPUT_END | INPUT_CANCEL) &&
!validTime)
) {
this.reset();
} else if (input.eventType & INPUT_START) {
this.reset();
this._timer = setTimeoutContext(
function () {
this.state = STATE_RECOGNIZED;
this.tryEmit();
},
options.time,
this
);
} else if (input.eventType & INPUT_END) {
return STATE_RECOGNIZED;
}
return STATE_FAILED;
},
reset: function () {
clearTimeout(this._timer);
},
emit: function (input) {
if (this.state !== STATE_RECOGNIZED) {
return;
}
if (input && input.eventType & INPUT_END) {
this.manager.emit(this.options.event + "up", input);
} else {
this._input.timeStamp = now();
this.manager.emit(this.options.event, this._input);
}
},
});
/**
* Rotate
* Recognized when two or more pointer are moving in a circular motion.
* @constructor
* @extends AttrRecognizer
*/
function RotateRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(RotateRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof RotateRecognizer
*/
defaults: {
event: "rotate",
threshold: 0,
pointers: 2,
},
getTouchAction: function () {
return [TOUCH_ACTION_NONE];
},
attrTest: function (input) {
return (
this._super.attrTest.call(this, input) &&
(Math.abs(input.rotation) >
this.options.threshold ||
this.state & STATE_BEGAN)
);
},
});
/**
* Swipe
* Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/
function SwipeRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(SwipeRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof SwipeRecognizer
*/
defaults: {
event: "swipe",
threshold: 10,
velocity: 0.3,
direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,
pointers: 1,
},
getTouchAction: function () {
return PanRecognizer.prototype.getTouchAction.call(
this
);
},
attrTest: function (input) {
var direction = this.options.direction;
var velocity;
if (
direction &
(DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)
) {
velocity = input.overallVelocity;
} else if (direction & DIRECTION_HORIZONTAL) {
velocity = input.overallVelocityX;
} else if (direction & DIRECTION_VERTICAL) {
velocity = input.overallVelocityY;
}
return (
this._super.attrTest.call(this, input) &&
direction & input.offsetDirection &&
input.distance > this.options.threshold &&
input.maxPointers == this.options.pointers &&
abs(velocity) > this.options.velocity &&
input.eventType & INPUT_END
);
},
emit: function (input) {
var direction = directionStr(input.offsetDirection);
if (direction) {
this.manager.emit(
this.options.event + direction,
input
);
}
this.manager.emit(this.options.event, input);
},
});
/**
* A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur
* between the given interval and position. The delay option can be used to recognize multi-taps without firing
* a single tap.
*
* The eventData from the emitted event contains the property `tapCount`, which contains the amount of
* multi-taps being recognized.
* @constructor
* @extends Recognizer
*/
function TapRecognizer() {
Recognizer.apply(this, arguments);
// previous time and center,
// used for tap counting
this.pTime = false;
this.pCenter = false;
this._timer = null;
this._input = null;
this.count = 0;
}
inherit(TapRecognizer, Recognizer, {
/**
* @namespace
* @memberof PinchRecognizer
*/
defaults: {
event: "tap",
pointers: 1,
taps: 1,
interval: 300, // max time between the multi-tap taps
time: 250, // max time of the pointer to be down (like finger on the screen)
threshold: 9, // a minimal movement is ok, but keep it low
posThreshold: 10, // a multi-tap can be a bit off the initial position
},
getTouchAction: function () {
return [TOUCH_ACTION_MANIPULATION];
},
process: function (input) {
var options = this.options;
var validPointers =
input.pointers.length === options.pointers;
var validMovement = input.distance < options.threshold;
var validTouchTime = input.deltaTime < options.time;
this.reset();
if (input.eventType & INPUT_START && this.count === 0) {
return this.failTimeout();
}
// we only allow little movement
// and we've reached an end event, so a tap is possible
if (validMovement && validTouchTime && validPointers) {
if (input.eventType != INPUT_END) {
return this.failTimeout();
}
var validInterval = this.pTime
? input.timeStamp - this.pTime <
options.interval
: true;
var validMultiTap =
!this.pCenter ||
getDistance(this.pCenter, input.center) <
options.posThreshold;
this.pTime = input.timeStamp;
this.pCenter = input.center;
if (!validMultiTap || !validInterval) {
this.count = 1;
} else {
this.count += 1;
}
this._input = input;
// if tap count matches we have recognized it,
// else it has began recognizing...
var tapCount = this.count % options.taps;
if (tapCount === 0) {
// no failing requirements, immediately trigger the tap event
// or wait as long as the multitap interval to trigger
if (!this.hasRequireFailures()) {
return STATE_RECOGNIZED;
} else {
this._timer = setTimeoutContext(
function () {
this.state = STATE_RECOGNIZED;
this.tryEmit();
},
options.interval,
this
);
return STATE_BEGAN;
}
}
}
return STATE_FAILED;
},
failTimeout: function () {
this._timer = setTimeoutContext(
function () {
this.state = STATE_FAILED;
},
this.options.interval,
this
);
return STATE_FAILED;
},
reset: function () {
clearTimeout(this._timer);
},
emit: function () {
if (this.state == STATE_RECOGNIZED) {
this._input.tapCount = this.count;
this.manager.emit(this.options.event, this._input);
}
},
});
/**
* Simple way to create a manager with a default set of recognizers.
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/
function Hammer(element, options) {
options = options || {};
options.recognizers = ifUndefined(
options.recognizers,
Hammer.defaults.preset
);
return new Manager(element, options);
}
/**
* @const {string}
*/
Hammer.VERSION = "2.0.7";
/**
* default settings
* @namespace
*/
Hammer.defaults = {
/**
* set if DOM events are being triggered.
* But this is slower and unused by simple implementations, so disabled by default.
* @type {Boolean}
* @default false
*/
domEvents: false,
/**
* The value for the touchAction property/fallback.
* When set to `compute` it will magically set the correct value based on the added recognizers.
* @type {String}
* @default compute
*/
touchAction: TOUCH_ACTION_COMPUTE,
/**
* @type {Boolean}
* @default true
*/
enable: true,
/**
* EXPERIMENTAL FEATURE -- can be removed/changed
* Change the parent input target element.
* If Null, then it is being set the to main element.
* @type {Null|EventTarget}
* @default null
*/
inputTarget: null,
/**
* force an input class
* @type {Null|Function}
* @default null
*/
inputClass: null,
/**
* Default recognizer setup when calling `Hammer()`
* When creating a new Manager these will be skipped.
* @type {Array}
*/
preset: [
// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
[RotateRecognizer, { enable: false }],
[PinchRecognizer, { enable: false }, ["rotate"]],
[SwipeRecognizer, { direction: DIRECTION_HORIZONTAL }],
[
PanRecognizer,
{ direction: DIRECTION_HORIZONTAL },
["swipe"],
],
[TapRecognizer],
[
TapRecognizer,
{ event: "doubletap", taps: 2 },
["tap"],
],
[PressRecognizer],
],
/**
* Some CSS properties can be used to improve the working of Hammer.
* Add them to this method and they will be set when creating a new Manager.
* @namespace
*/
cssProps: {
/**
* Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/
userSelect: "none",
/**
* Disable the Windows Phone grippers when pressing an element.
* @type {String}
* @default 'none'
*/
touchSelect: "none",
/**
* Disables the default callout shown when you touch and hold a touch target.
* On iOS, when you touch and hold a touch target such as a link, Safari displays
* a callout containing information about the link. This property allows you to disable that callout.
* @type {String}
* @default 'none'
*/
touchCallout: "none",
/**
* Specifies whether zooming is enabled. Used by IE10>
* @type {String}
* @default 'none'
*/
contentZooming: "none",
/**
* Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/
userDrag: "none",
/**
* Overrides the highlight color shown when the user taps a link or a JavaScript
* clickable element in iOS. This property obeys the alpha value, if specified.
* @type {String}
* @default 'rgba(0,0,0,0)'
*/
tapHighlightColor: "rgba(0,0,0,0)",
},
};
var STOP = 1;
var FORCED_STOP = 2;
/**
* Manager
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/
function Manager(element, options) {
this.options = assign({}, Hammer.defaults, options || {});
this.options.inputTarget =
this.options.inputTarget || element;
this.handlers = {};
this.session = {};
this.recognizers = [];
this.oldCssProps = {};
this.element = element;
this.input = createInputInstance(this);
this.touchAction = new TouchAction(
this,
this.options.touchAction
);
toggleCssProps(this, true);
each(
this.options.recognizers,
function (item) {
var recognizer = this.add(new item[0](item[1]));
item[2] && recognizer.recognizeWith(item[2]);
item[3] && recognizer.requireFailure(item[3]);
},
this
);
}
Manager.prototype = {
/**
* set options
* @param {Object} options
* @returns {Manager}
*/
set: function (options) {
assign(this.options, options);
// Options that need a little more setup
if (options.touchAction) {
this.touchAction.update();
}
if (options.inputTarget) {
// Clean up existing event listeners and reinitialize
this.input.destroy();
this.input.target = options.inputTarget;
this.input.init();
}
return this;
},
/**
* stop recognizing for this session.
* This session will be discarded, when a new [input]start event is fired.
* When forced, the recognizer cycle is stopped immediately.
* @param {Boolean} [force]
*/
stop: function (force) {
this.session.stopped = force ? FORCED_STOP : STOP;
},
/**
* run the recognizers!
* called by the inputHandler function on every movement of the pointers (touches)
* it walks through all the recognizers and tries to detect the gesture that is being made
* @param {Object} inputData
*/
recognize: function (inputData) {
var session = this.session;
if (session.stopped) {
return;
}
// run the touch-action polyfill
this.touchAction.preventDefaults(inputData);
var recognizer;
var recognizers = this.recognizers;
// this holds the recognizer that is being recognized.
// so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED
// if no recognizer is detecting a thing, it is set to `null`
var curRecognizer = session.curRecognizer;
// reset when the last recognizer is recognized
// or when we're in a new session
if (
!curRecognizer ||
(curRecognizer &&
curRecognizer.state & STATE_RECOGNIZED)
) {
curRecognizer = session.curRecognizer = null;
}
var i = 0;
while (i < recognizers.length) {
recognizer = recognizers[i];
// find out if we are allowed try to recognize the input for this one.
// 1. allow if the session is NOT forced stopped (see the .stop() method)
// 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one
// that is being recognized.
// 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.
// this can be setup with the `recognizeWith()` method on the recognizer.
if (
session.stopped !== FORCED_STOP && // 1
(!curRecognizer ||
recognizer == curRecognizer || // 2
recognizer.canRecognizeWith(curRecognizer))
) {
// 3
recognizer.recognize(inputData);
} else {
recognizer.reset();
}
// if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the
// current active recognizer. but only if we don't already have an active recognizer
if (
!curRecognizer &&
recognizer.state &
(STATE_BEGAN | STATE_CHANGED | STATE_ENDED)
) {
curRecognizer = session.curRecognizer =
recognizer;
}
i++;
}
},
/**
* get a recognizer by its event name.
* @param {Recognizer|String} recognizer
* @returns {Recognizer|Null}
*/
get: function (recognizer) {
if (recognizer instanceof Recognizer) {
return recognizer;
}
var recognizers = this.recognizers;
for (var i = 0; i < recognizers.length; i++) {
if (recognizers[i].options.event == recognizer) {
return recognizers[i];
}
}
return null;
},
/**
* add a recognizer to the manager
* existing recognizers with the same event name will be removed
* @param {Recognizer} recognizer
* @returns {Recognizer|Manager}
*/
add: function (recognizer) {
if (invokeArrayArg(recognizer, "add", this)) {
return this;
}
// remove existing
var existing = this.get(recognizer.options.event);
if (existing) {
this.remove(existing);
}
this.recognizers.push(recognizer);
recognizer.manager = this;
this.touchAction.update();
return recognizer;
},
/**
* remove a recognizer by name or instance
* @param {Recognizer|String} recognizer
* @returns {Manager}
*/
remove: function (recognizer) {
if (invokeArrayArg(recognizer, "remove", this)) {
return this;
}
recognizer = this.get(recognizer);
// let's make sure this recognizer exists
if (recognizer) {
var recognizers = this.recognizers;
var index = inArray(recognizers, recognizer);
if (index !== -1) {
recognizers.splice(index, 1);
this.touchAction.update();
}
}
return this;
},
/**
* bind event
* @param {String} events
* @param {Function} handler
* @returns {EventEmitter} this
*/
on: function (events, handler) {
if (events === undefined) {
return;
}
if (handler === undefined) {
return;
}
var handlers = this.handlers;
each(splitStr(events), function (event) {
handlers[event] = handlers[event] || [];
handlers[event].push(handler);
});
return this;
},
/**
* unbind event, leave emit blank to remove all handlers
* @param {String} events
* @param {Function} [handler]
* @returns {EventEmitter} this
*/
off: function (events, handler) {
if (events === undefined) {
return;
}
var handlers = this.handlers;
each(splitStr(events), function (event) {
if (!handler) {
delete handlers[event];
} else {
handlers[event] &&
handlers[event].splice(
inArray(handlers[event], handler),
1
);
}
});
return this;
},
/**
* emit event to the listeners
* @param {String} event
* @param {Object} data
*/
emit: function (event, data) {
// we also want to trigger dom events
if (this.options.domEvents) {
triggerDomEvent(event, data);
}
// no handlers, so skip it all
var handlers =
this.handlers[event] &&
this.handlers[event].slice();
if (!handlers || !handlers.length) {
return;
}
data.type = event;
data.preventDefault = function () {
data.srcEvent.preventDefault();
};
var i = 0;
while (i < handlers.length) {
handlers[i](data);
i++;
}
},
/**
* destroy the manager and unbinds all events
* it doesn't unbind dom events, that is the user own responsibility
*/
destroy: function () {
this.element && toggleCssProps(this, false);
this.handlers = {};
this.session = {};
this.input.destroy();
this.element = null;
},
};
/**
* add/remove the css properties as defined in manager.options.cssProps
* @param {Manager} manager
* @param {Boolean} add
*/
function toggleCssProps(manager, add) {
var element = manager.element;
if (!element.style) {
return;
}
var prop;
each(manager.options.cssProps, function (value, name) {
prop = prefixed(element.style, name);
if (add) {
manager.oldCssProps[prop] = element.style[prop];
element.style[prop] = value;
} else {
element.style[prop] =
manager.oldCssProps[prop] || "";
}
});
if (!add) {
manager.oldCssProps = {};
}
}
/**
* trigger dom event
* @param {String} event
* @param {Object} data
*/
function triggerDomEvent(event, data) {
var gestureEvent = document.createEvent("Event");
gestureEvent.initEvent(event, true, true);
gestureEvent.gesture = data;
data.target.dispatchEvent(gestureEvent);
}
assign(Hammer, {
INPUT_START: INPUT_START,
INPUT_MOVE: INPUT_MOVE,
INPUT_END: INPUT_END,
INPUT_CANCEL: INPUT_CANCEL,
STATE_POSSIBLE: STATE_POSSIBLE,
STATE_BEGAN: STATE_BEGAN,
STATE_CHANGED: STATE_CHANGED,
STATE_ENDED: STATE_ENDED,
STATE_RECOGNIZED: STATE_RECOGNIZED,
STATE_CANCELLED: STATE_CANCELLED,
STATE_FAILED: STATE_FAILED,
DIRECTION_NONE: DIRECTION_NONE,
DIRECTION_LEFT: DIRECTION_LEFT,
DIRECTION_RIGHT: DIRECTION_RIGHT,
DIRECTION_UP: DIRECTION_UP,
DIRECTION_DOWN: DIRECTION_DOWN,
DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,
DIRECTION_VERTICAL: DIRECTION_VERTICAL,
DIRECTION_ALL: DIRECTION_ALL,
Manager: Manager,
Input: Input,
TouchAction: TouchAction,
TouchInput: TouchInput,
MouseInput: MouseInput,
PointerEventInput: PointerEventInput,
TouchMouseInput: TouchMouseInput,
SingleTouchInput: SingleTouchInput,
Recognizer: Recognizer,
AttrRecognizer: AttrRecognizer,
Tap: TapRecognizer,
Pan: PanRecognizer,
Swipe: SwipeRecognizer,
Pinch: PinchRecognizer,
Rotate: RotateRecognizer,
Press: PressRecognizer,
on: addEventListeners,
off: removeEventListeners,
each: each,
merge: merge,
extend: extend,
assign: assign,
inherit: inherit,
bindFn: bindFn,
prefixed: prefixed,
});
// this prevents errors when Hammer is loaded in the presence of an AMD
// style loader but by script tag, not by the loader.
var freeGlobal =
typeof window !== "undefined"
? window
: typeof self !== "undefined"
? self
: {}; // jshint ignore:line
freeGlobal.Hammer = Hammer;
if (true) {
!((__WEBPACK_AMD_DEFINE_RESULT__ = function () {
return Hammer;
}.call(exports, __webpack_require__, exports, module)),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined &&
(module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
}
})(window, document, "Hammer");
/***/
},
/***/ 3454: /***/ function (
module,
__unused_webpack_exports,
__webpack_require__
) {
"use strict";
var ref, ref1;
module.exports =
((ref = __webpack_require__.g.process) === null ||
ref === void 0
? void 0
: ref.env) &&
typeof ((ref1 = __webpack_require__.g.process) === null ||
ref1 === void 0
? void 0
: ref1.env) === "object"
? __webpack_require__.g.process
: __webpack_require__(7663);
//# sourceMappingURL=process.js.map
/***/
},
/***/ 7663: /***/ function (module) {
var __dirname = "/";
(function () {
var e = {
162: function (e) {
var t = (e.exports = {});
var r;
var n;
function defaultSetTimout() {
throw new Error("setTimeout has not been defined");
}
function defaultClearTimeout() {
throw new Error(
"clearTimeout has not been defined"
);
}
(function () {
try {
if (typeof setTimeout === "function") {
r = setTimeout;
} else {
r = defaultSetTimout;
}
} catch (e) {
r = defaultSetTimout;
}
try {
if (typeof clearTimeout === "function") {
n = clearTimeout;
} else {
n = defaultClearTimeout;
}
} catch (e) {
n = defaultClearTimeout;
}
})();
function runTimeout(e) {
if (r === setTimeout) {
return setTimeout(e, 0);
}
if ((r === defaultSetTimout || !r) && setTimeout) {
r = setTimeout;
return setTimeout(e, 0);
}
try {
return r(e, 0);
} catch (t) {
try {
return r.call(null, e, 0);
} catch (t) {
return r.call(this, e, 0);
}
}
}
function runClearTimeout(e) {
if (n === clearTimeout) {
return clearTimeout(e);
}
if (
(n === defaultClearTimeout || !n) &&
clearTimeout
) {
n = clearTimeout;
return clearTimeout(e);
}
try {
return n(e);
} catch (t) {
try {
return n.call(null, e);
} catch (t) {
return n.call(this, e);
}
}
}
var i = [];
var o = false;
var u;
var a = -1;
function cleanUpNextTick() {
if (!o || !u) {
return;
}
o = false;
if (u.length) {
i = u.concat(i);
} else {
a = -1;
}
if (i.length) {
drainQueue();
}
}
function drainQueue() {
if (o) {
return;
}
var e = runTimeout(cleanUpNextTick);
o = true;
var t = i.length;
while (t) {
u = i;
i = [];
while (++a < t) {
if (u) {
u[a].run();
}
}
a = -1;
t = i.length;
}
u = null;
o = false;
runClearTimeout(e);
}
t.nextTick = function (e) {
var t = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var r = 1; r < arguments.length; r++) {
t[r - 1] = arguments[r];
}
}
i.push(new Item(e, t));
if (i.length === 1 && !o) {
runTimeout(drainQueue);
}
};
function Item(e, t) {
this.fun = e;
this.array = t;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
t.title = "browser";
t.browser = true;
t.env = {};
t.argv = [];
t.version = "";
t.versions = {};
function noop() {}
t.on = noop;
t.addListener = noop;
t.once = noop;
t.off = noop;
t.removeListener = noop;
t.removeAllListeners = noop;
t.emit = noop;
t.prependListener = noop;
t.prependOnceListener = noop;
t.listeners = function (e) {
return [];
};
t.binding = function (e) {
throw new Error("process.binding is not supported");
};
t.cwd = function () {
return "/";
};
t.chdir = function (e) {
throw new Error("process.chdir is not supported");
};
t.umask = function () {
return 0;
};
},
};
var t = {};
function __nccwpck_require__(r) {
var n = t[r];
if (n !== undefined) {
return n.exports;
}
var i = (t[r] = { exports: {} });
var o = true;
try {
e[r](i, i.exports, __nccwpck_require__);
o = false;
} finally {
if (o) delete t[r];
}
return i.exports;
}
if (typeof __nccwpck_require__ !== "undefined")
__nccwpck_require__.ab = __dirname + "/";
var r = __nccwpck_require__(162);
module.exports = r;
})();
/***/
},
/***/ 2703: /***/ function (
module,
__unused_webpack_exports,
__webpack_require__
) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ReactPropTypesSecret = __webpack_require__(414);
function emptyFunction() {}
function emptyFunctionWithReset() {}
emptyFunctionWithReset.resetWarningCache = emptyFunction;
module.exports = function () {
function shim(
props,
propName,
componentName,
location,
propFullName,
secret
) {
if (secret === ReactPropTypesSecret) {
// It is still safe when called from React.
return;
}
var err = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. " +
"Use PropTypes.checkPropTypes() to call them. " +
"Read more at http://fb.me/use-check-prop-types"
);
err.name = "Invariant Violation";
throw err;
}
shim.isRequired = shim;
function getShim() {
return shim;
}
// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
var ReactPropTypes = {
array: shim,
bigint: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
elementType: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim,
exact: getShim,
checkPropTypes: emptyFunctionWithReset,
resetWarningCache: emptyFunction,
};
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
/***/
},
/***/ 5697: /***/ function (
module,
__unused_webpack_exports,
__webpack_require__
) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
if (false) {
var throwOnDirectAccess, ReactIs;
} else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = __webpack_require__(2703)();
}
/***/
},
/***/ 414: /***/ function (module) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ReactPropTypesSecret =
"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
module.exports = ReactPropTypesSecret;
/***/
},
/***/ 6785: /***/ function (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
ZP: function () {
return /* reexport */ interactive_map;
},
}); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
// UNUSED EXPORTS: AttributionControl, BaseControl, CanvasOverlay, FlyToInterpolator, FullscreenControl, GeolocateControl, HTMLOverlay, InteractiveMap, Layer, LinearInterpolator, MapContext, MapController, Marker, NavigationControl, Popup, SVGOverlay, ScaleControl, Source, StaticMap, TRANSITION_EVENTS, TransitionInterpolator, WebMercatorViewport, _MapContext, _useMapControl, setRTLTextPlugin
function _extends() {
_extends =
Object.assign ||
function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (
Object.prototype.hasOwnProperty.call(
source,
key
)
) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
function _iterableToArray(iter) {
if (
(typeof Symbol !== "undefined" &&
iter[Symbol.iterator] != null) ||
iter["@@iterator"] != null
)
return Array.from(iter);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (
n === "Arguments" ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
)
return _arrayLikeToArray(o, minLen);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
throw new TypeError(
"Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function _toConsumableArray(arr) {
return (
_arrayWithoutHoles(arr) ||
_iterableToArray(arr) ||
_unsupportedIterableToArray(arr) ||
_nonIterableSpread()
);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true,
});
} else {
obj[key] = value;
}
return obj;
}
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(7294);
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
var prop_types = __webpack_require__(5697); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(arr, i) {
var _i =
arr == null
? null
: (typeof Symbol !== "undefined" &&
arr[Symbol.iterator]) ||
arr["@@iterator"];
if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _s, _e;
try {
for (
_i = _i.call(arr);
!(_n = (_s = _i.next()).done);
_n = true
) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
function _nonIterableRest() {
throw new TypeError(
"Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
function _slicedToArray(arr, i) {
return (
_arrayWithHoles(arr) ||
_iterableToArrayLimit(arr, i) ||
_unsupportedIterableToArray(arr, i) ||
_nonIterableRest()
);
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/common.js
/**
* Common utilities
* @module glMatrix
*/
// Configuration Constants
var EPSILON = 0.000001;
var ARRAY_TYPE =
typeof Float32Array !== "undefined" ? Float32Array : Array;
var RANDOM = Math.random;
/**
* Sets the type of array used when creating new vectors and matrices
*
* @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array
*/
function setMatrixArrayType(type) {
ARRAY_TYPE = type;
}
var degree = Math.PI / 180;
/**
* Convert Degree To Radian
*
* @param {Number} a Angle in Degrees
*/
function toRadian(a) {
return a * degree;
}
/**
* Tests whether or not the arguments have approximately the same value, within an absolute
* or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less
* than or equal to 1.0, and a relative tolerance is used for larger values)
*
* @param {Number} a The first number to test.
* @param {Number} b The second number to test.
* @returns {Boolean} True if the numbers are approximately equal, false otherwise.
*/
function equals(a, b) {
return (
Math.abs(a - b) <=
EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b))
);
}
if (!Math.hypot)
Math.hypot = function () {
var y = 0,
i = arguments.length;
while (i--) {
y += arguments[i] * arguments[i];
}
return Math.sqrt(y);
}; // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/vec4.js
/**
* 4 Dimensional Vector
* @module vec4
*/
/**
* Creates a new, empty vec4
*
* @returns {vec4} a new 4D vector
*/
function create() {
var out = new ARRAY_TYPE(4);
if (ARRAY_TYPE != Float32Array) {
out[0] = 0;
out[1] = 0;
out[2] = 0;
out[3] = 0;
}
return out;
}
/**
* Creates a new vec4 initialized with values from an existing vector
*
* @param {ReadonlyVec4} a vector to clone
* @returns {vec4} a new 4D vector
*/
function clone(a) {
var out = new glMatrix.ARRAY_TYPE(4);
out[0] = a[0];
out[1] = a[1];
out[2] = a[2];
out[3] = a[3];
return out;
}
/**
* Creates a new vec4 initialized with the given values
*
* @param {Number} x X component
* @param {Number} y Y component
* @param {Number} z Z component
* @param {Number} w W component
* @returns {vec4} a new 4D vector
*/
function fromValues(x, y, z, w) {
var out = new glMatrix.ARRAY_TYPE(4);
out[0] = x;
out[1] = y;
out[2] = z;
out[3] = w;
return out;
}
/**
* Copy the values from one vec4 to another
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the source vector
* @returns {vec4} out
*/
function copy(out, a) {
out[0] = a[0];
out[1] = a[1];
out[2] = a[2];
out[3] = a[3];
return out;
}
/**
* Set the components of a vec4 to the given values
*
* @param {vec4} out the receiving vector
* @param {Number} x X component
* @param {Number} y Y component
* @param {Number} z Z component
* @param {Number} w W component
* @returns {vec4} out
*/
function set(out, x, y, z, w) {
out[0] = x;
out[1] = y;
out[2] = z;
out[3] = w;
return out;
}
/**
* Adds two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
*/
function add(out, a, b) {
out[0] = a[0] + b[0];
out[1] = a[1] + b[1];
out[2] = a[2] + b[2];
out[3] = a[3] + b[3];
return out;
}
/**
* Subtracts vector b from vector a
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
*/
function subtract(out, a, b) {
out[0] = a[0] - b[0];
out[1] = a[1] - b[1];
out[2] = a[2] - b[2];
out[3] = a[3] - b[3];
return out;
}
/**
* Multiplies two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
*/
function multiply(out, a, b) {
out[0] = a[0] * b[0];
out[1] = a[1] * b[1];
out[2] = a[2] * b[2];
out[3] = a[3] * b[3];
return out;
}
/**
* Divides two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
*/
function divide(out, a, b) {
out[0] = a[0] / b[0];
out[1] = a[1] / b[1];
out[2] = a[2] / b[2];
out[3] = a[3] / b[3];
return out;
}
/**
* Math.ceil the components of a vec4
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a vector to ceil
* @returns {vec4} out
*/
function ceil(out, a) {
out[0] = Math.ceil(a[0]);
out[1] = Math.ceil(a[1]);
out[2] = Math.ceil(a[2]);
out[3] = Math.ceil(a[3]);
return out;
}
/**
* Math.floor the components of a vec4
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a vector to floor
* @returns {vec4} out
*/
function floor(out, a) {
out[0] = Math.floor(a[0]);
out[1] = Math.floor(a[1]);
out[2] = Math.floor(a[2]);
out[3] = Math.floor(a[3]);
return out;
}
/**
* Returns the minimum of two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
*/
function min(out, a, b) {
out[0] = Math.min(a[0], b[0]);
out[1] = Math.min(a[1], b[1]);
out[2] = Math.min(a[2], b[2]);
out[3] = Math.min(a[3], b[3]);
return out;
}
/**
* Returns the maximum of two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
*/
function max(out, a, b) {
out[0] = Math.max(a[0], b[0]);
out[1] = Math.max(a[1], b[1]);
out[2] = Math.max(a[2], b[2]);
out[3] = Math.max(a[3], b[3]);
return out;
}
/**
* Math.round the components of a vec4
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a vector to round
* @returns {vec4} out
*/
function round(out, a) {
out[0] = Math.round(a[0]);
out[1] = Math.round(a[1]);
out[2] = Math.round(a[2]);
out[3] = Math.round(a[3]);
return out;
}
/**
* Scales a vec4 by a scalar number
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the vector to scale
* @param {Number} b amount to scale the vector by
* @returns {vec4} out
*/
function scale(out, a, b) {
out[0] = a[0] * b;
out[1] = a[1] * b;
out[2] = a[2] * b;
out[3] = a[3] * b;
return out;
}
/**
* Adds two vec4's after scaling the second operand by a scalar value
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @param {Number} scale the amount to scale b by before adding
* @returns {vec4} out
*/
function scaleAndAdd(out, a, b, scale) {
out[0] = a[0] + b[0] * scale;
out[1] = a[1] + b[1] * scale;
out[2] = a[2] + b[2] * scale;
out[3] = a[3] + b[3] * scale;
return out;
}
/**
* Calculates the euclidian distance between two vec4's
*
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {Number} distance between a and b
*/
function distance(a, b) {
var x = b[0] - a[0];
var y = b[1] - a[1];
var z = b[2] - a[2];
var w = b[3] - a[3];
return Math.hypot(x, y, z, w);
}
/**
* Calculates the squared euclidian distance between two vec4's
*
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {Number} squared distance between a and b
*/
function squaredDistance(a, b) {
var x = b[0] - a[0];
var y = b[1] - a[1];
var z = b[2] - a[2];
var w = b[3] - a[3];
return x * x + y * y + z * z + w * w;
}
/**
* Calculates the length of a vec4
*
* @param {ReadonlyVec4} a vector to calculate length of
* @returns {Number} length of a
*/
function vec4_length(a) {
var x = a[0];
var y = a[1];
var z = a[2];
var w = a[3];
return Math.hypot(x, y, z, w);
}
/**
* Calculates the squared length of a vec4
*
* @param {ReadonlyVec4} a vector to calculate squared length of
* @returns {Number} squared length of a
*/
function squaredLength(a) {
var x = a[0];
var y = a[1];
var z = a[2];
var w = a[3];
return x * x + y * y + z * z + w * w;
}
/**
* Negates the components of a vec4
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a vector to negate
* @returns {vec4} out
*/
function negate(out, a) {
out[0] = -a[0];
out[1] = -a[1];
out[2] = -a[2];
out[3] = -a[3];
return out;
}
/**
* Returns the inverse of the components of a vec4
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a vector to invert
* @returns {vec4} out
*/
function inverse(out, a) {
out[0] = 1.0 / a[0];
out[1] = 1.0 / a[1];
out[2] = 1.0 / a[2];
out[3] = 1.0 / a[3];
return out;
}
/**
* Normalize a vec4
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a vector to normalize
* @returns {vec4} out
*/
function normalize(out, a) {
var x = a[0];
var y = a[1];
var z = a[2];
var w = a[3];
var len = x * x + y * y + z * z + w * w;
if (len > 0) {
len = 1 / Math.sqrt(len);
}
out[0] = x * len;
out[1] = y * len;
out[2] = z * len;
out[3] = w * len;
return out;
}
/**
* Calculates the dot product of two vec4's
*
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {Number} dot product of a and b
*/
function dot(a, b) {
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
}
/**
* Returns the cross-product of three vectors in a 4-dimensional space
*
* @param {ReadonlyVec4} result the receiving vector
* @param {ReadonlyVec4} U the first vector
* @param {ReadonlyVec4} V the second vector
* @param {ReadonlyVec4} W the third vector
* @returns {vec4} result
*/
function cross(out, u, v, w) {
var A = v[0] * w[1] - v[1] * w[0],
B = v[0] * w[2] - v[2] * w[0],
C = v[0] * w[3] - v[3] * w[0],
D = v[1] * w[2] - v[2] * w[1],
E = v[1] * w[3] - v[3] * w[1],
F = v[2] * w[3] - v[3] * w[2];
var G = u[0];
var H = u[1];
var I = u[2];
var J = u[3];
out[0] = H * F - I * E + J * D;
out[1] = -(G * F) + I * C - J * B;
out[2] = G * E - H * C + J * A;
out[3] = -(G * D) + H * B - I * A;
return out;
}
/**
* Performs a linear interpolation between two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
* @returns {vec4} out
*/
function lerp(out, a, b, t) {
var ax = a[0];
var ay = a[1];
var az = a[2];
var aw = a[3];
out[0] = ax + t * (b[0] - ax);
out[1] = ay + t * (b[1] - ay);
out[2] = az + t * (b[2] - az);
out[3] = aw + t * (b[3] - aw);
return out;
}
/**
* Generates a random vector with the given scale
*
* @param {vec4} out the receiving vector
* @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
* @returns {vec4} out
*/
function random(out, scale) {
scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a
// Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.
// http://projecteuclid.org/euclid.aoms/1177692644;
var v1, v2, v3, v4;
var s1, s2;
do {
v1 = glMatrix.RANDOM() * 2 - 1;
v2 = glMatrix.RANDOM() * 2 - 1;
s1 = v1 * v1 + v2 * v2;
} while (s1 >= 1);
do {
v3 = glMatrix.RANDOM() * 2 - 1;
v4 = glMatrix.RANDOM() * 2 - 1;
s2 = v3 * v3 + v4 * v4;
} while (s2 >= 1);
var d = Math.sqrt((1 - s1) / s2);
out[0] = scale * v1;
out[1] = scale * v2;
out[2] = scale * v3 * d;
out[3] = scale * v4 * d;
return out;
}
/**
* Transforms the vec4 with a mat4.
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the vector to transform
* @param {ReadonlyMat4} m matrix to transform with
* @returns {vec4} out
*/
function transformMat4(out, a, m) {
var x = a[0],
y = a[1],
z = a[2],
w = a[3];
out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
return out;
}
/**
* Transforms the vec4 with a quat
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the vector to transform
* @param {ReadonlyQuat} q quaternion to transform with
* @returns {vec4} out
*/
function transformQuat(out, a, q) {
var x = a[0],
y = a[1],
z = a[2];
var qx = q[0],
qy = q[1],
qz = q[2],
qw = q[3]; // calculate quat * vec
var ix = qw * x + qy * z - qz * y;
var iy = qw * y + qz * x - qx * z;
var iz = qw * z + qx * y - qy * x;
var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat
out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
out[3] = a[3];
return out;
}
/**
* Set the components of a vec4 to zero
*
* @param {vec4} out the receiving vector
* @returns {vec4} out
*/
function zero(out) {
out[0] = 0.0;
out[1] = 0.0;
out[2] = 0.0;
out[3] = 0.0;
return out;
}
/**
* Returns a string representation of a vector
*
* @param {ReadonlyVec4} a vector to represent as a string
* @returns {String} string representation of the vector
*/
function str(a) {
return (
"vec4(" +
a[0] +
", " +
a[1] +
", " +
a[2] +
", " +
a[3] +
")"
);
}
/**
* Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
*
* @param {ReadonlyVec4} a The first vector.
* @param {ReadonlyVec4} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
function exactEquals(a, b) {
return (
a[0] === b[0] &&
a[1] === b[1] &&
a[2] === b[2] &&
a[3] === b[3]
);
}
/**
* Returns whether or not the vectors have approximately the same elements in the same position.
*
* @param {ReadonlyVec4} a The first vector.
* @param {ReadonlyVec4} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
function vec4_equals(a, b) {
var a0 = a[0],
a1 = a[1],
a2 = a[2],
a3 = a[3];
var b0 = b[0],
b1 = b[1],
b2 = b[2],
b3 = b[3];
return (
Math.abs(a0 - b0) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&
Math.abs(a1 - b1) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&
Math.abs(a2 - b2) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a2), Math.abs(b2)) &&
Math.abs(a3 - b3) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a3), Math.abs(b3))
);
}
/**
* Alias for {@link vec4.subtract}
* @function
*/
var sub = /* unused pure expression or super */ null && subtract;
/**
* Alias for {@link vec4.multiply}
* @function
*/
var mul = /* unused pure expression or super */ null && multiply;
/**
* Alias for {@link vec4.divide}
* @function
*/
var div = /* unused pure expression or super */ null && divide;
/**
* Alias for {@link vec4.distance}
* @function
*/
var dist = /* unused pure expression or super */ null && distance;
/**
* Alias for {@link vec4.squaredDistance}
* @function
*/
var sqrDist =
/* unused pure expression or super */ null && squaredDistance;
/**
* Alias for {@link vec4.length}
* @function
*/
var len = /* unused pure expression or super */ null && vec4_length;
/**
* Alias for {@link vec4.squaredLength}
* @function
*/
var sqrLen =
/* unused pure expression or super */ null && squaredLength;
/**
* Perform some operation over an array of vec4s.
*
* @param {Array} a the array of vectors to iterate over
* @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
* @param {Number} offset Number of elements to skip at the beginning of the array
* @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
* @param {Function} fn Function to call for each vector in the array
* @param {Object} [arg] additional argument to pass to fn
* @returns {Array} a
* @function
*/
var forEach = (function () {
var vec = create();
return function (a, stride, offset, count, fn, arg) {
var i, l;
if (!stride) {
stride = 4;
}
if (!offset) {
offset = 0;
}
if (count) {
l = Math.min(count * stride + offset, a.length);
} else {
l = a.length;
}
for (i = offset; i < l; i += stride) {
vec[0] = a[i];
vec[1] = a[i + 1];
vec[2] = a[i + 2];
vec[3] = a[i + 3];
fn(vec, vec, arg);
a[i] = vec[0];
a[i + 1] = vec[1];
a[i + 2] = vec[2];
a[i + 3] = vec[3];
}
return a;
};
})(); // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/math-utils.js
function createMat4() {
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
}
function transformVector(matrix, vector) {
const result = transformMat4([], vector, matrix);
scale(result, result, 1 / result[3]);
return result;
}
function mod(value, divisor) {
const modulus = value % divisor;
return modulus < 0 ? divisor + modulus : modulus;
}
function math_utils_lerp(start, end, step) {
return step * end + (1 - step) * start;
}
function clamp(x, min, max) {
return x < min ? min : x > max ? max : x;
}
function ieLog2(x) {
return Math.log(x) * Math.LOG2E;
}
const log2 = Math.log2 || ieLog2; // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/mat4.js
//# sourceMappingURL=math-utils.js.map
/**
* 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.
* @module mat4
*/
/**
* Creates a new identity mat4
*
* @returns {mat4} a new 4x4 matrix
*/
function mat4_create() {
var out = new glMatrix.ARRAY_TYPE(16);
if (glMatrix.ARRAY_TYPE != Float32Array) {
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
}
out[0] = 1;
out[5] = 1;
out[10] = 1;
out[15] = 1;
return out;
}
/**
* Creates a new mat4 initialized with values from an existing matrix
*
* @param {ReadonlyMat4} a matrix to clone
* @returns {mat4} a new 4x4 matrix
*/
function mat4_clone(a) {
var out = new glMatrix.ARRAY_TYPE(16);
out[0] = a[0];
out[1] = a[1];
out[2] = a[2];
out[3] = a[3];
out[4] = a[4];
out[5] = a[5];
out[6] = a[6];
out[7] = a[7];
out[8] = a[8];
out[9] = a[9];
out[10] = a[10];
out[11] = a[11];
out[12] = a[12];
out[13] = a[13];
out[14] = a[14];
out[15] = a[15];
return out;
}
/**
* Copy the values from one mat4 to another
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the source matrix
* @returns {mat4} out
*/
function mat4_copy(out, a) {
out[0] = a[0];
out[1] = a[1];
out[2] = a[2];
out[3] = a[3];
out[4] = a[4];
out[5] = a[5];
out[6] = a[6];
out[7] = a[7];
out[8] = a[8];
out[9] = a[9];
out[10] = a[10];
out[11] = a[11];
out[12] = a[12];
out[13] = a[13];
out[14] = a[14];
out[15] = a[15];
return out;
}
/**
* Create a new mat4 with the given values
*
* @param {Number} m00 Component in column 0, row 0 position (index 0)
* @param {Number} m01 Component in column 0, row 1 position (index 1)
* @param {Number} m02 Component in column 0, row 2 position (index 2)
* @param {Number} m03 Component in column 0, row 3 position (index 3)
* @param {Number} m10 Component in column 1, row 0 position (index 4)
* @param {Number} m11 Component in column 1, row 1 position (index 5)
* @param {Number} m12 Component in column 1, row 2 position (index 6)
* @param {Number} m13 Component in column 1, row 3 position (index 7)
* @param {Number} m20 Component in column 2, row 0 position (index 8)
* @param {Number} m21 Component in column 2, row 1 position (index 9)
* @param {Number} m22 Component in column 2, row 2 position (index 10)
* @param {Number} m23 Component in column 2, row 3 position (index 11)
* @param {Number} m30 Component in column 3, row 0 position (index 12)
* @param {Number} m31 Component in column 3, row 1 position (index 13)
* @param {Number} m32 Component in column 3, row 2 position (index 14)
* @param {Number} m33 Component in column 3, row 3 position (index 15)
* @returns {mat4} A new mat4
*/
function mat4_fromValues(
m00,
m01,
m02,
m03,
m10,
m11,
m12,
m13,
m20,
m21,
m22,
m23,
m30,
m31,
m32,
m33
) {
var out = new glMatrix.ARRAY_TYPE(16);
out[0] = m00;
out[1] = m01;
out[2] = m02;
out[3] = m03;
out[4] = m10;
out[5] = m11;
out[6] = m12;
out[7] = m13;
out[8] = m20;
out[9] = m21;
out[10] = m22;
out[11] = m23;
out[12] = m30;
out[13] = m31;
out[14] = m32;
out[15] = m33;
return out;
}
/**
* Set the components of a mat4 to the given values
*
* @param {mat4} out the receiving matrix
* @param {Number} m00 Component in column 0, row 0 position (index 0)
* @param {Number} m01 Component in column 0, row 1 position (index 1)
* @param {Number} m02 Component in column 0, row 2 position (index 2)
* @param {Number} m03 Component in column 0, row 3 position (index 3)
* @param {Number} m10 Component in column 1, row 0 position (index 4)
* @param {Number} m11 Component in column 1, row 1 position (index 5)
* @param {Number} m12 Component in column 1, row 2 position (index 6)
* @param {Number} m13 Component in column 1, row 3 position (index 7)
* @param {Number} m20 Component in column 2, row 0 position (index 8)
* @param {Number} m21 Component in column 2, row 1 position (index 9)
* @param {Number} m22 Component in column 2, row 2 position (index 10)
* @param {Number} m23 Component in column 2, row 3 position (index 11)
* @param {Number} m30 Component in column 3, row 0 position (index 12)
* @param {Number} m31 Component in column 3, row 1 position (index 13)
* @param {Number} m32 Component in column 3, row 2 position (index 14)
* @param {Number} m33 Component in column 3, row 3 position (index 15)
* @returns {mat4} out
*/
function mat4_set(
out,
m00,
m01,
m02,
m03,
m10,
m11,
m12,
m13,
m20,
m21,
m22,
m23,
m30,
m31,
m32,
m33
) {
out[0] = m00;
out[1] = m01;
out[2] = m02;
out[3] = m03;
out[4] = m10;
out[5] = m11;
out[6] = m12;
out[7] = m13;
out[8] = m20;
out[9] = m21;
out[10] = m22;
out[11] = m23;
out[12] = m30;
out[13] = m31;
out[14] = m32;
out[15] = m33;
return out;
}
/**
* Set a mat4 to the identity matrix
*
* @param {mat4} out the receiving matrix
* @returns {mat4} out
*/
function identity(out) {
out[0] = 1;
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = 1;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[10] = 1;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 1;
return out;
}
/**
* Transpose the values of a mat4
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the source matrix
* @returns {mat4} out
*/
function transpose(out, a) {
// If we are transposing ourselves we can skip a few steps but have to cache some values
if (out === a) {
var a01 = a[1],
a02 = a[2],
a03 = a[3];
var a12 = a[6],
a13 = a[7];
var a23 = a[11];
out[1] = a[4];
out[2] = a[8];
out[3] = a[12];
out[4] = a01;
out[6] = a[9];
out[7] = a[13];
out[8] = a02;
out[9] = a12;
out[11] = a[14];
out[12] = a03;
out[13] = a13;
out[14] = a23;
} else {
out[0] = a[0];
out[1] = a[4];
out[2] = a[8];
out[3] = a[12];
out[4] = a[1];
out[5] = a[5];
out[6] = a[9];
out[7] = a[13];
out[8] = a[2];
out[9] = a[6];
out[10] = a[10];
out[11] = a[14];
out[12] = a[3];
out[13] = a[7];
out[14] = a[11];
out[15] = a[15];
}
return out;
}
/**
* Inverts a mat4
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the source matrix
* @returns {mat4} out
*/
function invert(out, a) {
var a00 = a[0],
a01 = a[1],
a02 = a[2],
a03 = a[3];
var a10 = a[4],
a11 = a[5],
a12 = a[6],
a13 = a[7];
var a20 = a[8],
a21 = a[9],
a22 = a[10],
a23 = a[11];
var a30 = a[12],
a31 = a[13],
a32 = a[14],
a33 = a[15];
var b00 = a00 * a11 - a01 * a10;
var b01 = a00 * a12 - a02 * a10;
var b02 = a00 * a13 - a03 * a10;
var b03 = a01 * a12 - a02 * a11;
var b04 = a01 * a13 - a03 * a11;
var b05 = a02 * a13 - a03 * a12;
var b06 = a20 * a31 - a21 * a30;
var b07 = a20 * a32 - a22 * a30;
var b08 = a20 * a33 - a23 * a30;
var b09 = a21 * a32 - a22 * a31;
var b10 = a21 * a33 - a23 * a31;
var b11 = a22 * a33 - a23 * a32; // Calculate the determinant
var det =
b00 * b11 -
b01 * b10 +
b02 * b09 +
b03 * b08 -
b04 * b07 +
b05 * b06;
if (!det) {
return null;
}
det = 1.0 / det;
out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
return out;
}
/**
* Calculates the adjugate of a mat4
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the source matrix
* @returns {mat4} out
*/
function adjoint(out, a) {
var a00 = a[0],
a01 = a[1],
a02 = a[2],
a03 = a[3];
var a10 = a[4],
a11 = a[5],
a12 = a[6],
a13 = a[7];
var a20 = a[8],
a21 = a[9],
a22 = a[10],
a23 = a[11];
var a30 = a[12],
a31 = a[13],
a32 = a[14],
a33 = a[15];
out[0] =
a11 * (a22 * a33 - a23 * a32) -
a21 * (a12 * a33 - a13 * a32) +
a31 * (a12 * a23 - a13 * a22);
out[1] = -(
a01 * (a22 * a33 - a23 * a32) -
a21 * (a02 * a33 - a03 * a32) +
a31 * (a02 * a23 - a03 * a22)
);
out[2] =
a01 * (a12 * a33 - a13 * a32) -
a11 * (a02 * a33 - a03 * a32) +
a31 * (a02 * a13 - a03 * a12);
out[3] = -(
a01 * (a12 * a23 - a13 * a22) -
a11 * (a02 * a23 - a03 * a22) +
a21 * (a02 * a13 - a03 * a12)
);
out[4] = -(
a10 * (a22 * a33 - a23 * a32) -
a20 * (a12 * a33 - a13 * a32) +
a30 * (a12 * a23 - a13 * a22)
);
out[5] =
a00 * (a22 * a33 - a23 * a32) -
a20 * (a02 * a33 - a03 * a32) +
a30 * (a02 * a23 - a03 * a22);
out[6] = -(
a00 * (a12 * a33 - a13 * a32) -
a10 * (a02 * a33 - a03 * a32) +
a30 * (a02 * a13 - a03 * a12)
);
out[7] =
a00 * (a12 * a23 - a13 * a22) -
a10 * (a02 * a23 - a03 * a22) +
a20 * (a02 * a13 - a03 * a12);
out[8] =
a10 * (a21 * a33 - a23 * a31) -
a20 * (a11 * a33 - a13 * a31) +
a30 * (a11 * a23 - a13 * a21);
out[9] = -(
a00 * (a21 * a33 - a23 * a31) -
a20 * (a01 * a33 - a03 * a31) +
a30 * (a01 * a23 - a03 * a21)
);
out[10] =
a00 * (a11 * a33 - a13 * a31) -
a10 * (a01 * a33 - a03 * a31) +
a30 * (a01 * a13 - a03 * a11);
out[11] = -(
a00 * (a11 * a23 - a13 * a21) -
a10 * (a01 * a23 - a03 * a21) +
a20 * (a01 * a13 - a03 * a11)
);
out[12] = -(
a10 * (a21 * a32 - a22 * a31) -
a20 * (a11 * a32 - a12 * a31) +
a30 * (a11 * a22 - a12 * a21)
);
out[13] =
a00 * (a21 * a32 - a22 * a31) -
a20 * (a01 * a32 - a02 * a31) +
a30 * (a01 * a22 - a02 * a21);
out[14] = -(
a00 * (a11 * a32 - a12 * a31) -
a10 * (a01 * a32 - a02 * a31) +
a30 * (a01 * a12 - a02 * a11)
);
out[15] =
a00 * (a11 * a22 - a12 * a21) -
a10 * (a01 * a22 - a02 * a21) +
a20 * (a01 * a12 - a02 * a11);
return out;
}
/**
* Calculates the determinant of a mat4
*
* @param {ReadonlyMat4} a the source matrix
* @returns {Number} determinant of a
*/
function determinant(a) {
var a00 = a[0],
a01 = a[1],
a02 = a[2],
a03 = a[3];
var a10 = a[4],
a11 = a[5],
a12 = a[6],
a13 = a[7];
var a20 = a[8],
a21 = a[9],
a22 = a[10],
a23 = a[11];
var a30 = a[12],
a31 = a[13],
a32 = a[14],
a33 = a[15];
var b00 = a00 * a11 - a01 * a10;
var b01 = a00 * a12 - a02 * a10;
var b02 = a00 * a13 - a03 * a10;
var b03 = a01 * a12 - a02 * a11;
var b04 = a01 * a13 - a03 * a11;
var b05 = a02 * a13 - a03 * a12;
var b06 = a20 * a31 - a21 * a30;
var b07 = a20 * a32 - a22 * a30;
var b08 = a20 * a33 - a23 * a30;
var b09 = a21 * a32 - a22 * a31;
var b10 = a21 * a33 - a23 * a31;
var b11 = a22 * a33 - a23 * a32; // Calculate the determinant
return (
b00 * b11 -
b01 * b10 +
b02 * b09 +
b03 * b08 -
b04 * b07 +
b05 * b06
);
}
/**
* Multiplies two mat4s
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the first operand
* @param {ReadonlyMat4} b the second operand
* @returns {mat4} out
*/
function mat4_multiply(out, a, b) {
var a00 = a[0],
a01 = a[1],
a02 = a[2],
a03 = a[3];
var a10 = a[4],
a11 = a[5],
a12 = a[6],
a13 = a[7];
var a20 = a[8],
a21 = a[9],
a22 = a[10],
a23 = a[11];
var a30 = a[12],
a31 = a[13],
a32 = a[14],
a33 = a[15]; // Cache only the current line of the second matrix
var b0 = b[0],
b1 = b[1],
b2 = b[2],
b3 = b[3];
out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
b0 = b[4];
b1 = b[5];
b2 = b[6];
b3 = b[7];
out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
b0 = b[8];
b1 = b[9];
b2 = b[10];
b3 = b[11];
out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
b0 = b[12];
b1 = b[13];
b2 = b[14];
b3 = b[15];
out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;
out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;
out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;
out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
return out;
}
/**
* Translate a mat4 by the given vector
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to translate
* @param {ReadonlyVec3} v vector to translate by
* @returns {mat4} out
*/
function translate(out, a, v) {
var x = v[0],
y = v[1],
z = v[2];
var a00, a01, a02, a03;
var a10, a11, a12, a13;
var a20, a21, a22, a23;
if (a === out) {
out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
} else {
a00 = a[0];
a01 = a[1];
a02 = a[2];
a03 = a[3];
a10 = a[4];
a11 = a[5];
a12 = a[6];
a13 = a[7];
a20 = a[8];
a21 = a[9];
a22 = a[10];
a23 = a[11];
out[0] = a00;
out[1] = a01;
out[2] = a02;
out[3] = a03;
out[4] = a10;
out[5] = a11;
out[6] = a12;
out[7] = a13;
out[8] = a20;
out[9] = a21;
out[10] = a22;
out[11] = a23;
out[12] = a00 * x + a10 * y + a20 * z + a[12];
out[13] = a01 * x + a11 * y + a21 * z + a[13];
out[14] = a02 * x + a12 * y + a22 * z + a[14];
out[15] = a03 * x + a13 * y + a23 * z + a[15];
}
return out;
}
/**
* Scales the mat4 by the dimensions in the given vec3 not using vectorization
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to scale
* @param {ReadonlyVec3} v the vec3 to scale the matrix by
* @returns {mat4} out
**/
function mat4_scale(out, a, v) {
var x = v[0],
y = v[1],
z = v[2];
out[0] = a[0] * x;
out[1] = a[1] * x;
out[2] = a[2] * x;
out[3] = a[3] * x;
out[4] = a[4] * y;
out[5] = a[5] * y;
out[6] = a[6] * y;
out[7] = a[7] * y;
out[8] = a[8] * z;
out[9] = a[9] * z;
out[10] = a[10] * z;
out[11] = a[11] * z;
out[12] = a[12];
out[13] = a[13];
out[14] = a[14];
out[15] = a[15];
return out;
}
/**
* Rotates a mat4 by the given angle around the given axis
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to rotate
* @param {Number} rad the angle to rotate the matrix by
* @param {ReadonlyVec3} axis the axis to rotate around
* @returns {mat4} out
*/
function rotate(out, a, rad, axis) {
var x = axis[0],
y = axis[1],
z = axis[2];
var len = Math.hypot(x, y, z);
var s, c, t;
var a00, a01, a02, a03;
var a10, a11, a12, a13;
var a20, a21, a22, a23;
var b00, b01, b02;
var b10, b11, b12;
var b20, b21, b22;
if (len < glMatrix.EPSILON) {
return null;
}
len = 1 / len;
x *= len;
y *= len;
z *= len;
s = Math.sin(rad);
c = Math.cos(rad);
t = 1 - c;
a00 = a[0];
a01 = a[1];
a02 = a[2];
a03 = a[3];
a10 = a[4];
a11 = a[5];
a12 = a[6];
a13 = a[7];
a20 = a[8];
a21 = a[9];
a22 = a[10];
a23 = a[11]; // Construct the elements of the rotation matrix
b00 = x * x * t + c;
b01 = y * x * t + z * s;
b02 = z * x * t - y * s;
b10 = x * y * t - z * s;
b11 = y * y * t + c;
b12 = z * y * t + x * s;
b20 = x * z * t + y * s;
b21 = y * z * t - x * s;
b22 = z * z * t + c; // Perform rotation-specific matrix multiplication
out[0] = a00 * b00 + a10 * b01 + a20 * b02;
out[1] = a01 * b00 + a11 * b01 + a21 * b02;
out[2] = a02 * b00 + a12 * b01 + a22 * b02;
out[3] = a03 * b00 + a13 * b01 + a23 * b02;
out[4] = a00 * b10 + a10 * b11 + a20 * b12;
out[5] = a01 * b10 + a11 * b11 + a21 * b12;
out[6] = a02 * b10 + a12 * b11 + a22 * b12;
out[7] = a03 * b10 + a13 * b11 + a23 * b12;
out[8] = a00 * b20 + a10 * b21 + a20 * b22;
out[9] = a01 * b20 + a11 * b21 + a21 * b22;
out[10] = a02 * b20 + a12 * b21 + a22 * b22;
out[11] = a03 * b20 + a13 * b21 + a23 * b22;
if (a !== out) {
// If the source and destination differ, copy the unchanged last row
out[12] = a[12];
out[13] = a[13];
out[14] = a[14];
out[15] = a[15];
}
return out;
}
/**
* Rotates a matrix by the given angle around the X axis
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to rotate
* @param {Number} rad the angle to rotate the matrix by
* @returns {mat4} out
*/
function rotateX(out, a, rad) {
var s = Math.sin(rad);
var c = Math.cos(rad);
var a10 = a[4];
var a11 = a[5];
var a12 = a[6];
var a13 = a[7];
var a20 = a[8];
var a21 = a[9];
var a22 = a[10];
var a23 = a[11];
if (a !== out) {
// If the source and destination differ, copy the unchanged rows
out[0] = a[0];
out[1] = a[1];
out[2] = a[2];
out[3] = a[3];
out[12] = a[12];
out[13] = a[13];
out[14] = a[14];
out[15] = a[15];
} // Perform axis-specific matrix multiplication
out[4] = a10 * c + a20 * s;
out[5] = a11 * c + a21 * s;
out[6] = a12 * c + a22 * s;
out[7] = a13 * c + a23 * s;
out[8] = a20 * c - a10 * s;
out[9] = a21 * c - a11 * s;
out[10] = a22 * c - a12 * s;
out[11] = a23 * c - a13 * s;
return out;
}
/**
* Rotates a matrix by the given angle around the Y axis
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to rotate
* @param {Number} rad the angle to rotate the matrix by
* @returns {mat4} out
*/
function rotateY(out, a, rad) {
var s = Math.sin(rad);
var c = Math.cos(rad);
var a00 = a[0];
var a01 = a[1];
var a02 = a[2];
var a03 = a[3];
var a20 = a[8];
var a21 = a[9];
var a22 = a[10];
var a23 = a[11];
if (a !== out) {
// If the source and destination differ, copy the unchanged rows
out[4] = a[4];
out[5] = a[5];
out[6] = a[6];
out[7] = a[7];
out[12] = a[12];
out[13] = a[13];
out[14] = a[14];
out[15] = a[15];
} // Perform axis-specific matrix multiplication
out[0] = a00 * c - a20 * s;
out[1] = a01 * c - a21 * s;
out[2] = a02 * c - a22 * s;
out[3] = a03 * c - a23 * s;
out[8] = a00 * s + a20 * c;
out[9] = a01 * s + a21 * c;
out[10] = a02 * s + a22 * c;
out[11] = a03 * s + a23 * c;
return out;
}
/**
* Rotates a matrix by the given angle around the Z axis
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to rotate
* @param {Number} rad the angle to rotate the matrix by
* @returns {mat4} out
*/
function rotateZ(out, a, rad) {
var s = Math.sin(rad);
var c = Math.cos(rad);
var a00 = a[0];
var a01 = a[1];
var a02 = a[2];
var a03 = a[3];
var a10 = a[4];
var a11 = a[5];
var a12 = a[6];
var a13 = a[7];
if (a !== out) {
// If the source and destination differ, copy the unchanged last row
out[8] = a[8];
out[9] = a[9];
out[10] = a[10];
out[11] = a[11];
out[12] = a[12];
out[13] = a[13];
out[14] = a[14];
out[15] = a[15];
} // Perform axis-specific matrix multiplication
out[0] = a00 * c + a10 * s;
out[1] = a01 * c + a11 * s;
out[2] = a02 * c + a12 * s;
out[3] = a03 * c + a13 * s;
out[4] = a10 * c - a00 * s;
out[5] = a11 * c - a01 * s;
out[6] = a12 * c - a02 * s;
out[7] = a13 * c - a03 * s;
return out;
}
/**
* Creates a matrix from a vector translation
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.translate(dest, dest, vec);
*
* @param {mat4} out mat4 receiving operation result
* @param {ReadonlyVec3} v Translation vector
* @returns {mat4} out
*/
function fromTranslation(out, v) {
out[0] = 1;
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = 1;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[10] = 1;
out[11] = 0;
out[12] = v[0];
out[13] = v[1];
out[14] = v[2];
out[15] = 1;
return out;
}
/**
* Creates a matrix from a vector scaling
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.scale(dest, dest, vec);
*
* @param {mat4} out mat4 receiving operation result
* @param {ReadonlyVec3} v Scaling vector
* @returns {mat4} out
*/
function fromScaling(out, v) {
out[0] = v[0];
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = v[1];
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[10] = v[2];
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 1;
return out;
}
/**
* Creates a matrix from a given angle around a given axis
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.rotate(dest, dest, rad, axis);
*
* @param {mat4} out mat4 receiving operation result
* @param {Number} rad the angle to rotate the matrix by
* @param {ReadonlyVec3} axis the axis to rotate around
* @returns {mat4} out
*/
function fromRotation(out, rad, axis) {
var x = axis[0],
y = axis[1],
z = axis[2];
var len = Math.hypot(x, y, z);
var s, c, t;
if (len < glMatrix.EPSILON) {
return null;
}
len = 1 / len;
x *= len;
y *= len;
z *= len;
s = Math.sin(rad);
c = Math.cos(rad);
t = 1 - c; // Perform rotation-specific matrix multiplication
out[0] = x * x * t + c;
out[1] = y * x * t + z * s;
out[2] = z * x * t - y * s;
out[3] = 0;
out[4] = x * y * t - z * s;
out[5] = y * y * t + c;
out[6] = z * y * t + x * s;
out[7] = 0;
out[8] = x * z * t + y * s;
out[9] = y * z * t - x * s;
out[10] = z * z * t + c;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 1;
return out;
}
/**
* Creates a matrix from the given angle around the X axis
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.rotateX(dest, dest, rad);
*
* @param {mat4} out mat4 receiving operation result
* @param {Number} rad the angle to rotate the matrix by
* @returns {mat4} out
*/
function fromXRotation(out, rad) {
var s = Math.sin(rad);
var c = Math.cos(rad); // Perform axis-specific matrix multiplication
out[0] = 1;
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = c;
out[6] = s;
out[7] = 0;
out[8] = 0;
out[9] = -s;
out[10] = c;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 1;
return out;
}
/**
* Creates a matrix from the given angle around the Y axis
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.rotateY(dest, dest, rad);
*
* @param {mat4} out mat4 receiving operation result
* @param {Number} rad the angle to rotate the matrix by
* @returns {mat4} out
*/
function fromYRotation(out, rad) {
var s = Math.sin(rad);
var c = Math.cos(rad); // Perform axis-specific matrix multiplication
out[0] = c;
out[1] = 0;
out[2] = -s;
out[3] = 0;
out[4] = 0;
out[5] = 1;
out[6] = 0;
out[7] = 0;
out[8] = s;
out[9] = 0;
out[10] = c;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 1;
return out;
}
/**
* Creates a matrix from the given angle around the Z axis
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.rotateZ(dest, dest, rad);
*
* @param {mat4} out mat4 receiving operation result
* @param {Number} rad the angle to rotate the matrix by
* @returns {mat4} out
*/
function fromZRotation(out, rad) {
var s = Math.sin(rad);
var c = Math.cos(rad); // Perform axis-specific matrix multiplication
out[0] = c;
out[1] = s;
out[2] = 0;
out[3] = 0;
out[4] = -s;
out[5] = c;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[10] = 1;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 1;
return out;
}
/**
* Creates a matrix from a quaternion rotation and vector translation
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.translate(dest, vec);
* let quatMat = mat4.create();
* quat4.toMat4(quat, quatMat);
* mat4.multiply(dest, quatMat);
*
* @param {mat4} out mat4 receiving operation result
* @param {quat4} q Rotation quaternion
* @param {ReadonlyVec3} v Translation vector
* @returns {mat4} out
*/
function fromRotationTranslation(out, q, v) {
// Quaternion math
var x = q[0],
y = q[1],
z = q[2],
w = q[3];
var x2 = x + x;
var y2 = y + y;
var z2 = z + z;
var xx = x * x2;
var xy = x * y2;
var xz = x * z2;
var yy = y * y2;
var yz = y * z2;
var zz = z * z2;
var wx = w * x2;
var wy = w * y2;
var wz = w * z2;
out[0] = 1 - (yy + zz);
out[1] = xy + wz;
out[2] = xz - wy;
out[3] = 0;
out[4] = xy - wz;
out[5] = 1 - (xx + zz);
out[6] = yz + wx;
out[7] = 0;
out[8] = xz + wy;
out[9] = yz - wx;
out[10] = 1 - (xx + yy);
out[11] = 0;
out[12] = v[0];
out[13] = v[1];
out[14] = v[2];
out[15] = 1;
return out;
}
/**
* Creates a new mat4 from a dual quat.
*
* @param {mat4} out Matrix
* @param {ReadonlyQuat2} a Dual Quaternion
* @returns {mat4} mat4 receiving operation result
*/
function fromQuat2(out, a) {
var translation = new glMatrix.ARRAY_TYPE(3);
var bx = -a[0],
by = -a[1],
bz = -a[2],
bw = a[3],
ax = a[4],
ay = a[5],
az = a[6],
aw = a[7];
var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense
if (magnitude > 0) {
translation[0] =
((ax * bw + aw * bx + ay * bz - az * by) * 2) /
magnitude;
translation[1] =
((ay * bw + aw * by + az * bx - ax * bz) * 2) /
magnitude;
translation[2] =
((az * bw + aw * bz + ax * by - ay * bx) * 2) /
magnitude;
} else {
translation[0] =
(ax * bw + aw * bx + ay * bz - az * by) * 2;
translation[1] =
(ay * bw + aw * by + az * bx - ax * bz) * 2;
translation[2] =
(az * bw + aw * bz + ax * by - ay * bx) * 2;
}
fromRotationTranslation(out, a, translation);
return out;
}
/**
* Returns the translation vector component of a transformation
* matrix. If a matrix is built with fromRotationTranslation,
* the returned vector will be the same as the translation vector
* originally supplied.
* @param {vec3} out Vector to receive translation component
* @param {ReadonlyMat4} mat Matrix to be decomposed (input)
* @return {vec3} out
*/
function getTranslation(out, mat) {
out[0] = mat[12];
out[1] = mat[13];
out[2] = mat[14];
return out;
}
/**
* Returns the scaling factor component of a transformation
* matrix. If a matrix is built with fromRotationTranslationScale
* with a normalized Quaternion paramter, the returned vector will be
* the same as the scaling vector
* originally supplied.
* @param {vec3} out Vector to receive scaling factor component
* @param {ReadonlyMat4} mat Matrix to be decomposed (input)
* @return {vec3} out
*/
function getScaling(out, mat) {
var m11 = mat[0];
var m12 = mat[1];
var m13 = mat[2];
var m21 = mat[4];
var m22 = mat[5];
var m23 = mat[6];
var m31 = mat[8];
var m32 = mat[9];
var m33 = mat[10];
out[0] = Math.hypot(m11, m12, m13);
out[1] = Math.hypot(m21, m22, m23);
out[2] = Math.hypot(m31, m32, m33);
return out;
}
/**
* Returns a quaternion representing the rotational component
* of a transformation matrix. If a matrix is built with
* fromRotationTranslation, the returned quaternion will be the
* same as the quaternion originally supplied.
* @param {quat} out Quaternion to receive the rotation component
* @param {ReadonlyMat4} mat Matrix to be decomposed (input)
* @return {quat} out
*/
function getRotation(out, mat) {
var scaling = new glMatrix.ARRAY_TYPE(3);
getScaling(scaling, mat);
var is1 = 1 / scaling[0];
var is2 = 1 / scaling[1];
var is3 = 1 / scaling[2];
var sm11 = mat[0] * is1;
var sm12 = mat[1] * is2;
var sm13 = mat[2] * is3;
var sm21 = mat[4] * is1;
var sm22 = mat[5] * is2;
var sm23 = mat[6] * is3;
var sm31 = mat[8] * is1;
var sm32 = mat[9] * is2;
var sm33 = mat[10] * is3;
var trace = sm11 + sm22 + sm33;
var S = 0;
if (trace > 0) {
S = Math.sqrt(trace + 1.0) * 2;
out[3] = 0.25 * S;
out[0] = (sm23 - sm32) / S;
out[1] = (sm31 - sm13) / S;
out[2] = (sm12 - sm21) / S;
} else if (sm11 > sm22 && sm11 > sm33) {
S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;
out[3] = (sm23 - sm32) / S;
out[0] = 0.25 * S;
out[1] = (sm12 + sm21) / S;
out[2] = (sm31 + sm13) / S;
} else if (sm22 > sm33) {
S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;
out[3] = (sm31 - sm13) / S;
out[0] = (sm12 + sm21) / S;
out[1] = 0.25 * S;
out[2] = (sm23 + sm32) / S;
} else {
S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;
out[3] = (sm12 - sm21) / S;
out[0] = (sm31 + sm13) / S;
out[1] = (sm23 + sm32) / S;
out[2] = 0.25 * S;
}
return out;
}
/**
* Creates a matrix from a quaternion rotation, vector translation and vector scale
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.translate(dest, vec);
* let quatMat = mat4.create();
* quat4.toMat4(quat, quatMat);
* mat4.multiply(dest, quatMat);
* mat4.scale(dest, scale)
*
* @param {mat4} out mat4 receiving operation result
* @param {quat4} q Rotation quaternion
* @param {ReadonlyVec3} v Translation vector
* @param {ReadonlyVec3} s Scaling vector
* @returns {mat4} out
*/
function fromRotationTranslationScale(out, q, v, s) {
// Quaternion math
var x = q[0],
y = q[1],
z = q[2],
w = q[3];
var x2 = x + x;
var y2 = y + y;
var z2 = z + z;
var xx = x * x2;
var xy = x * y2;
var xz = x * z2;
var yy = y * y2;
var yz = y * z2;
var zz = z * z2;
var wx = w * x2;
var wy = w * y2;
var wz = w * z2;
var sx = s[0];
var sy = s[1];
var sz = s[2];
out[0] = (1 - (yy + zz)) * sx;
out[1] = (xy + wz) * sx;
out[2] = (xz - wy) * sx;
out[3] = 0;
out[4] = (xy - wz) * sy;
out[5] = (1 - (xx + zz)) * sy;
out[6] = (yz + wx) * sy;
out[7] = 0;
out[8] = (xz + wy) * sz;
out[9] = (yz - wx) * sz;
out[10] = (1 - (xx + yy)) * sz;
out[11] = 0;
out[12] = v[0];
out[13] = v[1];
out[14] = v[2];
out[15] = 1;
return out;
}
/**
* Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin
* This is equivalent to (but much faster than):
*
* mat4.identity(dest);
* mat4.translate(dest, vec);
* mat4.translate(dest, origin);
* let quatMat = mat4.create();
* quat4.toMat4(quat, quatMat);
* mat4.multiply(dest, quatMat);
* mat4.scale(dest, scale)
* mat4.translate(dest, negativeOrigin);
*
* @param {mat4} out mat4 receiving operation result
* @param {quat4} q Rotation quaternion
* @param {ReadonlyVec3} v Translation vector
* @param {ReadonlyVec3} s Scaling vector
* @param {ReadonlyVec3} o The origin vector around which to scale and rotate
* @returns {mat4} out
*/
function fromRotationTranslationScaleOrigin(out, q, v, s, o) {
// Quaternion math
var x = q[0],
y = q[1],
z = q[2],
w = q[3];
var x2 = x + x;
var y2 = y + y;
var z2 = z + z;
var xx = x * x2;
var xy = x * y2;
var xz = x * z2;
var yy = y * y2;
var yz = y * z2;
var zz = z * z2;
var wx = w * x2;
var wy = w * y2;
var wz = w * z2;
var sx = s[0];
var sy = s[1];
var sz = s[2];
var ox = o[0];
var oy = o[1];
var oz = o[2];
var out0 = (1 - (yy + zz)) * sx;
var out1 = (xy + wz) * sx;
var out2 = (xz - wy) * sx;
var out4 = (xy - wz) * sy;
var out5 = (1 - (xx + zz)) * sy;
var out6 = (yz + wx) * sy;
var out8 = (xz + wy) * sz;
var out9 = (yz - wx) * sz;
var out10 = (1 - (xx + yy)) * sz;
out[0] = out0;
out[1] = out1;
out[2] = out2;
out[3] = 0;
out[4] = out4;
out[5] = out5;
out[6] = out6;
out[7] = 0;
out[8] = out8;
out[9] = out9;
out[10] = out10;
out[11] = 0;
out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);
out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);
out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);
out[15] = 1;
return out;
}
/**
* Calculates a 4x4 matrix from the given quaternion
*
* @param {mat4} out mat4 receiving operation result
* @param {ReadonlyQuat} q Quaternion to create matrix from
*
* @returns {mat4} out
*/
function fromQuat(out, q) {
var x = q[0],
y = q[1],
z = q[2],
w = q[3];
var x2 = x + x;
var y2 = y + y;
var z2 = z + z;
var xx = x * x2;
var yx = y * x2;
var yy = y * y2;
var zx = z * x2;
var zy = z * y2;
var zz = z * z2;
var wx = w * x2;
var wy = w * y2;
var wz = w * z2;
out[0] = 1 - yy - zz;
out[1] = yx + wz;
out[2] = zx - wy;
out[3] = 0;
out[4] = yx - wz;
out[5] = 1 - xx - zz;
out[6] = zy + wx;
out[7] = 0;
out[8] = zx + wy;
out[9] = zy - wx;
out[10] = 1 - xx - yy;
out[11] = 0;
out[12] = 0;
out[13] = 0;
out[14] = 0;
out[15] = 1;
return out;
}
/**
* Generates a frustum matrix with the given bounds
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {Number} left Left bound of the frustum
* @param {Number} right Right bound of the frustum
* @param {Number} bottom Bottom bound of the frustum
* @param {Number} top Top bound of the frustum
* @param {Number} near Near bound of the frustum
* @param {Number} far Far bound of the frustum
* @returns {mat4} out
*/
function frustum(out, left, right, bottom, top, near, far) {
var rl = 1 / (right - left);
var tb = 1 / (top - bottom);
var nf = 1 / (near - far);
out[0] = near * 2 * rl;
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = near * 2 * tb;
out[6] = 0;
out[7] = 0;
out[8] = (right + left) * rl;
out[9] = (top + bottom) * tb;
out[10] = (far + near) * nf;
out[11] = -1;
out[12] = 0;
out[13] = 0;
out[14] = far * near * 2 * nf;
out[15] = 0;
return out;
}
/**
* Generates a perspective projection matrix with the given bounds.
* Passing null/undefined/no value for far will generate infinite projection matrix.
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {number} fovy Vertical field of view in radians
* @param {number} aspect Aspect ratio. typically viewport width/height
* @param {number} near Near bound of the frustum
* @param {number} far Far bound of the frustum, can be null or Infinity
* @returns {mat4} out
*/
function perspective(out, fovy, aspect, near, far) {
var f = 1.0 / Math.tan(fovy / 2),
nf;
out[0] = f / aspect;
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = f;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[11] = -1;
out[12] = 0;
out[13] = 0;
out[15] = 0;
if (far != null && far !== Infinity) {
nf = 1 / (near - far);
out[10] = (far + near) * nf;
out[14] = 2 * far * near * nf;
} else {
out[10] = -1;
out[14] = -2 * near;
}
return out;
}
/**
* Generates a perspective projection matrix with the given field of view.
* This is primarily useful for generating projection matrices to be used
* with the still experiemental WebVR API.
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees
* @param {number} near Near bound of the frustum
* @param {number} far Far bound of the frustum
* @returns {mat4} out
*/
function perspectiveFromFieldOfView(out, fov, near, far) {
var upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0);
var downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0);
var leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0);
var rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0);
var xScale = 2.0 / (leftTan + rightTan);
var yScale = 2.0 / (upTan + downTan);
out[0] = xScale;
out[1] = 0.0;
out[2] = 0.0;
out[3] = 0.0;
out[4] = 0.0;
out[5] = yScale;
out[6] = 0.0;
out[7] = 0.0;
out[8] = -((leftTan - rightTan) * xScale * 0.5);
out[9] = (upTan - downTan) * yScale * 0.5;
out[10] = far / (near - far);
out[11] = -1.0;
out[12] = 0.0;
out[13] = 0.0;
out[14] = (far * near) / (near - far);
out[15] = 0.0;
return out;
}
/**
* Generates a orthogonal projection matrix with the given bounds
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {number} left Left bound of the frustum
* @param {number} right Right bound of the frustum
* @param {number} bottom Bottom bound of the frustum
* @param {number} top Top bound of the frustum
* @param {number} near Near bound of the frustum
* @param {number} far Far bound of the frustum
* @returns {mat4} out
*/
function ortho(out, left, right, bottom, top, near, far) {
var lr = 1 / (left - right);
var bt = 1 / (bottom - top);
var nf = 1 / (near - far);
out[0] = -2 * lr;
out[1] = 0;
out[2] = 0;
out[3] = 0;
out[4] = 0;
out[5] = -2 * bt;
out[6] = 0;
out[7] = 0;
out[8] = 0;
out[9] = 0;
out[10] = 2 * nf;
out[11] = 0;
out[12] = (left + right) * lr;
out[13] = (top + bottom) * bt;
out[14] = (far + near) * nf;
out[15] = 1;
return out;
}
/**
* Generates a look-at matrix with the given eye position, focal point, and up axis.
* If you want a matrix that actually makes an object look at another object, you should use targetTo instead.
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {ReadonlyVec3} eye Position of the viewer
* @param {ReadonlyVec3} center Point the viewer is looking at
* @param {ReadonlyVec3} up vec3 pointing up
* @returns {mat4} out
*/
function lookAt(out, eye, center, up) {
var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;
var eyex = eye[0];
var eyey = eye[1];
var eyez = eye[2];
var upx = up[0];
var upy = up[1];
var upz = up[2];
var centerx = center[0];
var centery = center[1];
var centerz = center[2];
if (
Math.abs(eyex - centerx) < glMatrix.EPSILON &&
Math.abs(eyey - centery) < glMatrix.EPSILON &&
Math.abs(eyez - centerz) < glMatrix.EPSILON
) {
return identity(out);
}
z0 = eyex - centerx;
z1 = eyey - centery;
z2 = eyez - centerz;
len = 1 / Math.hypot(z0, z1, z2);
z0 *= len;
z1 *= len;
z2 *= len;
x0 = upy * z2 - upz * z1;
x1 = upz * z0 - upx * z2;
x2 = upx * z1 - upy * z0;
len = Math.hypot(x0, x1, x2);
if (!len) {
x0 = 0;
x1 = 0;
x2 = 0;
} else {
len = 1 / len;
x0 *= len;
x1 *= len;
x2 *= len;
}
y0 = z1 * x2 - z2 * x1;
y1 = z2 * x0 - z0 * x2;
y2 = z0 * x1 - z1 * x0;
len = Math.hypot(y0, y1, y2);
if (!len) {
y0 = 0;
y1 = 0;
y2 = 0;
} else {
len = 1 / len;
y0 *= len;
y1 *= len;
y2 *= len;
}
out[0] = x0;
out[1] = y0;
out[2] = z0;
out[3] = 0;
out[4] = x1;
out[5] = y1;
out[6] = z1;
out[7] = 0;
out[8] = x2;
out[9] = y2;
out[10] = z2;
out[11] = 0;
out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
out[15] = 1;
return out;
}
/**
* Generates a matrix that makes something look at something else.
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {ReadonlyVec3} eye Position of the viewer
* @param {ReadonlyVec3} center Point the viewer is looking at
* @param {ReadonlyVec3} up vec3 pointing up
* @returns {mat4} out
*/
function targetTo(out, eye, target, up) {
var eyex = eye[0],
eyey = eye[1],
eyez = eye[2],
upx = up[0],
upy = up[1],
upz = up[2];
var z0 = eyex - target[0],
z1 = eyey - target[1],
z2 = eyez - target[2];
var len = z0 * z0 + z1 * z1 + z2 * z2;
if (len > 0) {
len = 1 / Math.sqrt(len);
z0 *= len;
z1 *= len;
z2 *= len;
}
var x0 = upy * z2 - upz * z1,
x1 = upz * z0 - upx * z2,
x2 = upx * z1 - upy * z0;
len = x0 * x0 + x1 * x1 + x2 * x2;
if (len > 0) {
len = 1 / Math.sqrt(len);
x0 *= len;
x1 *= len;
x2 *= len;
}
out[0] = x0;
out[1] = x1;
out[2] = x2;
out[3] = 0;
out[4] = z1 * x2 - z2 * x1;
out[5] = z2 * x0 - z0 * x2;
out[6] = z0 * x1 - z1 * x0;
out[7] = 0;
out[8] = z0;
out[9] = z1;
out[10] = z2;
out[11] = 0;
out[12] = eyex;
out[13] = eyey;
out[14] = eyez;
out[15] = 1;
return out;
}
/**
* Returns a string representation of a mat4
*
* @param {ReadonlyMat4} a matrix to represent as a string
* @returns {String} string representation of the matrix
*/
function mat4_str(a) {
return (
"mat4(" +
a[0] +
", " +
a[1] +
", " +
a[2] +
", " +
a[3] +
", " +
a[4] +
", " +
a[5] +
", " +
a[6] +
", " +
a[7] +
", " +
a[8] +
", " +
a[9] +
", " +
a[10] +
", " +
a[11] +
", " +
a[12] +
", " +
a[13] +
", " +
a[14] +
", " +
a[15] +
")"
);
}
/**
* Returns Frobenius norm of a mat4
*
* @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of
* @returns {Number} Frobenius norm
*/
function frob(a) {
return Math.hypot(
a[0],
a[1],
a[2],
a[3],
a[4],
a[5],
a[6],
a[7],
a[8],
a[9],
a[10],
a[11],
a[12],
a[13],
a[14],
a[15]
);
}
/**
* Adds two mat4's
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the first operand
* @param {ReadonlyMat4} b the second operand
* @returns {mat4} out
*/
function mat4_add(out, a, b) {
out[0] = a[0] + b[0];
out[1] = a[1] + b[1];
out[2] = a[2] + b[2];
out[3] = a[3] + b[3];
out[4] = a[4] + b[4];
out[5] = a[5] + b[5];
out[6] = a[6] + b[6];
out[7] = a[7] + b[7];
out[8] = a[8] + b[8];
out[9] = a[9] + b[9];
out[10] = a[10] + b[10];
out[11] = a[11] + b[11];
out[12] = a[12] + b[12];
out[13] = a[13] + b[13];
out[14] = a[14] + b[14];
out[15] = a[15] + b[15];
return out;
}
/**
* Subtracts matrix b from matrix a
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the first operand
* @param {ReadonlyMat4} b the second operand
* @returns {mat4} out
*/
function mat4_subtract(out, a, b) {
out[0] = a[0] - b[0];
out[1] = a[1] - b[1];
out[2] = a[2] - b[2];
out[3] = a[3] - b[3];
out[4] = a[4] - b[4];
out[5] = a[5] - b[5];
out[6] = a[6] - b[6];
out[7] = a[7] - b[7];
out[8] = a[8] - b[8];
out[9] = a[9] - b[9];
out[10] = a[10] - b[10];
out[11] = a[11] - b[11];
out[12] = a[12] - b[12];
out[13] = a[13] - b[13];
out[14] = a[14] - b[14];
out[15] = a[15] - b[15];
return out;
}
/**
* Multiply each element of the matrix by a scalar.
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to scale
* @param {Number} b amount to scale the matrix's elements by
* @returns {mat4} out
*/
function multiplyScalar(out, a, b) {
out[0] = a[0] * b;
out[1] = a[1] * b;
out[2] = a[2] * b;
out[3] = a[3] * b;
out[4] = a[4] * b;
out[5] = a[5] * b;
out[6] = a[6] * b;
out[7] = a[7] * b;
out[8] = a[8] * b;
out[9] = a[9] * b;
out[10] = a[10] * b;
out[11] = a[11] * b;
out[12] = a[12] * b;
out[13] = a[13] * b;
out[14] = a[14] * b;
out[15] = a[15] * b;
return out;
}
/**
* Adds two mat4's after multiplying each element of the second operand by a scalar value.
*
* @param {mat4} out the receiving vector
* @param {ReadonlyMat4} a the first operand
* @param {ReadonlyMat4} b the second operand
* @param {Number} scale the amount to scale b's elements by before adding
* @returns {mat4} out
*/
function multiplyScalarAndAdd(out, a, b, scale) {
out[0] = a[0] + b[0] * scale;
out[1] = a[1] + b[1] * scale;
out[2] = a[2] + b[2] * scale;
out[3] = a[3] + b[3] * scale;
out[4] = a[4] + b[4] * scale;
out[5] = a[5] + b[5] * scale;
out[6] = a[6] + b[6] * scale;
out[7] = a[7] + b[7] * scale;
out[8] = a[8] + b[8] * scale;
out[9] = a[9] + b[9] * scale;
out[10] = a[10] + b[10] * scale;
out[11] = a[11] + b[11] * scale;
out[12] = a[12] + b[12] * scale;
out[13] = a[13] + b[13] * scale;
out[14] = a[14] + b[14] * scale;
out[15] = a[15] + b[15] * scale;
return out;
}
/**
* Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
*
* @param {ReadonlyMat4} a The first matrix.
* @param {ReadonlyMat4} b The second matrix.
* @returns {Boolean} True if the matrices are equal, false otherwise.
*/
function mat4_exactEquals(a, b) {
return (
a[0] === b[0] &&
a[1] === b[1] &&
a[2] === b[2] &&
a[3] === b[3] &&
a[4] === b[4] &&
a[5] === b[5] &&
a[6] === b[6] &&
a[7] === b[7] &&
a[8] === b[8] &&
a[9] === b[9] &&
a[10] === b[10] &&
a[11] === b[11] &&
a[12] === b[12] &&
a[13] === b[13] &&
a[14] === b[14] &&
a[15] === b[15]
);
}
/**
* Returns whether or not the matrices have approximately the same elements in the same position.
*
* @param {ReadonlyMat4} a The first matrix.
* @param {ReadonlyMat4} b The second matrix.
* @returns {Boolean} True if the matrices are equal, false otherwise.
*/
function mat4_equals(a, b) {
var a0 = a[0],
a1 = a[1],
a2 = a[2],
a3 = a[3];
var a4 = a[4],
a5 = a[5],
a6 = a[6],
a7 = a[7];
var a8 = a[8],
a9 = a[9],
a10 = a[10],
a11 = a[11];
var a12 = a[12],
a13 = a[13],
a14 = a[14],
a15 = a[15];
var b0 = b[0],
b1 = b[1],
b2 = b[2],
b3 = b[3];
var b4 = b[4],
b5 = b[5],
b6 = b[6],
b7 = b[7];
var b8 = b[8],
b9 = b[9],
b10 = b[10],
b11 = b[11];
var b12 = b[12],
b13 = b[13],
b14 = b[14],
b15 = b[15];
return (
Math.abs(a0 - b0) <=
EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&
Math.abs(a1 - b1) <=
EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&
Math.abs(a2 - b2) <=
EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) &&
Math.abs(a3 - b3) <=
EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) &&
Math.abs(a4 - b4) <=
EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) &&
Math.abs(a5 - b5) <=
EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) &&
Math.abs(a6 - b6) <=
EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) &&
Math.abs(a7 - b7) <=
EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) &&
Math.abs(a8 - b8) <=
EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) &&
Math.abs(a9 - b9) <=
EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) &&
Math.abs(a10 - b10) <=
EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) &&
Math.abs(a11 - b11) <=
EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) &&
Math.abs(a12 - b12) <=
EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) &&
Math.abs(a13 - b13) <=
EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) &&
Math.abs(a14 - b14) <=
EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) &&
Math.abs(a15 - b15) <=
EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15))
);
}
/**
* Alias for {@link mat4.multiply}
* @function
*/
var mat4_mul =
/* unused pure expression or super */ null && mat4_multiply;
/**
* Alias for {@link mat4.subtract}
* @function
*/
var mat4_sub =
/* unused pure expression or super */ null && mat4_subtract; // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/vec2.js
/**
* 2 Dimensional Vector
* @module vec2
*/
/**
* Creates a new, empty vec2
*
* @returns {vec2} a new 2D vector
*/
function vec2_create() {
var out = new ARRAY_TYPE(2);
if (ARRAY_TYPE != Float32Array) {
out[0] = 0;
out[1] = 0;
}
return out;
}
/**
* Creates a new vec2 initialized with values from an existing vector
*
* @param {ReadonlyVec2} a vector to clone
* @returns {vec2} a new 2D vector
*/
function vec2_clone(a) {
var out = new glMatrix.ARRAY_TYPE(2);
out[0] = a[0];
out[1] = a[1];
return out;
}
/**
* Creates a new vec2 initialized with the given values
*
* @param {Number} x X component
* @param {Number} y Y component
* @returns {vec2} a new 2D vector
*/
function vec2_fromValues(x, y) {
var out = new glMatrix.ARRAY_TYPE(2);
out[0] = x;
out[1] = y;
return out;
}
/**
* Copy the values from one vec2 to another
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the source vector
* @returns {vec2} out
*/
function vec2_copy(out, a) {
out[0] = a[0];
out[1] = a[1];
return out;
}
/**
* Set the components of a vec2 to the given values
*
* @param {vec2} out the receiving vector
* @param {Number} x X component
* @param {Number} y Y component
* @returns {vec2} out
*/
function vec2_set(out, x, y) {
out[0] = x;
out[1] = y;
return out;
}
/**
* Adds two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
*/
function vec2_add(out, a, b) {
out[0] = a[0] + b[0];
out[1] = a[1] + b[1];
return out;
}
/**
* Subtracts vector b from vector a
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
*/
function vec2_subtract(out, a, b) {
out[0] = a[0] - b[0];
out[1] = a[1] - b[1];
return out;
}
/**
* Multiplies two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
*/
function vec2_multiply(out, a, b) {
out[0] = a[0] * b[0];
out[1] = a[1] * b[1];
return out;
}
/**
* Divides two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
*/
function vec2_divide(out, a, b) {
out[0] = a[0] / b[0];
out[1] = a[1] / b[1];
return out;
}
/**
* Math.ceil the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to ceil
* @returns {vec2} out
*/
function vec2_ceil(out, a) {
out[0] = Math.ceil(a[0]);
out[1] = Math.ceil(a[1]);
return out;
}
/**
* Math.floor the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to floor
* @returns {vec2} out
*/
function vec2_floor(out, a) {
out[0] = Math.floor(a[0]);
out[1] = Math.floor(a[1]);
return out;
}
/**
* Returns the minimum of two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
*/
function vec2_min(out, a, b) {
out[0] = Math.min(a[0], b[0]);
out[1] = Math.min(a[1], b[1]);
return out;
}
/**
* Returns the maximum of two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
*/
function vec2_max(out, a, b) {
out[0] = Math.max(a[0], b[0]);
out[1] = Math.max(a[1], b[1]);
return out;
}
/**
* Math.round the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to round
* @returns {vec2} out
*/
function vec2_round(out, a) {
out[0] = Math.round(a[0]);
out[1] = Math.round(a[1]);
return out;
}
/**
* Scales a vec2 by a scalar number
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to scale
* @param {Number} b amount to scale the vector by
* @returns {vec2} out
*/
function vec2_scale(out, a, b) {
out[0] = a[0] * b;
out[1] = a[1] * b;
return out;
}
/**
* Adds two vec2's after scaling the second operand by a scalar value
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {Number} scale the amount to scale b by before adding
* @returns {vec2} out
*/
function vec2_scaleAndAdd(out, a, b, scale) {
out[0] = a[0] + b[0] * scale;
out[1] = a[1] + b[1] * scale;
return out;
}
/**
* Calculates the euclidian distance between two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {Number} distance between a and b
*/
function vec2_distance(a, b) {
var x = b[0] - a[0],
y = b[1] - a[1];
return Math.hypot(x, y);
}
/**
* Calculates the squared euclidian distance between two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {Number} squared distance between a and b
*/
function vec2_squaredDistance(a, b) {
var x = b[0] - a[0],
y = b[1] - a[1];
return x * x + y * y;
}
/**
* Calculates the length of a vec2
*
* @param {ReadonlyVec2} a vector to calculate length of
* @returns {Number} length of a
*/
function vec2_length(a) {
var x = a[0],
y = a[1];
return Math.hypot(x, y);
}
/**
* Calculates the squared length of a vec2
*
* @param {ReadonlyVec2} a vector to calculate squared length of
* @returns {Number} squared length of a
*/
function vec2_squaredLength(a) {
var x = a[0],
y = a[1];
return x * x + y * y;
}
/**
* Negates the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to negate
* @returns {vec2} out
*/
function vec2_negate(out, a) {
out[0] = -a[0];
out[1] = -a[1];
return out;
}
/**
* Returns the inverse of the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to invert
* @returns {vec2} out
*/
function vec2_inverse(out, a) {
out[0] = 1.0 / a[0];
out[1] = 1.0 / a[1];
return out;
}
/**
* Normalize a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to normalize
* @returns {vec2} out
*/
function vec2_normalize(out, a) {
var x = a[0],
y = a[1];
var len = x * x + y * y;
if (len > 0) {
//TODO: evaluate use of glm_invsqrt here?
len = 1 / Math.sqrt(len);
}
out[0] = a[0] * len;
out[1] = a[1] * len;
return out;
}
/**
* Calculates the dot product of two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {Number} dot product of a and b
*/
function vec2_dot(a, b) {
return a[0] * b[0] + a[1] * b[1];
}
/**
* Computes the cross product of two vec2's
* Note that the cross product must by definition produce a 3D vector
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec3} out
*/
function vec2_cross(out, a, b) {
var z = a[0] * b[1] - a[1] * b[0];
out[0] = out[1] = 0;
out[2] = z;
return out;
}
/**
* Performs a linear interpolation between two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
* @returns {vec2} out
*/
function vec2_lerp(out, a, b, t) {
var ax = a[0],
ay = a[1];
out[0] = ax + t * (b[0] - ax);
out[1] = ay + t * (b[1] - ay);
return out;
}
/**
* Generates a random vector with the given scale
*
* @param {vec2} out the receiving vector
* @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
* @returns {vec2} out
*/
function vec2_random(out, scale) {
scale = scale || 1.0;
var r = glMatrix.RANDOM() * 2.0 * Math.PI;
out[0] = Math.cos(r) * scale;
out[1] = Math.sin(r) * scale;
return out;
}
/**
* Transforms the vec2 with a mat2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {ReadonlyMat2} m matrix to transform with
* @returns {vec2} out
*/
function transformMat2(out, a, m) {
var x = a[0],
y = a[1];
out[0] = m[0] * x + m[2] * y;
out[1] = m[1] * x + m[3] * y;
return out;
}
/**
* Transforms the vec2 with a mat2d
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {ReadonlyMat2d} m matrix to transform with
* @returns {vec2} out
*/
function transformMat2d(out, a, m) {
var x = a[0],
y = a[1];
out[0] = m[0] * x + m[2] * y + m[4];
out[1] = m[1] * x + m[3] * y + m[5];
return out;
}
/**
* Transforms the vec2 with a mat3
* 3rd vector component is implicitly '1'
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {ReadonlyMat3} m matrix to transform with
* @returns {vec2} out
*/
function transformMat3(out, a, m) {
var x = a[0],
y = a[1];
out[0] = m[0] * x + m[3] * y + m[6];
out[1] = m[1] * x + m[4] * y + m[7];
return out;
}
/**
* Transforms the vec2 with a mat4
* 3rd vector component is implicitly '0'
* 4th vector component is implicitly '1'
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {ReadonlyMat4} m matrix to transform with
* @returns {vec2} out
*/
function vec2_transformMat4(out, a, m) {
var x = a[0];
var y = a[1];
out[0] = m[0] * x + m[4] * y + m[12];
out[1] = m[1] * x + m[5] * y + m[13];
return out;
}
/**
* Rotate a 2D vector
* @param {vec2} out The receiving vec2
* @param {ReadonlyVec2} a The vec2 point to rotate
* @param {ReadonlyVec2} b The origin of the rotation
* @param {Number} rad The angle of rotation in radians
* @returns {vec2} out
*/
function vec2_rotate(out, a, b, rad) {
//Translate point to the origin
var p0 = a[0] - b[0],
p1 = a[1] - b[1],
sinC = Math.sin(rad),
cosC = Math.cos(rad); //perform rotation and translate to correct position
out[0] = p0 * cosC - p1 * sinC + b[0];
out[1] = p0 * sinC + p1 * cosC + b[1];
return out;
}
/**
* Get the angle between two 2D vectors
* @param {ReadonlyVec2} a The first operand
* @param {ReadonlyVec2} b The second operand
* @returns {Number} The angle in radians
*/
function angle(a, b) {
var x1 = a[0],
y1 = a[1],
x2 = b[0],
y2 = b[1],
// mag is the product of the magnitudes of a and b
mag =
Math.sqrt(x1 * x1 + y1 * y1) *
Math.sqrt(x2 * x2 + y2 * y2),
// mag &&.. short circuits if mag == 0
cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1
return Math.acos(Math.min(Math.max(cosine, -1), 1));
}
/**
* Set the components of a vec2 to zero
*
* @param {vec2} out the receiving vector
* @returns {vec2} out
*/
function vec2_zero(out) {
out[0] = 0.0;
out[1] = 0.0;
return out;
}
/**
* Returns a string representation of a vector
*
* @param {ReadonlyVec2} a vector to represent as a string
* @returns {String} string representation of the vector
*/
function vec2_str(a) {
return "vec2(" + a[0] + ", " + a[1] + ")";
}
/**
* Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
*
* @param {ReadonlyVec2} a The first vector.
* @param {ReadonlyVec2} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
function vec2_exactEquals(a, b) {
return a[0] === b[0] && a[1] === b[1];
}
/**
* Returns whether or not the vectors have approximately the same elements in the same position.
*
* @param {ReadonlyVec2} a The first vector.
* @param {ReadonlyVec2} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
function vec2_equals(a, b) {
var a0 = a[0],
a1 = a[1];
var b0 = b[0],
b1 = b[1];
return (
Math.abs(a0 - b0) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&
Math.abs(a1 - b1) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a1), Math.abs(b1))
);
}
/**
* Alias for {@link vec2.length}
* @function
*/
var vec2_len =
/* unused pure expression or super */ null && vec2_length;
/**
* Alias for {@link vec2.subtract}
* @function
*/
var vec2_sub = vec2_subtract;
/**
* Alias for {@link vec2.multiply}
* @function
*/
var vec2_mul =
/* unused pure expression or super */ null && vec2_multiply;
/**
* Alias for {@link vec2.divide}
* @function
*/
var vec2_div =
/* unused pure expression or super */ null && vec2_divide;
/**
* Alias for {@link vec2.distance}
* @function
*/
var vec2_dist =
/* unused pure expression or super */ null && vec2_distance;
/**
* Alias for {@link vec2.squaredDistance}
* @function
*/
var vec2_sqrDist =
/* unused pure expression or super */ null &&
vec2_squaredDistance;
/**
* Alias for {@link vec2.squaredLength}
* @function
*/
var vec2_sqrLen =
/* unused pure expression or super */ null &&
vec2_squaredLength;
/**
* Perform some operation over an array of vec2s.
*
* @param {Array} a the array of vectors to iterate over
* @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
* @param {Number} offset Number of elements to skip at the beginning of the array
* @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
* @param {Function} fn Function to call for each vector in the array
* @param {Object} [arg] additional argument to pass to fn
* @returns {Array} a
* @function
*/
var vec2_forEach = (function () {
var vec = vec2_create();
return function (a, stride, offset, count, fn, arg) {
var i, l;
if (!stride) {
stride = 2;
}
if (!offset) {
offset = 0;
}
if (count) {
l = Math.min(count * stride + offset, a.length);
} else {
l = a.length;
}
for (i = offset; i < l; i += stride) {
vec[0] = a[i];
vec[1] = a[i + 1];
fn(vec, vec, arg);
a[i] = vec[0];
a[i + 1] = vec[1];
}
return a;
};
})(); // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/vec3.js
/**
* 3 Dimensional Vector
* @module vec3
*/
/**
* Creates a new, empty vec3
*
* @returns {vec3} a new 3D vector
*/
function vec3_create() {
var out = new ARRAY_TYPE(3);
if (ARRAY_TYPE != Float32Array) {
out[0] = 0;
out[1] = 0;
out[2] = 0;
}
return out;
}
/**
* Creates a new vec3 initialized with values from an existing vector
*
* @param {ReadonlyVec3} a vector to clone
* @returns {vec3} a new 3D vector
*/
function vec3_clone(a) {
var out = new glMatrix.ARRAY_TYPE(3);
out[0] = a[0];
out[1] = a[1];
out[2] = a[2];
return out;
}
/**
* Calculates the length of a vec3
*
* @param {ReadonlyVec3} a vector to calculate length of
* @returns {Number} length of a
*/
function vec3_length(a) {
var x = a[0];
var y = a[1];
var z = a[2];
return Math.hypot(x, y, z);
}
/**
* Creates a new vec3 initialized with the given values
*
* @param {Number} x X component
* @param {Number} y Y component
* @param {Number} z Z component
* @returns {vec3} a new 3D vector
*/
function vec3_fromValues(x, y, z) {
var out = new glMatrix.ARRAY_TYPE(3);
out[0] = x;
out[1] = y;
out[2] = z;
return out;
}
/**
* Copy the values from one vec3 to another
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the source vector
* @returns {vec3} out
*/
function vec3_copy(out, a) {
out[0] = a[0];
out[1] = a[1];
out[2] = a[2];
return out;
}
/**
* Set the components of a vec3 to the given values
*
* @param {vec3} out the receiving vector
* @param {Number} x X component
* @param {Number} y Y component
* @param {Number} z Z component
* @returns {vec3} out
*/
function vec3_set(out, x, y, z) {
out[0] = x;
out[1] = y;
out[2] = z;
return out;
}
/**
* Adds two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
*/
function vec3_add(out, a, b) {
out[0] = a[0] + b[0];
out[1] = a[1] + b[1];
out[2] = a[2] + b[2];
return out;
}
/**
* Subtracts vector b from vector a
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
*/
function vec3_subtract(out, a, b) {
out[0] = a[0] - b[0];
out[1] = a[1] - b[1];
out[2] = a[2] - b[2];
return out;
}
/**
* Multiplies two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
*/
function vec3_multiply(out, a, b) {
out[0] = a[0] * b[0];
out[1] = a[1] * b[1];
out[2] = a[2] * b[2];
return out;
}
/**
* Divides two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
*/
function vec3_divide(out, a, b) {
out[0] = a[0] / b[0];
out[1] = a[1] / b[1];
out[2] = a[2] / b[2];
return out;
}
/**
* Math.ceil the components of a vec3
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a vector to ceil
* @returns {vec3} out
*/
function vec3_ceil(out, a) {
out[0] = Math.ceil(a[0]);
out[1] = Math.ceil(a[1]);
out[2] = Math.ceil(a[2]);
return out;
}
/**
* Math.floor the components of a vec3
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a vector to floor
* @returns {vec3} out
*/
function vec3_floor(out, a) {
out[0] = Math.floor(a[0]);
out[1] = Math.floor(a[1]);
out[2] = Math.floor(a[2]);
return out;
}
/**
* Returns the minimum of two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
*/
function vec3_min(out, a, b) {
out[0] = Math.min(a[0], b[0]);
out[1] = Math.min(a[1], b[1]);
out[2] = Math.min(a[2], b[2]);
return out;
}
/**
* Returns the maximum of two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
*/
function vec3_max(out, a, b) {
out[0] = Math.max(a[0], b[0]);
out[1] = Math.max(a[1], b[1]);
out[2] = Math.max(a[2], b[2]);
return out;
}
/**
* Math.round the components of a vec3
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a vector to round
* @returns {vec3} out
*/
function vec3_round(out, a) {
out[0] = Math.round(a[0]);
out[1] = Math.round(a[1]);
out[2] = Math.round(a[2]);
return out;
}
/**
* Scales a vec3 by a scalar number
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the vector to scale
* @param {Number} b amount to scale the vector by
* @returns {vec3} out
*/
function vec3_scale(out, a, b) {
out[0] = a[0] * b;
out[1] = a[1] * b;
out[2] = a[2] * b;
return out;
}
/**
* Adds two vec3's after scaling the second operand by a scalar value
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @param {Number} scale the amount to scale b by before adding
* @returns {vec3} out
*/
function vec3_scaleAndAdd(out, a, b, scale) {
out[0] = a[0] + b[0] * scale;
out[1] = a[1] + b[1] * scale;
out[2] = a[2] + b[2] * scale;
return out;
}
/**
* Calculates the euclidian distance between two vec3's
*
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {Number} distance between a and b
*/
function vec3_distance(a, b) {
var x = b[0] - a[0];
var y = b[1] - a[1];
var z = b[2] - a[2];
return Math.hypot(x, y, z);
}
/**
* Calculates the squared euclidian distance between two vec3's
*
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {Number} squared distance between a and b
*/
function vec3_squaredDistance(a, b) {
var x = b[0] - a[0];
var y = b[1] - a[1];
var z = b[2] - a[2];
return x * x + y * y + z * z;
}
/**
* Calculates the squared length of a vec3
*
* @param {ReadonlyVec3} a vector to calculate squared length of
* @returns {Number} squared length of a
*/
function vec3_squaredLength(a) {
var x = a[0];
var y = a[1];
var z = a[2];
return x * x + y * y + z * z;
}
/**
* Negates the components of a vec3
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a vector to negate
* @returns {vec3} out
*/
function vec3_negate(out, a) {
out[0] = -a[0];
out[1] = -a[1];
out[2] = -a[2];
return out;
}
/**
* Returns the inverse of the components of a vec3
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a vector to invert
* @returns {vec3} out
*/
function vec3_inverse(out, a) {
out[0] = 1.0 / a[0];
out[1] = 1.0 / a[1];
out[2] = 1.0 / a[2];
return out;
}
/**
* Normalize a vec3
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a vector to normalize
* @returns {vec3} out
*/
function vec3_normalize(out, a) {
var x = a[0];
var y = a[1];
var z = a[2];
var len = x * x + y * y + z * z;
if (len > 0) {
//TODO: evaluate use of glm_invsqrt here?
len = 1 / Math.sqrt(len);
}
out[0] = a[0] * len;
out[1] = a[1] * len;
out[2] = a[2] * len;
return out;
}
/**
* Calculates the dot product of two vec3's
*
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {Number} dot product of a and b
*/
function vec3_dot(a, b) {
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}
/**
* Computes the cross product of two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
*/
function vec3_cross(out, a, b) {
var ax = a[0],
ay = a[1],
az = a[2];
var bx = b[0],
by = b[1],
bz = b[2];
out[0] = ay * bz - az * by;
out[1] = az * bx - ax * bz;
out[2] = ax * by - ay * bx;
return out;
}
/**
* Performs a linear interpolation between two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
* @returns {vec3} out
*/
function vec3_lerp(out, a, b, t) {
var ax = a[0];
var ay = a[1];
var az = a[2];
out[0] = ax + t * (b[0] - ax);
out[1] = ay + t * (b[1] - ay);
out[2] = az + t * (b[2] - az);
return out;
}
/**
* Performs a hermite interpolation with two control points
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @param {ReadonlyVec3} c the third operand
* @param {ReadonlyVec3} d the fourth operand
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
* @returns {vec3} out
*/
function hermite(out, a, b, c, d, t) {
var factorTimes2 = t * t;
var factor1 = factorTimes2 * (2 * t - 3) + 1;
var factor2 = factorTimes2 * (t - 2) + t;
var factor3 = factorTimes2 * (t - 1);
var factor4 = factorTimes2 * (3 - 2 * t);
out[0] =
a[0] * factor1 +
b[0] * factor2 +
c[0] * factor3 +
d[0] * factor4;
out[1] =
a[1] * factor1 +
b[1] * factor2 +
c[1] * factor3 +
d[1] * factor4;
out[2] =
a[2] * factor1 +
b[2] * factor2 +
c[2] * factor3 +
d[2] * factor4;
return out;
}
/**
* Performs a bezier interpolation with two control points
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @param {ReadonlyVec3} c the third operand
* @param {ReadonlyVec3} d the fourth operand
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
* @returns {vec3} out
*/
function bezier(out, a, b, c, d, t) {
var inverseFactor = 1 - t;
var inverseFactorTimesTwo = inverseFactor * inverseFactor;
var factorTimes2 = t * t;
var factor1 = inverseFactorTimesTwo * inverseFactor;
var factor2 = 3 * t * inverseFactorTimesTwo;
var factor3 = 3 * factorTimes2 * inverseFactor;
var factor4 = factorTimes2 * t;
out[0] =
a[0] * factor1 +
b[0] * factor2 +
c[0] * factor3 +
d[0] * factor4;
out[1] =
a[1] * factor1 +
b[1] * factor2 +
c[1] * factor3 +
d[1] * factor4;
out[2] =
a[2] * factor1 +
b[2] * factor2 +
c[2] * factor3 +
d[2] * factor4;
return out;
}
/**
* Generates a random vector with the given scale
*
* @param {vec3} out the receiving vector
* @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
* @returns {vec3} out
*/
function vec3_random(out, scale) {
scale = scale || 1.0;
var r = glMatrix.RANDOM() * 2.0 * Math.PI;
var z = glMatrix.RANDOM() * 2.0 - 1.0;
var zScale = Math.sqrt(1.0 - z * z) * scale;
out[0] = Math.cos(r) * zScale;
out[1] = Math.sin(r) * zScale;
out[2] = z * scale;
return out;
}
/**
* Transforms the vec3 with a mat4.
* 4th vector component is implicitly '1'
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the vector to transform
* @param {ReadonlyMat4} m matrix to transform with
* @returns {vec3} out
*/
function vec3_transformMat4(out, a, m) {
var x = a[0],
y = a[1],
z = a[2];
var w = m[3] * x + m[7] * y + m[11] * z + m[15];
w = w || 1.0;
out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
return out;
}
/**
* Transforms the vec3 with a mat3.
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the vector to transform
* @param {ReadonlyMat3} m the 3x3 matrix to transform with
* @returns {vec3} out
*/
function vec3_transformMat3(out, a, m) {
var x = a[0],
y = a[1],
z = a[2];
out[0] = x * m[0] + y * m[3] + z * m[6];
out[1] = x * m[1] + y * m[4] + z * m[7];
out[2] = x * m[2] + y * m[5] + z * m[8];
return out;
}
/**
* Transforms the vec3 with a quat
* Can also be used for dual quaternions. (Multiply it with the real part)
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the vector to transform
* @param {ReadonlyQuat} q quaternion to transform with
* @returns {vec3} out
*/
function vec3_transformQuat(out, a, q) {
// benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed
var qx = q[0],
qy = q[1],
qz = q[2],
qw = q[3];
var x = a[0],
y = a[1],
z = a[2]; // var qvec = [qx, qy, qz];
// var uv = vec3.cross([], qvec, a);
var uvx = qy * z - qz * y,
uvy = qz * x - qx * z,
uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);
var uuvx = qy * uvz - qz * uvy,
uuvy = qz * uvx - qx * uvz,
uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);
var w2 = qw * 2;
uvx *= w2;
uvy *= w2;
uvz *= w2; // vec3.scale(uuv, uuv, 2);
uuvx *= 2;
uuvy *= 2;
uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));
out[0] = x + uvx + uuvx;
out[1] = y + uvy + uuvy;
out[2] = z + uvz + uuvz;
return out;
}
/**
* Rotate a 3D vector around the x-axis
* @param {vec3} out The receiving vec3
* @param {ReadonlyVec3} a The vec3 point to rotate
* @param {ReadonlyVec3} b The origin of the rotation
* @param {Number} rad The angle of rotation in radians
* @returns {vec3} out
*/
function vec3_rotateX(out, a, b, rad) {
var p = [],
r = []; //Translate point to the origin
p[0] = a[0] - b[0];
p[1] = a[1] - b[1];
p[2] = a[2] - b[2]; //perform rotation
r[0] = p[0];
r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position
out[0] = r[0] + b[0];
out[1] = r[1] + b[1];
out[2] = r[2] + b[2];
return out;
}
/**
* Rotate a 3D vector around the y-axis
* @param {vec3} out The receiving vec3
* @param {ReadonlyVec3} a The vec3 point to rotate
* @param {ReadonlyVec3} b The origin of the rotation
* @param {Number} rad The angle of rotation in radians
* @returns {vec3} out
*/
function vec3_rotateY(out, a, b, rad) {
var p = [],
r = []; //Translate point to the origin
p[0] = a[0] - b[0];
p[1] = a[1] - b[1];
p[2] = a[2] - b[2]; //perform rotation
r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
r[1] = p[1];
r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position
out[0] = r[0] + b[0];
out[1] = r[1] + b[1];
out[2] = r[2] + b[2];
return out;
}
/**
* Rotate a 3D vector around the z-axis
* @param {vec3} out The receiving vec3
* @param {ReadonlyVec3} a The vec3 point to rotate
* @param {ReadonlyVec3} b The origin of the rotation
* @param {Number} rad The angle of rotation in radians
* @returns {vec3} out
*/
function vec3_rotateZ(out, a, b, rad) {
var p = [],
r = []; //Translate point to the origin
p[0] = a[0] - b[0];
p[1] = a[1] - b[1];
p[2] = a[2] - b[2]; //perform rotation
r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
r[2] = p[2]; //translate to correct position
out[0] = r[0] + b[0];
out[1] = r[1] + b[1];
out[2] = r[2] + b[2];
return out;
}
/**
* Get the angle between two 3D vectors
* @param {ReadonlyVec3} a The first operand
* @param {ReadonlyVec3} b The second operand
* @returns {Number} The angle in radians
*/
function vec3_angle(a, b) {
var ax = a[0],
ay = a[1],
az = a[2],
bx = b[0],
by = b[1],
bz = b[2],
mag1 = Math.sqrt(ax * ax + ay * ay + az * az),
mag2 = Math.sqrt(bx * bx + by * by + bz * bz),
mag = mag1 * mag2,
cosine = mag && vec3_dot(a, b) / mag;
return Math.acos(Math.min(Math.max(cosine, -1), 1));
}
/**
* Set the components of a vec3 to zero
*
* @param {vec3} out the receiving vector
* @returns {vec3} out
*/
function vec3_zero(out) {
out[0] = 0.0;
out[1] = 0.0;
out[2] = 0.0;
return out;
}
/**
* Returns a string representation of a vector
*
* @param {ReadonlyVec3} a vector to represent as a string
* @returns {String} string representation of the vector
*/
function vec3_str(a) {
return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
}
/**
* Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
*
* @param {ReadonlyVec3} a The first vector.
* @param {ReadonlyVec3} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
function vec3_exactEquals(a, b) {
return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];
}
/**
* Returns whether or not the vectors have approximately the same elements in the same position.
*
* @param {ReadonlyVec3} a The first vector.
* @param {ReadonlyVec3} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
function vec3_equals(a, b) {
var a0 = a[0],
a1 = a[1],
a2 = a[2];
var b0 = b[0],
b1 = b[1],
b2 = b[2];
return (
Math.abs(a0 - b0) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&
Math.abs(a1 - b1) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&
Math.abs(a2 - b2) <=
glMatrix.EPSILON *
Math.max(1.0, Math.abs(a2), Math.abs(b2))
);
}
/**
* Alias for {@link vec3.subtract}
* @function
*/
var vec3_sub =
/* unused pure expression or super */ null && vec3_subtract;
/**
* Alias for {@link vec3.multiply}
* @function
*/
var vec3_mul = vec3_multiply;
/**
* Alias for {@link vec3.divide}
* @function
*/
var vec3_div =
/* unused pure expression or super */ null && vec3_divide;
/**
* Alias for {@link vec3.distance}
* @function
*/
var vec3_dist =
/* unused pure expression or super */ null && vec3_distance;
/**
* Alias for {@link vec3.squaredDistance}
* @function
*/
var vec3_sqrDist =
/* unused pure expression or super */ null &&
vec3_squaredDistance;
/**
* Alias for {@link vec3.length}
* @function
*/
var vec3_len =
/* unused pure expression or super */ null && vec3_length;
/**
* Alias for {@link vec3.squaredLength}
* @function
*/
var vec3_sqrLen =
/* unused pure expression or super */ null &&
vec3_squaredLength;
/**
* Perform some operation over an array of vec3s.
*
* @param {Array} a the array of vectors to iterate over
* @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
* @param {Number} offset Number of elements to skip at the beginning of the array
* @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
* @param {Function} fn Function to call for each vector in the array
* @param {Object} [arg] additional argument to pass to fn
* @returns {Array} a
* @function
*/
var vec3_forEach = (function () {
var vec = vec3_create();
return function (a, stride, offset, count, fn, arg) {
var i, l;
if (!stride) {
stride = 3;
}
if (!offset) {
offset = 0;
}
if (count) {
l = Math.min(count * stride + offset, a.length);
} else {
l = a.length;
}
for (i = offset; i < l; i += stride) {
vec[0] = a[i];
vec[1] = a[i + 1];
vec[2] = a[i + 2];
fn(vec, vec, arg);
a[i] = vec[0];
a[i + 1] = vec[1];
a[i + 2] = vec[2];
}
return a;
};
})(); // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/assert.js
function assert_assert(condition, message) {
if (!condition) {
throw new Error(
message || "@math.gl/web-mercator: assertion failed."
);
}
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/web-mercator-utils.js
//# sourceMappingURL=assert.js.map
const PI = Math.PI;
const PI_4 = PI / 4;
const DEGREES_TO_RADIANS = PI / 180;
const RADIANS_TO_DEGREES = 180 / PI;
const TILE_SIZE = 512;
const EARTH_CIRCUMFERENCE = 40.03e6;
const MAX_LATITUDE = 85.051129;
const DEFAULT_ALTITUDE = 1.5;
function zoomToScale(zoom) {
return Math.pow(2, zoom);
}
function scaleToZoom(scale) {
return log2(scale);
}
function lngLatToWorld([lng, lat]) {
assert_assert(Number.isFinite(lng));
assert_assert(
Number.isFinite(lat) && lat >= -90 && lat <= 90,
"invalid latitude"
);
const lambda2 = lng * DEGREES_TO_RADIANS;
const phi2 = lat * DEGREES_TO_RADIANS;
const x = (TILE_SIZE * (lambda2 + PI)) / (2 * PI);
const y =
(TILE_SIZE * (PI + Math.log(Math.tan(PI_4 + phi2 * 0.5)))) /
(2 * PI);
return [x, y];
}
function worldToLngLat([x, y]) {
const lambda2 = (x / TILE_SIZE) * (2 * PI) - PI;
const phi2 =
2 *
(Math.atan(Math.exp((y / TILE_SIZE) * (2 * PI) - PI)) -
PI_4);
return [
lambda2 * RADIANS_TO_DEGREES,
phi2 * RADIANS_TO_DEGREES,
];
}
function getMeterZoom({ latitude }) {
assert(Number.isFinite(latitude));
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);
return scaleToZoom(EARTH_CIRCUMFERENCE * latCosine) - 9;
}
function getDistanceScales({
latitude,
longitude,
highPrecision = false,
}) {
assert_assert(
Number.isFinite(latitude) && Number.isFinite(longitude)
);
const result = {};
const worldSize = TILE_SIZE;
const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);
const unitsPerDegreeX = worldSize / 360;
const unitsPerDegreeY = unitsPerDegreeX / latCosine;
const altUnitsPerMeter =
worldSize / EARTH_CIRCUMFERENCE / latCosine;
result.unitsPerMeter = [
altUnitsPerMeter,
altUnitsPerMeter,
altUnitsPerMeter,
];
result.metersPerUnit = [
1 / altUnitsPerMeter,
1 / altUnitsPerMeter,
1 / altUnitsPerMeter,
];
result.unitsPerDegree = [
unitsPerDegreeX,
unitsPerDegreeY,
altUnitsPerMeter,
];
result.degreesPerUnit = [
1 / unitsPerDegreeX,
1 / unitsPerDegreeY,
1 / altUnitsPerMeter,
];
if (highPrecision) {
const latCosine2 =
(DEGREES_TO_RADIANS *
Math.tan(latitude * DEGREES_TO_RADIANS)) /
latCosine;
const unitsPerDegreeY2 = (unitsPerDegreeX * latCosine2) / 2;
const altUnitsPerDegree2 =
(worldSize / EARTH_CIRCUMFERENCE) * latCosine2;
const altUnitsPerMeter2 =
(altUnitsPerDegree2 / unitsPerDegreeY) *
altUnitsPerMeter;
result.unitsPerDegree2 = [
0,
unitsPerDegreeY2,
altUnitsPerDegree2,
];
result.unitsPerMeter2 = [
altUnitsPerMeter2,
0,
altUnitsPerMeter2,
];
}
return result;
}
function addMetersToLngLat(lngLatZ, xyz) {
const [longitude, latitude, z0] = lngLatZ;
const [x, y, z] = xyz;
const { unitsPerMeter, unitsPerMeter2 } = getDistanceScales({
longitude,
latitude,
highPrecision: true,
});
const worldspace = lngLatToWorld(lngLatZ);
worldspace[0] += x * (unitsPerMeter[0] + unitsPerMeter2[0] * y);
worldspace[1] += y * (unitsPerMeter[1] + unitsPerMeter2[1] * y);
const newLngLat = worldToLngLat(worldspace);
const newZ = (z0 || 0) + (z || 0);
return Number.isFinite(z0) || Number.isFinite(z)
? [newLngLat[0], newLngLat[1], newZ]
: newLngLat;
}
function getViewMatrix({
height,
pitch,
bearing,
altitude,
scale,
center = null,
}) {
const vm = createMat4();
translate(vm, vm, [0, 0, -altitude]);
rotateX(vm, vm, -pitch * DEGREES_TO_RADIANS);
rotateZ(vm, vm, bearing * DEGREES_TO_RADIANS);
scale /= height;
mat4_scale(vm, vm, [scale, scale, scale]);
if (center) {
translate(vm, vm, vec3_negate([], center));
}
return vm;
}
function getProjectionParameters({
width,
height,
fovy = altitudeToFovy(DEFAULT_ALTITUDE),
altitude,
pitch = 0,
nearZMultiplier = 1,
farZMultiplier = 1,
}) {
if (altitude !== undefined) {
fovy = altitudeToFovy(altitude);
}
const halfFov = 0.5 * fovy * DEGREES_TO_RADIANS;
const focalDistance = fovyToAltitude(fovy);
const pitchRadians = pitch * DEGREES_TO_RADIANS;
const topHalfSurfaceDistance =
(Math.sin(halfFov) * focalDistance) /
Math.sin(
Math.min(
Math.max(
Math.PI / 2 - pitchRadians - halfFov,
0.01
),
Math.PI - 0.01
)
);
const farZ =
Math.sin(pitchRadians) * topHalfSurfaceDistance +
focalDistance;
return {
fov: 2 * halfFov,
aspect: width / height,
focalDistance,
near: nearZMultiplier,
far: farZ * farZMultiplier,
};
}
function getProjectionMatrix({
width,
height,
pitch,
altitude,
fovy,
nearZMultiplier,
farZMultiplier,
}) {
const { fov, aspect, near, far } = getProjectionParameters({
width,
height,
altitude,
fovy,
pitch,
nearZMultiplier,
farZMultiplier,
});
const projectionMatrix = perspective(
[],
fov,
aspect,
near,
far
);
return projectionMatrix;
}
function altitudeToFovy(altitude) {
return 2 * Math.atan(0.5 / altitude) * RADIANS_TO_DEGREES;
}
function fovyToAltitude(fovy) {
return 0.5 / Math.tan(0.5 * fovy * DEGREES_TO_RADIANS);
}
function worldToPixels(xyz, pixelProjectionMatrix) {
const [x, y, z = 0] = xyz;
assert_assert(
Number.isFinite(x) &&
Number.isFinite(y) &&
Number.isFinite(z)
);
return transformVector(pixelProjectionMatrix, [x, y, z, 1]);
}
function pixelsToWorld(xyz, pixelUnprojectionMatrix, targetZ = 0) {
const [x, y, z] = xyz;
assert_assert(
Number.isFinite(x) && Number.isFinite(y),
"invalid pixel coordinate"
);
if (Number.isFinite(z)) {
const coord = transformVector(pixelUnprojectionMatrix, [
x,
y,
z,
1,
]);
return coord;
}
const coord0 = transformVector(pixelUnprojectionMatrix, [
x,
y,
0,
1,
]);
const coord1 = transformVector(pixelUnprojectionMatrix, [
x,
y,
1,
1,
]);
const z0 = coord0[2];
const z1 = coord1[2];
const t = z0 === z1 ? 0 : ((targetZ || 0) - z0) / (z1 - z0);
return vec2_lerp([], coord0, coord1, t);
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/fit-bounds.js
//# sourceMappingURL=web-mercator-utils.js.map
function fitBounds({
width,
height,
bounds,
minExtent = 0,
maxZoom = 24,
padding = 0,
offset = [0, 0],
}) {
const [[west, south], [east, north]] = bounds;
if (Number.isFinite(padding)) {
const p = padding;
padding = {
top: p,
bottom: p,
left: p,
right: p,
};
} else {
assert_assert(
Number.isFinite(padding.top) &&
Number.isFinite(padding.bottom) &&
Number.isFinite(padding.left) &&
Number.isFinite(padding.right)
);
}
const nw = lngLatToWorld([
west,
clamp(north, -MAX_LATITUDE, MAX_LATITUDE),
]);
const se = lngLatToWorld([
east,
clamp(south, -MAX_LATITUDE, MAX_LATITUDE),
]);
const size = [
Math.max(Math.abs(se[0] - nw[0]), minExtent),
Math.max(Math.abs(se[1] - nw[1]), minExtent),
];
const targetSize = [
width -
padding.left -
padding.right -
Math.abs(offset[0]) * 2,
height -
padding.top -
padding.bottom -
Math.abs(offset[1]) * 2,
];
assert_assert(targetSize[0] > 0 && targetSize[1] > 0);
const scaleX = targetSize[0] / size[0];
const scaleY = targetSize[1] / size[1];
const offsetX = (padding.right - padding.left) / 2 / scaleX;
const offsetY = (padding.bottom - padding.top) / 2 / scaleY;
const center = [
(se[0] + nw[0]) / 2 + offsetX,
(se[1] + nw[1]) / 2 + offsetY,
];
const centerLngLat = worldToLngLat(center);
const zoom = Math.min(
maxZoom,
log2(Math.abs(Math.min(scaleX, scaleY)))
);
assert_assert(Number.isFinite(zoom));
return {
longitude: centerLngLat[0],
latitude: centerLngLat[1],
zoom,
};
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/get-bounds.js
//# sourceMappingURL=fit-bounds.js.map
const get_bounds_DEGREES_TO_RADIANS = Math.PI / 180;
function getBounds(viewport, z = 0) {
const { width, height, unproject } = viewport;
const unprojectOps = {
targetZ: z,
};
const bottomLeft = unproject([0, height], unprojectOps);
const bottomRight = unproject([width, height], unprojectOps);
let topLeft;
let topRight;
const halfFov = viewport.fovy
? 0.5 * viewport.fovy * get_bounds_DEGREES_TO_RADIANS
: Math.atan(0.5 / viewport.altitude);
const angleToGround =
(90 - viewport.pitch) * get_bounds_DEGREES_TO_RADIANS;
if (halfFov > angleToGround - 0.01) {
topLeft = unprojectOnFarPlane(viewport, 0, z);
topRight = unprojectOnFarPlane(viewport, width, z);
} else {
topLeft = unproject([0, 0], unprojectOps);
topRight = unproject([width, 0], unprojectOps);
}
return [bottomLeft, bottomRight, topRight, topLeft];
}
function unprojectOnFarPlane(viewport, x, targetZ) {
const { pixelUnprojectionMatrix } = viewport;
const coord0 = transformVector(pixelUnprojectionMatrix, [
x,
0,
1,
1,
]);
const coord1 = transformVector(pixelUnprojectionMatrix, [
x,
viewport.height,
1,
1,
]);
const z = targetZ * viewport.distanceScales.unitsPerMeter[2];
const t = (z - coord0[2]) / (coord1[2] - coord0[2]);
const coord = vec2_lerp([], coord0, coord1, t);
const result = worldToLngLat(coord);
result[2] = targetZ;
return result;
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/web-mercator-viewport.js
//# sourceMappingURL=get-bounds.js.map
class WebMercatorViewport {
constructor(
{
width,
height,
latitude = 0,
longitude = 0,
zoom = 0,
pitch = 0,
bearing = 0,
altitude = null,
fovy = null,
position = null,
nearZMultiplier = 0.02,
farZMultiplier = 1.01,
} = {
width: 1,
height: 1,
}
) {
width = width || 1;
height = height || 1;
if (fovy === null && altitude === null) {
altitude = DEFAULT_ALTITUDE;
fovy = altitudeToFovy(altitude);
} else if (fovy === null) {
fovy = altitudeToFovy(altitude);
} else if (altitude === null) {
altitude = fovyToAltitude(fovy);
}
const scale = zoomToScale(zoom);
altitude = Math.max(0.75, altitude);
const distanceScales = getDistanceScales({
longitude,
latitude,
});
const center = lngLatToWorld([longitude, latitude]);
center[2] = 0;
if (position) {
vec3_add(
center,
center,
vec3_mul([], position, distanceScales.unitsPerMeter)
);
}
this.projectionMatrix = getProjectionMatrix({
width,
height,
pitch,
fovy,
nearZMultiplier,
farZMultiplier,
});
this.viewMatrix = getViewMatrix({
height,
scale,
center,
pitch,
bearing,
altitude,
});
this.width = width;
this.height = height;
this.scale = scale;
this.latitude = latitude;
this.longitude = longitude;
this.zoom = zoom;
this.pitch = pitch;
this.bearing = bearing;
this.altitude = altitude;
this.fovy = fovy;
this.center = center;
this.meterOffset = position || [0, 0, 0];
this.distanceScales = distanceScales;
this._initMatrices();
this.equals = this.equals.bind(this);
this.project = this.project.bind(this);
this.unproject = this.unproject.bind(this);
this.projectPosition = this.projectPosition.bind(this);
this.unprojectPosition = this.unprojectPosition.bind(this);
Object.freeze(this);
}
_initMatrices() {
const { width, height, projectionMatrix, viewMatrix } =
this;
const vpm = createMat4();
mat4_multiply(vpm, vpm, projectionMatrix);
mat4_multiply(vpm, vpm, viewMatrix);
this.viewProjectionMatrix = vpm;
const m = createMat4();
mat4_scale(m, m, [width / 2, -height / 2, 1]);
translate(m, m, [1, -1, 0]);
mat4_multiply(m, m, vpm);
const mInverse = invert(createMat4(), m);
if (!mInverse) {
throw new Error("Pixel project matrix not invertible");
}
this.pixelProjectionMatrix = m;
this.pixelUnprojectionMatrix = mInverse;
}
equals(viewport) {
if (!(viewport instanceof WebMercatorViewport)) {
return false;
}
return (
viewport.width === this.width &&
viewport.height === this.height &&
mat4_equals(
viewport.projectionMatrix,
this.projectionMatrix
) &&
mat4_equals(viewport.viewMatrix, this.viewMatrix)
);
}
project(xyz, { topLeft = true } = {}) {
const worldPosition = this.projectPosition(xyz);
const coord = worldToPixels(
worldPosition,
this.pixelProjectionMatrix
);
const [x, y] = coord;
const y2 = topLeft ? y : this.height - y;
return xyz.length === 2 ? [x, y2] : [x, y2, coord[2]];
}
unproject(xyz, { topLeft = true, targetZ = undefined } = {}) {
const [x, y, z] = xyz;
const y2 = topLeft ? y : this.height - y;
const targetZWorld =
targetZ &&
targetZ * this.distanceScales.unitsPerMeter[2];
const coord = pixelsToWorld(
[x, y2, z],
this.pixelUnprojectionMatrix,
targetZWorld
);
const [X, Y, Z] = this.unprojectPosition(coord);
if (Number.isFinite(z)) {
return [X, Y, Z];
}
return Number.isFinite(targetZ) ? [X, Y, targetZ] : [X, Y];
}
projectPosition(xyz) {
const [X, Y] = lngLatToWorld(xyz);
const Z =
(xyz[2] || 0) * this.distanceScales.unitsPerMeter[2];
return [X, Y, Z];
}
unprojectPosition(xyz) {
const [X, Y] = worldToLngLat(xyz);
const Z =
(xyz[2] || 0) * this.distanceScales.metersPerUnit[2];
return [X, Y, Z];
}
projectFlat(lngLat) {
return lngLatToWorld(lngLat);
}
unprojectFlat(xy) {
return worldToLngLat(xy);
}
getMapCenterByLngLatPosition({ lngLat, pos }) {
const fromLocation = pixelsToWorld(
pos,
this.pixelUnprojectionMatrix
);
const toLocation = lngLatToWorld(lngLat);
const translate = vec2_add(
[],
toLocation,
vec2_negate([], fromLocation)
);
const newCenter = vec2_add([], this.center, translate);
return worldToLngLat(newCenter);
}
getLocationAtPoint({ lngLat, pos }) {
return this.getMapCenterByLngLatPosition({
lngLat,
pos,
});
}
fitBounds(bounds, options = {}) {
const { width, height } = this;
const { longitude, latitude, zoom } = fitBounds(
Object.assign(
{
width,
height,
bounds,
},
options
)
);
return new WebMercatorViewport({
width,
height,
longitude,
latitude,
zoom,
});
}
getBounds(options) {
const corners = this.getBoundingRegion(options);
const west = Math.min(...corners.map((p) => p[0]));
const east = Math.max(...corners.map((p) => p[0]));
const south = Math.min(...corners.map((p) => p[1]));
const north = Math.max(...corners.map((p) => p[1]));
return [
[west, south],
[east, north],
];
}
getBoundingRegion(options = {}) {
return getBounds(this, options.z || 0);
}
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/normalize-viewport-props.js
//# sourceMappingURL=web-mercator-viewport.js.map
const normalize_viewport_props_TILE_SIZE = 512;
function normalizeViewportProps({
width,
height,
longitude,
latitude,
zoom,
pitch = 0,
bearing = 0,
}) {
if (longitude < -180 || longitude > 180) {
longitude = mod(longitude + 180, 360) - 180;
}
if (bearing < -180 || bearing > 180) {
bearing = mod(bearing + 180, 360) - 180;
}
const minZoom = log2(
height / normalize_viewport_props_TILE_SIZE
);
if (zoom <= minZoom) {
zoom = minZoom;
latitude = 0;
} else {
const halfHeightPixels = height / 2 / Math.pow(2, zoom);
const minLatitude = worldToLngLat([0, halfHeightPixels])[1];
if (latitude < minLatitude) {
latitude = minLatitude;
} else {
const maxLatitude = worldToLngLat([
0,
normalize_viewport_props_TILE_SIZE -
halfHeightPixels,
])[1];
if (latitude > maxLatitude) {
latitude = maxLatitude;
}
}
}
return {
width,
height,
longitude,
latitude,
zoom,
pitch,
bearing,
};
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/fly-to-viewport.js
//# sourceMappingURL=normalize-viewport-props.js.map
const fly_to_viewport_EPSILON = 0.01;
const VIEWPORT_TRANSITION_PROPS = ["longitude", "latitude", "zoom"];
const DEFAULT_OPTS = {
curve: 1.414,
speed: 1.2,
};
function flyToViewport(startProps, endProps, t, opts = {}) {
const viewport = {};
const {
startZoom,
startCenterXY,
uDelta,
w0,
u1,
S,
rho,
rho2,
r0,
} = getFlyToTransitionParams(startProps, endProps, opts);
if (u1 < fly_to_viewport_EPSILON) {
for (const key of VIEWPORT_TRANSITION_PROPS) {
const startValue = startProps[key];
const endValue = endProps[key];
viewport[key] = math_utils_lerp(
startValue,
endValue,
t
);
}
return viewport;
}
const s = t * S;
const w = Math.cosh(r0) / Math.cosh(r0 + rho * s);
const u =
(w0 *
((Math.cosh(r0) * Math.tanh(r0 + rho * s) -
Math.sinh(r0)) /
rho2)) /
u1;
const scaleIncrement = 1 / w;
const newZoom = startZoom + scaleToZoom(scaleIncrement);
const newCenterWorld = vec2_scale([], uDelta, u);
vec2_add(newCenterWorld, newCenterWorld, startCenterXY);
const newCenter = worldToLngLat(newCenterWorld);
viewport.longitude = newCenter[0];
viewport.latitude = newCenter[1];
viewport.zoom = newZoom;
return viewport;
}
function getFlyToDuration(startProps, endProps, opts = {}) {
opts = Object.assign({}, DEFAULT_OPTS, opts);
const { screenSpeed, speed, maxDuration } = opts;
const { S, rho } = getFlyToTransitionParams(
startProps,
endProps,
opts
);
const length = 1000 * S;
let duration;
if (Number.isFinite(screenSpeed)) {
duration = length / (screenSpeed / rho);
} else {
duration = length / speed;
}
return Number.isFinite(maxDuration) && duration > maxDuration
? 0
: duration;
}
function getFlyToTransitionParams(startProps, endProps, opts) {
opts = Object.assign({}, DEFAULT_OPTS, opts);
const rho = opts.curve;
const startZoom = startProps.zoom;
const startCenter = [startProps.longitude, startProps.latitude];
const startScale = zoomToScale(startZoom);
const endZoom = endProps.zoom;
const endCenter = [endProps.longitude, endProps.latitude];
const scale = zoomToScale(endZoom - startZoom);
const startCenterXY = lngLatToWorld(startCenter);
const endCenterXY = lngLatToWorld(endCenter);
const uDelta = vec2_sub([], endCenterXY, startCenterXY);
const w0 = Math.max(startProps.width, startProps.height);
const w1 = w0 / scale;
const u1 = vec2_length(uDelta) * startScale;
const _u1 = Math.max(u1, fly_to_viewport_EPSILON);
const rho2 = rho * rho;
const b0 =
(w1 * w1 - w0 * w0 + rho2 * rho2 * _u1 * _u1) /
(2 * w0 * rho2 * _u1);
const b1 =
(w1 * w1 - w0 * w0 - rho2 * rho2 * _u1 * _u1) /
(2 * w1 * rho2 * _u1);
const r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0);
const r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
const S = (r1 - r0) / rho;
return {
startZoom,
startCenterXY,
uDelta,
w0,
u1,
S,
rho,
rho2,
r0,
r1,
};
} // CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/index.js // CONCATENATED MODULE: ./node_modules/viewport-mercator-project/module.js // CONCATENATED MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
//# sourceMappingURL=fly-to-viewport.js.map
//# sourceMappingURL=index.js.map
/**
* A collection of shims that provide minimal functionality of the ES6 collections.
*
* These implementations are not meant to be used outside of the ResizeObserver
* modules as they cover only a limited range of use cases.
*/
/* eslint-disable require-jsdoc, valid-jsdoc */
var MapShim = (function () {
if (typeof Map !== "undefined") {
return Map;
}
/**
* Returns index in provided array that matches the specified key.
*
* @param {Array<Array>} arr
* @param {*} key
* @returns {number}
*/
function getIndex(arr, key) {
var result = -1;
arr.some(function (entry, index) {
if (entry[0] === key) {
result = index;
return true;
}
return false;
});
return result;
}
return /** @class */ (function () {
function class_1() {
this.__entries__ = [];
}
Object.defineProperty(class_1.prototype, "size", {
/**
* @returns {boolean}
*/
get: function () {
return this.__entries__.length;
},
enumerable: true,
configurable: true,
});
/**
* @param {*} key
* @returns {*}
*/
class_1.prototype.get = function (key) {
var index = getIndex(this.__entries__, key);
var entry = this.__entries__[index];
return entry && entry[1];
};
/**
* @param {*} key
* @param {*} value
* @returns {void}
*/
class_1.prototype.set = function (key, value) {
var index = getIndex(this.__entries__, key);
if (~index) {
this.__entries__[index][1] = value;
} else {
this.__entries__.push([key, value]);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.delete = function (key) {
var entries = this.__entries__;
var index = getIndex(entries, key);
if (~index) {
entries.splice(index, 1);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.has = function (key) {
return !!~getIndex(this.__entries__, key);
};
/**
* @returns {void}
*/
class_1.prototype.clear = function () {
this.__entries__.splice(0);
};
/**
* @param {Function} callback
* @param {*} [ctx=null]
* @returns {void}
*/
class_1.prototype.forEach = function (callback, ctx) {
if (ctx === void 0) {
ctx = null;
}
for (
var _i = 0, _a = this.__entries__;
_i < _a.length;
_i++
) {
var entry = _a[_i];
callback.call(ctx, entry[1], entry[0]);
}
};
return class_1;
})();
})();
/**
* Detects whether window and document objects are available in current environment.
*/
var isBrowser =
typeof window !== "undefined" &&
typeof document !== "undefined" &&
window.document === document;
// Returns global object of a current environment.
var global$1 = (function () {
if (
typeof __webpack_require__.g !== "undefined" &&
__webpack_require__.g.Math === Math
) {
return __webpack_require__.g;
}
if (typeof self !== "undefined" && self.Math === Math) {
return self;
}
if (typeof window !== "undefined" && window.Math === Math) {
return window;
}
// eslint-disable-next-line no-new-func
return Function("return this")();
})();
/**
* A shim for the requestAnimationFrame which falls back to the setTimeout if
* first one is not supported.
*
* @returns {number} Requests' identifier.
*/
var requestAnimationFrame$1 = (function () {
if (typeof requestAnimationFrame === "function") {
// It's required to use a bounded function because IE sometimes throws
// an "Invalid calling object" error if rAF is invoked without the global
// object on the left hand side.
return requestAnimationFrame.bind(global$1);
}
return function (callback) {
return setTimeout(function () {
return callback(Date.now());
}, 1000 / 60);
};
})();
// Defines minimum timeout before adding a trailing call.
var trailingTimeout = 2;
/**
* Creates a wrapper function which ensures that provided callback will be
* invoked only once during the specified delay period.
*
* @param {Function} callback - Function to be invoked after the delay period.
* @param {number} delay - Delay after which to invoke callback.
* @returns {Function}
*/
function throttle(callback, delay) {
var leadingCall = false,
trailingCall = false,
lastCallTime = 0;
/**
* Invokes the original callback function and schedules new invocation if
* the "proxy" was called during current request.
*
* @returns {void}
*/
function resolvePending() {
if (leadingCall) {
leadingCall = false;
callback();
}
if (trailingCall) {
proxy();
}
}
/**
* Callback invoked after the specified delay. It will further postpone
* invocation of the original function delegating it to the
* requestAnimationFrame.
*
* @returns {void}
*/
function timeoutCallback() {
requestAnimationFrame$1(resolvePending);
}
/**
* Schedules invocation of the original function.
*
* @returns {void}
*/
function proxy() {
var timeStamp = Date.now();
if (leadingCall) {
// Reject immediately following calls.
if (timeStamp - lastCallTime < trailingTimeout) {
return;
}
// Schedule new call to be in invoked when the pending one is resolved.
// This is important for "transitions" which never actually start
// immediately so there is a chance that we might miss one if change
// happens amids the pending invocation.
trailingCall = true;
} else {
leadingCall = true;
trailingCall = false;
setTimeout(timeoutCallback, delay);
}
lastCallTime = timeStamp;
}
return proxy;
}
// Minimum delay before invoking the update of observers.
var REFRESH_DELAY = 20;
// A list of substrings of CSS properties used to find transition events that
// might affect dimensions of observed elements.
var transitionKeys = [
"top",
"right",
"bottom",
"left",
"width",
"height",
"size",
"weight",
];
// Check if MutationObserver is available.
var mutationObserverSupported =
typeof MutationObserver !== "undefined";
/**
* Singleton controller class which handles updates of ResizeObserver instances.
*/
var ResizeObserverController = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserverController.
*
* @private
*/
function ResizeObserverController() {
/**
* Indicates whether DOM listeners have been added.
*
* @private {boolean}
*/
this.connected_ = false;
/**
* Tells that controller has subscribed for Mutation Events.
*
* @private {boolean}
*/
this.mutationEventsAdded_ = false;
/**
* Keeps reference to the instance of MutationObserver.
*
* @private {MutationObserver}
*/
this.mutationsObserver_ = null;
/**
* A list of connected observers.
*
* @private {Array<ResizeObserverSPI>}
*/
this.observers_ = [];
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
this.refresh = throttle(
this.refresh.bind(this),
REFRESH_DELAY
);
}
/**
* Adds observer to observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be added.
* @returns {void}
*/
ResizeObserverController.prototype.addObserver = function (
observer
) {
if (!~this.observers_.indexOf(observer)) {
this.observers_.push(observer);
}
// Add listeners if they haven't been added yet.
if (!this.connected_) {
this.connect_();
}
};
/**
* Removes observer from observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be removed.
* @returns {void}
*/
ResizeObserverController.prototype.removeObserver = function (
observer
) {
var observers = this.observers_;
var index = observers.indexOf(observer);
// Remove observer if it's present in registry.
if (~index) {
observers.splice(index, 1);
}
// Remove listeners if controller has no connected observers.
if (!observers.length && this.connected_) {
this.disconnect_();
}
};
/**
* Invokes the update of observers. It will continue running updates insofar
* it detects changes.
*
* @returns {void}
*/
ResizeObserverController.prototype.refresh = function () {
var changesDetected = this.updateObservers_();
// Continue running updates if changes have been detected as there might
// be future ones caused by CSS transitions.
if (changesDetected) {
this.refresh();
}
};
/**
* Updates every observer from observers list and notifies them of queued
* entries.
*
* @private
* @returns {boolean} Returns "true" if any observer has detected changes in
* dimensions of it's elements.
*/
ResizeObserverController.prototype.updateObservers_ =
function () {
// Collect observers that have active observations.
var activeObservers = this.observers_.filter(function (
observer
) {
return (
observer.gatherActive(), observer.hasActive()
);
});
// Deliver notifications in a separate cycle in order to avoid any
// collisions between observers, e.g. when multiple instances of
// ResizeObserver are tracking the same element and the callback of one
// of them changes content dimensions of the observed target. Sometimes
// this may result in notifications being blocked for the rest of observers.
activeObservers.forEach(function (observer) {
return observer.broadcastActive();
});
return activeObservers.length > 0;
};
/**
* Initializes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.connect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already added.
if (!isBrowser || this.connected_) {
return;
}
// Subscription to the "Transitionend" event is used as a workaround for
// delayed transitions. This way it's possible to capture at least the
// final state of an element.
document.addEventListener(
"transitionend",
this.onTransitionEnd_
);
window.addEventListener("resize", this.refresh);
if (mutationObserverSupported) {
this.mutationsObserver_ = new MutationObserver(
this.refresh
);
this.mutationsObserver_.observe(document, {
attributes: true,
childList: true,
characterData: true,
subtree: true,
});
} else {
document.addEventListener(
"DOMSubtreeModified",
this.refresh
);
this.mutationEventsAdded_ = true;
}
this.connected_ = true;
};
/**
* Removes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.disconnect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already removed.
if (!isBrowser || !this.connected_) {
return;
}
document.removeEventListener(
"transitionend",
this.onTransitionEnd_
);
window.removeEventListener("resize", this.refresh);
if (this.mutationsObserver_) {
this.mutationsObserver_.disconnect();
}
if (this.mutationEventsAdded_) {
document.removeEventListener(
"DOMSubtreeModified",
this.refresh
);
}
this.mutationsObserver_ = null;
this.mutationEventsAdded_ = false;
this.connected_ = false;
};
/**
* "Transitionend" event handler.
*
* @private
* @param {TransitionEvent} event
* @returns {void}
*/
ResizeObserverController.prototype.onTransitionEnd_ = function (
_a
) {
var _b = _a.propertyName,
propertyName = _b === void 0 ? "" : _b;
// Detect whether transition may affect dimensions of an element.
var isReflowProperty = transitionKeys.some(function (key) {
return !!~propertyName.indexOf(key);
});
if (isReflowProperty) {
this.refresh();
}
};
/**
* Returns instance of the ResizeObserverController.
*
* @returns {ResizeObserverController}
*/
ResizeObserverController.getInstance = function () {
if (!this.instance_) {
this.instance_ = new ResizeObserverController();
}
return this.instance_;
};
/**
* Holds reference to the controller's instance.
*
* @private {ResizeObserverController}
*/
ResizeObserverController.instance_ = null;
return ResizeObserverController;
})();
/**
* Defines non-writable/enumerable properties of the provided target object.
*
* @param {Object} target - Object for which to define properties.
* @param {Object} props - Properties to be defined.
* @returns {Object} Target object.
*/
var defineConfigurable = function (target, props) {
for (
var _i = 0, _a = Object.keys(props);
_i < _a.length;
_i++
) {
var key = _a[_i];
Object.defineProperty(target, key, {
value: props[key],
enumerable: false,
writable: false,
configurable: true,
});
}
return target;
};
/**
* Returns the global object associated with provided element.
*
* @param {Object} target
* @returns {Object}
*/
var getWindowOf = function (target) {
// Assume that the element is an instance of Node, which means that it
// has the "ownerDocument" property from which we can retrieve a
// corresponding global object.
var ownerGlobal =
target &&
target.ownerDocument &&
target.ownerDocument.defaultView;
// Return the local global object if it's not possible extract one from
// provided element.
return ownerGlobal || global$1;
};
// Placeholder of an empty content rectangle.
var emptyRect = createRectInit(0, 0, 0, 0);
/**
* Converts provided string to a number.
*
* @param {number|string} value
* @returns {number}
*/
function toFloat(value) {
return parseFloat(value) || 0;
}
/**
* Extracts borders size from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @param {...string} positions - Borders positions (top, right, ...)
* @returns {number}
*/
function getBordersSize(styles) {
var positions = [];
for (var _i = 1; _i < arguments.length; _i++) {
positions[_i - 1] = arguments[_i];
}
return positions.reduce(function (size, position) {
var value = styles["border-" + position + "-width"];
return size + toFloat(value);
}, 0);
}
/**
* Extracts paddings sizes from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @returns {Object} Paddings box.
*/
function getPaddings(styles) {
var positions = ["top", "right", "bottom", "left"];
var paddings = {};
for (
var _i = 0, positions_1 = positions;
_i < positions_1.length;
_i++
) {
var position = positions_1[_i];
var value = styles["padding-" + position];
paddings[position] = toFloat(value);
}
return paddings;
}
/**
* Calculates content rectangle of provided SVG element.
*
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
* to be calculated.
* @returns {DOMRectInit}
*/
function getSVGContentRect(target) {
var bbox = target.getBBox();
return createRectInit(0, 0, bbox.width, bbox.height);
}
/**
* Calculates content rectangle of provided HTMLElement.
*
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
* @returns {DOMRectInit}
*/
function getHTMLElementContentRect(target) {
// Client width & height properties can't be
// used exclusively as they provide rounded values.
var clientWidth = target.clientWidth,
clientHeight = target.clientHeight;
// By this condition we can catch all non-replaced inline, hidden and
// detached elements. Though elements with width & height properties less
// than 0.5 will be discarded as well.
//
// Without it we would need to implement separate methods for each of
// those cases and it's not possible to perform a precise and performance
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
// gives wrong results for elements with width & height less than 0.5.
if (!clientWidth && !clientHeight) {
return emptyRect;
}
var styles = getWindowOf(target).getComputedStyle(target);
var paddings = getPaddings(styles);
var horizPad = paddings.left + paddings.right;
var vertPad = paddings.top + paddings.bottom;
// Computed styles of width & height are being used because they are the
// only dimensions available to JS that contain non-rounded values. It could
// be possible to utilize the getBoundingClientRect if only it's data wasn't
// affected by CSS transformations let alone paddings, borders and scroll bars.
var width = toFloat(styles.width),
height = toFloat(styles.height);
// Width & height include paddings and borders when the 'border-box' box
// model is applied (except for IE).
if (styles.boxSizing === "border-box") {
// Following conditions are required to handle Internet Explorer which
// doesn't include paddings and borders to computed CSS dimensions.
//
// We can say that if CSS dimensions + paddings are equal to the "client"
// properties then it's either IE, and thus we don't need to subtract
// anything, or an element merely doesn't have paddings/borders styles.
if (Math.round(width + horizPad) !== clientWidth) {
width -=
getBordersSize(styles, "left", "right") + horizPad;
}
if (Math.round(height + vertPad) !== clientHeight) {
height -=
getBordersSize(styles, "top", "bottom") + vertPad;
}
}
// Following steps can't be applied to the document's root element as its
// client[Width/Height] properties represent viewport area of the window.
// Besides, it's as well not necessary as the <html> itself neither has
// rendered scroll bars nor it can be clipped.
if (!isDocumentElement(target)) {
// In some browsers (only in Firefox, actually) CSS width & height
// include scroll bars size which can be removed at this step as scroll
// bars are the only difference between rounded dimensions + paddings
// and "client" properties, though that is not always true in Chrome.
var vertScrollbar =
Math.round(width + horizPad) - clientWidth;
var horizScrollbar =
Math.round(height + vertPad) - clientHeight;
// Chrome has a rather weird rounding of "client" properties.
// E.g. for an element with content width of 314.2px it sometimes gives
// the client width of 315px and for the width of 314.7px it may give
// 314px. And it doesn't happen all the time. So just ignore this delta
// as a non-relevant.
if (Math.abs(vertScrollbar) !== 1) {
width -= vertScrollbar;
}
if (Math.abs(horizScrollbar) !== 1) {
height -= horizScrollbar;
}
}
return createRectInit(
paddings.left,
paddings.top,
width,
height
);
}
/**
* Checks whether provided element is an instance of the SVGGraphicsElement.
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
var isSVGGraphicsElement = (function () {
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
// interface.
if (typeof SVGGraphicsElement !== "undefined") {
return function (target) {
return (
target instanceof
getWindowOf(target).SVGGraphicsElement
);
};
}
// If it's so, then check that element is at least an instance of the
// SVGElement and that it has the "getBBox" method.
// eslint-disable-next-line no-extra-parens
return function (target) {
return (
target instanceof getWindowOf(target).SVGElement &&
typeof target.getBBox === "function"
);
};
})();
/**
* Checks whether provided element is a document element (<html>).
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
function isDocumentElement(target) {
return target === getWindowOf(target).document.documentElement;
}
/**
* Calculates an appropriate content rectangle for provided html or svg element.
*
* @param {Element} target - Element content rectangle of which needs to be calculated.
* @returns {DOMRectInit}
*/
function getContentRect(target) {
if (!isBrowser) {
return emptyRect;
}
if (isSVGGraphicsElement(target)) {
return getSVGContentRect(target);
}
return getHTMLElementContentRect(target);
}
/**
* Creates rectangle with an interface of the DOMRectReadOnly.
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
*
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
* @returns {DOMRectReadOnly}
*/
function createReadOnlyRect(_a) {
var x = _a.x,
y = _a.y,
width = _a.width,
height = _a.height;
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
var Constr =
typeof DOMRectReadOnly !== "undefined"
? DOMRectReadOnly
: Object;
var rect = Object.create(Constr.prototype);
// Rectangle's properties are not writable and non-enumerable.
defineConfigurable(rect, {
x: x,
y: y,
width: width,
height: height,
top: y,
right: x + width,
bottom: height + y,
left: x,
});
return rect;
}
/**
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
*
* @param {number} x - X coordinate.
* @param {number} y - Y coordinate.
* @param {number} width - Rectangle's width.
* @param {number} height - Rectangle's height.
* @returns {DOMRectInit}
*/
function createRectInit(x, y, width, height) {
return { x: x, y: y, width: width, height: height };
}
/**
* Class that is responsible for computations of the content rectangle of
* provided DOM element and for keeping track of it's changes.
*/
var ResizeObservation = /** @class */ (function () {
/**
* Creates an instance of ResizeObservation.
*
* @param {Element} target - Element to be observed.
*/
function ResizeObservation(target) {
/**
* Broadcasted width of content rectangle.
*
* @type {number}
*/
this.broadcastWidth = 0;
/**
* Broadcasted height of content rectangle.
*
* @type {number}
*/
this.broadcastHeight = 0;
/**
* Reference to the last observed content rectangle.
*
* @private {DOMRectInit}
*/
this.contentRect_ = createRectInit(0, 0, 0, 0);
this.target = target;
}
/**
* Updates content rectangle and tells whether it's width or height properties
* have changed since the last broadcast.
*
* @returns {boolean}
*/
ResizeObservation.prototype.isActive = function () {
var rect = getContentRect(this.target);
this.contentRect_ = rect;
return (
rect.width !== this.broadcastWidth ||
rect.height !== this.broadcastHeight
);
};
/**
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
* from the corresponding properties of the last observed content rectangle.
*
* @returns {DOMRectInit} Last observed content rectangle.
*/
ResizeObservation.prototype.broadcastRect = function () {
var rect = this.contentRect_;
this.broadcastWidth = rect.width;
this.broadcastHeight = rect.height;
return rect;
};
return ResizeObservation;
})();
var ResizeObserverEntry = /** @class */ (function () {
/**
* Creates an instance of ResizeObserverEntry.
*
* @param {Element} target - Element that is being observed.
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
*/
function ResizeObserverEntry(target, rectInit) {
var contentRect = createReadOnlyRect(rectInit);
// According to the specification following properties are not writable
// and are also not enumerable in the native implementation.
//
// Property accessors are not being used as they'd require to define a
// private WeakMap storage which may cause memory leaks in browsers that
// don't support this type of collections.
defineConfigurable(this, {
target: target,
contentRect: contentRect,
});
}
return ResizeObserverEntry;
})();
var ResizeObserverSPI = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback function that is invoked
* when one of the observed elements changes it's content dimensions.
* @param {ResizeObserverController} controller - Controller instance which
* is responsible for the updates of observer.
* @param {ResizeObserver} callbackCtx - Reference to the public
* ResizeObserver instance which will be passed to callback function.
*/
function ResizeObserverSPI(callback, controller, callbackCtx) {
/**
* Collection of resize observations that have detected changes in dimensions
* of elements.
*
* @private {Array<ResizeObservation>}
*/
this.activeObservations_ = [];
/**
* Registry of the ResizeObservation instances.
*
* @private {Map<Element, ResizeObservation>}
*/
this.observations_ = new MapShim();
if (typeof callback !== "function") {
throw new TypeError(
"The callback provided as parameter 1 is not a function."
);
}
this.callback_ = callback;
this.controller_ = controller;
this.callbackCtx_ = callbackCtx;
}
/**
* Starts observing provided element.
*
* @param {Element} target - Element to be observed.
* @returns {void}
*/
ResizeObserverSPI.prototype.observe = function (target) {
if (!arguments.length) {
throw new TypeError(
"1 argument required, but only 0 present."
);
}
// Do nothing if current environment doesn't have the Element interface.
if (
typeof Element === "undefined" ||
!(Element instanceof Object)
) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError(
'parameter 1 is not of type "Element".'
);
}
var observations = this.observations_;
// Do nothing if element is already being observed.
if (observations.has(target)) {
return;
}
observations.set(target, new ResizeObservation(target));
this.controller_.addObserver(this);
// Force the update of observations.
this.controller_.refresh();
};
/**
* Stops observing provided element.
*
* @param {Element} target - Element to stop observing.
* @returns {void}
*/
ResizeObserverSPI.prototype.unobserve = function (target) {
if (!arguments.length) {
throw new TypeError(
"1 argument required, but only 0 present."
);
}
// Do nothing if current environment doesn't have the Element interface.
if (
typeof Element === "undefined" ||
!(Element instanceof Object)
) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError(
'parameter 1 is not of type "Element".'
);
}
var observations = this.observations_;
// Do nothing if element is not being observed.
if (!observations.has(target)) {
return;
}
observations.delete(target);
if (!observations.size) {
this.controller_.removeObserver(this);
}
};
/**
* Stops observing all elements.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.disconnect = function () {
this.clearActive();
this.observations_.clear();
this.controller_.removeObserver(this);
};
/**
* Collects observation instances the associated element of which has changed
* it's content rectangle.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.gatherActive = function () {
var _this = this;
this.clearActive();
this.observations_.forEach(function (observation) {
if (observation.isActive()) {
_this.activeObservations_.push(observation);
}
});
};
/**
* Invokes initial callback function with a list of ResizeObserverEntry
* instances collected from active resize observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.broadcastActive = function () {
// Do nothing if observer doesn't have active observations.
if (!this.hasActive()) {
return;
}
var ctx = this.callbackCtx_;
// Create ResizeObserverEntry instance for every active observation.
var entries = this.activeObservations_.map(function (
observation
) {
return new ResizeObserverEntry(
observation.target,
observation.broadcastRect()
);
});
this.callback_.call(ctx, entries, ctx);
this.clearActive();
};
/**
* Clears the collection of active observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.clearActive = function () {
this.activeObservations_.splice(0);
};
/**
* Tells whether observer has active observations.
*
* @returns {boolean}
*/
ResizeObserverSPI.prototype.hasActive = function () {
return this.activeObservations_.length > 0;
};
return ResizeObserverSPI;
})();
// Registry of internal observers. If WeakMap is not available use current shim
// for the Map collection as it has all required methods and because WeakMap
// can't be fully polyfilled anyway.
var observers =
typeof WeakMap !== "undefined" ? new WeakMap() : new MapShim();
/**
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
* exposing only those methods and properties that are defined in the spec.
*/
var ResizeObserver = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback that is invoked when
* dimensions of the observed elements change.
*/
function ResizeObserver(callback) {
if (!(this instanceof ResizeObserver)) {
throw new TypeError(
"Cannot call a class as a function."
);
}
if (!arguments.length) {
throw new TypeError(
"1 argument required, but only 0 present."
);
}
var controller = ResizeObserverController.getInstance();
var observer = new ResizeObserverSPI(
callback,
controller,
this
);
observers.set(this, observer);
}
return ResizeObserver;
})();
// Expose public methods of ResizeObserver.
["observe", "unobserve", "disconnect"].forEach(function (method) {
ResizeObserver.prototype[method] = function () {
var _a;
return (_a = observers.get(this))[method].apply(
_a,
arguments
);
};
});
var index = (function () {
// Export existing implementation if available.
if (typeof global$1.ResizeObserver !== "undefined") {
return global$1.ResizeObserver;
}
return ResizeObserver;
})();
/* harmony default export */ var ResizeObserver_es = index; // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps)
_defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false,
});
return Constructor;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/globals.js
var window_ =
typeof window !== "undefined" ? window : __webpack_require__.g;
var global_ =
typeof __webpack_require__.g !== "undefined"
? __webpack_require__.g
: window;
var document_ = typeof document !== "undefined" ? document : {}; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/style-utils.js
//# sourceMappingURL=globals.js.map
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
function _createForOfIteratorHelper(o, allowArrayLike) {
var it;
if (
typeof Symbol === "undefined" ||
o[Symbol.iterator] == null
) {
if (
Array.isArray(o) ||
(it = style_utils_unsupportedIterableToArray(o)) ||
(allowArrayLike && o && typeof o.length === "number")
) {
if (it) o = it;
var i = 0;
var F = function F() {};
return {
s: F,
n: function n() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
},
e: function e(_e) {
throw _e;
},
f: F,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var normalCompletion = true,
didErr = false,
err;
return {
s: function s() {
it = o[Symbol.iterator]();
},
n: function n() {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function e(_e2) {
didErr = true;
err = _e2;
},
f: function f() {
try {
if (!normalCompletion && it["return"] != null)
it["return"]();
} finally {
if (didErr) throw err;
}
},
};
}
function style_utils_unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string")
return style_utils_arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (
n === "Arguments" ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
)
return style_utils_arrayLikeToArray(o, minLen);
}
function style_utils_arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
var refProps = [
"type",
"source",
"source-layer",
"minzoom",
"maxzoom",
"filter",
"layout",
];
function normalizeStyle(style) {
if (!style) {
return null;
}
if (typeof style === "string") {
return style;
}
if (style.toJS) {
style = style.toJS();
}
var layerIndex = {};
var _iterator = _createForOfIteratorHelper(style.layers),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
var layer = _step.value;
layerIndex[layer.id] = layer;
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
var layers = style.layers.map(function (layer) {
var layerRef = layerIndex[layer.ref];
var normalizedLayer = null;
if ("interactive" in layer) {
normalizedLayer = _objectSpread({}, layer);
delete normalizedLayer.interactive;
}
if (layerRef) {
normalizedLayer =
normalizedLayer || _objectSpread({}, layer);
delete normalizedLayer.ref;
var _iterator2 = _createForOfIteratorHelper(refProps),
_step2;
try {
for (
_iterator2.s();
!(_step2 = _iterator2.n()).done;
) {
var propName = _step2.value;
if (propName in layerRef) {
normalizedLayer[propName] =
layerRef[propName];
}
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
}
return normalizedLayer || layer;
});
return _objectSpread(
_objectSpread({}, style),
{},
{
layers: layers,
}
);
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/mapbox/mapbox.js
//# sourceMappingURL=style-utils.js.map
/* provided dependency */ var process = __webpack_require__(3454);
function noop() {}
function defaultOnError(event) {
if (event) {
console.error(event.error);
}
}
var propTypes = {
container: prop_types.object,
gl: prop_types.object,
mapboxApiAccessToken: prop_types.string,
mapboxApiUrl: prop_types.string,
attributionControl: prop_types.bool,
preserveDrawingBuffer: prop_types.bool,
reuseMaps: prop_types.bool,
transformRequest: prop_types.func,
mapOptions: prop_types.object,
mapStyle: prop_types.oneOfType([
prop_types.string,
prop_types.object,
]),
preventStyleDiffing: prop_types.bool,
visible: prop_types.bool,
asyncRender: prop_types.bool,
onLoad: prop_types.func,
onError: prop_types.func,
width: prop_types.number,
height: prop_types.number,
viewState: prop_types.object,
longitude: prop_types.number,
latitude: prop_types.number,
zoom: prop_types.number,
bearing: prop_types.number,
pitch: prop_types.number,
altitude: prop_types.number,
};
var defaultProps = {
container: document_.body,
mapboxApiAccessToken: getAccessToken(),
mapboxApiUrl: "https://api.mapbox.com",
preserveDrawingBuffer: false,
attributionControl: true,
reuseMaps: false,
mapOptions: {},
mapStyle: "mapbox://styles/mapbox/light-v8",
preventStyleDiffing: false,
visible: true,
asyncRender: false,
onLoad: noop,
onError: defaultOnError,
width: 0,
height: 0,
longitude: 0,
latitude: 0,
zoom: 0,
bearing: 0,
pitch: 0,
altitude: 1.5,
};
function getAccessToken() {
var accessToken = null;
if (typeof window !== "undefined" && window.location) {
var match = window.location.search.match(
/access_token=([^&\/]*)/
);
accessToken = match && match[1];
}
if (!accessToken && typeof process !== "undefined") {
accessToken =
accessToken ||
process.env.MapboxAccessToken ||
process.env.REACT_APP_MAPBOX_ACCESS_TOKEN;
}
return accessToken || "no-token";
}
function checkPropTypes(props) {
var component =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: "component";
if (props.debug) {
prop_types.checkPropTypes(
propTypes,
props,
"prop",
component
);
}
}
var Mapbox = (function () {
function Mapbox(props) {
var _this = this;
_classCallCheck(this, Mapbox);
_defineProperty(this, "props", defaultProps);
_defineProperty(this, "width", 0);
_defineProperty(this, "height", 0);
_defineProperty(this, "_fireLoadEvent", function () {
_this.props.onLoad({
type: "load",
target: _this._map,
});
});
_defineProperty(this, "_handleError", function (event) {
_this.props.onError(event);
});
if (!props.mapboxgl) {
throw new Error("Mapbox not available");
}
this.mapboxgl = props.mapboxgl;
if (!Mapbox.initialized) {
Mapbox.initialized = true;
this._checkStyleSheet(this.mapboxgl.version);
}
this._initialize(props);
}
_createClass(Mapbox, [
{
key: "finalize",
value: function finalize() {
this._destroy();
return this;
},
},
{
key: "setProps",
value: function setProps(props) {
this._update(this.props, props);
return this;
},
},
{
key: "redraw",
value: function redraw() {
var map = this._map;
if (map.style) {
if (map._frame) {
map._frame.cancel();
map._frame = null;
}
map._render();
}
},
},
{
key: "getMap",
value: function getMap() {
return this._map;
},
},
{
key: "_reuse",
value: function _reuse(props) {
this._map = Mapbox.savedMap;
var oldContainer = this._map.getContainer();
var newContainer = props.container;
newContainer.classList.add("mapboxgl-map");
while (oldContainer.childNodes.length > 0) {
newContainer.appendChild(
oldContainer.childNodes[0]
);
}
this._map._container = newContainer;
Mapbox.savedMap = null;
if (props.mapStyle) {
this._map.setStyle(
normalizeStyle(props.mapStyle),
{
diff: false,
}
);
}
if (this._map.isStyleLoaded()) {
this._fireLoadEvent();
} else {
this._map.once(
"styledata",
this._fireLoadEvent
);
}
},
},
{
key: "_create",
value: function _create(props) {
if (props.reuseMaps && Mapbox.savedMap) {
this._reuse(props);
} else {
if (props.gl) {
var getContext =
HTMLCanvasElement.prototype.getContext;
HTMLCanvasElement.prototype.getContext =
function () {
HTMLCanvasElement.prototype.getContext =
getContext;
return props.gl;
};
}
var mapOptions = {
container: props.container,
center: [0, 0],
zoom: 8,
pitch: 0,
bearing: 0,
maxZoom: 24,
style: normalizeStyle(props.mapStyle),
interactive: false,
trackResize: false,
attributionControl:
props.attributionControl,
preserveDrawingBuffer:
props.preserveDrawingBuffer,
};
if (props.transformRequest) {
mapOptions.transformRequest =
props.transformRequest;
}
this._map = new this.mapboxgl.Map(
Object.assign(
{},
mapOptions,
props.mapOptions
)
);
this._map.once("load", this._fireLoadEvent);
this._map.on("error", this._handleError);
}
return this;
},
},
{
key: "_destroy",
value: function _destroy() {
if (!this._map) {
return;
}
if (this.props.reuseMaps && !Mapbox.savedMap) {
Mapbox.savedMap = this._map;
this._map.off("load", this._fireLoadEvent);
this._map.off("error", this._handleError);
this._map.off("styledata", this._fireLoadEvent);
} else {
this._map.remove();
}
this._map = null;
},
},
{
key: "_initialize",
value: function _initialize(props) {
var _this2 = this;
props = Object.assign({}, defaultProps, props);
checkPropTypes(props, "Mapbox");
this.mapboxgl.accessToken =
props.mapboxApiAccessToken ||
defaultProps.mapboxApiAccessToken;
this.mapboxgl.baseApiUrl = props.mapboxApiUrl;
this._create(props);
var _props = props,
container = _props.container;
Object.defineProperty(container, "offsetWidth", {
configurable: true,
get: function get() {
return _this2.width;
},
});
Object.defineProperty(container, "clientWidth", {
configurable: true,
get: function get() {
return _this2.width;
},
});
Object.defineProperty(container, "offsetHeight", {
configurable: true,
get: function get() {
return _this2.height;
},
});
Object.defineProperty(container, "clientHeight", {
configurable: true,
get: function get() {
return _this2.height;
},
});
var canvas = this._map.getCanvas();
if (canvas) {
canvas.style.outline = "none";
}
this._updateMapViewport({}, props);
this._updateMapSize({}, props);
this.props = props;
},
},
{
key: "_update",
value: function _update(oldProps, newProps) {
if (!this._map) {
return;
}
newProps = Object.assign({}, this.props, newProps);
checkPropTypes(newProps, "Mapbox");
var viewportChanged = this._updateMapViewport(
oldProps,
newProps
);
var sizeChanged = this._updateMapSize(
oldProps,
newProps
);
this._updateMapStyle(oldProps, newProps);
if (
!newProps.asyncRender &&
(viewportChanged || sizeChanged)
) {
this.redraw();
}
this.props = newProps;
},
},
{
key: "_updateMapStyle",
value: function _updateMapStyle(oldProps, newProps) {
var styleChanged =
oldProps.mapStyle !== newProps.mapStyle;
if (styleChanged) {
this._map.setStyle(
normalizeStyle(newProps.mapStyle),
{
diff: !newProps.preventStyleDiffing,
}
);
}
},
},
{
key: "_updateMapSize",
value: function _updateMapSize(oldProps, newProps) {
var sizeChanged =
oldProps.width !== newProps.width ||
oldProps.height !== newProps.height;
if (sizeChanged) {
this.width = newProps.width;
this.height = newProps.height;
this._map.resize();
}
return sizeChanged;
},
},
{
key: "_updateMapViewport",
value: function _updateMapViewport(oldProps, newProps) {
var oldViewState = this._getViewState(oldProps);
var newViewState = this._getViewState(newProps);
var viewportChanged =
newViewState.latitude !==
oldViewState.latitude ||
newViewState.longitude !==
oldViewState.longitude ||
newViewState.zoom !== oldViewState.zoom ||
newViewState.pitch !== oldViewState.pitch ||
newViewState.bearing !== oldViewState.bearing ||
newViewState.altitude !== oldViewState.altitude;
if (viewportChanged) {
this._map.jumpTo(
this._viewStateToMapboxProps(newViewState)
);
if (
newViewState.altitude !==
oldViewState.altitude
) {
this._map.transform.altitude =
newViewState.altitude;
}
}
return viewportChanged;
},
},
{
key: "_getViewState",
value: function _getViewState(props) {
var _ref = props.viewState || props,
longitude = _ref.longitude,
latitude = _ref.latitude,
zoom = _ref.zoom,
_ref$pitch = _ref.pitch,
pitch = _ref$pitch === void 0 ? 0 : _ref$pitch,
_ref$bearing = _ref.bearing,
bearing =
_ref$bearing === void 0 ? 0 : _ref$bearing,
_ref$altitude = _ref.altitude,
altitude =
_ref$altitude === void 0
? 1.5
: _ref$altitude;
return {
longitude: longitude,
latitude: latitude,
zoom: zoom,
pitch: pitch,
bearing: bearing,
altitude: altitude,
};
},
},
{
key: "_checkStyleSheet",
value: function _checkStyleSheet() {
var mapboxVersion =
arguments.length > 0 &&
arguments[0] !== undefined
? arguments[0]
: "0.47.0";
if (typeof document_ === "undefined") {
return;
}
try {
var testElement =
document_.createElement("div");
testElement.className = "mapboxgl-map";
testElement.style.display = "none";
document_.body.appendChild(testElement);
var isCssLoaded =
window.getComputedStyle(testElement)
.position !== "static";
if (!isCssLoaded) {
var link = document_.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute(
"href",
"https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(
mapboxVersion,
"/mapbox-gl.css"
)
);
document_.head.appendChild(link);
}
} catch (error) {}
},
},
{
key: "_viewStateToMapboxProps",
value: function _viewStateToMapboxProps(viewState) {
return {
center: [
viewState.longitude,
viewState.latitude,
],
zoom: viewState.zoom,
bearing: viewState.bearing,
pitch: viewState.pitch,
};
},
},
]);
return Mapbox;
})();
_defineProperty(Mapbox, "initialized", false);
_defineProperty(Mapbox, "propTypes", propTypes);
_defineProperty(Mapbox, "defaultProps", defaultProps);
_defineProperty(Mapbox, "savedMap", null);
//# sourceMappingURL=mapbox.js.map
// EXTERNAL MODULE: ./node_modules/mapbox-gl/dist/mapbox-gl.js
var mapbox_gl = __webpack_require__(6158);
var mapbox_gl_default =
/*#__PURE__*/ __webpack_require__.n(mapbox_gl); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/mapboxgl.browser.js // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/math-utils.js
//# sourceMappingURL=mapboxgl.browser.js.map
var math_utils_EPSILON = 1e-7;
function isArray(value) {
return Array.isArray(value) || ArrayBuffer.isView(value);
}
function math_utils_equals(a, b) {
if (a === b) {
return true;
}
if (isArray(a) && isArray(b)) {
if (a.length !== b.length) {
return false;
}
for (var i = 0; i < a.length; ++i) {
if (!math_utils_equals(a[i], b[i])) {
return false;
}
}
return true;
}
return Math.abs(a - b) <= math_utils_EPSILON;
}
function math_utils_clamp(value, min, max) {
return Math.max(min, Math.min(max, value));
}
function utils_math_utils_lerp(a, b, t) {
if (isArray(a)) {
return a.map(function (ai, i) {
return utils_math_utils_lerp(ai, b[i], t);
});
}
return t * b + (1 - t) * a;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/assert.js
//# sourceMappingURL=math-utils.js.map
function utils_assert_assert(condition, message) {
if (!condition) {
throw new Error(
message || "react-map-gl: assertion failed."
);
}
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/map-state.js
//# sourceMappingURL=assert.js.map
function map_state_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function map_state_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
map_state_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
map_state_ownKeys(Object(source)).forEach(function (
key
) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var MAPBOX_LIMITS = {
minZoom: 0,
maxZoom: 24,
minPitch: 0,
maxPitch: 85,
};
var DEFAULT_STATE = {
pitch: 0,
bearing: 0,
altitude: 1.5,
};
var PITCH_MOUSE_THRESHOLD = 5;
var PITCH_ACCEL = 1.2;
var MapState = (function () {
function MapState(_ref) {
var width = _ref.width,
height = _ref.height,
latitude = _ref.latitude,
longitude = _ref.longitude,
zoom = _ref.zoom,
_ref$bearing = _ref.bearing,
bearing =
_ref$bearing === void 0
? DEFAULT_STATE.bearing
: _ref$bearing,
_ref$pitch = _ref.pitch,
pitch =
_ref$pitch === void 0
? DEFAULT_STATE.pitch
: _ref$pitch,
_ref$altitude = _ref.altitude,
altitude =
_ref$altitude === void 0
? DEFAULT_STATE.altitude
: _ref$altitude,
_ref$maxZoom = _ref.maxZoom,
maxZoom =
_ref$maxZoom === void 0
? MAPBOX_LIMITS.maxZoom
: _ref$maxZoom,
_ref$minZoom = _ref.minZoom,
minZoom =
_ref$minZoom === void 0
? MAPBOX_LIMITS.minZoom
: _ref$minZoom,
_ref$maxPitch = _ref.maxPitch,
maxPitch =
_ref$maxPitch === void 0
? MAPBOX_LIMITS.maxPitch
: _ref$maxPitch,
_ref$minPitch = _ref.minPitch,
minPitch =
_ref$minPitch === void 0
? MAPBOX_LIMITS.minPitch
: _ref$minPitch,
transitionDuration = _ref.transitionDuration,
transitionEasing = _ref.transitionEasing,
transitionInterpolator = _ref.transitionInterpolator,
transitionInterruption = _ref.transitionInterruption,
startPanLngLat = _ref.startPanLngLat,
startZoomLngLat = _ref.startZoomLngLat,
startRotatePos = _ref.startRotatePos,
startBearing = _ref.startBearing,
startPitch = _ref.startPitch,
startZoom = _ref.startZoom;
_classCallCheck(this, MapState);
utils_assert_assert(
Number.isFinite(width),
"`width` must be supplied"
);
utils_assert_assert(
Number.isFinite(height),
"`height` must be supplied"
);
utils_assert_assert(
Number.isFinite(longitude),
"`longitude` must be supplied"
);
utils_assert_assert(
Number.isFinite(latitude),
"`latitude` must be supplied"
);
utils_assert_assert(
Number.isFinite(zoom),
"`zoom` must be supplied"
);
this._viewportProps = this._applyConstraints({
width: width,
height: height,
latitude: latitude,
longitude: longitude,
zoom: zoom,
bearing: bearing,
pitch: pitch,
altitude: altitude,
maxZoom: maxZoom,
minZoom: minZoom,
maxPitch: maxPitch,
minPitch: minPitch,
transitionDuration: transitionDuration,
transitionEasing: transitionEasing,
transitionInterpolator: transitionInterpolator,
transitionInterruption: transitionInterruption,
});
this._state = {
startPanLngLat: startPanLngLat,
startZoomLngLat: startZoomLngLat,
startRotatePos: startRotatePos,
startBearing: startBearing,
startPitch: startPitch,
startZoom: startZoom,
};
}
_createClass(MapState, [
{
key: "getViewportProps",
value: function getViewportProps() {
return this._viewportProps;
},
},
{
key: "getState",
value: function getState() {
return this._state;
},
},
{
key: "panStart",
value: function panStart(_ref2) {
var pos = _ref2.pos;
return this._getUpdatedMapState({
startPanLngLat: this._unproject(pos),
});
},
},
{
key: "pan",
value: function pan(_ref3) {
var pos = _ref3.pos,
startPos = _ref3.startPos;
var startPanLngLat =
this._state.startPanLngLat ||
this._unproject(startPos);
if (!startPanLngLat) {
return this;
}
var _this$_calculateNewLn =
this._calculateNewLngLat({
startPanLngLat: startPanLngLat,
pos: pos,
}),
_this$_calculateNewLn2 = _slicedToArray(
_this$_calculateNewLn,
2
),
longitude = _this$_calculateNewLn2[0],
latitude = _this$_calculateNewLn2[1];
return this._getUpdatedMapState({
longitude: longitude,
latitude: latitude,
});
},
},
{
key: "panEnd",
value: function panEnd() {
return this._getUpdatedMapState({
startPanLngLat: null,
});
},
},
{
key: "rotateStart",
value: function rotateStart(_ref4) {
var pos = _ref4.pos;
return this._getUpdatedMapState({
startRotatePos: pos,
startBearing: this._viewportProps.bearing,
startPitch: this._viewportProps.pitch,
});
},
},
{
key: "rotate",
value: function rotate(_ref5) {
var pos = _ref5.pos,
_ref5$deltaAngleX = _ref5.deltaAngleX,
deltaAngleX =
_ref5$deltaAngleX === void 0
? 0
: _ref5$deltaAngleX,
_ref5$deltaAngleY = _ref5.deltaAngleY,
deltaAngleY =
_ref5$deltaAngleY === void 0
? 0
: _ref5$deltaAngleY;
var _this$_state = this._state,
startRotatePos = _this$_state.startRotatePos,
startBearing = _this$_state.startBearing,
startPitch = _this$_state.startPitch;
if (
!Number.isFinite(startBearing) ||
!Number.isFinite(startPitch)
) {
return this;
}
var newRotation;
if (pos) {
newRotation = this._calculateNewPitchAndBearing(
map_state_objectSpread(
map_state_objectSpread(
{},
this._getRotationParams(
pos,
startRotatePos
)
),
{},
{
startBearing: startBearing,
startPitch: startPitch,
}
)
);
} else {
newRotation = {
bearing: startBearing + deltaAngleX,
pitch: startPitch + deltaAngleY,
};
}
return this._getUpdatedMapState(newRotation);
},
},
{
key: "rotateEnd",
value: function rotateEnd() {
return this._getUpdatedMapState({
startBearing: null,
startPitch: null,
});
},
},
{
key: "zoomStart",
value: function zoomStart(_ref6) {
var pos = _ref6.pos;
return this._getUpdatedMapState({
startZoomLngLat: this._unproject(pos),
startZoom: this._viewportProps.zoom,
});
},
},
{
key: "zoom",
value: function zoom(_ref7) {
var pos = _ref7.pos,
startPos = _ref7.startPos,
scale = _ref7.scale;
utils_assert_assert(
scale > 0,
"`scale` must be a positive number"
);
var _this$_state2 = this._state,
startZoom = _this$_state2.startZoom,
startZoomLngLat = _this$_state2.startZoomLngLat;
if (!Number.isFinite(startZoom)) {
startZoom = this._viewportProps.zoom;
startZoomLngLat =
this._unproject(startPos) ||
this._unproject(pos);
}
utils_assert_assert(
startZoomLngLat,
"`startZoomLngLat` prop is required " +
"for zoom behavior to calculate where to position the map."
);
var zoom = this._calculateNewZoom({
scale: scale,
startZoom: startZoom || 0,
});
var zoomedViewport = new WebMercatorViewport(
Object.assign({}, this._viewportProps, {
zoom: zoom,
})
);
var _zoomedViewport$getMa =
zoomedViewport.getMapCenterByLngLatPosition(
{
lngLat: startZoomLngLat,
pos: pos,
}
),
_zoomedViewport$getMa2 = _slicedToArray(
_zoomedViewport$getMa,
2
),
longitude = _zoomedViewport$getMa2[0],
latitude = _zoomedViewport$getMa2[1];
return this._getUpdatedMapState({
zoom: zoom,
longitude: longitude,
latitude: latitude,
});
},
},
{
key: "zoomEnd",
value: function zoomEnd() {
return this._getUpdatedMapState({
startZoomLngLat: null,
startZoom: null,
});
},
},
{
key: "_getUpdatedMapState",
value: function _getUpdatedMapState(newProps) {
return new MapState(
Object.assign(
{},
this._viewportProps,
this._state,
newProps
)
);
},
},
{
key: "_applyConstraints",
value: function _applyConstraints(props) {
var maxZoom = props.maxZoom,
minZoom = props.minZoom,
zoom = props.zoom;
props.zoom = math_utils_clamp(
zoom,
minZoom,
maxZoom
);
var maxPitch = props.maxPitch,
minPitch = props.minPitch,
pitch = props.pitch;
props.pitch = math_utils_clamp(
pitch,
minPitch,
maxPitch
);
Object.assign(props, normalizeViewportProps(props));
return props;
},
},
{
key: "_unproject",
value: function _unproject(pos) {
var viewport = new WebMercatorViewport(
this._viewportProps
);
return pos && viewport.unproject(pos);
},
},
{
key: "_calculateNewLngLat",
value: function _calculateNewLngLat(_ref8) {
var startPanLngLat = _ref8.startPanLngLat,
pos = _ref8.pos;
var viewport = new WebMercatorViewport(
this._viewportProps
);
return viewport.getMapCenterByLngLatPosition({
lngLat: startPanLngLat,
pos: pos,
});
},
},
{
key: "_calculateNewZoom",
value: function _calculateNewZoom(_ref9) {
var scale = _ref9.scale,
startZoom = _ref9.startZoom;
var _this$_viewportProps = this._viewportProps,
maxZoom = _this$_viewportProps.maxZoom,
minZoom = _this$_viewportProps.minZoom;
var zoom = startZoom + Math.log2(scale);
return math_utils_clamp(zoom, minZoom, maxZoom);
},
},
{
key: "_calculateNewPitchAndBearing",
value: function _calculateNewPitchAndBearing(_ref10) {
var deltaScaleX = _ref10.deltaScaleX,
deltaScaleY = _ref10.deltaScaleY,
startBearing = _ref10.startBearing,
startPitch = _ref10.startPitch;
deltaScaleY = math_utils_clamp(deltaScaleY, -1, 1);
var _this$_viewportProps2 = this._viewportProps,
minPitch = _this$_viewportProps2.minPitch,
maxPitch = _this$_viewportProps2.maxPitch;
var bearing = startBearing + 180 * deltaScaleX;
var pitch = startPitch;
if (deltaScaleY > 0) {
pitch =
startPitch +
deltaScaleY * (maxPitch - startPitch);
} else if (deltaScaleY < 0) {
pitch =
startPitch -
deltaScaleY * (minPitch - startPitch);
}
return {
pitch: pitch,
bearing: bearing,
};
},
},
{
key: "_getRotationParams",
value: function _getRotationParams(pos, startPos) {
var deltaX = pos[0] - startPos[0];
var deltaY = pos[1] - startPos[1];
var centerY = pos[1];
var startY = startPos[1];
var _this$_viewportProps3 = this._viewportProps,
width = _this$_viewportProps3.width,
height = _this$_viewportProps3.height;
var deltaScaleX = deltaX / width;
var deltaScaleY = 0;
if (deltaY > 0) {
if (
Math.abs(height - startY) >
PITCH_MOUSE_THRESHOLD
) {
deltaScaleY =
(deltaY / (startY - height)) *
PITCH_ACCEL;
}
} else if (deltaY < 0) {
if (startY > PITCH_MOUSE_THRESHOLD) {
deltaScaleY = 1 - centerY / startY;
}
}
deltaScaleY = Math.min(
1,
Math.max(-1, deltaScaleY)
);
return {
deltaScaleX: deltaScaleX,
deltaScaleY: deltaScaleY,
};
},
},
]);
return MapState;
})(); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/map-constraints.js
//# sourceMappingURL=map-state.js.map
function decapitalize(s) {
return s[0].toLowerCase() + s.slice(1);
}
function checkVisibilityConstraints(props) {
var constraints =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: MAPBOX_LIMITS;
for (var constraintName in constraints) {
var type = constraintName.slice(0, 3);
var propName = decapitalize(constraintName.slice(3));
if (
type === "min" &&
props[propName] < constraints[constraintName]
) {
return false;
}
if (
type === "max" &&
props[propName] > constraints[constraintName]
) {
return false;
}
}
return true;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/map-context.js
//# sourceMappingURL=map-constraints.js.map
function map_context_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function map_context_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
map_context_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
map_context_ownKeys(Object(source)).forEach(function (
key
) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var MapContext = (0, react.createContext)({
viewport: null,
map: null,
container: null,
onViewportChange: null,
onViewStateChange: null,
eventManager: null,
});
var MapContextProvider = MapContext.Provider;
function WrappedProvider(_ref) {
var value = _ref.value,
children = _ref.children;
var _useState = (0, react.useState)(null),
_useState2 = _slicedToArray(_useState, 2),
map = _useState2[0],
setMap = _useState2[1];
var context = (0, react.useContext)(MapContext);
value = map_context_objectSpread(
map_context_objectSpread(
{
setMap: setMap,
},
context
),
{},
{
map: (context && context.map) || map,
},
value
);
return react.createElement(
MapContextProvider,
{
value: value,
},
children
);
}
MapContext.Provider = WrappedProvider;
/* harmony default export */ var map_context = MapContext; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/use-isomorphic-layout-effect.js
//# sourceMappingURL=map-context.js.map
var useIsomorphicLayoutEffect =
typeof window !== "undefined"
? react.useLayoutEffect
: react.useEffect;
/* harmony default export */ var use_isomorphic_layout_effect =
useIsomorphicLayoutEffect; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/terrain.js
//# sourceMappingURL=use-isomorphic-layout-effect.js.map
function getTerrainElevation(map, _ref) {
var longitude = _ref.longitude,
latitude = _ref.latitude;
if (map && map.queryTerrainElevation) {
return (
map.queryTerrainElevation([longitude, latitude]) || 0
);
}
return 0;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/static-map.js
//# sourceMappingURL=terrain.js.map
function static_map_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function static_map_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
static_map_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
static_map_ownKeys(Object(source)).forEach(function (
key
) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var TOKEN_DOC_URL =
"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens";
var NO_TOKEN_WARNING =
"A valid API access token is required to use Mapbox data";
function static_map_noop() {}
function getViewport(_ref) {
var map = _ref.map,
props = _ref.props,
width = _ref.width,
height = _ref.height;
var viewportProps = static_map_objectSpread(
static_map_objectSpread(
static_map_objectSpread({}, props),
props.viewState
),
{},
{
width: width,
height: height,
}
);
viewportProps.position = [
0,
0,
getTerrainElevation(map, viewportProps),
];
return new WebMercatorViewport(viewportProps);
}
var UNAUTHORIZED_ERROR_CODE = 401;
var CONTAINER_STYLE = {
position: "absolute",
width: "100%",
height: "100%",
overflow: "hidden",
};
var static_map_propTypes = Object.assign({}, Mapbox.propTypes, {
width: prop_types.oneOfType([
prop_types.number,
prop_types.string,
]),
height: prop_types.oneOfType([
prop_types.number,
prop_types.string,
]),
onResize: prop_types.func,
disableTokenWarning: prop_types.bool,
visible: prop_types.bool,
className: prop_types.string,
style: prop_types.object,
visibilityConstraints: prop_types.object,
});
var static_map_defaultProps = Object.assign(
{},
Mapbox.defaultProps,
{
disableTokenWarning: false,
visible: true,
onResize: static_map_noop,
className: "",
style: null,
visibilityConstraints: MAPBOX_LIMITS,
}
);
function NoTokenWarning() {
var style = {
position: "absolute",
left: 0,
top: 0,
};
return react.createElement(
"div",
{
key: "warning",
id: "no-token-warning",
style: style,
},
react.createElement(
"h3",
{
key: "header",
},
NO_TOKEN_WARNING
),
react.createElement(
"div",
{
key: "text",
},
"For information on setting up your basemap, read"
),
react.createElement(
"a",
{
key: "link",
href: TOKEN_DOC_URL,
},
"Note on Map Tokens"
)
);
}
function getRefHandles(mapboxRef) {
return {
getMap: function getMap() {
return mapboxRef.current && mapboxRef.current.getMap();
},
queryRenderedFeatures: function queryRenderedFeatures(
geometry
) {
var options =
arguments.length > 1 && arguments[1] !== undefined
? arguments[1]
: {};
var map =
mapboxRef.current && mapboxRef.current.getMap();
return (
map && map.queryRenderedFeatures(geometry, options)
);
},
};
}
var StaticMap = (0, react.forwardRef)(function (props, ref) {
var _useState = (0, react.useState)(true),
_useState2 = _slicedToArray(_useState, 2),
accessTokenValid = _useState2[0],
setTokenState = _useState2[1];
var _useState3 = (0, react.useState)({
width: 0,
height: 0,
}),
_useState4 = _slicedToArray(_useState3, 2),
size = _useState4[0],
setSize = _useState4[1];
var mapboxRef = (0, react.useRef)(null);
var mapDivRef = (0, react.useRef)(null);
var containerRef = (0, react.useRef)(null);
var overlayRef = (0, react.useRef)(null);
var context = (0, react.useContext)(map_context);
use_isomorphic_layout_effect(function () {
if (!StaticMap.supported()) {
return undefined;
}
var mapbox = new Mapbox(
static_map_objectSpread(
static_map_objectSpread(
static_map_objectSpread({}, props),
size
),
{},
{
mapboxgl: mapbox_gl_default(),
container: mapDivRef.current,
onError: function onError(evt) {
var statusCode =
(evt.error && evt.error.status) ||
evt.status;
if (
statusCode ===
UNAUTHORIZED_ERROR_CODE &&
accessTokenValid
) {
console.error(NO_TOKEN_WARNING);
setTokenState(false);
}
props.onError(evt);
},
}
)
);
mapboxRef.current = mapbox;
if (context && context.setMap) {
context.setMap(mapbox.getMap());
}
var resizeObserver = new ResizeObserver_es(function (
entries
) {
if (entries[0].contentRect) {
var _entries$0$contentRec = entries[0].contentRect,
_width = _entries$0$contentRec.width,
_height = _entries$0$contentRec.height;
setSize({
width: _width,
height: _height,
});
props.onResize({
width: _width,
height: _height,
});
}
});
resizeObserver.observe(containerRef.current);
return function () {
mapbox.finalize();
mapboxRef.current = null;
resizeObserver.disconnect();
};
}, []);
use_isomorphic_layout_effect(function () {
if (mapboxRef.current) {
mapboxRef.current.setProps(
static_map_objectSpread(
static_map_objectSpread({}, props),
size
)
);
}
});
var map = mapboxRef.current && mapboxRef.current.getMap();
(0, react.useImperativeHandle)(
ref,
function () {
return getRefHandles(mapboxRef);
},
[]
);
var preventScroll = (0, react.useCallback)(function (_ref2) {
var target = _ref2.target;
if (target === overlayRef.current) {
target.scrollTo(0, 0);
}
}, []);
var overlays =
map &&
react.createElement(
MapContextProvider,
{
value: static_map_objectSpread(
static_map_objectSpread({}, context),
{},
{
viewport:
context.viewport ||
getViewport(
static_map_objectSpread(
{
map: map,
props: props,
},
size
)
),
map: map,
container:
context.container ||
containerRef.current,
}
),
},
react.createElement(
"div",
{
key: "map-overlays",
className: "overlays",
ref: overlayRef,
style: CONTAINER_STYLE,
onScroll: preventScroll,
},
props.children
)
);
var className = props.className,
width = props.width,
height = props.height,
style = props.style,
visibilityConstraints = props.visibilityConstraints;
var mapContainerStyle = Object.assign(
{
position: "relative",
},
style,
{
width: width,
height: height,
}
);
var visible =
props.visible &&
checkVisibilityConstraints(
props.viewState || props,
visibilityConstraints
);
var mapStyle = Object.assign({}, CONTAINER_STYLE, {
visibility: visible ? "inherit" : "hidden",
});
return react.createElement(
"div",
{
key: "map-container",
ref: containerRef,
style: mapContainerStyle,
},
react.createElement("div", {
key: "map-mapbox",
ref: mapDivRef,
style: mapStyle,
className: className,
}),
overlays,
!accessTokenValid &&
!props.disableTokenWarning &&
react.createElement(NoTokenWarning, null)
);
});
StaticMap.supported = function () {
return mapbox_gl_default() && mapbox_gl_default().supported();
};
StaticMap.propTypes = static_map_propTypes;
StaticMap.defaultProps = static_map_defaultProps;
/* harmony default export */ var static_map = StaticMap; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition/transition-interpolator.js
//# sourceMappingURL=static-map.js.map
function transition_interpolator_createForOfIteratorHelper(
o,
allowArrayLike
) {
var it;
if (
typeof Symbol === "undefined" ||
o[Symbol.iterator] == null
) {
if (
Array.isArray(o) ||
(it =
transition_interpolator_unsupportedIterableToArray(
o
)) ||
(allowArrayLike && o && typeof o.length === "number")
) {
if (it) o = it;
var i = 0;
var F = function F() {};
return {
s: F,
n: function n() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
},
e: function e(_e) {
throw _e;
},
f: F,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var normalCompletion = true,
didErr = false,
err;
return {
s: function s() {
it = o[Symbol.iterator]();
},
n: function n() {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function e(_e2) {
didErr = true;
err = _e2;
},
f: function f() {
try {
if (!normalCompletion && it["return"] != null)
it["return"]();
} finally {
if (didErr) throw err;
}
},
};
}
function transition_interpolator_unsupportedIterableToArray(
o,
minLen
) {
if (!o) return;
if (typeof o === "string")
return transition_interpolator_arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (
n === "Arguments" ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
)
return transition_interpolator_arrayLikeToArray(o, minLen);
}
function transition_interpolator_arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
var TransitionInterpolator = (function () {
function TransitionInterpolator() {
_classCallCheck(this, TransitionInterpolator);
_defineProperty(this, "propNames", []);
}
_createClass(TransitionInterpolator, [
{
key: "arePropsEqual",
value: function arePropsEqual(currentProps, nextProps) {
var _iterator =
transition_interpolator_createForOfIteratorHelper(
this.propNames || []
),
_step;
try {
for (
_iterator.s();
!(_step = _iterator.n()).done;
) {
var key = _step.value;
if (
!math_utils_equals(
currentProps[key],
nextProps[key]
)
) {
return false;
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return true;
},
},
{
key: "initializeProps",
value: function initializeProps(startProps, endProps) {
return {
start: startProps,
end: endProps,
};
},
},
{
key: "interpolateProps",
value: function interpolateProps(
startProps,
endProps,
t
) {
utils_assert_assert(
false,
"interpolateProps is not implemented"
);
},
},
{
key: "getDuration",
value: function getDuration(startProps, endProps) {
return endProps.transitionDuration;
},
},
]);
return TransitionInterpolator;
})(); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
//# sourceMappingURL=transition-interpolator.js.map
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError(
"this hasn't been initialised - super() hasn't been called"
);
}
return self;
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function _setPrototypeOf(o, p) {
_setPrototypeOf =
Object.setPrototypeOf ||
function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError(
"Super expression must either be null or a function"
);
}
subClass.prototype = Object.create(
superClass && superClass.prototype,
{
constructor: {
value: subClass,
writable: true,
configurable: true,
},
}
);
Object.defineProperty(subClass, "prototype", {
writable: false,
});
if (superClass) _setPrototypeOf(subClass, superClass);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(obj) {
"@babel/helpers - typeof";
return (
(_typeof =
"function" == typeof Symbol &&
"symbol" == typeof Symbol.iterator
? function (obj) {
return typeof obj;
}
: function (obj) {
return obj &&
"function" == typeof Symbol &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? "symbol"
: typeof obj;
}),
_typeof(obj)
);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
function _possibleConstructorReturn(self, call) {
if (
call &&
(_typeof(call) === "object" || typeof call === "function")
) {
return call;
} else if (call !== void 0) {
throw new TypeError(
"Derived constructors may only return object or undefined"
);
}
return _assertThisInitialized(self);
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf
? Object.getPrototypeOf
: function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition/transition-utils.js
var WRAPPED_ANGULAR_PROPS = {
longitude: 1,
bearing: 1,
};
function transition_utils_mod(value, divisor) {
var modulus = value % divisor;
return modulus < 0 ? divisor + modulus : modulus;
}
function isValid(prop) {
return Number.isFinite(prop) || Array.isArray(prop);
}
function isWrappedAngularProp(propName) {
return propName in WRAPPED_ANGULAR_PROPS;
}
function getEndValueByShortestPath(propName, startValue, endValue) {
if (
isWrappedAngularProp(propName) &&
Math.abs(endValue - startValue) > 180
) {
endValue = endValue < 0 ? endValue + 360 : endValue - 360;
}
return endValue;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition/viewport-fly-to-interpolator.js
//# sourceMappingURL=transition-utils.js.map
function viewport_fly_to_interpolator_createForOfIteratorHelper(
o,
allowArrayLike
) {
var it;
if (
typeof Symbol === "undefined" ||
o[Symbol.iterator] == null
) {
if (
Array.isArray(o) ||
(it =
viewport_fly_to_interpolator_unsupportedIterableToArray(
o
)) ||
(allowArrayLike && o && typeof o.length === "number")
) {
if (it) o = it;
var i = 0;
var F = function F() {};
return {
s: F,
n: function n() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
},
e: function e(_e) {
throw _e;
},
f: F,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var normalCompletion = true,
didErr = false,
err;
return {
s: function s() {
it = o[Symbol.iterator]();
},
n: function n() {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function e(_e2) {
didErr = true;
err = _e2;
},
f: function f() {
try {
if (!normalCompletion && it["return"] != null)
it["return"]();
} finally {
if (didErr) throw err;
}
},
};
}
function viewport_fly_to_interpolator_unsupportedIterableToArray(
o,
minLen
) {
if (!o) return;
if (typeof o === "string")
return viewport_fly_to_interpolator_arrayLikeToArray(
o,
minLen
);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (
n === "Arguments" ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
)
return viewport_fly_to_interpolator_arrayLikeToArray(
o,
minLen
);
}
function viewport_fly_to_interpolator_arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
function _createSuper(Derived) {
var hasNativeReflectConstruct = _isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct)
return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(
Reflect.construct(Date, [], function () {})
);
return true;
} catch (e) {
return false;
}
}
var viewport_fly_to_interpolator_VIEWPORT_TRANSITION_PROPS = [
"longitude",
"latitude",
"zoom",
"bearing",
"pitch",
];
var REQUIRED_PROPS = [
"latitude",
"longitude",
"zoom",
"width",
"height",
];
var LINEARLY_INTERPOLATED_PROPS = ["bearing", "pitch"];
var viewport_fly_to_interpolator_DEFAULT_OPTS = {
speed: 1.2,
curve: 1.414,
};
var ViewportFlyToInterpolator = (function (_TransitionInterpolat) {
_inherits(ViewportFlyToInterpolator, _TransitionInterpolat);
var _super = _createSuper(ViewportFlyToInterpolator);
function ViewportFlyToInterpolator() {
var _this;
var props =
arguments.length > 0 && arguments[0] !== undefined
? arguments[0]
: {};
_classCallCheck(this, ViewportFlyToInterpolator);
_this = _super.call(this);
_defineProperty(
_assertThisInitialized(_this),
"propNames",
viewport_fly_to_interpolator_VIEWPORT_TRANSITION_PROPS
);
_this.props = Object.assign(
{},
viewport_fly_to_interpolator_DEFAULT_OPTS,
props
);
return _this;
}
_createClass(ViewportFlyToInterpolator, [
{
key: "initializeProps",
value: function initializeProps(startProps, endProps) {
var startViewportProps = {};
var endViewportProps = {};
var _iterator =
viewport_fly_to_interpolator_createForOfIteratorHelper(
REQUIRED_PROPS
),
_step;
try {
for (
_iterator.s();
!(_step = _iterator.n()).done;
) {
var key = _step.value;
var startValue = startProps[key];
var endValue = endProps[key];
utils_assert_assert(
isValid(startValue) &&
isValid(endValue),
"".concat(
key,
" must be supplied for transition"
)
);
startViewportProps[key] = startValue;
endViewportProps[key] =
getEndValueByShortestPath(
key,
startValue,
endValue
);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
var _iterator2 =
viewport_fly_to_interpolator_createForOfIteratorHelper(
LINEARLY_INTERPOLATED_PROPS
),
_step2;
try {
for (
_iterator2.s();
!(_step2 = _iterator2.n()).done;
) {
var _key = _step2.value;
var _startValue = startProps[_key] || 0;
var _endValue = endProps[_key] || 0;
startViewportProps[_key] = _startValue;
endViewportProps[_key] =
getEndValueByShortestPath(
_key,
_startValue,
_endValue
);
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
return {
start: startViewportProps,
end: endViewportProps,
};
},
},
{
key: "interpolateProps",
value: function interpolateProps(
startProps,
endProps,
t
) {
var viewport = flyToViewport(
startProps,
endProps,
t,
this.props
);
var _iterator3 =
viewport_fly_to_interpolator_createForOfIteratorHelper(
LINEARLY_INTERPOLATED_PROPS
),
_step3;
try {
for (
_iterator3.s();
!(_step3 = _iterator3.n()).done;
) {
var key = _step3.value;
viewport[key] = utils_math_utils_lerp(
startProps[key],
endProps[key],
t
);
}
} catch (err) {
_iterator3.e(err);
} finally {
_iterator3.f();
}
return viewport;
},
},
{
key: "getDuration",
value: function getDuration(startProps, endProps) {
var transitionDuration =
endProps.transitionDuration;
if (transitionDuration === "auto") {
transitionDuration = getFlyToDuration(
startProps,
endProps,
this.props
);
}
return transitionDuration;
},
},
]);
return ViewportFlyToInterpolator;
})(TransitionInterpolator); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition/linear-interpolator.js
//# sourceMappingURL=viewport-fly-to-interpolator.js.map
function linear_interpolator_createForOfIteratorHelper(
o,
allowArrayLike
) {
var it;
if (
typeof Symbol === "undefined" ||
o[Symbol.iterator] == null
) {
if (
Array.isArray(o) ||
(it =
linear_interpolator_unsupportedIterableToArray(
o
)) ||
(allowArrayLike && o && typeof o.length === "number")
) {
if (it) o = it;
var i = 0;
var F = function F() {};
return {
s: F,
n: function n() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
},
e: function e(_e) {
throw _e;
},
f: F,
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var normalCompletion = true,
didErr = false,
err;
return {
s: function s() {
it = o[Symbol.iterator]();
},
n: function n() {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function e(_e2) {
didErr = true;
err = _e2;
},
f: function f() {
try {
if (!normalCompletion && it["return"] != null)
it["return"]();
} finally {
if (didErr) throw err;
}
},
};
}
function linear_interpolator_unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string")
return linear_interpolator_arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (
n === "Arguments" ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
)
return linear_interpolator_arrayLikeToArray(o, minLen);
}
function linear_interpolator_arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
function linear_interpolator_createSuper(Derived) {
var hasNativeReflectConstruct =
linear_interpolator_isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
function linear_interpolator_isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct)
return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(
Reflect.construct(Date, [], function () {})
);
return true;
} catch (e) {
return false;
}
}
var linear_interpolator_VIEWPORT_TRANSITION_PROPS = [
"longitude",
"latitude",
"zoom",
"bearing",
"pitch",
];
var LinearInterpolator = (function (_TransitionInterpolat) {
_inherits(LinearInterpolator, _TransitionInterpolat);
var _super =
linear_interpolator_createSuper(LinearInterpolator);
function LinearInterpolator() {
var _this;
var opts =
arguments.length > 0 && arguments[0] !== undefined
? arguments[0]
: {};
_classCallCheck(this, LinearInterpolator);
_this = _super.call(this);
if (Array.isArray(opts)) {
opts = {
transitionProps: opts,
};
}
_this.propNames =
opts.transitionProps ||
linear_interpolator_VIEWPORT_TRANSITION_PROPS;
if (opts.around) {
_this.around = opts.around;
}
return _this;
}
_createClass(LinearInterpolator, [
{
key: "initializeProps",
value: function initializeProps(startProps, endProps) {
var startViewportProps = {};
var endViewportProps = {};
if (this.around) {
startViewportProps.around = this.around;
var aroundLngLat = new WebMercatorViewport(
startProps
).unproject(this.around);
Object.assign(endViewportProps, endProps, {
around: new WebMercatorViewport(
endProps
).project(aroundLngLat),
aroundLngLat: aroundLngLat,
});
}
var _iterator =
linear_interpolator_createForOfIteratorHelper(
this.propNames
),
_step;
try {
for (
_iterator.s();
!(_step = _iterator.n()).done;
) {
var key = _step.value;
var startValue = startProps[key];
var endValue = endProps[key];
utils_assert_assert(
isValid(startValue) &&
isValid(endValue),
"".concat(
key,
" must be supplied for transition"
)
);
startViewportProps[key] = startValue;
endViewportProps[key] =
getEndValueByShortestPath(
key,
startValue,
endValue
);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return {
start: startViewportProps,
end: endViewportProps,
};
},
},
{
key: "interpolateProps",
value: function interpolateProps(
startProps,
endProps,
t
) {
var viewport = {};
var _iterator2 =
linear_interpolator_createForOfIteratorHelper(
this.propNames
),
_step2;
try {
for (
_iterator2.s();
!(_step2 = _iterator2.n()).done;
) {
var key = _step2.value;
viewport[key] = utils_math_utils_lerp(
startProps[key],
endProps[key],
t
);
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
if (endProps.around) {
var _WebMercatorViewport$ =
new WebMercatorViewport(
Object.assign(
{},
endProps,
viewport
)
).getMapCenterByLngLatPosition({
lngLat: endProps.aroundLngLat,
pos: utils_math_utils_lerp(
startProps.around,
endProps.around,
t
),
}),
_WebMercatorViewport$2 = _slicedToArray(
_WebMercatorViewport$,
2
),
longitude = _WebMercatorViewport$2[0],
latitude = _WebMercatorViewport$2[1];
viewport.longitude = longitude;
viewport.latitude = latitude;
}
return viewport;
},
},
]);
return LinearInterpolator;
})(TransitionInterpolator); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition/index.js // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition-manager.js
//# sourceMappingURL=linear-interpolator.js.map
//# sourceMappingURL=index.js.map
var transition_manager_noop = function noop() {};
function cropEasingFunction(easing, x0) {
var y0 = easing(x0);
return function (t) {
return (1 / (1 - y0)) * (easing(t * (1 - x0) + x0) - y0);
};
}
var TRANSITION_EVENTS = {
BREAK: 1,
SNAP_TO_END: 2,
IGNORE: 3,
UPDATE: 4,
};
var DEFAULT_PROPS = {
transitionDuration: 0,
transitionEasing: function transitionEasing(t) {
return t;
},
transitionInterpolator: new LinearInterpolator(),
transitionInterruption: TRANSITION_EVENTS.BREAK,
onTransitionStart: transition_manager_noop,
onTransitionInterrupt: transition_manager_noop,
onTransitionEnd: transition_manager_noop,
};
var TransitionManager = (function () {
function TransitionManager() {
var _this = this;
var opts =
arguments.length > 0 && arguments[0] !== undefined
? arguments[0]
: {};
_classCallCheck(this, TransitionManager);
_defineProperty(this, "_animationFrame", null);
_defineProperty(this, "_onTransitionFrame", function () {
_this._animationFrame = requestAnimationFrame(
_this._onTransitionFrame
);
_this._updateViewport();
});
this.props = null;
this.onViewportChange =
opts.onViewportChange || transition_manager_noop;
this.onStateChange =
opts.onStateChange || transition_manager_noop;
this.time = opts.getTime || Date.now;
}
_createClass(TransitionManager, [
{
key: "getViewportInTransition",
value: function getViewportInTransition() {
return this._animationFrame
? this.state.propsInTransition
: null;
},
},
{
key: "processViewportChange",
value: function processViewportChange(nextProps) {
var currentProps = this.props;
this.props = nextProps;
if (
!currentProps ||
this._shouldIgnoreViewportChange(
currentProps,
nextProps
)
) {
return false;
}
if (this._isTransitionEnabled(nextProps)) {
var startProps = Object.assign(
{},
currentProps
);
var endProps = Object.assign({}, nextProps);
if (this._isTransitionInProgress()) {
currentProps.onTransitionInterrupt();
if (
this.state.interruption ===
TRANSITION_EVENTS.SNAP_TO_END
) {
Object.assign(
startProps,
this.state.endProps
);
} else {
Object.assign(
startProps,
this.state.propsInTransition
);
}
if (
this.state.interruption ===
TRANSITION_EVENTS.UPDATE
) {
var currentTime = this.time();
var x0 =
(currentTime -
this.state.startTime) /
this.state.duration;
endProps.transitionDuration =
this.state.duration -
(currentTime -
this.state.startTime);
endProps.transitionEasing =
cropEasingFunction(
this.state.easing,
x0
);
endProps.transitionInterpolator =
startProps.transitionInterpolator;
}
}
endProps.onTransitionStart();
this._triggerTransition(startProps, endProps);
return true;
}
if (this._isTransitionInProgress()) {
currentProps.onTransitionInterrupt();
this._endTransition();
}
return false;
},
},
{
key: "_isTransitionInProgress",
value: function _isTransitionInProgress() {
return Boolean(this._animationFrame);
},
},
{
key: "_isTransitionEnabled",
value: function _isTransitionEnabled(props) {
var transitionDuration = props.transitionDuration,
transitionInterpolator =
props.transitionInterpolator;
return (
(transitionDuration > 0 ||
transitionDuration === "auto") &&
Boolean(transitionInterpolator)
);
},
},
{
key: "_isUpdateDueToCurrentTransition",
value: function _isUpdateDueToCurrentTransition(props) {
if (this.state.propsInTransition) {
return this.state.interpolator.arePropsEqual(
props,
this.state.propsInTransition
);
}
return false;
},
},
{
key: "_shouldIgnoreViewportChange",
value: function _shouldIgnoreViewportChange(
currentProps,
nextProps
) {
if (!currentProps) {
return true;
}
if (this._isTransitionInProgress()) {
return (
this.state.interruption ===
TRANSITION_EVENTS.IGNORE ||
this._isUpdateDueToCurrentTransition(
nextProps
)
);
}
if (this._isTransitionEnabled(nextProps)) {
return nextProps.transitionInterpolator.arePropsEqual(
currentProps,
nextProps
);
}
return true;
},
},
{
key: "_triggerTransition",
value: function _triggerTransition(
startProps,
endProps
) {
utils_assert_assert(
this._isTransitionEnabled(endProps)
);
if (this._animationFrame) {
cancelAnimationFrame(this._animationFrame);
}
var transitionInterpolator =
endProps.transitionInterpolator;
var duration = transitionInterpolator.getDuration
? transitionInterpolator.getDuration(
startProps,
endProps
)
: endProps.transitionDuration;
if (duration === 0) {
return;
}
var initialProps =
endProps.transitionInterpolator.initializeProps(
startProps,
endProps
);
var interactionState = {
inTransition: true,
isZooming: startProps.zoom !== endProps.zoom,
isPanning:
startProps.longitude !==
endProps.longitude ||
startProps.latitude !== endProps.latitude,
isRotating:
startProps.bearing !== endProps.bearing ||
startProps.pitch !== endProps.pitch,
};
this.state = {
duration: duration,
easing: endProps.transitionEasing,
interpolator: endProps.transitionInterpolator,
interruption: endProps.transitionInterruption,
startTime: this.time(),
startProps: initialProps.start,
endProps: initialProps.end,
animation: null,
propsInTransition: {},
};
this._onTransitionFrame();
this.onStateChange(interactionState);
},
},
{
key: "_endTransition",
value: function _endTransition() {
if (this._animationFrame) {
cancelAnimationFrame(this._animationFrame);
this._animationFrame = null;
}
this.onStateChange({
inTransition: false,
isZooming: false,
isPanning: false,
isRotating: false,
});
},
},
{
key: "_updateViewport",
value: function _updateViewport() {
var currentTime = this.time();
var _this$state = this.state,
startTime = _this$state.startTime,
duration = _this$state.duration,
easing = _this$state.easing,
interpolator = _this$state.interpolator,
startProps = _this$state.startProps,
endProps = _this$state.endProps;
var shouldEnd = false;
var t = (currentTime - startTime) / duration;
if (t >= 1) {
t = 1;
shouldEnd = true;
}
t = easing(t);
var viewport = interpolator.interpolateProps(
startProps,
endProps,
t
);
var mapState = new MapState(
Object.assign({}, this.props, viewport)
);
this.state.propsInTransition =
mapState.getViewportProps();
this.onViewportChange(
this.state.propsInTransition,
this.props
);
if (shouldEnd) {
this._endTransition();
this.props.onTransitionEnd();
}
},
},
]);
return TransitionManager;
})();
_defineProperty(TransitionManager, "defaultProps", DEFAULT_PROPS);
//# sourceMappingURL=transition-manager.js.map
// EXTERNAL MODULE: ./node_modules/hammerjs/hammer.js
var hammer = __webpack_require__(840);
var hammer_default = /*#__PURE__*/ __webpack_require__.n(hammer); // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/utils/hammer-overrides.js
const INPUT_START = 1;
const INPUT_MOVE = 2;
const INPUT_END = 4;
const MOUSE_INPUT_MAP = {
mousedown: INPUT_START,
mousemove: INPUT_MOVE,
mouseup: INPUT_END,
};
function some(array, predict) {
for (let i = 0; i < array.length; i++) {
if (predict(array[i])) {
return true;
}
}
return false;
}
function enhancePointerEventInput(PointerEventInput) {
const oldHandler = PointerEventInput.prototype.handler;
PointerEventInput.prototype.handler = function handler(ev) {
const store = this.store;
if (ev.button > 0 && ev.type === "pointerdown") {
if (!some(store, (e) => e.pointerId === ev.pointerId)) {
store.push(ev);
}
}
oldHandler.call(this, ev);
};
}
function enhanceMouseInput(MouseInput) {
MouseInput.prototype.handler = function handler(ev) {
let eventType = MOUSE_INPUT_MAP[ev.type];
if (eventType & INPUT_START && ev.button >= 0) {
this.pressed = true;
}
if (eventType & INPUT_MOVE && ev.which === 0) {
eventType = INPUT_END;
}
if (!this.pressed) {
return;
}
if (eventType & INPUT_END) {
this.pressed = false;
}
this.callback(this.manager, eventType, {
pointers: [ev],
changedPointers: [ev],
pointerType: "mouse",
srcEvent: ev,
});
};
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/utils/hammer.browser.js
//# sourceMappingURL=hammer-overrides.js.map
enhancePointerEventInput(hammer_default().PointerEventInput);
enhanceMouseInput(hammer_default().MouseInput);
const Manager = hammer_default().Manager;
/* harmony default export */ var hammer_browser = hammer_default(); // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/constants.js
//# sourceMappingURL=hammer.browser.js.map
const RECOGNIZERS = hammer_browser
? [
[
hammer_browser.Pan,
{
event: "tripan",
pointers: 3,
threshold: 0,
enable: false,
},
],
[
hammer_browser.Rotate,
{
enable: false,
},
],
[
hammer_browser.Pinch,
{
enable: false,
},
],
[
hammer_browser.Swipe,
{
enable: false,
},
],
[
hammer_browser.Pan,
{
threshold: 0,
enable: false,
},
],
[
hammer_browser.Press,
{
enable: false,
},
],
[
hammer_browser.Tap,
{
event: "doubletap",
taps: 2,
enable: false,
},
],
[
hammer_browser.Tap,
{
event: "anytap",
enable: false,
},
],
[
hammer_browser.Tap,
{
enable: false,
},
],
]
: null;
const RECOGNIZER_COMPATIBLE_MAP = {
tripan: ["rotate", "pinch", "pan"],
rotate: ["pinch"],
pinch: ["pan"],
pan: ["press", "doubletap", "anytap", "tap"],
doubletap: ["anytap"],
anytap: ["tap"],
};
const RECOGNIZER_FALLBACK_MAP = {
doubletap: ["tap"],
};
const BASIC_EVENT_ALIASES = {
pointerdown: "pointerdown",
pointermove: "pointermove",
pointerup: "pointerup",
touchstart: "pointerdown",
touchmove: "pointermove",
touchend: "pointerup",
mousedown: "pointerdown",
mousemove: "pointermove",
mouseup: "pointerup",
};
const INPUT_EVENT_TYPES = {
KEY_EVENTS: ["keydown", "keyup"],
MOUSE_EVENTS: [
"mousedown",
"mousemove",
"mouseup",
"mouseover",
"mouseout",
"mouseleave",
],
WHEEL_EVENTS: ["wheel", "mousewheel"],
};
const EVENT_RECOGNIZER_MAP = {
tap: "tap",
anytap: "anytap",
doubletap: "doubletap",
press: "press",
pinch: "pinch",
pinchin: "pinch",
pinchout: "pinch",
pinchstart: "pinch",
pinchmove: "pinch",
pinchend: "pinch",
pinchcancel: "pinch",
rotate: "rotate",
rotatestart: "rotate",
rotatemove: "rotate",
rotateend: "rotate",
rotatecancel: "rotate",
tripan: "tripan",
tripanstart: "tripan",
tripanmove: "tripan",
tripanup: "tripan",
tripandown: "tripan",
tripanleft: "tripan",
tripanright: "tripan",
tripanend: "tripan",
tripancancel: "tripan",
pan: "pan",
panstart: "pan",
panmove: "pan",
panup: "pan",
pandown: "pan",
panleft: "pan",
panright: "pan",
panend: "pan",
pancancel: "pan",
swipe: "swipe",
swipeleft: "swipe",
swiperight: "swipe",
swipeup: "swipe",
swipedown: "swipe",
};
const GESTURE_EVENT_ALIASES = {
click: "tap",
anyclick: "anytap",
dblclick: "doubletap",
mousedown: "pointerdown",
mousemove: "pointermove",
mouseup: "pointerup",
mouseover: "pointerover",
mouseout: "pointerout",
mouseleave: "pointerleave",
}; // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/utils/globals.js
//# sourceMappingURL=constants.js.map
const userAgent =
typeof navigator !== "undefined" && navigator.userAgent
? navigator.userAgent.toLowerCase()
: "";
const globals_window_ =
typeof window !== "undefined" ? window : __webpack_require__.g;
const globals_global_ =
typeof __webpack_require__.g !== "undefined"
? __webpack_require__.g
: window;
const globals_document_ =
typeof document !== "undefined" ? document : {};
let passiveSupported = false;
try {
const options = {
get passive() {
passiveSupported = true;
return true;
},
};
globals_window_.addEventListener("test", options, options);
globals_window_.removeEventListener("test", options, options);
} catch (err) {} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/wheel-input.js
//# sourceMappingURL=globals.js.map
const firefox = userAgent.indexOf("firefox") !== -1;
const { WHEEL_EVENTS } = INPUT_EVENT_TYPES;
const EVENT_TYPE = "wheel";
const WHEEL_DELTA_MAGIC_SCALER = 4.000244140625;
const WHEEL_DELTA_PER_LINE = 40;
const SHIFT_MULTIPLIER = 0.25;
class WheelInput {
constructor(element, callback, options = {}) {
this.element = element;
this.callback = callback;
this.options = Object.assign(
{
enable: true,
},
options
);
this.events = WHEEL_EVENTS.concat(options.events || []);
this.handleEvent = this.handleEvent.bind(this);
this.events.forEach((event) =>
element.addEventListener(
event,
this.handleEvent,
passiveSupported
? {
passive: false,
}
: false
)
);
}
destroy() {
this.events.forEach((event) =>
this.element.removeEventListener(
event,
this.handleEvent
)
);
}
enableEventType(eventType, enabled) {
if (eventType === EVENT_TYPE) {
this.options.enable = enabled;
}
}
handleEvent(event) {
if (!this.options.enable) {
return;
}
let value = event.deltaY;
if (globals_window_.WheelEvent) {
if (
firefox &&
event.deltaMode ===
globals_window_.WheelEvent.DOM_DELTA_PIXEL
) {
value /= globals_window_.devicePixelRatio;
}
if (
event.deltaMode ===
globals_window_.WheelEvent.DOM_DELTA_LINE
) {
value *= WHEEL_DELTA_PER_LINE;
}
}
const wheelPosition = {
x: event.clientX,
y: event.clientY,
};
if (value !== 0 && value % WHEEL_DELTA_MAGIC_SCALER === 0) {
value = Math.floor(value / WHEEL_DELTA_MAGIC_SCALER);
}
if (event.shiftKey && value) {
value = value * SHIFT_MULTIPLIER;
}
this._onWheel(event, -value, wheelPosition);
}
_onWheel(srcEvent, delta, position) {
this.callback({
type: EVENT_TYPE,
center: position,
delta,
srcEvent,
pointerType: "mouse",
target: srcEvent.target,
});
}
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/move-input.js
//# sourceMappingURL=wheel-input.js.map
const { MOUSE_EVENTS } = INPUT_EVENT_TYPES;
const MOVE_EVENT_TYPE = "pointermove";
const OVER_EVENT_TYPE = "pointerover";
const OUT_EVENT_TYPE = "pointerout";
const LEAVE_EVENT_TYPE = "pointerleave";
class MoveInput {
constructor(element, callback, options = {}) {
this.element = element;
this.callback = callback;
this.pressed = false;
this.options = Object.assign(
{
enable: true,
},
options
);
this.enableMoveEvent = this.options.enable;
this.enableLeaveEvent = this.options.enable;
this.enableOutEvent = this.options.enable;
this.enableOverEvent = this.options.enable;
this.events = MOUSE_EVENTS.concat(options.events || []);
this.handleEvent = this.handleEvent.bind(this);
this.events.forEach((event) =>
element.addEventListener(event, this.handleEvent)
);
}
destroy() {
this.events.forEach((event) =>
this.element.removeEventListener(
event,
this.handleEvent
)
);
}
enableEventType(eventType, enabled) {
if (eventType === MOVE_EVENT_TYPE) {
this.enableMoveEvent = enabled;
}
if (eventType === OVER_EVENT_TYPE) {
this.enableOverEvent = enabled;
}
if (eventType === OUT_EVENT_TYPE) {
this.enableOutEvent = enabled;
}
if (eventType === LEAVE_EVENT_TYPE) {
this.enableLeaveEvent = enabled;
}
}
handleEvent(event) {
this.handleOverEvent(event);
this.handleOutEvent(event);
this.handleLeaveEvent(event);
this.handleMoveEvent(event);
}
handleOverEvent(event) {
if (this.enableOverEvent) {
if (event.type === "mouseover") {
this.callback({
type: OVER_EVENT_TYPE,
srcEvent: event,
pointerType: "mouse",
target: event.target,
});
}
}
}
handleOutEvent(event) {
if (this.enableOutEvent) {
if (event.type === "mouseout") {
this.callback({
type: OUT_EVENT_TYPE,
srcEvent: event,
pointerType: "mouse",
target: event.target,
});
}
}
}
handleLeaveEvent(event) {
if (this.enableLeaveEvent) {
if (event.type === "mouseleave") {
this.callback({
type: LEAVE_EVENT_TYPE,
srcEvent: event,
pointerType: "mouse",
target: event.target,
});
}
}
}
handleMoveEvent(event) {
if (this.enableMoveEvent) {
switch (event.type) {
case "mousedown":
if (event.button >= 0) {
this.pressed = true;
}
break;
case "mousemove":
if (event.which === 0) {
this.pressed = false;
}
if (!this.pressed) {
this.callback({
type: MOVE_EVENT_TYPE,
srcEvent: event,
pointerType: "mouse",
target: event.target,
});
}
break;
case "mouseup":
this.pressed = false;
break;
default:
}
}
}
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/key-input.js
//# sourceMappingURL=move-input.js.map
const { KEY_EVENTS } = INPUT_EVENT_TYPES;
const DOWN_EVENT_TYPE = "keydown";
const UP_EVENT_TYPE = "keyup";
class KeyInput {
constructor(element, callback, options = {}) {
this.element = element;
this.callback = callback;
this.options = Object.assign(
{
enable: true,
},
options
);
this.enableDownEvent = this.options.enable;
this.enableUpEvent = this.options.enable;
this.events = KEY_EVENTS.concat(options.events || []);
this.handleEvent = this.handleEvent.bind(this);
element.tabIndex = options.tabIndex || 0;
element.style.outline = "none";
this.events.forEach((event) =>
element.addEventListener(event, this.handleEvent)
);
}
destroy() {
this.events.forEach((event) =>
this.element.removeEventListener(
event,
this.handleEvent
)
);
}
enableEventType(eventType, enabled) {
if (eventType === DOWN_EVENT_TYPE) {
this.enableDownEvent = enabled;
}
if (eventType === UP_EVENT_TYPE) {
this.enableUpEvent = enabled;
}
}
handleEvent(event) {
const targetElement = event.target || event.srcElement;
if (
(targetElement.tagName === "INPUT" &&
targetElement.type === "text") ||
targetElement.tagName === "TEXTAREA"
) {
return;
}
if (this.enableDownEvent && event.type === "keydown") {
this.callback({
type: DOWN_EVENT_TYPE,
srcEvent: event,
key: event.key,
target: event.target,
});
}
if (this.enableUpEvent && event.type === "keyup") {
this.callback({
type: UP_EVENT_TYPE,
srcEvent: event,
key: event.key,
target: event.target,
});
}
}
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/contextmenu-input.js
//# sourceMappingURL=key-input.js.map
const contextmenu_input_EVENT_TYPE = "contextmenu";
class ContextmenuInput {
constructor(element, callback, options = {}) {
this.element = element;
this.callback = callback;
this.options = Object.assign(
{
enable: true,
},
options
);
this.handleEvent = this.handleEvent.bind(this);
element.addEventListener("contextmenu", this.handleEvent);
}
destroy() {
this.element.removeEventListener(
"contextmenu",
this.handleEvent
);
}
enableEventType(eventType, enabled) {
if (eventType === contextmenu_input_EVENT_TYPE) {
this.options.enable = enabled;
}
}
handleEvent(event) {
if (!this.options.enable) {
return;
}
this.callback({
type: contextmenu_input_EVENT_TYPE,
center: {
x: event.clientX,
y: event.clientY,
},
srcEvent: event,
pointerType: "mouse",
target: event.target,
});
}
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/utils/event-utils.js
//# sourceMappingURL=contextmenu-input.js.map
const DOWN_EVENT = 1;
const MOVE_EVENT = 2;
const UP_EVENT = 4;
const event_utils_MOUSE_EVENTS = {
pointerdown: DOWN_EVENT,
pointermove: MOVE_EVENT,
pointerup: UP_EVENT,
mousedown: DOWN_EVENT,
mousemove: MOVE_EVENT,
mouseup: UP_EVENT,
};
const MOUSE_EVENT_WHICH_LEFT = 1;
const MOUSE_EVENT_WHICH_MIDDLE = 2;
const MOUSE_EVENT_WHICH_RIGHT = 3;
const MOUSE_EVENT_BUTTON_LEFT = 0;
const MOUSE_EVENT_BUTTON_MIDDLE = 1;
const MOUSE_EVENT_BUTTON_RIGHT = 2;
const MOUSE_EVENT_BUTTONS_LEFT_MASK = 1;
const MOUSE_EVENT_BUTTONS_RIGHT_MASK = 2;
const MOUSE_EVENT_BUTTONS_MIDDLE_MASK = 4;
function whichButtons(event) {
const eventType = event_utils_MOUSE_EVENTS[event.srcEvent.type];
if (!eventType) {
return null;
}
const { buttons, button, which } = event.srcEvent;
let leftButton = false;
let middleButton = false;
let rightButton = false;
if (
eventType === UP_EVENT ||
(eventType === MOVE_EVENT && !Number.isFinite(buttons))
) {
leftButton = which === MOUSE_EVENT_WHICH_LEFT;
middleButton = which === MOUSE_EVENT_WHICH_MIDDLE;
rightButton = which === MOUSE_EVENT_WHICH_RIGHT;
} else if (eventType === MOVE_EVENT) {
leftButton = Boolean(
buttons & MOUSE_EVENT_BUTTONS_LEFT_MASK
);
middleButton = Boolean(
buttons & MOUSE_EVENT_BUTTONS_MIDDLE_MASK
);
rightButton = Boolean(
buttons & MOUSE_EVENT_BUTTONS_RIGHT_MASK
);
} else if (eventType === DOWN_EVENT) {
leftButton = button === MOUSE_EVENT_BUTTON_LEFT;
middleButton = button === MOUSE_EVENT_BUTTON_MIDDLE;
rightButton = button === MOUSE_EVENT_BUTTON_RIGHT;
}
return {
leftButton,
middleButton,
rightButton,
};
}
function getOffsetPosition(event, rootElement) {
const { srcEvent } = event;
if (!event.center && !Number.isFinite(srcEvent.clientX)) {
return null;
}
const center = event.center || {
x: srcEvent.clientX,
y: srcEvent.clientY,
};
const rect = rootElement.getBoundingClientRect();
const scaleX = rect.width / rootElement.offsetWidth || 1;
const scaleY = rect.height / rootElement.offsetHeight || 1;
const offsetCenter = {
x: (center.x - rect.left - rootElement.clientLeft) / scaleX,
y: (center.y - rect.top - rootElement.clientTop) / scaleY,
};
return {
center,
offsetCenter,
};
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/utils/event-registrar.js
//# sourceMappingURL=event-utils.js.map
const DEFAULT_OPTIONS = {
srcElement: "root",
priority: 0,
};
class EventRegistrar {
constructor(eventManager) {
this.eventManager = eventManager;
this.handlers = [];
this.handlersByElement = new Map();
this.handleEvent = this.handleEvent.bind(this);
this._active = false;
}
isEmpty() {
return !this._active;
}
add(type, handler, opts, once = false, passive = false) {
const { handlers, handlersByElement } = this;
if (
opts &&
(typeof opts !== "object" || opts.addEventListener)
) {
opts = {
srcElement: opts,
};
}
opts = opts
? Object.assign({}, DEFAULT_OPTIONS, opts)
: DEFAULT_OPTIONS;
let entries = handlersByElement.get(opts.srcElement);
if (!entries) {
entries = [];
handlersByElement.set(opts.srcElement, entries);
}
const entry = {
type,
handler,
srcElement: opts.srcElement,
priority: opts.priority,
};
if (once) {
entry.once = true;
}
if (passive) {
entry.passive = true;
}
handlers.push(entry);
this._active = this._active || !entry.passive;
let insertPosition = entries.length - 1;
while (insertPosition >= 0) {
if (
entries[insertPosition].priority >= entry.priority
) {
break;
}
insertPosition--;
}
entries.splice(insertPosition + 1, 0, entry);
}
remove(type, handler) {
const { handlers, handlersByElement } = this;
for (let i = handlers.length - 1; i >= 0; i--) {
const entry = handlers[i];
if (entry.type === type && entry.handler === handler) {
handlers.splice(i, 1);
const entries = handlersByElement.get(
entry.srcElement
);
entries.splice(entries.indexOf(entry), 1);
if (entries.length === 0) {
handlersByElement.delete(entry.srcElement);
}
}
}
this._active = handlers.some((entry) => !entry.passive);
}
handleEvent(event) {
if (this.isEmpty()) {
return;
}
const mjolnirEvent = this._normalizeEvent(event);
let target = event.srcEvent.target;
while (target && target !== mjolnirEvent.rootElement) {
this._emit(mjolnirEvent, target);
if (mjolnirEvent.handled) {
return;
}
target = target.parentNode;
}
this._emit(mjolnirEvent, "root");
}
_emit(event, srcElement) {
const entries = this.handlersByElement.get(srcElement);
if (entries) {
let immediatePropagationStopped = false;
const stopPropagation = () => {
event.handled = true;
};
const stopImmediatePropagation = () => {
event.handled = true;
immediatePropagationStopped = true;
};
const entriesToRemove = [];
for (let i = 0; i < entries.length; i++) {
const { type, handler, once } = entries[i];
handler(
Object.assign({}, event, {
type,
stopPropagation,
stopImmediatePropagation,
})
);
if (once) {
entriesToRemove.push(entries[i]);
}
if (immediatePropagationStopped) {
break;
}
}
for (let i = 0; i < entriesToRemove.length; i++) {
const { type, handler } = entriesToRemove[i];
this.remove(type, handler);
}
}
}
_normalizeEvent(event) {
const rootElement = this.eventManager.element;
return Object.assign(
{},
event,
whichButtons(event),
getOffsetPosition(event, rootElement),
{
handled: false,
rootElement,
}
);
}
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/event-manager.js
//# sourceMappingURL=event-registrar.js.map
const event_manager_DEFAULT_OPTIONS = {
events: null,
recognizers: null,
recognizerOptions: {},
Manager: Manager,
touchAction: "none",
tabIndex: 0,
};
class EventManager {
constructor(element = null, options = {}) {
this.options = Object.assign(
{},
event_manager_DEFAULT_OPTIONS,
options
);
this.events = new Map();
this._onBasicInput = this._onBasicInput.bind(this);
this._onOtherEvent = this._onOtherEvent.bind(this);
this.setElement(element);
const { events } = options;
if (events) {
this.on(events);
}
}
setElement(element) {
if (this.element) {
this.destroy();
}
this.element = element;
if (!element) {
return;
}
const { options } = this;
const ManagerClass = options.Manager;
this.manager = new ManagerClass(element, {
touchAction: options.touchAction,
recognizers: options.recognizers || RECOGNIZERS,
}).on("hammer.input", this._onBasicInput);
if (!options.recognizers) {
Object.keys(RECOGNIZER_COMPATIBLE_MAP).forEach(
(name) => {
const recognizer = this.manager.get(name);
if (recognizer) {
RECOGNIZER_COMPATIBLE_MAP[name].forEach(
(otherName) => {
recognizer.recognizeWith(otherName);
}
);
}
}
);
}
for (const recognizerName in options.recognizerOptions) {
const recognizer = this.manager.get(recognizerName);
if (recognizer) {
const recognizerOption =
options.recognizerOptions[recognizerName];
delete recognizerOption.enable;
recognizer.set(recognizerOption);
}
}
this.wheelInput = new WheelInput(
element,
this._onOtherEvent,
{
enable: false,
}
);
this.moveInput = new MoveInput(
element,
this._onOtherEvent,
{
enable: false,
}
);
this.keyInput = new KeyInput(element, this._onOtherEvent, {
enable: false,
tabIndex: options.tabIndex,
});
this.contextmenuInput = new ContextmenuInput(
element,
this._onOtherEvent,
{
enable: false,
}
);
for (const [eventAlias, eventRegistrar] of this.events) {
if (!eventRegistrar.isEmpty()) {
this._toggleRecognizer(
eventRegistrar.recognizerName,
true
);
this.manager.on(
eventAlias,
eventRegistrar.handleEvent
);
}
}
}
destroy() {
if (this.element) {
this.wheelInput.destroy();
this.moveInput.destroy();
this.keyInput.destroy();
this.contextmenuInput.destroy();
this.manager.destroy();
this.wheelInput = null;
this.moveInput = null;
this.keyInput = null;
this.contextmenuInput = null;
this.manager = null;
this.element = null;
}
}
on(event, handler, opts) {
this._addEventHandler(event, handler, opts, false);
}
once(event, handler, opts) {
this._addEventHandler(event, handler, opts, true);
}
watch(event, handler, opts) {
this._addEventHandler(event, handler, opts, false, true);
}
off(event, handler) {
this._removeEventHandler(event, handler);
}
_toggleRecognizer(name, enabled) {
const { manager } = this;
if (!manager) {
return;
}
const recognizer = manager.get(name);
if (recognizer && recognizer.options.enable !== enabled) {
recognizer.set({
enable: enabled,
});
const fallbackRecognizers =
RECOGNIZER_FALLBACK_MAP[name];
if (fallbackRecognizers && !this.options.recognizers) {
fallbackRecognizers.forEach((otherName) => {
const otherRecognizer = manager.get(otherName);
if (enabled) {
otherRecognizer.requireFailure(name);
recognizer.dropRequireFailure(otherName);
} else {
otherRecognizer.dropRequireFailure(name);
}
});
}
}
this.wheelInput.enableEventType(name, enabled);
this.moveInput.enableEventType(name, enabled);
this.keyInput.enableEventType(name, enabled);
this.contextmenuInput.enableEventType(name, enabled);
}
_addEventHandler(event, handler, opts, once, passive) {
if (typeof event !== "string") {
opts = handler;
for (const eventName in event) {
this._addEventHandler(
eventName,
event[eventName],
opts,
once,
passive
);
}
return;
}
const { manager, events } = this;
const eventAlias = GESTURE_EVENT_ALIASES[event] || event;
let eventRegistrar = events.get(eventAlias);
if (!eventRegistrar) {
eventRegistrar = new EventRegistrar(this);
events.set(eventAlias, eventRegistrar);
eventRegistrar.recognizerName =
EVENT_RECOGNIZER_MAP[eventAlias] || eventAlias;
if (manager) {
manager.on(eventAlias, eventRegistrar.handleEvent);
}
}
eventRegistrar.add(event, handler, opts, once, passive);
if (!eventRegistrar.isEmpty()) {
this._toggleRecognizer(
eventRegistrar.recognizerName,
true
);
}
}
_removeEventHandler(event, handler) {
if (typeof event !== "string") {
for (const eventName in event) {
this._removeEventHandler(
eventName,
event[eventName]
);
}
return;
}
const { events } = this;
const eventAlias = GESTURE_EVENT_ALIASES[event] || event;
const eventRegistrar = events.get(eventAlias);
if (!eventRegistrar) {
return;
}
eventRegistrar.remove(event, handler);
if (eventRegistrar.isEmpty()) {
const { recognizerName } = eventRegistrar;
let isRecognizerUsed = false;
for (const eh of events.values()) {
if (
eh.recognizerName === recognizerName &&
!eh.isEmpty()
) {
isRecognizerUsed = true;
break;
}
}
if (!isRecognizerUsed) {
this._toggleRecognizer(recognizerName, false);
}
}
}
_onBasicInput(event) {
const { srcEvent } = event;
const alias = BASIC_EVENT_ALIASES[srcEvent.type];
if (alias) {
this.manager.emit(alias, event);
}
}
_onOtherEvent(event) {
this.manager.emit(event.type, event);
}
} // CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/index.js // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/map-controller.js
//# sourceMappingURL=event-manager.js.map
//# sourceMappingURL=index.js.map
function map_controller_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function map_controller_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
map_controller_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
map_controller_ownKeys(Object(source)).forEach(
function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
}
);
}
}
return target;
}
var NO_TRANSITION_PROPS = {
transitionDuration: 0,
};
var LINEAR_TRANSITION_PROPS = {
transitionDuration: 300,
transitionEasing: function transitionEasing(t) {
return t;
},
transitionInterpolator: new LinearInterpolator(),
transitionInterruption: TRANSITION_EVENTS.BREAK,
};
var DEFAULT_INERTIA = 300;
var INERTIA_EASING = function INERTIA_EASING(t) {
return 1 - (1 - t) * (1 - t);
};
var EVENT_TYPES = {
WHEEL: ["wheel"],
PAN: ["panstart", "panmove", "panend"],
PINCH: ["pinchstart", "pinchmove", "pinchend"],
TRIPLE_PAN: ["tripanstart", "tripanmove", "tripanend"],
DOUBLE_TAP: ["doubletap"],
KEYBOARD: ["keydown"],
};
var MapController = (function () {
function MapController() {
var _this = this;
_classCallCheck(this, MapController);
_defineProperty(this, "events", []);
_defineProperty(this, "scrollZoom", true);
_defineProperty(this, "dragPan", true);
_defineProperty(this, "dragRotate", true);
_defineProperty(this, "doubleClickZoom", true);
_defineProperty(this, "touchZoom", true);
_defineProperty(this, "touchRotate", false);
_defineProperty(this, "keyboard", true);
_defineProperty(this, "_interactionState", {
isDragging: false,
});
_defineProperty(this, "_events", {});
_defineProperty(
this,
"_setInteractionState",
function (newState) {
Object.assign(_this._interactionState, newState);
if (_this.onStateChange) {
_this.onStateChange(_this._interactionState);
}
}
);
_defineProperty(
this,
"_onTransition",
function (newViewport, oldViewport) {
_this.onViewportChange(
newViewport,
_this._interactionState,
oldViewport
);
}
);
this.handleEvent = this.handleEvent.bind(this);
this._transitionManager = new TransitionManager({
onViewportChange: this._onTransition,
onStateChange: this._setInteractionState,
});
}
_createClass(MapController, [
{
key: "handleEvent",
value: function handleEvent(event) {
this.mapState = this.getMapState();
var eventStartBlocked = this._eventStartBlocked;
switch (event.type) {
case "panstart":
return eventStartBlocked
? false
: this._onPanStart(event);
case "panmove":
return this._onPan(event);
case "panend":
return this._onPanEnd(event);
case "pinchstart":
return eventStartBlocked
? false
: this._onPinchStart(event);
case "pinchmove":
return this._onPinch(event);
case "pinchend":
return this._onPinchEnd(event);
case "tripanstart":
return eventStartBlocked
? false
: this._onTriplePanStart(event);
case "tripanmove":
return this._onTriplePan(event);
case "tripanend":
return this._onTriplePanEnd(event);
case "doubletap":
return this._onDoubleTap(event);
case "wheel":
return this._onWheel(event);
case "keydown":
return this._onKeyDown(event);
default:
return false;
}
},
},
{
key: "getCenter",
value: function getCenter(event) {
var _event$offsetCenter = event.offsetCenter,
x = _event$offsetCenter.x,
y = _event$offsetCenter.y;
return [x, y];
},
},
{
key: "isFunctionKeyPressed",
value: function isFunctionKeyPressed(event) {
var srcEvent = event.srcEvent;
return Boolean(
srcEvent.metaKey ||
srcEvent.altKey ||
srcEvent.ctrlKey ||
srcEvent.shiftKey
);
},
},
{
key: "blockEvents",
value: function blockEvents(timeout) {
var _this2 = this;
var timer = setTimeout(function () {
if (_this2._eventStartBlocked === timer) {
_this2._eventStartBlocked = null;
}
}, timeout);
this._eventStartBlocked = timer;
},
},
{
key: "updateViewport",
value: function updateViewport(
newMapState,
extraProps,
interactionState
) {
var oldViewport =
this.mapState instanceof MapState
? this.mapState.getViewportProps()
: this.mapState;
var newViewport = map_controller_objectSpread(
map_controller_objectSpread(
{},
newMapState.getViewportProps()
),
extraProps
);
var viewStateChanged = Object.keys(
newViewport
).some(function (key) {
return oldViewport[key] !== newViewport[key];
});
this._state = newMapState.getState();
this._setInteractionState(interactionState);
if (viewStateChanged) {
this.onViewportChange(
newViewport,
this._interactionState,
oldViewport
);
}
},
},
{
key: "getMapState",
value: function getMapState(overrides) {
return new MapState(
map_controller_objectSpread(
map_controller_objectSpread(
map_controller_objectSpread(
{},
this.mapStateProps
),
this._state
),
overrides
)
);
},
},
{
key: "isDragging",
value: function isDragging() {
return this._interactionState.isDragging;
},
},
{
key: "setOptions",
value: function setOptions(options) {
var onViewportChange = options.onViewportChange,
onStateChange = options.onStateChange,
_options$eventManager = options.eventManager,
eventManager =
_options$eventManager === void 0
? this.eventManager
: _options$eventManager,
_options$isInteractiv = options.isInteractive,
isInteractive =
_options$isInteractiv === void 0
? true
: _options$isInteractiv,
_options$scrollZoom = options.scrollZoom,
scrollZoom =
_options$scrollZoom === void 0
? this.scrollZoom
: _options$scrollZoom,
_options$dragPan = options.dragPan,
dragPan =
_options$dragPan === void 0
? this.dragPan
: _options$dragPan,
_options$dragRotate = options.dragRotate,
dragRotate =
_options$dragRotate === void 0
? this.dragRotate
: _options$dragRotate,
_options$doubleClickZ = options.doubleClickZoom,
doubleClickZoom =
_options$doubleClickZ === void 0
? this.doubleClickZoom
: _options$doubleClickZ,
_options$touchZoom = options.touchZoom,
touchZoom =
_options$touchZoom === void 0
? this.touchZoom
: _options$touchZoom,
_options$touchRotate = options.touchRotate,
touchRotate =
_options$touchRotate === void 0
? this.touchRotate
: _options$touchRotate,
_options$keyboard = options.keyboard,
keyboard =
_options$keyboard === void 0
? this.keyboard
: _options$keyboard;
this.onViewportChange = onViewportChange;
this.onStateChange = onStateChange;
var prevOptions = this.mapStateProps || {};
var dimensionChanged =
prevOptions.height !== options.height ||
prevOptions.width !== options.width;
this.mapStateProps = options;
if (dimensionChanged) {
this.mapState = prevOptions;
this.updateViewport(new MapState(options));
}
this._transitionManager.processViewportChange(
options
);
if (this.eventManager !== eventManager) {
this.eventManager = eventManager;
this._events = {};
this.toggleEvents(this.events, true);
}
this.toggleEvents(
EVENT_TYPES.WHEEL,
isInteractive && Boolean(scrollZoom)
);
this.toggleEvents(
EVENT_TYPES.PAN,
isInteractive && Boolean(dragPan || dragRotate)
);
this.toggleEvents(
EVENT_TYPES.PINCH,
isInteractive &&
Boolean(touchZoom || touchRotate)
);
this.toggleEvents(
EVENT_TYPES.TRIPLE_PAN,
isInteractive && Boolean(touchRotate)
);
this.toggleEvents(
EVENT_TYPES.DOUBLE_TAP,
isInteractive && Boolean(doubleClickZoom)
);
this.toggleEvents(
EVENT_TYPES.KEYBOARD,
isInteractive && Boolean(keyboard)
);
this.scrollZoom = scrollZoom;
this.dragPan = dragPan;
this.dragRotate = dragRotate;
this.doubleClickZoom = doubleClickZoom;
this.touchZoom = touchZoom;
this.touchRotate = touchRotate;
this.keyboard = keyboard;
},
},
{
key: "toggleEvents",
value: function toggleEvents(eventNames, enabled) {
var _this3 = this;
if (this.eventManager) {
eventNames.forEach(function (eventName) {
if (_this3._events[eventName] !== enabled) {
_this3._events[eventName] = enabled;
if (enabled) {
_this3.eventManager.on(
eventName,
_this3.handleEvent
);
} else {
_this3.eventManager.off(
eventName,
_this3.handleEvent
);
}
}
});
}
},
},
{
key: "_onPanStart",
value: function _onPanStart(event) {
var pos = this.getCenter(event);
this._panRotate =
this.isFunctionKeyPressed(event) ||
event.rightButton;
var newMapState = this._panRotate
? this.mapState.rotateStart({
pos: pos,
})
: this.mapState.panStart({
pos: pos,
});
this.updateViewport(
newMapState,
NO_TRANSITION_PROPS,
{
isDragging: true,
}
);
return true;
},
},
{
key: "_onPan",
value: function _onPan(event) {
if (!this.isDragging()) {
return false;
}
return this._panRotate
? this._onPanRotate(event)
: this._onPanMove(event);
},
},
{
key: "_onPanEnd",
value: function _onPanEnd(event) {
if (!this.isDragging()) {
return false;
}
return this._panRotate
? this._onPanRotateEnd(event)
: this._onPanMoveEnd(event);
},
},
{
key: "_onPanMove",
value: function _onPanMove(event) {
if (!this.dragPan) {
return false;
}
var pos = this.getCenter(event);
var newMapState = this.mapState.pan({
pos: pos,
});
this.updateViewport(
newMapState,
NO_TRANSITION_PROPS,
{
isPanning: true,
}
);
return true;
},
},
{
key: "_onPanMoveEnd",
value: function _onPanMoveEnd(event) {
if (this.dragPan) {
var _this$dragPan$inertia =
this.dragPan.inertia,
inertia =
_this$dragPan$inertia === void 0
? DEFAULT_INERTIA
: _this$dragPan$inertia;
if (inertia && event.velocity) {
var pos = this.getCenter(event);
var endPos = [
pos[0] +
(event.velocityX * inertia) / 2,
pos[1] +
(event.velocityY * inertia) / 2,
];
var newControllerState = this.mapState
.pan({
pos: endPos,
})
.panEnd();
this.updateViewport(
newControllerState,
map_controller_objectSpread(
map_controller_objectSpread(
{},
LINEAR_TRANSITION_PROPS
),
{},
{
transitionDuration: inertia,
transitionEasing:
INERTIA_EASING,
}
),
{
isDragging: false,
isPanning: true,
}
);
return true;
}
}
var newMapState = this.mapState.panEnd();
this.updateViewport(newMapState, null, {
isDragging: false,
isPanning: false,
});
return true;
},
},
{
key: "_onPanRotate",
value: function _onPanRotate(event) {
if (!this.dragRotate) {
return false;
}
var pos = this.getCenter(event);
var newMapState = this.mapState.rotate({
pos: pos,
});
this.updateViewport(
newMapState,
NO_TRANSITION_PROPS,
{
isRotating: true,
}
);
return true;
},
},
{
key: "_onPanRotateEnd",
value: function _onPanRotateEnd(event) {
if (this.dragRotate) {
var _this$dragRotate$iner =
this.dragRotate.inertia,
inertia =
_this$dragRotate$iner === void 0
? DEFAULT_INERTIA
: _this$dragRotate$iner;
if (inertia && event.velocity) {
var pos = this.getCenter(event);
var endPos = [
pos[0] +
(event.velocityX * inertia) / 2,
pos[1] +
(event.velocityY * inertia) / 2,
];
var newControllerState = this.mapState
.rotate({
pos: endPos,
})
.rotateEnd();
this.updateViewport(
newControllerState,
map_controller_objectSpread(
map_controller_objectSpread(
{},
LINEAR_TRANSITION_PROPS
),
{},
{
transitionDuration: inertia,
transitionEasing:
INERTIA_EASING,
}
),
{
isDragging: false,
isRotating: true,
}
);
return true;
}
}
var newMapState = this.mapState.panEnd();
this.updateViewport(newMapState, null, {
isDragging: false,
isRotating: false,
});
return true;
},
},
{
key: "_onWheel",
value: function _onWheel(event) {
if (!this.scrollZoom) {
return false;
}
var _this$scrollZoom = this.scrollZoom,
_this$scrollZoom$spee = _this$scrollZoom.speed,
speed =
_this$scrollZoom$spee === void 0
? 0.01
: _this$scrollZoom$spee,
_this$scrollZoom$smoo = _this$scrollZoom.smooth,
smooth =
_this$scrollZoom$smoo === void 0
? false
: _this$scrollZoom$smoo;
event.preventDefault();
var pos = this.getCenter(event);
var delta = event.delta;
var scale =
2 / (1 + Math.exp(-Math.abs(delta * speed)));
if (delta < 0 && scale !== 0) {
scale = 1 / scale;
}
var newMapState = this.mapState.zoom({
pos: pos,
scale: scale,
});
if (
newMapState.getViewportProps().zoom ===
this.mapStateProps.zoom
) {
return false;
}
this.updateViewport(
newMapState,
map_controller_objectSpread(
map_controller_objectSpread(
{},
LINEAR_TRANSITION_PROPS
),
{},
{
transitionInterpolator:
new LinearInterpolator({
around: pos,
}),
transitionDuration: smooth ? 250 : 1,
}
),
{
isPanning: true,
isZooming: true,
}
);
return true;
},
},
{
key: "_onPinchStart",
value: function _onPinchStart(event) {
var pos = this.getCenter(event);
var newMapState = this.mapState
.zoomStart({
pos: pos,
})
.rotateStart({
pos: pos,
});
this._startPinchRotation = event.rotation;
this._lastPinchEvent = event;
this.updateViewport(
newMapState,
NO_TRANSITION_PROPS,
{
isDragging: true,
}
);
return true;
},
},
{
key: "_onPinch",
value: function _onPinch(event) {
if (!this.isDragging()) {
return false;
}
if (!this.touchZoom && !this.touchRotate) {
return false;
}
var newMapState = this.mapState;
if (this.touchZoom) {
var scale = event.scale;
var pos = this.getCenter(event);
newMapState = newMapState.zoom({
pos: pos,
scale: scale,
});
}
if (this.touchRotate) {
var rotation = event.rotation;
newMapState = newMapState.rotate({
deltaAngleX:
this._startPinchRotation - rotation,
});
}
this.updateViewport(
newMapState,
NO_TRANSITION_PROPS,
{
isDragging: true,
isPanning: Boolean(this.touchZoom),
isZooming: Boolean(this.touchZoom),
isRotating: Boolean(this.touchRotate),
}
);
this._lastPinchEvent = event;
return true;
},
},
{
key: "_onPinchEnd",
value: function _onPinchEnd(event) {
if (!this.isDragging()) {
return false;
}
if (this.touchZoom) {
var _this$touchZoom$inert =
this.touchZoom.inertia,
inertia =
_this$touchZoom$inert === void 0
? DEFAULT_INERTIA
: _this$touchZoom$inert;
var _lastPinchEvent = this._lastPinchEvent;
if (
inertia &&
_lastPinchEvent &&
event.scale !== _lastPinchEvent.scale
) {
var pos = this.getCenter(event);
var _newMapState =
this.mapState.rotateEnd();
var z = Math.log2(event.scale);
var velocityZ =
(z - Math.log2(_lastPinchEvent.scale)) /
(event.deltaTime -
_lastPinchEvent.deltaTime);
var endScale = Math.pow(
2,
z + (velocityZ * inertia) / 2
);
_newMapState = _newMapState
.zoom({
pos: pos,
scale: endScale,
})
.zoomEnd();
this.updateViewport(
_newMapState,
map_controller_objectSpread(
map_controller_objectSpread(
{},
LINEAR_TRANSITION_PROPS
),
{},
{
transitionInterpolator:
new LinearInterpolator({
around: pos,
}),
transitionDuration: inertia,
transitionEasing:
INERTIA_EASING,
}
),
{
isDragging: false,
isPanning: Boolean(this.touchZoom),
isZooming: Boolean(this.touchZoom),
isRotating: false,
}
);
this.blockEvents(inertia);
return true;
}
}
var newMapState = this.mapState
.zoomEnd()
.rotateEnd();
this._state.startPinchRotation = 0;
this.updateViewport(newMapState, null, {
isDragging: false,
isPanning: false,
isZooming: false,
isRotating: false,
});
this._startPinchRotation = null;
this._lastPinchEvent = null;
return true;
},
},
{
key: "_onTriplePanStart",
value: function _onTriplePanStart(event) {
var pos = this.getCenter(event);
var newMapState = this.mapState.rotateStart({
pos: pos,
});
this.updateViewport(
newMapState,
NO_TRANSITION_PROPS,
{
isDragging: true,
}
);
return true;
},
},
{
key: "_onTriplePan",
value: function _onTriplePan(event) {
if (!this.isDragging()) {
return false;
}
if (!this.touchRotate) {
return false;
}
var pos = this.getCenter(event);
pos[0] -= event.deltaX;
var newMapState = this.mapState.rotate({
pos: pos,
});
this.updateViewport(
newMapState,
NO_TRANSITION_PROPS,
{
isRotating: true,
}
);
return true;
},
},
{
key: "_onTriplePanEnd",
value: function _onTriplePanEnd(event) {
if (!this.isDragging()) {
return false;
}
if (this.touchRotate) {
var _this$touchRotate$ine =
this.touchRotate.inertia,
inertia =
_this$touchRotate$ine === void 0
? DEFAULT_INERTIA
: _this$touchRotate$ine;
if (inertia && event.velocityY) {
var pos = this.getCenter(event);
var endPos = [
pos[0],
(pos[1] +=
(event.velocityY * inertia) / 2),
];
var _newMapState2 = this.mapState.rotate({
pos: endPos,
});
this.updateViewport(
_newMapState2,
map_controller_objectSpread(
map_controller_objectSpread(
{},
LINEAR_TRANSITION_PROPS
),
{},
{
transitionDuration: inertia,
transitionEasing:
INERTIA_EASING,
}
),
{
isDragging: false,
isRotating: true,
}
);
this.blockEvents(inertia);
return false;
}
}
var newMapState = this.mapState.rotateEnd();
this.updateViewport(newMapState, null, {
isDragging: false,
isRotating: false,
});
return true;
},
},
{
key: "_onDoubleTap",
value: function _onDoubleTap(event) {
if (!this.doubleClickZoom) {
return false;
}
var pos = this.getCenter(event);
var isZoomOut = this.isFunctionKeyPressed(event);
var newMapState = this.mapState.zoom({
pos: pos,
scale: isZoomOut ? 0.5 : 2,
});
this.updateViewport(
newMapState,
Object.assign({}, LINEAR_TRANSITION_PROPS, {
transitionInterpolator:
new LinearInterpolator({
around: pos,
}),
}),
{
isZooming: true,
}
);
return true;
},
},
{
key: "_onKeyDown",
value: function _onKeyDown(event) {
if (!this.keyboard) {
return false;
}
var funcKey = this.isFunctionKeyPressed(event);
var _this$keyboard = this.keyboard,
_this$keyboard$zoomSp =
_this$keyboard.zoomSpeed,
zoomSpeed =
_this$keyboard$zoomSp === void 0
? 2
: _this$keyboard$zoomSp,
_this$keyboard$moveSp =
_this$keyboard.moveSpeed,
moveSpeed =
_this$keyboard$moveSp === void 0
? 100
: _this$keyboard$moveSp,
_this$keyboard$rotate =
_this$keyboard.rotateSpeedX,
rotateSpeedX =
_this$keyboard$rotate === void 0
? 15
: _this$keyboard$rotate,
_this$keyboard$rotate2 =
_this$keyboard.rotateSpeedY,
rotateSpeedY =
_this$keyboard$rotate2 === void 0
? 10
: _this$keyboard$rotate2;
var mapStateProps = this.mapStateProps;
var newMapState;
switch (event.srcEvent.keyCode) {
case 189:
if (funcKey) {
newMapState = this.getMapState({
zoom:
mapStateProps.zoom -
Math.log2(zoomSpeed) -
1,
});
} else {
newMapState = this.getMapState({
zoom:
mapStateProps.zoom -
Math.log2(zoomSpeed),
});
}
break;
case 187:
if (funcKey) {
newMapState = this.getMapState({
zoom:
mapStateProps.zoom +
Math.log2(zoomSpeed) +
1,
});
} else {
newMapState = this.getMapState({
zoom:
mapStateProps.zoom +
Math.log2(zoomSpeed),
});
}
break;
case 37:
if (funcKey) {
newMapState = this.getMapState({
bearing:
mapStateProps.bearing -
rotateSpeedX,
});
} else {
newMapState = this.mapState.pan({
pos: [moveSpeed, 0],
startPos: [0, 0],
});
}
break;
case 39:
if (funcKey) {
newMapState = this.getMapState({
bearing:
mapStateProps.bearing +
rotateSpeedX,
});
} else {
newMapState = this.mapState.pan({
pos: [-moveSpeed, 0],
startPos: [0, 0],
});
}
break;
case 38:
if (funcKey) {
newMapState = this.getMapState({
pitch:
mapStateProps.pitch +
rotateSpeedY,
});
} else {
newMapState = this.mapState.pan({
pos: [0, moveSpeed],
startPos: [0, 0],
});
}
break;
case 40:
if (funcKey) {
newMapState = this.getMapState({
pitch:
mapStateProps.pitch -
rotateSpeedY,
});
} else {
newMapState = this.mapState.pan({
pos: [0, -moveSpeed],
startPos: [0, 0],
});
}
break;
default:
return false;
}
return this.updateViewport(
newMapState,
LINEAR_TRANSITION_PROPS
);
},
},
]);
return MapController;
})(); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/interactive-map.js
//# sourceMappingURL=map-controller.js.map
function interactive_map_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function interactive_map_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
interactive_map_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
interactive_map_ownKeys(Object(source)).forEach(
function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
}
);
}
}
return target;
}
var interactive_map_propTypes = Object.assign(
{},
static_map.propTypes,
{
maxZoom: prop_types.number,
minZoom: prop_types.number,
maxPitch: prop_types.number,
minPitch: prop_types.number,
onViewStateChange: prop_types.func,
onViewportChange: prop_types.func,
onInteractionStateChange: prop_types.func,
transitionDuration: prop_types.oneOfType([
prop_types.number,
prop_types.string,
]),
transitionInterpolator: prop_types.object,
transitionInterruption: prop_types.number,
transitionEasing: prop_types.func,
onTransitionStart: prop_types.func,
onTransitionInterrupt: prop_types.func,
onTransitionEnd: prop_types.func,
scrollZoom: prop_types.oneOfType([
prop_types.bool,
prop_types.object,
]),
dragPan: prop_types.oneOfType([
prop_types.bool,
prop_types.object,
]),
dragRotate: prop_types.oneOfType([
prop_types.bool,
prop_types.object,
]),
doubleClickZoom: prop_types.bool,
touchZoom: prop_types.oneOfType([
prop_types.bool,
prop_types.object,
]),
touchRotate: prop_types.oneOfType([
prop_types.bool,
prop_types.object,
]),
keyboard: prop_types.oneOfType([
prop_types.bool,
prop_types.object,
]),
onHover: prop_types.func,
onClick: prop_types.func,
onDblClick: prop_types.func,
onContextMenu: prop_types.func,
onMouseDown: prop_types.func,
onMouseMove: prop_types.func,
onMouseUp: prop_types.func,
onTouchStart: prop_types.func,
onTouchMove: prop_types.func,
onTouchEnd: prop_types.func,
onMouseEnter: prop_types.func,
onMouseLeave: prop_types.func,
onMouseOut: prop_types.func,
onWheel: prop_types.func,
touchAction: prop_types.string,
eventRecognizerOptions: prop_types.object,
clickRadius: prop_types.number,
interactiveLayerIds: prop_types.array,
getCursor: prop_types.func,
controller: prop_types.instanceOf(MapController),
}
);
var getDefaultCursor = function getDefaultCursor(_ref) {
var isDragging = _ref.isDragging,
isHovering = _ref.isHovering;
return isDragging
? "grabbing"
: isHovering
? "pointer"
: "grab";
};
var interactive_map_defaultProps = Object.assign(
{},
static_map.defaultProps,
MAPBOX_LIMITS,
TransitionManager.defaultProps,
{
onViewStateChange: null,
onViewportChange: null,
onClick: null,
onNativeClick: null,
onHover: null,
onContextMenu: function onContextMenu(event) {
return event.preventDefault();
},
scrollZoom: true,
dragPan: true,
dragRotate: true,
doubleClickZoom: true,
touchZoom: true,
touchRotate: false,
keyboard: true,
touchAction: "none",
eventRecognizerOptions: {},
clickRadius: 0,
getCursor: getDefaultCursor,
}
);
function normalizeEvent(event) {
if (event.lngLat || !event.offsetCenter) {
return event;
}
var _event$offsetCenter = event.offsetCenter,
x = _event$offsetCenter.x,
y = _event$offsetCenter.y;
if (!Number.isFinite(x) || !Number.isFinite(y)) {
return event;
}
var pos = [x, y];
event.point = pos;
if (this.map) {
var location = this.map.unproject(pos);
event.lngLat = [location.lng, location.lat];
}
return event;
}
function getFeatures(pos) {
var map = this.map;
if (!map || !pos) {
return null;
}
var queryParams = {};
var size = this.props.clickRadius;
if (this.props.interactiveLayerIds) {
queryParams.layers = this.props.interactiveLayerIds;
}
try {
return map.queryRenderedFeatures(
size
? [
[pos[0] - size, pos[1] + size],
[pos[0] + size, pos[1] - size],
]
: pos,
queryParams
);
} catch (_unused) {
return null;
}
}
function onEvent(callbackName, event) {
var func = this.props[callbackName];
if (func) {
func(normalizeEvent.call(this, event));
}
}
function onPointerDown(event) {
onEvent.call(
this,
event.pointerType === "touch"
? "onTouchStart"
: "onMouseDown",
event
);
}
function onPointerUp(event) {
onEvent.call(
this,
event.pointerType === "touch" ? "onTouchEnd" : "onMouseUp",
event
);
}
function onPointerMove(event) {
onEvent.call(
this,
event.pointerType === "touch"
? "onTouchMove"
: "onMouseMove",
event
);
if (!this.state.isDragging) {
var _this$props = this.props,
onHover = _this$props.onHover,
interactiveLayerIds = _this$props.interactiveLayerIds;
var features;
event = normalizeEvent.call(this, event);
if (interactiveLayerIds || onHover) {
features = getFeatures.call(this, event.point);
}
var isHovering = Boolean(
interactiveLayerIds && features && features.length > 0
);
var isEntering = isHovering && !this.state.isHovering;
var isExiting = !isHovering && this.state.isHovering;
if (onHover || isEntering) {
event.features = features;
if (onHover) {
onHover(event);
}
}
if (isEntering) {
onEvent.call(this, "onMouseEnter", event);
}
if (isExiting) {
onEvent.call(this, "onMouseLeave", event);
}
if (isEntering || isExiting) {
this.setState({
isHovering: isHovering,
});
}
}
}
function onPointerClick(event) {
var _this$props2 = this.props,
onClick = _this$props2.onClick,
onNativeClick = _this$props2.onNativeClick,
onDblClick = _this$props2.onDblClick,
doubleClickZoom = _this$props2.doubleClickZoom;
var callbacks = [];
var isDoubleClickEnabled = onDblClick || doubleClickZoom;
switch (event.type) {
case "anyclick":
callbacks.push(onNativeClick);
if (!isDoubleClickEnabled) {
callbacks.push(onClick);
}
break;
case "click":
if (isDoubleClickEnabled) {
callbacks.push(onClick);
}
break;
default:
}
callbacks = callbacks.filter(Boolean);
if (callbacks.length) {
event = normalizeEvent.call(this, event);
event.features = getFeatures.call(this, event.point);
callbacks.forEach(function (cb) {
return cb(event);
});
}
}
function interactive_map_getRefHandles(staticMapRef) {
return {
getMap: staticMapRef.current && staticMapRef.current.getMap,
queryRenderedFeatures:
staticMapRef.current &&
staticMapRef.current.queryRenderedFeatures,
};
}
var InteractiveMap = (0, react.forwardRef)(function (props, ref) {
var parentContext = (0, react.useContext)(map_context);
var controller = (0, react.useMemo)(function () {
return props.controller || new MapController();
}, []);
var eventManager = (0, react.useMemo)(function () {
return new EventManager(null, {
touchAction: props.touchAction,
recognizerOptions: props.eventRecognizerOptions,
});
}, []);
var eventCanvasRef = (0, react.useRef)(null);
var staticMapRef = (0, react.useRef)(null);
var _thisRef = (0, react.useRef)({
width: 0,
height: 0,
state: {
isHovering: false,
isDragging: false,
},
});
var thisRef = _thisRef.current;
thisRef.props = props;
thisRef.map =
staticMapRef.current && staticMapRef.current.getMap();
thisRef.setState = function (newState) {
thisRef.state = interactive_map_objectSpread(
interactive_map_objectSpread({}, thisRef.state),
newState
);
eventCanvasRef.current.style.cursor = props.getCursor(
thisRef.state
);
};
var inRender = true;
var viewportUpdateRequested;
var stateUpdateRequested;
var handleViewportChange = function handleViewportChange(
viewState,
interactionState,
oldViewState
) {
if (inRender) {
viewportUpdateRequested = [
viewState,
interactionState,
oldViewState,
];
return;
}
var _thisRef$props = thisRef.props,
onViewStateChange = _thisRef$props.onViewStateChange,
onViewportChange = _thisRef$props.onViewportChange;
Object.defineProperty(viewState, "position", {
get: function get() {
return [
0,
0,
getTerrainElevation(thisRef.map, viewState),
];
},
});
if (onViewStateChange) {
onViewStateChange({
viewState: viewState,
interactionState: interactionState,
oldViewState: oldViewState,
});
}
if (onViewportChange) {
onViewportChange(
viewState,
interactionState,
oldViewState
);
}
};
(0, react.useImperativeHandle)(
ref,
function () {
return interactive_map_getRefHandles(staticMapRef);
},
[]
);
var context = (0, react.useMemo)(
function () {
return interactive_map_objectSpread(
interactive_map_objectSpread({}, parentContext),
{},
{
eventManager: eventManager,
container:
parentContext.container ||
eventCanvasRef.current,
}
);
},
[parentContext, eventCanvasRef.current]
);
context.onViewportChange = handleViewportChange;
context.viewport =
parentContext.viewport || getViewport(thisRef);
thisRef.viewport = context.viewport;
var handleInteractionStateChange =
function handleInteractionStateChange(interactionState) {
var _interactionState$isD = interactionState.isDragging,
isDragging =
_interactionState$isD === void 0
? false
: _interactionState$isD;
if (isDragging !== thisRef.state.isDragging) {
thisRef.setState({
isDragging: isDragging,
});
}
if (inRender) {
stateUpdateRequested = interactionState;
return;
}
var onInteractionStateChange =
thisRef.props.onInteractionStateChange;
if (onInteractionStateChange) {
onInteractionStateChange(interactionState);
}
};
var updateControllerOpts = function updateControllerOpts() {
if (thisRef.width && thisRef.height) {
controller.setOptions(
interactive_map_objectSpread(
interactive_map_objectSpread(
interactive_map_objectSpread(
{},
thisRef.props
),
thisRef.props.viewState
),
{},
{
isInteractive: Boolean(
thisRef.props.onViewStateChange ||
thisRef.props.onViewportChange
),
onViewportChange: handleViewportChange,
onStateChange: handleInteractionStateChange,
eventManager: eventManager,
width: thisRef.width,
height: thisRef.height,
}
)
);
}
};
var onResize = function onResize(_ref2) {
var width = _ref2.width,
height = _ref2.height;
thisRef.width = width;
thisRef.height = height;
updateControllerOpts();
thisRef.props.onResize({
width: width,
height: height,
});
};
(0, react.useEffect)(function () {
eventManager.setElement(eventCanvasRef.current);
eventManager.on({
pointerdown: onPointerDown.bind(thisRef),
pointermove: onPointerMove.bind(thisRef),
pointerup: onPointerUp.bind(thisRef),
pointerleave: onEvent.bind(thisRef, "onMouseOut"),
click: onPointerClick.bind(thisRef),
anyclick: onPointerClick.bind(thisRef),
dblclick: onEvent.bind(thisRef, "onDblClick"),
wheel: onEvent.bind(thisRef, "onWheel"),
contextmenu: onEvent.bind(thisRef, "onContextMenu"),
});
return function () {
eventManager.destroy();
};
}, []);
use_isomorphic_layout_effect(function () {
if (viewportUpdateRequested) {
handleViewportChange.apply(
void 0,
_toConsumableArray(viewportUpdateRequested)
);
}
if (stateUpdateRequested) {
handleInteractionStateChange(stateUpdateRequested);
}
});
updateControllerOpts();
var width = props.width,
height = props.height,
style = props.style,
getCursor = props.getCursor;
var eventCanvasStyle = (0, react.useMemo)(
function () {
return interactive_map_objectSpread(
interactive_map_objectSpread(
{
position: "relative",
},
style
),
{},
{
width: width,
height: height,
cursor: getCursor(thisRef.state),
}
);
},
[style, width, height, getCursor, thisRef.state]
);
if (!viewportUpdateRequested || !thisRef._child) {
thisRef._child = react.createElement(
MapContextProvider,
{
value: context,
},
react.createElement(
"div",
{
key: "event-canvas",
ref: eventCanvasRef,
style: eventCanvasStyle,
},
react.createElement(
static_map,
_extends({}, props, {
width: "100%",
height: "100%",
style: null,
onResize: onResize,
ref: staticMapRef,
})
)
)
);
}
inRender = false;
return thisRef._child;
});
InteractiveMap.supported = static_map.supported;
InteractiveMap.propTypes = interactive_map_propTypes;
InteractiveMap.defaultProps = interactive_map_defaultProps;
/* harmony default export */ var interactive_map = InteractiveMap; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/deep-equal.js
//# sourceMappingURL=interactive-map.js.map
function deepEqual(a, b) {
if (a === b) {
return true;
}
if (!a || !b) {
return false;
}
if (Array.isArray(a)) {
if (!Array.isArray(b) || a.length !== b.length) {
return false;
}
for (var i = 0; i < a.length; i++) {
if (!deepEqual(a[i], b[i])) {
return false;
}
}
return true;
} else if (Array.isArray(b)) {
return false;
}
if (_typeof(a) === "object" && _typeof(b) === "object") {
var aKeys = Object.keys(a);
var bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) {
return false;
}
for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) {
var key = _aKeys[_i];
if (!b.hasOwnProperty(key)) {
return false;
}
if (!deepEqual(a[key], b[key])) {
return false;
}
}
return true;
}
return false;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/source.js
//# sourceMappingURL=deep-equal.js.map
function source_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function source_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
source_ownKeys(Object(source), true).forEach(function (
key
) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
source_ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var source_propTypes = {
type: prop_types.string.isRequired,
id: prop_types.string,
};
var sourceCounter = 0;
function createSource(map, id, props) {
if (map.style && map.style._loaded) {
var options = source_objectSpread({}, props);
delete options.id;
delete options.children;
map.addSource(id, options);
return map.getSource(id);
}
return null;
}
function updateSource(source, props, prevProps) {
utils_assert_assert(
props.id === prevProps.id,
"source id changed"
);
utils_assert_assert(
props.type === prevProps.type,
"source type changed"
);
var changedKey = "";
var changedKeyCount = 0;
for (var key in props) {
if (
key !== "children" &&
key !== "id" &&
!deepEqual(prevProps[key], props[key])
) {
changedKey = key;
changedKeyCount++;
}
}
if (!changedKeyCount) {
return;
}
var type = props.type;
if (type === "geojson") {
source.setData(props.data);
} else if (type === "image") {
source.updateImage({
url: props.url,
coordinates: props.coordinates,
});
} else if (
(type === "canvas" || type === "video") &&
changedKeyCount === 1 &&
changedKey === "coordinates"
) {
source.setCoordinates(props.coordinates);
} else if (type === "vector" && source.setUrl) {
switch (changedKey) {
case "url":
source.setUrl(props.url);
break;
case "tiles":
source.setTiles(props.tiles);
break;
default:
}
} else {
console.warn(
"Unable to update <Source> prop: ".concat(changedKey)
);
}
}
function Source(props) {
var context = (0, react.useContext)(map_context);
var propsRef = (0, react.useRef)({
id: props.id,
type: props.type,
});
var _useState = (0, react.useState)(0),
_useState2 = _slicedToArray(_useState, 2),
setStyleLoaded = _useState2[1];
var id = (0, react.useMemo)(function () {
return props.id || "jsx-source-".concat(sourceCounter++);
}, []);
var map = context.map;
(0, react.useEffect)(
function () {
if (map) {
var forceUpdate = function forceUpdate() {
return setStyleLoaded(function (version) {
return version + 1;
});
};
map.on("styledata", forceUpdate);
return function () {
map.off("styledata", forceUpdate);
requestAnimationFrame(function () {
if (
map.style &&
map.style._loaded &&
map.getSource(id)
) {
map.removeSource(id);
}
});
};
}
return undefined;
},
[map, id]
);
var source = map && map.style && map.getSource(id);
if (source) {
updateSource(source, props, propsRef.current);
} else {
source = createSource(map, id, props);
}
propsRef.current = props;
return (
(source &&
react.Children.map(props.children, function (child) {
return (
child &&
(0, react.cloneElement)(child, {
source: id,
})
);
})) ||
null
);
}
Source.propTypes = source_propTypes;
/* harmony default export */ var source =
/* unused pure expression or super */ null && Source; // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
//# sourceMappingURL=source.js.map
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
} // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = _objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (
!Object.prototype.propertyIsEnumerable.call(
source,
key
)
)
continue;
target[key] = source[key];
}
}
return target;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/layer.js
function layer_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function layer_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
layer_ownKeys(Object(source), true).forEach(function (
key
) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
layer_ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var LAYER_TYPES = [
"fill",
"line",
"symbol",
"circle",
"fill-extrusion",
"raster",
"background",
"heatmap",
"hillshade",
"sky",
];
var layer_propTypes = {
type: prop_types.oneOf(LAYER_TYPES).isRequired,
id: prop_types.string,
source: prop_types.string,
beforeId: prop_types.string,
};
function diffLayerStyles(map, id, props, prevProps) {
var _props$layout = props.layout,
layout = _props$layout === void 0 ? {} : _props$layout,
_props$paint = props.paint,
paint = _props$paint === void 0 ? {} : _props$paint,
filter = props.filter,
minzoom = props.minzoom,
maxzoom = props.maxzoom,
beforeId = props.beforeId,
otherProps = _objectWithoutProperties(props, [
"layout",
"paint",
"filter",
"minzoom",
"maxzoom",
"beforeId",
]);
if (beforeId !== prevProps.beforeId) {
map.moveLayer(id, beforeId);
}
if (layout !== prevProps.layout) {
var prevLayout = prevProps.layout || {};
for (var key in layout) {
if (!deepEqual(layout[key], prevLayout[key])) {
map.setLayoutProperty(id, key, layout[key]);
}
}
for (var _key in prevLayout) {
if (!layout.hasOwnProperty(_key)) {
map.setLayoutProperty(id, _key, undefined);
}
}
}
if (paint !== prevProps.paint) {
var prevPaint = prevProps.paint || {};
for (var _key2 in paint) {
if (!deepEqual(paint[_key2], prevPaint[_key2])) {
map.setPaintProperty(id, _key2, paint[_key2]);
}
}
for (var _key3 in prevPaint) {
if (!paint.hasOwnProperty(_key3)) {
map.setPaintProperty(id, _key3, undefined);
}
}
}
if (!deepEqual(filter, prevProps.filter)) {
map.setFilter(id, filter);
}
if (
minzoom !== prevProps.minzoom ||
maxzoom !== prevProps.maxzoom
) {
map.setLayerZoomRange(id, minzoom, maxzoom);
}
for (var _key4 in otherProps) {
if (!deepEqual(otherProps[_key4], prevProps[_key4])) {
map.setLayerProperty(id, _key4, otherProps[_key4]);
}
}
}
function createLayer(map, id, props) {
if (map.style && map.style._loaded) {
var options = layer_objectSpread(
layer_objectSpread({}, props),
{},
{
id: id,
}
);
delete options.beforeId;
map.addLayer(options, props.beforeId);
}
}
function updateLayer(map, id, props, prevProps) {
utils_assert_assert(
props.id === prevProps.id,
"layer id changed"
);
utils_assert_assert(
props.type === prevProps.type,
"layer type changed"
);
try {
diffLayerStyles(map, id, props, prevProps);
} catch (error) {
console.warn(error);
}
}
var layerCounter = 0;
function Layer(props) {
var context = (0, react.useContext)(map_context);
var propsRef = (0, react.useRef)({
id: props.id,
type: props.type,
});
var _useState = (0, react.useState)(0),
_useState2 = _slicedToArray(_useState, 2),
setStyleLoaded = _useState2[1];
var id = (0, react.useMemo)(function () {
return props.id || "jsx-layer-".concat(layerCounter++);
}, []);
var map = context.map;
(0, react.useEffect)(
function () {
if (map) {
var forceUpdate = function forceUpdate() {
return setStyleLoaded(function (version) {
return version + 1;
});
};
map.on("styledata", forceUpdate);
return function () {
map.off("styledata", forceUpdate);
if (map.style && map.style._loaded) {
map.removeLayer(id);
}
};
}
return undefined;
},
[map]
);
var layer = map && map.style && map.getLayer(id);
if (layer) {
updateLayer(map, id, props, propsRef.current);
} else {
createLayer(map, id, props);
}
propsRef.current = props;
return null;
}
Layer.propTypes = layer_propTypes;
/* harmony default export */ var components_layer =
/* unused pure expression or super */ null && Layer; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/use-map-control.js
//# sourceMappingURL=layer.js.map
var mapControlDefaultProps = {
captureScroll: false,
captureDrag: true,
captureClick: true,
captureDoubleClick: true,
capturePointerMove: false,
};
var mapControlPropTypes = {
captureScroll: prop_types.bool,
captureDrag: prop_types.bool,
captureClick: prop_types.bool,
captureDoubleClick: prop_types.bool,
capturePointerMove: prop_types.bool,
};
function onMount(thisRef) {
var ref = thisRef.containerRef.current;
var eventManager = thisRef.context.eventManager;
if (!ref || !eventManager) {
return undefined;
}
var events = {
wheel: function wheel(evt) {
var props = thisRef.props;
if (props.captureScroll) {
evt.stopPropagation();
}
if (props.onScroll) {
props.onScroll(evt, thisRef);
}
},
panstart: function panstart(evt) {
var props = thisRef.props;
if (props.captureDrag) {
evt.stopPropagation();
}
if (props.onDragStart) {
props.onDragStart(evt, thisRef);
}
},
anyclick: function anyclick(evt) {
var props = thisRef.props;
if (props.captureClick) {
evt.stopPropagation();
}
if (props.onNativeClick) {
props.onNativeClick(evt, thisRef);
}
},
click: function click(evt) {
var props = thisRef.props;
if (props.captureClick) {
evt.stopPropagation();
}
if (props.onClick) {
props.onClick(evt, thisRef);
}
},
dblclick: function dblclick(evt) {
var props = thisRef.props;
if (props.captureDoubleClick) {
evt.stopPropagation();
}
if (props.onDoubleClick) {
props.onDoubleClick(evt, thisRef);
}
},
pointermove: function pointermove(evt) {
var props = thisRef.props;
if (props.capturePointerMove) {
evt.stopPropagation();
}
if (props.onPointerMove) {
props.onPointerMove(evt, thisRef);
}
},
};
eventManager.watch(events, ref);
return function () {
eventManager.off(events);
};
}
function useMapControl() {
var props =
arguments.length > 0 && arguments[0] !== undefined
? arguments[0]
: {};
var context = (0, react.useContext)(map_context);
var containerRef = (0, react.useRef)(null);
var _thisRef = (0, react.useRef)({
props: props,
state: {},
context: context,
containerRef: containerRef,
});
var thisRef = _thisRef.current;
thisRef.props = props;
thisRef.context = context;
(0, react.useEffect)(
function () {
return onMount(thisRef);
},
[context.eventManager]
);
return thisRef;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/base-control.js
//# sourceMappingURL=use-map-control.js.map
function base_control_createSuper(Derived) {
var hasNativeReflectConstruct =
base_control_isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
function base_control_isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct)
return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(
Reflect.construct(Date, [], function () {})
);
return true;
} catch (e) {
return false;
}
}
function Control(props) {
var instance = props.instance;
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
instance._context = context;
instance._containerRef = containerRef;
return instance._render();
}
var BaseControl = (function (_PureComponent) {
_inherits(BaseControl, _PureComponent);
var _super = base_control_createSuper(BaseControl);
function BaseControl() {
var _this;
_classCallCheck(this, BaseControl);
for (
var _len = arguments.length,
args = new Array(_len),
_key = 0;
_key < _len;
_key++
) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_defineProperty(
_assertThisInitialized(_this),
"_context",
{}
);
_defineProperty(
_assertThisInitialized(_this),
"_containerRef",
(0, react.createRef)()
);
_defineProperty(
_assertThisInitialized(_this),
"_onScroll",
function (evt) {}
);
_defineProperty(
_assertThisInitialized(_this),
"_onDragStart",
function (evt) {}
);
_defineProperty(
_assertThisInitialized(_this),
"_onDblClick",
function (evt) {}
);
_defineProperty(
_assertThisInitialized(_this),
"_onClick",
function (evt) {}
);
_defineProperty(
_assertThisInitialized(_this),
"_onPointerMove",
function (evt) {}
);
return _this;
}
_createClass(BaseControl, [
{
key: "_render",
value: function _render() {
throw new Error("_render() not implemented");
},
},
{
key: "render",
value: function render() {
return react.createElement(
Control,
_extends(
{
instance: this,
},
this.props,
{
onScroll: this._onScroll,
onDragStart: this._onDragStart,
onDblClick: this._onDblClick,
onClick: this._onClick,
onPointerMove: this._onPointerMove,
}
)
);
},
},
]);
return BaseControl;
})(react.PureComponent);
_defineProperty(BaseControl, "propTypes", mapControlPropTypes);
_defineProperty(
BaseControl,
"defaultProps",
mapControlDefaultProps
); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/draggable-control.js
//# sourceMappingURL=base-control.js.map
function draggable_control_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function draggable_control_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
draggable_control_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
draggable_control_ownKeys(Object(source)).forEach(
function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
}
);
}
}
return target;
}
var draggableControlPropTypes = Object.assign(
{},
mapControlPropTypes,
{
draggable: prop_types.bool,
onDrag: prop_types.func,
onDragEnd: prop_types.func,
onDragStart: prop_types.func,
offsetLeft: prop_types.number,
offsetTop: prop_types.number,
}
);
var draggableControlDefaultProps = Object.assign(
{},
mapControlDefaultProps,
{
draggable: false,
offsetLeft: 0,
offsetTop: 0,
}
);
function getDragEventPosition(event) {
var _event$offsetCenter = event.offsetCenter,
x = _event$offsetCenter.x,
y = _event$offsetCenter.y;
return [x, y];
}
function getDragEventOffset(event, container) {
var _event$center = event.center,
x = _event$center.x,
y = _event$center.y;
if (container) {
var rect = container.getBoundingClientRect();
return [rect.left - x, rect.top - y];
}
return null;
}
function getDragLngLat(dragPos, dragOffset, props, context) {
var x = dragPos[0] + dragOffset[0] - props.offsetLeft;
var y = dragPos[1] + dragOffset[1] - props.offsetTop;
return context.viewport.unproject([x, y]);
}
function onDragStart(event, _ref) {
var props = _ref.props,
callbacks = _ref.callbacks,
state = _ref.state,
context = _ref.context,
containerRef = _ref.containerRef;
var draggable = props.draggable;
if (!draggable) {
return;
}
event.stopPropagation();
var dragPos = getDragEventPosition(event);
var dragOffset = getDragEventOffset(
event,
containerRef.current
);
state.setDragPos(dragPos);
state.setDragOffset(dragOffset);
if (callbacks.onDragStart && dragOffset) {
var callbackEvent = Object.assign({}, event);
callbackEvent.lngLat = getDragLngLat(
dragPos,
dragOffset,
props,
context
);
callbacks.onDragStart(callbackEvent);
}
}
function onDrag(event, _ref2) {
var props = _ref2.props,
callbacks = _ref2.callbacks,
state = _ref2.state,
context = _ref2.context;
event.stopPropagation();
var dragPos = getDragEventPosition(event);
state.setDragPos(dragPos);
var dragOffset = state.dragOffset;
if (callbacks.onDrag && dragOffset) {
var callbackEvent = Object.assign({}, event);
callbackEvent.lngLat = getDragLngLat(
dragPos,
dragOffset,
props,
context
);
callbacks.onDrag(callbackEvent);
}
}
function onDragEnd(event, _ref3) {
var props = _ref3.props,
callbacks = _ref3.callbacks,
state = _ref3.state,
context = _ref3.context;
event.stopPropagation();
var dragPos = state.dragPos,
dragOffset = state.dragOffset;
state.setDragPos(null);
state.setDragOffset(null);
if (callbacks.onDragEnd && dragPos && dragOffset) {
var callbackEvent = Object.assign({}, event);
callbackEvent.lngLat = getDragLngLat(
dragPos,
dragOffset,
props,
context
);
callbacks.onDragEnd(callbackEvent);
}
}
function onDragCancel(event, _ref4) {
var state = _ref4.state;
event.stopPropagation();
state.setDragPos(null);
state.setDragOffset(null);
}
function registerEvents(thisRef) {
var eventManager = thisRef.context.eventManager;
if (!eventManager || !thisRef.state.dragPos) {
return undefined;
}
var events = {
panmove: function panmove(evt) {
return onDrag(evt, thisRef);
},
panend: function panend(evt) {
return onDragEnd(evt, thisRef);
},
pancancel: function pancancel(evt) {
return onDragCancel(evt, thisRef);
},
};
eventManager.watch(events);
return function () {
eventManager.off(events);
};
}
function useDraggableControl(props) {
var _useState = (0, react.useState)(null),
_useState2 = _slicedToArray(_useState, 2),
dragPos = _useState2[0],
setDragPos = _useState2[1];
var _useState3 = (0, react.useState)(null),
_useState4 = _slicedToArray(_useState3, 2),
dragOffset = _useState4[0],
setDragOffset = _useState4[1];
var thisRef = useMapControl(
draggable_control_objectSpread(
draggable_control_objectSpread({}, props),
{},
{
onDragStart: onDragStart,
}
)
);
thisRef.callbacks = props;
thisRef.state.dragPos = dragPos;
thisRef.state.setDragPos = setDragPos;
thisRef.state.dragOffset = dragOffset;
thisRef.state.setDragOffset = setDragOffset;
(0, react.useEffect)(
function () {
return registerEvents(thisRef);
},
[thisRef.context.eventManager, Boolean(dragPos)]
);
return thisRef;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/crisp-pixel.js
//# sourceMappingURL=draggable-control.js.map
var pixelRatio =
(typeof window !== "undefined" && window.devicePixelRatio) || 1;
var crispPixel = function crispPixel(size) {
return Math.round(size * pixelRatio) / pixelRatio;
};
var crispPercentage = function crispPercentage(el, percentage) {
var dimension =
arguments.length > 2 && arguments[2] !== undefined
? arguments[2]
: "x";
if (el === null) {
return percentage;
}
var origSize =
dimension === "x" ? el.offsetWidth : el.offsetHeight;
return (
(crispPixel((percentage / 100) * origSize) / origSize) * 100
);
}; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/marker.js
//# sourceMappingURL=crisp-pixel.js.map
function marker_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function marker_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
marker_ownKeys(Object(source), true).forEach(function (
key
) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
marker_ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var marker_propTypes = Object.assign(
{},
draggableControlPropTypes,
{
className: prop_types.string,
longitude: prop_types.number.isRequired,
latitude: prop_types.number.isRequired,
style: prop_types.object,
}
);
var marker_defaultProps = Object.assign(
{},
draggableControlDefaultProps,
{
className: "",
}
);
function getPosition(_ref) {
var props = _ref.props,
state = _ref.state,
context = _ref.context;
var longitude = props.longitude,
latitude = props.latitude,
offsetLeft = props.offsetLeft,
offsetTop = props.offsetTop;
var dragPos = state.dragPos,
dragOffset = state.dragOffset;
var viewport = context.viewport,
map = context.map;
if (dragPos && dragOffset) {
return [
dragPos[0] + dragOffset[0],
dragPos[1] + dragOffset[1],
];
}
var altitude = getTerrainElevation(map, {
longitude: longitude,
latitude: latitude,
});
var _viewport$project = viewport.project([
longitude,
latitude,
altitude,
]),
_viewport$project2 = _slicedToArray(_viewport$project, 2),
x = _viewport$project2[0],
y = _viewport$project2[1];
x += offsetLeft;
y += offsetTop;
return [x, y];
}
function Marker(props) {
var thisRef = useDraggableControl(props);
var state = thisRef.state,
containerRef = thisRef.containerRef;
var children = props.children,
className = props.className,
draggable = props.draggable,
style = props.style;
var dragPos = state.dragPos;
var _getPosition = getPosition(thisRef),
_getPosition2 = _slicedToArray(_getPosition, 2),
x = _getPosition2[0],
y = _getPosition2[1];
var transform = "translate("
.concat(crispPixel(x), "px, ")
.concat(crispPixel(y), "px)");
var cursor = draggable
? dragPos
? "grabbing"
: "grab"
: "auto";
var control = (0, react.useMemo)(
function () {
var containerStyle = marker_objectSpread(
{
position: "absolute",
left: 0,
top: 0,
transform: transform,
cursor: cursor,
},
style
);
return react.createElement(
"div",
{
className: "mapboxgl-marker ".concat(className),
ref: thisRef.containerRef,
style: containerStyle,
},
children
);
},
[children, className]
);
var container = containerRef.current;
if (container) {
container.style.transform = transform;
container.style.cursor = cursor;
}
return control;
}
Marker.defaultProps = marker_defaultProps;
Marker.propTypes = marker_propTypes;
/* harmony default export */ var marker = react.memo(Marker); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/dynamic-position.js
//# sourceMappingURL=marker.js.map
var ANCHOR_POSITION = {
top: {
x: 0.5,
y: 0,
},
"top-left": {
x: 0,
y: 0,
},
"top-right": {
x: 1,
y: 0,
},
bottom: {
x: 0.5,
y: 1,
},
"bottom-left": {
x: 0,
y: 1,
},
"bottom-right": {
x: 1,
y: 1,
},
left: {
x: 0,
y: 0.5,
},
right: {
x: 1,
y: 0.5,
},
};
var ANCHOR_TYPES = Object.keys(ANCHOR_POSITION);
function getDynamicPosition(_ref) {
var x = _ref.x,
y = _ref.y,
width = _ref.width,
height = _ref.height,
selfWidth = _ref.selfWidth,
selfHeight = _ref.selfHeight,
anchor = _ref.anchor,
_ref$padding = _ref.padding,
padding = _ref$padding === void 0 ? 0 : _ref$padding;
var _ANCHOR_POSITION$anch = ANCHOR_POSITION[anchor],
anchorX = _ANCHOR_POSITION$anch.x,
anchorY = _ANCHOR_POSITION$anch.y;
var top = y - anchorY * selfHeight;
var bottom = top + selfHeight;
var cutoffY =
Math.max(0, padding - top) +
Math.max(0, bottom - height + padding);
if (cutoffY > 0) {
var bestAnchorY = anchorY;
var minCutoff = cutoffY;
for (anchorY = 0; anchorY <= 1; anchorY += 0.5) {
top = y - anchorY * selfHeight;
bottom = top + selfHeight;
cutoffY =
Math.max(0, padding - top) +
Math.max(0, bottom - height + padding);
if (cutoffY < minCutoff) {
minCutoff = cutoffY;
bestAnchorY = anchorY;
}
}
anchorY = bestAnchorY;
}
var xStep = 0.5;
if (anchorY === 0.5) {
anchorX = Math.floor(anchorX);
xStep = 1;
}
var left = x - anchorX * selfWidth;
var right = left + selfWidth;
var cutoffX =
Math.max(0, padding - left) +
Math.max(0, right - width + padding);
if (cutoffX > 0) {
var bestAnchorX = anchorX;
var _minCutoff = cutoffX;
for (anchorX = 0; anchorX <= 1; anchorX += xStep) {
left = x - anchorX * selfWidth;
right = left + selfWidth;
cutoffX =
Math.max(0, padding - left) +
Math.max(0, right - width + padding);
if (cutoffX < _minCutoff) {
_minCutoff = cutoffX;
bestAnchorX = anchorX;
}
}
anchorX = bestAnchorX;
}
return (
ANCHOR_TYPES.find(function (positionType) {
var anchorPosition = ANCHOR_POSITION[positionType];
return (
anchorPosition.x === anchorX &&
anchorPosition.y === anchorY
);
}) || anchor
);
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/popup.js
//# sourceMappingURL=dynamic-position.js.map
var popup_propTypes = Object.assign({}, mapControlPropTypes, {
className: prop_types.string,
longitude: prop_types.number.isRequired,
latitude: prop_types.number.isRequired,
altitude: prop_types.number,
offsetLeft: prop_types.number,
offsetTop: prop_types.number,
tipSize: prop_types.number,
closeButton: prop_types.bool,
closeOnClick: prop_types.bool,
anchor: prop_types.oneOf(Object.keys(ANCHOR_POSITION)),
dynamicPosition: prop_types.bool,
sortByDepth: prop_types.bool,
onClose: prop_types.func,
});
var popup_defaultProps = Object.assign({}, mapControlDefaultProps, {
className: "",
offsetLeft: 0,
offsetTop: 0,
tipSize: 10,
anchor: "bottom",
dynamicPosition: true,
sortByDepth: false,
closeButton: true,
closeOnClick: true,
onClose: function onClose() {},
});
function popup_getPosition(props, viewport, el, _ref) {
var _ref2 = _slicedToArray(_ref, 2),
x = _ref2[0],
y = _ref2[1];
var anchor = props.anchor,
dynamicPosition = props.dynamicPosition,
tipSize = props.tipSize;
if (el) {
return dynamicPosition
? getDynamicPosition({
x: x,
y: y,
anchor: anchor,
padding: tipSize,
width: viewport.width,
height: viewport.height,
selfWidth: el.clientWidth,
selfHeight: el.clientHeight,
})
: anchor;
}
return anchor;
}
function getContainerStyle(
props,
viewport,
el,
_ref3,
positionType
) {
var _ref4 = _slicedToArray(_ref3, 3),
x = _ref4[0],
y = _ref4[1],
z = _ref4[2];
var offsetLeft = props.offsetLeft,
offsetTop = props.offsetTop,
sortByDepth = props.sortByDepth;
var anchorPosition = ANCHOR_POSITION[positionType];
var left = x + offsetLeft;
var top = y + offsetTop;
var xPercentage = crispPercentage(el, -anchorPosition.x * 100);
var yPercentage = crispPercentage(
el,
-anchorPosition.y * 100,
"y"
);
var style = {
position: "absolute",
transform: "\n translate("
.concat(xPercentage, "%, ")
.concat(yPercentage, "%)\n translate(")
.concat(crispPixel(left), "px, ")
.concat(crispPixel(top), "px)\n "),
display: undefined,
zIndex: undefined,
};
if (!sortByDepth) {
return style;
}
if (
z > 1 ||
z < -1 ||
x < 0 ||
x > viewport.width ||
y < 0 ||
y > viewport.height
) {
style.display = "none";
} else {
style.zIndex = Math.floor(((1 - z) / 2) * 100000);
}
return style;
}
function Popup(props) {
var contentRef = (0, react.useRef)(null);
var thisRef = useMapControl(props);
var context = thisRef.context,
containerRef = thisRef.containerRef;
var _useState = (0, react.useState)(false),
_useState2 = _slicedToArray(_useState, 2),
setLoaded = _useState2[1];
(0, react.useEffect)(
function () {
setLoaded(true);
},
[contentRef.current]
);
(0, react.useEffect)(
function () {
if (context.eventManager && props.closeOnClick) {
var clickCallback = function clickCallback() {
return thisRef.props.onClose();
};
context.eventManager.on("anyclick", clickCallback);
return function () {
context.eventManager.off(
"anyclick",
clickCallback
);
};
}
return undefined;
},
[context.eventManager, props.closeOnClick]
);
var viewport = context.viewport,
map = context.map;
var className = props.className,
longitude = props.longitude,
latitude = props.latitude,
tipSize = props.tipSize,
closeButton = props.closeButton,
children = props.children;
var altitude = props.altitude;
if (altitude === undefined) {
altitude = getTerrainElevation(map, {
longitude: longitude,
latitude: latitude,
});
}
var position = viewport.project([
longitude,
latitude,
altitude,
]);
var positionType = popup_getPosition(
props,
viewport,
contentRef.current,
position
);
var containerStyle = getContainerStyle(
props,
viewport,
containerRef.current,
position,
positionType
);
var onClickCloseButton = (0, react.useCallback)(function (evt) {
thisRef.props.onClose();
var eventManager = thisRef.context.eventManager;
if (eventManager) {
eventManager.once(
"click",
function (e) {
return e.stopPropagation();
},
evt.target
);
}
}, []);
return react.createElement(
"div",
{
className: "mapboxgl-popup mapboxgl-popup-anchor-"
.concat(positionType, " ")
.concat(className),
style: containerStyle,
ref: containerRef,
},
react.createElement("div", {
key: "tip",
className: "mapboxgl-popup-tip",
style: {
borderWidth: tipSize,
},
}),
react.createElement(
"div",
{
key: "content",
ref: contentRef,
className: "mapboxgl-popup-content",
},
closeButton &&
react.createElement(
"button",
{
key: "close-button",
className: "mapboxgl-popup-close-button",
type: "button",
onClick: onClickCloseButton,
},
"\xD7"
),
children
)
);
}
Popup.propTypes = popup_propTypes;
Popup.defaultProps = popup_defaultProps;
/* harmony default export */ var popup = react.memo(Popup); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/attribution-control.js
//# sourceMappingURL=popup.js.map
function attribution_control_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function attribution_control_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
attribution_control_ownKeys(
Object(source),
true
).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
attribution_control_ownKeys(Object(source)).forEach(
function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
}
);
}
}
return target;
}
var attribution_control_propTypes = Object.assign(
{},
mapControlPropTypes,
{
toggleLabel: prop_types.string,
className: prop_types.string,
style: prop_types.object,
compact: prop_types.bool,
customAttribution: prop_types.oneOfType([
prop_types.string,
prop_types.arrayOf(prop_types.string),
]),
}
);
var attribution_control_defaultProps = Object.assign(
{},
mapControlDefaultProps,
{
className: "",
toggleLabel: "Toggle Attribution",
}
);
function setupAttributioncontrol(
opts,
map,
container,
attributionContainer
) {
var control = new (mapbox_gl_default().AttributionControl)(
opts
);
control._map = map;
control._container = container;
control._innerContainer = attributionContainer;
control._updateAttributions();
control._updateEditLink();
map.on("styledata", control._updateData);
map.on("sourcedata", control._updateData);
return control;
}
function removeAttributionControl(control) {
control._map.off("styledata", control._updateData);
control._map.off("sourcedata", control._updateData);
}
function AttributionControl(props) {
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
var innerContainerRef = (0, react.useRef)(null);
var _useState = (0, react.useState)(false),
_useState2 = _slicedToArray(_useState, 2),
showCompact = _useState2[0],
setShowCompact = _useState2[1];
(0, react.useEffect)(
function () {
var control;
if (context.map) {
control = setupAttributioncontrol(
{
customAttribution: props.customAttribution,
},
context.map,
containerRef.current,
innerContainerRef.current
);
}
return function () {
return control && removeAttributionControl(control);
};
},
[context.map]
);
var compact =
props.compact === undefined
? context.viewport.width <= 640
: props.compact;
(0, react.useEffect)(
function () {
if (!compact && showCompact) {
setShowCompact(false);
}
},
[compact]
);
var toggleAttribution = (0, react.useCallback)(function () {
return setShowCompact(function (value) {
return !value;
});
}, []);
var style = (0, react.useMemo)(
function () {
return attribution_control_objectSpread(
{
position: "absolute",
},
props.style
);
},
[props.style]
);
return react.createElement(
"div",
{
style: style,
className: props.className,
},
react.createElement(
"div",
{
ref: containerRef,
"aria-pressed": showCompact,
className: "mapboxgl-ctrl mapboxgl-ctrl-attrib "
.concat(compact ? "mapboxgl-compact" : "", " ")
.concat(
showCompact ? "mapboxgl-compact-show" : ""
),
},
react.createElement("button", {
type: "button",
className: "mapboxgl-ctrl-attrib-button",
title: props.toggleLabel,
onClick: toggleAttribution,
}),
react.createElement("div", {
ref: innerContainerRef,
className: "mapboxgl-ctrl-attrib-inner",
role: "list",
})
)
);
}
AttributionControl.propTypes = attribution_control_propTypes;
AttributionControl.defaultProps = attribution_control_defaultProps;
/* harmony default export */ var attribution_control =
react.memo(AttributionControl); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/fullscreen-control.js
//# sourceMappingURL=attribution-control.js.map
function fullscreen_control_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function fullscreen_control_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
fullscreen_control_ownKeys(
Object(source),
true
).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
fullscreen_control_ownKeys(Object(source)).forEach(
function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
}
);
}
}
return target;
}
var fullscreen_control_propTypes = Object.assign(
{},
mapControlPropTypes,
{
className: prop_types.string,
style: prop_types.object,
container: prop_types.object,
label: prop_types.string,
}
);
var fullscreen_control_defaultProps = Object.assign(
{},
mapControlDefaultProps,
{
className: "",
container: null,
label: "Toggle fullscreen",
}
);
function FullscreenControl(props) {
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
var _useState = (0, react.useState)(false),
_useState2 = _slicedToArray(_useState, 2),
isFullscreen = _useState2[0],
setIsFullscreen = _useState2[1];
var _useState3 = (0, react.useState)(false),
_useState4 = _slicedToArray(_useState3, 2),
showButton = _useState4[0],
setShowButton = _useState4[1];
var _useState5 = (0, react.useState)(null),
_useState6 = _slicedToArray(_useState5, 2),
mapboxFullscreenControl = _useState6[0],
createMapboxFullscreenControl = _useState6[1];
(0, react.useEffect)(function () {
var control = new (mapbox_gl_default().FullscreenControl)();
createMapboxFullscreenControl(control);
setShowButton(control._checkFullscreenSupport());
var onFullscreenChange = function onFullscreenChange() {
var nextState = !control._fullscreen;
control._fullscreen = nextState;
setIsFullscreen(nextState);
};
document_.addEventListener(
control._fullscreenchange,
onFullscreenChange
);
return function () {
document_.removeEventListener(
control._fullscreenchange,
onFullscreenChange
);
};
}, []);
var onClickFullscreen = function onClickFullscreen() {
if (mapboxFullscreenControl) {
mapboxFullscreenControl._container =
props.container || context.container;
mapboxFullscreenControl._onClickFullscreen();
}
};
var style = (0, react.useMemo)(
function () {
return fullscreen_control_objectSpread(
{
position: "absolute",
},
props.style
);
},
[props.style]
);
if (!showButton) {
return null;
}
var className = props.className,
label = props.label;
var type = isFullscreen ? "shrink" : "fullscreen";
return react.createElement(
"div",
{
style: style,
className: className,
},
react.createElement(
"div",
{
className: "mapboxgl-ctrl mapboxgl-ctrl-group",
ref: containerRef,
},
react.createElement(
"button",
{
key: type,
className:
"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(
type
),
type: "button",
title: label,
onClick: onClickFullscreen,
},
react.createElement("span", {
className: "mapboxgl-ctrl-icon",
"aria-hidden": "true",
})
)
)
);
}
FullscreenControl.propTypes = fullscreen_control_propTypes;
FullscreenControl.defaultProps = fullscreen_control_defaultProps;
/* harmony default export */ var fullscreen_control =
react.memo(FullscreenControl); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/geolocate-utils.js
//# sourceMappingURL=fullscreen-control.js.map
var supported;
function isGeolocationSupported() {
if (supported !== undefined) {
return Promise.resolve(supported);
}
if (window.navigator.permissions !== undefined) {
return window.navigator.permissions
.query({
name: "geolocation",
})
.then(function (p) {
supported = p.state !== "denied";
return supported;
});
}
supported = Boolean(window.navigator.geolocation);
return Promise.resolve(supported);
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/geolocate-control.js
//# sourceMappingURL=geolocate-utils.js.map
function geolocate_control_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function geolocate_control_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
geolocate_control_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
geolocate_control_ownKeys(Object(source)).forEach(
function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
}
);
}
}
return target;
}
var geolocate_control_noop = function noop() {};
var geolocate_control_propTypes = Object.assign(
{},
mapControlPropTypes,
{
className: prop_types.string,
style: prop_types.object,
label: prop_types.string,
disabledLabel: prop_types.string,
auto: prop_types.bool,
positionOptions: prop_types.object,
fitBoundsOptions: prop_types.object,
trackUserLocation: prop_types.bool,
showUserLocation: prop_types.bool,
showAccuracyCircle: prop_types.bool,
showUserHeading: prop_types.bool,
onViewStateChange: prop_types.func,
onViewportChange: prop_types.func,
onGeolocate: prop_types.func,
}
);
var geolocate_control_defaultProps = Object.assign(
{},
mapControlDefaultProps,
{
className: "",
label: "Find My Location",
disabledLabel: "Location Not Available",
auto: false,
positionOptions: {
enableHighAccuracy: false,
timeout: 6000,
},
fitBoundsOptions: {
maxZoom: 15,
},
trackUserLocation: false,
showUserLocation: true,
showUserHeading: false,
showAccuracyCircle: true,
onGeolocate: function onGeolocate() {},
}
);
function geolocate_control_getBounds(position) {
var center = new (mapbox_gl_default().LngLat)(
position.coords.longitude,
position.coords.latitude
);
var radius = position.coords.accuracy;
var bounds = center.toBounds(radius);
return [
[bounds._ne.lng, bounds._ne.lat],
[bounds._sw.lng, bounds._sw.lat],
];
}
function setupMapboxGeolocateControl(
context,
props,
geolocateButton
) {
var control = new (mapbox_gl_default().GeolocateControl)(props);
control._container = document_.createElement("div");
control._map = {
on: function on() {},
_getUIString: function _getUIString() {
return "";
},
};
control._setupUI(true);
control._map = context.map;
control._geolocateButton = geolocateButton;
var eventManager = context.eventManager;
if (control.options.trackUserLocation && eventManager) {
eventManager.on("panstart", function () {
if (control._watchState === "ACTIVE_LOCK") {
control._watchState = "BACKGROUND";
geolocateButton.classList.add(
"mapboxgl-ctrl-geolocate-background"
);
geolocateButton.classList.remove(
"mapboxgl-ctrl-geolocate-active"
);
}
});
}
control.on("geolocate", props.onGeolocate);
return control;
}
function updateCamera(position, _ref) {
var context = _ref.context,
props = _ref.props;
var bounds = geolocate_control_getBounds(position);
var _context$viewport$fit = context.viewport.fitBounds(
bounds,
props.fitBoundsOptions
),
longitude = _context$viewport$fit.longitude,
latitude = _context$viewport$fit.latitude,
zoom = _context$viewport$fit.zoom;
var newViewState = Object.assign({}, context.viewport, {
longitude: longitude,
latitude: latitude,
zoom: zoom,
});
var mapState = new MapState(newViewState);
var viewState = Object.assign(
{},
mapState.getViewportProps(),
LINEAR_TRANSITION_PROPS
);
var onViewportChange =
props.onViewportChange ||
context.onViewportChange ||
geolocate_control_noop;
var onViewStateChange =
props.onViewStateChange ||
context.onViewStateChange ||
geolocate_control_noop;
onViewStateChange({
viewState: viewState,
});
onViewportChange(viewState);
}
function GeolocateControl(props) {
var thisRef = useMapControl(props);
var context = thisRef.context,
containerRef = thisRef.containerRef;
var geolocateButtonRef = (0, react.useRef)(null);
var _useState = (0, react.useState)(null),
_useState2 = _slicedToArray(_useState, 2),
mapboxGeolocateControl = _useState2[0],
createMapboxGeolocateControl = _useState2[1];
var _useState3 = (0, react.useState)(false),
_useState4 = _slicedToArray(_useState3, 2),
supportsGeolocation = _useState4[0],
setSupportsGeolocation = _useState4[1];
(0, react.useEffect)(
function () {
var control;
if (context.map) {
isGeolocationSupported().then(function (result) {
setSupportsGeolocation(result);
if (geolocateButtonRef.current) {
control = setupMapboxGeolocateControl(
context,
props,
geolocateButtonRef.current
);
control._updateCamera = function (
position
) {
return updateCamera(position, thisRef);
};
createMapboxGeolocateControl(control);
}
});
}
return function () {
if (control) {
control._clearWatch();
}
};
},
[context.map]
);
var triggerGeolocate = (0, react.useCallback)(
function () {
if (mapboxGeolocateControl) {
mapboxGeolocateControl.options = thisRef.props;
mapboxGeolocateControl.trigger();
}
},
[mapboxGeolocateControl]
);
(0, react.useEffect)(
function () {
if (props.auto) {
triggerGeolocate();
}
},
[mapboxGeolocateControl, props.auto]
);
(0, react.useEffect)(
function () {
if (mapboxGeolocateControl) {
mapboxGeolocateControl._onZoom();
}
},
[context.viewport.zoom]
);
var className = props.className,
label = props.label,
disabledLabel = props.disabledLabel,
trackUserLocation = props.trackUserLocation;
var style = (0, react.useMemo)(
function () {
return geolocate_control_objectSpread(
{
position: "absolute",
},
props.style
);
},
[props.style]
);
return react.createElement(
"div",
{
style: style,
className: className,
},
react.createElement(
"div",
{
key: "geolocate-control",
className: "mapboxgl-ctrl mapboxgl-ctrl-group",
ref: containerRef,
},
react.createElement(
"button",
{
key: "geolocate",
className:
"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",
ref: geolocateButtonRef,
disabled: !supportsGeolocation,
"aria-pressed": !trackUserLocation,
type: "button",
title: supportsGeolocation
? label
: disabledLabel,
"aria-label": supportsGeolocation
? label
: disabledLabel,
onClick: triggerGeolocate,
},
react.createElement("span", {
className: "mapboxgl-ctrl-icon",
"aria-hidden": "true",
})
)
)
);
}
GeolocateControl.propTypes = geolocate_control_propTypes;
GeolocateControl.defaultProps = geolocate_control_defaultProps;
/* harmony default export */ var geolocate_control =
react.memo(GeolocateControl); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/version.js
//# sourceMappingURL=geolocate-control.js.map
function compareVersions(version1, version2) {
var v1 = (version1 || "").split(".").map(Number);
var v2 = (version2 || "").split(".").map(Number);
for (var i = 0; i < 3; i++) {
var part1 = v1[i] || 0;
var part2 = v2[i] || 0;
if (part1 < part2) {
return -1;
}
if (part1 > part2) {
return 1;
}
}
return 0;
} // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/navigation-control.js
//# sourceMappingURL=version.js.map
function navigation_control_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function navigation_control_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
navigation_control_ownKeys(
Object(source),
true
).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
navigation_control_ownKeys(Object(source)).forEach(
function (key) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
}
);
}
}
return target;
}
var navigation_control_noop = function noop() {};
var navigation_control_propTypes = Object.assign(
{},
mapControlPropTypes,
{
className: prop_types.string,
style: prop_types.object,
onViewStateChange: prop_types.func,
onViewportChange: prop_types.func,
showCompass: prop_types.bool,
showZoom: prop_types.bool,
zoomInLabel: prop_types.string,
zoomOutLabel: prop_types.string,
compassLabel: prop_types.string,
}
);
var navigation_control_defaultProps = Object.assign(
{},
mapControlDefaultProps,
{
className: "",
showCompass: true,
showZoom: true,
zoomInLabel: "Zoom In",
zoomOutLabel: "Zoom Out",
compassLabel: "Reset North",
}
);
var VERSION_LEGACY = 1;
var VERSION_1_6 = 2;
function getUIVersion(mapboxVersion) {
return compareVersions(mapboxVersion, "1.6.0") >= 0
? VERSION_1_6
: VERSION_LEGACY;
}
function updateViewport(context, props, opts) {
var viewport = context.viewport;
var mapState = new MapState(Object.assign({}, viewport, opts));
var viewState = Object.assign(
{},
mapState.getViewportProps(),
LINEAR_TRANSITION_PROPS
);
var onViewportChange =
props.onViewportChange ||
context.onViewportChange ||
navigation_control_noop;
var onViewStateChange =
props.onViewStateChange ||
context.onViewStateChange ||
navigation_control_noop;
onViewStateChange({
viewState: viewState,
});
onViewportChange(viewState);
}
function renderButton(type, label, callback, children) {
return react.createElement(
"button",
{
key: type,
className: "mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(
type
),
type: "button",
title: label,
onClick: callback,
},
children ||
react.createElement("span", {
className: "mapboxgl-ctrl-icon",
"aria-hidden": "true",
})
);
}
function renderCompass(context) {
var uiVersion = (0, react.useMemo)(
function () {
return context.map
? getUIVersion(context.map.version)
: VERSION_1_6;
},
[context.map]
);
var bearing = context.viewport.bearing;
var style = {
transform: "rotate(".concat(-bearing, "deg)"),
};
return uiVersion === VERSION_1_6
? react.createElement("span", {
className: "mapboxgl-ctrl-icon",
"aria-hidden": "true",
style: style,
})
: react.createElement("span", {
className: "mapboxgl-ctrl-compass-arrow",
style: style,
});
}
function NavigationControl(props) {
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
var onZoomIn = function onZoomIn() {
updateViewport(context, props, {
zoom: context.viewport.zoom + 1,
});
};
var onZoomOut = function onZoomOut() {
updateViewport(context, props, {
zoom: context.viewport.zoom - 1,
});
};
var onResetNorth = function onResetNorth() {
updateViewport(context, props, {
bearing: 0,
pitch: 0,
});
};
var className = props.className,
showCompass = props.showCompass,
showZoom = props.showZoom,
zoomInLabel = props.zoomInLabel,
zoomOutLabel = props.zoomOutLabel,
compassLabel = props.compassLabel;
var style = (0, react.useMemo)(
function () {
return navigation_control_objectSpread(
{
position: "absolute",
},
props.style
);
},
[props.style]
);
return react.createElement(
"div",
{
style: style,
className: className,
},
react.createElement(
"div",
{
className: "mapboxgl-ctrl mapboxgl-ctrl-group",
ref: containerRef,
},
showZoom &&
renderButton("zoom-in", zoomInLabel, onZoomIn),
showZoom &&
renderButton("zoom-out", zoomOutLabel, onZoomOut),
showCompass &&
renderButton(
"compass",
compassLabel,
onResetNorth,
renderCompass(context)
)
)
);
}
NavigationControl.propTypes = navigation_control_propTypes;
NavigationControl.defaultProps = navigation_control_defaultProps;
/* harmony default export */ var navigation_control =
react.memo(NavigationControl); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/scale-control.js
//# sourceMappingURL=navigation-control.js.map
function scale_control_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function scale_control_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
scale_control_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
scale_control_ownKeys(Object(source)).forEach(function (
key
) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var scale_control_propTypes = Object.assign(
{},
mapControlPropTypes,
{
className: prop_types.string,
style: prop_types.object,
maxWidth: prop_types.number,
unit: prop_types.oneOf(["imperial", "metric", "nautical"]),
}
);
var scale_control_defaultProps = Object.assign(
{},
mapControlDefaultProps,
{
className: "",
maxWidth: 100,
unit: "metric",
}
);
function ScaleControl(props) {
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
var _useState = (0, react.useState)(null),
_useState2 = _slicedToArray(_useState, 2),
mapboxScaleControl = _useState2[0],
createMapboxScaleControl = _useState2[1];
(0, react.useEffect)(
function () {
if (context.map) {
var control =
new (mapbox_gl_default().ScaleControl)();
control._map = context.map;
control._container = containerRef.current;
createMapboxScaleControl(control);
}
},
[context.map]
);
if (mapboxScaleControl) {
mapboxScaleControl.options = props;
mapboxScaleControl._onMove();
}
var style = (0, react.useMemo)(
function () {
return scale_control_objectSpread(
{
position: "absolute",
},
props.style
);
},
[props.style]
);
return react.createElement(
"div",
{
style: style,
className: props.className,
},
react.createElement("div", {
ref: containerRef,
className: "mapboxgl-ctrl mapboxgl-ctrl-scale",
})
);
}
ScaleControl.propTypes = scale_control_propTypes;
ScaleControl.defaultProps = scale_control_defaultProps;
/* harmony default export */ var scale_control =
react.memo(ScaleControl); // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/overlays/canvas-overlay.js
//# sourceMappingURL=scale-control.js.map
var canvas_overlay_pixelRatio =
(typeof window !== "undefined" && window.devicePixelRatio) || 1;
var canvas_overlay_propTypes = Object.assign(
{},
mapControlPropTypes,
{
redraw: prop_types.func.isRequired,
}
);
var canvas_overlay_defaultProps = {
captureScroll: false,
captureDrag: false,
captureClick: false,
captureDoubleClick: false,
capturePointerMove: false,
};
function CanvasOverlay(props) {
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
var _useState = (0, react.useState)(null),
_useState2 = _slicedToArray(_useState, 2),
ctx = _useState2[0],
setDrawingContext = _useState2[1];
(0, react.useEffect)(function () {
setDrawingContext(containerRef.current.getContext("2d"));
}, []);
var viewport = context.viewport,
isDragging = context.isDragging;
if (ctx) {
ctx.save();
ctx.scale(
canvas_overlay_pixelRatio,
canvas_overlay_pixelRatio
);
props.redraw({
width: viewport.width,
height: viewport.height,
ctx: ctx,
isDragging: isDragging,
project: viewport.project,
unproject: viewport.unproject,
});
ctx.restore();
}
return react.createElement("canvas", {
ref: containerRef,
width: viewport.width * canvas_overlay_pixelRatio,
height: viewport.height * canvas_overlay_pixelRatio,
style: {
width: "".concat(viewport.width, "px"),
height: "".concat(viewport.height, "px"),
position: "absolute",
left: 0,
top: 0,
},
});
}
CanvasOverlay.propTypes = canvas_overlay_propTypes;
CanvasOverlay.defaultProps = canvas_overlay_defaultProps;
/* harmony default export */ var canvas_overlay =
/* unused pure expression or super */ null && CanvasOverlay; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/overlays/html-overlay.js
//# sourceMappingURL=canvas-overlay.js.map
function html_overlay_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function html_overlay_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
html_overlay_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
html_overlay_ownKeys(Object(source)).forEach(function (
key
) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var html_overlay_propTypes = Object.assign(
{},
mapControlPropTypes,
{
redraw: prop_types.func.isRequired,
style: prop_types.object,
}
);
var html_overlay_defaultProps = {
captureScroll: false,
captureDrag: false,
captureClick: false,
captureDoubleClick: false,
capturePointerMove: false,
};
function HTMLOverlay(props) {
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
var viewport = context.viewport,
isDragging = context.isDragging;
var style = html_overlay_objectSpread(
{
position: "absolute",
left: 0,
top: 0,
width: viewport.width,
height: viewport.height,
},
props.style
);
return react.createElement(
"div",
{
ref: containerRef,
style: style,
},
props.redraw({
width: viewport.width,
height: viewport.height,
isDragging: isDragging,
project: viewport.project,
unproject: viewport.unproject,
})
);
}
HTMLOverlay.propTypes = html_overlay_propTypes;
HTMLOverlay.defaultProps = html_overlay_defaultProps;
/* harmony default export */ var html_overlay =
/* unused pure expression or super */ null && HTMLOverlay; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/overlays/svg-overlay.js
//# sourceMappingURL=html-overlay.js.map
function svg_overlay_ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly)
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(
object,
sym
).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function svg_overlay_objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
svg_overlay_ownKeys(Object(source), true).forEach(
function (key) {
_defineProperty(target, key, source[key]);
}
);
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(
target,
Object.getOwnPropertyDescriptors(source)
);
} else {
svg_overlay_ownKeys(Object(source)).forEach(function (
key
) {
Object.defineProperty(
target,
key,
Object.getOwnPropertyDescriptor(source, key)
);
});
}
}
return target;
}
var svg_overlay_propTypes = Object.assign({}, mapControlPropTypes, {
redraw: prop_types.func.isRequired,
style: prop_types.object,
});
var svg_overlay_defaultProps = {
captureScroll: false,
captureDrag: false,
captureClick: false,
captureDoubleClick: false,
capturePointerMove: false,
};
function SVGOverlay(props) {
var _useMapControl = useMapControl(props),
context = _useMapControl.context,
containerRef = _useMapControl.containerRef;
var viewport = context.viewport,
isDragging = context.isDragging;
var style = svg_overlay_objectSpread(
{
position: "absolute",
left: 0,
top: 0,
},
props.style
);
return react.createElement(
"svg",
{
width: viewport.width,
height: viewport.height,
ref: containerRef,
style: style,
},
props.redraw({
width: viewport.width,
height: viewport.height,
isDragging: isDragging,
project: viewport.project,
unproject: viewport.unproject,
})
);
}
SVGOverlay.propTypes = svg_overlay_propTypes;
SVGOverlay.defaultProps = svg_overlay_defaultProps;
/* harmony default export */ var svg_overlay =
/* unused pure expression or super */ null && SVGOverlay; // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/set-rtl-text-plugin.js
//# sourceMappingURL=svg-overlay.js.map
var setRTLTextPlugin = mapbox_gl_default()
? mapbox_gl_default().setRTLTextPlugin
: function () {};
/* harmony default export */ var set_rtl_text_plugin =
/* unused pure expression or super */ null && setRTLTextPlugin;
//# sourceMappingURL=set-rtl-text-plugin.js.map // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/index.js
//# sourceMappingURL=index.js.map
/***/
},
},
]);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/feedback-mapbox/785-e1932cc99ac3bb67/output.js | JavaScript | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{/***/840:/***/function(t,e,n){var r;!/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */function(i,o,a,s){"use strict";var c,u=["","webkit","Moz","MS","ms","o"],l=o.createElement("div"),h=Math.round,p=Math.abs,f=Date.now;/**
* set a timeout with a given scope
* @param {Function} fn
* @param {Number} timeout
* @param {Object} context
* @returns {number}
*/function d(t,e,n){return setTimeout(O(t,n),e)}/**
* if the argument is an array, we want to execute the fn on each entry
* if it aint an array we don't want to do a thing.
* this is used by all the methods that accept a single and array argument.
* @param {*|Array} arg
* @param {String} fn
* @param {Object} [context]
* @returns {Boolean}
*/function v(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}/**
* walk objects and arrays
* @param {Object} obj
* @param {Function} iterator
* @param {Object} context
*/function g(t,e,n){var r;if(t){if(t.forEach)t.forEach(e,n);else if(t.length!==s)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}}/**
* wrap a method with a deprecation warning and stack trace
* @param {Function} method
* @param {String} name
* @param {String} message
* @returns {Function} A new function wrapping the supplied method.
*/function m(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}c="function"!=typeof Object.assign?function(t){if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;/**
* extend object.
* means that properties in dest will be overwritten by the ones in src.
* @param {Object} dest
* @param {Object} src
* @param {Boolean} [merge=false]
* @returns {Object} dest
*/var b=m(function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&t[r[i]]===s)&&(t[r[i]]=e[r[i]]),i++;return t},"extend","Use `assign`."),y=m(function(t,e){return b(t,e,!0)},"merge","Use `assign`.");/**
* simple class inheritance
* @param {Function} child
* @param {Function} base
* @param {Object} [properties]
*/function w(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&c(r,n)}/**
* simple function bind
* @param {Function} fn
* @param {Object} context
* @returns {Function}
*/function O(t,e){return function(){return t.apply(e,arguments)}}/**
* let a boolean value also be a function that must return a boolean
* this first item in args will be used as the context
* @param {Boolean|Function} val
* @param {Array} [args]
* @returns {Boolean}
*/function E(t,e){return"function"==typeof t?t.apply(e&&e[0]||s,e):t}/**
* addEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/function _(t,e,n){g(S(e),function(e){t.addEventListener(e,n,!1)})}/**
* removeEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/function P(t,e,n){g(S(e),function(e){t.removeEventListener(e,n,!1)})}/**
* find if a node is in the given parent
* @method hasParent
* @param {HTMLElement} node
* @param {HTMLElement} parent
* @return {Boolean} found
*/function M(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}/**
* small indexOf wrapper
* @param {String} str
* @param {String} find
* @returns {Boolean} found
*/function j(t,e){return t.indexOf(e)>-1}/**
* split string on whitespace
* @param {String} str
* @returns {Array} words
*/function S(t){return t.trim().split(/\s+/g)}/**
* find if a array contains the object using indexOf or a simple polyFill
* @param {Array} src
* @param {String} find
* @param {String} [findByKey]
* @return {Boolean|Number} false when not found, or the index
*/function T(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return -1}/**
* convert array-like objects to real arrays
* @param {Object} obj
* @returns {Array}
*/function k(t){return Array.prototype.slice.call(t,0)}/**
* unique array with objects based on a key (like 'id') or just by the array's value
* @param {Array} src [{id:1},{id:2},{id:1}]
* @param {String} [key]
* @param {Boolean} [sort=False]
* @returns {Array} [{id:1},{id:2}]
*/function x(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];0>T(i,a)&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}/**
* get the prefixed property
* @param {Object} obj
* @param {String} property
* @returns {String|Undefined} prefixed
*/function D(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<u.length;){if((r=(n=u[o])?n+i:e)in t)return r;o++}return s}/**
* get a unique id
* @returns {number} uniqueId
*/var C=1;/**
* get the window object of an element
* @param {HTMLElement} element
* @returns {DocumentView|Window}
*/function R(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var A="ontouchstart"in i,I=D(i,"PointerEvent")!==s,L=A&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),N="touch",z="mouse",F=["x","y"],V=["clientX","clientY"];/**
* create new input type manager
* @param {Manager} manager
* @param {Function} callback
* @returns {Input}
* @constructor
*/function Z(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,// smaller wrapper around the handler, for the scope and the enabled state of the manager,
// so when disabled the input events are completely bypassed.
this.domHandler=function(e){E(t.options.enable,[t])&&n.handler(e)},this.init()}/**
* handle input events
* @param {Manager} manager
* @param {String} eventType
* @param {Object} input
*/function B(t,e,n){var r,i,o,a,c,u,l,h,d,v,g,m,b,y,w,O=n.pointers.length,E=n.changedPointers.length,_=1&e&&O-E==0,P=12&e&&O-E==0;n.isFirst=!!_,n.isFinal=!!P,_&&(t.session={}),// source event is the normalized value of the domEvents
// like 'touchstart, mouseup, pointerdown'
n.eventType=e,r=t.session,o=(i=n.pointers).length,r.firstInput||(r.firstInput=U(n)),o>1&&!r.firstMultiple?r.firstMultiple=U(n):1===o&&(r.firstMultiple=!1),a=r.firstInput,u=(c=r.firstMultiple)?c.center:a.center,l=n.center=q(i),n.timeStamp=f(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=Y(u,l),n.distance=X(u,l),h=n.center,d=r.offsetDelta||{},v=r.prevDelta||{},g=r.prevInput||{},(1===n.eventType||4===g.eventType)&&(v=r.prevDelta={x:g.deltaX||0,y:g.deltaY||0},d=r.offsetDelta={x:h.x,y:h.y}),n.deltaX=v.x+(h.x-d.x),n.deltaY=v.y+(h.y-d.y),n.offsetDirection=H(n.deltaX,n.deltaY),m=W(n.deltaTime,n.deltaX,n.deltaY),n.overallVelocityX=m.x,n.overallVelocityY=m.y,n.overallVelocity=p(m.x)>p(m.y)?m.x:m.y,n.scale=c?(b=c.pointers,X(i[0],i[1],V)/X(b[0],b[1],V)):1,n.rotation=c?(y=c.pointers,Y(i[1],i[0],V)+Y(y[1],y[0],V)):0,n.maxPointers=r.prevInput?n.pointers.length>r.prevInput.maxPointers?n.pointers.length:r.prevInput.maxPointers:n.pointers.length,/**
* velocity is calculated every x ms
* @param {Object} session
* @param {Object} input
*/function(t,e){var n,r,i,o,a=t.lastInterval||e,c=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(c>25||a.velocity===s)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,h=W(c,u,l);r=h.x,i=h.y,n=p(h.x)>p(h.y)?h.x:h.y,o=H(u,l),t.lastInterval=e}else // use latest velocity info if it doesn't overtake a minimum period
n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(r,n),w=t.element,M(n.srcEvent.target,w)&&(w=n.srcEvent.target),n.target=w,// emit secret event
t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}/**
* create a simple clone from the input used for storage of firstInput and firstMultiple
* @param {Object} input
* @returns {Object} clonedInputData
*/function U(t){for(// make a simple copy of the pointers because we will get a reference if we don't
// we only need clientXY for the calculations
var e=[],n=0;n<t.pointers.length;)e[n]={clientX:h(t.pointers[n].clientX),clientY:h(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:q(e),deltaX:t.deltaX,deltaY:t.deltaY}}/**
* get the center of all the pointers
* @param {Array} pointers
* @return {Object} center contains `x` and `y` properties
*/function q(t){var e=t.length;// no need to loop when only one touch
if(1===e)return{x:h(t[0].clientX),y:h(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:h(n/e),y:h(r/e)}}/**
* calculate the velocity between two points. unit is in px per ms.
* @param {Number} deltaTime
* @param {Number} x
* @param {Number} y
* @return {Object} velocity `x` and `y`
*/function W(t,e,n){return{x:e/t||0,y:n/t||0}}/**
* get the direction between two points
* @param {Number} x
* @param {Number} y
* @return {Number} direction
*/function H(t,e){return t===e?1:p(t)>=p(e)?t<0?2:4:e<0?8:16}/**
* calculate the absolute distance between two points
* @param {Object} p1 {x, y}
* @param {Object} p2 {x, y}
* @param {Array} [props] containing x and y keys
* @return {Number} distance
*/function X(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}/**
* calculate the angle between two coordinates
* @param {Object} p1
* @param {Object} p2
* @param {Array} [props] containing x and y keys
* @return {Number} angle
*/function Y(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]];return 180*Math.atan2(e[n[1]]-t[n[1]],r)/Math.PI}Z.prototype={/**
* should handle the inputEvent data and trigger the callback
* @virtual
*/handler:function(){},/**
* bind the events
*/init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(R(this.element),this.evWin,this.domHandler)},/**
* unbind the events
*/destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(R(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4};/**
* Mouse events input
* @constructor
* @extends Input
*/function G(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,Z.apply(this,arguments)}w(G,Z,{/**
* handle mouse events
* @param {Object} ev
*/handler:function(t){var e=K[t.type];// mouse must be down
1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:z,srcEvent:t}))}});var $={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:N,3:"pen",4:z,5:"kinect"},Q="pointerdown",tt="pointermove pointerup pointercancel";/**
* Pointer events input
* @constructor
* @extends Input
*/function te(){this.evEl=Q,this.evWin=tt,Z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(Q="MSPointerDown",tt="MSPointerMove MSPointerUp MSPointerCancel"),w(te,Z,{/**
* handle mouse events
* @param {Object} ev
*/handler:function(t){var e=this.store,n=!1,r=$[t.type.toLowerCase().replace("ms","")],i=J[t.pointerType]||t.pointerType,o=i==N,a=T(e,t.pointerId,"pointerId");// it not found, so the pointer hasn't been down (so it's probably a hover)
1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(n=!0),!(a<0)&&(// update the event in the store
e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:i,srcEvent:t}),n&&// remove from the store
e.splice(a,1))}});var tn={touchstart:1,touchmove:2,touchend:4,touchcancel:8};/**
* Touch events input
* @constructor
* @extends Input
*/function tr(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Z.apply(this,arguments)}/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/function ti(t,e){var n=k(t.touches),r=k(t.changedTouches);return 12&e&&(n=x(n.concat(r),"identifier",!0)),[n,r]}w(tr,Z,{handler:function(t){var e=tn[t.type];if(1===e&&(this.started=!0),this.started){var n=ti.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}});var to={touchstart:1,touchmove:2,touchend:4,touchcancel:8};/**
* Multi-user touch events input
* @constructor
* @extends Input
*/function ta(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},Z.apply(this,arguments)}/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/function ts(t,e){var n=k(t.touches),r=this.targetIds;// when there is only one touch, the process can be simplified
if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=k(t.changedTouches),s=[],c=this.target;// collect touches
if(// get target touches from touches
o=n.filter(function(t){return M(t.target,c)}),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(// filter changed touches to only contain touches that exist in the collected target ids
i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&e&&delete r[a[i].identifier],i++;if(s.length)return[// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
x(o.concat(s),"identifier",!0),s]}function tc(){Z.apply(this,arguments);var t=O(this.handler,this);this.touch=new ta(this.manager,t),this.mouse=new G(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function tu(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,tl.call(this,e)):12&t&&tl.call(this,e)}function tl(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)},2500)}}function th(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}w(ta,Z,{handler:function(t){var e=to[t.type],n=ts.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}),w(tc,Z,{/**
* handle mouse and touch events
* @param {Hammer} manager
* @param {String} inputEvent
* @param {Object} inputData
*/handler:function(t,e,n){var r=n.pointerType==N,i=n.pointerType==z;if(!i||!n.sourceCapabilities||!n.sourceCapabilities.firesTouchEvents){// when we're in a touch event, record touches to de-dupe synthetic mouse event
if(r)tu.call(this,e,n);else if(i&&th.call(this,n))return;this.callback(t,e,n)}},/**
* remove the event listeners
*/destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var tp=D(l.style,"touchAction"),tf=s!==tp,td="compute",tv="auto",tg="manipulation",tm="none",tb="pan-x",ty="pan-y",tw=function(){if(!tf)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){// If css.supports is not supported but there is native touch-action assume it supports
// all values. This is the case for IE 10 and 11.
t[n]=!e||i.CSS.supports("touch-action",n)}),t}();/**
* Touch Action
* sets the touchAction property or uses the js alternative
* @param {Manager} manager
* @param {String} value
* @constructor
*/function tO(t,e){this.manager=t,this.set(e)}/**
* Recognizer
* Every recognizer needs to extend from this class.
* @constructor
* @param {Object} options
*/function tE(t){var e;this.options=c({},this.defaults,t||{}),this.id=C++,this.manager=null,// default is enable true
this.options.enable=s===(e=this.options.enable)||e,this.state=1,this.simultaneous={},this.requireFail=[]}/**
* get a usable string, used as event postfix
* @param {Const} state
* @returns {String} state
*/function t_(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}/**
* direction cons to string
* @param {Const} direction
* @returns {String}
*/function tP(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}/**
* get a recognizer by name if it is bound to a manager
* @param {Recognizer|String} otherRecognizer
* @param {Recognizer} recognizer
* @returns {Recognizer}
*/function tM(t,e){var n=e.manager;return n?n.get(t):t}/**
* This recognizer is just used as a base for the simple attribute recognizers.
* @constructor
* @extends Recognizer
*/function tj(){tE.apply(this,arguments)}/**
* Pan
* Recognized when the pointer is down and moved in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/function tS(){tj.apply(this,arguments),this.pX=null,this.pY=null}/**
* Pinch
* Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).
* @constructor
* @extends AttrRecognizer
*/function tT(){tj.apply(this,arguments)}/**
* Press
* Recognized when the pointer is down for x ms without any movement.
* @constructor
* @extends Recognizer
*/function tk(){tE.apply(this,arguments),this._timer=null,this._input=null}/**
* Rotate
* Recognized when two or more pointer are moving in a circular motion.
* @constructor
* @extends AttrRecognizer
*/function tx(){tj.apply(this,arguments)}/**
* Swipe
* Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/function tD(){tj.apply(this,arguments)}/**
* A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur
* between the given interval and position. The delay option can be used to recognize multi-taps without firing
* a single tap.
*
* The eventData from the emitted event contains the property `tapCount`, which contains the amount of
* multi-taps being recognized.
* @constructor
* @extends Recognizer
*/function tC(){tE.apply(this,arguments),// previous time and center,
// used for tap counting
this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}/**
* Simple way to create a manager with a default set of recognizers.
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/function tR(t,e){var n,r;return(e=e||{}).recognizers=(n=e.recognizers,r=tR.defaults.preset,s===n?r:n),new tA(t,e)}/**
* Manager
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/function tA(t,e){var n;this.options=c({},tR.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this.options.inputClass)?n:I?te:L?ta:A?tc:G)(this,B),this.touchAction=new tO(this,this.options.touchAction),tI(this,!0),g(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}/**
* add/remove the css properties as defined in manager.options.cssProps
* @param {Manager} manager
* @param {Boolean} add
*/function tI(t,e){var n,r=t.element;r.style&&(g(t.options.cssProps,function(i,o){n=D(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}tO.prototype={/**
* set the touchAction value on the element or enable the polyfill
* @param {String} value
*/set:function(t){t==td&&(t=this.compute()),tf&&this.manager.element.style&&tw[t]&&(this.manager.element.style[tp]=t),this.actions=t.toLowerCase().trim()},/**
* just re-set the touchAction value
*/update:function(){this.set(this.manager.options.touchAction)},/**
* compute the value for the touchAction property based on the recognizer's settings
* @returns {String} value
*/compute:function(){var t=[];return g(this.manager.recognizers,function(e){E(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),/**
* when the touchActions are collected they are not a valid value, so we need to clean things up. *
* @param {String} actions
* @returns {*}
*/function(t){// none
if(j(t,tm))return tm;var e=j(t,tb),n=j(t,ty);return(// if both pan-x and pan-y are set (different recognizers
// for different directions, e.g. horizontal pan but vertical swipe?)
// we need none (as otherwise with pan-x pan-y combined none of these
// recognizers will work, since the browser would handle all panning
e&&n?tm:e||n?e?tb:ty:j(t,tg)?tg:tv)}(t.join(" "))},/**
* this method is called on each input cycle and provides the preventing of the browser behavior
* @param {Object} input
*/preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;// if the touch action did prevented once this session
if(this.manager.session.prevented){e.preventDefault();return}var r=this.actions,i=j(r,tm)&&!tw[tm],o=j(r,ty)&&!tw[ty],a=j(r,tb)&&!tw[tb];if(i){//do not prevent defaults if this is a tap gesture
var s=1===t.pointers.length,c=t.distance<2,u=t.deltaTime<250;if(s&&c&&u)return}if((!a||!o)&&(i||o&&6&n||a&&24&n))return this.preventSrc(e)},/**
* call preventDefault to prevent the browser's default behavior (scrolling in most cases)
* @param {Object} srcEvent
*/preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}},tE.prototype={/**
* @virtual
* @type {Object}
*/defaults:{},/**
* set options
* @param {Object} options
* @return {Recognizer}
*/set:function(t){return c(this.options,t),// also update the touchAction, in case something changed about the directions/enabled state
this.manager&&this.manager.touchAction.update(),this},/**
* recognize simultaneous with an other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/recognizeWith:function(t){if(v(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=tM(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},/**
* drop the simultaneous link. it doesnt remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/dropRecognizeWith:function(t){return v(t,"dropRecognizeWith",this)||(t=tM(t,this),delete this.simultaneous[t.id]),this},/**
* recognizer can only run when an other is failing
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/requireFailure:function(t){if(v(t,"requireFailure",this))return this;var e=this.requireFail;return -1===T(e,t=tM(t,this))&&(e.push(t),t.requireFailure(this)),this},/**
* drop the requireFailure link. it does not remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/dropRequireFailure:function(t){if(v(t,"dropRequireFailure",this))return this;t=tM(t,this);var e=T(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},/**
* has require failures boolean
* @returns {boolean}
*/hasRequireFailures:function(){return this.requireFail.length>0},/**
* if the recognizer can recognize simultaneous with an other recognizer
* @param {Recognizer} otherRecognizer
* @returns {Boolean}
*/canRecognizeWith:function(t){return!!this.simultaneous[t.id]},/**
* You should use `tryEmit` instead of `emit` directly to check
* that all the needed recognizers has failed before emitting.
* @param {Object} input
*/emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+t_(n)),r(e.options.event),t.additionalEvent&&// additional event(panleft, panright, pinchin, pinchout...)
r(t.additionalEvent),n>=8&&r(e.options.event+t_(n))},/**
* Check that all the require failure recognizers has failed,
* if true, it emits a gesture event,
* otherwise, setup the state to FAILED.
* @param {Object} input
*/tryEmit:function(t){if(this.canEmit())return this.emit(t);// it's failing anyway
this.state=32},/**
* can we emit?
* @returns {boolean}
*/canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},/**
* update the recognizer
* @param {Object} inputData
*/recognize:function(t){// make a new copy of the inputData
// so we can change the inputData without messing up the other recognizers
var e=c({},t);// is is enabled and allow recognizing?
if(!E(this.options.enable,[this,e])){this.reset(),this.state=32;return}56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},/**
* return the state of the recognizer
* the actual recognizing happens in this method
* @virtual
* @param {Object} inputData
* @returns {Const} STATE
*/process:function(t){},/**
* return the preferred touch-action
* @virtual
* @returns {Array}
*/getTouchAction:function(){},/**
* called when the gesture isn't allowed to recognize
* like when another is being recognized or it is disabled
* @virtual
*/reset:function(){}},w(tj,tE,{/**
* @namespace
* @memberof AttrRecognizer
*/defaults:{/**
* @type {Number}
* @default 1
*/pointers:1},/**
* Used to check if it the recognizer receives valid input, like input.distance > 10.
* @memberof AttrRecognizer
* @param {Object} input
* @returns {Boolean} recognized
*/attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},/**
* Process the input and return the state for the recognizer
* @memberof AttrRecognizer
* @param {Object} input
* @returns {*} State
*/process:function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return(// on cancel input and we've recognized before, return STATE_CANCELLED
r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:32)}}),w(tS,tj,{/**
* @namespace
* @memberof PanRecognizer
*/defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(ty),24&t&&e.push(tb),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return tj.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=tP(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(tT,tj,{/**
* @namespace
* @memberof PinchRecognizer
*/defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[tm]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),w(tk,tE,{/**
* @namespace
* @memberof PressRecognizer
*/defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[tv]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;// we only allow little movement
// and we've reached an end event, so a tap is possible
if(this._input=t,r&&n&&(!(12&t.eventType)||i)){if(1&t.eventType)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8}else this.reset();return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(tx,tj,{/**
* @namespace
* @memberof RotateRecognizer
*/defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[tm]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),w(tD,tj,{/**
* @namespace
* @memberof SwipeRecognizer
*/defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return tS.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&p(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=tP(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(tC,tE,{/**
* @namespace
* @memberof PinchRecognizer
*/defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[tg]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();// we only allow little movement
// and we've reached an end event, so a tap is possible
if(r&&i&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||X(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return(// no failing requirements, immediately trigger the tap event
// or wait as long as the multitap interval to trigger
this.hasRequireFailures()?(this._timer=d(function(){this.state=8,this.tryEmit()},e.interval,this),2):8)}return 32},failTimeout:function(){return this._timer=d(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),/**
* @const {string}
*/tR.VERSION="2.0.7",/**
* default settings
* @namespace
*/tR.defaults={/**
* set if DOM events are being triggered.
* But this is slower and unused by simple implementations, so disabled by default.
* @type {Boolean}
* @default false
*/domEvents:!1,/**
* The value for the touchAction property/fallback.
* When set to `compute` it will magically set the correct value based on the added recognizers.
* @type {String}
* @default compute
*/touchAction:td,/**
* @type {Boolean}
* @default true
*/enable:!0,/**
* EXPERIMENTAL FEATURE -- can be removed/changed
* Change the parent input target element.
* If Null, then it is being set the to main element.
* @type {Null|EventTarget}
* @default null
*/inputTarget:null,/**
* force an input class
* @type {Null|Function}
* @default null
*/inputClass:null,/**
* Default recognizer setup when calling `Hammer()`
* When creating a new Manager these will be skipped.
* @type {Array}
*/preset:[// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
[tx,{enable:!1}],[tT,{enable:!1},["rotate"]],[tD,{direction:6}],[tS,{direction:6},["swipe"]],[tC],[tC,{event:"doubletap",taps:2},["tap"]],[tk]],/**
* Some CSS properties can be used to improve the working of Hammer.
* Add them to this method and they will be set when creating a new Manager.
* @namespace
*/cssProps:{/**
* Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/userSelect:"none",/**
* Disable the Windows Phone grippers when pressing an element.
* @type {String}
* @default 'none'
*/touchSelect:"none",/**
* Disables the default callout shown when you touch and hold a touch target.
* On iOS, when you touch and hold a touch target such as a link, Safari displays
* a callout containing information about the link. This property allows you to disable that callout.
* @type {String}
* @default 'none'
*/touchCallout:"none",/**
* Specifies whether zooming is enabled. Used by IE10>
* @type {String}
* @default 'none'
*/contentZooming:"none",/**
* Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/userDrag:"none",/**
* Overrides the highlight color shown when the user taps a link or a JavaScript
* clickable element in iOS. This property obeys the alpha value, if specified.
* @type {String}
* @default 'rgba(0,0,0,0)'
*/tapHighlightColor:"rgba(0,0,0,0)"}},tA.prototype={/**
* set options
* @param {Object} options
* @returns {Manager}
*/set:function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(// Clean up existing event listeners and reinitialize
this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},/**
* stop recognizing for this session.
* This session will be discarded, when a new [input]start event is fired.
* When forced, the recognizer cycle is stopped immediately.
* @param {Boolean} [force]
*/stop:function(t){this.session.stopped=t?2:1},/**
* run the recognizers!
* called by the inputHandler function on every movement of the pointers (touches)
* it walks through all the recognizers and tries to detect the gesture that is being made
* @param {Object} inputData
*/recognize:function(t){var e,n=this.session;if(!n.stopped){// run the touch-action polyfill
this.touchAction.preventDefaults(t);var r=this.recognizers,i=n.curRecognizer;// reset when the last recognizer is recognized
// or when we're in a new session
(!i||i&&8&i.state)&&(i=n.curRecognizer=null);for(var o=0;o<r.length;)e=r[o],2!==n.stopped&&// 1
(!i||e==i||// 2
e.canRecognizeWith(i))?// 3
e.recognize(t):e.reset(),!i&&14&e.state&&(i=n.curRecognizer=e),o++}},/**
* get a recognizer by its event name.
* @param {Recognizer|String} recognizer
* @returns {Recognizer|Null}
*/get:function(t){if(t instanceof tE)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},/**
* add a recognizer to the manager
* existing recognizers with the same event name will be removed
* @param {Recognizer} recognizer
* @returns {Recognizer|Manager}
*/add:function(t){if(v(t,"add",this))return this;// remove existing
var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},/**
* remove a recognizer by name or instance
* @param {Recognizer|String} recognizer
* @returns {Manager}
*/remove:function(t){if(v(t,"remove",this))return this;// let's make sure this recognizer exists
if(t=this.get(t)){var e=this.recognizers,n=T(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},/**
* bind event
* @param {String} events
* @param {Function} handler
* @returns {EventEmitter} this
*/on:function(t,e){if(s!==t&&s!==e){var n=this.handlers;return g(S(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},/**
* unbind event, leave emit blank to remove all handlers
* @param {String} events
* @param {Function} [handler]
* @returns {EventEmitter} this
*/off:function(t,e){if(s!==t){var n=this.handlers;return g(S(t),function(t){e?n[t]&&n[t].splice(T(n[t],e),1):delete n[t]}),this}},/**
* emit event to the listeners
* @param {String} event
* @param {Object} data
*/emit:function(t,e){this.options.domEvents&&((n=o.createEvent("Event")).initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n));// no handlers, so skip it all
var n,r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](e),i++}},/**
* destroy the manager and unbinds all events
* it doesn't unbind dom events, that is the user own responsibility
*/destroy:function(){this.element&&tI(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},c(tR,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:tA,Input:Z,TouchAction:tO,TouchInput:ta,MouseInput:G,PointerEventInput:te,TouchMouseInput:tc,SingleTouchInput:tr,Recognizer:tE,AttrRecognizer:tj,Tap:tC,Pan:tS,Swipe:tD,Pinch:tT,Rotate:tx,Press:tk,on:_,off:P,each:g,merge:y,extend:b,assign:c,inherit:w,bindFn:O,prefixed:D}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=tR,s!==(r=(function(){return tR}).call(e,n,e,t))&&(t.exports=r)}(window,document,0);/***/},/***/3454:/***/function(t,e,n){"use strict";var r,i;t.exports=(null===(r=n.g.process)||void 0===r?void 0:r.env)&&"object"==typeof(null===(i=n.g.process)||void 0===i?void 0:i.env)?n.g.process:n(7663);//# sourceMappingURL=process.js.map
/***/},/***/7663:/***/function(t){!function(){var e={162:function(t){var e,n,r,i=t.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c=[],u=!1,l=-1;function h(){u&&r&&(u=!1,r.length?c=r.concat(c):l=-1,c.length&&p())}function p(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(r=c,c=[];++l<e;)r&&r[l].run();l=-1,e=c.length}r=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}},a=!0;try{e[t](o,o.exports,r),a=!1}finally{a&&delete n[t]}return o.exports}r.ab="//",t.exports=r(162)}();/***/},/***/2703:/***/function(t,e,n){"use strict";/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(414);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n};/***/},/***/5697:/***/function(t,e,n){// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
t.exports=n(2703)();/***/},/***/414:/***/function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";/***/},/***/6785:/***/function(t,e,n){"use strict";// UNUSED EXPORTS: AttributionControl, BaseControl, CanvasOverlay, FlyToInterpolator, FullscreenControl, GeolocateControl, HTMLOverlay, InteractiveMap, Layer, LinearInterpolator, MapContext, MapController, Marker, NavigationControl, Popup, SVGOverlay, ScaleControl, Source, StaticMap, TRANSITION_EVENTS, TransitionInterpolator, WebMercatorViewport, _MapContext, _useMapControl, setRTLTextPlugin
function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function o(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}// EXPORTS
n.d(e,{ZP:function(){return /* reexport */na}});// EXTERNAL MODULE: ./node_modules/react/index.js
var s,c,u,l,h=n(7294),p=n(5697);function f(t,e){return function(t){if(Array.isArray(t))return t}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
(t)||function(t,e){var n,r,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(n=i.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
(t,e)||o(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
()}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/common.js
var d="undefined"!=typeof Float32Array?Float32Array:Array;function v(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function g(t,e){var n,r,i,o,a,s;const c=(n=[],r=e[0],i=e[1],o=e[2],a=e[3],n[0]=t[0]*r+t[4]*i+t[8]*o+t[12]*a,n[1]=t[1]*r+t[5]*i+t[9]*o+t[13]*a,n[2]=t[2]*r+t[6]*i+t[10]*o+t[14]*a,n[3]=t[3]*r+t[7]*i+t[11]*o+t[15]*a,n);return s=1/c[3],c[0]=c[0]*s,c[1]=c[1]*s,c[2]=c[2]*s,c[3]=c[3]*s,c}function m(t,e){const n=t%e;return n<0?e+n:n}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),s=new d(4),d!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0,s[3]=0);const b=Math.log2||function(t){return Math.log(t)*Math.LOG2E};// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/mat4.js
/**
* Multiplies two mat4s
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the first operand
* @param {ReadonlyMat4} b the second operand
* @returns {mat4} out
*/function y(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],p=e[9],f=e[10],d=e[11],v=e[12],g=e[13],m=e[14],b=e[15],y=n[0],w=n[1],O=n[2],E=n[3];return t[0]=y*r+w*s+O*h+E*v,t[1]=y*i+w*c+O*p+E*g,t[2]=y*o+w*u+O*f+E*m,t[3]=y*a+w*l+O*d+E*b,y=n[4],w=n[5],O=n[6],E=n[7],t[4]=y*r+w*s+O*h+E*v,t[5]=y*i+w*c+O*p+E*g,t[6]=y*o+w*u+O*f+E*m,t[7]=y*a+w*l+O*d+E*b,y=n[8],w=n[9],O=n[10],E=n[11],t[8]=y*r+w*s+O*h+E*v,t[9]=y*i+w*c+O*p+E*g,t[10]=y*o+w*u+O*f+E*m,t[11]=y*a+w*l+O*d+E*b,y=n[12],w=n[13],O=n[14],E=n[15],t[12]=y*r+w*s+O*h+E*v,t[13]=y*i+w*c+O*p+E*g,t[14]=y*o+w*u+O*f+E*m,t[15]=y*a+w*l+O*d+E*b,t}/**
* Translate a mat4 by the given vector
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to translate
* @param {ReadonlyVec3} v vector to translate by
* @returns {mat4} out
*/function w(t,e,n){var r,i,o,a,s,c,u,l,h,p,f,d,v=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*m+e[12],t[13]=e[1]*v+e[5]*g+e[9]*m+e[13],t[14]=e[2]*v+e[6]*g+e[10]*m+e[14],t[15]=e[3]*v+e[7]*g+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],p=e[9],f=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=l,t[8]=h,t[9]=p,t[10]=f,t[11]=d,t[12]=r*v+s*g+h*m+e[12],t[13]=i*v+c*g+p*m+e[13],t[14]=o*v+u*g+f*m+e[14],t[15]=a*v+l*g+d*m+e[15]),t}/**
* Scales the mat4 by the dimensions in the given vec3 not using vectorization
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the matrix to scale
* @param {ReadonlyVec3} v the vec3 to scale the matrix by
* @returns {mat4} out
**/function O(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}/**
* Returns whether or not the matrices have approximately the same elements in the same position.
*
* @param {ReadonlyMat4} a The first matrix.
* @param {ReadonlyMat4} b The second matrix.
* @returns {Boolean} True if the matrices are equal, false otherwise.
*/function E(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8],h=t[9],p=t[10],f=t[11],d=t[12],v=t[13],g=t[14],m=t[15],b=e[0],y=e[1],w=e[2],O=e[3],E=e[4],_=e[5],P=e[6],M=e[7],j=e[8],S=e[9],T=e[10],k=e[11],x=e[12],D=e[13],C=e[14],R=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-y)<=1e-6*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(i-w)<=1e-6*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(o-O)<=1e-6*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(s-_)<=1e-6*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(c-P)<=1e-6*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(u-M)<=1e-6*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(l-j)<=1e-6*Math.max(1,Math.abs(l),Math.abs(j))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(p-T)<=1e-6*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(f-k)<=1e-6*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(d-x)<=1e-6*Math.max(1,Math.abs(d),Math.abs(x))&&Math.abs(v-D)<=1e-6*Math.max(1,Math.abs(v),Math.abs(D))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(m-R)<=1e-6*Math.max(1,Math.abs(m),Math.abs(R))}/**
* Adds two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
*/function _(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}/**
* Performs a linear interpolation between two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
* @returns {vec2} out
*/function P(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function M(t,e){if(!t)throw Error(e||"@math.gl/web-mercator: assertion failed.")}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/web-mercator-utils.js
c=new d(2),d!=Float32Array&&(c[0]=0,c[1]=0),u=new d(3),d!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0);//# sourceMappingURL=assert.js.map
const j=Math.PI,S=j/4,T=j/180,k=180/j;function x(t){return Math.pow(2,t)}function D([t,e]){M(Number.isFinite(t)),M(Number.isFinite(e)&&e>=-90&&e<=90,"invalid latitude");const n=512*(j+Math.log(Math.tan(S+e*T*.5)))/(2*j);return[512*(t*T+j)/(2*j),n]}function C([t,e]){const n=2*(Math.atan(Math.exp(e/512*(2*j)-j))-S);return[(t/512*(2*j)-j)*k,n*k]}function R(t){return 2*Math.atan(.5/t)*k}function A(t){return .5/Math.tan(.5*t*T)}function I(t,e,n=0){const[r,i,o]=t;if(M(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(o))return g(e,[r,i,o,1]);const a=g(e,[r,i,0,1]),s=g(e,[r,i,1,1]),c=a[2],u=s[2];return P([],a,s,c===u?0:((n||0)-c)/(u-c))}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/fit-bounds.js
//# sourceMappingURL=fit-bounds.js.map
const L=Math.PI/180;function N(t,e,n){const{pixelUnprojectionMatrix:r}=t,i=g(r,[e,0,1,1]),o=g(r,[e,t.height,1,1]),a=(n*t.distanceScales.unitsPerMeter[2]-i[2])/(o[2]-i[2]),s=C(P([],i,o,a));return s[2]=n,s}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/web-mercator-viewport.js
//# sourceMappingURL=get-bounds.js.map
class z{constructor({width:t,height:e,latitude:n=0,longitude:r=0,zoom:i=0,pitch:o=0,bearing:a=0,altitude:s=null,fovy:c=null,position:u=null,nearZMultiplier:l=.02,farZMultiplier:h=1.01}={width:1,height:1}){t=t||1,e=e||1,null===c&&null===s?c=R(s=1.5):null===c?c=R(s):null===s&&(s=A(c));const p=x(i);s=Math.max(.75,s);const f=function({latitude:t,longitude:e,highPrecision:n=!1}){M(Number.isFinite(t)&&Number.isFinite(e));const r={},i=Math.cos(t*T),o=512/360,a=512/360/i,s=512/4003e4/i;if(r.unitsPerMeter=[s,s,s],r.metersPerUnit=[1/s,1/s,1/s],r.unitsPerDegree=[o,a,s],r.degreesPerUnit=[1/o,1/a,1/s],n){const e=T*Math.tan(t*T)/i,n=512/4003e4*e,c=n/a*s;r.unitsPerDegree2=[0,o*e/2,n],r.unitsPerMeter2=[c,0,c]}return r}({longitude:r,latitude:n}),d=D([r,n]);if(d[2]=0,u){var g,m;g=[],m=f.unitsPerMeter,g[0]=u[0]*m[0],g[1]=u[1]*m[1],g[2]=u[2]*m[2],d[0]=d[0]+g[0],d[1]=d[1]+g[1],d[2]=d[2]+g[2]}this.projectionMatrix=function({width:t,height:e,pitch:n,altitude:r,fovy:i,nearZMultiplier:o,farZMultiplier:a}){var s,c,u;const{fov:l,aspect:h,near:p,far:f}=function({width:t,height:e,fovy:n=R(1.5),altitude:r,pitch:i=0,nearZMultiplier:o=1,farZMultiplier:a=1}){void 0!==r&&(n=R(r));const s=.5*n*T,c=A(n),u=i*T,l=Math.sin(s)*c/Math.sin(Math.min(Math.max(Math.PI/2-u-s,.01),Math.PI-.01)),h=Math.sin(u)*l+c;return{fov:2*s,aspect:t/e,focalDistance:c,near:o,far:h*a}}({width:t,height:e,altitude:r,fovy:i,pitch:n,nearZMultiplier:o,farZMultiplier:a});return s=[],u=1/Math.tan(l/2),s[0]=u/h,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=-1,s[12]=0,s[13]=0,s[15]=0,null!=f&&f!==1/0?(c=1/(p-f),s[10]=(f+p)*c,s[14]=2*f*p*c):(s[10]=-1,s[14]=-2*p),s}({width:t,height:e,pitch:o,fovy:c,nearZMultiplier:l,farZMultiplier:h}),this.viewMatrix=function({height:t,pitch:e,bearing:n,altitude:r,scale:i,center:o=null}){var a,s,c,u,l,h,p,f,d,g,m,b,y,E,_,P,M,j,S,k,x,D,C;const R=v();return w(R,R,[0,0,-r]),s=Math.sin(a=-e*T),c=Math.cos(a),u=R[4],l=R[5],h=R[6],p=R[7],f=R[8],d=R[9],g=R[10],m=R[11],R!=R&&(// If the source and destination differ, copy the unchanged rows
R[0]=R[0],R[1]=R[1],R[2]=R[2],R[3]=R[3],R[12]=R[12],R[13]=R[13],R[14]=R[14],R[15]=R[15]),R[4]=u*c+f*s,R[5]=l*c+d*s,R[6]=h*c+g*s,R[7]=p*c+m*s,R[8]=f*c-u*s,R[9]=d*c-l*s,R[10]=g*c-h*s,R[11]=m*c-p*s,y=Math.sin(b=n*T),E=Math.cos(b),_=R[0],P=R[1],M=R[2],j=R[3],S=R[4],k=R[5],x=R[6],D=R[7],R!=R&&(// If the source and destination differ, copy the unchanged last row
R[8]=R[8],R[9]=R[9],R[10]=R[10],R[11]=R[11],R[12]=R[12],R[13]=R[13],R[14]=R[14],R[15]=R[15]),R[0]=_*E+S*y,R[1]=P*E+k*y,R[2]=M*E+x*y,R[3]=j*E+D*y,R[4]=S*E-_*y,R[5]=k*E-P*y,R[6]=x*E-M*y,R[7]=D*E-j*y,O(R,R,[i/=t,i,i]),o&&w(R,R,((C=[])[0]=-o[0],C[1]=-o[1],C[2]=-o[2],C)),R}({height:e,scale:p,center:d,pitch:o,bearing:a,altitude:s}),this.width=t,this.height=e,this.scale=p,this.latitude=n,this.longitude=r,this.zoom=i,this.pitch=o,this.bearing=a,this.altitude=s,this.fovy=c,this.center=d,this.meterOffset=u||[0,0,0],this.distanceScales=f,this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}_initMatrices(){var t,e,n,r,i,o,a,s,c,u,l,h,p,f,d,g,m,b,E,_,P,M,j,S,T,k,x,D,C,R;const{width:A,height:I,projectionMatrix:L,viewMatrix:N}=this,z=v();y(z,z,L),y(z,z,N),this.viewProjectionMatrix=z;const F=v();O(F,F,[A/2,-I/2,1]),w(F,F,[1,-1,0]),y(F,F,z);const V=(t=v(),e=F[0],n=F[1],r=F[2],i=F[3],o=F[4],a=F[5],s=F[6],c=F[7],u=F[8],l=F[9],h=F[10],p=F[11],f=F[12],d=F[13],g=F[14],m=F[15],b=e*a-n*o,E=e*s-r*o,_=e*c-i*o,P=n*s-r*a,M=n*c-i*a,j=r*c-i*s,S=u*d-l*f,T=u*g-h*f,k=u*m-p*f,x=l*g-h*d,D=l*m-p*d,(R=b*(C=h*m-p*g)-E*D+_*x+P*k-M*T+j*S)?(R=1/R,t[0]=(a*C-s*D+c*x)*R,t[1]=(r*D-n*C-i*x)*R,t[2]=(d*j-g*M+m*P)*R,t[3]=(h*M-l*j-p*P)*R,t[4]=(s*k-o*C-c*T)*R,t[5]=(e*C-r*k+i*T)*R,t[6]=(g*_-f*j-m*E)*R,t[7]=(u*j-h*_+p*E)*R,t[8]=(o*D-a*k+c*S)*R,t[9]=(n*k-e*D-i*S)*R,t[10]=(f*M-d*_+m*b)*R,t[11]=(l*_-u*M-p*b)*R,t[12]=(a*T-o*x-s*S)*R,t[13]=(e*x-n*T+r*S)*R,t[14]=(d*E-f*P-g*b)*R,t[15]=(u*P-l*E+h*b)*R,t):null);if(!V)throw Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=F,this.pixelUnprojectionMatrix=V}equals(t){return t instanceof z&&t.width===this.width&&t.height===this.height&&E(t.projectionMatrix,this.projectionMatrix)&&E(t.viewMatrix,this.viewMatrix)}project(t,{topLeft:e=!0}={}){const n=function(t,e){const[n,r,i=0]=t;return M(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),g(e,[n,r,i,1])}(this.projectPosition(t),this.pixelProjectionMatrix),[r,i]=n,o=e?i:this.height-i;return 2===t.length?[r,o]:[r,o,n[2]]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,a=e?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],c=I([r,a,o],this.pixelUnprojectionMatrix,s),[u,l,h]=this.unprojectPosition(c);return Number.isFinite(o)?[u,l,h]:Number.isFinite(n)?[u,l,n]:[u,l]}projectPosition(t){const[e,n]=D(t);return[e,n,(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}unprojectPosition(t){const[e,n]=C(t);return[e,n,(t[2]||0)*this.distanceScales.metersPerUnit[2]]}projectFlat(t){return D(t)}unprojectFlat(t){return C(t)}getMapCenterByLngLatPosition({lngLat:t,pos:e}){var n;const r=I(e,this.pixelUnprojectionMatrix),i=_([],D(t),((n=[])[0]=-r[0],n[1]=-r[1],n));return C(_([],this.center,i))}getLocationAtPoint({lngLat:t,pos:e}){return this.getMapCenterByLngLatPosition({lngLat:t,pos:e})}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=//# sourceMappingURL=web-mercator-utils.js.map
function({width:t,height:e,bounds:n,minExtent:r=0,maxZoom:i=24,padding:o=0,offset:a=[0,0]}){const[[s,c],[u,l]]=n;if(Number.isFinite(o)){const t=o;o={top:t,bottom:t,left:t,right:t}}else M(Number.isFinite(o.top)&&Number.isFinite(o.bottom)&&Number.isFinite(o.left)&&Number.isFinite(o.right));const h=D([s,l<-85.051129?-85.051129:l>85.051129?85.051129:l]),p=D([u,c<-85.051129?-85.051129:c>85.051129?85.051129:c]),f=[Math.max(Math.abs(p[0]-h[0]),r),Math.max(Math.abs(p[1]-h[1]),r)],d=[t-o.left-o.right-2*Math.abs(a[0]),e-o.top-o.bottom-2*Math.abs(a[1])];M(d[0]>0&&d[1]>0);const v=d[0]/f[0],g=d[1]/f[1],m=(o.right-o.left)/2/v,y=(o.bottom-o.top)/2/g,w=C([(p[0]+h[0])/2+m,(p[1]+h[1])/2+y]),O=Math.min(i,b(Math.abs(Math.min(v,g))));return M(Number.isFinite(O)),{longitude:w[0],latitude:w[1],zoom:O}}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/get-bounds.js
(Object.assign({width:n,height:r,bounds:t},e));return new z({width:n,height:r,longitude:i,latitude:o,zoom:a})}getBounds(t){const e=this.getBoundingRegion(t),n=Math.min(...e.map(t=>t[0])),r=Math.max(...e.map(t=>t[0]));return[[n,Math.min(...e.map(t=>t[1]))],[r,Math.max(...e.map(t=>t[1]))]]}getBoundingRegion(t={}){return function(t,e=0){let n,r;const{width:i,height:o,unproject:a}=t,s={targetZ:e},c=a([0,o],s),u=a([i,o],s);return(t.fovy?.5*t.fovy*L:Math.atan(.5/t.altitude))>(90-t.pitch)*L-.01?(n=N(t,0,e),r=N(t,i,e)):(n=a([0,0],s),r=a([i,0],s)),[c,u,r,n]}(this,t.z||0)}}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/normalize-viewport-props.js
const F=["longitude","latitude","zoom"],V={curve:1.414,speed:1.2};function Z(t,e,n){var r,i;const o=(n=Object.assign({},V,n)).curve,a=t.zoom,s=[t.longitude,t.latitude],c=x(a),u=e.zoom,l=[e.longitude,e.latitude],h=x(u-a),p=D(s),f=(r=[],i=D(l),r[0]=i[0]-p[0],r[1]=i[1]-p[1],r),d=Math.max(t.width,t.height),v=d/h,g=Math.hypot(f[0],f[1])*c,m=Math.max(g,.01),b=o*o,y=(v*v-d*d+b*b*m*m)/(2*d*b*m),w=(v*v-d*d-b*b*m*m)/(2*v*b*m),O=Math.log(Math.sqrt(y*y+1)-y),E=Math.log(Math.sqrt(w*w+1)-w);return{startZoom:a,startCenterXY:p,uDelta:f,w0:d,u1:g,S:(E-O)/o,rho:o,rho2:b,r0:O,r1:E}}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/index.js // CONCATENATED MODULE: ./node_modules/viewport-mercator-project/module.js // CONCATENATED MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
//# sourceMappingURL=fly-to-viewport.js.map
//# sourceMappingURL=index.js.map
/**
* A collection of shims that provide minimal functionality of the ES6 collections.
*
* These implementations are not meant to be used outside of the ResizeObserver
* modules as they cover only a limited range of use cases.
*//* eslint-disable require-jsdoc, valid-jsdoc */var B=function(){if("undefined"!=typeof Map)return Map;/**
* Returns index in provided array that matches the specified key.
*
* @param {Array<Array>} arr
* @param {*} key
* @returns {number}
*/function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return /** @class */function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{/**
* @returns {boolean}
*/get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),/**
* @param {*} key
* @returns {*}
*/e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},/**
* @param {*} key
* @param {*} value
* @returns {void}
*/e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},/**
* @param {*} key
* @returns {void}
*/e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},/**
* @param {*} key
* @returns {void}
*/e.prototype.has=function(e){return!!~t(this.__entries__,e)},/**
* @returns {void}
*/e.prototype.clear=function(){this.__entries__.splice(0)},/**
* @param {Function} callback
* @param {*} [ctx=null]
* @returns {void}
*/e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),U="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,q=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),W="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(q):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},H=["top","right","bottom","left","width","height","size","weight"],X="undefined"!=typeof MutationObserver,Y=/** @class */function(){/**
* Creates a new instance of ResizeObserverController.
*
* @private
*/function t(){/**
* Indicates whether DOM listeners have been added.
*
* @private {boolean}
*/this.connected_=!1,/**
* Tells that controller has subscribed for Mutation Events.
*
* @private {boolean}
*/this.mutationEventsAdded_=!1,/**
* Keeps reference to the instance of MutationObserver.
*
* @private {MutationObserver}
*/this.mutationsObserver_=null,/**
* A list of connected observers.
*
* @private {Array<ResizeObserverSPI>}
*/this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=/**
* Creates a wrapper function which ensures that provided callback will be
* invoked only once during the specified delay period.
*
* @param {Function} callback - Function to be invoked after the delay period.
* @param {number} delay - Delay after which to invoke callback.
* @returns {Function}
*/function(t,e){var n=!1,r=!1,i=0;/**
* Invokes the original callback function and schedules new invocation if
* the "proxy" was called during current request.
*
* @returns {void}
*/function o(){n&&(n=!1,t()),r&&s()}/**
* Callback invoked after the specified delay. It will further postpone
* invocation of the original function delegating it to the
* requestAnimationFrame.
*
* @returns {void}
*/function a(){W(o)}/**
* Schedules invocation of the original function.
*
* @returns {void}
*/function s(){var t=Date.now();if(n){// Reject immediately following calls.
if(t-i<2)return;// Schedule new call to be in invoked when the pending one is resolved.
// This is important for "transitions" which never actually start
// immediately so there is a chance that we might miss one if change
// happens amids the pending invocation.
r=!0}else n=!0,r=!1,setTimeout(a,20);i=t}return s}(this.refresh.bind(this),0)}return(/**
* Adds observer to observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be added.
* @returns {void}
*/t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},/**
* Removes observer from observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be removed.
* @returns {void}
*/t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},/**
* Invokes the update of observers. It will continue running updates insofar
* it detects changes.
*
* @returns {void}
*/t.prototype.refresh=function(){// Continue running updates if changes have been detected as there might
// be future ones caused by CSS transitions.
this.updateObservers_()&&this.refresh()},/**
* Updates every observer from observers list and notifies them of queued
* entries.
*
* @private
* @returns {boolean} Returns "true" if any observer has detected changes in
* dimensions of it's elements.
*/t.prototype.updateObservers_=function(){// Collect observers that have active observations.
var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return(// Deliver notifications in a separate cycle in order to avoid any
// collisions between observers, e.g. when multiple instances of
// ResizeObserver are tracking the same element and the callback of one
// of them changes content dimensions of the observed target. Sometimes
// this may result in notifications being blocked for the rest of observers.
t.forEach(function(t){return t.broadcastActive()}),t.length>0)},/**
* Initializes DOM listeners.
*
* @private
* @returns {void}
*/t.prototype.connect_=function(){// Do nothing if running in a non-browser environment or if listeners
// have been already added.
U&&!this.connected_&&(// Subscription to the "Transitionend" event is used as a workaround for
// delayed transitions. This way it's possible to capture at least the
// final state of an element.
document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),X?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},/**
* Removes DOM listeners.
*
* @private
* @returns {void}
*/t.prototype.disconnect_=function(){// Do nothing if running in a non-browser environment or if listeners
// have been already removed.
U&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},/**
* "Transitionend" event handler.
*
* @private
* @param {TransitionEvent} event
* @returns {void}
*/t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;H.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},/**
* Returns instance of the ResizeObserverController.
*
* @returns {ResizeObserverController}
*/t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},/**
* Holds reference to the controller's instance.
*
* @private {ResizeObserverController}
*/t.instance_=null,t)}(),K=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},G=function(t){// Return the local global object if it's not possible extract one from
// provided element.
return t&&t.ownerDocument&&t.ownerDocument.defaultView||q},$=te(0,0,0,0);/**
* Converts provided string to a number.
*
* @param {number|string} value
* @returns {number}
*/function J(t){return parseFloat(t)||0}/**
* Extracts borders size from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @param {...string} positions - Borders positions (top, right, ...)
* @returns {number}
*/function Q(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+J(t["border-"+n+"-width"])},0)}/**
* Checks whether provided element is an instance of the SVGGraphicsElement.
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/var tt=// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
// interface.
"undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof G(t).SVGGraphicsElement}:function(t){return t instanceof G(t).SVGElement&&"function"==typeof t.getBBox};/**
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
*
* @param {number} x - X coordinate.
* @param {number} y - Y coordinate.
* @param {number} width - Rectangle's width.
* @param {number} height - Rectangle's height.
* @returns {DOMRectInit}
*/function te(t,e,n,r){return{x:t,y:e,width:n,height:r}}/**
* Class that is responsible for computations of the content rectangle of
* provided DOM element and for keeping track of it's changes.
*/var tn=/** @class */function(){/**
* Creates an instance of ResizeObservation.
*
* @param {Element} target - Element to be observed.
*/function t(t){/**
* Broadcasted width of content rectangle.
*
* @type {number}
*/this.broadcastWidth=0,/**
* Broadcasted height of content rectangle.
*
* @type {number}
*/this.broadcastHeight=0,/**
* Reference to the last observed content rectangle.
*
* @private {DOMRectInit}
*/this.contentRect_=te(0,0,0,0),this.target=t}return(/**
* Updates content rectangle and tells whether it's width or height properties
* have changed since the last broadcast.
*
* @returns {boolean}
*/t.prototype.isActive=function(){var t=/**
* Calculates an appropriate content rectangle for provided html or svg element.
*
* @param {Element} target - Element content rectangle of which needs to be calculated.
* @returns {DOMRectInit}
*/function(t){if(!U)return $;if(tt(t)){var e;return te(0,0,(e=t.getBBox()).width,e.height)}return(/**
* Calculates content rectangle of provided HTMLElement.
*
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
* @returns {DOMRectInit}
*/function(t){// Client width & height properties can't be
// used exclusively as they provide rounded values.
var e=t.clientWidth,n=t.clientHeight;// By this condition we can catch all non-replaced inline, hidden and
// detached elements. Though elements with width & height properties less
// than 0.5 will be discarded as well.
//
// Without it we would need to implement separate methods for each of
// those cases and it's not possible to perform a precise and performance
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
// gives wrong results for elements with width & height less than 0.5.
if(!e&&!n)return $;var r=G(t).getComputedStyle(t),i=/**
* Extracts paddings sizes from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @returns {Object} Paddings box.
*/function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=J(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=J(r.width),c=J(r.height);// Following steps can't be applied to the document's root element as its
// client[Width/Height] properties represent viewport area of the window.
// Besides, it's as well not necessary as the <html> itself neither has
// rendered scroll bars nor it can be clipped.
if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Q(r,"left","right")+o),Math.round(c+a)!==n&&(c-=Q(r,"top","bottom")+a)),t!==G(t).document.documentElement){// In some browsers (only in Firefox, actually) CSS width & height
// include scroll bars size which can be removed at this step as scroll
// bars are the only difference between rounded dimensions + paddings
// and "client" properties, though that is not always true in Chrome.
var u=Math.round(s+o)-e,l=Math.round(c+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(l)&&(c-=l)}return te(i.left,i.top,s,c)}(t))}(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},/**
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
* from the corresponding properties of the last observed content rectangle.
*
* @returns {DOMRectInit} Last observed content rectangle.
*/t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t)}(),tr=/**
* Creates an instance of ResizeObserverEntry.
*
* @param {Element} target - Element that is being observed.
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
*/function(t,e){var n,r,i,o,a,s=(n=e.x,r=e.y,i=e.width,o=e.height,// Rectangle's properties are not writable and non-enumerable.
K(a=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:i,height:o,top:r,right:n+i,bottom:o+r,left:n}),a);// According to the specification following properties are not writable
// and are also not enumerable in the native implementation.
//
// Property accessors are not being used as they'd require to define a
// private WeakMap storage which may cause memory leaks in browsers that
// don't support this type of collections.
K(this,{target:t,contentRect:s})},ti=/** @class */function(){/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback function that is invoked
* when one of the observed elements changes it's content dimensions.
* @param {ResizeObserverController} controller - Controller instance which
* is responsible for the updates of observer.
* @param {ResizeObserver} callbackCtx - Reference to the public
* ResizeObserver instance which will be passed to callback function.
*/function t(t,e,n){if(/**
* Collection of resize observations that have detected changes in dimensions
* of elements.
*
* @private {Array<ResizeObservation>}
*/this.activeObservations_=[],/**
* Registry of the ResizeObservation instances.
*
* @private {Map<Element, ResizeObservation>}
*/this.observations_=new B,"function"!=typeof t)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return(/**
* Starts observing provided element.
*
* @param {Element} target - Element to be observed.
* @returns {void}
*/t.prototype.observe=function(t){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");// Do nothing if current environment doesn't have the Element interface.
if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof G(t).Element))throw TypeError('parameter 1 is not of type "Element".');var e=this.observations_;// Do nothing if element is already being observed.
e.has(t)||(e.set(t,new tn(t)),this.controller_.addObserver(this),// Force the update of observations.
this.controller_.refresh())}},/**
* Stops observing provided element.
*
* @param {Element} target - Element to stop observing.
* @returns {void}
*/t.prototype.unobserve=function(t){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");// Do nothing if current environment doesn't have the Element interface.
if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof G(t).Element))throw TypeError('parameter 1 is not of type "Element".');var e=this.observations_;// Do nothing if element is not being observed.
e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},/**
* Stops observing all elements.
*
* @returns {void}
*/t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},/**
* Collects observation instances the associated element of which has changed
* it's content rectangle.
*
* @returns {void}
*/t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},/**
* Invokes initial callback function with a list of ResizeObserverEntry
* instances collected from active resize observations.
*
* @returns {void}
*/t.prototype.broadcastActive=function(){// Do nothing if observer doesn't have active observations.
if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new tr(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},/**
* Clears the collection of active observations.
*
* @returns {void}
*/t.prototype.clearActive=function(){this.activeObservations_.splice(0)},/**
* Tells whether observer has active observations.
*
* @returns {boolean}
*/t.prototype.hasActive=function(){return this.activeObservations_.length>0},t)}(),to="undefined"!=typeof WeakMap?new WeakMap:new B,ta=/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback that is invoked when
* dimensions of the observed elements change.
*/function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new ti(e,Y.getInstance(),this);to.set(this,n)};// Expose public methods of ResizeObserver.
["observe","unobserve","disconnect"].forEach(function(t){ta.prototype[t]=function(){var e;return(e=to.get(this))[t].apply(e,arguments)}});var ts=// Export existing implementation if available.
void 0!==q.ResizeObserver?q.ResizeObserver:ta;function tc(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
function tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tl(t,e,n){return e&&tu(t.prototype,e),n&&tu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/globals.js
"undefined"!=typeof window?window:n.g,void 0!==n.g?n.g:window;var th="undefined"!=typeof document?document:{};// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/style-utils.js
//# sourceMappingURL=globals.js.map
function tp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tp(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function td(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return tv(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tv(t,void 0)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function tv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var tg=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function tm(t){if(!t)return null;if("string"==typeof t)return t;t.toJS&&(t=t.toJS());var e,n={},r=td(t.layers);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.id]=i}}catch(t){r.e(t)}finally{r.f()}var o=t.layers.map(function(t){var e=n[t.ref],r=null;if("interactive"in t&&(r=tf({},t),delete r.interactive),e){r=r||tf({},t),delete r.ref;var i,o=td(tg);try{for(o.s();!(i=o.n()).done;){var a=i.value;a in e&&(r[a]=e[a])}}catch(t){o.e(t)}finally{o.f()}}return r||t});return tf(tf({},t),{},{layers:o})}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/mapbox/mapbox.js
//# sourceMappingURL=style-utils.js.map
/* provided dependency */var tb=n(3454),ty={container:p.object,gl:p.object,mapboxApiAccessToken:p.string,mapboxApiUrl:p.string,attributionControl:p.bool,preserveDrawingBuffer:p.bool,reuseMaps:p.bool,transformRequest:p.func,mapOptions:p.object,mapStyle:p.oneOfType([p.string,p.object]),preventStyleDiffing:p.bool,visible:p.bool,asyncRender:p.bool,onLoad:p.func,onError:p.func,width:p.number,height:p.number,viewState:p.object,longitude:p.number,latitude:p.number,zoom:p.number,bearing:p.number,pitch:p.number,altitude:p.number},tw={container:th.body,mapboxApiAccessToken:function(){var t=null;if("undefined"!=typeof window&&window.location){var e=window.location.search.match(/access_token=([^&\/]*)/);t=e&&e[1]}return t||void 0===tb||(t=t||tb.env.MapboxAccessToken||tb.env.REACT_APP_MAPBOX_ACCESS_TOKEN),t||"no-token"}(),mapboxApiUrl:"https://api.mapbox.com",preserveDrawingBuffer:!1,attributionControl:!0,reuseMaps:!1,mapOptions:{},mapStyle:"mapbox://styles/mapbox/light-v8",preventStyleDiffing:!1,visible:!0,asyncRender:!1,onLoad:function(){},onError:function(t){t&&console.error(t.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function tO(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&p.checkPropTypes(ty,t,"prop",e)}var tE=function(){function t(e){var n=this;if(tc(this,t),a(this,"props",tw),a(this,"width",0),a(this,"height",0),a(this,"_fireLoadEvent",function(){n.props.onLoad({type:"load",target:n._map})}),a(this,"_handleError",function(t){n.props.onError(t)}),!e.mapboxgl)throw Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return tl(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(tm(e.mapStyle),{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:tm(e.mapStyle),interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",this._fireLoadEvent),this._map.on("error",this._handleError)}return this}},{key:"_destroy",value:function(){this._map&&(this.props.reuseMaps&&!t.savedMap?(t.savedMap=this._map,this._map.off("load",this._fireLoadEvent),this._map.off("error",this._handleError),this._map.off("styledata",this._fireLoadEvent)):this._map.remove(),this._map=null)}},{key:"_initialize",value:function(t){var e=this;tO(t=Object.assign({},tw,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||tw.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{configurable:!0,get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{configurable:!0,get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){tO(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);this._updateMapStyle(t,e),!e.asyncRender&&(n||r)&&this.redraw(),this.props=e}}},{key:"_updateMapStyle",value:function(t,e){t.mapStyle!==e.mapStyle&&this._map.setStyle(tm(e.mapStyle),{diff:!e.preventStyleDiffing})}},{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this._map.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,o=e.pitch,a=e.bearing,s=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:void 0===o?0:o,bearing:void 0===a?0:a,altitude:void 0===s?1.5:s}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if(void 0!==th)try{var e=th.createElement("div");if(e.className="mapboxgl-map",e.style.display="none",th.body.appendChild(e),"static"===window.getComputedStyle(e).position){var n=th.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),th.head.appendChild(n)}}catch(t){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();a(tE,"initialized",!1),a(tE,"propTypes",ty),a(tE,"defaultProps",tw),a(tE,"savedMap",null);//# sourceMappingURL=mapbox.js.map
// EXTERNAL MODULE: ./node_modules/mapbox-gl/dist/mapbox-gl.js
var t_=n(6158),tP=/*#__PURE__*/n.n(t_);function tM(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function tj(t,e,n){return Math.max(e,Math.min(n,t))}function tS(t,e,n){return tM(t)?t.map(function(t,r){return tS(t,e[r],n)}):n*e+(1-n)*t}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/assert.js
//# sourceMappingURL=math-utils.js.map
function tT(t,e){if(!t)throw Error(e||"react-map-gl: assertion failed.")}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/map-state.js
//# sourceMappingURL=assert.js.map
function tk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tk(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tD={minZoom:0,maxZoom:24,minPitch:0,maxPitch:85},tC={pitch:0,bearing:0,altitude:1.5},tR=function(){function t(e){var n=e.width,r=e.height,i=e.latitude,o=e.longitude,a=e.zoom,s=e.bearing,c=void 0===s?tC.bearing:s,u=e.pitch,l=void 0===u?tC.pitch:u,h=e.altitude,p=void 0===h?tC.altitude:h,f=e.maxZoom,d=void 0===f?tD.maxZoom:f,v=e.minZoom,g=void 0===v?tD.minZoom:v,m=e.maxPitch,b=void 0===m?tD.maxPitch:m,y=e.minPitch,w=void 0===y?tD.minPitch:y,O=e.transitionDuration,E=e.transitionEasing,_=e.transitionInterpolator,P=e.transitionInterruption,M=e.startPanLngLat,j=e.startZoomLngLat,S=e.startRotatePos,T=e.startBearing,k=e.startPitch,x=e.startZoom;tc(this,t),tT(Number.isFinite(n),"`width` must be supplied"),tT(Number.isFinite(r),"`height` must be supplied"),tT(Number.isFinite(o),"`longitude` must be supplied"),tT(Number.isFinite(i),"`latitude` must be supplied"),tT(Number.isFinite(a),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:i,longitude:o,zoom:a,bearing:c,pitch:l,altitude:p,maxZoom:d,minZoom:g,maxPitch:b,minPitch:w,transitionDuration:O,transitionEasing:E,transitionInterpolator:_,transitionInterruption:P}),this._state={startPanLngLat:M,startZoomLngLat:j,startRotatePos:S,startBearing:T,startPitch:k,startZoom:x}}return tl(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}},{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,n=t.startPos,r=this._state.startPanLngLat||this._unproject(n);if(!r)return this;var i=f(this._calculateNewLngLat({startPanLngLat:r,pos:e}),2),o=i[0],a=i[1];return this._getUpdatedMapState({longitude:o,latitude:a})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startRotatePos:e,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e,n=t.pos,r=t.deltaAngleX,i=t.deltaAngleY,o=this._state,a=o.startRotatePos,s=o.startBearing,c=o.startPitch;return Number.isFinite(s)&&Number.isFinite(c)?(e=n?this._calculateNewPitchAndBearing(tx(tx({},this._getRotationParams(n,a)),{},{startBearing:s,startPitch:c})):{bearing:s+(void 0===r?0:r),pitch:c+(void 0===i?0:i)},this._getUpdatedMapState(e)):this}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale;tT(r>0,"`scale` must be a positive number");var i=this._state,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(n)||this._unproject(e)),tT(a,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var s=this._calculateNewZoom({scale:r,startZoom:o||0}),c=f(new z(Object.assign({},this._viewportProps,{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:e}),2),u=c[0],l=c[1];return this._getUpdatedMapState({zoom:s,longitude:u,latitude:l})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(e){return new t(Object.assign({},this._viewportProps,this._state,e))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=tj(r,n,e);var i=t.maxPitch,o=t.minPitch,a=t.pitch;return t.pitch=tj(a,o,i),Object.assign(t,function({width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:o=0,bearing:a=0}){(n<-180||n>180)&&(n=m(n+180,360)-180),(a<-180||a>180)&&(a=m(a+180,360)-180);const s=b(e/512);if(i<=s)i=s,r=0;else{const t=e/2/Math.pow(2,i),n=C([0,t])[1];if(r<n)r=n;else{const e=C([0,512-t])[1];r>e&&(r=e)}}return{width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:o,bearing:a}}// CONCATENATED MODULE: ./node_modules/@math.gl/web-mercator/dist/esm/fly-to-viewport.js
(t)),t}},{key:"_unproject",value:function(t){var e=new z(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,n=t.pos;return new z(this._viewportProps).getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this._viewportProps,i=r.maxZoom;return tj(n+Math.log2(e),r.minZoom,i)}},{key:"_calculateNewPitchAndBearing",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=t.startBearing,i=t.startPitch;n=tj(n,-1,1);var o=this._viewportProps,a=o.minPitch,s=o.maxPitch,c=i;return n>0?c=i+n*(s-i):n<0&&(c=i-n*(a-i)),{pitch:c,bearing:r+180*e}}},{key:"_getRotationParams",value:function(t,e){var n=t[0]-e[0],r=t[1]-e[1],i=t[1],o=e[1],a=this._viewportProps,s=a.width,c=a.height,u=0;return r>0?Math.abs(c-o)>5&&(u=r/(o-c)*1.2):r<0&&o>5&&(u=1-i/o),{deltaScaleX:n/s,deltaScaleY:u=Math.min(1,Math.max(-1,u))}}}]),t}();//# sourceMappingURL=map-constraints.js.map
function tA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tA(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tL=(0,h.createContext)({viewport:null,map:null,container:null,onViewportChange:null,onViewStateChange:null,eventManager:null}),tN=tL.Provider;tL.Provider=function(t){var e=t.value,n=t.children,r=f((0,h.useState)(null),2),i=r[0],o=r[1],a=(0,h.useContext)(tL);return e=tI(tI({setMap:o},a),{},{map:a&&a.map||i},e),h.createElement(tN,{value:e},n)};//# sourceMappingURL=map-context.js.map
var tz="undefined"!=typeof window?h.useLayoutEffect:h.useEffect;//# sourceMappingURL=use-isomorphic-layout-effect.js.map
function tF(t,e){var n=e.longitude,r=e.latitude;return t&&t.queryTerrainElevation&&t.queryTerrainElevation([n,r])||0}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/static-map.js
//# sourceMappingURL=terrain.js.map
function tV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tZ(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tV(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tV(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tB="A valid API access token is required to use Mapbox data";function tU(t){var e=t.map,n=t.props,r=t.width,i=t.height,o=tZ(tZ(tZ({},n),n.viewState),{},{width:r,height:i});return o.position=[0,0,tF(e,o)],new z(o)}var tq={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},tW=Object.assign({},tE.propTypes,{width:p.oneOfType([p.number,p.string]),height:p.oneOfType([p.number,p.string]),onResize:p.func,disableTokenWarning:p.bool,visible:p.bool,className:p.string,style:p.object,visibilityConstraints:p.object}),tH=Object.assign({},tE.defaultProps,{disableTokenWarning:!1,visible:!0,onResize:function(){},className:"",style:null,visibilityConstraints:tD});function tX(){return h.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},h.createElement("h3",{key:"header"},tB),h.createElement("div",{key:"text"},"For information on setting up your basemap, read"),h.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}var tY=(0,h.forwardRef)(function(t,e){var n=f((0,h.useState)(!0),2),r=n[0],i=n[1],o=f((0,h.useState)({width:0,height:0}),2),a=o[0],s=o[1],c=(0,h.useRef)(null),u=(0,h.useRef)(null),l=(0,h.useRef)(null),p=(0,h.useRef)(null),d=(0,h.useContext)(tL);tz(function(){if(tY.supported()){var e=new tE(tZ(tZ(tZ({},t),a),{},{mapboxgl:tP(),container:u.current,onError:function(e){401===(e.error&&e.error.status||e.status)&&r&&(console.error(tB),i(!1)),t.onError(e)}}));c.current=e,d&&d.setMap&&d.setMap(e.getMap());var n=new ts(function(e){if(e[0].contentRect){var n=e[0].contentRect,r=n.width,i=n.height;s({width:r,height:i}),t.onResize({width:r,height:i})}});return n.observe(l.current),function(){e.finalize(),c.current=null,n.disconnect()}}},[]),tz(function(){c.current&&c.current.setProps(tZ(tZ({},t),a))});var v=c.current&&c.current.getMap();(0,h.useImperativeHandle)(e,function(){return{getMap:function(){return c.current&&c.current.getMap()},queryRenderedFeatures:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=c.current&&c.current.getMap();return n&&n.queryRenderedFeatures(t,e)}}},[]);var g=(0,h.useCallback)(function(t){var e=t.target;e===p.current&&e.scrollTo(0,0)},[]),m=v&&h.createElement(tN,{value:tZ(tZ({},d),{},{viewport:d.viewport||tU(tZ({map:v,props:t},a)),map:v,container:d.container||l.current})},h.createElement("div",{key:"map-overlays",className:"overlays",ref:p,style:tq,onScroll:g},t.children)),b=t.className,y=t.width,w=t.height,O=t.style,E=t.visibilityConstraints,_=Object.assign({position:"relative"},O,{width:y,height:w}),P=Object.assign({},tq,{visibility:t.visible&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tD;for(var n in e){var r,i=n.slice(0,3),o=(r=n.slice(3))[0].toLowerCase()+r.slice(1);if("min"===i&&t[o]<e[n]||"max"===i&&t[o]>e[n])return!1}return!0}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/map-context.js
(t.viewState||t,E)?"inherit":"hidden"});return h.createElement("div",{key:"map-container",ref:l,style:_},h.createElement("div",{key:"map-mapbox",ref:u,style:P,className:b}),m,!r&&!t.disableTokenWarning&&h.createElement(tX,null))});function tK(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}tY.supported=function(){return tP()&&tP().supported()},tY.propTypes=tW,tY.defaultProps=tH;var tG=function(){function t(){tc(this,t),a(this,"propNames",[])}return tl(t,[{key:"arePropsEqual",value:function(t,e){var n,r=//# sourceMappingURL=static-map.js.map
function(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return tK(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tK(t,void 0)}}(t))){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}(this.propNames||[]);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!function t(e,n){if(e===n)return!0;if(tM(e)&&tM(n)){if(e.length!==n.length)return!1;for(var r=0;r<e.length;++r)if(!t(e[r],n[r]))return!1;return!0}return 1e-7>=Math.abs(e-n)}(t[i],e[i]))return!1}}catch(t){r.e(t)}finally{r.f()}return!0}},{key:"initializeProps",value:function(t,e){return{start:t,end:e}}},{key:"interpolateProps",value:function(t,e,n){tT(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(t,e){return e.transitionDuration}}]),t}();// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
//# sourceMappingURL=transition-interpolator.js.map
function t$(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function tJ(t,e){return(tJ=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
function tQ(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tJ(t,e)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
function t0(t){return(t0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
function t1(t,e){if(e&&("object"===t0(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return t$(t)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
function t2(t){return(t2=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition/transition-utils.js
var t5={longitude:1,bearing:1};function t4(t){return Number.isFinite(t)||Array.isArray(t)}function t3(t,e,n){return t in t5&&Math.abs(n-e)>180&&(n=n<0?n+360:n-360),n}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/transition/viewport-fly-to-interpolator.js
//# sourceMappingURL=transition-utils.js.map
function t8(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return t6(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t6(t,void 0)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function t6(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var t9=["longitude","latitude","zoom","bearing","pitch"],t7=["latitude","longitude","zoom","width","height"],et=["bearing","pitch"],ee={speed:1.2,curve:1.414};//# sourceMappingURL=viewport-fly-to-interpolator.js.map
function en(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return er(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return er(t,void 0)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function er(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}!function(t){tQ(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(r);return t=e?Reflect.construct(n,arguments,t2(this).constructor):n.apply(this,arguments),t1(this,t)});function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tc(this,r),a(t$(t=n.call(this)),"propNames",t9),t.props=Object.assign({},ee,e),t}tl(r,[{key:"initializeProps",value:function(t,e){var n,r={},i={},o=t8(t7);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=t[a],c=e[a];tT(t4(s)&&t4(c),"".concat(a," must be supplied for transition")),r[a]=s,i[a]=t3(a,s,c)}}catch(t){o.e(t)}finally{o.f()}var u,l=t8(et);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=t[h]||0,f=e[h]||0;r[h]=p,i[h]=t3(h,p,f)}}catch(t){l.e(t)}finally{l.f()}return{start:r,end:i}}},{key:"interpolateProps",value:function(t,e,n){var r,i=function(t,e,n,r={}){var i;const o={},{startZoom:a,startCenterXY:s,uDelta:c,w0:u,u1:l,S:h,rho:p,rho2:f,r0:d}=Z(t,e,r);if(l<.01){for(const r of F){const i=t[r],a=e[r];o[r]=n*a+(1-n)*i}return o}const v=n*h,g=Math.cosh(d)/Math.cosh(d+p*v),m=u*((Math.cosh(d)*Math.tanh(d+p*v)-Math.sinh(d))/f)/l,y=a+b(1/g),w=((i=[])[0]=c[0]*m,i[1]=c[1]*m,i);_(w,w,s);const O=C(w);return o.longitude=O[0],o.latitude=O[1],o.zoom=y,o}(t,e,n,this.props),o=t8(et);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=tS(t[a],e[a],n)}}catch(t){o.e(t)}finally{o.f()}return i}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=function(t,e,n={}){let r;const{screenSpeed:i,speed:o,maxDuration:a}=n=Object.assign({},V,n),{S:s,rho:c}=Z(t,e,n),u=1e3*s;return r=Number.isFinite(i)?u/(i/c):u/o,Number.isFinite(a)&&r>a?0:r}(t,e,this.props)),n}}])}(tG);var ei=["longitude","latitude","zoom","bearing","pitch"],eo=function(t){tQ(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(r);return t=e?Reflect.construct(n,arguments,t2(this).constructor):n.apply(this,arguments),t1(this,t)});function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tc(this,r),t=n.call(this),Array.isArray(e)&&(e={transitionProps:e}),t.propNames=e.transitionProps||ei,e.around&&(t.around=e.around),t}return tl(r,[{key:"initializeProps",value:function(t,e){var n={},r={};if(this.around){n.around=this.around;var i=new z(t).unproject(this.around);Object.assign(r,e,{around:new z(e).project(i),aroundLngLat:i})}var o,a=en(this.propNames);try{for(a.s();!(o=a.n()).done;){var s=o.value,c=t[s],u=e[s];tT(t4(c)&&t4(u),"".concat(s," must be supplied for transition")),n[s]=c,r[s]=t3(s,c,u)}}catch(t){a.e(t)}finally{a.f()}return{start:n,end:r}}},{key:"interpolateProps",value:function(t,e,n){var r,i={},o=en(this.propNames);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=tS(t[a],e[a],n)}}catch(t){o.e(t)}finally{o.f()}if(e.around){var s=f(new z(Object.assign({},e,i)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:tS(t.around,e.around,n)}),2),c=s[0],u=s[1];i.longitude=c,i.latitude=u}return i}}]),r}(tG),ea=function(){},es={BREAK:1,SNAP_TO_END:2,IGNORE:3,UPDATE:4},ec={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new eo,transitionInterruption:es.BREAK,onTransitionStart:ea,onTransitionInterrupt:ea,onTransitionEnd:ea},eu=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tc(this,t),a(this,"_animationFrame",null),a(this,"_onTransitionFrame",function(){e._animationFrame=requestAnimationFrame(e._onTransitionFrame),e._updateViewport()}),this.props=null,this.onViewportChange=n.onViewportChange||ea,this.onStateChange=n.onStateChange||ea,this.time=n.getTime||Date.now}return tl(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(t){var e=this.props;if(this.props=t,!e||this._shouldIgnoreViewportChange(e,t))return!1;if(this._isTransitionEnabled(t)){var n=Object.assign({},e),r=Object.assign({},t);if(this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this.state.interruption===es.SNAP_TO_END?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===es.UPDATE)){var i,o,a=this.time(),s=(a-this.state.startTime)/this.state.duration;r.transitionDuration=this.state.duration-(a-this.state.startTime),o=(i=this.state.easing)(s),r.transitionEasing=function(t){return 1/(1-o)*(i(t*(1-s)+s)-o)},r.transitionInterpolator=n.transitionInterpolator}return r.onTransitionStart(),this._triggerTransition(n,r),!0}return this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return!!this._animationFrame}},{key:"_isTransitionEnabled",value:function(t){var e=t.transitionDuration,n=t.transitionInterpolator;return(e>0||"auto"===e)&&!!n}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(t,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return!t||(this._isTransitionInProgress()?this.state.interruption===es.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e))}},{key:"_triggerTransition",value:function(t,e){tT(this._isTransitionEnabled(e)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=e.transitionInterpolator,r=n.getDuration?n.getDuration(t,e):e.transitionDuration;if(0!==r){var i=e.transitionInterpolator.initializeProps(t,e),o={inTransition:!0,isZooming:t.zoom!==e.zoom,isPanning:t.longitude!==e.longitude||t.latitude!==e.latitude,isRotating:t.bearing!==e.bearing||t.pitch!==e.pitch};this.state={duration:r,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startTime:this.time(),startProps:i.start,endProps:i.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(o)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var t=this.time(),e=this.state,n=e.startTime,r=e.duration,i=e.easing,o=e.interpolator,a=e.startProps,s=e.endProps,c=!1,u=(t-n)/r;u>=1&&(u=1,c=!0),u=i(u);var l=o.interpolateProps(a,s,u),h=new tR(Object.assign({},this.props,l));this.state.propsInTransition=h.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),c&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();a(eu,"defaultProps",ec);//# sourceMappingURL=transition-manager.js.map
// EXTERNAL MODULE: ./node_modules/hammerjs/hammer.js
var el=n(840),eh=/*#__PURE__*/n.n(el);const ep={mousedown:1,mousemove:2,mouseup:4};!//# sourceMappingURL=hammer-overrides.js.map
function(t){const e=t.prototype.handler;t.prototype.handler=function(t){const n=this.store;t.button>0&&"pointerdown"===t.type&&!function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(n,e=>e.pointerId===t.pointerId)&&n.push(t),e.call(this,t)}}(eh().PointerEventInput),eh().MouseInput.prototype.handler=function(t){let e=ep[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};const ef=eh().Manager;/* harmony default export */var ed=eh();// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/constants.js
//# sourceMappingURL=hammer.browser.js.map
const ev=ed?[[ed.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[ed.Rotate,{enable:!1}],[ed.Pinch,{enable:!1}],[ed.Swipe,{enable:!1}],[ed.Pan,{threshold:0,enable:!1}],[ed.Press,{enable:!1}],[ed.Tap,{event:"doubletap",taps:2,enable:!1}],[ed.Tap,{event:"anytap",enable:!1}],[ed.Tap,{enable:!1}]]:null,eg={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},em={doubletap:["tap"]},eb={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},ey={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},ew={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},eO={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},eE="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",e_="undefined"!=typeof window?window:n.g;void 0!==n.g?n.g:window;let eP=!1;try{const t={get passive(){return eP=!0,!0}};e_.addEventListener("test",t,t),e_.removeEventListener("test",t,t)}catch(t){}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/wheel-input.js
//# sourceMappingURL=globals.js.map
const eM=-1!==eE.indexOf("firefox"),{WHEEL_EVENTS:ej}=ey,eS="wheel";class eT{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.events=ej.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(e=>t.addEventListener(e,this.handleEvent,!!eP&&{passive:!1}))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===eS&&(this.options.enable=e)}handleEvent(t){if(!this.options.enable)return;let e=t.deltaY;e_.WheelEvent&&(eM&&t.deltaMode===e_.WheelEvent.DOM_DELTA_PIXEL&&(e/=e_.devicePixelRatio),t.deltaMode===e_.WheelEvent.DOM_DELTA_LINE&&(e*=40));const n={x:t.clientX,y:t.clientY};0!==e&&e%4.000244140625==0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,n)}_onWheel(t,e,n){this.callback({type:eS,center:n,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/move-input.js
//# sourceMappingURL=wheel-input.js.map
const{MOUSE_EVENTS:ek}=ey,ex="pointermove",eD="pointerover",eC="pointerout",eR="pointerleave";class eA{constructor(t,e,n={}){this.element=t,this.callback=e,this.pressed=!1,this.options=Object.assign({enable:!0},n),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=ek.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===ex&&(this.enableMoveEvent=e),t===eD&&(this.enableOverEvent=e),t===eC&&(this.enableOutEvent=e),t===eR&&(this.enableLeaveEvent=e)}handleEvent(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}handleOverEvent(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:eD,srcEvent:t,pointerType:"mouse",target:t.target})}handleOutEvent(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:eC,srcEvent:t,pointerType:"mouse",target:t.target})}handleLeaveEvent(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:eR,srcEvent:t,pointerType:"mouse",target:t.target})}handleMoveEvent(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:ex,srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/key-input.js
//# sourceMappingURL=move-input.js.map
const{KEY_EVENTS:eI}=ey,eL="keydown",eN="keyup";class ez{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=eI.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),t.tabIndex=n.tabIndex||0,t.style.outline="none",this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===eL&&(this.enableDownEvent=e),t===eN&&(this.enableUpEvent=e)}handleEvent(t){const e=t.target||t.srcElement;("INPUT"!==e.tagName||"text"!==e.type)&&"TEXTAREA"!==e.tagName&&(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:eL,srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:eN,srcEvent:t,key:t.key,target:t.target}))}}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/inputs/contextmenu-input.js
//# sourceMappingURL=key-input.js.map
const eF="contextmenu";class eV{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.handleEvent=this.handleEvent.bind(this),t.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(t,e){t===eF&&(this.options.enable=e)}handleEvent(t){this.options.enable&&this.callback({type:eF,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/utils/event-utils.js
const eZ={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4},eB={srcElement:"root",priority:0};class eU{constructor(t){this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}isEmpty(){return!this._active}add(t,e,n,r=!1,i=!1){const{handlers:o,handlersByElement:a}=this;n&&("object"!=typeof n||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},eB,n):eB;let s=a.get(n.srcElement);s||(s=[],a.set(n.srcElement,s));const c={type:t,handler:e,srcElement:n.srcElement,priority:n.priority};r&&(c.once=!0),i&&(c.passive=!0),o.push(c),this._active=this._active||!c.passive;let u=s.length-1;for(;u>=0&&!(s[u].priority>=c.priority);)u--;s.splice(u+1,0,c)}remove(t,e){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);const t=r.get(o.srcElement);t.splice(t.indexOf(o),1),0===t.length&&r.delete(o.srcElement)}}this._active=n.some(t=>!t.passive)}handleEvent(t){if(this.isEmpty())return;const e=this._normalizeEvent(t);let n=t.srcEvent.target;for(;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")}_emit(t,e){const n=this.handlersByElement.get(e);if(n){let e=!1;const r=()=>{t.handled=!0},i=()=>{t.handled=!0,e=!0},o=[];for(let a=0;a<n.length;a++){const{type:s,handler:c,once:u}=n[a];if(c(Object.assign({},t,{type:s,stopPropagation:r,stopImmediatePropagation:i})),u&&o.push(n[a]),e)break}for(let t=0;t<o.length;t++){const{type:e,handler:n}=o[t];this.remove(e,n)}}}_normalizeEvent(t){const e=this.eventManager.element;return Object.assign({},t,function(t){const e=eZ[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r,which:i}=t.srcEvent;let o=!1,a=!1,s=!1;return 4!==e&&(2!==e||Number.isFinite(n))?2===e?(o=!!(1&n),a=!!(4&n),s=!!(2&n)):1===e&&(o=0===r,a=1===r,s=2===r):(o=1===i,a=2===i,s=3===i),{leftButton:o,middleButton:a,rightButton:s}}(t),function(t,e){const{srcEvent:n}=t;if(!t.center&&!Number.isFinite(n.clientX))return null;const r=t.center||{x:n.clientX,y:n.clientY},i=e.getBoundingClientRect(),o=i.width/e.offsetWidth||1,a=i.height/e.offsetHeight||1,s={x:(r.x-i.left-e.clientLeft)/o,y:(r.y-i.top-e.clientTop)/a};return{center:r,offsetCenter:s}}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/utils/event-registrar.js
(t,e),{handled:!1,rootElement:e})}}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/event-manager.js
//# sourceMappingURL=event-registrar.js.map
const eq={events:null,recognizers:null,recognizerOptions:{},Manager:ef,touchAction:"none",tabIndex:0};class eW{constructor(t=null,e={}){this.options=Object.assign({},eq,e),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(t);const{events:n}=e;n&&this.on(n)}setElement(t){if(this.element&&this.destroy(),this.element=t,!t)return;const{options:e}=this,n=e.Manager;for(const r in this.manager=new n(t,{touchAction:e.touchAction,recognizers:e.recognizers||ev}).on("hammer.input",this._onBasicInput),e.recognizers||Object.keys(eg).forEach(t=>{const e=this.manager.get(t);e&&eg[t].forEach(t=>{e.recognizeWith(t)})}),e.recognizerOptions){const t=this.manager.get(r);if(t){const n=e.recognizerOptions[r];delete n.enable,t.set(n)}}for(const[n,r]of(this.wheelInput=new eT(t,this._onOtherEvent,{enable:!1}),this.moveInput=new eA(t,this._onOtherEvent,{enable:!1}),this.keyInput=new ez(t,this._onOtherEvent,{enable:!1,tabIndex:e.tabIndex}),this.contextmenuInput=new eV(t,this._onOtherEvent,{enable:!1}),this.events))r.isEmpty()||(this._toggleRecognizer(r.recognizerName,!0),this.manager.on(n,r.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(t,e,n){this._addEventHandler(t,e,n,!1)}once(t,e,n){this._addEventHandler(t,e,n,!0)}watch(t,e,n){this._addEventHandler(t,e,n,!1,!0)}off(t,e){this._removeEventHandler(t,e)}_toggleRecognizer(t,e){const{manager:n}=this;if(!n)return;const r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});const i=em[t];i&&!this.options.recognizers&&i.forEach(i=>{const o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)})}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}_addEventHandler(t,e,n,r,i){if("string"!=typeof t){for(const o in n=e,t)this._addEventHandler(o,t[o],n,r,i);return}const{manager:o,events:a}=this,s=eO[t]||t;let c=a.get(s);!c&&(c=new eU(this),a.set(s,c),c.recognizerName=ew[s]||s,o&&o.on(s,c.handleEvent)),c.add(t,e,n,r,i),c.isEmpty()||this._toggleRecognizer(c.recognizerName,!0)}_removeEventHandler(t,e){if("string"!=typeof t){for(const e in t)this._removeEventHandler(e,t[e]);return}const{events:n}=this,r=eO[t]||t,i=n.get(r);if(i&&(i.remove(t,e),i.isEmpty())){const{recognizerName:t}=i;let e=!1;for(const r of n.values())if(r.recognizerName===t&&!r.isEmpty()){e=!0;break}e||this._toggleRecognizer(t,!1)}}_onBasicInput(t){const{srcEvent:e}=t,n=eb[e.type];n&&this.manager.emit(n,t)}_onOtherEvent(t){this.manager.emit(t.type,t)}}// CONCATENATED MODULE: ./node_modules/mjolnir.js/dist/esm/index.js // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/map-controller.js
//# sourceMappingURL=event-manager.js.map
//# sourceMappingURL=index.js.map
function eH(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function eX(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?eH(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eH(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var eY={transitionDuration:0},eK={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new eo,transitionInterruption:es.BREAK},eG=function(t){return 1-(1-t)*(1-t)},e$=["wheel"],eJ=["panstart","panmove","panend"],eQ=["pinchstart","pinchmove","pinchend"],e0=["tripanstart","tripanmove","tripanend"],e1=["doubletap"],e2=["keydown"],e5=function(){function t(){var e=this;tc(this,t),a(this,"events",[]),a(this,"scrollZoom",!0),a(this,"dragPan",!0),a(this,"dragRotate",!0),a(this,"doubleClickZoom",!0),a(this,"touchZoom",!0),a(this,"touchRotate",!1),a(this,"keyboard",!0),a(this,"_interactionState",{isDragging:!1}),a(this,"_events",{}),a(this,"_setInteractionState",function(t){Object.assign(e._interactionState,t),e.onStateChange&&e.onStateChange(e._interactionState)}),a(this,"_onTransition",function(t,n){e.onViewportChange(t,e._interactionState,n)}),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new eu({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return tl(t,[{key:"handleEvent",value:function(t){this.mapState=this.getMapState();var e=this._eventStartBlocked;switch(t.type){case"panstart":return!e&&this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return!e&&this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"tripanstart":return!e&&this._onTriplePanStart(t);case"tripanmove":return this._onTriplePan(t);case"tripanend":return this._onTriplePanEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=t.offsetCenter;return[e.x,e.y]}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"blockEvents",value:function(t){var e=this,n=setTimeout(function(){e._eventStartBlocked===n&&(e._eventStartBlocked=null)},t);this._eventStartBlocked=n}},{key:"updateViewport",value:function(t,e,n){var r=this.mapState instanceof tR?this.mapState.getViewportProps():this.mapState,i=eX(eX({},t.getViewportProps()),e),o=Object.keys(i).some(function(t){return r[t]!==i[t]});this._state=t.getState(),this._setInteractionState(n),o&&this.onViewportChange(i,this._interactionState,r)}},{key:"getMapState",value:function(t){return new tR(eX(eX(eX({},this.mapStateProps),this._state),t))}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"setOptions",value:function(t){var e=t.onViewportChange,n=t.onStateChange,r=t.eventManager,i=void 0===r?this.eventManager:r,o=t.isInteractive,a=void 0===o||o,s=t.scrollZoom,c=void 0===s?this.scrollZoom:s,u=t.dragPan,l=void 0===u?this.dragPan:u,h=t.dragRotate,p=void 0===h?this.dragRotate:h,f=t.doubleClickZoom,d=void 0===f?this.doubleClickZoom:f,v=t.touchZoom,g=void 0===v?this.touchZoom:v,m=t.touchRotate,b=void 0===m?this.touchRotate:m,y=t.keyboard,w=void 0===y?this.keyboard:y;this.onViewportChange=e,this.onStateChange=n;var O=this.mapStateProps||{},E=O.height!==t.height||O.width!==t.width;this.mapStateProps=t,E&&(this.mapState=O,this.updateViewport(new tR(t))),this._transitionManager.processViewportChange(t),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(e$,a&&!!c),this.toggleEvents(eJ,a&&!!(l||p)),this.toggleEvents(eQ,a&&!!(g||b)),this.toggleEvents(e0,a&&!!b),this.toggleEvents(e1,a&&!!d),this.toggleEvents(e2,a&&!!w),this.scrollZoom=c,this.dragPan=l,this.dragRotate=p,this.doubleClickZoom=d,this.touchZoom=g,this.touchRotate=b,this.keyboard=w}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach(function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))})}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t);this._panRotate=this.isFunctionKeyPressed(t)||t.rightButton;var n=this._panRotate?this.mapState.rotateStart({pos:e}):this.mapState.panStart({pos:e});return this.updateViewport(n,eY,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotate(t):this._onPanMove(t))}},{key:"_onPanEnd",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotateEnd(t):this._onPanMoveEnd(t))}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.mapState.pan({pos:e});return this.updateViewport(n,eY,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(t){if(this.dragPan){var e=this.dragPan.inertia,n=void 0===e?300:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.pan({pos:i}).panEnd();return this.updateViewport(o,eX(eX({},eK),{},{transitionDuration:n,transitionEasing:eG}),{isDragging:!1,isPanning:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,null,{isDragging:!1,isPanning:!1}),!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=this.getCenter(t),n=this.mapState.rotate({pos:e});return this.updateViewport(n,eY,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(t){if(this.dragRotate){var e=this.dragRotate.inertia,n=void 0===e?300:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.rotate({pos:i}).rotateEnd();return this.updateViewport(o,eX(eX({},eK),{},{transitionDuration:n,transitionEasing:eG}),{isDragging:!1,isRotating:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;var e=this.scrollZoom,n=e.speed,r=e.smooth;t.preventDefault();var i=this.getCenter(t),o=t.delta,a=2/(1+Math.exp(-Math.abs(o*(void 0===n?.01:n))));o<0&&0!==a&&(a=1/a);var s=this.mapState.zoom({pos:i,scale:a});return s.getViewportProps().zoom!==this.mapStateProps.zoom&&(this.updateViewport(s,eX(eX({},eK),{},{transitionInterpolator:new eo({around:i}),transitionDuration:void 0!==r&&r?250:1}),{isPanning:!0,isZooming:!0}),!0)}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t),n=this.mapState.zoomStart({pos:e}).rotateStart({pos:e});return this._startPinchRotation=t.rotation,this._lastPinchEvent=t,this.updateViewport(n,eY,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.isDragging()||!this.touchZoom&&!this.touchRotate)return!1;var e=this.mapState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation;e=e.rotate({deltaAngleX:this._startPinchRotation-i})}return this.updateViewport(e,eY,{isDragging:!0,isPanning:!!this.touchZoom,isZooming:!!this.touchZoom,isRotating:!!this.touchRotate}),this._lastPinchEvent=t,!0}},{key:"_onPinchEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchZoom){var e=this.touchZoom.inertia,n=void 0===e?300:e,r=this._lastPinchEvent;if(n&&r&&t.scale!==r.scale){var i=this.getCenter(t),o=this.mapState.rotateEnd(),a=Math.log2(t.scale),s=(a-Math.log2(r.scale))/(t.deltaTime-r.deltaTime),c=Math.pow(2,a+s*n/2);return o=o.zoom({pos:i,scale:c}).zoomEnd(),this.updateViewport(o,eX(eX({},eK),{},{transitionInterpolator:new eo({around:i}),transitionDuration:n,transitionEasing:eG}),{isDragging:!1,isPanning:!!this.touchZoom,isZooming:!!this.touchZoom,isRotating:!1}),this.blockEvents(n),!0}}var u=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(u,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onTriplePanStart",value:function(t){var e=this.getCenter(t),n=this.mapState.rotateStart({pos:e});return this.updateViewport(n,eY,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(t){if(!this.isDragging()||!this.touchRotate)return!1;var e=this.getCenter(t);e[0]-=t.deltaX;var n=this.mapState.rotate({pos:e});return this.updateViewport(n,eY,{isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchRotate){var e=this.touchRotate.inertia,n=void 0===e?300:e;if(n&&t.velocityY){var r=this.getCenter(t),i=[r[0],r[1]+=t.velocityY*n/2],o=this.mapState.rotate({pos:i});return this.updateViewport(o,eX(eX({},eK),{},{transitionDuration:n,transitionEasing:eG}),{isDragging:!1,isRotating:!0}),this.blockEvents(n),!1}}var a=this.mapState.rotateEnd();return this.updateViewport(a,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t),n=this.isFunctionKeyPressed(t),r=this.mapState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,Object.assign({},eK,{transitionInterpolator:new eo({around:e})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=this.keyboard,i=r.zoomSpeed,o=void 0===i?2:i,a=r.moveSpeed,s=void 0===a?100:a,c=r.rotateSpeedX,u=void 0===c?15:c,l=r.rotateSpeedY,h=void 0===l?10:l,p=this.mapStateProps;switch(t.srcEvent.keyCode){case 189:e=n?this.getMapState({zoom:p.zoom-Math.log2(o)-1}):this.getMapState({zoom:p.zoom-Math.log2(o)});break;case 187:e=n?this.getMapState({zoom:p.zoom+Math.log2(o)+1}):this.getMapState({zoom:p.zoom+Math.log2(o)});break;case 37:e=n?this.getMapState({bearing:p.bearing-u}):this.mapState.pan({pos:[s,0],startPos:[0,0]});break;case 39:e=n?this.getMapState({bearing:p.bearing+u}):this.mapState.pan({pos:[-s,0],startPos:[0,0]});break;case 38:e=n?this.getMapState({pitch:p.pitch+h}):this.mapState.pan({pos:[0,s],startPos:[0,0]});break;case 40:e=n?this.getMapState({pitch:p.pitch-h}):this.mapState.pan({pos:[0,-s],startPos:[0,0]});break;default:return!1}return this.updateViewport(e,eK)}}]),t}();//# sourceMappingURL=map-controller.js.map
function e4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function e3(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?e4(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e4(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var e8=Object.assign({},tY.propTypes,{maxZoom:p.number,minZoom:p.number,maxPitch:p.number,minPitch:p.number,onViewStateChange:p.func,onViewportChange:p.func,onInteractionStateChange:p.func,transitionDuration:p.oneOfType([p.number,p.string]),transitionInterpolator:p.object,transitionInterruption:p.number,transitionEasing:p.func,onTransitionStart:p.func,onTransitionInterrupt:p.func,onTransitionEnd:p.func,scrollZoom:p.oneOfType([p.bool,p.object]),dragPan:p.oneOfType([p.bool,p.object]),dragRotate:p.oneOfType([p.bool,p.object]),doubleClickZoom:p.bool,touchZoom:p.oneOfType([p.bool,p.object]),touchRotate:p.oneOfType([p.bool,p.object]),keyboard:p.oneOfType([p.bool,p.object]),onHover:p.func,onClick:p.func,onDblClick:p.func,onContextMenu:p.func,onMouseDown:p.func,onMouseMove:p.func,onMouseUp:p.func,onTouchStart:p.func,onTouchMove:p.func,onTouchEnd:p.func,onMouseEnter:p.func,onMouseLeave:p.func,onMouseOut:p.func,onWheel:p.func,touchAction:p.string,eventRecognizerOptions:p.object,clickRadius:p.number,interactiveLayerIds:p.array,getCursor:p.func,controller:p.instanceOf(e5)}),e6=Object.assign({},tY.defaultProps,tD,eu.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(t){return t.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",eventRecognizerOptions:{},clickRadius:0,getCursor:function(t){var e=t.isDragging,n=t.isHovering;return e?"grabbing":n?"pointer":"grab"}});function e9(t){if(t.lngLat||!t.offsetCenter)return t;var e=t.offsetCenter,n=e.x,r=e.y;if(!Number.isFinite(n)||!Number.isFinite(r))return t;var i=[n,r];if(t.point=i,this.map){var o=this.map.unproject(i);t.lngLat=[o.lng,o.lat]}return t}function e7(t){var e=this.map;if(!e||!t)return null;var n={},r=this.props.clickRadius;this.props.interactiveLayerIds&&(n.layers=this.props.interactiveLayerIds);try{return e.queryRenderedFeatures(r?[[t[0]-r,t[1]+r],[t[0]+r,t[1]-r]]:t,n)}catch(t){return null}}function nt(t,e){var n=this.props[t];n&&n(e9.call(this,e))}function ne(t){nt.call(this,"touch"===t.pointerType?"onTouchStart":"onMouseDown",t)}function nn(t){nt.call(this,"touch"===t.pointerType?"onTouchEnd":"onMouseUp",t)}function nr(t){if(nt.call(this,"touch"===t.pointerType?"onTouchMove":"onMouseMove",t),!this.state.isDragging){var e,n=this.props,r=n.onHover,i=n.interactiveLayerIds;t=e9.call(this,t),(i||r)&&(e=e7.call(this,t.point));var o=!!(i&&e&&e.length>0),a=o&&!this.state.isHovering,s=!o&&this.state.isHovering;(r||a)&&(t.features=e,r&&r(t)),a&&nt.call(this,"onMouseEnter",t),s&&nt.call(this,"onMouseLeave",t),(a||s)&&this.setState({isHovering:o})}}function ni(t){var e=this.props,n=e.onClick,r=e.onNativeClick,i=e.onDblClick,o=e.doubleClickZoom,a=[],s=i||o;switch(t.type){case"anyclick":a.push(r),s||a.push(n);break;case"click":s&&a.push(n)}(a=a.filter(Boolean)).length&&((t=e9.call(this,t)).features=e7.call(this,t.point),a.forEach(function(e){return e(t)}))}var no=(0,h.forwardRef)(function(t,e){var n,a,s=(0,h.useContext)(tL),c=(0,h.useMemo)(function(){return t.controller||new e5},[]),u=(0,h.useMemo)(function(){return new eW(null,{touchAction:t.touchAction,recognizerOptions:t.eventRecognizerOptions})},[]),l=(0,h.useRef)(null),p=(0,h.useRef)(null),f=(0,h.useRef)({width:0,height:0,state:{isHovering:!1,isDragging:!1}}).current;f.props=t,f.map=p.current&&p.current.getMap(),f.setState=function(e){f.state=e3(e3({},f.state),e),l.current.style.cursor=t.getCursor(f.state)};var d=!0,v=function(t,e,r){if(d){n=[t,e,r];return}var i=f.props,o=i.onViewStateChange,a=i.onViewportChange;Object.defineProperty(t,"position",{get:function(){return[0,0,tF(f.map,t)]}}),o&&o({viewState:t,interactionState:e,oldViewState:r}),a&&a(t,e,r)};(0,h.useImperativeHandle)(e,function(){return{getMap:p.current&&p.current.getMap,queryRenderedFeatures:p.current&&p.current.queryRenderedFeatures}},[]);var g=(0,h.useMemo)(function(){return e3(e3({},s),{},{eventManager:u,container:s.container||l.current})},[s,l.current]);g.onViewportChange=v,g.viewport=s.viewport||tU(f),f.viewport=g.viewport;var m=function(t){var e=t.isDragging,n=void 0!==e&&e;if(n!==f.state.isDragging&&f.setState({isDragging:n}),d){a=t;return}var r=f.props.onInteractionStateChange;r&&r(t)},b=function(){f.width&&f.height&&c.setOptions(e3(e3(e3({},f.props),f.props.viewState),{},{isInteractive:!!(f.props.onViewStateChange||f.props.onViewportChange),onViewportChange:v,onStateChange:m,eventManager:u,width:f.width,height:f.height}))};(0,h.useEffect)(function(){return u.setElement(l.current),u.on({pointerdown:ne.bind(f),pointermove:nr.bind(f),pointerup:nn.bind(f),pointerleave:nt.bind(f,"onMouseOut"),click:ni.bind(f),anyclick:ni.bind(f),dblclick:nt.bind(f,"onDblClick"),wheel:nt.bind(f,"onWheel"),contextmenu:nt.bind(f,"onContextMenu")}),function(){u.destroy()}},[]),tz(function(){if(n){var t;v.apply(void 0,function(t){if(Array.isArray(t))return i(t)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
(t=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
(t)||o(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
())}a&&m(a)}),b();var y=t.width,w=t.height,O=t.style,E=t.getCursor,_=(0,h.useMemo)(function(){return e3(e3({position:"relative"},O),{},{width:y,height:w,cursor:E(f.state)})},[O,y,w,E,f.state]);return n&&f._child||(f._child=h.createElement(tN,{value:g},h.createElement("div",{key:"event-canvas",ref:l,style:_},h.createElement(tY,r({},t,{width:"100%",height:"100%",style:null,onResize:function(t){var e=t.width,n=t.height;f.width=e,f.height=n,b(),f.props.onResize({width:e,height:n})},ref:p}))))),d=!1,f._child});no.supported=tY.supported,no.propTypes=e8,no.defaultProps=e6;/* harmony default export */var na=no;// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/utils/deep-equal.js
p.string.isRequired,p.string,p.oneOf(["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade","sky"]).isRequired,p.string,p.string,p.string;//# sourceMappingURL=layer.js.map
var ns={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},nc={captureScroll:p.bool,captureDrag:p.bool,captureClick:p.bool,captureDoubleClick:p.bool,capturePointerMove:p.bool};function nu(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,h.useContext)(tL),n=(0,h.useRef)(null),r=(0,h.useRef)({props:t,state:{},context:e,containerRef:n}).current;return r.props=t,r.context=e,(0,h.useEffect)(function(){return function(t){var e=t.containerRef.current,n=t.context.eventManager;if(e&&n){var r={wheel:function(e){var n=t.props;n.captureScroll&&e.stopPropagation(),n.onScroll&&n.onScroll(e,t)},panstart:function(e){var n=t.props;n.captureDrag&&e.stopPropagation(),n.onDragStart&&n.onDragStart(e,t)},anyclick:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onNativeClick&&n.onNativeClick(e,t)},click:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onClick&&n.onClick(e,t)},dblclick:function(e){var n=t.props;n.captureDoubleClick&&e.stopPropagation(),n.onDoubleClick&&n.onDoubleClick(e,t)},pointermove:function(e){var n=t.props;n.capturePointerMove&&e.stopPropagation(),n.onPointerMove&&n.onPointerMove(e,t)}};return n.watch(r,e),function(){n.off(r)}}}(r)},[e.eventManager]),r}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/base-control.js
function nl(t){var e=t.instance,n=nu(t),r=n.context,i=n.containerRef;return e._context=r,e._containerRef=i,e._render()}var nh=function(t){tQ(i,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(i);return t=e?Reflect.construct(n,arguments,t2(this).constructor):n.apply(this,arguments),t1(this,t)});function i(){var t;tc(this,i);for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return a(t$(t=n.call.apply(n,[this].concat(r))),"_context",{}),a(t$(t),"_containerRef",(0,h.createRef)()),a(t$(t),"_onScroll",function(t){}),a(t$(t),"_onDragStart",function(t){}),a(t$(t),"_onDblClick",function(t){}),a(t$(t),"_onClick",function(t){}),a(t$(t),"_onPointerMove",function(t){}),t}return tl(i,[{key:"_render",value:function(){throw Error("_render() not implemented")}},{key:"render",value:function(){return h.createElement(nl,r({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),i}(h.PureComponent);//# sourceMappingURL=base-control.js.map
function np(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?np(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):np(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}a(nh,"propTypes",nc),a(nh,"defaultProps",ns);var nd=Object.assign({},nc,{draggable:p.bool,onDrag:p.func,onDragEnd:p.func,onDragStart:p.func,offsetLeft:p.number,offsetTop:p.number}),nv=Object.assign({},ns,{draggable:!1,offsetLeft:0,offsetTop:0});function ng(t){var e=t.offsetCenter;return[e.x,e.y]}function nm(t,e,n,r){var i=t[0]+e[0]-n.offsetLeft,o=t[1]+e[1]-n.offsetTop;return r.viewport.unproject([i,o])}function nb(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context,a=e.containerRef;if(n.draggable){t.stopPropagation();var s=ng(t),c=function(t,e){var n=t.center,r=n.x,i=n.y;if(e){var o=e.getBoundingClientRect();return[o.left-r,o.top-i]}return null}(t,a.current);if(i.setDragPos(s),i.setDragOffset(c),r.onDragStart&&c){var u=Object.assign({},t);u.lngLat=nm(s,c,n,o),r.onDragStart(u)}}}//# sourceMappingURL=draggable-control.js.map
var ny="undefined"!=typeof window&&window.devicePixelRatio||1,nw=function(t){return Math.round(t*ny)/ny},nO=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";if(null===t)return e;var r="x"===n?t.offsetWidth:t.offsetHeight;return nw(e/100*r)/r*100};//# sourceMappingURL=crisp-pixel.js.map
function nE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var n_=Object.assign({},nd,{className:p.string,longitude:p.number.isRequired,latitude:p.number.isRequired,style:p.object});function nP(t){var e,n,r,i,o,s,c,u=(n=(e=f((0,h.useState)(null),2))[0],r=e[1],o=(i=f((0,h.useState)(null),2))[0],s=i[1],(c=nu(nf(nf({},t),{},{onDragStart:nb}))).callbacks=t,c.state.dragPos=n,c.state.setDragPos=r,c.state.dragOffset=o,c.state.setDragOffset=s,(0,h.useEffect)(function(){return function(t){var e=t.context.eventManager;if(e&&t.state.dragPos){var n={panmove:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var a=ng(t);i.setDragPos(a);var s=i.dragOffset;if(r.onDrag&&s){var c=Object.assign({},t);c.lngLat=nm(a,s,n,o),r.onDrag(c)}}(e,t)},panend:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var a=i.dragPos,s=i.dragOffset;if(i.setDragPos(null),i.setDragOffset(null),r.onDragEnd&&a&&s){var c=Object.assign({},t);c.lngLat=nm(a,s,n,o),r.onDragEnd(c)}}(e,t)},pancancel:function(e){var n;return n=t.state,void(e.stopPropagation(),n.setDragPos(null),n.setDragOffset(null))}};return e.watch(n),function(){e.off(n)}}}(c)},[c.context.eventManager,!!n]),c),l=u.state,p=u.containerRef,d=t.children,v=t.className,g=t.draggable,m=t.style,b=l.dragPos,y=function(t){var e=t.props,n=t.state,r=t.context,i=e.longitude,o=e.latitude,a=e.offsetLeft,s=e.offsetTop,c=n.dragPos,u=n.dragOffset,l=r.viewport,h=r.map;if(c&&u)return[c[0]+u[0],c[1]+u[1]];var p=tF(h,{longitude:i,latitude:o}),d=f(l.project([i,o,p]),2),v=d[0],g=d[1];return[v+=a,g+=s]}(u),w=f(y,2),O=w[0],E=w[1],_="translate(".concat(nw(O),"px, ").concat(nw(E),"px)"),P=g?b?"grabbing":"grab":"auto",M=(0,h.useMemo)(function(){var t=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nE(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nE(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0,transform:_,cursor:P},m);return h.createElement("div",{className:"mapboxgl-marker ".concat(v),ref:u.containerRef,style:t},d)},[d,v]),j=p.current;return j&&(j.style.transform=_,j.style.cursor=P),M}nP.defaultProps=Object.assign({},nv,{className:""}),nP.propTypes=n_,h.memo(nP);//# sourceMappingURL=marker.js.map
var nM={top:{x:.5,y:0},"top-left":{x:0,y:0},"top-right":{x:1,y:0},bottom:{x:.5,y:1},"bottom-left":{x:0,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5}},nj=Object.keys(nM),nS=Object.assign({},nc,{className:p.string,longitude:p.number.isRequired,latitude:p.number.isRequired,altitude:p.number,offsetLeft:p.number,offsetTop:p.number,tipSize:p.number,closeButton:p.bool,closeOnClick:p.bool,anchor:p.oneOf(Object.keys(nM)),dynamicPosition:p.bool,sortByDepth:p.bool,onClose:p.func}),nT=Object.assign({},ns,{className:"",offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function nk(t){var e,n,r,i,o,a,s,c,u,l,p,d,v,g,m,b,y,w,O,E=(0,h.useRef)(null),_=nu(t),P=_.context,M=_.containerRef,j=f((0,h.useState)(!1),2)[1];(0,h.useEffect)(function(){j(!0)},[E.current]),(0,h.useEffect)(function(){if(P.eventManager&&t.closeOnClick){var e=function(){return _.props.onClose()};return P.eventManager.on("anyclick",e),function(){P.eventManager.off("anyclick",e)}}},[P.eventManager,t.closeOnClick]);var S=P.viewport,T=P.map,k=t.className,x=t.longitude,D=t.latitude,C=t.tipSize,R=t.closeButton,A=t.children,I=t.altitude;void 0===I&&(I=tF(T,{longitude:x,latitude:D}));var L=S.project([x,D,I]),N=(e=E.current,r=(n=f(L,2))[0],i=n[1],o=t.anchor,a=t.dynamicPosition,s=t.tipSize,e&&a?function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.selfWidth,a=t.selfHeight,s=t.anchor,c=t.padding,u=void 0===c?0:c,l=nM[s],h=l.x,p=l.y,f=n-p*a,d=f+a,v=Math.max(0,u-f)+Math.max(0,d-i+u);if(v>0){var g=p,m=v;for(p=0;p<=1;p+=.5)d=(f=n-p*a)+a,(v=Math.max(0,u-f)+Math.max(0,d-i+u))<m&&(m=v,g=p);p=g}var b=.5;.5===p&&(h=Math.floor(h),b=1);var y=e-h*o,w=y+o,O=Math.max(0,u-y)+Math.max(0,w-r+u);if(O>0){var E=h,_=O;for(h=0;h<=1;h+=b)w=(y=e-h*o)+o,(O=Math.max(0,u-y)+Math.max(0,w-r+u))<_&&(_=O,E=h);h=E}return nj.find(function(t){var e=nM[t];return e.x===h&&e.y===p})||s}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/popup.js
({x:r,y:i,anchor:o,padding:s,width:S.width,height:S.height,selfWidth:e.clientWidth,selfHeight:e.clientHeight}):o),z=(c=M.current,l=(u=f(L,3))[0],p=u[1],d=u[2],v=t.offsetLeft,g=t.offsetTop,m=t.sortByDepth,y=nO(c,-(100*(b=nM[N]).x)),w=nO(c,-(100*b.y),"y"),O={position:"absolute",transform:"\n translate(".concat(y,"%, ").concat(w,"%)\n translate(").concat(nw(l+v),"px, ").concat(nw(p+g),"px)\n "),display:void 0,zIndex:void 0},m&&(d>1||d<-1||l<0||l>S.width||p<0||p>S.height?O.display="none":O.zIndex=Math.floor((1-d)/2*1e5)),O),F=(0,h.useCallback)(function(t){_.props.onClose();var e=_.context.eventManager;e&&e.once("click",function(t){return t.stopPropagation()},t.target)},[]);return h.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(N," ").concat(k),style:z,ref:M},h.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:C}}),h.createElement("div",{key:"content",ref:E,className:"mapboxgl-popup-content"},R&&h.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:F},"×"),A))}//# sourceMappingURL=popup.js.map
function nx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nk.propTypes=nS,nk.defaultProps=nT,h.memo(nk);var nD=Object.assign({},nc,{toggleLabel:p.string,className:p.string,style:p.object,compact:p.bool,customAttribution:p.oneOfType([p.string,p.arrayOf(p.string)])}),nC=Object.assign({},ns,{className:"",toggleLabel:"Toggle Attribution"});function nR(t){var e=nu(t),n=e.context,r=e.containerRef,i=(0,h.useRef)(null),o=f((0,h.useState)(!1),2),s=o[0],c=o[1];(0,h.useEffect)(function(){var e,o,a,s,c,u;return n.map&&(o={customAttribution:t.customAttribution},a=n.map,s=r.current,c=i.current,(u=new(tP()).AttributionControl(o))._map=a,u._container=s,u._innerContainer=c,u._updateAttributions(),u._updateEditLink(),a.on("styledata",u._updateData),a.on("sourcedata",u._updateData),e=u),function(){var t;return e&&void((t=e)._map.off("styledata",t._updateData),t._map.off("sourcedata",t._updateData))}},[n.map]);var u=void 0===t.compact?n.viewport.width<=640:t.compact;(0,h.useEffect)(function(){!u&&s&&c(!1)},[u]);var l=(0,h.useCallback)(function(){return c(function(t){return!t})},[]),p=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nx(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nx(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:p,className:t.className},h.createElement("div",{ref:r,"aria-pressed":s,className:"mapboxgl-ctrl mapboxgl-ctrl-attrib ".concat(u?"mapboxgl-compact":""," ").concat(s?"mapboxgl-compact-show":"")},h.createElement("button",{type:"button",className:"mapboxgl-ctrl-attrib-button",title:t.toggleLabel,onClick:l}),h.createElement("div",{ref:i,className:"mapboxgl-ctrl-attrib-inner",role:"list"})))}//# sourceMappingURL=attribution-control.js.map
function nA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nR.propTypes=nD,nR.defaultProps=nC,h.memo(nR);var nI=Object.assign({},nc,{className:p.string,style:p.object,container:p.object,label:p.string}),nL=Object.assign({},ns,{className:"",container:null,label:"Toggle fullscreen"});function nN(t){var e=nu(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(!1),2),o=i[0],s=i[1],c=f((0,h.useState)(!1),2),u=c[0],l=c[1],p=f((0,h.useState)(null),2),d=p[0],v=p[1];(0,h.useEffect)(function(){var t=new(tP()).FullscreenControl;v(t),l(t._checkFullscreenSupport());var e=function(){var e=!t._fullscreen;t._fullscreen=e,s(e)};return th.addEventListener(t._fullscreenchange,e),function(){th.removeEventListener(t._fullscreenchange,e)}},[]);var g=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nA(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nA(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);if(!u)return null;var m=t.className,b=t.label,y=o?"shrink":"fullscreen";return h.createElement("div",{style:g,className:m},h.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},h.createElement("button",{key:y,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(y),type:"button",title:b,onClick:function(){d&&(d._container=t.container||n.container,d._onClickFullscreen())}},h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}//# sourceMappingURL=geolocate-utils.js.map
function nz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nN.propTypes=nI,nN.defaultProps=nL,h.memo(nN);var nF=function(){},nV=Object.assign({},nc,{className:p.string,style:p.object,label:p.string,disabledLabel:p.string,auto:p.bool,positionOptions:p.object,fitBoundsOptions:p.object,trackUserLocation:p.bool,showUserLocation:p.bool,showAccuracyCircle:p.bool,showUserHeading:p.bool,onViewStateChange:p.func,onViewportChange:p.func,onGeolocate:p.func}),nZ=Object.assign({},ns,{className:"",label:"Find My Location",disabledLabel:"Location Not Available",auto:!1,positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0,showUserHeading:!1,showAccuracyCircle:!0,onGeolocate:function(){}});function nB(t){var e=nu(t),n=e.context,r=e.containerRef,i=(0,h.useRef)(null),o=f((0,h.useState)(null),2),s=o[0],c=o[1],u=f((0,h.useState)(!1),2),p=u[0],d=u[1];(0,h.useEffect)(function(){var r;return n.map&&(void 0!==l?Promise.resolve(l):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then(function(t){return l="denied"!==t.state}):Promise.resolve(l=!!window.navigator.geolocation)).then(function(o){if(d(o),i.current){var a,s,u;a=i.current,(s=new(tP()).GeolocateControl(t))._container=th.createElement("div"),s._map={on:function(){},_getUIString:function(){return""}},s._setupUI(!0),s._map=n.map,s._geolocateButton=a,u=n.eventManager,s.options.trackUserLocation&&u&&u.on("panstart",function(){"ACTIVE_LOCK"===s._watchState&&(s._watchState="BACKGROUND",a.classList.add("mapboxgl-ctrl-geolocate-background"),a.classList.remove("mapboxgl-ctrl-geolocate-active"))}),s.on("geolocate",t.onGeolocate),(r=s)._updateCamera=function(t){var n,r,i,o,a,s,c,u,l,h,p,f;return n=e.context,r=e.props,i=new(tP()).LngLat(t.coords.longitude,t.coords.latitude),o=t.coords.accuracy,s=[[(a=i.toBounds(o))._ne.lng,a._ne.lat],[a._sw.lng,a._sw.lat]],u=(c=n.viewport.fitBounds(s,r.fitBoundsOptions)).longitude,l=c.latitude,h=c.zoom,p=Object.assign({},new tR(Object.assign({},n.viewport,{longitude:u,latitude:l,zoom:h})).getViewportProps(),eK),f=r.onViewportChange||n.onViewportChange||nF,void((r.onViewStateChange||n.onViewStateChange||nF)({viewState:p}),f(p))},c(r)}}),function(){r&&r._clearWatch()}},[n.map]);var v=(0,h.useCallback)(function(){s&&(s.options=e.props,s.trigger())},[s]);(0,h.useEffect)(function(){t.auto&&v()},[s,t.auto]),(0,h.useEffect)(function(){s&&s._onZoom()},[n.viewport.zoom]);var g=t.className,m=t.label,b=t.disabledLabel,y=t.trackUserLocation,w=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nz(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nz(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:w,className:g},h.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},h.createElement("button",{key:"geolocate",className:"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",ref:i,disabled:!p,"aria-pressed":!y,type:"button",title:p?m:b,"aria-label":p?m:b,onClick:v},h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}//# sourceMappingURL=version.js.map
function nU(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nB.propTypes=nV,nB.defaultProps=nZ,h.memo(nB);var nq=function(){},nW=Object.assign({},nc,{className:p.string,style:p.object,onViewStateChange:p.func,onViewportChange:p.func,showCompass:p.bool,showZoom:p.bool,zoomInLabel:p.string,zoomOutLabel:p.string,compassLabel:p.string}),nH=Object.assign({},ns,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"});function nX(t,e,n){var r=Object.assign({},new tR(Object.assign({},t.viewport,n)).getViewportProps(),eK),i=e.onViewportChange||t.onViewportChange||nq;(e.onViewStateChange||t.onViewStateChange||nq)({viewState:r}),i(r)}function nY(t,e,n,r){return h.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:n},r||h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}function nK(t){var e,n,r,i=nu(t),o=i.context,s=i.containerRef,c=t.className,u=t.showCompass,l=t.showZoom,p=t.zoomInLabel,f=t.zoomOutLabel,d=t.compassLabel,v=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nU(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nU(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:v,className:c},h.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:s},l&&nY("zoom-in",p,function(){nX(o,t,{zoom:o.viewport.zoom+1})}),l&&nY("zoom-out",f,function(){nX(o,t,{zoom:o.viewport.zoom-1})}),u&&nY("compass",d,function(){nX(o,t,{bearing:0,pitch:0})},(e=(0,h.useMemo)(function(){return o.map?//# sourceMappingURL=geolocate-control.js.map
function(t,e){for(var n=(t||"").split(".").map(Number),r=(e||"").split(".").map(Number),i=0;i<3;i++){var o=n[i]||0,a=r[i]||0;if(o<a)return -1;if(o>a)return 1}return 0}// CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/components/navigation-control.js
(o.map.version,"1.6.0")>=0?2:1:2},[o.map]),n=o.viewport.bearing,r={transform:"rotate(".concat(-n,"deg)")},2===e?h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:r}):h.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:r})))))}//# sourceMappingURL=navigation-control.js.map
function nG(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nK.propTypes=nW,nK.defaultProps=nH,h.memo(nK);var n$=Object.assign({},nc,{className:p.string,style:p.object,maxWidth:p.number,unit:p.oneOf(["imperial","metric","nautical"])}),nJ=Object.assign({},ns,{className:"",maxWidth:100,unit:"metric"});function nQ(t){var e=nu(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(null),2),o=i[0],s=i[1];(0,h.useEffect)(function(){if(n.map){var t=new(tP()).ScaleControl;t._map=n.map,t._container=r.current,s(t)}},[n.map]),o&&(o.options=t,o._onMove());var c=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nG(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nG(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:c,className:t.className},h.createElement("div",{ref:r,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}))}nQ.propTypes=n$,nQ.defaultProps=nJ,h.memo(nQ);//# sourceMappingURL=scale-control.js.map
var n0="undefined"!=typeof window&&window.devicePixelRatio||1;function n1(t){var e=nu(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(null),2),o=i[0],a=i[1];(0,h.useEffect)(function(){a(r.current.getContext("2d"))},[]);var s=n.viewport,c=n.isDragging;return o&&(o.save(),o.scale(n0,n0),t.redraw({width:s.width,height:s.height,ctx:o,isDragging:c,project:s.project,unproject:s.unproject}),o.restore()),h.createElement("canvas",{ref:r,width:s.width*n0,height:s.height*n0,style:{width:"".concat(s.width,"px"),height:"".concat(s.height,"px"),position:"absolute",left:0,top:0}})}//# sourceMappingURL=canvas-overlay.js.map
function n2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function n5(t){var e=nu(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?n2(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n2(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0,width:i.width,height:i.height},t.style);return h.createElement("div",{ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}//# sourceMappingURL=html-overlay.js.map
function n4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function n3(t){var e=nu(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?n4(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n4(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0},t.style);return h.createElement("svg",{width:i.width,height:i.height,ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}n1.propTypes=Object.assign({},nc,{redraw:p.func.isRequired}),n1.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1},n5.propTypes=Object.assign({},nc,{redraw:p.func.isRequired,style:p.object}),n5.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1},n3.propTypes=Object.assign({},nc,{redraw:p.func.isRequired,style:p.object}),n3.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1},tP()&&tP().setRTLTextPlugin;//# sourceMappingURL=set-rtl-text-plugin.js.map // CONCATENATED MODULE: ./node_modules/react-map-gl/dist/esm/index.js
//# sourceMappingURL=index.js.map
/***/}}]);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/feedback-mapbox/pages/index-d4b892cd7cdbfcba/input.js | JavaScript | (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[405],
{
/***/ 5301: /***/ function (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
) {
(window.__NEXT_P = window.__NEXT_P || []).push([
"/",
function () {
return __webpack_require__(5075);
},
]);
if (false) {
}
/***/
},
/***/ 5075: /***/ function (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
__webpack_require__(5893);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ =
__webpack_require__(7294);
/* harmony import */ var react_map_gl__WEBPACK_IMPORTED_MODULE_2__ =
__webpack_require__(6785);
/* harmony import */ var _styles_Home_module_css__WEBPACK_IMPORTED_MODULE_3__ =
__webpack_require__(214);
/* harmony import */ var _styles_Home_module_css__WEBPACK_IMPORTED_MODULE_3___default =
/*#__PURE__*/ __webpack_require__.n(
_styles_Home_module_css__WEBPACK_IMPORTED_MODULE_3__
);
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true,
});
} else {
obj[key] = value;
}
return obj;
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(
Object.getOwnPropertySymbols(source).filter(
function (sym) {
return Object.getOwnPropertyDescriptor(
source,
sym
).enumerable;
}
)
);
}
ownKeys.forEach(function (key) {
_defineProperty(target, key, source[key]);
});
}
return target;
}
var Home = function () {
var ref = (0, react__WEBPACK_IMPORTED_MODULE_1__.useState)({
width: 800,
height: 600,
latitude: 37.7577,
longitude: -122.4376,
zoom: 8,
}),
viewport = ref[0];
return /*#__PURE__*/ (0,
react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
className:
_styles_Home_module_css__WEBPACK_IMPORTED_MODULE_3___default()
.container,
children: /*#__PURE__*/ (0,
react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
react_map_gl__WEBPACK_IMPORTED_MODULE_2__ /* ["default"] */.ZP,
_objectSpread({}, viewport, {
// mapStyle="mapbox://styles/mapbox/dark-v9" // WORKS
mapStyle: "mapbox://styles/mapbox/dark-v10", // DOES NOT WORKS if swcMinify is `true`
mapboxApiAccessToken:
"pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg",
})
),
});
};
/* harmony default export */ __webpack_exports__["default"] = Home;
/***/
},
/***/ 214: /***/ function (module) {
// extracted by mini-css-extract-plugin
module.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 (__webpack_require__) {
// webpackRuntimeModules
/******/ var __webpack_exec__ = function (moduleId) {
return __webpack_require__((__webpack_require__.s = moduleId));
};
/******/ __webpack_require__.O(
0,
[634, 785, 774, 888, 179],
function () {
return __webpack_exec__(5301);
}
);
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
/******/
},
]);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/feedback-mapbox/pages/index-d4b892cd7cdbfcba/output.js | JavaScript | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{/***/5301:/***/function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return o(5075)}]);/***/},/***/5075:/***/function(e,t,o){"use strict";o.r(t);/* harmony import */var n=o(5893),r=o(7294),i=o(6785),_=o(214),c=/*#__PURE__*/o.n(_);/* harmony default export */t.default=function(){var e=(0,r.useState)({width:800,height:600,latitude:37.7577,longitude:-122.4376,zoom:8})[0];return/*#__PURE__*/(0,n.jsx)("div",{className:c().container,children:/*#__PURE__*/(0,n.jsx)(i/* ["default"] */.ZP,function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),n.forEach(function(t){var n;n=o[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e,{// mapStyle="mapbox://styles/mapbox/dark-v9" // WORKS
mapStyle:"mapbox://styles/mapbox/dark-v10",mapboxApiAccessToken:"pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg"}))})};/***/},/***/214:/***/function(e){// extracted by mini-css-extract-plugin
e.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(e){/******/e.O(0,[634,785,774,888,179],function(){return e(e.s=5301)}),/******/_N_E=e.O();/******/}]);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/helpers/1/input.js | JavaScript | function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
export default asyncGeneratorStep | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/helpers/1/output.js | JavaScript | export default function(e,r,t,n,o,a,u){try{var c=e[a](u),l=c.value}catch(e){t(e);return}c.done?r(l):Promise.resolve(l).then(n,o)}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issue-5912-bigdecimal/input.js | JavaScript |
(function (exports) {
if (typeof document === 'undefined')
var document = {};
if (typeof window === 'undefined')
var window = {};
if (!window.document)
window.document = document;
if (typeof navigator === 'undefined')
var navigator = {};
if (!navigator.userAgent)
navigator.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22';
function gwtapp() { };
(function () {
var $gwt_version = "2.4.0"; var $wnd = window; var $doc = $wnd.document; var $moduleName, $moduleBase; var $strongName = '4533928AF3A2228268FD8F10BB191446'; var $stats = $wnd.__gwtStatsEvent ? function (a) { return $wnd.__gwtStatsEvent(a); } : null; var $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $stats && $stats({ moduleName: 'gwtapp', sessionId: $sessionId, subSystem: 'startup', evtGroup: 'moduleStartup', millis: (new Date()).getTime(), type: 'moduleEvalStart' }); function H() { }
function P() { }
function O() { }
function N() { }
function M() { }
function rr() { }
function gb() { }
function ub() { }
function pb() { }
function Fb() { }
function Ab() { }
function Lb() { }
function Tb() { }
function Kb() { }
function Zb() { }
function _b() { }
function fc() { }
function ic() { }
function hc() { }
function Se() { }
function Re() { }
function Ze() { }
function Ye() { }
function Xe() { }
function Ah() { }
function Hh() { }
function Gh() { }
function Ej() { }
function Mj() { }
function Uj() { }
function _j() { }
function gk() { }
function mk() { }
function pk() { }
function wk() { }
function vk() { }
function Dk() { }
function Ik() { }
function Qk() { }
function Uk() { }
function il() { }
function ol() { }
function rl() { }
function Tl() { }
function Xl() { }
function km() { }
function om() { }
function Nn() { }
function Np() { }
function ep() { }
function dp() { }
function yp() { }
function yo() { }
function Zo() { }
function xp() { }
function Hp() { }
function Mp() { }
function Xp() { }
function bq() { }
function jq() { }
function qq() { }
function Dq() { }
function Hq() { }
function Nq() { }
function Qq() { }
function Zq() { }
function Yq() { }
function Yj() { Wj() }
function Ij() { Gj() }
function Eh() { Ch() }
function Ek() { Cb() }
function qk() { Cb() }
function Rk() { Cb() }
function Vk() { Cb() }
function jl() { Cb() }
function Oq() { Cb() }
function kk() { ik() }
function fm() { Yl(this) }
function gm() { Yl(this) }
function mg(a) { Hf(this, a) }
function mq(a) { this.c = a }
function bk(a) { this.b = a }
function Cp(a) { this.b = a }
function Sp(a) { this.b = a }
function V(a) { Cb(); this.f = a }
function nk(a) { V.call(this, a) }
function rk(a) { V.call(this, a) }
function Sk(a) { V.call(this, a) }
function Wk(a) { V.call(this, a) }
function kl(a) { V.call(this, a) }
function Yl(a) { a.b = new fc }
function Ul() { this.b = new fc }
function rb() { rb = rr; qb = new ub }
function lr() { lr = rr; kr = new gr }
function jr(a, b) { return b }
function ac(a, b) { a.b += b }
function bc(a, b) { a.b += b }
function cc(a, b) { a.b += b }
function dc(a, b) { a.b += b }
function or(a, b) { lr(); a[Ls] = b }
function nr(a, b) { lr(); ar(a, b) }
function _q(a, b, c) { rp(a.b, b, c) }
function Jg() { rf(); Hf(this, Tr) }
function pl(a) { Sk.call(this, a) }
function Hk(a) { return isNaN(a) }
function Jj(a) { return new Oi(a) }
function Zj(a) { return new Oj(a) }
function dl(a) { return a < 0 ? -a : a }
function hl(a, b) { return a < b ? a : b }
function gl(a, b) { return a > b ? a : b }
function xe(a, b) { return !we(a, b) }
function ye(a, b) { return !ve(a, b) }
function ir(a, b) { return new b(a) }
function Oj(a) { this.b = new Yn(a) }
function Nj() { this.b = (Un(), Rn) }
function ak() { this.b = (Qo(), Fo) }
function Wo() { Qo(); return zo }
function mr(a, b) { lr(); _q(kr, a, b) }
function br(a, b) { a[b] || (a[b] = {}) }
function kq(a) { return a.b < a.c.c }
function Vn(a) { return a.b << 3 | a.c.c }
function Mi(a) { return a.f * a.b[0] }
function Je(a) { return a.l | a.m << 22 }
function op(b, a) { return b.f[Qr + a] }
function Yp(a, b) { this.c = a; this.b = b }
function Ro(a, b) { this.b = a; this.c = b }
function Iq(a, b) { this.b = a; this.c = b }
function bm(a, b) { ac(a.b, b); return a }
function cm(a, b) { bc(a.b, b); return a }
function dm(a, b) { cc(a.b, b); return a }
function pr(a) { lr(); return er(kr, a) }
function qr(a) { lr(); return fr(kr, a) }
function Oi(a) { Oh(); oi.call(this, a) }
function Ni() { Oh(); oi.call(this, Tr) }
function cg(a) { dg.call(this, a, 0) }
function Kg(a) { mg.call(this, a.tS()) }
function el(a) { return Math.floor(a) }
function yl(b, a) { return b.indexOf(a) }
function qp(b, a) { return Qr + a in b.f }
function uc(a, b) { return a.cM && a.cM[b] }
function re(a, b) { return ee(a, b, false) }
function bn(a, b) { return cn(a.b, a.e, b) }
function ce(a) { return de(a.l, a.m, a.h) }
function Ac(a) { return a == null ? null : a }
function sf(a) { return a.r() < 0 ? Mf(a) : a }
function ob(a) { return a.$H || (a.$H = ++jb) }
function zc(a) { return a.tM == rr || tc(a, 1) }
function tc(a, b) { return a.cM && !!a.cM[b] }
function vl(b, a) { return b.charCodeAt(a) }
function hm(a) { Yl(this); cc(this.b, a) }
function oi(a) { Oh(); pi.call(this, a, 10) }
function Aq(a, b, c, d) { a.splice(b, c, d) }
function dq(a, b) { (a < 0 || a >= b) && hq(a, b) }
function xc(a, b) { return a != null && tc(a, b) }
function db(a) { return yc(a) ? Db(wc(a)) : Lr }
function Z(a) { return yc(a) ? $(wc(a)) : a + Lr }
function Fl(a) { return lc(Vd, { 6: 1 }, 1, a, 0) }
function vq() { this.b = lc(Td, { 6: 1 }, 0, 0, 0) }
function Pl() { Pl = rr; Ml = {}; Ol = {} }
function Yo() { Yo = rr; Xo = Jk((Qo(), zo)) }
function ik() { if (!hk) { hk = true; jk() } }
function Gj() { if (!Fj) { Fj = true; Hj() } }
function Wj() { if (!Vj) { Vj = true; new kk; Xj() } }
function gr() { this.b = new Fq; new Fq; new Fq }
function X(a) { Cb(); this.c = a; Bb(new Tb, this) }
function Pi(a) { Oh(); oi.call(this, Hm(a, 0)) }
function gg(a) { hg.call(this, a, 0, a.length) }
function fg(a, b) { cg.call(this, a); If(this, b) }
function ze(a, b) { ee(a, b, true); return ae }
function tq(a, b) { dq(b, a.c); return a.b[b] }
function rq(a, b) { nc(a.b, a.c++, b); return true }
function _l(a, b, c) { dc(a.b, Ll(b, 0, c)); return a }
function kb(a, b, c) { return a.apply(b, c); var d }
function em(a, b, c) { return ec(a.b, b, b, c), a }
function Af(a, b, c) { return yf(a, b, Bc(a.f), c) }
function xf(a, b, c) { return yf(a, b, Bc(a.f), Uo(c)) }
function Bl(c, a, b) { return c.substr(a, b - a) }
function Al(b, a) { return b.substr(a, b.length - a) }
function fl(a) { return Math.log(a) * Math.LOG10E }
function cb(a) { return a == null ? null : a.name }
function $(a) { return a == null ? null : a.message }
function yc(a) { return a != null && a.tM != rr && !tc(a, 1) }
function ec(a, b, c, d) { a.b = Bl(a.b, 0, b) + d + Al(a.b, c) }
function eg(a, b, c) { dg.call(this, a, b); If(this, c) }
function pg(a, b) { this.g = a; this.f = b; this.b = sg(a) }
function si(a, b, c) { Oh(); this.f = a; this.e = b; this.b = c }
function sl(a) { this.b = 'Unknown'; this.d = a; this.c = -1 }
function yk(a, b) { var c; c = new wk; c.d = a + b; return c }
function dr(a, b) { var c; c = mp(a.b, b); return wc(c) }
function fb(a) { var b; return b = a, zc(b) ? b.hC() : ob(b) }
function To(a) { Qo(); return Ok((Yo(), Xo), a) }
function qe(a, b) { return de(a.l & b.l, a.m & b.m, a.h & b.h) }
function De(a, b) { return de(a.l | b.l, a.m | b.m, a.h | b.h) }
function Le(a, b) { return de(a.l ^ b.l, a.m ^ b.m, a.h ^ b.h) }
function Bm(a, b) { return (a.b[~~b >> 5] & 1 << (b & 31)) != 0 }
function Cq(a, b) { var c; for (c = 0; c < b; ++c) { a[c] = false } }
function Lf(a, b, c) { var d; d = Kf(a, b); If(d, c); return d }
function zb(a, b) { a.length >= b && a.splice(0, b); return a }
function wb(a, b) { !a && (a = []); a[a.length] = b; return a }
function Ph(a, b) { if (mi(a, b)) { return tm(a, b) } return a }
function ii(a, b) { if (!mi(a, b)) { return tm(a, b) } return a }
function _d(a) { if (xc(a, 15)) { return a } return new X(a) }
function Eb() { try { null.a() } catch (a) { return a } }
function Ak(a) { var b; b = new wk; b.d = Lr + a; b.c = 1; return b }
function eb(a, b) { var c; return c = a, zc(c) ? c.eQ(b) : c === b }
function se(a, b) { return a.l == b.l && a.m == b.m && a.h == b.h }
function Ce(a, b) { return a.l != b.l || a.m != b.m || a.h != b.h }
function de(a, b, c) { return _ = new Se, _.l = a, _.m = b, _.h = c, _ }
function rp(a, b, c) { return !b ? tp(a, c) : sp(a, b, c, ~~ob(b)) }
function Eq(a, b) { return Ac(a) === Ac(b) || a != null && eb(a, b) }
function Xq(a, b) { return Ac(a) === Ac(b) || a != null && eb(a, b) }
function hq(a, b) { throw new Wk('Index: ' + a + ', Size: ' + b) }
function Xh(a, b) { if (b < 0) { throw new nk(ts) } return tm(a, b) }
function dg(a, b) { if (!a) { throw new jl } this.f = b; Tf(this, a) }
function og(a, b) { if (!a) { throw new jl } this.f = b; Tf(this, a) }
function ig(a, b, c, d) { hg.call(this, a, b, c); If(this, d) }
function jg(a, b) { hg.call(this, a, 0, a.length); If(this, b) }
function ng(a, b) { hg.call(this, Cl(a), 0, a.length); If(this, b) }
function lm(a) { V.call(this, 'String index out of range: ' + a) }
function Zl(a, b) { dc(a.b, String.fromCharCode(b)); return a }
function pn(a, b) { tn(a.b, a.b, a.e, b.b, b.e); Sh(a); a.c = -2 }
function Tf(a, b) { a.d = b; a.b = b.ab(); a.b < 54 && (a.g = Ie(ai(b))) }
function qc() { qc = rr; oc = []; pc = []; rc(new ic, oc, pc) }
function Ch() { if (!Bh) { Bh = true; new Yj; new Ij; Dh() } }
function Sl() { if (Nl == 256) { Ml = Ol; Ol = {}; Nl = 0 } ++Nl }
function cr(a) { var b; b = a[Ls]; if (!b) { b = []; a[Ls] = b } return b }
function zk(a, b, c) { var d; d = new wk; d.d = a + b; d.c = c ? 8 : 0; return d }
function xk(a, b, c) { var d; d = new wk; d.d = a + b; d.c = 4; d.b = c; return d }
function lc(a, b, c, d, e) { var f; f = jc(e, d); mc(a, b, c, f); return f }
function Ll(a, b, c) { var d; d = b + c; El(a.length, b, d); return Gl(a, b, d) }
function mo(a, b) { go(); return b < fo.length ? lo(a, fo[b]) : ei(a, po(b)) }
function me(a) { return a.l + a.m * 4194304 + a.h * 17592186044416 }
function vc(a, b) { if (a != null && !uc(a, b)) { throw new Ek } return a }
function lq(a) { if (a.b >= a.c.c) { throw new Oq } return tq(a.c, a.b++) }
function wl(a, b) { if (!xc(b, 1)) { return false } return String(a) == b }
function lb() { if (ib++ == 0) { sb((rb(), qb)); return true } return false }
function fi(a) { if (a.f < 0) { throw new nk('start < 0: ' + a) } return xo(a) }
function pm() { V.call(this, 'Add not supported on this collection') }
function Fq() { this.b = []; this.f = {}; this.d = false; this.c = null; this.e = 0 }
function qi(a, b) { Oh(); this.f = a; this.e = 1; this.b = mc(Od, { 6: 1 }, -1, [b]) }
function sc(a, b, c) { qc(); for (var d = 0, e = b.length; d < e; ++d) { a[b[d]] = c[d] } }
function xl(a, b, c, d) { var e; for (e = 0; e < b; ++e) { c[d++] = a.charCodeAt(e) } }
function Wh(a, b) { var c; for (c = a.e - 1; c >= 0 && a.b[c] == b[c]; --c) { } return c < 0 }
function tp(a, b) { var c; c = a.c; a.c = b; if (!a.d) { a.d = true; ++a.e } return c }
function $l(a, b) { dc(a.b, String.fromCharCode.apply(null, b)); return a }
function am(a, b, c, d) { b == null && (b = Mr); bc(a.b, b.substr(c, d - c)); return a }
function sn(a, b, c, d) { var e; e = lc(Od, { 6: 1 }, -1, b, 1); tn(e, a, b, c, d); return e }
function mc(a, b, c, d) { qc(); sc(d, oc, pc); d.aC = a; d.cM = b; d.qI = c; return d }
function uq(a, b, c) { for (; c < a.c; ++c) { if (Xq(b, a.b[c])) { return c } } return -1 }
function sq(a, b, c) { (b < 0 || b > a.c) && hq(b, a.c); Aq(a.b, b, 0, c); ++a.c }
function nn(a, b) { var c; c = on(a.b, a.e, b); if (c == 1) { a.b[a.e] = 1; ++a.e } a.c = -2 }
function Sh(a) { while (a.e > 0 && a.b[--a.e] == 0) { } a.b[a.e++] == 0 && (a.f = 0) }
function Gg(a) { if (we(a, ur) && xe(a, xr)) { return df[Je(a)] } return new qg(a, 0) }
function ji(a, b) { if (b == 0 || a.f == 0) { return a } return b > 0 ? wm(a, b) : zm(a, -b) }
function li(a, b) { if (b == 0 || a.f == 0) { return a } return b > 0 ? zm(a, b) : wm(a, -b) }
function $h(a) { var b; if (a.f == 0) { return -1 } b = Zh(a); return (b << 5) + _k(a.b[b]) }
function bl(a) { var b; b = Je(a); return b != 0 ? _k(b) : _k(Je(Fe(a, 32))) + 32 }
function Sb(a, b) { var c; c = Mb(a, b); return c.length == 0 ? (new Fb).o(b) : zb(c, 1) }
function Gl(a, b, c) { a = a.slice(b, c); return String.fromCharCode.apply(null, a) }
function rc(a, b, c) { var d = 0, e; for (var f in a) { if (e = a[f]) { b[d] = f; c[d] = e; ++d } } }
function up(e, a, b) { var c, d = e.f; a = Qr + a; a in d ? (c = d[a]) : ++e.e; d[a] = b; return c }
function gn(a, b, c, d) { var e; e = lc(Od, { 6: 1 }, -1, b + 1, 1); hn(e, a, b, c, d); return e }
function Cl(a) { var b, c; c = a.length; b = lc(Md, { 6: 1 }, -1, c, 1); xl(a, c, b, 0); return b }
function _e(a) { var b; b = bf(a); if (isNaN(b)) { throw new pl(Zr + a + $r) } return b }
function Fg(a) { if (!isFinite(a) || isNaN(a)) { throw new pl(hs) } return new mg(Lr + a) }
function wc(a) { if (a != null && (a.tM == rr || tc(a, 1))) { throw new Ek } return a }
function Qf(a, b) { var c; c = new og((!a.d && (a.d = Li(a.g)), a.d), a.f); If(c, b); return c }
function bg(a, b) { var c; c = new Pi(Zf(a)); if (sm(c) < b) { return ai(c) } throw new nk(cs) }
function ei(a, b) { if (b.f == 0) { return Nh } if (a.f == 0) { return Nh } return go(), ho(a, b) }
function bi(a, b) { var c; if (b.f <= 0) { throw new nk(us) } c = hi(a, b); return c.f < 0 ? fn(c, b) : c }
function Ip(a) { var b; b = new vq; a.d && rq(b, new Sp(a)); kp(a, b); jp(a, b); this.b = new mq(b) }
function lp(a, b) { return b == null ? a.d : xc(b, 1) ? qp(a, vc(b, 1)) : pp(a, b, ~~fb(b)) }
function mp(a, b) { return b == null ? a.c : xc(b, 1) ? op(a, vc(b, 1)) : np(a, b, ~~fb(b)) }
function Bc(a) { return ~~Math.max(Math.min(a, 2147483647), -2147483648) }
function qg(a, b) { this.f = b; this.b = tg(a); this.b < 54 ? (this.g = Ie(a)) : (this.d = Ki(a)) }
function kg(a) { if (!isFinite(a) || isNaN(a)) { throw new pl(hs) } Hf(this, a.toPrecision(20)) }
function mb(b) { return function () { try { return nb(b, this, arguments) } catch (a) { throw a } } }
function nb(a, b, c) { var d; d = lb(); try { return kb(a, b, c) } finally { d && tb((rb(), qb)); --ib } }
function Ok(a, b) { var c; c = a[Qr + b]; if (c) { return c } if (b == null) { throw new jl } throw new Rk }
function sb(a) { var b, c; if (a.b) { c = null; do { b = a.b; a.b = null; c = xb(b, c) } while (a.b); a.b = c } }
function tb(a) { var b, c; if (a.c) { c = null; do { b = a.c; a.c = null; c = xb(b, c) } while (a.c); a.c = c } }
function _k(a) { var b, c; if (a == 0) { return 32 } else { c = 0; for (b = 1; (b & a) == 0; b <<= 1) { ++c } return c } }
function Jk(a) { var b, c, d, e; b = {}; for (d = 0, e = a.length; d < e; ++d) { c = a[d]; b[Qr + c.b] = c } return b }
function Rb(a) { var b; b = zb(Sb(a, Eb()), 3); b.length == 0 && (b = zb((new Fb).k(), 1)); return b }
function Wn(a) { var b; b = new gm; $l(b, Sn); bm(b, a.b); b.b.b += ys; $l(b, Tn); cm(b, a.c); return b.b.b }
function Rh(a) { var b; b = lc(Od, { 6: 1 }, -1, a.e, 1); nm(a.b, 0, b, 0, a.e); return new si(a.f, a.e, b) }
function Bf(a, b) { var c; c = lc(Wd, { 6: 1 }, 16, 2, 0); nc(c, 0, Df(a, b)); nc(c, 1, Xf(a, Kf(c[0], b))); return c }
function Cf(a, b, c) { var d; d = lc(Wd, { 6: 1 }, 16, 2, 0); nc(d, 0, Ef(a, b, c)); nc(d, 1, Xf(a, Kf(d[0], b))); return d }
function $o(a, b) { var c; while (a.Pb()) { c = a.Qb(); if (b == null ? c == null : eb(b, c)) { return a } } return null }
function Zh(a) { var b; if (a.c == -2) { if (a.f == 0) { b = -1 } else { for (b = 0; a.b[b] == 0; ++b) { } } a.c = b } return a.c }
function bb(a) { var b; return a == null ? Mr : yc(a) ? cb(wc(a)) : xc(a, 1) ? Nr : (b = a, zc(b) ? b.gC() : Gc).d }
function Uf(a) { if (a.b < 54) { return a.g < 0 ? -1 : a.g > 0 ? 1 : 0 } return (!a.d && (a.d = Li(a.g)), a.d).r() }
function Mf(a) { if (a.b < 54) { return new pg(-a.g, a.f) } return new og((!a.d && (a.d = Li(a.g)), a.d).cb(), a.f) }
function El(a, b, c) { if (b < 0) { throw new lm(b) } if (c < b) { throw new lm(c - b) } if (c > a) { throw new lm(c) } }
function lg(a, b) { if (!isFinite(a) || isNaN(a)) { throw new pl(hs) } Hf(this, a.toPrecision(20)); If(this, b) }
function Gk(a, b) { if (isNaN(a)) { return isNaN(b) ? 0 : 1 } else if (isNaN(b)) { return -1 } return a < b ? -1 : a > b ? 1 : 0 }
function uk(a, b) { if (b < 2 || b > 36) { return 0 } if (a < 0 || a >= b) { return 0 } return a < 10 ? 48 + a & 65535 : 97 + a - 10 & 65535 }
function er(a, b) { var c; if (!b) { return null } c = b[Ls]; if (c) { return c } c = ir(b, dr(a, b.gC())); b[Ls] = c; return c }
function ke(a) { var b, c; c = $k(a.h); if (c == 32) { b = $k(a.m); return b == 32 ? $k(a.l) + 32 : b + 20 - 10 } else { return c - 12 } }
function be(a) { var b, c, d; b = a & 4194303; c = ~~a >> 22 & 4194303; d = a < 0 ? 1048575 : 0; return de(b, c, d) }
function Qe() { Qe = rr; Me = de(4194303, 4194303, 524287); Ne = de(0, 0, 524288); Oe = ue(1); ue(2); Pe = ue(0) }
function mn(a, b) { hn(a.b, a.b, a.e, b.b, b.e); a.e = hl(gl(a.e, b.e) + 1, a.b.length); Sh(a); a.c = -2 }
function um(a, b) { var c; c = ~~b >> 5; a.e += c + ($k(a.b[a.e - 1]) - (b & 31) >= 0 ? 0 : 1); xm(a.b, a.b, c, b & 31); Sh(a); a.c = -2 }
function Tm(a, b) { var c, d; c = ~~b >> 5; if (a.e < c || a.ab() <= b) { return } d = 32 - (b & 31); a.e = c + 1; a.b[c] &= d < 32 ? ~~-1 >>> d : 0; Sh(a) }
function ai(a) { var b; b = a.e > 1 ? De(Ee(ue(a.b[1]), 32), qe(ue(a.b[0]), yr)) : qe(ue(a.b[0]), yr); return Ae(ue(a.f), b) }
function jn(a, b, c) { var d; for (d = c - 1; d >= 0 && a[d] == b[d]; --d) { } return d < 0 ? 0 : xe(qe(ue(a[d]), yr), qe(ue(b[d]), yr)) ? -1 : 1 }
function ym(a, b, c) { var d, e, f; d = 0; for (e = 0; e < c; ++e) { f = b[e]; a[e] = f << 1 | d; d = ~~f >>> 31 } d != 0 && (a[c] = d) }
function ge(a, b, c, d, e) { var f; f = Fe(a, b); c && je(f); if (e) { a = ie(a, b); d ? (ae = Be(a)) : (ae = de(a.l, a.m, a.h)) } return f }
function gwtOnLoad(b, c, d, e) { $moduleName = c; $moduleBase = d; if (b) try { Jr($d)() } catch (a) { b(c) } else { Jr($d)() } }
function fr(a, b) { var c, d, e; if (b == null) { return null } d = cr(b); e = d; for (c = 0; c < b.length; ++c) { e[c] = er(a, b[c]) } return d }
function Mb(a, b) { var c, d, e; e = b && b.stack ? b.stack.split('\n') : []; for (c = 0, d = e.length; c < d; ++c) { e[c] = a.n(e[c]) } return e }
function Um(a, b) { var c, d; d = ~~b >> 5 == a.e - 1 && a.b[a.e - 1] == 1 << (b & 31); if (d) { for (c = 0; d && c < a.e - 1; ++c) { d = a.b[c] == 0 } } return d }
function _h(a) { var b; if (a.d != 0) { return a.d } for (b = 0; b < a.b.length; ++b) { a.d = a.d * 33 + (a.b[b] & -1) } a.d = a.d * a.f; return a.d }
function Hg(a, b) { if (b == 0) { return Gg(a) } if (se(a, ur) && b >= 0 && b < pf.length) { return pf[b] } return new qg(a, b) }
function Ig(a) { if (a == Bc(a)) { return Hg(ur, Bc(a)) } if (a >= 0) { return new qg(ur, 2147483647) } return new qg(ur, -2147483648) }
function Li(a) { Oh(); if (a < 0) { if (a != -1) { return new ui(-1, -a) } return Ih } else return a <= 10 ? Kh[Bc(a)] : new ui(1, a) }
function zg(a) { var b = qf; !b && (b = qf = /^[+-]?\d*$/i); if (b.test(a)) { return parseInt(a, 10) } else { return Number.NaN } }
function kp(e, a) { var b = e.f; for (var c in b) { if (c.charCodeAt(0) == 58) { var d = new Yp(e, c.substring(1)); a.Kb(d) } } }
function Rl(a) { Pl(); var b = Qr + a; var c = Ol[b]; if (c != null) { return c } c = Ml[b]; c == null && (c = Ql(a)); Sl(); return Ol[b] = c }
function Be(a) { var b, c, d; b = ~a.l + 1 & 4194303; c = ~a.m + (b == 0 ? 1 : 0) & 4194303; d = ~a.h + (b == 0 && c == 0 ? 1 : 0) & 1048575; return de(b, c, d) }
function je(a) { var b, c, d; b = ~a.l + 1 & 4194303; c = ~a.m + (b == 0 ? 1 : 0) & 4194303; d = ~a.h + (b == 0 && c == 0 ? 1 : 0) & 1048575; a.l = b; a.m = c; a.h = d }
function Q(a) { var b, c, d; c = lc(Ud, { 6: 1 }, 13, a.length, 0); for (d = 0, b = a.length; d < b; ++d) { if (!a[d]) { throw new jl } c[d] = a[d] } }
function Cb() { var a, b, c, d; c = Rb(new Tb); d = lc(Ud, { 6: 1 }, 13, c.length, 0); for (a = 0, b = d.length; a < b; ++a) { d[a] = new sl(c[a]) } Q(d) }
function fk() { var a, b, c; c = (Qo(), Qo(), zo); b = lc(Sd, { 6: 1 }, 5, c.length, 0); for (a = 0; a < c.length; ++a)b[a] = new bk(c[a]); return b }
function ki(a) { var b, c, d, e; return a.f == 0 ? a : (e = a.e, c = e + 1, b = lc(Od, { 6: 1 }, -1, c, 1), ym(b, a.b, e), d = new si(a.f, c, b), Sh(d), d) }
function Ym(a, b, c, d) { var e, f; e = c.e; f = lc(Od, { 6: 1 }, -1, (e << 1) + 1, 1); io(a.b, hl(e, a.e), b.b, hl(e, b.e), f); Zm(f, c, d); return Pm(f, c) }
function Vh(a, b) { var c; if (a === b) { return true } if (xc(b, 17)) { c = vc(b, 17); return a.f == c.f && a.e == c.e && Wh(a, c.b) } return false }
function Zk(a) { var b; if (a < 0) { return -2147483648 } else if (a == 0) { return 0 } else { for (b = 1073741824; (b & a) == 0; b >>= 1) { } return b } }
function sm(a) { var b, c, d; if (a.f == 0) { return 0 } b = a.e << 5; c = a.b[a.e - 1]; if (a.f < 0) { d = Zh(a); d == a.e - 1 && (c = ~~(c - 1)) } b -= $k(c); return b }
function io(a, b, c, d, e) { go(); if (b == 0 || d == 0) { return } b == 1 ? (e[d] = ko(e, c, d, a[0])) : d == 1 ? (e[b] = ko(e, a, b, c[0])) : jo(a, c, e, b, d) }
function en(a, b, c, d, e) { var f, g; g = a; for (f = c.ab() - 1; f >= 0; --f) { g = Ym(g, g, d, e); (c.b[~~f >> 5] & 1 << (f & 31)) != 0 && (g = Ym(g, b, d, e)) } return g }
function on(a, b, c) { var d, e; d = qe(ue(c), yr); for (e = 0; Ce(d, ur) && e < b; ++e) { d = pe(d, qe(ue(a[e]), yr)); a[e] = Je(d); d = Fe(d, 32) } return Je(d) }
function hg(b, c, d) { var a, e; try { Hf(this, Ll(b, c, d)) } catch (a) { a = _d(a); if (xc(a, 14)) { e = a; throw new pl(e.f) } else throw a } }
function Dg(a) { if (a < -2147483648) { throw new nk('Overflow') } else if (a > 2147483647) { throw new nk('Underflow') } else { return Bc(a) } }
function Xn(a, b) { Un(); if (a < 0) { throw new Sk('Digits < 0') } if (!b) { throw new kl('null RoundingMode') } this.b = a; this.c = b }
function Ki(a) { Oh(); if (xe(a, ur)) { if (Ce(a, wr)) { return new ti(-1, Be(a)) } return Ih } else return ye(a, tr) ? Kh[Je(a)] : new ti(1, a) }
function tg(a) { var b; xe(a, ur) && (a = de(~a.l & 4194303, ~a.m & 4194303, ~a.h & 1048575)); return 64 - (b = Je(Fe(a, 32)), b != 0 ? $k(b) : $k(Je(a)) + 32) }
function pe(a, b) { var c, d, e; c = a.l + b.l; d = a.m + b.m + (~~c >> 22); e = a.h + b.h + (~~d >> 22); return de(c & 4194303, d & 4194303, e & 1048575) }
function He(a, b) { var c, d, e; c = a.l - b.l; d = a.m - b.m + (~~c >> 22); e = a.h - b.h + (~~d >> 22); return de(c & 4194303, d & 4194303, e & 1048575) }
function Sm(a, b) { var c; c = b - 1; if (a.f > 0) { while (!a.gb(c)) { --c } return b - 1 - c } else { while (a.gb(c)) { --c } return b - 1 - gl(c, a.bb()) } }
function fe(a, b) { if (a.h == 524288 && a.m == 0 && a.l == 0) { b && (ae = de(0, 0, 0)); return ce((Qe(), Oe)) } b && (ae = de(a.l, a.m, a.h)); return de(0, 0, 0) }
function Ff(a, b) { var c; if (a === b) { return true } if (xc(b, 16)) { c = vc(b, 16); return c.f == a.f && (a.b < 54 ? c.g == a.g : a.d.eQ(c.d)) } return false }
function cn(a, b, c) { var d, e, f, g; f = ur; for (d = b - 1; d >= 0; --d) { g = pe(Ee(f, 32), qe(ue(a[d]), yr)); e = Nm(g, c); f = ue(Je(Fe(e, 32))) } return Je(f) }
function wm(a, b) { var c, d, e, f; c = ~~b >> 5; b &= 31; e = a.e + c + (b == 0 ? 0 : 1); d = lc(Od, { 6: 1 }, -1, e, 1); xm(d, a.b, c, b); f = new si(a.f, e, d); Sh(f); return f }
function ue(a) { var b, c; if (a > -129 && a < 128) { b = a + 128; oe == null && (oe = lc(Pd, { 6: 1 }, 2, 256, 0)); c = oe[b]; !c && (c = oe[b] = be(a)); return c } return be(a) }
function Ai(a) { Oh(); var b, c, d; if (a < Mh.length) { return Mh[a] } c = ~~a >> 5; b = a & 31; d = lc(Od, { 6: 1 }, -1, c + 1, 1); d[c] = 1 << b; return new si(1, c + 1, d) }
function ri(a) { Oh(); if (a.length == 0) { this.f = 0; this.e = 1; this.b = mc(Od, { 6: 1 }, -1, [0]) } else { this.f = 1; this.e = a.length; this.b = a; Sh(this) } }
function Dl(c) { if (c.length == 0 || c[0] > ys && c[c.length - 1] > ys) { return c } var a = c.replace(/^(\s*)/, Lr); var b = a.replace(/\s*$/, Lr); return b }
function Yk(a) { a -= ~~a >> 1 & 1431655765; a = (~~a >> 2 & 858993459) + (a & 858993459); a = (~~a >> 4) + a & 252645135; a += ~~a >> 8; a += ~~a >> 16; return a & 63 }
function nc(a, b, c) { if (c != null) { if (a.qI > 0 && !uc(c, a.qI)) { throw new qk } if (a.qI < 0 && (c.tM == rr || tc(c, 1))) { throw new qk } } return a[b] = c }
function Qh(a, b) { if (a.f > b.f) { return 1 } if (a.f < b.f) { return -1 } if (a.e > b.e) { return a.f } if (a.e < b.e) { return -b.f } return a.f * jn(a.b, b.b, a.e) }
function Rf(a, b) { var c; c = a.f - b; if (a.b < 54) { if (a.g == 0) { return Ig(c) } return new pg(a.g, Dg(c)) } return new dg((!a.d && (a.d = Li(a.g)), a.d), Dg(c)) }
function jp(i, a) { var b = i.b; for (var c in b) { var d = parseInt(c, 10); if (c == d) { var e = b[d]; for (var f = 0, g = e.length; f < g; ++f) { a.Kb(e[f]) } } } }
function np(i, a, b) { var c = i.b[b]; if (c) { for (var d = 0, e = c.length; d < e; ++d) { var f = c[d]; var g = f.Rb(); if (i.Ob(a, g)) { return f.Sb() } } } return null }
function pp(i, a, b) { var c = i.b[b]; if (c) { for (var d = 0, e = c.length; d < e; ++d) { var f = c[d]; var g = f.Rb(); if (i.Ob(a, g)) { return true } } } return false }
function Bq(a, b) { var c, d, e, f; d = 0; c = a.length - 1; while (d <= c) { e = d + (~~(c - d) >> 1); f = a[e]; if (f < b) { d = e + 1 } else if (f > b) { c = e - 1 } else { return e } } return -d - 1 }
function Pk(a) { var b; b = _e(a); if (b > 3.4028234663852886E38) { return Infinity } else if (b < -3.4028234663852886E38) { return -Infinity } return b }
function Ie(a) { if (se(a, (Qe(), Ne))) { return -9223372036854775808 } if (!we(a, Pe)) { return -me(Be(a)) } return a.l + a.m * 4194304 + a.h * 17592186044416 }
function Bb(a, b) { var c, d, e, f; e = Sb(a, yc(b.c) ? wc(b.c) : null); f = lc(Ud, { 6: 1 }, 13, e.length, 0); for (c = 0, d = f.length; c < d; ++c) { f[c] = new sl(e[c]) } Q(f) }
function yb(a) { var b, c, d; d = Lr; a = Dl(a); b = a.indexOf(Or); if (b != -1) { c = a.indexOf('function') == 0 ? 8 : 0; d = Dl(a.substr(c, b - c)) } return d.length > 0 ? d : Pr }
function ie(a, b) { var c, d, e; if (b <= 22) { c = a.l & (1 << b) - 1; d = e = 0 } else if (b <= 44) { c = a.l; d = a.m & (1 << b - 22) - 1; e = 0 } else { c = a.l; d = a.m; e = a.h & (1 << b - 44) - 1 } return de(c, d, e) }
function Db(b) { var c = Lr; try { for (var d in b) { if (d != 'name' && d != 'message' && d != 'toString') { try { c += '\n ' + d + Kr + b[d] } catch (a) { } } } } catch (a) { } return c }
function ti(a, b) { this.f = a; if (se(qe(b, zr), ur)) { this.e = 1; this.b = mc(Od, { 6: 1 }, -1, [Je(b)]) } else { this.e = 2; this.b = mc(Od, { 6: 1 }, -1, [Je(b), Je(Fe(b, 32))]) } }
function ui(a, b) { this.f = a; if (b < 4294967296) { this.e = 1; this.b = mc(Od, { 6: 1 }, -1, [~~b]) } else { this.e = 2; this.b = mc(Od, { 6: 1 }, -1, [~~(b % 4294967296), ~~(b / 4294967296)]) } }
function Xm(a, b) { var c, d; d = new ri(lc(Od, { 6: 1 }, -1, 1 << b, 1)); d.e = 1; d.b[0] = 1; d.f = 1; for (c = 1; c < b; ++c) { Bm(ei(a, d), c) && (d.b[~~c >> 5] |= 1 << (c & 31)) } return d }
function Jm(a) { var b, c, d; b = qe(ue(a.b[0]), yr); c = sr; d = vr; do { Ce(qe(Ae(b, c), d), ur) && (c = De(c, d)); d = Ee(d, 1) } while (xe(d, Fr)); c = Be(c); return Je(qe(c, yr)) }
function Gm(a) { var b, c, d; if (we(a, ur)) { c = re(a, Ar); d = ze(a, Ar) } else { b = Ge(a, 1); c = re(b, Br); d = ze(b, Br); d = pe(Ee(d, 1), qe(a, sr)) } return De(Ee(d, 32), qe(c, yr)) }
function ko(a, b, c, d) { go(); var e, f; e = ur; for (f = 0; f < c; ++f) { e = pe(Ae(qe(ue(b[f]), yr), qe(ue(d), yr)), qe(ue(Je(e)), yr)); a[f] = Je(e); e = Ge(e, 32) } return Je(e) }
function _m(a, b, c) { var d, e, f, g, i; e = c.e << 5; d = bi(a.eb(e), c); i = bi(Ai(e), c); f = Jm(c); c.e == 1 ? (g = en(i, d, b, c, f)) : (g = dn(i, d, b, c, f)); return Ym(g, (Oh(), Jh), c, f) }
function Om(a, b, c) { var d, e, f, g, i, j; d = c.bb(); e = c.fb(d); g = _m(a, b, e); i = an(a, b, d); f = Xm(e, d); j = ei(rn(i, g), f); Tm(j, d); j.f < 0 && (j = fn(j, Ai(d))); return fn(g, ei(e, j)) }
function xb(b, c) { var a, d, e, f; for (d = 0, e = b.length; d < e; ++d) { f = b[d]; try { f[1] ? f[0].Ub() && (c = wb(c, f)) : f[0].Ub() } catch (a) { a = _d(a); if (!xc(a, 12)) throw a } } return c }
function bf(a) { var b = $e; !b && (b = $e = /^\s*[+-]?((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?\s*$/i); if (b.test(a)) { return parseFloat(a) } else { return Number.NaN } }
function pi(a, b) { if (a == null) { throw new jl } if (b < 2 || b > 36) { throw new pl('Radix out of range') } if (a.length == 0) { throw new pl('Zero length BigInteger') } Ei(this, a, b) }
function Vq() { Uq(); var a, b, c; c = Tq++ + (new Date).getTime(); a = Bc(Math.floor(c * 5.9604644775390625E-8)) & 16777215; b = Bc(c - a * 16777216); this.b = a ^ 1502; this.c = b ^ 15525485 }
function un(a, b, c, d) { var e; if (c > d) { return 1 } else if (c < d) { return -1 } else { for (e = c - 1; e >= 0 && a[e] == b[e]; --e) { } return e < 0 ? 0 : xe(qe(ue(a[e]), yr), qe(ue(b[e]), yr)) ? -1 : 1 } }
function In(a, b) { var c, d, e, f; e = a.e; d = lc(Od, { 6: 1 }, -1, e, 1); hl(Zh(a), Zh(b)); for (c = 0; c < b.e; ++c) { d[c] = a.b[c] | b.b[c] } for (; c < e; ++c) { d[c] = a.b[c] } f = new si(1, e, d); return f }
function Mn(a, b) { var c, d, e, f; e = a.e; d = lc(Od, { 6: 1 }, -1, e, 1); c = hl(Zh(a), Zh(b)); for (; c < b.e; ++c) { d[c] = a.b[c] ^ b.b[c] } for (; c < a.e; ++c) { d[c] = a.b[c] } f = new si(1, e, d); Sh(f); return f }
function Bn(a, b) { var c, d, e, f; e = lc(Od, { 6: 1 }, -1, a.e, 1); d = hl(a.e, b.e); for (c = Zh(a); c < d; ++c) { e[c] = a.b[c] & ~b.b[c] } for (; c < a.e; ++c) { e[c] = a.b[c] } f = new si(1, a.e, e); Sh(f); return f }
function Dn(a, b) { var c, d, e, f; e = hl(a.e, b.e); c = gl(Zh(a), Zh(b)); if (c >= e) { return Oh(), Nh } d = lc(Od, { 6: 1 }, -1, e, 1); for (; c < e; ++c) { d[c] = a.b[c] & b.b[c] } f = new si(1, e, d); Sh(f); return f }
function Nf(a, b) { var c; if (b == 0) { return lf } if (b < 0 || b > 999999999) { throw new nk(bs) } c = a.f * b; return a.b == 0 && a.g != -1 ? Ig(c) : new dg((!a.d && (a.d = Li(a.g)), a.d).db(b), Dg(c)) }
function tk(a, b) { if (b < 2 || b > 36) { return -1 } if (a >= 48 && a < 48 + (b < 10 ? b : 10)) { return a - 48 } if (a >= 97 && a < b + 97 - 10) { return a - 97 + 10 } if (a >= 65 && a < b + 65 - 10) { return a - 65 + 10 } return -1 }
function Uq() { Uq = rr; var a, b, c; Rq = lc(Nd, { 6: 1 }, -1, 25, 1); Sq = lc(Nd, { 6: 1 }, -1, 33, 1); c = 1.52587890625E-5; for (a = 32; a >= 0; --a) { Sq[a] = c; c *= 0.5 } b = 1; for (a = 24; a >= 0; --a) { Rq[a] = b; b *= 0.5 } }
function oo(a, b) { go(); var c, d; d = (Oh(), Jh); c = a; for (; b > 1; b >>= 1) { (b & 1) != 0 && (d = ei(d, c)); c.e == 1 ? (c = ei(c, c)) : (c = new ri(qo(c.b, c.e, lc(Od, { 6: 1 }, -1, c.e << 1, 1)))) } d = ei(d, c); return d }
function nl() { nl = rr; ml = mc(Md, { 6: 1 }, -1, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122]) }
function rm(a) { var b, c; b = 0; if (a.f == 0) { return 0 } c = Zh(a); if (a.f > 0) { for (; c < a.e; ++c) { b += Yk(a.b[c]) } } else { b += Yk(-a.b[c]); for (++c; c < a.e; ++c) { b += Yk(~a.b[c]) } b = (a.e << 5) - b } return b }
function ne(a, b) { var c, d, e; e = a.h - b.h; if (e < 0) { return false } c = a.l - b.l; d = a.m - b.m + (~~c >> 22); e += ~~d >> 22; if (e < 0) { return false } a.l = c & 4194303; a.m = d & 4194303; a.h = e & 1048575; return true }
function al(a) { var b, c, d; b = lc(Md, { 6: 1 }, -1, 8, 1); c = (nl(), ml); d = 7; if (a >= 0) { while (a > 15) { b[d--] = c[a & 15]; a >>= 4 } } else { while (d > 0) { b[d--] = c[a & 15]; a >>= 4 } } b[d] = c[a & 15]; return Gl(b, d, 8) }
function vn(a, b) { if (b.f == 0 || a.f == 0) { return Oh(), Nh } if (Vh(b, (Oh(), Ih))) { return a } if (Vh(a, Ih)) { return b } return a.f > 0 ? b.f > 0 ? Dn(a, b) : wn(a, b) : b.f > 0 ? wn(b, a) : a.e > b.e ? xn(a, b) : xn(b, a) }
function yn(a, b) { if (b.f == 0) { return a } if (a.f == 0) { return Oh(), Nh } if (Vh(a, (Oh(), Ih))) { return new Pi(En(b)) } if (Vh(b, Ih)) { return Nh } return a.f > 0 ? b.f > 0 ? Bn(a, b) : Cn(a, b) : b.f > 0 ? An(a, b) : zn(a, b) }
function Gf(a) { var b; if (a.c != 0) { return a.c } if (a.b < 54) { b = te(a.g); a.c = Je(qe(b, wr)); a.c = 33 * a.c + Je(qe(Fe(b, 32), wr)); a.c = 17 * a.c + Bc(a.f); return a.c } a.c = 17 * a.d.hC() + Bc(a.f); return a.c }
function vg(a, b, c, d) { var e, f, g, i, j; f = (j = a / b, j > 0 ? Math.floor(j) : Math.ceil(j)); g = a % b; i = Gk(a * b, 0); if (g != 0) { e = Gk((g <= 0 ? 0 - g : g) * 2, b <= 0 ? 0 - b : b); f += Bg(Bc(f) & 1, i * (5 + e), d) } return new pg(f, c) }
function jc(a, b) { var c = new Array(b); if (a == 3) { for (var d = 0; d < b; ++d) { var e = new Object; e.l = e.m = e.h = 0; c[d] = e } } else if (a > 0) { var e = [null, 0, false][a]; for (var d = 0; d < b; ++d) { c[d] = e } } return c }
function tn(a, b, c, d, e) { var f, g; f = ur; for (g = 0; g < e; ++g) { f = pe(f, He(qe(ue(b[g]), yr), qe(ue(d[g]), yr))); a[g] = Je(f); f = Fe(f, 32) } for (; g < c; ++g) { f = pe(f, qe(ue(b[g]), yr)); a[g] = Je(f); f = Fe(f, 32) } }
function xm(a, b, c, d) { var e, f; if (d == 0) { nm(b, 0, a, c, a.length - c) } else { f = 32 - d; a[a.length - 1] = 0; for (e = a.length - 1; e > c; --e) { a[e] |= ~~b[e - c - 1] >>> f; a[e - 1] = b[e - c - 1] << d } } for (e = 0; e < c; ++e) { a[e] = 0 } }
function rg(a, b, c) { if (c < hf.length && gl(a.b, b.b + jf[Bc(c)]) + 1 < 54) { return new pg(a.g + b.g * hf[Bc(c)], a.f) } return new og(fn((!a.d && (a.d = Li(a.g)), a.d), mo((!b.d && (b.d = Li(b.g)), b.d), Bc(c))), a.f) }
function Ue(a) { return $stats({ moduleName: $moduleName, sessionId: $sessionId, subSystem: 'startup', evtGroup: 'moduleStartup', millis: (new Date).getTime(), type: 'onModuleLoadStart', className: a }) }
function vm(a, b) { var c, d, e; e = a.r(); if (b == 0 || a.r() == 0) { return } d = ~~b >> 5; a.e -= d; if (!Am(a.b, a.e, a.b, d, b & 31) && e < 0) { for (c = 0; c < a.e && a.b[c] == -1; ++c) { a.b[c] = 0 } c == a.e && ++a.e; ++a.b[c] } Sh(a); a.c = -2 }
function ve(a, b) { var c, d; c = ~~a.h >> 19; d = ~~b.h >> 19; return c == 0 ? d != 0 || a.h > b.h || a.h == b.h && a.m > b.m || a.h == b.h && a.m == b.m && a.l > b.l : !(d == 0 || a.h < b.h || a.h == b.h && a.m < b.m || a.h == b.h && a.m == b.m && a.l <= b.l) }
function we(a, b) { var c, d; c = ~~a.h >> 19; d = ~~b.h >> 19; return c == 0 ? d != 0 || a.h > b.h || a.h == b.h && a.m > b.m || a.h == b.h && a.m == b.m && a.l >= b.l : !(d == 0 || a.h < b.h || a.h == b.h && a.m < b.m || a.h == b.h && a.m == b.m && a.l < b.l) }
function Rm(a, b) { var c, d, e; c = bl(a); d = bl(b); e = c < d ? c : d; c != 0 && (a = Ge(a, c)); d != 0 && (b = Ge(b, d)); do { if (we(a, b)) { a = He(a, b); a = Ge(a, bl(a)) } else { b = He(b, a); b = Ge(b, bl(b)) } } while (Ce(a, ur)); return Ee(b, e) }
function Fn(a, b) { if (Vh(b, (Oh(), Ih)) || Vh(a, Ih)) { return Ih } if (b.f == 0) { return a } if (a.f == 0) { return b } return a.f > 0 ? b.f > 0 ? a.e > b.e ? In(a, b) : In(b, a) : Gn(a, b) : b.f > 0 ? Gn(b, a) : Zh(b) > Zh(a) ? Hn(b, a) : Hn(a, b) }
function sg(a) { var b, c; if (a > -140737488355328 && a < 140737488355328) { if (a == 0) { return 0 } b = a < 0; b && (a = -a); c = Bc(el(Math.log(a) / 0.6931471805599453)); (!b || a != Math.pow(2, c)) && ++c; return c } return tg(te(a)) }
function Yh(a, b) { var c, d; c = a._(); d = b._(); if (c.r() == 0) { return d } else if (d.r() == 0) { return c } if ((c.e == 1 || c.e == 2 && c.b[1] > 0) && (d.e == 1 || d.e == 2 && d.b[1] > 0)) { return Ki(Rm(ai(c), ai(d))) } return Qm(Rh(c), Rh(d)) }
function ci(a, b) { var c; if (b.f <= 0) { throw new nk(us) } if (!(a.gb(0) || b.gb(0))) { throw new nk(vs) } if (b.e == 1 && b.b[0] == 1) { return Nh } c = Wm(bi(a._(), b), b); if (c.f == 0) { throw new nk(vs) } c = a.f < 0 ? rn(b, c) : c; return c }
function Am(a, b, c, d, e) { var f, g, i; f = true; for (g = 0; g < d; ++g) { f = f & c[g] == 0 } if (e == 0) { nm(c, d, a, 0, b) } else { i = 32 - e; f = f & c[g] << i == 0; for (g = 0; g < b - 1; ++g) { a[g] = ~~c[g + d] >>> e | c[g + d + 1] << i } a[g] = ~~c[g + d] >>> e; ++g } return f }
function Ql(a) { var b, c, d, e; b = 0; d = a.length; e = d - 4; c = 0; while (c < e) { b = a.charCodeAt(c + 3) + 31 * (a.charCodeAt(c + 2) + 31 * (a.charCodeAt(c + 1) + 31 * (a.charCodeAt(c) + 31 * b))) | 0; c += 4 } while (c < d) { b = b * 31 + vl(a, c++) } return b | 0 }
function Pm(a, b) { var c, d, e, f, g; f = b.e; c = a[f] != 0; if (!c) { e = b.b; c = true; for (d = f - 1; d >= 0; --d) { if (a[d] != e[d]) { c = a[d] != 0 && ve(qe(ue(a[d]), yr), qe(ue(e[d]), yr)); break } } } g = new si(1, f + 1, a); c && pn(g, b); Sh(g); return g }
function Kf(a, b) { var c; c = a.f + b.f; if (a.b == 0 && a.g != -1 || b.b == 0 && b.g != -1) { return Ig(c) } if (a.b + b.b < 54) { return new pg(a.g * b.g, Dg(c)) } return new dg(ei((!a.d && (a.d = Li(a.g)), a.d), (!b.d && (b.d = Li(b.g)), b.d)), Dg(c)) }
function sp(k, a, b, c) { var d = k.b[c]; if (d) { for (var e = 0, f = d.length; e < f; ++e) { var g = d[e]; var i = g.Rb(); if (k.Ob(a, i)) { var j = g.Sb(); g.Tb(b); return j } } } else { d = k.b[c] = [] } var g = new Iq(a, b); d.push(g); ++k.e; return null }
function an(a, b, c) { var d, e, f, g, i; g = (Oh(), Jh); e = Rh(b); d = Rh(a); a.gb(0) && Tm(e, c - 1); Tm(d, c); for (f = e.ab() - 1; f >= 0; --f) { i = Rh(g); Tm(i, c); g = ei(g, i); if ((e.b[~~f >> 5] & 1 << (f & 31)) != 0) { g = ei(g, d); Tm(g, c) } } Tm(g, c); return g }
function ar(a, b) { var c, d, e, f, g, i, j; j = zl(a, Ks, 0); i = $wnd; for (g = 0; g < j.length; ++g) { if (!wl(j[g], 'client')) { br(i, j[g]); i = i[j[g]] } } c = zl(b, Ks, 0); for (e = 0, f = c.length; e < f; ++e) { d = c[e]; if (!wl(Dl(d), Lr)) { br(i, d); i = i[d] } } }
function gi(a, b) { var c; if (b < 0) { throw new nk('Negative exponent') } if (b == 0) { return Jh } else if (b == 1 || a.eQ(Jh) || a.eQ(Nh)) { return a } if (!a.gb(0)) { c = 1; while (!a.gb(c)) { ++c } return ei(Ai(c * b), a.fb(c).db(b)) } return oo(a, b) }
function Ee(a, b) { var c, d, e; b &= 63; if (b < 22) { c = a.l << b; d = a.m << b | ~~a.l >> 22 - b; e = a.h << b | ~~a.m >> 22 - b } else if (b < 44) { c = 0; d = a.l << b - 22; e = a.m << b - 22 | ~~a.l >> 44 - b } else { c = 0; d = 0; e = a.l << b - 44 } return de(c & 4194303, d & 4194303, e & 1048575) }
function Ge(a, b) { var c, d, e, f; b &= 63; c = a.h & 1048575; if (b < 22) { f = ~~c >>> b; e = ~~a.m >> b | c << 22 - b; d = ~~a.l >> b | a.m << 22 - b } else if (b < 44) { f = 0; e = ~~c >>> b - 22; d = ~~a.m >> b - 22 | a.h << 44 - b } else { f = 0; e = 0; d = ~~c >>> b - 44 } return de(d & 4194303, e & 4194303, f & 1048575) }
function Uo(a) { Qo(); switch (a) { case 2: return Ao; case 1: return Bo; case 3: return Co; case 5: return Do; case 6: return Eo; case 4: return Fo; case 7: return Go; case 0: return Ho; default: throw new Sk('Invalid rounding mode'); } }
function mi(a, b) { var c, d, e; if (b == 0) { return (a.b[0] & 1) != 0 } if (b < 0) { throw new nk(ts) } e = ~~b >> 5; if (e >= a.e) { return a.f < 0 } c = a.b[e]; b = 1 << (b & 31); if (a.f < 0) { d = Zh(a); if (e < d) { return false } else d == e ? (c = -c) : (c = ~c) } return (c & b) != 0 }
function Pf(a) { var b, c; if (a.e > 0) { return a.e } b = 1; c = 1; if (a.b < 54) { a.b >= 1 && (c = a.g); b += Math.log(c <= 0 ? 0 - c : c) * Math.LOG10E } else { b += (a.b - 1) * 0.3010299956639812; Th((!a.d && (a.d = Li(a.g)), a.d), po(b)).r() != 0 && ++b } a.e = Bc(b); return a.e }
function zh(a) { rf(); var b, c; c = Lj(a); if (c == ks) b = Fg(a[0]); else if (c == ks) b = Gg(ue(a[0])); else if (c == ns) b = Hg(ue(a[0]), a[1]); else throw new V('Unknown call signature for bd = java.math.BigDecimal.valueOf: ' + c); return new Kg(b) }
function Qi(a) { Oh(); var b, c; c = Lj(a); if (c == ms) b = new oi(a[0].toString()); else if (c == 'string number') b = new pi(a[0].toString(), a[1]); else throw new V('Unknown call signature for obj = new java.math.BigInteger: ' + c); return new Pi(b) }
function Un() { Un = rr; On = new Xn(34, (Qo(), Eo)); Pn = new Xn(7, Eo); Qn = new Xn(16, Eo); Rn = new Xn(0, Fo); Sn = mc(Md, { 6: 1 }, -1, [112, 114, 101, 99, 105, 115, 105, 111, 110, 61]); Tn = mc(Md, { 6: 1 }, -1, [114, 111, 117, 110, 100, 105, 110, 103, 77, 111, 100, 101, 61]) }
function Jn(a, b) { if (b.f == 0) { return a } if (a.f == 0) { return b } if (Vh(b, (Oh(), Ih))) { return new Pi(En(a)) } if (Vh(a, Ih)) { return new Pi(En(b)) } return a.f > 0 ? b.f > 0 ? a.e > b.e ? Mn(a, b) : Mn(b, a) : Kn(a, b) : b.f > 0 ? Kn(b, a) : Zh(b) > Zh(a) ? Ln(b, a) : Ln(a, b) }
function Cn(a, b) { var c, d, e, f, g, i; d = Zh(b); e = Zh(a); if (d >= a.e) { return a } g = hl(a.e, b.e); f = lc(Od, { 6: 1 }, -1, g, 1); c = e; for (; c < d; ++c) { f[c] = a.b[c] } if (c == d) { f[c] = a.b[c] & b.b[c] - 1; ++c } for (; c < g; ++c) { f[c] = a.b[c] & b.b[c] } i = new si(1, g, f); Sh(i); return i }
function Wf(a) { var b, c, d, e, f; b = 1; c = nf.length - 1; d = a.f; if (a.b == 0 && a.g != -1) { return new mg(Tr) } f = (!a.d && (a.d = Li(a.g)), a.d); while (!f.gb(0)) { e = Uh(f, nf[b]); if (e[1].r() == 0) { d -= b; b < c && ++b; f = e[0] } else { if (b == 1) { break } b = 1 } } return new dg(f, Dg(d)) }
function jo(a, b, c, d, e) { var f, g, i, j; if (Ac(a) === Ac(b) && d == e) { qo(a, d, c); return } for (i = 0; i < d; ++i) { g = ur; f = a[i]; for (j = 0; j < e; ++j) { g = pe(pe(Ae(qe(ue(f), yr), qe(ue(b[j]), yr)), qe(ue(c[i + j]), yr)), qe(ue(Je(g)), yr)); c[i + j] = Je(g); g = Ge(g, 32) } c[i + e] = Je(g) } }
function hi(a, b) { var c, d, e, f, g; if (b.f == 0) { throw new nk(ss) } g = a.e; c = b.e; if ((g != c ? g > c ? 1 : -1 : jn(a.b, b.b, g)) == -1) { return a } e = lc(Od, { 6: 1 }, -1, c, 1); if (c == 1) { e[0] = cn(a.b, g, b.b[0]) } else { d = g - c + 1; e = Km(null, d, a.b, g, b.b, c) } f = new si(a.f, c, e); Sh(f); return f }
function $k(a) { var b, c, d; if (a < 0) { return 0 } else if (a == 0) { return 32 } else { d = -(~~a >> 16); b = ~~d >> 16 & 16; c = 16 - b; a = ~~a >> b; d = a - 256; b = ~~d >> 16 & 8; c += b; a <<= b; d = a - 4096; b = ~~d >> 16 & 4; c += b; a <<= b; d = a - 16384; b = ~~d >> 16 & 2; c += b; a <<= b; d = ~~a >> 14; b = d & ~(~~d >> 1); return c + 2 - b } }
function kn(a, b) { var c; if (a.f == 0) { nm(b.b, 0, a.b, 0, b.e) } else if (b.f == 0) { return } else if (a.f == b.f) { hn(a.b, a.b, a.e, b.b, b.e) } else { c = un(a.b, b.b, a.e, b.e); if (c > 0) { tn(a.b, a.b, a.e, b.b, b.e) } else { qn(a.b, a.b, a.e, b.b, b.e); a.f = -a.f } } a.e = gl(a.e, b.e) + 1; Sh(a); a.c = -2 }
function ln(a, b) { var c, d; c = Qh(a, b); if (a.f == 0) { nm(b.b, 0, a.b, 0, b.e); a.f = -b.f } else if (a.f != b.f) { hn(a.b, a.b, a.e, b.b, b.e); a.f = c } else { d = un(a.b, b.b, a.e, b.e); if (d > 0) { tn(a.b, a.b, a.e, b.b, b.e) } else { qn(a.b, a.b, a.e, b.b, b.e); a.f = -a.f } } a.e = gl(a.e, b.e) + 1; Sh(a); a.c = -2 }
function di(a, b, c) { var d, e; if (c.f <= 0) { throw new nk(us) } d = a; if ((c.e == 1 && c.b[0] == 1) | b.f > 0 & d.f == 0) { return Nh } if (d.f == 0 && b.f == 0) { return Jh } if (b.f < 0) { d = ci(a, c); b = b.cb() } e = c.gb(0) ? _m(d._(), b, c) : Om(d._(), b, c); d.f < 0 && b.gb(0) && (e = bi(ei(rn(c, Jh), e), c)); return e }
function $m(a, b, c, d, e) { var f, g, i; f = ur; g = ur; for (i = 0; i < d; ++i) { f = (go(), pe(Ae(qe(ue(c[i]), yr), qe(ue(e), yr)), qe(ue(Je(f)), yr))); g = pe(He(qe(ue(a[b + i]), yr), qe(f, yr)), g); a[b + i] = Je(g); g = Fe(g, 32); f = Ge(f, 32) } g = pe(He(qe(ue(a[b + d]), yr), f), g); a[b + d] = Je(g); return Je(Fe(g, 32)) }
function ho(a, b) { go(); var c, d, e, f, g, i, j, k, n; if (b.e > a.e) { i = a; a = b; b = i } if (b.e < 63) { return no(a, b) } g = (a.e & -2) << 4; k = a.fb(g); n = b.fb(g); d = rn(a, k.eb(g)); e = rn(b, n.eb(g)); j = ho(k, n); c = ho(d, e); f = ho(rn(k, d), rn(e, n)); f = fn(fn(f, j), c); f = f.eb(g); j = j.eb(g << 1); return fn(fn(j, f), c) }
function le(a) { var b, c, d; c = a.l; if ((c & c - 1) != 0) { return -1 } d = a.m; if ((d & d - 1) != 0) { return -1 } b = a.h; if ((b & b - 1) != 0) { return -1 } if (b == 0 && d == 0 && c == 0) { return -1 } if (b == 0 && d == 0 && c != 0) { return _k(c) } if (b == 0 && d != 0 && c == 0) { return _k(d) + 22 } if (b != 0 && d == 0 && c == 0) { return _k(b) + 44 } return -1 }
function wn(a, b) { var c, d, e, f, g, i, j; e = Zh(a); d = Zh(b); if (d >= a.e) { return Oh(), Nh } i = a.e; g = lc(Od, { 6: 1 }, -1, i, 1); c = e > d ? e : d; if (c == d) { g[c] = -b.b[c] & a.b[c]; ++c } f = hl(b.e, a.e); for (; c < f; ++c) { g[c] = ~b.b[c] & a.b[c] } if (c >= b.e) { for (; c < a.e; ++c) { g[c] = a.b[c] } } j = new si(1, i, g); Sh(j); return j }
function Jf(a, b) { if (a.b == 0 && a.g != -1) { return Ig(b > 0 ? b : 0) } if (b >= 0) { if (a.b < 54) { return new pg(a.g, Dg(b)) } return new dg((!a.d && (a.d = Li(a.g)), a.d), Dg(b)) } if (-b < hf.length && a.b + jf[Bc(-b)] < 54) { return new pg(a.g * hf[Bc(-b)], 0) } return new dg(mo((!a.d && (a.d = Li(a.g)), a.d), Bc(-b)), 0) }
function Fe(a, b) { var c, d, e, f, g; b &= 63; c = a.h; d = (c & 524288) != 0; d && (c |= -1048576); if (b < 22) { g = ~~c >> b; f = ~~a.m >> b | c << 22 - b; e = ~~a.l >> b | a.m << 22 - b } else if (b < 44) { g = d ? 1048575 : 0; f = ~~c >> b - 22; e = ~~a.m >> b - 22 | c << 44 - b } else { g = d ? 1048575 : 0; f = d ? 4194303 : 0; e = ~~c >> b - 44 } return de(e & 4194303, f & 4194303, g & 1048575) }
function Oh() { Oh = rr; var a; Jh = new qi(1, 1); Lh = new qi(1, 10); Nh = new qi(0, 0); Ih = new qi(-1, 1); Kh = mc(Xd, { 6: 1 }, 17, [Nh, Jh, new qi(1, 2), new qi(1, 3), new qi(1, 4), new qi(1, 5), new qi(1, 6), new qi(1, 7), new qi(1, 8), new qi(1, 9), Lh]); Mh = lc(Xd, { 6: 1 }, 17, 32, 0); for (a = 0; a < Mh.length; ++a) { nc(Mh, a, Ki(Ee(sr, a))) } }
function lo(a, b) { go(); var c, d, e, f, g, i, j, k, n; k = a.f; if (k == 0) { return Oh(), Nh } d = a.e; c = a.b; if (d == 1) { e = Ae(qe(ue(c[0]), yr), qe(ue(b), yr)); j = Je(e); g = Je(Ge(e, 32)); return g == 0 ? new qi(k, j) : new si(k, 2, mc(Od, { 6: 1 }, -1, [j, g])) } i = d + 1; f = lc(Od, { 6: 1 }, -1, i, 1); f[d] = ko(f, c, d, b); n = new si(k, i, f); Sh(n); return n }
function no(a, b) { var c, d, e, f, g, i, j, k, n, o, q; d = a.e; f = b.e; i = d + f; j = a.f != b.f ? -1 : 1; if (i == 2) { n = Ae(qe(ue(a.b[0]), yr), qe(ue(b.b[0]), yr)); q = Je(n); o = Je(Ge(n, 32)); return o == 0 ? new qi(j, q) : new si(j, 2, mc(Od, { 6: 1 }, -1, [q, o])) } c = a.b; e = b.b; g = lc(Od, { 6: 1 }, -1, i, 1); io(c, d, e, f, g); k = new si(j, i, g); Sh(k); return k }
function Hn(a, b) { var c, d, e, f, g, i; d = Zh(b); e = Zh(a); if (e >= b.e) { return b } else if (d >= a.e) { return a } g = hl(a.e, b.e); f = lc(Od, { 6: 1 }, -1, g, 1); if (d == e) { f[e] = -(-a.b[e] | -b.b[e]); c = e } else { for (c = d; c < e; ++c) { f[c] = b.b[c] } f[c] = b.b[c] & a.b[c] - 1 } for (++c; c < g; ++c) { f[c] = a.b[c] & b.b[c] } i = new si(-1, g, f); Sh(i); return i }
function zm(a, b) { var c, d, e, f, g; d = ~~b >> 5; b &= 31; if (d >= a.e) { return a.f < 0 ? (Oh(), Ih) : (Oh(), Nh) } f = a.e - d; e = lc(Od, { 6: 1 }, -1, f + 1, 1); Am(e, f, a.b, d, b); if (a.f < 0) { for (c = 0; c < d && a.b[c] == 0; ++c) { } if (c < d || b > 0 && a.b[c] << 32 - b != 0) { for (c = 0; c < f && e[c] == -1; ++c) { e[c] = 0 } c == f && ++f; ++e[c] } } g = new si(a.f, f, e); Sh(g); return g }
function vo(a, b) { uo(); var c, d; if (b <= 0 || a.e == 1 && a.b[0] == 2) { return true } if (!mi(a, 0)) { return false } if (a.e == 1 && (a.b[0] & -1024) == 0) { return Bq(to, a.b[0]) >= 0 } for (d = 1; d < to.length; ++d) { if (cn(a.b, a.e, to[d]) == 0) { return false } } c = sm(a); for (d = 2; c < ro[d]; ++d) { } b = d < 1 + (~~(b - 1) >> 1) ? d : 1 + (~~(b - 1) >> 1); return wo(a, b) }
function Qm(a, b) { var c, d, e, f; c = a.bb(); d = b.bb(); e = c < d ? c : d; vm(a, c); vm(b, d); if (Qh(a, b) == 1) { f = a; a = b; b = f } do { if (b.e == 1 || b.e == 2 && b.b[1] > 0) { b = Ki(Rm(ai(a), ai(b))); break } if (b.e > a.e * 1.2) { b = hi(b, a); b.r() != 0 && vm(b, b.bb()) } else { do { pn(b, a); vm(b, b.bb()) } while (Qh(b, a) >= 0) } f = b; b = a; a = f } while (f.f != 0); return b.eb(e) }
function Sf(a, b, c) { var d; if (!c) { throw new jl } d = b - a.f; if (d == 0) { return a } if (d > 0) { if (d < hf.length && a.b + jf[Bc(d)] < 54) { return new pg(a.g * hf[Bc(d)], b) } return new dg(mo((!a.d && (a.d = Li(a.g)), a.d), Bc(d)), b) } if (a.b < 54 && -d < hf.length) { return vg(a.g, hf[Bc(-d)], b, c) } return ug((!a.d && (a.d = Li(a.g)), a.d), po(-d), b, c) }
function cl(a, b) { var c, d, e, f; if (b == 10 || b < 2 || b > 36) { return Lr + Ke(a) } c = lc(Md, { 6: 1 }, -1, 65, 1); d = (nl(), ml); e = 64; f = ue(b); if (we(a, ur)) { while (we(a, f)) { c[e--] = d[Je(ze(a, f))]; a = ee(a, f, false) } c[e] = d[Je(a)] } else { while (ye(a, Be(f))) { c[e--] = d[Je(Be(ze(a, f)))]; a = ee(a, f, false) } c[e--] = d[Je(Be(a))]; c[e] = 45 } return Gl(c, e, 65) }
function Of(a, b, c) { var d, e, f, g, i, j; f = b < 0 ? -b : b; g = c.b; e = Bc(fl(f)) + 1; i = c; if (b == 0 || a.b == 0 && a.g != -1 && b > 0) { return Nf(a, b) } if (f > 999999999 || g == 0 && b < 0 || g > 0 && e > g) { throw new nk(bs) } g > 0 && (i = new Xn(g + e + 1, c.c)); d = Qf(a, i); j = ~~Zk(f) >> 1; while (j > 0) { d = Lf(d, d, i); (f & j) == j && (d = Lf(d, a, i)); j >>= 1 } b < 0 && (d = zf(lf, d, i)); If(d, c); return d }
function tf(a, b) { var c; c = a.f - b.f; if (a.b == 0 && a.g != -1) { if (c <= 0) { return b } if (b.b == 0 && b.g != -1) { return a } } else if (b.b == 0 && b.g != -1) { if (c >= 0) { return a } } if (c == 0) { if (gl(a.b, b.b) + 1 < 54) { return new pg(a.g + b.g, a.f) } return new og(fn((!a.d && (a.d = Li(a.g)), a.d), (!b.d && (b.d = Li(b.g)), b.d)), a.f) } else return c > 0 ? rg(a, b, c) : rg(b, a, -c) }
function Nm(a, b) { var c, d, e, f, g; d = qe(ue(b), yr); if (we(a, ur)) { f = ee(a, d, false); g = ze(a, d) } else { c = Ge(a, 1); e = ue(~~b >>> 1); f = ee(c, e, false); g = ze(c, e); g = pe(Ee(g, 1), qe(a, sr)); if ((b & 1) != 0) { if (!ve(f, g)) { g = He(g, f) } else { if (ye(He(f, g), d)) { g = pe(g, He(d, f)); f = He(f, sr) } else { g = pe(g, He(Ee(d, 1), f)); f = He(f, vr) } } } } return De(Ee(g, 32), qe(f, yr)) }
function Ei(a, b, c) { var d, e, f, g, i, j, k, n, o, q, r, s, t, u; r = b.length; k = r; if (b.charCodeAt(0) == 45) { o = -1; q = 1; --r } else { o = 1; q = 0 } g = (Em(), Dm)[c]; f = ~~(r / g); u = r % g; u != 0 && ++f; j = lc(Od, { 6: 1 }, -1, f, 1); d = Cm[c - 2]; i = 0; s = q + (u == 0 ? g : u); for (t = q; t < k; t = s, s = s + g) { e = af(b.substr(t, s - t), c); n = (go(), ko(j, j, i, d)); n += on(j, i, e); j[i++] = n } a.f = o; a.e = i; a.b = j; Sh(a) }
function te(a) { var b, c, d, e, f; if (isNaN(a)) { return Qe(), Pe } if (a < -9223372036854775808) { return Qe(), Ne } if (a >= 9223372036854775807) { return Qe(), Me } e = false; if (a < 0) { e = true; a = -a } d = 0; if (a >= 17592186044416) { d = Bc(a / 17592186044416); a -= d * 17592186044416 } c = 0; if (a >= 4194304) { c = Bc(a / 4194304); a -= c * 4194304 } b = Bc(a); f = de(b, c, d); e && je(f); return f }
function Ke(a) { var b, c, d, e, f; if (a.l == 0 && a.m == 0 && a.h == 0) { return Tr } if (a.h == 524288 && a.m == 0 && a.l == 0) { return '-9223372036854775808' } if (~~a.h >> 19 != 0) { return Ur + Ke(Be(a)) } c = a; d = Lr; while (!(c.l == 0 && c.m == 0 && c.h == 0)) { e = ue(1000000000); c = ee(c, e, true); b = Lr + Je(ae); if (!(c.l == 0 && c.m == 0 && c.h == 0)) { f = 9 - b.length; for (; f > 0; --f) { b = Tr + b } } d = b + d } return d }
function Uh(a, b) { var c, d, e, f, g, i, j, k, n, o, q, r, s; f = b.f; if (f == 0) { throw new nk(ss) } e = b.e; d = b.b; if (e == 1) { return Lm(a, d[0], f) } q = a.b; r = a.e; c = r != e ? r > e ? 1 : -1 : jn(q, d, r); if (c < 0) { return mc(Xd, { 6: 1 }, 17, [Nh, a]) } s = a.f; i = r - e + 1; j = s == f ? 1 : -1; g = lc(Od, { 6: 1 }, -1, i, 1); k = Km(g, i, q, r, d, e); n = new si(j, i, g); o = new si(s, e, k); Sh(n); Sh(o); return mc(Xd, { 6: 1 }, 17, [n, o]) }
function Zf(a) { var b; if (a.f == 0 || a.b == 0 && a.g != -1) { return !a.d && (a.d = Li(a.g)), a.d } else if (a.f < 0) { return ei((!a.d && (a.d = Li(a.g)), a.d), po(-a.f)) } else { if (a.f > (a.e > 0 ? a.e : el((a.b - 1) * 0.3010299956639812) + 1) || a.f > (!a.d && (a.d = Li(a.g)), a.d).bb()) { throw new nk(cs) } b = Uh((!a.d && (a.d = Li(a.g)), a.d), po(a.f)); if (b[1].r() != 0) { throw new nk(cs) } return b[0] } }
function qn(a, b, c, d, e) { var f, g; f = ur; if (c < e) { for (g = 0; g < c; ++g) { f = pe(f, He(qe(ue(d[g]), yr), qe(ue(b[g]), yr))); a[g] = Je(f); f = Fe(f, 32) } for (; g < e; ++g) { f = pe(f, qe(ue(d[g]), yr)); a[g] = Je(f); f = Fe(f, 32) } } else { for (g = 0; g < e; ++g) { f = pe(f, He(qe(ue(d[g]), yr), qe(ue(b[g]), yr))); a[g] = Je(f); f = Fe(f, 32) } for (; g < c; ++g) { f = He(f, qe(ue(b[g]), yr)); a[g] = Je(f); f = Fe(f, 32) } } }
function Lm(a, b, c) { var d, e, f, g, i, j, k, n, o, q, r, s; q = a.b; r = a.e; s = a.f; if (r == 1) { d = qe(ue(q[0]), yr); e = qe(ue(b), yr); f = ee(d, e, false); j = ze(d, e); s != c && (f = Be(f)); s < 0 && (j = Be(j)); return mc(Xd, { 6: 1 }, 17, [Ki(f), Ki(j)]) } i = s == c ? 1 : -1; g = lc(Od, { 6: 1 }, -1, r, 1); k = mc(Od, { 6: 1 }, -1, [Mm(g, q, r, b)]); n = new si(i, r, g); o = new si(s, 1, k); Sh(n); Sh(o); return mc(Xd, { 6: 1 }, 17, [n, o]) }
function Zm(a, b, c) { var d, e, f, g, i, j, k; i = b.b; j = b.e; k = ur; for (d = 0; d < j; ++d) { e = ur; g = Je((go(), Ae(qe(ue(a[d]), yr), qe(ue(c), yr)))); for (f = 0; f < j; ++f) { e = pe(pe(Ae(qe(ue(g), yr), qe(ue(i[f]), yr)), qe(ue(a[d + f]), yr)), qe(ue(Je(e)), yr)); a[d + f] = Je(e); e = Ge(e, 32) } k = pe(k, pe(qe(ue(a[d + j]), yr), e)); a[d + j] = Je(k); k = Ge(k, 32) } a[j << 1] = Je(k); for (f = 0; f < j + 1; ++f) { a[f] = a[f + j] } }
function af(a, b) { var c, d, e, f; if (a == null) { throw new pl(Mr) } if (b < 2 || b > 36) { throw new pl('radix ' + b + ' out of range') } d = a.length; e = d > 0 && a.charCodeAt(0) == 45 ? 1 : 0; for (c = e; c < d; ++c) { if (tk(a.charCodeAt(c), b) == -1) { throw new pl(Zr + a + $r) } } f = parseInt(a, b); if (isNaN(f)) { throw new pl(Zr + a + $r) } else if (f < -2147483648 || f > 2147483647) { throw new pl(Zr + a + $r) } return f }
function En(a) { var b, c; if (a.f == 0) { return Oh(), Ih } if (Vh(a, (Oh(), Ih))) { return Nh } c = lc(Od, { 6: 1 }, -1, a.e + 1, 1); if (a.f > 0) { if (a.b[a.e - 1] != -1) { for (b = 0; a.b[b] == -1; ++b) { } } else { for (b = 0; b < a.e && a.b[b] == -1; ++b) { } if (b == a.e) { c[b] = 1; return new si(-a.f, b + 1, c) } } } else { for (b = 0; a.b[b] == 0; ++b) { c[b] = -1 } } c[b] = a.b[b] + a.f; for (++b; b < a.e; ++b) { c[b] = a.b[b] } return new si(-a.f, b, c) }
function Bg(a, b, c) { var d; d = 0; switch (c.c) { case 7: if (b != 0) { throw new nk(cs) } break; case 0: d = b == 0 ? 0 : b < 0 ? -1 : 1; break; case 2: d = (b == 0 ? 0 : b < 0 ? -1 : 1) > 0 ? b == 0 ? 0 : b < 0 ? -1 : 1 : 0; break; case 3: d = (b == 0 ? 0 : b < 0 ? -1 : 1) < 0 ? b == 0 ? 0 : b < 0 ? -1 : 1 : 0; break; case 4: (b < 0 ? -b : b) >= 5 && (d = b == 0 ? 0 : b < 0 ? -1 : 1); break; case 5: (b < 0 ? -b : b) > 5 && (d = b == 0 ? 0 : b < 0 ? -1 : 1); break; case 6: (b < 0 ? -b : b) + a > 5 && (d = b == 0 ? 0 : b < 0 ? -1 : 1); }return d }
function Vf(a, b, c) { var d, e, f, g, i, j; i = te(hf[c]); g = He(te(a.f), ue(c)); j = te(a.g); f = ee(j, i, false); e = ze(j, i); if (Ce(e, ur)) { d = se(He(Ee(xe(e, ur) ? Be(e) : e, 1), i), ur) ? 0 : xe(He(Ee(xe(e, ur) ? Be(e) : e, 1), i), ur) ? -1 : 1; f = pe(f, ue(Bg(Je(f) & 1, (se(e, ur) ? 0 : xe(e, ur) ? -1 : 1) * (5 + d), b.c))); if (fl(Ie(xe(f, ur) ? Be(f) : f)) >= b.b) { f = re(f, tr); g = He(g, sr) } } a.f = Dg(Ie(g)); a.e = b.b; a.g = Ie(f); a.b = tg(f); a.d = null }
function tm(a, b) { var c, d, e, f, g, i, j, k, n; k = a.f == 0 ? 1 : a.f; g = ~~b >> 5; c = b & 31; j = gl(g + 1, a.e) + 1; i = lc(Od, { 6: 1 }, -1, j, 1); d = 1 << c; nm(a.b, 0, i, 0, a.e); if (a.f < 0) { if (g >= a.e) { i[g] = d } else { e = Zh(a); if (g > e) { i[g] ^= d } else if (g < e) { i[g] = -d; for (f = g + 1; f < e; ++f) { i[f] = -1 } i[f] = i[f]-- } else { f = g; i[g] = -(-i[g] ^ d); if (i[g] == 0) { for (++f; i[f] == -1; ++f) { i[f] = 0 } ++i[f] } } } } else { i[g] ^= d } n = new si(k, j, i); Sh(n); return n }
function wo(a, b) { var c, d, e, f, g, i, j, k, n; g = rn(a, (Oh(), Jh)); c = g.ab(); f = g.bb(); i = g.fb(f); j = new Vq; for (d = 0; d < b; ++d) { if (d < to.length) { k = so[d] } else { do { k = new ni(c, j) } while (Qh(k, a) >= 0 || k.f == 0 || k.e == 1 && k.b[0] == 1) } n = di(k, i, a); if (n.e == 1 && n.b[0] == 1 || n.eQ(g)) { continue } for (e = 1; e < f; ++e) { if (n.eQ(g)) { continue } n = bi(ei(n, n), a); if (n.e == 1 && n.b[0] == 1) { return false } } if (!n.eQ(g)) { return false } } return true }
function Mm(a, b, c, d) { var e, f, g, i, j, k, n; k = ur; f = qe(ue(d), yr); for (i = c - 1; i >= 0; --i) { n = De(Ee(k, 32), qe(ue(b[i]), yr)); if (we(n, ur)) { j = ee(n, f, false); k = ze(n, f) } else { e = Ge(n, 1); g = ue(~~d >>> 1); j = ee(e, g, false); k = ze(e, g); k = pe(Ee(k, 1), qe(n, sr)); if ((d & 1) != 0) { if (!ve(j, k)) { k = He(k, j) } else { if (ye(He(j, k), f)) { k = pe(k, He(f, j)); j = He(j, sr) } else { k = pe(k, He(Ee(f, 1), j)); j = He(j, vr) } } } } a[i] = Je(qe(j, yr)) } return Je(k) }
function he(a, b, c, d, e, f) { var g, i, j, k, n, o, q; k = ke(b) - ke(a); g = Ee(b, k); j = de(0, 0, 0); while (k >= 0) { i = ne(a, g); if (i) { k < 22 ? (j.l |= 1 << k, undefined) : k < 44 ? (j.m |= 1 << k - 22, undefined) : (j.h |= 1 << k - 44, undefined); if (a.l == 0 && a.m == 0 && a.h == 0) { break } } o = g.m; q = g.h; n = g.l; g.h = ~~q >>> 1; g.m = ~~o >>> 1 | (q & 1) << 21; g.l = ~~n >>> 1 | (o & 1) << 21; --k } c && je(j); if (f) { if (d) { ae = Be(a); e && (ae = He(ae, (Qe(), Oe))) } else { ae = de(a.l, a.m, a.h) } } return j }
function dn(a, b, c, d, e) { var f, g, i, j, k, n, o; k = lc(Xd, { 6: 1 }, 17, 8, 0); n = a; nc(k, 0, b); o = Ym(b, b, d, e); for (g = 1; g <= 7; ++g) { nc(k, g, Ym(k[g - 1], o, d, e)) } for (g = c.ab() - 1; g >= 0; --g) { if ((c.b[~~g >> 5] & 1 << (g & 31)) != 0) { j = 1; f = g; for (i = g - 3 > 0 ? g - 3 : 0; i <= g - 1; ++i) { if ((c.b[~~i >> 5] & 1 << (i & 31)) != 0) { if (i < f) { f = i; j = j << g - i ^ 1 } else { j = j ^ 1 << i - f } } } for (i = f; i <= g; ++i) { n = Ym(n, n, d, e) } n = Ym(k[~~(j - 1) >> 1], n, d, e); g = f } else { n = Ym(n, n, d, e) } } return n }
function Ln(a, b) { var c, d, e, f, g, i, j; i = gl(a.e, b.e); g = lc(Od, { 6: 1 }, -1, i, 1); e = Zh(a); d = Zh(b); c = d; if (e == d) { g[d] = -a.b[d] ^ -b.b[d] } else { g[d] = -b.b[d]; f = hl(b.e, e); for (++c; c < f; ++c) { g[c] = ~b.b[c] } if (c == b.e) { for (; c < e; ++c) { g[c] = -1 } g[c] = a.b[c] - 1 } else { g[c] = -a.b[c] ^ ~b.b[c] } } f = hl(a.e, b.e); for (++c; c < f; ++c) { g[c] = a.b[c] ^ b.b[c] } for (; c < a.e; ++c) { g[c] = a.b[c] } for (; c < b.e; ++c) { g[c] = b.b[c] } j = new si(1, i, g); Sh(j); return j }
function qo(a, b, c) { var d, e, f, g; for (e = 0; e < b; ++e) { d = ur; for (g = e + 1; g < b; ++g) { d = pe(pe(Ae(qe(ue(a[e]), yr), qe(ue(a[g]), yr)), qe(ue(c[e + g]), yr)), qe(ue(Je(d)), yr)); c[e + g] = Je(d); d = Ge(d, 32) } c[e + b] = Je(d) } ym(c, c, b << 1); d = ur; for (e = 0, f = 0; e < b; ++e, ++f) { d = pe(pe(Ae(qe(ue(a[e]), yr), qe(ue(a[e]), yr)), qe(ue(c[f]), yr)), qe(ue(Je(d)), yr)); c[f] = Je(d); d = Ge(d, 32); ++f; d = pe(d, qe(ue(c[f]), yr)); c[f] = Je(d); d = Ge(d, 32) } return c }
function vf(a, b) { var c, d, e, f, g, i; e = Uf(a); i = Uf(b); if (e == i) { if (a.f == b.f && a.b < 54 && b.b < 54) { return a.g < b.g ? -1 : a.g > b.g ? 1 : 0 } d = a.f - b.f; c = (a.e > 0 ? a.e : el((a.b - 1) * 0.3010299956639812) + 1) - (b.e > 0 ? b.e : el((b.b - 1) * 0.3010299956639812) + 1); if (c > d + 1) { return e } else if (c < d - 1) { return -e } else { f = (!a.d && (a.d = Li(a.g)), a.d); g = (!b.d && (b.d = Li(b.g)), b.d); d < 0 ? (f = ei(f, po(-d))) : d > 0 && (g = ei(g, po(d))); return Qh(f, g) } } else return e < i ? -1 : 1 }
function If(a, b) { var c, d, e, f, g, i, j; f = b.b; if ((a.e > 0 ? a.e : el((a.b - 1) * 0.3010299956639812) + 1) - f < 0 || f == 0) { return } d = a.q() - f; if (d <= 0) { return } if (a.b < 54) { Vf(a, b, d); return } i = po(d); e = Uh((!a.d && (a.d = Li(a.g)), a.d), i); g = a.f - d; if (e[1].r() != 0) { c = Qh(ki(e[1]._()), i); c = Bg(e[0].gb(0) ? 1 : 0, e[1].r() * (5 + c), b.c); c != 0 && nc(e, 0, fn(e[0], Ki(ue(c)))); j = new cg(e[0]); if (j.q() > f) { nc(e, 0, Th(e[0], (Oh(), Lh))); --g } } a.f = Dg(g); a.e = f; Tf(a, e[0]) }
function Yf(a, b, c) { var d, e, f, g; d = b.f - a.f; if (b.b == 0 && b.g != -1 || a.b == 0 && a.g != -1 || c.b == 0) { return Qf(Xf(a, b), c) } if ((b.e > 0 ? b.e : el((b.b - 1) * 0.3010299956639812) + 1) < d - 1) { if (c.b < (a.e > 0 ? a.e : el((a.b - 1) * 0.3010299956639812) + 1)) { g = Uf(a); if (g != b.r()) { f = fn(lo((!a.d && (a.d = Li(a.g)), a.d), 10), Ki(ue(g))) } else { f = rn((!a.d && (a.d = Li(a.g)), a.d), Ki(ue(g))); f = fn(lo(f, 10), Ki(ue(g * 9))) } e = new og(f, a.f + 1); return Qf(e, c) } } return Qf(Xf(a, b), c) }
function rn(a, b) { var c, d, e, f, g, i, j, k, n, o; g = a.f; j = b.f; if (j == 0) { return a } if (g == 0) { return b.cb() } f = a.e; i = b.e; if (f + i == 2) { c = qe(ue(a.b[0]), yr); d = qe(ue(b.b[0]), yr); g < 0 && (c = Be(c)); j < 0 && (d = Be(d)); return Ki(He(c, d)) } e = f != i ? f > i ? 1 : -1 : jn(a.b, b.b, f); if (e == -1) { o = -j; n = g == j ? sn(b.b, i, a.b, f) : gn(b.b, i, a.b, f) } else { o = g; if (g == j) { if (e == 0) { return Oh(), Nh } n = sn(a.b, f, b.b, i) } else { n = gn(a.b, f, b.b, i) } } k = new si(o, n.length, n); Sh(k); return k }
function zn(a, b) { var c, d, e, f, g, i, j; e = Zh(a); d = Zh(b); if (e >= b.e) { return Oh(), Nh } i = b.e; g = lc(Od, { 6: 1 }, -1, i, 1); c = e; if (e < d) { g[e] = -a.b[e]; f = hl(a.e, d); for (++c; c < f; ++c) { g[c] = ~a.b[c] } if (c == a.e) { for (; c < d; ++c) { g[c] = -1 } g[c] = b.b[c] - 1 } else { g[c] = ~a.b[c] & b.b[c] - 1 } } else d < e ? (g[e] = -a.b[e] & b.b[e]) : (g[e] = -a.b[e] & b.b[e] - 1); f = hl(a.e, b.e); for (++c; c < f; ++c) { g[c] = ~a.b[c] & b.b[c] } for (; c < b.e; ++c) { g[c] = b.b[c] } j = new si(1, i, g); Sh(j); return j }
function Th(a, b) { var c, d, e, f, g, i, j, k, n, o; if (b.f == 0) { throw new nk(ss) } e = b.f; if (b.e == 1 && b.b[0] == 1) { return b.f > 0 ? a : a.cb() } n = a.f; k = a.e; d = b.e; if (k + d == 2) { o = re(qe(ue(a.b[0]), yr), qe(ue(b.b[0]), yr)); n != e && (o = Be(o)); return Ki(o) } c = k != d ? k > d ? 1 : -1 : jn(a.b, b.b, k); if (c == 0) { return n == e ? Jh : Ih } if (c == -1) { return Nh } g = k - d + 1; f = lc(Od, { 6: 1 }, -1, g, 1); i = n == e ? 1 : -1; d == 1 ? Mm(f, a.b, k, b.b[0]) : Km(f, g, a.b, k, b.b, d); j = new si(i, g, f); Sh(j); return j }
function hn(a, b, c, d, e) { var f, g; f = pe(qe(ue(b[0]), yr), qe(ue(d[0]), yr)); a[0] = Je(f); f = Fe(f, 32); if (c >= e) { for (g = 1; g < e; ++g) { f = pe(f, pe(qe(ue(b[g]), yr), qe(ue(d[g]), yr))); a[g] = Je(f); f = Fe(f, 32) } for (; g < c; ++g) { f = pe(f, qe(ue(b[g]), yr)); a[g] = Je(f); f = Fe(f, 32) } } else { for (g = 1; g < c; ++g) { f = pe(f, pe(qe(ue(b[g]), yr), qe(ue(d[g]), yr))); a[g] = Je(f); f = Fe(f, 32) } for (; g < e; ++g) { f = pe(f, qe(ue(d[g]), yr)); a[g] = Je(f); f = Fe(f, 32) } } Ce(f, ur) && (a[g] = Je(f)) }
function go() { go = rr; var a, b; bo = lc(Xd, { 6: 1 }, 17, 32, 0); co = lc(Xd, { 6: 1 }, 17, 32, 0); eo = mc(Od, { 6: 1 }, -1, [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125]); fo = mc(Od, { 6: 1 }, -1, [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]); a = sr; for (b = 0; b <= 18; ++b) { nc(bo, b, Ki(a)); nc(co, b, Ki(Ee(a, b))); a = Ae(a, Hr) } for (; b < co.length; ++b) { nc(bo, b, ei(bo[b - 1], bo[1])); nc(co, b, ei(co[b - 1], (Oh(), Lh))) } }
function yf(a, b, c, d) { var e, f, g; if (!d) { throw new jl } if (b.b == 0 && b.g != -1) { throw new nk(_r) } e = a.f - b.f - c; if (a.b < 54 && b.b < 54) { if (e == 0) { return vg(a.g, b.g, c, d) } else if (e > 0) { if (e < hf.length && b.b + jf[Bc(e)] < 54) { return vg(a.g, b.g * hf[Bc(e)], c, d) } } else { if (-e < hf.length && a.b + jf[Bc(-e)] < 54) { return vg(a.g * hf[Bc(-e)], b.g, c, d) } } } f = (!a.d && (a.d = Li(a.g)), a.d); g = (!b.d && (b.d = Li(b.g)), b.d); e > 0 ? (g = mo(g, Bc(e))) : e < 0 && (f = mo(f, Bc(-e))); return ug(f, g, c, d) }
function Gn(a, b) { var c, d, e, f, g, i, j; d = Zh(b); e = Zh(a); if (e >= b.e) { return b } i = b.e; g = lc(Od, { 6: 1 }, -1, i, 1); if (d < e) { for (c = d; c < e; ++c) { g[c] = b.b[c] } } else if (e < d) { c = e; g[e] = -a.b[e]; f = hl(a.e, d); for (++c; c < f; ++c) { g[c] = ~a.b[c] } if (c != a.e) { g[c] = ~(-b.b[c] | a.b[c]) } else { for (; c < d; ++c) { g[c] = -1 } g[c] = b.b[c] - 1 } ++c } else { c = e; g[e] = -(-b.b[e] | a.b[e]); ++c } f = hl(b.e, a.e); for (; c < f; ++c) { g[c] = b.b[c] & ~a.b[c] } for (; c < b.e; ++c) { g[c] = b.b[c] } j = new si(-1, i, g); Sh(j); return j }
function _f(a) { var b, c, d, e; d = Hm((!a.d && (a.d = Li(a.g)), a.d), 0); if (a.f == 0 || a.b == 0 && a.g != -1 && a.f < 0) { return d } b = Uf(a) < 0 ? 1 : 0; c = a.f; e = new gm(d.length + 1 + dl(Bc(a.f))); b == 1 && (e.b.b += Ur, e); if (a.f > 0) { c -= d.length - b; if (c >= 0) { e.b.b += es; for (; c > ef.length; c -= ef.length) { $l(e, ef) } _l(e, ef, Bc(c)); dm(e, Al(d, b)) } else { c = b - c; dm(e, Bl(d, b, Bc(c))); e.b.b += ds; dm(e, Al(d, Bc(c))) } } else { dm(e, Al(d, b)); for (; c < -ef.length; c += ef.length) { $l(e, ef) } _l(e, ef, Bc(-c)) } return e.b.b }
function ug(a, b, c, d) { var e, f, g, i, j, k, n; g = Uh(a, b); i = g[0]; k = g[1]; if (k.r() == 0) { return new dg(i, c) } n = a.r() * b.r(); if (b.ab() < 54) { j = ai(k); f = ai(b); e = se(He(Ee(xe(j, ur) ? Be(j) : j, 1), xe(f, ur) ? Be(f) : f), ur) ? 0 : xe(He(Ee(xe(j, ur) ? Be(j) : j, 1), xe(f, ur) ? Be(f) : f), ur) ? -1 : 1; e = Bg(i.gb(0) ? 1 : 0, n * (5 + e), d) } else { e = Qh(ki(k._()), b._()); e = Bg(i.gb(0) ? 1 : 0, n * (5 + e), d) } if (e != 0) { if (i.ab() < 54) { return Hg(pe(ai(i), ue(e)), c) } i = fn(i, Ki(ue(e))); return new dg(i, c) } return new dg(i, c) }
function ag(a) { var b, c, d, e, f; if (a.i != null) { return a.i } if (a.b < 32) { a.i = Im(te(a.g), Bc(a.f)); return a.i } e = Hm((!a.d && (a.d = Li(a.g)), a.d), 0); if (a.f == 0) { return e } b = (!a.d && (a.d = Li(a.g)), a.d).r() < 0 ? 2 : 1; c = e.length; d = -a.f + c - b; f = new fm; cc(f.b, e); if (a.f > 0 && d >= -6) { if (d >= 0) { em(f, c - Bc(a.f), ds) } else { ec(f.b, b - 1, b - 1, es); em(f, b + 1, Ll(ef, 0, -Bc(d) - 1)) } } else { if (c - b >= 1) { ec(f.b, b, b, ds); ++c } ec(f.b, c, c, fs); d > 0 && em(f, ++c, gs); em(f, ++c, Lr + Ke(te(d))) } a.i = f.b.b; return a.i }
function xn(a, b) { var c, d, e, f, g, i, j; e = Zh(a); f = Zh(b); if (e >= b.e) { return a } d = f > e ? f : e; f > e ? (c = -b.b[d] & ~a.b[d]) : f < e ? (c = ~b.b[d] & -a.b[d]) : (c = -b.b[d] & -a.b[d]); if (c == 0) { for (++d; d < b.e && (c = ~(a.b[d] | b.b[d])) == 0; ++d) { } if (c == 0) { for (; d < a.e && (c = ~a.b[d]) == 0; ++d) { } if (c == 0) { i = a.e + 1; g = lc(Od, { 6: 1 }, -1, i, 1); g[i - 1] = 1; j = new si(-1, i, g); return j } } } i = a.e; g = lc(Od, { 6: 1 }, -1, i, 1); g[d] = -c; for (++d; d < b.e; ++d) { g[d] = a.b[d] | b.b[d] } for (; d < a.e; ++d) { g[d] = a.b[d] } j = new si(-1, i, g); return j }
function zl(o, a, b) { var c = new RegExp(a, 'g'); var d = []; var e = 0; var f = o; var g = null; while (true) { var i = c.exec(f); if (i == null || f == Lr || e == b - 1 && b > 0) { d[e] = f; break } else { d[e] = f.substring(0, i.index); f = f.substring(i.index + i[0].length, f.length); c.lastIndex = 0; if (g == f) { d[e] = f.substring(0, 1); f = f.substring(1) } g = f; e++ } } if (b == 0 && o.length > 0) { var j = d.length; while (j > 0 && d[j - 1] == Lr) { --j } j < d.length && d.splice(j, d.length - j) } var k = Fl(d.length); for (var n = 0; n < d.length; ++n) { k[n] = d[n] } return k }
function po(a) { go(); var b, c, d, e; b = Bc(a); if (a < co.length) { return co[b] } else if (a <= 50) { return (Oh(), Lh).db(b) } else if (a <= 1000) { return bo[1].db(b).eb(b) } if (a > 1000000) { throw new nk('power of ten too big') } if (a <= 2147483647) { return bo[1].db(b).eb(b) } d = bo[1].db(2147483647); e = d; c = te(a - 2147483647); b = Bc(a % 2147483647); while (ve(c, Ir)) { e = ei(e, d); c = He(c, Ir) } e = ei(e, bo[1].db(b)); e = e.eb(2147483647); c = te(a - 2147483647); while (ve(c, Ir)) { e = e.eb(2147483647); c = He(c, Ir) } e = e.eb(b); return e }
function $d() { var a; !!$stats && Ue('com.iriscouch.gwtapp.client.BigDecimalApp'); ik(new kk); Wj(new Yj); Gj(new Ij); Ch(new Eh); !!$stats && Ue('com.google.gwt.user.client.UserAgentAsserter'); a = We(); wl(Sr, a) || ($wnd.alert('ERROR: Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (safari) does not match the runtime user.agent value (' + a + '). Expect more errors.\n'), undefined); !!$stats && Ue('com.google.gwt.user.client.DocumentModeAsserter'); Ve() }
function Vo(a) { Qo(); var b, c, d, e, f; if (a == null) { throw new jl } d = Cl(a); c = d.length; if (c < Po.length || c > Oo.length) { throw new Rk } f = null; e = null; if (d[0] == 67) { e = Ao; f = Io } else if (d[0] == 68) { e = Bo; f = Jo } else if (d[0] == 70) { e = Co; f = Ko } else if (d[0] == 72) { if (c > 6) { if (d[5] == 68) { e = Do; f = Lo } else if (d[5] == 69) { e = Eo; f = Mo } else if (d[5] == 85) { e = Fo; f = No } } } else if (d[0] == 85) { if (d[1] == 80) { e = Ho; f = Po } else if (d[1] == 78) { e = Go; f = Oo } } if (!!e && c == f.length) { for (b = 1; b < c && d[b] == f[b]; ++b) { } if (b == c) { return e } } throw new Rk }
function ni(a, b) { var d, e, f, g, i, j; Oh(); var c; if (a < 0) { throw new Sk('numBits must be non-negative') } if (a == 0) { this.f = 0; this.e = 1; this.b = mc(Od, { 6: 1 }, -1, [0]) } else { this.f = 1; this.e = ~~(a + 31) >> 5; this.b = lc(Od, { 6: 1 }, -1, this.e, 1); for (c = 0; c < this.e; ++c) { this.b[c] = Bc((g = b.b * 15525485 + b.c * 1502, j = b.c * 15525485 + 11, d = Math.floor(j * 5.9604644775390625E-8), g += d, j -= d * 16777216, g %= 16777216, b.b = g, b.c = j, f = b.b * 256, i = el(b.c * Sq[32]), e = f + i, e >= 2147483648 && (e -= 4294967296), e)) } this.b[this.e - 1] >>>= -a & 31; Sh(this) } }
function fn(a, b) { var c, d, e, f, g, i, j, k, n, o, q, r; g = a.f; j = b.f; if (g == 0) { return b } if (j == 0) { return a } f = a.e; i = b.e; if (f + i == 2) { c = qe(ue(a.b[0]), yr); d = qe(ue(b.b[0]), yr); if (g == j) { k = pe(c, d); r = Je(k); q = Je(Ge(k, 32)); return q == 0 ? new qi(g, r) : new si(g, 2, mc(Od, { 6: 1 }, -1, [r, q])) } return Ki(g < 0 ? He(d, c) : He(c, d)) } else if (g == j) { o = g; n = f >= i ? gn(a.b, f, b.b, i) : gn(b.b, i, a.b, f) } else { e = f != i ? f > i ? 1 : -1 : jn(a.b, b.b, f); if (e == 0) { return Oh(), Nh } if (e == 1) { o = g; n = sn(a.b, f, b.b, i) } else { o = j; n = sn(b.b, i, a.b, f) } } k = new si(o, n.length, n); Sh(k); return k }
function Yn(a) { Un(); var b, c, d, e; if (a == null) { throw new kl('null string') } b = Cl(a); if (b.length < 27 || b.length > 45) { throw new Sk(Hs) } for (d = 0; d < Sn.length && b[d] == Sn[d]; ++d) { } if (d < Sn.length) { throw new Sk(Hs) } c = tk(b[d], 10); if (c == -1) { throw new Sk(Hs) } this.b = this.b * 10 + c; ++d; do { c = tk(b[d], 10); if (c == -1) { if (b[d] == 32) { ++d; break } throw new Sk(Hs) } this.b = this.b * 10 + c; if (this.b < 0) { throw new Sk(Hs) } ++d } while (true); for (e = 0; e < Tn.length && b[d] == Tn[e]; ++d, ++e) { } if (e < Tn.length) { throw new Sk(Hs) } this.c = Vo(Ll(b, d, b.length - d)) }
function Em() { Em = rr; Cm = mc(Od, { 6: 1 }, -1, [-2147483648, 1162261467, 1073741824, 1220703125, 362797056, 1977326743, 1073741824, 387420489, 1000000000, 214358881, 429981696, 815730721, 1475789056, 170859375, 268435456, 410338673, 612220032, 893871739, 1280000000, 1801088541, 113379904, 148035889, 191102976, 244140625, 308915776, 387420489, 481890304, 594823321, 729000000, 887503681, 1073741824, 1291467969, 1544804416, 1838265625, 60466176]); Dm = mc(Od, { 6: 1 }, -1, [-1, -1, 31, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]) }
function uf(a, b, c) { var d, e, f, g, i; d = a.f - b.f; if (b.b == 0 && b.g != -1 || a.b == 0 && a.g != -1 || c.b == 0) { return Qf(tf(a, b), c) } if ((a.e > 0 ? a.e : el((a.b - 1) * 0.3010299956639812) + 1) < d - 1) { e = b; g = a } else if ((b.e > 0 ? b.e : el((b.b - 1) * 0.3010299956639812) + 1) < -d - 1) { e = a; g = b } else { return Qf(tf(a, b), c) } if (c.b >= (e.e > 0 ? e.e : el((e.b - 1) * 0.3010299956639812) + 1)) { return Qf(tf(a, b), c) } f = e.r(); if (f == g.r()) { i = fn(lo((!e.d && (e.d = Li(e.g)), e.d), 10), Ki(ue(f))) } else { i = rn((!e.d && (e.d = Li(e.g)), e.d), Ki(ue(f))); i = fn(lo(i, 10), Ki(ue(f * 9))) } e = new og(i, e.f + 1); return Qf(e, c) }
function $f(a) { var b, c, d, e, f, g, i, j; g = Hm((!a.d && (a.d = Li(a.g)), a.d), 0); if (a.f == 0) { return g } b = (!a.d && (a.d = Li(a.g)), a.d).r() < 0 ? 2 : 1; d = g.length; e = -a.f + d - b; j = new hm(g); if (a.f > 0 && e >= -6) { if (e >= 0) { em(j, d - Bc(a.f), ds) } else { ec(j.b, b - 1, b - 1, es); em(j, b + 1, Ll(ef, 0, -Bc(e) - 1)) } } else { c = d - b; i = Bc(e % 3); if (i != 0) { if ((!a.d && (a.d = Li(a.g)), a.d).r() == 0) { i = i < 0 ? -i : 3 - i; e += i } else { i = i < 0 ? i + 3 : i; e -= i; b += i } if (c < 3) { for (f = i - c; f > 0; --f) { em(j, d++, Tr) } } } if (d - b >= 1) { ec(j.b, b, b, ds); ++d } if (e != 0) { ec(j.b, d, d, fs); e > 0 && em(j, ++d, gs); em(j, ++d, Lr + Ke(te(e))) } } return j.b.b }
function nm(a, b, c, d, e) { var f, g, i, j, k, n, o, q, r; if (a == null || c == null) { throw new jl } q = a.gC(); j = c.gC(); if ((q.c & 4) == 0 || (j.c & 4) == 0) { throw new rk('Must be array types') } o = q.b; g = j.b; if (!((o.c & 1) != 0 ? o == g : (g.c & 1) == 0)) { throw new rk('Array types must match') } r = a.length; k = c.length; if (b < 0 || d < 0 || e < 0 || b + e > r || d + e > k) { throw new Vk } if (((o.c & 1) == 0 || (o.c & 4) != 0) && q != j) { n = vc(a, 11); f = vc(c, 11); if (Ac(a) === Ac(c) && b < d) { b += e; for (i = d + e; i-- > d;) { nc(f, i, n[--b]) } } else { for (i = d + e; d < i;) { nc(f, d++, n[b++]) } } } else { Array.prototype.splice.apply(c, [d, e].concat(a.slice(b, b + e))) } }
function xo(a) { uo(); var b, c, d, e, f, g, i; f = lc(Od, { 6: 1 }, -1, to.length, 1); d = lc(Zd, { 6: 1 }, -1, 1024, 2); if (a.e == 1 && a.b[0] >= 0 && a.b[0] < to[to.length - 1]) { for (c = 0; a.b[0] >= to[c]; ++c) { } return so[c] } i = new si(1, a.e, lc(Od, { 6: 1 }, -1, a.e + 1, 1)); nm(a.b, 0, i.b, 0, a.e); mi(a, 0) ? nn(i, 2) : (i.b[0] |= 1); e = i.ab(); for (b = 2; e < ro[b]; ++b) { } for (c = 0; c < to.length; ++c) { f[c] = bn(i, to[c]) - 1024 } while (true) { Cq(d, d.length); for (c = 0; c < to.length; ++c) { f[c] = (f[c] + 1024) % to[c]; e = f[c] == 0 ? 0 : to[c] - f[c]; for (; e < 1024; e += to[c]) { d[e] = true } } for (e = 0; e < 1024; ++e) { if (!d[e]) { g = Rh(i); nn(g, e); if (wo(g, b)) { return g } } } nn(i, 1024) } }
function Qo() { Qo = rr; Ho = new Ro('UP', 0); Bo = new Ro('DOWN', 1); Ao = new Ro('CEILING', 2); Co = new Ro('FLOOR', 3); Fo = new Ro('HALF_UP', 4); Do = new Ro('HALF_DOWN', 5); Eo = new Ro('HALF_EVEN', 6); Go = new Ro('UNNECESSARY', 7); zo = mc(Yd, { 6: 1 }, 19, [Ho, Bo, Ao, Co, Fo, Do, Eo, Go]); Io = mc(Md, { 6: 1 }, -1, [67, 69, 73, 76, 73, 78, 71]); Jo = mc(Md, { 6: 1 }, -1, [68, 79, 87, 78]); Ko = mc(Md, { 6: 1 }, -1, [70, 76, 79, 79, 82]); Lo = mc(Md, { 6: 1 }, -1, [72, 65, 76, 70, 95, 68, 79, 87, 78]); Mo = mc(Md, { 6: 1 }, -1, [72, 65, 76, 70, 95, 69, 86, 69, 78]); No = mc(Md, { 6: 1 }, -1, [72, 65, 76, 70, 95, 85, 80]); Oo = mc(Md, { 6: 1 }, -1, [85, 78, 78, 69, 67, 69, 83, 83, 65, 82, 89]); Po = mc(Md, { 6: 1 }, -1, [85, 80]) }
function wf(a, b) { var c, d, e, f, g, i, j, k, n, o; k = (!a.d && (a.d = Li(a.g)), a.d); n = (!b.d && (b.d = Li(b.g)), b.d); c = a.f - b.f; g = 0; e = 1; i = kf.length - 1; if (b.b == 0 && b.g != -1) { throw new nk(_r) } if (k.r() == 0) { return Ig(c) } d = Yh(k, n); k = Th(k, d); n = Th(n, d); f = n.bb(); n = n.fb(f); do { o = Uh(n, kf[e]); if (o[1].r() == 0) { g += e; e < i && ++e; n = o[0] } else { if (e == 1) { break } e = 1 } } while (true); if (!n._().eQ((Oh(), Jh))) { throw new nk('Non-terminating decimal expansion; no exact representable decimal result') } n.r() < 0 && (k = k.cb()); j = Dg(c + (f > g ? f : g)); e = f - g; k = e > 0 ? (go(), e < eo.length ? lo(k, eo[e]) : e < bo.length ? ei(k, bo[e]) : ei(k, bo[1].db(e))) : k.eb(-e); return new dg(k, j) }
function ee(a, b, c) { var d, e, f, g, i, j; if (b.l == 0 && b.m == 0 && b.h == 0) { throw new nk('divide by zero') } if (a.l == 0 && a.m == 0 && a.h == 0) { c && (ae = de(0, 0, 0)); return de(0, 0, 0) } if (b.h == 524288 && b.m == 0 && b.l == 0) { return fe(a, c) } j = false; if (~~b.h >> 19 != 0) { b = Be(b); j = true } g = le(b); f = false; e = false; d = false; if (a.h == 524288 && a.m == 0 && a.l == 0) { e = true; f = true; if (g == -1) { a = ce((Qe(), Me)); d = true; j = !j } else { i = Fe(a, g); j && je(i); c && (ae = de(0, 0, 0)); return i } } else if (~~a.h >> 19 != 0) { f = true; a = Be(a); d = true; j = !j } if (g != -1) { return ge(a, g, j, f, c) } if (!we(a, b)) { c && (f ? (ae = Be(a)) : (ae = de(a.l, a.m, a.h))); return de(0, 0, 0) } return he(d ? a : de(a.l, a.m, a.h), b, j, f, e, c) }
function An(a, b) { var c, d, e, f, g, i, j, k; e = Zh(a); f = Zh(b); if (e >= b.e) { return a } j = gl(a.e, b.e); d = e; if (f > e) { i = lc(Od, { 6: 1 }, -1, j, 1); g = hl(a.e, f); for (; d < g; ++d) { i[d] = a.b[d] } if (d == a.e) { for (d = f; d < b.e; ++d) { i[d] = b.b[d] } } } else { c = -a.b[e] & ~b.b[e]; if (c == 0) { g = hl(b.e, a.e); for (++d; d < g && (c = ~(a.b[d] | b.b[d])) == 0; ++d) { } if (c == 0) { for (; d < b.e && (c = ~b.b[d]) == 0; ++d) { } for (; d < a.e && (c = ~a.b[d]) == 0; ++d) { } if (c == 0) { ++j; i = lc(Od, { 6: 1 }, -1, j, 1); i[j - 1] = 1; k = new si(-1, j, i); return k } } } i = lc(Od, { 6: 1 }, -1, j, 1); i[d] = -c; ++d } g = hl(b.e, a.e); for (; d < g; ++d) { i[d] = a.b[d] | b.b[d] } for (; d < a.e; ++d) { i[d] = a.b[d] } for (; d < b.e; ++d) { i[d] = b.b[d] } k = new si(-1, j, i); return k }
function Lj(a) { var b = []; for (var c in a) { var d = typeof a[c]; d != ws ? (b[b.length] = d) : a[c] instanceof Array ? (b[b.length] = js) : $wnd && $wnd.bigdecimal && $wnd.bigdecimal.BigInteger && a[c] instanceof $wnd.bigdecimal.BigInteger ? (b[b.length] = is) : $wnd && $wnd.bigdecimal && $wnd.bigdecimal.BigDecimal && a[c] instanceof $wnd.bigdecimal.BigDecimal ? (b[b.length] = ps) : $wnd && $wnd.bigdecimal && $wnd.bigdecimal.RoundingMode && a[c] instanceof $wnd.bigdecimal.RoundingMode ? (b[b.length] = xs) : $wnd && $wnd.bigdecimal && $wnd.bigdecimal.MathContext && a[c] instanceof $wnd.bigdecimal.MathContext ? (b[b.length] = os) : (b[b.length] = ws) } return b.join(ys) }
function Ae(a, b) { var c, d, e, f, g, i, j, k, n, o, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G; c = a.l & 8191; d = ~~a.l >> 13 | (a.m & 15) << 9; e = ~~a.m >> 4 & 8191; f = ~~a.m >> 17 | (a.h & 255) << 5; g = ~~(a.h & 1048320) >> 8; i = b.l & 8191; j = ~~b.l >> 13 | (b.m & 15) << 9; k = ~~b.m >> 4 & 8191; n = ~~b.m >> 17 | (b.h & 255) << 5; o = ~~(b.h & 1048320) >> 8; C = c * i; D = d * i; E = e * i; F = f * i; G = g * i; if (j != 0) { D += c * j; E += d * j; F += e * j; G += f * j } if (k != 0) { E += c * k; F += d * k; G += e * k } if (n != 0) { F += c * n; G += d * n } o != 0 && (G += c * o); r = C & 4194303; s = (D & 511) << 13; q = r + s; u = ~~C >> 22; v = ~~D >> 9; w = (E & 262143) << 4; x = (F & 31) << 17; t = u + v + w + x; z = ~~E >> 18; A = ~~F >> 5; B = (G & 4095) << 8; y = z + A + B; t += ~~q >> 22; q &= 4194303; y += ~~t >> 22; t &= 4194303; y &= 1048575; return de(q, t, y) }
function zf(a, b, c) { var d, e, f, g, i, j, k, n; n = Ie(pe(ue(c.b), vr)) + (b.e > 0 ? b.e : el((b.b - 1) * 0.3010299956639812) + 1) - (a.e > 0 ? a.e : el((a.b - 1) * 0.3010299956639812) + 1); e = a.f - b.f; j = e; f = 1; i = nf.length - 1; k = mc(Xd, { 6: 1 }, 17, [(!a.d && (a.d = Li(a.g)), a.d)]); if (c.b == 0 || a.b == 0 && a.g != -1 || b.b == 0 && b.g != -1) { return wf(a, b) } if (n > 0) { nc(k, 0, ei((!a.d && (a.d = Li(a.g)), a.d), po(n))); j += n } k = Uh(k[0], (!b.d && (b.d = Li(b.g)), b.d)); g = k[0]; if (k[1].r() != 0) { d = Qh(ki(k[1]), (!b.d && (b.d = Li(b.g)), b.d)); g = fn(ei(g, (Oh(), Lh)), Ki(ue(k[0].r() * (5 + d)))); ++j } else { while (!g.gb(0)) { k = Uh(g, nf[f]); if (k[1].r() == 0 && j - f >= e) { j -= f; f < i && ++f; g = k[0] } else { if (f == 1) { break } f = 1 } } } return new eg(g, Dg(j), c) }
function Wm(a, b) { var c, d, e, f, g, i, j, k, n, o, q; if (a.f == 0) { throw new nk(vs) } if (!b.gb(0)) { return Vm(a, b) } f = b.e * 32; o = Rh(b); q = Rh(a); g = gl(q.e, o.e); j = new si(1, 1, lc(Od, { 6: 1 }, -1, g + 1, 1)); k = new si(1, 1, lc(Od, { 6: 1 }, -1, g + 1, 1)); k.b[0] = 1; c = 0; d = o.bb(); e = q.bb(); if (d > e) { vm(o, d); vm(q, e); um(j, e); c += d - e } else { vm(o, d); vm(q, e); um(k, d); c += e - d } j.f = 1; while (q.r() > 0) { while (Qh(o, q) > 0) { pn(o, q); n = o.bb(); vm(o, n); mn(j, k); um(k, n); c += n } while (Qh(o, q) <= 0) { pn(q, o); if (q.r() == 0) { break } n = q.bb(); vm(q, n); mn(k, j); um(j, n); c += n } } if (!(o.e == 1 && o.b[0] == 1)) { throw new nk(vs) } Qh(j, b) >= 0 && pn(j, b); j = rn(b, j); i = Jm(b); if (c > f) { j = Ym(j, (Oh(), Jh), b, i); c = c - f } j = Ym(j, Ai(f - c), b, i); return j }
function Xf(a, b) { var c; c = a.f - b.f; if (a.b == 0 && a.g != -1) { if (c <= 0) { return Mf(b) } if (b.b == 0 && b.g != -1) { return a } } else if (b.b == 0 && b.g != -1) { if (c >= 0) { return a } } if (c == 0) { if (gl(a.b, b.b) + 1 < 54) { return new pg(a.g - b.g, a.f) } return new og(rn((!a.d && (a.d = Li(a.g)), a.d), (!b.d && (b.d = Li(b.g)), b.d)), a.f) } else if (c > 0) { if (c < hf.length && gl(a.b, b.b + jf[Bc(c)]) + 1 < 54) { return new pg(a.g - b.g * hf[Bc(c)], a.f) } return new og(rn((!a.d && (a.d = Li(a.g)), a.d), mo((!b.d && (b.d = Li(b.g)), b.d), Bc(c))), a.f) } else { c = -c; if (c < hf.length && gl(a.b + jf[Bc(c)], b.b) + 1 < 54) { return new pg(a.g * hf[Bc(c)] - b.g, b.f) } return new og(rn(mo((!a.d && (a.d = Li(a.g)), a.d), Bc(c)), (!b.d && (b.d = Li(b.g)), b.d)), b.f) } }
function Df(a, b) { var c, d, e, f, g, i, j; mc(Xd, { 6: 1 }, 17, [(!a.d && (a.d = Li(a.g)), a.d)]); f = a.f - b.f; j = 0; c = 1; e = nf.length - 1; if (b.b == 0 && b.g != -1) { throw new nk(_r) } if ((b.e > 0 ? b.e : el((b.b - 1) * 0.3010299956639812) + 1) + f > (a.e > 0 ? a.e : el((a.b - 1) * 0.3010299956639812) + 1) + 1 || a.b == 0 && a.g != -1) { d = (Oh(), Nh) } else if (f == 0) { d = Th((!a.d && (a.d = Li(a.g)), a.d), (!b.d && (b.d = Li(b.g)), b.d)) } else if (f > 0) { g = po(f); d = Th((!a.d && (a.d = Li(a.g)), a.d), ei((!b.d && (b.d = Li(b.g)), b.d), g)); d = ei(d, g) } else { g = po(-f); d = Th(ei((!a.d && (a.d = Li(a.g)), a.d), g), (!b.d && (b.d = Li(b.g)), b.d)); while (!d.gb(0)) { i = Uh(d, nf[c]); if (i[1].r() == 0 && j - c >= f) { j -= c; c < e && ++c; d = i[0] } else { if (c == 1) { break } c = 1 } } f = j } return d.r() == 0 ? Ig(f) : new dg(d, Dg(f)) }
function Fm(a, b) { Em(); var c, d, e, f, g, i, j, k, n, o, q, r, s, t, u, v, w, x; u = a.f; o = a.e; i = a.b; if (u == 0) { return Tr } if (o == 1) { j = i[0]; x = qe(ue(j), yr); u < 0 && (x = Be(x)); return cl(x, b) } if (b == 10 || b < 2 || b > 36) { return Hm(a, 0) } d = Math.log(b) / Math.log(2); s = Bc(sm(new Pi(a.f < 0 ? new si(1, a.e, a.b) : a)) / d + (u < 0 ? 1 : 0)) + 1; t = lc(Md, { 6: 1 }, -1, s, 1); f = s; if (b != 16) { v = lc(Od, { 6: 1 }, -1, o, 1); nm(i, 0, v, 0, o); w = o; e = Dm[b]; c = Cm[b - 2]; while (true) { r = Mm(v, v, w, c); q = f; do { t[--f] = uk(r % b, b) } while ((r = ~~(r / b)) != 0 && f != 0); g = e - q + f; for (k = 0; k < g && f > 0; ++k) { t[--f] = 48 } for (k = w - 1; k > 0 && v[k] == 0; --k) { } w = k + 1; if (w == 1 && v[0] == 0) { break } } } else { for (k = 0; k < o; ++k) { for (n = 0; n < 8 && f > 0; ++n) { r = ~~i[k] >> (n << 2) & 15; t[--f] = uk(r, 16) } } } while (t[f] == 48) { ++f } u == -1 && (t[--f] = 45); return Ll(t, f, s - f) }
function Km(a, b, c, d, e, f) { var g, i, j, k, n, o, q, r, s, t, u, v, w, x, y, z, A; u = lc(Od, { 6: 1 }, -1, d + 1, 1); v = lc(Od, { 6: 1 }, -1, f + 1, 1); j = $k(e[f - 1]); if (j != 0) { xm(v, e, 0, j); xm(u, c, 0, j) } else { nm(c, 0, u, 0, d); nm(e, 0, v, 0, f) } k = v[f - 1]; o = b - 1; q = d; while (o >= 0) { if (u[q] == k) { n = -1 } else { w = pe(Ee(qe(ue(u[q]), yr), 32), qe(ue(u[q - 1]), yr)); z = Nm(w, k); n = Je(z); y = Je(Fe(z, 32)); if (n != 0) { x = false; ++n; do { --n; if (x) { break } s = Ae(qe(ue(n), yr), qe(ue(v[f - 2]), yr)); A = pe(Ee(ue(y), 32), qe(ue(u[q - 2]), yr)); t = pe(qe(ue(y), yr), qe(ue(k), yr)); $k(Je(Ge(t, 32))) < 32 ? (x = true) : (y = Je(t)) } while (ve(Le(s, Gr), Le(A, Gr))) } } if (n != 0) { g = $m(u, q - f, v, f, n); if (g != 0) { --n; i = ur; for (r = 0; r < f; ++r) { i = pe(i, pe(qe(ue(u[q - f + r]), yr), qe(ue(v[r]), yr))); u[q - f + r] = Je(i); i = Ge(i, 32) } } } a != null && (a[o] = n); --q; --o } if (j != 0) { Am(v, f, u, 0, j); return v } nm(u, 0, v, 0, f); return u }
function Vm(a, b) { var c, d, e, f, g, i, j, k, n, o, q; f = gl(a.e, b.e); n = lc(Od, { 6: 1 }, -1, f + 1, 1); q = lc(Od, { 6: 1 }, -1, f + 1, 1); nm(b.b, 0, n, 0, b.e); nm(a.b, 0, q, 0, a.e); k = new si(b.f, b.e, n); o = new si(a.f, a.e, q); i = new si(0, 1, lc(Od, { 6: 1 }, -1, f + 1, 1)); j = new si(1, 1, lc(Od, { 6: 1 }, -1, f + 1, 1)); j.b[0] = 1; c = 0; d = 0; g = b.ab(); while (!Um(k, c) && !Um(o, d)) { e = Sm(k, g); if (e != 0) { um(k, e); if (c >= d) { um(i, e) } else { vm(j, d - c < e ? d - c : e); e - (d - c) > 0 && um(i, e - d + c) } c += e } e = Sm(o, g); if (e != 0) { um(o, e); if (d >= c) { um(j, e) } else { vm(i, c - d < e ? c - d : e); e - (c - d) > 0 && um(j, e - c + d) } d += e } if (k.r() == o.r()) { if (c <= d) { ln(k, o); ln(i, j) } else { ln(o, k); ln(j, i) } } else { if (c <= d) { kn(k, o); kn(i, j) } else { kn(o, k); kn(j, i) } } if (o.r() == 0 || k.r() == 0) { throw new nk(vs) } } if (Um(o, d)) { i = j; o.r() != k.r() && (k = k.cb()) } k.gb(g) && (i.r() < 0 ? (i = i.cb()) : (i = rn(b, i))); i.r() < 0 && (i = fn(i, b)); return i }
function We() { var c = navigator.userAgent.toLowerCase(); var d = function (a) { return parseInt(a[1]) * 1000 + parseInt(a[2]) }; if (function () { return c.indexOf(Wr) != -1 }()) return Wr; if (function () { return c.indexOf('webkit') != -1 || function () { if (c.indexOf('chromeframe') != -1) { return true } if (typeof window['ActiveXObject'] != Xr) { try { var b = new ActiveXObject('ChromeTab.ChromeFrame'); if (b) { b.registerBhoIfNeeded(); return true } } catch (a) { } } return false }() }()) return Sr; if (function () { return c.indexOf(Yr) != -1 && $doc.documentMode >= 9 }()) return 'ie9'; if (function () { return c.indexOf(Yr) != -1 && $doc.documentMode >= 8 }()) return 'ie8'; if (function () { var a = /msie ([0-9]+)\.([0-9]+)/.exec(c); if (a && a.length == 3) return d(a) >= 6000 }()) return 'ie6'; if (function () { return c.indexOf('gecko') != -1 }()) return 'gecko1_8'; return 'unknown' }
function Kn(a, b) { var c, d, e, f, g, i, j, k; j = gl(b.e, a.e); e = Zh(b); f = Zh(a); if (e < f) { i = lc(Od, { 6: 1 }, -1, j, 1); d = e; i[e] = b.b[e]; g = hl(b.e, f); for (++d; d < g; ++d) { i[d] = b.b[d] } if (d == b.e) { for (; d < a.e; ++d) { i[d] = a.b[d] } } } else if (f < e) { i = lc(Od, { 6: 1 }, -1, j, 1); d = f; i[f] = -a.b[f]; g = hl(a.e, e); for (++d; d < g; ++d) { i[d] = ~a.b[d] } if (d == e) { i[d] = ~(a.b[d] ^ -b.b[d]); ++d } else { for (; d < e; ++d) { i[d] = -1 } for (; d < b.e; ++d) { i[d] = b.b[d] } } } else { d = e; c = a.b[e] ^ -b.b[e]; if (c == 0) { g = hl(a.e, b.e); for (++d; d < g && (c = a.b[d] ^ ~b.b[d]) == 0; ++d) { } if (c == 0) { for (; d < a.e && (c = ~a.b[d]) == 0; ++d) { } for (; d < b.e && (c = ~b.b[d]) == 0; ++d) { } if (c == 0) { j = j + 1; i = lc(Od, { 6: 1 }, -1, j, 1); i[j - 1] = 1; k = new si(-1, j, i); return k } } } i = lc(Od, { 6: 1 }, -1, j, 1); i[d] = -c; ++d } g = hl(b.e, a.e); for (; d < g; ++d) { i[d] = ~(~b.b[d] ^ a.b[d]) } for (; d < a.e; ++d) { i[d] = a.b[d] } for (; d < b.e; ++d) { i[d] = b.b[d] } k = new si(-1, j, i); Sh(k); return k }
function rf() { rf = rr; var a, b; lf = new qg(sr, 0); mf = new qg(tr, 0); of = new qg(ur, 0); df = lc(Wd, { 6: 1 }, 16, 11, 0); ef = lc(Md, { 6: 1 }, -1, 100, 1); ff = mc(Nd, { 6: 1 }, -1, [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 152587890625, 762939453125, 3814697265625, 19073486328125, 95367431640625, 476837158203125, 2384185791015625]); gf = lc(Od, { 6: 1 }, -1, ff.length, 1); hf = mc(Nd, { 6: 1 }, -1, [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000]); jf = lc(Od, { 6: 1 }, -1, hf.length, 1); pf = lc(Wd, { 6: 1 }, 16, 11, 0); a = 0; for (; a < pf.length; ++a) { nc(df, a, new qg(ue(a), 0)); nc(pf, a, new qg(ur, a)); ef[a] = 48 } for (; a < ef.length; ++a) { ef[a] = 48 } for (b = 0; b < gf.length; ++b) { gf[b] = sg(ff[b]) } for (b = 0; b < jf.length; ++b) { jf[b] = sg(hf[b]) } nf = (go(), co); kf = bo }
function Hf(a, b) { var c, d, e, f, g, i, j, k, n, o; c = 0; i = 0; g = b.length; n = new gm(b.length); if (0 < g && b.charCodeAt(0) == 43) { ++i; ++c; if (i < g && (b.charCodeAt(i) == 43 || b.charCodeAt(i) == 45)) { throw new pl(Zr + b + $r) } } e = 0; o = false; for (; i < g && b.charCodeAt(i) != 46 && b.charCodeAt(i) != 101 && b.charCodeAt(i) != 69; ++i) { o || (b.charCodeAt(i) == 48 ? ++e : (o = true)) } am(n, b, c, i); if (i < g && b.charCodeAt(i) == 46) { ++i; c = i; for (; i < g && b.charCodeAt(i) != 101 && b.charCodeAt(i) != 69; ++i) { o || (b.charCodeAt(i) == 48 ? ++e : (o = true)) } a.f = i - c; am(n, b, c, i) } else { a.f = 0 } if (i < g && (b.charCodeAt(i) == 101 || b.charCodeAt(i) == 69)) { ++i; c = i; if (i < g && b.charCodeAt(i) == 43) { ++i; i < g && b.charCodeAt(i) != 45 && ++c } j = b.substr(c, g - c); a.f = a.f - af(j, 10); if (a.f != Bc(a.f)) { throw new pl('Scale out of range.') } } k = n.b.b; if (k.length < 16) { a.g = zg(k); if (Hk(a.g)) { throw new pl(Zr + b + $r) } a.b = sg(a.g) } else { Tf(a, new oi(k)) } a.e = n.b.b.length - e; for (f = 0; f < n.b.b.length; ++f) { d = vl(n.b.b, f); if (d != 45 && d != 48) { break } --a.e } }
function Im(a, b) { Em(); var c, d, e, f, g, i, j, k, n, o; g = xe(a, ur); g && (a = Be(a)); if (se(a, ur)) { switch (b) { case 0: return Tr; case 1: return zs; case 2: return As; case 3: return Bs; case 4: return Cs; case 5: return Ds; case 6: return Es; default: k = new fm; b < 0 ? (k.b.b += Fs, k) : (k.b.b += Gs, k); cc(k.b, b == -2147483648 ? '2147483648' : Lr + -b); return k.b.b; } } j = lc(Md, { 6: 1 }, -1, 19, 1); c = 18; o = a; do { i = o; o = re(o, tr); j[--c] = Je(pe(Cr, He(i, Ae(o, tr)))) & 65535 } while (Ce(o, ur)); d = He(He(He(Dr, ue(c)), ue(b)), sr); if (b == 0) { g && (j[--c] = 45); return Ll(j, c, 18 - c) } if (b > 0 && we(d, Er)) { if (we(d, ur)) { e = c + Je(d); for (f = 17; f >= e; --f) { j[f + 1] = j[f] } j[++e] = 46; g && (j[--c] = 45); return Ll(j, c, 18 - c + 1) } for (f = 2; xe(ue(f), pe(Be(d), sr)); ++f) { j[--c] = 48 } j[--c] = 46; j[--c] = 48; g && (j[--c] = 45); return Ll(j, c, 18 - c) } n = c + 1; k = new gm; g && (k.b.b += Ur, k); if (18 - n >= 1) { Zl(k, j[c]); k.b.b += ds; dc(k.b, Ll(j, c + 1, 18 - c - 1)) } else { dc(k.b, Ll(j, c, 18 - c)) } k.b.b += fs; ve(d, ur) && (k.b.b += gs, k); cc(k.b, Lr + Ke(d)); return k.b.b }
function Ef(a, b, c) { var d, e, f, g, i, j, k, n, o, q, r, s, t; n = c.b; e = Pf(a) - b.q(); k = nf.length - 1; f = a.f - b.f; o = f; r = e - f + 1; q = lc(Xd, { 6: 1 }, 17, 2, 0); if (n == 0 || a.b == 0 && a.g != -1 || b.b == 0 && b.g != -1) { return Df(a, b) } if (r <= 0) { nc(q, 0, (Oh(), Nh)) } else if (f == 0) { nc(q, 0, Th((!a.d && (a.d = Li(a.g)), a.d), (!b.d && (b.d = Li(b.g)), b.d))) } else if (f > 0) { nc(q, 0, Th((!a.d && (a.d = Li(a.g)), a.d), ei((!b.d && (b.d = Li(b.g)), b.d), po(f)))); o = f < (n - r + 1 > 0 ? n - r + 1 : 0) ? f : n - r + 1 > 0 ? n - r + 1 : 0; nc(q, 0, ei(q[0], po(o))) } else { g = -f < (n - e > 0 ? n - e : 0) ? -f : n - e > 0 ? n - e : 0; q = Uh(ei((!a.d && (a.d = Li(a.g)), a.d), po(g)), (!b.d && (b.d = Li(b.g)), b.d)); o += g; g = -o; if (q[1].r() != 0 && g > 0) { d = (new cg(q[1])).q() + g - b.q(); if (d == 0) { nc(q, 1, Th(ei(q[1], po(g)), (!b.d && (b.d = Li(b.g)), b.d))); d = dl(q[1].r()) } if (d > 0) { throw new nk(as) } } } if (q[0].r() == 0) { return Ig(f) } t = q[0]; j = new cg(q[0]); s = j.q(); i = 1; while (!t.gb(0)) { q = Uh(t, nf[i]); if (q[1].r() == 0 && (s - i >= n || o - i >= f)) { s -= i; o -= i; i < k && ++i; t = q[0] } else { if (i == 1) { break } i = 1 } } if (s > n) { throw new nk(as) } j.f = Dg(o); Tf(j, t); return j }
function Ve() { var a, b, c; b = $doc.compatMode; a = mc(Vd, { 6: 1 }, 1, [Vr]); for (c = 0; c < a.length; ++c) { if (wl(a[c], b)) { return } } a.length == 1 && wl(Vr, a[0]) && wl('BackCompat', b) ? "GWT no longer supports Quirks Mode (document.compatMode=' BackCompat').<br>Make sure your application's host HTML page has a Standards Mode (document.compatMode=' CSS1Compat') doctype,<br>e.g. by using <!doctype html> at the start of your application's HTML page.<br><br>To continue using this unsupported rendering mode and risk layout problems, suppress this message by adding<br>the following line to your*.gwt.xml module file:<br> <extend-configuration-property name=\"document.compatMode\" value=\"" + b + '"/>' : "Your *.gwt.xml module configuration prohibits the use of the current doucment rendering mode (document.compatMode=' " + b + "').<br>Modify your application's host HTML page doctype, or update your custom 'document.compatMode' configuration property settings." }
function Lg(a) { rf(); var b, c; c = Lj(a); if (c == is) b = new cg(new oi(a[0].toString())); else if (c == 'BigInteger number') b = new dg(new oi(a[0].toString()), a[1]); else if (c == 'BigInteger number MathContext') b = new eg(new oi(a[0].toString()), a[1], new Yn(a[2].toString())); else if (c == 'BigInteger MathContext') b = new fg(new oi(a[0].toString()), new Yn(a[1].toString())); else if (c == js) b = new gg(Cl(a[0].toString())); else if (c == 'array number number') b = new hg(Cl(a[0].toString()), a[1], a[2]); else if (c == 'array number number MathContext') b = new ig(Cl(a[0].toString()), a[1], a[2], new Yn(a[3].toString())); else if (c == 'array MathContext') b = new jg(Cl(a[0].toString()), new Yn(a[1].toString())); else if (c == ks) b = new kg(a[0]); else if (c == ls) b = new lg(a[0], new Yn(a[1].toString())); else if (c == ms) b = new mg(a[0].toString()); else if (c == 'string MathContext') b = new ng(a[0].toString(), new Yn(a[1].toString())); else throw new V('Unknown call signature for obj = new java.math.BigDecimal: ' + c); return new Kg(b) }
function uo() { uo = rr; var a; ro = mc(Od, { 6: 1 }, -1, [0, 0, 1854, 1233, 927, 747, 627, 543, 480, 431, 393, 361, 335, 314, 295, 279, 265, 253, 242, 232, 223, 216, 181, 169, 158, 150, 145, 140, 136, 132, 127, 123, 119, 114, 110, 105, 101, 96, 92, 87, 83, 78, 73, 69, 64, 59, 54, 49, 44, 38, 32, 26, 1]); to = mc(Od, { 6: 1 }, -1, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021]); so = lc(Xd, { 6: 1 }, 17, to.length, 0); for (a = 0; a < to.length; ++a) { nc(so, a, Ki(ue(to[a]))) } }
function Xj() { nr(rs, Lr); if ($wnd.bigdecimal.MathContext) { var b = $wnd.bigdecimal.MathContext } $wnd.bigdecimal.MathContext = Jr(function () { if (arguments.length == 1 && arguments[0] != null && arguments[0].gC() == Uc) { this.__gwt_instance = arguments[0] } else if (arguments.length == 0) { this.__gwt_instance = new Nj; or(this.__gwt_instance, this) } else if (arguments.length == 1) { this.__gwt_instance = Zj(arguments[0]); or(this.__gwt_instance, this) } }); var c = $wnd.bigdecimal.MathContext.prototype = new Object; if (b) { for (p in b) { $wnd.bigdecimal.MathContext[p] = b[p] } } c.getPrecision = jr(Number, Jr(function () { var a = this.__gwt_instance.Hb(); return a })); c.getRoundingMode = Jr(function () { var a = this.__gwt_instance.Ib(); return pr(a) }); c.hashCode = jr(Number, Jr(function () { var a = this.__gwt_instance.hC(); return a })); c.toString = Jr(function () { var a = this.__gwt_instance.tS(); return a }); $wnd.bigdecimal.MathContext.DECIMAL128 = Jr(function () { var a = new Oj(Wn((Un(), On))); return pr(a) }); $wnd.bigdecimal.MathContext.DECIMAL32 = Jr(function () { var a = new Oj(Wn((Un(), Pn))); return pr(a) }); $wnd.bigdecimal.MathContext.DECIMAL64 = Jr(function () { var a = new Oj(Wn((Un(), Qn))); return pr(a) }); $wnd.bigdecimal.MathContext.UNLIMITED = Jr(function () { var a = new Oj(Wn((Un(), Rn))); return pr(a) }); mr(Uc, $wnd.bigdecimal.MathContext) }
function Hm(a, b) { Em(); var c, d, e, f, g, i, j, k, n, o, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E; z = a.f; q = a.e; e = a.b; if (z == 0) { switch (b) { case 0: return Tr; case 1: return zs; case 2: return As; case 3: return Bs; case 4: return Cs; case 5: return Ds; case 6: return Es; default: x = new fm; b < 0 ? (x.b.b += Fs, x) : (x.b.b += Gs, x); ac(x.b, -b); return x.b.b; } } v = q * 10 + 1 + 7; w = lc(Md, { 6: 1 }, -1, v + 1, 1); c = v; if (q == 1) { g = e[0]; if (g < 0) { E = qe(ue(g), yr); do { r = E; E = re(E, tr); w[--c] = 48 + Je(He(r, Ae(E, tr))) & 65535 } while (Ce(E, ur)) } else { E = g; do { r = E; E = ~~(E / 10); w[--c] = 48 + (r - E * 10) & 65535 } while (E != 0) } } else { B = lc(Od, { 6: 1 }, -1, q, 1); D = q; nm(e, 0, B, 0, q); F: while (true) { y = ur; for (j = D - 1; j >= 0; --j) { C = pe(Ee(y, 32), qe(ue(B[j]), yr)); t = Gm(C); B[j] = Je(t); y = ue(Je(Fe(t, 32))) } u = Je(y); s = c; do { w[--c] = 48 + u % 10 & 65535 } while ((u = ~~(u / 10)) != 0 && c != 0); d = 9 - s + c; for (i = 0; i < d && c > 0; ++i) { w[--c] = 48 } n = D - 1; for (; B[n] == 0; --n) { if (n == 0) { break F } } D = n + 1 } while (w[c] == 48) { ++c } } o = z < 0; f = v - c - b - 1; if (b == 0) { o && (w[--c] = 45); return Ll(w, c, v - c) } if (b > 0 && f >= -6) { if (f >= 0) { k = c + f; for (n = v - 1; n >= k; --n) { w[n + 1] = w[n] } w[++k] = 46; o && (w[--c] = 45); return Ll(w, c, v - c + 1) } for (n = 2; n < -f + 1; ++n) { w[--c] = 48 } w[--c] = 46; w[--c] = 48; o && (w[--c] = 45); return Ll(w, c, v - c) } A = c + 1; x = new gm; o && (x.b.b += Ur, x); if (v - A >= 1) { Zl(x, w[c]); x.b.b += ds; dc(x.b, Ll(w, c + 1, v - c - 1)) } else { dc(x.b, Ll(w, c, v - c)) } x.b.b += fs; f > 0 && (x.b.b += gs, x); cc(x.b, Lr + f); return x.b.b }
function jk() { nr(rs, Lr); if ($wnd.bigdecimal.RoundingMode) { var c = $wnd.bigdecimal.RoundingMode } $wnd.bigdecimal.RoundingMode = Jr(function () { if (arguments.length == 1 && arguments[0] != null && arguments[0].gC() == Wc) { this.__gwt_instance = arguments[0] } else if (arguments.length == 0) { this.__gwt_instance = new ak; or(this.__gwt_instance, this) } }); var d = $wnd.bigdecimal.RoundingMode.prototype = new Object; if (c) { for (p in c) { $wnd.bigdecimal.RoundingMode[p] = c[p] } } $wnd.bigdecimal.RoundingMode.valueOf = Jr(function (a) { var b = new bk((Qo(), Ok((Yo(), Xo), a))); return pr(b) }); $wnd.bigdecimal.RoundingMode.values = Jr(function () { var a = fk(); return qr(a) }); d.name = Jr(function () { var a = this.__gwt_instance.Jb(); return a }); d.toString = Jr(function () { var a = this.__gwt_instance.tS(); return a }); $wnd.bigdecimal.RoundingMode.CEILING = Jr(function () { var a = new bk((Qo(), Ao)); return pr(a) }); $wnd.bigdecimal.RoundingMode.DOWN = Jr(function () { var a = new bk((Qo(), Bo)); return pr(a) }); $wnd.bigdecimal.RoundingMode.FLOOR = Jr(function () { var a = new bk((Qo(), Co)); return pr(a) }); $wnd.bigdecimal.RoundingMode.HALF_DOWN = Jr(function () { var a = new bk((Qo(), Do)); return pr(a) }); $wnd.bigdecimal.RoundingMode.HALF_EVEN = Jr(function () { var a = new bk((Qo(), Eo)); return pr(a) }); $wnd.bigdecimal.RoundingMode.HALF_UP = Jr(function () { var a = new bk((Qo(), Fo)); return pr(a) }); $wnd.bigdecimal.RoundingMode.UNNECESSARY = Jr(function () { var a = new bk((Qo(), Go)); return pr(a) }); $wnd.bigdecimal.RoundingMode.UP = Jr(function () { var a = new bk((Qo(), Ho)); return pr(a) }); mr(Wc, $wnd.bigdecimal.RoundingMode) }
function Hj() { nr(rs, Lr); if ($wnd.bigdecimal.BigInteger) { var d = $wnd.bigdecimal.BigInteger } $wnd.bigdecimal.BigInteger = Jr(function () { if (arguments.length == 1 && arguments[0] != null && arguments[0].gC() == Sc) { this.__gwt_instance = arguments[0] } else if (arguments.length == 0) { this.__gwt_instance = new Ni; or(this.__gwt_instance, this) } else if (arguments.length == 1) { this.__gwt_instance = Jj(arguments[0]); or(this.__gwt_instance, this) } }); var e = $wnd.bigdecimal.BigInteger.prototype = new Object; if (d) { for (p in d) { $wnd.bigdecimal.BigInteger[p] = d[p] } } $wnd.bigdecimal.BigInteger.__init__ = Jr(function (a) { var b = Qi(a); return pr(b) }); e.abs = Jr(function () { var a = this.__gwt_instance._(); return pr(a) }); e.add = Jr(function (a) { var b = this.__gwt_instance.hb(a.__gwt_instance); return pr(b) }); e.and = Jr(function (a) { var b = this.__gwt_instance.ib(a.__gwt_instance); return pr(b) }); e.andNot = Jr(function (a) { var b = this.__gwt_instance.jb(a.__gwt_instance); return pr(b) }); e.bitCount = jr(Number, Jr(function () { var a = this.__gwt_instance.kb(); return a })); e.bitLength = jr(Number, Jr(function () { var a = this.__gwt_instance.ab(); return a })); e.clearBit = Jr(function (a) { var b = this.__gwt_instance.lb(a); return pr(b) }); e.compareTo = jr(Number, Jr(function (a) { var b = this.__gwt_instance.mb(a.__gwt_instance); return b })); e.divide = Jr(function (a) { var b = this.__gwt_instance.nb(a.__gwt_instance); return pr(b) }); e.doubleValue = jr(Number, Jr(function () { var a = this.__gwt_instance.z(); return a })); e.equals = jr(Number, Jr(function (a) { var b = this.__gwt_instance.eQ(a); return b })); e.flipBit = Jr(function (a) { var b = this.__gwt_instance.pb(a); return pr(b) }); e.floatValue = jr(Number, Jr(function () { var a = this.__gwt_instance.A(); return a })); e.gcd = Jr(function (a) { var b = this.__gwt_instance.qb(a.__gwt_instance); return pr(b) }); e.getLowestSetBit = jr(Number, Jr(function () { var a = this.__gwt_instance.bb(); return a })); e.hashCode = jr(Number, Jr(function () { var a = this.__gwt_instance.hC(); return a })); e.intValue = jr(Number, Jr(function () { var a = this.__gwt_instance.B(); return a })); e.isProbablePrime = jr(Number, Jr(function (a) { var b = this.__gwt_instance.rb(a); return b })); e.max = Jr(function (a) { var b = this.__gwt_instance.tb(a.__gwt_instance); return pr(b) }); e.min = Jr(function (a) { var b = this.__gwt_instance.ub(a.__gwt_instance); return pr(b) }); e.mod = Jr(function (a) { var b = this.__gwt_instance.vb(a.__gwt_instance); return pr(b) }); e.modInverse = Jr(function (a) { var b = this.__gwt_instance.wb(a.__gwt_instance); return pr(b) }); e.modPow = Jr(function (a, b) { var c = this.__gwt_instance.xb(a.__gwt_instance, b.__gwt_instance); return pr(c) }); e.multiply = Jr(function (a) { var b = this.__gwt_instance.yb(a.__gwt_instance); return pr(b) }); e.negate = Jr(function () { var a = this.__gwt_instance.cb(); return pr(a) }); e.nextProbablePrime = Jr(function () { var a = this.__gwt_instance.zb(); return pr(a) }); e.not = Jr(function () { var a = this.__gwt_instance.Ab(); return pr(a) }); e.or = Jr(function (a) { var b = this.__gwt_instance.Bb(a.__gwt_instance); return pr(b) }); e.pow = Jr(function (a) { var b = this.__gwt_instance.db(a); return pr(b) }); e.remainder = Jr(function (a) { var b = this.__gwt_instance.Cb(a.__gwt_instance); return pr(b) }); e.setBit = Jr(function (a) { var b = this.__gwt_instance.Db(a); return pr(b) }); e.shiftLeft = Jr(function (a) { var b = this.__gwt_instance.eb(a); return pr(b) }); e.shiftRight = Jr(function (a) { var b = this.__gwt_instance.fb(a); return pr(b) }); e.signum = jr(Number, Jr(function () { var a = this.__gwt_instance.r(); return a })); e.subtract = Jr(function (a) { var b = this.__gwt_instance.Eb(a.__gwt_instance); return pr(b) }); e.testBit = jr(Number, Jr(function (a) { var b = this.__gwt_instance.gb(a); return b })); e.toString_va = Jr(function (a) { var b = this.__gwt_instance.Fb(a); return b }); e.xor = Jr(function (a) { var b = this.__gwt_instance.Gb(a.__gwt_instance); return pr(b) }); e.divideAndRemainder = Jr(function (a) { var b = this.__gwt_instance.ob(a.__gwt_instance); return qr(b) }); e.longValue = jr(Number, Jr(function () { var a = this.__gwt_instance.sb(); return a })); $wnd.bigdecimal.BigInteger.valueOf = Jr(function (a) { var b = (Oh(), new Pi(Ki(te(a)))); return pr(b) }); $wnd.bigdecimal.BigInteger.ONE = Jr(function () { var a = (Oh(), new Pi(Jh)); return pr(a) }); $wnd.bigdecimal.BigInteger.TEN = Jr(function () { var a = (Oh(), new Pi(Lh)); return pr(a) }); $wnd.bigdecimal.BigInteger.ZERO = Jr(function () { var a = (Oh(), new Pi(Nh)); return pr(a) }); mr(Sc, $wnd.bigdecimal.BigInteger) }
function Dh() { nr(rs, Lr); if ($wnd.bigdecimal.BigDecimal) { var c = $wnd.bigdecimal.BigDecimal } $wnd.bigdecimal.BigDecimal = Jr(function () { if (arguments.length == 1 && arguments[0] != null && arguments[0].gC() == Qc) { this.__gwt_instance = arguments[0] } else if (arguments.length == 0) { this.__gwt_instance = new Jg; or(this.__gwt_instance, this) } }); var d = $wnd.bigdecimal.BigDecimal.prototype = new Object; if (c) { for (p in c) { $wnd.bigdecimal.BigDecimal[p] = c[p] } } $wnd.bigdecimal.BigDecimal.ROUND_CEILING = 2; $wnd.bigdecimal.BigDecimal.ROUND_DOWN = 1; $wnd.bigdecimal.BigDecimal.ROUND_FLOOR = 3; $wnd.bigdecimal.BigDecimal.ROUND_HALF_DOWN = 5; $wnd.bigdecimal.BigDecimal.ROUND_HALF_EVEN = 6; $wnd.bigdecimal.BigDecimal.ROUND_HALF_UP = 4; $wnd.bigdecimal.BigDecimal.ROUND_UNNECESSARY = 7; $wnd.bigdecimal.BigDecimal.ROUND_UP = 0; $wnd.bigdecimal.BigDecimal.__init__ = Jr(function (a) { var b = Lg(a); return pr(b) }); d.abs_va = Jr(function (a) { var b = this.__gwt_instance.s(a); return pr(b) }); d.add_va = Jr(function (a) { var b = this.__gwt_instance.t(a); return pr(b) }); d.byteValueExact = jr(Number, Jr(function () { var a = this.__gwt_instance.u(); return a })); d.compareTo = jr(Number, Jr(function (a) { var b = this.__gwt_instance.v(a.__gwt_instance); return b })); d.divide_va = Jr(function (a) { var b = this.__gwt_instance.y(a); return pr(b) }); d.divideToIntegralValue_va = Jr(function (a) { var b = this.__gwt_instance.x(a); return pr(b) }); d.doubleValue = jr(Number, Jr(function () { var a = this.__gwt_instance.z(); return a })); d.equals = jr(Number, Jr(function (a) { var b = this.__gwt_instance.eQ(a); return b })); d.floatValue = jr(Number, Jr(function () { var a = this.__gwt_instance.A(); return a })); d.hashCode = jr(Number, Jr(function () { var a = this.__gwt_instance.hC(); return a })); d.intValue = jr(Number, Jr(function () { var a = this.__gwt_instance.B(); return a })); d.intValueExact = jr(Number, Jr(function () { var a = this.__gwt_instance.C(); return a })); d.max = Jr(function (a) { var b = this.__gwt_instance.F(a.__gwt_instance); return pr(b) }); d.min = Jr(function (a) { var b = this.__gwt_instance.G(a.__gwt_instance); return pr(b) }); d.movePointLeft = Jr(function (a) { var b = this.__gwt_instance.H(a); return pr(b) }); d.movePointRight = Jr(function (a) { var b = this.__gwt_instance.I(a); return pr(b) }); d.multiply_va = Jr(function (a) { var b = this.__gwt_instance.J(a); return pr(b) }); d.negate_va = Jr(function (a) { var b = this.__gwt_instance.K(a); return pr(b) }); d.plus_va = Jr(function (a) { var b = this.__gwt_instance.L(a); return pr(b) }); d.pow_va = Jr(function (a) { var b = this.__gwt_instance.M(a); return pr(b) }); d.precision = jr(Number, Jr(function () { var a = this.__gwt_instance.q(); return a })); d.remainder_va = Jr(function (a) { var b = this.__gwt_instance.N(a); return pr(b) }); d.round = Jr(function (a) { var b = this.__gwt_instance.O(a.__gwt_instance); return pr(b) }); d.scale = jr(Number, Jr(function () { var a = this.__gwt_instance.P(); return a })); d.scaleByPowerOfTen = Jr(function (a) { var b = this.__gwt_instance.Q(a); return pr(b) }); d.setScale_va = Jr(function (a) { var b = this.__gwt_instance.R(a); return pr(b) }); d.shortValueExact = jr(Number, Jr(function () { var a = this.__gwt_instance.S(); return a })); d.signum = jr(Number, Jr(function () { var a = this.__gwt_instance.r(); return a })); d.stripTrailingZeros = Jr(function () { var a = this.__gwt_instance.T(); return pr(a) }); d.subtract_va = Jr(function (a) { var b = this.__gwt_instance.U(a); return pr(b) }); d.toBigInteger = Jr(function () { var a = this.__gwt_instance.V(); return pr(a) }); d.toBigIntegerExact = Jr(function () { var a = this.__gwt_instance.W(); return pr(a) }); d.toEngineeringString = Jr(function () { var a = this.__gwt_instance.X(); return a }); d.toPlainString = Jr(function () { var a = this.__gwt_instance.Y(); return a }); d.toString = Jr(function () { var a = this.__gwt_instance.tS(); return a }); d.ulp = Jr(function () { var a = this.__gwt_instance.Z(); return pr(a) }); d.unscaledValue = Jr(function () { var a = this.__gwt_instance.$(); return pr(a) }); d.divideAndRemainder_va = Jr(function (a) { var b = this.__gwt_instance.w(a); return qr(b) }); d.longValue = jr(Number, Jr(function () { var a = this.__gwt_instance.E(); return a })); d.longValueExact = jr(Number, Jr(function () { var a = this.__gwt_instance.D(); return a })); $wnd.bigdecimal.BigDecimal.valueOf_va = Jr(function (a) { var b = zh(a); return pr(b) }); $wnd.bigdecimal.BigDecimal.log = jr(Number, Jr(function (a) { rf(); typeof console !== Xr && console.log && console.log(a) })); $wnd.bigdecimal.BigDecimal.logObj = jr(Number, Jr(function (a) { rf(); typeof console !== Xr && console.log && typeof JSON !== Xr && JSON.stringify && console.log('object: ' + JSON.stringify(a)) })); $wnd.bigdecimal.BigDecimal.ONE = Jr(function () { var a = (rf(), new Kg(lf)); return pr(a) }); $wnd.bigdecimal.BigDecimal.TEN = Jr(function () { var a = (rf(), new Kg(mf)); return pr(a) }); $wnd.bigdecimal.BigDecimal.ZERO = Jr(function () { var a = (rf(), new Kg(of)); return pr(a) }); mr(Qc, $wnd.bigdecimal.BigDecimal) }
var Lr = '', ys = ' ', $r = '"', Or = '(', gs = '+', Is = ', ', Ur = '-', ds = '.', Tr = '0', es = '0.', zs = '0.0', As = '0.00', Bs = '0.000', Cs = '0.0000', Ds = '0.00000', Es = '0.000000', Gs = '0E', Fs = '0E+', Qr = ':', Kr = ': ', Js = '=', ps = 'BigDecimal', qs = 'BigDecimal MathContext', Ts = 'BigDecimal;', is = 'BigInteger', ss = 'BigInteger divide by zero', vs = 'BigInteger not invertible.', us = 'BigInteger: modulus not positive', Us = 'BigInteger;', Vr = 'CSS1Compat', _r = 'Division by zero', as = 'Division impossible', fs = 'E', Zr = 'For input string: "', hs = 'Infinite or NaN', bs = 'Invalid Operation', os = 'MathContext', ts = 'Negative bit address', cs = 'Rounding necessary', xs = 'RoundingMode', Vs = 'RoundingMode;', Nr = 'String', Rr = '[', Ss = '[Lcom.iriscouch.gwtapp.client.', Os = '[Ljava.lang.', Ws = '[Ljava.math.', Ks = '\\.', Ls = '__gwtex_wrap', Pr = 'anonymous', js = 'array', Hs = 'bad string format', rs = 'bigdecimal', Ns = 'com.google.gwt.core.client.', Ps = 'com.google.gwt.core.client.impl.', Rs = 'com.iriscouch.gwtapp.client.', Ms = 'java.lang.', Qs = 'java.math.', Xs = 'java.util.', Yr = 'msie', Mr = 'null', ks = 'number', ls = 'number MathContext', ns = 'number number', ws = 'object', Wr = 'opera', Ys = 'org.timepedia.exporter.client.', Sr = 'safari', ms = 'string', Xr = 'undefined'; var _, Gr = { l: 0, m: 0, h: 524288 }, zr = { l: 0, m: 4193280, h: 1048575 }, Er = { l: 4194298, m: 4194303, h: 1048575 }, wr = { l: 4194303, m: 4194303, h: 1048575 }, ur = { l: 0, m: 0, h: 0 }, sr = { l: 1, m: 0, h: 0 }, vr = { l: 2, m: 0, h: 0 }, Hr = { l: 5, m: 0, h: 0 }, tr = { l: 10, m: 0, h: 0 }, xr = { l: 11, m: 0, h: 0 }, Dr = { l: 18, m: 0, h: 0 }, Cr = { l: 48, m: 0, h: 0 }, Br = { l: 877824, m: 119, h: 0 }, Ar = { l: 1755648, m: 238, h: 0 }, Ir = { l: 4194303, m: 511, h: 0 }, yr = { l: 4194303, m: 1023, h: 0 }, Fr = { l: 0, m: 1024, h: 0 }; _ = H.prototype = {}; _.eQ = function I(a) { return this === a }; _.gC = function J() { return gd }; _.hC = function K() { return ob(this) }; _.tS = function L() { return this.gC().d + '@' + al(this.hC()) }; _.toString = function () { return this.tS() }; _.tM = rr; _.cM = {}; _ = P.prototype = new H; _.gC = function R() { return nd }; _.j = function S() { return this.f }; _.tS = function T() { var a, b; a = this.gC().d; b = this.j(); return b != null ? a + Kr + b : a }; _.cM = { 6: 1, 15: 1 }; _.f = null; _ = O.prototype = new P; _.gC = function U() { return ad }; _.cM = { 6: 1, 15: 1 }; _ = V.prototype = N.prototype = new O; _.gC = function W() { return hd }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = X.prototype = M.prototype = new N; _.gC = function Y() { return Fc }; _.j = function ab() { this.d == null && (this.e = bb(this.c), this.b = Z(this.c), this.d = Or + this.e + '): ' + this.b + db(this.c), undefined); return this.d }; _.cM = { 6: 1, 12: 1, 15: 1 }; _.b = null; _.c = null; _.d = null; _.e = null; _ = gb.prototype = new H; _.gC = function hb() { return Hc }; var ib = 0, jb = 0; _ = ub.prototype = pb.prototype = new gb; _.gC = function vb() { return Ic }; _.b = null; _.c = null; var qb; _ = Fb.prototype = Ab.prototype = new H; _.k = function Gb() { var a = {}; var b = []; var c = arguments.callee.caller.caller; while (c) { var d = this.n(c.toString()); b.push(d); var e = Qr + d; var f = a[e]; if (f) { var g, i; for (g = 0, i = f.length; g < i; g++) { if (f[g] === c) { return b } } } (f || (a[e] = [])).push(c); c = c.caller } return b }; _.n = function Hb(a) { return yb(a) }; _.gC = function Ib() { return Lc }; _.o = function Jb(a) { return [] }; _ = Lb.prototype = new Ab; _.k = function Nb() { return zb(this.o(Eb()), this.p()) }; _.gC = function Ob() { return Kc }; _.o = function Pb(a) { return Mb(this, a) }; _.p = function Qb() { return 2 }; _ = Tb.prototype = Kb.prototype = new Lb; _.k = function Ub() { return Rb(this) }; _.n = function Vb(a) { var b, c; if (a.length == 0) { return Pr } c = Dl(a); c.indexOf('at ') == 0 && (c = Al(c, 3)); b = c.indexOf(Rr); b == -1 && (b = c.indexOf(Or)); if (b == -1) { return Pr } else { c = Dl(c.substr(0, b - 0)) } b = yl(c, String.fromCharCode(46)); b != -1 && (c = Al(c, b + 1)); return c.length > 0 ? c : Pr }; _.gC = function Wb() { return Jc }; _.o = function Xb(a) { return Sb(this, a) }; _.p = function Yb() { return 3 }; _ = Zb.prototype = new H; _.gC = function $b() { return Nc }; _ = fc.prototype = _b.prototype = new Zb; _.gC = function gc() { return Mc }; _.b = Lr; _ = ic.prototype = hc.prototype = new H; _.gC = function kc() { return this.aC }; _.aC = null; _.qI = 0; var oc, pc; var ae = null; var oe = null; var Me, Ne, Oe, Pe; _ = Se.prototype = Re.prototype = new H; _.gC = function Te() { return Oc }; _.cM = { 2: 1 }; _ = Ze.prototype = new H; _.gC = function cf() { return fd }; _.cM = { 6: 1, 10: 1 }; var $e = null; _ = qg.prototype = pg.prototype = og.prototype = ng.prototype = mg.prototype = lg.prototype = kg.prototype = jg.prototype = ig.prototype = hg.prototype = gg.prototype = fg.prototype = eg.prototype = dg.prototype = cg.prototype = Ye.prototype = new Ze; _.eQ = function wg(a) { return Ff(this, a) }; _.gC = function xg() { return pd }; _.hC = function yg() { return Gf(this) }; _.q = function Ag() { return Pf(this) }; _.r = function Cg() { return Uf(this) }; _.tS = function Eg() { return ag(this) }; _.cM = { 6: 1, 8: 1, 10: 1, 16: 1 }; _.b = 0; _.c = 0; _.d = null; _.e = 0; _.f = 0; _.g = 0; _.i = null; var df, ef, ff, gf, hf, jf, kf = null, lf, mf, nf = null, of, pf, qf = null; _ = Kg.prototype = Jg.prototype = Xe.prototype = new Ye; _.s = function Mg(a) { var b, c, d; d = Lj(a); if (d == Lr) b = Uf(this) < 0 ? Mf(this) : this; else if (d == os) b = sf(Qf(this, new Yn(a[0].toString()))); else throw new V('Unknown call signature for interim = super.abs: ' + d); c = new Kg(b); return c }; _.t = function Ng(a) { var b, c, d; d = Lj(a); if (d == ps) b = tf(this, new mg(a[0].toString())); else if (d == qs) b = uf(this, new mg(a[0].toString()), new Yn(a[1].toString())); else throw new V('Unknown call signature for interim = super.add: ' + d); c = new Kg(b); return c }; _.u = function Og() { return ~~(Je(bg(this, 8)) << 24) >> 24 }; _.v = function Pg(a) { return vf(this, a) }; _.w = function Qg(a) { var b, c, d, e; e = Lj(a); if (e == ps) c = Bf(this, new mg(a[0].toString())); else if (e == qs) c = Cf(this, new mg(a[0].toString()), new Yn(a[1].toString())); else throw new V('Unknown call signature for interim = super.divideAndRemainder: ' + e); d = lc(Qd, { 6: 1 }, 3, c.length, 0); for (b = 0; b < c.length; ++b)d[b] = new Kg(c[b]); return d }; _.x = function Rg(a) { var b, c, d; d = Lj(a); if (d == ps) b = Df(this, new mg(a[0].toString())); else if (d == qs) b = Ef(this, new mg(a[0].toString()), new Yn(a[1].toString())); else throw new V('Unknown call signature for interim = super.divideToIntegralValue: ' + d); c = new Kg(b); return c }; _.y = function Sg(a) { var b, c, d; d = Lj(a); if (d == ps) b = wf(this, new mg(a[0].toString())); else if (d == 'BigDecimal number') b = xf(this, new mg(a[0].toString()), a[1]); else if (d == 'BigDecimal number number') b = yf(this, new mg(a[0].toString()), a[1], Uo(a[2])); else if (d == 'BigDecimal number RoundingMode') b = yf(this, new mg(a[0].toString()), a[1], To(a[2].toString())); else if (d == qs) b = zf(this, new mg(a[0].toString()), new Yn(a[1].toString())); else if (d == 'BigDecimal RoundingMode') b = Af(this, new mg(a[0].toString()), To(a[1].toString())); else throw new V('Unknown call signature for interim = super.divide: ' + d); c = new Kg(b); return c }; _.z = function Tg() { return _e(ag(this)) }; _.eQ = function Ug(a) { return Ff(this, a) }; _.A = function Vg() { var a, b; return a = Uf(this), b = this.b - this.f / 0.3010299956639812, b < -149 || a == 0 ? (a *= 0) : b > 129 ? (a *= Infinity) : (a = _e(ag(this))), a }; _.gC = function Wg() { return Qc }; _.hC = function Xg() { return Gf(this) }; _.B = function Yg() { return this.f <= -32 || this.f > (this.e > 0 ? this.e : el((this.b - 1) * 0.3010299956639812) + 1) ? 0 : Mi(new Pi(this.f == 0 || this.b == 0 && this.g != -1 ? (!this.d && (this.d = Li(this.g)), this.d) : this.f < 0 ? ei((!this.d && (this.d = Li(this.g)), this.d), po(-this.f)) : Th((!this.d && (this.d = Li(this.g)), this.d), po(this.f)))) }; _.C = function Zg() { return Je(bg(this, 32)) }; _.D = function $g() { return Je(bg(this, 32)) }; _.E = function _g() { return _e(ag(this)) }; _.F = function ah(a) { return new Kg(vf(this, a) >= 0 ? this : a) }; _.G = function bh(a) { return new Kg(vf(this, a) <= 0 ? this : a) }; _.H = function ch(a) { return new Kg(Jf(this, this.f + a)) }; _.I = function dh(a) { return new Kg(Jf(this, this.f - a)) }; _.J = function eh(a) { var b, c, d; d = Lj(a); if (d == ps) b = Kf(this, new mg(a[0].toString())); else if (d == qs) b = Lf(this, new mg(a[0].toString()), new Yn(a[1].toString())); else throw new V('Unknown call signature for interim = super.multiply: ' + d); c = new Kg(b); return c }; _.K = function fh(a) { var b, c, d; d = Lj(a); if (d == Lr) b = Mf(this); else if (d == os) b = Mf(Qf(this, new Yn(a[0].toString()))); else throw new V('Unknown call signature for interim = super.negate: ' + d); c = new Kg(b); return c }; _.L = function gh(a) { var b, c, d; d = Lj(a); if (d == Lr) b = this; else if (d == os) b = Qf(this, new Yn(a[0].toString())); else throw new V('Unknown call signature for interim = super.plus: ' + d); c = new Kg(b); return c }; _.M = function hh(a) { var b, c, d; d = Lj(a); if (d == ks) b = Nf(this, a[0]); else if (d == ls) b = Of(this, a[0], new Yn(a[1].toString())); else throw new V('Unknown call signature for interim = super.pow: ' + d); c = new Kg(b); return c }; _.q = function ih() { return Pf(this) }; _.N = function jh(a) { var b, c, d; d = Lj(a); if (d == ps) b = Bf(this, new mg(a[0].toString()))[1]; else if (d == qs) b = Cf(this, new mg(a[0].toString()), new Yn(a[1].toString()))[1]; else throw new V('Unknown call signature for interim = super.remainder: ' + d); c = new Kg(b); return c }; _.O = function kh(a) { return new Kg(Qf(this, new Yn(Wn(a.b)))) }; _.P = function lh() { return Bc(this.f) }; _.Q = function mh(a) { return new Kg(Rf(this, a)) }; _.R = function nh(a) { var b, c, d; d = Lj(a); if (d == ks) b = Sf(this, a[0], (Qo(), Go)); else if (d == ns) b = Sf(this, a[0], Uo(a[1])); else if (d == 'number RoundingMode') b = Sf(this, a[0], To(a[1].toString())); else throw new V('Unknown call signature for interim = super.setScale: ' + d); c = new Kg(b); return c }; _.S = function oh() { return ~~(Je(bg(this, 16)) << 16) >> 16 }; _.r = function ph() { return Uf(this) }; _.T = function qh() { return new Kg(Wf(this)) }; _.U = function rh(a) { var b, c, d; d = Lj(a); if (d == ps) b = Xf(this, new mg(a[0].toString())); else if (d == qs) b = Yf(this, new mg(a[0].toString()), new Yn(a[1].toString())); else throw new V('Unknown call signature for interim = super.subtract: ' + d); c = new Kg(b); return c }; _.V = function sh() { return new Pi(this.f == 0 || this.b == 0 && this.g != -1 ? (!this.d && (this.d = Li(this.g)), this.d) : this.f < 0 ? ei((!this.d && (this.d = Li(this.g)), this.d), po(-this.f)) : Th((!this.d && (this.d = Li(this.g)), this.d), po(this.f))) }; _.W = function th() { return new Pi(Zf(this)) }; _.X = function uh() { return $f(this) }; _.Y = function vh() { return _f(this) }; _.tS = function wh() { return ag(this) }; _.Z = function xh() { return new Kg(new pg(1, this.f)) }; _.$ = function yh() { return new Pi((!this.d && (this.d = Li(this.g)), this.d)) }; _.cM = { 3: 1, 6: 1, 8: 1, 10: 1, 16: 1, 24: 1 }; _ = Eh.prototype = Ah.prototype = new H; _.gC = function Fh() { return Pc }; var Bh = false; _ = ui.prototype = ti.prototype = si.prototype = ri.prototype = qi.prototype = pi.prototype = oi.prototype = ni.prototype = Hh.prototype = new Ze; _._ = function vi() { return this.f < 0 ? new si(1, this.e, this.b) : this }; _.ab = function wi() { return sm(this) }; _.eQ = function xi(a) { return Vh(this, a) }; _.gC = function yi() { return qd }; _.bb = function zi() { return $h(this) }; _.hC = function Bi() { return _h(this) }; _.cb = function Ci() { return this.f == 0 ? this : new si(-this.f, this.e, this.b) }; _.db = function Di(a) { return gi(this, a) }; _.eb = function Fi(a) { return ji(this, a) }; _.fb = function Gi(a) { return li(this, a) }; _.r = function Hi() { return this.f }; _.gb = function Ii(a) { return mi(this, a) }; _.tS = function Ji() { return Hm(this, 0) }; _.cM = { 6: 1, 8: 1, 10: 1, 17: 1 }; _.b = null; _.c = -2; _.d = 0; _.e = 0; _.f = 0; var Ih, Jh, Kh, Lh, Mh = null, Nh; _ = Pi.prototype = Oi.prototype = Ni.prototype = Gh.prototype = new Hh; _._ = function Ri() { return new Pi(this.f < 0 ? new si(1, this.e, this.b) : this) }; _.hb = function Si(a) { return new Pi(fn(this, a)) }; _.ib = function Ti(a) { return new Pi(vn(this, a)) }; _.jb = function Ui(a) { return new Pi(yn(this, a)) }; _.kb = function Vi() { return rm(this) }; _.ab = function Wi() { return sm(this) }; _.lb = function Xi(a) { return new Pi(Ph(this, a)) }; _.mb = function Yi(a) { return Qh(this, a) }; _.nb = function Zi(a) { return new Pi(Th(this, a)) }; _.ob = function $i(a) { var b, c, d; c = Uh(this, a); d = lc(Rd, { 6: 1 }, 4, c.length, 0); for (b = 0; b < c.length; ++b)d[b] = new Pi(c[b]); return d }; _.z = function _i() { return _e(Hm(this, 0)) }; _.eQ = function aj(a) { return Vh(this, a) }; _.pb = function bj(a) { return new Pi(Xh(this, a)) }; _.A = function cj() { return Pk(Hm(this, 0)) }; _.qb = function dj(a) { return new Pi(Yh(this, a)) }; _.gC = function ej() { return Sc }; _.bb = function fj() { return $h(this) }; _.hC = function gj() { return _h(this) }; _.B = function hj() { return Mi(this) }; _.rb = function ij(a) { return vo(new Pi(this.f < 0 ? new si(1, this.e, this.b) : this), a) }; _.sb = function jj() { return _e(Hm(this, 0)) }; _.tb = function kj(a) { return new Pi(Qh(this, a) == 1 ? this : a) }; _.ub = function lj(a) { return new Pi(Qh(this, a) == -1 ? this : a) }; _.vb = function mj(a) { return new Pi(bi(this, a)) }; _.wb = function nj(a) { return new Pi(ci(this, a)) }; _.xb = function oj(a, b) { return new Pi(di(this, a, b)) }; _.yb = function pj(a) { return new Pi(ei(this, a)) }; _.cb = function qj() { return new Pi(this.f == 0 ? this : new si(-this.f, this.e, this.b)) }; _.zb = function rj() { return new Pi(fi(this)) }; _.Ab = function sj() { return new Pi(En(this)) }; _.Bb = function tj(a) { return new Pi(Fn(this, a)) }; _.db = function uj(a) { return new Pi(gi(this, a)) }; _.Cb = function vj(a) { return new Pi(hi(this, a)) }; _.Db = function wj(a) { return new Pi(ii(this, a)) }; _.eb = function xj(a) { return new Pi(ji(this, a)) }; _.fb = function yj(a) { return new Pi(li(this, a)) }; _.r = function zj() { return this.f }; _.Eb = function Aj(a) { return new Pi(rn(this, a)) }; _.gb = function Bj(a) { return mi(this, a) }; _.Fb = function Cj(a) { var b, c; c = Lj(a); if (c == Lr) b = Hm(this, 0); else if (c == ks) b = Fm(this, a[0]); else throw new V('Unknown call signature for result = super.toString: ' + c); return b }; _.Gb = function Dj(a) { return new Pi(Jn(this, a)) }; _.cM = { 4: 1, 6: 1, 8: 1, 10: 1, 17: 1, 24: 1 }; _ = Ij.prototype = Ej.prototype = new H; _.gC = function Kj() { return Rc }; var Fj = false; _ = Oj.prototype = Nj.prototype = Mj.prototype = new H; _.gC = function Pj() { return Uc }; _.Hb = function Qj() { return this.b.b }; _.Ib = function Rj() { return new bk(this.b.c) }; _.hC = function Sj() { return Vn(this.b) }; _.tS = function Tj() { return Wn(this.b) }; _.cM = { 24: 1 }; _.b = null; _ = Yj.prototype = Uj.prototype = new H; _.gC = function $j() { return Tc }; var Vj = false; _ = bk.prototype = ak.prototype = _j.prototype = new H; _.gC = function ck() { return Wc }; _.Jb = function dk() { return this.b.b }; _.tS = function ek() { return this.b.b }; _.cM = { 5: 1, 24: 1 }; _.b = null; _ = kk.prototype = gk.prototype = new H; _.gC = function lk() { return Vc }; var hk = false; _ = nk.prototype = mk.prototype = new N; _.gC = function ok() { return Xc }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = rk.prototype = qk.prototype = pk.prototype = new N; _.gC = function sk() { return Yc }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = wk.prototype = vk.prototype = new H; _.gC = function Bk() { return $c }; _.tS = function Ck() { return ((this.c & 2) != 0 ? 'interface ' : (this.c & 1) != 0 ? Lr : 'class ') + this.d }; _.b = null; _.c = 0; _.d = null; _ = Ek.prototype = Dk.prototype = new N; _.gC = function Fk() { return Zc }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = Ik.prototype = new H; _.eQ = function Kk(a) { return this === a }; _.gC = function Lk() { return _c }; _.hC = function Mk() { return ob(this) }; _.tS = function Nk() { return this.b }; _.cM = { 6: 1, 8: 1, 9: 1 }; _.b = null; _.c = 0; _ = Sk.prototype = Rk.prototype = Qk.prototype = new N; _.gC = function Tk() { return bd }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = Wk.prototype = Vk.prototype = Uk.prototype = new N; _.gC = function Xk() { return cd }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = kl.prototype = jl.prototype = il.prototype = new N; _.gC = function ll() { return dd }; _.cM = { 6: 1, 12: 1, 15: 1 }; var ml; _ = pl.prototype = ol.prototype = new Qk; _.gC = function ql() { return ed }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = sl.prototype = rl.prototype = new H; _.gC = function tl() { return id }; _.tS = function ul() { return this.b + ds + this.d + '(Unknown Source' + (this.c >= 0 ? Qr + this.c : Lr) + ')' }; _.cM = { 6: 1, 13: 1 }; _.b = null; _.c = 0; _.d = null; _ = String.prototype; _.eQ = function Hl(a) { return wl(this, a) }; _.gC = function Il() { return md }; _.hC = function Jl() { return Rl(this) }; _.tS = function Kl() { return this }; _.cM = { 1: 1, 6: 1, 7: 1, 8: 1 }; var Ml, Nl = 0, Ol; _ = Ul.prototype = Tl.prototype = new H; _.gC = function Vl() { return jd }; _.tS = function Wl() { return this.b.b }; _.cM = { 7: 1 }; _ = hm.prototype = gm.prototype = fm.prototype = Xl.prototype = new H; _.gC = function im() { return kd }; _.tS = function jm() { return this.b.b }; _.cM = { 7: 1 }; _ = lm.prototype = km.prototype = new Uk; _.gC = function mm() { return ld }; _.cM = { 6: 1, 12: 1, 14: 1, 15: 1 }; _ = pm.prototype = om.prototype = new N; _.gC = function qm() { return od }; _.cM = { 6: 1, 12: 1, 15: 1 }; var Cm, Dm; _ = Yn.prototype = Xn.prototype = Nn.prototype = new H; _.eQ = function Zn(a) { return xc(a, 18) && vc(a, 18).b == this.b && vc(a, 18).c == this.c }; _.gC = function $n() { return rd }; _.hC = function _n() { return Vn(this) }; _.tS = function ao() { return Wn(this) }; _.cM = { 6: 1, 18: 1 }; _.b = 0; _.c = null; var On, Pn, Qn, Rn, Sn, Tn; var bo, co, eo, fo; var ro, so, to; _ = Ro.prototype = yo.prototype = new Ik; _.gC = function So() { return sd }; _.cM = { 6: 1, 8: 1, 9: 1, 19: 1 }; var zo, Ao, Bo, Co, Do, Eo, Fo, Go, Ho, Io, Jo, Ko, Lo, Mo, No, Oo, Po; var Xo; _ = Zo.prototype = new H; _.Kb = function _o(a) { throw new pm }; _.Lb = function ap(a) { var b; b = $o(this.Mb(), a); return !!b }; _.gC = function bp() { return td }; _.tS = function cp() { var a, b, c, d; c = new Ul; a = null; c.b.b += Rr; b = this.Mb(); while (b.Pb()) { a != null ? (cc(c.b, a), c) : (a = Is); d = b.Qb(); cc(c.b, d === this ? '(this Collection)' : Lr + d) } c.b.b += ']'; return c.b.b }; _ = ep.prototype = new H; _.eQ = function fp(a) { var b, c, d, e, f; if (a === this) { return true } if (!xc(a, 21)) { return false } e = vc(a, 21); if (this.e != e.e) { return false } for (c = new Ip((new Cp(e)).b); kq(c.b);) { b = vc(lq(c.b), 22); d = b.Rb(); f = b.Sb(); if (!(d == null ? this.d : xc(d, 1) ? Qr + vc(d, 1) in this.f : pp(this, d, ~~fb(d)))) { return false } if (!Xq(f, d == null ? this.c : xc(d, 1) ? op(this, vc(d, 1)) : np(this, d, ~~fb(d)))) { return false } } return true }; _.gC = function gp() { return Cd }; _.hC = function hp() { var a, b, c; c = 0; for (b = new Ip((new Cp(this)).b); kq(b.b);) { a = vc(lq(b.b), 22); c += a.hC(); c = ~~c } return c }; _.tS = function ip() { var a, b, c, d; d = '{'; a = false; for (c = new Ip((new Cp(this)).b); kq(c.b);) { b = vc(lq(c.b), 22); a ? (d += Is) : (a = true); d += Lr + b.Rb(); d += Js; d += Lr + b.Sb() } return d + '}' }; _.cM = { 21: 1 }; _ = dp.prototype = new ep; _.Ob = function vp(a, b) { return Ac(a) === Ac(b) || a != null && eb(a, b) }; _.gC = function wp() { return yd }; _.cM = { 21: 1 }; _.b = null; _.c = null; _.d = false; _.e = 0; _.f = null; _ = yp.prototype = new Zo; _.eQ = function zp(a) { var b, c, d; if (a === this) { return true } if (!xc(a, 23)) { return false } c = vc(a, 23); if (c.b.e != this.Nb()) { return false } for (b = new Ip(c.b); kq(b.b);) { d = vc(lq(b.b), 22); if (!this.Lb(d)) { return false } } return true }; _.gC = function Ap() { return Dd }; _.hC = function Bp() { var a, b, c; a = 0; for (b = this.Mb(); b.Pb();) { c = b.Qb(); if (c != null) { a += fb(c); a = ~~a } } return a }; _.cM = { 23: 1 }; _ = Cp.prototype = xp.prototype = new yp; _.Lb = function Dp(a) { var b, c, d; if (xc(a, 22)) { b = vc(a, 22); c = b.Rb(); if (lp(this.b, c)) { d = mp(this.b, c); return Eq(b.Sb(), d) } } return false }; _.gC = function Ep() { return vd }; _.Mb = function Fp() { return new Ip(this.b) }; _.Nb = function Gp() { return this.b.e }; _.cM = { 23: 1 }; _.b = null; _ = Ip.prototype = Hp.prototype = new H; _.gC = function Jp() { return ud }; _.Pb = function Kp() { return kq(this.b) }; _.Qb = function Lp() { return vc(lq(this.b), 22) }; _.b = null; _ = Np.prototype = new H; _.eQ = function Op(a) { var b; if (xc(a, 22)) { b = vc(a, 22); if (Xq(this.Rb(), b.Rb()) && Xq(this.Sb(), b.Sb())) { return true } } return false }; _.gC = function Pp() { return Bd }; _.hC = function Qp() { var a, b; a = 0; b = 0; this.Rb() != null && (a = fb(this.Rb())); this.Sb() != null && (b = fb(this.Sb())); return a ^ b }; _.tS = function Rp() { return this.Rb() + Js + this.Sb() }; _.cM = { 22: 1 }; _ = Sp.prototype = Mp.prototype = new Np; _.gC = function Tp() { return wd }; _.Rb = function Up() { return null }; _.Sb = function Vp() { return this.b.c }; _.Tb = function Wp(a) { return tp(this.b, a) }; _.cM = { 22: 1 }; _.b = null; _ = Yp.prototype = Xp.prototype = new Np; _.gC = function Zp() { return xd }; _.Rb = function $p() { return this.b }; _.Sb = function _p() { return op(this.c, this.b) }; _.Tb = function aq(a) { return up(this.c, this.b, a) }; _.cM = { 22: 1 }; _.b = null; _.c = null; _ = bq.prototype = new Zo; _.Kb = function cq(a) { sq(this, this.Nb(), a); return true }; _.eQ = function eq(a) { var b, c, d, e, f; if (a === this) { return true } if (!xc(a, 20)) { return false } f = vc(a, 20); if (this.Nb() != f.c) { return false } d = new mq(this); e = new mq(f); while (d.b < d.c.c) { b = lq(d); c = lq(e); if (!(b == null ? c == null : eb(b, c))) { return false } } return true }; _.gC = function fq() { return Ad }; _.hC = function gq() { var a, b, c; b = 1; a = new mq(this); while (a.b < a.c.c) { c = lq(a); b = 31 * b + (c == null ? 0 : fb(c)); b = ~~b } return b }; _.Mb = function iq() { return new mq(this) }; _.cM = { 20: 1 }; _ = mq.prototype = jq.prototype = new H; _.gC = function nq() { return zd }; _.Pb = function oq() { return kq(this) }; _.Qb = function pq() { return lq(this) }; _.b = 0; _.c = null; _ = vq.prototype = qq.prototype = new bq; _.Kb = function wq(a) { return rq(this, a) }; _.Lb = function xq(a) { return uq(this, a, 0) != -1 }; _.gC = function yq() { return Ed }; _.Nb = function zq() { return this.c }; _.cM = { 6: 1, 20: 1 }; _.c = 0; _ = Fq.prototype = Dq.prototype = new dp; _.gC = function Gq() { return Fd }; _.cM = { 6: 1, 21: 1 }; _ = Iq.prototype = Hq.prototype = new Np; _.gC = function Jq() { return Gd }; _.Rb = function Kq() { return this.b }; _.Sb = function Lq() { return this.c }; _.Tb = function Mq(a) { var b; b = this.c; this.c = a; return b }; _.cM = { 22: 1 }; _.b = null; _.c = null; _ = Oq.prototype = Nq.prototype = new N; _.gC = function Pq() { return Hd }; _.cM = { 6: 1, 12: 1, 15: 1 }; _ = Vq.prototype = Qq.prototype = new H; _.gC = function Wq() { return Id }; _.b = 0; _.c = 0; var Rq, Sq, Tq = 0; _ = Zq.prototype = new H; _.gC = function $q() { return Kd }; _ = gr.prototype = Yq.prototype = new Zq; _.gC = function hr() { return Jd }; var kr; var Jr = mb; var gd = yk(Ms, 'Object'), _c = yk(Ms, 'Enum'), nd = yk(Ms, 'Throwable'), ad = yk(Ms, 'Exception'), hd = yk(Ms, 'RuntimeException'), Fc = yk(Ns, 'JavaScriptException'), Gc = yk(Ns, 'JavaScriptObject$'), Hc = yk(Ns, 'Scheduler'), Ec = Ak('int'), Od = xk(Lr, '[I', Ec), Td = xk(Os, 'Object;', gd), Ld = Ak('boolean'), Zd = xk(Lr, '[Z', Ld), Ic = yk(Ps, 'SchedulerImpl'), Lc = yk(Ps, 'StackTraceCreator$Collector'), id = yk(Ms, 'StackTraceElement'), Ud = xk(Os, 'StackTraceElement;', id), Kc = yk(Ps, 'StackTraceCreator$CollectorMoz'), Jc = yk(Ps, 'StackTraceCreator$CollectorChrome'), Nc = yk(Ps, 'StringBufferImpl'), Mc = yk(Ps, 'StringBufferImplAppend'), md = yk(Ms, Nr), Vd = xk(Os, 'String;', md), Oc = yk('com.google.gwt.lang.', 'LongLibBase$LongEmul'), Pd = xk('[Lcom.google.gwt.lang.', 'LongLibBase$LongEmul;', Oc), fd = yk(Ms, 'Number'), pd = yk(Qs, ps), Qc = yk(Rs, ps), Qd = xk(Ss, Ts, Qc), Pc = yk(Rs, 'BigDecimalExporterImpl'), qd = yk(Qs, is), Sc = yk(Rs, is), Rd = xk(Ss, Us, Sc), Rc = yk(Rs, 'BigIntegerExporterImpl'), Uc = yk(Rs, os), Tc = yk(Rs, 'MathContextExporterImpl'), Wc = yk(Rs, xs), Sd = xk(Ss, Vs, Wc), Vc = yk(Rs, 'RoundingModeExporterImpl'), Xc = yk(Ms, 'ArithmeticException'), cd = yk(Ms, 'IndexOutOfBoundsException'), Yc = yk(Ms, 'ArrayStoreException'), Cc = Ak('char'), Md = xk(Lr, '[C', Cc), $c = yk(Ms, 'Class'), Zc = yk(Ms, 'ClassCastException'), bd = yk(Ms, 'IllegalArgumentException'), dd = yk(Ms, 'NullPointerException'), ed = yk(Ms, 'NumberFormatException'), jd = yk(Ms, 'StringBuffer'), kd = yk(Ms, 'StringBuilder'), ld = yk(Ms, 'StringIndexOutOfBoundsException'), od = yk(Ms, 'UnsupportedOperationException'), Wd = xk(Ws, Ts, pd), Dc = Ak('double'), Nd = xk(Lr, '[D', Dc), Xd = xk(Ws, Us, qd), rd = yk(Qs, os), sd = zk(Qs, xs, Wo), Yd = xk(Ws, Vs, sd), td = yk(Xs, 'AbstractCollection'), Cd = yk(Xs, 'AbstractMap'), yd = yk(Xs, 'AbstractHashMap'), Dd = yk(Xs, 'AbstractSet'), vd = yk(Xs, 'AbstractHashMap$EntrySet'), ud = yk(Xs, 'AbstractHashMap$EntrySetIterator'), Bd = yk(Xs, 'AbstractMapEntry'), wd = yk(Xs, 'AbstractHashMap$MapEntryNull'), xd = yk(Xs, 'AbstractHashMap$MapEntryString'), Ad = yk(Xs, 'AbstractList'), zd = yk(Xs, 'AbstractList$IteratorImpl'), Ed = yk(Xs, 'ArrayList'), Fd = yk(Xs, 'HashMap'), Gd = yk(Xs, 'MapEntryImpl'), Hd = yk(Xs, 'NoSuchElementException'), Id = yk(Xs, 'Random'), Kd = yk(Ys, 'ExporterBaseImpl'), Jd = yk(Ys, 'ExporterBaseActual'); $stats && $stats({ moduleName: 'gwtapp', sessionId: $sessionId, subSystem: 'startup', evtGroup: 'moduleStartup', millis: (new Date()).getTime(), type: 'moduleEvalEnd' }); if (gwtapp && gwtapp.onScriptLoad) gwtapp.onScriptLoad(gwtOnLoad);
gwtOnLoad(null, 'ModuleName', 'moduleBase');
})();
exports.RoundingMode = window.bigdecimal.RoundingMode;
exports.MathContext = window.bigdecimal.MathContext;
fix_and_export('BigDecimal');
fix_and_export('BigInteger');
// This is an unfortunate kludge because Java methods and constructors cannot accept vararg parameters.
function fix_and_export(class_name) {
var Src = window.bigdecimal[class_name];
var Fixed = Src;
if (Src.__init__) {
Fixed = function wrap_constructor() {
var args = Array.prototype.slice.call(arguments);
return Src.__init__(args);
};
Fixed.prototype = Src.prototype;
for (var a in Src)
if (Src.hasOwnProperty(a)) {
if ((typeof Src[a] != 'function') || !a.match(/_va$/))
Fixed[a] = Src[a];
else {
var pub_name = a.replace(/_va$/, '');
Fixed[pub_name] = function wrap_classmeth() {
var args = Array.prototype.slice.call(arguments);
return wrap_classmeth.inner_method(args);
};
Fixed[pub_name].inner_method = Src[a];
}
}
}
var proto = Fixed.prototype;
for (var a in proto) {
if (proto.hasOwnProperty(a) && (typeof proto[a] == 'function') && a.match(/_va$/)) {
var pub_name = a.replace(/_va$/, '');
proto[pub_name] = function wrap_meth() {
var args = Array.prototype.slice.call(arguments);
return wrap_meth.inner_method.apply(this, [args]);
};
proto[pub_name].inner_method = proto[a];
delete proto[a];
}
}
exports[class_name] = Fixed;
}
})(typeof exports !== 'undefined' ? exports : (typeof window !== 'undefined' ? window : {})); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issue-5912-bigdecimal/output.js | JavaScript | !function(n){if(void 0===t)var t={};if(void 0===e)var e={};if(e.document||(e.document=t),void 0===r)var r={};function i(){}// This is an unfortunate kludge because Java methods and constructors cannot accept vararg parameters.
function o(t){var r=e.bigdecimal[t],i=r;if(r.__init__){for(var o in(i=function(){var n=Array.prototype.slice.call(arguments);return r.__init__(n)}).prototype=r.prototype,r)if(r.hasOwnProperty(o)){if("function"==typeof r[o]&&o.match(/_va$/)){var f=o.replace(/_va$/,"");i[f]=function n(){var t=Array.prototype.slice.call(arguments);return n.inner_method(t)},i[f].inner_method=r[o]}else i[o]=r[o]}}var u=i.prototype;for(var o in u)if(u.hasOwnProperty(o)&&"function"==typeof u[o]&&o.match(/_va$/)){var f=o.replace(/_va$/,"");u[f]=function n(){var t=Array.prototype.slice.call(arguments);return n.inner_method.apply(this,[t])},u[f].inner_method=u[o],delete u[o]}n[t]=i}r.userAgent||(r.userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"),function(){var n,t,o=e,f=o.document,u=o.__gwtStatsEvent?function(n){return o.__gwtStatsEvent(n)}:null,c=o.__gwtStatsSessionId?o.__gwtStatsSessionId:null;function s(){}function h(){}function a(){}function b(){}function l(){}function g(){}function w(){}function d(){}function _(){}function v(){}function m(){}function y(){}function C(){}function x(){}function S(){}function M(){}function B(){}function A(){}function N(){}function I(){}function E(){}function R(){}function O(){}function D(){}function k(){}function L(){}function U(){}function P(){}function Q(){}function T(){nX()}function j(){nZ()}function F(){tD()}function H(){ej()}function $(){ej()}function V(){ej()}function q(){ej()}function G(){ej()}function z(){ej()}function J(){nW()}function K(){nc(this)}function W(){nc(this)}function Z(n){iP(this,n)}function X(n){this.c=n}function Y(n){this.b=n}function nn(n){this.b=n}function nt(n){this.b=n}function ne(n){ej(),this.f=n}function nr(n){ne.call(this,n)}function ni(n){ne.call(this,n)}function no(n){ne.call(this,n)}function nf(n){ne.call(this,n)}function nu(n){ne.call(this,n)}function nc(n){n.b=new C}function ns(){this.b=new C}function nh(){nh=l,ft=new w}function na(){na=l,t=new nY}function nb(n,t){na(),n[oy]=t}function nl(n,t){na(),function(n,t){var e,r,i,f,u,c,s,h,a,b;for(u=0,s=i_(n,om,0),c=o;u<s.length;++u)tj(s[u],"client")||((h=c)[a=s[u]]||(h[a]={}),c=c[s[u]]);for(i=0,f=(e=i_(t,om,0)).length;i<f;++i)tj(e9(r=e[i]),i$)||((b=c)[r]||(b[r]={}),c=c[r])}(n,t)}function ng(){iU(),iP(this,iK)}function nw(n){no.call(this,n)}function nd(n,t){return n<t?n:t}function np(n,t){return n>t?n:t}function n_(n,t){return!rA(n,t)}function nv(n){this.b=new ix(n)}function nm(){this.b=(rj(),fj)}function ny(){this.b=(iB(),f2)}function nC(n,e){var r;na(),r=t.b,n?function(n,t,e,r){var i=n.b[r];if(i)for(var o=0,f=i.length;o<f;++o){var u=i[o],c=u.Rb();if(n.Ob(t,c)){var s=u.Sb();return u.Tb(e),s}}else i=n.b[r]=[];var u=new nN(t,e);return i.push(u),++n.e,null}(r,n,e,~~nj(n)):tV(r,e)}function nx(n){return n.b<n.c.c}function nS(n){return n.b<<3|n.c.c}function nM(n){return n.l|n.m<<22}function nB(n,t){this.c=n,this.b=t}function nA(n,t){this.b=n,this.c=t}function nN(n,t){this.b=n,this.c=t}function nI(n,t){var e;return e=n.b,e.b+=t,n}function nE(n){return na(),em(t,n)}function nR(n){return na(),function(n,t){var e,r,i;if(null==t)return null;for((i=t[oy])||(i=[],t[oy]=i),r=i,e=0;e<t.length;++e)r[e]=em(n,t[e]);return r}(t,n)}function nO(n){rK(),nq.call(this,n)}function nD(){rK(),nq.call(this,iK)}function nk(n){tx.call(this,n,0)}function nL(n){Z.call(this,n.tS())}function nU(n){return Math.floor(n)}function nP(n,t){return iN(n,t,!1)}function nQ(n){return tm(n.l,n.m,n.h)}function nT(n){return null==n?null:n}function nj(n){return n.$H||(n.$H=++o9)}function nF(n){return n.tM==l||nH(n,1)}function nH(n,t){return n.cM&&!!n.cM[t]}function n$(n,t){return n.charCodeAt(t)}function nV(n){var t;nc(this),t=this.b,t.b+=n}function nq(n){rK(),rh.call(this,n,10)}function nG(n,t){return null!=n&&nH(n,t)}function nz(){this.b=tL(up,{6:1},0,0,0)}function nJ(){nJ=l,fO={},fD={}}function nK(){nK=l,ur=function(n){var t,e,r,i;for(r=0,t={},i=n.length;r<i;++r)t[i4+(e=n[r]).b]=e;return t}((iB(),fW))}function nW(){fE||(fE=!0,function(){if(nl(oM,i$),o.bigdecimal.RoundingMode)var n=o.bigdecimal.RoundingMode;o.bigdecimal.RoundingMode=uu(function(){1==arguments.length&&null!=arguments[0]&&arguments[0].gC()==uH?this.__gwt_instance=arguments[0]:0==arguments.length&&(this.__gwt_instance=new ny,nb(this.__gwt_instance,this))});var t=o.bigdecimal.RoundingMode.prototype={};if(n)for(p in n)o.bigdecimal.RoundingMode[p]=n[p];o.bigdecimal.RoundingMode.valueOf=uu(function(n){return nE(new Y((iB(),eu((nK(),ur),n))))}),o.bigdecimal.RoundingMode.values=uu(function(){return nR(function(){var n,t,e;for(iB(),iB(),t=tL(u$,{6:1},5,(e=fW).length,0),n=0;n<e.length;++n)t[n]=new Y(e[n]);return t}())}),t.name=uu(function(){return this.__gwt_instance.Jb()}),t.toString=uu(function(){return this.__gwt_instance.tS()}),o.bigdecimal.RoundingMode.CEILING=uu(function(){return nE(new Y((iB(),fZ)))}),o.bigdecimal.RoundingMode.DOWN=uu(function(){return nE(new Y((iB(),fX)))}),o.bigdecimal.RoundingMode.FLOOR=uu(function(){return nE(new Y((iB(),fY)))}),o.bigdecimal.RoundingMode.HALF_DOWN=uu(function(){return nE(new Y((iB(),f0)))}),o.bigdecimal.RoundingMode.HALF_EVEN=uu(function(){return nE(new Y((iB(),f1)))}),o.bigdecimal.RoundingMode.HALF_UP=uu(function(){return nE(new Y((iB(),f2)))}),o.bigdecimal.RoundingMode.UNNECESSARY=uu(function(){return nE(new Y((iB(),f3)))}),o.bigdecimal.RoundingMode.UP=uu(function(){return nE(new Y((iB(),f6)))}),nC(uH,o.bigdecimal.RoundingMode)}())}function nZ(){fN||(fN=!0,function(){if(nl(oM,i$),o.bigdecimal.BigInteger)var n=o.bigdecimal.BigInteger;o.bigdecimal.BigInteger=uu(function(){if(1==arguments.length&&null!=arguments[0]&&arguments[0].gC()==uP)this.__gwt_instance=arguments[0];else if(0==arguments.length)this.__gwt_instance=new nD,nb(this.__gwt_instance,this);else if(1==arguments.length){var n;this.__gwt_instance=(n=arguments[0],new nO(n)),nb(this.__gwt_instance,this)}});var t=o.bigdecimal.BigInteger.prototype={};if(n)for(p in n)o.bigdecimal.BigInteger[p]=n[p];o.bigdecimal.BigInteger.__init__=uu(function(n){return nE(function(n){var t,e;if(rK(),(e=iI(n))==oF)t=new nq(n[0].toString());else if("string number"==e)t=new rh(n[0].toString(),n[1]);else throw new ne("Unknown call signature for obj = new java.math.BigInteger: "+e);return new n1(t)}(n))}),t.abs=uu(function(){return nE(this.__gwt_instance._())}),t.add=uu(function(n){return nE(this.__gwt_instance.hb(n.__gwt_instance))}),t.and=uu(function(n){return nE(this.__gwt_instance.ib(n.__gwt_instance))}),t.andNot=uu(function(n){return nE(this.__gwt_instance.jb(n.__gwt_instance))}),t.bitCount=uu(function(){return this.__gwt_instance.kb()}),t.bitLength=uu(function(){return this.__gwt_instance.ab()}),t.clearBit=uu(function(n){return nE(this.__gwt_instance.lb(n))}),t.compareTo=uu(function(n){return this.__gwt_instance.mb(n.__gwt_instance)}),t.divide=uu(function(n){return nE(this.__gwt_instance.nb(n.__gwt_instance))}),t.doubleValue=uu(function(){return this.__gwt_instance.z()}),t.equals=uu(function(n){return this.__gwt_instance.eQ(n)}),t.flipBit=uu(function(n){return nE(this.__gwt_instance.pb(n))}),t.floatValue=uu(function(){return this.__gwt_instance.A()}),t.gcd=uu(function(n){return nE(this.__gwt_instance.qb(n.__gwt_instance))}),t.getLowestSetBit=uu(function(){return this.__gwt_instance.bb()}),t.hashCode=uu(function(){return this.__gwt_instance.hC()}),t.intValue=uu(function(){return this.__gwt_instance.B()}),t.isProbablePrime=uu(function(n){return this.__gwt_instance.rb(n)}),t.max=uu(function(n){return nE(this.__gwt_instance.tb(n.__gwt_instance))}),t.min=uu(function(n){return nE(this.__gwt_instance.ub(n.__gwt_instance))}),t.mod=uu(function(n){return nE(this.__gwt_instance.vb(n.__gwt_instance))}),t.modInverse=uu(function(n){return nE(this.__gwt_instance.wb(n.__gwt_instance))}),t.modPow=uu(function(n,t){return nE(this.__gwt_instance.xb(n.__gwt_instance,t.__gwt_instance))}),t.multiply=uu(function(n){return nE(this.__gwt_instance.yb(n.__gwt_instance))}),t.negate=uu(function(){return nE(this.__gwt_instance.cb())}),t.nextProbablePrime=uu(function(){return nE(this.__gwt_instance.zb())}),t.not=uu(function(){return nE(this.__gwt_instance.Ab())}),t.or=uu(function(n){return nE(this.__gwt_instance.Bb(n.__gwt_instance))}),t.pow=uu(function(n){return nE(this.__gwt_instance.db(n))}),t.remainder=uu(function(n){return nE(this.__gwt_instance.Cb(n.__gwt_instance))}),t.setBit=uu(function(n){return nE(this.__gwt_instance.Db(n))}),t.shiftLeft=uu(function(n){return nE(this.__gwt_instance.eb(n))}),t.shiftRight=uu(function(n){return nE(this.__gwt_instance.fb(n))}),t.signum=uu(function(){return this.__gwt_instance.r()}),t.subtract=uu(function(n){return nE(this.__gwt_instance.Eb(n.__gwt_instance))}),t.testBit=uu(function(n){return this.__gwt_instance.gb(n)}),t.toString_va=uu(function(n){return this.__gwt_instance.Fb(n)}),t.xor=uu(function(n){return nE(this.__gwt_instance.Gb(n.__gwt_instance))}),t.divideAndRemainder=uu(function(n){return nR(this.__gwt_instance.ob(n.__gwt_instance))}),t.longValue=uu(function(){return this.__gwt_instance.sb()}),o.bigdecimal.BigInteger.valueOf=uu(function(n){return nE((rK(),new n1(eW(r2(n)))))}),o.bigdecimal.BigInteger.ONE=uu(function(){return nE((rK(),new n1(fx)))}),o.bigdecimal.BigInteger.TEN=uu(function(){return nE((rK(),new n1(fM)))}),o.bigdecimal.BigInteger.ZERO=uu(function(){return nE((rK(),new n1(fB)))}),nC(uP,o.bigdecimal.BigInteger)}())}function nX(){fI||(fI=!0,new J,function(){if(nl(oM,i$),o.bigdecimal.MathContext)var n=o.bigdecimal.MathContext;o.bigdecimal.MathContext=uu(function(){if(1==arguments.length&&null!=arguments[0]&&arguments[0].gC()==uj)this.__gwt_instance=arguments[0];else if(0==arguments.length)this.__gwt_instance=new nm,nb(this.__gwt_instance,this);else if(1==arguments.length){var n;this.__gwt_instance=(n=arguments[0],new nv(n)),nb(this.__gwt_instance,this)}});var t=o.bigdecimal.MathContext.prototype={};if(n)for(p in n)o.bigdecimal.MathContext[p]=n[p];t.getPrecision=uu(function(){return this.__gwt_instance.Hb()}),t.getRoundingMode=uu(function(){return nE(this.__gwt_instance.Ib())}),t.hashCode=uu(function(){return this.__gwt_instance.hC()}),t.toString=uu(function(){return this.__gwt_instance.tS()}),o.bigdecimal.MathContext.DECIMAL128=uu(function(){return nE(new nv(eh((rj(),fP))))}),o.bigdecimal.MathContext.DECIMAL32=uu(function(){return nE(new nv(eh((rj(),fQ))))}),o.bigdecimal.MathContext.DECIMAL64=uu(function(){return nE(new nv(eh((rj(),fT))))}),o.bigdecimal.MathContext.UNLIMITED=uu(function(){return nE(new nv(eh((rj(),fj))))}),nC(uj,o.bigdecimal.MathContext)}())}function nY(){this.b=new tH,new tH,new tH}function n0(n){ej(),this.c=n,function(n,t){var e,r,i,o;for(e=0,r=(o=tL(uC,{6:1},13,(i=t2(n,tn(t.c)?t9(t.c):null)).length,0)).length;e<r;++e)o[e]=new to(i[e]);eT(o)}(new m,this)}function n1(n){rK(),nq.call(this,ij(n,0))}function n2(n){ez.call(this,n,0,n.length)}function n3(n,t){nk.call(this,n),ic(this,t)}function n6(n,t){return iN(n,t,!0),o8}function n4(n,t){return e7(n.b,n.c++,t),!0}function n5(n,t,e){var r,i;return r=n.b,i=tU(t,0,e),r.b+=i,n}function n9(n,t,e){return tt(n.b,t,t,e),n}function n8(n,t){return n.substr(t,n.length-t)}function n7(n){return Math.log(n)*Math.LOG10E}function tn(n){return null!=n&&n.tM!=l&&!nH(n,1)}function tt(n,t,e,r){n.b=n.b.substr(0,t-0)+r+n8(n.b,e)}function te(n,t,e){tx.call(this,n,t),ic(this,e)}function tr(n,t){this.g=n,this.f=t,this.b=rI(n)}function ti(n,t,e){rK(),this.f=n,this.e=t,this.b=e}function to(n){this.b="Unknown",this.d=n,this.c=-1}function tf(n,t){var e;return(e=new N).d=n+t,e}function tu(n){return nF(n)?n.hC():nj(n)}function tc(n){return iB(),eu((nK(),ur),n)}function ts(n,t){return tm(n.l&t.l,n.m&t.m,n.h&t.h)}function th(n,t){return tm(n.l|t.l,n.m|t.m,n.h|t.h)}function ta(n,t){return tm(n.l^t.l,n.m^t.m,n.h^t.h)}function tb(n,t,e){var r;return ic(r=rD(n,t),e),r}function tl(n,t){return n.length>=t&&n.splice(0,t),n}function tg(n){return nG(n,15)?n:new n0(n)}function tw(){try{null.a()}catch(n){return n}}function td(n){var t;return(t=new N).d=i$+n,t.c=1,t}function tp(n,t){return nF(n)?n.eQ(t):n===t}function t_(n,t){return n.l==t.l&&n.m==t.m&&n.h==t.h}function tv(n,t){return n.l!=t.l||n.m!=t.m||n.h!=t.h}function tm(n,t,e){return(iH=new S).l=n,iH.m=t,iH.h=e,iH}function ty(n,t){return nT(n)===nT(t)||null!=n&&tp(n,t)}function tC(n,t){throw new nf("Index: "+n+", Size: "+t)}function tx(n,t){if(!n)throw new G;this.f=t,tR(this,n)}function tS(n,t){if(!n)throw new G;this.f=t,tR(this,n)}function tM(n,t,e,r){ez.call(this,n,t,e),ic(this,r)}function tB(n,t){ez.call(this,n,0,n.length),ic(this,t)}function tA(n,t){ez.call(this,t4(n),0,n.length),ic(this,t)}function tN(n){ne.call(this,"String index out of range: "+n)}function tI(n,t){var e,r;return e=n.b,r=String.fromCharCode(t),e.b+=r,n}function tE(n,t){ry(n.b,n.b,n.e,t.b,t.e),tW(n),n.c=-2}function tR(n,t){n.d=t,n.b=t.ab(),n.b<54&&(n.g=rr(eA(t)))}function tO(){tO=l,fe=[],fr=[],function(n,t,e){var r,i=0;for(var o in n)(r=n[o])&&(t[i]=o,e[i]=r,++i)}(new x,fe,fr)}function tD(){fy||(fy=!0,new T,new j,function(){if(nl(oM,i$),o.bigdecimal.BigDecimal)var n=o.bigdecimal.BigDecimal;o.bigdecimal.BigDecimal=uu(function(){1==arguments.length&&null!=arguments[0]&&arguments[0].gC()==uD?this.__gwt_instance=arguments[0]:0==arguments.length&&(this.__gwt_instance=new ng,nb(this.__gwt_instance,this))});var t=o.bigdecimal.BigDecimal.prototype={};if(n)for(p in n)o.bigdecimal.BigDecimal[p]=n[p];o.bigdecimal.BigDecimal.ROUND_CEILING=2,o.bigdecimal.BigDecimal.ROUND_DOWN=1,o.bigdecimal.BigDecimal.ROUND_FLOOR=3,o.bigdecimal.BigDecimal.ROUND_HALF_DOWN=5,o.bigdecimal.BigDecimal.ROUND_HALF_EVEN=6,o.bigdecimal.BigDecimal.ROUND_HALF_UP=4,o.bigdecimal.BigDecimal.ROUND_UNNECESSARY=7,o.bigdecimal.BigDecimal.ROUND_UP=0,o.bigdecimal.BigDecimal.__init__=uu(function(n){return nE(function(n){var t,e;if(iU(),(e=iI(n))==i7)t=new nk(new nq(n[0].toString()));else if("BigInteger number"==e)t=new tx(new nq(n[0].toString()),n[1]);else if("BigInteger number MathContext"==e)t=new te(new nq(n[0].toString()),n[1],new ix(n[2].toString()));else if("BigInteger MathContext"==e)t=new n3(new nq(n[0].toString()),new ix(n[1].toString()));else if(e==ox)t=new n2(t4(n[0].toString()));else if("array number number"==e)t=new ez(t4(n[0].toString()),n[1],n[2]);else if("array number number MathContext"==e)t=new tM(t4(n[0].toString()),n[1],n[2],new ix(n[3].toString()));else if("array MathContext"==e)t=new tB(t4(n[0].toString()),new ix(n[1].toString()));else if(e==ok)t=new ef(n[0]);else if(e==oL)t=new ep(n[0],new ix(n[1].toString()));else if(e==oF)t=new Z(n[0].toString());else if("string MathContext"==e)t=new tA(n[0].toString(),new ix(n[1].toString()));else throw new ne("Unknown call signature for obj = new java.math.BigDecimal: "+e);return new nL(t)}(n))}),t.abs_va=uu(function(n){return nE(this.__gwt_instance.s(n))}),t.add_va=uu(function(n){return nE(this.__gwt_instance.t(n))}),t.byteValueExact=uu(function(){return this.__gwt_instance.u()}),t.compareTo=uu(function(n){return this.__gwt_instance.v(n.__gwt_instance)}),t.divide_va=uu(function(n){return nE(this.__gwt_instance.y(n))}),t.divideToIntegralValue_va=uu(function(n){return nE(this.__gwt_instance.x(n))}),t.doubleValue=uu(function(){return this.__gwt_instance.z()}),t.equals=uu(function(n){return this.__gwt_instance.eQ(n)}),t.floatValue=uu(function(){return this.__gwt_instance.A()}),t.hashCode=uu(function(){return this.__gwt_instance.hC()}),t.intValue=uu(function(){return this.__gwt_instance.B()}),t.intValueExact=uu(function(){return this.__gwt_instance.C()}),t.max=uu(function(n){return nE(this.__gwt_instance.F(n.__gwt_instance))}),t.min=uu(function(n){return nE(this.__gwt_instance.G(n.__gwt_instance))}),t.movePointLeft=uu(function(n){return nE(this.__gwt_instance.H(n))}),t.movePointRight=uu(function(n){return nE(this.__gwt_instance.I(n))}),t.multiply_va=uu(function(n){return nE(this.__gwt_instance.J(n))}),t.negate_va=uu(function(n){return nE(this.__gwt_instance.K(n))}),t.plus_va=uu(function(n){return nE(this.__gwt_instance.L(n))}),t.pow_va=uu(function(n){return nE(this.__gwt_instance.M(n))}),t.precision=uu(function(){return this.__gwt_instance.q()}),t.remainder_va=uu(function(n){return nE(this.__gwt_instance.N(n))}),t.round=uu(function(n){return nE(this.__gwt_instance.O(n.__gwt_instance))}),t.scale=uu(function(){return this.__gwt_instance.P()}),t.scaleByPowerOfTen=uu(function(n){return nE(this.__gwt_instance.Q(n))}),t.setScale_va=uu(function(n){return nE(this.__gwt_instance.R(n))}),t.shortValueExact=uu(function(){return this.__gwt_instance.S()}),t.signum=uu(function(){return this.__gwt_instance.r()}),t.stripTrailingZeros=uu(function(){return nE(this.__gwt_instance.T())}),t.subtract_va=uu(function(n){return nE(this.__gwt_instance.U(n))}),t.toBigInteger=uu(function(){return nE(this.__gwt_instance.V())}),t.toBigIntegerExact=uu(function(){return nE(this.__gwt_instance.W())}),t.toEngineeringString=uu(function(){return this.__gwt_instance.X()}),t.toPlainString=uu(function(){return this.__gwt_instance.Y()}),t.toString=uu(function(){return this.__gwt_instance.tS()}),t.ulp=uu(function(){return nE(this.__gwt_instance.Z())}),t.unscaledValue=uu(function(){return nE(this.__gwt_instance.$())}),t.divideAndRemainder_va=uu(function(n){return nR(this.__gwt_instance.w(n))}),t.longValue=uu(function(){return this.__gwt_instance.E()}),t.longValueExact=uu(function(){return this.__gwt_instance.D()}),o.bigdecimal.BigDecimal.valueOf_va=uu(function(n){return nE(function(n){var t,e;if(iU(),(e=iI(n))==ok)t=function(n){if(!isFinite(n)||isNaN(n))throw new nw(os);return new Z(i$+n)}(n[0]);else if(e==ok)t=tZ(e6(n[0]));else if(e==oU)t=ek(e6(n[0]),n[1]);else throw new ne("Unknown call signature for bd = java.math.BigDecimal.valueOf: "+e);return new nL(t)}(n))}),o.bigdecimal.BigDecimal.log=uu(function(n){iU(),typeof console!==oH&&console.log&&console.log(n)}),o.bigdecimal.BigDecimal.logObj=uu(function(n){iU(),typeof console!==oH&&console.log&&typeof JSON!==oH&&JSON.stringify&&console.log("object: "+JSON.stringify(n))}),o.bigdecimal.BigDecimal.ONE=uu(function(){return nE((iU(),new nL(fg)))}),o.bigdecimal.BigDecimal.TEN=uu(function(){return nE((iU(),new nL(fw)))}),o.bigdecimal.BigDecimal.ZERO=uu(function(){return nE((iU(),new nL(fd)))}),nC(uD,o.bigdecimal.BigDecimal)}())}function tk(n,t,e){var r;return(r=new N).d=n+t,r.c=4,r.b=e,r}function tL(n,t,e,r,i){var o;return tJ(n,t,e,o=function(n,t){var e=Array(t);if(3==n)for(var r=0;r<t;++r){var i={};i.l=i.m=i.h=0,e[r]=i}else if(n>0)for(var i=[null,0,!1][n],r=0;r<t;++r)e[r]=i;return e}(i,r)),o}function tU(n,t,e){var r;return r=t+e,function(n,t,e){if(t<0)throw new tN(t);if(e<t)throw new tN(e-t);if(e>n)throw new tN(e)}(n.length,t,r),t3(n,t,r)}function tP(n,t){return ib(),t<fG.length?rW(n,fG[t]):en(n,iv(t))}function tQ(n,t){if(null!=n&&(!n.cM||!n.cM[t]))throw new H;return n}function tT(n){var t,e,r,i;if(n.b>=n.c.c)throw new z;return t=n.c,r=e=n.b++,i=t.c,(r<0||r>=i)&&tC(r,i),t.b[e]}function tj(n,t){return!!nG(t,1)&&String(n)==t}function tF(){ne.call(this,"Add not supported on this collection")}function tH(){this.b=[],this.f={},this.d=!1,this.c=null,this.e=0}function t$(n,t){rK(),this.f=n,this.e=1,this.b=tJ(ud,{6:1},-1,[t])}function tV(n,t){var e;return e=n.c,n.c=t,!n.d&&(n.d=!0,++n.e),e}function tq(n,t){var e,r;return e=n.b,r=String.fromCharCode.apply(null,t),e.b+=r,n}function tG(n,t,e,r){var i,o;return null==t&&(t=oD),i=n.b,o=t.substr(e,r-e),i.b+=o,n}function tz(n,t,e,r){var i;return ry(i=tL(ud,{6:1},-1,t,1),n,t,e,r),i}function tJ(n,t,e,r){return tO(),function(n,t,e){tO();for(var r=0,i=t.length;r<i;++r)n[t[r]]=e[r]}(r,fe,fr),r.aC=n,r.cM=t,r.qI=e,r}function tK(n,t){1==eG(n.b,n.e,t)&&(n.b[n.e]=1,++n.e),n.c=-2}function tW(n){for(;n.e>0&&0==n.b[--n.e];);0==n.b[n.e++]&&(n.f=0)}function tZ(n){return rA(n,oz)&&n_(n,oX)?fc[nM(n)]:new eo(n,0)}function tX(n,t){return 0==t||0==n.f?n:t>0?e3(n,t):rX(n,-t)}function tY(n,t){return 0==t||0==n.f?n:t>0?rX(n,t):e3(n,-t)}function t0(n){var t;return 0==n.f?-1:((t=eg(n))<<5)+ec(n.b[t])}function t1(n){var t;return 0!=(t=nM(n))?ec(t):ec(nM(rJ(n,32)))+32}function t2(n,t){var e;return 0==(e=eR(n,t)).length?(new d).o(t):tl(e,1)}function t3(n,t,e){return n=n.slice(t,e),String.fromCharCode.apply(null,n)}function t6(n,t,e,r){var i;return ia(i=tL(ud,{6:1},-1,t+1,1),n,t,e,r),i}function t4(n){var t,e;return t=tL(uJ,{6:1},-1,e=n.length,1),function(n,t,e,r){var i;for(i=0;i<t;++i)e[r++]=n.charCodeAt(i)}(n,e,t,0),t}function t5(n){var t,e;if(isNaN(((e=fn)||(e=fn=/^\s*[+-]?((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?\s*$/i),t=e.test(n)?parseFloat(n):Number.NaN)))throw new nw(oc+n+iq);return t}function t9(n){if(null!=n&&(n.tM==l||nH(n,1)))throw new H;return n}function t8(n,t){var e;return ic(e=new tS((n.d||(n.d=eU(n.g)),n.d),n.f),t),e}function t7(n,t){var e;if(eV(e=new n1(r4(n)))<t)return eA(e);throw new nr(ol)}function en(n,t){return 0==t.f||0==n.f?fB:(ib(),function n(t,e){var r,i,o,f,u,c,s,h,a,b,l,g,w,d,_,v,m,y,C,x;return(ib(),e.e>t.e&&(c=t,t=e,e=c),e.e<63)?(b=t,l=e,(_=(g=b.e)+(w=l.e),v=b.f!=l.f?-1:1,2==_)?(x=nM(y=iE(ts(e6(b.b[0]),o6),ts(e6(l.b[0]),o6))),0==(C=nM(rU(y,32)))?new t$(v,x):new ti(v,2,tJ(ud,{6:1},-1,[x,C]))):(eq(b.b,g,l.b,w,d=tL(ud,{6:1},-1,_,1)),tW(m=new ti(v,_,d)),m)):(u=(-2&t.e)<<4,h=t.fb(u),a=e.fb(u),i=is(t,h.eb(u)),o=is(e,a.eb(u)),s=n(h,a),r=n(i,o),f=(f=iC(iC(f=n(is(h,i),is(o,a)),s),r)).eb(u),iC(iC(s=s.eb(u<<1),f),r))}(n,t))}function et(n,t){var e;if(t.f<=0)throw new nr(oe);return(e=rF(n,t)).f<0?iC(e,t):e}function ee(n){var t;t=new nz,n.d&&n4(t,new nt(n)),function(n,t){var e=n.f;for(var r in e)if(58==r.charCodeAt(0)){var i=new nB(n,r.substring(1));t.Kb(i)}}(n,t),function(n,t){var e=n.b;for(var r in e){var i=parseInt(r,10);if(r==i)for(var o=e[i],f=0,u=o.length;f<u;++f)t.Kb(o[f])}}(n,t),this.b=new X(t)}function er(n,t){var e;return null==t?n.c:nG(t,1)?(e=tQ(t,1),n.f[i4+e]):rt(n,t,~~tu(t))}function ei(n){return~~Math.max(Math.min(n,0x7fffffff),-0x80000000)}function eo(n,t){this.f=t,this.b=eZ(n),this.b<54?this.g=rr(n):this.d=eW(n)}function ef(n){if(!isFinite(n)||isNaN(n))throw new nw(os);iP(this,n.toPrecision(20))}function eu(n,t){var e;if(e=n[i4+t])return e;if(null==t)throw new G;throw new V}function ec(n){var t,e;if(0==n)return 32;for(t=1,e=0;(t&n)==0;t<<=1)++e;return e}function es(n){var t;return 0==(t=tl(t2(n,tw()),3)).length&&(t=tl((new d).k(),1)),t}function eh(n){var t,e,r,i,o;return tq(t=new W,fF),e=n.b,r=t.b,r.b+=e,t.b.b+=iV,tq(t,fH),i=n.c,o=t.b,o.b+=i,t.b.b}function ea(n){var t;return t=tL(ud,{6:1},-1,n.e,1),iM(n.b,0,t,0,n.e),new ti(n.f,n.e,t)}function eb(n,t){var e;return e7(e=tL(u6,{6:1},16,2,0),0,iD(n,t)),e7(e,1,iO(n,rD(e[0],t))),e}function el(n,t,e){var r;return e7(r=tL(u6,{6:1},16,2,0),0,iQ(n,t,e)),e7(r,1,iO(n,rD(r[0],t))),r}function eg(n){var t;if(-2==n.c){if(0==n.f)t=-1;else for(t=0;0==n.b[t];++t);n.c=t}return n.c}function ew(n){return n.b<54?n.g<0?-1:+(n.g>0):(n.d||(n.d=eU(n.g)),n.d).r()}function ed(n){return n.b<54?new tr(-n.g,n.f):new tS((n.d||(n.d=eU(n.g)),n.d).cb(),n.f)}function ep(n,t){if(!isFinite(n)||isNaN(n))throw new nw(os);iP(this,n.toPrecision(20)),ic(this,t)}function e_(n,t){return isNaN(n)?+!isNaN(t):isNaN(t)?-1:n<t?-1:+(n>t)}function ev(n,t){return t<2||t>36||n<0||n>=t?0:n<10?48+n&65535:97+n-10&65535}function em(n,t){var e,r;return t?((e=t[oy])||(e=new(r=t.gC(),t9(er(n.b,r)))(t),t[oy]=e),e):null}function ey(n){var t,e;return 32==(e=rH(n.h))?32==(t=rH(n.m))?rH(n.l)+32:t+20-10:e-12}function eC(n){return tm(4194303&n,~~n>>22&4194303,1048575*(n<0))}function ex(){ex=l,fi=tm(4194303,4194303,524287),fo=tm(0,0,524288),ff=e6(1),e6(2),fu=e6(0)}function eS(n,t){ia(n.b,n.b,n.e,t.b,t.e),n.e=nd(np(n.e,t.e)+1,n.b.length),tW(n),n.c=-2}function eM(n,t){var e;e=~~t>>5,n.e+=e+(rH(n.b[n.e-1])-(31&t)>=0?0:1),rC(n.b,n.b,e,31&t),tW(n),n.c=-2}function eB(n,t){var e,r;e=~~t>>5,n.e<e||n.ab()<=t||(r=32-(31&t),n.e=e+1,n.b[e]&=r<32?-1>>>r:0,tW(n))}function eA(n){var t;return t=n.e>1?th(rL(e6(n.b[1]),32),ts(e6(n.b[0]),o6)):ts(e6(n.b[0]),o6),iE(e6(n.f),t)}function eN(n,t,e){var r;for(r=e-1;r>=0&&n[r]==t[r];--r);return r<0?0:n_(ts(e6(n[r]),o6),ts(e6(t[r]),o6))?-1:1}function eI(n,t,e){var r,i,o;for(i=0,r=0;i<e;++i)o=t[i],n[i]=o<<1|r,r=~~o>>>31;0!=r&&(n[e]=r)}function eE(n,t,e,r){if(iF=t,n)try{uu(im)()}catch(e){n(t)}else uu(im)()}function eR(n,t){var e,r,i;for(e=0,r=(i=t&&t.stack?t.stack.split("\n"):[]).length;e<r;++e)i[e]=n.n(i[e]);return i}function eO(n,t){var e,r;if(r=~~t>>5==n.e-1&&n.b[n.e-1]==1<<(31&t))for(e=0;r&&e<n.e-1;++e)r=0==n.b[e];return r}function eD(n){var t;if(0!=n.d)return n.d;for(t=0;t<n.b.length;++t)n.d=33*n.d+(-1&n.b[t]);return n.d=n.d*n.f,n.d}function ek(n,t){return 0==t?tZ(n):t_(n,oz)&&t>=0&&t<fp.length?fp[t]:new eo(n,t)}function eL(n){return n==ei(n)?ek(oz,ei(n)):n>=0?new eo(oz,0x7fffffff):new eo(oz,-0x80000000)}function eU(n){return(rK(),n<0)?-1!=n?new ro(-1,-n):fC:n<=10?fS[ei(n)]:new ro(1,n)}function eP(n){var t,e,r;return t=~n.l+1&4194303,e=~n.m+ +(0==t)&4194303,r=~n.h+ +(0==t&&0==e)&1048575,tm(t,e,r)}function eQ(n){var t,e,r;t=~n.l+1&4194303,e=~n.m+ +(0==t)&4194303,r=~n.h+ +(0==t&&0==e)&1048575,n.l=t,n.m=e,n.h=r}function eT(n){var t,e,r;for(r=0,e=tL(uC,{6:1},13,n.length,0),t=n.length;r<t;++r){if(!n[r])throw new G;e[r]=n[r]}}function ej(){var n,t,e,r;for(n=0,t=(r=tL(uC,{6:1},13,(e=es(new m)).length,0)).length;n<t;++n)r[n]=new to(e[n]);eT(r)}function eF(n){var t,e,r,i;return 0==n.f?n:(eI(t=tL(ud,{6:1},-1,e=(i=n.e)+1,1),n.b,i),tW(r=new ti(n.f,e,t)),r)}function eH(n,t,e,r){var i,o;return o=tL(ud,{6:1},-1,((i=e.e)<<1)+1,1),eq(n.b,nd(i,n.e),t.b,nd(i,t.e),o),function(n,t,e){var r,i,o,f,u,c,s;for(r=0,u=t.b,c=t.e,s=oz;r<c;++r){for(o=0,i=oz,f=nM((ib(),iE(ts(e6(n[r]),o6),ts(e6(e),o6))));o<c;++o)i=eX(eX(iE(ts(e6(f),o6),ts(e6(u[o]),o6)),ts(e6(n[r+o]),o6)),ts(e6(nM(i)),o6)),n[r+o]=nM(i),i=rU(i,32);s=eX(s,eX(ts(e6(n[r+c]),o6),i)),n[r+c]=nM(s),s=rU(s,32)}for(o=0,n[c<<1]=nM(s);o<c+1;++o)n[o]=n[o+c]}(o,e,r),function(n,t){var e,r,i,o,f;if(!(e=0!=n[o=t.e])){for(i=t.b,e=!0,r=o-1;r>=0;--r)if(n[r]!=i[r]){e=0!=n[r]&&rB(ts(e6(n[r]),o6),ts(e6(i[r]),o6));break}}return f=new ti(1,o+1,n),e&&tE(f,t),tW(f),f}(o,e)}function e$(n,t){var e;return n===t||!!nG(t,17)&&(e=tQ(t,17),n.f==e.f&&n.e==e.e&&function(n,t){var e;for(e=n.e-1;e>=0&&n.b[e]==t[e];--e);return e<0}(n,e.b))}function eV(n){var t,e;return 0==n.f?0:(t=n.e<<5,e=n.b[n.e-1],n.f<0&&eg(n)==n.e-1&&(e=~~(e-1)),t-=rH(e))}function eq(n,t,e,r,i){ib(),0!=t&&0!=r&&(1==t?i[r]=ru(i,e,r,n[0]):1==r?i[t]=ru(i,n,t,e[0]):function(n,t,e,r,i){var o,f,u,c;if(nT(n)===nT(t)&&r==i){io(n,r,e);return}for(u=0;u<r;++u){for(c=0,f=oz,o=n[u];c<i;++c)f=eX(eX(iE(ts(e6(o),o6),ts(e6(t[c]),o6)),ts(e6(e[u+c]),o6)),ts(e6(nM(f)),o6)),e[u+c]=nM(f),f=rU(f,32);e[u+i]=nM(f)}}(n,e,i,t,r))}function eG(n,t,e){var r,i;for(i=0,r=ts(e6(e),o6);tv(r,oz)&&i<t;++i)r=eX(r,ts(e6(n[i]),o6)),n[i]=nM(r),r=rJ(r,32);return nM(r)}function ez(n,t,e){try{iP(this,tU(n,t,e))}catch(n){if(nG(n=tg(n),14))throw new nw(n.f);throw n}}function eJ(n){if(n<-0x80000000)throw new nr("Overflow");if(!(n>0x7fffffff))return ei(n);throw new nr("Underflow")}function eK(n,t){if(rj(),n<0)throw new no("Digits < 0");if(!t)throw new nu("null RoundingMode");this.b=n,this.c=t}function eW(n){return(rK(),n_(n,oz))?tv(n,oG)?new ri(-1,eP(n)):fC:rB(n,oZ)?new ri(1,n):fS[nM(n)]}function eZ(n){var t;return n_(n,oz)&&(n=tm(4194303&~n.l,4194303&~n.m,1048575&~n.h)),64-(0!=(t=nM(rJ(n,32)))?rH(t):rH(nM(n))+32)}function eX(n,t){var e,r,i;return e=n.l+t.l,r=n.m+t.m+(~~e>>22),i=n.h+t.h+(~~r>>22),tm(4194303&e,4194303&r,1048575&i)}function eY(n,t){var e,r,i;return e=n.l-t.l,r=n.m-t.m+(~~e>>22),i=n.h-t.h+(~~r>>22),tm(4194303&e,4194303&r,1048575&i)}function e0(n,t){var e;if(e=t-1,n.f>0){for(;!n.gb(e);)--e;return t-1-e}for(;n.gb(e);)--e;return t-1-np(e,n.bb())}function e1(n,t){var e;return n===t||!!nG(t,16)&&(e=tQ(t,16)).f==n.f&&(n.b<54?e.g==n.g:n.d.eQ(e.d))}function e2(n,t,e){var r,i,o;for(o=oz,r=t-1;r>=0;--r)i=r1(eX(rL(o,32),ts(e6(n[r]),o6)),e),o=e6(nM(rJ(i,32)));return nM(o)}function e3(n,t){var e,r,i,o;return e=~~t>>5,t&=31,rC(r=tL(ud,{6:1},-1,i=n.e+e+ +(0!=t),1),n.b,e,t),tW(o=new ti(n.f,i,r)),o}function e6(n){var t,e;return n>-129&&n<128?(t=n+128,null==o7&&(o7=tL(uE,{6:1},2,256,0)),(e=o7[t])||(e=o7[t]=eC(n)),e):eC(n)}function e4(n){var t,e;return(rK(),n<fA.length)?fA[n]:((e=tL(ud,{6:1},-1,(t=~~n>>5)+1,1))[t]=1<<(31&n),new ti(1,t+1,e))}function e5(n){rK(),0==n.length?(this.f=0,this.e=1,this.b=tJ(ud,{6:1},-1,[0])):(this.f=1,this.e=n.length,this.b=n,tW(this))}function e9(n){return 0==n.length||n[0]>iV&&n[n.length-1]>iV?n:n.replace(/^(\s*)/,i$).replace(/\s*$/,i$)}function e8(n){return n-=~~n>>1&0x55555555,n=(~~(n=(~~n>>2&0x33333333)+(0x33333333&n))>>4)+n&0xf0f0f0f,n+=~~n>>8,63&(n+=~~n>>16)}function e7(n,t,e){if(null!=e){var r;if(n.qI>0&&(r=n.qI,!e.cM||!e.cM[r])||n.qI<0&&(e.tM==l||nH(e,1)))throw new $}return n[t]=e}function rn(n,t){return n.f>t.f?1:n.f<t.f?-1:n.e>t.e?n.f:n.e<t.e?-t.f:n.f*eN(n.b,t.b,n.e)}function rt(n,t,e){var r=n.b[e];if(r)for(var i=0,o=r.length;i<o;++i){var f=r[i],u=f.Rb();if(n.Ob(t,u))return f.Sb()}return null}function re(n,t,e){var r=n.b[e];if(r)for(var i=0,o=r.length;i<o;++i){var f=r[i].Rb();if(n.Ob(t,f))return!0}return!1}function rr(n){if(t_(n,(ex(),fo)))return -0x8000000000000000;if(!rA(n,fu)){var t;return-((t=eP(n)).l+4194304*t.m+0x100000000000*t.h)}return n.l+4194304*n.m+0x100000000000*n.h}function ri(n,t){this.f=n,t_(ts(t,oV),oz)?(this.e=1,this.b=tJ(ud,{6:1},-1,[nM(t)])):(this.e=2,this.b=tJ(ud,{6:1},-1,[nM(t),nM(rJ(t,32))]))}function ro(n,t){this.f=n,t<0x100000000?(this.e=1,this.b=tJ(ud,{6:1},-1,[~~t])):(this.e=2,this.b=tJ(ud,{6:1},-1,[~~(t%0x100000000),~~(t/0x100000000)]))}function rf(n){var t,e,r;t=ts(e6(n.b[0]),o6),e=oJ,r=oK;do tv(ts(iE(t,e),r),oz)&&(e=th(e,r)),r=rL(r,1);while(n_(r,o4))return nM(ts(e=eP(e),o6))}function ru(n,t,e,r){var i,o;for(ib(),i=oz,o=0;o<e;++o)i=eX(iE(ts(e6(t[o]),o6),ts(e6(r),o6)),ts(e6(nM(i)),o6)),n[o]=nM(i),i=rU(i,32);return nM(i)}function rc(n,t,e){var r,i,o,f,u;return i=e.e<<5,r=et(n.eb(i),e),u=et(e4(i),e),o=rf(e),f=1==e.e?function(n,t,e,r,i){var o,f;for(f=n,o=e.ab()-1;o>=0;--o)f=eH(f,f,r,i),(e.b[~~o>>5]&1<<(31&o))!=0&&(f=eH(f,t,r,i));return f}(u,r,t,e,o):function(n,t,e,r,i){var o,f,u,c,s,h,a;for(s=tL(u5,{6:1},17,8,0),h=n,e7(s,0,t),a=eH(t,t,r,i),f=1;f<=7;++f)e7(s,f,eH(s[f-1],a,r,i));for(f=e.ab()-1;f>=0;--f)if((e.b[~~f>>5]&1<<(31&f))!=0){for(c=1,o=f,u=f-3>0?f-3:0;u<=f-1;++u)(e.b[~~u>>5]&1<<(31&u))!=0&&(u<o?(o=u,c=c<<f-u^1):c^=1<<u-o);for(u=o;u<=f;++u)h=eH(h,h,r,i);h=eH(s[~~(c-1)>>1],h,r,i),f=o}else h=eH(h,h,r,i);return h}(u,r,t,e,o),eH(f,(rK(),fx),e,o)}function rs(n,t){var e,r,i,o;for(e=0,r=n.length;e<r;++e){i=n[e];try{i[1]?i[0].Ub()&&((o=t)||(o=[]),o[o.length]=i,t=o):i[0].Ub()}catch(n){if(!nG(n=tg(n),12))throw n}}return t}function rh(n,t){if(null==n)throw new G;if(t<2||t>36)throw new nw("Radix out of range");if(0==n.length)throw new nw("Zero length BigInteger");(function(n,t,e){var r,i,o,f,u,c,s,h,a,b,l,g,w,d;for(s=l=t.length,45==t.charCodeAt(0)?(a=-1,b=1,--l):(a=1,b=0),o=~~(l/(f=(iS(),fU)[e])),0!=(d=l%f)&&++o,c=tL(ud,{6:1},-1,o,1),r=fL[e-2],u=0,g=b+(0==d?f:d),w=b;w<s;w=g,g+=f)i=r9(t.substr(w,g-w),e),ib(),h=ru(c,c,u,r)+eG(c,u,i),c[u++]=h;n.f=a,n.e=u,n.b=c,tW(n)})(this,n,t)}function ra(){var n,t,e;rp(),n=0xffffff&ei(Math.floor(5960464477539063e-23*(e=uf+++(new Date).getTime()))),t=ei(e-0x1000000*n),this.b=1502^n,this.c=0xece66d^t}function rb(n,t,e,r){var i;if(e>r)return 1;if(e<r)return -1;for(i=e-1;i>=0&&n[i]==t[i];--i);return i<0?0:n_(ts(e6(n[i]),o6),ts(e6(t[i]),o6))?-1:1}function rl(n,t){var e,r,i;for(r=tL(ud,{6:1},-1,i=n.e,1),nd(eg(n),eg(t)),e=0;e<t.e;++e)r[e]=n.b[e]|t.b[e];for(;e<i;++e)r[e]=n.b[e];return new ti(1,i,r)}function rg(n,t){var e,r,i,o;for(r=tL(ud,{6:1},-1,i=n.e,1),e=nd(eg(n),eg(t));e<t.e;++e)r[e]=n.b[e]^t.b[e];for(;e<n.e;++e)r[e]=n.b[e];return tW(o=new ti(1,i,r)),o}function rw(n,t){var e;if(0==t)return fg;if(t<0||t>0x3b9ac9ff)throw new nr(oh);return e=n.f*t,0==n.b&&-1!=n.g?eL(e):new tx((n.d||(n.d=eU(n.g)),n.d).db(t),eJ(e))}function rd(n,t){return t<2||t>36?-1:n>=48&&n<48+(t<10?t:10)?n-48:n>=97&&n<t+97-10?n-97+10:n>=65&&n<t+65-10?n-65+10:-1}function rp(){var n,t,e;for(n=32,rp=l,ui=tL(u4,{6:1},-1,25,1),uo=tL(u4,{6:1},-1,33,1),e=152587890625e-16;n>=0;--n)uo[n]=e,e*=.5;for(n=24,t=1;n>=0;--n)ui[n]=t,t*=.5}function r_(){r_=l,fR=tJ(uJ,{6:1},-1,[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122])}function rv(n){var t;return 0!=n.c||(n.b<54?(t=r2(n.g),n.c=nM(ts(t,oG)),n.c=33*n.c+nM(ts(rJ(t,32),oG)),n.c=17*n.c+ei(n.f)):n.c=17*n.d.hC()+ei(n.f)),n.c}function rm(n,t,e,r){var i,o,f,u,c;return o=(c=n/t)>0?Math.floor(c):Math.ceil(c),f=n%t,u=e_(n*t,0),0!=f&&(i=e_((f<=0?0-f:f)*2,t<=0?0-t:t),o+=r7(1&ei(o),u*(5+i),r)),new tr(o,e)}function ry(n,t,e,r,i){var o,f;for(f=0,o=oz;f<i;++f)o=eX(o,eY(ts(e6(t[f]),o6),ts(e6(r[f]),o6))),n[f]=nM(o),o=rJ(o,32);for(;f<e;++f)o=eX(o,ts(e6(t[f]),o6)),n[f]=nM(o),o=rJ(o,32)}function rC(n,t,e,r){var i,o;if(0==r)iM(t,0,n,e,n.length-e);else for(o=32-r,n[n.length-1]=0,i=n.length-1;i>e;--i)n[i]|=~~t[i-e-1]>>>o,n[i-1]=t[i-e-1]<<r;for(i=0;i<e;++i)n[i]=0}function rx(n,t,e){return e<fb.length&&np(n.b,t.b+fl[ei(e)])+1<54?new tr(n.g+t.g*fb[ei(e)],n.f):new tS(iC((n.d||(n.d=eU(n.g)),n.d),tP((t.d||(t.d=eU(t.g)),t.d),ei(e))),n.f)}function rS(n){return u({moduleName:iF,sessionId:c,subSystem:"startup",evtGroup:"moduleStartup",millis:(new Date).getTime(),type:"onModuleLoadStart",className:n})}function rM(n,t){var e,r,i;if(i=n.r(),0!=t&&0!=n.r()){if(r=~~t>>5,n.e-=r,!rO(n.b,n.e,n.b,r,31&t)&&i<0){for(e=0;e<n.e&&-1==n.b[e];++e)n.b[e]=0;e==n.e&&++n.e,++n.b[e]}tW(n),n.c=-2}}function rB(n,t){var e,r;return e=~~n.h>>19,r=~~t.h>>19,0==e?0!=r||n.h>t.h||n.h==t.h&&n.m>t.m||n.h==t.h&&n.m==t.m&&n.l>t.l:!(0==r||n.h<t.h||n.h==t.h&&n.m<t.m||n.h==t.h&&n.m==t.m&&n.l<=t.l)}function rA(n,t){var e,r;return e=~~n.h>>19,r=~~t.h>>19,0==e?0!=r||n.h>t.h||n.h==t.h&&n.m>t.m||n.h==t.h&&n.m==t.m&&n.l>=t.l:!(0==r||n.h<t.h||n.h==t.h&&n.m<t.m||n.h==t.h&&n.m==t.m&&n.l<t.l)}function rN(n,t){var e,r,i;i=(e=t1(n))<(r=t1(t))?e:r,0!=e&&(n=rU(n,e)),0!=r&&(t=rU(t,r));do rA(n,t)?n=rU(n=eY(n,t),t1(n)):t=rU(t=eY(t,n),t1(t));while(tv(n,oz))return rL(t,i)}function rI(n){var t,e;return n>-0x800000000000&&n<0x800000000000?0==n?0:((t=n<0)&&(n=-n),e=ei(nU(Math.log(n)/.6931471805599453)),(!t||n!=Math.pow(2,e))&&++e,e):eZ(r2(n))}function rE(n,t){var e,r;return(e=n._(),r=t._(),0==e.r())?r:0==r.r()?e:(1==e.e||2==e.e&&e.b[1]>0)&&(1==r.e||2==r.e&&r.b[1]>0)?eW(rN(eA(e),eA(r))):function(n,t){var e,r,i,o;i=(e=n.bb())<(r=t.bb())?e:r,rM(n,e),rM(t,r),1==rn(n,t)&&(o=n,n=t,t=o);do{if(1==t.e||2==t.e&&t.b[1]>0){t=eW(rN(eA(n),eA(t)));break}if(t.e>1.2*n.e)0!=(t=rF(t,n)).r()&&rM(t,t.bb());else do tE(t,n),rM(t,t.bb());while(rn(t,n)>=0)o=t,t=n,n=o}while(0!=o.f)return t.eb(i)}(ea(e),ea(r))}function rR(n,t){var e;if(t.f<=0)throw new nr(oe);if(!(n.gb(0)||t.gb(0)))throw new nr(ot);if(1==t.e&&1==t.b[0])return fB;if(0==(e=function(n,t){var e,r,i,o,f,u,c,s,h,a,b;if(0==n.f)throw new nr(ot);if(!t.gb(0))return function(n,t){var e,r,i,o,f,u,c,s,h,a,b;for(h=tL(ud,{6:1},-1,(o=np(n.e,t.e))+1,1),b=tL(ud,{6:1},-1,o+1,1),iM(t.b,0,h,0,t.e),iM(n.b,0,b,0,n.e),s=new ti(t.f,t.e,h),a=new ti(n.f,n.e,b),u=new ti(0,1,tL(ud,{6:1},-1,o+1,1)),(c=new ti(1,1,tL(ud,{6:1},-1,o+1,1))).b[0]=1,e=0,r=0,f=t.ab();!eO(s,e)&&!eO(a,r);)if(0!=(i=e0(s,f))&&(eM(s,i),e>=r?eM(u,i):(rM(c,r-e<i?r-e:i),i-(r-e)>0&&eM(u,i-r+e)),e+=i),0!=(i=e0(a,f))&&(eM(a,i),r>=e?eM(c,i):(rM(u,e-r<i?e-r:i),i-(e-r)>0&&eM(c,i-e+r)),r+=i),s.r()==a.r()?e<=r?(rV(s,a),rV(u,c)):(rV(a,s),rV(c,u)):e<=r?(r$(s,a),r$(u,c)):(r$(a,s),r$(c,u)),0==a.r()||0==s.r())throw new nr(ot);return eO(a,r)&&(u=c,a.r()!=s.r()&&(s=s.cb())),s.gb(f)&&(u=0>u.r()?u.cb():is(t,u)),0>u.r()&&(u=iC(u,t)),u}(n,t);for(o=32*t.e,a=ea(t),c=new ti(1,1,tL(ud,{6:1},-1,(f=np((b=ea(n)).e,a.e))+1,1)),(s=new ti(1,1,tL(ud,{6:1},-1,f+1,1))).b[0]=1,e=0,(r=a.bb())>(i=b.bb())?(rM(a,r),rM(b,i),eM(c,i),e+=r-i):(rM(a,r),rM(b,i),eM(s,r),e+=i-r),c.f=1;b.r()>0;){for(;rn(a,b)>0;)tE(a,b),h=a.bb(),rM(a,h),eS(c,s),eM(s,h),e+=h;for(;0>=rn(a,b)&&(tE(b,a),0!=b.r());)h=b.bb(),rM(b,h),eS(s,c),eM(c,h),e+=h}if(1!=a.e||1!=a.b[0])throw new nr(ot);return rn(c,t)>=0&&tE(c,t),c=is(t,c),u=rf(t),e>o&&(c=eH(c,(rK(),fx),t,u),e-=o),c=eH(c,e4(o-e),t,u)}(et(n._(),t),t)).f)throw new nr(ot);return n.f<0?is(t,e):e}function rO(n,t,e,r,i){var o,f,u;for(f=0,o=!0;f<r;++f)o&=0==e[f];if(0==i)iM(e,r,n,0,t);else{for(u=32-i,o&=e[f]<<u==0,f=0;f<t-1;++f)n[f]=~~e[f+r]>>>i|e[f+r+1]<<u;n[f]=~~e[f+r]>>>i,++f}return o}function rD(n,t){var e;return(e=n.f+t.f,0==n.b&&-1!=n.g||0==t.b&&-1!=t.g)?eL(e):n.b+t.b<54?new tr(n.g*t.g,eJ(e)):new tx(en((n.d||(n.d=eU(n.g)),n.d),(t.d||(t.d=eU(t.g)),t.d)),eJ(e))}function rk(n,t){var e;if(t<0)throw new nr("Negative exponent");if(0==t)return fx;if(1==t||n.eQ(fx)||n.eQ(fB))return n;if(!n.gb(0)){for(e=1;!n.gb(e);)++e;return en(e4(e*t),n.fb(e).db(t))}return function(n,t){var e,r;for(ib(),rK(),r=fx,e=n;t>1;t>>=1)(1&t)!=0&&(r=en(r,e)),e=1==e.e?en(e,e):new e5(io(e.b,e.e,tL(ud,{6:1},-1,e.e<<1,1)));return en(r,e)}(n,t)}function rL(n,t){var e,r,i;return(t&=63)<22?(e=n.l<<t,r=n.m<<t|~~n.l>>22-t,i=n.h<<t|~~n.m>>22-t):t<44?(e=0,r=n.l<<t-22,i=n.m<<t-22|~~n.l>>44-t):(e=0,r=0,i=n.l<<t-44),tm(4194303&e,4194303&r,1048575&i)}function rU(n,t){var e,r,i,o;return t&=63,e=1048575&n.h,t<22?(o=~~e>>>t,i=~~n.m>>t|e<<22-t,r=~~n.l>>t|n.m<<22-t):t<44?(o=0,i=~~e>>>t-22,r=~~n.m>>t-22|n.h<<44-t):(o=0,i=0,r=~~e>>>t-44),tm(4194303&r,4194303&i,1048575&o)}function rP(n){switch(iB(),n){case 2:return fZ;case 1:return fX;case 3:return fY;case 5:return f0;case 6:return f1;case 4:return f2;case 7:return f3;case 0:return f6;default:throw new no("Invalid rounding mode")}}function rQ(n,t){var e,r,i;if(0==t)return(1&n.b[0])!=0;if(t<0)throw new nr(ob);if((i=~~t>>5)>=n.e)return n.f<0;if(e=n.b[i],t=1<<(31&t),n.f<0){if(i<(r=eg(n)))return!1;e=r==i?-e:~e}return(e&t)!=0}function rT(n){var t,e;return n.e>0||(t=1,e=1,n.b<54?(n.b>=1&&(e=n.g),t+=Math.log(e<=0?0-e:e)*Math.LOG10E):(t+=(n.b-1)*.3010299956639812,0!=ih((n.d||(n.d=eU(n.g)),n.d),iv(t)).r()&&++t),n.e=ei(t)),n.e}function rj(){rj=l,fP=new eK(34,(iB(),f1)),fQ=new eK(7,f1),fT=new eK(16,f1),fj=new eK(0,f2),fF=tJ(uJ,{6:1},-1,[112,114,101,99,105,115,105,111,110,61]),fH=tJ(uJ,{6:1},-1,[114,111,117,110,100,105,110,103,77,111,100,101,61])}function rF(n,t){var e,r,i,o;if(0==t.f)throw new nr(on);return((o=n.e)!=(e=t.e)?o>e?1:-1:eN(n.b,t.b,o))==-1?n:(r=tL(ud,{6:1},-1,e,1),1==e?r[0]=e2(n.b,o,t.b[0]):r=ik(null,o-e+1,n.b,o,t.b,e),tW(i=new ti(n.f,e,r)),i)}function rH(n){var t,e,r;return n<0?0:0==n?32:(e=16-(t=~~(r=-(~~n>>16))>>16&16)+(t=~~(r=(n=~~n>>t)-256)>>16&8),n<<=t,e+=t=~~(r=n-4096)>>16&4,n<<=t,e+=t=~~(r=n-16384)>>16&2,n<<=t,e+2-(t=(r=~~n>>14)&~(~~r>>1)))}function r$(n,t){if(0==n.f)iM(t.b,0,n.b,0,t.e);else{if(0==t.f)return;n.f==t.f?ia(n.b,n.b,n.e,t.b,t.e):rb(n.b,t.b,n.e,t.e)>0?ry(n.b,n.b,n.e,t.b,t.e):(r5(n.b,n.b,n.e,t.b,t.e),n.f=-n.f)}n.e=np(n.e,t.e)+1,tW(n),n.c=-2}function rV(n,t){var e;e=rn(n,t),0==n.f?(iM(t.b,0,n.b,0,t.e),n.f=-t.f):n.f!=t.f?(ia(n.b,n.b,n.e,t.b,t.e),n.f=e):rb(n.b,t.b,n.e,t.e)>0?ry(n.b,n.b,n.e,t.b,t.e):(r5(n.b,n.b,n.e,t.b,t.e),n.f=-n.f),n.e=np(n.e,t.e)+1,tW(n),n.c=-2}function rq(n,t,e){var r,i,o,f,u,c,s,h,a,b;if(e.f<=0)throw new nr(oe);return(r=n,(1==e.e&&1==e.b[0])|t.f>0&0==r.f)?fB:0==r.f&&0==t.f?fx:(t.f<0&&(r=rR(n,e),t=t.cb()),i=e.gb(0)?rc(r._(),t,e):(o=r._(),f=t,u=e.bb(),h=rc(o,f,c=e.fb(u)),a=function(n,t,e){var r,i,o,f,u;for(rK(),f=fx,i=ea(t),r=ea(n),n.gb(0)&&eB(i,e-1),eB(r,e),o=i.ab()-1;o>=0;--o)eB(u=ea(f),e),f=en(f,u),(i.b[~~o>>5]&1<<(31&o))!=0&&eB(f=en(f,r),e);return eB(f,e),f}(o,f,u),s=function(n,t){var e,r,i,o;for(e=1,(r=new e5(tL(ud,{6:1},-1,1<<t,1))).e=1,r.b[0]=1,r.f=1;e<t;++e)i=en(n,r),o=e,(i.b[~~o>>5]&1<<(31&o))!=0&&(r.b[~~e>>5]|=1<<(31&e));return r}(c,u),eB(b=en(is(a,h),s),u),b.f<0&&(b=iC(b,e4(u))),iC(h,en(c,b))),r.f<0&&t.gb(0)&&(i=et(en(is(e,fx),i),e)),i)}function rG(n,t){var e,r,i,o,f,u,c;if(i=eg(n),(r=eg(t))>=n.e)return rK(),fB;for(f=tL(ud,{6:1},-1,u=n.e,1),(e=i>r?i:r)==r&&(f[e]=-t.b[e]&n.b[e],++e),o=nd(t.e,n.e);e<o;++e)f[e]=~t.b[e]&n.b[e];if(e>=t.e)for(;e<n.e;++e)f[e]=n.b[e];return tW(c=new ti(1,u,f)),c}function rz(n,t){return 0==n.b&&-1!=n.g?eL(t>0?t:0):t>=0?n.b<54?new tr(n.g,eJ(t)):new tx((n.d||(n.d=eU(n.g)),n.d),eJ(t)):-t<fb.length&&n.b+fl[ei(-t)]<54?new tr(n.g*fb[ei(-t)],0):new tx(tP((n.d||(n.d=eU(n.g)),n.d),ei(-t)),0)}function rJ(n,t){var e,r,i,o,f;return t&=63,(r=(524288&(e=n.h))!=0)&&(e|=-1048576),t<22?(f=~~e>>t,o=~~n.m>>t|e<<22-t,i=~~n.l>>t|n.m<<22-t):t<44?(f=1048575*!!r,o=~~e>>t-22,i=~~n.m>>t-22|e<<44-t):(f=1048575*!!r,o=4194303*!!r,i=~~e>>t-44),tm(4194303&i,4194303&o,1048575&f)}function rK(){var n;for(n=0,rK=l,fx=new t$(1,1),fM=new t$(1,10),fB=new t$(0,0),fC=new t$(-1,1),fS=tJ(u5,{6:1},17,[fB,fx,new t$(1,2),new t$(1,3),new t$(1,4),new t$(1,5),new t$(1,6),new t$(1,7),new t$(1,8),new t$(1,9),fM]),fA=tL(u5,{6:1},17,32,0);n<fA.length;++n)e7(fA,n,eW(rL(oJ,n)))}function rW(n,t){var e,r,i,o,f,u,c,s,h;return(ib(),0==(s=n.f))?(rK(),fB):(r=n.e,e=n.b,1==r)?(c=nM(i=iE(ts(e6(e[0]),o6),ts(e6(t),o6))),0==(f=nM(rU(i,32)))?new t$(s,c):new ti(s,2,tJ(ud,{6:1},-1,[c,f]))):((o=tL(ud,{6:1},-1,u=r+1,1))[r]=ru(o,e,r,t),tW(h=new ti(s,u,o)),h)}function rZ(n,t){var e,r,i,o,f,u;if(r=eg(t),(i=eg(n))>=t.e)return t;if(r>=n.e)return n;if(o=tL(ud,{6:1},-1,f=nd(n.e,t.e),1),r==i)o[i]=-(-n.b[i]|-t.b[i]),e=i;else{for(e=r;e<i;++e)o[e]=t.b[e];o[e]=t.b[e]&n.b[e]-1}for(++e;e<f;++e)o[e]=n.b[e]&t.b[e];return tW(u=new ti(-1,f,o)),u}function rX(n,t){var e,r,i,o,f;if(r=~~t>>5,t&=31,r>=n.e)return n.f<0?(rK(),fC):(rK(),fB);if(rO(i=tL(ud,{6:1},-1,(o=n.e-r)+1,1),o,n.b,r,t),n.f<0){for(e=0;e<r&&0==n.b[e];++e);if(e<r||t>0&&n.b[e]<<32-t!=0){for(e=0;e<o&&-1==i[e];++e)i[e]=0;e==o&&++o,++i[e]}}return tW(f=new ti(n.f,o,i)),f}function rY(n,t,e){var r;if(!e)throw new G;return 0==(r=t-n.f)?n:r>0?r<fb.length&&n.b+fl[ei(r)]<54?new tr(n.g*fb[ei(r)],t):new tx(tP((n.d||(n.d=eU(n.g)),n.d),ei(r)),t):n.b<54&&-r<fb.length?rm(n.g,fb[ei(-r)],t,e):iw((n.d||(n.d=eU(n.g)),n.d),iv(-r),t,e)}function r0(n,t){var e;if(e=n.f-t.f,0==n.b&&-1!=n.g){if(e<=0)return t;if(0==t.b&&-1!=t.g)return n}else if(0==t.b&&-1!=t.g&&e>=0)return n;return 0!=e?e>0?rx(n,t,e):rx(t,n,-e):np(n.b,t.b)+1<54?new tr(n.g+t.g,n.f):new tS(iC((n.d||(n.d=eU(n.g)),n.d),(t.d||(t.d=eU(t.g)),t.d)),n.f)}function r1(n,t){var e,r,i,o,f;return(r=ts(e6(t),o6),rA(n,oz))?(o=iN(n,r,!1),f=n6(n,r)):(o=iN(e=rU(n,1),i=e6(~~t>>>1),!1),f=eX(rL(f=n6(e,i),1),ts(n,oJ)),(1&t)!=0&&(rB(o,f)?rB(eY(o,f),r)?(f=eX(f,eY(rL(r,1),o)),o=eY(o,oK)):(f=eX(f,eY(r,o)),o=eY(o,oJ)):f=eY(f,o))),th(rL(f,32),ts(o,o6))}function r2(n){var t,e,r,i;return isNaN(n)?(ex(),fu):n<-0x8000000000000000?(ex(),fo):n>=0x8000000000000000?(ex(),fi):(r=!1,n<0&&(r=!0,n=-n),e=0,n>=0x100000000000&&(e=ei(n/0x100000000000),n-=0x100000000000*e),t=0,n>=4194304&&(t=ei(n/4194304),n-=4194304*t),i=tm(ei(n),t,e),r&&eQ(i),i)}function r3(n){var t,e,r,i;if(0==n.l&&0==n.m&&0==n.h)return iK;if(524288==n.h&&0==n.m&&0==n.l)return"-9223372036854775808";if(~~n.h>>19!=0)return iz+r3(eP(n));for(e=n,r=i$;0!=e.l||0!=e.m||0!=e.h;){if(e=iN(e,e6(1e9),!0),t=i$+nM(o8),0!=e.l||0!=e.m||0!=e.h)for(i=9-t.length;i>0;--i)t=iK+t;r=t+r}return r}function r6(n,t){var e,r,i,o,f,u,c,s,h,a,b,l,g,w,d,_,v,m,y,C,x,S,M;if(0==(i=t.f))throw new nr(on);return(r=t.e,e=t.b,1==r)?(l=e[0],(x=n.b,S=n.e,M=n.f,1==S)?(d=iN(g=ts(e6(x[0]),o6),w=ts(e6(l),o6),!1),v=n6(g,w),M!=i&&(d=eP(d)),M<0&&(v=eP(v)),tJ(u5,{6:1},17,[eW(d),eW(v)])):(_=tL(ud,{6:1},-1,S,1),m=tJ(ud,{6:1},-1,[ir(_,x,S,l)]),y=new ti(M==i?1:-1,S,_),C=new ti(M,1,m),tW(y),tW(C),tJ(u5,{6:1},17,[y,C]))):(h=n.b,((a=n.e)!=r?a>r?1:-1:eN(h,e,a))<0)?tJ(u5,{6:1},17,[fB,n]):(b=n.f,u=ik(o=tL(ud,{6:1},-1,f=a-r+1,1),f,h,a,e,r),c=new ti(b==i?1:-1,f,o),s=new ti(b,r,u),tW(c),tW(s),tJ(u5,{6:1},17,[c,s]))}function r4(n){var t;if(0==n.f||0==n.b&&-1!=n.g)return n.d||(n.d=eU(n.g)),n.d;if(n.f<0)return en((n.d||(n.d=eU(n.g)),n.d),iv(-n.f));if(n.f>(n.e>0?n.e:nU((n.b-1)*.3010299956639812)+1)||n.f>(n.d||(n.d=eU(n.g)),n.d).bb()||0!=(t=r6((n.d||(n.d=eU(n.g)),n.d),iv(n.f)))[1].r())throw new nr(ol);return t[0]}function r5(n,t,e,r,i){var o,f;if(o=oz,e<i){for(f=0;f<e;++f)o=eX(o,eY(ts(e6(r[f]),o6),ts(e6(t[f]),o6))),n[f]=nM(o),o=rJ(o,32);for(;f<i;++f)o=eX(o,ts(e6(r[f]),o6)),n[f]=nM(o),o=rJ(o,32)}else{for(f=0;f<i;++f)o=eX(o,eY(ts(e6(r[f]),o6),ts(e6(t[f]),o6))),n[f]=nM(o),o=rJ(o,32);for(;f<e;++f)o=eY(o,ts(e6(t[f]),o6)),n[f]=nM(o),o=rJ(o,32)}}function r9(n,t){var e,r,i,o;if(null==n)throw new nw(oD);if(t<2||t>36)throw new nw("radix "+t+" out of range");for(e=i=+((r=n.length)>0&&45==n.charCodeAt(0));e<r;++e)if(-1==rd(n.charCodeAt(e),t))throw new nw(oc+n+iq);if(isNaN(o=parseInt(n,t))||o<-0x80000000||o>0x7fffffff)throw new nw(oc+n+iq);return o}function r8(n){var t,e;if(0==n.f)return rK(),fC;if(e$(n,(rK(),fC)))return fB;if(e=tL(ud,{6:1},-1,n.e+1,1),n.f>0){if(-1!=n.b[n.e-1])for(t=0;-1==n.b[t];++t);else{for(t=0;t<n.e&&-1==n.b[t];++t);if(t==n.e)return e[t]=1,new ti(-n.f,t+1,e)}}else for(t=0;0==n.b[t];++t)e[t]=-1;for(e[t]=n.b[t]+n.f,++t;t<n.e;++t)e[t]=n.b[t];return new ti(-n.f,t,e)}function r7(n,t,e){var r;switch(r=0,e.c){case 7:if(0!=t)throw new nr(ol);break;case 0:r=0==t?0:t<0?-1:1;break;case 2:r=(0==t?0:t<0?-1:1)>0?0==t?0:t<0?-1:1:0;break;case 3:r=(0==t?0:t<0?-1:1)<0?0==t?0:t<0?-1:1:0;break;case 4:(t<0?-t:t)>=5&&(r=0==t?0:t<0?-1:1);break;case 5:(t<0?-t:t)>5&&(r=0==t?0:t<0?-1:1);break;case 6:(t<0?-t:t)+n>5&&(r=0==t?0:t<0?-1:1)}return r}function it(n,t){var e,r,i,o,f,u,c,s;if(c=0==n.f?1:n.f,f=tL(ud,{6:1},-1,u=np((o=~~t>>5)+1,n.e)+1,1),e=1<<(31&t),iM(n.b,0,f,0,n.e),n.f<0){if(o>=n.e)f[o]=e;else if(o>(r=eg(n)))f[o]^=e;else if(o<r){for(f[o]=-e,i=o+1;i<r;++i)f[i]=-1;f[i]=f[i]--}else if(i=o,f[o]=-(-f[o]^e),0==f[o]){for(++i;-1==f[i];++i)f[i]=0;++f[i]}}else f[o]^=e;return tW(s=new ti(c,u,f)),s}function ie(n,t){var e,r,i,o,f,u,c,s,h;for(r=0,e=(f=is(n,(rK(),fx))).ab(),o=f.bb(),u=f.fb(o),c=new ra;r<t;++r){if(r<fK.length)s=fJ[r];else do s=new iy(e,c);while(rn(s,n)>=0||0==s.f||1==s.e&&1==s.b[0])if(!(1==(h=rq(s,u,n)).e&&1==h.b[0]||h.eQ(f))){for(i=1;i<o;++i)if(!h.eQ(f)&&1==(h=et(en(h,h),n)).e&&1==h.b[0])return!1;if(!h.eQ(f))return!1}}return!0}function ir(n,t,e,r){var i,o,f,u,c,s,h;for(s=oz,o=ts(e6(r),o6),u=e-1;u>=0;--u)rA(h=th(rL(s,32),ts(e6(t[u]),o6)),oz)?(c=iN(h,o,!1),s=n6(h,o)):(c=iN(i=rU(h,1),f=e6(~~r>>>1),!1),s=eX(rL(s=n6(i,f),1),ts(h,oJ)),(1&r)!=0&&(rB(c,s)?rB(eY(c,s),o)?(s=eX(s,eY(rL(o,1),c)),c=eY(c,oK)):(s=eX(s,eY(o,c)),c=eY(c,oJ)):s=eY(s,c))),n[u]=nM(ts(c,o6));return nM(s)}function ii(n,t){var e,r,i,o,f,u,c;if(f=tL(ud,{6:1},-1,u=np(n.e,t.e),1),i=eg(n),e=r=eg(t),i==r)f[r]=-n.b[r]^-t.b[r];else{for(f[r]=-t.b[r],o=nd(t.e,i),++e;e<o;++e)f[e]=~t.b[e];if(e==t.e){for(;e<i;++e)f[e]=-1;f[e]=n.b[e]-1}else f[e]=-n.b[e]^~t.b[e]}for(o=nd(n.e,t.e),++e;e<o;++e)f[e]=n.b[e]^t.b[e];for(;e<n.e;++e)f[e]=n.b[e];for(;e<t.e;++e)f[e]=t.b[e];return tW(c=new ti(1,u,f)),c}function io(n,t,e){var r,i,o,f;for(i=0;i<t;++i){for(r=oz,f=i+1;f<t;++f)r=eX(eX(iE(ts(e6(n[i]),o6),ts(e6(n[f]),o6)),ts(e6(e[i+f]),o6)),ts(e6(nM(r)),o6)),e[i+f]=nM(r),r=rU(r,32);e[i+t]=nM(r)}for(eI(e,e,t<<1),r=oz,i=0,o=0;i<t;++i,++o)r=eX(eX(iE(ts(e6(n[i]),o6),ts(e6(n[i]),o6)),ts(e6(e[o]),o6)),ts(e6(nM(r)),o6)),e[o]=nM(r),r=eX(r=rU(r,32),ts(e6(e[++o]),o6)),e[o]=nM(r),r=rU(r,32);return e}function iu(n,t){var e,r,i,o,f,u;return(i=ew(n))!=(u=ew(t))?i<u?-1:1:n.f==t.f&&n.b<54&&t.b<54?n.g<t.g?-1:+(n.g>t.g):(r=n.f-t.f,(e=(n.e>0?n.e:nU((n.b-1)*.3010299956639812)+1)-(t.e>0?t.e:nU((t.b-1)*.3010299956639812)+1))>r+1)?i:e<r-1?-i:(n.d||(n.d=eU(n.g)),o=n.d,t.d||(t.d=eU(t.g)),f=t.d,r<0?o=en(o,iv(-r)):r>0&&(f=en(f,iv(r))),rn(o,f))}function ic(n,t){var e,r,i,o,f,u,c,s,h,a,b,l,g;if(o=t.b,!((n.e>0?n.e:nU((n.b-1)*.3010299956639812)+1)-o<0||0==o||(r=n.q()-o)<=0)){if(n.b<54){l=r2(fb[c=r]),b=eY(r2(n.f),e6(c)),a=iN(g=r2(n.g),l,!1),tv(h=n6(g,l),oz)&&(s=t_(eY(rL(n_(h,oz)?eP(h):h,1),l),oz)?0:n_(eY(rL(n_(h,oz)?eP(h):h,1),l),oz)?-1:1,a=eX(a,e6(r7(1&nM(a),(t_(h,oz)?0:n_(h,oz)?-1:1)*(5+s),t.c))),n7(rr(n_(a,oz)?eP(a):a))>=t.b&&(a=nP(a,oZ),b=eY(b,oJ))),n.f=eJ(rr(b)),n.e=t.b,n.g=rr(a),n.b=eZ(a),n.d=null;return}u=iv(r),i=r6((n.d||(n.d=eU(n.g)),n.d),u),f=n.f-r,0!=i[1].r()&&(e=rn(eF(i[1]._()),u),0!=(e=r7(+!!i[0].gb(0),i[1].r()*(5+e),t.c))&&e7(i,0,iC(i[0],eW(e6(e)))),new nk(i[0]).q()>o&&(e7(i,0,ih(i[0],(rK(),fM))),--f)),n.f=eJ(f),n.e=o,tR(n,i[0])}}function is(n,t){var e,r,i,o,f,u,c,s,h,a;if(f=n.f,0==(c=t.f))return n;if(0==f)return t.cb();if((o=n.e)+(u=t.e)==2)return e=ts(e6(n.b[0]),o6),r=ts(e6(t.b[0]),o6),f<0&&(e=eP(e)),c<0&&(r=eP(r)),eW(eY(e,r));if(-1==(i=o!=u?o>u?1:-1:eN(n.b,t.b,o)))a=-c,h=f==c?tz(t.b,u,n.b,o):t6(t.b,u,n.b,o);else if(a=f,f==c){if(0==i)return rK(),fB;h=tz(n.b,o,t.b,u)}else h=t6(n.b,o,t.b,u);return tW(s=new ti(a,h.length,h)),s}function ih(n,t){var e,r,i,o,f,u,c,s,h;if(0==t.f)throw new nr(on);return(i=t.f,1==t.e&&1==t.b[0])?t.f>0?n:n.cb():(s=n.f,(c=n.e)+(r=t.e)==2)?(h=nP(ts(e6(n.b[0]),o6),ts(e6(t.b[0]),o6)),s!=i&&(h=eP(h)),eW(h)):0==(e=c!=r?c>r?1:-1:eN(n.b,t.b,c))?s==i?fx:fC:-1==e?fB:(o=tL(ud,{6:1},-1,f=c-r+1,1),1==r?ir(o,n.b,c,t.b[0]):ik(o,f,n.b,c,t.b,r),tW(u=new ti(s==i?1:-1,f,o)),u)}function ia(n,t,e,r,i){var o,f;if(o=eX(ts(e6(t[0]),o6),ts(e6(r[0]),o6)),n[0]=nM(o),o=rJ(o,32),e>=i){for(f=1;f<i;++f)o=eX(o,eX(ts(e6(t[f]),o6),ts(e6(r[f]),o6))),n[f]=nM(o),o=rJ(o,32);for(;f<e;++f)o=eX(o,ts(e6(t[f]),o6)),n[f]=nM(o),o=rJ(o,32)}else{for(f=1;f<e;++f)o=eX(o,eX(ts(e6(t[f]),o6),ts(e6(r[f]),o6))),n[f]=nM(o),o=rJ(o,32);for(;f<i;++f)o=eX(o,ts(e6(r[f]),o6)),n[f]=nM(o),o=rJ(o,32)}tv(o,oz)&&(n[f]=nM(o))}function ib(){var n,t;for(t=0,ib=l,f$=tL(u5,{6:1},17,32,0),fV=tL(u5,{6:1},17,32,0),fq=tJ(ud,{6:1},-1,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,0x2e90edd,0xe8d4a51,0x48c27395]),fG=tJ(ud,{6:1},-1,[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9]),n=oJ;t<=18;++t)e7(f$,t,eW(n)),e7(fV,t,eW(rL(n,t))),n=iE(n,oW);for(;t<fV.length;++t)e7(f$,t,en(f$[t-1],f$[1])),e7(fV,t,en(fV[t-1],(rK(),fM)))}function il(n,t,e,r){var i,o,f;if(!r)throw new G;if(0==t.b&&-1!=t.g)throw new nr(oo);if(i=n.f-t.f-e,n.b<54&&t.b<54){if(0==i)return rm(n.g,t.g,e,r);if(i>0){if(i<fb.length&&t.b+fl[ei(i)]<54)return rm(n.g,t.g*fb[ei(i)],e,r)}else if(-i<fb.length&&n.b+fl[ei(-i)]<54)return rm(n.g*fb[ei(-i)],t.g,e,r)}return n.d||(n.d=eU(n.g)),o=n.d,t.d||(t.d=eU(t.g)),f=t.d,i>0?f=tP(f,ei(i)):i<0&&(o=tP(o,ei(-i))),iw(o,f,e,r)}function ig(n,t){var e,r,i,o,f,u,c;if(r=eg(t),(i=eg(n))>=t.e)return t;if(f=tL(ud,{6:1},-1,u=t.e,1),r<i)for(e=r;e<i;++e)f[e]=t.b[e];else if(i<r){for(e=i,f[i]=-n.b[i],o=nd(n.e,r),++e;e<o;++e)f[e]=~n.b[e];if(e!=n.e)f[e]=~(-t.b[e]|n.b[e]);else{for(;e<r;++e)f[e]=-1;f[e]=t.b[e]-1}++e}else e=i,f[i]=-(-t.b[i]|n.b[i]),++e;for(o=nd(t.e,n.e);e<o;++e)f[e]=t.b[e]&~n.b[e];for(;e<t.e;++e)f[e]=t.b[e];return tW(c=new ti(-1,u,f)),c}function iw(n,t,e,r){var i,o,f,u,c,s,h;if(u=(f=r6(n,t))[0],0==(s=f[1]).r())return new tx(u,e);if(h=n.r()*t.r(),54>t.ab()?(c=eA(s),o=eA(t),i=t_(eY(rL(n_(c,oz)?eP(c):c,1),n_(o,oz)?eP(o):o),oz)?0:n_(eY(rL(n_(c,oz)?eP(c):c,1),n_(o,oz)?eP(o):o),oz)?-1:1):i=rn(eF(s._()),t._()),0!=(i=r7(+!!u.gb(0),h*(5+i),r))){if(54>u.ab())return ek(eX(eA(u),e6(i)),e);u=iC(u,eW(e6(i)))}return new tx(u,e)}function id(n){var t,e,r,i,o,f;return null!=n.i?n.i:n.b<32?(n.i=function(n,t){var e,r,i,o,f,u,c,s,h,a,b,l,g,w,d,_,v,m;if(iS(),(f=n_(n,oz))&&(n=eP(n)),t_(n,oz))switch(t){case 0:return iK;case 1:return iZ;case 2:return iX;case 3:return iY;case 4:return i0;case 5:return i1;case 6:return i2;default:return s=new K,t<0?s.b.b+=i6:s.b.b+=i3,b=s.b,l=-0x80000000==t?"2147483648":i$+-t,b.b+=l,s.b.b}c=tL(uJ,{6:1},-1,19,1),e=18,a=n;do u=a,a=nP(a,oZ),c[--e]=65535&nM(eX(o0,eY(u,iE(a,oZ))));while(tv(a,oz))if(r=eY(eY(eY(oY,e6(e)),e6(t)),oJ),0==t)return f&&(c[--e]=45),tU(c,e,18-e);if(t>0&&rA(r,oq)){if(rA(r,oz)){for(o=17,i=e+nM(r);o>=i;--o)c[o+1]=c[o];return c[++i]=46,f&&(c[--e]=45),tU(c,e,18-e+1)}for(o=2;n_(e6(o),eX(eP(r),oJ));++o)c[--e]=48;return c[--e]=46,c[--e]=48,f&&(c[--e]=45),tU(c,e,18-e)}return(h=e+1,s=new W,f&&(s.b.b+=iz),18-h>=1)?(tI(s,c[e]),s.b.b+=iJ,g=s.b,w=tU(c,e+1,18-e-1),g.b+=w):(d=s.b,_=tU(c,e,18-e),d.b+=_),s.b.b+=ou,rB(r,oz)&&(s.b.b+=iG),v=s.b,m=i$+r3(r),v.b+=m,s.b.b}(r2(n.g),ei(n.f)),n.i):(i=ij((n.d||(n.d=eU(n.g)),n.d),0),0==n.f)?i:(t=0>(n.d||(n.d=eU(n.g)),n.d).r()?2:1,e=i.length,r=-n.f+e-t,f=(o=new K).b,f.b+=i,n.f>0&&r>=-6?r>=0?n9(o,e-ei(n.f),iJ):(tt(o.b,t-1,t-1,iW),n9(o,t+1,tU(fs,0,-ei(r)-1))):(e-t>=1&&(tt(o.b,t,t,iJ),++e),tt(o.b,e,e,ou),r>0&&n9(o,++e,iG),n9(o,++e,i$+r3(r2(r)))),n.i=o.b.b,n.i)}function ip(n,t){var e,r,i,o,f,u;if(i=eg(n),o=eg(t),i>=t.e)return n;if(r=o>i?o:i,0==(e=o>i?-t.b[r]&~n.b[r]:o<i?~t.b[r]&-n.b[r]:-t.b[r]&-n.b[r])){for(++r;r<t.e&&0==(e=~(n.b[r]|t.b[r]));++r);if(0==e){for(;r<n.e&&0==(e=~n.b[r]);++r);if(0==e)return(f=tL(ud,{6:1},-1,u=n.e+1,1))[u-1]=1,new ti(-1,u,f)}}for((f=tL(ud,{6:1},-1,u=n.e,1))[r]=-e,++r;r<t.e;++r)f[r]=n.b[r]|t.b[r];for(;r<n.e;++r)f[r]=n.b[r];return new ti(-1,u,f)}function i_(n,t,e){for(var r=RegExp(t,"g"),i=[],o=0,f=n,u=null;;){var c=r.exec(f);if(null==c||f==i$||o==e-1&&e>0){i[o]=f;break}i[o]=f.substring(0,c.index),f=f.substring(c.index+c[0].length,f.length),r.lastIndex=0,u==f&&(i[o]=f.substring(0,1),f=f.substring(1)),u=f,o++}if(0==e&&n.length>0){for(var s=i.length;s>0&&i[s-1]==i$;)--s;s<i.length&&i.splice(s,i.length-s)}for(var h=tL(uN,{6:1},1,i.length,0),a=0;a<i.length;++a)h[a]=i[a];return h}function iv(n){var t,e,r,i;if(ib(),t=ei(n),n<fV.length)return fV[t];if(n<=50)return(rK(),fM).db(t);if(n<=1e3)return f$[1].db(t).eb(t);if(n>1e6)throw new nr("power of ten too big");if(n<=0x7fffffff)return f$[1].db(t).eb(t);for(i=r=f$[1].db(0x7fffffff),e=r2(n-0x7fffffff),t=ei(n%0x7fffffff);rB(e,o3);)i=en(i,r),e=eY(e,o3);for(i=(i=en(i,f$[1].db(t))).eb(0x7fffffff),e=r2(n-0x7fffffff);rB(e,o3);)i=i.eb(0x7fffffff),e=eY(e,o3);return i.eb(t)}function im(){var n,t;u&&rS("com.iriscouch.gwtapp.client.BigDecimalApp"),nW(new J),nX(new T),nZ(new j),tD(new F),u&&rS("com.google.gwt.user.client.UserAgentAsserter"),tj(oj,n=-1!=(t=r.userAgent.toLowerCase()).indexOf(oQ)?oQ:-1!=t.indexOf("webkit")||function(){if(-1!=t.indexOf("chromeframe"))return!0;if(typeof e.ActiveXObject!=oH)try{var n=new ActiveXObject("ChromeTab.ChromeFrame");if(n)return n.registerBhoIfNeeded(),!0}catch(n){}return!1}()?oj:-1!=t.indexOf(oO)&&f.documentMode>=9?"ie9":-1!=t.indexOf(oO)&&f.documentMode>=8?"ie8":!function(){var n=/msie ([0-9]+)\.([0-9]+)/.exec(t);if(n&&3==n.length)return 1e3*parseInt(n[1])+parseInt(n[2])>=6e3}()?-1!=t.indexOf("gecko")?"gecko1_8":"unknown":"ie6")||o.alert("ERROR: Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (safari) does not match the runtime user.agent value ("+n+"). Expect more errors.\n"),u&&rS("com.google.gwt.user.client.DocumentModeAsserter"),function(){var n,t,e;for(e=0,t=f.compatMode,n=tJ(uN,{6:1},1,[oi]);e<n.length;++e)if(tj(n[e],t))return;1==n.length&&tj(oi,n[0])&&tj("BackCompat",t)}()}function iy(n,t){var e,r,i,o,f;if(rK(),n<0)throw new no("numBits must be non-negative");if(0==n)this.f=0,this.e=1,this.b=tJ(ud,{6:1},-1,[0]);else{for(f=0,this.f=1,this.e=~~(n+31)>>5,this.b=tL(ud,{6:1},-1,this.e,1);f<this.e;++f)this.b[f]=ei((i=0xece66d*t.b+1502*t.c+(e=Math.floor(5960464477539063e-23*(o=0xece66d*t.c+11))),o-=0x1000000*e,t.b=i%=0x1000000,t.c=o,(r=256*t.b+nU(t.c*uo[32]))>=0x80000000&&(r-=0x100000000),r));this.b[this.e-1]>>>=31&-n,tW(this)}}function iC(n,t){var e,r,i,o,f,u,c,s,h,a,b,l;if(f=n.f,c=t.f,0==f)return t;if(0==c)return n;if((o=n.e)+(u=t.e)==2)return(e=ts(e6(n.b[0]),o6),r=ts(e6(t.b[0]),o6),f==c)?(l=nM(s=eX(e,r)),0==(b=nM(rU(s,32)))?new t$(f,l):new ti(f,2,tJ(ud,{6:1},-1,[l,b]))):eW(f<0?eY(r,e):eY(e,r));if(f==c)a=f,h=o>=u?t6(n.b,o,t.b,u):t6(t.b,u,n.b,o);else{if(0==(i=o!=u?o>u?1:-1:eN(n.b,t.b,o)))return rK(),fB;1==i?(a=f,h=tz(n.b,o,t.b,u)):(a=c,h=tz(t.b,u,n.b,o))}return tW(s=new ti(a,h.length,h)),s}function ix(n){var t,e,r,i;if(rj(),null==n)throw new nu("null string");if((t=t4(n)).length<27||t.length>45)throw new no(oS);for(r=0;r<fF.length&&t[r]==fF[r];++r);if(r<fF.length||-1==(e=rd(t[r],10)))throw new no(oS);for(this.b=10*this.b+e,++r;;){if(-1==(e=rd(t[r],10))){if(32==t[r]){++r;break}throw new no(oS)}if(this.b=10*this.b+e,this.b<0)throw new no(oS);++r}for(i=0;i<fH.length&&t[r]==fH[i];++r,++i);if(i<fH.length)throw new no(oS);this.c=function(n){var t,e,r,i,o;if(iB(),null==n)throw new G;if((e=(r=t4(n)).length)<ue.length||e>ut.length)throw new V;if(o=null,i=null,67==r[0]?(i=fZ,o=f4):68==r[0]?(i=fX,o=f5):70==r[0]?(i=fY,o=f9):72==r[0]?e>6&&(68==r[5]?(i=f0,o=f8):69==r[5]?(i=f1,o=f7):85==r[5]&&(i=f2,o=un)):85==r[0]&&(80==r[1]?(i=f6,o=ue):78==r[1]&&(i=f3,o=ut)),i&&e==o.length){for(t=1;t<e&&r[t]==o[t];++t);if(t==e)return i}throw new V}(tU(t,r,t.length-r))}function iS(){iS=l,fL=tJ(ud,{6:1},-1,[-0x80000000,0x4546b3db,0x40000000,0x48c27395,0x159fd800,0x75db9c97,0x40000000,0x17179149,1e9,0xcc6db61,0x19a10000,0x309f1021,0x57f6c100,0xa2f1b6f,0x10000000,0x18754571,0x247dbc80,0x3547667b,128e7,0x6b5a6e1d,0x6c20a40,0x8d2d931,0xb640000,0xe8d4a51,0x1269ae40,0x17179149,0x1cb91000,0x23744899,729e6,0x34e63b41,0x40000000,0x4cfa3cc1,0x5c13d840,0x6d91b519,0x39aa400]),fU=tJ(ud,{6:1},-1,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])}function iM(n,t,e,r,i){var o,f,u,c,s,h,a,b,l;if(null==n||null==e)throw new G;if(b=n.gC(),c=e.gC(),(4&b.c)==0||(4&c.c)==0)throw new ni("Must be array types");if(a=b.b,f=c.b,!((1&a.c)!=0?a==f:(1&f.c)==0))throw new ni("Array types must match");if(l=n.length,s=e.length,t<0||r<0||i<0||t+i>l||r+i>s)throw new q;if(((1&a.c)==0||(4&a.c)!=0)&&b!=c){if(h=tQ(n,11),o=tQ(e,11),nT(n)===nT(e)&&t<r)for(t+=i,u=r+i;u-- >r;)e7(o,u,h[--t]);else for(u=r+i;r<u;)e7(o,r++,h[t++])}else Array.prototype.splice.apply(e,[r,i].concat(n.slice(t,t+i)))}function iB(){iB=l,f6=new nA("UP",0),fX=new nA("DOWN",1),fZ=new nA("CEILING",2),fY=new nA("FLOOR",3),f2=new nA("HALF_UP",4),f0=new nA("HALF_DOWN",5),f1=new nA("HALF_EVEN",6),f3=new nA("UNNECESSARY",7),fW=tJ(u7,{6:1},19,[f6,fX,fZ,fY,f2,f0,f1,f3]),f4=tJ(uJ,{6:1},-1,[67,69,73,76,73,78,71]),f5=tJ(uJ,{6:1},-1,[68,79,87,78]),f9=tJ(uJ,{6:1},-1,[70,76,79,79,82]),f8=tJ(uJ,{6:1},-1,[72,65,76,70,95,68,79,87,78]),f7=tJ(uJ,{6:1},-1,[72,65,76,70,95,69,86,69,78]),un=tJ(uJ,{6:1},-1,[72,65,76,70,95,85,80]),ut=tJ(uJ,{6:1},-1,[85,78,78,69,67,69,83,83,65,82,89]),ue=tJ(uJ,{6:1},-1,[85,80])}function iA(n,t){var e,r,i,o,f,u,c,s,h,a;if(n.d||(n.d=eU(n.g)),s=n.d,t.d||(t.d=eU(t.g)),h=t.d,e=n.f-t.f,f=0,i=1,u=f_.length-1,0==t.b&&-1!=t.g)throw new nr(oo);if(0==s.r())return eL(e);for(r=rE(s,h),s=ih(s,r),o=(h=ih(h,r)).bb(),h=h.fb(o);;)if(0==(a=r6(h,f_[i]))[1].r())f+=i,i<u&&++i,h=a[0];else{if(1==i)break;i=1}if(!h._().eQ((rK(),fx)))throw new nr("Non-terminating decimal expansion; no exact representable decimal result");return 0>h.r()&&(s=s.cb()),c=eJ(e+(o>f?o:f)),new tx(s=(i=o-f)>0?(ib(),i<fq.length?rW(s,fq[i]):i<f$.length?en(s,f$[i]):en(s,f$[1].db(i))):s.eb(-i),c)}function iN(n,t,e){var r,i,o,f,u,c,s,h,a,b,l,g,w,d,_,v,m,y,C;if(0==t.l&&0==t.m&&0==t.h)throw new nr("divide by zero");if(0==n.l&&0==n.m&&0==n.h)return e&&(o8=tm(0,0,0)),tm(0,0,0);if(524288==t.h&&0==t.m&&0==t.l)return 524288==(s=n).h&&0==s.m&&0==s.l?(e&&(o8=tm(0,0,0)),nQ((ex(),ff))):(e&&(o8=tm(s.l,s.m,s.h)),tm(0,0,0));if(c=!1,~~t.h>>19!=0&&(t=eP(t),c=!0),f=((b=(h=t).l)&b-1)!=0||((l=h.m)&l-1)!=0||((a=h.h)&a-1)!=0||0==a&&0==l&&0==b?-1:0==a&&0==l&&0!=b?ec(b):0==a&&0!=l&&0==b?ec(l)+22:0!=a&&0==l&&0==b?ec(a)+44:-1,o=!1,i=!1,r=!1,524288==n.h&&0==n.m&&0==n.l){if(i=!0,o=!0,-1!=f)return u=rJ(n,f),c&&eQ(u),e&&(o8=tm(0,0,0)),u;n=nQ((ex(),fi)),r=!0,c=!c}else~~n.h>>19!=0&&(o=!0,n=eP(n),r=!0,c=!c);return -1!=f?(g=n,w=c,d=o,_=rJ(g,f),w&&eQ(_),e&&(v=g,f<=22?(m=v.l&(1<<f)-1,y=C=0):f<=44?(m=v.l,y=v.m&(1<<f-22)-1,C=0):(m=v.l,y=v.m,C=v.h&(1<<f-44)-1),g=tm(m,y,C),o8=d?eP(g):tm(g.l,g.m,g.h)),_):rA(n,t)?function(n,t,e,r,i,o){var f,u,c,s,h,a,b,l,g;for(c=ey(t)-ey(n),f=rL(t,c),u=tm(0,0,0);c>=0&&((g=n.h-f.h)<0||(b=n.l-f.l,(g+=~~(l=n.m-f.m+(~~b>>22))>>22)<0||(n.l=4194303&b,n.m=4194303&l,n.h=1048575&g,0))||(c<22?u.l|=1<<c:c<44?u.m|=1<<c-22:u.h|=1<<c-44,0!=n.l||0!=n.m||0!=n.h));)h=f.m,a=f.h,s=f.l,f.h=~~a>>>1,f.m=~~h>>>1|(1&a)<<21,f.l=~~s>>>1|(1&h)<<21,--c;return e&&eQ(u),o&&(r?(o8=eP(n),i&&(o8=eY(o8,(ex(),ff)))):o8=tm(n.l,n.m,n.h)),u}(r?n:tm(n.l,n.m,n.h),t,c,o,i,e):(e&&(o8=o?eP(n):tm(n.l,n.m,n.h)),tm(0,0,0))}function iI(n){var t=[];for(var e in n){var r=typeof n[e];r!=oP?t[t.length]=r:n[e]instanceof Array?t[t.length]=ox:o&&o.bigdecimal&&o.bigdecimal.BigInteger&&n[e]instanceof o.bigdecimal.BigInteger?t[t.length]=i7:o&&o.bigdecimal&&o.bigdecimal.BigDecimal&&n[e]instanceof o.bigdecimal.BigDecimal?t[t.length]=i5:o&&o.bigdecimal&&o.bigdecimal.RoundingMode&&n[e]instanceof o.bigdecimal.RoundingMode?t[t.length]=og:o&&o.bigdecimal&&o.bigdecimal.MathContext&&n[e]instanceof o.bigdecimal.MathContext?t[t.length]=oa:t[t.length]=oP}return t.join(iV)}function iE(n,t){var e,r,i,o,f,u,c,s,h,a,b,l,g,w,d,_,v,m;return e=8191&n.l,r=~~n.l>>13|(15&n.m)<<9,i=~~n.m>>4&8191,o=~~n.m>>17|(255&n.h)<<5,f=~~(1048320&n.h)>>8,u=8191&t.l,c=~~t.l>>13|(15&t.m)<<9,s=~~t.m>>4&8191,h=~~t.m>>17|(255&t.h)<<5,a=~~(1048320&t.h)>>8,w=e*u,d=r*u,_=i*u,v=o*u,m=f*u,0!=c&&(d+=e*c,_+=r*c,v+=i*c,m+=o*c),0!=s&&(_+=e*s,v+=r*s,m+=i*s),0!=h&&(v+=e*h,m+=r*h),0!=a&&(m+=e*a),b=(4194303&w)+((511&d)<<13),l=(~~w>>22)+(~~d>>9)+((262143&_)<<4)+((31&v)<<17),g=(~~_>>18)+(~~v>>5)+((4095&m)<<8),l+=~~b>>22,b&=4194303,g+=~~l>>22,tm(b,l&=4194303,g&=1048575)}function iR(n,t,e){var r,i,o,f,u,c,s,h;if(h=rr(eX(e6(e.b),oK))+(t.e>0?t.e:nU((t.b-1)*.3010299956639812)+1)-(n.e>0?n.e:nU((n.b-1)*.3010299956639812)+1),c=i=n.f-t.f,o=1,u=fv.length-1,s=tJ(u5,{6:1},17,[(n.d||(n.d=eU(n.g)),n.d)]),0==e.b||0==n.b&&-1!=n.g||0==t.b&&-1!=t.g)return iA(n,t);if(h>0&&(e7(s,0,en((n.d||(n.d=eU(n.g)),n.d),iv(h))),c+=h),f=(s=r6(s[0],(t.d||(t.d=eU(t.g)),t.d)))[0],0!=s[1].r())r=rn(eF(s[1]),(t.d||(t.d=eU(t.g)),t.d)),f=iC(en(f,(rK(),fM)),eW(e6(s[0].r()*(5+r)))),++c;else for(;!f.gb(0);)if(0==(s=r6(f,fv[o]))[1].r()&&c-o>=i)c-=o,o<u&&++o,f=s[0];else{if(1==o)break;o=1}return new te(f,eJ(c),e)}function iO(n,t){var e;if(e=n.f-t.f,0==n.b&&-1!=n.g){if(e<=0)return ed(t);if(0==t.b&&-1!=t.g)return n}else if(0==t.b&&-1!=t.g&&e>=0)return n;return 0==e?np(n.b,t.b)+1<54?new tr(n.g-t.g,n.f):new tS(is((n.d||(n.d=eU(n.g)),n.d),(t.d||(t.d=eU(t.g)),t.d)),n.f):e>0?e<fb.length&&np(n.b,t.b+fl[ei(e)])+1<54?new tr(n.g-t.g*fb[ei(e)],n.f):new tS(is((n.d||(n.d=eU(n.g)),n.d),tP((t.d||(t.d=eU(t.g)),t.d),ei(e))),n.f):(e=-e)<fb.length&&np(n.b+fl[ei(e)],t.b)+1<54?new tr(n.g*fb[ei(e)]-t.g,t.f):new tS(is(tP((n.d||(n.d=eU(n.g)),n.d),ei(e)),(t.d||(t.d=eU(t.g)),t.d)),t.f)}function iD(n,t){var e,r,i,o,f,u,c;if(tJ(u5,{6:1},17,[(n.d||(n.d=eU(n.g)),n.d)]),o=n.f-t.f,c=0,e=1,i=fv.length-1,0==t.b&&-1!=t.g)throw new nr(oo);if((t.e>0?t.e:nU((t.b-1)*.3010299956639812)+1)+o>(n.e>0?n.e:nU((n.b-1)*.3010299956639812)+1)+1||0==n.b&&-1!=n.g)rK(),r=fB;else if(0==o)r=ih((n.d||(n.d=eU(n.g)),n.d),(t.d||(t.d=eU(t.g)),t.d));else if(o>0)f=iv(o),r=ih((n.d||(n.d=eU(n.g)),n.d),en((t.d||(t.d=eU(t.g)),t.d),f)),r=en(r,f);else{for(f=iv(-o),r=ih(en((n.d||(n.d=eU(n.g)),n.d),f),(t.d||(t.d=eU(t.g)),t.d));!r.gb(0);)if(0==(u=r6(r,fv[e]))[1].r()&&c-e>=o)c-=e,e<i&&++e,r=u[0];else{if(1==e)break;e=1}o=c}return 0==r.r()?eL(o):new tx(r,eJ(o))}function ik(n,t,e,r,i,o){var f,u,c,s,h,a,b,l,g,w,d,_,v,m,y;for(w=tL(ud,{6:1},-1,r+1,1),d=tL(ud,{6:1},-1,o+1,1),0!=(u=rH(i[o-1]))?(rC(d,i,0,u),rC(w,e,0,u)):(iM(e,0,w,0,r),iM(i,0,d,0,o)),c=d[o-1],h=t-1,a=r;h>=0;){if(w[a]==c)s=-1;else if(s=nM(m=r1(eX(rL(ts(e6(w[a]),o6),32),ts(e6(w[a-1]),o6)),c)),v=nM(rJ(m,32)),0!=s){_=!1,++s;do{if(--s,_)break;l=iE(ts(e6(s),o6),ts(e6(d[o-2]),o6)),y=eX(rL(e6(v),32),ts(e6(w[a-2]),o6)),32>rH(nM(rU(g=eX(ts(e6(v),o6),ts(e6(c),o6)),32)))?_=!0:v=nM(g)}while(rB(ta(l,o$),ta(y,o$)))}if(0!=s&&0!=function(n,t,e,r,i){var o,f,u;for(u=0,o=oz,f=oz;u<r;++u)ib(),o=eX(iE(ts(e6(e[u]),o6),ts(e6(i),o6)),ts(e6(nM(o)),o6)),f=eX(eY(ts(e6(n[t+u]),o6),ts(o,o6)),f),n[t+u]=nM(f),f=rJ(f,32),o=rU(o,32);return f=eX(eY(ts(e6(n[t+r]),o6),o),f),n[t+r]=nM(f),nM(rJ(f,32))}(w,a-o,d,o,s))for(--s,f=oz,b=0;b<o;++b)f=eX(f,eX(ts(e6(w[a-o+b]),o6),ts(e6(d[b]),o6))),w[a-o+b]=nM(f),f=rU(f,32);null!=n&&(n[h]=s),--a,--h}return 0!=u?(rO(d,o,w,0,u),d):(iM(w,0,d,0,o),w)}function iL(n,t){var e,r,i,o,f,u,c,s;if(c=np(t.e,n.e),(i=eg(t))<(o=eg(n))){for(u=tL(ud,{6:1},-1,c,1),r=i,u[i]=t.b[i],f=nd(t.e,o),++r;r<f;++r)u[r]=t.b[r];if(r==t.e)for(;r<n.e;++r)u[r]=n.b[r]}else if(o<i){for(u=tL(ud,{6:1},-1,c,1),r=o,u[o]=-n.b[o],f=nd(n.e,i),++r;r<f;++r)u[r]=~n.b[r];if(r==i)u[r]=~(n.b[r]^-t.b[r]),++r;else{for(;r<i;++r)u[r]=-1;for(;r<t.e;++r)u[r]=t.b[r]}}else{if(r=i,0==(e=n.b[i]^-t.b[i])){for(f=nd(n.e,t.e),++r;r<f&&0==(e=n.b[r]^~t.b[r]);++r);if(0==e){for(;r<n.e&&0==(e=~n.b[r]);++r);for(;r<t.e&&0==(e=~t.b[r]);++r);if(0==e)return c+=1,(u=tL(ud,{6:1},-1,c,1))[c-1]=1,s=new ti(-1,c,u)}}(u=tL(ud,{6:1},-1,c,1))[r]=-e,++r}for(f=nd(t.e,n.e);r<f;++r)u[r]=~(~t.b[r]^n.b[r]);for(;r<n.e;++r)u[r]=n.b[r];for(;r<t.e;++r)u[r]=t.b[r];return tW(s=new ti(-1,c,u)),s}function iU(){var n,t;for(iU=l,fg=new eo(oJ,0),fw=new eo(oZ,0),fd=new eo(oz,0),fc=tL(u6,{6:1},16,11,0),fs=tL(uJ,{6:1},-1,100,1),fa=tL(ud,{6:1},-1,(fh=tJ(u4,{6:1},-1,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,0x2e90edd,0xe8d4a51,0x48c27395,0x16bcc41e9,0x71afd498d,0x2386f26fc1,0xb1a2bc2ec5,0x3782dace9d9,0x1158e460913d,0x56bc75e2d631,0x1b1ae4d6e2ef5,0x878678326eac9])).length,1),fl=tL(ud,{6:1},-1,(fb=tJ(u4,{6:1},-1,[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13,1e14,1e15,1e16])).length,1),fp=tL(u6,{6:1},16,11,0),n=0;n<fp.length;++n)e7(fc,n,new eo(e6(n),0)),e7(fp,n,new eo(oz,n)),fs[n]=48;for(;n<fs.length;++n)fs[n]=48;for(t=0;t<fa.length;++t)fa[t]=rI(fh[t]);for(t=0;t<fl.length;++t)fl[t]=rI(fb[t]);ib(),fv=fV,f_=f$}function iP(n,t){var e,r,i,o,f,u,c,s,h,a,b;if(e=0,u=0,f=t.length,h=new W(t.length),0<f&&43==t.charCodeAt(0)&&(++u,++e,u<f&&(43==t.charCodeAt(u)||45==t.charCodeAt(u))))throw new nw(oc+t+iq);for(i=0,a=!1;u<f&&46!=t.charCodeAt(u)&&101!=t.charCodeAt(u)&&69!=t.charCodeAt(u);++u)a||(48==t.charCodeAt(u)?++i:a=!0);if(tG(h,t,e,u),u<f&&46==t.charCodeAt(u)){for(e=++u;u<f&&101!=t.charCodeAt(u)&&69!=t.charCodeAt(u);++u)a||(48==t.charCodeAt(u)?++i:a=!0);n.f=u-e,tG(h,t,e,u)}else n.f=0;if(u<f&&(101==t.charCodeAt(u)||69==t.charCodeAt(u))&&(e=++u,u<f&&43==t.charCodeAt(u)&&++u<f&&45!=t.charCodeAt(u)&&++e,c=t.substr(e,f-e),n.f=n.f-r9(c,10),n.f!=ei(n.f)))throw new nw("Scale out of range.");if((s=h.b.b).length<16){if((b=fm)||(b=fm=/^[+-]?\d*$/i),n.g=b.test(s)?parseInt(s,10):Number.NaN,isNaN(n.g))throw new nw(oc+t+iq);n.b=rI(n.g)}else tR(n,new nq(s));for(o=0,n.e=h.b.b.length-i;o<h.b.b.length&&(45==(r=n$(h.b.b,o))||48==r);++o)--n.e}function iQ(n,t,e){var r,i,o,f,u,c,s,h,a,b,l,g,w,d;if(h=e.b,i=rT(n)-t.q(),s=fv.length-1,a=o=n.f-t.f,l=i-o+1,b=tL(u5,{6:1},17,2,0),0==h||0==n.b&&-1!=n.g||0==t.b&&-1!=t.g)return iD(n,t);if(l<=0)e7(b,0,(rK(),fB));else if(0==o)e7(b,0,ih((n.d||(n.d=eU(n.g)),n.d),(t.d||(t.d=eU(t.g)),t.d)));else if(o>0)e7(b,0,ih((n.d||(n.d=eU(n.g)),n.d),en((t.d||(t.d=eU(t.g)),t.d),iv(o)))),a=o<(h-l+1>0?h-l+1:0)?o:h-l+1>0?h-l+1:0,e7(b,0,en(b[0],iv(a)));else if(f=-o<(h-i>0?h-i:0)?-o:h-i>0?h-i:0,b=r6(en((n.d||(n.d=eU(n.g)),n.d),iv(f)),(t.d||(t.d=eU(t.g)),t.d)),a+=f,f=-a,0!=b[1].r()&&f>0&&(0==(r=new nk(b[1]).q()+f-t.q())&&(e7(b,1,ih(en(b[1],iv(f)),(t.d||(t.d=eU(t.g)),t.d))),r=(d=b[1].r())<0?-d:d),r>0))throw new nr(of);if(0==b[0].r())return eL(o);for(w=b[0],g=(c=new nk(b[0])).q(),u=1;!w.gb(0);)if(0==(b=r6(w,fv[u]))[1].r()&&(g-u>=h||a-u>=o))g-=u,a-=u,u<s&&++u,w=b[0];else{if(1==u)break;u=1}if(g>h)throw new nr(of);return c.f=eJ(a),tR(c,w),c}function iT(){var n;for(n=0,iT=l,fz=tJ(ud,{6:1},-1,[0,0,1854,1233,927,747,627,543,480,431,393,361,335,314,295,279,265,253,242,232,223,216,181,169,158,150,145,140,136,132,127,123,119,114,110,105,101,96,92,87,83,78,73,69,64,59,54,49,44,38,32,26,1]),fJ=tL(u5,{6:1},17,(fK=tJ(ud,{6:1},-1,[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021])).length,0);n<fK.length;++n)e7(fJ,n,eW(e6(fK[n])))}function ij(n,t){var e,r,i,o,f,u,c,s,h,a,b,l,g,w,d,_,v,m,y,C,x,S,M,B,A,N,I,E,R,O,D;if(iS(),C=n.f,b=n.e,i=n.b,0==C)switch(t){case 0:return iK;case 1:return iZ;case 2:return iX;case 3:return iY;case 4:return i0;case 5:return i1;case 6:return i2;default:return m=new K,t<0?m.b.b+=i6:m.b.b+=i3,A=m.b,A.b+=-t,m.b.b}if(v=tL(uJ,{6:1},-1,(_=10*b+1+7)+1,1),e=_,1==b){if((f=i[0])<0){B=ts(e6(f),o6);do l=B,B=nP(B,oZ),v[--e]=48+nM(eY(l,iE(B,oZ)))&65535;while(tv(B,oz))}else{B=f;do l=B,B=~~(B/10),v[--e]=48+(l-10*B)&65535;while(0!=B)}}else{S=tL(ud,{6:1},-1,b,1),M=b,iM(i,0,S,0,b);n:for(;;){for(y=oz,c=M-1;c>=0;--c)w=function(n){var t,e,r;return rA(n,oz)?(e=nP(n,o2),r=n6(n,o2)):(e=nP(t=rU(n,1),o1),r=eX(rL(r=n6(t,o1),1),ts(n,oJ))),th(rL(r,32),ts(e,o6))}(eX(rL(y,32),ts(e6(S[c]),o6))),S[c]=nM(w),y=e6(nM(rJ(w,32)));d=nM(y),g=e;do v[--e]=48+d%10&65535;while(0!=(d=~~(d/10))&&0!=e)for(u=0,r=9-g+e;u<r&&e>0;++u)v[--e]=48;for(h=M-1;0==S[h];--h)if(0==h)break n;M=h+1}for(;48==v[e];)++e}if(a=C<0,o=_-e-t-1,0==t)return a&&(v[--e]=45),tU(v,e,_-e);if(t>0&&o>=-6){if(o>=0){for(s=e+o,h=_-1;h>=s;--h)v[h+1]=v[h];return v[++s]=46,a&&(v[--e]=45),tU(v,e,_-e+1)}for(h=2;h<-o+1;++h)v[--e]=48;return v[--e]=46,v[--e]=48,a&&(v[--e]=45),tU(v,e,_-e)}return(x=e+1,m=new W,a&&(m.b.b+=iz),_-x>=1)?(tI(m,v[e]),m.b.b+=iJ,N=m.b,I=tU(v,e+1,_-e-1),N.b+=I):(E=m.b,R=tU(v,e,_-e),E.b+=R),m.b.b+=ou,o>0&&(m.b.b+=iG),O=m.b,D=i$+o,O.b+=D,m.b.b}u&&u({moduleName:"gwtapp",sessionId:c,subSystem:"startup",evtGroup:"moduleStartup",millis:new Date().getTime(),type:"moduleEvalStart"});var iF,iH,i$="",iV=" ",iq='"',iG="+",iz="-",iJ=".",iK="0",iW="0.",iZ="0.0",iX="0.00",iY="0.000",i0="0.0000",i1="0.00000",i2="0.000000",i3="0E",i6="0E+",i4=":",i5="BigDecimal",i9="BigDecimal MathContext",i8="BigDecimal;",i7="BigInteger",on="BigInteger divide by zero",ot="BigInteger not invertible.",oe="BigInteger: modulus not positive",or="BigInteger;",oi="CSS1Compat",oo="Division by zero",of="Division impossible",ou="E",oc='For input string: "',os="Infinite or NaN",oh="Invalid Operation",oa="MathContext",ob="Negative bit address",ol="Rounding necessary",og="RoundingMode",ow="RoundingMode;",od="String",op="[Lcom.iriscouch.gwtapp.client.",o_="[Ljava.lang.",ov="[Ljava.math.",om="\\.",oy="__gwtex_wrap",oC="anonymous",ox="array",oS="bad string format",oM="bigdecimal",oB="com.google.gwt.core.client.",oA="com.google.gwt.core.client.impl.",oN="com.iriscouch.gwtapp.client.",oI="java.lang.",oE="java.math.",oR="java.util.",oO="msie",oD="null",ok="number",oL="number MathContext",oU="number number",oP="object",oQ="opera",oT="org.timepedia.exporter.client.",oj="safari",oF="string",oH="undefined",o$={l:0,m:0,h:524288},oV={l:0,m:4193280,h:1048575},oq={l:4194298,m:4194303,h:1048575},oG={l:4194303,m:4194303,h:1048575},oz={l:0,m:0,h:0},oJ={l:1,m:0,h:0},oK={l:2,m:0,h:0},oW={l:5,m:0,h:0},oZ={l:10,m:0,h:0},oX={l:11,m:0,h:0},oY={l:18,m:0,h:0},o0={l:48,m:0,h:0},o1={l:877824,m:119,h:0},o2={l:1755648,m:238,h:0},o3={l:4194303,m:511,h:0},o6={l:4194303,m:1023,h:0},o4={l:0,m:1024,h:0};(iH=s.prototype={}).eQ=function(n){return this===n},iH.gC=function(){return uc},iH.hC=function(){return nj(this)},iH.tS=function(){return this.gC().d+"@"+function(n){var t,e,r;if(t=tL(uJ,{6:1},-1,8,1),r_(),e=fR,r=7,n>=0)for(;n>15;)t[r--]=e[15&n],n>>=4;else for(;r>0;)t[r--]=e[15&n],n>>=4;return t[r]=e[15&n],t3(t,r,8)}(this.hC())},iH.toString=function(){return this.tS()},iH.tM=l,iH.cM={},(iH=h.prototype=new s).gC=function(){return uh},iH.j=function(){return this.f},iH.tS=function(){var n,t;return n=this.gC().d,null!=(t=this.j())?n+": "+t:n},iH.cM={6:1,15:1},iH.f=null,(iH=a.prototype=new h).gC=function(){return ua},iH.cM={6:1,15:1},(iH=ne.prototype=b.prototype=new a).gC=function(){return ub},iH.cM={6:1,12:1,15:1},(iH=n0.prototype=(function(){}).prototype=new b).gC=function(){return ul},iH.j=function(){var n,t,e,r,i;return null==this.d&&(this.e=null==(e=this.c)?oD:tn(e)?null==(r=t9(e))?null:r.name:nG(e,1)?od:(nF(e)?e.gC():ug).d,this.b=tn(n=this.c)?null==(i=t9(n))?null:i.message:n+i$,this.d="("+this.e+"): "+this.b+(tn(t=this.c)?function(n){var t=i$;try{for(var e in n)if("name"!=e&&"message"!=e&&"toString"!=e)try{t+="\n "+e+": "+n[e]}catch(n){}}catch(n){}return t}(t9(t)):i$)),this.d},iH.cM={6:1,12:1,15:1},iH.b=null,iH.c=null,iH.d=null,iH.e=null,(iH=g.prototype=new s).gC=function(){return uw};var o5=0,o9=0;(iH=w.prototype=(function(){}).prototype=new g).gC=function(){return uv},iH.b=null,iH.c=null,(iH=d.prototype=_.prototype=new s).k=function(){for(var n={},t=[],e=arguments.callee.caller.caller;e;){var r,i,o=this.n(e.toString());t.push(o);var f=i4+o,u=n[f];if(u){for(r=0,i=u.length;r<i;r++)if(u[r]===e)return t}(u||(n[f]=[])).push(e),e=e.caller}return t},iH.n=function(n){var t,e,r,i;return t=n,i=i$,-1!=(e=(t=e9(t)).indexOf("("))&&(r=8*(0==t.indexOf("function")),i=e9(t.substr(r,e-r))),i.length>0?i:oC},iH.gC=function(){return um},iH.o=function(n){return[]},(iH=v.prototype=new _).k=function(){return tl(this.o(tw()),this.p())},iH.gC=function(){return ux},iH.o=function(n){return eR(this,n)},iH.p=function(){return 2},(iH=m.prototype=(function(){}).prototype=new v).k=function(){return es(this)},iH.n=function(n){var t,e;return 0==n.length||(0==(e=e9(n)).indexOf("at ")&&(e=n8(e,3)),-1==(t=e.indexOf("["))&&(t=e.indexOf("(")),-1==t)?oC:(-1!=(t=(e=e9(e.substr(0,t-0))).indexOf("."))&&(e=n8(e,t+1)),e.length>0?e:oC)},iH.gC=function(){return uS},iH.o=function(n){return t2(this,n)},iH.p=function(){return 3},(iH=y.prototype=new s).gC=function(){return uM},(iH=C.prototype=(function(){}).prototype=new y).gC=function(){return uB},iH.b=i$,(iH=x.prototype=(function(){}).prototype=new s).gC=function(){return this.aC},iH.aC=null,iH.qI=0;var o8=null,o7=null;(iH=S.prototype=(function(){}).prototype=new s).gC=function(){return uI},iH.cM={2:1},(iH=M.prototype=new s).gC=function(){return uR},iH.cM={6:1,10:1};var fn=null;(iH=eo.prototype=tr.prototype=tS.prototype=tA.prototype=Z.prototype=ep.prototype=ef.prototype=tB.prototype=tM.prototype=ez.prototype=n2.prototype=n3.prototype=te.prototype=tx.prototype=nk.prototype=B.prototype=new M).eQ=function(n){return e1(this,n)},iH.gC=function(){return uO},iH.hC=function(){return rv(this)},iH.q=function(){return rT(this)},iH.r=function(){return ew(this)},iH.tS=function(){return id(this)},iH.cM={6:1,8:1,10:1,16:1},iH.b=0,iH.c=0,iH.d=null,iH.e=0,iH.f=0,iH.g=0,iH.i=null;var ft,fe,fr,fi,fo,ff,fu,fc,fs,fh,fa,fb,fl,fg,fw,fd,fp,f_=null,fv=null,fm=null;(iH=nL.prototype=ng.prototype=(function(){}).prototype=new B).s=function(n){var t,e,r;if((e=iI(n))==i$)t=0>ew(this)?ed(this):this;else if(e==oa)t=0>(r=t8(this,new ix(n[0].toString()))).r()?ed(r):r;else throw new ne("Unknown call signature for interim = super.abs: "+e);return new nL(t)},iH.t=function(n){var t,e;if((e=iI(n))==i5)t=r0(this,new Z(n[0].toString()));else if(e==i9)t=function(n,t,e){var r,i,o,f;if(r=n.f-t.f,0==t.b&&-1!=t.g||0==n.b&&-1!=n.g||0==e.b)return t8(r0(n,t),e);if((n.e>0?n.e:nU((n.b-1)*.3010299956639812)+1)<r-1)i=t,f=n;else{if(!((t.e>0?t.e:nU((t.b-1)*.3010299956639812)+1)<-r-1))return t8(r0(n,t),e);i=n,f=t}return e.b>=(i.e>0?i.e:nU((i.b-1)*.3010299956639812)+1)?t8(r0(n,t),e):t8(i=new tS((o=i.r())==f.r()?iC(rW((i.d||(i.d=eU(i.g)),i.d),10),eW(e6(o))):iC(rW(is((i.d||(i.d=eU(i.g)),i.d),eW(e6(o))),10),eW(e6(9*o))),i.f+1),e)}(this,new Z(n[0].toString()),new ix(n[1].toString()));else throw new ne("Unknown call signature for interim = super.add: "+e);return new nL(t)},iH.u=function(){return~~(nM(t7(this,8))<<24)>>24},iH.v=function(n){return iu(this,n)},iH.w=function(n){var t,e,r,i;if((i=iI(n))==i5)e=eb(this,new Z(n[0].toString()));else if(i==i9)e=el(this,new Z(n[0].toString()),new ix(n[1].toString()));else throw new ne("Unknown call signature for interim = super.divideAndRemainder: "+i);for(t=0,r=tL(uk,{6:1},3,e.length,0);t<e.length;++t)r[t]=new nL(e[t]);return r},iH.x=function(n){var t,e;if((e=iI(n))==i5)t=iD(this,new Z(n[0].toString()));else if(e==i9)t=iQ(this,new Z(n[0].toString()),new ix(n[1].toString()));else throw new ne("Unknown call signature for interim = super.divideToIntegralValue: "+e);return new nL(t)},iH.y=function(n){var t,e,r,i,o,f;if((e=iI(n))==i5)t=iA(this,new Z(n[0].toString()));else if("BigDecimal number"==e)r=new Z(n[0].toString()),i=n[1],t=il(this,r,ei(this.f),rP(i));else if("BigDecimal number number"==e)t=il(this,new Z(n[0].toString()),n[1],rP(n[2]));else if("BigDecimal number RoundingMode"==e)t=il(this,new Z(n[0].toString()),n[1],tc(n[2].toString()));else if(e==i9)t=iR(this,new Z(n[0].toString()),new ix(n[1].toString()));else if("BigDecimal RoundingMode"==e)o=new Z(n[0].toString()),f=tc(n[1].toString()),t=il(this,o,ei(this.f),f);else throw new ne("Unknown call signature for interim = super.divide: "+e);return new nL(t)},iH.z=function(){return t5(id(this))},iH.eQ=function(n){return e1(this,n)},iH.A=function(){var n,t;return n=ew(this),(t=this.b-this.f/.3010299956639812)<-149||0==n?n*=0:t>129?n*=1/0:n=t5(id(this)),n},iH.gC=function(){return uD},iH.hC=function(){return rv(this)},iH.B=function(){var n;return this.f<=-32||this.f>(this.e>0?this.e:nU((this.b-1)*.3010299956639812)+1)?0:(n=new n1(0==this.f||0==this.b&&-1!=this.g?(this.d||(this.d=eU(this.g)),this.d):this.f<0?en((this.d||(this.d=eU(this.g)),this.d),iv(-this.f)):ih((this.d||(this.d=eU(this.g)),this.d),iv(this.f)))).f*n.b[0]},iH.C=function(){return nM(t7(this,32))},iH.D=function(){return nM(t7(this,32))},iH.E=function(){return t5(id(this))},iH.F=function(n){return new nL(iu(this,n)>=0?this:n)},iH.G=function(n){return new nL(0>=iu(this,n)?this:n)},iH.H=function(n){return new nL(rz(this,this.f+n))},iH.I=function(n){return new nL(rz(this,this.f-n))},iH.J=function(n){var t,e;if((e=iI(n))==i5)t=rD(this,new Z(n[0].toString()));else if(e==i9)t=tb(this,new Z(n[0].toString()),new ix(n[1].toString()));else throw new ne("Unknown call signature for interim = super.multiply: "+e);return new nL(t)},iH.K=function(n){var t,e;if((e=iI(n))==i$)t=ed(this);else if(e==oa)t=ed(t8(this,new ix(n[0].toString())));else throw new ne("Unknown call signature for interim = super.negate: "+e);return new nL(t)},iH.L=function(n){var t,e;if((e=iI(n))==i$)t=this;else if(e==oa)t=t8(this,new ix(n[0].toString()));else throw new ne("Unknown call signature for interim = super.plus: "+e);return new nL(t)},iH.M=function(n){var t,e;if((e=iI(n))==ok)t=rw(this,n[0]);else if(e==oL)t=function(n,t,e){var r,i,o,f,u,c;if(o=t<0?-t:t,f=e.b,i=ei(n7(o))+1,u=e,0==t||0==n.b&&-1!=n.g&&t>0)return rw(n,t);if(o>0x3b9ac9ff||0==f&&t<0||f>0&&i>f)throw new nr(oh);for(f>0&&(u=new eK(f+i+1,e.c)),r=t8(n,u),c=~~function(n){var t;if(n<0)return -0x80000000;if(0==n)return 0;for(t=0x40000000;(t&n)==0;t>>=1);return t}(o)>>1;c>0;)r=tb(r,r,u),(o&c)==c&&(r=tb(r,n,u)),c>>=1;return t<0&&(r=iR(fg,r,u)),ic(r,e),r}(this,n[0],new ix(n[1].toString()));else throw new ne("Unknown call signature for interim = super.pow: "+e);return new nL(t)},iH.q=function(){return rT(this)},iH.N=function(n){var t,e;if((e=iI(n))==i5)t=eb(this,new Z(n[0].toString()))[1];else if(e==i9)t=el(this,new Z(n[0].toString()),new ix(n[1].toString()))[1];else throw new ne("Unknown call signature for interim = super.remainder: "+e);return new nL(t)},iH.O=function(n){return new nL(t8(this,new ix(eh(n.b))))},iH.P=function(){return ei(this.f)},iH.Q=function(n){var t;return new nL((t=this.f-n,this.b<54)?0==this.g?eL(t):new tr(this.g,eJ(t)):new tx((this.d||(this.d=eU(this.g)),this.d),eJ(t)))},iH.R=function(n){var t,e;if((e=iI(n))==ok)t=rY(this,n[0],(iB(),f3));else if(e==oU)t=rY(this,n[0],rP(n[1]));else if("number RoundingMode"==e)t=rY(this,n[0],tc(n[1].toString()));else throw new ne("Unknown call signature for interim = super.setScale: "+e);return new nL(t)},iH.S=function(){return~~(nM(t7(this,16))<<16)>>16},iH.r=function(){return ew(this)},iH.T=function(){return new nL(function(n){var t,e,r,i,o;if(t=1,e=fv.length-1,r=n.f,0==n.b&&-1!=n.g)return new Z(iK);for(n.d||(n.d=eU(n.g)),o=n.d;!o.gb(0);)if(0==(i=r6(o,fv[t]))[1].r())r-=t,t<e&&++t,o=i[0];else{if(1==t)break;t=1}return new tx(o,eJ(r))}(this))},iH.U=function(n){var t,e,r,i,o,f;if((e=iI(n))==i5)t=iO(this,new Z(n[0].toString()));else if(e==i9)r=new Z(n[0].toString()),i=new ix(n[1].toString()),o=r.f-this.f,t=0==r.b&&-1!=r.g||0==this.b&&-1!=this.g||0==i.b?t8(iO(this,r),i):(r.e>0?r.e:nU((r.b-1)*.3010299956639812)+1)<o-1&&i.b<(this.e>0?this.e:nU((this.b-1)*.3010299956639812)+1)?t8(new tS((f=ew(this))!=r.r()?iC(rW((this.d||(this.d=eU(this.g)),this.d),10),eW(e6(f))):iC(rW(is((this.d||(this.d=eU(this.g)),this.d),eW(e6(f))),10),eW(e6(9*f))),this.f+1),i):t8(iO(this,r),i);else throw new ne("Unknown call signature for interim = super.subtract: "+e);return new nL(t)},iH.V=function(){return new n1(0==this.f||0==this.b&&-1!=this.g?(this.d||(this.d=eU(this.g)),this.d):this.f<0?en((this.d||(this.d=eU(this.g)),this.d),iv(-this.f)):ih((this.d||(this.d=eU(this.g)),this.d),iv(this.f)))},iH.W=function(){return new n1(r4(this))},iH.X=function(){return function(n){var t,e,r,i,o,f,u,c;if(f=ij((n.d||(n.d=eU(n.g)),n.d),0),0==n.f)return f;if(t=0>(n.d||(n.d=eU(n.g)),n.d).r()?2:1,r=f.length,i=-n.f+r-t,c=new nV(f),n.f>0&&i>=-6)i>=0?n9(c,r-ei(n.f),iJ):(tt(c.b,t-1,t-1,iW),n9(c,t+1,tU(fs,0,-ei(i)-1)));else{if(e=r-t,0!=(u=ei(i%3))&&(0==(n.d||(n.d=eU(n.g)),n.d).r()?i+=u=u<0?-u:3-u:(i-=u=u<0?u+3:u,t+=u),e<3))for(o=u-e;o>0;--o)n9(c,r++,iK);r-t>=1&&(tt(c.b,t,t,iJ),++r),0!=i&&(tt(c.b,r,r,ou),i>0&&n9(c,++r,iG),n9(c,++r,i$+r3(r2(i))))}return c.b.b}(this)},iH.Y=function(){return function(n){var t,e,r,i,o,f;if(r=ij((n.d||(n.d=eU(n.g)),n.d),0),0==n.f||0==n.b&&-1!=n.g&&n.f<0)return r;if(t=+(0>ew(n)),e=n.f,i=new W(r.length+1+((o=ei(n.f))<0?-o:o)),1==t&&(i.b.b+=iz),n.f>0){if((e-=r.length-t)>=0){for(i.b.b+=iW;e>fs.length;e-=fs.length)tq(i,fs);n5(i,fs,ei(e)),nI(i,n8(r,t))}else nI(i,(f=ei(e=t-e),r.substr(t,f-t))),i.b.b+=iJ,nI(i,n8(r,ei(e)))}else{for(nI(i,n8(r,t));e<-fs.length;e+=fs.length)tq(i,fs);n5(i,fs,ei(-e))}return i.b.b}(this)},iH.tS=function(){return id(this)},iH.Z=function(){return new nL(new tr(1,this.f))},iH.$=function(){return new n1((this.d||(this.d=eU(this.g)),this.d))},iH.cM={3:1,6:1,8:1,10:1,16:1,24:1},(iH=F.prototype=(function(){}).prototype=new s).gC=function(){return uL};var fy=!1;(iH=ro.prototype=ri.prototype=ti.prototype=e5.prototype=t$.prototype=rh.prototype=nq.prototype=iy.prototype=A.prototype=new M)._=function(){return this.f<0?new ti(1,this.e,this.b):this},iH.ab=function(){return eV(this)},iH.eQ=function(n){return e$(this,n)},iH.gC=function(){return uU},iH.bb=function(){return t0(this)},iH.hC=function(){return eD(this)},iH.cb=function(){return 0==this.f?this:new ti(-this.f,this.e,this.b)},iH.db=function(n){return rk(this,n)},iH.eb=function(n){return tX(this,n)},iH.fb=function(n){return tY(this,n)},iH.r=function(){return this.f},iH.gb=function(n){return rQ(this,n)},iH.tS=function(){return ij(this,0)},iH.cM={6:1,8:1,10:1,17:1},iH.b=null,iH.c=-2,iH.d=0,iH.e=0,iH.f=0;var fC,fx,fS,fM,fB,fA=null;(iH=n1.prototype=nO.prototype=nD.prototype=(function(){}).prototype=new A)._=function(){return new n1(this.f<0?new ti(1,this.e,this.b):this)},iH.hb=function(n){return new n1(iC(this,n))},iH.ib=function(n){return new n1(0==n.f||0==this.f?(rK(),fB):e$(n,(rK(),fC))?this:e$(this,fC)?n:this.f>0?n.f>0?function(n,t){var e,r,i,o;if(i=nd(n.e,t.e),(e=np(eg(n),eg(t)))>=i)return rK(),fB;for(r=tL(ud,{6:1},-1,i,1);e<i;++e)r[e]=n.b[e]&t.b[e];return tW(o=new ti(1,i,r)),o}(this,n):rG(this,n):n.f>0?rG(n,this):this.e>n.e?ip(this,n):ip(n,this))},iH.jb=function(n){return new n1(0==n.f?this:0==this.f?(rK(),fB):e$(this,(rK(),fC))?new n1(r8(n)):e$(n,fC)?fB:this.f>0?n.f>0?function(n,t){var e,r,i,o;for(i=tL(ud,{6:1},-1,n.e,1),r=nd(n.e,t.e),e=eg(n);e<r;++e)i[e]=n.b[e]&~t.b[e];for(;e<n.e;++e)i[e]=n.b[e];return tW(o=new ti(1,n.e,i)),o}(this,n):function(n,t){var e,r,i,o,f,u;if(r=eg(t),i=eg(n),r>=n.e)return n;for(o=tL(ud,{6:1},-1,f=nd(n.e,t.e),1),e=i;e<r;++e)o[e]=n.b[e];for(e==r&&(o[e]=n.b[e]&t.b[e]-1,++e);e<f;++e)o[e]=n.b[e]&t.b[e];return tW(u=new ti(1,f,o)),u}(this,n):n.f>0?function(n,t){var e,r,i,o,f,u,c;if(i=eg(n),o=eg(t),i>=t.e)return n;if(c=np(n.e,t.e),r=i,o>i){for(u=tL(ud,{6:1},-1,c,1),f=nd(n.e,o);r<f;++r)u[r]=n.b[r];if(r==n.e)for(r=o;r<t.e;++r)u[r]=t.b[r]}else{if(0==(e=-n.b[i]&~t.b[i])){for(f=nd(t.e,n.e),++r;r<f&&0==(e=~(n.b[r]|t.b[r]));++r);if(0==e){for(;r<t.e&&0==(e=~t.b[r]);++r);for(;r<n.e&&0==(e=~n.b[r]);++r);if(0==e)return(u=tL(ud,{6:1},-1,++c,1))[c-1]=1,new ti(-1,c,u)}}(u=tL(ud,{6:1},-1,c,1))[r]=-e,++r}for(f=nd(t.e,n.e);r<f;++r)u[r]=n.b[r]|t.b[r];for(;r<n.e;++r)u[r]=n.b[r];for(;r<t.e;++r)u[r]=t.b[r];return new ti(-1,c,u)}(this,n):function(n,t){var e,r,i,o,f,u,c;if(i=eg(n),r=eg(t),i>=t.e)return rK(),fB;if(f=tL(ud,{6:1},-1,u=t.e,1),e=i,i<r){for(f[i]=-n.b[i],o=nd(n.e,r),++e;e<o;++e)f[e]=~n.b[e];if(e==n.e){for(;e<r;++e)f[e]=-1;f[e]=t.b[e]-1}else f[e]=~n.b[e]&t.b[e]-1}else r<i?f[i]=-n.b[i]&t.b[i]:f[i]=-n.b[i]&t.b[i]-1;for(o=nd(n.e,t.e),++e;e<o;++e)f[e]=~n.b[e]&t.b[e];for(;e<t.e;++e)f[e]=t.b[e];return tW(c=new ti(1,u,f)),c}(this,n))},iH.kb=function(){return function(n){var t,e;if(t=0,0==n.f)return 0;if(e=eg(n),n.f>0)for(;e<n.e;++e)t+=e8(n.b[e]);else{for(t+=e8(-n.b[e]),++e;e<n.e;++e)t+=e8(~n.b[e]);t=(n.e<<5)-t}return t}(this)},iH.ab=function(){return eV(this)},iH.lb=function(n){return new n1(rQ(this,n)?it(this,n):this)},iH.mb=function(n){return rn(this,n)},iH.nb=function(n){return new n1(ih(this,n))},iH.ob=function(n){var t,e,r;for(t=0,r=tL(uQ,{6:1},4,(e=r6(this,n)).length,0);t<e.length;++t)r[t]=new n1(e[t]);return r},iH.z=function(){return t5(ij(this,0))},iH.eQ=function(n){return e$(this,n)},iH.pb=function(n){return new n1(function(n,t){if(t<0)throw new nr(ob);return it(n,t)}(this,n))},iH.A=function(){var n;return(n=t5(ij(this,0)))>34028234663852886e22?1/0:n<-34028234663852886e22?-1/0:n},iH.qb=function(n){return new n1(rE(this,n))},iH.gC=function(){return uP},iH.bb=function(){return t0(this)},iH.hC=function(){return eD(this)},iH.B=function(){return this.f*this.b[0]},iH.rb=function(n){return function(n,t){var e,r;if(iT(),t<=0||1==n.e&&2==n.b[0])return!0;if(!rQ(n,0))return!1;if(1==n.e&&(-1024&n.b[0])==0)return function(n,t){var e,r,i,o;for(r=0,e=n.length-1;r<=e;)if((o=n[i=r+(~~(e-r)>>1)])<t)r=i+1;else{if(!(o>t))return i;e=i-1}return-r-1}(fK,n.b[0])>=0;for(r=1;r<fK.length;++r)if(0==e2(n.b,n.e,fK[r]))return!1;for(r=2,e=eV(n);e<fz[r];++r);return ie(n,t=r<1+(~~(t-1)>>1)?r:1+(~~(t-1)>>1))}(new n1(this.f<0?new ti(1,this.e,this.b):this),n)},iH.sb=function(){return t5(ij(this,0))},iH.tb=function(n){return new n1(1==rn(this,n)?this:n)},iH.ub=function(n){return new n1(-1==rn(this,n)?this:n)},iH.vb=function(n){return new n1(et(this,n))},iH.wb=function(n){return new n1(rR(this,n))},iH.xb=function(n,t){return new n1(rq(this,n,t))},iH.yb=function(n){return new n1(en(this,n))},iH.cb=function(){return new n1(0==this.f?this:new ti(-this.f,this.e,this.b))},iH.zb=function(){return new n1(function(n){if(n.f<0)throw new nr("start < 0: "+n);return function(n){var t,e,r,i,o,f,u,c;if(iT(),o=tL(ud,{6:1},-1,fK.length,1),r=tL(u_,{6:1},-1,1024,2),1==n.e&&n.b[0]>=0&&n.b[0]<fK[fK.length-1]){for(e=0;n.b[0]>=fK[e];++e);return fJ[e]}for(u=new ti(1,n.e,tL(ud,{6:1},-1,n.e+1,1)),iM(n.b,0,u.b,0,n.e),rQ(n,0)?tK(u,2):u.b[0]|=1,i=u.ab(),t=2;i<fz[t];++t);for(e=0;e<fK.length;++e)o[e]=(c=fK[e],e2(u.b,u.e,c)-1024);for(;;){for(function(n,t){var e;for(e=0;e<t;++e)n[e]=!1}(r,r.length),e=0;e<fK.length;++e)for(o[e]=(o[e]+1024)%fK[e],i=0==o[e]?0:fK[e]-o[e];i<1024;i+=fK[e])r[i]=!0;for(i=0;i<1024;++i)if(!r[i]&&(tK(f=ea(u),i),ie(f,t)))return f;tK(u,1024)}}(n)}(this))},iH.Ab=function(){return new n1(r8(this))},iH.Bb=function(n){return new n1(e$(n,(rK(),fC))||e$(this,fC)?fC:0==n.f?this:0==this.f?n:this.f>0?n.f>0?this.e>n.e?rl(this,n):rl(n,this):ig(this,n):n.f>0?ig(n,this):eg(n)>eg(this)?rZ(n,this):rZ(this,n))},iH.db=function(n){return new n1(rk(this,n))},iH.Cb=function(n){return new n1(rF(this,n))},iH.Db=function(n){return new n1(rQ(this,n)?this:it(this,n))},iH.eb=function(n){return new n1(tX(this,n))},iH.fb=function(n){return new n1(tY(this,n))},iH.r=function(){return this.f},iH.Eb=function(n){return new n1(is(this,n))},iH.gb=function(n){return rQ(this,n)},iH.Fb=function(n){var t,e;if((e=iI(n))==i$)t=ij(this,0);else if(e==ok)t=function(n,t){var e,r,i,o,f,u,c,s,h,a,b,l,g,w,d,_,v;if(iS(),w=n.f,h=n.e,u=n.b,0==w)return iK;if(1==h)return v=ts(e6(u[0]),o6),w<0&&(v=eP(v)),function(n,t){var e,r,i,o;if(10==t||t<2||t>36)return i$+r3(n);if(e=tL(uJ,{6:1},-1,65,1),r_(),r=fR,i=64,o=e6(t),rA(n,oz)){for(;rA(n,o);)e[i--]=r[nM(n6(n,o))],n=iN(n,o,!1);e[i]=r[nM(n)]}else{for(;!rB(n,eP(o));)e[i--]=r[nM(eP(n6(n,o)))],n=iN(n,o,!1);e[i--]=r[nM(eP(n))],e[i]=45}return t3(e,i,65)}(v,t);if(10==t||t<2||t>36)return ij(n,0);if(r=Math.log(t)/Math.log(2),g=tL(uJ,{6:1},-1,l=ei(eV(new n1(n.f<0?new ti(1,n.e,n.b):n))/r+ +(w<0))+1,1),o=l,16!=t)for(iM(u,0,d=tL(ud,{6:1},-1,h,1),0,h),_=h,i=fU[t],e=fL[t-2];;){b=ir(d,d,_,e),a=o;do g[--o]=ev(b%t,t);while(0!=(b=~~(b/t))&&0!=o)for(c=0,f=i-a+o;c<f&&o>0;++c)g[--o]=48;for(c=_-1;c>0&&0==d[c];--c);if(1==(_=c+1)&&0==d[0])break}else for(c=0;c<h;++c)for(s=0;s<8&&o>0;++s)b=~~u[c]>>(s<<2)&15,g[--o]=ev(b,16);for(;48==g[o];)++o;return -1==w&&(g[--o]=45),tU(g,o,l-o)}(this,n[0]);else throw new ne("Unknown call signature for result = super.toString: "+e);return t},iH.Gb=function(n){return new n1(0==n.f?this:0==this.f?n:e$(n,(rK(),fC))?new n1(r8(this)):e$(this,fC)?new n1(r8(n)):this.f>0?n.f>0?this.e>n.e?rg(this,n):rg(n,this):iL(this,n):n.f>0?iL(n,this):eg(n)>eg(this)?ii(n,this):ii(this,n))},iH.cM={4:1,6:1,8:1,10:1,17:1,24:1},(iH=j.prototype=(function(){}).prototype=new s).gC=function(){return uT};var fN=!1;(iH=nv.prototype=nm.prototype=(function(){}).prototype=new s).gC=function(){return uj},iH.Hb=function(){return this.b.b},iH.Ib=function(){return new Y(this.b.c)},iH.hC=function(){return nS(this.b)},iH.tS=function(){return eh(this.b)},iH.cM={24:1},iH.b=null,(iH=T.prototype=(function(){}).prototype=new s).gC=function(){return uF};var fI=!1;(iH=Y.prototype=ny.prototype=(function(){}).prototype=new s).gC=function(){return uH},iH.Jb=function(){return this.b.b},iH.tS=function(){return this.b.b},iH.cM={5:1,24:1},iH.b=null,(iH=J.prototype=(function(){}).prototype=new s).gC=function(){return uV};var fE=!1;(iH=nr.prototype=(function(){}).prototype=new b).gC=function(){return uq},iH.cM={6:1,12:1,15:1},(iH=ni.prototype=$.prototype=(function(){}).prototype=new b).gC=function(){return uz},iH.cM={6:1,12:1,15:1},(iH=N.prototype=(function(){}).prototype=new s).gC=function(){return uK},iH.tS=function(){return((2&this.c)!=0?"interface ":(1&this.c)!=0?i$:"class ")+this.d},iH.b=null,iH.c=0,iH.d=null,(iH=H.prototype=(function(){}).prototype=new b).gC=function(){return uW},iH.cM={6:1,12:1,15:1},(iH=I.prototype=new s).eQ=function(n){return this===n},iH.gC=function(){return us},iH.hC=function(){return nj(this)},iH.tS=function(){return this.b},iH.cM={6:1,8:1,9:1},iH.b=null,iH.c=0,(iH=no.prototype=V.prototype=E.prototype=new b).gC=function(){return uZ},iH.cM={6:1,12:1,15:1},(iH=nf.prototype=q.prototype=R.prototype=new b).gC=function(){return uG},iH.cM={6:1,12:1,15:1},(iH=nu.prototype=G.prototype=(function(){}).prototype=new b).gC=function(){return uX},iH.cM={6:1,12:1,15:1},(iH=nw.prototype=(function(){}).prototype=new E).gC=function(){return uY},iH.cM={6:1,12:1,15:1},(iH=to.prototype=(function(){}).prototype=new s).gC=function(){return uy},iH.tS=function(){return this.b+iJ+this.d+"(Unknown Source"+(this.c>=0?i4+this.c:i$)+")"},iH.cM={6:1,13:1},iH.b=null,iH.c=0,iH.d=null,(iH=String.prototype).eQ=function(n){return tj(this,n)},iH.gC=function(){return uA},iH.hC=function(){var n,t;return nJ(),null!=(t=fD[n=i4+this])?t:(null==(t=fO[n])&&(t=function(n){var t,e,r,i;for(t=0,i=(r=n.length)-4,e=0;e<i;)t=n.charCodeAt(e+3)+31*(n.charCodeAt(e+2)+31*(n.charCodeAt(e+1)+31*(n.charCodeAt(e)+31*t)))|0,e+=4;for(;e<r;)t=31*t+n$(n,e++);return 0|t}(this)),256==fk&&(fO=fD,fD={},fk=0),++fk,fD[n]=t)},iH.tS=function(){return this},iH.cM={1:1,6:1,7:1,8:1};var fR,fO,fD,fk=0;(iH=ns.prototype=(function(){}).prototype=new s).gC=function(){return u0},iH.tS=function(){return this.b.b},iH.cM={7:1},(iH=nV.prototype=W.prototype=K.prototype=(function(){}).prototype=new s).gC=function(){return u1},iH.tS=function(){return this.b.b},iH.cM={7:1},(iH=tN.prototype=(function(){}).prototype=new R).gC=function(){return u2},iH.cM={6:1,12:1,14:1,15:1},(iH=tF.prototype=(function(){}).prototype=new b).gC=function(){return u3},iH.cM={6:1,12:1,15:1},(iH=ix.prototype=eK.prototype=(function(){}).prototype=new s).eQ=function(n){return nG(n,18)&&tQ(n,18).b==this.b&&tQ(n,18).c==this.c},iH.gC=function(){return u9},iH.hC=function(){return nS(this)},iH.tS=function(){return eh(this)},iH.cM={6:1,18:1},iH.b=0,iH.c=null,(iH=nA.prototype=(function(){}).prototype=new I).gC=function(){return u8},iH.cM={6:1,8:1,9:1,19:1},(iH=U.prototype=new s).Kb=function(n){throw new tF},iH.Lb=function(n){return!!function(n,t){for(var e;n.Pb();)if(e=n.Qb(),null==t?null==e:tp(t,e))return n;return null}(this.Mb(),n)},iH.gC=function(){return cn},iH.tS=function(){var n,t,e,r,i,o,f,u;for(e=new ns,n=null,e.b.b+="[",t=this.Mb();t.Pb();)null!=n?(i=e.b,o=n,i.b+=o):n=", ",r=t.Qb(),f=e.b,u=r===this?"(this Collection)":i$+r,f.b+=u;return e.b.b+="]",e.b.b},(iH=D.prototype=new s).eQ=function(n){var t,e,r,i,o,f;if(n===this)return!0;if(!nG(n,21)||(i=tQ(n,21),this.e!=i.e))return!1;for(e=new ee(new nn(i).b);nx(e.b);)if(r=(t=tQ(tT(e.b),22)).Rb(),o=t.Sb(),!(null==r?this.d:nG(r,1)?i4+tQ(r,1)in this.f:re(this,r,~~tu(r)))||!ty(o,null==r?this.c:nG(r,1)?(f=tQ(r,1),this.f[i4+f]):rt(this,r,~~tu(r))))return!1;return!0},iH.gC=function(){return ct},iH.hC=function(){var n,t;for(t=0,n=new ee(new nn(this).b);nx(n.b);)t+=tQ(tT(n.b),22).hC(),t=~~t;return t},iH.tS=function(){var n,t,e,r;for(r="{",n=!1,e=new ee(new nn(this).b);nx(e.b);)t=tQ(tT(e.b),22),n?r+=", ":n=!0,r+=i$+t.Rb(),r+="=",r+=i$+t.Sb();return r+"}"},iH.cM={21:1},(iH=k.prototype=new D).Ob=function(n,t){return nT(n)===nT(t)||null!=n&&tp(n,t)},iH.gC=function(){return ce},iH.cM={21:1},iH.b=null,iH.c=null,iH.d=!1,iH.e=0,iH.f=null,(iH=L.prototype=new U).eQ=function(n){var t,e,r;if(n===this)return!0;if(!nG(n,23)||(e=tQ(n,23)).b.e!=this.Nb())return!1;for(t=new ee(e.b);nx(t.b);)if(r=tQ(tT(t.b),22),!this.Lb(r))return!1;return!0},iH.gC=function(){return cr},iH.hC=function(){var n,t,e;for(n=0,t=this.Mb();t.Pb();)null!=(e=t.Qb())&&(n+=tu(e),n=~~n);return n},iH.cM={23:1},(iH=nn.prototype=(function(){}).prototype=new L).Lb=function(n){var t,e,r,i,o;return!!(nG(n,22)&&(e=(t=tQ(n,22)).Rb(),i=this.b,null==e?i.d:nG(e,1)?i4+tQ(e,1)in i.f:re(i,e,~~tu(e))))&&(r=er(this.b,e),nT(o=t.Sb())===nT(r)||null!=o&&tp(o,r))},iH.gC=function(){return ci},iH.Mb=function(){return new ee(this.b)},iH.Nb=function(){return this.b.e},iH.cM={23:1},iH.b=null,(iH=ee.prototype=(function(){}).prototype=new s).gC=function(){return co},iH.Pb=function(){return nx(this.b)},iH.Qb=function(){return tQ(tT(this.b),22)},iH.b=null,(iH=O.prototype=new s).eQ=function(n){var t;return!!(nG(n,22)&&(t=tQ(n,22),ty(this.Rb(),t.Rb())&&ty(this.Sb(),t.Sb())))},iH.gC=function(){return cf},iH.hC=function(){var n,t;return n=0,t=0,null!=this.Rb()&&(n=tu(this.Rb())),null!=this.Sb()&&(t=tu(this.Sb())),n^t},iH.tS=function(){return this.Rb()+"="+this.Sb()},iH.cM={22:1},(iH=nt.prototype=(function(){}).prototype=new O).gC=function(){return cu},iH.Rb=function(){return null},iH.Sb=function(){return this.b.c},iH.Tb=function(n){return tV(this.b,n)},iH.cM={22:1},iH.b=null,(iH=nB.prototype=(function(){}).prototype=new O).gC=function(){return cc},iH.Rb=function(){return this.b},iH.Sb=function(){var n,t;return n=this.c,t=this.b,n.f[i4+t]},iH.Tb=function(n){var t,e,r,i;return t=this.c,e=this.b,i=t.f,(e=i4+e)in i?r=i[e]:++t.e,i[e]=n,r},iH.cM={22:1},iH.b=null,iH.c=null,(iH=P.prototype=new U).Kb=function(n){var t;return((t=this.Nb())<0||t>this.c)&&tC(t,this.c),function(n,t,e,r){n.splice(t,0,r)}(this.b,t,0,n),++this.c,!0},iH.eQ=function(n){var t,e,r,i,o;if(n===this)return!0;if(!nG(n,20)||(o=tQ(n,20),this.Nb()!=o.c))return!1;for(r=new X(this),i=new X(o);r.b<r.c.c;)if(t=tT(r),e=tT(i),!(null==t?null==e:tp(t,e)))return!1;return!0},iH.gC=function(){return cs},iH.hC=function(){var n,t,e;for(t=1,n=new X(this);n.b<n.c.c;)t=~~(t=31*t+(null==(e=tT(n))?0:tu(e)));return t},iH.Mb=function(){return new X(this)},iH.cM={20:1},(iH=X.prototype=(function(){}).prototype=new s).gC=function(){return ch},iH.Pb=function(){return nx(this)},iH.Qb=function(){return tT(this)},iH.b=0,iH.c=null,(iH=nz.prototype=(function(){}).prototype=new P).Kb=function(n){return n4(this,n)},iH.Lb=function(n){return -1!=function(n,t,e){for(;e<n.c;++e)if(ty(t,n.b[e]))return e;return -1}(this,n,0)},iH.gC=function(){return ca},iH.Nb=function(){return this.c},iH.cM={6:1,20:1},iH.c=0,(iH=tH.prototype=(function(){}).prototype=new k).gC=function(){return cb},iH.cM={6:1,21:1},(iH=nN.prototype=(function(){}).prototype=new O).gC=function(){return cl},iH.Rb=function(){return this.b},iH.Sb=function(){return this.c},iH.Tb=function(n){var t;return t=this.c,this.c=n,t},iH.cM={22:1},iH.b=null,iH.c=null,(iH=z.prototype=(function(){}).prototype=new b).gC=function(){return cg},iH.cM={6:1,12:1,15:1},(iH=ra.prototype=(function(){}).prototype=new s).gC=function(){return cw},iH.b=0,iH.c=0;var fL,fU,fP,fQ,fT,fj,fF,fH,f$,fV,fq,fG,fz,fJ,fK,fW,fZ,fX,fY,f0,f1,f2,f3,f6,f4,f5,f9,f8,f7,un,ut,ue,ur,ui,uo,uf=0;(iH=Q.prototype=new s).gC=function(){return cd},(iH=nY.prototype=(function(){}).prototype=new Q).gC=function(){return cp};var uu=function(n){return function(){try{return function(n,t,e){var r;r=0==o5++&&(function(n){var t,e;if(n.b){e=null;do t=n.b,n.b=null,e=rs(t,e);while(n.b)n.b=e}}((nh(),ft)),!0);try{return n.apply(t,e)}finally{r&&function(n){var t,e;if(n.c){e=null;do t=n.c,n.c=null,e=rs(t,e);while(n.c)n.c=e}}((nh(),ft)),--o5}}(n,this,arguments)}catch(n){throw n}}},uc=tf(oI,"Object"),us=tf(oI,"Enum"),uh=tf(oI,"Throwable"),ua=tf(oI,"Exception"),ub=tf(oI,"RuntimeException"),ul=tf(oB,"JavaScriptException"),ug=tf(oB,"JavaScriptObject$"),uw=tf(oB,"Scheduler"),ud=tk(i$,"[I",td("int")),up=tk(o_,"Object;",uc),u_=tk(i$,"[Z",td("boolean")),uv=tf(oA,"SchedulerImpl"),um=tf(oA,"StackTraceCreator$Collector"),uy=tf(oI,"StackTraceElement"),uC=tk(o_,"StackTraceElement;",uy),ux=tf(oA,"StackTraceCreator$CollectorMoz"),uS=tf(oA,"StackTraceCreator$CollectorChrome"),uM=tf(oA,"StringBufferImpl"),uB=tf(oA,"StringBufferImplAppend"),uA=tf(oI,od),uN=tk(o_,"String;",uA),uI=tf("com.google.gwt.lang.","LongLibBase$LongEmul"),uE=tk("[Lcom.google.gwt.lang.","LongLibBase$LongEmul;",uI),uR=tf(oI,"Number"),uO=tf(oE,i5),uD=tf(oN,i5),uk=tk(op,i8,uD),uL=tf(oN,"BigDecimalExporterImpl"),uU=tf(oE,i7),uP=tf(oN,i7),uQ=tk(op,or,uP),uT=tf(oN,"BigIntegerExporterImpl"),uj=tf(oN,oa),uF=tf(oN,"MathContextExporterImpl"),uH=tf(oN,og),u$=tk(op,ow,uH),uV=tf(oN,"RoundingModeExporterImpl"),uq=tf(oI,"ArithmeticException"),uG=tf(oI,"IndexOutOfBoundsException"),uz=tf(oI,"ArrayStoreException"),uJ=tk(i$,"[C",td("char")),uK=tf(oI,"Class"),uW=tf(oI,"ClassCastException"),uZ=tf(oI,"IllegalArgumentException"),uX=tf(oI,"NullPointerException"),uY=tf(oI,"NumberFormatException"),u0=tf(oI,"StringBuffer"),u1=tf(oI,"StringBuilder"),u2=tf(oI,"StringIndexOutOfBoundsException"),u3=tf(oI,"UnsupportedOperationException"),u6=tk(ov,i8,uO),u4=tk(i$,"[D",td("double")),u5=tk(ov,or,uU),u9=tf(oE,oa),u8=((n=new N).d=oE+og,n.c=8,n),u7=tk(ov,ow,u8),cn=tf(oR,"AbstractCollection"),ct=tf(oR,"AbstractMap"),ce=tf(oR,"AbstractHashMap"),cr=tf(oR,"AbstractSet"),ci=tf(oR,"AbstractHashMap$EntrySet"),co=tf(oR,"AbstractHashMap$EntrySetIterator"),cf=tf(oR,"AbstractMapEntry"),cu=tf(oR,"AbstractHashMap$MapEntryNull"),cc=tf(oR,"AbstractHashMap$MapEntryString"),cs=tf(oR,"AbstractList"),ch=tf(oR,"AbstractList$IteratorImpl"),ca=tf(oR,"ArrayList"),cb=tf(oR,"HashMap"),cl=tf(oR,"MapEntryImpl"),cg=tf(oR,"NoSuchElementException"),cw=tf(oR,"Random"),cd=tf(oT,"ExporterBaseImpl"),cp=tf(oT,"ExporterBaseActual");u&&u({moduleName:"gwtapp",sessionId:c,subSystem:"startup",evtGroup:"moduleStartup",millis:new Date().getTime(),type:"moduleEvalEnd"}),i&&i.onScriptLoad&&i.onScriptLoad(eE),eE(null,"ModuleName","moduleBase")}(),n.RoundingMode=e.bigdecimal.RoundingMode,n.MathContext=e.bigdecimal.MathContext,o("BigDecimal"),o("BigInteger")}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:{});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issues/7094/1/input.js | JavaScript | export function useSyncExternalStore$2(e, n, t) {
let a = n(); // any variable expect `e`
return a;
}
eval(); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issues/7094/1/output.js | JavaScript | export function useSyncExternalStore$2(e,n,r){return n()}eval();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issues/7094/2/input.js | JavaScript |
export function foo() {
eval();
return function useSyncExternalStore$2(e, n, t) {
let a = n(); // any variable expect `e`
return a;
}
}
export function bar() {
const shouldBeMangled = Math.random() > 0.5 ? 1 : 2;
console.log(shouldBeMangled)
console.log(shouldBeMangled)
console.log(shouldBeMangled)
console.log(shouldBeMangled)
console.log(shouldBeMangled)
console.log(shouldBeMangled)
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issues/7094/2/output.js | JavaScript | export function foo(){return eval(),function(o,n,l){return n()}}export function bar(){const o=Math.random()>.5?1:2;console.log(o),console.log(o),console.log(o),console.log(o),console.log(o),console.log(o)}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issues/8288/input.js | JavaScript | function memoizeWithArgs(fnWithArgs, options) {
const fn = proxyMemoize((args) => fnWithArgs(...args), options);
return (...args) => fn(args);
}
function makeSelector(selector, selectorTransformer) {
return (state) => selectorTransformer(selector(state));
}
export function createSelectorHook(selector) {
const useSelectorHook = (selectorTransformer, deps) => {
const memoSelector = useMemo(
() =>
selectorTransformer && deps
? makeSelector(
selector,
memoizeWithArgs(selectorTransformer)
)
: undefined,
deps
);
const finalSelector = memoSelector
? memoSelector
: selectorTransformer
? makeSelector(selector, selectorTransformer)
: selector;
return useSelector(finalSelector);
};
return useSelectorHook;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/issues/8288/output.js | JavaScript | export function createSelectorHook(e){return(o,r)=>useSelector(useMemo(()=>{var t;return o&&r?(t=function(e,o){const r=proxyMemoize(o=>e(...o),void 0);return(...e)=>r(e)}(o),o=>t(e(o))):void 0},r)||(o?r=>o(e(r)):e))}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/json-regression/input.js | JavaScript | console.log(JSON.parse('[{"title":"Localization","slug":"integration/zendesk/localization","description":"The Algolia integration for Zendesk supports help centers in many languages.","navigation":"zendesk","unpublished":false,"no_index":false,"body":{"raw":"\\n\\nThe Algolia integration for Zendesk supports help centers with multiple languages.\\nUsers see the results in the language they select.\\n\\n## Supported languages\\n\\nThe Algolia integration supports these languages _(locales)_:\\n\\n\\n\\n- **ar**: العربية / Arabic\\n- **ar-eg**: العربية (مصر) / Arabic (Egypt)\\n- **bg**: Български / Bulgarian\\n- **cs**: Čeština / Czech\\n- **da**: Dansk / Danish\\n- **de**: Deutsch / German\\n- **de-at**: Deutsch (Österreich) / German (Austria)\\n- **de-ch**: Deutsch (Schweiz) / German (Switzerland)\\n- **el**: Ελληνικά / Greek\\n- **en-au**: English (Australia)\\n- **en-ca**: English (Canada)\\n- **en-gb**: English (Great Britain)\\n- **en-ie**: English (Ireland)\\n- **en-us**: English (United States)\\n- **en-150**: English (Europe)\\n- **es**: Español / Spanish\\n- **es-es**: Español (España) / Spanish (Spain)\\n- **es-mx**: Español (Mexico) / Spanish (Mexico)\\n- **es-419**: Español (Latinoamérica) / Spanish (Latin America)\\n- **fi**: Suomi / Finnish\\n- **fr**: Français / French\\n- **fr-be**: Français (Belgique) / French (Belgium)\\n- **fr-ca**: Français (Canada) / French (Canada)\\n- **fr-ch**: Français (Suisse) / French (Switzerland)\\n- **fr-fr**: Français (France) / French (France)\\n- **hu**: Magyar / Hungarian\\n- **id**: Bahasa Indonesia / Indonesian\\n- **it**: Italiano / Italian\\n- **ja**: 日本語 / Japanese\\n- **ko**: 한국어 / Korean\\n- **nl**: Nederlands / Dutch\\n- **nl-be**: Nederlands (België) / Dutch (Belgium)\\n- **no**: Norsk / Norwegian\\n- **pl**: Polski / Polish\\n- **pt**: Português / Portuguese\\n- **pt-br**: Português do Brasil / Brazilian Portuguese\\n- **ro**: Română / Romanian\\n- **ru**: Русский / Russian\\n- **sk**: Slovenčina / Slovak\\n- **sv**: Svenska / Swedish\\n- **th**: ไทย / Thai\\n- **tr**: Türkçe / Turkish\\n- **uk**: Українська / Ukrainian\\n- **vi**: Tiếng Việt / Vietnamese\\n- **zh-cn**: 简体中文 / Simplified Chinese\\n- **zh-tw**: 繁體中文 / Traditional Chinese\\n\\n\\n\\n## Update translated strings\\n\\nIf you want to update some translations,\\nedit the `translation` object in the [`algoliasearchZendeskHC`](/integration/zendesk/theming/) function.\\n\\nFor example:\\n\\n```javascript\\ntranslations: {\\n placeholder: {\\n de: \'In unserem Help Center suchen\',\\n \'en-us\': \'Search in our Help Center\',\\n fr: \'Recherchez dans notre Help Center\'\\n }\\n}\\n```\\n\\n## Reference of translatable strings\\n\\nThe following code lists all available translatable strings with the default values for the `en-US` locale:\\n\\n```javascript\\ntranslations: {\\n categories: {\\n \'en-us\': \'Categories\'\\n },\\n change_query: {\\n \'en-us\': \'Change your query\'\\n },\\n clear_filters: {\\n \'en-us\': \'clear your filters\'\\n },\\n format_number: {\\n \'en-us\': function (n) { return n.toString().replace(/\\\\B(?=(\\\\d{3})+(?!\\\\d))/g, \',\'); }\\n },\\n filter: {\\n \'en-us\': \'Filter results\'\\n },\\n nb_results: {\\n \'en-us\': function (nb) {\\n return this.format_number(nb) + \' result\' + (nb > 1 ? \'s\' : \'\');\\n }\\n },\\n no_result_for: {\\n \'en-us\': function (query) {\\n return \'No result found for \' + this.quoted(query);\\n }\\n },\\n no_result_actions: {\\n \'en-us\': function () {\\n return this.change_query + \' or \' + this.clear_filters;\\n }\\n },\\n placeholder: {\\n \'en-us\': \'Search in our articles\'\\n },\\n quoted: {\\n \'en-us\': function (text) { return \'\\"\' + escapeHTML(text) + \'\\"\'; }\\n },\\n stats: {\\n \'en-us\': function (nbHits, processing) {\\n return this.nb_results(nbHits) + \' found in \' + processing + \' ms\';\\n }\\n },\\n search_by_algolia: {\\n \'en-us\': function (algolia) { return \'Search by \' + algolia; }\\n },\\n tags: {\\n \'en-us\': \'Tags\'\\n }\\n}\\n```\\n\\n## Localized tags\\n\\nYou can prefix your tags with a locale, separated by a colon.\\nFor example, if the tags of an article are:\\n\\n```javascript\\n[ \'Wow\', \'en:Awesome\', \'en-gb:Good\', \'fr:Incroyable\' ]\\n```\\n\\nThe indices for each locale will contain only the tags matching their locale:\\n\\n| Locales | Tags |\\n| ----------------- | ----------------------------------- |\\n| All `fr` locales | `{ \\"label_names\\": [\\"Incroyable\\"] }` |\\n| `en-gb` | `{ label_names: [\\"Good\\"] }` |\\n| Other `en` locales, for example, `en-us` | `{ \\"label_names\\": [\\"Awesome\\"] }` |\\n| All other locales | `{ label_names: [\\"Wow\\"] }` |\\n","code":"var Component=(()=>{var d=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var m=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports),b=(r,n)=>{for(var i in n)s(r,i,{get:n[i],enumerable:!0})},t=(r,n,i,a)=>{if(n&&typeof n==\\"object\\"||typeof n==\\"function\\")for(let l of u(n))!f.call(r,l)&&l!==i&&s(r,l,{get:()=>n[l],enumerable:!(a=g(n,l))||a.enumerable});return r};var _=(r,n,i)=>(i=r!=null?d(p(r)):{},t(n||!r||!r.__esModule?s(i,\\"default\\",{value:r,enumerable:!0}):i,r)),S=r=>t(s({},\\"__esModule\\",{value:!0}),r);var o=m((z,c)=>{c.exports=_jsx_runtime});var F={};b(F,{default:()=>x,frontmatter:()=>y});var e=_(o()),y={navigation:\\"zendesk\\",title:\\"Localization\\",description:\\"The Algolia integration for Zendesk supports help centers in many languages.\\",slug:\\"integration/zendesk/localization\\"};function h(r){let n=Object.assign({p:\\"p\\",h2:\\"h2\\",em:\\"em\\",ul:\\"ul\\",li:\\"li\\",strong:\\"strong\\",code:\\"code\\",a:\\"a\\",pre:\\"pre\\"},r.components);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.p,{children:`The Algolia integration for Zendesk supports help centers with multiple languages.\\nUsers see the results in the language they select.`}),`\\n`,(0,e.jsx)(n.h2,{id:\\"supported-languages\\",children:\\"Supported languages\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[\\"The Algolia integration supports these languages \\",(0,e.jsx)(n.em,{children:\\"(locales)\\"}),\\":\\"]}),`\\n`,(0,e.jsxs)(n.ul,{children:[`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ar\\"}),\\": \\\\u0627\\\\u0644\\\\u0639\\\\u0631\\\\u0628\\\\u064A\\\\u0629 / Arabic\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ar-eg\\"}),\\": \\\\u0627\\\\u0644\\\\u0639\\\\u0631\\\\u0628\\\\u064A\\\\u0629 (\\\\u0645\\\\u0635\\\\u0631) / Arabic (Egypt)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"bg\\"}),\\": \\\\u0411\\\\u044A\\\\u043B\\\\u0433\\\\u0430\\\\u0440\\\\u0441\\\\u043A\\\\u0438 / Bulgarian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"cs\\"}),\\": \\\\u010Ce\\\\u0161tina / Czech\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"da\\"}),\\": Dansk / Danish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"de\\"}),\\": Deutsch / German\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"de-at\\"}),\\": Deutsch (\\\\xD6sterreich) / German (Austria)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"de-ch\\"}),\\": Deutsch (Schweiz) / German (Switzerland)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"el\\"}),\\": \\\\u0395\\\\u03BB\\\\u03BB\\\\u03B7\\\\u03BD\\\\u03B9\\\\u03BA\\\\u03AC / Greek\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-au\\"}),\\": English (Australia)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-ca\\"}),\\": English (Canada)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-gb\\"}),\\": English (Great Britain)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-ie\\"}),\\": English (Ireland)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-us\\"}),\\": English (United States)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-150\\"}),\\": English (Europe)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es\\"}),\\": Espa\\\\xF1ol / Spanish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es-es\\"}),\\": Espa\\\\xF1ol (Espa\\\\xF1a) / Spanish (Spain)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es-mx\\"}),\\": Espa\\\\xF1ol (Mexico) / Spanish (Mexico)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es-419\\"}),\\": Espa\\\\xF1ol (Latinoam\\\\xE9rica) / Spanish (Latin America)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fi\\"}),\\": Suomi / Finnish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr\\"}),\\": Fran\\\\xE7ais / French\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-be\\"}),\\": Fran\\\\xE7ais (Belgique) / French (Belgium)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-ca\\"}),\\": Fran\\\\xE7ais (Canada) / French (Canada)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-ch\\"}),\\": Fran\\\\xE7ais (Suisse) / French (Switzerland)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-fr\\"}),\\": Fran\\\\xE7ais (France) / French (France)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"hu\\"}),\\": Magyar / Hungarian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"id\\"}),\\": Bahasa Indonesia / Indonesian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"it\\"}),\\": Italiano / Italian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ja\\"}),\\": \\\\u65E5\\\\u672C\\\\u8A9E / Japanese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ko\\"}),\\": \\\\uD55C\\\\uAD6D\\\\uC5B4 / Korean\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"nl\\"}),\\": Nederlands / Dutch\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"nl-be\\"}),\\": Nederlands (Belgi\\\\xEB) / Dutch (Belgium)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"no\\"}),\\": Norsk / Norwegian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"pl\\"}),\\": Polski / Polish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"pt\\"}),\\": Portugu\\\\xEAs / Portuguese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"pt-br\\"}),\\": Portugu\\\\xEAs do Brasil / Brazilian Portuguese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ro\\"}),\\": Rom\\\\xE2n\\\\u0103 / Romanian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ru\\"}),\\": \\\\u0420\\\\u0443\\\\u0441\\\\u0441\\\\u043A\\\\u0438\\\\u0439 / Russian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"sk\\"}),\\": Sloven\\\\u010Dina / Slovak\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"sv\\"}),\\": Svenska / Swedish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"th\\"}),\\": \\\\u0E44\\\\u0E17\\\\u0E22 / Thai\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"tr\\"}),\\": T\\\\xFCrk\\\\xE7e / Turkish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"uk\\"}),\\": \\\\u0423\\\\u043A\\\\u0440\\\\u0430\\\\u0457\\\\u043D\\\\u0441\\\\u044C\\\\u043A\\\\u0430 / Ukrainian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"vi\\"}),\\": Ti\\\\u1EBFng Vi\\\\u1EC7t / Vietnamese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"zh-cn\\"}),\\": \\\\u7B80\\\\u4F53\\\\u4E2D\\\\u6587 / Simplified Chinese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"zh-tw\\"}),\\": \\\\u7E41\\\\u9AD4\\\\u4E2D\\\\u6587 / Traditional Chinese\\"]}),`\\n`]}),`\\n`,(0,e.jsx)(n.h2,{id:\\"update-translated-strings\\",children:\\"Update translated strings\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[`If you want to update some translations,\\nedit the `,(0,e.jsx)(n.code,{children:\\"translation\\"}),\\" object in the \\",(0,e.jsx)(n.a,{href:\\"/integration/zendesk/theming/\\",children:(0,e.jsx)(n.code,{children:\\"algoliasearchZendeskHC\\"})}),\\" function.\\"]}),`\\n`,(0,e.jsx)(n.p,{children:\\"For example:\\"}),`\\n`,(0,e.jsx)(n.pre,{children:(0,e.jsx)(n.code,{className:\\"language-javascript\\",children:`translations: {\\n placeholder: {\\n de: \'In unserem Help Center suchen\',\\n \'en-us\': \'Search in our Help Center\',\\n fr: \'Recherchez dans notre Help Center\'\\n }\\n}\\n`})}),`\\n`,(0,e.jsx)(n.h2,{id:\\"reference-of-translatable-strings\\",children:\\"Reference of translatable strings\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[\\"The following code lists all available translatable strings with the default values for the \\",(0,e.jsx)(n.code,{children:\\"en-US\\"}),\\" locale:\\"]}),`\\n`,(0,e.jsx)(n.pre,{children:(0,e.jsx)(n.code,{className:\\"language-javascript\\",children:`translations: {\\n categories: {\\n \'en-us\': \'Categories\'\\n },\\n change_query: {\\n \'en-us\': \'Change your query\'\\n },\\n clear_filters: {\\n \'en-us\': \'clear your filters\'\\n },\\n format_number: {\\n \'en-us\': function (n) { return n.toString().replace(/\\\\\\\\B(?=(\\\\\\\\d{3})+(?!\\\\\\\\d))/g, \',\'); }\\n },\\n filter: {\\n \'en-us\': \'Filter results\'\\n },\\n nb_results: {\\n \'en-us\': function (nb) {\\n return this.format_number(nb) + \' result\' + (nb > 1 ? \'s\' : \'\');\\n }\\n },\\n no_result_for: {\\n \'en-us\': function (query) {\\n return \'No result found for \' + this.quoted(query);\\n }\\n },\\n no_result_actions: {\\n \'en-us\': function () {\\n return this.change_query + \' or \' + this.clear_filters;\\n }\\n },\\n placeholder: {\\n \'en-us\': \'Search in our articles\'\\n },\\n quoted: {\\n \'en-us\': function (text) { return \'\\"\' + escapeHTML(text) + \'\\"\'; }\\n },\\n stats: {\\n \'en-us\': function (nbHits, processing) {\\n return this.nb_results(nbHits) + \' found in \' + processing + \' ms\';\\n }\\n },\\n search_by_algolia: {\\n \'en-us\': function (algolia) { return \'Search by \' + algolia; }\\n },\\n tags: {\\n \'en-us\': \'Tags\'\\n }\\n}\\n`})}),`\\n`,(0,e.jsx)(n.h2,{id:\\"localized-tags\\",children:\\"Localized tags\\"}),`\\n`,(0,e.jsx)(n.p,{children:`You can prefix your tags with a locale, separated by a colon.\\nFor example, if the tags of an article are:`}),`\\n`,(0,e.jsx)(n.pre,{children:(0,e.jsx)(n.code,{className:\\"language-javascript\\",children:`[ \'Wow\', \'en:Awesome\', \'en-gb:Good\', \'fr:Incroyable\' ]\\n`})}),`\\n`,(0,e.jsx)(n.p,{children:\\"The indices for each locale will contain only the tags matching their locale:\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[`| Locales | Tags |\\n| ----------------- | ----------------------------------- |\\n| All `,(0,e.jsx)(n.code,{children:\\"fr\\"}),\\" locales | \\",(0,e.jsx)(n.code,{children:\'{ \\"label_names\\": [\\"Incroyable\\"] }\'}),` |\\n| `,(0,e.jsx)(n.code,{children:\\"en-gb\\"}),\\" | \\",(0,e.jsx)(n.code,{children:\'{ label_names: [\\"Good\\"] }\'}),` |\\n| Other `,(0,e.jsx)(n.code,{children:\\"en\\"}),\\" locales, for example, \\",(0,e.jsx)(n.code,{children:\\"en-us\\"}),\\" | \\",(0,e.jsx)(n.code,{children:\'{ \\"label_names\\": [\\"Awesome\\"] }\'}),` |\\n| All other locales | `,(0,e.jsx)(n.code,{children:\'{ label_names: [\\"Wow\\"] }\'}),\\" |\\"]})]})}function k(r={}){let{wrapper:n}=r.components||{};return n?(0,e.jsx)(n,Object.assign({},r,{children:(0,e.jsx)(h,r)})):h(r)}var x=k;return S(F);})();\\n;return Component;"},"_id":"pages/integration/zendesk/localization.mdx","_raw":{"sourceFilePath":"pages/integration/zendesk/localization.mdx","sourceFileName":"localization.mdx","sourceFileDir":"pages/integration/zendesk","contentType":"mdx","flattenedPath":"pages/integration/zendesk/localization"},"type":"Doc"}]')) | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/json-regression/output.js | JavaScript | console.log(JSON.parse('[{"title":"Localization","slug":"integration/zendesk/localization","description":"The Algolia integration for Zendesk supports help centers in many languages.","navigation":"zendesk","unpublished":false,"no_index":false,"body":{"raw":"\\n\\nThe Algolia integration for Zendesk supports help centers with multiple languages.\\nUsers see the results in the language they select.\\n\\n## Supported languages\\n\\nThe Algolia integration supports these languages _(locales)_:\\n\\n\\n\\n- **ar**: العربية / Arabic\\n- **ar-eg**: العربية (مصر) / Arabic (Egypt)\\n- **bg**: Български / Bulgarian\\n- **cs**: Čeština / Czech\\n- **da**: Dansk / Danish\\n- **de**: Deutsch / German\\n- **de-at**: Deutsch (Österreich) / German (Austria)\\n- **de-ch**: Deutsch (Schweiz) / German (Switzerland)\\n- **el**: Ελληνικά / Greek\\n- **en-au**: English (Australia)\\n- **en-ca**: English (Canada)\\n- **en-gb**: English (Great Britain)\\n- **en-ie**: English (Ireland)\\n- **en-us**: English (United States)\\n- **en-150**: English (Europe)\\n- **es**: Español / Spanish\\n- **es-es**: Español (España) / Spanish (Spain)\\n- **es-mx**: Español (Mexico) / Spanish (Mexico)\\n- **es-419**: Español (Latinoamérica) / Spanish (Latin America)\\n- **fi**: Suomi / Finnish\\n- **fr**: Français / French\\n- **fr-be**: Français (Belgique) / French (Belgium)\\n- **fr-ca**: Français (Canada) / French (Canada)\\n- **fr-ch**: Français (Suisse) / French (Switzerland)\\n- **fr-fr**: Français (France) / French (France)\\n- **hu**: Magyar / Hungarian\\n- **id**: Bahasa Indonesia / Indonesian\\n- **it**: Italiano / Italian\\n- **ja**: 日本語 / Japanese\\n- **ko**: 한국어 / Korean\\n- **nl**: Nederlands / Dutch\\n- **nl-be**: Nederlands (België) / Dutch (Belgium)\\n- **no**: Norsk / Norwegian\\n- **pl**: Polski / Polish\\n- **pt**: Português / Portuguese\\n- **pt-br**: Português do Brasil / Brazilian Portuguese\\n- **ro**: Română / Romanian\\n- **ru**: Русский / Russian\\n- **sk**: Slovenčina / Slovak\\n- **sv**: Svenska / Swedish\\n- **th**: ไทย / Thai\\n- **tr**: Türkçe / Turkish\\n- **uk**: Українська / Ukrainian\\n- **vi**: Tiếng Việt / Vietnamese\\n- **zh-cn**: 简体中文 / Simplified Chinese\\n- **zh-tw**: 繁體中文 / Traditional Chinese\\n\\n\\n\\n## Update translated strings\\n\\nIf you want to update some translations,\\nedit the `translation` object in the [`algoliasearchZendeskHC`](/integration/zendesk/theming/) function.\\n\\nFor example:\\n\\n```javascript\\ntranslations: {\\n placeholder: {\\n de: \'In unserem Help Center suchen\',\\n \'en-us\': \'Search in our Help Center\',\\n fr: \'Recherchez dans notre Help Center\'\\n }\\n}\\n```\\n\\n## Reference of translatable strings\\n\\nThe following code lists all available translatable strings with the default values for the `en-US` locale:\\n\\n```javascript\\ntranslations: {\\n categories: {\\n \'en-us\': \'Categories\'\\n },\\n change_query: {\\n \'en-us\': \'Change your query\'\\n },\\n clear_filters: {\\n \'en-us\': \'clear your filters\'\\n },\\n format_number: {\\n \'en-us\': function (n) { return n.toString().replace(/\\\\B(?=(\\\\d{3})+(?!\\\\d))/g, \',\'); }\\n },\\n filter: {\\n \'en-us\': \'Filter results\'\\n },\\n nb_results: {\\n \'en-us\': function (nb) {\\n return this.format_number(nb) + \' result\' + (nb > 1 ? \'s\' : \'\');\\n }\\n },\\n no_result_for: {\\n \'en-us\': function (query) {\\n return \'No result found for \' + this.quoted(query);\\n }\\n },\\n no_result_actions: {\\n \'en-us\': function () {\\n return this.change_query + \' or \' + this.clear_filters;\\n }\\n },\\n placeholder: {\\n \'en-us\': \'Search in our articles\'\\n },\\n quoted: {\\n \'en-us\': function (text) { return \'\\"\' + escapeHTML(text) + \'\\"\'; }\\n },\\n stats: {\\n \'en-us\': function (nbHits, processing) {\\n return this.nb_results(nbHits) + \' found in \' + processing + \' ms\';\\n }\\n },\\n search_by_algolia: {\\n \'en-us\': function (algolia) { return \'Search by \' + algolia; }\\n },\\n tags: {\\n \'en-us\': \'Tags\'\\n }\\n}\\n```\\n\\n## Localized tags\\n\\nYou can prefix your tags with a locale, separated by a colon.\\nFor example, if the tags of an article are:\\n\\n```javascript\\n[ \'Wow\', \'en:Awesome\', \'en-gb:Good\', \'fr:Incroyable\' ]\\n```\\n\\nThe indices for each locale will contain only the tags matching their locale:\\n\\n| Locales | Tags |\\n| ----------------- | ----------------------------------- |\\n| All `fr` locales | `{ \\"label_names\\": [\\"Incroyable\\"] }` |\\n| `en-gb` | `{ label_names: [\\"Good\\"] }` |\\n| Other `en` locales, for example, `en-us` | `{ \\"label_names\\": [\\"Awesome\\"] }` |\\n| All other locales | `{ label_names: [\\"Wow\\"] }` |\\n","code":"var Component=(()=>{var d=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var m=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports),b=(r,n)=>{for(var i in n)s(r,i,{get:n[i],enumerable:!0})},t=(r,n,i,a)=>{if(n&&typeof n==\\"object\\"||typeof n==\\"function\\")for(let l of u(n))!f.call(r,l)&&l!==i&&s(r,l,{get:()=>n[l],enumerable:!(a=g(n,l))||a.enumerable});return r};var _=(r,n,i)=>(i=r!=null?d(p(r)):{},t(n||!r||!r.__esModule?s(i,\\"default\\",{value:r,enumerable:!0}):i,r)),S=r=>t(s({},\\"__esModule\\",{value:!0}),r);var o=m((z,c)=>{c.exports=_jsx_runtime});var F={};b(F,{default:()=>x,frontmatter:()=>y});var e=_(o()),y={navigation:\\"zendesk\\",title:\\"Localization\\",description:\\"The Algolia integration for Zendesk supports help centers in many languages.\\",slug:\\"integration/zendesk/localization\\"};function h(r){let n=Object.assign({p:\\"p\\",h2:\\"h2\\",em:\\"em\\",ul:\\"ul\\",li:\\"li\\",strong:\\"strong\\",code:\\"code\\",a:\\"a\\",pre:\\"pre\\"},r.components);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.p,{children:`The Algolia integration for Zendesk supports help centers with multiple languages.\\nUsers see the results in the language they select.`}),`\\n`,(0,e.jsx)(n.h2,{id:\\"supported-languages\\",children:\\"Supported languages\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[\\"The Algolia integration supports these languages \\",(0,e.jsx)(n.em,{children:\\"(locales)\\"}),\\":\\"]}),`\\n`,(0,e.jsxs)(n.ul,{children:[`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ar\\"}),\\": \\\\u0627\\\\u0644\\\\u0639\\\\u0631\\\\u0628\\\\u064A\\\\u0629 / Arabic\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ar-eg\\"}),\\": \\\\u0627\\\\u0644\\\\u0639\\\\u0631\\\\u0628\\\\u064A\\\\u0629 (\\\\u0645\\\\u0635\\\\u0631) / Arabic (Egypt)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"bg\\"}),\\": \\\\u0411\\\\u044A\\\\u043B\\\\u0433\\\\u0430\\\\u0440\\\\u0441\\\\u043A\\\\u0438 / Bulgarian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"cs\\"}),\\": \\\\u010Ce\\\\u0161tina / Czech\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"da\\"}),\\": Dansk / Danish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"de\\"}),\\": Deutsch / German\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"de-at\\"}),\\": Deutsch (\\\\xD6sterreich) / German (Austria)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"de-ch\\"}),\\": Deutsch (Schweiz) / German (Switzerland)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"el\\"}),\\": \\\\u0395\\\\u03BB\\\\u03BB\\\\u03B7\\\\u03BD\\\\u03B9\\\\u03BA\\\\u03AC / Greek\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-au\\"}),\\": English (Australia)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-ca\\"}),\\": English (Canada)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-gb\\"}),\\": English (Great Britain)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-ie\\"}),\\": English (Ireland)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-us\\"}),\\": English (United States)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"en-150\\"}),\\": English (Europe)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es\\"}),\\": Espa\\\\xF1ol / Spanish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es-es\\"}),\\": Espa\\\\xF1ol (Espa\\\\xF1a) / Spanish (Spain)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es-mx\\"}),\\": Espa\\\\xF1ol (Mexico) / Spanish (Mexico)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"es-419\\"}),\\": Espa\\\\xF1ol (Latinoam\\\\xE9rica) / Spanish (Latin America)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fi\\"}),\\": Suomi / Finnish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr\\"}),\\": Fran\\\\xE7ais / French\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-be\\"}),\\": Fran\\\\xE7ais (Belgique) / French (Belgium)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-ca\\"}),\\": Fran\\\\xE7ais (Canada) / French (Canada)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-ch\\"}),\\": Fran\\\\xE7ais (Suisse) / French (Switzerland)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"fr-fr\\"}),\\": Fran\\\\xE7ais (France) / French (France)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"hu\\"}),\\": Magyar / Hungarian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"id\\"}),\\": Bahasa Indonesia / Indonesian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"it\\"}),\\": Italiano / Italian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ja\\"}),\\": \\\\u65E5\\\\u672C\\\\u8A9E / Japanese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ko\\"}),\\": \\\\uD55C\\\\uAD6D\\\\uC5B4 / Korean\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"nl\\"}),\\": Nederlands / Dutch\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"nl-be\\"}),\\": Nederlands (Belgi\\\\xEB) / Dutch (Belgium)\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"no\\"}),\\": Norsk / Norwegian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"pl\\"}),\\": Polski / Polish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"pt\\"}),\\": Portugu\\\\xEAs / Portuguese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"pt-br\\"}),\\": Portugu\\\\xEAs do Brasil / Brazilian Portuguese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ro\\"}),\\": Rom\\\\xE2n\\\\u0103 / Romanian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"ru\\"}),\\": \\\\u0420\\\\u0443\\\\u0441\\\\u0441\\\\u043A\\\\u0438\\\\u0439 / Russian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"sk\\"}),\\": Sloven\\\\u010Dina / Slovak\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"sv\\"}),\\": Svenska / Swedish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"th\\"}),\\": \\\\u0E44\\\\u0E17\\\\u0E22 / Thai\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"tr\\"}),\\": T\\\\xFCrk\\\\xE7e / Turkish\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"uk\\"}),\\": \\\\u0423\\\\u043A\\\\u0440\\\\u0430\\\\u0457\\\\u043D\\\\u0441\\\\u044C\\\\u043A\\\\u0430 / Ukrainian\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"vi\\"}),\\": Ti\\\\u1EBFng Vi\\\\u1EC7t / Vietnamese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"zh-cn\\"}),\\": \\\\u7B80\\\\u4F53\\\\u4E2D\\\\u6587 / Simplified Chinese\\"]}),`\\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.strong,{children:\\"zh-tw\\"}),\\": \\\\u7E41\\\\u9AD4\\\\u4E2D\\\\u6587 / Traditional Chinese\\"]}),`\\n`]}),`\\n`,(0,e.jsx)(n.h2,{id:\\"update-translated-strings\\",children:\\"Update translated strings\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[`If you want to update some translations,\\nedit the `,(0,e.jsx)(n.code,{children:\\"translation\\"}),\\" object in the \\",(0,e.jsx)(n.a,{href:\\"/integration/zendesk/theming/\\",children:(0,e.jsx)(n.code,{children:\\"algoliasearchZendeskHC\\"})}),\\" function.\\"]}),`\\n`,(0,e.jsx)(n.p,{children:\\"For example:\\"}),`\\n`,(0,e.jsx)(n.pre,{children:(0,e.jsx)(n.code,{className:\\"language-javascript\\",children:`translations: {\\n placeholder: {\\n de: \'In unserem Help Center suchen\',\\n \'en-us\': \'Search in our Help Center\',\\n fr: \'Recherchez dans notre Help Center\'\\n }\\n}\\n`})}),`\\n`,(0,e.jsx)(n.h2,{id:\\"reference-of-translatable-strings\\",children:\\"Reference of translatable strings\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[\\"The following code lists all available translatable strings with the default values for the \\",(0,e.jsx)(n.code,{children:\\"en-US\\"}),\\" locale:\\"]}),`\\n`,(0,e.jsx)(n.pre,{children:(0,e.jsx)(n.code,{className:\\"language-javascript\\",children:`translations: {\\n categories: {\\n \'en-us\': \'Categories\'\\n },\\n change_query: {\\n \'en-us\': \'Change your query\'\\n },\\n clear_filters: {\\n \'en-us\': \'clear your filters\'\\n },\\n format_number: {\\n \'en-us\': function (n) { return n.toString().replace(/\\\\\\\\B(?=(\\\\\\\\d{3})+(?!\\\\\\\\d))/g, \',\'); }\\n },\\n filter: {\\n \'en-us\': \'Filter results\'\\n },\\n nb_results: {\\n \'en-us\': function (nb) {\\n return this.format_number(nb) + \' result\' + (nb > 1 ? \'s\' : \'\');\\n }\\n },\\n no_result_for: {\\n \'en-us\': function (query) {\\n return \'No result found for \' + this.quoted(query);\\n }\\n },\\n no_result_actions: {\\n \'en-us\': function () {\\n return this.change_query + \' or \' + this.clear_filters;\\n }\\n },\\n placeholder: {\\n \'en-us\': \'Search in our articles\'\\n },\\n quoted: {\\n \'en-us\': function (text) { return \'\\"\' + escapeHTML(text) + \'\\"\'; }\\n },\\n stats: {\\n \'en-us\': function (nbHits, processing) {\\n return this.nb_results(nbHits) + \' found in \' + processing + \' ms\';\\n }\\n },\\n search_by_algolia: {\\n \'en-us\': function (algolia) { return \'Search by \' + algolia; }\\n },\\n tags: {\\n \'en-us\': \'Tags\'\\n }\\n}\\n`})}),`\\n`,(0,e.jsx)(n.h2,{id:\\"localized-tags\\",children:\\"Localized tags\\"}),`\\n`,(0,e.jsx)(n.p,{children:`You can prefix your tags with a locale, separated by a colon.\\nFor example, if the tags of an article are:`}),`\\n`,(0,e.jsx)(n.pre,{children:(0,e.jsx)(n.code,{className:\\"language-javascript\\",children:`[ \'Wow\', \'en:Awesome\', \'en-gb:Good\', \'fr:Incroyable\' ]\\n`})}),`\\n`,(0,e.jsx)(n.p,{children:\\"The indices for each locale will contain only the tags matching their locale:\\"}),`\\n`,(0,e.jsxs)(n.p,{children:[`| Locales | Tags |\\n| ----------------- | ----------------------------------- |\\n| All `,(0,e.jsx)(n.code,{children:\\"fr\\"}),\\" locales | \\",(0,e.jsx)(n.code,{children:\'{ \\"label_names\\": [\\"Incroyable\\"] }\'}),` |\\n| `,(0,e.jsx)(n.code,{children:\\"en-gb\\"}),\\" | \\",(0,e.jsx)(n.code,{children:\'{ label_names: [\\"Good\\"] }\'}),` |\\n| Other `,(0,e.jsx)(n.code,{children:\\"en\\"}),\\" locales, for example, \\",(0,e.jsx)(n.code,{children:\\"en-us\\"}),\\" | \\",(0,e.jsx)(n.code,{children:\'{ \\"label_names\\": [\\"Awesome\\"] }\'}),` |\\n| All other locales | `,(0,e.jsx)(n.code,{children:\'{ label_names: [\\"Wow\\"] }\'}),\\" |\\"]})]})}function k(r={}){let{wrapper:n}=r.components||{};return n?(0,e.jsx)(n,Object.assign({},r,{children:(0,e.jsx)(h,r)})):h(r)}var x=k;return S(F);})();\\n;return Component;"},"_id":"pages/integration/zendesk/localization.mdx","_raw":{"sourceFilePath":"pages/integration/zendesk/localization.mdx","sourceFileName":"localization.mdx","sourceFileDir":"pages/integration/zendesk","contentType":"mdx","flattenedPath":"pages/integration/zendesk/localization"},"type":"Doc"}]'));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/next-30498/1/input.js | JavaScript | export function string_create() {
return new StringSchema();
}
export class StringSchema extends BaseSchema {
matches(regex, options) {
let excludeEmptyString = false;
let message;
let name;
if (options) {
if (typeof options === "object") {
({ excludeEmptyString = false, message, name } = options);
} else {
message = options;
}
}
return this.test({
name: name || "matches",
message: message || string.matches,
params: {
regex,
},
test: (value) =>
isAbsent(value) ||
(value === "" && excludeEmptyString) ||
value.search(regex) !== -1,
});
}
}
string_create.prototype = StringSchema.prototype;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/next-30498/1/output.js | JavaScript | export function string_create(){return new StringSchema}export class StringSchema extends BaseSchema{matches(e,t){let s,r,a=!1;return t&&("object"==typeof t?{excludeEmptyString:a=!1,message:s,name:r}=t:s=t),this.test({name:r||"matches",message:s||string.matches,params:{regex:e},test:t=>isAbsent(t)||""===t&&a||-1!==t.search(e)})}}string_create.prototype=StringSchema.prototype;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/05f3b568bfaa8ece7f1eb857ea288eb8c696fb04/input.js | JavaScript | []({
c() {
a({
c() {
return b;
},
});
},
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/05f3b568bfaa8ece7f1eb857ea288eb8c696fb04/output.js | JavaScript | []({c(){a({c:()=>b})}});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/07135b51c260c4d625d923239df66176ae42be80/input.js | JavaScript | [](function () {
var a = function () {
a = {};
};
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/07135b51c260c4d625d923239df66176ae42be80/output.js | JavaScript | [](function(){});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/1307ecae57445459527af71fb229e8ed8213bad9/input.js | JavaScript | [](function () {
(function () {
a = { b: { c: { "": { d: "Az̧ Z̧a‘āyin" } } } };
})();
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/1307ecae57445459527af71fb229e8ed8213bad9/output.js | JavaScript | [](function(){a={b:{c:{"":{d:"Az̧ Z̧a‘āyin"}}}}});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/183435826ca7dac36bdd1f6e603ba738fc710a1b/input.js | JavaScript | [](function () {
(function () {
a;
})(function () {});
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/183435826ca7dac36bdd1f6e603ba738fc710a1b/output.js | JavaScript | [](function(){a});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/24ba4747cd0b1c8200a359bc28b0040cc47a3f09/input.js | JavaScript | []({
a() {
window;
},
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/24ba4747cd0b1c8200a359bc28b0040cc47a3f09/output.js | JavaScript | []({a(){window}});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/34c8af5de1b84b8283dbd651a03571c7f243e8b2/input.js | JavaScript | []({
d() {
var a = b,
c = b;
a(c);
},
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/34c8af5de1b84b8283dbd651a03571c7f243e8b2/output.js | JavaScript | []({d(){b(b)}});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/36260571a27136b062437bddc1782e84b71055f6/input.js | JavaScript | []({
a() {
b({
c: {
c: d
? {
c: {
e: ". We\u2019re working to bring this to a frameworks soon.",
},
}
: 0,
},
});
},
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/36260571a27136b062437bddc1782e84b71055f6/output.js | JavaScript | []({a(){b({c:{c:d?{c:{e:". We’re working to bring this to a frameworks soon."}}:0}})}});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/37f0ab9950257024a9116d933f4ad3c72b88471e/input.js | JavaScript | [](function () {
var a = function () {
a[b];
};
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/37f0ab9950257024a9116d933f4ad3c72b88471e/output.js | JavaScript | [](function(){});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/39ee86af2a2157bccd42915ff69b6d3abff2b725/input.js | JavaScript | [
{
3: (function () {
function a() {
b;
}
c(a);
})(),
},
];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/39ee86af2a2157bccd42915ff69b6d3abff2b725/output.js | JavaScript | c(function(){b});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/3a405a6fe7e6e52e8e46ad447ea34ed3bb2c89a8/input.js | JavaScript | [](function () {
function a() {
b = a;
}
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/full/size/3a405a6fe7e6e52e8e46ad447ea34ed3bb2c89a8/output.js | JavaScript | [](function(){});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.