diff --git a/crates/swc_ecma_minifier/src/compress/mod.rs b/crates/swc_ecma_minifier/src/compress/mod.rs index 30c1ac3cdda3..01eda3c681f9 100644 --- a/crates/swc_ecma_minifier/src/compress/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/mod.rs @@ -28,7 +28,7 @@ use crate::{ compress::hoist_decls::decl_hoister, debug::{dump, AssertValid}, mode::Mode, - option::CompressOptions, + option::{CompressOptions, MangleOptions}, program_data::{analyze, ProgramData}, util::{now, unit::CompileUnit}, }; @@ -41,6 +41,7 @@ mod util; pub(crate) fn compressor<'a, M>( marks: Marks, options: &'a CompressOptions, + mangle_options: Option<&'a MangleOptions>, mode: &'a M, ) -> impl 'a + VisitMut where @@ -49,6 +50,7 @@ where let compressor = Compressor { marks, options, + mangle_options, changed: false, pass: 1, dump_for_infinite_loop: Default::default(), @@ -70,6 +72,7 @@ where struct Compressor<'a> { marks: Marks, options: &'a CompressOptions, + mangle_options: Option<&'a MangleOptions>, changed: bool, pass: usize, @@ -269,6 +272,7 @@ impl Compressor<'_> { let mut visitor = optimizer( self.marks, self.options, + self.mangle_options, &mut data, self.mode, !self.dump_for_infinite_loop.is_empty(), diff --git a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs index 6950cf2e0470..3851696b9110 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs @@ -203,6 +203,14 @@ impl Optimizer<'_> { ) } + if u.declared_as_fn_decl || u.declared_as_fn_expr { + if self.options.keep_fnames + || self.mangle_options.map_or(false, |v| v.keep_fn_names) + { + should_inline = false + } + } + should_inline } else { false @@ -411,6 +419,14 @@ impl Optimizer<'_> { if init_usage.reassigned || !init_usage.declared { return; } + + if init_usage.declared_as_fn_decl || init_usage.declared_as_fn_expr { + if self.options.keep_fnames + || self.mangle_options.map_or(false, |v| v.keep_fn_names) + { + return; + } + } } } diff --git a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs index feaf1d969b6f..d66b1c337fb8 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs @@ -30,7 +30,7 @@ use crate::{ debug::AssertValid, maybe_par, mode::Mode, - option::CompressOptions, + option::{CompressOptions, MangleOptions}, program_data::ProgramData, util::{ contains_eval, contains_leaping_continue_with_label, make_number, ExprOptExt, ModuleItemExt, @@ -59,6 +59,7 @@ mod util; pub(super) fn optimizer<'a>( marks: Marks, options: &'a CompressOptions, + mangle_options: Option<&'a MangleOptions>, data: &'a mut ProgramData, mode: &'a dyn Mode, debug_infinite_loop: bool, @@ -82,6 +83,7 @@ pub(super) fn optimizer<'a>( }, changed: false, options, + mangle_options, prepend_stmts: Default::default(), append_stmts: Default::default(), vars: Default::default(), @@ -197,6 +199,7 @@ struct Optimizer<'a> { changed: bool, options: &'a CompressOptions, + mangle_options: Option<&'a MangleOptions>, /// Statements prepended to the current statement. prepend_stmts: SynthesizedStmts, /// Statements appended to the current statement. diff --git a/crates/swc_ecma_minifier/src/eval.rs b/crates/swc_ecma_minifier/src/eval.rs index 26422b959f29..67137351cefd 100644 --- a/crates/swc_ecma_minifier/src/eval.rs +++ b/crates/swc_ecma_minifier/src/eval.rs @@ -87,6 +87,7 @@ impl Evaluator { top_level: Some(TopLevelOptions { functions: true }), ..Default::default() }, + None, &data, )); } diff --git a/crates/swc_ecma_minifier/src/lib.rs b/crates/swc_ecma_minifier/src/lib.rs index 31d4b3fa56ce..b9c37c90126a 100644 --- a/crates/swc_ecma_minifier/src/lib.rs +++ b/crates/swc_ecma_minifier/src/lib.rs @@ -178,25 +178,30 @@ pub fn optimize( if let Some(ref mut t) = timings { t.section("compress"); } - if let Some(options) = &options.compress { + if let Some(c) = &options.compress { { let _timer = timer!("compress ast"); - n.visit_mut_with(&mut compressor(marks, options, &Minification)) + n.visit_mut_with(&mut compressor( + marks, + c, + options.mangle.as_ref(), + &Minification, + )) } // Again, we don't need to validate ast let _timer = timer!("postcompress"); - n.visit_mut_with(&mut postcompress_optimizer(options)); + n.visit_mut_with(&mut postcompress_optimizer(c)); let mut pass = 0; loop { pass += 1; let mut v = pure_optimizer( - options, + c, None, marks, PureOptimizerConfig { @@ -207,7 +212,7 @@ pub fn optimize( }, ); n.visit_mut_with(&mut v); - if !v.changed() || options.passes <= pass { + if !v.changed() || c.passes <= pass { break; } } diff --git a/crates/swc_ecma_minifier/tests/fixture/next/31077/static/chunks/1606726a.10299989c08cb523/output.js b/crates/swc_ecma_minifier/tests/fixture/next/31077/static/chunks/1606726a.10299989c08cb523/output.js index ec4f823aaf50..88dace59c31d 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/31077/static/chunks/1606726a.10299989c08cb523/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/31077/static/chunks/1606726a.10299989c08cb523/output.js @@ -234,27 +234,27 @@ configurable: !0 } }; - ViewDesc.prototype.matchesWidget = function() { + ViewDesc.prototype.matchesWidget = function matchesWidget() { return !1; - }, ViewDesc.prototype.matchesMark = function() { + }, ViewDesc.prototype.matchesMark = function matchesMark() { return !1; - }, ViewDesc.prototype.matchesNode = function() { + }, ViewDesc.prototype.matchesNode = function matchesNode() { return !1; - }, ViewDesc.prototype.matchesHack = function(_nodeName) { + }, ViewDesc.prototype.matchesHack = function matchesHack(_nodeName) { return !1; - }, ViewDesc.prototype.parseRule = function() { + }, ViewDesc.prototype.parseRule = function parseRule() { return null; - }, ViewDesc.prototype.stopEvent = function() { + }, ViewDesc.prototype.stopEvent = function stopEvent() { return !1; }, prototypeAccessors.size.get = function() { for(var size = 0, i = 0; i < this.children.length; i++)size += this.children[i].size; return size; }, prototypeAccessors.border.get = function() { return 0; - }, ViewDesc.prototype.destroy = function() { + }, ViewDesc.prototype.destroy = function destroy() { this.parent = null, this.dom.pmViewDesc == this && (this.dom.pmViewDesc = null); for(var i = 0; i < this.children.length; i++)this.children[i].destroy(); - }, ViewDesc.prototype.posBeforeChild = function(child) { + }, ViewDesc.prototype.posBeforeChild = function posBeforeChild(child) { for(var i = 0, pos = this.posAtStart; i < this.children.length; i++){ var cur = this.children[i]; if (cur == child) return pos; @@ -268,7 +268,7 @@ return this.posBefore + this.size; }, prototypeAccessors.posAtEnd.get = function() { return this.posAtStart + this.size - 2 * this.border; - }, ViewDesc.prototype.localPosFromDOM = function(dom, offset, bias) { + }, ViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset, bias) { if (this.contentDOM && this.contentDOM.contains(1 == dom.nodeType ? dom : dom.parentNode)) { if (bias < 0) { if (dom == this.contentDOM) domBefore = dom.childNodes[offset - 1]; @@ -306,7 +306,7 @@ } } return (null == atEnd ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart; - }, ViewDesc.prototype.nearestDesc = function(dom, onlyNodes) { + }, ViewDesc.prototype.nearestDesc = function nearestDesc(dom, onlyNodes) { for(var first = !0, cur = dom; cur; cur = cur.parentNode){ var desc = this.getDesc(cur); if (desc && (!onlyNodes || desc.node)) { @@ -314,15 +314,15 @@ first = !1; } } - }, ViewDesc.prototype.getDesc = function(dom) { + }, ViewDesc.prototype.getDesc = function getDesc(dom) { for(var desc = dom.pmViewDesc, cur = desc; cur; cur = cur.parent)if (cur == this) return desc; - }, ViewDesc.prototype.posFromDOM = function(dom, offset, bias) { + }, ViewDesc.prototype.posFromDOM = function posFromDOM(dom, offset, bias) { for(var scan = dom; scan; scan = scan.parentNode){ var desc = this.getDesc(scan); if (desc) return desc.localPosFromDOM(dom, offset, bias); } return -1; - }, ViewDesc.prototype.descAt = function(pos) { + }, ViewDesc.prototype.descAt = function descAt(pos) { for(var i = 0, offset = 0; i < this.children.length; i++){ var child = this.children[i], end = offset + child.size; if (offset == pos && end != offset) { @@ -332,7 +332,7 @@ if (pos < end) return child.descAt(pos - offset - child.border); offset = end; } - }, ViewDesc.prototype.domFromPos = function(pos, side) { + }, ViewDesc.prototype.domFromPos = function domFromPos(pos, side) { if (!this.contentDOM) return { node: this.dom, offset: 0 @@ -359,7 +359,7 @@ node: this.contentDOM, offset: next ? domIndex(next.dom) : this.contentDOM.childNodes.length }; - }, ViewDesc.prototype.parseRange = function(from, to, base) { + }, ViewDesc.prototype.parseRange = function parseRange(from, to, base) { if (void 0 === base && (base = 0), 0 == this.children.length) return { node: this.contentDOM, from: from, @@ -405,15 +405,15 @@ fromOffset: fromOffset, toOffset: toOffset }; - }, ViewDesc.prototype.emptyChildAt = function(side) { + }, ViewDesc.prototype.emptyChildAt = function emptyChildAt(side) { if (this.border || !this.contentDOM || !this.children.length) return !1; var child = this.children[side < 0 ? 0 : this.children.length - 1]; return 0 == child.size || child.emptyChildAt(side); - }, ViewDesc.prototype.domAfterPos = function(pos) { + }, ViewDesc.prototype.domAfterPos = function domAfterPos(pos) { var ref = this.domFromPos(pos, 0), node = ref.node, offset = ref.offset; if (1 != node.nodeType || offset == node.childNodes.length) throw RangeError("No node after pos " + pos); return node.childNodes[offset]; - }, ViewDesc.prototype.setSelection = function(anchor, head, root, force) { + }, ViewDesc.prototype.setSelection = function setSelection(anchor, head, root, force) { for(var from = Math.min(anchor, head), to = Math.max(anchor, head), i = 0, offset = 0; i < this.children.length; i++){ var child = this.children[i], end = offset + child.size; if (from > offset && to < end) return child.setSelection(anchor - offset - child.border, head - offset - child.border, root, force); @@ -462,11 +462,11 @@ range.setEnd(headDOM.node, headDOM.offset), range.setStart(anchorDOM.node, anchorDOM.offset), domSel.removeAllRanges(), domSel.addRange(range); } } - }, ViewDesc.prototype.ignoreMutation = function(mutation) { + }, ViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) { return !this.contentDOM && "selection" != mutation.type; }, prototypeAccessors.contentLost.get = function() { return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM); - }, ViewDesc.prototype.markDirty = function(from, to) { + }, ViewDesc.prototype.markDirty = function markDirty(from, to) { for(var offset = 0, i = 0; i < this.children.length; i++){ var child = this.children[i], end = offset + child.size; if (offset == end ? from <= end && to >= offset : from < end && to > offset) { @@ -480,7 +480,7 @@ offset = end; } this.dirty = 2; - }, ViewDesc.prototype.markParentsDirty = function() { + }, ViewDesc.prototype.markParentsDirty = function markParentsDirty() { for(var level = 1, node = this.parent; node; node = node.parent, level++){ var dirty = 1 == level ? 2 : 1; node.dirty < dirty && (node.dirty = dirty); @@ -510,16 +510,16 @@ configurable: !0 } }; - return WidgetViewDesc.prototype.matchesWidget = function(widget) { + return WidgetViewDesc.prototype.matchesWidget = function matchesWidget(widget) { return 0 == this.dirty && widget.type.eq(this.widget.type); - }, WidgetViewDesc.prototype.parseRule = function() { + }, WidgetViewDesc.prototype.parseRule = function parseRule() { return { ignore: !0 }; - }, WidgetViewDesc.prototype.stopEvent = function(event) { + }, WidgetViewDesc.prototype.stopEvent = function stopEvent(event) { var stop = this.widget.spec.stopEvent; return !!stop && stop(event); - }, WidgetViewDesc.prototype.ignoreMutation = function(mutation) { + }, WidgetViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) { return "selection" != mutation.type || this.widget.spec.ignoreSelection; }, prototypeAccessors$1.domAtom.get = function() { return !0; @@ -536,37 +536,37 @@ }; return prototypeAccessors$2.size.get = function() { return this.text.length; - }, CompositionViewDesc.prototype.localPosFromDOM = function(dom, offset) { + }, CompositionViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset) { return dom != this.textDOM ? this.posAtStart + (offset ? this.size : 0) : this.posAtStart + offset; - }, CompositionViewDesc.prototype.domFromPos = function(pos) { + }, CompositionViewDesc.prototype.domFromPos = function domFromPos(pos) { return { node: this.textDOM, offset: pos }; - }, CompositionViewDesc.prototype.ignoreMutation = function(mut) { + }, CompositionViewDesc.prototype.ignoreMutation = function ignoreMutation(mut) { return "characterData" === mut.type && mut.target.nodeValue == mut.oldValue; }, Object.defineProperties(CompositionViewDesc.prototype, prototypeAccessors$2), CompositionViewDesc; }(ViewDesc), MarkViewDesc = function(ViewDesc) { function MarkViewDesc(parent, mark, dom, contentDOM) { ViewDesc.call(this, parent, [], dom, contentDOM), this.mark = mark; } - return ViewDesc && (MarkViewDesc.__proto__ = ViewDesc), MarkViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype), MarkViewDesc.prototype.constructor = MarkViewDesc, MarkViewDesc.create = function(parent, mark, inline, view) { + return ViewDesc && (MarkViewDesc.__proto__ = ViewDesc), MarkViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype), MarkViewDesc.prototype.constructor = MarkViewDesc, MarkViewDesc.create = function create(parent, mark, inline, view) { var custom = view.nodeViews[mark.type.name], spec = custom && custom(mark, view, inline); return spec && spec.dom || (spec = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__.DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline))), new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom); - }, MarkViewDesc.prototype.parseRule = function() { + }, MarkViewDesc.prototype.parseRule = function parseRule() { return { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM }; - }, MarkViewDesc.prototype.matchesMark = function(mark) { + }, MarkViewDesc.prototype.matchesMark = function matchesMark(mark) { return 3 != this.dirty && this.mark.eq(mark); - }, MarkViewDesc.prototype.markDirty = function(from, to) { + }, MarkViewDesc.prototype.markDirty = function markDirty(from, to) { if (ViewDesc.prototype.markDirty.call(this, from, to), 0 != this.dirty) { for(var parent = this.parent; !parent.node;)parent = parent.parent; parent.dirty < this.dirty && (parent.dirty = this.dirty), this.dirty = 0; } - }, MarkViewDesc.prototype.slice = function(from, to, view) { + }, MarkViewDesc.prototype.slice = function slice(from, to, view) { var copy = MarkViewDesc.create(this.parent, this.mark, !0, view), nodes = this.children, size = this.size; to < size && (nodes = replaceNodes(nodes, to, size, view)), from > 0 && (nodes = replaceNodes(nodes, 0, from, view)); for(var i = 0; i < nodes.length; i++)nodes[i].parent = copy; @@ -588,7 +588,7 @@ configurable: !0 } }; - return NodeViewDesc.create = function(parent, node, outerDeco, innerDeco, view, pos) { + return NodeViewDesc.create = function create(parent, node, outerDeco, innerDeco, view, pos) { var assign, descObj, custom = view.nodeViews[node.type.name], spec = custom && custom(node, view, function() { return descObj ? descObj.parent ? descObj.parent.posBeforeChild(descObj) : void 0 : pos; }, outerDeco, innerDeco), dom = spec && spec.dom, contentDOM = spec && spec.contentDOM; @@ -600,7 +600,7 @@ contentDOM || node.isText || "BR" == dom.nodeName || (dom.hasAttribute("contenteditable") || (dom.contentEditable = !1), node.type.spec.draggable && (dom.draggable = !0)); var nodeDOM = dom; return (dom = applyOuterDeco(dom, outerDeco, node), spec) ? descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos + 1) : node.isText ? new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) : new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos + 1); - }, NodeViewDesc.prototype.parseRule = function() { + }, NodeViewDesc.prototype.parseRule = function parseRule() { var this$1 = this; if (this.node.type.spec.reparseInView) return null; var rule = { @@ -610,13 +610,13 @@ return this.node.type.spec.code && (rule.preserveWhitespace = "full"), this.contentDOM && !this.contentLost ? rule.contentElement = this.contentDOM : rule.getContent = function() { return this$1.contentDOM ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__.Fragment.empty : this$1.node.content; }, rule; - }, NodeViewDesc.prototype.matchesNode = function(node, outerDeco, innerDeco) { + }, NodeViewDesc.prototype.matchesNode = function matchesNode(node, outerDeco, innerDeco) { return 0 == this.dirty && node.eq(this.node) && sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco); }, prototypeAccessors$3.size.get = function() { return this.node.nodeSize; }, prototypeAccessors$3.border.get = function() { return this.node.isLeaf ? 0 : 1; - }, NodeViewDesc.prototype.updateChildren = function(view, pos) { + }, NodeViewDesc.prototype.updateChildren = function updateChildren(view, pos) { var this$1 = this, inline = this.node.inlineContent, off = pos, composition = view.composing && this.localCompositionInfo(view, pos), localComposition = composition && composition.pos > -1 ? composition : null, compositionInChild = composition && composition.pos < 0, updater = new ViewTreeUpdater(this, localComposition && localComposition.node); (function(parent, deco, onWidget, onNode) { var locals = deco.locals(parent), offset = 0; @@ -680,7 +680,7 @@ dom.style.cssText = oldCSS + "; list-style: square !important", window.getComputedStyle(dom).listStyle, dom.style.cssText = oldCSS; } }(this.dom)); - }, NodeViewDesc.prototype.localCompositionInfo = function(view, pos) { + }, NodeViewDesc.prototype.localCompositionInfo = function localCompositionInfo(view, pos) { var ref = view.state.selection, from = ref.from, to = ref.to; if (view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__.TextSelection && !(from < pos) && !(to > pos + this.node.content.size)) { var sel = view.root.getSelection(), textNode = function(node, offset) { @@ -724,7 +724,7 @@ }; } } - }, NodeViewDesc.prototype.protectLocalComposition = function(view, ref) { + }, NodeViewDesc.prototype.protectLocalComposition = function protectLocalComposition(view, ref) { var node = ref.node, pos = ref.pos, text = ref.text; if (!this.getDesc(node)) { for(var topNode = node; topNode.parentNode != this.contentDOM; topNode = topNode.parentNode){ @@ -735,18 +735,18 @@ var desc = new CompositionViewDesc(this, topNode, node, text); view.compositionNodes.push(desc), this.children = replaceNodes(this.children, pos, pos + text.length, view, desc); } - }, NodeViewDesc.prototype.update = function(node, outerDeco, innerDeco, view) { + }, NodeViewDesc.prototype.update = function update(node, outerDeco, innerDeco, view) { return !!(3 != this.dirty && node.sameMarkup(this.node)) && (this.updateInner(node, outerDeco, innerDeco, view), !0); - }, NodeViewDesc.prototype.updateInner = function(node, outerDeco, innerDeco, view) { + }, NodeViewDesc.prototype.updateInner = function updateInner(node, outerDeco, innerDeco, view) { this.updateOuterDeco(outerDeco), this.node = node, this.innerDeco = innerDeco, this.contentDOM && this.updateChildren(view, this.posAtStart), this.dirty = 0; - }, NodeViewDesc.prototype.updateOuterDeco = function(outerDeco) { + }, NodeViewDesc.prototype.updateOuterDeco = function updateOuterDeco(outerDeco) { if (!sameOuterDeco(outerDeco, this.outerDeco)) { var needsWrap = 1 != this.nodeDOM.nodeType, oldDOM = this.dom; this.dom = patchOuterDeco(this.dom, this.nodeDOM, computeOuterDeco(this.outerDeco, this.node, needsWrap), computeOuterDeco(outerDeco, this.node, needsWrap)), this.dom != oldDOM && (oldDOM.pmViewDesc = null, this.dom.pmViewDesc = this), this.outerDeco = outerDeco; } - }, NodeViewDesc.prototype.selectNode = function() { + }, NodeViewDesc.prototype.selectNode = function selectNode() { this.nodeDOM.classList.add("ProseMirror-selectednode"), (this.contentDOM || !this.node.type.spec.draggable) && (this.dom.draggable = !0); - }, NodeViewDesc.prototype.deselectNode = function() { + }, NodeViewDesc.prototype.deselectNode = function deselectNode() { this.nodeDOM.classList.remove("ProseMirror-selectednode"), (this.contentDOM || !this.node.type.spec.draggable) && this.dom.removeAttribute("draggable"); }, prototypeAccessors$3.domAtom.get = function() { return this.node.isAtom; @@ -765,29 +765,29 @@ configurable: !0 } }; - return TextViewDesc.prototype.parseRule = function() { + return TextViewDesc.prototype.parseRule = function parseRule() { for(var skip = this.nodeDOM.parentNode; skip && skip != this.dom && !skip.pmIsDeco;)skip = skip.parentNode; return { skip: skip || !0 }; - }, TextViewDesc.prototype.update = function(node, outerDeco, _, view) { + }, TextViewDesc.prototype.update = function update(node, outerDeco, _, view) { return !!(3 != this.dirty && (0 == this.dirty || this.inParent()) && node.sameMarkup(this.node)) && (this.updateOuterDeco(outerDeco), (0 != this.dirty || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = node.text, view.trackWrites == this.nodeDOM && (view.trackWrites = null)), this.node = node, this.dirty = 0, !0); - }, TextViewDesc.prototype.inParent = function() { + }, TextViewDesc.prototype.inParent = function inParent() { for(var parentDOM = this.parent.contentDOM, n = this.nodeDOM; n; n = n.parentNode)if (n == parentDOM) return !0; return !1; - }, TextViewDesc.prototype.domFromPos = function(pos) { + }, TextViewDesc.prototype.domFromPos = function domFromPos(pos) { return { node: this.nodeDOM, offset: pos }; - }, TextViewDesc.prototype.localPosFromDOM = function(dom, offset, bias) { + }, TextViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset, bias) { return dom == this.nodeDOM ? this.posAtStart + Math.min(offset, this.node.text.length) : NodeViewDesc.prototype.localPosFromDOM.call(this, dom, offset, bias); - }, TextViewDesc.prototype.ignoreMutation = function(mutation) { + }, TextViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) { return "characterData" != mutation.type && "selection" != mutation.type; - }, TextViewDesc.prototype.slice = function(from, to, view) { + }, TextViewDesc.prototype.slice = function slice(from, to, view) { var node = this.node.cut(from, to), dom = document.createTextNode(node.text); return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom, view); - }, TextViewDesc.prototype.markDirty = function(from, to) { + }, TextViewDesc.prototype.markDirty = function markDirty(from, to) { NodeViewDesc.prototype.markDirty.call(this, from, to), this.dom != this.nodeDOM && (0 == from || to == this.nodeDOM.nodeValue.length) && (this.dirty = 3); }, prototypeAccessors$4.domAtom.get = function() { return !1; @@ -805,11 +805,11 @@ configurable: !0 } }; - return TrailingHackViewDesc.prototype.parseRule = function() { + return TrailingHackViewDesc.prototype.parseRule = function parseRule() { return { ignore: !0 }; - }, TrailingHackViewDesc.prototype.matchesHack = function(nodeName) { + }, TrailingHackViewDesc.prototype.matchesHack = function matchesHack(nodeName) { return 0 == this.dirty && this.dom.nodeName == nodeName; }, prototypeAccessors$5.domAtom.get = function() { return !0; @@ -820,24 +820,24 @@ function CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) { NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos), this.spec = spec; } - return NodeViewDesc && (CustomNodeViewDesc.__proto__ = NodeViewDesc), CustomNodeViewDesc.prototype = Object.create(NodeViewDesc && NodeViewDesc.prototype), CustomNodeViewDesc.prototype.constructor = CustomNodeViewDesc, CustomNodeViewDesc.prototype.update = function(node, outerDeco, innerDeco, view) { + return NodeViewDesc && (CustomNodeViewDesc.__proto__ = NodeViewDesc), CustomNodeViewDesc.prototype = Object.create(NodeViewDesc && NodeViewDesc.prototype), CustomNodeViewDesc.prototype.constructor = CustomNodeViewDesc, CustomNodeViewDesc.prototype.update = function update(node, outerDeco, innerDeco, view) { if (3 == this.dirty) return !1; if (this.spec.update) { var result = this.spec.update(node, outerDeco, innerDeco); return result && this.updateInner(node, outerDeco, innerDeco, view), result; } return (!!this.contentDOM || !!node.isLeaf) && NodeViewDesc.prototype.update.call(this, node, outerDeco, innerDeco, view); - }, CustomNodeViewDesc.prototype.selectNode = function() { + }, CustomNodeViewDesc.prototype.selectNode = function selectNode() { this.spec.selectNode ? this.spec.selectNode() : NodeViewDesc.prototype.selectNode.call(this); - }, CustomNodeViewDesc.prototype.deselectNode = function() { + }, CustomNodeViewDesc.prototype.deselectNode = function deselectNode() { this.spec.deselectNode ? this.spec.deselectNode() : NodeViewDesc.prototype.deselectNode.call(this); - }, CustomNodeViewDesc.prototype.setSelection = function(anchor, head, root, force) { + }, CustomNodeViewDesc.prototype.setSelection = function setSelection(anchor, head, root, force) { this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : NodeViewDesc.prototype.setSelection.call(this, anchor, head, root, force); - }, CustomNodeViewDesc.prototype.destroy = function() { + }, CustomNodeViewDesc.prototype.destroy = function destroy() { this.spec.destroy && this.spec.destroy(), NodeViewDesc.prototype.destroy.call(this); - }, CustomNodeViewDesc.prototype.stopEvent = function(event) { + }, CustomNodeViewDesc.prototype.stopEvent = function stopEvent(event) { return !!this.spec.stopEvent && this.spec.stopEvent(event); - }, CustomNodeViewDesc.prototype.ignoreMutation = function(mutation) { + }, CustomNodeViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) { return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : NodeViewDesc.prototype.ignoreMutation.call(this, mutation); }, CustomNodeViewDesc; }(NodeViewDesc); @@ -973,14 +973,14 @@ view.domObserver.setCurSelection(), view.domObserver.connectSelection(); } } - ViewTreeUpdater.prototype.destroyBetween = function(start, end) { + ViewTreeUpdater.prototype.destroyBetween = function destroyBetween(start, end) { if (start != end) { for(var i = start; i < end; i++)this.top.children[i].destroy(); this.top.children.splice(start, end - start), this.changed = !0; } - }, ViewTreeUpdater.prototype.destroyRest = function() { + }, ViewTreeUpdater.prototype.destroyRest = function destroyRest() { this.destroyBetween(this.index, this.top.children.length); - }, ViewTreeUpdater.prototype.syncToMarks = function(marks, inline, view) { + }, ViewTreeUpdater.prototype.syncToMarks = function syncToMarks(marks, inline, view) { for(var keep = 0, depth = this.stack.length >> 1, maxKeep = Math.min(depth, marks.length); keep < maxKeep && (keep == depth - 1 ? this.top : this.stack[keep + 1 << 1]).matchesMark(marks[keep]) && !1 !== marks[keep].type.spec.spanning;)keep++; for(; keep < depth;)this.destroyRest(), this.top.dirty = 0, this.index = this.stack.pop(), this.top = this.stack.pop(), depth--; for(; depth < marks.length;){ @@ -996,7 +996,7 @@ } this.index = 0, depth++; } - }, ViewTreeUpdater.prototype.findNodeMatch = function(node, outerDeco, innerDeco, index) { + }, ViewTreeUpdater.prototype.findNodeMatch = function findNodeMatch(node, outerDeco, innerDeco, index) { var children = this.top.children, found = -1; if (index >= this.preMatch.index) { for(var i = this.index; i < children.length; i++)if (children[i].matchesNode(node, outerDeco, innerDeco)) { @@ -1011,9 +1011,9 @@ } } return !(found < 0) && (this.destroyBetween(this.index, found), this.index++, !0); - }, ViewTreeUpdater.prototype.updateNodeAt = function(node, outerDeco, innerDeco, index, view) { + }, ViewTreeUpdater.prototype.updateNodeAt = function updateNodeAt(node, outerDeco, innerDeco, index, view) { return !!this.top.children[index].update(node, outerDeco, innerDeco, view) && (this.destroyBetween(this.index, index), this.index = index + 1, !0); - }, ViewTreeUpdater.prototype.findIndexWithChild = function(domNode) { + }, ViewTreeUpdater.prototype.findIndexWithChild = function findIndexWithChild(domNode) { for(;;){ var parent = domNode.parentNode; if (!parent) return -1; @@ -1026,7 +1026,7 @@ } domNode = parent; } - }, ViewTreeUpdater.prototype.updateNextNode = function(node, outerDeco, innerDeco, view, index) { + }, ViewTreeUpdater.prototype.updateNextNode = function updateNextNode(node, outerDeco, innerDeco, view, index) { for(var i = this.index; i < this.top.children.length; i++){ var next = this.top.children[i]; if (next instanceof NodeViewDesc) { @@ -1038,19 +1038,19 @@ } } return !1; - }, ViewTreeUpdater.prototype.addNode = function(node, outerDeco, innerDeco, view, pos) { + }, ViewTreeUpdater.prototype.addNode = function addNode(node, outerDeco, innerDeco, view, pos) { this.top.children.splice(this.index++, 0, NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos)), this.changed = !0; - }, ViewTreeUpdater.prototype.placeWidget = function(widget, view, pos) { + }, ViewTreeUpdater.prototype.placeWidget = function placeWidget(widget, view, pos) { var next = this.index < this.top.children.length ? this.top.children[this.index] : null; if (next && next.matchesWidget(widget) && (widget == next.widget || !next.widget.type.toDOM.parentNode)) this.index++; else { var desc = new WidgetViewDesc(this.top, widget, view, pos); this.top.children.splice(this.index++, 0, desc), this.changed = !0; } - }, ViewTreeUpdater.prototype.addTextblockHacks = function() { + }, ViewTreeUpdater.prototype.addTextblockHacks = function addTextblockHacks() { for(var lastChild = this.top.children[this.index - 1]; lastChild instanceof MarkViewDesc;)lastChild = lastChild.children[lastChild.children.length - 1]; !(!lastChild || !(lastChild instanceof TextViewDesc) || /\n$/.test(lastChild.node.text)) || ((result.safari || result.chrome) && lastChild && "false" == lastChild.dom.contentEditable && this.addHackNode("IMG"), this.addHackNode("BR")); - }, ViewTreeUpdater.prototype.addHackNode = function(nodeName) { + }, ViewTreeUpdater.prototype.addHackNode = function addHackNode(nodeName) { if (this.index < this.top.children.length && this.top.children[this.index].matchesHack(nodeName)) this.index++; else { var dom = document.createElement(nodeName); @@ -1422,9 +1422,9 @@ }, useCharData = result.ie && result.ie_version <= 11, SelectionState = function() { this.anchorNode = this.anchorOffset = this.focusNode = this.focusOffset = null; }; - SelectionState.prototype.set = function(sel) { + SelectionState.prototype.set = function set(sel) { this.anchorNode = sel.anchorNode, this.anchorOffset = sel.anchorOffset, this.focusNode = sel.focusNode, this.focusOffset = sel.focusOffset; - }, SelectionState.prototype.eq = function(sel) { + }, SelectionState.prototype.eq = function eq(sel) { return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset && sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset; }; var DOMObserver = function(view, handleDOMChange) { @@ -1442,16 +1442,16 @@ }), this$1.flushSoon(); }), this.onSelectionChange = this.onSelectionChange.bind(this), this.suppressingSelectionUpdates = !1; }; - DOMObserver.prototype.flushSoon = function() { + DOMObserver.prototype.flushSoon = function flushSoon() { var this$1 = this; this.flushingSoon < 0 && (this.flushingSoon = window.setTimeout(function() { this$1.flushingSoon = -1, this$1.flush(); }, 20)); - }, DOMObserver.prototype.forceFlush = function() { + }, DOMObserver.prototype.forceFlush = function forceFlush() { this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush()); - }, DOMObserver.prototype.start = function() { + }, DOMObserver.prototype.start = function start() { this.observer && this.observer.observe(this.view.dom, observeOptions), useCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection(); - }, DOMObserver.prototype.stop = function() { + }, DOMObserver.prototype.stop = function stop() { var this$1 = this; if (this.observer) { var take = this.observer.takeRecords(); @@ -1464,16 +1464,16 @@ this.observer.disconnect(); } useCharData && this.view.dom.removeEventListener("DOMCharacterDataModified", this.onCharData), this.disconnectSelection(); - }, DOMObserver.prototype.connectSelection = function() { + }, DOMObserver.prototype.connectSelection = function connectSelection() { this.view.dom.ownerDocument.addEventListener("selectionchange", this.onSelectionChange); - }, DOMObserver.prototype.disconnectSelection = function() { + }, DOMObserver.prototype.disconnectSelection = function disconnectSelection() { this.view.dom.ownerDocument.removeEventListener("selectionchange", this.onSelectionChange); - }, DOMObserver.prototype.suppressSelectionUpdates = function() { + }, DOMObserver.prototype.suppressSelectionUpdates = function suppressSelectionUpdates() { var this$1 = this; this.suppressingSelectionUpdates = !0, setTimeout(function() { return this$1.suppressingSelectionUpdates = !1; }, 50); - }, DOMObserver.prototype.onSelectionChange = function() { + }, DOMObserver.prototype.onSelectionChange = function onSelectionChange() { var view; if ((!(view = this.view).editable || view.root.activeElement == view.dom) && hasSelection(view)) { if (this.suppressingSelectionUpdates) return selectionToDOM(this.view); @@ -1483,16 +1483,16 @@ } this.flush(); } - }, DOMObserver.prototype.setCurSelection = function() { + }, DOMObserver.prototype.setCurSelection = function setCurSelection() { this.currentSelection.set(this.view.root.getSelection()); - }, DOMObserver.prototype.ignoreSelectionChange = function(sel) { + }, DOMObserver.prototype.ignoreSelectionChange = function ignoreSelectionChange(sel) { if (0 == sel.rangeCount) return !0; var container = sel.getRangeAt(0).commonAncestorContainer, desc = this.view.docView.nearestDesc(container); if (desc && desc.ignoreMutation({ type: "selection", target: 3 == container.nodeType ? container.parentNode : container })) return this.setCurSelection(), !0; - }, DOMObserver.prototype.flush = function() { + }, DOMObserver.prototype.flush = function flush() { if (this.view.docView && !(this.flushingSoon > -1)) { var view, mutations = this.observer ? this.observer.takeRecords() : []; this.queue.length && (mutations = this.queue.concat(mutations), this.queue.length = 0); @@ -1512,7 +1512,7 @@ } (from > -1 || newSel) && (from > -1 && (this.view.docView.markDirty(from, to), view = this.view, cssChecked || (cssChecked = !0, "normal" == getComputedStyle(view.dom).whiteSpace && console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))), this.handleDOMChange(from, to, typeOver, added), this.view.docView.dirty ? this.view.updateState(this.view.state) : this.currentSelection.eq(sel) || selectionToDOM(this.view), this.currentSelection.set(sel)); } - }, DOMObserver.prototype.registerMutation = function(mut, added) { + }, DOMObserver.prototype.registerMutation = function registerMutation(mut, added) { if (added.indexOf(mut.target) > -1) return null; var desc = this.view.docView.nearestDesc(mut.target); if ("attributes" == mut.type && (desc == this.view.docView || "contenteditable" == mut.attributeName || "style" == mut.attributeName && !mut.oldValue && !mut.target.getAttribute("style")) || !desc || desc.ignoreMutation(mut)) return null; @@ -1686,12 +1686,12 @@ function inOrNearComposition(view, event) { return !!view.composing || !!(result.safari && 500 > Math.abs(event.timeStamp - view.compositionEndedAt)) && (view.compositionEndedAt = -200000000, !0); } - MouseDown.prototype.done = function() { + MouseDown.prototype.done = function done() { var this$1 = this; this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(function() { return selectionToDOM(this$1.view); }), this.view.mouseDown = null; - }, MouseDown.prototype.up = function(event) { + }, MouseDown.prototype.up = function up(event) { if (this.done(), this.view.dom.contains(3 == event.target.nodeType ? event.target.parentNode : event.target)) { var view, pos, inside, selectNode, pos1 = this.pos; (this.view.state.doc != this.startDoc && (pos1 = this.view.posAtCoords(eventCoords(event))), this.allowDefault || !pos1) ? setSelectionOrigin(this.view, "pointer") : (view = this.view, pos = pos1.pos, inside = pos1.inside, selectNode = this.selectNode, runHandlerOnContext(view, "handleClickOn", pos, inside, event) || view.someProp("handleClick", function(f) { @@ -1714,7 +1714,7 @@ return !!(node && node.isAtom && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__.NodeSelection.isSelectable(node)) && (updateSelection(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__.NodeSelection($pos), "pointer"), !0); }(view, inside))) ? event.preventDefault() : 0 == event.button && (this.flushed || result.safari && this.mightDrag && !this.mightDrag.node.isAtom || result.chrome && !(this.view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__.TextSelection) && 2 >= Math.min(Math.abs(pos1.pos - this.view.state.selection.from), Math.abs(pos1.pos - this.view.state.selection.to))) ? (updateSelection(this.view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__.Selection.near(this.view.state.doc.resolve(pos1.pos)), "pointer"), event.preventDefault()) : setSelectionOrigin(this.view, "pointer"); } - }, MouseDown.prototype.move = function(event) { + }, MouseDown.prototype.move = function move(event) { !this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 || Math.abs(this.event.y - event.clientY) > 4) && (this.allowDefault = !0), setSelectionOrigin(this.view, "pointer"), 0 == event.buttons && this.done(); }, handlers.touchdown = function(view) { endComposition(view), setSelectionOrigin(view, "pointer"); @@ -1887,39 +1887,39 @@ var WidgetType = function(toDOM, spec) { this.spec = spec || noSpec, this.side = this.spec.side || 0, this.toDOM = toDOM; }; - WidgetType.prototype.map = function(mapping, span, offset, oldOffset) { + WidgetType.prototype.map = function map(mapping, span, offset, oldOffset) { var ref = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1), pos = ref.pos; return ref.deleted ? null : new Decoration(pos - offset, pos - offset, this); - }, WidgetType.prototype.valid = function() { + }, WidgetType.prototype.valid = function valid() { return !0; - }, WidgetType.prototype.eq = function(other) { + }, WidgetType.prototype.eq = function eq(other) { return this == other || other instanceof WidgetType && (this.spec.key && this.spec.key == other.spec.key || this.toDOM == other.toDOM && compareObjs(this.spec, other.spec)); }; var InlineType = function(attrs, spec) { this.spec = spec || noSpec, this.attrs = attrs; }; - InlineType.prototype.map = function(mapping, span, offset, oldOffset) { + InlineType.prototype.map = function map(mapping, span, offset, oldOffset) { var from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset, to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset; return from >= to ? null : new Decoration(from, to, this); - }, InlineType.prototype.valid = function(_, span) { + }, InlineType.prototype.valid = function valid(_, span) { return span.from < span.to; - }, InlineType.prototype.eq = function(other) { + }, InlineType.prototype.eq = function eq(other) { return this == other || other instanceof InlineType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec); - }, InlineType.is = function(span) { + }, InlineType.is = function is(span) { return span.type instanceof InlineType; }; var NodeType = function(attrs, spec) { this.spec = spec || noSpec, this.attrs = attrs; }; - NodeType.prototype.map = function(mapping, span, offset, oldOffset) { + NodeType.prototype.map = function map(mapping, span, offset, oldOffset) { var from = mapping.mapResult(span.from + oldOffset, 1); if (from.deleted) return null; var to = mapping.mapResult(span.to + oldOffset, -1); return to.deleted || to.pos <= from.pos ? null : new Decoration(from.pos - offset, to.pos - offset, this); - }, NodeType.prototype.valid = function(node, span) { + }, NodeType.prototype.valid = function valid(node, span) { var child, ref = node.content.findIndex(span.from), index = ref.index, offset = ref.offset; return offset == span.from && !(child = node.child(index)).isText && offset + child.nodeSize == span.to; - }, NodeType.prototype.eq = function(other) { + }, NodeType.prototype.eq = function eq(other) { return this == other || other instanceof NodeType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec); }; var Decoration = function(from, to, type) { @@ -1932,17 +1932,17 @@ configurable: !0 } }; - Decoration.prototype.copy = function(from, to) { + Decoration.prototype.copy = function copy(from, to) { return new Decoration(from, to, this.type); - }, Decoration.prototype.eq = function(other, offset) { + }, Decoration.prototype.eq = function eq(other, offset) { return void 0 === offset && (offset = 0), this.type.eq(other.type) && this.from + offset == other.from && this.to + offset == other.to; - }, Decoration.prototype.map = function(mapping, offset, oldOffset) { + }, Decoration.prototype.map = function map(mapping, offset, oldOffset) { return this.type.map(mapping, this, offset, oldOffset); - }, Decoration.widget = function(pos, toDOM, spec) { + }, Decoration.widget = function widget(pos, toDOM, spec) { return new Decoration(pos, pos, new WidgetType(toDOM, spec)); - }, Decoration.inline = function(from, to, attrs, spec) { + }, Decoration.inline = function inline(from, to, attrs, spec) { return new Decoration(from, to, new InlineType(attrs, spec)); - }, Decoration.node = function(from, to, attrs, spec) { + }, Decoration.node = function node(from, to, attrs, spec) { return new Decoration(from, to, new NodeType(attrs, spec)); }, prototypeAccessors$1.spec.get = function() { return this.type.spec; @@ -1952,12 +1952,12 @@ var none = [], noSpec = {}, DecorationSet = function(local, children) { this.local = local && local.length ? local : none, this.children = children && children.length ? children : none; }; - DecorationSet.create = function(doc, decorations) { + DecorationSet.create = function create(doc, decorations) { return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty; - }, DecorationSet.prototype.find = function(start, end, predicate) { + }, DecorationSet.prototype.find = function find(start, end, predicate) { var result = []; return this.findInner(null == start ? 0 : start, null == end ? 1e9 : end, result, 0, predicate), result; - }, DecorationSet.prototype.findInner = function(start, end, result, offset, predicate) { + }, DecorationSet.prototype.findInner = function findInner(start, end, result, offset, predicate) { for(var i = 0; i < this.local.length; i++){ var span = this.local[i]; span.from <= end && span.to >= start && (!predicate || predicate(span.spec)) && result.push(span.copy(span.from + offset, span.to + offset)); @@ -1966,9 +1966,9 @@ var childOff = this.children[i$1] + 1; this.children[i$1 + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate); } - }, DecorationSet.prototype.map = function(mapping, doc, options) { + }, DecorationSet.prototype.map = function map(mapping, doc, options) { return this == empty || 0 == mapping.maps.length ? this : this.mapInner(mapping, doc, 0, 0, options || noSpec); - }, DecorationSet.prototype.mapInner = function(mapping, node, offset, oldOffset, options) { + }, DecorationSet.prototype.mapInner = function mapInner(mapping, node, offset, oldOffset, options) { for(var newLocal, i = 0; i < this.local.length; i++){ var mapped = this.local[i].map(mapping, offset, oldOffset); mapped && mapped.type.valid(node, mapped) ? (newLocal || (newLocal = [])).push(mapped) : options.onRemove && options.onRemove(this.local[i].spec); @@ -2012,9 +2012,9 @@ } return new DecorationSet(newLocal && newLocal.sort(byPos), children); }(this.children, newLocal, mapping, node, offset, oldOffset, options) : newLocal ? new DecorationSet(newLocal.sort(byPos)) : empty; - }, DecorationSet.prototype.add = function(doc, decorations) { + }, DecorationSet.prototype.add = function add(doc, decorations) { return decorations.length ? this == empty ? DecorationSet.create(doc, decorations) : this.addInner(doc, decorations, 0) : this; - }, DecorationSet.prototype.addInner = function(doc, decorations, offset) { + }, DecorationSet.prototype.addInner = function addInner(doc, decorations, offset) { var children, this$1 = this, childIndex = 0; doc.forEach(function(childNode, childOffset) { var found, baseOffset = childOffset + offset; @@ -2025,9 +2025,9 @@ }); for(var local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset), i = 0; i < local.length; i++)local[i].type.valid(doc, local[i]) || local.splice(i--, 1); return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local, children || this.children); - }, DecorationSet.prototype.remove = function(decorations) { + }, DecorationSet.prototype.remove = function remove(decorations) { return 0 == decorations.length || this == empty ? this : this.removeInner(decorations, 0); - }, DecorationSet.prototype.removeInner = function(decorations, offset) { + }, DecorationSet.prototype.removeInner = function removeInner(decorations, offset) { for(var children = this.children, local = this.local, i = 0; i < children.length; i += 3){ for(var found = void 0, from = children[i] + offset, to = children[i + 1] + offset, j = 0, span = void 0; j < decorations.length; j++)(span = decorations[j]) && span.from > from && span.to < to && (decorations[j] = null, (found || (found = [])).push(span)); if (found) { @@ -2040,7 +2040,7 @@ for(var i$1 = 0, span$1 = void 0; i$1 < decorations.length; i$1++)if (span$1 = decorations[i$1]) for(var j$1 = 0; j$1 < local.length; j$1++)local[j$1].eq(span$1, offset) && (local == this.local && (local = this.local.slice()), local.splice(j$1--, 1)); } return children == this.children && local == this.local ? this : local.length || children.length ? new DecorationSet(local, children) : empty; - }, DecorationSet.prototype.forChild = function(offset, node) { + }, DecorationSet.prototype.forChild = function forChild(offset, node) { if (this == empty) return this; if (node.isLeaf) return DecorationSet.empty; for(var child, local, i = 0; i < this.children.length; i += 3)if (this.children[i] >= offset) { @@ -2062,15 +2062,15 @@ ]) : localSet; } return child || empty; - }, DecorationSet.prototype.eq = function(other) { + }, DecorationSet.prototype.eq = function eq(other) { if (this == other) return !0; if (!(other instanceof DecorationSet) || this.local.length != other.local.length || this.children.length != other.children.length) return !1; for(var i = 0; i < this.local.length; i++)if (!this.local[i].eq(other.local[i])) return !1; for(var i$1 = 0; i$1 < this.children.length; i$1 += 3)if (this.children[i$1] != other.children[i$1] || this.children[i$1 + 1] != other.children[i$1 + 1] || !this.children[i$1 + 2].eq(other.children[i$1 + 2])) return !1; return !0; - }, DecorationSet.prototype.locals = function(node) { + }, DecorationSet.prototype.locals = function locals(node) { return removeOverlap(this.localsInner(node)); - }, DecorationSet.prototype.localsInner = function(node) { + }, DecorationSet.prototype.localsInner = function localsInner(node) { if (this == empty) return none; if (node.inlineContent || !this.local.some(InlineType.is)) return this.local; for(var result = [], i = 0; i < this.local.length; i++)this.local[i].type instanceof InlineType || result.push(this.local[i]); @@ -2142,23 +2142,23 @@ view.cursorWrapper.deco ])), DecorationGroup.from(found); } - DecorationGroup.prototype.map = function(mapping, doc) { + DecorationGroup.prototype.map = function map(mapping, doc) { var mappedDecos = this.members.map(function(member) { return member.map(mapping, doc, noSpec); }); return DecorationGroup.from(mappedDecos); - }, DecorationGroup.prototype.forChild = function(offset, child) { + }, DecorationGroup.prototype.forChild = function forChild(offset, child) { if (child.isLeaf) return DecorationSet.empty; for(var found = [], i = 0; i < this.members.length; i++){ var result = this.members[i].forChild(offset, child); result != empty && (result instanceof DecorationGroup ? found = found.concat(result.members) : found.push(result)); } return DecorationGroup.from(found); - }, DecorationGroup.prototype.eq = function(other) { + }, DecorationGroup.prototype.eq = function eq(other) { if (!(other instanceof DecorationGroup) || other.members.length != this.members.length) return !1; for(var i = 0; i < this.members.length; i++)if (!this.members[i].eq(other.members[i])) return !1; return !0; - }, DecorationGroup.prototype.locals = function(node) { + }, DecorationGroup.prototype.locals = function locals(node) { for(var result, sorted = !0, i = 0; i < this.members.length; i++){ var locals = this.members[i].localsInner(node); if (locals.length) { @@ -2169,7 +2169,7 @@ } } return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none; - }, DecorationGroup.from = function(members) { + }, DecorationGroup.from = function from(members) { switch(members.length){ case 0: return empty; @@ -2421,16 +2421,16 @@ this._props.state = this.state; } return this._props; - }, EditorView.prototype.update = function(props) { + }, EditorView.prototype.update = function update(props) { props.handleDOMEvents != this._props.handleDOMEvents && ensureListeners(this), this._props = props, props.plugins && (props.plugins.forEach(checkStateComponent), this.directPlugins = props.plugins), this.updateStateInner(props.state, !0); - }, EditorView.prototype.setProps = function(props) { + }, EditorView.prototype.setProps = function setProps(props) { var updated = {}; for(var name in this._props)updated[name] = this._props[name]; for(var name$1 in updated.state = this.state, props)updated[name$1] = props[name$1]; this.update(updated); - }, EditorView.prototype.updateState = function(state) { + }, EditorView.prototype.updateState = function updateState(state) { this.updateStateInner(state, this.state.plugins != state.plugins); - }, EditorView.prototype.updateStateInner = function(state, reconfigured) { + }, EditorView.prototype.updateStateInner = function updateStateInner(state, reconfigured) { var refDOM, refTop, newRefTop, this$1 = this, prev = this.state, redraw = !1, updateSel = !1; if (state.storedMarks && this.composing && (clearComposition(this), updateSel = !0), this.state = state, reconfigured) { var nodeViews = buildNodeViews(this); @@ -2480,9 +2480,9 @@ return f(this$1); }) || (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__.NodeSelection ? scrollRectIntoView(this, this.docView.domAfterPos(state.selection.from).getBoundingClientRect(), startDOM) : scrollRectIntoView(this, this.coordsAtPos(state.selection.head, 1), startDOM)); } else oldScrollPos && (refDOM = oldScrollPos.refDOM, refTop = oldScrollPos.refTop, restoreScrollStack(oldScrollPos.stack, 0 == (newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0) ? 0 : newRefTop - refTop)); - }, EditorView.prototype.destroyPluginViews = function() { + }, EditorView.prototype.destroyPluginViews = function destroyPluginViews() { for(var view; view = this.pluginViews.pop();)view.destroy && view.destroy(); - }, EditorView.prototype.updatePluginViews = function(prevState) { + }, EditorView.prototype.updatePluginViews = function updatePluginViews(prevState) { if (prevState && prevState.plugins == this.state.plugins && this.directPlugins == this.prevDirectPlugins) for(var i$2 = 0; i$2 < this.pluginViews.length; i$2++){ var pluginView = this.pluginViews[i$2]; pluginView.update && pluginView.update(this, prevState); @@ -2498,7 +2498,7 @@ plugin$1.spec.view && this.pluginViews.push(plugin$1.spec.view(this)); } } - }, EditorView.prototype.someProp = function(propName, f) { + }, EditorView.prototype.someProp = function someProp(propName, f) { var value, prop = this._props && this._props[propName]; if (null != prop && (value = f ? f(prop) : prop)) return value; for(var i = 0; i < this.directPlugins.length; i++){ @@ -2510,9 +2510,9 @@ var prop$2 = plugins[i$1].props[propName]; if (null != prop$2 && (value = f ? f(prop$2) : prop$2)) return value; } - }, EditorView.prototype.hasFocus = function() { + }, EditorView.prototype.hasFocus = function hasFocus() { return this.root.activeElement == this.dom; - }, EditorView.prototype.focus = function() { + }, EditorView.prototype.focus = function focus() { this.domObserver.stop(), this.editable && function(dom) { if (dom.setActive) return dom.setActive(); if (preventScrollSupported) return dom.focus(preventScrollSupported); @@ -2533,7 +2533,7 @@ }), this._root = search; } return cached || document; - }, EditorView.prototype.posAtCoords = function(coords) { + }, EditorView.prototype.posAtCoords = function posAtCoords$1(coords) { return function(view, coords) { var node, offset, doc = view.dom.ownerDocument; if (doc.caretPositionFromPoint) try { @@ -2636,19 +2636,19 @@ inside: desc ? desc.posAtStart - desc.border : -1 }; }(this, coords); - }, EditorView.prototype.coordsAtPos = function(pos, side) { + }, EditorView.prototype.coordsAtPos = function coordsAtPos$1(pos, side) { return void 0 === side && (side = 1), coordsAtPos(this, pos, side); - }, EditorView.prototype.domAtPos = function(pos, side) { + }, EditorView.prototype.domAtPos = function domAtPos(pos, side) { return void 0 === side && (side = 0), this.docView.domFromPos(pos, side); - }, EditorView.prototype.nodeDOM = function(pos) { + }, EditorView.prototype.nodeDOM = function nodeDOM(pos) { var desc = this.docView.descAt(pos); return desc ? desc.nodeDOM : null; - }, EditorView.prototype.posAtDOM = function(node, offset, bias) { + }, EditorView.prototype.posAtDOM = function posAtDOM(node, offset, bias) { void 0 === bias && (bias = -1); var pos = this.docView.posFromDOM(node, offset, bias); if (null == pos) throw RangeError("DOM position not inside the editor"); return pos; - }, EditorView.prototype.endOfTextblock = function(dir, state) { + }, EditorView.prototype.endOfTextblock = function endOfTextblock$1(dir, state) { var view, state1, sel, $pos; return view = this, state1 = state || this.state, cachedState == state1 && cachedDir == dir ? cachedResult : (cachedState = state1, cachedDir = dir, cachedResult = "up" == dir || "down" == dir ? (sel = state1.selection, $pos = "up" == dir ? sel.$from : sel.$to, withFlushedState(view, state1, function() { for(var dom = view.docView.domFromPos($pos.pos, "up" == dir ? -1 : 1).node;;){ @@ -2684,14 +2684,14 @@ return sel.removeAllRanges(), sel.addRange(oldRange), null != oldBidiLevel && (sel.caretBidiLevel = oldBidiLevel), result; }) : "left" == dir || "backward" == dir ? !offset : atEnd; }(view, state1, dir)); - }, EditorView.prototype.destroy = function() { + }, EditorView.prototype.destroy = function destroy() { this.docView && (function(view) { for(var type in view.domObserver.stop(), view.eventHandlers)view.dom.removeEventListener(type, view.eventHandlers[type]); clearTimeout(view.composingTimeout), clearTimeout(view.lastIOSEnterFallbackTimeout); }(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], viewDecorations(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null); - }, EditorView.prototype.dispatchEvent = function(event) { + }, EditorView.prototype.dispatchEvent = function dispatchEvent$1(event) { runCustomHandler(this, event) || !handlers[event.type] || !this.editable && event.type in editHandlers || handlers[event.type](this, event); - }, EditorView.prototype.dispatch = function(tr) { + }, EditorView.prototype.dispatch = function dispatch(tr) { var dispatchTransaction = this._props.dispatchTransaction; dispatchTransaction ? dispatchTransaction.call(this, tr) : this.updateState(this.state.apply(tr)); }, Object.defineProperties(EditorView.prototype, prototypeAccessors$2); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/d6e1aeb5-38a8d7ae57119c23/output.js b/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/d6e1aeb5-38a8d7ae57119c23/output.js index 644adb940bc3..5f9bd01ff4fe 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/d6e1aeb5-38a8d7ae57119c23/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/d6e1aeb5-38a8d7ae57119c23/output.js @@ -402,16 +402,16 @@ this.vdata = "vdata" + Math.floor(global_window__WEBPACK_IMPORTED_MODULE_0___default().performance && global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.now() || Date.now()), this.data = {}; } var _proto = FakeWeakMap.prototype; - return _proto.set = function(key, value) { + return _proto.set = function set(key, value) { var access = key[this.vdata] || _guid++; return key[this.vdata] || (key[this.vdata] = access), this.data[access] = value, this; - }, _proto.get = function(key) { + }, _proto.get = function get(key) { var access = key[this.vdata]; if (access) return this.data[access]; log$1("We have no data for this element", key); - }, _proto.has = function(key) { + }, _proto.has = function has(key) { return key[this.vdata] in this.data; - }, _proto.delete = function(key) { + }, _proto.delete = function _delete(key) { var access = key[this.vdata]; access && (delete this.data[access], delete key[this.vdata]); }, FakeWeakMap; @@ -458,7 +458,7 @@ _supportsPassive = !1; try { var opts = Object.defineProperty({}, "passive", { - get: function() { + get: function get() { _supportsPassive = !0; } }); @@ -633,7 +633,7 @@ }, listen = function(target, method, type, listener) { validateTarget(target, target, method), target.nodeName ? Events[method](target, type, listener) : target[method](type, listener); }, EventedMixin = { - on: function() { + on: function on() { for(var _this = this, _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key]; var _normalizeListenArgs = normalizeListenArgs(this, args, "on"), isTargetingSelf = _normalizeListenArgs.isTargetingSelf, target = _normalizeListenArgs.target, type = _normalizeListenArgs.type, listener = _normalizeListenArgs.listener; if (listen(target, "on", type, listener), !isTargetingSelf) { @@ -647,7 +647,7 @@ removeRemoverOnTargetDispose.guid = listener.guid, listen(this, "on", "dispose", removeListenerOnDispose), listen(target, "on", "dispose", removeRemoverOnTargetDispose); } }, - one: function() { + one: function one() { for(var _this2 = this, _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++)args[_key2] = arguments[_key2]; var _normalizeListenArgs2 = normalizeListenArgs(this, args, "one"), isTargetingSelf = _normalizeListenArgs2.isTargetingSelf, target = _normalizeListenArgs2.target, type = _normalizeListenArgs2.type, listener = _normalizeListenArgs2.listener; if (isTargetingSelf) listen(target, "one", type, listener); @@ -660,7 +660,7 @@ wrapper.guid = listener.guid, listen(target, "one", type, wrapper); } }, - any: function() { + any: function any() { for(var _this3 = this, _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++)args[_key4] = arguments[_key4]; var _normalizeListenArgs3 = normalizeListenArgs(this, args, "any"), isTargetingSelf = _normalizeListenArgs3.isTargetingSelf, target = _normalizeListenArgs3.target, type = _normalizeListenArgs3.type, listener = _normalizeListenArgs3.listener; if (isTargetingSelf) listen(target, "any", type, listener); @@ -673,10 +673,10 @@ wrapper.guid = listener.guid, listen(target, "any", type, wrapper); } }, - off: function(targetOrType, typeOrListener, listener) { + off: function off$1(targetOrType, typeOrListener, listener) { !targetOrType || isValidEventType(targetOrType) ? off(this.eventBusEl_, targetOrType, typeOrListener) : (validateTarget(targetOrType, this, "off"), validateEventType(typeOrListener, this, "off"), validateListener(listener, this, "off"), listener = bind(this, listener), this.off("dispose", listener), targetOrType.nodeName ? (off(targetOrType, typeOrListener, listener), off(targetOrType, "dispose", listener)) : isEvented(targetOrType) && (targetOrType.off(typeOrListener, listener), targetOrType.off("dispose", listener))); }, - trigger: function(event, hash) { + trigger: function trigger$1(event, hash) { if (validateTarget(this.eventBusEl_, this, "trigger"), !isValidEventType(event && "string" != typeof event ? event.type : event)) { var error = "Invalid event type for " + objName(this) + "#trigger; must be a non-empty string or object with a type key that has a non-empty value."; if (event) (this.log || log$1).error(error); @@ -710,7 +710,7 @@ } var StatefulMixin = { state: {}, - setState: function(stateUpdates) { + setState: function setState(stateUpdates) { var changes, _this = this; return "function" == typeof stateUpdates && (stateUpdates = stateUpdates()), each(stateUpdates, function(value, key) { _this.state[key] !== value && ((changes = changes || {})[key] = { @@ -752,14 +752,14 @@ this.map_ = {}; } var _proto = MapSham.prototype; - return _proto.has = function(key) { + return _proto.has = function has(key) { return key in this.map_; - }, _proto.delete = function(key) { + }, _proto.delete = function _delete(key) { var has = this.has(key); return delete this.map_[key], has; - }, _proto.set = function(key, value) { + }, _proto.set = function set(key, value) { return this.map_[key] = value, this; - }, _proto.forEach = function(callback, thisArg) { + }, _proto.forEach = function forEach(callback, thisArg) { for(var key in this.map_)callback.call(thisArg, this.map_[key], key, this); }, MapSham; }(), Map$1 = global_window__WEBPACK_IMPORTED_MODULE_0___default().Map ? global_window__WEBPACK_IMPORTED_MODULE_0___default().Map : MapSham, SetSham = function() { @@ -767,14 +767,14 @@ this.set_ = {}; } var _proto = SetSham.prototype; - return _proto.has = function(key) { + return _proto.has = function has(key) { return key in this.set_; - }, _proto.delete = function(key) { + }, _proto.delete = function _delete(key) { var has = this.has(key); return delete this.set_[key], has; - }, _proto.add = function(key) { + }, _proto.add = function add(key) { return this.set_[key] = 1, this; - }, _proto.forEach = function(callback, thisArg) { + }, _proto.forEach = function forEach(callback, thisArg) { for(var key in this.set_)callback.call(thisArg, key, key, this); }, SetSham; }(), Set = global_window__WEBPACK_IMPORTED_MODULE_0___default().Set ? global_window__WEBPACK_IMPORTED_MODULE_0___default().Set : SetSham, Component$1 = function() { @@ -788,7 +788,7 @@ }), this.handleLanguagechange = this.handleLanguagechange.bind(this), this.on(this.player_, "languagechange", this.handleLanguagechange)), stateful(this, this.constructor.defaultState), this.children_ = [], this.childIndex_ = {}, this.childNameIndex_ = {}, this.setTimeoutIds_ = new Set(), this.setIntervalIds_ = new Set(), this.rafIds_ = new Set(), this.namedRafs_ = new Map$1(), this.clearingTimersOnDispose_ = !1, !1 !== options.initChildren && this.initChildren(), this.ready(ready), !1 !== options.reportTouchActivity && this.enableTouchActivity(); } var _proto = Component.prototype; - return _proto.dispose = function() { + return _proto.dispose = function dispose() { if (!this.isDisposed_) { if (this.readyQueue_ && (this.readyQueue_.length = 0), this.trigger({ type: "dispose", @@ -796,43 +796,43 @@ }), this.isDisposed_ = !0, this.children_) for(var i = this.children_.length - 1; i >= 0; i--)this.children_[i].dispose && this.children_[i].dispose(); this.children_ = null, this.childIndex_ = null, this.childNameIndex_ = null, this.parentComponent_ = null, this.el_ && (this.el_.parentNode && this.el_.parentNode.removeChild(this.el_), this.el_ = null), this.player_ = null; } - }, _proto.isDisposed = function() { + }, _proto.isDisposed = function isDisposed() { return !!this.isDisposed_; - }, _proto.player = function() { + }, _proto.player = function player() { return this.player_; - }, _proto.options = function(obj) { + }, _proto.options = function options(obj) { return obj && (this.options_ = mergeOptions$3(this.options_, obj)), this.options_; - }, _proto.el = function() { + }, _proto.el = function el() { return this.el_; - }, _proto.createEl = function(tagName, properties, attributes) { + }, _proto.createEl = function createEl$1(tagName, properties, attributes) { return createEl(tagName, properties, attributes); - }, _proto.localize = function(string, tokens, defaultValue) { + }, _proto.localize = function localize(string, tokens, defaultValue) { void 0 === defaultValue && (defaultValue = string); var code = this.player_.language && this.player_.language(), languages = this.player_.languages && this.player_.languages(), language = languages && languages[code], primaryCode = code && code.split("-")[0], primaryLang = languages && languages[primaryCode], localizedString = defaultValue; return language && language[string] ? localizedString = language[string] : primaryLang && primaryLang[string] && (localizedString = primaryLang[string]), tokens && (localizedString = localizedString.replace(/\{(\d+)\}/g, function(match, index) { var value = tokens[index - 1], ret = value; return void 0 === value && (ret = match), ret; })), localizedString; - }, _proto.handleLanguagechange = function() {}, _proto.contentEl = function() { + }, _proto.handleLanguagechange = function handleLanguagechange() {}, _proto.contentEl = function contentEl() { return this.contentEl_ || this.el_; - }, _proto.id = function() { + }, _proto.id = function id() { return this.id_; - }, _proto.name = function() { + }, _proto.name = function name() { return this.name_; - }, _proto.children = function() { + }, _proto.children = function children() { return this.children_; - }, _proto.getChildById = function(id) { + }, _proto.getChildById = function getChildById(id) { return this.childIndex_[id]; - }, _proto.getChild = function(name) { + }, _proto.getChild = function getChild(name) { if (name) return this.childNameIndex_[name]; - }, _proto.getDescendant = function() { + }, _proto.getDescendant = function getDescendant() { for(var _len = arguments.length, names = Array(_len), _key = 0; _key < _len; _key++)names[_key] = arguments[_key]; names = names.reduce(function(acc, n) { return acc.concat(n); }, []); for(var currentChild = this, i = 0; i < names.length; i++)if (!(currentChild = currentChild.getChild(names[i])) || !currentChild.getChild) return; return currentChild; - }, _proto.addChild = function(child, options, index) { + }, _proto.addChild = function addChild(child, options, index) { if (void 0 === options && (options = {}), void 0 === index && (index = this.children_.length), "string" == typeof child) { componentName = toTitleCase$1(child); var component, componentName, componentClassName = options.componentClass || componentName; @@ -847,7 +847,7 @@ this.children_[index + 1] && (this.children_[index + 1].el_ ? refNode = this.children_[index + 1].el_ : isEl(this.children_[index + 1]) && (refNode = this.children_[index + 1])), this.contentEl().insertBefore(component.el(), refNode); } return component; - }, _proto.removeChild = function(component) { + }, _proto.removeChild = function removeChild(component) { if ("string" == typeof component && (component = this.getChild(component)), component && this.children_) { for(var childFound = !1, i = this.children_.length - 1; i >= 0; i--)if (this.children_[i] === component) { childFound = !0, this.children_.splice(i, 1); @@ -859,7 +859,7 @@ compEl && compEl.parentNode === this.contentEl() && this.contentEl().removeChild(component.el()); } } - }, _proto.initChildren = function() { + }, _proto.initChildren = function initChildren() { var _this = this, children = this.options_.children; if (children) { var workingChildren, parentOptions = this.options_, Tech = Component.getComponent("Tech"); @@ -885,9 +885,9 @@ } }); } - }, _proto.buildCSSClass = function() { + }, _proto.buildCSSClass = function buildCSSClass() { return ""; - }, _proto.ready = function(fn, sync) { + }, _proto.ready = function ready(fn, sync) { if (void 0 === sync && (sync = !1), fn) { if (!this.isReady_) { this.readyQueue_ = this.readyQueue_ || [], this.readyQueue_.push(fn); @@ -895,46 +895,46 @@ } sync ? fn.call(this) : this.setTimeout(fn, 1); } - }, _proto.triggerReady = function() { + }, _proto.triggerReady = function triggerReady() { this.isReady_ = !0, this.setTimeout(function() { var readyQueue = this.readyQueue_; this.readyQueue_ = [], readyQueue && readyQueue.length > 0 && readyQueue.forEach(function(fn) { fn.call(this); }, this), this.trigger("ready"); }, 1); - }, _proto.$ = function(selector, context) { + }, _proto.$ = function $$1(selector, context) { return $(selector, context || this.contentEl()); - }, _proto.$$ = function(selector, context) { + }, _proto.$$ = function $$$1(selector, context) { return $$(selector, context || this.contentEl()); - }, _proto.hasClass = function(classToCheck) { + }, _proto.hasClass = function hasClass$1(classToCheck) { return hasClass(this.el_, classToCheck); - }, _proto.addClass = function(classToAdd) { + }, _proto.addClass = function addClass$1(classToAdd) { addClass(this.el_, classToAdd); - }, _proto.removeClass = function(classToRemove) { + }, _proto.removeClass = function removeClass$1(classToRemove) { removeClass(this.el_, classToRemove); - }, _proto.toggleClass = function(classToToggle, predicate) { + }, _proto.toggleClass = function toggleClass$1(classToToggle, predicate) { toggleClass(this.el_, classToToggle, predicate); - }, _proto.show = function() { + }, _proto.show = function show() { this.removeClass("vjs-hidden"); - }, _proto.hide = function() { + }, _proto.hide = function hide() { this.addClass("vjs-hidden"); - }, _proto.lockShowing = function() { + }, _proto.lockShowing = function lockShowing() { this.addClass("vjs-lock-showing"); - }, _proto.unlockShowing = function() { + }, _proto.unlockShowing = function unlockShowing() { this.removeClass("vjs-lock-showing"); - }, _proto.getAttribute = function(attribute) { + }, _proto.getAttribute = function getAttribute$1(attribute) { return getAttribute(this.el_, attribute); - }, _proto.setAttribute = function(attribute, value) { + }, _proto.setAttribute = function setAttribute$1(attribute, value) { setAttribute(this.el_, attribute, value); - }, _proto.removeAttribute = function(attribute) { + }, _proto.removeAttribute = function removeAttribute$1(attribute) { removeAttribute(this.el_, attribute); - }, _proto.width = function(num, skipListeners) { + }, _proto.width = function width(num, skipListeners) { return this.dimension("width", num, skipListeners); - }, _proto.height = function(num, skipListeners) { + }, _proto.height = function height(num, skipListeners) { return this.dimension("height", num, skipListeners); - }, _proto.dimensions = function(width, height) { + }, _proto.dimensions = function dimensions(width, height) { this.width(width, !0), this.height(height); - }, _proto.dimension = function(widthOrHeight, num, skipListeners) { + }, _proto.dimension = function dimension(widthOrHeight, num, skipListeners) { if (void 0 !== num) { (null === num || num != num) && (num = 0), -1 !== ("" + num).indexOf("%") || -1 !== ("" + num).indexOf("px") ? this.el_.style[widthOrHeight] = num : "auto" === num ? this.el_.style[widthOrHeight] = "" : this.el_.style[widthOrHeight] = num + "px", skipListeners || this.trigger("componentresize"); return; @@ -942,7 +942,7 @@ if (!this.el_) return 0; var val = this.el_.style[widthOrHeight], pxIndex = val.indexOf("px"); return -1 !== pxIndex ? parseInt(val.slice(0, pxIndex), 10) : parseInt(this.el_["offset" + toTitleCase$1(widthOrHeight)], 10); - }, _proto.currentDimension = function(widthOrHeight) { + }, _proto.currentDimension = function currentDimension(widthOrHeight) { var computedWidthOrHeight = 0; if ("width" !== widthOrHeight && "height" !== widthOrHeight) throw Error("currentDimension only accepts width or height value"); if (0 === (computedWidthOrHeight = parseFloat(computedWidthOrHeight = computedStyle(this.el_, widthOrHeight))) || isNaN(computedWidthOrHeight)) { @@ -950,24 +950,24 @@ computedWidthOrHeight = this.el_[rule]; } return computedWidthOrHeight; - }, _proto.currentDimensions = function() { + }, _proto.currentDimensions = function currentDimensions() { return { width: this.currentDimension("width"), height: this.currentDimension("height") }; - }, _proto.currentWidth = function() { + }, _proto.currentWidth = function currentWidth() { return this.currentDimension("width"); - }, _proto.currentHeight = function() { + }, _proto.currentHeight = function currentHeight() { return this.currentDimension("height"); - }, _proto.focus = function() { + }, _proto.focus = function focus() { this.el_.focus(); - }, _proto.blur = function() { + }, _proto.blur = function blur() { this.el_.blur(); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { this.player_ && (event.stopPropagation(), this.player_.handleKeyDown(event)); - }, _proto.handleKeyPress = function(event) { + }, _proto.handleKeyPress = function handleKeyPress(event) { this.handleKeyDown(event); - }, _proto.emitTapEvents = function() { + }, _proto.emitTapEvents = function emitTapEvents() { var couldBeTap, touchStart = 0, firstTouch = null; this.on("touchstart", function(event) { 1 === event.touches.length && (firstTouch = { @@ -987,7 +987,7 @@ this.on("touchleave", noTap), this.on("touchcancel", noTap), this.on("touchend", function(event) { firstTouch = null, !0 === couldBeTap && global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.now() - touchStart < 200 && (event.preventDefault(), this.trigger("tap")); }); - }, _proto.enableTouchActivity = function() { + }, _proto.enableTouchActivity = function enableTouchActivity() { if (this.player() && this.player().reportUserActivity) { var touchHolding, report = bind(this.player(), this.player().reportUserActivity); this.on("touchstart", function() { @@ -998,25 +998,25 @@ }; this.on("touchmove", report), this.on("touchend", touchEnd), this.on("touchcancel", touchEnd); } - }, _proto.setTimeout = function(fn, timeout) { + }, _proto.setTimeout = function setTimeout1(fn, timeout) { var timeoutId, _this2 = this; return fn = bind(this, fn), this.clearTimersOnDispose_(), timeoutId = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(function() { _this2.setTimeoutIds_.has(timeoutId) && _this2.setTimeoutIds_.delete(timeoutId), fn(); }, timeout), this.setTimeoutIds_.add(timeoutId), timeoutId; - }, _proto.clearTimeout = function(timeoutId) { + }, _proto.clearTimeout = function clearTimeout1(timeoutId) { return this.setTimeoutIds_.has(timeoutId) && (this.setTimeoutIds_.delete(timeoutId), global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(timeoutId)), timeoutId; - }, _proto.setInterval = function(fn, interval) { + }, _proto.setInterval = function setInterval(fn, interval) { fn = bind(this, fn), this.clearTimersOnDispose_(); var intervalId = global_window__WEBPACK_IMPORTED_MODULE_0___default().setInterval(fn, interval); return this.setIntervalIds_.add(intervalId), intervalId; - }, _proto.clearInterval = function(intervalId) { + }, _proto.clearInterval = function clearInterval(intervalId) { return this.setIntervalIds_.has(intervalId) && (this.setIntervalIds_.delete(intervalId), global_window__WEBPACK_IMPORTED_MODULE_0___default().clearInterval(intervalId)), intervalId; - }, _proto.requestAnimationFrame = function(fn) { + }, _proto.requestAnimationFrame = function requestAnimationFrame(fn) { var id, _this3 = this; return this.supportsRaf_ ? (this.clearTimersOnDispose_(), fn = bind(this, fn), id = global_window__WEBPACK_IMPORTED_MODULE_0___default().requestAnimationFrame(function() { _this3.rafIds_.has(id) && _this3.rafIds_.delete(id), fn(); }), this.rafIds_.add(id), id) : this.setTimeout(fn, 1000 / 60); - }, _proto.requestNamedAnimationFrame = function(name, fn) { + }, _proto.requestNamedAnimationFrame = function requestNamedAnimationFrame(name, fn) { var _this4 = this; if (!this.namedRafs_.has(name)) { this.clearTimersOnDispose_(), fn = bind(this, fn); @@ -1025,11 +1025,11 @@ }); return this.namedRafs_.set(name, id), name; } - }, _proto.cancelNamedAnimationFrame = function(name) { + }, _proto.cancelNamedAnimationFrame = function cancelNamedAnimationFrame(name) { this.namedRafs_.has(name) && (this.cancelAnimationFrame(this.namedRafs_.get(name)), this.namedRafs_.delete(name)); - }, _proto.cancelAnimationFrame = function(id) { + }, _proto.cancelAnimationFrame = function cancelAnimationFrame(id) { return this.supportsRaf_ ? (this.rafIds_.has(id) && (this.rafIds_.delete(id), global_window__WEBPACK_IMPORTED_MODULE_0___default().cancelAnimationFrame(id)), id) : this.clearTimeout(id); - }, _proto.clearTimersOnDispose_ = function() { + }, _proto.clearTimersOnDispose_ = function clearTimersOnDispose_() { var _this5 = this; this.clearingTimersOnDispose_ || (this.clearingTimersOnDispose_ = !0, this.one("dispose", function() { [ @@ -1056,7 +1056,7 @@ }); }), _this5.clearingTimersOnDispose_ = !1; })); - }, Component.registerComponent = function(name, ComponentToRegister) { + }, Component.registerComponent = function registerComponent(name, ComponentToRegister) { if ("string" != typeof name || !name) throw Error('Illegal component name, "' + name + '"; must be a non-empty string.'); var Tech = Component.getComponent("Tech"), isTech = Tech && Tech.isTech(ComponentToRegister), isComp = Component === ComponentToRegister || Component.prototype.isPrototypeOf(ComponentToRegister.prototype); if (isTech || !isComp) throw Error('Illegal component, "' + name + '"; ' + (isTech ? "techs must be registered using Tech.registerTech()" : "must be a Component subclass") + "."); @@ -1069,7 +1069,7 @@ }).every(Boolean)) throw Error("Can not register Player component after player has been created."); } return Component.components_[name] = ComponentToRegister, Component.components_[toLowerCase(name)] = ComponentToRegister, ComponentToRegister; - }, Component.getComponent = function(name) { + }, Component.getComponent = function getComponent(name) { if (name && Component.components_) return Component.components_[name]; }, Component; }(); @@ -1082,10 +1082,10 @@ var timeRangesObj; return timeRangesObj = void 0 === ranges || 0 === ranges.length ? { length: 0, - start: function() { + start: function start() { throw Error("This TimeRanges object is empty"); }, - end: function() { + end: function end() { throw Error("This TimeRanges object is empty"); } } : { @@ -1196,7 +1196,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ModalDialog, _Component); var _proto = ModalDialog.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: this.buildCSSClass(), tabIndex: -1 @@ -1206,28 +1206,28 @@ "aria-label": this.label(), role: "dialog" }); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.contentEl_ = null, this.descEl_ = null, this.previouslyActiveEl_ = null, _Component.prototype.dispose.call(this); - }, _proto.buildCSSClass = function() { + }, _proto.buildCSSClass = function buildCSSClass() { return MODAL_CLASS_NAME + " vjs-hidden " + _Component.prototype.buildCSSClass.call(this); - }, _proto.label = function() { + }, _proto.label = function label() { return this.localize(this.options_.label || "Modal Window"); - }, _proto.description = function() { + }, _proto.description = function description() { var desc = this.options_.description || this.localize("This is a modal window."); return this.closeable() && (desc += " " + this.localize("This modal can be closed by pressing the Escape key or activating the close button.")), desc; - }, _proto.open = function() { + }, _proto.open = function open() { if (!this.opened_) { var player = this.player(); this.trigger("beforemodalopen"), this.opened_ = !0, !this.options_.fillAlways && (this.hasBeenOpened_ || this.hasBeenFilled_) || this.fill(), this.wasPlaying_ = !player.paused(), this.options_.pauseOnOpen && this.wasPlaying_ && player.pause(), this.on("keydown", this.handleKeyDown_), this.hadControls_ = player.controls(), player.controls(!1), this.show(), this.conditionalFocus_(), this.el().setAttribute("aria-hidden", "false"), this.trigger("modalopen"), this.hasBeenOpened_ = !0; } - }, _proto.opened = function(value) { + }, _proto.opened = function opened(value) { return "boolean" == typeof value && this[value ? "open" : "close"](), this.opened_; - }, _proto.close = function() { + }, _proto.close = function close() { if (this.opened_) { var player = this.player(); this.trigger("beforemodalclose"), this.opened_ = !1, this.wasPlaying_ && this.options_.pauseOnOpen && player.play(), this.off("keydown", this.handleKeyDown_), this.hadControls_ && player.controls(!0), this.hide(), this.el().setAttribute("aria-hidden", "true"), this.trigger("modalclose"), this.conditionalBlur_(), this.options_.temporary && this.dispose(); } - }, _proto.closeable = function(value) { + }, _proto.closeable = function closeable(value) { if ("boolean" == typeof value) { var closeable = this.closeable_ = !!value, close = this.getChild("closeButton"); if (closeable && !close) { @@ -1239,23 +1239,23 @@ !closeable && close && (this.off(close, "close", this.close_), this.removeChild(close), close.dispose()); } return this.closeable_; - }, _proto.fill = function() { + }, _proto.fill = function fill() { this.fillWith(this.content()); - }, _proto.fillWith = function(content) { + }, _proto.fillWith = function fillWith(content) { var contentEl = this.contentEl(), parentEl = contentEl.parentNode, nextSiblingEl = contentEl.nextSibling; this.trigger("beforemodalfill"), this.hasBeenFilled_ = !0, parentEl.removeChild(contentEl), this.empty(), insertContent(contentEl, content), this.trigger("modalfill"), nextSiblingEl ? parentEl.insertBefore(contentEl, nextSiblingEl) : parentEl.appendChild(contentEl); var closeButton = this.getChild("closeButton"); closeButton && parentEl.appendChild(closeButton.el_); - }, _proto.empty = function() { + }, _proto.empty = function empty() { this.trigger("beforemodalempty"), emptyEl(this.contentEl()), this.trigger("modalempty"); - }, _proto.content = function(value) { + }, _proto.content = function content(value) { return void 0 !== value && (this.content_ = value), this.content_; - }, _proto.conditionalFocus_ = function() { + }, _proto.conditionalFocus_ = function conditionalFocus_() { var activeEl = global_document__WEBPACK_IMPORTED_MODULE_1___default().activeElement, playerEl = this.player_.el_; this.previouslyActiveEl_ = null, (playerEl.contains(activeEl) || playerEl === activeEl) && (this.previouslyActiveEl_ = activeEl, this.focus()); - }, _proto.conditionalBlur_ = function() { + }, _proto.conditionalBlur_ = function conditionalBlur_() { this.previouslyActiveEl_ && (this.previouslyActiveEl_.focus(), this.previouslyActiveEl_ = null); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { if (event.stopPropagation(), keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Escape") && this.closeable()) { event.preventDefault(), this.close(); return; @@ -1267,7 +1267,7 @@ } global_document__WEBPACK_IMPORTED_MODULE_1___default().activeElement === this.el_ && (focusIndex = 0), event.shiftKey && 0 === focusIndex ? (focusableEls[focusableEls.length - 1].focus(), event.preventDefault()) : event.shiftKey || focusIndex !== focusableEls.length - 1 || (focusableEls[0].focus(), event.preventDefault()); } - }, _proto.focusableEls_ = function() { + }, _proto.focusableEls_ = function focusableEls_() { var allChildren = this.el_.querySelectorAll("*"); return Array.prototype.filter.call(allChildren, function(child) { return (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLAnchorElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLAreaElement) && child.hasAttribute("href") || (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLInputElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLSelectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLTextAreaElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLButtonElement) && !child.hasAttribute("disabled") || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLIFrameElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLObjectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().HTMLEmbedElement || child.hasAttribute("tabindex") && -1 !== child.getAttribute("tabindex") || child.hasAttribute("contenteditable"); @@ -1282,7 +1282,7 @@ function TrackList(tracks) { var _this; void 0 === tracks && (tracks = []), (_this = _EventTarget.call(this) || this).tracks_ = [], Object.defineProperty((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), "length", { - get: function() { + get: function get() { return this.tracks_.length; } }); @@ -1291,10 +1291,10 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TrackList, _EventTarget); var _proto = TrackList.prototype; - return _proto.addTrack = function(track) { + return _proto.addTrack = function addTrack(track) { var _this2 = this, index = this.tracks_.length; "" + index in this || Object.defineProperty(this, index, { - get: function() { + get: function get() { return this.tracks_[index]; } }), -1 === this.tracks_.indexOf(track) && (this.tracks_.push(track), this.trigger({ @@ -1308,7 +1308,7 @@ target: _this2 }); }, isEvented(track) && track.addEventListener("labelchange", track.labelchange_); - }, _proto.removeTrack = function(rtrack) { + }, _proto.removeTrack = function removeTrack(rtrack) { for(var track, i = 0, l = this.length; i < l; i++)if (this[i] === rtrack) { (track = this[i]).off && track.off(), this.tracks_.splice(i, 1); break; @@ -1318,7 +1318,7 @@ type: "removetrack", target: this }); - }, _proto.getTrackById = function(id) { + }, _proto.getTrackById = function getTrackById(id) { for(var result = null, i = 0, l = this.length; i < l; i++){ var track = this[i]; if (track.id === id) { @@ -1349,12 +1349,12 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(AudioTrackList, _TrackList); var _proto = AudioTrackList.prototype; - return _proto.addTrack = function(track) { + return _proto.addTrack = function addTrack(track) { var _this2 = this; track.enabled && disableOthers$1(this, track), _TrackList.prototype.addTrack.call(this, track), track.addEventListener && (track.enabledChange_ = function() { _this2.changing_ || (_this2.changing_ = !0, disableOthers$1(_this2, track), _this2.changing_ = !1, _this2.trigger("change")); }, track.addEventListener("enabledchange", track.enabledChange_)); - }, _proto.removeTrack = function(rtrack) { + }, _proto.removeTrack = function removeTrack(rtrack) { _TrackList.prototype.removeTrack.call(this, rtrack), rtrack.removeEventListener && rtrack.enabledChange_ && (rtrack.removeEventListener("enabledchange", rtrack.enabledChange_), rtrack.enabledChange_ = null); }, AudioTrackList; }(TrackList), disableOthers = function(list, track) { @@ -1368,21 +1368,21 @@ break; } return (_this = _TrackList.call(this, tracks) || this).changing_ = !1, Object.defineProperty((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), "selectedIndex", { - get: function() { + get: function get() { for(var _i = 0; _i < this.length; _i++)if (this[_i].selected) return _i; return -1; }, - set: function() {} + set: function set() {} }), _this; } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VideoTrackList, _TrackList); var _proto = VideoTrackList.prototype; - return _proto.addTrack = function(track) { + return _proto.addTrack = function addTrack(track) { var _this2 = this; track.selected && disableOthers(this, track), _TrackList.prototype.addTrack.call(this, track), track.addEventListener && (track.selectedChange_ = function() { _this2.changing_ || (_this2.changing_ = !0, disableOthers(_this2, track), _this2.changing_ = !1, _this2.trigger("change")); }, track.addEventListener("selectedchange", track.selectedChange_)); - }, _proto.removeTrack = function(rtrack) { + }, _proto.removeTrack = function removeTrack(rtrack) { _TrackList.prototype.removeTrack.call(this, rtrack), rtrack.removeEventListener && rtrack.selectedChange_ && (rtrack.removeEventListener("selectedchange", rtrack.selectedChange_), rtrack.selectedChange_ = null); }, VideoTrackList; }(TrackList), TextTrackList = function(_TrackList) { @@ -1391,7 +1391,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TextTrackList, _TrackList); var _proto = TextTrackList.prototype; - return _proto.addTrack = function(track) { + return _proto.addTrack = function addTrack(track) { var _this = this; _TrackList.prototype.addTrack.call(this, track), this.queueChange_ || (this.queueChange_ = function() { return _this.queueTrigger("change"); @@ -1401,33 +1401,33 @@ "metadata", "chapters" ].indexOf(track.kind) && track.addEventListener("modechange", this.triggerSelectedlanguagechange_); - }, _proto.removeTrack = function(rtrack) { + }, _proto.removeTrack = function removeTrack(rtrack) { _TrackList.prototype.removeTrack.call(this, rtrack), rtrack.removeEventListener && (this.queueChange_ && rtrack.removeEventListener("modechange", this.queueChange_), this.selectedlanguagechange_ && rtrack.removeEventListener("modechange", this.triggerSelectedlanguagechange_)); }, TextTrackList; }(TrackList), HtmlTrackElementList = function() { function HtmlTrackElementList(trackElements) { void 0 === trackElements && (trackElements = []), this.trackElements_ = [], Object.defineProperty(this, "length", { - get: function() { + get: function get() { return this.trackElements_.length; } }); for(var i = 0, length = trackElements.length; i < length; i++)this.addTrackElement_(trackElements[i]); } var _proto = HtmlTrackElementList.prototype; - return _proto.addTrackElement_ = function(trackElement) { + return _proto.addTrackElement_ = function addTrackElement_(trackElement) { var index = this.trackElements_.length; "" + index in this || Object.defineProperty(this, index, { - get: function() { + get: function get() { return this.trackElements_[index]; } }), -1 === this.trackElements_.indexOf(trackElement) && this.trackElements_.push(trackElement); - }, _proto.getTrackElementByTrack_ = function(track) { + }, _proto.getTrackElementByTrack_ = function getTrackElementByTrack_(track) { for(var trackElement_, i = 0, length = this.trackElements_.length; i < length; i++)if (track === this.trackElements_[i].track) { trackElement_ = this.trackElements_[i]; break; } return trackElement_; - }, _proto.removeTrackElement_ = function(trackElement) { + }, _proto.removeTrackElement_ = function removeTrackElement_(trackElement) { for(var i = 0, length = this.trackElements_.length; i < length; i++)if (trackElement === this.trackElements_[i]) { this.trackElements_[i].track && "function" == typeof this.trackElements_[i].track.off && this.trackElements_[i].track.off(), "function" == typeof this.trackElements_[i].off && this.trackElements_[i].off(), this.trackElements_.splice(i, 1); break; @@ -1436,24 +1436,24 @@ }(), TextTrackCueList = function() { function TextTrackCueList(cues) { TextTrackCueList.prototype.setCues_.call(this, cues), Object.defineProperty(this, "length", { - get: function() { + get: function get() { return this.length_; } }); } var _proto = TextTrackCueList.prototype; - return _proto.setCues_ = function(cues) { + return _proto.setCues_ = function setCues_(cues) { var oldLength = this.length || 0, i = 0, l = cues.length; this.cues_ = cues, this.length_ = cues.length; var defineProp = function(index) { "" + index in this || Object.defineProperty(this, "" + index, { - get: function() { + get: function get() { return this.cues_[index]; } }); }; if (oldLength < l) for(i = oldLength; i < l; i++)defineProp.call(this, i); - }, _proto.getCueById = function(id) { + }, _proto.getCueById = function getCueById(id) { for(var result = null, i = 0, l = this.length; i < l; i++){ var cue = this[i]; if (cue.id === id) { @@ -1496,18 +1496,18 @@ language: options.language || "" }, label = options.label || "", _loop = function(key) { Object.defineProperty((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), key, { - get: function() { + get: function get() { return trackProps[key]; }, - set: function() {} + set: function set() {} }); }; for(var key in trackProps)_loop(key); return Object.defineProperty((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), "label", { - get: function() { + get: function get() { return label; }, - set: function(newLabel) { + set: function set(newLabel) { newLabel !== label && (label = newLabel, this.trigger("labelchange")); } }), _this; @@ -1596,27 +1596,27 @@ _this.tech_.off("timeupdate", timeupdateHandler); }), "disabled" !== mode && _this.tech_.on("timeupdate", timeupdateHandler), Object.defineProperties((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), { default: { - get: function() { + get: function get() { return default_; }, - set: function() {} + set: function set() {} }, mode: { - get: function() { + get: function get() { return mode; }, - set: function(newMode) { + set: function set(newMode) { TextTrackMode[newMode] && mode !== newMode && (mode = newMode, this.preload_ || "disabled" === mode || 0 !== this.cues.length || loadTrack(this.src, this), this.tech_.off("timeupdate", timeupdateHandler), "disabled" !== mode && this.tech_.on("timeupdate", timeupdateHandler), this.trigger("modechange")); } }, cues: { - get: function() { + get: function get() { return this.loaded_ ? cues : null; }, - set: function() {} + set: function set() {} }, activeCues: { - get: function() { + get: function get() { if (!this.loaded_) return null; if (0 === this.cues.length) return activeCues; for(var ct = this.tech_.currentTime(), active = [], i = 0, l = this.cues.length; i < l; i++){ @@ -1627,13 +1627,13 @@ else for(var _i = 0; _i < active.length; _i++)-1 === this.activeCues_.indexOf(active[_i]) && (changed = !0); return this.activeCues_ = active, activeCues.setCues_(this.activeCues_), activeCues; }, - set: function() {} + set: function set() {} } }), settings.src ? (_this.src = settings.src, _this.preload_ || (_this.loaded_ = !0), (_this.preload_ || "subtitles" !== settings.kind && "captions" !== settings.kind) && loadTrack(_this.src, (0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this))) : _this.loaded_ = !0, _this; } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TextTrack, _Track); var _proto = TextTrack.prototype; - return _proto.addCue = function(originalCue) { + return _proto.addCue = function addCue(originalCue) { var cue = originalCue; if (global_window__WEBPACK_IMPORTED_MODULE_0___default().vttjs && !(originalCue instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default().vttjs.VTTCue)) { for(var prop in cue = new (global_window__WEBPACK_IMPORTED_MODULE_0___default()).vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text), originalCue)prop in cue || (cue[prop] = originalCue[prop]); @@ -1641,7 +1641,7 @@ } for(var tracks = this.tech_.textTracks(), i = 0; i < tracks.length; i++)tracks[i] !== this && tracks[i].removeCue(cue); this.cues_.push(cue), this.cues.setCues_(this.cues_); - }, _proto.removeCue = function(_removeCue) { + }, _proto.removeCue = function removeCue(_removeCue) { for(var i = this.cues_.length; i--;){ var cue = this.cues_[i]; if (cue === _removeCue || cue.originalCue_ && cue.originalCue_ === _removeCue) { @@ -1663,10 +1663,10 @@ _this = _Track.call(this, settings) || this; var enabled = !1; return Object.defineProperty((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), "enabled", { - get: function() { + get: function get() { return enabled; }, - set: function(newEnabled) { + set: function set(newEnabled) { "boolean" == typeof newEnabled && newEnabled !== enabled && (enabled = newEnabled, this.trigger("enabledchange")); } }), settings.enabled && (_this.enabled = settings.enabled), _this.loaded_ = !0, _this; @@ -1681,10 +1681,10 @@ _this = _Track.call(this, settings) || this; var selected = !1; return Object.defineProperty((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), "selected", { - get: function() { + get: function get() { return selected; }, - set: function(newSelected) { + set: function set(newSelected) { "boolean" == typeof newSelected && newSelected !== selected && (selected = newSelected, this.trigger("selectedchange")); } }), settings.selected && (_this.selected = settings.selected), _this; @@ -1696,12 +1696,12 @@ var _this, readyState, track = new TextTrack(options); return _this.kind = track.kind, _this.src = track.src, _this.srclang = track.language, _this.label = track.label, _this.default = track.default, Object.defineProperties((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), { readyState: { - get: function() { + get: function get() { return readyState; } }, track: { - get: function() { + get: function get() { return track; } } @@ -1757,7 +1757,7 @@ var Tech = function(_Component) { function Tech(options, ready) { var _this; - return void 0 === options && (options = {}), void 0 === ready && (ready = function() {}), options.reportTouchActivity = !1, (_this = _Component.call(this, null, options, ready) || this).onDurationChange_ = function(e) { + return void 0 === options && (options = {}), void 0 === ready && (ready = function ready() {}), options.reportTouchActivity = !1, (_this = _Component.call(this, null, options, ready) || this).onDurationChange_ = function(e) { return _this.onDurationChange(e); }, _this.trackProgress_ = function(e) { return _this.trackProgress(e); @@ -1784,7 +1784,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(Tech, _Component); var _proto = Tech.prototype; - return _proto.triggerSourceset = function(src) { + return _proto.triggerSourceset = function triggerSourceset(src) { var _this2 = this; this.isReady_ || this.one("ready", function() { return _this2.setTimeout(function() { @@ -1794,28 +1794,28 @@ src: src, type: "sourceset" }); - }, _proto.manualProgressOn = function() { + }, _proto.manualProgressOn = function manualProgressOn() { this.on("durationchange", this.onDurationChange_), this.manualProgress = !0, this.one("ready", this.trackProgress_); - }, _proto.manualProgressOff = function() { + }, _proto.manualProgressOff = function manualProgressOff() { this.manualProgress = !1, this.stopTrackingProgress(), this.off("durationchange", this.onDurationChange_); - }, _proto.trackProgress = function(event) { + }, _proto.trackProgress = function trackProgress(event) { this.stopTrackingProgress(), this.progressInterval = this.setInterval(bind(this, function() { var numBufferedPercent = this.bufferedPercent(); this.bufferedPercent_ !== numBufferedPercent && this.trigger("progress"), this.bufferedPercent_ = numBufferedPercent, 1 === numBufferedPercent && this.stopTrackingProgress(); }), 500); - }, _proto.onDurationChange = function(event) { + }, _proto.onDurationChange = function onDurationChange(event) { this.duration_ = this.duration(); - }, _proto.buffered = function() { + }, _proto.buffered = function buffered() { return createTimeRanges(0, 0); - }, _proto.bufferedPercent = function() { + }, _proto.bufferedPercent = function bufferedPercent$1() { return bufferedPercent(this.buffered(), this.duration_); - }, _proto.stopTrackingProgress = function() { + }, _proto.stopTrackingProgress = function stopTrackingProgress() { this.clearInterval(this.progressInterval); - }, _proto.manualTimeUpdatesOn = function() { + }, _proto.manualTimeUpdatesOn = function manualTimeUpdatesOn() { this.manualTimeUpdates = !0, this.on("play", this.trackCurrentTime_), this.on("pause", this.stopTrackingCurrentTime_); - }, _proto.manualTimeUpdatesOff = function() { + }, _proto.manualTimeUpdatesOff = function manualTimeUpdatesOff() { this.manualTimeUpdates = !1, this.stopTrackingCurrentTime(), this.off("play", this.trackCurrentTime_), this.off("pause", this.stopTrackingCurrentTime_); - }, _proto.trackCurrentTime = function() { + }, _proto.trackCurrentTime = function trackCurrentTime() { this.currentTimeInterval && this.stopTrackingCurrentTime(), this.currentTimeInterval = this.setInterval(function() { this.trigger({ type: "timeupdate", @@ -1823,15 +1823,15 @@ manuallyTriggered: !0 }); }, 250); - }, _proto.stopTrackingCurrentTime = function() { + }, _proto.stopTrackingCurrentTime = function stopTrackingCurrentTime() { this.clearInterval(this.currentTimeInterval), this.trigger({ type: "timeupdate", target: this, manuallyTriggered: !0 }); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.clearTracks(NORMAL.names), this.manualProgress && this.manualProgressOff(), this.manualTimeUpdates && this.manualTimeUpdatesOff(), _Component.prototype.dispose.call(this); - }, _proto.clearTracks = function(types) { + }, _proto.clearTracks = function clearTracks(types) { var _this3 = this; (types = [].concat(types)).forEach(function(type) { for(var list = _this3[type + "Tracks"]() || [], i = list.length; i--;){ @@ -1839,22 +1839,22 @@ "text" === type && _this3.removeRemoteTextTrack(track), list.removeTrack(track); } }); - }, _proto.cleanupAutoTextTracks = function() { + }, _proto.cleanupAutoTextTracks = function cleanupAutoTextTracks() { for(var list = this.autoRemoteTextTracks_ || [], i = list.length; i--;){ var track = list[i]; this.removeRemoteTextTrack(track); } - }, _proto.reset = function() {}, _proto.crossOrigin = function() {}, _proto.setCrossOrigin = function() {}, _proto.error = function(err) { + }, _proto.reset = function reset() {}, _proto.crossOrigin = function crossOrigin() {}, _proto.setCrossOrigin = function setCrossOrigin() {}, _proto.error = function error(err) { return void 0 !== err && (this.error_ = new MediaError(err), this.trigger("error")), this.error_; - }, _proto.played = function() { + }, _proto.played = function played() { return this.hasStarted_ ? createTimeRanges(0, 0) : createTimeRanges(); - }, _proto.play = function() {}, _proto.setScrubbing = function() {}, _proto.scrubbing = function() {}, _proto.setCurrentTime = function() { + }, _proto.play = function play() {}, _proto.setScrubbing = function setScrubbing() {}, _proto.scrubbing = function scrubbing() {}, _proto.setCurrentTime = function setCurrentTime() { this.manualTimeUpdates && this.trigger({ type: "timeupdate", target: this, manuallyTriggered: !0 }); - }, _proto.initTrackListeners = function() { + }, _proto.initTrackListeners = function initTrackListeners() { var _this4 = this; NORMAL.names.forEach(function(name) { var props = NORMAL[name], trackListChanges = function() { @@ -1864,7 +1864,7 @@ tracks.removeEventListener("removetrack", trackListChanges), tracks.removeEventListener("addtrack", trackListChanges); }); }); - }, _proto.addWebVttScript_ = function() { + }, _proto.addWebVttScript_ = function addWebVttScript_() { var _this5 = this; if (!global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT) { if (global_document__WEBPACK_IMPORTED_MODULE_1___default().body.contains(this.el())) { @@ -1882,7 +1882,7 @@ }), global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT = !0, this.el().parentNode.appendChild(script); } else this.ready(this.addWebVttScript_); } - }, _proto.emulateTextTracks = function() { + }, _proto.emulateTextTracks = function emulateTextTracks() { var _this6 = this, tracks = this.textTracks(), remoteTracks = this.remoteTextTracks(), handleAddTrack = function(e) { return tracks.addTrack(e.track); }, handleRemoveTrack = function(e) { @@ -1902,46 +1902,46 @@ remoteTracks.off("addtrack", handleAddTrack), remoteTracks.off("removetrack", handleRemoveTrack), tracks.removeEventListener("change", textTracksChanges), tracks.removeEventListener("addtrack", textTracksChanges), tracks.removeEventListener("removetrack", textTracksChanges); for(var i = 0; i < tracks.length; i++)tracks[i].removeEventListener("cuechange", updateDisplay); }); - }, _proto.addTextTrack = function(kind, label, language) { + }, _proto.addTextTrack = function addTextTrack(kind, label, language) { var options, tracks, track; if (!kind) throw Error("TextTrack kind is required but was not provided"); return void 0 === options && (options = {}), tracks = this.textTracks(), options.kind = kind, label && (options.label = label), language && (options.language = language), options.tech = this, track = new ALL.text.TrackClass(options), tracks.addTrack(track), track; - }, _proto.createRemoteTextTrack = function(options) { + }, _proto.createRemoteTextTrack = function createRemoteTextTrack(options) { var track = mergeOptions$3(options, { tech: this }); return new REMOTE.remoteTextEl.TrackClass(track); - }, _proto.addRemoteTextTrack = function(options, manualCleanup) { + }, _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) { var _this7 = this; void 0 === options && (options = {}); var htmlTrackElement = this.createRemoteTextTrack(options); return !0 !== manualCleanup && !1 !== manualCleanup && (log$1.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'), manualCleanup = !0), this.remoteTextTrackEls().addTrackElement_(htmlTrackElement), this.remoteTextTracks().addTrack(htmlTrackElement.track), !0 !== manualCleanup && this.ready(function() { return _this7.autoRemoteTextTracks_.addTrack(htmlTrackElement.track); }), htmlTrackElement; - }, _proto.removeRemoteTextTrack = function(track) { + }, _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) { var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); this.remoteTextTrackEls().removeTrackElement_(trackElement), this.remoteTextTracks().removeTrack(track), this.autoRemoteTextTracks_.removeTrack(track); - }, _proto.getVideoPlaybackQuality = function() { + }, _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() { return {}; - }, _proto.requestPictureInPicture = function() { + }, _proto.requestPictureInPicture = function requestPictureInPicture() { var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default().Promise; if (PromiseClass) return PromiseClass.reject(); - }, _proto.disablePictureInPicture = function() { + }, _proto.disablePictureInPicture = function disablePictureInPicture() { return !0; - }, _proto.setDisablePictureInPicture = function() {}, _proto.setPoster = function() {}, _proto.playsinline = function() {}, _proto.setPlaysinline = function() {}, _proto.overrideNativeAudioTracks = function() {}, _proto.overrideNativeVideoTracks = function() {}, _proto.canPlayType = function() { + }, _proto.setDisablePictureInPicture = function setDisablePictureInPicture() {}, _proto.setPoster = function setPoster() {}, _proto.playsinline = function playsinline() {}, _proto.setPlaysinline = function setPlaysinline() {}, _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks() {}, _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks() {}, _proto.canPlayType = function canPlayType() { return ""; - }, Tech.canPlayType = function() { + }, Tech.canPlayType = function canPlayType() { return ""; - }, Tech.canPlaySource = function(srcObj, options) { + }, Tech.canPlaySource = function canPlaySource(srcObj, options) { return Tech.canPlayType(srcObj.type); - }, Tech.isTech = function(component) { + }, Tech.isTech = function isTech(component) { return component.prototype instanceof Tech || component instanceof Tech || component === Tech; - }, Tech.registerTech = function(name, tech) { + }, Tech.registerTech = function registerTech(name, tech) { if (Tech.techs_ || (Tech.techs_ = {}), !Tech.isTech(tech)) throw Error("Tech " + name + " must be a Tech"); if (!Tech.canPlayType) throw Error("Techs must have a static canPlayType method on them"); if (!Tech.canPlaySource) throw Error("Techs must have a static canPlaySource method on them"); return name = toTitleCase$1(name), Tech.techs_[name] = tech, Tech.techs_[toLowerCase(name)] = tech, "Tech" !== name && Tech.defaultTechOrder_.push(name), tech; - }, Tech.getTech = function(name) { + }, Tech.getTech = function getTech(name) { return name ? Tech.techs_ && Tech.techs_[name] ? Tech.techs_[name] : (name = toTitleCase$1(name), global_window__WEBPACK_IMPORTED_MODULE_0___default() && global_window__WEBPACK_IMPORTED_MODULE_0___default().videojs && global_window__WEBPACK_IMPORTED_MODULE_0___default().videojs[name]) ? (log$1.warn("The " + name + " tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"), global_window__WEBPACK_IMPORTED_MODULE_0___default().videojs[name]) : void 0 : void 0; }, Tech; }(Component$1); @@ -2106,7 +2106,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ClickableComponent, _Component); var _proto = ClickableComponent.prototype; - return _proto.createEl = function(tag, props, attributes) { + return _proto.createEl = function createEl$1(tag, props, attributes) { void 0 === tag && (tag = "div"), void 0 === props && (props = {}), void 0 === attributes && (attributes = {}), props = assign({ className: this.buildCSSClass(), tabIndex: 0 @@ -2119,35 +2119,35 @@ }, { "aria-hidden": !0 })), this.createControlTextEl(el), el; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.controlTextEl_ = null, _Component.prototype.dispose.call(this); - }, _proto.createControlTextEl = function(el) { + }, _proto.createControlTextEl = function createControlTextEl(el) { return this.controlTextEl_ = createEl("span", { className: "vjs-control-text" }, { "aria-live": "polite" }), el && el.appendChild(this.controlTextEl_), this.controlText(this.controlText_, el), this.controlTextEl_; - }, _proto.controlText = function(text, el) { + }, _proto.controlText = function controlText(text, el) { if (void 0 === el && (el = this.el()), void 0 === text) return this.controlText_ || "Need Text"; var localizedText = this.localize(text); this.controlText_ = text, textContent(this.controlTextEl_, localizedText), this.nonIconControl || this.player_.options_.noUITitleAttributes || el.setAttribute("title", localizedText); - }, _proto.buildCSSClass = function() { + }, _proto.buildCSSClass = function buildCSSClass() { return "vjs-control vjs-button " + _Component.prototype.buildCSSClass.call(this); - }, _proto.enable = function() { + }, _proto.enable = function enable() { this.enabled_ || (this.enabled_ = !0, this.removeClass("vjs-disabled"), this.el_.setAttribute("aria-disabled", "false"), void 0 !== this.tabIndex_ && this.el_.setAttribute("tabIndex", this.tabIndex_), this.on([ "tap", "click" ], this.handleClick_), this.on("keydown", this.handleKeyDown_)); - }, _proto.disable = function() { + }, _proto.disable = function disable() { this.enabled_ = !1, this.addClass("vjs-disabled"), this.el_.setAttribute("aria-disabled", "true"), void 0 !== this.tabIndex_ && this.el_.removeAttribute("tabIndex"), this.off("mouseover", this.handleMouseOver_), this.off("mouseout", this.handleMouseOut_), this.off([ "tap", "click" ], this.handleClick_), this.off("keydown", this.handleKeyDown_); - }, _proto.handleLanguagechange = function() { + }, _proto.handleLanguagechange = function handleLanguagechange() { this.controlText(this.controlText_); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { this.options_.clickHandler && this.options_.clickHandler.call(this, arguments); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Space") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Enter") ? (event.preventDefault(), event.stopPropagation(), this.trigger("click")) : _Component.prototype.handleKeyDown.call(this, event); }, ClickableComponent; }(Component$1); @@ -2161,20 +2161,20 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(PosterImage, _ClickableComponent); var _proto = PosterImage.prototype; - return _proto.dispose = function() { + return _proto.dispose = function dispose() { this.player().off("posterchange", this.update_), _ClickableComponent.prototype.dispose.call(this); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl$1() { return createEl("div", { className: "vjs-poster", tabIndex: -1 }); - }, _proto.update = function(event) { + }, _proto.update = function update(event) { var url = this.player().poster(); this.setSrc(url), url ? this.show() : this.hide(); - }, _proto.setSrc = function(url) { + }, _proto.setSrc = function setSrc(url) { var backgroundImage = ""; url && (backgroundImage = 'url("' + url + '")'), this.el_.style.backgroundImage = backgroundImage; - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { if (this.player_.controls()) { var sourceIsEncrypted = this.player_.usingPlugin("eme") && this.player_.eme.sessions && this.player_.eme.sessions.length > 0; this.player_.tech(!0) && !((IE_VERSION || IS_EDGE) && sourceIsEncrypted) && this.player_.tech(!0).focus(), this.player_.paused() ? silencePromise(this.player_.play()) : this.player_.pause(); @@ -2232,7 +2232,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TextTrackDisplay, _Component); var _proto = TextTrackDisplay.prototype; - return _proto.preselectTrack = function() { + return _proto.preselectTrack = function preselectTrack() { for(var firstDesc, firstCaptions, preferredTrack, modes = { captions: 1, subtitles: 1 @@ -2241,9 +2241,9 @@ userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes ? track.kind === userPref.kind ? preferredTrack = track : preferredTrack || (preferredTrack = track) : userPref && !userPref.enabled ? (preferredTrack = null, firstDesc = null, firstCaptions = null) : track.default && ("descriptions" !== track.kind || firstDesc ? track.kind in modes && !firstCaptions && (firstCaptions = track) : firstDesc = track); } preferredTrack ? preferredTrack.mode = "showing" : firstCaptions ? firstCaptions.mode = "showing" : firstDesc && (firstDesc.mode = "showing"); - }, _proto.toggleDisplay = function() { + }, _proto.toggleDisplay = function toggleDisplay() { this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks ? this.hide() : this.show(); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-text-track-display" }, { @@ -2251,9 +2251,9 @@ "aria-live": "off", "aria-atomic": "true" }); - }, _proto.clearDisplay = function() { + }, _proto.clearDisplay = function clearDisplay() { "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT && global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT.processCues(global_window__WEBPACK_IMPORTED_MODULE_0___default(), [], this.el_); - }, _proto.updateDisplay = function() { + }, _proto.updateDisplay = function updateDisplay() { var tracks = this.player_.textTracks(), allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks; if (this.clearDisplay(), allowMultipleShowingTracks) { for(var showingTracks = [], _i = 0; _i < tracks.length; ++_i){ @@ -2268,7 +2268,7 @@ "showing" === _track.mode && ("descriptions" === _track.kind ? descriptionsTrack = _track : captionsSubtitlesTrack = _track); } captionsSubtitlesTrack ? ("off" !== this.getAttribute("aria-live") && this.setAttribute("aria-live", "off"), this.updateForTrack(captionsSubtitlesTrack)) : descriptionsTrack && ("assertive" !== this.getAttribute("aria-live") && this.setAttribute("aria-live", "assertive"), this.updateForTrack(descriptionsTrack)); - }, _proto.updateDisplayState = function(track) { + }, _proto.updateDisplayState = function updateDisplayState(track) { for(var overrides = this.player_.textTrackSettings.getValues(), cues = track.activeCues, i = cues.length; i--;){ var cue = cues[i]; if (cue) { @@ -2280,7 +2280,7 @@ overrides.fontFamily && "default" !== overrides.fontFamily && ("small-caps" === overrides.fontFamily ? cueDiv.firstChild.style.fontVariant = "small-caps" : cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily]); } } - }, _proto.updateForTrack = function(tracks) { + }, _proto.updateForTrack = function updateForTrack(tracks) { if (Array.isArray(tracks) || (tracks = [ tracks ]), !("function" != typeof global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT || tracks.every(function(track) { @@ -2303,7 +2303,7 @@ function LoadingSpinner() { return _Component.apply(this, arguments) || this; } - return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(LoadingSpinner, _Component), LoadingSpinner.prototype.createEl = function() { + return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(LoadingSpinner, _Component), LoadingSpinner.prototype.createEl = function createEl$1() { var isAudio = this.player_.isAudio(), playerType = this.localize(isAudio ? "Audio Player" : "Video Player"), controlText = createEl("span", { className: "vjs-control-text", textContent: this.localize("{1} is loading.", [ @@ -2323,7 +2323,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(Button, _ClickableComponent); var _proto = Button.prototype; - return _proto.createEl = function(tag, props, attributes) { + return _proto.createEl = function createEl$1(tag, props, attributes) { void 0 === props && (props = {}), void 0 === attributes && (attributes = {}); var el = createEl("button", props = assign({ className: this.buildCSSClass() @@ -2335,15 +2335,15 @@ }, { "aria-hidden": !0 })), this.createControlTextEl(el), el; - }, _proto.addChild = function(child, options) { + }, _proto.addChild = function addChild(child, options) { void 0 === options && (options = {}); var className = this.constructor.name; return log$1.warn("Adding an actionable (user controllable) child to a Button (" + className + ") is not supported; use a ClickableComponent instead."), Component$1.prototype.addChild.call(this, child, options); - }, _proto.enable = function() { + }, _proto.enable = function enable() { _ClickableComponent.prototype.enable.call(this), this.el_.removeAttribute("disabled"); - }, _proto.disable = function() { + }, _proto.disable = function disable() { _ClickableComponent.prototype.disable.call(this), this.el_.setAttribute("disabled", "disabled"); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { if (keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Space") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Enter")) { event.stopPropagation(); return; @@ -2361,9 +2361,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(BigPlayButton, _Button); var _proto = BigPlayButton.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-big-play-button"; - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { var playPromise = this.player_.play(); if (this.mouseused_ && event.clientX && event.clientY) { var sourceIsEncrypted = this.player_.usingPlugin("eme") && this.player_.eme.sessions && this.player_.eme.sessions.length > 0; @@ -2379,9 +2379,9 @@ return playToggle.focus(); }; isPromise(playPromise) ? playPromise.then(playFocus, function() {}) : this.setTimeout(playFocus, 1); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { this.mouseused_ = !1, _Button.prototype.handleKeyDown.call(this, event); - }, _proto.handleMouseDown = function(event) { + }, _proto.handleMouseDown = function handleMouseDown(event) { this.mouseused_ = !0; }, BigPlayButton; }(Button); @@ -2393,14 +2393,14 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(CloseButton, _Button); var _proto = CloseButton.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-close-button " + _Button.prototype.buildCSSClass.call(this); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { this.trigger({ type: "close", bubbles: !1 }); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Esc") ? (event.preventDefault(), event.stopPropagation(), this.trigger("click")) : _Button.prototype.handleKeyDown.call(this, event); }, CloseButton; }(Button); @@ -2418,17 +2418,17 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(PlayToggle, _Button); var _proto = PlayToggle.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-play-control " + _Button.prototype.buildCSSClass.call(this); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { this.player_.paused() ? silencePromise(this.player_.play()) : this.player_.pause(); - }, _proto.handleSeeked = function(event) { + }, _proto.handleSeeked = function handleSeeked(event) { this.removeClass("vjs-ended"), this.player_.paused() ? this.handlePause(event) : this.handlePlay(event); - }, _proto.handlePlay = function(event) { + }, _proto.handlePlay = function handlePlay(event) { this.removeClass("vjs-ended"), this.removeClass("vjs-paused"), this.addClass("vjs-playing"), this.controlText("Pause"); - }, _proto.handlePause = function(event) { + }, _proto.handlePause = function handlePause(event) { this.removeClass("vjs-playing"), this.addClass("vjs-paused"), this.controlText("Play"); - }, _proto.handleEnded = function(event) { + }, _proto.handleEnded = function handleEnded(event) { var _this2 = this; this.removeClass("vjs-playing"), this.addClass("vjs-ended"), this.controlText("Replay"), this.one(this.player_, "seeked", function(e) { return _this2.handleSeeked(e); @@ -2455,7 +2455,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TimeDisplay, _Component); var _proto = TimeDisplay.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl$1() { var className = this.buildCSSClass(), el = _Component.prototype.createEl.call(this, "div", { className: className + " vjs-time-control vjs-control" }), span = createEl("span", { @@ -2470,9 +2470,9 @@ "aria-live": "off", role: "presentation" }), el.appendChild(this.contentEl_), el; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.contentEl_ = null, this.textNode_ = null, _Component.prototype.dispose.call(this); - }, _proto.updateTextNode_ = function(time) { + }, _proto.updateTextNode_ = function updateTextNode_(time) { var _this2 = this; void 0 === time && (time = 0), time = formatTime(time), this.formattedTime_ !== time && (this.formattedTime_ = time, this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_", function() { if (_this2.contentEl_) { @@ -2480,7 +2480,7 @@ oldNode && _this2.contentEl_.firstChild !== oldNode && (oldNode = null, log$1.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")), _this2.textNode_ = global_document__WEBPACK_IMPORTED_MODULE_1___default().createTextNode(_this2.formattedTime_), _this2.textNode_ && (oldNode ? _this2.contentEl_.replaceChild(_this2.textNode_, oldNode) : _this2.contentEl_.appendChild(_this2.textNode_)); } })); - }, _proto.updateContent = function(event) {}, TimeDisplay; + }, _proto.updateContent = function updateContent(event) {}, TimeDisplay; }(Component$1); TimeDisplay.prototype.labelText_ = "Time", TimeDisplay.prototype.controlText_ = "Time", Component$1.registerComponent("TimeDisplay", TimeDisplay); var CurrentTimeDisplay = function(_TimeDisplay) { @@ -2489,9 +2489,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(CurrentTimeDisplay, _TimeDisplay); var _proto = CurrentTimeDisplay.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-current-time"; - }, _proto.updateContent = function(event) { + }, _proto.updateContent = function updateContent(event) { var time; time = this.player_.ended() ? this.player_.duration() : this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(), this.updateTextNode_(time); }, CurrentTimeDisplay; @@ -2507,9 +2507,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(DurationDisplay, _TimeDisplay); var _proto = DurationDisplay.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-duration"; - }, _proto.updateContent = function(event) { + }, _proto.updateContent = function updateContent(event) { var duration = this.player_.duration(); this.updateTextNode_(duration); }, DurationDisplay; @@ -2519,7 +2519,7 @@ function TimeDivider() { return _Component.apply(this, arguments) || this; } - return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TimeDivider, _Component), TimeDivider.prototype.createEl = function() { + return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TimeDivider, _Component), TimeDivider.prototype.createEl = function createEl() { var el = _Component.prototype.createEl.call(this, "div", { className: "vjs-time-control vjs-time-divider" }, { @@ -2540,14 +2540,14 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(RemainingTimeDisplay, _TimeDisplay); var _proto = RemainingTimeDisplay.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-remaining-time"; - }, _proto.createEl = function() { + }, _proto.createEl = function createEl$1() { var el = _TimeDisplay.prototype.createEl.call(this); return el.insertBefore(createEl("span", {}, { "aria-hidden": !0 }, "-"), this.contentEl_), el; - }, _proto.updateContent = function(event) { + }, _proto.updateContent = function updateContent(event) { var time; "number" == typeof this.player_.duration() && (time = this.player_.ended() ? 0 : this.player_.remainingTimeDisplay ? this.player_.remainingTimeDisplay() : this.player_.remainingTime(), this.updateTextNode_(time)); }, RemainingTimeDisplay; @@ -2562,7 +2562,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(LiveDisplay, _Component); var _proto = LiveDisplay.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl$1() { var el = _Component.prototype.createEl.call(this, "div", { className: "vjs-live-control vjs-control" }); @@ -2574,9 +2574,9 @@ className: "vjs-control-text", textContent: this.localize("Stream Type") + "\xA0" })), this.contentEl_.appendChild(global_document__WEBPACK_IMPORTED_MODULE_1___default().createTextNode(this.localize("LIVE"))), el.appendChild(this.contentEl_), el; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.contentEl_ = null, _Component.prototype.dispose.call(this); - }, _proto.updateShowing = function(event) { + }, _proto.updateShowing = function updateShowing(event) { this.player().duration() === 1 / 0 ? this.show() : this.hide(); }, LiveDisplay; }(Component$1); @@ -2590,7 +2590,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SeekToLive, _Button); var _proto = SeekToLive.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl$1() { var el = _Button.prototype.createEl.call(this, "button", { className: "vjs-seek-to-live-control vjs-control" }); @@ -2600,11 +2600,11 @@ }, { "aria-hidden": "true" }), el.appendChild(this.textEl_), el; - }, _proto.updateLiveEdgeStatus = function() { + }, _proto.updateLiveEdgeStatus = function updateLiveEdgeStatus() { !this.player_.liveTracker || this.player_.liveTracker.atLiveEdge() ? (this.setAttribute("aria-disabled", !0), this.addClass("vjs-at-live-edge"), this.controlText("Seek to live, currently playing live")) : (this.setAttribute("aria-disabled", !1), this.removeClass("vjs-at-live-edge"), this.controlText("Seek to live, currently behind live")); - }, _proto.handleClick = function() { + }, _proto.handleClick = function handleClick() { this.player_.liveTracker.seekToLiveEdge(); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.player_.liveTracker && this.off(this.player_.liveTracker, "liveedgechange", this.updateLiveEdgeStatusHandler_), this.textEl_ = null, _Button.prototype.dispose.call(this); }, SeekToLive; }(Button); @@ -2630,16 +2630,16 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(Slider, _Component); var _proto = Slider.prototype; - return _proto.enabled = function() { + return _proto.enabled = function enabled() { return this.enabled_; - }, _proto.enable = function() { + }, _proto.enable = function enable() { this.enabled() || (this.on("mousedown", this.handleMouseDown_), this.on("touchstart", this.handleMouseDown_), this.on("keydown", this.handleKeyDown_), this.on("click", this.handleClick_), this.on(this.player_, "controlsvisible", this.update), this.playerEvent && this.on(this.player_, this.playerEvent, this.update), this.removeClass("disabled"), this.setAttribute("tabindex", 0), this.enabled_ = !0); - }, _proto.disable = function() { + }, _proto.disable = function disable() { if (this.enabled()) { var doc = this.bar.el_.ownerDocument; this.off("mousedown", this.handleMouseDown_), this.off("touchstart", this.handleMouseDown_), this.off("keydown", this.handleKeyDown_), this.off("click", this.handleClick_), this.off(this.player_, "controlsvisible", this.update_), this.off(doc, "mousemove", this.handleMouseMove_), this.off(doc, "mouseup", this.handleMouseUp_), this.off(doc, "touchmove", this.handleMouseMove_), this.off(doc, "touchend", this.handleMouseUp_), this.removeAttribute("tabindex"), this.addClass("disabled"), this.playerEvent && this.off(this.player_, this.playerEvent, this.update), this.enabled_ = !1; } - }, _proto.createEl = function(type, props, attributes) { + }, _proto.createEl = function createEl(type, props, attributes) { return void 0 === props && (props = {}), void 0 === attributes && (attributes = {}), props.className = props.className + " vjs-slider", props = assign({ tabIndex: 0 }, props), attributes = assign({ @@ -2649,13 +2649,13 @@ "aria-valuemax": 100, tabIndex: 0 }, attributes), _Component.prototype.createEl.call(this, type, props, attributes); - }, _proto.handleMouseDown = function(event) { + }, _proto.handleMouseDown = function handleMouseDown(event) { var doc = this.bar.el_.ownerDocument; "mousedown" === event.type && event.preventDefault(), "touchstart" !== event.type || IS_CHROME || event.preventDefault(), blockTextSelection(), this.addClass("vjs-sliding"), this.trigger("slideractive"), this.on(doc, "mousemove", this.handleMouseMove_), this.on(doc, "mouseup", this.handleMouseUp_), this.on(doc, "touchmove", this.handleMouseMove_), this.on(doc, "touchend", this.handleMouseUp_), this.handleMouseMove(event); - }, _proto.handleMouseMove = function(event) {}, _proto.handleMouseUp = function() { + }, _proto.handleMouseMove = function handleMouseMove(event) {}, _proto.handleMouseUp = function handleMouseUp() { var doc = this.bar.el_.ownerDocument; unblockTextSelection(), this.removeClass("vjs-sliding"), this.trigger("sliderinactive"), this.off(doc, "mousemove", this.handleMouseMove_), this.off(doc, "mouseup", this.handleMouseUp_), this.off(doc, "touchmove", this.handleMouseMove_), this.off(doc, "touchend", this.handleMouseUp_), this.update(); - }, _proto.update = function() { + }, _proto.update = function update() { var _this2 = this; if (this.el_ && this.bar) { var progress = this.getProgress(); @@ -2664,16 +2664,16 @@ _this2.bar.el().style[sizeKey] = (100 * progress).toFixed(2) + "%"; })), progress; } - }, _proto.getProgress = function() { + }, _proto.getProgress = function getProgress() { return Number(clamp(this.getPercent(), 0, 1).toFixed(4)); - }, _proto.calculateDistance = function(event) { + }, _proto.calculateDistance = function calculateDistance(event) { var position = getPointerPosition(this.el_, event); return this.vertical() ? position.y : position.x; - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Left") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Down") ? (event.preventDefault(), event.stopPropagation(), this.stepBack()) : keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Right") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Up") ? (event.preventDefault(), event.stopPropagation(), this.stepForward()) : _Component.prototype.handleKeyDown.call(this, event); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { event.stopPropagation(), event.preventDefault(); - }, _proto.vertical = function(bool) { + }, _proto.vertical = function vertical(bool) { if (void 0 === bool) return this.vertical_ || !1; this.vertical_ = !!bool, this.vertical_ ? this.addClass("vjs-slider-vertical") : this.addClass("vjs-slider-horizontal"); }, Slider; @@ -2690,7 +2690,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(LoadProgressBar, _Component); var _proto = LoadProgressBar.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl$1() { var el = _Component.prototype.createEl.call(this, "div", { className: "vjs-load-progress" }), wrapper = createEl("span", { @@ -2702,9 +2702,9 @@ className: "vjs-control-text-loaded-percentage", textContent: "0%" }), el.appendChild(wrapper), wrapper.appendChild(loadedText), wrapper.appendChild(separator), wrapper.appendChild(this.percentageEl_), el; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.partEls_ = null, this.percentageEl_ = null, _Component.prototype.dispose.call(this); - }, _proto.update = function(event) { + }, _proto.update = function update(event) { var _this2 = this; this.requestNamedAnimationFrame("LoadProgressBar#update", function() { var liveTracker = _this2.player_.liveTracker, buffered = _this2.player_.buffered(), duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : _this2.player_.duration(), bufferedEnd = _this2.player_.bufferedEnd(), children = _this2.partEls_, percent = percentify(bufferedEnd, duration); @@ -2726,21 +2726,21 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TimeTooltip, _Component); var _proto = TimeTooltip.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-time-tooltip" }, { "aria-hidden": "true" }); - }, _proto.update = function(seekBarRect, seekBarPoint, content) { + }, _proto.update = function update(seekBarRect, seekBarPoint, content) { var tooltipRect = findPosition(this.el_), playerRect = getBoundingClientRect(this.player_.el()), seekBarPointPx = seekBarRect.width * seekBarPoint; if (playerRect && tooltipRect) { var spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx, spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right), pullTooltipBy = tooltipRect.width / 2; spaceLeftOfPoint < pullTooltipBy ? pullTooltipBy += pullTooltipBy - spaceLeftOfPoint : spaceRightOfPoint < pullTooltipBy && (pullTooltipBy = spaceRightOfPoint), pullTooltipBy < 0 ? pullTooltipBy = 0 : pullTooltipBy > tooltipRect.width && (pullTooltipBy = tooltipRect.width), pullTooltipBy = Math.round(pullTooltipBy), this.el_.style.right = "-" + pullTooltipBy + "px", this.write(content); } - }, _proto.write = function(content) { + }, _proto.write = function write(content) { textContent(this.el_, content); - }, _proto.updateTime = function(seekBarRect, seekBarPoint, time, cb) { + }, _proto.updateTime = function updateTime(seekBarRect, seekBarPoint, time, cb) { var _this2 = this; this.requestNamedAnimationFrame("TimeTooltip#updateTime", function() { var content, duration = _this2.player_.duration(); @@ -2760,13 +2760,13 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(PlayProgressBar, _Component); var _proto = PlayProgressBar.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-play-progress vjs-slider-bar" }, { "aria-hidden": "true" }); - }, _proto.update = function(seekBarRect, seekBarPoint) { + }, _proto.update = function update(seekBarRect, seekBarPoint) { var timeTooltip = this.getChild("timeTooltip"); if (timeTooltip) { var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); @@ -2784,11 +2784,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(MouseTimeDisplay, _Component); var _proto = MouseTimeDisplay.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-mouse-display" }); - }, _proto.update = function(seekBarRect, seekBarPoint) { + }, _proto.update = function update(seekBarRect, seekBarPoint) { var _this2 = this, time = seekBarPoint * this.player_.duration(); this.getChild("timeTooltip").updateTime(seekBarRect, seekBarPoint, time, function() { _this2.el_.style.left = seekBarRect.width * seekBarPoint + "px"; @@ -2807,7 +2807,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SeekBar, _Slider); var _proto = SeekBar.prototype; - return _proto.setEventHandlers_ = function() { + return _proto.setEventHandlers_ = function setEventHandlers_() { var _this2 = this; this.update_ = bind(this, this.update), this.update = throttle(this.update_, 30), this.on(this.player_, [ "ended", @@ -2824,19 +2824,19 @@ "pause", "waiting" ], this.disableIntervalHandler_), "hidden" in global_document__WEBPACK_IMPORTED_MODULE_1___default() && "visibilityState" in global_document__WEBPACK_IMPORTED_MODULE_1___default() && this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "visibilitychange", this.toggleVisibility_); - }, _proto.toggleVisibility_ = function(e) { + }, _proto.toggleVisibility_ = function toggleVisibility_(e) { "hidden" === global_document__WEBPACK_IMPORTED_MODULE_1___default().visibilityState ? (this.cancelNamedAnimationFrame("SeekBar#update"), this.cancelNamedAnimationFrame("Slider#update"), this.disableInterval_(e)) : (this.player_.ended() || this.player_.paused() || this.enableInterval_(), this.update()); - }, _proto.enableInterval_ = function() { + }, _proto.enableInterval_ = function enableInterval_() { this.updateInterval || (this.updateInterval = this.setInterval(this.update, 30)); - }, _proto.disableInterval_ = function(e) { + }, _proto.disableInterval_ = function disableInterval_(e) { this.player_.liveTracker && this.player_.liveTracker.isLive() && e && "ended" !== e.type || !this.updateInterval || (this.clearInterval(this.updateInterval), this.updateInterval = null); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl() { return _Slider.prototype.createEl.call(this, "div", { className: "vjs-progress-holder" }, { "aria-label": this.localize("Progress Bar") }); - }, _proto.update = function(event) { + }, _proto.update = function update(event) { var _this3 = this; if ("hidden" !== global_document__WEBPACK_IMPORTED_MODULE_1___default().visibilityState) { var percent = _Slider.prototype.update.call(this); @@ -2848,16 +2848,16 @@ ], "{1} of {2}")), _this3.currentTime_ = currentTime, _this3.duration_ = duration), _this3.bar && _this3.bar.update(getBoundingClientRect(_this3.el()), _this3.getProgress()); }), percent; } - }, _proto.userSeek_ = function(ct) { + }, _proto.userSeek_ = function userSeek_(ct) { this.player_.liveTracker && this.player_.liveTracker.isLive() && this.player_.liveTracker.nextSeekedFromUser(), this.player_.currentTime(ct); - }, _proto.getCurrentTime_ = function() { + }, _proto.getCurrentTime_ = function getCurrentTime_() { return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); - }, _proto.getPercent = function() { + }, _proto.getPercent = function getPercent() { var percent, currentTime = this.getCurrentTime_(), liveTracker = this.player_.liveTracker; return liveTracker && liveTracker.isLive() ? (percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow(), liveTracker.atLiveEdge() && (percent = 1)) : percent = currentTime / this.player_.duration(), percent; - }, _proto.handleMouseDown = function(event) { + }, _proto.handleMouseDown = function handleMouseDown(event) { isSingleLeftClick(event) && (event.stopPropagation(), this.player_.scrubbing(!0), this.videoWasPlaying = !this.player_.paused(), this.player_.pause(), _Slider.prototype.handleMouseDown.call(this, event)); - }, _proto.handleMouseMove = function(event) { + }, _proto.handleMouseMove = function handleMouseMove(event) { if (isSingleLeftClick(event)) { var newTime, distance = this.calculateDistance(event), liveTracker = this.player_.liveTracker; if (liveTracker && liveTracker.isLive()) { @@ -2870,27 +2870,27 @@ } else (newTime = distance * this.player_.duration()) === this.player_.duration() && (newTime -= 0.1); this.userSeek_(newTime); } - }, _proto.enable = function() { + }, _proto.enable = function enable() { _Slider.prototype.enable.call(this); var mouseTimeDisplay = this.getChild("mouseTimeDisplay"); mouseTimeDisplay && mouseTimeDisplay.show(); - }, _proto.disable = function() { + }, _proto.disable = function disable() { _Slider.prototype.disable.call(this); var mouseTimeDisplay = this.getChild("mouseTimeDisplay"); mouseTimeDisplay && mouseTimeDisplay.hide(); - }, _proto.handleMouseUp = function(event) { + }, _proto.handleMouseUp = function handleMouseUp(event) { _Slider.prototype.handleMouseUp.call(this, event), event && event.stopPropagation(), this.player_.scrubbing(!1), this.player_.trigger({ type: "timeupdate", target: this, manuallyTriggered: !0 }), this.videoWasPlaying ? silencePromise(this.player_.play()) : this.update_(); - }, _proto.stepForward = function() { + }, _proto.stepForward = function stepForward() { this.userSeek_(this.player_.currentTime() + 5); - }, _proto.stepBack = function() { + }, _proto.stepBack = function stepBack() { this.userSeek_(this.player_.currentTime() - 5); - }, _proto.handleAction = function(event) { + }, _proto.handleAction = function handleAction(event) { this.player_.paused() ? this.player_.play() : this.player_.pause(); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { var liveTracker = this.player_.liveTracker; if (keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Space") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Enter")) event.preventDefault(), event.stopPropagation(), this.handleAction(event); else if (keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Home")) event.preventDefault(), event.stopPropagation(), this.userSeek_(0); @@ -2900,7 +2900,7 @@ var gotoFraction = (keycode__WEBPACK_IMPORTED_MODULE_3___default().codes[keycode__WEBPACK_IMPORTED_MODULE_3___default()(event)] - keycode__WEBPACK_IMPORTED_MODULE_3___default().codes[0]) * 10.0 / 100.0; liveTracker && liveTracker.isLive() ? this.userSeek_(liveTracker.seekableStart() + liveTracker.liveWindow() * gotoFraction) : this.userSeek_(this.player_.duration() * gotoFraction); } else keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "PgDn") ? (event.preventDefault(), event.stopPropagation(), this.userSeek_(this.player_.currentTime() - 60)) : keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "PgUp") ? (event.preventDefault(), event.stopPropagation(), this.userSeek_(this.player_.currentTime() + 60)) : _Slider.prototype.handleKeyDown.call(this, event); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.disableInterval_(), this.off(this.player_, [ "ended", "durationchange", @@ -2932,11 +2932,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ProgressControl, _Component); var _proto = ProgressControl.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-progress-control vjs-control" }); - }, _proto.handleMouseMove = function(event) { + }, _proto.handleMouseMove = function handleMouseMove(event) { var seekBar = this.getChild("seekBar"); if (seekBar) { var playProgressBar = seekBar.getChild("playProgressBar"), mouseTimeDisplay = seekBar.getChild("mouseTimeDisplay"); @@ -2945,12 +2945,12 @@ seekBarPoint = clamp(seekBarPoint, 0, 1), mouseTimeDisplay && mouseTimeDisplay.update(seekBarRect, seekBarPoint), playProgressBar && playProgressBar.update(seekBarRect, seekBar.getProgress()); } } - }, _proto.handleMouseSeek = function(event) { + }, _proto.handleMouseSeek = function handleMouseSeek(event) { var seekBar = this.getChild("seekBar"); seekBar && seekBar.handleMouseMove(event); - }, _proto.enabled = function() { + }, _proto.enabled = function enabled() { return this.enabled_; - }, _proto.disable = function() { + }, _proto.disable = function disable() { if (this.children().forEach(function(child) { return child.disable && child.disable(); }), this.enabled() && (this.off([ @@ -2960,20 +2960,20 @@ var seekBar = this.getChild("seekBar"); this.player_.scrubbing(!1), seekBar.videoWasPlaying && silencePromise(this.player_.play()); } - }, _proto.enable = function() { + }, _proto.enable = function enable() { this.children().forEach(function(child) { return child.enable && child.enable(); }), this.enabled() || (this.on([ "mousedown", "touchstart" ], this.handleMouseDownHandler_), this.on(this.el_, "mousemove", this.handleMouseMove), this.removeClass("disabled"), this.enabled_ = !0); - }, _proto.removeListenersAddedOnMousedownAndTouchstart = function() { + }, _proto.removeListenersAddedOnMousedownAndTouchstart = function removeListenersAddedOnMousedownAndTouchstart() { var doc = this.el_.ownerDocument; this.off(doc, "mousemove", this.throttledHandleMouseSeek), this.off(doc, "touchmove", this.throttledHandleMouseSeek), this.off(doc, "mouseup", this.handleMouseUpHandler_), this.off(doc, "touchend", this.handleMouseUpHandler_); - }, _proto.handleMouseDown = function(event) { + }, _proto.handleMouseDown = function handleMouseDown(event) { var doc = this.el_.ownerDocument, seekBar = this.getChild("seekBar"); seekBar && seekBar.handleMouseDown(event), this.on(doc, "mousemove", this.throttledHandleMouseSeek), this.on(doc, "touchmove", this.throttledHandleMouseSeek), this.on(doc, "mouseup", this.handleMouseUpHandler_), this.on(doc, "touchend", this.handleMouseUpHandler_); - }, _proto.handleMouseUp = function(event) { + }, _proto.handleMouseUp = function handleMouseUp(event) { var seekBar = this.getChild("seekBar"); seekBar && seekBar.handleMouseUp(event), this.removeListenersAddedOnMousedownAndTouchstart(); }, ProgressControl; @@ -3000,13 +3000,13 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(PictureInPictureToggle, _Button); var _proto = PictureInPictureToggle.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-picture-in-picture-control " + _Button.prototype.buildCSSClass.call(this); - }, _proto.handlePictureInPictureEnabledChange = function() { + }, _proto.handlePictureInPictureEnabledChange = function handlePictureInPictureEnabledChange() { global_document__WEBPACK_IMPORTED_MODULE_1___default().pictureInPictureEnabled && !1 === this.player_.disablePictureInPicture() ? this.enable() : this.disable(); - }, _proto.handlePictureInPictureChange = function(event) { + }, _proto.handlePictureInPictureChange = function handlePictureInPictureChange(event) { this.player_.isInPictureInPicture() ? this.controlText("Exit Picture-in-Picture") : this.controlText("Picture-in-Picture"), this.handlePictureInPictureEnabledChange(); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { this.player_.isInPictureInPicture() ? this.player_.exitPictureInPicture() : this.player_.requestPictureInPicture(); }, PictureInPictureToggle; }(Button); @@ -3020,11 +3020,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(FullscreenToggle, _Button); var _proto = FullscreenToggle.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-fullscreen-control " + _Button.prototype.buildCSSClass.call(this); - }, _proto.handleFullscreenChange = function(event) { + }, _proto.handleFullscreenChange = function handleFullscreenChange(event) { this.player_.isFullscreen() ? this.controlText("Non-Fullscreen") : this.controlText("Fullscreen"); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { this.player_.isFullscreen() ? this.player_.exitFullscreen() : this.player_.requestFullscreen(); }, FullscreenToggle; }(Button); @@ -3037,7 +3037,7 @@ function VolumeLevel() { return _Component.apply(this, arguments) || this; } - return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VolumeLevel, _Component), VolumeLevel.prototype.createEl = function() { + return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VolumeLevel, _Component), VolumeLevel.prototype.createEl = function createEl() { var el = _Component.prototype.createEl.call(this, "div", { className: "vjs-volume-level" }); @@ -3054,13 +3054,13 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VolumeLevelTooltip, _Component); var _proto = VolumeLevelTooltip.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-volume-tooltip" }, { "aria-hidden": "true" }); - }, _proto.update = function(rangeBarRect, rangeBarPoint, vertical, content) { + }, _proto.update = function update(rangeBarRect, rangeBarPoint, vertical, content) { if (!vertical) { var tooltipRect = getBoundingClientRect(this.el_), playerRect = getBoundingClientRect(this.player_.el()), volumeBarPointPx = rangeBarRect.width * rangeBarPoint; if (!playerRect || !tooltipRect) return; @@ -3068,9 +3068,9 @@ spaceLeftOfPoint < pullTooltipBy ? pullTooltipBy += pullTooltipBy - spaceLeftOfPoint : spaceRightOfPoint < pullTooltipBy && (pullTooltipBy = spaceRightOfPoint), pullTooltipBy < 0 ? pullTooltipBy = 0 : pullTooltipBy > tooltipRect.width && (pullTooltipBy = tooltipRect.width), this.el_.style.right = "-" + pullTooltipBy + "px"; } this.write(content + "%"); - }, _proto.write = function(content) { + }, _proto.write = function write(content) { textContent(this.el_, content); - }, _proto.updateVolume = function(rangeBarRect, rangeBarPoint, vertical, volume, cb) { + }, _proto.updateVolume = function updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, cb) { var _this2 = this; this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume", function() { _this2.update(rangeBarRect, rangeBarPoint, vertical, volume.toFixed(0)), cb && cb(); @@ -3085,11 +3085,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(MouseVolumeLevelDisplay, _Component); var _proto = MouseVolumeLevelDisplay.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-mouse-display" }); - }, _proto.update = function(rangeBarRect, rangeBarPoint, vertical) { + }, _proto.update = function update(rangeBarRect, rangeBarPoint, vertical) { var _this2 = this, volume = 100 * rangeBarPoint; this.getChild("volumeLevelTooltip").updateVolume(rangeBarRect, rangeBarPoint, vertical, volume, function() { vertical ? _this2.el_.style.bottom = rangeBarRect.height * rangeBarPoint + "px" : _this2.el_.style.left = rangeBarRect.width * rangeBarPoint + "px"; @@ -3114,36 +3114,36 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VolumeBar, _Slider); var _proto = VolumeBar.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Slider.prototype.createEl.call(this, "div", { className: "vjs-volume-bar vjs-slider-bar" }, { "aria-label": this.localize("Volume Level"), "aria-live": "polite" }); - }, _proto.handleMouseDown = function(event) { + }, _proto.handleMouseDown = function handleMouseDown(event) { isSingleLeftClick(event) && _Slider.prototype.handleMouseDown.call(this, event); - }, _proto.handleMouseMove = function(event) { + }, _proto.handleMouseMove = function handleMouseMove(event) { var mouseVolumeLevelDisplay = this.getChild("mouseVolumeLevelDisplay"); if (mouseVolumeLevelDisplay) { var volumeBarEl = this.el(), volumeBarRect = getBoundingClientRect(volumeBarEl), vertical = this.vertical(), volumeBarPoint = getPointerPosition(volumeBarEl, event); volumeBarPoint = clamp(volumeBarPoint = vertical ? volumeBarPoint.y : volumeBarPoint.x, 0, 1), mouseVolumeLevelDisplay.update(volumeBarRect, volumeBarPoint, vertical); } isSingleLeftClick(event) && (this.checkMuted(), this.player_.volume(this.calculateDistance(event))); - }, _proto.checkMuted = function() { + }, _proto.checkMuted = function checkMuted() { this.player_.muted() && this.player_.muted(!1); - }, _proto.getPercent = function() { + }, _proto.getPercent = function getPercent() { return this.player_.muted() ? 0 : this.player_.volume(); - }, _proto.stepForward = function() { + }, _proto.stepForward = function stepForward() { this.checkMuted(), this.player_.volume(this.player_.volume() + 0.1); - }, _proto.stepBack = function() { + }, _proto.stepBack = function stepBack() { this.checkMuted(), this.player_.volume(this.player_.volume() - 0.1); - }, _proto.updateARIAAttributes = function(event) { + }, _proto.updateARIAAttributes = function updateARIAAttributes(event) { var ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_(); this.el_.setAttribute("aria-valuenow", ariaValue), this.el_.setAttribute("aria-valuetext", ariaValue + "%"); - }, _proto.volumeAsPercentage_ = function() { + }, _proto.volumeAsPercentage_ = function volumeAsPercentage_() { return Math.round(100 * this.player_.volume()); - }, _proto.updateLastVolume_ = function() { + }, _proto.updateLastVolume_ = function updateLastVolume_() { var _this2 = this, volumeBeforeDrag = this.player_.volume(); this.one("sliderinactive", function() { 0 === _this2.player_.volume() && _this2.player_.lastVolume_(volumeBeforeDrag); @@ -3181,18 +3181,18 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VolumeControl, _Component); var _proto = VolumeControl.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { var orientationClass = "vjs-volume-horizontal"; return this.options_.vertical && (orientationClass = "vjs-volume-vertical"), _Component.prototype.createEl.call(this, "div", { className: "vjs-volume-control vjs-control " + orientationClass }); - }, _proto.handleMouseDown = function(event) { + }, _proto.handleMouseDown = function handleMouseDown(event) { var doc = this.el_.ownerDocument; this.on(doc, "mousemove", this.throttledHandleMouseMove), this.on(doc, "touchmove", this.throttledHandleMouseMove), this.on(doc, "mouseup", this.handleMouseUpHandler_), this.on(doc, "touchend", this.handleMouseUpHandler_); - }, _proto.handleMouseUp = function(event) { + }, _proto.handleMouseUp = function handleMouseUp(event) { var doc = this.el_.ownerDocument; this.off(doc, "mousemove", this.throttledHandleMouseMove), this.off(doc, "touchmove", this.throttledHandleMouseMove), this.off(doc, "mouseup", this.handleMouseUpHandler_), this.off(doc, "touchend", this.handleMouseUpHandler_); - }, _proto.handleMouseMove = function(event) { + }, _proto.handleMouseMove = function handleMouseMove(event) { this.volumeBar.handleMouseMove(event); }, VolumeControl; }(Component$1); @@ -3217,22 +3217,22 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(MuteToggle, _Button); var _proto = MuteToggle.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-mute-control " + _Button.prototype.buildCSSClass.call(this); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { var vol = this.player_.volume(), lastVolume = this.player_.lastVolume_(); if (0 === vol) { var volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume; this.player_.volume(volumeToSet), this.player_.muted(!1); } else this.player_.muted(!this.player_.muted()); - }, _proto.update = function(event) { + }, _proto.update = function update(event) { this.updateIcon_(), this.updateControlText_(); - }, _proto.updateIcon_ = function() { + }, _proto.updateIcon_ = function updateIcon_() { var vol = this.player_.volume(), level = 3; IS_IOS && this.player_.tech_ && this.player_.tech_.el_ && this.player_.muted(this.player_.tech_.el_.muted), 0 === vol || this.player_.muted() ? level = 0 : vol < 0.33 ? level = 1 : vol < 0.67 && (level = 2); for(var i = 0; i < 4; i++)removeClass(this.el_, "vjs-vol-" + i); addClass(this.el_, "vjs-vol-" + level); - }, _proto.updateControlText_ = function() { + }, _proto.updateControlText_ = function updateControlText_() { var text = this.player_.muted() || 0 === this.player_.volume() ? "Unmute" : "Mute"; this.controlText() !== text && this.controlText(text); }, MuteToggle; @@ -3265,26 +3265,26 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VolumePanel, _Component); var _proto = VolumePanel.prototype; - return _proto.sliderActive_ = function() { + return _proto.sliderActive_ = function sliderActive_() { this.addClass("vjs-slider-active"); - }, _proto.sliderInactive_ = function() { + }, _proto.sliderInactive_ = function sliderInactive_() { this.removeClass("vjs-slider-active"); - }, _proto.volumePanelState_ = function() { + }, _proto.volumePanelState_ = function volumePanelState_() { this.volumeControl.hasClass("vjs-hidden") && this.muteToggle.hasClass("vjs-hidden") && this.addClass("vjs-hidden"), this.volumeControl.hasClass("vjs-hidden") && !this.muteToggle.hasClass("vjs-hidden") && this.addClass("vjs-mute-toggle-only"); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl() { var orientationClass = "vjs-volume-panel-horizontal"; return this.options_.inline || (orientationClass = "vjs-volume-panel-vertical"), _Component.prototype.createEl.call(this, "div", { className: "vjs-volume-panel vjs-control " + orientationClass }); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.handleMouseOut(), _Component.prototype.dispose.call(this); - }, _proto.handleVolumeControlKeyUp = function(event) { + }, _proto.handleVolumeControlKeyUp = function handleVolumeControlKeyUp(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Esc") && this.muteToggle.focus(); - }, _proto.handleMouseOver = function(event) { + }, _proto.handleMouseOver = function handleMouseOver(event) { this.addClass("vjs-hover"), on(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "keyup", this.handleKeyPressHandler_); - }, _proto.handleMouseOut = function(event) { + }, _proto.handleMouseOut = function handleMouseOut(event) { this.removeClass("vjs-hover"), off(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "keyup", this.handleKeyPressHandler_); - }, _proto.handleKeyPress = function(event) { + }, _proto.handleKeyPress = function handleKeyPress(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Esc") && this.handleMouseOut(); }, VolumePanel; }(Component$1); @@ -3307,22 +3307,22 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(Menu, _Component); var _proto = Menu.prototype; - return _proto.addEventListenerForItem = function(component) { + return _proto.addEventListenerForItem = function addEventListenerForItem(component) { component instanceof Component$1 && (this.on(component, "blur", this.boundHandleBlur_), this.on(component, [ "tap", "click" ], this.boundHandleTapClick_)); - }, _proto.removeEventListenerForItem = function(component) { + }, _proto.removeEventListenerForItem = function removeEventListenerForItem(component) { component instanceof Component$1 && (this.off(component, "blur", this.boundHandleBlur_), this.off(component, [ "tap", "click" ], this.boundHandleTapClick_)); - }, _proto.removeChild = function(component) { + }, _proto.removeChild = function removeChild(component) { "string" == typeof component && (component = this.getChild(component)), this.removeEventListenerForItem(component), _Component.prototype.removeChild.call(this, component); - }, _proto.addItem = function(component) { + }, _proto.addItem = function addItem(component) { var childComponent = this.addChild(component); childComponent && this.addEventListenerForItem(childComponent); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl$1() { var contentElType = this.options_.contentElType || "ul"; this.contentEl_ = createEl(contentElType, { className: "vjs-menu-content" @@ -3334,9 +3334,9 @@ return el.appendChild(this.contentEl_), on(el, "click", function(event) { event.preventDefault(), event.stopImmediatePropagation(); }), el; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.contentEl_ = null, this.boundHandleBlur_ = null, this.boundHandleTapClick_ = null, _Component.prototype.dispose.call(this); - }, _proto.handleBlur = function(event) { + }, _proto.handleBlur = function handleBlur(event) { var relatedTarget = event.relatedTarget || global_document__WEBPACK_IMPORTED_MODULE_1___default().activeElement; if (!this.children().some(function(element) { return element.el() === relatedTarget; @@ -3344,7 +3344,7 @@ var btn = this.menuButton_; btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild && btn.unpressButton(); } - }, _proto.handleTapClick = function(event) { + }, _proto.handleTapClick = function handleTapClick(event) { if (this.menuButton_) { this.menuButton_.unpressButton(); var childComponents = this.children(); @@ -3355,15 +3355,15 @@ foundComponent && "CaptionSettingsMenuItem" !== foundComponent.name() && this.menuButton_.focus(); } } - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Left") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Down") ? (event.preventDefault(), event.stopPropagation(), this.stepForward()) : (keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Right") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Up")) && (event.preventDefault(), event.stopPropagation(), this.stepBack()); - }, _proto.stepForward = function() { + }, _proto.stepForward = function stepForward() { var stepChild = 0; void 0 !== this.focusedChild_ && (stepChild = this.focusedChild_ + 1), this.focus(stepChild); - }, _proto.stepBack = function() { + }, _proto.stepBack = function stepBack() { var stepChild = 0; void 0 !== this.focusedChild_ && (stepChild = this.focusedChild_ - 1), this.focus(stepChild); - }, _proto.focus = function(item) { + }, _proto.focus = function focus(item) { void 0 === item && (item = 0); var children = this.children().slice(); children.length && children[0].hasClass("vjs-menu-title") && children.shift(), children.length > 0 && (item < 0 ? item = 0 : item >= children.length && (item = children.length - 1), this.focusedChild_ = item, children[item].el_.focus()); @@ -3392,10 +3392,10 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(MenuButton, _Component); var _proto = MenuButton.prototype; - return _proto.update = function() { + return _proto.update = function update() { var menu = this.createMenu(); this.menu && (this.menu.dispose(), this.removeChild(this.menu)), this.menu = menu, this.addChild(menu), this.buttonPressed_ = !1, this.menuButton_.el_.setAttribute("aria-expanded", "false"), this.items && this.items.length <= this.hideThreshold_ ? this.hide() : this.show(); - }, _proto.createMenu = function() { + }, _proto.createMenu = function createMenu() { var menu = new Menu(this.player_, { menuButton: this }); @@ -3411,43 +3411,43 @@ } if (this.items = this.createItems(), this.items) for(var i = 0; i < this.items.length; i++)menu.addItem(this.items[i]); return menu; - }, _proto.createItems = function() {}, _proto.createEl = function() { + }, _proto.createItems = function createItems() {}, _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: this.buildWrapperCSSClass() }, {}); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { var menuButtonClass = "vjs-menu-button"; return !0 === this.options_.inline ? menuButtonClass += "-inline" : menuButtonClass += "-popup", "vjs-menu-button " + menuButtonClass + " " + Button.prototype.buildCSSClass() + " " + _Component.prototype.buildCSSClass.call(this); - }, _proto.buildCSSClass = function() { + }, _proto.buildCSSClass = function buildCSSClass() { var menuButtonClass = "vjs-menu-button"; return !0 === this.options_.inline ? menuButtonClass += "-inline" : menuButtonClass += "-popup", "vjs-menu-button " + menuButtonClass + " " + _Component.prototype.buildCSSClass.call(this); - }, _proto.controlText = function(text, el) { + }, _proto.controlText = function controlText(text, el) { return void 0 === el && (el = this.menuButton_.el()), this.menuButton_.controlText(text, el); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.handleMouseLeave(), _Component.prototype.dispose.call(this); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { this.buttonPressed_ ? this.unpressButton() : this.pressButton(); - }, _proto.handleMouseLeave = function(event) { + }, _proto.handleMouseLeave = function handleMouseLeave(event) { this.removeClass("vjs-hover"), off(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "keyup", this.handleMenuKeyUp_); - }, _proto.focus = function() { + }, _proto.focus = function focus() { this.menuButton_.focus(); - }, _proto.blur = function() { + }, _proto.blur = function blur() { this.menuButton_.blur(); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Esc") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Tab") ? (this.buttonPressed_ && this.unpressButton(), keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Tab") || (event.preventDefault(), this.menuButton_.focus())) : (keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Up") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Down")) && !this.buttonPressed_ && (event.preventDefault(), this.pressButton()); - }, _proto.handleMenuKeyUp = function(event) { + }, _proto.handleMenuKeyUp = function handleMenuKeyUp(event) { (keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Esc") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Tab")) && this.removeClass("vjs-hover"); - }, _proto.handleSubmenuKeyPress = function(event) { + }, _proto.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) { this.handleSubmenuKeyDown(event); - }, _proto.handleSubmenuKeyDown = function(event) { + }, _proto.handleSubmenuKeyDown = function handleSubmenuKeyDown(event) { (keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Esc") || keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Tab")) && (this.buttonPressed_ && this.unpressButton(), keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Tab") || (event.preventDefault(), this.menuButton_.focus())); - }, _proto.pressButton = function() { + }, _proto.pressButton = function pressButton() { this.enabled_ && (this.buttonPressed_ = !0, this.menu.show(), this.menu.lockShowing(), this.menuButton_.el_.setAttribute("aria-expanded", "true"), IS_IOS && isInFrame() || this.menu.focus()); - }, _proto.unpressButton = function() { + }, _proto.unpressButton = function unpressButton() { this.enabled_ && (this.buttonPressed_ = !1, this.menu.unlockShowing(), this.menu.hide(), this.menuButton_.el_.setAttribute("aria-expanded", "false")); - }, _proto.disable = function() { + }, _proto.disable = function disable() { this.unpressButton(), this.enabled_ = !1, this.addClass("vjs-disabled"), this.menuButton_.disable(); - }, _proto.enable = function() { + }, _proto.enable = function enable() { this.enabled_ = !0, this.removeClass("vjs-disabled"), this.menuButton_.enable(); }, MenuButton; }(Component$1); @@ -3478,7 +3478,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(MenuItem, _ClickableComponent); var _proto = MenuItem.prototype; - return _proto.createEl = function(type, props, attrs) { + return _proto.createEl = function createEl$1(type, props, attrs) { this.nonIconControl = !0; var el = _ClickableComponent.prototype.createEl.call(this, "li", assign({ className: "vjs-menu-item", @@ -3488,13 +3488,13 @@ className: "vjs-menu-item-text", textContent: this.localize(this.options_.label) }), el.querySelector(".vjs-icon-placeholder")), el; - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { MenuKeys.some(function(key) { return keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, key); }) || _ClickableComponent.prototype.handleKeyDown.call(this, event); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { this.selected(!0); - }, _proto.selected = function(_selected) { + }, _proto.selected = function selected(_selected) { this.selectable && (_selected ? (this.addClass("vjs-selected"), this.el_.setAttribute("aria-checked", "true"), this.controlText(", selected"), this.isSelected_ = !0) : (this.removeClass("vjs-selected"), this.el_.setAttribute("aria-checked", "false"), this.controlText(""), this.isSelected_ = !1)); }, MenuItem; }(ClickableComponent); @@ -3532,16 +3532,16 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TextTrackMenuItem, _MenuItem); var _proto = TextTrackMenuItem.prototype; - return _proto.handleClick = function(event) { + return _proto.handleClick = function handleClick(event) { var referenceTrack = this.track, tracks = this.player_.textTracks(); if (_MenuItem.prototype.handleClick.call(this, event), tracks) for(var i = 0; i < tracks.length; i++){ var track = tracks[i]; -1 !== this.kinds.indexOf(track.kind) && (track === referenceTrack ? "showing" !== track.mode && (track.mode = "showing") : "disabled" !== track.mode && (track.mode = "disabled")); } - }, _proto.handleTracksChange = function(event) { + }, _proto.handleTracksChange = function handleTracksChange(event) { var shouldBeSelected = "showing" === this.track.mode; shouldBeSelected !== this.isSelected_ && this.selected(shouldBeSelected); - }, _proto.handleSelectedLanguageChange = function(event) { + }, _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) { if ("showing" === this.track.mode) { var selectedLanguage = this.player_.cache_.selectedLanguage; selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind || (this.player_.cache_.selectedLanguage = { @@ -3550,7 +3550,7 @@ kind: this.track.kind }); } - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.track = null, _MenuItem.prototype.dispose.call(this); }, TextTrackMenuItem; }(MenuItem); @@ -3569,7 +3569,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(OffTextTrackMenuItem, _TextTrackMenuItem); var _proto = OffTextTrackMenuItem.prototype; - return _proto.handleTracksChange = function(event) { + return _proto.handleTracksChange = function handleTracksChange(event) { for(var tracks = this.player().textTracks(), shouldBeSelected = !0, i = 0, l = tracks.length; i < l; i++){ var track = tracks[i]; if (this.options_.kinds.indexOf(track.kind) > -1 && "showing" === track.mode) { @@ -3578,7 +3578,7 @@ } } shouldBeSelected !== this.isSelected_ && this.selected(shouldBeSelected); - }, _proto.handleSelectedLanguageChange = function(event) { + }, _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) { for(var tracks = this.player().textTracks(), allHidden = !0, i = 0, l = tracks.length; i < l; i++){ var track = tracks[i]; if ([ @@ -3600,7 +3600,7 @@ function TextTrackButton(player, options) { return void 0 === options && (options = {}), options.tracks = player.textTracks(), _TrackButton.call(this, player, options) || this; } - return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TextTrackButton, _TrackButton), TextTrackButton.prototype.createItems = function(items, TrackMenuItem) { + return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TextTrackButton, _TrackButton), TextTrackButton.prototype.createItems = function createItems(items, TrackMenuItem) { void 0 === items && (items = []), void 0 === TrackMenuItem && (TrackMenuItem = TextTrackMenuItem), this.label_ && (label = this.label_ + " off"), items.push(new OffTextTrackMenuItem(this.player_, { kinds: this.kinds_, kind: this.kind_, @@ -3634,9 +3634,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ChaptersTrackMenuItem, _MenuItem); var _proto = ChaptersTrackMenuItem.prototype; - return _proto.handleClick = function(event) { + return _proto.handleClick = function handleClick(event) { _MenuItem.prototype.handleClick.call(this), this.player_.currentTime(this.cue.startTime), this.update(this.cue.startTime); - }, _proto.update = function(event) { + }, _proto.update = function update(event) { var cue = this.cue, currentTime = this.player_.currentTime(); this.selected(cue.startTime <= currentTime && currentTime < cue.endTime); }, ChaptersTrackMenuItem; @@ -3648,13 +3648,13 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ChaptersButton, _TextTrackButton); var _proto = ChaptersButton.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-chapters-button " + _TextTrackButton.prototype.buildCSSClass.call(this); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { return "vjs-chapters-button " + _TextTrackButton.prototype.buildWrapperCSSClass.call(this); - }, _proto.update = function(event) { + }, _proto.update = function update(event) { (!this.track_ || event && ("addtrack" === event.type || "removetrack" === event.type)) && this.setTrack(this.findChaptersTrack()), _TextTrackButton.prototype.update.call(this); - }, _proto.setTrack = function(track) { + }, _proto.setTrack = function setTrack(track) { if (this.track_ !== track) { if (this.updateHandler_ || (this.updateHandler_ = this.update.bind(this)), this.track_) { var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_); @@ -3666,16 +3666,16 @@ _remoteTextTrackEl && _remoteTextTrackEl.addEventListener("load", this.updateHandler_); } } - }, _proto.findChaptersTrack = function() { + }, _proto.findChaptersTrack = function findChaptersTrack() { for(var tracks = this.player_.textTracks() || [], i = tracks.length - 1; i >= 0; i--){ var track = tracks[i]; if (track.kind === this.kind_) return track; } - }, _proto.getMenuCaption = function() { + }, _proto.getMenuCaption = function getMenuCaption() { return this.track_ && this.track_.label ? this.track_.label : this.localize(toTitleCase$1(this.kind_)); - }, _proto.createMenu = function() { + }, _proto.createMenu = function createMenu() { return this.options_.title = this.getMenuCaption(), _TextTrackButton.prototype.createMenu.call(this); - }, _proto.createItems = function() { + }, _proto.createItems = function createItems() { var items = []; if (!this.track_) return items; var cues = this.track_.cues; @@ -3701,7 +3701,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(DescriptionsButton, _TextTrackButton); var _proto = DescriptionsButton.prototype; - return _proto.handleTracksChange = function(event) { + return _proto.handleTracksChange = function handleTracksChange(event) { for(var tracks = this.player().textTracks(), disabled = !1, i = 0, l = tracks.length; i < l; i++){ var track = tracks[i]; if (track.kind !== this.kind_ && "showing" === track.mode) { @@ -3710,9 +3710,9 @@ } } disabled ? this.disable() : this.enable(); - }, _proto.buildCSSClass = function() { + }, _proto.buildCSSClass = function buildCSSClass() { return "vjs-descriptions-button " + _TextTrackButton.prototype.buildCSSClass.call(this); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { return "vjs-descriptions-button " + _TextTrackButton.prototype.buildWrapperCSSClass.call(this); }, DescriptionsButton; }(TextTrackButton); @@ -3723,9 +3723,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SubtitlesButton, _TextTrackButton); var _proto = SubtitlesButton.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-subtitles-button " + _TextTrackButton.prototype.buildCSSClass.call(this); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { return "vjs-subtitles-button " + _TextTrackButton.prototype.buildWrapperCSSClass.call(this); }, SubtitlesButton; }(TextTrackButton); @@ -3742,7 +3742,7 @@ mode: "disabled" }, options.selectable = !1, options.name = "CaptionSettingsMenuItem", (_this = _TextTrackMenuItem.call(this, player, options) || this).addClass("vjs-texttrack-settings"), _this.controlText(", opens " + options.kind + " settings dialog"), _this; } - return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(CaptionSettingsMenuItem, _TextTrackMenuItem), CaptionSettingsMenuItem.prototype.handleClick = function(event) { + return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(CaptionSettingsMenuItem, _TextTrackMenuItem), CaptionSettingsMenuItem.prototype.handleClick = function handleClick(event) { this.player().getChild("textTrackSettings").open(); }, CaptionSettingsMenuItem; }(TextTrackMenuItem); @@ -3753,11 +3753,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(CaptionsButton, _TextTrackButton); var _proto = CaptionsButton.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-captions-button " + _TextTrackButton.prototype.buildCSSClass.call(this); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { return "vjs-captions-button " + _TextTrackButton.prototype.buildWrapperCSSClass.call(this); - }, _proto.createItems = function() { + }, _proto.createItems = function createItems() { var items = []; return !(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild("textTrackSettings") && (items.push(new CaptionSettingsMenuItem(this.player_, { kind: this.kind_ @@ -3769,7 +3769,7 @@ function SubsCapsMenuItem() { return _TextTrackMenuItem.apply(this, arguments) || this; } - return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SubsCapsMenuItem, _TextTrackMenuItem), SubsCapsMenuItem.prototype.createEl = function(type, props, attrs) { + return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SubsCapsMenuItem, _TextTrackMenuItem), SubsCapsMenuItem.prototype.createEl = function createEl$1(type, props, attrs) { var el = _TextTrackMenuItem.prototype.createEl.call(this, type, props, attrs), parentSpan = el.querySelector(".vjs-menu-item-text"); return "captions" === this.options_.track.kind && (parentSpan.appendChild(createEl("span", { className: "vjs-icon-placeholder" @@ -3794,11 +3794,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SubsCapsButton, _TextTrackButton); var _proto = SubsCapsButton.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-subs-caps-button " + _TextTrackButton.prototype.buildCSSClass.call(this); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { return "vjs-subs-caps-button " + _TextTrackButton.prototype.buildWrapperCSSClass.call(this); - }, _proto.createItems = function() { + }, _proto.createItems = function createItems() { var items = []; return !(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild("textTrackSettings") && (items.push(new CaptionSettingsMenuItem(this.player_, { kind: this.label_ @@ -3823,7 +3823,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(AudioTrackMenuItem, _MenuItem); var _proto = AudioTrackMenuItem.prototype; - return _proto.createEl = function(type, props, attrs) { + return _proto.createEl = function createEl(type, props, attrs) { var el = _MenuItem.prototype.createEl.call(this, type, props, attrs), parentSpan = el.querySelector(".vjs-menu-item-text"); return "main-desc" === this.options_.track.kind && (parentSpan.appendChild(_MenuItem.prototype.createEl.call(this, "span", { className: "vjs-icon-placeholder" @@ -3833,9 +3833,9 @@ className: "vjs-control-text", textContent: this.localize("Descriptions") }))), el; - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { _MenuItem.prototype.handleClick.call(this, event), this.track.enabled = !0; - }, _proto.handleTracksChange = function(event) { + }, _proto.handleTracksChange = function handleTracksChange(event) { this.selected(this.track.enabled); }, AudioTrackMenuItem; }(MenuItem); @@ -3846,11 +3846,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(AudioTrackButton, _TrackButton); var _proto = AudioTrackButton.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-audio-button " + _TrackButton.prototype.buildCSSClass.call(this); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { return "vjs-audio-button " + _TrackButton.prototype.buildWrapperCSSClass.call(this); - }, _proto.createItems = function(items) { + }, _proto.createItems = function createItems(items) { void 0 === items && (items = []), this.hideThreshold_ = 1; for(var tracks = this.player_.audioTracks(), i = 0; i < tracks.length; i++){ var track = tracks[i]; @@ -3873,9 +3873,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(PlaybackRateMenuItem, _MenuItem); var _proto = PlaybackRateMenuItem.prototype; - return _proto.handleClick = function(event) { + return _proto.handleClick = function handleClick(event) { _MenuItem.prototype.handleClick.call(this), this.player().playbackRate(this.rate); - }, _proto.update = function(event) { + }, _proto.update = function update(event) { this.selected(this.player().playbackRate() === this.rate); }, PlaybackRateMenuItem; }(MenuItem); @@ -3893,42 +3893,42 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(PlaybackRateMenuButton, _MenuButton); var _proto = PlaybackRateMenuButton.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl$1() { var el = _MenuButton.prototype.createEl.call(this); return this.labelElId_ = "vjs-playback-rate-value-label-" + this.id_, this.labelEl_ = createEl("div", { className: "vjs-playback-rate-value", id: this.labelElId_, textContent: "1x" }), el.appendChild(this.labelEl_), el; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.labelEl_ = null, _MenuButton.prototype.dispose.call(this); - }, _proto.buildCSSClass = function() { + }, _proto.buildCSSClass = function buildCSSClass() { return "vjs-playback-rate " + _MenuButton.prototype.buildCSSClass.call(this); - }, _proto.buildWrapperCSSClass = function() { + }, _proto.buildWrapperCSSClass = function buildWrapperCSSClass() { return "vjs-playback-rate " + _MenuButton.prototype.buildWrapperCSSClass.call(this); - }, _proto.createItems = function() { + }, _proto.createItems = function createItems() { for(var rates = this.playbackRates(), items = [], i = rates.length - 1; i >= 0; i--)items.push(new PlaybackRateMenuItem(this.player(), { rate: rates[i] + "x" })); return items; - }, _proto.updateARIAAttributes = function() { + }, _proto.updateARIAAttributes = function updateARIAAttributes() { this.el().setAttribute("aria-valuenow", this.player().playbackRate()); - }, _proto.handleClick = function(event) { + }, _proto.handleClick = function handleClick(event) { for(var currentRate = this.player().playbackRate(), rates = this.playbackRates(), newRate = rates[0], i = 0; i < rates.length; i++)if (rates[i] > currentRate) { newRate = rates[i]; break; } this.player().playbackRate(newRate); - }, _proto.handlePlaybackRateschange = function(event) { + }, _proto.handlePlaybackRateschange = function handlePlaybackRateschange(event) { this.update(); - }, _proto.playbackRates = function() { + }, _proto.playbackRates = function playbackRates() { var player = this.player(); return player.playbackRates && player.playbackRates() || []; - }, _proto.playbackRateSupported = function() { + }, _proto.playbackRateSupported = function playbackRateSupported() { return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0; - }, _proto.updateVisibility = function(event) { + }, _proto.updateVisibility = function updateVisibility(event) { this.playbackRateSupported() ? this.removeClass("vjs-hidden") : this.addClass("vjs-hidden"); - }, _proto.updateLabel = function(event) { + }, _proto.updateLabel = function updateLabel(event) { this.playbackRateSupported() && (this.labelEl_.textContent = this.player().playbackRate() + "x"); }, PlaybackRateMenuButton; }(MenuButton); @@ -3939,9 +3939,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(Spacer, _Component); var _proto = Spacer.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-spacer " + _Component.prototype.buildCSSClass.call(this); - }, _proto.createEl = function(tag, props, attributes) { + }, _proto.createEl = function createEl(tag, props, attributes) { return void 0 === tag && (tag = "div"), void 0 === props && (props = {}), void 0 === attributes && (attributes = {}), props.className || (props.className = this.buildCSSClass()), _Component.prototype.createEl.call(this, tag, props, attributes); }, Spacer; }(Component$1); @@ -3952,9 +3952,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(CustomControlSpacer, _Spacer); var _proto = CustomControlSpacer.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-custom-control-spacer " + _Spacer.prototype.buildCSSClass.call(this); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl() { return _Spacer.prototype.createEl.call(this, "div", { className: this.buildCSSClass(), textContent: "\xA0" @@ -3966,7 +3966,7 @@ function ControlBar() { return _Component.apply(this, arguments) || this; } - return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ControlBar, _Component), ControlBar.prototype.createEl = function() { + return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ControlBar, _Component), ControlBar.prototype.createEl = function createEl() { return _Component.prototype.createEl.call(this, "div", { className: "vjs-control-bar", dir: "ltr" @@ -4002,9 +4002,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ErrorDisplay, _ModalDialog); var _proto = ErrorDisplay.prototype; - return _proto.buildCSSClass = function() { + return _proto.buildCSSClass = function buildCSSClass() { return "vjs-error-display " + _ModalDialog.prototype.buildCSSClass.call(this); - }, _proto.content = function() { + }, _proto.content = function content() { var error = this.player().error(); return error ? this.localize(error.message) : ""; }, ErrorDisplay; @@ -4194,7 +4194,7 @@ ] ], default: 2, - parser: function(v) { + parser: function parser(v) { return "1.00" === v ? null : Number(v); } }, @@ -4243,9 +4243,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TextTrackSettings, _ModalDialog); var _proto = TextTrackSettings.prototype; - return _proto.dispose = function() { + return _proto.dispose = function dispose() { this.endDialog = null, _ModalDialog.prototype.dispose.call(this); - }, _proto.createElSelect_ = function(key, legendId, type) { + }, _proto.createElSelect_ = function createElSelect_(key, legendId, type) { var _this2 = this; void 0 === legendId && (legendId = ""), void 0 === type && (type = "label"); var config = selectConfigs[key], id = config.id.replace("%s", this.id_), selectLabelledbyIds = [ @@ -4266,7 +4266,7 @@ "" ].join(""); })).concat("").join(""); - }, _proto.createElFgColor_ = function() { + }, _proto.createElFgColor_ = function createElFgColor_() { var legendId = "captions-text-legend-" + this.id_; return [ '
', @@ -4279,7 +4279,7 @@ "", "
" ].join(""); - }, _proto.createElBgColor_ = function() { + }, _proto.createElBgColor_ = function createElBgColor_() { var legendId = "captions-background-" + this.id_; return [ '
', @@ -4292,7 +4292,7 @@ "", "
" ].join(""); - }, _proto.createElWinColor_ = function() { + }, _proto.createElWinColor_ = function createElWinColor_() { var legendId = "captions-window-" + this.id_; return [ '
', @@ -4305,7 +4305,7 @@ "", "
" ].join(""); - }, _proto.createElColors_ = function() { + }, _proto.createElColors_ = function createElColors_() { return createEl("div", { className: "vjs-track-settings-colors", innerHTML: [ @@ -4314,7 +4314,7 @@ this.createElWinColor_() ].join("") }); - }, _proto.createElFont_ = function() { + }, _proto.createElFont_ = function createElFont_() { return createEl("div", { className: "vjs-track-settings-font", innerHTML: [ @@ -4329,7 +4329,7 @@ "" ].join("") }); - }, _proto.createElControls_ = function() { + }, _proto.createElControls_ = function createElControls_() { var defaultsDescription = this.localize("restore all settings to the default values"); return createEl("div", { className: "vjs-track-settings-controls", @@ -4341,19 +4341,19 @@ '" ].join("") }); - }, _proto.content = function() { + }, _proto.content = function content() { return [ this.createElColors_(), this.createElFont_(), this.createElControls_() ]; - }, _proto.label = function() { + }, _proto.label = function label() { return this.localize("Caption Settings Dialog"); - }, _proto.description = function() { + }, _proto.description = function description() { return this.localize("Beginning of dialog window. Escape will cancel and close the window."); - }, _proto.buildCSSClass = function() { + }, _proto.buildCSSClass = function buildCSSClass() { return _ModalDialog.prototype.buildCSSClass.call(this) + " vjs-text-track-settings"; - }, _proto.getValues = function() { + }, _proto.getValues = function getValues() { var fn, _this3 = this; return fn = function(accum, config, key) { var el, parser, value = (el = _this3.$(config.selector), parser = config.parser, parseOptionValue(el.options[el.options.selectedIndex].value, parser)); @@ -4361,7 +4361,7 @@ }, keys(selectConfigs).reduce(function(accum, key) { return fn(accum, selectConfigs[key], key); }, {}); - }, _proto.setValues = function(values) { + }, _proto.setValues = function setValues(values) { var _this4 = this; each(selectConfigs, function(config, key) { !function(el, value, parser) { @@ -4373,13 +4373,13 @@ } }(_this4.$(config.selector), values[key], config.parser); }); - }, _proto.setDefaults = function() { + }, _proto.setDefaults = function setDefaults() { var _this5 = this; each(selectConfigs, function(config) { var index = config.hasOwnProperty("default") ? config.default : 0; _this5.$(config.selector).selectedIndex = index; }); - }, _proto.restoreSettings = function() { + }, _proto.restoreSettings = function restoreSettings() { var values; try { values = JSON.parse(global_window__WEBPACK_IMPORTED_MODULE_0___default().localStorage.getItem(LOCAL_STORAGE_KEY$1)); @@ -4387,7 +4387,7 @@ log$1.warn(err); } values && this.setValues(values); - }, _proto.saveSettings = function() { + }, _proto.saveSettings = function saveSettings() { if (this.options_.persistTextTrackSettings) { var values = this.getValues(); try { @@ -4396,10 +4396,10 @@ log$1.warn(err); } } - }, _proto.updateDisplay = function() { + }, _proto.updateDisplay = function updateDisplay() { var ttDisplay = this.player_.getChild("textTrackDisplay"); ttDisplay && ttDisplay.updateDisplay(); - }, _proto.conditionalBlur_ = function() { + }, _proto.conditionalBlur_ = function conditionalBlur_() { this.previouslyActiveEl_ = null; var cb = this.player_.controlBar, subsCapsBtn = cb && cb.subsCapsButton, ccBtn = cb && cb.captionsButton; subsCapsBtn ? subsCapsBtn.focus() : ccBtn && ccBtn.focus(); @@ -4427,16 +4427,16 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(ResizeManager, _Component); var _proto = ResizeManager.prototype; - return _proto.createEl = function() { + return _proto.createEl = function createEl() { return _Component.prototype.createEl.call(this, "iframe", { className: "vjs-resize-manager", tabIndex: -1 }, { "aria-hidden": "true" }); - }, _proto.resizeHandler = function() { + }, _proto.resizeHandler = function resizeHandler() { this.player_ && this.player_.trigger && this.player_.trigger("playerresize"); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.debouncedHandler_ && this.debouncedHandler_.cancel(), this.resizeObserver_ && (this.player_.el() && this.resizeObserver_.unobserve(this.player_.el()), this.resizeObserver_.disconnect()), this.loadListener_ && this.off("load", this.loadListener_), this.el_ && this.el_.contentWindow && this.unloadListener_ && this.unloadListener_.call(this.el_.contentWindow), this.ResizeObserver = null, this.resizeObserver = null, this.debouncedHandler_ = null, this.loadListener_ = null, _Component.prototype.dispose.call(this); }, ResizeManager; }(Component$1); @@ -4469,9 +4469,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(LiveTracker, _Component); var _proto = LiveTracker.prototype; - return _proto.handleVisibilityChange = function() { + return _proto.handleVisibilityChange = function handleVisibilityChange() { this.player_.duration() === 1 / 0 && (global_document__WEBPACK_IMPORTED_MODULE_1___default().hidden ? this.stopTracking() : this.startTracking()); - }, _proto.trackLive_ = function() { + }, _proto.trackLive_ = function trackLive_() { var seekable = this.player_.seekable(); if (seekable && seekable.length) { var newTime = Number(global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.now().toFixed(4)), deltaTime = -1 === this.lastTime_ ? 0 : (newTime - this.lastTime_) / 1000; @@ -4479,56 +4479,56 @@ var liveCurrentTime = this.liveCurrentTime(), currentTime = this.player_.currentTime(), isBehind = this.player_.paused() || this.seekedBehindLive_ || Math.abs(liveCurrentTime - currentTime) > this.options_.liveTolerance; this.timeupdateSeen_ && liveCurrentTime !== 1 / 0 || (isBehind = !1), isBehind !== this.behindLiveEdge_ && (this.behindLiveEdge_ = isBehind, this.trigger("liveedgechange")); } - }, _proto.handleDurationchange = function() { + }, _proto.handleDurationchange = function handleDurationchange() { this.toggleTracking(); - }, _proto.toggleTracking = function() { + }, _proto.toggleTracking = function toggleTracking() { this.player_.duration() === 1 / 0 && this.liveWindow() >= this.options_.trackingThreshold ? (this.player_.options_.liveui && this.player_.addClass("vjs-liveui"), this.startTracking()) : (this.player_.removeClass("vjs-liveui"), this.stopTracking()); - }, _proto.startTracking = function() { + }, _proto.startTracking = function startTracking() { this.isTracking() || (this.timeupdateSeen_ || (this.timeupdateSeen_ = this.player_.hasStarted()), this.trackingInterval_ = this.setInterval(this.trackLiveHandler_, 30), this.trackLive_(), this.on(this.player_, [ "play", "pause" ], this.trackLiveHandler_), this.timeupdateSeen_ ? this.on(this.player_, "seeked", this.handleSeeked_) : (this.one(this.player_, "play", this.handlePlay_), this.one(this.player_, "timeupdate", this.handleFirstTimeupdate_))); - }, _proto.handleFirstTimeupdate = function() { + }, _proto.handleFirstTimeupdate = function handleFirstTimeupdate() { this.timeupdateSeen_ = !0, this.on(this.player_, "seeked", this.handleSeeked_); - }, _proto.handleSeeked = function() { + }, _proto.handleSeeked = function handleSeeked() { var timeDiff = Math.abs(this.liveCurrentTime() - this.player_.currentTime()); this.seekedBehindLive_ = this.nextSeekedFromUser_ && timeDiff > 2, this.nextSeekedFromUser_ = !1, this.trackLive_(); - }, _proto.handlePlay = function() { + }, _proto.handlePlay = function handlePlay() { this.one(this.player_, "timeupdate", this.seekToLiveEdge_); - }, _proto.reset_ = function() { + }, _proto.reset_ = function reset_() { this.lastTime_ = -1, this.pastSeekEnd_ = 0, this.lastSeekEnd_ = -1, this.behindLiveEdge_ = !0, this.timeupdateSeen_ = !1, this.seekedBehindLive_ = !1, this.nextSeekedFromUser_ = !1, this.clearInterval(this.trackingInterval_), this.trackingInterval_ = null, this.off(this.player_, [ "play", "pause" ], this.trackLiveHandler_), this.off(this.player_, "seeked", this.handleSeeked_), this.off(this.player_, "play", this.handlePlay_), this.off(this.player_, "timeupdate", this.handleFirstTimeupdate_), this.off(this.player_, "timeupdate", this.seekToLiveEdge_); - }, _proto.nextSeekedFromUser = function() { + }, _proto.nextSeekedFromUser = function nextSeekedFromUser() { this.nextSeekedFromUser_ = !0; - }, _proto.stopTracking = function() { + }, _proto.stopTracking = function stopTracking() { this.isTracking() && (this.reset_(), this.trigger("liveedgechange")); - }, _proto.seekableEnd = function() { + }, _proto.seekableEnd = function seekableEnd() { for(var seekable = this.player_.seekable(), seekableEnds = [], i = seekable ? seekable.length : 0; i--;)seekableEnds.push(seekable.end(i)); return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : 1 / 0; - }, _proto.seekableStart = function() { + }, _proto.seekableStart = function seekableStart() { for(var seekable = this.player_.seekable(), seekableStarts = [], i = seekable ? seekable.length : 0; i--;)seekableStarts.push(seekable.start(i)); return seekableStarts.length ? seekableStarts.sort()[0] : 0; - }, _proto.liveWindow = function() { + }, _proto.liveWindow = function liveWindow() { var liveCurrentTime = this.liveCurrentTime(); return liveCurrentTime === 1 / 0 ? 0 : liveCurrentTime - this.seekableStart(); - }, _proto.isLive = function() { + }, _proto.isLive = function isLive() { return this.isTracking(); - }, _proto.atLiveEdge = function() { + }, _proto.atLiveEdge = function atLiveEdge() { return !this.behindLiveEdge(); - }, _proto.liveCurrentTime = function() { + }, _proto.liveCurrentTime = function liveCurrentTime() { return this.pastSeekEnd() + this.seekableEnd(); - }, _proto.pastSeekEnd = function() { + }, _proto.pastSeekEnd = function pastSeekEnd() { var seekableEnd = this.seekableEnd(); return -1 !== this.lastSeekEnd_ && seekableEnd !== this.lastSeekEnd_ && (this.pastSeekEnd_ = 0), this.lastSeekEnd_ = seekableEnd, this.pastSeekEnd_; - }, _proto.behindLiveEdge = function() { + }, _proto.behindLiveEdge = function behindLiveEdge() { return this.behindLiveEdge_; - }, _proto.isTracking = function() { + }, _proto.isTracking = function isTracking() { return "number" == typeof this.trackingInterval_; - }, _proto.seekToLiveEdge = function() { + }, _proto.seekToLiveEdge = function seekToLiveEdge() { this.seekedBehindLive_ = !1, this.atLiveEdge() || (this.nextSeekedFromUser_ = !1, this.player_.currentTime(this.liveCurrentTime())); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.off(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "visibilitychange", this.handleVisibilityChange_), this.stopTracking(), _Component.prototype.dispose.call(this); }, LiveTracker; }(Component$1); @@ -4544,10 +4544,10 @@ } return !!srcUrls.length && (1 === srcUrls.length && (src = srcUrls[0]), tech.triggerSourceset(src), !0); }, innerHTMLDescriptorPolyfill = Object.defineProperty({}, "innerHTML", { - get: function() { + get: function get() { return this.cloneNode(!0).innerHTML; }, - set: function(v) { + set: function set(v) { var dummy = global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement(this.nodeName.toLowerCase()); dummy.innerHTML = v; for(var docFrag = global_document__WEBPACK_IMPORTED_MODULE_1___default().createDocumentFragment(); dummy.childNodes.length;)docFrag.appendChild(dummy.childNodes[0]); @@ -4586,10 +4586,10 @@ }, tech.one("sourceset", el.resetSourceWatch_); } }, srcDescriptorPolyfill = Object.defineProperty({}, "src", { - get: function() { + get: function get() { return this.hasAttribute("src") ? getAbsoluteURL(global_window__WEBPACK_IMPORTED_MODULE_0___default().Element.prototype.getAttribute.call(this, "src")) : ""; }, - set: function(v) { + set: function set(v) { return global_window__WEBPACK_IMPORTED_MODULE_0___default().Element.prototype.setAttribute.call(this, "src", v), v; } }), setupSourceset = function(tech) { @@ -4602,7 +4602,7 @@ srcDescriptorPolyfill ], "src"), oldSetAttribute = el.setAttribute, oldLoad = el.load; Object.defineProperty(el, "src", mergeOptions$3(srcDescriptor, { - set: function(v) { + set: function set(v) { var retval = srcDescriptor.set.call(el, v); return tech.triggerSourceset(el.src), retval; } @@ -4628,7 +4628,7 @@ }, options = { configurable: !0, enumerable: !0, - get: function() { + get: function get() { var value = getValue(); return set(value), value; } @@ -4649,11 +4649,11 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(Html5, _Tech); var _proto = Html5.prototype; - return _proto.dispose = function() { + return _proto.dispose = function dispose() { this.el_ && this.el_.resetSourceset_ && this.el_.resetSourceset_(), Html5.disposeMediaElement(this.el_), this.options_ = null, _Tech.prototype.dispose.call(this); - }, _proto.setupSourcesetHandling_ = function() { + }, _proto.setupSourcesetHandling_ = function setupSourcesetHandling_() { setupSourceset(this); - }, _proto.restoreMetadataTracksInIOSNativePlayer_ = function() { + }, _proto.restoreMetadataTracksInIOSNativePlayer_ = function restoreMetadataTracksInIOSNativePlayer_() { var metadataTracksPreFullscreenState, textTracks = this.textTracks(), takeMetadataTrackSnapshot = function() { metadataTracksPreFullscreenState = []; for(var i = 0; i < textTracks.length; i++){ @@ -4679,7 +4679,7 @@ }), this.on("webkitendfullscreen", function() { textTracks.removeEventListener("change", takeMetadataTrackSnapshot), textTracks.addEventListener("change", takeMetadataTrackSnapshot), textTracks.removeEventListener("change", restoreTrackMode); }); - }, _proto.overrideNative_ = function(type, override) { + }, _proto.overrideNative_ = function overrideNative_(type, override) { var _this2 = this; if (override === this["featuresNative" + type + "Tracks"]) { var lowerCaseType = type.toLowerCase(); @@ -4687,15 +4687,15 @@ _this2.el()[lowerCaseType + "Tracks"].removeEventListener(eventName, _this2[lowerCaseType + "TracksListeners_"][eventName]); }), this["featuresNative" + type + "Tracks"] = !override, this[lowerCaseType + "TracksListeners_"] = null, this.proxyNativeTracksForType_(lowerCaseType); } - }, _proto.overrideNativeAudioTracks = function(override) { + }, _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks(override) { this.overrideNative_("Audio", override); - }, _proto.overrideNativeVideoTracks = function(override) { + }, _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks(override) { this.overrideNative_("Video", override); - }, _proto.proxyNativeTracksForType_ = function(name) { + }, _proto.proxyNativeTracksForType_ = function proxyNativeTracksForType_(name) { var _this3 = this, props = NORMAL[name], elTracks = this.el()[props.getterName], techTracks = this[props.getterName](); if (this["featuresNative" + props.capitalName + "Tracks"] && elTracks && elTracks.addEventListener) { var listeners = { - change: function(e) { + change: function change(e) { var event = { type: "change", target: techTracks, @@ -4704,10 +4704,10 @@ }; techTracks.trigger(event), "text" === name && _this3[REMOTE.remoteText.getterName]().trigger(event); }, - addtrack: function(e) { + addtrack: function addtrack(e) { techTracks.addTrack(e.track); }, - removetrack: function(e) { + removetrack: function removetrack(e) { techTracks.removeTrack(e.track); } }, removeOldTracks = function() { @@ -4729,12 +4729,12 @@ return _this3.off("loadstart", removeOldTracks); }); } - }, _proto.proxyNativeTracks_ = function() { + }, _proto.proxyNativeTracks_ = function proxyNativeTracks_() { var _this4 = this; NORMAL.names.forEach(function(name) { _this4.proxyNativeTracksForType_(name); }); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl() { var el = this.options_.tag; if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) { if (el) { @@ -4761,7 +4761,7 @@ void 0 !== value && (value ? setAttribute(el, attr, attr) : removeAttribute(el, attr), el[attr] = value); } return el; - }, _proto.handleLateInit_ = function(el) { + }, _proto.handleLateInit_ = function handleLateInit_(el) { if (0 !== el.networkState && 3 !== el.networkState) { if (0 === el.readyState) { var loadstartFired = !1, setLoadstartFired = function() { @@ -4785,26 +4785,26 @@ }, this); }); } - }, _proto.setScrubbing = function(isScrubbing) { + }, _proto.setScrubbing = function setScrubbing(isScrubbing) { this.isScrubbing_ = isScrubbing; - }, _proto.scrubbing = function() { + }, _proto.scrubbing = function scrubbing() { return this.isScrubbing_; - }, _proto.setCurrentTime = function(seconds) { + }, _proto.setCurrentTime = function setCurrentTime(seconds) { try { this.isScrubbing_ && this.el_.fastSeek && IS_ANY_SAFARI ? this.el_.fastSeek(seconds) : this.el_.currentTime = seconds; } catch (e) { log$1(e, "Video is not ready. (Video.js)"); } - }, _proto.duration = function() { + }, _proto.duration = function duration() { var _this5 = this; return this.el_.duration === 1 / 0 && IS_ANDROID && IS_CHROME && 0 === this.el_.currentTime ? (this.on("timeupdate", function checkProgress() { _this5.el_.currentTime > 0 && (_this5.el_.duration === 1 / 0 && _this5.trigger("durationchange"), _this5.off("timeupdate", checkProgress)); }), NaN) : this.el_.duration || NaN; - }, _proto.width = function() { + }, _proto.width = function width() { return this.el_.offsetWidth; - }, _proto.height = function() { + }, _proto.height = function height() { return this.el_.offsetHeight; - }, _proto.proxyWebkitFullscreen_ = function() { + }, _proto.proxyWebkitFullscreen_ = function proxyWebkitFullscreen_() { var _this6 = this; if ("webkitDisplayingFullscreen" in this.el_) { var endFn = function() { @@ -4821,13 +4821,13 @@ _this6.off("webkitbeginfullscreen", beginFn), _this6.off("webkitendfullscreen", endFn); }); } - }, _proto.supportsFullScreen = function() { + }, _proto.supportsFullScreen = function supportsFullScreen() { if ("function" == typeof this.el_.webkitEnterFullScreen) { var userAgent = global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator && global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator.userAgent || ""; if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) return !0; } return !1; - }, _proto.enterFullScreen = function() { + }, _proto.enterFullScreen = function enterFullScreen() { var video = this.el_; if (video.paused && video.networkState <= video.HAVE_METADATA) silencePromise(this.el_.play()), this.setTimeout(function() { video.pause(); @@ -4842,35 +4842,35 @@ } catch (e) { this.trigger("fullscreenerror", e); } - }, _proto.exitFullScreen = function() { + }, _proto.exitFullScreen = function exitFullScreen() { if (!this.el_.webkitDisplayingFullscreen) { this.trigger("fullscreenerror", Error("The video is not fullscreen")); return; } this.el_.webkitExitFullScreen(); - }, _proto.requestPictureInPicture = function() { + }, _proto.requestPictureInPicture = function requestPictureInPicture() { return this.el_.requestPictureInPicture(); - }, _proto.src = function(_src) { + }, _proto.src = function src(_src) { if (void 0 === _src) return this.el_.src; this.setSrc(_src); - }, _proto.reset = function() { + }, _proto.reset = function reset() { Html5.resetMediaElement(this.el_); - }, _proto.currentSrc = function() { + }, _proto.currentSrc = function currentSrc() { return this.currentSource_ ? this.currentSource_.src : this.el_.currentSrc; - }, _proto.setControls = function(val) { + }, _proto.setControls = function setControls(val) { this.el_.controls = !!val; - }, _proto.addTextTrack = function(kind, label, language) { + }, _proto.addTextTrack = function addTextTrack(kind, label, language) { return this.featuresNativeTextTracks ? this.el_.addTextTrack(kind, label, language) : _Tech.prototype.addTextTrack.call(this, kind, label, language); - }, _proto.createRemoteTextTrack = function(options) { + }, _proto.createRemoteTextTrack = function createRemoteTextTrack(options) { if (!this.featuresNativeTextTracks) return _Tech.prototype.createRemoteTextTrack.call(this, options); var htmlTrackElement = global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement("track"); return options.kind && (htmlTrackElement.kind = options.kind), options.label && (htmlTrackElement.label = options.label), (options.language || options.srclang) && (htmlTrackElement.srclang = options.language || options.srclang), options.default && (htmlTrackElement.default = options.default), options.id && (htmlTrackElement.id = options.id), options.src && (htmlTrackElement.src = options.src), htmlTrackElement; - }, _proto.addRemoteTextTrack = function(options, manualCleanup) { + }, _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) { var htmlTrackElement = _Tech.prototype.addRemoteTextTrack.call(this, options, manualCleanup); return this.featuresNativeTextTracks && this.el().appendChild(htmlTrackElement), htmlTrackElement; - }, _proto.removeRemoteTextTrack = function(track) { + }, _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) { if (_Tech.prototype.removeRemoteTextTrack.call(this, track), this.featuresNativeTextTracks) for(var tracks = this.$$("track"), i = tracks.length; i--;)(track === tracks[i] || track === tracks[i].track) && this.el().removeChild(tracks[i]); - }, _proto.getVideoPlaybackQuality = function() { + }, _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() { if ("function" == typeof this.el().getVideoPlaybackQuality) return this.el().getVideoPlaybackQuality(); var videoPlaybackQuality = {}; return void 0 !== this.el().webkitDroppedFrameCount && void 0 !== this.el().webkitDecodedFrameCount && (videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount, videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount), global_window__WEBPACK_IMPORTED_MODULE_0___default().performance && "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.now ? videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.now() : global_window__WEBPACK_IMPORTED_MODULE_0___default().performance && global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.timing && "number" == typeof global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.timing.navigationStart && (videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default().Date.now() - global_window__WEBPACK_IMPORTED_MODULE_0___default().performance.timing.navigationStart), videoPlaybackQuality; @@ -5211,13 +5211,13 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(Player, _Component); var _proto = Player.prototype; - return _proto.dispose = function() { + return _proto.dispose = function dispose() { var _this2 = this; this.trigger("dispose"), this.off("dispose"), off(global_document__WEBPACK_IMPORTED_MODULE_1___default(), this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_), off(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "keydown", this.boundFullWindowOnEscKey_), this.styleEl_ && this.styleEl_.parentNode && (this.styleEl_.parentNode.removeChild(this.styleEl_), this.styleEl_ = null), Player.players[this.id_] = null, this.tag && this.tag.player && (this.tag.player = null), this.el_ && this.el_.player && (this.el_.player = null), this.tech_ && (this.tech_.dispose(), this.isPosterFromTech_ = !1, this.poster_ = ""), this.playerElIngest_ && (this.playerElIngest_ = null), this.tag && (this.tag = null), middlewareInstances[this.id()] = null, ALL.names.forEach(function(name) { var list = _this2[ALL[name].getterName](); list && list.off && list.off(); }), _Component.prototype.dispose.call(this); - }, _proto.createEl = function() { + }, _proto.createEl = function createEl() { var el, tag = this.tag, playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute("data-vjs-player"), divEmbed = "video-js" === this.tag.tagName.toLowerCase(); playerElIngest ? el = this.el_ = tag.parentNode : divEmbed || (el = this.el_ = _Component.prototype.createEl.call(this, "div")); var attrs = getAttributes(tag); @@ -5242,18 +5242,18 @@ addClass(linkEl, "vjs-hidden"), linkEl.setAttribute("hidden", "hidden"); } return tag.initNetworkState_ = tag.networkState, tag.parentNode && !playerElIngest && tag.parentNode.insertBefore(el, tag), prependTo(tag, el), this.children_.unshift(tag), this.el_.setAttribute("lang", this.language_), this.el_.setAttribute("translate", "no"), this.el_ = el, el; - }, _proto.crossOrigin = function(value) { + }, _proto.crossOrigin = function crossOrigin(value) { if (!value) return this.techGet_("crossOrigin"); if ("anonymous" !== value && "use-credentials" !== value) { log$1.warn('crossOrigin must be "anonymous" or "use-credentials", given "' + value + '"'); return; } this.techCall_("setCrossOrigin", value); - }, _proto.width = function(value) { + }, _proto.width = function width(value) { return this.dimension("width", value); - }, _proto.height = function(value) { + }, _proto.height = function height(value) { return this.dimension("height", value); - }, _proto.dimension = function(_dimension, value) { + }, _proto.dimension = function dimension(_dimension, value) { var privDimension = _dimension + "_"; if (void 0 === value) return this[privDimension] || 0; if ("" === value || "auto" === value) { @@ -5266,7 +5266,7 @@ return; } this[privDimension] = parsedVal, this.updateStyleEl_(); - }, _proto.fluid = function(bool) { + }, _proto.fluid = function fluid(bool) { var _this3 = this; if (void 0 === bool) return !!this.fluid_; this.fluid_ = !!bool, isEvented(this) && this.off([ @@ -5278,14 +5278,14 @@ "resize" ], _this3.boundUpdateStyleEl_); })) : this.removeClass("vjs-fluid"), this.updateStyleEl_(); - }, _proto.fill = function(bool) { + }, _proto.fill = function fill(bool) { if (void 0 === bool) return !!this.fill_; this.fill_ = !!bool, bool ? (this.addClass("vjs-fill"), this.fluid(!1)) : this.removeClass("vjs-fill"); - }, _proto.aspectRatio = function(ratio) { + }, _proto.aspectRatio = function aspectRatio(ratio) { if (void 0 === ratio) return this.aspectRatio_; if (!/^\d+\:\d+$/.test(ratio)) throw Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9."); this.aspectRatio_ = ratio, this.fluid(!0), this.updateStyleEl_(); - }, _proto.updateStyleEl_ = function() { + }, _proto.updateStyleEl_ = function updateStyleEl_() { if (!0 === global_window__WEBPACK_IMPORTED_MODULE_0___default().VIDEOJS_NO_DYNAMIC_STYLE) { var width, height, idClass, _width = "number" == typeof this.width_ ? this.width_ : this.options_.width, _height = "number" == typeof this.height_ ? this.height_ : this.options_.height, techEl = this.tech_ && this.tech_.el(); techEl && (_width >= 0 && (techEl.width = _width), _height >= 0 && (techEl.height = _height)); @@ -5293,7 +5293,7 @@ } var ratioParts = (void 0 !== this.aspectRatio_ && "auto" !== this.aspectRatio_ ? this.aspectRatio_ : this.videoWidth() > 0 ? this.videoWidth() + ":" + this.videoHeight() : "16:9").split(":"), ratioMultiplier = ratioParts[1] / ratioParts[0]; width = void 0 !== this.width_ ? this.width_ : void 0 !== this.height_ ? this.height_ / ratioMultiplier : this.videoWidth() || 300, height = void 0 !== this.height_ ? this.height_ : width * ratioMultiplier, idClass = /^[^a-zA-Z]/.test(this.id()) ? "dimensions-" + this.id() : this.id() + "-dimensions", this.addClass(idClass), setTextContent(this.styleEl_, "\n ." + idClass + " {\n width: " + width + "px;\n height: " + height + "px;\n }\n\n ." + idClass + ".vjs-fluid {\n padding-top: " + 100 * ratioMultiplier + "%;\n }\n "); - }, _proto.loadTech_ = function(techName, source) { + }, _proto.loadTech_ = function loadTech_(techName, source) { var _this4 = this; this.tech_ && this.unloadTech_(); var titleTechName = toTitleCase$1(techName), camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1); @@ -5375,23 +5375,23 @@ }), this.on(this.tech_, "ratechange", function(e) { return _this4.handleTechRateChange_(e); }), this.on(this.tech_, "loadedmetadata", this.boundUpdateStyleEl_), this.usingNativeControls(this.techGet_("controls")), this.controls() && !this.usingNativeControls() && this.addTechControlsListeners_(), this.tech_.el().parentNode === this.el() || "Html5" === titleTechName && this.tag || prependTo(this.tech_.el(), this.el()), this.tag && (this.tag.player = null, this.tag = null); - }, _proto.unloadTech_ = function() { + }, _proto.unloadTech_ = function unloadTech_() { var _this5 = this; ALL.names.forEach(function(name) { var props = ALL[name]; _this5[props.privateName] = _this5[props.getterName](); }), this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_), this.isReady_ = !1, this.tech_.dispose(), this.tech_ = !1, this.isPosterFromTech_ && (this.poster_ = "", this.trigger("posterchange")), this.isPosterFromTech_ = !1; - }, _proto.tech = function(safety) { + }, _proto.tech = function tech(safety) { return void 0 === safety && log$1.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"), this.tech_; - }, _proto.addTechControlsListeners_ = function() { + }, _proto.addTechControlsListeners_ = function addTechControlsListeners_() { this.removeTechControlsListeners_(), this.on(this.tech_, "click", this.boundHandleTechClick_), this.on(this.tech_, "dblclick", this.boundHandleTechDoubleClick_), this.on(this.tech_, "touchstart", this.boundHandleTechTouchStart_), this.on(this.tech_, "touchmove", this.boundHandleTechTouchMove_), this.on(this.tech_, "touchend", this.boundHandleTechTouchEnd_), this.on(this.tech_, "tap", this.boundHandleTechTap_); - }, _proto.removeTechControlsListeners_ = function() { + }, _proto.removeTechControlsListeners_ = function removeTechControlsListeners_() { this.off(this.tech_, "tap", this.boundHandleTechTap_), this.off(this.tech_, "touchstart", this.boundHandleTechTouchStart_), this.off(this.tech_, "touchmove", this.boundHandleTechTouchMove_), this.off(this.tech_, "touchend", this.boundHandleTechTouchEnd_), this.off(this.tech_, "click", this.boundHandleTechClick_), this.off(this.tech_, "dblclick", this.boundHandleTechDoubleClick_); - }, _proto.handleTechReady_ = function() { + }, _proto.handleTechReady_ = function handleTechReady_() { this.triggerReady(), this.cache_.volume && this.techCall_("setVolume", this.cache_.volume), this.handleTechPosterChange_(), this.handleTechDurationChange_(); - }, _proto.handleTechLoadStart_ = function() { + }, _proto.handleTechLoadStart_ = function handleTechLoadStart_() { this.removeClass("vjs-ended"), this.removeClass("vjs-seeking"), this.error(null), this.handleTechDurationChange_(), this.paused() ? (this.hasStarted(!1), this.trigger("loadstart")) : (this.trigger("loadstart"), this.trigger("firstplay")), this.manualAutoplay_(!0 === this.autoplay() && this.options_.normalizeAutoplay ? "play" : this.autoplay()); - }, _proto.manualAutoplay_ = function(type) { + }, _proto.manualAutoplay_ = function manualAutoplay_(type) { var promise, _this6 = this; if (this.tech_ && "string" == typeof type) { var resolveMuted = function() { @@ -5418,7 +5418,7 @@ }); }); } - }, _proto.updateSourceCaches_ = function(srcObj) { + }, _proto.updateSourceCaches_ = function updateSourceCaches_(srcObj) { void 0 === srcObj && (srcObj = ""); var src = srcObj, type = ""; "string" != typeof src && (src = srcObj.src, type = srcObj.type), this.cache_.source = this.cache_.source || {}, this.cache_.sources = this.cache_.sources || [], src && !type && (type = findMimetype(this, src)), this.cache_.source = mergeOptions$3({}, srcObj, { @@ -5434,13 +5434,13 @@ matchingSourceEls.length && !matchingSources.length ? this.cache_.sources = sourceElSources : matchingSources.length || (this.cache_.sources = [ this.cache_.source ]), this.cache_.src = src; - }, _proto.handleTechSourceset_ = function(event) { + }, _proto.handleTechSourceset_ = function handleTechSourceset_(event) { var _this7 = this; if (!this.changingSrc_) { var updateSourceCaches = function(src) { return _this7.updateSourceCaches_(src); }, playerSrc = this.currentSource().src, eventSrc = event.src; - playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc) && (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) && (updateSourceCaches = function() {}), updateSourceCaches(eventSrc), event.src || this.tech_.any([ + playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc) && (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) && (updateSourceCaches = function updateSourceCaches() {}), updateSourceCaches(eventSrc), event.src || this.tech_.any([ "sourceset", "loadstart" ], function(e) { @@ -5457,83 +5457,83 @@ src: event.src, type: "sourceset" }); - }, _proto.hasStarted = function(request) { + }, _proto.hasStarted = function hasStarted(request) { if (void 0 === request) return this.hasStarted_; request !== this.hasStarted_ && (this.hasStarted_ = request, this.hasStarted_ ? (this.addClass("vjs-has-started"), this.trigger("firstplay")) : this.removeClass("vjs-has-started")); - }, _proto.handleTechPlay_ = function() { + }, _proto.handleTechPlay_ = function handleTechPlay_() { this.removeClass("vjs-ended"), this.removeClass("vjs-paused"), this.addClass("vjs-playing"), this.hasStarted(!0), this.trigger("play"); - }, _proto.handleTechRateChange_ = function() { + }, _proto.handleTechRateChange_ = function handleTechRateChange_() { this.tech_.playbackRate() > 0 && 0 === this.cache_.lastPlaybackRate && (this.queuedCallbacks_.forEach(function(queued) { return queued.callback(queued.event); }), this.queuedCallbacks_ = []), this.cache_.lastPlaybackRate = this.tech_.playbackRate(), this.trigger("ratechange"); - }, _proto.handleTechWaiting_ = function() { + }, _proto.handleTechWaiting_ = function handleTechWaiting_() { var _this8 = this; this.addClass("vjs-waiting"), this.trigger("waiting"); var timeWhenWaiting = this.currentTime(); this.on("timeupdate", function timeUpdateListener() { timeWhenWaiting !== _this8.currentTime() && (_this8.removeClass("vjs-waiting"), _this8.off("timeupdate", timeUpdateListener)); }); - }, _proto.handleTechCanPlay_ = function() { + }, _proto.handleTechCanPlay_ = function handleTechCanPlay_() { this.removeClass("vjs-waiting"), this.trigger("canplay"); - }, _proto.handleTechCanPlayThrough_ = function() { + }, _proto.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() { this.removeClass("vjs-waiting"), this.trigger("canplaythrough"); - }, _proto.handleTechPlaying_ = function() { + }, _proto.handleTechPlaying_ = function handleTechPlaying_() { this.removeClass("vjs-waiting"), this.trigger("playing"); - }, _proto.handleTechSeeking_ = function() { + }, _proto.handleTechSeeking_ = function handleTechSeeking_() { this.addClass("vjs-seeking"), this.trigger("seeking"); - }, _proto.handleTechSeeked_ = function() { + }, _proto.handleTechSeeked_ = function handleTechSeeked_() { this.removeClass("vjs-seeking"), this.removeClass("vjs-ended"), this.trigger("seeked"); - }, _proto.handleTechFirstPlay_ = function() { + }, _proto.handleTechFirstPlay_ = function handleTechFirstPlay_() { this.options_.starttime && (log$1.warn("Passing the `starttime` option to the player will be deprecated in 6.0"), this.currentTime(this.options_.starttime)), this.addClass("vjs-has-started"), this.trigger("firstplay"); - }, _proto.handleTechPause_ = function() { + }, _proto.handleTechPause_ = function handleTechPause_() { this.removeClass("vjs-playing"), this.addClass("vjs-paused"), this.trigger("pause"); - }, _proto.handleTechEnded_ = function() { + }, _proto.handleTechEnded_ = function handleTechEnded_() { this.addClass("vjs-ended"), this.removeClass("vjs-waiting"), this.options_.loop ? (this.currentTime(0), this.play()) : this.paused() || this.pause(), this.trigger("ended"); - }, _proto.handleTechDurationChange_ = function() { + }, _proto.handleTechDurationChange_ = function handleTechDurationChange_() { this.duration(this.techGet_("duration")); - }, _proto.handleTechClick_ = function(event) { + }, _proto.handleTechClick_ = function handleTechClick_(event) { this.controls_ && (void 0 === this.options_ || void 0 === this.options_.userActions || void 0 === this.options_.userActions.click || !1 !== this.options_.userActions.click) && (void 0 !== this.options_ && void 0 !== this.options_.userActions && "function" == typeof this.options_.userActions.click ? this.options_.userActions.click.call(this, event) : this.paused() ? silencePromise(this.play()) : this.pause()); - }, _proto.handleTechDoubleClick_ = function(event) { + }, _proto.handleTechDoubleClick_ = function handleTechDoubleClick_(event) { this.controls_ && (Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"), function(el) { return el.contains(event.target); }) || void 0 !== this.options_ && void 0 !== this.options_.userActions && void 0 !== this.options_.userActions.doubleClick && !1 === this.options_.userActions.doubleClick || (void 0 !== this.options_ && void 0 !== this.options_.userActions && "function" == typeof this.options_.userActions.doubleClick ? this.options_.userActions.doubleClick.call(this, event) : this.isFullscreen() ? this.exitFullscreen() : this.requestFullscreen())); - }, _proto.handleTechTap_ = function() { + }, _proto.handleTechTap_ = function handleTechTap_() { this.userActive(!this.userActive()); - }, _proto.handleTechTouchStart_ = function() { + }, _proto.handleTechTouchStart_ = function handleTechTouchStart_() { this.userWasActive = this.userActive(); - }, _proto.handleTechTouchMove_ = function() { + }, _proto.handleTechTouchMove_ = function handleTechTouchMove_() { this.userWasActive && this.reportUserActivity(); - }, _proto.handleTechTouchEnd_ = function(event) { + }, _proto.handleTechTouchEnd_ = function handleTechTouchEnd_(event) { event.cancelable && event.preventDefault(); - }, _proto.handleStageClick_ = function() { + }, _proto.handleStageClick_ = function handleStageClick_() { this.reportUserActivity(); - }, _proto.toggleFullscreenClass_ = function() { + }, _proto.toggleFullscreenClass_ = function toggleFullscreenClass_() { this.isFullscreen() ? this.addClass("vjs-fullscreen") : this.removeClass("vjs-fullscreen"); - }, _proto.documentFullscreenChange_ = function(e) { + }, _proto.documentFullscreenChange_ = function documentFullscreenChange_(e) { var targetPlayer = e.target.player; if (!targetPlayer || targetPlayer === this) { var el = this.el(), isFs = global_document__WEBPACK_IMPORTED_MODULE_1___default()[this.fsApi_.fullscreenElement] === el; !isFs && el.matches ? isFs = el.matches(":" + this.fsApi_.fullscreen) : !isFs && el.msMatchesSelector && (isFs = el.msMatchesSelector(":" + this.fsApi_.fullscreen)), this.isFullscreen(isFs); } - }, _proto.handleTechFullscreenChange_ = function(event, data) { + }, _proto.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) { data && (data.nativeIOSFullscreen && this.toggleClass("vjs-ios-native-fs"), this.isFullscreen(data.isFullscreen)); - }, _proto.handleTechFullscreenError_ = function(event, err) { + }, _proto.handleTechFullscreenError_ = function handleTechFullscreenError_(event, err) { this.trigger("fullscreenerror", err); - }, _proto.togglePictureInPictureClass_ = function() { + }, _proto.togglePictureInPictureClass_ = function togglePictureInPictureClass_() { this.isInPictureInPicture() ? this.addClass("vjs-picture-in-picture") : this.removeClass("vjs-picture-in-picture"); - }, _proto.handleTechEnterPictureInPicture_ = function(event) { + }, _proto.handleTechEnterPictureInPicture_ = function handleTechEnterPictureInPicture_(event) { this.isInPictureInPicture(!0); - }, _proto.handleTechLeavePictureInPicture_ = function(event) { + }, _proto.handleTechLeavePictureInPicture_ = function handleTechLeavePictureInPicture_(event) { this.isInPictureInPicture(!1); - }, _proto.handleTechError_ = function() { + }, _proto.handleTechError_ = function handleTechError_() { var error = this.tech_.error(); this.error(error); - }, _proto.handleTechTextData_ = function() { + }, _proto.handleTechTextData_ = function handleTechTextData_() { var data = null; arguments.length > 1 && (data = arguments[1]), this.trigger("textdata", data); - }, _proto.getCache = function() { + }, _proto.getCache = function getCache() { return this.cache_; - }, _proto.resetCache_ = function() { + }, _proto.resetCache_ = function resetCache_() { this.cache_ = { currentTime: 0, initTime: 0, @@ -5548,7 +5548,7 @@ playbackRates: [], volume: 1 }; - }, _proto.techCall_ = function(method, arg) { + }, _proto.techCall_ = function techCall_(method, arg) { this.ready(function() { if (method in allowedSetters) { var middleware; @@ -5561,7 +5561,7 @@ throw log$1(e), e; } }, !0); - }, _proto.techGet_ = function(method) { + }, _proto.techGet_ = function techGet_(method) { if (this.tech_ && this.tech_.isReady_) { if (method in allowedGetters) { var middleware, tech; @@ -5576,12 +5576,12 @@ throw log$1(e), e; } } - }, _proto.play = function() { + }, _proto.play = function play() { var _this9 = this, PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default().Promise; return PromiseClass ? new PromiseClass(function(resolve) { _this9.play_(resolve); }) : this.play_(); - }, _proto.play_ = function(callback) { + }, _proto.play_ = function play_(callback) { var _this10 = this; void 0 === callback && (callback = silencePromise), this.playCallbacks_.push(callback); var isSrcReady = !!(!this.changingSrc_ && (this.src() || this.currentSrc())); @@ -5599,26 +5599,26 @@ } var val = this.techGet_("play"); null === val ? this.runPlayTerminatedQueue_() : this.runPlayCallbacks_(val); - }, _proto.runPlayTerminatedQueue_ = function() { + }, _proto.runPlayTerminatedQueue_ = function runPlayTerminatedQueue_() { var queue = this.playTerminatedQueue_.slice(0); this.playTerminatedQueue_ = [], queue.forEach(function(q) { q(); }); - }, _proto.runPlayCallbacks_ = function(val) { + }, _proto.runPlayCallbacks_ = function runPlayCallbacks_(val) { var callbacks = this.playCallbacks_.slice(0); this.playCallbacks_ = [], this.playTerminatedQueue_ = [], callbacks.forEach(function(cb) { cb(val); }); - }, _proto.pause = function() { + }, _proto.pause = function pause() { this.techCall_("pause"); - }, _proto.paused = function() { + }, _proto.paused = function paused() { return !1 !== this.techGet_("paused"); - }, _proto.played = function() { + }, _proto.played = function played() { return this.techGet_("played") || createTimeRanges(0, 0); - }, _proto.scrubbing = function(isScrubbing) { + }, _proto.scrubbing = function scrubbing(isScrubbing) { if (void 0 === isScrubbing) return this.scrubbing_; this.scrubbing_ = !!isScrubbing, this.techCall_("setScrubbing", this.scrubbing_), isScrubbing ? this.addClass("vjs-scrubbing") : this.removeClass("vjs-scrubbing"); - }, _proto.currentTime = function(seconds) { + }, _proto.currentTime = function currentTime(seconds) { if (void 0 !== seconds) { if (seconds < 0 && (seconds = 0), !this.isReady_ || this.changingSrc_ || !this.tech_ || !this.tech_.isReady_) { this.cache_.initTime = seconds, this.off("canplay", this.boundApplyInitTime_), this.one("canplay", this.boundApplyInitTime_); @@ -5628,54 +5628,54 @@ return; } return this.cache_.currentTime = this.techGet_("currentTime") || 0, this.cache_.currentTime; - }, _proto.applyInitTime_ = function() { + }, _proto.applyInitTime_ = function applyInitTime_() { this.currentTime(this.cache_.initTime); - }, _proto.duration = function(seconds) { + }, _proto.duration = function duration(seconds) { if (void 0 === seconds) return void 0 !== this.cache_.duration ? this.cache_.duration : NaN; (seconds = parseFloat(seconds)) < 0 && (seconds = 1 / 0), seconds === this.cache_.duration || (this.cache_.duration = seconds, seconds === 1 / 0 ? this.addClass("vjs-live") : this.removeClass("vjs-live"), isNaN(seconds) || this.trigger("durationchange")); - }, _proto.remainingTime = function() { + }, _proto.remainingTime = function remainingTime() { return this.duration() - this.currentTime(); - }, _proto.remainingTimeDisplay = function() { + }, _proto.remainingTimeDisplay = function remainingTimeDisplay() { return Math.floor(this.duration()) - Math.floor(this.currentTime()); - }, _proto.buffered = function() { + }, _proto.buffered = function buffered() { var buffered = this.techGet_("buffered"); return buffered && buffered.length || (buffered = createTimeRanges(0, 0)), buffered; - }, _proto.bufferedPercent = function() { + }, _proto.bufferedPercent = function bufferedPercent$1() { return bufferedPercent(this.buffered(), this.duration()); - }, _proto.bufferedEnd = function() { + }, _proto.bufferedEnd = function bufferedEnd() { var buffered = this.buffered(), duration = this.duration(), end = buffered.end(buffered.length - 1); return end > duration && (end = duration), end; - }, _proto.volume = function(percentAsDecimal) { + }, _proto.volume = function volume(percentAsDecimal) { var vol; if (void 0 !== percentAsDecimal) { vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))), this.cache_.volume = vol, this.techCall_("setVolume", vol), vol > 0 && this.lastVolume_(vol); return; } return isNaN(vol = parseFloat(this.techGet_("volume"))) ? 1 : vol; - }, _proto.muted = function(_muted) { + }, _proto.muted = function muted(_muted) { if (void 0 !== _muted) { this.techCall_("setMuted", _muted); return; } return this.techGet_("muted") || !1; - }, _proto.defaultMuted = function(_defaultMuted) { + }, _proto.defaultMuted = function defaultMuted(_defaultMuted) { return void 0 !== _defaultMuted ? this.techCall_("setDefaultMuted", _defaultMuted) : this.techGet_("defaultMuted") || !1; - }, _proto.lastVolume_ = function(percentAsDecimal) { + }, _proto.lastVolume_ = function lastVolume_(percentAsDecimal) { if (void 0 !== percentAsDecimal && 0 !== percentAsDecimal) { this.cache_.lastVolume = percentAsDecimal; return; } return this.cache_.lastVolume; - }, _proto.supportsFullScreen = function() { + }, _proto.supportsFullScreen = function supportsFullScreen() { return this.techGet_("supportsFullScreen") || !1; - }, _proto.isFullscreen = function(isFS) { + }, _proto.isFullscreen = function isFullscreen(isFS) { if (void 0 !== isFS) { var oldValue = this.isFullscreen_; this.isFullscreen_ = !!isFS, this.isFullscreen_ !== oldValue && this.fsApi_.prefixed && this.trigger("fullscreenchange"), this.toggleFullscreenClass_(); return; } return this.isFullscreen_; - }, _proto.requestFullscreen = function(fullscreenOptions) { + }, _proto.requestFullscreen = function requestFullscreen(fullscreenOptions) { var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default().Promise; if (PromiseClass) { var self1 = this; @@ -5695,7 +5695,7 @@ }); } return this.requestFullscreenHelper_(); - }, _proto.requestFullscreenHelper_ = function(fullscreenOptions) { + }, _proto.requestFullscreenHelper_ = function requestFullscreenHelper_(fullscreenOptions) { var fsOptions, _this11 = this; if (this.fsApi_.prefixed || (fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {}, void 0 === fullscreenOptions || (fsOptions = fullscreenOptions)), this.fsApi_.requestFullscreen) { var promise = this.el_[this.fsApi_.requestFullscreen](fsOptions); @@ -5706,7 +5706,7 @@ }), promise; } this.tech_.supportsFullScreen() && !0 == !this.options_.preferFullWindow ? this.techCall_("enterFullScreen") : this.enterFullWindow(); - }, _proto.exitFullscreen = function() { + }, _proto.exitFullscreen = function exitFullscreen() { var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default().Promise; if (PromiseClass) { var self1 = this; @@ -5726,7 +5726,7 @@ }); } return this.exitFullscreenHelper_(); - }, _proto.exitFullscreenHelper_ = function() { + }, _proto.exitFullscreenHelper_ = function exitFullscreenHelper_() { var _this12 = this; if (this.fsApi_.requestFullscreen) { var promise = global_document__WEBPACK_IMPORTED_MODULE_1___default()[this.fsApi_.exitFullscreen](); @@ -5735,26 +5735,26 @@ })), promise; } this.tech_.supportsFullScreen() && !0 == !this.options_.preferFullWindow ? this.techCall_("exitFullScreen") : this.exitFullWindow(); - }, _proto.enterFullWindow = function() { + }, _proto.enterFullWindow = function enterFullWindow() { this.isFullscreen(!0), this.isFullWindow = !0, this.docOrigOverflow = global_document__WEBPACK_IMPORTED_MODULE_1___default().documentElement.style.overflow, on(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "keydown", this.boundFullWindowOnEscKey_), global_document__WEBPACK_IMPORTED_MODULE_1___default().documentElement.style.overflow = "hidden", addClass(global_document__WEBPACK_IMPORTED_MODULE_1___default().body, "vjs-full-window"), this.trigger("enterFullWindow"); - }, _proto.fullWindowOnEscKey = function(event) { + }, _proto.fullWindowOnEscKey = function fullWindowOnEscKey(event) { keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(event, "Esc") && !0 === this.isFullscreen() && (this.isFullWindow ? this.exitFullWindow() : this.exitFullscreen()); - }, _proto.exitFullWindow = function() { + }, _proto.exitFullWindow = function exitFullWindow() { this.isFullscreen(!1), this.isFullWindow = !1, off(global_document__WEBPACK_IMPORTED_MODULE_1___default(), "keydown", this.boundFullWindowOnEscKey_), global_document__WEBPACK_IMPORTED_MODULE_1___default().documentElement.style.overflow = this.docOrigOverflow, removeClass(global_document__WEBPACK_IMPORTED_MODULE_1___default().body, "vjs-full-window"), this.trigger("exitFullWindow"); - }, _proto.disablePictureInPicture = function(value) { + }, _proto.disablePictureInPicture = function disablePictureInPicture(value) { if (void 0 === value) return this.techGet_("disablePictureInPicture"); this.techCall_("setDisablePictureInPicture", value), this.options_.disablePictureInPicture = value, this.trigger("disablepictureinpicturechanged"); - }, _proto.isInPictureInPicture = function(isPiP) { + }, _proto.isInPictureInPicture = function isInPictureInPicture(isPiP) { if (void 0 !== isPiP) { this.isInPictureInPicture_ = !!isPiP, this.togglePictureInPictureClass_(); return; } return !!this.isInPictureInPicture_; - }, _proto.requestPictureInPicture = function() { + }, _proto.requestPictureInPicture = function requestPictureInPicture() { if ("pictureInPictureEnabled" in global_document__WEBPACK_IMPORTED_MODULE_1___default() && !1 === this.disablePictureInPicture()) return this.techGet_("requestPictureInPicture"); - }, _proto.exitPictureInPicture = function() { + }, _proto.exitPictureInPicture = function exitPictureInPicture() { if ("pictureInPictureEnabled" in global_document__WEBPACK_IMPORTED_MODULE_1___default()) return global_document__WEBPACK_IMPORTED_MODULE_1___default().exitPictureInPicture(); - }, _proto.handleKeyDown = function(event) { + }, _proto.handleKeyDown = function handleKeyDown(event) { var el, tagName, userActions = this.options_.userActions; userActions && userActions.hotkeys && (tagName = (el = this.el_.ownerDocument.activeElement).tagName.toLowerCase(), el.isContentEditable || ("input" === tagName ? -1 === [ "button", @@ -5766,7 +5766,7 @@ ].indexOf(el.type) : -1 !== [ "textarea" ].indexOf(tagName)) || ("function" == typeof userActions.hotkeys ? userActions.hotkeys.call(this, event) : this.handleHotkeys(event))); - }, _proto.handleHotkeys = function(event) { + }, _proto.handleHotkeys = function handleHotkeys(event) { var hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {}, _hotkeys$fullscreenKe = hotkeys.fullscreenKey, fullscreenKey = void 0 === _hotkeys$fullscreenKe ? function(keydownEvent) { return keycode__WEBPACK_IMPORTED_MODULE_3___default().isEventKey(keydownEvent, "f"); } : _hotkeys$fullscreenKe, _hotkeys$muteKey = hotkeys.muteKey, muteKey = void 0 === _hotkeys$muteKey ? function(keydownEvent) { @@ -5779,7 +5779,7 @@ var FSToggle = Component$1.getComponent("FullscreenToggle"); !1 !== global_document__WEBPACK_IMPORTED_MODULE_1___default()[this.fsApi_.fullscreenEnabled] && FSToggle.prototype.handleClick.call(this, event); } else muteKey.call(this, event) ? (event.preventDefault(), event.stopPropagation(), Component$1.getComponent("MuteToggle").prototype.handleClick.call(this, event)) : playPauseKey.call(this, event) && (event.preventDefault(), event.stopPropagation(), Component$1.getComponent("PlayToggle").prototype.handleClick.call(this, event)); - }, _proto.canPlayType = function(type) { + }, _proto.canPlayType = function canPlayType(type) { for(var can, i = 0, j = this.options_.techOrder; i < j.length; i++){ var techName = j[i], tech = Tech.getTech(techName); if (tech || (tech = Component$1.getComponent(techName)), !tech) { @@ -5789,7 +5789,7 @@ if (tech.isSupported() && (can = tech.canPlayType(type))) return can; } return ""; - }, _proto.selectSource = function(sources) { + }, _proto.selectSource = function selectSource(sources) { var _this13 = this, techs = this.options_.techOrder.map(function(techName) { return [ techName, @@ -5815,7 +5815,7 @@ return (this.options_.sourceOrder ? findFirstPassingTechSourcePair(sources, techs, function(a, b) { return finder(b, a); }) : findFirstPassingTechSourcePair(techs, sources, finder)) || !1; - }, _proto.handleSrc_ = function(source, isRetry) { + }, _proto.handleSrc_ = function handleSrc_(source, isRetry) { var _this14 = this; if (void 0 === source) return this.cache_.src || ""; this.resetRetryOnError_ && this.resetRetryOnError_(); @@ -5883,9 +5883,9 @@ _this14.off("error", retry), _this14.off("playing", stopListeningForErrors); }; } - }, _proto.src = function(source) { + }, _proto.src = function src(source) { return this.handleSrc_(source, !1); - }, _proto.src_ = function(source) { + }, _proto.src_ = function src_(source) { var str1, str2, _this15 = this, sourceTech = this.selectSource([ source ]); @@ -5894,67 +5894,67 @@ })) : this.ready(function() { this.tech_.constructor.prototype.hasOwnProperty("setSource") ? this.techCall_("setSource", source) : this.techCall_("src", source.src), this.changingSrc_ = !1; }, !0), !1); - }, _proto.load = function() { + }, _proto.load = function load() { this.techCall_("load"); - }, _proto.reset = function() { + }, _proto.reset = function reset() { var _this16 = this, PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default().Promise; this.paused() || !PromiseClass ? this.doReset_() : silencePromise(this.play().then(function() { return _this16.doReset_(); })); - }, _proto.doReset_ = function() { + }, _proto.doReset_ = function doReset_() { this.tech_ && this.tech_.clearTracks("text"), this.resetCache_(), this.poster(""), this.loadTech_(this.options_.techOrder[0], null), this.techCall_("reset"), this.resetControlBarUI_(), isEvented(this) && this.trigger("playerreset"); - }, _proto.resetControlBarUI_ = function() { + }, _proto.resetControlBarUI_ = function resetControlBarUI_() { this.resetProgressBar_(), this.resetPlaybackRate_(), this.resetVolumeBar_(); - }, _proto.resetProgressBar_ = function() { + }, _proto.resetProgressBar_ = function resetProgressBar_() { this.currentTime(0); var _this$controlBar = this.controlBar, durationDisplay = _this$controlBar.durationDisplay, remainingTimeDisplay = _this$controlBar.remainingTimeDisplay; durationDisplay && durationDisplay.updateContent(), remainingTimeDisplay && remainingTimeDisplay.updateContent(); - }, _proto.resetPlaybackRate_ = function() { + }, _proto.resetPlaybackRate_ = function resetPlaybackRate_() { this.playbackRate(this.defaultPlaybackRate()), this.handleTechRateChange_(); - }, _proto.resetVolumeBar_ = function() { + }, _proto.resetVolumeBar_ = function resetVolumeBar_() { this.volume(1.0), this.trigger("volumechange"); - }, _proto.currentSources = function() { + }, _proto.currentSources = function currentSources() { var source = this.currentSource(), sources = []; return 0 !== Object.keys(source).length && sources.push(source), this.cache_.sources || sources; - }, _proto.currentSource = function() { + }, _proto.currentSource = function currentSource() { return this.cache_.source || {}; - }, _proto.currentSrc = function() { + }, _proto.currentSrc = function currentSrc() { return this.currentSource() && this.currentSource().src || ""; - }, _proto.currentType = function() { + }, _proto.currentType = function currentType() { return this.currentSource() && this.currentSource().type || ""; - }, _proto.preload = function(value) { + }, _proto.preload = function preload(value) { if (void 0 !== value) { this.techCall_("setPreload", value), this.options_.preload = value; return; } return this.techGet_("preload"); - }, _proto.autoplay = function(value) { + }, _proto.autoplay = function autoplay(value) { var techAutoplay; if (void 0 === value) return this.options_.autoplay || !1; "string" == typeof value && /(any|play|muted)/.test(value) || !0 === value && this.options_.normalizeAutoplay ? (this.options_.autoplay = value, this.manualAutoplay_("string" == typeof value ? value : "play"), techAutoplay = !1) : value ? this.options_.autoplay = !0 : this.options_.autoplay = !1, techAutoplay = void 0 === techAutoplay ? this.options_.autoplay : techAutoplay, this.tech_ && this.techCall_("setAutoplay", techAutoplay); - }, _proto.playsinline = function(value) { + }, _proto.playsinline = function playsinline(value) { return void 0 !== value ? (this.techCall_("setPlaysinline", value), this.options_.playsinline = value, this) : this.techGet_("playsinline"); - }, _proto.loop = function(value) { + }, _proto.loop = function loop(value) { if (void 0 !== value) { this.techCall_("setLoop", value), this.options_.loop = value; return; } return this.techGet_("loop"); - }, _proto.poster = function(src) { + }, _proto.poster = function poster(src) { if (void 0 === src) return this.poster_; src || (src = ""), src !== this.poster_ && (this.poster_ = src, this.techCall_("setPoster", src), this.isPosterFromTech_ = !1, this.trigger("posterchange")); - }, _proto.handleTechPosterChange_ = function() { + }, _proto.handleTechPosterChange_ = function handleTechPosterChange_() { if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) { var newPoster = this.tech_.poster() || ""; newPoster !== this.poster_ && (this.poster_ = newPoster, this.isPosterFromTech_ = !0, this.trigger("posterchange")); } - }, _proto.controls = function(bool) { + }, _proto.controls = function controls(bool) { if (void 0 === bool) return !!this.controls_; bool = !!bool, this.controls_ !== bool && (this.controls_ = bool, this.usingNativeControls() && this.techCall_("setControls", bool), this.controls_ ? (this.removeClass("vjs-controls-disabled"), this.addClass("vjs-controls-enabled"), this.trigger("controlsenabled"), this.usingNativeControls() || this.addTechControlsListeners_()) : (this.removeClass("vjs-controls-enabled"), this.addClass("vjs-controls-disabled"), this.trigger("controlsdisabled"), this.usingNativeControls() || this.removeTechControlsListeners_())); - }, _proto.usingNativeControls = function(bool) { + }, _proto.usingNativeControls = function usingNativeControls(bool) { if (void 0 === bool) return !!this.usingNativeControls_; bool = !!bool, this.usingNativeControls_ !== bool && (this.usingNativeControls_ = bool, this.usingNativeControls_ ? (this.addClass("vjs-using-native-controls"), this.trigger("usingnativecontrols")) : (this.removeClass("vjs-using-native-controls"), this.trigger("usingcustomcontrols"))); - }, _proto.error = function(err) { + }, _proto.error = function error(err) { var _this17 = this; if (void 0 === err) return this.error_ || null; if (hooks("beforeerror").forEach(function(hookFunction) { @@ -5986,9 +5986,9 @@ this.error_ = new MediaError(err), this.addClass("vjs-error"), log$1.error("(CODE:" + this.error_.code + " " + MediaError.errorTypes[this.error_.code] + ")", this.error_.message, this.error_), this.trigger("error"), hooks("error").forEach(function(hookFunction) { return hookFunction(_this17, _this17.error_); }); - }, _proto.reportUserActivity = function(event) { + }, _proto.reportUserActivity = function reportUserActivity(event) { this.userActivity_ = !0; - }, _proto.userActive = function(bool) { + }, _proto.userActive = function userActive(bool) { if (void 0 === bool) return this.userActive_; if ((bool = !!bool) !== this.userActive_) { if (this.userActive_ = bool, this.userActive_) { @@ -5999,7 +5999,7 @@ e.stopPropagation(), e.preventDefault(); }), this.userActivity_ = !1, this.removeClass("vjs-user-active"), this.addClass("vjs-user-inactive"), this.trigger("userinactive"); } - }, _proto.listenForUserActivity_ = function() { + }, _proto.listenForUserActivity_ = function listenForUserActivity_() { var mouseInProgress, lastMoveX, lastMoveY, inactivityTimeout, handleActivity = bind(this, this.reportUserActivity), handleMouseUpAndMouseLeave = function(event) { handleActivity(), this.clearInterval(mouseInProgress); }; @@ -6022,40 +6022,40 @@ }, timeout)); } }, 250); - }, _proto.playbackRate = function(rate) { + }, _proto.playbackRate = function playbackRate(rate) { if (void 0 !== rate) { this.techCall_("setPlaybackRate", rate); return; } return this.tech_ && this.tech_.featuresPlaybackRate ? this.cache_.lastPlaybackRate || this.techGet_("playbackRate") : 1.0; - }, _proto.defaultPlaybackRate = function(rate) { + }, _proto.defaultPlaybackRate = function defaultPlaybackRate(rate) { return void 0 !== rate ? this.techCall_("setDefaultPlaybackRate", rate) : this.tech_ && this.tech_.featuresPlaybackRate ? this.techGet_("defaultPlaybackRate") : 1.0; - }, _proto.isAudio = function(bool) { + }, _proto.isAudio = function isAudio(bool) { if (void 0 !== bool) { this.isAudio_ = !!bool; return; } return !!this.isAudio_; - }, _proto.addTextTrack = function(kind, label, language) { + }, _proto.addTextTrack = function addTextTrack(kind, label, language) { if (this.tech_) return this.tech_.addTextTrack(kind, label, language); - }, _proto.addRemoteTextTrack = function(options, manualCleanup) { + }, _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) { if (this.tech_) return this.tech_.addRemoteTextTrack(options, manualCleanup); - }, _proto.removeRemoteTextTrack = function(obj) { + }, _proto.removeRemoteTextTrack = function removeRemoteTextTrack(obj) { void 0 === obj && (obj = {}); var track = obj.track; if (track || (track = obj), this.tech_) return this.tech_.removeRemoteTextTrack(track); - }, _proto.getVideoPlaybackQuality = function() { + }, _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() { return this.techGet_("getVideoPlaybackQuality"); - }, _proto.videoWidth = function() { + }, _proto.videoWidth = function videoWidth() { return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0; - }, _proto.videoHeight = function() { + }, _proto.videoHeight = function videoHeight() { return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0; - }, _proto.language = function(code) { + }, _proto.language = function language(code) { if (void 0 === code) return this.language_; this.language_ !== String(code).toLowerCase() && (this.language_ = String(code).toLowerCase(), isEvented(this) && this.trigger("languagechange")); - }, _proto.languages = function() { + }, _proto.languages = function languages() { return mergeOptions$3(Player.prototype.options_.languages, this.languages_); - }, _proto.toJSON = function() { + }, _proto.toJSON = function toJSON() { var options = mergeOptions$3(this.options_), tracks = options.tracks; options.tracks = []; for(var i = 0; i < tracks.length; i++){ @@ -6063,14 +6063,14 @@ (track = mergeOptions$3(track)).player = void 0, options.tracks[i] = track; } return options; - }, _proto.createModal = function(content, options) { + }, _proto.createModal = function createModal(content, options) { var _this18 = this; (options = options || {}).content = content || ""; var modal = new ModalDialog(this, options); return this.addChild(modal), modal.on("dispose", function() { _this18.removeChild(modal); }), modal.open(), modal; - }, _proto.updateCurrentBreakpoint_ = function() { + }, _proto.updateCurrentBreakpoint_ = function updateCurrentBreakpoint_() { if (this.responsive()) for(var currentBreakpoint = this.currentBreakpoint(), currentWidth = this.currentWidth(), i = 0; i < BREAKPOINT_ORDER.length; i++){ var candidateBreakpoint = BREAKPOINT_ORDER[i]; if (currentWidth <= this.breakpoints_[candidateBreakpoint]) { @@ -6079,18 +6079,18 @@ break; } } - }, _proto.removeCurrentBreakpoint_ = function() { + }, _proto.removeCurrentBreakpoint_ = function removeCurrentBreakpoint_() { var className = this.currentBreakpointClass(); this.breakpoint_ = "", className && this.removeClass(className); - }, _proto.breakpoints = function(_breakpoints) { + }, _proto.breakpoints = function breakpoints(_breakpoints) { return void 0 === _breakpoints || (this.breakpoint_ = "", this.breakpoints_ = assign({}, DEFAULT_BREAKPOINTS, _breakpoints), this.updateCurrentBreakpoint_()), assign(this.breakpoints_); - }, _proto.responsive = function(value) { + }, _proto.responsive = function responsive(value) { return void 0 === value ? this.responsive_ : (value = !!value) !== this.responsive_ ? (this.responsive_ = value, value ? (this.on("playerresize", this.boundUpdateCurrentBreakpoint_), this.updateCurrentBreakpoint_()) : (this.off("playerresize", this.boundUpdateCurrentBreakpoint_), this.removeCurrentBreakpoint_()), value) : void 0; - }, _proto.currentBreakpoint = function() { + }, _proto.currentBreakpoint = function currentBreakpoint() { return this.breakpoint_; - }, _proto.currentBreakpointClass = function() { + }, _proto.currentBreakpointClass = function currentBreakpointClass() { return BREAKPOINT_CLASSES[this.breakpoint_] || ""; - }, _proto.loadMedia = function(media, ready) { + }, _proto.loadMedia = function loadMedia(media, ready) { var _this19 = this; if (media && "object" == typeof media) { this.reset(), this.cache_.media = mergeOptions$3(media); @@ -6104,7 +6104,7 @@ return _this19.addRemoteTextTrack(tt, !1); }), this.ready(ready); } - }, _proto.getMedia = function() { + }, _proto.getMedia = function getMedia() { if (!this.cache_.media) { var poster = this.poster(), media = { src: this.currentSources(), @@ -6125,7 +6125,7 @@ ]), media; } return mergeOptions$3(this.cache_.media); - }, Player.getTagSettings = function(tag) { + }, Player.getTagSettings = function getTagSettings(tag) { var baseOptions = { sources: [], tracks: [] @@ -6139,13 +6139,13 @@ "source" === childName ? baseOptions.sources.push(getAttributes(child)) : "track" === childName && baseOptions.tracks.push(getAttributes(child)); } return baseOptions; - }, _proto.flexNotSupported_ = function() { + }, _proto.flexNotSupported_ = function flexNotSupported_() { var elem = global_document__WEBPACK_IMPORTED_MODULE_1___default().createElement("i"); return !("flexBasis" in elem.style || "webkitFlexBasis" in elem.style || "mozFlexBasis" in elem.style || "msFlexBasis" in elem.style || "msFlexOrder" in elem.style); - }, _proto.debug = function(enabled) { + }, _proto.debug = function debug(enabled) { if (void 0 === enabled) return this.debugEnabled_; enabled ? (this.trigger("debugon"), this.previousLogLevel_ = this.log.level, this.log.level("debug"), this.debugEnabled_ = !0) : (this.trigger("debugoff"), this.log.level(this.previousLogLevel_), this.previousLogLevel_ = void 0, this.debugEnabled_ = !1); - }, _proto.playbackRates = function(newRates) { + }, _proto.playbackRates = function playbackRates(newRates) { if (void 0 === newRates) return this.cache_.playbackRates; Array.isArray(newRates) && newRates.every(function(rate) { return "number" == typeof rate; @@ -6250,34 +6250,34 @@ this.player = player, this.log || (this.log = this.player.log.createLogger(this.name)), evented(this), delete this.trigger, stateful(this, this.constructor.defaultState), markPluginAsActive(player, this.name), this.dispose = this.dispose.bind(this), player.on("dispose", this.dispose); } var _proto = Plugin.prototype; - return _proto.version = function() { + return _proto.version = function version() { return this.constructor.VERSION; - }, _proto.getEventHash = function(hash) { + }, _proto.getEventHash = function getEventHash(hash) { return void 0 === hash && (hash = {}), hash.name = this.name, hash.plugin = this.constructor, hash.instance = this, hash; - }, _proto.trigger = function(event, hash) { + }, _proto.trigger = function trigger$1(event, hash) { return void 0 === hash && (hash = {}), trigger(this.eventBusEl_, event, this.getEventHash(hash)); - }, _proto.handleStateChanged = function(e) {}, _proto.dispose = function() { + }, _proto.handleStateChanged = function handleStateChanged(e) {}, _proto.dispose = function dispose() { var name = this.name, player = this.player; this.trigger("dispose"), this.off(), player.off("dispose", this.dispose), player[PLUGIN_CACHE_KEY][name] = !1, this.player = this.state = null, player[name] = createPluginFactory(name, pluginStorage[name]); - }, Plugin.isBasic = function(plugin) { + }, Plugin.isBasic = function isBasic(plugin) { var p = "string" == typeof plugin ? getPlugin(plugin) : plugin; return "function" == typeof p && !Plugin.prototype.isPrototypeOf(p.prototype); - }, Plugin.registerPlugin = function(name, plugin) { + }, Plugin.registerPlugin = function registerPlugin(name, plugin) { if ("string" != typeof name) throw Error('Illegal plugin name, "' + name + '", must be a string, was ' + typeof name + "."); if (pluginExists(name)) log$1.warn('A plugin named "' + name + '" already exists. You may want to avoid re-registering plugins!'); else if (Player.prototype.hasOwnProperty(name)) throw Error('Illegal plugin name, "' + name + '", cannot share a name with an existing player method!'); if ("function" != typeof plugin) throw Error('Illegal plugin for "' + name + '", must be a function, was ' + typeof plugin + "."); return pluginStorage[name] = plugin, name !== BASE_PLUGIN_NAME && (Plugin.isBasic(plugin) ? Player.prototype[name] = createBasicPlugin(name, plugin) : Player.prototype[name] = createPluginFactory(name, plugin)), plugin; - }, Plugin.deregisterPlugin = function(name) { + }, Plugin.deregisterPlugin = function deregisterPlugin(name) { if (name === BASE_PLUGIN_NAME) throw Error("Cannot de-register base plugin."); pluginExists(name) && (delete pluginStorage[name], delete Player.prototype[name]); - }, Plugin.getPlugins = function(names) { + }, Plugin.getPlugins = function getPlugins(names) { var result; return void 0 === names && (names = Object.keys(pluginStorage)), names.forEach(function(name) { var plugin = getPlugin(name); plugin && ((result = result || {})[name] = plugin); }), result; - }, Plugin.getPluginVersion = function(name) { + }, Plugin.getPluginVersion = function getPluginVersion(name) { var plugin = getPlugin(name); return plugin && plugin.VERSION || ""; }, Plugin; @@ -6913,7 +6913,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(PlaylistLoader, _EventTarget); var _proto = PlaylistLoader.prototype; - return _proto.handleMediaupdatetimeout_ = function() { + return _proto.handleMediaupdatetimeout_ = function handleMediaupdatetimeout_() { var _this2 = this; if ("HAVE_METADATA" === this.state) { var media = this.media(), uri = resolveUrl(this.master.uri, media.uri); @@ -6931,7 +6931,7 @@ } }); } - }, _proto.playlistRequestError = function(xhr, playlist, startingState) { + }, _proto.playlistRequestError = function playlistRequestError(xhr, playlist, startingState) { var uri = playlist.uri, id = playlist.id; this.request = null, startingState && (this.state = startingState), this.error = { playlist: this.master.playlists[id], @@ -6940,14 +6940,14 @@ responseText: xhr.responseText, code: xhr.status >= 500 ? 4 : 2 }, this.trigger("error"); - }, _proto.parseManifest_ = function(_ref) { + }, _proto.parseManifest_ = function parseManifest_(_ref) { var _this3 = this, url = _ref.url; return parseManifest({ - onwarn: function(_ref2) { + onwarn: function onwarn(_ref2) { var message = _ref2.message; return _this3.logger_("m3u8-parser warn for " + url + ": " + message); }, - oninfo: function(_ref3) { + oninfo: function oninfo(_ref3) { var message = _ref3.message; return _this3.logger_("m3u8-parser info for " + url + ": " + message); }, @@ -6956,7 +6956,7 @@ customTagMappers: this.customTagMappers, experimentalLLHLS: this.experimentalLLHLS }); - }, _proto.haveMetadata = function(_ref4) { + }, _proto.haveMetadata = function haveMetadata(_ref4) { var playlistString = _ref4.playlistString, playlistObject = _ref4.playlistObject, url = _ref4.url, id = _ref4.id; this.request = null, this.state = "HAVE_METADATA"; var playlist = playlistObject || this.parseManifest_({ @@ -6970,14 +6970,14 @@ }); var update = updateMaster$1(this.master, playlist); this.targetDuration = playlist.partTargetDuration || playlist.targetDuration, this.pendingMedia_ = null, update ? (this.master = update, this.media_ = this.master.playlists[id]) : this.trigger("playlistunchanged"), this.updateMediaUpdateTimeout_(refreshDelay(this.media(), !!update)), this.trigger("loadedplaylist"); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.trigger("dispose"), this.stopRequest(), global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaUpdateTimeout), global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.finalRenditionTimeout), this.off(); - }, _proto.stopRequest = function() { + }, _proto.stopRequest = function stopRequest() { if (this.request) { var oldRequest = this.request; this.request = null, oldRequest.onreadystatechange = null, oldRequest.abort(); } - }, _proto.media = function(playlist, shouldDelay) { + }, _proto.media = function media(playlist, shouldDelay) { var _this4 = this; if (!playlist) return this.media_; if ("HAVE_NOTHING" === this.state) throw Error("Cannot switch media playlist from " + this.state); @@ -7014,9 +7014,9 @@ } }); } - }, _proto.pause = function() { + }, _proto.pause = function pause() { this.mediaUpdateTimeout && (global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaUpdateTimeout), this.mediaUpdateTimeout = null), this.stopRequest(), "HAVE_NOTHING" === this.state && (this.started = !1), "SWITCHING_MEDIA" === this.state ? this.media_ ? this.state = "HAVE_METADATA" : this.state = "HAVE_MASTER" : "HAVE_CURRENT_METADATA" === this.state && (this.state = "HAVE_METADATA"); - }, _proto.load = function(shouldDelay) { + }, _proto.load = function load(shouldDelay) { var _this5 = this; this.mediaUpdateTimeout && (global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaUpdateTimeout), this.mediaUpdateTimeout = null); var media = this.media(); @@ -7032,12 +7032,12 @@ return; } media && !media.endList ? this.trigger("mediaupdatetimeout") : this.trigger("loadedplaylist"); - }, _proto.updateMediaUpdateTimeout_ = function(delay) { + }, _proto.updateMediaUpdateTimeout_ = function updateMediaUpdateTimeout_(delay) { var _this6 = this; this.mediaUpdateTimeout && (global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaUpdateTimeout), this.mediaUpdateTimeout = null), this.media() && !this.media().endList && (this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(function() { _this6.mediaUpdateTimeout = null, _this6.trigger("mediaupdatetimeout"), _this6.updateMediaUpdateTimeout_(delay); }, delay)); - }, _proto.start = function() { + }, _proto.start = function start() { var _this7 = this; if (this.started = !0, "object" == typeof this.src) { this.src.uri || (this.src.uri = global_window__WEBPACK_IMPORTED_MODULE_0___default().location.href), this.src.resolvedUri = this.src.uri, setTimeout(function() { @@ -7064,9 +7064,9 @@ _this7.setupInitialPlaylist(manifest); } }); - }, _proto.srcUri = function() { + }, _proto.srcUri = function srcUri() { return "string" == typeof this.src ? this.src : this.src.uri; - }, _proto.setupInitialPlaylist = function(manifest) { + }, _proto.setupInitialPlaylist = function setupInitialPlaylist(manifest) { if (this.state = "HAVE_MASTER", manifest.playlists) { this.master = manifest, addPropertiesToMaster(this.master, this.srcUri()), manifest.playlists.forEach(function(playlist) { playlist.segments = getAllSegments(playlist), playlist.segments.forEach(function(segment) { @@ -7268,7 +7268,7 @@ } }, request = xhr({ uri: uri, - beforeSend: function(request) { + beforeSend: function beforeSend(request) { request.overrideMimeType("text/plain; charset=x-user-defined"), request.addEventListener("progress", function(_ref) { return _ref.total, _ref.loaded, callbackWrapper(request, null, { statusCode: request.status @@ -7349,14 +7349,14 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(DashPlaylistLoader, _EventTarget); var _proto = DashPlaylistLoader.prototype; - return _proto.requestErrored_ = function(err, request, startingState) { + return _proto.requestErrored_ = function requestErrored_(err, request, startingState) { return !this.request || ((this.request = null, err) ? (this.error = "object" != typeof err || err instanceof Error ? { status: request.status, message: "DASH request error at URL: " + request.uri, response: request.response, code: 2 } : err, startingState && (this.state = startingState), this.trigger("error"), !0) : void 0); - }, _proto.addSidxSegments_ = function(playlist, startingState, cb) { + }, _proto.addSidxSegments_ = function addSidxSegments_(playlist, startingState, cb) { var _this2 = this, sidxKey = playlist.sidx && (0, mpd_parser__WEBPACK_IMPORTED_MODULE_9__.mm)(playlist.sidx); if (!playlist.sidx || !sidxKey || this.masterPlaylistLoader_.sidxMapping_[sidxKey]) { this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(function() { @@ -7404,16 +7404,16 @@ }) }, fin); }); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.trigger("dispose"), this.stopRequest(), this.loadedPlaylists_ = {}, global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.minimumUpdatePeriodTimeout_), global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaRequest_), global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaUpdateTimeout), this.mediaUpdateTimeout = null, this.mediaRequest_ = null, this.minimumUpdatePeriodTimeout_ = null, this.masterPlaylistLoader_.createMupOnMedia_ && (this.off("loadedmetadata", this.masterPlaylistLoader_.createMupOnMedia_), this.masterPlaylistLoader_.createMupOnMedia_ = null), this.off(); - }, _proto.hasPendingRequest = function() { + }, _proto.hasPendingRequest = function hasPendingRequest() { return this.request || this.mediaRequest_; - }, _proto.stopRequest = function() { + }, _proto.stopRequest = function stopRequest() { if (this.request) { var oldRequest = this.request; this.request = null, oldRequest.onreadystatechange = null, oldRequest.abort(); } - }, _proto.media = function(playlist) { + }, _proto.media = function media(playlist) { var _this3 = this; if (!playlist) return this.media_; if ("HAVE_NOTHING" === this.state) throw Error("Cannot switch media playlist from " + this.state); @@ -7433,12 +7433,12 @@ playlist: playlist }); })); - }, _proto.haveMetadata = function(_ref2) { + }, _proto.haveMetadata = function haveMetadata(_ref2) { var startingState = _ref2.startingState, playlist = _ref2.playlist; this.state = "HAVE_METADATA", this.loadedPlaylists_[playlist.id] = playlist, this.mediaRequest_ = null, this.refreshMedia_(playlist.id), "HAVE_MASTER" === startingState ? this.trigger("loadedmetadata") : this.trigger("mediachange"); - }, _proto.pause = function() { + }, _proto.pause = function pause() { this.masterPlaylistLoader_.createMupOnMedia_ && (this.off("loadedmetadata", this.masterPlaylistLoader_.createMupOnMedia_), this.masterPlaylistLoader_.createMupOnMedia_ = null), this.stopRequest(), global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaUpdateTimeout), this.mediaUpdateTimeout = null, this.isMaster_ && (global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_), this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_ = null), "HAVE_NOTHING" === this.state && (this.started = !1); - }, _proto.load = function(isFinalRendition) { + }, _proto.load = function load(isFinalRendition) { var _this4 = this; global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.mediaUpdateTimeout), this.mediaUpdateTimeout = null; var media = this.media(); @@ -7454,7 +7454,7 @@ return; } media && !media.endList ? (this.isMaster_ && !this.minimumUpdatePeriodTimeout_ && (this.trigger("minimumUpdatePeriod"), this.updateMinimumUpdatePeriodTimeout_()), this.trigger("mediaupdatetimeout")) : this.trigger("loadedplaylist"); - }, _proto.start = function() { + }, _proto.start = function start() { var _this5 = this; if (this.started = !0, !this.isMaster_) { this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(function() { @@ -7465,7 +7465,7 @@ this.requestMaster_(function(req, masterChanged) { _this5.haveMaster_(), _this5.hasPendingRequest() || _this5.media_ || _this5.media(_this5.masterPlaylistLoader_.master.playlists[0]); }); - }, _proto.requestMaster_ = function(cb) { + }, _proto.requestMaster_ = function requestMaster_(cb) { var _this6 = this; this.request = this.vhs_.xhr({ uri: this.masterPlaylistLoader_.srcUrl, @@ -7484,7 +7484,7 @@ } return cb(req, masterChanged); }); - }, _proto.syncClientServerClock_ = function(done) { + }, _proto.syncClientServerClock_ = function syncClientServerClock_(done) { var _this7 = this, utcTiming = (0, mpd_parser__WEBPACK_IMPORTED_MODULE_9__.LG)(this.masterPlaylistLoader_.masterXml_); return null === utcTiming ? (this.masterPlaylistLoader_.clientOffset_ = this.masterLoaded_ - Date.now(), done()) : "DIRECT" === utcTiming.method ? (this.masterPlaylistLoader_.clientOffset_ = utcTiming.value - Date.now(), done()) : void (this.request = this.vhs_.xhr({ uri: resolveUrl(this.masterPlaylistLoader_.srcUrl, utcTiming.value), @@ -7497,9 +7497,9 @@ serverTime = "HEAD" === utcTiming.method ? req.responseHeaders && req.responseHeaders.date ? Date.parse(req.responseHeaders.date) : _this7.masterLoaded_ : Date.parse(req.responseText), _this7.masterPlaylistLoader_.clientOffset_ = serverTime - Date.now(), done(); } })); - }, _proto.haveMaster_ = function() { + }, _proto.haveMaster_ = function haveMaster_() { this.state = "HAVE_MASTER", this.isMaster_ ? this.trigger("loadedplaylist") : this.media_ || this.media(this.childPlaylist_); - }, _proto.handleMaster_ = function() { + }, _proto.handleMaster_ = function handleMaster_() { this.mediaRequest_ = null; var newMaster = parseMasterXml({ masterXml: this.masterPlaylistLoader_.masterXml_, @@ -7510,7 +7510,7 @@ oldMaster && (newMaster = updateMaster(oldMaster, newMaster, this.masterPlaylistLoader_.sidxMapping_)), this.masterPlaylistLoader_.master = newMaster || oldMaster; var location = this.masterPlaylistLoader_.master.locations && this.masterPlaylistLoader_.master.locations[0]; return location && location !== this.masterPlaylistLoader_.srcUrl && (this.masterPlaylistLoader_.srcUrl = location), (!oldMaster || newMaster && newMaster.minimumUpdatePeriod !== oldMaster.minimumUpdatePeriod) && this.updateMinimumUpdatePeriodTimeout_(), !!newMaster; - }, _proto.updateMinimumUpdatePeriodTimeout_ = function() { + }, _proto.updateMinimumUpdatePeriodTimeout_ = function updateMinimumUpdatePeriodTimeout_() { var mpl = this.masterPlaylistLoader_; mpl.createMupOnMedia_ && (mpl.off("loadedmetadata", mpl.createMupOnMedia_), mpl.createMupOnMedia_ = null), mpl.minimumUpdatePeriodTimeout_ && (global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(mpl.minimumUpdatePeriodTimeout_), mpl.minimumUpdatePeriodTimeout_ = null); var mup = mpl.master && mpl.master.minimumUpdatePeriod; @@ -7519,19 +7519,19 @@ return; } this.createMUPTimeout_(mup); - }, _proto.createMUPTimeout_ = function(mup) { + }, _proto.createMUPTimeout_ = function createMUPTimeout_(mup) { var mpl = this.masterPlaylistLoader_; mpl.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(function() { mpl.minimumUpdatePeriodTimeout_ = null, mpl.trigger("minimumUpdatePeriod"), mpl.createMUPTimeout_(mup); }, mup); - }, _proto.refreshXml_ = function() { + }, _proto.refreshXml_ = function refreshXml_() { var _this8 = this; this.requestMaster_(function(req, masterChanged) { masterChanged && (_this8.media_ && (_this8.media_ = _this8.masterPlaylistLoader_.master.playlists[_this8.media_.id]), _this8.masterPlaylistLoader_.sidxMapping_ = filterChangedSidxMappings(_this8.masterPlaylistLoader_.master, _this8.masterPlaylistLoader_.sidxMapping_), _this8.addSidxSegments_(_this8.media(), _this8.state, function(sidxChanged) { _this8.refreshMedia_(_this8.media().id); })); }); - }, _proto.refreshMedia_ = function(mediaID) { + }, _proto.refreshMedia_ = function refreshMedia_(mediaID) { var _this9 = this; if (!mediaID) throw Error("refreshMedia_ must take a media id"); this.media_ && this.isMaster_ && this.handleMaster_(); @@ -7835,15 +7835,15 @@ 0x00 ]); } - }(), box = function(type) { + }(), box = function box(type) { var i, result, payload = [], size = 0; for(i = 1; i < arguments.length; i++)payload.push(arguments[i]); for(i = payload.length; i--;)size += payload[i].byteLength; for(result = new Uint8Array(size + 8), new DataView(result.buffer, result.byteOffset, result.byteLength).setUint32(0, result.byteLength), result.set(type, 4), i = 0, size = 8; i < payload.length; i++)result.set(payload[i], size), size += payload[i].byteLength; return result; - }, ftyp = function() { + }, ftyp = function ftyp() { return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND); - }, mdhd = function(track) { + }, mdhd = function mdhd(track) { var result = new Uint8Array([ 0x00, 0x00, @@ -7871,23 +7871,23 @@ 0x00 ]); return track.samplerate && (result[12] = track.samplerate >>> 24 & 0xff, result[13] = track.samplerate >>> 16 & 0xff, result[14] = track.samplerate >>> 8 & 0xff, result[15] = 0xff & track.samplerate), box(types.mdhd, result); - }, mdia = function(track) { + }, mdia = function mdia(track) { var type; return box(types.mdia, mdhd(track), (type = track.type, box(types.hdlr, HDLR_TYPES[type])), minf(track)); - }, minf = function(track) { + }, minf = function minf(track) { return box(types.minf, "video" === track.type ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), box(types.dinf, box(types.dref, DREF)), stbl(track)); - }, moov = function(tracks) { + }, moov = function moov(tracks) { for(var i = tracks.length, boxes = []; i--;)boxes[i] = trak(tracks[i]); return box.apply(null, [ types.moov, mvhd(0xffffffff) ].concat(boxes).concat(mvex(tracks))); - }, mvex = function(tracks) { + }, mvex = function mvex(tracks) { for(var i = tracks.length, boxes = []; i--;)boxes[i] = trex(tracks[i]); return box.apply(null, [ types.mvex ].concat(boxes)); - }, mvhd = function(duration) { + }, mvhd = function mvhd(duration) { var bytes = new Uint8Array([ 0x00, 0x00, @@ -7991,13 +7991,13 @@ 0xff ]); return box(types.mvhd, bytes); - }, sdtp = function(track) { + }, sdtp = function sdtp(track) { var flags, i, samples = track.samples || [], bytes = new Uint8Array(4 + samples.length); for(i = 0; i < samples.length; i++)flags = samples[i].flags, bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy; return box(types.sdtp, bytes); - }, stbl = function(track) { + }, stbl = function stbl(track) { return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO)); - }, stsd = function(track) { + }, stsd = function stsd(track) { return box(types.stsd, new Uint8Array([ 0x00, 0x00, @@ -8008,7 +8008,7 @@ 0x00, 0x01 ]), "video" === track.type ? videoSample(track) : audioSample(track)); - }, videoSample = function(track) { + }, videoSample = function videoSample(track) { var i, avc1Box, sps = track.sps || [], pps = track.pps || [], sequenceParameterSets = [], pictureParameterSets = []; for(i = 0; i < sps.length; i++)sequenceParameterSets.push((0xff00 & sps[i].byteLength) >>> 8), sequenceParameterSets.push(0xff & sps[i].byteLength), sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); for(i = 0; i < pps.length; i++)pictureParameterSets.push((0xff00 & pps[i].byteLength) >>> 8), pictureParameterSets.push(0xff & pps[i].byteLength), pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i])); @@ -8133,7 +8133,7 @@ ]))); } return box.apply(null, avc1Box); - }, audioSample = function(track) { + }, audioSample = function audioSample(track) { return box(types.mp4a, new Uint8Array([ 0x00, 0x00, @@ -8196,7 +8196,7 @@ 0x01, 0x02 ]))); - }, tkhd = function(track) { + }, tkhd = function tkhd(track) { var result = new Uint8Array([ 0x00, 0x00, @@ -8284,7 +8284,7 @@ 0x00 ]); return box(types.tkhd, result); - }, traf = function(track) { + }, traf = function traf(track) { var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime; return (trackFragmentHeader = box(types.tfhd, new Uint8Array([ 0x00, @@ -8325,9 +8325,9 @@ lowerWordBaseMediaDecodeTime >>> 8 & 0xff, 0xff & lowerWordBaseMediaDecodeTime ])), "audio" === track.type) ? (trackFragmentRun = trun$1(track, 92), box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun)) : (sampleDependencyTable = sdtp(track), trackFragmentRun = trun$1(track, sampleDependencyTable.length + 92), box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable)); - }, trak = function(track) { + }, trak = function trak(track) { return track.duration = track.duration || 0xffffffff, box(types.trak, tkhd(track), mdia(track)); - }, trex = function(track) { + }, trex = function trex(track) { var result = new Uint8Array([ 0x00, 0x00, @@ -8355,7 +8355,7 @@ 0x01 ]); return "video" !== track.type && (result[result.length - 1] = 0x00), box(types.trex, result); - }, trunHeader = function(samples, offset) { + }, trunHeader = function trunHeader(samples, offset) { var durationPresent = 0, sizePresent = 0, flagsPresent = 0, compositionTimeOffset = 0; return samples.length && (void 0 !== samples[0].duration && (durationPresent = 0x1), void 0 !== samples[0].size && (sizePresent = 0x2), void 0 !== samples[0].flags && (flagsPresent = 0x4), void 0 !== samples[0].compositionTimeOffset && (compositionTimeOffset = 0x8)), [ 0x00, @@ -8371,23 +8371,23 @@ (0xff00 & offset) >>> 8, 0xff & offset ]; - }, videoTrun = function(track, offset) { + }, videoTrun = function videoTrun(track, offset) { var bytesOffest, bytes, header, samples, sample, i; for(offset += 20 + 16 * (samples = track.samples || []).length, header = trunHeader(samples, offset), (bytes = new Uint8Array(header.length + 16 * samples.length)).set(header), bytesOffest = header.length, i = 0; i < samples.length; i++)sample = samples[i], bytes[bytesOffest++] = (0xff000000 & sample.duration) >>> 24, bytes[bytesOffest++] = (0xff0000 & sample.duration) >>> 16, bytes[bytesOffest++] = (0xff00 & sample.duration) >>> 8, bytes[bytesOffest++] = 0xff & sample.duration, bytes[bytesOffest++] = (0xff000000 & sample.size) >>> 24, bytes[bytesOffest++] = (0xff0000 & sample.size) >>> 16, bytes[bytesOffest++] = (0xff00 & sample.size) >>> 8, bytes[bytesOffest++] = 0xff & sample.size, bytes[bytesOffest++] = sample.flags.isLeading << 2 | sample.flags.dependsOn, bytes[bytesOffest++] = sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample, bytes[bytesOffest++] = 61440 & sample.flags.degradationPriority, bytes[bytesOffest++] = 0x0f & sample.flags.degradationPriority, bytes[bytesOffest++] = (0xff000000 & sample.compositionTimeOffset) >>> 24, bytes[bytesOffest++] = (0xff0000 & sample.compositionTimeOffset) >>> 16, bytes[bytesOffest++] = (0xff00 & sample.compositionTimeOffset) >>> 8, bytes[bytesOffest++] = 0xff & sample.compositionTimeOffset; return box(types.trun, bytes); - }, audioTrun = function(track, offset) { + }, audioTrun = function audioTrun(track, offset) { var bytes, bytesOffest, header, samples, sample, i; for(offset += 20 + 8 * (samples = track.samples || []).length, header = trunHeader(samples, offset), (bytes = new Uint8Array(header.length + 8 * samples.length)).set(header), bytesOffest = header.length, i = 0; i < samples.length; i++)sample = samples[i], bytes[bytesOffest++] = (0xff000000 & sample.duration) >>> 24, bytes[bytesOffest++] = (0xff0000 & sample.duration) >>> 16, bytes[bytesOffest++] = (0xff00 & sample.duration) >>> 8, bytes[bytesOffest++] = 0xff & sample.duration, bytes[bytesOffest++] = (0xff000000 & sample.size) >>> 24, bytes[bytesOffest++] = (0xff0000 & sample.size) >>> 16, bytes[bytesOffest++] = (0xff00 & sample.size) >>> 8, bytes[bytesOffest++] = 0xff & sample.size; return box(types.trun, bytes); - }, trun$1 = function(track, offset) { + }, trun$1 = function trun(track, offset) { return "audio" === track.type ? audioTrun(track, offset) : videoTrun(track, offset); }; var mp4Generator = { ftyp: ftyp, - mdat: function(data) { + mdat: function mdat(data) { return box(types.mdat, data); }, - moof: function(sequenceNumber, tracks) { + moof: function moof(sequenceNumber, tracks) { for(var trackFragments = [], i = tracks.length; i--;)trackFragments[i] = traf(tracks[i]); return box.apply(null, [ types.moof, @@ -8404,7 +8404,7 @@ ].concat(trackFragments)); }, moov: moov, - initSegment: function(tracks) { + initSegment: function initSegment(tracks) { var result, fileType = ftyp(), movie = moov(tracks); return (result = new Uint8Array(fileType.byteLength + movie.byteLength)).set(fileType), result.set(movie, fileType.byteLength), result; } @@ -8711,25 +8711,25 @@ return silence; }, clock = { ONE_SECOND_IN_TS: 90000, - secondsToVideoTs: secondsToVideoTs = function(seconds) { + secondsToVideoTs: secondsToVideoTs = function secondsToVideoTs(seconds) { return 90000 * seconds; }, - secondsToAudioTs: secondsToAudioTs = function(seconds, sampleRate) { + secondsToAudioTs: secondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) { return seconds * sampleRate; }, - videoTsToSeconds: videoTsToSeconds = function(timestamp) { + videoTsToSeconds: videoTsToSeconds = function videoTsToSeconds(timestamp) { return timestamp / 90000; }, - audioTsToSeconds: audioTsToSeconds = function(timestamp, sampleRate) { + audioTsToSeconds: audioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) { return timestamp / sampleRate; }, - audioTsToVideoTs: function(timestamp, sampleRate) { + audioTsToVideoTs: function audioTsToVideoTs(timestamp, sampleRate) { return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate)); }, - videoTsToAudioTs: function(timestamp, sampleRate) { + videoTsToAudioTs: function videoTsToAudioTs(timestamp, sampleRate) { return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate); }, - metadataTsToSeconds: function(timestamp, timelineStartPts, keepOriginalTimestamps) { + metadataTsToSeconds: function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) { return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts); } }, sumFrameByteLengths = function(array) { @@ -9320,7 +9320,7 @@ }, parseSyncSafeInteger$1 = function(data) { return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3]; }, tagParsers = { - TXXX: function(tag) { + TXXX: function TXXX(tag) { var i; if (3 === tag.data[0]) { for(i = 1; i < tag.data.length; i++)if (0 === tag.data[i]) { @@ -9330,7 +9330,7 @@ tag.data = tag.value; } }, - WXXX: function(tag) { + WXXX: function WXXX(tag) { var i; if (3 === tag.data[0]) { for(i = 1; i < tag.data.length; i++)if (0 === tag.data[i]) { @@ -9339,7 +9339,7 @@ } } }, - PRIV: function(tag) { + PRIV: function PRIV(tag) { var i; for(i = 0; i < tag.data.length; i++)if (0 === tag.data[i]) { tag.owner = unescape(percentEncode$1(tag.data, 0, i)); @@ -9348,7 +9348,7 @@ tag.privateData = tag.data.subarray(i + 1), tag.data = tag.privateData; } }; - (_MetadataStream = function(options) { + (_MetadataStream = function MetadataStream(options) { var i, settings = { descriptor: options && options.descriptor }, tagSize = 0, buffer = [], bufferSize = 0; @@ -9394,7 +9394,7 @@ }; }).prototype = new Stream(); var TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; - (_TransportPacketStream = function() { + (_TransportPacketStream = function TransportPacketStream() { var buffer = new Uint8Array(188), bytesInBuffer = 0; _TransportPacketStream.prototype.init.call(this), this.push = function(bytes) { var everything, startIndex = 0, endIndex = 188; @@ -9413,14 +9413,14 @@ }, this.reset = function() { bytesInBuffer = 0, this.trigger("reset"); }; - }).prototype = new Stream(), (_TransportParseStream = function() { + }).prototype = new Stream(), (_TransportParseStream = function TransportParseStream() { var parsePsi, parsePat, parsePmt, self1; - _TransportParseStream.prototype.init.call(this), self1 = this, this.packetsWaitingForPmt = [], this.programMapTable = void 0, parsePsi = function(payload, psi) { + _TransportParseStream.prototype.init.call(this), self1 = this, this.packetsWaitingForPmt = [], this.programMapTable = void 0, parsePsi = function parsePsi(payload, psi) { var offset = 0; psi.payloadUnitStartIndicator && (offset += payload[offset] + 1), "pat" === psi.type ? parsePat(payload.subarray(offset), psi) : parsePmt(payload.subarray(offset), psi); - }, parsePat = function(payload, pat) { + }, parsePat = function parsePat(payload, pat) { pat.section_number = payload[7], pat.last_section_number = payload[8], self1.pmtPid = (0x1f & payload[10]) << 8 | payload[11], pat.pmtPid = self1.pmtPid; - }, parsePmt = function(payload, pmt) { + }, parsePmt = function parsePmt(payload, pmt) { var tableEnd, offset; if (0x01 & payload[5]) { for(self1.programMapTable = { @@ -9448,7 +9448,7 @@ }).prototype = new Stream(), _TransportParseStream.STREAM_TYPES = { h264: 0x1b, adts: 0x0f - }, (_ElementaryStream = function() { + }, (_ElementaryStream = function ElementaryStream() { var programMapTable, self1 = this, segmentHadPmt = !1, video = { data: [], size: 0 @@ -9472,8 +9472,8 @@ }; _ElementaryStream.prototype.init.call(this), this.push = function(data) { ({ - pat: function() {}, - pes: function() { + pat: function pat() {}, + pes: function pes() { var stream, streamType; switch(data.streamType){ case streamTypes.H264_STREAM_TYPE: @@ -9490,7 +9490,7 @@ } data.payloadUnitStartIndicator && flushStream(stream, streamType, !0), stream.data.push(data), stream.size += data.data.byteLength; }, - pmt: function() { + pmt: function pmt() { var event = { type: "metadata", tracks: [] @@ -9569,7 +9569,7 @@ 8000, 7350 ]; - (_AdtsStream = function(handlePartialSegments) { + (_AdtsStream = function AdtsStream(handlePartialSegments) { var buffer, frameNum = 0; _AdtsStream.prototype.init.call(this), this.skipWarn_ = function(start, end) { this.trigger("log", { @@ -9643,7 +9643,7 @@ return this.readBits(8); }, this.loadWord(); }; - (_NalByteStream = function() { + (_NalByteStream = function NalByteStream() { var i, buffer, syncPoint = 0; _NalByteStream.prototype.init.call(this), this.push = function(data) { buffer ? ((swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength)).set(buffer), swapBuffer.set(data.data, buffer.byteLength), buffer = swapBuffer) : buffer = data.data; @@ -9697,7 +9697,7 @@ 138: !0, 139: !0, 134: !0 - }, (_H264Stream = function() { + }, (_H264Stream = function H264Stream() { var self1, trackId, currentPts, currentDts, discardEmulationPreventionBytes, readSequenceParameterSet, skipScalingList, nalByteStream = new _NalByteStream(); _H264Stream.prototype.init.call(this), self1 = this, this.push = function(packet) { "video" === packet.type && (trackId = packet.trackId, currentPts = packet.pts, currentDts = packet.dts, nalByteStream.push(packet)); @@ -9742,17 +9742,17 @@ nalByteStream.reset(); }, this.endTimeline = function() { nalByteStream.endTimeline(); - }, skipScalingList = function(count, expGolombDecoder) { + }, skipScalingList = function skipScalingList(count, expGolombDecoder) { var j, lastScale = 8, nextScale = 8; for(j = 0; j < count; j++)0 !== nextScale && (nextScale = (lastScale + expGolombDecoder.readExpGolomb() + 256) % 256), lastScale = 0 === nextScale ? lastScale : nextScale; - }, discardEmulationPreventionBytes = function(data) { + }, discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) { for(var newLength, newData, length = data.byteLength, emulationPreventionBytesPositions = [], i = 1; i < length - 2;)0 === data[i] && 0 === data[i + 1] && 0x03 === data[i + 2] ? (emulationPreventionBytesPositions.push(i + 2), i += 2) : i++; if (0 === emulationPreventionBytesPositions.length) return data; newLength = length - emulationPreventionBytesPositions.length, newData = new Uint8Array(newLength); var sourceIndex = 0; for(i = 0; i < newLength; sourceIndex++, i++)sourceIndex === emulationPreventionBytesPositions[0] && (sourceIndex++, emulationPreventionBytesPositions.shift()), newData[i] = data[sourceIndex]; return newData; - }, readSequenceParameterSet = function(data) { + }, readSequenceParameterSet = function readSequenceParameterSet(data) { var expGolombDecoder, profileIdc, levelIdc, profileCompatibility, chromaFormatIdc, picOrderCntType, numRefFramesInPicOrderCntCycle, picWidthInMbsMinus1, picHeightInMapUnitsMinus1, frameMbsOnlyFlag, scalingListCount, i, frameCropLeftOffset = 0, frameCropRightOffset = 0, frameCropTopOffset = 0, frameCropBottomOffset = 0, sarRatio = [ 1, 1 @@ -9944,7 +9944,7 @@ return null; } }; - (_AacStream = function() { + (_AacStream = function AacStream() { var everything = new Uint8Array(), timeStamp = 0; _AacStream.prototype.init.call(this), this.setTimestamp = function(timestamp) { timeStamp = timestamp; @@ -10017,7 +10017,7 @@ baseMediaDecodeTime: baseMediaDecodeTime }; }; - (_AudioSegmentStream = function(track, options) { + (_AudioSegmentStream = function AudioSegmentStream(track, options) { var sequenceNumber, adtsFrames = [], earliestAllowedDts = 0, audioAppendStartTs = 0, videoBaseMediaDecodeTime = 1 / 0; sequenceNumber = (options = options || {}).firstSequenceNumber || 0, _AudioSegmentStream.prototype.init.call(this), this.push = function(data) { trackDecodeInfo.collectDtsInfo(track, data), track && audioProperties.forEach(function(prop) { @@ -10047,7 +10047,7 @@ }, this.reset = function() { trackDecodeInfo.clearDtsInfo(track), adtsFrames = [], this.trigger("reset"); }; - }).prototype = new Stream(), (_VideoSegmentStream = function(track, options) { + }).prototype = new Stream(), (_VideoSegmentStream = function VideoSegmentStream(track, options) { var sequenceNumber, config, pps, nalUnits = [], gopsToAlignWith = []; sequenceNumber = (options = options || {}).firstSequenceNumber || 0, _VideoSegmentStream.prototype.init.call(this), delete track.minPTS, this.gopCache_ = [], this.push = function(nalUnit) { trackDecodeInfo.collectDtsInfo(track, nalUnit), "seq_parameter_set_rbsp" !== nalUnit.nalUnitType || config || (config = nalUnit.config, track.sps = [ @@ -10136,7 +10136,7 @@ }, this.alignGopsWith = function(newGopsToAlignWith) { gopsToAlignWith = newGopsToAlignWith; }; - }).prototype = new Stream(), (_CoalesceStream = function(options, metadataStream) { + }).prototype = new Stream(), (_CoalesceStream = function CoalesceStream(options, metadataStream) { this.numberOfTracks = 0, this.metadataStream = metadataStream, void 0 !== (options = options || {}).remux ? this.remuxTracks = !!options.remux : this.remuxTracks = !0, "boolean" == typeof options.keepOriginalTimestamps ? this.keepOriginalTimestamps = options.keepOriginalTimestamps : this.keepOriginalTimestamps = !1, this.pendingTracks = [], this.videoTrack = null, this.pendingBoxes = [], this.pendingCaptions = [], this.pendingMetadata = [], this.pendingBytes = 0, this.emittedTracks = 0, _CoalesceStream.prototype.init.call(this), this.push = function(output) { return output.text ? this.pendingCaptions.push(output) : output.frames ? this.pendingMetadata.push(output) : void (this.pendingTracks.push(output.track), this.pendingBytes += output.boxes.byteLength, "video" === output.track.type && (this.videoTrack = output.track, this.pendingBoxes.push(output.boxes)), "audio" === output.track.type && (this.audioTrack = output.track, this.pendingBoxes.unshift(output.boxes))); }; @@ -10168,7 +10168,7 @@ this.emittedTracks >= this.numberOfTracks && (this.trigger("done"), this.emittedTracks = 0); }, _CoalesceStream.prototype.setRemux = function(val) { this.remuxTracks = val; - }, (_Transmuxer = function(options) { + }, (_Transmuxer = function Transmuxer(options) { var videoTrack, audioTrack, self1 = this, hasFlushed = !0; _Transmuxer.prototype.init.call(this), options = options || {}, this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0, this.transmuxPipeline_ = {}, this.setupAacPipeline = function() { var pipeline = {}; @@ -10411,7 +10411,7 @@ }, toUnsigned = bin.toUnsigned, toHexString = bin.toHexString, probe$2 = { findBox: findBox_1, parseType: parseType_1, - timescale: function(init) { + timescale: function timescale(init) { return findBox_1(init, [ "moov", "trak" @@ -10425,7 +10425,7 @@ ])[0]) ? (index = 0 === mdhd[0] ? 12 : 20, result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]), result) : null; }, {}); }, - startTime: function(timescale, fragment) { + startTime: function startTime(timescale, fragment) { var trafs, baseTimes, result; return trafs = findBox_1(fragment, [ "moof", @@ -10444,7 +10444,7 @@ }); })), isFinite(result = Math.min.apply(null, baseTimes)) ? result : 0; }, - compositionStartTime: function(timescales, fragment) { + compositionStartTime: function compositionStartTime(timescales, fragment) { var trackId, trafBoxes = findBox_1(fragment, [ "moof", "traf" @@ -10464,7 +10464,7 @@ } return (baseMediaDecodeTime + compositionTimeOffset) / (timescales[trackId] || 90e3); }, - videoTrackIds: function(init) { + videoTrackIds: function getVideoTrackIds(init) { var traks = findBox_1(init, [ "moov", "trak" @@ -10482,7 +10482,7 @@ }); }), videoTrackIds; }, - tracks: function(init) { + tracks: function getTracks(init) { var traks = findBox_1(init, [ "moov", "trak" @@ -10521,7 +10521,7 @@ mdhd && (track.timescale = getTimescaleFromMediaHeader(mdhd)), tracks.push(track); }), tracks; }, - getTimescaleFromMediaHeader: getTimescaleFromMediaHeader = function(mdhd) { + getTimescaleFromMediaHeader: getTimescaleFromMediaHeader = function getTimescaleFromMediaHeader(mdhd) { var index = 0 === mdhd[0] ? 12 : 20; return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]); } @@ -10861,9 +10861,9 @@ this.options = options || {}, this.self = self1, this.init(); } var _proto = MessageHandlers.prototype; - return _proto.init = function() { + return _proto.init = function init() { this.transmuxer && this.transmuxer.dispose(), this.transmuxer = new transmuxer.Transmuxer(this.options), wireTransmuxerEvents(this.self, this.transmuxer); - }, _proto.pushMp4Captions = function(data) { + }, _proto.pushMp4Captions = function pushMp4Captions(data) { this.captionParser || (this.captionParser = new captionParser(), this.captionParser.init()); var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength), parsed = this.captionParser.parse(segment, data.trackIds, data.timescales); this.self.postMessage({ @@ -10874,7 +10874,7 @@ }, [ segment.buffer ]); - }, _proto.probeMp4StartTime = function(_ref) { + }, _proto.probeMp4StartTime = function probeMp4StartTime(_ref) { var timescales = _ref.timescales, data = _ref.data, startTime = probe$2.startTime(timescales, data); this.self.postMessage({ action: "probeMp4StartTime", @@ -10883,7 +10883,7 @@ }, [ data.buffer ]); - }, _proto.probeMp4Tracks = function(_ref2) { + }, _proto.probeMp4Tracks = function probeMp4Tracks(_ref2) { var data = _ref2.data, tracks = probe$2.tracks(data); this.self.postMessage({ action: "probeMp4Tracks", @@ -10892,7 +10892,7 @@ }, [ data.buffer ]); - }, _proto.probeTs = function(_ref3) { + }, _proto.probeTs = function probeTs(_ref3) { var data = _ref3.data, baseStartTime = _ref3.baseStartTime, tsStartTime = "number" != typeof baseStartTime || isNaN(baseStartTime) ? void 0 : baseStartTime * clock.ONE_SECOND_IN_TS, timeInfo = tsInspector.inspect(data, tsStartTime), result = null; timeInfo && ((result = { hasVideo: timeInfo.video && 2 === timeInfo.video.length || !1, @@ -10904,33 +10904,33 @@ }, [ data.buffer ]); - }, _proto.clearAllMp4Captions = function() { + }, _proto.clearAllMp4Captions = function clearAllMp4Captions() { this.captionParser && this.captionParser.clearAllCaptions(); - }, _proto.clearParsedMp4Captions = function() { + }, _proto.clearParsedMp4Captions = function clearParsedMp4Captions() { this.captionParser && this.captionParser.clearParsedCaptions(); - }, _proto.push = function(data) { + }, _proto.push = function push(data) { var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength); this.transmuxer.push(segment); - }, _proto.reset = function() { + }, _proto.reset = function reset() { this.transmuxer.reset(); - }, _proto.setTimestampOffset = function(data) { + }, _proto.setTimestampOffset = function setTimestampOffset(data) { var timestampOffset = data.timestampOffset || 0; this.transmuxer.setBaseMediaDecodeTime(Math.round(clock.secondsToVideoTs(timestampOffset))); - }, _proto.setAudioAppendStart = function(data) { + }, _proto.setAudioAppendStart = function setAudioAppendStart(data) { this.transmuxer.setAudioAppendStart(Math.ceil(clock.secondsToVideoTs(data.appendStart))); - }, _proto.setRemux = function(data) { + }, _proto.setRemux = function setRemux(data) { this.transmuxer.setRemux(data.remux); - }, _proto.flush = function(data) { + }, _proto.flush = function flush(data) { this.transmuxer.flush(), self.postMessage({ action: "done", type: "transmuxed" }); - }, _proto.endTimeline = function() { + }, _proto.endTimeline = function endTimeline() { this.transmuxer.endTimeline(), self.postMessage({ action: "endedtimeline", type: "transmuxed" }); - }, _proto.alignGopsWith = function(data) { + }, _proto.alignGopsWith = function alignGopsWith(data) { this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice()); }, MessageHandlers; }(); @@ -11116,7 +11116,7 @@ action: "probeMp4Tracks", data: segment.map.bytes, transmuxer: segment.transmuxer, - callback: function(_ref) { + callback: function callback(_ref) { var tracks = _ref.tracks, data = _ref.data; return segment.map.bytes = data, tracks.forEach(function(track) { segment.map.tracks = segment.map.tracks || {}, !segment.map.tracks[track.type] && (segment.map.tracks[track.type] = track, "number" == typeof track.id && track.timescale && (segment.map.timescales = segment.map.timescales || {}, segment.map.timescales[track.id] = track.timescale)); @@ -11154,7 +11154,7 @@ transmuxer: segment.transmuxer, data: bytes, baseStartTime: segment.baseStartTime, - callback: function(data) { + callback: function callback(data) { segment.bytes = bytes = data.data; var probeResult = data.result; probeResult && (trackInfoFn(segment, { @@ -11167,38 +11167,38 @@ audioAppendStart: segment.audioAppendStart, gopsToAlignWith: segment.gopsToAlignWith, remux: isMuxed, - onData: function(result) { + onData: function onData(result) { result.type = "combined" === result.type ? "video" : result.type, dataFn(segment, result); }, - onTrackInfo: function(trackInfo) { + onTrackInfo: function onTrackInfo(trackInfo) { trackInfoFn && (isMuxed && (trackInfo.isMuxed = !0), trackInfoFn(segment, trackInfo)); }, - onAudioTimingInfo: function(audioTimingInfo) { + onAudioTimingInfo: function onAudioTimingInfo(audioTimingInfo) { audioStartFn && void 0 !== audioTimingInfo.start && (audioStartFn(audioTimingInfo.start), audioStartFn = null), audioEndFn && void 0 !== audioTimingInfo.end && audioEndFn(audioTimingInfo.end); }, - onVideoTimingInfo: function(videoTimingInfo) { + onVideoTimingInfo: function onVideoTimingInfo(videoTimingInfo) { videoStartFn && void 0 !== videoTimingInfo.start && (videoStartFn(videoTimingInfo.start), videoStartFn = null), videoEndFn && void 0 !== videoTimingInfo.end && videoEndFn(videoTimingInfo.end); }, - onVideoSegmentTimingInfo: function(videoSegmentTimingInfo) { + onVideoSegmentTimingInfo: function onVideoSegmentTimingInfo(videoSegmentTimingInfo) { videoSegmentTimingInfoFn(videoSegmentTimingInfo); }, - onAudioSegmentTimingInfo: function(audioSegmentTimingInfo) { + onAudioSegmentTimingInfo: function onAudioSegmentTimingInfo(audioSegmentTimingInfo) { audioSegmentTimingInfoFn(audioSegmentTimingInfo); }, - onId3: function(id3Frames, dispatchType) { + onId3: function onId3(id3Frames, dispatchType) { id3Fn(segment, id3Frames, dispatchType); }, - onCaptions: function(captions) { + onCaptions: function onCaptions(captions) { captionsFn(segment, [ captions ]); }, isEndOfTimeline: isEndOfTimeline, - onEndedTimeline: function() { + onEndedTimeline: function onEndedTimeline() { endedTimelineFn(); }, onTransmuxerLog: onTransmuxerLog, - onDone: function(result) { + onDone: function onDone(result) { doneFn && (result.type = "combined" === result.type ? "video" : result.type, doneFn(null, segment, result)); } }); @@ -11225,7 +11225,7 @@ timescales: segment.map.timescales, data: bytesAsUint8Array, transmuxer: segment.transmuxer, - callback: function(_ref6) { + callback: function callback(_ref6) { var data = _ref6.data, startTime = _ref6.startTime; if (bytes = data.buffer, segment.bytes = bytesAsUint8Array = data, trackInfo.hasAudio && !trackInfo.isMuxed && timingInfoFn(segment, "audio", "start", startTime), trackInfo.hasVideo && timingInfoFn(segment, "video", "start", startTime), !tracks.video || !data.byteLength || !segment.transmuxer) { finishLoading(); @@ -11240,7 +11240,7 @@ trackIds: [ tracks.video.id ], - callback: function(message) { + callback: function callback(message) { bytes = message.data.buffer, segment.bytes = bytesAsUint8Array = message.data, message.logs.forEach(function(log) { onTransmuxerLog(videojs.mergeOptions(log, { stream: "mp4CaptionParser" @@ -11657,17 +11657,17 @@ }, deprecateOldCue = function(cue) { Object.defineProperties(cue.frame, { id: { - get: function() { + get: function get() { return videojs.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."), cue.value.key; } }, value: { - get: function() { + get: function get() { return videojs.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."), cue.value.data; } }, privateData: { - get: function() { + get: function get() { return videojs.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."), cue.value.data; } } @@ -11823,10 +11823,10 @@ }, _this.syncController_.on("syncinfoupdate", _this.triggerSyncInfoUpdate_), _this.mediaSource_.addEventListener("sourceopen", function() { _this.isEndOfStream_() || (_this.ended_ = !1); }), _this.fetchAtBuffer_ = !1, _this.logger_ = logger("SegmentLoader[" + _this.loaderType_ + "]"), Object.defineProperty((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this), "state", { - get: function() { + get: function get() { return this.state_; }, - set: function(newState) { + set: function set(newState) { newState !== this.state_ && (this.logger_(this.state_ + " -> " + newState), this.state_ = newState, this.trigger("statechange")); } }), _this.sourceUpdater_.on("ready", function() { @@ -11839,7 +11839,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SegmentLoader, _videojs$EventTarget); var _proto = SegmentLoader.prototype; - return _proto.createTransmuxer_ = function() { + return _proto.createTransmuxer_ = function createTransmuxer_() { return segmentTransmuxer.createTransmuxer({ remux: !1, alignGopsAtEnd: this.safeAppend_, @@ -11847,27 +11847,27 @@ parse708captions: this.parse708captions_, captionServices: this.captionServices_ }); - }, _proto.resetStats_ = function() { + }, _proto.resetStats_ = function resetStats_() { this.mediaBytesTransferred = 0, this.mediaRequests = 0, this.mediaRequestsAborted = 0, this.mediaRequestsTimedout = 0, this.mediaRequestsErrored = 0, this.mediaTransferDuration = 0, this.mediaSecondsLoaded = 0, this.mediaAppends = 0; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.trigger("dispose"), this.state = "DISPOSED", this.pause(), this.abort_(), this.transmuxer_ && this.transmuxer_.terminate(), this.resetStats_(), this.checkBufferTimeout_ && global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_), this.syncController_ && this.triggerSyncInfoUpdate_ && this.syncController_.off("syncinfoupdate", this.triggerSyncInfoUpdate_), this.off(); - }, _proto.setAudio = function(enable) { + }, _proto.setAudio = function setAudio(enable) { this.audioDisabled_ = !enable, enable ? this.appendInitSegment_.audio = !0 : this.sourceUpdater_.removeAudio(0, this.duration_()); - }, _proto.abort = function() { + }, _proto.abort = function abort() { if ("WAITING" !== this.state) { this.pendingSegment_ && (this.pendingSegment_ = null); return; } this.abort_(), this.state = "READY", this.paused() || this.monitorBuffer_(); - }, _proto.abort_ = function() { + }, _proto.abort_ = function abort_() { this.pendingSegment_ && this.pendingSegment_.abortRequests && this.pendingSegment_.abortRequests(), this.pendingSegment_ = null, this.callQueue_ = [], this.loadQueue_ = [], this.metadataQueue_.id3 = [], this.metadataQueue_.caption = [], this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_), this.waitingOnRemove_ = !1, global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.quotaExceededErrorRetryTimeout_), this.quotaExceededErrorRetryTimeout_ = null; - }, _proto.checkForAbort_ = function(requestId) { + }, _proto.checkForAbort_ = function checkForAbort_(requestId) { return "APPENDING" !== this.state || this.pendingSegment_ ? !this.pendingSegment_ || this.pendingSegment_.requestId !== requestId : (this.state = "READY", !0); - }, _proto.error = function(_error) { + }, _proto.error = function error(_error) { return void 0 !== _error && (this.logger_("error occurred:", _error), this.error_ = _error), this.pendingSegment_ = null, this.error_; - }, _proto.endOfStream = function() { + }, _proto.endOfStream = function endOfStream() { this.ended_ = !0, this.transmuxer_ && segmentTransmuxer.reset(this.transmuxer_), this.gopBuffer_.length = 0, this.pause(), this.trigger("ended"); - }, _proto.buffered_ = function() { + }, _proto.buffered_ = function buffered_() { var trackInfo = this.getMediaInfo_(); if (!this.sourceUpdater_ || !trackInfo) return videojs.createTimeRanges(); if ("main" === this.loaderType_) { @@ -11876,7 +11876,7 @@ if (hasVideo) return this.sourceUpdater_.videoBuffered(); } return this.sourceUpdater_.audioBuffered(); - }, _proto.initSegmentForMap = function(map, set) { + }, _proto.initSegmentForMap = function initSegmentForMap(map, set) { if (void 0 === set && (set = !1), !map) return null; var id = initSegmentId(map), storedMap = this.initSegments_[id]; return set && !storedMap && map.bytes && (this.initSegments_[id] = storedMap = { @@ -11886,7 +11886,7 @@ tracks: map.tracks, timescales: map.timescales }), storedMap || map; - }, _proto.segmentKey = function(key, set) { + }, _proto.segmentKey = function segmentKey(key, set) { if (void 0 === set && (set = !1), !key) return null; var id = segmentKeyId(key), storedKey = this.keyCache_[id]; this.cacheEncryptionKeys_ && set && !storedKey && key.bytes && (this.keyCache_[id] = storedKey = { @@ -11897,16 +11897,16 @@ resolvedUri: (storedKey || key).resolvedUri }; return storedKey && (result.bytes = storedKey.bytes), result; - }, _proto.couldBeginLoading_ = function() { + }, _proto.couldBeginLoading_ = function couldBeginLoading_() { return this.playlist_ && !this.paused(); - }, _proto.load = function() { + }, _proto.load = function load() { if (this.monitorBuffer_(), this.playlist_) { if ("INIT" === this.state && this.couldBeginLoading_()) return this.init_(); this.couldBeginLoading_() && ("READY" === this.state || "INIT" === this.state) && (this.state = "READY"); } - }, _proto.init_ = function() { + }, _proto.init_ = function init_() { return this.state = "READY", this.resetEverything(), this.monitorBuffer_(); - }, _proto.playlist = function(newPlaylist, options) { + }, _proto.playlist = function playlist(newPlaylist, options) { if (void 0 === options && (options = {}), newPlaylist) { var oldPlaylist = this.playlist_, segmentInfo = this.pendingSegment_; this.playlist_ = newPlaylist, this.xhrOptions_ = options, "INIT" === this.state && (newPlaylist.syncInfo = { @@ -11932,11 +11932,11 @@ } segmentInfo && (segmentInfo.mediaIndex -= mediaSequenceDiff, segmentInfo.mediaIndex < 0 ? (segmentInfo.mediaIndex = null, segmentInfo.partIndex = null) : (segmentInfo.mediaIndex >= 0 && (segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex]), segmentInfo.partIndex >= 0 && segmentInfo.segment.parts && (segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex]))), this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist); } - }, _proto.pause = function() { + }, _proto.pause = function pause() { this.checkBufferTimeout_ && (global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_), this.checkBufferTimeout_ = null); - }, _proto.paused = function() { + }, _proto.paused = function paused() { return null === this.checkBufferTimeout_; - }, _proto.resetEverything = function(done) { + }, _proto.resetEverything = function resetEverything(done) { this.ended_ = !1, this.appendInitSegment_ = { audio: !0, video: !0 @@ -11945,14 +11945,14 @@ }), this.transmuxer_.postMessage({ action: "reset" })); - }, _proto.resetLoader = function() { + }, _proto.resetLoader = function resetLoader() { this.fetchAtBuffer_ = !1, this.resyncLoader(); - }, _proto.resyncLoader = function() { + }, _proto.resyncLoader = function resyncLoader() { this.transmuxer_ && segmentTransmuxer.reset(this.transmuxer_), this.mediaIndex = null, this.partIndex = null, this.syncPoint_ = null, this.isPendingTimestampOffset_ = !1, this.callQueue_ = [], this.loadQueue_ = [], this.metadataQueue_.id3 = [], this.metadataQueue_.caption = [], this.abort(), this.transmuxer_ && this.transmuxer_.postMessage({ action: "clearParsedMp4Captions" }); - }, _proto.remove = function(start, end, done, force) { - if (void 0 === done && (done = function() {}), void 0 === force && (force = !1), end === 1 / 0 && (end = this.duration_()), end <= start) { + }, _proto.remove = function remove(start, end, done, force) { + if (void 0 === done && (done = function done() {}), void 0 === force && (force = !1), end === 1 / 0 && (end = this.duration_()), end <= start) { this.logger_("skipping remove because end ${end} is <= start ${start}"); return; } @@ -11965,11 +11965,11 @@ }; for(var track in (force || !this.audioDisabled_) && (removesRemaining++, this.sourceUpdater_.removeAudio(start, end, removeFinished)), (force || "main" === this.loaderType_) && (this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_), removesRemaining++, this.sourceUpdater_.removeVideo(start, end, removeFinished)), this.inbandTextTracks_)removeCuesFromTrack(start, end, this.inbandTextTracks_[track]); removeCuesFromTrack(start, end, this.segmentMetadataTrack_), removeFinished(); - }, _proto.monitorBuffer_ = function() { + }, _proto.monitorBuffer_ = function monitorBuffer_() { this.checkBufferTimeout_ && global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_), this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(this.monitorBufferTick_.bind(this), 1); - }, _proto.monitorBufferTick_ = function() { + }, _proto.monitorBufferTick_ = function monitorBufferTick_() { "READY" === this.state && this.fillBuffer_(), this.checkBufferTimeout_ && global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkBufferTimeout_), this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(this.monitorBufferTick_.bind(this), 500); - }, _proto.fillBuffer_ = function() { + }, _proto.fillBuffer_ = function fillBuffer_() { if (!this.sourceUpdater_.updating()) { var segmentInfo = this.chooseNextRequest_(); segmentInfo && ("number" == typeof segmentInfo.timestampOffset && (this.isPendingTimestampOffset_ = !1, this.timelineChangeController_.pendingTimelineChange({ @@ -11978,11 +11978,11 @@ to: segmentInfo.timeline })), this.loadSegment_(segmentInfo)); } - }, _proto.isEndOfStream_ = function(mediaIndex, playlist, partIndex) { + }, _proto.isEndOfStream_ = function isEndOfStream_(mediaIndex, playlist, partIndex) { if (void 0 === mediaIndex && (mediaIndex = this.mediaIndex), void 0 === playlist && (playlist = this.playlist_), void 0 === partIndex && (partIndex = this.partIndex), !playlist || !this.mediaSource_) return !1; var segment = "number" == typeof mediaIndex && playlist.segments[mediaIndex], appendedLastSegment = mediaIndex + 1 === playlist.segments.length, appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; return playlist.endList && "open" === this.mediaSource_.readyState && appendedLastSegment && appendedLastPart; - }, _proto.chooseNextRequest_ = function() { + }, _proto.chooseNextRequest_ = function chooseNextRequest_() { var buffered = this.buffered_(), bufferedEnd = lastBufferedEnd(buffered) || 0, bufferedTime = timeAheadOf(buffered, this.currentTime_()), preloaded = !this.hasPlayed_() && bufferedTime >= 1, haveEnoughBuffer = bufferedTime >= this.goalBufferLength_(), segments = this.playlist_.segments; if (!segments.length || preloaded || haveEnoughBuffer) return null; this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_()); @@ -12018,7 +12018,7 @@ } var ended = this.mediaSource_ && "ended" === this.mediaSource_.readyState; return next.mediaIndex >= segments.length - 1 && ended && !this.seeking_() ? null : this.generateSegmentInfo_(next); - }, _proto.generateSegmentInfo_ = function(options) { + }, _proto.generateSegmentInfo_ = function generateSegmentInfo_(options) { var independent = options.independent, playlist = options.playlist, mediaIndex = options.mediaIndex, startOfSegment = options.startOfSegment, isSyncRequest = options.isSyncRequest, partIndex = options.partIndex, forceTimestampOffset = options.forceTimestampOffset, getMediaInfoForTime = options.getMediaInfoForTime, segment = playlist.segments[mediaIndex], part = "number" == typeof partIndex && segment.parts[partIndex], segmentInfo = { requestId: "segment-loader-" + Math.random(), uri: part && part.resolvedUri || segment.resolvedUri, @@ -12048,9 +12048,9 @@ }); var audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered()); return "number" == typeof audioBufferedEnd && (segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset()), this.sourceUpdater_.videoBuffered().length && (segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_, this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_)), segmentInfo; - }, _proto.timestampOffsetForSegment_ = function(options) { + }, _proto.timestampOffsetForSegment_ = function timestampOffsetForSegment_(options) { return timestampOffsetForSegment(options); - }, _proto.earlyAbortWhenNeeded_ = function(stats) { + }, _proto.earlyAbortWhenNeeded_ = function earlyAbortWhenNeeded_(stats) { if (!(this.vhs_.tech_.paused() || !this.xhrOptions_.timeout || !this.playlist_.attributes.BANDWIDTH || Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000)) { var buffered, playbackRate, currentTime = this.currentTime_(), measuredBandwidth = stats.bandwidth, segmentDuration = this.pendingSegment_.duration, requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived), timeUntilRebuffer$1 = (buffered = this.buffered_(), void 0 === (playbackRate = this.vhs_.tech_.playbackRate()) && (playbackRate = 1), ((buffered.length ? buffered.end(buffered.length - 1) : 0) - currentTime) / playbackRate - 1); if (!(requestTimeRemaining <= timeUntilRebuffer$1)) { @@ -12070,21 +12070,21 @@ } } } - }, _proto.handleAbort_ = function(segmentInfo) { + }, _proto.handleAbort_ = function handleAbort_(segmentInfo) { this.logger_("Aborting " + segmentInfoString(segmentInfo)), this.mediaRequestsAborted += 1; - }, _proto.handleProgress_ = function(event, simpleSegment) { + }, _proto.handleProgress_ = function handleProgress_(event, simpleSegment) { this.earlyAbortWhenNeeded_(simpleSegment.stats), this.checkForAbort_(simpleSegment.requestId) || this.trigger("progress"); - }, _proto.handleTrackInfo_ = function(simpleSegment, trackInfo) { + }, _proto.handleTrackInfo_ = function handleTrackInfo_(simpleSegment, trackInfo) { this.earlyAbortWhenNeeded_(simpleSegment.stats), this.checkForAbort_(simpleSegment.requestId) || this.checkForIllegalMediaSwitch(trackInfo) || (trackInfo = trackInfo || {}, shallowEqual(this.currentMediaInfo_, trackInfo) || (this.appendInitSegment_ = { audio: !0, video: !0 }, this.startingMediaInfo_ = trackInfo, this.currentMediaInfo_ = trackInfo, this.logger_("trackinfo update", trackInfo), this.trigger("trackinfo")), !this.checkForAbort_(simpleSegment.requestId) && (this.pendingSegment_.trackInfo = trackInfo, this.hasEnoughInfoToAppend_() && this.processCallQueue_())); - }, _proto.handleTimingInfo_ = function(simpleSegment, mediaType, timeType, time) { + }, _proto.handleTimingInfo_ = function handleTimingInfo_(simpleSegment, mediaType, timeType, time) { if (this.earlyAbortWhenNeeded_(simpleSegment.stats), !this.checkForAbort_(simpleSegment.requestId)) { var segmentInfo = this.pendingSegment_, timingInfoProperty = timingInfoPropertyForMedia(mediaType); segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {}, segmentInfo[timingInfoProperty][timeType] = time, this.logger_("timinginfo: " + mediaType + " - " + timeType + " - " + time), this.hasEnoughInfoToAppend_() && this.processCallQueue_(); } - }, _proto.handleCaptions_ = function(simpleSegment, captionData) { + }, _proto.handleCaptions_ = function handleCaptions_(simpleSegment, captionData) { var _this2 = this; if (this.earlyAbortWhenNeeded_(simpleSegment.stats), !this.checkForAbort_(simpleSegment.requestId)) { if (0 === captionData.length) { @@ -12115,7 +12115,7 @@ action: "clearParsedMp4Captions" }); } - }, _proto.handleId3_ = function(simpleSegment, id3Frames, dispatchType) { + }, _proto.handleId3_ = function handleId3_(simpleSegment, id3Frames, dispatchType) { if (this.earlyAbortWhenNeeded_(simpleSegment.stats), !this.checkForAbort_(simpleSegment.requestId)) { if (!this.pendingSegment_.hasAppendedData_) { this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType)); @@ -12129,23 +12129,23 @@ videoDuration: this.duration_() }); } - }, _proto.processMetadataQueue_ = function() { + }, _proto.processMetadataQueue_ = function processMetadataQueue_() { this.metadataQueue_.id3.forEach(function(fn) { return fn(); }), this.metadataQueue_.caption.forEach(function(fn) { return fn(); }), this.metadataQueue_.id3 = [], this.metadataQueue_.caption = []; - }, _proto.processCallQueue_ = function() { + }, _proto.processCallQueue_ = function processCallQueue_() { var callQueue = this.callQueue_; this.callQueue_ = [], callQueue.forEach(function(fun) { return fun(); }); - }, _proto.processLoadQueue_ = function() { + }, _proto.processLoadQueue_ = function processLoadQueue_() { var loadQueue = this.loadQueue_; this.loadQueue_ = [], loadQueue.forEach(function(fun) { return fun(); }); - }, _proto.hasEnoughInfoToLoad_ = function() { + }, _proto.hasEnoughInfoToLoad_ = function hasEnoughInfoToLoad_() { if ("audio" !== this.loaderType_) return !0; var segmentInfo = this.pendingSegment_; return !!segmentInfo && (!this.getCurrentMediaInfo_() || !shouldWaitForTimelineChange({ @@ -12155,11 +12155,11 @@ loaderType: this.loaderType_, audioDisabled: this.audioDisabled_ })); - }, _proto.getCurrentMediaInfo_ = function(segmentInfo) { + }, _proto.getCurrentMediaInfo_ = function getCurrentMediaInfo_(segmentInfo) { return void 0 === segmentInfo && (segmentInfo = this.pendingSegment_), segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_; - }, _proto.getMediaInfo_ = function(segmentInfo) { + }, _proto.getMediaInfo_ = function getMediaInfo_(segmentInfo) { return void 0 === segmentInfo && (segmentInfo = this.pendingSegment_), this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_; - }, _proto.hasEnoughInfoToAppend_ = function() { + }, _proto.hasEnoughInfoToAppend_ = function hasEnoughInfoToAppend_() { if (!this.sourceUpdater_.ready() || this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) return !1; var segmentInfo = this.pendingSegment_, trackInfo = this.getCurrentMediaInfo_(); if (!segmentInfo || !trackInfo) return !1; @@ -12171,7 +12171,7 @@ loaderType: this.loaderType_, audioDisabled: this.audioDisabled_ })); - }, _proto.handleData_ = function(simpleSegment, result) { + }, _proto.handleData_ = function handleData_(simpleSegment, result) { if (this.earlyAbortWhenNeeded_(simpleSegment.stats), !this.checkForAbort_(simpleSegment.requestId)) { if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) { this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result)); @@ -12208,12 +12208,12 @@ segmentInfo.hasAppendedData_ = !0, this.processMetadataQueue_(), this.appendData_(segmentInfo, result); } } - }, _proto.updateAppendInitSegmentStatus = function(segmentInfo, type) { + }, _proto.updateAppendInitSegmentStatus = function updateAppendInitSegmentStatus(segmentInfo, type) { "main" !== this.loaderType_ || "number" != typeof segmentInfo.timestampOffset || segmentInfo.changedTimestampOffset || (this.appendInitSegment_ = { audio: !0, video: !0 }), this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist && (this.appendInitSegment_[type] = !0); - }, _proto.getInitSegmentAndUpdateState_ = function(_ref4) { + }, _proto.getInitSegmentAndUpdateState_ = function getInitSegmentAndUpdateState_(_ref4) { var type = _ref4.type, initSegment = _ref4.initSegment, map = _ref4.map, playlist = _ref4.playlist; if (map) { var id = initSegmentId(map); @@ -12221,7 +12221,7 @@ initSegment = this.initSegmentForMap(map, !0).bytes, this.activeInitSegmentId_ = id; } return initSegment && this.appendInitSegment_[type] ? (this.playlistOfLastInitSegment_[type] = playlist, this.appendInitSegment_[type] = !1, this.activeInitSegmentId_ = null, initSegment) : null; - }, _proto.handleQuotaExceededError_ = function(_ref5, error) { + }, _proto.handleQuotaExceededError_ = function handleQuotaExceededError_(_ref5, error) { var _this3 = this, segmentInfo = _ref5.segmentInfo, type = _ref5.type, bytes = _ref5.bytes, audioBuffered = this.sourceUpdater_.audioBuffered(), videoBuffered = this.sourceUpdater_.videoBuffered(); audioBuffered.length > 1 && this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: " + timeRangesToArray(audioBuffered).join(", ")), videoBuffered.length > 1 && this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: " + timeRangesToArray(videoBuffered).join(", ")); var audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0, audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0, videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0, videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0; @@ -12243,7 +12243,7 @@ _this3.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"), _this3.quotaExceededErrorRetryTimeout_ = null, _this3.processCallQueue_(); }, 1000); }, !0); - }, _proto.handleAppendError_ = function(_ref6, error) { + }, _proto.handleAppendError_ = function handleAppendError_(_ref6, error) { var segmentInfo = _ref6.segmentInfo, type = _ref6.type, bytes = _ref6.bytes; if (error) { if (22 === error.code) { @@ -12256,7 +12256,7 @@ } this.logger_("Received non QUOTA_EXCEEDED_ERR on append", error), this.error(type + " append of " + bytes.length + "b failed for segment #" + segmentInfo.mediaIndex + " in playlist " + segmentInfo.playlist.id), this.trigger("appenderror"); } - }, _proto.appendToSourceBuffer_ = function(_ref7) { + }, _proto.appendToSourceBuffer_ = function appendToSourceBuffer_(_ref7) { var segmentInfo = _ref7.segmentInfo, type = _ref7.type, initSegment = _ref7.initSegment, data = _ref7.data, bytes = _ref7.bytes; if (!bytes) { var segments = [ @@ -12276,12 +12276,12 @@ type: type, bytes: bytes })); - }, _proto.handleSegmentTimingInfo_ = function(type, requestId, segmentTimingInfo) { + }, _proto.handleSegmentTimingInfo_ = function handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) { if (this.pendingSegment_ && requestId === this.pendingSegment_.requestId) { var segment = this.pendingSegment_.segment, timingInfoProperty = type + "TimingInfo"; segment[timingInfoProperty] || (segment[timingInfoProperty] = {}), segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0, segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation, segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode, segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation, segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode, segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime; } - }, _proto.appendData_ = function(segmentInfo, result) { + }, _proto.appendData_ = function appendData_(segmentInfo, result) { var type = result.type, data = result.data; if (data && data.byteLength && ("audio" !== type || !this.audioDisabled_)) { var initSegment = this.getInitSegmentAndUpdateState_({ @@ -12297,7 +12297,7 @@ data: data }); } - }, _proto.loadSegment_ = function(segmentInfo) { + }, _proto.loadSegment_ = function loadSegment_(segmentInfo) { var _this4 = this; if (this.state = "WAITING", this.pendingSegment_ = segmentInfo, this.trimBackBuffer_(segmentInfo), "number" == typeof segmentInfo.timestampOffset && this.transmuxer_ && this.transmuxer_.postMessage({ action: "clearAllMp4Captions" @@ -12311,7 +12311,7 @@ return; } this.updateTransmuxerAndRequestSegment_(segmentInfo); - }, _proto.updateTransmuxerAndRequestSegment_ = function(segmentInfo) { + }, _proto.updateTransmuxerAndRequestSegment_ = function updateTransmuxerAndRequestSegment_(segmentInfo) { var _this5 = this; this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset) && (this.gopBuffer_.length = 0, segmentInfo.gopsToAlignWith = [], this.timeMapping_ = 0, this.transmuxer_.postMessage({ action: "reset" @@ -12336,21 +12336,21 @@ audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, "audio", segmentInfo.requestId), captionsFn: this.handleCaptions_.bind(this), isEndOfTimeline: isEndOfStream || isWalkingForward && isDiscontinuity, - endedTimelineFn: function() { + endedTimelineFn: function endedTimelineFn() { _this5.logger_("received endedtimeline callback"); }, id3Fn: this.handleId3_.bind(this), dataFn: this.handleData_.bind(this), doneFn: this.segmentRequestFinished_.bind(this), - onTransmuxerLog: function(_ref8) { + onTransmuxerLog: function onTransmuxerLog(_ref8) { var message = _ref8.message, level = _ref8.level, stream = _ref8.stream; _this5.logger_(segmentInfoString(segmentInfo) + " logged from transmuxer stream " + stream + " as a " + level + ": " + message); } }); - }, _proto.trimBackBuffer_ = function(segmentInfo) { + }, _proto.trimBackBuffer_ = function trimBackBuffer_(segmentInfo) { var removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); removeToTime > 0 && this.remove(0, removeToTime); - }, _proto.createSimplifiedSegmentObj_ = function(segmentInfo) { + }, _proto.createSimplifiedSegmentObj_ = function createSimplifiedSegmentObj_(segmentInfo) { var segment = segmentInfo.segment, part = segmentInfo.part, simpleSegment = { resolvedUri: part ? part.resolvedUri : segment.resolvedUri, byterange: part ? part.byterange : segment.byterange, @@ -12370,17 +12370,17 @@ simpleSegment.key = this.segmentKey(segment.key), simpleSegment.key.iv = iv; } return segment.map && (simpleSegment.map = this.initSegmentForMap(segment.map)), simpleSegment; - }, _proto.saveTransferStats_ = function(stats) { + }, _proto.saveTransferStats_ = function saveTransferStats_(stats) { this.mediaRequests += 1, stats && (this.mediaBytesTransferred += stats.bytesReceived, this.mediaTransferDuration += stats.roundTripTime); - }, _proto.saveBandwidthRelatedStats_ = function(duration, stats) { + }, _proto.saveBandwidthRelatedStats_ = function saveBandwidthRelatedStats_(duration, stats) { if (this.pendingSegment_.byteLength = stats.bytesReceived, duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) { this.logger_("Ignoring segment's bandwidth because its duration of " + duration + " is less than the min to record " + MIN_SEGMENT_DURATION_TO_SAVE_STATS); return; } this.bandwidth = stats.bandwidth, this.roundTrip = stats.roundTripTime; - }, _proto.handleTimeout_ = function() { + }, _proto.handleTimeout_ = function handleTimeout_() { this.mediaRequestsTimedout += 1, this.bandwidth = 1, this.roundTrip = NaN, this.trigger("bandwidthupdate"); - }, _proto.segmentRequestFinished_ = function(error, simpleSegment, result) { + }, _proto.segmentRequestFinished_ = function segmentRequestFinished_(error, simpleSegment, result) { if (this.callQueue_.length) { this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result)); return; @@ -12398,20 +12398,20 @@ var segmentInfo = this.pendingSegment_; this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats), segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests, result.gopInfo && (this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_)), this.state = "APPENDING", this.trigger("appending"), this.waitForAppendsToComplete_(segmentInfo); } - }, _proto.setTimeMapping_ = function(timeline) { + }, _proto.setTimeMapping_ = function setTimeMapping_(timeline) { var timelineMapping = this.syncController_.mappingForTimeline(timeline); null !== timelineMapping && (this.timeMapping_ = timelineMapping); - }, _proto.updateMediaSecondsLoaded_ = function(segment) { + }, _proto.updateMediaSecondsLoaded_ = function updateMediaSecondsLoaded_(segment) { "number" == typeof segment.start && "number" == typeof segment.end ? this.mediaSecondsLoaded += segment.end - segment.start : this.mediaSecondsLoaded += segment.duration; - }, _proto.shouldUpdateTransmuxerTimestampOffset_ = function(timestampOffset) { + }, _proto.shouldUpdateTransmuxerTimestampOffset_ = function shouldUpdateTransmuxerTimestampOffset_(timestampOffset) { return null !== timestampOffset && ("main" === this.loaderType_ && timestampOffset !== this.sourceUpdater_.videoTimestampOffset() || !this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()); - }, _proto.trueSegmentStart_ = function(_ref9) { + }, _proto.trueSegmentStart_ = function trueSegmentStart_(_ref9) { var currentStart = _ref9.currentStart, playlist = _ref9.playlist, mediaIndex = _ref9.mediaIndex, firstVideoFrameTimeForData = _ref9.firstVideoFrameTimeForData, currentVideoTimestampOffset = _ref9.currentVideoTimestampOffset, useVideoTimingInfo = _ref9.useVideoTimingInfo, videoTimingInfo = _ref9.videoTimingInfo, audioTimingInfo = _ref9.audioTimingInfo; if (void 0 !== currentStart) return currentStart; if (!useVideoTimingInfo) return audioTimingInfo.start; var previousSegment = playlist.segments[mediaIndex - 1]; return 0 !== mediaIndex && previousSegment && void 0 !== previousSegment.start && previousSegment.end === firstVideoFrameTimeForData + currentVideoTimestampOffset ? videoTimingInfo.start : firstVideoFrameTimeForData; - }, _proto.waitForAppendsToComplete_ = function(segmentInfo) { + }, _proto.waitForAppendsToComplete_ = function waitForAppendsToComplete_(segmentInfo) { var trackInfo = this.getCurrentMediaInfo_(segmentInfo); if (!trackInfo) { this.error({ @@ -12428,24 +12428,24 @@ return; } waitForVideo && segmentInfo.waitingOnAppends++, waitForAudio && segmentInfo.waitingOnAppends++, waitForVideo && this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo)), waitForAudio && this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo)); - }, _proto.checkAppendsDone_ = function(segmentInfo) { + }, _proto.checkAppendsDone_ = function checkAppendsDone_(segmentInfo) { this.checkForAbort_(segmentInfo.requestId) || (segmentInfo.waitingOnAppends--, 0 === segmentInfo.waitingOnAppends && this.handleAppendsDone_()); - }, _proto.checkForIllegalMediaSwitch = function(trackInfo) { + }, _proto.checkForIllegalMediaSwitch = function checkForIllegalMediaSwitch(trackInfo) { var loaderType, startingMedia, illegalMediaSwitchError = (loaderType = this.loaderType_, startingMedia = this.getCurrentMediaInfo_(), "main" === loaderType && startingMedia && trackInfo ? trackInfo.hasAudio || trackInfo.hasVideo ? startingMedia.hasVideo && !trackInfo.hasVideo ? "Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest." : !startingMedia.hasVideo && trackInfo.hasVideo ? "Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest." : null : "Neither audio nor video found in segment." : null); return !!illegalMediaSwitchError && (this.error({ message: illegalMediaSwitchError, blacklistDuration: 1 / 0 }), this.trigger("error"), !0); - }, _proto.updateSourceBufferTimestampOffset_ = function(segmentInfo) { + }, _proto.updateSourceBufferTimestampOffset_ = function updateSourceBufferTimestampOffset_(segmentInfo) { if (null !== segmentInfo.timestampOffset && "number" == typeof segmentInfo.timingInfo.start && !segmentInfo.changedTimestampOffset && "main" === this.loaderType_) { var didChange = !1; segmentInfo.timestampOffset -= segmentInfo.timingInfo.start, segmentInfo.changedTimestampOffset = !0, segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset() && (this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset), didChange = !0), segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset() && (this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset), didChange = !0), didChange && this.trigger("timestampoffset"); } - }, _proto.updateTimingInfoEnd_ = function(segmentInfo) { + }, _proto.updateTimingInfoEnd_ = function updateTimingInfoEnd_(segmentInfo) { segmentInfo.timingInfo = segmentInfo.timingInfo || {}; var trackInfo = this.getMediaInfo_(), prioritizedTimingInfo = "main" === this.loaderType_ && trackInfo && trackInfo.hasVideo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo; prioritizedTimingInfo && (segmentInfo.timingInfo.end = "number" == typeof prioritizedTimingInfo.end ? prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration); - }, _proto.handleAppendsDone_ = function() { + }, _proto.handleAppendsDone_ = function handleAppendsDone_() { if (this.pendingSegment_ && this.trigger("appendsdone"), !this.pendingSegment_) { this.state = "READY", this.paused() || this.monitorBuffer_(); return; @@ -12475,14 +12475,14 @@ return; } null !== this.mediaIndex && this.trigger("bandwidthupdate"), this.trigger("progress"), this.mediaIndex = segmentInfo.mediaIndex, this.partIndex = segmentInfo.partIndex, this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex) && this.endOfStream(), this.trigger("appended"), segmentInfo.hasAppendedData_ && this.mediaAppends++, this.paused() || this.monitorBuffer_(); - }, _proto.recordThroughput_ = function(segmentInfo) { + }, _proto.recordThroughput_ = function recordThroughput_(segmentInfo) { if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) { this.logger_("Ignoring segment's throughput because its duration of " + segmentInfo.duration + " is less than the min to record " + MIN_SEGMENT_DURATION_TO_SAVE_STATS); return; } var rate = this.throughput.rate, segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1, segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8000); this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count; - }, _proto.addSegmentMetadataCue_ = function(segmentInfo) { + }, _proto.addSegmentMetadataCue_ = function addSegmentMetadataCue_(segmentInfo) { if (this.segmentMetadataTrack_) { var segment = segmentInfo.segment, start = segment.start, end = segment.end; if (finite(start) && finite(end)) { @@ -12548,7 +12548,7 @@ }, inSourceBuffers = function(mediaSource, sourceBuffer) { return mediaSource && sourceBuffer && -1 !== Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer); }, actions = { - appendBuffer: function(bytes, segmentInfo, onError) { + appendBuffer: function appendBuffer(bytes, segmentInfo, onError) { return function(type, sourceUpdater) { var sourceBuffer = sourceUpdater[type + "Buffer"]; if (inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { @@ -12561,7 +12561,7 @@ } }; }, - remove: function(start, end) { + remove: function remove(start, end) { return function(type, sourceUpdater) { var sourceBuffer = sourceUpdater[type + "Buffer"]; if (inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { @@ -12574,18 +12574,18 @@ } }; }, - timestampOffset: function(offset) { + timestampOffset: function timestampOffset(offset) { return function(type, sourceUpdater) { var sourceBuffer = sourceUpdater[type + "Buffer"]; inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer) && (sourceUpdater.logger_("Setting " + type + "timestampOffset to " + offset), sourceBuffer.timestampOffset = offset); }; }, - callback: function(_callback) { + callback: function callback(_callback) { return function(type, sourceUpdater) { _callback(); }; }, - endOfStream: function(error) { + endOfStream: function endOfStream(error) { return function(sourceUpdater) { if ("open" === sourceUpdater.mediaSource.readyState) { sourceUpdater.logger_("Calling mediaSource endOfStream(" + (error || "") + ")"); @@ -12597,7 +12597,7 @@ } }; }, - duration: function(_duration) { + duration: function duration(_duration) { return function(sourceUpdater) { sourceUpdater.logger_("Setting mediaSource duration to " + _duration); try { @@ -12607,7 +12607,7 @@ } }; }, - abort: function() { + abort: function abort() { return function(type, sourceUpdater) { if ("open" === sourceUpdater.mediaSource.readyState) { var sourceBuffer = sourceUpdater[type + "Buffer"]; @@ -12622,7 +12622,7 @@ } }; }, - addSourceBuffer: function(type, codec) { + addSourceBuffer: function addSourceBuffer(type, codec) { return function(sourceUpdater) { var titleType = toTitleCase(type), mime = (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__._5)(codec); sourceUpdater.logger_("Adding " + type + "Buffer with codec " + codec + " to mediaSource"); @@ -12630,7 +12630,7 @@ sourceBuffer.addEventListener("updateend", sourceUpdater["on" + titleType + "UpdateEnd_"]), sourceBuffer.addEventListener("error", sourceUpdater["on" + titleType + "Error_"]), sourceUpdater.codecs[type] = codec, sourceUpdater[type + "Buffer"] = sourceBuffer; }; }, - removeSourceBuffer: function(type) { + removeSourceBuffer: function removeSourceBuffer(type) { return function(sourceUpdater) { var sourceBuffer = sourceUpdater[type + "Buffer"]; if (cleanupBuffer(type, sourceUpdater), inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) { @@ -12643,7 +12643,7 @@ } }; }, - changeType: function(codec) { + changeType: function changeType(codec) { return function(type, sourceUpdater) { var sourceBuffer = sourceUpdater[type + "Buffer"], mime = (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__._5)(codec); inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer) && sourceUpdater.codecs[type] !== codec && (sourceUpdater.logger_("changing " + type + "Buffer codec from " + sourceUpdater.codecs[type] + " to " + codec), sourceBuffer.changeType(mime), sourceUpdater.codecs[type] = codec); @@ -12681,33 +12681,33 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SourceUpdater, _videojs$EventTarget); var _proto = SourceUpdater.prototype; - return _proto.initializedEme = function() { + return _proto.initializedEme = function initializedEme() { this.initializedEme_ = !0, this.triggerReady(); - }, _proto.hasCreatedSourceBuffers = function() { + }, _proto.hasCreatedSourceBuffers = function hasCreatedSourceBuffers() { return this.createdSourceBuffers_; - }, _proto.hasInitializedAnyEme = function() { + }, _proto.hasInitializedAnyEme = function hasInitializedAnyEme() { return this.initializedEme_; - }, _proto.ready = function() { + }, _proto.ready = function ready() { return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme(); - }, _proto.createSourceBuffers = function(codecs) { + }, _proto.createSourceBuffers = function createSourceBuffers(codecs) { this.hasCreatedSourceBuffers() || (this.addOrChangeSourceBuffers(codecs), this.createdSourceBuffers_ = !0, this.trigger("createdsourcebuffers"), this.triggerReady()); - }, _proto.triggerReady = function() { + }, _proto.triggerReady = function triggerReady() { this.ready() && !this.triggeredReady_ && (this.triggeredReady_ = !0, this.trigger("ready")); - }, _proto.addSourceBuffer = function(type, codec) { + }, _proto.addSourceBuffer = function addSourceBuffer(type, codec) { pushQueue({ type: "mediaSource", sourceUpdater: this, action: actions.addSourceBuffer(type, codec), name: "addSourceBuffer" }); - }, _proto.abort = function(type) { + }, _proto.abort = function abort(type) { pushQueue({ type: type, sourceUpdater: this, action: actions.abort(type), name: "abort" }); - }, _proto.removeSourceBuffer = function(type) { + }, _proto.removeSourceBuffer = function removeSourceBuffer(type) { if (!this.canRemoveSourceBuffer()) { videojs.log.error("removeSourceBuffer is not supported!"); return; @@ -12718,13 +12718,13 @@ action: actions.removeSourceBuffer(type), name: "removeSourceBuffer" }); - }, _proto.canRemoveSourceBuffer = function() { + }, _proto.canRemoveSourceBuffer = function canRemoveSourceBuffer() { return !videojs.browser.IE_VERSION && !videojs.browser.IS_FIREFOX && global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource && global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource.prototype && "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_0___default().MediaSource.prototype.removeSourceBuffer; - }, SourceUpdater.canChangeType = function() { + }, SourceUpdater.canChangeType = function canChangeType() { return global_window__WEBPACK_IMPORTED_MODULE_0___default().SourceBuffer && global_window__WEBPACK_IMPORTED_MODULE_0___default().SourceBuffer.prototype && "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_0___default().SourceBuffer.prototype.changeType; - }, _proto.canChangeType = function() { + }, _proto.canChangeType = function canChangeType() { return this.constructor.canChangeType(); - }, _proto.changeType = function(type, codec) { + }, _proto.changeType = function changeType(type, codec) { if (!this.canChangeType()) { videojs.log.error("changeType is not supported!"); return; @@ -12735,7 +12735,7 @@ action: actions.changeType(codec), name: "changeType" }); - }, _proto.addOrChangeSourceBuffers = function(codecs) { + }, _proto.addOrChangeSourceBuffers = function addOrChangeSourceBuffers(codecs) { var _this2 = this; if (!codecs || "object" != typeof codecs || 0 === Object.keys(codecs).length) throw Error("Cannot addOrChangeSourceBuffers to undefined codecs"); Object.keys(codecs).forEach(function(type) { @@ -12743,7 +12743,7 @@ if (!_this2.hasCreatedSourceBuffers()) return _this2.addSourceBuffer(type, codec); _this2.canChangeType() && _this2.changeType(type, codec); }); - }, _proto.appendBuffer = function(options, doneFn) { + }, _proto.appendBuffer = function appendBuffer(options, doneFn) { var _this3 = this, segmentInfo = options.segmentInfo, type = options.type, bytes = options.bytes; if (this.processedAppend_ = !0, "audio" === type && this.videoBuffer && !this.videoAppendQueued_) { this.delayedAudioAppendQueue_.push([ @@ -12767,14 +12767,14 @@ _this3.appendBuffer.apply(_this3, que); }); } - }, _proto.audioBuffered = function() { + }, _proto.audioBuffered = function audioBuffered() { return inSourceBuffers(this.mediaSource, this.audioBuffer) && this.audioBuffer.buffered ? this.audioBuffer.buffered : videojs.createTimeRange(); - }, _proto.videoBuffered = function() { + }, _proto.videoBuffered = function videoBuffered() { return inSourceBuffers(this.mediaSource, this.videoBuffer) && this.videoBuffer.buffered ? this.videoBuffer.buffered : videojs.createTimeRange(); - }, _proto.buffered = function() { + }, _proto.buffered = function buffered() { var video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null, audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null; return audio && !video ? this.audioBuffered() : video && !audio ? this.videoBuffered() : bufferIntersection(this.audioBuffered(), this.videoBuffered()); - }, _proto.setDuration = function(duration, doneFn) { + }, _proto.setDuration = function setDuration(duration, doneFn) { void 0 === doneFn && (doneFn = noop), pushQueue({ type: "mediaSource", sourceUpdater: this, @@ -12782,7 +12782,7 @@ name: "duration", doneFn: doneFn }); - }, _proto.endOfStream = function(error, doneFn) { + }, _proto.endOfStream = function endOfStream(error, doneFn) { void 0 === error && (error = null), void 0 === doneFn && (doneFn = noop), "string" != typeof error && (error = void 0), pushQueue({ type: "mediaSource", sourceUpdater: this, @@ -12790,7 +12790,7 @@ name: "endOfStream", doneFn: doneFn }); - }, _proto.removeAudio = function(start, end, done) { + }, _proto.removeAudio = function removeAudio(start, end, done) { if (void 0 === done && (done = noop), !this.audioBuffered().length || 0 === this.audioBuffered().end(0)) { done(); return; @@ -12802,7 +12802,7 @@ doneFn: done, name: "remove" }); - }, _proto.removeVideo = function(start, end, done) { + }, _proto.removeVideo = function removeVideo(start, end, done) { if (void 0 === done && (done = noop), !this.videoBuffered().length || 0 === this.videoBuffered().end(0)) { done(); return; @@ -12814,37 +12814,37 @@ doneFn: done, name: "remove" }); - }, _proto.updating = function() { + }, _proto.updating = function updating() { return !!(_updating("audio", this) || _updating("video", this)); - }, _proto.audioTimestampOffset = function(offset) { + }, _proto.audioTimestampOffset = function audioTimestampOffset(offset) { return void 0 !== offset && this.audioBuffer && this.audioTimestampOffset_ !== offset && (pushQueue({ type: "audio", sourceUpdater: this, action: actions.timestampOffset(offset), name: "timestampOffset" }), this.audioTimestampOffset_ = offset), this.audioTimestampOffset_; - }, _proto.videoTimestampOffset = function(offset) { + }, _proto.videoTimestampOffset = function videoTimestampOffset(offset) { return void 0 !== offset && this.videoBuffer && this.videoTimestampOffset !== offset && (pushQueue({ type: "video", sourceUpdater: this, action: actions.timestampOffset(offset), name: "timestampOffset" }), this.videoTimestampOffset_ = offset), this.videoTimestampOffset_; - }, _proto.audioQueueCallback = function(callback) { + }, _proto.audioQueueCallback = function audioQueueCallback(callback) { this.audioBuffer && pushQueue({ type: "audio", sourceUpdater: this, action: actions.callback(callback), name: "callback" }); - }, _proto.videoQueueCallback = function(callback) { + }, _proto.videoQueueCallback = function videoQueueCallback(callback) { this.videoBuffer && pushQueue({ type: "video", sourceUpdater: this, action: actions.callback(callback), name: "callback" }); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { var _this4 = this; this.trigger("dispose"), bufferTypes.forEach(function(type) { _this4.abort(type), _this4.canRemoveSourceBuffer() ? _this4.removeSourceBuffer(type) : _this4[type + "QueueCallback"](function() { @@ -12863,9 +12863,9 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VTTSegmentLoader, _SegmentLoader); var _proto = VTTSegmentLoader.prototype; - return _proto.createTransmuxer_ = function() { + return _proto.createTransmuxer_ = function createTransmuxer_() { return null; - }, _proto.buffered_ = function() { + }, _proto.buffered_ = function buffered_() { if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) return videojs.createTimeRanges(); var cues = this.subtitlesTrack_.cues, start = cues[0].startTime, end = cues[cues.length - 1].startTime; return videojs.createTimeRanges([ @@ -12874,7 +12874,7 @@ end ] ]); - }, _proto.initSegmentForMap = function(map, set) { + }, _proto.initSegmentForMap = function initSegmentForMap(map, set) { if (void 0 === set && (set = !1), !map) return null; var id = initSegmentId(map), storedMap = this.initSegments_[id]; if (set && !storedMap && map.bytes) { @@ -12886,15 +12886,15 @@ }; } return storedMap || map; - }, _proto.couldBeginLoading_ = function() { + }, _proto.couldBeginLoading_ = function couldBeginLoading_() { return this.playlist_ && this.subtitlesTrack_ && !this.paused(); - }, _proto.init_ = function() { + }, _proto.init_ = function init_() { return this.state = "READY", this.resetEverything(), this.monitorBuffer_(); - }, _proto.track = function(_track) { + }, _proto.track = function track(_track) { return void 0 === _track || (this.subtitlesTrack_ = _track, "INIT" === this.state && this.couldBeginLoading_() && this.init_()), this.subtitlesTrack_; - }, _proto.remove = function(start, end) { + }, _proto.remove = function remove(start, end) { removeCuesFromTrack(start, end, this.subtitlesTrack_); - }, _proto.fillBuffer_ = function() { + }, _proto.fillBuffer_ = function fillBuffer_() { var _this2 = this, segmentInfo = this.chooseNextRequest_(); if (segmentInfo) { if (null === this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline)) { @@ -12905,11 +12905,11 @@ } this.loadSegment_(segmentInfo); } - }, _proto.timestampOffsetForSegment_ = function() { + }, _proto.timestampOffsetForSegment_ = function timestampOffsetForSegment_() { return null; - }, _proto.chooseNextRequest_ = function() { + }, _proto.chooseNextRequest_ = function chooseNextRequest_() { return this.skipEmptySegments_(_SegmentLoader.prototype.chooseNextRequest_.call(this)); - }, _proto.skipEmptySegments_ = function(segmentInfo) { + }, _proto.skipEmptySegments_ = function skipEmptySegments_(segmentInfo) { for(; segmentInfo && segmentInfo.segment.empty;){ if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) { segmentInfo = null; @@ -12923,9 +12923,9 @@ }); } return segmentInfo; - }, _proto.stopForError = function(error) { + }, _proto.stopForError = function stopForError(error) { this.error(error), this.state = "READY", this.pause(), this.trigger("error"); - }, _proto.segmentRequestFinished_ = function(error, simpleSegment, result) { + }, _proto.segmentRequestFinished_ = function segmentRequestFinished_(error, simpleSegment, result) { var _this3 = this; if (!this.subtitlesTrack_) { this.state = "READY"; @@ -12948,7 +12948,7 @@ message: "Error loading vtt.js" }); }; - loadHandler = function() { + loadHandler = function loadHandler() { _this3.subtitlesTrack_.tech_.off("vttjserror", errorHandler), _this3.segmentRequestFinished_(error, simpleSegment, result); }, this.state = "WAITING_ON_VTTJS", this.subtitlesTrack_.tech_.one("vttjsloaded", loadHandler), this.subtitlesTrack_.tech_.one("vttjserror", errorHandler); return; @@ -12975,7 +12975,7 @@ segmentInfo.byteLength = segmentInfo.bytes.byteLength, this.mediaSecondsLoaded += segment.duration, segmentInfo.cues.forEach(function(cue) { _this3.subtitlesTrack_.addCue(_this3.featuresNativeTextTracks_ ? new (global_window__WEBPACK_IMPORTED_MODULE_0___default()).VTTCue(cue.startTime, cue.endTime, cue.text) : cue); }), removeDuplicateCuesFromTrack(this.subtitlesTrack_), this.handleAppendsDone_(); - }, _proto.handleData_ = function() {}, _proto.updateTimingInfoEnd_ = function() {}, _proto.parseVTTCues_ = function(segmentInfo) { + }, _proto.handleData_ = function handleData_() {}, _proto.updateTimingInfoEnd_ = function updateTimingInfoEnd_() {}, _proto.parseVTTCues_ = function parseVTTCues_(segmentInfo) { var decoder, decodeBytesToString = !1; "function" == typeof global_window__WEBPACK_IMPORTED_MODULE_0___default().TextDecoder ? decoder = new (global_window__WEBPACK_IMPORTED_MODULE_0___default()).TextDecoder("utf8") : (decoder = global_window__WEBPACK_IMPORTED_MODULE_0___default().WebVTT.StringDecoder(), decodeBytesToString = !0); var parser = new (global_window__WEBPACK_IMPORTED_MODULE_0___default()).WebVTT.Parser(global_window__WEBPACK_IMPORTED_MODULE_0___default(), global_window__WEBPACK_IMPORTED_MODULE_0___default().vttjs, decoder); @@ -12992,7 +12992,7 @@ } var segmentData = segmentInfo.bytes; decodeBytesToString && (segmentData = uint8ToUtf8(segmentData)), parser.parse(segmentData), parser.flush(); - }, _proto.updateTimeMapping_ = function(segmentInfo, mappingObj, playlist) { + }, _proto.updateTimeMapping_ = function updateTimeMapping_(segmentInfo, mappingObj, playlist) { var segment = segmentInfo.segment; if (mappingObj) { if (!segmentInfo.cues.length) { @@ -13039,7 +13039,7 @@ }, syncPointStrategies = [ { name: "VOD", - run: function(syncController, playlist, duration, currentTimeline, currentTime) { + run: function run(syncController, playlist, duration, currentTimeline, currentTime) { return duration !== 1 / 0 ? { time: 0, segmentIndex: 0, @@ -13049,7 +13049,7 @@ }, { name: "ProgramDateTime", - run: function(syncController, playlist, duration, currentTimeline, currentTime) { + run: function run(syncController, playlist, duration, currentTimeline, currentTime) { if (!Object.keys(syncController.timelineToDatetimeMappings).length) return null; var syncPoint = null, lastDistance = null, partsAndSegments = getPartsAndSegments(playlist); currentTime = currentTime || 0; @@ -13072,7 +13072,7 @@ }, { name: "Segment", - run: function(syncController, playlist, duration, currentTimeline, currentTime) { + run: function run(syncController, playlist, duration, currentTimeline, currentTime) { var syncPoint = null, lastDistance = null; currentTime = currentTime || 0; for(var partsAndSegments = getPartsAndSegments(playlist), i = 0; i < partsAndSegments.length; i++){ @@ -13092,7 +13092,7 @@ }, { name: "Discontinuity", - run: function(syncController, playlist, duration, currentTimeline, currentTime) { + run: function run(syncController, playlist, duration, currentTimeline, currentTime) { var syncPoint = null; if (currentTime = currentTime || 0, playlist.discontinuityStarts && playlist.discontinuityStarts.length) for(var lastDistance = null, i = 0; i < playlist.discontinuityStarts.length; i++){ var segmentIndex = playlist.discontinuityStarts[i], discontinuity = playlist.discontinuitySequence + i + 1, discontinuitySync = syncController.discontinuities[discontinuity]; @@ -13111,7 +13111,7 @@ }, { name: "Playlist", - run: function(syncController, playlist, duration, currentTimeline, currentTime) { + run: function run(syncController, playlist, duration, currentTimeline, currentTime) { return playlist.syncInfo ? { time: playlist.syncInfo.time, segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence, @@ -13126,13 +13126,13 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(SyncController, _videojs$EventTarget); var _proto = SyncController.prototype; - return _proto.getSyncPoint = function(playlist, duration, currentTimeline, currentTime) { + return _proto.getSyncPoint = function getSyncPoint(playlist, duration, currentTimeline, currentTime) { var syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime); return syncPoints.length ? this.selectSyncPoint_(syncPoints, { key: "time", value: currentTime }) : null; - }, _proto.getExpiredTime = function(playlist, duration) { + }, _proto.getExpiredTime = function getExpiredTime(playlist, duration) { if (!playlist || !playlist.segments) return null; var syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0); if (!syncPoints.length) return null; @@ -13146,7 +13146,7 @@ startIndex: syncPoint.segmentIndex, endIndex: 0 })); - }, _proto.runStrategies_ = function(playlist, duration, currentTimeline, currentTime) { + }, _proto.runStrategies_ = function runStrategies_(playlist, duration, currentTimeline, currentTime) { for(var syncPoints = [], i = 0; i < syncPointStrategies.length; i++){ var strategy = syncPointStrategies[i], syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime); syncPoint && (syncPoint.strategy = strategy.name, syncPoints.push({ @@ -13155,13 +13155,13 @@ })); } return syncPoints; - }, _proto.selectSyncPoint_ = function(syncPoints, target) { + }, _proto.selectSyncPoint_ = function selectSyncPoint_(syncPoints, target) { for(var bestSyncPoint = syncPoints[0].syncPoint, bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value), bestStrategy = syncPoints[0].strategy, i = 1; i < syncPoints.length; i++){ var newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value); newDistance < bestDistance && (bestDistance = newDistance, bestSyncPoint = syncPoints[i].syncPoint, bestStrategy = syncPoints[i].strategy); } return this.logger_("syncPoint for [" + target.key + ": " + target.value + "] chosen with strategy [" + bestStrategy + "]: [time:" + bestSyncPoint.time + ", segmentIndex:" + bestSyncPoint.segmentIndex + ("number" == typeof bestSyncPoint.partIndex ? ",partIndex:" + bestSyncPoint.partIndex : "") + "]"), bestSyncPoint; - }, _proto.saveExpiredSegmentInfo = function(oldPlaylist, newPlaylist) { + }, _proto.saveExpiredSegmentInfo = function saveExpiredSegmentInfo(oldPlaylist, newPlaylist) { var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; if (mediaSequenceDiff > 86400) { videojs.log.warn("Not saving expired segment info. Media sequence gap " + mediaSequenceDiff + " is too large."); @@ -13177,12 +13177,12 @@ break; } } - }, _proto.setDateTimeMappingForStart = function(playlist) { + }, _proto.setDateTimeMappingForStart = function setDateTimeMappingForStart(playlist) { if (this.timelineToDatetimeMappings = {}, playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) { var firstSegment = playlist.segments[0], playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000; this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp; } - }, _proto.saveSegmentTimingInfo = function(_ref) { + }, _proto.saveSegmentTimingInfo = function saveSegmentTimingInfo(_ref) { var segmentInfo = _ref.segmentInfo, shouldSaveTimelineMapping = _ref.shouldSaveTimelineMapping, didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping), segment = segmentInfo.segment; didCalculateSegmentTimeMapping && (this.saveDiscontinuitySyncInfo_(segmentInfo), segmentInfo.playlist.syncInfo || (segmentInfo.playlist.syncInfo = { mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex, @@ -13190,11 +13190,11 @@ })); var dateTime = segment.dateTimeObject; segment.discontinuity && shouldSaveTimelineMapping && dateTime && (this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000)); - }, _proto.timestampOffsetForTimeline = function(timeline) { + }, _proto.timestampOffsetForTimeline = function timestampOffsetForTimeline(timeline) { return void 0 === this.timelines[timeline] ? null : this.timelines[timeline].time; - }, _proto.mappingForTimeline = function(timeline) { + }, _proto.mappingForTimeline = function mappingForTimeline(timeline) { return void 0 === this.timelines[timeline] ? null : this.timelines[timeline].mapping; - }, _proto.calculateSegmentTimeMapping_ = function(segmentInfo, timingInfo, shouldSaveTimelineMapping) { + }, _proto.calculateSegmentTimeMapping_ = function calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) { var start, end, segment = segmentInfo.segment, part = segmentInfo.part, mappingObj = this.timelines[segmentInfo.timeline]; if ("number" == typeof segmentInfo.timestampOffset) mappingObj = { time: segmentInfo.startOfSegment, @@ -13205,7 +13205,7 @@ start = timingInfo.start + mappingObj.mapping, end = timingInfo.end + mappingObj.mapping; } return part && (part.start = start, part.end = end), (!segment.start || start < segment.start) && (segment.start = start), segment.end = end, !0; - }, _proto.saveDiscontinuitySyncInfo_ = function(segmentInfo) { + }, _proto.saveDiscontinuitySyncInfo_ = function saveDiscontinuitySyncInfo_(segmentInfo) { var playlist = segmentInfo.playlist, segment = segmentInfo.segment; if (segment.discontinuity) this.discontinuities[segment.timeline] = { time: segment.start, @@ -13231,7 +13231,7 @@ }; } } - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.trigger("dispose"), this.off(); }, SyncController; }(videojs.EventTarget), TimelineChangeController = function(_videojs$EventTarget) { @@ -13241,23 +13241,23 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(TimelineChangeController, _videojs$EventTarget); var _proto = TimelineChangeController.prototype; - return _proto.clearPendingTimelineChange = function(type) { + return _proto.clearPendingTimelineChange = function clearPendingTimelineChange(type) { this.pendingTimelineChanges_[type] = null, this.trigger("pendingtimelinechange"); - }, _proto.pendingTimelineChange = function(_ref) { + }, _proto.pendingTimelineChange = function pendingTimelineChange(_ref) { var type = _ref.type, from = _ref.from, to = _ref.to; return "number" == typeof from && "number" == typeof to && (this.pendingTimelineChanges_[type] = { type: type, from: from, to: to }, this.trigger("pendingtimelinechange")), this.pendingTimelineChanges_[type]; - }, _proto.lastTimelineChange = function(_ref2) { + }, _proto.lastTimelineChange = function lastTimelineChange(_ref2) { var type = _ref2.type, from = _ref2.from, to = _ref2.to; return "number" == typeof from && "number" == typeof to && (this.lastTimelineChanges_[type] = { type: type, from: from, to: to }, delete this.pendingTimelineChanges_[type], this.trigger("timelinechange")), this.lastTimelineChanges_[type]; - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.trigger("dispose"), this.pendingTimelineChanges_ = {}, this.lastTimelineChanges_ = {}, this.off(); }, TimelineChangeController; }(videojs.EventTarget), Decrypter = factory(transform(getWorkerString(function() { @@ -13265,7 +13265,7 @@ return fn(module = { path: basedir, exports: {}, - require: function(path, base) { + require: function require(path, base) { return function() { throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs"); }(path, null == base ? module.path : base); @@ -13284,7 +13284,7 @@ }, module.exports.default = module.exports, module.exports.__esModule = !0; }), setPrototypeOf = createCommonjsModule(function(module) { function _setPrototypeOf(o, p) { - return module.exports = _setPrototypeOf = Object.setPrototypeOf || function(o, p) { + return module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { return o.__proto__ = p, o; }, module.exports.default = module.exports, module.exports.__esModule = !0, _setPrototypeOf(o, p); } @@ -13298,21 +13298,21 @@ this.listeners = {}; } var _proto = Stream.prototype; - return _proto.on = function(type, listener) { + return _proto.on = function on(type, listener) { this.listeners[type] || (this.listeners[type] = []), this.listeners[type].push(listener); - }, _proto.off = function(type, listener) { + }, _proto.off = function off(type, listener) { if (!this.listeners[type]) return !1; var index = this.listeners[type].indexOf(listener); return this.listeners[type] = this.listeners[type].slice(0), this.listeners[type].splice(index, 1), index > -1; - }, _proto.trigger = function(type) { + }, _proto.trigger = function trigger(type) { var callbacks = this.listeners[type]; if (callbacks) { if (2 == arguments.length) for(var length = callbacks.length, i = 0; i < length; ++i)callbacks[i].call(this, arguments[1]); else for(var args = Array.prototype.slice.call(arguments, 1), _length = callbacks.length, _i = 0; _i < _length; ++_i)callbacks[_i].apply(this, args); } - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.listeners = {}; - }, _proto.pipe = function(destination) { + }, _proto.pipe = function pipe(destination) { this.on("data", function(data) { destination.push(data); }); @@ -13365,7 +13365,7 @@ ], i = keyLen; i < 4 * keyLen + 28; i++)tmp = encKey[i - 1], (i % keyLen == 0 || 8 === keyLen && i % keyLen == 4) && (tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[255 & tmp], i % keyLen == 0 && (tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24, rcon = rcon << 1 ^ (rcon >> 7) * 283)), encKey[i] = encKey[i - keyLen] ^ tmp; for(j = 0; i; j++, i--)tmp = encKey[3 & j ? i : i - 4], i <= 4 || j < 4 ? decKey[j] = tmp : decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[255 & tmp]]; } - return AES.prototype.decrypt = function(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) { + return AES.prototype.decrypt = function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) { var a2, b2, c2, i, key = this._key[1], a = encrypted0 ^ key[0], b = encrypted3 ^ key[1], c = encrypted2 ^ key[2], d = encrypted1 ^ key[3], nInnerRounds = key.length / 4 - 2, kIndex = 4, table = this._tables[1], table0 = table[0], table1 = table[1], table2 = table[2], table3 = table[3], sbox = table[4]; for(i = 0; i < nInnerRounds; i++)a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[255 & d] ^ key[kIndex], b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[255 & a] ^ key[kIndex + 1], c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[255 & b] ^ key[kIndex + 2], d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[255 & c] ^ key[kIndex + 3], kIndex += 4, a = a2, b = b2, c = c2; for(i = 0; i < 4; i++)out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[255 & d] ^ key[kIndex++], a2 = a, a = b, b = c, c = d, d = a2; @@ -13377,9 +13377,9 @@ } inheritsLoose(AsyncStream, _Stream); var _proto = AsyncStream.prototype; - return _proto.processJob_ = function() { + return _proto.processJob_ = function processJob_() { this.jobs.shift()(), this.jobs.length ? this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay) : this.timeout_ = null; - }, _proto.push = function(job) { + }, _proto.push = function push(job) { this.jobs.push(job), this.timeout_ || (this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay)); }, AsyncStream; }(Stream), ntoh = function(word) { @@ -13401,7 +13401,7 @@ done(null, decrypted.subarray(0, decrypted.byteLength - decrypted[decrypted.byteLength - 1])); }); } - return Decrypter.prototype.decryptChunk_ = function(encrypted, key, initVector, decrypted) { + return Decrypter.prototype.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) { return function() { var bytes = decrypt(encrypted, key, initVector); decrypted.set(bytes, encrypted.byteOffset); @@ -13409,7 +13409,7 @@ }, createClass(Decrypter, null, [ { key: "STEP", - get: function() { + get: function get() { return 32000; } } @@ -13444,7 +13444,7 @@ }, startLoaders = function(playlistLoader, mediaType) { mediaType.activePlaylistLoader = playlistLoader, playlistLoader.load(); }, onError = { - AUDIO: function(type, settings) { + AUDIO: function AUDIO(type, settings) { return function() { var segmentLoader = settings.segmentLoaders[type], mediaType = settings.mediaTypes[type], blacklistCurrentPlaylist = settings.blacklistCurrentPlaylist; stopLoaders(segmentLoader, mediaType); @@ -13461,7 +13461,7 @@ mediaType.onTrackChanged(); }; }, - SUBTITLES: function(type, settings) { + SUBTITLES: function SUBTITLES(type, settings) { return function() { var segmentLoader = settings.segmentLoaders[type], mediaType = settings.mediaTypes[type]; videojs.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."), stopLoaders(segmentLoader, mediaType); @@ -13470,7 +13470,7 @@ }; } }, setupListeners = { - AUDIO: function(type, playlistLoader, settings) { + AUDIO: function AUDIO(type, playlistLoader, settings) { if (playlistLoader) { var tech = settings.tech, requestOptions = settings.requestOptions, segmentLoader = settings.segmentLoaders[type]; playlistLoader.on("loadedmetadata", function() { @@ -13481,7 +13481,7 @@ }), playlistLoader.on("error", onError[type](type, settings)); } }, - SUBTITLES: function(type, playlistLoader, settings) { + SUBTITLES: function SUBTITLES(type, playlistLoader, settings) { var tech = settings.tech, requestOptions = settings.requestOptions, segmentLoader = settings.segmentLoaders[type], mediaType = settings.mediaTypes[type]; playlistLoader.on("loadedmetadata", function() { var media = playlistLoader.media(); @@ -13491,7 +13491,7 @@ }), playlistLoader.on("error", onError[type](type, settings)); } }, initialize = { - AUDIO: function(type, settings) { + AUDIO: function AUDIO(type, settings) { var vhs = settings.vhs, sourceType = settings.sourceType, segmentLoader = settings.segmentLoaders[type], requestOptions = settings.requestOptions, mediaGroups = settings.master.mediaGroups, _settings$mediaTypes$ = settings.mediaTypes[type], groups = _settings$mediaTypes$.groups, tracks = _settings$mediaTypes$.tracks, logger_ = _settings$mediaTypes$.logger_, masterPlaylistLoader = settings.masterPlaylistLoader, audioOnlyMaster = isAudioOnly(masterPlaylistLoader.master); for(var groupId in (!mediaGroups[type] || 0 === Object.keys(mediaGroups[type]).length) && (mediaGroups[type] = { main: { @@ -13518,7 +13518,7 @@ } segmentLoader.on("error", onError[type](type, settings)); }, - SUBTITLES: function(type, settings) { + SUBTITLES: function SUBTITLES(type, settings) { var tech = settings.tech, vhs = settings.vhs, sourceType = settings.sourceType, segmentLoader = settings.segmentLoaders[type], requestOptions = settings.requestOptions, mediaGroups = settings.master.mediaGroups, _settings$mediaTypes$2 = settings.mediaTypes[type], groups = _settings$mediaTypes$2.groups, tracks = _settings$mediaTypes$2.tracks, masterPlaylistLoader = settings.masterPlaylistLoader; for(var groupId in mediaGroups[type])for(var variantLabel in groups[groupId] || (groups[groupId] = []), mediaGroups[type][groupId])if (!mediaGroups[type][groupId][variantLabel].forced) { var properties = mediaGroups[type][groupId][variantLabel], playlistLoader = void 0; @@ -13545,7 +13545,7 @@ } segmentLoader.on("error", onError[type](type, settings)); }, - "CLOSED-CAPTIONS": function(type, settings) { + "CLOSED-CAPTIONS": function CLOSEDCAPTIONS(type, settings) { var tech = settings.tech, mediaGroups = settings.master.mediaGroups, _settings$mediaTypes$3 = settings.mediaTypes[type], groups = _settings$mediaTypes$3.groups, tracks = _settings$mediaTypes$3.tracks; for(var groupId in mediaGroups[type])for(var variantLabel in groups[groupId] || (groups[groupId] = []), mediaGroups[type][groupId]){ var properties = mediaGroups[type][groupId][variantLabel]; @@ -13575,14 +13575,14 @@ for(var i = 0; i < list.length; i++)if (playlistMatch(media, list[i]) || list[i].playlists && groupMatch(list[i].playlists, media)) return !0; return !1; }, activeTrack = { - AUDIO: function(type, settings) { + AUDIO: function AUDIO(type, settings) { return function() { var tracks = settings.mediaTypes[type].tracks; for(var id in tracks)if (tracks[id].enabled) return tracks[id]; return null; }; }, - SUBTITLES: function(type, settings) { + SUBTITLES: function SUBTITLES(type, settings) { return function() { var tracks = settings.mediaTypes[type].tracks; for(var id in tracks)if ("showing" === tracks[id].mode || "hidden" === tracks[id].mode) return tracks[id]; @@ -13769,19 +13769,19 @@ captionServices: captionServices, mediaSource: _this.mediaSource, currentTime: _this.tech_.currentTime.bind(_this.tech_), - seekable: function() { + seekable: function seekable() { return _this.seekable(); }, - seeking: function() { + seeking: function seeking() { return _this.tech_.seeking(); }, - duration: function() { + duration: function duration() { return _this.duration(); }, - hasPlayed: function() { + hasPlayed: function hasPlayed() { return _this.hasPlayed_; }, - goalBufferLength: function() { + goalBufferLength: function goalBufferLength() { return _this.goalBufferLength(); }, bandwidth: bandwidth, @@ -13823,32 +13823,32 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(MasterPlaylistController, _videojs$EventTarget); var _proto = MasterPlaylistController.prototype; - return _proto.mainAppendsToLoadedData_ = function() { + return _proto.mainAppendsToLoadedData_ = function mainAppendsToLoadedData_() { return this.mainAppendsToLoadedData__; - }, _proto.audioAppendsToLoadedData_ = function() { + }, _proto.audioAppendsToLoadedData_ = function audioAppendsToLoadedData_() { return this.audioAppendsToLoadedData__; - }, _proto.appendsToLoadedData_ = function() { + }, _proto.appendsToLoadedData_ = function appendsToLoadedData_() { var main = this.mainAppendsToLoadedData_(), audio = this.audioAppendsToLoadedData_(); return -1 === main || -1 === audio ? -1 : main + audio; - }, _proto.timeToLoadedData_ = function() { + }, _proto.timeToLoadedData_ = function timeToLoadedData_() { return this.timeToLoadedData__; - }, _proto.checkABR_ = function() { + }, _proto.checkABR_ = function checkABR_() { var nextPlaylist = this.selectPlaylist(); nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist) && this.switchMedia_(nextPlaylist, "abr"); - }, _proto.switchMedia_ = function(playlist, cause, delay) { + }, _proto.switchMedia_ = function switchMedia_(playlist, cause, delay) { var oldMedia = this.media(), oldId = oldMedia && (oldMedia.id || oldMedia.uri), newId = playlist.id || playlist.uri; oldId && oldId !== newId && (this.logger_("switch media " + oldId + " -> " + newId + " from " + cause), this.tech_.trigger({ type: "usage", name: "vhs-rendition-change-" + cause })), this.masterPlaylistLoader_.media(playlist, delay); - }, _proto.startABRTimer_ = function() { + }, _proto.startABRTimer_ = function startABRTimer_() { var _this2 = this; this.stopABRTimer_(), this.abrTimer_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setInterval(function() { return _this2.checkABR_(); }, 250); - }, _proto.stopABRTimer_ = function() { + }, _proto.stopABRTimer_ = function stopABRTimer_() { this.tech_.scrubbing && this.tech_.scrubbing() || (global_window__WEBPACK_IMPORTED_MODULE_0___default().clearInterval(this.abrTimer_), this.abrTimer_ = null); - }, _proto.getAudioTrackPlaylists_ = function() { + }, _proto.getAudioTrackPlaylists_ = function getAudioTrackPlaylists_() { var track, master = this.master(), defaultPlaylists = master && master.playlists || []; if (!master || !master.mediaGroups || !master.mediaGroups.AUDIO) return defaultPlaylists; var AUDIO = master.mediaGroups.AUDIO, groupKeys = Object.keys(AUDIO); @@ -13874,7 +13874,7 @@ } } return playlists.length ? playlists : defaultPlaylists; - }, _proto.setupMasterPlaylistLoaderListeners_ = function() { + }, _proto.setupMasterPlaylistLoaderListeners_ = function setupMasterPlaylistLoaderListeners_() { var _this3 = this; this.masterPlaylistLoader_.on("loadedmetadata", function() { var media = _this3.masterPlaylistLoader_.media(), requestTimeout = 1500 * media.targetDuration; @@ -13936,9 +13936,9 @@ name: "hls-rendition-enabled" }); }); - }, _proto.handleUpdatedMediaPlaylist = function(updatedPlaylist) { + }, _proto.handleUpdatedMediaPlaylist = function handleUpdatedMediaPlaylist(updatedPlaylist) { this.useCueTags_ && this.updateAdCues_(updatedPlaylist), this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_), this.updateDuration(!updatedPlaylist.endList), !this.tech_.paused() && (this.mainSegmentLoader_.load(), this.audioSegmentLoader_ && this.audioSegmentLoader_.load()); - }, _proto.triggerPresenceUsage_ = function(master, media) { + }, _proto.triggerPresenceUsage_ = function triggerPresenceUsage_(master, media) { var mediaGroups = master.mediaGroups || {}, defaultDemuxed = !0, audioGroupKeys = Object.keys(mediaGroups.AUDIO); for(var mediaGroup in mediaGroups.AUDIO)for(var label in mediaGroups.AUDIO[mediaGroup])mediaGroups.AUDIO[mediaGroup][label].uri || (defaultDemuxed = !1); defaultDemuxed && (this.tech_.trigger({ @@ -13972,7 +13972,7 @@ type: "usage", name: "hls-playlist-cue-tags" })); - }, _proto.shouldSwitchToMedia_ = function(nextPlaylist) { + }, _proto.shouldSwitchToMedia_ = function shouldSwitchToMedia_(nextPlaylist) { var currentPlaylist = this.masterPlaylistLoader_.media() || this.masterPlaylistLoader_.pendingMedia_, currentTime = this.tech_.currentTime(), bufferLowWaterLine = this.bufferLowWaterLine(), bufferHighWaterLine = this.bufferHighWaterLine(); return shouldSwitchToMedia({ buffered: this.tech_.buffered(), @@ -13985,7 +13985,7 @@ experimentalBufferBasedABR: this.experimentalBufferBasedABR, log: this.logger_ }); - }, _proto.setupSegmentLoaderListeners_ = function() { + }, _proto.setupSegmentLoaderListeners_ = function setupSegmentLoaderListeners_() { var _this4 = this; this.experimentalBufferBasedABR || (this.mainSegmentLoader_.on("bandwidthupdate", function() { var nextPlaylist = _this4.selectPlaylist(); @@ -14043,13 +14043,13 @@ }), this.audioSegmentLoader_.on("ended", function() { _this4.logger_("audioSegmentLoader ended"), _this4.onEndOfStream(); }); - }, _proto.mediaSecondsLoaded_ = function() { + }, _proto.mediaSecondsLoaded_ = function mediaSecondsLoaded_() { return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded); - }, _proto.load = function() { + }, _proto.load = function load() { this.mainSegmentLoader_.load(), this.mediaTypes_.AUDIO.activePlaylistLoader && this.audioSegmentLoader_.load(), this.mediaTypes_.SUBTITLES.activePlaylistLoader && this.subtitleSegmentLoader_.load(); - }, _proto.smoothQualityChange_ = function(media) { + }, _proto.smoothQualityChange_ = function smoothQualityChange_(media) { void 0 === media && (media = this.selectPlaylist()), this.fastQualityChange_(media); - }, _proto.fastQualityChange_ = function(media) { + }, _proto.fastQualityChange_ = function fastQualityChange_(media) { var _this5 = this; if (void 0 === media && (media = this.selectPlaylist()), media === this.masterPlaylistLoader_.media()) { this.logger_("skipping fastQualityChange because new media is same as old"); @@ -14058,13 +14058,13 @@ this.switchMedia_(media, "fast-quality"), this.mainSegmentLoader_.resetEverything(function() { videojs.browser.IE_VERSION || videojs.browser.IS_EDGE ? _this5.tech_.setCurrentTime(_this5.tech_.currentTime() + 0.04) : _this5.tech_.setCurrentTime(_this5.tech_.currentTime()); }); - }, _proto.play = function() { + }, _proto.play = function play() { if (!this.setupFirstPlay()) { this.tech_.ended() && this.tech_.setCurrentTime(0), this.hasPlayed_ && this.load(); var seekable = this.tech_.seekable(); if (this.tech_.duration() === 1 / 0 && this.tech_.currentTime() < seekable.start(0)) return this.tech_.setCurrentTime(seekable.end(seekable.length - 1)); } - }, _proto.setupFirstPlay = function() { + }, _proto.setupFirstPlay = function setupFirstPlay() { var _this6 = this, media = this.masterPlaylistLoader_.media(); if (!media || this.tech_.paused() || this.hasPlayed_) return !1; if (!media.endList) { @@ -14076,13 +14076,13 @@ this.trigger("firstplay"), this.tech_.setCurrentTime(seekable.end(0)); } return this.hasPlayed_ = !0, this.load(), !0; - }, _proto.handleSourceOpen_ = function() { + }, _proto.handleSourceOpen_ = function handleSourceOpen_() { if (this.tryToCreateSourceBuffers_(), this.tech_.autoplay()) { var playPromise = this.tech_.play(); void 0 !== playPromise && "function" == typeof playPromise.then && playPromise.then(null, function(e) {}); } this.trigger("sourceopen"); - }, _proto.handleSourceEnded_ = function() { + }, _proto.handleSourceEnded_ = function handleSourceEnded_() { if (this.inbandTextTracks_.metadataTrack_) { var cues = this.inbandTextTracks_.metadataTrack_.cues; if (cues && cues.length) { @@ -14090,16 +14090,16 @@ cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === 1 / 0 ? Number.MAX_VALUE : duration; } } - }, _proto.handleDurationChange_ = function() { + }, _proto.handleDurationChange_ = function handleDurationChange_() { this.tech_.trigger("durationchange"); - }, _proto.onEndOfStream = function() { + }, _proto.onEndOfStream = function onEndOfStream() { var isEndOfStream = this.mainSegmentLoader_.ended_; if (this.mediaTypes_.AUDIO.activePlaylistLoader) { var mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); isEndOfStream = !mainMediaInfo || mainMediaInfo.hasVideo ? isEndOfStream && this.audioSegmentLoader_.ended_ : this.audioSegmentLoader_.ended_; } isEndOfStream && (this.stopABRTimer_(), this.sourceUpdater_.endOfStream()); - }, _proto.stuckAtPlaylistEnd_ = function(playlist) { + }, _proto.stuckAtPlaylistEnd_ = function stuckAtPlaylistEnd_(playlist) { if (!this.seekable().length) return !1; var expired = this.syncController_.getExpiredTime(playlist, this.duration()); if (null === expired) return !1; @@ -14107,7 +14107,7 @@ if (!buffered.length) return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA; var bufferedEnd = buffered.end(buffered.length - 1); return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA; - }, _proto.blacklistCurrentPlaylist = function(error, blacklistDuration) { + }, _proto.blacklistCurrentPlaylist = function blacklistCurrentPlaylist(error, blacklistDuration) { void 0 === error && (error = {}); var excludeUntil, currentPlaylist = error.playlist || this.masterPlaylistLoader_.media(); if (blacklistDuration = blacklistDuration || error.blacklistDuration || this.blacklistDuration, !currentPlaylist) { @@ -14151,12 +14151,12 @@ ]); var delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5000, shouldDelay = "number" == typeof nextPlaylist.lastRequest && Date.now() - nextPlaylist.lastRequest <= delayDuration; return this.switchMedia_(nextPlaylist, "exclude", isFinalRendition || shouldDelay); - }, _proto.pauseLoading = function() { + }, _proto.pauseLoading = function pauseLoading() { this.delegateLoaders_("all", [ "abort", "pause" ]), this.stopABRTimer_(); - }, _proto.delegateLoaders_ = function(filter, fnNames) { + }, _proto.delegateLoaders_ = function delegateLoaders_(filter, fnNames) { var _this7 = this, loaders = [], dontFilterPlaylist = "all" === filter; (dontFilterPlaylist || "main" === filter) && loaders.push(this.masterPlaylistLoader_); var mediaTypes = []; @@ -14175,16 +14175,16 @@ "function" == typeof loader[fnName] && loader[fnName](); }); }); - }, _proto.setCurrentTime = function(currentTime) { + }, _proto.setCurrentTime = function setCurrentTime(currentTime) { var buffered = findRange(this.tech_.buffered(), currentTime); return this.masterPlaylistLoader_ && this.masterPlaylistLoader_.media() && this.masterPlaylistLoader_.media().segments ? buffered && buffered.length ? currentTime : void (this.mainSegmentLoader_.resetEverything(), this.mainSegmentLoader_.abort(), this.mediaTypes_.AUDIO.activePlaylistLoader && (this.audioSegmentLoader_.resetEverything(), this.audioSegmentLoader_.abort()), this.mediaTypes_.SUBTITLES.activePlaylistLoader && (this.subtitleSegmentLoader_.resetEverything(), this.subtitleSegmentLoader_.abort()), this.load()) : 0; - }, _proto.duration = function() { + }, _proto.duration = function duration() { if (!this.masterPlaylistLoader_) return 0; var media = this.masterPlaylistLoader_.media(); return media ? media.endList ? this.mediaSource ? this.mediaSource.duration : Vhs$1.Playlist.duration(media) : 1 / 0 : 0; - }, _proto.seekable = function() { + }, _proto.seekable = function seekable() { return this.seekable_; - }, _proto.onSyncInfoUpdate_ = function() { + }, _proto.onSyncInfoUpdate_ = function onSyncInfoUpdate_() { if (!(!this.masterPlaylistLoader_ || this.sourceUpdater_.hasCreatedSourceBuffers())) { var audioSeekable, oldEnd, oldStart, media = this.masterPlaylistLoader_.media(); if (media) { @@ -14200,7 +14200,7 @@ } } } - }, _proto.updateDuration = function(isLive) { + }, _proto.updateDuration = function updateDuration(isLive) { if (this.updateDuration_ && (this.mediaSource.removeEventListener("sourceopen", this.updateDuration_), this.updateDuration_ = null), "open" !== this.mediaSource.readyState) { this.updateDuration_ = this.updateDuration.bind(this, isLive), this.mediaSource.addEventListener("sourceopen", this.updateDuration_); return; @@ -14213,7 +14213,7 @@ } var buffered = this.tech_.buffered(), duration = Vhs$1.Playlist.duration(this.masterPlaylistLoader_.media()); buffered.length > 0 && (duration = Math.max(duration, buffered.end(buffered.length - 1))), this.mediaSource.duration !== duration && this.sourceUpdater_.setDuration(duration); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { var _this8 = this; this.trigger("dispose"), this.decrypter_.terminate(), this.masterPlaylistLoader_.dispose(), this.mainSegmentLoader_.dispose(), this.loadOnPlay_ && this.tech_.off("play", this.loadOnPlay_), [ "AUDIO", @@ -14224,14 +14224,14 @@ group.playlistLoader && group.playlistLoader.dispose(); }); }), this.audioSegmentLoader_.dispose(), this.subtitleSegmentLoader_.dispose(), this.sourceUpdater_.dispose(), this.timelineChangeController_.dispose(), this.stopABRTimer_(), this.updateDuration_ && this.mediaSource.removeEventListener("sourceopen", this.updateDuration_), this.mediaSource.removeEventListener("durationchange", this.handleDurationChange_), this.mediaSource.removeEventListener("sourceopen", this.handleSourceOpen_), this.mediaSource.removeEventListener("sourceended", this.handleSourceEnded_), this.off(); - }, _proto.master = function() { + }, _proto.master = function master() { return this.masterPlaylistLoader_.master; - }, _proto.media = function() { + }, _proto.media = function media() { return this.masterPlaylistLoader_.media() || this.initialMedia_; - }, _proto.areMediaTypesKnown_ = function() { + }, _proto.areMediaTypesKnown_ = function areMediaTypesKnown_() { var usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader, hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(), hasAudioMediaInfo = !usingAudioLoader || !!this.audioSegmentLoader_.getCurrentMediaInfo_(); return !!hasMainMediaInfo && !!hasAudioMediaInfo; - }, _proto.getCodecsOrExclude_ = function() { + }, _proto.getCodecsOrExclude_ = function getCodecsOrExclude_() { var unsupportedAudio, _this9 = this, media = { main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {}, audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {} @@ -14293,7 +14293,7 @@ } } return codecs; - }, _proto.tryToCreateSourceBuffers_ = function() { + }, _proto.tryToCreateSourceBuffers_ = function tryToCreateSourceBuffers_() { if (!("open" !== this.mediaSource.readyState || this.sourceUpdater_.hasCreatedSourceBuffers()) && this.areMediaTypesKnown_()) { var codecs = this.getCodecsOrExclude_(); if (codecs) { @@ -14305,7 +14305,7 @@ this.excludeIncompatibleVariants_(codecString); } } - }, _proto.excludeUnsupportedVariants_ = function() { + }, _proto.excludeUnsupportedVariants_ = function excludeUnsupportedVariants_() { var _this10 = this, playlists = this.master().playlists, ids = []; Object.keys(playlists).forEach(function(key) { var variant = playlists[key]; @@ -14315,7 +14315,7 @@ !codecs.audio || (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.Hi)(codecs.audio) || (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.p7)(codecs.audio) || unsupported.push("audio codec " + codecs.audio), !codecs.video || (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.Hi)(codecs.video) || (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.p7)(codecs.video) || unsupported.push("video codec " + codecs.video), codecs.text && "stpp.ttml.im1t" === codecs.text && unsupported.push("text codec " + codecs.text), unsupported.length && (variant.excludeUntil = 1 / 0, _this10.logger_("excluding " + variant.id + " for unsupported: " + unsupported.join(", "))); } }); - }, _proto.excludeIncompatibleVariants_ = function(codecString) { + }, _proto.excludeIncompatibleVariants_ = function excludeIncompatibleVariants_(codecString) { var _this11 = this, ids = [], playlists = this.master().playlists, codecs = unwrapCodecList((0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.kS)(codecString)), codecCount_ = codecCount(codecs), videoDetails = codecs.video && (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.kS)(codecs.video)[0] || null, audioDetails = codecs.audio && (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.kS)(codecs.audio)[0] || null; Object.keys(playlists).forEach(function(key) { var variant = playlists[key]; @@ -14331,16 +14331,16 @@ } } }); - }, _proto.updateAdCues_ = function(media) { + }, _proto.updateAdCues_ = function updateAdCues_(media) { var offset = 0, seekable = this.seekable(); seekable.length && (offset = seekable.start(0)), updateAdCues(media, this.cueTagsTrack_, offset); - }, _proto.goalBufferLength = function() { + }, _proto.goalBufferLength = function goalBufferLength() { var currentTime = this.tech_.currentTime(), initial = Config.GOAL_BUFFER_LENGTH, rate = Config.GOAL_BUFFER_LENGTH_RATE, max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH); return Math.min(initial + currentTime * rate, max); - }, _proto.bufferLowWaterLine = function() { + }, _proto.bufferLowWaterLine = function bufferLowWaterLine() { var currentTime = this.tech_.currentTime(), initial = Config.BUFFER_LOW_WATER_LINE, rate = Config.BUFFER_LOW_WATER_LINE_RATE, max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE), newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE); return Math.min(initial + currentTime * rate, this.experimentalBufferBasedABR ? newMax : max); - }, _proto.bufferHighWaterLine = function() { + }, _proto.bufferHighWaterLine = function bufferHighWaterLine() { return Config.BUFFER_HIGH_WATER_LINE; }, MasterPlaylistController; }(videojs.EventTarget), Representation = function(vhsHandler, playlist, id) { @@ -14387,10 +14387,10 @@ ], loaderChecks = {}; loaderTypes.forEach(function(type) { loaderChecks[type] = { - reset: function() { + reset: function reset() { return _this.resetSegmentDownloads_(type); }, - updateend: function() { + updateend: function updateend() { return _this.checkSegmentDownloads_(type); } }, mpc[type + "SegmentLoader_"].on("appendsdone", loaderChecks[type].updateend), mpc[type + "SegmentLoader_"].on("playlistupdate", loaderChecks[type].reset), _this.tech_.on([ @@ -14422,12 +14422,12 @@ }; } var _proto = PlaybackWatcher.prototype; - return _proto.monitorCurrentTime_ = function() { + return _proto.monitorCurrentTime_ = function monitorCurrentTime_() { this.checkCurrentTime_(), this.checkCurrentTimeTimeout_ && global_window__WEBPACK_IMPORTED_MODULE_0___default().clearTimeout(this.checkCurrentTimeTimeout_), this.checkCurrentTimeTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().setTimeout(this.monitorCurrentTime_.bind(this), 250); - }, _proto.resetSegmentDownloads_ = function(type) { + }, _proto.resetSegmentDownloads_ = function resetSegmentDownloads_(type) { var loader = this.masterPlaylistController_[type + "SegmentLoader_"]; this[type + "StalledDownloads_"] > 0 && this.logger_("resetting possible stalled download count for " + type + " loader"), this[type + "StalledDownloads_"] = 0, this[type + "Buffered_"] = loader.buffered_(); - }, _proto.checkSegmentDownloads_ = function(type) { + }, _proto.checkSegmentDownloads_ = function checkSegmentDownloads_(type) { var mpc = this.masterPlaylistController_, loader = mpc[type + "SegmentLoader_"], buffered = loader.buffered_(), isBufferedDifferent = isRangeDifferent(this[type + "Buffered_"], buffered); if (this[type + "Buffered_"] = buffered, isBufferedDifferent) { this.resetSegmentDownloads_(type); @@ -14442,15 +14442,15 @@ }), "subtitle" !== type && mpc.blacklistCurrentPlaylist({ message: "Excessive " + type + " segment downloading detected." }, 1 / 0)); - }, _proto.checkCurrentTime_ = function() { + }, _proto.checkCurrentTime_ = function checkCurrentTime_() { if (!(this.tech_.paused() || this.tech_.seeking())) { var currentTime = this.tech_.currentTime(), buffered = this.tech_.buffered(); if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) return this.techWaiting_(); this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime ? (this.consecutiveUpdates++, this.waiting_()) : currentTime === this.lastRecordedTime ? this.consecutiveUpdates++ : (this.consecutiveUpdates = 0, this.lastRecordedTime = currentTime); } - }, _proto.cancelTimer_ = function() { + }, _proto.cancelTimer_ = function cancelTimer_() { this.consecutiveUpdates = 0, this.timer_ && (this.logger_("cancelTimer_"), clearTimeout(this.timer_)), this.timer_ = null; - }, _proto.fixesBadSeeks_ = function() { + }, _proto.fixesBadSeeks_ = function fixesBadSeeks_() { if (!this.tech_.seeking()) return !1; var seekTo, seekable = this.seekable(), currentTime = this.tech_.currentTime(); if (this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow) && (seekTo = seekable.end(seekable.length - 1)), this.beforeSeekableWindow_(seekable, currentTime)) { @@ -14464,7 +14464,7 @@ ], i = 0; i < bufferedToCheck.length; i++)if (bufferedToCheck[i] && timeAheadOf(bufferedToCheck[i], currentTime) < minAppendedDuration) return !1; var nextRange = findNextRange(buffered, currentTime); return 0 !== nextRange.length && (seekTo = nextRange.start(0) + SAFE_TIME_DELTA, this.logger_("Buffered region starts (" + nextRange.start(0) + ") just beyond seek point (" + currentTime + "). Seeking to " + seekTo + "."), this.tech_.setCurrentTime(seekTo), !0); - }, _proto.waiting_ = function() { + }, _proto.waiting_ = function waiting_() { if (!this.techWaiting_()) { var currentTime = this.tech_.currentTime(), currentRange = findRange(this.tech_.buffered(), currentTime); if (currentRange.length && currentTime + 3 <= currentRange.end(0)) { @@ -14478,7 +14478,7 @@ return; } } - }, _proto.techWaiting_ = function() { + }, _proto.techWaiting_ = function techWaiting_() { var seekable = this.seekable(), currentTime = this.tech_.currentTime(); if (this.tech_.seeking() || null !== this.timer_) return !0; if (this.beforeSeekableWindow_(seekable, currentTime)) { @@ -14509,13 +14509,13 @@ return this.logger_("Stopped at " + currentTime + ", setting timer for " + difference + ", seeking to " + nextRange.start(0)), this.cancelTimer_(), this.timer_ = setTimeout(this.skipTheGap_.bind(this), 1000 * difference, currentTime), !0; } return !1; - }, _proto.afterSeekableWindow_ = function(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow) { + }, _proto.afterSeekableWindow_ = function afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow) { if (void 0 === allowSeeksWithinUnsafeLiveWindow && (allowSeeksWithinUnsafeLiveWindow = !1), !seekable.length) return !1; var allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA; return !playlist.endList && allowSeeksWithinUnsafeLiveWindow && (allowedEnd = seekable.end(seekable.length - 1) + 3 * playlist.targetDuration), currentTime > allowedEnd; - }, _proto.beforeSeekableWindow_ = function(seekable, currentTime) { + }, _proto.beforeSeekableWindow_ = function beforeSeekableWindow_(seekable, currentTime) { return !!(seekable.length && seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta); - }, _proto.videoUnderflow_ = function(_ref) { + }, _proto.videoUnderflow_ = function videoUnderflow_(_ref) { var gap, videoBuffered = _ref.videoBuffered, audioBuffered = _ref.audioBuffered, currentTime = _ref.currentTime; if (videoBuffered) { if (videoBuffered.length && audioBuffered.length) { @@ -14527,7 +14527,7 @@ } else findNextRange(videoBuffered, currentTime).length || (gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime)); return !!gap && (this.logger_("Encountered a gap in video from " + gap.start + " to " + gap.end + ". Seeking to current time " + currentTime), !0); } - }, _proto.skipTheGap_ = function(scheduledCurrentTime) { + }, _proto.skipTheGap_ = function skipTheGap_(scheduledCurrentTime) { var buffered = this.tech_.buffered(), currentTime = this.tech_.currentTime(), nextRange = findNextRange(buffered, currentTime); this.cancelTimer_(), 0 !== nextRange.length && currentTime === scheduledCurrentTime && (this.logger_("skipTheGap_:", "currentTime:", currentTime, "scheduled currentTime:", scheduledCurrentTime, "nextRange start:", nextRange.start(0)), this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR), this.tech_.trigger({ type: "usage", @@ -14536,7 +14536,7 @@ type: "usage", name: "hls-gap-skip" })); - }, _proto.gapFromVideoUnderflow_ = function(buffered, currentTime) { + }, _proto.gapFromVideoUnderflow_ = function gapFromVideoUnderflow_(buffered, currentTime) { for(var gaps = findGaps(buffered), i = 0; i < gaps.length; i++){ var start = gaps.start(i), end = gaps.end(i); if (currentTime - start < 4 && currentTime - start > 2) return { @@ -14548,7 +14548,7 @@ }, PlaybackWatcher; }(), defaultOptions = { errorInterval: 30, - getSource: function(next) { + getSource: function getSource(next) { return next(this.tech({ IWillNotUseThisInPlugins: !0 }).currentSource_ || this.currentSource()); @@ -14627,10 +14627,10 @@ }; Object.keys(Config).forEach(function(prop) { Object.defineProperty(Vhs, prop, { - get: function() { + get: function get() { return videojs.log.warn("using Vhs." + prop + " is UNSAFE be sure you know what you are doing"), Config[prop]; }, - set: function(value) { + set: function set(value) { if (videojs.log.warn("using Vhs." + prop + " is UNSAFE be sure you know what you are doing"), "number" != typeof value || value < 0) { videojs.log.warn("value of Vhs." + prop + " must be greater than or equal to 0"); return; @@ -14744,7 +14744,7 @@ if (_this = _Component.call(this, tech, videojs.mergeOptions(options.hls, options.vhs)) || this, options.hls && Object.keys(options.hls).length && videojs.log.warn("Using hls options is deprecated. Use vhs instead."), "number" == typeof options.initialBandwidth && (_this.options_.bandwidth = options.initialBandwidth), _this.logger_ = logger("VhsHandler"), tech.options_ && tech.options_.playerId) { var _player = videojs(tech.options_.playerId); _player.hasOwnProperty("hls") || Object.defineProperty(_player, "hls", { - get: function() { + get: function get() { return videojs.log.warn("player.hls is deprecated. Use player.tech().vhs instead."), tech.trigger({ type: "usage", name: "hls-player-access" @@ -14752,7 +14752,7 @@ }, configurable: !0 }), _player.hasOwnProperty("vhs") || Object.defineProperty(_player, "vhs", { - get: function() { + get: function get() { return videojs.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."), tech.trigger({ type: "usage", name: "vhs-player-access" @@ -14760,7 +14760,7 @@ }, configurable: !0 }), _player.hasOwnProperty("dash") || Object.defineProperty(_player, "dash", { - get: function() { + get: function get() { return videojs.log.warn("player.dash is deprecated. Use player.tech().vhs instead."), (0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_17__.Z)(_this); }, configurable: !0 @@ -14788,7 +14788,7 @@ } (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_16__.Z)(VhsHandler, _Component); var _proto = VhsHandler.prototype; - return _proto.setOptions_ = function() { + return _proto.setOptions_ = function setOptions_() { var _this2 = this; if (this.options_.withCredentials = this.options_.withCredentials || !1, this.options_.handleManifestRedirects = !1 !== this.options_.handleManifestRedirects, this.options_.limitRenditionByPlayerDimensions = !1 !== this.options_.limitRenditionByPlayerDimensions, this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || !1, this.options_.smoothQualityChange = this.options_.smoothQualityChange || !1, this.options_.useBandwidthFromLocalStorage = void 0 !== this.source_.useBandwidthFromLocalStorage ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || !1, this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || !1, this.options_.customTagParsers = this.options_.customTagParsers || [], this.options_.customTagMappers = this.options_.customTagMappers || [], this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || !1, "number" != typeof this.options_.blacklistDuration && (this.options_.blacklistDuration = 300), "number" != typeof this.options_.bandwidth && this.options_.useBandwidthFromLocalStorage) { var storedObject = getVhsLocalStorage(); @@ -14827,7 +14827,7 @@ ].forEach(function(option) { void 0 !== _this2.source_[option] && (_this2.options_[option] = _this2.source_[option]); }), this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions, this.useDevicePixelRatio = this.options_.useDevicePixelRatio; - }, _proto.src = function(_src, type) { + }, _proto.src = function src(_src, type) { var dataUri, _this3 = this; if (_src) { this.setOptions_(), this.options_.src = 0 === (dataUri = this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,") ? JSON.parse(dataUri.substring(dataUri.indexOf(",") + 1)) : dataUri, this.options_.tech = this.tech_, this.options_.externVhs = Vhs, this.options_.sourceType = (0, _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_20__.t)(type), this.options_.seekTo = function(time) { @@ -14836,10 +14836,10 @@ var playbackWatcherOptions = videojs.mergeOptions({ liveRangeSafeTimeDelta: SAFE_TIME_DELTA }, this.options_, { - seekable: function() { + seekable: function seekable() { return _this3.seekable(); }, - media: function() { + media: function media() { return _this3.masterPlaylistController_.media(); }, masterPlaylistController: this.masterPlaylistController_ @@ -14854,23 +14854,23 @@ var defaultSelector = this.options_.experimentalBufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; this.masterPlaylistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this), this.masterPlaylistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this), this.playlists = this.masterPlaylistController_.masterPlaylistLoader_, this.mediaSource = this.masterPlaylistController_.mediaSource, Object.defineProperties(this, { selectPlaylist: { - get: function() { + get: function get() { return this.masterPlaylistController_.selectPlaylist; }, - set: function(selectPlaylist) { + set: function set(selectPlaylist) { this.masterPlaylistController_.selectPlaylist = selectPlaylist.bind(this); } }, throughput: { - get: function() { + get: function get() { return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate; }, - set: function(throughput) { + set: function set(throughput) { this.masterPlaylistController_.mainSegmentLoader_.throughput.rate = throughput, this.masterPlaylistController_.mainSegmentLoader_.throughput.count = 1; } }, bandwidth: { - get: function() { + get: function get() { var playerBandwidthEst = this.masterPlaylistController_.mainSegmentLoader_.bandwidth, networkInformation = global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator.connection || global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator.mozConnection || global_window__WEBPACK_IMPORTED_MODULE_0___default().navigator.webkitConnection; if (this.options_.useNetworkInformationApi && networkInformation) { var networkInfoBandwidthEstBitsPerSec = 1000000 * networkInformation.downlink; @@ -14878,7 +14878,7 @@ } return playerBandwidthEst; }, - set: function(bandwidth) { + set: function set(bandwidth) { this.masterPlaylistController_.mainSegmentLoader_.bandwidth = bandwidth, this.masterPlaylistController_.mainSegmentLoader_.throughput = { rate: 0, count: 0 @@ -14886,148 +14886,148 @@ } }, systemBandwidth: { - get: function() { + get: function get() { return Math.floor(1 / (1 / (this.bandwidth || 1) + (this.throughput > 0 ? 1 / this.throughput : 0))); }, - set: function() { + set: function set() { videojs.log.error('The "systemBandwidth" property is read-only'); } } }), this.options_.bandwidth && (this.bandwidth = this.options_.bandwidth), this.options_.throughput && (this.throughput = this.options_.throughput), Object.defineProperties(this.stats, { bandwidth: { - get: function() { + get: function get() { return _this3.bandwidth || 0; }, enumerable: !0 }, mediaRequests: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaRequests_() || 0; }, enumerable: !0 }, mediaRequestsAborted: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaRequestsAborted_() || 0; }, enumerable: !0 }, mediaRequestsTimedout: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaRequestsTimedout_() || 0; }, enumerable: !0 }, mediaRequestsErrored: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaRequestsErrored_() || 0; }, enumerable: !0 }, mediaTransferDuration: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaTransferDuration_() || 0; }, enumerable: !0 }, mediaBytesTransferred: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaBytesTransferred_() || 0; }, enumerable: !0 }, mediaSecondsLoaded: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaSecondsLoaded_() || 0; }, enumerable: !0 }, mediaAppends: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mediaAppends_() || 0; }, enumerable: !0 }, mainAppendsToLoadedData: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.mainAppendsToLoadedData_() || 0; }, enumerable: !0 }, audioAppendsToLoadedData: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.audioAppendsToLoadedData_() || 0; }, enumerable: !0 }, appendsToLoadedData: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.appendsToLoadedData_() || 0; }, enumerable: !0 }, timeToLoadedData: { - get: function() { + get: function get() { return _this3.masterPlaylistController_.timeToLoadedData_() || 0; }, enumerable: !0 }, buffered: { - get: function() { + get: function get() { return timeRangesToArray(_this3.tech_.buffered()); }, enumerable: !0 }, currentTime: { - get: function() { + get: function get() { return _this3.tech_.currentTime(); }, enumerable: !0 }, currentSource: { - get: function() { + get: function get() { return _this3.tech_.currentSource_; }, enumerable: !0 }, currentTech: { - get: function() { + get: function get() { return _this3.tech_.name_; }, enumerable: !0 }, duration: { - get: function() { + get: function get() { return _this3.tech_.duration(); }, enumerable: !0 }, master: { - get: function() { + get: function get() { return _this3.playlists.master; }, enumerable: !0 }, playerDimensions: { - get: function() { + get: function get() { return _this3.tech_.currentDimensions(); }, enumerable: !0 }, seekable: { - get: function() { + get: function get() { return timeRangesToArray(_this3.tech_.seekable()); }, enumerable: !0 }, timestamp: { - get: function() { + get: function get() { return Date.now(); }, enumerable: !0 }, videoPlaybackQuality: { - get: function() { + get: function get() { return _this3.tech_.getVideoPlaybackQuality(); }, enumerable: !0 @@ -15047,7 +15047,7 @@ this.ignoreNextSeekingEvent_ = !0; }), this.setupQualityLevels_(), this.tech_.el() && (this.mediaSourceUrl_ = global_window__WEBPACK_IMPORTED_MODULE_0___default().URL.createObjectURL(this.masterPlaylistController_.mediaSource), this.tech_.src(this.mediaSourceUrl_)); } - }, _proto.setupEme_ = function() { + }, _proto.setupEme_ = function setupEme_() { var _this4 = this, audioPlaylistLoader = this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader, didSetupEmeOptions = setupEmeOptions({ player: this.player_, sourceKeySystems: this.source_.keySystems, @@ -15077,14 +15077,14 @@ code: 3 }); }); - }, _proto.setupQualityLevels_ = function() { + }, _proto.setupQualityLevels_ = function setupQualityLevels_() { var _this5 = this, player = videojs.players[this.tech_.options_.playerId]; player && player.qualityLevels && !this.qualityLevels_ && (this.qualityLevels_ = player.qualityLevels(), this.masterPlaylistController_.on("selectedinitialmedia", function() { handleVhsLoadedMetadata(_this5.qualityLevels_, _this5); }), this.playlists.on("mediachange", function() { handleVhsMediaChange(_this5.qualityLevels_, _this5.playlists); })); - }, VhsHandler.version = function() { + }, VhsHandler.version = function version$5() { return { "@videojs/http-streaming": version$4, "mux.js": "5.14.1", @@ -15092,27 +15092,27 @@ "m3u8-parser": "4.7.0", "aes-decrypter": "3.1.2" }; - }, _proto.version = function() { + }, _proto.version = function version() { return this.constructor.version(); - }, _proto.canChangeType = function() { + }, _proto.canChangeType = function canChangeType() { return SourceUpdater.canChangeType(); - }, _proto.play = function() { + }, _proto.play = function play() { this.masterPlaylistController_.play(); - }, _proto.setCurrentTime = function(currentTime) { + }, _proto.setCurrentTime = function setCurrentTime(currentTime) { this.masterPlaylistController_.setCurrentTime(currentTime); - }, _proto.duration = function() { + }, _proto.duration = function duration() { return this.masterPlaylistController_.duration(); - }, _proto.seekable = function() { + }, _proto.seekable = function seekable() { return this.masterPlaylistController_.seekable(); - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.playbackWatcher_ && this.playbackWatcher_.dispose(), this.masterPlaylistController_ && this.masterPlaylistController_.dispose(), this.qualityLevels_ && this.qualityLevels_.dispose(), this.player_ && (delete this.player_.vhs, delete this.player_.dash, delete this.player_.hls), this.tech_ && this.tech_.vhs && delete this.tech_.vhs, this.tech_ && delete this.tech_.hls, this.mediaSourceUrl_ && global_window__WEBPACK_IMPORTED_MODULE_0___default().URL.revokeObjectURL && (global_window__WEBPACK_IMPORTED_MODULE_0___default().URL.revokeObjectURL(this.mediaSourceUrl_), this.mediaSourceUrl_ = null), _Component.prototype.dispose.call(this); - }, _proto.convertToProgramTime = function(time, callback) { + }, _proto.convertToProgramTime = function convertToProgramTime(time, callback) { return getProgramTime({ playlist: this.masterPlaylistController_.media(), time: time, callback: callback }); - }, _proto.seekToProgramTime = function(programTime, callback, pauseAfterSeek, retryCount) { + }, _proto.seekToProgramTime = function seekToProgramTime$1(programTime, callback, pauseAfterSeek, retryCount) { return void 0 === pauseAfterSeek && (pauseAfterSeek = !0), void 0 === retryCount && (retryCount = 2), seekToProgramTime({ programTime: programTime, playlist: this.masterPlaylistController_.media(), @@ -15126,39 +15126,39 @@ }(videojs.getComponent("Component")), VhsSourceHandler = { name: "videojs-http-streaming", VERSION: version$4, - canHandleSource: function(srcObj, options) { + canHandleSource: function canHandleSource(srcObj, options) { void 0 === options && (options = {}); var localOptions = videojs.mergeOptions(videojs.options, options); return VhsSourceHandler.canPlayType(srcObj.type, localOptions); }, - handleSource: function(source, tech, options) { + handleSource: function handleSource(source, tech, options) { void 0 === options && (options = {}); var localOptions = videojs.mergeOptions(videojs.options, options); return tech.vhs = new VhsHandler(source, tech, localOptions), videojs.hasOwnProperty("hls") || Object.defineProperty(tech, "hls", { - get: function() { + get: function get() { return videojs.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."), tech.vhs; }, configurable: !0 }), tech.vhs.xhr = xhrFactory(), tech.vhs.src(source.src, source.type), tech.vhs; }, - canPlayType: function(type, options) { + canPlayType: function canPlayType(type, options) { void 0 === options && (options = {}); var _videojs$mergeOptions2 = videojs.mergeOptions(videojs.options, options).vhs.overrideNative, overrideNative = void 0 === _videojs$mergeOptions2 ? !videojs.browser.IS_ANY_SAFARI : _videojs$mergeOptions2, supportedType = (0, _videojs_vhs_utils_es_media_types_js__WEBPACK_IMPORTED_MODULE_20__.t)(type); return supportedType && (!Vhs.supportsTypeNatively(supportedType) || overrideNative) ? "maybe" : ""; } }; (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.p7)("avc1.4d400d,mp4a.40.2") && videojs.getTech("Html5").registerSourceHandler(VhsSourceHandler, 0), videojs.VhsHandler = VhsHandler, Object.defineProperty(videojs, "HlsHandler", { - get: function() { + get: function get() { return videojs.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."), VhsHandler; }, configurable: !0 }), videojs.VhsSourceHandler = VhsSourceHandler, Object.defineProperty(videojs, "HlsSourceHandler", { - get: function() { + get: function get() { return videojs.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."), VhsSourceHandler; }, configurable: !0 }), videojs.Vhs = Vhs, Object.defineProperty(videojs, "Hls", { - get: function() { + get: function get() { return videojs.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."), Vhs; }, configurable: !0 diff --git a/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/pages/index-cb36c1bf7f830e3c/output.js b/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/pages/index-cb36c1bf7f830e3c/output.js index d4a5e467e79b..76efd59b92e1 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/pages/index-cb36c1bf7f830e3c/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/33265/static/chunks/pages/index-cb36c1bf7f830e3c/output.js @@ -266,7 +266,7 @@ DESCRIPTORS = [ { id: 0x03, - parser: function(bytes) { + parser: function parser(bytes) { var desc = { tag: 0x03, id: bytes[0] << 8 | bytes[1], @@ -286,7 +286,7 @@ }, { id: 0x04, - parser: function(bytes) { + parser: function parser(bytes) { return { tag: 0x04, oti: bytes[0], @@ -300,7 +300,7 @@ }, { id: 0x05, - parser: function(bytes) { + parser: function parser(bytes) { return { tag: 0x05, bytes: bytes @@ -309,7 +309,7 @@ }, { id: 0x06, - parser: function(bytes) { + parser: function parser(bytes) { return { tag: 0x06, bytes: bytes @@ -595,7 +595,7 @@ 0x66 ]) }, _isLikely = { - aac: function(bytes) { + aac: function aac(bytes) { var offset = (0, id3_helpers.c)(bytes); return (0, byte_helpers.G3)(bytes, [ 0xff, @@ -608,7 +608,7 @@ ] }); }, - mp3: function(bytes) { + mp3: function mp3(bytes) { var offset = (0, id3_helpers.c)(bytes); return (0, byte_helpers.G3)(bytes, [ 0xff, @@ -621,21 +621,21 @@ ] }); }, - webm: function(bytes) { + webm: function webm(bytes) { var docType = findEbml(bytes, [ EBML_TAGS.EBML, EBML_TAGS.DocType ])[0]; return (0, byte_helpers.G3)(docType, CONSTANTS.webm); }, - mkv: function(bytes) { + mkv: function mkv(bytes) { var docType = findEbml(bytes, [ EBML_TAGS.EBML, EBML_TAGS.DocType ])[0]; return (0, byte_helpers.G3)(docType, CONSTANTS.matroska); }, - mp4: function(bytes) { + mp4: function mp4(bytes) { return !(_isLikely["3gp"](bytes) || _isLikely.mov(bytes)) && (!!((0, byte_helpers.G3)(bytes, CONSTANTS.mp4, { offset: 4 }) || (0, byte_helpers.G3)(bytes, CONSTANTS.fmp4, { @@ -646,23 +646,23 @@ offset: 4 })) || void 0); }, - mov: function(bytes) { + mov: function mov(bytes) { return (0, byte_helpers.G3)(bytes, CONSTANTS.mov, { offset: 4 }); }, - "3gp": function(bytes) { + "3gp": function gp(bytes) { return (0, byte_helpers.G3)(bytes, CONSTANTS["3gp"], { offset: 4 }); }, - ac3: function(bytes) { + ac3: function ac3(bytes) { var offset = (0, id3_helpers.c)(bytes); return (0, byte_helpers.G3)(bytes, CONSTANTS.ac3, { offset: offset }); }, - ts: function(bytes) { + ts: function ts(bytes) { if (bytes.length < 189 && bytes.length >= 1) return 0x47 === bytes[0]; for(var i = 0; i + 188 < bytes.length && i < 188;){ if (0x47 === bytes[i] && 0x47 === bytes[i + 188]) return !0; @@ -670,29 +670,29 @@ } return !1; }, - flac: function(bytes) { + flac: function flac(bytes) { var offset = (0, id3_helpers.c)(bytes); return (0, byte_helpers.G3)(bytes, CONSTANTS.flac, { offset: offset }); }, - ogg: function(bytes) { + ogg: function ogg(bytes) { return (0, byte_helpers.G3)(bytes, CONSTANTS.ogg); }, - avi: function(bytes) { + avi: function avi(bytes) { return (0, byte_helpers.G3)(bytes, CONSTANTS.riff) && (0, byte_helpers.G3)(bytes, CONSTANTS.avi, { offset: 8 }); }, - wav: function(bytes) { + wav: function wav(bytes) { return (0, byte_helpers.G3)(bytes, CONSTANTS.riff) && (0, byte_helpers.G3)(bytes, CONSTANTS.wav, { offset: 8 }); }, - h264: function(bytes) { + h264: function h264(bytes) { return findNal(bytes, "h264", 7, 3).length; }, - h265: function(bytes) { + h265: function h265(bytes) { return findNal(bytes, "h265", [ 32, 33 @@ -2238,7 +2238,7 @@ var foundNamedKey = aliases[search.toLowerCase()]; return foundNamedKey || (1 === search.length ? search.charCodeAt(0) : void 0); } - keyCode.isEventKey = function(event, nameOrCode) { + keyCode.isEventKey = function isEventKey(event, nameOrCode) { if (event && "object" == typeof event) { var keyCode = event.which || event.keyCode || event.charCode; if (null == keyCode) return !1; @@ -2337,21 +2337,21 @@ this.listeners = {}; } var _proto = Stream.prototype; - return _proto.on = function(type, listener) { + return _proto.on = function on(type, listener) { this.listeners[type] || (this.listeners[type] = []), this.listeners[type].push(listener); - }, _proto.off = function(type, listener) { + }, _proto.off = function off(type, listener) { if (!this.listeners[type]) return !1; var index = this.listeners[type].indexOf(listener); return this.listeners[type] = this.listeners[type].slice(0), this.listeners[type].splice(index, 1), index > -1; - }, _proto.trigger = function(type) { + }, _proto.trigger = function trigger(type) { var callbacks = this.listeners[type]; if (callbacks) { if (2 == arguments.length) for(var length = callbacks.length, i = 0; i < length; ++i)callbacks[i].call(this, arguments[1]); else for(var args = Array.prototype.slice.call(arguments, 1), _length = callbacks.length, _i = 0; _i < _length; ++_i)callbacks[_i].apply(this, args); } - }, _proto.dispose = function() { + }, _proto.dispose = function dispose() { this.listeners = {}; - }, _proto.pipe = function(destination) { + }, _proto.pipe = function pipe(destination) { this.on("data", function(data) { destination.push(data); }); @@ -2361,7 +2361,7 @@ var _this; return (_this = _Stream.call(this) || this).buffer = "", _this; } - return (0, inheritsLoose.Z)(LineStream, _Stream), LineStream.prototype.push = function(data) { + return (0, inheritsLoose.Z)(LineStream, _Stream), LineStream.prototype.push = function push(data) { var nextNewline; for(this.buffer += data, nextNewline = this.buffer.indexOf("\n"); nextNewline > -1; nextNewline = this.buffer.indexOf("\n"))this.trigger("data", this.buffer.substring(0, nextNewline)), this.buffer = this.buffer.substring(nextNewline + 1); }, LineStream; @@ -2378,7 +2378,7 @@ } (0, inheritsLoose.Z)(ParseStream, _Stream); var _proto = ParseStream.prototype; - return _proto.push = function(line) { + return _proto.push = function push(line) { var match, event, _this2 = this; if (0 !== (line = line.trim()).length) { if ("#" !== line[0]) { @@ -2641,9 +2641,9 @@ }); }); } - }, _proto.addParser = function(_ref) { + }, _proto.addParser = function addParser(_ref) { var _this3 = this, expression = _ref.expression, customType = _ref.customType, dataParser = _ref.dataParser, segment = _ref.segment; - "function" != typeof dataParser && (dataParser = function(line) { + "function" != typeof dataParser && (dataParser = function dataParser(line) { return line; }), this.customParsers.push(function(line) { if (expression.exec(line)) return _this3.trigger("data", { @@ -2653,7 +2653,7 @@ segment: segment }), !0; }); - }, _proto.addTagMapper = function(_ref2) { + }, _proto.addTagMapper = function addTagMapper(_ref2) { var expression = _ref2.expression, map = _ref2.map; this.tagMappers.push(function(line) { return expression.test(line) ? map(line) : line; @@ -2700,24 +2700,24 @@ }), _this.parseStream.on("data", function(entry) { var mediaGroup, rendition; ({ - tag: function() { + tag: function tag() { (({ - version: function() { + version: function version() { entry.version && (this.manifest.version = entry.version); }, - "allow-cache": function() { + "allow-cache": function allowCache() { this.manifest.allowCache = entry.allowed, "allowed" in entry || (this.trigger("info", { message: "defaulting allowCache to YES" }), this.manifest.allowCache = !0); }, - byterange: function() { + byterange: function byterange() { var byterange = {}; "length" in entry && (currentUri.byterange = byterange, byterange.length = entry.length, "offset" in entry || (entry.offset = lastByterangeEnd)), "offset" in entry && (currentUri.byterange = byterange, byterange.offset = entry.offset), lastByterangeEnd = byterange.offset + byterange.length; }, - endlist: function() { + endlist: function endlist() { this.manifest.endList = !0; }, - inf: function() { + inf: function inf() { "mediaSequence" in this.manifest || (this.manifest.mediaSequence = 0, this.trigger("info", { message: "defaulting media sequence to zero" })), "discontinuitySequence" in this.manifest || (this.manifest.discontinuitySequence = 0, this.trigger("info", { @@ -2726,7 +2726,7 @@ message: "updating zero segment duration to a small value" })), this.manifest.segments = uris; }, - key: function() { + key: function key() { if (!entry.attributes) { this.trigger("warn", { message: "ignoring key declaration without attribute list" @@ -2790,7 +2790,7 @@ uri: entry.attributes.URI }, void 0 !== entry.attributes.IV && (_key.iv = entry.attributes.IV); }, - "media-sequence": function() { + "media-sequence": function mediaSequence() { if (!isFinite(entry.number)) { this.trigger("warn", { message: "ignoring invalid media sequence: " + entry.number @@ -2799,7 +2799,7 @@ } this.manifest.mediaSequence = entry.number; }, - "discontinuity-sequence": function() { + "discontinuity-sequence": function discontinuitySequence() { if (!isFinite(entry.number)) { this.trigger("warn", { message: "ignoring invalid discontinuity sequence: " + entry.number @@ -2808,7 +2808,7 @@ } this.manifest.discontinuitySequence = entry.number, currentTimeline = entry.number; }, - "playlist-type": function() { + "playlist-type": function playlistType() { if (!/VOD|EVENT/.test(entry.playlistType)) { this.trigger("warn", { message: "ignoring unknown playlist type: " + entry.playlist @@ -2817,10 +2817,10 @@ } this.manifest.playlistType = entry.playlistType; }, - map: function() { + map: function map() { currentMap = {}, entry.uri && (currentMap.uri = entry.uri), entry.byterange && (currentMap.byterange = entry.byterange), _key && (currentMap.key = _key); }, - "stream-inf": function() { + "stream-inf": function streamInf() { if (this.manifest.playlists = uris, this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups, !entry.attributes) { this.trigger("warn", { message: "ignoring empty stream-inf attributes" @@ -2829,7 +2829,7 @@ } currentUri.attributes || (currentUri.attributes = {}), (0, esm_extends.Z)(currentUri.attributes, entry.attributes); }, - media: function() { + media: function media() { if (this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups, !(entry.attributes && entry.attributes.TYPE && entry.attributes["GROUP-ID"] && entry.attributes.NAME)) { this.trigger("warn", { message: "ignoring incomplete or missing media group" @@ -2841,13 +2841,13 @@ default: /yes/i.test(entry.attributes.DEFAULT) }).default ? rendition.autoselect = !0 : rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT), entry.attributes.LANGUAGE && (rendition.language = entry.attributes.LANGUAGE), entry.attributes.URI && (rendition.uri = entry.attributes.URI), entry.attributes["INSTREAM-ID"] && (rendition.instreamId = entry.attributes["INSTREAM-ID"]), entry.attributes.CHARACTERISTICS && (rendition.characteristics = entry.attributes.CHARACTERISTICS), entry.attributes.FORCED && (rendition.forced = /yes/i.test(entry.attributes.FORCED)), mediaGroup[entry.attributes.NAME] = rendition; }, - discontinuity: function() { + discontinuity: function discontinuity() { currentTimeline += 1, currentUri.discontinuity = !0, this.manifest.discontinuityStarts.push(uris.length); }, - "program-date-time": function() { + "program-date-time": function programDateTime() { void 0 === this.manifest.dateTimeString && (this.manifest.dateTimeString = entry.dateTimeString, this.manifest.dateTimeObject = entry.dateTimeObject), currentUri.dateTimeString = entry.dateTimeString, currentUri.dateTimeObject = entry.dateTimeObject; }, - targetduration: function() { + targetduration: function targetduration() { if (!isFinite(entry.duration) || entry.duration < 0) { this.trigger("warn", { message: "ignoring invalid target duration: " + entry.duration @@ -2856,7 +2856,7 @@ } this.manifest.targetDuration = entry.duration, setHoldBack.call(this, this.manifest); }, - start: function() { + start: function start() { if (!entry.attributes || isNaN(entry.attributes["TIME-OFFSET"])) { this.trigger("warn", { message: "ignoring start declaration without appropriate attribute list" @@ -2868,21 +2868,21 @@ precise: entry.attributes.PRECISE }; }, - "cue-out": function() { + "cue-out": function cueOut() { currentUri.cueOut = entry.data; }, - "cue-out-cont": function() { + "cue-out-cont": function cueOutCont() { currentUri.cueOutCont = entry.data; }, - "cue-in": function() { + "cue-in": function cueIn() { currentUri.cueIn = entry.data; }, - skip: function() { + skip: function skip() { this.manifest.skip = camelCaseKeys(entry.attributes), this.warnOnMissingAttributes_("#EXT-X-SKIP", entry.attributes, [ "SKIPPED-SEGMENTS" ]); }, - part: function() { + part: function part() { var _this2 = this; hasParts = !0; var segmentIndex = this.manifest.segments.length, part = camelCaseKeys(entry.attributes); @@ -2897,7 +2897,7 @@ }); }); }, - "server-control": function() { + "server-control": function serverControl() { var attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes); attrs.hasOwnProperty("canBlockReload") || (attrs.canBlockReload = !1, this.trigger("info", { message: "#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false" @@ -2905,7 +2905,7 @@ message: "#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set" }); }, - "preload-hint": function() { + "preload-hint": function preloadHint() { var segmentIndex = this.manifest.segments.length, hint = camelCaseKeys(entry.attributes), isPart = hint.type && "PART" === hint.type; currentUri.preloadHints = currentUri.preloadHints || [], currentUri.preloadHints.push(hint), hint.byterange && !hint.byterange.hasOwnProperty("offset") && (hint.byterange.offset = isPart ? lastPartByterangeEnd : 0, isPart && (lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length)); var index = currentUri.preloadHints.length - 1; @@ -2919,7 +2919,7 @@ }); } }, - "rendition-report": function() { + "rendition-report": function renditionReport() { var report = camelCaseKeys(entry.attributes); this.manifest.renditionReports = this.manifest.renditionReports || [], this.manifest.renditionReports.push(report); var index = this.manifest.renditionReports.length - 1, required = [ @@ -2928,20 +2928,20 @@ ]; hasParts && required.push("LAST-PART"), this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #" + index, entry.attributes, required); }, - "part-inf": function() { + "part-inf": function partInf() { this.manifest.partInf = camelCaseKeys(entry.attributes), this.warnOnMissingAttributes_("#EXT-X-PART-INF", entry.attributes, [ "PART-TARGET" ]), this.manifest.partInf.partTarget && (this.manifest.partTargetDuration = this.manifest.partInf.partTarget), setHoldBack.call(this, this.manifest); } })[entry.tagType] || noop).call(self1); }, - uri: function() { + uri: function uri() { currentUri.uri = entry.uri, uris.push(currentUri), !this.manifest.targetDuration || "duration" in currentUri || (this.trigger("warn", { message: "defaulting segment duration to the target duration" }), currentUri.duration = this.manifest.targetDuration), _key && (currentUri.key = _key), currentUri.timeline = currentTimeline, currentMap && (currentUri.map = currentMap), lastPartByterangeEnd = 0, currentUri = {}; }, - comment: function() {}, - custom: function() { + comment: function comment() {}, + custom: function custom() { entry.segment ? (currentUri.custom = currentUri.custom || {}, currentUri.custom[entry.customType] = entry.data) : (this.manifest.custom = this.manifest.custom || {}, this.manifest.custom[entry.customType] = entry.data); } })[entry.type].call(self1); @@ -2949,20 +2949,20 @@ } (0, inheritsLoose.Z)(Parser, _Stream); var _proto = Parser.prototype; - return _proto.warnOnMissingAttributes_ = function(identifier, attributes, required) { + return _proto.warnOnMissingAttributes_ = function warnOnMissingAttributes_(identifier, attributes, required) { var missing = []; required.forEach(function(key) { attributes.hasOwnProperty(key) || missing.push(key); }), missing.length && this.trigger("warn", { message: identifier + " lacks required attribute(s): " + missing.join(", ") }); - }, _proto.push = function(chunk) { + }, _proto.push = function push(chunk) { this.lineStream.push(chunk); - }, _proto.end = function() { + }, _proto.end = function end() { this.lineStream.push("\n"), this.trigger("end"); - }, _proto.addParser = function(options) { + }, _proto.addParser = function addParser(options) { this.parseStream.addParser(options); - }, _proto.addTagMapper = function(options) { + }, _proto.addTagMapper = function addTagMapper(options) { this.parseStream.addTagMapper(options); }, Parser; }(Stream); @@ -3029,7 +3029,7 @@ }, parseEndNumber = function(endNumber) { return (endNumber && "number" != typeof endNumber && (endNumber = parseInt(endNumber, 10)), isNaN(endNumber)) ? null : endNumber; }, segmentRange = { - static: function(attributes) { + static: function _static(attributes) { var duration = attributes.duration, _attributes$timescale = attributes.timescale, sourceDuration = attributes.sourceDuration, periodDuration = attributes.periodDuration, endNumber = parseEndNumber(attributes.endNumber), segmentDuration = duration / (void 0 === _attributes$timescale ? 1 : _attributes$timescale); return "number" == typeof endNumber ? { start: 0, @@ -3042,7 +3042,7 @@ end: sourceDuration / segmentDuration }; }, - dynamic: function(attributes) { + dynamic: function dynamic(attributes) { var NOW = attributes.NOW, clientOffset = attributes.clientOffset, availabilityStartTime = attributes.availabilityStartTime, _attributes$timescale2 = attributes.timescale, timescale = void 0 === _attributes$timescale2 ? 1 : _attributes$timescale2, duration = attributes.duration, _attributes$start = attributes.start, _attributes$minimumUp = attributes.minimumUpdatePeriod, _attributes$timeShift = attributes.timeShiftBufferDepth, endNumber = parseEndNumber(attributes.endNumber), now = (NOW + clientOffset) / 1000, periodStartWC = availabilityStartTime + (void 0 === _attributes$start ? 0 : _attributes$start); return { start: Math.max(0, Math.floor((now - periodStartWC - (void 0 === _attributes$timeShift ? 1 / 0 : _attributes$timeShift)) * timescale / duration)), @@ -3362,60 +3362,60 @@ var _match$slice = match.slice(1), year = _match$slice[0], month = _match$slice[1], day = _match$slice[2], hour = _match$slice[3], minute = _match$slice[4], second = _match$slice[5]; return 31536000 * parseFloat(year || 0) + 2592000 * parseFloat(month || 0) + 86400 * parseFloat(day || 0) + 3600 * parseFloat(hour || 0) + 60 * parseFloat(minute || 0) + parseFloat(second || 0); }, parsers = { - mediaPresentationDuration: function(value) { + mediaPresentationDuration: function mediaPresentationDuration(value) { return parseDuration(value); }, - availabilityStartTime: function(value) { + availabilityStartTime: function availabilityStartTime(value) { var str; return str = value, /^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(str) && (str += "Z"), Date.parse(str) / 1000; }, - minimumUpdatePeriod: function(value) { + minimumUpdatePeriod: function minimumUpdatePeriod(value) { return parseDuration(value); }, - suggestedPresentationDelay: function(value) { + suggestedPresentationDelay: function suggestedPresentationDelay(value) { return parseDuration(value); }, - type: function(value) { + type: function type(value) { return value; }, - timeShiftBufferDepth: function(value) { + timeShiftBufferDepth: function timeShiftBufferDepth(value) { return parseDuration(value); }, - start: function(value) { + start: function start(value) { return parseDuration(value); }, - width: function(value) { + width: function width(value) { return parseInt(value, 10); }, - height: function(value) { + height: function height(value) { return parseInt(value, 10); }, - bandwidth: function(value) { + bandwidth: function bandwidth(value) { return parseInt(value, 10); }, - startNumber: function(value) { + startNumber: function startNumber(value) { return parseInt(value, 10); }, - timescale: function(value) { + timescale: function timescale(value) { return parseInt(value, 10); }, - presentationTimeOffset: function(value) { + presentationTimeOffset: function presentationTimeOffset(value) { return parseInt(value, 10); }, - duration: function(value) { + duration: function duration(value) { var parsedValue = parseInt(value, 10); return isNaN(parsedValue) ? parseDuration(value) : parsedValue; }, - d: function(value) { + d: function d(value) { return parseInt(value, 10); }, - t: function(value) { + t: function t(value) { return parseInt(value, 10); }, - r: function(value) { + r: function r(value) { return parseInt(value, 10); }, - DEFAULT: function(value) { + DEFAULT: function DEFAULT(value) { return value; } }, parseAttributes = function(el) { @@ -5355,9 +5355,9 @@ return allocUnsafe(size); }, Buffer.allocUnsafeSlow = function(size) { return allocUnsafe(size); - }, Buffer.isBuffer = function(b) { + }, Buffer.isBuffer = function isBuffer(b) { return null != b && !0 === b._isBuffer && b !== Buffer.prototype; - }, Buffer.compare = function(a, b) { + }, Buffer.compare = function compare(a, b) { if (isInstance(a, Uint8Array) && (a = Buffer.from(a, a.offset, a.byteLength)), isInstance(b, Uint8Array) && (b = Buffer.from(b, b.offset, b.byteLength)), !Buffer.isBuffer(a) || !Buffer.isBuffer(b)) throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); if (a === b) return 0; for(var x = a.length, y = b.length, i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) { @@ -5365,7 +5365,7 @@ break; } return x < y ? -1 : y < x ? 1 : 0; - }, Buffer.isEncoding = function(encoding) { + }, Buffer.isEncoding = function isEncoding(encoding) { switch(String(encoding).toLowerCase()){ case "hex": case "utf8": @@ -5382,7 +5382,7 @@ default: return !1; } - }, Buffer.concat = function(list, length) { + }, Buffer.concat = function concat(list, length) { if (!Array.isArray(list)) throw TypeError('"list" argument must be an Array of Buffers'); if (0 === list.length) return Buffer.alloc(0); if (void 0 === length) for(i = 0, length = 0; i < list.length; ++i)length += list[i].length; @@ -5393,31 +5393,31 @@ buf.copy(buffer, pos), pos += buf.length; } return buffer; - }, Buffer.byteLength = byteLength, Buffer.prototype._isBuffer = !0, Buffer.prototype.swap16 = function() { + }, Buffer.byteLength = byteLength, Buffer.prototype._isBuffer = !0, Buffer.prototype.swap16 = function swap16() { var len = this.length; if (len % 2 != 0) throw RangeError("Buffer size must be a multiple of 16-bits"); for(var i = 0; i < len; i += 2)swap(this, i, i + 1); return this; - }, Buffer.prototype.swap32 = function() { + }, Buffer.prototype.swap32 = function swap32() { var len = this.length; if (len % 4 != 0) throw RangeError("Buffer size must be a multiple of 32-bits"); for(var i = 0; i < len; i += 4)swap(this, i, i + 3), swap(this, i + 1, i + 2); return this; - }, Buffer.prototype.swap64 = function() { + }, Buffer.prototype.swap64 = function swap64() { var len = this.length; if (len % 8 != 0) throw RangeError("Buffer size must be a multiple of 64-bits"); for(var i = 0; i < len; i += 8)swap(this, i, i + 7), swap(this, i + 1, i + 6), swap(this, i + 2, i + 5), swap(this, i + 3, i + 4); return this; - }, Buffer.prototype.toString = function() { + }, Buffer.prototype.toString = function toString() { var length = this.length; return 0 === length ? "" : 0 == arguments.length ? utf8Slice(this, 0, length) : slowToString.apply(this, arguments); - }, Buffer.prototype.toLocaleString = Buffer.prototype.toString, Buffer.prototype.equals = function(b) { + }, Buffer.prototype.toLocaleString = Buffer.prototype.toString, Buffer.prototype.equals = function equals(b) { if (!Buffer.isBuffer(b)) throw TypeError("Argument must be a Buffer"); return this === b || 0 === Buffer.compare(this, b); - }, Buffer.prototype.inspect = function() { + }, Buffer.prototype.inspect = function inspect() { var str = "", max = exports.INSPECT_MAX_BYTES; return str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim(), this.length > max && (str += " ... "), ""; - }, customInspectSymbol && (Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect), Buffer.prototype.compare = function(target, start, end, thisStart, thisEnd) { + }, customInspectSymbol && (Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect), Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { if (isInstance(target, Uint8Array) && (target = Buffer.from(target, target.offset, target.byteLength)), !Buffer.isBuffer(target)) throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target); if (void 0 === start && (start = 0), void 0 === end && (end = target ? target.length : 0), void 0 === thisStart && (thisStart = 0), void 0 === thisEnd && (thisEnd = this.length), start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw RangeError("out of range index"); if (thisStart >= thisEnd && start >= end) return 0; @@ -5429,13 +5429,13 @@ break; } return x < y ? -1 : y < x ? 1 : 0; - }, Buffer.prototype.includes = function(val, byteOffset, encoding) { + }, Buffer.prototype.includes = function includes(val, byteOffset, encoding) { return -1 !== this.indexOf(val, byteOffset, encoding); - }, Buffer.prototype.indexOf = function(val, byteOffset, encoding) { + }, Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, !0); - }, Buffer.prototype.lastIndexOf = function(val, byteOffset, encoding) { + }, Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, !1); - }, Buffer.prototype.write = function(string, offset, length, encoding) { + }, Buffer.prototype.write = function write(string, offset, length, encoding) { if (void 0 === offset) encoding = "utf8", length = this.length, offset = 0; else if (void 0 === length && "string" == typeof offset) encoding = offset, length = this.length, offset = 0; else if (isFinite(offset)) offset >>>= 0, isFinite(length) ? (length >>>= 0, void 0 === encoding && (encoding = "utf8")) : (encoding = length, length = void 0); @@ -5480,65 +5480,65 @@ if (loweredCase) throw TypeError("Unknown encoding: " + encoding); encoding = ("" + encoding).toLowerCase(), loweredCase = !0; } - }, Buffer.prototype.toJSON = function() { + }, Buffer.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; - }, Buffer.prototype.slice = function(start, end) { + }, Buffer.prototype.slice = function slice(start, end) { var len = this.length; start = ~~start, end = void 0 === end ? len : ~~end, start < 0 ? (start += len) < 0 && (start = 0) : start > len && (start = len), end < 0 ? (end += len) < 0 && (end = 0) : end > len && (end = len), end < start && (end = start); var newBuf = this.subarray(start, end); return Object.setPrototypeOf(newBuf, Buffer.prototype), newBuf; - }, Buffer.prototype.readUIntLE = function(offset, byteLength, noAssert) { + }, Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); for(var val = this[offset], mul = 1, i = 0; ++i < byteLength && (mul *= 0x100);)val += this[offset + i] * mul; return val; - }, Buffer.prototype.readUIntBE = function(offset, byteLength, noAssert) { + }, Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); for(var val = this[offset + --byteLength], mul = 1; byteLength > 0 && (mul *= 0x100);)val += this[offset + --byteLength] * mul; return val; - }, Buffer.prototype.readUInt8 = function(offset, noAssert) { + }, Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 1, this.length), this[offset]; - }, Buffer.prototype.readUInt16LE = function(offset, noAssert) { + }, Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 2, this.length), this[offset] | this[offset + 1] << 8; - }, Buffer.prototype.readUInt16BE = function(offset, noAssert) { + }, Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 2, this.length), this[offset] << 8 | this[offset + 1]; - }, Buffer.prototype.readUInt32LE = function(offset, noAssert) { + }, Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + 0x1000000 * this[offset + 3]; - }, Buffer.prototype.readUInt32BE = function(offset, noAssert) { + }, Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), 0x1000000 * this[offset] + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); - }, Buffer.prototype.readIntLE = function(offset, byteLength, noAssert) { + }, Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); for(var val = this[offset], mul = 1, i = 0; ++i < byteLength && (mul *= 0x100);)val += this[offset + i] * mul; return val >= (mul *= 0x80) && (val -= Math.pow(2, 8 * byteLength)), val; - }, Buffer.prototype.readIntBE = function(offset, byteLength, noAssert) { + }, Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { offset >>>= 0, byteLength >>>= 0, noAssert || checkOffset(offset, byteLength, this.length); for(var i = byteLength, mul = 1, val = this[offset + --i]; i > 0 && (mul *= 0x100);)val += this[offset + --i] * mul; return val >= (mul *= 0x80) && (val -= Math.pow(2, 8 * byteLength)), val; - }, Buffer.prototype.readInt8 = function(offset, noAssert) { + }, Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { return (offset >>>= 0, noAssert || checkOffset(offset, 1, this.length), 0x80 & this[offset]) ? -((0xff - this[offset] + 1) * 1) : this[offset]; - }, Buffer.prototype.readInt16LE = function(offset, noAssert) { + }, Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { offset >>>= 0, noAssert || checkOffset(offset, 2, this.length); var val = this[offset] | this[offset + 1] << 8; return 0x8000 & val ? 0xffff0000 | val : val; - }, Buffer.prototype.readInt16BE = function(offset, noAssert) { + }, Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { offset >>>= 0, noAssert || checkOffset(offset, 2, this.length); var val = this[offset + 1] | this[offset] << 8; return 0x8000 & val ? 0xffff0000 | val : val; - }, Buffer.prototype.readInt32LE = function(offset, noAssert) { + }, Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; - }, Buffer.prototype.readInt32BE = function(offset, noAssert) { + }, Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; - }, Buffer.prototype.readFloatLE = function(offset, noAssert) { + }, Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), ieee754.read(this, offset, !0, 23, 4); - }, Buffer.prototype.readFloatBE = function(offset, noAssert) { + }, Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 4, this.length), ieee754.read(this, offset, !1, 23, 4); - }, Buffer.prototype.readDoubleLE = function(offset, noAssert) { + }, Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 8, this.length), ieee754.read(this, offset, !0, 52, 8); - }, Buffer.prototype.readDoubleBE = function(offset, noAssert) { + }, Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { return offset >>>= 0, noAssert || checkOffset(offset, 8, this.length), ieee754.read(this, offset, !1, 52, 8); - }, Buffer.prototype.writeUIntLE = function(value, offset, byteLength, noAssert) { + }, Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { if (value = +value, offset >>>= 0, byteLength >>>= 0, !noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); @@ -5546,7 +5546,7 @@ var mul = 1, i = 0; for(this[offset] = 0xff & value; ++i < byteLength && (mul *= 0x100);)this[offset + i] = value / mul & 0xff; return offset + byteLength; - }, Buffer.prototype.writeUIntBE = function(value, offset, byteLength, noAssert) { + }, Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { if (value = +value, offset >>>= 0, byteLength >>>= 0, !noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); @@ -5554,17 +5554,17 @@ var i = byteLength - 1, mul = 1; for(this[offset + i] = 0xff & value; --i >= 0 && (mul *= 0x100);)this[offset + i] = value / mul & 0xff; return offset + byteLength; - }, Buffer.prototype.writeUInt8 = function(value, offset, noAssert) { + }, Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 1, 0xff, 0), this[offset] = 0xff & value, offset + 1; - }, Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) { + }, Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0xffff, 0), this[offset] = 0xff & value, this[offset + 1] = value >>> 8, offset + 2; - }, Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) { + }, Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0xffff, 0), this[offset] = value >>> 8, this[offset + 1] = 0xff & value, offset + 2; - }, Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) { + }, Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0xffffffff, 0), this[offset + 3] = value >>> 24, this[offset + 2] = value >>> 16, this[offset + 1] = value >>> 8, this[offset] = 0xff & value, offset + 4; - }, Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) { + }, Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0xffffffff, 0), this[offset] = value >>> 24, this[offset + 1] = value >>> 16, this[offset + 2] = value >>> 8, this[offset + 3] = 0xff & value, offset + 4; - }, Buffer.prototype.writeIntLE = function(value, offset, byteLength, noAssert) { + }, Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { if (value = +value, offset >>>= 0, !noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); @@ -5572,7 +5572,7 @@ var i = 0, mul = 1, sub = 0; for(this[offset] = 0xff & value; ++i < byteLength && (mul *= 0x100);)value < 0 && 0 === sub && 0 !== this[offset + i - 1] && (sub = 1), this[offset + i] = (value / mul >> 0) - sub & 0xff; return offset + byteLength; - }, Buffer.prototype.writeIntBE = function(value, offset, byteLength, noAssert) { + }, Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { if (value = +value, offset >>>= 0, !noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); @@ -5580,25 +5580,25 @@ var i = byteLength - 1, mul = 1, sub = 0; for(this[offset + i] = 0xff & value; --i >= 0 && (mul *= 0x100);)value < 0 && 0 === sub && 0 !== this[offset + i + 1] && (sub = 1), this[offset + i] = (value / mul >> 0) - sub & 0xff; return offset + byteLength; - }, Buffer.prototype.writeInt8 = function(value, offset, noAssert) { + }, Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 1, 0x7f, -128), value < 0 && (value = 0xff + value + 1), this[offset] = 0xff & value, offset + 1; - }, Buffer.prototype.writeInt16LE = function(value, offset, noAssert) { + }, Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0x7fff, -32768), this[offset] = 0xff & value, this[offset + 1] = value >>> 8, offset + 2; - }, Buffer.prototype.writeInt16BE = function(value, offset, noAssert) { + }, Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 2, 0x7fff, -32768), this[offset] = value >>> 8, this[offset + 1] = 0xff & value, offset + 2; - }, Buffer.prototype.writeInt32LE = function(value, offset, noAssert) { + }, Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0x7fffffff, -2147483648), this[offset] = 0xff & value, this[offset + 1] = value >>> 8, this[offset + 2] = value >>> 16, this[offset + 3] = value >>> 24, offset + 4; - }, Buffer.prototype.writeInt32BE = function(value, offset, noAssert) { + }, Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { return value = +value, offset >>>= 0, noAssert || checkInt(this, value, offset, 4, 0x7fffffff, -2147483648), value < 0 && (value = 0xffffffff + value + 1), this[offset] = value >>> 24, this[offset + 1] = value >>> 16, this[offset + 2] = value >>> 8, this[offset + 3] = 0xff & value, offset + 4; - }, Buffer.prototype.writeFloatLE = function(value, offset, noAssert) { + }, Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { return writeFloat(this, value, offset, !0, noAssert); - }, Buffer.prototype.writeFloatBE = function(value, offset, noAssert) { + }, Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { return writeFloat(this, value, offset, !1, noAssert); - }, Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) { + }, Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { return writeDouble(this, value, offset, !0, noAssert); - }, Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { + }, Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { return writeDouble(this, value, offset, !1, noAssert); - }, Buffer.prototype.copy = function(target, targetStart, start, end) { + }, Buffer.prototype.copy = function copy(target, targetStart, start, end) { if (!Buffer.isBuffer(target)) throw TypeError("argument should be a Buffer"); if (start || (start = 0), end || 0 === end || (end = this.length), targetStart >= target.length && (targetStart = target.length), targetStart || (targetStart = 0), end > 0 && end < start && (end = start), end === start || 0 === target.length || 0 === this.length) return 0; if (targetStart < 0) throw RangeError("targetStart out of bounds"); @@ -5610,7 +5610,7 @@ else if (this === target && start < targetStart && targetStart < end) for(var i = len - 1; i >= 0; --i)target[i + targetStart] = this[i + start]; else Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart); return len; - }, Buffer.prototype.fill = function(val, start, end, encoding) { + }, Buffer.prototype.fill = function fill(val, start, end, encoding) { if ("string" == typeof val) { if ("string" == typeof start ? (encoding = start, start = 0, end = this.length) : "string" == typeof end && (encoding = end, end = this.length), void 0 !== encoding && "string" != typeof encoding) throw TypeError("encoding must be a string"); if ("string" == typeof encoding && !Buffer.isEncoding(encoding)) throw TypeError("Unknown encoding: " + encoding); @@ -5735,7 +5735,7 @@ } catch (e) { return !1; } - }() ? function(Parent, args, Class) { + }() ? function _construct(Parent, args, Class) { var a = [ null ]; @@ -5799,7 +5799,7 @@ 9611: function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; function _setPrototypeOf(o, p) { - return (_setPrototypeOf = Object.setPrototypeOf || function(o, p) { + return (_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { return o.__proto__ = p, o; })(o, p); } diff --git a/crates/swc_ecma_minifier/tests/fixture/next/39538/static/chunks/pages/index-1bd068cedc2b5af3/output.js b/crates/swc_ecma_minifier/tests/fixture/next/39538/static/chunks/pages/index-1bd068cedc2b5af3/output.js index 587908258c5c..4b48aa9addf2 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/39538/static/chunks/pages/index-1bd068cedc2b5af3/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/39538/static/chunks/pages/index-1bd068cedc2b5af3/output.js @@ -470,7 +470,7 @@ rootMargin: rootMargin })).id, observer = ref.observer, (elements = ref.elements).set(element, function(isVisible) { return isVisible && setVisible(isVisible); - }), observer.observe(element), function() { + }), observer.observe(element), function unobserve() { if (elements.delete(element), observer.unobserve(element), 0 === elements.size) { observer.disconnect(), observers.delete(id); var index = idList.findIndex(function(obj) { diff --git a/crates/swc_ecma_minifier/tests/fixture/next/chakra/output.js b/crates/swc_ecma_minifier/tests/fixture/next/chakra/output.js index 6a6283d75bfc..891a3744b636 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/chakra/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/chakra/output.js @@ -111,37 +111,37 @@ var chakra_ui_system_esm = __webpack_require__(2846), chakra_ui_color_mode_esm = __webpack_require__(949), ssrDocument = { body: { classList: { - add: function() {}, - remove: function() {} + add: function add() {}, + remove: function remove() {} } }, - addEventListener: function() {}, - removeEventListener: function() {}, + addEventListener: function addEventListener() {}, + removeEventListener: function removeEventListener() {}, activeElement: { - blur: function() {}, + blur: function blur() {}, nodeName: "" }, - querySelector: function() { + querySelector: function querySelector() { return null; }, - querySelectorAll: function() { + querySelectorAll: function querySelectorAll() { return []; }, - getElementById: function() { + getElementById: function getElementById() { return null; }, - createEvent: function() { + createEvent: function createEvent() { return { - initEvent: function() {} + initEvent: function initEvent() {} }; }, - createElement: function() { + createElement: function createElement() { return { children: [], childNodes: [], style: {}, - setAttribute: function() {}, - getElementsByTagName: function() { + setAttribute: function setAttribute() {}, + getElementsByTagName: function getElementsByTagName() { return []; } }; @@ -155,36 +155,36 @@ navigator: { userAgent: "" }, - CustomEvent: function() { + CustomEvent: function CustomEvent() { return this; }, addEventListener: noop, removeEventListener: noop, - getComputedStyle: function() { + getComputedStyle: function getComputedStyle() { return { - getPropertyValue: function() { + getPropertyValue: function getPropertyValue() { return ""; } }; }, - matchMedia: function() { + matchMedia: function matchMedia() { return { matches: !1, addListener: noop, removeListener: noop }; }, - requestAnimationFrame: function(callback) { + requestAnimationFrame: function requestAnimationFrame(callback) { return "undefined" == typeof setTimeout ? (callback(), null) : setTimeout(callback, 0); }, - cancelAnimationFrame: function(id) { + cancelAnimationFrame: function cancelAnimationFrame(id) { "undefined" != typeof setTimeout && clearTimeout(id); }, - setTimeout: function() { + setTimeout: function setTimeout1() { return 0; }, clearTimeout: noop, - setInterval: function() { + setInterval: function setInterval() { return 0; }, clearInterval: noop @@ -207,7 +207,7 @@ }, children, react.createElement("span", { hidden: !0, className: "chakra-env", - ref: function(el) { + ref: function ref(el) { (0, react.startTransition)(function() { el && setNode(el); }); @@ -1225,7 +1225,7 @@ } } var Anatomy = function() { - var staticProps; + var Constructor, protoProps, staticProps; function Anatomy(name) { var _this = this; this.map = {}, this.called = !1, this.assert = function() { @@ -1262,16 +1262,16 @@ return { className: className, selector: "." + className, - toString: function() { + toString: function toString() { return part; } }; }, this.__type = {}; } - return _defineProperties(Anatomy.prototype, [ + return Constructor = Anatomy, protoProps = [ { key: "selectors", - get: function() { + get: function get() { return (0, chakra_ui_utils_esm.sq)(Object.entries(this.map).map(function(_ref) { return [ _ref[0], @@ -1282,7 +1282,7 @@ }, { key: "classNames", - get: function() { + get: function get() { return (0, chakra_ui_utils_esm.sq)(Object.entries(this.map).map(function(_ref2) { return [ _ref2[0], @@ -1293,11 +1293,11 @@ }, { key: "keys", - get: function() { + get: function get() { return Object.keys(this.map); } } - ]), staticProps && _defineProperties(Anatomy, staticProps), Object.defineProperty(Anatomy, "prototype", { + ], _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Object.defineProperty(Constructor, "prototype", { writable: !1 }), Anatomy; }(); @@ -1335,34 +1335,34 @@ return null == value || Number.isNaN(parseFloat(value)) ? _multiply(value, -1) : String(value).startsWith("-") ? String(value).slice(1) : "-" + value; }, calc = Object.assign(function(x) { return { - add: function() { + add: function add() { for(var _len6 = arguments.length, operands = Array(_len6), _key6 = 0; _key6 < _len6; _key6++)operands[_key6] = arguments[_key6]; return calc(_add.apply(void 0, [ x ].concat(operands))); }, - subtract: function() { + subtract: function subtract() { for(var _len7 = arguments.length, operands = Array(_len7), _key7 = 0; _key7 < _len7; _key7++)operands[_key7] = arguments[_key7]; return calc(_subtract.apply(void 0, [ x ].concat(operands))); }, - multiply: function() { + multiply: function multiply() { for(var _len8 = arguments.length, operands = Array(_len8), _key8 = 0; _key8 < _len8; _key8++)operands[_key8] = arguments[_key8]; return calc(_multiply.apply(void 0, [ x ].concat(operands))); }, - divide: function() { + divide: function divide() { for(var _len9 = arguments.length, operands = Array(_len9), _key9 = 0; _key9 < _len9; _key9++)operands[_key9] = arguments[_key9]; return calc(_divide.apply(void 0, [ x ].concat(operands))); }, - negate: function() { + negate: function negate() { return calc(_negate(x)); }, - toString: function() { + toString: function toString() { return x.toString(); } }; @@ -2471,15 +2471,15 @@ }, baseStyle$f = sizes_501602a9_esm_extends({}, Input.baseStyle.field, { textAlign: "center" }), variants$4 = { - outline: function(props) { + outline: function outline(props) { var _Input$variants$outli; return null != (_Input$variants$outli = Input.variants.outline(props).field) ? _Input$variants$outli : {}; }, - flushed: function(props) { + flushed: function flushed(props) { var _Input$variants$flush; return null != (_Input$variants$flush = Input.variants.flushed(props).field) ? _Input$variants$flush : {}; }, - filled: function(props) { + filled: function filled(props) { var _Input$variants$fille; return null != (_Input$variants$fille = Input.variants.filled(props).field) ? _Input$variants$fille : {}; }, @@ -3251,17 +3251,17 @@ }, Tag = { parts: tagAnatomy.keys, variants: { - subtle: function(props) { + subtle: function subtle(props) { return { container: Badge.variants.subtle(props) }; }, - solid: function(props) { + solid: function solid(props) { return { container: Badge.variants.solid(props) }; }, - outline: function(props) { + outline: function outline(props) { return { container: Badge.variants.outline(props) }; @@ -3347,15 +3347,15 @@ lineHeight: "short", verticalAlign: "top" }), variants = { - outline: function(props) { + outline: function outline(props) { var _Input$variants$outli; return null != (_Input$variants$outli = Input.variants.outline(props).field) ? _Input$variants$outli : {}; }, - flushed: function(props) { + flushed: function flushed(props) { var _Input$variants$flush; return null != (_Input$variants$flush = Input.variants.flushed(props).field) ? _Input$variants$flush : {}; }, - filled: function(props) { + filled: function filled(props) { var _Input$variants$fille; return null != (_Input$variants$fille = Input.variants.filled(props).field) ? _Input$variants$fille : {}; }, @@ -4408,17 +4408,17 @@ return l(); }); }, { - getState: function() { + getState: function getState() { return state; }, - subscribe: function(listener) { + subscribe: function subscribe(listener) { return listeners.add(listener), function() { setState(function() { return initialState; }), listeners.delete(listener); }; }, - removeToast: function(id, position) { + removeToast: function removeToast(id, position) { setState(function(prevState) { var _extends2; return chakra_ui_toast_esm_extends({}, prevState, ((_extends2 = {})[position] = prevState[position].filter(function(toast) { @@ -4426,14 +4426,14 @@ }), _extends2)); }); }, - notify: function(message, options) { + notify: function notify(message, options) { var options1, _options$id, _options$position, id, position, toast = (void 0 === (options1 = options) && (options1 = {}), counter += 1, { id: id = null != (_options$id = options1.id) ? _options$id : counter, message: message, position: position = null != (_options$position = options1.position) ? _options$position : "bottom", duration: options1.duration, onCloseComplete: options1.onCloseComplete, - onRequestRemove: function() { + onRequestRemove: function onRequestRemove() { return toastStore.removeToast(String(id), position); }, status: options1.status, @@ -4449,7 +4449,7 @@ return chakra_ui_toast_esm_extends({}, prevToasts, ((_extends3 = {})[position1] = toasts, _extends3)); }), id1; }, - update: function(id, options) { + update: function update(id, options) { id && setState(function(prevState) { var options1, _options, render, _options$toastCompone, ToastComponent, nextState = chakra_ui_toast_esm_extends({}, prevState), _findToast = findToast(nextState, id), position = _findToast.position, index = _findToast.index; return position && -1 !== index && (nextState[position][index] = chakra_ui_toast_esm_extends({}, nextState[position][index], options, { @@ -4459,7 +4459,7 @@ })), nextState; }); }, - closeAll: function(_temp) { + closeAll: function closeAll(_temp) { var positions = (void 0 === _temp ? {} : _temp).positions; setState(function(prev) { return (null != positions ? positions : [ @@ -4478,7 +4478,7 @@ }, chakra_ui_toast_esm_extends({}, prev)); }); }, - close: function(id) { + close: function close(id) { setState(function(prevState) { var _extends4, position = getToastPosition(prevState, id); return position ? chakra_ui_toast_esm_extends({}, prevState, ((_extends4 = {})[position] = prevState[position].map(function(toast) { @@ -4488,7 +4488,7 @@ }), _extends4)) : prevState; }); }, - isActive: function(id) { + isActive: function isActive(id) { return !!findToast(toastStore.getState(), id).position; } }), counter = 0, Toast = function(props) { @@ -4519,7 +4519,7 @@ top: 1 })); }, toastMotionVariants = { - initial: function(props) { + initial: function initial(props) { var _ref, position = props.position, dir = [ "top", "bottom" diff --git a/crates/swc_ecma_minifier/tests/fixture/next/config.json b/crates/swc_ecma_minifier/tests/fixture/next/config.json index 0804f8f8b56f..a48fe072e20e 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/config.json +++ b/crates/swc_ecma_minifier/tests/fixture/next/config.json @@ -1,4 +1,6 @@ { "defaults": true, - "toplevel": true + "toplevel": true, + "keep_classnames": true, + "keep_fnames": true } diff --git a/crates/swc_ecma_minifier/tests/fixture/next/exceljs/input.js b/crates/swc_ecma_minifier/tests/fixture/next/exceljs/input.js new file mode 100644 index 000000000000..31df8a9a4fd0 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/next/exceljs/input.js @@ -0,0 +1,138 @@ +! function (t) { + if (true) module.exports = t(); + else { } +}((function () { + return function t(e, r, n) { + function i(a, s) { + if (!r[a]) { + if (!e[a]) { + var u = undefined; + if (!s && u) return require(a, !0); + if (o) return o(a, !0); + var c = new Error("Cannot find module '" + a + "'"); + throw c.code = "MODULE_NOT_FOUND", c + } + var f = r[a] = { + exports: {} + }; + e[a][0].call(f.exports, (function (t) { + return i(e[a][1][t] || t) + }), f, f.exports, t, e, r, n) + } + return r[a].exports + } + for (var o = undefined, a = 0; a < n.length; a++) i(n[a]); + return i + }({ + 40: [function (t, e, r) { + "use strict"; + + function n(t) { + return (n = "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) + } + + function i(t, e) { + for (var r = 0; r < e.length; r++) { + var n = e[r]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) + } + } + + function o(t, e) { + return (o = Object.setPrototypeOf || function (t, e) { + return t.__proto__ = e, t + })(t, e) + } + + function a(t) { + var e = function () { + if ("undefined" == typeof Reflect || !Reflect.construct) return !1; + if (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 + } + }(); + return function () { + var r, n = u(t); + if (e) { + var i = u(this).constructor; + r = Reflect.construct(n, arguments, i) + } else r = n.apply(this, arguments); + return s(this, r) + } + } + + function s(t, e) { + return !e || "object" !== n(e) && "function" != typeof e ? function (t) { + if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return t + }(t) : e + } + + function u(t) { + return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) { + return t.__proto__ || Object.getPrototypeOf(t) + })(t) + } + var c = function (t) { + ! function (t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: !0, + configurable: !0 + } + }), e && o(t, e) + }(u, t); + var e, r, n, s = a(u); + + function u(t) { + var e; + return function (t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") + }(this, u), (e = s.call(this))._model = t, e + } + return e = u, (r = [{ + key: "render", + value: function (t, e, r) { + (e === r[2] || "x:SizeWithCells" === this.tag && e === r[1]) && t.leafNode(this.tag) + } + }, { + key: "parseOpen", + value: function (t) { + switch (t.name) { + case this.tag: + return this.model = {}, this.model[this.tag] = !0, !0; + default: + return !1 + } + } + }, { + key: "parseText", + value: function () { } + }, { + key: "parseClose", + value: function () { + return !1 + } + }, { + key: "tag", + get: function () { + return this._model && this._model.tag + } + }]) && i(e.prototype, r), n && i(e, n), u + }(t("../../base-xform")); + e.exports = c + }, { + "../../base-xform": 31 + }] + }, {}, [15])(15) +})); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/exceljs/mangle.json b/crates/swc_ecma_minifier/tests/fixture/next/exceljs/mangle.json new file mode 100644 index 000000000000..70700ba85317 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/next/exceljs/mangle.json @@ -0,0 +1,5 @@ +{ + "toplevel": true, + "keep_classnames": true, + "keep_fnames": true +} diff --git a/crates/swc_ecma_minifier/tests/fixture/next/exceljs/output.js b/crates/swc_ecma_minifier/tests/fixture/next/exceljs/output.js new file mode 100644 index 000000000000..9b06b6ff28b3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/next/exceljs/output.js @@ -0,0 +1,122 @@ +module.exports = (function t(e, r, c) { + function i(a, l) { + if (!r[a]) { + if (!e[a]) { + if (f) return f(a, !0); + var s = Error("Cannot find module '" + a + "'"); + throw s.code = "MODULE_NOT_FOUND", s; + } + var p = r[a] = { + exports: {} + }; + e[a][0].call(p.exports, function(r) { + return i(e[a][1][r] || r); + }, p, p.exports, t, e, r, c); + } + return r[a].exports; + } + for(var f = void 0, a = 0; a < c.length; a++)i(c[a]); + return i; +})({ + 40: [ + function(e, r, c) { + "use strict"; + function n(e) { + return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { + return typeof e; + } : function(e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; + })(e); + } + function i(e, r) { + for(var c = 0; c < r.length; c++){ + var f = r[c]; + f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(e, f.key, f); + } + } + function o(e, r) { + return (o = Object.setPrototypeOf || function(e, r) { + return e.__proto__ = r, e; + })(e, r); + } + function u(e) { + return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { + return e.__proto__ || Object.getPrototypeOf(e); + })(e); + } + var f = function(e) { + !function(e, r) { + if ("function" != typeof r && null !== r) throw TypeError("Super expression must either be null or a function"); + e.prototype = Object.create(r && r.prototype, { + constructor: { + value: e, + writable: !0, + configurable: !0 + } + }), r && o(e, r); + }(u, e); + var r, c, f, a, l = (r = u, c = 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 (e) { + return !1; + } + }(), function() { + var e, f, a = u(r); + if (c) { + var l = u(this).constructor; + f = Reflect.construct(a, arguments, l); + } else f = a.apply(this, arguments); + return (e = f) && ("object" === n(e) || "function" == typeof e) ? e : function(e) { + if (void 0 === e) throw ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; + }(this); + }); + function u(e) { + var r; + return function(e, r) { + if (!(e instanceof r)) throw TypeError("Cannot call a class as a function"); + }(this, u), (r = l.call(this))._model = e, r; + } + return i((f = u).prototype, [ + { + key: "render", + value: function(e, r, c) { + (r === c[2] || "x:SizeWithCells" === this.tag && r === c[1]) && e.leafNode(this.tag); + } + }, + { + key: "parseOpen", + value: function(e) { + return e.name === this.tag && (this.model = {}, this.model[this.tag] = !0, !0); + } + }, + { + key: "parseText", + value: function() {} + }, + { + key: "parseClose", + value: function() { + return !1; + } + }, + { + key: "tag", + get: function() { + return this._model && this._model.tag; + } + } + ]), a && i(f, a), u; + }(e("../../base-xform")); + r.exports = f; + }, + { + "../../base-xform": 31 + } + ] +}, {}, [ + 15 +])(15); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js b/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js index eaac898bd3cf..3ebb56db2d6b 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/feedback-3/579-dcac359116b2707c/output.js @@ -1274,8 +1274,8 @@ }); var t = o(575), e = o.n(t), r = o(205), i = o.n(r), a = o(585), p = o.n(a), c = o(754), u = o.n(c), f = o(729), y = o.n(f), l = o(129), s = o.n(l); const d = new (function(t) { - i()(n, t); - var r, o = (r = function() { + i()(a, t); + var r, o, n = (r = a, o = function() { if ("undefined" == typeof Reflect || !Reflect.construct || Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { @@ -1284,18 +1284,18 @@ return !1; } }(), function() { - var t, e = u()(n); - if (r) { - var o = u()(this).constructor; - t = Reflect.construct(e, arguments, o); + var t, e = u()(r); + if (o) { + var n = u()(this).constructor; + t = Reflect.construct(e, arguments, n); } else t = e.apply(this, arguments); return p()(this, t); }); - function n() { + function a() { var t; - return e()(this, n), (t = o.call(this)).ready = !1, console.log(s()), t; + return e()(this, a), (t = n.call(this)).ready = !1, console.log(s()), t; } - return n; + return a; }(y())); })(), n; })(); @@ -1319,7 +1319,7 @@ 256: function(t, e, r) { "use strict"; var o = r(500), n = r(139), i = n(o("String.prototype.indexOf")); - t.exports = function(t, e) { + t.exports = function t(t, e) { var r = o(t, !!e); return "function" == typeof r && i(t, ".prototype.") > -1 ? n(r) : r; }; @@ -1334,7 +1334,7 @@ } catch (t) { u = null; } - t.exports = function(t) { + t.exports = function t(t) { var e = p(o, a, arguments); return c && u && c(e, "length").configurable && u(e, "length", { value: 1 + f(0, t.length - (arguments.length - 1)) @@ -1349,7 +1349,7 @@ }, 144: function(t) { var e = Object.prototype.hasOwnProperty, r = Object.prototype.toString; - t.exports = function(t, o, n) { + t.exports = function t(t, o, n) { if ("[object Function]" !== r.call(o)) throw TypeError("iterator must be a function"); var i = t.length; if (i === +i) for(var a = 0; a < i; a++)o.call(n, t[a], a, t); @@ -1359,7 +1359,7 @@ 426: function(t) { "use strict"; var e = Array.prototype.slice, r = Object.prototype.toString; - t.exports = function(t) { + t.exports = function t(t) { var o, n = this; if ("function" != typeof n || "[object Function]" !== r.call(n)) throw TypeError("Function.prototype.bind called on incompatible " + n); for(var i = e.call(arguments, 1), a = Math.max(0, n.length - i.length), p = [], c = 0; c < a; c++)p.push("$" + c); @@ -1718,7 +1718,7 @@ } throw new n("intrinsic " + t + " does not exist!"); }; - t.exports = function(t, e) { + t.exports = function t(t, e) { if ("string" != typeof t || 0 === t.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof e) throw new a('"allowMissing" argument must be a boolean'); if (null === P(/^%?[^%]*%?$/g, t)) throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); @@ -1749,13 +1749,13 @@ 942: function(t, e, r) { "use strict"; var o = "undefined" != typeof Symbol && Symbol, n = r(773); - t.exports = function() { + t.exports = function t() { return "function" == typeof o && "function" == typeof Symbol && "symbol" == typeof o("foo") && "symbol" == typeof Symbol("bar") && n(); }; }, 773: function(t) { "use strict"; - t.exports = function() { + t.exports = function t() { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var t = {}, e = Symbol("test"), r = Object(e); @@ -1774,13 +1774,13 @@ 115: function(t, e, r) { "use strict"; var o = "undefined" != typeof Symbol && Symbol, n = r(832); - t.exports = function() { + t.exports = function t() { return "function" == typeof o && "function" == typeof Symbol && "symbol" == typeof o("foo") && "symbol" == typeof Symbol("bar") && n(); }; }, 832: function(t) { "use strict"; - t.exports = function() { + t.exports = function t() { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var t = {}, e = Symbol("test"), r = Object(e); @@ -1802,7 +1802,7 @@ t.exports = o.call(Function.call, Object.prototype.hasOwnProperty); }, 782: function(t) { - "function" == typeof Object.create ? t.exports = function(t, e) { + "function" == typeof Object.create ? t.exports = function t(t, e) { e && (t.super_ = e, t.prototype = Object.create(e.prototype, { constructor: { value: t, @@ -1811,7 +1811,7 @@ configurable: !0 } })); - } : t.exports = function(t, e) { + } : t.exports = function t(t, e) { if (e) { t.super_ = e; var r = function() {}; @@ -1838,13 +1838,13 @@ return Function("return function*() {}")(); } catch (t) {} }(), p = a ? i(a) : {}; - t.exports = function(t) { + t.exports = function t(t) { return "function" == typeof t && (!!o.test(r.call(t)) || (n ? i(t) === p : "[object GeneratorFunction]" === e.call(t))); }; }, 994: function(t, e, o) { "use strict"; - var n = o(144), i = o(349), a = o(256), p = a("Object.prototype.toString"), c = o(942)() && "symbol" == typeof Symbol.toStringTag, u = i(), f = a("Array.prototype.indexOf", !0) || function(t, e) { + var n = o(144), i = o(349), a = o(256), p = a("Object.prototype.toString"), c = o(942)() && "symbol" == typeof Symbol.toStringTag, u = i(), f = a("Array.prototype.indexOf", !0) || function t(t, e) { for(var r = 0; r < t.length; r += 1)if (t[r] === e) return r; return -1; }, y = a("String.prototype.slice"), l = {}, s = o(466), d = Object.getPrototypeOf; @@ -1862,12 +1862,12 @@ } catch (t) {} }), e; }; - t.exports = function(t) { + t.exports = function t(t) { return !!t && "object" == typeof t && (c ? !!s && b(t) : f(u, y(p(t), 8, -1)) > -1); }; }, 369: function(t) { - t.exports = function(t) { + t.exports = function t(t) { return t instanceof o; }; }, @@ -1997,7 +1997,7 @@ }); }, 177: function(t, e, r) { - var o = Object.getOwnPropertyDescriptors || function(t) { + var o = Object.getOwnPropertyDescriptors || function t(t) { for(var e = Object.keys(t), r = {}, o = 0; o < e.length; o++)r[e[o]] = Object.getOwnPropertyDescriptor(t, e[o]); return r; }, i = /%[sdj%]/g; @@ -2280,7 +2280,7 @@ } return e(t); } - e.promisify = function(t) { + e.promisify = function t(t) { if ("function" != typeof t) throw TypeError('The "original" argument must be of type Function'); if (k && t[k]) { var e = t[k]; @@ -2350,14 +2350,14 @@ } catch (t) {} }), e; }, b = o(994); - t.exports = function(t) { + t.exports = function t(t) { return !!b(t) && (c ? d(t) : f(p(t), 8, -1)); }; }, 349: function(t, e, o) { "use strict"; var n = o(992); - t.exports = function() { + t.exports = function t() { return n([ "BigInt64Array", "BigUint64Array", diff --git a/crates/swc_ecma_minifier/tests/fixture/next/feedback-util-promisify/chunks/pages/_app-72ad41192608e93a/output.js b/crates/swc_ecma_minifier/tests/fixture/next/feedback-util-promisify/chunks/pages/_app-72ad41192608e93a/output.js index 39a6ee5a6fb6..ebef6cf0bfbe 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/feedback-util-promisify/chunks/pages/_app-72ad41192608e93a/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/feedback-util-promisify/chunks/pages/_app-72ad41192608e93a/output.js @@ -31,7 +31,7 @@ } __webpack_require__(6774); var initBranch = (fn = _Users_kdy1_projects_lab_swc_minify_issue_node_modules_next_dist_compiled_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().mark(function _callee() { - return _Users_kdy1_projects_lab_swc_minify_issue_node_modules_next_dist_compiled_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap(function(_ctx) { + return _Users_kdy1_projects_lab_swc_minify_issue_node_modules_next_dist_compiled_regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default().wrap(function _callee$(_ctx) { for(;;)switch(_ctx.prev = _ctx.next){ case 0: try { @@ -71,7 +71,7 @@ } _next(void 0); }); - }, function() { + }, function initBranch() { return _ref.apply(this, arguments); }); __webpack_exports__.default = function(param) { @@ -378,9 +378,9 @@ return allocUnsafe(e); }, Buffer.allocUnsafeSlow = function(e) { return allocUnsafe(e); - }, Buffer.isBuffer = function(e) { + }, Buffer.isBuffer = function isBuffer(e) { return null != e && !0 === e._isBuffer && e !== Buffer.prototype; - }, Buffer.compare = function(e, r) { + }, Buffer.compare = function compare(e, r) { if (isInstance(e, Uint8Array) && (e = Buffer.from(e, e.offset, e.byteLength)), isInstance(r, Uint8Array) && (r = Buffer.from(r, r.offset, r.byteLength)), !Buffer.isBuffer(e) || !Buffer.isBuffer(r)) throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); if (e === r) return 0; for(var t = e.length, f = r.length, n = 0, i = Math.min(t, f); n < i; ++n)if (e[n] !== r[n]) { @@ -388,7 +388,7 @@ break; } return t < f ? -1 : f < t ? 1 : 0; - }, Buffer.isEncoding = function(e) { + }, Buffer.isEncoding = function isEncoding(e) { switch(String(e).toLowerCase()){ case "hex": case "utf8": @@ -405,7 +405,7 @@ default: return !1; } - }, Buffer.concat = function(e, r) { + }, Buffer.concat = function concat(e, r) { if (!Array.isArray(e)) throw TypeError('"list" argument must be an Array of Buffers'); if (0 === e.length) return Buffer.alloc(0); if (void 0 === r) for(t = 0, r = 0; t < e.length; ++t)r += e[t].length; @@ -416,31 +416,31 @@ i.copy(f, n), n += i.length; } return f; - }, Buffer.byteLength = byteLength, Buffer.prototype._isBuffer = !0, Buffer.prototype.swap16 = function() { + }, Buffer.byteLength = byteLength, Buffer.prototype._isBuffer = !0, Buffer.prototype.swap16 = function swap16() { var e = this.length; if (e % 2 != 0) throw RangeError("Buffer size must be a multiple of 16-bits"); for(var r = 0; r < e; r += 2)swap(this, r, r + 1); return this; - }, Buffer.prototype.swap32 = function() { + }, Buffer.prototype.swap32 = function swap32() { var e = this.length; if (e % 4 != 0) throw RangeError("Buffer size must be a multiple of 32-bits"); for(var r = 0; r < e; r += 4)swap(this, r, r + 3), swap(this, r + 1, r + 2); return this; - }, Buffer.prototype.swap64 = function() { + }, Buffer.prototype.swap64 = function swap64() { var e = this.length; if (e % 8 != 0) throw RangeError("Buffer size must be a multiple of 64-bits"); for(var r = 0; r < e; r += 8)swap(this, r, r + 7), swap(this, r + 1, r + 6), swap(this, r + 2, r + 5), swap(this, r + 3, r + 4); return this; - }, Buffer.prototype.toString = function() { + }, Buffer.prototype.toString = function toString() { var e = this.length; return 0 === e ? "" : 0 == arguments.length ? utf8Slice(this, 0, e) : slowToString.apply(this, arguments); - }, Buffer.prototype.toLocaleString = Buffer.prototype.toString, Buffer.prototype.equals = function(e) { + }, Buffer.prototype.toLocaleString = Buffer.prototype.toString, Buffer.prototype.equals = function equals(e) { if (!Buffer.isBuffer(e)) throw TypeError("Argument must be a Buffer"); return this === e || 0 === Buffer.compare(this, e); - }, Buffer.prototype.inspect = function() { + }, Buffer.prototype.inspect = function inspect() { var e = "", t = r.INSPECT_MAX_BYTES; return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), ""; - }, i && (Buffer.prototype[i] = Buffer.prototype.inspect), Buffer.prototype.compare = function(e, r, t, f, n) { + }, i && (Buffer.prototype[i] = Buffer.prototype.inspect), Buffer.prototype.compare = function compare(e, r, t, f, n) { if (isInstance(e, Uint8Array) && (e = Buffer.from(e, e.offset, e.byteLength)), !Buffer.isBuffer(e)) throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); if (void 0 === r && (r = 0), void 0 === t && (t = e ? e.length : 0), void 0 === f && (f = 0), void 0 === n && (n = this.length), r < 0 || t > e.length || f < 0 || n > this.length) throw RangeError("out of range index"); if (f >= n && r >= t) return 0; @@ -452,13 +452,13 @@ break; } return i < o ? -1 : o < i ? 1 : 0; - }, Buffer.prototype.includes = function(e, r, t) { + }, Buffer.prototype.includes = function includes(e, r, t) { return -1 !== this.indexOf(e, r, t); - }, Buffer.prototype.indexOf = function(e, r, t) { + }, Buffer.prototype.indexOf = function indexOf(e, r, t) { return bidirectionalIndexOf(this, e, r, t, !0); - }, Buffer.prototype.lastIndexOf = function(e, r, t) { + }, Buffer.prototype.lastIndexOf = function lastIndexOf(e, r, t) { return bidirectionalIndexOf(this, e, r, t, !1); - }, Buffer.prototype.write = function(e, r, t, f) { + }, Buffer.prototype.write = function write(e, r, t, f) { if (void 0 === r) f = "utf8", t = this.length, r = 0; else if (void 0 === t && "string" == typeof r) f = r, t = this.length, r = 0; else if (isFinite(r)) r >>>= 0, isFinite(t) ? (t >>>= 0, void 0 === f && (f = "utf8")) : (f = t, t = void 0); @@ -503,65 +503,65 @@ if (i) throw TypeError("Unknown encoding: " + f); f = ("" + f).toLowerCase(), i = !0; } - }, Buffer.prototype.toJSON = function() { + }, Buffer.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; - }, Buffer.prototype.slice = function(e, r) { + }, Buffer.prototype.slice = function slice(e, r) { var t = this.length; e = ~~e, r = void 0 === r ? t : ~~r, e < 0 ? (e += t) < 0 && (e = 0) : e > t && (e = t), r < 0 ? (r += t) < 0 && (r = 0) : r > t && (r = t), r < e && (r = e); var f = this.subarray(e, r); return Object.setPrototypeOf(f, Buffer.prototype), f; - }, Buffer.prototype.readUIntLE = function(e, r, t) { + }, Buffer.prototype.readUIntLE = function readUIntLE(e, r, t) { e >>>= 0, r >>>= 0, t || checkOffset(e, r, this.length); for(var f = this[e], n = 1, i = 0; ++i < r && (n *= 256);)f += this[e + i] * n; return f; - }, Buffer.prototype.readUIntBE = function(e, r, t) { + }, Buffer.prototype.readUIntBE = function readUIntBE(e, r, t) { e >>>= 0, r >>>= 0, t || checkOffset(e, r, this.length); for(var f = this[e + --r], n = 1; r > 0 && (n *= 256);)f += this[e + --r] * n; return f; - }, Buffer.prototype.readUInt8 = function(e, r) { + }, Buffer.prototype.readUInt8 = function readUInt8(e, r) { return e >>>= 0, r || checkOffset(e, 1, this.length), this[e]; - }, Buffer.prototype.readUInt16LE = function(e, r) { + }, Buffer.prototype.readUInt16LE = function readUInt16LE(e, r) { return e >>>= 0, r || checkOffset(e, 2, this.length), this[e] | this[e + 1] << 8; - }, Buffer.prototype.readUInt16BE = function(e, r) { + }, Buffer.prototype.readUInt16BE = function readUInt16BE(e, r) { return e >>>= 0, r || checkOffset(e, 2, this.length), this[e] << 8 | this[e + 1]; - }, Buffer.prototype.readUInt32LE = function(e, r) { + }, Buffer.prototype.readUInt32LE = function readUInt32LE(e, r) { return e >>>= 0, r || checkOffset(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]; - }, Buffer.prototype.readUInt32BE = function(e, r) { + }, Buffer.prototype.readUInt32BE = function readUInt32BE(e, r) { return e >>>= 0, r || checkOffset(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]); - }, Buffer.prototype.readIntLE = function(e, r, t) { + }, Buffer.prototype.readIntLE = function readIntLE(e, r, t) { e >>>= 0, r >>>= 0, t || checkOffset(e, r, this.length); for(var f = this[e], n = 1, i = 0; ++i < r && (n *= 256);)f += this[e + i] * n; return f >= (n *= 128) && (f -= Math.pow(2, 8 * r)), f; - }, Buffer.prototype.readIntBE = function(e, r, t) { + }, Buffer.prototype.readIntBE = function readIntBE(e, r, t) { e >>>= 0, r >>>= 0, t || checkOffset(e, r, this.length); for(var f = r, n = 1, i = this[e + --f]; f > 0 && (n *= 256);)i += this[e + --f] * n; return i >= (n *= 128) && (i -= Math.pow(2, 8 * r)), i; - }, Buffer.prototype.readInt8 = function(e, r) { + }, Buffer.prototype.readInt8 = function readInt8(e, r) { return (e >>>= 0, r || checkOffset(e, 1, this.length), 128 & this[e]) ? -((255 - this[e] + 1) * 1) : this[e]; - }, Buffer.prototype.readInt16LE = function(e, r) { + }, Buffer.prototype.readInt16LE = function readInt16LE(e, r) { e >>>= 0, r || checkOffset(e, 2, this.length); var t = this[e] | this[e + 1] << 8; return 32768 & t ? 4294901760 | t : t; - }, Buffer.prototype.readInt16BE = function(e, r) { + }, Buffer.prototype.readInt16BE = function readInt16BE(e, r) { e >>>= 0, r || checkOffset(e, 2, this.length); var t = this[e + 1] | this[e] << 8; return 32768 & t ? 4294901760 | t : t; - }, Buffer.prototype.readInt32LE = function(e, r) { + }, Buffer.prototype.readInt32LE = function readInt32LE(e, r) { return e >>>= 0, r || checkOffset(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24; - }, Buffer.prototype.readInt32BE = function(e, r) { + }, Buffer.prototype.readInt32BE = function readInt32BE(e, r) { return e >>>= 0, r || checkOffset(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]; - }, Buffer.prototype.readFloatLE = function(e, r) { + }, Buffer.prototype.readFloatLE = function readFloatLE(e, r) { return e >>>= 0, r || checkOffset(e, 4, this.length), n.read(this, e, !0, 23, 4); - }, Buffer.prototype.readFloatBE = function(e, r) { + }, Buffer.prototype.readFloatBE = function readFloatBE(e, r) { return e >>>= 0, r || checkOffset(e, 4, this.length), n.read(this, e, !1, 23, 4); - }, Buffer.prototype.readDoubleLE = function(e, r) { + }, Buffer.prototype.readDoubleLE = function readDoubleLE(e, r) { return e >>>= 0, r || checkOffset(e, 8, this.length), n.read(this, e, !0, 52, 8); - }, Buffer.prototype.readDoubleBE = function(e, r) { + }, Buffer.prototype.readDoubleBE = function readDoubleBE(e, r) { return e >>>= 0, r || checkOffset(e, 8, this.length), n.read(this, e, !1, 52, 8); - }, Buffer.prototype.writeUIntLE = function(e, r, t, f) { + }, Buffer.prototype.writeUIntLE = function writeUIntLE(e, r, t, f) { if (e = +e, r >>>= 0, t >>>= 0, !f) { var n = Math.pow(2, 8 * t) - 1; checkInt(this, e, r, t, n, 0); @@ -569,7 +569,7 @@ var i = 1, o = 0; for(this[r] = 255 & e; ++o < t && (i *= 256);)this[r + o] = e / i & 255; return r + t; - }, Buffer.prototype.writeUIntBE = function(e, r, t, f) { + }, Buffer.prototype.writeUIntBE = function writeUIntBE(e, r, t, f) { if (e = +e, r >>>= 0, t >>>= 0, !f) { var n = Math.pow(2, 8 * t) - 1; checkInt(this, e, r, t, n, 0); @@ -577,17 +577,17 @@ var i = t - 1, o = 1; for(this[r + i] = 255 & e; --i >= 0 && (o *= 256);)this[r + i] = e / o & 255; return r + t; - }, Buffer.prototype.writeUInt8 = function(e, r, t) { + }, Buffer.prototype.writeUInt8 = function writeUInt8(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 1, 255, 0), this[r] = 255 & e, r + 1; - }, Buffer.prototype.writeUInt16LE = function(e, r, t) { + }, Buffer.prototype.writeUInt16LE = function writeUInt16LE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 2, 65535, 0), this[r] = 255 & e, this[r + 1] = e >>> 8, r + 2; - }, Buffer.prototype.writeUInt16BE = function(e, r, t) { + }, Buffer.prototype.writeUInt16BE = function writeUInt16BE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 2, 65535, 0), this[r] = e >>> 8, this[r + 1] = 255 & e, r + 2; - }, Buffer.prototype.writeUInt32LE = function(e, r, t) { + }, Buffer.prototype.writeUInt32LE = function writeUInt32LE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 4, 4294967295, 0), this[r + 3] = e >>> 24, this[r + 2] = e >>> 16, this[r + 1] = e >>> 8, this[r] = 255 & e, r + 4; - }, Buffer.prototype.writeUInt32BE = function(e, r, t) { + }, Buffer.prototype.writeUInt32BE = function writeUInt32BE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 4, 4294967295, 0), this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = 255 & e, r + 4; - }, Buffer.prototype.writeIntLE = function(e, r, t, f) { + }, Buffer.prototype.writeIntLE = function writeIntLE(e, r, t, f) { if (e = +e, r >>>= 0, !f) { var n = Math.pow(2, 8 * t - 1); checkInt(this, e, r, t, n - 1, -n); @@ -595,7 +595,7 @@ var i = 0, o = 1, u = 0; for(this[r] = 255 & e; ++i < t && (o *= 256);)e < 0 && 0 === u && 0 !== this[r + i - 1] && (u = 1), this[r + i] = (e / o >> 0) - u & 255; return r + t; - }, Buffer.prototype.writeIntBE = function(e, r, t, f) { + }, Buffer.prototype.writeIntBE = function writeIntBE(e, r, t, f) { if (e = +e, r >>>= 0, !f) { var n = Math.pow(2, 8 * t - 1); checkInt(this, e, r, t, n - 1, -n); @@ -603,25 +603,25 @@ var i = t - 1, o = 1, u = 0; for(this[r + i] = 255 & e; --i >= 0 && (o *= 256);)e < 0 && 0 === u && 0 !== this[r + i + 1] && (u = 1), this[r + i] = (e / o >> 0) - u & 255; return r + t; - }, Buffer.prototype.writeInt8 = function(e, r, t) { + }, Buffer.prototype.writeInt8 = function writeInt8(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[r] = 255 & e, r + 1; - }, Buffer.prototype.writeInt16LE = function(e, r, t) { + }, Buffer.prototype.writeInt16LE = function writeInt16LE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 2, 32767, -32768), this[r] = 255 & e, this[r + 1] = e >>> 8, r + 2; - }, Buffer.prototype.writeInt16BE = function(e, r, t) { + }, Buffer.prototype.writeInt16BE = function writeInt16BE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 2, 32767, -32768), this[r] = e >>> 8, this[r + 1] = 255 & e, r + 2; - }, Buffer.prototype.writeInt32LE = function(e, r, t) { + }, Buffer.prototype.writeInt32LE = function writeInt32LE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 4, 2147483647, -2147483648), this[r] = 255 & e, this[r + 1] = e >>> 8, this[r + 2] = e >>> 16, this[r + 3] = e >>> 24, r + 4; - }, Buffer.prototype.writeInt32BE = function(e, r, t) { + }, Buffer.prototype.writeInt32BE = function writeInt32BE(e, r, t) { return e = +e, r >>>= 0, t || checkInt(this, e, r, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = 255 & e, r + 4; - }, Buffer.prototype.writeFloatLE = function(e, r, t) { + }, Buffer.prototype.writeFloatLE = function writeFloatLE(e, r, t) { return writeFloat(this, e, r, !0, t); - }, Buffer.prototype.writeFloatBE = function(e, r, t) { + }, Buffer.prototype.writeFloatBE = function writeFloatBE(e, r, t) { return writeFloat(this, e, r, !1, t); - }, Buffer.prototype.writeDoubleLE = function(e, r, t) { + }, Buffer.prototype.writeDoubleLE = function writeDoubleLE(e, r, t) { return writeDouble(this, e, r, !0, t); - }, Buffer.prototype.writeDoubleBE = function(e, r, t) { + }, Buffer.prototype.writeDoubleBE = function writeDoubleBE(e, r, t) { return writeDouble(this, e, r, !1, t); - }, Buffer.prototype.copy = function(e, r, t, f) { + }, Buffer.prototype.copy = function copy(e, r, t, f) { if (!Buffer.isBuffer(e)) throw TypeError("argument should be a Buffer"); if (t || (t = 0), f || 0 === f || (f = this.length), r >= e.length && (r = e.length), r || (r = 0), f > 0 && f < t && (f = t), f === t || 0 === e.length || 0 === this.length) return 0; if (r < 0) throw RangeError("targetStart out of bounds"); @@ -633,7 +633,7 @@ else if (this === e && t < r && r < f) for(var i = n - 1; i >= 0; --i)e[i + r] = this[i + t]; else Uint8Array.prototype.set.call(e, this.subarray(t, f), r); return n; - }, Buffer.prototype.fill = function(e, r, t, f) { + }, Buffer.prototype.fill = function fill(e, r, t, f) { if ("string" == typeof e) { if ("string" == typeof r ? (f = r, r = 0, t = this.length) : "string" == typeof t && (f = t, t = this.length), void 0 !== f && "string" != typeof f) throw TypeError("encoding must be a string"); if ("string" == typeof f && !Buffer.isEncoding(f)) throw TypeError("Unknown encoding: " + f); @@ -871,7 +871,7 @@ 749: function(r, t, e) { "use strict"; var o = e(91), n = e(112), i = n(o("String.prototype.indexOf")); - r.exports = function(r, t) { + r.exports = function callBoundIntrinsic(r, t) { var e = o(r, !!t); return "function" == typeof e && i(r, ".prototype.") > -1 ? n(e) : e; }; @@ -886,7 +886,7 @@ } catch (r) { f = null; } - r.exports = function(r) { + r.exports = function callBind(r) { var t = y(o, a, arguments); return p && f && p(t, "length").configurable && f(t, "length", { value: 1 + u(0, r.length - (arguments.length - 1)) @@ -1225,7 +1225,7 @@ } throw new n("intrinsic " + r + " does not exist!"); }; - r.exports = function(r, t) { + r.exports = function GetIntrinsic(r, t) { if ("string" != typeof r || 0 === r.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var e = E(r), i = e.length > 0 ? e[0] : "", p = j("%" + i + "%", t), f = p.name, u = p.value, s = !1, c = p.alias; @@ -1254,7 +1254,7 @@ }, 219: function(r) { var t = Object.prototype.hasOwnProperty, e = Object.prototype.toString; - r.exports = function(r, o, n) { + r.exports = function forEach(r, o, n) { if ("[object Function]" !== e.call(o)) throw TypeError("iterator must be a function"); var i = r.length; if (i === +i) for(var a = 0; a < i; a++)o.call(n, r[a], a, r); @@ -1264,7 +1264,7 @@ 733: function(r) { "use strict"; var e = Array.prototype.slice, o = Object.prototype.toString; - r.exports = function(r) { + r.exports = function bind(r) { var y, i = this; if ("function" != typeof i || "[object Function]" !== o.call(i)) throw TypeError("Function.prototype.bind called on incompatible " + i); for(var a = e.call(arguments, 1), p = Math.max(0, i.length - a.length), f = [], u = 0; u < p; u++)f.push("$" + u); @@ -1623,7 +1623,7 @@ } throw new n("intrinsic " + r + " does not exist!"); }; - r.exports = function(r, t) { + r.exports = function GetIntrinsic(r, t) { if ("string" != typeof r || 0 === r.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var e = w(r), i = e.length > 0 ? e[0] : "", p = E("%" + i + "%", t), f = p.name, u = p.value, s = !1, c = p.alias; @@ -1653,13 +1653,13 @@ 449: function(r, t, e) { "use strict"; var o = __webpack_require__.g.Symbol, n = e(545); - r.exports = function() { + r.exports = function hasNativeSymbols() { return "function" == typeof o && "function" == typeof Symbol && "symbol" == typeof o("foo") && "symbol" == typeof Symbol("bar") && n(); }; }, 545: function(r) { "use strict"; - r.exports = function() { + r.exports = function hasSymbols() { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var r = {}, t = Symbol("test"), e = Object(t); @@ -1681,7 +1681,7 @@ r.exports = o.call(Function.call, Object.prototype.hasOwnProperty); }, 526: function(r) { - "function" == typeof Object.create ? r.exports = function(r, t) { + "function" == typeof Object.create ? r.exports = function inherits(r, t) { t && (r.super_ = t, r.prototype = Object.create(t.prototype, { constructor: { value: r, @@ -1690,7 +1690,7 @@ configurable: !0 } })); - } : r.exports = function(r, t) { + } : r.exports = function inherits(r, t) { if (t) { r.super_ = t; var TempCtor = function() {}; @@ -1717,13 +1717,13 @@ return Function("return function*() {}")(); } catch (r) {} }(), y = a ? i(a) : {}; - r.exports = function(r) { + r.exports = function isGeneratorFunction(r) { return "function" == typeof r && (!!o.test(e.call(r)) || (n ? i(r) === y : "[object GeneratorFunction]" === t.call(r))); }; }, 234: function(r, t, e) { "use strict"; - var o = e(219), n = e(627), i = e(749), a = i("Object.prototype.toString"), p = e(449)() && "symbol" == typeof Symbol.toStringTag, f = n(), u = i("Array.prototype.indexOf", !0) || function(r, t) { + var o = e(219), n = e(627), i = e(749), a = i("Object.prototype.toString"), p = e(449)() && "symbol" == typeof Symbol.toStringTag, f = n(), u = i("Array.prototype.indexOf", !0) || function indexOf(r, t) { for(var e = 0; e < r.length; e += 1)if (r[e] === t) return e; return -1; }, s = i("String.prototype.slice"), c = {}, l = e(982), d = Object.getPrototypeOf; @@ -1741,7 +1741,7 @@ } catch (r) {} }), t; }; - r.exports = function(r) { + r.exports = function isTypedArray(r) { return !!r && "object" == typeof r && (p ? !!l && g(r) : u(f, s(a(r), 8, -1)) > -1); }; }, @@ -1756,7 +1756,7 @@ r.exports = n; }, 536: function(r) { - r.exports = function(r) { + r.exports = function isBuffer(r) { return r instanceof Buffer; }; }, @@ -1886,7 +1886,7 @@ }); }, 650: function(r, t, e) { - var o = Object.getOwnPropertyDescriptors || function(r) { + var o = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(r) { for(var t = Object.keys(r), e = {}, o = 0; o < t.length; o++)e[t[o]] = Object.getOwnPropertyDescriptor(r, t[o]); return e; }, n = /%[sdj%]/g; @@ -2169,7 +2169,7 @@ } return t(r); } - t.promisify = function(r) { + t.promisify = function promisify(r) { if ("function" != typeof r) throw TypeError('The "original" argument must be of type Function'); if (f && r[f]) { var t = r[f]; @@ -2239,7 +2239,7 @@ } catch (r) {} }), t; }, g = e(234); - r.exports = function(r) { + r.exports = function whichTypedArray(r) { return !!g(r) && (p ? d(r) : u(a(r), 8, -1)); }; }, @@ -2566,7 +2566,7 @@ } throw new n("intrinsic " + r + " does not exist!"); }; - r.exports = function(r, t) { + r.exports = function GetIntrinsic(r, t) { if ("string" != typeof r || 0 === r.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var e = w(r), o = e.length > 0 ? e[0] : "", n = E("%" + o + "%", t), i = n.name, p = n.value, f = !1, u = n.alias; @@ -2602,7 +2602,7 @@ 627: function(r, t, e) { "use strict"; var o = e(901); - r.exports = function() { + r.exports = function availableTypedArrays() { return o([ "BigInt64Array", "BigUint64Array", diff --git a/crates/swc_ecma_minifier/tests/fixture/next/react-ace/chunks/8a28b14e.d8fbda268ed281a1/output.js b/crates/swc_ecma_minifier/tests/fixture/next/react-ace/chunks/8a28b14e.d8fbda268ed281a1/output.js index f2a51dcf015b..b223097f41e4 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/react-ace/chunks/8a28b14e.d8fbda268ed281a1/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/react-ace/chunks/8a28b14e.d8fbda268ed281a1/output.js @@ -6603,7 +6603,7 @@ key: key, hashId: hashId }; - }, this.findKeyCommand = function(hashId, keyString) { + }, this.findKeyCommand = function findKeyCommand(hashId, keyString) { var key = KEY_MODS[hashId] + keyString; return this.commandKeyBinding[key]; }, this.handleKeyboard = function(data, hashId, keyString, keyCode) { diff --git a/crates/swc_ecma_minifier/tests/fixture/next/react-pdf-renderer/output.js b/crates/swc_ecma_minifier/tests/fixture/next/react-pdf-renderer/output.js index bf96d86d65e4..92e52d7b8cf3 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/react-pdf-renderer/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/react-pdf-renderer/output.js @@ -100,7 +100,7 @@ var n = r(8).default; function i() { "use strict"; - e.exports = i = function() { + e.exports = i = function e() { return t; }, e.exports.__esModule = !0, e.exports.default = e.exports; var t = {}, r = Object.prototype, o = r.hasOwnProperty, a = "function" == typeof Symbol ? Symbol : {}, u = a.iterator || "@@iterator", l = a.asyncIterator || "@@asyncIterator", s = a.toStringTag || "@@toStringTag"; @@ -115,7 +115,7 @@ try { c({}, ""); } catch (e) { - c = function(e, t, r) { + c = function e(e, t, r) { return e[t] = r; }; } @@ -302,16 +302,16 @@ }; }, t.values = A, S.prototype = { constructor: S, - reset: function(e) { + reset: function e(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(x), !e) for(var t in this)"t" === t.charAt(0) && o.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = void 0); }, - stop: function() { + stop: function e() { this.done = !0; var e = this.tryEntries[0].completion; if ("throw" === e.type) throw e.arg; return this.rval; }, - dispatchException: function(e) { + dispatchException: function e(e) { if (this.done) throw e; var t = this; function r(r, n) { @@ -334,7 +334,7 @@ } } }, - abrupt: function(e, t) { + abrupt: function e(e, t) { for(var r = this.tryEntries.length - 1; r >= 0; --r){ var n = this.tryEntries[r]; if (n.tryLoc <= this.prev && o.call(n, "finallyLoc") && this.prev < n.finallyLoc) { @@ -346,17 +346,17 @@ var a = i ? i.completion : {}; return a.type = e, a.arg = t, i ? (this.method = "next", this.next = i.finallyLoc, p) : this.complete(a); }, - complete: function(e, t) { + complete: function e(e, t) { if ("throw" === e.type) throw e.arg; return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), p; }, - finish: function(e) { + finish: function e(e) { for(var t = this.tryEntries.length - 1; t >= 0; --t){ var r = this.tryEntries[t]; if (r.finallyLoc === e) return this.complete(r.completion, r.afterLoc), x(r), p; } }, - catch: function(e) { + catch: function e(e) { for(var t = this.tryEntries.length - 1; t >= 0; --t){ var r = this.tryEntries[t]; if (r.tryLoc === e) { @@ -370,7 +370,7 @@ } throw Error("illegal catch attempt"); }, - delegateYield: function(e, t, r) { + delegateYield: function e(e, t, r) { return this.delegate = { iterator: A(e), resultName: t, @@ -428,7 +428,7 @@ for(var e, t = arguments.length, r = Array(t), n = 0; n < t; n++)r[n] = arguments[n]; return e = (0, o.default)(i.default.mark(function e(t) { var n, o, u, l, s, c, f, d = arguments; - return i.default.wrap(function(e) { + return i.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: for(n = t, o = (0, a.default)(r), l = Array((u = d.length) > 1 ? u - 1 : 0), s = 1; s < u; s++)l[s - 1] = d[s]; @@ -657,7 +657,7 @@ black: 900 }, D = (n = d.default(h.default.mark(function e(t, r) { var n, o; - return h.default.wrap(function(e) { + return h.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: return e.next = 2, g.default(t, r); @@ -670,7 +670,7 @@ return e.stop(); } }, e); - })), function(e, t) { + })), function e(e, t) { return n.apply(this, arguments); }), w = function(e) { var t = e.split(",")[0], r = "data:" === t.substring(0, 5), n = "base64" === t.split(";")[1]; @@ -684,7 +684,7 @@ } return t.prototype.load = (e = d.default(h.default.mark(function e() { var t, r, n, o, a, u, l, s = this; - return h.default.wrap(function(e) { + return h.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: if (this.loading = !0, t = this.options.postscriptName, !w(this.src)) { @@ -724,14 +724,14 @@ function e(e) { this.family = e, this.sources = []; } - e.create = function(t) { + e.create = function t(t) { return new e(t); }; var t = e.prototype; - return t.register = function(e) { + return t.register = function e(e) { var t = e.src, r = e.fontWeight, n = e.fontStyle, i = y.default(e, b), o = "string" == typeof r ? m[r] : r; this.sources.push(new _(t, this.family, n, o, i)); - }, t.resolve = function(e) { + }, t.resolve = function e(e) { var t, r = e.fontWeight, n = void 0 === r ? 400 : r, i = e.fontStyle, o = void 0 === i ? "normal" : i, a = this.sources.filter(function(e) { return e.fontStyle === o; }), u = a.find(function(e) { @@ -793,7 +793,7 @@ return r[t].resolve(e); }, this.load = (e = d.default(h.default.mark(function e(r) { var n, i; - return h.default.wrap(function(e) { + return h.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: if (n = r.fontFamily, !S.includes(n)) { @@ -877,21 +877,21 @@ return !!v.includes(t); }; var m = (n = {}, i = [], { - get: function(e) { + get: function e(e) { return n[e]; }, - set: function(e, t) { + set: function e(e, t) { i.push(e), i.length > 30 && delete n[i.shift()], n[e] = t; }, - reset: function() { + reset: function e() { n = {}, i = []; }, - length: function() { + length: function e() { return i.length; } }), D = (o = p.default(h.default.mark(function e(t, r) { var n, i; - return h.default.wrap(function(e) { + return h.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: return e.next = 2, y.default(t, r); @@ -904,7 +904,7 @@ return e.stop(); } }, e); - })), function(e, t) { + })), function e(e, t) { return o.apply(this, arguments); }), w = function(e) { var t = e.toLowerCase(); @@ -951,7 +951,7 @@ return n; }, O = (a = p.default(h.default.mark(function e(t) { var r, n, i, o, a, u, l; - return h.default.wrap(function(e) { + return h.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: r = t.uri, n = t.body, i = t.headers, a = void 0 === (o = t.method) ? "GET" : o, e.next = 7; @@ -974,7 +974,7 @@ return e.stop(); } }, e); - })), function(e) { + })), function e(e) { return a.apply(this, arguments); }); t.default = function(e, t) { @@ -1024,9 +1024,9 @@ this.name = e, this.src = v.PDFFont.open(null, e); } var t = e.prototype; - return t.encode = function(e) { + return t.encode = function e(e) { return this.src.encode(e); - }, t.layout = function(e) { + }, t.layout = function e(e) { var t = this, r = this.encode(e), n = r[0], i = r[1]; return { positions: i, @@ -1038,10 +1038,10 @@ return n.advanceWidth = i[r].advanceWidth, n; }) }; - }, t.glyphForCodePoint = function(e) { + }, t.glyphForCodePoint = function e(e) { var t = this.getGlyph(e); return t.advanceWidth = 400, t; - }, t.getGlyph = function(e) { + }, t.getGlyph = function e(e) { return { id: e, _font: this.src, @@ -1051,18 +1051,18 @@ isLigature: !1, name: this.src.font.characterToGlyph(e) }; - }, t.hasGlyphForCodePoint = function(e) { + }, t.hasGlyphForCodePoint = function e(e) { return ".notdef" !== this.src.font.characterToGlyph(e); }, M.default(e, [ { key: "ascent", - get: function() { + get: function e() { return 900; } }, { key: "capHeight", - get: function() { + get: function e() { switch(this.name){ case "Times-Roman": case "Times-Bold": @@ -1081,7 +1081,7 @@ }, { key: "xHeight", - get: function() { + get: function e() { switch(this.name){ case "Times-Roman": case "Times-Bold": @@ -1100,7 +1100,7 @@ }, { key: "descent", - get: function() { + get: function e() { switch(this.name){ case "Times-Roman": case "Times-Bold": @@ -1119,13 +1119,13 @@ }, { key: "lineGap", - get: function() { + get: function e() { return 0; } }, { key: "unitsPerEm", - get: function() { + get: function e() { return 1000; } } @@ -1515,7 +1515,7 @@ return (null === (t = e.props) || void 0 === t ? void 0 : t.src) || (null === (r = e.props) || void 0 === r ? void 0 : r.source) || (null === (n = e.props) || void 0 === n ? void 0 : n.href); }, eW = (n = N.default(L.default.mark(function e(t) { var r; - return L.default.wrap(function(e) { + return L.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: if ("function" != typeof t) { @@ -1539,11 +1539,11 @@ return e.stop(); } }, e); - })), function(e) { + })), function e(e) { return n.apply(this, arguments); }), eG = (i = N.default(L.default.mark(function e(t) { var r, n, i; - return L.default.wrap(function(e) { + return L.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: if (r = ez(t), n = t.props.cache, r) { @@ -1582,7 +1582,7 @@ 17 ] ]); - })), function(e) { + })), function e(e) { return i.apply(this, arguments); }), eq = function(e, t) { for(var r = [], n = (null === (o = t.children) || void 0 === o ? void 0 : o.slice(0)) || [], i = e ? e.getEmojiSource() : null; n.length > 0;){ @@ -1594,7 +1594,7 @@ return r; }, eV = (o = N.default(L.default.mark(function e(t, r) { var n; - return L.default.wrap(function(e) { + return L.default.wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: return n = eq(r, t), e.next = 3, Promise.all(n); @@ -1605,7 +1605,7 @@ return e.stop(); } }, e); - })), function(e, t) { + })), function e(e, t) { return o.apply(this, arguments); }), eH = { color: "blue", @@ -2911,20 +2911,20 @@ if (this.pos += 4, this.pos > this.data.length) throw Error("Incomplete or corrupt PNG file"); } } - e.decode = function(e, t) { + e.decode = function e(e, t) { throw Error("PNG.decode not available in browser build"); - }, e.load = function(e) { + }, e.load = function e(e) { throw Error("PNG.load not available in browser build"); }; var t = e.prototype; - return t.read = function(e) { + return t.read = function e(e) { for(var t = Array(e), r = 0; r < e; r++)t[r] = this.data[this.pos++]; return t; - }, t.readUInt32 = function() { + }, t.readUInt32 = function e() { return this.data[this.pos++] << 24 | this.data[this.pos++] << 16 | this.data[this.pos++] << 8 | this.data[this.pos++]; - }, t.readUInt16 = function() { + }, t.readUInt16 = function e() { return this.data[this.pos++] << 8 | this.data[this.pos++]; - }, t.decodePixels = function(e) { + }, t.decodePixels = function e(e) { var t = this; return i().inflate(this.imgData, function(r, n) { if (r) throw r; @@ -2967,10 +2967,10 @@ } return 1 === t.interlaceMethod ? (c(0, 0, 8, 8), c(4, 0, 8, 8), c(0, 4, 4, 8), c(2, 0, 4, 4), c(0, 2, 2, 4), c(1, 0, 2, 2), c(0, 1, 1, 2)) : c(0, 0, 1, 1, !0), e(s); }); - }, t.decodePalette = function() { + }, t.decodePalette = function e() { for(var e, t = this.palette, r = t.length, n = this.transparency.indexed || [], i = o.alloc(n.length + r), a = 0, u = 0, l = 0; l < r; l += 3)i[a++] = t[l], i[a++] = t[l + 1], i[a++] = t[l + 2], i[a++] = null != (e = n[u++]) ? e : 255; return i; - }, t.copyToImageData = function(e, t) { + }, t.copyToImageData = function e(e, t) { var r, n, i = this.colors, o = null, a = this.hasAlphaChannel; this.palette.length && (o = this._decodedPalette || (this._decodedPalette = this.decodePalette()), i = 4, a = !0); var u = e.data || e, l = u.length, s = o || t, c = r = 0; @@ -2980,7 +2980,7 @@ u[c++] = f, u[c++] = f, u[c++] = f, u[c++] = a ? s[n++] : 255, r = n; } else for(; c < l;)n = o ? 4 * t[c / 4] : r, u[c++] = s[n++], u[c++] = s[n++], u[c++] = s[n++], u[c++] = a ? s[n++] : 255, r = n; - }, t.decode = function(e) { + }, t.decode = function e(e) { var t = this, r = o.alloc(this.width * this.height * 4); return this.decodePixels(function(n) { return t.copyToImageData(r, n), e(r); @@ -4075,10 +4075,10 @@ supportsMutation: !0, isPrimaryRenderer: !1, warnsIfNotActing: !1, - appendInitialChild: function(e, t) { + appendInitialChild: function e(e, t) { e.children.push(t); }, - createInstance: function(e, t) { + createInstance: function e(e, t) { var r = t.style; return t.children, { type: e, @@ -4088,58 +4088,58 @@ children: [] }; }, - createTextInstance: function(e, t) { + createTextInstance: function e(e, t) { return { type: "TEXT_INSTANCE", value: e }; }, - finalizeInitialChildren: function(e, t, r) { + finalizeInitialChildren: function e(e, t, r) { return !1; }, - getPublicInstance: function(e) { + getPublicInstance: function e(e) { return e; }, - prepareForCommit: function() {}, - clearContainer: function() {}, - prepareUpdate: function(e, t, r, n) { + prepareForCommit: function e() {}, + clearContainer: function e() {}, + prepareUpdate: function e(e, t, r, n) { return !ty(r, n); }, resetAfterCommit: void 0 === t ? function() {} : t, - resetTextContent: function(e) {}, - getRootHostContext: function() { + resetTextContent: function e(e) {}, + getRootHostContext: function e() { return tb; }, - getChildHostContext: function() { + getChildHostContext: function e() { return tb; }, - shouldSetTextContent: function(e, t) { + shouldSetTextContent: function e(e, t) { return !1; }, now: Date.now, useSyncScheduling: !0, - appendChild: function(e, t) { + appendChild: function e(e, t) { e.children.push(t); }, - appendChildToContainer: function(e, t) { + appendChildToContainer: function e(e, t) { "ROOT" === e.type ? e.document = t : e.children.push(t); }, - insertBefore: function(e, t, r) { + insertBefore: function e(e, t, r) { var n, i = null === (n = e.children) || void 0 === n ? void 0 : n.indexOf(r); void 0 !== i && -1 !== i && t && e.children.splice(i, 0, t); }, - removeChild: function(e, t) { + removeChild: function e(e, t) { var r, n = null === (r = e.children) || void 0 === r ? void 0 : r.indexOf(t); void 0 !== n && -1 !== n && e.children.splice(n, 1); }, - removeChildFromContainer: function(e, t) { + removeChildFromContainer: function e(e, t) { var r, n = null === (r = e.children) || void 0 === r ? void 0 : r.indexOf(t); void 0 !== n && -1 !== n && e.children.splice(n, 1); }, - commitTextUpdate: function(e, t, r) { + commitTextUpdate: function e(e, t, r) { e.value = r; }, - commitUpdate: function(e, t, r, n, i) { + commitUpdate: function e(e, t, r, n, i) { var o = i.style, a = tf(i, tv); e.props = a, e.style = o; } @@ -4158,7 +4158,7 @@ e && l(e); var s = (t = p(y().mark(function e(t) { var r, n, i, a, u; - return y().wrap(function(e) { + return y().wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: return void 0 === t && (t = !0), n = (r = o.document.props || {}).pdfVersion, i = r.language, a = new ts.default({ @@ -4175,7 +4175,7 @@ return e.stop(); } }, e); - })), function(e) { + })), function e(e) { return t.apply(this, arguments); }), c = function(e) { void 0 === e && (e = {}), o.document.props.onRender && o.document.props.onRender(e); @@ -4187,7 +4187,7 @@ container: o, toBlob: (r = p(y().mark(function e() { var t; - return y().wrap(function(e) { + return y().wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: return e.next = 2, s(); @@ -4209,11 +4209,11 @@ return e.stop(); } }, e); - })), function() { + })), function e() { return r.apply(this, arguments); }), toBuffer: (n = p(y().mark(function e() { - return y().wrap(function(e) { + return y().wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: return c(), e.abrupt("return", s()); @@ -4222,12 +4222,12 @@ return e.stop(); } }, e); - })), function() { + })), function e() { return n.apply(this, arguments); }), toString: (i = p(y().mark(function e() { var t, r; - return y().wrap(function(e) { + return y().wrap(function e(e) { for(;;)switch(e.prev = e.next){ case 0: return t = "", e.next = 3, s(!1); @@ -4248,7 +4248,7 @@ return e.stop(); } }, e); - })), function() { + })), function e() { return i.apply(this, arguments); }), removeListener: function(e, t) { @@ -4323,7 +4323,7 @@ Font: tD, version: "2.1.2", StyleSheet: { - create: function(e) { + create: function e(e) { return e; } }, @@ -4749,7 +4749,7 @@ var n = r(5318).default; t.__esModule = !0, t.processMarginVertical = t.processMarginSingle = t.processMarginHorizontal = t.processMargin = void 0; var i = n(r(7753)), o = (0, i.default)({ - expandsTo: function(e) { + expandsTo: function e(e) { return { marginTop: e.first, marginRight: e.second, @@ -4762,7 +4762,7 @@ }); t.processMargin = o; var a = (0, i.default)({ - expandsTo: function(e) { + expandsTo: function e(e) { return { marginTop: e.first, marginBottom: e.second @@ -4773,7 +4773,7 @@ }); t.processMarginVertical = a; var u = (0, i.default)({ - expandsTo: function(e) { + expandsTo: function e(e) { return { marginRight: e.first, marginLeft: e.second @@ -4803,7 +4803,7 @@ var n = r(5318).default; t.__esModule = !0, t.processPaddingVertical = t.processPaddingSingle = t.processPaddingHorizontal = t.processPadding = void 0; var i = n(r(7753)), o = (0, i.default)({ - expandsTo: function(e) { + expandsTo: function e(e) { return { paddingTop: e.first, paddingRight: e.second, @@ -4815,7 +4815,7 @@ }); t.processPadding = o; var a = (0, i.default)({ - expandsTo: function(e) { + expandsTo: function e(e) { return { paddingTop: e.first, paddingBottom: e.second @@ -4825,7 +4825,7 @@ }); t.processPaddingVertical = a; var u = (0, i.default)({ - expandsTo: function(e) { + expandsTo: function e(e) { return { paddingRight: e.first, paddingLeft: e.second @@ -5666,7 +5666,7 @@ function e(e) { this.prev = null, this.next = null, this.data = e; } - return e.prototype.toString = function() { + return e.prototype.toString = function e() { return this.data.toString(); }, e; }(), n = function() { @@ -5674,24 +5674,24 @@ this.head = null, this.tail = null, this.listSize = 0; } var t = e.prototype; - return t.isLinked = function(e) { + return t.isLinked = function e(e) { return !(e && null === e.prev && null === e.next && this.tail !== e && this.head !== e || this.isEmpty()); - }, t.size = function() { + }, t.size = function e() { return this.listSize; - }, t.isEmpty = function() { + }, t.isEmpty = function e() { return 0 === this.listSize; - }, t.first = function() { + }, t.first = function e() { return this.head; - }, t.last = function() { + }, t.last = function e() { return this.last; - }, t.toString = function() { + }, t.toString = function e() { return this.toArray().toString(); - }, t.toArray = function() { + }, t.toArray = function e() { for(var e = this.head, t = []; null !== e;)t.push(e), e = e.next; return t; - }, t.forEach = function(e) { + }, t.forEach = function e(e) { for(var t = this.head; null !== t;)e(t), t = t.next; - }, t.contains = function(e) { + }, t.contains = function e(e) { var t = this.head; if (!this.isLinked(e)) return !1; for(; null !== t;){ @@ -5699,7 +5699,7 @@ t = t.next; } return !1; - }, t.at = function(e) { + }, t.at = function e(e) { var t = this.head, r = 0; if (e >= this.listLength || e < 0) return null; for(; null !== t;){ @@ -5707,20 +5707,20 @@ t = t.next, r += 1; } return null; - }, t.insertAfter = function(e, t) { + }, t.insertAfter = function e(e, t) { return this.isLinked(e) && (t.prev = e, t.next = e.next, null === e.next ? this.tail = t : e.next.prev = t, e.next = t, this.listSize += 1), this; - }, t.insertBefore = function(e, t) { + }, t.insertBefore = function e(e, t) { return this.isLinked(e) && (t.prev = e.prev, t.next = e, null === e.prev ? this.head = t : e.prev.next = t, e.prev = t, this.listSize += 1), this; - }, t.push = function(e) { + }, t.push = function e(e) { return null === this.head ? this.unshift(e) : this.insertAfter(this.tail, e), this; - }, t.unshift = function(e) { + }, t.unshift = function e(e) { return null === this.head ? (this.head = e, this.tail = e, e.prev = null, e.next = null, this.listSize += 1) : this.insertBefore(this.head, e), this; - }, t.remove = function(e) { + }, t.remove = function e(e) { return this.isLinked(e) && (null === e.prev ? this.head = e.next : e.prev.next = e.next, null === e.next ? this.tail = e.prev : e.next.prev = e.prev, this.listSize -= 1), this; - }, t.pop = function() { + }, t.pop = function e() { var e = this.tail; return this.tail.prev.next = null, this.tail = this.tail.prev, this.listSize -= 1, e.prev = null, e.next = null, e; - }, t.shift = function() { + }, t.shift = function e() { var e = this.head; return this.head.next.prev = null, this.head = this.head.next, this.listSize -= 1, e.prev = null, e.next = null, e; }, e; @@ -7090,13 +7090,13 @@ return i(e, [ { key: "fromJS", - value: function(e) { + value: function e(e) { e(this.left, this.right, this.top, this.bottom, this.width, this.height); } }, { key: "toString", - value: function() { + value: function e() { return ""; } } @@ -7108,7 +7108,7 @@ return i(e, null, [ { key: "fromJS", - value: function(t) { + value: function t(t) { var r = t.width, n = t.height; return new e(r, n); } @@ -7116,13 +7116,13 @@ ]), i(e, [ { key: "fromJS", - value: function(e) { + value: function e(e) { e(this.width, this.height); } }, { key: "toString", - value: function() { + value: function e() { return ""; } } @@ -7134,13 +7134,13 @@ return i(e, [ { key: "fromJS", - value: function(e) { + value: function e(e) { e(this.unit, this.value); } }, { key: "toString", - value: function() { + value: function e() { switch(this.unit){ case u.UNIT_POINT: return String(this.value); @@ -7155,7 +7155,7 @@ }, { key: "valueOf", - value: function() { + value: function e() { return this.value; } } @@ -7223,7 +7223,7 @@ Layout: e("Layout", l), Size: e("Size", s), Value: e("Value", c), - getInstanceCount: function() { + getInstanceCount: function e() { return t.getInstanceCount.apply(t, arguments); } }, u); @@ -7336,7 +7336,7 @@ 1924: function(e, t, r) { "use strict"; var n = r(210), i = r(5559), o = i(n("String.prototype.indexOf")); - e.exports = function(e, t) { + e.exports = function e(e, t) { var r = n(e, !!t); return "function" == typeof r && o(e, ".prototype.") > -1 ? i(r) : r; }; @@ -7351,7 +7351,7 @@ } catch (e) { s = null; } - e.exports = function(e) { + e.exports = function e(e) { var t = u(n, a, arguments); return l && s && l(t, "length").configurable && s(t, "length", { value: 1 + c(0, e.length - (arguments.length - 1)) @@ -7396,7 +7396,7 @@ var t = ""; return e.global && (t += "g"), e.ignoreCase && (t += "i"), e.multiline && (t += "m"), t; } - return e.clonePrototype = function(e) { + return e.clonePrototype = function e(e) { if (null === e) return null; var t = function() {}; return t.prototype = e, new t(); @@ -8804,7 +8804,7 @@ 7648: function(e) { "use strict"; var t = Array.prototype.slice, r = Object.prototype.toString; - e.exports = function(e) { + e.exports = function e(e) { var n, i = this; if ("function" != typeof i || "[object Function]" !== r.call(i)) throw TypeError("Function.prototype.bind called on incompatible " + i); for(var o = t.call(arguments, 1), a = Math.max(0, i.length - o.length), u = [], l = 0; l < a; l++)u.push("$" + l); @@ -8827,21 +8827,21 @@ 5972: function(e) { "use strict"; var t = function() { - return "string" == typeof (function() {}).name; + return "string" == typeof (function e() {}).name; }, r = Object.getOwnPropertyDescriptor; if (r) try { r([], "length"); } catch (e) { r = null; } - t.functionsHaveConfigurableNames = function() { + t.functionsHaveConfigurableNames = function e() { if (!t() || !r) return !1; var e = r(function() {}, "name"); return !!e && !!e.configurable; }; var n = Function.prototype.bind; - t.boundFunctionsHaveNames = function() { - return t() && "function" == typeof n && "" !== (function() {}).bind().name; + t.boundFunctionsHaveNames = function e() { + return t() && "function" == typeof n && "" !== (function e() {}).bind().name; }, e.exports = t; }, 210: function(e, t, r) { @@ -9183,7 +9183,7 @@ } throw new i("intrinsic " + e + " does not exist!"); }; - e.exports = function(e, t) { + e.exports = function e(e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var r = A(e), n = r.length > 0 ? r[0] : "", o = k("%" + n + "%", t), u = o.name, s = o.value, c = !1, f = o.alias; @@ -9220,7 +9220,7 @@ } catch (e) {} return !1; }; - i.hasArrayLengthDefineBug = function() { + i.hasArrayLengthDefineBug = function e() { if (!i()) return null; try { return 1 !== n([], "length", { @@ -9234,13 +9234,13 @@ 1405: function(e, t, r) { "use strict"; var n = "undefined" != typeof Symbol && Symbol, i = r(5419); - e.exports = function() { + e.exports = function e() { return "function" == typeof n && "function" == typeof Symbol && "symbol" == typeof n("foo") && "symbol" == typeof Symbol("bar") && i(); }; }, 5419: function(e) { "use strict"; - e.exports = function() { + e.exports = function e() { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var e = {}, t = Symbol("test"), r = Object(t); @@ -9259,7 +9259,7 @@ 6410: function(e, t, r) { "use strict"; var n = r(5419); - e.exports = function() { + e.exports = function e() { return n() && !!Symbol.toStringTag; }; }, @@ -14403,7 +14403,7 @@ }) ? r.apply(t, []) : r) && (e.exports = n); }, 5717: function(e) { - "function" == typeof Object.create ? e.exports = function(e, t) { + "function" == typeof Object.create ? e.exports = function e(e, t) { t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: { value: e, @@ -14412,7 +14412,7 @@ configurable: !0 } })); - } : e.exports = function(e, t) { + } : e.exports = function e(e, t) { if (t) { e.super_ = t; var r = function() {}; @@ -14432,7 +14432,7 @@ o.isLegacyArguments = a, e.exports = u ? o : a; }, 5171: function(e) { - e.exports = function(e) { + e.exports = function e(e) { return !!e && "string" != typeof e && (e instanceof Array || Array.isArray(e) || e.length >= 0 && (e.splice instanceof Function || Object.getOwnPropertyDescriptor(e, e.length - 1) && "String" !== e.constructor.name)); }; }, @@ -14445,7 +14445,7 @@ return !1; } }, o = Object.prototype.toString, a = r(6410)(); - e.exports = function(e) { + e.exports = function e(e) { return "object" == typeof e && null !== e && (a ? i(e) : "[object Date]" === o.call(e)); }; }, @@ -14463,7 +14463,7 @@ }, "symbol" == typeof Symbol.toPrimitive && (a[Symbol.toPrimitive] = s); } var c = u("Object.prototype.toString"), f = Object.getOwnPropertyDescriptor; - e.exports = l ? function(e) { + e.exports = l ? function e(e) { if (!e || "object" != typeof e) return !1; var t = f(e, "lastIndex"); if (!(t && n(t, "value"))) return !1; @@ -14472,7 +14472,7 @@ } catch (e) { return e === o; } - } : function(e) { + } : function e(e) { return !!e && ("object" == typeof e || "function" == typeof e) && "[object RegExp]" === c(e); }; }, @@ -14506,7 +14506,7 @@ return e.match(r) || t.match(r); }; } - e.exports = function(e, n, i) { + e.exports = function e(e, n, i) { switch(e){ case "and": return new t(n, i); @@ -14622,7 +14622,7 @@ return this.value === e.orientation; }; } - e.exports = function(e, a) { + e.exports = function e(e, a) { switch(e){ case "max-height": return new t(a); @@ -15223,7 +15223,7 @@ rootMargin: r })).id, o = t.observer, (a = t.elements).set(e, function(e) { return e && p(e); - }), o.observe(e), function() { + }), o.observe(e), function t() { if (a.delete(e), o.unobserve(e), 0 === a.size) { o.disconnect(), l.delete(i); var t = s.findIndex(function(e) { @@ -15283,9 +15283,9 @@ 313: function(e, t, r) { "use strict"; function i(e) { - return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { + return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function e(e) { return typeof e; - } : function(e) { + } : function e(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; })(e); } @@ -15620,7 +15620,7 @@ } function u(e) { var t = "function" == typeof Map ? new Map() : void 0; - return (u = function(e) { + return (u = function e(e) { if (null === e || -1 === Function.toString.call(e).indexOf("[native code]")) return e; if ("function" != typeof e) throw TypeError("Super expression must either be null or a function"); if (void 0 !== t) { @@ -15649,7 +15649,7 @@ } catch (e) { return !1; } - }() ? function(e, t, r) { + }() ? function e(e, t, r) { var n = [ null ]; @@ -15659,19 +15659,19 @@ } : Reflect.construct).apply(null, arguments); } function s(e, t) { - return (s = Object.setPrototypeOf || function(e, t) { + return (s = Object.setPrototypeOf || function e(e, t) { return e.__proto__ = t, e; })(e, t); } function c(e) { - return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { + return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function e(e) { return e.__proto__ || Object.getPrototypeOf(e); })(e); } function f(e) { - return (f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { + return (f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function e(e) { return typeof e; - } : function(e) { + } : function e(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; })(e); } @@ -15714,14 +15714,14 @@ }); } var E = function(e) { - var t, r; - function u(e) { + var t, r, u; + function l(e) { if (!function(e, t) { if (!(e instanceof t)) throw TypeError("Cannot call a class as a function"); - }(this, u), "object" !== f(e) || null === e) throw new p("options", "Object", e); - var t, r = e.message, i = e.operator, l = e.stackStartFn, s = e.actual, d = e.expected, E = Error.stackTraceLimit; - if (Error.stackTraceLimit = 0, null != r) t = o(this, c(u).call(this, String(r))); - else if (n.stderr && n.stderr.isTTY && (n.stderr && n.stderr.getColorDepth && 1 !== n.stderr.getColorDepth() ? (y = "", g = "", b = "", v = "") : (y = "", g = "", b = "", v = "")), "object" === f(s) && null !== s && "object" === f(d) && null !== d && "stack" in s && s instanceof Error && "stack" in d && d instanceof Error && (s = D(s), d = D(d)), "deepStrictEqual" === i || "strictEqual" === i) t = o(this, c(u).call(this, function(e, t, r) { + }(this, l), "object" !== f(e) || null === e) throw new p("options", "Object", e); + var t, r = e.message, i = e.operator, u = e.stackStartFn, s = e.actual, d = e.expected, E = Error.stackTraceLimit; + if (Error.stackTraceLimit = 0, null != r) t = o(this, c(l).call(this, String(r))); + else if (n.stderr && n.stderr.isTTY && (n.stderr && n.stderr.getColorDepth && 1 !== n.stderr.getColorDepth() ? (y = "", g = "", b = "", v = "") : (y = "", g = "", b = "", v = "")), "object" === f(s) && null !== s && "object" === f(d) && null !== d && "stack" in s && s instanceof Error && "stack" in d && d instanceof Error && (s = D(s), d = D(d)), "deepStrictEqual" === i || "strictEqual" === i) t = o(this, c(l).call(this, function(e, t, r) { var i = "", o = "", a = 0, u = "", l = !1, s = w(e), c = s.split("\n"), d = w(t).split("\n"), p = 0, D = ""; if ("strictEqual" === r && "object" === f(e) && "object" === f(t) && null !== e && null !== t && (r = "strictEqualObject"), 1 === c.length && 1 === d.length && c[0] !== d[0]) { var E = c[0].length + d[0].length; @@ -15761,17 +15761,17 @@ else if ("notDeepStrictEqual" === i || "notStrictEqual" === i) { var _ = m[i], x = w(s).split("\n"); if ("notStrictEqual" === i && "object" === f(s) && null !== s && (_ = m.notStrictEqualObject), x.length > 30) for(x[26] = "".concat(y, "...").concat(b); x.length > 27;)x.pop(); - t = 1 === x.length ? o(this, c(u).call(this, "".concat(_, " ").concat(x[0]))) : o(this, c(u).call(this, "".concat(_, "\n\n").concat(x.join("\n"), "\n"))); + t = 1 === x.length ? o(this, c(l).call(this, "".concat(_, " ").concat(x[0]))) : o(this, c(l).call(this, "".concat(_, "\n\n").concat(x.join("\n"), "\n"))); } else { var S = w(s), A = "", k = m[i]; - "notDeepEqual" === i || "notEqual" === i ? (S = "".concat(m[i], "\n\n").concat(S)).length > 1024 && (S = "".concat(S.slice(0, 1021), "...")) : (A = "".concat(w(d)), S.length > 512 && (S = "".concat(S.slice(0, 509), "...")), A.length > 512 && (A = "".concat(A.slice(0, 509), "...")), "deepEqual" === i || "equal" === i ? S = "".concat(k, "\n\n").concat(S, "\n\nshould equal\n\n") : A = " ".concat(i, " ").concat(A)), t = o(this, c(u).call(this, "".concat(S).concat(A))); + "notDeepEqual" === i || "notEqual" === i ? (S = "".concat(m[i], "\n\n").concat(S)).length > 1024 && (S = "".concat(S.slice(0, 1021), "...")) : (A = "".concat(w(d)), S.length > 512 && (S = "".concat(S.slice(0, 509), "...")), A.length > 512 && (A = "".concat(A.slice(0, 509), "...")), "deepEqual" === i || "equal" === i ? S = "".concat(k, "\n\n").concat(S, "\n\nshould equal\n\n") : A = " ".concat(i, " ").concat(A)), t = o(this, c(l).call(this, "".concat(S).concat(A))); } return Error.stackTraceLimit = E, t.generatedMessage = !r, Object.defineProperty(a(t), "name", { value: "AssertionError [ERR_ASSERTION]", enumerable: !1, writable: !0, configurable: !0 - }), t.code = "ERR_ASSERTION", t.actual = s, t.expected = d, t.operator = i, Error.captureStackTrace && Error.captureStackTrace(a(t), l), t.stack, t.name = "AssertionError", o(t); + }), t.code = "ERR_ASSERTION", t.actual = s, t.expected = d, t.operator = i, Error.captureStackTrace && Error.captureStackTrace(a(t), u), t.stack, t.name = "AssertionError", o(t); } return !function(e, t) { if ("function" != typeof t && null !== t) throw TypeError("Super expression must either be null or a function"); @@ -15782,16 +15782,16 @@ configurable: !0 } }), t && s(e, t); - }(u, e), t = [ + }(l, e), t = l, r = [ { key: "toString", - value: function() { + value: function e() { return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message); } }, { key: d.custom, - value: function(e, t) { + value: function e(e, t) { return d(this, function(e) { for(var t = 1; t < arguments.length; t++){ var r = null != arguments[t] ? arguments[t] : {}, n = Object.keys(r); @@ -15814,26 +15814,26 @@ })); } } - ], i(u.prototype, t), r && i(u, r), u; + ], i(t.prototype, r), u && i(t, u), l; }(u(Error)); e.exports = E; }, 823: function(e, t, r) { "use strict"; function n(e) { - return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { + return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function e(e) { return typeof e; - } : function(e) { + } : function e(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; })(e); } function i(e) { - return (i = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { + return (i = Object.setPrototypeOf ? Object.getPrototypeOf : function e(e) { return e.__proto__ || Object.getPrototypeOf(e); })(e); } function o(e, t) { - return (o = Object.setPrototypeOf || function(e, t) { + return (o = Object.setPrototypeOf || function e(e, t) { return e.__proto__ = t, e; })(e, t); } @@ -15928,9 +15928,9 @@ }(); } function i(e) { - return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { + return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function e(e) { return typeof e; - } : function(e) { + } : function e(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; })(e); } @@ -16174,7 +16174,7 @@ 749: function(e, t, r) { "use strict"; var n = r(91), i = r(112), o = i(n("String.prototype.indexOf")); - e.exports = function(e, t) { + e.exports = function e(e, t) { var r = n(e, !!t); return "function" == typeof r && o(e, ".prototype.") > -1 ? i(r) : r; }; @@ -16189,7 +16189,7 @@ } catch (e) { s = null; } - e.exports = function(e) { + e.exports = function e(e) { var t = u(n, a, arguments); return l && s && l(t, "length").configurable && s(t, "length", { value: 1 + c(0, e.length - (arguments.length - 1)) @@ -16528,7 +16528,7 @@ } throw new i("intrinsic " + e + " does not exist!"); }; - e.exports = function(e, t) { + e.exports = function e(e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var r = k(e), n = r.length > 0 ? r[0] : "", o = T("%" + n + "%", t), u = o.name, s = o.value, c = !1, f = o.alias; @@ -16609,7 +16609,7 @@ }, 219: function(e) { var t = Object.prototype.hasOwnProperty, r = Object.prototype.toString; - e.exports = function(e, n, i) { + e.exports = function e(e, n, i) { if ("[object Function]" !== r.call(n)) throw TypeError("iterator must be a function"); var o = e.length; if (o === +o) for(var a = 0; a < o; a++)n.call(i, e[a], a, e); @@ -16619,7 +16619,7 @@ 733: function(e) { "use strict"; var t = Array.prototype.slice, r = Object.prototype.toString; - e.exports = function(e) { + e.exports = function e(e) { var n, i = this; if ("function" != typeof i || "[object Function]" !== r.call(i)) throw TypeError("Function.prototype.bind called on incompatible " + i); for(var o = t.call(arguments, 1), a = Math.max(0, i.length - o.length), u = [], l = 0; l < a; l++)u.push("$" + l); @@ -16978,7 +16978,7 @@ } throw new i("intrinsic " + e + " does not exist!"); }; - e.exports = function(e, t) { + e.exports = function e(e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var r = A(e), n = r.length > 0 ? r[0] : "", o = k("%" + n + "%", t), u = o.name, s = o.value, c = !1, f = o.alias; @@ -17008,13 +17008,13 @@ 449: function(e, t, n) { "use strict"; var i = r.g.Symbol, o = n(545); - e.exports = function() { + e.exports = function e() { return "function" == typeof i && "function" == typeof Symbol && "symbol" == typeof i("foo") && "symbol" == typeof Symbol("bar") && o(); }; }, 545: function(e) { "use strict"; - e.exports = function() { + e.exports = function e() { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var e = {}, t = Symbol("test"), r = Object(t); @@ -17036,7 +17036,7 @@ e.exports = n.call(Function.call, Object.prototype.hasOwnProperty); }, 526: function(e) { - "function" == typeof Object.create ? e.exports = function(e, t) { + "function" == typeof Object.create ? e.exports = function e(e, t) { t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: { value: e, @@ -17045,7 +17045,7 @@ configurable: !0 } })); - } : e.exports = function(e, t) { + } : e.exports = function e(e, t) { if (t) { e.super_ = t; var r = function() {}; @@ -17072,13 +17072,13 @@ return Function("return function*() {}")(); } catch (e) {} }(), u = a ? o(a) : {}; - e.exports = function(e) { + e.exports = function e(e) { return "function" == typeof e && (!!n.test(r.call(e)) || (i ? o(e) === u : "[object GeneratorFunction]" === t.call(e))); }; }, 720: function(e) { "use strict"; - e.exports = function(e) { + e.exports = function e(e) { return e != e; }; }, @@ -17094,19 +17094,19 @@ 78: function(e, t, r) { "use strict"; var n = r(720); - e.exports = function() { + e.exports = function e() { return Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a") ? Number.isNaN : n; }; }, 81: function(e, t, r) { "use strict"; var n = r(961), i = r(78); - e.exports = function() { + e.exports = function e() { var e = i(); return n(Number, { isNaN: e }, { - isNaN: function() { + isNaN: function t() { return Number.isNaN !== e; } }), e; @@ -17114,7 +17114,7 @@ }, 234: function(e, t, n) { "use strict"; - var i = n(219), o = n(627), a = n(749), u = a("Object.prototype.toString"), l = n(449)() && "symbol" == typeof Symbol.toStringTag, s = o(), c = a("Array.prototype.indexOf", !0) || function(e, t) { + var i = n(219), o = n(627), a = n(749), u = a("Object.prototype.toString"), l = n(449)() && "symbol" == typeof Symbol.toStringTag, s = o(), c = a("Array.prototype.indexOf", !0) || function e(e, t) { for(var r = 0; r < e.length; r += 1)if (e[r] === t) return r; return -1; }, f = a("String.prototype.slice"), d = {}, p = n(982), h = Object.getPrototypeOf; @@ -17132,7 +17132,7 @@ } catch (e) {} }), t; }; - e.exports = function(e) { + e.exports = function e(e) { return !!e && "object" == typeof e && (l ? !!p && y(e) : c(s, f(u(e), 8, -1)) > -1); }; }, @@ -17151,7 +17151,7 @@ var t = function(e) { return e != e; }; - e.exports = function(e, r) { + e.exports = function e(e, r) { return 0 === e && 0 === r ? 1 / e == 1 / r : !!(e === r || t(e) && t(r)); }; }, @@ -17216,7 +17216,7 @@ return !1; } }; - n = function(e) { + n = function e(e) { var t = null !== e && "object" == typeof e, r = "[object Function]" === o.call(e), n = a(e), u = t && "[object String]" === o.call(e), f = []; if (!t && !r && !n) throw TypeError("Object.keys called on a non-object"); var d = s && r; @@ -17231,14 +17231,14 @@ }, 283: function(e, t, r) { "use strict"; - var n = Array.prototype.slice, i = r(750), o = Object.keys, a = o ? function(e) { + var n = Array.prototype.slice, i = r(750), o = Object.keys, a = o ? function e(e) { return o(e); } : r(595), u = Object.keys; - a.shim = function() { + a.shim = function e() { return Object.keys ? !function() { var e = Object.keys(arguments); return e && e.length === arguments.length; - }(1, 2) && (Object.keys = function(e) { + }(1, 2) && (Object.keys = function e(e) { return i(e) ? u(n.call(e)) : u(e); }) : Object.keys = a, Object.keys || a; }, e.exports = a; @@ -17246,13 +17246,13 @@ 750: function(e) { "use strict"; var t = Object.prototype.toString; - e.exports = function(e) { + e.exports = function e(e) { var r = t.call(e), n = "[object Arguments]" === r; return n || (n = "[object Array]" !== r && null !== e && "object" == typeof e && "number" == typeof e.length && e.length >= 0 && "[object Function]" === t.call(e.callee)), n; }; }, 536: function(e) { - e.exports = function(e) { + e.exports = function e(e) { return e instanceof i; }; }, @@ -17382,7 +17382,7 @@ }); }, 650: function(e, t, r) { - var i = Object.getOwnPropertyDescriptors || function(e) { + var i = Object.getOwnPropertyDescriptors || function e(e) { for(var t = Object.keys(e), r = {}, n = 0; n < t.length; n++)r[t[n]] = Object.getOwnPropertyDescriptor(e, t[n]); return r; }, o = /%[sdj%]/g; @@ -17665,7 +17665,7 @@ } return t(e); } - t.promisify = function(e) { + t.promisify = function e(e) { if ("function" != typeof e) throw TypeError('The "original" argument must be of type Function'); if (C && e[C]) { var t = e[C]; @@ -17735,7 +17735,7 @@ } catch (e) {} }), t; }, y = n(234); - e.exports = function(e) { + e.exports = function e(e) { return !!y(e) && (l ? h(e) : c(u(e), 8, -1)); }; }, @@ -18062,7 +18062,7 @@ } throw new i("intrinsic " + e + " does not exist!"); }; - e.exports = function(e, t) { + e.exports = function e(e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var r = A(e), n = r.length > 0 ? r[0] : "", i = k("%" + n + "%", t), o = i.name, u = i.value, s = !1, c = i.alias; @@ -18098,7 +18098,7 @@ 627: function(e, t, n) { "use strict"; var i = n(901); - e.exports = function() { + e.exports = function e() { return i([ "BigInt64Array", "BigUint64Array", @@ -18816,7 +18816,7 @@ }, t.deflateInfo = "pako deflate (from Nodeca project)"; }, 163: function(e) { - e.exports = function(e, t) { + e.exports = function e(e, t) { var r, n, i, o, a, u, l, s, c, f, d, p, h, y, g, v, b, m, D, w, E, _, x, S, A; r = e.state, n = e.next_in, S = e.input, i = n + (e.avail_in - 5), o = e.next_out, A = e.output, a = o - (t - e.avail_out), u = o + (e.avail_out - 257), l = r.dmax, s = r.wsize, c = r.whave, f = r.wnext, d = r.window, p = r.hold, h = r.bits, y = r.lencode, g = r.distcode, v = (1 << r.lenbits) - 1, b = (1 << r.distbits) - 1; t: do for(h < 15 && (p += S[n++] << h, h += 8, p += S[n++] << h, h += 8), m = y[p & v];;){ @@ -19469,7 +19469,7 @@ 64, 64 ]; - e.exports = function(e, t, r, l, s, c, f, d) { + e.exports = function e(e, t, r, l, s, c, f, d) { var p, h, y, g, v, b, m, D, w, E = d.bits, _ = 0, x = 0, S = 0, A = 0, k = 0, T = 0, O = 0, C = 0, P = 0, F = 0, R = null, I = 0, j = new n.Buf16(16), B = new n.Buf16(16), M = null, N = 0; for(_ = 0; _ <= 15; _++)j[_] = 0; for(x = 0; x < l; x++)j[t[r + x]]++; @@ -20078,9 +20078,9 @@ return c(e); }, u.allocUnsafeSlow = function(e) { return c(e); - }, u.isBuffer = function(e) { + }, u.isBuffer = function e(e) { return null != e && !0 === e._isBuffer && e !== u.prototype; - }, u.compare = function(e, t) { + }, u.compare = function e(e, t) { if (O(e, Uint8Array) && (e = u.from(e, e.offset, e.byteLength)), O(t, Uint8Array) && (t = u.from(t, t.offset, t.byteLength)), !u.isBuffer(e) || !u.isBuffer(t)) throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); if (e === t) return 0; for(var r = e.length, n = t.length, i = 0, o = Math.min(r, n); i < o; ++i)if (e[i] !== t[i]) { @@ -20088,7 +20088,7 @@ break; } return r < n ? -1 : n < r ? 1 : 0; - }, u.isEncoding = function(e) { + }, u.isEncoding = function e(e) { switch(String(e).toLowerCase()){ case "hex": case "utf8": @@ -20105,7 +20105,7 @@ default: return !1; } - }, u.concat = function(e, t) { + }, u.concat = function e(e, t) { if (!Array.isArray(e)) throw TypeError('"list" argument must be an Array of Buffers'); if (0 === e.length) return u.alloc(0); if (void 0 === t) for(r = 0, t = 0; r < e.length; ++r)t += e[r].length; @@ -20116,31 +20116,31 @@ o.copy(n, i), i += o.length; } return n; - }, u.byteLength = p, u.prototype._isBuffer = !0, u.prototype.swap16 = function() { + }, u.byteLength = p, u.prototype._isBuffer = !0, u.prototype.swap16 = function e() { var e = this.length; if (e % 2 != 0) throw RangeError("Buffer size must be a multiple of 16-bits"); for(var t = 0; t < e; t += 2)y(this, t, t + 1); return this; - }, u.prototype.swap32 = function() { + }, u.prototype.swap32 = function e() { var e = this.length; if (e % 4 != 0) throw RangeError("Buffer size must be a multiple of 32-bits"); for(var t = 0; t < e; t += 4)y(this, t, t + 3), y(this, t + 1, t + 2); return this; - }, u.prototype.swap64 = function() { + }, u.prototype.swap64 = function e() { var e = this.length; if (e % 8 != 0) throw RangeError("Buffer size must be a multiple of 64-bits"); for(var t = 0; t < e; t += 8)y(this, t, t + 7), y(this, t + 1, t + 6), y(this, t + 2, t + 5), y(this, t + 3, t + 4); return this; - }, u.prototype.toString = function() { + }, u.prototype.toString = function e() { var e = this.length; return 0 === e ? "" : 0 == arguments.length ? b(this, 0, e) : h.apply(this, arguments); - }, u.prototype.toLocaleString = u.prototype.toString, u.prototype.equals = function(e) { + }, u.prototype.toLocaleString = u.prototype.toString, u.prototype.equals = function e(e) { if (!u.isBuffer(e)) throw TypeError("Argument must be a Buffer"); return this === e || 0 === u.compare(this, e); - }, u.prototype.inspect = function() { + }, u.prototype.inspect = function e() { var e = "", r = t.INSPECT_MAX_BYTES; return e = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (e += " ... "), ""; - }, o && (u.prototype[o] = u.prototype.inspect), u.prototype.compare = function(e, t, r, n, i) { + }, o && (u.prototype[o] = u.prototype.inspect), u.prototype.compare = function e(e, t, r, n, i) { if (O(e, Uint8Array) && (e = u.from(e, e.offset, e.byteLength)), !u.isBuffer(e)) throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); if (void 0 === t && (t = 0), void 0 === r && (r = e ? e.length : 0), void 0 === n && (n = 0), void 0 === i && (i = this.length), t < 0 || r > e.length || n < 0 || i > this.length) throw RangeError("out of range index"); if (n >= i && t >= r) return 0; @@ -20152,13 +20152,13 @@ break; } return o < a ? -1 : a < o ? 1 : 0; - }, u.prototype.includes = function(e, t, r) { + }, u.prototype.includes = function e(e, t, r) { return -1 !== this.indexOf(e, t, r); - }, u.prototype.indexOf = function(e, t, r) { + }, u.prototype.indexOf = function e(e, t, r) { return g(this, e, t, r, !0); - }, u.prototype.lastIndexOf = function(e, t, r) { + }, u.prototype.lastIndexOf = function e(e, t, r) { return g(this, e, t, r, !1); - }, u.prototype.write = function(e, t, r, n) { + }, u.prototype.write = function e(e, t, r, n) { if (void 0 === t) n = "utf8", r = this.length, t = 0; else if (void 0 === r && "string" == typeof t) n = t, r = this.length, t = 0; else if (isFinite(t)) t >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0); @@ -20203,65 +20203,65 @@ if (y) throw TypeError("Unknown encoding: " + n); n = ("" + n).toLowerCase(), y = !0; } - }, u.prototype.toJSON = function() { + }, u.prototype.toJSON = function e() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; - }, u.prototype.slice = function(e, t) { + }, u.prototype.slice = function e(e, t) { var r = this.length; e = ~~e, t = void 0 === t ? r : ~~t, e < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), t < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), t < e && (t = e); var n = this.subarray(e, t); return Object.setPrototypeOf(n, u.prototype), n; - }, u.prototype.readUIntLE = function(e, t, r) { + }, u.prototype.readUIntLE = function e(e, t, r) { e >>>= 0, t >>>= 0, r || m(e, t, this.length); for(var n = this[e], i = 1, o = 0; ++o < t && (i *= 256);)n += this[e + o] * i; return n; - }, u.prototype.readUIntBE = function(e, t, r) { + }, u.prototype.readUIntBE = function e(e, t, r) { e >>>= 0, t >>>= 0, r || m(e, t, this.length); for(var n = this[e + --t], i = 1; t > 0 && (i *= 256);)n += this[e + --t] * i; return n; - }, u.prototype.readUInt8 = function(e, t) { + }, u.prototype.readUInt8 = function e(e, t) { return e >>>= 0, t || m(e, 1, this.length), this[e]; - }, u.prototype.readUInt16LE = function(e, t) { + }, u.prototype.readUInt16LE = function e(e, t) { return e >>>= 0, t || m(e, 2, this.length), this[e] | this[e + 1] << 8; - }, u.prototype.readUInt16BE = function(e, t) { + }, u.prototype.readUInt16BE = function e(e, t) { return e >>>= 0, t || m(e, 2, this.length), this[e] << 8 | this[e + 1]; - }, u.prototype.readUInt32LE = function(e, t) { + }, u.prototype.readUInt32LE = function e(e, t) { return e >>>= 0, t || m(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]; - }, u.prototype.readUInt32BE = function(e, t) { + }, u.prototype.readUInt32BE = function e(e, t) { return e >>>= 0, t || m(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]); - }, u.prototype.readIntLE = function(e, t, r) { + }, u.prototype.readIntLE = function e(e, t, r) { e >>>= 0, t >>>= 0, r || m(e, t, this.length); for(var n = this[e], i = 1, o = 0; ++o < t && (i *= 256);)n += this[e + o] * i; return n >= (i *= 128) && (n -= Math.pow(2, 8 * t)), n; - }, u.prototype.readIntBE = function(e, t, r) { + }, u.prototype.readIntBE = function e(e, t, r) { e >>>= 0, t >>>= 0, r || m(e, t, this.length); for(var n = t, i = 1, o = this[e + --n]; n > 0 && (i *= 256);)o += this[e + --n] * i; return o >= (i *= 128) && (o -= Math.pow(2, 8 * t)), o; - }, u.prototype.readInt8 = function(e, t) { + }, u.prototype.readInt8 = function e(e, t) { return (e >>>= 0, t || m(e, 1, this.length), 128 & this[e]) ? -((255 - this[e] + 1) * 1) : this[e]; - }, u.prototype.readInt16LE = function(e, t) { + }, u.prototype.readInt16LE = function e(e, t) { e >>>= 0, t || m(e, 2, this.length); var r = this[e] | this[e + 1] << 8; return 32768 & r ? 4294901760 | r : r; - }, u.prototype.readInt16BE = function(e, t) { + }, u.prototype.readInt16BE = function e(e, t) { e >>>= 0, t || m(e, 2, this.length); var r = this[e + 1] | this[e] << 8; return 32768 & r ? 4294901760 | r : r; - }, u.prototype.readInt32LE = function(e, t) { + }, u.prototype.readInt32LE = function e(e, t) { return e >>>= 0, t || m(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24; - }, u.prototype.readInt32BE = function(e, t) { + }, u.prototype.readInt32BE = function e(e, t) { return e >>>= 0, t || m(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]; - }, u.prototype.readFloatLE = function(e, t) { + }, u.prototype.readFloatLE = function e(e, t) { return e >>>= 0, t || m(e, 4, this.length), i.read(this, e, !0, 23, 4); - }, u.prototype.readFloatBE = function(e, t) { + }, u.prototype.readFloatBE = function e(e, t) { return e >>>= 0, t || m(e, 4, this.length), i.read(this, e, !1, 23, 4); - }, u.prototype.readDoubleLE = function(e, t) { + }, u.prototype.readDoubleLE = function e(e, t) { return e >>>= 0, t || m(e, 8, this.length), i.read(this, e, !0, 52, 8); - }, u.prototype.readDoubleBE = function(e, t) { + }, u.prototype.readDoubleBE = function e(e, t) { return e >>>= 0, t || m(e, 8, this.length), i.read(this, e, !1, 52, 8); - }, u.prototype.writeUIntLE = function(e, t, r, n) { + }, u.prototype.writeUIntLE = function e(e, t, r, n) { if (e = +e, t >>>= 0, r >>>= 0, !n) { var i = Math.pow(2, 8 * r) - 1; D(this, e, t, r, i, 0); @@ -20269,7 +20269,7 @@ var o = 1, a = 0; for(this[t] = 255 & e; ++a < r && (o *= 256);)this[t + a] = e / o & 255; return t + r; - }, u.prototype.writeUIntBE = function(e, t, r, n) { + }, u.prototype.writeUIntBE = function e(e, t, r, n) { if (e = +e, t >>>= 0, r >>>= 0, !n) { var i = Math.pow(2, 8 * r) - 1; D(this, e, t, r, i, 0); @@ -20277,17 +20277,17 @@ var o = r - 1, a = 1; for(this[t + o] = 255 & e; --o >= 0 && (a *= 256);)this[t + o] = e / a & 255; return t + r; - }, u.prototype.writeUInt8 = function(e, t, r) { + }, u.prototype.writeUInt8 = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1; - }, u.prototype.writeUInt16LE = function(e, t, r) { + }, u.prototype.writeUInt16LE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 2, 65535, 0), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2; - }, u.prototype.writeUInt16BE = function(e, t, r) { + }, u.prototype.writeUInt16BE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2; - }, u.prototype.writeUInt32LE = function(e, t, r) { + }, u.prototype.writeUInt32LE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e, t + 4; - }, u.prototype.writeUInt32BE = function(e, t, r) { + }, u.prototype.writeUInt32BE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4; - }, u.prototype.writeIntLE = function(e, t, r, n) { + }, u.prototype.writeIntLE = function e(e, t, r, n) { if (e = +e, t >>>= 0, !n) { var i = Math.pow(2, 8 * r - 1); D(this, e, t, r, i - 1, -i); @@ -20295,7 +20295,7 @@ var o = 0, a = 1, u = 0; for(this[t] = 255 & e; ++o < r && (a *= 256);)e < 0 && 0 === u && 0 !== this[t + o - 1] && (u = 1), this[t + o] = (e / a >> 0) - u & 255; return t + r; - }, u.prototype.writeIntBE = function(e, t, r, n) { + }, u.prototype.writeIntBE = function e(e, t, r, n) { if (e = +e, t >>>= 0, !n) { var i = Math.pow(2, 8 * r - 1); D(this, e, t, r, i - 1, -i); @@ -20303,25 +20303,25 @@ var o = r - 1, a = 1, u = 0; for(this[t + o] = 255 & e; --o >= 0 && (a *= 256);)e < 0 && 0 === u && 0 !== this[t + o + 1] && (u = 1), this[t + o] = (e / a >> 0) - u & 255; return t + r; - }, u.prototype.writeInt8 = function(e, t, r) { + }, u.prototype.writeInt8 = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1; - }, u.prototype.writeInt16LE = function(e, t, r) { + }, u.prototype.writeInt16LE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 2, 32767, -32768), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2; - }, u.prototype.writeInt16BE = function(e, t, r) { + }, u.prototype.writeInt16BE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2; - }, u.prototype.writeInt32LE = function(e, t, r) { + }, u.prototype.writeInt32LE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 4, 2147483647, -2147483648), this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4; - }, u.prototype.writeInt32BE = function(e, t, r) { + }, u.prototype.writeInt32BE = function e(e, t, r) { return e = +e, t >>>= 0, r || D(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4; - }, u.prototype.writeFloatLE = function(e, t, r) { + }, u.prototype.writeFloatLE = function e(e, t, r) { return E(this, e, t, !0, r); - }, u.prototype.writeFloatBE = function(e, t, r) { + }, u.prototype.writeFloatBE = function e(e, t, r) { return E(this, e, t, !1, r); - }, u.prototype.writeDoubleLE = function(e, t, r) { + }, u.prototype.writeDoubleLE = function e(e, t, r) { return _(this, e, t, !0, r); - }, u.prototype.writeDoubleBE = function(e, t, r) { + }, u.prototype.writeDoubleBE = function e(e, t, r) { return _(this, e, t, !1, r); - }, u.prototype.copy = function(e, t, r, n) { + }, u.prototype.copy = function e(e, t, r, n) { if (!u.isBuffer(e)) throw TypeError("argument should be a Buffer"); if (r || (r = 0), n || 0 === n || (n = this.length), t >= e.length && (t = e.length), t || (t = 0), n > 0 && n < r && (n = r), n === r || 0 === e.length || 0 === this.length) return 0; if (t < 0) throw RangeError("targetStart out of bounds"); @@ -20333,7 +20333,7 @@ else if (this === e && r < t && t < n) for(var o = i - 1; o >= 0; --o)e[o + t] = this[o + r]; else Uint8Array.prototype.set.call(e, this.subarray(r, n), t); return i; - }, u.prototype.fill = function(e, t, r, n) { + }, u.prototype.fill = function e(e, t, r, n) { if ("string" == typeof e) { if ("string" == typeof t ? (n = t, t = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), void 0 !== n && "string" != typeof n) throw TypeError("encoding must be a string"); if ("string" == typeof n && !u.isEncoding(n)) throw TypeError("Unknown encoding: " + n); @@ -20452,15 +20452,15 @@ "use strict"; var t = { 182: function(e) { - var t, r = "object" == typeof Reflect ? Reflect : null, n = r && "function" == typeof r.apply ? r.apply : function(e, t, r) { + var t, r = "object" == typeof Reflect ? Reflect : null, n = r && "function" == typeof r.apply ? r.apply : function e(e, t, r) { return Function.prototype.apply.call(e, t, r); }; - t = r && "function" == typeof r.ownKeys ? r.ownKeys : Object.getOwnPropertySymbols ? function(e) { + t = r && "function" == typeof r.ownKeys ? r.ownKeys : Object.getOwnPropertySymbols ? function e(e) { return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)); - } : function(e) { + } : function e(e) { return Object.getOwnPropertyNames(e); }; - var i = Number.isNaN || function(e) { + var i = Number.isNaN || function e(e) { return e != e; }; function o() { @@ -20468,17 +20468,18 @@ } e.exports = o, e.exports.once = function(e, t) { return new Promise(function(r, n) { - function i(r) { - e.removeListener(t, o), n(r); + var i; + function o(r) { + e.removeListener(t, a), n(r); } - function o() { - "function" == typeof e.removeListener && e.removeListener("error", i), r([].slice.call(arguments)); + function a() { + "function" == typeof e.removeListener && e.removeListener("error", o), r([].slice.call(arguments)); } - y(e, t, o, { + y(e, t, a, { once: !0 - }), "error" !== t && "function" == typeof e.on && y(e, "error", i, { + }), "error" !== t && (i = o, "function" == typeof e.on && y(e, "error", i, { once: !0 - }); + })); }); }, o.EventEmitter = o, o.prototype._events = void 0, o.prototype._eventsCount = 0, o.prototype._maxListeners = void 0; var a = 10; @@ -20560,12 +20561,12 @@ } }), o.init = function() { (void 0 === this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; - }, o.prototype.setMaxListeners = function(e) { + }, o.prototype.setMaxListeners = function e(e) { if ("number" != typeof e || e < 0 || i(e)) throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + "."); return this._maxListeners = e, this; - }, o.prototype.getMaxListeners = function() { + }, o.prototype.getMaxListeners = function e() { return l(this); - }, o.prototype.emit = function(e) { + }, o.prototype.emit = function e(e) { for(var t = [], r = 1; r < arguments.length; r++)t.push(arguments[r]); var i = "error" === e, o = this._events; if (void 0 !== o) i = i && void 0 === o.error; @@ -20580,15 +20581,15 @@ if ("function" == typeof l) n(l, this, t); else for(var s = l.length, c = h(l, s), r = 0; r < s; ++r)n(c[r], this, t); return !0; - }, o.prototype.addListener = function(e, t) { + }, o.prototype.addListener = function e(e, t) { return s(this, e, t, !1); - }, o.prototype.on = o.prototype.addListener, o.prototype.prependListener = function(e, t) { + }, o.prototype.on = o.prototype.addListener, o.prototype.prependListener = function e(e, t) { return s(this, e, t, !0); - }, o.prototype.once = function(e, t) { + }, o.prototype.once = function e(e, t) { return u(t), this.on(e, f(this, e, t)), this; - }, o.prototype.prependOnceListener = function(e, t) { + }, o.prototype.prependOnceListener = function e(e, t) { return u(t), this.prependListener(e, f(this, e, t)), this; - }, o.prototype.removeListener = function(e, t) { + }, o.prototype.removeListener = function e(e, t) { var r, n, i, o, a; if (u(t), void 0 === (n = this._events) || void 0 === (r = n[e])) return this; if (r === t || r.listener === t) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete n[e], n.removeListener && this.emit("removeListener", e, r.listener || t)); @@ -20604,7 +20605,7 @@ }(r, i), 1 === r.length && (n[e] = r[0]), void 0 !== n.removeListener && this.emit("removeListener", e, a || t); } return this; - }, o.prototype.off = o.prototype.removeListener, o.prototype.removeAllListeners = function(e) { + }, o.prototype.off = o.prototype.removeListener, o.prototype.removeAllListeners = function e(e) { var t, r, n; if (void 0 === (r = this._events)) return this; if (void 0 === r.removeListener) return 0 == arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== r[e] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete r[e]), this; @@ -20616,13 +20617,13 @@ if ("function" == typeof (t = r[e])) this.removeListener(e, t); else if (void 0 !== t) for(n = t.length - 1; n >= 0; n--)this.removeListener(e, t[n]); return this; - }, o.prototype.listeners = function(e) { + }, o.prototype.listeners = function e(e) { return d(this, e, !0); - }, o.prototype.rawListeners = function(e) { + }, o.prototype.rawListeners = function e(e) { return d(this, e, !1); }, o.listenerCount = function(e, t) { return "function" == typeof e.listenerCount ? e.listenerCount(t) : p.call(e, t); - }, o.prototype.listenerCount = p, o.prototype.eventNames = function() { + }, o.prototype.listenerCount = p, o.prototype.eventNames = function e() { return this._eventsCount > 0 ? t(this._events) : []; }; } @@ -20754,7 +20755,7 @@ !function() { var t = { 526: function(e) { - "function" == typeof Object.create ? e.exports = function(e, t) { + "function" == typeof Object.create ? e.exports = function e(e, t) { t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: { value: e, @@ -20763,7 +20764,7 @@ configurable: !0 } })); - } : e.exports = function(e, t) { + } : e.exports = function e(e, t) { if (t) { e.super_ = t; var r = function() {}; @@ -20889,25 +20890,25 @@ } Object.defineProperty(c.prototype, "writableHighWaterMark", { enumerable: !1, - get: function() { + get: function e() { return this._writableState.highWaterMark; } }), Object.defineProperty(c.prototype, "writableBuffer", { enumerable: !1, - get: function() { + get: function e() { return this._writableState && this._writableState.getBuffer(); } }), Object.defineProperty(c.prototype, "writableLength", { enumerable: !1, - get: function() { + get: function e() { return this._writableState.length; } }), Object.defineProperty(c.prototype, "destroyed", { enumerable: !1, - get: function() { + get: function e() { return void 0 !== this._readableState && void 0 !== this._writableState && this._readableState.destroyed && this._writableState.destroyed; }, - set: function(e) { + set: function e(e) { void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e, this._writableState.destroyed = e); } }); @@ -20930,7 +20931,7 @@ var o, a, u, l, s, c = function(e, t) { return e.listeners(t).length; }, f = i(919), d = i(300).Buffer, p = r.g.Uint8Array || function() {}, h = i(837); - a = h && h.debuglog ? h.debuglog("stream") : function() {}; + a = h && h.debuglog ? h.debuglog("stream") : function e() {}; var y = i(914), g = i(364), v = i(322).getHighWaterMark, b = i(833).q, m = b.ERR_INVALID_ARG_TYPE, D = b.ERR_STREAM_PUSH_AFTER_EOF, w = b.ERR_METHOD_NOT_IMPLEMENTED, E = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; i(526)(A, f); var _ = g.errorOrDestroy, x = [ @@ -21040,10 +21041,10 @@ } Object.defineProperty(A.prototype, "destroyed", { enumerable: !1, - get: function() { + get: function e() { return void 0 !== this._readableState && this._readableState.destroyed; }, - set: function(e) { + set: function e(e) { this._readableState && (this._readableState.destroyed = e); } }), A.prototype.destroy = g.destroy, A.prototype._undestroy = g.undestroy, A.prototype._destroy = function(e, t) { @@ -21163,8 +21164,8 @@ t.push(null); }), e.on("data", function(i) { a("wrapped data"), r.decoder && (i = r.decoder.write(i)), (!r.objectMode || null != i) && (r.objectMode || i && i.length) && (t.push(i) || (n = !0, e.pause())); - }), e)void 0 === this[i] && "function" == typeof e[i] && (this[i] = function(t) { - return function() { + }), e)void 0 === this[i] && "function" == typeof e[i] && (this[i] = function t(t) { + return function r() { return e[t].apply(e, arguments); }; }(i)); @@ -21176,25 +21177,25 @@ return void 0 === l && (l = i(771)), l(this); }), Object.defineProperty(A.prototype, "readableHighWaterMark", { enumerable: !1, - get: function() { + get: function e() { return this._readableState.highWaterMark; } }), Object.defineProperty(A.prototype, "readableBuffer", { enumerable: !1, - get: function() { + get: function e() { return this._readableState && this._readableState.buffer; } }), Object.defineProperty(A.prototype, "readableFlowing", { enumerable: !1, - get: function() { + get: function e() { return this._readableState.flowing; }, - set: function(e) { + set: function e(e) { this._readableState && (this._readableState.flowing = e); } }), A._fromList = N, Object.defineProperty(A.prototype, "readableLength", { enumerable: !1, - get: function() { + get: function e() { return this._readableState.length; } }), "function" == typeof Symbol && (A.from = function(e, t) { @@ -21335,22 +21336,22 @@ } return r; } - i(526)(A, s), S.prototype.getBuffer = function() { + i(526)(A, s), S.prototype.getBuffer = function e() { for(var e = this.bufferedRequest, t = []; e;)t.push(e), e = e.next; return t; }, function() { try { Object.defineProperty(S.prototype, "buffer", { - get: l.deprecate(function() { + get: l.deprecate(function e() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); } catch (e) {} }(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (u = Function.prototype[Symbol.hasInstance], Object.defineProperty(A, Symbol.hasInstance, { - value: function(e) { + value: function e(e) { return !!u.call(this, e) || this === A && e && e._writableState instanceof S; } - })) : u = function(e) { + })) : u = function e(e) { return e instanceof this; }, A.prototype.pipe = function() { _(this, new b()); @@ -21384,7 +21385,7 @@ }, A.prototype.uncork = function() { var e = this._writableState; !e.corked || (e.corked--, e.writing || e.corked || e.bufferProcessing || !e.bufferedRequest || O(this, e)); - }, A.prototype.setDefaultEncoding = function(e) { + }, A.prototype.setDefaultEncoding = function e(e) { if ("string" == typeof e && (e = e.toLowerCase()), !([ "hex", "utf8", @@ -21401,12 +21402,12 @@ return this._writableState.defaultEncoding = e, this; }, Object.defineProperty(A.prototype, "writableBuffer", { enumerable: !1, - get: function() { + get: function e() { return this._writableState && this._writableState.getBuffer(); } }), Object.defineProperty(A.prototype, "writableHighWaterMark", { enumerable: !1, - get: function() { + get: function e() { return this._writableState.highWaterMark; } }), A.prototype._write = function(e, t, r) { @@ -21416,15 +21417,15 @@ return "function" == typeof e ? (r = e, e = null, t = null) : "function" == typeof t && (r = t, t = null), null != e && this.write(e, t), o.corked && (o.corked = 1, this.uncork()), o.ending || (i = r, o.ending = !0, F(this, o), i && (o.finished ? n.nextTick(i) : this.once("finish", i)), o.ended = !0, this.writable = !1), this; }, Object.defineProperty(A.prototype, "writableLength", { enumerable: !1, - get: function() { + get: function e() { return this._writableState.length; } }), Object.defineProperty(A.prototype, "destroyed", { enumerable: !1, - get: function() { + get: function e() { return void 0 !== this._writableState && this._writableState.destroyed; }, - set: function(e) { + set: function e(e) { this._writableState && (this._writableState.destroyed = e); } }), A.prototype.destroy = d.destroy, A.prototype._undestroy = d.undestroy, A.prototype._destroy = function(e, t) { @@ -21462,7 +21463,7 @@ get stream () { return this[p]; }, - next: function() { + next: function e() { var e, t, r = this, i = this[s]; if (null !== i) return Promise.reject(i); if (this[c]) return Promise.resolve(h(void 0, !0)); @@ -21490,7 +21491,7 @@ } }, Symbol.asyncIterator, function() { return this; - }), i(o, "return", function() { + }), i(o, "return", function e() { var e = this; return new Promise(function(t, r) { e[p].destroy(null, function(e) { @@ -21519,7 +21520,7 @@ value: e._readableState.endEmitted, writable: !0 }), i(t, d, { - value: function(e, t) { + value: function e(e, t) { var n = r[p].read(); n ? (r[f] = null, r[u] = null, r[l] = null, e(h(n, !1))) : (r[u] = e, r[l] = t); }, @@ -21556,16 +21557,16 @@ } var o = r(300).Buffer, a = r(837).inspect, u = a && a.custom || "inspect"; e.exports = function() { - var e, t; - function r() { + var e, t, r; + function l() { !function(e, t) { if (!(e instanceof t)) throw TypeError("Cannot call a class as a function"); - }(this, r), this.head = null, this.tail = null, this.length = 0; + }(this, l), this.head = null, this.tail = null, this.length = 0; } - return e = [ + return e = l, t = [ { key: "push", - value: function(e) { + value: function e(e) { var t = { data: e, next: null @@ -21575,7 +21576,7 @@ }, { key: "unshift", - value: function(e) { + value: function e(e) { var t = { data: e, next: this.head @@ -21585,7 +21586,7 @@ }, { key: "shift", - value: function() { + value: function e() { if (0 !== this.length) { var e = this.head.data; return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e; @@ -21594,13 +21595,13 @@ }, { key: "clear", - value: function() { + value: function e() { this.head = this.tail = null, this.length = 0; } }, { key: "join", - value: function(e) { + value: function e(e) { if (0 === this.length) return ""; for(var t = this.head, r = "" + t.data; t = t.next;)r += e + t.data; return r; @@ -21608,7 +21609,7 @@ }, { key: "concat", - value: function(e) { + value: function e(e) { if (0 === this.length) return o.alloc(0); for(var t, r, n = o.allocUnsafe(e >>> 0), i = this.head, a = 0; i;)t = i.data, r = a, o.prototype.copy.call(t, n, r), a += i.data.length, i = i.next; return n; @@ -21616,20 +21617,20 @@ }, { key: "consume", - value: function(e, t) { + value: function e(e, t) { var r; return e < this.head.data.length ? (r = this.head.data.slice(0, e), this.head.data = this.head.data.slice(e)) : r = e === this.head.data.length ? this.shift() : t ? this._getString(e) : this._getBuffer(e), r; } }, { key: "first", - value: function() { + value: function e() { return this.head.data; } }, { key: "_getString", - value: function(e) { + value: function e(e) { var t = this.head, r = 1, n = t.data; for(e -= n.length; t = t.next;){ var i = t.data, o = e > i.length ? i.length : e; @@ -21644,7 +21645,7 @@ }, { key: "_getBuffer", - value: function(e) { + value: function e(e) { var t = o.allocUnsafe(e), r = this.head, n = 1; for(r.data.copy(t), e -= r.data.length; r = r.next;){ var i = r.data, a = e > i.length ? i.length : e; @@ -21659,7 +21660,7 @@ }, { key: u, - value: function(e, t) { + value: function e(e, t) { return a(this, function(e) { for(var t = 1; t < arguments.length; t++){ var r = null != arguments[t] ? arguments[t] : {}; @@ -21682,7 +21683,7 @@ })); } } - ], i(r.prototype, e), t && i(r, t), r; + ], i(e.prototype, t), r && i(e, r), l; }(); }, 364: function(e) { @@ -22098,7 +22099,7 @@ 749: function(e, t, r) { "use strict"; var n = r(91), i = r(112), o = i(n("String.prototype.indexOf")); - e.exports = function(e, t) { + e.exports = function e(e, t) { var r = n(e, !!t); return "function" == typeof r && o(e, ".prototype.") > -1 ? i(r) : r; }; @@ -22113,7 +22114,7 @@ } catch (e) { s = null; } - e.exports = function(e) { + e.exports = function e(e) { var t = u(n, a, arguments); return l && s && l(t, "length").configurable && s(t, "length", { value: 1 + c(0, e.length - (arguments.length - 1)) @@ -22452,7 +22453,7 @@ } throw new i("intrinsic " + e + " does not exist!"); }; - e.exports = function(e, t) { + e.exports = function e(e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var r = k(e), n = r.length > 0 ? r[0] : "", o = T("%" + n + "%", t), u = o.name, s = o.value, c = !1, f = o.alias; @@ -22481,7 +22482,7 @@ }, 219: function(e) { var t = Object.prototype.hasOwnProperty, r = Object.prototype.toString; - e.exports = function(e, n, i) { + e.exports = function e(e, n, i) { if ("[object Function]" !== r.call(n)) throw TypeError("iterator must be a function"); var o = e.length; if (o === +o) for(var a = 0; a < o; a++)n.call(i, e[a], a, e); @@ -22491,7 +22492,7 @@ 733: function(e) { "use strict"; var t = Array.prototype.slice, r = Object.prototype.toString; - e.exports = function(e) { + e.exports = function e(e) { var n, i = this; if ("function" != typeof i || "[object Function]" !== r.call(i)) throw TypeError("Function.prototype.bind called on incompatible " + i); for(var o = t.call(arguments, 1), a = Math.max(0, i.length - o.length), u = [], l = 0; l < a; l++)u.push("$" + l); @@ -22850,7 +22851,7 @@ } throw new i("intrinsic " + e + " does not exist!"); }; - e.exports = function(e, t) { + e.exports = function e(e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var r = A(e), n = r.length > 0 ? r[0] : "", o = k("%" + n + "%", t), u = o.name, s = o.value, c = !1, f = o.alias; @@ -22880,13 +22881,13 @@ 449: function(e, t, n) { "use strict"; var i = r.g.Symbol, o = n(545); - e.exports = function() { + e.exports = function e() { return "function" == typeof i && "function" == typeof Symbol && "symbol" == typeof i("foo") && "symbol" == typeof Symbol("bar") && o(); }; }, 545: function(e) { "use strict"; - e.exports = function() { + e.exports = function e() { if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; if ("symbol" == typeof Symbol.iterator) return !0; var e = {}, t = Symbol("test"), r = Object(t); @@ -22908,7 +22909,7 @@ e.exports = n.call(Function.call, Object.prototype.hasOwnProperty); }, 526: function(e) { - "function" == typeof Object.create ? e.exports = function(e, t) { + "function" == typeof Object.create ? e.exports = function e(e, t) { t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: { value: e, @@ -22917,7 +22918,7 @@ configurable: !0 } })); - } : e.exports = function(e, t) { + } : e.exports = function e(e, t) { if (t) { e.super_ = t; var r = function() {}; @@ -22944,13 +22945,13 @@ return Function("return function*() {}")(); } catch (e) {} }(), u = a ? o(a) : {}; - e.exports = function(e) { + e.exports = function e(e) { return "function" == typeof e && (!!n.test(r.call(e)) || (i ? o(e) === u : "[object GeneratorFunction]" === t.call(e))); }; }, 234: function(e, t, n) { "use strict"; - var i = n(219), o = n(627), a = n(749), u = a("Object.prototype.toString"), l = n(449)() && "symbol" == typeof Symbol.toStringTag, s = o(), c = a("Array.prototype.indexOf", !0) || function(e, t) { + var i = n(219), o = n(627), a = n(749), u = a("Object.prototype.toString"), l = n(449)() && "symbol" == typeof Symbol.toStringTag, s = o(), c = a("Array.prototype.indexOf", !0) || function e(e, t) { for(var r = 0; r < e.length; r += 1)if (e[r] === t) return r; return -1; }, f = a("String.prototype.slice"), d = {}, p = n(982), h = Object.getPrototypeOf; @@ -22968,7 +22969,7 @@ } catch (e) {} }), t; }; - e.exports = function(e) { + e.exports = function e(e) { return !!e && "object" == typeof e && (l ? !!p && y(e) : c(s, f(u(e), 8, -1)) > -1); }; }, @@ -22983,7 +22984,7 @@ e.exports = n; }, 536: function(e) { - e.exports = function(e) { + e.exports = function e(e) { return e instanceof n; }; }, @@ -23113,7 +23114,7 @@ }); }, 650: function(e, t, r) { - var n = Object.getOwnPropertyDescriptors || function(e) { + var n = Object.getOwnPropertyDescriptors || function e(e) { for(var t = Object.keys(e), r = {}, n = 0; n < t.length; n++)r[t[n]] = Object.getOwnPropertyDescriptor(e, t[n]); return r; }, o = /%[sdj%]/g; @@ -23396,7 +23397,7 @@ } return t(e); } - t.promisify = function(e) { + t.promisify = function e(e) { if ("function" != typeof e) throw TypeError('The "original" argument must be of type Function'); if (C && e[C]) { var t = e[C]; @@ -23466,7 +23467,7 @@ } catch (e) {} }), t; }, y = n(234); - e.exports = function(e) { + e.exports = function e(e) { return !!y(e) && (l ? h(e) : c(u(e), 8, -1)); }; }, @@ -23793,7 +23794,7 @@ } throw new i("intrinsic " + e + " does not exist!"); }; - e.exports = function(e, t) { + e.exports = function e(e, t) { if ("string" != typeof e || 0 === e.length) throw new a("intrinsic name must be a non-empty string"); if (arguments.length > 1 && "boolean" != typeof t) throw new a('"allowMissing" argument must be a boolean'); var r = A(e), n = r.length > 0 ? r[0] : "", i = k("%" + n + "%", t), o = i.name, u = i.value, s = !1, c = i.alias; @@ -23829,7 +23830,7 @@ 627: function(e, t, n) { "use strict"; var i = n(901); - e.exports = function() { + e.exports = function e() { return i([ "BigInt64Array", "BigUint64Array", @@ -23877,7 +23878,7 @@ var t = function(e) { return e != e; }; - e.exports = function(e, r) { + e.exports = function e(e, r) { return 0 === e && 0 === r ? 1 / e == 1 / r : !!(e === r || t(e) && t(r)); }; }, @@ -23893,19 +23894,19 @@ 5624: function(e, t, r) { "use strict"; var n = r(4244); - e.exports = function() { + e.exports = function e() { return "function" == typeof Object.is ? Object.is : n; }; }, 2281: function(e, t, r) { "use strict"; var n = r(5624), i = r(4289); - e.exports = function() { + e.exports = function e() { var e = n(); return i(Object, { is: e }, { - is: function() { + is: function t() { return Object.is !== e; } }), e; @@ -23972,7 +23973,7 @@ return !1; } }; - n = function(e) { + n = function e(e) { var t = null !== e && "object" == typeof e, r = "[object Function]" === o.call(e), n = a(e), u = t && "[object String]" === o.call(e), f = []; if (!t && !r && !n) throw TypeError("Object.keys called on a non-object"); var d = s && r; @@ -23987,14 +23988,14 @@ }, 2215: function(e, t, r) { "use strict"; - var n = Array.prototype.slice, i = r(1414), o = Object.keys, a = o ? function(e) { + var n = Array.prototype.slice, i = r(1414), o = Object.keys, a = o ? function e(e) { return o(e); } : r(2), u = Object.keys; - a.shim = function() { + a.shim = function e() { return Object.keys ? !function() { var e = Object.keys(arguments); return e && e.length === arguments.length; - }(1, 2) && (Object.keys = function(e) { + }(1, 2) && (Object.keys = function e(e) { return i(e) ? u(n.call(e)) : u(e); }) : Object.keys = a, Object.keys || a; }, e.exports = a; @@ -24002,7 +24003,7 @@ 1414: function(e) { "use strict"; var t = Object.prototype.toString; - e.exports = function(e) { + e.exports = function e(e) { var r = t.call(e), n = "[object Arguments]" === r; return n || (n = "[object Array]" !== r && null !== e && "object" == typeof e && "number" == typeof e.length && e.length >= 0 && "[object Function]" === t.call(e.callee)), n; }; @@ -27365,7 +27366,7 @@ 3697: function(e, t, r) { "use strict"; var n = r(5972).functionsHaveConfigurableNames(), i = Object, o = TypeError; - e.exports = function() { + e.exports = function e() { if (this != null && this !== i(this)) throw new o("RegExp.prototype.flags getter called on non-object"); var e = ""; return this.hasIndices && (e += "d"), this.global && (e += "g"), this.ignoreCase && (e += "i"), this.multiline && (e += "m"), this.dotAll && (e += "s"), this.unicode && (e += "u"), this.sticky && (e += "y"), e; @@ -27385,7 +27386,7 @@ 1721: function(e, t, r) { "use strict"; var n = r(3697), i = r(4289).supportsDescriptors, o = Object.getOwnPropertyDescriptor; - e.exports = function() { + e.exports = function e() { if (i && "gim" === /a/gim.flags) { var e = o(RegExp.prototype, "flags"); if (e && "function" == typeof e.get && "boolean" == typeof RegExp.prototype.dotAll && "boolean" == typeof RegExp.prototype.hasIndices) { @@ -27407,7 +27408,7 @@ 2753: function(e, t, r) { "use strict"; var n = r(4289).supportsDescriptors, i = r(1721), o = Object.getOwnPropertyDescriptor, a = Object.defineProperty, u = TypeError, l = Object.getPrototypeOf, s = /a/; - e.exports = function() { + e.exports = function e() { if (!n || !l) throw new u("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors"); var e = i(), t = l(s), r = o(t, "flags"); return r && r.get === e || a(t, "flags", { @@ -27530,7 +27531,7 @@ (function() { var t, i; try { - i = r(Object(function() { + i = r(Object(function e() { var e = Error("Cannot find module 'iconv-lite'"); throw e.code = "MODULE_NOT_FOUND", e; }())); @@ -27601,7 +27602,7 @@ }; a = r(9681), t = r(2903); try { - o = r(Object(function() { + o = r(Object(function e() { var e = Error("Cannot find module 'iconv-lite'"); throw e.code = "MODULE_NOT_FOUND", e; }())); @@ -28002,7 +28003,7 @@ }, 6851: function(e, t, r) { "use strict"; - var n = r(5171), i = Array.prototype.concat, o = Array.prototype.slice, a = e.exports = function(e) { + var n = r(5171), i = Array.prototype.concat, o = Array.prototype.slice, a = e.exports = function e(e) { for(var t = [], r = 0, a = e.length; r < a; r++){ var u = e[r]; n(u) ? t = i.call(t, o.call(u)) : t.push(u); @@ -28258,7 +28259,7 @@ 5068: function(e, t, r) { "use strict"; function n(e, t) { - return (n = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { + return (n = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function e(e, t) { return e.__proto__ = t, e; })(e, t); } diff --git a/crates/swc_ecma_minifier/tests/fixture/next/styled-components/1/output.js b/crates/swc_ecma_minifier/tests/fixture/next/styled-components/1/output.js index 16dd1e9f31e5..be9e189d4114 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/styled-components/1/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/styled-components/1/output.js @@ -3494,12 +3494,14 @@ })(key, options1)(target[key], source[key], options1) : destination[key] = cloneUnlessOtherwiseSpecified(source[key], options1)); }), destination); } - deepmerge.all = function(array, options) { + deepmerge.all = function deepmergeAll(array, options) { if (!Array.isArray(array)) throw Error("first argument should be an array"); return array.reduce(function(prev, next) { return deepmerge(prev, next, options); }, {}); - }, module.exports = deepmerge; + }; + var deepmerge_1 = deepmerge; + module.exports = deepmerge_1; }, 5202: function() { !function() { @@ -5858,9 +5860,9 @@ }; }, variant = function(_ref) { var _config, sx, scale = _ref.scale, _ref$prop = _ref.prop, _ref$variants = _ref.variants, variants = void 0 === _ref$variants ? {} : _ref$variants, key = _ref.key; - return (sx = Object.keys(variants).length ? function(value, scale, props) { + return (sx = Object.keys(variants).length ? function sx(value, scale, props) { return css_dist_index_esm(get(scale, value, null))(props.theme); - } : function(value, scale) { + } : function sx(value, scale) { return get(scale, value, null); }).scale = scale || key, sx.defaults = variants, createParser(((_config = {})[void 0 === _ref$prop ? "variant" : _ref$prop] = sx, _config)); }, buttonStyle = variant({ @@ -5909,10 +5911,10 @@ setSystemColorMode(isNight ? "night" : "day"); } if (media) { - if (void 0 !== media.addEventListener) return media.addEventListener("change", handleChange), function() { + if (void 0 !== media.addEventListener) return media.addEventListener("change", handleChange), function cleanup() { media.removeEventListener("change", handleChange); }; - if (void 0 !== media.addListener) return media.addListener(handleChange), function() { + if (void 0 !== media.addListener) return media.addListener(handleChange), function cleanup() { media.removeListener(handleChange); }; } @@ -5945,7 +5947,7 @@ theme, colorScheme ]); - return react.useEffect(function() { + return react.useEffect(function updateColorModeAfterServerPassthrough() { const resolvedColorModeOnClient = resolveColorMode(colorMode, systemColorMode); resolvedColorModePassthrough.current && (resolvedColorModePassthrough.current !== resolvedColorModeOnClient && window.setTimeout(()=>{ setColorMode(resolvedColorModeOnClient), setColorMode(colorMode); @@ -6443,7 +6445,7 @@ fontFamily: "normal", lineHeight: "default" }; - var ThemedApp = function() { + var lib_esm_BaseStyles = BaseStyles, ThemedApp = function() { var ref = (0, react.useState)(!1), render = ref[0], setRender = ref[1]; return (0, react.useEffect)(function() { console.log("PRERENDER: useEffect"), setRender(!0); @@ -6456,7 +6458,7 @@ }, _app = function() { return (0, jsx_runtime.jsx)(SSRProvider, { children: (0, jsx_runtime.jsx)(ThemeProvider, { - children: (0, jsx_runtime.jsx)(BaseStyles, { + children: (0, jsx_runtime.jsx)(lib_esm_BaseStyles, { children: (0, jsx_runtime.jsx)(ThemedApp, {}) }) }) @@ -6608,7 +6610,7 @@ module.exports = __webpack_require__(9921); }, 6774: function(module) { - module.exports = function(objA, objB, compare, compareContext) { + module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (void 0 !== ret) return !!ret; if (objA === objB) return !0; diff --git a/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js b/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js index d7d4ba6cbf1d..28ee677cfcde 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/wrap-contracts/output.js @@ -152,19 +152,19 @@ function move1(dest1, src1) { dest1.words = src1.words, dest1.length = src1.length, dest1.negative = src1.negative, dest1.red = src1.red; } - if (BN1.isBN = function(num1) { + if (BN1.isBN = function isBN1(num1) { return num1 instanceof BN1 || null !== num1 && 'object' == typeof num1 && num1.constructor.wordSize === BN1.wordSize && Array.isArray(num1.words); - }, BN1.max = function(left1, right1) { + }, BN1.max = function max1(left1, right1) { return left1.cmp(right1) > 0 ? left1 : right1; - }, BN1.min = function(left1, right1) { + }, BN1.min = function min1(left1, right1) { return 0 > left1.cmp(right1) ? left1 : right1; - }, BN1.prototype._init = function(number1, base1, endian1) { + }, BN1.prototype._init = function init1(number1, base1, endian1) { if ('number' == typeof number1) return this._initNumber(number1, base1, endian1); if ('object' == typeof number1) return this._initArray(number1, base1, endian1); 'hex' === base1 && (base1 = 16), assert1(base1 === (0 | base1) && base1 >= 2 && base1 <= 36); var start1 = 0; '-' === (number1 = number1.toString().replace(/\s+/g, ''))[0] && (start1++, this.negative = 1), start1 < number1.length && (16 === base1 ? this._parseHex(number1, start1, endian1) : (this._parseBase(number1, base1, start1), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1))); - }, BN1.prototype._initNumber = function(number1, base1, endian1) { + }, BN1.prototype._initNumber = function _initNumber1(number1, base1, endian1) { number1 < 0 && (this.negative = 1, number1 = -number1), number1 < 0x4000000 ? (this.words = [ 0x3ffffff & number1 ], this.length = 1) : number1 < 0x10000000000000 ? (this.words = [ @@ -175,7 +175,7 @@ number1 / 0x4000000 & 0x3ffffff, 1 ], this.length = 3), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1); - }, BN1.prototype._initArray = function(number1, base1, endian1) { + }, BN1.prototype._initArray = function _initArray1(number1, base1, endian1) { if (assert1('number' == typeof number1.length), number1.length <= 0) return this.words = [ 0 ], this.length = 1, this; @@ -185,14 +185,14 @@ if ('be' === endian1) for(i2 = number1.length - 1, j1 = 0; i2 >= 0; i2 -= 3)w19 = number1[i2] | number1[i2 - 1] << 8 | number1[i2 - 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); else if ('le' === endian1) for(i2 = 0, j1 = 0; i2 < number1.length; i2 += 3)w19 = number1[i2] | number1[i2 + 1] << 8 | number1[i2 + 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); return this._strip(); - }, BN1.prototype._parseHex = function(number1, start1, endian1) { + }, BN1.prototype._parseHex = function _parseHex1(number1, start1, endian1) { this.length = Math.ceil((number1.length - start1) / 6), this.words = Array(this.length); for(var w19, i2 = 0; i2 < this.length; i2++)this.words[i2] = 0; var off1 = 0, j1 = 0; if ('be' === endian1) for(i2 = number1.length - 1; i2 >= start1; i2 -= 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; else for(i2 = (number1.length - start1) % 2 == 0 ? start1 + 1 : start1; i2 < number1.length; i2 += 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; this._strip(); - }, BN1.prototype._parseBase = function(number1, base1, start1) { + }, BN1.prototype._parseBase = function _parseBase1(number1, base1, start1) { this.words = [ 0 ], this.length = 1; @@ -205,22 +205,22 @@ this.imuln(pow1), this.words[0] + word1 < 0x4000000 ? this.words[0] += word1 : this._iaddn(word1); } this._strip(); - }, BN1.prototype.copy = function(dest1) { + }, BN1.prototype.copy = function copy1(dest1) { dest1.words = Array(this.length); for(var i2 = 0; i2 < this.length; i2++)dest1.words[i2] = this.words[i2]; dest1.length = this.length, dest1.negative = this.negative, dest1.red = this.red; - }, BN1.prototype._move = function(dest1) { + }, BN1.prototype._move = function _move1(dest1) { move1(dest1, this); - }, BN1.prototype.clone = function() { + }, BN1.prototype.clone = function clone1() { var r3 = new BN1(null); return this.copy(r3), r3; - }, BN1.prototype._expand = function(size1) { + }, BN1.prototype._expand = function _expand1(size1) { for(; this.length < size1;)this.words[this.length++] = 0; return this; - }, BN1.prototype._strip = function() { + }, BN1.prototype._strip = function strip1() { for(; this.length > 1 && 0 === this.words[this.length - 1];)this.length--; return this._normSign(); - }, BN1.prototype._normSign = function() { + }, BN1.prototype._normSign = function _normSign1() { return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; }, 'undefined' != typeof Symbol && 'function' == typeof Symbol.for) try { BN1.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect1; @@ -335,7 +335,7 @@ 52521875, 60466176 ]; - BN1.prototype.toString = function(base1, padding1) { + BN1.prototype.toString = function toString1(base1, padding1) { if (padding1 = 0 | padding1 || 1, 16 === (base1 = base1 || 10) || 'hex' === base1) { out1 = ''; for(var out1, off1 = 0, carry1 = 0, i2 = 0; i2 < this.length; i2++){ @@ -357,14 +357,14 @@ return 0 !== this.negative && (out1 = '-' + out1), out1; } assert1(!1, 'Base should be between 2 and 36'); - }, BN1.prototype.toNumber = function() { + }, BN1.prototype.toNumber = function toNumber1() { var ret1 = this.words[0]; return 2 === this.length ? ret1 += 0x4000000 * this.words[1] : 3 === this.length && 0x01 === this.words[2] ? ret1 += 0x10000000000000 + 0x4000000 * this.words[1] : this.length > 2 && assert1(!1, 'Number can only safely store up to 53 bits'), 0 !== this.negative ? -ret1 : ret1; - }, BN1.prototype.toJSON = function() { + }, BN1.prototype.toJSON = function toJSON1() { return this.toString(16, 2); - }, Buffer1 && (BN1.prototype.toBuffer = function(endian1, length1) { + }, Buffer1 && (BN1.prototype.toBuffer = function toBuffer1(endian1, length1) { return this.toArrayLike(Buffer1, endian1, length1); - }), BN1.prototype.toArray = function(endian1, length1) { + }), BN1.prototype.toArray = function toArray1(endian1, length1) { return this.toArrayLike(Array, endian1, length1); }; var allocate1 = function(ArrayType1, size1) { @@ -392,100 +392,100 @@ } return 0 !== carry1 ? out1.words[k3] = 0 | carry1 : out1.length--, out1._strip(); } - BN1.prototype.toArrayLike = function(ArrayType1, endian1, length1) { + BN1.prototype.toArrayLike = function toArrayLike1(ArrayType1, endian1, length1) { this._strip(); var byteLength1 = this.byteLength(), reqLength1 = length1 || Math.max(1, byteLength1); assert1(byteLength1 <= reqLength1, 'byte array longer than desired length'), assert1(reqLength1 > 0, 'Requested array length <= 0'); var res1 = allocate1(ArrayType1, reqLength1); return this['_toArrayLike' + ('le' === endian1 ? 'LE' : 'BE')](res1, byteLength1), res1; - }, BN1.prototype._toArrayLikeLE = function(res1, byteLength1) { + }, BN1.prototype._toArrayLikeLE = function _toArrayLikeLE1(res1, byteLength1) { for(var position1 = 0, carry1 = 0, i2 = 0, shift1 = 0; i2 < this.length; i2++){ var word1 = this.words[i2] << shift1 | carry1; res1[position1++] = 0xff & word1, position1 < res1.length && (res1[position1++] = word1 >> 8 & 0xff), position1 < res1.length && (res1[position1++] = word1 >> 16 & 0xff), 6 === shift1 ? (position1 < res1.length && (res1[position1++] = word1 >> 24 & 0xff), carry1 = 0, shift1 = 0) : (carry1 = word1 >>> 24, shift1 += 2); } if (position1 < res1.length) for(res1[position1++] = carry1; position1 < res1.length;)res1[position1++] = 0; - }, BN1.prototype._toArrayLikeBE = function(res1, byteLength1) { + }, BN1.prototype._toArrayLikeBE = function _toArrayLikeBE1(res1, byteLength1) { for(var position1 = res1.length - 1, carry1 = 0, i2 = 0, shift1 = 0; i2 < this.length; i2++){ var word1 = this.words[i2] << shift1 | carry1; res1[position1--] = 0xff & word1, position1 >= 0 && (res1[position1--] = word1 >> 8 & 0xff), position1 >= 0 && (res1[position1--] = word1 >> 16 & 0xff), 6 === shift1 ? (position1 >= 0 && (res1[position1--] = word1 >> 24 & 0xff), carry1 = 0, shift1 = 0) : (carry1 = word1 >>> 24, shift1 += 2); } if (position1 >= 0) for(res1[position1--] = carry1; position1 >= 0;)res1[position1--] = 0; - }, Math.clz32 ? BN1.prototype._countBits = function(w19) { + }, Math.clz32 ? BN1.prototype._countBits = function _countBits1(w19) { return 32 - Math.clz32(w19); - } : BN1.prototype._countBits = function(w19) { + } : BN1.prototype._countBits = function _countBits1(w19) { var t3 = w19, r3 = 0; return t3 >= 0x1000 && (r3 += 13, t3 >>>= 13), t3 >= 0x40 && (r3 += 7, t3 >>>= 7), t3 >= 0x8 && (r3 += 4, t3 >>>= 4), t3 >= 0x02 && (r3 += 2, t3 >>>= 2), r3 + t3; - }, BN1.prototype._zeroBits = function(w19) { + }, BN1.prototype._zeroBits = function _zeroBits1(w19) { if (0 === w19) return 26; var t3 = w19, r3 = 0; return (0x1fff & t3) == 0 && (r3 += 13, t3 >>>= 13), (0x7f & t3) == 0 && (r3 += 7, t3 >>>= 7), (0xf & t3) == 0 && (r3 += 4, t3 >>>= 4), (0x3 & t3) == 0 && (r3 += 2, t3 >>>= 2), (0x1 & t3) == 0 && r3++, r3; - }, BN1.prototype.bitLength = function() { + }, BN1.prototype.bitLength = function bitLength1() { var w19 = this.words[this.length - 1], hi1 = this._countBits(w19); return (this.length - 1) * 26 + hi1; - }, BN1.prototype.zeroBits = function() { + }, BN1.prototype.zeroBits = function zeroBits1() { if (this.isZero()) return 0; for(var r3 = 0, i2 = 0; i2 < this.length; i2++){ var b10 = this._zeroBits(this.words[i2]); if (r3 += b10, 26 !== b10) break; } return r3; - }, BN1.prototype.byteLength = function() { + }, BN1.prototype.byteLength = function byteLength1() { return Math.ceil(this.bitLength() / 8); - }, BN1.prototype.toTwos = function(width1) { + }, BN1.prototype.toTwos = function toTwos1(width1) { return 0 !== this.negative ? this.abs().inotn(width1).iaddn(1) : this.clone(); - }, BN1.prototype.fromTwos = function(width1) { + }, BN1.prototype.fromTwos = function fromTwos1(width1) { return this.testn(width1 - 1) ? this.notn(width1).iaddn(1).ineg() : this.clone(); - }, BN1.prototype.isNeg = function() { + }, BN1.prototype.isNeg = function isNeg1() { return 0 !== this.negative; - }, BN1.prototype.neg = function() { + }, BN1.prototype.neg = function neg1() { return this.clone().ineg(); - }, BN1.prototype.ineg = function() { + }, BN1.prototype.ineg = function ineg1() { return this.isZero() || (this.negative ^= 1), this; - }, BN1.prototype.iuor = function(num1) { + }, BN1.prototype.iuor = function iuor1(num1) { for(; this.length < num1.length;)this.words[this.length++] = 0; for(var i2 = 0; i2 < num1.length; i2++)this.words[i2] = this.words[i2] | num1.words[i2]; return this._strip(); - }, BN1.prototype.ior = function(num1) { + }, BN1.prototype.ior = function ior1(num1) { return assert1((this.negative | num1.negative) == 0), this.iuor(num1); - }, BN1.prototype.or = function(num1) { + }, BN1.prototype.or = function or1(num1) { return this.length > num1.length ? this.clone().ior(num1) : num1.clone().ior(this); - }, BN1.prototype.uor = function(num1) { + }, BN1.prototype.uor = function uor1(num1) { return this.length > num1.length ? this.clone().iuor(num1) : num1.clone().iuor(this); - }, BN1.prototype.iuand = function(num1) { + }, BN1.prototype.iuand = function iuand1(num1) { var b10; b10 = this.length > num1.length ? num1 : this; for(var i2 = 0; i2 < b10.length; i2++)this.words[i2] = this.words[i2] & num1.words[i2]; return this.length = b10.length, this._strip(); - }, BN1.prototype.iand = function(num1) { + }, BN1.prototype.iand = function iand1(num1) { return assert1((this.negative | num1.negative) == 0), this.iuand(num1); - }, BN1.prototype.and = function(num1) { + }, BN1.prototype.and = function and1(num1) { return this.length > num1.length ? this.clone().iand(num1) : num1.clone().iand(this); - }, BN1.prototype.uand = function(num1) { + }, BN1.prototype.uand = function uand1(num1) { return this.length > num1.length ? this.clone().iuand(num1) : num1.clone().iuand(this); - }, BN1.prototype.iuxor = function(num1) { + }, BN1.prototype.iuxor = function iuxor1(num1) { this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); for(var a10, b10, i2 = 0; i2 < b10.length; i2++)this.words[i2] = a10.words[i2] ^ b10.words[i2]; if (this !== a10) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this.length = a10.length, this._strip(); - }, BN1.prototype.ixor = function(num1) { + }, BN1.prototype.ixor = function ixor1(num1) { return assert1((this.negative | num1.negative) == 0), this.iuxor(num1); - }, BN1.prototype.xor = function(num1) { + }, BN1.prototype.xor = function xor1(num1) { return this.length > num1.length ? this.clone().ixor(num1) : num1.clone().ixor(this); - }, BN1.prototype.uxor = function(num1) { + }, BN1.prototype.uxor = function uxor1(num1) { return this.length > num1.length ? this.clone().iuxor(num1) : num1.clone().iuxor(this); - }, BN1.prototype.inotn = function(width1) { + }, BN1.prototype.inotn = function inotn1(width1) { assert1('number' == typeof width1 && width1 >= 0); var bytesNeeded1 = 0 | Math.ceil(width1 / 26), bitsLeft1 = width1 % 26; this._expand(bytesNeeded1), bitsLeft1 > 0 && bytesNeeded1--; for(var i2 = 0; i2 < bytesNeeded1; i2++)this.words[i2] = 0x3ffffff & ~this.words[i2]; return bitsLeft1 > 0 && (this.words[i2] = ~this.words[i2] & 0x3ffffff >> 26 - bitsLeft1), this._strip(); - }, BN1.prototype.notn = function(width1) { + }, BN1.prototype.notn = function notn1(width1) { return this.clone().inotn(width1); - }, BN1.prototype.setn = function(bit1, val1) { + }, BN1.prototype.setn = function setn1(bit1, val1) { assert1('number' == typeof bit1 && bit1 >= 0); var off1 = bit1 / 26 | 0, wbit1 = bit1 % 26; return this._expand(off1 + 1), val1 ? this.words[off1] = this.words[off1] | 1 << wbit1 : this.words[off1] = this.words[off1] & ~(1 << wbit1), this._strip(); - }, BN1.prototype.iadd = function(num1) { + }, BN1.prototype.iadd = function iadd1(num1) { if (0 !== this.negative && 0 === num1.negative) return this.negative = 0, r3 = this.isub(num1), this.negative ^= 1, this._normSign(); if (0 === this.negative && 0 !== num1.negative) return num1.negative = 0, r3 = this.isub(num1), num1.negative = 1, r3._normSign(); this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); @@ -494,10 +494,10 @@ if (this.length = a10.length, 0 !== carry1) this.words[this.length] = carry1, this.length++; else if (a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this; - }, BN1.prototype.add = function(num1) { + }, BN1.prototype.add = function add1(num1) { var res1; return 0 !== num1.negative && 0 === this.negative ? (num1.negative = 0, res1 = this.sub(num1), num1.negative ^= 1, res1) : 0 === num1.negative && 0 !== this.negative ? (this.negative = 0, res1 = num1.sub(this), this.negative = 1, res1) : this.length > num1.length ? this.clone().iadd(num1) : num1.clone().iadd(this); - }, BN1.prototype.isub = function(num1) { + }, BN1.prototype.isub = function isub1(num1) { if (0 !== num1.negative) { num1.negative = 0; var a10, b10, r3 = this.iadd(num1); @@ -511,7 +511,7 @@ for(; 0 !== carry1 && i2 < a10.length; i2++)carry1 = (r3 = (0 | a10.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & r3; if (0 === carry1 && i2 < a10.length && a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this.length = Math.max(this.length, i2), a10 !== this && (this.negative = 1), this._strip(); - }, BN1.prototype.sub = function(num1) { + }, BN1.prototype.sub = function sub1(num1) { return this.clone().isub(num1); }; var comb10MulTo1 = function(self1, num1, out1) { @@ -575,47 +575,47 @@ function FFTM1(x3, y3) { this.x = x3, this.y = y3; } - Math.imul || (comb10MulTo1 = smallMulTo1), BN1.prototype.mulTo = function(num1, out1) { + Math.imul || (comb10MulTo1 = smallMulTo1), BN1.prototype.mulTo = function mulTo1(num1, out1) { var len3 = this.length + num1.length; return 10 === this.length && 10 === num1.length ? comb10MulTo1(this, num1, out1) : len3 < 63 ? smallMulTo1(this, num1, out1) : len3 < 1024 ? bigMulTo1(this, num1, out1) : jumboMulTo1(this, num1, out1); - }, FFTM1.prototype.makeRBT = function(N1) { + }, FFTM1.prototype.makeRBT = function makeRBT1(N1) { for(var t3 = Array(N1), l1 = BN1.prototype._countBits(N1) - 1, i2 = 0; i2 < N1; i2++)t3[i2] = this.revBin(i2, l1, N1); return t3; - }, FFTM1.prototype.revBin = function(x3, l1, N1) { + }, FFTM1.prototype.revBin = function revBin1(x3, l1, N1) { if (0 === x3 || x3 === N1 - 1) return x3; for(var rb1 = 0, i2 = 0; i2 < l1; i2++)rb1 |= (1 & x3) << l1 - i2 - 1, x3 >>= 1; return rb1; - }, FFTM1.prototype.permute = function(rbt1, rws1, iws1, rtws1, itws1, N1) { + }, FFTM1.prototype.permute = function permute1(rbt1, rws1, iws1, rtws1, itws1, N1) { for(var i2 = 0; i2 < N1; i2++)rtws1[i2] = rws1[rbt1[i2]], itws1[i2] = iws1[rbt1[i2]]; - }, FFTM1.prototype.transform = function(rws1, iws1, rtws1, itws1, N1, rbt1) { + }, FFTM1.prototype.transform = function transform1(rws1, iws1, rtws1, itws1, N1, rbt1) { this.permute(rbt1, rws1, iws1, rtws1, itws1, N1); for(var s3 = 1; s3 < N1; s3 <<= 1)for(var l1 = s3 << 1, rtwdf1 = Math.cos(2 * Math.PI / l1), itwdf1 = Math.sin(2 * Math.PI / l1), p3 = 0; p3 < N1; p3 += l1)for(var rtwdf_1 = rtwdf1, itwdf_1 = itwdf1, j1 = 0; j1 < s3; j1++){ var re1 = rtws1[p3 + j1], ie1 = itws1[p3 + j1], ro1 = rtws1[p3 + j1 + s3], io1 = itws1[p3 + j1 + s3], rx1 = rtwdf_1 * ro1 - itwdf_1 * io1; io1 = rtwdf_1 * io1 + itwdf_1 * ro1, ro1 = rx1, rtws1[p3 + j1] = re1 + ro1, itws1[p3 + j1] = ie1 + io1, rtws1[p3 + j1 + s3] = re1 - ro1, itws1[p3 + j1 + s3] = ie1 - io1, j1 !== l1 && (rx1 = rtwdf1 * rtwdf_1 - itwdf1 * itwdf_1, itwdf_1 = rtwdf1 * itwdf_1 + itwdf1 * rtwdf_1, rtwdf_1 = rx1); } - }, FFTM1.prototype.guessLen13b = function(n2, m1) { + }, FFTM1.prototype.guessLen13b = function guessLen13b1(n2, m1) { var N1 = 1 | Math.max(m1, n2), odd1 = 1 & N1, i2 = 0; for(N1 = N1 / 2 | 0; N1; N1 >>>= 1)i2++; return 1 << i2 + 1 + odd1; - }, FFTM1.prototype.conjugate = function(rws1, iws1, N1) { + }, FFTM1.prototype.conjugate = function conjugate1(rws1, iws1, N1) { if (!(N1 <= 1)) for(var i2 = 0; i2 < N1 / 2; i2++){ var t3 = rws1[i2]; rws1[i2] = rws1[N1 - i2 - 1], rws1[N1 - i2 - 1] = t3, t3 = iws1[i2], iws1[i2] = -iws1[N1 - i2 - 1], iws1[N1 - i2 - 1] = -t3; } - }, FFTM1.prototype.normalize13b = function(ws1, N1) { + }, FFTM1.prototype.normalize13b = function normalize13b1(ws1, N1) { for(var carry1 = 0, i2 = 0; i2 < N1 / 2; i2++){ var w19 = 0x2000 * Math.round(ws1[2 * i2 + 1] / N1) + Math.round(ws1[2 * i2] / N1) + carry1; ws1[i2] = 0x3ffffff & w19, carry1 = w19 < 0x4000000 ? 0 : w19 / 0x4000000 | 0; } return ws1; - }, FFTM1.prototype.convert13b = function(ws1, len3, rws1, N1) { + }, FFTM1.prototype.convert13b = function convert13b1(ws1, len3, rws1, N1) { for(var carry1 = 0, i2 = 0; i2 < len3; i2++)carry1 += 0 | ws1[i2], rws1[2 * i2] = 0x1fff & carry1, carry1 >>>= 13, rws1[2 * i2 + 1] = 0x1fff & carry1, carry1 >>>= 13; for(i2 = 2 * len3; i2 < N1; ++i2)rws1[i2] = 0; assert1(0 === carry1), assert1((-8192 & carry1) == 0); - }, FFTM1.prototype.stub = function(N1) { + }, FFTM1.prototype.stub = function stub1(N1) { for(var ph1 = Array(N1), i2 = 0; i2 < N1; i2++)ph1[i2] = 0; return ph1; - }, FFTM1.prototype.mulp = function(x3, y3, out1) { + }, FFTM1.prototype.mulp = function mulp1(x3, y3, out1) { var N1 = 2 * this.guessLen13b(x3.length, y3.length), rbt1 = this.makeRBT(N1), _1 = this.stub(N1), rws1 = Array(N1), rwst1 = Array(N1), iwst1 = Array(N1), nrws1 = Array(N1), nrwst1 = Array(N1), niwst1 = Array(N1), rmws1 = out1.words; rmws1.length = N1, this.convert13b(x3.words, x3.length, rws1, N1), this.convert13b(y3.words, y3.length, nrws1, N1), this.transform(rws1, _1, rwst1, iwst1, N1, rbt1), this.transform(nrws1, _1, nrwst1, niwst1, N1, rbt1); for(var i2 = 0; i2 < N1; i2++){ @@ -623,15 +623,15 @@ iwst1[i2] = rwst1[i2] * niwst1[i2] + iwst1[i2] * nrwst1[i2], rwst1[i2] = rx1; } return this.conjugate(rwst1, iwst1, N1), this.transform(rwst1, iwst1, rmws1, _1, N1, rbt1), this.conjugate(rmws1, _1, N1), this.normalize13b(rmws1, N1), out1.negative = x3.negative ^ y3.negative, out1.length = x3.length + y3.length, out1._strip(); - }, BN1.prototype.mul = function(num1) { + }, BN1.prototype.mul = function mul1(num1) { var out1 = new BN1(null); return out1.words = Array(this.length + num1.length), this.mulTo(num1, out1); - }, BN1.prototype.mulf = function(num1) { + }, BN1.prototype.mulf = function mulf1(num1) { var out1 = new BN1(null); return out1.words = Array(this.length + num1.length), jumboMulTo1(this, num1, out1); - }, BN1.prototype.imul = function(num1) { + }, BN1.prototype.imul = function imul1(num1) { return this.clone().mulTo(num1, this); - }, BN1.prototype.imuln = function(num1) { + }, BN1.prototype.imuln = function imuln1(num1) { var isNegNum1 = num1 < 0; isNegNum1 && (num1 = -num1), assert1('number' == typeof num1), assert1(num1 < 0x4000000); for(var carry1 = 0, i2 = 0; i2 < this.length; i2++){ @@ -639,19 +639,19 @@ carry1 >>= 26, carry1 += (w19 / 0x4000000 | 0) + (lo1 >>> 26), this.words[i2] = 0x3ffffff & lo1; } return 0 !== carry1 && (this.words[i2] = carry1, this.length++), isNegNum1 ? this.ineg() : this; - }, BN1.prototype.muln = function(num1) { + }, BN1.prototype.muln = function muln1(num1) { return this.clone().imuln(num1); - }, BN1.prototype.sqr = function() { + }, BN1.prototype.sqr = function sqr1() { return this.mul(this); - }, BN1.prototype.isqr = function() { + }, BN1.prototype.isqr = function isqr1() { return this.imul(this.clone()); - }, BN1.prototype.pow = function(num1) { + }, BN1.prototype.pow = function pow1(num1) { var w19 = toBitArray1(num1); if (0 === w19.length) return new BN1(1); for(var res1 = this, i2 = 0; i2 < w19.length && 0 === w19[i2]; i2++, res1 = res1.sqr()); if (++i2 < w19.length) for(var q3 = res1.sqr(); i2 < w19.length; i2++, q3 = q3.sqr())0 !== w19[i2] && (res1 = res1.mul(q3)); return res1; - }, BN1.prototype.iushln = function(bits1) { + }, BN1.prototype.iushln = function iushln1(bits1) { assert1('number' == typeof bits1 && bits1 >= 0); var i2, r3 = bits1 % 26, s3 = (bits1 - r3) / 26, carryMask1 = 0x3ffffff >>> 26 - r3 << 26 - r3; if (0 !== r3) { @@ -668,9 +668,9 @@ this.length += s3; } return this._strip(); - }, BN1.prototype.ishln = function(bits1) { + }, BN1.prototype.ishln = function ishln1(bits1) { return assert1(0 === this.negative), this.iushln(bits1); - }, BN1.prototype.iushrn = function(bits1, hint1, extended1) { + }, BN1.prototype.iushrn = function iushrn1(bits1, hint1, extended1) { assert1('number' == typeof bits1 && bits1 >= 0), h8 = hint1 ? (hint1 - hint1 % 26) / 26 : 0; var h8, r3 = bits1 % 26, s3 = Math.min((bits1 - r3) / 26, this.length), mask1 = 0x3ffffff ^ 0x3ffffff >>> r3 << r3, maskedWords1 = extended1; if (h8 -= s3, h8 = Math.max(0, h8), maskedWords1) { @@ -686,21 +686,21 @@ this.words[i2] = carry1 << 26 - r3 | word1 >>> r3, carry1 = word1 & mask1; } return maskedWords1 && 0 !== carry1 && (maskedWords1.words[maskedWords1.length++] = carry1), 0 === this.length && (this.words[0] = 0, this.length = 1), this._strip(); - }, BN1.prototype.ishrn = function(bits1, hint1, extended1) { + }, BN1.prototype.ishrn = function ishrn1(bits1, hint1, extended1) { return assert1(0 === this.negative), this.iushrn(bits1, hint1, extended1); - }, BN1.prototype.shln = function(bits1) { + }, BN1.prototype.shln = function shln1(bits1) { return this.clone().ishln(bits1); - }, BN1.prototype.ushln = function(bits1) { + }, BN1.prototype.ushln = function ushln1(bits1) { return this.clone().iushln(bits1); - }, BN1.prototype.shrn = function(bits1) { + }, BN1.prototype.shrn = function shrn1(bits1) { return this.clone().ishrn(bits1); - }, BN1.prototype.ushrn = function(bits1) { + }, BN1.prototype.ushrn = function ushrn1(bits1) { return this.clone().iushrn(bits1); - }, BN1.prototype.testn = function(bit1) { + }, BN1.prototype.testn = function testn1(bit1) { assert1('number' == typeof bit1 && bit1 >= 0); var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; return !(this.length <= s3) && !!(this.words[s3] & q3); - }, BN1.prototype.imaskn = function(bits1) { + }, BN1.prototype.imaskn = function imaskn1(bits1) { assert1('number' == typeof bits1 && bits1 >= 0); var r3 = bits1 % 26, s3 = (bits1 - r3) / 26; if (assert1(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= s3) return this; @@ -709,29 +709,29 @@ this.words[this.length - 1] &= mask1; } return this._strip(); - }, BN1.prototype.maskn = function(bits1) { + }, BN1.prototype.maskn = function maskn1(bits1) { return this.clone().imaskn(bits1); - }, BN1.prototype.iaddn = function(num1) { + }, BN1.prototype.iaddn = function iaddn1(num1) { return (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) ? this.isubn(-num1) : 0 !== this.negative ? (1 === this.length && (0 | this.words[0]) <= num1 ? (this.words[0] = num1 - (0 | this.words[0]), this.negative = 0) : (this.negative = 0, this.isubn(num1), this.negative = 1), this) : this._iaddn(num1); - }, BN1.prototype._iaddn = function(num1) { + }, BN1.prototype._iaddn = function _iaddn1(num1) { this.words[0] += num1; for(var i2 = 0; i2 < this.length && this.words[i2] >= 0x4000000; i2++)this.words[i2] -= 0x4000000, i2 === this.length - 1 ? this.words[i2 + 1] = 1 : this.words[i2 + 1]++; return this.length = Math.max(this.length, i2 + 1), this; - }, BN1.prototype.isubn = function(num1) { + }, BN1.prototype.isubn = function isubn1(num1) { if (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) return this.iaddn(-num1); if (0 !== this.negative) return this.negative = 0, this.iaddn(num1), this.negative = 1, this; if (this.words[0] -= num1, 1 === this.length && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; else for(var i2 = 0; i2 < this.length && this.words[i2] < 0; i2++)this.words[i2] += 0x4000000, this.words[i2 + 1] -= 1; return this._strip(); - }, BN1.prototype.addn = function(num1) { + }, BN1.prototype.addn = function addn1(num1) { return this.clone().iaddn(num1); - }, BN1.prototype.subn = function(num1) { + }, BN1.prototype.subn = function subn1(num1) { return this.clone().isubn(num1); - }, BN1.prototype.iabs = function() { + }, BN1.prototype.iabs = function iabs1() { return this.negative = 0, this; - }, BN1.prototype.abs = function() { + }, BN1.prototype.abs = function abs1() { return this.clone().iabs(); - }, BN1.prototype._ishlnsubmul = function(num1, mul1, shift1) { + }, BN1.prototype._ishlnsubmul = function _ishlnsubmul1(num1, mul1, shift1) { var i2, w19, len3 = num1.length + shift1; this._expand(len3); var carry1 = 0; @@ -744,7 +744,7 @@ if (0 === carry1) return this._strip(); for(assert1(-1 === carry1), carry1 = 0, i2 = 0; i2 < this.length; i2++)carry1 = (w19 = -(0 | this.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & w19; return this.negative = 1, this._strip(); - }, BN1.prototype._wordDiv = function(num1, mode1) { + }, BN1.prototype._wordDiv = function _wordDiv1(num1, mode1) { var q3, shift1 = this.length - num1.length, a10 = this.clone(), b10 = num1, bhi1 = 0 | b10.words[b10.length - 1]; 0 != (shift1 = 26 - this._countBits(bhi1)) && (b10 = b10.ushln(shift1), a10.iushln(shift1), bhi1 = 0 | b10.words[b10.length - 1]); var m1 = a10.length - b10.length; @@ -763,7 +763,7 @@ div: q3 || null, mod: a10 }; - }, BN1.prototype.divmod = function(num1, mode1, positive1) { + }, BN1.prototype.divmod = function divmod1(num1, mode1, positive1) { var div1, mod1, res1; return (assert1(!num1.isZero()), this.isZero()) ? { div: new BN1(0), @@ -790,25 +790,25 @@ div: this.divn(num1.words[0]), mod: new BN1(this.modrn(num1.words[0])) } : this._wordDiv(num1, mode1); - }, BN1.prototype.div = function(num1) { + }, BN1.prototype.div = function div1(num1) { return this.divmod(num1, 'div', !1).div; - }, BN1.prototype.mod = function(num1) { + }, BN1.prototype.mod = function mod1(num1) { return this.divmod(num1, 'mod', !1).mod; - }, BN1.prototype.umod = function(num1) { + }, BN1.prototype.umod = function umod1(num1) { return this.divmod(num1, 'mod', !0).mod; - }, BN1.prototype.divRound = function(num1) { + }, BN1.prototype.divRound = function divRound1(num1) { var dm1 = this.divmod(num1); if (dm1.mod.isZero()) return dm1.div; var mod1 = 0 !== dm1.div.negative ? dm1.mod.isub(num1) : dm1.mod, half1 = num1.ushrn(1), r21 = num1.andln(1), cmp1 = mod1.cmp(half1); return cmp1 < 0 || 1 === r21 && 0 === cmp1 ? dm1.div : 0 !== dm1.div.negative ? dm1.div.isubn(1) : dm1.div.iaddn(1); - }, BN1.prototype.modrn = function(num1) { + }, BN1.prototype.modrn = function modrn1(num1) { var isNegNum1 = num1 < 0; isNegNum1 && (num1 = -num1), assert1(num1 <= 0x3ffffff); for(var p3 = 67108864 % num1, acc1 = 0, i2 = this.length - 1; i2 >= 0; i2--)acc1 = (p3 * acc1 + (0 | this.words[i2])) % num1; return isNegNum1 ? -acc1 : acc1; - }, BN1.prototype.modn = function(num1) { + }, BN1.prototype.modn = function modn1(num1) { return this.modrn(num1); - }, BN1.prototype.idivn = function(num1) { + }, BN1.prototype.idivn = function idivn1(num1) { var isNegNum1 = num1 < 0; isNegNum1 && (num1 = -num1), assert1(num1 <= 0x3ffffff); for(var carry1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ @@ -816,9 +816,9 @@ this.words[i2] = w19 / num1 | 0, carry1 = w19 % num1; } return this._strip(), isNegNum1 ? this.ineg() : this; - }, BN1.prototype.divn = function(num1) { + }, BN1.prototype.divn = function divn1(num1) { return this.clone().idivn(num1); - }, BN1.prototype.egcd = function(p3) { + }, BN1.prototype.egcd = function egcd1(p3) { assert1(0 === p3.negative), assert1(!p3.isZero()); var x3 = this, y3 = p3.clone(); x3 = 0 !== x3.negative ? x3.umod(p3) : x3.clone(); @@ -835,7 +835,7 @@ b: D1, gcd: y3.iushln(g3) }; - }, BN1.prototype._invmp = function(p3) { + }, BN1.prototype._invmp = function _invmp1(p3) { assert1(0 === p3.negative), assert1(!p3.isZero()); var res1, a10 = this, b10 = p3.clone(); a10 = 0 !== a10.negative ? a10.umod(p3) : a10.clone(); @@ -847,7 +847,7 @@ a10.cmp(b10) >= 0 ? (a10.isub(b10), x11.isub(x21)) : (b10.isub(a10), x21.isub(x11)); } return 0 > (res1 = 0 === a10.cmpn(1) ? x11 : x21).cmpn(0) && res1.iadd(p3), res1; - }, BN1.prototype.gcd = function(num1) { + }, BN1.prototype.gcd = function gcd1(num1) { if (this.isZero()) return num1.abs(); if (num1.isZero()) return this.abs(); var a10 = this.clone(), b10 = num1.clone(); @@ -864,15 +864,15 @@ a10.isub(b10); } return b10.iushln(shift1); - }, BN1.prototype.invm = function(num1) { + }, BN1.prototype.invm = function invm1(num1) { return this.egcd(num1).a.umod(num1); - }, BN1.prototype.isEven = function() { + }, BN1.prototype.isEven = function isEven1() { return (1 & this.words[0]) == 0; - }, BN1.prototype.isOdd = function() { + }, BN1.prototype.isOdd = function isOdd1() { return (1 & this.words[0]) == 1; - }, BN1.prototype.andln = function(num1) { + }, BN1.prototype.andln = function andln1(num1) { return this.words[0] & num1; - }, BN1.prototype.bincn = function(bit1) { + }, BN1.prototype.bincn = function bincn1(bit1) { assert1('number' == typeof bit1); var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; if (this.length <= s3) return this._expand(s3 + 1), this.words[s3] |= q3, this; @@ -881,9 +881,9 @@ w19 += carry1, carry1 = w19 >>> 26, w19 &= 0x3ffffff, this.words[i2] = w19; } return 0 !== carry1 && (this.words[i2] = carry1, this.length++), this; - }, BN1.prototype.isZero = function() { + }, BN1.prototype.isZero = function isZero1() { return 1 === this.length && 0 === this.words[0]; - }, BN1.prototype.cmpn = function(num1) { + }, BN1.prototype.cmpn = function cmpn1(num1) { var res1, negative1 = num1 < 0; if (0 !== this.negative && !negative1) return -1; if (0 === this.negative && negative1) return 1; @@ -894,12 +894,12 @@ res1 = w19 === num1 ? 0 : w19 < num1 ? -1 : 1; } return 0 !== this.negative ? 0 | -res1 : res1; - }, BN1.prototype.cmp = function(num1) { + }, BN1.prototype.cmp = function cmp1(num1) { if (0 !== this.negative && 0 === num1.negative) return -1; if (0 === this.negative && 0 !== num1.negative) return 1; var res1 = this.ucmp(num1); return 0 !== this.negative ? 0 | -res1 : res1; - }, BN1.prototype.ucmp = function(num1) { + }, BN1.prototype.ucmp = function ucmp1(num1) { if (this.length > num1.length) return 1; if (this.length < num1.length) return -1; for(var res1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ @@ -910,61 +910,61 @@ } } return res1; - }, BN1.prototype.gtn = function(num1) { + }, BN1.prototype.gtn = function gtn1(num1) { return 1 === this.cmpn(num1); - }, BN1.prototype.gt = function(num1) { + }, BN1.prototype.gt = function gt1(num1) { return 1 === this.cmp(num1); - }, BN1.prototype.gten = function(num1) { + }, BN1.prototype.gten = function gten1(num1) { return this.cmpn(num1) >= 0; - }, BN1.prototype.gte = function(num1) { + }, BN1.prototype.gte = function gte1(num1) { return this.cmp(num1) >= 0; - }, BN1.prototype.ltn = function(num1) { + }, BN1.prototype.ltn = function ltn1(num1) { return -1 === this.cmpn(num1); - }, BN1.prototype.lt = function(num1) { + }, BN1.prototype.lt = function lt1(num1) { return -1 === this.cmp(num1); - }, BN1.prototype.lten = function(num1) { + }, BN1.prototype.lten = function lten1(num1) { return 0 >= this.cmpn(num1); - }, BN1.prototype.lte = function(num1) { + }, BN1.prototype.lte = function lte1(num1) { return 0 >= this.cmp(num1); - }, BN1.prototype.eqn = function(num1) { + }, BN1.prototype.eqn = function eqn1(num1) { return 0 === this.cmpn(num1); - }, BN1.prototype.eq = function(num1) { + }, BN1.prototype.eq = function eq1(num1) { return 0 === this.cmp(num1); - }, BN1.red = function(num1) { + }, BN1.red = function red1(num1) { return new Red1(num1); - }, BN1.prototype.toRed = function(ctx1) { + }, BN1.prototype.toRed = function toRed1(ctx1) { return assert1(!this.red, 'Already a number in reduction context'), assert1(0 === this.negative, 'red works only with positives'), ctx1.convertTo(this)._forceRed(ctx1); - }, BN1.prototype.fromRed = function() { + }, BN1.prototype.fromRed = function fromRed1() { return assert1(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }, BN1.prototype._forceRed = function(ctx1) { + }, BN1.prototype._forceRed = function _forceRed1(ctx1) { return this.red = ctx1, this; - }, BN1.prototype.forceRed = function(ctx1) { + }, BN1.prototype.forceRed = function forceRed1(ctx1) { return assert1(!this.red, 'Already a number in reduction context'), this._forceRed(ctx1); - }, BN1.prototype.redAdd = function(num1) { + }, BN1.prototype.redAdd = function redAdd1(num1) { return assert1(this.red, 'redAdd works only with red numbers'), this.red.add(this, num1); - }, BN1.prototype.redIAdd = function(num1) { + }, BN1.prototype.redIAdd = function redIAdd1(num1) { return assert1(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, num1); - }, BN1.prototype.redSub = function(num1) { + }, BN1.prototype.redSub = function redSub1(num1) { return assert1(this.red, 'redSub works only with red numbers'), this.red.sub(this, num1); - }, BN1.prototype.redISub = function(num1) { + }, BN1.prototype.redISub = function redISub1(num1) { return assert1(this.red, 'redISub works only with red numbers'), this.red.isub(this, num1); - }, BN1.prototype.redShl = function(num1) { + }, BN1.prototype.redShl = function redShl1(num1) { return assert1(this.red, 'redShl works only with red numbers'), this.red.shl(this, num1); - }, BN1.prototype.redMul = function(num1) { + }, BN1.prototype.redMul = function redMul1(num1) { return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.mul(this, num1); - }, BN1.prototype.redIMul = function(num1) { + }, BN1.prototype.redIMul = function redIMul1(num1) { return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.imul(this, num1); - }, BN1.prototype.redSqr = function() { + }, BN1.prototype.redSqr = function redSqr1() { return assert1(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }, BN1.prototype.redISqr = function() { + }, BN1.prototype.redISqr = function redISqr1() { return assert1(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }, BN1.prototype.redSqrt = function() { + }, BN1.prototype.redSqrt = function redSqrt1() { return assert1(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }, BN1.prototype.redInvm = function() { + }, BN1.prototype.redInvm = function redInvm1() { return assert1(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }, BN1.prototype.redNeg = function() { + }, BN1.prototype.redNeg = function redNeg1() { return assert1(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }, BN1.prototype.redPow = function(num1) { + }, BN1.prototype.redPow = function redPow1(num1) { return assert1(this.red && !num1.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, num1); }; var primes1 = { @@ -997,20 +997,20 @@ function Mont1(m1) { Red1.call(this, m1), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new BN1(1).iushln(this.shift), this.r2 = this.imod(this.r.sqr()), this.rinv = this.r._invmp(this.m), this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), this.minv = this.minv.umod(this.r), this.minv = this.r.sub(this.minv); } - MPrime1.prototype._tmp = function() { + MPrime1.prototype._tmp = function _tmp1() { var tmp1 = new BN1(null); return tmp1.words = Array(Math.ceil(this.n / 13)), tmp1; - }, MPrime1.prototype.ireduce = function(num1) { + }, MPrime1.prototype.ireduce = function ireduce1(num1) { var rlen1, r3 = num1; do this.split(r3, this.tmp), rlen1 = (r3 = (r3 = this.imulK(r3)).iadd(this.tmp)).bitLength(); while (rlen1 > this.n) var cmp1 = rlen1 < this.n ? -1 : r3.ucmp(this.p); return 0 === cmp1 ? (r3.words[0] = 0, r3.length = 1) : cmp1 > 0 ? r3.isub(this.p) : void 0 !== r3.strip ? r3.strip() : r3._strip(), r3; - }, MPrime1.prototype.split = function(input1, out1) { + }, MPrime1.prototype.split = function split1(input1, out1) { input1.iushrn(this.n, 0, out1); - }, MPrime1.prototype.imulK = function(num1) { + }, MPrime1.prototype.imulK = function imulK1(num1) { return num1.imul(this.k); - }, inherits1(K2561, MPrime1), K2561.prototype.split = function(input1, output1) { + }, inherits1(K2561, MPrime1), K2561.prototype.split = function split1(input1, output1) { for(var mask1 = 0x3fffff, outLen1 = Math.min(input1.length, 9), i2 = 0; i2 < outLen1; i2++)output1.words[i2] = input1.words[i2]; if (output1.length = outLen1, input1.length <= 9) { input1.words[0] = 0, input1.length = 1; @@ -1022,20 +1022,20 @@ input1.words[i2 - 10] = (next1 & mask1) << 4 | prev1 >>> 22, prev1 = next1; } prev1 >>>= 22, input1.words[i2 - 10] = prev1, 0 === prev1 && input1.length > 10 ? input1.length -= 10 : input1.length -= 9; - }, K2561.prototype.imulK = function(num1) { + }, K2561.prototype.imulK = function imulK1(num1) { num1.words[num1.length] = 0, num1.words[num1.length + 1] = 0, num1.length += 2; for(var lo1 = 0, i2 = 0; i2 < num1.length; i2++){ var w19 = 0 | num1.words[i2]; lo1 += 0x3d1 * w19, num1.words[i2] = 0x3ffffff & lo1, lo1 = 0x40 * w19 + (lo1 / 0x4000000 | 0); } return 0 === num1.words[num1.length - 1] && (num1.length--, 0 === num1.words[num1.length - 1] && num1.length--), num1; - }, inherits1(P2241, MPrime1), inherits1(P1921, MPrime1), inherits1(P255191, MPrime1), P255191.prototype.imulK = function(num1) { + }, inherits1(P2241, MPrime1), inherits1(P1921, MPrime1), inherits1(P255191, MPrime1), P255191.prototype.imulK = function imulK1(num1) { for(var carry1 = 0, i2 = 0; i2 < num1.length; i2++){ var hi1 = (0 | num1.words[i2]) * 0x13 + carry1, lo1 = 0x3ffffff & hi1; hi1 >>>= 26, num1.words[i2] = lo1, carry1 = hi1; } return 0 !== carry1 && (num1.words[num1.length++] = carry1), num1; - }, BN1._prime = function(name1) { + }, BN1._prime = function prime1(name1) { var prime1; if (primes1[name1]) return primes1[name1]; if ('k256' === name1) prime1 = new K2561(); @@ -1044,41 +1044,41 @@ else if ('p25519' === name1) prime1 = new P255191(); else throw Error('Unknown prime ' + name1); return primes1[name1] = prime1, prime1; - }, Red1.prototype._verify1 = function(a10) { + }, Red1.prototype._verify1 = function _verify11(a10) { assert1(0 === a10.negative, 'red works only with positives'), assert1(a10.red, 'red works only with red numbers'); - }, Red1.prototype._verify2 = function(a10, b10) { + }, Red1.prototype._verify2 = function _verify21(a10, b10) { assert1((a10.negative | b10.negative) == 0, 'red works only with positives'), assert1(a10.red && a10.red === b10.red, 'red works only with red numbers'); - }, Red1.prototype.imod = function(a10) { + }, Red1.prototype.imod = function imod1(a10) { return this.prime ? this.prime.ireduce(a10)._forceRed(this) : (move1(a10, a10.umod(this.m)._forceRed(this)), a10); - }, Red1.prototype.neg = function(a10) { + }, Red1.prototype.neg = function neg1(a10) { return a10.isZero() ? a10.clone() : this.m.sub(a10)._forceRed(this); - }, Red1.prototype.add = function(a10, b10) { + }, Red1.prototype.add = function add1(a10, b10) { this._verify2(a10, b10); var res1 = a10.add(b10); return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1._forceRed(this); - }, Red1.prototype.iadd = function(a10, b10) { + }, Red1.prototype.iadd = function iadd1(a10, b10) { this._verify2(a10, b10); var res1 = a10.iadd(b10); return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1; - }, Red1.prototype.sub = function(a10, b10) { + }, Red1.prototype.sub = function sub1(a10, b10) { this._verify2(a10, b10); var res1 = a10.sub(b10); return 0 > res1.cmpn(0) && res1.iadd(this.m), res1._forceRed(this); - }, Red1.prototype.isub = function(a10, b10) { + }, Red1.prototype.isub = function isub1(a10, b10) { this._verify2(a10, b10); var res1 = a10.isub(b10); return 0 > res1.cmpn(0) && res1.iadd(this.m), res1; - }, Red1.prototype.shl = function(a10, num1) { + }, Red1.prototype.shl = function shl1(a10, num1) { return this._verify1(a10), this.imod(a10.ushln(num1)); - }, Red1.prototype.imul = function(a10, b10) { + }, Red1.prototype.imul = function imul1(a10, b10) { return this._verify2(a10, b10), this.imod(a10.imul(b10)); - }, Red1.prototype.mul = function(a10, b10) { + }, Red1.prototype.mul = function mul1(a10, b10) { return this._verify2(a10, b10), this.imod(a10.mul(b10)); - }, Red1.prototype.isqr = function(a10) { + }, Red1.prototype.isqr = function isqr1(a10) { return this.imul(a10, a10.clone()); - }, Red1.prototype.sqr = function(a10) { + }, Red1.prototype.sqr = function sqr1(a10) { return this.mul(a10, a10); - }, Red1.prototype.sqrt = function(a10) { + }, Red1.prototype.sqrt = function sqrt1(a10) { if (a10.isZero()) return a10.clone(); var mod31 = this.m.andln(3); if (assert1(mod31 % 2 == 1), 3 === mod31) { @@ -1096,10 +1096,10 @@ r3 = r3.redMul(b10), c5 = b10.redSqr(), t3 = t3.redMul(c5), m1 = i2; } return r3; - }, Red1.prototype.invm = function(a10) { + }, Red1.prototype.invm = function invm1(a10) { var inv1 = a10._invmp(this.m); return 0 !== inv1.negative ? (inv1.negative = 0, this.imod(inv1).redNeg()) : this.imod(inv1); - }, Red1.prototype.pow = function(a10, num1) { + }, Red1.prototype.pow = function pow1(a10, num1) { if (num1.isZero()) return new BN1(1).toRed(this); if (0 === num1.cmpn(1)) return a10.clone(); var windowSize1 = 4, wnd1 = Array(16); @@ -1118,28 +1118,28 @@ start1 = 26; } return res1; - }, Red1.prototype.convertTo = function(num1) { + }, Red1.prototype.convertTo = function convertTo1(num1) { var r3 = num1.umod(this.m); return r3 === num1 ? r3.clone() : r3; - }, Red1.prototype.convertFrom = function(num1) { + }, Red1.prototype.convertFrom = function convertFrom1(num1) { var res1 = num1.clone(); return res1.red = null, res1; - }, BN1.mont = function(num1) { + }, BN1.mont = function mont1(num1) { return new Mont1(num1); - }, inherits1(Mont1, Red1), Mont1.prototype.convertTo = function(num1) { + }, inherits1(Mont1, Red1), Mont1.prototype.convertTo = function convertTo1(num1) { return this.imod(num1.ushln(this.shift)); - }, Mont1.prototype.convertFrom = function(num1) { + }, Mont1.prototype.convertFrom = function convertFrom1(num1) { var r3 = this.imod(num1.mul(this.rinv)); return r3.red = null, r3; - }, Mont1.prototype.imul = function(a10, b10) { + }, Mont1.prototype.imul = function imul1(a10, b10) { if (a10.isZero() || b10.isZero()) return a10.words[0] = 0, a10.length = 1, a10; var t3 = a10.imul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); - }, Mont1.prototype.mul = function(a10, b10) { + }, Mont1.prototype.mul = function mul1(a10, b10) { if (a10.isZero() || b10.isZero()) return new BN1(0)._forceRed(this); var t3 = a10.mul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); - }, Mont1.prototype.invm = function(a10) { + }, Mont1.prototype.invm = function invm1(a10) { return this.imod(a10._invmp(this.m).mul(this.r2))._forceRed(this); }; }(module1 = __webpack_require__1.nmd(module1), this); @@ -3685,7 +3685,7 @@ return uploader1; } upload(upload1, data1) { - return __asyncGenerator1(this, arguments, function*() { + return __asyncGenerator1(this, arguments, function* upload_11() { const uploader1 = yield __await1(this.getUploader(upload1, data1)); for(; !uploader1.isComplete;)yield __await1(uploader1.uploadChunk()), yield yield __await1(uploader1); return yield __await1(uploader1); @@ -5008,7 +5008,7 @@ return uploader1; } upload(upload1, data1) { - return __asyncGenerator1(this, arguments, function*() { + return __asyncGenerator1(this, arguments, function* upload_11() { const uploader1 = yield __await1(this.getUploader(upload1, data1)); for(; !uploader1.isComplete;)yield __await1(uploader1.uploadChunk()), yield yield __await1(uploader1); return yield __await1(uploader1); @@ -5072,23 +5072,23 @@ function Entity1(name1, body1) { this.name = name1, this.body = body1, this.decoders = {}, this.encoders = {}; } - api1.define = function(name1, body1) { + api1.define = function define1(name1, body1) { return new Entity1(name1, body1); - }, Entity1.prototype._createNamed = function(Base1) { + }, Entity1.prototype._createNamed = function createNamed1(Base1) { const name1 = this.name; function Generated1(entity1) { this._initNamed(entity1, name1); } - return inherits1(Generated1, Base1), Generated1.prototype._initNamed = function(entity1, name1) { + return inherits1(Generated1, Base1), Generated1.prototype._initNamed = function _initNamed1(entity1, name1) { Base1.call(this, entity1, name1); }, new Generated1(this); - }, Entity1.prototype._getDecoder = function(enc1) { + }, Entity1.prototype._getDecoder = function _getDecoder1(enc1) { return enc1 = enc1 || 'der', this.decoders.hasOwnProperty(enc1) || (this.decoders[enc1] = this._createNamed(decoders1[enc1])), this.decoders[enc1]; - }, Entity1.prototype.decode = function(data1, enc1, options1) { + }, Entity1.prototype.decode = function decode1(data1, enc1, options1) { return this._getDecoder(enc1).decode(data1, options1); - }, Entity1.prototype._getEncoder = function(enc1) { + }, Entity1.prototype._getEncoder = function _getEncoder1(enc1) { return enc1 = enc1 || 'der', this.encoders.hasOwnProperty(enc1) || (this.encoders[enc1] = this._createNamed(encoders1[enc1])), this.encoders[enc1]; - }, Entity1.prototype.encode = function(data1, enc1, reporter1) { + }, Entity1.prototype.encode = function encode1(data1, enc1, reporter1) { return this._getEncoder(enc1).encode(data1, reporter1); }; }, @@ -5115,33 +5115,33 @@ this.value = value1, this.length = value1.length; } } - inherits1(DecoderBuffer1, Reporter1), exports1.C = DecoderBuffer1, DecoderBuffer1.isDecoderBuffer = function(data1) { + inherits1(DecoderBuffer1, Reporter1), exports1.C = DecoderBuffer1, DecoderBuffer1.isDecoderBuffer = function isDecoderBuffer1(data1) { if (data1 instanceof DecoderBuffer1) return !0; const isCompatible1 = 'object' == typeof data1 && Buffer1.isBuffer(data1.base) && 'DecoderBuffer' === data1.constructor.name && 'number' == typeof data1.offset && 'number' == typeof data1.length && 'function' == typeof data1.save && 'function' == typeof data1.restore && 'function' == typeof data1.isEmpty && 'function' == typeof data1.readUInt8 && 'function' == typeof data1.skip && 'function' == typeof data1.raw; return isCompatible1; - }, DecoderBuffer1.prototype.save = function() { + }, DecoderBuffer1.prototype.save = function save1() { return { offset: this.offset, reporter: Reporter1.prototype.save.call(this) }; - }, DecoderBuffer1.prototype.restore = function(save1) { + }, DecoderBuffer1.prototype.restore = function restore1(save1) { const res1 = new DecoderBuffer1(this.base); return res1.offset = save1.offset, res1.length = this.offset, this.offset = save1.offset, Reporter1.prototype.restore.call(this, save1.reporter), res1; - }, DecoderBuffer1.prototype.isEmpty = function() { + }, DecoderBuffer1.prototype.isEmpty = function isEmpty1() { return this.offset === this.length; - }, DecoderBuffer1.prototype.readUInt8 = function(fail1) { + }, DecoderBuffer1.prototype.readUInt8 = function readUInt81(fail1) { return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !0) : this.error(fail1 || 'DecoderBuffer overrun'); - }, DecoderBuffer1.prototype.skip = function(bytes1, fail1) { + }, DecoderBuffer1.prototype.skip = function skip1(bytes1, fail1) { if (!(this.offset + bytes1 <= this.length)) return this.error(fail1 || 'DecoderBuffer overrun'); const res1 = new DecoderBuffer1(this.base); return res1._reporterState = this._reporterState, res1.offset = this.offset, res1.length = this.offset + bytes1, this.offset += bytes1, res1; - }, DecoderBuffer1.prototype.raw = function(save1) { + }, DecoderBuffer1.prototype.raw = function raw1(save1) { return this.base.slice(save1 ? save1.offset : this.offset, this.length); - }, exports1.R = EncoderBuffer1, EncoderBuffer1.isEncoderBuffer = function(data1) { + }, exports1.R = EncoderBuffer1, EncoderBuffer1.isEncoderBuffer = function isEncoderBuffer1(data1) { if (data1 instanceof EncoderBuffer1) return !0; const isCompatible1 = 'object' == typeof data1 && 'EncoderBuffer' === data1.constructor.name && 'number' == typeof data1.length && 'function' == typeof data1.join; return isCompatible1; - }, EncoderBuffer1.prototype.join = function(out1, offset1) { + }, EncoderBuffer1.prototype.join = function join1(out1, offset1) { return out1 || (out1 = Buffer1.alloc(this.length)), offset1 || (offset1 = 0), 0 === this.length || (Array.isArray(this.value) ? this.value.forEach(function(item1) { item1.join(out1, offset1), offset1 += item1.length; }) : ('number' == typeof this.value ? out1[offset1] = this.value : 'string' == typeof this.value ? out1.write(this.value, offset1) : Buffer1.isBuffer(this.value) && this.value.copy(out1, offset1), offset1 += this.length)), out1; @@ -5235,27 +5235,27 @@ 'implicit', 'contains' ]; - Node1.prototype.clone = function() { + Node1.prototype.clone = function clone1() { const state1 = this._baseState, cstate1 = {}; stateProps1.forEach(function(prop1) { cstate1[prop1] = state1[prop1]; }); const res1 = new this.constructor(cstate1.parent); return res1._baseState = cstate1, res1; - }, Node1.prototype._wrap = function() { + }, Node1.prototype._wrap = function wrap1() { const state1 = this._baseState; methods1.forEach(function(method1) { - this[method1] = function() { + this[method1] = function _wrappedMethod1() { const clone1 = new this.constructor(this); return state1.children.push(clone1), clone1[method1].apply(clone1, arguments); }; }, this); - }, Node1.prototype._init = function(body1) { + }, Node1.prototype._init = function init1(body1) { const state1 = this._baseState; assert1(null === state1.parent), body1.call(this), state1.children = state1.children.filter(function(child1) { return child1._baseState.parent === this; }, this), assert1.equal(state1.children.length, 1, 'Root node can have only one child'); - }, Node1.prototype._useArgs = function(args1) { + }, Node1.prototype._useArgs = function useArgs1(args1) { const state1 = this._baseState, children1 = args1.filter(function(arg4) { return arg4 instanceof this.constructor; }, this); @@ -5273,49 +5273,49 @@ }), res1; })); }, overrided1.forEach(function(method1) { - Node1.prototype[method1] = function() { + Node1.prototype[method1] = function _overrided1() { const state1 = this._baseState; throw Error(method1 + ' not implemented for encoding: ' + state1.enc); }; }), tags1.forEach(function(tag1) { - Node1.prototype[tag1] = function() { + Node1.prototype[tag1] = function _tagMethod1() { const state1 = this._baseState, args1 = Array.prototype.slice.call(arguments); return assert1(null === state1.tag), state1.tag = tag1, this._useArgs(args1), this; }; - }), Node1.prototype.use = function(item1) { + }), Node1.prototype.use = function use1(item1) { assert1(item1); const state1 = this._baseState; return assert1(null === state1.use), state1.use = item1, this; - }, Node1.prototype.optional = function() { + }, Node1.prototype.optional = function optional1() { const state1 = this._baseState; return state1.optional = !0, this; - }, Node1.prototype.def = function(val1) { + }, Node1.prototype.def = function def1(val1) { const state1 = this._baseState; return assert1(null === state1.default), state1.default = val1, state1.optional = !0, this; - }, Node1.prototype.explicit = function(num1) { + }, Node1.prototype.explicit = function explicit1(num1) { const state1 = this._baseState; return assert1(null === state1.explicit && null === state1.implicit), state1.explicit = num1, this; - }, Node1.prototype.implicit = function(num1) { + }, Node1.prototype.implicit = function implicit1(num1) { const state1 = this._baseState; return assert1(null === state1.explicit && null === state1.implicit), state1.implicit = num1, this; - }, Node1.prototype.obj = function() { + }, Node1.prototype.obj = function obj1() { const state1 = this._baseState, args1 = Array.prototype.slice.call(arguments); return state1.obj = !0, 0 !== args1.length && this._useArgs(args1), this; - }, Node1.prototype.key = function(newKey1) { + }, Node1.prototype.key = function key1(newKey1) { const state1 = this._baseState; return assert1(null === state1.key), state1.key = newKey1, this; - }, Node1.prototype.any = function() { + }, Node1.prototype.any = function any1() { const state1 = this._baseState; return state1.any = !0, this; - }, Node1.prototype.choice = function(obj1) { + }, Node1.prototype.choice = function choice1(obj1) { const state1 = this._baseState; return assert1(null === state1.choice), state1.choice = obj1, this._useArgs(Object.keys(obj1).map(function(key1) { return obj1[key1]; })), this; - }, Node1.prototype.contains = function(item1) { + }, Node1.prototype.contains = function contains1(item1) { const state1 = this._baseState; return assert1(null === state1.use), state1.contains = item1, this; - }, Node1.prototype._decode = function(input1, options1) { + }, Node1.prototype._decode = function decode1(input1, options1) { let prevObj1; const state1 = this._baseState; if (null === state1.parent) return input1.wrapResult(state1.children[0]._decode(input1, options1)); @@ -5349,7 +5349,7 @@ state1.any ? result1 = input1.raw(save1) : input1 = body1; } if (options1 && options1.track && null !== state1.tag && options1.track(input1.path(), start1, input1.length, 'tagged'), options1 && options1.track && null !== state1.tag && options1.track(input1.path(), input1.offset, input1.length, 'content'), state1.any || (result1 = null === state1.choice ? this._decodeGeneric(state1.tag, input1, options1) : this._decodeChoice(input1, options1)), input1.isError(result1)) return result1; - if (state1.any || null !== state1.choice || null === state1.children || state1.children.forEach(function(child1) { + if (state1.any || null !== state1.choice || null === state1.children || state1.children.forEach(function decodeChildren1(child1) { child1._decode(input1, options1); }), state1.contains && ('octstr' === state1.tag || 'bitstr' === state1.tag)) { const data1 = new DecoderBuffer1(result1); @@ -5357,13 +5357,13 @@ } } return state1.obj && present1 && (result1 = input1.leaveObject(prevObj1)), null !== state1.key && (null !== result1 || !0 === present1) ? input1.leaveKey(prevKey1, state1.key, result1) : null !== prevKey1 && input1.exitKey(prevKey1), result1; - }, Node1.prototype._decodeGeneric = function(tag1, input1, options1) { + }, Node1.prototype._decodeGeneric = function decodeGeneric1(tag1, input1, options1) { const state1 = this._baseState; return 'seq' === tag1 || 'set' === tag1 ? null : 'seqof' === tag1 || 'setof' === tag1 ? this._decodeList(input1, tag1, state1.args[0], options1) : /str$/.test(tag1) ? this._decodeStr(input1, tag1, options1) : 'objid' === tag1 && state1.args ? this._decodeObjid(input1, state1.args[0], state1.args[1], options1) : 'objid' === tag1 ? this._decodeObjid(input1, null, null, options1) : 'gentime' === tag1 || 'utctime' === tag1 ? this._decodeTime(input1, tag1, options1) : 'null_' === tag1 ? this._decodeNull(input1, options1) : 'bool' === tag1 ? this._decodeBool(input1, options1) : 'objDesc' === tag1 ? this._decodeStr(input1, tag1, options1) : 'int' === tag1 || 'enum' === tag1 ? this._decodeInt(input1, state1.args && state1.args[0], options1) : null !== state1.use ? this._getUse(state1.use, input1._reporterState.obj)._decode(input1, options1) : input1.error('unknown tag: ' + tag1); - }, Node1.prototype._getUse = function(entity1, obj1) { + }, Node1.prototype._getUse = function _getUse1(entity1, obj1) { const state1 = this._baseState; return state1.useDecoder = this._use(entity1, obj1), assert1(null === state1.useDecoder._baseState.parent), state1.useDecoder = state1.useDecoder._baseState.children[0], state1.implicit !== state1.useDecoder._baseState.implicit && (state1.useDecoder = state1.useDecoder.clone(), state1.useDecoder._baseState.implicit = state1.implicit), state1.useDecoder; - }, Node1.prototype._decodeChoice = function(input1, options1) { + }, Node1.prototype._decodeChoice = function decodeChoice1(input1, options1) { const state1 = this._baseState; let result1 = null, match1 = !1; return (Object.keys(state1.choice).some(function(key1) { @@ -5380,14 +5380,14 @@ } return !0; }, this), match1) ? result1 : input1.error('Choice not matched'); - }, Node1.prototype._createEncoderBuffer = function(data1) { + }, Node1.prototype._createEncoderBuffer = function createEncoderBuffer1(data1) { return new EncoderBuffer1(data1, this.reporter); - }, Node1.prototype._encode = function(data1, reporter1, parent1) { + }, Node1.prototype._encode = function encode1(data1, reporter1, parent1) { const state1 = this._baseState; if (null !== state1.default && state1.default === data1) return; const result1 = this._encodeValue(data1, reporter1, parent1); if (void 0 !== result1 && !this._skipDefault(result1, reporter1, parent1)) return result1; - }, Node1.prototype._encodeValue = function(data1, reporter1, parent1) { + }, Node1.prototype._encodeValue = function encode1(data1, reporter1, parent1) { const state1 = this._baseState; if (null === state1.parent) return state1.children[0]._encode(data1, reporter1 || new Reporter1()); let result1 = null; @@ -5423,10 +5423,10 @@ null === tag1 ? null === state1.use && reporter1.error('Tag could be omitted only for .use()') : null === state1.use && (result1 = this._encodeComposite(tag1, primitive1, cls1, content1)); } return null !== state1.explicit && (result1 = this._encodeComposite(state1.explicit, !1, 'context', result1)), result1; - }, Node1.prototype._encodeChoice = function(data1, reporter1) { + }, Node1.prototype._encodeChoice = function encodeChoice1(data1, reporter1) { const state1 = this._baseState, node1 = state1.choice[data1.type]; return node1 || assert1(!1, data1.type + ' not found in ' + JSON.stringify(Object.keys(state1.choice))), node1._encode(data1.value, reporter1); - }, Node1.prototype._encodePrimitive = function(tag1, data1) { + }, Node1.prototype._encodePrimitive = function encodePrimitive1(tag1, data1) { const state1 = this._baseState; if (/str$/.test(tag1)) return this._encodeStr(data1, tag1); if ('objid' === tag1 && state1.args) return this._encodeObjid(data1, state1.reverseArgs[0], state1.args[1]); @@ -5437,9 +5437,9 @@ if ('bool' === tag1) return this._encodeBool(data1); if ('objDesc' === tag1) return this._encodeStr(data1, tag1); throw Error('Unsupported tag: ' + tag1); - }, Node1.prototype._isNumstr = function(str1) { + }, Node1.prototype._isNumstr = function isNumstr1(str1) { return /^[0-9 ]*$/.test(str1); - }, Node1.prototype._isPrintstr = function(str1) { + }, Node1.prototype._isPrintstr = function isPrintstr1(str1) { return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str1); }; }, @@ -5457,47 +5457,47 @@ function ReporterError1(path1, msg1) { this.path = path1, this.rethrow(msg1); } - exports1.b = Reporter1, Reporter1.prototype.isError = function(obj1) { + exports1.b = Reporter1, Reporter1.prototype.isError = function isError1(obj1) { return obj1 instanceof ReporterError1; - }, Reporter1.prototype.save = function() { + }, Reporter1.prototype.save = function save1() { const state1 = this._reporterState; return { obj: state1.obj, pathLen: state1.path.length }; - }, Reporter1.prototype.restore = function(data1) { + }, Reporter1.prototype.restore = function restore1(data1) { const state1 = this._reporterState; state1.obj = data1.obj, state1.path = state1.path.slice(0, data1.pathLen); - }, Reporter1.prototype.enterKey = function(key1) { + }, Reporter1.prototype.enterKey = function enterKey1(key1) { return this._reporterState.path.push(key1); - }, Reporter1.prototype.exitKey = function(index1) { + }, Reporter1.prototype.exitKey = function exitKey1(index1) { const state1 = this._reporterState; state1.path = state1.path.slice(0, index1 - 1); - }, Reporter1.prototype.leaveKey = function(index1, key1, value1) { + }, Reporter1.prototype.leaveKey = function leaveKey1(index1, key1, value1) { const state1 = this._reporterState; this.exitKey(index1), null !== state1.obj && (state1.obj[key1] = value1); - }, Reporter1.prototype.path = function() { + }, Reporter1.prototype.path = function path1() { return this._reporterState.path.join('/'); - }, Reporter1.prototype.enterObject = function() { + }, Reporter1.prototype.enterObject = function enterObject1() { const state1 = this._reporterState, prev1 = state1.obj; return state1.obj = {}, prev1; - }, Reporter1.prototype.leaveObject = function(prev1) { + }, Reporter1.prototype.leaveObject = function leaveObject1(prev1) { const state1 = this._reporterState, now1 = state1.obj; return state1.obj = prev1, now1; - }, Reporter1.prototype.error = function(msg1) { + }, Reporter1.prototype.error = function error1(msg1) { let err1; const state1 = this._reporterState, inherited1 = msg1 instanceof ReporterError1; if (err1 = inherited1 ? msg1 : new ReporterError1(state1.path.map(function(elem1) { return '[' + JSON.stringify(elem1) + ']'; }).join(''), msg1.message || msg1, msg1.stack), !state1.options.partial) throw err1; return inherited1 || state1.errors.push(err1), err1; - }, Reporter1.prototype.wrapResult = function(result1) { + }, Reporter1.prototype.wrapResult = function wrapResult1(result1) { const state1 = this._reporterState; return state1.options.partial ? { result: this.isError(result1) ? null : result1, errors: state1.errors } : result1; - }, inherits1(ReporterError1, Error), ReporterError1.prototype.rethrow = function(msg1) { + }, inherits1(ReporterError1, Error), ReporterError1.prototype.rethrow = function rethrow1(msg1) { if (this.message = msg1 + ' at: ' + (this.path || '(shallow)'), Error.captureStackTrace && Error.captureStackTrace(this, ReporterError1), !this.stack) try { throw Error(this.message); } catch (e1) { @@ -5556,7 +5556,7 @@ 6826: function(__unused_webpack_module1, exports1, __webpack_require__1) { "use strict"; const constants1 = exports1; - constants1._reverse = function(map1) { + constants1._reverse = function reverse1(map1) { const res1 = {}; return Object.keys(map1).forEach(function(key1) { (0 | key1) == key1 && (key1 |= 0); @@ -5609,13 +5609,13 @@ } return len3; } - module1.exports = DERDecoder1, DERDecoder1.prototype.decode = function(data1, options1) { + module1.exports = DERDecoder1, DERDecoder1.prototype.decode = function decode1(data1, options1) { return DecoderBuffer1.isDecoderBuffer(data1) || (data1 = new DecoderBuffer1(data1, options1)), this.tree._decode(data1, options1); - }, inherits1(DERNode1, Node1), DERNode1.prototype._peekTag = function(buffer1, tag1, any1) { + }, inherits1(DERNode1, Node1), DERNode1.prototype._peekTag = function peekTag1(buffer1, tag1, any1) { if (buffer1.isEmpty()) return !1; const state1 = buffer1.save(), decodedTag1 = derDecodeTag1(buffer1, 'Failed to peek tag: "' + tag1 + '"'); return buffer1.isError(decodedTag1) ? decodedTag1 : (buffer1.restore(state1), decodedTag1.tag === tag1 || decodedTag1.tagStr === tag1 || decodedTag1.tagStr + 'of' === tag1 || any1); - }, DERNode1.prototype._decodeTag = function(buffer1, tag1, any1) { + }, DERNode1.prototype._decodeTag = function decodeTag1(buffer1, tag1, any1) { const decodedTag1 = derDecodeTag1(buffer1, 'Failed to decode tag of "' + tag1 + '"'); if (buffer1.isError(decodedTag1)) return decodedTag1; let len3 = derDecodeLen1(buffer1, decodedTag1.primitive, 'Failed to get length of "' + tag1 + '"'); @@ -5624,7 +5624,7 @@ if (decodedTag1.primitive || null !== len3) return buffer1.skip(len3, 'Failed to match body of: "' + tag1 + '"'); const state1 = buffer1.save(), res1 = this._skipUntilEnd(buffer1, 'Failed to skip indefinite length body: "' + this.tag + '"'); return buffer1.isError(res1) ? res1 : (len3 = buffer1.offset - state1.offset, buffer1.restore(state1), buffer1.skip(len3, 'Failed to match body of: "' + tag1 + '"')); - }, DERNode1.prototype._skipUntilEnd = function(buffer1, fail1) { + }, DERNode1.prototype._skipUntilEnd = function skipUntilEnd1(buffer1, fail1) { for(;;){ let res1; const tag1 = derDecodeTag1(buffer1, fail1); @@ -5634,7 +5634,7 @@ if (res1 = tag1.primitive || null !== len3 ? buffer1.skip(len3) : this._skipUntilEnd(buffer1, fail1), buffer1.isError(res1)) return res1; if ('end' === tag1.tagStr) break; } - }, DERNode1.prototype._decodeList = function(buffer1, tag1, decoder1, options1) { + }, DERNode1.prototype._decodeList = function decodeList1(buffer1, tag1, decoder1, options1) { const result1 = []; for(; !buffer1.isEmpty();){ const possibleEnd1 = this._peekTag(buffer1, 'end'); @@ -5644,7 +5644,7 @@ result1.push(res1); } return result1; - }, DERNode1.prototype._decodeStr = function(buffer1, tag1) { + }, DERNode1.prototype._decodeStr = function decodeStr1(buffer1, tag1) { if ('bitstr' === tag1) { const unused1 = buffer1.readUInt8(); return buffer1.isError(unused1) ? unused1 : { @@ -5669,7 +5669,7 @@ return this._isPrintstr(printstr1) ? printstr1 : buffer1.error("Decoding of string type: printstr unsupported characters"); } return /str$/.test(tag1) ? buffer1.raw().toString() : buffer1.error('Decoding of string type: ' + tag1 + ' unsupported'); - }, DERNode1.prototype._decodeObjid = function(buffer1, values1, relative1) { + }, DERNode1.prototype._decodeObjid = function decodeObjid1(buffer1, values1, relative1) { let result1; const identifiers1 = []; let ident1 = 0, subident1 = 0; @@ -5684,7 +5684,7 @@ void 0 === tmp1 && (tmp1 = values1[result1.join('.')]), void 0 !== tmp1 && (result1 = tmp1); } return result1; - }, DERNode1.prototype._decodeTime = function(buffer1, tag1) { + }, DERNode1.prototype._decodeTime = function decodeTime1(buffer1, tag1) { let year1, mon1, day1, hour1, min1, sec1; const str1 = buffer1.raw().toString(); if ('gentime' === tag1) year1 = 0 | str1.slice(0, 4), mon1 = 0 | str1.slice(4, 6), day1 = 0 | str1.slice(6, 8), hour1 = 0 | str1.slice(8, 10), min1 = 0 | str1.slice(10, 12), sec1 = 0 | str1.slice(12, 14); @@ -5693,16 +5693,16 @@ year1 = 0 | str1.slice(0, 2), mon1 = 0 | str1.slice(2, 4), day1 = 0 | str1.slice(4, 6), hour1 = 0 | str1.slice(6, 8), min1 = 0 | str1.slice(8, 10), sec1 = 0 | str1.slice(10, 12), year1 = year1 < 70 ? 2000 + year1 : 1900 + year1; } return Date.UTC(year1, mon1 - 1, day1, hour1, min1, sec1, 0); - }, DERNode1.prototype._decodeNull = function() { + }, DERNode1.prototype._decodeNull = function decodeNull1() { return null; - }, DERNode1.prototype._decodeBool = function(buffer1) { + }, DERNode1.prototype._decodeBool = function decodeBool1(buffer1) { const res1 = buffer1.readUInt8(); return buffer1.isError(res1) ? res1 : 0 !== res1; - }, DERNode1.prototype._decodeInt = function(buffer1, values1) { + }, DERNode1.prototype._decodeInt = function decodeInt1(buffer1, values1) { const raw1 = buffer1.raw(); let res1 = new bignum1(raw1); return values1 && (res1 = values1[res1.toString(10)] || res1), res1; - }, DERNode1.prototype._use = function(entity1, obj1) { + }, DERNode1.prototype._use = function use1(entity1, obj1) { return 'function' == typeof entity1 && (entity1 = entity1(obj1)), entity1._getDecoder('der').tree; }; }, @@ -5717,7 +5717,7 @@ function PEMDecoder1(entity1) { DERDecoder1.call(this, entity1), this.enc = 'pem'; } - inherits1(PEMDecoder1, DERDecoder1), module1.exports = PEMDecoder1, PEMDecoder1.prototype.decode = function(data1, options1) { + inherits1(PEMDecoder1, DERDecoder1), module1.exports = PEMDecoder1, PEMDecoder1.prototype.decode = function decode1(data1, options1) { const lines1 = data1.toString().split(/[\r\n]+/g), label1 = options1.label.toUpperCase(), re1 = /^-----(BEGIN|END) ([^-]+)-----$/; let start1 = -1, end1 = -1; for(let i2 = 0; i2 < lines1.length; i2++){ @@ -5761,9 +5761,9 @@ } return res1 >= 0x1f ? reporter1.error('Multi-octet tag encoding unsupported') : (primitive1 || (res1 |= 0x20), res1 |= der1.tagClassByName[cls1 || 'universal'] << 6); } - module1.exports = DEREncoder1, DEREncoder1.prototype.encode = function(data1, reporter1) { + module1.exports = DEREncoder1, DEREncoder1.prototype.encode = function encode1(data1, reporter1) { return this.tree._encode(data1, reporter1).join(); - }, inherits1(DERNode1, Node1), DERNode1.prototype._encodeComposite = function(tag1, primitive1, cls1, content1) { + }, inherits1(DERNode1, Node1), DERNode1.prototype._encodeComposite = function encodeComposite1(tag1, primitive1, cls1, content1) { const encodedTag1 = encodeTag1(tag1, primitive1, cls1, this.reporter); if (content1.length < 0x80) { const header1 = Buffer1.alloc(2); @@ -5781,7 +5781,7 @@ header1, content1 ]); - }, DERNode1.prototype._encodeStr = function(str1, tag1) { + }, DERNode1.prototype._encodeStr = function encodeStr1(str1, tag1) { if ('bitstr' === tag1) return this._createEncoderBuffer([ 0 | str1.unused, str1.data @@ -5792,7 +5792,7 @@ return this._createEncoderBuffer(buf1); } return 'numstr' === tag1 ? this._isNumstr(str1) ? this._createEncoderBuffer(str1) : this.reporter.error("Encoding of string type: numstr supports only digits and space") : 'printstr' === tag1 ? this._isPrintstr(str1) ? this._createEncoderBuffer(str1) : this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark") : /str$/.test(tag1) ? this._createEncoderBuffer(str1) : 'objDesc' === tag1 ? this._createEncoderBuffer(str1) : this.reporter.error('Encoding of string type: ' + tag1 + ' unsupported'); - }, DERNode1.prototype._encodeObjid = function(id1, values1, relative1) { + }, DERNode1.prototype._encodeObjid = function encodeObjid1(id1, values1, relative1) { if ('string' == typeof id1) { if (!values1) return this.reporter.error('string objid given, but no values map found'); if (!values1.hasOwnProperty(id1)) return this.reporter.error('objid not found in values map'); @@ -5819,7 +5819,7 @@ for(objid1[offset1--] = 0x7f & ident1; (ident1 >>= 7) > 0;)objid1[offset1--] = 0x80 | 0x7f & ident1; } return this._createEncoderBuffer(objid1); - }, DERNode1.prototype._encodeTime = function(time1, tag1) { + }, DERNode1.prototype._encodeTime = function encodeTime1(time1, tag1) { let str1; const date1 = new Date(time1); return 'gentime' === tag1 ? str1 = [ @@ -5839,9 +5839,9 @@ two1(date1.getUTCSeconds()), 'Z' ].join('') : this.reporter.error('Encoding ' + tag1 + ' time is not supported yet'), this._encodeStr(str1, 'octstr'); - }, DERNode1.prototype._encodeNull = function() { + }, DERNode1.prototype._encodeNull = function encodeNull1() { return this._createEncoderBuffer(''); - }, DERNode1.prototype._encodeInt = function(num1, values1) { + }, DERNode1.prototype._encodeInt = function encodeInt1(num1, values1) { if ('string' == typeof num1) { if (!values1) return this.reporter.error('String int or enum given, but no values map'); if (!values1.hasOwnProperty(num1)) return this.reporter.error('Values map doesn\'t contain: ' + JSON.stringify(num1)); @@ -5867,11 +5867,11 @@ const out1 = Array(size1); for(let i2 = out1.length - 1; i2 >= 0; i2--)out1[i2] = 0xff & num1, num1 >>= 8; return 0x80 & out1[0] && out1.unshift(0), this._createEncoderBuffer(Buffer1.from(out1)); - }, DERNode1.prototype._encodeBool = function(value1) { + }, DERNode1.prototype._encodeBool = function encodeBool1(value1) { return this._createEncoderBuffer(value1 ? 0xff : 0); - }, DERNode1.prototype._use = function(entity1, obj1) { + }, DERNode1.prototype._use = function use1(entity1, obj1) { return 'function' == typeof entity1 && (entity1 = entity1(obj1)), entity1._getEncoder('der').tree; - }, DERNode1.prototype._skipDefault = function(dataBuffer1, reporter1, parent1) { + }, DERNode1.prototype._skipDefault = function skipDefault1(dataBuffer1, reporter1, parent1) { let i2; const state1 = this._baseState; if (null === state1.default) return !1; @@ -5892,7 +5892,7 @@ function PEMEncoder1(entity1) { DEREncoder1.call(this, entity1), this.enc = 'pem'; } - inherits1(PEMEncoder1, DEREncoder1), module1.exports = PEMEncoder1, PEMEncoder1.prototype.encode = function(data1, options1) { + inherits1(PEMEncoder1, DEREncoder1), module1.exports = PEMEncoder1, PEMEncoder1.prototype.encode = function encode1(data1, options1) { const buf1 = DEREncoder1.prototype.encode.call(this, data1), p3 = buf1.toString('base64'), out1 = [ '-----BEGIN ' + options1.label + '-----' ]; @@ -5906,8 +5906,8 @@ 5448: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var utils1 = __webpack_require__1(4867), settle1 = __webpack_require__1(6026), cookies1 = __webpack_require__1(4372), buildURL1 = __webpack_require__1(5327), buildFullPath1 = __webpack_require__1(4097), parseHeaders1 = __webpack_require__1(4109), isURLSameOrigin1 = __webpack_require__1(7985), transitionalDefaults1 = __webpack_require__1(7874), AxiosError1 = __webpack_require__1(723), CanceledError1 = __webpack_require__1(644), parseProtocol1 = __webpack_require__1(205); - module1.exports = function(config3) { - return new Promise(function(resolve1, reject1) { + module1.exports = function xhrAdapter1(config3) { + return new Promise(function dispatchXhrRequest1(resolve1, reject1) { var onCanceled1, requestData1 = config3.data, requestHeaders1 = config3.headers, responseType1 = config3.responseType; function done1() { config3.cancelToken && config3.cancelToken.unsubscribe(onCanceled1), config3.signal && config3.signal.removeEventListener('abort', onCanceled1); @@ -5922,9 +5922,9 @@ function onloadend1() { if (request1) { var responseHeaders1 = 'getAllResponseHeaders' in request1 ? parseHeaders1(request1.getAllResponseHeaders()) : null; - settle1(function(value1) { + settle1(function _resolve1(value1) { resolve1(value1), done1(); - }, function(err1) { + }, function _reject1(err1) { reject1(err1), done1(); }, { data: responseType1 && 'text' !== responseType1 && 'json' !== responseType1 ? request1.response : request1.responseText, @@ -5936,20 +5936,20 @@ }), request1 = null; } } - if (request1.open(config3.method.toUpperCase(), buildURL1(fullPath1, config3.params, config3.paramsSerializer), !0), request1.timeout = config3.timeout, 'onloadend' in request1 ? request1.onloadend = onloadend1 : request1.onreadystatechange = function() { + if (request1.open(config3.method.toUpperCase(), buildURL1(fullPath1, config3.params, config3.paramsSerializer), !0), request1.timeout = config3.timeout, 'onloadend' in request1 ? request1.onloadend = onloadend1 : request1.onreadystatechange = function handleLoad1() { request1 && 4 === request1.readyState && (0 !== request1.status || request1.responseURL && 0 === request1.responseURL.indexOf('file:')) && setTimeout(onloadend1); - }, request1.onabort = function() { + }, request1.onabort = function handleAbort1() { request1 && (reject1(new AxiosError1('Request aborted', AxiosError1.ECONNABORTED, config3, request1)), request1 = null); - }, request1.onerror = function() { + }, request1.onerror = function handleError1() { reject1(new AxiosError1('Network Error', AxiosError1.ERR_NETWORK, config3, request1, request1)), request1 = null; - }, request1.ontimeout = function() { + }, request1.ontimeout = function handleTimeout1() { var timeoutErrorMessage1 = config3.timeout ? 'timeout of ' + config3.timeout + 'ms exceeded' : 'timeout exceeded', transitional1 = config3.transitional || transitionalDefaults1; config3.timeoutErrorMessage && (timeoutErrorMessage1 = config3.timeoutErrorMessage), reject1(new AxiosError1(timeoutErrorMessage1, transitional1.clarifyTimeoutError ? AxiosError1.ETIMEDOUT : AxiosError1.ECONNABORTED, config3, request1)), request1 = null; }, utils1.isStandardBrowserEnv()) { var xsrfValue1 = (config3.withCredentials || isURLSameOrigin1(fullPath1)) && config3.xsrfCookieName ? cookies1.read(config3.xsrfCookieName) : void 0; xsrfValue1 && (requestHeaders1[config3.xsrfHeaderName] = xsrfValue1); } - 'setRequestHeader' in request1 && utils1.forEach(requestHeaders1, function(val1, key1) { + 'setRequestHeader' in request1 && utils1.forEach(requestHeaders1, function setRequestHeader1(val1, key1) { void 0 === requestData1 && 'content-type' === key1.toLowerCase() ? delete requestHeaders1[key1] : request1.setRequestHeader(key1, val1); }), utils1.isUndefined(config3.withCredentials) || (request1.withCredentials = !!config3.withCredentials), responseType1 && 'json' !== responseType1 && (request1.responseType = config3.responseType), 'function' == typeof config3.onDownloadProgress && request1.addEventListener('progress', config3.onDownloadProgress), 'function' == typeof config3.onUploadProgress && request1.upload && request1.upload.addEventListener('progress', config3.onUploadProgress), (config3.cancelToken || config3.signal) && (onCanceled1 = function(cancel1) { request1 && (reject1(!cancel1 || cancel1 && cancel1.type ? new CanceledError1() : cancel1), request1.abort(), request1 = null); @@ -5972,12 +5972,12 @@ var utils1 = __webpack_require__1(4867), bind1 = __webpack_require__1(1849), Axios1 = __webpack_require__1(321), mergeConfig1 = __webpack_require__1(7185); function createInstance1(defaultConfig1) { var context1 = new Axios1(defaultConfig1), instance1 = bind1(Axios1.prototype.request, context1); - return utils1.extend(instance1, Axios1.prototype, context1), utils1.extend(instance1, context1), instance1.create = function(instanceConfig1) { + return utils1.extend(instance1, Axios1.prototype, context1), utils1.extend(instance1, context1), instance1.create = function create1(instanceConfig1) { return createInstance1(mergeConfig1(defaultConfig1, instanceConfig1)); }, instance1; } var axios1 = createInstance1(__webpack_require__1(5546)); - axios1.Axios = Axios1, axios1.CanceledError = __webpack_require__1(644), axios1.CancelToken = __webpack_require__1(4972), axios1.isCancel = __webpack_require__1(6502), axios1.VERSION = __webpack_require__1(7288).version, axios1.toFormData = __webpack_require__1(7675), axios1.AxiosError = __webpack_require__1(723), axios1.Cancel = axios1.CanceledError, axios1.all = function(promises1) { + axios1.Axios = Axios1, axios1.CanceledError = __webpack_require__1(644), axios1.CancelToken = __webpack_require__1(4972), axios1.isCancel = __webpack_require__1(6502), axios1.VERSION = __webpack_require__1(7288).version, axios1.toFormData = __webpack_require__1(7675), axios1.AxiosError = __webpack_require__1(723), axios1.Cancel = axios1.CanceledError, axios1.all = function all1(promises1) { return Promise.all(promises1); }, axios1.spread = __webpack_require__1(8713), axios1.isAxiosError = __webpack_require__1(6268), module1.exports = axios1, module1.exports.default = axios1; }, @@ -5986,7 +5986,7 @@ var CanceledError1 = __webpack_require__1(644); function CancelToken1(executor1) { if ('function' != typeof executor1) throw TypeError('executor must be a function.'); - this.promise = new Promise(function(resolve1) { + this.promise = new Promise(function promiseExecutor1(resolve1) { resolvePromise1 = resolve1; }); var resolvePromise1, token1 = this; @@ -6000,16 +6000,16 @@ var _resolve1, promise1 = new Promise(function(resolve1) { token1.subscribe(resolve1), _resolve1 = resolve1; }).then(onfulfilled1); - return promise1.cancel = function() { + return promise1.cancel = function reject1() { token1.unsubscribe(_resolve1); }, promise1; - }, executor1(function(message1) { + }, executor1(function cancel1(message1) { token1.reason || (token1.reason = new CanceledError1(message1), resolvePromise1(token1.reason)); }); } - CancelToken1.prototype.throwIfRequested = function() { + CancelToken1.prototype.throwIfRequested = function throwIfRequested1() { if (this.reason) throw this.reason; - }, CancelToken1.prototype.subscribe = function(listener1) { + }, CancelToken1.prototype.subscribe = function subscribe1(listener1) { if (this.reason) { listener1(this.reason); return; @@ -6017,15 +6017,15 @@ this._listeners ? this._listeners.push(listener1) : this._listeners = [ listener1 ]; - }, CancelToken1.prototype.unsubscribe = function(listener1) { + }, CancelToken1.prototype.unsubscribe = function unsubscribe1(listener1) { if (this._listeners) { var index1 = this._listeners.indexOf(listener1); -1 !== index1 && this._listeners.splice(index1, 1); } - }, CancelToken1.source = function() { + }, CancelToken1.source = function source1() { var cancel1; return { - token: new CancelToken1(function(c5) { + token: new CancelToken1(function executor1(c5) { cancel1 = c5; }), cancel: cancel1 @@ -6044,7 +6044,7 @@ }, 6502: function(module1) { "use strict"; - module1.exports = function(value1) { + module1.exports = function isCancel1(value1) { return !!(value1 && value1.__CANCEL__); }; }, @@ -6057,7 +6057,7 @@ response: new InterceptorManager1() }; } - Axios1.prototype.request = function(configOrUrl1, config3) { + Axios1.prototype.request = function request1(configOrUrl1, config3) { 'string' == typeof configOrUrl1 ? (config3 = config3 || {}).url = configOrUrl1 : config3 = configOrUrl1 || {}, (config3 = mergeConfig1(this.defaults, config3)).method ? config3.method = config3.method.toLowerCase() : this.defaults.method ? config3.method = this.defaults.method.toLowerCase() : config3.method = 'get'; var promise1, transitional1 = config3.transitional; void 0 !== transitional1 && validator1.assertOptions(transitional1, { @@ -6066,11 +6066,11 @@ clarifyTimeoutError: validators1.transitional(validators1.boolean) }, !1); var requestInterceptorChain1 = [], synchronousRequestInterceptors1 = !0; - this.interceptors.request.forEach(function(interceptor1) { + this.interceptors.request.forEach(function unshiftRequestInterceptors1(interceptor1) { ('function' != typeof interceptor1.runWhen || !1 !== interceptor1.runWhen(config3)) && (synchronousRequestInterceptors1 = synchronousRequestInterceptors1 && interceptor1.synchronous, requestInterceptorChain1.unshift(interceptor1.fulfilled, interceptor1.rejected)); }); var responseInterceptorChain1 = []; - if (this.interceptors.response.forEach(function(interceptor1) { + if (this.interceptors.response.forEach(function pushResponseInterceptors1(interceptor1) { responseInterceptorChain1.push(interceptor1.fulfilled, interceptor1.rejected); }), !synchronousRequestInterceptors1) { var chain1 = [ @@ -6096,14 +6096,14 @@ } for(; responseInterceptorChain1.length;)promise1 = promise1.then(responseInterceptorChain1.shift(), responseInterceptorChain1.shift()); return promise1; - }, Axios1.prototype.getUri = function(config3) { + }, Axios1.prototype.getUri = function getUri1(config3) { return buildURL1(buildFullPath1((config3 = mergeConfig1(this.defaults, config3)).baseURL, config3.url), config3.params, config3.paramsSerializer); }, utils1.forEach([ 'delete', 'get', 'head', 'options' - ], function(method1) { + ], function forEachMethodNoData1(method1) { Axios1.prototype[method1] = function(url1, config3) { return this.request(mergeConfig1(config3 || {}, { method: method1, @@ -6115,9 +6115,9 @@ 'post', 'put', 'patch' - ], function(method1) { + ], function forEachMethodWithData1(method1) { function generateHTTPMethod1(isForm1) { - return function(url1, data1, config3) { + return function httpMethod1(url1, data1, config3) { return this.request(mergeConfig1(config3 || {}, { method: method1, headers: isForm1 ? { @@ -6138,7 +6138,7 @@ Error.call(this), this.message = message1, this.name = 'AxiosError', code1 && (this.code = code1), config3 && (this.config = config3), request1 && (this.request = request1), response1 && (this.response = response1); } utils1.inherits(AxiosError1, Error, { - toJSON: function() { + toJSON: function toJSON1() { return { message: this.message, name: this.name, @@ -6174,7 +6174,7 @@ value: !0 }), AxiosError1.from = function(error1, code1, config3, request1, response1, customProps1) { var axiosError1 = Object.create(prototype1); - return utils1.toFlatObject(error1, axiosError1, function(obj1) { + return utils1.toFlatObject(error1, axiosError1, function filter1(obj1) { return obj1 !== Error.prototype; }), AxiosError1.call(axiosError1, error1.message, code1, config3, request1, response1), axiosError1.name = error1.name, customProps1 && Object.assign(axiosError1, customProps1), axiosError1; }, module1.exports = AxiosError1; @@ -6185,17 +6185,17 @@ function InterceptorManager1() { this.handlers = []; } - InterceptorManager1.prototype.use = function(fulfilled1, rejected1, options1) { + InterceptorManager1.prototype.use = function use1(fulfilled1, rejected1, options1) { return this.handlers.push({ fulfilled: fulfilled1, rejected: rejected1, synchronous: !!options1 && options1.synchronous, runWhen: options1 ? options1.runWhen : null }), this.handlers.length - 1; - }, InterceptorManager1.prototype.eject = function(id1) { + }, InterceptorManager1.prototype.eject = function eject1(id1) { this.handlers[id1] && (this.handlers[id1] = null); - }, InterceptorManager1.prototype.forEach = function(fn1) { - utils1.forEach(this.handlers, function(h8) { + }, InterceptorManager1.prototype.forEach = function forEach1(fn1) { + utils1.forEach(this.handlers, function forEachHandler1(h8) { null !== h8 && fn1(h8); }); }, module1.exports = InterceptorManager1; @@ -6203,7 +6203,7 @@ 4097: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var isAbsoluteURL1 = __webpack_require__1(1793), combineURLs1 = __webpack_require__1(7303); - module1.exports = function(baseURL1, requestedURL1) { + module1.exports = function buildFullPath1(baseURL1, requestedURL1) { return baseURL1 && !isAbsoluteURL1(requestedURL1) ? combineURLs1(baseURL1, requestedURL1) : requestedURL1; }; }, @@ -6213,7 +6213,7 @@ function throwIfCancellationRequested1(config3) { if (config3.cancelToken && config3.cancelToken.throwIfRequested(), config3.signal && config3.signal.aborted) throw new CanceledError1(); } - module1.exports = function(config3) { + module1.exports = function dispatchRequest1(config3) { return throwIfCancellationRequested1(config3), config3.headers = config3.headers || {}, config3.data = transformData1.call(config3, config3.data, config3.headers, config3.transformRequest), config3.headers = utils1.merge(config3.headers.common || {}, config3.headers[config3.method] || {}, config3.headers), utils1.forEach([ 'delete', 'get', @@ -6222,11 +6222,11 @@ 'put', 'patch', 'common' - ], function(method1) { + ], function cleanHeaderConfig1(method1) { delete config3.headers[method1]; - }), (config3.adapter || defaults1.adapter)(config3).then(function(response1) { + }), (config3.adapter || defaults1.adapter)(config3).then(function onAdapterResolution1(response1) { return throwIfCancellationRequested1(config3), response1.data = transformData1.call(config3, response1.data, response1.headers, config3.transformResponse), response1; - }, function(reason1) { + }, function onAdapterRejection1(reason1) { return !isCancel1(reason1) && (throwIfCancellationRequested1(config3), reason1 && reason1.response && (reason1.response.data = transformData1.call(config3, reason1.response.data, reason1.response.headers, config3.transformResponse))), Promise.reject(reason1); }); }; @@ -6234,7 +6234,7 @@ 7185: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var utils1 = __webpack_require__1(4867); - module1.exports = function(config11, config21) { + module1.exports = function mergeConfig1(config11, config21) { config21 = config21 || {}; var config3 = {}; function getMergedValue1(target1, source1) { @@ -6281,7 +6281,7 @@ responseEncoding: defaultToConfig21, validateStatus: mergeDirectKeys1 }; - return utils1.forEach(Object.keys(config11).concat(Object.keys(config21)), function(prop1) { + return utils1.forEach(Object.keys(config11).concat(Object.keys(config21)), function computeConfigValue1(prop1) { var merge1 = mergeMap1[prop1] || mergeDeepProperties1, configValue1 = merge1(prop1); utils1.isUndefined(configValue1) && merge1 !== mergeDirectKeys1 || (config3[prop1] = configValue1); }), config3; @@ -6290,7 +6290,7 @@ 6026: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var AxiosError1 = __webpack_require__1(723); - module1.exports = function(resolve1, reject1, response1) { + module1.exports = function settle1(resolve1, reject1, response1) { var validateStatus1 = response1.config.validateStatus; !response1.status || !validateStatus1 || validateStatus1(response1.status) ? resolve1(response1) : reject1(new AxiosError1('Request failed with status code ' + response1.status, [ AxiosError1.ERR_BAD_REQUEST, @@ -6301,9 +6301,9 @@ 8527: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var utils1 = __webpack_require__1(4867), defaults1 = __webpack_require__1(5546); - module1.exports = function(data1, headers1, fns1) { + module1.exports = function transformData1(data1, headers1, fns1) { var context1 = this || defaults1; - return utils1.forEach(fns1, function(fn1) { + return utils1.forEach(fns1, function transform1(fn1) { data1 = fn1.call(context1, data1, headers1); }), data1; }; @@ -6326,12 +6326,12 @@ } var defaults1 = { transitional: transitionalDefaults1, - adapter: function() { + adapter: function getDefaultAdapter1() { var adapter1; return 'undefined' != typeof XMLHttpRequest ? adapter1 = __webpack_require__1(5448) : void 0 !== process1 && '[object process]' === Object.prototype.toString.call(process1) && (adapter1 = __webpack_require__1(5448)), adapter1; }(), transformRequest: [ - function(data1, headers1) { + function transformRequest1(data1, headers1) { if (normalizeHeaderName1(headers1, 'Accept'), normalizeHeaderName1(headers1, 'Content-Type'), utils1.isFormData(data1) || utils1.isArrayBuffer(data1) || utils1.isBuffer(data1) || utils1.isStream(data1) || utils1.isFile(data1) || utils1.isBlob(data1)) return data1; if (utils1.isArrayBufferView(data1)) return data1.buffer; if (utils1.isURLSearchParams(data1)) return setContentTypeIfUnset1(headers1, 'application/x-www-form-urlencoded;charset=utf-8'), data1.toString(); @@ -6346,7 +6346,7 @@ } ], transformResponse: [ - function(data1) { + function transformResponse1(data1) { var transitional1 = this.transitional || defaults1.transitional, silentJSONParsing1 = transitional1 && transitional1.silentJSONParsing, forcedJSONParsing1 = transitional1 && transitional1.forcedJSONParsing, strictJSONParsing1 = !silentJSONParsing1 && 'json' === this.responseType; if (strictJSONParsing1 || forcedJSONParsing1 && utils1.isString(data1) && data1.length) try { return JSON.parse(data1); @@ -6367,7 +6367,7 @@ env: { FormData: __webpack_require__1(1623) }, - validateStatus: function(status1) { + validateStatus: function validateStatus1(status1) { return status1 >= 200 && status1 < 300; }, headers: { @@ -6380,13 +6380,13 @@ 'delete', 'get', 'head' - ], function(method1) { + ], function forEachMethodNoData1(method1) { defaults1.headers[method1] = {}; }), utils1.forEach([ 'post', 'put', 'patch' - ], function(method1) { + ], function forEachMethodWithData1(method1) { defaults1.headers[method1] = utils1.merge(DEFAULT_CONTENT_TYPE1); }), module1.exports = defaults1; }, @@ -6405,8 +6405,8 @@ }, 1849: function(module1) { "use strict"; - module1.exports = function(fn1, thisArg1) { - return function() { + module1.exports = function bind1(fn1, thisArg1) { + return function wrap1() { for(var args1 = Array(arguments.length), i2 = 0; i2 < args1.length; i2++)args1[i2] = arguments[i2]; return fn1.apply(thisArg1, args1); }; @@ -6418,16 +6418,16 @@ function encode1(val1) { return encodeURIComponent(val1).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']'); } - module1.exports = function(url1, params1, paramsSerializer1) { + module1.exports = function buildURL1(url1, params1, paramsSerializer1) { if (!params1) return url1; if (paramsSerializer1) serializedParams1 = paramsSerializer1(params1); else if (utils1.isURLSearchParams(params1)) serializedParams1 = params1.toString(); else { var serializedParams1, parts1 = []; - utils1.forEach(params1, function(val1, key1) { + utils1.forEach(params1, function serialize1(val1, key1) { null != val1 && (utils1.isArray(val1) ? key1 += '[]' : val1 = [ val1 - ], utils1.forEach(val1, function(v3) { + ], utils1.forEach(val1, function parseValue1(v3) { utils1.isDate(v3) ? v3 = v3.toISOString() : utils1.isObject(v3) && (v3 = JSON.stringify(v3)), parts1.push(encode1(key1) + '=' + encode1(v3)); })); }), serializedParams1 = parts1.join('&'); @@ -6441,54 +6441,54 @@ }, 7303: function(module1) { "use strict"; - module1.exports = function(baseURL1, relativeURL1) { + module1.exports = function combineURLs1(baseURL1, relativeURL1) { return relativeURL1 ? baseURL1.replace(/\/+$/, '') + '/' + relativeURL1.replace(/^\/+/, '') : baseURL1; }; }, 4372: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var utils1 = __webpack_require__1(4867); - module1.exports = utils1.isStandardBrowserEnv() ? function() { + module1.exports = utils1.isStandardBrowserEnv() ? function standardBrowserEnv1() { return { - write: function(name1, value1, expires1, path1, domain1, secure1) { + write: function write1(name1, value1, expires1, path1, domain1, secure1) { var cookie1 = []; cookie1.push(name1 + '=' + encodeURIComponent(value1)), utils1.isNumber(expires1) && cookie1.push('expires=' + new Date(expires1).toGMTString()), utils1.isString(path1) && cookie1.push('path=' + path1), utils1.isString(domain1) && cookie1.push('domain=' + domain1), !0 === secure1 && cookie1.push('secure'), document.cookie = cookie1.join('; '); }, - read: function(name1) { + read: function read1(name1) { var match1 = document.cookie.match(RegExp('(^|;\\s*)(' + name1 + ')=([^;]*)')); return match1 ? decodeURIComponent(match1[3]) : null; }, - remove: function(name1) { + remove: function remove1(name1) { this.write(name1, '', Date.now() - 86400000); } }; - }() : function() { + }() : function nonStandardBrowserEnv1() { return { - write: function() {}, - read: function() { + write: function write1() {}, + read: function read1() { return null; }, - remove: function() {} + remove: function remove1() {} }; }(); }, 1793: function(module1) { "use strict"; - module1.exports = function(url1) { + module1.exports = function isAbsoluteURL1(url1) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url1); }; }, 6268: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var utils1 = __webpack_require__1(4867); - module1.exports = function(payload1) { + module1.exports = function isAxiosError1(payload1) { return utils1.isObject(payload1) && !0 === payload1.isAxiosError; }; }, 7985: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var utils1 = __webpack_require__1(4867); - module1.exports = utils1.isStandardBrowserEnv() ? function() { + module1.exports = utils1.isStandardBrowserEnv() ? function standardBrowserEnv1() { var originURL1, msie1 = /(msie|trident)/i.test(navigator.userAgent), urlParsingNode1 = document.createElement('a'); function resolveURL1(url1) { var href1 = url1; @@ -6503,12 +6503,12 @@ pathname: '/' === urlParsingNode1.pathname.charAt(0) ? urlParsingNode1.pathname : '/' + urlParsingNode1.pathname }; } - return originURL1 = resolveURL1(window.location.href), function(requestURL1) { + return originURL1 = resolveURL1(window.location.href), function isURLSameOrigin1(requestURL1) { var parsed1 = utils1.isString(requestURL1) ? resolveURL1(requestURL1) : requestURL1; return parsed1.protocol === originURL1.protocol && parsed1.host === originURL1.host; }; - }() : function() { - return function() { + }() : function nonStandardBrowserEnv1() { + return function isURLSameOrigin1() { return !0; }; }(); @@ -6516,8 +6516,8 @@ 6016: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var utils1 = __webpack_require__1(4867); - module1.exports = function(headers1, normalizedName1) { - utils1.forEach(headers1, function(value1, name1) { + module1.exports = function normalizeHeaderName1(headers1, normalizedName1) { + utils1.forEach(headers1, function processHeader1(value1, name1) { name1 !== normalizedName1 && name1.toUpperCase() === normalizedName1.toUpperCase() && (headers1[normalizedName1] = value1, delete headers1[name1]); }); }; @@ -6546,9 +6546,9 @@ 'retry-after', 'user-agent' ]; - module1.exports = function(headers1) { + module1.exports = function parseHeaders1(headers1) { var key1, val1, i2, parsed1 = {}; - return headers1 && utils1.forEach(headers1.split('\n'), function(line1) { + return headers1 && utils1.forEach(headers1.split('\n'), function parser1(line1) { i2 = line1.indexOf(':'), key1 = utils1.trim(line1.substr(0, i2)).toLowerCase(), val1 = utils1.trim(line1.substr(i2 + 1)), key1 && !(parsed1[key1] && ignoreDuplicateOf1.indexOf(key1) >= 0) && ('set-cookie' === key1 ? parsed1[key1] = (parsed1[key1] ? parsed1[key1] : []).concat([ val1 ]) : parsed1[key1] = parsed1[key1] ? parsed1[key1] + ', ' + val1 : val1); @@ -6557,15 +6557,15 @@ }, 205: function(module1) { "use strict"; - module1.exports = function(url1) { + module1.exports = function parseProtocol1(url1) { var match1 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url1); return match1 && match1[1] || ''; }; }, 8713: function(module1) { "use strict"; - module1.exports = function(callback1) { - return function(arr1) { + module1.exports = function spread1(callback1) { + return function wrap1(arr1) { return callback1.apply(null, arr1); }; }; @@ -6584,7 +6584,7 @@ function build1(data1, parentKey1) { if (utils1.isPlainObject(data1) || utils1.isArray(data1)) { if (-1 !== stack1.indexOf(data1)) throw Error('Circular reference detected in ' + parentKey1); - stack1.push(data1), utils1.forEach(data1, function(value1, key1) { + stack1.push(data1), utils1.forEach(data1, function each1(value1, key1) { if (!utils1.isUndefined(value1)) { var arr1, fullKey1 = parentKey1 ? parentKey1 + '.' + key1 : key1; if (value1 && !parentKey1 && 'object' == typeof value1) { @@ -6616,7 +6616,7 @@ 'string', 'symbol' ].forEach(function(type1, i2) { - validators1[type1] = function(thing1) { + validators1[type1] = function validator1(thing1) { return typeof thing1 === type1 || 'a' + (i2 < 1 ? 'n ' : ' ') + type1; }; }); @@ -6633,7 +6633,7 @@ if (!0 !== allowUnknown1) throw new AxiosError1('Unknown option ' + opt1, AxiosError1.ERR_BAD_OPTION); } } - validators1.transitional = function(validator1, version1, message1) { + validators1.transitional = function transitional1(validator1, version1, message1) { function formatMessage1(opt1, desc1) { return '[Axios v' + VERSION1 + '] Transitional option \'' + opt1 + '\'' + desc1 + (message1 ? '. ' + message1 : ''); } @@ -6655,7 +6655,7 @@ }; }(Object.create(null)); function kindOfTest1(type1) { - return type1 = type1.toLowerCase(), function(thing1) { + return type1 = type1.toLowerCase(), function isKindOf1(thing1) { return kindOf1(thing1) === type1; }; } @@ -6721,7 +6721,7 @@ return result1; } function extend1(a10, b10, thisArg1) { - return forEach1(b10, function(val1, key1) { + return forEach1(b10, function assignValue1(val1, key1) { thisArg1 && 'function' == typeof val1 ? a10[key1] = bind1(val1, thisArg1) : a10[key1] = val1; }), a10; } @@ -7463,19 +7463,19 @@ } return r3; } - BN1.isBN = function(num1) { + BN1.isBN = function isBN1(num1) { return num1 instanceof BN1 || null !== num1 && 'object' == typeof num1 && num1.constructor.wordSize === BN1.wordSize && Array.isArray(num1.words); - }, BN1.max = function(left1, right1) { + }, BN1.max = function max1(left1, right1) { return left1.cmp(right1) > 0 ? left1 : right1; - }, BN1.min = function(left1, right1) { + }, BN1.min = function min1(left1, right1) { return 0 > left1.cmp(right1) ? left1 : right1; - }, BN1.prototype._init = function(number1, base1, endian1) { + }, BN1.prototype._init = function init1(number1, base1, endian1) { if ('number' == typeof number1) return this._initNumber(number1, base1, endian1); if ('object' == typeof number1) return this._initArray(number1, base1, endian1); 'hex' === base1 && (base1 = 16), assert1(base1 === (0 | base1) && base1 >= 2 && base1 <= 36); var start1 = 0; '-' === (number1 = number1.toString().replace(/\s+/g, ''))[0] && (start1++, this.negative = 1), start1 < number1.length && (16 === base1 ? this._parseHex(number1, start1, endian1) : (this._parseBase(number1, base1, start1), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1))); - }, BN1.prototype._initNumber = function(number1, base1, endian1) { + }, BN1.prototype._initNumber = function _initNumber1(number1, base1, endian1) { number1 < 0 && (this.negative = 1, number1 = -number1), number1 < 0x4000000 ? (this.words = [ 0x3ffffff & number1 ], this.length = 1) : number1 < 0x10000000000000 ? (this.words = [ @@ -7486,7 +7486,7 @@ number1 / 0x4000000 & 0x3ffffff, 1 ], this.length = 3), 'le' === endian1 && this._initArray(this.toArray(), base1, endian1); - }, BN1.prototype._initArray = function(number1, base1, endian1) { + }, BN1.prototype._initArray = function _initArray1(number1, base1, endian1) { if (assert1('number' == typeof number1.length), number1.length <= 0) return this.words = [ 0 ], this.length = 1, this; @@ -7496,14 +7496,14 @@ if ('be' === endian1) for(i2 = number1.length - 1, j1 = 0; i2 >= 0; i2 -= 3)w19 = number1[i2] | number1[i2 - 1] << 8 | number1[i2 - 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); else if ('le' === endian1) for(i2 = 0, j1 = 0; i2 < number1.length; i2 += 3)w19 = number1[i2] | number1[i2 + 1] << 8 | number1[i2 + 2] << 16, this.words[j1] |= w19 << off1 & 0x3ffffff, this.words[j1 + 1] = w19 >>> 26 - off1 & 0x3ffffff, (off1 += 24) >= 26 && (off1 -= 26, j1++); return this.strip(); - }, BN1.prototype._parseHex = function(number1, start1, endian1) { + }, BN1.prototype._parseHex = function _parseHex1(number1, start1, endian1) { this.length = Math.ceil((number1.length - start1) / 6), this.words = Array(this.length); for(var w19, i2 = 0; i2 < this.length; i2++)this.words[i2] = 0; var off1 = 0, j1 = 0; if ('be' === endian1) for(i2 = number1.length - 1; i2 >= start1; i2 -= 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; else for(i2 = (number1.length - start1) % 2 == 0 ? start1 + 1 : start1; i2 < number1.length; i2 += 2)w19 = parseHexByte1(number1, start1, i2) << off1, this.words[j1] |= 0x3ffffff & w19, off1 >= 18 ? (off1 -= 18, j1 += 1, this.words[j1] |= w19 >>> 26) : off1 += 8; this.strip(); - }, BN1.prototype._parseBase = function(number1, base1, start1) { + }, BN1.prototype._parseBase = function _parseBase1(number1, base1, start1) { this.words = [ 0 ], this.length = 1; @@ -7516,22 +7516,22 @@ this.imuln(pow1), this.words[0] + word1 < 0x4000000 ? this.words[0] += word1 : this._iaddn(word1); } this.strip(); - }, BN1.prototype.copy = function(dest1) { + }, BN1.prototype.copy = function copy1(dest1) { dest1.words = Array(this.length); for(var i2 = 0; i2 < this.length; i2++)dest1.words[i2] = this.words[i2]; dest1.length = this.length, dest1.negative = this.negative, dest1.red = this.red; - }, BN1.prototype.clone = function() { + }, BN1.prototype.clone = function clone1() { var r3 = new BN1(null); return this.copy(r3), r3; - }, BN1.prototype._expand = function(size1) { + }, BN1.prototype._expand = function _expand1(size1) { for(; this.length < size1;)this.words[this.length++] = 0; return this; - }, BN1.prototype.strip = function() { + }, BN1.prototype.strip = function strip1() { for(; this.length > 1 && 0 === this.words[this.length - 1];)this.length--; return this._normSign(); - }, BN1.prototype._normSign = function() { + }, BN1.prototype._normSign = function _normSign1() { return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }, BN1.prototype.inspect = function() { + }, BN1.prototype.inspect = function inspect1() { return (this.red ? ''; }; var Buffer1, zeros1 = [ @@ -7660,7 +7660,7 @@ } return 0 !== carry1 ? out1.words[k3] = 0 | carry1 : out1.length--, out1.strip(); } - BN1.prototype.toString = function(base1, padding1) { + BN1.prototype.toString = function toString1(base1, padding1) { if (padding1 = 0 | padding1 || 1, 16 === (base1 = base1 || 10) || 'hex' === base1) { out1 = ''; for(var out1, off1 = 0, carry1 = 0, i2 = 0; i2 < this.length; i2++){ @@ -7682,16 +7682,16 @@ return 0 !== this.negative && (out1 = '-' + out1), out1; } assert1(!1, 'Base should be between 2 and 36'); - }, BN1.prototype.toNumber = function() { + }, BN1.prototype.toNumber = function toNumber1() { var ret1 = this.words[0]; return 2 === this.length ? ret1 += 0x4000000 * this.words[1] : 3 === this.length && 0x01 === this.words[2] ? ret1 += 0x10000000000000 + 0x4000000 * this.words[1] : this.length > 2 && assert1(!1, 'Number can only safely store up to 53 bits'), 0 !== this.negative ? -ret1 : ret1; - }, BN1.prototype.toJSON = function() { + }, BN1.prototype.toJSON = function toJSON1() { return this.toString(16); - }, BN1.prototype.toBuffer = function(endian1, length1) { + }, BN1.prototype.toBuffer = function toBuffer1(endian1, length1) { return assert1(void 0 !== Buffer1), this.toArrayLike(Buffer1, endian1, length1); - }, BN1.prototype.toArray = function(endian1, length1) { + }, BN1.prototype.toArray = function toArray1(endian1, length1) { return this.toArrayLike(Array, endian1, length1); - }, BN1.prototype.toArrayLike = function(ArrayType1, endian1, length1) { + }, BN1.prototype.toArrayLike = function toArrayLike1(ArrayType1, endian1, length1) { var b10, i2, byteLength1 = this.byteLength(), reqLength1 = length1 || Math.max(1, byteLength1); assert1(byteLength1 <= reqLength1, 'byte array longer than desired length'), assert1(reqLength1 > 0, 'Requested array length <= 0'), this.strip(); var littleEndian1 = 'le' === endian1, res1 = new ArrayType1(reqLength1), q3 = this.clone(); @@ -7703,82 +7703,82 @@ for(i2 = 0; !q3.isZero(); i2++)b10 = q3.andln(0xff), q3.iushrn(8), res1[reqLength1 - i2 - 1] = b10; } return res1; - }, Math.clz32 ? BN1.prototype._countBits = function(w19) { + }, Math.clz32 ? BN1.prototype._countBits = function _countBits1(w19) { return 32 - Math.clz32(w19); - } : BN1.prototype._countBits = function(w19) { + } : BN1.prototype._countBits = function _countBits1(w19) { var t3 = w19, r3 = 0; return t3 >= 0x1000 && (r3 += 13, t3 >>>= 13), t3 >= 0x40 && (r3 += 7, t3 >>>= 7), t3 >= 0x8 && (r3 += 4, t3 >>>= 4), t3 >= 0x02 && (r3 += 2, t3 >>>= 2), r3 + t3; - }, BN1.prototype._zeroBits = function(w19) { + }, BN1.prototype._zeroBits = function _zeroBits1(w19) { if (0 === w19) return 26; var t3 = w19, r3 = 0; return (0x1fff & t3) == 0 && (r3 += 13, t3 >>>= 13), (0x7f & t3) == 0 && (r3 += 7, t3 >>>= 7), (0xf & t3) == 0 && (r3 += 4, t3 >>>= 4), (0x3 & t3) == 0 && (r3 += 2, t3 >>>= 2), (0x1 & t3) == 0 && r3++, r3; - }, BN1.prototype.bitLength = function() { + }, BN1.prototype.bitLength = function bitLength1() { var w19 = this.words[this.length - 1], hi1 = this._countBits(w19); return (this.length - 1) * 26 + hi1; - }, BN1.prototype.zeroBits = function() { + }, BN1.prototype.zeroBits = function zeroBits1() { if (this.isZero()) return 0; for(var r3 = 0, i2 = 0; i2 < this.length; i2++){ var b10 = this._zeroBits(this.words[i2]); if (r3 += b10, 26 !== b10) break; } return r3; - }, BN1.prototype.byteLength = function() { + }, BN1.prototype.byteLength = function byteLength1() { return Math.ceil(this.bitLength() / 8); - }, BN1.prototype.toTwos = function(width1) { + }, BN1.prototype.toTwos = function toTwos1(width1) { return 0 !== this.negative ? this.abs().inotn(width1).iaddn(1) : this.clone(); - }, BN1.prototype.fromTwos = function(width1) { + }, BN1.prototype.fromTwos = function fromTwos1(width1) { return this.testn(width1 - 1) ? this.notn(width1).iaddn(1).ineg() : this.clone(); - }, BN1.prototype.isNeg = function() { + }, BN1.prototype.isNeg = function isNeg1() { return 0 !== this.negative; - }, BN1.prototype.neg = function() { + }, BN1.prototype.neg = function neg1() { return this.clone().ineg(); - }, BN1.prototype.ineg = function() { + }, BN1.prototype.ineg = function ineg1() { return this.isZero() || (this.negative ^= 1), this; - }, BN1.prototype.iuor = function(num1) { + }, BN1.prototype.iuor = function iuor1(num1) { for(; this.length < num1.length;)this.words[this.length++] = 0; for(var i2 = 0; i2 < num1.length; i2++)this.words[i2] = this.words[i2] | num1.words[i2]; return this.strip(); - }, BN1.prototype.ior = function(num1) { + }, BN1.prototype.ior = function ior1(num1) { return assert1((this.negative | num1.negative) == 0), this.iuor(num1); - }, BN1.prototype.or = function(num1) { + }, BN1.prototype.or = function or1(num1) { return this.length > num1.length ? this.clone().ior(num1) : num1.clone().ior(this); - }, BN1.prototype.uor = function(num1) { + }, BN1.prototype.uor = function uor1(num1) { return this.length > num1.length ? this.clone().iuor(num1) : num1.clone().iuor(this); - }, BN1.prototype.iuand = function(num1) { + }, BN1.prototype.iuand = function iuand1(num1) { var b10; b10 = this.length > num1.length ? num1 : this; for(var i2 = 0; i2 < b10.length; i2++)this.words[i2] = this.words[i2] & num1.words[i2]; return this.length = b10.length, this.strip(); - }, BN1.prototype.iand = function(num1) { + }, BN1.prototype.iand = function iand1(num1) { return assert1((this.negative | num1.negative) == 0), this.iuand(num1); - }, BN1.prototype.and = function(num1) { + }, BN1.prototype.and = function and1(num1) { return this.length > num1.length ? this.clone().iand(num1) : num1.clone().iand(this); - }, BN1.prototype.uand = function(num1) { + }, BN1.prototype.uand = function uand1(num1) { return this.length > num1.length ? this.clone().iuand(num1) : num1.clone().iuand(this); - }, BN1.prototype.iuxor = function(num1) { + }, BN1.prototype.iuxor = function iuxor1(num1) { this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); for(var a10, b10, i2 = 0; i2 < b10.length; i2++)this.words[i2] = a10.words[i2] ^ b10.words[i2]; if (this !== a10) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this.length = a10.length, this.strip(); - }, BN1.prototype.ixor = function(num1) { + }, BN1.prototype.ixor = function ixor1(num1) { return assert1((this.negative | num1.negative) == 0), this.iuxor(num1); - }, BN1.prototype.xor = function(num1) { + }, BN1.prototype.xor = function xor1(num1) { return this.length > num1.length ? this.clone().ixor(num1) : num1.clone().ixor(this); - }, BN1.prototype.uxor = function(num1) { + }, BN1.prototype.uxor = function uxor1(num1) { return this.length > num1.length ? this.clone().iuxor(num1) : num1.clone().iuxor(this); - }, BN1.prototype.inotn = function(width1) { + }, BN1.prototype.inotn = function inotn1(width1) { assert1('number' == typeof width1 && width1 >= 0); var bytesNeeded1 = 0 | Math.ceil(width1 / 26), bitsLeft1 = width1 % 26; this._expand(bytesNeeded1), bitsLeft1 > 0 && bytesNeeded1--; for(var i2 = 0; i2 < bytesNeeded1; i2++)this.words[i2] = 0x3ffffff & ~this.words[i2]; return bitsLeft1 > 0 && (this.words[i2] = ~this.words[i2] & 0x3ffffff >> 26 - bitsLeft1), this.strip(); - }, BN1.prototype.notn = function(width1) { + }, BN1.prototype.notn = function notn1(width1) { return this.clone().inotn(width1); - }, BN1.prototype.setn = function(bit1, val1) { + }, BN1.prototype.setn = function setn1(bit1, val1) { assert1('number' == typeof bit1 && bit1 >= 0); var off1 = bit1 / 26 | 0, wbit1 = bit1 % 26; return this._expand(off1 + 1), val1 ? this.words[off1] = this.words[off1] | 1 << wbit1 : this.words[off1] = this.words[off1] & ~(1 << wbit1), this.strip(); - }, BN1.prototype.iadd = function(num1) { + }, BN1.prototype.iadd = function iadd1(num1) { if (0 !== this.negative && 0 === num1.negative) return this.negative = 0, r3 = this.isub(num1), this.negative ^= 1, this._normSign(); if (0 === this.negative && 0 !== num1.negative) return num1.negative = 0, r3 = this.isub(num1), num1.negative = 1, r3._normSign(); this.length > num1.length ? (a10 = this, b10 = num1) : (a10 = num1, b10 = this); @@ -7787,10 +7787,10 @@ if (this.length = a10.length, 0 !== carry1) this.words[this.length] = carry1, this.length++; else if (a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this; - }, BN1.prototype.add = function(num1) { + }, BN1.prototype.add = function add1(num1) { var res1; return 0 !== num1.negative && 0 === this.negative ? (num1.negative = 0, res1 = this.sub(num1), num1.negative ^= 1, res1) : 0 === num1.negative && 0 !== this.negative ? (this.negative = 0, res1 = num1.sub(this), this.negative = 1, res1) : this.length > num1.length ? this.clone().iadd(num1) : num1.clone().iadd(this); - }, BN1.prototype.isub = function(num1) { + }, BN1.prototype.isub = function isub1(num1) { if (0 !== num1.negative) { num1.negative = 0; var a10, b10, r3 = this.iadd(num1); @@ -7804,7 +7804,7 @@ for(; 0 !== carry1 && i2 < a10.length; i2++)carry1 = (r3 = (0 | a10.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & r3; if (0 === carry1 && i2 < a10.length && a10 !== this) for(; i2 < a10.length; i2++)this.words[i2] = a10.words[i2]; return this.length = Math.max(this.length, i2), a10 !== this && (this.negative = 1), this.strip(); - }, BN1.prototype.sub = function(num1) { + }, BN1.prototype.sub = function sub1(num1) { return this.clone().isub(num1); }; var comb10MulTo1 = function(self1, num1, out1) { @@ -7868,47 +7868,47 @@ function FFTM1(x3, y3) { this.x = x3, this.y = y3; } - Math.imul || (comb10MulTo1 = smallMulTo1), BN1.prototype.mulTo = function(num1, out1) { + Math.imul || (comb10MulTo1 = smallMulTo1), BN1.prototype.mulTo = function mulTo1(num1, out1) { var len3 = this.length + num1.length; return 10 === this.length && 10 === num1.length ? comb10MulTo1(this, num1, out1) : len3 < 63 ? smallMulTo1(this, num1, out1) : len3 < 1024 ? bigMulTo1(this, num1, out1) : jumboMulTo1(this, num1, out1); - }, FFTM1.prototype.makeRBT = function(N1) { + }, FFTM1.prototype.makeRBT = function makeRBT1(N1) { for(var t3 = Array(N1), l1 = BN1.prototype._countBits(N1) - 1, i2 = 0; i2 < N1; i2++)t3[i2] = this.revBin(i2, l1, N1); return t3; - }, FFTM1.prototype.revBin = function(x3, l1, N1) { + }, FFTM1.prototype.revBin = function revBin1(x3, l1, N1) { if (0 === x3 || x3 === N1 - 1) return x3; for(var rb1 = 0, i2 = 0; i2 < l1; i2++)rb1 |= (1 & x3) << l1 - i2 - 1, x3 >>= 1; return rb1; - }, FFTM1.prototype.permute = function(rbt1, rws1, iws1, rtws1, itws1, N1) { + }, FFTM1.prototype.permute = function permute1(rbt1, rws1, iws1, rtws1, itws1, N1) { for(var i2 = 0; i2 < N1; i2++)rtws1[i2] = rws1[rbt1[i2]], itws1[i2] = iws1[rbt1[i2]]; - }, FFTM1.prototype.transform = function(rws1, iws1, rtws1, itws1, N1, rbt1) { + }, FFTM1.prototype.transform = function transform1(rws1, iws1, rtws1, itws1, N1, rbt1) { this.permute(rbt1, rws1, iws1, rtws1, itws1, N1); for(var s3 = 1; s3 < N1; s3 <<= 1)for(var l1 = s3 << 1, rtwdf1 = Math.cos(2 * Math.PI / l1), itwdf1 = Math.sin(2 * Math.PI / l1), p3 = 0; p3 < N1; p3 += l1)for(var rtwdf_1 = rtwdf1, itwdf_1 = itwdf1, j1 = 0; j1 < s3; j1++){ var re1 = rtws1[p3 + j1], ie1 = itws1[p3 + j1], ro1 = rtws1[p3 + j1 + s3], io1 = itws1[p3 + j1 + s3], rx1 = rtwdf_1 * ro1 - itwdf_1 * io1; io1 = rtwdf_1 * io1 + itwdf_1 * ro1, ro1 = rx1, rtws1[p3 + j1] = re1 + ro1, itws1[p3 + j1] = ie1 + io1, rtws1[p3 + j1 + s3] = re1 - ro1, itws1[p3 + j1 + s3] = ie1 - io1, j1 !== l1 && (rx1 = rtwdf1 * rtwdf_1 - itwdf1 * itwdf_1, itwdf_1 = rtwdf1 * itwdf_1 + itwdf1 * rtwdf_1, rtwdf_1 = rx1); } - }, FFTM1.prototype.guessLen13b = function(n2, m1) { + }, FFTM1.prototype.guessLen13b = function guessLen13b1(n2, m1) { var N1 = 1 | Math.max(m1, n2), odd1 = 1 & N1, i2 = 0; for(N1 = N1 / 2 | 0; N1; N1 >>>= 1)i2++; return 1 << i2 + 1 + odd1; - }, FFTM1.prototype.conjugate = function(rws1, iws1, N1) { + }, FFTM1.prototype.conjugate = function conjugate1(rws1, iws1, N1) { if (!(N1 <= 1)) for(var i2 = 0; i2 < N1 / 2; i2++){ var t3 = rws1[i2]; rws1[i2] = rws1[N1 - i2 - 1], rws1[N1 - i2 - 1] = t3, t3 = iws1[i2], iws1[i2] = -iws1[N1 - i2 - 1], iws1[N1 - i2 - 1] = -t3; } - }, FFTM1.prototype.normalize13b = function(ws1, N1) { + }, FFTM1.prototype.normalize13b = function normalize13b1(ws1, N1) { for(var carry1 = 0, i2 = 0; i2 < N1 / 2; i2++){ var w19 = 0x2000 * Math.round(ws1[2 * i2 + 1] / N1) + Math.round(ws1[2 * i2] / N1) + carry1; ws1[i2] = 0x3ffffff & w19, carry1 = w19 < 0x4000000 ? 0 : w19 / 0x4000000 | 0; } return ws1; - }, FFTM1.prototype.convert13b = function(ws1, len3, rws1, N1) { + }, FFTM1.prototype.convert13b = function convert13b1(ws1, len3, rws1, N1) { for(var carry1 = 0, i2 = 0; i2 < len3; i2++)carry1 += 0 | ws1[i2], rws1[2 * i2] = 0x1fff & carry1, carry1 >>>= 13, rws1[2 * i2 + 1] = 0x1fff & carry1, carry1 >>>= 13; for(i2 = 2 * len3; i2 < N1; ++i2)rws1[i2] = 0; assert1(0 === carry1), assert1((-8192 & carry1) == 0); - }, FFTM1.prototype.stub = function(N1) { + }, FFTM1.prototype.stub = function stub1(N1) { for(var ph1 = Array(N1), i2 = 0; i2 < N1; i2++)ph1[i2] = 0; return ph1; - }, FFTM1.prototype.mulp = function(x3, y3, out1) { + }, FFTM1.prototype.mulp = function mulp1(x3, y3, out1) { var N1 = 2 * this.guessLen13b(x3.length, y3.length), rbt1 = this.makeRBT(N1), _1 = this.stub(N1), rws1 = Array(N1), rwst1 = Array(N1), iwst1 = Array(N1), nrws1 = Array(N1), nrwst1 = Array(N1), niwst1 = Array(N1), rmws1 = out1.words; rmws1.length = N1, this.convert13b(x3.words, x3.length, rws1, N1), this.convert13b(y3.words, y3.length, nrws1, N1), this.transform(rws1, _1, rwst1, iwst1, N1, rbt1), this.transform(nrws1, _1, nrwst1, niwst1, N1, rbt1); for(var i2 = 0; i2 < N1; i2++){ @@ -7916,34 +7916,34 @@ iwst1[i2] = rwst1[i2] * niwst1[i2] + iwst1[i2] * nrwst1[i2], rwst1[i2] = rx1; } return this.conjugate(rwst1, iwst1, N1), this.transform(rwst1, iwst1, rmws1, _1, N1, rbt1), this.conjugate(rmws1, _1, N1), this.normalize13b(rmws1, N1), out1.negative = x3.negative ^ y3.negative, out1.length = x3.length + y3.length, out1.strip(); - }, BN1.prototype.mul = function(num1) { + }, BN1.prototype.mul = function mul1(num1) { var out1 = new BN1(null); return out1.words = Array(this.length + num1.length), this.mulTo(num1, out1); - }, BN1.prototype.mulf = function(num1) { + }, BN1.prototype.mulf = function mulf1(num1) { var out1 = new BN1(null); return out1.words = Array(this.length + num1.length), jumboMulTo1(this, num1, out1); - }, BN1.prototype.imul = function(num1) { + }, BN1.prototype.imul = function imul1(num1) { return this.clone().mulTo(num1, this); - }, BN1.prototype.imuln = function(num1) { + }, BN1.prototype.imuln = function imuln1(num1) { assert1('number' == typeof num1), assert1(num1 < 0x4000000); for(var carry1 = 0, i2 = 0; i2 < this.length; i2++){ var w19 = (0 | this.words[i2]) * num1, lo1 = (0x3ffffff & w19) + (0x3ffffff & carry1); carry1 >>= 26, carry1 += (w19 / 0x4000000 | 0) + (lo1 >>> 26), this.words[i2] = 0x3ffffff & lo1; } return 0 !== carry1 && (this.words[i2] = carry1, this.length++), this; - }, BN1.prototype.muln = function(num1) { + }, BN1.prototype.muln = function muln1(num1) { return this.clone().imuln(num1); - }, BN1.prototype.sqr = function() { + }, BN1.prototype.sqr = function sqr1() { return this.mul(this); - }, BN1.prototype.isqr = function() { + }, BN1.prototype.isqr = function isqr1() { return this.imul(this.clone()); - }, BN1.prototype.pow = function(num1) { + }, BN1.prototype.pow = function pow1(num1) { var w19 = toBitArray1(num1); if (0 === w19.length) return new BN1(1); for(var res1 = this, i2 = 0; i2 < w19.length && 0 === w19[i2]; i2++, res1 = res1.sqr()); if (++i2 < w19.length) for(var q3 = res1.sqr(); i2 < w19.length; i2++, q3 = q3.sqr())0 !== w19[i2] && (res1 = res1.mul(q3)); return res1; - }, BN1.prototype.iushln = function(bits1) { + }, BN1.prototype.iushln = function iushln1(bits1) { assert1('number' == typeof bits1 && bits1 >= 0); var i2, r3 = bits1 % 26, s3 = (bits1 - r3) / 26, carryMask1 = 0x3ffffff >>> 26 - r3 << 26 - r3; if (0 !== r3) { @@ -7960,9 +7960,9 @@ this.length += s3; } return this.strip(); - }, BN1.prototype.ishln = function(bits1) { + }, BN1.prototype.ishln = function ishln1(bits1) { return assert1(0 === this.negative), this.iushln(bits1); - }, BN1.prototype.iushrn = function(bits1, hint1, extended1) { + }, BN1.prototype.iushrn = function iushrn1(bits1, hint1, extended1) { assert1('number' == typeof bits1 && bits1 >= 0), h8 = hint1 ? (hint1 - hint1 % 26) / 26 : 0; var h8, r3 = bits1 % 26, s3 = Math.min((bits1 - r3) / 26, this.length), mask1 = 0x3ffffff ^ 0x3ffffff >>> r3 << r3, maskedWords1 = extended1; if (h8 -= s3, h8 = Math.max(0, h8), maskedWords1) { @@ -7978,21 +7978,21 @@ this.words[i2] = carry1 << 26 - r3 | word1 >>> r3, carry1 = word1 & mask1; } return maskedWords1 && 0 !== carry1 && (maskedWords1.words[maskedWords1.length++] = carry1), 0 === this.length && (this.words[0] = 0, this.length = 1), this.strip(); - }, BN1.prototype.ishrn = function(bits1, hint1, extended1) { + }, BN1.prototype.ishrn = function ishrn1(bits1, hint1, extended1) { return assert1(0 === this.negative), this.iushrn(bits1, hint1, extended1); - }, BN1.prototype.shln = function(bits1) { + }, BN1.prototype.shln = function shln1(bits1) { return this.clone().ishln(bits1); - }, BN1.prototype.ushln = function(bits1) { + }, BN1.prototype.ushln = function ushln1(bits1) { return this.clone().iushln(bits1); - }, BN1.prototype.shrn = function(bits1) { + }, BN1.prototype.shrn = function shrn1(bits1) { return this.clone().ishrn(bits1); - }, BN1.prototype.ushrn = function(bits1) { + }, BN1.prototype.ushrn = function ushrn1(bits1) { return this.clone().iushrn(bits1); - }, BN1.prototype.testn = function(bit1) { + }, BN1.prototype.testn = function testn1(bit1) { assert1('number' == typeof bit1 && bit1 >= 0); var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; return !(this.length <= s3) && !!(this.words[s3] & q3); - }, BN1.prototype.imaskn = function(bits1) { + }, BN1.prototype.imaskn = function imaskn1(bits1) { assert1('number' == typeof bits1 && bits1 >= 0); var r3 = bits1 % 26, s3 = (bits1 - r3) / 26; if (assert1(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= s3) return this; @@ -8001,29 +8001,29 @@ this.words[this.length - 1] &= mask1; } return this.strip(); - }, BN1.prototype.maskn = function(bits1) { + }, BN1.prototype.maskn = function maskn1(bits1) { return this.clone().imaskn(bits1); - }, BN1.prototype.iaddn = function(num1) { + }, BN1.prototype.iaddn = function iaddn1(num1) { return (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) ? this.isubn(-num1) : 0 !== this.negative ? (1 === this.length && (0 | this.words[0]) < num1 ? (this.words[0] = num1 - (0 | this.words[0]), this.negative = 0) : (this.negative = 0, this.isubn(num1), this.negative = 1), this) : this._iaddn(num1); - }, BN1.prototype._iaddn = function(num1) { + }, BN1.prototype._iaddn = function _iaddn1(num1) { this.words[0] += num1; for(var i2 = 0; i2 < this.length && this.words[i2] >= 0x4000000; i2++)this.words[i2] -= 0x4000000, i2 === this.length - 1 ? this.words[i2 + 1] = 1 : this.words[i2 + 1]++; return this.length = Math.max(this.length, i2 + 1), this; - }, BN1.prototype.isubn = function(num1) { + }, BN1.prototype.isubn = function isubn1(num1) { if (assert1('number' == typeof num1), assert1(num1 < 0x4000000), num1 < 0) return this.iaddn(-num1); if (0 !== this.negative) return this.negative = 0, this.iaddn(num1), this.negative = 1, this; if (this.words[0] -= num1, 1 === this.length && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1; else for(var i2 = 0; i2 < this.length && this.words[i2] < 0; i2++)this.words[i2] += 0x4000000, this.words[i2 + 1] -= 1; return this.strip(); - }, BN1.prototype.addn = function(num1) { + }, BN1.prototype.addn = function addn1(num1) { return this.clone().iaddn(num1); - }, BN1.prototype.subn = function(num1) { + }, BN1.prototype.subn = function subn1(num1) { return this.clone().isubn(num1); - }, BN1.prototype.iabs = function() { + }, BN1.prototype.iabs = function iabs1() { return this.negative = 0, this; - }, BN1.prototype.abs = function() { + }, BN1.prototype.abs = function abs1() { return this.clone().iabs(); - }, BN1.prototype._ishlnsubmul = function(num1, mul1, shift1) { + }, BN1.prototype._ishlnsubmul = function _ishlnsubmul1(num1, mul1, shift1) { var i2, w19, len3 = num1.length + shift1; this._expand(len3); var carry1 = 0; @@ -8036,7 +8036,7 @@ if (0 === carry1) return this.strip(); for(assert1(-1 === carry1), carry1 = 0, i2 = 0; i2 < this.length; i2++)carry1 = (w19 = -(0 | this.words[i2]) + carry1) >> 26, this.words[i2] = 0x3ffffff & w19; return this.negative = 1, this.strip(); - }, BN1.prototype._wordDiv = function(num1, mode1) { + }, BN1.prototype._wordDiv = function _wordDiv1(num1, mode1) { var q3, shift1 = this.length - num1.length, a10 = this.clone(), b10 = num1, bhi1 = 0 | b10.words[b10.length - 1]; 0 != (shift1 = 26 - this._countBits(bhi1)) && (b10 = b10.ushln(shift1), a10.iushln(shift1), bhi1 = 0 | b10.words[b10.length - 1]); var m1 = a10.length - b10.length; @@ -8055,7 +8055,7 @@ div: q3 || null, mod: a10 }; - }, BN1.prototype.divmod = function(num1, mode1, positive1) { + }, BN1.prototype.divmod = function divmod1(num1, mode1, positive1) { var div1, mod1, res1; return (assert1(!num1.isZero()), this.isZero()) ? { div: new BN1(0), @@ -8082,31 +8082,31 @@ div: this.divn(num1.words[0]), mod: new BN1(this.modn(num1.words[0])) } : this._wordDiv(num1, mode1); - }, BN1.prototype.div = function(num1) { + }, BN1.prototype.div = function div1(num1) { return this.divmod(num1, 'div', !1).div; - }, BN1.prototype.mod = function(num1) { + }, BN1.prototype.mod = function mod1(num1) { return this.divmod(num1, 'mod', !1).mod; - }, BN1.prototype.umod = function(num1) { + }, BN1.prototype.umod = function umod1(num1) { return this.divmod(num1, 'mod', !0).mod; - }, BN1.prototype.divRound = function(num1) { + }, BN1.prototype.divRound = function divRound1(num1) { var dm1 = this.divmod(num1); if (dm1.mod.isZero()) return dm1.div; var mod1 = 0 !== dm1.div.negative ? dm1.mod.isub(num1) : dm1.mod, half1 = num1.ushrn(1), r21 = num1.andln(1), cmp1 = mod1.cmp(half1); return cmp1 < 0 || 1 === r21 && 0 === cmp1 ? dm1.div : 0 !== dm1.div.negative ? dm1.div.isubn(1) : dm1.div.iaddn(1); - }, BN1.prototype.modn = function(num1) { + }, BN1.prototype.modn = function modn1(num1) { assert1(num1 <= 0x3ffffff); for(var p3 = 67108864 % num1, acc1 = 0, i2 = this.length - 1; i2 >= 0; i2--)acc1 = (p3 * acc1 + (0 | this.words[i2])) % num1; return acc1; - }, BN1.prototype.idivn = function(num1) { + }, BN1.prototype.idivn = function idivn1(num1) { assert1(num1 <= 0x3ffffff); for(var carry1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ var w19 = (0 | this.words[i2]) + 0x4000000 * carry1; this.words[i2] = w19 / num1 | 0, carry1 = w19 % num1; } return this.strip(); - }, BN1.prototype.divn = function(num1) { + }, BN1.prototype.divn = function divn1(num1) { return this.clone().idivn(num1); - }, BN1.prototype.egcd = function(p3) { + }, BN1.prototype.egcd = function egcd1(p3) { assert1(0 === p3.negative), assert1(!p3.isZero()); var x3 = this, y3 = p3.clone(); x3 = 0 !== x3.negative ? x3.umod(p3) : x3.clone(); @@ -8123,7 +8123,7 @@ b: D1, gcd: y3.iushln(g3) }; - }, BN1.prototype._invmp = function(p3) { + }, BN1.prototype._invmp = function _invmp1(p3) { assert1(0 === p3.negative), assert1(!p3.isZero()); var res1, a10 = this, b10 = p3.clone(); a10 = 0 !== a10.negative ? a10.umod(p3) : a10.clone(); @@ -8135,7 +8135,7 @@ a10.cmp(b10) >= 0 ? (a10.isub(b10), x11.isub(x21)) : (b10.isub(a10), x21.isub(x11)); } return 0 > (res1 = 0 === a10.cmpn(1) ? x11 : x21).cmpn(0) && res1.iadd(p3), res1; - }, BN1.prototype.gcd = function(num1) { + }, BN1.prototype.gcd = function gcd1(num1) { if (this.isZero()) return num1.abs(); if (num1.isZero()) return this.abs(); var a10 = this.clone(), b10 = num1.clone(); @@ -8152,15 +8152,15 @@ a10.isub(b10); } return b10.iushln(shift1); - }, BN1.prototype.invm = function(num1) { + }, BN1.prototype.invm = function invm1(num1) { return this.egcd(num1).a.umod(num1); - }, BN1.prototype.isEven = function() { + }, BN1.prototype.isEven = function isEven1() { return (1 & this.words[0]) == 0; - }, BN1.prototype.isOdd = function() { + }, BN1.prototype.isOdd = function isOdd1() { return (1 & this.words[0]) == 1; - }, BN1.prototype.andln = function(num1) { + }, BN1.prototype.andln = function andln1(num1) { return this.words[0] & num1; - }, BN1.prototype.bincn = function(bit1) { + }, BN1.prototype.bincn = function bincn1(bit1) { assert1('number' == typeof bit1); var r3 = bit1 % 26, s3 = (bit1 - r3) / 26, q3 = 1 << r3; if (this.length <= s3) return this._expand(s3 + 1), this.words[s3] |= q3, this; @@ -8169,9 +8169,9 @@ w19 += carry1, carry1 = w19 >>> 26, w19 &= 0x3ffffff, this.words[i2] = w19; } return 0 !== carry1 && (this.words[i2] = carry1, this.length++), this; - }, BN1.prototype.isZero = function() { + }, BN1.prototype.isZero = function isZero1() { return 1 === this.length && 0 === this.words[0]; - }, BN1.prototype.cmpn = function(num1) { + }, BN1.prototype.cmpn = function cmpn1(num1) { var res1, negative1 = num1 < 0; if (0 !== this.negative && !negative1) return -1; if (0 === this.negative && negative1) return 1; @@ -8182,12 +8182,12 @@ res1 = w19 === num1 ? 0 : w19 < num1 ? -1 : 1; } return 0 !== this.negative ? 0 | -res1 : res1; - }, BN1.prototype.cmp = function(num1) { + }, BN1.prototype.cmp = function cmp1(num1) { if (0 !== this.negative && 0 === num1.negative) return -1; if (0 === this.negative && 0 !== num1.negative) return 1; var res1 = this.ucmp(num1); return 0 !== this.negative ? 0 | -res1 : res1; - }, BN1.prototype.ucmp = function(num1) { + }, BN1.prototype.ucmp = function ucmp1(num1) { if (this.length > num1.length) return 1; if (this.length < num1.length) return -1; for(var res1 = 0, i2 = this.length - 1; i2 >= 0; i2--){ @@ -8198,61 +8198,61 @@ } } return res1; - }, BN1.prototype.gtn = function(num1) { + }, BN1.prototype.gtn = function gtn1(num1) { return 1 === this.cmpn(num1); - }, BN1.prototype.gt = function(num1) { + }, BN1.prototype.gt = function gt1(num1) { return 1 === this.cmp(num1); - }, BN1.prototype.gten = function(num1) { + }, BN1.prototype.gten = function gten1(num1) { return this.cmpn(num1) >= 0; - }, BN1.prototype.gte = function(num1) { + }, BN1.prototype.gte = function gte1(num1) { return this.cmp(num1) >= 0; - }, BN1.prototype.ltn = function(num1) { + }, BN1.prototype.ltn = function ltn1(num1) { return -1 === this.cmpn(num1); - }, BN1.prototype.lt = function(num1) { + }, BN1.prototype.lt = function lt1(num1) { return -1 === this.cmp(num1); - }, BN1.prototype.lten = function(num1) { + }, BN1.prototype.lten = function lten1(num1) { return 0 >= this.cmpn(num1); - }, BN1.prototype.lte = function(num1) { + }, BN1.prototype.lte = function lte1(num1) { return 0 >= this.cmp(num1); - }, BN1.prototype.eqn = function(num1) { + }, BN1.prototype.eqn = function eqn1(num1) { return 0 === this.cmpn(num1); - }, BN1.prototype.eq = function(num1) { + }, BN1.prototype.eq = function eq1(num1) { return 0 === this.cmp(num1); - }, BN1.red = function(num1) { + }, BN1.red = function red1(num1) { return new Red1(num1); - }, BN1.prototype.toRed = function(ctx1) { + }, BN1.prototype.toRed = function toRed1(ctx1) { return assert1(!this.red, 'Already a number in reduction context'), assert1(0 === this.negative, 'red works only with positives'), ctx1.convertTo(this)._forceRed(ctx1); - }, BN1.prototype.fromRed = function() { + }, BN1.prototype.fromRed = function fromRed1() { return assert1(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }, BN1.prototype._forceRed = function(ctx1) { + }, BN1.prototype._forceRed = function _forceRed1(ctx1) { return this.red = ctx1, this; - }, BN1.prototype.forceRed = function(ctx1) { + }, BN1.prototype.forceRed = function forceRed1(ctx1) { return assert1(!this.red, 'Already a number in reduction context'), this._forceRed(ctx1); - }, BN1.prototype.redAdd = function(num1) { + }, BN1.prototype.redAdd = function redAdd1(num1) { return assert1(this.red, 'redAdd works only with red numbers'), this.red.add(this, num1); - }, BN1.prototype.redIAdd = function(num1) { + }, BN1.prototype.redIAdd = function redIAdd1(num1) { return assert1(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, num1); - }, BN1.prototype.redSub = function(num1) { + }, BN1.prototype.redSub = function redSub1(num1) { return assert1(this.red, 'redSub works only with red numbers'), this.red.sub(this, num1); - }, BN1.prototype.redISub = function(num1) { + }, BN1.prototype.redISub = function redISub1(num1) { return assert1(this.red, 'redISub works only with red numbers'), this.red.isub(this, num1); - }, BN1.prototype.redShl = function(num1) { + }, BN1.prototype.redShl = function redShl1(num1) { return assert1(this.red, 'redShl works only with red numbers'), this.red.shl(this, num1); - }, BN1.prototype.redMul = function(num1) { + }, BN1.prototype.redMul = function redMul1(num1) { return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.mul(this, num1); - }, BN1.prototype.redIMul = function(num1) { + }, BN1.prototype.redIMul = function redIMul1(num1) { return assert1(this.red, 'redMul works only with red numbers'), this.red._verify2(this, num1), this.red.imul(this, num1); - }, BN1.prototype.redSqr = function() { + }, BN1.prototype.redSqr = function redSqr1() { return assert1(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }, BN1.prototype.redISqr = function() { + }, BN1.prototype.redISqr = function redISqr1() { return assert1(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }, BN1.prototype.redSqrt = function() { + }, BN1.prototype.redSqrt = function redSqrt1() { return assert1(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }, BN1.prototype.redInvm = function() { + }, BN1.prototype.redInvm = function redInvm1() { return assert1(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }, BN1.prototype.redNeg = function() { + }, BN1.prototype.redNeg = function redNeg1() { return assert1(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }, BN1.prototype.redPow = function(num1) { + }, BN1.prototype.redPow = function redPow1(num1) { return assert1(this.red && !num1.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, num1); }; var primes1 = { @@ -8285,20 +8285,20 @@ function Mont1(m1) { Red1.call(this, m1), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new BN1(1).iushln(this.shift), this.r2 = this.imod(this.r.sqr()), this.rinv = this.r._invmp(this.m), this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), this.minv = this.minv.umod(this.r), this.minv = this.r.sub(this.minv); } - MPrime1.prototype._tmp = function() { + MPrime1.prototype._tmp = function _tmp1() { var tmp1 = new BN1(null); return tmp1.words = Array(Math.ceil(this.n / 13)), tmp1; - }, MPrime1.prototype.ireduce = function(num1) { + }, MPrime1.prototype.ireduce = function ireduce1(num1) { var rlen1, r3 = num1; do this.split(r3, this.tmp), rlen1 = (r3 = (r3 = this.imulK(r3)).iadd(this.tmp)).bitLength(); while (rlen1 > this.n) var cmp1 = rlen1 < this.n ? -1 : r3.ucmp(this.p); return 0 === cmp1 ? (r3.words[0] = 0, r3.length = 1) : cmp1 > 0 ? r3.isub(this.p) : void 0 !== r3.strip ? r3.strip() : r3._strip(), r3; - }, MPrime1.prototype.split = function(input1, out1) { + }, MPrime1.prototype.split = function split1(input1, out1) { input1.iushrn(this.n, 0, out1); - }, MPrime1.prototype.imulK = function(num1) { + }, MPrime1.prototype.imulK = function imulK1(num1) { return num1.imul(this.k); - }, inherits1(K2561, MPrime1), K2561.prototype.split = function(input1, output1) { + }, inherits1(K2561, MPrime1), K2561.prototype.split = function split1(input1, output1) { for(var mask1 = 0x3fffff, outLen1 = Math.min(input1.length, 9), i2 = 0; i2 < outLen1; i2++)output1.words[i2] = input1.words[i2]; if (output1.length = outLen1, input1.length <= 9) { input1.words[0] = 0, input1.length = 1; @@ -8310,20 +8310,20 @@ input1.words[i2 - 10] = (next1 & mask1) << 4 | prev1 >>> 22, prev1 = next1; } prev1 >>>= 22, input1.words[i2 - 10] = prev1, 0 === prev1 && input1.length > 10 ? input1.length -= 10 : input1.length -= 9; - }, K2561.prototype.imulK = function(num1) { + }, K2561.prototype.imulK = function imulK1(num1) { num1.words[num1.length] = 0, num1.words[num1.length + 1] = 0, num1.length += 2; for(var lo1 = 0, i2 = 0; i2 < num1.length; i2++){ var w19 = 0 | num1.words[i2]; lo1 += 0x3d1 * w19, num1.words[i2] = 0x3ffffff & lo1, lo1 = 0x40 * w19 + (lo1 / 0x4000000 | 0); } return 0 === num1.words[num1.length - 1] && (num1.length--, 0 === num1.words[num1.length - 1] && num1.length--), num1; - }, inherits1(P2241, MPrime1), inherits1(P1921, MPrime1), inherits1(P255191, MPrime1), P255191.prototype.imulK = function(num1) { + }, inherits1(P2241, MPrime1), inherits1(P1921, MPrime1), inherits1(P255191, MPrime1), P255191.prototype.imulK = function imulK1(num1) { for(var carry1 = 0, i2 = 0; i2 < num1.length; i2++){ var hi1 = (0 | num1.words[i2]) * 0x13 + carry1, lo1 = 0x3ffffff & hi1; hi1 >>>= 26, num1.words[i2] = lo1, carry1 = hi1; } return 0 !== carry1 && (num1.words[num1.length++] = carry1), num1; - }, BN1._prime = function(name1) { + }, BN1._prime = function prime1(name1) { var prime1; if (primes1[name1]) return primes1[name1]; if ('k256' === name1) prime1 = new K2561(); @@ -8332,41 +8332,41 @@ else if ('p25519' === name1) prime1 = new P255191(); else throw Error('Unknown prime ' + name1); return primes1[name1] = prime1, prime1; - }, Red1.prototype._verify1 = function(a10) { + }, Red1.prototype._verify1 = function _verify11(a10) { assert1(0 === a10.negative, 'red works only with positives'), assert1(a10.red, 'red works only with red numbers'); - }, Red1.prototype._verify2 = function(a10, b10) { + }, Red1.prototype._verify2 = function _verify21(a10, b10) { assert1((a10.negative | b10.negative) == 0, 'red works only with positives'), assert1(a10.red && a10.red === b10.red, 'red works only with red numbers'); - }, Red1.prototype.imod = function(a10) { + }, Red1.prototype.imod = function imod1(a10) { return this.prime ? this.prime.ireduce(a10)._forceRed(this) : a10.umod(this.m)._forceRed(this); - }, Red1.prototype.neg = function(a10) { + }, Red1.prototype.neg = function neg1(a10) { return a10.isZero() ? a10.clone() : this.m.sub(a10)._forceRed(this); - }, Red1.prototype.add = function(a10, b10) { + }, Red1.prototype.add = function add1(a10, b10) { this._verify2(a10, b10); var res1 = a10.add(b10); return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1._forceRed(this); - }, Red1.prototype.iadd = function(a10, b10) { + }, Red1.prototype.iadd = function iadd1(a10, b10) { this._verify2(a10, b10); var res1 = a10.iadd(b10); return res1.cmp(this.m) >= 0 && res1.isub(this.m), res1; - }, Red1.prototype.sub = function(a10, b10) { + }, Red1.prototype.sub = function sub1(a10, b10) { this._verify2(a10, b10); var res1 = a10.sub(b10); return 0 > res1.cmpn(0) && res1.iadd(this.m), res1._forceRed(this); - }, Red1.prototype.isub = function(a10, b10) { + }, Red1.prototype.isub = function isub1(a10, b10) { this._verify2(a10, b10); var res1 = a10.isub(b10); return 0 > res1.cmpn(0) && res1.iadd(this.m), res1; - }, Red1.prototype.shl = function(a10, num1) { + }, Red1.prototype.shl = function shl1(a10, num1) { return this._verify1(a10), this.imod(a10.ushln(num1)); - }, Red1.prototype.imul = function(a10, b10) { + }, Red1.prototype.imul = function imul1(a10, b10) { return this._verify2(a10, b10), this.imod(a10.imul(b10)); - }, Red1.prototype.mul = function(a10, b10) { + }, Red1.prototype.mul = function mul1(a10, b10) { return this._verify2(a10, b10), this.imod(a10.mul(b10)); - }, Red1.prototype.isqr = function(a10) { + }, Red1.prototype.isqr = function isqr1(a10) { return this.imul(a10, a10.clone()); - }, Red1.prototype.sqr = function(a10) { + }, Red1.prototype.sqr = function sqr1(a10) { return this.mul(a10, a10); - }, Red1.prototype.sqrt = function(a10) { + }, Red1.prototype.sqrt = function sqrt1(a10) { if (a10.isZero()) return a10.clone(); var mod31 = this.m.andln(3); if (assert1(mod31 % 2 == 1), 3 === mod31) { @@ -8384,10 +8384,10 @@ r3 = r3.redMul(b10), c5 = b10.redSqr(), t3 = t3.redMul(c5), m1 = i2; } return r3; - }, Red1.prototype.invm = function(a10) { + }, Red1.prototype.invm = function invm1(a10) { var inv1 = a10._invmp(this.m); return 0 !== inv1.negative ? (inv1.negative = 0, this.imod(inv1).redNeg()) : this.imod(inv1); - }, Red1.prototype.pow = function(a10, num1) { + }, Red1.prototype.pow = function pow1(a10, num1) { if (num1.isZero()) return new BN1(1).toRed(this); if (0 === num1.cmpn(1)) return a10.clone(); var windowSize1 = 4, wnd1 = Array(16); @@ -8406,28 +8406,28 @@ start1 = 26; } return res1; - }, Red1.prototype.convertTo = function(num1) { + }, Red1.prototype.convertTo = function convertTo1(num1) { var r3 = num1.umod(this.m); return r3 === num1 ? r3.clone() : r3; - }, Red1.prototype.convertFrom = function(num1) { + }, Red1.prototype.convertFrom = function convertFrom1(num1) { var res1 = num1.clone(); return res1.red = null, res1; - }, BN1.mont = function(num1) { + }, BN1.mont = function mont1(num1) { return new Mont1(num1); - }, inherits1(Mont1, Red1), Mont1.prototype.convertTo = function(num1) { + }, inherits1(Mont1, Red1), Mont1.prototype.convertTo = function convertTo1(num1) { return this.imod(num1.ushln(this.shift)); - }, Mont1.prototype.convertFrom = function(num1) { + }, Mont1.prototype.convertFrom = function convertFrom1(num1) { var r3 = this.imod(num1.mul(this.rinv)); return r3.red = null, r3; - }, Mont1.prototype.imul = function(a10, b10) { + }, Mont1.prototype.imul = function imul1(a10, b10) { if (a10.isZero() || b10.isZero()) return a10.words[0] = 0, a10.length = 1, a10; var t3 = a10.imul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); - }, Mont1.prototype.mul = function(a10, b10) { + }, Mont1.prototype.mul = function mul1(a10, b10) { if (a10.isZero() || b10.isZero()) return new BN1(0)._forceRed(this); var t3 = a10.mul(b10), c5 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), u3 = t3.isub(c5).iushrn(this.shift), res1 = u3; return u3.cmp(this.m) >= 0 ? res1 = u3.isub(this.m) : 0 > u3.cmpn(0) && (res1 = u3.iadd(this.m)), res1._forceRed(this); - }, Mont1.prototype.invm = function(a10) { + }, Mont1.prototype.invm = function invm1(a10) { return this.imod(a10._invmp(this.m).mul(this.r2))._forceRed(this); }; }(module1 = __webpack_require__1.nmd(module1), this); @@ -8437,18 +8437,18 @@ function Rand1(rand1) { this.rand = rand1; } - if (module1.exports = function(len3) { + if (module1.exports = function rand1(len3) { return r3 || (r3 = new Rand1(null)), r3.generate(len3); - }, module1.exports.Rand = Rand1, Rand1.prototype.generate = function(len3) { + }, module1.exports.Rand = Rand1, Rand1.prototype.generate = function generate1(len3) { return this._rand(len3); - }, Rand1.prototype._rand = function(n2) { + }, Rand1.prototype._rand = function _rand1(n2) { if (this.rand.getBytes) return this.rand.getBytes(n2); for(var res1 = new Uint8Array(n2), i2 = 0; i2 < res1.length; i2++)res1[i2] = this.rand.getByte(); return res1; - }, 'object' == typeof self) self.crypto && self.crypto.getRandomValues ? Rand1.prototype._rand = function(n2) { + }, 'object' == typeof self) self.crypto && self.crypto.getRandomValues ? Rand1.prototype._rand = function _rand1(n2) { var arr1 = new Uint8Array(n2); return self.crypto.getRandomValues(arr1), arr1; - } : self.msCrypto && self.msCrypto.getRandomValues ? Rand1.prototype._rand = function(n2) { + } : self.msCrypto && self.msCrypto.getRandomValues ? Rand1.prototype._rand = function _rand1(n2) { var arr1 = new Uint8Array(n2); return self.msCrypto.getRandomValues(arr1), arr1; } : 'object' == typeof window && (Rand1.prototype._rand = function() { @@ -8457,7 +8457,7 @@ else try { var crypto1 = __webpack_require__1(9214); if ('function' != typeof crypto1.randomBytes) throw Error('Not supported'); - Rand1.prototype._rand = function(n2) { + Rand1.prototype._rand = function _rand1(n2) { return crypto1.randomBytes(n2); }; } catch (e1) {} @@ -8731,7 +8731,7 @@ }, 7753: function(module1) { "use strict"; - module1.exports = function(db1, location1, keyRange1, options1, callback1) { + module1.exports = function clear1(db1, location1, keyRange1, options1, callback1) { if (0 === options1.limit) return db1.nextTick(callback1); const transaction1 = db1.db.transaction([ location1 @@ -8760,14 +8760,14 @@ }, 1217: function(module1) { "use strict"; - module1.exports = function(options1) { + module1.exports = function createKeyRange1(options1) { const lower1 = void 0 !== options1.gte ? options1.gte : void 0 !== options1.gt ? options1.gt : void 0, upper1 = void 0 !== options1.lte ? options1.lte : void 0 !== options1.lt ? options1.lt : void 0, lowerExclusive1 = void 0 === options1.gte, upperExclusive1 = void 0 === options1.lte; return void 0 !== lower1 && void 0 !== upper1 ? IDBKeyRange.bound(lower1, upper1, lowerExclusive1, upperExclusive1) : void 0 !== lower1 ? IDBKeyRange.lowerBound(lower1, lowerExclusive1) : void 0 !== upper1 ? IDBKeyRange.upperBound(upper1, upperExclusive1) : null; }; }, 3533: function(module1, __unused_webpack_exports1, __webpack_require__1) { const Buffer1 = __webpack_require__1(9509).Buffer; - module1.exports = class { + module1.exports = class BufferPipe1 { constructor(buf1 = Buffer1.from([])){ this.buffer = buf1; } @@ -9045,9 +9045,9 @@ return allocUnsafe1(size1); }, Buffer1.allocUnsafeSlow = function(size1) { return allocUnsafe1(size1); - }, Buffer1.isBuffer = function(b10) { + }, Buffer1.isBuffer = function isBuffer1(b10) { return null != b10 && !0 === b10._isBuffer && b10 !== Buffer1.prototype; - }, Buffer1.compare = function(a10, b10) { + }, Buffer1.compare = function compare1(a10, b10) { if (isInstance1(a10, Uint8Array) && (a10 = Buffer1.from(a10, a10.offset, a10.byteLength)), isInstance1(b10, Uint8Array) && (b10 = Buffer1.from(b10, b10.offset, b10.byteLength)), !Buffer1.isBuffer(a10) || !Buffer1.isBuffer(b10)) throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); if (a10 === b10) return 0; let x3 = a10.length, y3 = b10.length; @@ -9056,7 +9056,7 @@ break; } return x3 < y3 ? -1 : y3 < x3 ? 1 : 0; - }, Buffer1.isEncoding = function(encoding1) { + }, Buffer1.isEncoding = function isEncoding1(encoding1) { switch(String(encoding1).toLowerCase()){ case 'hex': case 'utf8': @@ -9073,7 +9073,7 @@ default: return !1; } - }, Buffer1.concat = function(list1, length1) { + }, Buffer1.concat = function concat1(list1, length1) { let i2; if (!Array.isArray(list1)) throw TypeError('"list" argument must be an Array of Buffers'); if (0 === list1.length) return Buffer1.alloc(0); @@ -9088,32 +9088,32 @@ pos1 += buf1.length; } return buffer1; - }, Buffer1.byteLength = byteLength1, Buffer1.prototype._isBuffer = !0, Buffer1.prototype.swap16 = function() { + }, Buffer1.byteLength = byteLength1, Buffer1.prototype._isBuffer = !0, Buffer1.prototype.swap16 = function swap161() { const len3 = this.length; if (len3 % 2 != 0) throw RangeError('Buffer size must be a multiple of 16-bits'); for(let i2 = 0; i2 < len3; i2 += 2)swap1(this, i2, i2 + 1); return this; - }, Buffer1.prototype.swap32 = function() { + }, Buffer1.prototype.swap32 = function swap321() { const len3 = this.length; if (len3 % 4 != 0) throw RangeError('Buffer size must be a multiple of 32-bits'); for(let i2 = 0; i2 < len3; i2 += 4)swap1(this, i2, i2 + 3), swap1(this, i2 + 1, i2 + 2); return this; - }, Buffer1.prototype.swap64 = function() { + }, Buffer1.prototype.swap64 = function swap641() { const len3 = this.length; if (len3 % 8 != 0) throw RangeError('Buffer size must be a multiple of 64-bits'); for(let i2 = 0; i2 < len3; i2 += 8)swap1(this, i2, i2 + 7), swap1(this, i2 + 1, i2 + 6), swap1(this, i2 + 2, i2 + 5), swap1(this, i2 + 3, i2 + 4); return this; - }, Buffer1.prototype.toString = function() { + }, Buffer1.prototype.toString = function toString1() { const length1 = this.length; return 0 === length1 ? '' : 0 == arguments.length ? utf8Slice1(this, 0, length1) : slowToString1.apply(this, arguments); - }, Buffer1.prototype.toLocaleString = Buffer1.prototype.toString, Buffer1.prototype.equals = function(b10) { + }, Buffer1.prototype.toLocaleString = Buffer1.prototype.toString, Buffer1.prototype.equals = function equals1(b10) { if (!Buffer1.isBuffer(b10)) throw TypeError('Argument must be a Buffer'); return this === b10 || 0 === Buffer1.compare(this, b10); - }, Buffer1.prototype.inspect = function() { + }, Buffer1.prototype.inspect = function inspect1() { let str1 = ''; const max1 = exports1.INSPECT_MAX_BYTES; return str1 = this.toString('hex', 0, max1).replace(/(.{2})/g, '$1 ').trim(), this.length > max1 && (str1 += ' ... '), ''; - }, customInspectSymbol1 && (Buffer1.prototype[customInspectSymbol1] = Buffer1.prototype.inspect), Buffer1.prototype.compare = function(target1, start1, end1, thisStart1, thisEnd1) { + }, customInspectSymbol1 && (Buffer1.prototype[customInspectSymbol1] = Buffer1.prototype.inspect), Buffer1.prototype.compare = function compare1(target1, start1, end1, thisStart1, thisEnd1) { if (isInstance1(target1, Uint8Array) && (target1 = Buffer1.from(target1, target1.offset, target1.byteLength)), !Buffer1.isBuffer(target1)) throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target1); if (void 0 === start1 && (start1 = 0), void 0 === end1 && (end1 = target1 ? target1.length : 0), void 0 === thisStart1 && (thisStart1 = 0), void 0 === thisEnd1 && (thisEnd1 = this.length), start1 < 0 || end1 > target1.length || thisStart1 < 0 || thisEnd1 > this.length) throw RangeError('out of range index'); if (thisStart1 >= thisEnd1 && start1 >= end1) return 0; @@ -9127,13 +9127,13 @@ break; } return x3 < y3 ? -1 : y3 < x3 ? 1 : 0; - }, Buffer1.prototype.includes = function(val1, byteOffset1, encoding1) { + }, Buffer1.prototype.includes = function includes1(val1, byteOffset1, encoding1) { return -1 !== this.indexOf(val1, byteOffset1, encoding1); - }, Buffer1.prototype.indexOf = function(val1, byteOffset1, encoding1) { + }, Buffer1.prototype.indexOf = function indexOf1(val1, byteOffset1, encoding1) { return bidirectionalIndexOf1(this, val1, byteOffset1, encoding1, !0); - }, Buffer1.prototype.lastIndexOf = function(val1, byteOffset1, encoding1) { + }, Buffer1.prototype.lastIndexOf = function lastIndexOf1(val1, byteOffset1, encoding1) { return bidirectionalIndexOf1(this, val1, byteOffset1, encoding1, !1); - }, Buffer1.prototype.write = function(string1, offset1, length1, encoding1) { + }, Buffer1.prototype.write = function write1(string1, offset1, length1, encoding1) { if (void 0 === offset1) encoding1 = 'utf8', length1 = this.length, offset1 = 0; else if (void 0 === length1 && 'string' == typeof offset1) encoding1 = offset1, length1 = this.length, offset1 = 0; else if (isFinite(offset1)) offset1 >>>= 0, isFinite(length1) ? (length1 >>>= 0, void 0 === encoding1 && (encoding1 = 'utf8')) : (encoding1 = length1, length1 = void 0); @@ -9163,7 +9163,7 @@ if (loweredCase1) throw TypeError('Unknown encoding: ' + encoding1); encoding1 = ('' + encoding1).toLowerCase(), loweredCase1 = !0; } - }, Buffer1.prototype.toJSON = function() { + }, Buffer1.prototype.toJSON = function toJSON1() { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) @@ -9234,88 +9234,88 @@ function writeDouble1(buf1, value1, offset1, littleEndian1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkIEEE7541(buf1, value1, offset1, 8, 1.7976931348623157E+308, -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000), ieee7541.write(buf1, value1, offset1, littleEndian1, 52, 8), offset1 + 8; } - Buffer1.prototype.slice = function(start1, end1) { + Buffer1.prototype.slice = function slice1(start1, end1) { const len3 = this.length; start1 = ~~start1, end1 = void 0 === end1 ? len3 : ~~end1, start1 < 0 ? (start1 += len3) < 0 && (start1 = 0) : start1 > len3 && (start1 = len3), end1 < 0 ? (end1 += len3) < 0 && (end1 = 0) : end1 > len3 && (end1 = len3), end1 < start1 && (end1 = start1); const newBuf1 = this.subarray(start1, end1); return Object.setPrototypeOf(newBuf1, Buffer1.prototype), newBuf1; - }, Buffer1.prototype.readUintLE = Buffer1.prototype.readUIntLE = function(offset1, byteLength1, noAssert1) { + }, Buffer1.prototype.readUintLE = Buffer1.prototype.readUIntLE = function readUIntLE1(offset1, byteLength1, noAssert1) { offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); let val1 = this[offset1], mul1 = 1, i2 = 0; for(; ++i2 < byteLength1 && (mul1 *= 0x100);)val1 += this[offset1 + i2] * mul1; return val1; - }, Buffer1.prototype.readUintBE = Buffer1.prototype.readUIntBE = function(offset1, byteLength1, noAssert1) { + }, Buffer1.prototype.readUintBE = Buffer1.prototype.readUIntBE = function readUIntBE1(offset1, byteLength1, noAssert1) { offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); let val1 = this[offset1 + --byteLength1], mul1 = 1; for(; byteLength1 > 0 && (mul1 *= 0x100);)val1 += this[offset1 + --byteLength1] * mul1; return val1; - }, Buffer1.prototype.readUint8 = Buffer1.prototype.readUInt8 = function(offset1, noAssert1) { + }, Buffer1.prototype.readUint8 = Buffer1.prototype.readUInt8 = function readUInt81(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 1, this.length), this[offset1]; - }, Buffer1.prototype.readUint16LE = Buffer1.prototype.readUInt16LE = function(offset1, noAssert1) { + }, Buffer1.prototype.readUint16LE = Buffer1.prototype.readUInt16LE = function readUInt16LE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length), this[offset1] | this[offset1 + 1] << 8; - }, Buffer1.prototype.readUint16BE = Buffer1.prototype.readUInt16BE = function(offset1, noAssert1) { + }, Buffer1.prototype.readUint16BE = Buffer1.prototype.readUInt16BE = function readUInt16BE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length), this[offset1] << 8 | this[offset1 + 1]; - }, Buffer1.prototype.readUint32LE = Buffer1.prototype.readUInt32LE = function(offset1, noAssert1) { + }, Buffer1.prototype.readUint32LE = Buffer1.prototype.readUInt32LE = function readUInt32LE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), (this[offset1] | this[offset1 + 1] << 8 | this[offset1 + 2] << 16) + 0x1000000 * this[offset1 + 3]; - }, Buffer1.prototype.readUint32BE = Buffer1.prototype.readUInt32BE = function(offset1, noAssert1) { + }, Buffer1.prototype.readUint32BE = Buffer1.prototype.readUInt32BE = function readUInt32BE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), 0x1000000 * this[offset1] + (this[offset1 + 1] << 16 | this[offset1 + 2] << 8 | this[offset1 + 3]); - }, Buffer1.prototype.readBigUInt64LE = defineBigIntMethod1(function(offset1) { + }, Buffer1.prototype.readBigUInt64LE = defineBigIntMethod1(function readBigUInt64LE1(offset1) { validateNumber1(offset1 >>>= 0, 'offset'); const first1 = this[offset1], last1 = this[offset1 + 7]; (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); const lo1 = first1 + 256 * this[++offset1] + 65536 * this[++offset1] + 16777216 * this[++offset1], hi1 = this[++offset1] + 256 * this[++offset1] + 65536 * this[++offset1] + 16777216 * last1; return BigInt(lo1) + (BigInt(hi1) << BigInt(32)); - }), Buffer1.prototype.readBigUInt64BE = defineBigIntMethod1(function(offset1) { + }), Buffer1.prototype.readBigUInt64BE = defineBigIntMethod1(function readBigUInt64BE1(offset1) { validateNumber1(offset1 >>>= 0, 'offset'); const first1 = this[offset1], last1 = this[offset1 + 7]; (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); const hi1 = 16777216 * first1 + 65536 * this[++offset1] + 256 * this[++offset1] + this[++offset1], lo1 = 16777216 * this[++offset1] + 65536 * this[++offset1] + 256 * this[++offset1] + last1; return (BigInt(hi1) << BigInt(32)) + BigInt(lo1); - }), Buffer1.prototype.readIntLE = function(offset1, byteLength1, noAssert1) { + }), Buffer1.prototype.readIntLE = function readIntLE1(offset1, byteLength1, noAssert1) { offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); let val1 = this[offset1], mul1 = 1, i2 = 0; for(; ++i2 < byteLength1 && (mul1 *= 0x100);)val1 += this[offset1 + i2] * mul1; return val1 >= (mul1 *= 0x80) && (val1 -= Math.pow(2, 8 * byteLength1)), val1; - }, Buffer1.prototype.readIntBE = function(offset1, byteLength1, noAssert1) { + }, Buffer1.prototype.readIntBE = function readIntBE1(offset1, byteLength1, noAssert1) { offset1 >>>= 0, byteLength1 >>>= 0, noAssert1 || checkOffset1(offset1, byteLength1, this.length); let i2 = byteLength1, mul1 = 1, val1 = this[offset1 + --i2]; for(; i2 > 0 && (mul1 *= 0x100);)val1 += this[offset1 + --i2] * mul1; return val1 >= (mul1 *= 0x80) && (val1 -= Math.pow(2, 8 * byteLength1)), val1; - }, Buffer1.prototype.readInt8 = function(offset1, noAssert1) { + }, Buffer1.prototype.readInt8 = function readInt81(offset1, noAssert1) { return (offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 1, this.length), 0x80 & this[offset1]) ? -((0xff - this[offset1] + 1) * 1) : this[offset1]; - }, Buffer1.prototype.readInt16LE = function(offset1, noAssert1) { + }, Buffer1.prototype.readInt16LE = function readInt16LE1(offset1, noAssert1) { offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length); const val1 = this[offset1] | this[offset1 + 1] << 8; return 0x8000 & val1 ? 0xFFFF0000 | val1 : val1; - }, Buffer1.prototype.readInt16BE = function(offset1, noAssert1) { + }, Buffer1.prototype.readInt16BE = function readInt16BE1(offset1, noAssert1) { offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 2, this.length); const val1 = this[offset1 + 1] | this[offset1] << 8; return 0x8000 & val1 ? 0xFFFF0000 | val1 : val1; - }, Buffer1.prototype.readInt32LE = function(offset1, noAssert1) { + }, Buffer1.prototype.readInt32LE = function readInt32LE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), this[offset1] | this[offset1 + 1] << 8 | this[offset1 + 2] << 16 | this[offset1 + 3] << 24; - }, Buffer1.prototype.readInt32BE = function(offset1, noAssert1) { + }, Buffer1.prototype.readInt32BE = function readInt32BE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), this[offset1] << 24 | this[offset1 + 1] << 16 | this[offset1 + 2] << 8 | this[offset1 + 3]; - }, Buffer1.prototype.readBigInt64LE = defineBigIntMethod1(function(offset1) { + }, Buffer1.prototype.readBigInt64LE = defineBigIntMethod1(function readBigInt64LE1(offset1) { validateNumber1(offset1 >>>= 0, 'offset'); const first1 = this[offset1], last1 = this[offset1 + 7]; (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); const val1 = this[offset1 + 4] + 256 * this[offset1 + 5] + 65536 * this[offset1 + 6] + (last1 << 24); return (BigInt(val1) << BigInt(32)) + BigInt(first1 + 256 * this[++offset1] + 65536 * this[++offset1] + 16777216 * this[++offset1]); - }), Buffer1.prototype.readBigInt64BE = defineBigIntMethod1(function(offset1) { + }), Buffer1.prototype.readBigInt64BE = defineBigIntMethod1(function readBigInt64BE1(offset1) { validateNumber1(offset1 >>>= 0, 'offset'); const first1 = this[offset1], last1 = this[offset1 + 7]; (void 0 === first1 || void 0 === last1) && boundsError1(offset1, this.length - 8); const val1 = (first1 << 24) + 65536 * this[++offset1] + 256 * this[++offset1] + this[++offset1]; return (BigInt(val1) << BigInt(32)) + BigInt(16777216 * this[++offset1] + 65536 * this[++offset1] + 256 * this[++offset1] + last1); - }), Buffer1.prototype.readFloatLE = function(offset1, noAssert1) { + }), Buffer1.prototype.readFloatLE = function readFloatLE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), ieee7541.read(this, offset1, !0, 23, 4); - }, Buffer1.prototype.readFloatBE = function(offset1, noAssert1) { + }, Buffer1.prototype.readFloatBE = function readFloatBE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 4, this.length), ieee7541.read(this, offset1, !1, 23, 4); - }, Buffer1.prototype.readDoubleLE = function(offset1, noAssert1) { + }, Buffer1.prototype.readDoubleLE = function readDoubleLE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 8, this.length), ieee7541.read(this, offset1, !0, 52, 8); - }, Buffer1.prototype.readDoubleBE = function(offset1, noAssert1) { + }, Buffer1.prototype.readDoubleBE = function readDoubleBE1(offset1, noAssert1) { return offset1 >>>= 0, noAssert1 || checkOffset1(offset1, 8, this.length), ieee7541.read(this, offset1, !1, 52, 8); - }, Buffer1.prototype.writeUintLE = Buffer1.prototype.writeUIntLE = function(value1, offset1, byteLength1, noAssert1) { + }, Buffer1.prototype.writeUintLE = Buffer1.prototype.writeUIntLE = function writeUIntLE1(value1, offset1, byteLength1, noAssert1) { if (value1 = +value1, offset1 >>>= 0, byteLength1 >>>= 0, !noAssert1) { const maxBytes1 = Math.pow(2, 8 * byteLength1) - 1; checkInt1(this, value1, offset1, byteLength1, maxBytes1, 0); @@ -9323,7 +9323,7 @@ let mul1 = 1, i2 = 0; for(this[offset1] = 0xFF & value1; ++i2 < byteLength1 && (mul1 *= 0x100);)this[offset1 + i2] = value1 / mul1 & 0xFF; return offset1 + byteLength1; - }, Buffer1.prototype.writeUintBE = Buffer1.prototype.writeUIntBE = function(value1, offset1, byteLength1, noAssert1) { + }, Buffer1.prototype.writeUintBE = Buffer1.prototype.writeUIntBE = function writeUIntBE1(value1, offset1, byteLength1, noAssert1) { if (value1 = +value1, offset1 >>>= 0, byteLength1 >>>= 0, !noAssert1) { const maxBytes1 = Math.pow(2, 8 * byteLength1) - 1; checkInt1(this, value1, offset1, byteLength1, maxBytes1, 0); @@ -9331,21 +9331,21 @@ let i2 = byteLength1 - 1, mul1 = 1; for(this[offset1 + i2] = 0xFF & value1; --i2 >= 0 && (mul1 *= 0x100);)this[offset1 + i2] = value1 / mul1 & 0xFF; return offset1 + byteLength1; - }, Buffer1.prototype.writeUint8 = Buffer1.prototype.writeUInt8 = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeUint8 = Buffer1.prototype.writeUInt8 = function writeUInt81(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 1, 0xff, 0), this[offset1] = 0xff & value1, offset1 + 1; - }, Buffer1.prototype.writeUint16LE = Buffer1.prototype.writeUInt16LE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeUint16LE = Buffer1.prototype.writeUInt16LE = function writeUInt16LE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0xffff, 0), this[offset1] = 0xff & value1, this[offset1 + 1] = value1 >>> 8, offset1 + 2; - }, Buffer1.prototype.writeUint16BE = Buffer1.prototype.writeUInt16BE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeUint16BE = Buffer1.prototype.writeUInt16BE = function writeUInt16BE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0xffff, 0), this[offset1] = value1 >>> 8, this[offset1 + 1] = 0xff & value1, offset1 + 2; - }, Buffer1.prototype.writeUint32LE = Buffer1.prototype.writeUInt32LE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeUint32LE = Buffer1.prototype.writeUInt32LE = function writeUInt32LE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0xffffffff, 0), this[offset1 + 3] = value1 >>> 24, this[offset1 + 2] = value1 >>> 16, this[offset1 + 1] = value1 >>> 8, this[offset1] = 0xff & value1, offset1 + 4; - }, Buffer1.prototype.writeUint32BE = Buffer1.prototype.writeUInt32BE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeUint32BE = Buffer1.prototype.writeUInt32BE = function writeUInt32BE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0xffffffff, 0), this[offset1] = value1 >>> 24, this[offset1 + 1] = value1 >>> 16, this[offset1 + 2] = value1 >>> 8, this[offset1 + 3] = 0xff & value1, offset1 + 4; - }, Buffer1.prototype.writeBigUInt64LE = defineBigIntMethod1(function(value1, offset1 = 0) { + }, Buffer1.prototype.writeBigUInt64LE = defineBigIntMethod1(function writeBigUInt64LE1(value1, offset1 = 0) { return wrtBigUInt64LE1(this, value1, offset1, BigInt(0), BigInt('0xffffffffffffffff')); - }), Buffer1.prototype.writeBigUInt64BE = defineBigIntMethod1(function(value1, offset1 = 0) { + }), Buffer1.prototype.writeBigUInt64BE = defineBigIntMethod1(function writeBigUInt64BE1(value1, offset1 = 0) { return wrtBigUInt64BE1(this, value1, offset1, BigInt(0), BigInt('0xffffffffffffffff')); - }), Buffer1.prototype.writeIntLE = function(value1, offset1, byteLength1, noAssert1) { + }), Buffer1.prototype.writeIntLE = function writeIntLE1(value1, offset1, byteLength1, noAssert1) { if (value1 = +value1, offset1 >>>= 0, !noAssert1) { const limit1 = Math.pow(2, 8 * byteLength1 - 1); checkInt1(this, value1, offset1, byteLength1, limit1 - 1, -limit1); @@ -9353,7 +9353,7 @@ let i2 = 0, mul1 = 1, sub1 = 0; for(this[offset1] = 0xFF & value1; ++i2 < byteLength1 && (mul1 *= 0x100);)value1 < 0 && 0 === sub1 && 0 !== this[offset1 + i2 - 1] && (sub1 = 1), this[offset1 + i2] = (value1 / mul1 >> 0) - sub1 & 0xFF; return offset1 + byteLength1; - }, Buffer1.prototype.writeIntBE = function(value1, offset1, byteLength1, noAssert1) { + }, Buffer1.prototype.writeIntBE = function writeIntBE1(value1, offset1, byteLength1, noAssert1) { if (value1 = +value1, offset1 >>>= 0, !noAssert1) { const limit1 = Math.pow(2, 8 * byteLength1 - 1); checkInt1(this, value1, offset1, byteLength1, limit1 - 1, -limit1); @@ -9361,29 +9361,29 @@ let i2 = byteLength1 - 1, mul1 = 1, sub1 = 0; for(this[offset1 + i2] = 0xFF & value1; --i2 >= 0 && (mul1 *= 0x100);)value1 < 0 && 0 === sub1 && 0 !== this[offset1 + i2 + 1] && (sub1 = 1), this[offset1 + i2] = (value1 / mul1 >> 0) - sub1 & 0xFF; return offset1 + byteLength1; - }, Buffer1.prototype.writeInt8 = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeInt8 = function writeInt81(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 1, 0x7f, -128), value1 < 0 && (value1 = 0xff + value1 + 1), this[offset1] = 0xff & value1, offset1 + 1; - }, Buffer1.prototype.writeInt16LE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeInt16LE = function writeInt16LE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0x7fff, -32768), this[offset1] = 0xff & value1, this[offset1 + 1] = value1 >>> 8, offset1 + 2; - }, Buffer1.prototype.writeInt16BE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeInt16BE = function writeInt16BE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 2, 0x7fff, -32768), this[offset1] = value1 >>> 8, this[offset1 + 1] = 0xff & value1, offset1 + 2; - }, Buffer1.prototype.writeInt32LE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeInt32LE = function writeInt32LE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0x7fffffff, -2147483648), this[offset1] = 0xff & value1, this[offset1 + 1] = value1 >>> 8, this[offset1 + 2] = value1 >>> 16, this[offset1 + 3] = value1 >>> 24, offset1 + 4; - }, Buffer1.prototype.writeInt32BE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeInt32BE = function writeInt32BE1(value1, offset1, noAssert1) { return value1 = +value1, offset1 >>>= 0, noAssert1 || checkInt1(this, value1, offset1, 4, 0x7fffffff, -2147483648), value1 < 0 && (value1 = 0xffffffff + value1 + 1), this[offset1] = value1 >>> 24, this[offset1 + 1] = value1 >>> 16, this[offset1 + 2] = value1 >>> 8, this[offset1 + 3] = 0xff & value1, offset1 + 4; - }, Buffer1.prototype.writeBigInt64LE = defineBigIntMethod1(function(value1, offset1 = 0) { + }, Buffer1.prototype.writeBigInt64LE = defineBigIntMethod1(function writeBigInt64LE1(value1, offset1 = 0) { return wrtBigUInt64LE1(this, value1, offset1, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }), Buffer1.prototype.writeBigInt64BE = defineBigIntMethod1(function(value1, offset1 = 0) { + }), Buffer1.prototype.writeBigInt64BE = defineBigIntMethod1(function writeBigInt64BE1(value1, offset1 = 0) { return wrtBigUInt64BE1(this, value1, offset1, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }), Buffer1.prototype.writeFloatLE = function(value1, offset1, noAssert1) { + }), Buffer1.prototype.writeFloatLE = function writeFloatLE1(value1, offset1, noAssert1) { return writeFloat1(this, value1, offset1, !0, noAssert1); - }, Buffer1.prototype.writeFloatBE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeFloatBE = function writeFloatBE1(value1, offset1, noAssert1) { return writeFloat1(this, value1, offset1, !1, noAssert1); - }, Buffer1.prototype.writeDoubleLE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeDoubleLE = function writeDoubleLE1(value1, offset1, noAssert1) { return writeDouble1(this, value1, offset1, !0, noAssert1); - }, Buffer1.prototype.writeDoubleBE = function(value1, offset1, noAssert1) { + }, Buffer1.prototype.writeDoubleBE = function writeDoubleBE1(value1, offset1, noAssert1) { return writeDouble1(this, value1, offset1, !1, noAssert1); - }, Buffer1.prototype.copy = function(target1, targetStart1, start1, end1) { + }, Buffer1.prototype.copy = function copy1(target1, targetStart1, start1, end1) { if (!Buffer1.isBuffer(target1)) throw TypeError('argument should be a Buffer'); if (start1 || (start1 = 0), end1 || 0 === end1 || (end1 = this.length), targetStart1 >= target1.length && (targetStart1 = target1.length), targetStart1 || (targetStart1 = 0), end1 > 0 && end1 < start1 && (end1 = start1), end1 === start1 || 0 === target1.length || 0 === this.length) return 0; if (targetStart1 < 0) throw RangeError('targetStart out of bounds'); @@ -9392,7 +9392,7 @@ end1 > this.length && (end1 = this.length), target1.length - targetStart1 < end1 - start1 && (end1 = target1.length - targetStart1 + start1); const len3 = end1 - start1; return this === target1 && 'function' == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(targetStart1, start1, end1) : Uint8Array.prototype.set.call(target1, this.subarray(start1, end1), targetStart1), len3; - }, Buffer1.prototype.fill = function(val1, start1, end1, encoding1) { + }, Buffer1.prototype.fill = function fill1(val1, start1, end1, encoding1) { let i2; if ('string' == typeof val1) { if ('string' == typeof start1 ? (encoding1 = start1, start1 = 0, end1 = this.length) : 'string' == typeof end1 && (encoding1 = end1, end1 = this.length), void 0 !== encoding1 && 'string' != typeof encoding1) throw TypeError('encoding must be a string'); @@ -9414,7 +9414,7 @@ }; const errors1 = {}; function E1(sym1, getMessage1, Base1) { - errors1[sym1] = class extends Base1 { + errors1[sym1] = class NodeError1 extends Base1 { constructor(){ super(), Object.defineProperty(this, 'message', { value: getMessage1.apply(this, arguments), @@ -9558,7 +9558,7 @@ 1924: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var GetIntrinsic1 = __webpack_require__1(210), callBind1 = __webpack_require__1(5559), $indexOf1 = callBind1(GetIntrinsic1('String.prototype.indexOf')); - module1.exports = function(name1, allowMissing1) { + module1.exports = function callBoundIntrinsic1(name1, allowMissing1) { var intrinsic1 = GetIntrinsic1(name1, !!allowMissing1); return 'function' == typeof intrinsic1 && $indexOf1(name1, '.prototype.') > -1 ? callBind1(intrinsic1) : intrinsic1; }; @@ -9573,7 +9573,7 @@ } catch (e1) { $defineProperty1 = null; } - module1.exports = function(originalFunction1) { + module1.exports = function callBind1(originalFunction1) { var func1 = $reflectApply1(bind1, $call1, arguments); return $gOPD1 && $defineProperty1 && $gOPD1(func1, 'length').configurable && $defineProperty1(func1, 'length', { value: 1 + $max1(0, originalFunction1.length - (arguments.length - 1)) @@ -9647,11 +9647,11 @@ function BasePoint1(curve1, type1) { this.curve = curve1, this.type = type1, this.precomputed = null; } - module1.exports = BaseCurve1, BaseCurve1.prototype.point = function() { + module1.exports = BaseCurve1, BaseCurve1.prototype.point = function point1() { throw Error('Not implemented'); - }, BaseCurve1.prototype.validate = function() { + }, BaseCurve1.prototype.validate = function validate1() { throw Error('Not implemented'); - }, BaseCurve1.prototype._fixedNafMul = function(p3, k3) { + }, BaseCurve1.prototype._fixedNafMul = function _fixedNafMul1(p3, k3) { assert1(p3.precomputed); var j1, nafW1, doubles1 = p3._getDoubles(), naf1 = getNAF1(k3, 1, this._bitLength), I1 = (1 << doubles1.step + 1) - (doubles1.step % 2 == 0 ? 2 : 1); I1 /= 3; @@ -9666,7 +9666,7 @@ a10 = a10.add(b10); } return a10.toP(); - }, BaseCurve1.prototype._wnafMul = function(p3, k3) { + }, BaseCurve1.prototype._wnafMul = function _wnafMul1(p3, k3) { var w19 = 4, nafPoints1 = p3._getNAFPoints(w19); w19 = nafPoints1.wnd; for(var wnd1 = nafPoints1.points, naf1 = getNAF1(k3, w19, this._bitLength), acc1 = this.jpoint(null, null, null), i2 = naf1.length - 1; i2 >= 0; i2--){ @@ -9676,7 +9676,7 @@ assert1(0 !== z1), acc1 = 'affine' === p3.type ? z1 > 0 ? acc1.mixedAdd(wnd1[z1 - 1 >> 1]) : acc1.mixedAdd(wnd1[-z1 - 1 >> 1].neg()) : z1 > 0 ? acc1.add(wnd1[z1 - 1 >> 1]) : acc1.add(wnd1[-z1 - 1 >> 1].neg()); } return 'affine' === p3.type ? acc1.toP() : acc1; - }, BaseCurve1.prototype._wnafMulAdd = function(defW1, points1, coeffs1, len3, jacobianResult1) { + }, BaseCurve1.prototype._wnafMulAdd = function _wnafMulAdd1(defW1, points1, coeffs1, len3, jacobianResult1) { var i2, j1, p3, wndWidth1 = this._wnafT1, wnd1 = this._wnafT2, naf1 = this._wnafT3, max1 = 0; for(i2 = 0; i2 < len3; i2++){ var nafPoints1 = (p3 = points1[i2])._getNAFPoints(defW1); @@ -9727,28 +9727,28 @@ } for(i2 = 0; i2 < len3; i2++)wnd1[i2] = null; return jacobianResult1 ? acc1 : acc1.toP(); - }, BaseCurve1.BasePoint = BasePoint1, BasePoint1.prototype.eq = function() { + }, BaseCurve1.BasePoint = BasePoint1, BasePoint1.prototype.eq = function eq1() { throw Error('Not implemented'); - }, BasePoint1.prototype.validate = function() { + }, BasePoint1.prototype.validate = function validate1() { return this.curve.validate(this); - }, BaseCurve1.prototype.decodePoint = function(bytes1, enc1) { + }, BaseCurve1.prototype.decodePoint = function decodePoint1(bytes1, enc1) { bytes1 = utils1.toArray(bytes1, enc1); var len3 = this.p.byteLength(); if ((0x04 === bytes1[0] || 0x06 === bytes1[0] || 0x07 === bytes1[0]) && bytes1.length - 1 == 2 * len3) return 0x06 === bytes1[0] ? assert1(bytes1[bytes1.length - 1] % 2 == 0) : 0x07 === bytes1[0] && assert1(bytes1[bytes1.length - 1] % 2 == 1), this.point(bytes1.slice(1, 1 + len3), bytes1.slice(1 + len3, 1 + 2 * len3)); if ((0x02 === bytes1[0] || 0x03 === bytes1[0]) && bytes1.length - 1 === len3) return this.pointFromX(bytes1.slice(1, 1 + len3), 0x03 === bytes1[0]); throw Error('Unknown point format'); - }, BasePoint1.prototype.encodeCompressed = function(enc1) { + }, BasePoint1.prototype.encodeCompressed = function encodeCompressed1(enc1) { return this.encode(enc1, !0); - }, BasePoint1.prototype._encode = function(compact1) { + }, BasePoint1.prototype._encode = function _encode1(compact1) { var len3 = this.curve.p.byteLength(), x3 = this.getX().toArray('be', len3); return compact1 ? [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x3) : [ 0x04 ].concat(x3, this.getY().toArray('be', len3)); - }, BasePoint1.prototype.encode = function(enc1, compact1) { + }, BasePoint1.prototype.encode = function encode1(enc1, compact1) { return utils1.encode(this._encode(compact1), enc1); - }, BasePoint1.prototype.precompute = function(power1) { + }, BasePoint1.prototype.precompute = function precompute1(power1) { if (this.precomputed) return this; var precomputed1 = { doubles: null, @@ -9756,11 +9756,11 @@ beta: null }; return precomputed1.naf = this._getNAFPoints(8), precomputed1.doubles = this._getDoubles(4, power1), precomputed1.beta = this._getBeta(), this.precomputed = precomputed1, this; - }, BasePoint1.prototype._hasDoubles = function(k3) { + }, BasePoint1.prototype._hasDoubles = function _hasDoubles1(k3) { if (!this.precomputed) return !1; var doubles1 = this.precomputed.doubles; return !!doubles1 && doubles1.points.length >= Math.ceil((k3.bitLength() + 1) / doubles1.step); - }, BasePoint1.prototype._getDoubles = function(step1, power1) { + }, BasePoint1.prototype._getDoubles = function _getDoubles1(step1, power1) { if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles; for(var doubles1 = [ this @@ -9772,7 +9772,7 @@ step: step1, points: doubles1 }; - }, BasePoint1.prototype._getNAFPoints = function(wnd1) { + }, BasePoint1.prototype._getNAFPoints = function _getNAFPoints1(wnd1) { if (this.precomputed && this.precomputed.naf) return this.precomputed.naf; for(var res1 = [ this @@ -9781,9 +9781,9 @@ wnd: wnd1, points: res1 }; - }, BasePoint1.prototype._getBeta = function() { + }, BasePoint1.prototype._getBeta = function _getBeta1() { return null; - }, BasePoint1.prototype.dblp = function(k3) { + }, BasePoint1.prototype.dblp = function dblp1(k3) { for(var r3 = this, i2 = 0; i2 < k3; i2++)r3 = r3.dbl(); return r3; }; @@ -9797,19 +9797,19 @@ function Point1(curve1, x3, y3, z1, t3) { Base1.BasePoint.call(this, curve1, 'projective'), null === x3 && null === y3 && null === z1 ? (this.x = this.curve.zero, this.y = this.curve.one, this.z = this.curve.one, this.t = this.curve.zero, this.zOne = !0) : (this.x = new BN1(x3, 16), this.y = new BN1(y3, 16), this.z = z1 ? new BN1(z1, 16) : this.curve.one, this.t = t3 && new BN1(t3, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)), this.zOne = this.z === this.curve.one, !this.curve.extended || this.t || (this.t = this.x.redMul(this.y), this.zOne || (this.t = this.t.redMul(this.z.redInvm())))); } - inherits1(EdwardsCurve1, Base1), module1.exports = EdwardsCurve1, EdwardsCurve1.prototype._mulA = function(num1) { + inherits1(EdwardsCurve1, Base1), module1.exports = EdwardsCurve1, EdwardsCurve1.prototype._mulA = function _mulA1(num1) { return this.mOneA ? num1.redNeg() : this.a.redMul(num1); - }, EdwardsCurve1.prototype._mulC = function(num1) { + }, EdwardsCurve1.prototype._mulC = function _mulC1(num1) { return this.oneC ? num1 : this.c.redMul(num1); - }, EdwardsCurve1.prototype.jpoint = function(x3, y3, z1, t3) { + }, EdwardsCurve1.prototype.jpoint = function jpoint1(x3, y3, z1, t3) { return this.point(x3, y3, z1, t3); - }, EdwardsCurve1.prototype.pointFromX = function(x3, odd1) { + }, EdwardsCurve1.prototype.pointFromX = function pointFromX1(x3, odd1) { (x3 = new BN1(x3, 16)).red || (x3 = x3.toRed(this.red)); var x21 = x3.redSqr(), rhs1 = this.c2.redSub(this.a.redMul(x21)), lhs1 = this.one.redSub(this.c2.redMul(this.d).redMul(x21)), y21 = rhs1.redMul(lhs1.redInvm()), y3 = y21.redSqrt(); if (0 !== y3.redSqr().redSub(y21).cmp(this.zero)) throw Error('invalid point'); var isOdd1 = y3.fromRed().isOdd(); return (odd1 && !isOdd1 || !odd1 && isOdd1) && (y3 = y3.redNeg()), this.point(x3, y3); - }, EdwardsCurve1.prototype.pointFromY = function(y3, odd1) { + }, EdwardsCurve1.prototype.pointFromY = function pointFromY1(y3, odd1) { (y3 = new BN1(y3, 16)).red || (y3 = y3.toRed(this.red)); var y21 = y3.redSqr(), lhs1 = y21.redSub(this.c2), rhs1 = y21.redMul(this.d).redMul(this.c2).redSub(this.a), x21 = lhs1.redMul(rhs1.redInvm()); if (0 === x21.cmp(this.zero)) { @@ -9819,46 +9819,46 @@ var x3 = x21.redSqrt(); if (0 !== x3.redSqr().redSub(x21).cmp(this.zero)) throw Error('invalid point'); return x3.fromRed().isOdd() !== odd1 && (x3 = x3.redNeg()), this.point(x3, y3); - }, EdwardsCurve1.prototype.validate = function(point1) { + }, EdwardsCurve1.prototype.validate = function validate1(point1) { if (point1.isInfinity()) return !0; point1.normalize(); var x21 = point1.x.redSqr(), y21 = point1.y.redSqr(), lhs1 = x21.redMul(this.a).redAdd(y21), rhs1 = this.c2.redMul(this.one.redAdd(this.d.redMul(x21).redMul(y21))); return 0 === lhs1.cmp(rhs1); - }, inherits1(Point1, Base1.BasePoint), EdwardsCurve1.prototype.pointFromJSON = function(obj1) { + }, inherits1(Point1, Base1.BasePoint), EdwardsCurve1.prototype.pointFromJSON = function pointFromJSON1(obj1) { return Point1.fromJSON(this, obj1); - }, EdwardsCurve1.prototype.point = function(x3, y3, z1, t3) { + }, EdwardsCurve1.prototype.point = function point1(x3, y3, z1, t3) { return new Point1(this, x3, y3, z1, t3); - }, Point1.fromJSON = function(curve1, obj1) { + }, Point1.fromJSON = function fromJSON1(curve1, obj1) { return new Point1(curve1, obj1[0], obj1[1], obj1[2]); - }, Point1.prototype.inspect = function() { + }, Point1.prototype.inspect = function inspect1() { return this.isInfinity() ? '' : ''; - }, Point1.prototype.isInfinity = function() { + }, Point1.prototype.isInfinity = function isInfinity1() { return 0 === this.x.cmpn(0) && (0 === this.y.cmp(this.z) || this.zOne && 0 === this.y.cmp(this.curve.c)); - }, Point1.prototype._extDbl = function() { + }, Point1.prototype._extDbl = function _extDbl1() { var a10 = this.x.redSqr(), b10 = this.y.redSqr(), c5 = this.z.redSqr(); c5 = c5.redIAdd(c5); var d3 = this.curve._mulA(a10), e1 = this.x.redAdd(this.y).redSqr().redISub(a10).redISub(b10), g3 = d3.redAdd(b10), f1 = g3.redSub(c5), h8 = d3.redSub(b10), nx1 = e1.redMul(f1), ny1 = g3.redMul(h8), nt1 = e1.redMul(h8), nz1 = f1.redMul(g3); return this.curve.point(nx1, ny1, nz1, nt1); - }, Point1.prototype._projDbl = function() { + }, Point1.prototype._projDbl = function _projDbl1() { var nx1, ny1, nz1, e1, h8, j1, b10 = this.x.redAdd(this.y).redSqr(), c5 = this.x.redSqr(), d3 = this.y.redSqr(); if (this.curve.twisted) { var f1 = (e1 = this.curve._mulA(c5)).redAdd(d3); this.zOne ? (nx1 = b10.redSub(c5).redSub(d3).redMul(f1.redSub(this.curve.two)), ny1 = f1.redMul(e1.redSub(d3)), nz1 = f1.redSqr().redSub(f1).redSub(f1)) : (h8 = this.z.redSqr(), j1 = f1.redSub(h8).redISub(h8), nx1 = b10.redSub(c5).redISub(d3).redMul(j1), ny1 = f1.redMul(e1.redSub(d3)), nz1 = f1.redMul(j1)); } else e1 = c5.redAdd(d3), h8 = this.curve._mulC(this.z).redSqr(), j1 = e1.redSub(h8).redSub(h8), nx1 = this.curve._mulC(b10.redISub(e1)).redMul(j1), ny1 = this.curve._mulC(e1).redMul(c5.redISub(d3)), nz1 = e1.redMul(j1); return this.curve.point(nx1, ny1, nz1); - }, Point1.prototype.dbl = function() { + }, Point1.prototype.dbl = function dbl1() { return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl(); - }, Point1.prototype._extAdd = function(p3) { + }, Point1.prototype._extAdd = function _extAdd1(p3) { var a10 = this.y.redSub(this.x).redMul(p3.y.redSub(p3.x)), b10 = this.y.redAdd(this.x).redMul(p3.y.redAdd(p3.x)), c5 = this.t.redMul(this.curve.dd).redMul(p3.t), d3 = this.z.redMul(p3.z.redAdd(p3.z)), e1 = b10.redSub(a10), f1 = d3.redSub(c5), g3 = d3.redAdd(c5), h8 = b10.redAdd(a10), nx1 = e1.redMul(f1), ny1 = g3.redMul(h8), nt1 = e1.redMul(h8), nz1 = f1.redMul(g3); return this.curve.point(nx1, ny1, nz1, nt1); - }, Point1.prototype._projAdd = function(p3) { + }, Point1.prototype._projAdd = function _projAdd1(p3) { var ny1, nz1, a10 = this.z.redMul(p3.z), b10 = a10.redSqr(), c5 = this.x.redMul(p3.x), d3 = this.y.redMul(p3.y), e1 = this.curve.d.redMul(c5).redMul(d3), f1 = b10.redSub(e1), g3 = b10.redAdd(e1), tmp1 = this.x.redAdd(this.y).redMul(p3.x.redAdd(p3.y)).redISub(c5).redISub(d3), nx1 = a10.redMul(f1).redMul(tmp1); return this.curve.twisted ? (ny1 = a10.redMul(g3).redMul(d3.redSub(this.curve._mulA(c5))), nz1 = f1.redMul(g3)) : (ny1 = a10.redMul(g3).redMul(d3.redSub(c5)), nz1 = this.curve._mulC(f1).redMul(g3)), this.curve.point(nx1, ny1, nz1); - }, Point1.prototype.add = function(p3) { + }, Point1.prototype.add = function add1(p3) { return this.isInfinity() ? p3 : p3.isInfinity() ? this : this.curve.extended ? this._extAdd(p3) : this._projAdd(p3); - }, Point1.prototype.mul = function(k3) { + }, Point1.prototype.mul = function mul1(k3) { return this._hasDoubles(k3) ? this.curve._fixedNafMul(this, k3) : this.curve._wnafMul(this, k3); - }, Point1.prototype.mulAdd = function(k11, p3, k21) { + }, Point1.prototype.mulAdd = function mulAdd1(k11, p3, k21) { return this.curve._wnafMulAdd(1, [ this, p3 @@ -9866,7 +9866,7 @@ k11, k21 ], 2, !1); - }, Point1.prototype.jmulAdd = function(k11, p3, k21) { + }, Point1.prototype.jmulAdd = function jmulAdd1(k11, p3, k21) { return this.curve._wnafMulAdd(1, [ this, p3 @@ -9874,19 +9874,19 @@ k11, k21 ], 2, !0); - }, Point1.prototype.normalize = function() { + }, Point1.prototype.normalize = function normalize1() { if (this.zOne) return this; var zi1 = this.z.redInvm(); return this.x = this.x.redMul(zi1), this.y = this.y.redMul(zi1), this.t && (this.t = this.t.redMul(zi1)), this.z = this.curve.one, this.zOne = !0, this; - }, Point1.prototype.neg = function() { + }, Point1.prototype.neg = function neg1() { return this.curve.point(this.x.redNeg(), this.y, this.z, this.t && this.t.redNeg()); - }, Point1.prototype.getX = function() { + }, Point1.prototype.getX = function getX1() { return this.normalize(), this.x.fromRed(); - }, Point1.prototype.getY = function() { + }, Point1.prototype.getY = function getY1() { return this.normalize(), this.y.fromRed(); - }, Point1.prototype.eq = function(other1) { + }, Point1.prototype.eq = function eq1(other1) { return this === other1 || 0 === this.getX().cmp(other1.getX()) && 0 === this.getY().cmp(other1.getY()); - }, Point1.prototype.eqXToP = function(x3) { + }, Point1.prototype.eqXToP = function eqXToP1(x3) { var rx1 = x3.toRed(this.curve.red).redMul(this.z); if (0 === this.x.cmp(rx1)) return !0; for(var xc1 = x3.clone(), t3 = this.curve.redN.redMul(this.z);;){ @@ -9909,44 +9909,44 @@ function Point1(curve1, x3, z1) { Base1.BasePoint.call(this, curve1, 'projective'), null === x3 && null === z1 ? (this.x = this.curve.one, this.z = this.curve.zero) : (this.x = new BN1(x3, 16), this.z = new BN1(z1, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red))); } - inherits1(MontCurve1, Base1), module1.exports = MontCurve1, MontCurve1.prototype.validate = function(point1) { + inherits1(MontCurve1, Base1), module1.exports = MontCurve1, MontCurve1.prototype.validate = function validate1(point1) { var x3 = point1.normalize().x, x21 = x3.redSqr(), rhs1 = x21.redMul(x3).redAdd(x21.redMul(this.a)).redAdd(x3); return 0 === rhs1.redSqrt().redSqr().cmp(rhs1); - }, inherits1(Point1, Base1.BasePoint), MontCurve1.prototype.decodePoint = function(bytes1, enc1) { + }, inherits1(Point1, Base1.BasePoint), MontCurve1.prototype.decodePoint = function decodePoint1(bytes1, enc1) { return this.point(utils1.toArray(bytes1, enc1), 1); - }, MontCurve1.prototype.point = function(x3, z1) { + }, MontCurve1.prototype.point = function point1(x3, z1) { return new Point1(this, x3, z1); - }, MontCurve1.prototype.pointFromJSON = function(obj1) { + }, MontCurve1.prototype.pointFromJSON = function pointFromJSON1(obj1) { return Point1.fromJSON(this, obj1); - }, Point1.prototype.precompute = function() {}, Point1.prototype._encode = function() { + }, Point1.prototype.precompute = function precompute1() {}, Point1.prototype._encode = function _encode1() { return this.getX().toArray('be', this.curve.p.byteLength()); - }, Point1.fromJSON = function(curve1, obj1) { + }, Point1.fromJSON = function fromJSON1(curve1, obj1) { return new Point1(curve1, obj1[0], obj1[1] || curve1.one); - }, Point1.prototype.inspect = function() { + }, Point1.prototype.inspect = function inspect1() { return this.isInfinity() ? '' : ''; - }, Point1.prototype.isInfinity = function() { + }, Point1.prototype.isInfinity = function isInfinity1() { return 0 === this.z.cmpn(0); - }, Point1.prototype.dbl = function() { + }, Point1.prototype.dbl = function dbl1() { var aa1 = this.x.redAdd(this.z).redSqr(), bb1 = this.x.redSub(this.z).redSqr(), c5 = aa1.redSub(bb1), nx1 = aa1.redMul(bb1), nz1 = c5.redMul(bb1.redAdd(this.curve.a24.redMul(c5))); return this.curve.point(nx1, nz1); - }, Point1.prototype.add = function() { + }, Point1.prototype.add = function add1() { throw Error('Not supported on Montgomery curve'); - }, Point1.prototype.diffAdd = function(p3, diff1) { + }, Point1.prototype.diffAdd = function diffAdd1(p3, diff1) { var a10 = this.x.redAdd(this.z), b10 = this.x.redSub(this.z), c5 = p3.x.redAdd(p3.z), da1 = p3.x.redSub(p3.z).redMul(a10), cb1 = c5.redMul(b10), nx1 = diff1.z.redMul(da1.redAdd(cb1).redSqr()), nz1 = diff1.x.redMul(da1.redISub(cb1).redSqr()); return this.curve.point(nx1, nz1); - }, Point1.prototype.mul = function(k3) { + }, Point1.prototype.mul = function mul1(k3) { for(var t3 = k3.clone(), a10 = this, b10 = this.curve.point(null, null), c5 = this, bits1 = []; 0 !== t3.cmpn(0); t3.iushrn(1))bits1.push(t3.andln(1)); for(var i2 = bits1.length - 1; i2 >= 0; i2--)0 === bits1[i2] ? (a10 = a10.diffAdd(b10, c5), b10 = b10.dbl()) : (b10 = a10.diffAdd(b10, c5), a10 = a10.dbl()); return b10; - }, Point1.prototype.mulAdd = function() { + }, Point1.prototype.mulAdd = function mulAdd1() { throw Error('Not supported on Montgomery curve'); - }, Point1.prototype.jumlAdd = function() { + }, Point1.prototype.jumlAdd = function jumlAdd1() { throw Error('Not supported on Montgomery curve'); - }, Point1.prototype.eq = function(other1) { + }, Point1.prototype.eq = function eq1(other1) { return 0 === this.getX().cmp(other1.getX()); - }, Point1.prototype.normalize = function() { + }, Point1.prototype.normalize = function normalize1() { return this.x = this.x.redMul(this.z.redInvm()), this.z = this.curve.one, this; - }, Point1.prototype.getX = function() { + }, Point1.prototype.getX = function getX1() { return this.normalize(), this.x.fromRed(); }; }, @@ -9972,7 +9972,7 @@ function JPoint1(curve1, x3, y3, z1) { Base1.BasePoint.call(this, curve1, 'jacobian'), null === x3 && null === y3 && null === z1 ? (this.x = this.curve.one, this.y = this.curve.one, this.z = new BN1(0)) : (this.x = new BN1(x3, 16), this.y = new BN1(y3, 16), this.z = new BN1(z1, 16)), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.zOne = this.z === this.curve.one; } - inherits1(ShortCurve1, Base1), module1.exports = ShortCurve1, ShortCurve1.prototype._getEndomorphism = function(conf1) { + inherits1(ShortCurve1, Base1), module1.exports = ShortCurve1, ShortCurve1.prototype._getEndomorphism = function _getEndomorphism1(conf1) { if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) { if (conf1.beta) beta1 = new BN1(conf1.beta, 16).toRed(this.red); else { @@ -9995,13 +9995,13 @@ basis: basis1 }; } - }, ShortCurve1.prototype._getEndoRoots = function(num1) { + }, ShortCurve1.prototype._getEndoRoots = function _getEndoRoots1(num1) { var red1 = num1 === this.p ? this.red : BN1.mont(num1), tinv1 = new BN1(2).toRed(red1).redInvm(), ntinv1 = tinv1.redNeg(), s3 = new BN1(3).toRed(red1).redNeg().redSqrt().redMul(tinv1); return [ ntinv1.redAdd(s3).fromRed(), ntinv1.redSub(s3).fromRed() ]; - }, ShortCurve1.prototype._getEndoBasis = function(lambda1) { + }, ShortCurve1.prototype._getEndoBasis = function _getEndoBasis1(lambda1) { for(var a01, b01, a11, b11, a21, b21, prevR1, r3, x3, aprxSqrt1 = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), u3 = lambda1, v3 = this.n.clone(), x11 = new BN1(1), y11 = new BN1(0), x21 = new BN1(0), y21 = new BN1(1), i2 = 0; 0 !== u3.cmpn(0);){ var q3 = v3.div(u3); r3 = v3.sub(q3.mul(u3)), x3 = x21.sub(q3.mul(x11)); @@ -10022,34 +10022,34 @@ b: b21 } ]; - }, ShortCurve1.prototype._endoSplit = function(k3) { + }, ShortCurve1.prototype._endoSplit = function _endoSplit1(k3) { var basis1 = this.endo.basis, v11 = basis1[0], v21 = basis1[1], c11 = v21.b.mul(k3).divRound(this.n), c21 = v11.b.neg().mul(k3).divRound(this.n), p11 = c11.mul(v11.a), p21 = c21.mul(v21.a), q11 = c11.mul(v11.b), q21 = c21.mul(v21.b); return { k1: k3.sub(p11).sub(p21), k2: q11.add(q21).neg() }; - }, ShortCurve1.prototype.pointFromX = function(x3, odd1) { + }, ShortCurve1.prototype.pointFromX = function pointFromX1(x3, odd1) { (x3 = new BN1(x3, 16)).red || (x3 = x3.toRed(this.red)); var y21 = x3.redSqr().redMul(x3).redIAdd(x3.redMul(this.a)).redIAdd(this.b), y3 = y21.redSqrt(); if (0 !== y3.redSqr().redSub(y21).cmp(this.zero)) throw Error('invalid point'); var isOdd1 = y3.fromRed().isOdd(); return (odd1 && !isOdd1 || !odd1 && isOdd1) && (y3 = y3.redNeg()), this.point(x3, y3); - }, ShortCurve1.prototype.validate = function(point1) { + }, ShortCurve1.prototype.validate = function validate1(point1) { if (point1.inf) return !0; var x3 = point1.x, y3 = point1.y, ax1 = this.a.redMul(x3), rhs1 = x3.redSqr().redMul(x3).redIAdd(ax1).redIAdd(this.b); return 0 === y3.redSqr().redISub(rhs1).cmpn(0); - }, ShortCurve1.prototype._endoWnafMulAdd = function(points1, coeffs1, jacobianResult1) { + }, ShortCurve1.prototype._endoWnafMulAdd = function _endoWnafMulAdd1(points1, coeffs1, jacobianResult1) { for(var npoints1 = this._endoWnafT1, ncoeffs1 = this._endoWnafT2, i2 = 0; i2 < points1.length; i2++){ var split1 = this._endoSplit(coeffs1[i2]), p3 = points1[i2], beta1 = p3._getBeta(); split1.k1.negative && (split1.k1.ineg(), p3 = p3.neg(!0)), split1.k2.negative && (split1.k2.ineg(), beta1 = beta1.neg(!0)), npoints1[2 * i2] = p3, npoints1[2 * i2 + 1] = beta1, ncoeffs1[2 * i2] = split1.k1, ncoeffs1[2 * i2 + 1] = split1.k2; } for(var res1 = this._wnafMulAdd(1, npoints1, ncoeffs1, 2 * i2, jacobianResult1), j1 = 0; j1 < 2 * i2; j1++)npoints1[j1] = null, ncoeffs1[j1] = null; return res1; - }, inherits1(Point1, Base1.BasePoint), ShortCurve1.prototype.point = function(x3, y3, isRed1) { + }, inherits1(Point1, Base1.BasePoint), ShortCurve1.prototype.point = function point1(x3, y3, isRed1) { return new Point1(this, x3, y3, isRed1); - }, ShortCurve1.prototype.pointFromJSON = function(obj1, red1) { + }, ShortCurve1.prototype.pointFromJSON = function pointFromJSON1(obj1, red1) { return Point1.fromJSON(this, obj1, red1); - }, Point1.prototype._getBeta = function() { + }, Point1.prototype._getBeta = function _getBeta1() { if (this.curve.endo) { var pre1 = this.precomputed; if (pre1 && pre1.beta) return pre1.beta; @@ -10072,7 +10072,7 @@ } return beta1; } - }, Point1.prototype.toJSON = function() { + }, Point1.prototype.toJSON = function toJSON1() { return this.precomputed ? [ this.x, this.y, @@ -10090,7 +10090,7 @@ this.x, this.y ]; - }, Point1.fromJSON = function(curve1, obj1, red1) { + }, Point1.fromJSON = function fromJSON1(curve1, obj1, red1) { 'string' == typeof obj1 && (obj1 = JSON.parse(obj1)); var res1 = curve1.point(obj1[0], obj1[1], red1); if (!obj1[2]) return res1; @@ -10113,11 +10113,11 @@ ].concat(pre1.naf.points.map(obj2point1)) } }, res1; - }, Point1.prototype.inspect = function() { + }, Point1.prototype.inspect = function inspect1() { return this.isInfinity() ? '' : ''; - }, Point1.prototype.isInfinity = function() { + }, Point1.prototype.isInfinity = function isInfinity1() { return this.inf; - }, Point1.prototype.add = function(p3) { + }, Point1.prototype.add = function add1(p3) { if (this.inf) return p3; if (p3.inf) return this; if (this.eq(p3)) return this.dbl(); @@ -10126,23 +10126,23 @@ 0 !== c5.cmpn(0) && (c5 = c5.redMul(this.x.redSub(p3.x).redInvm())); var nx1 = c5.redSqr().redISub(this.x).redISub(p3.x), ny1 = c5.redMul(this.x.redSub(nx1)).redISub(this.y); return this.curve.point(nx1, ny1); - }, Point1.prototype.dbl = function() { + }, Point1.prototype.dbl = function dbl1() { if (this.inf) return this; var ys11 = this.y.redAdd(this.y); if (0 === ys11.cmpn(0)) return this.curve.point(null, null); var a10 = this.curve.a, x21 = this.x.redSqr(), dyinv1 = ys11.redInvm(), c5 = x21.redAdd(x21).redIAdd(x21).redIAdd(a10).redMul(dyinv1), nx1 = c5.redSqr().redISub(this.x.redAdd(this.x)), ny1 = c5.redMul(this.x.redSub(nx1)).redISub(this.y); return this.curve.point(nx1, ny1); - }, Point1.prototype.getX = function() { + }, Point1.prototype.getX = function getX1() { return this.x.fromRed(); - }, Point1.prototype.getY = function() { + }, Point1.prototype.getY = function getY1() { return this.y.fromRed(); - }, Point1.prototype.mul = function(k3) { + }, Point1.prototype.mul = function mul1(k3) { return (k3 = new BN1(k3, 16), this.isInfinity()) ? this : this._hasDoubles(k3) ? this.curve._fixedNafMul(this, k3) : this.curve.endo ? this.curve._endoWnafMulAdd([ this ], [ k3 ]) : this.curve._wnafMul(this, k3); - }, Point1.prototype.mulAdd = function(k11, p21, k21) { + }, Point1.prototype.mulAdd = function mulAdd1(k11, p21, k21) { var points1 = [ this, p21 @@ -10151,7 +10151,7 @@ k21 ]; return this.curve.endo ? this.curve._endoWnafMulAdd(points1, coeffs1) : this.curve._wnafMulAdd(1, points1, coeffs1, 2); - }, Point1.prototype.jmulAdd = function(k11, p21, k21) { + }, Point1.prototype.jmulAdd = function jmulAdd1(k11, p21, k21) { var points1 = [ this, p21 @@ -10160,9 +10160,9 @@ k21 ]; return this.curve.endo ? this.curve._endoWnafMulAdd(points1, coeffs1, !0) : this.curve._wnafMulAdd(1, points1, coeffs1, 2, !0); - }, Point1.prototype.eq = function(p3) { + }, Point1.prototype.eq = function eq1(p3) { return this === p3 || this.inf === p3.inf && (this.inf || 0 === this.x.cmp(p3.x) && 0 === this.y.cmp(p3.y)); - }, Point1.prototype.neg = function(_precompute1) { + }, Point1.prototype.neg = function neg1(_precompute1) { if (this.inf) return this; var res1 = this.curve.point(this.x, this.y.redNeg()); if (_precompute1 && this.precomputed) { @@ -10181,31 +10181,31 @@ }; } return res1; - }, Point1.prototype.toJ = function() { + }, Point1.prototype.toJ = function toJ1() { return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x, this.y, this.curve.one); - }, inherits1(JPoint1, Base1.BasePoint), ShortCurve1.prototype.jpoint = function(x3, y3, z1) { + }, inherits1(JPoint1, Base1.BasePoint), ShortCurve1.prototype.jpoint = function jpoint1(x3, y3, z1) { return new JPoint1(this, x3, y3, z1); - }, JPoint1.prototype.toP = function() { + }, JPoint1.prototype.toP = function toP1() { if (this.isInfinity()) return this.curve.point(null, null); var zinv1 = this.z.redInvm(), zinv21 = zinv1.redSqr(), ax1 = this.x.redMul(zinv21), ay1 = this.y.redMul(zinv21).redMul(zinv1); return this.curve.point(ax1, ay1); - }, JPoint1.prototype.neg = function() { + }, JPoint1.prototype.neg = function neg1() { return this.curve.jpoint(this.x, this.y.redNeg(), this.z); - }, JPoint1.prototype.add = function(p3) { + }, JPoint1.prototype.add = function add1(p3) { if (this.isInfinity()) return p3; if (p3.isInfinity()) return this; var pz21 = p3.z.redSqr(), z21 = this.z.redSqr(), u11 = this.x.redMul(pz21), u21 = p3.x.redMul(z21), s11 = this.y.redMul(pz21.redMul(p3.z)), s21 = p3.y.redMul(z21.redMul(this.z)), h8 = u11.redSub(u21), r3 = s11.redSub(s21); if (0 === h8.cmpn(0)) return 0 !== r3.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); var h21 = h8.redSqr(), h31 = h21.redMul(h8), v3 = u11.redMul(h21), nx1 = r3.redSqr().redIAdd(h31).redISub(v3).redISub(v3), ny1 = r3.redMul(v3.redISub(nx1)).redISub(s11.redMul(h31)), nz1 = this.z.redMul(p3.z).redMul(h8); return this.curve.jpoint(nx1, ny1, nz1); - }, JPoint1.prototype.mixedAdd = function(p3) { + }, JPoint1.prototype.mixedAdd = function mixedAdd1(p3) { if (this.isInfinity()) return p3.toJ(); if (p3.isInfinity()) return this; var z21 = this.z.redSqr(), u11 = this.x, u21 = p3.x.redMul(z21), s11 = this.y, s21 = p3.y.redMul(z21).redMul(this.z), h8 = u11.redSub(u21), r3 = s11.redSub(s21); if (0 === h8.cmpn(0)) return 0 !== r3.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); var h21 = h8.redSqr(), h31 = h21.redMul(h8), v3 = u11.redMul(h21), nx1 = r3.redSqr().redIAdd(h31).redISub(v3).redISub(v3), ny1 = r3.redMul(v3.redISub(nx1)).redISub(s11.redMul(h31)), nz1 = this.z.redMul(h8); return this.curve.jpoint(nx1, ny1, nz1); - }, JPoint1.prototype.dblp = function(pow1) { + }, JPoint1.prototype.dblp = function dblp1(pow1) { if (0 === pow1 || this.isInfinity()) return this; if (!pow1) return this.dbl(); if (this.curve.zeroA || this.curve.threeA) { @@ -10221,9 +10221,9 @@ i2 + 1 < pow1 && (jz41 = jz41.redMul(jyd41)), jx1 = nx1, jz1 = nz1, jyd1 = dny1; } return this.curve.jpoint(jx1, jyd1.redMul(tinv1), jz1); - }, JPoint1.prototype.dbl = function() { + }, JPoint1.prototype.dbl = function dbl1() { return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() : this.curve.threeA ? this._threeDbl() : this._dbl(); - }, JPoint1.prototype._zeroDbl = function() { + }, JPoint1.prototype._zeroDbl = function _zeroDbl1() { if (this.zOne) { var nx1, ny1, nz1, xx1 = this.x.redSqr(), yy1 = this.y.redSqr(), yyyy1 = yy1.redSqr(), s3 = this.x.redAdd(yy1).redSqr().redISub(xx1).redISub(yyyy1); s3 = s3.redIAdd(s3); @@ -10236,7 +10236,7 @@ c81 = (c81 = c81.redIAdd(c81)).redIAdd(c81), nx1 = f1.redISub(d3).redISub(d3), ny1 = e1.redMul(d3.redISub(nx1)).redISub(c81), nz1 = (nz1 = this.y.redMul(this.z)).redIAdd(nz1); } return this.curve.jpoint(nx1, ny1, nz1); - }, JPoint1.prototype._threeDbl = function() { + }, JPoint1.prototype._threeDbl = function _threeDbl1() { if (this.zOne) { var nx1, ny1, nz1, xx1 = this.x.redSqr(), yy1 = this.y.redSqr(), yyyy1 = yy1.redSqr(), s3 = this.x.redAdd(yy1).redSqr().redISub(xx1).redISub(yyyy1); s3 = s3.redIAdd(s3); @@ -10253,12 +10253,12 @@ ggamma81 = (ggamma81 = (ggamma81 = ggamma81.redIAdd(ggamma81)).redIAdd(ggamma81)).redIAdd(ggamma81), ny1 = alpha1.redMul(beta41.redISub(nx1)).redISub(ggamma81); } return this.curve.jpoint(nx1, ny1, nz1); - }, JPoint1.prototype._dbl = function() { + }, JPoint1.prototype._dbl = function _dbl1() { var a10 = this.curve.a, jx1 = this.x, jy1 = this.y, jz1 = this.z, jz41 = jz1.redSqr().redSqr(), jx21 = jx1.redSqr(), jy21 = jy1.redSqr(), c5 = jx21.redAdd(jx21).redIAdd(jx21).redIAdd(a10.redMul(jz41)), jxd41 = jx1.redAdd(jx1), t11 = (jxd41 = jxd41.redIAdd(jxd41)).redMul(jy21), nx1 = c5.redSqr().redISub(t11.redAdd(t11)), t21 = t11.redISub(nx1), jyd81 = jy21.redSqr(); jyd81 = (jyd81 = (jyd81 = jyd81.redIAdd(jyd81)).redIAdd(jyd81)).redIAdd(jyd81); var ny1 = c5.redMul(t21).redISub(jyd81), nz1 = jy1.redAdd(jy1).redMul(jz1); return this.curve.jpoint(nx1, ny1, nz1); - }, JPoint1.prototype.trpl = function() { + }, JPoint1.prototype.trpl = function trpl1() { if (!this.curve.zeroA) return this.dbl().add(this); var xx1 = this.x.redSqr(), yy1 = this.y.redSqr(), zz1 = this.z.redSqr(), yyyy1 = yy1.redSqr(), m1 = xx1.redAdd(xx1).redIAdd(xx1), mm1 = m1.redSqr(), e1 = this.x.redAdd(yy1).redSqr().redISub(xx1).redISub(yyyy1), ee1 = (e1 = (e1 = (e1 = e1.redIAdd(e1)).redAdd(e1).redIAdd(e1)).redISub(mm1)).redSqr(), t3 = yyyy1.redIAdd(yyyy1); t3 = (t3 = (t3 = t3.redIAdd(t3)).redIAdd(t3)).redIAdd(t3); @@ -10270,25 +10270,25 @@ ny1 = (ny1 = (ny1 = ny1.redIAdd(ny1)).redIAdd(ny1)).redIAdd(ny1); var nz1 = this.z.redAdd(e1).redSqr().redISub(zz1).redISub(ee1); return this.curve.jpoint(nx1, ny1, nz1); - }, JPoint1.prototype.mul = function(k3, kbase1) { + }, JPoint1.prototype.mul = function mul1(k3, kbase1) { return k3 = new BN1(k3, kbase1), this.curve._wnafMul(this, k3); - }, JPoint1.prototype.eq = function(p3) { + }, JPoint1.prototype.eq = function eq1(p3) { if ('affine' === p3.type) return this.eq(p3.toJ()); if (this === p3) return !0; var z21 = this.z.redSqr(), pz21 = p3.z.redSqr(); if (0 !== this.x.redMul(pz21).redISub(p3.x.redMul(z21)).cmpn(0)) return !1; var z31 = z21.redMul(this.z), pz31 = pz21.redMul(p3.z); return 0 === this.y.redMul(pz31).redISub(p3.y.redMul(z31)).cmpn(0); - }, JPoint1.prototype.eqXToP = function(x3) { + }, JPoint1.prototype.eqXToP = function eqXToP1(x3) { var zs1 = this.z.redSqr(), rx1 = x3.toRed(this.curve.red).redMul(zs1); if (0 === this.x.cmp(rx1)) return !0; for(var xc1 = x3.clone(), t3 = this.curve.redN.redMul(zs1);;){ if (xc1.iadd(this.curve.n), xc1.cmp(this.curve.p) >= 0) return !1; if (rx1.redIAdd(t3), 0 === this.x.cmp(rx1)) return !0; } - }, JPoint1.prototype.inspect = function() { + }, JPoint1.prototype.inspect = function inspect1() { return this.isInfinity() ? '' : ''; - }, JPoint1.prototype.isInfinity = function() { + }, JPoint1.prototype.isInfinity = function isInfinity1() { return 0 === this.z.cmpn(0); }; }, @@ -10447,13 +10447,13 @@ curve: options1 }), this.curve = options1.curve.curve, this.n = this.curve.n, this.nh = this.n.ushrn(1), this.g = this.curve.g, this.g = options1.curve.g, this.g.precompute(options1.curve.n.bitLength() + 1), this.hash = options1.hash || options1.curve.hash; } - module1.exports = EC1, EC1.prototype.keyPair = function(options1) { + module1.exports = EC1, EC1.prototype.keyPair = function keyPair1(options1) { return new KeyPair1(this, options1); - }, EC1.prototype.keyFromPrivate = function(priv1, enc1) { + }, EC1.prototype.keyFromPrivate = function keyFromPrivate1(priv1, enc1) { return KeyPair1.fromPrivate(this, priv1, enc1); - }, EC1.prototype.keyFromPublic = function(pub1, enc1) { + }, EC1.prototype.keyFromPublic = function keyFromPublic1(pub1, enc1) { return KeyPair1.fromPublic(this, pub1, enc1); - }, EC1.prototype.genKeyPair = function(options1) { + }, EC1.prototype.genKeyPair = function genKeyPair1(options1) { options1 || (options1 = {}); for(var drbg1 = new HmacDRBG1({ hash: this.hash, @@ -10466,10 +10466,10 @@ var priv1 = new BN1(drbg1.generate(bytes1)); if (!(priv1.cmp(ns21) > 0)) return priv1.iaddn(1), this.keyFromPrivate(priv1); } - }, EC1.prototype._truncateToN = function(msg1, truncOnly1) { + }, EC1.prototype._truncateToN = function _truncateToN1(msg1, truncOnly1) { var delta1 = 8 * msg1.byteLength() - this.n.bitLength(); return (delta1 > 0 && (msg1 = msg1.ushrn(delta1)), !truncOnly1 && msg1.cmp(this.n) >= 0) ? msg1.sub(this.n) : msg1; - }, EC1.prototype.sign = function(msg1, key1, enc1, options1) { + }, EC1.prototype.sign = function sign1(msg1, key1, enc1, options1) { 'object' == typeof enc1 && (options1 = enc1, enc1 = null), options1 || (options1 = {}), key1 = this.keyFromPrivate(key1, enc1), msg1 = this._truncateToN(new BN1(msg1, 16)); for(var bytes1 = this.n.byteLength(), bkey1 = key1.getPrivate().toArray('be', bytes1), nonce1 = msg1.toArray('be', bytes1), drbg1 = new HmacDRBG1({ hash: this.hash, @@ -10497,7 +10497,7 @@ } } } - }, EC1.prototype.verify = function(msg1, signature1, key1, enc1) { + }, EC1.prototype.verify = function verify1(msg1, signature1, key1, enc1) { msg1 = this._truncateToN(new BN1(msg1, 16)), key1 = this.keyFromPublic(key1, enc1); var p3, r3 = (signature1 = new Signature1(signature1, 'hex')).r, s3 = signature1.s; if (0 > r3.cmpn(1) || r3.cmp(this.n) >= 0 || 0 > s3.cmpn(1) || s3.cmp(this.n) >= 0) return !1; @@ -10529,17 +10529,17 @@ function KeyPair1(ec1, options1) { this.ec = ec1, this.priv = null, this.pub = null, options1.priv && this._importPrivate(options1.priv, options1.privEnc), options1.pub && this._importPublic(options1.pub, options1.pubEnc); } - module1.exports = KeyPair1, KeyPair1.fromPublic = function(ec1, pub1, enc1) { + module1.exports = KeyPair1, KeyPair1.fromPublic = function fromPublic1(ec1, pub1, enc1) { return pub1 instanceof KeyPair1 ? pub1 : new KeyPair1(ec1, { pub: pub1, pubEnc: enc1 }); - }, KeyPair1.fromPrivate = function(ec1, priv1, enc1) { + }, KeyPair1.fromPrivate = function fromPrivate1(ec1, priv1, enc1) { return priv1 instanceof KeyPair1 ? priv1 : new KeyPair1(ec1, { priv: priv1, privEnc: enc1 }); - }, KeyPair1.prototype.validate = function() { + }, KeyPair1.prototype.validate = function validate1() { var pub1 = this.getPublic(); return pub1.isInfinity() ? { result: !1, @@ -10554,25 +10554,25 @@ result: !1, reason: 'Public key is not a point' }; - }, KeyPair1.prototype.getPublic = function(compact1, enc1) { + }, KeyPair1.prototype.getPublic = function getPublic1(compact1, enc1) { return ('string' == typeof compact1 && (enc1 = compact1, compact1 = null), this.pub || (this.pub = this.ec.g.mul(this.priv)), enc1) ? this.pub.encode(enc1, compact1) : this.pub; - }, KeyPair1.prototype.getPrivate = function(enc1) { + }, KeyPair1.prototype.getPrivate = function getPrivate1(enc1) { return 'hex' === enc1 ? this.priv.toString(16, 2) : this.priv; - }, KeyPair1.prototype._importPrivate = function(key1, enc1) { + }, KeyPair1.prototype._importPrivate = function _importPrivate1(key1, enc1) { this.priv = new BN1(key1, enc1 || 16), this.priv = this.priv.umod(this.ec.curve.n); - }, KeyPair1.prototype._importPublic = function(key1, enc1) { + }, KeyPair1.prototype._importPublic = function _importPublic1(key1, enc1) { if (key1.x || key1.y) { 'mont' === this.ec.curve.type ? assert1(key1.x, 'Need x coordinate') : ('short' === this.ec.curve.type || 'edwards' === this.ec.curve.type) && assert1(key1.x && key1.y, 'Need both x and y coordinate'), this.pub = this.ec.curve.point(key1.x, key1.y); return; } this.pub = this.ec.curve.decodePoint(key1, enc1); - }, KeyPair1.prototype.derive = function(pub1) { + }, KeyPair1.prototype.derive = function derive1(pub1) { return pub1.validate() || assert1(pub1.validate(), 'public point not validated'), pub1.mul(this.priv).getX(); - }, KeyPair1.prototype.sign = function(msg1, enc1, options1) { + }, KeyPair1.prototype.sign = function sign1(msg1, enc1, options1) { return this.ec.sign(msg1, this, enc1, options1); - }, KeyPair1.prototype.verify = function(msg1, signature1) { + }, KeyPair1.prototype.verify = function verify1(msg1, signature1) { return this.ec.verify(msg1, signature1, this); - }, KeyPair1.prototype.inspect = function() { + }, KeyPair1.prototype.inspect = function inspect1() { return ''; }; }, @@ -10607,7 +10607,7 @@ for(arr1.push(0x80 | octets1); --octets1;)arr1.push(len3 >>> (octets1 << 3) & 0xff); arr1.push(len3); } - module1.exports = Signature1, Signature1.prototype._importDER = function(data1, enc1) { + module1.exports = Signature1, Signature1.prototype._importDER = function _importDER1(data1, enc1) { data1 = utils1.toArray(data1, enc1); var p3 = new Position1(); if (0x30 !== data1[p3.place++]) return !1; @@ -10629,7 +10629,7 @@ s3 = s3.slice(1); } return this.r = new BN1(r3), this.s = new BN1(s3), this.recoveryParam = null, !0; - }, Signature1.prototype.toDER = function(enc1) { + }, Signature1.prototype.toDER = function toDER1(enc1) { var r3 = this.r.toArray(), s3 = this.s.toArray(); for(0x80 & r3[0] && (r3 = [ 0 @@ -10653,7 +10653,7 @@ if (assert1('ed25519' === curve1, 'only tested with ed25519 so far'), !(this instanceof EDDSA1)) return new EDDSA1(curve1); curve1 = curves1[curve1].curve, this.curve = curve1, this.g = curve1.g, this.g.precompute(curve1.n.bitLength() + 1), this.pointClass = curve1.point().constructor, this.encodingLength = Math.ceil(curve1.n.bitLength() / 8), this.hash = hash1.sha512; } - module1.exports = EDDSA1, EDDSA1.prototype.sign = function(message1, secret1) { + module1.exports = EDDSA1, EDDSA1.prototype.sign = function sign1(message1, secret1) { message1 = parseBytes1(message1); var key1 = this.keyFromSecret(secret1), r3 = this.hashInt(key1.messagePrefix(), message1), R1 = this.g.mul(r3), Rencoded1 = this.encodePoint(R1), s_1 = this.hashInt(Rencoded1, key1.pubBytes(), message1).mul(key1.priv()), S1 = r3.add(s_1).umod(this.curve.n); return this.makeSignature({ @@ -10661,30 +10661,30 @@ S: S1, Rencoded: Rencoded1 }); - }, EDDSA1.prototype.verify = function(message1, sig1, pub1) { + }, EDDSA1.prototype.verify = function verify1(message1, sig1, pub1) { message1 = parseBytes1(message1), sig1 = this.makeSignature(sig1); var key1 = this.keyFromPublic(pub1), h8 = this.hashInt(sig1.Rencoded(), key1.pubBytes(), message1), SG1 = this.g.mul(sig1.S()); return sig1.R().add(key1.pub().mul(h8)).eq(SG1); - }, EDDSA1.prototype.hashInt = function() { + }, EDDSA1.prototype.hashInt = function hashInt1() { for(var hash1 = this.hash(), i2 = 0; i2 < arguments.length; i2++)hash1.update(arguments[i2]); return utils1.intFromLE(hash1.digest()).umod(this.curve.n); - }, EDDSA1.prototype.keyFromPublic = function(pub1) { + }, EDDSA1.prototype.keyFromPublic = function keyFromPublic1(pub1) { return KeyPair1.fromPublic(this, pub1); - }, EDDSA1.prototype.keyFromSecret = function(secret1) { + }, EDDSA1.prototype.keyFromSecret = function keyFromSecret1(secret1) { return KeyPair1.fromSecret(this, secret1); - }, EDDSA1.prototype.makeSignature = function(sig1) { + }, EDDSA1.prototype.makeSignature = function makeSignature1(sig1) { return sig1 instanceof Signature1 ? sig1 : new Signature1(this, sig1); - }, EDDSA1.prototype.encodePoint = function(point1) { + }, EDDSA1.prototype.encodePoint = function encodePoint1(point1) { var enc1 = point1.getY().toArray('le', this.encodingLength); return enc1[this.encodingLength - 1] |= point1.getX().isOdd() ? 0x80 : 0, enc1; - }, EDDSA1.prototype.decodePoint = function(bytes1) { + }, EDDSA1.prototype.decodePoint = function decodePoint1(bytes1) { var lastIx1 = (bytes1 = utils1.parseBytes(bytes1)).length - 1, normed1 = bytes1.slice(0, lastIx1).concat(-129 & bytes1[lastIx1]), xIsOdd1 = (0x80 & bytes1[lastIx1]) != 0, y3 = utils1.intFromLE(normed1); return this.curve.pointFromY(y3, xIsOdd1); - }, EDDSA1.prototype.encodeInt = function(num1) { + }, EDDSA1.prototype.encodeInt = function encodeInt1(num1) { return num1.toArray('le', this.encodingLength); - }, EDDSA1.prototype.decodeInt = function(bytes1) { + }, EDDSA1.prototype.decodeInt = function decodeInt1(bytes1) { return utils1.intFromLE(bytes1); - }, EDDSA1.prototype.isPoint = function(val1) { + }, EDDSA1.prototype.isPoint = function isPoint1(val1) { return val1 instanceof this.pointClass; }; }, @@ -10694,36 +10694,36 @@ function KeyPair1(eddsa1, params1) { this.eddsa = eddsa1, this._secret = parseBytes1(params1.secret), eddsa1.isPoint(params1.pub) ? this._pub = params1.pub : this._pubBytes = parseBytes1(params1.pub); } - KeyPair1.fromPublic = function(eddsa1, pub1) { + KeyPair1.fromPublic = function fromPublic1(eddsa1, pub1) { return pub1 instanceof KeyPair1 ? pub1 : new KeyPair1(eddsa1, { pub: pub1 }); - }, KeyPair1.fromSecret = function(eddsa1, secret1) { + }, KeyPair1.fromSecret = function fromSecret1(eddsa1, secret1) { return secret1 instanceof KeyPair1 ? secret1 : new KeyPair1(eddsa1, { secret: secret1 }); - }, KeyPair1.prototype.secret = function() { + }, KeyPair1.prototype.secret = function secret1() { return this._secret; - }, cachedProperty1(KeyPair1, 'pubBytes', function() { + }, cachedProperty1(KeyPair1, 'pubBytes', function pubBytes1() { return this.eddsa.encodePoint(this.pub()); - }), cachedProperty1(KeyPair1, 'pub', function() { + }), cachedProperty1(KeyPair1, 'pub', function pub1() { return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv()); - }), cachedProperty1(KeyPair1, 'privBytes', function() { + }), cachedProperty1(KeyPair1, 'privBytes', function privBytes1() { var eddsa1 = this.eddsa, hash1 = this.hash(), lastIx1 = eddsa1.encodingLength - 1, a10 = hash1.slice(0, eddsa1.encodingLength); return a10[0] &= 248, a10[lastIx1] &= 127, a10[lastIx1] |= 64, a10; - }), cachedProperty1(KeyPair1, 'priv', function() { + }), cachedProperty1(KeyPair1, 'priv', function priv1() { return this.eddsa.decodeInt(this.privBytes()); - }), cachedProperty1(KeyPair1, 'hash', function() { + }), cachedProperty1(KeyPair1, 'hash', function hash1() { return this.eddsa.hash().update(this.secret()).digest(); - }), cachedProperty1(KeyPair1, 'messagePrefix', function() { + }), cachedProperty1(KeyPair1, 'messagePrefix', function messagePrefix1() { return this.hash().slice(this.eddsa.encodingLength); - }), KeyPair1.prototype.sign = function(message1) { + }), KeyPair1.prototype.sign = function sign1(message1) { return assert1(this._secret, 'KeyPair can only verify'), this.eddsa.sign(message1, this); - }, KeyPair1.prototype.verify = function(message1, sig1) { + }, KeyPair1.prototype.verify = function verify1(message1, sig1) { return this.eddsa.verify(message1, sig1, this); - }, KeyPair1.prototype.getSecret = function(enc1) { + }, KeyPair1.prototype.getSecret = function getSecret1(enc1) { return assert1(this._secret, 'KeyPair is public only'), utils1.encode(this.secret(), enc1); - }, KeyPair1.prototype.getPublic = function(enc1) { + }, KeyPair1.prototype.getPublic = function getPublic1(enc1) { return utils1.encode(this.pubBytes(), enc1); }, module1.exports = KeyPair1; }, @@ -10736,17 +10736,17 @@ S: sig1.slice(eddsa1.encodingLength) }), assert1(sig1.R && sig1.S, 'Signature without R or S'), eddsa1.isPoint(sig1.R) && (this._R = sig1.R), sig1.S instanceof BN1 && (this._S = sig1.S), this._Rencoded = Array.isArray(sig1.R) ? sig1.R : sig1.Rencoded, this._Sencoded = Array.isArray(sig1.S) ? sig1.S : sig1.Sencoded; } - cachedProperty1(Signature1, 'S', function() { + cachedProperty1(Signature1, 'S', function S1() { return this.eddsa.decodeInt(this.Sencoded()); - }), cachedProperty1(Signature1, 'R', function() { + }), cachedProperty1(Signature1, 'R', function R1() { return this.eddsa.decodePoint(this.Rencoded()); - }), cachedProperty1(Signature1, 'Rencoded', function() { + }), cachedProperty1(Signature1, 'Rencoded', function Rencoded1() { return this.eddsa.encodePoint(this.R()); - }), cachedProperty1(Signature1, 'Sencoded', function() { + }), cachedProperty1(Signature1, 'Sencoded', function Sencoded1() { return this.eddsa.encodeInt(this.S()); - }), Signature1.prototype.toBytes = function() { + }), Signature1.prototype.toBytes = function toBytes1() { return this.Rencoded().concat(this.Sencoded()); - }, Signature1.prototype.toHex = function() { + }, Signature1.prototype.toHex = function toHex1() { return utils1.encode(this.toBytes(), 'hex').toUpperCase(); }, module1.exports = Signature1; }, @@ -11558,7 +11558,7 @@ } function cachedProperty1(obj1, name1, computer1) { var key1 = '_' + name1; - obj1.prototype[name1] = function() { + obj1.prototype[name1] = function cachedProperty1() { return void 0 !== this[key1] ? this[key1] : this[key1] = computer1.call(this); }; } @@ -11572,18 +11572,18 @@ }, 7187: function(module1) { "use strict"; - var ReflectOwnKeys1, R1 = 'object' == typeof Reflect ? Reflect : null, ReflectApply1 = R1 && 'function' == typeof R1.apply ? R1.apply : function(target1, receiver1, args1) { + var ReflectOwnKeys1, R1 = 'object' == typeof Reflect ? Reflect : null, ReflectApply1 = R1 && 'function' == typeof R1.apply ? R1.apply : function ReflectApply1(target1, receiver1, args1) { return Function.prototype.apply.call(target1, receiver1, args1); }; function ProcessEmitWarning1(warning1) { console && console.warn && console.warn(warning1); } - ReflectOwnKeys1 = R1 && 'function' == typeof R1.ownKeys ? R1.ownKeys : Object.getOwnPropertySymbols ? function(target1) { + ReflectOwnKeys1 = R1 && 'function' == typeof R1.ownKeys ? R1.ownKeys : Object.getOwnPropertySymbols ? function ReflectOwnKeys1(target1) { return Object.getOwnPropertyNames(target1).concat(Object.getOwnPropertySymbols(target1)); - } : function(target1) { + } : function ReflectOwnKeys1(target1) { return Object.getOwnPropertyNames(target1); }; - var NumberIsNaN1 = Number.isNaN || function(value1) { + var NumberIsNaN1 = Number.isNaN || function NumberIsNaN1(value1) { return value1 != value1; }; function EventEmitter1() { @@ -11692,12 +11692,12 @@ } }), EventEmitter1.init = function() { (void 0 === this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; - }, EventEmitter1.prototype.setMaxListeners = function(n2) { + }, EventEmitter1.prototype.setMaxListeners = function setMaxListeners1(n2) { if ('number' != typeof n2 || n2 < 0 || NumberIsNaN1(n2)) throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n2 + '.'); return this._maxListeners = n2, this; - }, EventEmitter1.prototype.getMaxListeners = function() { + }, EventEmitter1.prototype.getMaxListeners = function getMaxListeners1() { return _getMaxListeners1(this); - }, EventEmitter1.prototype.emit = function(type1) { + }, EventEmitter1.prototype.emit = function emit1(type1) { for(var args1 = [], i2 = 1; i2 < arguments.length; i2++)args1.push(arguments[i2]); var doError1 = 'error' === type1, events1 = this._events; if (void 0 !== events1) doError1 = doError1 && void 0 === events1.error; @@ -11712,15 +11712,15 @@ if ('function' == typeof handler1) ReflectApply1(handler1, this, args1); else for(var len3 = handler1.length, listeners1 = arrayClone1(handler1, len3), i2 = 0; i2 < len3; ++i2)ReflectApply1(listeners1[i2], this, args1); return !0; - }, EventEmitter1.prototype.addListener = function(type1, listener1) { + }, EventEmitter1.prototype.addListener = function addListener1(type1, listener1) { return _addListener1(this, type1, listener1, !1); - }, EventEmitter1.prototype.on = EventEmitter1.prototype.addListener, EventEmitter1.prototype.prependListener = function(type1, listener1) { + }, EventEmitter1.prototype.on = EventEmitter1.prototype.addListener, EventEmitter1.prototype.prependListener = function prependListener1(type1, listener1) { return _addListener1(this, type1, listener1, !0); - }, EventEmitter1.prototype.once = function(type1, listener1) { + }, EventEmitter1.prototype.once = function once1(type1, listener1) { return checkListener1(listener1), this.on(type1, _onceWrap1(this, type1, listener1)), this; - }, EventEmitter1.prototype.prependOnceListener = function(type1, listener1) { + }, EventEmitter1.prototype.prependOnceListener = function prependOnceListener1(type1, listener1) { return checkListener1(listener1), this.prependListener(type1, _onceWrap1(this, type1, listener1)), this; - }, EventEmitter1.prototype.removeListener = function(type1, listener1) { + }, EventEmitter1.prototype.removeListener = function removeListener1(type1, listener1) { var list1, events1, position1, i2, originalListener1; if (checkListener1(listener1), void 0 === (events1 = this._events) || void 0 === (list1 = events1[type1])) return this; if (list1 === listener1 || list1.listener === listener1) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete events1[type1], events1.removeListener && this.emit('removeListener', type1, list1.listener || listener1)); @@ -11733,7 +11733,7 @@ 0 === position1 ? list1.shift() : spliceOne1(list1, position1), 1 === list1.length && (events1[type1] = list1[0]), void 0 !== events1.removeListener && this.emit('removeListener', type1, originalListener1 || listener1); } return this; - }, EventEmitter1.prototype.off = EventEmitter1.prototype.removeListener, EventEmitter1.prototype.removeAllListeners = function(type1) { + }, EventEmitter1.prototype.off = EventEmitter1.prototype.removeListener, EventEmitter1.prototype.removeAllListeners = function removeAllListeners1(type1) { var listeners1, events1, i2; if (void 0 === (events1 = this._events)) return this; if (void 0 === events1.removeListener) return 0 == arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== events1[type1] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete events1[type1]), this; @@ -11745,13 +11745,13 @@ if ('function' == typeof (listeners1 = events1[type1])) this.removeListener(type1, listeners1); else if (void 0 !== listeners1) for(i2 = listeners1.length - 1; i2 >= 0; i2--)this.removeListener(type1, listeners1[i2]); return this; - }, EventEmitter1.prototype.listeners = function(type1) { + }, EventEmitter1.prototype.listeners = function listeners1(type1) { return _listeners1(this, type1, !0); - }, EventEmitter1.prototype.rawListeners = function(type1) { + }, EventEmitter1.prototype.rawListeners = function rawListeners1(type1) { return _listeners1(this, type1, !1); }, EventEmitter1.listenerCount = function(emitter1, type1) { return 'function' == typeof emitter1.listenerCount ? emitter1.listenerCount(type1) : listenerCount1.call(emitter1, type1); - }, EventEmitter1.prototype.listenerCount = listenerCount1, EventEmitter1.prototype.eventNames = function() { + }, EventEmitter1.prototype.listenerCount = listenerCount1, EventEmitter1.prototype.eventNames = function eventNames1() { return this._eventsCount > 0 ? ReflectOwnKeys1(this._events) : []; }; }, @@ -11843,7 +11843,7 @@ }; return handleCopy1(value1, createCache1()); } - return copy1.default = copy1, copy1.strict = function(value1, options1) { + return copy1.default = copy1, copy1.strict = function strictCopy1(value1, options1) { return copy1(value1, { isStrict: !0, realm: options1 ? options1.realm : void 0 @@ -11869,7 +11869,7 @@ 7648: function(module1) { "use strict"; var ERROR_MESSAGE1 = 'Function.prototype.bind called on incompatible ', slice1 = Array.prototype.slice, toStr1 = Object.prototype.toString, funcType1 = '[object Function]'; - module1.exports = function(that1) { + module1.exports = function bind1(that1) { var bound1, target1 = this; if ('function' != typeof target1 || toStr1.call(target1) !== funcType1) throw TypeError(ERROR_MESSAGE1 + target1); for(var args1 = slice1.call(arguments, 1), binder1 = function() { @@ -12012,7 +12012,7 @@ } } return n_stack1[0]._color = BLACK1, new RedBlackTree1(cmp1, n_stack1[0]); - }, proto1.forEach = function(visit1, lo1, hi1) { + }, proto1.forEach = function rbTreeForEach1(visit1, lo1, hi1) { if (this.root) switch(arguments.length){ case 1: return doVisitFull1(visit1, this.root); @@ -12611,7 +12611,7 @@ } throw new $SyntaxError1('intrinsic ' + name1 + ' does not exist!'); }; - module1.exports = function(name1, allowMissing1) { + module1.exports = function GetIntrinsic1(name1, allowMissing1) { if ('string' != typeof name1 || 0 === name1.length) throw new $TypeError1('intrinsic name must be a non-empty string'); if (arguments.length > 1 && 'boolean' != typeof allowMissing1) throw new $TypeError1('"allowMissing" argument must be a boolean'); if (null === $exec1(/^%?[^%]*%?$/g, name1)) throw new $SyntaxError1('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); @@ -12642,13 +12642,13 @@ 1405: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var origSymbol1 = 'undefined' != typeof Symbol && Symbol, hasSymbolSham1 = __webpack_require__1(5419); - module1.exports = function() { + module1.exports = function hasNativeSymbols1() { return 'function' == typeof origSymbol1 && 'function' == typeof Symbol && 'symbol' == typeof origSymbol1('foo') && 'symbol' == typeof Symbol('bar') && hasSymbolSham1(); }; }, 5419: function(module1) { "use strict"; - module1.exports = function() { + module1.exports = function hasSymbols1() { if ('function' != typeof Symbol || 'function' != typeof Object.getOwnPropertySymbols) return !1; if ('symbol' == typeof Symbol.iterator) return !0; var obj1 = {}, sym1 = Symbol('test'), symObj1 = Object(sym1); @@ -12668,7 +12668,7 @@ 6410: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; var hasSymbols1 = __webpack_require__1(5419); - module1.exports = function() { + module1.exports = function hasToStringTagShams1() { return hasSymbols1() && !!Symbol.toStringTag; }; }, @@ -12687,16 +12687,16 @@ function BlockHash1() { this.pending = null, this.pendingTotal = 0, this.blockSize = this.constructor.blockSize, this.outSize = this.constructor.outSize, this.hmacStrength = this.constructor.hmacStrength, this.padLength = this.constructor.padLength / 8, this.endian = 'big', this._delta8 = this.blockSize / 8, this._delta32 = this.blockSize / 32; } - exports1.BlockHash = BlockHash1, BlockHash1.prototype.update = function(msg1, enc1) { + exports1.BlockHash = BlockHash1, BlockHash1.prototype.update = function update1(msg1, enc1) { if (msg1 = utils1.toArray(msg1, enc1), this.pending ? this.pending = this.pending.concat(msg1) : this.pending = msg1, this.pendingTotal += msg1.length, this.pending.length >= this._delta8) { var r3 = (msg1 = this.pending).length % this._delta8; this.pending = msg1.slice(msg1.length - r3, msg1.length), 0 === this.pending.length && (this.pending = null), msg1 = utils1.join32(msg1, 0, msg1.length - r3, this.endian); for(var i2 = 0; i2 < msg1.length; i2 += this._delta32)this._update(msg1, i2, i2 + this._delta32); } return this; - }, BlockHash1.prototype.digest = function(enc1) { + }, BlockHash1.prototype.digest = function digest1(enc1) { return this.update(this._pad()), assert1(null === this.pending), this._digest(enc1); - }, BlockHash1.prototype._pad = function() { + }, BlockHash1.prototype._pad = function pad1() { var len3 = this.pendingTotal, bytes1 = this._delta8, k3 = bytes1 - (len3 + this.padLength) % bytes1, res1 = Array(k3 + this.padLength); res1[0] = 0x80; for(var i2 = 1; i2 < k3; i2++)res1[i2] = 0; @@ -12714,15 +12714,15 @@ if (!(this instanceof Hmac1)) return new Hmac1(hash1, key1, enc1); this.Hash = hash1, this.blockSize = hash1.blockSize / 8, this.outSize = hash1.outSize / 8, this.inner = null, this.outer = null, this._init(utils1.toArray(key1, enc1)); } - module1.exports = Hmac1, Hmac1.prototype._init = function(key1) { + module1.exports = Hmac1, Hmac1.prototype._init = function init1(key1) { key1.length > this.blockSize && (key1 = new this.Hash().update(key1).digest()), assert1(key1.length <= this.blockSize); for(var i2 = key1.length; i2 < this.blockSize; i2++)key1.push(0); for(i2 = 0; i2 < key1.length; i2++)key1[i2] ^= 0x36; for(i2 = 0, this.inner = new this.Hash().update(key1); i2 < key1.length; i2++)key1[i2] ^= 0x6a; this.outer = new this.Hash().update(key1); - }, Hmac1.prototype.update = function(msg1, enc1) { + }, Hmac1.prototype.update = function update1(msg1, enc1) { return this.inner.update(msg1, enc1), this; - }, Hmac1.prototype.digest = function(enc1) { + }, Hmac1.prototype.digest = function digest1(enc1) { return this.outer.update(this.inner.digest()), this.outer.digest(enc1); }; }, @@ -12748,13 +12748,13 @@ function Kh1(j1) { return j1 <= 15 ? 0x50a28be6 : j1 <= 31 ? 0x5c4dd124 : j1 <= 47 ? 0x6d703ef3 : j1 <= 63 ? 0x7a6d76e9 : 0x00000000; } - utils1.inherits(RIPEMD1601, BlockHash1), exports1.ripemd160 = RIPEMD1601, RIPEMD1601.blockSize = 512, RIPEMD1601.outSize = 160, RIPEMD1601.hmacStrength = 192, RIPEMD1601.padLength = 64, RIPEMD1601.prototype._update = function(msg1, start1) { + utils1.inherits(RIPEMD1601, BlockHash1), exports1.ripemd160 = RIPEMD1601, RIPEMD1601.blockSize = 512, RIPEMD1601.outSize = 160, RIPEMD1601.hmacStrength = 192, RIPEMD1601.padLength = 64, RIPEMD1601.prototype._update = function update1(msg1, start1) { for(var A1 = this.h[0], B1 = this.h[1], C1 = this.h[2], D1 = this.h[3], E1 = this.h[4], Ah1 = A1, Bh1 = B1, Ch1 = C1, Dh1 = D1, Eh1 = E1, j1 = 0; j1 < 80; j1++){ var T3 = sum321(rotl321(sum32_41(A1, f1(j1, B1, C1, D1), msg1[r3[j1] + start1], K1(j1)), s3[j1]), E1); A1 = E1, E1 = D1, D1 = rotl321(C1, 10), C1 = B1, B1 = T3, T3 = sum321(rotl321(sum32_41(Ah1, f1(79 - j1, Bh1, Ch1, Dh1), msg1[rh1[j1] + start1], Kh1(j1)), sh1[j1]), Eh1), Ah1 = Eh1, Eh1 = Dh1, Dh1 = rotl321(Ch1, 10), Ch1 = Bh1, Bh1 = T3; } T3 = sum32_31(this.h[1], C1, Dh1), this.h[1] = sum32_31(this.h[2], D1, Eh1), this.h[2] = sum32_31(this.h[3], E1, Ah1), this.h[3] = sum32_31(this.h[4], A1, Bh1), this.h[4] = sum32_31(this.h[0], B1, Ch1), this.h[0] = T3; - }, RIPEMD1601.prototype._digest = function(enc1) { + }, RIPEMD1601.prototype._digest = function digest1(enc1) { return 'hex' === enc1 ? utils1.toHex32(this.h, 'little') : utils1.split32(this.h, 'little'); }; var r3 = [ @@ -13105,7 +13105,7 @@ 0xc3d2e1f0 ], this.W = Array(80); } - utils1.inherits(SHA11, BlockHash1), module1.exports = SHA11, SHA11.blockSize = 512, SHA11.outSize = 160, SHA11.hmacStrength = 80, SHA11.padLength = 64, SHA11.prototype._update = function(msg1, start1) { + utils1.inherits(SHA11, BlockHash1), module1.exports = SHA11, SHA11.blockSize = 512, SHA11.outSize = 160, SHA11.hmacStrength = 80, SHA11.padLength = 64, SHA11.prototype._update = function _update1(msg1, start1) { for(var W1 = this.W, i2 = 0; i2 < 16; i2++)W1[i2] = msg1[start1 + i2]; for(; i2 < W1.length; i2++)W1[i2] = rotl321(W1[i2 - 3] ^ W1[i2 - 8] ^ W1[i2 - 14] ^ W1[i2 - 16], 1); var a10 = this.h[0], b10 = this.h[1], c5 = this.h[2], d3 = this.h[3], e1 = this.h[4]; @@ -13114,7 +13114,7 @@ e1 = d3, d3 = c5, c5 = rotl321(b10, 30), b10 = a10, a10 = t3; } this.h[0] = sum321(this.h[0], a10), this.h[1] = sum321(this.h[1], b10), this.h[2] = sum321(this.h[2], c5), this.h[3] = sum321(this.h[3], d3), this.h[4] = sum321(this.h[4], e1); - }, SHA11.prototype._digest = function(enc1) { + }, SHA11.prototype._digest = function digest1(enc1) { return 'hex' === enc1 ? utils1.toHex32(this.h, 'big') : utils1.split32(this.h, 'big'); }; }, @@ -13134,7 +13134,7 @@ 0xbefa4fa4 ]; } - utils1.inherits(SHA2241, SHA2561), module1.exports = SHA2241, SHA2241.blockSize = 512, SHA2241.outSize = 224, SHA2241.hmacStrength = 192, SHA2241.padLength = 64, SHA2241.prototype._digest = function(enc1) { + utils1.inherits(SHA2241, SHA2561), module1.exports = SHA2241, SHA2241.blockSize = 512, SHA2241.outSize = 224, SHA2241.hmacStrength = 192, SHA2241.padLength = 64, SHA2241.prototype._digest = function digest1(enc1) { return 'hex' === enc1 ? utils1.toHex32(this.h.slice(0, 7), 'big') : utils1.split32(this.h.slice(0, 7), 'big'); }; }, @@ -13219,7 +13219,7 @@ 0x5be0cd19 ], this.k = sha256_K1, this.W = Array(64); } - utils1.inherits(SHA2561, BlockHash1), module1.exports = SHA2561, SHA2561.blockSize = 512, SHA2561.outSize = 256, SHA2561.hmacStrength = 192, SHA2561.padLength = 64, SHA2561.prototype._update = function(msg1, start1) { + utils1.inherits(SHA2561, BlockHash1), module1.exports = SHA2561, SHA2561.blockSize = 512, SHA2561.outSize = 256, SHA2561.hmacStrength = 192, SHA2561.padLength = 64, SHA2561.prototype._update = function _update1(msg1, start1) { for(var W1 = this.W, i2 = 0; i2 < 16; i2++)W1[i2] = msg1[start1 + i2]; for(; i2 < W1.length; i2++)W1[i2] = sum32_41(g1_2561(W1[i2 - 2]), W1[i2 - 7], g0_2561(W1[i2 - 15]), W1[i2 - 16]); var a10 = this.h[0], b10 = this.h[1], c5 = this.h[2], d3 = this.h[3], e1 = this.h[4], f1 = this.h[5], g3 = this.h[6], h8 = this.h[7]; @@ -13228,7 +13228,7 @@ h8 = g3, g3 = f1, f1 = e1, e1 = sum321(d3, T11), d3 = c5, c5 = b10, b10 = a10, a10 = sum321(T11, T21); } this.h[0] = sum321(this.h[0], a10), this.h[1] = sum321(this.h[1], b10), this.h[2] = sum321(this.h[2], c5), this.h[3] = sum321(this.h[3], d3), this.h[4] = sum321(this.h[4], e1), this.h[5] = sum321(this.h[5], f1), this.h[6] = sum321(this.h[6], g3), this.h[7] = sum321(this.h[7], h8); - }, SHA2561.prototype._digest = function(enc1) { + }, SHA2561.prototype._digest = function digest1(enc1) { return 'hex' === enc1 ? utils1.toHex32(this.h, 'big') : utils1.split32(this.h, 'big'); }; }, @@ -13256,7 +13256,7 @@ 0xbefa4fa4 ]; } - utils1.inherits(SHA3841, SHA5121), module1.exports = SHA3841, SHA3841.blockSize = 1024, SHA3841.outSize = 384, SHA3841.hmacStrength = 192, SHA3841.padLength = 128, SHA3841.prototype._digest = function(enc1) { + utils1.inherits(SHA3841, SHA5121), module1.exports = SHA3841, SHA3841.blockSize = 1024, SHA3841.outSize = 384, SHA3841.hmacStrength = 192, SHA3841.padLength = 128, SHA3841.prototype._digest = function digest1(enc1) { return 'hex' === enc1 ? utils1.toHex32(this.h.slice(0, 12), 'big') : utils1.split32(this.h.slice(0, 12), 'big'); }; }, @@ -13493,13 +13493,13 @@ var r3 = rotr64_lo1(xh1, xl1, 19) ^ rotr64_lo1(xl1, xh1, 29) ^ shr64_lo1(xh1, xl1, 6); return r3 < 0 && (r3 += 0x100000000), r3; } - utils1.inherits(SHA5121, BlockHash1), module1.exports = SHA5121, SHA5121.blockSize = 1024, SHA5121.outSize = 512, SHA5121.hmacStrength = 192, SHA5121.padLength = 128, SHA5121.prototype._prepareBlock = function(msg1, start1) { + utils1.inherits(SHA5121, BlockHash1), module1.exports = SHA5121, SHA5121.blockSize = 1024, SHA5121.outSize = 512, SHA5121.hmacStrength = 192, SHA5121.padLength = 128, SHA5121.prototype._prepareBlock = function _prepareBlock1(msg1, start1) { for(var W1 = this.W, i2 = 0; i2 < 32; i2++)W1[i2] = msg1[start1 + i2]; for(; i2 < W1.length; i2 += 2){ var c0_hi1 = g1_512_hi1(W1[i2 - 4], W1[i2 - 3]), c0_lo1 = g1_512_lo1(W1[i2 - 4], W1[i2 - 3]), c1_hi1 = W1[i2 - 14], c1_lo1 = W1[i2 - 13], c2_hi1 = g0_512_hi1(W1[i2 - 30], W1[i2 - 29]), c2_lo1 = g0_512_lo1(W1[i2 - 30], W1[i2 - 29]), c3_hi1 = W1[i2 - 32], c3_lo1 = W1[i2 - 31]; W1[i2] = sum64_4_hi1(c0_hi1, c0_lo1, c1_hi1, c1_lo1, c2_hi1, c2_lo1, c3_hi1, c3_lo1), W1[i2 + 1] = sum64_4_lo1(c0_hi1, c0_lo1, c1_hi1, c1_lo1, c2_hi1, c2_lo1, c3_hi1, c3_lo1); } - }, SHA5121.prototype._update = function(msg1, start1) { + }, SHA5121.prototype._update = function _update1(msg1, start1) { this._prepareBlock(msg1, start1); var W1 = this.W, ah10 = this.h[0], al10 = this.h[1], bh10 = this.h[2], bl10 = this.h[3], ch1 = this.h[4], cl1 = this.h[5], dh1 = this.h[6], dl1 = this.h[7], eh1 = this.h[8], el1 = this.h[9], fh1 = this.h[10], fl1 = this.h[11], gh1 = this.h[12], gl1 = this.h[13], hh1 = this.h[14], hl1 = this.h[15]; assert1(this.k.length === W1.length); @@ -13508,7 +13508,7 @@ hh1 = gh1, hl1 = gl1, gh1 = fh1, gl1 = fl1, fh1 = eh1, fl1 = el1, eh1 = sum64_hi1(dh1, dl1, T1_hi1, T1_lo1), el1 = sum64_lo1(dl1, dl1, T1_hi1, T1_lo1), dh1 = ch1, dl1 = cl1, ch1 = bh10, cl1 = bl10, bh10 = ah10, bl10 = al10, ah10 = sum64_hi1(T1_hi1, T1_lo1, T2_hi1, T2_lo1), al10 = sum64_lo1(T1_hi1, T1_lo1, T2_hi1, T2_lo1); } sum641(this.h, 0, ah10, al10), sum641(this.h, 2, bh10, bl10), sum641(this.h, 4, ch1, cl1), sum641(this.h, 6, dh1, dl1), sum641(this.h, 8, eh1, el1), sum641(this.h, 10, fh1, fl1), sum641(this.h, 12, gh1, gl1), sum641(this.h, 14, hh1, hl1); - }, SHA5121.prototype._digest = function(enc1) { + }, SHA5121.prototype._digest = function digest1(enc1) { return 'hex' === enc1 ? utils1.toHex32(this.h, 'big') : utils1.split32(this.h, 'big'); }; }, @@ -13659,23 +13659,23 @@ var entropy1 = utils1.toArray(options1.entropy, options1.entropyEnc || 'hex'), nonce1 = utils1.toArray(options1.nonce, options1.nonceEnc || 'hex'), pers1 = utils1.toArray(options1.pers, options1.persEnc || 'hex'); assert1(entropy1.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._init(entropy1, nonce1, pers1); } - module1.exports = HmacDRBG1, HmacDRBG1.prototype._init = function(entropy1, nonce1, pers1) { + module1.exports = HmacDRBG1, HmacDRBG1.prototype._init = function init1(entropy1, nonce1, pers1) { var seed1 = entropy1.concat(nonce1).concat(pers1); this.K = Array(this.outLen / 8), this.V = Array(this.outLen / 8); for(var i2 = 0; i2 < this.V.length; i2++)this.K[i2] = 0x00, this.V[i2] = 0x01; this._update(seed1), this._reseed = 1, this.reseedInterval = 0x1000000000000; - }, HmacDRBG1.prototype._hmac = function() { + }, HmacDRBG1.prototype._hmac = function hmac1() { return new hash1.hmac(this.hash, this.K); - }, HmacDRBG1.prototype._update = function(seed1) { + }, HmacDRBG1.prototype._update = function update1(seed1) { var kmac1 = this._hmac().update(this.V).update([ 0x00 ]); seed1 && (kmac1 = kmac1.update(seed1)), this.K = kmac1.digest(), this.V = this._hmac().update(this.V).digest(), seed1 && (this.K = this._hmac().update(this.V).update([ 0x01 ]).update(seed1).digest(), this.V = this._hmac().update(this.V).digest()); - }, HmacDRBG1.prototype.reseed = function(entropy1, entropyEnc1, add1, addEnc1) { + }, HmacDRBG1.prototype.reseed = function reseed1(entropy1, entropyEnc1, add1, addEnc1) { 'string' != typeof entropyEnc1 && (addEnc1 = add1, add1 = entropyEnc1, entropyEnc1 = null), entropy1 = utils1.toArray(entropy1, entropyEnc1), add1 = utils1.toArray(add1, addEnc1), assert1(entropy1.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._update(entropy1.concat(add1 || [])), this._reseed = 1; - }, HmacDRBG1.prototype.generate = function(len3, enc1, add1, addEnc1) { + }, HmacDRBG1.prototype.generate = function generate1(len3, enc1, add1, addEnc1) { if (this._reseed > this.reseedInterval) throw Error('Reseed is required'); 'string' != typeof enc1 && (addEnc1 = add1, add1 = enc1, enc1 = null), add1 && (add1 = utils1.toArray(add1, addEnc1 || 'hex'), this._update(add1)); for(var temp1 = []; temp1.length < len3;)this.V = this._hmac().update(this.V).digest(), temp1 = temp1.concat(this.V); @@ -13702,7 +13702,7 @@ }; }, 5717: function(module1) { - 'function' == typeof Object.create ? module1.exports = function(ctor1, superCtor1) { + 'function' == typeof Object.create ? module1.exports = function inherits1(ctor1, superCtor1) { superCtor1 && (ctor1.super_ = superCtor1, ctor1.prototype = Object.create(superCtor1.prototype, { constructor: { value: ctor1, @@ -13711,7 +13711,7 @@ configurable: !0 } })); - } : module1.exports = function(ctor1, superCtor1) { + } : module1.exports = function inherits1(ctor1, superCtor1) { if (superCtor1) { ctor1.super_ = superCtor1; var TempCtor1 = function() {}; @@ -13760,7 +13760,7 @@ return !1; } }, toStr1 = Object.prototype.toString, fnClass1 = '[object Function]', genClass1 = '[object GeneratorFunction]', hasToStringTag1 = 'function' == typeof Symbol && !!Symbol.toStringTag, documentDotAll1 = 'object' == typeof document && void 0 === document.all && void 0 !== document.all ? document.all : {}; - module1.exports = reflectApply1 ? function(value1) { + module1.exports = reflectApply1 ? function isCallable1(value1) { if (value1 === documentDotAll1) return !0; if (!value1 || 'function' != typeof value1 && 'object' != typeof value1) return !1; if ('function' == typeof value1 && !value1.prototype) return !0; @@ -13770,7 +13770,7 @@ if (e1 !== isCallableMarker1) return !1; } return !isES6ClassFn1(value1); - } : function(value1) { + } : function isCallable1(value1) { if (value1 === documentDotAll1) return !0; if (!value1 || 'function' != typeof value1 && 'object' != typeof value1) return !1; if ('function' == typeof value1 && !value1.prototype) return !0; @@ -13788,7 +13788,7 @@ return Function('return function*() {}')(); } catch (e1) {} }; - module1.exports = function(fn1) { + module1.exports = function isGeneratorFunction1(fn1) { if ('function' != typeof fn1) return !1; if (isFnRegex1.test(fnToStr1.call(fn1))) return !0; if (!hasToStringTag1) return '[object GeneratorFunction]' === toStr1.call(fn1); @@ -13802,7 +13802,7 @@ }, 5692: function(module1, __unused_webpack_exports1, __webpack_require__1) { "use strict"; - var forEach1 = __webpack_require__1(4029), availableTypedArrays1 = __webpack_require__1(3083), callBound1 = __webpack_require__1(1924), $toString1 = callBound1('Object.prototype.toString'), hasToStringTag1 = __webpack_require__1(6410)(), g3 = 'undefined' == typeof globalThis ? __webpack_require__1.g : globalThis, typedArrays1 = availableTypedArrays1(), $indexOf1 = callBound1('Array.prototype.indexOf', !0) || function(array1, value1) { + var forEach1 = __webpack_require__1(4029), availableTypedArrays1 = __webpack_require__1(3083), callBound1 = __webpack_require__1(1924), $toString1 = callBound1('Object.prototype.toString'), hasToStringTag1 = __webpack_require__1(6410)(), g3 = 'undefined' == typeof globalThis ? __webpack_require__1.g : globalThis, typedArrays1 = availableTypedArrays1(), $indexOf1 = callBound1('Array.prototype.indexOf', !0) || function indexOf1(array1, value1) { for(var i2 = 0; i2 < array1.length; i2 += 1)if (array1[i2] === value1) return i2; return -1; }, $slice1 = callBound1('String.prototype.slice'), toStrTags1 = {}, gOPD1 = __webpack_require__1(882), getPrototypeOf1 = Object.getPrototypeOf; @@ -13821,7 +13821,7 @@ } catch (e1) {} }), anyTrue1; }; - module1.exports = function(value1) { + module1.exports = function isTypedArray1(value1) { return !!value1 && 'object' == typeof value1 && (hasToStringTag1 && Symbol.toStringTag in value1 ? !!gOPD1 && tryTypedArrays1(value1) : $indexOf1(typedArrays1, $slice1($toString1(value1), 8, -1)) > -1); }; }, @@ -14578,7 +14578,7 @@ }, 1675: function(__unused_webpack_module1, exports1) { "use strict"; - exports1.supports = function(...manifests1) { + exports1.supports = function supports1(...manifests1) { const manifest1 = manifests1.reduce((acc1, m1)=>Object.assign(acc1, m1), {}); return Object.assign(manifest1, { snapshots: manifest1.snapshots || !1, @@ -15966,7 +15966,7 @@ function assert1(val1, msg1) { if (!val1) throw Error(msg1 || 'Assertion failed'); } - module1.exports = assert1, assert1.equal = function(l1, r3, msg1) { + module1.exports = assert1, assert1.equal = function assertEqual1(l1, r3, msg1) { if (l1 != r3) throw Error(msg1 || 'Assertion failed: ' + l1 + ' != ' + r3); }; }, @@ -15997,13 +15997,13 @@ for(var res1 = '', i2 = 0; i2 < msg1.length; i2++)res1 += zero21(msg1[i2].toString(16)); return res1; } - utils1.toArray = toArray1, utils1.zero2 = zero21, utils1.toHex = toHex1, utils1.encode = function(arr1, enc1) { + utils1.toArray = toArray1, utils1.zero2 = zero21, utils1.toHex = toHex1, utils1.encode = function encode1(arr1, enc1) { return 'hex' === enc1 ? toHex1(arr1) : arr1; }; }, 4473: function(module1) { "use strict"; - module1.exports = class extends Error { + module1.exports = class ModuleError1 extends Error { constructor(message1, options1){ super(message1 || ''), 'object' == typeof options1 && null !== options1 && (options1.code && (this.code = String(options1.code)), options1.expected && (this.expected = !0), options1.transient && (this.transient = !0), options1.cause && (this.cause = options1.cause)), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); } @@ -16125,7 +16125,7 @@ !function() { var e1 = { 140: function(e1) { - "function" == typeof Object.create ? e1.exports = function(e1, t3) { + "function" == typeof Object.create ? e1.exports = function inherits1(e1, t3) { t3 && (e1.super_ = t3, e1.prototype = Object.create(t3.prototype, { constructor: { value: e1, @@ -16134,7 +16134,7 @@ configurable: !0 } })); - } : e1.exports = function(e1, t3) { + } : e1.exports = function inherits1(e1, t3) { if (t3) { e1.super_ = t3; var TempCtor1 = function() {}; @@ -16217,25 +16217,25 @@ } Object.defineProperty(Duplex1.prototype, "writableHighWaterMark", { enumerable: !1, - get: function() { + get: function get1() { return this._writableState.highWaterMark; } }), Object.defineProperty(Duplex1.prototype, "writableBuffer", { enumerable: !1, - get: function() { + get: function get1() { return this._writableState && this._writableState.getBuffer(); } }), Object.defineProperty(Duplex1.prototype, "writableLength", { enumerable: !1, - get: function() { + get: function get1() { return this._writableState.length; } }), Object.defineProperty(Duplex1.prototype, "destroyed", { enumerable: !1, - get: function() { + get: function get1() { return void 0 !== this._readableState && void 0 !== this._writableState && this._readableState.destroyed && this._writableState.destroyed; }, - set: function(e1) { + set: function set1(e1) { void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e1, this._writableState.destroyed = e1); } }); @@ -16265,7 +16265,7 @@ return s3.isBuffer(e1) || e1 instanceof f1; } var l1 = r3(837); - u3 = l1 && l1.debuglog ? l1.debuglog("stream") : function() {}; + u3 = l1 && l1.debuglog ? l1.debuglog("stream") : function debug1() {}; var d3 = r3(41), c5 = r3(289), p3 = r3(483).getHighWaterMark, b10 = r3(349).q, g3 = b10.ERR_INVALID_ARG_TYPE, y3 = b10.ERR_STREAM_PUSH_AFTER_EOF, _1 = b10.ERR_METHOD_NOT_IMPLEMENTED, v3 = b10.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; r3(140)(Readable1, o1); var R1 = c5.errorOrDestroy, E1 = [ @@ -16318,10 +16318,10 @@ } Object.defineProperty(Readable1.prototype, "destroyed", { enumerable: !1, - get: function() { + get: function get1() { return void 0 !== this._readableState && this._readableState.destroyed; }, - set: function(e1) { + set: function set1(e1) { this._readableState && (this._readableState.destroyed = e1); } }), Readable1.prototype.destroy = c5.destroy, Readable1.prototype._undestroy = c5.undestroy, Readable1.prototype._destroy = function(e1, t3) { @@ -16375,7 +16375,7 @@ t3.readingMore = !1; } function pipeOnDrain1(e1) { - return function() { + return function pipeOnDrainFunctionResult1() { var t3 = e1._readableState; u3("pipeOnDrain", t3.awaitDrain), t3.awaitDrain && t3.awaitDrain--, 0 === t3.awaitDrain && a10(e1, "data") && (t3.flowing = !0, flow1(e1)); }; @@ -16512,8 +16512,8 @@ t3.push(null); }), e1.on("data", function(i2) { u3("wrapped data"), r3.decoder && (i2 = r3.decoder.write(i2)), (!r3.objectMode || null != i2) && (r3.objectMode || i2 && i2.length) && (t3.push(i2) || (n2 = !0, e1.pause())); - }), e1)void 0 === this[i2] && "function" == typeof e1[i2] && (this[i2] = function(t3) { - return function() { + }), e1)void 0 === this[i2] && "function" == typeof e1[i2] && (this[i2] = function methodWrap1(t3) { + return function methodWrapReturnFunction1() { return e1[t3].apply(e1, arguments); }; }(i2)); @@ -16525,25 +16525,25 @@ return void 0 === m1 && (m1 = r3(224)), m1(this); }), Object.defineProperty(Readable1.prototype, "readableHighWaterMark", { enumerable: !1, - get: function() { + get: function get1() { return this._readableState.highWaterMark; } }), Object.defineProperty(Readable1.prototype, "readableBuffer", { enumerable: !1, - get: function() { + get: function get1() { return this._readableState && this._readableState.buffer; } }), Object.defineProperty(Readable1.prototype, "readableFlowing", { enumerable: !1, - get: function() { + get: function get1() { return this._readableState.flowing; }, - set: function(e1) { + set: function set1(e1) { this._readableState && (this._readableState.flowing = e1); } }), Readable1._fromList = fromList1, Object.defineProperty(Readable1.prototype, "readableLength", { enumerable: !1, - get: function() { + get: function get1() { return this._readableState.length; } }), "function" == typeof Symbol && (Readable1.from = function(e1, t3) { @@ -16742,22 +16742,22 @@ } t3.corkedRequestsFree.next = e1; } - r3(140)(Writable1, a10), WritableState1.prototype.getBuffer = function() { + r3(140)(Writable1, a10), WritableState1.prototype.getBuffer = function getBuffer1() { for(var e1 = this.bufferedRequest, t3 = []; e1;)t3.push(e1), e1 = e1.next; return t3; }, function() { try { Object.defineProperty(WritableState1.prototype, "buffer", { - get: i2.deprecate(function() { + get: i2.deprecate(function writableStateBufferGetter1() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); } catch (e1) {} }(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (m1 = Function.prototype[Symbol.hasInstance], Object.defineProperty(Writable1, Symbol.hasInstance, { - value: function(e1) { + value: function value1(e1) { return !!m1.call(this, e1) || this === Writable1 && e1 && e1._writableState instanceof WritableState1; } - })) : m1 = function(e1) { + })) : m1 = function realHasInstance1(e1) { return e1 instanceof this; }, Writable1.prototype.pipe = function() { w19(this, new b10); @@ -16769,7 +16769,7 @@ }, Writable1.prototype.uncork = function() { var e1 = this._writableState; !e1.corked || (e1.corked--, e1.writing || e1.corked || e1.bufferProcessing || !e1.bufferedRequest || clearBuffer1(this, e1)); - }, Writable1.prototype.setDefaultEncoding = function(e1) { + }, Writable1.prototype.setDefaultEncoding = function setDefaultEncoding1(e1) { if ("string" == typeof e1 && (e1 = e1.toLowerCase()), !([ "hex", "utf8", @@ -16786,12 +16786,12 @@ return this._writableState.defaultEncoding = e1, this; }, Object.defineProperty(Writable1.prototype, "writableBuffer", { enumerable: !1, - get: function() { + get: function get1() { return this._writableState && this._writableState.getBuffer(); } }), Object.defineProperty(Writable1.prototype, "writableHighWaterMark", { enumerable: !1, - get: function() { + get: function get1() { return this._writableState.highWaterMark; } }), Writable1.prototype._write = function(e1, t3, r3) { @@ -16801,15 +16801,15 @@ return "function" == typeof e1 ? (r3 = e1, e1 = null, t3 = null) : "function" == typeof t3 && (r3 = t3, t3 = null), null != e1 && this.write(e1, t3), n2.corked && (n2.corked = 1, this.uncork()), n2.ending || endWritable1(this, n2, r3), this; }, Object.defineProperty(Writable1.prototype, "writableLength", { enumerable: !1, - get: function() { + get: function get1() { return this._writableState.length; } }), Object.defineProperty(Writable1.prototype, "destroyed", { enumerable: !1, - get: function() { + get: function get1() { return void 0 !== this._writableState && this._writableState.destroyed; }, - set: function(e1) { + set: function set1(e1) { this._writableState && (this._writableState.destroyed = e1); } }), Writable1.prototype.destroy = f1.destroy, Writable1.prototype._undestroy = f1.undestroy, Writable1.prototype._destroy = function(e1, t3) { @@ -16858,7 +16858,7 @@ get stream () { return this[d3]; }, - next: function() { + next: function next1() { var n2, e1 = this, t3 = this[s3]; if (null !== t3) return Promise.reject(t3); if (this[f1]) return Promise.resolve(createIterResult1(void 0, !0)); @@ -16878,7 +16878,7 @@ } }, Symbol.asyncIterator, function() { return this; - }), _defineProperty1(n2, "return", function() { + }), _defineProperty1(n2, "return", function _return1() { var e1 = this; return new Promise(function(t3, r3) { e1[d3].destroy(null, function(e1) { @@ -16906,7 +16906,7 @@ value: e1._readableState.endEmitted, writable: !0 }), _defineProperty1(t3, u3, { - value: function(e1, t3) { + value: function value1(e1, t3) { var n2 = r3[d3].read(); n2 ? (r3[l1] = null, r3[a10] = null, r3[o1] = null, e1(createIterResult1(n2, !1))) : (r3[a10] = e1, r3[o1] = t3); }, @@ -16978,7 +16978,7 @@ return _createClass1(BufferList1, [ { key: "push", - value: function(e1) { + value: function push1(e1) { var t3 = { data: e1, next: null @@ -16988,7 +16988,7 @@ }, { key: "unshift", - value: function(e1) { + value: function unshift1(e1) { var t3 = { data: e1, next: this.head @@ -16998,7 +16998,7 @@ }, { key: "shift", - value: function() { + value: function shift1() { if (0 !== this.length) { var e1 = this.head.data; return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e1; @@ -17007,13 +17007,13 @@ }, { key: "clear", - value: function() { + value: function clear1() { this.head = this.tail = null, this.length = 0; } }, { key: "join", - value: function(e1) { + value: function join1(e1) { if (0 === this.length) return ""; for(var t3 = this.head, r3 = "" + t3.data; t3 = t3.next;)r3 += e1 + t3.data; return r3; @@ -17021,7 +17021,7 @@ }, { key: "concat", - value: function(e1) { + value: function concat1(e1) { if (0 === this.length) return i2.alloc(0); for(var t3 = i2.allocUnsafe(e1 >>> 0), r3 = this.head, n2 = 0; r3;)copyBuffer1(r3.data, t3, n2), n2 += r3.data.length, r3 = r3.next; return t3; @@ -17029,20 +17029,20 @@ }, { key: "consume", - value: function(e1, t3) { + value: function consume1(e1, t3) { var r3; return e1 < this.head.data.length ? (r3 = this.head.data.slice(0, e1), this.head.data = this.head.data.slice(e1)) : r3 = e1 === this.head.data.length ? this.shift() : t3 ? this._getString(e1) : this._getBuffer(e1), r3; } }, { key: "first", - value: function() { + value: function first1() { return this.head.data; } }, { key: "_getString", - value: function(e1) { + value: function _getString1(e1) { var t3 = this.head, r3 = 1, n2 = t3.data; for(e1 -= n2.length; t3 = t3.next;){ var i2 = t3.data, a10 = e1 > i2.length ? i2.length : e1; @@ -17057,7 +17057,7 @@ }, { key: "_getBuffer", - value: function(e1) { + value: function _getBuffer1(e1) { var t3 = i2.allocUnsafe(e1), r3 = this.head, n2 = 1; for(r3.data.copy(t3), e1 -= r3.data.length; r3 = r3.next;){ var a10 = r3.data, o1 = e1 > a10.length ? a10.length : e1; @@ -17072,7 +17072,7 @@ }, { key: s3, - value: function(e1, t3) { + value: function value1(e1, t3) { return o1(this, _objectSpread1({}, t3, { depth: 0, customInspect: !1 @@ -17522,7 +17522,7 @@ function deprecate1(e1, t3) { if (config3("noDeprecation")) return e1; var r3 = !1; - return function() { + return function deprecated1() { if (!r3) { if (config3("throwDeprecation")) throw Error(t3); config3("traceDeprecation") ? console.trace(t3) : console.warn(t3), r3 = !0; @@ -17643,7 +17643,7 @@ ]; function Context() {} Context.prototype = {}; - var Script = exports.Script = function(e1) { + var Script = exports.Script = function NodeScript1(e1) { if (!(this instanceof Script)) return new Script(e1); this.code = e1; }; @@ -17719,7 +17719,7 @@ 'code', 'data' ]; - module1.exports = class { + module1.exports = class ModuleIterator1 { constructor(wasm1){ this._wasm = wasm1, this._sections = [], this._modified = !1; } @@ -18076,7 +18076,7 @@ }, 825: function(module1, __unused_webpack_exports1, __webpack_require__1) { const Buffer1 = __webpack_require__1(9509).Buffer; - module1.exports = class { + module1.exports = class BufferPipe1 { constructor(buf1 = Buffer1.from([])){ this.buffer = buf1, this._bytesRead = 0, this._bytesWrote = 0; } @@ -19178,7 +19178,7 @@ return bigint1 ? String(value1) : void 0; } } - return function(value1, replacer1, space1) { + return function stringify1(value1, replacer1, space1) { if (arguments.length > 1) { let spacer1 = ''; if ('number' == typeof space1 ? spacer1 = ' '.repeat(Math.min(space1, 10)) : 'string' == typeof space1 && (spacer1 = space1.slice(0, 10)), null != replacer1) { @@ -20145,7 +20145,7 @@ } }, 384: function(module1) { - module1.exports = function(arg4) { + module1.exports = function isBuffer1(arg4) { return arg4 && 'object' == typeof arg4 && 'function' == typeof arg4.copy && 'function' == typeof arg4.fill && 'function' == typeof arg4.readUInt8; }; }, @@ -20299,7 +20299,7 @@ }); }, 9539: function(__unused_webpack_module1, exports1, __webpack_require__1) { - var process1 = __webpack_require__1(3454), getOwnPropertyDescriptors1 = Object.getOwnPropertyDescriptors || function(obj1) { + var process1 = __webpack_require__1(3454), getOwnPropertyDescriptors1 = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors1(obj1) { for(var keys1 = Object.keys(obj1), descriptors1 = {}, i2 = 0; i2 < keys1.length; i2++)descriptors1[keys1[i2]] = Object.getOwnPropertyDescriptor(obj1, keys1[i2]); return descriptors1; }, formatRegExp1 = /%[sdj%]/g; @@ -20333,7 +20333,7 @@ return exports1.deprecate(fn1, msg1).apply(this, arguments); }; var warned1 = !1; - return function() { + return function deprecated1() { if (!warned1) { if (process1.throwDeprecation) throw Error(msg1); process1.traceDeprecation ? console.trace(msg1) : console.error(msg1), warned1 = !0; @@ -20615,7 +20615,7 @@ } return Object.setPrototypeOf(callbackified1, Object.getPrototypeOf(original1)), Object.defineProperties(callbackified1, getOwnPropertyDescriptors1(original1)), callbackified1; } - exports1.promisify = function(original1) { + exports1.promisify = function promisify1(original1) { if ('function' != typeof original1) throw TypeError('The "original" argument must be of type Function'); if (kCustomPromisifiedSymbol1 && original1[kCustomPromisifiedSymbol1]) { var fn1 = original1[kCustomPromisifiedSymbol1]; @@ -24183,7 +24183,7 @@ } catch (e1) {} }), foundName1; }, isTypedArray1 = __webpack_require__1(5692); - module1.exports = function(value1) { + module1.exports = function whichTypedArray1(value1) { return !!isTypedArray1(value1) && (hasToStringTag1 && Symbol.toStringTag in value1 ? tryTypedArrays1(value1) : $slice1($toString1(value1), 8, -1)); }; }, @@ -24216,10 +24216,10 @@ return memory1 ? getStringImpl1(memory1.buffer, ptr1) : ""; } const env1 = imports1.env = imports1.env || {}; - return env1.abort = env1.abort || function(msg1, file1, line1, colm1) { + return env1.abort = env1.abort || function abort1(msg1, file1, line1, colm1) { const memory1 = extendedExports1.memory || env1.memory; throw Error(`abort: ${getString1(memory1, msg1)} at ${getString1(memory1, file1)}:${line1}:${colm1}`); - }, env1.trace = env1.trace || function(msg1, n2, ...args1) { + }, env1.trace = env1.trace || function trace1(msg1, n2, ...args1) { const memory1 = extendedExports1.memory || env1.memory; console.log(`trace: ${getString1(memory1, msg1)}${n2 ? " " : ""}${args1.slice(0, n2).join(", ")}`); }, env1.seed = env1.seed || Date.now, imports1.Math = imports1.Math || Math, imports1.Date = imports1.Date || Date, extendedExports1; @@ -24475,7 +24475,7 @@ 'Uint8Array', 'Uint8ClampedArray' ], g3 = 'undefined' == typeof globalThis ? __webpack_require__1.g : globalThis; - module1.exports = function() { + module1.exports = function availableTypedArrays1() { for(var out1 = [], i2 = 0; i2 < possibleNames1.length; i2++)'function' == typeof g3[possibleNames1[i2]] && (out1[out1.length] = possibleNames1[i2]); return out1; };